From 9aa975e4323c59f63d1e7121d73e7f3e4cde5b26 Mon Sep 17 00:00:00 2001 From: Seunggyun Kim Date: Fri, 12 Nov 2010 19:12:43 +0900 Subject: [PATCH] [src/edje_externals/elm_scrolled_entry.c amd elm_timepicker.c] Updated the external interfaces for elm_scrolled_entry and elm_timepicker. --- data/edje_externals/Makefile.am | 4 +- data/edje_externals/ico_timepicker.png | Bin 0 -> 7958 bytes data/edje_externals/icons.edc | 2 + src/edje_externals/Makefile.am | 3 +- src/edje_externals/elm_scrolled_entry.c | 177 +++++++++++++++++++++++++++++++- src/edje_externals/elm_timepicker.c | 118 +++++++++++++++++++++ src/edje_externals/modules.inc | 1 + 7 files changed, 299 insertions(+), 6 deletions(-) create mode 100644 data/edje_externals/ico_timepicker.png create mode 100644 src/edje_externals/elm_timepicker.c diff --git a/data/edje_externals/Makefile.am b/data/edje_externals/Makefile.am index 28ce2d8..ef45da4 100644 --- a/data/edje_externals/Makefile.am +++ b/data/edje_externals/Makefile.am @@ -34,7 +34,9 @@ ico_slideshow.png \ ico_spinner.png \ ico_thumb.png \ ico_toggle.png \ -ico_toolbar.png +ico_toolbar.png \ +ico_timepicker.png + icons.edj: Makefile $(EXTRA_DIST) $(EDJE_CC) $(EDJE_FLAGS) \ diff --git a/data/edje_externals/ico_timepicker.png b/data/edje_externals/ico_timepicker.png new file mode 100644 index 0000000000000000000000000000000000000000..1a7ed0232f4ace7e5ee696a52cead002859bdb19 GIT binary patch literal 7958 zcmY*-WmsEHv~?&B!KDyfi+i9H5ANWc(2{y|5AlpPPEC9(;Z0ojXyO2_pgWkCi! zAYxnP9%0ZNCx}N;-&O%s*#P=AhL2qh!T^JKG{Zw!K`6c;^8p41Z_w9N5V733zUUcy zIsPsi;HlJV(I!S=*&t&KPB(OYeJ*O2F~yhc#DW$tEYc*ox;~|n^92dutzC?OK-uvm zz-liZy~l9N$HoL>>v7FE|8}4~(_30@K5dU9TqQxEbx;4vCl2l!NT3K>pz~8M(=m$u zTkPx)H&M3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tWXu!wG%_y(mze*m%$j6Bj66XU$yn$kpg>A%X2y-{dzM)--DEk!3d4RoV@Ax={k* zZe(l>_y>uGhUQ-p01zP`IcG_XqyLoW$sh7;tdgczy$x+1C8m#AnS%epnD^LFVo2%fP}i;Bc3r>u^Y=FK;z%$+@@!fp6mgb%uzy6%D@I zK++zn!t9|Ch0tK3O;n;wR9Zhe!m0Y}K^hy5$O|LzX`^;;Y85HBEE55g{&yg20?HKz z9Hb48lOwkLfT=)10sLL6}wTi_7ar;eyapr7I7Or-aAuhk1tTFpn zJ&WJ?_G#lU+lMbFO=6osjjd&q%{B%M*Zip=ir&m2pW}`HjNUz`Cb>vWl>w9)L5i|! KGUYJyFaHB?Fhzd= literal 0 HcmV?d00001 diff --git a/data/edje_externals/icons.edc b/data/edje_externals/icons.edc index 9e219b0..4a7983b 100644 --- a/data/edje_externals/icons.edc +++ b/data/edje_externals/icons.edc @@ -39,4 +39,6 @@ ICON("thumb") ICON("toggle") ICON("toolbar") ICON("slideshow") +ICON("timepicker") + diff --git a/src/edje_externals/Makefile.am b/src/edje_externals/Makefile.am index bbd9077..e60429e 100644 --- a/src/edje_externals/Makefile.am +++ b/src/edje_externals/Makefile.am @@ -59,7 +59,8 @@ elm_notify.c \ elm_panes.c \ elm_navigationbar.c \ elm_navigationbar_ex.c \ -elm_pager.c +elm_pager.c \ +elm_timepicker.c module_la_LIBADD = $(top_builddir)/src/lib/libelementary.la module_la_LDFLAGS = -no-undefined -module -avoid-version -shared -fPIC diff --git a/src/edje_externals/elm_scrolled_entry.c b/src/edje_externals/elm_scrolled_entry.c index f81ca62..6420edb 100644 --- a/src/edje_externals/elm_scrolled_entry.c +++ b/src/edje_externals/elm_scrolled_entry.c @@ -5,11 +5,28 @@ typedef struct _Elm_Params_Entry const char *text; Eina_Bool text_set:1; Eina_Bool editable:1; + Eina_Bool editable_exists:1; Eina_Bool single:1; + Eina_Bool single_exists:1; + Eina_Bool wrap:1; + Eina_Bool wrap_exists:1; + Eina_Bool char_wrap:1; + Eina_Bool char_wrap_exists:1; Eina_Bool password:1; - Eina_Bool editable_exists:1; - Eina_Bool single_exists:1; Eina_Bool password_exists:1; + Eina_Bool context_menu_disabled:1; + Eina_Bool context_menu_disabled_exists:1; + Eina_Bool bounce:1; + Eina_Bool bounce_exists; + Eina_Bool h_bounce:1; + Eina_Bool h_bounce_exists:1; + Eina_Bool v_bounce:1; + Eina_Bool v_bounce_exists:1; + Eina_Bool autocapitalization:1; + Eina_Bool autocapitalization_exists:1; + Eina_Bool autoperiod:1; + Eina_Bool autoperiod_exists:1; + } Elm_Params_Entry; static void @@ -30,8 +47,30 @@ external_scrolled_entry_state_set(void *data __UNUSED__, Evas_Object *obj, const elm_scrolled_entry_editable_set(obj, p->editable); if (p->single_exists) elm_scrolled_entry_single_line_set(obj, p->single); + if (p->wrap_exists) + elm_scrolled_entry_line_wrap_set(obj, p->wrap); + if (p->char_wrap_exists) + elm_scrolled_entry_line_char_wrap_set(obj, p->char_wrap); if (p->password_exists) elm_scrolled_entry_password_set(obj, p->password); + if (p->context_menu_disabled_exists) + elm_scrolled_entry_context_menu_disabled_set(obj, p->context_menu_disabled); + if ((p->h_bounce_exists) && (p->v_bounce_exists)) + elm_scrolled_entry_bounce_set(obj, p->h_bounce, p->v_bounce); + else if ((p->h_bounce_exists) || (p->v_bounce_exists)) + { + Eina_Bool h_bounce, v_bounce; + + elm_smart_scroller_bounce_allow_get(obj, &h_bounce, &v_bounce); + if (p->h_bounce_exists) + elm_scrolled_entry_bounce_set(obj, p->h_bounce, v_bounce); + else + elm_scrolled_entry_bounce_set(obj, h_bounce, p->v_bounce); + } + if (p->autocapitalization_exists) + elm_scrolled_entry_autocapitalization_set(obj, p->autocapitalization); + if (p->autoperiod_exists) + elm_scrolled_entry_autoperiod_set(obj, p->autoperiod); } static Eina_Bool @@ -61,6 +100,22 @@ external_scrolled_entry_param_set(void *data __UNUSED__, Evas_Object *obj, const return EINA_TRUE; } } + else if (!strcmp(param->name, "line wrap")) + { + if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) + { + elm_scrolled_entry_line_wrap_set(obj, param->i); + return EINA_TRUE; + } + } + else if (!strcmp(param->name, "character line wrap")) + { + if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) + { + elm_scrolled_entry_line_char_wrap_set(obj, param->i); + return EINA_TRUE; + } + } else if (!strcmp(param->name, "password")) { if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) @@ -69,7 +124,51 @@ external_scrolled_entry_param_set(void *data __UNUSED__, Evas_Object *obj, const return EINA_TRUE; } } - + else if (!strcmp(param->name, "context menu disabled")) + { + if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) + { + elm_scrolled_entry_context_menu_disabled_set(obj, param->i); + 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_smart_scroller_bounce_allow_get(obj, &h_bounce, &v_bounce); + elm_scrolled_entry_bounce_set(obj, param->i, v_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_smart_scroller_bounce_allow_get(obj, &h_bounce, &v_bounce); + elm_scrolled_entry_bounce_set(obj, h_bounce, param->i); + return EINA_TRUE; + } + } + else if (!strcmp(param->name, "autocapitalization")) + { + if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) + { + elm_scrolled_entry_autocapitalization_set(obj, param->i); + return EINA_TRUE; + } + } + else if (!strcmp(param->name, "autoperiod")) + { + if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) + { + elm_scrolled_entry_autoperiod_set(obj, param->i); + return EINA_TRUE; + } + } + ERR("unknown parameter '%s' of type '%s'", param->name, edje_external_param_type_str(param->type)); @@ -111,6 +210,34 @@ external_scrolled_entry_param_get(void *data __UNUSED__, const Evas_Object *obj, return EINA_TRUE; } } + else if (!strcmp(param->name, "context menu disabled")) + { + if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) + { + param->i = elm_scrolled_entry_context_menu_disabled_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_smart_scroller_bounce_allow_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_smart_scroller_bounce_allow_get(obj, &h_bounce, &v_bounce); + param->i = v_bounce; + return EINA_TRUE; + } + } ERR("unknown parameter '%s' of type '%s'", param->name, edje_external_param_type_str(param->type)); @@ -138,6 +265,16 @@ external_scrolled_entry_params_parse(void *data __UNUSED__, Evas_Object *obj __U mem->single = !!param->i; mem->single_exists = EINA_TRUE; } + else if (!strcmp(param->name, "line wrap")) + { + mem->wrap = !!param->i; + mem->wrap_exists = EINA_TRUE; + } + else if (!strcmp(param->name, "character line wrap")) + { + mem->char_wrap = !!param->i; + mem->char_wrap_exists = EINA_TRUE; + } else if (!strcmp(param->name, "password")) { mem->password = !!param->i; @@ -148,8 +285,33 @@ external_scrolled_entry_params_parse(void *data __UNUSED__, Evas_Object *obj __U mem->editable = param->i; mem->editable_exists = EINA_TRUE; } + else if (!strcmp(param->name, "context menu disabled")) + { + mem->context_menu_disabled = param->i; + mem->context_menu_disabled_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, "autocapitalization")) + { + mem->autocapitalization = !!param->i; + mem->autocapitalization_exists = EINA_TRUE; + } + else if (!strcmp(param->name, "autoperiod")) + { + mem->autoperiod = !!param->i; + mem->autoperiod_exists = EINA_TRUE; + } } - + return mem; } @@ -174,7 +336,14 @@ static Edje_External_Param_Info external_scrolled_entry_params[] = { EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("text", "some text"), EDJE_EXTERNAL_PARAM_INFO_BOOL("editable"), EDJE_EXTERNAL_PARAM_INFO_BOOL("single line"), + EDJE_EXTERNAL_PARAM_INFO_BOOL("line wrap"), + EDJE_EXTERNAL_PARAM_INFO_BOOL("character line wrap"), EDJE_EXTERNAL_PARAM_INFO_BOOL("password"), + EDJE_EXTERNAL_PARAM_INFO_BOOL("context menu disabled"), + EDJE_EXTERNAL_PARAM_INFO_BOOL("height bounce"), + EDJE_EXTERNAL_PARAM_INFO_BOOL("width bounce"), + EDJE_EXTERNAL_PARAM_INFO_BOOL("autocapitalization"), + EDJE_EXTERNAL_PARAM_INFO_BOOL("autoperiod"), EDJE_EXTERNAL_PARAM_INFO_SENTINEL }; diff --git a/src/edje_externals/elm_timepicker.c b/src/edje_externals/elm_timepicker.c new file mode 100644 index 0000000..c320800 --- /dev/null +++ b/src/edje_externals/elm_timepicker.c @@ -0,0 +1,118 @@ +#include + +#include "private.h" + +typedef struct _Elm_Params_Timepicker +{ + Eina_Bool show_am_pm:1; + Eina_Bool show_am_pm_exists:1; + Eina_Bool show_seconds:1; + Eina_Bool show_seconds_exists:1; +} Elm_Params_Timepicker; + +static unsigned int page_count_bk; + +static void +external_timepicker_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__) +{ + const Elm_Params_Timepicker *p; + + if (to_params) p = to_params; + else if (from_params) p = from_params; + else return; + + if (p->show_am_pm_exists) + elm_timepicker_show_am_pm_set(obj, p->show_am_pm); + if (p->show_seconds_exists) + elm_timepicker_show_seconds_set(obj, p->show_seconds); + +} + +static Eina_Bool +external_timepicker_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param) +{ + if (!strcmp(param->name, "show am_pm")) + { + if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) + { + elm_timepicker_show_am_pm_set(obj, param->i); + return EINA_TRUE; + } + } + else if (!strcmp(param->name, "show seconds")) + { + if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) + { + elm_timepicker_show_seconds_set(obj, param->i); + return EINA_TRUE; + } + } + + ERR("unknown parameter '%s' of type '%s'", + param->name, edje_external_param_type_str(param->type)); + + return EINA_FALSE; +} + +static Eina_Bool +external_timepicker_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_External_Param *param) +{ + + ERR("unknown parameter '%s' of type '%s'", + param->name, edje_external_param_type_str(param->type)); + + return EINA_FALSE; +} + +static void * +external_timepicker_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params) +{ + Elm_Params_Timepicker *mem; + Edje_External_Param *param; + const Eina_List *l; + + mem = calloc(1, sizeof(Elm_Params_Timepicker)); + if (!mem) + return NULL; + + EINA_LIST_FOREACH(params, l, param) + { + if (!strcmp(param->name, "show am_pm")) + { + mem->show_am_pm = !!param->i; + mem->show_am_pm_exists = EINA_TRUE; + } + else if (!strcmp(param->name, "show seconds")) + { + mem->show_seconds = !!param->i; + mem->show_seconds_exists = EINA_TRUE; + } + } + + return mem; +} + +static Evas_Object *external_timepicker_content_get(void *data __UNUSED__, + const Evas_Object *obj, const char *content) +{ + ERR("so content"); + return NULL; +} + +static void +external_timepicker_params_free(void *params) +{ + Elm_Params_Timepicker *mem = params; + + free(mem); +} + +static Edje_External_Param_Info external_timepicker_params[] = { + EDJE_EXTERNAL_PARAM_INFO_BOOL("show am_pm"), + EDJE_EXTERNAL_PARAM_INFO_BOOL("show seconds"), + EDJE_EXTERNAL_PARAM_INFO_SENTINEL +}; + +DEFINE_EXTERNAL_ICON_ADD(timepicker, "timepicker"); +DEFINE_EXTERNAL_TYPE_SIMPLE(timepicker, "Picker"); + diff --git a/src/edje_externals/modules.inc b/src/edje_externals/modules.inc index 29610ad..0fad3f1 100644 --- a/src/edje_externals/modules.inc +++ b/src/edje_externals/modules.inc @@ -31,3 +31,4 @@ DEFINE_TYPE(toggle) DEFINE_TYPE(toolbar) DEFINE_TYPE(notify) DEFINE_TYPE(panes) +DEFINE_TYPE(timepicker) -- 2.7.4