forked from enlightenment/efl
elementary - fileselecto, actionslider, anchorview, fileselector_button, anchorblock, fileselector_entry, hoversel, scrolled_entry
SVN revision: 58254
This commit is contained in:
parent
0369dbff50
commit
0b74203480
|
@ -37,10 +37,10 @@ static const char *widtype = NULL;
|
|||
|
||||
static const char SIG_ANCHOR_CLICKED[] = "anchor,clicked";
|
||||
static const Evas_Smart_Cb_Description _signals[] = {
|
||||
{SIG_ANCHOR_CLICKED, ""}, /* TODO: declare the type properly, as data is
|
||||
* being passed
|
||||
*/
|
||||
{NULL, NULL}
|
||||
{SIG_ANCHOR_CLICKED, ""}, /* TODO: declare the type properly, as data is
|
||||
* being passed
|
||||
*/
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static void _del_pre_hook(Evas_Object *obj);
|
||||
|
@ -273,16 +273,16 @@ elm_anchorblock_text_set(Evas_Object *obj, const char *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
|
||||
*/
|
||||
* 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)
|
||||
{
|
||||
|
@ -406,7 +406,7 @@ elm_anchorblock_hover_end(Evas_Object *obj)
|
|||
* 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 anchorblock does.
|
||||
*
|
||||
*
|
||||
* @param obj The anchorblock object
|
||||
* @param func The function called to provide the item object
|
||||
* @param data The data passed to @p func
|
||||
|
@ -432,7 +432,7 @@ elm_anchorblock_item_provider_append(Evas_Object *obj, Evas_Object *(*func) (voi
|
|||
*
|
||||
* This prepends the given callback. See elm_anchorblock_item_provider_append() for
|
||||
* more information
|
||||
*
|
||||
*
|
||||
* @param obj The anchorblock object
|
||||
* @param func The function called to provide the item object
|
||||
* @param data The data passed to @p func
|
||||
|
@ -458,7 +458,7 @@ elm_anchorblock_item_provider_prepend(Evas_Object *obj, Evas_Object *(*func) (vo
|
|||
*
|
||||
* This removes the given callback. See elm_anchorblock_item_provider_append() for
|
||||
* more information
|
||||
*
|
||||
*
|
||||
* @param obj The anchorblock object
|
||||
* @param func The function called to provide the item object
|
||||
* @param data The data passed to @p func
|
||||
|
|
|
@ -34,10 +34,10 @@ static const char *widtype = NULL;
|
|||
|
||||
static const char SIG_ANCHOR_CLICKED[] = "anchor,clicked";
|
||||
static const Evas_Smart_Cb_Description _signals[] = {
|
||||
{SIG_ANCHOR_CLICKED, ""}, /* TODO: declare the type properly, as data is
|
||||
* being passed
|
||||
*/
|
||||
{NULL, NULL}
|
||||
{SIG_ANCHOR_CLICKED, ""}, /* TODO: declare the type properly, as data is
|
||||
* being passed
|
||||
*/
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static void _del_pre_hook(Evas_Object *obj);
|
||||
|
@ -175,7 +175,7 @@ _item_provider(void *data, Evas_Object *entry __UNUSED__, const char *item)
|
|||
Widget_Data *wd = elm_widget_data_get(data);
|
||||
Eina_List *l;
|
||||
Elm_Anchorview_Item_Provider *ip;
|
||||
|
||||
|
||||
EINA_LIST_FOREACH(wd->item_providers, l, ip)
|
||||
{
|
||||
Evas_Object *o;
|
||||
|
@ -202,7 +202,7 @@ elm_anchorview_add(Evas_Object *parent)
|
|||
Widget_Data *wd;
|
||||
|
||||
ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
|
||||
|
||||
|
||||
ELM_SET_WIDTYPE(widtype, "anchorview");
|
||||
elm_widget_type_set(obj, "anchorview");
|
||||
elm_widget_sub_object_add(parent, obj);
|
||||
|
@ -223,12 +223,12 @@ elm_anchorview_add(Evas_Object *parent)
|
|||
evas_object_show(wd->entry);
|
||||
|
||||
evas_object_event_callback_add(wd->entry, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
_changed_size_hints, obj);
|
||||
_changed_size_hints, obj);
|
||||
|
||||
elm_entry_entry_set(wd->entry, "");
|
||||
|
||||
evas_object_smart_callback_add(wd->entry, "anchor,clicked",
|
||||
_anchor_clicked, obj);
|
||||
_anchor_clicked, obj);
|
||||
|
||||
_mirrored_set(obj, elm_widget_mirrored_get(obj));
|
||||
_sizing_eval(obj);
|
||||
|
@ -240,18 +240,18 @@ elm_anchorview_add(Evas_Object *parent)
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the text markup of the anchorview
|
||||
*
|
||||
* This sets the text of the anchorview to be the text given as @p text. This
|
||||
* text is in markup format with \<a href=XXX\> beginning an achor with the
|
||||
* string link of 'XXX', and \</\> or \</a\> ending the link. Other markup can
|
||||
* be used dependign on the style support.
|
||||
*
|
||||
* @param obj The anchorview object
|
||||
* @param text The text to set, or NULL to clear
|
||||
*
|
||||
* @ingroup Anchorview
|
||||
*/
|
||||
* Set the text markup of the anchorview
|
||||
*
|
||||
* This sets the text of the anchorview to be the text given as @p text. This
|
||||
* text is in markup format with \<a href=XXX\> beginning an achor with the
|
||||
* string link of 'XXX', and \</\> or \</a\> ending the link. Other markup can
|
||||
* be used dependign on the style support.
|
||||
*
|
||||
* @param obj The anchorview object
|
||||
* @param text The text to set, or NULL to clear
|
||||
*
|
||||
* @ingroup Anchorview
|
||||
*/
|
||||
EAPI void
|
||||
elm_anchorview_text_set(Evas_Object *obj, const char *text)
|
||||
{
|
||||
|
@ -267,16 +267,16 @@ elm_anchorview_text_set(Evas_Object *obj, const char *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
|
||||
*/
|
||||
* 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)
|
||||
{
|
||||
|
@ -287,16 +287,16 @@ elm_anchorview_text_get(const Evas_Object *obj)
|
|||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
* 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)
|
||||
{
|
||||
|
@ -311,16 +311,16 @@ elm_anchorview_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the parent of the hover popup
|
||||
*
|
||||
* This gets the parent of the hover that anchorview will created. See hover
|
||||
* objects for more information on this.
|
||||
*
|
||||
* @param obj The anchorview object
|
||||
* @return The parent used by hover
|
||||
*
|
||||
* @ingroup Anchorview
|
||||
*/
|
||||
* Get the parent of the hover popup
|
||||
*
|
||||
* This gets the parent of the hover that anchorview will created. See hover
|
||||
* objects for more information on this.
|
||||
*
|
||||
* @param obj The anchorview object
|
||||
* @return The parent used by hover
|
||||
*
|
||||
* @ingroup Anchorview
|
||||
*/
|
||||
EAPI Evas_Object *
|
||||
elm_anchorview_hover_parent_get(const Evas_Object *obj)
|
||||
{
|
||||
|
@ -331,16 +331,16 @@ elm_anchorview_hover_parent_get(const Evas_Object *obj)
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the style that the hover should use
|
||||
*
|
||||
* This sets the style for the hover that anchorview will create. See hover
|
||||
* objects for more information
|
||||
*
|
||||
* @param obj The anchorview object
|
||||
* @param style The style to use
|
||||
*
|
||||
* @ingroup Anchorview
|
||||
*/
|
||||
* Set the style that the hover should use
|
||||
*
|
||||
* This sets the style for the hover that anchorview will create. See hover
|
||||
* objects for more information
|
||||
*
|
||||
* @param obj The anchorview object
|
||||
* @param style The style to use
|
||||
*
|
||||
* @ingroup Anchorview
|
||||
*/
|
||||
EAPI void
|
||||
elm_anchorview_hover_style_set(Evas_Object *obj, const char *style)
|
||||
{
|
||||
|
@ -371,14 +371,14 @@ elm_anchorview_hover_style_get(const Evas_Object *obj)
|
|||
}
|
||||
|
||||
/**
|
||||
* Stop the hover popup in the anchorview
|
||||
*
|
||||
* This will stop the hover popup in the anchorview if it is currently active.
|
||||
*
|
||||
* @param obj The anchorview object
|
||||
*
|
||||
* @ingroup Anchorview
|
||||
*/
|
||||
* Stop the hover popup in the anchorview
|
||||
*
|
||||
* This will stop the hover popup in the anchorview if it is currently active.
|
||||
*
|
||||
* @param obj The anchorview object
|
||||
*
|
||||
* @ingroup Anchorview
|
||||
*/
|
||||
EAPI void
|
||||
elm_anchorview_hover_end(Evas_Object *obj)
|
||||
{
|
||||
|
@ -439,7 +439,7 @@ elm_anchorview_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool
|
|||
* 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 anchorview does.
|
||||
*
|
||||
*
|
||||
* @param obj The anchorview object
|
||||
* @param func The function called to provide the item object
|
||||
* @param data The data passed to @p func
|
||||
|
@ -465,7 +465,7 @@ elm_anchorview_item_provider_append(Evas_Object *obj, Evas_Object *(*func) (void
|
|||
*
|
||||
* This prepends the given callback. See elm_anchorview_item_provider_append() for
|
||||
* more information
|
||||
*
|
||||
*
|
||||
* @param obj The anchorview object
|
||||
* @param func The function called to provide the item object
|
||||
* @param data The data passed to @p func
|
||||
|
@ -491,7 +491,7 @@ elm_anchorview_item_provider_prepend(Evas_Object *obj, Evas_Object *(*func) (voi
|
|||
*
|
||||
* This removes the given callback. See elm_anchorview_item_provider_append() for
|
||||
* more information
|
||||
*
|
||||
*
|
||||
* @param obj The anchorview object
|
||||
* @param func The function called to provide the item object
|
||||
* @param data The data passed to @p func
|
||||
|
|
|
@ -570,7 +570,7 @@ elm_fileselector_add(Evas_Object *parent)
|
|||
int s;
|
||||
|
||||
ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
|
||||
|
||||
|
||||
ELM_SET_WIDTYPE(widtype, "fileselector");
|
||||
elm_widget_type_set(obj, "fileselector");
|
||||
elm_widget_sub_object_add(parent, obj);
|
||||
|
@ -580,7 +580,7 @@ elm_fileselector_add(Evas_Object *parent)
|
|||
elm_widget_can_focus_set(obj, EINA_FALSE);
|
||||
|
||||
wd->expand = !!_elm_config->fileselector_expand_enable;
|
||||
|
||||
|
||||
wd->edje = edje_object_add(e);
|
||||
_elm_theme_object_set(obj, wd->edje, "fileselector", "base", "default");
|
||||
elm_widget_resize_object_set(obj, wd->edje);
|
||||
|
|
|
@ -18,12 +18,12 @@ struct _Widget_Data
|
|||
const char *window_title;
|
||||
Evas_Coord w, h;
|
||||
struct
|
||||
{
|
||||
const char *path;
|
||||
Eina_Bool expandable : 1;
|
||||
Eina_Bool folder_only : 1;
|
||||
Eina_Bool is_save : 1;
|
||||
} fsd;
|
||||
{
|
||||
const char *path;
|
||||
Eina_Bool expandable : 1;
|
||||
Eina_Bool folder_only : 1;
|
||||
Eina_Bool is_save : 1;
|
||||
} fsd;
|
||||
Eina_Bool inwin_mode : 1;
|
||||
};
|
||||
|
||||
|
@ -48,8 +48,8 @@ static void _activate(Widget_Data *wd);
|
|||
|
||||
static const char SIG_FILE_CHOSEN[] = "file,chosen";
|
||||
static const Evas_Smart_Cb_Description _signals[] = {
|
||||
{SIG_FILE_CHOSEN, "s"},
|
||||
{NULL, NULL}
|
||||
{SIG_FILE_CHOSEN, "s"},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -264,7 +264,7 @@ elm_fileselector_button_add(Evas_Object *parent)
|
|||
Widget_Data *wd;
|
||||
|
||||
ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
|
||||
|
||||
|
||||
ELM_SET_WIDTYPE(widtype, "fileselector_button");
|
||||
elm_widget_type_set(obj, "fileselector_button");
|
||||
elm_widget_sub_object_add(parent, obj);
|
||||
|
@ -284,7 +284,7 @@ elm_fileselector_button_add(Evas_Object *parent)
|
|||
wd->inwin_mode = _elm_config->inwin_dialogs_enable;
|
||||
wd->w = 400;
|
||||
wd->h = 400;
|
||||
|
||||
|
||||
wd->btn = elm_button_add(parent);
|
||||
elm_widget_mirrored_automatic_set(wd->btn, EINA_FALSE);
|
||||
elm_widget_resize_object_set(obj, wd->btn);
|
||||
|
|
|
@ -228,7 +228,7 @@ elm_fileselector_entry_add(Evas_Object *parent)
|
|||
Widget_Data *wd;
|
||||
|
||||
ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
|
||||
|
||||
|
||||
ELM_SET_WIDTYPE(widtype, "fileselector_entry");
|
||||
elm_widget_type_set(obj, "fileselector_entry");
|
||||
elm_widget_sub_object_add(parent, obj);
|
||||
|
@ -250,7 +250,7 @@ elm_fileselector_entry_add(Evas_Object *parent)
|
|||
edje_object_part_swallow(wd->edje, "elm.swallow.button", wd->button);
|
||||
elm_widget_sub_object_add(obj, wd->button);
|
||||
evas_object_event_callback_add
|
||||
(wd->button, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, obj);
|
||||
(wd->button, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, obj);
|
||||
elm_fileselector_button_expandable_set(wd->button,
|
||||
_elm_config->fileselector_expand_enable);
|
||||
|
||||
|
@ -269,7 +269,7 @@ elm_fileselector_entry_add(Evas_Object *parent)
|
|||
edje_object_part_swallow(wd->edje, "elm.swallow.entry", wd->entry);
|
||||
elm_widget_sub_object_add(obj, wd->entry);
|
||||
evas_object_event_callback_add
|
||||
(wd->entry, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, obj);
|
||||
(wd->entry, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, obj);
|
||||
|
||||
#define SIG_FWD(name) \
|
||||
evas_object_smart_callback_add(wd->entry, SIG_##name, _##name##_fwd, obj)
|
||||
|
|
|
@ -61,9 +61,9 @@ _del_pre_hook(Evas_Object *obj)
|
|||
EINA_LIST_FREE(wd->items, item)
|
||||
{
|
||||
elm_widget_item_pre_notify_del(item);
|
||||
eina_stringshare_del(item->label);
|
||||
eina_stringshare_del(item->icon_file);
|
||||
eina_stringshare_del(item->icon_group);
|
||||
eina_stringshare_del(item->label);
|
||||
eina_stringshare_del(item->icon_file);
|
||||
eina_stringshare_del(item->icon_group);
|
||||
elm_widget_item_del(item);
|
||||
}
|
||||
}
|
||||
|
@ -95,9 +95,9 @@ _theme_hook(Evas_Object *obj)
|
|||
|
||||
elm_hoversel_hover_end(obj);
|
||||
if (wd->horizontal)
|
||||
snprintf(buf, sizeof(buf), "hoversel_horizontal/%s", elm_widget_style_get(obj));
|
||||
snprintf(buf, sizeof(buf), "hoversel_horizontal/%s", elm_widget_style_get(obj));
|
||||
else
|
||||
snprintf(buf, sizeof(buf), "hoversel_vertical/%s", elm_widget_style_get(obj));
|
||||
snprintf(buf, sizeof(buf), "hoversel_vertical/%s", elm_widget_style_get(obj));
|
||||
elm_object_style_set(wd->btn, buf);
|
||||
elm_object_disabled_set(wd->btn, elm_widget_disabled_get(obj));
|
||||
_mirrored_set(obj, elm_widget_mirrored_get(obj));
|
||||
|
@ -187,9 +187,9 @@ _activate(Evas_Object *obj)
|
|||
bx = elm_box_add(wd->hover);
|
||||
elm_widget_mirrored_automatic_set(bx, EINA_FALSE);
|
||||
elm_box_homogenous_set(bx, 1);
|
||||
|
||||
|
||||
elm_box_horizontal_set(bx, wd->horizontal);
|
||||
|
||||
|
||||
if (wd->horizontal)
|
||||
snprintf(buf, sizeof(buf), "hoversel_horizontal_entry/%s",
|
||||
elm_widget_style_get(obj));
|
||||
|
@ -198,27 +198,27 @@ _activate(Evas_Object *obj)
|
|||
elm_widget_style_get(obj));
|
||||
EINA_LIST_FOREACH(wd->items, l, item)
|
||||
{
|
||||
bt = elm_button_add(wd->hover);
|
||||
bt = elm_button_add(wd->hover);
|
||||
elm_widget_mirrored_automatic_set(bt, EINA_FALSE);
|
||||
elm_widget_mirrored_set(bt, elm_widget_mirrored_get(obj));
|
||||
elm_object_style_set(bt, buf);
|
||||
elm_button_label_set(bt, item->label);
|
||||
if (item->icon_file)
|
||||
{
|
||||
ic = elm_icon_add(obj);
|
||||
elm_icon_scale_set(ic, 0, 1);
|
||||
if (item->icon_type == ELM_ICON_FILE)
|
||||
elm_icon_file_set(ic, item->icon_file, item->icon_group);
|
||||
else if (item->icon_type == ELM_ICON_STANDARD)
|
||||
elm_icon_standard_set(ic, item->icon_file);
|
||||
elm_button_icon_set(bt, ic);
|
||||
evas_object_show(ic);
|
||||
}
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_box_pack_end(bx, bt);
|
||||
evas_object_smart_callback_add(bt, "clicked", _item_clicked, item);
|
||||
evas_object_show(bt);
|
||||
elm_object_style_set(bt, buf);
|
||||
elm_button_label_set(bt, item->label);
|
||||
if (item->icon_file)
|
||||
{
|
||||
ic = elm_icon_add(obj);
|
||||
elm_icon_scale_set(ic, 0, 1);
|
||||
if (item->icon_type == ELM_ICON_FILE)
|
||||
elm_icon_file_set(ic, item->icon_file, item->icon_group);
|
||||
else if (item->icon_type == ELM_ICON_STANDARD)
|
||||
elm_icon_standard_set(ic, item->icon_file);
|
||||
elm_button_icon_set(bt, ic);
|
||||
evas_object_show(ic);
|
||||
}
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_box_pack_end(bx, bt);
|
||||
evas_object_smart_callback_add(bt, "clicked", _item_clicked, item);
|
||||
evas_object_show(bt);
|
||||
}
|
||||
|
||||
if (wd->horizontal)
|
||||
|
@ -236,7 +236,7 @@ _activate(Evas_Object *obj)
|
|||
evas_object_show(wd->hover);
|
||||
evas_object_smart_callback_call(obj, "clicked", NULL);
|
||||
|
||||
// if (wd->horizontal) evas_object_hide(wd->btn);
|
||||
// if (wd->horizontal) evas_object_hide(wd->btn);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -275,7 +275,7 @@ elm_hoversel_add(Evas_Object *parent)
|
|||
Widget_Data *wd;
|
||||
|
||||
ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
|
||||
|
||||
|
||||
ELM_SET_WIDTYPE(widtype, "hoversel");
|
||||
elm_widget_type_set(obj, "hoversel");
|
||||
elm_widget_sub_object_add(parent, obj);
|
||||
|
@ -293,7 +293,7 @@ elm_hoversel_add(Evas_Object *parent)
|
|||
wd->expanded = EINA_FALSE;
|
||||
elm_widget_resize_object_set(obj, wd->btn);
|
||||
evas_object_event_callback_add(wd->btn, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
_changed_size_hints, obj);
|
||||
_changed_size_hints, obj);
|
||||
evas_object_smart_callback_add(wd->btn, "clicked", _button_clicked, obj);
|
||||
elm_widget_sub_object_add(obj, wd->btn);
|
||||
|
||||
|
@ -321,7 +321,7 @@ elm_hoversel_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
|
|||
if (!wd) return;
|
||||
if (wd->hover_parent)
|
||||
evas_object_event_callback_del_full(wd->hover_parent, EVAS_CALLBACK_DEL,
|
||||
_parent_del, obj);
|
||||
_parent_del, obj);
|
||||
wd->hover_parent = parent;
|
||||
if (wd->hover_parent)
|
||||
evas_object_event_callback_add(wd->hover_parent, EVAS_CALLBACK_DEL,
|
||||
|
@ -539,7 +539,7 @@ elm_hoversel_expanded_get(const Evas_Object *obj)
|
|||
if (!wd) return EINA_FALSE;
|
||||
return (wd->hover) ? EINA_TRUE : EINA_FALSE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This will remove all the children items from the hoversel. (should not be
|
||||
* called while the hoversel is active; use elm_hoversel_expanded_get()
|
||||
|
|
|
@ -86,23 +86,23 @@ 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 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, ""},
|
||||
{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, ""},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -190,7 +190,7 @@ _signal_callback_add_hook(Evas_Object *obj, const char *emission, const char *so
|
|||
if (!wd) return;
|
||||
elm_object_signal_callback_add(wd->entry, emission, source, func_cb, data);
|
||||
elm_object_signal_callback_add(wd->scroller, emission, source, func_cb,
|
||||
data);
|
||||
data);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -364,7 +364,7 @@ elm_scrolled_entry_add(Evas_Object *parent)
|
|||
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);
|
||||
|
@ -496,13 +496,13 @@ elm_scrolled_entry_icon_unset(Evas_Object *obj)
|
|||
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);
|
||||
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;
|
||||
}
|
||||
|
@ -601,13 +601,13 @@ elm_scrolled_entry_end_unset(Evas_Object *obj)
|
|||
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);
|
||||
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;
|
||||
}
|
||||
|
@ -656,13 +656,13 @@ elm_scrolled_entry_single_line_set(Evas_Object *obj, Eina_Bool 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);
|
||||
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);
|
||||
elm_scroller_policy_set(wd->scroller, wd->policy_h, wd->policy_v);
|
||||
elm_scroller_content_min_limit(wd->scroller, 0, 0);
|
||||
}
|
||||
_sizing_eval(obj);
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ _del_hook(Evas_Object *obj)
|
|||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return;
|
||||
if (wd->drag_button_base)
|
||||
if (wd->drag_button_base)
|
||||
{
|
||||
evas_object_del(wd->drag_button_base);
|
||||
wd->drag_button_base = NULL;
|
||||
|
@ -88,7 +88,7 @@ _mirrored_set(Evas_Object *obj, Eina_Bool rtl)
|
|||
|
||||
if (!wd) return;
|
||||
if (edje_object_mirrored_get(wd->as) == rtl)
|
||||
return;
|
||||
return;
|
||||
|
||||
edje_object_mirrored_set(wd->as, rtl);
|
||||
if (!elm_widget_mirrored_get(obj))
|
||||
|
@ -131,7 +131,7 @@ _theme_hook(Evas_Object *obj)
|
|||
if (!wd) return;
|
||||
_elm_widget_mirrored_reload(obj);
|
||||
if (!edje_object_part_swallow_get(wd->as, "elm.drag_button_base"))
|
||||
edje_object_part_unswallow(wd->as, wd->drag_button_base);
|
||||
edje_object_part_unswallow(wd->as, wd->drag_button_base);
|
||||
|
||||
_elm_theme_object_set(obj, wd->as, "actionslider",
|
||||
"base", elm_widget_style_get(obj));
|
||||
|
@ -165,15 +165,15 @@ _drag_button_move_cb(void *data, Evas_Object *o __UNUSED__, const char *emission
|
|||
if (!wd->mouse_down) return;
|
||||
edje_object_part_drag_value_get(wd->as, "elm.drag_button_base", &pos, NULL);
|
||||
if (pos == 0.0)
|
||||
evas_object_smart_callback_call(obj, SIG_CHANGED,
|
||||
(void *) ((!elm_widget_mirrored_get(obj)) ?
|
||||
"left" : "right"));
|
||||
evas_object_smart_callback_call(obj, SIG_CHANGED,
|
||||
(void *) ((!elm_widget_mirrored_get(obj)) ?
|
||||
"left" : "right"));
|
||||
else if (pos == 1.0)
|
||||
evas_object_smart_callback_call(obj, SIG_CHANGED,
|
||||
(void *) ((!elm_widget_mirrored_get(obj)) ?
|
||||
"right" : "left"));
|
||||
evas_object_smart_callback_call(obj, SIG_CHANGED,
|
||||
(void *) ((!elm_widget_mirrored_get(obj)) ?
|
||||
"right" : "left"));
|
||||
else if (pos >= 0.45 && pos <= 0.55)
|
||||
evas_object_smart_callback_call(obj, SIG_CHANGED, (void *)"center");
|
||||
evas_object_smart_callback_call(obj, SIG_CHANGED, (void *)"center");
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -220,16 +220,16 @@ _button_animation(void *data)
|
|||
{
|
||||
if ((!wd->final_position) &&
|
||||
(wd->enabled_position & ELM_ACTIONSLIDER_LEFT))
|
||||
evas_object_smart_callback_call(data, SIG_SELECTED,
|
||||
(void *)wd->text_left);
|
||||
evas_object_smart_callback_call(data, SIG_SELECTED,
|
||||
(void *)wd->text_left);
|
||||
else if ((wd->final_position == 0.5) &&
|
||||
(wd->enabled_position & ELM_ACTIONSLIDER_CENTER))
|
||||
evas_object_smart_callback_call(data, SIG_SELECTED,
|
||||
(void *)wd->text_center);
|
||||
evas_object_smart_callback_call(data, SIG_SELECTED,
|
||||
(void *)wd->text_center);
|
||||
else if ((wd->final_position == 1) &&
|
||||
(wd->enabled_position & ELM_ACTIONSLIDER_RIGHT))
|
||||
evas_object_smart_callback_call(data, SIG_SELECTED,
|
||||
(void *)wd->text_right);
|
||||
evas_object_smart_callback_call(data, SIG_SELECTED,
|
||||
(void *)wd->text_right);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
return EINA_TRUE;
|
||||
|
@ -287,39 +287,39 @@ _drag_button_up_cb(void *data, Evas_Object *o __UNUSED__, const char *emission _
|
|||
if (position < 0.3)
|
||||
{
|
||||
if (wd->magnet_position & ELM_ACTIONSLIDER_LEFT)
|
||||
wd->final_position = _FINAL_POS_BY_ORIENTATION(0);
|
||||
wd->final_position = _FINAL_POS_BY_ORIENTATION(0);
|
||||
else if (wd->magnet_position & ELM_ACTIONSLIDER_CENTER)
|
||||
wd->final_position = 0.5;
|
||||
wd->final_position = 0.5;
|
||||
else if (wd->magnet_position & ELM_ACTIONSLIDER_RIGHT)
|
||||
wd->final_position = _FINAL_POS_BY_ORIENTATION(1);
|
||||
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;
|
||||
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);
|
||||
wd->final_position = _FINAL_POS_BY_ORIENTATION(0);
|
||||
else
|
||||
wd->final_position = _FINAL_POS_BY_ORIENTATION(1);
|
||||
wd->final_position = _FINAL_POS_BY_ORIENTATION(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (wd->magnet_position & ELM_ACTIONSLIDER_RIGHT)
|
||||
wd->final_position = _FINAL_POS_BY_ORIENTATION(1);
|
||||
wd->final_position = _FINAL_POS_BY_ORIENTATION(1);
|
||||
else
|
||||
wd->final_position = _FINAL_POS_BY_ORIENTATION(0);
|
||||
wd->final_position = _FINAL_POS_BY_ORIENTATION(0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (wd->magnet_position & ELM_ACTIONSLIDER_RIGHT)
|
||||
wd->final_position = _FINAL_POS_BY_ORIENTATION(1);
|
||||
wd->final_position = _FINAL_POS_BY_ORIENTATION(1);
|
||||
else if (wd->magnet_position & ELM_ACTIONSLIDER_CENTER)
|
||||
wd->final_position = 0.5;
|
||||
wd->final_position = 0.5;
|
||||
else
|
||||
wd->final_position = _FINAL_POS_BY_ORIENTATION(0);
|
||||
wd->final_position = _FINAL_POS_BY_ORIENTATION(0);
|
||||
}
|
||||
wd->button_animator = ecore_animator_add(_button_animation, data);
|
||||
|
||||
|
@ -342,7 +342,7 @@ elm_actionslider_add(Evas_Object *parent)
|
|||
Evas *e;
|
||||
|
||||
ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
|
||||
|
||||
|
||||
ELM_SET_WIDTYPE(widtype, "actionslider");
|
||||
elm_widget_type_set(obj, "actionslider");
|
||||
elm_widget_sub_object_add(parent, obj);
|
||||
|
@ -416,11 +416,11 @@ elm_actionslider_indicator_pos_get(const Evas_Object *obj)
|
|||
|
||||
edje_object_part_drag_value_get(wd->as, "elm.drag_button_base", &position, NULL);
|
||||
if (position < 0.3)
|
||||
return _get_pos_by_orientation(obj, ELM_ACTIONSLIDER_LEFT);
|
||||
return _get_pos_by_orientation(obj, ELM_ACTIONSLIDER_LEFT);
|
||||
else if (position < 0.7)
|
||||
return ELM_ACTIONSLIDER_CENTER;
|
||||
return ELM_ACTIONSLIDER_CENTER;
|
||||
else
|
||||
return _get_pos_by_orientation(obj, ELM_ACTIONSLIDER_RIGHT);
|
||||
return _get_pos_by_orientation(obj, ELM_ACTIONSLIDER_RIGHT);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -573,15 +573,15 @@ elm_actionslider_selected_label_get(const Evas_Object *obj)
|
|||
|
||||
if ((wd->final_position == 0.0) &&
|
||||
(wd->enabled_position & ELM_ACTIONSLIDER_LEFT))
|
||||
return wd->text_left;
|
||||
return wd->text_left;
|
||||
|
||||
if ((wd->final_position == 0.5) &&
|
||||
(wd->enabled_position & ELM_ACTIONSLIDER_CENTER))
|
||||
return wd->text_center;
|
||||
return wd->text_center;
|
||||
|
||||
if ((wd->final_position == 1.0) &&
|
||||
(wd->enabled_position & ELM_ACTIONSLIDER_RIGHT))
|
||||
return wd->text_right;
|
||||
return wd->text_right;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -594,7 +594,7 @@ elm_actionslider_selected_label_get(const Evas_Object *obj)
|
|||
*
|
||||
* @ingroup Actionslider
|
||||
*/
|
||||
EAPI void
|
||||
EAPI void
|
||||
elm_actionslider_indicator_label_set(Evas_Object *obj, const char *label)
|
||||
{
|
||||
ELM_CHECK_WIDTYPE(obj, widtype);
|
||||
|
|
Loading…
Reference in New Issue