}
}
}
+ group { name: "elm/button/base/colorselector/left/default";
+ images {
+ image: "bt_base1.png" COMP;
+ image: "bt_base2.png" COMP;
+ image: "bt_hilight.png" COMP;
+ image: "bt_shine.png" COMP;
+ image: "bt_glow.png" COMP;
+ image: "bt_dis_base.png" COMP;
+ image: "bt_dis_hilight.png" COMP;
+ image: "sp_bt_l.png" COMP;
+ }
+ parts {
+ part { name: "button_image";
+ mouse_events: 1;
+ description { state: "default" 0.0;
+ min: 15 15;
+ image {
+ normal: "bt_base2.png";
+ border: 7 7 7 7;
+ }
+ image.middle: SOLID;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ image.normal: "bt_base1.png";
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "bt_dis_base.png";
+ border: 4 4 4 4;
+ }
+ }
+ }
+ part { name: "prev_image";
+ type: IMAGE;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 16 16;
+ max: 16 16;
+ fixed: 1 1;
+ align: 0.5 0.5;
+ image.normal: "sp_bt_l.png";
+ }
+ }
+ part { name: "over1";
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel2.relative: 1.0 0.5;
+ image {
+ normal: "bt_hilight.png";
+ border: 7 7 7 0;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "bt_dis_hilight.png";
+ border: 4 4 4 0;
+ }
+ }
+ }
+ part { name: "over2";
+ mouse_events: 1;
+ repeat_events: 1;
+ ignore_flags: ON_HOLD;
+ description { state: "default" 0.0;
+ image {
+ normal: "bt_shine.png";
+ border: 7 7 7 7;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "over3";
+ mouse_events: 1;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ color: 255 255 255 0;
+ image {
+ normal: "bt_glow.png";
+ border: 12 12 12 12;
+ }
+ fill.smooth : 0;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 255;
+ }
+ }
+ part { name: "disabler";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ visible: 0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ }
+ programs {
+ program {
+ name: "button_click";
+ signal: "mouse,down,1";
+ source: "over2";
+ action: SIGNAL_EMIT "elm,action,press" "";
+ after: "button_click_anim";
+ }
+ program {
+ name: "button_click_anim";
+ action: STATE_SET "clicked" 0.0;
+ target: "button_image";
+ }
+ program {
+ name: "button_unclick";
+ signal: "mouse,up,1";
+ source: "over3";
+ action: SIGNAL_EMIT "elm,action,unpress" "";
+ after: "button_unclick_anim";
+ }
+ program {
+ name: "button_pressed_anim";
+ signal: "elm,anim,activate";
+ source: "elm";
+ action: STATE_SET "clicked" 0.0;
+ target: "button_image";
+ target: "over3";
+ after: "button_unpressed_anim";
+ }
+ program {
+ name: "button_unpressed_anim";
+ action: STATE_SET "default" 0.0;
+ transition: DECELERATE 0.5;
+ target: "button_image";
+ target: "over3";
+ }
+ program {
+ name: "button_unclick_anim";
+ action: STATE_SET "default" 0.0;
+ target: "button_image";
+ }
+ program {
+ name: "button_click2";
+ signal: "mouse,down,1";
+ source: "over3";
+ action: STATE_SET "clicked" 0.0;
+ target: "over3";
+ }
+ program {
+ name: "button_unclick2";
+ signal: "mouse,up,1";
+ source: "over3";
+ action: STATE_SET "default" 0.0;
+ transition: DECELERATE 0.5;
+ target: "over3";
+ }
+ program {
+ name: "button_unclick3";
+ signal: "mouse,clicked,1";
+ source: "over2";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+ program { name: "disable";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "button_image";
+ target: "over1";
+ target: "over2";
+ target: "disabler";
+ }
+ program { name: "enable";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "button_image";
+ target: "over1";
+ target: "over2";
+ target: "disabler";
+ }
+ }
+ }
+ group { name: "elm/button/base/colorselector/right/default";
+ images {
+ image: "bt_base1.png" COMP;
+ image: "bt_base2.png" COMP;
+ image: "bt_hilight.png" COMP;
+ image: "bt_shine.png" COMP;
+ image: "bt_glow.png" COMP;
+ image: "bt_dis_base.png" COMP;
+ image: "bt_dis_hilight.png" COMP;
+ image: "sp_bt_r.png" COMP;
+ }
+ parts {
+ part { name: "button_image";
+ mouse_events: 1;
+ description { state: "default" 0.0;
+ min: 15 15;
+ image {
+ normal: "bt_base2.png";
+ border: 7 7 7 7;
+ }
+ image.middle: SOLID;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ image.normal: "bt_base1.png";
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "bt_dis_base.png";
+ border: 4 4 4 4;
+ }
+ }
+ }
+ part { name: "prev_image";
+ type: IMAGE;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 16 16;
+ max: 16 16;
+ fixed: 1 1;
+ align: 0.5 0.5;
+ image.normal: "sp_bt_r.png";
+ }
+ }
+ part { name: "over1";
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel2.relative: 1.0 0.5;
+ image {
+ normal: "bt_hilight.png";
+ border: 7 7 7 0;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "bt_dis_hilight.png";
+ border: 4 4 4 0;
+ }
+ }
+ }
+ part { name: "over2";
+ mouse_events: 1;
+ repeat_events: 1;
+ ignore_flags: ON_HOLD;
+ description { state: "default" 0.0;
+ image {
+ normal: "bt_shine.png";
+ border: 7 7 7 7;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "over3";
+ mouse_events: 1;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ color: 255 255 255 0;
+ image {
+ normal: "bt_glow.png";
+ border: 12 12 12 12;
+ }
+ fill.smooth : 0;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 255;
+ }
+ }
+ part { name: "disabler";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ visible: 0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ }
+ programs {
+ program {
+ name: "button_click";
+ signal: "mouse,down,1";
+ source: "over2";
+ action: SIGNAL_EMIT "elm,action,press" "";
+ after: "button_click_anim";
+ }
+ program {
+ name: "button_click_anim";
+ action: STATE_SET "clicked" 0.0;
+ target: "button_image";
+ }
+ program {
+ name: "button_unclick";
+ signal: "mouse,up,1";
+ source: "over3";
+ action: SIGNAL_EMIT "elm,action,unpress" "";
+ after: "button_unclick_anim";
+ }
+ program {
+ name: "button_pressed_anim";
+ signal: "elm,anim,activate";
+ source: "elm";
+ action: STATE_SET "clicked" 0.0;
+ target: "button_image";
+ target: "over3";
+ after: "button_unpressed_anim";
+ }
+ program {
+ name: "button_unpressed_anim";
+ action: STATE_SET "default" 0.0;
+ transition: DECELERATE 0.5;
+ target: "button_image";
+ target: "over3";
+ }
+ program {
+ name: "button_unclick_anim";
+ action: STATE_SET "default" 0.0;
+ target: "button_image";
+ }
+ program {
+ name: "button_click2";
+ signal: "mouse,down,1";
+ source: "over3";
+ action: STATE_SET "clicked" 0.0;
+ target: "over3";
+ }
+ program {
+ name: "button_unclick2";
+ signal: "mouse,up,1";
+ source: "over3";
+ action: STATE_SET "default" 0.0;
+ transition: DECELERATE 0.5;
+ target: "over3";
+ }
+ program {
+ name: "button_unclick3";
+ signal: "mouse,clicked,1";
+ source: "over2";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+ program { name: "disable";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "button_image";
+ target: "over1";
+ target: "over2";
+ target: "disabler";
+ }
+ program { name: "enable";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "button_image";
+ target: "over1";
+ target: "over2";
+ target: "disabler";
+ }
+ }
+ }
///////////////////////////////////////////////////////////////////////////////
group { name: "elm/toggle/base/default";
}
rel2 {
relative: 0.0 0.83;
- offset: -4 0;
+ offset: -4 0;
to_x: "elm.r_button";
}
}
}
}
- group{ name: "elm/colorselector/image/colorbar_0";
+ group{ name: "elm/colorselector/image/colorbar_0/default";
images {
image: "color_picker_color.png" COMP;
}
}
}
- group { name: "elm/colorselector/image/colorbar_1";
+ group { name: "elm/colorselector/image/colorbar_1/default";
images {
image: "color_picker_opacity.png" COMP;
}
}
}
- group { name: "elm/colorselector/image/colorbar_2";
+ group { name: "elm/colorselector/image/colorbar_2/default";
images {
image: "color_picker_brightness.png" COMP;
}
}
}
- group { name: "elm/colorselector/image/colorbar_3";
+ group { name: "elm/colorselector/image/colorbar_3/default";
images {
image: "color_picker_alpha.png" COMP;
}
}
}
- group { name: "elm/colorselector/bg_image/colorbar_3";
+ group { name: "elm/colorselector/bg_image/colorbar_3/default";
images {
image: "color_picker_alpha_bg.png" COMP;
}
}
}
- group { name: "elm/colorselector/image/updown";
+ group { name: "elm/colorselector/arrow/default";
images {
image: "icon_arrow_down.png" COMP;
}
}
}
- group { name: "elm/colorselector/button/left";
- images {
- image: "bt_base1.png" COMP;
- image: "bt_shine.png" COMP;
- image: "sp_bt_l.png" COMP;
- }
- parts {
- part { name: "button_image";
- mouse_events: 1;
- description { state: "default" 0.0;
- image.normal: "bt_base1.png";
- image.border: 6 6 6 6;
- image.middle: SOLID;
- }
-
- description { state: "clicked" 0.0;
- inherit: "default" 0.0;
- image.normal: "bt_shine.png";
- image.border: 6 6 6 6;
- image.middle: SOLID;
- }
- }
- part { name: "btn_over";
- type: IMAGE;
- mouse_events: 0;
- description { state: "default" 0.0;
- rel1.to: "button_image";
- rel2 {
- relative: 1.0 0.5;
- to: "button_image";
- }
- image {
- normal: "bt_hilight.png";
- border: 7 7 7 0;
- }
- }
- }
- part { name: "btn_over2";
- type: IMAGE;
- mouse_events: 1;
- repeat_events: 1;
- ignore_flags: ON_HOLD;
- description { state: "default" 0.0;
- rel1.to: "button_image";
- rel2.to: "button_image";
- image {
- normal: "bt_shine.png";
- border: 7 7 7 7;
- }
- }
- }
- part { name: "focus_image";
- type: IMAGE;
- description { state: "default" 0.0;
- color: 255 255 255 0;
- rel1.to: "button_image";
- rel2.to: "button_image";
- image {
- normal: "bt_glow.png";
- border: 12 12 12 12;
- }
- fill.smooth: 0;
-
- }
- description { state: "clicked" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- color: 255 255 255 255;
- }
- }
- part { name: "left_arrow";
- mouse_events: 1;
- description { state: "default" 0.0;
- min: 16 16;
- max: 16 16;
- image.normal: "sp_bt_l.png";
- }
- }
- }
-
- programs {
- program {
- name: "button_down";
- signal: "elm,state,left,button,down";
- source: "left_button";
- action: STATE_SET "clicked" 0.0;
- target: "button_image";
- target: "focus_image";
- }
- program {
- name: "button_up";
- signal: "elm,state,left,button,up";
- source: "left_button";
- action: STATE_SET "default" 0.0;
- target: "button_image";
- target: "focus_image";
- }
- }
- }
-
- group { name: "elm/colorselector/button/right";
- images {
- image: "bt_base1.png" COMP;
- image: "bt_shine.png" COMP;
- image: "sp_bt_r.png" COMP;
- }
- parts {
- part { name: "button_image";
- mouse_events: 1;
- description { state: "default" 0.0;
- image.normal: "bt_base1.png";
- image.border: 6 6 6 6;
- image.middle: SOLID;
- }
-
- description { state: "clicked" 0.0;
- inherit: "default" 0.0;
- image.normal: "bt_shine.png";
- image.border: 6 6 6 6;
- image.middle: SOLID;
- }
- }
- part { name: "btn_over";
- type: IMAGE;
- mouse_events: 0;
- description { state: "default" 0.0;
- rel1.to: "button_image";
- rel2 {
- relative: 1.0 0.5;
- to: "button_image";
- }
- image {
- normal: "bt_hilight.png";
- border: 7 7 7 0;
- }
- }
- }
- part { name: "btn_over2";
- type: IMAGE;
- mouse_events: 1;
- repeat_events: 1;
- ignore_flags: ON_HOLD;
- description { state: "default" 0.0;
- rel1.to: "button_image";
- rel2.to: "button_image";
- image {
- normal: "bt_shine.png";
- border: 7 7 7 7;
- }
- }
- }
- part { name: "focus_image";
- type: IMAGE;
- description { state: "default" 0.0;
- color: 255 255 255 0;
- rel1.to: "button_image";
- rel2.to: "button_image";
- image {
- normal: "bt_glow.png";
- border: 12 12 12 12;
- }
- fill.smooth: 0;
-
- }
- description { state: "clicked" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- color: 255 255 255 255;
- }
- }
- part { name: "right_arrow";
- mouse_events: 1;
- description { state: "default" 0.0;
- min: 16 16;
- max: 16 16;
- image.normal: "sp_bt_r.png";
- }
- }
- }
-
- programs {
- program {
- name: "button_down";
- signal: "elm,state,right,button,down";
- source: "right_button";
- action: STATE_SET "clicked" 0.0;
- target: "button_image";
- target: "focus_image";
- }
- program {
- name: "button_up";
- signal: "elm,state,right,button,up";
- source: "right_button";
- action: STATE_SET "default" 0.0;
- target: "button_image";
- target: "focus_image";
- }
- }
- }
///////////////////////////////////////////////////////////////////////////////
#define FLIP_PICKER_MAX_LEN (50)
static const char *widtype = NULL;
static const char SIG_TRANSITION_FINISHED[] = "transition,finished";
+static const char SIG_PUSH_FINISHED[] = "push,finished";
+static const char SIG_POP_FINISHED[] = "pop,finished";
static const char SIG_TITLE_CLICKED[] = "title,clicked";
static const Evas_Smart_Cb_Description _signals[] = {
const char *source);
static void _item_content_set(Elm_Naviframe_Item *navi_it,
Evas_Object *content);
+static void _item_style_set(Elm_Naviframe_Item *navi_it,
+ const char *item_style);
static void
_del_hook(Evas_Object *obj)
EINA_INLIST_FOREACH(wd->stack, it)
{
- elm_naviframe_item_style_set(ELM_CAST(it), it->style);
+ _item_style_set(it, it->style);
_item_title_visible_update(it);
}
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
Elm_Naviframe_Text_Item_Pair *pair = NULL;
- Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+ Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
char buf[1024];
if (!part)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
Elm_Naviframe_Text_Item_Pair *pair = NULL;
- Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+ Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
char buf[1024];
if (!part)
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
Elm_Naviframe_Content_Item_Pair *pair = NULL;
- Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+ Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
//specified parts
if ((!part) || (!strcmp(part, "elm.swallow.content")))
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
Elm_Naviframe_Content_Item_Pair *pair = NULL;
- Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+ Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
//specified parts
if ((!part) || (!strcmp(part, "elm.swallow.content")))
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
Elm_Naviframe_Content_Item_Pair *pair = NULL;
- Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+ Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
Evas_Object *content = NULL;
char buf[1028];
const char *source)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+ Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
edje_object_signal_emit(navi_it->base.view, emission, source);
}
free(text_pair);
}
+ eina_stringshare_del(it->style);
+
wd->stack = eina_inlist_remove(wd->stack, EINA_INLIST_GET(it));
elm_widget_item_del(it);
Elm_Naviframe_Item *it = data;
if (!it) return;
evas_object_hide(it->base.view);
+ evas_object_smart_callback_call(it->base.widget,
+ SIG_PUSH_FINISHED,
+ data);
}
static void
const char *emission __UNUSED__,
const char *source __UNUSED__)
{
+ Elm_Naviframe_Item *it = data;
+ if (!it) return;
+ evas_object_smart_callback_call(it->base.widget,
+ SIG_POP_FINISHED,
+ data);
_item_del(data);
}
evas_object_smart_callback_call(it->base.widget,
SIG_TRANSITION_FINISHED,
- (void *) EINA_TRUE);
+ data);
if (wd->freeze_events)
{
evas_object_hide(wd->rect);
_item_sizing_eval(navi_it);
}
+static void
+_item_style_set(Elm_Naviframe_Item *navi_it, const char *item_style)
+{
+ Elm_Naviframe_Content_Item_Pair *content_pair;
+ Elm_Naviframe_Text_Item_Pair *text_pair;
+ Widget_Data *wd;
+
+ char buf[256];
+
+ if (!item_style)
+ {
+ sprintf(buf, "item/basic");
+ eina_stringshare_replace(&navi_it->style, "basic");
+ }
+ else
+ {
+ if (strlen(item_style) > sizeof(buf))
+ WRN("too much long style name! : naviframe=%p", navi_it->base.widget);
+ sprintf(buf, "item/%s", item_style);
+ eina_stringshare_replace(&navi_it->style, item_style);
+ }
+ _elm_theme_object_set(navi_it->base.widget,
+ navi_it->base.view,
+ "naviframe",
+ buf,
+ elm_widget_style_get(navi_it->base.widget));
+ //recover item
+ EINA_INLIST_FOREACH(navi_it->text_list, text_pair)
+ _item_text_set_hook((Elm_Object_Item *) navi_it,
+ text_pair->part,
+ text_pair->text);
+
+ EINA_INLIST_FOREACH(navi_it->content_list, content_pair)
+ _item_content_set_hook((Elm_Object_Item *) navi_it,
+ content_pair->part,
+ content_pair->content);
+
+ //content
+ if (navi_it->content)
+ {
+ edje_object_part_swallow(navi_it->base.view,
+ "elm.swallow.content",
+ navi_it->content);
+ edje_object_signal_emit(navi_it->base.view,
+ "elm,state,content,show",
+ "elm");
+ }
+
+ //prev button
+ if (navi_it->title_prev_btn)
+ {
+ edje_object_part_swallow(navi_it->base.view,
+ "elm.swallow.prev_btn",
+ navi_it->title_prev_btn);
+ edje_object_signal_emit(navi_it->base.view,
+ "elm,state,prev_btn,show",
+ "elm");
+ }
+
+ //next button
+ if (navi_it->title_next_btn)
+ {
+ edje_object_part_swallow(navi_it->base.view,
+ "elm.swallow.next_btn",
+ navi_it->title_next_btn);
+ edje_object_signal_emit(navi_it->base.view,
+ "elm,state,next_btn,show",
+ "elm");
+ }
+
+ navi_it->title_visible = EINA_TRUE;
+ _item_sizing_eval(navi_it);
+
+ wd = elm_widget_data_get(navi_it->base.widget);
+ if (wd && wd->freeze_events)
+ {
+ evas_object_hide(wd->rect);
+ //FIXME:
+ evas_object_pass_events_set(wd->base, EINA_FALSE);
+ }
+}
+
EAPI Evas_Object *
elm_naviframe_add(Evas_Object *parent)
{
"",
_title_clicked, it);
- elm_naviframe_item_style_set(ELM_CAST(it), item_style);
+ _item_style_set(it, item_style);
- _item_text_set_hook(ELM_CAST(it), "elm.text.title", title_label);
+ _item_text_set_hook((Elm_Object_Item *) it, "elm.text.title", title_label);
//title buttons
if ((!prev_btn) && wd->auto_pushed && eina_inlist_count(wd->stack))
_item_sizing_eval(it);
evas_object_show(it->base.view);
- prev_it = ELM_CAST(elm_naviframe_top_item_get(obj));
+ prev_it = (Elm_Naviframe_Item *) elm_naviframe_top_item_get(obj);
if (prev_it)
{
if (wd->freeze_events)
}
it->title_visible = EINA_TRUE;
wd->stack = eina_inlist_append(wd->stack, EINA_INLIST_GET(it));
- return ELM_CAST(it);
+ return (Elm_Object_Item *) it;
}
EAPI Evas_Object *
wd = elm_widget_data_get(obj);
if (!wd) return NULL;
- it = ELM_CAST(elm_naviframe_top_item_get(obj));
+ it = (Elm_Naviframe_Item *) elm_naviframe_top_item_get(obj);
if (!it) return NULL;
elm_widget_tree_unfocusable_set(it->content, EINA_TRUE);
if (wd->preserve)
elm_naviframe_item_pop_to(Elm_Object_Item *it)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+ Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
Widget_Data *wd = elm_widget_data_get(navi_it->base.widget);
Eina_Inlist *l, *prev_l;
while(l)
{
- if (ELM_CAST(EINA_INLIST_CONTAINER_GET(l, Elm_Naviframe_Item)) == it)
- break;
+ if (EINA_INLIST_CONTAINER_GET(l, Elm_Naviframe_Item) ==
+ ((Elm_Naviframe_Item *) it)) break;
prev_l = l->prev;
_item_del(EINA_INLIST_CONTAINER_GET(l, Elm_Naviframe_Item));
l = prev_l;
elm_naviframe_item_del(Elm_Object_Item *it)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+ Elm_Naviframe_Item *navi_it =(Elm_Naviframe_Item *) it;
Widget_Data *wd = elm_widget_data_get(navi_it->base.widget);
if (it == elm_naviframe_top_item_get(navi_it->base.widget))
{
_item_del(navi_it);
- navi_it = ELM_CAST(EINA_INLIST_CONTAINER_GET(wd->stack->last, Elm_Naviframe_Item));
+ navi_it = EINA_INLIST_CONTAINER_GET(wd->stack->last,
+ Elm_Naviframe_Item);
evas_object_show(navi_it->base.view);
evas_object_raise(navi_it->base.view);
edje_object_signal_emit(navi_it->base.view, "elm,state,visible", "elm");
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if ((!wd) || (!wd->stack)) return NULL;
- return ELM_CAST(EINA_INLIST_CONTAINER_GET(wd->stack->last,
- Elm_Naviframe_Item));
+ return (Elm_Object_Item *) (EINA_INLIST_CONTAINER_GET(wd->stack->last,
+ Elm_Naviframe_Item));
}
EAPI Elm_Object_Item*
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if ((!wd) || (!wd->stack)) return NULL;
- return ELM_CAST(EINA_INLIST_CONTAINER_GET(wd->stack,
- Elm_Naviframe_Item));
+ return (Elm_Object_Item *) (EINA_INLIST_CONTAINER_GET(wd->stack,
+ Elm_Naviframe_Item));
}
EAPI void
elm_naviframe_item_style_set(Elm_Object_Item *it, const char *item_style)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- Elm_Naviframe_Item *navi_it = ELM_CAST(it);
- Elm_Naviframe_Content_Item_Pair *content_pair;
- Elm_Naviframe_Text_Item_Pair *text_pair;
- Widget_Data *wd;
-
- char buf[256];
-
- if (!item_style) sprintf(buf, "item/basic");
- else
- {
- if (strlen(item_style) > sizeof(buf))
- WRN("too much long style name! : naviframe=%p", navi_it->base.widget);
- sprintf(buf, "item/%s", item_style);
- }
- _elm_theme_object_set(navi_it->base.widget,
- navi_it->base.view,
- "naviframe",
- buf,
- elm_widget_style_get(navi_it->base.widget));
- //recover item
- EINA_INLIST_FOREACH(navi_it->text_list, text_pair)
- _item_text_set_hook(it, text_pair->part, text_pair->text);
+ Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
- EINA_INLIST_FOREACH(navi_it->content_list, content_pair)
- _item_content_set_hook(it, content_pair->part, content_pair->content);
+ //Return if new style is exsiting one.
+ if (item_style)
+ if (!strcmp(item_style, navi_it->style)) return;
- //content
- if (navi_it->content)
- {
- edje_object_part_swallow(navi_it->base.view,
- "elm.swallow.content",
- navi_it->content);
- edje_object_signal_emit(navi_it->base.view,
- "elm,state,content,show",
- "elm");
- }
+ if (!item_style)
+ if (!strcmp("basic", navi_it->style)) return;
- //prev button
- if (navi_it->title_prev_btn)
- edje_object_part_swallow(navi_it->base.view,
- "elm.swallow.prev_btn",
- navi_it->title_prev_btn);
-
- //next button
- if (navi_it->title_next_btn)
- edje_object_part_swallow(navi_it->base.view,
- "elm.swallow.next_btn",
- navi_it->title_next_btn);
-
- navi_it->title_visible = EINA_TRUE;
- _item_sizing_eval(navi_it);
-
- wd = elm_widget_data_get(navi_it->base.widget);
- if (wd && wd->freeze_events)
- {
- evas_object_hide(wd->rect);
- //FIXME:
- evas_object_pass_events_set(wd->base, EINA_FALSE);
- }
+ _item_style_set(navi_it, item_style);
}
EAPI const char *
elm_naviframe_item_style_get(const Elm_Object_Item *it)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
- Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+ Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
return navi_it->style;
}
elm_naviframe_item_title_visible_set(Elm_Object_Item *it, Eina_Bool visible)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+ Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
visible = !!visible;
if (navi_it->title_visible == visible) return;
elm_naviframe_item_title_visible_get(const Elm_Object_Item *it)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
- Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+ Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
return navi_it->title_visible;
}
Widget_Data *wd;
Evas *e;
int i = 0;
+ char buf[1024];
wd = elm_widget_data_get(obj);
if (!wd) return;
/* load colorbar area */
wd->cp[i]->colorbar = edje_object_add(e);
_elm_theme_object_set(obj, wd->cp[i]->colorbar, "colorselector", "base",
- "default");
+ elm_widget_style_get(obj));
snprintf(colorbar_name, sizeof(colorbar_name), "colorbar_%d", i);
snprintf(colorbar_s, sizeof(colorbar_s), "elm.colorbar_%d", i);
edje_object_signal_callback_add(wd->cp[i]->colorbar, "drag", "*",
/* load colorbar image */
wd->cp[i]->bar = edje_object_add(e);
+ snprintf(buf, sizeof(buf), "%s/%s", colorbar_name, elm_widget_style_get(obj));
_elm_theme_object_set(obj, wd->cp[i]->bar, "colorselector", "image",
- colorbar_name);
+ buf);
edje_object_part_swallow(wd->cp[i]->colorbar, "elm.bar",
wd->cp[i]->bar);
elm_widget_sub_object_add(obj, wd->cp[i]->bar);
if (i == 3)
{
wd->cp[i]->bg_rect = edje_object_add(e);
+ snprintf(buf, sizeof(buf), "%s/%s", colorbar_name, elm_widget_style_get(obj));
_elm_theme_object_set(obj, wd->cp[i]->bg_rect, "colorselector",
- "bg_image", colorbar_name);
+ "bg_image", buf);
edje_object_part_swallow(wd->cp[i]->colorbar, "elm.bar_bg",
wd->cp[i]->bg_rect);
elm_widget_sub_object_add(obj, wd->cp[i]->bg_rect);
}
/* load arrow image, pointing the colorbar */
wd->cp[i]->arrow = edje_object_add(e);
- _elm_theme_object_set(obj, wd->cp[i]->arrow, "colorselector", "image",
- "updown");
+ _elm_theme_object_set(obj, wd->cp[i]->arrow, "colorselector", "arrow",
+ elm_widget_style_get(obj));
edje_object_part_swallow(wd->cp[i]->colorbar, "elm.arrow_icon",
wd->cp[i]->arrow);
elm_widget_sub_object_add(obj, wd->cp[i]->arrow);
/* load left button */
wd->cp[i]->lbt = elm_button_add(obj);
- elm_object_style_set(wd->cp[i]->lbt, "picker_left");
+ snprintf(buf, sizeof(buf), "colorselector/left/%s", elm_widget_style_get(obj));
+ elm_object_style_set(wd->cp[i]->lbt, buf);
elm_widget_sub_object_add(obj, wd->cp[i]->lbt);
edje_object_part_swallow(wd->cp[i]->colorbar, "elm.l_button",
wd->cp[i]->lbt);
evas_object_smart_callback_add(wd->cp[i]->lbt, "clicked", _left_button_clicked_cb, wd->cp[i]);
elm_button_autorepeat_set(wd->cp[i]->lbt, EINA_TRUE);
elm_button_autorepeat_initial_timeout_set(wd->cp[i]->lbt, _elm_config->longpress_timeout);
- elm_button_autorepeat_gap_timeout_set(wd->cp[i]->lbt, 0.01);
+ elm_button_autorepeat_gap_timeout_set(wd->cp[i]->lbt, (1.0 / _elm_config->fps));
evas_object_smart_callback_add(wd->cp[i]->lbt, "repeated",_left_button_repeat_cb, wd->cp[i]);
/* load right button */
wd->cp[i]->rbt = elm_button_add(obj);
- elm_object_style_set(wd->cp[i]->rbt, "picker_right");
+ snprintf(buf, sizeof(buf), "colorselector/right/%s", elm_widget_style_get(obj));
+ elm_object_style_set(wd->cp[i]->rbt, buf);
elm_widget_sub_object_add(obj, wd->cp[i]->rbt);
edje_object_part_swallow(wd->cp[i]->colorbar, "elm.r_button",
wd->cp[i]->rbt);
evas_object_smart_callback_add(wd->cp[i]->rbt, "clicked", _right_button_clicked_cb, wd->cp[i]);
elm_button_autorepeat_set(wd->cp[i]->rbt, EINA_TRUE);
elm_button_autorepeat_initial_timeout_set(wd->cp[i]->rbt, _elm_config->longpress_timeout);
- elm_button_autorepeat_gap_timeout_set(wd->cp[i]->rbt, 0.01);
+ elm_button_autorepeat_gap_timeout_set(wd->cp[i]->rbt, (1.0 / _elm_config->fps));
evas_object_smart_callback_add(wd->cp[i]->rbt, "repeated",_right_button_repeat_cb, wd->cp[i]);
}
}
static void _disable_hook(Evas_Object *obj);
static void _sizing_eval(Evas_Object *obj);
static void _on_focus_hook(void *data, Evas_Object *obj);
+static void _content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content);
+static Evas_Object *_content_unset_hook(Evas_Object *obj, const char *part);
+static Evas_Object *_content_get_hook(const Evas_Object *obj, const char *part);
static void _resize(void *data, Evas *e, Evas_Object *obj, void *event_info);
static const char *_getbase(Evas_Object *obj);
static void _signal_entry_changed(void *data, Evas_Object *obj, const char *emission, const char *source);
{
_filter_free(tf);
}
+ if (wd->delay_write) ecore_timer_del(wd->delay_write);
free(wd);
}
}
}
+
+static void
+_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Object *edje;
+ if ((!wd) || (!content)) return;
+
+ edje = elm_smart_scroller_edje_object_get(wd->scroller);
+ if (!strcmp(part, "elm.swallow.icon"))
+ {
+ if (wd->icon)
+ evas_object_del(wd->icon);
+ wd->icon = content;
+ edje_object_signal_emit(edje, "elm,action,show,icon", "elm");
+ }
+ else if (!strcmp(part, "elm.swallow.end"))
+ {
+ if (wd->end)
+ evas_object_del(wd->end);
+ wd->end = content;
+ edje_object_signal_emit(edje, "elm,action,show,end", "elm");
+ }
+ evas_event_freeze(evas_object_evas_get(obj));
+ elm_widget_sub_object_add(obj, content);
+ edje_object_part_swallow(edje, part, content);
+ _sizing_eval(obj);
+ evas_event_thaw(evas_object_evas_get(obj));
+ evas_event_thaw_eval(evas_object_evas_get(obj));
+}
+
+static Evas_Object *
+_content_unset_hook(Evas_Object *obj, const char *part)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Object *content, *edje;
+ if (!wd) return NULL;
+
+ edje = elm_smart_scroller_edje_object_get(wd->scroller);
+ if (!strcmp(part, "elm.swallow.icon"))
+ {
+ wd->icon = NULL;
+ edje_object_signal_emit(edje, "elm,action,hide,icon", "elm");
+ }
+ else if (!strcmp(part, "elm.swallow.end"))
+ {
+ wd->end = NULL;
+ edje_object_signal_emit(edje, "elm,action,hide,end", "elm");
+ }
+
+ content = edje_object_part_swallow_get(edje, part);
+ edje_object_part_swallow(edje, part, NULL);
+ if (!content) return NULL;
+ evas_event_freeze(evas_object_evas_get(obj));
+ elm_widget_sub_object_del(obj, content);
+ edje_object_part_unswallow(wd->ent, content);
+ _sizing_eval(obj);
+ evas_event_thaw(evas_object_evas_get(obj));
+ evas_event_thaw_eval(evas_object_evas_get(obj));
+
+ return content;
+}
+
+static Evas_Object *
+_content_get_hook(const Evas_Object *obj, const char *part)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Object *content = NULL, *edje;
+ if (!wd) return NULL;
+
+ if (!strcmp(part, "elm.swallow.icon"))
+ return wd->icon;
+ if (!strcmp(part, "elm.swallow.end"))
+ return wd->end;
+
+ edje = elm_smart_scroller_edje_object_get(wd->scroller);
+ if (edje)
+ content = edje_object_part_swallow_get(edje, part);
+ return content;
+}
+
+
static void
_signal_emit_hook(Evas_Object *obj, const char *emission, const char *source)
{
}
static void
+_sub_del(void *data, Evas_Object *obj, void *event_info)
+{
+ Widget_Data *wd = data;
+ Evas_Object *sub = event_info;
+ Evas_Object *edje;
+
+ edje = elm_smart_scroller_edje_object_get(wd->scroller);
+ if (sub == wd->icon)
+ {
+ wd->icon = NULL;
+ if (edje)
+ edje_object_signal_emit(edje, "elm,action,hide,icon", "elm");
+ }
+ else if (sub == wd->end)
+ {
+ wd->end = NULL;
+ if (edje)
+ edje_object_signal_emit(edje, "elm,action,hide,end", "elm");
+ }
+ _sizing_eval(obj);
+}
+
+static void
_hoversel_position(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
elm_widget_highlight_ignore_set(obj, EINA_TRUE);
elm_widget_text_set_hook_set(obj, _elm_entry_text_set);
elm_widget_text_get_hook_set(obj, _elm_entry_text_get);
+ elm_widget_content_set_hook_set(obj, _content_set_hook);
+ elm_widget_content_unset_hook_set(obj, _content_unset_hook);
+ elm_widget_content_get_hook_set(obj, _content_get_hook);
+ evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, wd);
wd->scroller = elm_smart_scroller_add(e);
elm_widget_sub_object_add(obj, wd->scroller);
elm_smart_scroller_widget_set(wd->scroller, obj);
return elm_widget_item_text_part_get(it, part);
}
+EAPI void *
+elm_object_item_data_get(const Elm_Object_Item *it)
+{
+ return elm_widget_item_data_get(it);
+}
+
+EAPI void
+elm_object_item_data_set(Elm_Object_Item *it, void *data)
+{
+ elm_widget_item_data_set(it, data);
+}
+
EAPI void
elm_object_item_signal_emit(Elm_Object_Item *it, const char *emission, const char *source)
{