elm_button.c \
elm_check.c \
elm_clock.c \
-elm_fileselector_button.c \
+elm_colorpalette.c\
+elm_calendar.c \
+elm_datefield.c \
+ elm_entry.c \
elm_fileselector.c \
+elm_fileselector_button.c \
elm_fileselector_entry.c \
elm_gengrid.c \
elm_genlist.c \
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);
+ {
+ 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);
- }
+ if (!elm_icon_file_set(obj, file, p->icon))
+ elm_icon_standard_set(obj, p->icon);
+ }
}
static Eina_Bool
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 (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;
- }
+ 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'",
}
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;
+ /* not easy to get icon name back from live object */
+ return EINA_FALSE;
}
ERR("unknown parameter '%s' of type '%s'",
{
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);
+ eina_stringshare_del(mem->icon);
external_common_params_free(params);
}
DEFINE_TYPE(anchorview)
DEFINE_TYPE(bubble)
DEFINE_TYPE(button)
+DEFINE_TYPE(calendar)
DEFINE_TYPE(check)
DEFINE_TYPE(clock)
+DEFINE_TYPE(colorpalette)
+DEFINE_TYPE(datefield)
+ DEFINE_TYPE(entry)
DEFINE_TYPE(fileselector)
DEFINE_TYPE(fileselector_button)
DEFINE_TYPE(fileselector_entry)
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, 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 Elm_Wrap_Type elm_entry_line_wrap_get(const Evas_Object *obj) 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);
elc_fileselector.c \
elc_fileselector_entry.c \
elc_hoversel.c \
+elc_navigationbar.c \
+elc_navigationbar_ex.c\
+ elc_player.c \
elc_scrolled_entry.c \
elm_actionslider.c \
elm_animator.c \
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- if (!item)
+ if (!item || !strcmp(item, "default"))
{
- 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"))
{
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return NULL;
- if (!item)
+ if (!item || !strcmp(item, "default"))
{
- return wd->indicator_label;
+ return wd->text_button;
}
else if (!strcmp(item, "left"))
{
_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);
}
+ static void
+ _elm_bubble_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 || !strcmp(item, "default"))
+ {
+ eina_stringshare_replace(&wd->label, label);
+ edje_object_part_text_set(wd->bbl, "elm.text", label);
+ if (label) edje_object_signal_emit(wd->bbl, "elm,state,text,visible",
+ "elm");
+ else edje_object_signal_emit(wd->bbl, "elm,state,text,hidden", "elm");
+ _sizing_eval(obj);
+ }
+ else if (!strcmp(item, "info"))
+ {
+ eina_stringshare_replace(&wd->info, label);
+ edje_object_part_text_set(wd->bbl, "elm.info", label);
+ if (label) edje_object_signal_emit(wd->bbl, "elm,state,info,visible",
+ "elm");
+ else edje_object_signal_emit(wd->bbl, "elm,state,info,hidden", "elm");
+ _sizing_eval(obj);
+ }
+ }
+
+ static const char*
+ _elm_bubble_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 || !strcmp(item, "default"))
+ {
+ return wd->label;
+ }
+ else if (!strcmp(item, "info"))
+ {
+ return wd->info;
+ }
+
+ return NULL;
+ }
+
EAPI Evas_Object *
elm_bubble_add(Evas_Object *parent)
{
evas_object_smart_callback_call(obj, "maxlength,reached", NULL);
}
- if (wd->text) return wd->text;
+ static void
+ _elm_entry_text_set(Evas_Object *obj, const char *item, const char *entry)
+ {
+ int len = 0;
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ if (item && strcmp(item, "default")) return;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ if (!entry) entry = "";
+ if (wd->text) eina_stringshare_del(wd->text);
+ wd->text = NULL;
+ wd->changed = EINA_TRUE;
+
+ /* Clear currently pending job if there is one */
+ 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;
+ }
+
+ len = strlen(entry);
+ /* Split to ~_CHUNK_SIZE chunks */
+ if (len > _CHUNK_SIZE)
+ {
+ wd->append_text_left = (char *) malloc(len + 1);
+ }
+
+ /* If we decided to use the idler */
+ if (wd->append_text_left)
+ {
+ /* Need to clear the entry first */
+ edje_object_part_text_set(wd->ent, "elm.text", "");
+ memcpy(wd->append_text_left, entry, len + 1);
+ wd->append_text_position = 0;
+ wd->append_text_len = len;
+ wd->append_text_idler = ecore_idler_add(_text_append_idler, obj);
+ }
+ else
+ {
+ edje_object_part_text_set(wd->ent, "elm.text", entry);
+ }
+ }
+
+ static const char *
+ _elm_entry_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;
+ const char *text;
+ if (!wd) return NULL;
++ if (wd->text)
++ {
++ if (wd->password)
++ return elm_entry_markup_to_utf8(wd->text);
++ else
++ return wd->text;
++ }
+ text = edje_object_part_text_get(wd->ent, "elm.text");
+ if (!text)
+ {
+ ERR("text=NULL for edje %p, part 'elm.text'", wd->ent);
+ return NULL;
+ }
+ eina_stringshare_replace(&wd->text, text);
++ if (wd->password) return elm_entry_markup_to_utf8(wd->text);
+ return wd->text;
+ }
+
/**
* This adds an entry to @p parent object.
*
}
/**
+ * 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;
+}
+
+/**
+ * Get the wrapping behavior of the entry.
+ * See also elm_entry_line_wrap_set().
+ *
+ * @param obj The entry object
+ * @return Wrap type
+ *
+ * @ingroup Entry
+ */
+ EAPI Elm_Wrap_Type
+ elm_entry_line_wrap_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->linewrap;
+ }
+
+ /**
* This sets the editable attribute of the entry.
*
* @param obj The entry object
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));
+ 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)
+ evas_object_smart_callback_call(it->base.widget, SIG_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);
}
char *_elm_util_mkup_to_text(const char *mkup);
char *_elm_util_text_to_mkup(const char *text);
+/* do not use except clipboard history module */
+EAPI Eina_Bool elm_cbhm_helper_init(Evas_Object *self);
+EAPI void elm_cbhm_send_raw_data(char *cmd);
+ Eina_Bool _elm_video_check(Evas_Object *video);
+
+
extern char *_elm_appname;
extern Elm_Config *_elm_config;
extern const char *_elm_data_dir;