GNOME Bugzilla – Bug 371716
Python bindings for ATK appear not to bind atk_add_global_event_listener
Last modified: 2018-08-17 13:34:35 UTC
Forwarding this from a downstream bug report. http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=133138 It's quite old but still valid. From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040809 Description of problem: import atk dir (atk) lists remove_global_event_listener but does not list add_global_event_listener. Can't find it in atk.Util either. Appears to be wrapped, looking at latest version in CVS; am I being daft and not spotting it, are we up-to-date, or has something gone wrong with the bindings? Version-Release number of selected component (if applicable): pygtk2-2.3.96-2 How reproducible: Always Steps to Reproduce: 1. python 2. import atk 3. dir (atk) Additional info: I just had a go at trying to build the latest version in pygtk2/devel (2.3.96-2); the following error messages during code generation look like the cause of the problem: Could not write method AtkObject.connect_property_change_handler: No ArgType for 'AtkPropertyChangeHandler*' Could not write method AtkObject.notify_state_change: No ArgType for 'AtkState' Warning: generating old-style constructor for atk_no_op_object_new Could not write method AtkRelation.get_target: No ArgType for 'GPtrArray*' Could not write method AtkStateSet.add_states: No ArgType for 'AtkStateType*' Could not write method AtkStateSet.contains_states: No ArgType for 'AtkStateType*' Could not write function add_focus_tracker: No ArgType for 'AtkEventListener' Could not write function focus_tracker_init: No ArgType for 'AtkEventListenerInit' Could not write function add_global_event_listener: No ArgType for 'GSignalEmissionHook' Could not write function add_key_event_listener: No ArgType for 'AtkKeySnoopFunc'
For the record, it is not possible (at least I don't know how) to wrap global listener stuff, because 'add' function doesn't accept 'data' parameter, only callback function address. We cannot dynamically create functions in C, so this is a dead end. What's the status of ATK? Is it alive at all? If yes, and you are still interested in this, you can try filing bugs against ATK. In short, whenever you pass some callback _without_ data argument, that is not wrappable for various language bindings, including PyGTK.
pygtk is not under active development anymore and had its last code changes in 2013. Its codebase has been archived: https://gitlab.gnome.org/Archive/pygtk/commits/master PyGObject at https://gitlab.gnome.org/GNOME/pygobject is its successor. See https://pygobject.readthedocs.io/en/latest/guide/porting.html for porting info. Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Feel free to open a task in GNOME Gitlab if the issue described in this task still applies to a recent version of PyGObject. Thanks!