summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hirt <daniel.hirt@samsung.com>2015-08-31 16:42:33 +0300
committerDaniel Hirt <daniel.hirt@samsung.com>2015-08-31 16:42:33 +0300
commit9276eea239441610b110f14a1610623315cfb861 (patch)
tree53459fa1f01229be3ddfd667934cd7f27bd15282
parente90d09a77ae1242e9120f6e94d80c043746664cb (diff)
Cleanup
-rw-r--r--src/lib/eo_preload.c37
1 files changed, 11 insertions, 26 deletions
diff --git a/src/lib/eo_preload.c b/src/lib/eo_preload.c
index 5068372..151f001 100644
--- a/src/lib/eo_preload.c
+++ b/src/lib/eo_preload.c
@@ -141,25 +141,12 @@ _evas_textblock_items_get(const Evas_Object *obj);
141EAPI Eina_List * 141EAPI Eina_List *
142_evas_textblock_paragraphs_get(const Evas_Object *obj); 142_evas_textblock_paragraphs_get(const Evas_Object *obj);
143 143
144static Evas_Object *
145_elm_parent_get(Evas_Object *obj)
146{
147 Evas_Object *p = NULL;
148 while(!p && obj)
149 {
150 eo_do(obj, p = eo_key_data_get("elm-parent"));
151 if (p) break;
152 obj = evas_object_smart_parent_get(obj);
153 }
154 return p;
155}
156
157/******** Tooltip *********/ 144/******** Tooltip *********/
158int g_idx = 0; 145int g_idx = 0;
159Evas_Object *g_label = NULL; 146Evas_Object *g_label = NULL;
160 147
161static Eina_Bool 148static Eina_Bool
162_on_label_del(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info) 149_on_label_del(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
163{ 150{
164 printf("Label deleted\n"); 151 printf("Label deleted\n");
165 g_label = NULL; 152 g_label = NULL;
@@ -188,7 +175,6 @@ _textblock_handle_mouse_in(void *data)
188 printf("Handle Textblock in\n"); 175 printf("Handle Textblock in\n");
189 Debug_Rect *r = data; 176 Debug_Rect *r = data;
190 char buf[1024]; 177 char buf[1024];
191 Debug_Decorate *dec = data;
192 Evas_Object *tb; 178 Evas_Object *tb;
193 Evas_Coord ox, oy; 179 Evas_Coord ox, oy;
194 180
@@ -206,7 +192,7 @@ _textblock_handle_mouse_in(void *data)
206} 192}
207 193
208static Eina_Bool 194static Eina_Bool
209_textblock_mouse_in_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info) 195_textblock_mouse_in_cb(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
210{ 196{
211 printf("Textblock mouse_in\n"); 197 printf("Textblock mouse_in\n");
212 /* When entering (back to) the textblock, clear stack */ 198 /* When entering (back to) the textblock, clear stack */
@@ -277,7 +263,7 @@ _handle_item_in(void *data)
277} 263}
278 264
279static Eina_Bool 265static Eina_Bool
280_item_mouse_in(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info) 266_item_mouse_in(void *data, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
281{ 267{
282 if (!g_in_stack || (g_in_stack->obj != obj)) 268 if (!g_in_stack || (g_in_stack->obj != obj))
283 { 269 {
@@ -289,7 +275,7 @@ _item_mouse_in(void *data, Eo *obj, const Eo_Event_Description *desc, void *even
289} 275}
290 276
291static Eina_Bool 277static Eina_Bool
292_item_mouse_out(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info) 278_item_mouse_out(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
293{ 279{
294 printf("Item mouse_out\n"); 280 printf("Item mouse_out\n");
295 _in_stack_pop(&g_in_stack, obj); 281 _in_stack_pop(&g_in_stack, obj);
@@ -333,7 +319,7 @@ _handle_paragraph_in(void *data)
333} 319}
334 320
335static Eina_Bool 321static Eina_Bool
336_paragraph_mouse_in(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info) 322_paragraph_mouse_in(void *data, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
337{ 323{
338 if (!g_in_stack || (g_in_stack->obj != obj)) 324 if (!g_in_stack || (g_in_stack->obj != obj))
339 { 325 {
@@ -345,7 +331,7 @@ _paragraph_mouse_in(void *data, Eo *obj, const Eo_Event_Description *desc, void
345} 331}
346 332
347static Eina_Bool 333static Eina_Bool
348_paragraph_mouse_out(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info) 334_paragraph_mouse_out(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
349{ 335{
350 printf("paragraph mouse_out\n"); 336 printf("paragraph mouse_out\n");
351 _in_stack_pop(&g_in_stack, obj); 337 _in_stack_pop(&g_in_stack, obj);
@@ -412,7 +398,6 @@ _textblock_populate_items(Evas_Object *tb, Debug_Decorate *dec)
412 INF("Left inset: %d", sl); 398 INF("Left inset: %d", sl);
413 399
414 /* Decorate Items */ 400 /* Decorate Items */
415 size_t it_idx = 0; /* Maybe use this for text elements */
416 rects = _evas_textblock_items_get(tb); 401 rects = _evas_textblock_items_get(tb);
417 EINA_LIST_FREE(rects, d) 402 EINA_LIST_FREE(rects, d)
418 { 403 {
@@ -438,8 +423,9 @@ _textblock_populate_items(Evas_Object *tb, Debug_Decorate *dec)
438 } 423 }
439} 424}
440 425
426#if 0
441static Eina_Bool 427static Eina_Bool
442_textblock_mouse_out_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info) 428_textblock_mouse_out_cb(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
443{ 429{
444 printf("Textblock out\n"); 430 printf("Textblock out\n");
445 431
@@ -447,6 +433,7 @@ _textblock_mouse_out_cb(void *data, Eo *obj, const Eo_Event_Description *desc, v
447 if (g_in_stack) g_in_stack->func(g_in_stack->data); 433 if (g_in_stack) g_in_stack->func(g_in_stack->data);
448 return EINA_TRUE; 434 return EINA_TRUE;
449} 435}
436#endif
450 437
451static void 438static void
452_textblock_bg_add(Evas_Object *tb, Debug_Decorate *dec) 439_textblock_bg_add(Evas_Object *tb, Debug_Decorate *dec)
@@ -552,7 +539,7 @@ _decorate_entry(void *data)
552} 539}
553 540
554static Eina_Bool 541static Eina_Bool
555_on_entry_changed(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info) 542_on_entry_changed(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
556{ 543{
557 printf("Changed\n"); 544 printf("Changed\n");
558 if (g_idler) 545 if (g_idler)
@@ -614,14 +601,12 @@ _decorate_create(Evas_Object *obj)
614/******** Handlers ********/ 601/******** Handlers ********/
615 602
616static Eina_Bool 603static Eina_Bool
617_on_obj_del(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info) 604_on_obj_del(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
618{ 605{
619 _decors_free(obj); 606 _decors_free(obj);
620 return EINA_TRUE; 607 return EINA_TRUE;
621} 608}
622 609
623static Eina_Bool g_debug_enabled = EINA_TRUE;
624
625/******** PRELOADS ********/ 610/******** PRELOADS ********/
626 611
627EAPI Eo * 612EAPI Eo *