aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-02-24 16:01:21 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-02-24 16:01:37 +0900
commit01a5585482d1e54fbb98106cacc446180fd4a306 (patch)
tree0f6974d383591815e066ff84c34ce7085499a65b /src
parentDoc: Fix filters documentation (diff)
downloadefl-01a5585482d1e54fbb98106cacc446180fd4a306.tar.gz
ecore_evas_object_example: Added cursor unset example.
Diffstat (limited to 'src')
-rw-r--r--src/examples/ecore/ecore_evas_object_example.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/examples/ecore/ecore_evas_object_example.c b/src/examples/ecore/ecore_evas_object_example.c
index c76f186bb5..0886123c58 100644
--- a/src/examples/ecore/ecore_evas_object_example.c
+++ b/src/examples/ecore/ecore_evas_object_example.c
@@ -12,6 +12,24 @@
#include <Ecore.h>
#include <Ecore_Evas.h>
+static void
+_mouse_down_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+ static Eina_Bool flag = EINA_FALSE;
+
+ if (!flag)
+ ecore_evas_object_cursor_set(data, NULL, 0, 1, 1);
+ else
+ {
+ Evas_Object *cursor = evas_object_rectangle_add(ecore_evas_get(data));
+ evas_object_color_set(cursor, 0, 255, 0, 255);
+ evas_object_resize(cursor, 5, 10);
+ ecore_evas_object_cursor_set(data, cursor, 0, 1, 1);
+ }
+
+ flag = !flag;
+}
+
int
main(void)
{
@@ -30,6 +48,7 @@ main(void)
evas_object_resize(bg, 200, 200);
evas_object_show(bg);
ecore_evas_object_associate(ee, bg, ECORE_EVAS_OBJECT_ASSOCIATE_BASE);
+ evas_object_event_callback_add(bg, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, ee);
if (bg == ecore_evas_object_associate_get(ee))
printf("Association worked!\n");