forked from enlightenment/efl
From: 김지훈 <imfine98@gmail.com>
I changed elementary source code related to focus functions. Eina_Bool is used instead of integer type in those functions. SVN revision: 52839
This commit is contained in:
parent
e6398bdb8a
commit
d99918389f
|
@ -371,7 +371,7 @@ elm_fileselector_button_add(Evas_Object *parent)
|
|||
elm_widget_del_hook_set(obj, _del_hook);
|
||||
elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
elm_widget_disable_hook_set(obj, _disable_hook);
|
||||
elm_widget_can_focus_set(obj, 1);
|
||||
elm_widget_can_focus_set(obj, EINA_TRUE);
|
||||
elm_widget_activate_hook_set(obj, _activate_hook);
|
||||
elm_widget_event_hook_set(obj, _event_hook);
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ elm_notepad_add(Evas_Object *parent)
|
|||
elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL);
|
||||
elm_widget_data_set(obj, wd);
|
||||
elm_widget_del_hook_set(obj, _del_hook);
|
||||
elm_widget_can_focus_set(obj, 1);
|
||||
elm_widget_can_focus_set(obj, EINA_TRUE);
|
||||
|
||||
wd->scr = elm_scroller_add(parent);
|
||||
elm_widget_resize_object_set(obj, wd->scr);
|
||||
|
|
|
@ -280,7 +280,7 @@ elm_scrolled_entry_add(Evas_Object *parent)
|
|||
elm_widget_data_set(obj, wd);
|
||||
elm_widget_del_hook_set(obj, _del_hook);
|
||||
elm_widget_disable_hook_set(obj, _disable_hook);
|
||||
elm_widget_can_focus_set(obj, 1);
|
||||
elm_widget_can_focus_set(obj, EINA_TRUE);
|
||||
elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
elm_widget_signal_emit_hook_set(obj, _signal_emit_hook);
|
||||
elm_widget_signal_callback_add_hook_set(obj, _signal_callback_add_hook);
|
||||
|
|
|
@ -90,7 +90,7 @@ elm_bg_add(Evas_Object *parent)
|
|||
elm_widget_data_set(obj, wd);
|
||||
elm_widget_del_hook_set(obj, _del_hook);
|
||||
elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
elm_widget_can_focus_set(obj, 0);
|
||||
elm_widget_can_focus_set(obj, EINA_FALSE);
|
||||
|
||||
wd->img = edje_object_add(e);
|
||||
_elm_theme_object_set(obj, wd->img, "bg", "base", "default");
|
||||
|
|
|
@ -167,7 +167,7 @@ elm_carousel_add(Evas_Object *parent)
|
|||
elm_widget_data_set(obj, wd);
|
||||
elm_widget_del_hook_set(obj, _del_hook);
|
||||
elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
elm_widget_can_focus_set(obj, 0);
|
||||
elm_widget_can_focus_set(obj, EINA_FALSE);
|
||||
|
||||
wd->scr = elm_smart_scroller_add(e);
|
||||
elm_smart_scroller_widget_set(wd->scr, obj);
|
||||
|
@ -225,7 +225,7 @@ elm_carousel_item_add(Evas_Object *obj, Evas_Object *icon, const char *label, Ev
|
|||
edje_object_part_text_set(it->base.view, "elm.text", it->label);
|
||||
edje_object_size_min_calc(it->base.view, &mw, &mh);
|
||||
evas_object_size_hint_weight_set(it->base.view, 0.0, 0.0);
|
||||
evas_object_size_hint_align_set(it->base.view, -1.0, -1.0);
|
||||
evas_object_size_hint_align_set(it->base.view, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
evas_object_size_hint_min_set(it->base.view, mw, mh);
|
||||
evas_object_size_hint_max_set(it->base.view, 9999, mh);
|
||||
evas_object_box_append(wd->bx, it->base.view);
|
||||
|
|
|
@ -241,7 +241,7 @@ elm_check_add(Evas_Object *parent)
|
|||
elm_widget_del_hook_set(obj, _del_hook);
|
||||
elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
elm_widget_disable_hook_set(obj, _disable_hook);
|
||||
elm_widget_can_focus_set(obj, 1);
|
||||
elm_widget_can_focus_set(obj, EINA_TRUE);
|
||||
elm_widget_activate_hook_set(obj, _activate_hook);
|
||||
elm_widget_event_hook_set(obj, _event_hook);
|
||||
|
||||
|
|
|
@ -1349,8 +1349,8 @@ elm_entry_add(Evas_Object *parent)
|
|||
elm_widget_signal_callback_add_hook_set(obj, _signal_callback_add_hook);
|
||||
elm_widget_signal_callback_del_hook_set(obj, _signal_callback_del_hook);
|
||||
elm_object_cursor_set(obj, ELM_CURSOR_XTERM);
|
||||
elm_widget_can_focus_set(obj, 1);
|
||||
elm_widget_highlight_ignore_set(obj, 1);
|
||||
elm_widget_can_focus_set(obj, EINA_TRUE);
|
||||
elm_widget_highlight_ignore_set(obj, EINA_TRUE);
|
||||
|
||||
wd->linewrap = EINA_TRUE;
|
||||
wd->char_linewrap= EINA_FALSE;
|
||||
|
|
|
@ -988,7 +988,7 @@ elm_gengrid_add(Evas_Object *parent)
|
|||
evas_object_smart_callback_add(wd->scr, "drag,stop", _scr_drag_stop, obj);
|
||||
evas_object_smart_callback_add(wd->scr, "scroll", _scr_scroll, obj);
|
||||
|
||||
elm_smart_scroller_bounce_allow_set(wd->scr, 1, 1);
|
||||
elm_smart_scroller_bounce_allow_set(wd->scr, EINA_TRUE, EINA_TRUE);
|
||||
|
||||
wd->self = obj;
|
||||
wd->align_x = 0.5;
|
||||
|
|
|
@ -1547,7 +1547,7 @@ elm_genlist_add(Evas_Object *parent)
|
|||
elm_smart_scroller_object_theme_set(obj, wd->scr, "genlist", "base", elm_widget_style_get(obj));
|
||||
elm_widget_resize_object_set(obj, wd->scr);
|
||||
|
||||
elm_smart_scroller_bounce_allow_set(wd->scr, 0, 1);
|
||||
elm_smart_scroller_bounce_allow_set(wd->scr, EINA_FALSE, EINA_TRUE);
|
||||
|
||||
wd->obj = obj;
|
||||
wd->mode = ELM_LIST_SCROLL;
|
||||
|
|
|
@ -296,10 +296,10 @@ elm_hover_add(Evas_Object *parent)
|
|||
elm_widget_del_pre_hook_set(obj, _del_pre_hook);
|
||||
elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
elm_widget_del_hook_set(obj, _del_hook);
|
||||
elm_widget_can_focus_set(obj, 1);
|
||||
elm_widget_can_focus_set(obj, EINA_TRUE);
|
||||
|
||||
wd->hov = evas_object_rectangle_add(e);
|
||||
evas_object_pass_events_set(wd->hov, 1);
|
||||
evas_object_pass_events_set(wd->hov, EINA_TRUE);
|
||||
evas_object_color_set(wd->hov, 0, 0, 0, 0);
|
||||
elm_widget_resize_object_set(obj, wd->hov);
|
||||
evas_object_event_callback_add(wd->hov, EVAS_CALLBACK_MOVE, _hov_move, obj);
|
||||
|
@ -314,12 +314,12 @@ elm_hover_add(Evas_Object *parent)
|
|||
_signal_dismiss, obj);
|
||||
|
||||
wd->offset = evas_object_rectangle_add(e);
|
||||
evas_object_pass_events_set(wd->offset, 1);
|
||||
evas_object_pass_events_set(wd->offset, EINA_TRUE);
|
||||
evas_object_color_set(wd->offset, 0, 0, 0, 0);
|
||||
elm_widget_sub_object_add(obj, wd->offset);
|
||||
|
||||
wd->size = evas_object_rectangle_add(e);
|
||||
evas_object_pass_events_set(wd->size, 1);
|
||||
evas_object_pass_events_set(wd->size, EINA_TRUE);
|
||||
evas_object_color_set(wd->size, 0, 0, 0, 0);
|
||||
elm_widget_sub_object_add(obj, wd->size);
|
||||
|
||||
|
|
|
@ -119,12 +119,12 @@ elm_icon_add(Evas_Object *parent)
|
|||
elm_widget_data_set(obj, wd);
|
||||
elm_widget_del_hook_set(obj, _del_hook);
|
||||
elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
elm_widget_can_focus_set(obj, 0);
|
||||
elm_widget_can_focus_set(obj, EINA_FALSE);
|
||||
|
||||
wd->img = _els_smart_icon_add(e);
|
||||
evas_object_event_callback_add(wd->img, EVAS_CALLBACK_MOUSE_UP,
|
||||
_mouse_up, obj);
|
||||
evas_object_repeat_events_set(wd->img, 1);
|
||||
evas_object_repeat_events_set(wd->img, EINA_TRUE);
|
||||
elm_widget_resize_object_set(obj, wd->img);
|
||||
|
||||
wd->smooth = EINA_TRUE;
|
||||
|
|
|
@ -124,12 +124,12 @@ elm_image_add(Evas_Object *parent)
|
|||
elm_widget_del_hook_set(obj, _del_hook);
|
||||
elm_widget_del_pre_hook_set(obj, _del_pre_hook);
|
||||
elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
elm_widget_can_focus_set(obj, 0);
|
||||
elm_widget_can_focus_set(obj, EINA_FALSE);
|
||||
|
||||
wd->img = _els_smart_icon_add(e);
|
||||
evas_object_event_callback_add(wd->img, EVAS_CALLBACK_MOUSE_UP,
|
||||
_mouse_up, obj);
|
||||
evas_object_repeat_events_set(wd->img, 1);
|
||||
evas_object_repeat_events_set(wd->img, EINA_TRUE);
|
||||
elm_widget_resize_object_set(obj, wd->img);
|
||||
|
||||
wd->smooth = EINA_TRUE;
|
||||
|
|
|
@ -428,7 +428,7 @@ elm_label_add(Evas_Object *parent)
|
|||
elm_widget_data_set(obj, wd);
|
||||
elm_widget_del_hook_set(obj, _del_hook);
|
||||
elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
elm_widget_can_focus_set(obj, 0);
|
||||
elm_widget_can_focus_set(obj, EINA_FALSE);
|
||||
|
||||
wd->linewrap = EINA_FALSE;
|
||||
wd->ellipsis = EINA_FALSE;
|
||||
|
|
|
@ -740,7 +740,7 @@ elm_list_add(Evas_Object *parent)
|
|||
elm_widget_data_set(obj, wd);
|
||||
elm_widget_del_hook_set(obj, _del_hook);
|
||||
elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
elm_widget_can_focus_set(obj, 1);
|
||||
elm_widget_can_focus_set(obj, EINA_TRUE);
|
||||
elm_widget_signal_emit_hook_set(obj, _signal_emit_hook);
|
||||
elm_widget_signal_callback_add_hook_set(obj, _signal_callback_add_hook);
|
||||
elm_widget_signal_callback_del_hook_set(obj, _signal_callback_del_hook);
|
||||
|
|
|
@ -795,7 +795,7 @@ grid_load(Evas_Object *obj, Grid *g)
|
|||
|
||||
evas_object_smart_member_add(gi->img, wd->pan_smart);
|
||||
elm_widget_sub_object_add(obj, gi->img);
|
||||
evas_object_pass_events_set(gi->img, 1);
|
||||
evas_object_pass_events_set(gi->img, EINA_TRUE);
|
||||
evas_object_stack_below(gi->img, wd->sep_maps_markers);
|
||||
|
||||
/*gi->txt = evas_object_text_add(evas_object_evas_get(obj));
|
||||
|
@ -804,7 +804,7 @@ grid_load(Evas_Object *obj, Grid *g)
|
|||
evas_object_smart_member_add(gi->txt,
|
||||
wd->pan_smart);
|
||||
elm_widget_sub_object_add(obj, gi->txt);
|
||||
evas_object_pass_events_set(gi->txt, 1);
|
||||
evas_object_pass_events_set(gi->txt, EINA_TRUE);
|
||||
*/
|
||||
eina_matrixsparse_data_idx_set(g->grid, y, x, gi);
|
||||
}
|
||||
|
@ -1511,7 +1511,7 @@ _group_bubble_content_update(Marker_Group *group)
|
|||
elm_widget_sub_object_add(group->wd->obj, group->sc);
|
||||
|
||||
group->bx = elm_box_add(group->bubble);
|
||||
evas_object_size_hint_align_set(group->bx, -1, -1);
|
||||
evas_object_size_hint_align_set(group->bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
evas_object_size_hint_weight_set(group->bx, 0.5, 0.5);
|
||||
elm_box_horizontal_set(group->bx, EINA_TRUE);
|
||||
evas_object_show(group->bx);
|
||||
|
@ -1676,7 +1676,7 @@ elm_map_add(Evas_Object *parent)
|
|||
evas_object_smart_callback_add(wd->scr, "drag,stop", _scr_drag_stop, obj);
|
||||
evas_object_smart_callback_add(wd->scr, "scroll", _scr_scroll, obj);
|
||||
|
||||
elm_smart_scroller_bounce_allow_set(wd->scr, 1, 1);
|
||||
elm_smart_scroller_bounce_allow_set(wd->scr, EINA_TRUE, EINA_TRUE);
|
||||
|
||||
wd->obj = obj;
|
||||
|
||||
|
|
|
@ -269,7 +269,7 @@ elm_panel_add(Evas_Object *parent)
|
|||
wd->scr = elm_smart_scroller_add(evas);
|
||||
elm_smart_scroller_widget_set(wd->scr, obj);
|
||||
_theme_hook(obj);
|
||||
elm_smart_scroller_bounce_allow_set(wd->scr, 0, 0);
|
||||
elm_smart_scroller_bounce_allow_set(wd->scr, EINA_FALSE, EINA_FALSE);
|
||||
elm_widget_resize_object_set(obj, wd->scr);
|
||||
elm_smart_scroller_policy_set(wd->scr, ELM_SMART_SCROLLER_POLICY_OFF,
|
||||
ELM_SMART_SCROLLER_POLICY_OFF);
|
||||
|
|
|
@ -208,7 +208,7 @@ elm_photo_add(Evas_Object *parent)
|
|||
elm_widget_data_set(obj, wd);
|
||||
elm_widget_del_hook_set(obj, _del_hook);
|
||||
elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
elm_widget_can_focus_set(obj, 0);
|
||||
elm_widget_can_focus_set(obj, EINA_FALSE);
|
||||
|
||||
wd->frm = edje_object_add(e);
|
||||
_elm_theme_object_set(obj, wd->frm, "photo", "base", "default");
|
||||
|
|
|
@ -341,7 +341,7 @@ grid_create(Evas_Object *obj)
|
|||
evas_object_image_add(evas_object_evas_get(obj));
|
||||
evas_object_image_scale_hint_set
|
||||
(g->grid[tn].img, EVAS_IMAGE_SCALE_HINT_DYNAMIC);
|
||||
evas_object_pass_events_set(g->grid[tn].img, 1);
|
||||
evas_object_pass_events_set(g->grid[tn].img, EINA_TRUE);
|
||||
evas_object_smart_member_add(g->grid[tn].img,
|
||||
wd->pan_smart);
|
||||
elm_widget_sub_object_add(obj, g->grid[tn].img);
|
||||
|
@ -972,7 +972,7 @@ elm_photocam_add(Evas_Object *parent)
|
|||
evas_object_smart_callback_add(wd->scr, "drag,stop", _scr_drag_stop, obj);
|
||||
evas_object_smart_callback_add(wd->scr, "scroll", _scr_scroll, obj);
|
||||
|
||||
elm_smart_scroller_bounce_allow_set(wd->scr, 1, 1);
|
||||
elm_smart_scroller_bounce_allow_set(wd->scr, EINA_TRUE, EINA_TRUE);
|
||||
|
||||
wd->obj = obj;
|
||||
|
||||
|
|
|
@ -210,7 +210,7 @@ elm_progressbar_add(Evas_Object *parent)
|
|||
|
||||
wd->spacer = evas_object_rectangle_add(e);
|
||||
evas_object_color_set(wd->spacer, 0, 0, 0, 0);
|
||||
evas_object_pass_events_set(wd->spacer, 1);
|
||||
evas_object_pass_events_set(wd->spacer, EINA_TRUE);
|
||||
elm_widget_sub_object_add(obj, wd->spacer);
|
||||
edje_object_part_swallow(wd->progressbar, "elm.swallow.bar", wd->spacer);
|
||||
|
||||
|
|
|
@ -274,7 +274,7 @@ elm_radio_add(Evas_Object *parent)
|
|||
elm_widget_del_hook_set(obj, _del_hook);
|
||||
elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
elm_widget_disable_hook_set(obj, _disable_hook);
|
||||
elm_widget_can_focus_set(obj, 1);
|
||||
elm_widget_can_focus_set(obj, EINA_TRUE);
|
||||
elm_widget_activate_hook_set(obj, _activate_hook);
|
||||
elm_widget_event_hook_set(obj, _event_hook);
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ elm_separator_add(Evas_Object *parent)
|
|||
elm_widget_data_set(obj, wd);
|
||||
elm_widget_del_hook_set(obj, _del_hook);
|
||||
elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
elm_widget_can_focus_set(obj, 0);
|
||||
elm_widget_can_focus_set(obj, EINA_FALSE);
|
||||
|
||||
wd->sep = edje_object_add(e);
|
||||
_elm_theme_object_set(obj, wd->sep, "separator", "vertical", "default");
|
||||
|
|
|
@ -407,7 +407,7 @@ elm_slider_add(Evas_Object *parent)
|
|||
|
||||
wd->spacer = evas_object_rectangle_add(e);
|
||||
evas_object_color_set(wd->spacer, 0, 0, 0, 0);
|
||||
evas_object_pass_events_set(wd->spacer, 1);
|
||||
evas_object_pass_events_set(wd->spacer, EINA_TRUE);
|
||||
elm_widget_sub_object_add(obj, wd->spacer);
|
||||
edje_object_part_swallow(wd->slider, "elm.swallow.bar", wd->spacer);
|
||||
|
||||
|
|
|
@ -313,12 +313,12 @@ elm_toolbar_add(Evas_Object *parent)
|
|||
elm_widget_del_pre_hook_set(obj, _del_pre_hook);
|
||||
elm_widget_del_hook_set(obj, _del_hook);
|
||||
elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
elm_widget_can_focus_set(obj, 0);
|
||||
elm_widget_can_focus_set(obj, EINA_FALSE);
|
||||
|
||||
wd->scr = elm_smart_scroller_add(e);
|
||||
elm_smart_scroller_widget_set(wd->scr, obj);
|
||||
elm_smart_scroller_object_theme_set(obj, wd->scr, "toolbar", "base", "default");
|
||||
elm_smart_scroller_bounce_allow_set(wd->scr, 1, 0);
|
||||
elm_smart_scroller_bounce_allow_set(wd->scr, EINA_TRUE, EINA_FALSE);
|
||||
elm_widget_resize_object_set(obj, wd->scr);
|
||||
elm_smart_scroller_policy_set(wd->scr,
|
||||
ELM_SMART_SCROLLER_POLICY_AUTO,
|
||||
|
|
|
@ -232,7 +232,7 @@ _parent_focus(Evas_Object *obj)
|
|||
|
||||
focus_order++;
|
||||
sd->focus_order = focus_order;
|
||||
sd->focused = 1;
|
||||
sd->focused = EINA_TRUE;
|
||||
if (sd->on_focus_func) sd->on_focus_func(sd->on_focus_data, obj);
|
||||
if (sd->focus_func) sd->focus_func(obj);
|
||||
|
||||
|
@ -539,7 +539,7 @@ elm_widget_hover_object_set(Evas_Object *obj, Evas_Object *sobj)
|
|||
}
|
||||
|
||||
EAPI void
|
||||
elm_widget_can_focus_set(Evas_Object *obj, int can_focus)
|
||||
elm_widget_can_focus_set(Evas_Object *obj, Eina_Bool can_focus)
|
||||
{
|
||||
API_ENTRY return;
|
||||
sd->can_focus = can_focus;
|
||||
|
@ -604,10 +604,10 @@ elm_widget_highlight_in_theme_get(const Evas_Object *obj)
|
|||
return sd->highlight_in_theme;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
EAPI Eina_Bool
|
||||
elm_widget_focus_get(const Evas_Object *obj)
|
||||
{
|
||||
API_ENTRY return 0;
|
||||
API_ENTRY return EINA_FALSE;
|
||||
return sd->focused;
|
||||
}
|
||||
|
||||
|
@ -795,9 +795,9 @@ elm_widget_focus_jump(Evas_Object *obj, int forward)
|
|||
{
|
||||
focus_order++;
|
||||
sd->focus_order = focus_order;
|
||||
sd->focused = 1;
|
||||
sd->focused = EINA_TRUE;
|
||||
}
|
||||
else sd->focused = 0;
|
||||
else sd->focused = EINA_FALSE;
|
||||
if (sd->on_focus_func) sd->on_focus_func(sd->on_focus_data, obj);
|
||||
sd->focus_func(obj);
|
||||
return sd->focused;
|
||||
|
@ -934,7 +934,7 @@ elm_widget_focus_jump(Evas_Object *obj, int forward)
|
|||
/* no next item can be focused */
|
||||
if (sd->focused)
|
||||
{
|
||||
sd->focused = 0;
|
||||
sd->focused = EINA_FALSE;
|
||||
if (sd->on_focus_func) sd->on_focus_func(sd->on_focus_data, obj);
|
||||
}
|
||||
return 0;
|
||||
|
@ -972,7 +972,7 @@ elm_widget_focus_set(Evas_Object *obj, int first)
|
|||
{
|
||||
focus_order++;
|
||||
sd->focus_order = focus_order;
|
||||
sd->focused = 1;
|
||||
sd->focused = EINA_TRUE;
|
||||
if (sd->on_focus_func) sd->on_focus_func(sd->on_focus_data, obj);
|
||||
}
|
||||
if (sd->focus_func)
|
||||
|
@ -1056,7 +1056,7 @@ elm_widget_focused_object_clear(Evas_Object *obj)
|
|||
}
|
||||
}
|
||||
}
|
||||
sd->focused = 0;
|
||||
sd->focused = EINA_FALSE;
|
||||
if (sd->on_focus_func) sd->on_focus_func(sd->on_focus_data, obj);
|
||||
if (sd->focus_func) sd->focus_func(obj);
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@
|
|||
* elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
* elm_widget_disable_hook_set(obj, _disable_hook);
|
||||
* // this widget can focus (true, means yes it can, false means it can't)
|
||||
* elm_widget_can_focus_set(obj, 1);
|
||||
* elm_widget_can_focus_set(obj, EINA_TRUE);
|
||||
*
|
||||
* // for this widget we will ad d1 sub object that is an edje object
|
||||
* wd->sub = edje_object_add(e);
|
||||
|
@ -238,14 +238,14 @@ EAPI void elm_widget_hover_object_set(Evas_Object *obj, Evas_Object
|
|||
EAPI void elm_widget_signal_emit(Evas_Object *obj, const char *emission, const char *source);
|
||||
EAPI void elm_widget_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source), void *data);
|
||||
EAPI void *elm_widget_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source));
|
||||
EAPI void elm_widget_can_focus_set(Evas_Object *obj, int can_focus);
|
||||
EAPI void elm_widget_can_focus_set(Evas_Object *obj, Eina_Bool can_focus);
|
||||
EAPI Eina_Bool elm_widget_can_focus_get(const Evas_Object *obj);
|
||||
EAPI Eina_Bool elm_widget_child_can_focus_get(const Evas_Object *obj);
|
||||
EAPI void elm_widget_highlight_ignore_set(Evas_Object *obj, Eina_Bool ignore);
|
||||
EAPI Eina_Bool elm_widget_highlight_ignore_get(const Evas_Object *obj);
|
||||
EAPI void elm_widget_highlight_in_theme_set(Evas_Object *obj, Eina_Bool highlight);
|
||||
EAPI Eina_Bool elm_widget_highlight_in_theme_get(const Evas_Object *obj);
|
||||
EAPI int elm_widget_focus_get(const Evas_Object *obj);
|
||||
EAPI Eina_Bool elm_widget_focus_get(const Evas_Object *obj);
|
||||
EAPI Evas_Object *elm_widget_focused_object_get(const Evas_Object *obj);
|
||||
EAPI Evas_Object *elm_widget_top_get(const Evas_Object *obj);
|
||||
EAPI Eina_Bool elm_widget_is(const Evas_Object *obj);
|
||||
|
|
|
@ -928,7 +928,7 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
|
|||
evas_object_move(win->win_obj, 0, 0);
|
||||
evas_object_resize(win->win_obj, 1, 1);
|
||||
evas_object_layer_set(win->win_obj, 50);
|
||||
evas_object_pass_events_set(win->win_obj, 1);
|
||||
evas_object_pass_events_set(win->win_obj, EINA_TRUE);
|
||||
|
||||
evas_object_intercept_show_callback_add(win->win_obj,
|
||||
_elm_win_obj_intercept_show, win);
|
||||
|
|
|
@ -15,6 +15,7 @@ struct _Smart_Data
|
|||
unsigned char preloading : 1;
|
||||
unsigned char show : 1;
|
||||
unsigned char edit : 1;
|
||||
unsigned char edje : 1;
|
||||
};
|
||||
|
||||
/* local subsystem functions */
|
||||
|
@ -46,14 +47,37 @@ _els_smart_icon_add(Evas *evas)
|
|||
return evas_object_smart_add(evas, _e_smart);
|
||||
}
|
||||
|
||||
static void
|
||||
_preloaded(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
|
||||
{
|
||||
Smart_Data *sd = data;
|
||||
|
||||
sd->preloading = 0;
|
||||
if (sd->show)
|
||||
evas_object_show(sd->obj);
|
||||
}
|
||||
|
||||
Eina_Bool
|
||||
_els_smart_icon_file_key_set(Evas_Object *obj, const char *file, const char *key)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
Evas_Object *pclip;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return EINA_FALSE;
|
||||
/* smart code here */
|
||||
if (sd->edje)
|
||||
{
|
||||
pclip = evas_object_clip_get(sd->obj);
|
||||
if (sd->obj) evas_object_del(sd->obj);
|
||||
sd->obj = evas_object_image_add(evas_object_evas_get(obj));
|
||||
evas_object_image_scale_hint_set(sd->obj, EVAS_IMAGE_SCALE_HINT_STATIC);
|
||||
evas_object_smart_member_add(sd->obj, obj);
|
||||
evas_object_event_callback_add(sd->obj, EVAS_CALLBACK_IMAGE_PRELOADED,
|
||||
_preloaded, sd);
|
||||
evas_object_clip_set(sd->obj, pclip);
|
||||
sd->edje = 0;
|
||||
}
|
||||
if (sd->size != 0)
|
||||
evas_object_image_load_size_set(sd->obj, sd->size, sd->size);
|
||||
evas_object_image_file_set(sd->obj, file, key);
|
||||
|
@ -71,14 +95,21 @@ Eina_Bool
|
|||
_els_smart_icon_file_edje_set(Evas_Object *obj, const char *file, const char *part)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
Evas_Object *pclip;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return EINA_FALSE;
|
||||
/* smart code here */
|
||||
if (sd->obj) evas_object_del(sd->obj);
|
||||
sd->obj = edje_object_add(evas_object_evas_get(obj));
|
||||
evas_object_smart_member_add(sd->obj, obj);
|
||||
if (sd->show) evas_object_show(sd->obj);
|
||||
if (!sd->edje)
|
||||
{
|
||||
pclip = evas_object_clip_get(sd->obj);
|
||||
if (sd->obj) evas_object_del(sd->obj);
|
||||
sd->obj = edje_object_add(evas_object_evas_get(obj));
|
||||
evas_object_smart_member_add(sd->obj, obj);
|
||||
if (sd->show) evas_object_show(sd->obj);
|
||||
evas_object_clip_set(sd->obj, pclip);
|
||||
}
|
||||
sd->edje = 1;
|
||||
if (!edje_object_file_set(sd->obj, file, part))
|
||||
return EINA_FALSE;
|
||||
_smart_reconfigure(sd);
|
||||
|
@ -381,16 +412,6 @@ _smart_reconfigure(Smart_Data *sd)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_preloaded(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
|
||||
{
|
||||
Smart_Data *sd = data;
|
||||
|
||||
sd->preloading = 0;
|
||||
if (sd->show)
|
||||
evas_object_show(sd->obj);
|
||||
}
|
||||
|
||||
static void
|
||||
_smart_init(void)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue