4 bool sig_user(int type
, void *event
)
6 stdout
.printf("USR%d\n", ((EventSignalUser
*) event
)->number
);
10 bool sig_realtime(int type
, void *event
)
12 stdout
.printf("num: %d\n", ((EventSignalRealtime
*) event
)->num
);
16 bool sig_exit(int type
, void *event
)
18 var ev
= (EventSignalExit
*) event
;
19 stdout
.printf("[i: %u, q: %u, t: %u]\n",
20 ev
->interrupt
, ev
->quit
, ev
->terminate
);
21 if (ev
->terminate
!= 0)
22 Ecore
.MainLoop
.quit();
29 var x
= new
EventHandler(EventType
.SIGNAL_USER
, sig_user
);
30 var y
= new
EventHandler(EventType
.SIGNAL_REALTIME
, sig_realtime
);
31 var z
= new
EventHandler(EventType
.SIGNAL_EXIT
, sig_exit
);
32 Ecore
.MainLoop
.begin();
33 x
= null; y
= null; z
= null; // required to avoid double free of the event