group { name: "elm/scroller/base/default";
alias: "elm/list/base/default";
alias: "elm/genlist/base/default";
- alias: "elm/carousel/base/default";
alias: "elm/gengrid/base/default";
data {
tag: "preedit" "+ underline=on underline_color=#000";
tag: "preedit_sel" "+ backing=on backing_color=#000 color=#FFFFFF";
}
+ style { name: "entry_textblock_guide_style";
+ base: "font=Sans font_size=10 color=#00000040 wrap=word text_class=entry left_margin=4 right_margin=4 ellipsis=0.0";
+ tag: "em" "+ font_style=Oblique";
+ tag: "hilight" "+ font_weight=Bold";
+ }
}
data {
// item: context_menu_orientation "horizontal";
}
parts {
+ part { name: "elm.guide";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.to: "elm.text";
+ rel2.to: "elm.text";
+ text {
+ style: "entry_textblock_guide_style";
+ min: 0 1;
+ align: 0.0 0.0;
+ }
+ }
+ description { state: "hidden" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
part { name: "elm.text";
type: TEXTBLOCK;
mouse_events: 1;
action: STATE_SET "default" 0.0;
target: "elm.text";
}
+ program { name: "gdisable";
+ signal: "elm,guide,disabled";
+ source: "elm";
+ action: STATE_SET "hidden" 0.0;
+ target: "elm.guide";
+ }
+ program { name: "genable";
+ signal: "elm,guide,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.guide";
+ }
}
}
tag: "preedit" "+ underline=on underline_color=#000";
tag: "preedit_sel" "+ backing=on backing_color=#000 color=#FFFFFF";
}
+ style { name: "entry_textblock_guide_style_mixedwrap";
+ base: "font=Sans font_size=10 color=#00000040 wrap=mixed text_class=entry left_margin=4 right_margin=4 ellipsis=0.0";
+ tag: "em" "+ font_style=Oblique";
+ tag: "hilight" "+ font_weight=Bold";
+ }
}
parts {
+ part { name: "elm.guide";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.to: "elm.text";
+ rel2.to: "elm.text";
+ text {
+ style: "entry_textblock_guide_style_mixedwrap";
+ min: 0 1;
+ align: 0.0 0.0;
+ }
+ }
+ description { state: "hidden" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
part { name: "elm.text";
description { state: "default" 0.0;
fixed: 1 0;
tag: "preedit" "+ underline=on underline_color=#000";
tag: "preedit_sel" "+ backing=on backing_color=#000 color=#FFFFFF";
}
+ style { name: "entry_textblock_guide_style_charwrap";
+ base: "font=Sans font_size=10 color=#00000040 wrap=char text_class=entry left_margin=4 right_margin=4 ellipsis=0.0";
+ tag: "em" "+ font_style=Oblique";
+ tag: "hilight" "+ font_weight=Bold";
+ }
}
parts {
+ part { name: "elm.guide";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.to: "elm.text";
+ rel2.to: "elm.text";
+ text {
+ style: "entry_textblock_guide_style_charwrap";
+ min: 0 1;
+ align: 0.0 0.0;
+ }
+ }
+ description { state: "hidden" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
part { name: "elm.text";
description { state: "default" 0.0;
fixed: 1 0;
group { name: "elm/entry/base-nowrap/default";
inherit: "elm/entry/base/default";
parts {
+ part { name: "elm.guide";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.to: "elm.text";
+ rel2.to: "elm.text";
+ text {
+ style: "entry_textblock_guide_style";
+ min: 0 1;
+ align: 0.0 0.0;
+ }
+ }
+ description { state: "hidden" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
part { name: "elm.text";
description { state: "default" 0.0;
text {
tag: "preedit" "+ underline=on underline_color=#000";
tag: "preedit_sel" "+ backing=on backing_color=#000 color=#FFFFFF";
}
+ style { name: "entry_single_textblock_guide_style";
+ base: "font=Sans font_size=10 color=#00000080 wrap=none text_class=entry left_margin=4 right_margin=4 ellipsis=0.0";
+ tag: "em" "+ font_style=Oblique";
+ tag: "hilight" "+ font_weight=Bold";
+ }
}
parts {
+ part { name: "elm.guide";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.to: "elm.text";
+ rel2.to: "elm.text";
+ text {
+ style: "entry_single_textblock_guide_style";
+ min: 0 1;
+ align: 0.0 0.0;
+ }
+ }
+ description { state: "hidden" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
part { name: "elm.text";
multiline: 0;
description { state: "default" 0.0;
group { name: "elm/entry/base-password/default";
inherit: "elm/entry/base/default";
parts {
+ part { name: "elm.guide";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.to: "elm.text";
+ rel2.to: "elm.text";
+ text {
+ style: "entry_single_textblock_guide_style";
+ min: 0 1;
+ align: 0.0 0.0;
+ }
+ }
+ description { state: "hidden" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
part { name: "elm.text";
entry_mode: PASSWORD;
multiline: 0;
alias: "elm/list/base/default";
alias: "elm/genlist/base/default";
- alias: "elm/carousel/base/default";
alias: "elm/gengrid/base/default";
alias: "elm/scroller/base/map_bubble";
alias: "elm/genscroller/base/default";
+
+#define _GNU_SOURCE
+#include <string.h>
#include <Elementary.h>
#include "test.h"
#ifdef HAVE_CONFIG_H
void test_web_mobile(void *data, Evas_Object *obj, void *event_info);
#endif
+Evas_Object *win, *tbx; // TODO: refactoring
+void *tt;
+Eina_List *tests;
+
struct elm_test
{
const char *icon;
}
static void
-_menu_create(Evas_Object *win, Evas_Object *tbx, void **tt, Eina_List *tests, const char *option_str __UNUSED__)
+_menu_create(const char *option_str)
{
struct elm_test *t = NULL;
const char *pcat = NULL;
Evas_Object *cfr = NULL, *tbx2 = NULL, *bt = NULL, *ic = NULL;
char buf[PATH_MAX];
+ Eina_List *l;
- EINA_LIST_FREE(tests, t)
+ elm_box_clear(tbx);
+ EINA_LIST_FOREACH(tests, l, t)
{
+ if (option_str && !strcasestr(t->name, option_str)) continue;
if ((!pcat) || (strcmp(pcat, t->category)))
{
cfr = elm_frame_add(win);
evas_object_show(bt);
evas_object_smart_callback_add(bt, "clicked", t->cb, NULL);
pcat = t->category;
- if (t == *tt) *tt = cfr;
- free(t);
+ if (t == tt) tt = cfr;
}
}
static void
+_entry_activated_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
+{
+ const char *str = elm_entry_entry_get(obj);
+ if (!str) return;
+ _menu_create(str);
+}
+
+static void
+_btn_clicked_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+ const char *str = elm_entry_entry_get(data);
+ if (!str) return;
+ _menu_create(str);
+}
+
+static void
my_win_main(char *autorun, Eina_Bool test_win_only)
{
- Evas_Object *win = NULL, *bg = NULL, *bx0 = NULL, *lb = NULL;
- Evas_Object *fr = NULL, *tg = NULL, *sc = NULL, *tbx = NULL;
- Eina_List *tests, *l;
+ Evas_Object *bg = NULL, *bx0 = NULL, *bx1 = NULL, *lb = NULL;
+ Evas_Object *fr = NULL, *tg = NULL, *sc = NULL, *en = NULL;
+ Evas_Object *btn = NULL;
+ Eina_List *l;
struct elm_test *t = NULL;
- void *tt;
if (test_win_only) goto add_tests;
/* Create an elm window - It returns an evas object. This is a little
elm_box_pack_end(bx0, tg);
evas_object_show(tg);
+ bx1 = elm_box_add(win);
+ elm_box_horizontal_set(bx1, EINA_TRUE);
+ evas_object_size_hint_weight_set(bx1, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(bx1, EVAS_HINT_FILL, 0.0);
+ elm_box_pack_end(bx0, bx1);
+ evas_object_show(bx1);
+
+ lb = elm_label_add(win);
+ elm_object_text_set(lb, " Search Menu :");
+ evas_object_size_hint_weight_set(en, 0.0, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(en, 0.0, EVAS_HINT_FILL);
+ elm_box_pack_end(bx1, lb);
+ evas_object_show(lb);
+
+ en = elm_entry_add(win);
+ elm_entry_single_line_set(en, EINA_TRUE);
+ elm_entry_scrollable_set(en, EINA_TRUE);
+ evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_smart_callback_add(en, "activated", _entry_activated_cb, NULL);
+ elm_box_pack_end(bx1, en);
+ evas_object_show(en);
+ elm_object_focus_set(en, EINA_TRUE);
+
+ btn = elm_button_add(win);
+ elm_object_text_set(btn, "Go");
+ evas_object_smart_callback_add(btn, "clicked", _btn_clicked_cb, en);
+ elm_box_pack_end(bx1, btn);
+ evas_object_show(btn);
+
sc = elm_scroller_add(win);
elm_scroller_bounce_set(sc, EINA_FALSE, EINA_TRUE);
evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
}
if (tests)
- _menu_create(win, tbx, &tt, tests, NULL);
+ _menu_create(NULL);
/* set an initial window size */
evas_object_resize(win, 480, 480);
"<item size=16x16 vsize=full href=emoticon/happy-panting></item>"
" (before this)<br/>"
- "And as well (absize + ascent): "
- "<item absize=64x64 vsize=ascent href=emoticon/knowing-grin></item>"
- " (full) "
- "<item absize=64x64 vsize=full href=emoticon/not-impressed></item>"
- " or even paths to image files on disk too like: "
- "<item absize=96x128 vsize=full href=file://%s/images/sky_01.jpg></item>"
- " ... end."
- , elm_app_data_dir_get()
- );
+ "And as well (absize + ascent): "
+ "<item absize=64x64 vsize=ascent href=emoticon/knowing-grin></item>"
+ " (full) "
+ "<item absize=64x64 vsize=full href=emoticon/not-impressed></item>"
+ " or even paths to image files on disk too like: "
+ "<item absize=96x128 vsize=full href=file://%s/images/sky_01.jpg></item>"
+ " ... end."
+ , elm_app_data_dir_get()
+ );
elm_object_text_set(en, buf);
evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
bt = elm_icon_add(win);
elm_icon_standard_set(bt, "home");
evas_object_size_hint_min_set(bt, 48, 48);
- evas_object_color_set(bt, 255, 0, 0, 128);
+ evas_object_color_set(bt, 128, 0, 0, 128);
evas_object_show(bt);
elm_object_part_content_set(en3, "icon", bt);
bt = elm_icon_add(win);
elm_icon_standard_set(bt, "delete");
- evas_object_color_set(bt, 255, 0, 0, 128);
+ evas_object_color_set(bt, 128, 0, 0, 128);
evas_object_size_hint_min_set(bt, 48, 48);
evas_object_show(bt);
elm_object_part_content_set(en3, "end", bt);
evas_object_show(rect);
en4 = elm_entry_add(win);
+ elm_object_part_text_set(en4, "guide", "Type in here");
elm_entry_scrollable_set(en4, EINA_TRUE);
elm_entry_bounce_set(en4, EINA_TRUE, EINA_TRUE);
elm_entry_autocapital_type_set(en4, EINA_TRUE);
#endif
#ifdef EAPI
-#undef EAPI
+# undef EAPI
#endif
#ifdef _WIN32
-#ifdef ELEMENTARY_BUILD
-#ifdef DLL_EXPORT
-#define EAPI __declspec(dllexport)
+# ifdef ELEMENTARY_BUILD
+# ifdef DLL_EXPORT
+# define EAPI __declspec(dllexport)
+# else
+# define EAPI
+# endif /* ! DLL_EXPORT */
+# else
+# define EAPI __declspec(dllimport)
+# endif /* ! EFL_EVAS_BUILD */
#else
-#define EAPI
-#endif /* ! DLL_EXPORT */
-#else
-#define EAPI __declspec(dllimport)
-#endif /* ! EFL_EVAS_BUILD */
-#else
-#ifdef __GNUC__
-#if __GNUC__ >= 4
-#define EAPI __attribute__ ((visibility("default")))
-#else
-#define EAPI
-#endif
-#else
-#define EAPI
-#endif
+# ifdef __GNUC__
+# if __GNUC__ >= 4
+# define EAPI __attribute__ ((visibility("default")))
+# else
+# define EAPI
+# endif
+# else
+# define EAPI
+# endif
#endif /* ! _WIN32 */
#ifdef _WIN32
-#define EAPI_MAIN
+# define EAPI_MAIN
#else
-#define EAPI_MAIN EAPI
+# define EAPI_MAIN EAPI
#endif
/* allow usage from c++ */
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
if (elm_widget_disabled_get(obj)) return EINA_FALSE;
if (!wd->video) return EINA_FALSE;
- if ((!strcmp(ev->keyname, "Left")) || (!strcmp(ev->keyname, "KP_Left")))
+ if ((!strcmp(ev->keyname, "Left")) ||
+ ((!strcmp(ev->keyname, "KP_Left")) && (!ev->string)))
{
double current, last;
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
}
- if ((!strcmp(ev->keyname, "Right")) || (!strcmp(ev->keyname, "KP_Right")))
+ if ((!strcmp(ev->keyname, "Right")) ||
+ ((!strcmp(ev->keyname, "KP_Right")) && (!ev->string)))
{
double current, last;
if (!wd->selection_enabled) return EINA_FALSE;
if ((!strcmp(ev->keyname, "Left")) ||
- (!strcmp(ev->keyname, "KP_Left")))
+ ((!strcmp(ev->keyname, "KP_Left")) && (!ev->string)))
{
_update_sel_it(obj, wd->selected_it-1);
}
else if ((!strcmp(ev->keyname, "Right")) ||
- (!strcmp(ev->keyname, "KP_Right")))
+ ((!strcmp(ev->keyname, "KP_Right")) && (!ev->string)))
{
_update_sel_it(obj, wd->selected_it+1);
}
else if ((!strcmp(ev->keyname, "Up")) ||
- (!strcmp(ev->keyname, "KP_Up")))
+ ((!strcmp(ev->keyname, "KP_Up")) && (!ev->string)))
{
_update_sel_it(obj, wd->selected_it-ELM_DAY_LAST);
}
else if ((!strcmp(ev->keyname, "Down")) ||
- (!strcmp(ev->keyname, "KP_Down")))
+ ((!strcmp(ev->keyname, "KP_Down")) && (!ev->string)))
{
_update_sel_it(obj, wd->selected_it+ELM_DAY_LAST);
}
else if ((!strcmp(ev->keyname, "Prior")) ||
- (!strcmp(ev->keyname, "KP_Prior")))
+ ((!strcmp(ev->keyname, "KP_Prior")) && (!ev->string)))
{
if (_update_month(obj, -1)) _populate(obj);
}
else if ((!strcmp(ev->keyname, "Next")) ||
- (!strcmp(ev->keyname, "KP_Next")))
+ ((!strcmp(ev->keyname, "KP_Next")) && (!ev->string)))
{
if (_update_month(obj, 1)) _populate(obj);
}
return EINA_TRUE;
}
- if ((!strcmp(ev->keyname, "Left")) || (!strcmp(ev->keyname, "KP_Left")) ||
- (!strcmp(ev->keyname, "Up")) || (!strcmp(ev->keyname, "KP_Up")))
+ if ((!strcmp(ev->keyname, "Left")) ||
+ ((!strcmp(ev->keyname, "KP_Left")) && (!ev->string)) ||
+ (!strcmp(ev->keyname, "Up")) ||
+ ((!strcmp(ev->keyname, "KP_Up")) && (!ev->string)))
{
l = wd->selected_item->node->prev;
if ((!l) && (wd->round))
l = eina_list_last(wd->items);
}
- else if ((!strcmp(ev->keyname, "Right")) || (!strcmp(ev->keyname, "KP_Right")) ||
- (!strcmp(ev->keyname, "Down")) || (!strcmp(ev->keyname, "KP_Down")))
+ else if ((!strcmp(ev->keyname, "Right")) ||
+ ((!strcmp(ev->keyname, "KP_Right")) && (!ev->string)) ||
+ (!strcmp(ev->keyname, "Down")) ||
+ ((!strcmp(ev->keyname, "KP_Down")) && (!ev->string)))
{
l = wd->selected_item->node->next;
if ((!l) && (wd->round))
l = wd->items;
}
- else if ((!strcmp(ev->keyname, "Home")) || (!strcmp(ev->keyname, "KP_Home")))
+ else if ((!strcmp(ev->keyname, "Home")) ||
+ ((!strcmp(ev->keyname, "KP_Home")) && (!ev->string)))
l = wd->items;
- else if ((!strcmp(ev->keyname, "End")) || (!strcmp(ev->keyname, "KP_End")))
+ else if ((!strcmp(ev->keyname, "End")) ||
+ ((!strcmp(ev->keyname, "KP_End")) && (!ev->string)))
l = eina_list_last(wd->items);
else return EINA_FALSE;
*/
/**
- * @enum _Elm_Text_Format
* @typedef Elm_Text_Format
*
* Text Format types.
} Elm_Text_Format;
/**
- * @enum _Elm_Wrap_Type
* @typedef Elm_Wrap_Type
*
* Line wrapping types.
} Elm_Wrap_Type; /**< Type of word or character wrapping to use */
/**
- * @enum _Elm_Input_Panel_Layout
* @typedef Elm_Input_Panel_Layout
*
* Input panel (virtual keyboard) layout types.
} Elm_Input_Panel_Layout; /**< Type of input panel (virtual keyboard) to use - this is a hint and may not provide exactly what is desired. */
/**
- * @enum _Elm_Input_Panel_Lang
* @typedef Elm_Input_Panel_Lang
*
* Input panel (virtual keyboard) language modes.
} Elm_Input_Panel_Lang;
/**
- * @enum _Elm_Autocapital_Type
* @typedef Elm_Autocapital_Type
*
* Autocapitalization Types.
} Elm_Autocapital_Type; /**< Choose method of auto-capitalization */
/**
- * @enum _Elm_Input_Panel_Return_Key_Type
* @typedef Elm_Input_Panel_Return_Key_Type
*
* "Return" Key types on the input panel (virtual keyboard).
EAPI void *elm_entry_imf_context_get(Evas_Object *obj);
/**
- * @enum _Elm_Cnp_Mode
* @typedef Elm_Cnp_Mode
* Enum of entry's copy & paste policy.
*
* @see elm_entry_cnp_mode_set()
* @see elm_entry_cnp_mode_get()
*/
-typedef enum _Elm_Cnp_Mode {
+typedef enum {
ELM_CNP_MODE_MARKUP, /**< copy & paste text with markup tag */
ELM_CNP_MODE_NO_IMAGE, /**< copy & paste text without item(image) tag */
ELM_CNP_MODE_PLAINTEXT /**< copy & paste text without markup tag */
* macro. There is no need to use this if you use this macro (which
* is highly advisable). An elm_main() should contain the entry
* point code for your application, having the same prototype as
- * elm_init(), and @b not being static (putting the @c EAPI symbol
+ * elm_init(), and @b not being static (putting the @c EAPI_MAIN symbol
* in front of its type declaration is advisable). The @c
* ELM_MAIN() call should be placed just after it.
*
elm_smart_scroller_page_size_get(wd->scr, &page_x, &page_y);
elm_smart_scroller_child_viewport_size_get(wd->scr, &v_w, &v_h);
- if ((!strcmp(ev->keyname, "Left")) || (!strcmp(ev->keyname, "KP_Left")))
+ if ((!strcmp(ev->keyname, "Left")) ||
+ ((!strcmp(ev->keyname, "KP_Left")) && (!ev->string)))
{
if ((wd->horizontal) &&
(((evas_key_modifier_is_set(ev->modifiers, "Shift")) &&
else
x -= step_x;
}
- else if ((!strcmp(ev->keyname, "Right")) || (!strcmp(ev->keyname, "KP_Right")))
+ else if ((!strcmp(ev->keyname, "Right")) ||
+ ((!strcmp(ev->keyname, "KP_Right")) && (!ev->string)))
{
if ((wd->horizontal) &&
(((evas_key_modifier_is_set(ev->modifiers, "Shift")) &&
else
x += step_x;
}
- else if ((!strcmp(ev->keyname, "Up")) || (!strcmp(ev->keyname, "KP_Up")))
+ else if ((!strcmp(ev->keyname, "Up")) ||
+ ((!strcmp(ev->keyname, "KP_Up")) && (!ev->string)))
{
if ((wd->horizontal) &&
(((evas_key_modifier_is_set(ev->modifiers, "Shift")) &&
else
y -= step_y;
}
- else if ((!strcmp(ev->keyname, "Down")) || (!strcmp(ev->keyname, "KP_Down")))
+ else if ((!strcmp(ev->keyname, "Down")) ||
+ ((!strcmp(ev->keyname, "KP_Down")) && (!ev->string)))
{
if ((wd->horizontal) &&
(((evas_key_modifier_is_set(ev->modifiers, "Shift")) &&
else
y += step_y;
}
- else if ((!strcmp(ev->keyname, "Home")) || (!strcmp(ev->keyname, "KP_Home")))
+ else if ((!strcmp(ev->keyname, "Home")) ||
+ ((!strcmp(ev->keyname, "KP_Home")) && (!ev->string)))
{
it = elm_gengrid_first_item_get(obj);
elm_gengrid_item_bring_in(it, ELM_GENGRID_ITEM_SCROLLTO_IN);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
}
- else if ((!strcmp(ev->keyname, "End")) || (!strcmp(ev->keyname, "KP_End")))
+ else if ((!strcmp(ev->keyname, "End")) ||
+ ((!strcmp(ev->keyname, "KP_End")) && (!ev->string)))
{
it = elm_gengrid_last_item_get(obj);
elm_gengrid_item_bring_in(it, ELM_GENGRID_ITEM_SCROLLTO_IN);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
}
- else if ((!strcmp(ev->keyname, "Prior")) || (!strcmp(ev->keyname, "KP_Prior")))
+ else if ((!strcmp(ev->keyname, "Prior")) ||
+ ((!strcmp(ev->keyname, "KP_Prior")) && (!ev->string)))
{
if (wd->horizontal)
{
y -= page_y;
}
}
- else if ((!strcmp(ev->keyname, "Next")) || (!strcmp(ev->keyname, "KP_Next")))
+ else if ((!strcmp(ev->keyname, "Next")) ||
+ ((!strcmp(ev->keyname, "KP_Next")) && (!ev->string)))
{
if (wd->horizontal)
{
*
* @{
*/
+
+/**
+ * @typedef Elm_Hover_Axis
+ *
+ * The orientation axis for the hover object
+ */
typedef enum
{
ELM_HOVER_AXIS_NONE, /**< ELM_HOVER_AXIS_NONE -- no preferred orientation */
}
static void
-_item_text_set(Elm_Object_Item *it, const char *part, const char *text)
+_item_text_set_hook(Elm_Object_Item *it, const char *part, const char *text)
{
Elm_List_Item *list_it = (Elm_List_Item *)it;
if (part && strcmp(part, "default")) return;
}
static const char *
-_item_text_get(const Elm_Object_Item *it, const char *part)
+_item_text_get_hook(const Elm_Object_Item *it, const char *part)
{
if (part && strcmp(part, "default")) return NULL;
return ((Elm_List_Item *)it)->label;
elm_widget_item_content_set_hook_set(it, _item_content_set_hook);
elm_widget_item_content_get_hook_set(it, _item_content_get_hook);
elm_widget_item_content_unset_hook_set(it, _item_content_unset_hook);
- elm_widget_item_text_set_hook_set(it, _item_text_set);
- elm_widget_item_text_get_hook_set(it, _item_text_get);
+ elm_widget_item_text_set_hook_set(it, _item_text_set_hook);
+ elm_widget_item_text_get_hook_set(it, _item_text_get_hook);
elm_widget_item_del_pre_hook_set(it, _item_del_pre_hook);
return it;
}
const char *part,
Evas_Object *content)
{
- _elm_widget_item_content_part_set((Elm_Widget_Item *)it, part, content);
+ _elm_widget_item_part_content_set((Elm_Widget_Item *)it, part, content);
}
EAPI Evas_Object *
elm_object_item_part_content_get(const Elm_Object_Item *it,
const char *part)
{
- return _elm_widget_item_content_part_get((Elm_Widget_Item *)it, part);
+ return _elm_widget_item_part_content_get((Elm_Widget_Item *)it, part);
}
EAPI Evas_Object *
elm_object_item_part_content_unset(Elm_Object_Item *it, const char *part)
{
- return _elm_widget_item_content_part_unset((Elm_Widget_Item *)it, part);
+ return _elm_widget_item_part_content_unset((Elm_Widget_Item *)it, part);
}
EAPI void
const char *part,
const char *label)
{
- _elm_widget_item_text_part_set((Elm_Widget_Item *)it, part, label);
+ _elm_widget_item_part_text_set((Elm_Widget_Item *)it, part, label);
}
EAPI const char *
elm_object_item_part_text_get(const Elm_Object_Item *it, const char *part)
{
- return _elm_widget_item_text_part_get((Elm_Widget_Item *)it, part);
+ return _elm_widget_item_part_text_get((Elm_Widget_Item *)it, part);
}
EAPI void
elm_smart_scroller_page_size_get(wd->scr, &page_x, &page_y);
elm_smart_scroller_child_viewport_size_get(wd->scr, NULL, &vh);
- if ((!strcmp(ev->keyname, "Left")) || (!strcmp(ev->keyname, "KP_Left")))
+ if ((!strcmp(ev->keyname, "Left")) ||
+ ((!strcmp(ev->keyname, "KP_Left")) && (!ev->string)))
{
x -= step_x;
}
- else if ((!strcmp(ev->keyname, "Right")) || (!strcmp(ev->keyname, "KP_Right")))
+ else if ((!strcmp(ev->keyname, "Right")) ||
+ ((!strcmp(ev->keyname, "KP_Right")) && (!ev->string)))
{
x += step_x;
}
- else if ((!strcmp(ev->keyname, "Up")) || (!strcmp(ev->keyname, "KP_Up")))
+ else if ((!strcmp(ev->keyname, "Up")) ||
+ ((!strcmp(ev->keyname, "KP_Up")) && (!ev->string)))
{
y -= step_y;
}
- else if ((!strcmp(ev->keyname, "Down")) || (!strcmp(ev->keyname, "KP_Down")))
+ else if ((!strcmp(ev->keyname, "Down")) ||
+ ((!strcmp(ev->keyname, "KP_Down")) && (!ev->string)))
{
y += step_y;
}
- else if ((!strcmp(ev->keyname, "Prior")) || (!strcmp(ev->keyname, "KP_Prior")))
+ else if ((!strcmp(ev->keyname, "Prior")) ||
+ ((!strcmp(ev->keyname, "KP_Prior")) && (!ev->string)))
{
if (page_y < 0)
y -= -(page_y * vh) / 100;
else
y -= page_y;
}
- else if ((!strcmp(ev->keyname, "Next")) || (!strcmp(ev->keyname, "KP_Next")))
+ else if ((!strcmp(ev->keyname, "Next")) ||
+ ((!strcmp(ev->keyname, "KP_Next")) && (!ev->string)))
{
if (page_y < 0)
y += -(page_y * vh) / 100;
elm_smart_scroller_child_viewport_size_get(wd->scr, &v_w, &v_h);
if ((!strcmp(ev->keyname, "Left")) ||
- (!strcmp(ev->keyname, "KP_Left")))
+ ((!strcmp(ev->keyname, "KP_Left")) && (!ev->string)))
{
x -= step_x;
}
else if ((!strcmp(ev->keyname, "Right")) ||
- (!strcmp(ev->keyname, "KP_Right")))
+ ((!strcmp(ev->keyname, "KP_Right")) && (!ev->string)))
{
x += step_x;
}
else if ((!strcmp(ev->keyname, "Up")) ||
- (!strcmp(ev->keyname, "KP_Up")))
+ ((!strcmp(ev->keyname, "KP_Up")) && (!ev->string)))
{
y -= step_y;
}
else if ((!strcmp(ev->keyname, "Down")) ||
- (!strcmp(ev->keyname, "KP_Down")))
+ ((!strcmp(ev->keyname, "KP_Down")) && (!ev->string)))
{
y += step_y;
}
else if ((!strcmp(ev->keyname, "Prior")) ||
- (!strcmp(ev->keyname, "KP_Prior")))
+ ((!strcmp(ev->keyname, "KP_Prior")) && (!ev->string)))
{
if (page_y < 0)
y -= -(page_y * v_h) / 100;
y -= page_y;
}
else if ((!strcmp(ev->keyname, "Next")) ||
- (!strcmp(ev->keyname, "KP_Next")))
+ ((!strcmp(ev->keyname, "KP_Next")) && (!ev->string)))
{
if (page_y < 0)
y += -(page_y * v_h) / 100;
elm_smart_scroller_child_viewport_size_get(wd->scr, &v_w, &v_h);
elm_scroller_child_size_get(obj, &max_x, &max_y);
- if ((!strcmp(ev->keyname, "Left")) || (!strcmp(ev->keyname, "KP_Left")))
+ if ((!strcmp(ev->keyname, "Left")) ||
+ ((!strcmp(ev->keyname, "KP_Left")) && (!ev->string)))
{
x -= step_x;
}
- else if ((!strcmp(ev->keyname, "Right")) || (!strcmp(ev->keyname, "KP_Right")))
+ else if ((!strcmp(ev->keyname, "Right")) ||
+ ((!strcmp(ev->keyname, "KP_Right")) && (!ev->string)))
{
x += step_x;
}
- else if ((!strcmp(ev->keyname, "Up")) || (!strcmp(ev->keyname, "KP_Up")))
+ else if ((!strcmp(ev->keyname, "Up")) ||
+ ((!strcmp(ev->keyname, "KP_Up")) && (!ev->string)))
{
y -= step_y;
}
- else if ((!strcmp(ev->keyname, "Down")) || (!strcmp(ev->keyname, "KP_Down")))
+ else if ((!strcmp(ev->keyname, "Down")) ||
+ ((!strcmp(ev->keyname, "KP_Down")) && (!ev->string)))
{
y += step_y;
}
- else if ((!strcmp(ev->keyname, "Home")) || (!strcmp(ev->keyname, "KP_Home")))
+ else if ((!strcmp(ev->keyname, "Home")) ||
+ ((!strcmp(ev->keyname, "KP_Home")) && (!ev->string)))
{
y = 0;
}
- else if ((!strcmp(ev->keyname, "End")) || (!strcmp(ev->keyname, "KP_End")))
+ else if ((!strcmp(ev->keyname, "End")) ||
+ ((!strcmp(ev->keyname, "KP_End")) && (!ev->string)))
{
y = max_y - v_h;
}
- else if ((!strcmp(ev->keyname, "Prior")) || (!strcmp(ev->keyname, "KP_Prior")))
+ else if ((!strcmp(ev->keyname, "Prior")) ||
+ ((!strcmp(ev->keyname, "KP_Prior")) && (!ev->string)))
{
if (page_y < 0)
y -= -(page_y * v_h) / 100;
else
y -= page_y;
}
- else if ((!strcmp(ev->keyname, "Next")) || (!strcmp(ev->keyname, "KP_Next")))
+ else if ((!strcmp(ev->keyname, "Next")) ||
+ ((!strcmp(ev->keyname, "KP_Next")) && (!ev->string)))
{
if (page_y < 0)
y += -(page_y * v_h) / 100;
ev = event_info;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
if (elm_widget_disabled_get(obj)) return EINA_FALSE;
- if ((!strcmp(ev->keyname, "Left"))
- || (!strcmp(ev->keyname, "KP_Left")))
+ if ((!strcmp(ev->keyname, "Left")) ||
+ ((!strcmp(ev->keyname, "KP_Left")) && (!ev->string)))
{
if (!wd->horizontal) return EINA_FALSE;
if (!wd->inverted) _drag_down(obj, NULL, NULL, NULL);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
}
- else if ((!strcmp(ev->keyname, "Right"))
- || (!strcmp(ev->keyname, "KP_Right")))
+ else if ((!strcmp(ev->keyname, "Right")) ||
+ ((!strcmp(ev->keyname, "KP_Right")) && (!ev->string)))
{
if (!wd->horizontal) return EINA_FALSE;
if (!wd->inverted) _drag_up(obj, NULL, NULL, NULL);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
}
- else if ((!strcmp(ev->keyname, "Up")) || (!strcmp(ev->keyname, "KP_Up")))
+ else if ((!strcmp(ev->keyname, "Up")) ||
+ ((!strcmp(ev->keyname, "KP_Up")) && (!ev->string)))
{
if (wd->horizontal) return EINA_FALSE;
if (wd->inverted) _drag_up(obj, NULL, NULL, NULL);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
}
- else if ((!strcmp(ev->keyname, "Down")) || (!strcmp(ev->keyname, "KP_Down")))
+ else if ((!strcmp(ev->keyname, "Down")) ||
+ ((!strcmp(ev->keyname, "KP_Down")) && (!ev->string)))
{
if (wd->horizontal) return EINA_FALSE;
if (wd->inverted) _drag_down(obj, NULL, NULL, NULL);
if (!wd) return EINA_FALSE;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
if (elm_widget_disabled_get(obj)) return EINA_FALSE;
- if ((!strcmp(ev->keyname, "Left")) || (!strcmp(ev->keyname, "KP_Left")))
+ if ((!strcmp(ev->keyname, "Left")) ||
+ ((!strcmp(ev->keyname, "KP_Left")) && (!ev->string)))
{
elm_slideshow_previous(obj);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
}
- if ((!strcmp(ev->keyname, "Right")) || (!strcmp(ev->keyname, "KP_Right")))
+ if ((!strcmp(ev->keyname, "Right")) ||
+ ((!strcmp(ev->keyname, "KP_Right")) && (!ev->string)))
{
elm_slideshow_next(obj);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
{
Evas_Event_Key_Down *ev = event_info;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
- else if (!strcmp(ev->keyname, "Left") || !strcmp(ev->keyname, "KP_Left")
- || !strcmp(ev->keyname, "Down") || !strcmp(ev->keyname, "KP_Down"))
+ else if (!strcmp(ev->keyname, "Left") ||
+ ((!strcmp(ev->keyname, "KP_Left")) && (!ev->string)) ||
+ !strcmp(ev->keyname, "Down") ||
+ ((!strcmp(ev->keyname, "KP_Down")) && (!ev->string)))
{
_val_dec_start(obj);
edje_object_signal_emit(wd->spinner, "elm,left,anim,activate", "elm");
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
}
- else if (!strcmp(ev->keyname, "Right") || !strcmp(ev->keyname, "KP_Right")
- || !strcmp(ev->keyname, "Up") || !strcmp(ev->keyname, "KP_Up"))
+ else if (!strcmp(ev->keyname, "Right") ||
+ ((!strcmp(ev->keyname, "KP_Right")) && (!ev->string)) ||
+ !strcmp(ev->keyname, "Up") ||
+ ((!strcmp(ev->keyname, "KP_Up")) && (!ev->string)))
{
_val_inc_start(obj);
edje_object_signal_emit(wd->spinner, "elm,right,anim,activate", "elm");
{
Evas_Event_Key_Down *ev = event_info;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
- if (!strcmp(ev->keyname, "Right") || !strcmp(ev->keyname, "KP_Right")
- || !strcmp(ev->keyname, "Up") || !strcmp(ev->keyname, "KP_Up"))
+ if (!strcmp(ev->keyname, "Right") ||
+ ((!strcmp(ev->keyname, "KP_Right")) && (!ev->string)) ||
+ !strcmp(ev->keyname, "Up") ||
+ ((!strcmp(ev->keyname, "KP_Up")) && (!ev->string)))
_val_inc_stop(obj);
- else if (!strcmp(ev->keyname, "Left") || !strcmp(ev->keyname, "KP_Left")
- || !strcmp(ev->keyname, "Down") || !strcmp(ev->keyname, "KP_Down"))
+ else if (!strcmp(ev->keyname, "Left") ||
+ ((!strcmp(ev->keyname, "KP_Left")) && (!ev->string)) ||
+ !strcmp(ev->keyname, "Down") ||
+ ((!strcmp(ev->keyname, "KP_Down")) && (!ev->string)))
_val_dec_stop(obj);
else return EINA_FALSE;
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
* @param subobj The subobject to be added to the table
* @param x Row number
* @param y Column number
- * @param w rowspan
- * @param h colspan
+ * @param w colspan
+ * @param h rowspan
*
* @note All positioning inside the table is relative to rows and columns, so
* a value of 0 for x and y, means the top left cell of the table, and a
if (!wd) return EINA_FALSE;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
if (elm_widget_disabled_get(obj)) return EINA_FALSE;
- if ((!strcmp(ev->keyname, "Left")) || (!strcmp(ev->keyname, "KP_Left")))
+ if ((!strcmp(ev->keyname, "Left")) ||
+ ((!strcmp(ev->keyname, "KP_Left")) && (!ev->string)))
{
double current, last;
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
}
- if ((!strcmp(ev->keyname, "Right")) || (!strcmp(ev->keyname, "KP_Right")))
+ if ((!strcmp(ev->keyname, "Right")) ||
+ ((!strcmp(ev->keyname, "KP_Right")) && (!ev->string)))
{
double current, last;
Evas_Object *sobj)
{
API_ENTRY return;
+ EINA_SAFETY_ON_TRUE_RETURN(obj == sobj);
double scale, pscale = elm_widget_scale_get(sobj);
Elm_Theme *th, *pth = elm_widget_theme_get(sobj);
Eina_Bool mirrored, pmirrored = elm_widget_mirrored_get(obj);
}
EAPI void
-_elm_widget_item_content_part_set(Elm_Widget_Item *item,
- const char *part,
- Evas_Object *content)
+_elm_widget_item_part_content_set(Elm_Widget_Item *item,
+ const char *part,
+ Evas_Object *content)
{
ELM_WIDGET_ITEM_CHECK_OR_RETURN(item);
- if (!item->content_set_func) return;
+ if (!item->content_set_func)
+ {
+ ERR("%s does not support elm_object_item_part_content_set() API.",
+ elm_widget_type_get(item->widget));
+ return;
+ }
item->content_set_func((Elm_Object_Item *)item, part, content);
}
EAPI Evas_Object *
-_elm_widget_item_content_part_get(const Elm_Widget_Item *item,
+_elm_widget_item_part_content_get(const Elm_Widget_Item *item,
const char *part)
{
ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL);
- if (!item->content_get_func) return NULL;
+ if (!item->content_get_func)
+ {
+ ERR("%s does not support elm_object_item_part_content_get() API.",
+ elm_widget_type_get(item->widget));
+ return NULL;
+ }
return item->content_get_func((Elm_Object_Item *)item, part);
}
EAPI Evas_Object *
-_elm_widget_item_content_part_unset(Elm_Widget_Item *item,
+_elm_widget_item_part_content_unset(Elm_Widget_Item *item,
const char *part)
{
ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL);
- if (!item->content_unset_func) return NULL;
+ if (!item->content_unset_func)
+ {
+ ERR("%s does not support elm_object_item_part_content_unset() API.",
+ elm_widget_type_get(item->widget));
+ return NULL;
+ }
return item->content_unset_func((Elm_Object_Item *)item, part);
}
EAPI void
-_elm_widget_item_text_part_set(Elm_Widget_Item *item,
- const char *part,
- const char *label)
+_elm_widget_item_part_text_set(Elm_Widget_Item *item,
+ const char *part,
+ const char *label)
{
ELM_WIDGET_ITEM_CHECK_OR_RETURN(item);
- if (!item->text_set_func) return;
+ if (!item->text_set_func)
+ {
+ ERR("%s does not support elm_object_item_part_text_set() API.",
+ elm_widget_type_get(item->widget));
+ return;
+ }
item->text_set_func((Elm_Object_Item *)item, part, label);
}
-EAPI void
-_elm_widget_item_signal_emit(Elm_Widget_Item *item,
- const char *emission,
- const char *source)
-{
- ELM_WIDGET_ITEM_CHECK_OR_RETURN(item);
- if (item->signal_emit_func)
- item->signal_emit_func((Elm_Object_Item *)item, emission, source);
-}
-
EAPI const char *
-_elm_widget_item_text_part_get(const Elm_Widget_Item *item,
+_elm_widget_item_part_text_get(const Elm_Widget_Item *item,
const char *part)
{
ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL);
- if (!item->text_get_func) return NULL;
+ if (!item->text_get_func)
+ {
+ ERR("%s does not support elm_object_item_part_text_get() API.",
+ elm_widget_type_get(item->widget));
+ return NULL;
+ }
return item->text_get_func((Elm_Object_Item *)item, part);
}
}
EAPI void
+_elm_widget_item_signal_emit(Elm_Widget_Item *item,
+ const char *emission,
+ const char *source)
+{
+ ELM_WIDGET_ITEM_CHECK_OR_RETURN(item);
+ if (item->signal_emit_func)
+ item->signal_emit_func((Elm_Object_Item *)item, emission, source);
+}
+
+EAPI void
_elm_widget_item_signal_emit_hook_set(Elm_Widget_Item *item,
Elm_Widget_Signal_Emit_Cb func)
{
EAPI const char *_elm_widget_item_cursor_style_get(const Elm_Widget_Item *item);
EAPI void _elm_widget_item_cursor_engine_only_set(Elm_Widget_Item *item, Eina_Bool engine_only);
EAPI Eina_Bool _elm_widget_item_cursor_engine_only_get(const Elm_Widget_Item *item);
-EAPI void _elm_widget_item_content_part_set(Elm_Widget_Item *item, const char *part, Evas_Object *content);
-EAPI Evas_Object *_elm_widget_item_content_part_get(const Elm_Widget_Item *item, const char *part);
-EAPI Evas_Object *_elm_widget_item_content_part_unset(Elm_Widget_Item *item, const char *part);
-EAPI void _elm_widget_item_text_part_set(Elm_Widget_Item *item, const char *part, const char *label);
-EAPI const char *_elm_widget_item_text_part_get(const Elm_Widget_Item *item, const char *part);
+EAPI void _elm_widget_item_part_content_set(Elm_Widget_Item *item, const char *part, Evas_Object *content);
+EAPI Evas_Object *_elm_widget_item_part_content_get(const Elm_Widget_Item *item, const char *part);
+EAPI Evas_Object *_elm_widget_item_part_content_unset(Elm_Widget_Item *item, const char *part);
+EAPI void _elm_widget_item_part_text_set(Elm_Widget_Item *item, const char *part, const char *label);
+EAPI const char *_elm_widget_item_part_text_get(const Elm_Widget_Item *item, const char *part);
EAPI void _elm_widget_item_signal_emit(Elm_Widget_Item *item, const char *emission, const char *source);
EAPI void _elm_widget_item_content_set_hook_set(Elm_Widget_Item *item, Elm_Widget_Content_Set_Cb func);
EAPI void _elm_widget_item_content_get_hook_set(Elm_Widget_Item *item, Elm_Widget_Content_Get_Cb func);
return EINA_TRUE;
}
else if ((!strcmp(ev->keyname, "Left")) ||
- (!strcmp(ev->keyname, "KP_Left")))
+ ((!strcmp(ev->keyname, "KP_Left")) && (!ev->string)))
{
//TODO : woohyun jung
}
else if ((!strcmp(ev->keyname, "Right")) ||
- (!strcmp(ev->keyname, "KP_Right")))
+ ((!strcmp(ev->keyname, "KP_Right")) && (!ev->string)))
{
//TODO : woohyun jung
}
else if ((!strcmp(ev->keyname, "Up")) ||
- (!strcmp(ev->keyname, "KP_Up")))
+ ((!strcmp(ev->keyname, "KP_Up")) && (!ev->string)))
{
//TODO : woohyun jung
}
else if ((!strcmp(ev->keyname, "Down")) ||
- (!strcmp(ev->keyname, "KP_Down")))
+ ((!strcmp(ev->keyname, "KP_Down")) && (!ev->string)))
{
//TODO : woohyun jung
}