Re: [clutter] Trying to emulate gtk_key_snooper_install functionality
From: Emmanuele Bassi eba...@o-hand.com On Fri, 2009-10-23 at 18:24 +0200, Pi=C3=B1eiro wrote: In order to resolve bug 1852 [1] I would require a equivalent functionality to gtk_key_snooper_install [2]. =20 A direct solution would be just connect to key-press-event and key-release-event on the stage (and in any other stages that would appear), and simulate this function in the callback. =20 This is not exactly the same, but I think that the functionality would be really equivalent (if I don't miss any detail, this is my first idea). yes: using ClutterStageManager and its ::stage-added and ::stage-removed signals to connect and disconnect a ::captured-event to filter out the key events would be the equivalent. Ok, thanks for the extra hints. I'm not entirely sold on adding a key-snooper API, since it would only be useful for A11Y, and because Clutter already provides a way to achieve the same functionality using public API. Ok, I will go for the option by hand. Thanks. === API (apinhe...@igalia.com) -- To unsubscribe send a mail to clutter+unsubscr...@o-hand.com
[clutter] Trying to emulate gtk_key_snooper_install functionality
In order to resolve bug 1852 [1] I would require a equivalent functionality to gtk_key_snooper_install [2]. A direct solution would be just connect to key-press-event and key-release-event on the stage (and in any other stages that would appear), and simulate this function in the callback. This is not exactly the same, but I think that the functionality would be really equivalent (if I don't miss any detail, this is my first idea). Other option would add this feature on clutter. After check the implementation on gtk [3], this seems really feasible to adapt it to clutter, and just make the invocation of the snoopers on _clutter_process_events, on the _KEY_PRESS/_KEY_RELEASE, just when the emit_keyboard_event is called. If this feature is interesting for Clutter I can open a new bug and start to work in a patch. Opinions, thoughts? [1] http://bugzilla.o-hand.com/show_bug.cgi?id=1852 [2] http://library.gnome.org/devel/gtk/stable/gtk-General.html#gtk-key-snooper-install [3] git show 59ff297c24b8d6e9e9ca23ba1358956b9aa8e556 === API (apinhe...@igalia.com) -- To unsubscribe send a mail to clutter+unsubscr...@o-hand.com