summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2013-07-24 08:52:44 +0200
committerDaniel Willmann <daniel@totalueberwachung.de>2013-07-24 08:57:05 +0200
commit6092846d1687e5680d572ba41a7c4495591ce7aa (patch)
tree8e185fd1965e83b6b5c1a67ec1f6fc3ed4ffe3d7 /src/examples
parent847efe7cdbd96461b81214b445582dccfce2ae5b (diff)
ecore examples: Use old API as long as Eo is in flux
This avoids build errors while Eo/Eo2 is being moved around.
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/ecore/ecore_idler_example.c6
-rw-r--r--src/examples/ecore/ecore_poller_example.c36
2 files changed, 21 insertions, 21 deletions
diff --git a/src/examples/ecore/ecore_idler_example.c b/src/examples/ecore/ecore_idler_example.c
index faef3a515a..6b640863aa 100644
--- a/src/examples/ecore/ecore_idler_example.c
+++ b/src/examples/ecore/ecore_idler_example.c
@@ -2,7 +2,7 @@
2// gcc -o ecore_idler_example ecore_idler_example.c `pkg-config --libs --cflags ecore eo` 2// gcc -o ecore_idler_example ecore_idler_example.c `pkg-config --libs --cflags ecore eo`
3 3
4#include <Ecore.h> 4#include <Ecore.h>
5#include <Ecore_Eo.h> 5//#include <Ecore_Eo.h>
6#include <unistd.h> 6#include <unistd.h>
7 7
8struct context // helper struct to give some context to the callbacks 8struct context // helper struct to give some context to the callbacks
@@ -106,8 +106,8 @@ main(int argc, char **argv)
106 106
107 ctxt.enterer = ecore_idle_enterer_add(_enterer_cb, &ctxt); 107 ctxt.enterer = ecore_idle_enterer_add(_enterer_cb, &ctxt);
108 ctxt.exiter = ecore_idle_exiter_add(_exiter_cb, &ctxt); 108 ctxt.exiter = ecore_idle_exiter_add(_exiter_cb, &ctxt);
109// ctxt.idler = ecore_idler_add(_idler_cb, &ctxt); 109 ctxt.idler = ecore_idler_add(_idler_cb, &ctxt);
110 ctxt.idler = eo_add_custom(ECORE_IDLER_CLASS, NULL, ecore_idler_constructor(_idler_cb, &ctxt)); 110// ctxt.idler = eo_add_custom(ECORE_IDLER_CLASS, NULL, ecore_idler_constructor(_idler_cb, &ctxt));
111 ctxt.handler = ecore_event_handler_add(_event_type, 111 ctxt.handler = ecore_event_handler_add(_event_type,
112 _event_handler_cb, 112 _event_handler_cb,
113 &ctxt); 113 &ctxt);
diff --git a/src/examples/ecore/ecore_poller_example.c b/src/examples/ecore/ecore_poller_example.c
index 1f76465712..132cb06f41 100644
--- a/src/examples/ecore/ecore_poller_example.c
+++ b/src/examples/ecore/ecore_poller_example.c
@@ -2,7 +2,7 @@
2// gcc -o ecore_poller_example ecore_poller_example.c `pkg-config --libs --cflags ecore eo` 2// gcc -o ecore_poller_example ecore_poller_example.c `pkg-config --libs --cflags ecore eo`
3 3
4#include <Ecore.h> 4#include <Ecore.h>
5#include <Ecore_Eo.h> 5//#include <Ecore_Eo.h>
6#include <unistd.h> 6#include <unistd.h>
7 7
8static double _initial_time = 0; 8static double _initial_time = 0;
@@ -44,32 +44,32 @@ main(int argc, char **argv)
44 44
45 ecore_poller_poll_interval_set(ECORE_POLLER_CORE, interval); 45 ecore_poller_poll_interval_set(ECORE_POLLER_CORE, interval);
46 46
47// poller1 = ecore_poller_add(ECORE_POLLER_CORE, 4, _poller_print_cb, str1); 47 poller1 = ecore_poller_add(ECORE_POLLER_CORE, 4, _poller_print_cb, str1);
48// poller2 = ecore_poller_add(ECORE_POLLER_CORE, 8, _poller_print_cb, str2); 48 poller2 = ecore_poller_add(ECORE_POLLER_CORE, 8, _poller_print_cb, str2);
49 // poller3 = ecore_poller_add(ECORE_POLLER_CORE, 30, _poller_quit_cb, str3); 49 poller3 = ecore_poller_add(ECORE_POLLER_CORE, 30, _poller_quit_cb, str3);
50 50
51 poller1 = eo_add_custom(ECORE_POLLER_CLASS, NULL, 51// poller1 = eo_add_custom(ECORE_POLLER_CLASS, NULL,
52 ecore_poller_constructor(ECORE_POLLER_CORE, 4, _poller_print_cb, str1)); 52// ecore_poller_constructor(ECORE_POLLER_CORE, 4, _poller_print_cb, str1));
53 poller2 = eo_add_custom(ECORE_POLLER_CLASS, NULL, 53// poller2 = eo_add_custom(ECORE_POLLER_CLASS, NULL,
54 ecore_poller_constructor(ECORE_POLLER_CORE, 8, _poller_print_cb, str2)); 54// ecore_poller_constructor(ECORE_POLLER_CORE, 8, _poller_print_cb, str2));
55 poller3 = eo_add_custom(ECORE_POLLER_CLASS, NULL, 55// poller3 = eo_add_custom(ECORE_POLLER_CLASS, NULL,
56 ecore_poller_constructor(ECORE_POLLER_CORE, 20, _poller_quit_cb, str3)); 56// ecore_poller_constructor(ECORE_POLLER_CORE, 20, _poller_quit_cb, str3));
57 57
58 58
59 ecore_main_loop_begin(); 59 ecore_main_loop_begin();
60 60
61 printf("changing poller2 interval to 16\n"); 61 printf("changing poller2 interval to 16\n");
62 62
63// ecore_poller_poller_interval_set(poller2, 16); 63 ecore_poller_poller_interval_set(poller2, 16);
64 eo_do(poller2, ecore_poller_interval_set(16, NULL)); 64// eo_do(poller2, ecore_poller_interval_set(16, NULL));
65 ecore_main_loop_begin(); 65 ecore_main_loop_begin();
66 66
67 eo_unref(poller1); 67// eo_unref(poller1);
68 eo_unref(poller2); 68// eo_unref(poller2);
69 eo_unref(poller3); 69// eo_unref(poller3);
70// ecore_poller_del(poller1); 70 ecore_poller_del(poller1);
71// ecore_poller_del(poller2); 71 ecore_poller_del(poller2);
72// ecore_poller_del(poller3); 72 ecore_poller_del(poller3);
73 73
74 ecore_shutdown(); 74 ecore_shutdown();
75} 75}