elm_list: remove all legacy usage from eo files

this takes the current generated output from eolian for legacy code in
efl and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8181
This commit is contained in:
Mike Blumenkrantz 2019-03-05 17:00:37 -05:00 committed by Cedric BAIL
parent 5eb1d61459
commit 3448b7933f
16 changed files with 2262 additions and 573 deletions

View File

@ -172,7 +172,7 @@ elementary_eolian_blacklisted_files = \
lib/elementary/elm_web.eo.cs \
lib/elementary/elm_map.eo.cs \
lib/elementary/elm_combobox.eo.cs \
lib/elementary/elm_list.eo.cs \
lib/elementary/elm_list_eo.cs \
lib/elementary/elm_genlist_eo.cs \
lib/elementary/elm_view_list.eo.cs \
lib/elementary/elm_genlist_item_eo.cs \

View File

@ -186,7 +186,6 @@ elm_private_eolian_files = \
# Legacy classes - not part of public EO API
elm_legacy_eolian_files = \
lib/elementary/efl_ui_clock_legacy.eo \
lib/elementary/elm_list.eo \
lib/elementary/elm_map.eo \
lib/elementary/elm_map_pan.eo \
lib/elementary/elm_menu.eo \
@ -203,7 +202,6 @@ elm_legacy_eolian_files = \
lib/elementary/elm_systray.eo \
lib/elementary/elm_menu_item.eo \
lib/elementary/elm_widget_item_static_focus.eo \
lib/elementary/elm_list_item.eo \
lib/elementary/elm_popup_item.eo \
lib/elementary/elm_ctxpopup_part.eo \
lib/elementary/elm_dayselector_part.eo \
@ -364,6 +362,10 @@ lib/elementary/elm_inwin_eo.c \
lib/elementary/elm_inwin_eo.legacy.c \
lib/elementary/elm_label_eo.c \
lib/elementary/elm_label_eo.legacy.c \
lib/elementary/elm_list_eo.c \
lib/elementary/elm_list_eo.legacy.c \
lib/elementary/elm_list_item_eo.c \
lib/elementary/elm_list_item_eo.legacy.c \
$(NULL)
elm_legacy_eo_headers = \
@ -495,6 +497,10 @@ lib/elementary/elm_inwin_eo.h \
lib/elementary/elm_inwin_eo.legacy.h \
lib/elementary/elm_label_eo.h \
lib/elementary/elm_label_eo.legacy.h \
lib/elementary/elm_list_eo.h \
lib/elementary/elm_list_eo.legacy.h \
lib/elementary/elm_list_item_eo.h \
lib/elementary/elm_list_item_eo.legacy.h \
$(NULL)

View File

@ -3213,5 +3213,5 @@ ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(elm_list, Elm_List_Data)
ELM_LAYOUT_SIZING_EVAL_OPS(elm_list), \
EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_list)
#include "elm_list.eo.c"
#include "elm_list_item.eo.c"
#include "elm_list_eo.c"
#include "elm_list_item_eo.c"

View File

@ -1,439 +0,0 @@
import elm_general;
class Elm.List extends Efl.Ui.Layout_Base implements Elm.Interface_Scrollable,
Efl.Access.Widget.Action, Efl.Access.Selection, Efl.Access.Object,
Efl.Ui.Clickable, Efl.Ui.Selectable, Efl.Ui.Legacy, Elm.Widget_Item_Container
{
[[Elementary list class]]
legacy_prefix: elm_list;
eo_prefix: elm_obj_list;
event_prefix: elm_list;
methods {
@property horizontal {
[[Control horizontal mode on the list object.
Note: Vertical mode is set by default.
On horizontal mode items are displayed on list from left to right,
instead of from top to bottom. Also, the list will scroll horizontally.
Each item will presents left icon on top and right icon, or end, at
the bottom.]]
set {
}
get {
}
values {
horizontal: bool; [[$true to enable horizontal or $false to disable it, i.e., to enable vertical mode.]]
}
}
@property select_mode {
[[Control the list select mode.
elm_list_select_mode_set() changes item select mode in the list widget.
- #ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func and
callback when first becoming selected. Any further clicks will
do nothing, unless you set always select mode.
- #ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected,
every click will make the selected callbacks be called.
- #ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items
entirely and they will neither appear selected nor call selected
callback functions.]]
set {
}
get {
}
values {
mode: Elm.Object.Select_Mode(Elm.Object.Select_Mode.max); [[The select mode]]
}
}
@property focus_on_selection {
[[Control focus upon items selection mode
When enabled, every selection of an item inside the genlist will automatically set focus to
its first focusable widget from the left. This is true of course if the selection was made by
clicking an unfocusable area in an item or selecting it with a key movement. Clicking on a
focusable widget inside an item will cause this particular item to get focus as usual.]]
set {
}
get {
}
values {
enabled: bool; [[The tree effect status ($true = enabled, $false = disabled)]]
}
}
@property multi_select {
[[Control multiple items selection on the list object.
Disabled by default. If disabled, the user can select a single item of
the list each time. Selected items are highlighted on list.
If enabled, many items can be selected.
If a selected item is selected again, it will be unselected.]]
set {
}
get {
}
values {
multi: bool; [[$true to enable multi selection or $false to disable it.]]
}
}
@property multi_select_mode {
[[Control the list multi select mode.
- #ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT : select/unselect items whenever each
item is clicked.
- #ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL : Only one item will be selected
although multi-selection is enabled, if clicked without pressing control
key. This mode is only available with multi-selection.
See: @.multi_select
@since 1.8]]
set {
}
get {
}
values {
mode: Elm.Object.Multi_Select_Mode(Elm.Object.Multi_Select_Mode.max); [[The multi select mode]]
}
}
@property mode {
[[Control which mode to use for the list object.
Set list's resize behavior, transverse axis scroll and
items cropping. See each mode's description for more details.
Note: Default value is #ELM_LIST_SCROLL.
Only one mode at a time can be set. If a previous one was set, it
will be changed by the new mode after this call. Bitmasks won't
work here as well.
Warning: This function's behavior will clash with those of
elm_scroller_content_min_limit(), so use either one of them, but
not both.]]
set {
}
get {
}
values {
mode: Elm.List.Mode(Elm.List.Mode.last); [[One of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL, #ELM_LIST_LIMIT or #ELM_LIST_EXPAND.]]
}
}
@property selected_item {
get {
[[Get the selected item.
The selected item can be unselected with function
elm_list_item_selected_set().
The selected item always will be highlighted on list.]]
return: Elm.Widget.Item; [[The selected list item.]]
}
}
@property items {
get {
[[Get a list of all the list items.]]
return: const(list<Elm.Widget.Item>); [[A $list of list items, #Elm.Widget.Item, or $NULL on failure.]]
}
}
@property first_item {
get {
[[Get the first item in the list
This returns the first item in the list.]]
return: Elm.Widget.Item; [[The first item, or NULL if none]]
}
}
@property selected_items {
get {
[[Return a list of the currently selected list items.
Multiple items can be selected if multi select is enabled. It can be
done with elm_list_multi_select_set().]]
return: const(list<Elm.Widget.Item>); [[An $list of list items, #Elm.Widget.Item, or $NULL on failure.]]
}
}
@property last_item {
get {
[[Get the last item in the list
This returns the last item in the list.]]
return: Elm.Widget.Item; [[The last item, or NULL if none]]
}
}
item_insert_before {
[[Insert a new item into the list object before item $before.
A new item will be created and added to the list. Its position in
this list will be just before item $before.
Items created with this method can be deleted with elm_object_item_del().
Associated $data can be properly freed when item is deleted if a
callback function is set with elm_object_item_del_cb_set().
If a function is passed as argument, it will be called every time this item
is selected, i.e., the user clicks over an unselected item.
If always select is enabled it will call this function every time
user clicks over an item (already selected or not).
If such function isn't needed, just passing
$NULL as $func is enough. The same should be done for $data.
Note: Remember that the label parameter is copied inside the list. So if an
application dynamically allocated the label, the application should free the
label after this call.]]
return: Elm.Widget.Item; [[The created item or $NULL upon failure.]]
params {
@in before: Elm.Widget.Item; [[The list item to insert before.]]
@in label: string; [[The label of the list item.]]
@in icon: Efl.Canvas.Object @optional; [[The icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().]]
@in end: Efl.Canvas.Object @optional; [[The icon object to use for the right side of the item. An icon can be any Evas object.]]
@in func: Evas_Smart_Cb @optional; [[The function to call when the item is clicked.]]
@in data: const(void_ptr) @optional; [[The data to associate with the item for related callbacks.]]
}
}
go {
[[Starts the list.
Note: Call before running show() on the list object.
Warning: If not called, it won't display the list properly.]]
/* FIXME-doc
@code
li = elm_list_add(win);
elm_list_item_append(li, "First", NULL, NULL, NULL, NULL);
elm_list_item_append(li, "Second", NULL, NULL, NULL, NULL);
elm_list_go(li);
evas_object_show(li);
@endcode */
}
item_insert_after {
[[Insert a new item into the list object after item $after.
A new item will be created and added to the list. Its position in
this list will be just after item $after.
Items created with this method can be deleted with elm_object_item_del().
Associated $data can be properly freed when item is deleted if a
callback function is set with elm_object_item_del_cb_set().
If a function is passed as argument, it will be called every time this item
is selected, i.e., the user clicks over an unselected item.
If always select is enabled it will call this function every time
user clicks over an item (already selected or not).
If such function isn't needed, just passing
$NULL as $func is enough. The same should be done for $data.
Note: Remember that the label parameter is copied inside the list. So if an
application dynamically allocated the label, the application should free the
label after this call.]]
return: Elm.Widget.Item; [[The created item or $NULL upon failure.]]
params {
@in after: Elm.Widget.Item; [[The list item to insert after.]]
@in label: string; [[The label of the list item.]]
@in icon: Efl.Canvas.Object @optional; [[The icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().]]
@in end: Efl.Canvas.Object @optional; [[The icon object to use for the right side of the item. An icon can be any Evas object.]]
@in func: Evas_Smart_Cb @optional; [[The function to call when the item is clicked.]]
@in data: const(void_ptr) @optional; [[The data to associate with the item for related callbacks.]]
}
}
at_xy_item_get @const {
[[Get the item that is at the x, y canvas coords.
This returns the item at the given coordinates (which are canvas
relative, not object-relative). If an item is at that coordinate,
that item handle is returned, and if $posret is not NULL, the
integer pointed to is set to a value of -1, 0 or 1, depending if
the coordinate is on the upper portion of that item (-1), on the
middle section (0) or on the lower part (1). If NULL is returned as
an item (no item found there), then posret may indicate -1 or 1
based if the coordinate is above or below all items respectively in
the list.]]
return: Elm.Widget.Item; [[The item at the coordinates or NULL if none]]
params {
@in x: int; [[The input x coordinate]]
@in y: int; [[The input y coordinate]]
@out posret: int; [[The position relative to the item returned here]]
}
}
item_append {
[[Append a new item to the list object.
A new item will be created and appended to the list, i.e., will
be set as last item.
Items created with this method can be deleted with elm_object_item_del().
Associated $data can be properly freed when item is deleted if a
callback function is set with elm_object_item_del_cb_set().
If a function is passed as argument, it will be called every time this item
is selected, i.e., the user clicks over an unselected item.
If always select is enabled it will call this function every time
user clicks over an item (already selected or not).
If such function isn't needed, just passing
$NULL as $func is enough. The same should be done for $data.
Note: Remember that the label parameter is copied inside the list. So if an
application dynamically allocated the label, the application should free the
label after this call.]]
/* FIXME-doc
Simple example (with no function callback or data associated):
@code
li = elm_list_add(win);
ic = elm_icon_add(win);
elm_image_file_set(ic, "path/to/image", NULL);
elm_icon_resizable_set(ic, true, true);
elm_list_item_append(li, "label", ic, NULL, NULL, NULL);
elm_list_go(li);
evas_object_show(li);
@endcode
@see elm_list_select_mode_set()
@see elm_object_item_del()
@see elm_object_item_del_cb_set()
@see elm_list_clear()
@see elm_icon_add()
*/
return: Elm.Widget.Item; [[The created item or $NULL upon failure.]]
params {
@in label: string; [[The label of the list item.]]
@in icon: Efl.Canvas.Object @optional; [[The icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().]]
@in end: Efl.Canvas.Object @optional; [[The icon object to use for the right side of the item. An icon can be any Evas object.]]
@in func: Evas_Smart_Cb @optional; [[The function to call when the item is clicked.]]
@in data: const(void_ptr) @optional; [[The data to associate with the item for related callbacks.]]
}
}
item_prepend {
[[Prepend a new item to the list object.
A new item will be created and prepended to the list, i.e., will
be set as first item.
Items created with this method can be deleted with elm_object_item_del().
Associated $data can be properly freed when item is deleted if a
callback function is set with elm_object_item_del_cb_set().
If a function is passed as argument, it will be called every time this item
is selected, i.e., the user clicks over an unselected item.
If always select is enabled it will call this function every time
user clicks over an item (already selected or not).
If such function isn't needed, just passing
$NULL as $func is enough. The same should be done for $data.
Note: Remember that the label parameter is copied inside the list. So if an
application dynamically allocated the label, the application should free the
label after this call.]]
return: Elm.Widget.Item; [[The created item or $NULL upon failure.]]
params {
@in label: string; [[The label of the list item.]]
@in icon: Efl.Canvas.Object @optional; [[The icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().]]
@in end: Efl.Canvas.Object @optional; [[The icon object to use for the right side of the item. An icon can be any Evas object.]]
@in func: Evas_Smart_Cb @optional; [[The function to call when the item is clicked.]]
@in data: const(void_ptr) @optional; [[The data to associate with the item for related callbacks.]]
}
}
clear {
[[Remove all list's items.]]
}
item_sorted_insert {
[[Insert a new item into the sorted list object.
Note: This function inserts values into a list object assuming it was
sorted and the result will be sorted.
A new item will be created and added to the list. Its position in
this list will be found comparing the new item with previously inserted
items using function $cmp_func.
Items created with this method can be deleted with elm_object_item_del().
Associated $data can be properly freed when item is deleted if a
callback function is set with elm_object_item_del_cb_set().
If a function is passed as argument, it will be called every time this item
is selected, i.e., the user clicks over an unselected item.
If always select is enabled it will call this function every time
user clicks over an item (already selected or not).
If such function isn't needed, just passing
$NULL as $func is enough. The same should be done for $data.
Note: Remember that the label parameter is copied inside the list. So if an
application dynamically allocated the label, the application should free the
label after this call.]]
return: Elm.Widget.Item; [[The created item or $NULL upon failure.]]
params {
@in label: string; [[The label of the list item.]]
@in icon: Efl.Canvas.Object @optional; [[The icon object to use for the left side of the item. An icon can be any Evas object, but usually it is an icon created with elm_icon_add().]]
@in end: Efl.Canvas.Object @optional; [[The icon object to use for the right side of the item. An icon can be any Evas object.]]
@in func: Evas_Smart_Cb @optional; [[The function to call when the item is clicked.]]
@in data: const(void_ptr) @optional; [[The data to associate with the item for related callbacks.]]
@in cmp_func: Eina_Compare_Cb; [[The comparing function to be used to sort list
items by #Elm.Widget.Item item handles. This function will
receive two items and compare them, returning a non-negative integer
if the second item should be place after the first, or negative value
if should be placed before.]]
}
}
}
implements {
class.constructor;
Efl.Object.constructor;
Efl.Gfx.Entity.position { set; }
Efl.Gfx.Entity.size { set; }
Efl.Canvas.Group.group_member_add;
Efl.Ui.Widget.theme_apply;
Efl.Ui.Widget.on_access_update;
Efl.Ui.Widget.focus_highlight_geometry { get; }
Efl.Ui.Widget.disabled {set;}
Efl.Ui.Focus.Object.on_focus_update;
Efl.Ui.L10n.translation_update;
Efl.Ui.Widget.widget_sub_object_del;
Efl.Ui.Widget.widget_input_event_handler;
Elm.Widget_Item_Container.focused_item { get; }
Efl.Ui.Widget.focus_state_apply;
Elm.Interface_Scrollable.item_loop_enabled { get; set; }
Elm.Interface_Scrollable.policy { set; }
Efl.Access.Widget.Action.elm_actions { get; }
Efl.Access.Object.access_children { get; }
Efl.Access.Selection.selected_children_count { get; }
Efl.Access.Selection.selected_child { get; }
Efl.Access.Selection.selected_child_deselect;
Efl.Access.Selection.child_select;
Efl.Access.Selection.child_deselect;
Efl.Access.Selection.is_child_selected;
Efl.Access.Selection.all_children_select;
Efl.Access.Selection.access_selection_clear;
}
events {
activated: Efl.Object; [[Called when activated]]
edge,top: void; [[Called when top edge was reached]]
edge,bottom: void; [[Called when bottom edge was reached]]
edge,left: void; [[Called when left edge was reached]]
edge,right: void; [[Called when right edge was reached]]
swipe: Efl.Object; [[Called when swipe is detected]]
highlighted: Efl.Object; [[Called when highlighted]]
unhighlighted: Efl.Object; [[Called when no longer highlighted]]
item,focused: Efl.Object; [[Called when item got focus]]
item,unfocused: Efl.Object; [[Called when item no longer has focus]]
/* FIXME: Nobody emits these
item,reorder,anim,start; [[Called when item reorder animation started]]
item,reorder,anim,stop; [[Called when item reorder animation stopped]]
*/
}
}

View File

@ -0,0 +1,368 @@
EWAPI const Efl_Event_Description _ELM_LIST_EVENT_ACTIVATED =
EFL_EVENT_DESCRIPTION("activated");
EWAPI const Efl_Event_Description _ELM_LIST_EVENT_EDGE_TOP =
EFL_EVENT_DESCRIPTION("edge,top");
EWAPI const Efl_Event_Description _ELM_LIST_EVENT_EDGE_BOTTOM =
EFL_EVENT_DESCRIPTION("edge,bottom");
EWAPI const Efl_Event_Description _ELM_LIST_EVENT_EDGE_LEFT =
EFL_EVENT_DESCRIPTION("edge,left");
EWAPI const Efl_Event_Description _ELM_LIST_EVENT_EDGE_RIGHT =
EFL_EVENT_DESCRIPTION("edge,right");
EWAPI const Efl_Event_Description _ELM_LIST_EVENT_SWIPE =
EFL_EVENT_DESCRIPTION("swipe");
EWAPI const Efl_Event_Description _ELM_LIST_EVENT_HIGHLIGHTED =
EFL_EVENT_DESCRIPTION("highlighted");
EWAPI const Efl_Event_Description _ELM_LIST_EVENT_UNHIGHLIGHTED =
EFL_EVENT_DESCRIPTION("unhighlighted");
EWAPI const Efl_Event_Description _ELM_LIST_EVENT_ITEM_FOCUSED =
EFL_EVENT_DESCRIPTION("item,focused");
EWAPI const Efl_Event_Description _ELM_LIST_EVENT_ITEM_UNFOCUSED =
EFL_EVENT_DESCRIPTION("item,unfocused");
void _elm_list_horizontal_set(Eo *obj, Elm_List_Data *pd, Eina_Bool horizontal);
static Eina_Error
__eolian_elm_list_horizontal_set_reflect(Eo *obj, Eina_Value val)
{
Eina_Error r = 0; Eina_Bool cval;
if (!eina_value_bool_convert(&val, &cval))
{
r = EINA_ERROR_VALUE_FAILED;
goto end;
}
elm_obj_list_horizontal_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_list_horizontal_set, EFL_FUNC_CALL(horizontal), Eina_Bool horizontal);
Eina_Bool _elm_list_horizontal_get(const Eo *obj, Elm_List_Data *pd);
static Eina_Value
__eolian_elm_list_horizontal_get_reflect(Eo *obj)
{
Eina_Bool val = elm_obj_list_horizontal_get(obj);
return eina_value_bool_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_obj_list_horizontal_get, Eina_Bool, 0);
void _elm_list_select_mode_set(Eo *obj, Elm_List_Data *pd, Elm_Object_Select_Mode mode);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_list_select_mode_set, EFL_FUNC_CALL(mode), Elm_Object_Select_Mode mode);
Elm_Object_Select_Mode _elm_list_select_mode_get(const Eo *obj, Elm_List_Data *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_list_select_mode_get, Elm_Object_Select_Mode, 4 /* Elm.Object.Select_Mode.max */);
void _elm_list_focus_on_selection_set(Eo *obj, Elm_List_Data *pd, Eina_Bool enabled);
static Eina_Error
__eolian_elm_list_focus_on_selection_set_reflect(Eo *obj, Eina_Value val)
{
Eina_Error r = 0; Eina_Bool cval;
if (!eina_value_bool_convert(&val, &cval))
{
r = EINA_ERROR_VALUE_FAILED;
goto end;
}
elm_obj_list_focus_on_selection_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_list_focus_on_selection_set, EFL_FUNC_CALL(enabled), Eina_Bool enabled);
Eina_Bool _elm_list_focus_on_selection_get(const Eo *obj, Elm_List_Data *pd);
static Eina_Value
__eolian_elm_list_focus_on_selection_get_reflect(Eo *obj)
{
Eina_Bool val = elm_obj_list_focus_on_selection_get(obj);
return eina_value_bool_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_obj_list_focus_on_selection_get, Eina_Bool, 0);
void _elm_list_multi_select_set(Eo *obj, Elm_List_Data *pd, Eina_Bool multi);
static Eina_Error
__eolian_elm_list_multi_select_set_reflect(Eo *obj, Eina_Value val)
{
Eina_Error r = 0; Eina_Bool cval;
if (!eina_value_bool_convert(&val, &cval))
{
r = EINA_ERROR_VALUE_FAILED;
goto end;
}
elm_obj_list_multi_select_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_list_multi_select_set, EFL_FUNC_CALL(multi), Eina_Bool multi);
Eina_Bool _elm_list_multi_select_get(const Eo *obj, Elm_List_Data *pd);
static Eina_Value
__eolian_elm_list_multi_select_get_reflect(Eo *obj)
{
Eina_Bool val = elm_obj_list_multi_select_get(obj);
return eina_value_bool_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_obj_list_multi_select_get, Eina_Bool, 0);
void _elm_list_multi_select_mode_set(Eo *obj, Elm_List_Data *pd, Elm_Object_Multi_Select_Mode mode);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_list_multi_select_mode_set, EFL_FUNC_CALL(mode), Elm_Object_Multi_Select_Mode mode);
Elm_Object_Multi_Select_Mode _elm_list_multi_select_mode_get(const Eo *obj, Elm_List_Data *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_list_multi_select_mode_get, Elm_Object_Multi_Select_Mode, 2 /* Elm.Object.Multi_Select_Mode.max */);
void _elm_list_mode_set(Eo *obj, Elm_List_Data *pd, Elm_List_Mode mode);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_list_mode_set, EFL_FUNC_CALL(mode), Elm_List_Mode mode);
Elm_List_Mode _elm_list_mode_get(const Eo *obj, Elm_List_Data *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_list_mode_get, Elm_List_Mode, 4 /* Elm.List.Mode.last */);
Elm_Widget_Item *_elm_list_selected_item_get(const Eo *obj, Elm_List_Data *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_list_selected_item_get, Elm_Widget_Item *, NULL);
const Eina_List *_elm_list_items_get(const Eo *obj, Elm_List_Data *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_list_items_get, const Eina_List *, NULL);
Elm_Widget_Item *_elm_list_first_item_get(const Eo *obj, Elm_List_Data *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_list_first_item_get, Elm_Widget_Item *, NULL);
const Eina_List *_elm_list_selected_items_get(const Eo *obj, Elm_List_Data *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_list_selected_items_get, const Eina_List *, NULL);
Elm_Widget_Item *_elm_list_last_item_get(const Eo *obj, Elm_List_Data *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_list_last_item_get, Elm_Widget_Item *, NULL);
Elm_Widget_Item *_elm_list_item_insert_before(Eo *obj, Elm_List_Data *pd, Elm_Widget_Item *before, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data);
EOAPI EFL_FUNC_BODYV(elm_obj_list_item_insert_before, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(before, label, icon, end, func, data), Elm_Widget_Item *before, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data);
void _elm_list_go(Eo *obj, Elm_List_Data *pd);
EOAPI EFL_VOID_FUNC_BODY(elm_obj_list_go);
Elm_Widget_Item *_elm_list_item_insert_after(Eo *obj, Elm_List_Data *pd, Elm_Widget_Item *after, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data);
EOAPI EFL_FUNC_BODYV(elm_obj_list_item_insert_after, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(after, label, icon, end, func, data), Elm_Widget_Item *after, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data);
Elm_Widget_Item *_elm_list_at_xy_item_get(const Eo *obj, Elm_List_Data *pd, int x, int y, int *posret);
EOAPI EFL_FUNC_BODYV_CONST(elm_obj_list_at_xy_item_get, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(x, y, posret), int x, int y, int *posret);
Elm_Widget_Item *_elm_list_item_append(Eo *obj, Elm_List_Data *pd, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data);
EOAPI EFL_FUNC_BODYV(elm_obj_list_item_append, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(label, icon, end, func, data), const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data);
Elm_Widget_Item *_elm_list_item_prepend(Eo *obj, Elm_List_Data *pd, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data);
EOAPI EFL_FUNC_BODYV(elm_obj_list_item_prepend, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(label, icon, end, func, data), const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data);
void _elm_list_clear(Eo *obj, Elm_List_Data *pd);
EOAPI EFL_VOID_FUNC_BODY(elm_obj_list_clear);
Elm_Widget_Item *_elm_list_item_sorted_insert(Eo *obj, Elm_List_Data *pd, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func);
EOAPI EFL_FUNC_BODYV(elm_obj_list_item_sorted_insert, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(label, icon, end, func, data, cmp_func), const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func);
Efl_Object *_elm_list_efl_object_constructor(Eo *obj, Elm_List_Data *pd);
void _elm_list_efl_gfx_entity_position_set(Eo *obj, Elm_List_Data *pd, Eina_Position2D pos);
void _elm_list_efl_gfx_entity_size_set(Eo *obj, Elm_List_Data *pd, Eina_Size2D size);
void _elm_list_efl_canvas_group_group_member_add(Eo *obj, Elm_List_Data *pd, Efl_Canvas_Object *sub_obj);
Eina_Error _elm_list_efl_ui_widget_theme_apply(Eo *obj, Elm_List_Data *pd);
void _elm_list_efl_ui_widget_on_access_update(Eo *obj, Elm_List_Data *pd, Eina_Bool enable);
Eina_Rect _elm_list_efl_ui_widget_focus_highlight_geometry_get(const Eo *obj, Elm_List_Data *pd);
void _elm_list_efl_ui_widget_disabled_set(Eo *obj, Elm_List_Data *pd, Eina_Bool disabled);
Eina_Bool _elm_list_efl_ui_focus_object_on_focus_update(Eo *obj, Elm_List_Data *pd);
void _elm_list_efl_ui_l10n_translation_update(Eo *obj, Elm_List_Data *pd);
Eina_Bool _elm_list_efl_ui_widget_widget_sub_object_del(Eo *obj, Elm_List_Data *pd, Efl_Canvas_Object *sub_obj);
Eina_Bool _elm_list_efl_ui_widget_widget_input_event_handler(Eo *obj, Elm_List_Data *pd, const Efl_Event *eo_event, Efl_Canvas_Object *source);
Elm_Widget_Item *_elm_list_elm_widget_item_container_focused_item_get(const Eo *obj, Elm_List_Data *pd);
Eina_Bool _elm_list_efl_ui_widget_focus_state_apply(Eo *obj, Elm_List_Data *pd, Efl_Ui_Widget_Focus_State current_state, Efl_Ui_Widget_Focus_State *configured_state, Efl_Ui_Widget *redirect);
void _elm_list_elm_interface_scrollable_item_loop_enabled_set(Eo *obj, Elm_List_Data *pd, Eina_Bool enable);
Eina_Bool _elm_list_elm_interface_scrollable_item_loop_enabled_get(const Eo *obj, Elm_List_Data *pd);
void _elm_list_elm_interface_scrollable_policy_set(Eo *obj, Elm_List_Data *pd, Elm_Scroller_Policy hbar, Elm_Scroller_Policy vbar);
const Efl_Access_Action_Data *_elm_list_efl_access_widget_action_elm_actions_get(const Eo *obj, Elm_List_Data *pd);
Eina_List *_elm_list_efl_access_object_access_children_get(const Eo *obj, Elm_List_Data *pd);
int _elm_list_efl_access_selection_selected_children_count_get(const Eo *obj, Elm_List_Data *pd);
Efl_Object *_elm_list_efl_access_selection_selected_child_get(const Eo *obj, Elm_List_Data *pd, int selected_child_index);
Eina_Bool _elm_list_efl_access_selection_selected_child_deselect(Eo *obj, Elm_List_Data *pd, int child_index);
Eina_Bool _elm_list_efl_access_selection_child_select(Eo *obj, Elm_List_Data *pd, int child_index);
Eina_Bool _elm_list_efl_access_selection_child_deselect(Eo *obj, Elm_List_Data *pd, int child_index);
Eina_Bool _elm_list_efl_access_selection_is_child_selected(Eo *obj, Elm_List_Data *pd, int child_index);
Eina_Bool _elm_list_efl_access_selection_all_children_select(Eo *obj, Elm_List_Data *pd);
Eina_Bool _elm_list_efl_access_selection_access_selection_clear(Eo *obj, Elm_List_Data *pd);
static Eina_Bool
_elm_list_class_initializer(Efl_Class *klass)
{
const Efl_Object_Ops *opsp = NULL;
const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
#ifndef ELM_LIST_EXTRA_OPS
#define ELM_LIST_EXTRA_OPS
#endif
EFL_OPS_DEFINE(ops,
EFL_OBJECT_OP_FUNC(elm_obj_list_horizontal_set, _elm_list_horizontal_set),
EFL_OBJECT_OP_FUNC(elm_obj_list_horizontal_get, _elm_list_horizontal_get),
EFL_OBJECT_OP_FUNC(elm_obj_list_select_mode_set, _elm_list_select_mode_set),
EFL_OBJECT_OP_FUNC(elm_obj_list_select_mode_get, _elm_list_select_mode_get),
EFL_OBJECT_OP_FUNC(elm_obj_list_focus_on_selection_set, _elm_list_focus_on_selection_set),
EFL_OBJECT_OP_FUNC(elm_obj_list_focus_on_selection_get, _elm_list_focus_on_selection_get),
EFL_OBJECT_OP_FUNC(elm_obj_list_multi_select_set, _elm_list_multi_select_set),
EFL_OBJECT_OP_FUNC(elm_obj_list_multi_select_get, _elm_list_multi_select_get),
EFL_OBJECT_OP_FUNC(elm_obj_list_multi_select_mode_set, _elm_list_multi_select_mode_set),
EFL_OBJECT_OP_FUNC(elm_obj_list_multi_select_mode_get, _elm_list_multi_select_mode_get),
EFL_OBJECT_OP_FUNC(elm_obj_list_mode_set, _elm_list_mode_set),
EFL_OBJECT_OP_FUNC(elm_obj_list_mode_get, _elm_list_mode_get),
EFL_OBJECT_OP_FUNC(elm_obj_list_selected_item_get, _elm_list_selected_item_get),
EFL_OBJECT_OP_FUNC(elm_obj_list_items_get, _elm_list_items_get),
EFL_OBJECT_OP_FUNC(elm_obj_list_first_item_get, _elm_list_first_item_get),
EFL_OBJECT_OP_FUNC(elm_obj_list_selected_items_get, _elm_list_selected_items_get),
EFL_OBJECT_OP_FUNC(elm_obj_list_last_item_get, _elm_list_last_item_get),
EFL_OBJECT_OP_FUNC(elm_obj_list_item_insert_before, _elm_list_item_insert_before),
EFL_OBJECT_OP_FUNC(elm_obj_list_go, _elm_list_go),
EFL_OBJECT_OP_FUNC(elm_obj_list_item_insert_after, _elm_list_item_insert_after),
EFL_OBJECT_OP_FUNC(elm_obj_list_at_xy_item_get, _elm_list_at_xy_item_get),
EFL_OBJECT_OP_FUNC(elm_obj_list_item_append, _elm_list_item_append),
EFL_OBJECT_OP_FUNC(elm_obj_list_item_prepend, _elm_list_item_prepend),
EFL_OBJECT_OP_FUNC(elm_obj_list_clear, _elm_list_clear),
EFL_OBJECT_OP_FUNC(elm_obj_list_item_sorted_insert, _elm_list_item_sorted_insert),
EFL_OBJECT_OP_FUNC(efl_constructor, _elm_list_efl_object_constructor),
EFL_OBJECT_OP_FUNC(efl_gfx_entity_position_set, _elm_list_efl_gfx_entity_position_set),
EFL_OBJECT_OP_FUNC(efl_gfx_entity_size_set, _elm_list_efl_gfx_entity_size_set),
EFL_OBJECT_OP_FUNC(efl_canvas_group_member_add, _elm_list_efl_canvas_group_group_member_add),
EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_list_efl_ui_widget_theme_apply),
EFL_OBJECT_OP_FUNC(efl_ui_widget_on_access_update, _elm_list_efl_ui_widget_on_access_update),
EFL_OBJECT_OP_FUNC(efl_ui_widget_focus_highlight_geometry_get, _elm_list_efl_ui_widget_focus_highlight_geometry_get),
EFL_OBJECT_OP_FUNC(efl_ui_widget_disabled_set, _elm_list_efl_ui_widget_disabled_set),
EFL_OBJECT_OP_FUNC(efl_ui_focus_object_on_focus_update, _elm_list_efl_ui_focus_object_on_focus_update),
EFL_OBJECT_OP_FUNC(efl_ui_l10n_translation_update, _elm_list_efl_ui_l10n_translation_update),
EFL_OBJECT_OP_FUNC(efl_ui_widget_sub_object_del, _elm_list_efl_ui_widget_widget_sub_object_del),
EFL_OBJECT_OP_FUNC(efl_ui_widget_input_event_handler, _elm_list_efl_ui_widget_widget_input_event_handler),
EFL_OBJECT_OP_FUNC(elm_widget_item_container_focused_item_get, _elm_list_elm_widget_item_container_focused_item_get),
EFL_OBJECT_OP_FUNC(efl_ui_widget_focus_state_apply, _elm_list_efl_ui_widget_focus_state_apply),
EFL_OBJECT_OP_FUNC(elm_interface_scrollable_item_loop_enabled_set, _elm_list_elm_interface_scrollable_item_loop_enabled_set),
EFL_OBJECT_OP_FUNC(elm_interface_scrollable_item_loop_enabled_get, _elm_list_elm_interface_scrollable_item_loop_enabled_get),
EFL_OBJECT_OP_FUNC(elm_interface_scrollable_policy_set, _elm_list_elm_interface_scrollable_policy_set),
EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_list_efl_access_widget_action_elm_actions_get),
EFL_OBJECT_OP_FUNC(efl_access_object_access_children_get, _elm_list_efl_access_object_access_children_get),
EFL_OBJECT_OP_FUNC(efl_access_selection_selected_children_count_get, _elm_list_efl_access_selection_selected_children_count_get),
EFL_OBJECT_OP_FUNC(efl_access_selection_selected_child_get, _elm_list_efl_access_selection_selected_child_get),
EFL_OBJECT_OP_FUNC(efl_access_selection_selected_child_deselect, _elm_list_efl_access_selection_selected_child_deselect),
EFL_OBJECT_OP_FUNC(efl_access_selection_child_select, _elm_list_efl_access_selection_child_select),
EFL_OBJECT_OP_FUNC(efl_access_selection_child_deselect, _elm_list_efl_access_selection_child_deselect),
EFL_OBJECT_OP_FUNC(efl_access_selection_is_child_selected, _elm_list_efl_access_selection_is_child_selected),
EFL_OBJECT_OP_FUNC(efl_access_selection_all_children_select, _elm_list_efl_access_selection_all_children_select),
EFL_OBJECT_OP_FUNC(efl_access_selection_clear, _elm_list_efl_access_selection_access_selection_clear),
ELM_LIST_EXTRA_OPS
);
opsp = &ops;
static const Efl_Object_Property_Reflection refl_table[] = {
{"horizontal", __eolian_elm_list_horizontal_set_reflect, __eolian_elm_list_horizontal_get_reflect},
{"focus_on_selection", __eolian_elm_list_focus_on_selection_set_reflect, __eolian_elm_list_focus_on_selection_get_reflect},
{"multi_select", __eolian_elm_list_multi_select_set_reflect, __eolian_elm_list_multi_select_get_reflect},
};
static const Efl_Object_Property_Reflection_Ops rops = {
refl_table, EINA_C_ARRAY_LENGTH(refl_table)
};
ropsp = &rops;
return efl_class_functions_set(klass, opsp, ropsp);
}
static const Efl_Class_Description _elm_list_class_desc = {
EO_VERSION,
"Elm.List",
EFL_CLASS_TYPE_REGULAR,
sizeof(Elm_List_Data),
_elm_list_class_initializer,
_elm_list_class_constructor,
NULL
};
EFL_DEFINE_CLASS(elm_list_class_get, &_elm_list_class_desc, EFL_UI_LAYOUT_BASE_CLASS, ELM_INTERFACE_SCROLLABLE_MIXIN, EFL_ACCESS_WIDGET_ACTION_MIXIN, EFL_ACCESS_SELECTION_INTERFACE, EFL_ACCESS_OBJECT_MIXIN, EFL_UI_CLICKABLE_INTERFACE, EFL_UI_SELECTABLE_INTERFACE, EFL_UI_LEGACY_INTERFACE, ELM_WIDGET_ITEM_CONTAINER_INTERFACE, NULL);
#include "elm_list_eo.legacy.c"

View File

@ -0,0 +1,640 @@
#ifndef _ELM_LIST_EO_H_
#define _ELM_LIST_EO_H_
#ifndef _ELM_LIST_EO_CLASS_TYPE
#define _ELM_LIST_EO_CLASS_TYPE
typedef Eo Elm_List;
#endif
#ifndef _ELM_LIST_EO_TYPES
#define _ELM_LIST_EO_TYPES
#endif
/** Elementary list class
*
* @ingroup Elm_List
*/
#define ELM_LIST_CLASS elm_list_class_get()
EWAPI const Efl_Class *elm_list_class_get(void);
/**
* @brief Control horizontal mode on the list object.
*
* @note Vertical mode is set by default.
*
* On horizontal mode items are displayed on list from left to right, instead
* of from top to bottom. Also, the list will scroll horizontally. Each item
* will presents left icon on top and right icon, or end, at the bottom.
*
* @param[in] obj The object.
* @param[in] horizontal @c true to enable horizontal or @c false to disable
* it, i.e., to enable vertical mode.
*
* @ingroup Elm_List
*/
EOAPI void elm_obj_list_horizontal_set(Eo *obj, Eina_Bool horizontal);
/**
* @brief Control horizontal mode on the list object.
*
* @note Vertical mode is set by default.
*
* On horizontal mode items are displayed on list from left to right, instead
* of from top to bottom. Also, the list will scroll horizontally. Each item
* will presents left icon on top and right icon, or end, at the bottom.
*
* @param[in] obj The object.
*
* @return @c true to enable horizontal or @c false to disable it, i.e., to
* enable vertical mode.
*
* @ingroup Elm_List
*/
EOAPI Eina_Bool elm_obj_list_horizontal_get(const Eo *obj);
/**
* @brief Control the list select mode.
*
* elm_list_select_mode_set() changes item select mode in the list widget. -
* #ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func
* and callback when first becoming selected. Any further clicks will do
* nothing, unless you set always select mode. - #ELM_OBJECT_SELECT_MODE_ALWAYS
* : This means that, even if selected, every click will make the selected
* callbacks be called. - #ELM_OBJECT_SELECT_MODE_NONE : This will turn off the
* ability to select items entirely and they will neither appear selected nor
* call selected callback functions.
*
* @param[in] obj The object.
* @param[in] mode The select mode
*
* @ingroup Elm_List
*/
EOAPI void elm_obj_list_select_mode_set(Eo *obj, Elm_Object_Select_Mode mode);
/**
* @brief Control the list select mode.
*
* elm_list_select_mode_set() changes item select mode in the list widget. -
* #ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func
* and callback when first becoming selected. Any further clicks will do
* nothing, unless you set always select mode. - #ELM_OBJECT_SELECT_MODE_ALWAYS
* : This means that, even if selected, every click will make the selected
* callbacks be called. - #ELM_OBJECT_SELECT_MODE_NONE : This will turn off the
* ability to select items entirely and they will neither appear selected nor
* call selected callback functions.
*
* @param[in] obj The object.
*
* @return The select mode
*
* @ingroup Elm_List
*/
EOAPI Elm_Object_Select_Mode elm_obj_list_select_mode_get(const Eo *obj);
/**
* @brief Control focus upon items selection mode
*
* When enabled, every selection of an item inside the genlist will
* automatically set focus to its first focusable widget from the left. This is
* true of course if the selection was made by clicking an unfocusable area in
* an item or selecting it with a key movement. Clicking on a focusable widget
* inside an item will cause this particular item to get focus as usual.
*
* @param[in] obj The object.
* @param[in] enabled The tree effect status ($true = enabled, @c false =
* disabled)
*
* @ingroup Elm_List
*/
EOAPI void elm_obj_list_focus_on_selection_set(Eo *obj, Eina_Bool enabled);
/**
* @brief Control focus upon items selection mode
*
* When enabled, every selection of an item inside the genlist will
* automatically set focus to its first focusable widget from the left. This is
* true of course if the selection was made by clicking an unfocusable area in
* an item or selecting it with a key movement. Clicking on a focusable widget
* inside an item will cause this particular item to get focus as usual.
*
* @param[in] obj The object.
*
* @return The tree effect status ($true = enabled, @c false = disabled)
*
* @ingroup Elm_List
*/
EOAPI Eina_Bool elm_obj_list_focus_on_selection_get(const Eo *obj);
/**
* @brief Control multiple items selection on the list object.
*
* Disabled by default. If disabled, the user can select a single item of the
* list each time. Selected items are highlighted on list. If enabled, many
* items can be selected.
*
* If a selected item is selected again, it will be unselected.
*
* @param[in] obj The object.
* @param[in] multi @c true to enable multi selection or @c false to disable
* it.
*
* @ingroup Elm_List
*/
EOAPI void elm_obj_list_multi_select_set(Eo *obj, Eina_Bool multi);
/**
* @brief Control multiple items selection on the list object.
*
* Disabled by default. If disabled, the user can select a single item of the
* list each time. Selected items are highlighted on list. If enabled, many
* items can be selected.
*
* If a selected item is selected again, it will be unselected.
*
* @param[in] obj The object.
*
* @return @c true to enable multi selection or @c false to disable it.
*
* @ingroup Elm_List
*/
EOAPI Eina_Bool elm_obj_list_multi_select_get(const Eo *obj);
/**
* @brief Control the list multi select mode.
*
* - #ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT : select/unselect items whenever
* each item is clicked. - #ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL : Only
* one item will be selected although multi-selection is enabled, if clicked
* without pressing control key. This mode is only available with
* multi-selection.
*
* See: @ref elm_obj_list_multi_select_get
*
* @param[in] obj The object.
* @param[in] mode The multi select mode
*
* @since 1.8
*
* @ingroup Elm_List
*/
EOAPI void elm_obj_list_multi_select_mode_set(Eo *obj, Elm_Object_Multi_Select_Mode mode);
/**
* @brief Control the list multi select mode.
*
* - #ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT : select/unselect items whenever
* each item is clicked. - #ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL : Only
* one item will be selected although multi-selection is enabled, if clicked
* without pressing control key. This mode is only available with
* multi-selection.
*
* See: @ref elm_obj_list_multi_select_get
*
* @param[in] obj The object.
*
* @return The multi select mode
*
* @since 1.8
*
* @ingroup Elm_List
*/
EOAPI Elm_Object_Multi_Select_Mode elm_obj_list_multi_select_mode_get(const Eo *obj);
/**
* @brief Control which mode to use for the list object.
*
* Set list's resize behavior, transverse axis scroll and items cropping. See
* each mode's description for more details.
*
* @note Default value is #ELM_LIST_SCROLL.
*
* Only one mode at a time can be set. If a previous one was set, it will be
* changed by the new mode after this call. Bitmasks won't work here as well.
*
* @warning This function's behavior will clash with those of
* elm_scroller_content_min_limit(), so use either one of them, but not both.
*
* @param[in] obj The object.
* @param[in] mode One of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL,
* #ELM_LIST_LIMIT or #ELM_LIST_EXPAND.
*
* @ingroup Elm_List
*/
EOAPI void elm_obj_list_mode_set(Eo *obj, Elm_List_Mode mode);
/**
* @brief Control which mode to use for the list object.
*
* Set list's resize behavior, transverse axis scroll and items cropping. See
* each mode's description for more details.
*
* @note Default value is #ELM_LIST_SCROLL.
*
* Only one mode at a time can be set. If a previous one was set, it will be
* changed by the new mode after this call. Bitmasks won't work here as well.
*
* @warning This function's behavior will clash with those of
* elm_scroller_content_min_limit(), so use either one of them, but not both.
*
* @param[in] obj The object.
*
* @return One of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL,
* #ELM_LIST_LIMIT or #ELM_LIST_EXPAND.
*
* @ingroup Elm_List
*/
EOAPI Elm_List_Mode elm_obj_list_mode_get(const Eo *obj);
/**
* @brief Get the selected item.
*
* The selected item can be unselected with function
* elm_list_item_selected_set().
*
* The selected item always will be highlighted on list.
*
* @param[in] obj The object.
*
* @return The selected list item.
*
* @ingroup Elm_List
*/
EOAPI Elm_Widget_Item *elm_obj_list_selected_item_get(const Eo *obj);
/**
* @brief Get a list of all the list items.
*
* @param[in] obj The object.
*
* @return A @c list of list items, #Elm.Widget.Item, or @c NULL on failure.
*
* @ingroup Elm_List
*/
EOAPI const Eina_List *elm_obj_list_items_get(const Eo *obj);
/**
* @brief Get the first item in the list
*
* This returns the first item in the list.
*
* @param[in] obj The object.
*
* @return The first item, or NULL if none
*
* @ingroup Elm_List
*/
EOAPI Elm_Widget_Item *elm_obj_list_first_item_get(const Eo *obj);
/**
* @brief Return a list of the currently selected list items.
*
* Multiple items can be selected if multi select is enabled. It can be done
* with elm_list_multi_select_set().
*
* @param[in] obj The object.
*
* @return An @c list of list items, #Elm.Widget.Item, or @c NULL on failure.
*
* @ingroup Elm_List
*/
EOAPI const Eina_List *elm_obj_list_selected_items_get(const Eo *obj);
/**
* @brief Get the last item in the list
*
* This returns the last item in the list.
*
* @param[in] obj The object.
*
* @return The last item, or NULL if none
*
* @ingroup Elm_List
*/
EOAPI Elm_Widget_Item *elm_obj_list_last_item_get(const Eo *obj);
/**
* @brief Insert a new item into the list object before item @c before.
*
* A new item will be created and added to the list. Its position in this list
* will be just before item @c before.
*
* Items created with this method can be deleted with elm_object_item_del().
*
* Associated @c data can be properly freed when item is deleted if a callback
* function is set with elm_object_item_del_cb_set().
*
* If a function is passed as argument, it will be called every time this item
* is selected, i.e., the user clicks over an unselected item. If always select
* is enabled it will call this function every time user clicks over an item
* (already selected or not). If such function isn't needed, just passing
* @c NULL as @c func is enough. The same should be done for @c data.
*
* @note Remember that the label parameter is copied inside the list. So if an
* application dynamically allocated the label, the application should free the
* label after this call.
*
* @param[in] obj The object.
* @param[in] before The list item to insert before.
* @param[in] label The label of the list item.
* @param[in] icon The icon object to use for the left side of the item. An
* icon can be any Evas object, but usually it is an icon created with
* elm_icon_add().
* @param[in] end The icon object to use for the right side of the item. An
* icon can be any Evas object.
* @param[in] func The function to call when the item is clicked.
* @param[in] data The data to associate with the item for related callbacks.
*
* @return The created item or @c NULL upon failure.
*
* @ingroup Elm_List
*/
EOAPI Elm_Widget_Item *elm_obj_list_item_insert_before(Eo *obj, Elm_Widget_Item *before, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data);
/**
* @brief Starts the list.
*
* @note Call before running show() on the list object. Warning: If not called,
* it won't display the list properly.
* @param[in] obj The object.
*
* @ingroup Elm_List
*/
EOAPI void elm_obj_list_go(Eo *obj);
/**
* @brief Insert a new item into the list object after item @c after.
*
* A new item will be created and added to the list. Its position in this list
* will be just after item @c after.
*
* Items created with this method can be deleted with elm_object_item_del().
*
* Associated @c data can be properly freed when item is deleted if a callback
* function is set with elm_object_item_del_cb_set().
*
* If a function is passed as argument, it will be called every time this item
* is selected, i.e., the user clicks over an unselected item. If always select
* is enabled it will call this function every time user clicks over an item
* (already selected or not). If such function isn't needed, just passing
* @c NULL as @c func is enough. The same should be done for @c data.
*
* @note Remember that the label parameter is copied inside the list. So if an
* application dynamically allocated the label, the application should free the
* label after this call.
*
* @param[in] obj The object.
* @param[in] after The list item to insert after.
* @param[in] label The label of the list item.
* @param[in] icon The icon object to use for the left side of the item. An
* icon can be any Evas object, but usually it is an icon created with
* elm_icon_add().
* @param[in] end The icon object to use for the right side of the item. An
* icon can be any Evas object.
* @param[in] func The function to call when the item is clicked.
* @param[in] data The data to associate with the item for related callbacks.
*
* @return The created item or @c NULL upon failure.
*
* @ingroup Elm_List
*/
EOAPI Elm_Widget_Item *elm_obj_list_item_insert_after(Eo *obj, Elm_Widget_Item *after, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data);
/**
* @brief Get the item that is at the x, y canvas coords.
*
* This returns the item at the given coordinates (which are canvas relative,
* not object-relative). If an item is at that coordinate, that item handle is
* returned, and if @c posret is not NULL, the integer pointed to is set to a
* value of -1, 0 or 1, depending if the coordinate is on the upper portion of
* that item (-1), on the middle section (0) or on the lower part (1). If NULL
* is returned as an item (no item found there), then posret may indicate -1 or
* 1 based if the coordinate is above or below all items respectively in the
* list.
*
* @param[in] obj The object.
* @param[in] x The input x coordinate
* @param[in] y The input y coordinate
* @param[out] posret The position relative to the item returned here
*
* @return The item at the coordinates or NULL if none
*
* @ingroup Elm_List
*/
EOAPI Elm_Widget_Item *elm_obj_list_at_xy_item_get(const Eo *obj, int x, int y, int *posret);
/**
* @brief Append a new item to the list object.
*
* A new item will be created and appended to the list, i.e., will be set as
* last item.
*
* Items created with this method can be deleted with elm_object_item_del().
*
* Associated @c data can be properly freed when item is deleted if a callback
* function is set with elm_object_item_del_cb_set().
*
* If a function is passed as argument, it will be called every time this item
* is selected, i.e., the user clicks over an unselected item. If always select
* is enabled it will call this function every time user clicks over an item
* (already selected or not). If such function isn't needed, just passing
* @c NULL as @c func is enough. The same should be done for @c data.
*
* @note Remember that the label parameter is copied inside the list. So if an
* application dynamically allocated the label, the application should free the
* label after this call.
*
* @param[in] obj The object.
* @param[in] label The label of the list item.
* @param[in] icon The icon object to use for the left side of the item. An
* icon can be any Evas object, but usually it is an icon created with
* elm_icon_add().
* @param[in] end The icon object to use for the right side of the item. An
* icon can be any Evas object.
* @param[in] func The function to call when the item is clicked.
* @param[in] data The data to associate with the item for related callbacks.
*
* @return The created item or @c NULL upon failure.
*
* @ingroup Elm_List
*/
EOAPI Elm_Widget_Item *elm_obj_list_item_append(Eo *obj, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data);
/**
* @brief Prepend a new item to the list object.
*
* A new item will be created and prepended to the list, i.e., will be set as
* first item.
*
* Items created with this method can be deleted with elm_object_item_del().
*
* Associated @c data can be properly freed when item is deleted if a callback
* function is set with elm_object_item_del_cb_set().
*
* If a function is passed as argument, it will be called every time this item
* is selected, i.e., the user clicks over an unselected item. If always select
* is enabled it will call this function every time user clicks over an item
* (already selected or not). If such function isn't needed, just passing
* @c NULL as @c func is enough. The same should be done for @c data.
*
* @note Remember that the label parameter is copied inside the list. So if an
* application dynamically allocated the label, the application should free the
* label after this call.
*
* @param[in] obj The object.
* @param[in] label The label of the list item.
* @param[in] icon The icon object to use for the left side of the item. An
* icon can be any Evas object, but usually it is an icon created with
* elm_icon_add().
* @param[in] end The icon object to use for the right side of the item. An
* icon can be any Evas object.
* @param[in] func The function to call when the item is clicked.
* @param[in] data The data to associate with the item for related callbacks.
*
* @return The created item or @c NULL upon failure.
*
* @ingroup Elm_List
*/
EOAPI Elm_Widget_Item *elm_obj_list_item_prepend(Eo *obj, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data);
/** Remove all list's items.
*
* @ingroup Elm_List
*/
EOAPI void elm_obj_list_clear(Eo *obj);
/**
* @brief Insert a new item into the sorted list object.
*
* @note This function inserts values into a list object assuming it was sorted
* and the result will be sorted.
*
* A new item will be created and added to the list. Its position in this list
* will be found comparing the new item with previously inserted items using
* function @c cmp_func.
*
* Items created with this method can be deleted with elm_object_item_del().
*
* Associated @c data can be properly freed when item is deleted if a callback
* function is set with elm_object_item_del_cb_set().
*
* If a function is passed as argument, it will be called every time this item
* is selected, i.e., the user clicks over an unselected item. If always select
* is enabled it will call this function every time user clicks over an item
* (already selected or not). If such function isn't needed, just passing
* @c NULL as @c func is enough. The same should be done for @c data.
*
* @note Remember that the label parameter is copied inside the list. So if an
* application dynamically allocated the label, the application should free the
* label after this call.
*
* @param[in] obj The object.
* @param[in] label The label of the list item.
* @param[in] icon The icon object to use for the left side of the item. An
* icon can be any Evas object, but usually it is an icon created with
* elm_icon_add().
* @param[in] end The icon object to use for the right side of the item. An
* icon can be any Evas object.
* @param[in] func The function to call when the item is clicked.
* @param[in] data The data to associate with the item for related callbacks.
* @param[in] cmp_func The comparing function to be used to sort list items by
* #Elm.Widget.Item item handles. This function will receive two items and
* compare them, returning a non-negative integer if the second item should be
* place after the first, or negative value if should be placed before.
*
* @return The created item or @c NULL upon failure.
*
* @ingroup Elm_List
*/
EOAPI Elm_Widget_Item *elm_obj_list_item_sorted_insert(Eo *obj, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func);
EWAPI extern const Efl_Event_Description _ELM_LIST_EVENT_ACTIVATED;
/** Called when activated
* @return Efl_Object *
*
* @ingroup Elm_List
*/
#define ELM_LIST_EVENT_ACTIVATED (&(_ELM_LIST_EVENT_ACTIVATED))
EWAPI extern const Efl_Event_Description _ELM_LIST_EVENT_EDGE_TOP;
/** Called when top edge was reached
*
* @ingroup Elm_List
*/
#define ELM_LIST_EVENT_EDGE_TOP (&(_ELM_LIST_EVENT_EDGE_TOP))
EWAPI extern const Efl_Event_Description _ELM_LIST_EVENT_EDGE_BOTTOM;
/** Called when bottom edge was reached
*
* @ingroup Elm_List
*/
#define ELM_LIST_EVENT_EDGE_BOTTOM (&(_ELM_LIST_EVENT_EDGE_BOTTOM))
EWAPI extern const Efl_Event_Description _ELM_LIST_EVENT_EDGE_LEFT;
/** Called when left edge was reached
*
* @ingroup Elm_List
*/
#define ELM_LIST_EVENT_EDGE_LEFT (&(_ELM_LIST_EVENT_EDGE_LEFT))
EWAPI extern const Efl_Event_Description _ELM_LIST_EVENT_EDGE_RIGHT;
/** Called when right edge was reached
*
* @ingroup Elm_List
*/
#define ELM_LIST_EVENT_EDGE_RIGHT (&(_ELM_LIST_EVENT_EDGE_RIGHT))
EWAPI extern const Efl_Event_Description _ELM_LIST_EVENT_SWIPE;
/** Called when swipe is detected
* @return Efl_Object *
*
* @ingroup Elm_List
*/
#define ELM_LIST_EVENT_SWIPE (&(_ELM_LIST_EVENT_SWIPE))
EWAPI extern const Efl_Event_Description _ELM_LIST_EVENT_HIGHLIGHTED;
/** Called when highlighted
* @return Efl_Object *
*
* @ingroup Elm_List
*/
#define ELM_LIST_EVENT_HIGHLIGHTED (&(_ELM_LIST_EVENT_HIGHLIGHTED))
EWAPI extern const Efl_Event_Description _ELM_LIST_EVENT_UNHIGHLIGHTED;
/** Called when no longer highlighted
* @return Efl_Object *
*
* @ingroup Elm_List
*/
#define ELM_LIST_EVENT_UNHIGHLIGHTED (&(_ELM_LIST_EVENT_UNHIGHLIGHTED))
EWAPI extern const Efl_Event_Description _ELM_LIST_EVENT_ITEM_FOCUSED;
/** Called when item got focus
* @return Efl_Object *
*
* @ingroup Elm_List
*/
#define ELM_LIST_EVENT_ITEM_FOCUSED (&(_ELM_LIST_EVENT_ITEM_FOCUSED))
EWAPI extern const Efl_Event_Description _ELM_LIST_EVENT_ITEM_UNFOCUSED;
/** Called when item no longer has focus
* @return Efl_Object *
*
* @ingroup Elm_List
*/
#define ELM_LIST_EVENT_ITEM_UNFOCUSED (&(_ELM_LIST_EVENT_ITEM_UNFOCUSED))
#endif

View File

@ -0,0 +1,150 @@
EAPI void
elm_list_horizontal_set(Elm_List *obj, Eina_Bool horizontal)
{
elm_obj_list_horizontal_set(obj, horizontal);
}
EAPI Eina_Bool
elm_list_horizontal_get(const Elm_List *obj)
{
return elm_obj_list_horizontal_get(obj);
}
EAPI void
elm_list_select_mode_set(Elm_List *obj, Elm_Object_Select_Mode mode)
{
elm_obj_list_select_mode_set(obj, mode);
}
EAPI Elm_Object_Select_Mode
elm_list_select_mode_get(const Elm_List *obj)
{
return elm_obj_list_select_mode_get(obj);
}
EAPI void
elm_list_focus_on_selection_set(Elm_List *obj, Eina_Bool enabled)
{
elm_obj_list_focus_on_selection_set(obj, enabled);
}
EAPI Eina_Bool
elm_list_focus_on_selection_get(const Elm_List *obj)
{
return elm_obj_list_focus_on_selection_get(obj);
}
EAPI void
elm_list_multi_select_set(Elm_List *obj, Eina_Bool multi)
{
elm_obj_list_multi_select_set(obj, multi);
}
EAPI Eina_Bool
elm_list_multi_select_get(const Elm_List *obj)
{
return elm_obj_list_multi_select_get(obj);
}
EAPI void
elm_list_multi_select_mode_set(Elm_List *obj, Elm_Object_Multi_Select_Mode mode)
{
elm_obj_list_multi_select_mode_set(obj, mode);
}
EAPI Elm_Object_Multi_Select_Mode
elm_list_multi_select_mode_get(const Elm_List *obj)
{
return elm_obj_list_multi_select_mode_get(obj);
}
EAPI void
elm_list_mode_set(Elm_List *obj, Elm_List_Mode mode)
{
elm_obj_list_mode_set(obj, mode);
}
EAPI Elm_List_Mode
elm_list_mode_get(const Elm_List *obj)
{
return elm_obj_list_mode_get(obj);
}
EAPI Elm_Widget_Item *
elm_list_selected_item_get(const Elm_List *obj)
{
return elm_obj_list_selected_item_get(obj);
}
EAPI const Eina_List *
elm_list_items_get(const Elm_List *obj)
{
return elm_obj_list_items_get(obj);
}
EAPI Elm_Widget_Item *
elm_list_first_item_get(const Elm_List *obj)
{
return elm_obj_list_first_item_get(obj);
}
EAPI const Eina_List *
elm_list_selected_items_get(const Elm_List *obj)
{
return elm_obj_list_selected_items_get(obj);
}
EAPI Elm_Widget_Item *
elm_list_last_item_get(const Elm_List *obj)
{
return elm_obj_list_last_item_get(obj);
}
EAPI Elm_Widget_Item *
elm_list_item_insert_before(Elm_List *obj, Elm_Widget_Item *before, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data)
{
return elm_obj_list_item_insert_before(obj, before, label, icon, end, func, data);
}
EAPI void
elm_list_go(Elm_List *obj)
{
elm_obj_list_go(obj);
}
EAPI Elm_Widget_Item *
elm_list_item_insert_after(Elm_List *obj, Elm_Widget_Item *after, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data)
{
return elm_obj_list_item_insert_after(obj, after, label, icon, end, func, data);
}
EAPI Elm_Widget_Item *
elm_list_at_xy_item_get(const Elm_List *obj, int x, int y, int *posret)
{
return elm_obj_list_at_xy_item_get(obj, x, y, posret);
}
EAPI Elm_Widget_Item *
elm_list_item_append(Elm_List *obj, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data)
{
return elm_obj_list_item_append(obj, label, icon, end, func, data);
}
EAPI Elm_Widget_Item *
elm_list_item_prepend(Elm_List *obj, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data)
{
return elm_obj_list_item_prepend(obj, label, icon, end, func, data);
}
EAPI void
elm_list_clear(Elm_List *obj)
{
elm_obj_list_clear(obj);
}
EAPI Elm_Widget_Item *
elm_list_item_sorted_insert(Elm_List *obj, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func)
{
return elm_obj_list_item_sorted_insert(obj, label, icon, end, func, data, cmp_func);
}

View File

@ -0,0 +1,547 @@
#ifndef _ELM_LIST_EO_LEGACY_H_
#define _ELM_LIST_EO_LEGACY_H_
#ifndef _ELM_LIST_EO_CLASS_TYPE
#define _ELM_LIST_EO_CLASS_TYPE
typedef Eo Elm_List;
#endif
#ifndef _ELM_LIST_EO_TYPES
#define _ELM_LIST_EO_TYPES
#endif
/**
* @brief Control horizontal mode on the list object.
*
* @note Vertical mode is set by default.
*
* On horizontal mode items are displayed on list from left to right, instead
* of from top to bottom. Also, the list will scroll horizontally. Each item
* will presents left icon on top and right icon, or end, at the bottom.
*
* @param[in] obj The object.
* @param[in] horizontal @c true to enable horizontal or @c false to disable
* it, i.e., to enable vertical mode.
*
* @ingroup Elm_List_Group
*/
EAPI void elm_list_horizontal_set(Elm_List *obj, Eina_Bool horizontal);
/**
* @brief Control horizontal mode on the list object.
*
* @note Vertical mode is set by default.
*
* On horizontal mode items are displayed on list from left to right, instead
* of from top to bottom. Also, the list will scroll horizontally. Each item
* will presents left icon on top and right icon, or end, at the bottom.
*
* @param[in] obj The object.
*
* @return @c true to enable horizontal or @c false to disable it, i.e., to
* enable vertical mode.
*
* @ingroup Elm_List_Group
*/
EAPI Eina_Bool elm_list_horizontal_get(const Elm_List *obj);
/**
* @brief Control the list select mode.
*
* elm_list_select_mode_set() changes item select mode in the list widget. -
* #ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func
* and callback when first becoming selected. Any further clicks will do
* nothing, unless you set always select mode. - #ELM_OBJECT_SELECT_MODE_ALWAYS
* : This means that, even if selected, every click will make the selected
* callbacks be called. - #ELM_OBJECT_SELECT_MODE_NONE : This will turn off the
* ability to select items entirely and they will neither appear selected nor
* call selected callback functions.
*
* @param[in] obj The object.
* @param[in] mode The select mode
*
* @ingroup Elm_List_Group
*/
EAPI void elm_list_select_mode_set(Elm_List *obj, Elm_Object_Select_Mode mode);
/**
* @brief Control the list select mode.
*
* elm_list_select_mode_set() changes item select mode in the list widget. -
* #ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func
* and callback when first becoming selected. Any further clicks will do
* nothing, unless you set always select mode. - #ELM_OBJECT_SELECT_MODE_ALWAYS
* : This means that, even if selected, every click will make the selected
* callbacks be called. - #ELM_OBJECT_SELECT_MODE_NONE : This will turn off the
* ability to select items entirely and they will neither appear selected nor
* call selected callback functions.
*
* @param[in] obj The object.
*
* @return The select mode
*
* @ingroup Elm_List_Group
*/
EAPI Elm_Object_Select_Mode elm_list_select_mode_get(const Elm_List *obj);
/**
* @brief Control focus upon items selection mode
*
* When enabled, every selection of an item inside the genlist will
* automatically set focus to its first focusable widget from the left. This is
* true of course if the selection was made by clicking an unfocusable area in
* an item or selecting it with a key movement. Clicking on a focusable widget
* inside an item will cause this particular item to get focus as usual.
*
* @param[in] obj The object.
* @param[in] enabled The tree effect status ($true = enabled, @c false =
* disabled)
*
* @ingroup Elm_List_Group
*/
EAPI void elm_list_focus_on_selection_set(Elm_List *obj, Eina_Bool enabled);
/**
* @brief Control focus upon items selection mode
*
* When enabled, every selection of an item inside the genlist will
* automatically set focus to its first focusable widget from the left. This is
* true of course if the selection was made by clicking an unfocusable area in
* an item or selecting it with a key movement. Clicking on a focusable widget
* inside an item will cause this particular item to get focus as usual.
*
* @param[in] obj The object.
*
* @return The tree effect status ($true = enabled, @c false = disabled)
*
* @ingroup Elm_List_Group
*/
EAPI Eina_Bool elm_list_focus_on_selection_get(const Elm_List *obj);
/**
* @brief Control multiple items selection on the list object.
*
* Disabled by default. If disabled, the user can select a single item of the
* list each time. Selected items are highlighted on list. If enabled, many
* items can be selected.
*
* If a selected item is selected again, it will be unselected.
*
* @param[in] obj The object.
* @param[in] multi @c true to enable multi selection or @c false to disable
* it.
*
* @ingroup Elm_List_Group
*/
EAPI void elm_list_multi_select_set(Elm_List *obj, Eina_Bool multi);
/**
* @brief Control multiple items selection on the list object.
*
* Disabled by default. If disabled, the user can select a single item of the
* list each time. Selected items are highlighted on list. If enabled, many
* items can be selected.
*
* If a selected item is selected again, it will be unselected.
*
* @param[in] obj The object.
*
* @return @c true to enable multi selection or @c false to disable it.
*
* @ingroup Elm_List_Group
*/
EAPI Eina_Bool elm_list_multi_select_get(const Elm_List *obj);
/**
* @brief Control the list multi select mode.
*
* - #ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT : select/unselect items whenever
* each item is clicked. - #ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL : Only
* one item will be selected although multi-selection is enabled, if clicked
* without pressing control key. This mode is only available with
* multi-selection.
*
* See: @ref elm_list_multi_select_get
*
* @param[in] obj The object.
* @param[in] mode The multi select mode
*
* @since 1.8
*
* @ingroup Elm_List_Group
*/
EAPI void elm_list_multi_select_mode_set(Elm_List *obj, Elm_Object_Multi_Select_Mode mode);
/**
* @brief Control the list multi select mode.
*
* - #ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT : select/unselect items whenever
* each item is clicked. - #ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL : Only
* one item will be selected although multi-selection is enabled, if clicked
* without pressing control key. This mode is only available with
* multi-selection.
*
* See: @ref elm_list_multi_select_get
*
* @param[in] obj The object.
*
* @return The multi select mode
*
* @since 1.8
*
* @ingroup Elm_List_Group
*/
EAPI Elm_Object_Multi_Select_Mode elm_list_multi_select_mode_get(const Elm_List *obj);
/**
* @brief Control which mode to use for the list object.
*
* Set list's resize behavior, transverse axis scroll and items cropping. See
* each mode's description for more details.
*
* @note Default value is #ELM_LIST_SCROLL.
*
* Only one mode at a time can be set. If a previous one was set, it will be
* changed by the new mode after this call. Bitmasks won't work here as well.
*
* @warning This function's behavior will clash with those of
* elm_scroller_content_min_limit(), so use either one of them, but not both.
*
* @param[in] obj The object.
* @param[in] mode One of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL,
* #ELM_LIST_LIMIT or #ELM_LIST_EXPAND.
*
* @ingroup Elm_List_Group
*/
EAPI void elm_list_mode_set(Elm_List *obj, Elm_List_Mode mode);
/**
* @brief Control which mode to use for the list object.
*
* Set list's resize behavior, transverse axis scroll and items cropping. See
* each mode's description for more details.
*
* @note Default value is #ELM_LIST_SCROLL.
*
* Only one mode at a time can be set. If a previous one was set, it will be
* changed by the new mode after this call. Bitmasks won't work here as well.
*
* @warning This function's behavior will clash with those of
* elm_scroller_content_min_limit(), so use either one of them, but not both.
*
* @param[in] obj The object.
*
* @return One of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL,
* #ELM_LIST_LIMIT or #ELM_LIST_EXPAND.
*
* @ingroup Elm_List_Group
*/
EAPI Elm_List_Mode elm_list_mode_get(const Elm_List *obj);
/**
* @brief Get the selected item.
*
* The selected item can be unselected with function
* elm_list_item_selected_set().
*
* The selected item always will be highlighted on list.
*
* @param[in] obj The object.
*
* @return The selected list item.
*
* @ingroup Elm_List_Group
*/
EAPI Elm_Widget_Item *elm_list_selected_item_get(const Elm_List *obj);
/**
* @brief Get a list of all the list items.
*
* @param[in] obj The object.
*
* @return A @c list of list items, #Elm.Widget.Item, or @c NULL on failure.
*
* @ingroup Elm_List_Group
*/
EAPI const Eina_List *elm_list_items_get(const Elm_List *obj);
/**
* @brief Get the first item in the list
*
* This returns the first item in the list.
*
* @param[in] obj The object.
*
* @return The first item, or NULL if none
*
* @ingroup Elm_List_Group
*/
EAPI Elm_Widget_Item *elm_list_first_item_get(const Elm_List *obj);
/**
* @brief Return a list of the currently selected list items.
*
* Multiple items can be selected if multi select is enabled. It can be done
* with elm_list_multi_select_set().
*
* @param[in] obj The object.
*
* @return An @c list of list items, #Elm.Widget.Item, or @c NULL on failure.
*
* @ingroup Elm_List_Group
*/
EAPI const Eina_List *elm_list_selected_items_get(const Elm_List *obj);
/**
* @brief Get the last item in the list
*
* This returns the last item in the list.
*
* @param[in] obj The object.
*
* @return The last item, or NULL if none
*
* @ingroup Elm_List_Group
*/
EAPI Elm_Widget_Item *elm_list_last_item_get(const Elm_List *obj);
/**
* @brief Insert a new item into the list object before item @c before.
*
* A new item will be created and added to the list. Its position in this list
* will be just before item @c before.
*
* Items created with this method can be deleted with elm_object_item_del().
*
* Associated @c data can be properly freed when item is deleted if a callback
* function is set with elm_object_item_del_cb_set().
*
* If a function is passed as argument, it will be called every time this item
* is selected, i.e., the user clicks over an unselected item. If always select
* is enabled it will call this function every time user clicks over an item
* (already selected or not). If such function isn't needed, just passing
* @c NULL as @c func is enough. The same should be done for @c data.
*
* @note Remember that the label parameter is copied inside the list. So if an
* application dynamically allocated the label, the application should free the
* label after this call.
*
* @param[in] obj The object.
* @param[in] before The list item to insert before.
* @param[in] label The label of the list item.
* @param[in] icon The icon object to use for the left side of the item. An
* icon can be any Evas object, but usually it is an icon created with
* elm_icon_add().
* @param[in] end The icon object to use for the right side of the item. An
* icon can be any Evas object.
* @param[in] func The function to call when the item is clicked.
* @param[in] data The data to associate with the item for related callbacks.
*
* @return The created item or @c NULL upon failure.
*
* @ingroup Elm_List_Group
*/
EAPI Elm_Widget_Item *elm_list_item_insert_before(Elm_List *obj, Elm_Widget_Item *before, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data);
/**
* @brief Starts the list.
*
* @note Call before running show() on the list object. Warning: If not called,
* it won't display the list properly.
* @param[in] obj The object.
*
* @ingroup Elm_List_Group
*/
EAPI void elm_list_go(Elm_List *obj);
/**
* @brief Insert a new item into the list object after item @c after.
*
* A new item will be created and added to the list. Its position in this list
* will be just after item @c after.
*
* Items created with this method can be deleted with elm_object_item_del().
*
* Associated @c data can be properly freed when item is deleted if a callback
* function is set with elm_object_item_del_cb_set().
*
* If a function is passed as argument, it will be called every time this item
* is selected, i.e., the user clicks over an unselected item. If always select
* is enabled it will call this function every time user clicks over an item
* (already selected or not). If such function isn't needed, just passing
* @c NULL as @c func is enough. The same should be done for @c data.
*
* @note Remember that the label parameter is copied inside the list. So if an
* application dynamically allocated the label, the application should free the
* label after this call.
*
* @param[in] obj The object.
* @param[in] after The list item to insert after.
* @param[in] label The label of the list item.
* @param[in] icon The icon object to use for the left side of the item. An
* icon can be any Evas object, but usually it is an icon created with
* elm_icon_add().
* @param[in] end The icon object to use for the right side of the item. An
* icon can be any Evas object.
* @param[in] func The function to call when the item is clicked.
* @param[in] data The data to associate with the item for related callbacks.
*
* @return The created item or @c NULL upon failure.
*
* @ingroup Elm_List_Group
*/
EAPI Elm_Widget_Item *elm_list_item_insert_after(Elm_List *obj, Elm_Widget_Item *after, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data);
/**
* @brief Get the item that is at the x, y canvas coords.
*
* This returns the item at the given coordinates (which are canvas relative,
* not object-relative). If an item is at that coordinate, that item handle is
* returned, and if @c posret is not NULL, the integer pointed to is set to a
* value of -1, 0 or 1, depending if the coordinate is on the upper portion of
* that item (-1), on the middle section (0) or on the lower part (1). If NULL
* is returned as an item (no item found there), then posret may indicate -1 or
* 1 based if the coordinate is above or below all items respectively in the
* list.
*
* @param[in] obj The object.
* @param[in] x The input x coordinate
* @param[in] y The input y coordinate
* @param[out] posret The position relative to the item returned here
*
* @return The item at the coordinates or NULL if none
*
* @ingroup Elm_List_Group
*/
EAPI Elm_Widget_Item *elm_list_at_xy_item_get(const Elm_List *obj, int x, int y, int *posret);
/**
* @brief Append a new item to the list object.
*
* A new item will be created and appended to the list, i.e., will be set as
* last item.
*
* Items created with this method can be deleted with elm_object_item_del().
*
* Associated @c data can be properly freed when item is deleted if a callback
* function is set with elm_object_item_del_cb_set().
*
* If a function is passed as argument, it will be called every time this item
* is selected, i.e., the user clicks over an unselected item. If always select
* is enabled it will call this function every time user clicks over an item
* (already selected or not). If such function isn't needed, just passing
* @c NULL as @c func is enough. The same should be done for @c data.
*
* @note Remember that the label parameter is copied inside the list. So if an
* application dynamically allocated the label, the application should free the
* label after this call.
*
* @param[in] obj The object.
* @param[in] label The label of the list item.
* @param[in] icon The icon object to use for the left side of the item. An
* icon can be any Evas object, but usually it is an icon created with
* elm_icon_add().
* @param[in] end The icon object to use for the right side of the item. An
* icon can be any Evas object.
* @param[in] func The function to call when the item is clicked.
* @param[in] data The data to associate with the item for related callbacks.
*
* @return The created item or @c NULL upon failure.
*
* @ingroup Elm_List_Group
*/
EAPI Elm_Widget_Item *elm_list_item_append(Elm_List *obj, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data);
/**
* @brief Prepend a new item to the list object.
*
* A new item will be created and prepended to the list, i.e., will be set as
* first item.
*
* Items created with this method can be deleted with elm_object_item_del().
*
* Associated @c data can be properly freed when item is deleted if a callback
* function is set with elm_object_item_del_cb_set().
*
* If a function is passed as argument, it will be called every time this item
* is selected, i.e., the user clicks over an unselected item. If always select
* is enabled it will call this function every time user clicks over an item
* (already selected or not). If such function isn't needed, just passing
* @c NULL as @c func is enough. The same should be done for @c data.
*
* @note Remember that the label parameter is copied inside the list. So if an
* application dynamically allocated the label, the application should free the
* label after this call.
*
* @param[in] obj The object.
* @param[in] label The label of the list item.
* @param[in] icon The icon object to use for the left side of the item. An
* icon can be any Evas object, but usually it is an icon created with
* elm_icon_add().
* @param[in] end The icon object to use for the right side of the item. An
* icon can be any Evas object.
* @param[in] func The function to call when the item is clicked.
* @param[in] data The data to associate with the item for related callbacks.
*
* @return The created item or @c NULL upon failure.
*
* @ingroup Elm_List_Group
*/
EAPI Elm_Widget_Item *elm_list_item_prepend(Elm_List *obj, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data);
/** Remove all list's items.
*
* @ingroup Elm_List_Group
*/
EAPI void elm_list_clear(Elm_List *obj);
/**
* @brief Insert a new item into the sorted list object.
*
* @note This function inserts values into a list object assuming it was sorted
* and the result will be sorted.
*
* A new item will be created and added to the list. Its position in this list
* will be found comparing the new item with previously inserted items using
* function @c cmp_func.
*
* Items created with this method can be deleted with elm_object_item_del().
*
* Associated @c data can be properly freed when item is deleted if a callback
* function is set with elm_object_item_del_cb_set().
*
* If a function is passed as argument, it will be called every time this item
* is selected, i.e., the user clicks over an unselected item. If always select
* is enabled it will call this function every time user clicks over an item
* (already selected or not). If such function isn't needed, just passing
* @c NULL as @c func is enough. The same should be done for @c data.
*
* @note Remember that the label parameter is copied inside the list. So if an
* application dynamically allocated the label, the application should free the
* label after this call.
*
* @param[in] obj The object.
* @param[in] label The label of the list item.
* @param[in] icon The icon object to use for the left side of the item. An
* icon can be any Evas object, but usually it is an icon created with
* elm_icon_add().
* @param[in] end The icon object to use for the right side of the item. An
* icon can be any Evas object.
* @param[in] func The function to call when the item is clicked.
* @param[in] data The data to associate with the item for related callbacks.
* @param[in] cmp_func The comparing function to be used to sort list items by
* #Elm.Widget.Item item handles. This function will receive two items and
* compare them, returning a non-negative integer if the second item should be
* place after the first, or negative value if should be placed before.
*
* @return The created item or @c NULL upon failure.
*
* @ingroup Elm_List_Group
*/
EAPI Elm_Widget_Item *elm_list_item_sorted_insert(Elm_List *obj, const char *label, Efl_Canvas_Object *icon, Efl_Canvas_Object *end, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func);
#endif

View File

@ -1,123 +0,0 @@
class Elm.List.Item extends Elm.Widget.Item implements Efl.Ui.Legacy
{
[[Elementary list item class]]
legacy_prefix: elm_list_item;
eo_prefix: elm_obj_list_item;
methods {
@property separator {
get {
[[Get a value whether item is a separator or not.]]
}
set {
[[Set or unset item as a separator.
Items aren't set as separator by default.
If set as separator it will display separator theme,
so won't display icons or label.
]]
}
values {
setting: bool; [[$true means item $it is a separator.
$false indicates it's not.]]
}
}
@property selected {
get {
[[Get whether the item is selected or not.]]
}
set {
[[Set the selected state of an item.
This sets the selected state of the given item.
If a new item is selected the previously selected
will be unselected, unless multiple selection is
enabled with \@ref elm_list_multi_select_set.
Previously selected item can be get with function
\@ref elm_list_selected_item_get.
Selected items will be highlighted.
]]
}
values {
selected: bool; [[The selected state.]]
}
}
@property object {
get {
[[Get the real Evas(Edje) object created to implement
the view of a given list item.
Base object is the $Evas_Object that represents that
item.
]]
}
values {
obj: Efl.Canvas.Object; [[The base Edje object associated with the item.]]
}
}
@property prev {
get {
[[Get the item before the item in list.
Note: If it is the first item, $null will be returned.
]]
legacy: elm_list_item_prev;
}
values {
item: Elm.Widget.Item; [[The item before or $null.]]
}
}
@property next {
get {
[[Get the item after the item in list.
Note: If it is the last item, $null will be returned.
]]
legacy: elm_list_item_next;
}
values {
item: Elm.Widget.Item; [[The item after or $null.]]
}
}
/* init { FIXME
params {
Evas_Smart_Cb func;
const(void_ptr) data;
}
}*/
show {
[[Show item in the list view.
It won't animate list until item is visible. If such
behavior is wanted, use @.bring_in instead.
]]
}
bring_in {
[[Bring in the given item to list view.
This causes list to jump to the given item and show it
(by scrolling), if it is not fully visible.
This may use animation to do so and take a period of time.
If animation isn't wanted, @.show can be used.
]]
}
}
implements {
Efl.Object.constructor;
Efl.Object.invalidate;
Efl.Object.destructor;
Elm.Widget.Item.disable;
Elm.Widget.Item.del_pre;
Elm.Widget.Item.signal_emit;
Elm.Widget.Item.item_focus { get; set; }
Elm.Widget.Item.part_text { get; set; }
Elm.Widget.Item.part_content { get; set; }
Elm.Widget.Item.part_content_unset;
Efl.Access.Object.i18n_name { get; }
Efl.Access.Object.state_set { get; }
}
}

View File

@ -0,0 +1,195 @@
void _elm_list_item_separator_set(Eo *obj, Elm_List_Item_Data *pd, Eina_Bool setting);
static Eina_Error
__eolian_elm_list_item_separator_set_reflect(Eo *obj, Eina_Value val)
{
Eina_Error r = 0; Eina_Bool cval;
if (!eina_value_bool_convert(&val, &cval))
{
r = EINA_ERROR_VALUE_FAILED;
goto end;
}
elm_obj_list_item_separator_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_list_item_separator_set, EFL_FUNC_CALL(setting), Eina_Bool setting);
Eina_Bool _elm_list_item_separator_get(const Eo *obj, Elm_List_Item_Data *pd);
static Eina_Value
__eolian_elm_list_item_separator_get_reflect(Eo *obj)
{
Eina_Bool val = elm_obj_list_item_separator_get(obj);
return eina_value_bool_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_obj_list_item_separator_get, Eina_Bool, 0);
void _elm_list_item_selected_set(Eo *obj, Elm_List_Item_Data *pd, Eina_Bool selected);
static Eina_Error
__eolian_elm_list_item_selected_set_reflect(Eo *obj, Eina_Value val)
{
Eina_Error r = 0; Eina_Bool cval;
if (!eina_value_bool_convert(&val, &cval))
{
r = EINA_ERROR_VALUE_FAILED;
goto end;
}
elm_obj_list_item_selected_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_list_item_selected_set, EFL_FUNC_CALL(selected), Eina_Bool selected);
Eina_Bool _elm_list_item_selected_get(const Eo *obj, Elm_List_Item_Data *pd);
static Eina_Value
__eolian_elm_list_item_selected_get_reflect(Eo *obj)
{
Eina_Bool val = elm_obj_list_item_selected_get(obj);
return eina_value_bool_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_obj_list_item_selected_get, Eina_Bool, 0);
Efl_Canvas_Object *_elm_list_item_object_get(const Eo *obj, Elm_List_Item_Data *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_list_item_object_get, Efl_Canvas_Object *, NULL);
Elm_Widget_Item *_elm_list_item_prev_get(const Eo *obj, Elm_List_Item_Data *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_list_item_prev_get, Elm_Widget_Item *, NULL);
Elm_Widget_Item *_elm_list_item_next_get(const Eo *obj, Elm_List_Item_Data *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_list_item_next_get, Elm_Widget_Item *, NULL);
void _elm_list_item_show(Eo *obj, Elm_List_Item_Data *pd);
EOAPI EFL_VOID_FUNC_BODY(elm_obj_list_item_show);
void _elm_list_item_bring_in(Eo *obj, Elm_List_Item_Data *pd);
EOAPI EFL_VOID_FUNC_BODY(elm_obj_list_item_bring_in);
Efl_Object *_elm_list_item_efl_object_constructor(Eo *obj, Elm_List_Item_Data *pd);
void _elm_list_item_efl_object_invalidate(Eo *obj, Elm_List_Item_Data *pd);
void _elm_list_item_efl_object_destructor(Eo *obj, Elm_List_Item_Data *pd);
void _elm_list_item_elm_widget_item_disable(Eo *obj, Elm_List_Item_Data *pd);
void _elm_list_item_elm_widget_item_del_pre(Eo *obj, Elm_List_Item_Data *pd);
void _elm_list_item_elm_widget_item_signal_emit(Eo *obj, Elm_List_Item_Data *pd, const char *emission, const char *source);
void _elm_list_item_elm_widget_item_item_focus_set(Eo *obj, Elm_List_Item_Data *pd, Eina_Bool focused);
Eina_Bool _elm_list_item_elm_widget_item_item_focus_get(const Eo *obj, Elm_List_Item_Data *pd);
void _elm_list_item_elm_widget_item_part_text_set(Eo *obj, Elm_List_Item_Data *pd, const char *part, const char *label);
const char *_elm_list_item_elm_widget_item_part_text_get(const Eo *obj, Elm_List_Item_Data *pd, const char *part);
void _elm_list_item_elm_widget_item_part_content_set(Eo *obj, Elm_List_Item_Data *pd, const char *part, Efl_Canvas_Object *content);
Efl_Canvas_Object *_elm_list_item_elm_widget_item_part_content_get(const Eo *obj, Elm_List_Item_Data *pd, const char *part);
Efl_Canvas_Object *_elm_list_item_elm_widget_item_part_content_unset(Eo *obj, Elm_List_Item_Data *pd, const char *part);
const char *_elm_list_item_efl_access_object_i18n_name_get(const Eo *obj, Elm_List_Item_Data *pd);
Efl_Access_State_Set _elm_list_item_efl_access_object_state_set_get(const Eo *obj, Elm_List_Item_Data *pd);
static Eina_Bool
_elm_list_item_class_initializer(Efl_Class *klass)
{
const Efl_Object_Ops *opsp = NULL;
const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
#ifndef ELM_LIST_ITEM_EXTRA_OPS
#define ELM_LIST_ITEM_EXTRA_OPS
#endif
EFL_OPS_DEFINE(ops,
EFL_OBJECT_OP_FUNC(elm_obj_list_item_separator_set, _elm_list_item_separator_set),
EFL_OBJECT_OP_FUNC(elm_obj_list_item_separator_get, _elm_list_item_separator_get),
EFL_OBJECT_OP_FUNC(elm_obj_list_item_selected_set, _elm_list_item_selected_set),
EFL_OBJECT_OP_FUNC(elm_obj_list_item_selected_get, _elm_list_item_selected_get),
EFL_OBJECT_OP_FUNC(elm_obj_list_item_object_get, _elm_list_item_object_get),
EFL_OBJECT_OP_FUNC(elm_obj_list_item_prev_get, _elm_list_item_prev_get),
EFL_OBJECT_OP_FUNC(elm_obj_list_item_next_get, _elm_list_item_next_get),
EFL_OBJECT_OP_FUNC(elm_obj_list_item_show, _elm_list_item_show),
EFL_OBJECT_OP_FUNC(elm_obj_list_item_bring_in, _elm_list_item_bring_in),
EFL_OBJECT_OP_FUNC(efl_constructor, _elm_list_item_efl_object_constructor),
EFL_OBJECT_OP_FUNC(efl_invalidate, _elm_list_item_efl_object_invalidate),
EFL_OBJECT_OP_FUNC(efl_destructor, _elm_list_item_efl_object_destructor),
EFL_OBJECT_OP_FUNC(elm_wdg_item_disable, _elm_list_item_elm_widget_item_disable),
EFL_OBJECT_OP_FUNC(elm_wdg_item_del_pre, _elm_list_item_elm_widget_item_del_pre),
EFL_OBJECT_OP_FUNC(elm_wdg_item_signal_emit, _elm_list_item_elm_widget_item_signal_emit),
EFL_OBJECT_OP_FUNC(elm_wdg_item_focus_set, _elm_list_item_elm_widget_item_item_focus_set),
EFL_OBJECT_OP_FUNC(elm_wdg_item_focus_get, _elm_list_item_elm_widget_item_item_focus_get),
EFL_OBJECT_OP_FUNC(elm_wdg_item_part_text_set, _elm_list_item_elm_widget_item_part_text_set),
EFL_OBJECT_OP_FUNC(elm_wdg_item_part_text_get, _elm_list_item_elm_widget_item_part_text_get),
EFL_OBJECT_OP_FUNC(elm_wdg_item_part_content_set, _elm_list_item_elm_widget_item_part_content_set),
EFL_OBJECT_OP_FUNC(elm_wdg_item_part_content_get, _elm_list_item_elm_widget_item_part_content_get),
EFL_OBJECT_OP_FUNC(elm_wdg_item_part_content_unset, _elm_list_item_elm_widget_item_part_content_unset),
EFL_OBJECT_OP_FUNC(efl_access_object_i18n_name_get, _elm_list_item_efl_access_object_i18n_name_get),
EFL_OBJECT_OP_FUNC(efl_access_object_state_set_get, _elm_list_item_efl_access_object_state_set_get),
ELM_LIST_ITEM_EXTRA_OPS
);
opsp = &ops;
static const Efl_Object_Property_Reflection refl_table[] = {
{"separator", __eolian_elm_list_item_separator_set_reflect, __eolian_elm_list_item_separator_get_reflect},
{"selected", __eolian_elm_list_item_selected_set_reflect, __eolian_elm_list_item_selected_get_reflect},
};
static const Efl_Object_Property_Reflection_Ops rops = {
refl_table, EINA_C_ARRAY_LENGTH(refl_table)
};
ropsp = &rops;
return efl_class_functions_set(klass, opsp, ropsp);
}
static const Efl_Class_Description _elm_list_item_class_desc = {
EO_VERSION,
"Elm.List.Item",
EFL_CLASS_TYPE_REGULAR,
sizeof(Elm_List_Item_Data),
_elm_list_item_class_initializer,
NULL,
NULL
};
EFL_DEFINE_CLASS(elm_list_item_class_get, &_elm_list_item_class_desc, ELM_WIDGET_ITEM_CLASS, EFL_UI_LEGACY_INTERFACE, NULL);
#include "elm_list_item_eo.legacy.c"

View File

@ -0,0 +1,148 @@
#ifndef _ELM_LIST_ITEM_EO_H_
#define _ELM_LIST_ITEM_EO_H_
#ifndef _ELM_LIST_ITEM_EO_CLASS_TYPE
#define _ELM_LIST_ITEM_EO_CLASS_TYPE
typedef Eo Elm_List_Item;
#endif
#ifndef _ELM_LIST_ITEM_EO_TYPES
#define _ELM_LIST_ITEM_EO_TYPES
#endif
/** Elementary list item class
*
* @ingroup Elm_List_Item
*/
#define ELM_LIST_ITEM_CLASS elm_list_item_class_get()
EWAPI const Efl_Class *elm_list_item_class_get(void);
/**
* @brief Set or unset item as a separator.
*
* Items aren't set as separator by default.
*
* If set as separator it will display separator theme, so won't display icons
* or label.
*
* @param[in] obj The object.
* @param[in] setting @c true means item @c it is a separator. @c false
* indicates it's not.
*
* @ingroup Elm_List_Item
*/
EOAPI void elm_obj_list_item_separator_set(Eo *obj, Eina_Bool setting);
/**
* @brief Get a value whether item is a separator or not.
*
* @param[in] obj The object.
*
* @return @c true means item @c it is a separator. @c false indicates it's
* not.
*
* @ingroup Elm_List_Item
*/
EOAPI Eina_Bool elm_obj_list_item_separator_get(const Eo *obj);
/**
* @brief Set the selected state of an item.
*
* This sets the selected state of the given item.
*
* If a new item is selected the previously selected will be unselected, unless
* multiple selection is enabled with @ref elm_list_multi_select_set.
* Previously selected item can be get with function @ref
* elm_list_selected_item_get.
*
* Selected items will be highlighted.
*
* @param[in] obj The object.
* @param[in] selected The selected state.
*
* @ingroup Elm_List_Item
*/
EOAPI void elm_obj_list_item_selected_set(Eo *obj, Eina_Bool selected);
/**
* @brief Get whether the item is selected or not.
*
* @param[in] obj The object.
*
* @return The selected state.
*
* @ingroup Elm_List_Item
*/
EOAPI Eina_Bool elm_obj_list_item_selected_get(const Eo *obj);
/**
* @brief Get the real Evas(Edje) object created to implement the view of a
* given list item.
*
* Base object is the @c Evas_Object that represents that item.
*
* @param[in] obj The object.
*
* @return The base Edje object associated with the item.
*
* @ingroup Elm_List_Item
*/
EOAPI Efl_Canvas_Object *elm_obj_list_item_object_get(const Eo *obj);
/**
* @brief Get the item before the item in list.
*
* @note If it is the first item, @c null will be returned.
*
* @param[in] obj The object.
*
* @return The item before or @c null.
*
* @ingroup Elm_List_Item
*/
EOAPI Elm_Widget_Item *elm_obj_list_item_prev_get(const Eo *obj);
/**
* @brief Get the item after the item in list.
*
* @note If it is the last item, @c null will be returned.
*
* @param[in] obj The object.
*
* @return The item after or @c null.
*
* @ingroup Elm_List_Item
*/
EOAPI Elm_Widget_Item *elm_obj_list_item_next_get(const Eo *obj);
/**
* @brief Show item in the list view.
*
* It won't animate list until item is visible. If such behavior is wanted, use
* @ref elm_obj_list_item_bring_in instead.
* @param[in] obj The object.
*
* @ingroup Elm_List_Item
*/
EOAPI void elm_obj_list_item_show(Eo *obj);
/**
* @brief Bring in the given item to list view.
*
* This causes list to jump to the given item and show it (by scrolling), if it
* is not fully visible.
*
* This may use animation to do so and take a period of time.
*
* If animation isn't wanted, @ref elm_obj_list_item_show can be used.
* @param[in] obj The object.
*
* @ingroup Elm_List_Item
*/
EOAPI void elm_obj_list_item_bring_in(Eo *obj);
#endif

View File

@ -0,0 +1,54 @@
EAPI void
elm_list_item_separator_set(Elm_List_Item *obj, Eina_Bool setting)
{
elm_obj_list_item_separator_set(obj, setting);
}
EAPI Eina_Bool
elm_list_item_separator_get(const Elm_List_Item *obj)
{
return elm_obj_list_item_separator_get(obj);
}
EAPI void
elm_list_item_selected_set(Elm_List_Item *obj, Eina_Bool selected)
{
elm_obj_list_item_selected_set(obj, selected);
}
EAPI Eina_Bool
elm_list_item_selected_get(const Elm_List_Item *obj)
{
return elm_obj_list_item_selected_get(obj);
}
EAPI Efl_Canvas_Object *
elm_list_item_object_get(const Elm_List_Item *obj)
{
return elm_obj_list_item_object_get(obj);
}
EAPI Elm_Widget_Item *
elm_list_item_prev(const Elm_List_Item *obj)
{
return elm_obj_list_item_prev_get(obj);
}
EAPI Elm_Widget_Item *
elm_list_item_next(const Elm_List_Item *obj)
{
return elm_obj_list_item_next_get(obj);
}
EAPI void
elm_list_item_show(Elm_List_Item *obj)
{
elm_obj_list_item_show(obj);
}
EAPI void
elm_list_item_bring_in(Elm_List_Item *obj)
{
elm_obj_list_item_bring_in(obj);
}

View File

@ -0,0 +1,141 @@
#ifndef _ELM_LIST_ITEM_EO_LEGACY_H_
#define _ELM_LIST_ITEM_EO_LEGACY_H_
#ifndef _ELM_LIST_ITEM_EO_CLASS_TYPE
#define _ELM_LIST_ITEM_EO_CLASS_TYPE
typedef Eo Elm_List_Item;
#endif
#ifndef _ELM_LIST_ITEM_EO_TYPES
#define _ELM_LIST_ITEM_EO_TYPES
#endif
/**
* @brief Set or unset item as a separator.
*
* Items aren't set as separator by default.
*
* If set as separator it will display separator theme, so won't display icons
* or label.
*
* @param[in] obj The object.
* @param[in] setting @c true means item @c it is a separator. @c false
* indicates it's not.
*
* @ingroup Elm_List_Item_Group
*/
EAPI void elm_list_item_separator_set(Elm_List_Item *obj, Eina_Bool setting);
/**
* @brief Get a value whether item is a separator or not.
*
* @param[in] obj The object.
*
* @return @c true means item @c it is a separator. @c false indicates it's
* not.
*
* @ingroup Elm_List_Item_Group
*/
EAPI Eina_Bool elm_list_item_separator_get(const Elm_List_Item *obj);
/**
* @brief Set the selected state of an item.
*
* This sets the selected state of the given item.
*
* If a new item is selected the previously selected will be unselected, unless
* multiple selection is enabled with @ref elm_list_multi_select_set.
* Previously selected item can be get with function @ref
* elm_list_selected_item_get.
*
* Selected items will be highlighted.
*
* @param[in] obj The object.
* @param[in] selected The selected state.
*
* @ingroup Elm_List_Item_Group
*/
EAPI void elm_list_item_selected_set(Elm_List_Item *obj, Eina_Bool selected);
/**
* @brief Get whether the item is selected or not.
*
* @param[in] obj The object.
*
* @return The selected state.
*
* @ingroup Elm_List_Item_Group
*/
EAPI Eina_Bool elm_list_item_selected_get(const Elm_List_Item *obj);
/**
* @brief Get the real Evas(Edje) object created to implement the view of a
* given list item.
*
* Base object is the @c Evas_Object that represents that item.
*
* @param[in] obj The object.
*
* @return The base Edje object associated with the item.
*
* @ingroup Elm_List_Item_Group
*/
EAPI Efl_Canvas_Object *elm_list_item_object_get(const Elm_List_Item *obj);
/**
* @brief Get the item before the item in list.
*
* @note If it is the first item, @c null will be returned.
*
* @param[in] obj The object.
*
* @return The item before or @c null.
*
* @ingroup Elm_List_Item_Group
*/
EAPI Elm_Widget_Item *elm_list_item_prev(const Elm_List_Item *obj);
/**
* @brief Get the item after the item in list.
*
* @note If it is the last item, @c null will be returned.
*
* @param[in] obj The object.
*
* @return The item after or @c null.
*
* @ingroup Elm_List_Item_Group
*/
EAPI Elm_Widget_Item *elm_list_item_next(const Elm_List_Item *obj);
/**
* @brief Show item in the list view.
*
* It won't animate list until item is visible. If such behavior is wanted, use
* @ref elm_list_item_bring_in instead.
* @param[in] obj The object.
*
* @ingroup Elm_List_Item_Group
*/
EAPI void elm_list_item_show(Elm_List_Item *obj);
/**
* @brief Bring in the given item to list view.
*
* This causes list to jump to the given item and show it (by scrolling), if it
* is not fully visible.
*
* This may use animation to do so and take a period of time.
*
* If animation isn't wanted, @ref elm_list_item_show can be used.
* @param[in] obj The object.
*
* @ingroup Elm_List_Item_Group
*/
EAPI void elm_list_item_bring_in(Elm_List_Item *obj);
#endif

View File

@ -11,5 +11,5 @@
*/
EAPI Evas_Object *elm_list_add(Evas_Object *parent);
#include "elm_list_item.eo.legacy.h"
#include "elm_list.eo.legacy.h"
#include "elm_list_item_eo.legacy.h"
#include "elm_list_eo.legacy.h"

View File

@ -3,8 +3,8 @@
#include "elm_interface_scrollable.h"
#include "elm_widget_layout.h"
#include "elm_list.eo.h"
#include "elm_list_item.eo.h"
#include "elm_list_eo.h"
#include "elm_list_item_eo.h"
/* DO NOT USE THIS HEADER UNLESS YOU ARE PREPARED FOR BREAKING OF YOUR
* CODE. THIS IS ELEMENTARY'S INTERNAL WIDGET API (for now) AND IS NOT

View File

@ -1,6 +1,5 @@
pub_legacy_eo_files = [
'efl_ui_clock_legacy.eo',
'elm_list.eo',
'elm_map.eo',
'elm_map_pan.eo',
'elm_menu.eo',
@ -17,7 +16,6 @@ pub_legacy_eo_files = [
'elm_systray.eo',
'elm_menu_item.eo',
'elm_widget_item_static_focus.eo',
'elm_list_item.eo',
'elm_popup_item.eo',
'elm_ctxpopup_part.eo',
'elm_dayselector_part.eo',
@ -766,6 +764,10 @@ elementary_pub_headers = [
'elm_inwin_eo.legacy.h',
'elm_label_eo.h',
'elm_label_eo.legacy.h',
'elm_list_eo.h',
'elm_list_eo.legacy.h',
'elm_list_item_eo.h',
'elm_list_item_eo.legacy.h',
]
elementary_header_src = [