Last active
August 29, 2015 13:57
-
-
Save felipeborges/9486177 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Gtk = imports.gi.Gtk; | |
const Lang = imports.lang; | |
Gtk.init(null, 0); | |
print("Gtk Version: " + Gtk.MAJOR_VERSION +"."+Gtk.MINOR_VERSION+"."+Gtk.MICRO_VERSION); | |
let test_window = new Gtk.Window({ | |
default_width: 800, | |
default_height: 600 | |
}); | |
let frame = new Gtk.Frame(); | |
let img = Gtk.Image.new_from_file("thumb.jpg"); | |
let events = new Gtk.EventBox(); | |
events.add(img); | |
frame.add(events); | |
test_window.set_titlebar(frame); | |
events.connect('button-press-event', function() { | |
log("button-press-event"); | |
}); | |
events.connect('button-release-event', function() { | |
log("button-release-event"); | |
}); | |
test_window.show_all(); | |
Gtk.main(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment