summaryrefslogtreecommitdiff
path: root/src/lib/elementary
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/elm_code_widget.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_code_widget.c b/src/lib/elementary/elm_code_widget.c
index a99eba1aca..175bc86ce4 100644
--- a/src/lib/elementary/elm_code_widget.c
+++ b/src/lib/elementary/elm_code_widget.c
@@ -557,6 +557,32 @@ _elm_code_widget_resize_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EIN
557} 557}
558 558
559static void 559static void
560_elm_code_widget_show_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
561 void *event_info EINA_UNUSED)
562{
563 Elm_Code_Widget_Data *pd;
564 Elm_Code_Widget *widget = (Elm_Code_Widget *) data;
565
566 pd = efl_data_scope_get(widget, ELM_CODE_WIDGET_CLASS);
567
568 if (pd->cursor_rect)
569 evas_object_show(pd->cursor_rect);
570}
571
572static void
573_elm_code_widget_hidden_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
574 void *event_info EINA_UNUSED)
575{
576 Elm_Code_Widget_Data *pd;
577 Elm_Code_Widget *widget = (Elm_Code_Widget *) data;
578
579 pd = efl_data_scope_get(widget, ELM_CODE_WIDGET_CLASS);
580
581 if (pd->cursor_rect)
582 evas_object_hide(pd->cursor_rect);
583}
584
585static void
560_elm_code_widget_cursor_ensure_visible(Elm_Code_Widget *widget) 586_elm_code_widget_cursor_ensure_visible(Elm_Code_Widget *widget)
561{ 587{
562 Evas_Coord viewx, viewy, vieww, viewh, cellw = 0, cellh = 0; 588 Evas_Coord viewx, viewy, vieww, viewh, cellw = 0, cellh = 0;
@@ -2182,6 +2208,8 @@ _elm_code_widget_efl_canvas_group_group_add(Eo *obj, Elm_Code_Widget_Data *pd)
2182 2208
2183 evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _elm_code_widget_resize_cb, obj); 2209 evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _elm_code_widget_resize_cb, obj);
2184 evas_object_event_callback_add(obj, EVAS_CALLBACK_KEY_DOWN, _elm_code_widget_key_down_cb, obj); 2210 evas_object_event_callback_add(obj, EVAS_CALLBACK_KEY_DOWN, _elm_code_widget_key_down_cb, obj);
2211 evas_object_event_callback_add(obj, EVAS_CALLBACK_HIDE, _elm_code_widget_hidden_cb, obj);
2212 evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _elm_code_widget_show_cb, obj);
2185 2213
2186 evas_object_smart_callback_add(obj, "focused", _elm_code_widget_focused_event_cb, obj); 2214 evas_object_smart_callback_add(obj, "focused", _elm_code_widget_focused_event_cb, obj);
2187 evas_object_smart_callback_add(obj, "unfocused", _elm_code_widget_unfocused_event_cb, obj); 2215 evas_object_smart_callback_add(obj, "unfocused", _elm_code_widget_unfocused_event_cb, obj);