After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 687898 - [gi] make gdk_window_add_filter introspectable
[gi] make gdk_window_add_filter introspectable
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Backend: X11
unspecified
Other All
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on: 688040
Blocks:
 
 
Reported: 2012-11-08 06:36 UTC by Daiki Ueno
Modified: 2018-02-10 04:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[gi] make gdk_window_add_filter introspectable (1.36 KB, patch)
2012-11-08 06:36 UTC, Daiki Ueno
none Details | Review
[gi] make gdk_window_add_filter introspectable (1.37 KB, patch)
2012-11-10 03:34 UTC, Daiki Ueno
none Details | Review

Description Daiki Ueno 2012-11-08 06:36:15 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.
Comment 1 Daiki Ueno 2012-11-08 06:36:18 UTC
Created attachment 228437 [details] [review]
[gi] make gdk_window_add_filter introspectable
Comment 2 Daiki Ueno 2012-11-10 03:34:40 UTC
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.
Comment 3 Martin Pitt 2012-11-12 06:24:05 UTC
(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.
Comment 4 Daiki Ueno 2012-11-12 11:29:02 UTC
(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.
Comment 5 Martin Pitt 2012-11-19 07:02:44 UTC
(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.
Comment 6 Matthias Clasen 2018-02-10 04:38:34 UTC
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.