From 072d28eed19c5d0cbbdab58f85bbb955781db6fe Mon Sep 17 00:00:00 2001 From: yoz Date: Fri, 27 May 2011 14:32:12 +0000 Subject: [PATCH] elementary: add external segment_control git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@59737 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/edje_externals/Makefile.am | 3 +- src/edje_externals/elm_segment_control.c | 75 ++++++++++++++++++++++++++++++++ src/edje_externals/modules.inc | 1 + 3 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 src/edje_externals/elm_segment_control.c diff --git a/src/edje_externals/Makefile.am b/src/edje_externals/Makefile.am index 1bfd60e..f4b3881 100644 --- a/src/edje_externals/Makefile.am +++ b/src/edje_externals/Makefile.am @@ -56,7 +56,8 @@ elm_slideshow.c \ elm_spinner.c \ elm_thumb.c \ elm_toggle.c \ -elm_toolbar.c +elm_toolbar.c \ +elm_segment_control.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_segment_control.c b/src/edje_externals/elm_segment_control.c new file mode 100644 index 0000000..958ef7b --- /dev/null +++ b/src/edje_externals/elm_segment_control.c @@ -0,0 +1,75 @@ +#include "private.h" + +typedef struct _Elm_Params_Segment_Control +{ + Elm_Params base; +} Elm_Params_Segment_Control; + +static void +external_segment_control_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__) +{ + const Elm_Params_Segment_Control *p; + + if (to_params) p = to_params; + else if (from_params) p = from_params; + else return; +} + +static Eina_Bool +external_segment_control_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_External_Param *param) +{ + ERR("unknown parameter '%s' of type '%s'", + param->name, edje_external_param_type_str(param->type)); + + return EINA_FALSE; +} + +static Eina_Bool +external_segment_control_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_segment_control_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const Eina_List *params) +{ + Elm_Params_Segment_Control *mem; + Edje_External_Param *param; + const Eina_List *l; + + mem = calloc(1, sizeof(Elm_Params_Segment_Control)); + if (!mem) + return NULL; + + /* + EINA_LIST_FOREACH(params, l, param) + { + } + */ + return mem; +} + +static Evas_Object *external_segment_control_content_get(void *data __UNUSED__, + const Evas_Object *obj __UNUSED__, const char *content __UNUSED__) +{ + ERR("No content."); + return NULL; +} + +static void +external_segment_control_params_free(void *params) +{ + Elm_Params_Segment_Control *mem = params; + free(mem); +} + +static Edje_External_Param_Info external_segment_control_params[] = { + DEFINE_EXTERNAL_COMMON_PARAMS, + EDJE_EXTERNAL_PARAM_INFO_SENTINEL +}; + +DEFINE_EXTERNAL_ICON_ADD(segment_control, "segment_control"); +DEFINE_EXTERNAL_TYPE_SIMPLE(segment_control, "segment_control"); diff --git a/src/edje_externals/modules.inc b/src/edje_externals/modules.inc index 9fbc365..6187e76 100644 --- a/src/edje_externals/modules.inc +++ b/src/edje_externals/modules.inc @@ -27,3 +27,4 @@ DEFINE_TYPE(panes) DEFINE_TYPE(label) DEFINE_TYPE(icon) DEFINE_TYPE(scroller) +DEFINE_TYPE(segment_control) -- 2.7.4