Comments (10)
I'm still undecided about where exactly the signals belong. If they are generated alongside other functions, perhaps xxxSignals
traits are unnecessary, just put them into xxxExt
?
Also we should probably fix callback_guard!
to not require importing the struct.
from gir.
Currently signals trait implemented with bound IsA<ComboBox> + IsA<Object>
.
from gir.
Yeah the IsA<Object>
is required to get ToGlibPtr<*mut GObject>
but it's harmless as a bound because all objects implement it.
from gir.
Other that bound don't see any problem with implementing in xxxExt
or in same impl for childless class.
from gir.
Generating correct trampoline signatures might require finishing the ffi_ng
branch. Eventually I'd like the trampoline signatures to match C exactly (no f: &Box<Fn(...)>
, but rather cast user_data: gpointer
to &Box<Fn(...)>
).
from gir.
It's worse than that: signal definitions seem to routinely omit c:type
attributes:
<glib:signal name="accel-activate" detailed="1">
...
<parameters>
<parameter name="acceleratable" transfer-ownership="none">
<doc xml:space="preserve">the object on which the accelerator was activated</doc>
<type name="GObject.Object"/>
</parameter>
<parameter name="keyval" transfer-ownership="none">
<doc xml:space="preserve">the accelerator keyval</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="modifier" transfer-ownership="none">
<doc xml:space="preserve">the modifier combination of the accelerator</doc>
<type name="Gdk.ModifierType"/>
</parameter>
</parameters>
</glib:signal>
from gir.
If it omit only for glib-related types then its not big problem
from gir.
Speaking of signals, I'm yet again considering adding Borrow<T>
and BorrowMut<T>
wrappers, that forget
their contents on destruction, and from_glib_borrow
transfer mode so callback parameters could truly be borrowed without touching refcounts or copying boxed types (e.g. GdkEvent
).
from gir.
Signals with no-recurse
could take FnMut
instead of Fn
.
from gir.
All child issues was closed, so I also close this
from gir.
Related Issues (20)
- [Feature request] Create release for 0.16 HOT 1
- [Feature request] Create release for 0.17 HOT 1
- Fails to find .gir files out of nowhere
- Suggestion: Remove dox feature in favor of rustc args HOT 6
- How to fix libgir::parser warning with GTK4? HOT 4
- No bindings generated for Vala async methods
- `void`-returning non-throwing async method generates broken binding code HOT 1
- DEFAULT_GIR_PATH could respect CARGO_TARGET_DIR
- Append implementors list to ExtManual traits
- Add a way to disable abi test for a certain type
- Question: How to rename Object HOT 4
- Should generate deprecate warning in rust code, when C code macro expand to `__attribute__` `__deprecated__` HOT 6
- Should not implement `Default` if there is a function called `default`
- Allow for separate Gir and Library names
- Spurious clippy warning about unused import HOT 4
- [Bug] time_t64 causes regeneration to fail for gio-sys HOT 11
- Add support for `glib:finish-func` and related attributes for GIO async APIs
- Generated Builders: implement extra setters for properties
- Need help: gir-generated tests fail?
- gtk-4 generated builders should panic if GTK hasn't been initialized
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gir.