GNOME Bugzilla – Bug 687898
[gi] make gdk_window_add_filter introspectable
Last modified: 2018-02-10 04:38:34 UTC
For Caribou, I'm trying to move libxklavier related code from libcaribou to caribou-daemon, a Python wrapper to launch Antler. To watch libxklavier events, I need to access gdk_window_add_filter from Python, but it is marked as "(skip)" in the source code. Any chance of making it introspectable? From the output of "git blame", it has been skipped since 374e76a1, but I couldn't find any bug reference.
Created attachment 228437 [details] [review] [gi] make gdk_window_add_filter introspectable
Created attachment 228617 [details] [review] [gi] make gdk_window_add_filter introspectable Oops, scope should be "notified" rather than "call". By the way, I realized that using this function for my case is infeasible, even if this patch is applied. Because pygoject does not seem to allow clients to pass NULL as the self argument. So setting priority to minor.
(In reply to comment #2) > By the way, I realized that using this function for my case is > infeasible, even if this patch is applied. Because pygoject does > not seem to allow clients to pass NULL as the self argument. That's right, a method always needs to be called on an object. To allow this, we'd need the counterpart of the (method) annotation, to declare that something that looks like a method (proper class name prefix and self argument) is actually a function.
(In reply to comment #3) Thanks for the comment. > That's right, a method always needs to be called on an object. To allow this, > we'd need the counterpart of the (method) annotation, to declare that something > that looks like a method (proper class name prefix and self argument) is > actually a function. So, as long as gi is used with GObject, the only possible value of self arg is pointer or NULL. Isn't it reasonable to make g-ir-scanner emit both "method" and "function" declarations (or only "function") if there is (allow-none) annotation added to self? Maybe a stupid idea though.
(In reply to comment #4) > Isn't it reasonable to make g-ir-scanner emit both "method" > and "function" declarations (or only "function") if there is (allow-none) > annotation added to self? Maybe a stupid idea though. This seems plausible to me. I guess it should also emit a method, for backwards compatibility.
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue for it.