elm_index: 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/D8177
This commit is contained in:
Mike Blumenkrantz 2019-03-05 17:00:37 -05:00 committed by Cedric BAIL
parent 4f8a7233cc
commit c5493fb81c
15 changed files with 1456 additions and 271 deletions

View File

@ -187,7 +187,6 @@ elm_private_eolian_files = \
elm_legacy_eolian_files = \
lib/elementary/efl_ui_clock_legacy.eo \
lib/elementary/elm_interface_fileselector.eo \
lib/elementary/elm_index.eo \
lib/elementary/elm_label.eo \
lib/elementary/elm_list.eo \
lib/elementary/elm_map.eo \
@ -205,7 +204,6 @@ elm_legacy_eolian_files = \
lib/elementary/elm_sys_notify_dbus.eo \
lib/elementary/elm_systray.eo \
lib/elementary/elm_menu_item.eo \
lib/elementary/elm_index_item.eo \
lib/elementary/elm_widget_item_static_focus.eo \
lib/elementary/elm_list_item.eo \
lib/elementary/elm_popup_item.eo \
@ -360,6 +358,10 @@ lib/elementary/elm_hoversel_eo.c \
lib/elementary/elm_hoversel_item_eo.c \
lib/elementary/elm_hoversel_item_eo.legacy.c \
lib/elementary/elm_icon_eo.c \
lib/elementary/elm_index_eo.c \
lib/elementary/elm_index_eo.legacy.c \
lib/elementary/elm_index_item_eo.c \
lib/elementary/elm_index_item_eo.legacy.c \
$(NULL)
elm_legacy_eo_headers = \
@ -481,6 +483,10 @@ lib/elementary/elm_hoversel_item_eo.h \
lib/elementary/elm_hoversel_item_eo.legacy.h \
lib/elementary/elm_icon_eo.h \
lib/elementary/elm_icon_eo.legacy.h \
lib/elementary/elm_index_eo.h \
lib/elementary/elm_index_eo.legacy.h \
lib/elementary/elm_index_item_eo.h \
lib/elementary/elm_index_item_eo.legacy.h \
$(NULL)

View File

@ -1710,5 +1710,5 @@ _elm_index_item_efl_access_widget_action_elm_actions_get(const Eo *eo_it EINA_UN
ELM_LAYOUT_SIZING_EVAL_OPS(elm_index), \
EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_index)
#include "elm_index_item.eo.c"
#include "elm_index.eo.c"
#include "elm_index_item_eo.c"
#include "elm_index_eo.c"

View File

@ -1,211 +0,0 @@
class Elm.Index extends Efl.Ui.Layout_Base implements Efl.Ui.Direction,
Efl.Ui.Clickable, Efl.Ui.Selectable, Efl.Ui.Legacy
{
[[elementary index class]]
legacy_prefix: elm_index;
eo_prefix: elm_obj_index;
event_prefix: elm_index;
methods {
@property autohide_disabled {
[[Enable or disable auto hiding feature for a given index widget.]]
values {
disabled: bool; [[$true to disable auto hiding, $false to enable]]
}
}
@property omit_enabled {
[[Enable or disable omit feature for a given index widget.
@since 1.8]]
values {
enabled: bool; [[$true to enable omit feature, $false to disable]]
}
}
@property standard_priority {
[[Control standard_priority group of index. Priority group will be shown as many items as it can, and other group will be shown one character only.
@since 1.16]]
values {
priority: int; [[$priority target priority value in index]]
}
}
@property delay_change_time {
[[Set a delay change time for index object.
Note: delay time is 0.2 sec by default.]]
values {
dtime: double; [[The delay change time to set.]]
}
}
@property indicator_disabled {
[[Control the indicator as to be disabled.
In Index widget, Indicator notes popup text, which shows a letter has been selecting.]]
values {
disabled: bool; [[$true to disable it, $false to enable it]]
}
}
@property item_level {
[[Set the items level for a given index widget.
See: elm_index_item_level_get()]]
values {
level: int; [[$0 or $1, the currently implemented levels.]]
}
}
level_go {
[[Flush the changes made to the index items so they work correctly
This flushes any changes made to items indicating the object is ready to
go. You should call this before any changes you expect to work. This
is similar to elm_list_go().
Warning: If not called, it won't display the index properly.]]
params {
@in level: int; [[The index level (one of $0 or $1) where changes were made]]
}
}
item_prepend {
[[Prepend a new item on a given index widget.
Despite the most common usage of the $letter argument is for
single char strings, one could use arbitrary strings as index
entries.
$item will be the pointer returned back on $"changed",
"delay,changed" and $"selected" smart events.]]
return: Elm.Widget.Item; [[A handle to the item added or $NULL, on errors]]
params {
@in letter: string; [[Letter under which the item should be indexed]]
@in func: Evas_Smart_Cb @optional; [[The function to call when the item is selected.]]
@in data: const(void_ptr) @optional; [[The item data to set for the index's item]]
}
}
item_clear {
[[Removes all items from a given index widget.
If deletion callbacks are set, via elm_object_item_del_cb_set(),
that callback function will be called for each item in $obj.]]
}
item_insert_after {
[[Insert a new item into the index object after item $after.
Despite the most common usage of the $letter argument is for
single char strings, one could use arbitrary strings as index
entries.
$item will be the pointer returned back on $"changed",
"delay,changed" and $"selected" smart events.
Note: If $after is $NULL this function will behave as
elm_index_item_append().]]
return: Elm.Widget.Item; [[A handle to the item added or $NULL, on errors]]
params {
@in after: Elm.Widget.Item; [[The index item to insert after.]]
@in letter: string; [[Letter under which the item should be indexed]]
@in func: Evas_Smart_Cb @optional; [[The function to call when the item is clicked.]]
@in data: const(void_ptr) @optional; [[The item data to set for the index's item]]
}
}
item_find {
[[Find a given index widget's item, using item data.]]
return: Elm.Widget.Item; [[The index item handle, if found, or $NULL otherwise]]
params {
@in data: const(void_ptr); [[The item data pointed to by the desired index item]]
}
}
item_insert_before {
[[Insert a new item into the index object before item $before.
Despite the most common usage of the $letter argument is for
single char strings, one could use arbitrary strings as index
entries.
$item will be the pointer returned back on $"changed",
"delay,changed" and $"selected" smart events.
Note: If $before is $NULL this function will behave as
elm_index_item_prepend().]]
return: Elm.Widget.Item; [[A handle to the item added or $NULL, on errors]]
params {
@in before: Elm.Widget.Item; [[The index item to insert after.]]
@in letter: string; [[Letter under which the item should be indexed]]
@in func: Evas_Smart_Cb @optional; [[The function to call when the item is clicked.]]
@in data: const(void_ptr) @optional; [[The item data to set for the index's item]]
}
}
item_append {
[[Append a new item on a given index widget.
Despite the most common usage of the $letter argument is for
single char strings, one could use arbitrary strings as index
entries.
$item will be the pointer returned back on $"changed",
"delay,changed" and $"selected" smart events.]]
return: Elm.Widget.Item; [[A handle to the item added or $NULL, on errors]]
params {
@in letter: string; [[Letter under which the item should be indexed]]
@in func: Evas_Smart_Cb @optional; [[The function to call when the item is selected.]]
@in data: const(void_ptr) @optional; [[The item data to set for the index's item]]
}
}
selected_item_get @const {
[[Returns the last selected item, for a given index widget.]]
return: Elm.Widget.Item; [[The last item selected on $obj (or $NULL, on errors).]]
params {
@in level: int; [[$0 or $1, the currently implemented levels.]]
}
}
item_sorted_insert {
[[Insert a new item into the given index widget, using $cmp_func function to sort items (by item handles).
Despite the most common usage of the $letter argument is for
single char strings, one could use arbitrary strings as index
entries.
$item will be the pointer returned back on $"changed",
"delay,changed" and $"selected" smart events.]]
return: Elm.Widget.Item; [[A handle to the item added or $NULL, on errors]]
params {
@in letter: string; [[Letter under which the item should be indexed]]
@in func: Evas_Smart_Cb @optional; [[The function to call when the item is clicked.]]
@in data: const(void_ptr) @optional; [[The item data to set for the index's item]]
@in cmp_func: Eina_Compare_Cb; [[The comparing function to be used to sort index items by index item handles]]
@in cmp_data_func: Eina_Compare_Cb @optional; [[A fallback function to be called for the
sorting of index items by item data). It will be used
when $cmp_func returns $0 (equality), which means an index
item with provided item data already exists. To decide which
data item should be pointed to by the index item in question,
$cmp_data_func will be used. If $cmp_data_func returns a
non-negative value, the previous index item data will be
replaced by the given $item pointer. If the previous data need
to be freed, it should be done by the $cmp_data_func function,
because all references to it will be lost. If this function is
not provided ($NULL is given), index items will be
duplicated, if $cmp_func returns $0.]]
}
}
}
implements {
class.constructor;
Efl.Object.constructor;
Efl.Ui.Widget.theme_apply;
Efl.Ui.Widget.on_access_update;
Efl.Ui.Direction.direction { get; set; [[Only supports $vertical and $horizontal. Default is $vertical.]] }
Efl.Access.Object.access_children { get; }
}
events {
changed: Efl.Object; [[Called when index changed]]
delay,changed: Efl.Object; [[Called when delay changed]]
level,up: void; [[Called when level increased]]
level,down: void; [[Called when level decreased]]
}
}

View File

@ -0,0 +1,327 @@
EWAPI const Efl_Event_Description _ELM_INDEX_EVENT_CHANGED =
EFL_EVENT_DESCRIPTION("changed");
EWAPI const Efl_Event_Description _ELM_INDEX_EVENT_DELAY_CHANGED =
EFL_EVENT_DESCRIPTION("delay,changed");
EWAPI const Efl_Event_Description _ELM_INDEX_EVENT_LEVEL_UP =
EFL_EVENT_DESCRIPTION("level,up");
EWAPI const Efl_Event_Description _ELM_INDEX_EVENT_LEVEL_DOWN =
EFL_EVENT_DESCRIPTION("level,down");
void _elm_index_autohide_disabled_set(Eo *obj, Elm_Index_Data *pd, Eina_Bool disabled);
static Eina_Error
__eolian_elm_index_autohide_disabled_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_index_autohide_disabled_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_index_autohide_disabled_set, EFL_FUNC_CALL(disabled), Eina_Bool disabled);
Eina_Bool _elm_index_autohide_disabled_get(const Eo *obj, Elm_Index_Data *pd);
static Eina_Value
__eolian_elm_index_autohide_disabled_get_reflect(Eo *obj)
{
Eina_Bool val = elm_obj_index_autohide_disabled_get(obj);
return eina_value_bool_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_obj_index_autohide_disabled_get, Eina_Bool, 0);
void _elm_index_omit_enabled_set(Eo *obj, Elm_Index_Data *pd, Eina_Bool enabled);
static Eina_Error
__eolian_elm_index_omit_enabled_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_index_omit_enabled_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_index_omit_enabled_set, EFL_FUNC_CALL(enabled), Eina_Bool enabled);
Eina_Bool _elm_index_omit_enabled_get(const Eo *obj, Elm_Index_Data *pd);
static Eina_Value
__eolian_elm_index_omit_enabled_get_reflect(Eo *obj)
{
Eina_Bool val = elm_obj_index_omit_enabled_get(obj);
return eina_value_bool_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_obj_index_omit_enabled_get, Eina_Bool, 0);
void _elm_index_standard_priority_set(Eo *obj, Elm_Index_Data *pd, int priority);
static Eina_Error
__eolian_elm_index_standard_priority_set_reflect(Eo *obj, Eina_Value val)
{
Eina_Error r = 0; int cval;
if (!eina_value_int_convert(&val, &cval))
{
r = EINA_ERROR_VALUE_FAILED;
goto end;
}
elm_obj_index_standard_priority_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_index_standard_priority_set, EFL_FUNC_CALL(priority), int priority);
int _elm_index_standard_priority_get(const Eo *obj, Elm_Index_Data *pd);
static Eina_Value
__eolian_elm_index_standard_priority_get_reflect(Eo *obj)
{
int val = elm_obj_index_standard_priority_get(obj);
return eina_value_int_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_obj_index_standard_priority_get, int, 0);
void _elm_index_delay_change_time_set(Eo *obj, Elm_Index_Data *pd, double dtime);
static Eina_Error
__eolian_elm_index_delay_change_time_set_reflect(Eo *obj, Eina_Value val)
{
Eina_Error r = 0; double cval;
if (!eina_value_double_convert(&val, &cval))
{
r = EINA_ERROR_VALUE_FAILED;
goto end;
}
elm_obj_index_delay_change_time_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_index_delay_change_time_set, EFL_FUNC_CALL(dtime), double dtime);
double _elm_index_delay_change_time_get(const Eo *obj, Elm_Index_Data *pd);
static Eina_Value
__eolian_elm_index_delay_change_time_get_reflect(Eo *obj)
{
double val = elm_obj_index_delay_change_time_get(obj);
return eina_value_double_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_obj_index_delay_change_time_get, double, 0);
void _elm_index_indicator_disabled_set(Eo *obj, Elm_Index_Data *pd, Eina_Bool disabled);
static Eina_Error
__eolian_elm_index_indicator_disabled_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_index_indicator_disabled_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_index_indicator_disabled_set, EFL_FUNC_CALL(disabled), Eina_Bool disabled);
Eina_Bool _elm_index_indicator_disabled_get(const Eo *obj, Elm_Index_Data *pd);
static Eina_Value
__eolian_elm_index_indicator_disabled_get_reflect(Eo *obj)
{
Eina_Bool val = elm_obj_index_indicator_disabled_get(obj);
return eina_value_bool_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_obj_index_indicator_disabled_get, Eina_Bool, 0);
void _elm_index_item_level_set(Eo *obj, Elm_Index_Data *pd, int level);
static Eina_Error
__eolian_elm_index_item_level_set_reflect(Eo *obj, Eina_Value val)
{
Eina_Error r = 0; int cval;
if (!eina_value_int_convert(&val, &cval))
{
r = EINA_ERROR_VALUE_FAILED;
goto end;
}
elm_obj_index_item_level_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_index_item_level_set, EFL_FUNC_CALL(level), int level);
int _elm_index_item_level_get(const Eo *obj, Elm_Index_Data *pd);
static Eina_Value
__eolian_elm_index_item_level_get_reflect(Eo *obj)
{
int val = elm_obj_index_item_level_get(obj);
return eina_value_int_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_obj_index_item_level_get, int, 0);
void _elm_index_level_go(Eo *obj, Elm_Index_Data *pd, int level);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_index_level_go, EFL_FUNC_CALL(level), int level);
Elm_Widget_Item *_elm_index_item_prepend(Eo *obj, Elm_Index_Data *pd, const char *letter, Evas_Smart_Cb func, const void *data);
EOAPI EFL_FUNC_BODYV(elm_obj_index_item_prepend, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(letter, func, data), const char *letter, Evas_Smart_Cb func, const void *data);
void _elm_index_item_clear(Eo *obj, Elm_Index_Data *pd);
EOAPI EFL_VOID_FUNC_BODY(elm_obj_index_item_clear);
Elm_Widget_Item *_elm_index_item_insert_after(Eo *obj, Elm_Index_Data *pd, Elm_Widget_Item *after, const char *letter, Evas_Smart_Cb func, const void *data);
EOAPI EFL_FUNC_BODYV(elm_obj_index_item_insert_after, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(after, letter, func, data), Elm_Widget_Item *after, const char *letter, Evas_Smart_Cb func, const void *data);
Elm_Widget_Item *_elm_index_item_find(Eo *obj, Elm_Index_Data *pd, const void *data);
EOAPI EFL_FUNC_BODYV(elm_obj_index_item_find, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(data), const void *data);
Elm_Widget_Item *_elm_index_item_insert_before(Eo *obj, Elm_Index_Data *pd, Elm_Widget_Item *before, const char *letter, Evas_Smart_Cb func, const void *data);
EOAPI EFL_FUNC_BODYV(elm_obj_index_item_insert_before, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(before, letter, func, data), Elm_Widget_Item *before, const char *letter, Evas_Smart_Cb func, const void *data);
Elm_Widget_Item *_elm_index_item_append(Eo *obj, Elm_Index_Data *pd, const char *letter, Evas_Smart_Cb func, const void *data);
EOAPI EFL_FUNC_BODYV(elm_obj_index_item_append, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(letter, func, data), const char *letter, Evas_Smart_Cb func, const void *data);
Elm_Widget_Item *_elm_index_selected_item_get(const Eo *obj, Elm_Index_Data *pd, int level);
EOAPI EFL_FUNC_BODYV_CONST(elm_obj_index_selected_item_get, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(level), int level);
Elm_Widget_Item *_elm_index_item_sorted_insert(Eo *obj, Elm_Index_Data *pd, const char *letter, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func, Eina_Compare_Cb cmp_data_func);
EOAPI EFL_FUNC_BODYV(elm_obj_index_item_sorted_insert, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(letter, func, data, cmp_func, cmp_data_func), const char *letter, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func, Eina_Compare_Cb cmp_data_func);
Efl_Object *_elm_index_efl_object_constructor(Eo *obj, Elm_Index_Data *pd);
Eina_Error _elm_index_efl_ui_widget_theme_apply(Eo *obj, Elm_Index_Data *pd);
void _elm_index_efl_ui_widget_on_access_update(Eo *obj, Elm_Index_Data *pd, Eina_Bool enable);
void _elm_index_efl_ui_direction_direction_set(Eo *obj, Elm_Index_Data *pd, Efl_Ui_Dir dir);
Efl_Ui_Dir _elm_index_efl_ui_direction_direction_get(const Eo *obj, Elm_Index_Data *pd);
Eina_List *_elm_index_efl_access_object_access_children_get(const Eo *obj, Elm_Index_Data *pd);
static Eina_Bool
_elm_index_class_initializer(Efl_Class *klass)
{
const Efl_Object_Ops *opsp = NULL;
const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
#ifndef ELM_INDEX_EXTRA_OPS
#define ELM_INDEX_EXTRA_OPS
#endif
EFL_OPS_DEFINE(ops,
EFL_OBJECT_OP_FUNC(elm_obj_index_autohide_disabled_set, _elm_index_autohide_disabled_set),
EFL_OBJECT_OP_FUNC(elm_obj_index_autohide_disabled_get, _elm_index_autohide_disabled_get),
EFL_OBJECT_OP_FUNC(elm_obj_index_omit_enabled_set, _elm_index_omit_enabled_set),
EFL_OBJECT_OP_FUNC(elm_obj_index_omit_enabled_get, _elm_index_omit_enabled_get),
EFL_OBJECT_OP_FUNC(elm_obj_index_standard_priority_set, _elm_index_standard_priority_set),
EFL_OBJECT_OP_FUNC(elm_obj_index_standard_priority_get, _elm_index_standard_priority_get),
EFL_OBJECT_OP_FUNC(elm_obj_index_delay_change_time_set, _elm_index_delay_change_time_set),
EFL_OBJECT_OP_FUNC(elm_obj_index_delay_change_time_get, _elm_index_delay_change_time_get),
EFL_OBJECT_OP_FUNC(elm_obj_index_indicator_disabled_set, _elm_index_indicator_disabled_set),
EFL_OBJECT_OP_FUNC(elm_obj_index_indicator_disabled_get, _elm_index_indicator_disabled_get),
EFL_OBJECT_OP_FUNC(elm_obj_index_item_level_set, _elm_index_item_level_set),
EFL_OBJECT_OP_FUNC(elm_obj_index_item_level_get, _elm_index_item_level_get),
EFL_OBJECT_OP_FUNC(elm_obj_index_level_go, _elm_index_level_go),
EFL_OBJECT_OP_FUNC(elm_obj_index_item_prepend, _elm_index_item_prepend),
EFL_OBJECT_OP_FUNC(elm_obj_index_item_clear, _elm_index_item_clear),
EFL_OBJECT_OP_FUNC(elm_obj_index_item_insert_after, _elm_index_item_insert_after),
EFL_OBJECT_OP_FUNC(elm_obj_index_item_find, _elm_index_item_find),
EFL_OBJECT_OP_FUNC(elm_obj_index_item_insert_before, _elm_index_item_insert_before),
EFL_OBJECT_OP_FUNC(elm_obj_index_item_append, _elm_index_item_append),
EFL_OBJECT_OP_FUNC(elm_obj_index_selected_item_get, _elm_index_selected_item_get),
EFL_OBJECT_OP_FUNC(elm_obj_index_item_sorted_insert, _elm_index_item_sorted_insert),
EFL_OBJECT_OP_FUNC(efl_constructor, _elm_index_efl_object_constructor),
EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_index_efl_ui_widget_theme_apply),
EFL_OBJECT_OP_FUNC(efl_ui_widget_on_access_update, _elm_index_efl_ui_widget_on_access_update),
EFL_OBJECT_OP_FUNC(efl_ui_direction_set, _elm_index_efl_ui_direction_direction_set),
EFL_OBJECT_OP_FUNC(efl_ui_direction_get, _elm_index_efl_ui_direction_direction_get),
EFL_OBJECT_OP_FUNC(efl_access_object_access_children_get, _elm_index_efl_access_object_access_children_get),
ELM_INDEX_EXTRA_OPS
);
opsp = &ops;
static const Efl_Object_Property_Reflection refl_table[] = {
{"autohide_disabled", __eolian_elm_index_autohide_disabled_set_reflect, __eolian_elm_index_autohide_disabled_get_reflect},
{"omit_enabled", __eolian_elm_index_omit_enabled_set_reflect, __eolian_elm_index_omit_enabled_get_reflect},
{"standard_priority", __eolian_elm_index_standard_priority_set_reflect, __eolian_elm_index_standard_priority_get_reflect},
{"delay_change_time", __eolian_elm_index_delay_change_time_set_reflect, __eolian_elm_index_delay_change_time_get_reflect},
{"indicator_disabled", __eolian_elm_index_indicator_disabled_set_reflect, __eolian_elm_index_indicator_disabled_get_reflect},
{"item_level", __eolian_elm_index_item_level_set_reflect, __eolian_elm_index_item_level_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_index_class_desc = {
EO_VERSION,
"Elm.Index",
EFL_CLASS_TYPE_REGULAR,
sizeof(Elm_Index_Data),
_elm_index_class_initializer,
_elm_index_class_constructor,
NULL
};
EFL_DEFINE_CLASS(elm_index_class_get, &_elm_index_class_desc, EFL_UI_LAYOUT_BASE_CLASS, EFL_UI_DIRECTION_INTERFACE, EFL_UI_CLICKABLE_INTERFACE, EFL_UI_SELECTABLE_INTERFACE, EFL_UI_LEGACY_INTERFACE, NULL);
#include "elm_index_eo.legacy.c"

View File

@ -0,0 +1,382 @@
#ifndef _ELM_INDEX_EO_H_
#define _ELM_INDEX_EO_H_
#ifndef _ELM_INDEX_EO_CLASS_TYPE
#define _ELM_INDEX_EO_CLASS_TYPE
typedef Eo Elm_Index;
#endif
#ifndef _ELM_INDEX_EO_TYPES
#define _ELM_INDEX_EO_TYPES
#endif
/** elementary index class
*
* @ingroup Elm_Index
*/
#define ELM_INDEX_CLASS elm_index_class_get()
EWAPI const Efl_Class *elm_index_class_get(void);
/**
* @brief Enable or disable auto hiding feature for a given index widget.
*
* @param[in] obj The object.
* @param[in] disabled @c true to disable auto hiding, @c false to enable
*
* @ingroup Elm_Index
*/
EOAPI void elm_obj_index_autohide_disabled_set(Eo *obj, Eina_Bool disabled);
/**
* @brief Enable or disable auto hiding feature for a given index widget.
*
* @param[in] obj The object.
*
* @return @c true to disable auto hiding, @c false to enable
*
* @ingroup Elm_Index
*/
EOAPI Eina_Bool elm_obj_index_autohide_disabled_get(const Eo *obj);
/**
* @brief Enable or disable omit feature for a given index widget.
*
* @param[in] obj The object.
* @param[in] enabled @c true to enable omit feature, @c false to disable
*
* @since 1.8
*
* @ingroup Elm_Index
*/
EOAPI void elm_obj_index_omit_enabled_set(Eo *obj, Eina_Bool enabled);
/**
* @brief Enable or disable omit feature for a given index widget.
*
* @param[in] obj The object.
*
* @return @c true to enable omit feature, @c false to disable
*
* @since 1.8
*
* @ingroup Elm_Index
*/
EOAPI Eina_Bool elm_obj_index_omit_enabled_get(const Eo *obj);
/**
* @brief Control standard_priority group of index. Priority group will be
* shown as many items as it can, and other group will be shown one character
* only.
*
* @param[in] obj The object.
* @param[in] priority @c priority target priority value in index
*
* @since 1.16
*
* @ingroup Elm_Index
*/
EOAPI void elm_obj_index_standard_priority_set(Eo *obj, int priority);
/**
* @brief Control standard_priority group of index. Priority group will be
* shown as many items as it can, and other group will be shown one character
* only.
*
* @param[in] obj The object.
*
* @return @c priority target priority value in index
*
* @since 1.16
*
* @ingroup Elm_Index
*/
EOAPI int elm_obj_index_standard_priority_get(const Eo *obj);
/**
* @brief Set a delay change time for index object.
*
* @note delay time is 0.2 sec by default.
*
* @param[in] obj The object.
* @param[in] dtime The delay change time to set.
*
* @ingroup Elm_Index
*/
EOAPI void elm_obj_index_delay_change_time_set(Eo *obj, double dtime);
/**
* @brief Set a delay change time for index object.
*
* @note delay time is 0.2 sec by default.
*
* @param[in] obj The object.
*
* @return The delay change time to set.
*
* @ingroup Elm_Index
*/
EOAPI double elm_obj_index_delay_change_time_get(const Eo *obj);
/**
* @brief Control the indicator as to be disabled.
*
* In Index widget, Indicator notes popup text, which shows a letter has been
* selecting.
*
* @param[in] obj The object.
* @param[in] disabled @c true to disable it, @c false to enable it
*
* @ingroup Elm_Index
*/
EOAPI void elm_obj_index_indicator_disabled_set(Eo *obj, Eina_Bool disabled);
/**
* @brief Control the indicator as to be disabled.
*
* In Index widget, Indicator notes popup text, which shows a letter has been
* selecting.
*
* @param[in] obj The object.
*
* @return @c true to disable it, @c false to enable it
*
* @ingroup Elm_Index
*/
EOAPI Eina_Bool elm_obj_index_indicator_disabled_get(const Eo *obj);
/**
* @brief Set the items level for a given index widget.
*
* See: elm_index_item_level_get()
*
* @param[in] obj The object.
* @param[in] level $0 or $1, the currently implemented levels.
*
* @ingroup Elm_Index
*/
EOAPI void elm_obj_index_item_level_set(Eo *obj, int level);
/**
* @brief Set the items level for a given index widget.
*
* See: elm_index_item_level_get()
*
* @param[in] obj The object.
*
* @return $0 or $1, the currently implemented levels.
*
* @ingroup Elm_Index
*/
EOAPI int elm_obj_index_item_level_get(const Eo *obj);
/**
* @brief Flush the changes made to the index items so they work correctly
*
* This flushes any changes made to items indicating the object is ready to go.
* You should call this before any changes you expect to work. This is similar
* to elm_list_go().
*
* @warning If not called, it won't display the index properly.
*
* @param[in] obj The object.
* @param[in] level The index level (one of $0 or $1) where changes were made
*
* @ingroup Elm_Index
*/
EOAPI void elm_obj_index_level_go(Eo *obj, int level);
/**
* @brief Prepend a new item on a given index widget.
*
* Despite the most common usage of the @c letter argument is for single char
* strings, one could use arbitrary strings as index entries.
*
* @c item will be the pointer returned back on $"changed", "delay,changed" and
* $"selected" smart events.
*
* @param[in] obj The object.
* @param[in] letter Letter under which the item should be indexed
* @param[in] func The function to call when the item is selected.
* @param[in] data The item data to set for the index's item
*
* @return A handle to the item added or @c NULL, on errors
*
* @ingroup Elm_Index
*/
EOAPI Elm_Widget_Item *elm_obj_index_item_prepend(Eo *obj, const char *letter, Evas_Smart_Cb func, const void *data);
/**
* @brief Removes all items from a given index widget.
*
* If deletion callbacks are set, via elm_object_item_del_cb_set(), that
* callback function will be called for each item in @c obj.
* @param[in] obj The object.
*
* @ingroup Elm_Index
*/
EOAPI void elm_obj_index_item_clear(Eo *obj);
/**
* @brief Insert a new item into the index object after item @c after.
*
* Despite the most common usage of the @c letter argument is for single char
* strings, one could use arbitrary strings as index entries.
*
* @c item will be the pointer returned back on $"changed", "delay,changed" and
* $"selected" smart events.
*
* @note If @c after is @c NULL this function will behave as
* elm_index_item_append().
*
* @param[in] obj The object.
* @param[in] after The index item to insert after.
* @param[in] letter Letter under which the item should be indexed
* @param[in] func The function to call when the item is clicked.
* @param[in] data The item data to set for the index's item
*
* @return A handle to the item added or @c NULL, on errors
*
* @ingroup Elm_Index
*/
EOAPI Elm_Widget_Item *elm_obj_index_item_insert_after(Eo *obj, Elm_Widget_Item *after, const char *letter, Evas_Smart_Cb func, const void *data);
/**
* @brief Find a given index widget's item, using item data.
*
* @param[in] obj The object.
* @param[in] data The item data pointed to by the desired index item
*
* @return The index item handle, if found, or @c NULL otherwise
*
* @ingroup Elm_Index
*/
EOAPI Elm_Widget_Item *elm_obj_index_item_find(Eo *obj, const void *data);
/**
* @brief Insert a new item into the index object before item @c before.
*
* Despite the most common usage of the @c letter argument is for single char
* strings, one could use arbitrary strings as index entries.
*
* @c item will be the pointer returned back on $"changed", "delay,changed" and
* $"selected" smart events.
*
* @note If @c before is @c NULL this function will behave as
* elm_index_item_prepend().
*
* @param[in] obj The object.
* @param[in] before The index item to insert after.
* @param[in] letter Letter under which the item should be indexed
* @param[in] func The function to call when the item is clicked.
* @param[in] data The item data to set for the index's item
*
* @return A handle to the item added or @c NULL, on errors
*
* @ingroup Elm_Index
*/
EOAPI Elm_Widget_Item *elm_obj_index_item_insert_before(Eo *obj, Elm_Widget_Item *before, const char *letter, Evas_Smart_Cb func, const void *data);
/**
* @brief Append a new item on a given index widget.
*
* Despite the most common usage of the @c letter argument is for single char
* strings, one could use arbitrary strings as index entries.
*
* @c item will be the pointer returned back on $"changed", "delay,changed" and
* $"selected" smart events.
*
* @param[in] obj The object.
* @param[in] letter Letter under which the item should be indexed
* @param[in] func The function to call when the item is selected.
* @param[in] data The item data to set for the index's item
*
* @return A handle to the item added or @c NULL, on errors
*
* @ingroup Elm_Index
*/
EOAPI Elm_Widget_Item *elm_obj_index_item_append(Eo *obj, const char *letter, Evas_Smart_Cb func, const void *data);
/**
* @brief Returns the last selected item, for a given index widget.
*
* @param[in] obj The object.
* @param[in] level $0 or $1, the currently implemented levels.
*
* @return The last item selected on @c obj (or @c NULL, on errors).
*
* @ingroup Elm_Index
*/
EOAPI Elm_Widget_Item *elm_obj_index_selected_item_get(const Eo *obj, int level);
/**
* @brief Insert a new item into the given index widget, using @c cmp_func
* function to sort items (by item handles).
*
* Despite the most common usage of the @c letter argument is for single char
* strings, one could use arbitrary strings as index entries.
*
* @c item will be the pointer returned back on $"changed", "delay,changed" and
* $"selected" smart events.
*
* @param[in] obj The object.
* @param[in] letter Letter under which the item should be indexed
* @param[in] func The function to call when the item is clicked.
* @param[in] data The item data to set for the index's item
* @param[in] cmp_func The comparing function to be used to sort index items by
* index item handles
* @param[in] cmp_data_func A fallback function to be called for the sorting of
* index items by item data). It will be used when @c cmp_func returns $0
* (equality), which means an index item with provided item data already
* exists. To decide which data item should be pointed to by the index item in
* question, @c cmp_data_func will be used. If @c cmp_data_func returns a
* non-negative value, the previous index item data will be replaced by the
* given @c item pointer. If the previous data need to be freed, it should be
* done by the @c cmp_data_func function, because all references to it will be
* lost. If this function is not provided ($NULL is given), index items will be
* duplicated, if @c cmp_func returns $0.
*
* @return A handle to the item added or @c NULL, on errors
*
* @ingroup Elm_Index
*/
EOAPI Elm_Widget_Item *elm_obj_index_item_sorted_insert(Eo *obj, const char *letter, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func, Eina_Compare_Cb cmp_data_func);
EWAPI extern const Efl_Event_Description _ELM_INDEX_EVENT_CHANGED;
/** Called when index changed
* @return Efl_Object *
*
* @ingroup Elm_Index
*/
#define ELM_INDEX_EVENT_CHANGED (&(_ELM_INDEX_EVENT_CHANGED))
EWAPI extern const Efl_Event_Description _ELM_INDEX_EVENT_DELAY_CHANGED;
/** Called when delay changed
* @return Efl_Object *
*
* @ingroup Elm_Index
*/
#define ELM_INDEX_EVENT_DELAY_CHANGED (&(_ELM_INDEX_EVENT_DELAY_CHANGED))
EWAPI extern const Efl_Event_Description _ELM_INDEX_EVENT_LEVEL_UP;
/** Called when level increased
*
* @ingroup Elm_Index
*/
#define ELM_INDEX_EVENT_LEVEL_UP (&(_ELM_INDEX_EVENT_LEVEL_UP))
EWAPI extern const Efl_Event_Description _ELM_INDEX_EVENT_LEVEL_DOWN;
/** Called when level decreased
*
* @ingroup Elm_Index
*/
#define ELM_INDEX_EVENT_LEVEL_DOWN (&(_ELM_INDEX_EVENT_LEVEL_DOWN))
#endif

View File

@ -0,0 +1,126 @@
EAPI void
elm_index_autohide_disabled_set(Elm_Index *obj, Eina_Bool disabled)
{
elm_obj_index_autohide_disabled_set(obj, disabled);
}
EAPI Eina_Bool
elm_index_autohide_disabled_get(const Elm_Index *obj)
{
return elm_obj_index_autohide_disabled_get(obj);
}
EAPI void
elm_index_omit_enabled_set(Elm_Index *obj, Eina_Bool enabled)
{
elm_obj_index_omit_enabled_set(obj, enabled);
}
EAPI Eina_Bool
elm_index_omit_enabled_get(const Elm_Index *obj)
{
return elm_obj_index_omit_enabled_get(obj);
}
EAPI void
elm_index_standard_priority_set(Elm_Index *obj, int priority)
{
elm_obj_index_standard_priority_set(obj, priority);
}
EAPI int
elm_index_standard_priority_get(const Elm_Index *obj)
{
return elm_obj_index_standard_priority_get(obj);
}
EAPI void
elm_index_delay_change_time_set(Elm_Index *obj, double dtime)
{
elm_obj_index_delay_change_time_set(obj, dtime);
}
EAPI double
elm_index_delay_change_time_get(const Elm_Index *obj)
{
return elm_obj_index_delay_change_time_get(obj);
}
EAPI void
elm_index_indicator_disabled_set(Elm_Index *obj, Eina_Bool disabled)
{
elm_obj_index_indicator_disabled_set(obj, disabled);
}
EAPI Eina_Bool
elm_index_indicator_disabled_get(const Elm_Index *obj)
{
return elm_obj_index_indicator_disabled_get(obj);
}
EAPI void
elm_index_item_level_set(Elm_Index *obj, int level)
{
elm_obj_index_item_level_set(obj, level);
}
EAPI int
elm_index_item_level_get(const Elm_Index *obj)
{
return elm_obj_index_item_level_get(obj);
}
EAPI void
elm_index_level_go(Elm_Index *obj, int level)
{
elm_obj_index_level_go(obj, level);
}
EAPI Elm_Widget_Item *
elm_index_item_prepend(Elm_Index *obj, const char *letter, Evas_Smart_Cb func, const void *data)
{
return elm_obj_index_item_prepend(obj, letter, func, data);
}
EAPI void
elm_index_item_clear(Elm_Index *obj)
{
elm_obj_index_item_clear(obj);
}
EAPI Elm_Widget_Item *
elm_index_item_insert_after(Elm_Index *obj, Elm_Widget_Item *after, const char *letter, Evas_Smart_Cb func, const void *data)
{
return elm_obj_index_item_insert_after(obj, after, letter, func, data);
}
EAPI Elm_Widget_Item *
elm_index_item_find(Elm_Index *obj, const void *data)
{
return elm_obj_index_item_find(obj, data);
}
EAPI Elm_Widget_Item *
elm_index_item_insert_before(Elm_Index *obj, Elm_Widget_Item *before, const char *letter, Evas_Smart_Cb func, const void *data)
{
return elm_obj_index_item_insert_before(obj, before, letter, func, data);
}
EAPI Elm_Widget_Item *
elm_index_item_append(Elm_Index *obj, const char *letter, Evas_Smart_Cb func, const void *data)
{
return elm_obj_index_item_append(obj, letter, func, data);
}
EAPI Elm_Widget_Item *
elm_index_selected_item_get(const Elm_Index *obj, int level)
{
return elm_obj_index_selected_item_get(obj, level);
}
EAPI Elm_Widget_Item *
elm_index_item_sorted_insert(Elm_Index *obj, const char *letter, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func, Eina_Compare_Cb cmp_data_func)
{
return elm_obj_index_item_sorted_insert(obj, letter, func, data, cmp_func, cmp_data_func);
}

View File

@ -0,0 +1,341 @@
#ifndef _ELM_INDEX_EO_LEGACY_H_
#define _ELM_INDEX_EO_LEGACY_H_
#ifndef _ELM_INDEX_EO_CLASS_TYPE
#define _ELM_INDEX_EO_CLASS_TYPE
typedef Eo Elm_Index;
#endif
#ifndef _ELM_INDEX_EO_TYPES
#define _ELM_INDEX_EO_TYPES
#endif
/**
* @brief Enable or disable auto hiding feature for a given index widget.
*
* @param[in] obj The object.
* @param[in] disabled @c true to disable auto hiding, @c false to enable
*
* @ingroup Elm_Index_Group
*/
EAPI void elm_index_autohide_disabled_set(Elm_Index *obj, Eina_Bool disabled);
/**
* @brief Enable or disable auto hiding feature for a given index widget.
*
* @param[in] obj The object.
*
* @return @c true to disable auto hiding, @c false to enable
*
* @ingroup Elm_Index_Group
*/
EAPI Eina_Bool elm_index_autohide_disabled_get(const Elm_Index *obj);
/**
* @brief Enable or disable omit feature for a given index widget.
*
* @param[in] obj The object.
* @param[in] enabled @c true to enable omit feature, @c false to disable
*
* @since 1.8
*
* @ingroup Elm_Index_Group
*/
EAPI void elm_index_omit_enabled_set(Elm_Index *obj, Eina_Bool enabled);
/**
* @brief Enable or disable omit feature for a given index widget.
*
* @param[in] obj The object.
*
* @return @c true to enable omit feature, @c false to disable
*
* @since 1.8
*
* @ingroup Elm_Index_Group
*/
EAPI Eina_Bool elm_index_omit_enabled_get(const Elm_Index *obj);
/**
* @brief Control standard_priority group of index. Priority group will be
* shown as many items as it can, and other group will be shown one character
* only.
*
* @param[in] obj The object.
* @param[in] priority @c priority target priority value in index
*
* @since 1.16
*
* @ingroup Elm_Index_Group
*/
EAPI void elm_index_standard_priority_set(Elm_Index *obj, int priority);
/**
* @brief Control standard_priority group of index. Priority group will be
* shown as many items as it can, and other group will be shown one character
* only.
*
* @param[in] obj The object.
*
* @return @c priority target priority value in index
*
* @since 1.16
*
* @ingroup Elm_Index_Group
*/
EAPI int elm_index_standard_priority_get(const Elm_Index *obj);
/**
* @brief Set a delay change time for index object.
*
* @note delay time is 0.2 sec by default.
*
* @param[in] obj The object.
* @param[in] dtime The delay change time to set.
*
* @ingroup Elm_Index_Group
*/
EAPI void elm_index_delay_change_time_set(Elm_Index *obj, double dtime);
/**
* @brief Set a delay change time for index object.
*
* @note delay time is 0.2 sec by default.
*
* @param[in] obj The object.
*
* @return The delay change time to set.
*
* @ingroup Elm_Index_Group
*/
EAPI double elm_index_delay_change_time_get(const Elm_Index *obj);
/**
* @brief Control the indicator as to be disabled.
*
* In Index widget, Indicator notes popup text, which shows a letter has been
* selecting.
*
* @param[in] obj The object.
* @param[in] disabled @c true to disable it, @c false to enable it
*
* @ingroup Elm_Index_Group
*/
EAPI void elm_index_indicator_disabled_set(Elm_Index *obj, Eina_Bool disabled);
/**
* @brief Control the indicator as to be disabled.
*
* In Index widget, Indicator notes popup text, which shows a letter has been
* selecting.
*
* @param[in] obj The object.
*
* @return @c true to disable it, @c false to enable it
*
* @ingroup Elm_Index_Group
*/
EAPI Eina_Bool elm_index_indicator_disabled_get(const Elm_Index *obj);
/**
* @brief Set the items level for a given index widget.
*
* See: elm_index_item_level_get()
*
* @param[in] obj The object.
* @param[in] level $0 or $1, the currently implemented levels.
*
* @ingroup Elm_Index_Group
*/
EAPI void elm_index_item_level_set(Elm_Index *obj, int level);
/**
* @brief Set the items level for a given index widget.
*
* See: elm_index_item_level_get()
*
* @param[in] obj The object.
*
* @return $0 or $1, the currently implemented levels.
*
* @ingroup Elm_Index_Group
*/
EAPI int elm_index_item_level_get(const Elm_Index *obj);
/**
* @brief Flush the changes made to the index items so they work correctly
*
* This flushes any changes made to items indicating the object is ready to go.
* You should call this before any changes you expect to work. This is similar
* to elm_list_go().
*
* @warning If not called, it won't display the index properly.
*
* @param[in] obj The object.
* @param[in] level The index level (one of $0 or $1) where changes were made
*
* @ingroup Elm_Index_Group
*/
EAPI void elm_index_level_go(Elm_Index *obj, int level);
/**
* @brief Prepend a new item on a given index widget.
*
* Despite the most common usage of the @c letter argument is for single char
* strings, one could use arbitrary strings as index entries.
*
* @c item will be the pointer returned back on $"changed", "delay,changed" and
* $"selected" smart events.
*
* @param[in] obj The object.
* @param[in] letter Letter under which the item should be indexed
* @param[in] func The function to call when the item is selected.
* @param[in] data The item data to set for the index's item
*
* @return A handle to the item added or @c NULL, on errors
*
* @ingroup Elm_Index_Group
*/
EAPI Elm_Widget_Item *elm_index_item_prepend(Elm_Index *obj, const char *letter, Evas_Smart_Cb func, const void *data);
/**
* @brief Removes all items from a given index widget.
*
* If deletion callbacks are set, via elm_object_item_del_cb_set(), that
* callback function will be called for each item in @c obj.
* @param[in] obj The object.
*
* @ingroup Elm_Index_Group
*/
EAPI void elm_index_item_clear(Elm_Index *obj);
/**
* @brief Insert a new item into the index object after item @c after.
*
* Despite the most common usage of the @c letter argument is for single char
* strings, one could use arbitrary strings as index entries.
*
* @c item will be the pointer returned back on $"changed", "delay,changed" and
* $"selected" smart events.
*
* @note If @c after is @c NULL this function will behave as
* elm_index_item_append().
*
* @param[in] obj The object.
* @param[in] after The index item to insert after.
* @param[in] letter Letter under which the item should be indexed
* @param[in] func The function to call when the item is clicked.
* @param[in] data The item data to set for the index's item
*
* @return A handle to the item added or @c NULL, on errors
*
* @ingroup Elm_Index_Group
*/
EAPI Elm_Widget_Item *elm_index_item_insert_after(Elm_Index *obj, Elm_Widget_Item *after, const char *letter, Evas_Smart_Cb func, const void *data);
/**
* @brief Find a given index widget's item, using item data.
*
* @param[in] obj The object.
* @param[in] data The item data pointed to by the desired index item
*
* @return The index item handle, if found, or @c NULL otherwise
*
* @ingroup Elm_Index_Group
*/
EAPI Elm_Widget_Item *elm_index_item_find(Elm_Index *obj, const void *data);
/**
* @brief Insert a new item into the index object before item @c before.
*
* Despite the most common usage of the @c letter argument is for single char
* strings, one could use arbitrary strings as index entries.
*
* @c item will be the pointer returned back on $"changed", "delay,changed" and
* $"selected" smart events.
*
* @note If @c before is @c NULL this function will behave as
* elm_index_item_prepend().
*
* @param[in] obj The object.
* @param[in] before The index item to insert after.
* @param[in] letter Letter under which the item should be indexed
* @param[in] func The function to call when the item is clicked.
* @param[in] data The item data to set for the index's item
*
* @return A handle to the item added or @c NULL, on errors
*
* @ingroup Elm_Index_Group
*/
EAPI Elm_Widget_Item *elm_index_item_insert_before(Elm_Index *obj, Elm_Widget_Item *before, const char *letter, Evas_Smart_Cb func, const void *data);
/**
* @brief Append a new item on a given index widget.
*
* Despite the most common usage of the @c letter argument is for single char
* strings, one could use arbitrary strings as index entries.
*
* @c item will be the pointer returned back on $"changed", "delay,changed" and
* $"selected" smart events.
*
* @param[in] obj The object.
* @param[in] letter Letter under which the item should be indexed
* @param[in] func The function to call when the item is selected.
* @param[in] data The item data to set for the index's item
*
* @return A handle to the item added or @c NULL, on errors
*
* @ingroup Elm_Index_Group
*/
EAPI Elm_Widget_Item *elm_index_item_append(Elm_Index *obj, const char *letter, Evas_Smart_Cb func, const void *data);
/**
* @brief Returns the last selected item, for a given index widget.
*
* @param[in] obj The object.
* @param[in] level $0 or $1, the currently implemented levels.
*
* @return The last item selected on @c obj (or @c NULL, on errors).
*
* @ingroup Elm_Index_Group
*/
EAPI Elm_Widget_Item *elm_index_selected_item_get(const Elm_Index *obj, int level);
/**
* @brief Insert a new item into the given index widget, using @c cmp_func
* function to sort items (by item handles).
*
* Despite the most common usage of the @c letter argument is for single char
* strings, one could use arbitrary strings as index entries.
*
* @c item will be the pointer returned back on $"changed", "delay,changed" and
* $"selected" smart events.
*
* @param[in] obj The object.
* @param[in] letter Letter under which the item should be indexed
* @param[in] func The function to call when the item is clicked.
* @param[in] data The item data to set for the index's item
* @param[in] cmp_func The comparing function to be used to sort index items by
* index item handles
* @param[in] cmp_data_func A fallback function to be called for the sorting of
* index items by item data). It will be used when @c cmp_func returns $0
* (equality), which means an index item with provided item data already
* exists. To decide which data item should be pointed to by the index item in
* question, @c cmp_data_func will be used. If @c cmp_data_func returns a
* non-negative value, the previous index item data will be replaced by the
* given @c item pointer. If the previous data need to be freed, it should be
* done by the @c cmp_data_func function, because all references to it will be
* lost. If this function is not provided ($NULL is given), index items will be
* duplicated, if @c cmp_func returns $0.
*
* @return A handle to the item added or @c NULL, on errors
*
* @ingroup Elm_Index_Group
*/
EAPI Elm_Widget_Item *elm_index_item_sorted_insert(Elm_Index *obj, const char *letter, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func, Eina_Compare_Cb cmp_data_func);
#endif

View File

@ -1,50 +0,0 @@
class Elm.Index.Item extends Elm.Widget.Item implements Efl.Access.Widget.Action, Efl.Ui.Legacy
{
[[Elementary index item class]]
legacy_prefix: elm_index_item;
eo_prefix: elm_obj_index_item;
methods {
@property selected {
set {
[[Set the selected state of an item.
This sets the selected state of the given item $it.
$true for selected, $false for not selected.
If a new item is selected the previously selected will be unselected.
Previously selected item can be get with function
elm_index_selected_item_get().
Selected items will be highlighted.]]
}
values {
selected: bool; [[$true if selected, $false otherwise]]
}
}
@property priority {
set {
[[Sets the priority of an item.
The priority is -1 by default, which means that the item doesn't belong to a group.
The value of the priority starts from 0.
In elm_index_level_go, the items are sorted in ascending order according to priority.
Items of the same priority make a group and the primary group is shown by default.]]
}
values {
priority: int; [[The priority]]
}
}
letter_get @const {
[[Get the letter (string) set on a given index widget item.]]
return: string; [[The letter string set on $item]]
}
}
implements {
Efl.Object.constructor;
Efl.Object.destructor;
Elm.Widget.Item.access_register;
Efl.Access.Object.i18n_name { get; }
Efl.Access.Widget.Action.elm_actions { get; }
}
}

View File

@ -0,0 +1,109 @@
void _elm_index_item_selected_set(Eo *obj, Elm_Index_Item_Data *pd, Eina_Bool selected);
static Eina_Error
__eolian_elm_index_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_index_item_selected_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_index_item_selected_set, EFL_FUNC_CALL(selected), Eina_Bool selected);
void _elm_index_item_priority_set(Eo *obj, Elm_Index_Item_Data *pd, int priority);
static Eina_Error
__eolian_elm_index_item_priority_set_reflect(Eo *obj, Eina_Value val)
{
Eina_Error r = 0; int cval;
if (!eina_value_int_convert(&val, &cval))
{
r = EINA_ERROR_VALUE_FAILED;
goto end;
}
elm_obj_index_item_priority_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_index_item_priority_set, EFL_FUNC_CALL(priority), int priority);
const char *_elm_index_item_letter_get(const Eo *obj, Elm_Index_Item_Data *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_index_item_letter_get, const char *, NULL);
Efl_Object *_elm_index_item_efl_object_constructor(Eo *obj, Elm_Index_Item_Data *pd);
void _elm_index_item_efl_object_destructor(Eo *obj, Elm_Index_Item_Data *pd);
Efl_Canvas_Object *_elm_index_item_elm_widget_item_access_register(Eo *obj, Elm_Index_Item_Data *pd);
const char *_elm_index_item_efl_access_object_i18n_name_get(const Eo *obj, Elm_Index_Item_Data *pd);
const Efl_Access_Action_Data *_elm_index_item_efl_access_widget_action_elm_actions_get(const Eo *obj, Elm_Index_Item_Data *pd);
static Eina_Bool
_elm_index_item_class_initializer(Efl_Class *klass)
{
const Efl_Object_Ops *opsp = NULL;
const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
#ifndef ELM_INDEX_ITEM_EXTRA_OPS
#define ELM_INDEX_ITEM_EXTRA_OPS
#endif
EFL_OPS_DEFINE(ops,
EFL_OBJECT_OP_FUNC(elm_obj_index_item_selected_set, _elm_index_item_selected_set),
EFL_OBJECT_OP_FUNC(elm_obj_index_item_priority_set, _elm_index_item_priority_set),
EFL_OBJECT_OP_FUNC(elm_obj_index_item_letter_get, _elm_index_item_letter_get),
EFL_OBJECT_OP_FUNC(efl_constructor, _elm_index_item_efl_object_constructor),
EFL_OBJECT_OP_FUNC(efl_destructor, _elm_index_item_efl_object_destructor),
EFL_OBJECT_OP_FUNC(elm_wdg_item_access_register, _elm_index_item_elm_widget_item_access_register),
EFL_OBJECT_OP_FUNC(efl_access_object_i18n_name_get, _elm_index_item_efl_access_object_i18n_name_get),
EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_index_item_efl_access_widget_action_elm_actions_get),
ELM_INDEX_ITEM_EXTRA_OPS
);
opsp = &ops;
static const Efl_Object_Property_Reflection refl_table[] = {
{"selected", __eolian_elm_index_item_selected_set_reflect, NULL},
{"priority", __eolian_elm_index_item_priority_set_reflect, NULL},
};
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_index_item_class_desc = {
EO_VERSION,
"Elm.Index.Item",
EFL_CLASS_TYPE_REGULAR,
sizeof(Elm_Index_Item_Data),
_elm_index_item_class_initializer,
NULL,
NULL
};
EFL_DEFINE_CLASS(elm_index_item_class_get, &_elm_index_item_class_desc, ELM_WIDGET_ITEM_CLASS, EFL_ACCESS_WIDGET_ACTION_MIXIN, EFL_UI_LEGACY_INTERFACE, NULL);
#include "elm_index_item_eo.legacy.c"

View File

@ -0,0 +1,71 @@
#ifndef _ELM_INDEX_ITEM_EO_H_
#define _ELM_INDEX_ITEM_EO_H_
#ifndef _ELM_INDEX_ITEM_EO_CLASS_TYPE
#define _ELM_INDEX_ITEM_EO_CLASS_TYPE
typedef Eo Elm_Index_Item;
#endif
#ifndef _ELM_INDEX_ITEM_EO_TYPES
#define _ELM_INDEX_ITEM_EO_TYPES
#endif
/** Elementary index item class
*
* @ingroup Elm_Index_Item
*/
#define ELM_INDEX_ITEM_CLASS elm_index_item_class_get()
EWAPI const Efl_Class *elm_index_item_class_get(void);
/**
* @brief Set the selected state of an item.
*
* This sets the selected state of the given item @c it. @c true for selected,
* @c false for not selected.
*
* If a new item is selected the previously selected will be unselected.
* Previously selected item can be get with function
* elm_index_selected_item_get().
*
* Selected items will be highlighted.
*
* @param[in] obj The object.
* @param[in] selected @c true if selected, @c false otherwise
*
* @ingroup Elm_Index_Item
*/
EOAPI void elm_obj_index_item_selected_set(Eo *obj, Eina_Bool selected);
/**
* @brief Sets the priority of an item.
*
* The priority is -1 by default, which means that the item doesn't belong to a
* group. The value of the priority starts from 0.
*
* In elm_index_level_go, the items are sorted in ascending order according to
* priority. Items of the same priority make a group and the primary group is
* shown by default.
*
* @param[in] obj The object.
* @param[in] priority The priority
*
* @ingroup Elm_Index_Item
*/
EOAPI void elm_obj_index_item_priority_set(Eo *obj, int priority);
/**
* @brief Get the letter (string) set on a given index widget item.
*
* @param[in] obj The object.
*
* @return The letter string set on @c item
*
* @ingroup Elm_Index_Item
*/
EOAPI const char *elm_obj_index_item_letter_get(const Eo *obj);
#endif

View File

@ -0,0 +1,18 @@
EAPI void
elm_index_item_selected_set(Elm_Index_Item *obj, Eina_Bool selected)
{
elm_obj_index_item_selected_set(obj, selected);
}
EAPI void
elm_index_item_priority_set(Elm_Index_Item *obj, int priority)
{
elm_obj_index_item_priority_set(obj, priority);
}
EAPI const char *
elm_index_item_letter_get(const Elm_Index_Item *obj)
{
return elm_obj_index_item_letter_get(obj);
}

View File

@ -0,0 +1,64 @@
#ifndef _ELM_INDEX_ITEM_EO_LEGACY_H_
#define _ELM_INDEX_ITEM_EO_LEGACY_H_
#ifndef _ELM_INDEX_ITEM_EO_CLASS_TYPE
#define _ELM_INDEX_ITEM_EO_CLASS_TYPE
typedef Eo Elm_Index_Item;
#endif
#ifndef _ELM_INDEX_ITEM_EO_TYPES
#define _ELM_INDEX_ITEM_EO_TYPES
#endif
/**
* @brief Set the selected state of an item.
*
* This sets the selected state of the given item @c it. @c true for selected,
* @c false for not selected.
*
* If a new item is selected the previously selected will be unselected.
* Previously selected item can be get with function
* elm_index_selected_item_get().
*
* Selected items will be highlighted.
*
* @param[in] obj The object.
* @param[in] selected @c true if selected, @c false otherwise
*
* @ingroup Elm_Index_Item_Group
*/
EAPI void elm_index_item_selected_set(Elm_Index_Item *obj, Eina_Bool selected);
/**
* @brief Sets the priority of an item.
*
* The priority is -1 by default, which means that the item doesn't belong to a
* group. The value of the priority starts from 0.
*
* In elm_index_level_go, the items are sorted in ascending order according to
* priority. Items of the same priority make a group and the primary group is
* shown by default.
*
* @param[in] obj The object.
* @param[in] priority The priority
*
* @ingroup Elm_Index_Item_Group
*/
EAPI void elm_index_item_priority_set(Elm_Index_Item *obj, int priority);
/**
* @brief Get the letter (string) set on a given index widget item.
*
* @param[in] obj The object.
*
* @return The letter string set on @c item
*
* @ingroup Elm_Index_Item_Group
*/
EAPI const char *elm_index_item_letter_get(const Elm_Index_Item *obj);
#endif

View File

@ -43,5 +43,5 @@ EAPI void elm_index_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
*/
EAPI Eina_Bool elm_index_horizontal_get(const Evas_Object *obj);
#include "elm_index_item.eo.legacy.h"
#include "elm_index.eo.legacy.h"
#include "elm_index_item_eo.legacy.h"
#include "elm_index_eo.legacy.h"

View File

@ -3,8 +3,8 @@
#include "Elementary.h"
#include "elm_index_item.eo.h"
#include "elm_index.eo.h"
#include "elm_index_item_eo.h"
#include "elm_index_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,7 +1,6 @@
pub_legacy_eo_files = [
'efl_ui_clock_legacy.eo',
'elm_interface_fileselector.eo',
'elm_index.eo',
'elm_label.eo',
'elm_list.eo',
'elm_map.eo',
@ -19,7 +18,6 @@ pub_legacy_eo_files = [
'elm_sys_notify_dbus.eo',
'elm_systray.eo',
'elm_menu_item.eo',
'elm_index_item.eo',
'elm_widget_item_static_focus.eo',
'elm_list_item.eo',
'elm_popup_item.eo',
@ -761,6 +759,10 @@ elementary_pub_headers = [
'elm_hoversel_item_eo.legacy.h',
'elm_icon_eo.h',
'elm_icon_eo.legacy.h',
'elm_index_eo.h',
'elm_index_eo.legacy.h',
'elm_index_item_eo.h',
'elm_index_item_eo.legacy.h',
]
elementary_header_src = [