#!/bin/sh
+rm -rf autom4te.cache
+rm -f aclocal.m4 ltmain.sh
+
touch README
+ touch ABOUT-NLS
echo "Running autopoint..." ; autopoint -f || :
echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1
value "bring_in_scroll_friction" double: 0.5;
value "zoom_friction" double: 0.5;
value "thumbscroll_border_friction" double: 0.5;
+ value "scroll_smooth_time_interval" double: 0.008;
+ value "scroll_smooth_amount" double: 1.0;
+ value "scroll_smooth_history_weight" double: 0.3;
+ value "scroll_smooth_future_time" double: 0.0;
+ value "scroll_smooth_time_window" double: 0.2;
value "scale" double: 1.0;
value "bgpixmap" int: 0;
value "compositing" int: 1;
--- /dev/null
+group "Elm_Config" struct {
+ value "config_version" int: 65539;
+ value "engine" string: "software_x11";
+ value "vsync" uchar: 1;
+ value "thumbscroll_enable" uchar: 1;
+ value "thumbscroll_threshold" int: 24;
+ value "thumbscroll_momentum_threshold" double: 100.0;
+ value "thumbscroll_friction" double: 1.0;
+ value "thumbscroll_bounce_friction" double: 0.5;
+ value "thumbscroll_bounce_enable" uchar: 1;
+ value "page_scroll_friction" double: 0.5;
+ value "bring_in_scroll_friction" double: 0.5;
+ value "zoom_friction" double: 0.5;
+ value "thumbscroll_border_friction" double: 0.5;
++ value "scroll_smooth_amount" double: 0.0;
++ value "scroll_smooth_history_weight" double: 0.3;
++ value "scroll_smooth_future_time" double: 0.0;
++ value "scroll_smooth_time_window" double: 0.2;
+ value "scroll_smooth_time_interval" double: 0.008;
+ value "scale" double: 1.0;
+ value "bgpixmap" int: 0;
+ value "compositing" int: 1;
+ value "font_hinting" int: 2;
+ value "cache_flush_poll_interval" int: 512;
+ value "cache_flush_enable" uchar: 0;
+ value "image_cache" int: 4096;
+ value "font_cache" int: 512;
+ value "edje_cache" int: 32;
+ value "edje_collection_cache" int: 64;
+ value "finger_size" int: 40;
+ value "fps" double: 6000.0;
+ value "theme" string: "default";
+ value "modules" string: "ctxpopup_copypasteUI>entry/api:decarta>map/api";
+ value "tooltip_delay" double: 1.0;
+ value "cursor_engine_only" uchar: 1;
+ value "focus_highlight_enable" uchar: 0;
+ value "focus_highlight_animate" uchar: 1;
+ value "toolbar_shrink_mode" int: 2;
+ value "fileselector_expand_enable" uchar: 0;
+ value "inwin_dialogs_enable" uchar: 0;
+ value "icon_size" int: 32;
+ value "longpress_timeout" double: 0.5;
+ value "input_panel_enable" int: 1;
+ value "password_show_last_character" uchar: 1;
+ value "effect_enable" uchar: 1;
+}
config/default/Makefile
config/standard/Makefile
config/illume/Makefile
- $po_makefile_in
+config/slp/Makefile
+ $po_makefile_in
])
#####################################################################
icon_23.png \
bubble.png \
bubble_sh.png \
+copypaste_icon_clipboard.png \
+copypaste_icon_search.png \
+copypaste_icon_share.png \
mystrale.jpg \
- mystrale_2.jpg
+ mystrale_2.jpg \
+ twofish.jpg \
+ pt.png
EXTRA_DIST = $(files_DATA)
else {
emit("elm,action,toggle,off", "");
}
-
-
}
}
program { name: "toggle_on";
scale: 1;
description { state: "default" 0.0;
min: 25 25;
- max: 25 25;
+ max: 25 25;
align: 0 0.5;
aspect: 1.0 1.0;
- rel1 { offset: 10 10; }
- rel2 { offset: 0 -10; }
+ rel1 { offset: 10 10; }
- rel2 { offset: 0 -10; }
++ rel2 { offset: 0 -10; }
}
}
part { name: "elm.text";
}
///////////////////////////////////////////////////////////////////////////////
++
group { name: "elm/genlist/item/default/default";
+ data.item: "stacking" "above";
data.item: "selectraise" "on";
data.item: "labels" "elm.text";
data.item: "icons" "elm.swallow.icon elm.swallow.end";
type: SWALLOW;
description { state: "default" 0.0;
fixed: 1 0;
+ visible: 0;
align: 0.0 0.5;
- rel1 {
- relative: 0.0 0.0;
- offset: 4 4;
- }
- rel2 {
- relative: 0.0 1.0;
- offset: 4 -5;
- }
+ rel1.to_x: "bg";
+ rel1.relative: 1.0 0.0;
+ rel1.offset: 1 1;
+ rel2.to_x: "bg";
+ rel2.offset: 1 -2;
+ rel2.relative: 1.0 1.0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ fixed: 1 0;
+ visible: 1;
+ aspect: 1.0 1.0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 128 128 128 128;
+ }
+ description { state: "disabled_visible" 0.0;
+ inherit: "default" 0.0;
+ color: 128 128 128 128;
+ fixed: 1 0;
+ visible: 1;
+ aspect: 1.0 1.0;
}
}
- part { name: "elm.text.title";
- clip_to: "disclip";
- type: TEXT;
- effect: SOFT_SHADOW;
- mouse_events: 0;
+ part { name: "elm.text";
+ type: TEXT;
+ mouse_events: 0;
scale: 1;
- description {
- state: "default" 0.0;
- rel1 {
- relative: 0.0 0.0;
- offset: 4 4;
- }
- rel2 {
- relative: 1.0 0.5;
- offset: -1 -5;
- }
+ description { state: "default" 0.0;
+ visible: 0;
+ rel1.to_x: "elm.swallow.content";
+ rel1.relative: 1.0 0.0;
+ rel1.offset: 1 1;
+ rel2.relative: 1.0 1.0;
+ rel2.offset: -2 -2;
color: 0 0 0 255;
- color3: 0 0 0 0;
text {
- font: "Sans";
+ font: "Sans,Edje-Vera";
size: 10;
min: 0 1;
-- align: 0.0 0.5;
++ align: -1.0 0.5;
}
}
- description { state: "selected" 0.0;
+ description { state: "visible" 0.0;
inherit: "default" 0.0;
- color: 224 224 224 255;
- color3: 0 0 0 64;
+ visible: 1;
+ text.min: 1 1;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 0 0 0 128;
+ color3: 0 0 0 0;
+ }
+ description { state: "disabled_visible" 0.0;
+ inherit: "default" 0.0;
+ color: 0 0 0 128;
+ color3: 0 0 0 0;
+ visible: 1;
+ text.min: 1 1;
+ }
+ }
+ part { name: "events";
+ type: RECT;
+ ignore_flags: ON_HOLD;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ 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: "click";
+ signal: "mouse,up,1";
+ source: "events";
+ action: SIGNAL_EMIT "elm,action,check,toggle" "";
+ }
+ program { name: "check_on";
+ signal: "elm,state,check,on";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "check";
+ }
+ program { name: "check_off";
+ signal: "elm,state,check,off";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "check";
+ }
+ program { name: "text_show";
+ signal: "elm,state,text,visible";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "elm.text";
+ }
+ program { name: "text_hide";
+ signal: "elm,state,text,hidden";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.text";
+ }
+ program { name: "icon_show";
+ signal: "elm,state,icon,visible";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "elm.swallow.content";
+ }
+ program { name: "icon_hide";
+ signal: "elm,state,icon,hidden";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.swallow.content";
+ }
+ program { name: "disable";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "disabler";
+ after: "disable_text";
+ }
+ program { name: "disable_text";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ set_state(PART:"elm.text", "disabled_visible", 0.0);
+ else
+ set_state(PART:"elm.text", "disabled", 0.0);
+
+ get_state(PART:"elm.swallow.content", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
+ else
+ set_state(PART:"elm.swallow.content", "disabled", 0.0);
+
+ get_state(PART:"check", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ set_state(PART:"check", "disabled_visible", 0.0);
+ else
+ set_state(PART:"check", "disabled", 0.0);
+ }
+ }
+ program { name: "enable";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "disabler";
+ after: "enable_text";
+ }
+ program { name: "enable_text";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "disabled_visible"))
+ set_state(PART:"elm.text", "visible", 0.0);
+ else
+ set_state(PART:"elm.text", "default", 0.0);
+
+ get_state(PART:"elm.swallow.content", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ set_state(PART:"elm.swallow.content", "visible", 0.0);
+ else
+ set_state(PART:"elm.swallow.content", "default", 0.0);
-
- get_state(PART:"check", st, 30, vl);
- if (!strcmp(st, "visible"))
- set_state(PART:"check", "visible", 0.0);
- else
- set_state(PART:"check", "default", 0.0);
++
++ get_state(PART:"check", st, 30, vl);
++ if (!strcmp(st, "visible"))
++ set_state(PART:"check", "visible", 0.0);
++ else
++ set_state(PART:"check", "default", 0.0);
++ }
++ }
++ }
++ }
++
++///////////////////////////////////////////////////////////////////////////////
++ group { name: "elm/radio/base/default";
++ images {
++ image: "radio_base.png" COMP;
++ image: "radio.png" COMP;
++ image: "radio2.png" COMP;
++ }
++ parts {
++ part { name: "bg";
++ mouse_events: 0;
++ scale: 1;
++ description { state: "default" 0.0;
++ rel1.offset: 1 1;
++ rel2.relative: 0.0 1.0;
++ rel2.offset: 1 -2;
++ align: 0.0 0.5;
++ min: 16 16;
++ max: 16 16;
++ aspect: 1.0 1.0;
++ aspect_preference: VERTICAL;
++ image.normal: "radio_base.png";
+ }
+ }
- part { name: "elm.text.album-artist";
- clip_to: "disclip";
- type: TEXT;
- mouse_events: 0;
++ part { name: "radio";
++ mouse_events: 0;
+ scale: 1;
- description {
- state: "default" 0.0;
- rel1 {
- relative: 0.0 0.5;
- offset: 4 4;
- }
- rel2 {
- relative: 1.0 1.0;
- offset: -1 -5;
- }
- color: 0 0 0 128;
- color3: 0 0 0 0;
- text {
- font: "Sans";
- size: 8;
- min: 0 1;
- align: 0.0 0.5;
- }
++ description { state: "default" 0.0;
++ rel1.to: "bg";
++ rel2.to: "bg";
++ visible: 0;
++ image.normal: "radio.png";
+ }
- description { state: "selected" 0.0;
++ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
- color: 128 128 128 255;
- color3: 0 0 0 32;
++ visible: 1;
+ }
+ }
- part { name: "fg1";
- clip_to: "disclip";
- mouse_events: 0;
++ part { name: "elm.swallow.content";
++ type: SWALLOW;
+ description { state: "default" 0.0;
++ fixed: 1 0;
+ visible: 0;
- color: 255 255 255 0;
- rel1.to: "bg";
- rel2.relative: 1.0 0.5;
- rel2.to: "bg";
- image {
- normal: "bt_sm_hilight.png";
- border: 6 6 6 0;
- }
++ align: 0.0 0.5;
++ color: 0 0 0 0;
++ rel1.to_x: "bg";
++ rel1.relative: 1.0 0.0;
++ rel1.offset: 1 1;
++ rel2.to_x: "bg";
++ rel2.relative: 1.0 1.0;
++ rel2.offset: 2 -2;
+ }
- description { state: "selected" 0.0;
++ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: 255 255 255 255;
++ aspect: 1.0 1.0;
++ }
++ description { state: "disabled" 0.0;
++ inherit: "default" 0.0;
++ color: 128 128 128 128;
++ }
++ description { state: "disabled_visible" 0.0;
++ inherit: "default" 0.0;
++ color: 128 128 128 128;
++ visible: 1;
++ aspect: 1.0 1.0;
+ }
+ }
- part { name: "fg2";
- clip_to: "disclip";
++ part { name: "elm.text";
++ type: TEXT;
+ mouse_events: 0;
++ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
- color: 255 255 255 0;
- rel1.to: "bg";
- rel2.to: "bg";
- image {
- normal: "bt_sm_shine.png";
- border: 6 6 6 0;
++ rel1.to_x: "elm.swallow.content";
++ rel1.relative: 1.0 0.0;
++ rel1.offset: 1 1;
++ rel2.relative: 1.0 1.0;
++ rel2.offset: -2 -2;
++ color: 0 0 0 255;
++ text {
++ font: "Sans,Edje-Vera";
++ size: 10;
++ min: 0 0;
++ align: -1.0 0.5;
+ }
+ }
- description { state: "selected" 0.0;
++ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
- color: 255 255 255 255;
++ text.min: 1 1;
++ }
++ description { state: "disabled" 0.0;
++ inherit: "default" 0.0;
++ color: 0 0 0 128;
++ color3: 0 0 0 0;
++ }
++ description { state: "disabled_visible" 0.0;
++ inherit: "default" 0.0;
++ color: 0 0 0 128;
++ color3: 0 0 0 0;
++ visible: 1;
++ text.min: 1 1;
+ }
+ }
- part { name: "disclip";
++ part { name: "events";
+ type: RECT;
++ ignore_flags: ON_HOLD;
+ description { state: "default" 0.0;
- rel1.to: "bg";
- rel2.to: "bg";
++ color: 0 0 0 0;
++ }
++ }
++ 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;
- color: 255 255 255 64;
++ visible: 1;
+ }
+ }
+ }
+ programs {
- // signal: elm,state,%s,active
- // a "check" item named %s went active
- // signal: elm,state,%s,passive
- // a "check" item named %s went passive
- // default is passive
- program {
- name: "go_active";
- signal: "elm,state,selected";
- source: "elm";
- action: STATE_SET "selected" 0.0;
- target: "bg";
- target: "fg1";
- target: "fg2";
- target: "elm.text.title";
- target: "elm.text.album-artist";
++ program { name: "click";
++ signal: "mouse,up,1";
++ source: "events";
++ action: SIGNAL_EMIT "elm,action,radio,toggle" "";
+ }
- program {
- name: "go_passive";
- signal: "elm,state,unselected";
- source: "elm";
++ program { name: "radio_on";
++ signal: "elm,state,radio,on";
++ source: "elm";
++ action: STATE_SET "visible" 0.0;
++ target: "radio";
++ }
++ program { name: "radio_off";
++ signal: "elm,state,radio,off";
++ source: "elm";
+ action: STATE_SET "default" 0.0;
- target: "bg";
- target: "fg1";
- target: "fg2";
- target: "elm.text.title";
- target: "elm.text.album-artist";
- transition: LINEAR 0.1;
++ target: "radio";
+ }
- program {
- name: "go_disabled";
- signal: "elm,state,disabled";
- source: "elm";
- action: STATE_SET "disabled" 0.0;
- target: "disclip";
++ program { name: "text_show";
++ signal: "elm,state,text,visible";
++ source: "elm";
++ action: STATE_SET "visible" 0.0;
++ target: "elm.text";
+ }
- program {
- name: "go_enabled";
- signal: "elm,state,enabled";
- source: "elm";
++ program { name: "text_hide";
++ signal: "elm,state,text,hidden";
++ source: "elm";
+ action: STATE_SET "default" 0.0;
- target: "disclip";
++ target: "elm.text";
++ }
++ program { name: "icon_show";
++ signal: "elm,state,icon,visible";
++ source: "elm";
++ action: STATE_SET "visible" 0.0;
++ target: "elm.swallow.content";
++ }
++ program { name: "icon_hide";
++ signal: "elm,state,icon,hidden";
++ source: "elm";
++ action: STATE_SET "default" 0.0;
++ target: "elm.swallow.content";
++ }
++ program { name: "disable";
++ signal: "elm,state,disabled";
++ source: "elm";
++ action: STATE_SET "disabled" 0.0;
++ target: "disabler";
++ after: "disable_text";
++ }
++ program { name: "disable_text";
++ script {
++ new st[31];
++ new Float:vl;
++ get_state(PART:"elm.text", st, 30, vl);
++ if (!strcmp(st, "visible"))
++ set_state(PART:"elm.text", "disabled_visible", 0.0);
++ else
++ set_state(PART:"elm.text", "disabled", 0.0);
++
++ get_state(PART:"elm.swallow.content", st, 30, vl);
++ if (!strcmp(st, "visible"))
++ set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
++ else
++ set_state(PART:"elm.swallow.content", "disabled", 0.0);
++ }
++ }
++ program { name: "enable";
++ signal: "elm,state,enabled";
++ source: "elm";
++ action: STATE_SET "default" 0.0;
++ target: "disabler";
++ after: "enable_text";
++ }
++ program { name: "enable_text";
++ script {
++ new st[31];
++ new Float:vl;
++ get_state(PART:"elm.text", st, 30, vl);
++ if (!strcmp(st, "disabled_visible"))
++ set_state(PART:"elm.text", "visible", 0.0);
++ else
++ set_state(PART:"elm.text", "default", 0.0);
++
++ get_state(PART:"elm.swallow.content", st, 30, vl);
++ if (!strcmp(st, "visible"))
++ set_state(PART:"elm.swallow.content", "visible", 0.0);
++ else
++ set_state(PART:"elm.swallow.content", "default", 0.0);
+ }
}
}
}
- ///////////////////////////////////////////////////////////////////////////////
- group { name: "elm/radio/base/default";
- images {
- image: "radio_base.png" COMP;
- image: "radio.png" COMP;
- image: "radio2.png" COMP;
- }
- parts {
- part { name: "bg";
- mouse_events: 0;
- scale: 1;
- description { state: "default" 0.0;
- rel1.offset: 1 1;
- rel2.relative: 0.0 1.0;
- rel2.offset: 1 -2;
- align: 0.0 0.5;
- min: 16 16;
- max: 16 16;
- aspect: 1.0 1.0;
- aspect_preference: VERTICAL;
- image.normal: "radio_base.png";
- }
- }
- part { name: "radio";
- mouse_events: 0;
- scale: 1;
- description { state: "default" 0.0;
- rel1.to: "bg";
- rel2.to: "bg";
- visible: 0;
- image.normal: "radio.png";
- }
- description { state: "visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
- part { name: "elm.swallow.content";
- type: SWALLOW;
- description { state: "default" 0.0;
- fixed: 1 0;
- visible: 0;
- align: 0.0 0.5;
- color: 0 0 0 0;
- rel1.to_x: "bg";
- rel1.relative: 1.0 0.0;
- rel1.offset: 1 1;
- rel2.to_x: "bg";
- rel2.relative: 1.0 1.0;
- rel2.offset: 2 -2;
- }
- description { state: "visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- color: 255 255 255 255;
- aspect: 1.0 1.0;
- }
- description { state: "disabled" 0.0;
- inherit: "default" 0.0;
- color: 128 128 128 128;
- }
- description { state: "disabled_visible" 0.0;
- inherit: "default" 0.0;
- color: 128 128 128 128;
- visible: 1;
- aspect: 1.0 1.0;
- }
- }
- part { name: "elm.text";
- type: TEXT;
- mouse_events: 0;
- scale: 1;
- description { state: "default" 0.0;
- visible: 0;
- rel1.to_x: "elm.swallow.content";
- rel1.relative: 1.0 0.0;
- rel1.offset: 1 1;
- rel2.relative: 1.0 1.0;
- rel2.offset: -2 -2;
- color: 0 0 0 255;
- text {
- font: "Sans,Edje-Vera";
- size: 10;
- min: 0 0;
- align: 0.0 0.5;
- }
- }
- description { state: "visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- text.min: 1 1;
- }
- description { state: "disabled" 0.0;
- inherit: "default" 0.0;
- color: 0 0 0 128;
- color3: 0 0 0 0;
- }
- description { state: "disabled_visible" 0.0;
- inherit: "default" 0.0;
- color: 0 0 0 128;
- color3: 0 0 0 0;
- visible: 1;
- text.min: 1 1;
- }
- }
- part { name: "events";
- type: RECT;
- ignore_flags: ON_HOLD;
- description { state: "default" 0.0;
- color: 0 0 0 0;
- }
- }
- 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: "click";
- signal: "mouse,up,1";
- source: "events";
- action: SIGNAL_EMIT "elm,action,radio,toggle" "";
- }
- program { name: "radio_on";
- signal: "elm,state,radio,on";
- source: "elm";
- action: STATE_SET "visible" 0.0;
- target: "radio";
- }
- program { name: "radio_off";
- signal: "elm,state,radio,off";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "radio";
- }
- program { name: "text_show";
- signal: "elm,state,text,visible";
- source: "elm";
- action: STATE_SET "visible" 0.0;
- target: "elm.text";
- }
- program { name: "text_hide";
- signal: "elm,state,text,hidden";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "elm.text";
- }
- program { name: "icon_show";
- signal: "elm,state,icon,visible";
- source: "elm";
- action: STATE_SET "visible" 0.0;
- target: "elm.swallow.content";
- }
- program { name: "icon_hide";
- signal: "elm,state,icon,hidden";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "elm.swallow.content";
- }
- program { name: "disable";
- signal: "elm,state,disabled";
- source: "elm";
- action: STATE_SET "disabled" 0.0;
- target: "disabler";
- after: "disable_text";
- }
- program { name: "disable_text";
- script {
- new st[31];
- new Float:vl;
- get_state(PART:"elm.text", st, 30, vl);
- if (!strcmp(st, "visible"))
- set_state(PART:"elm.text", "disabled_visible", 0.0);
- else
- set_state(PART:"elm.text", "disabled", 0.0);
-
- get_state(PART:"elm.swallow.content", st, 30, vl);
- if (!strcmp(st, "visible"))
- set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
- else
- set_state(PART:"elm.swallow.content", "disabled", 0.0);
- }
- }
- program { name: "enable";
- signal: "elm,state,enabled";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "disabler";
- after: "enable_text";
- }
- program { name: "enable_text";
- script {
- new st[31];
- new Float:vl;
- get_state(PART:"elm.text", st, 30, vl);
- if (!strcmp(st, "disabled_visible"))
- set_state(PART:"elm.text", "visible", 0.0);
- else
- set_state(PART:"elm.text", "default", 0.0);
- group { name: "elm/genlist/item_compress_odd/media/default";
+
- get_state(PART:"elm.swallow.content", st, 30, vl);
- if (!strcmp(st, "visible"))
- set_state(PART:"elm.swallow.content", "visible", 0.0);
- else
- set_state(PART:"elm.swallow.content", "default", 0.0);
- }
- }
- }
- }
+ group { name: "elm/genlist/tree_compress_odd/double_label/default";
data.item: "stacking" "below";
data.item: "selectraise" "on";
- data.item: "labels" "elm.text.title elm.text.album-artist";
+ data.item: "labels" "elm.text elm.text.sub";
+ data.item: "icons" "elm.swallow.icon elm.swallow.end";
data.item: "treesize" "20";
+// data.item: "states" "";
images {
image: "bt_sm_base1.png" COMP;
image: "bt_sm_shine.png" COMP;
}
}
++
///////////////////////////////////////////////////////////////////////////////
group { name: "elm/pager/base/default";
data.item: "onshow" "raise";
/////////////////////////////////////////////////////////////////////////////
group {
name: "elm/panes/vertical/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: "arrow_right.png" COMP;
- image: "arrow_left.png" COMP;
- }
- script {
- public state_pair = 0; //0:both content are not set, 1:both content are set
- }
+ 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: "arrow_right.png" COMP;
+ image: "arrow_left.png" COMP;
+ }
++ script {
++ public state_pair = 0; //0:both content are not set, 1:both content are set
++ }
parts
{
part
rel2.offset: (-45/2 - 20) 45/2;
}
}
-
+ part { name: "movement.decider";
+ mouse_events: 1;
+ description { state: "default" 0.0;
+ rel1.to: "elm.bar";
+ rel2.to: "elm.bar";
+ visible: 0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
-
}
- programs {
+ programs {
program {
name: "button_click";
signal: "mouse,down,1";
group {
name: "elm/panes/horizontal/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: "arrow_up.png" COMP;
- image: "arrow_down.png" COMP;
- }
+ 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: "arrow_up.png" COMP;
+ image: "arrow_down.png" COMP;
+ }
+ script {
+ public state_pair = 0; //0:both content are not set, 1:both content are set
+ }
parts
{
part
rel2.offset: 45/2 (-45/2 - 20);
}
}
-
- }
- programs {
- program {
- name: "button_click";
- signal: "mouse,down,1";
- source: "over2";
- action: SIGNAL_EMIT "elm,action,press" "";
- after: "button_click_anim";
- after: "arrow_anim_start";
- }
- program {
- name: "button_click_anim";
- action: STATE_SET "clicked" 0.0;
- target: "elm.bar";
- }
- program {
- name: "button_unclick";
- signal: "mouse,up,1";
- source: "over2";
- action: SIGNAL_EMIT "elm,action,unpress" "";
- after: "button_unclick_anim";
- after: "arrow_anim_stop";
- }
- program {
- name: "button_unclick_anim";
- action: STATE_SET "default" 0.0;
- target: "elm.bar";
- }
- 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,up,1";
- source: "over2";
- action: SIGNAL_EMIT "elm,action,click" "";
+ part {
+ name: "movement.decider";
+ mouse_events: 1;
+ description { state: "default" 0.0;
+ rel1.to: "elm.bar";
+ rel2.to: "elm.bar";
+ 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";
+ after: "arrow_anim_start";
+ }
+ program {
+ name: "button_click_anim";
+ script {
+ if(get_int(state_pair) == 1)
+ set_state(PART:"elm.bar", "clicked", 0.1);
+ else
+ set_state(PART:"elm.bar", "clicked", 0.0);
+ }
+ }
+ program {
+ name: "button_unclick";
+ signal: "mouse,up,1";
+ source: "over2";
+ action: SIGNAL_EMIT "elm,action,unpress" "";
+ after: "button_unclick_anim";
+ after: "arrow_anim_stop";
+ }
+ program {
+ name: "button_unclick_anim";
+ script {
+ if(get_int(state_pair) == 1)
+ set_state(PART:"elm.bar", "default", 0.1);
+ else
+ set_state(PART:"elm.bar", "default", 0.0);
+ }
+ }
+ 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,up,1";
+ source: "over2";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
program {
name: "button_down_double";
signal: "mouse,down,1,double";
}
}
--
--
/////////////////////////////////////////////////////////////////////////////
// PANEL
/////////////////////////////////////////////////////////////////////////////
%{_libdir}/*.so
%{_libdir}/*.la
%{_libdir}/*.a
- %{_libdir}/elementary/modules/test_entry/*/module.*
- %{_libdir}/pkgconfig/*
+ %{_libdir}/edje/modules/elm/*/module.so
+ %{_libdir}/edje/modules/elm/*/module.la
+ %{_libdir}/elementary/modules/test_*/*/module.*
+ %{_libdir}/pkgconfig/*
+ %{_includedir}/elementary-0/*.h
+%{_libdir}/edje/*.so
+%{_libdir}/edje/*.la
- %{_includedir}/elementary/*.h
+%{_includedir}/*.h
%files bin
%defattr(-, root, root)
EXTRA_PROGRAMS = elementary_test elementary_config
elementary_test_SOURCES = \
+test.c \
+ test_3d.c \
+ test_actionslider.c \
+ test_anchorblock.c \
+ test_anchorview.c \
+ test_anim.c \
test_bg.c \
- test_icon.c \
test_box.c \
+ test_bubble.c \
test_button.c \
- test_transit.c \
-test.c \
+ test_calendar.c \
+ test_check.c \
+ test_clock.c \
+ test_colorselector.c \
+ test_conform.c \
+ test_ctxpopup.c \
+ test_cursor.c \
+ test_diskselector.c \
+ test_entry.c \
test_fileselector_button.c \
+ test_fileselector.c \
test_fileselector_entry.c \
- test_toggle.c \
- test_table.c \
+ test_flip.c \
+ test_flip_page.c \
+ test_flipselector.c \
+ test_floating.c \
++test_focus.c \
+ test_focus2.c \
+ test_focus3.c \
-test_focus.c \
test_gengrid.c \
- test_clock.c \
- test_layout.c \
+ test_genlist.c \
+ test_genscroller.c \
+ test_glview_simple.c \
+ test_glview.c \
+ test_grid.c \
test_hover.c \
- test_entry.c \
- test_anchorview.c \
- test_anchorblock.c \
- test_toolbar.c \
test_hoversel.c \
- test_list.c \
+ test_icon.c \
+ test_icon_desktops.c \
+ test_index.c \
test_inwin.c \
- test_scaling.c \
- test_slider.c \
- test_actionslider.c \
- test_genlist.c \
- test_grid \
- test_check.c \
+ test_label.c \
+ test_launcher.c \
+ test_layout.c \
+ test_list.c \
+ test_map.c \
+ test_menu.c \
+ test_multi.c \
+ test_notify.c \
test_pager.c \
- test_radio.c \
- test_win_state.c \
+ test_panel.c \
+ test_panes.c \
+ test_photo.c \
+ test_photocam.c \
test_progressbar.c \
- test_fileselector.c \
- test_separator.c \
+ test_radio.c \
+ test_scaling.c \
test_scroller.c \
+ test_segment_control.c \
+ test_separator.c \
+ test_slider.c \
+ test_slideshow.c \
test_spinner.c \
- test_index.c \
- test_photocam.c \
- test_photo.c \
+ test_store.c \
+ test_table.c \
test_thumb.c \
- test_icon_desktops.c \
- test_notify.c \
- test_slideshow.c \
- test_menu.c \
- test_panel.c \
- test_panes.c \
- test_map.c \
- test_weather.c \
- test_flip.c \
- test_label.c \
- test_conform.c \
- test_multi.c \
- test_floating.c \
- test_launcher.c \
- test_anim.c \
- test_segment_control.c \
- test_calendar.c \
+ test_toggle.c \
+ test_toolbar.c \
test_tooltip.c \
- test_cursor.c \
- test_focus.c \
- test_focus2.c \
- test_focus3.c \
- test_flipselector.c \
- test_diskselector.c \
- test_colorselector.c \
- test_ctxpopup.c \
- test_bubble.c \
- test_store.c
+ test_transit.c \
+ test_weather.c \
+ test_win_inline.c \
+ test_win_state.c
+
+ if HAVE_EIO
+ elementary_test_SOURCES += test_eio.c
+ endif
++>>>>>>> upstream
elementary_test_LDADD = $(top_builddir)/src/lib/libelementary.la \
@ELEMENTARY_EWEATHER_LIBS@ \
evas_object_show(ck);
rd = elm_radio_add(win);
+ evas_object_size_hint_weight_set(rd, 1.0, 0.0);
elm_radio_state_value_set(rd, 0);
-- elm_radio_label_set(rd, "Radio 1");
++ elm_object_text_set(rd, "Radio 1");
elm_table_pack(base, rd, 1, 0, 1, 1);
evas_object_show(rd);
rdg = rd;
rd = elm_radio_add(win);
+ evas_object_size_hint_weight_set(rd, 1.0, 0.0);
elm_radio_state_value_set(rd, 1);
-- elm_radio_label_set(rd, "Radio 2");
++ elm_object_text_set(rd, "Radio 2");
elm_radio_group_add(rd, rdg);
elm_table_pack(base, rd, 1, 1, 1, 1);
evas_object_show(rd);
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_HORIZONTAL, 1, 1);
bb = elm_bubble_add(win);
-- elm_bubble_label_set(bb, "Message 3");
-- elm_bubble_info_set(bb, "10:32 4/11/2008");
++ elm_object_text_set(bb, "Message 3");
++ elm_object_text_part_set(bb, "info", "10:32 4/11/2008");
elm_bubble_icon_set(bb, ic);
evas_object_smart_callback_add(bb, "clicked", _print_clicked, NULL);
evas_object_show(ic);
av = elm_anchorblock_add(win);
elm_anchorblock_hover_style_set(av, "popout");
elm_anchorblock_hover_parent_set(av, win);
-- elm_anchorblock_text_set(av,
++ elm_object_text_set(av,
"Hi there. This is the most recent message in the "
"list of messages. It has one <a href=tel:+614321234>+61 432 1234</a> "
"(phone number) to click on.");
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
bb = elm_bubble_add(win);
-- elm_bubble_label_set(bb, "Message 2");
-- elm_bubble_info_set(bb, "7:16 27/10/2008");
++ elm_object_text_set(bb, "Message 2");
++ elm_object_text_part_set(bb, "info", "7:16 27/10/2008");
elm_bubble_icon_set(bb, ic);
evas_object_smart_callback_add(bb, "clicked", _print_clicked, NULL);
evas_object_show(ic);
av = elm_anchorblock_add(win);
elm_anchorblock_hover_style_set(av, "popout");
elm_anchorblock_hover_parent_set(av, win);
-- elm_anchorblock_text_set(av,
++ elm_object_text_set(av,
"Hey what are you doing? This is the second last message "
"Hi there. This is the most recent message in the "
"list. It's a longer one so it can wrap more and "
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_HORIZONTAL, 1, 1);
bb = elm_bubble_add(win);
-- elm_bubble_label_set(bb, "Message 1");
-- elm_bubble_info_set(bb, "20:47 18/6/2008");
++ elm_object_text_set(bb, "Message 1");
++ elm_object_text_part_set(bb, "info", "20:47 18/6/2008");
elm_bubble_icon_set(bb, ic);
evas_object_smart_callback_add(bb, "clicked", _print_clicked, NULL);
evas_object_show(ic);
av = elm_anchorblock_add(win);
elm_anchorblock_hover_style_set(av, "popout");
elm_anchorblock_hover_parent_set(av, win);
-- elm_anchorblock_text_set(av, "This is a short message. <item relsize=16x16 vsize=full href=emoticon/haha></item>");
- evas_object_smart_callback_add(av, "anchor,clicked",
++ elm_object_text_set(av, "This is a short message. <item relsize=16x16 vsize=full href=emoticon/haha></item>");
+ evas_object_smart_callback_add(av, "anchor,clicked",
my_anchorblock_anchor, av);
elm_bubble_content_set(bb, av);
evas_object_show(av);
av = elm_anchorview_add(win);
elm_anchorview_hover_style_set(av, "popout");
elm_anchorview_hover_parent_set(av, win);
-- elm_anchorview_text_set(av,
++ elm_object_text_set(av,
"This is an entry widget in this window that<br>"
"uses markup <b>like this</> for styling and<br>"
"formatting <em>like this</>, as well as<br>"
rd = elm_radio_add(win);
elm_radio_state_value_set(rd, ELM_BG_OPTION_CENTER);
-- elm_radio_label_set(rd, "Center");
++ elm_object_text_set(rd, "Center");
evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
evas_object_smart_callback_add(rd, "changed", _cb_radio_changed, o_bg);
elm_box_pack_end(hbox, rd);
rd = elm_radio_add(win);
elm_radio_state_value_set(rd, ELM_BG_OPTION_SCALE);
elm_radio_group_add(rd, rdg);
-- elm_radio_label_set(rd, "Scale");
++ elm_object_text_set(rd, "Scale");
evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
evas_object_smart_callback_add(rd, "changed", _cb_radio_changed, o_bg);
elm_box_pack_end(hbox, rd);
rd = elm_radio_add(win);
elm_radio_state_value_set(rd, ELM_BG_OPTION_STRETCH);
elm_radio_group_add(rd, rdg);
-- elm_radio_label_set(rd, "Stretch");
++ elm_object_text_set(rd, "Stretch");
evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
evas_object_smart_callback_add(rd, "changed", _cb_radio_changed, o_bg);
elm_box_pack_end(hbox, rd);
rd = elm_radio_add(win);
elm_radio_state_value_set(rd, ELM_BG_OPTION_TILE);
elm_radio_group_add(rd, rdg);
-- elm_radio_label_set(rd, "Tile");
++ elm_object_text_set(rd, "Tile");
evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
evas_object_smart_callback_add(rd, "changed", _cb_radio_changed, o_bg);
elm_box_pack_end(hbox, rd);
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_HORIZONTAL, 1, 1);
bb = elm_bubble_add(win);
-- elm_bubble_label_set(bb, "Message 1");
-- elm_bubble_info_set(bb, "Corner: bottom_right");
++ elm_object_text_set(bb, "Message 1");
++ elm_object_text_part_set(bb, "info", "Corner: bottom_right");
elm_bubble_icon_set(bb, ic);
elm_bubble_corner_set(bb, "bottom_right");
evas_object_smart_callback_add(bb, "clicked", _print_clicked, NULL);
evas_object_show(bb);
bb = elm_bubble_add(win);
-- elm_bubble_label_set(bb, "Message 2");
-- elm_bubble_info_set(bb, "10:32 4/11/2008");
++ elm_object_text_set(bb, "Message 2");
++ elm_object_text_part_set(bb, "info", "10:32 4/11/2008");
evas_object_smart_callback_add(bb, "clicked", _print_clicked, NULL);
evas_object_size_hint_weight_set(bb, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(bb, EVAS_HINT_FILL, EVAS_HINT_FILL);
--- /dev/null
- elm_fileselector_button_label_set(fs_bt, "Select a dir");
+ #include <Elementary.h>
+ #ifdef HAVE_CONFIG_H
+ # include "elementary_config.h"
+ #endif
+ #include <Eio.h>
+ #include <sys/times.h>
+
+ #ifndef ELM_LIB_QUICKLAUNCH
+
+ static Elm_Genlist_Item_Class it_eio;
+
+ static clock_t st_time;
+ static clock_t en_time;
+ static struct tms st_cpu;
+ static struct tms en_cpu;
+
+ static void _sel_file(void *data, Evas_Object *obj, void *event_info);
+ static Eina_Bool _ls_filter_cb(void *data, Eio_File *handler, const char *file);
+ static void _ls_main_cb(void *data, Eio_File *handler, const char *file);
+ static void _ls_done_cb(void *data, Eio_File *handler);
+ static void _ls_error_cb(void *data, Eio_File *handler, int error);
+ static void _file_chosen(void *data, Evas_Object *obj, void *event_info);
+ static char *_gl_label_get(void *data, Evas_Object *obj, const char *part);
+ static Evas_Object *_gl_icon_get(void *data, Evas_Object *obj, const char *part);
+ static Eina_Bool _gl_state_get(void *data, Evas_Object *obj, const char *part);
+ static void _gl_del(void *data, Evas_Object *obj);
+ static void _test_eio_clear(void *data, Evas_Object *obj, void *event);
+
+ static void
+ _sel_file(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+ {
+ }
+
+ static Eina_Bool
+ _ls_filter_cb(void *data __UNUSED__, Eio_File *handler __UNUSED__, const char *file __UNUSED__)
+ {
+ return EINA_TRUE;
+ }
+
+ static void
+ _ls_main_cb(void *data, Eio_File *handler __UNUSED__, const char *file)
+ {
+ elm_genlist_item_sorted_insert(data,
+ &it_eio,
+ eina_stringshare_add(file),
+ NULL,
+ ELM_GENLIST_ITEM_NONE,
+ (Eina_Compare_Cb) strcmp,
+ _sel_file,
+ NULL);
+ }
+
+ static void
+ _ls_done_cb(void *data __UNUSED__, Eio_File *handler __UNUSED__)
+ {
+ en_time = times(&en_cpu);
+ fprintf(stderr, "ls done\n");
+ fprintf(stderr, "Real Time: %.jd, User Time: %.jd, System Time: %.jd\n",
+ (intmax_t)(en_time - st_time),
+ (intmax_t)(en_cpu.tms_utime - st_cpu.tms_utime),
+ (intmax_t)(en_cpu.tms_stime - st_cpu.tms_stime));
+ }
+
+ static void
+ _ls_error_cb(void *data __UNUSED__, Eio_File *handler __UNUSED__, int error)
+ {
+ fprintf(stderr, "error: [%s]\n", strerror(error));
+ }
+
+ static void
+ _file_chosen(void *data, Evas_Object *obj __UNUSED__, void *event_info)
+ {
+ const char *file = event_info;
+ if (file)
+ {
+ st_time = times(&st_cpu);
+ eio_file_ls(file,
+ _ls_filter_cb,
+ _ls_main_cb,
+ _ls_done_cb,
+ _ls_error_cb,
+ data);
+ }
+ }
+
+ static char *
+ _gl_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
+ {
+ char buf[PATH_MAX];
+ snprintf(buf, sizeof(buf), "Item # %s", (char*)data);
+ return strdup(buf);
+ }
+
+ static Evas_Object *
+ _gl_icon_get(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
+ {
+ return NULL;
+ }
+
+ static Eina_Bool
+ _gl_state_get(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
+ {
+ return EINA_FALSE;
+ }
+
+ static void
+ _gl_del(void *data __UNUSED__, Evas_Object *obj __UNUSED__)
+ {
+ }
+
+ static void
+ _test_eio_clear(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
+ {
+ elm_genlist_clear(data);
+ }
+
+ void
+ test_eio(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+ {
+ Evas_Object *win, *bg, *vbox, *hbox, *ic, *bt, *fs_bt, *gl;
+
+ it_eio.item_style = "default";
+ it_eio.func.label_get = _gl_label_get;
+ it_eio.func.icon_get = _gl_icon_get;
+ it_eio.func.state_get = _gl_state_get;
+ it_eio.func.del = _gl_del;
+
+ win = elm_win_add(NULL, "fileselector-button", ELM_WIN_BASIC);
+ elm_win_title_set(win, "File Selector Button");
+ elm_win_autodel_set(win, 1);
+
+ bg = elm_bg_add(win);
+ elm_win_resize_object_add(win, bg);
+ evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_show(bg);
+
+ vbox = elm_box_add(win);
+ elm_win_resize_object_add(win, vbox);
+ evas_object_size_hint_weight_set(vbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_show(vbox);
+
+ gl = elm_genlist_add(win);
+ evas_object_size_hint_weight_set(gl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_box_pack_end(vbox, gl);
+ evas_object_show(gl);
+
+ /* file selector button */
+ hbox = elm_box_add(win);
+ elm_box_horizontal_set(hbox, EINA_TRUE);
+ ic = elm_icon_add(win);
+ elm_icon_standard_set(ic, "file");
+ evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+ fs_bt = elm_fileselector_button_add(win);
++ elm_object_text_set(fs_bt, "Select a dir");
+ elm_fileselector_button_icon_set(fs_bt, ic);
+ elm_fileselector_button_inwin_mode_set(fs_bt, EINA_TRUE);
+ elm_fileselector_button_folder_only_set(fs_bt, EINA_TRUE);
+
+ elm_box_pack_end(hbox, fs_bt);
+ elm_box_pack_end(vbox, hbox);
+ evas_object_show(fs_bt);
+ evas_object_show(ic);
+
+ /* attribute setting buttons */
+ bt = elm_button_add(win);
+ elm_object_text_set(bt, "clear");
+ evas_object_smart_callback_add(bt, "clicked", _test_eio_clear, gl);
+ elm_box_pack_end(hbox, bt);
+ evas_object_show(bt);
+ evas_object_show(hbox);
+
+ evas_object_smart_callback_add(fs_bt, "file,chosen", _file_chosen, gl);
+
+ evas_object_resize(win, 300, 500);
+ evas_object_show(win);
+ }
+
+ #endif
elm_icon_standard_set(ic, "file");
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
fs_bt = elm_fileselector_button_add(win);
-- elm_fileselector_button_label_set(fs_bt, "Select a file");
++ elm_object_text_set(fs_bt, "Select a file");
elm_fileselector_button_icon_set(fs_bt, ic);
elm_box_pack_end(vbox, fs_bt);
if (!value)
{
elm_icon_standard_set(ic, "folder");
-- elm_fileselector_entry_button_label_set(fs_en, "Select a folder");
++ elm_object_text_set(fs_en, "Select a folder");
}
else
{
elm_icon_standard_set(ic, "file");
-- elm_fileselector_entry_button_label_set(fs_en, "Select a file");
++ elm_object_text_set(fs_en, "Select a file");
}
}
elm_icon_standard_set(ic, "file");
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
fs_en = elm_fileselector_entry_add(win);
-- elm_fileselector_entry_button_label_set(fs_en, "Select a file");
++ elm_object_text_set(fs_en, "Select a file");
elm_fileselector_entry_button_icon_set(fs_en, ic);
evas_object_size_hint_weight_set(fs_en, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(fs_en, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_resize(win, 320, 480);
evas_object_show(win);
}
- elm_radio_label_set(rd, "None");
+
+
+ static void
+ my_fl_go(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+ {
+ Evas_Object *win = data;
+ Evas_Object *fl = evas_object_data_get(win, "fl");
+ elm_flip_go(fl, ELM_FLIP_PAGE_LEFT);
+ }
+
+ static void
+ my_fl_ch(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+ {
+ Evas_Object *win = data;
+ Evas_Object *fl = evas_object_data_get(win, "fl");
+ Evas_Object *rdg = evas_object_data_get(win, "rdg");
+ elm_flip_interaction_set(fl, elm_radio_value_get(rdg));
+ }
+
+ void
+ test_flip4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+ {
+ Evas_Object *win, *bg, *bx, *fl, *im, *li, *bt, *rd, *rdg;
+ char buf[PATH_MAX];
+
+ win = elm_win_add(NULL, "flip4", ELM_WIN_BASIC);
+ elm_win_title_set(win, "Flip Interactive");
+ elm_win_autodel_set(win, 1);
+
+ bg = elm_bg_add(win);
+ elm_win_resize_object_add(win, bg);
+ evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_show(bg);
+
+ bx = elm_box_add(win);
+ evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(win, bx);
+ evas_object_show(bx);
+
+ fl = elm_flip_add(win);
+ evas_object_size_hint_align_set(fl, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(fl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_box_pack_end(bx, fl);
+ evas_object_data_set(win, "fl", fl);
+
+ elm_flip_interaction_set(fl, ELM_FLIP_INTERACTION_NONE);
+ elm_flip_interacton_direction_enabled_set(fl, ELM_FLIP_DIRECTION_UP, EINA_TRUE);
+ elm_flip_interacton_direction_enabled_set(fl, ELM_FLIP_DIRECTION_DOWN, EINA_TRUE);
+ elm_flip_interacton_direction_enabled_set(fl, ELM_FLIP_DIRECTION_LEFT, EINA_TRUE);
+ elm_flip_interacton_direction_enabled_set(fl, ELM_FLIP_DIRECTION_RIGHT, EINA_TRUE);
+ elm_flip_interacton_direction_hitsize_set(fl, ELM_FLIP_DIRECTION_UP, 0.25);
+ elm_flip_interacton_direction_hitsize_set(fl, ELM_FLIP_DIRECTION_DOWN, 0.25);
+ elm_flip_interacton_direction_hitsize_set(fl, ELM_FLIP_DIRECTION_LEFT, 0.25);
+ elm_flip_interacton_direction_hitsize_set(fl, ELM_FLIP_DIRECTION_RIGHT, 0.25);
+ evas_object_show(fl);
+
+ im = evas_object_image_filled_add(evas_object_evas_get(win));
+ evas_object_size_hint_weight_set(im, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ snprintf(buf, sizeof(buf), "%s/images/%s",
+ PACKAGE_DATA_DIR, "twofish.jpg");
+ evas_object_image_file_set(im, buf, NULL);
+ elm_flip_content_front_set(fl, im);
+ evas_object_show(im);
+
+ #if 0
+ im = evas_object_image_filled_add(evas_object_evas_get(win));
+ evas_object_size_hint_weight_set(im, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ snprintf(buf, sizeof(buf), "%s/images/%s",
+ PACKAGE_DATA_DIR, "sky_04.jpg");
+ evas_object_image_file_set(im, buf, NULL);
+ elm_flip_content_back_set(fl, im);
+ evas_object_show(im);
+ #else
+ li = elm_list_add(win);
+ evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_list_item_append(li, "Item 0", NULL, NULL, NULL, NULL);
+ elm_list_item_append(li, "Item 1", NULL, NULL, NULL, NULL);
+ elm_list_item_append(li, "Item 2", NULL, NULL, NULL, NULL);
+ elm_list_item_append(li, "Item 3 (Which is very long just for testing purposes)", NULL, NULL, NULL, NULL);
+ elm_list_go(li);
+ elm_flip_content_back_set(fl, li);
+ evas_object_show(li);
+ #endif
+
+ rd = elm_radio_add(win);
+ evas_object_size_hint_align_set(rd, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, 0.0);
+ elm_radio_state_value_set(rd, ELM_FLIP_INTERACTION_NONE);
- elm_radio_label_set(rd, "Rotate");
++ elm_object_text_set(rd, "None");
+ elm_box_pack_end(bx, rd);
+ evas_object_show(rd);
+ evas_object_smart_callback_add(rd, "changed", my_fl_ch, win);
+ rdg = rd;
+ evas_object_data_set(win, "rdg", rdg);
+
+ rd = elm_radio_add(win);
+ evas_object_size_hint_align_set(rd, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, 0.0);
+ elm_radio_state_value_set(rd, ELM_FLIP_INTERACTION_ROTATE);
- elm_radio_label_set(rd, "Cube");
++ elm_object_text_set(rd, "Rotate");
+ elm_radio_group_add(rd, rdg);
+ elm_box_pack_end(bx, rd);
+ evas_object_show(rd);
+ evas_object_smart_callback_add(rd, "changed", my_fl_ch, win);
+
+ rd = elm_radio_add(win);
+ evas_object_size_hint_align_set(rd, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, 0.0);
+ elm_radio_state_value_set(rd, ELM_FLIP_INTERACTION_CUBE);
- elm_radio_label_set(rd, "Page");
++ elm_object_text_set(rd, "Cube");
+ elm_radio_group_add(rd, rdg);
+ elm_box_pack_end(bx, rd);
+ evas_object_show(rd);
+ evas_object_smart_callback_add(rd, "changed", my_fl_ch, win);
+
+ rd = elm_radio_add(win);
+ evas_object_size_hint_align_set(rd, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, 0.0);
+ elm_radio_state_value_set(rd, ELM_FLIP_INTERACTION_PAGE);
++ elm_object_text_set(rd, "Page");
+ elm_radio_group_add(rd, rdg);
+ elm_box_pack_end(bx, rd);
+ evas_object_show(rd);
+ evas_object_smart_callback_add(rd, "changed", my_fl_ch, win);
+
+ bt = elm_button_add(win);
+ elm_object_text_set(bt, "Go");
+ evas_object_smart_callback_add(bt, "clicked", my_fl_go, win);
+ evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
+ elm_box_pack_end(bx, bt);
+ evas_object_show(bt);
+
+ evas_object_resize(win, 320, 480);
+ evas_object_show(win);
+ }
#endif
{
Evas_Object *fr = elm_bubble_add(win);
-- elm_bubble_label_set(fr, "Bubble");
++ elm_object_text_set(fr, "Bubble");
evas_object_size_hint_weight_set(fr, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(fr, EVAS_HINT_FILL,
EVAS_HINT_FILL);
evas_object_resize(win, 480, 800);
evas_object_show(win);
}
- elm_radio_label_set(rd, "Slide ");
+
+ /*************/
+
+ static Elm_Genlist_Item_Class itc10;
+ static char *mode_type[] = { "slide", "rotate" };
+ char *gl10_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part)
+ {
+ char buf[256];
+ if (!strcmp(part, "elm.text.mode"))
+ snprintf(buf, sizeof(buf), "Mode # %i", (int)(long)data);
+ else
+ snprintf(buf, sizeof(buf), "Item # %i", (int)(long)data);
+ return strdup(buf);
+ }
+
+ Evas_Object *gl10_icon_get(void *data __UNUSED__, Evas_Object *obj, const char *part)
+ {
+ char buf[PATH_MAX];
+ Evas_Object *ic = elm_icon_add(obj);
+ if (!strcmp(part, "elm.swallow.end"))
+ snprintf(buf, sizeof(buf), "%s/images/bubble.png", PACKAGE_DATA_DIR);
+ else
+ snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
+ elm_icon_file_set(ic, buf, NULL);
+ evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+ return ic;
+ }
+ static void
+ _gl_sel10(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+ {
+ if (!data) return;
+ int v = elm_radio_value_get(data);
+ if (v == 1)
+ elm_genlist_item_mode_set(event_info, mode_type[v], EINA_TRUE);
+ }
+
+ static void
+ _my_gl_mode_right(void *data, Evas_Object *obj __UNUSED__, void *event_info)
+ {
+ if (!data) return;
+ int v = elm_radio_value_get(data);
+ if (v == 0)
+ elm_genlist_item_mode_set(event_info, mode_type[v], EINA_TRUE);
+ }
+
+ static void
+ _my_gl_mode_left(void *data, Evas_Object *obj __UNUSED__, void *event_info)
+ {
+ if (!data) return;
+ int v = elm_radio_value_get(data);
+ if (v == 0)
+ elm_genlist_item_mode_set(event_info, mode_type[v], EINA_FALSE);
+ }
+
+ static void
+ _my_gl_mode_cancel(void *data, Evas_Object *obj, void *event_info __UNUSED__)
+ {
+ fprintf(stderr, "drag\n");
+ if (!data) return;
+ int v = elm_radio_value_get(data);
+ Elm_Genlist_Item *it = (Elm_Genlist_Item *)elm_genlist_mode_item_get(obj);
+ if (it)
+ elm_genlist_item_mode_set(it, mode_type[v], EINA_FALSE);
+ }
+
+ void
+ test_genlist10(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+ {
+ Evas_Object *win, *bg, *fr, *lb, *bx, *bx2, *bx3, *rd, *rdg, *gl;
+ int i;
+
+ win = elm_win_add(NULL, "genlist10", ELM_WIN_BASIC);
+ elm_win_title_set(win, "Genlist Mode");
+ elm_win_autodel_set(win, 1);
+
+ bg = elm_bg_add(win);
+ elm_win_resize_object_add(win, bg);
+ evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_show(bg);
+
+ bx = elm_box_add(win);
+ evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(win, bx);
+ evas_object_show(bx);
+
+ fr = elm_frame_add(win);
+ elm_object_text_set(fr, "Mode Type");
+ elm_box_pack_end(bx, fr);
+ evas_object_show(fr);
+
+ bx2 = elm_box_add(win);
+ elm_frame_content_set(fr, bx2);
+ evas_object_show(bx2);
+
+ lb = elm_label_add(win);
+ elm_object_text_set(lb,
+ "Sweep genlist items to the right.<br>"
+ "Test this by changing Mode Type to Slide or Rotate.");
+ elm_box_pack_end(bx2, lb);
+ evas_object_show(lb);
+
+ bx3 = elm_box_add(win);
+ elm_box_horizontal_set(bx3, EINA_TRUE);
+ elm_box_pack_end(bx2, bx3);
+ evas_object_show(bx3);
+
+ rd = elm_radio_add(win);
+ evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_radio_state_value_set(rd, 0);
- elm_radio_label_set(rd, "Rotate");
++ elm_object_text_set(rd, "Slide ");
+ evas_object_show(rd);
+ elm_box_pack_end(bx3, rd);
+ rdg = rd;
+
+ rd = elm_radio_add(win);
+ evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_radio_state_value_set(rd, 1);
++ elm_object_text_set(rd, "Rotate");
+ elm_radio_group_add(rd, rdg);
+ evas_object_show(rd);
+ elm_box_pack_end(bx3, rd);
+
+ gl = elm_genlist_add(win);
+ evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(gl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_smart_callback_add(gl, "drag,start,right", _my_gl_mode_right, rdg);
+ evas_object_smart_callback_add(gl, "drag,start,left", _my_gl_mode_left, rdg);
+ evas_object_smart_callback_add(gl, "drag,start,up", _my_gl_mode_cancel, rdg);
+ evas_object_smart_callback_add(gl, "drag,start,down", _my_gl_mode_cancel, rdg);
+ evas_object_show(gl);
+
+ itc10.item_style = "default";
+ itc10.func.label_get = gl10_label_get;
+ itc10.func.icon_get = gl10_icon_get;
+ itc10.func.state_get = gl_state_get;
+ itc10.func.del = gl_del;
+ itc10.mode_item_style = "mode";
+
+ for (i = 0; i < 50; i++)
+ elm_genlist_item_append(gl,
+ &itc10,
+ (void *)(1000 + i)/* item data */,
+ NULL/* parent */,
+ ELM_GENLIST_ITEM_NONE/* flags */,
+ _gl_sel10/* func */,
+ rdg/* func data */);
+
+ elm_box_pack_end(bx, gl);
+
+ evas_object_resize(win, 520, 520);
+ evas_object_show(win);
+ }
+
+ /*************/
+
+ static void
+ _reorder_tg_changed_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__)
+ {
+ elm_genlist_reorder_mode_set(data, elm_toggle_state_get(obj));
+ }
+
+ /**
+ * gl_moved is called after an item was reordered.
+ * This is only called when reorder mode is enabled.
+ *
+ * @param obj : the genlist object.
+ * @param item : the moved item.
+ * @param rel_item : the relative item.
+ * @param move_after : whether or not the rel_item is after item.
+ *
+ * If the move_after is true,
+ * the item(*item) had been moved after the given relative item(*rel_item) in list.
+ * If the move_after is false,
+ * the item(*item) had been moved before the given relative item(*rel_item) in list.
+ *
+ */
+ static void gl_moved(Evas_Object *obj __UNUSED__, Elm_Genlist_Item *item __UNUSED__, Elm_Genlist_Item *rel_item __UNUSED__, Eina_Bool move_after __UNUSED__)
+ {
+ // if needed, add application logic.
+ }
+
+ void
+ test_genlist11(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+ {
+ Evas_Object *win, *bg, *fr, *lb, *bx, *tg, *gl;
+ int i;
+
+ win = elm_win_add(NULL, "genlist-reorder-mode", ELM_WIN_BASIC);
+ elm_win_title_set(win, "Genlist Reorder Mode");
+ elm_win_autodel_set(win, 1);
+
+ bg = elm_bg_add(win);
+ elm_win_resize_object_add(win, bg);
+ evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_show(bg);
+
+ bx = elm_box_add(win);
+ evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(win, bx);
+ evas_object_show(bx);
+
+ fr = elm_frame_add(win);
+
+ elm_object_text_set(fr, "Reorder Mode");
+ elm_box_pack_end(bx, fr);
+ evas_object_show(fr);
+
+ lb = elm_label_add(win);
+ elm_object_text_set(lb,
+ "Enable reorder mode if you want to move item.<br>"
+ "Then long press and drag item.");
+ elm_frame_content_set(fr, lb);
+ evas_object_show(lb);
+
+ gl = elm_genlist_add(win);
+ evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(gl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_show(gl);
+
+ tg = elm_toggle_add(win);
+ elm_object_text_set(tg, "Reorder Mode:");
+ elm_toggle_state_set(tg, elm_mirrored_get());
+ evas_object_smart_callback_add(tg, "changed", _reorder_tg_changed_cb, gl);
+ elm_box_pack_end(bx, tg);
+ evas_object_show(tg);
+
+ itc1.item_style = "default";
+ itc1.func.label_get = gl_label_get;
+ itc1.func.icon_get = gl_icon_get;
+ itc1.func.state_get = gl_state_get;
+ itc1.func.del = gl_del;
+ itc1.func.moved = gl_moved;
+
+ for (i = 0; i < 50; i++)
+ elm_genlist_item_append(gl,
+ &itc1,
+ (void *)(1 + i)/* item data */,
+ NULL/* parent */,
+ ELM_GENLIST_ITEM_NONE/* flags */,
+ NULL/* func */,
+ NULL/* func data */);
+
+ elm_box_pack_end(bx, gl);
+
+ evas_object_resize(win, 400, 500);
+ evas_object_show(win);
+ }
#endif
for (i = 0; i < (sizeof(styles) / sizeof(struct style_tuple)); i++)
{
rd = elm_radio_add(win);
-- elm_radio_label_set(rd, styles[i].label);
++ elm_object_text_set(rd, styles[i].label);
elm_radio_state_value_set(rd, i);
if (rdg)
elm_radio_group_add(rd, rdg);
evas_object_show(bt);
bt = elm_fileselector_button_add(win);
-- elm_fileselector_button_label_set(bt, "Select Photo");
++ elm_object_text_set(bt, "Select Photo");
evas_object_smart_callback_add(bt, "file,chosen", my_bt_open, ph);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bt, 0.5, 0.1);
evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5);
elm_box_pack_end(bx, pb);
// elm_progressbar_horizontal_set(pb, EINA_TRUE);
--// elm_progressbar_label_set(pb, "Progression %");
++// elm_object_text_set(pb, "Progression %");
// elm_progressbar_unit_format_set(pb, NULL);
evas_object_show(pb);
_test_progressbar.pb1 = pb;
pb = elm_progressbar_add(win);
evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5);
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-- elm_progressbar_label_set(pb, "Infinite bounce");
++ elm_object_text_set(pb, "Infinite bounce");
elm_progressbar_pulse_set(pb, EINA_TRUE);
elm_box_pack_end(bx, pb);
evas_object_show(pb);
evas_object_size_hint_aspect_set(ic1, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
pb = elm_progressbar_add(win);
-- elm_progressbar_label_set(pb, "Label");
++ elm_object_text_set(pb, "Label");
elm_progressbar_icon_set(pb, ic1);
elm_progressbar_inverted_set(pb, 1);
elm_progressbar_unit_format_set(pb, "%1.1f units");
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_pack_end(hbx, pb);
elm_progressbar_span_size_set(pb, 60);
-- elm_progressbar_label_set(pb, "percent");
++ elm_object_text_set(pb, "percent");
evas_object_show(pb);
_test_progressbar.pb4 = pb;
elm_progressbar_span_size_set(pb, 80);
elm_progressbar_pulse_set(pb, EINA_TRUE);
elm_progressbar_unit_format_set(pb, NULL);
-- elm_progressbar_label_set(pb, "Infinite bounce");
++ elm_object_text_set(pb, "Infinite bounce");
elm_box_pack_end(hbx, pb);
evas_object_show(pb);
_test_progressbar.pb5 = pb;
pb = elm_progressbar_add(win);
elm_progressbar_horizontal_set(pb, EINA_FALSE);
-- elm_progressbar_label_set(pb, "Label");
++ elm_object_text_set(pb, "Label");
elm_progressbar_icon_set(pb, ic2);
elm_progressbar_inverted_set(pb, 1);
elm_progressbar_unit_format_set(pb, "%1.2f%%");
pb = elm_progressbar_add(win);
elm_object_style_set(pb, "wheel");
-- elm_progressbar_label_set(pb, "Style: wheel");
++ elm_object_text_set(pb, "Style: wheel");
evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5);
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_pack_end(bx, pb);
elm_radio_state_value_set(rd, 0);
evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(rd, EVAS_HINT_FILL, 0.5);
-- elm_radio_label_set(rd, "Icon sized to radio");
++ elm_object_text_set(rd, "Icon sized to radio");
elm_radio_icon_set(rd, ic);
elm_box_pack_end(bx, rd);
evas_object_show(rd);
rd = elm_radio_add(win);
elm_radio_state_value_set(rd, 1);
elm_radio_group_add(rd, rdg);
-- elm_radio_label_set(rd, "Icon no scale");
++ elm_object_text_set(rd, "Icon no scale");
elm_radio_icon_set(rd, ic);
elm_box_pack_end(bx, rd);
evas_object_show(rd);
rd = elm_radio_add(win);
elm_radio_state_value_set(rd, 2);
elm_radio_group_add(rd, rdg);
-- elm_radio_label_set(rd, "Label Only");
++ elm_object_text_set(rd, "Label Only");
elm_box_pack_end(bx, rd);
evas_object_show(rd);
rd = elm_radio_add(win);
elm_radio_state_value_set(rd, 3);
elm_radio_group_add(rd, rdg);
-- elm_radio_label_set(rd, "Disabled");
++ elm_object_text_set(rd, "Disabled");
elm_object_disabled_set(rd, 1);
elm_box_pack_end(bx, rd);
evas_object_show(rd);
--- /dev/null
- elm_bubble_label_set(bb, "Message 3");
- elm_bubble_info_set(bb, "10:32 4/11/2008");
+ #include <Elementary.h>
+ #ifdef HAVE_CONFIG_H
+ # include "elementary_config.h"
+ #endif
+ #ifndef ELM_LIB_QUICKLAUNCH
+
+ static void
+ fill(Evas_Object *win, Eina_Bool do_bg)
+ {
+ Evas_Object *bg, *sc, *bx, *ic, *bb, *av, *en;
+ char buf[PATH_MAX];
+
+ if (do_bg)
+ {
+ bg = elm_bg_add(win);
+ elm_win_resize_object_add(win, bg);
+ evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_show(bg);
+ }
+
+ sc = elm_scroller_add(win);
+ evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(win, sc);
+
+ bx = elm_box_add(win);
+ evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+ en = elm_entry_add(win);
+ elm_entry_scrollable_set(en, EINA_TRUE);
+ evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(en, EVAS_HINT_FILL, 0.5);
+ elm_entry_entry_set(en, "This is a single line");
+ elm_entry_scrollbar_policy_set(en, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
+ elm_entry_single_line_set(en, 1);
+ evas_object_show(en);
+ elm_box_pack_end(bx, en);
+
+ en = elm_entry_add(win);
+ elm_entry_scrollable_set(en, EINA_TRUE);
+ evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(en, EVAS_HINT_FILL, 0.5);
+ elm_entry_entry_set(en, "Entry 2");
+ elm_entry_scrollbar_policy_set(en, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
+ elm_entry_single_line_set(en, 1);
+ evas_object_show(en);
+ elm_box_pack_end(bx, en);
+
+ ic = elm_icon_add(win);
+ snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
+ elm_icon_file_set(ic, buf, NULL);
+ elm_icon_scale_set(ic, 0, 0);
+ evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_HORIZONTAL, 1, 1);
+
+ bb = elm_bubble_add(win);
- elm_anchorblock_text_set(av,
++ elm_object_text_set(bb, "Message 3");
++ elm_object_text_part_set(bb, "info", "10:32 4/11/2008");
+ elm_bubble_icon_set(bb, ic);
+ evas_object_show(ic);
+ evas_object_size_hint_weight_set(bb, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(bb, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ av = elm_anchorblock_add(win);
+ elm_anchorblock_hover_style_set(av, "popout");
+ elm_anchorblock_hover_parent_set(av, win);
- elm_bubble_label_set(bb, "Message 2");
- elm_bubble_info_set(bb, "7:16 27/10/2008");
++ elm_object_text_set(av,
+ "Hi there. This is the most recent message in the "
+ "list of messages. It has one <a href=tel:+614321234>+61 432 1234</a> "
+ "(phone number) to click on.");
+ elm_bubble_content_set(bb, av);
+ evas_object_show(av);
+ elm_box_pack_end(bx, bb);
+ evas_object_show(bb);
+
+ ic = elm_icon_add(win);
+ snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
+ elm_icon_file_set(ic, buf, NULL);
+ evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+
+ bb = elm_bubble_add(win);
- elm_anchorblock_text_set(av,
++ elm_object_text_set(bb, "Message 2");
++ elm_object_text_part_set(bb, "info", "7:16 27/10/2008");
+ elm_bubble_icon_set(bb, ic);
+ evas_object_show(ic);
+ evas_object_size_hint_weight_set(bb, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(bb, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ av = elm_anchorblock_add(win);
+ elm_anchorblock_hover_style_set(av, "popout");
+ elm_anchorblock_hover_parent_set(av, win);
- elm_bubble_label_set(bb, "Message 1");
- elm_bubble_info_set(bb, "20:47 18/6/2008");
++ elm_object_text_set(av,
+ "Hey what are you doing? This is the second last message "
+ "Hi there. This is the most recent message in the "
+ "list. It's a longer one so it can wrap more and "
+ "contains a <a href=contact:john>John</a> contact "
+ "link in it to test popups on links. The idea is that "
+ "all SMS's are scanned for things that look like phone "
+ "numbers or names that are in your contacts list, and "
+ "if they are, they become clickable links that pop up "
+ "a menus of obvious actions to perform on this piece "
+ "of information. This of course can be later explicitly "
+ "done by links maybe running local apps or even being "
+ "web URL's too that launch the web browser and point it "
+ "to that URL. <item relsize=16x16 vsize=full href=emoticon/omg></item>");
+ elm_bubble_content_set(bb, av);
+ evas_object_show(av);
+ elm_box_pack_end(bx, bb);
+ evas_object_show(bb);
+
+ ic = elm_icon_add(win);
+ snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
+ elm_icon_file_set(ic, buf, NULL);
+ elm_icon_scale_set(ic, 0, 0);
+ evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_HORIZONTAL, 1, 1);
+
+ bb = elm_bubble_add(win);
- elm_anchorblock_text_set(av, "This is a short message. <item relsize=16x16 vsize=full href=emoticon/haha></item>");
++ elm_object_text_set(bb, "Message 1");
++ elm_object_text_part_set(bb, "info", "20:47 18/6/2008");
+ elm_bubble_icon_set(bb, ic);
+ evas_object_show(ic);
+ evas_object_size_hint_weight_set(bb, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(bb, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+ av = elm_anchorblock_add(win);
+ elm_anchorblock_hover_style_set(av, "popout");
+ elm_anchorblock_hover_parent_set(av, win);
++ elm_object_text_set(av, "This is a short message. <item relsize=16x16 vsize=full href=emoticon/haha></item>");
+ elm_bubble_content_set(bb, av);
+ evas_object_show(av);
+ elm_box_pack_end(bx, bb);
+ evas_object_show(bb);
+
+ elm_scroller_content_set(sc, bx);
+ evas_object_show(bx);
+
+ evas_object_show(sc);
+ }
+
+ static void
+ cb_mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_info)
+ {
+ Evas_Event_Mouse_Move *ev = event_info;
+ Evas_Object *orig = data;
+ Evas_Coord x, y;
+ Evas_Map *p;
+ int i, w, h;
+
+ if (!ev->buttons) return;
+ evas_object_geometry_get(obj, &x, &y, NULL, NULL);
+ evas_object_move(obj,
+ x + (ev->cur.canvas.x - ev->prev.output.x),
+ y + (ev->cur.canvas.y - ev->prev.output.y));
+ evas_object_image_size_get(orig, &w, &h);
+ p = evas_map_new(4);
+ evas_object_map_enable_set(orig, EINA_TRUE);
+ evas_object_raise(orig);
+ for (i = 0; i < 4; i++)
+ {
+ Evas_Object *hand;
+ char key[32];
+
+ snprintf(key, sizeof(key), "h-%i\n", i);
+ hand = evas_object_data_get(orig, key);
+ evas_object_raise(hand);
+ evas_object_geometry_get(hand, &x, &y, NULL, NULL);
+ x += 15;
+ y += 15;
+ evas_map_point_coord_set(p, i, x, y, 0);
+ if (i == 0) evas_map_point_image_uv_set(p, i, 0, 0);
+ else if (i == 1) evas_map_point_image_uv_set(p, i, w, 0);
+ else if (i == 2) evas_map_point_image_uv_set(p, i, w, h);
+ else if (i == 3) evas_map_point_image_uv_set(p, i, 0, h);
+ }
+ evas_object_map_set(orig, p);
+ evas_map_free(p);
+ }
+
+ static void
+ create_handles(Evas_Object *obj)
+ {
+ int i;
+ Evas_Coord x, y, w, h;
+
+ evas_object_geometry_get(obj, &x, &y, &w, &h);
+ for (i = 0; i < 4; i++)
+ {
+ Evas_Object *hand;
+ char buf[PATH_MAX];
+ char key[32];
+
+ hand = evas_object_image_filled_add(evas_object_evas_get(obj));
+ evas_object_resize(hand, 31, 31);
+ snprintf(buf, sizeof(buf), "%s/images/pt.png", PACKAGE_DATA_DIR);
+ evas_object_image_file_set(hand, buf, NULL);
+ if (i == 0) evas_object_move(hand, x - 15, y - 15);
+ else if (i == 1) evas_object_move(hand, x + w - 15, y - 15);
+ else if (i == 2) evas_object_move(hand, x + w - 15, y + h - 15);
+ else if (i == 3) evas_object_move(hand, x - 15, y + h - 15);
+ evas_object_event_callback_add(hand, EVAS_CALLBACK_MOUSE_MOVE, cb_mouse_move, obj);
+ evas_object_show(hand);
+ snprintf(key, sizeof(key), "h-%i\n", i);
+ evas_object_data_set(obj, key, hand);
+ }
+ }
+
+ void
+ test_win_inline(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+ {
+ Evas_Object *win, *bg, *win2, *win3;
+ char buf[PATH_MAX];
+
+ win = elm_win_add(NULL, "window-inline", ELM_WIN_BASIC);
+ elm_win_title_set(win, "Window Inline");
+ elm_win_autodel_set(win, 1);
+
+ bg = elm_bg_add(win);
+ snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", PACKAGE_DATA_DIR);
+ elm_bg_file_set(bg, buf, NULL);
+ elm_win_resize_object_add(win, bg);
+ evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_show(bg);
+
+ win2 = elm_win_add(win, "inlined", ELM_WIN_INLINED_IMAGE);
+ fill(win2, EINA_TRUE);
+
+ evas_object_move(win2, 20, 60);
+ evas_object_resize(win2, 300, 200);
+ // image object for win2 is unlinked to its pos/size - so manual control
+ // this allows also for using map and other things with it.
+ evas_object_move(elm_win_inlined_image_object_get(win2), 20, 40);
+ evas_object_resize(elm_win_inlined_image_object_get(win2), 200, 320);
+ evas_object_show(win2);
+
+ win3 = elm_win_add(win, "inlined", ELM_WIN_INLINED_IMAGE);
+ elm_win_alpha_set(win3, EINA_TRUE);
+ fill(win3, EINA_FALSE);
+
+ evas_object_resize(win3, 300, 200);
+ evas_object_move(elm_win_inlined_image_object_get(win3), 80, 180);
+ evas_object_resize(elm_win_inlined_image_object_get(win3), 300, 200);
+ evas_object_show(win3);
+
+ create_handles(elm_win_inlined_image_object_get(win3));
+
+ evas_object_resize(win, 400, 600);
+ evas_object_show(win);
+ }
+ #endif
elm_button.c \
elm_check.c \
elm_clock.c \
-elm_fileselector_button.c \
+elm_colorpalette.c\
+elm_calendar.c \
+elm_datefield.c \
elm_fileselector.c \
+elm_fileselector_button.c \
elm_fileselector_entry.c \
- elm_genlist.c \
elm_gengrid.c \
+ elm_genlist.c \
elm_hoversel.c \
+ elm_icon.c \
+ elm_index.c \
+ elm_label.c \
elm_list.c \
elm_map.c \
+elm_multibuttonentry.c \
++elm_navigationbar.c \
++elm_navigationbar_ex.c \
+elm_nocontents.c \
+ elm_notify.c \
+elm_page_control.c \
++elm_pager.c \
+ elm_panes.c \
elm_photocam.c \
elm_progressbar.c \
elm_radio.c \
- elm_scrolled_entry.c \
+ elm_scroller.c \
+elm_searchbar.c \
+ elm_segment_control.c \
elm_slider.c \
elm_slideshow.c \
elm_spinner.c \
typedef struct _Elm_Params_Gengrid
{
- Eina_Bool item_size_x_exists;
- int item_size_x;
- Eina_Bool item_size_y_exists;
- int item_size_y;
+ Elm_Params base;
+ Eina_Bool multi : 1;
+ Eina_Bool multi_exists : 1;
+ Eina_Bool no_select : 1;
+ Eina_Bool no_select_exists : 1;
+ Eina_Bool always_select : 1;
+ Eina_Bool always_select_exists : 1;
+ Eina_Bool h_bounce:1;
+ Eina_Bool h_bounce_exists:1;
+ Eina_Bool v_bounce:1;
+ Eina_Bool v_bounce_exists:1;
+ double h_pagerel;
+ Eina_Bool h_pagerel_exists : 1;
+ double v_pagerel;
+ Eina_Bool v_pagerel_exists : 1;
+ int h_itemsize;
+ Eina_Bool h_itemsize_exists : 1;
+ int v_itemsize;
+ Eina_Bool v_itemsize_exists : 1;
+ Eina_Bool horizontal : 1;
+ Eina_Bool horizontal_exists : 1;
+ Eina_Bool align_x_exists;
+ double align_x;
+ Eina_Bool align_y_exists;
+ double align_y;
- Eina_Bool always_select_exists;
- Eina_Bool always_select : 1;
- Eina_Bool no_select_exists;
- Eina_Bool no_select;
- Eina_Bool multi_select_exists;
- Eina_Bool multi_select : 1;
- Eina_Bool h_bounce_exists;
- Eina_Bool h_bounce : 1;
- Eina_Bool v_bounce_exists;
- Eina_Bool v_bounce : 1;
- Eina_Bool horizontal_exists;
- Eina_Bool horizontal;
} Elm_Params_Gengrid;
- static Eina_Bool horizontal_bk;
-
static void
external_gengrid_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
{
else if (from_params) p = from_params;
else return;
- if (p->item_size_x_exists && p->item_size_y_exists)
- elm_gengrid_item_size_set(obj, p->item_size_x, p->item_size_y);
- else if (p->item_size_x_exists || p->item_size_y_exists)
- {
- Evas_Coord w, h;
- elm_gengrid_item_size_get(obj, &w, &h);
- if (p->item_size_x_exists)
- elm_gengrid_item_size_set(obj, p->item_size_x, h);
- else
- elm_gengrid_item_size_set(obj, w, p->item_size_y);
+ if (p->multi_exists)
+ elm_gengrid_multi_select_set(obj, p->multi);
+ if (p->no_select_exists)
+ elm_gengrid_no_select_mode_set (obj, p->no_select);
+ if (p->always_select_exists)
+ elm_gengrid_always_select_mode_set (obj, p->always_select);
+ if (p->h_bounce_exists)
+ {
+ Eina_Bool h_bounce, v_bounce;
+ elm_gengrid_bounce_get(obj, &h_bounce, &v_bounce);
+ elm_gengrid_bounce_set(obj, p->h_bounce, v_bounce);
+ }
+ if (p->v_bounce_exists)
+ {
+ Eina_Bool h_bounce, v_bounce;
+ elm_gengrid_bounce_get(obj, &h_bounce, &v_bounce);
+ elm_gengrid_bounce_set(obj, h_bounce, p->v_bounce);
+ }
+ if (p->h_pagerel_exists)
+ {
+ double h_pagerel, v_pagerel;
+ elm_gengrid_page_relative_get(obj, &h_pagerel, &v_pagerel);
+ elm_gengrid_page_relative_set(obj, h_pagerel, p->v_pagerel);
+ }
+ if (p->v_pagerel_exists)
+ {
+ double h_pagerel, v_pagerel;
+ elm_gengrid_page_relative_get(obj, &h_pagerel, &v_pagerel);
+ elm_gengrid_page_relative_set(obj, p->h_pagerel, v_pagerel);
}
- if (p->align_x_exists && p->align_y_exists)
+ if (p->h_itemsize_exists)
+ {
+ int h_itemsize, v_itemsize;
+ elm_gengrid_item_size_get(obj, &h_itemsize, &v_itemsize);
+ elm_gengrid_item_size_set(obj, h_itemsize, p->v_itemsize);
+ }
+ if (p->v_itemsize_exists)
+ {
+ int h_itemsize, v_itemsize;
+ elm_gengrid_item_size_get(obj, &h_itemsize, &v_itemsize);
+ elm_gengrid_item_size_set(obj, p->h_itemsize, v_itemsize);
++ else if (p->align_x_exists && p->align_y_exists)
+ elm_gengrid_align_set(obj, p->align_x, p->align_y);
+ else if (p->align_x_exists || p->align_y_exists)
+ {
+ double x, y;
+ elm_gengrid_align_get(obj, &x, &y);
+ if (p->align_x_exists)
+ elm_gengrid_align_set(obj, p->align_x, y);
+ else
+ elm_gengrid_align_set(obj, x, p->align_y);
}
- if (p->always_select_exists)
- elm_gengrid_always_select_mode_set(obj, p->always_select);
- if (p->no_select_exists)
- elm_gengrid_no_select_mode_set(obj, p->no_select);
- if (p->multi_select_exists)
- elm_gengrid_multi_select_set(obj, p->multi_select);
- if (p->h_bounce_exists && p->v_bounce_exists)
- elm_gengrid_bounce_set(obj, p->h_bounce, p->v_bounce);
- else if (p->h_bounce_exists || p->v_bounce_exists)
- {
- Eina_Bool h, v;
- elm_gengrid_bounce_get(obj, &h, &v);
- if (p->h_bounce_exists)
- elm_gengrid_bounce_set(obj, p->h_bounce, v);
- else
- elm_gengrid_bounce_set(obj, h, p->v_bounce);
- }
if (p->horizontal_exists)
{
elm_gengrid_horizontal_set(obj, p->horizontal);
static Eina_Bool
external_gengrid_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
{
- if (!strcmp(param->name, "item size x")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ if (!strcmp(param->name, "multi select"))
{
- Evas_Coord w, h;
- elm_gengrid_item_size_get(obj, &w, &h);
- elm_gengrid_item_size_set(obj, param->i, h);
- return EINA_TRUE;
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_gengrid_multi_select_set(obj, param->i);
+ return EINA_TRUE;
+ }
}
- else if (!strcmp(param->name, "item size y")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ else if (!strcmp(param->name, "no selected"))
{
- Evas_Coord w, h;
- elm_gengrid_item_size_get(obj, &w, &h);
- elm_gengrid_item_size_set(obj, w, param->i);
- return EINA_TRUE;
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_gengrid_no_select_mode_set(obj, param->i);
+ return EINA_TRUE;
+ }
}
- else if (!strcmp(param->name, "align x")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ else if (!strcmp(param->name, "always select"))
{
- double x, y;
- elm_gengrid_align_get(obj, &x, &y);
- elm_gengrid_align_set(obj, param->d, y);
- return EINA_TRUE;
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_gengrid_always_select_mode_set(obj, param->i);
+ return EINA_TRUE;
+ }
}
- else if (!strcmp(param->name, "align y")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ else if (!strcmp(param->name, "height bounce"))
{
- double x, y;
- elm_gengrid_align_get(obj, &x, &y);
- elm_gengrid_align_set(obj, x, param->d);
- return EINA_TRUE;
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ Eina_Bool h_bounce, v_bounce;
+ elm_gengrid_bounce_get(obj, &h_bounce, &v_bounce);
+ elm_gengrid_bounce_set(obj, param->i, v_bounce);
+ return EINA_TRUE;
+ }
}
- else if (!strcmp(param->name, "always select")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ else if (!strcmp(param->name, "width bounce"))
{
- elm_gengrid_always_select_mode_set(obj, param->i);
- return EINA_TRUE;
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ Eina_Bool h_bounce, v_bounce;
+ elm_gengrid_bounce_get(obj, &h_bounce, &v_bounce);
+ elm_gengrid_bounce_set(obj, h_bounce, param->i);
+ return EINA_TRUE;
+ }
}
- else if (!strcmp(param->name, "no select")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ else if (!strcmp(param->name, "horizontal page relative"))
{
- elm_gengrid_no_select_mode_set(obj, param->i);
- return EINA_TRUE;
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double h_pagerel, v_pagerel;
+ elm_gengrid_page_relative_get(obj, &h_pagerel, &v_pagerel);
+ elm_gengrid_page_relative_set(obj, param->d, v_pagerel);
+ return EINA_TRUE;
+ }
}
- else if (!strcmp(param->name, "multi select")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ else if (!strcmp(param->name, "vertical page relative"))
{
- elm_gengrid_multi_select_set(obj, param->i);
- return EINA_TRUE;
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double h_pagerel, v_pagerel;
+ elm_gengrid_page_relative_get(obj, &h_pagerel, &v_pagerel);
+ elm_gengrid_page_relative_set(obj, h_pagerel, param->d);
+ return EINA_TRUE;
+ }
}
- else if (!strcmp(param->name, "h bounce")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ else if (!strcmp(param->name, "horizontal item size"))
{
- Eina_Bool h, v;
- elm_gengrid_bounce_get(obj, &h, &v);
- elm_gengrid_item_size_set(obj, param->i, v);
- return EINA_TRUE;
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ int h_itemsize, v_itemsize;
+ elm_gengrid_item_size_get(obj, &h_itemsize, &v_itemsize);
+ elm_gengrid_item_size_set(obj, param->i, v_itemsize);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "vertical item size"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ int h_itemsize, v_itemsize;
+ elm_gengrid_item_size_get(obj, &h_itemsize, &v_itemsize);
+ elm_gengrid_item_size_set(obj, h_itemsize, param->i);
+ return EINA_TRUE;
+ }
}
- else if (!strcmp(param->name, "v bounce")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ else if (!strcmp(param->name, "horizontal"))
{
- Eina_Bool h, v;
- elm_gengrid_bounce_get(obj, &h, &v);
- elm_gengrid_item_size_set(obj, h, param->i);
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_gengrid_horizontal_set(obj, param->i);
+ return EINA_TRUE;
+ }
+ }
-
++ else if (!strcmp(param->name, "align x")
++ && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
++ {
++ double x, y;
++ elm_gengrid_align_get(obj, &x, &y);
++ elm_gengrid_align_set(obj, param->d, y);
+ return EINA_TRUE;
+ }
- else if (!strcmp(param->name, "horizontal")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
++ else if (!strcmp(param->name, "align y")
++ && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
- elm_gengrid_horizontal_set(obj, param->i);
- horizontal_bk = param->i;
++ double x, y;
++ elm_gengrid_align_get(obj, &x, &y);
++ elm_gengrid_align_set(obj, x, param->d);
+ return EINA_TRUE;
+ }
-
ERR("unknown parameter '%s' of type '%s'",
param->name, edje_external_param_type_str(param->type));
static Eina_Bool
external_gengrid_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
{
- if (!strcmp(param->name, "item size x")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ if (!strcmp(param->name, "multi select"))
{
- Evas_Coord x, y;
- elm_gengrid_item_size_get(obj, &x, &y);
- param->i = x;
- return EINA_TRUE;
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_gengrid_multi_select_get(obj);
+ return EINA_TRUE;
+ }
}
- else if (!strcmp(param->name, "item size y")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ else if (!strcmp(param->name, "no selected"))
{
- Evas_Coord x, y;
- elm_gengrid_item_size_get(obj, &x, &y);
- param->i = y;
- return EINA_TRUE;
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_gengrid_no_select_mode_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "always select"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_gengrid_always_select_mode_get(obj);
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "height bounce"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ Eina_Bool h_bounce, v_bounce;
+ elm_gengrid_bounce_get(obj, &h_bounce, &v_bounce);
+ param->i = h_bounce;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "width bounce"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ Eina_Bool h_bounce, v_bounce;
+ elm_gengrid_bounce_get(obj, &h_bounce, &v_bounce);
+ param->i = v_bounce;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "horizontal page relative"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double h_pagerel, v_pagerel;
+ elm_gengrid_page_relative_get(obj, &h_pagerel, &v_pagerel);
+ param->d = h_pagerel;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "vertical page relative"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double h_pagerel, v_pagerel;
+ elm_gengrid_page_relative_get(obj, &h_pagerel, &v_pagerel);
+ param->d = v_pagerel;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "horizontal item size"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ int h_itemsize, v_itemsize;
+ elm_gengrid_item_size_get(obj, &h_itemsize, &v_itemsize);
+ param->i = h_itemsize;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "vertical item size"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ int h_itemsize, v_itemsize;
+ elm_gengrid_item_size_get(obj, &h_itemsize, &v_itemsize);
+ param->i = v_itemsize;
+ return EINA_TRUE;
+ }
+ }
+ else if (!strcmp(param->name, "horizontal"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = elm_gengrid_horizontal_get(obj);
+ return EINA_TRUE;
+ }
}
-
+ else if (!strcmp(param->name, "align x")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double x, y;
+ elm_gengrid_align_get(obj, &x, &y);
+ param->d = x;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "align y")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double x, y;
+ elm_gengrid_align_get(obj, &x, &y);
+ param->d = y;
+ return EINA_TRUE;
+ }
- else if (!strcmp(param->name, "always select")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
- {
- param->i = elm_gengrid_always_select_mode_get(obj);
- return EINA_TRUE;
- }
- else if (!strcmp(param->name, "no select")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
- {
- param->i = elm_gengrid_no_select_mode_get(obj);
- return EINA_TRUE;
- }
- else if (!strcmp(param->name, "multi select")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
- {
- param->i = elm_gengrid_multi_select_get(obj);
- return EINA_TRUE;
- }
- else if (!strcmp(param->name, "horizontal")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
- {
- param->i = horizontal_bk;
- return EINA_TRUE;
- }
-
ERR("unknown parameter '%s' of type '%s'",
- param->name, edje_external_param_type_str(param->type));
+ param->name, edje_external_param_type_str(param->type));
return EINA_FALSE;
}
EINA_LIST_FOREACH(params, l, param)
{
- if (!strcmp(param->name, "item size x"))
- {
- mem->item_size_x = param->i;
- mem->item_size_x_exists = EINA_TRUE;
- }
- else if (!strcmp(param->name, "item size y"))
- {
- mem->item_size_y = param->i;
- mem->item_size_y_exists = EINA_TRUE;
- }
+ if (!strcmp(param->name, "multi select"))
+ {
+ mem->multi = !!param->i;
+ mem->multi_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "no selected"))
+ {
+ mem->no_select = !!param->i;
+ mem->no_select_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "always select"))
+ {
+ mem->always_select = !!param->i;
+ mem->always_select_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "height bounce"))
+ {
+ mem->h_bounce = !!param->i;
+ mem->h_bounce_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "width bounce"))
+ {
+ mem->v_bounce = !!param->i;
+ mem->v_bounce_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "horizontal page relative"))
+ {
+ mem->h_pagerel = param->d;
+ mem->h_pagerel_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "vertical page relative"))
+ {
+ mem->v_pagerel = param->d;
+ mem->v_pagerel_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "horizontal item size"))
+ {
+ mem->h_itemsize = param->i;
+ mem->h_itemsize_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "vertical item size"))
+ {
+ mem->v_itemsize = param->i;
+ mem->v_itemsize_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "horizontal"))
+ {
+ mem->horizontal = !!param->i;
+ mem->horizontal_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "align x"))
+ {
+ mem->align_x = param->d;
+ mem->align_x_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "align y"))
+ {
+ mem->align_y = param->d;
+ mem->align_y_exists = EINA_TRUE;
+ }
- else if (!strcmp(param->name, "always select"))
- {
- mem->always_select = param->i;
- mem->always_select_exists = EINA_TRUE;
- }
- else if (!strcmp(param->name, "no_select"))
- {
- mem->no_select = param->i;
- mem->no_select_exists = EINA_TRUE;
- }
- else if (!strcmp(param->name, "multi select"))
- {
- mem->multi_select = param->i;
- mem->multi_select_exists = EINA_TRUE;
- }
- else if (!strcmp(param->name, "h bounce"))
- {
- mem->h_bounce = param->i;
- mem->h_bounce_exists = EINA_TRUE;
- }
- else if (!strcmp(param->name, "v bounce"))
- {
- mem->v_bounce = param->i;
- mem->v_bounce_exists = EINA_TRUE;
- }
- else if (!strcmp(param->name, "horizontal"))
- {
- mem->horizontal = param->i;
- horizontal_bk = param->i;
- mem->horizontal_exists = EINA_TRUE;
- }
- }
-
+ }
+
return mem;
}
}
static Edje_External_Param_Info external_gengrid_params[] = {
- EDJE_EXTERNAL_PARAM_INFO_INT("item size x"),
- EDJE_EXTERNAL_PARAM_INFO_INT("item size y"),
- EDJE_EXTERNAL_PARAM_INFO_DOUBLE("align x"),
- EDJE_EXTERNAL_PARAM_INFO_DOUBLE("align y"),
- EDJE_EXTERNAL_PARAM_INFO_BOOL("always select"),
- EDJE_EXTERNAL_PARAM_INFO_BOOL("no select"),
- EDJE_EXTERNAL_PARAM_INFO_BOOL("multi select"),
- EDJE_EXTERNAL_PARAM_INFO_BOOL("h bounce"),
- EDJE_EXTERNAL_PARAM_INFO_BOOL("v bounce"),
- EDJE_EXTERNAL_PARAM_INFO_BOOL("hirizontal"),
- EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("multi select"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("no select"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("always select"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("height bounce"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("width bounce"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("horizontal page relative"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("vertical page relative"),
+ EDJE_EXTERNAL_PARAM_INFO_INT("horizontal item size"),
+ EDJE_EXTERNAL_PARAM_INFO_INT("vertical item size"),
+ EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal"),
++ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("align x"),
++ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("align y"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
};
DEFINE_EXTERNAL_ICON_ADD(gengrid, "gengrid");
-
+#include <assert.h>
#include "private.h"
typedef struct _Elm_Params_Icon
{
+ const char *file;
+ Eina_Bool scale_up_exists;
+ Eina_Bool scale_up : 1;
+ Eina_Bool scale_down_exists;
+ Eina_Bool scale_down : 1;
+ Eina_Bool smooth_exists;
+ Eina_Bool smooth : 1;
+ Eina_Bool fill_outside_exists;
+ Eina_Bool fill_outside : 1;
+ Eina_Bool no_scale_exists;
+ Eina_Bool no_scale : 1;
+ Eina_Bool prescale_size_exists;
+ int prescale_size;
+ Elm_Params base;
+ const char *icon;
} Elm_Params_Icon;
+static Elm_Params_Icon *param_icon;
+
static void
external_icon_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
{
else if (from_params) p = from_params;
else return;
+ if (p->file)
+ {
+ elm_icon_file_set(obj, p->file, NULL);
+ param_icon->file = p->file;
+ }
+ if (p->smooth_exists)
+ {
+ elm_icon_smooth_set(obj, p->smooth);
+ param_icon->smooth = p->smooth;
+ }
+ if (p->no_scale_exists)
+ {
+ elm_icon_no_scale_set(obj, p->no_scale);
+ param_icon->no_scale = p->no_scale;
+ }
+ if (p->scale_up_exists && p->scale_down_exists)
+ {
+ elm_icon_scale_set(obj, p->scale_up, p->scale_down);
+ param_icon->scale_up = p->scale_up;
+ param_icon->scale_down = p->scale_down;
+ }
+ else if (p->scale_up_exists || p->scale_down_exists)
+ {
+ if (p->scale_up_exists)
+ {
+ elm_icon_scale_set(obj, p->scale_up, param_icon->scale_down);
+ param_icon->scale_up = p->scale_up;
+ }
+ else
+ {
+ elm_icon_scale_set(obj, param_icon->scale_up, p->scale_down);
+ param_icon->scale_down = p->scale_down;
+ }
+ }
+ if (p->fill_outside_exists)
+ {
+ elm_icon_fill_outside_set(obj, p->fill_outside);
+ param_icon->fill_outside = p->fill_outside;
+ }
+ if (p->prescale_size_exists)
+ {
+ elm_icon_prescale_set(obj, p->prescale_size);
+ param_icon->prescale_size = p->prescale_size;
+ }
+ if (p->icon)
+ {
+ edje = evas_object_smart_parent_get(obj);
+ edje_object_file_get(edje, &file, NULL);
+
+ if (!elm_icon_file_set(obj, file, p->icon))
+ elm_icon_standard_set(obj, p->icon);
+ }
}
static Eina_Bool
external_icon_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param)
{
- if (!strcmp(param->name, "file")
+ Evas_Object *edje;
+ const char *file;
+
- if (!strcmp(param->name, "icon"))
++ if (!strcmp(param->name, "file")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ Eina_Bool ret = elm_icon_file_set(obj, param->s, NULL);
+ if (ret)
+ param_icon->file = param->s;
+ return ret;
+ }
+ else if (!strcmp(param->name, "smooth")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_icon_smooth_set(obj, param->i);
+ param_icon->smooth = param->i;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "no scale")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_icon_no_scale_set(obj, param->i);
+ param_icon->no_scale = param->i;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "scale up")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_icon_scale_set(obj, param->i, param_icon->scale_down);
+ param_icon->scale_up = param->i;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "scale down")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_icon_scale_set(obj, param_icon->scale_up, param->i);
+ param_icon->scale_down = param->i;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "fill outside")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ elm_icon_fill_outside_set(obj, param->i);
+ param_icon->fill_outside = param->i;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "prescale")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ elm_icon_prescale_set(obj, param->i);
+ param_icon->prescale_size = param->i;
+ return EINA_TRUE;
+ }
++ else if (!strcmp(param->name, "icon"))
+ {
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ edje = evas_object_smart_parent_get(obj);
+ edje_object_file_get(edje, &file, NULL);
+
+ if (!elm_icon_file_set(obj, file, param->s))
+ elm_icon_standard_set(obj, param->s);
+ return EINA_TRUE;
+ }
+ }
ERR("unknown parameter '%s' of type '%s'",
param->name, edje_external_param_type_str(param->type));
}
static Eina_Bool
-external_icon_param_get(void *data __UNUSED__, const Evas_Object *obj __UNUSED__, Edje_External_Param *param)
+external_icon_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param)
{
- if (!strcmp(param->name, "icon"))
+ if (!strcmp(param->name, "file")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ {
+ param->s = param_icon->file;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "smooth")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = param_icon->smooth;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "no scale")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = param_icon->no_scale;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "scale up")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = param_icon->scale_up;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "scale down")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = param_icon->scale_down;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "fill outside")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ {
+ param->i = param_icon->fill_outside;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "prescale")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+ {
+ param->i = param_icon->prescale_size;
+ return EINA_TRUE;
+ }
++ else if (!strcmp(param->name, "icon"))
+ {
+ /* not easy to get icon name back from live object */
+ return EINA_FALSE;
+ }
ERR("unknown parameter '%s' of type '%s'",
- param->name, edje_external_param_type_str(param->type));
+ param->name, edje_external_param_type_str(param->type));
return EINA_FALSE;
}
Elm_Params_Icon *mem;
Edje_External_Param *param;
const Eina_List *l;
-
-
+ param_icon = calloc(1, sizeof(Elm_Params_Icon));
-
- mem = calloc(1, sizeof(Elm_Params_Icon));
+ mem = ELM_NEW(Elm_Params_Icon);
if (!mem)
return NULL;
EINA_LIST_FOREACH(params, l, param)
- {
- if (!strcmp(param->name, "icon"))
- {
- mem->icon = eina_stringshare_add(param->s);
- }
- }
+ {
+ if (!strcmp(param->name, "file"))
+ mem->file = eina_stringshare_add(param->s);
+ else if (!strcmp(param->name, "smooth"))
+ {
+ mem->smooth = param->i;
+ mem->smooth_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "no scale"))
+ {
+ mem->no_scale = param->i;
+ mem->no_scale_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "scale up"))
+ {
+ mem->scale_up = param->i;
+ mem->scale_up_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "scale down"))
+ {
+ mem->scale_down = param->i;
+ mem->scale_down_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "fill outside"))
+ {
+ mem->fill_outside = param->i;
+ mem->fill_outside_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "prescale"))
+ {
+ mem->prescale_size = param->i;
+ mem->prescale_size_exists = EINA_TRUE;
- }
++ }
++ else if (!strcmp(param->name, "icon"))
++ {
++ mem->icon = eina_stringshare_add(param->s);
++ }
+ }
-
+
return mem;
}
{
Elm_Params_Icon *mem = params;
+ if (mem->file)
+ eina_stringshare_del(mem->file);
+ free(mem);
+
+ if (param_icon->file)
+ eina_stringshare_del(param_icon->file);
+ free(param_icon);
++
+ if (mem->icon)
+ eina_stringshare_del(mem->icon);
+ external_common_params_free(params);
}
static Edje_External_Param_Info external_icon_params[] = {
- EDJE_EXTERNAL_PARAM_INFO_STRING("file"),
- EDJE_EXTERNAL_PARAM_INFO_BOOL("smooth"),
- EDJE_EXTERNAL_PARAM_INFO_BOOL("no scale"),
- EDJE_EXTERNAL_PARAM_INFO_BOOL("scale up"),
- EDJE_EXTERNAL_PARAM_INFO_BOOL("scale down"),
- EDJE_EXTERNAL_PARAM_INFO_BOOL("fill outside"),
- EDJE_EXTERNAL_PARAM_INFO_INT("prescale"),
- EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+ DEFINE_EXTERNAL_COMMON_PARAMS,
+ EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
++ EDJE_EXTERNAL_PARAM_INFO_STRING("file"),
++ EDJE_EXTERNAL_PARAM_INFO_BOOL("smooth"),
++ EDJE_EXTERNAL_PARAM_INFO_BOOL("no scale"),
++ EDJE_EXTERNAL_PARAM_INFO_BOOL("scale up"),
++ EDJE_EXTERNAL_PARAM_INFO_BOOL("scale down"),
++ EDJE_EXTERNAL_PARAM_INFO_BOOL("fill outside"),
++ EDJE_EXTERNAL_PARAM_INFO_INT("prescale"),
+ EDJE_EXTERNAL_PARAM_INFO_SENTINEL
};
DEFINE_EXTERNAL_ICON_ADD(icon, "icon");
if(p->is_horizontal)
elm_panes_horizontal_set(obj, p->horizontal);
- elm_panes_fixed_set(obj, p->fixed);
+
+ if(p->is_fixed)
++ elm_panes_fixed_set(obj, p->fixed);
}
static Eina_Bool external_panes_param_set(void *data __UNUSED__,
elm_panes_content_left_size_set(obj, param->d);
return EINA_TRUE;
}
- else if ((!strcmp(param->name, "fixed"))
- && (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL))
- {
- elm_panes_fixed_set(obj, param->i);
- return EINA_TRUE;
- }
++ else if ((!strcmp(param->name, "fixed"))
++ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL))
++ {
++ elm_panes_fixed_set(obj, param->i);
++ return EINA_TRUE;
++ }
ERR("unknown parameter '%s' of type '%s'",
param->name, edje_external_param_type_str(param->type));
param->d = elm_panes_content_left_size_get(obj);
return EINA_TRUE;
}
- else if ((!strcmp(param->name, "fixed"))
- && (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL))
- {
- param->i = elm_panes_fixed_get(obj);
- return EINA_TRUE;
- }
++ else if ((!strcmp(param->name, "fixed"))
++ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL))
++ {
++ param->i = elm_panes_fixed_get(obj);
++ return EINA_TRUE;
++ }
ERR("unknown parameter '%s' of type '%s'",
param->name, edje_external_param_type_str(param->type));
mem->is_left_size = EINA_TRUE;
mem->left_size = param->d;
}
- else if (!strcmp(param->name, "fixed"))
- {
- mem->is_fixed = EINA_TRUE;
- mem->fixed = param->i;
- }
++ else if (!strcmp(param->name, "fixed"))
++ {
++ mem->is_fixed = EINA_TRUE;
++ mem->fixed = param->i;
++ }
+
}
return mem;
EDJE_EXTERNAL_PARAM_INFO_INT("span"),
EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("unit format", "%1.2f"),
EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("indicator format", "%1.2f"),
- EDJE_EXTERNAL_PARAM_INFO_BOOL("indicator show"),
+ EDJE_EXTERNAL_PARAM_INFO_STRING("end icon"),
EDJE_EXTERNAL_PARAM_INFO_SENTINEL
};
DEFINE_TYPE(genlist)
DEFINE_TYPE(gengrid)
DEFINE_TYPE(hoversel)
++DEFINE_TYPE(index)
DEFINE_TYPE(list)
DEFINE_TYPE(map)
+DEFINE_TYPE(multibuttonentry)
+DEFINE_TYPE(navigationbar)
+DEFINE_TYPE(navigationbar_ex)
+DEFINE_TYPE(nocontents)
+DEFINE_TYPE(page_control)
+DEFINE_TYPE(pager)
DEFINE_TYPE(photocam)
DEFINE_TYPE(progressbar)
DEFINE_TYPE(radio)
- DEFINE_TYPE(scrolled_entry)
+DEFINE_TYPE(searchbar)
DEFINE_TYPE(slider)
DEFINE_TYPE(slideshow)
DEFINE_TYPE(spinner)
DEFINE_TYPE(label)
DEFINE_TYPE(icon)
DEFINE_TYPE(scroller)
-DEFINE_TYPE(index)
+ DEFINE_TYPE(segment_control)
EAPI void elm_object_tree_dump(const Evas_Object *top);
EAPI void elm_object_tree_dot_dump(const Evas_Object *top, const char *file);
+ EAPI void elm_autocapitalization_allow_all_set(Eina_Bool autocap);
+ EAPI void elm_autoperiod_allow_all_set(Eina_Bool autoperiod);
+
+
/* theme */
+ /**
+ * @defgroup Theme Theme
+ *
+ * Elementary uses Edje to theme its widgets, naturally. But for the most
+ * part this is hidden behind a simpler interface that lets the user set
+ * extensions and choose the style of widgets in a much easier way.
+ *
+ * Instead of thinking in terms of paths to Edje files and their groups
+ * each time you want to change the appearance of a widget, Elementary
+ * works so you can add any theme file with extensions or replace the
+ * main theme at one point in the application, and then just set the style
+ * of widgets with elm_object_style_set() and related functions. Elementary
+ * will then look in its list of themes for a matching group and apply it,
+ * and when the theme changes midway through the application, all widgets
+ * will be updated accordingly.
+ *
+ * There are three concepts you need to know to understand how Elementary
+ * theming works: default theme, extensions and overlays.
+ *
+ * Default theme, obviously enough, is the one that provides the default
+ * look of all widgets. End users can change the theme used by Elementary
+ * by setting the @c ELM_THEME environment variable before running an
+ * application, or globally for all programs using the @c elementary_config
+ * utility. Applications can change the default theme using elm_theme_set(),
+ * but this can go against the user wishes, so it's not an adviced practice.
+ *
+ * Ideally, applications should find everything they need in the already
+ * provided theme, but there may be occasions when that's not enough and
+ * custom styles are required to correctly express the idea. For this
+ * cases, Elementary has extensions.
+ *
+ * Extensions allow the application developer to write styles of its own
+ * to apply to some widgets. This requires knowledge of how each widget
+ * is themed, as extensions will always replace the entire group used by
+ * the widget, so important signals and parts need to be there for the
+ * object to behave properly (see documentation of Edje for details).
+ * Once the theme for the extension is done, the application needs to add
+ * it to the list of themes Elementary will look into, using
+ * elm_theme_extension_add(), and set the style of the desired widgets as
+ * he would normally with elm_object_style_set().
+ *
+ * Overlays, on the other hand, can replace the look of all widgets by
+ * overriding the default style. Like extensions, it's up to the application
+ * developer to write the theme for the widgets it wants, the difference
+ * being that when looking for the theme, Elementary will check first the
+ * list of overlays, then the set theme and lastly the list of extensions,
+ * so with overlays it's possible to replace the default view and every
+ * widget will be affected. This is very much alike to setting the whole
+ * theme for the application and will probably clash with the end user
+ * options, not to mention the risk of ending up with not matching styles
+ * across the program. Unless there's a very special reason to use them,
+ * overlays should be avoided for the resons exposed before.
+ *
+ * All these theme lists are handled by ::Elm_Theme instances. Elementary
+ * keeps one default internally and every function that receives one of
+ * these can be called with NULL to refer to this default (except for
+ * elm_theme_free()). It's possible to create a new instance of a
+ * ::Elm_Theme to set other theme for a specific widget (and all of its
+ * children), but this is as discouraged, if not even more so, than using
+ * overlays. Don't use this unless you really know what you are doing.
+ *
+ * But to be less negative about things, you can look at the following
+ * examples:
+ * @li @ref theme_example_01 "Using extensions"
+ * @li @ref theme_example_02 "Using overlays"
+ *
+ * @{
+ */
+ /**
+ * @typedef Elm_Theme
+ *
+ * Opaque handler for the list of themes Elementary looks for when
+ * rendering widgets.
+ *
+ * Stay out of this unless you really know what you are doing. For most
+ * cases, sticking to the default is all a developer needs.
+ */
typedef struct _Elm_Theme Elm_Theme;
+ /**
+ * Create a new specific theme
+ *
+ * This creates an empty specific theme that only uses the default theme. A
+ * specific theme has its own private set of extensions and overlays too
+ * (which are empty by default). Specific themes do not fall back to themes
+ * of parent objects. They are not intended for this use. Use styles, overlays
+ * and extensions when needed, but avoid specific themes unless there is no
+ * other way (example: you want to have a preview of a new theme you are
+ * selecting in a "theme selector" window. The preview is inside a scroller
+ * and should display what the theme you selected will look like, but not
+ * actually apply it yet. The child of the scroller will have a specific
+ * theme set to show this preview before the user decides to apply it to all
+ * applications).
+ */
EAPI Elm_Theme *elm_theme_new(void);
+ /**
+ * Free a specific theme
+ *
+ * @param th The theme to free
+ *
+ * This frees a theme created with elm_theme_new().
+ */
EAPI void elm_theme_free(Elm_Theme *th);
+ /**
+ * Copy the theme fom the source to the destination theme
+ *
+ * @param th The source theme to copy from
+ * @param thdst The destination theme to copy data to
+ *
+ * This makes a one-time static copy of all the theme config, extensions
+ * and overlays from @p th to @p thdst. If @p th references a theme, then
+ * @p thdst is also set to reference it, with all the theme settings,
+ * overlays and extensions that @p th had.
+ */
EAPI void elm_theme_copy(Elm_Theme *th, Elm_Theme *thdst);
+ /**
+ * Tell the source theme to reference the ref theme
+ *
+ * @param th The theme that will do the referencing
+ * @param thref The theme that is the reference source
+ *
+ * This clears @p th to be empty and then sets it to refer to @p thref
+ * so @p th acts as an override to @p thref, but where its overrides
+ * don't apply, it will fall through to @pthref for configuration.
+ */
EAPI void elm_theme_ref_set(Elm_Theme *th, Elm_Theme *thref);
+ /**
+ * Return the theme referred to
+ *
+ * @param th The theme to get the reference from
+ * @return The referenced theme handle
+ *
+ * This gets the theme set as the reference theme by elm_theme_ref_set().
+ * If no theme is set as a reference, NULL is returned.
+ */
EAPI Elm_Theme *elm_theme_ref_get(Elm_Theme *th);
+ /**
+ * Return the default theme
+ *
+ * @return The default theme handle
+ *
+ * This returns the internal default theme setup handle that all widgets
+ * use implicitly unless a specific theme is set. This is also often use
+ * as a shorthand of NULL.
+ */
EAPI Elm_Theme *elm_theme_default_get(void);
+ /**
+ * Prepends a theme overlay to the list of overlays
+ *
+ * @param th The theme to add to, or if NULL, the default theme
+ * @param item The Edje file path to be used
+ *
+ * Use this if your application needs to provide some custom overlay theme
+ * (An Edje file that replaces some default styles of widgets) where adding
+ * new styles, or changing system theme configuration is not possible. Do
+ * NOT use this instead of a proper system theme configuration. Use proper
+ * configuration files, profiles, environment variables etc. to set a theme
+ * so that the theme can be altered by simple confiugration by a user. Using
+ * this call to achieve that effect is abusing the API and will create lots
+ * of trouble.
+ *
+ * @see elm_theme_extension_add()
+ */
EAPI void elm_theme_overlay_add(Elm_Theme *th, const char *item);
+ /**
+ * Delete a theme overlay from the list of overlays
+ *
+ * @param th The theme to delete from, or if NULL, the default theme
+ * @param item The name of the theme overlay
+ *
+ * @see elm_theme_overlay_add()
+ */
EAPI void elm_theme_overlay_del(Elm_Theme *th, const char *item);
+ /**
+ * Appends a theme extension to the list of extensions.
+ *
+ * @param th The theme to add to, or if NULL, the default theme
+ * @param item The Edje file path to be used
+ *
+ * This is intended when an application needs more styles of widgets or new
+ * widget themes that the default does not provide (or may not provide). The
+ * application has "extended" usage by coming up with new custom style names
+ * for widgets for specific uses, but as these are not "standard", they are
+ * not guaranteed to be provided by a default theme. This means the
+ * application is required to provide these extra elements itself in specific
+ * Edje files. This call adds one of those Edje files to the theme search
+ * path to be search after the default theme. The use of this call is
+ * encouraged when default styles do not meet the needs of the application.
+ * Use this call instead of elm_theme_overlay_add() for almost all cases.
+ *
+ * @see elm_object_style_set()
+ */
EAPI void elm_theme_extension_add(Elm_Theme *th, const char *item);
+ /**
+ * Deletes a theme extension from the list of extensions.
+ *
+ * @param th The theme to delete from, or if NULL, the default theme
+ * @param item The name of the theme extension
+ *
+ * @see elm_theme_extension_add()
+ */
EAPI void elm_theme_extension_del(Elm_Theme *th, const char *item);
+ /**
+ * Set the theme search order for the given theme
+ *
+ * @param th The theme to set the search order, or if NULL, the default theme
+ * @param theme Theme search string
+ *
+ * This sets the search string for the theme in path-notation from first
+ * theme to search, to last, delimited by the : character. Example:
+ *
+ * "shiny:/path/to/file.edj:default"
+ *
+ * See the ELM_THEME environment variable for more information.
+ *
+ * @see elm_theme_get()
+ * @see elm_theme_list_get()
+ */
EAPI void elm_theme_set(Elm_Theme *th, const char *theme);
+ /**
+ * Return the theme search order
+ *
+ * @param th The theme to get the search order, or if NULL, the default theme
+ * @return The internal search order path
+ *
+ * This function returns a colon separated string of theme elements as
+ * returned by elm_theme_list_get().
+ *
+ * @see elm_theme_set()
+ * @see elm_theme_list_get()
+ */
EAPI const char *elm_theme_get(Elm_Theme *th);
+ /**
+ * Return a list of theme elements to be used in a theme.
+ *
+ * @param th Theme to get the list of theme elements from.
+ * @return The internal list of theme elements
+ *
+ * This returns the internal list of theme elements (will only be valid as
+ * long as the theme is not modified by elm_theme_set() or theme is not
+ * freed by elm_theme_free(). This is a list of strings which must not be
+ * altered as they are also internal. If @p th is NULL, then the default
+ * theme element list is returned.
+ *
+ * A theme element can consist of a full or relative path to a .edj file,
+ * or a name, without extension, for a theme to be searched in the known
+ * theme paths for Elemementary.
+ *
+ * @see elm_theme_set()
+ * @see elm_theme_get()
+ */
EAPI const Eina_List *elm_theme_list_get(const Elm_Theme *th);
+ /**
+ * Return the full patrh for a theme element
+ *
+ * @param f The theme element name
+ * @param in_search_path Pointer to a boolean to indicate if item is in the search path or not
+ * @return The full path to the file found.
+ *
+ * This returns a string you should free with free() on success, NULL on
+ * failure. This will search for the given theme element, and if it is a
+ * full or relative path element or a simple searchable name. The returned
+ * path is the full path to the file, if searched, and the file exists, or it
+ * is simply the full path given in the element or a resolved path if
+ * relative to home. The @p in_search_path boolean pointed to is set to
+ * EINA_TRUE if the file was a searchable file andis in the search path,
+ * and EINA_FALSE otherwise.
+ */
EAPI char *elm_theme_list_item_path_get(const char *f, Eina_Bool *in_search_path);
+ /**
+ * Flush the current theme.
+ *
+ * @param th Theme to flush
+ *
+ * This flushes caches that let elementary know where to find theme elements
+ * in the given theme. If @p th is NULL, then the default theme is flushed.
+ * Call this function if source theme data has changed in such a way as to
+ * make any caches Elementary kept invalid.
+ */
EAPI void elm_theme_flush(Elm_Theme *th);
+ /**
+ * This flushes all themes (default and specific ones).
+ *
+ * This will flush all themes in the current application context, by calling
+ * elm_theme_flush() on each of them.
+ */
EAPI void elm_theme_full_flush(void);
-
+ /**
+ * Set the theme for all elementary using applications on the current display
+ *
+ * @param theme The name of the theme to use. Format same as the ELM_THEME
+ * environment variable.
+ */
EAPI void elm_theme_all_set(const char *theme);
-
+ /**
+ * Return a list of theme elements in the theme search path
+ *
+ * @return A list of strings that are the theme element names.
+ *
+ * This lists all available theme files in the standard Elementary search path
+ * for theme elements, and returns them in alphabetical order as theme
+ * element names in a list of strings. Free this with
+ * elm_theme_name_available_list_free() when you are done with the list.
+ */
EAPI Eina_List *elm_theme_name_available_list_new(void);
+ /**
+ * Free the list returned by elm_theme_name_available_list_new()
+ *
+ * This frees the list of themes returned by
+ * elm_theme_name_available_list_new(). Once freed the list should no longer
+ * be used. a new list mys be created.
+ */
EAPI void elm_theme_name_available_list_free(Eina_List *list);
-
+ /**
+ * Set a specific theme to be used for this object and its children
+ *
+ * @param obj The object to set the theme on
+ * @param th The theme to set
+ *
+ * This sets a specific theme that will be used for the given object and any
+ * child objects it has. If @p th is NULL then the theme to be used is
+ * cleared and the object will inherit its theme from its parent (which
+ * ultimately will use the default theme if no specific themes are set).
+ *
+ * Use special themes with great care as this will annoy users and make
+ * configuration difficult. Avoid any custom themes at all if it can be
+ * helped.
+ */
EAPI void elm_object_theme_set(Evas_Object *obj, Elm_Theme *th) EINA_ARG_NONNULL(1);
+ /**
+ * Get the specific theme to be used
+ *
+ * @param obj The object to get the specific theme from
+ * @return The specifc theme set.
+ *
+ * This will return a specific theme set, or NULL if no specific theme is
+ * set on that object. It will not return inherited themes from parents, only
+ * the specific theme set for that specific object. See elm_object_theme_set()
+ * for more information.
+ */
EAPI Elm_Theme *elm_object_theme_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * @}
+ */
/* win */
typedef enum _Elm_Win_Type
* "clicked" - the user clicked the image
*/
+ /* glview */
+ typedef void (*Elm_GLView_Func)(Evas_Object *obj);
+
+ typedef enum _Elm_GLView_Mode
+ {
+ ELM_GLVIEW_ALPHA = 1,
+ ELM_GLVIEW_DEPTH = 2,
+ ELM_GLVIEW_STENCIL = 4
+ } Elm_GLView_Mode;
+
+ /**
+ * Defines a policy for the glview resizing.
+ *
+ * @note Default is ELM_GLVIEW_RESIZE_POLICY_RECREATE
+ */
+ typedef enum _Elm_GLView_Resize_Policy
+ {
+ ELM_GLVIEW_RESIZE_POLICY_RECREATE = 1, /**< Resize the internal surface along with the image */
+ ELM_GLVIEW_RESIZE_POLICY_SCALE = 2 /**< Only reize the internal image and not the surface */
+ } Elm_GLView_Resize_Policy;
+
+ typedef enum _Elm_GLView_Render_Policy
+ {
+ ELM_GLVIEW_RENDER_POLICY_ON_DEMAND = 1, /**< Render only when there is a need for redrawing */
+ ELM_GLVIEW_RENDER_POLICY_ALWAYS = 2 /**< Render always even when it is not visible */
+ } Elm_GLView_Render_Policy;
+
+
+ EAPI Evas_Object *elm_glview_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EAPI void elm_glview_size_set(Evas_Object *obj, Evas_Coord width, Evas_Coord height) EINA_ARG_NONNULL(1);
+ EAPI void elm_glview_size_get(const Evas_Object *obj, Evas_Coord *width, Evas_Coord *height) EINA_ARG_NONNULL(1);
+ EAPI Evas_GL_API *elm_glview_gl_api_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_glview_mode_set(Evas_Object *obj, Elm_GLView_Mode mode) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_glview_resize_policy_set(Evas_Object *obj, Elm_GLView_Resize_Policy policy) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_glview_render_policy_set(Evas_Object *obj, Elm_GLView_Render_Policy policy) EINA_ARG_NONNULL(1);
+ EAPI void elm_glview_init_func_set(Evas_Object *obj, Elm_GLView_Func func) EINA_ARG_NONNULL(1);
+ EAPI void elm_glview_del_func_set(Evas_Object *obj, Elm_GLView_Func func) EINA_ARG_NONNULL(1);
+ EAPI void elm_glview_resize_func_set(Evas_Object *obj, Elm_GLView_Func func) EINA_ARG_NONNULL(1);
+ EAPI void elm_glview_render_func_set(Evas_Object *obj, Elm_GLView_Func func) EINA_ARG_NONNULL(1);
+ EAPI void elm_glview_changed_set(Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/* box */
+ /**
+ * @defgroup Box Box
+ *
+ * A box arranges objects in a linear fashion, governed by a layout function
+ * that defines the details of this arrangement.
+ *
+ * By default, the box will use an internal function to set the layout to
+ * a single row, either vertical or horizontal. This layout is affected
+ * by a number of parameters, such as the homogeneous flag set by
+ * elm_box_homogeneous_set(), the values given by elm_box_padding_set() and
+ * elm_box_align_set() and the hints set to each object in the box.
+ *
+ * For this default layout, it's possible to change the orientation with
+ * elm_box_horizontal_set(). The box will start in the vertical orientation,
+ * placing its elements ordered from top to bottom. When horizontal is set,
+ * the order will go from left to right. If the box is set to be
+ * homogeneous, every object in it will be assigned the same space, that
+ * of the largest object. Padding can be used to set some spacing between
+ * the cell given to each object. The alignment of the box, set with
+ * elm_box_align_set(), determines how the bounding box of all the elements
+ * will be placed within the space given to the box widget itself.
+ *
+ * The size hints of each object also affect how they are placed and sized
+ * within the box. evas_object_size_hint_min_set() will give the minimum
+ * size the object can have, and the box will use it as the basis for all
+ * latter calculations. Elementary widgets set their own minimum size as
+ * needed, so there's rarely any need to use it manually.
+ *
+ * evas_object_size_hint_weight_set(), when not in homogeneous mode, is
+ * used to tell whether the object will be allocated the minimum size it
+ * needs or if the space given to it should be expanded. It's important
+ * to realize that expanding the size given to the object is not the same
+ * thing as resizing the object. It could very well end being a small
+ * widget floating in a much larger empty space. If not set, the weight
+ * for objects will normally be 0.0 for both axis, meaning the widget will
+ * not be expanded. To take as much space possible, set the weight to
+ * EVAS_HINT_EXPAND (defined to 1.0) for the desired axis to expand.
+ *
+ * Besides how much space each object is allocated, it's possible to control
+ * how the widget will be placed within that space using
+ * evas_object_size_hint_align_set(). By default, this value will be 0.5
+ * for both axis, meaning the object will be centered, but any value from
+ * 0.0 (left or top, for the @c x and @c y axis, respectively) to 1.0
+ * (right or bottom) can be used. The special value EVAS_HINT_FILL, which
+ * is -1.0, means the object will be resized to fill the entire space it
+ * was allocated.
+ *
+ * In addition, customized functions to define the layout can be set, which
+ * allow the application developer to organize the objects within the box
+ * in any number of ways.
+ *
+ * The special elm_box_layout_transition() function can be used
+ * to switch from one layout to another, animating the motion of the
+ * children of the box.
+ *
+ * @note Objects should not be added to box objects using _add() calls.
+ *
+ * Some examples on how to use boxes follow:
+ * @li @ref box_example_01
+ * @li @ref box_example_02
+ *
+ * @{
+ */
+ /**
+ * @typedef Elm_Box_Transition
+ *
+ * Opaque handler containing the parameters to perform an animated
+ * transition of the layout the box uses.
+ *
+ * @see elm_box_transition_new()
+ * @see elm_box_layout_set()
+ * @see elm_box_layout_transition()
+ */
typedef struct _Elm_Box_Transition Elm_Box_Transition;
+ /**
+ * Add a new box to the parent
+ *
+ * By default, the box will be in vertical mode and non-homogeneous.
+ *
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
+ */
EAPI Evas_Object *elm_box_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ /**
+ * Set the horizontal orientation
+ *
+ * By default, box object arranges their contents vertically from top to
+ * bottom.
+ * By calling this function with @p horizontal as EINA_TRUE, the box will
+ * become horizontal, arranging contents from left to right.
+ *
+ * @note This flag is ignored if a custom layout function is set.
+ *
+ * @param obj The box object
+ * @param horizontal The horizontal flag (EINA_TRUE = horizontal,
+ * EINA_FALSE = vertical)
+ */
EAPI void elm_box_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1);
+ /**
+ * Get the horizontal orientation
+ *
+ * @param obj The box object
+ * @return EINA_TRUE if the box is set to horizintal mode, EINA_FALSE otherwise
+ */
EAPI Eina_Bool elm_box_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_box_homogenous_set(Evas_Object *obj, Eina_Bool homogenous) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_box_homogenous_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_box_extended_mode_set(Evas_Object *obj, Eina_Bool extended) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_box_extended_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set the box to arrange its children homogeneously
+ *
+ * If enabled, homogeneous layout makes all items the same size, according
+ * to the size of the largest of its children.
+ *
+ * @note This flag is ignored if a custom layout function is set.
+ *
+ * @param obj The box object
+ * @param homogeneous The homogeneous flag
+ */
+ EAPI void elm_box_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous) EINA_ARG_NONNULL(1);
+ /**
+ * Get whether the box is using homogeneous mode or not
+ *
+ * @param obj The box object
+ * @return EINA_TRUE if it's homogeneous, EINA_FALSE otherwise
+ */
+ EAPI Eina_Bool elm_box_homogeneous_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_box_homogenous_set(Evas_Object *obj, Eina_Bool homogenous) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Eina_Bool elm_box_homogenous_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Add an object to the beginning of the pack list
+ *
+ * Pack @p subobj into the box @p obj, placing it first in the list of
+ * children objects. The actual position the object will get on screen
+ * depends on the layout used. If no custom layout is set, it will be at
+ * the top or left, depending if the box is vertical or horizontal,
+ * respectively.
+ *
+ * @param obj The box object
+ * @param subobj The object to add to the box
+ *
+ * @see elm_box_pack_end()
+ * @see elm_box_pack_before()
+ * @see elm_box_pack_after()
+ * @see elm_box_unpack()
+ * @see elm_box_unpack_all()
+ * @see elm_box_clear()
+ */
EAPI void elm_box_pack_start(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1);
+ /**
+ * Add an object at the end of the pack list
+ *
+ * Pack @p subobj into the box @p obj, placing it last in the list of
+ * children objects. The actual position the object will get on screen
+ * depends on the layout used. If no custom layout is set, it will be at
+ * the bottom or right, depending if the box is vertical or horizontal,
+ * respectively.
+ *
+ * @param obj The box object
+ * @param subobj The object to add to the box
+ *
+ * @see elm_box_pack_start()
+ * @see elm_box_pack_before()
+ * @see elm_box_pack_after()
+ * @see elm_box_unpack()
+ * @see elm_box_unpack_all()
+ * @see elm_box_clear()
+ */
EAPI void elm_box_pack_end(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1);
+ /**
+ * Adds an object to the box before the indicated object
+ *
+ * This will add the @p subobj to the box indicated before the object
+ * indicated with @p before. If @p before is not already in the box, results
+ * are undefined. Before means either to the left of the indicated object or
+ * above it depending on orientation.
+ *
+ * @param obj The box object
+ * @param subobj The object to add to the box
+ * @param before The object before which to add it
+ *
+ * @see elm_box_pack_start()
+ * @see elm_box_pack_end()
+ * @see elm_box_pack_after()
+ * @see elm_box_unpack()
+ * @see elm_box_unpack_all()
+ * @see elm_box_clear()
+ */
EAPI void elm_box_pack_before(Evas_Object *obj, Evas_Object *subobj, Evas_Object *before) EINA_ARG_NONNULL(1);
- EAPI void elm_box_pack_after(Evas_Object *obj, Evas_Object *subobj, Evas_Object *after) EINA_ARG_NONNULL(1);
- EAPI void elm_box_clear(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_box_unpack(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1);
- EAPI void elm_box_unpack_all(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Adds an object to the box after the indicated object
+ *
+ * This will add the @p subobj to the box indicated after the object
+ * indicated with @p after. If @p after is not already in the box, results
+ * are undefined. After means either to the right of the indicated object or
+ * below it depending on orientation.
+ *
+ * @param obj The box object
+ * @param subobj The object to add to the box
+ * @param after The object after which to add it
+ *
+ * @see elm_box_pack_start()
+ * @see elm_box_pack_end()
+ * @see elm_box_pack_before()
+ * @see elm_box_unpack()
+ * @see elm_box_unpack_all()
+ * @see elm_box_clear()
+ */
+ EAPI void elm_box_pack_after(Evas_Object *obj, Evas_Object *subobj, Evas_Object *after) EINA_ARG_NONNULL(1);
+ /**
+ * Clear the box of all children
+ *
+ * Remove all the elements contained by the box, deleting the respective
+ * objects.
+ *
+ * @param obj The box object
+ *
+ * @see elm_box_unpack()
+ * @see elm_box_unpack_all()
+ */
+ EAPI void elm_box_clear(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Unpack a box item
+ *
+ * Remove the object given by @p subobj from the box @p obj without
+ * deleting it.
+ *
+ * @param obj The box object
+ *
+ * @see elm_box_unpack_all()
+ * @see elm_box_clear()
+ */
+ EAPI void elm_box_unpack(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1);
+ /**
+ * Remove all items from the box, without deleting them
+ *
+ * Clear the box from all children, but don't delete the respective objects.
+ * If no other references of the box children exist, the objects will never
+ * be deleted, and thus the application will leak the memory. Make sure
+ * when using this function that you hold a reference to all the objects
+ * in the box @p obj.
+ *
+ * @param obj The box object
+ *
+ * @see elm_box_clear()
+ * @see elm_box_unpack()
+ */
+ EAPI void elm_box_unpack_all(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Retrieve a list of the objects packed into the box
+ *
+ * Returns a new @c Eina_List with a pointer to @c Evas_Object in its nodes.
+ * The order of the list corresponds to the packing order the box uses.
+ *
+ * You must free this list with eina_list_free() once you are done with it.
+ *
+ * @param obj The box object
+ */
EAPI const Eina_List *elm_box_children_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set the space (padding) between the box's elements.
+ *
+ * Extra space in pixels that will be added between a box child and its
+ * neighbors after its containing cell has been calculated. This padding
+ * is set for all elements in the box, besides any possible padding that
+ * individual elements may have through their size hints.
+ *
+ * @param obj The box object
+ * @param horizontal The horizontal space between elements
+ * @param vertical The vertical space between elements
+ */
EAPI void elm_box_padding_set(Evas_Object *obj, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1);
+ /**
+ * Get the space (padding) between the box's elements.
+ *
+ * @param obj The box object
+ * @param horizontal The horizontal space between elements
+ * @param vertical The vertical space between elements
+ *
+ * @see elm_box_padding_set()
+ */
EAPI void elm_box_padding_get(const Evas_Object *obj, Evas_Coord *horizontal, Evas_Coord *vertical) EINA_ARG_NONNULL(1);
+ /**
+ * Set the alignment of the whole bouding box of contents.
+ *
+ * Sets how the bounding box containing all the elements of the box, after
+ * their sizes and position has been calculated, will be aligned within
+ * the space given for the whole box widget.
+ *
+ * @param obj The box object
+ * @param horizontal The horizontal alignment of elements
+ * @param vertical The vertical alignment of elements
+ */
EAPI void elm_box_align_set(Evas_Object *obj, double horizontal, double vertical) EINA_ARG_NONNULL(1);
+ /**
+ * Get the alignment of the whole bouding box of contents.
+ *
+ * @param obj The box object
+ * @param horizontal The horizontal alignment of elements
+ * @param vertical The vertical alignment of elements
+ *
+ * @see elm_box_align_set()
+ */
EAPI void elm_box_align_get(const Evas_Object *obj, double *horizontal, double *vertical) EINA_ARG_NONNULL(1);
+ /**
+ * Set the layout defining function to be used by the box
+ *
+ * Whenever anything changes that requires the box in @p obj to recalculate
+ * the size and position of its elements, the function @p cb will be called
+ * to determine what the layout of the children will be.
+ *
+ * Once a custom function is set, everything about the children layout
+ * is defined by it. The flags set by elm_box_horizontal_set() and
+ * elm_box_homogeneous_set() no longer have any meaning, and the values
+ * given by elm_box_padding_set() and elm_box_align_set() are up to this
+ * layout function to decide if they are used and how. These last two
+ * will be found in the @c priv parameter, of type @c Evas_Object_Box_Data,
+ * passed to @p cb. The @c Evas_Object the function receives is not the
+ * Elementary widget, but the internal Evas Box it uses, so none of the
+ * functions described here can be used on it.
+ *
+ * Any of the layout functions in @c Evas can be used here, as well as the
+ * special elm_box_layout_transition().
+ *
+ * The final @p data argument received by @p cb is the same @p data passed
+ * here, and the @p free_data function will be called to free it
+ * whenever the box is destroyed or another layout function is set.
+ *
+ * Setting @p cb to NULL will revert back to the default layout function.
+ *
+ * @param obj The box object
+ * @param cb The callback function used for layout
+ * @param data Data that will be passed to layout function
+ * @param free_data Function called to free @p data
+ *
+ * @see elm_box_layout_transition()
+ */
EAPI void elm_box_layout_set(Evas_Object *obj, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data)) EINA_ARG_NONNULL(1);
+ /**
+ * Special layout function that animates the transition from one layout to another
+ *
+ * Normally, when switching the layout function for a box, this will be
+ * reflected immediately on screen on the next render, but it's also
+ * possible to do this through an animated transition.
+ *
+ * This is done by creating an ::Elm_Box_Transition and setting the box
+ * layout to this function.
+ *
+ * For example:
+ * @code
+ * Elm_Box_Transition *t = elm_box_transition_new(1.0,
+ * evas_object_box_layout_vertical, // start
+ * NULL, // data for initial layout
+ * NULL, // free function for initial data
+ * evas_object_box_layout_horizontal, // end
+ * NULL, // data for final layout
+ * NULL, // free function for final data
+ * anim_end, // will be called when animation ends
+ * NULL); // data for anim_end function\
+ * elm_box_layout_set(box, elm_box_layout_transition, t,
+ * elm_box_transition_free);
+ * @endcode
+ *
+ * @note This function can only be used with elm_box_layout_set(). Calling
+ * it directly will not have the expected results.
+ *
+ * @see elm_box_transition_new
+ * @see elm_box_transition_free
+ * @see elm_box_layout_set
+ */
EAPI void elm_box_layout_transition(Evas_Object *obj, Evas_Object_Box_Data *priv, void *data);
+ /**
+ * Create a new ::Elm_Box_Transition to animate the switch of layouts
+ *
+ * If you want to animate the change from one layout to another, you need
+ * to set the layout function of the box to elm_box_layout_transition(),
+ * passing as user data to it an instance of ::Elm_Box_Transition with the
+ * necessary information to perform this animation. The free function to
+ * set for the layout is elm_box_transition_free().
+ *
+ * The parameters to create an ::Elm_Box_Transition sum up to how long
+ * will it be, in seconds, a layout function to describe the initial point,
+ * another for the final position of the children and one function to be
+ * called when the whole animation ends. This last function is useful to
+ * set the definitive layout for the box, usually the same as the end
+ * layout for the animation, but could be used to start another transition.
+ *
+ * @param start_layout The layout function that will be used to start the animation
+ * @param start_layout_data The data to be passed the @p start_layout function
+ * @param start_layout_free_data Function to free @p start_layout_data
+ * @param end_layout The layout function that will be used to end the animation
+ * @param end_layout_free_data The data to be passed the @p end_layout function
+ * @param end_layout_free_data Function to free @p end_layout_data
+ * @param transition_end_cb Callback function called when animation ends
+ * @param transition_end_data Data to be passed to @p transition_end_cb
+ * @return An instance of ::Elm_Box_Transition
+ *
+ * @see elm_box_transition_new
+ * @see elm_box_layout_transition
+ */
EAPI Elm_Box_Transition *elm_box_transition_new(const double duration, Evas_Object_Box_Layout start_layout, void *start_layout_data, void(*start_layout_free_data)(void *data), Evas_Object_Box_Layout end_layout, void *end_layout_data, void(*end_layout_free_data)(void *data), void(*transition_end_cb)(void *data), void *transition_end_data) EINA_ARG_NONNULL(2, 5);
+ /**
+ * Free a Elm_Box_Transition instance created with elm_box_transition_new().
+ *
+ * This function is mostly useful as the @c free_data parameter in
+ * elm_box_layout_set() when elm_box_layout_transition().
+ *
+ * @param data The Elm_Box_Transition instance to be freed.
+ *
+ * @see elm_box_transition_new
+ * @see elm_box_layout_transition
+ */
EAPI void elm_box_transition_free(void *data);
- /* smart callbacks called:
+ /**
+ * @}
+ */
+
+ /* button */
+ /**
+ * @defgroup Button Button
+ *
+ * This is a push-button. Press it and run some function. It can contain
+ * a simple label and icon object and it also has an autorepeat feature.
+ *
+ * This widgets emits the following signals:
+ * @li "clicked": the user clicked the button (press/release).
+ * @li "repeated": the user pressed the button without releasing it.
+ * @li "pressed": button was pressed.
+ * @li "unpressed": button was released after being pressed.
+ * In all three cases, the @c event parameter of the callback will be
+ * @c NULL.
+ *
+ * Also, defined in the default theme, the button has the following styles
+ * available:
+ * @li default: a normal button.
+ * @li anchor: Like default, but the button fades away when the mouse is not
+ * over it, leaving only the text or icon.
+ * @li hoversel_vertical: Internally used by @ref Hoversel to give a
+ * continuous look across its options.
+ * @li hoversel_vertical_entry: Another internal for @ref Hoversel.
+ *
+ * Follow through a complete example @ref button_example_01 "here".
+ * @{
*/
- UIControlStateDefault,
- UIControlStateHighlighted,
- UIControlStateDisabled,
- UIControlStateFocused,
- UIControlStateReserved
++
+ typedef enum
+ {
- /* button */
++ UIControlStateDefault,
++ UIControlStateHighlighted,
++ UIControlStateDisabled,
++ UIControlStateFocused,
++ UIControlStateReserved
+ } UIControlState;
+
+ /**
+ * Add a new button to the parent's canvas
+ *
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
+ */
EAPI Evas_Object *elm_button_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
- EAPI void elm_button_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
- EAPI void elm_button_label_set_for_state(Evas_Object *obj, const char *label, UIControlState state);
- EAPI const char *elm_button_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI const char *elm_button_label_get_for_state(const Evas_Object *obj, UIControlState state);
+ /**
+ * Set the label used in the button
+ *
+ * The passed @p label can be NULL to clean any existing text in it and
+ * leave the button as an icon only object.
+ *
+ * @param obj The button object
+ * @param label The text will be written on the button
+ * @deprecated use elm_object_text_set() instead.
+ */
+ EINA_DEPRECATED EAPI void elm_button_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
+ /**
+ * Get the label set for the button
+ *
+ * The string returned is an internal pointer and should not be freed or
+ * altered. It will also become invalid when the button is destroyed.
+ * The string returned, if not NULL, is a stringshare, so if you need to
+ * keep it around even after the button is destroyed, you can use
+ * eina_stringshare_ref().
+ *
+ * @param obj The button object
+ * @return The text set to the label, or NULL if nothing is set
+ * @deprecated use elm_object_text_set() instead.
+ */
+ EINA_DEPRECATED EAPI const char *elm_button_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
++ * Set the label for each state of button
++ *
++ * The passed @p label can be NULL to clean any existing text in it and
++ * leave the button as an icon only object for the state.
++ *
++ * @param obj The button object
++ * @param label The text will be written on the button
++ * @param state The state of button
++ *
++ * @ingroup Button
++ */
++ EINA_DEPRECATED EAPI void elm_button_label_set_for_state(Evas_Object *obj, const char *label, UIControlState state) EINA_ARG_NONNULL(1);
++ /**
++ * Get the label of button for each state
++ *
++ * The string returned is an internal pointer and should not be freed or
++ * altered. It will also become invalid when the button is destroyed.
++ * The string returned, if not NULL, is a stringshare, so if you need to
++ * keep it around even after the button is destroyed, you can use
++ * eina_stringshare_ref().
++ *
++ * @param obj The button object
++ * @param state The state of button
++ * @return The title of button for state
++ *
++ * @ingroup Button
++ */
++ EAPI const char *elm_button_label_get_for_state(const Evas_Object *obj, UIControlState state) EINA_ARG_NONNULL(1);
++ /**
+ * Set the icon used for the button
+ *
+ * Setting a new icon will delete any other that was previously set, making
+ * any reference to them invalid. If you need to maintain the previous
+ * object alive, unset it first with elm_button_icon_unset().
+ *
+ * @param obj The button object
+ * @param icon The icon object for the button
+ */
EAPI void elm_button_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
+ /**
+ * Get the icon used for the button
+ *
+ * Return the icon object which is set for this widget. If the button is
+ * destroyed or another icon is set, the returned object will be deleted
+ * and any reference to it will be invalid.
+ *
+ * @param obj The button object
+ * @return The icon object that is being used
+ *
+ * @see elm_button_icon_unset()
+ */
EAPI Evas_Object *elm_button_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Remove the icon set without deleting it and return the object
+ *
+ * This function drops the reference the button holds of the icon object
+ * and returns this last object. It is used in case you want to remove any
+ * icon, or set another one, without deleting the actual object. The button
+ * will be left without an icon set.
+ *
+ * @param obj The button object
+ * @return The icon object that was being used
+ */
EAPI Evas_Object *elm_button_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Turn on/off the autorepeat event generated when the button is kept pressed
+ *
+ * When off, no autorepeat is performed and buttons emit a normal @c clicked
+ * signal when they are clicked.
+ *
+ * When on, keeping a button pressed will continuously emit a @c repeated
+ * signal until the button is released. The time it takes until it starts
+ * emitting the signal is given by
+ * elm_button_autorepeat_initial_timeout_set(), and the time between each
+ * new emission by elm_button_autorepeat_gap_timeout_set().
+ *
+ * @param obj The button object
+ * @param on A bool to turn on/off the event
+ */
EAPI void elm_button_autorepeat_set(Evas_Object *obj, Eina_Bool on) EINA_ARG_NONNULL(1);
+ /**
+ * Get whether the autorepeat feature is enabled
+ *
+ * @param obj The button object
+ * @return EINA_TRUE if autorepeat is on, EINA_FALSE otherwise
+ *
+ * @see elm_button_autorepeat_set()
+ */
EAPI Eina_Bool elm_button_autorepeat_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set the initial timeout before the autorepeat event is generated
+ *
+ * Sets the timeout, in seconds, since the button is pressed until the
+ * first @c repeated signal is emitted. If @p t is 0.0 or less, there
+ * won't be any delay and the even will be fired the moment the button is
+ * pressed.
+ *
+ * @param obj The button object
+ * @param t Timeout in seconds
+ *
+ * @see elm_button_autorepeat_set()
+ * @see elm_button_autorepeat_gap_timeout_set()
+ */
EAPI void elm_button_autorepeat_initial_timeout_set(Evas_Object *obj, double t) EINA_ARG_NONNULL(1);
+ /**
+ * Get the initial timeout before the autorepeat event is generated
+ *
+ * @param obj The button object
+ * @return Timeout in seconds
+ *
+ * @see elm_button_autorepeat_initial_timeout_set()
+ */
EAPI double elm_button_autorepeat_initial_timeout_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set the interval between each generated autorepeat event
+ *
+ * After the first @c repeated event is fired, all subsequent ones will
+ * follow after a delay of @p t seconds for each.
+ *
+ * @param obj The button object
+ * @param t Interval in seconds
+ *
+ * @see elm_button_autorepeat_initial_timeout_set()
+ */
EAPI void elm_button_autorepeat_gap_timeout_set(Evas_Object *obj, double t) EINA_ARG_NONNULL(1);
- EAPI double elm_button_autorepeat_gap_timeout_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- /* available styles:
- * default
- * anchor
- * hoversel_vertical
- * hoversel_vertical_entry
+ /**
+ * Get the interval between each generated autorepeat event
+ *
+ * @param obj The button object
+ * @return Interval in seconds
*/
- /* smart callbacks called:
- * "clicked" - the user clicked the button
- * "repeated" - the user pressed the button without releasing it
- * "unpressed" - when the button is unpressed (released)
+ EAPI double elm_button_autorepeat_gap_timeout_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * @}
*/
/* fileselector */
EAPI void elm_label_text_align_set(Evas_Object *obj, const char *alignmode) EINA_ARG_NONNULL(1);
EAPI void elm_label_background_color_set(Evas_Object *obj, unsigned int r, unsigned int g, unsigned int b, unsigned int a) EINA_ARG_NONNULL(1);
EAPI void elm_label_ellipsis_set(Evas_Object *obj, Eina_Bool ellipsis) EINA_ARG_NONNULL(1);
- EAPI void elm_label_wrap_mode_set(Evas_Object *obj, Eina_Bool wrapmode) EINA_ARG_NONNULL(1);
++ EINA_DEPRECATED EAPI void elm_label_wrap_mode_set(Evas_Object *obj, Eina_Bool wrapmode) EINA_ARG_NONNULL(1);
EAPI void elm_label_slide_set(Evas_Object *obj, Eina_Bool slide) EINA_ARG_NONNULL(1);
EAPI Eina_Bool elm_label_slide_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_label_slide_duration_set(Evas_Object *obj, int duration) EINA_ARG_NONNULL(1);
- EAPI int elm_label_slide_duration_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_label_slide_duration_set(Evas_Object *obj, double duration) EINA_ARG_NONNULL(1);
+ EAPI double elm_label_slide_duration_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
/* available styles:
* default
* marker
EAPI void elm_table_pack(Evas_Object *obj, Evas_Object *subobj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
EAPI void elm_table_unpack(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1);
EAPI void elm_table_clear(Evas_Object *obj, Eina_Bool clear) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_table_pack_set(Evas_Object *subobj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
+ EAPI void elm_table_pack_get(Evas_Object *subobj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1);
+
/* gengrid */
typedef struct _Elm_Gengrid_Item_Class Elm_Gengrid_Item_Class;
typedef struct _Elm_Gengrid_Item_Class_Func Elm_Gengrid_Item_Class_Func;
EAPI Eina_Bool elm_entry_is_empty(const Evas_Object *obj) EINA_ARG_NONNULL(1);
EAPI const char *elm_entry_selection_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
EAPI void elm_entry_entry_insert(Evas_Object *obj, const char *entry) EINA_ARG_NONNULL(1);
- EAPI void elm_entry_line_wrap_set(Evas_Object *obj, Eina_Bool wrap) EINA_ARG_NONNULL(1);
- EAPI void elm_entry_line_char_wrap_set(Evas_Object *obj, Eina_Bool wrap) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap) EINA_ARG_NONNULL(1);
++ EINA_DEPRECATED EAPI void elm_entry_line_char_wrap_set(Evas_Object *obj, Eina_Bool wrap) EINA_ARG_NONNULL(1);
EAPI void elm_entry_editable_set(Evas_Object *obj, Eina_Bool editable) EINA_ARG_NONNULL(1);
EAPI Eina_Bool elm_entry_editable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
EAPI void elm_entry_select_none(Evas_Object *obj) EINA_ARG_NONNULL(1);
EAPI void elm_entry_autosave_set(Evas_Object *obj, Eina_Bool autosave) EINA_ARG_NONNULL(1);
EAPI Eina_Bool elm_entry_autosave_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
EAPI void elm_entry_cnp_textonly_set(Evas_Object *obj, Eina_Bool textonly) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_entry_cnp_textonly_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_entry_cnp_textonly_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_autocapitalization_set(Evas_Object *obj, Eina_Bool autocap);
+ EAPI void elm_entry_autoperiod_set(Evas_Object *obj, Eina_Bool autoperiod);
+ EAPI void elm_entry_autoenable_returnkey_set(Evas_Object *obj, Eina_Bool on);
+ EAPI void elm_entry_input_panel_enabled_set(Evas_Object *obj, Eina_Bool enabled);
+ EAPI void elm_entry_input_panel_layout_set(Evas_Object *obj, Elm_Input_Panel_Layout layout);
+ EAPI Ecore_IMF_Context *elm_entry_imf_context_get(Evas_Object *obj);
+ EAPI void elm_entry_matchlist_set(Evas_Object *obj, Eina_List *match_list, Eina_Bool case_sensitive);
+ EAPI Eina_Bool elm_entry_is_empty(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_magnifier_type_set(Evas_Object *obj, int type) EINA_ARG_NONNULL(1);
-
-
+ EAPI void elm_entry_scrollable_set(Evas_Object *obj, Eina_Bool scroll);
+ EAPI Eina_Bool elm_entry_scrollable_get(const Evas_Object *obj);
+ EAPI void elm_entry_icon_set(Evas_Object *obj, Evas_Object *icon);
+ EAPI Evas_Object *elm_entry_icon_get(const Evas_Object *obj);
+ EAPI Evas_Object *elm_entry_icon_unset(Evas_Object *obj);
+ EAPI void elm_entry_icon_visible_set(Evas_Object *obj, Eina_Bool setting);
+ EAPI void elm_entry_end_set(Evas_Object *obj, Evas_Object *end);
+ EAPI Evas_Object *elm_entry_end_get(const Evas_Object *obj);
+ EAPI Evas_Object *elm_entry_end_unset(Evas_Object *obj);
+ EAPI void elm_entry_end_visible_set(Evas_Object *obj, Eina_Bool setting);
+ EAPI void elm_entry_scrollbar_policy_set(Evas_Object *obj, Elm_Scroller_Policy h, Elm_Scroller_Policy v);
+ EAPI void elm_entry_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce);
+ EAPI void elm_entry_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce);
-
++
/* pre-made filters for entries */
typedef struct _Elm_Entry_Filter_Limit_Size Elm_Entry_Filter_Limit_Size;
struct _Elm_Entry_Filter_Limit_Size
*/
/* anchorblock */
- typedef struct _Elm_Entry_Anchorblock_Info Elm_Entry_Anchorblock_Info;
- struct _Elm_Entry_Anchorblock_Info
- {
- const char *name;
- int button;
- Evas_Object *hover;
- struct {
- Evas_Coord x, y, w, h;
- } anchor, hover_parent;
- Eina_Bool hover_left : 1;
- Eina_Bool hover_right : 1;
- Eina_Bool hover_top : 1;
- Eina_Bool hover_bottom : 1;
- };
- EAPI Evas_Object *elm_anchorblock_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
- EAPI void elm_anchorblock_text_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1);
- EAPI const char *elm_anchorblock_text_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_anchorblock_hover_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1);
- EAPI Evas_Object *elm_anchorblock_hover_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_anchorblock_hover_style_set(Evas_Object *obj, const char *style) EINA_ARG_NONNULL(1);
- EAPI const char *elm_anchorblock_hover_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_anchorblock_hover_end(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_anchorblock_item_provider_append(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *anchorblock, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
- EAPI void elm_anchorblock_item_provider_prepend(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *anchorblock, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
- EAPI void elm_anchorblock_item_provider_remove(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *anchorblock, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
- /* smart callbacks called:
- * "anchor,clicked" - achor called was clicked | event_info = Elm_Entry_Anchorblock_Info
+ /**
+ * @defgroup Anchorblock Anchorblock
+ *
+ * Anchorblock is for displaying text that contains markup with anchors
+ * like <c>\<a href=1234\>something\</\></c> in it.
+ *
+ * Besides being styled differently, the anchorblock widget provides the
+ * necessary functionality so that clicking on these anchors brings up a
+ * popup with user defined content such as "call", "add to contacts" or
+ * "open web page". This popup is provided using the @ref Hover widget.
+ *
+ * This widget emits the following signals:
+ * @li "anchor,clicked": will be called when an anchor is clicked. The
+ * @p event_info parameter on the callback will be a pointer of type
+ * ::Elm_Entry_Anchorblock_Info.
+ *
+ * @see Anchorview
+ * @see Entry
+ * @see Hover
+ *
+ * Since examples are usually better than plain words, we might as well
+ * try @ref tutorial_anchorblock_example "one".
+ */
+ /**
+ * @page tutorial_anchorblock_example Anchorblock/Anchorview example
+ * This exampel will show both Anchorblock and @ref Anchorview,
+ * since both are very similar and it's easier to show them once and side
+ * by side, so the difference is more clear.
+ *
+ * We'll show the relevant snippets of the code here, but the full example
+ * can be found here... sorry, @ref anchorblock_example_01.c "here".
+ *
+ * As for the actual example, it's just a simple window with an anchorblock
+ * and an anchorview, both containing the same text. After including
+ * Elementary.h and declaring some functions we'll need, we jump to our
+ * elm_main (see ELM_MAIN) and create our window.
+ * @dontinclude anchorblock_example_01.c
+ * @skip int
+ * @until const char
+ * @until ;
+ *
+ * With the needed variables declared, we'll create the window and a box to
+ * hold our widgets, but we don't need to go through that here.
+ *
+ * In order to make clear where the anchorblock ends and the anchorview
+ * begins, they'll be each inside a @ref Frame. After creating the frame,
+ * the anchorblock follows.
+ * @skip elm_frame_add
+ * @until elm_frame_content_set
+ *
+ * Nothing out of the ordinary there. What's worth mentioning is the call
+ * to elm_anchorblock_hover_parent_set(). We are telling our widget that
+ * when an anchor is clicked, the hover for the popup will cover the entire
+ * window. This affects the area that will be obscured by the hover and
+ * where clicking will dismiss it, as well as the calculations it does to
+ * inform the best locations where to insert the popups content.
+ * Other than that, the code is pretty standard. We also need to set our
+ * callback for when an anchor is clicked, since it's our task to populate
+ * the popup. There's no default for it.
+ *
+ * The anchorview is no different, we only change a few things so it looks
+ * different.
+ * @until elm_frame_content_set
+ *
+ * Then we run, so stuff works and close our main function in the usual way.
+ * @until ELM_MAIN
+ *
+ * Now, a little note. Normally you would use either one of anchorblock or
+ * anchorview, set your one callback to clicks and do your stuff in there.
+ * In this example, however, there are a few tricks to make it easier to
+ * show both widgets in one go (and to save me some typing). So we have
+ * two callbacks, one per widget, that will call a common function to do
+ * the rest. The trick is using ::Elm_Entry_Anchorblock_Info for the
+ * anchorview too, since both are equal, and passing a callback to use
+ * for our buttons to end the hover, because each widget has a different
+ * function for it.
+ * @until _anchorview_clicked_cb
+ * @until }
+ *
+ * The meat of our popup is in the following function. We check what kind
+ * of menu we need to show, based on the name set to the anchor in the
+ * markup text. If there's no type (something went wrong, no valid contact
+ * in the address list) we are just putting a button that does nothing, but
+ * it's perfectly reasonable to just end the hover and call it quits.
+ *
+ * Our popup will consist of one main button in the middle of our hover,
+ * and possibly a secondary button and a list of other options. We'll create
+ * first our main button and check what kind of popup we need afterwards.
+ * @skip static void
+ * @skip static void
+ * @until eina_stringshare_add
+ * @until }
+ *
+ * Each button has two callbacks, one is our hack to close the hover
+ * properly based on which widget it belongs to, the other a simple
+ * printf that will show the action with the anchors own data. This is
+ * not how you would usually do it. Instead, the common case is to have
+ * one callback for the button that will know which function to call to end
+ * things, but since we are doing it this way it's worth noting that
+ * smart callbacks will be called in reverse in respect to the order they
+ * were added, and since our @c btn_end_cb will close the hover, and thus
+ * delete our buttons, the other callback wouldn't be called if we had
+ * added it before.
+ *
+ * After our telephone popup, there are a few others that are practically
+ * the same, so they won't be shown here.
+ *
+ * Once we are done with that, it's time to place our actions into our
+ * hover. Main button goes in the middle without much questioning, and then
+ * we see if we have a secondary button and a box of extra options.
+ * Because I said so, secondary button goes on either side and box of
+ * options either on top or below the main one, but to choose which
+ * exactly, we use the hints our callback info has, which saves us from
+ * having to do the math and see which side has more space available, with
+ * a little special case where we delete our extra stuff if there's nowhere
+ * to place it.
+ * @skip url:
+ * @skip }
+ * @skip evas_object_smart
+ * @until evas_object_del(box)
+ * @until }
+ * @until }
+ *
+ * The example will look like this:
+ * @image html screenshots/anchorblock_01.png
+ * @image latex screenshots/anchorblock_01.eps
+ *
+ * @example anchorblock_example_01.c
+ */
+ /**
+ * @addtogroup Anchorblock
+ * @{
+ */
+ /**
+ * @typedef Elm_Entry_Anchorblock_Info
+ *
+ * The info sent in the callback for "anchor,clicked" signals emitted by
+ * the Anchorblock widget.
+ */
+ typedef struct _Elm_Entry_Anchorblock_Info Elm_Entry_Anchorblock_Info;
+ /**
+ * @struct _Elm_Entry_Anchorblock_Info
+ *
+ * The info sent in the callback for "anchor,clicked" signals emitted by
+ * the Anchorblock widget.
+ */
+ struct _Elm_Entry_Anchorblock_Info
+ {
+ const char *name; /**< Name of the anchor, as indicated in its href
+ attribute */
+ int button; /**< The mouse button used to click on it */
+ Evas_Object *hover; /**< The hover object to use for the popup */
+ struct {
+ Evas_Coord x, y, w, h;
+ } anchor, /**< Geometry selection of text used as anchor */
+ hover_parent; /**< Geometry of the object used as parent by the
+ hover */
+ Eina_Bool hover_left : 1; /**< Hint indicating if there's space
+ for content on the left side of
+ the hover. Before calling the
+ callback, the widget will make the
+ necessary calculations to check
+ which sides are fit to be set with
+ content, based on the position the
+ hover is activated and its distance
+ to the edges of its parent object
+ */
+ Eina_Bool hover_right : 1; /**< Hint indicating content fits on
+ the right side of the hover.
+ See @ref hover_left */
+ Eina_Bool hover_top : 1; /**< Hint indicating content fits on top
+ of the hover. See @ref hover_left */
+ Eina_Bool hover_bottom : 1; /**< Hint indicating content fits
+ below the hover. See @ref
+ hover_left */
+ };
+ /**
+ * Add a new Anchorblock object
+ *
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
+ */
+ EAPI Evas_Object *elm_anchorblock_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ /**
+ * Set the text to show in the anchorblock
+ *
+ * Sets the text of the anchorblock to @p text. This text can include markup
+ * format tags, including <c>\<a href=anchorname\></a></c> to begin a segment
+ * of text that will be specially styled and react to click events, ended
+ * with either of \</a\> or \</\>. When clicked, the anchor will emit an
+ * "anchor,clicked" signal that you can attach a callback to with
+ * evas_object_smart_callback_add(). The name of the anchor given in the
+ * event info struct will be the one set in the href attribute, in this
+ * case, anchorname.
+ *
+ * Other markup can be used to style the text in different ways, but it's
+ * up to the style defined in the theme which tags do what.
+ */
+ EAPI void elm_anchorblock_text_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1);
+ /**
+ * Get the markup text set for the anchorblock
+ *
+ * Retrieves the text set on the anchorblock, with markup tags included.
+ *
+ * @param obj The anchorblock object
+ * @return The markup text set or @c NULL if nothing was set or an error
+ * occurred
+ */
+ EAPI const char *elm_anchorblock_text_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set the parent of the hover popup
+ *
+ * Sets the parent object to use by the hover created by the anchorblock
+ * when an anchor is clicked. See @ref Hover for more details on this.
+ *
+ * @param obj The anchorblock object
+ * @param parent The object to use as parent for the hover
+ */
+ EAPI void elm_anchorblock_hover_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1);
+ /**
+ * Get the parent of the hover popup
+ *
+ * Get the object used as parent for the hover created by the anchorblock
+ * widget. See @ref Hover for more details on this.
+ * If no parent is set, the same anchorblock object will be used.
+ *
+ * @param obj The anchorblock object
+ * @return The object used as parent for the hover, NULL if none is set.
+ */
+ EAPI Evas_Object *elm_anchorblock_hover_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set the style that the hover should use
+ *
+ * When creating the popup hover, anchorblock will request that it's
+ * themed according to @p style.
+ *
+ * @param obj The anchorblock object
+ * @param style The style to use for the underlying hover
+ *
+ * @see elm_object_style_set()
+ */
+ EAPI void elm_anchorblock_hover_style_set(Evas_Object *obj, const char *style) EINA_ARG_NONNULL(1);
+ /**
+ * Get the style that the hover should use
+ *
+ * Get the style the hover created by anchorblock will use.
+ *
+ * @param obj The anchorblock object
+ * @return The style to use by the hover. NULL means the default is used.
+ *
+ * @see elm_object_style_set()
+ */
+ EAPI const char *elm_anchorblock_hover_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Ends the hover popup in the anchorblock
+ *
+ * When an anchor is clicked, the anchorblock widget will create a hover
+ * object to use as a popup with user provided content. This function
+ * terminates this popup, returning the anchorblock to its normal state.
+ *
+ * @param obj The anchorblock object
+ */
+ EAPI void elm_anchorblock_hover_end(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Appends a custom item provider to the given anchorblock
+ *
+ * Appends the given function to the list of items providers. This list is
+ * called, one function at a time, with the given @p data pointer, the
+ * anchorblock object and, in the @p item parameter, the item name as
+ * referenced in its href string. Following functions in the list will be
+ * called in order until one of them returns something different to NULL,
+ * which should be an Evas_Object which will be used in place of the item
+ * element.
+ *
+ * Items in the markup text take the form \<item relsize=16x16 vsize=full
+ * href=item/name\>\</item\>
+ *
+ * @param obj The anchorblock object
+ * @param func The function to add to the list of providers
+ * @param data User data that will be passed to the callback function
+ *
+ * @see elm_entry_item_provider_append()
+ */
+ EAPI void elm_anchorblock_item_provider_append(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *anchorblock, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
+ /**
+ * Prepend a custom item provider to the given anchorblock
+ *
+ * Like elm_anchorblock_item_provider_append(), but it adds the function
+ * @p func to the beginning of the list, instead of the end.
+ *
+ * @param obj The anchorblock object
+ * @param func The function to add to the list of providers
+ * @param data User data that will be passed to the callback function
+ */
+ EAPI void elm_anchorblock_item_provider_prepend(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *anchorblock, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
+ /**
+ * Remove a custom item provider from the list of the given anchorblock
+ *
+ * Removes the function and data pairing that matches @p func and @p data.
+ * That is, unless the same function and same user data are given, the
+ * function will not be removed from the list. This allows us to add the
+ * same callback several times, with different @p data pointers and be
+ * able to remove them later without conflicts.
+ *
+ * @param obj The anchorblock object
+ * @param func The function to remove from the list
+ * @param data The data matching the function to remove from the list
+ */
+ EAPI void elm_anchorblock_item_provider_remove(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *anchorblock, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
+ /**
+ * @}
*/
- /* bubble */
- EAPI Evas_Object *elm_bubble_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
- EAPI void elm_bubble_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
- EAPI const char *elm_bubble_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_bubble_info_set(Evas_Object *obj, const char *info) EINA_ARG_NONNULL(1);
- EAPI const char *elm_bubble_info_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ /**
+ * @defgroup Bubble Bubble
+ *
+ * @brief The Bubble is a widget to show text similarly to how speech is
+ * represented in comics.
+ *
+ * The bubble widget contains 5 important visual elements:
+ * @li The frame is a rectangle with rounded rectangles and an "arrow".
+ * @li The @p icon is an image to which the frame's arrow points to.
+ * @li The @p label is a text which appears to the right of the icon if the
+ * corner is "top_left" or "bottom_left" and is right aligned to the frame
+ * otherwise.
+ * @li The @p info is a text which appears to the right of the label. Info's
+ * font is of a ligther color than label.
+ * @li The @p content is an evas object that is shown inside the frame.
+ *
+ * The position of the arrow, icon, label and info depends on which corner is
+ * selected. The four available corners are:
+ * @li "top_left" - Default
+ * @li "top_right"
+ * @li "bottom_left"
+ * @li "bottom_right"
+ *
+ * Signals that you can add callbacks for are:
+ * @li "clicked" - This is called when a user has clicked the bubble.
+ *
+ * For an example of using a buble see @ref bubble_01_example_page "this".
+ *
+ * @{
+ */
+ /**
+ * Add a new bubble to the parent
+ *
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
+ *
+ * This function adds a text bubble to the given parent evas object.
+ */
+ EAPI Evas_Object *elm_bubble_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ /**
+ * Set the label of the bubble
+ *
+ * @param obj The bubble object
+ * @param label The string to set in the label
+ *
+ * This function sets the title of the bubble. Where this appears depends on
+ * the selected corner.
+ */
+ EAPI void elm_bubble_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
+ /**
+ * Get the label of the bubble
+ *
+ * @param obj The bubble object
+ * @return The string of set in the label
+ *
+ * This function gets the title of the bubble.
+ */
+ EAPI const char *elm_bubble_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set the info of the bubble
+ *
+ * @param obj The bubble object
+ * @param info The given info about the bubble
+ *
+ * This function sets the info of the bubble. Where this appears depends on
+ * the selected corner.
+ */
+ EAPI void elm_bubble_info_set(Evas_Object *obj, const char *info) EINA_ARG_NONNULL(1);
+ /**
+ * Get the info of the bubble
+ *
+ * @param obj The bubble object
+ *
+ * @return The "info" string of the bubble
+ *
+ * This function gets the info text.
+ */
+ EAPI const char *elm_bubble_info_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set the content to be shown in the bubble
+ *
+ * Once the content object is set, a previously set one will be deleted.
+ * If you want to keep the old content object, use the
+ * elm_bubble_content_unset() function.
+ *
+ * @param obj The bubble object
+ * @param content The given content of the bubble
+ *
+ * This function sets the content shown on the middle of the bubble.
+ */
EAPI void elm_bubble_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
+ /**
+ * Get the content shown in the bubble
+ *
+ * Return the content object which is set for this widget.
+ *
+ * @param obj The bubble object
+ * @return The content that is being used
+ */
EAPI Evas_Object *elm_bubble_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Unset the content shown in the bubble
+ *
+ * Unparent and return the content object which was set for this widget.
+ *
+ * @param obj The bubble object
+ * @return The content that was being used
+ */
EAPI Evas_Object *elm_bubble_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set the icon of the bubble
+ *
+ * Once the icon object is set, a previously set one will be deleted.
+ * If you want to keep the old content object, use the
+ * elm_icon_content_unset() function.
+ *
+ * @param obj The bubble object
+ * @param icon The given icon for the bubble
+ */
EAPI void elm_bubble_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
+ /**
+ * Get the icon of the bubble
+ *
+ * @param obj The bubble object
+ * @return The icon for the bubble
+ *
+ * This function gets the icon shown on the top left of bubble.
+ */
EAPI Evas_Object *elm_bubble_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Unset the icon of the bubble
+ *
+ * Unparent and return the icon object which was set for this widget.
+ *
+ * @param obj The bubble object
+ * @return The icon that was being used
+ */
EAPI Evas_Object *elm_bubble_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EINA_DEPRECATED EAPI void elm_bubble_sweep_layout_set(Evas_Object *obj, Evas_Object *sweep) EINA_ARG_NONNULL(1);
- EINA_DEPRECATED EAPI Evas_Object *elm_bubble_sweep_layout_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set the corner of the bubble
+ *
+ * @param obj The bubble object.
+ * @param corner The given corner for the bubble.
+ *
+ * This function sets the corner of the bubble. The corner will be used to
+ * determine where the arrow in the frame points to and where label, icon and
+ * info arre shown.
+ *
+ * Possible values for corner are:
+ * @li "top_left" - Default
+ * @li "top_right"
+ * @li "bottom_left"
+ * @li "bottom_right"
+ */
EAPI void elm_bubble_corner_set(Evas_Object *obj, const char *corner) EINA_ARG_NONNULL(1, 2);
+ /**
+ * Get the corner of the bubble
+ *
+ * @param obj The bubble object.
+ * @return The given corner for the bubble.
+ *
+ * This function gets the selected corner of the bubble.
+ */
EAPI const char *elm_bubble_corner_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- /* smart callbacks called:
- * "clicked" - the user clicked the bubble
- * "sweep,left,right" - when bubble is sweeped from left to right, this signal is sent.
- * "sweep,right,left" - when bubble is sweeped from right to left, this signal is sent.
++
++ EINA_DEPRECATED EAPI void elm_bubble_sweep_layout_set(Evas_Object *obj, Evas_Object *sweep) EINA_ARG_NONNULL(1);
++ EINA_DEPRECATED EAPI Evas_Object *elm_bubble_sweep_layout_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
++
+ /**
+ * @}
*/
/* photo */
* "scroll,edge,right" - the list is scrolled until the right edge
*/
+ // FIXME: incomplete - carousel. don't use this until this comment is removed
+ typedef struct _Elm_Carousel_Item Elm_Carousel_Item;
+ EAPI Evas_Object *elm_carousel_add(Evas_Object *parent);
+ EAPI Elm_Carousel_Item *elm_carousel_item_add(Evas_Object *obj, Evas_Object *icon, const char *label, Evas_Smart_Cb func, const void *data);
+ EAPI void elm_carousel_item_del(Elm_Carousel_Item *item);
+ EAPI void elm_carousel_item_select(Elm_Carousel_Item *item);
+ /* smart callbacks called:
+ * "clicked" - when the user clicks on a carousel item and becomes selected
+ */
+
/* slider */
EAPI Evas_Object *elm_slider_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
- EAPI void elm_slider_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
- EAPI const char *elm_slider_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_slider_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI const char *elm_slider_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
EAPI void elm_slider_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
EAPI Evas_Object *elm_slider_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
EAPI Evas_Object *elm_slider_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
* expensive reactions to the value change.
*/
- typedef enum _Elm_Actionslider_Pos
- {
- ELM_ACTIONSLIDER_NONE = 0,
- ELM_ACTIONSLIDER_LEFT = 1 << 0,
- ELM_ACTIONSLIDER_CENTER = 1 << 1,
- ELM_ACTIONSLIDER_RIGHT = 1 << 2,
- ELM_ACTIONSLIDER_ALL = (1 << 3) -1
- } Elm_Actionslider_Pos;
+
+ /* actionslider */
+
- typedef enum _Elm_Actionslider_Pos
+ /**
+ * @addtogroup Actionslider Actionslider
+ *
+ * A actionslider is a switcher for 2 or 3 labels with customizable magnet
+ * properties. The indicator is the element the user drags to choose a label.
+ * When the position is set with magnet, when released the indicator will be
+ * moved to it if it's nearest the magnetized position.
+ *
+ * @note By default all positions are set as enabled.
+ *
+ * Signals that you can add callbacks for are:
+ *
+ * "selected" - when user selects an enabled position (the label is passed
+ * as event info)".
+ * @n
+ * "pos_changed" - when the indicator reaches any of the positions("left",
+ * "right" or "center").
+ *
+ * See an example of actionslider usage @ref actionslider_example_page "here"
+ * @{
+ */
+
+ typedef enum _Elm_Actionslider_Indicator_Pos
+ {
+ ELM_ACTIONSLIDER_INDICATOR_NONE,
+ ELM_ACTIONSLIDER_INDICATOR_LEFT,
+ ELM_ACTIONSLIDER_INDICATOR_RIGHT,
+ ELM_ACTIONSLIDER_INDICATOR_CENTER
+ } Elm_Actionslider_Indicator_Pos;
+
+ typedef enum _Elm_Actionslider_Magnet_Pos
+ {
+ ELM_ACTIONSLIDER_MAGNET_NONE = 0,
+ ELM_ACTIONSLIDER_MAGNET_LEFT = 1 << 0,
+ ELM_ACTIONSLIDER_MAGNET_CENTER = 1 << 1,
+ ELM_ACTIONSLIDER_MAGNET_RIGHT= 1 << 2,
+ ELM_ACTIONSLIDER_MAGNET_ALL = (1 << 3) -1,
+ ELM_ACTIONSLIDER_MAGNET_BOTH = (1 << 3)
+ } Elm_Actionslider_Magnet_Pos;
+
+ typedef enum _Elm_Actionslider_Label_Pos
{
- ELM_ACTIONSLIDER_NONE = 0,
- ELM_ACTIONSLIDER_LEFT = 1 << 0,
- ELM_ACTIONSLIDER_CENTER = 1 << 1,
- ELM_ACTIONSLIDER_RIGHT = 1 << 2,
- ELM_ACTIONSLIDER_ALL = (1 << 3) -1
- } Elm_Actionslider_Pos;
+ ELM_ACTIONSLIDER_LABEL_LEFT,
+ ELM_ACTIONSLIDER_LABEL_RIGHT,
+ ELM_ACTIONSLIDER_LABEL_CENTER,
+ ELM_ACTIONSLIDER_LABEL_BUTTON
+ } Elm_Actionslider_Label_Pos;
+
- EAPI Evas_Object *elm_actionslider_add(Evas_Object *parent);
- EAPI void elm_actionslider_indicator_pos_set(Evas_Object *obj, Elm_Actionslider_Indicator_Pos pos);
- EAPI Elm_Actionslider_Indicator_Pos elm_actionslider_indicator_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_actionslider_magnet_pos_set(Evas_Object *obj, Elm_Actionslider_Magnet_Pos pos);
- EAPI Elm_Actionslider_Magnet_Pos elm_actionslider_magnet_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_actionslider_label_set(Evas_Object *obj, Elm_Actionslider_Label_Pos pos, const char *label);
- EAPI void elm_actionslider_labels_get(const Evas_Object *obj, const char **left_label, const char **center_label, const char **right_label) EINA_ARG_NONNULL(1);
- EAPI const char *elm_actionslider_selected_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_actionslider_enabled_pos_set(Evas_Object *obj, Elm_Actionslider_Magnet_Pos pos) EINA_ARG_NONNULL(1);
- EAPI Elm_Actionslider_Magnet_Pos elm_actionslider_enabled_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_actionslider_indicator_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
- EAPI const char *elm_actionslider_indicator_label_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_actionslider_hold(Evas_Object *obj, Eina_Bool flag);
+ /* smart callbacks called:
+ * "indicator,position" - when a button reaches to the special position like "left", "right" and "center".
+ */
- * Set actionslider labels.
- *
- * @param obj The actionslider object
- * @param left_label The label to be set on the left.
- * @param center_label The label to be set on the center.
- * @param right_label The label to be set on the right.
- * @deprecated use elm_object_text_set() instead.
- */
- EINA_DEPRECATED EAPI void elm_actionslider_labels_set(Evas_Object *obj, const char *left_label, const char *center_label, const char *right_label) EINA_ARG_NONNULL(1);
+ /**
+ * Add a new actionslider to the parent.
+ *
+ * @param parent The parent object
+ * @return The new actionslider object or NULL if it cannot be created
+ */
+ EAPI Evas_Object *elm_actionslider_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
++
+ /**
- * @deprecated use elm_object_text_set() instead.
++ * Set actionslider label.
++ *
++ * @param[in] obj The actionslider object
++ * @param[in] pos The position of the label.
++ * (ELM_ACTIONSLIDER_LABEL_LEFT, ELM_ACTIONSLIDER_LABEL_RIGHT)
++ * @param label The label which is going to be set.
++ */
++ EAPI void elm_actionslider_label_set(Evas_Object *obj, Elm_Actionslider_Label_Pos pos, const char *label) EINA_ARG_NONNULL(1);
+ /**
+ * Get actionslider labels.
+ *
+ * @param obj The actionslider object
+ * @param left_label A char** to place the left_label of @p obj into.
+ * @param center_label A char** to place the center_label of @p obj into.
+ * @param right_label A char** to place the right_label of @p obj into.
- EINA_DEPRECATED EAPI void elm_actionslider_labels_get(const Evas_Object *obj, const char **left_label, const char **center_label, const char **right_label) EINA_ARG_NONNULL(1);
+ */
- EAPI void elm_actionslider_indicator_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1);
++ EAPI void elm_actionslider_labels_get(const Evas_Object *obj, const char **left_label, const char **center_label, const char **right_label) EINA_ARG_NONNULL(1);
+ /**
+ * Get actionslider selected label.
+ *
+ * @param obj The actionslider object
+ * @return The selected label
+ */
+ EAPI const char *elm_actionslider_selected_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set actionslider indicator position.
+ *
+ * @param obj The actionslider object.
+ * @param pos The position of the indicator.
+ */
- EAPI Elm_Actionslider_Pos elm_actionslider_indicator_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
++ EAPI void elm_actionslider_indicator_pos_set(Evas_Object *obj, Elm_Actionslider_Indicator_Pos pos) EINA_ARG_NONNULL(1);
+ /**
+ * Get actionslider indicator position.
+ *
+ * @param obj The actionslider object.
+ * @return The position of the indicator.
+ */
- * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT)
++ EAPI Elm_Actionslider_Indicator_Pos elm_actionslider_indicator_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set actionslider magnet position. To make multiple positions magnets @c or
- EAPI void elm_actionslider_magnet_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1);
++ * them together(e.g.: ELM_ACTIONSLIDER_MAGNET_LEFT | ELM_ACTIONSLIDER_MAGNET_RIGHT)
+ *
+ * @param obj The actionslider object.
+ * @param pos Bit mask indicating the magnet positions.
+ */
- EAPI Elm_Actionslider_Pos elm_actionslider_magnet_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
++ EAPI void elm_actionslider_magnet_pos_set(Evas_Object *obj, Elm_Actionslider_Magnet_Pos pos) EINA_ARG_NONNULL(1);
+ /**
+ * Get actionslider magnet position.
+ *
+ * @param obj The actionslider object.
+ * @return The positions with magnet property.
+ */
- * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT).
++ EAPI Elm_Actionslider_Magnet_Pos elm_actionslider_magnet_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set actionslider enabled position. To set multiple positions as enabled @c or
- EAPI void elm_actionslider_enabled_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1);
++ * them together(e.g.: ELM_ACTIONSLIDER_MAGNET_LEFT | ELM_ACTIONSLIDER_MAGNET_RIGHT).
+ *
+ * @note All the positions are enabled by default.
+ *
+ * @param obj The actionslider object.
+ * @param pos Bit mask indicating the enabled positions.
+ */
- EAPI Elm_Actionslider_Pos elm_actionslider_enabled_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
++ EAPI void elm_actionslider_enabled_pos_set(Evas_Object *obj, Elm_Actionslider_Magnet_Pos pos) EINA_ARG_NONNULL(1);
+ /**
+ * Get actionslider enabled position.
+ *
+ * @param obj The actionslider object.
+ * @return The enabled positions.
+ */
- * @deprecated use elm_object_text_set() instead.
++ EAPI Elm_Actionslider_Magnet_Pos elm_actionslider_enabled_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set the label used on the indicator.
+ *
+ * @param obj The actionslider object
+ * @param label The label to be set on the indicator.
+ * @deprecated use elm_object_text_set() instead.
+ */
+ EINA_DEPRECATED EAPI void elm_actionslider_indicator_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
+ /**
+ * Get the label used on the indicator object.
+ *
+ * @param obj The actionslider object
+ * @return The indicator label
- * @}
++ * @deprecated use elm_object_text_get() instead.
+ */
+ EINA_DEPRECATED EAPI const char *elm_actionslider_indicator_label_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
++
+ /**
++ * Hold actionslider object movement.
++ *
++ * @param[in] obj The actionslider object
++ * @param[in] flag Actionslider hold/release
++ * (EINA_TURE = hold/EIN_FALSE = release)
++ *
++ * @ingroup Actionslider
++ */
++ EAPI void elm_actionslider_hold(Evas_Object *obj, Eina_Bool flag) EINA_ARG_NONNULL(1);
++
++
++ /**
++ *
+ */
+
/* genlist */
typedef enum _Elm_Genlist_Item_Flags
{
* down.
* "multi,pinch,out" - This is called when the genlist is multi-touch pinched
* out.
- * "multi,pinch,in" - This is called when the genlist is multi-touch pinched
- * in.
- * "swipe" - This is called when the genlist is swiped.
- */
+ * "multi,pinch,in" - This is called when the genlist is multi-touch pinched in.
+ */
+
+ EAPI void elm_genlist_edit_mode_set(Evas_Object *obj, Eina_Bool edit_mode) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_genlist_edit_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_genlist_item_rename_mode_set(Elm_Genlist_Item *it, Eina_Bool renamed) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_genlist_item_rename_mode_get(Elm_Genlist_Item *item) EINA_ARG_NONNULL(1);
+ EAPI void elm_genlist_item_move_after(Elm_Genlist_Item *it, Elm_Genlist_Item *after ) EINA_ARG_NONNULL(1, 2);
+ EAPI void elm_genlist_item_move_before(Elm_Genlist_Item *it, Elm_Genlist_Item *before) EINA_ARG_NONNULL(1, 2);
+ EAPI void elm_genlist_effect_set(const Evas_Object *obj, Eina_Bool emode) EINA_ARG_NONNULL(1);
+ EAPI void elm_genlist_pinch_zoom_set(Evas_Object *obj, Eina_Bool emode) EINA_ARG_NONNULL(1);
+ EAPI void elm_genlist_pinch_zoom_mode_set(Evas_Object *obj, Eina_Bool emode) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_genlist_pinch_zoom_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_genlist_reorder_mode_set(Evas_Object *obj, Eina_Bool reorder_mode) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_genlist_reorder_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_genlist_item_mode_set(Elm_Genlist_Item *it, const char *mode_type, Eina_Bool mode_set) EINA_ARG_NONNULL(1, 2);
+ EAPI const char *elm_genlist_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI const Elm_Genlist_Item *elm_genlist_mode_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- /* check */
+ /* check */
EAPI Evas_Object *elm_check_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
- EAPI void elm_check_label_set(Evas_Object *obj, const char *label); EINA_ARG_NONNULL(1)
- EAPI const char *elm_check_label_get(const Evas_Object *obj); EINA_ARG_NONNULL(1)
- EINA_DEPRECATED EAPI void elm_check_label_set(Evas_Object *obj, const char *label); EINA_ARG_NONNULL(1)
- EINA_DEPRECATED EAPI const char *elm_check_label_get(const Evas_Object *obj); EINA_ARG_NONNULL(1)
-- EAPI void elm_check_icon_set(Evas_Object *obj, Evas_Object *icon); EINA_ARG_NONNULL(1)
-- EAPI Evas_Object *elm_check_icon_get(const Evas_Object *obj); EINA_ARG_NONNULL(1)
-- EAPI Evas_Object *elm_check_icon_unset(Evas_Object *obj); EINA_ARG_NONNULL(1)
-- EAPI void elm_check_state_set(Evas_Object *obj, Eina_Bool state); EINA_ARG_NONNULL(1)
-- EAPI Eina_Bool elm_check_state_get(const Evas_Object *obj); EINA_ARG_NONNULL(1)
-- EAPI void elm_check_state_pointer_set(Evas_Object *obj, Eina_Bool *statep); EINA_ARG_NONNULL(1)
++ EINA_DEPRECATED EAPI void elm_check_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
++ EINA_DEPRECATED EAPI const char *elm_check_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
++ EAPI void elm_check_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
++ EAPI Evas_Object *elm_check_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
++ EAPI Evas_Object *elm_check_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
++ EAPI void elm_check_state_set(Evas_Object *obj, Eina_Bool state) EINA_ARG_NONNULL(1);
++ EAPI Eina_Bool elm_check_state_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
++ EAPI void elm_check_state_pointer_set(Evas_Object *obj, Eina_Bool *statep) EINA_ARG_NONNULL(1);
/* smart callbacks called:
* "changed" - This is called whenever the user changes the state of one of the check object.
*/
* "changed" - when the radio status is changed
*/
+ EAPI Evas_Object *elm_page_control_add(Evas_Object *parent);
+ EAPI void elm_page_control_page_count_set(Evas_Object *obj, unsigned int page_count);
+ EAPI void elm_page_control_page_id_set(Evas_Object *obj, unsigned int page_id);
+ EAPI unsigned int elm_page_control_page_id_get(Evas_Object *obj);
++
/* pager */
EAPI Evas_Object *elm_pager_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
EAPI void elm_pager_content_push(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
*/
/* scrolledentry */
- EAPI Evas_Object *elm_scrolled_entry_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_scrolled_entry_single_line_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_password_set(Evas_Object *obj, Eina_Bool password) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_scrolled_entry_password_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_entry_set(Evas_Object *obj, const char *entry) EINA_ARG_NONNULL(1);
- EAPI const char *elm_scrolled_entry_entry_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_scrolled_entry_is_empty(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI const char *elm_scrolled_entry_selection_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_entry_insert(Evas_Object *obj, const char *entry) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_line_wrap_set(Evas_Object *obj, Eina_Bool wrap) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_line_char_wrap_set(Evas_Object *obj, Eina_Bool wrap) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_editable_set(Evas_Object *obj, Eina_Bool editable) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_scrolled_entry_editable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_select_none(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_select_all(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_scrolled_entry_cursor_next(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_scrolled_entry_cursor_prev(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_scrolled_entry_cursor_up(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_scrolled_entry_cursor_down(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_cursor_begin_set(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_cursor_end_set(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_cursor_line_begin_set(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_cursor_line_end_set(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_cursor_selection_begin(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_cursor_selection_end(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_scrolled_entry_cursor_is_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_scrolled_entry_cursor_is_visible_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI const char *elm_scrolled_entry_cursor_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_selection_cut(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_selection_copy(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_selection_paste(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_context_menu_clear(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_context_menu_item_add(Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_context_menu_disabled_set(Evas_Object *obj, Eina_Bool disabled) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_scrolled_entry_context_menu_disabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_scrollbar_policy_set(Evas_Object *obj, Elm_Scroller_Policy h, Elm_Scroller_Policy v) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1, 2);
- EAPI Evas_Object *elm_scrolled_entry_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI Evas_Object *elm_scrolled_entry_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_icon_visible_set(Evas_Object *obj, Eina_Bool setting) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_end_set(Evas_Object *obj, Evas_Object *end) EINA_ARG_NONNULL(1, 2);
- EAPI Evas_Object *elm_scrolled_entry_end_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI Evas_Object *elm_scrolled_entry_end_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_end_visible_set(Evas_Object *obj, Eina_Bool setting) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_item_provider_append(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *entry, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
- EAPI void elm_scrolled_entry_item_provider_prepend(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *entry, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
- EAPI void elm_scrolled_entry_item_provider_remove(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *entry, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
- EAPI void elm_scrolled_entry_text_filter_append(Evas_Object *obj, void (*func) (void *data, Evas_Object *entry, char **text), void *data) EINA_ARG_NONNULL(1, 2);
- EAPI void elm_scrolled_entry_text_filter_prepend(Evas_Object *obj, void (*func) (void *data, Evas_Object *entry, char **text), void *data) EINA_ARG_NONNULL(1, 2);
- EAPI void elm_scrolled_entry_text_filter_remove(Evas_Object *obj, void (*func) (void *data, Evas_Object *entry, char **text), void *data) EINA_ARG_NONNULL(1, 2);
- EAPI void elm_scrolled_entry_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_file_get(const Evas_Object *obj, const char **file, Elm_Text_Format *format) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_file_save(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_autosave_set(Evas_Object *obj, Eina_Bool autosave) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_scrolled_entry_autosave_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_cnp_textonly_set(Evas_Object *obj, Eina_Bool textonly) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_scrolled_entry_cnp_textonly_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_scrolled_entry_input_panel_enabled_set(Evas_Object *obj, Eina_Bool enabled);
- EAPI void elm_scrolled_entry_input_panel_layout_set(Evas_Object *obj, Elm_Input_Panel_Layout layout);
- EAPI Ecore_IMF_Context *elm_scrolled_entry_imf_context_get(Evas_Object *obj);
- EAPI void elm_scrolled_entry_autocapitalization_set(Evas_Object *obj, Eina_Bool autocap);
- EAPI void elm_scrolled_entry_autoperiod_set(Evas_Object *obj, Eina_Bool autoperiod);
+ EINA_DEPRECATED EAPI Evas_Object *elm_scrolled_entry_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_single_line_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_password_set(Evas_Object *obj, Eina_Bool password) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_password_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_entry_set(Evas_Object *obj, const char *entry) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI const char *elm_scrolled_entry_entry_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_entry_append(Evas_Object *obj, const char *entry) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_is_empty(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI const char *elm_scrolled_entry_selection_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_entry_insert(Evas_Object *obj, const char *entry) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_editable_set(Evas_Object *obj, Eina_Bool editable) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_editable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_select_none(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_select_all(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cursor_next(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cursor_prev(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cursor_up(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cursor_down(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_cursor_begin_set(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_cursor_end_set(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_cursor_line_begin_set(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_cursor_line_end_set(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_cursor_selection_begin(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_cursor_selection_end(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cursor_is_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cursor_is_visible_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI const char *elm_scrolled_entry_cursor_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_cursor_pos_set(Evas_Object *obj, int pos) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI int elm_scrolled_entry_cursor_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_selection_cut(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_selection_copy(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_selection_paste(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_context_menu_clear(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_context_menu_item_add(Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_context_menu_disabled_set(Evas_Object *obj, Eina_Bool disabled) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_context_menu_disabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_scrollbar_policy_set(Evas_Object *obj, Elm_Scroller_Policy h, Elm_Scroller_Policy v) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1, 2);
+ EINA_DEPRECATED EAPI Evas_Object *elm_scrolled_entry_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Evas_Object *elm_scrolled_entry_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_icon_visible_set(Evas_Object *obj, Eina_Bool setting) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_end_set(Evas_Object *obj, Evas_Object *end) EINA_ARG_NONNULL(1, 2);
+ EINA_DEPRECATED EAPI Evas_Object *elm_scrolled_entry_end_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Evas_Object *elm_scrolled_entry_end_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_end_visible_set(Evas_Object *obj, Eina_Bool setting) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_item_provider_append(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *entry, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_item_provider_prepend(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *entry, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_item_provider_remove(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *entry, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_text_filter_append(Evas_Object *obj, void (*func) (void *data, Evas_Object *entry, char **text), void *data) EINA_ARG_NONNULL(1, 2);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_text_filter_prepend(Evas_Object *obj, void (*func) (void *data, Evas_Object *entry, char **text), void *data) EINA_ARG_NONNULL(1, 2);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_text_filter_remove(Evas_Object *obj, void (*func) (void *data, Evas_Object *entry, char **text), void *data) EINA_ARG_NONNULL(1, 2);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_file_get(const Evas_Object *obj, const char **file, Elm_Text_Format *format) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_file_save(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_autosave_set(Evas_Object *obj, Eina_Bool autosave) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_autosave_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_scrolled_entry_cnp_textonly_set(Evas_Object *obj, Eina_Bool textonly) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cnp_textonly_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
++ EINA_DEPRECATED EAPI void elm_scrolled_entry_line_char_wrap_set(Evas_Object *obj, Eina_Bool wrap) EINA_ARG_NONNULL(1);
++ EINA_DEPRECATED EAPI void elm_scrolled_entry_input_panel_enabled_set(Evas_Object *obj, Eina_Bool enabled);
++ EINA_DEPRECATED EAPI void elm_scrolled_entry_input_panel_layout_set(Evas_Object *obj, Elm_Input_Panel_Layout layout);
++ EINA_DEPRECATED EAPI Ecore_IMF_Context *elm_scrolled_entry_imf_context_get(Evas_Object *obj);
++ EINA_DEPRECATED EAPI void elm_scrolled_entry_autocapitalization_set(Evas_Object *obj, Eina_Bool autocap);
++ EINA_DEPRECATED EAPI void elm_scrolled_entry_autoperiod_set(Evas_Object *obj, Eina_Bool autoperiod);
/* conformant */
EAPI Evas_Object *elm_conformant_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
* "selected" - when item is selected (scroller stops)
*/
+ /* datefield */
+ typedef enum _Elm_Datefield_Layout
+ {
+ ELM_DATEFIELD_LAYOUT_TIME,
+ ELM_DATEFIELD_LAYOUT_DATE,
+ ELM_DATEFIELD_LAYOUT_DATEANDTIME
+ } Elm_Datefield_Layout;
+
+ EAPI Evas_Object *elm_datefield_add(Evas_Object *parent);
+ EAPI void elm_datefield_layout_set(Evas_Object *obj, Elm_Datefield_Layout layout);
+ EAPI Elm_Datefield_Layout elm_datefield_layout_get(const Evas_Object *obj);
+ EAPI void elm_datefield_date_set(Evas_Object *obj, int year, int month, int day, int hour, int min);
+ EAPI void elm_datefield_date_get(const Evas_Object *obj, int *year, int *month, int *day, int *hour, int *min);
+ EAPI Eina_Bool elm_datefield_date_max_set(Evas_Object *obj, int year, int month, int day);
+ EAPI void elm_datefield_date_max_get(const Evas_Object *obj, int *year, int *month, int *day);
+ EAPI Eina_Bool elm_datefield_date_min_set(Evas_Object *obj, int year, int month, int day);
+ EAPI void elm_datefield_date_min_get(const Evas_Object *obj, int *year, int *month, int *day);
+ EAPI void elm_datefield_time_mode_set(Evas_Object *obj, Eina_Bool mode);
+ EAPI Eina_Bool elm_datefield_time_mode_get(const Evas_Object *obj);
+ EAPI void elm_datefield_date_format_set(Evas_Object *obj, const char *fmt);
+ EAPI const char *elm_datefield_date_format_get(const Evas_Object *obj);
+ EAPI void elm_datefield_input_panel_state_callback_add(Evas_Object *obj, void (*pEventCallbackFunc) (void *data, Evas_Object *obj, int value), void *data);
+ EAPI void elm_datefield_input_panel_state_callback_del(Evas_Object *obj, void (*pEventCallbackFunc) (void *data, Evas_Object *obj, int value));
+ /* smart callbacks called:
+ * "changed" - when datefield entry is changed, this signal is sent.
+ */
+
+ /* popup */
+ typedef enum _Elm_Popup_Response
+ {
+ ELM_POPUP_RESPONSE_NONE = -1,
+ ELM_POPUP_RESPONSE_TIMEOUT = -2,
+ ELM_POPUP_RESPONSE_OK = -3,
+ ELM_POPUP_RESPONSE_CANCEL = -4,
+ ELM_POPUP_RESPONSE_CLOSE = -5
+ } Elm_Popup_Response;
+
+ typedef enum _Elm_Popup_Mode
+ {
+ ELM_POPUP_TYPE_NONE = 0,
+ ELM_POPUP_TYPE_ALERT = (1 << 0)
+ } Elm_Popup_Mode;
+
+ typedef enum _Elm_Popup_Orient
+ {
+ ELM_POPUP_ORIENT_TOP,
+ ELM_POPUP_ORIENT_CENTER,
+ ELM_POPUP_ORIENT_BOTTOM,
+ ELM_POPUP_ORIENT_LEFT,
+ ELM_POPUP_ORIENT_RIGHT,
+ ELM_POPUP_ORIENT_TOP_LEFT,
+ ELM_POPUP_ORIENT_TOP_RIGHT,
+ ELM_POPUP_ORIENT_BOTTOM_LEFT,
+ ELM_POPUP_ORIENT_BOTTOM_RIGHT
+ } Elm_Popup_Orient;
+
+ /* smart callbacks called:
+ * "response" - when ever popup is closed, this signal is sent with appropriate response id.".
+ */
+
+ EAPI Evas_Object *elm_popup_add(Evas_Object *parent);
+ EAPI void elm_popup_desc_set(Evas_Object *obj, const char *text);
+ EAPI const char *elm_popup_desc_get(Evas_Object *obj);
+ EAPI void elm_popup_title_label_set(Evas_Object *obj, const char *text);
+ EAPI const char *elm_popup_title_label_get(Evas_Object *obj);
+ EAPI void elm_popup_title_icon_set(Evas_Object *obj, Evas_Object *icon);
+ EAPI Evas_Object *elm_popup_title_icon_get(Evas_Object *obj);
+ EAPI void elm_popup_content_set(Evas_Object *obj, Evas_Object *content);
+ EAPI Evas_Object *elm_popup_content_get(Evas_Object *obj);
+ EAPI void elm_popup_buttons_add(Evas_Object *obj,int no_of_buttons, const char *first_button_text, ...);
+ EAPI Evas_Object *elm_popup_with_buttons_add(Evas_Object *parent, const char *title, const char *desc_text,int no_of_buttons, const char *first_button_text, ... );
+ EAPI void elm_popup_timeout_set(Evas_Object *obj, double timeout);
+ EAPI void elm_popup_mode_set(Evas_Object *obj, Elm_Popup_Mode mode);
+ EAPI void elm_popup_response(Evas_Object *obj, int response_id);
+ EAPI void elm_popup_orient_set(Evas_Object *obj, Elm_Popup_Orient orient);
+ EAPI int elm_popup_run(Evas_Object *obj);
+
+ /* NavigationBar */
+ typedef enum
+ {
+ ELM_NAVIGATIONBAR_FUNCTION_BUTTON1,
+ ELM_NAVIGATIONBAR_FUNCTION_BUTTON2,
+ ELM_NAVIGATIONBAR_FUNCTION_BUTTON3,
+ ELM_NAVIGATIONBAR_BACK_BUTTON
+ } Elm_Navi_Button_Type;
+
+ EAPI Evas_Object *elm_navigationbar_add(Evas_Object *parent);
+ EAPI void elm_navigationbar_push(Evas_Object *obj, const char *title, Evas_Object *fn_btn1, Evas_Object *fn_btn2, Evas_Object *fn_btn3, Evas_Object *content);
+ EAPI void elm_navigationbar_pop(Evas_Object *obj);
+ EAPI void elm_navigationbar_to_content_pop(Evas_Object *obj, Evas_Object *content);
+ EAPI void elm_navigationbar_title_label_set(Evas_Object *obj, Evas_Object *content, const char *title);
+ EAPI const char *elm_navigationbar_title_label_get(Evas_Object *obj, Evas_Object *content);
+ EAPI void elm_navigationbar_title_object_add(Evas_Object *obj, Evas_Object *content, Evas_Object *title_obj);
+ EAPI Eina_List *elm_navigationbar_title_object_list_get(Evas_Object *obj, Evas_Object *content);
+ EAPI Evas_Object *elm_navigationbar_content_top_get(Evas_Object *obj);
+ EAPI Evas_Object *elm_navigationbar_content_bottom_get(Evas_Object *obj);
+ EAPI void elm_navigationbar_hidden_set(Evas_Object *obj, Eina_Bool hidden);
+ EAPI void elm_navigationbar_title_button_set(Evas_Object *obj, Evas_Object *content, Evas_Object *button, Elm_Navi_Button_Type button_type);
+ EAPI Evas_Object *elm_navigationbar_title_button_get(Evas_Object *obj, Evas_Object *content, Elm_Navi_Button_Type button_type);
+ EAPI const char *elm_navigationbar_subtitle_label_get(Evas_Object *obj, Evas_Object *content);
+ EAPI void elm_navigationbar_subtitle_label_set(Evas_Object *obj, Evas_Object *content, const char *subtitle);
+ EAPI void elm_navigationbar_title_object_list_unset(Evas_Object *obj, Evas_Object *content, Eina_List **list);
+ EAPI void elm_navigationbar_animation_disabled_set(Evas_Object *obj, Eina_Bool disable);
+ EAPI void elm_navigationbar_title_object_visible_set(Evas_Object *obj, Evas_Object *content, Eina_Bool visible);
+ Eina_Bool elm_navigationbar_title_object_visible_get(Evas_Object *obj, Evas_Object *content);
+ EAPI void elm_navigationbar_title_icon_set(Evas_Object *obj, Evas_Object *content, Evas_Object *icon);
+ EAPI Evas_Object *elm_navigationbar_title_icon_get(Evas_Object *obj, Evas_Object *content);
+
+ /* NavigationBar */
+ typedef enum
+ {
+ ELM_NAVIGATIONBAR_EX_BACK_BUTTON,
+ ELM_NAVIGATIONBAR_EX_FUNCTION_BUTTON1,
+ ELM_NAVIGATIONBAR_EX_FUNCTION_BUTTON2,
+ ELM_NAVIGATIONBAR_EX_FUNCTION_BUTTON3,
+ ELM_NAVIGATIONBAR_EX_MAX
+ } Elm_Navi_ex_Button_Type;
+ typedef struct _Elm_Navigationbar_ex_Item Elm_Navigationbar_ex_Item;
+
+ EAPI Evas_Object *elm_navigationbar_ex_add(Evas_Object *parent);
+ EAPI Elm_Navigationbar_ex_Item *elm_navigationbar_ex_item_push(Evas_Object *obj, Evas_Object *content, const char *item_style);
+ EAPI void elm_navigationbar_ex_item_pop(Evas_Object *obj);
+ EAPI void elm_navigationbar_ex_item_promote(Elm_Navigationbar_ex_Item* item);
+ EAPI void elm_navigationbar_ex_to_item_pop(Elm_Navigationbar_ex_Item* item);
+ EAPI void elm_navigationbar_ex_item_title_label_set(Elm_Navigationbar_ex_Item *item, const char *title);
+ EAPI const char *elm_navigationbar_ex_item_title_label_get(Elm_Navigationbar_ex_Item* item);
+ EAPI Elm_Navigationbar_ex_Item *elm_navigationbar_ex_item_top_get(const Evas_Object *obj);
+ EAPI Elm_Navigationbar_ex_Item *elm_navigationbar_ex_item_bottom_get(const Evas_Object *obj);
+ EAPI void elm_navigationbar_ex_item_title_button_set(Elm_Navigationbar_ex_Item* item, char *btn_label, Evas_Object *icon, int button_type, Evas_Smart_Cb func, const void *data);
+ EAPI Evas_Object *elm_navigationbar_ex_item_title_button_get(Elm_Navigationbar_ex_Item* item, int button_type);
+ EAPI void elm_navigationbar_ex_item_title_object_set(Elm_Navigationbar_ex_Item* item, Evas_Object *title_obj);
+ EAPI Evas_Object *elm_navigationbar_ex_item_title_object_unset(Elm_Navigationbar_ex_Item* item);
+ EAPI void elm_navigationbar_ex_item_title_hidden_set(Elm_Navigationbar_ex_Item* item, Eina_Bool hidden);
+ EAPI Evas_Object *elm_navigationbar_ex_item_title_object_get(Elm_Navigationbar_ex_Item* item);
+ EAPI const char *elm_navigationbar_ex_item_subtitle_label_get(Elm_Navigationbar_ex_Item* item);
+ EAPI void elm_navigationbar_ex_item_subtitle_label_set( Elm_Navigationbar_ex_Item* item, const char *subtitle);
+ EAPI void elm_navigationbar_ex_item_style_set(Elm_Navigationbar_ex_Item* item, const char* item_style);
+ EAPI const char *elm_navigationbar_ex_item_style_get(Elm_Navigationbar_ex_Item* item);
+ EAPI Evas_Object *elm_navigationbar_ex_item_content_unset(Elm_Navigationbar_ex_Item* item);
+ EAPI Evas_Object *elm_navigationbar_ex_item_content_get(Elm_Navigationbar_ex_Item* item);
+ EAPI void elm_navigationbar_ex_delete_on_pop_set(Evas_Object *obj, Eina_Bool del_on_pop);
+ EAPI Evas_Object *elm_navigationbar_ex_item_icon_get(Elm_Navigationbar_ex_Item* item);
+ EAPI void elm_navigationbar_ex_item_icon_set(Elm_Navigationbar_ex_Item* item, Evas_Object *icon);
+ EAPI Evas_Object *elm_navigationbar_ex_item_title_button_unset(Elm_Navigationbar_ex_Item* item, int button_type);
+ EAPI void elm_navigationbar_ex_animation_disable_set(Evas_Object *obj, Eina_Bool disable);
+ EAPI void elm_navigationbar_ex_title_object_visible_set(Elm_Navigationbar_ex_Item* item, Eina_Bool visible);
+ Eina_Bool elm_navigationbar_ex_title_object_visible_get(Elm_Navigationbar_ex_Item* item);
+
+
+ /* Control Bar */
+ #define CONTROLBAR_SYSTEM_ICON_ALBUMS "controlbar_albums"
+ #define CONTROLBAR_SYSTEM_ICON_ARTISTS "controlbar_artists"
+ #define CONTROLBAR_SYSTEM_ICON_SONGS "controlbar_songs"
+ #define CONTROLBAR_SYSTEM_ICON_PLAYLIST "controlbar_playlist"
+ #define CONTROLBAR_SYSTEM_ICON_MORE "controlbar_more"
+ #define CONTROLBAR_SYSTEM_ICON_CONTACTS "controlbar_contacts"
+ #define CONTROLBAR_SYSTEM_ICON_DIALER "controlbar_dialer"
+ #define CONTROLBAR_SYSTEM_ICON_FAVORITES "controlbar_favorites"
+ #define CONTROLBAR_SYSTEM_ICON_LOGS "controlbar_logs"
+
+ typedef enum _Elm_Controlbar_Mode_Type
+ {
+ ELM_CONTROLBAR_MODE_DEFAULT = 0,
+ ELM_CONTROLBAR_MODE_TRANSLUCENCE,
+ ELM_CONTROLBAR_MODE_TRANSPARENCY,
+ ELM_CONTROLBAR_MODE_LARGE,
+ ELM_CONTROLBAR_MODE_SMALL,
+ ELM_CONTROLBAR_MODE_LEFT,
+ ELM_CONTROLBAR_MODE_RIGHT
+ } Elm_Controlbar_Mode_Type;
+
+ typedef struct _Elm_Controlbar_Item Elm_Controlbar_Item;
+
+ EAPI Evas_Object *elm_controlbar_add(Evas_Object *parent);
+ EAPI Elm_Controlbar_Item *elm_controlbar_tab_item_append(Evas_Object *obj, const char *icon_path, const char *label, Evas_Object *view);
+ EAPI Elm_Controlbar_Item *elm_controlbar_tab_item_prepend(Evas_Object *obj, const char *icon_path, const char *label, Evas_Object *view);
+ EAPI Elm_Controlbar_Item *elm_controlbar_tab_item_insert_before(Evas_Object *obj, Elm_Controlbar_Item *before, const char *icon_path, const char *label, Evas_Object *view);
+ EAPI Elm_Controlbar_Item *elm_controlbar_tab_item_insert_after(Evas_Object *obj, Elm_Controlbar_Item *after, const char *icon_path, const char *label, Evas_Object *view);
+ EAPI Elm_Controlbar_Item *elm_controlbar_tool_item_append(Evas_Object *obj, const char *icon_path, const char *label, void (*func) (void *data, Evas_Object *obj, void *event_info), void *data);
+ EAPI Elm_Controlbar_Item *elm_controlbar_tool_item_prepend(Evas_Object *obj, const char *icon_path, const char *label, void (*func) (void *data, Evas_Object *obj, void *event_info), void *data);
+ EAPI Elm_Controlbar_Item *elm_controlbar_tool_item_insert_before(Evas_Object *obj, Elm_Controlbar_Item *before, const char *icon_path, const char *label, void (*func) (void *data, Evas_Object *obj, void *event_info), void *data);
+ EAPI Elm_Controlbar_Item *elm_controlbar_tool_item_insert_after(Evas_Object *obj, Elm_Controlbar_Item *after, const char *icon_path, const char *label, void (*func) (void *data, Evas_Object *obj, void *event_info), void *data);
+ EAPI Elm_Controlbar_Item *elm_controlbar_object_item_append(Evas_Object *obj, Evas_Object *obj_item, const int sel);
+ EAPI Elm_Controlbar_Item *elm_controlbar_object_item_prepend(Evas_Object *obj, Evas_Object *obj_item, const int sel);
+ EAPI Elm_Controlbar_Item *elm_controlbar_object_item_insert_before(Evas_Object *obj, Elm_Controlbar_Item *before, Evas_Object *obj_item, const int sel);
+ EAPI Elm_Controlbar_Item *elm_controlbar_object_item_insert_after(Evas_Object *obj, Elm_Controlbar_Item *after, Evas_Object *obj_item, const int sel);
+ EAPI Evas_Object *elm_controlbar_object_item_object_get(Elm_Controlbar_Item *it);
+ EAPI void elm_controlbar_item_del(Elm_Controlbar_Item *it);
+ EAPI void elm_controlbar_item_select(Elm_Controlbar_Item *it);
+ EAPI void elm_controlbar_item_visible_set(Elm_Controlbar_Item *it, Eina_Bool bar);
+ EAPI Eina_Bool elm_controlbar_item_visible_get(Elm_Controlbar_Item * it);
+ EAPI void elm_controlbar_item_disabled_set(Elm_Controlbar_Item * it, Eina_Bool disabled);
+ EAPI Eina_Bool elm_controlbar_item_disabled_get(Elm_Controlbar_Item * it);
+ EAPI void elm_controlbar_item_icon_set(Elm_Controlbar_Item *it, const char *icon_path);
+ EAPI Evas_Object *elm_controlbar_item_icon_get(Elm_Controlbar_Item *it);
+ EAPI void elm_controlbar_item_label_set(Elm_Controlbar_Item *it, const char *label);
+ EAPI const char *elm_controlbar_item_label_get(Elm_Controlbar_Item *it);
+ EAPI Elm_Controlbar_Item *elm_controlbar_selected_item_get(Evas_Object *obj);
+ EAPI Elm_Controlbar_Item *elm_controlbar_first_item_get(Evas_Object *obj);
+ EAPI Elm_Controlbar_Item *elm_controlbar_last_item_get(Evas_Object *obj);
+ EAPI Eina_List *elm_controlbar_items_get(Evas_Object *obj);
+ EAPI Elm_Controlbar_Item *elm_controlbar_item_prev(Elm_Controlbar_Item *it);
+ EAPI Elm_Controlbar_Item *elm_controlbar_item_next(Elm_Controlbar_Item *it);
+ EAPI void elm_controlbar_item_view_set(Elm_Controlbar_Item *it, Evas_Object * view);
+ EAPI Evas_Object *elm_controlbar_item_view_get(Elm_Controlbar_Item *it);
+ EAPI Evas_Object *elm_controlbar_item_view_unset(Elm_Controlbar_Item *it);
+ EAPI void elm_controlbar_mode_set(Evas_Object *obj, int mode);
+ EAPI void elm_controlbar_alpha_set(Evas_Object *obj, int alpha);
+ EAPI void elm_controlbar_item_auto_align_set(Evas_Object *obj, Eina_Bool auto_align);
+ EAPI void elm_controlbar_vertical_set(Evas_Object *obj, Eina_Bool vertical);
+
++
+ /* SearchBar */
+ EAPI Evas_Object *elm_searchbar_add(Evas_Object *parent);
+ EAPI void elm_searchbar_text_set(Evas_Object *obj, const char *entry);
+ EAPI const char *elm_searchbar_text_get(Evas_Object *obj);
+ EAPI Evas_Object *elm_searchbar_entry_get(Evas_Object *obj);
+ EAPI void elm_searchbar_cancel_button_animation_set(Evas_Object *obj, Eina_Bool cancel_btn_ani_flag);
+ EAPI void elm_searchbar_cancel_button_set(Evas_Object *obj, Eina_Bool visible);
+ EAPI void elm_searchbar_clear(Evas_Object *obj);
+ EAPI void elm_searchbar_boundary_rect_set(Evas_Object *obj, Eina_Bool boundary);
+
/* colorselector */
EAPI Evas_Object *elm_colorselector_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
EAPI void elm_colorselector_color_set(Evas_Object *obj, int r, int g , int b, int a) EINA_ARG_NONNULL(1);
* "dismissed" - the ctxpopup was dismissed
*/
- /* tansit */
- typedef enum
- {
- ELM_TRANSIT_TWEEN_MODE_LINEAR,
- ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL,
- ELM_TRANSIT_TWEEN_MODE_DECELERATE,
- ELM_TRANSIT_TWEEN_MODE_ACCELERATE
- } Elm_Transit_Tween_Mode;
- typedef enum
- {
- ELM_TRANSIT_EFFECT_FLIP_AXIS_X,
- ELM_TRANSIT_EFFECT_FLIP_AXIS_Y
- } Elm_Transit_Effect_Flip_Axis;
- typedef enum
- {
- ELM_TRANSIT_EFFECT_WIPE_DIR_LEFT,
- ELM_TRANSIT_EFFECT_WIPE_DIR_RIGHT,
- ELM_TRANSIT_EFFECT_WIPE_DIR_UP,
- ELM_TRANSIT_EFFECT_WIPE_DIR_DOWN
- } Elm_Transit_Effect_Wipe_Dir;
- typedef enum
- {
- ELM_TRANSIT_EFFECT_WIPE_TYPE_HIDE,
- ELM_TRANSIT_EFFECT_WIPE_TYPE_SHOW
- } Elm_Transit_Effect_Wipe_Type;
-
- typedef struct _Elm_Transit Elm_Transit;
- typedef void Elm_Transit_Effect;
- typedef void (*Elm_Transit_Effect_Transition_Cb) (Elm_Transit_Effect *effect, Elm_Transit *transit, double progress);
- typedef void (*Elm_Transit_Effect_End_Cb) (Elm_Transit_Effect *effect, Elm_Transit *transit);
-
- EAPI Elm_Transit *elm_transit_add(void);
- EAPI void elm_transit_del(Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_effect_add(Elm_Transit *transit, Elm_Transit_Effect_Transition_Cb transition_cb, Elm_Transit_Effect *effect, Elm_Transit_Effect_End_Cb end_cb) EINA_ARG_NONNULL(1, 2);
- EAPI void elm_transit_effect_del(Elm_Transit *transit, Elm_Transit_Effect_Transition_Cb transition_cb, Elm_Transit_Effect *effect) EINA_ARG_NONNULL(1, 2);
- EAPI void elm_transit_object_add(Elm_Transit *transit, Evas_Object *obj) EINA_ARG_NONNULL(1, 2);
- EAPI void elm_transit_object_remove(Elm_Transit *transit, Evas_Object *obj) EINA_ARG_NONNULL(1, 2);
- EAPI const Eina_List *elm_transit_objects_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_objects_final_state_keep_set(Elm_Transit *transit, Eina_Bool state_keep) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_transit_objects_final_state_keep_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EINA_DEPRECATED EAPI void elm_transit_event_block_set(Elm_Transit *transit, Eina_Bool disabled) EINA_ARG_NONNULL(1);
- EINA_DEPRECATED EAPI Eina_Bool elm_transit_event_block_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_event_enabled_set(Elm_Transit *transit, Eina_Bool enabled) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_transit_event_enabled_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_del_cb_set(Elm_Transit *transit, void (*cb)(void *data, Elm_Transit* transit), void *data) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_auto_reverse_set(Elm_Transit *transit, Eina_Bool reverse) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_transit_auto_reverse_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_repeat_times_set(Elm_Transit *transit, int repeat) EINA_ARG_NONNULL(1);
- EAPI int elm_transit_repeat_times_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_tween_mode_set(Elm_Transit *transit, Elm_Transit_Tween_Mode tween_mode) EINA_ARG_NONNULL(1);
- EAPI Elm_Transit_Tween_Mode elm_transit_tween_mode_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_duration_set(Elm_Transit *transit, double duration) EINA_ARG_NONNULL(1);
- EAPI double elm_transit_duration_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_go(Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_paused_set(Elm_Transit *transit, Eina_Bool paused) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_transit_paused_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI double elm_transit_progress_value_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_chain_transit_add(Elm_Transit *transit, Elm_Transit *chain_transit) EINA_ARG_NONNULL(1, 2);
- EAPI Eina_List *elm_transit_chain_transits_get(const Elm_Transit *transit);
-
- EAPI Elm_Transit_Effect *elm_transit_effect_resizing_add(Elm_Transit* transit, Evas_Coord from_w, Evas_Coord from_h, Evas_Coord to_w, Evas_Coord to_h);
- EAPI Elm_Transit_Effect *elm_transit_effect_translation_add(Elm_Transit* transit, Evas_Coord from_dx, Evas_Coord dy, Evas_Coord to_dx, Evas_Coord to_dy);
- EAPI Elm_Transit_Effect *elm_transit_effect_zoom_add(Elm_Transit *transit, float from_rate, float to_rate);
- EAPI Elm_Transit_Effect *elm_transit_effect_flip_add(Elm_Transit *transit, Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw);
- EAPI Elm_Transit_Effect *elm_transit_effect_resizable_flip_add(Elm_Transit *transit, Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw);
- EAPI Elm_Transit_Effect *elm_transit_effect_wipe_add(Elm_Transit *transit, Elm_Transit_Effect_Wipe_Type type, Elm_Transit_Effect_Wipe_Dir dir);
- EAPI Elm_Transit_Effect *elm_transit_effect_color_add(Elm_Transit *transit, unsigned int from_r, unsigned int from_g, unsigned int from_b, unsigned int from_a, unsigned int to_r, unsigned int to_g, unsigned int to_b, unsigned int to_a);
- EAPI Elm_Transit_Effect *elm_transit_effect_fade_add(Elm_Transit *transit);
- EAPI Elm_Transit_Effect *elm_transit_effect_blend_add(Elm_Transit *transit);
- EAPI Elm_Transit_Effect *elm_transit_effect_rotation_add(Elm_Transit *transit, float from_degree, float to_degree);
- EAPI Elm_Transit_Effect *elm_transit_effect_image_animation_add(Elm_Transit *transit, Eina_List *images);
-
+ /* colorpalette */
+ typedef struct _Colorpalette_Color Elm_Colorpalette_Color;
+
+ struct _Colorpalette_Color
+ {
+ unsigned int r, g, b;
+ };
+
+ EAPI Evas_Object *elm_colorpalette_add(Evas_Object *parent);
+ EAPI void elm_colorpalette_color_set(Evas_Object *obj, int color_num, Elm_Colorpalette_Color *color);
+ EAPI void elm_colorpalette_row_column_set(Evas_Object *obj, int row, int col);
+ /* smart callbacks called:
+ * "clicked" - when image clicked
+ */
+
+ /* editfield */
+ EAPI Evas_Object *elm_editfield_add(Evas_Object *parent);
+ EAPI void elm_editfield_label_set(Evas_Object *obj, const char *label);
+ EAPI const char *elm_editfield_label_get(Evas_Object *obj);
+ EAPI void elm_editfield_guide_text_set(Evas_Object *obj, const char *text);
+ EAPI const char *elm_editfield_guide_text_get(Evas_Object *obj);
+ EAPI Evas_Object *elm_editfield_entry_get(Evas_Object *obj);
+// EAPI Evas_Object *elm_editfield_clear_button_show(Evas_Object *obj, Eina_Bool show);
+ EAPI void elm_editfield_right_icon_set(Evas_Object *obj, Evas_Object *icon);
+ EAPI Evas_Object *elm_editfield_right_icon_get(Evas_Object *obj);
+ EAPI void elm_editfield_left_icon_set(Evas_Object *obj, Evas_Object *icon);
+ EAPI Evas_Object *elm_editfield_left_icon_get(Evas_Object *obj);
+ EAPI void elm_editfield_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line);
+ EAPI Eina_Bool elm_editfield_entry_single_line_get(Evas_Object *obj);
+ EAPI void elm_editfield_eraser_set(Evas_Object *obj, Eina_Bool visible);
+ EAPI Eina_Bool elm_editfield_eraser_get(Evas_Object *obj);
+ /* smart callbacks called:
+ * "clicked" - when an editfield is clicked
+ * "unfocused" - when an editfield is unfocused
+ */
+
+
+ /* Sliding Drawer */
+ typedef enum _Elm_SlidingDrawer_Pos
+ {
+ ELM_SLIDINGDRAWER_BOTTOM,
+ ELM_SLIDINGDRAWER_LEFT,
+ ELM_SLIDINGDRAWER_RIGHT,
+ ELM_SLIDINGDRAWER_TOP
+ } Elm_SlidingDrawer_Pos;
+
+ typedef struct _Elm_SlidingDrawer_Drag_Value
+ {
+ double x, y;
+ } Elm_SlidingDrawer_Drag_Value;
+
+ EAPI Evas_Object *elm_slidingdrawer_add(Evas_Object *parent);
+ EAPI void elm_slidingdrawer_content_set (Evas_Object *obj, Evas_Object *content);
+ EAPI Evas_Object *elm_slidingdrawer_content_unset(Evas_Object *obj);
+ EAPI void elm_slidingdrawer_pos_set(Evas_Object *obj, Elm_SlidingDrawer_Pos pos);
+ EAPI void elm_slidingdrawer_max_drag_value_set(Evas_Object *obj, double dw, double dh);
+ EAPI void elm_slidingdrawer_drag_value_set(Evas_Object *obj, double dx, double dy);
+
+ /* multibuttonentry */
+ typedef struct _Multibuttonentry_Item Elm_Multibuttonentry_Item;
+ typedef Eina_Bool (*Elm_Multibuttonentry_Item_Verify_Callback) (Evas_Object *obj, const char *item_label, void *item_data, void *data);
+ EAPI Evas_Object *elm_multibuttonentry_add(Evas_Object *parent);
+ EAPI const char *elm_multibuttonentry_label_get(Evas_Object *obj);
+ EAPI void elm_multibuttonentry_label_set(Evas_Object *obj, const char *label);
+ EAPI Evas_Object *elm_multibuttonentry_entry_get(Evas_Object *obj);
+ EAPI const char * elm_multibuttonentry_guide_text_get(Evas_Object *obj);
+ EAPI void elm_multibuttonentry_guide_text_set(Evas_Object *obj, const char *guidetext);
+ EAPI int elm_multibuttonentry_contracted_state_get(Evas_Object *obj);
+ EAPI void elm_multibuttonentry_contracted_state_set(Evas_Object *obj, int contracted);
+ EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_item_add_start(Evas_Object *obj, const char *label, void *data);
+ EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_item_add_end(Evas_Object *obj, const char *label, void *data);
+ EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_item_add_before(Evas_Object *obj, const char *label, Elm_Multibuttonentry_Item *before, void *data);
+ EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_item_add_after(Evas_Object *obj, const char *label, Elm_Multibuttonentry_Item *after, void *data);
+ EAPI const Eina_List *elm_multibuttonentry_items_get(Evas_Object *obj);
+ EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_item_first_get(Evas_Object *obj);
+ EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_item_last_get(Evas_Object *obj);
+ EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_item_selected_get(Evas_Object *obj);
+ EAPI void elm_multibuttonentry_item_selected_set(Elm_Multibuttonentry_Item *item);
+ EAPI void elm_multibuttonentry_item_unselect_all(Evas_Object *obj);
+ EAPI void elm_multibuttonentry_item_del(Elm_Multibuttonentry_Item *item);
+ EAPI void elm_multibuttonentry_items_del(Evas_Object *obj);
+ EAPI const char *elm_multibuttonentry_item_label_get(Elm_Multibuttonentry_Item *item);
+ EAPI void elm_multibuttonentry_item_label_set(Elm_Multibuttonentry_Item *item, const char *str);
+ EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_item_prev(Elm_Multibuttonentry_Item *item);
+ EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_item_next(Elm_Multibuttonentry_Item *item);
+ EAPI void *elm_multibuttonentry_item_data_get(Elm_Multibuttonentry_Item *item);
+ EAPI void elm_multibuttonentry_item_data_set(Elm_Multibuttonentry_Item *item, void *data);
+ EAPI void elm_multibuttonentry_item_verify_callback_set(Evas_Object *obj, Elm_Multibuttonentry_Item_Verify_Callback func, void *data);
+ /* smart callback called:
+ * "selected" - This signal is emitted when the selected item of multibuttonentry is changed.
+ * "added" - This signal is emitted when a new multibuttonentry item is added.
+ * "deleted" - This signal is emitted when a multibuttonentry item is deleted.
+ * "expanded" - This signal is emitted when a multibuttonentry is expanded.
+ * "contracted" - This signal is emitted when a multibuttonentry is contracted.
+ * "contracted,state,changed" - This signal is emitted when the contracted state of multibuttonentry is changed.
+ * "item,selected" - This signal is emitted when the selected item of multibuttonentry is changed.
+ * "item,added" - This signal is emitted when a new multibuttonentry item is added.
+ * "item,deleted" - This signal is emitted when a multibuttonentry item is deleted.
+ * "item,clicked" - This signal is emitted when a multibuttonentry item is clicked.
+ * "clicked" - This signal is emitted when a multibuttonentry is clicked.
+ * "unfocused" - This signal is emitted when a multibuttonentry is unfocused.
+ */
+ /* available styles:
+ * default
+ */
+
+ /* stackedicon */
+ typedef struct _Stackedicon_Item Elm_Stackedicon_Item;
+ EAPI Evas_Object *elm_stackedicon_add(Evas_Object *parent);
+ EAPI Elm_Stackedicon_Item *elm_stackedicon_item_append(Evas_Object *obj, const char *path);
+ EAPI Elm_Stackedicon_Item *elm_stackedicon_item_prepend(Evas_Object *obj, const char *path);
+ EAPI void elm_stackedicon_item_del(Elm_Stackedicon_Item *it);
+ EAPI Eina_List *elm_stackedicon_item_list_get(Evas_Object *obj);
+ /* smart callback called:
+ * "expanded" - This signal is emitted when a stackedicon is expanded.
+ * "clicked" - This signal is emitted when a stackedicon is clicked.
+ */
+ /* available styles:
+ * default
+ */
+
+ /* dialoguegroup */
+ typedef struct _Dialogue_Item Dialogue_Item;
+
+ typedef enum _Elm_Dialoguegourp_Item_Style
+ {
+ ELM_DIALOGUEGROUP_ITEM_STYLE_DEFAULT = 0,
+ ELM_DIALOGUEGROUP_ITEM_STYLE_EDITFIELD = (1 << 0),
+ ELM_DIALOGUEGROUP_ITEM_STYLE_EDITFIELD_WITH_TITLE = (1 << 1),
+ ELM_DIALOGUEGROUP_ITEM_STYLE_EDIT_TITLE = (1 << 2),
+ ELM_DIALOGUEGROUP_ITEM_STYLE_HIDDEN = (1 << 3),
+ ELM_DIALOGUEGROUP_ITEM_STYLE_DATAVIEW = (1 << 4),
+ ELM_DIALOGUEGROUP_ITEM_STYLE_NO_BG = (1 << 5),
+ ELM_DIALOGUEGROUP_ITEM_STYLE_SUB = (1 << 6),
+ ELM_DIALOGUEGROUP_ITEM_STYLE_EDIT = (1 << 7),
+ ELM_DIALOGUEGROUP_ITEM_STYLE_EDIT_MERGE = (1 << 8),
+ ELM_DIALOGUEGROUP_ITEM_STYLE_LAST = (1 << 9)
+ } Elm_Dialoguegroup_Item_Style;
+
+ EINA_DEPRECATED EAPI Evas_Object *elm_dialoguegroup_add(Evas_Object *parent);
+ EINA_DEPRECATED EAPI Dialogue_Item *elm_dialoguegroup_append(Evas_Object *obj, Evas_Object *subobj, Elm_Dialoguegroup_Item_Style style);
+ EINA_DEPRECATED EAPI Dialogue_Item *elm_dialoguegroup_prepend(Evas_Object *obj, Evas_Object *subobj, Elm_Dialoguegroup_Item_Style style);
+ EINA_DEPRECATED EAPI Dialogue_Item *elm_dialoguegroup_insert_after(Evas_Object *obj, Evas_Object *subobj, Dialogue_Item *after, Elm_Dialoguegroup_Item_Style style);
+ EINA_DEPRECATED EAPI Dialogue_Item *elm_dialoguegroup_insert_before(Evas_Object *obj, Evas_Object *subobj, Dialogue_Item *before, Elm_Dialoguegroup_Item_Style style);
+ EINA_DEPRECATED EAPI void elm_dialoguegroup_remove(Dialogue_Item *item);
+ EINA_DEPRECATED EAPI void elm_dialoguegroup_remove_all(Evas_Object *obj);
+ EINA_DEPRECATED EAPI void elm_dialoguegroup_title_set(Evas_Object *obj, const char *title);
+ EINA_DEPRECATED EAPI const char *elm_dialoguegroup_title_get(Evas_Object *obj);
+ EINA_DEPRECATED EAPI void elm_dialoguegroup_press_effect_set(Dialogue_Item *item, Eina_Bool press);
+ EINA_DEPRECATED EAPI Eina_Bool elm_dialoguegroup_press_effect_get(Dialogue_Item *item);
+ EINA_DEPRECATED EAPI Evas_Object *elm_dialoguegroup_item_content_get(Dialogue_Item *item);
+ EINA_DEPRECATED EAPI void elm_dialoguegroup_item_style_set(Dialogue_Item *item, Elm_Dialoguegroup_Item_Style style);
+ EINA_DEPRECATED EAPI Elm_Dialoguegroup_Item_Style elm_dialoguegroup_item_style_get(Dialogue_Item *item);
+ EINA_DEPRECATED EAPI void elm_dialoguegroup_item_disabled_set(Dialogue_Item *item, Eina_Bool disabled);
+ EINA_DEPRECATED EAPI Eina_Bool elm_dialoguegroup_item_disabled_get(Dialogue_Item *item);
+
+ /* Dayselector */
+ typedef enum
+ {
+ ELM_DAYSELECTOR_SUN,
+ ELM_DAYSELECTOR_MON,
+ ELM_DAYSELECTOR_TUE,
+ ELM_DAYSELECTOR_WED,
+ ELM_DAYSELECTOR_THU,
+ ELM_DAYSELECTOR_FRI,
+ ELM_DAYSELECTOR_SAT
+ } Elm_DaySelector_Day;
+
+ EAPI Evas_Object *elm_dayselector_add(Evas_Object *parent);
+ EAPI Eina_Bool elm_dayselector_check_state_get(Evas_Object *obj, Elm_DaySelector_Day day);
+ EAPI void elm_dayselector_check_state_set(Evas_Object *obj, Elm_DaySelector_Day day, Eina_Bool checked);
+
- /* NoContents */
- EAPI Evas_Object *elm_nocontents_add(Evas_Object *parent);
- EAPI void elm_nocontents_label_set(Evas_Object *obj, const char *label);
- EAPI const char *elm_nocontents_label_get(const Evas_Object *obj);
- EAPI void elm_nocontents_custom_set(const Evas_Object *obj, Evas_Object *custom);
- EAPI Evas_Object *elm_nocontents_custom_get(const Evas_Object *obj);
-
- /* TickerNoti */
- typedef enum
- {
- ELM_TICKERNOTI_DEFAULT,
- ELM_TICKERNOTI_DETAILVIEW
- } Elm_Tickernoti_Mode;
-
- EAPI Evas_Object *elm_tickernoti_add (Evas_Object *parent);
- EAPI void elm_tickernoti_icon_set (const Evas_Object *obj, Evas_Object *icon);
- EAPI Evas_Object *elm_tickernoti_icon_get (const Evas_Object *obj);
- EAPI void elm_tickernoti_label_set (Evas_Object *obj, const char *label);
- EAPI const char *elm_tickernoti_label_get (const Evas_Object *obj);
- EAPI void elm_tickernoti_detailview_label_set (Evas_Object *obj, const char *label);
- EAPI const char *elm_tickernoti_detailview_label_get (const Evas_Object *obj);
- EAPI void elm_tickernoti_detailview_button_set (const Evas_Object *obj, Evas_Object *button);
- EAPI Evas_Object *elm_tickernoti_detailview_button_get (const Evas_Object *obj);
- EAPI void elm_tickernoti_detailview_icon_set (const Evas_Object *obj, Evas_Object *icon);
- EAPI Evas_Object *elm_tickernoti_detailview_icon_get (const Evas_Object *obj);
- EAPI Evas_Object *elm_tickernoti_detailview_get (const Evas_Object *obj);
- EAPI int elm_tickernoti_rotation_get (const Evas_Object *obj);
- EAPI void elm_tickernoti_rotation_set (const Evas_Object *obj, int angle);
- EAPI void elm_tickernoti_mode_set (const Evas_Object *obj, Elm_Tickernoti_Mode mode);
- EAPI Elm_Tickernoti_Mode elm_tickernoti_mode_get (const Evas_Object *obj);
-
+ /* Image Slider */
+ typedef struct _Imageslider_Item Elm_Imageslider_Item;
+ typedef void (*Elm_Imageslider_Cb)(void *data, Evas_Object *obj, void *event_info);
+ EAPI Evas_Object *elm_imageslider_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EAPI Elm_Imageslider_Item *elm_imageslider_item_append(Evas_Object *obj, const char *photo_file, Elm_Imageslider_Cb func, void *data) EINA_ARG_NONNULL(1);
+ EAPI Elm_Imageslider_Item *elm_imageslider_item_append_relative(Evas_Object *obj, const char *photo_file, Elm_Imageslider_Cb func, unsigned int index, void *data) EINA_ARG_NONNULL(1);
+ EAPI Elm_Imageslider_Item *elm_imageslider_item_prepend(Evas_Object *obj, const char *photo_file, Elm_Imageslider_Cb func, void *data) EINA_ARG_NONNULL(1);
+ EAPI void elm_imageslider_item_del(Elm_Imageslider_Item *it) EINA_ARG_NONNULL(1);
+ EAPI Elm_Imageslider_Item *elm_imageslider_selected_item_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_imageslider_item_selected_get(Elm_Imageslider_Item *it) EINA_ARG_NONNULL(1);
+ EAPI void elm_imageslider_item_selected_set(Elm_Imageslider_Item *it) EINA_ARG_NONNULL(1);
+ EAPI const char *elm_imageslider_item_photo_file_get(Elm_Imageslider_Item *it) EINA_ARG_NONNULL(1);
+ EAPI Elm_Imageslider_Item *elm_imageslider_item_prev(Elm_Imageslider_Item *it) EINA_ARG_NONNULL(1);
+ EAPI Elm_Imageslider_Item *elm_imageslider_item_next(Elm_Imageslider_Item *it) EINA_ARG_NONNULL(1);
+ EAPI void elm_imageslider_prev(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_imageslider_next(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_imageslider_item_photo_file_set(Elm_Imageslider_Item *it, const char *photo_file) EINA_ARG_NONNULL(1,2);
+ EAPI void elm_imageslider_item_update(Elm_Imageslider_Item *it) EINA_ARG_NONNULL(1);
+
- /* Store */
- typedef struct _Elm_Store Elm_Store;
- typedef struct _Elm_Store_DBsystem Elm_Store_DBsystem;
- typedef struct _Elm_Store_Filesystem Elm_Store_Filesystem;
- typedef struct _Elm_Store_Item Elm_Store_Item;
- typedef struct _Elm_Store_Item_DBsystem Elm_Store_Item_DBsystem;
- typedef struct _Elm_Store_Item_Filesystem Elm_Store_Item_Filesystem;
- typedef struct _Elm_Store_Item_Info Elm_Store_Item_Info;
- typedef struct _Elm_Store_Item_Info_Filesystem Elm_Store_Item_Info_Filesystem;
- typedef struct _Elm_Store_Item_Mapping Elm_Store_Item_Mapping;
- typedef struct _Elm_Store_Item_Mapping_Empty Elm_Store_Item_Mapping_Empty;
- typedef struct _Elm_Store_Item_Mapping_Icon Elm_Store_Item_Mapping_Icon;
- typedef struct _Elm_Store_Item_Mapping_Photo Elm_Store_Item_Mapping_Photo;
- typedef struct _Elm_Store_Item_Mapping_Custom Elm_Store_Item_Mapping_Custom;
-
- typedef Eina_Bool (*Elm_Store_Item_List_Cb) (void *data, Elm_Store_Item_Info *info);
- typedef void (*Elm_Store_Item_Fetch_Cb) (void *data, Elm_Store_Item *sti, Elm_Store_Item_Info *info);
- typedef void (*Elm_Store_Item_Unfetch_Cb) (void *data, Elm_Store_Item *sti, Elm_Store_Item_Info *info);
- typedef void (*Elm_Store_Item_Select_Cb) (void *data, Elm_Store_Item *sti);
- typedef int (*Elm_Store_Item_Sort_Cb) (void *data, Elm_Store_Item_Info *info1, Elm_Store_Item_Info *info2);
- typedef void (*Elm_Store_Item_Free_Cb) (void *data, Elm_Store_Item_Info *info);
- typedef void *(*Elm_Store_Item_Mapping_Cb) (void *data, Elm_Store_Item *sti, const char *part);
+ /* transit */
+ /**
+ *
+ * @defgroup Transit Transit
+ * @ingroup Elementary
+ *
+ * Transit is designed to apply various animated transition effects to @c
+ * Evas_Object, such like translation, rotation, etc. For using these
+ * effects, create an @ref Elm_Transit and add the desired transition effects.
+ *
+ * Once the effects are added into transit, they will be automatically
+ * managed (their callback will be called until the duration is ended, and
+ * they will be deleted on completion).
+ *
+ * Example:
+ * @code
+ * Elm_Transit *trans = elm_transit_add();
+ * elm_transit_object_add(trans, obj);
+ * elm_transit_effect_translation_add(trans, 0, 0, 280, 280
+ * elm_transit_duration_set(transit, 1);
+ * elm_transit_auto_reverse_set(transit, EINA_TRUE);
+ * elm_transit_tween_mode_set(transit, ELM_TRANSIT_TWEEN_MODE_DECELERATE);
+ * elm_transit_repeat_times_set(transit, 3);
+ * @endcode
+ *
+ * Some transition effects are used to change the properties of objects. They
+ * are:
+ * @li @ref elm_transit_effect_translation_add
+ * @li @ref elm_transit_effect_color_add
+ * @li @ref elm_transit_effect_rotation_add
+ * @li @ref elm_transit_effect_wipe_add
+ * @li @ref elm_transit_effect_zoom_add
+ * @li @ref elm_transit_effect_resizing_add
+ *
+ * Other transition effects are used to make one object disappear and another
+ * object appear on its old place. These effects are:
+ *
+ * @li @ref elm_transit_effect_flip_add
+ * @li @ref elm_transit_effect_resizable_flip_add
+ * @li @ref elm_transit_effect_fade_add
+ * @li @ref elm_transit_effect_blend_add
+ *
+ * It's also possible to make a transition chain with @ref
+ * elm_transit_chain_transit_add.
+ *
+ * @warning We strongly recommend to use elm_transit just when edje can not do
+ * the trick. Edje has more advantage than Elm_Transit, it has more flexibility and
+ * animations can be manipulated inside the theme.
+ *
+ * List of examples:
+ * @li @ref transit_example_01_explained
+ * @li @ref transit_example_02_explained
+ * @li @ref transit_example_03_c
+ * @li @ref transit_example_04_c
+ *
+ * @{
+ */
+ /**
+ * @enum Elm_Transit_Tween_Mode
+ *
+ * The type of acceleration used in the transition.
+ */
typedef enum
{
- ELM_STORE_ITEM_MAPPING_NONE = 0,
- ELM_STORE_ITEM_MAPPING_LABEL, // const char * -> label
- ELM_STORE_ITEM_MAPPING_STATE, // Eina_Bool -> state
- ELM_STORE_ITEM_MAPPING_ICON, // char * -> icon path
- ELM_STORE_ITEM_MAPPING_PHOTO, // char * -> photo path
- ELM_STORE_ITEM_MAPPING_CUSTOM, // item->custom(it->data, it, part) -> void * (-> any)
- // can add more here as needed by common apps
- ELM_STORE_ITEM_MAPPING_LAST
- } Elm_Store_Item_Mapping_Type;
+ ELM_TRANSIT_TWEEN_MODE_LINEAR, /**< Constant speed */
+ ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL, /**< Starts slow, increase speed
+ over time, then decrease again
+ and stop slowly */
+ ELM_TRANSIT_TWEEN_MODE_DECELERATE, /**< Starts fast and decrease
+ speed over time */
+ ELM_TRANSIT_TWEEN_MODE_ACCELERATE /**< Starts slow and increase speed
+ over time */
+ } Elm_Transit_Tween_Mode;
- struct _Elm_Store_Item_Mapping_Icon
+ /**
+ * @enum Elm_Transit_Effect_Flip_Axis
+ *
+ * The axis where flip effect should be applied.
+ */
+ typedef enum
{
- // FIXME: allow edje file icons
- int w, h;
- Elm_Icon_Lookup_Order lookup_order;
- Eina_Bool standard_name : 1;
- Eina_Bool no_scale : 1;
- Eina_Bool smooth : 1;
- Eina_Bool scale_up : 1;
- Eina_Bool scale_down : 1;
- };
-
- struct _Elm_Store_Item_Mapping_Empty
+ ELM_TRANSIT_EFFECT_FLIP_AXIS_X, /**< Flip on X axis */
+ ELM_TRANSIT_EFFECT_FLIP_AXIS_Y /**< Flip on Y axis */
+ } Elm_Transit_Effect_Flip_Axis;
+ /**
+ * @enum Elm_Transit_Effect_Wipe_Dir
+ *
+ * The direction where the wipe effect should occur.
+ */
+ typedef enum
{
- Eina_Bool dummy;
- };
-
- struct _Elm_Store_Item_Mapping_Photo
+ ELM_TRANSIT_EFFECT_WIPE_DIR_LEFT, /**< Wipe to the left */
+ ELM_TRANSIT_EFFECT_WIPE_DIR_RIGHT, /**< Wipe to the right */
+ ELM_TRANSIT_EFFECT_WIPE_DIR_UP, /**< Wipe up */
+ ELM_TRANSIT_EFFECT_WIPE_DIR_DOWN /**< Wipe down */
+ } Elm_Transit_Effect_Wipe_Dir;
+ /** @enum Elm_Transit_Effect_Wipe_Type
+ *
+ * Whether the wipe effect should show or hide the object.
+ */
+ typedef enum
{
- int size;
- };
+ ELM_TRANSIT_EFFECT_WIPE_TYPE_HIDE, /**< Hide the object during the
+ animation */
+ ELM_TRANSIT_EFFECT_WIPE_TYPE_SHOW /**< Show the object during the
+ animation */
+ } Elm_Transit_Effect_Wipe_Type;
- struct _Elm_Store_Item_Mapping_Custom
- {
- Elm_Store_Item_Mapping_Cb func;
- };
+ /**
+ * @typedef Elm_Transit
+ *
+ * The Transit created with elm_transit_add(). This type has the information
+ * about the objects which the transition will be applied, and the
+ * transition effects that will be used. It also contains info about
+ * duration, number of repetitions, auto-reverse, etc.
+ */
+ typedef struct _Elm_Transit Elm_Transit;
+ typedef void Elm_Transit_Effect;
+ /**
+ * @typedef Elm_Transit_Effect_Transition_Cb
+ *
+ * Transition callback called for this effect on each transition iteration.
+ */
+ typedef void (*Elm_Transit_Effect_Transition_Cb) (Elm_Transit_Effect *effect, Elm_Transit *transit, double progress);
+ /**
+ * Elm_Transit_Effect_End_Cb
+ *
+ * Transition callback called for this effect when the transition is over.
+ */
+ typedef void (*Elm_Transit_Effect_End_Cb) (Elm_Transit_Effect *effect, Elm_Transit *transit);
+
+ /**
+ * Add new transit.
+ *
+ * @note Is not necessary to delete the transit object, it will be deleted at
+ * the end of its operation.
+ * @note The transit will start playing when the program enter in the main loop, is not
+ * necessary to give a start to the transit.
+ *
+ * @return The transit object.
+ *
+ * @ingroup Transit
+ */
+ EAPI Elm_Transit *elm_transit_add(void);
+
+ /**
+ * Stops the animation and delete the @p transit object.
+ *
+ * Call this function if you wants to stop the animation before the duration
+ * time. Make sure the @p transit object is still alive with
+ * elm_transit_del_cb_set() function.
+ * All added effects will be deleted, calling its repective data_free_cb
+ * functions. The function setted by elm_transit_del_cb_set() will be called.
+ *
+ * @see elm_transit_del_cb_set()
+ *
+ * @param transit The transit object to be deleted.
+ *
+ * @ingroup Transit
+ * @warning Just call this function if you are sure the transit is alive.
+ */
+ EAPI void elm_transit_del(Elm_Transit *transit) EINA_ARG_NONNULL(1);
+
+ /**
+ * Add a new effect to the transit.
+ *
+ * @note The cb function and the data are the key to the effect. If you try to
+ * add an already added effect, nothing is done.
+ * @note After the first addition of an effect in @p transit, if its
+ * effect list become empty again, the @p transit will be killed by
+ * elm_transit_del(transit) function.
+ *
+ * Exemple:
+ * @code
+ * Elm_Transit *transit = elm_transit_add();
+ * elm_transit_effect_add(transit,
+ * elm_transit_effect_blend_op,
+ * elm_transit_effect_blend_context_new(),
+ * elm_transit_effect_blend_context_free);
+ * @endcode
+ *
+ * @param transit The transit object.
+ * @param transition_cb The operation function. It is called when the
+ * animation begins, it is the function that actually performs the animation.
+ * It is called with the @p data, @p transit and the time progression of the
+ * animation (a double value between 0.0 and 1.0).
+ * @param effect The context data of the effect.
+ * @param end_cb The function to free the context data, it will be called
+ * at the end of the effect, it must finalize the animation and free the
+ * @p data.
+ *
+ * @ingroup Transit
+ * @warning The transit free the context data at the and of the transition with
+ * the data_free_cb function, do not use the context data in another transit.
+ */
+ EAPI void elm_transit_effect_add(Elm_Transit *transit, Elm_Transit_Effect_Transition_Cb transition_cb, Elm_Transit_Effect *effect, Elm_Transit_Effect_End_Cb end_cb) EINA_ARG_NONNULL(1, 2);
+
+ /**
+ * Delete an added effect.
+ *
+ * This function will remove the effect from the @p transit, calling the
+ * data_free_cb to free the @p data.
+ *
+ * @see elm_transit_effect_add()
+ *
+ * @note If the effect is not found, nothing is done.
+ * @note If the effect list become empty, this function will call
+ * elm_transit_del(transit), that is, it will kill the @p transit.
+ *
+ * @param transit The transit object.
+ * @param transition_cb The operation function.
+ * @param effect The context data of the effect.
+ *
+ * @ingroup Transit
+ */
+ EAPI void elm_transit_effect_del(Elm_Transit *transit, Elm_Transit_Effect_Transition_Cb transition_cb, Elm_Transit_Effect *effect) EINA_ARG_NONNULL(1, 2);
+
+ /**
+ * Add new object to apply the effects.
+ *
+ * @note After the first addition of an object in @p transit, if its
+ * object list become empty again, the @p transit will be killed by
+ * elm_transit_del(transit) function.
+ * @note If the @p obj belongs to another transit, the @p obj will be
+ * removed from it and it will only belong to the @p transit. If the old
+ * transit stays without objects, it will die.
+ * @note When you add an object into the @p transit, its state from
+ * evas_object_pass_events_get(obj) is saved, and it is applied when the
+ * transit ends, if you change this state whith evas_object_pass_events_set()
+ * after add the object, this state will change again when @p transit stops to
+ * run.
+ *
+ * @param transit The transit object.
+ * @param obj Object to be animated.
+ *
+ * @ingroup Transit
+ * @warning It is not allowed to add a new object after transit begins to go.
+ */
+ EAPI void elm_transit_object_add(Elm_Transit *transit, Evas_Object *obj) EINA_ARG_NONNULL(1, 2);
+
+ /**
+ * Removes an added object from the transit.
+ *
+ * @note If the @p obj is not in the @p transit, nothing is done.
+ * @note If the list become empty, this function will call
+ * elm_transit_del(transit), that is, it will kill the @p transit.
+ *
+ * @param transit The transit object.
+ * @param obj Object to be removed from @p transit.
+ *
+ * @ingroup Transit
+ * @warning It is not allowed to remove objects after transit begins to go.
+ */
+ EAPI void elm_transit_object_remove(Elm_Transit *transit, Evas_Object *obj) EINA_ARG_NONNULL(1, 2);
+
+ /**
+ * Get the objects of the transit.
+ *
+ * @param transit The transit object.
+ * @return a Eina_List with the objects from the transit.
+ *
+ * @ingroup Transit
+ */
+ EAPI const Eina_List *elm_transit_objects_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+
+ /**
+ * Enable/disable keeping up the objects states.
+ * If it is not kept, the objects states will be reset when transition ends.
+ *
+ * @note @p transit can not be NULL.
+ * @note One state includes geometry, color, map data.
+ *
+ * @param transit The transit object.
+ * @param state_keep Keeping or Non Keeping.
+ *
+ * @ingroup Transit
+ */
+ EAPI void elm_transit_objects_final_state_keep_set(Elm_Transit *transit, Eina_Bool state_keep) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get a value whether the objects states will be reset or not.
+ *
+ * @note @p transit can not be NULL
+ *
+ * @see elm_transit_objects_final_state_keep_set()
+ *
+ * @param transit The transit object.
+ * @return EINA_TRUE means the states of the objects will be reset.
+ * If @p transit is NULL, EINA_FALSE is returned
+ *
+ * @ingroup Transit
+ */
+ EAPI Eina_Bool elm_transit_objects_final_state_keep_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set the event enabled when transit is operating.
+ *
+ * If @p enabled is EINA_TRUE, the objects of the transit will receives
+ * events from mouse and keyboard during the animation.
+ * @note When you add an object with elm_transit_object_add(), its state from
+ * evas_object_pass_events_get(obj) is saved, and it is applied when the
+ * transit ends, if you change this state with evas_object_pass_events_set()
+ * after adding the object, this state will change again when @p transit stops
+ * to run.
+ *
+ * @param transit The transit object.
+ * @param enabled Events are received when enabled is @c EINA_TRUE, and
+ * ignored otherwise.
+ *
+ * @ingroup Transit
+ */
+ EAPI void elm_transit_event_enabled_set(Elm_Transit *transit, Eina_Bool enabled) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the value of event enabled status.
+ *
+ * @see elm_transit_event_enabled_set()
+ *
+ * @param transit The Transit object
+ * @return EINA_TRUE, when event is enabled. If @p transit is NULL
+ * EINA_FALSE is returned
+ *
+ * @ingroup Transit
+ */
+ EAPI Eina_Bool elm_transit_event_enabled_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set the user-callback function when the transit is deleted.
+ *
+ * @note Using this function twice will overwrite the first function setted.
+ * @note the @p transit object will be deleted after call @p cb function.
+ *
+ * @param transit The transit object.
+ * @param cb Callback function pointer. This function will be called before
+ * the deletion of the transit.
+ * @param data Callback funtion user data. It is the @p op parameter.
+ *
+ * @ingroup Transit
+ */
+ EAPI void elm_transit_del_cb_set(Elm_Transit *transit, void (*cb)(void *data, Elm_Transit* transit), void *data) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set reverse effect automatically.
+ *
+ * If auto reverse is setted, after running the effects with the progress
+ * parameter from 0 to 1, it will call the effecs again with the progress
+ * from 1 to 0. The transit will last for a time iqual to (2 * duration * repeat),
+ * where the duration was setted with the function elm_transit_add and
+ * the repeat with the function elm_transit_repeat_times_set().
+ *
+ * @param transit The transit object.
+ * @param reverse EINA_TRUE means the auto_reverse is on.
+ *
+ * @ingroup Transit
+ */
+ EAPI void elm_transit_auto_reverse_set(Elm_Transit *transit, Eina_Bool reverse) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get if the auto reverse is on.
+ *
+ * @see elm_transit_auto_reverse_set()
+ *
+ * @param transit The transit object.
+ * @return EINA_TRUE means auto reverse is on. If @p transit is NULL
+ * EINA_FALSE is returned
+ *
+ * @ingroup Transit
+ */
+ EAPI Eina_Bool elm_transit_auto_reverse_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set the transit repeat count. Effect will be repeated by repeat count.
+ *
+ * This function sets the number of repetition the transit will run after
+ * the first one, that is, if @p repeat is 1, the transit will run 2 times.
+ * If the @p repeat is a negative number, it will repeat infinite times.
+ *
+ * @note If this function is called during the transit execution, the transit
+ * will run @p repeat times, ignoring the times it already performed.
+ *
+ * @param transit The transit object
+ * @param repeat Repeat count
+ *
+ * @ingroup Transit
+ */
+ EAPI void elm_transit_repeat_times_set(Elm_Transit *transit, int repeat) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the transit repeat count.
+ *
+ * @see elm_transit_repeat_times_set()
+ *
+ * @param transit The Transit object.
+ * @return The repeat count. If @p transit is NULL
+ * 0 is returned
+ *
+ * @ingroup Transit
+ */
+ EAPI int elm_transit_repeat_times_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set the transit animation acceleration type.
+ *
+ * This function sets the tween mode of the transit that can be:
+ * ELM_TRANSIT_TWEEN_MODE_LINEAR - The default mode.
+ * ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL - Starts in accelerate mode and ends decelerating.
+ * ELM_TRANSIT_TWEEN_MODE_DECELERATE - The animation will be slowed over time.
+ * ELM_TRANSIT_TWEEN_MODE_ACCELERATE - The animation will accelerate over time.
+ *
+ * @param transit The transit object.
+ * @param tween_mode The tween type.
+ *
+ * @ingroup Transit
+ */
+ EAPI void elm_transit_tween_mode_set(Elm_Transit *transit, Elm_Transit_Tween_Mode tween_mode) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the transit animation acceleration type.
+ *
+ * @note @p transit can not be NULL
+ *
+ * @param transit The transit object.
+ * @return The tween type. If @p transit is NULL
+ * ELM_TRANSIT_TWEEN_MODE_LINEAR is returned.
+ *
+ * @ingroup Transit
+ */
+ EAPI Elm_Transit_Tween_Mode elm_transit_tween_mode_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set the transit animation time
+ *
+ * @note @p transit can not be NULL
+ *
+ * @param transit The transit object.
+ * @param duration The animation time.
+ *
+ * @ingroup Transit
+ */
+ EAPI void elm_transit_duration_set(Elm_Transit *transit, double duration) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the transit animation time
+ *
+ * @note @p transit can not be NULL
+ *
+ * @param transit The transit object.
+ *
+ * @return The transit animation time.
+ *
+ * @ingroup Transit
+ */
+ EAPI double elm_transit_duration_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+
+ /**
+ * Starts the transition.
+ * Once this API is called, the transit begins to measure the time.
+ *
+ * @note @p transit can not be NULL
+ *
+ * @param transit The transit object.
+ *
+ * @ingroup Transit
+ */
+ EAPI void elm_transit_go(Elm_Transit *transit) EINA_ARG_NONNULL(1);
+
+ /**
+ * Pause/Resume the transition.
+ *
+ * If you call elm_transit_go again, the transit will be started from the
+ * beginning, and will be unpaused.
+ *
+ * @note @p transit can not be NULL
+ *
+ * @param transit The transit object.
+ * @param paused Whether the transition should be paused or not.
+ *
+ * @ingroup Transit
+ */
+ EAPI void elm_transit_paused_set(Elm_Transit *transit, Eina_Bool paused) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the value of paused status.
+ *
+ * @see elm_transit_paused_set()
+ *
+ * @note @p transit can not be NULL
+ *
+ * @param transit The transit object.
+ * @return EINA_TRUE means transition is paused. If @p transit is NULL
+ * EINA_FALSE is returned
+ *
+ * @ingroup Transit
+ */
+ EAPI Eina_Bool elm_transit_paused_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the time progression of the animation (a double value between 0.0 and 1.0).
+ *
+ * The value returned is a fraction (current time / total time). It
+ * represents the progression position relative to the total.
+ *
+ * @note @p transit can not be NULL
+ *
+ * @param transit The transit object.
+ *
+ * @return The time progression value. If @p transit is NULL
+ * 0 is returned
+ *
+ * @ingroup Transit
+ */
+ EAPI double elm_transit_progress_value_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+
+ /**
+ * Makes the chain relationship between two transits.
+ *
+ * @note @p transit can not be NULL. Transit would have multiple chain transits.
+ * @note @p chain_transit can not be NULL. Chain transits could be chained to the only one transit.
+ *
+ * @param transit The transit object.
+ * @param chain_transit The chain transit object. This transit will be operated
+ * after transit is done.
+ *
+ * This function adds @p chain_transit transition to a chain after the @p
+ * transit, and will be started as soon as @p transit ends. See @ref
+ * transit_example_02_explained for a full example.
+ *
+ * @ingroup Transit
+ */
+ EAPI void elm_transit_chain_transit_add(Elm_Transit *transit, Elm_Transit *chain_transit) EINA_ARG_NONNULL(1, 2);
+
+ /**
+ * Get the current chain transit list.
+ *
+ * @note @p transit can not be NULL.
+ *
+ * @param transit The transit object.
+ * @return chain transit list.
+ *
+ * @ingroup Transit
+ */
+ EAPI Eina_List *elm_transit_chain_transits_get(const Elm_Transit *transit);
+
+ /**
+ * Add the Resizing Effect to Elm_Transit.
+ *
+ * @note This API is one of the facades. It creates resizing effect context
+ * and add it's required APIs to elm_transit_effect_add.
+ *
+ * @see elm_transit_effect_add()
+ *
+ * @param transit Transit object.
+ * @param from_w Object width size when effect begins.
+ * @param from_h Object height size when effect begins.
+ * @param to_w Object width size when effect ends.
+ * @param to_h Object height size when effect ends.
+ * @return Resizing effect context data.
+ *
+ * @ingroup Transit
+ */
+ EAPI Elm_Transit_Effect *elm_transit_effect_resizing_add(Elm_Transit* transit, Evas_Coord from_w, Evas_Coord from_h, Evas_Coord to_w, Evas_Coord to_h);
+
+ /**
+ * Add the Translation Effect to Elm_Transit.
+ *
+ * @note This API is one of the facades. It creates translation effect context
+ * and add it's required APIs to elm_transit_effect_add.
+ *
+ * @see elm_transit_effect_add()
+ *
+ * @param transit Transit object.
+ * @param from_dx X Position variation when effect begins.
+ * @param from_dy Y Position variation when effect begins.
+ * @param to_dx X Position variation when effect ends.
+ * @param to_dy Y Position variation when effect ends.
+ * @return Translation effect context data.
+ *
+ * @ingroup Transit
+ * @warning It is highly recommended just create a transit with this effect when
+ * the window that the objects of the transit belongs has already been created.
+ * This is because this effect needs the geometry information about the objects,
+ * and if the window was not created yet, it can get a wrong information.
+ */
+ EAPI Elm_Transit_Effect *elm_transit_effect_translation_add(Elm_Transit* transit, Evas_Coord from_dx, Evas_Coord from_dy, Evas_Coord to_dx, Evas_Coord to_dy);
+
+ /**
+ * Add the Zoom Effect to Elm_Transit.
+ *
+ * @note This API is one of the facades. It creates zoom effect context
+ * and add it's required APIs to elm_transit_effect_add.
+ *
+ * @see elm_transit_effect_add()
+ *
+ * @param transit Transit object.
+ * @param from_rate Scale rate when effect begins (1 is current rate).
+ * @param to_rate Scale rate when effect ends.
+ * @return Zoom effect context data.
+ *
+ * @ingroup Transit
+ * @warning It is highly recommended just create a transit with this effect when
+ * the window that the objects of the transit belongs has already been created.
+ * This is because this effect needs the geometry information about the objects,
+ * and if the window was not created yet, it can get a wrong information.
+ */
+ EAPI Elm_Transit_Effect *elm_transit_effect_zoom_add(Elm_Transit *transit, float from_rate, float to_rate);
+
+ /**
+ * Add the Flip Effect to Elm_Transit.
+ *
+ * @note This API is one of the facades. It creates flip effect context
+ * and add it's required APIs to elm_transit_effect_add.
+ * @note This effect is applied to each pair of objects in the order they are listed
+ * in the transit list of objects. The first object in the pair will be the
+ * "front" object and the second will be the "back" object.
+ *
+ * @see elm_transit_effect_add()
+ *
+ * @param transit Transit object.
+ * @param axis Flipping Axis(X or Y).
+ * @param cw Flipping Direction. EINA_TRUE is clock-wise.
+ * @return Flip effect context data.
+ *
+ * @ingroup Transit
+ * @warning It is highly recommended just create a transit with this effect when
+ * the window that the objects of the transit belongs has already been created.
+ * This is because this effect needs the geometry information about the objects,
+ * and if the window was not created yet, it can get a wrong information.
+ */
+ EAPI Elm_Transit_Effect *elm_transit_effect_flip_add(Elm_Transit *transit, Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw);
+
+ /**
+ * Add the Resizable Flip Effect to Elm_Transit.
+ *
+ * @note This API is one of the facades. It creates resizable flip effect context
+ * and add it's required APIs to elm_transit_effect_add.
+ * @note This effect is applied to each pair of objects in the order they are listed
+ * in the transit list of objects. The first object in the pair will be the
+ * "front" object and the second will be the "back" object.
+ *
+ * @see elm_transit_effect_add()
+ *
+ * @param transit Transit object.
+ * @param axis Flipping Axis(X or Y).
+ * @param cw Flipping Direction. EINA_TRUE is clock-wise.
+ * @return Resizable flip effect context data.
+ *
+ * @ingroup Transit
+ * @warning It is highly recommended just create a transit with this effect when
+ * the window that the objects of the transit belongs has already been created.
+ * This is because this effect needs the geometry information about the objects,
+ * and if the window was not created yet, it can get a wrong information.
+ */
+ EAPI Elm_Transit_Effect *elm_transit_effect_resizable_flip_add(Elm_Transit *transit, Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw);
+
+ /**
+ * Add the Wipe Effect to Elm_Transit.
+ *
+ * @note This API is one of the facades. It creates wipe effect context
+ * and add it's required APIs to elm_transit_effect_add.
+ *
+ * @see elm_transit_effect_add()
+ *
+ * @param transit Transit object.
+ * @param type Wipe type. Hide or show.
+ * @param dir Wipe Direction.
+ * @return Wipe effect context data.
+ *
+ * @ingroup Transit
+ * @warning It is highly recommended just create a transit with this effect when
+ * the window that the objects of the transit belongs has already been created.
+ * This is because this effect needs the geometry information about the objects,
+ * and if the window was not created yet, it can get a wrong information.
+ */
+ EAPI Elm_Transit_Effect *elm_transit_effect_wipe_add(Elm_Transit *transit, Elm_Transit_Effect_Wipe_Type type, Elm_Transit_Effect_Wipe_Dir dir);
+
+ /**
+ * Add the Color Effect to Elm_Transit.
+ *
+ * @note This API is one of the facades. It creates color effect context
+ * and add it's required APIs to elm_transit_effect_add.
+ *
+ * @see elm_transit_effect_add()
+ *
+ * @param transit Transit object.
+ * @param from_r RGB R when effect begins.
+ * @param from_g RGB G when effect begins.
+ * @param from_b RGB B when effect begins.
+ * @param from_a RGB A when effect begins.
+ * @param to_r RGB R when effect ends.
+ * @param to_g RGB G when effect ends.
+ * @param to_b RGB B when effect ends.
+ * @param to_a RGB A when effect ends.
+ * @return Color effect context data.
+ *
+ * @ingroup Transit
+ */
+ EAPI Elm_Transit_Effect *elm_transit_effect_color_add(Elm_Transit *transit, unsigned int from_r, unsigned int from_g, unsigned int from_b, unsigned int from_a, unsigned int to_r, unsigned int to_g, unsigned int to_b, unsigned int to_a);
+
+ /**
+ * Add the Fade Effect to Elm_Transit.
+ *
+ * @note This API is one of the facades. It creates fade effect context
+ * and add it's required APIs to elm_transit_effect_add.
+ * @note This effect is applied to each pair of objects in the order they are listed
+ * in the transit list of objects. The first object in the pair will be the
+ * "before" object and the second will be the "after" object.
+ *
+ * @see elm_transit_effect_add()
+ *
+ * @param transit Transit object.
+ * @return Fade effect context data.
+ *
+ * @ingroup Transit
+ * @warning It is highly recommended just create a transit with this effect when
+ * the window that the objects of the transit belongs has already been created.
+ * This is because this effect needs the color information about the objects,
+ * and if the window was not created yet, it can get a wrong information.
+ */
+ EAPI Elm_Transit_Effect *elm_transit_effect_fade_add(Elm_Transit *transit);
+
+ /**
+ * Add the Blend Effect to Elm_Transit.
+ *
+ * @note This API is one of the facades. It creates blend effect context
+ * and add it's required APIs to elm_transit_effect_add.
+ * @note This effect is applied to each pair of objects in the order they are listed
+ * in the transit list of objects. The first object in the pair will be the
+ * "before" object and the second will be the "after" object.
+ *
+ * @see elm_transit_effect_add()
+ *
+ * @param transit Transit object.
+ * @return Blend effect context data.
+ *
+ * @ingroup Transit
+ * @warning It is highly recommended just create a transit with this effect when
+ * the window that the objects of the transit belongs has already been created.
+ * This is because this effect needs the color information about the objects,
+ * and if the window was not created yet, it can get a wrong information.
+ */
+ EAPI Elm_Transit_Effect *elm_transit_effect_blend_add(Elm_Transit *transit);
+
+ /**
+ * Add the Rotation Effect to Elm_Transit.
+ *
+ * @note This API is one of the facades. It creates rotation effect context
+ * and add it's required APIs to elm_transit_effect_add.
+ *
+ * @see elm_transit_effect_add()
+ *
+ * @param transit Transit object.
+ * @param from_degree Degree when effect begins.
+ * @param to_degree Degree when effect is ends.
+ * @return Rotation effect context data.
+ *
+ * @ingroup Transit
+ * @warning It is highly recommended just create a transit with this effect when
+ * the window that the objects of the transit belongs has already been created.
+ * This is because this effect needs the geometry information about the objects,
+ * and if the window was not created yet, it can get a wrong information.
+ */
+ EAPI Elm_Transit_Effect *elm_transit_effect_rotation_add(Elm_Transit *transit, float from_degree, float to_degree);
+
+ /**
+ * Add the ImageAnimation Effect to Elm_Transit.
+ *
+ * @note This API is one of the facades. It creates image animation effect context
+ * and add it's required APIs to elm_transit_effect_add.
+ * The @p images parameter is a list images paths. This list and
+ * its contents will be deleted at the end of the effect by
+ * elm_transit_effect_image_animation_context_free() function.
+ *
+ * Example:
+ * @code
+ * char buf[PATH_MAX];
+ * Eina_List *images = NULL;
+ * Elm_Transit *transi = elm_transit_add();
+ *
+ * snprintf(buf, sizeof(buf), "%s/images/icon_11.png", PACKAGE_DATA_DIR);
+ * images = eina_list_append(images, eina_stringshare_add(buf));
+ *
+ * snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
+ * images = eina_list_append(images, eina_stringshare_add(buf));
+ * elm_transit_effect_image_animation_add(transi, images);
+ *
+ * @endcode
+ *
+ * @see elm_transit_effect_add()
+ *
+ * @param transit Transit object.
+ * @param images Eina_List of images file paths. This list and
+ * its contents will be deleted at the end of the effect by
+ * elm_transit_effect_image_animation_context_free() function.
+ * @return Image Animation effect context data.
+ *
+ * @ingroup Transit
+ */
+ EAPI Elm_Transit_Effect *elm_transit_effect_image_animation_add(Elm_Transit *transit, Eina_List *images);
+ /**
+ * @}
+ */
+
- typedef struct _Elm_Store Elm_Store;
- typedef struct _Elm_Store_Filesystem Elm_Store_Filesystem;
- typedef struct _Elm_Store_Item Elm_Store_Item;
- typedef struct _Elm_Store_Item_Filesystem Elm_Store_Item_Filesystem;
- typedef struct _Elm_Store_Item_Info Elm_Store_Item_Info;
- typedef struct _Elm_Store_Item_Info_Filesystem Elm_Store_Item_Info_Filesystem;
- typedef struct _Elm_Store_Item_Mapping Elm_Store_Item_Mapping;
- typedef struct _Elm_Store_Item_Mapping_Empty Elm_Store_Item_Mapping_Empty;
- typedef struct _Elm_Store_Item_Mapping_Icon Elm_Store_Item_Mapping_Icon;
- typedef struct _Elm_Store_Item_Mapping_Photo Elm_Store_Item_Mapping_Photo;
- typedef struct _Elm_Store_Item_Mapping_Custom Elm_Store_Item_Mapping_Custom;
-
- typedef Eina_Bool (*Elm_Store_Item_List_Cb) (void *data, Elm_Store_Item_Info *info);
- typedef void (*Elm_Store_Item_Fetch_Cb) (void *data, Elm_Store_Item *sti);
- typedef void (*Elm_Store_Item_Unfetch_Cb) (void *data, Elm_Store_Item *sti);
- typedef void *(*Elm_Store_Item_Mapping_Cb) (void *data, Elm_Store_Item *sti, const char *part);
-
- typedef enum
- {
- ELM_STORE_ITEM_MAPPING_NONE = 0,
- ELM_STORE_ITEM_MAPPING_LABEL, // const char * -> label
- ELM_STORE_ITEM_MAPPING_STATE, // Eina_Bool -> state
- ELM_STORE_ITEM_MAPPING_ICON, // char * -> icon path
- ELM_STORE_ITEM_MAPPING_PHOTO, // char * -> photo path
- ELM_STORE_ITEM_MAPPING_CUSTOM, // item->custom(it->data, it, part) -> void * (-> any)
- // can add more here as needed by common apps
- ELM_STORE_ITEM_MAPPING_LAST
- } Elm_Store_Item_Mapping_Type;
-
- struct _Elm_Store_Item_Mapping_Icon
- {
- // FIXME: allow edje file icons
- int w, h;
- Elm_Icon_Lookup_Order lookup_order;
- Eina_Bool standard_name : 1;
- Eina_Bool no_scale : 1;
- Eina_Bool smooth : 1;
- Eina_Bool scale_up : 1;
- Eina_Bool scale_down : 1;
- };
++ /* Store */
++ typedef struct _Elm_Store Elm_Store;
++ typedef struct _Elm_Store_DBsystem Elm_Store_DBsystem;
++ typedef struct _Elm_Store_Filesystem Elm_Store_Filesystem;
++ typedef struct _Elm_Store_Item Elm_Store_Item;
++ typedef struct _Elm_Store_Item_DBsystem Elm_Store_Item_DBsystem;
++ typedef struct _Elm_Store_Item_Filesystem Elm_Store_Item_Filesystem;
++ typedef struct _Elm_Store_Item_Info Elm_Store_Item_Info;
++ typedef struct _Elm_Store_Item_Info_Filesystem Elm_Store_Item_Info_Filesystem;
++ typedef struct _Elm_Store_Item_Mapping Elm_Store_Item_Mapping;
++ typedef struct _Elm_Store_Item_Mapping_Empty Elm_Store_Item_Mapping_Empty;
++ typedef struct _Elm_Store_Item_Mapping_Icon Elm_Store_Item_Mapping_Icon;
++ typedef struct _Elm_Store_Item_Mapping_Photo Elm_Store_Item_Mapping_Photo;
++ typedef struct _Elm_Store_Item_Mapping_Custom Elm_Store_Item_Mapping_Custom;
++
++ typedef Eina_Bool (*Elm_Store_Item_List_Cb) (void *data, Elm_Store_Item_Info *info);
++ typedef void (*Elm_Store_Item_Fetch_Cb) (void *data, Elm_Store_Item *sti, Elm_Store_Item_Info *info);
++ typedef void (*Elm_Store_Item_Unfetch_Cb) (void *data, Elm_Store_Item *sti, Elm_Store_Item_Info *info);
++ typedef void (*Elm_Store_Item_Select_Cb) (void *data, Elm_Store_Item *sti);
++ typedef int (*Elm_Store_Item_Sort_Cb) (void *data, Elm_Store_Item_Info *info1, Elm_Store_Item_Info *info2);
++ typedef void (*Elm_Store_Item_Free_Cb) (void *data, Elm_Store_Item_Info *info);
++ typedef void *(*Elm_Store_Item_Mapping_Cb) (void *data, Elm_Store_Item *sti, const char *part);
+
- struct _Elm_Store_Item_Mapping_Empty
- {
- Eina_Bool dummy;
- };
++ typedef enum
++ {
++ ELM_STORE_ITEM_MAPPING_NONE = 0,
++ ELM_STORE_ITEM_MAPPING_LABEL, // const char * -> label
++ ELM_STORE_ITEM_MAPPING_STATE, // Eina_Bool -> state
++ ELM_STORE_ITEM_MAPPING_ICON, // char * -> icon path
++ ELM_STORE_ITEM_MAPPING_PHOTO, // char * -> photo path
++ ELM_STORE_ITEM_MAPPING_CUSTOM, // item->custom(it->data, it, part) -> void * (-> any)
++ // can add more here as needed by common apps
++ ELM_STORE_ITEM_MAPPING_LAST
++ } Elm_Store_Item_Mapping_Type;
++
++ struct _Elm_Store_Item_Mapping_Icon
++ {
++ // FIXME: allow edje file icons
++ int w, h;
++ Elm_Icon_Lookup_Order lookup_order;
++ Eina_Bool standard_name : 1;
++ Eina_Bool no_scale : 1;
++ Eina_Bool smooth : 1;
++ Eina_Bool scale_up : 1;
++ Eina_Bool scale_down : 1;
++ };
+
- struct _Elm_Store_Item_Mapping_Photo
- {
- int size;
- };
++ struct _Elm_Store_Item_Mapping_Empty
++ {
++ Eina_Bool dummy;
++ };
+
- struct _Elm_Store_Item_Mapping_Custom
- {
- Elm_Store_Item_Mapping_Cb func;
- };
++ struct _Elm_Store_Item_Mapping_Photo
++ {
++ int size;
++ };
+
- struct _Elm_Store_Item_Mapping
- {
- Elm_Store_Item_Mapping_Type type;
- const char *part;
- int offset;
- union
- {
- Elm_Store_Item_Mapping_Empty empty;
- Elm_Store_Item_Mapping_Icon icon;
- Elm_Store_Item_Mapping_Photo photo;
- Elm_Store_Item_Mapping_Custom custom;
- // add more types here
- } details;
- };
++ struct _Elm_Store_Item_Mapping_Custom
++ {
++ Elm_Store_Item_Mapping_Cb func;
++ };
- struct _Elm_Store_Item_Info
- {
- Elm_Genlist_Item_Class *item_class;
- const Elm_Store_Item_Mapping *mapping;
- void *data;
- char *sort_id;
- };
+ struct _Elm_Store_Item_Mapping
+ {
+ Elm_Store_Item_Mapping_Type type;
+ const char *part;
+ int offset;
+ union {
+ Elm_Store_Item_Mapping_Empty empty;
+ Elm_Store_Item_Mapping_Icon icon;
+ Elm_Store_Item_Mapping_Photo photo;
+ Elm_Store_Item_Mapping_Custom custom;
+ // add more types here
+ } details;
+ };
- struct _Elm_Store_Item_Info_Filesystem
- {
- Elm_Store_Item_Info base;
- char *path;
- };
+ struct _Elm_Store_Item_Info
+ {
+ int index;
+ int item_type;
+ int group_index;
+ Eina_Bool rec_item;
+ int pre_group_index;
+
+ Elm_Genlist_Item_Class *item_class;
+ const Elm_Store_Item_Mapping *mapping;
+ void *data;
+ char *sort_id;
+ };
+
+ struct _Elm_Store_Item_Info_Filesystem
+ {
+ Elm_Store_Item_Info base;
+ char *path;
+ };
#define ELM_STORE_ITEM_MAPPING_END { ELM_STORE_ITEM_MAPPING_NONE, NULL, 0, { .empty = { EINA_TRUE } } }
#define ELM_STORE_ITEM_MAPPING_OFFSET(st, it) offsetof(st, it)
- EAPI void elm_store_free(Elm_Store *st);
-
- EAPI Elm_Store *elm_store_filesystem_new(void);
- EAPI void elm_store_filesystem_directory_set(Elm_Store *st, const char *dir) EINA_ARG_NONNULL(1);
- EAPI const char *elm_store_filesystem_directory_get(const Elm_Store *st) EINA_ARG_NONNULL(1);
- EAPI const char *elm_store_item_filesystem_path_get(const Elm_Store_Item *sti) EINA_ARG_NONNULL(1);
-
- EAPI void elm_store_target_genlist_set(Elm_Store *st, Evas_Object *obj) EINA_ARG_NONNULL(1);
-
- EAPI void elm_store_cache_set(Elm_Store *st, int max) EINA_ARG_NONNULL(1);
- EAPI int elm_store_cache_get(const Elm_Store *st) EINA_ARG_NONNULL(1);
- EAPI void elm_store_list_func_set(Elm_Store *st, Elm_Store_Item_List_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
- EAPI void elm_store_fetch_func_set(Elm_Store *st, Elm_Store_Item_Fetch_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
- EAPI void elm_store_fetch_thread_set(Elm_Store *st, Eina_Bool use_thread) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_store_fetch_thread_get(const Elm_Store *st) EINA_ARG_NONNULL(1);
-
- EAPI void elm_store_unfetch_func_set(Elm_Store *st, Elm_Store_Item_Unfetch_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
- EAPI void elm_store_sorted_set(Elm_Store *st, Eina_Bool sorted) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_store_sorted_get(const Elm_Store *st) EINA_ARG_NONNULL(1);
- EAPI void elm_store_item_data_set(Elm_Store_Item *sti, void *data) EINA_ARG_NONNULL(1);
- EAPI void *elm_store_item_data_get(Elm_Store_Item *sti) EINA_ARG_NONNULL(1);
- EAPI const Elm_Store *elm_store_item_store_get(const Elm_Store_Item *sti) EINA_ARG_NONNULL(1);
- EAPI const Elm_Genlist_Item *elm_store_item_genlist_item_get(const Elm_Store_Item *sti) EINA_ARG_NONNULL(1);
+ EAPI Elm_Store *elm_store_dbsystem_new(void);
+ EAPI void elm_store_item_count_set(Elm_Store *st, int count) EINA_ARG_NONNULL(1);
+ EAPI void elm_store_item_select_func_set(Elm_Store *st, Elm_Store_Item_Select_Cb func, const void *data) EINA_ARG_NONNULL(1);
+ EAPI void elm_store_item_sort_func_set(Elm_Store *st, Elm_Store_Item_Sort_Cb func, const void *data) EINA_ARG_NONNULL(1);
+ EAPI void elm_store_item_free_func_set(Elm_Store *st, Elm_Store_Item_Free_Cb func, const void *data) EINA_ARG_NONNULL(1);
+ EAPI int elm_store_item_data_index_get(const Elm_Store_Item *sti) EINA_ARG_NONNULL(1);
+ EAPI void *elm_store_dbsystem_db_get(const Elm_Store_Item *sti) EINA_ARG_NONNULL(1);
+ EAPI void elm_store_dbsystem_db_set(Elm_Store *store, void *pDB) EINA_ARG_NONNULL(1);
+ EAPI int elm_store_item_index_get(const Elm_Store_Item *sti) EINA_ARG_NONNULL(1);
+ EAPI Elm_Store_Item *elm_store_item_add(Elm_Store *st, Elm_Store_Item_Info *info) EINA_ARG_NONNULL(1);
+ EAPI void elm_store_item_update(Elm_Store_Item *sti) EINA_ARG_NONNULL(1);
+ EAPI void elm_store_visible_items_update(Elm_Store *st) EINA_ARG_NONNULL(1);
+ EAPI void elm_store_item_del(Elm_Store_Item *sti) EINA_ARG_NONNULL(1);
+ EAPI void elm_store_free(Elm_Store *st);
+ EAPI Elm_Store *elm_store_filesystem_new(void);
+ EAPI void elm_store_filesystem_directory_set(Elm_Store *st, const char *dir) EINA_ARG_NONNULL(1);
+ EAPI const char *elm_store_filesystem_directory_get(const Elm_Store *st) EINA_ARG_NONNULL(1);
+ EAPI const char *elm_store_item_filesystem_path_get(const Elm_Store_Item *sti) EINA_ARG_NONNULL(1);
+ EAPI void elm_store_target_genlist_set(Elm_Store *st, Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_store_cache_set(Elm_Store *st, int max) EINA_ARG_NONNULL(1);
+ EAPI int elm_store_cache_get(const Elm_Store *st) EINA_ARG_NONNULL(1);
+ EAPI void elm_store_list_func_set(Elm_Store *st, Elm_Store_Item_List_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
+ EAPI void elm_store_fetch_func_set(Elm_Store *st, Elm_Store_Item_Fetch_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
+ EAPI void elm_store_fetch_thread_set(Elm_Store *st, Eina_Bool use_thread) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_store_fetch_thread_get(const Elm_Store *st) EINA_ARG_NONNULL(1);
+ EAPI void elm_store_unfetch_func_set(Elm_Store *st, Elm_Store_Item_Unfetch_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
+ EAPI void elm_store_sorted_set(Elm_Store *st, Eina_Bool sorted) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_store_sorted_get(const Elm_Store *st) EINA_ARG_NONNULL(1);
+ EAPI void elm_store_item_data_set(Elm_Store_Item *sti, void *data) EINA_ARG_NONNULL(1);
+ EAPI void *elm_store_item_data_get(Elm_Store_Item *sti) EINA_ARG_NONNULL(1);
+ EAPI const Elm_Store *elm_store_item_store_get(const Elm_Store_Item *sti) EINA_ARG_NONNULL(1);
+ EAPI const Elm_Genlist_Item *elm_store_item_genlist_item_get(const Elm_Store_Item *sti) EINA_ARG_NONNULL(1);
+
++ /* NoContents */
++ EAPI Evas_Object *elm_nocontents_add(Evas_Object *parent);
++ EAPI void elm_nocontents_label_set(Evas_Object *obj, const char *label);
++ EAPI const char *elm_nocontents_label_get(const Evas_Object *obj);
++ EAPI void elm_nocontents_custom_set(const Evas_Object *obj, Evas_Object *custom);
++ EAPI Evas_Object *elm_nocontents_custom_get(const Evas_Object *obj);
++
++ /* TickerNoti */
++ typedef enum
++ {
++ ELM_TICKERNOTI_DEFAULT,
++ ELM_TICKERNOTI_DETAILVIEW
++ } Elm_Tickernoti_Mode;
++
++ EAPI Evas_Object *elm_tickernoti_add (Evas_Object *parent);
++ EAPI void elm_tickernoti_icon_set (const Evas_Object *obj, Evas_Object *icon);
++ EAPI Evas_Object *elm_tickernoti_icon_get (const Evas_Object *obj);
++ EAPI void elm_tickernoti_label_set (Evas_Object *obj, const char *label);
++ EAPI const char *elm_tickernoti_label_get (const Evas_Object *obj);
++ EAPI void elm_tickernoti_detailview_label_set (Evas_Object *obj, const char *label);
++ EAPI const char *elm_tickernoti_detailview_label_get (const Evas_Object *obj);
++ EAPI void elm_tickernoti_detailview_button_set (const Evas_Object *obj, Evas_Object *button);
++ EAPI Evas_Object *elm_tickernoti_detailview_button_get (const Evas_Object *obj);
++ EAPI void elm_tickernoti_detailview_icon_set (const Evas_Object *obj, Evas_Object *icon);
++ EAPI Evas_Object *elm_tickernoti_detailview_icon_get (const Evas_Object *obj);
++ EAPI Evas_Object *elm_tickernoti_detailview_get (const Evas_Object *obj);
++ EAPI int elm_tickernoti_rotation_get (const Evas_Object *obj);
++ EAPI void elm_tickernoti_rotation_set (const Evas_Object *obj, int angle);
++ EAPI void elm_tickernoti_mode_set (const Evas_Object *obj, Elm_Tickernoti_Mode mode);
++ EAPI Elm_Tickernoti_Mode elm_tickernoti_mode_get (const Evas_Object *obj);
+
/* SegmentControl */
typedef struct _Elm_Segment_Item Elm_Segment_Item;
EAPI Evas_Object *elm_segment_control_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
elc_anchorblock.c \
elc_anchorview.c \
elc_ctxpopup.c \
- elc_fileselector.c \
elc_fileselector_button.c \
+ elc_fileselector.c \
elc_fileselector_entry.c \
elc_hoversel.c \
+elc_navigationbar.c \
+elc_navigationbar_ex.c\
elc_scrolled_entry.c \
elm_actionslider.c \
elm_animator.c \
elm_layout.c \
elm_list.c \
elm_main.c \
- elm_map.c \
elm_mapbuf.c \
+ elm_map.c \
elm_menu.c \
elm_module.c \
+elm_multibuttonentry.c \
+elm_nocontents.c \
elm_notify.c \
+elm_pagecontrol.c \
elm_pager.c \
elm_panel.c \
elm_panes.c \
return NULL;
}
- /**
- * Add a new Anchorblock object
- *
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
- *
- * @ingroup Anchorblock
- */
++static void
++_elm_anchorblock_text_set(Evas_Object *obj, const char *item, const char *text)
++{
++ ELM_CHECK_WIDTYPE(obj, widtype);
++ Widget_Data *wd = elm_widget_data_get(obj);
++ if (item && strcmp(item, "default")) return;
++ if (!wd) return;
++ elm_entry_entry_set(wd->entry, text);
++ if (wd->hover) evas_object_del(wd->hover);
++ if (wd->pop) evas_object_del(wd->pop);
++ wd->hover = NULL;
++ wd->pop = NULL;
++ _sizing_eval(obj);
++}
++
++static const char*
++_elm_anchorblock_text_get(const Evas_Object *obj, const char *item)
++{
++ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
++ Widget_Data *wd = elm_widget_data_get(obj);
++ if (item && strcmp(item, "default")) return NULL;
++ if (!wd) return NULL;
++ return elm_entry_entry_get(wd->entry);
++}
EAPI Evas_Object *
elm_anchorblock_add(Evas_Object *parent)
{
elm_widget_del_hook_set(obj, _del_hook);
elm_widget_theme_hook_set(obj, _theme_hook);
elm_widget_can_focus_set(obj, EINA_TRUE);
++ elm_widget_text_set_hook_set(obj, _elm_anchorblock_text_set);
++ elm_widget_text_get_hook_set(obj, _elm_anchorblock_text_get);
wd->entry = elm_entry_add(parent);
elm_entry_item_provider_prepend(wd->entry, _item_provider, obj);
EAPI void
elm_anchorblock_text_set(Evas_Object *obj, const char *text)
{
-- ELM_CHECK_WIDTYPE(obj, widtype);
-- Widget_Data *wd = elm_widget_data_get(obj);
-- if (!wd) return;
-- elm_entry_entry_set(wd->entry, text);
-- if (wd->hover) evas_object_del(wd->hover);
-- if (wd->pop) evas_object_del(wd->pop);
-- wd->hover = NULL;
-- wd->pop = NULL;
-- _sizing_eval(obj);
++ _elm_anchorblock_text_set(obj, NULL, text);
}
- /**
- * Get the markup text set for the anchorblock
- *
- * This retrieves back the string set by @c elm_anchorblock_text_set().
- *
- * @param obj The anchorblock object
- * @return text The markup text set or @c NULL, either if it was not set
- * or an error occurred
- *
- * @ingroup Anchorblock
- */
EAPI const char*
elm_anchorblock_text_get(const Evas_Object *obj)
{
-- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
-- Widget_Data *wd = elm_widget_data_get(obj);
-- if (!wd) return NULL;
-- return elm_entry_entry_get(wd->entry);
++ return _elm_anchorblock_text_get(obj, NULL);
}
- /**
- * Set the parent of the hover popup
- *
- * This sets the parent of the hover that anchorblock will create. See hover
- * objects for more information on this.
- *
- * @param obj The anchorblock object
- * @param parent The parent the hover should use
- *
- * @ingroup Anchorblock
- */
EAPI void
elm_anchorblock_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
{
return NULL;
}
- /**
- * Add a new Anchorview object
- *
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
- *
- * @ingroup Anchorview
- */
++static void
++_elm_anchorview_text_set(Evas_Object *obj, const char *item, const char *text)
++{
++ ELM_CHECK_WIDTYPE(obj, widtype);
++ Widget_Data *wd = elm_widget_data_get(obj);
++ if (item && strcmp(item, "default")) return;
++ if (!wd) return;
++ elm_entry_entry_set(wd->entry, text);
++ if (wd->hover) evas_object_del(wd->hover);
++ if (wd->pop) evas_object_del(wd->pop);
++ wd->hover = NULL;
++ wd->pop = NULL;
++ _sizing_eval(obj);
++}
++
++static const char*
++_elm_anchorview_text_get(const Evas_Object *obj, const char *item)
++{
++ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
++ Widget_Data *wd = elm_widget_data_get(obj);
++ if (item && strcmp(item, "default")) return NULL;
++ if (!wd) return NULL;
++ return elm_entry_entry_get(wd->entry);
++}
EAPI Evas_Object *
elm_anchorview_add(Evas_Object *parent)
{
elm_widget_del_hook_set(obj, _del_hook);
elm_widget_theme_hook_set(obj, _theme_hook);
elm_widget_can_focus_set(obj, EINA_TRUE);
++ elm_widget_text_set_hook_set(obj, _elm_anchorview_text_set);
++ elm_widget_text_get_hook_set(obj, _elm_anchorview_text_get);
wd->scroller = elm_scroller_add(parent);
elm_widget_resize_object_set(obj, wd->scroller);
EAPI void
elm_anchorview_text_set(Evas_Object *obj, const char *text)
{
-- ELM_CHECK_WIDTYPE(obj, widtype);
-- Widget_Data *wd = elm_widget_data_get(obj);
-- if (!wd) return;
-- elm_entry_entry_set(wd->entry, text);
-- if (wd->hover) evas_object_del(wd->hover);
-- if (wd->pop) evas_object_del(wd->pop);
-- wd->hover = NULL;
-- wd->pop = NULL;
-- _sizing_eval(obj);
++ _elm_anchorview_text_set(obj, NULL, text);
}
- /**
- * Get the markup text set for the anchorview
- *
- * This retrieves back the string set by @c elm_anchorview_text_set().
- *
- * @param obj The anchorview object
- * @return text The markup text set or @c NULL, either if it was not set
- * or an error occurred
- *
- * @ingroup Anchorview
- */
EAPI const char*
elm_anchorview_text_get(const Evas_Object *obj)
{
-- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
-- Widget_Data *wd = elm_widget_data_get(obj);
-- if (!wd) return NULL;
-- return elm_entry_entry_get(wd->entry);
++ return _elm_anchorview_text_get(obj, NULL);
}
- /**
- * Set the parent of the hover popup
- *
- * This sets the parent of the hover that anchorview will create. See hover
- * objects for more information on this.
- *
- * @param obj The anchorview object
- * @param parent The parent the hover should use
- *
- * @ingroup Anchorview
- */
EAPI void
elm_anchorview_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
{
{
Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- if (!wd->scr) return;
+ if ((!wd) || (!wd->scr)) return;
- elm_object_scroll_freeze_push(wd->scr);
+
+ elm_scroller_bounce_set(wd->scr, EINA_FALSE, EINA_FALSE);
}
static void
{
Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd)
- return;
- if (!wd->scr) return;
+ if ((!wd) || (!wd->scr)) return;
- elm_object_scroll_freeze_pop(wd->scr);
+
+ if (wd->horizontal)
+ elm_scroller_bounce_set(wd->scr, EINA_FALSE, EINA_TRUE);
+ else
+ elm_scroller_bounce_set(wd->scr, EINA_TRUE, EINA_FALSE);
}
static void
{
Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- if (wd->scr) return;
+ if ((!wd) || (!wd->scr)) return;
- elm_object_scroll_hold_push(wd->scr);
+
+ elm_scroller_bounce_set(wd->scr, EINA_FALSE, EINA_FALSE);
}
static void
{
Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- if (wd->scr) return;
+ if ((!wd) || (!wd->scr)) return;
- elm_object_scroll_hold_pop(wd->scr);
+
+ if (wd->horizontal)
+ elm_scroller_bounce_set(wd->scr, EINA_FALSE, EINA_TRUE);
+ else
+ elm_scroller_bounce_set(wd->scr, EINA_TRUE, EINA_FALSE);
}
static void
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd;
- Elm_Ctxpopup_Item *item;
- int idx = 0;
+ Eina_List *elist;
++ Elm_Ctxpopup_Item *item;
++ int idx = 0;
wd = elm_widget_data_get(obj);
if (!wd) return;
(void *)wd->fsd.path);
}
++static void
++_elm_fileselector_button_label_set(Evas_Object *obj, const char *item,
++ const char *label)
++{
++ ELM_CHECK_WIDTYPE(obj, widtype);
++ if (item && strcmp(item, "default")) return;
++ Widget_Data *wd = elm_widget_data_get(obj);
++ if (!wd) return;
++ elm_object_text_set(wd->btn, label);
++}
++
++static const char *
++_elm_fileselector_button_label_get(const Evas_Object *obj, const char *item)
++{
++ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
++ Widget_Data *wd = elm_widget_data_get(obj);
++ if (item && strcmp(item, "default")) return NULL;
++ if (!wd) return NULL;
++ return elm_object_text_get(wd->btn);
++}
++
/**
* Add a new file selector button into the parent object.
*
elm_widget_disable_hook_set(obj, _disable_hook);
elm_widget_can_focus_set(obj, EINA_TRUE);
elm_widget_activate_hook_set(obj, _activate_hook);
++ elm_widget_text_set_hook_set(obj, _elm_fileselector_button_label_set);
++ elm_widget_text_get_hook_set(obj, _elm_fileselector_button_label_get);
wd->self = obj;
wd->window_title = eina_stringshare_add(DEFAULT_WINDOW_TITLE);
* @param label The text label text to be displayed on the button
*
* @ingroup File_Selector_Button
++ * @deprecated use elm_object_text_set() instead.
*/
EAPI void
elm_fileselector_button_label_set(Evas_Object *obj,
const char *label)
{
-- ELM_CHECK_WIDTYPE(obj, widtype);
-- Widget_Data *wd = elm_widget_data_get(obj);
-- if (!wd) return;
- elm_button_label_set(wd->btn, label);
- elm_object_text_set(wd->btn, label);
++ _elm_fileselector_button_label_set(obj, NULL, label);
}
/**
* @return The button label
*
* @ingroup File_Selector_Button
++ * @deprecated use elm_object_text_set() instead.
*/
EAPI const char *
elm_fileselector_button_label_get(const Evas_Object *obj)
{
-- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
-- Widget_Data *wd = elm_widget_data_get(obj);
-- if (!wd) return NULL;
- return elm_button_label_get(wd->btn);
- return elm_object_text_get(wd->btn);
++ return _elm_fileselector_button_label_get(obj, NULL);
}
/**
_sizing_eval(data);
}
++static void
++_elm_fileselector_entry_button_label_set(Evas_Object *obj, const char *item, const char *label)
++{
++ ELM_CHECK_WIDTYPE(obj, widtype);
++ Widget_Data *wd = elm_widget_data_get(obj);
++ if (item && strcmp(item, "default")) return;
++ if (!wd) return;
++ elm_object_text_set(wd->button, label);
++}
++
++static const char *
++_elm_fileselector_entry_button_label_get(const Evas_Object *obj, const char *item)
++{
++ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
++ Widget_Data *wd = elm_widget_data_get(obj);
++ if (item && strcmp(item, "default")) return NULL;
++ if (!wd) return NULL;
++ return elm_object_text_get(wd->button);
++}
++
/**
* Add a new file selector entry into the parent object.
*
elm_widget_focus_next_hook_set(obj, _elm_fileselector_entry_focus_next_hook);
elm_widget_can_focus_set(obj, EINA_FALSE);
elm_widget_theme_hook_set(obj, _theme_hook);
++ elm_widget_text_set_hook_set(obj, _elm_fileselector_entry_button_label_set);
++ elm_widget_text_get_hook_set(obj, _elm_fileselector_entry_button_label_get);
wd->edje = edje_object_add(e);
_elm_theme_object_set(obj, wd->edje, "fileselector_entry", "base", "default");
* @param label The text label text to be displayed on the entry
*
* @ingroup File_Selector_Entry
++ * @deprecated use elm_object_text_set() instead.
*/
EAPI void
elm_fileselector_entry_button_label_set(Evas_Object *obj, const char *label)
{
-- ELM_CHECK_WIDTYPE(obj, widtype);
-- Widget_Data *wd = elm_widget_data_get(obj);
-- if (!wd) return;
-- elm_fileselector_button_label_set(wd->button, label);
++ _elm_fileselector_entry_button_label_set(obj, NULL, label);
}
EAPI const char *
elm_fileselector_entry_button_label_get(const Evas_Object *obj)
{
-- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
-- Widget_Data *wd = elm_widget_data_get(obj);
-- if (!wd) return NULL;
-- return elm_fileselector_button_label_get(wd->button);
++ return _elm_fileselector_entry_button_label_get(obj, NULL);
}
/**
elm_scrolled_entry_add(Evas_Object *parent)
{
Evas_Object *obj;
- Evas *e;
- Widget_Data *wd;
-
- ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
-
- ELM_SET_WIDTYPE(widtype, "scrolled_entry");
- elm_widget_type_set(obj, "scrolled_entry");
- elm_widget_sub_object_add(parent, obj);
- 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_disable_hook_set(obj, _disable_hook);
- elm_widget_can_focus_set(obj, EINA_TRUE);
- elm_widget_theme_hook_set(obj, _theme_hook);
- elm_widget_on_focus_region_hook_set(obj, _on_focus_region_hook);
- 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);
-
- wd->scroller = elm_scroller_add(obj);
- //elm_scroller_custom_widget_base_theme_set(wd->scroller, "scroller", "entry");
- elm_widget_resize_object_set(obj, wd->scroller);
- evas_object_size_hint_weight_set(wd->scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(wd->scroller, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_scroller_bounce_set(wd->scroller, EINA_FALSE, EINA_FALSE);
- elm_scroller_propagate_events_set(wd->scroller, EINA_TRUE);
- evas_object_show(wd->scroller);
-
- wd->entry = elm_entry_add(obj);
- evas_object_size_hint_weight_set(wd->entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(wd->entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_scroller_content_set(wd->scroller, wd->entry);
- evas_object_show(wd->entry);
-
- elm_entry_text_filter_prepend(wd->entry, _text_filter_wrap_cb, obj);
- elm_entry_item_provider_prepend(wd->entry, _item_provider_wrap_cb, obj);
-
- evas_object_smart_callback_add(wd->entry, "changed", _entry_changed, obj);
- evas_object_smart_callback_add(wd->entry, "activated", _entry_activated, obj);
- evas_object_smart_callback_add(wd->entry, "press", _entry_press, obj);
- evas_object_smart_callback_add(wd->entry, "clicked", _entry_clicked, obj);
- evas_object_smart_callback_add(wd->entry, "clicked,double", _entry_clicked_double, obj);
- evas_object_smart_callback_add(wd->entry, "cursor,changed", _entry_cursor_changed, obj);
- evas_object_smart_callback_add(wd->entry, "anchor,clicked", _entry_anchor_clicked, obj);
- evas_object_smart_callback_add(wd->entry, "selection,start", _entry_selection_start, obj);
- evas_object_smart_callback_add(wd->entry, "selection,changed", _entry_selection_changed, obj);
- evas_object_smart_callback_add(wd->entry, "selection,cleared", _entry_selection_cleared, obj);
- evas_object_smart_callback_add(wd->entry, "selection,paste", _entry_selection_paste, obj);
- evas_object_smart_callback_add(wd->entry, "selection,copy", _entry_selection_copy, obj);
- evas_object_smart_callback_add(wd->entry, "selection,cut", _entry_selection_cut, obj);
- evas_object_smart_callback_add(wd->entry, "longpressed", _entry_longpressed, obj);
- evas_object_smart_callback_add(wd->entry, "focused", _entry_focused, obj);
- evas_object_smart_callback_add(wd->entry, "unfocused", _entry_unfocused, obj);
-
- evas_object_event_callback_add(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints, NULL);
-
- _sizing_eval(obj);
-
- // TODO: convert Elementary to subclassing of Evas_Smart_Class
- // TODO: and save some bytes, making descriptions per-class and not instance!
- evas_object_smart_callbacks_descriptions_set(obj, _signals);
+ obj = elm_entry_add(parent);
+ elm_entry_scrollable_set(obj, EINA_TRUE);
return obj;
}
-
- /**
- * This sets a widget to be displayed to the left of a scrolled entry.
- *
- * @param obj The scrolled entry object
- * @param icon The widget to display on the left side of the scrolled
- * entry.
- *
- * @note A previously set widget will be destroyed.
- * @note If the object being set does not have minimum size hints set,
- * it won't get properly displayed.
- *
- * @ingroup Scrolled_Entry
- * @see elm_scrolled_entry_end_set
- */
- EAPI void
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_icon_set(Evas_Object *obj, Evas_Object *icon)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- Evas_Object *edje;
- if (!wd) return;
- EINA_SAFETY_ON_NULL_RETURN(icon);
- if (wd->icon == icon) return;
- if (wd->icon) evas_object_del(wd->icon);
- wd->icon = icon;
- edje = _elm_scroller_edje_object_get(wd->scroller);
- if (!edje) return;
- edje_object_part_swallow(edje, "elm.swallow.icon", wd->icon);
- edje_object_signal_emit(edje, "elm,action,show,icon", "elm");
- _sizing_eval(obj);
- }
-
- /**
- * Gets the leftmost widget of the scrolled entry. This object is
- * owned by the scrolled entry and should not be modified.
- *
- * @param obj The scrolled entry object
- * @return the left widget inside the scroller
- *
- * @ingroup Scrolled_Entry
- */
- EAPI Evas_Object *
+ {elm_entry_icon_set(obj, icon);}
+ EINA_DEPRECATED EAPI Evas_Object *
elm_scrolled_entry_icon_get(const Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return NULL;
- return wd->icon;
- }
-
- /**
- * Unset the leftmost widget of the scrolled entry, unparenting and
- * returning it.
- *
- * @param obj The scrolled entry object
- * @return the previously set icon sub-object of this entry, on
- * success.
- *
- * @see elm_scrolled_entry_icon_set()
- *
- * @ingroup Scrolled_Entry
- */
- EAPI Evas_Object *
+ {return elm_entry_icon_get(obj);}
+ EINA_DEPRECATED EAPI Evas_Object *
elm_scrolled_entry_icon_unset(Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- Evas_Object *ret = NULL;
- if (!wd) return NULL;
- if (wd->icon)
- {
- Evas_Object *edje = _elm_scroller_edje_object_get(wd->scroller);
- if (!edje) return NULL;
- ret = wd->icon;
- edje_object_part_unswallow(edje, wd->icon);
- edje_object_signal_emit(edje, "elm,action,hide,icon", "elm");
- wd->icon = NULL;
- _sizing_eval(obj);
- }
- return ret;
- }
-
- /**
- * Sets the visibility of the left-side widget of the scrolled entry,
- * set by @elm_scrolled_entry_icon_set().
- *
- * @param obj The scrolled entry object
- * @param setting EINA_TRUE if the object should be displayed,
- * EINA_FALSE if not.
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {return elm_entry_icon_unset(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_icon_visible_set(Evas_Object *obj, Eina_Bool setting)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if ((!wd) || (!wd->icon)) return;
- if (setting)
- evas_object_hide(wd->icon);
- else
- evas_object_show(wd->icon);
- _sizing_eval(obj);
- }
-
- /**
- * This sets a widget to be displayed to the end of a scrolled entry.
- *
- * @param obj The scrolled entry object
- * @param end The widget to display on the right side of the scrolled
- * entry.
- *
- * @note A previously set widget will be destroyed.
- * @note If the object being set does not have minimum size hints set,
- * it won't get properly displayed.
- *
- * @ingroup Scrolled_Entry
- * @see elm_scrolled_entry_icon_set
- */
- EAPI void
+ {elm_entry_icon_visible_set(obj, setting);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_end_set(Evas_Object *obj, Evas_Object *end)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- Evas_Object *edje;
- if (!wd) return;
- EINA_SAFETY_ON_NULL_RETURN(end);
- if (wd->end == end) return;
- if (wd->end) evas_object_del(wd->end);
- wd->end = end;
- edje = _elm_scroller_edje_object_get(wd->scroller);
- if (!edje) return;
- edje_object_part_swallow(edje, "elm.swallow.end", wd->end);
- edje_object_signal_emit(edje, "elm,action,show,end", "elm");
- _sizing_eval(obj);
- }
-
- /**
- * Gets the endmost widget of the scrolled entry. This object is owned
- * by the scrolled entry and should not be modified.
- *
- * @param obj The scrolled entry object
- * @return the right widget inside the scroller
- *
- * @ingroup Scrolled_Entry
- */
- EAPI Evas_Object *
+ {elm_entry_end_set(obj, end);}
+ EINA_DEPRECATED EAPI Evas_Object *
elm_scrolled_entry_end_get(const Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return NULL;
- return wd->end;
- }
-
- /**
- * Unset the endmost widget of the scrolled entry, unparenting and
- * returning it.
- *
- * @param obj The scrolled entry object
- * @return the previously set icon sub-object of this entry, on
- * success.
- *
- * @see elm_scrolled_entry_icon_set()
- *
- * @ingroup Scrolled_Entry
- */
- EAPI Evas_Object *
+ {return elm_entry_end_get(obj);}
+ EINA_DEPRECATED EAPI Evas_Object *
elm_scrolled_entry_end_unset(Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- Evas_Object *ret = NULL;
- if (!wd) return NULL;
- if (wd->end)
- {
- Evas_Object *edje = _elm_scroller_edje_object_get(wd->scroller);
- if (!edje) return NULL;
- ret = wd->end;
- edje_object_part_unswallow(edje, wd->end);
- edje_object_signal_emit(edje, "elm,action,hide,end", "elm");
- wd->end = NULL;
- _sizing_eval(obj);
- }
- return ret;
- }
-
- /**
- * Sets the visibility of the end widget of the scrolled entry, set by
- * @elm_scrolled_entry_end_set().
- *
- * @param obj The scrolled entry object
- * @param setting EINA_TRUE if the object should be displayed,
- * EINA_FALSE if not.
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {return elm_entry_end_unset(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_end_visible_set(Evas_Object *obj, Eina_Bool setting)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if ((!wd) || (!wd->end)) return;
- if (setting)
- evas_object_hide(wd->end);
- else
- evas_object_show(wd->end);
- _sizing_eval(obj);
- }
-
- /**
- * This sets the scrolled entry object not to line wrap. All input will
- * be on a single line, and the entry box will scroll with user input.
- *
- * @param obj The scrolled entry object
- * @param single_line If true, the text in the scrolled entry
- * will be on a single line.
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_end_visible_set(obj, setting);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- if (wd->single_line == single_line) return;
- elm_entry_single_line_set(wd->entry, single_line);
- wd->single_line = single_line;
- if (single_line)
- {
- elm_scroller_policy_set(wd->scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
- elm_scroller_content_min_limit(wd->scroller, 0, 1);
- }
- else
- {
- elm_scroller_policy_set(wd->scroller, wd->policy_h, wd->policy_v);
- elm_scroller_content_min_limit(wd->scroller, 0, 0);
- }
- _sizing_eval(obj);
- }
-
- /**
- * This returns true if the scrolled entry has been set to single line mode.
- * See also elm_scrolled_entry_single_line_set().
- *
- * @param obj The scrolled entry object
- * @return single_line If true, the text in the scrolled entry is set to display
- * on a single line.
- *
- * @ingroup Scrolled_Entry
- */
- EAPI Eina_Bool
+ {elm_entry_single_line_set(obj, single_line);}
+ EINA_DEPRECATED EAPI Eina_Bool
elm_scrolled_entry_single_line_get(const Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return EINA_FALSE;
- return elm_entry_single_line_get(wd->entry);
- }
-
-
- /**
- * This sets the scrolled entry object to password mode. All text entered
- * and/or displayed within the widget will be replaced with asterisks (*).
- *
- * @param obj The scrolled entry object
- * @param password If true, password mode is enabled.
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {return elm_entry_single_line_get(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_password_set(Evas_Object *obj, Eina_Bool password)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_password_set(wd->entry, password);
- }
-
- /**
- * This returns whether password mode is enabled.
- * See also elm_scrolled_entry_password_set().
- *
- * @param obj The scrolled entry object
- * @return If true, the scrolled entry is set to display all characters
- * as asterisks (*).
- *
- * @ingroup Scrolled_Entry
- */
- EAPI Eina_Bool
+ {elm_entry_password_set(obj, password);}
+ EINA_DEPRECATED EAPI Eina_Bool
elm_scrolled_entry_password_get(const Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return EINA_FALSE;
- return elm_entry_password_get(wd->entry);
- }
-
-
- /**
- * This sets the text displayed within the scrolled entry to @p entry.
- *
- * @param obj The scrolled entry object
- * @param entry The text to be displayed
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {return elm_entry_password_get(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_entry_set(Evas_Object *obj, const char *entry)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_entry_set(wd->entry, entry);
- }
-
- /**
- * This returns the text currently shown in object @p entry.
- * See also elm_scrolled_entry_entry_set().
- *
- * @param obj The scrolled entry object
- * @return The currently displayed text or NULL on failure
- *
- * @ingroup Scrolled_Entry
- */
- EAPI const char *
+ {elm_entry_entry_set(obj, entry);}
+ EINA_DEPRECATED EAPI void
+ elm_scrolled_entry_entry_append(Evas_Object *obj, const char *entry)
+ {elm_entry_entry_append(obj, entry);}
+ EINA_DEPRECATED EAPI const char *
elm_scrolled_entry_entry_get(const Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return NULL;
- return elm_entry_entry_get(wd->entry);
- }
-
- /**
- * This returns EINA_TRUE if the entry is empty/there was an error
- * and EINA_FALSE if it is not empty.
- *
- * @param obj The entry object
- * @return If the entry is empty or not.
- *
- * @ingroup Entry
- */
- EAPI Eina_Bool
+ {return elm_entry_entry_get(obj);}
+ EINA_DEPRECATED EAPI Eina_Bool
elm_scrolled_entry_is_empty(const Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) EINA_TRUE;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return EINA_TRUE;
- return elm_entry_is_empty(wd->entry);
- }
-
- /**
- * This returns all selected text within the scrolled entry.
- *
- * @param obj The scrolled entry object
- * @return The selected text within the scrolled entry or NULL on failure
- *
- * @ingroup Scrolled_Entry
- */
- EAPI const char *
+ {return elm_entry_is_empty(obj);}
+ EINA_DEPRECATED EAPI const char *
elm_scrolled_entry_selection_get(const Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return NULL;
- return elm_entry_selection_get(wd->entry);
- }
-
- /**
- * This inserts text in @p entry at the beginning of the scrolled entry
- * object.
- *
- * @param obj The scrolled entry object
- * @param entry The text to insert
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {return elm_entry_selection_get(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_entry_insert(Evas_Object *obj, const char *entry)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_entry_insert(wd->entry, entry);
- }
-
- /**
- * This enables word line wrapping in the scrolled entry object. It is the opposite
- * of elm_scrolled_entry_single_line_set(). Additionally, setting this disables
- * character line wrapping.
- * See also elm_scrolled_entry_line_char_wrap_set().
- *
- * @param obj The scrolled entry object
- * @param wrap If true, the scrolled entry will be wrapped once it reaches the end
- * of the object. Wrapping will occur at the end of the word before the end of the
- * object.
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
- elm_scrolled_entry_line_wrap_set(Evas_Object *obj, Eina_Bool wrap)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_line_wrap_set(wd->entry, wrap);
- }
-
- /**
- * This enables character line wrapping in the scrolled entry object. It is the opposite
- * of elm_scrolled_entry_single_line_set(). Additionally, setting this disables
- * word line wrapping.
- * See also elm_scrolled_entry_line_wrap_set().
- *
- * @param obj The scrolled entry object
- * @param wrap If true, the scrolled entry will be wrapped once it reaches the end
- * of the object. Wrapping will occur immediately upon reaching the end of the object.
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
- elm_scrolled_entry_line_char_wrap_set(Evas_Object *obj, Eina_Bool wrap)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_line_char_wrap_set(wd->entry, wrap);
- }
-
- /**
- * This sets the editable attribute of the scrolled entry.
- *
- * @param obj The scrolled entry object
- * @param editable If true, the scrolled entry will be editable by the user.
- * If false, it will be set to the disabled state.
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_entry_insert(obj, entry);}
+ EINA_DEPRECATED EAPI void
+ elm_scrolled_entry_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap)
+ {elm_entry_line_wrap_set(obj, wrap);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_editable_set(Evas_Object *obj, Eina_Bool editable)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_editable_set(wd->entry, editable);
- }
-
- /**
- * This gets the editable attribute of the scrolled entry.
- * See also elm_scrolled_entry_editable_set().
- *
- * @param obj The scrolled entry object
- * @return If true, the scrolled entry is editable by the user.
- * If false, it is not editable by the user
- *
- * @ingroup Scrolled_Entry
- */
- EAPI Eina_Bool
+ {elm_entry_editable_set(obj, editable);}
+ EINA_DEPRECATED EAPI Eina_Bool
elm_scrolled_entry_editable_get(const Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return EINA_FALSE;
- return elm_entry_editable_get(wd->entry);
- }
-
-
- /**
- * This drops any existing text selection within the scrolled entry.
- *
- * @param obj The scrolled entry object
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {return elm_entry_editable_get(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_select_none(Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_select_none(wd->entry);
- }
-
- /**
- * This selects all text within the scrolled entry.
- *
- * @param obj The scrolled entry object
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_select_none(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_select_all(Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_select_all(wd->entry);
- }
-
- /**
- * This moves the cursor one place to the right within the entry.
- *
- * @param obj The scrolled entry object
- * @return EINA_TRUE upon success, EINA_FALSE upon failure
- *
- * @ingroup Scrolled_Entry
- */
- EAPI Eina_Bool
+ {return elm_entry_select_all(obj);}
+ EINA_DEPRECATED EAPI Eina_Bool
elm_scrolled_entry_cursor_next(Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return EINA_FALSE;
- return elm_entry_cursor_next(wd->entry);
- }
-
- /**
- * This moves the cursor one place to the left within the entry.
- *
- * @param obj The scrolled entry object
- * @return EINA_TRUE upon success, EINA_FALSE upon failure
- *
- * @ingroup Scrolled_Entry
- */
- EAPI Eina_Bool
+ {return elm_entry_cursor_next(obj);}
+ EINA_DEPRECATED EAPI Eina_Bool
elm_scrolled_entry_cursor_prev(Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return EINA_FALSE;
- return elm_entry_cursor_prev(wd->entry);
- }
-
- /**
- * This moves the cursor one line up within the entry.
- *
- * @param obj The scrolled entry object
- * @return EINA_TRUE upon success, EINA_FALSE upon failure
- *
- * @ingroup Scrolled_Entry
- */
- EAPI Eina_Bool
+ {return elm_entry_cursor_prev(obj);}
+ EINA_DEPRECATED EAPI Eina_Bool
elm_scrolled_entry_cursor_up(Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return EINA_FALSE;
- return elm_entry_cursor_up(wd->entry);
- }
-
- /**
- * This moves the cursor one line down within the entry.
- *
- * @param obj The scrolled entry object
- * @return EINA_TRUE upon success, EINA_FALSE upon failure
- *
- * @ingroup Scrolled_Entry
- */
- EAPI Eina_Bool
+ {return elm_entry_cursor_up(obj);}
+ EINA_DEPRECATED EAPI Eina_Bool
elm_scrolled_entry_cursor_down(Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return EINA_FALSE;
- return elm_entry_cursor_down(wd->entry);
- }
-
- /**
- * This moves the cursor to the beginning of the entry.
- *
- * @param obj The scrolled entry object
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {return elm_entry_cursor_down(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_cursor_begin_set(Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_cursor_begin_set(wd->entry);
- }
-
- /**
- * This moves the cursor to the end of the entry.
- *
- * @param obj The scrolled entry object
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_cursor_begin_set(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_cursor_end_set(Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- Evas_Coord x, y, w, h;
- elm_entry_cursor_end_set(wd->entry);
- elm_widget_show_region_get(wd->entry, &x, &y, &w, &h);
- elm_scroller_region_show(wd->scroller, x, y, w, h);
- }
-
- /**
- * This moves the cursor to the beginning of the current line.
- *
- * @param obj The scrolled entry object
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_cursor_end_set(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_cursor_line_begin_set(Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_cursor_line_begin_set(wd->entry);
- }
-
- /**
- * This moves the cursor to the end of the current line.
- *
- * @param obj The scrolled entry object
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_cursor_line_begin_set(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_cursor_line_end_set(Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_cursor_line_end_set(wd->entry);
- }
-
- /**
- * This begins a selection within the scrolled entry as though
- * the user were holding down the mouse button to make a selection.
- *
- * @param obj The scrolled entry object
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_cursor_line_end_set(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_cursor_selection_begin(Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_cursor_selection_begin(wd->entry);
- }
-
- /**
- * This ends a selection within the scrolled entry as though
- * the user had just released the mouse button while making a selection.
- *
- * @param obj The scrolled entry object
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_cursor_selection_begin(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_cursor_selection_end(Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_cursor_selection_end(wd->entry);
- }
-
- /**
- * TODO: fill this in
- *
- * @param obj The scrolled entry object
- * @return TODO: fill this in
- *
- * @ingroup Scrolled_Entry
- */
- EAPI Eina_Bool
+ {return elm_entry_cursor_selection_end(obj);}
+ EINA_DEPRECATED EAPI Eina_Bool
elm_scrolled_entry_cursor_is_format_get(const Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return EINA_FALSE;
- return elm_entry_cursor_is_format_get(wd->entry);
- }
-
- /**
- * This returns whether the cursor is visible.
- *
- * @param obj The scrolled entry object
- * @return If true, the cursor is visible.
- *
- * @ingroup Scrolled_Entry
- */
- EAPI Eina_Bool
+ {return elm_entry_cursor_is_format_get(obj);}
+ EINA_DEPRECATED EAPI Eina_Bool
elm_scrolled_entry_cursor_is_visible_format_get(const Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return EINA_FALSE;
- return elm_entry_cursor_is_visible_format_get(wd->entry);
- }
-
- /**
- * TODO: fill this in
- *
- * @param obj The scrolled entry object
- * @return TODO: fill this in
- *
- * @ingroup Scrolled_Entry
- */
- EAPI const char *
+ {return elm_entry_cursor_is_visible_format_get(obj);}
+ EINA_DEPRECATED EAPI const char *
elm_scrolled_entry_cursor_content_get(const Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return NULL;
- return elm_entry_cursor_content_get(wd->entry);
- }
-
- /**
- * Sets the cursor position in the scrolled entry to the given value
- *
- * @param obj The scrolled entry object
- * @param pos the position of the cursor
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {return elm_entry_cursor_content_get(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_cursor_pos_set(Evas_Object *obj, int pos)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_cursor_pos_set(wd->entry, pos);
- }
-
- /**
- * Retrieves the current position of the cursor in the scrolled entry
- *
- * @param obj The entry object
- * @return the cursor position
- *
- * @ingroup Scrolled_Entry
- */
- EAPI int
+ {elm_entry_cursor_pos_set(obj, pos);}
+ EINA_DEPRECATED EAPI int
elm_scrolled_entry_cursor_pos_get(const Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) 0;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return 0;
- return elm_entry_cursor_pos_get(wd->entry);
- }
-
- /**
- * This executes a "cut" action on the selected text in the scrolled entry.
- *
- * @param obj The scrolled entry object
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {return elm_entry_cursor_pos_get(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_selection_cut(Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_selection_cut(wd->entry);
- }
-
- /**
- * This executes a "copy" action on the selected text in the scrolled entry.
- *
- * @param obj The scrolled entry object
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_selection_cut(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_selection_copy(Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_selection_copy(wd->entry);
- }
-
- /**
- * This executes a "paste" action in the scrolled entry.
- *
- * @param obj The scrolled entry object
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_selection_copy(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_selection_paste(Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_selection_paste(wd->entry);
- }
-
- /**
- * This clears and frees the items in a scrolled entry's contextual (right click) menu.
- *
- * @param obj The scrolled entry object
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_selection_paste(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_context_menu_clear(Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_context_menu_clear(wd->entry);
- }
-
- /**
- * This adds an item to the scrolled entry's contextual menu.
- *
- * @param obj The scrolled entry object
- * @param label The item's text label
- * @param icon_file The item's icon file
- * @param icon_type The item's icon type
- * @param func The callback to execute when the item is clicked
- * @param data The data to associate with the item for related functions
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_context_menu_clear(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_context_menu_item_add(Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, Evas_Smart_Cb func, const void *data)
- {
- Elm_Entry_Context_Menu_Item *ci;
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
-
- ci = malloc(sizeof(Elm_Entry_Context_Menu_Item));
- if (!ci) return;
- ci->func = func;
- ci->data = (void *)data;
- ci->obj = obj;
- wd->items = eina_list_append(wd->items, ci);
- elm_entry_context_menu_item_add(wd->entry, label, icon_file, icon_type, _context_item_wrap_cb, ci);
- }
-
- /**
- * This disables the scrolled entry's contextual (right click) menu.
- *
- * @param obj The scrolled entry object
- * @param disabled If true, the menu is disabled
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_context_menu_item_add(obj, label, icon_file, icon_type, func, data);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_context_menu_disabled_set(Evas_Object *obj, Eina_Bool disabled)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_context_menu_disabled_set(wd->entry, disabled);
- }
-
- /**
- * This returns whether the scrolled entry's contextual (right click) menu is disabled.
- *
- * @param obj The scrolled entry object
- * @return If true, the menu is disabled
- *
- * @ingroup Scrolled_Entry
- */
- EAPI Eina_Bool
+ {elm_entry_context_menu_disabled_set(obj, disabled);}
+ EINA_DEPRECATED EAPI Eina_Bool
elm_scrolled_entry_context_menu_disabled_get(const Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return EINA_FALSE;
- return elm_entry_context_menu_disabled_get(wd->entry);
- }
-
- /**
- * This sets the scrolled entry's scrollbar policy (ie. enabling/disabling them).
- *
- * @param obj The scrolled entry object
- * @param h The horizontal scrollbar policy to apply
- * @param v The vertical scrollbar policy to apply
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {return elm_entry_context_menu_disabled_get(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_scrollbar_policy_set(Evas_Object *obj, Elm_Scroller_Policy h, Elm_Scroller_Policy v)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- wd->policy_h = h;
- wd->policy_v = v;
- elm_scroller_policy_set(wd->scroller, h, v);
- }
-
- /**
- * This enables/disables bouncing within the entry.
- *
- * @param obj The scrolled entry object
- * @param h The horizontal bounce state
- * @param v The vertical bounce state
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_scrollbar_policy_set(obj, h, v);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_scroller_bounce_set(wd->scroller, h_bounce, v_bounce);
- }
-
- /**
- * Get the bounce mode
- *
- * @param obj The Scrolled_Entry object
- * @param h_bounce Allow bounce horizontally
- * @param v_bounce Allow bounce vertically
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_bounce_set(obj, h_bounce, v_bounce);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_scroller_bounce_get(wd->scroller, h_bounce, v_bounce);
- }
-
- /**
- * This appends a custom item provider to the list for that entry
- *
- * This appends the given callback. The list is walked from beginning to end
- * with each function called given the item href string in the text. If the
- * function returns an object handle other than NULL (it should create an
- * and object to do this), then this object is used to replace that item. If
- * not the next provider is called until one provides an item object, or the
- * default provider in entry does.
- *
- * @param obj The entry object
- * @param func The function called to provide the item object
- * @param data The data passed to @p func
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_bounce_get(obj, h_bounce, v_bounce);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_item_provider_append(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *entry, const char *item), void *data)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- EINA_SAFETY_ON_NULL_RETURN(func);
- Elm_Entry_Item_Provider *ip = calloc(1, sizeof(Elm_Entry_Item_Provider));
- if (!ip) return;
- ip->func = func;
- ip->data = data;
- wd->item_providers = eina_list_append(wd->item_providers, ip);
- }
-
- /**
- * This prepends a custom item provider to the list for that entry
- *
- * This prepends the given callback. See elm_scrolled_entry_item_provider_append() for
- * more information
- *
- * @param obj The entry object
- * @param func The function called to provide the item object
- * @param data The data passed to @p func
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_item_provider_append(obj, func, data);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_item_provider_prepend(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *entry, const char *item), void *data)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- EINA_SAFETY_ON_NULL_RETURN(func);
- Elm_Entry_Item_Provider *ip = calloc(1, sizeof(Elm_Entry_Item_Provider));
- if (!ip) return;
- ip->func = func;
- ip->data = data;
- wd->item_providers = eina_list_prepend(wd->item_providers, ip);
- }
-
- /**
- * This removes a custom item provider to the list for that entry
- *
- * This removes the given callback. See elm_scrolled_entry_item_provider_append() for
- * more information
- *
- * @param obj The entry object
- * @param func The function called to provide the item object
- * @param data The data passed to @p func
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_item_provider_prepend(obj, func, data);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_item_provider_remove(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *entry, const char *item), void *data)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- Eina_List *l;
- Elm_Entry_Item_Provider *ip;
- if (!wd) return;
- EINA_SAFETY_ON_NULL_RETURN(func);
- EINA_LIST_FOREACH(wd->item_providers, l, ip)
- {
- if ((ip->func == func) && (ip->data == data))
- {
- wd->item_providers = eina_list_remove_list(wd->item_providers, l);
- free(ip);
- return;
- }
- }
- }
-
- /**
- * Append a filter function for text inserted in the entry
- *
- * Append the given callback to the list. This functions will be called
- * whenever any text is inserted into the entry, with the text to be inserted
- * as a parameter. The callback function is free to alter the text in any way
- * it wants, but it must remember to free the given pointer and update it.
- * If the new text is to be discarded, the function can free it and set it text
- * parameter to NULL. This will also prevent any following filters from being
- * called.
- *
- * @param obj The entry object
- * @param func The function to use as text filter
- * @param data User data to pass to @p func
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_item_provider_remove(obj, func, data);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_text_filter_append(Evas_Object *obj, void (*func) (void *data, Evas_Object *entry, char **text), void *data)
- {
- Widget_Data *wd;
- Elm_Entry_Text_Filter *tf;
- ELM_CHECK_WIDTYPE(obj, widtype);
-
- wd = elm_widget_data_get(obj);
-
- EINA_SAFETY_ON_NULL_RETURN(func);
-
- tf = ELM_NEW(Elm_Entry_Text_Filter);
- if (!tf) return;
- tf->func = func;
- tf->data = data;
- wd->text_filters = eina_list_append(wd->text_filters, tf);
- }
-
- /**
- * Prepend a filter function for text insdrted in the entry
- *
- * Prepend the given callback to the list. See elm_scrolled_entry_text_filter_append()
- * for more information
- *
- * @param obj The entry object
- * @param func The function to use as text filter
- * @param data User data to pass to @p func
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_text_filter_append(obj, func, data);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_text_filter_prepend(Evas_Object *obj, void (*func) (void *data, Evas_Object *entry, char **text), void *data)
- {
- Widget_Data *wd;
- Elm_Entry_Text_Filter *tf;
- ELM_CHECK_WIDTYPE(obj, widtype);
-
- wd = elm_widget_data_get(obj);
-
- EINA_SAFETY_ON_NULL_RETURN(func);
-
- tf = ELM_NEW(Elm_Entry_Text_Filter);
- if (!tf) return;
- tf->func = func;
- tf->data = data;
- wd->text_filters = eina_list_prepend(wd->text_filters, tf);
- }
-
- /**
- * Remove a filter from the list
- *
- * Removes the given callback from the filter list. See elm_scrolled_entry_text_filter_append()
- * for more information.
- *
- * @param obj The entry object
- * @param func The filter function to remove
- * @param data The user data passed when adding the function
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_text_filter_prepend(obj, func, data);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_text_filter_remove(Evas_Object *obj, void (*func) (void *data, Evas_Object *entry, char **text), void *data)
- {
- Widget_Data *wd;
- Eina_List *l;
- Elm_Entry_Text_Filter *tf;
- ELM_CHECK_WIDTYPE(obj, widtype);
-
- wd = elm_widget_data_get(obj);
-
- EINA_SAFETY_ON_NULL_RETURN(func);
-
- EINA_LIST_FOREACH(wd->text_filters, l, tf)
- {
- if ((tf->func == func) && (tf->data == data))
- {
- wd->text_filters = eina_list_remove_list(wd->text_filters, l);
- free(tf);
- return;
- }
- }
- }
-
- /**
- * This sets the file (and implicitly loads it) for the text to display and
- * then edit. All changes are written back to the file after a short delay if
- * the entry object is set to autosave.
- *
- * @param obj The scrolled entry object
- * @param file The path to the file to load and save
- * @param format The file format
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_text_filter_remove(obj, func, data);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_file_set(wd->entry, file, format);
- }
-
- /**
- * Gets the file to load and save and the file format
- *
- * @param obj The scrolled entry object
- * @param file The path to the file to load and save
- * @param format The file format
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_file_set(obj, file, format);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_file_get(const Evas_Object *obj, const char **file, Elm_Text_Format *format)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_file_get(wd->entry, file, format);
- }
-
- /**
- * This function writes any changes made to the file set with
- * elm_scrolled_entry_file_set()
- *
- * @param obj The scrolled entry object
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_file_get(obj, file, format);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_file_save(Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_file_save(wd->entry);
- }
-
- /**
- * This sets the entry object to 'autosave' the loaded text file or not.
- *
- * @param obj The scrolled entry object
- * @param autosave Autosave the loaded file or not
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {elm_entry_file_save(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_autosave_set(Evas_Object *obj, Eina_Bool autosave)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_autosave_set(wd->entry, autosave);
- }
-
- /**
- * This gets the entry object's 'autosave' status.
- *
- * @param obj The scrolled entry object
- * @return Autosave the loaded file or not
- *
- * @ingroup Scrolled_Entry
- */
- EAPI Eina_Bool
+ {elm_entry_autosave_set(obj, autosave);}
+ EINA_DEPRECATED EAPI Eina_Bool
elm_scrolled_entry_autosave_get(const Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return EINA_FALSE;
- return elm_entry_autosave_get(wd->entry);
- }
-
- /**
- * Control pasting of text and images for the widget.
- *
- * Normally the scrolled entry allows both text and images to be pasted.
- * By setting textonly to be true, this prevents images from being pasted.
- *
- * Note this only changes the behaviour of text.
- *
- * @param obj The scrolled entry object
- * @param textonly paste mode - EINA_TRUE is text only, EINA_FALSE is text+image+other.
- *
- * @see elm_entry_cnp_textonly_set
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {return elm_entry_autosave_get(obj);}
+ EINA_DEPRECATED EAPI void
elm_scrolled_entry_cnp_textonly_set(Evas_Object *obj, Eina_Bool textonly)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- elm_entry_cnp_textonly_set(wd->entry, textonly);
- }
-
- /**
- * Getting elm_scrolled_entry text paste/drop mode.
- *
- * In textonly mode, only text may be pasted or dropped into the widget.
- *
- * @param obj The scrolled entry object
- * @return If the widget only accepts text from pastes.
- *
- * @see elm_entry_cnp_textonly_get
- * @ingroup Scrolled_Entry
- */
- EAPI Eina_Bool
+ {elm_entry_cnp_textonly_set(obj, textonly);}
+ EINA_DEPRECATED EAPI Eina_Bool
elm_scrolled_entry_cnp_textonly_get(Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return EINA_FALSE;
- return elm_entry_cnp_textonly_get(wd->entry);
- }
-
- /**
- * Get the input method context in the scrolled entry widget
- *
- * @param obj The scrolled entry object
- * @return The input method context
- *
- * @ingroup Scrolled_Entry
- */
- EAPI Ecore_IMF_Context *elm_scrolled_entry_imf_context_get(Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd || !wd->entry) return NULL;
-
- return elm_entry_imf_context_get(wd->entry);
- }
-
- /**
- * This sets the attribute to show the input panel automatically.
- *
- * @param obj The scrolled entry object
- * @param enabled If true, the input panel is appeared when entry is clicked or has a focus
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
+ {return elm_entry_cnp_textonly_get(obj);}
++//////////////////////////////////////////////////////////// ONLY in our git
++EINA_DEPRECATED EAPI void
++elm_scrolled_entry_line_char_wrap_set(Evas_Object *obj, Eina_Bool wrap)
++{elm_entry_line_char_wrap_set(obj, wrap);}
++EINA_DEPRECATED EAPI void
+elm_scrolled_entry_input_panel_enabled_set(Evas_Object *obj, Eina_Bool enabled)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd || !wd->entry) return;
-
- elm_entry_input_panel_enabled_set(wd->entry, enabled);
- }
-
- /**
- * Set the input panel layout of the scrolled entry
- *
- * @param obj The scrolled entry object
- * @param layout the layout to set
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
++{elm_entry_input_panel_enabled_set(obj, enabled);}
++EINA_DEPRECATED EAPI void
+elm_scrolled_entry_input_panel_layout_set(Evas_Object *obj, Elm_Input_Panel_Layout layout)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd || !wd->entry) return;
-
- elm_entry_input_panel_layout_set(wd->entry, layout);
- }
-
- /**
- * Set whether scrolled entry should support auto capitalization
- *
- * @param obj The entry object
- * @param on If true, scrolled entry suports auto capitalization.
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
++{elm_entry_input_panel_layout_set(obj, layout);}
++EINA_DEPRECATED EAPI Ecore_IMF_Context *
++elm_scrolled_entry_imf_context_get(Evas_Object *obj)
++{return elm_entry_imf_context_get(obj);}
++EINA_DEPRECATED EAPI void
+elm_scrolled_entry_autocapitalization_set(Evas_Object *obj, Eina_Bool autocap)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd || !wd->entry) return;
-
- elm_entry_autocapitalization_set(wd->entry, autocap);
- }
-
- /**
- * Set whether scrolled entry should support auto period
- *
- * @param obj The entry object
- * @param on If true, scrolled entry suports auto period.
- *
- * @ingroup Scrolled_Entry
- */
- EAPI void
++{elm_entry_autocapitalization_set(obj, autocap);}
++EINA_DEPRECATED EAPI void
+elm_scrolled_entry_autoperiod_set(Evas_Object *obj, Eina_Bool autoperiod)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd || !wd->entry) return;
-
- elm_entry_autoperiod_set(wd->entry, autoperiod);
- }
++{elm_entry_autoperiod_set(obj, autoperiod);}
struct _Widget_Data
{
- Evas_Object *as; // actionslider
- Evas_Object *drag_button_base;
- Elm_Actionslider_Pos magnet_position, enabled_position;
- const char *text_left, *text_right, *text_center;
- const char *indicator_label;
- Ecore_Animator *button_animator;
- double final_position;
- Eina_Bool mouse_down : 1;
+ Evas_Object *as; // actionslider
+ Evas_Object *icon; // an icon for a button or a bar
+ Evas_Object *icon_fake; // an icon for a button or a bar
+
+ // setting
+ Elm_Actionslider_Magnet_Pos magnet_position, enabled_position;
+ const char *text_left, *text_right, *text_center, *text_button;
+
+ // status
+ Eina_Bool mouse_down;
+ Eina_Bool mouse_hold;
+
+ // icon animation
+ Ecore_Animator *icon_animator;
+ double final_position;
};
+static void _del_hook(Evas_Object *obj);
+static void _theme_hook(Evas_Object *obj);
+static void _disable_hook(Evas_Object *obj);
+static void _sizing_eval(Evas_Object *obj);
+static void _sub_del(void *data, Evas_Object *obj, void *event_info);
+
+/*
+ * callback functions
+ */
+static void _icon_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__);
+static void _icon_move_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__);
+static void _icon_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__);
+
+/*
+ * internal functions
+ */
+static Eina_Bool _icon_animation(void *data);
+
static const char *widtype = NULL;
- #define SIG_CHANGED "position"
- #define SIG_SELECTED "selected"
+ static const char SIG_CHANGED[] = "pos_changed";
+ static const char SIG_SELECTED[] = "selected";
static const Evas_Smart_Cb_Description _signals[] =
{
}
static Eina_Bool
-_button_animation(void *data)
+_icon_animation(void *data)
{
- Evas_Object *obj = data;
- Widget_Data *wd = elm_widget_data_get(obj);
- double cur_position = 0.0, new_position = 0.0;
- double move_amount = 0.05;
- Eina_Bool flag_finish_animation = EINA_FALSE;
+ Evas_Object *as = data;
+ Widget_Data *wd = (Widget_Data *)data;
- if (!wd) return EINA_FALSE;
+ if (!wd)
+ {
- wd->button_animator = NULL;
++ wd->icon_animator = NULL;
+ return ECORE_CALLBACK_CANCEL;
+ }
+ double cur_position = 0.0, new_position = 0.0;
+ double move_amount = 0.05;
+ double adjusted_final;
+ Eina_Bool flag_finish_animation = EINA_FALSE;
- edje_object_part_drag_value_get(wd->as,
- "elm.drag_button_base", &cur_position, NULL);
+ edje_object_part_drag_value_get(wd->as, "elm.swallow.icon", &cur_position, NULL);
+ adjusted_final = (!elm_widget_mirrored_get(as)) ? wd->final_position : 1.0 - wd->final_position;
+
+ if ( (adjusted_final == 0.0) ||(adjusted_final == 0.5 && cur_position >= adjusted_final) )
{
- double adjusted_final;
- adjusted_final = (!elm_widget_mirrored_get(obj)) ?
- wd->final_position : 1.0 - wd->final_position;
- if ((adjusted_final == 0.0) ||
- (adjusted_final == 0.5 && cur_position >= adjusted_final))
+ new_position = cur_position - move_amount;
+ if (new_position <= adjusted_final)
{
- new_position = cur_position - move_amount;
- if (new_position <= adjusted_final)
- {
- new_position = adjusted_final;
- flag_finish_animation = EINA_TRUE;
- }
+ new_position = adjusted_final;
+ flag_finish_animation = EINA_TRUE;
}
- else if ((adjusted_final == 1.0) ||
- (adjusted_final == 0.5 && cur_position < adjusted_final))
+ }
+ else if ((adjusted_final == 1.0) || (adjusted_final == 0.5 && cur_position < adjusted_final) )
+ {
+ new_position = cur_position + move_amount;
+ if (new_position >= adjusted_final)
{
- new_position = cur_position + move_amount;
- if (new_position >= adjusted_final)
- {
- new_position = adjusted_final;
- flag_finish_animation = EINA_TRUE;
- }
+ new_position = adjusted_final;
+ flag_finish_animation = EINA_TRUE;
+ /*
+ // TODO
+ if (wd->type == ELM_ACTIONSLIDER_TYPE_BAR_GREEN ||
+ wd->type == ELM_ACTIONSLIDER_TYPE_BAR_RED ) {
+ edje_object_signal_emit(wd->as, "elm,show,bar,text,center", "elm");
+ }
+ */
}
- edje_object_part_drag_value_set(wd->as,
- "elm.drag_button_base", new_position, 0.5);
}
+ edje_object_part_drag_value_set(wd->as, "elm.swallow.icon", new_position, 0.5);
if (flag_finish_animation)
{
evas_object_smart_callback_call(data, SIG_SELECTED,
(void *)wd->text_center);
else if ((wd->final_position == 1) &&
- (wd->enabled_position & ELM_ACTIONSLIDER_RIGHT))
+ (wd->enabled_position & ELM_ACTIONSLIDER_MAGNET_RIGHT))
evas_object_smart_callback_call(data, SIG_SELECTED,
(void *)wd->text_right);
- return EINA_FALSE;
- wd->button_animator = NULL;
++ wd->icon_animator = NULL;
+ return ECORE_CALLBACK_CANCEL;
+ }
+ return ECORE_CALLBACK_RENEW;
-}
-
-static void
-_drag_button_up_cb(void *data, Evas_Object *o __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
-{
- Evas_Object *obj = (Evas_Object *) data;
- Widget_Data *wd = elm_widget_data_get(obj);
- double position = 0.0;
- if (!wd) return;
-
- wd->mouse_down = EINA_FALSE;
+
- edje_object_part_drag_value_get(wd->as, "elm.drag_button_base",
- &position, NULL);
-
- if ((wd->enabled_position & ELM_ACTIONSLIDER_LEFT) &&
- ((!elm_widget_mirrored_get(obj) && position == 0.0) ||
- (elm_widget_mirrored_get(obj) && position == 1.0)))
- {
- wd->final_position = 0;
- evas_object_smart_callback_call(data, SIG_SELECTED,
- (void *) wd->text_left);
- return;
- }
- if (position >= 0.45 && position <= 0.55 &&
- (wd->enabled_position & ELM_ACTIONSLIDER_CENTER))
- {
- wd->final_position = 0.5;
- evas_object_smart_callback_call(data, SIG_SELECTED,
- (void *)wd->text_center);
- if (wd->button_animator) ecore_animator_del(wd->button_animator);
- wd->button_animator = ecore_animator_add(_button_animation, data);
- return;
- }
- if ((wd->enabled_position & ELM_ACTIONSLIDER_RIGHT) &&
- ((!elm_widget_mirrored_get(obj) && position == 1.0) ||
- (elm_widget_mirrored_get(obj) && position == 0.0)))
- {
- wd->final_position = 1;
- evas_object_smart_callback_call(data, SIG_SELECTED,
- (void *) wd->text_right);
- return;
- }
-
- if (wd->magnet_position == ELM_ACTIONSLIDER_NONE) return;
-
-#define _FINAL_POS_BY_ORIENTATION(x) (x)
-#define _POS_BY_ORIENTATION(x) \
- ((!elm_widget_mirrored_get(obj)) ? \
- x : 1.0 - x)
-
- position = _POS_BY_ORIENTATION(position);
-
- if (position < 0.3)
- {
- if (wd->magnet_position & ELM_ACTIONSLIDER_LEFT)
- wd->final_position = _FINAL_POS_BY_ORIENTATION(0);
- else if (wd->magnet_position & ELM_ACTIONSLIDER_CENTER)
- wd->final_position = 0.5;
- else if (wd->magnet_position & ELM_ACTIONSLIDER_RIGHT)
- wd->final_position = _FINAL_POS_BY_ORIENTATION(1);
- }
- else if ((position >= 0.3) && (position <= 0.7))
- {
- if (wd->magnet_position & ELM_ACTIONSLIDER_CENTER)
- wd->final_position = 0.5;
- else if (position < 0.5)
- {
- if (wd->magnet_position & ELM_ACTIONSLIDER_LEFT)
- wd->final_position = _FINAL_POS_BY_ORIENTATION(0);
- else
- wd->final_position = _FINAL_POS_BY_ORIENTATION(1);
- }
- else
- {
- if (wd->magnet_position & ELM_ACTIONSLIDER_RIGHT)
- wd->final_position = _FINAL_POS_BY_ORIENTATION(1);
- else
- wd->final_position = _FINAL_POS_BY_ORIENTATION(0);
- }
- }
- else
- {
- if (wd->magnet_position & ELM_ACTIONSLIDER_RIGHT)
- wd->final_position = _FINAL_POS_BY_ORIENTATION(1);
- else if (wd->magnet_position & ELM_ACTIONSLIDER_CENTER)
- wd->final_position = 0.5;
- else
- wd->final_position = _FINAL_POS_BY_ORIENTATION(0);
- }
- if (wd->button_animator) ecore_animator_del(wd->button_animator);
- wd->button_animator = ecore_animator_add(_button_animation, data);
-
-#undef _FINAL_POS_BY_ORIENTATION
+ }
+
+ static void
+ _elm_actionslider_label_set(Evas_Object *obj, const char *item, const char *label)
+ {
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+
+ if (!item)
+ {
- eina_stringshare_replace(&wd->indicator_label, label);
- edje_object_part_text_set(wd->as, "elm.text.indicator",
- wd->indicator_label);
++ eina_stringshare_replace(&wd->text_button, label);
++ edje_object_part_text_set(wd->as, "elm.text.button",
++ wd->text_button);
+ }
+ else if (!strcmp(item, "left"))
+ {
+ eina_stringshare_replace(&wd->text_left, label);
+ if (!elm_widget_mirrored_get(obj))
+ {
+ edje_object_part_text_set(wd->as, "elm.text.left", wd->text_left);
+ }
+ else
+ {
+ edje_object_part_text_set(wd->as, "elm.text.right", wd->text_left);
+ }
+ }
+ else if (!strcmp(item, "center"))
+ {
+ eina_stringshare_replace(&wd->text_center, label);
+ edje_object_part_text_set(wd->as, "elm.text.center", wd->text_center);
+ }
+ else if (!strcmp(item, "right"))
+ {
+ eina_stringshare_replace(&wd->text_right, label);
+ if (!elm_widget_mirrored_get(obj))
+ {
+ edje_object_part_text_set(wd->as, "elm.text.right", wd->text_right);
+ }
+ else
+ {
+ edje_object_part_text_set(wd->as, "elm.text.left", wd->text_right);
+ }
+ }
+ }
+
+ static const char *
+ _elm_actionslider_label_get(const Evas_Object *obj, const char *item)
+ {
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return NULL;
+
+ if (!item)
+ {
- return wd->indicator_label;
++ return wd->text_button;
+ }
+ else if (!strcmp(item, "left"))
+ {
+ return wd->text_left;
+ }
+ else if (!strcmp(item, "center"))
+ {
+ return wd->text_center;
+ }
+ else if (!strcmp(item, "right"))
+ {
+ return wd->text_right;
}
- return EINA_TRUE;
+ return NULL;
}
+/**
+ * Add a new actionslider to the parent.
+ *
+ * @param[in] parent The parent object
+ * @return The new actionslider object or NULL if it cannot be created
+ *
+ * @ingroup Actionslider
+ */
EAPI Evas_Object *
elm_actionslider_add(Evas_Object *parent)
{
Evas_Object *obj;
- Widget_Data *wd;
Evas *e;
+ Widget_Data *wd = NULL;
- wd = ELM_NEW(Widget_Data);
- e = evas_object_evas_get(parent);
- if (e == NULL) return NULL;
+ ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
+
ELM_SET_WIDTYPE(widtype, "actionslider");
- obj = elm_widget_add(e);
elm_widget_type_set(obj, "actionslider");
elm_widget_sub_object_add(parent, obj);
elm_widget_data_set(obj, wd);
+
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_text_set_hook_set(obj, _elm_actionslider_label_set);
+ elm_widget_text_get_hook_set(obj, _elm_actionslider_label_get);
wd->mouse_down = EINA_FALSE;
- wd->enabled_position = ELM_ACTIONSLIDER_ALL;
+ wd->mouse_hold = EINA_FALSE;
+ wd->enabled_position = ELM_ACTIONSLIDER_MAGNET_ALL;
+ // load background edj
wd->as = edje_object_add(e);
+ if(wd->as == NULL)
+ {
+ printf("Cannot load actionslider edj!\n");
+ return NULL;
+ }
_elm_theme_object_set(obj, wd->as, "actionslider", "base", "default");
elm_widget_resize_object_set(obj, wd->as);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- _elm_actionslider_label_set(obj, "left", left_label);
- _elm_actionslider_label_set(obj, "center", center_label);
- _elm_actionslider_label_set(obj, "right", right_label);
+ if(label == NULL) label = "";
+
+ if (pos == ELM_ACTIONSLIDER_LABEL_RIGHT)
- {
- if (wd->text_right) eina_stringshare_del(wd->text_right);
- wd->text_right = eina_stringshare_add(label);
- if (!elm_widget_mirrored_get(obj))
- edje_object_part_text_set(wd->as, "elm.text.right", label);
- else
- edje_object_part_text_set(wd->as, "elm.text.left", label);
- }
++ _elm_actionslider_label_set(obj, "right", label);
+ else if (pos == ELM_ACTIONSLIDER_LABEL_LEFT)
- {
- if (wd->text_left) eina_stringshare_del(wd->text_left);
- wd->text_left = eina_stringshare_add(label);
- if (!elm_widget_mirrored_get(obj))
- edje_object_part_text_set(wd->as, "elm.text.left", label);
- else
- edje_object_part_text_set(wd->as, "elm.text.right", label);
- }
++ _elm_actionslider_label_set(obj, "left", label);
+ else if (pos == ELM_ACTIONSLIDER_LABEL_CENTER)
- {
- if (wd->text_center) eina_stringshare_del(wd->text_center);
- wd->text_center = eina_stringshare_add(label);
- edje_object_part_text_set(wd->as, "elm.text.center", label);
- }
++ _elm_actionslider_label_set(obj, "center", label);
+ else if (pos == ELM_ACTIONSLIDER_LABEL_BUTTON)
+ {
- if (wd->text_button) eina_stringshare_del(wd->text_button);
- wd->text_button = eina_stringshare_add(label);
- edje_object_part_text_set(wd->icon, "elm.text.button", label);
++ _elm_actionslider_label_set(obj, NULL, label);
+
+ /* Resize button width */
+ Evas_Object *txt;
+ txt = (Evas_Object *)edje_object_part_object_get (wd->icon, "elm.text.button");
+ if (txt != NULL)
+ {
+ evas_object_text_text_set (txt, wd->text_button);
+
+ Evas_Coord x,y,w,h;
+ evas_object_geometry_get (txt, &x,&y,&w,&h);
+
+ char *data_left = NULL, *data_right = NULL;
+ int pad_left = 0, pad_right = 0;
+
+ data_left = (char *)edje_object_data_get (wd->icon, "left");
+ data_right = (char *)edje_object_data_get (wd->icon, "right");
+
+ if (data_left) pad_left = atoi(data_left);
+ if (data_right) pad_right = atoi(data_right);
+
+ evas_object_size_hint_min_set (wd->icon, w + pad_left + pad_right, 0);
+ evas_object_size_hint_min_set (wd->icon_fake, w + pad_left + pad_right, 0);
+ }
+ }
-
}
+/**
+ * Get actionslider labels.
+ *
+ * @param obj The actionslider object
+ * @param left_label A char** to place the left_label of @p obj into
+ * @param center_label A char** to place the center_label of @p obj into
+ * @param right_label A char** to place the right_label of @p obj into
+ *
+ * @ingroup Actionslider
+ */
EAPI void
elm_actionslider_labels_get(const Evas_Object *obj, const char **left_label, const char **center_label, const char **right_label)
{
-- if (left_label) *left_label= NULL;
-- if (center_label) *center_label= NULL;
-- if (right_label) *right_label= NULL;
-- ELM_CHECK_WIDTYPE(obj, widtype);
-- Widget_Data *wd = elm_widget_data_get(obj);
-- if (!wd) return;
- if (left_label) *left_label = wd->text_left;
- if (center_label) *center_label = wd->text_center;
- if (right_label) *right_label = wd->text_right;
+ if (left_label) *left_label = _elm_actionslider_label_get(obj, "left");
+ if (center_label) *center_label = _elm_actionslider_label_get(obj, "center");
-
+ if (right_label) *right_label = _elm_actionslider_label_get(obj, "right");
-
}
+/**
+ * Get actionslider selected label.
+ *
+ * @param obj The actionslider object
+ * @return The selected label
+ *
+ * @ingroup Actionslider
+ */
EAPI const char *
elm_actionslider_selected_label_get(const Evas_Object *obj)
{
return NULL;
}
-EAPI void
+/**
+ * Set the label used on the indicator object.
+ *
+ * @param obj The actionslider object
+ * @param label The label which is going to be set.
+ *
+ * @ingroup Actionslider
+ */
+EAPI void
elm_actionslider_indicator_label_set(Evas_Object *obj, const char *label)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
-
- eina_stringshare_replace(&wd->text_button, label);
- edje_object_part_text_set(wd->as, "elm.text.button", wd->text_button);
+ _elm_actionslider_label_set(obj, NULL, label);
}
+/**
+ * Get the label used on the indicator object.
+ *
+ * @param obj The actionslider object
+ * @return The indicator label
+ *
+ * @ingroup Actionslider
+ */
EAPI const char *
elm_actionslider_indicator_label_get(Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return NULL;
- return wd->text_button;
+ return _elm_actionslider_label_get(obj, NULL);
}
+
+/**
+ * Hold actionslider object movement.
+ *
+ * @param[in] obj The actionslider object
+ * @param[in] flag Actionslider hold/release
+ * (EINA_TURE = hold/EIN_FALSE = release)
+ *
+ * @ingroup Actionslider
+ */
+EAPI void
+elm_actionslider_hold(Evas_Object *obj, Eina_Bool flag)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+
+ wd->mouse_hold = flag;
+}
#include <Elementary.h>
#include "elm_priv.h"
- /**
- * @defgroup Bubble Bubble
- * @ingroup Elementary
- *
- * The Bubble is an widget used to show a text in a frame as speech is
- * represented in comics.
- *
- * Signals that you can add callbacks for are:
- *
- * "clicked" - This is called when a user has clicked the bubble.
- */
-
typedef struct _Widget_Data Widget_Data;
+#define SWEEP_SUPPORT 1
+
struct _Widget_Data
{
Evas_Object *bbl;
_mouse_up(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
Evas_Event_Mouse_Up *ev = event_info;
+ Widget_Data *wd = elm_widget_data_get(data);
+ if (!wd->down) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
- return;
- evas_object_smart_callback_call(data, SIG_CLICKED, NULL);
+ {
+#ifdef SWEEP_SUPPORT
+ if (ev->canvas.x - wd->down_point.x > SWEEP_THRESHOLD)
+ evas_object_smart_callback_call(data, "sweep,left,right", NULL);
+ else if (wd->down_point.x - ev->canvas.x > SWEEP_THRESHOLD)
+ evas_object_smart_callback_call(data, "sweep,right,left", NULL);
+
+ wd->down = EINA_FALSE;
+ wd->down_point.x = 0;
+ wd->down_point.y = 0;
+#endif
+ }
+ else if (!wd->sweep)
+ evas_object_smart_callback_call(data, SIG_CLICKED, NULL);
}
- /**
- * Add a new bubble to the parent
- *
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
- *
- * This function adds a text bubble to the given parent evas object.
- *
- * @ingroup Bubble
- */
EAPI Evas_Object *
elm_bubble_add(Evas_Object *parent)
{
evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
evas_object_event_callback_add(wd->bbl, EVAS_CALLBACK_MOUSE_UP,
_mouse_up, obj);
+#ifdef SWEEP_SUPPORT
+ evas_object_event_callback_add(wd->bbl, EVAS_CALLBACK_MOUSE_DOWN,
+ _mouse_down, obj);
+
+ wd->down = EINA_FALSE;
+ wd->down_point.x = 0;
+ wd->down_point.y = 0;
+#endif
+
evas_object_smart_callbacks_descriptions_set(obj, _signals);
_mirrored_set(obj, elm_widget_mirrored_get(obj));
_elm_theme_object_set(obj, wd->bbl, "bubble", wd->corner,
return icon;
}
- /**
- * Set the sweep layout
- *
- * @param obj The bubble object
- * @param content The given content of the bubble
- *
- * This function sets the sweep layout when "sweep,left,right"signal is emitted.
- *
- * @ingroup Bubble
- */
EAPI void
- /**
- * Unset and hide the sweep layout
- *
- * @param obj The bubble object
- * @param content The given content of the bubble
- *
- * This function sets the sweep layout when "sweep,right,left"signal is emitted.
- *
- * @ingroup Bubble
- */
+elm_bubble_sweep_layout_set(Evas_Object *obj, Evas_Object *sweep)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+#ifdef SWEEP_SUPPORT
+ if (wd->sweep == sweep) return;
+ if (wd->sweep) evas_object_del(wd->sweep);
+ wd->sweep = sweep;
+ if (sweep)
+ edje_object_part_swallow(wd->bbl, "elm.swallow.sweep", sweep);
+#endif
+}
+
- /**
- * Set the corner of the bubble
- *
- * @param obj The bubble object.
- * @param corner The given corner for the bubble.
- *
- * This function sets the corner of the bubble.
- * The corner will be used to find the group in the theme
- * For example, if you set the corner to "bottom_right",
- * the following group will be searched:
- * "elm/bubble/bottom_right/default",
- * considering default style.
- *
- * @ingroup Bubble
- */
+EAPI Evas_Object *
+elm_bubble_sweep_layout_unset(Evas_Object *obj)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Object *sweep = NULL;
+ if (!wd) return NULL;
+#ifdef SWEEP_SUPPORT
+ if (!wd->sweep) return NULL;
+ sweep = wd->sweep;
+ edje_object_part_unswallow(wd->bbl, sweep);
+ evas_object_hide(sweep);
+ wd->sweep = NULL;
+#endif
+ return sweep;
+}
+
+EAPI void
elm_bubble_corner_set(Evas_Object *obj, const char *corner)
{
ELM_CHECK_WIDTYPE(obj, widtype);
#include <Elementary.h>
#include "elm_priv.h"
- * @defgroup Button Button
+/**
- *
- * This is a push-button. Press it and run some function. It can contain
- * a simple label and icon object.
- *
- * Signals that you can add callbacks for are:
- *
- * "clicked" - the user clicked the button
- * "repeated" - the user pressed the button without releasing it
- * "pressed" - when the button is pressed
- * "unpressed" - when the button is unpressed (released)
+ * @ingroup Elementary
+ */
+
typedef struct _Widget_Data Widget_Data;
+enum
+{
+ DEFAULT = 0,
+ HIGHLIGHTED,
+ FOCUSED,
+ DISABLED,
+};
+
struct _Widget_Data
{
Evas_Object *btn, *icon;
if (!wd) return;
if (elm_widget_focus_get(obj))
{
- edje_object_signal_emit(wd->btn, "elm,action,focus", "elm");
- evas_object_focus_set(wd->btn, EINA_TRUE);
+ if (wd->statelabel[FOCUSED])
+ {
+ _set_label(obj, wd->statelabel[FOCUSED]);
+ }
- edje_object_signal_emit(wd->btn, "elm,action,focus", "elm");
- evas_object_focus_set(wd->btn, EINA_TRUE);
++ edje_object_signal_emit(wd->btn, "elm,action,focus", "elm");
++ evas_object_focus_set(wd->btn, EINA_TRUE);
}
else
{
- edje_object_signal_emit(wd->btn, "elm,action,unfocus", "elm");
- evas_object_focus_set(wd->btn, EINA_FALSE);
+ if (wd->statelabel[DEFAULT])
+ _set_label(obj, wd->statelabel[DEFAULT]);
- #if 0
- else
- _set_label(obj, wd->label);
- #endif
- edje_object_signal_emit(wd->btn, "elm,action,unfocus", "elm");
- evas_object_focus_set(wd->btn, EINA_FALSE);
++ edje_object_signal_emit(wd->btn, "elm,action,unfocus", "elm");
++ evas_object_focus_set(wd->btn, EINA_FALSE);
}
}
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (elm_widget_disabled_get(obj))
- edje_object_signal_emit(wd->btn, "elm,state,disabled", "elm");
+ {
+ if (wd->statelabel[DISABLED] )
+ {
+ _set_label(obj, wd->statelabel[DISABLED]);
+ }
+ edje_object_signal_emit(wd->btn, "elm,state,disabled", "elm");
+ }
else
- edje_object_signal_emit(wd->btn, "elm,state,enabled", "elm");
+ {
+ if (wd->statelabel[DEFAULT])
+ _set_label(obj, wd->statelabel[DEFAULT]);
- #if 0
- else
- _set_label(obj, wd->label);
- #endif
+ edje_object_signal_emit(wd->btn, "elm,state,enabled", "elm");
+ }
}
static void
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
edje_object_size_min_restricted_calc(wd->btn, &minw, &minh, minw, minh);
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
- //Commenting to sync with open source and able to resize based on text change
+ evas_object_size_hint_min_get(obj, &w, &h);
- //if (w > minw) minw = w;
+ if (h > minh) minh = h;
+
evas_object_size_hint_min_set(obj, minw, minh);
}
{
Widget_Data *wd = elm_widget_data_get(data);
if (!wd) return;
- #if 0
- else
- _set_label(data, wd->label);
- #endif
+ if (wd->statelabel[DEFAULT])
+ _set_label(data, wd->statelabel[DEFAULT]);
if (wd->timer)
{
}
static void
- #if 0
+_signal_default_text_set(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+ Widget_Data *wd = elm_widget_data_get(data);
+ if (!wd) return;
+ if (wd->statelabel[DEFAULT])
+ _set_label(data, wd->statelabel[DEFAULT]);
++}
++
+ _elm_button_label_set(Evas_Object *obj, const char *item, const char *label)
+ {
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (item) return;
+ if (!wd) return;
+ eina_stringshare_replace(&wd->label, label);
+ if (label)
+ edje_object_signal_emit(wd->btn, "elm,state,text,visible", "elm");
else
- _set_label(data, wd->label);
- #endif
+ edje_object_signal_emit(wd->btn, "elm,state,text,hidden", "elm");
+ edje_object_message_signal_process(wd->btn);
+ edje_object_part_text_set(wd->btn, "elm.text", label);
+ _sizing_eval(obj);
}
- /**
- * Add a new button to the parent
- * @param[in] parent The parent object
- * @return The new object or NULL if it cannot be created
- *
- * @ingroup Button
- */
+
+ static const char *
+ _elm_button_label_get(const Evas_Object *obj, const char *item)
+ {
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (item) return NULL;
+ if (!wd) return NULL;
+ return wd->label;
+ }
+
EAPI Evas_Object *
elm_button_add(Evas_Object *parent)
{
return obj;
}
- /**
- * Set the label used in the button
- *
- * @param[in] obj The button object
- * @param[in] label The text will be written on the button
- *
- * @ingroup Button
- */
- EAPI void
- elm_button_label_set(Evas_Object *obj, const char *label)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- eina_stringshare_replace(&wd->label, label);
- if (label)
- edje_object_signal_emit(wd->btn, "elm,state,text,visible", "elm");
- else
- edje_object_signal_emit(wd->btn, "elm,state,text,hidden", "elm");
- edje_object_message_signal_process(wd->btn);
- edje_object_part_text_set(wd->btn, "elm.text", label);
- _sizing_eval(obj);
- }
-
+static void
+_set_label(Evas_Object *obj, const char *label)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+
+ edje_object_part_text_set(wd->btn, "elm.text", label);
+ _sizing_eval(obj);
+}
- /**
- * Set the label for each state of button
- *
- * @param[in] obj The button object
- * @param[in] label The text will be written on the button
- * @param[in] state The state of button
- *
- * @ingroup Button
- */
++
+EAPI void
+elm_button_label_set_for_state(Evas_Object *obj, const char *label, UIControlState state)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+
+ if (!wd) return;
+ if (label == NULL) return;
+
+ if (state == UIControlStateDefault)
+ {
+ wd->statetype[DEFAULT] = UIControlStateDefault;
+ eina_stringshare_replace(&wd->statelabel[DEFAULT], label);
+ return;
+ }
+ if (state == UIControlStateHighlighted)
+ {
+ wd->statetype[HIGHLIGHTED] = UIControlStateHighlighted;
+ eina_stringshare_replace(&wd->statelabel[HIGHLIGHTED], label);
+ return;
+ }
+ if (state == UIControlStateFocused)
+ {
+ wd->statetype[FOCUSED] = UIControlStateFocused;
+ eina_stringshare_replace(&wd->statelabel[FOCUSED], label);
+ return;
+ }
+ if (state == UIControlStateDisabled)
+ {
+ wd->statetype[DISABLED] = UIControlStateDisabled;
+ eina_stringshare_replace(&wd->statelabel[DISABLED], label);
+ return;
+ }
+}
+
- /**
- * Get the label of button
- *
- * @param[in] obj The button object
- * @return The title of button
- *
- * @ingroup Button
- */
- EAPI const char *
- elm_button_label_get(const Evas_Object *obj)
- {
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return NULL;
- return wd->label;
- }
- /**
- * Get the label of button for each state
- *
- * @param[in] obj The button object
- * @param[in] state The state of button
- * @return The title of button for state
- *
- * @ingroup Button
- */
+EAPI const char*
+elm_button_label_get_for_state(const Evas_Object *obj, UIControlState state)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return NULL;
+
+ if (state == UIControlStateDefault)
+ return wd->statelabel[DEFAULT];
+ else if (state == UIControlStateHighlighted)
+ return wd->statelabel[HIGHLIGHTED];
+ else if (state == UIControlStateFocused)
+ return wd->statelabel[FOCUSED];
+ else if (state == UIControlStateDisabled)
+ return wd->statelabel[DISABLED];
+ else
+ return NULL;
+}
+
- /**
- * Set the icon used for the button
- *
- * Once the icon object is set, a previously set one will be deleted
- * If you want to keep that old content object, use the
- * elm_button_icon_unset() function.
- *
- * @param[in] obj The button object
- * @param[in] icon The icon object for the button
- *
- * @ingroup Button
- */
+ EAPI void
+ elm_button_label_set(Evas_Object *obj, const char *label)
+ {
+ _elm_button_label_set(obj, NULL, label);
+ }
+
+ EAPI const char *
+ elm_button_label_get(const Evas_Object *obj)
+ {
+ return _elm_button_label_get(obj, NULL);
+ }
+
EAPI void
elm_button_icon_set(Evas_Object *obj, Evas_Object *icon)
{
static char *remove_tags(const char *p, int *len);
static char *mark_up(const char *start, int inlen, int *lenp);
-
+static Evas_Object *image_provider(void *images, Evas_Object *entry, const char *item);
+static void entry_deleted(void *images, Evas *e, Evas_Object *entry, void *unused);
+
static Eina_Bool targets_converter(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *ttype, int *typesize);
static Eina_Bool text_converter(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *ttype, int *typesize);
static Eina_Bool html_converter(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *ttype, int *typesize);
},
[CNP_ATOM_XELM] = {
"application/x-elementary-markup",
- ELM_SEL_FORMAT_TEXT | ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_HTML,
+ ELM_SEL_FORMAT_MARKUP,
edje_converter,
NULL,
- NULL,
+ notify_handler_edje,
0
},
[CNP_ATOM_text_uri] = {
/* Stringshared, so I can just compare pointers later */
static const char *text_uri;
-
+/* For convert EFL to HTML */
+
+#define TAGPOS_START 0x00000001
+#define TAGPOS_END 0x00000002
+#define TAGPOS_ALONE 0x00000003
+
+/* TEXTBLOCK tag using stack but close tag word has no mean maybe bug...
+ * TEXTBLOCK <b>bold<font>font</b>bold</font>
+ * HTML <b>bold<font>font bold</b>font</font> */
+
+typedef struct _TagTable {
+ char *src;
+ char *dst;
+ char tagType;
+}TagTable;
+
+TagTable _EFLtoHTMLConvertTable[] = {
+ {"font", "font", 0},
+ {"underline", "del", 0},
+ {"strikethrough", "ins", 0},
+ {"br", "br", 1},
+ {"b", "b", 1},
+ {"item", "img", 1}
+};
+
+TagTable _HTMLtoEFLConvertTable[] = {
+ {"font", "", 0},
+ {"del", "underline", 0},
+ {"u", "underline", 0},
+ {"ins", "strikethrough", 0},
+ {"s", "strikethrough", 0},
+ {"br", "br", 1},
+ {"b", "b", 1},
+ {"strong", "b", 1},
+ {"img", "item", 1}
+};
+
+
+typedef struct _TagNode TagNode, *PTagNode;
+struct _TagNode {
+ char *tag; //EINA_STRINGSHARE if NULL just str
+ char *tag_str;
+ char *str;
+ char *pos_in_ori_str;
+ PTagNode matchTag;
+ void *tagData;
+ unsigned char tagPosType;
+};
+
+typedef struct _FontTagData FontTagData, *PFontTagData;
+struct _FontTagData {
+ char *name;
+ char *color;
+ char *size;
+ char *bg_color;
+};
+
+
+typedef struct _ItemTagData ItemTagData, *PItemTagData;
+struct _ItemTagData {
+ char *href;
+ char *width;
+ char *height;
+};
+
+#define SAFEFREE(ptr) \
+ do\
+{\
+ if (ptr)\
+ free(ptr);\
+ ptr = NULL;\
+} while(0);\
+
+#define freeAndAssign(dst, value) \
+ do\
+{\
+ if (value)\
+ {\
+ SAFEFREE(dst);\
+ dst = value;\
+ }\
+} while(0);
+
+
+static PTagNode _new_tag_node(char *tag, char *tag_str, char* str, char *pos_in_ori_str);
+static PTagNode _get_start_node(char *str);
+static PTagNode _get_next_node(PTagNode prev);
+static void _delete_node(PTagNode node);
+static void _link_match_tags(Eina_List *nodes);
+static char *_get_tag_value(const char *tag_str, const char *tag_name);
+static char *_convert_to_html(Eina_List* nodes);
+static void _set_EFL_tag_data(Eina_List* nodes);
+static char *_convert_to_edje(Eina_List* nodes);
+static void _set_HTML_tag_data(Eina_List* nodes);
+static PFontTagData _set_EFL_font_data(PFontTagData data, const char *tag_str);
+static PItemTagData _set_EFL_item_data(PItemTagData data, const char *tag_str);
+static PFontTagData _set_HTML_font_data(PFontTagData data, const char *tag_str);
+static PItemTagData _set_HTML_img_data(PItemTagData data, const char *tag_str);
+
+#ifdef DEBUGON
+static void _dumpNode(Eina_List* nodes);
+#endif
+
+static PTagNode
+_new_tag_node(char *tag, char *tag_str, char* str, char *pos_in_ori_str)
+{
+ PTagNode newNode = calloc(1, sizeof(TagNode));
++ if (tag)
++ eina_str_tolower(&tag);
+ newNode->tag = tag;
++ if (tag_str)
++ eina_str_tolower(&tag_str);
+ newNode->tag_str = tag_str;
+ newNode->str = str;
+ newNode->pos_in_ori_str = pos_in_ori_str;
+ return newNode;
+}
+
+static PTagNode
+_get_start_node(char *str)
+{
+ char *startStr = NULL;
+ if (!str || str[0] == '\0')
+ return NULL;
+
+ if (str[0] != '<')
+ {
+ char *tagStart = strchr(str, '<');
+ if (!tagStart)
+ startStr = strdup(str);
+ else
+ {
+ int strLength = tagStart - str;
+ startStr = malloc(sizeof(char) * (strLength + 1));
+ strncpy(startStr, str, strLength);
+ startStr[strLength] = '\0';
+ }
+ }
+
+ return _new_tag_node(NULL, NULL, startStr, str);
+}
+
+static PTagNode
+_get_next_node(PTagNode prev)
+{
+ PTagNode retTag = NULL;
+ char *tagStart;
+ char *tagEnd;
+ char *tagNameEnd = NULL;
+ char *nextTagStart;
+
+ if (prev->tag == NULL)
+ tagStart = strchr(prev->pos_in_ori_str, '<');
+ else
+ tagStart = strchr(prev->pos_in_ori_str + 1, '<');
+
+ if (!tagStart)
+ return retTag;
+
+ tagEnd = strchr(tagStart, '>');
+ nextTagStart = strchr(tagStart + 1, '<');
+
+ if (!tagEnd || (nextTagStart && (nextTagStart < tagEnd)))
+ return _get_start_node(tagStart + 1);
+
+ int spCnt = 5;
+ char *spArray[spCnt];
+ spArray[0] = strchr(tagStart, '=');
+ spArray[1] = strchr(tagStart, '_');
+ spArray[2] = strchr(tagStart, ' ');
+ spArray[3] = strchr(tagStart, '\t');
+ spArray[4] = strchr(tagStart, '\n');
+ tagNameEnd = tagEnd;
+
+ int i;
+ for (i = 0; i < spCnt; i++)
+ {
+ if (spArray[i] && spArray[i] < tagNameEnd)
+ tagNameEnd = spArray[i];
+ }
+
+ int tagLength = tagNameEnd - tagStart - 1;
+ char *tagName = NULL;
+ if (!strncmp(&tagStart[1], "color", tagLength))
+ tagName = strndup("font", 4);
+ else if (!strncmp(&tagStart[1], "/color", tagLength))
+ tagName = strndup("/font", 5);
+ else if (!strncmp(&tagStart[1], "/item", tagLength))
+ tagName = strdup("");
+ else
+ tagName = strndup(&tagStart[1], tagLength);
+
+ int tagStrLength = 0;
+ char *tagStr = NULL;
+ if (tagName)
+ {
+ tagStrLength = tagEnd - tagStart + 1;
+ tagStr = strndup(tagStart, tagStrLength);
+ }
+
+ unsigned int strLength = nextTagStart ? (unsigned int)(nextTagStart - tagEnd - 1) : strlen(&tagEnd[1]);
+ char *str = strndup(&tagEnd[1], strLength);
+
+ retTag = _new_tag_node(tagName, tagStr, str, tagStart);
+ return retTag;
+}
+
+
+static void
+_delete_node(PTagNode node)
+{
+ if (node)
+ {
+ SAFEFREE(node->tag_str);
+ SAFEFREE(node->str);
+
+ if (node->tagData)
+ {
+ if (node->tag)
+ {
+ if (!strcmp("font", node->tag))
+ {
+ PFontTagData data = node->tagData;
+ SAFEFREE(data->name);
+ SAFEFREE(data->color);
+ SAFEFREE(data->size);
+ SAFEFREE(data->bg_color);
+ }
+ if (!strcmp("item", node->tag))
+ {
+ PItemTagData data = node->tagData;
+ SAFEFREE(data->href);
+ SAFEFREE(data->width);
+ SAFEFREE(data->height);
+ }
+
+ }
+ SAFEFREE(node->tagData);
+ }
+ SAFEFREE(node->tag);
+ SAFEFREE(node);
+ }
+}
+
+static void
+_link_match_tags(Eina_List *nodes)
+{
+ Eina_List *stack = NULL;
+
+ PTagNode trail, popData;
+ Eina_List *l, *r;
+
+ EINA_LIST_FOREACH(nodes, l, trail)
+ {
+ if (!trail->tag || trail->tag[0] == '\0')
+ continue;
+ if (!strcmp("br", trail->tag))
+ {
+ trail->tagPosType = TAGPOS_ALONE;
+ continue;
+ }
+ else if (!strcmp("item", trail->tag) || !strcmp("img", trail->tag))
+ {
+ trail->tagPosType = TAGPOS_ALONE;
+ continue;
+ }
+
+ if (trail->tag[0] != '/') // PUSH
+ {
+ stack = eina_list_append(stack, trail);
+/* eina_array_push(stack, trail);
+ cnp_debug("stack: %d, tag %s\n", eina_array_count_get(stack), trail->tag);*/
+ cnp_debug("stack: %d, tag %s\n", eina_list_count(stack), trail->tag);
+ }
+ else // POP
+ {
+ if (!eina_list_count(stack))
+ {
+ cnp_debug("tag not matched %s\n", trail->tag);
+ continue;
+ }
+
+ EINA_LIST_REVERSE_FOREACH(stack, r, popData)
+ {
+ if (popData->tag && !strcmp(popData->tag, &trail->tag[1]))
+ {
+ popData->tagPosType = TAGPOS_START;
+ trail->tagPosType = TAGPOS_END;
+ popData->matchTag = trail;
+ trail->matchTag = popData;
+ stack = eina_list_remove_list(stack, r);
+ break;
+ }
+ }
+/* popData = eina_array_pop(stack);
+
+ popData->tagPosType = TAGPOS_START;
+ trail->tagPosType = TAGPOS_END;
+ popData->matchTag = trail;
+ trail->matchTag = popData;
+ cnp_debug("pop stack: %d, tag %s\n", eina_array_count_get(stack), trail->tag);
+ */
+ }
+ }
+
+/* if (eina_array_count_get(stack))
+ cnp_debug("stack state: %d, tag %s\n", eina_array_count_get(stack), trail->tag);*/
+
+ /* Make Dummy close tag */
+/* while ((popData = eina_array_pop(stack))) */
+
+ EINA_LIST_REVERSE_FOREACH(stack, r, popData)
+ {
+ PTagNode newData;
+ int tagLength = strlen(popData->tag);
+ char *tagName = malloc(sizeof(char) * (tagLength + 2));
+
+ tagName[0] = '/';
+ tagName[1] = '\0';
+ strcat(tagName, popData->tag);
+
+ newData = _new_tag_node(tagName, NULL, NULL, NULL);
+ popData->tagPosType = TAGPOS_START;
+ newData->tagPosType = TAGPOS_END;
+ popData->matchTag = newData;
+ newData->matchTag = popData;
+ nodes = eina_list_append(nodes, newData);
+/* cnp_debug("stack: %d, tag %s\n", eina_array_count_get(stack), popData->tag);*/
+ }
+/* cnp_debug("stack_top: %d\n", eina_array_count_get(stack));
+ eina_array_free(stack);*/
+ eina_list_free(stack);
+}
+
+static char *
+_get_tag_value(const char *tag_str, const char *tag_name)
+{
+ if (!tag_name || !tag_str)
+ return NULL;
+
+ char *tag;
+ if ((tag = strstr(tag_str, tag_name)))
+ {
+ if (tag[strlen(tag_name)] == '_')
+ return NULL;
+ char *value = strchr(tag, '=');
+ if (value)
+ {
+ do
+ {
+ value++;
+ } while (!isalnum(*value) && *value != '#');
+
+ int spCnt = 6;
+ char *spArray[spCnt];
+ spArray[0] = strchr(value, ' ');
+ spArray[1] = strchr(value, '>');
+ spArray[2] = strchr(value, '\"');
+ spArray[3] = strchr(value, '\'');
+ spArray[4] = strchr(value, '\t');
+ spArray[5] = strchr(value, '\n');
+ char *valueEnd = strchr(value, '\0');
+
+ int i;
+ for (i = 0; i < spCnt; i++)
+ {
+ if (spArray[i] && spArray[i] < valueEnd)
+ valueEnd = spArray[i];
+ }
+
+ int valueLength = valueEnd - value;
+ return strndup(value, valueLength);
+ }
+ }
+ return NULL;
+}
+
+static PFontTagData
+_set_EFL_font_data(PFontTagData data, const char *tag_str)
+{
+ char *value;
+
+ if (!data)
+ data = calloc(1, sizeof(FontTagData));
+ value = _get_tag_value(tag_str, "font_size");
+ freeAndAssign(data->size, value);
+ value = _get_tag_value(tag_str, "color");
+ freeAndAssign(data->color, value);
+ value = _get_tag_value(tag_str, "bgcolor");
+ freeAndAssign(data->bg_color, value);
+ value = _get_tag_value(tag_str, "font");
+ freeAndAssign(data->name, value);
+
+ return data;
+}
+
+static PItemTagData
+_set_EFL_item_data(PItemTagData data, const char *tag_str)
+{
+ char *value;
+
+ if (!data)
+ data = calloc(1, sizeof(ItemTagData));
+ value = _get_tag_value(tag_str, "href");
+ if (value)
+ {
+ char *path = strstr(value, "file://");
+ if (path)
+ {
+ char *modify = malloc(sizeof(char) * (strlen(value) + 1));
+ strncpy(modify, "file://", 7);
+ modify[7] = '\0';
+ path += 7;
+ while (path[1] && path[0] && path[1] == '/' && path[0] == '/')
+ {
+ path++;
+ }
+ strcat(modify, path);
+ data->href = modify;
+ cnp_debug("image href ---%s---\n", data->href);
+ free(value);
+ }
+ else
+ freeAndAssign(data->href, value);
+ }
+
+ value = _get_tag_value(tag_str, "absize");
+ if (value)
+ {
+ char *xpos = strchr(value, 'x');
+ if (xpos)
+ {
+ int absizeLen = strlen(value);
+ freeAndAssign(data->width, strndup(value, xpos - value));
+ freeAndAssign(data->height, strndup(xpos + 1, absizeLen - (xpos - value) - 1));
+ cnp_debug("image width: -%s-, height: -%s-\n", data->width, data->height);
+ }
+ free(value);
+ }
+ return data;
+}
+
+static void
+_set_EFL_tag_data(Eina_List* nodes)
+{
+ PTagNode trail;
+ Eina_List *l;
+
+ EINA_LIST_FOREACH(nodes, l, trail)
+ {
+ if (!trail->tag)
+ continue;
+ if (!strcmp("font", trail->tag))
+ trail->tagData = _set_EFL_font_data(trail->tagData, trail->tag_str);
+ else if (!strcmp("item", trail->tag))
+ trail->tagData = _set_EFL_item_data(trail->tagData, trail->tag_str);
+ }
+}
+
+static PFontTagData
+_set_HTML_font_data(PFontTagData data, const char *tag_str)
+{
+ char *value;
+
+ if (!data)
+ data = calloc(1, sizeof(FontTagData));
+ value = _get_tag_value(tag_str, "size");
+ freeAndAssign(data->size, value);
+ value = _get_tag_value(tag_str, "color");
+ freeAndAssign(data->color, value);
+ value = _get_tag_value(tag_str, "bgcolor");
+ freeAndAssign(data->bg_color, value);
+ value = _get_tag_value(tag_str, "face");
+ freeAndAssign(data->name, value);
+
+ return data;
+}
+
+static PItemTagData
+_set_HTML_img_data(PItemTagData data, const char *tag_str)
+{
+ char *value;
+
+ if (!data)
+ data = calloc(1, sizeof(ItemTagData));
+ value = _get_tag_value(tag_str, "src");
+ if (value)
+ {
+ char *path = strstr(value, "file://");
+ if (path)
+ {
+ char *modify = malloc(sizeof(char) * (strlen(value) + 1));
+ strncpy(modify, "file://", 7);
+ modify[7] = '\0';
+ path += 7;
+ while (path[1] && path[0] && path[1] == '/' && path[0] == '/')
+ {
+ path++;
+ }
+ strcat(modify, path);
+ data->href = modify;
+ cnp_debug("image src ---%s---\n", data->href);
+ free(value);
+ }
+ else
+ freeAndAssign(data->href, value);
+ }
+
+ value = _get_tag_value(tag_str, "width");
+ freeAndAssign(data->width, value);
+ value = _get_tag_value(tag_str, "height");
+ freeAndAssign(data->height, value);
+ return data;
+}
+
+static void
+_set_HTML_tag_data(Eina_List* nodes)
+{
+ PTagNode trail;
+ Eina_List *l;
+
+ EINA_LIST_FOREACH(nodes, l, trail)
+ {
+ if (!trail->tag)
+ continue;
+ if (!strcmp("font", trail->tag))
+ trail->tagData = _set_HTML_font_data(trail->tagData, trail->tag_str);
+ else if (!strcmp("img", trail->tag))
+ trail->tagData = _set_HTML_img_data(trail->tagData, trail->tag_str);
+ }
+}
+
+#ifdef DEBUGON
+static void
+_dumpNode(Eina_List* nodes)
+{
+ PTagNode trail;
+ Eina_List *l;
+
+ EINA_LIST_FOREACH(nodes, l, trail)
+ {
+ cnp_debug("tag: %s, tag_str: %s, str: %s, tagPosType: %d\n",
+ trail->tag, trail->tag_str, trail->str, trail->tagPosType);
+ cnp_debug("matchTag: %x ", (unsigned int)trail->matchTag);
+ if (trail->matchTag)
+ cnp_debug("matchTag->tag_str: %s", trail->matchTag->tag_str);
+ if (trail->tagData)
+ {
+ if (!strcmp(trail->tag, "font"))
+ {
+ PFontTagData data = trail->tagData;
+ cnp_debug(" tagData->name: %s, tagData->color: %s, tagData->size: %s, tagData->bg_color: %s",
+ data->name, data->color, data->size, data->bg_color);
+ }
+ else if (!strcmp(trail->tag, "item") || !strcmp(trail->tag, "img"))
+ {
+ PItemTagData data = trail->tagData;
+ cnp_debug(" tagData->href: %s, tagData->width: %s, tagData->height: %s",
+ data->href, data->width, data->height);
+ }
+ else
+ cnp_debug("\nERROR!!!! not need tagData");
+ }
+ cnp_debug("\n");
+ }
+}
+#endif
+
+static char *
+_convert_to_html(Eina_List* nodes)
+{
+ PTagNode trail;
+ Eina_List *l;
+
+ Eina_Strbuf *html = eina_strbuf_new();
+
+ int tableCnt = sizeof(_EFLtoHTMLConvertTable) / sizeof(TagTable);
+
+ EINA_LIST_FOREACH(nodes, l, trail)
+ {
+ if (trail->tag)
+ {
+ char *tagName = trail->tagPosType == TAGPOS_END ?
+ trail->matchTag->tag : trail->tag;
+ int j;
+ for(j = 0; j < tableCnt; j++)
+ {
+ if (!strcmp(_EFLtoHTMLConvertTable[j].src, tagName))
+ {
+ switch(trail->tagPosType)
+ {
+ case TAGPOS_END:
+ eina_strbuf_append(html, "</");
+ break;
+ default:
+ eina_strbuf_append(html, "<");
+ break;
+ }
+
+ eina_strbuf_append(html, _EFLtoHTMLConvertTable[j].dst);
+ if (trail->tagPosType != TAGPOS_END)
+ {
+ if (!strcmp(_EFLtoHTMLConvertTable[j].src, "font"))
+ {
+ PFontTagData data = trail->tagData;
+ if (data->name)
+ {
+ }
+ if (data->color)
+ eina_strbuf_append_printf(html, " color=\"%s\"", data->color);
+ if (data->size)
+ eina_strbuf_append_printf(html, " size=\"%s\"", data->size);
+ if (data->bg_color)
+ {
+ }
+ }
+ else if (!strcmp(_EFLtoHTMLConvertTable[j].src, "item"))
+ {
+ PItemTagData data = trail->tagData;
+ if (data->href)
+ eina_strbuf_append_printf(html, " src=\"%s\"", data->href);
+ if (data->width)
+ eina_strbuf_append_printf(html, " width=\"%s\"", data->width);
+ if (data->height)
+ eina_strbuf_append_printf(html, " height=\"%s\"", data->height);
+ }
+ }
+ switch(trail->tagPosType)
+ {
+ case TAGPOS_ALONE:
+ eina_strbuf_append(html, " />");
+ break;
+ default:
+ eina_strbuf_append(html, ">");
+ break;
+ }
+ break;
+ }
+ }
+ }
+ if (trail->str)
+ eina_strbuf_append(html, trail->str);
+ }
+
+ char *ret = eina_strbuf_string_steal(html);
+ eina_strbuf_free(html);
+ return ret;
+}
+
+#define IMAGE_DEFAULT_WIDTH "240"
+#define IMAGE_DEFAULT_HEIGHT "180"
+
+
+static char *
+_convert_to_edje(Eina_List* nodes)
+{
+ PTagNode trail;
+ Eina_List *l;
+
+ Eina_Strbuf *html = eina_strbuf_new();
+
+ int tableCnt = sizeof(_HTMLtoEFLConvertTable) / sizeof(TagTable);
+
+ EINA_LIST_FOREACH(nodes, l, trail)
+ {
+ if (trail->tag)
+ {
+ char *tagName = trail->tagPosType == TAGPOS_END ?
+ trail->matchTag->tag : trail->tag;
+ int j;
+ for(j = 0; j < tableCnt; j++)
+ {
+ if (!strcmp(_HTMLtoEFLConvertTable[j].src, tagName))
+ {
+ if (_HTMLtoEFLConvertTable[j].dst[0] != '\0')
+ {
+ switch(trail->tagPosType)
+ {
+ case TAGPOS_END:
+ eina_strbuf_append(html, "</");
+ break;
+ default:
+ eina_strbuf_append(html, "<");
+ break;
+ }
+
+ eina_strbuf_append(html, _HTMLtoEFLConvertTable[j].dst);
+ }
+ if (trail->tagPosType != TAGPOS_END)
+ {
+ if (!strcmp(_HTMLtoEFLConvertTable[j].src, "font"))
+ {
+ PFontTagData data = trail->tagData;
+ if (data->name)
+ {
+ }
+ if (data->color)
+ eina_strbuf_append_printf(html, "<color=%s>", data->color);
+ if (data->size)
+ eina_strbuf_append_printf(html, "<font_size=%s>", data->size);
+ if (data->bg_color)
+ {
+ }
+ break;
+ }
+ else if (!strcmp(_HTMLtoEFLConvertTable[j].src, "img"))
+ {
+ PItemTagData data = trail->tagData;
+ char *width = IMAGE_DEFAULT_WIDTH, *height = IMAGE_DEFAULT_HEIGHT;
+ if (data->width)
+ width = data->width;
+ if (data->height)
+ height = data->height;
+ eina_strbuf_append_printf(html, " absize=%sx%s", width, height);
+ if (data->href)
+ eina_strbuf_append_printf(html, " href=%s></item>", data->href);
+ break;
+ }
+ }
+ else
+ {
+ if (_HTMLtoEFLConvertTable[j].dst[0] == '\0')
+ {
+ if (!strcmp(_HTMLtoEFLConvertTable[j].src, "font"))
+ {
+ if (trail->matchTag->tagData)
+ {
+ PFontTagData data = trail->matchTag->tagData;
+ if (data->name)
+ {
+ }
+ if (data->color)
+ eina_strbuf_append_printf(html, "</color>");
+ if (data->size)
+ eina_strbuf_append_printf(html, "</font>");
+ if (data->bg_color)
+ {
+ }
+ break;
+ }
+ }
+ }
+ }
+ switch(trail->tagPosType)
+ {
++ /* not support in efl
+ case TAGPOS_ALONE:
+ eina_strbuf_append(html, " />");
+ break;
++ */
+ default:
+ eina_strbuf_append(html, ">");
+ break;
+ }
+ break;
+ }
+ }/* for(j = 0; j < tableCnt; j++) end */
+ }
+ if (trail->str)
+ eina_strbuf_append(html, trail->str);
+ }
+
+ char *ret = eina_strbuf_string_steal(html);
+ eina_strbuf_free(html);
+ return ret;
+
+}
++
Eina_Bool
elm_selection_set(Elm_Sel_Type selection, Evas_Object *widget, Elm_Sel_Format format, const char *selbuf)
{
if (sel->datacb)
{
Elm_Selection_Data ddata;
-
+
+ str = mark_up((char *)data->data, data->length, NULL);
ddata.x = ddata.y = 0;
ddata.format = ELM_SEL_FORMAT_TEXT;
- ddata.data = data->data;
+ ddata.data = str;
ddata.len = data->length;
sel->datacb(sel->udata, sel->widget, &ddata);
+ free(str);
return 0;
}
-
+
cnp_debug("Notify handler text %d %d %p\n", data->format,data->length, data->data);
str = mark_up((char *)data->data, data->length, NULL);
cnp_debug("String is %s (from %s)\n", str, data->data);
return 0;
}
cnp_debug("Got %s\n",p);
-
+ if (sel->datacb)
+ {
+ Elm_Selection_Data ddata;
++
+ ddata.x = ddata.y = 0;
+ ddata.format = ELM_SEL_FORMAT_MARKUP;
+ ddata.data = p;
+ ddata.len = data->length;
+ sel->datacb(sel->udata, sel->widget, &ddata);
+ return 0;
+ }
if (strncmp(p, "file://", 7))
{
/* Try and continue if it looks sane */
return 0;
}
+static int
+notify_handler_edje(Cnp_Selection *sel, Ecore_X_Event_Selection_Notify *notify)
+{
+ Ecore_X_Selection_Data *data;
+
+ data = notify->data;
+
+ char *stripstr = NULL;
+ stripstr = malloc(sizeof(char) * (data->length + 1));
+ strncpy(stripstr, (char *)data->data, data->length);
+ stripstr[data->length] = '\0';
+
+ if (sel->datacb)
+ {
+ Elm_Selection_Data ddata;
+ ddata.x = ddata.y = 0;
+ ddata.format = ELM_SEL_FORMAT_MARKUP;
+ ddata.data = stripstr;
+ ddata.len = data->length;
+ sel->datacb(sel->udata, sel->widget, &ddata);
+ }
+ else
+ elm_entry_entry_insert(sel->requestwidget, stripstr);
+
+ cnp_debug("String is %s (%d bytes)\n", stripstr, data->length);
+ free(stripstr);
+ return 0;
+}
+
/**
* Warning: Generic text/html can';t handle it sanely.
* Firefox sends ucs2 (i think).
/* Request it, so we know what it is */
cnp_debug("Sending uri request\n");
savedtypes.textreq = 1;
- if (savedtypes.imgfile) free((void*)savedtypes.imgfile);
- savedtypes.imgfile = NULL;
++ if (savedtypes.pi) pasteimage_free(savedtypes.pi);
+ savedtypes.pi = NULL; /* FIXME: Free? */
ecore_x_selection_xdnd_request(enter->win, text_uri);
}
}
cnp_debug("Insert %s\n", (char *)ddata.data);
dropable->dropcb(dropable->cbdata, dropable->obj, &ddata);
ecore_x_dnd_send_finished();
- if (savedtypes.imgfile) free((void*)savedtypes.imgfile);
- savedtypes.imgfile = NULL;
-
++
++ if (savedtypes.pi) pasteimage_free(savedtypes.pi);
++ savedtypes.pi = NULL;
return EINA_TRUE;
}
else if (dropable->types & ELM_SEL_FORMAT_IMAGE)
{
- cnp_debug("Doing image insert (%s)\n", savedtypes.imgfile);
+ cnp_debug("Doing image insert (%s)\n", savedtypes.pi->file);
ddata.format = ELM_SEL_FORMAT_IMAGE;
- ddata.data = (char *)savedtypes.imgfile;
+ ddata.data = (char *)savedtypes.pi->file;
dropable->dropcb(dropable->cbdata, dropable->obj, &ddata);
ecore_x_dnd_send_finished();
- if (savedtypes.imgfile) free((void*)savedtypes.imgfile);
- savedtypes.imgfile = NULL;
+
- pasteimage_free(savedtypes.pi);
++ if (savedtypes.pi) pasteimage_free(savedtypes.pi);
+ savedtypes.pi = NULL;
return EINA_TRUE;
}
#define ATOM_E_THUMBSCROLL_PAGE_SCROLL_FRICTION 18
#define ATOM_E_THUMBSCROLL_BRING_IN_SCROLL_FRICTION 19
#define ATOM_E_THUMBSCROLL_ZOOM_FRICTION 20
- #define ATOM_E_INPUT_PANEL 21
- #define ATOM_E_AUTOCAPITAL_ALLOW 22
- #define ATOM_E_AUTOPERIOD_ALLOW 23
- #define ATOM_E_CONFIG 24
+ #define ATOM_E_CONFIG 21
++#define ATOM_E_INPUT_PANEL 22
++#define ATOM_E_AUTOCAPITAL_ALLOW 23
++#define ATOM_E_AUTOPERIOD_ALLOW 24
static Eina_Bool _prop_config_get(void);
static Eina_Bool _prop_change(void *data __UNUSED__,
event->atom,
&val, 1) > 0)
{
- if (val > 0)
- _elm_config->zoom_friction = (double)val / 1000.0;
+ _elm_config->zoom_friction = (double)val / 1000.0;
+ }
+ }
+ else if (event->atom == _atom[ATOM_E_INPUT_PANEL])
+ {
+ unsigned int val = 0;
+
+ if (ecore_x_window_prop_card32_get(event->win,
+ event->atom,
+ &val, 1) > 0)
+ {
+ int input_panel_enable;
+
+ input_panel_enable = _elm_config->input_panel_enable;
+ _elm_config->input_panel_enable = val;
- if (input_panel_enable != _elm_config->input_panel_enable)
++ if (input_panel_enable != _elm_config->input_panel_enable)
+ {
+ edje_input_panel_enabled_set(_elm_config->input_panel_enable);
+ }
+ }
+ }
+ else if (event->atom == _atom[ATOM_E_AUTOCAPITAL_ALLOW])
+ {
+ unsigned int val = 0;
+
+ if (ecore_x_window_prop_card32_get(event->win,
+ event->atom,
+ &val, 1) > 0)
+ {
+ int autocapital_allow;
+
+ autocapital_allow = _elm_config->autocapital_allow;
+ _elm_config->autocapital_allow = val;
- if (autocapital_allow != _elm_config->autocapital_allow)
++ if (autocapital_allow != _elm_config->autocapital_allow)
+ {
+ edje_autocapitalization_allow_set(_elm_config->autocapital_allow);
+ }
+ }
- }
++ }
+ else if (event->atom == _atom[ATOM_E_AUTOPERIOD_ALLOW])
+ {
+ unsigned int val = 0;
+
+ if (ecore_x_window_prop_card32_get(event->win,
+ event->atom,
+ &val, 1) > 0)
+ {
+ int autoperiod_allow;
+
+ autoperiod_allow = _elm_config->autoperiod_allow;
+ _elm_config->autoperiod_allow = val;
- if (autoperiod_allow != _elm_config->autoperiod_allow)
++ if (autoperiod_allow != _elm_config->autoperiod_allow)
+ {
+ edje_autoperiod_allow_set(_elm_config->autoperiod_allow);
+ }
}
}
else if (((_atom_config > 0) && (event->atom == _atom_config)) ||
ELM_CONFIG_VAL(D, T, bring_in_scroll_friction, T_DOUBLE);
ELM_CONFIG_VAL(D, T, zoom_friction, T_DOUBLE);
ELM_CONFIG_VAL(D, T, thumbscroll_bounce_enable, T_UCHAR);
+ ELM_CONFIG_VAL(D, T, scroll_smooth_time_interval, T_DOUBLE);
+ ELM_CONFIG_VAL(D, T, scroll_smooth_amount, T_DOUBLE);
+ ELM_CONFIG_VAL(D, T, scroll_smooth_history_weight, T_DOUBLE);
+ ELM_CONFIG_VAL(D, T, scroll_smooth_future_time, T_DOUBLE);
+ ELM_CONFIG_VAL(D, T, scroll_smooth_time_window, T_DOUBLE);
ELM_CONFIG_VAL(D, T, scale, T_DOUBLE);
ELM_CONFIG_VAL(D, T, bgpixmap, T_INT);
ELM_CONFIG_VAL(D, T, compositing, T_INT);
ELM_CONFIG_VAL(D, T, longpress_timeout, T_DOUBLE);
ELM_CONFIG_VAL(D, T, effect_enable, T_UCHAR);
ELM_CONFIG_VAL(D, T, desktop_entry, T_UCHAR);
- ELM_CONFIG_VAL(D, T, password_show_last_character, T_UCHAR);
+ ELM_CONFIG_VAL(D, T, input_panel_enable, T_INT);
+ ELM_CONFIG_VAL(D, T, password_show_last, T_UCHAR);
+ ELM_CONFIG_VAL(D, T, password_show_last_timeout, T_DOUBLE);
#undef T
#undef D
#undef T_INT
{
edje_frametime_set(1.0 / _elm_config->fps);
edje_scale_set(_elm_config->scale);
- if (_elm_config->modules) _elm_module_parse(_elm_config->modules);
+ edje_input_panel_enabled_set(_elm_config->input_panel_enable);
+ edje_autocapitalization_allow_set(_elm_config->autocapital_allow);
+ edje_autoperiod_allow_set(_elm_config->autoperiod_allow);
+ edje_password_show_last_set(_elm_config->password_show_last);
+ edje_password_show_last_timeout_set(_elm_config->password_show_last_timeout);
+ if (_elm_config->modules) _elm_module_parse(_elm_config->modules);
}
static Eina_Bool
_elm_config->bring_in_scroll_friction = 0.5;
_elm_config->zoom_friction = 0.5;
_elm_config->thumbscroll_border_friction = 0.5;
+ _elm_config->scroll_smooth_time_interval = 0.008;
+ _elm_config->scroll_smooth_amount = 1.0;
+ _elm_config->scroll_smooth_history_weight = 0.3;
+ _elm_config->scroll_smooth_future_time = 0.0;
+ _elm_config->scroll_smooth_time_window = 0.2;
_elm_config->scale = 1.0;
_elm_config->bgpixmap = 0;
_elm_config->compositing = 1;
_elm_config->thumbscroll_border_friction = friction;
}
-
+ s = getenv("ELM_SCROLL_SMOOTH_TIME_INTERVAL");
+ if (s) _elm_config->scroll_smooth_time_interval = atof(s);
+ s = getenv("ELM_SCROLL_SMOOTH_AMOUNT");
+ if (s) _elm_config->scroll_smooth_amount = atof(s);
+ s = getenv("ELM_SCROLL_SMOOTH_HISTORY_WEIGHT");
+ if (s) _elm_config->scroll_smooth_history_weight = atof(s);
+ s = getenv("ELM_SCROLL_SMOOTH_FUTURE_TIME");
+ if (s) _elm_config->scroll_smooth_future_time = atof(s);
+ s = getenv("ELM_SCROLL_SMOOTH_TIME_WINDOW");
+ if (s) _elm_config->scroll_smooth_time_window = atof(s);
s = getenv("ELM_THEME");
if (s) eina_stringshare_replace(&_elm_config->theme, s);
_desc_init();
_profile_fetch_from_conf();
_config_load();
- _env_get();
- _config_apply();
- _elm_config_font_overlay_apply();
- _elm_recache();
++// NOTE: Do not merge upstream code. Just leave it.
+// _env_get();
+// _config_apply();
+// _elm_config_font_overlay_apply();
+// _elm_recache();
}
void
_elm_config_sub_init(void)
{
++ // NOTE: Do not merge upstream code. Just leave it.
+ _env_get();
+ _config_apply();
+ _elm_config_font_overlay_apply();
+ _elm_recache();
+
#define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
#include <Elementary.h>
#include "elm_priv.h"
+ #ifndef MIN
+ # define MIN(a,b) ((a) < (b)) ? (a) : (b)
+ #endif
+
+ #ifndef MAX
+ # define MAX(a,b) ((a) < (b)) ? (b) : (a)
+ #endif
+
/**
* @defgroup Conformant Conformant
++ * @ingroup Elementary
*
- * The aim is to provide a widget that can be used in elementary apps to
- * account for space taken up by the indicator, virtual keypad & softkey windows when running
+ * The aim is to provide a widget that can be used in elementary apps to
+ * account for space taken up by the indicator, virtual keypad & softkey windows when running
* the illume2 module of E17.
*/
static void
_conformant_part_sizing_eval(Evas_Object *obj, Conformant_Part_Type part_type)
{
- #ifdef HAVE_ELEMENTARY_X
Ecore_X_Window zone, xwin;
++ Evas_Object *top;
int sx = -1, sy = -1, sw = -1, sh = -1;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- xwin = elm_win_xwindow_get(obj);
- Evas_Object *top = elm_widget_top_get(obj);
++ top = elm_widget_top_get(obj);
+ xwin = elm_win_xwindow_get(top);
++
zone = ecore_x_e_illume_zone_get(xwin);
if (part_type & ELM_CONFORM_INDICATOR_PART)
evas_object_size_hint_min_set(wd->shelf, -1, 0);
evas_object_size_hint_max_set(wd->shelf, -1, 0);
}
+ #ifdef HAVE_ELEMENTARY_X
else
_conformant_part_sizing_eval(obj, ELM_CONFORM_INDICATOR_PART);
+ #endif
+
evas_object_color_set(wd->shelf, 0, 0, 0, 0);
edje_object_part_swallow(wd->base, "elm.swallow.shelf", wd->shelf);
evas_object_size_hint_min_set(wd->panel, -1, 0);
evas_object_size_hint_max_set(wd->panel, -1, 0);
}
+ #ifdef HAVE_ELEMENTARY_X
else
_conformant_part_sizing_eval(obj, ELM_CONFORM_SOFTKEY_PART);
+ #endif
+
evas_object_color_set(wd->panel, 0, 0, 0, 0);
edje_object_part_swallow(wd->base, "elm.swallow.panel", wd->panel);
}
focus_obj = elm_widget_focused_object_get(conformant);
if (focus_obj)
- {
- Evas_Coord x, y, w, h;
+ {
+ Evas_Coord x, y, w, h;
- elm_widget_show_region_get(focus_obj, &x, &y, &w, &h);
+ elm_widget_show_region_get(focus_obj, &x, &y, &w, &h);
- if (h < _elm_config->finger_size)
- h = _elm_config->finger_size;
+ if (h < _elm_config->finger_size)
+ h = _elm_config->finger_size;
- elm_widget_show_region_set(focus_obj, x, y, w, h, EINA_TRUE);
- }
- elm_widget_show_region_set(focus_obj, x, y, w, h);
++ elm_widget_show_region_set(focus_obj, x, y, w, h, EINA_TRUE);
+ }
}
+ #ifdef HAVE_ELEMENTARY_X
static void
_update_autoscroll_objs(void *data)
{
*
* @ingroup Conformant
*/
- EAPI Evas_Object*
- elm_conformant_content_area_get(Evas_Object *obj)
++
+ EAPI Evas_Object *
+ elm_conformant_content_area_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return NULL;
/*Finger waggle warning*/
_elm_dangerous_call_check(__FUNCTION__);
- return (Evas_Object*)edje_object_part_object_get(wd->base, "elm.swallow.content");
++
+ return (Evas_Object *)edje_object_part_object_get(wd->base, "elm.swallow.content");
}
struct _Widget_Data
{
- Evas_Object *ent;
+ Evas_Object *ent, *scroller, *end, *icon;
+ Evas_Object *bg;
Evas_Object *hoversel;
+ Evas_Object *hover;
+ Evas_Object *layout;
+ Evas_Object *list;
+ Evas_Object *mgf_proxy;
+ Evas_Object *mgf_clip;
+ Evas_Object *mgf_bg;
+ Evas_Coord mgf_height;
+ float mgf_scale;
+ int mgf_type;
Ecore_Job *deferred_recalc_job;
Ecore_Event_Handler *sel_notify_handler;
Ecore_Event_Handler *sel_clear_handler;
/* Only for clipboard */
const char *cut_sel;
const char *text;
+ Evas_Coord wrap_w;
const char *file;
Elm_Text_Format format;
- Evas_Coord lastw;
+ Evas_Coord lastw, entmw, entmh;
Evas_Coord downx, downy;
+ Evas_Coord cx, cy, cw, ch;
Eina_List *items;
Eina_List *item_providers;
Eina_List *text_filters;
Ecore_Job *hovdeljob;
Mod_Api *api; // module api if supplied
int cursor_pos;
- int max_no_of_bytes;
+ Elm_Scroller_Policy policy_h, policy_v;
+ Elm_Wrap_Type linewrap;
Eina_Bool changed : 1;
+ Eina_Bool linewrap : 1;
+ Eina_Bool char_linewrap : 1;
Eina_Bool single_line : 1;
Eina_Bool password : 1;
+ Eina_Bool show_last_character : 1;
Eina_Bool editable : 1;
Eina_Bool selection_asked : 1;
Eina_Bool have_selection : 1;
Eina_Bool selmode : 1;
Eina_Bool deferred_cur : 1;
+ Eina_Bool cur_changed : 1;
Eina_Bool disabled : 1;
+ Eina_Bool double_clicked : 1;
+ Eina_Bool long_pressed : 1;
Eina_Bool context_menu : 1;
Eina_Bool drag_selection_asked : 1;
+ Eina_Bool bgcolor : 1;
Eina_Bool can_write : 1;
Eina_Bool autosave : 1;
Eina_Bool textonly : 1;
Eina_Bool usedown : 1;
+ Eina_Bool scroll : 1;
+ Eina_Bool autoreturnkey : 1;
+ Eina_Bool input_panel_enable : 1;
+ Eina_Bool autocapital : 1;
+ Elm_Input_Panel_Layout input_panel_layout;
+ Eina_Bool autoperiod : 1;
+ Eina_Bool matchlist_list_clicked : 1;
+ Eina_Bool matchlist_case_sensitive : 1;
+ int matchlist_threshold;
};
struct _Elm_Entry_Context_Menu_Item
static const char SIG_SELECTION_CLEARED[] = "selection,cleared";
static const char SIG_CURSOR_CHANGED[] = "cursor,changed";
static const char SIG_ANCHOR_CLICKED[] = "anchor,clicked";
+static const char SIG_MATCHLIST_CLICKED[] = "matchlist,clicked";
+ static const char SIG_PREEDIT_CHANGED[] = "preedit,changed";
static const Evas_Smart_Cb_Description _signals[] = {
- {SIG_CHANGED, ""},
- {SIG_ACTIVATED, ""},
- {SIG_PRESS, ""},
- {SIG_LONGPRESSED, ""},
- {SIG_CLICKED, ""},
- {SIG_CLICKED_DOUBLE, ""},
- {SIG_FOCUSED, ""},
- {SIG_UNFOCUSED, ""},
- {SIG_SELECTION_PASTE, ""},
- {SIG_SELECTION_COPY, ""},
- {SIG_SELECTION_CUT, ""},
- {SIG_SELECTION_START, ""},
- {SIG_SELECTION_CHANGED, ""},
- {SIG_SELECTION_CLEARED, ""},
- {SIG_CURSOR_CHANGED, ""},
- {SIG_ANCHOR_CLICKED, ""},
- {SIG_PREEDIT_CHANGED, ""},
- {NULL, NULL}
+ {SIG_CHANGED, ""},
+ {SIG_ACTIVATED, ""},
+ {SIG_PRESS, ""},
+ {SIG_LONGPRESSED, ""},
+ {SIG_CLICKED, ""},
+ {SIG_CLICKED_DOUBLE, ""},
+ {SIG_FOCUSED, ""},
+ {SIG_UNFOCUSED, ""},
+ {SIG_SELECTION_PASTE, ""},
+ {SIG_SELECTION_COPY, ""},
+ {SIG_SELECTION_CUT, ""},
+ {SIG_SELECTION_START, ""},
+ {SIG_SELECTION_CHANGED, ""},
+ {SIG_SELECTION_CLEARED, ""},
+ {SIG_CURSOR_CHANGED, ""},
+ {SIG_ANCHOR_CLICKED, ""},
++ {SIG_PREEDIT_CHANGED, ""},
+ {SIG_MATCHLIST_CLICKED, ""},
+ {NULL, NULL}
};
+typedef enum _Elm_Entry_Magnifier_Type
+{
+ _ENTRY_MAGNIFIER_FIXEDSIZE = 0,
+ _ENTRY_MAGNIFIER_FILLWIDTH,
+ _ENTRY_MAGNIFIER_CIRCULAR,
+} Elm_Entry_Magnifier_Type;
+
+
static Eina_List *entries = NULL;
struct _Mod_Api
#endif
if (wd->cut_sel) eina_stringshare_del(wd->cut_sel);
if (wd->text) eina_stringshare_del(wd->text);
+ if (wd->bg) evas_object_del(wd->bg);
if (wd->deferred_recalc_job) ecore_job_del(wd->deferred_recalc_job);
+ if (wd->append_text_idler)
+ {
+ ecore_idler_del(wd->append_text_idler);
+ free(wd->append_text_left);
+ wd->append_text_left = NULL;
+ wd->append_text_idler = NULL;
+ }
+ if (wd->matchlist_job) ecore_job_del(wd->matchlist_job);
if (wd->longpress_timer) ecore_timer_del(wd->longpress_timer);
+ if (wd->mgf_proxy) evas_object_del(wd->mgf_proxy);
+ if (wd->mgf_bg) evas_object_del(wd->mgf_bg);
+ if (wd->mgf_clip) evas_object_del(wd->mgf_clip);
+
EINA_LIST_FREE(wd->items, it)
{
eina_stringshare_del(it->label);
edje_object_signal_emit(wd->ent, "elm,action,focus", "elm");
edje_object_message_signal_process(wd->ent);
edje_object_scale_set(wd->ent, elm_widget_scale_get(obj) * _elm_config->scale);
+ elm_smart_scroller_mirrored_set(wd->scroller, elm_widget_mirrored_get(obj));
+ elm_smart_scroller_object_theme_set(obj, wd->scroller, "scroller", "entry",
+ elm_widget_style_get(obj));
+ if (wd->scroll)
+ {
+ const char *str;
+ Evas_Object *edj;
+
+ edj = elm_smart_scroller_edje_object_get(wd->scroller);
+ str = edje_object_data_get(edj, "focus_highlight");
+ if ((str) && (!strcmp(str, "on")))
+ elm_widget_highlight_in_theme_set(obj, EINA_TRUE);
+ else
+ elm_widget_highlight_in_theme_set(obj, EINA_FALSE);
+ }
+
+ if (wd->password)
+ {
+ edje_object_part_text_autoperiod_set(wd->ent, "elm.text", EINA_FALSE);
+ edje_object_part_text_autocapitalization_set(wd->ent, "elm.text", EINA_FALSE);
+ }
+ else
+ {
+ edje_object_part_text_autoperiod_set(wd->ent, "elm.text", wd->autoperiod);
+ edje_object_part_text_autocapitalization_set(wd->ent, "elm.text", wd->autocapital);
+ }
+
+ ic = edje_object_part_text_imf_context_get(wd->ent, "elm.text");
+ if (ic)
+ {
+ ecore_imf_context_input_panel_layout_set(ic, (Ecore_IMF_Input_Panel_Layout)wd->input_panel_layout);
+ }
+
_sizing_eval(obj);
}
edje_object_part_text_select_abort(wd->ent, "elm.text");
}
}
-
- evas_object_smart_callback_call(obj, SIG_LONGPRESSED, NULL);
}
+static void
+_magnifier_hide(void *data)
+{
+ Widget_Data *wd = elm_widget_data_get(data);
+ if (!wd) return;
+
+ evas_object_hide(wd->mgf_bg);
+ evas_object_hide(wd->mgf_clip);
+}
+
+static void
+_magnifier_show(void *data)
+{
+ Widget_Data *wd = elm_widget_data_get(data);
+ if (!wd) return;
+
+ evas_object_show(wd->mgf_bg);
+ evas_object_show(wd->mgf_clip);
+}
+
+static void
+_magnifier_move(void *data)
+{
+ Widget_Data *wd = elm_widget_data_get(data);
+ if (!wd) return;
+
+ Evas_Coord x, y, w, h, fs;
+ Evas_Coord cx, cy, cw, ch, ox, oy;
+
+ evas_object_geometry_get(data, &x, &y, &w, &h);
+ edje_object_part_text_cursor_geometry_get(wd->ent, "elm.text", &cx, &cy, &cw, &ch);
+
+ ox = oy = 0;
+ fs = elm_finger_size_get();
+
+ if ((cy + y) - wd->mgf_height - fs < 0)
+ oy = -1 * ((cy + y) - wd->mgf_height - fs);
+
+ if (wd->mgf_type == _ENTRY_MAGNIFIER_FIXEDSIZE)
+ evas_object_move(wd->mgf_bg, (cx + x + cw/2) + ox, (cy + y) - wd->mgf_height - fs + oy);
+ else if (wd->mgf_type == _ENTRY_MAGNIFIER_FILLWIDTH)
+ evas_object_move(wd->mgf_bg, x, (cy + y) - wd->mgf_height - fs + oy);
+ else
+ return;
+
+ evas_object_move(wd->mgf_proxy, (1 - wd->mgf_scale) * cx + x + ox, (1 - wd->mgf_scale) * cy + y - wd->mgf_height/2 - ch/2 - fs + oy);
+}
+
+static void
+_magnifier_create(void *data)
+{
+ Widget_Data *wd = elm_widget_data_get(data);
+ Evas_Coord x, y, w, h;
+ const char* key_data = NULL;
+
+ if (!wd) return;
+
+ if (wd->mgf_proxy)
+ {
+ evas_object_image_source_unset(wd->mgf_proxy);
+ evas_object_color_set(wd->mgf_proxy, 255, 255, 255, 0);
+ evas_object_hide(wd->mgf_proxy);
+ evas_object_clip_unset(wd->mgf_proxy);
+ evas_object_del(wd->mgf_proxy);
+ }
+ if (wd->mgf_bg) evas_object_del(wd->mgf_bg);
+ if (wd->mgf_clip) evas_object_del(wd->mgf_clip);
+
+ evas_object_geometry_get(data, &x, &y, &w, &h);
+ wd->mgf_bg = edje_object_add(evas_object_evas_get(data));
+
+ if (wd->mgf_type == _ENTRY_MAGNIFIER_FIXEDSIZE)
+ _elm_theme_object_set(data, wd->mgf_bg, "entry", "magnifier", "fixed-size");
+ else if (wd->mgf_type == _ENTRY_MAGNIFIER_FILLWIDTH)
+ _elm_theme_object_set(data, wd->mgf_bg, "entry", "magnifier", "fill-width");
+ else
+ return;
+
+ wd->mgf_clip = evas_object_rectangle_add(evas_object_evas_get(data));
+ evas_object_color_set(wd->mgf_clip, 255, 255, 255, 255);
+ edje_object_part_swallow(wd->mgf_bg, "swallow", wd->mgf_clip);
+
+ key_data = edje_object_data_get(wd->mgf_bg, "height");
+ if (key_data) wd->mgf_height = atoi(key_data);
+ key_data = edje_object_data_get(wd->mgf_bg, "scale");
+ if (key_data) wd->mgf_scale = atof(key_data);
+
+ if (wd->mgf_type == _ENTRY_MAGNIFIER_FILLWIDTH)
+ evas_object_resize(wd->mgf_bg, w, wd->mgf_height);
+
+ wd->mgf_proxy = evas_object_image_add(evas_object_evas_get(data));
+ evas_object_image_source_set(wd->mgf_proxy, data);
+ evas_object_resize(wd->mgf_proxy, w * wd->mgf_scale, h * wd->mgf_scale);
+ evas_object_image_fill_set(wd->mgf_proxy, 0, 0, w * wd->mgf_scale, h * wd->mgf_scale);
+ evas_object_color_set(wd->mgf_proxy, 255, 255, 255, 255);
+ evas_object_pass_events_set(wd->mgf_proxy, EINA_TRUE);
+ evas_object_show(wd->mgf_proxy);
+ evas_object_clip_set(wd->mgf_proxy, wd->mgf_clip);
+
+ evas_object_layer_set(wd->mgf_bg, EVAS_LAYER_MAX);
+ evas_object_layer_set(wd->mgf_proxy, EVAS_LAYER_MAX);
+}
+
static Eina_Bool
_long_press(void *data)
{
if (!wd) return;
if (wd->disabled) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
- if (ev->button != 1) return;
- // if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK)
- if (wd->longpress_timer) ecore_timer_del(wd->longpress_timer);
- wd->longpress_timer = ecore_timer_add(_elm_config->longpress_timeout, _long_press, data);
wd->downx = ev->canvas.x;
wd->downy = ev->canvas.y;
-
+ wd->long_pressed = EINA_FALSE;
+ if (ev->button == 1)
+ {
+ if (wd->longpress_timer) ecore_timer_del(wd->longpress_timer);
+ wd->longpress_timer = ecore_timer_add(_elm_config->longpress_timeout, _long_press, data);
+ }
}
static void
Evas_Event_Mouse_Up *ev = event_info;
if (!wd) return;
if (wd->disabled) return;
- if (ev->button != 1) return;
-
- if (!wd->double_clicked)
+ if (ev->button == 1)
{
- if ((wd->api) && (wd->api->obj_mouseup))
+ if (wd->longpress_timer)
{
- wd->api->obj_mouseup(data);
+ ecore_timer_del(wd->longpress_timer);
+ wd->longpress_timer = NULL;
}
- }
- if (wd->longpress_timer)
- {
- ecore_timer_del(wd->longpress_timer);
- wd->longpress_timer = NULL;
- }
+
- _magnifier_hide(data);
- elm_object_scroll_freeze_pop(data);
++ if (!wd->double_clicked)
++ {
++ if ((wd->api) && (wd->api->obj_mouseup))
++ {
++ wd->api->obj_mouseup(data);
++ }
++ }
++
++ _magnifier_hide(data);
++ elm_object_scroll_freeze_pop(data);
++
++ if (wd->long_pressed)
++ {
++ _menu_press(data);
++ }
+
- if (wd->long_pressed)
+ }
+ else if (ev->button == 3)
{
+ wd->usedown = 1;
_menu_press(data);
}
}
wd->longpress_timer = NULL;
}
}
- if (ev->buttons != 1) return;
-
- if (wd->long_pressed)
+
- _magnifier_show(data);
- _magnifier_move(data);
++ if (ev->buttons == 1)
+ {
++ if (wd->long_pressed)
++ {
++ _magnifier_show(data);
++ _magnifier_move(data);
++ }
+ }
}
static const char *
return "base";
}
-
++
+static int
+_entry_length_get(Evas_Object *obj)
+{
+ int len;
+ const char *str = elm_entry_entry_get(obj);
+ if (!str) return 0;
+
+ char *plain_str = _elm_util_mkup_to_text(str);
+ if (!plain_str) return 0;
+
+ len = strlen(plain_str);
+ free(plain_str);
+
+ return len;
+}
+
+static void
+_matchlist_show(void *data)
+{
+ Widget_Data *wd = elm_widget_data_get(data);
+ const char *text = NULL;
+ int textlen = 0;
+ char *str_list = NULL, *str_result = NULL;
+ char *str_mkup = NULL, *str_front = NULL, *str_mid = NULL;
+
+ Eina_List *l;
+ Eina_Bool textfound = EINA_FALSE;
+
+ if (!wd) return;
+ if (elm_widget_disabled_get(data)) return;
+
+ wd->matchlist_job = NULL;
+
+ if (wd->matchlist_list_clicked)
+ {
+ evas_object_hide(wd->hover);
+ wd->matchlist_list_clicked = EINA_FALSE;
+ return;
+ }
+ text = elm_entry_entry_get(data);
+ if (text == NULL)
+ return;
+ textlen = strlen(text);
+
+ if (textlen < wd->matchlist_threshold)
+ {
+ evas_object_hide(wd->hover);
+ return;
+ }
+
+ evas_object_hide(wd->hover);
+
+ if (wd->match_list)
+ {
+ elm_list_clear(wd->list);
+ EINA_LIST_FOREACH(wd->match_list, l, str_list)
+ {
+ if (wd->matchlist_case_sensitive)
+ str_result = strstr(str_list, text);
+ else
+ str_result = strcasestr(str_list, text);
+
+ if (str_result)
+ {
+ str_mkup = malloc(strlen(str_list) + 16);
++ if (str_mkup == NULL) return;
+
+ textlen = strlen(str_list) - strlen(str_result);
+ str_front = malloc(textlen + 1);
++ if (str_front == NULL) return;
++
+ memset(str_front, 0, textlen + 1);
+ strncpy(str_front, str_list, textlen);
+
+ textlen = strlen(text);
+ str_mid = malloc(textlen + 1);
++ if (str_mid == NULL) return;
++
+ memset(str_mid, 0, textlen + 1);
+ strncpy(str_mid, str_list + strlen(str_front), textlen);
+
+ sprintf(str_mkup, "%s<match>%s</match>%s", str_front, str_mid, str_result + strlen(text));
+
+ elm_list_item_append(wd->list, str_mkup, NULL, NULL, NULL, NULL);
+
+ if (str_mkup) free(str_mkup);
+ if (str_front) free(str_front);
+ if (str_mid) free(str_mid);
+
+ textfound=EINA_TRUE;
+ }
+ }
+ }
+ else
+ return;
+
+ if (textfound)
+ {
+ elm_list_go(wd->list);
+ evas_object_show(wd->hover);
+ evas_object_raise(wd->hover);
+ }
+}
+
+static void _matchlist_list_clicked( void *data, Evas_Object *obj, void *event_info )
+{
+ Elm_List_Item *it = (Elm_List_Item *) elm_list_selected_item_get(obj);
+ Widget_Data *wd = elm_widget_data_get(data);
+ if ((it == NULL) || (wd == NULL))
+ return;
+
+ const char *text = elm_list_item_label_get(it);
+ evas_object_smart_callback_call((Evas_Object *)data, "selected", (void *)text);
+ if (wd->match_list)
+ {
+ if (text != NULL)
+ {
+ elm_entry_entry_set(data, elm_entry_markup_to_utf8(text));
+ elm_entry_cursor_end_set(data);
+ wd->matchlist_list_clicked = EINA_TRUE;
+
+ evas_object_smart_callback_call(data, SIG_MATCHLIST_CLICKED, elm_entry_markup_to_utf8(text));
+ }
+ }
+ elm_widget_focus_set(data, EINA_TRUE);
+}
+
+EAPI void
+elm_entry_matchlist_set(Evas_Object *obj, Eina_List *match_list, Eina_Bool case_sensitive)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+
+ if (match_list)
+ {
+ Evas_Coord max_w = 9999, max_h = 9999;
+ const char* key_data = NULL;
+
+ wd->matchlist_threshold = 1;
+ wd->hover = elm_hover_add(elm_widget_parent_get(obj));
+ elm_hover_parent_set(wd->hover, elm_widget_parent_get(obj));
+ elm_hover_target_set(wd->hover, obj);
+ elm_object_style_set(wd->hover, "matchlist");
+
+ wd->layout = elm_layout_add(wd->hover);
+ elm_layout_theme_set(wd->layout, "entry", "matchlist", "default");
+ wd->list = elm_list_add(wd->layout);
+ evas_object_size_hint_weight_set(wd->list, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(wd->list, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_list_mode_set(wd->list, ELM_LIST_EXPAND);
+ elm_object_style_set(wd->list, "matchlist");
+
+ key_data = edje_object_data_get(elm_layout_edje_get(wd->layout), "max_width");
+ if (key_data) max_w = atoi(key_data);
+ key_data = edje_object_data_get(elm_layout_edje_get(wd->layout), "max_height");
+ if (key_data) max_h = atoi(key_data);
+
+ elm_list_go(wd->list);
+ evas_object_size_hint_max_set(wd->list, max_w, max_h);
+ evas_object_smart_callback_add(wd->list, "selected", _matchlist_list_clicked, obj);
+ elm_layout_content_set(wd->layout, "elm.swallow.content", wd->list);
+ elm_hover_content_set(wd->hover, "bottom", wd->layout);
+
+ wd->match_list = match_list;
+ }
+ else
+ {
+ if (wd->hover)
+ evas_object_del(wd->hover);
+
+ wd->match_list = NULL;
+ }
+
+ wd->matchlist_case_sensitive = case_sensitive;
+}
+
static void
- _signal_entry_changed(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
+ _entry_changed_common_handling(void *data, const char *event)
{
Widget_Data *wd = elm_widget_data_get(data);
+ Evas_Coord minh;
if (!wd) return;
wd->changed = EINA_TRUE;
+ /* Reset the size hints which are no more relevant.
+ * Keep the height, this is a hack, but doesn't really matter
+ * cause we'll re-eval in a moment. */
+ evas_object_size_hint_min_get(data, NULL, &minh);
+ evas_object_size_hint_min_set(data, -1, minh);
_sizing_eval(data);
if (wd->text) eina_stringshare_del(wd->text);
wd->text = NULL;
- evas_object_smart_callback_call(data, SIG_CHANGED, NULL);
+ _check_enable_returnkey(data);
+ evas_object_smart_callback_call(data, event, NULL);
if (wd->delay_write)
{
ecore_timer_del(wd->delay_write);
}
static void
+ _signal_entry_changed(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
+ {
+ _entry_changed_common_handling(data, SIG_CHANGED);
+ }
+
+ static void
+ _signal_preedit_changed(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
+ {
+ _entry_changed_common_handling(data, SIG_PREEDIT_CHANGED);
+ }
+
++
++static void
+_signal_handler_move_start(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
+{
+ Widget_Data *wd = elm_widget_data_get(data);
+ elm_object_scroll_freeze_push(data);
+
+ if ((wd->api) && (wd->api->obj_hidemenu))
+ {
+ wd->api->obj_hidemenu(data);
+ }
+
+ _magnifier_create(data);
+ _magnifier_move(data);
+ _magnifier_show(data);
+}
+
+static void
+_signal_handler_move_end(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
+{
+ Widget_Data *wd = elm_widget_data_get(data);
+ elm_object_scroll_freeze_pop(data);
+
+ if (wd->have_selection)
+ {
+ _magnifier_hide(data);
+ _menu_press(data);
+ }
+}
+
+static void
+_signal_handler_moving(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
+{
+ _magnifier_move(data);
+ _magnifier_show(data);
+}
+
+static void
+_signal_selection_end(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
+{
+ _magnifier_hide(data);
+ _menu_press(data);
+}
+
static void
_signal_selection_start(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
{
wd->context_menu = EINA_TRUE;
wd->autosave = EINA_TRUE;
wd->textonly = EINA_FALSE;
+ wd->autoperiod = EINA_TRUE;
wd->ent = edje_object_add(e);
+ elm_widget_sub_object_add(obj, wd->ent);
edje_object_item_provider_set(wd->ent, _get_item, obj);
- edje_object_text_insert_filter_callback_add(wd->ent, "elm.text", _text_filter, obj);
+ edje_object_text_insert_filter_callback_add(wd->ent,"elm.text", _text_filter, obj);
evas_object_event_callback_add(wd->ent, EVAS_CALLBACK_MOVE, _move, obj);
- evas_object_event_callback_add(wd->ent, EVAS_CALLBACK_RESIZE, _resize, obj);
evas_object_event_callback_add(wd->ent, EVAS_CALLBACK_MOUSE_DOWN,
_mouse_down, obj);
evas_object_event_callback_add(wd->ent, EVAS_CALLBACK_MOUSE_UP,
_elm_theme_object_set(obj, wd->ent, "entry", "base", "default");
edje_object_signal_callback_add(wd->ent, "entry,changed", "elm.text",
_signal_entry_changed, obj);
+ edje_object_signal_callback_add(wd->ent, "preedit,changed", "elm.text",
+ _signal_preedit_changed, obj);
+ edje_object_signal_callback_add(wd->ent, "handler,move,start", "elm.text",
+ _signal_handler_move_start, obj);
+ edje_object_signal_callback_add(wd->ent, "handler,move,end", "elm.text",
+ _signal_handler_move_end, obj);
+ edje_object_signal_callback_add(wd->ent, "handler,moving", "elm.text",
+ _signal_handler_moving, obj);
edje_object_signal_callback_add(wd->ent, "selection,start", "elm.text",
_signal_selection_start, obj);
+ edje_object_signal_callback_add(wd->ent, "selection,end", "elm.text",
+ _signal_selection_end, obj);
+ edje_object_signal_callback_add(wd->ent, "magnifier,changed", "elm.text",
+ _signal_magnifier_changed, obj);
edje_object_signal_callback_add(wd->ent, "selection,changed", "elm.text",
_signal_selection_changed, obj);
edje_object_signal_callback_add(wd->ent, "selection,cleared", "elm.text",
}
/**
- * This enables character line wrapping in the entry object. It is the opposite
- * of elm_entry_single_line_set(). Additionally, setting this disables
- * word line wrapping.
- * See also elm_entry_line_wrap_set().
- *
- * @param obj The entry object
- * @param wrap If true, the entry will be wrapped once it reaches the end
- * of the object. Wrapping will occur immediately upon reaching the end of the object.
- *
- * @ingroup Entry
- */
- EAPI void
- elm_entry_line_char_wrap_set(Evas_Object *obj, Eina_Bool wrap)
- {
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- if (wd->char_linewrap == wrap) return;
- wd->char_linewrap = wrap;
- if(wd->char_linewrap)
- wd->linewrap = EINA_FALSE;
- _theme_hook(obj);
- }
-
- /**
+ * Set wrap width of the entry
+ *
+ * @param obj The entry object
+ * @param w The wrap width in pixels at a minimum where words need to wrap
+ * @ingroup Entry
+ */
+EAPI void
+elm_entry_wrap_width_set(Evas_Object *obj, Evas_Coord w)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (wd->wrap_w == w) return;
+ wd->wrap_w = w;
+ _sizing_eval(obj);
+}
+
+/**
+ * get wrap width of the entry
+ *
+ * @param obj The entry object
+ * @return The wrap width in pixels at a minimum where words need to wrap
+ * @ingroup Entry
+ */
+EAPI Evas_Coord
+elm_entry_wrap_width_get(const Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ return wd->wrap_w;
+}
+
+/**
* This sets the editable attribute of the entry.
*
* @param obj The entry object
}
/**
+ * Enable or disable scrolling in entry
+ *
+ * Normally the entry is not scrollable unless you enable it with this call.
+ *
+ * @param obj The entry object
+ * @param scroll EINA_TRUE if it is to be scrollable, EINA_FALSE otherwise
+ *
+ * @ingroup Entry
+ */
+ EAPI void
+ elm_entry_scrollable_set(Evas_Object *obj, Eina_Bool scroll)
+ {
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ scroll = !!scroll;
+ if (wd->scroll == scroll) return;
+ wd->scroll = scroll;
+ if (wd->scroll)
+ {
+ elm_widget_sub_object_del(obj, wd->scroller);
+ elm_widget_resize_object_set(obj, wd->scroller);
+ elm_widget_sub_object_add(obj, wd->ent);
+ elm_smart_scroller_child_set(wd->scroller, wd->ent);
+ evas_object_show(wd->scroller);
+ elm_widget_on_show_region_hook_set(obj, _show_region_hook, obj);
+ }
+ else
+ {
+ elm_smart_scroller_child_set(wd->scroller, NULL);
+ elm_widget_sub_object_del(obj, wd->ent);
+ elm_widget_resize_object_set(obj, wd->ent);
+ evas_object_smart_member_add(wd->scroller, obj);
+ elm_widget_sub_object_add(obj, wd->scroller);
+ evas_object_hide(wd->scroller);
+ elm_widget_on_show_region_hook_set(obj, NULL, NULL);
+ }
+ wd->lastw = -1;
+ _theme_hook(obj);
+ }
+
+ /**
+ * Get the scrollable state of the entry
+ *
+ * Normally the entry is not scrollable. This gets the scrollable state
+ * of the entry. See elm_entry_scrollable_set() for more information.
+ *
+ * @param obj The entry object
+ * @return The scrollable state
+ *
+ * @ingroup Entry
+ */
+ EAPI Eina_Bool
+ elm_entry_scrollable_get(const Evas_Object *obj)
+ {
+ ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return wd->scroll;
+ }
+
+ /**
+ * This sets a widget to be displayed to the left of a scrolled entry.
+ *
+ * @param obj The scrolled entry object
+ * @param icon The widget to display on the left side of the scrolled
+ * entry.
+ *
+ * @note A previously set widget will be destroyed.
+ * @note If the object being set does not have minimum size hints set,
+ * it won't get properly displayed.
+ *
+ * @ingroup Entry
+ * @see elm_entry_end_set
+ */
+ EAPI void
+ elm_entry_icon_set(Evas_Object *obj, Evas_Object *icon)
+ {
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Object *edje;
+ if (!wd) return;
+ EINA_SAFETY_ON_NULL_RETURN(icon);
+ if (wd->icon == icon) return;
+ if (wd->icon) evas_object_del(wd->icon);
+ wd->icon = icon;
+ edje = elm_smart_scroller_edje_object_get(wd->scroller);
+ if (!edje) return;
+ edje_object_part_swallow(edje, "elm.swallow.icon", wd->icon);
+ edje_object_signal_emit(edje, "elm,action,show,icon", "elm");
+ _sizing_eval(obj);
+ }
+
+ /**
+ * Gets the leftmost widget of the scrolled entry. This object is
+ * owned by the scrolled entry and should not be modified.
+ *
+ * @param obj The scrolled entry object
+ * @return the left widget inside the scroller
+ *
+ * @ingroup Entry
+ */
+ EAPI Evas_Object *
+ elm_entry_icon_get(const Evas_Object *obj)
+ {
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return NULL;
+ return wd->icon;
+ }
+
+ /**
+ * Unset the leftmost widget of the scrolled entry, unparenting and
+ * returning it.
+ *
+ * @param obj The scrolled entry object
+ * @return the previously set icon sub-object of this entry, on
+ * success.
+ *
+ * @see elm_entry_icon_set()
+ *
+ * @ingroup Entry
+ */
+ EAPI Evas_Object *
+ elm_entry_icon_unset(Evas_Object *obj)
+ {
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Object *ret = NULL;
+ if (!wd) return NULL;
+ if (wd->icon)
+ {
+ Evas_Object *edje = elm_smart_scroller_edje_object_get(wd->scroller);
+ if (!edje) return NULL;
+ ret = wd->icon;
+ edje_object_part_unswallow(edje, wd->icon);
+ edje_object_signal_emit(edje, "elm,action,hide,icon", "elm");
+ wd->icon = NULL;
+ _sizing_eval(obj);
+ }
+ return ret;
+ }
+
+ /**
+ * Sets the visibility of the left-side widget of the scrolled entry,
+ * set by @elm_entry_icon_set().
+ *
+ * @param obj The scrolled entry object
+ * @param setting EINA_TRUE if the object should be displayed,
+ * EINA_FALSE if not.
+ *
+ * @ingroup Entry
+ */
+ EAPI void
+ elm_entry_icon_visible_set(Evas_Object *obj, Eina_Bool setting)
+ {
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if ((!wd) || (!wd->icon)) return;
+ if (setting)
+ evas_object_hide(wd->icon);
+ else
+ evas_object_show(wd->icon);
+ _sizing_eval(obj);
+ }
+
+ /**
+ * This sets a widget to be displayed to the end of a scrolled entry.
+ *
+ * @param obj The scrolled entry object
+ * @param end The widget to display on the right side of the scrolled
+ * entry.
+ *
+ * @note A previously set widget will be destroyed.
+ * @note If the object being set does not have minimum size hints set,
+ * it won't get properly displayed.
+ *
+ * @ingroup Entry
+ * @see elm_entry_icon_set
+ */
+ EAPI void
+ elm_entry_end_set(Evas_Object *obj, Evas_Object *end)
+ {
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Object *edje;
+ if (!wd) return;
+ EINA_SAFETY_ON_NULL_RETURN(end);
+ if (wd->end == end) return;
+ if (wd->end) evas_object_del(wd->end);
+ wd->end = end;
+ edje = elm_smart_scroller_edje_object_get(wd->scroller);
+ if (!edje) return;
+ edje_object_part_swallow(edje, "elm.swallow.end", wd->end);
+ edje_object_signal_emit(edje, "elm,action,show,end", "elm");
+ _sizing_eval(obj);
+ }
+
+ /**
+ * Gets the endmost widget of the scrolled entry. This object is owned
+ * by the scrolled entry and should not be modified.
+ *
+ * @param obj The scrolled entry object
+ * @return the right widget inside the scroller
+ *
+ * @ingroup Entry
+ */
+ EAPI Evas_Object *
+ elm_entry_end_get(const Evas_Object *obj)
+ {
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return NULL;
+ return wd->end;
+ }
+
+ /**
+ * Unset the endmost widget of the scrolled entry, unparenting and
+ * returning it.
+ *
+ * @param obj The scrolled entry object
+ * @return the previously set icon sub-object of this entry, on
+ * success.
+ *
+ * @see elm_entry_icon_set()
+ *
+ * @ingroup Entry
+ */
+ EAPI Evas_Object *
+ elm_entry_end_unset(Evas_Object *obj)
+ {
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Object *ret = NULL;
+ if (!wd) return NULL;
+ if (wd->end)
+ {
+ Evas_Object *edje = elm_smart_scroller_edje_object_get(wd->scroller);
+ if (!edje) return NULL;
+ ret = wd->end;
+ edje_object_part_unswallow(edje, wd->end);
+ edje_object_signal_emit(edje, "elm,action,hide,end", "elm");
+ wd->end = NULL;
+ _sizing_eval(obj);
+ }
+ return ret;
+ }
+
+ /**
+ * Sets the visibility of the end widget of the scrolled entry, set by
+ * @elm_entry_end_set().
+ *
+ * @param obj The scrolled entry object
+ * @param setting EINA_TRUE if the object should be displayed,
+ * EINA_FALSE if not.
+ *
+ * @ingroup Entry
+ */
+ EAPI void
+ elm_entry_end_visible_set(Evas_Object *obj, Eina_Bool setting)
+ {
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if ((!wd) || (!wd->end)) return;
+ if (setting)
+ evas_object_hide(wd->end);
+ else
+ evas_object_show(wd->end);
+ _sizing_eval(obj);
+ }
+
+ /**
+ * This sets the scrolled entry's scrollbar policy (ie. enabling/disabling them).
+ *
+ * @param obj The scrolled entry object
+ * @param h The horizontal scrollbar policy to apply
+ * @param v The vertical scrollbar policy to apply
+ *
+ * @ingroup Entry
+ */
+ EAPI void
+ elm_entry_scrollbar_policy_set(Evas_Object *obj, Elm_Scroller_Policy h, Elm_Scroller_Policy v)
+ {
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ const Elm_Scroller_Policy map[3] =
+ {
+ ELM_SMART_SCROLLER_POLICY_AUTO,
+ ELM_SMART_SCROLLER_POLICY_ON,
+ ELM_SMART_SCROLLER_POLICY_OFF
+ };
+ if (!wd) return;
+ wd->policy_h = h;
+ wd->policy_v = v;
+ elm_smart_scroller_policy_set(wd->scroller,
+ map[wd->policy_h],
+ map[wd->policy_v]);
+ }
+
+ /**
+ * This enables/disables bouncing within the entry.
+ *
+ * @param obj The scrolled entry object
+ * @param h The horizontal bounce state
+ * @param v The vertical bounce state
+ *
+ * @ingroup Entry
+ */
+ EAPI void
+ elm_entry_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
+ {
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ elm_smart_scroller_bounce_allow_set(wd->scroller, h_bounce, v_bounce);
+ }
+
+ /**
+ * Get the bounce mode
+ *
+ * @param obj The Entry object
+ * @param h_bounce Allow bounce horizontally
+ * @param v_bounce Allow bounce vertically
+ *
+ * @ingroup Entry
+ */
+ EAPI void
+ elm_entry_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce)
+ {
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ elm_smart_scroller_bounce_allow_get(wd->scroller, h_bounce, v_bounce);
+ }
++
++/**
+ * This sets the attribute to show the input panel automatically.
+ *
+ * @param obj The entry object
+ * @param enabled If true, the input panel is appeared when entry is clicked or has a focus
+ *
+ * @ingroup Entry
+ */
+EAPI void
+elm_entry_input_panel_enabled_set(Evas_Object *obj, Eina_Bool enabled)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+
+ wd->input_panel_enable = enabled;
+ edje_object_part_text_input_panel_enabled_set(wd->ent, "elm.text", enabled);
+}
+
+/**
+ * Set the input panel layout of the entry
+ *
+ * @param obj The entry object
+ * @param layout the layout to set
+ *
+ * @ingroup Entry
+ */
+EAPI void
+elm_entry_input_panel_layout_set(Evas_Object *obj, Elm_Input_Panel_Layout layout)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+
+ Ecore_IMF_Context *ic = elm_entry_imf_context_get(obj);
+ if (!ic) return;
+
+ wd->input_panel_layout = layout;
+
+ ecore_imf_context_input_panel_layout_set(ic, (Ecore_IMF_Input_Panel_Layout)layout);
+}
+
+/**
+ * Set the magnifier style of the entry
+ *
+ * @param obj The entry object
+ * @param type the magnifier style to set
+ *
+ * @ingroup Entry
+ */
+EAPI void
+elm_entry_magnifier_type_set(Evas_Object *obj, int type)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+
+ wd->mgf_type = type;
+ _magnifier_create(obj);
+}
++
++EINA_DEPRECATED EAPI void
++elm_entry_line_char_wrap_set(Evas_Object *obj, Eina_Bool wrap)
++{
++ if (wrap) elm_entry_line_wrap_set(obj, ELM_WRAP_CHAR);
++}
break;
case ELM_FLIP_CUBE_UP:
p = 1.0 - t;
- p = 1.0 - (p * p);
- pp = p;
+ if (!lin) pp = (p * p);
+ p = 1.0 - pp;
deg = -90.0 * p;
if (wd->state)
{
{
item = elm_gengrid_selected_item_get(obj);
evas_object_smart_callback_call(item->wd->self, SIG_CLICKED_DOUBLE, item);
-- evas_object_smart_callback_call(item->wd->self, "clicked", item); // will be removed
}
else return EINA_FALSE;
item->wd->wasselected = item->selected;
_item_hilight(item);
if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK)
-- {
-- evas_object_smart_callback_call(item->wd->self, SIG_CLICKED_DOUBLE, item);
-- evas_object_smart_callback_call(item->wd->self, "clicked", item); // will be removed
-- }
++ evas_object_smart_callback_call(item->wd->self, SIG_CLICKED_DOUBLE, item);
if (item->long_timer) ecore_timer_del(item->long_timer);
if (item->realized)
item->long_timer = ecore_timer_add(_elm_config->longpress_timeout,
int group_item_height;
int max_items_per_block;
double longpress_timeout;
- Eina_Bool contracting : 1;
+
+ // TODO : refactoring
+ Eina_Bool reorder_mode : 1;
+ Eina_Bool reorder_pan_move : 1;
+ Eina_Bool reorder_deleted : 1;
+ Eina_Bool effect_mode : 1;
+ Eina_Bool auto_scrolled : 1;
+ int edit_mode;
+ int total_num;
+ Elm_Genlist_Item *reorder_it, *reorder_rel;
+ Evas_Coord reorder_start_y;
+ Ecore_Animator *item_moving_effect_timer;
+ Evas_Object *alpha_bg;
+ Elm_Genlist_Item *expand_item;
+ Evas_Coord expand_item_end;
+ Evas_Coord expand_item_gap;
+ int move_effect_mode;
+ unsigned int start_time;
+ Ecore_Job *changed_job;
+ Elm_Genlist_Item *rename_it;
+ const char *mode_type;
+ Elm_Genlist_Item *mode_item;
+ Ecore_Timer *scr_hold_timer;
};
struct _Item_Block
it->want_unrealize = EINA_FALSE;
if (itc) _item_cache_free(itc);
- //evas_event_thaw(evas_object_evas_get(it->wd->obj));
- //evas_event_thaw_eval(evas_object_evas_get(it->wd->obj));
- if (!calc)
- evas_object_smart_callback_call(it->base.widget, SIG_REALIZED, it);
+ evas_event_thaw(evas_object_evas_get(it->wd->obj));
+ evas_event_thaw_eval(evas_object_evas_get(it->wd->obj));
+ if (!calc) evas_object_smart_callback_call(it->base.widget, "realized", it);
+ if ((!calc) && (it->wd->edit_mode) && (it->flags != ELM_GENLIST_ITEM_GROUP))
+ {
+ if (it->itc->edit_item_style )
+ {
+ _effect_item_realize(it, EINA_FALSE);
+ edje_object_message_signal_process(it->edit_obj);
+ }
+ }
++ edje_object_message_signal_process(it->base.view);
}
static void
it->want_unrealize = EINA_TRUE;
}
else
- if (!it->wd->contracting) _item_unrealize(it, EINA_FALSE);
- _item_unrealize(it, EINA_FALSE);
++ _item_unrealize(it, EINA_FALSE);
}
}
if (!dragging)
git->want_realize = EINA_FALSE;
}
EINA_INLIST_FOREACH(sd->wd->blocks, itb)
- {
- itb->w = sd->wd->minw;
- if (ELM_RECTS_INTERSECT(itb->x - sd->wd->pan_x + ox,
- itb->y - sd->wd->pan_y + oy,
- itb->w, itb->h,
- cvx, cvy, cvw, cvh))
- {
- if ((!itb->realized) || (itb->changed))
- _item_block_realize(itb);
- _item_block_position(itb, in);
- }
- else
- {
- if (itb->realized) _item_block_unrealize(itb);
- }
- in += itb->count;
- }
- if ((!sd->wd->reorder_it) || (sd->wd->reorder_pan_move))
+ {
+ itb->w = sd->wd->minw;
+ if (ELM_RECTS_INTERSECT(itb->x - sd->wd->pan_x + ox,
+ itb->y - sd->wd->pan_y + oy,
+ itb->w, itb->h,
+ cvx, cvy, cvw, cvh))
+ {
+ if ((!itb->realized) || (itb->changed))
+ _item_block_realize(itb, in, 0);
+ _item_block_position(itb, in);
+ }
+ else
+ {
+ if (itb->realized) _item_block_unrealize(itb);
+ }
+ in += itb->count;
+ }
+ if (!sd->wd->reorder_it || sd->wd->reorder_pan_move)
_group_items_recalc(sd->wd);
- if ((sd->wd->reorder_mode) && (sd->wd->reorder_it))
+
+ if (sd->wd->reorder_mode && sd->wd->reorder_it)
{
- if (sd->wd->pan_y != sd->wd->old_pan_y)
- sd->wd->reorder_pan_move = EINA_TRUE;
+ if (sd->wd->pan_y != old_pan_y) sd->wd->reorder_pan_move = EINA_TRUE;
else sd->wd->reorder_pan_move = EINA_FALSE;
- evas_object_raise(sd->wd->reorder_it->base.view);
- sd->wd->old_pan_y = sd->wd->pan_y;
- sd->wd->start_time = ecore_loop_time_get();
- }
- _item_auto_scroll(sd->wd);
+ evas_object_raise(sd->wd->reorder_it->edit_obj);
+ old_pan_y = sd->wd->pan_y;
+ }
+
+ if (sd->wd->effect_mode &&
+ ((sd->wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_EXPAND) ||
+ (sd->wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_CONTRACT) ||
+ (sd->wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE)))
+ {
+ if (!sd->wd->item_moving_effect_timer)
+ {
+ if (sd->wd->move_effect_mode != ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE)
+ _item_flip_effect_show(sd->wd->expand_item);
+
+ evas_object_raise(sd->wd->alpha_bg);
+ evas_object_show(sd->wd->alpha_bg);
+ elm_smart_scroller_bounce_animator_disabled_set(sd->wd->scr, EINA_TRUE);
+ sd->wd->start_time = current_time_get();
+ sd->wd->item_moving_effect_timer = ecore_animator_add(_item_moving_effect_timer_cb, sd->wd);
+ }
+ }
+ else _item_auto_scroll(sd->wd);
- sd->wd->contracting = EINA_FALSE;
evas_event_thaw(evas_object_evas_get(obj));
evas_event_thaw_eval(evas_object_evas_get(obj));
-}
+ }
static void
_pan_move(Evas_Object *obj,
}
else
{
- it->wd->contracting = EINA_TRUE;
+ it->wd->move_effect_mode = ELM_GENLIST_ITEM_MOVE_EFFECT_CONTRACT;
if (it->realized)
edje_object_signal_emit(it->base.view, "elm,state,contracted", "elm");
- evas_object_smart_callback_call(it->base.widget, SIG_CONTRACTED, it);
- it->wd->auto_scroll_enabled = EINA_FALSE;
+ evas_object_smart_callback_call(it->base.widget, "contracted", it);
}
}
_del_hook(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
+
+ #ifdef HAVE_ELEMENTARY_ETHUMB
+ Ethumb_Client *ethumbd;
+ #endif
+
if (!wd) return;
if (wd->stdicon) eina_stringshare_del(wd->stdicon);
+
+ #ifdef HAVE_ELEMENTARY_ETHUMB
+ ethumbd = elm_thumb_ethumb_client_get();
+ _icon_thumb_stop(wd, ethumbd);
+
+ eina_stringshare_del(wd->thumb.file.path);
+ eina_stringshare_del(wd->thumb.file.key);
+ eina_stringshare_del(wd->thumb.thumb.path);
+ eina_stringshare_del(wd->thumb.thumb.key);
+
+ if (wd->thumb.eeh)
+ ecore_event_handler_del(wd->thumb.eeh);
+ #endif
+
free(wd);
}
*
* An index object is a type of list that categorizes items in it
* by letter.
- * "level,down" - when the user moves a finger from the second level to the first * level
+ *
+ * Signals that you can add callbacks for are:
+ *
+ * "changed" - when the selected index item changes
+ * "delay,changed" - when the selected index item changes, but after some small i
+ * dle period
+ * "selected" - when the user releases a finger and selects an item
+ * "level,up" - when the user moves a finger from the first level to the second
+ * level
++ * "level,down" - when the user moves a finger from the second level to the first
++ * level
*/
+#define MIN_GRP_SIZE 2 //for symmetry it is 2, otherwise it can be 1 and zero have no meaning.
+#define MIN_PIXEL_VALUE 1 //Min pixel value is highly dependent on touch sensitivity support.
+#define MIN_OBJ_HEIGHT 24 //should be taken from .edc file.
+/*
+ * use for find view toplevel
+ */
+#define SET_VIEW_LEVEL(wd, view_level)\
+ view_level = wd->level;\
+ while ((!wd->tot_items_count[view_level]) && view_level)\
+ {\
+ view_level--; \
+ }
+
typedef struct _Widget_Data Widget_Data;
+typedef struct _PlacementPart PlacementPart;
+
struct _Widget_Data
{
Evas_Object *base;
struct _Elm_Index_Item
{
- Evas_Object *obj;
- Evas_Object *base;
+ Elm_Widget_Item base;
- const char *letter;
- int level;
+ const char *letter, *vis_letter;
- const void *data;
+ int level, size;
Eina_Bool selected : 1;
};
+struct _PlacementPart
+{
+ int start;
+ int count;
+};
+
static const char *widtype = NULL;
+
+static void _del_hook(Evas_Object *obj);
+ static void _mirrored_set(Evas_Object *obj, Eina_Bool rtl);
static void _theme_hook(Evas_Object *obj);
static void _sizing_eval(Evas_Object *obj);
static void _index_box_auto_fill(Evas_Object *obj, Evas_Object *box, int level);
static void _index_box_clear(Evas_Object *obj, Evas_Object *box, int level);
static void _item_free(Elm_Index_Item *it);
+static void _index_process(Evas_Object *obj);
-
+ static const char SIG_CHANGED[] = "changed";
+ static const char SIG_DELAY_CHANGED[] = "delay,changed";
+ static const char SIG_SELECTED[] = "selected";
+ static const char SIG_LEVEL_UP[] = "level,up";
+ static const char SIG_LEVEL_DOWN[] = "level,down";
+
+ static const Evas_Smart_Cb_Description _signals[] = {
+ {SIG_CHANGED, ""},
+ {SIG_DELAY_CHANGED, ""},
+ {SIG_SELECTED, ""},
+ {SIG_LEVEL_UP, ""},
+ {SIG_LEVEL_DOWN, ""},
+ {NULL, NULL}
+ };
+/* Free a block allocated by `malloc', `realloc' or `calloc' one by one*/
static void
- _del_hook(Evas_Object *obj)
+ _del_pre_hook(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
- Elm_Index_Item *it;
- Eina_List *l, *clear = NULL;
if (!wd) return;
_index_box_clear(obj, wd->bx[wd->level], wd->level);
_index_box_clear(obj, wd->bx[0], 0);
- EINA_LIST_FOREACH(wd->items, l, it) clear = eina_list_append(clear, it);
- EINA_LIST_FREE(clear, it) _item_free(it);
+ while (wd->items) _item_free(wd->items->data);
+ if (wd->delay) ecore_timer_del(wd->delay);
++
+ if(wd->popup_str[0]) free(wd->popup_str[0]);
+ if(wd->popup_str[1]) free(wd->popup_str[1]);
- if (wd->delay) ecore_timer_del(wd->delay);
+ }
+
+ static void
+ _del_hook(Evas_Object *obj)
+ {
+ Widget_Data *wd = elm_widget_data_get(obj);
free(wd);
}
if (wd->horizontal)
_elm_theme_object_set(obj, wd->base, "index", "base/horizontal", elm_widget_style_get(obj));
else
- _elm_theme_object_set(obj, wd->base, "index", "base/vertical", elm_widget_style_get(obj));
+ {
+ _elm_theme_object_set(obj, wd->base, "index", "base/vertical", elm_widget_style_get(obj));
+ _mirrored_set(obj, elm_widget_mirrored_get(obj));
+ }
edje_object_part_swallow(wd->base, "elm.swallow.event.0", wd->event[0]);
+ elm_coords_finger_size_adjust(1, &minw, 1, &minh);
+ evas_object_size_hint_min_set(wd->event[0], minw, minh);
++
edje_object_part_swallow(wd->base, "elm.swallow.index.0", wd->bx[0]);
if (edje_object_part_exists(wd->base, "elm.swallow.index.1"))
{
Widget_Data *wd = elm_widget_data_get(obj);
Elm_Index_Item *it;
if (!wd) return NULL;
- it = calloc(1, sizeof(Elm_Index_Item));
+ it = elm_widget_item_new(obj, Elm_Index_Item);
if (!it) return NULL;
- it->obj = obj;
- it->data = item;
- it->letter = eina_stringshare_add(letter);
+ it->base.data = item;
it->level = wd->level;
- return NULL;
+ if(wd->level == 0)
+ it->size = wd->min_obj_height;
+ else
+ it->size = wd->min_1st_level_obj_height;
+ if(letter)
+ {
+ it->letter = eina_stringshare_add(letter);
+ it->vis_letter = eina_stringshare_add(letter);
+ }
+ else
++ {
++ _item_free(it);
++ return NULL;
++ }
return it;
}
static void
_item_free(Elm_Index_Item *it)
{
- Widget_Data *wd = elm_widget_data_get(it->obj);
++/* Automatically filling the box with index item*/
+ Widget_Data *wd = elm_widget_data_get(it->base.widget);
if (!wd) return;
++
wd->items = eina_list_remove(wd->items, it);
- if (it->base) evas_object_del(it->base);
+ elm_widget_item_pre_notify_del(it);
eina_stringshare_del(it->letter);
- free(it);
+ eina_stringshare_del(it->vis_letter);
+ elm_widget_item_del(it);
}
- /* Automatically filling the box with index item*/
+ // FIXME: always have index filled
static void
_index_box_auto_fill(Evas_Object *obj, Evas_Object *box, int level)
{
const char *stacking;
if (it->level != level) continue;
+ if(i > wd->max_supp_items_count) break;
+
o = edje_object_add(evas_object_evas_get(obj));
- it->base = o;
+ it->base.view = o;
+ edje_object_mirrored_set(it->base.view, rtl);
if (i & 0x1)
_elm_theme_object_set(obj, o, "index", "item_odd/vertical", elm_widget_style_get(obj));
else
_elm_theme_object_set(obj, o, "index", "item/vertical", elm_widget_style_get(obj));
edje_object_part_text_set(o, "elm.text", it->letter);
edje_object_size_min_restricted_calc(o, &mw, &mh, 0, 0);
+ evas_object_size_hint_min_set(o, mw, mh);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_resize(o, mw, it->size);
+ edje_object_part_text_set(o, "elm.text", it->vis_letter);
+ evas_object_size_hint_min_set(o, mw, it->size);
+ evas_object_size_hint_max_set(o, mw, it->size);
++ evas_object_resize(o, mw, it->size);
++
elm_widget_sub_object_add(obj, o);
evas_object_box_append(box, o);
stacking = edje_object_data_get(o, "stacking");
it_closest = NULL;
dist = 0x7fffffff;
evas_object_geometry_get(wd->bx[i], &bx, &by, &bw, &bh);
+ dmin = (double)(wd->min_1st_level_obj_height*wd->tot_items_count[1])/(2*(double)bh);
+ dmax = 1.0-dmin-0.08;
EINA_LIST_FOREACH(wd->items, l, it)
{
- if (!((it->level == i) && (it->base))) continue;
+ if (!((it->level == i) && (it->base.view))) continue;
- if ((it->base.view) && (it->level != wd->level))
- {
- if (it->selected)
- {
- it_closest = it;
- break;
- }
- continue;
- }
if (it->selected)
{
it_last = it;
const char *stacking, *selectraise;
it = it_last;
- edje_object_signal_emit(it->base, "elm,state,inactive", "elm");
- stacking = edje_object_data_get(it->base, "stacking");
- selectraise = edje_object_data_get(it->base, "selectraise");
+ if(view_level == it->level)
+ edje_object_signal_emit(it->base.view, "elm,state,inactive", "elm");
+ stacking = edje_object_data_get(it->base.view, "stacking");
+ selectraise = edje_object_data_get(it->base.view, "selectraise");
if ((selectraise) && (!strcmp(selectraise, "on")))
{
if ((stacking) && (!strcmp(stacking, "below")))
const char *selectraise;
it = it_closest;
- edje_object_signal_emit(it->base, "elm,state,active", "elm");
- selectraise = edje_object_data_get(it->base, "selectraise");
+ if(view_level == it->level)
+ edje_object_signal_emit(it->base.view, "elm,state,active", "elm");
+ selectraise = edje_object_data_get(it->base.view, "selectraise");
if ((selectraise) && (!strcmp(selectraise, "on")))
- evas_object_raise(it->base);
- evas_object_smart_callback_call((void *)obj, "changed", (void *)it->data);
+ evas_object_raise(it->base.view);
+ evas_object_smart_callback_call((void *)obj, SIG_CHANGED, (void *)it->base.data);
if (wd->delay) ecore_timer_del(wd->delay);
wd->delay = ecore_timer_add(0.2, _delay_change, obj);
}
Widget_Data *wd = elm_widget_data_get(data);
Evas_Event_Mouse_Up *ev = event_info;
void *d;
+ Elm_Index_Item *it;
+ Eina_List *l;
+ int view_level;
+
if (!wd) return;
if (ev->button != 1) return;
+ if (wd->level == 1 && wd->delay) ecore_timer_del(wd->delay);
+ wd->delay = NULL;
wd->down = 0;
- d = (void *)elm_index_item_selected_get(data, wd->level);
+ SET_VIEW_LEVEL(wd, view_level);
+ d = (void *)elm_index_item_selected_get(data, view_level);
+ EINA_LIST_FOREACH(wd->items, l, it)
+ {
- edje_object_signal_emit(it->base, "elm,state,inactive", "elm");
++ edje_object_signal_emit(it->base.view, "elm,state,inactive", "elm");
+ }
- if (d) evas_object_smart_callback_call(data, "selected", d);
+ if (d) evas_object_smart_callback_call(data, SIG_SELECTED, d);
elm_index_active_set(data, 0);
edje_object_signal_emit(wd->base, "elm,state,level,0", "elm");
}
{
Widget_Data *wd = elm_widget_data_get(data);
Evas_Event_Mouse_Move *ev = event_info;
- Evas_Coord minw = 0, minh = 0, x, y, dx, dy, adx, ady;
+ Evas_Coord minw = 0, minh = 0, x, y, dx, adx, w;
+ void *d;
char buf[1024];
if (!wd) return;
if (!wd->down) return;
wd->level = 0;
snprintf(buf, sizeof(buf), "elm,state,level,%i", wd->level);
edje_object_signal_emit(wd->base, buf, "elm");
- evas_object_smart_callback_call(data, "level,down", NULL);
+ d = (void *)elm_index_item_selected_get(data, wd->level);
+ evas_object_smart_callback_call(data, "changed", d);
+ if (wd->delay) ecore_timer_del(wd->delay);
+ wd->delay = ecore_timer_add(0.2, _delay_change, data);
+ evas_object_smart_callback_call(data, SIG_LEVEL_DOWN, NULL);
}
}
}
_sel_eval(data, ev->cur.canvas.x, ev->cur.canvas.y);
}
+
+static void
+_index_box_refill_job(void *data)
+{
+ Widget_Data *wd = elm_widget_data_get((Evas_Object *)data);
+ if (!wd) return;
+
+ const char *string;
+ Evas_Coord pw, ph;
+
+ evas_object_geometry_get(wd->base, NULL, NULL, &pw, &ph);
+ wd->scale_factor = elm_scale_get();
+ if ( wd->scale_factor == 0.0 ) {
+ wd->scale_factor = 1.0;
+ }
+ string = edje_object_data_get(wd->base, "min_obj_height");
+ if(string)
+ wd->min_obj_height = (int) (atoi(string))*wd->scale_factor;
+ else
+ wd->min_obj_height = MIN_OBJ_HEIGHT*wd->scale_factor;
+ if(!wd->min_obj_height) return;
+
+ wd->max_grp_size = wd->min_obj_height - 2*MIN_GRP_SIZE;
+ wd->items_count = ph/wd->min_obj_height;
+ wd->max_supp_items_count = wd->max_grp_size*(int)((wd->items_count-1)*0.5)+wd->items_count;
+
+ if(pw != wd->pwidth && ph != wd->pheight)
+ {
+ if(wd->down == 1)
+ {
+ wd->active = 0;
+ elm_index_active_set(data, 1);
+ }
+ _index_box_clear((Evas_Object *)data, wd->bx[0], 0);
+ evas_object_smart_calculate( wd->bx[0]);
+ elm_index_item_go((Evas_Object *)data, wd->level);
+ wd->pwidth = pw;
+ wd->pheight = ph;
+ }
+}
+
+static void _index_object_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+ Widget_Data *wd;
+ if(!data) return;
+ wd = elm_widget_data_get((Evas_Object *)data);
+ if(!wd) return;
+ ecore_job_add(_index_box_refill_job, (Evas_Object *)data);
+}
+
/**
* Add a new index to the parent
*
Evas *e;
Widget_Data *wd;
Evas_Coord minw, minh;
-
+ const char *string;
++
+ ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
- wd = ELM_NEW(Widget_Data);
- e = evas_object_evas_get(parent);
- if(!e) return NULL;
- obj = elm_widget_add(e);
ELM_SET_WIDTYPE(widtype, "index");
elm_widget_type_set(obj, "index");
elm_widget_sub_object_add(parent, obj);
elm_widget_data_set(obj, wd);
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_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);
+ elm_widget_can_focus_set(obj, EINA_FALSE);
wd->horizontal = EINA_FALSE;
+ wd->min_obj_height = 0;
+ wd->max_grp_size = 0;
+ wd->items_count = 0;
+ wd->max_supp_items_count = 0;
+ wd->tot_items_count[0] = 0;
+ wd->tot_items_count[1] = 0;
+ wd->hide_button = 0;
+ wd->special_char = edje_object_data_get(wd->base, "special_char");
+ if(wd->special_char == NULL) wd->special_char = eina_stringshare_add("*");
wd->base = edje_object_add(e);
_elm_theme_object_set(obj, wd->base, "index", "base/vertical", "default");
evas_object_show(wd->bx[1]);
}
- {
- wd->scale_factor = 1.0;
- }
+ evas_object_smart_callbacks_descriptions_set(obj, _signals);
+ wd->scale_factor = elm_scale_get();
+ if ( wd->scale_factor == 0.0 )
- _sizing_eval(obj);
++ wd->scale_factor = 1.0;
+ string = edje_object_data_get(wd->base, "min_1st_level_obj_height");
+ if(string)
+ wd->min_1st_level_obj_height = (int) (atoi(string))*wd->scale_factor;
+ else
+ wd->min_1st_level_obj_height = MIN_OBJ_HEIGHT*wd->scale_factor;
+ wd->popup_str[0] = calloc(1, sizeof(char) * 1);
+ wd->popup_str[1] = calloc(1, sizeof(char) * 1);
+
+ _mirrored_set(obj, elm_widget_mirrored_get(obj));
+ _sizing_eval(obj);
return obj;
}
+static int
+_group_count(Evas_Object *obj, int extraIndex, int adj_pos, int vis_pos)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return 0;
+ int group_count = MIN_GRP_SIZE;
+ while(group_count <= wd->max_grp_size)
+ {
+ if(extraIndex <= wd->max_grp_size*adj_pos)
+ {
+ if(group_count*adj_pos>=extraIndex) return group_count;
+ }
+ else
+ return wd->max_grp_size;
+
+ group_count += MIN_GRP_SIZE;
+ }
+ return group_count;
+}
++
+static void
+_index_process(Evas_Object *obj)
+{
+ int extraIndex;
+ int j,i, group_count;
+ Eina_List *l;
+ Elm_Index_Item *it;
+ int count;
+ int n;
+
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+
+ if (wd->items_count == 0) return;
+
+ const int adj_pos = (wd->items_count-1)*0.5;
+ if(wd->tot_items_count[wd->level] <= wd->max_supp_items_count)
+ n = wd->tot_items_count[wd->level];
+ else
+ n = wd->max_supp_items_count;
+ group_count = MIN_GRP_SIZE;
+
+ int *indx = (int*)calloc(n, sizeof(int));
+ if (!indx) return;
+
+ const int minh = wd->min_obj_height;
+ EINA_LIST_FOREACH(wd->items, l, it)
+ {
+ it->vis_letter = eina_stringshare_add(it->letter);
+ it->size = minh;
+ }
+ int remainder;
+ int numberofparts;
+ int N = wd->items_count;
+
+ for (i=0;i<n;i++)
+ {
+ indx[i] = minh;
+ }
+ extraIndex=n-N;
+ if (extraIndex < 0) return;
+
+ group_count = _group_count(obj, extraIndex, adj_pos, N);
+ if (group_count <= 0) return;
+
+ PlacementPart place[adj_pos];
+ remainder = extraIndex%group_count;
+ numberofparts=(extraIndex/group_count)+(remainder == 0? 0: 1);
+
+ for (i=0;i<numberofparts; i++)
+ {
+ place[i].count=group_count+1;
+ count = (int)(((float)(i+1)/(float)(numberofparts+1))*N);
+ place[i].start= count +i*group_count-1;
+ }
+ if (remainder)
+ place[numberofparts-1].count=remainder+1;
+
+ for (i=0;i<numberofparts;i++)
+ {
+ for (j=0;j<place[i].count; j++)
+ {
+ indx[((place[i].start)+j)]= MIN_PIXEL_VALUE;
+ }
+ indx[(place[i].start+(place[i].count)/2)] = minh-place[i].count+1;
+ }
+ count = 0;
+ EINA_LIST_FOREACH(wd->items, l, it)
+ {
+ int size = indx[count];
+ count++;
+ if (size == minh)
+ {
+ it->vis_letter = eina_stringshare_add(it->letter);
+ continue;
+ }
+ else if (size == 1)
+ {
+ eina_stringshare_del(it->vis_letter);
+ it->vis_letter = eina_stringshare_add("");
+ }
+ else
+ {
+ eina_stringshare_del(it->vis_letter);
+ it->vis_letter = eina_stringshare_add(wd->special_char);
+ }
+ it->size = size*wd->scale_factor;
+ }
+ if (indx)
+ {
+ free(indx);
+ indx = NULL;
+ }
+}
++
/**
* Set the active state of the index programatically
*
Elm_Index_Item *it;
if (!wd) return NULL;
EINA_LIST_FOREACH(wd->items, l, it)
- if ((it->selected) && (it->level == level)) return it->data;
- if ((it->selected) && (it->level == level))
- return elm_widget_item_data_get(it);
++ if ((it->selected) && (it->level == level))
++ return elm_widget_item_data_get(it);
return NULL;
}
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- if(level==0)
- _index_process(obj);
++ if(level == 0)
++ _index_process(obj);
_index_box_auto_fill(obj, wd->bx[0], 0);
if (wd->level == 1) _index_box_auto_fill(obj, wd->bx[1], 1);
}
}
/**
+ * Make the Central Button Image invisible.
+ *
+ * @param obj The Index.
+ * @param invisible Whether button visible or not.
+ * @return void.
+ *
+ * @ingroup Index
+ */
+EAPI void
+elm_index_button_image_invisible_set(Evas_Object *obj, Eina_Bool invisible)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ wd->hide_button = invisible;
+
+ edje_object_signal_emit(wd->base, "elm,state,button,image,hide", "elm");
+ return;
+}
+
++/**
+ * Set the function called when a index item is freed.
+ *
+ * @param it The item to set the callback on
+ * @param func The function called
+ *
+ * @ingroup Index
+ */
+ EAPI void
+ elm_index_item_del_cb_set(Elm_Index_Item *it, Evas_Smart_Cb func)
+ {
+ ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
+ elm_widget_item_del_cb_set(it, func);
+ }
+
+ /**
+ * Gets the letter of the item.
+ *
+ * @param it The list item
+ * @return The letter of @p it
+ *
+ * @ingroup Index
+ */
+ EAPI const char *
+ elm_index_item_letter_get(const Elm_Index_Item *it)
+ {
+ ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, NULL);
+ return it->letter;
+ }
+
}
/**
- * Set the ellipsis behavior of the label
++ * Set the wrapmode of the label
+ *
+ * @param obj The label object
- * @param ellipsis To ellipsis text or not
++ * @param wrapmode 0 is charwrap, 1 is wordwrap
+ * @ingroup Label
- */
++ * @deprecated
++*/
+EAPI void
- elm_label_ellipsis_set(Evas_Object *obj, Eina_Bool ellipsis)
++elm_label_wrap_mode_set(Evas_Object *obj,
++ Eina_Bool wrapmode)
+{
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- if (wd->ellipsis == ellipsis) return;
- wd->ellipsis = ellipsis;
- if (wd->linewrap) _theme_change(obj);
- edje_object_part_text_set(wd->lbl, "elm.text", wd->label);
- wd->changed = 1;
- _sizing_eval(obj);
++ return;
+}
+
+/**
- * Set the wrapmode of the label
+ * Set the ellipsis behavior of the label
*
* @param obj The label object
- * @param wrapmode 0 is charwrap, 1 is wordwrap
+ * @param ellipsis To ellipsis text or not
* @ingroup Label
*/
EAPI void
it->swipe_timer = ecore_timer_add(0.4, _swipe_cancel, it);
/* Always call the callbacks last - the user may delete our context! */
if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK)
-- {
-- evas_object_smart_callback_call(it->base.widget, SIG_CLICKED_DOUBLE, it);
- evas_object_smart_callback_call(it->base.widget, "clicked", it); // will be removed
-- }
++ evas_object_smart_callback_call(it->base.widget, SIG_CLICKED_DOUBLE, it);
wd->swipe = EINA_FALSE;
wd->movements = 0;
}
EAPI void
- #endif
- }
+elm_autocapitalization_allow_all_set(Eina_Bool on)
+{
+#ifdef HAVE_ELEMENTARY_X
+ static Ecore_X_Atom atom = 0;
+ unsigned int on_i = (unsigned int)on;
+
+ if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_AUTOCAPITAL_ALLOW");
+ ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
+ atom, &on_i, 1);
+
+EAPI void
+elm_autoperiod_allow_all_set(Eina_Bool on)
+{
+#ifdef HAVE_ELEMENTARY_X
+ static Ecore_X_Atom atom = 0;
+ unsigned int on_i = (unsigned int)on;
+
+ if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_AUTOPERIOD_ALLOW");
+ ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
+ atom, &on_i, 1);
+#endif
+}
+/**
+ * Adjust size of an element for finger usage
+ *
+ * This takes width and height sizes (in pixels) as input and a size multiple
+ * (which is how many fingers you want to place within the area), and adjusts
+ * the size tobe large enough to accommodate finger. On return the w and h
+ * sizes poiner do by these parameters will be modified.
+ *
+ * @param times_w How many fingers should fit horizontally
+ * @param w Pointer to the width size to adjust
+ * @param times_h How many fingers should fit vertically
+ * @param h Pointer to the height size to adjust
+ * @ingroup Fingers
+ */
+EAPI void
elm_coords_finger_size_adjust(int times_w,
Evas_Coord *w,
int times_h,
_eval_top(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
- Eina_Bool show_noanimate=EINA_TRUE;
++ Eina_Bool show_noanimate = EINA_TRUE;
Item *ittop;
if (!wd) return;
if (!wd->stack) return;
edje_object_part_swallow(wd->panes, "elm.swallow.left", wd->contents.left);
if (wd->contents.right)
edje_object_part_swallow(wd->panes, "elm.swallow.right", wd->contents.right);
- edje_object_signal_emit(wd->panes, "elm.panes.fixed", "elm");
+ if(wd->contents.left && wd->contents.right)
+ edje_object_signal_emit(wd->panes, "elm.panes.pair", "elm");
+ if(wd->fixed)
++ edje_object_signal_emit(wd->panes, "elm.panes.fixed", "elm");
+
edje_object_scale_set(wd->panes, elm_widget_scale_get(obj) *
_elm_config->scale);
_sizing_eval(obj);
elm_widget_del_hook_set(obj, _del_hook);
elm_widget_theme_hook_set(obj, _theme_hook);
elm_widget_focus_next_hook_set(obj, _elm_panes_focus_next_hook);
- wd->contents.left = NULL;
- wd->contents.right = NULL;
- elm_widget_can_focus_set(obj, EINA_FALSE);
wd->panes = edje_object_add(e);
_elm_theme_object_set(obj, wd->panes, "panes", "vertical", "default");
return content;
}
- EAPI double
+/**
+ * Get the relative normalized size of left/top content of the pane
+ *
+ * @param[in] obj The panes object
+ * @return The value of type double in the range [0.0,1.0]
+ *
+ * @ingroup Panes
+ */
+ EAPI double
elm_panes_content_left_size_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) 0.0;
else return w;
}
- EAPI void
+/**
+ * Set a size of the left/top content with a relative normalized double value
+ *
+ * @param[in] obj The panes object
+ * @param[in] size The value of type double in the range [0.0,1.0]
+ *
+ * @ingroup Panes
+ */
+ EAPI void
elm_panes_content_left_size_set(Evas_Object *obj, double size)
{
ELM_CHECK_WIDTYPE(obj, widtype);
edje_object_part_drag_value_set(wd->panes, "elm.bar", size, 0.0);
}
- EAPI void
+/**
+ * Set the type of an existing panes object to horizontal/vertical
+ *
+ * By default the panes is of vertical type
+ *
+ * @param[in] obj The panes object
+ * @param[in] horizontal Boolean value. If true, then the type is set to horizontal else vertical
+ *
+ * @ingroup Panes
+ */
+ EAPI void
elm_panes_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
{
ELM_CHECK_WIDTYPE(obj, widtype);
elm_panes_content_left_size_set(obj, 0.5);
}
- EAPI Eina_Bool
+/**
+ * Indicate if the type of pane object is horizontal or not
+ *
+ * @param[in] obj The panes object
+ * @return true if it is of horizontal type else false
+ *
+ * @ingroup Panes
+ */
+ EAPI Eina_Bool
elm_panes_horizontal_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
#define INF(...) EINA_LOG_DOM_INFO(_elm_log_dom, __VA_ARGS__)
#define DBG(...) EINA_LOG_DOM_DBG (_elm_log_dom, __VA_ARGS__)
+#define E_(string) dgettext(PACKAGE, string)
+
++// els_pan.h
+Evas_Object *_elm_smart_pan_add (Evas *evas);
+void _elm_smart_pan_child_set (Evas_Object *obj, Evas_Object *child);
+Evas_Object *_elm_smart_pan_child_get (Evas_Object *obj);
+void _elm_smart_pan_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
+void _elm_smart_pan_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
+void _elm_smart_pan_max_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
+void _elm_smart_pan_min_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
+void _elm_smart_pan_child_size_get (Evas_Object *obj, Evas_Coord *w, Evas_Coord *h);
+
++// els_scroller.h
+typedef enum _Elm_Smart_Scroller_Policy
+{
+ ELM_SMART_SCROLLER_POLICY_AUTO,
+ ELM_SMART_SCROLLER_POLICY_ON,
+ ELM_SMART_SCROLLER_POLICY_OFF
+}
+Elm_Smart_Scroller_Policy;
+
+Evas_Object *elm_smart_scroller_add (Evas *evas);
+void elm_smart_scroller_child_set (Evas_Object *obj, Evas_Object *child);
+void elm_smart_scroller_extern_pan_set (Evas_Object *obj, Evas_Object *pan, void (*pan_set) (Evas_Object *obj, Evas_Coord x, Evas_Coord y), void (*pan_get) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y), void (*pan_max_get) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y), void (*pan_min_get) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y), void (*pan_child_size_get) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y));
+void elm_smart_scroller_custom_edje_file_set (Evas_Object *obj, char *file, char *group);
+void elm_smart_scroller_child_pos_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
+void elm_smart_scroller_child_pos_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
+void elm_smart_scroller_child_region_show (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
++void elm_smart_scroller_child_region_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
+void elm_smart_scroller_child_viewport_size_get (Evas_Object *obj, Evas_Coord *w, Evas_Coord *h);
+void elm_smart_scroller_step_size_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
+void elm_smart_scroller_step_size_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
+void elm_smart_scroller_page_size_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
+void elm_smart_scroller_page_size_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
+void elm_smart_scroller_policy_set (Evas_Object *obj, Elm_Smart_Scroller_Policy hbar, Elm_Smart_Scroller_Policy vbar);
+void elm_smart_scroller_policy_get (Evas_Object *obj, Elm_Smart_Scroller_Policy *hbar, Elm_Smart_Scroller_Policy *vbar);
+Evas_Object *elm_smart_scroller_edje_object_get (Evas_Object *obj);
+void elm_smart_scroller_single_dir_set (Evas_Object *obj, Eina_Bool single_dir);
+Eina_Bool elm_smart_scroller_single_dir_get (Evas_Object *obj);
+void elm_smart_scroller_object_theme_set (Evas_Object *parent, Evas_Object *obj, const char *clas, const char *group, const char *style);
++void elm_smart_scroller_mirrored_set (Evas_Object *obj, Eina_Bool mirrored);
+void elm_smart_scroller_hold_set (Evas_Object *obj, Eina_Bool hold);
+void elm_smart_scroller_freeze_set (Evas_Object *obj, Eina_Bool freeze);
+void elm_smart_scroller_bounce_allow_set (Evas_Object *obj, Eina_Bool horiz, Eina_Bool vert);
+void elm_smart_scroller_bounce_allow_get (const Evas_Object *obj, Eina_Bool *horiz, Eina_Bool *vert);
+void elm_smart_scroller_paging_set (Evas_Object *obj, double pagerel_h, double pagerel_v, Evas_Coord pagesize_h, Evas_Coord pagesize_v);
+void elm_smart_scroller_paging_get (Evas_Object *obj, double *pagerel_h, double *pagerel_v, Evas_Coord *pagesize_h, Evas_Coord *pagesize_v);
+void elm_smart_scroller_region_bring_in (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
+void elm_smart_scroller_widget_set (Evas_Object *obj, Evas_Object *wid);
+Eina_Bool elm_smart_scroller_momentum_animator_disabled_get (Evas_Object *obj);
+void elm_smart_scroller_momentum_animator_disabled_set (Evas_Object *obj, Eina_Bool disabled);
+void elm_smart_scroller_bounce_animator_disabled_set (Evas_Object *obj, Eina_Bool disabled);
+Eina_Bool elm_smart_scroller_bounce_animator_disabled_get (Evas_Object *obj);
++Eina_Bool elm_smart_scroller_wheel_disabled_get (Evas_Object *obj);
++void elm_smart_scroller_wheel_disabled_set (Evas_Object *obj, Eina_Bool disabled);
+
++// els_box.h
+void _els_box_layout(Evas_Object *o, Evas_Object_Box_Data *priv, int horizontal, int homogeneous, int rtl);
+
++// els_icon.h
+Evas_Object *_els_smart_icon_add (Evas *evas);
+Eina_Bool _els_smart_icon_file_key_set (Evas_Object *obj, const char *file, const char *key);
+Eina_Bool _els_smart_icon_file_edje_set (Evas_Object *obj, const char *file, const char *part);
+void _els_smart_icon_file_get (const Evas_Object *obj, const char **file, const char **key);
+void _els_smart_icon_smooth_scale_set (Evas_Object *obj, Eina_Bool smooth);
+Eina_Bool _els_smart_icon_smooth_scale_get (const Evas_Object *obj);
+Evas_Object *_els_smart_icon_object_get (const Evas_Object *obj);
+void _els_smart_icon_size_get (const Evas_Object *obj, int *w, int *h);
+void _els_smart_icon_fill_inside_set (Evas_Object *obj, Eina_Bool fill_inside);
+Eina_Bool _els_smart_icon_fill_inside_get (const Evas_Object *obj);
+void _els_smart_icon_scale_up_set (Evas_Object *obj, Eina_Bool scale_up);
+Eina_Bool _els_smart_icon_scale_up_get (const Evas_Object *obj);
+void _els_smart_icon_scale_down_set (Evas_Object *obj, Eina_Bool scale_down);
+Eina_Bool _els_smart_icon_scale_down_get (const Evas_Object *obj);
+void _els_smart_icon_scale_size_set (Evas_Object *obj, int size);
+int _els_smart_icon_scale_size_get (const Evas_Object *obj);
+void _els_smart_icon_scale_set (Evas_Object *obj, double scale);
+double _els_smart_icon_scale_get (const Evas_Object *obj);
+void _els_smart_icon_orient_set (Evas_Object *obj, Elm_Image_Orient orient);
+Elm_Image_Orient _els_smart_icon_orient_get (const Evas_Object *obj);
+void _els_smart_icon_edit_set (Evas_Object *obj, Eina_Bool, Evas_Object *parent);
+Eina_Bool _els_smart_icon_edit_get (const Evas_Object *obj);
+Evas_Object *_els_smart_icon_edje_get(Evas_Object *obj);
++void _els_smart_icon_aspect_ratio_retained_set(Evas_Object *obj, Eina_Bool retained);
++Eina_Bool _els_smart_icon_aspect_ratio_retained_get(const Evas_Object *obj);
++
+ #ifdef ENABLE_NLS
+ # include <libintl.h>
+ # define E_(string) dgettext(PACKAGE, string)
+ #else
+ # define bindtextdomain(domain,dir)
+ # define E_(string) (string)
+ #endif
typedef struct _Elm_Config Elm_Config;
double zoom_friction;
unsigned char thumbscroll_bounce_enable;
double thumbscroll_border_friction;
+ double scroll_smooth_time_interval;
+ double scroll_smooth_amount;
+ double scroll_smooth_history_weight;
+ double scroll_smooth_future_time;
+ double scroll_smooth_time_window;
double scale;
int bgpixmap;
int compositing;
double longpress_timeout;
unsigned char effect_enable;
unsigned char desktop_entry;
-
Eina_Bool is_mirrored : 1;
-
- int input_panel_enable;
- int autocapital_allow;
- int autoperiod_allow;
- Eina_Bool password_show_last_character;
+ Eina_Bool password_show_last;
+ double password_show_last_timeout;
++ int input_panel_enable;
++ int autocapital_allow;
++ int autoperiod_allow;
};
struct _Elm_Module
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
- return evas_object_propagate_events_get(wd->scr);
+ return elm_smart_scroller_propagate_events_get(wd->scr);
+}
+
+EAPI void
+elm_scroller_page_move_set(Evas_Object *obj, Eina_Bool set)
+{
+ return ;
- }
+ }
/**
* @defgroup SegmentControl SegmentControl
++ * @ingroup Elementary
*
* SegmentControl Widget is a horizontal control made of multiple segment items,
* each segment item functioning similar to discrete two state button. A segment
edje_object_signal_emit(it->base.view, "elm,state,segment,selected", "elm");
wd->selected_item = it;
- evas_object_smart_callback_call(wd->obj, SIG_CHANGED, (void*) it->seg_index);
- evas_object_smart_callback_call(wd->obj, SIG_CHANGED, (void *)(unsigned long)it->seg_index);
++ evas_object_smart_callback_call(wd->obj, SIG_CHANGED,
++ (void *)(unsigned long)it->seg_index);
}
static void
it = _item_new(obj, icon, label);
if (!it) return NULL;
- it_rel = _item_find(obj, index);
+ it_rel = _item_find(obj, idx);
++
if (it_rel)
wd->seg_items = eina_list_prepend_relative(wd->seg_items, it, it_rel);
else
wd = elm_widget_data_get(obj);
if (!wd) return;
- it = _item_find(obj, index);
+ it = _item_find(obj, idx);
++
if (!it) return;
_item_free(it);
_update_list(wd);
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Elm_Segment_Item *it;
- it = _item_find(obj, index);
+ it = _item_find(obj, idx);
++
if (it) return it->label;
return NULL;
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Elm_Segment_Item *it;
- it = _item_find(obj, index);
+ it = _item_find(obj, idx);
++
if (it) return it->icon;
return NULL;
}
edje_object_part_drag_value_set(wd->slider, "elm.dragable.slider", button_x, button_y);
evas_event_feed_mouse_cancel(e, 0, NULL);
+ wd->feed_cnt ++;
+ if(wd->feed_cnt < 3)
evas_event_feed_mouse_down(e, 1, EVAS_BUTTON_NONE, 0, NULL);
+ wd->feed_cnt = 0;
}
+ static void
+ _elm_slider_label_set(Evas_Object *obj, const char *item, const char *label)
+ {
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (item) return;
+ if (!wd) return;
+ eina_stringshare_replace(&wd->label, label);
+ if (label)
+ {
+ edje_object_signal_emit(wd->slider, "elm,state,text,visible", "elm");
+ edje_object_message_signal_process(wd->slider);
+ }
+ else
+ {
+ edje_object_signal_emit(wd->slider, "elm,state,text,hidden", "elm");
+ edje_object_message_signal_process(wd->slider);
+ }
+ edje_object_part_text_set(wd->slider, "elm.text", label);
+ _sizing_eval(obj);
+ }
+
+ static const char *
+ _elm_slider_label_get(const Evas_Object *obj, const char *item)
+ {
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (item) return NULL;
+ if (!wd) return NULL;
+ return wd->label;
+ }
+
/**
* Add a new slider to the parent
*
}
/**
-- * Set the format function pointer for the inducator area
++ * Set the format function pointer for the indicator area
*
* Set the callback function to format the indicator string.
* See elm_slider_indicator_format_set() for more info on how this works.
}
}
- /**
- * Copy the theme fom the source to the destination theme
- *
- * @param th The source theme to copy from
- * @param thdst The destination theme to copy data to
- *
- * This makes a one-time static copy of all the theme config, extensions
- * and overlays from @p th to @p thdst. If @p th references a theme, then
- * @p thdst is also set to reference it, with all the theme settings,
- * overlays and extensions that @p th had.
- */
- EAPI void
- elm_theme_copy(Elm_Theme *th, Elm_Theme *thdst)
- {
- const Eina_List *l;
- const char *f;
-
- if (!th) th = &(theme_default);
- if (!thdst) thdst = &(theme_default);
- _elm_theme_clear(thdst);
- if (th->ref_theme)
- {
- thdst->ref_theme = th->ref_theme;
- thdst->ref_theme->referrers =
- eina_list_append(thdst->ref_theme->referrers, thdst);
- thdst->ref_theme->ref++;
- }
- EINA_LIST_FOREACH(th->overlay, l, f)
- {
- const char *s = eina_stringshare_add(f);
- if (s) thdst->overlay = eina_list_append(thdst->overlay, s);
- }
- EINA_LIST_FOREACH(th->themes, l, f)
- {
- const char *s = eina_stringshare_add(f);
- if (s) thdst->themes = eina_list_append(thdst->themes, s);
- }
- EINA_LIST_FOREACH(th->extension, l, f)
- {
- const char *s = eina_stringshare_add(f);
- if (s) thdst->extension = eina_list_append(thdst->extension, s);
- }
- if (th->theme) thdst->theme = eina_stringshare_add(th->theme);
- elm_theme_flush(thdst);
- }
-
- /**
- * Tell the source theme to reference the ref theme
- *
- * @param th The theme that will do the referencing
- * @param thref The theme that is the reference source
- *
- * This clears @p th to be empty and then sets it to refer to @p thref
- * so @p th acts as an override to @p thdst, but where its overrides
- * don't apply, it will fall through to @pthref for configuration.
- */
EAPI void
-elm_theme_copy(Elm_Theme *th, Elm_Theme *thdst)
-{
- const Eina_List *l;
- const char *f;
-
- if (!th) th = &(theme_default);
- if (!thdst) thdst = &(theme_default);
- _elm_theme_clear(thdst);
- if (th->ref_theme)
- {
- thdst->ref_theme = th->ref_theme;
- thdst->ref_theme->referrers =
- eina_list_append(thdst->ref_theme->referrers, thdst);
- thdst->ref_theme->ref++;
- }
- EINA_LIST_FOREACH(th->overlay, l, f)
- {
- const char *s = eina_stringshare_add(f);
- if (s) thdst->overlay = eina_list_append(thdst->overlay, s);
- }
- EINA_LIST_FOREACH(th->themes, l, f)
- {
- const char *s = eina_stringshare_add(f);
- if (s) thdst->themes = eina_list_append(thdst->themes, s);
- }
- EINA_LIST_FOREACH(th->extension, l, f)
- {
- const char *s = eina_stringshare_add(f);
- if (s) thdst->extension = eina_list_append(thdst->extension, s);
- }
- if (th->theme) thdst->theme = eina_stringshare_add(th->theme);
- elm_theme_flush(thdst);
-}
-
-EAPI void
elm_theme_ref_set(Elm_Theme *th, Elm_Theme *thref)
{
if (!th) th = &(theme_default);
elm_theme_flush(th);
}
- /**
- * Delete a theme overlay from the list of overlays
- *
- * @param th The theme to delete from, or if NULL, the default theme
- * @param item The name of the theme overlay
- *
- * See elm_theme_overlay_add().
- *
- * @ingroup Theme
- */
- EAPI void
- elm_theme_overlay_del(Elm_Theme *th, const char *item)
- {
- const Eina_List *l;
- const char *f, *s;
-
- if (!th) th = &(theme_default);
- s = eina_stringshare_add(item);
- EINA_LIST_FOREACH(th->overlay, l, f)
- if (f == s)
- {
- eina_stringshare_del(f);
- th->overlay = eina_list_remove_list(th->overlay, (Eina_List *)l);
- break;
- }
- eina_stringshare_del(s);
- elm_theme_flush(th);
- }
-
- /**
- * Appends a theme extension to the list of extensions.
- *
- * @param th The theme to add to, or if NULL, the default theme
- * @param item The Edje file path to be used
- *
- * This is intended when an application needs more styles of widgets or new
- * widget themes that the default does not provide (or may not provide). The
- * application has "extended" usage by coming up with new custom style names
- * for widgets for specific uses, but as these are not "standard", they are
- * not guaranteed to be provided by a default theme. This means the
- * application is required to provide these extra elements itself in specific
- * Edje files. This call adds one of those Edje files to the theme search
- * path to be search after the default theme. The use of this call is
- * encouraged when default styles do not meet the needs of the application.
- * Use this call instead of elm_theme_overlay_add() for almost all cases.
- *
- * @ingroup Theme
- */
EAPI void
-elm_theme_overlay_del(Elm_Theme *th, const char *item)
-{
- const Eina_List *l;
- const char *f, *s;
-
- if (!th) th = &(theme_default);
- s = eina_stringshare_add(item);
- EINA_LIST_FOREACH(th->overlay, l, f)
- if (f == s)
- {
- eina_stringshare_del(f);
- th->overlay = eina_list_remove_list(th->overlay, (Eina_List *)l);
- break;
- }
- eina_stringshare_del(s);
- elm_theme_flush(th);
-}
-
-EAPI void
elm_theme_extension_add(Elm_Theme *th, const char *item)
{
const char *f = eina_stringshare_add(item);
Evas_Object *child, *ret, *best;
API_ENTRY return NULL;
-- if (!evas_object_visible_get(obj)) return NULL;
++
++ if ((!evas_object_visible_get(obj)) || (elm_widget_disabled_get(obj)))
++ return NULL;
++
best = NULL;
if (*newest_focus_order < sd->focus_order)
{
if (!sd->size)
evas_object_image_load_size_set(sd->obj, sd->size, sd->size);
evas_object_image_file_set(sd->obj, file, key);
- /* by default preload off by seok.j.jeong */
- sd->preloading = EINA_FALSE;
- sd->preloading = EINA_TRUE;
++ // NOTE: Do not merge upstream for sd->preloading.
++ sd->preloading = EINA_FALSE; // by default preload off by seok.j.jeong
sd->show = EINA_TRUE;
- evas_object_hide(sd->obj);
- evas_object_image_preload(sd->obj, EINA_FALSE);
++ // NOTE: Do not merge upstream for sd->preloading.
+ if (sd->preloading)
+ evas_object_image_preload(sd->obj, EINA_FALSE);
- /* sd->preloading can be changed by above function. so add "if (sd->preloading)" as below */
- if (sd->preloading)
++ // NOTE: Do not merge upstream for sd->preloading.
++ if (sd->preloading) // sd->preloading can be changed by above function. so add "if (sd->preloading)" as below
+ evas_object_hide(sd->obj);
if (evas_object_image_load_error_get(sd->obj) != EVAS_LOAD_ERROR_NONE)
- return EINA_FALSE;
+ {
+ ERR("Things are going bad for '%s' (%p)", file, sd->obj);
+ return EINA_FALSE;
+ }
_smart_reconfigure(sd);
return EINA_TRUE;
}
unsigned char bouncemey : 1;
unsigned char bounce_horiz : 1;
unsigned char bounce_vert : 1;
- unsigned char momentum_animator_disabled :1;
- unsigned char bounce_animator_disabled :1;
- Eina_Bool is_mirrored : 1;
+ unsigned char event_propagation :1;
+ Eina_Bool momentum_animator_disabled :1;
+ Eina_Bool bounce_animator_disabled :1;
+ Eina_Bool is_mirrored : 1;
Eina_Bool wheel_disabled : 1;
};
_smart_bounce_y_animator(void *data)
{
Smart_Data *sd;
+ Evas_Coord x, y, dy, py, h, ody, ed, md;
+ double t, p, dt, pd, r;
+ Evas_Coord x, y, dy;
+ double t, p, dt;
sd = data;
t = ecore_loop_time_get();