GNOME Bugzilla – Bug 700029
GdkEvent type not accessible from Javascript
Last modified: 2013-08-13 23:07:30 UTC
The following JS script doesn't show the event types : const Lang = imports.lang; const Gdk = imports.gi.Gdk; const Gtk = imports.gi.Gtk; Gtk.init(null, null); let w = new Gtk.Window(); w.resize(800, 600); let box = new Gtk.Box(); w.add(box); let eb = new Gtk.EventBox({ }); eb.events = Gdk.EventMask.BUTTON_PRESS_MASK; box.pack_start(eb, true, true, 0); eb.connect('event', Lang.bind(this, function(widget, event) { log('type : ' + event.type); return true; })); w.show_all(); Gtk.main();
Created attachment 243722 [details] [review] Add gdk_event_type() method
Created attachment 243728 [details] [review] Add gdk_event_type() method