ui/motif/window.c

changeset 111
40dbf1a7526a
parent 106
a4f4123ca12a
child 113
500c085d2133
equal deleted inserted replaced
110:36f1581b43e2 111:40dbf1a7526a
40 40
41 static int window_default_width = 600; 41 static int window_default_width = 600;
42 static int window_default_height = 500; 42 static int window_default_height = 500;
43 43
44 static void window_close_handler(Widget window, void *udata, void *cdata) { 44 static void window_close_handler(Widget window, void *udata, void *cdata) {
45 UiObject *obj = udata;
46 UiEvent ev;
47 ev.window = obj->window;
48 ev.document = obj->ctx->document;
49 ev.obj = obj;
50 ev.eventdata = NULL;
51 ev.intval = 0;
52
53 if(obj->ctx->close_callback) {
54 obj->ctx->close_callback(&ev, obj->ctx->close_data);
55 }
56 // TODO: free UiObject
57
45 nwindows--; 58 nwindows--;
46 if(nwindows == 0) { 59 if(nwindows == 0) {
47 ui_exit_mainloop(); 60 ui_exit_mainloop();
48 } 61 }
49 } 62 }

mercurial