1 import gtk
= gtk2
.gtk2
;
3 extern (C
) int delete_cb(gtk
.Widget
* this_
, gtk
.Event
* event
, void* user_data
) {
5 writeln("delete_cb(", this_
, ", ", event
, ", ", user_data
, ")");
11 extern (C
) int event_cb(gtk
.Widget
* this_
, gtk
.Event
* event
, void* user_data
) {
16 int main(string argv
[]) {
17 argv
= gtk
.init(argv
);
19 auto window
= gtk
.Window
.new_(gtk
.WindowType
.TOPLEVEL
);
20 window
.set_title(cast(char*)"Hello World!");
21 window
.set_default_size(640, 480);
23 window
.signal_connect
!"event"(&event_cb
, null);
24 window
.signal_connect
!"delete-event"(&delete_cb
, null);