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 700029 - GdkEvent type not accessible from Javascript
GdkEvent type not accessible from Javascript
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-05-09 17:01 UTC by Lionel Landwerlin
Modified: 2013-08-13 23:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add gdk_event_type() method (1.76 KB, patch)
2013-05-09 17:17 UTC, Lionel Landwerlin
none Details | Review
Add gdk_event_type() method (1.79 KB, patch)
2013-05-09 17:47 UTC, Lionel Landwerlin
none Details | Review

Description Lionel Landwerlin 2013-05-09 17:01:38 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();
Comment 1 Lionel Landwerlin 2013-05-09 17:17:38 UTC
Created attachment 243722 [details] [review]
Add gdk_event_type() method
Comment 2 Lionel Landwerlin 2013-05-09 17:47:35 UTC
Created attachment 243728 [details] [review]
Add gdk_event_type() method