summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hirt <daniel.hirt@samsung.com>2015-08-03 16:05:44 +0300
committerDaniel Hirt <daniel.hirt@samsung.com>2015-08-03 16:05:44 +0300
commit3c9b7f774835f881a489129747ce2c1f34134a76 (patch)
treeeb1e52bdbca5517b73d196dff485b7fc0680154a
parent3b53505056ae9ba7be76d48e56eac586af288802 (diff)
Cleanup code
-rw-r--r--src/lib/eo_preload.c39
1 files changed, 14 insertions, 25 deletions
diff --git a/src/lib/eo_preload.c b/src/lib/eo_preload.c
index 444ca41..1276e75 100644
--- a/src/lib/eo_preload.c
+++ b/src/lib/eo_preload.c
@@ -84,9 +84,11 @@ typedef struct
84int color_idx = 0; 84int color_idx = 0;
85Rect_Color colors[] = { 85Rect_Color colors[] = {
86 {255, 255, 0 , 128}, 86 {255, 255, 0 , 128},
87 {255, 0 , 255, 128}, 87 {255, 0, 255, 128},
88 {128, 0 , 255, 128}, 88 {128, 0, 255, 128},
89 {255, 128 , 0, 128}, 89 {20, 88, 137, 128},
90 {255, 128, 0, 128},
91 {88, 137, 20, 128},
90}; 92};
91 93
92static void 94static void
@@ -141,7 +143,6 @@ _textblock_item_content_cb(void *data,
141 sprintf(buf, "Item %p<ps>" 143 sprintf(buf, "Item %p<ps>"
142 "Need info here", 144 "Need info here",
143 obj); 145 obj);
144 buf[0] = '\0';
145 elm_object_part_text_set(text, "elm.text", buf); 146 elm_object_part_text_set(text, "elm.text", buf);
146 147
147 return text; 148 return text;
@@ -197,11 +198,6 @@ _entry_tooltip_content_cb(void *data,
197 return text; 198 return text;
198} 199}
199 200
200#if 0
201static Evas_Object *g_tb_in = NULL;
202static void *g_tb_in_data = NULL;
203#endif
204
205static void 201static void
206_handle_item_in(void *data) 202_handle_item_in(void *data)
207{ 203{
@@ -234,8 +230,15 @@ _handle_item_in(void *data)
234static void 230static void
235_textblock_handle_mouse_in(void *data) 231_textblock_handle_mouse_in(void *data)
236{ 232{
233 printf("Textblock mouse in\n");
237 Debug_Rect *r = data; 234 Debug_Rect *r = data;
238 elm_object_tooltip_content_cb_set(r->dec->obj, _entry_tooltip_content_cb, r->dec, NULL); 235 char buf[1024];
236 Debug_Decorate *dec = data;
237
238 /* Print to the buf */
239 sprintf(buf, "Textblock %p<ps>",
240 r->dec->obj);
241 elm_object_tooltip_text_set(r->dec->obj, buf);
239} 242}
240 243
241static Eina_Bool 244static Eina_Bool
@@ -250,16 +253,9 @@ static Eina_Bool
250_item_mouse_out(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info) 253_item_mouse_out(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info)
251{ 254{
252 printf("Item out\n"); 255 printf("Item out\n");
253#if 0
254 if (g_tb_in)
255 {
256 _textblock_handle_mouse_in(g_tb_in_data);
257 }
258#else
259 _in_stack_pop(&g_in_stack, obj); 256 _in_stack_pop(&g_in_stack, obj);
260 if (g_in_stack) g_in_stack->func(g_in_stack->data); 257 if (g_in_stack) g_in_stack->func(g_in_stack->data);
261 258
262#endif
263 return EINA_TRUE; 259 return EINA_TRUE;
264} 260}
265 261
@@ -303,10 +299,6 @@ _textblock_mouse_in_cb(void *data, Eo *obj, const Eo_Event_Description *desc, vo
303 299
304 _in_stack_push(&g_in_stack, obj, data, _textblock_handle_mouse_in); 300 _in_stack_push(&g_in_stack, obj, data, _textblock_handle_mouse_in);
305 _textblock_handle_mouse_in(data); 301 _textblock_handle_mouse_in(data);
306#if 0
307 g_tb_in = obj;
308 g_tb_in_data = data;
309#endif
310 return EINA_TRUE; 302 return EINA_TRUE;
311} 303}
312 304
@@ -346,11 +338,10 @@ _textblock_rects_populate(Evas_Object *tb, Debug_Decorate *dec)
346{ 338{
347 color_idx = 0; 339 color_idx = 0;
348 /* This has to be done in the following order, 340 /* This has to be done in the following order,
349 * so paragraphs rects are created below items 341 * so the background is created below items
350 * for in/out events to function like indented in this 342 * for in/out events to function like indented in this
351 * tool */ 343 * tool */
352 _textblock_bg_add(tb, dec); 344 _textblock_bg_add(tb, dec);
353 // _textblock_populate_paragraphs(tb, dec);
354 _textblock_populate_items(tb, dec); 345 _textblock_populate_items(tb, dec);
355} 346}
356 347
@@ -417,7 +408,6 @@ static Eina_Bool
417_on_entry_changed(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info) 408_on_entry_changed(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info)
418{ 409{
419 printf("Changed\n"); 410 printf("Changed\n");
420 Evas_Object *tb = elm_entry_textblock_get(obj);
421 _decorate_entry(obj); 411 _decorate_entry(obj);
422 return EINA_TRUE; 412 return EINA_TRUE;
423} 413}
@@ -463,7 +453,6 @@ _eo_add_internal_start(const char *file, int line, const Eo_Class *klass_id, Eo
463 eo_do(ret, eo_event_callback_add(EVAS_OBJECT_EVENT_RESIZE, _on_entry_changed, dec)); 453 eo_do(ret, eo_event_callback_add(EVAS_OBJECT_EVENT_RESIZE, _on_entry_changed, dec));
464 eo_do(ret, eo_event_callback_add(EVAS_OBJECT_EVENT_DEL, _on_obj_del, dec)); 454 eo_do(ret, eo_event_callback_add(EVAS_OBJECT_EVENT_DEL, _on_obj_del, dec));
465 455
466 elm_object_tooltip_content_cb_set(ret, _entry_tooltip_content_cb, dec, NULL);
467 elm_object_tooltip_show_delay_set(ret, 0.0); 456 elm_object_tooltip_show_delay_set(ret, 0.0);
468 } 457 }
469 return ret; 458 return ret;