Tizen 2.1 base
[framework/uifw/ecore.git] / src / examples / ecore_event_example_01.c
1 /*
2  * Compile with:
3  * gcc -g -Wall `pkg-config --cflags --libs ecore` -o ecore_event_example ecore_event_example.c
4  */
5
6 #include <Ecore.h>
7
8 static Eina_Bool
9 _quitter(void *data, int ev_type, void *event)
10 {
11    printf("Leaving already?\n");
12    ecore_main_loop_quit();
13    return ECORE_CALLBACK_DONE;
14 }
15
16 int
17 main(int argc, char **argv)
18 {
19    ecore_init();
20
21    ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, _quitter, NULL);
22    ecore_main_loop_begin();
23
24    return 0;
25 }
26