-
-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a way to connect to signals with after=true
#964
Comments
IMHO currently it not necessary |
What do you mean with not necessary? :) It's needed for correct usage of some APIs. |
Example please, that we can't cover with bool parameter |
We don't have a bool parameter, that's the problem exactly :) |
Also, basically all GTK signals that return |
Seems I don't understand question, as we have flag in ObjectExt::connect https://github.com/gtk-rs/glib/blob/ff2e05f017761c751b13cb92a31a027e6397370d/src/object.rs#L1301 |
Yes that's the dynamic one with |
You want to add |
That's exactly the question, how to handle that best :) |
So options I can think of (either always or configurable / opt-in):
|
In public interface I prefer |
That would mean to duplicate the trampoline though (it's inline inside the connect function). If we go that way we should probably also make it |
IMHO changing ObjectExt is not needed |
Well, it would be more consistent :) @GuillaumeGomez do you have any opinions? |
Not really. :-/ |
Then I'd go with But before doing so I'd wait for @GuillaumeGomez to finish his work on converting the signal handlers to |
Oh, considering my current motivation, it might take a while. :-/ |
We could maybe make use of const generics here: pub fn connect_foo<const A: bool, F: Fn()>(&self, func: F) { ... } However there does not seem to be any syntax to define a default value for const generics ( |
See
g_signal_connect()
vs.g_signal_connect_after()
in C. We can already do that viaObjectExt::connect()
but it would be useful to also have this for the strongly typed signal connection functions.Any ideas? @EPashkin @GuillaumeGomez ? :)
The text was updated successfully, but these errors were encountered: