elm_gengrid*: 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/D8169
This commit is contained in:
Mike Blumenkrantz 2019-03-05 17:00:37 -05:00 committed by Cedric BAIL
parent bb3e703523
commit bb85bb6b1d
23 changed files with 3260 additions and 826 deletions

View File

@ -176,7 +176,7 @@ 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 \
lib/elementary/elm_gengrid.eo.cs \
lib/elementary/elm_gengrid_eo.cs \
lib/elementary/elm_glview.eo.cs
efl_mono_blacklisted_files = \

View File

@ -187,8 +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_gengrid.eo \
lib/elementary/elm_gengrid_pan.eo \
lib/elementary/elm_genlist.eo \
lib/elementary/elm_genlist_pan.eo \
lib/elementary/elm_gesture_layer.eo \
@ -215,7 +213,6 @@ elm_legacy_eolian_files = \
lib/elementary/elm_index_item.eo \
lib/elementary/elm_widget_item_static_focus.eo \
lib/elementary/elm_genlist_item.eo \
lib/elementary/elm_gengrid_item.eo \
lib/elementary/elm_list_item.eo \
lib/elementary/elm_popup_item.eo \
lib/elementary/elm_ctxpopup_part.eo \
@ -349,6 +346,11 @@ lib/elementary/elm_flipselector_eo.legacy.c \
lib/elementary/elm_flipselector_eo.c \
lib/elementary/elm_flipselector_item_eo.legacy.c \
lib/elementary/elm_flipselector_item_eo.c \
lib/elementary/elm_gengrid_eo.legacy.c \
lib/elementary/elm_gengrid_eo.c \
lib/elementary/elm_gengrid_item_eo.legacy.c \
lib/elementary/elm_gengrid_item_eo.c \
lib/elementary/elm_gengrid_pan_eo.c \
lib/elementary/elm_hoversel_eo.c \
lib/elementary/elm_hoversel_item_eo.c \
lib/elementary/elm_hoversel_item_eo.legacy.c
@ -444,6 +446,12 @@ lib/elementary/elm_flipselector_eo.h \
lib/elementary/elm_flipselector_eo.legacy.h \
lib/elementary/elm_flipselector_item_eo.h \
lib/elementary/elm_flipselector_item_eo.legacy.h \
lib/elementary/elm_gengrid_eo.h \
lib/elementary/elm_gengrid_eo.legacy.h \
lib/elementary/elm_gengrid_item_eo.h \
lib/elementary/elm_gengrid_item_eo.legacy.h \
lib/elementary/elm_gengrid_pan_eo.h \
lib/elementary/elm_gengrid_pan_eo.legacy.h \
lib/elementary/elm_hoversel_eo.h \
lib/elementary/elm_hoversel_eo.legacy.h \
lib/elementary/elm_hoversel_item_eo.h \

View File

@ -24,7 +24,7 @@
#include "elm_entry_eo.h"
#include "elm_fileselector_eo.h"
#include "elm_genlist.eo.h"
#include "elm_gengrid.eo.h"
#include "elm_gengrid_eo.h"
#include "elm_fileselector_part.eo.h"
#include "elm_part_helper.h"

View File

@ -7,7 +7,7 @@
//we need those for legacy compatible code
#include "elm_genlist.eo.h"
#include "elm_gengrid.eo.h"
#include "elm_gengrid_eo.h"
#define API_ENTRY()\
EINA_SAFETY_ON_NULL_RETURN(obj); \

View File

@ -15,9 +15,9 @@
#include "elm_interface_scrollable.h"
#include "efl_ui_focus_parent_provider_gen.eo.h"
#include "efl_ui_focus_composition_adapter.eo.h"
#include "elm_gengrid_item.eo.h"
#include "elm_gengrid_pan.eo.h"
#include "elm_gengrid.eo.h"
#include "elm_gengrid_item_eo.h"
#include "elm_gengrid_pan_eo.h"
#include "elm_gengrid_eo.h"
#define MY_PAN_CLASS ELM_GENGRID_PAN_CLASS
@ -2307,7 +2307,7 @@ _elm_gengrid_pan_class_constructor(Efl_Class *klass)
evas_smart_legacy_type_register(MY_PAN_CLASS_NAME_LEGACY, klass);
}
#include "elm_gengrid_pan.eo.c"
#include "elm_gengrid_pan_eo.c"
static void
_elm_gengrid_item_focused(Elm_Object_Item *eo_it)
@ -5865,5 +5865,5 @@ ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(elm_gengrid, Elm_Gengrid_Data)
ELM_LAYOUT_SIZING_EVAL_OPS(elm_gengrid), \
EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_gengrid)
#include "elm_gengrid.eo.c"
#include "elm_gengrid_item.eo.c"
#include "elm_gengrid_eo.c"
#include "elm_gengrid_item_eo.c"

View File

@ -1,553 +0,0 @@
import elm_general;
type @extern Ecore_Pos_Map: __undefined_type; [[External ecore position map]]
enum Elm.Gengrid.Reorder_Type
{
[[Gengrid reorder modes]]
normal, [[Normal reorder type]]
swap [[Swap reorder type]]
}
class Elm.Gengrid extends Efl.Ui.Layout_Base implements Efl.Ui.Focus.Composition, Elm.Interface_Scrollable,
Efl.Ui.Clickable, Efl.Access.Widget.Action,
Efl.Access.Selection, Efl.Ui.Legacy, Elm.Widget_Item_Container
{
[[Elementary gengrid class]]
legacy_prefix: elm_gengrid;
eo_prefix: elm_obj_gengrid;
event_prefix: elm_gengrid;
methods {
@property align {
set {
[[Set the items grid's alignment within a given gengrid widget.
This sets the alignment of the whole grid of items of a gengrid
within its given viewport. By default, those values are both
0.5, meaning that the gengrid will have its items grid placed
exactly in the middle of its viewport.
Note: If given alignment values are out of the cited ranges,
they'll be changed to the nearest boundary values on the valid
ranges.
]]
}
get {
[[Get the items grid's alignment values within a given gengrid
widget.
Note: Use $null pointers on the alignment values you're not
interested in: they'll be ignored by the function.
]]
}
values {
align_x: double; [[Alignment in the horizontal axis (0 <= align_x <= 1).]]
align_y: double; [[Alignment in the vertical axis (0 <= align_y <= 1).]]
}
}
@property filled {
set {
[[Set how the items grid's filled within a given gengrid widget
This sets the fill state of the whole grid of items of a
gengrid within its given viewport. By default, this value
is false, meaning that if the first line of items grid's
isn't filled, the items are centered with the alignment.
]]
}
get {
[[Get how the items grid's filled within a given gengrid widget
Note: Use $null pointers on the alignment values you're not
interested in: they'll be ignored by the function.
]]
}
values {
fill: bool; [[$true if the grid is filled, $false otherwise]]
}
}
@property multi_select {
set {
[[Enable or disable multi-selection in a given gengrid widget.
Multi-selection is the ability to have more than one item
selected, on a given gengrid, simultaneously. When it is
enabled, a sequence of clicks on different items will make
them all selected, progressively. A click on an already
selected item will unselect it. If interacting via the
keyboard, multi-selection is enabled while holding the
"Shift" key.
Note: By default, multi-selection is disabled on gengrids.
]]
}
get {
[[Get whether multi-selection is enabled or disabled for a given
gengrid widget.
]]
}
values {
multi: bool; [[$true if multislect is enabled, $false otherwise]]
}
}
@property group_item_size {
set {
[[Set the size for the group items of a given gengrid widget.
A gengrid, after creation, has still no information on the size
to give to each of its cells. So, you most probably will end up
with squares one \@ref Fingers "finger" wide, the default
size. Use this function to force a custom size for you group
items, making them as big as you wish.
]]
}
get {
[[Get the size set for the group items of a given gengrid widget.
Note: Use $null pointers on the size values you're not
interested in: they'll be ignored by the function.
]]
}
values {
w: int; [[The group items' width.]]
h: int; [[The group items' height.]]
}
}
@property select_mode {
set {
[[Set the gengrid select mode.
This changes item select mode in the gengrid widget.
#ELM_OBJECT_SELECT_MODE_DEFAULT means that 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 means that
even if selected, every click will make the selected callbacks
be called. #ELM_OBJECT_SELECT_MODE_NONE will turn off the
ability to select items entirely and they will neither appear
selected nor call selected callback functions.
]]
}
get {
[[Get the gengrid select mode.]]
}
values {
mode: Elm.Object.Select_Mode(Elm.Object.Select_Mode.max); [[The select mode.]]
}
}
@property reorder_mode {
set {
[[Set whether a given gengrid widget is or not able have items
reordered.
If a gengrid is set to allow reordering, a click held for more
than 0.5 over a given item will highlight it specially,
signaling the gengrid has entered the reordering state. From
that time on, the user will be able to, while still holding the
mouse button down, move the item freely in the gengrid's
viewport, replacing to said item to the locations it goes to.
The replacements will be animated and, whenever the user
releases the mouse button, the item being replaced gets a new
definitive place in the grid.
]]
}
get {
[[Get whether a given gengrid widget is or not able have items
reordered.
]]
}
values {
reorder_mode: bool; [[Use $true to turn reordering on,
$false to turn it off.]]
}
}
@property highlight_mode {
[[Control whether the gengrid items' should be highlighted when
item selected.
]]
set {}
get {}
values {
highlight: bool; [[$true if item will be highlighted, $false otherwise]]
}
}
@property reorder_type {
set {
[[ Set the Gengrid reorder type
@since 1.11
]]
}
values {
type: Elm.Gengrid.Reorder_Type; [[ Reorder type value ]]
}
}
@property item_size {
set {
[[Set the size for the items of a given gengrid widget.
A gengrid, after creation, has still no information on the size
to give to each of its cells. So, you most probably will end up
with squares one \@ref Fingers "finger" wide, the default
size. Use this function to force a custom size for you items,
making them as big as you wish.
]]
}
get {
[[Get the size set for the items of a given gengrid widget.
Note: Use $null pointers on the size values you're not
interested in: they'll be ignored by the function.
]]
}
values {
w: int; [[The items' width.]]
h: int; [[The items' height.]]
}
}
@property multi_select_mode {
set {
[[Set the gengrid multi select mode.
#ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT means that
select/unselect items whenever each item is clicked.
#ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL means that
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.
@since 1.8
]]
}
get {
[[Get the gengrid multi select mode.
If getting mode fails, it returns
#ELM_OBJECT_MULTI_SELECT_MODE_MAX.
@since 1.8
]]
}
values {
mode: Elm.Object.Multi_Select_Mode(Elm.Object.Multi_Select_Mode.max); [[The multi select mode.]]
}
}
@property horizontal {
set {
[[Set the direction in which a given gengrid widget will
expand while placing its items.
When in "horizontal mode" ($true), items will be placed in
columns, from top to bottom and, when the space for a column
is filled, another one is started on the right, thus expanding
the grid horizontally. When in "vertical mode" ($false),
though, items will be placed in rows, from left to right
and, when the space for a row is filled, another one is
started below, thus expanding the grid vertically.
Note: By default, gengrid is in vertical mode, $false.
]]
}
get {
[[Get for what direction a given gengrid widget will expand while
placing its items.
]]
}
values {
horizontal: bool; [[$true to make the gengrid expand horizontally,
$false to expand vertically.]]
}
}
@property selected_item {
get {
[[Get the selected item in a given gengrid widget.
This returns the selected item in $obj. If multi selection is
enabled on $obj (See @.multi_select.set), only the first item
in the list is selected, which might not be very useful. For
that case, see @.selected_items.get.
]]
return: Elm.Widget.Item; [[The selected item's handle or $null
if none is selected at the moment
(and on errors).]]
}
}
@property realized_items {
get {
[[Get a list of realized items in gengrid.
This returns a list of the realized items in the gengrid. The
list contains gengrid item pointers. The list must be freed by
the caller when done with eina_list_free(). The item pointers
in the list are only valid so long as those items are not
deleted or the gengrid is not deleted.
]]
return: list<ptr(Elm_Gen_Item)> @owned @warn_unused; [[
The list of realized items or $null if none are realized.
]]
}
}
@property first_item {
get {
[[Get the first item in a given gengrid widget.
This returns the first item in the $obj's internal list of
items.
]]
return: Elm.Widget.Item; [[
The first item's handle or $null, if there are no
items in $obj (and on errors)
]]
}
}
@property selected_items {
get {
[[Get a list of selected items in a given gengrid.
This returns a list of the selected items, in the order that
they appear in the grid. This list is only valid as long as no
more items are selected or unselected (or unselected implicitly
by deletion). The list contains Gengrid item pointers as
data, naturally.
]]
return: const(list<Elm.Widget.Item>); [[
The list of selected items or $null, if none is
selected at the moment (and on errors).
]]
}
}
@property last_item {
get {
[[Get the last item in a given gengrid widget.
This returns the last item in the $obj's internal list of
items.
]]
return: Elm.Widget.Item; [[The last item's handle or $null
if there are no items in $obj
(and on errors).]]
}
}
item_insert_before {
[[Insert an item before another in a gengrid widget.
This inserts an item before another in the gengrid.
]]
return: Elm.Widget.Item; [[A handle to the item added or $null on errors.]]
params {
@cref itc: Elm.Gengrid.Item.Class; [[The item class for the item.]]
@in data: const(void_ptr); [[The item data.]]
@in relative: Elm.Widget.Item; [[The item to place this new one before.]]
@in func: Evas_Smart_Cb @optional; [[Convenience function called
when the item is selected.]]
@in func_data: const(void_ptr) @optional; [[Data to be passed to $func.]]
}
}
realized_items_update {
[[Update the contents of all realized items.
This updates all realized items by calling all the item class
functions again to get the contents, texts and states. Use this
when the original item data has changed and the changes are
desired to be reflected.
To update just one item, use \@ref elm_gengrid_item_update.
]]
}
item_insert_after {
[[Insert an item after another in a gengrid widget.
This inserts an item after another in the gengrid.
]]
return: Elm.Widget.Item; [[A handle to the item added or $null on error.]]
params {
@cref itc: Elm.Gengrid.Item.Class; [[The item class for the item.]]
@in data: const(void_ptr); [[The item data.]]
@in relative: Elm.Widget.Item; [[The item to place this new one after.]]
@in func: Evas_Smart_Cb @optional; [[Convenience function called
when the item is selected.]]
@in func_data: const(void_ptr) @optional; [[Data to be passed to $func.]]
}
}
items_count @const {
[[Return how many items are currently in a list
This behavior is O(1) and includes items which may or may not
be realized.
]]
return: uint; [[Items in list]]
}
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 $xposret is not $null, the
integer pointed to is set to a value of -1, 0 or 1, depending if
the coordinate is on the left portion of that item (-1), on the
middle section (0) or on the right part (1).
If $yposret 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 gengrid.
]]
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 xposret: int; [[The position relative to the item returned here.]]
@out yposret: int; [[The position relative to the item returned here.]]
}
}
item_append {
[[Append a new item in a given gengrid widget.
This adds an item to the beginning of the gengrid.
]]
return: Elm.Widget.Item; [[A handle to the item added or $null on errors.]]
params {
@cref itc: Elm.Gengrid.Item.Class; [[The item class for the item.]]
@in data: const(void_ptr); [[The item data.]]
@in func: Evas_Smart_Cb @optional; [[Convenience function called
when the item is selected.]]
@in func_data: const(void_ptr) @optional; [[Data to be passed to $func.]]
}
}
item_prepend {
[[Prepend a new item in a given gengrid widget.
This adds an item to the end of the gengrid.
]]
return: Elm.Widget.Item; [[A handle to the item added or $null on errors.]]
params {
@cref itc: Elm.Gengrid.Item.Class; [[The item class for the item.]]
@in data: const(void_ptr); [[The item data.]]
@in func: Evas_Smart_Cb @optional; [[Convenience function called
when the item is selected.]]
@in func_data: const(void_ptr) @optional; [[Data to be passed to $func.]]
}
}
clear {
[[Remove all items from a given gengrid widget.
This removes (and deletes) all items in $obj, leaving it empty.
See \@ref elm_gengrid_item_del to remove just one item.
]]
}
item_sorted_insert {
[[Insert an item in a gengrid widget using a user-defined sort
function.
This inserts an item in the gengrid based on user defined
comparison function. The two arguments passed to the function
$func are gengrid item handles to compare.
]]
return: Elm.Widget.Item; [[A handle to the item added or $null on errors.]]
params {
@cref itc: Elm.Gengrid.Item.Class; [[The item class for the item.]]
@in data: const(void_ptr); [[The item data.]]
@in comp: Eina_Compare_Cb; [[User defined comparison function
that defines the sort order based
on gengrid item and its data.
]]
@in func: Evas_Smart_Cb @optional; [[Convenience function called when the item is selected.]]
@in func_data: const(void_ptr) @optional; [[Data to be passed to $func.]]
}
}
search_by_text_item_get {
[[Get gengrid item by given string.
It takes pointer to the gengrid item that will be used to start
search from it.
This function uses globs (like "*.jpg") for searching and takes
search flags as last parameter That is a bitfield with values
to be ored together or 0 for no flags.
@since 1.11
]]
return: Elm.Widget.Item; [[Pointer to the gengrid item which matches
search_string in case of success,
otherwise $null.]]
params {
@in item_to_search_from: Elm.Widget.Item @optional; [[
Pointer to item to start search from. If $null, search will
be started from the first item of the gengrid.
]]
@in part_name: string; [[Name of the TEXT part of gengrid item to search string in. If $null, search by "elm.text" parts.]]
@in pattern: string; [[The search pattern.]]
@in flags: Elm.Glob.Match_Flags; [[Search flags.]]
}
}
reorder_mode_start {
[[
Starts the reorder mode of Gengrid
@since 1.10
]]
params {
@in tween_mode: Ecore_Pos_Map; [[ Position mappings for animation ]]
}
}
reorder_mode_stop {
[[
Stops the reorder mode of Gengrid
@since 1.10
]]
}
}
implements {
class.constructor;
Efl.Object.constructor;
Efl.Object.provider_find;
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.interest_region { get; }
Efl.Ui.Widget.widget_input_event_handler;
Efl.Ui.Widget.focus_highlight_geometry { get; }
Elm.Widget_Item_Container.focused_item { get; }
Elm.Interface_Scrollable.item_loop_enabled { get; set; }
Elm.Interface_Scrollable.bounce_allow { set; }
Elm.Interface_Scrollable.policy { get; set; }
Efl.Access.Object.access_children { get; }
Efl.Access.Object.state_set { get; }
Efl.Access.Widget.Action.elm_actions { 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;
Efl.Ui.Focus.Composition.prepare;
Efl.Ui.Widget.focus_state_apply;
Efl.Ui.Focus.Manager.setup_on_first_touch;
Efl.Ui.Focus.Manager.manager_focus { get; }
Efl.Ui.Focus.Manager.move;
}
events {
realized: Efl.Object; [[Called when gengrid realized]]
unrealized: Efl.Object; [[Called when gengrid unrealized]]
index,update: Efl.Object; [[Called on gengrid index update]]
scroll,page,changed: void; [[Called when scroll page changed]]
edge,bottom: void; [[Called when bottom edge is reached]]
edge,top: void; [[Called when top edge is reached]]
edge,right: void; [[Called when right edge is reached]]
edge,left: void; [[Called when left edge is reached]]
item,focused: Efl.Object; [[Called when item got focus]]
item,unfocused: Efl.Object; [[Called when item no longer has focus]]
item,reorder,anim,start: Efl.Object; [[Called when item reorder animation started]]
item,reorder,anim,stop: Efl.Object; [[Called when item reorder animation stopped]]
activated: Efl.Object; [[Called when gengrid got activated]]
highlighted: Efl.Object; [[Called when gengrid is highlighted]]
unhighlighted: Efl.Object; [[Called when gengrid is no longer highlighted]]
released: Efl.Object; [[Called when gengrid is released]]
moved: Efl.Object; [[Called when gengrid item moved]]
}
}

View File

@ -0,0 +1,517 @@
EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_REALIZED =
EFL_EVENT_DESCRIPTION("realized");
EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_UNREALIZED =
EFL_EVENT_DESCRIPTION("unrealized");
EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_INDEX_UPDATE =
EFL_EVENT_DESCRIPTION("index,update");
EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_SCROLL_PAGE_CHANGED =
EFL_EVENT_DESCRIPTION("scroll,page,changed");
EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_EDGE_BOTTOM =
EFL_EVENT_DESCRIPTION("edge,bottom");
EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_EDGE_TOP =
EFL_EVENT_DESCRIPTION("edge,top");
EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_EDGE_RIGHT =
EFL_EVENT_DESCRIPTION("edge,right");
EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_EDGE_LEFT =
EFL_EVENT_DESCRIPTION("edge,left");
EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_ITEM_FOCUSED =
EFL_EVENT_DESCRIPTION("item,focused");
EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_ITEM_UNFOCUSED =
EFL_EVENT_DESCRIPTION("item,unfocused");
EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_START =
EFL_EVENT_DESCRIPTION("item,reorder,anim,start");
EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_STOP =
EFL_EVENT_DESCRIPTION("item,reorder,anim,stop");
EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_ACTIVATED =
EFL_EVENT_DESCRIPTION("activated");
EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_HIGHLIGHTED =
EFL_EVENT_DESCRIPTION("highlighted");
EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_UNHIGHLIGHTED =
EFL_EVENT_DESCRIPTION("unhighlighted");
EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_RELEASED =
EFL_EVENT_DESCRIPTION("released");
EWAPI const Efl_Event_Description _ELM_GENGRID_EVENT_MOVED =
EFL_EVENT_DESCRIPTION("moved");
void _elm_gengrid_align_set(Eo *obj, Elm_Gengrid_Data *pd, double align_x, double align_y);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_align_set, EFL_FUNC_CALL(align_x, align_y), double align_x, double align_y);
void _elm_gengrid_align_get(const Eo *obj, Elm_Gengrid_Data *pd, double *align_x, double *align_y);
EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_gengrid_align_get, EFL_FUNC_CALL(align_x, align_y), double *align_x, double *align_y);
void _elm_gengrid_filled_set(Eo *obj, Elm_Gengrid_Data *pd, Eina_Bool fill);
static Eina_Error
__eolian_elm_gengrid_filled_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_gengrid_filled_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_filled_set, EFL_FUNC_CALL(fill), Eina_Bool fill);
Eina_Bool _elm_gengrid_filled_get(const Eo *obj, Elm_Gengrid_Data *pd);
static Eina_Value
__eolian_elm_gengrid_filled_get_reflect(Eo *obj)
{
Eina_Bool val = elm_obj_gengrid_filled_get(obj);
return eina_value_bool_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_filled_get, Eina_Bool, 0);
void _elm_gengrid_multi_select_set(Eo *obj, Elm_Gengrid_Data *pd, Eina_Bool multi);
static Eina_Error
__eolian_elm_gengrid_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_gengrid_multi_select_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_multi_select_set, EFL_FUNC_CALL(multi), Eina_Bool multi);
Eina_Bool _elm_gengrid_multi_select_get(const Eo *obj, Elm_Gengrid_Data *pd);
static Eina_Value
__eolian_elm_gengrid_multi_select_get_reflect(Eo *obj)
{
Eina_Bool val = elm_obj_gengrid_multi_select_get(obj);
return eina_value_bool_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_multi_select_get, Eina_Bool, 0);
void _elm_gengrid_group_item_size_set(Eo *obj, Elm_Gengrid_Data *pd, int w, int h);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_group_item_size_set, EFL_FUNC_CALL(w, h), int w, int h);
void _elm_gengrid_group_item_size_get(const Eo *obj, Elm_Gengrid_Data *pd, int *w, int *h);
EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_gengrid_group_item_size_get, EFL_FUNC_CALL(w, h), int *w, int *h);
void _elm_gengrid_select_mode_set(Eo *obj, Elm_Gengrid_Data *pd, Elm_Object_Select_Mode mode);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_select_mode_set, EFL_FUNC_CALL(mode), Elm_Object_Select_Mode mode);
Elm_Object_Select_Mode _elm_gengrid_select_mode_get(const Eo *obj, Elm_Gengrid_Data *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_select_mode_get, Elm_Object_Select_Mode, 4 /* Elm.Object.Select_Mode.max */);
void _elm_gengrid_reorder_mode_set(Eo *obj, Elm_Gengrid_Data *pd, Eina_Bool reorder_mode);
static Eina_Error
__eolian_elm_gengrid_reorder_mode_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_gengrid_reorder_mode_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_reorder_mode_set, EFL_FUNC_CALL(reorder_mode), Eina_Bool reorder_mode);
Eina_Bool _elm_gengrid_reorder_mode_get(const Eo *obj, Elm_Gengrid_Data *pd);
static Eina_Value
__eolian_elm_gengrid_reorder_mode_get_reflect(Eo *obj)
{
Eina_Bool val = elm_obj_gengrid_reorder_mode_get(obj);
return eina_value_bool_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_reorder_mode_get, Eina_Bool, 0);
void _elm_gengrid_highlight_mode_set(Eo *obj, Elm_Gengrid_Data *pd, Eina_Bool highlight);
static Eina_Error
__eolian_elm_gengrid_highlight_mode_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_gengrid_highlight_mode_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_highlight_mode_set, EFL_FUNC_CALL(highlight), Eina_Bool highlight);
Eina_Bool _elm_gengrid_highlight_mode_get(const Eo *obj, Elm_Gengrid_Data *pd);
static Eina_Value
__eolian_elm_gengrid_highlight_mode_get_reflect(Eo *obj)
{
Eina_Bool val = elm_obj_gengrid_highlight_mode_get(obj);
return eina_value_bool_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_highlight_mode_get, Eina_Bool, 0);
void _elm_gengrid_reorder_type_set(Eo *obj, Elm_Gengrid_Data *pd, Elm_Gengrid_Reorder_Type type);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_reorder_type_set, EFL_FUNC_CALL(type), Elm_Gengrid_Reorder_Type type);
void _elm_gengrid_item_size_set(Eo *obj, Elm_Gengrid_Data *pd, int w, int h);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_item_size_set, EFL_FUNC_CALL(w, h), int w, int h);
void _elm_gengrid_item_size_get(const Eo *obj, Elm_Gengrid_Data *pd, int *w, int *h);
EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_gengrid_item_size_get, EFL_FUNC_CALL(w, h), int *w, int *h);
void _elm_gengrid_multi_select_mode_set(Eo *obj, Elm_Gengrid_Data *pd, Elm_Object_Multi_Select_Mode mode);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_multi_select_mode_set, EFL_FUNC_CALL(mode), Elm_Object_Multi_Select_Mode mode);
Elm_Object_Multi_Select_Mode _elm_gengrid_multi_select_mode_get(const Eo *obj, Elm_Gengrid_Data *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_multi_select_mode_get, Elm_Object_Multi_Select_Mode, 2 /* Elm.Object.Multi_Select_Mode.max */);
void _elm_gengrid_horizontal_set(Eo *obj, Elm_Gengrid_Data *pd, Eina_Bool horizontal);
static Eina_Error
__eolian_elm_gengrid_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_gengrid_horizontal_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_horizontal_set, EFL_FUNC_CALL(horizontal), Eina_Bool horizontal);
Eina_Bool _elm_gengrid_horizontal_get(const Eo *obj, Elm_Gengrid_Data *pd);
static Eina_Value
__eolian_elm_gengrid_horizontal_get_reflect(Eo *obj)
{
Eina_Bool val = elm_obj_gengrid_horizontal_get(obj);
return eina_value_bool_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_horizontal_get, Eina_Bool, 0);
Elm_Widget_Item *_elm_gengrid_selected_item_get(const Eo *obj, Elm_Gengrid_Data *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_selected_item_get, Elm_Widget_Item *, NULL);
Eina_List *_elm_gengrid_realized_items_get(const Eo *obj, Elm_Gengrid_Data *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_realized_items_get, Eina_List *, NULL);
Elm_Widget_Item *_elm_gengrid_first_item_get(const Eo *obj, Elm_Gengrid_Data *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_first_item_get, Elm_Widget_Item *, NULL);
const Eina_List *_elm_gengrid_selected_items_get(const Eo *obj, Elm_Gengrid_Data *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_selected_items_get, const Eina_List *, NULL);
Elm_Widget_Item *_elm_gengrid_last_item_get(const Eo *obj, Elm_Gengrid_Data *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_last_item_get, Elm_Widget_Item *, NULL);
Elm_Widget_Item *_elm_gengrid_item_insert_before(Eo *obj, Elm_Gengrid_Data *pd, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data);
EOAPI EFL_FUNC_BODYV(elm_obj_gengrid_item_insert_before, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(itc, data, relative, func, func_data), const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data);
void _elm_gengrid_realized_items_update(Eo *obj, Elm_Gengrid_Data *pd);
EOAPI EFL_VOID_FUNC_BODY(elm_obj_gengrid_realized_items_update);
Elm_Widget_Item *_elm_gengrid_item_insert_after(Eo *obj, Elm_Gengrid_Data *pd, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data);
EOAPI EFL_FUNC_BODYV(elm_obj_gengrid_item_insert_after, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(itc, data, relative, func, func_data), const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data);
unsigned int _elm_gengrid_items_count(const Eo *obj, Elm_Gengrid_Data *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_items_count, unsigned int, 0);
Elm_Widget_Item *_elm_gengrid_at_xy_item_get(const Eo *obj, Elm_Gengrid_Data *pd, int x, int y, int *xposret, int *yposret);
EOAPI EFL_FUNC_BODYV_CONST(elm_obj_gengrid_at_xy_item_get, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(x, y, xposret, yposret), int x, int y, int *xposret, int *yposret);
Elm_Widget_Item *_elm_gengrid_item_append(Eo *obj, Elm_Gengrid_Data *pd, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data);
EOAPI EFL_FUNC_BODYV(elm_obj_gengrid_item_append, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(itc, data, func, func_data), const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data);
Elm_Widget_Item *_elm_gengrid_item_prepend(Eo *obj, Elm_Gengrid_Data *pd, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data);
EOAPI EFL_FUNC_BODYV(elm_obj_gengrid_item_prepend, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(itc, data, func, func_data), const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data);
void _elm_gengrid_clear(Eo *obj, Elm_Gengrid_Data *pd);
EOAPI EFL_VOID_FUNC_BODY(elm_obj_gengrid_clear);
Elm_Widget_Item *_elm_gengrid_item_sorted_insert(Eo *obj, Elm_Gengrid_Data *pd, const Elm_Gengrid_Item_Class *itc, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
EOAPI EFL_FUNC_BODYV(elm_obj_gengrid_item_sorted_insert, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(itc, data, comp, func, func_data), const Elm_Gengrid_Item_Class *itc, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
Elm_Widget_Item *_elm_gengrid_search_by_text_item_get(Eo *obj, Elm_Gengrid_Data *pd, Elm_Widget_Item *item_to_search_from, const char *part_name, const char *pattern, Elm_Glob_Match_Flags flags);
EOAPI EFL_FUNC_BODYV(elm_obj_gengrid_search_by_text_item_get, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(item_to_search_from, part_name, pattern, flags), Elm_Widget_Item *item_to_search_from, const char *part_name, const char *pattern, Elm_Glob_Match_Flags flags);
void _elm_gengrid_reorder_mode_start(Eo *obj, Elm_Gengrid_Data *pd, Ecore_Pos_Map tween_mode);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_reorder_mode_start, EFL_FUNC_CALL(tween_mode), Ecore_Pos_Map tween_mode);
void _elm_gengrid_reorder_mode_stop(Eo *obj, Elm_Gengrid_Data *pd);
EOAPI EFL_VOID_FUNC_BODY(elm_obj_gengrid_reorder_mode_stop);
Efl_Object *_elm_gengrid_efl_object_constructor(Eo *obj, Elm_Gengrid_Data *pd);
Efl_Object *_elm_gengrid_efl_object_provider_find(const Eo *obj, Elm_Gengrid_Data *pd, const Efl_Class *klass);
void _elm_gengrid_efl_gfx_entity_position_set(Eo *obj, Elm_Gengrid_Data *pd, Eina_Position2D pos);
void _elm_gengrid_efl_gfx_entity_size_set(Eo *obj, Elm_Gengrid_Data *pd, Eina_Size2D size);
void _elm_gengrid_efl_canvas_group_group_member_add(Eo *obj, Elm_Gengrid_Data *pd, Efl_Canvas_Object *sub_obj);
Eina_Error _elm_gengrid_efl_ui_widget_theme_apply(Eo *obj, Elm_Gengrid_Data *pd);
void _elm_gengrid_efl_ui_widget_on_access_update(Eo *obj, Elm_Gengrid_Data *pd, Eina_Bool enable);
Eina_Rect _elm_gengrid_efl_ui_widget_interest_region_get(const Eo *obj, Elm_Gengrid_Data *pd);
Eina_Bool _elm_gengrid_efl_ui_widget_widget_input_event_handler(Eo *obj, Elm_Gengrid_Data *pd, const Efl_Event *eo_event, Efl_Canvas_Object *source);
Eina_Rect _elm_gengrid_efl_ui_widget_focus_highlight_geometry_get(const Eo *obj, Elm_Gengrid_Data *pd);
Elm_Widget_Item *_elm_gengrid_elm_widget_item_container_focused_item_get(const Eo *obj, Elm_Gengrid_Data *pd);
void _elm_gengrid_elm_interface_scrollable_item_loop_enabled_set(Eo *obj, Elm_Gengrid_Data *pd, Eina_Bool enable);
Eina_Bool _elm_gengrid_elm_interface_scrollable_item_loop_enabled_get(const Eo *obj, Elm_Gengrid_Data *pd);
void _elm_gengrid_elm_interface_scrollable_bounce_allow_set(Eo *obj, Elm_Gengrid_Data *pd, Eina_Bool horiz, Eina_Bool vert);
void _elm_gengrid_elm_interface_scrollable_policy_set(Eo *obj, Elm_Gengrid_Data *pd, Elm_Scroller_Policy hbar, Elm_Scroller_Policy vbar);
void _elm_gengrid_elm_interface_scrollable_policy_get(const Eo *obj, Elm_Gengrid_Data *pd, Elm_Scroller_Policy *hbar, Elm_Scroller_Policy *vbar);
Eina_List *_elm_gengrid_efl_access_object_access_children_get(const Eo *obj, Elm_Gengrid_Data *pd);
Efl_Access_State_Set _elm_gengrid_efl_access_object_state_set_get(const Eo *obj, Elm_Gengrid_Data *pd);
const Efl_Access_Action_Data *_elm_gengrid_efl_access_widget_action_elm_actions_get(const Eo *obj, Elm_Gengrid_Data *pd);
int _elm_gengrid_efl_access_selection_selected_children_count_get(const Eo *obj, Elm_Gengrid_Data *pd);
Efl_Object *_elm_gengrid_efl_access_selection_selected_child_get(const Eo *obj, Elm_Gengrid_Data *pd, int selected_child_index);
Eina_Bool _elm_gengrid_efl_access_selection_selected_child_deselect(Eo *obj, Elm_Gengrid_Data *pd, int child_index);
Eina_Bool _elm_gengrid_efl_access_selection_child_select(Eo *obj, Elm_Gengrid_Data *pd, int child_index);
Eina_Bool _elm_gengrid_efl_access_selection_child_deselect(Eo *obj, Elm_Gengrid_Data *pd, int child_index);
Eina_Bool _elm_gengrid_efl_access_selection_is_child_selected(Eo *obj, Elm_Gengrid_Data *pd, int child_index);
Eina_Bool _elm_gengrid_efl_access_selection_all_children_select(Eo *obj, Elm_Gengrid_Data *pd);
Eina_Bool _elm_gengrid_efl_access_selection_access_selection_clear(Eo *obj, Elm_Gengrid_Data *pd);
void _elm_gengrid_efl_ui_focus_composition_prepare(Eo *obj, Elm_Gengrid_Data *pd);
Eina_Bool _elm_gengrid_efl_ui_widget_focus_state_apply(Eo *obj, Elm_Gengrid_Data *pd, Efl_Ui_Widget_Focus_State current_state, Efl_Ui_Widget_Focus_State *configured_state, Efl_Ui_Widget *redirect);
void _elm_gengrid_efl_ui_focus_manager_setup_on_first_touch(Eo *obj, Elm_Gengrid_Data *pd, Efl_Ui_Focus_Direction direction, Efl_Ui_Focus_Object *entry);
Efl_Ui_Focus_Object *_elm_gengrid_efl_ui_focus_manager_manager_focus_get(const Eo *obj, Elm_Gengrid_Data *pd);
Efl_Ui_Focus_Object *_elm_gengrid_efl_ui_focus_manager_move(Eo *obj, Elm_Gengrid_Data *pd, Efl_Ui_Focus_Direction direction);
static Eina_Bool
_elm_gengrid_class_initializer(Efl_Class *klass)
{
const Efl_Object_Ops *opsp = NULL;
const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
#ifndef ELM_GENGRID_EXTRA_OPS
#define ELM_GENGRID_EXTRA_OPS
#endif
EFL_OPS_DEFINE(ops,
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_align_set, _elm_gengrid_align_set),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_align_get, _elm_gengrid_align_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_filled_set, _elm_gengrid_filled_set),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_filled_get, _elm_gengrid_filled_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_multi_select_set, _elm_gengrid_multi_select_set),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_multi_select_get, _elm_gengrid_multi_select_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_group_item_size_set, _elm_gengrid_group_item_size_set),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_group_item_size_get, _elm_gengrid_group_item_size_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_select_mode_set, _elm_gengrid_select_mode_set),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_select_mode_get, _elm_gengrid_select_mode_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_reorder_mode_set, _elm_gengrid_reorder_mode_set),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_reorder_mode_get, _elm_gengrid_reorder_mode_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_highlight_mode_set, _elm_gengrid_highlight_mode_set),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_highlight_mode_get, _elm_gengrid_highlight_mode_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_reorder_type_set, _elm_gengrid_reorder_type_set),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_size_set, _elm_gengrid_item_size_set),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_size_get, _elm_gengrid_item_size_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_multi_select_mode_set, _elm_gengrid_multi_select_mode_set),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_multi_select_mode_get, _elm_gengrid_multi_select_mode_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_horizontal_set, _elm_gengrid_horizontal_set),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_horizontal_get, _elm_gengrid_horizontal_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_selected_item_get, _elm_gengrid_selected_item_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_realized_items_get, _elm_gengrid_realized_items_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_first_item_get, _elm_gengrid_first_item_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_selected_items_get, _elm_gengrid_selected_items_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_last_item_get, _elm_gengrid_last_item_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_insert_before, _elm_gengrid_item_insert_before),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_realized_items_update, _elm_gengrid_realized_items_update),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_insert_after, _elm_gengrid_item_insert_after),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_items_count, _elm_gengrid_items_count),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_at_xy_item_get, _elm_gengrid_at_xy_item_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_append, _elm_gengrid_item_append),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_prepend, _elm_gengrid_item_prepend),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_clear, _elm_gengrid_clear),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_sorted_insert, _elm_gengrid_item_sorted_insert),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_search_by_text_item_get, _elm_gengrid_search_by_text_item_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_reorder_mode_start, _elm_gengrid_reorder_mode_start),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_reorder_mode_stop, _elm_gengrid_reorder_mode_stop),
EFL_OBJECT_OP_FUNC(efl_constructor, _elm_gengrid_efl_object_constructor),
EFL_OBJECT_OP_FUNC(efl_provider_find, _elm_gengrid_efl_object_provider_find),
EFL_OBJECT_OP_FUNC(efl_gfx_entity_position_set, _elm_gengrid_efl_gfx_entity_position_set),
EFL_OBJECT_OP_FUNC(efl_gfx_entity_size_set, _elm_gengrid_efl_gfx_entity_size_set),
EFL_OBJECT_OP_FUNC(efl_canvas_group_member_add, _elm_gengrid_efl_canvas_group_group_member_add),
EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_gengrid_efl_ui_widget_theme_apply),
EFL_OBJECT_OP_FUNC(efl_ui_widget_on_access_update, _elm_gengrid_efl_ui_widget_on_access_update),
EFL_OBJECT_OP_FUNC(efl_ui_widget_interest_region_get, _elm_gengrid_efl_ui_widget_interest_region_get),
EFL_OBJECT_OP_FUNC(efl_ui_widget_input_event_handler, _elm_gengrid_efl_ui_widget_widget_input_event_handler),
EFL_OBJECT_OP_FUNC(efl_ui_widget_focus_highlight_geometry_get, _elm_gengrid_efl_ui_widget_focus_highlight_geometry_get),
EFL_OBJECT_OP_FUNC(elm_widget_item_container_focused_item_get, _elm_gengrid_elm_widget_item_container_focused_item_get),
EFL_OBJECT_OP_FUNC(elm_interface_scrollable_item_loop_enabled_set, _elm_gengrid_elm_interface_scrollable_item_loop_enabled_set),
EFL_OBJECT_OP_FUNC(elm_interface_scrollable_item_loop_enabled_get, _elm_gengrid_elm_interface_scrollable_item_loop_enabled_get),
EFL_OBJECT_OP_FUNC(elm_interface_scrollable_bounce_allow_set, _elm_gengrid_elm_interface_scrollable_bounce_allow_set),
EFL_OBJECT_OP_FUNC(elm_interface_scrollable_policy_set, _elm_gengrid_elm_interface_scrollable_policy_set),
EFL_OBJECT_OP_FUNC(elm_interface_scrollable_policy_get, _elm_gengrid_elm_interface_scrollable_policy_get),
EFL_OBJECT_OP_FUNC(efl_access_object_access_children_get, _elm_gengrid_efl_access_object_access_children_get),
EFL_OBJECT_OP_FUNC(efl_access_object_state_set_get, _elm_gengrid_efl_access_object_state_set_get),
EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_gengrid_efl_access_widget_action_elm_actions_get),
EFL_OBJECT_OP_FUNC(efl_access_selection_selected_children_count_get, _elm_gengrid_efl_access_selection_selected_children_count_get),
EFL_OBJECT_OP_FUNC(efl_access_selection_selected_child_get, _elm_gengrid_efl_access_selection_selected_child_get),
EFL_OBJECT_OP_FUNC(efl_access_selection_selected_child_deselect, _elm_gengrid_efl_access_selection_selected_child_deselect),
EFL_OBJECT_OP_FUNC(efl_access_selection_child_select, _elm_gengrid_efl_access_selection_child_select),
EFL_OBJECT_OP_FUNC(efl_access_selection_child_deselect, _elm_gengrid_efl_access_selection_child_deselect),
EFL_OBJECT_OP_FUNC(efl_access_selection_is_child_selected, _elm_gengrid_efl_access_selection_is_child_selected),
EFL_OBJECT_OP_FUNC(efl_access_selection_all_children_select, _elm_gengrid_efl_access_selection_all_children_select),
EFL_OBJECT_OP_FUNC(efl_access_selection_clear, _elm_gengrid_efl_access_selection_access_selection_clear),
EFL_OBJECT_OP_FUNC(efl_ui_focus_composition_prepare, _elm_gengrid_efl_ui_focus_composition_prepare),
EFL_OBJECT_OP_FUNC(efl_ui_widget_focus_state_apply, _elm_gengrid_efl_ui_widget_focus_state_apply),
EFL_OBJECT_OP_FUNC(efl_ui_focus_manager_setup_on_first_touch, _elm_gengrid_efl_ui_focus_manager_setup_on_first_touch),
EFL_OBJECT_OP_FUNC(efl_ui_focus_manager_focus_get, _elm_gengrid_efl_ui_focus_manager_manager_focus_get),
EFL_OBJECT_OP_FUNC(efl_ui_focus_manager_move, _elm_gengrid_efl_ui_focus_manager_move),
ELM_GENGRID_EXTRA_OPS
);
opsp = &ops;
static const Efl_Object_Property_Reflection refl_table[] = {
{"filled", __eolian_elm_gengrid_filled_set_reflect, __eolian_elm_gengrid_filled_get_reflect},
{"multi_select", __eolian_elm_gengrid_multi_select_set_reflect, __eolian_elm_gengrid_multi_select_get_reflect},
{"reorder_mode", __eolian_elm_gengrid_reorder_mode_set_reflect, __eolian_elm_gengrid_reorder_mode_get_reflect},
{"highlight_mode", __eolian_elm_gengrid_highlight_mode_set_reflect, __eolian_elm_gengrid_highlight_mode_get_reflect},
{"horizontal", __eolian_elm_gengrid_horizontal_set_reflect, __eolian_elm_gengrid_horizontal_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_gengrid_class_desc = {
EO_VERSION,
"Elm.Gengrid",
EFL_CLASS_TYPE_REGULAR,
sizeof(Elm_Gengrid_Data),
_elm_gengrid_class_initializer,
_elm_gengrid_class_constructor,
NULL
};
EFL_DEFINE_CLASS(elm_gengrid_class_get, &_elm_gengrid_class_desc, EFL_UI_LAYOUT_BASE_CLASS, EFL_UI_FOCUS_COMPOSITION_MIXIN, ELM_INTERFACE_SCROLLABLE_MIXIN, EFL_UI_CLICKABLE_INTERFACE, EFL_ACCESS_WIDGET_ACTION_MIXIN, EFL_ACCESS_SELECTION_INTERFACE, EFL_UI_LEGACY_INTERFACE, ELM_WIDGET_ITEM_CONTAINER_INTERFACE, NULL);
#include "elm_gengrid_eo.legacy.c"

View File

@ -0,0 +1,782 @@
#ifndef _ELM_GENGRID_EO_H_
#define _ELM_GENGRID_EO_H_
#ifndef _ELM_GENGRID_EO_CLASS_TYPE
#define _ELM_GENGRID_EO_CLASS_TYPE
typedef Eo Elm_Gengrid;
#endif
#ifndef _ELM_GENGRID_EO_TYPES
#define _ELM_GENGRID_EO_TYPES
/** Gengrid reorder modes
*
* @ingroup Elm_Gengrid
*/
typedef enum
{
ELM_GENGRID_REORDER_TYPE_NORMAL = 0, /**< Normal reorder type */
ELM_GENGRID_REORDER_TYPE_SWAP /**< Swap reorder type */
} Elm_Gengrid_Reorder_Type;
#endif
/** Elementary gengrid class
*
* @ingroup Elm_Gengrid
*/
#define ELM_GENGRID_CLASS elm_gengrid_class_get()
EWAPI const Efl_Class *elm_gengrid_class_get(void);
/**
* @brief Set the items grid's alignment within a given gengrid widget.
*
* This sets the alignment of the whole grid of items of a gengrid within its
* given viewport. By default, those values are both 0.5, meaning that the
* gengrid will have its items grid placed exactly in the middle of its
* viewport.
*
* @note If given alignment values are out of the cited ranges, they'll be
* changed to the nearest boundary values on the valid ranges.
*
* @param[in] obj The object.
* @param[in] align_x Alignment in the horizontal axis (0 <= align_x <= 1).
* @param[in] align_y Alignment in the vertical axis (0 <= align_y <= 1).
*
* @ingroup Elm_Gengrid
*/
EOAPI void elm_obj_gengrid_align_set(Eo *obj, double align_x, double align_y);
/**
* @brief Get the items grid's alignment values within a given gengrid widget.
*
* @note Use @c null pointers on the alignment values you're not interested in:
* they'll be ignored by the function.
*
* @param[in] obj The object.
* @param[out] align_x Alignment in the horizontal axis (0 <= align_x <= 1).
* @param[out] align_y Alignment in the vertical axis (0 <= align_y <= 1).
*
* @ingroup Elm_Gengrid
*/
EOAPI void elm_obj_gengrid_align_get(const Eo *obj, double *align_x, double *align_y);
/**
* @brief Set how the items grid's filled within a given gengrid widget
*
* This sets the fill state of the whole grid of items of a gengrid within its
* given viewport. By default, this value is false, meaning that if the first
* line of items grid's isn't filled, the items are centered with the
* alignment.
*
* @param[in] obj The object.
* @param[in] fill @c true if the grid is filled, @c false otherwise
*
* @ingroup Elm_Gengrid
*/
EOAPI void elm_obj_gengrid_filled_set(Eo *obj, Eina_Bool fill);
/**
* @brief Get how the items grid's filled within a given gengrid widget
*
* @note Use @c null pointers on the alignment values you're not interested in:
* they'll be ignored by the function.
*
* @param[in] obj The object.
*
* @return @c true if the grid is filled, @c false otherwise
*
* @ingroup Elm_Gengrid
*/
EOAPI Eina_Bool elm_obj_gengrid_filled_get(const Eo *obj);
/**
* @brief Enable or disable multi-selection in a given gengrid widget.
*
* Multi-selection is the ability to have more than one item selected, on a
* given gengrid, simultaneously. When it is enabled, a sequence of clicks on
* different items will make them all selected, progressively. A click on an
* already selected item will unselect it. If interacting via the keyboard,
* multi-selection is enabled while holding the "Shift" key.
*
* @note By default, multi-selection is disabled on gengrids.
*
* @param[in] obj The object.
* @param[in] multi @c true if multislect is enabled, @c false otherwise
*
* @ingroup Elm_Gengrid
*/
EOAPI void elm_obj_gengrid_multi_select_set(Eo *obj, Eina_Bool multi);
/**
* @brief Get whether multi-selection is enabled or disabled for a given
* gengrid widget.
*
* @param[in] obj The object.
*
* @return @c true if multislect is enabled, @c false otherwise
*
* @ingroup Elm_Gengrid
*/
EOAPI Eina_Bool elm_obj_gengrid_multi_select_get(const Eo *obj);
/**
* @brief Set the size for the group items of a given gengrid widget.
*
* A gengrid, after creation, has still no information on the size to give to
* each of its cells. So, you most probably will end up with squares one @ref
* Fingers "finger" wide, the default size. Use this function to force a custom
* size for you group items, making them as big as you wish.
*
* @param[in] obj The object.
* @param[in] w The group items' width.
* @param[in] h The group items' height.
*
* @ingroup Elm_Gengrid
*/
EOAPI void elm_obj_gengrid_group_item_size_set(Eo *obj, int w, int h);
/**
* @brief Get the size set for the group items of a given gengrid widget.
*
* @note Use @c null pointers on the size values you're not interested in:
* they'll be ignored by the function.
*
* @param[in] obj The object.
* @param[out] w The group items' width.
* @param[out] h The group items' height.
*
* @ingroup Elm_Gengrid
*/
EOAPI void elm_obj_gengrid_group_item_size_get(const Eo *obj, int *w, int *h);
/**
* @brief Set the gengrid select mode.
*
* This changes item select mode in the gengrid widget.
* #ELM_OBJECT_SELECT_MODE_DEFAULT means that 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 means that even if selected, every click will
* make the selected callbacks be called. #ELM_OBJECT_SELECT_MODE_NONE 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_Gengrid
*/
EOAPI void elm_obj_gengrid_select_mode_set(Eo *obj, Elm_Object_Select_Mode mode);
/**
* @brief Get the gengrid select mode.
*
* @param[in] obj The object.
*
* @return The select mode.
*
* @ingroup Elm_Gengrid
*/
EOAPI Elm_Object_Select_Mode elm_obj_gengrid_select_mode_get(const Eo *obj);
/**
* @brief Set whether a given gengrid widget is or not able have items
* reordered.
*
* If a gengrid is set to allow reordering, a click held for more than 0.5 over
* a given item will highlight it specially, signaling the gengrid has entered
* the reordering state. From that time on, the user will be able to, while
* still holding the mouse button down, move the item freely in the gengrid's
* viewport, replacing to said item to the locations it goes to. The
* replacements will be animated and, whenever the user releases the mouse
* button, the item being replaced gets a new definitive place in the grid.
*
* @param[in] obj The object.
* @param[in] reorder_mode Use @c true to turn reordering on, @c false to turn
* it off.
*
* @ingroup Elm_Gengrid
*/
EOAPI void elm_obj_gengrid_reorder_mode_set(Eo *obj, Eina_Bool reorder_mode);
/**
* @brief Get whether a given gengrid widget is or not able have items
* reordered.
*
* @param[in] obj The object.
*
* @return Use @c true to turn reordering on, @c false to turn it off.
*
* @ingroup Elm_Gengrid
*/
EOAPI Eina_Bool elm_obj_gengrid_reorder_mode_get(const Eo *obj);
/**
* @brief Control whether the gengrid items' should be highlighted when item
* selected.
*
* @param[in] obj The object.
* @param[in] highlight @c true if item will be highlighted, @c false otherwise
*
* @ingroup Elm_Gengrid
*/
EOAPI void elm_obj_gengrid_highlight_mode_set(Eo *obj, Eina_Bool highlight);
/**
* @brief Control whether the gengrid items' should be highlighted when item
* selected.
*
* @param[in] obj The object.
*
* @return @c true if item will be highlighted, @c false otherwise
*
* @ingroup Elm_Gengrid
*/
EOAPI Eina_Bool elm_obj_gengrid_highlight_mode_get(const Eo *obj);
/**
* @brief Set the Gengrid reorder type
*
* @param[in] obj The object.
* @param[in] type Reorder type value
*
* @since 1.11
*
* @ingroup Elm_Gengrid
*/
EOAPI void elm_obj_gengrid_reorder_type_set(Eo *obj, Elm_Gengrid_Reorder_Type type);
/**
* @brief Set the size for the items of a given gengrid widget.
*
* A gengrid, after creation, has still no information on the size to give to
* each of its cells. So, you most probably will end up with squares one @ref
* Fingers "finger" wide, the default size. Use this function to force a custom
* size for you items, making them as big as you wish.
*
* @param[in] obj The object.
* @param[in] w The items' width.
* @param[in] h The items' height.
*
* @ingroup Elm_Gengrid
*/
EOAPI void elm_obj_gengrid_item_size_set(Eo *obj, int w, int h);
/**
* @brief Get the size set for the items of a given gengrid widget.
*
* @note Use @c null pointers on the size values you're not interested in:
* they'll be ignored by the function.
*
* @param[in] obj The object.
* @param[out] w The items' width.
* @param[out] h The items' height.
*
* @ingroup Elm_Gengrid
*/
EOAPI void elm_obj_gengrid_item_size_get(const Eo *obj, int *w, int *h);
/**
* @brief Set the gengrid multi select mode.
*
* #ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT means that select/unselect items
* whenever each item is clicked. #ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL
* means that 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.
*
* @param[in] obj The object.
* @param[in] mode The multi select mode.
*
* @since 1.8
*
* @ingroup Elm_Gengrid
*/
EOAPI void elm_obj_gengrid_multi_select_mode_set(Eo *obj, Elm_Object_Multi_Select_Mode mode);
/**
* @brief Get the gengrid multi select mode.
*
* If getting mode fails, it returns #ELM_OBJECT_MULTI_SELECT_MODE_MAX.
*
* @param[in] obj The object.
*
* @return The multi select mode.
*
* @since 1.8
*
* @ingroup Elm_Gengrid
*/
EOAPI Elm_Object_Multi_Select_Mode elm_obj_gengrid_multi_select_mode_get(const Eo *obj);
/**
* @brief Set the direction in which a given gengrid widget will expand while
* placing its items.
*
* When in "horizontal mode" ($true), items will be placed in columns, from top
* to bottom and, when the space for a column is filled, another one is started
* on the right, thus expanding the grid horizontally. When in "vertical mode"
* ($false), though, items will be placed in rows, from left to right and, when
* the space for a row is filled, another one is started below, thus expanding
* the grid vertically.
*
* @note By default, gengrid is in vertical mode, @c false.
*
* @param[in] obj The object.
* @param[in] horizontal @c true to make the gengrid expand horizontally,
* @c false to expand vertically.
*
* @ingroup Elm_Gengrid
*/
EOAPI void elm_obj_gengrid_horizontal_set(Eo *obj, Eina_Bool horizontal);
/**
* @brief Get for what direction a given gengrid widget will expand while
* placing its items.
*
* @param[in] obj The object.
*
* @return @c true to make the gengrid expand horizontally, @c false to expand
* vertically.
*
* @ingroup Elm_Gengrid
*/
EOAPI Eina_Bool elm_obj_gengrid_horizontal_get(const Eo *obj);
/**
* @brief Get the selected item in a given gengrid widget.
*
* This returns the selected item in @c obj. If multi selection is enabled on
* @c obj (See @ref elm_obj_gengrid_multi_select_set), only the first item in
* the list is selected, which might not be very useful. For that case, see
* @ref elm_obj_gengrid_selected_items_get.
*
* @param[in] obj The object.
*
* @return The selected item's handle or @c null if none is selected at the
* moment (and on errors).
*
* @ingroup Elm_Gengrid
*/
EOAPI Elm_Widget_Item *elm_obj_gengrid_selected_item_get(const Eo *obj);
/**
* @brief Get a list of realized items in gengrid.
*
* This returns a list of the realized items in the gengrid. The list contains
* gengrid item pointers. The list must be freed by the caller when done with
* eina_list_free(). The item pointers in the list are only valid so long as
* those items are not deleted or the gengrid is not deleted.
*
* @param[in] obj The object.
*
* @return The list of realized items or @c null if none are realized.
*
* @ingroup Elm_Gengrid
*/
EOAPI Eina_List *elm_obj_gengrid_realized_items_get(const Eo *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Get the first item in a given gengrid widget.
*
* This returns the first item in the @c obj's internal list of items.
*
* @param[in] obj The object.
*
* @return The first item's handle or @c null, if there are no items in @c obj
* (and on errors)
*
* @ingroup Elm_Gengrid
*/
EOAPI Elm_Widget_Item *elm_obj_gengrid_first_item_get(const Eo *obj);
/**
* @brief Get a list of selected items in a given gengrid.
*
* This returns a list of the selected items, in the order that they appear in
* the grid. This list is only valid as long as no more items are selected or
* unselected (or unselected implicitly by deletion). The list contains Gengrid
* item pointers as data, naturally.
*
* @param[in] obj The object.
*
* @return The list of selected items or @c null, if none is selected at the
* moment (and on errors).
*
* @ingroup Elm_Gengrid
*/
EOAPI const Eina_List *elm_obj_gengrid_selected_items_get(const Eo *obj);
/**
* @brief Get the last item in a given gengrid widget.
*
* This returns the last item in the @c obj's internal list of items.
*
* @param[in] obj The object.
*
* @return The last item's handle or @c null if there are no items in @c obj
* (and on errors).
*
* @ingroup Elm_Gengrid
*/
EOAPI Elm_Widget_Item *elm_obj_gengrid_last_item_get(const Eo *obj);
/**
* @brief Insert an item before another in a gengrid widget.
*
* This inserts an item before another in the gengrid.
*
* @param[in] obj The object.
* @param[in] itc The item class for the item.
* @param[in] data The item data.
* @param[in] relative The item to place this new one before.
* @param[in] func Convenience function called when the item is selected.
* @param[in] func_data Data to be passed to @c func.
*
* @return A handle to the item added or @c null on errors.
*
* @ingroup Elm_Gengrid
*/
EOAPI Elm_Widget_Item *elm_obj_gengrid_item_insert_before(Eo *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data);
/**
* @brief Update the contents of all realized items.
*
* This updates all realized items by calling all the item class functions
* again to get the contents, texts and states. Use this when the original item
* data has changed and the changes are desired to be reflected.
*
* To update just one item, use @ref elm_gengrid_item_update.
* @param[in] obj The object.
*
* @ingroup Elm_Gengrid
*/
EOAPI void elm_obj_gengrid_realized_items_update(Eo *obj);
/**
* @brief Insert an item after another in a gengrid widget.
*
* This inserts an item after another in the gengrid.
*
* @param[in] obj The object.
* @param[in] itc The item class for the item.
* @param[in] data The item data.
* @param[in] relative The item to place this new one after.
* @param[in] func Convenience function called when the item is selected.
* @param[in] func_data Data to be passed to @c func.
*
* @return A handle to the item added or @c null on error.
*
* @ingroup Elm_Gengrid
*/
EOAPI Elm_Widget_Item *elm_obj_gengrid_item_insert_after(Eo *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data);
/**
* @brief Return how many items are currently in a list
*
* This behavior is O(1) and includes items which may or may not be realized.
*
* @param[in] obj The object.
*
* @return Items in list
*
* @ingroup Elm_Gengrid
*/
EOAPI unsigned int elm_obj_gengrid_items_count(const Eo *obj);
/**
* @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 xposret is not @c null, the integer pointed to is set to
* a value of -1, 0 or 1, depending if the coordinate is on the left portion of
* that item (-1), on the middle section (0) or on the right part (1).
*
* If @c yposret is not @c 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
* gengrid.
*
* @param[in] obj The object.
* @param[in] x The input x coordinate.
* @param[in] y The input y coordinate.
* @param[out] xposret The position relative to the item returned here.
* @param[out] yposret The position relative to the item returned here.
*
* @return The item at the coordinates or @c null if none.
*
* @ingroup Elm_Gengrid
*/
EOAPI Elm_Widget_Item *elm_obj_gengrid_at_xy_item_get(const Eo *obj, int x, int y, int *xposret, int *yposret);
/**
* @brief Append a new item in a given gengrid widget.
*
* This adds an item to the beginning of the gengrid.
*
* @param[in] obj The object.
* @param[in] itc The item class for the item.
* @param[in] data The item data.
* @param[in] func Convenience function called when the item is selected.
* @param[in] func_data Data to be passed to @c func.
*
* @return A handle to the item added or @c null on errors.
*
* @ingroup Elm_Gengrid
*/
EOAPI Elm_Widget_Item *elm_obj_gengrid_item_append(Eo *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data);
/**
* @brief Prepend a new item in a given gengrid widget.
*
* This adds an item to the end of the gengrid.
*
* @param[in] obj The object.
* @param[in] itc The item class for the item.
* @param[in] data The item data.
* @param[in] func Convenience function called when the item is selected.
* @param[in] func_data Data to be passed to @c func.
*
* @return A handle to the item added or @c null on errors.
*
* @ingroup Elm_Gengrid
*/
EOAPI Elm_Widget_Item *elm_obj_gengrid_item_prepend(Eo *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data);
/**
* @brief Remove all items from a given gengrid widget.
*
* This removes (and deletes) all items in @c obj, leaving it empty.
*
* See @ref elm_gengrid_item_del to remove just one item.
* @param[in] obj The object.
*
* @ingroup Elm_Gengrid
*/
EOAPI void elm_obj_gengrid_clear(Eo *obj);
/**
* @brief Insert an item in a gengrid widget using a user-defined sort
* function.
*
* This inserts an item in the gengrid based on user defined comparison
* function. The two arguments passed to the function @c func are gengrid item
* handles to compare.
*
* @param[in] obj The object.
* @param[in] itc The item class for the item.
* @param[in] data The item data.
* @param[in] comp User defined comparison function that defines the sort order
* based on gengrid item and its data.
* @param[in] func Convenience function called when the item is selected.
* @param[in] func_data Data to be passed to @c func.
*
* @return A handle to the item added or @c null on errors.
*
* @ingroup Elm_Gengrid
*/
EOAPI Elm_Widget_Item *elm_obj_gengrid_item_sorted_insert(Eo *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
/**
* @brief Get gengrid item by given string.
*
* It takes pointer to the gengrid item that will be used to start search from
* it.
*
* This function uses globs (like "*.jpg") for searching and takes search flags
* as last parameter That is a bitfield with values to be ored together or 0
* for no flags.
*
* @param[in] obj The object.
* @param[in] item_to_search_from Pointer to item to start search from. If
* @c null, search will be started from the first item of the gengrid.
* @param[in] part_name Name of the TEXT part of gengrid item to search string
* in. If @c null, search by "elm.text" parts.
* @param[in] pattern The search pattern.
* @param[in] flags Search flags.
*
* @return Pointer to the gengrid item which matches search_string in case of
* success, otherwise @c null.
*
* @since 1.11
*
* @ingroup Elm_Gengrid
*/
EOAPI Elm_Widget_Item *elm_obj_gengrid_search_by_text_item_get(Eo *obj, Elm_Widget_Item *item_to_search_from, const char *part_name, const char *pattern, Elm_Glob_Match_Flags flags);
/**
* @brief Starts the reorder mode of Gengrid
*
* @param[in] obj The object.
* @param[in] tween_mode Position mappings for animation
*
* @since 1.10
*
* @ingroup Elm_Gengrid
*/
EOAPI void elm_obj_gengrid_reorder_mode_start(Eo *obj, Ecore_Pos_Map tween_mode);
/** Stops the reorder mode of Gengrid
*
* @since 1.10
*
* @ingroup Elm_Gengrid
*/
EOAPI void elm_obj_gengrid_reorder_mode_stop(Eo *obj);
EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_REALIZED;
/** Called when gengrid realized
* @return Efl_Object *
*
* @ingroup Elm_Gengrid
*/
#define ELM_GENGRID_EVENT_REALIZED (&(_ELM_GENGRID_EVENT_REALIZED))
EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_UNREALIZED;
/** Called when gengrid unrealized
* @return Efl_Object *
*
* @ingroup Elm_Gengrid
*/
#define ELM_GENGRID_EVENT_UNREALIZED (&(_ELM_GENGRID_EVENT_UNREALIZED))
EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_INDEX_UPDATE;
/** Called on gengrid index update
* @return Efl_Object *
*
* @ingroup Elm_Gengrid
*/
#define ELM_GENGRID_EVENT_INDEX_UPDATE (&(_ELM_GENGRID_EVENT_INDEX_UPDATE))
EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_SCROLL_PAGE_CHANGED;
/** Called when scroll page changed
*
* @ingroup Elm_Gengrid
*/
#define ELM_GENGRID_EVENT_SCROLL_PAGE_CHANGED (&(_ELM_GENGRID_EVENT_SCROLL_PAGE_CHANGED))
EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_EDGE_BOTTOM;
/** Called when bottom edge is reached
*
* @ingroup Elm_Gengrid
*/
#define ELM_GENGRID_EVENT_EDGE_BOTTOM (&(_ELM_GENGRID_EVENT_EDGE_BOTTOM))
EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_EDGE_TOP;
/** Called when top edge is reached
*
* @ingroup Elm_Gengrid
*/
#define ELM_GENGRID_EVENT_EDGE_TOP (&(_ELM_GENGRID_EVENT_EDGE_TOP))
EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_EDGE_RIGHT;
/** Called when right edge is reached
*
* @ingroup Elm_Gengrid
*/
#define ELM_GENGRID_EVENT_EDGE_RIGHT (&(_ELM_GENGRID_EVENT_EDGE_RIGHT))
EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_EDGE_LEFT;
/** Called when left edge is reached
*
* @ingroup Elm_Gengrid
*/
#define ELM_GENGRID_EVENT_EDGE_LEFT (&(_ELM_GENGRID_EVENT_EDGE_LEFT))
EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_ITEM_FOCUSED;
/** Called when item got focus
* @return Efl_Object *
*
* @ingroup Elm_Gengrid
*/
#define ELM_GENGRID_EVENT_ITEM_FOCUSED (&(_ELM_GENGRID_EVENT_ITEM_FOCUSED))
EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_ITEM_UNFOCUSED;
/** Called when item no longer has focus
* @return Efl_Object *
*
* @ingroup Elm_Gengrid
*/
#define ELM_GENGRID_EVENT_ITEM_UNFOCUSED (&(_ELM_GENGRID_EVENT_ITEM_UNFOCUSED))
EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_START;
/** Called when item reorder animation started
* @return Efl_Object *
*
* @ingroup Elm_Gengrid
*/
#define ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_START (&(_ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_START))
EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_STOP;
/** Called when item reorder animation stopped
* @return Efl_Object *
*
* @ingroup Elm_Gengrid
*/
#define ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_STOP (&(_ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_STOP))
EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_ACTIVATED;
/** Called when gengrid got activated
* @return Efl_Object *
*
* @ingroup Elm_Gengrid
*/
#define ELM_GENGRID_EVENT_ACTIVATED (&(_ELM_GENGRID_EVENT_ACTIVATED))
EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_HIGHLIGHTED;
/** Called when gengrid is highlighted
* @return Efl_Object *
*
* @ingroup Elm_Gengrid
*/
#define ELM_GENGRID_EVENT_HIGHLIGHTED (&(_ELM_GENGRID_EVENT_HIGHLIGHTED))
EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_UNHIGHLIGHTED;
/** Called when gengrid is no longer highlighted
* @return Efl_Object *
*
* @ingroup Elm_Gengrid
*/
#define ELM_GENGRID_EVENT_UNHIGHLIGHTED (&(_ELM_GENGRID_EVENT_UNHIGHLIGHTED))
EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_RELEASED;
/** Called when gengrid is released
* @return Efl_Object *
*
* @ingroup Elm_Gengrid
*/
#define ELM_GENGRID_EVENT_RELEASED (&(_ELM_GENGRID_EVENT_RELEASED))
EWAPI extern const Efl_Event_Description _ELM_GENGRID_EVENT_MOVED;
/** Called when gengrid item moved
* @return Efl_Object *
*
* @ingroup Elm_Gengrid
*/
#define ELM_GENGRID_EVENT_MOVED (&(_ELM_GENGRID_EVENT_MOVED))
#endif

View File

@ -0,0 +1,228 @@
EAPI void
elm_gengrid_align_set(Elm_Gengrid *obj, double align_x, double align_y)
{
elm_obj_gengrid_align_set(obj, align_x, align_y);
}
EAPI void
elm_gengrid_align_get(const Elm_Gengrid *obj, double *align_x, double *align_y)
{
elm_obj_gengrid_align_get(obj, align_x, align_y);
}
EAPI void
elm_gengrid_filled_set(Elm_Gengrid *obj, Eina_Bool fill)
{
elm_obj_gengrid_filled_set(obj, fill);
}
EAPI Eina_Bool
elm_gengrid_filled_get(const Elm_Gengrid *obj)
{
return elm_obj_gengrid_filled_get(obj);
}
EAPI void
elm_gengrid_multi_select_set(Elm_Gengrid *obj, Eina_Bool multi)
{
elm_obj_gengrid_multi_select_set(obj, multi);
}
EAPI Eina_Bool
elm_gengrid_multi_select_get(const Elm_Gengrid *obj)
{
return elm_obj_gengrid_multi_select_get(obj);
}
EAPI void
elm_gengrid_group_item_size_set(Elm_Gengrid *obj, int w, int h)
{
elm_obj_gengrid_group_item_size_set(obj, w, h);
}
EAPI void
elm_gengrid_group_item_size_get(const Elm_Gengrid *obj, int *w, int *h)
{
elm_obj_gengrid_group_item_size_get(obj, w, h);
}
EAPI void
elm_gengrid_select_mode_set(Elm_Gengrid *obj, Elm_Object_Select_Mode mode)
{
elm_obj_gengrid_select_mode_set(obj, mode);
}
EAPI Elm_Object_Select_Mode
elm_gengrid_select_mode_get(const Elm_Gengrid *obj)
{
return elm_obj_gengrid_select_mode_get(obj);
}
EAPI void
elm_gengrid_reorder_mode_set(Elm_Gengrid *obj, Eina_Bool reorder_mode)
{
elm_obj_gengrid_reorder_mode_set(obj, reorder_mode);
}
EAPI Eina_Bool
elm_gengrid_reorder_mode_get(const Elm_Gengrid *obj)
{
return elm_obj_gengrid_reorder_mode_get(obj);
}
EAPI void
elm_gengrid_highlight_mode_set(Elm_Gengrid *obj, Eina_Bool highlight)
{
elm_obj_gengrid_highlight_mode_set(obj, highlight);
}
EAPI Eina_Bool
elm_gengrid_highlight_mode_get(const Elm_Gengrid *obj)
{
return elm_obj_gengrid_highlight_mode_get(obj);
}
EAPI void
elm_gengrid_reorder_type_set(Elm_Gengrid *obj, Elm_Gengrid_Reorder_Type type)
{
elm_obj_gengrid_reorder_type_set(obj, type);
}
EAPI void
elm_gengrid_item_size_set(Elm_Gengrid *obj, int w, int h)
{
elm_obj_gengrid_item_size_set(obj, w, h);
}
EAPI void
elm_gengrid_item_size_get(const Elm_Gengrid *obj, int *w, int *h)
{
elm_obj_gengrid_item_size_get(obj, w, h);
}
EAPI void
elm_gengrid_multi_select_mode_set(Elm_Gengrid *obj, Elm_Object_Multi_Select_Mode mode)
{
elm_obj_gengrid_multi_select_mode_set(obj, mode);
}
EAPI Elm_Object_Multi_Select_Mode
elm_gengrid_multi_select_mode_get(const Elm_Gengrid *obj)
{
return elm_obj_gengrid_multi_select_mode_get(obj);
}
EAPI void
elm_gengrid_horizontal_set(Elm_Gengrid *obj, Eina_Bool horizontal)
{
elm_obj_gengrid_horizontal_set(obj, horizontal);
}
EAPI Eina_Bool
elm_gengrid_horizontal_get(const Elm_Gengrid *obj)
{
return elm_obj_gengrid_horizontal_get(obj);
}
EAPI Elm_Widget_Item *
elm_gengrid_selected_item_get(const Elm_Gengrid *obj)
{
return elm_obj_gengrid_selected_item_get(obj);
}
EAPI Eina_List *
elm_gengrid_realized_items_get(const Elm_Gengrid *obj)
{
return elm_obj_gengrid_realized_items_get(obj);
}
EAPI Elm_Widget_Item *
elm_gengrid_first_item_get(const Elm_Gengrid *obj)
{
return elm_obj_gengrid_first_item_get(obj);
}
EAPI const Eina_List *
elm_gengrid_selected_items_get(const Elm_Gengrid *obj)
{
return elm_obj_gengrid_selected_items_get(obj);
}
EAPI Elm_Widget_Item *
elm_gengrid_last_item_get(const Elm_Gengrid *obj)
{
return elm_obj_gengrid_last_item_get(obj);
}
EAPI Elm_Widget_Item *
elm_gengrid_item_insert_before(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data)
{
return elm_obj_gengrid_item_insert_before(obj, itc, data, relative, func, func_data);
}
EAPI void
elm_gengrid_realized_items_update(Elm_Gengrid *obj)
{
elm_obj_gengrid_realized_items_update(obj);
}
EAPI Elm_Widget_Item *
elm_gengrid_item_insert_after(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data)
{
return elm_obj_gengrid_item_insert_after(obj, itc, data, relative, func, func_data);
}
EAPI unsigned int
elm_gengrid_items_count(const Elm_Gengrid *obj)
{
return elm_obj_gengrid_items_count(obj);
}
EAPI Elm_Widget_Item *
elm_gengrid_at_xy_item_get(const Elm_Gengrid *obj, int x, int y, int *xposret, int *yposret)
{
return elm_obj_gengrid_at_xy_item_get(obj, x, y, xposret, yposret);
}
EAPI Elm_Widget_Item *
elm_gengrid_item_append(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data)
{
return elm_obj_gengrid_item_append(obj, itc, data, func, func_data);
}
EAPI Elm_Widget_Item *
elm_gengrid_item_prepend(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data)
{
return elm_obj_gengrid_item_prepend(obj, itc, data, func, func_data);
}
EAPI void
elm_gengrid_clear(Elm_Gengrid *obj)
{
elm_obj_gengrid_clear(obj);
}
EAPI Elm_Widget_Item *
elm_gengrid_item_sorted_insert(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data)
{
return elm_obj_gengrid_item_sorted_insert(obj, itc, data, comp, func, func_data);
}
EAPI Elm_Widget_Item *
elm_gengrid_search_by_text_item_get(Elm_Gengrid *obj, Elm_Widget_Item *item_to_search_from, const char *part_name, const char *pattern, Elm_Glob_Match_Flags flags)
{
return elm_obj_gengrid_search_by_text_item_get(obj, item_to_search_from, part_name, pattern, flags);
}
EAPI void
elm_gengrid_reorder_mode_start(Elm_Gengrid *obj, Ecore_Pos_Map tween_mode)
{
elm_obj_gengrid_reorder_mode_start(obj, tween_mode);
}
EAPI void
elm_gengrid_reorder_mode_stop(Elm_Gengrid *obj)
{
elm_obj_gengrid_reorder_mode_stop(obj);
}

View File

@ -0,0 +1,627 @@
#ifndef _ELM_GENGRID_EO_LEGACY_H_
#define _ELM_GENGRID_EO_LEGACY_H_
#ifndef _ELM_GENGRID_EO_CLASS_TYPE
#define _ELM_GENGRID_EO_CLASS_TYPE
typedef Eo Elm_Gengrid;
#endif
#ifndef _ELM_GENGRID_EO_TYPES
#define _ELM_GENGRID_EO_TYPES
/** Gengrid reorder modes
*
* @ingroup Elm_Gengrid
*/
typedef enum
{
ELM_GENGRID_REORDER_TYPE_NORMAL = 0, /**< Normal reorder type */
ELM_GENGRID_REORDER_TYPE_SWAP /**< Swap reorder type */
} Elm_Gengrid_Reorder_Type;
#endif
/**
* @brief Set the items grid's alignment within a given gengrid widget.
*
* This sets the alignment of the whole grid of items of a gengrid within its
* given viewport. By default, those values are both 0.5, meaning that the
* gengrid will have its items grid placed exactly in the middle of its
* viewport.
*
* @note If given alignment values are out of the cited ranges, they'll be
* changed to the nearest boundary values on the valid ranges.
*
* @param[in] obj The object.
* @param[in] align_x Alignment in the horizontal axis (0 <= align_x <= 1).
* @param[in] align_y Alignment in the vertical axis (0 <= align_y <= 1).
*
* @ingroup Elm_Gengrid_Group
*/
EAPI void elm_gengrid_align_set(Elm_Gengrid *obj, double align_x, double align_y);
/**
* @brief Get the items grid's alignment values within a given gengrid widget.
*
* @note Use @c null pointers on the alignment values you're not interested in:
* they'll be ignored by the function.
*
* @param[in] obj The object.
* @param[out] align_x Alignment in the horizontal axis (0 <= align_x <= 1).
* @param[out] align_y Alignment in the vertical axis (0 <= align_y <= 1).
*
* @ingroup Elm_Gengrid_Group
*/
EAPI void elm_gengrid_align_get(const Elm_Gengrid *obj, double *align_x, double *align_y);
/**
* @brief Set how the items grid's filled within a given gengrid widget
*
* This sets the fill state of the whole grid of items of a gengrid within its
* given viewport. By default, this value is false, meaning that if the first
* line of items grid's isn't filled, the items are centered with the
* alignment.
*
* @param[in] obj The object.
* @param[in] fill @c true if the grid is filled, @c false otherwise
*
* @ingroup Elm_Gengrid_Group
*/
EAPI void elm_gengrid_filled_set(Elm_Gengrid *obj, Eina_Bool fill);
/**
* @brief Get how the items grid's filled within a given gengrid widget
*
* @note Use @c null pointers on the alignment values you're not interested in:
* they'll be ignored by the function.
*
* @param[in] obj The object.
*
* @return @c true if the grid is filled, @c false otherwise
*
* @ingroup Elm_Gengrid_Group
*/
EAPI Eina_Bool elm_gengrid_filled_get(const Elm_Gengrid *obj);
/**
* @brief Enable or disable multi-selection in a given gengrid widget.
*
* Multi-selection is the ability to have more than one item selected, on a
* given gengrid, simultaneously. When it is enabled, a sequence of clicks on
* different items will make them all selected, progressively. A click on an
* already selected item will unselect it. If interacting via the keyboard,
* multi-selection is enabled while holding the "Shift" key.
*
* @note By default, multi-selection is disabled on gengrids.
*
* @param[in] obj The object.
* @param[in] multi @c true if multislect is enabled, @c false otherwise
*
* @ingroup Elm_Gengrid_Group
*/
EAPI void elm_gengrid_multi_select_set(Elm_Gengrid *obj, Eina_Bool multi);
/**
* @brief Get whether multi-selection is enabled or disabled for a given
* gengrid widget.
*
* @param[in] obj The object.
*
* @return @c true if multislect is enabled, @c false otherwise
*
* @ingroup Elm_Gengrid_Group
*/
EAPI Eina_Bool elm_gengrid_multi_select_get(const Elm_Gengrid *obj);
/**
* @brief Set the size for the group items of a given gengrid widget.
*
* A gengrid, after creation, has still no information on the size to give to
* each of its cells. So, you most probably will end up with squares one @ref
* Fingers "finger" wide, the default size. Use this function to force a custom
* size for you group items, making them as big as you wish.
*
* @param[in] obj The object.
* @param[in] w The group items' width.
* @param[in] h The group items' height.
*
* @ingroup Elm_Gengrid_Group
*/
EAPI void elm_gengrid_group_item_size_set(Elm_Gengrid *obj, int w, int h);
/**
* @brief Get the size set for the group items of a given gengrid widget.
*
* @note Use @c null pointers on the size values you're not interested in:
* they'll be ignored by the function.
*
* @param[in] obj The object.
* @param[out] w The group items' width.
* @param[out] h The group items' height.
*
* @ingroup Elm_Gengrid_Group
*/
EAPI void elm_gengrid_group_item_size_get(const Elm_Gengrid *obj, int *w, int *h);
/**
* @brief Set the gengrid select mode.
*
* This changes item select mode in the gengrid widget.
* #ELM_OBJECT_SELECT_MODE_DEFAULT means that 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 means that even if selected, every click will
* make the selected callbacks be called. #ELM_OBJECT_SELECT_MODE_NONE 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_Gengrid_Group
*/
EAPI void elm_gengrid_select_mode_set(Elm_Gengrid *obj, Elm_Object_Select_Mode mode);
/**
* @brief Get the gengrid select mode.
*
* @param[in] obj The object.
*
* @return The select mode.
*
* @ingroup Elm_Gengrid_Group
*/
EAPI Elm_Object_Select_Mode elm_gengrid_select_mode_get(const Elm_Gengrid *obj);
/**
* @brief Set whether a given gengrid widget is or not able have items
* reordered.
*
* If a gengrid is set to allow reordering, a click held for more than 0.5 over
* a given item will highlight it specially, signaling the gengrid has entered
* the reordering state. From that time on, the user will be able to, while
* still holding the mouse button down, move the item freely in the gengrid's
* viewport, replacing to said item to the locations it goes to. The
* replacements will be animated and, whenever the user releases the mouse
* button, the item being replaced gets a new definitive place in the grid.
*
* @param[in] obj The object.
* @param[in] reorder_mode Use @c true to turn reordering on, @c false to turn
* it off.
*
* @ingroup Elm_Gengrid_Group
*/
EAPI void elm_gengrid_reorder_mode_set(Elm_Gengrid *obj, Eina_Bool reorder_mode);
/**
* @brief Get whether a given gengrid widget is or not able have items
* reordered.
*
* @param[in] obj The object.
*
* @return Use @c true to turn reordering on, @c false to turn it off.
*
* @ingroup Elm_Gengrid_Group
*/
EAPI Eina_Bool elm_gengrid_reorder_mode_get(const Elm_Gengrid *obj);
/**
* @brief Control whether the gengrid items' should be highlighted when item
* selected.
*
* @param[in] obj The object.
* @param[in] highlight @c true if item will be highlighted, @c false otherwise
*
* @ingroup Elm_Gengrid_Group
*/
EAPI void elm_gengrid_highlight_mode_set(Elm_Gengrid *obj, Eina_Bool highlight);
/**
* @brief Control whether the gengrid items' should be highlighted when item
* selected.
*
* @param[in] obj The object.
*
* @return @c true if item will be highlighted, @c false otherwise
*
* @ingroup Elm_Gengrid_Group
*/
EAPI Eina_Bool elm_gengrid_highlight_mode_get(const Elm_Gengrid *obj);
/**
* @brief Set the Gengrid reorder type
*
* @param[in] obj The object.
* @param[in] type Reorder type value
*
* @since 1.11
*
* @ingroup Elm_Gengrid_Group
*/
EAPI void elm_gengrid_reorder_type_set(Elm_Gengrid *obj, Elm_Gengrid_Reorder_Type type);
/**
* @brief Set the size for the items of a given gengrid widget.
*
* A gengrid, after creation, has still no information on the size to give to
* each of its cells. So, you most probably will end up with squares one @ref
* Fingers "finger" wide, the default size. Use this function to force a custom
* size for you items, making them as big as you wish.
*
* @param[in] obj The object.
* @param[in] w The items' width.
* @param[in] h The items' height.
*
* @ingroup Elm_Gengrid_Group
*/
EAPI void elm_gengrid_item_size_set(Elm_Gengrid *obj, int w, int h);
/**
* @brief Get the size set for the items of a given gengrid widget.
*
* @note Use @c null pointers on the size values you're not interested in:
* they'll be ignored by the function.
*
* @param[in] obj The object.
* @param[out] w The items' width.
* @param[out] h The items' height.
*
* @ingroup Elm_Gengrid_Group
*/
EAPI void elm_gengrid_item_size_get(const Elm_Gengrid *obj, int *w, int *h);
/**
* @brief Set the gengrid multi select mode.
*
* #ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT means that select/unselect items
* whenever each item is clicked. #ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL
* means that 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.
*
* @param[in] obj The object.
* @param[in] mode The multi select mode.
*
* @since 1.8
*
* @ingroup Elm_Gengrid_Group
*/
EAPI void elm_gengrid_multi_select_mode_set(Elm_Gengrid *obj, Elm_Object_Multi_Select_Mode mode);
/**
* @brief Get the gengrid multi select mode.
*
* If getting mode fails, it returns #ELM_OBJECT_MULTI_SELECT_MODE_MAX.
*
* @param[in] obj The object.
*
* @return The multi select mode.
*
* @since 1.8
*
* @ingroup Elm_Gengrid_Group
*/
EAPI Elm_Object_Multi_Select_Mode elm_gengrid_multi_select_mode_get(const Elm_Gengrid *obj);
/**
* @brief Set the direction in which a given gengrid widget will expand while
* placing its items.
*
* When in "horizontal mode" ($true), items will be placed in columns, from top
* to bottom and, when the space for a column is filled, another one is started
* on the right, thus expanding the grid horizontally. When in "vertical mode"
* ($false), though, items will be placed in rows, from left to right and, when
* the space for a row is filled, another one is started below, thus expanding
* the grid vertically.
*
* @note By default, gengrid is in vertical mode, @c false.
*
* @param[in] obj The object.
* @param[in] horizontal @c true to make the gengrid expand horizontally,
* @c false to expand vertically.
*
* @ingroup Elm_Gengrid_Group
*/
EAPI void elm_gengrid_horizontal_set(Elm_Gengrid *obj, Eina_Bool horizontal);
/**
* @brief Get for what direction a given gengrid widget will expand while
* placing its items.
*
* @param[in] obj The object.
*
* @return @c true to make the gengrid expand horizontally, @c false to expand
* vertically.
*
* @ingroup Elm_Gengrid_Group
*/
EAPI Eina_Bool elm_gengrid_horizontal_get(const Elm_Gengrid *obj);
/**
* @brief Get the selected item in a given gengrid widget.
*
* This returns the selected item in @c obj. If multi selection is enabled on
* @c obj (See @ref elm_gengrid_multi_select_set), only the first item in the
* list is selected, which might not be very useful. For that case, see
* @ref elm_gengrid_selected_items_get.
*
* @param[in] obj The object.
*
* @return The selected item's handle or @c null if none is selected at the
* moment (and on errors).
*
* @ingroup Elm_Gengrid_Group
*/
EAPI Elm_Widget_Item *elm_gengrid_selected_item_get(const Elm_Gengrid *obj);
/**
* @brief Get a list of realized items in gengrid.
*
* This returns a list of the realized items in the gengrid. The list contains
* gengrid item pointers. The list must be freed by the caller when done with
* eina_list_free(). The item pointers in the list are only valid so long as
* those items are not deleted or the gengrid is not deleted.
*
* @param[in] obj The object.
*
* @return The list of realized items or @c null if none are realized.
*
* @ingroup Elm_Gengrid_Group
*/
EAPI Eina_List *elm_gengrid_realized_items_get(const Elm_Gengrid *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Get the first item in a given gengrid widget.
*
* This returns the first item in the @c obj's internal list of items.
*
* @param[in] obj The object.
*
* @return The first item's handle or @c null, if there are no items in @c obj
* (and on errors)
*
* @ingroup Elm_Gengrid_Group
*/
EAPI Elm_Widget_Item *elm_gengrid_first_item_get(const Elm_Gengrid *obj);
/**
* @brief Get a list of selected items in a given gengrid.
*
* This returns a list of the selected items, in the order that they appear in
* the grid. This list is only valid as long as no more items are selected or
* unselected (or unselected implicitly by deletion). The list contains Gengrid
* item pointers as data, naturally.
*
* @param[in] obj The object.
*
* @return The list of selected items or @c null, if none is selected at the
* moment (and on errors).
*
* @ingroup Elm_Gengrid_Group
*/
EAPI const Eina_List *elm_gengrid_selected_items_get(const Elm_Gengrid *obj);
/**
* @brief Get the last item in a given gengrid widget.
*
* This returns the last item in the @c obj's internal list of items.
*
* @param[in] obj The object.
*
* @return The last item's handle or @c null if there are no items in @c obj
* (and on errors).
*
* @ingroup Elm_Gengrid_Group
*/
EAPI Elm_Widget_Item *elm_gengrid_last_item_get(const Elm_Gengrid *obj);
/**
* @brief Insert an item before another in a gengrid widget.
*
* This inserts an item before another in the gengrid.
*
* @param[in] obj The object.
* @param[in] itc The item class for the item.
* @param[in] data The item data.
* @param[in] relative The item to place this new one before.
* @param[in] func Convenience function called when the item is selected.
* @param[in] func_data Data to be passed to @c func.
*
* @return A handle to the item added or @c null on errors.
*
* @ingroup Elm_Gengrid_Group
*/
EAPI Elm_Widget_Item *elm_gengrid_item_insert_before(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data);
/**
* @brief Update the contents of all realized items.
*
* This updates all realized items by calling all the item class functions
* again to get the contents, texts and states. Use this when the original item
* data has changed and the changes are desired to be reflected.
*
* To update just one item, use @ref elm_gengrid_item_update.
* @param[in] obj The object.
*
* @ingroup Elm_Gengrid_Group
*/
EAPI void elm_gengrid_realized_items_update(Elm_Gengrid *obj);
/**
* @brief Insert an item after another in a gengrid widget.
*
* This inserts an item after another in the gengrid.
*
* @param[in] obj The object.
* @param[in] itc The item class for the item.
* @param[in] data The item data.
* @param[in] relative The item to place this new one after.
* @param[in] func Convenience function called when the item is selected.
* @param[in] func_data Data to be passed to @c func.
*
* @return A handle to the item added or @c null on error.
*
* @ingroup Elm_Gengrid_Group
*/
EAPI Elm_Widget_Item *elm_gengrid_item_insert_after(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data);
/**
* @brief Return how many items are currently in a list
*
* This behavior is O(1) and includes items which may or may not be realized.
*
* @param[in] obj The object.
*
* @return Items in list
*
* @ingroup Elm_Gengrid_Group
*/
EAPI unsigned int elm_gengrid_items_count(const Elm_Gengrid *obj);
/**
* @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 xposret is not @c null, the integer pointed to is set to
* a value of -1, 0 or 1, depending if the coordinate is on the left portion of
* that item (-1), on the middle section (0) or on the right part (1).
*
* If @c yposret is not @c 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
* gengrid.
*
* @param[in] obj The object.
* @param[in] x The input x coordinate.
* @param[in] y The input y coordinate.
* @param[out] xposret The position relative to the item returned here.
* @param[out] yposret The position relative to the item returned here.
*
* @return The item at the coordinates or @c null if none.
*
* @ingroup Elm_Gengrid_Group
*/
EAPI Elm_Widget_Item *elm_gengrid_at_xy_item_get(const Elm_Gengrid *obj, int x, int y, int *xposret, int *yposret);
/**
* @brief Append a new item in a given gengrid widget.
*
* This adds an item to the beginning of the gengrid.
*
* @param[in] obj The object.
* @param[in] itc The item class for the item.
* @param[in] data The item data.
* @param[in] func Convenience function called when the item is selected.
* @param[in] func_data Data to be passed to @c func.
*
* @return A handle to the item added or @c null on errors.
*
* @ingroup Elm_Gengrid_Group
*/
EAPI Elm_Widget_Item *elm_gengrid_item_append(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data);
/**
* @brief Prepend a new item in a given gengrid widget.
*
* This adds an item to the end of the gengrid.
*
* @param[in] obj The object.
* @param[in] itc The item class for the item.
* @param[in] data The item data.
* @param[in] func Convenience function called when the item is selected.
* @param[in] func_data Data to be passed to @c func.
*
* @return A handle to the item added or @c null on errors.
*
* @ingroup Elm_Gengrid_Group
*/
EAPI Elm_Widget_Item *elm_gengrid_item_prepend(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data);
/**
* @brief Remove all items from a given gengrid widget.
*
* This removes (and deletes) all items in @c obj, leaving it empty.
*
* See @ref elm_gengrid_item_del to remove just one item.
* @param[in] obj The object.
*
* @ingroup Elm_Gengrid_Group
*/
EAPI void elm_gengrid_clear(Elm_Gengrid *obj);
/**
* @brief Insert an item in a gengrid widget using a user-defined sort
* function.
*
* This inserts an item in the gengrid based on user defined comparison
* function. The two arguments passed to the function @c func are gengrid item
* handles to compare.
*
* @param[in] obj The object.
* @param[in] itc The item class for the item.
* @param[in] data The item data.
* @param[in] comp User defined comparison function that defines the sort order
* based on gengrid item and its data.
* @param[in] func Convenience function called when the item is selected.
* @param[in] func_data Data to be passed to @c func.
*
* @return A handle to the item added or @c null on errors.
*
* @ingroup Elm_Gengrid_Group
*/
EAPI Elm_Widget_Item *elm_gengrid_item_sorted_insert(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
/**
* @brief Get gengrid item by given string.
*
* It takes pointer to the gengrid item that will be used to start search from
* it.
*
* This function uses globs (like "*.jpg") for searching and takes search flags
* as last parameter That is a bitfield with values to be ored together or 0
* for no flags.
*
* @param[in] obj The object.
* @param[in] item_to_search_from Pointer to item to start search from. If
* @c null, search will be started from the first item of the gengrid.
* @param[in] part_name Name of the TEXT part of gengrid item to search string
* in. If @c null, search by "elm.text" parts.
* @param[in] pattern The search pattern.
* @param[in] flags Search flags.
*
* @return Pointer to the gengrid item which matches search_string in case of
* success, otherwise @c null.
*
* @since 1.11
*
* @ingroup Elm_Gengrid_Group
*/
EAPI Elm_Widget_Item *elm_gengrid_search_by_text_item_get(Elm_Gengrid *obj, Elm_Widget_Item *item_to_search_from, const char *part_name, const char *pattern, Elm_Glob_Match_Flags flags);
/**
* @brief Starts the reorder mode of Gengrid
*
* @param[in] obj The object.
* @param[in] tween_mode Position mappings for animation
*
* @since 1.10
*
* @ingroup Elm_Gengrid_Group
*/
EAPI void elm_gengrid_reorder_mode_start(Elm_Gengrid *obj, Ecore_Pos_Map tween_mode);
/** Stops the reorder mode of Gengrid
*
* @since 1.10
*
* @ingroup Elm_Gengrid_Group
*/
EAPI void elm_gengrid_reorder_mode_stop(Elm_Gengrid *obj);
#endif

View File

@ -1,236 +0,0 @@
import elm_general;
class Elm.Gengrid.Item extends Elm.Widget.Item.Static_Focus implements Efl.Ui.Focus.Object, Efl.Ui.Legacy
{
[[Elementary gengrid item class]]
legacy_prefix: elm_gengrid_item;
eo_prefix: elm_obj_gengrid_item;
data: Elm_Gen_Item;
methods {
@property prev {
get {
[[Get the previous item in a gengrid widget's internal list of items, given a handle to one of those items.
This returns the item placed before the $item, on the container
gengrid.]]
}
values {
item: Elm.Widget.Item; [[The item before $item, or $NULL if there's none (and on errors)]]
}
}
@property next {
get {
[[Get the next item in a gengrid widget's internal list of items,
given a handle to one of those items.
This returns the item placed after the $item, on the container
gengrid.]]
}
values {
item: Elm.Widget.Item; [[The item after $item, or $NULL if there's none (and on errors)]]
}
}
@property selected {
[[Control whether a given gengrid item is selected or not
This API returns true for all the items selected in multi-select mode as well.
This sets the selected state of an item. If multi-selection is
not enabled on the containing gengrid and $selected is
true, any other previously selected items will get
unselected in favor of this new one.]]
get {
}
set {
}
values {
selected: bool; [[The selected state ($true selected, $false not selected)]]
}
}
@property item_class {
get {
[[Get the Gengrid Item class for the given Gengrid Item.
This returns the Gengrid_Item_Class for the given item. It can be used to examine
the function pointers and item_style.]]
}
values {
@cref itc: Elm.Gengrid.Item.Class; [[Gengrid Item class for the given item]]
}
}
@property index {
get {
[[Get the index of the item. It is only valid once displayed.]]
}
values {
index: int(-1); [[The position inside the list of item.]]
}
}
@property pos {
get {
[[Get a given gengrid item's position, relative to the whole gengrid's grid area.
This returns the "logical" position of the item within the
gengrid. For example, $(0, 1) would stand for first row,
second column.]]
}
values {
x: uint; [[Pointer to variable to store the item's <b>row number</b>.]]
y: uint; [[Pointer to variable to store the item's <b>column number</b>.]]
}
}
@property select_mode {
[[Control the gengrid item's select mode.
(If getting mode fails, it returns ELM_OBJECT_SELECT_MODE_MAX)
elm_gengrid_select_mode_set() changes item's select mode.
- ELM_OBJECT_SELECT_MODE_DEFAULT : The item 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 the item
entirely and they will neither appear selected nor call selected
callback functions.
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY : This will apply no-finger-size rule
with ELM_OBJECT_SELECT_MODE_NONE. No-finger-size rule makes an item can be
smaller than lower limit. Clickable objects should be bigger than
human touch point device (your finger) for some touch or
small screen devices. So it is enabled, the item can be shrink than
predefined finger-size value. And the item will be updated.]]
get {
}
set {
}
values {
mode: Elm.Object.Select_Mode(Elm.Object.Select_Mode.max); [[The selected mode]]
}
}
@property custom_size {
[[Custom size mode for non-homogeneous gengrid. ]]
get {
[[Get the dimensions of a gengrid item.
Gives the dimensions set with elm_gengrid_item_custom_size_set(). If the item
has not been modified values set with elm_gengrid_item_size_set() are obtained.
@since 1.19]]
}
set {
[[Resize dimensions of a gengrid item.
In case of a horizontal grid, only the widths only be resized and
in case of vertical only the heights can be resized. Item size
should be set by elm_gengrid_item_size_set() beforehand.
The values set by elm_gengrid_item_size_set() will be used for the
dimension that remains fixed.
@since 1.19]]
}
values {
w : int; [[The item's width.]]
h : int; [[The item's height.]]
}
}
/* init { FIXME
params {
Evas_Smart_Cb func;
const(void_ptr) data;
}
}*/
show {
[[Show the portion of a gengrid's internal grid containing a given
item, immediately.
This causes gengrid to redraw its viewport's contents to the
region containing the given $item item, if it is not fully
visible.]]
params {
@in type: Elm.Gengrid.Item.Scrollto_Type; [[Where to position the item in the viewport.]]
}
}
bring_in {
[[Animatedly bring in, to the visible area of a gengrid, a given item on it.
This causes gengrid to jump to the given $item and show
it (by scrolling), if it is not fully visible. This will use
animation to do so and take a period of time to complete.]]
params {
@in type: Elm.Gengrid.Item.Scrollto_Type; [[Where to position the item in the viewport.]]
}
}
update {
[[Update the contents of a given gengrid item
This updates an item by calling all the item class functions
again to get the contents, texts and states. Use this when the
original item data has changed and you want the changes to be
reflected.]]
}
fields_update {
[[Update the part of an item
This updates an item's part by calling item's fetching functions again
to get the contents, texts and states. Use this when the original
item data has changed and the changes are desired to be reflected.
Second parts argument is used for globbing to match '*', '?', and '.'
It can be used at updating multi fields.
Use elm_gengrid_realized_items_update() to update an item's all
property.
@since 1.15]]
params {
@in parts: string; [[The name of item's part]]
@in itf: Elm.Gengrid.Item.Field_Type; [[The type of item's part type]]
}
}
item_class_update {
[[Update the item class of a gengrid item.
This sets another class of the item, changing the way that it is
displayed. After changing the item class, elm_gengrid_item_update() is
called on the item $it.]]
params {
@cref itc: Elm.Gengrid.Item.Class; [[The gengrid item class describing the function pointers and the item style.]]
}
}
all_contents_unset{
[[Unset all contents fetched by the item class
This instructs gengrid to release references to contents in the item,
meaning that they will no longer be managed by gengrid and are
floating "orphans" that can be re-used elsewhere if the user wants
to.
@since 1.18
]]
params {
@out l: list<Efl.Canvas.Object> @owned; [[The contents list to return.]]
}
}
}
implements {
Efl.Object.constructor;
Elm.Widget.Item.del_pre;
Elm.Widget.Item.disable;
Elm.Widget.Item.signal_emit;
Elm.Widget.Item.item_focus { get; set; }
Elm.Widget.Item.part_text { get; }
Elm.Widget.Item.part_content { get; }
Elm.Widget.Item.tooltip_text_set;
Elm.Widget.Item.tooltip_style { get; set; }
Elm.Widget.Item.tooltip_window_mode { get; set; }
Elm.Widget.Item.tooltip_content_cb_set;
Elm.Widget.Item.tooltip_unset;
Elm.Widget.Item.cursor { set; }
Elm.Widget.Item.cursor_unset;
Efl.Access.Object.i18n_name { get; }
Efl.Access.Object.state_set { get; }
Efl.Ui.Focus.Object.setup_order_non_recursive;
Efl.Ui.Focus.Object.focus_parent { get; }
}
}

View File

@ -0,0 +1,243 @@
Elm_Widget_Item *_elm_gengrid_item_prev_get(const Eo *obj, Elm_Gen_Item *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_item_prev_get, Elm_Widget_Item *, NULL);
Elm_Widget_Item *_elm_gengrid_item_next_get(const Eo *obj, Elm_Gen_Item *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_item_next_get, Elm_Widget_Item *, NULL);
void _elm_gengrid_item_selected_set(Eo *obj, Elm_Gen_Item *pd, Eina_Bool selected);
static Eina_Error
__eolian_elm_gengrid_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_gengrid_item_selected_set(obj, cval);
end:
eina_value_flush(&val);
return r;
}
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_item_selected_set, EFL_FUNC_CALL(selected), Eina_Bool selected);
Eina_Bool _elm_gengrid_item_selected_get(const Eo *obj, Elm_Gen_Item *pd);
static Eina_Value
__eolian_elm_gengrid_item_selected_get_reflect(Eo *obj)
{
Eina_Bool val = elm_obj_gengrid_item_selected_get(obj);
return eina_value_bool_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_item_selected_get, Eina_Bool, 0);
const Elm_Gengrid_Item_Class *_elm_gengrid_item_item_class_get(const Eo *obj, Elm_Gen_Item *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_item_class_get, const Elm_Gengrid_Item_Class *, NULL);
int _elm_gengrid_item_index_get(const Eo *obj, Elm_Gen_Item *pd);
static Eina_Value
__eolian_elm_gengrid_item_index_get_reflect(Eo *obj)
{
int val = elm_obj_gengrid_item_index_get(obj);
return eina_value_int_init(val);
}
EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_item_index_get, int, -1 /* +1 */);
void _elm_gengrid_item_pos_get(const Eo *obj, Elm_Gen_Item *pd, unsigned int *x, unsigned int *y);
EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_gengrid_item_pos_get, EFL_FUNC_CALL(x, y), unsigned int *x, unsigned int *y);
void _elm_gengrid_item_select_mode_set(Eo *obj, Elm_Gen_Item *pd, Elm_Object_Select_Mode mode);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_item_select_mode_set, EFL_FUNC_CALL(mode), Elm_Object_Select_Mode mode);
Elm_Object_Select_Mode _elm_gengrid_item_select_mode_get(const Eo *obj, Elm_Gen_Item *pd);
EOAPI EFL_FUNC_BODY_CONST(elm_obj_gengrid_item_select_mode_get, Elm_Object_Select_Mode, 4 /* Elm.Object.Select_Mode.max */);
void _elm_gengrid_item_custom_size_set(Eo *obj, Elm_Gen_Item *pd, int w, int h);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_item_custom_size_set, EFL_FUNC_CALL(w, h), int w, int h);
void _elm_gengrid_item_custom_size_get(const Eo *obj, Elm_Gen_Item *pd, int *w, int *h);
EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_gengrid_item_custom_size_get, EFL_FUNC_CALL(w, h), int *w, int *h);
void _elm_gengrid_item_show(Eo *obj, Elm_Gen_Item *pd, Elm_Gengrid_Item_Scrollto_Type type);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_item_show, EFL_FUNC_CALL(type), Elm_Gengrid_Item_Scrollto_Type type);
void _elm_gengrid_item_bring_in(Eo *obj, Elm_Gen_Item *pd, Elm_Gengrid_Item_Scrollto_Type type);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_item_bring_in, EFL_FUNC_CALL(type), Elm_Gengrid_Item_Scrollto_Type type);
void _elm_gengrid_item_update(Eo *obj, Elm_Gen_Item *pd);
EOAPI EFL_VOID_FUNC_BODY(elm_obj_gengrid_item_update);
void _elm_gengrid_item_fields_update(Eo *obj, Elm_Gen_Item *pd, const char *parts, Elm_Gengrid_Item_Field_Type itf);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_item_fields_update, EFL_FUNC_CALL(parts, itf), const char *parts, Elm_Gengrid_Item_Field_Type itf);
void _elm_gengrid_item_item_class_update(Eo *obj, Elm_Gen_Item *pd, const Elm_Gengrid_Item_Class *itc);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_item_class_update, EFL_FUNC_CALL(itc), const Elm_Gengrid_Item_Class *itc);
void _elm_gengrid_item_all_contents_unset(Eo *obj, Elm_Gen_Item *pd, Eina_List **l);
EOAPI EFL_VOID_FUNC_BODYV(elm_obj_gengrid_item_all_contents_unset, EFL_FUNC_CALL(l), Eina_List **l);
Efl_Object *_elm_gengrid_item_efl_object_constructor(Eo *obj, Elm_Gen_Item *pd);
void _elm_gengrid_item_elm_widget_item_del_pre(Eo *obj, Elm_Gen_Item *pd);
void _elm_gengrid_item_elm_widget_item_disable(Eo *obj, Elm_Gen_Item *pd);
void _elm_gengrid_item_elm_widget_item_signal_emit(Eo *obj, Elm_Gen_Item *pd, const char *emission, const char *source);
void _elm_gengrid_item_elm_widget_item_item_focus_set(Eo *obj, Elm_Gen_Item *pd, Eina_Bool focused);
Eina_Bool _elm_gengrid_item_elm_widget_item_item_focus_get(const Eo *obj, Elm_Gen_Item *pd);
const char *_elm_gengrid_item_elm_widget_item_part_text_get(const Eo *obj, Elm_Gen_Item *pd, const char *part);
Efl_Canvas_Object *_elm_gengrid_item_elm_widget_item_part_content_get(const Eo *obj, Elm_Gen_Item *pd, const char *part);
void _elm_gengrid_item_elm_widget_item_tooltip_text_set(Eo *obj, Elm_Gen_Item *pd, const char *text);
void _elm_gengrid_item_elm_widget_item_tooltip_style_set(Eo *obj, Elm_Gen_Item *pd, const char *style);
const char *_elm_gengrid_item_elm_widget_item_tooltip_style_get(const Eo *obj, Elm_Gen_Item *pd);
Eina_Bool _elm_gengrid_item_elm_widget_item_tooltip_window_mode_set(Eo *obj, Elm_Gen_Item *pd, Eina_Bool disable);
Eina_Bool _elm_gengrid_item_elm_widget_item_tooltip_window_mode_get(const Eo *obj, Elm_Gen_Item *pd);
void _elm_gengrid_item_elm_widget_item_tooltip_content_cb_set(Eo *obj, Elm_Gen_Item *pd, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
void _elm_gengrid_item_elm_widget_item_tooltip_unset(Eo *obj, Elm_Gen_Item *pd);
void _elm_gengrid_item_elm_widget_item_cursor_set(Eo *obj, Elm_Gen_Item *pd, const char *cursor);
void _elm_gengrid_item_elm_widget_item_cursor_unset(Eo *obj, Elm_Gen_Item *pd);
const char *_elm_gengrid_item_efl_access_object_i18n_name_get(const Eo *obj, Elm_Gen_Item *pd);
Efl_Access_State_Set _elm_gengrid_item_efl_access_object_state_set_get(const Eo *obj, Elm_Gen_Item *pd);
void _elm_gengrid_item_efl_ui_focus_object_setup_order_non_recursive(Eo *obj, Elm_Gen_Item *pd);
Efl_Ui_Focus_Object *_elm_gengrid_item_efl_ui_focus_object_focus_parent_get(const Eo *obj, Elm_Gen_Item *pd);
static Eina_Bool
_elm_gengrid_item_class_initializer(Efl_Class *klass)
{
const Efl_Object_Ops *opsp = NULL;
const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
#ifndef ELM_GENGRID_ITEM_EXTRA_OPS
#define ELM_GENGRID_ITEM_EXTRA_OPS
#endif
EFL_OPS_DEFINE(ops,
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_prev_get, _elm_gengrid_item_prev_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_next_get, _elm_gengrid_item_next_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_selected_set, _elm_gengrid_item_selected_set),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_selected_get, _elm_gengrid_item_selected_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_class_get, _elm_gengrid_item_item_class_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_index_get, _elm_gengrid_item_index_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_pos_get, _elm_gengrid_item_pos_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_select_mode_set, _elm_gengrid_item_select_mode_set),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_select_mode_get, _elm_gengrid_item_select_mode_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_custom_size_set, _elm_gengrid_item_custom_size_set),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_custom_size_get, _elm_gengrid_item_custom_size_get),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_show, _elm_gengrid_item_show),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_bring_in, _elm_gengrid_item_bring_in),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_update, _elm_gengrid_item_update),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_fields_update, _elm_gengrid_item_fields_update),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_class_update, _elm_gengrid_item_item_class_update),
EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_all_contents_unset, _elm_gengrid_item_all_contents_unset),
EFL_OBJECT_OP_FUNC(efl_constructor, _elm_gengrid_item_efl_object_constructor),
EFL_OBJECT_OP_FUNC(elm_wdg_item_del_pre, _elm_gengrid_item_elm_widget_item_del_pre),
EFL_OBJECT_OP_FUNC(elm_wdg_item_disable, _elm_gengrid_item_elm_widget_item_disable),
EFL_OBJECT_OP_FUNC(elm_wdg_item_signal_emit, _elm_gengrid_item_elm_widget_item_signal_emit),
EFL_OBJECT_OP_FUNC(elm_wdg_item_focus_set, _elm_gengrid_item_elm_widget_item_item_focus_set),
EFL_OBJECT_OP_FUNC(elm_wdg_item_focus_get, _elm_gengrid_item_elm_widget_item_item_focus_get),
EFL_OBJECT_OP_FUNC(elm_wdg_item_part_text_get, _elm_gengrid_item_elm_widget_item_part_text_get),
EFL_OBJECT_OP_FUNC(elm_wdg_item_part_content_get, _elm_gengrid_item_elm_widget_item_part_content_get),
EFL_OBJECT_OP_FUNC(elm_wdg_item_tooltip_text_set, _elm_gengrid_item_elm_widget_item_tooltip_text_set),
EFL_OBJECT_OP_FUNC(elm_wdg_item_tooltip_style_set, _elm_gengrid_item_elm_widget_item_tooltip_style_set),
EFL_OBJECT_OP_FUNC(elm_wdg_item_tooltip_style_get, _elm_gengrid_item_elm_widget_item_tooltip_style_get),
EFL_OBJECT_OP_FUNC(elm_wdg_item_tooltip_window_mode_set, _elm_gengrid_item_elm_widget_item_tooltip_window_mode_set),
EFL_OBJECT_OP_FUNC(elm_wdg_item_tooltip_window_mode_get, _elm_gengrid_item_elm_widget_item_tooltip_window_mode_get),
EFL_OBJECT_OP_FUNC(elm_wdg_item_tooltip_content_cb_set, _elm_gengrid_item_elm_widget_item_tooltip_content_cb_set),
EFL_OBJECT_OP_FUNC(elm_wdg_item_tooltip_unset, _elm_gengrid_item_elm_widget_item_tooltip_unset),
EFL_OBJECT_OP_FUNC(elm_wdg_item_cursor_set, _elm_gengrid_item_elm_widget_item_cursor_set),
EFL_OBJECT_OP_FUNC(elm_wdg_item_cursor_unset, _elm_gengrid_item_elm_widget_item_cursor_unset),
EFL_OBJECT_OP_FUNC(efl_access_object_i18n_name_get, _elm_gengrid_item_efl_access_object_i18n_name_get),
EFL_OBJECT_OP_FUNC(efl_access_object_state_set_get, _elm_gengrid_item_efl_access_object_state_set_get),
EFL_OBJECT_OP_FUNC(efl_ui_focus_object_setup_order_non_recursive, _elm_gengrid_item_efl_ui_focus_object_setup_order_non_recursive),
EFL_OBJECT_OP_FUNC(efl_ui_focus_object_focus_parent_get, _elm_gengrid_item_efl_ui_focus_object_focus_parent_get),
ELM_GENGRID_ITEM_EXTRA_OPS
);
opsp = &ops;
static const Efl_Object_Property_Reflection refl_table[] = {
{"selected", __eolian_elm_gengrid_item_selected_set_reflect, __eolian_elm_gengrid_item_selected_get_reflect},
{"index", NULL, __eolian_elm_gengrid_item_index_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_gengrid_item_class_desc = {
EO_VERSION,
"Elm.Gengrid.Item",
EFL_CLASS_TYPE_REGULAR,
sizeof(Elm_Gen_Item),
_elm_gengrid_item_class_initializer,
NULL,
NULL
};
EFL_DEFINE_CLASS(elm_gengrid_item_class_get, &_elm_gengrid_item_class_desc, ELM_WIDGET_ITEM_STATIC_FOCUS_CLASS, EFL_UI_FOCUS_OBJECT_MIXIN, EFL_UI_LEGACY_INTERFACE, NULL);
#include "elm_gengrid_item_eo.legacy.c"

View File

@ -0,0 +1,315 @@
#ifndef _ELM_GENGRID_ITEM_EO_H_
#define _ELM_GENGRID_ITEM_EO_H_
#ifndef _ELM_GENGRID_ITEM_EO_CLASS_TYPE
#define _ELM_GENGRID_ITEM_EO_CLASS_TYPE
typedef Eo Elm_Gengrid_Item;
#endif
#ifndef _ELM_GENGRID_ITEM_EO_TYPES
#define _ELM_GENGRID_ITEM_EO_TYPES
#endif
/** Elementary gengrid item class
*
* @ingroup Elm_Gengrid_Item
*/
#define ELM_GENGRID_ITEM_CLASS elm_gengrid_item_class_get()
EWAPI const Efl_Class *elm_gengrid_item_class_get(void);
/**
* @brief Get the previous item in a gengrid widget's internal list of items,
* given a handle to one of those items.
*
* This returns the item placed before the @c item, on the container gengrid.
*
* @param[in] obj The object.
*
* @return The item before @c item, or @c NULL if there's none (and on errors)
*
* @ingroup Elm_Gengrid_Item
*/
EOAPI Elm_Widget_Item *elm_obj_gengrid_item_prev_get(const Eo *obj);
/**
* @brief Get the next item in a gengrid widget's internal list of items, given
* a handle to one of those items.
*
* This returns the item placed after the @c item, on the container gengrid.
*
* @param[in] obj The object.
*
* @return The item after @c item, or @c NULL if there's none (and on errors)
*
* @ingroup Elm_Gengrid_Item
*/
EOAPI Elm_Widget_Item *elm_obj_gengrid_item_next_get(const Eo *obj);
/**
* @brief Control whether a given gengrid item is selected or not
*
* This API returns true for all the items selected in multi-select mode as
* well.
*
* This sets the selected state of an item. If multi-selection is not enabled
* on the containing gengrid and @c selected is true, any other previously
* selected items will get unselected in favor of this new one.
*
* @param[in] obj The object.
* @param[in] selected The selected state ($true selected, @c false not
* selected)
*
* @ingroup Elm_Gengrid_Item
*/
EOAPI void elm_obj_gengrid_item_selected_set(Eo *obj, Eina_Bool selected);
/**
* @brief Control whether a given gengrid item is selected or not
*
* This API returns true for all the items selected in multi-select mode as
* well.
*
* This sets the selected state of an item. If multi-selection is not enabled
* on the containing gengrid and @c selected is true, any other previously
* selected items will get unselected in favor of this new one.
*
* @param[in] obj The object.
*
* @return The selected state ($true selected, @c false not selected)
*
* @ingroup Elm_Gengrid_Item
*/
EOAPI Eina_Bool elm_obj_gengrid_item_selected_get(const Eo *obj);
/**
* @brief Get the Gengrid Item class for the given Gengrid Item.
*
* This returns the Gengrid_Item_Class for the given item. It can be used to
* examine the function pointers and item_style.
*
* @param[in] obj The object.
*
* @return Gengrid Item class for the given item
*
* @ingroup Elm_Gengrid_Item
*/
EOAPI const Elm_Gengrid_Item_Class *elm_obj_gengrid_item_class_get(const Eo *obj);
/**
* @brief Get the index of the item. It is only valid once displayed.
*
* @param[in] obj The object.
*
* @return The position inside the list of item.
*
* @ingroup Elm_Gengrid_Item
*/
EOAPI int elm_obj_gengrid_item_index_get(const Eo *obj);
/**
* @brief Get a given gengrid item's position, relative to the whole gengrid's
* grid area.
*
* This returns the "logical" position of the item within the gengrid. For
* example, $(0, 1) would stand for first row, second column.
*
* @param[in] obj The object.
* @param[out] x Pointer to variable to store the item's <b>row number</b>.
* @param[out] y Pointer to variable to store the item's <b>column number</b>.
*
* @ingroup Elm_Gengrid_Item
*/
EOAPI void elm_obj_gengrid_item_pos_get(const Eo *obj, unsigned int *x, unsigned int *y);
/**
* @brief Control the gengrid item's select mode.
*
* (If getting mode fails, it returns ELM_OBJECT_SELECT_MODE_MAX)
*
* elm_gengrid_select_mode_set() changes item's select mode. -
* ELM_OBJECT_SELECT_MODE_DEFAULT : The item 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 the item entirely and they will neither appear selected
* nor call selected callback functions. - ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY
* : This will apply no-finger-size rule with ELM_OBJECT_SELECT_MODE_NONE.
* No-finger-size rule makes an item can be smaller than lower limit. Clickable
* objects should be bigger than human touch point device (your finger) for
* some touch or small screen devices. So it is enabled, the item can be shrink
* than predefined finger-size value. And the item will be updated.
*
* @param[in] obj The object.
* @param[in] mode The selected mode
*
* @ingroup Elm_Gengrid_Item
*/
EOAPI void elm_obj_gengrid_item_select_mode_set(Eo *obj, Elm_Object_Select_Mode mode);
/**
* @brief Control the gengrid item's select mode.
*
* (If getting mode fails, it returns ELM_OBJECT_SELECT_MODE_MAX)
*
* elm_gengrid_select_mode_set() changes item's select mode. -
* ELM_OBJECT_SELECT_MODE_DEFAULT : The item 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 the item entirely and they will neither appear selected
* nor call selected callback functions. - ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY
* : This will apply no-finger-size rule with ELM_OBJECT_SELECT_MODE_NONE.
* No-finger-size rule makes an item can be smaller than lower limit. Clickable
* objects should be bigger than human touch point device (your finger) for
* some touch or small screen devices. So it is enabled, the item can be shrink
* than predefined finger-size value. And the item will be updated.
*
* @param[in] obj The object.
*
* @return The selected mode
*
* @ingroup Elm_Gengrid_Item
*/
EOAPI Elm_Object_Select_Mode elm_obj_gengrid_item_select_mode_get(const Eo *obj);
/**
* @brief Custom size mode for non-homogeneous gengrid.
*
* Resize dimensions of a gengrid item.
*
* In case of a horizontal grid, only the widths only be resized and in case of
* vertical only the heights can be resized. Item size should be set by
* elm_gengrid_item_size_set() beforehand.
*
* The values set by elm_gengrid_item_size_set() will be used for the dimension
* that remains fixed.
*
* @param[in] obj The object.
* @param[in] w The item's width.
* @param[in] h The item's height.
*
* @since 1.19
*
* @ingroup Elm_Gengrid_Item
*/
EOAPI void elm_obj_gengrid_item_custom_size_set(Eo *obj, int w, int h);
/**
* @brief Custom size mode for non-homogeneous gengrid.
*
* Get the dimensions of a gengrid item.
*
* Gives the dimensions set with elm_gengrid_item_custom_size_set(). If the
* item has not been modified values set with elm_gengrid_item_size_set() are
* obtained.
*
* @param[in] obj The object.
* @param[out] w The item's width.
* @param[out] h The item's height.
*
* @since 1.19
*
* @ingroup Elm_Gengrid_Item
*/
EOAPI void elm_obj_gengrid_item_custom_size_get(const Eo *obj, int *w, int *h);
/**
* @brief Show the portion of a gengrid's internal grid containing a given
* item, immediately.
*
* This causes gengrid to redraw its viewport's contents to the region
* containing the given @c item item, if it is not fully visible.
*
* @param[in] obj The object.
* @param[in] type Where to position the item in the viewport.
*
* @ingroup Elm_Gengrid_Item
*/
EOAPI void elm_obj_gengrid_item_show(Eo *obj, Elm_Gengrid_Item_Scrollto_Type type);
/**
* @brief Animatedly bring in, to the visible area of a gengrid, a given item
* on it.
*
* This causes gengrid to jump to the given @c item and show it (by scrolling),
* if it is not fully visible. This will use animation to do so and take a
* period of time to complete.
*
* @param[in] obj The object.
* @param[in] type Where to position the item in the viewport.
*
* @ingroup Elm_Gengrid_Item
*/
EOAPI void elm_obj_gengrid_item_bring_in(Eo *obj, Elm_Gengrid_Item_Scrollto_Type type);
/**
* @brief Update the contents of a given gengrid item
*
* This updates an item by calling all the item class functions again to get
* the contents, texts and states. Use this when the original item data has
* changed and you want the changes to be reflected.
* @param[in] obj The object.
*
* @ingroup Elm_Gengrid_Item
*/
EOAPI void elm_obj_gengrid_item_update(Eo *obj);
/**
* @brief Update the part of an item
*
* This updates an item's part by calling item's fetching functions again to
* get the contents, texts and states. Use this when the original item data has
* changed and the changes are desired to be reflected. Second parts argument
* is used for globbing to match '*', '?', and '.' It can be used at updating
* multi fields.
*
* Use elm_gengrid_realized_items_update() to update an item's all property.
*
* @param[in] obj The object.
* @param[in] parts The name of item's part
* @param[in] itf The type of item's part type
*
* @since 1.15
*
* @ingroup Elm_Gengrid_Item
*/
EOAPI void elm_obj_gengrid_item_fields_update(Eo *obj, const char *parts, Elm_Gengrid_Item_Field_Type itf);
/**
* @brief Update the item class of a gengrid item.
*
* This sets another class of the item, changing the way that it is displayed.
* After changing the item class, elm_gengrid_item_update() is called on the
* item @c it.
*
* @param[in] obj The object.
* @param[in] itc The gengrid item class describing the function pointers and
* the item style.
*
* @ingroup Elm_Gengrid_Item
*/
EOAPI void elm_obj_gengrid_item_class_update(Eo *obj, const Elm_Gengrid_Item_Class *itc);
/**
* @brief Unset all contents fetched by the item class
*
* This instructs gengrid to release references to contents in the item,
* meaning that they will no longer be managed by gengrid and are floating
* "orphans" that can be re-used elsewhere if the user wants to.
*
* @param[in] obj The object.
* @param[out] l The contents list to return.
*
* @since 1.18
*
* @ingroup Elm_Gengrid_Item
*/
EOAPI void elm_obj_gengrid_item_all_contents_unset(Eo *obj, Eina_List **l);
#endif

View File

@ -0,0 +1,102 @@
EAPI Elm_Widget_Item *
elm_gengrid_item_prev_get(const Elm_Gengrid_Item *obj)
{
return elm_obj_gengrid_item_prev_get(obj);
}
EAPI Elm_Widget_Item *
elm_gengrid_item_next_get(const Elm_Gengrid_Item *obj)
{
return elm_obj_gengrid_item_next_get(obj);
}
EAPI void
elm_gengrid_item_selected_set(Elm_Gengrid_Item *obj, Eina_Bool selected)
{
elm_obj_gengrid_item_selected_set(obj, selected);
}
EAPI Eina_Bool
elm_gengrid_item_selected_get(const Elm_Gengrid_Item *obj)
{
return elm_obj_gengrid_item_selected_get(obj);
}
EAPI const Elm_Gengrid_Item_Class *
elm_gengrid_item_item_class_get(const Elm_Gengrid_Item *obj)
{
return elm_obj_gengrid_item_class_get(obj);
}
EAPI int
elm_gengrid_item_index_get(const Elm_Gengrid_Item *obj)
{
return elm_obj_gengrid_item_index_get(obj);
}
EAPI void
elm_gengrid_item_pos_get(const Elm_Gengrid_Item *obj, unsigned int *x, unsigned int *y)
{
elm_obj_gengrid_item_pos_get(obj, x, y);
}
EAPI void
elm_gengrid_item_select_mode_set(Elm_Gengrid_Item *obj, Elm_Object_Select_Mode mode)
{
elm_obj_gengrid_item_select_mode_set(obj, mode);
}
EAPI Elm_Object_Select_Mode
elm_gengrid_item_select_mode_get(const Elm_Gengrid_Item *obj)
{
return elm_obj_gengrid_item_select_mode_get(obj);
}
EAPI void
elm_gengrid_item_custom_size_set(Elm_Gengrid_Item *obj, int w, int h)
{
elm_obj_gengrid_item_custom_size_set(obj, w, h);
}
EAPI void
elm_gengrid_item_custom_size_get(const Elm_Gengrid_Item *obj, int *w, int *h)
{
elm_obj_gengrid_item_custom_size_get(obj, w, h);
}
EAPI void
elm_gengrid_item_show(Elm_Gengrid_Item *obj, Elm_Gengrid_Item_Scrollto_Type type)
{
elm_obj_gengrid_item_show(obj, type);
}
EAPI void
elm_gengrid_item_bring_in(Elm_Gengrid_Item *obj, Elm_Gengrid_Item_Scrollto_Type type)
{
elm_obj_gengrid_item_bring_in(obj, type);
}
EAPI void
elm_gengrid_item_update(Elm_Gengrid_Item *obj)
{
elm_obj_gengrid_item_update(obj);
}
EAPI void
elm_gengrid_item_fields_update(Elm_Gengrid_Item *obj, const char *parts, Elm_Gengrid_Item_Field_Type itf)
{
elm_obj_gengrid_item_fields_update(obj, parts, itf);
}
EAPI void
elm_gengrid_item_item_class_update(Elm_Gengrid_Item *obj, const Elm_Gengrid_Item_Class *itc)
{
elm_obj_gengrid_item_class_update(obj, itc);
}
EAPI void
elm_gengrid_item_all_contents_unset(Elm_Gengrid_Item *obj, Eina_List **l)
{
elm_obj_gengrid_item_all_contents_unset(obj, l);
}

View File

@ -0,0 +1,308 @@
#ifndef _ELM_GENGRID_ITEM_EO_LEGACY_H_
#define _ELM_GENGRID_ITEM_EO_LEGACY_H_
#ifndef _ELM_GENGRID_ITEM_EO_CLASS_TYPE
#define _ELM_GENGRID_ITEM_EO_CLASS_TYPE
typedef Eo Elm_Gengrid_Item;
#endif
#ifndef _ELM_GENGRID_ITEM_EO_TYPES
#define _ELM_GENGRID_ITEM_EO_TYPES
#endif
/**
* @brief Get the previous item in a gengrid widget's internal list of items,
* given a handle to one of those items.
*
* This returns the item placed before the @c item, on the container gengrid.
*
* @param[in] obj The object.
*
* @return The item before @c item, or @c NULL if there's none (and on errors)
*
* @ingroup Elm_Gengrid_Item_Group
*/
EAPI Elm_Widget_Item *elm_gengrid_item_prev_get(const Elm_Gengrid_Item *obj);
/**
* @brief Get the next item in a gengrid widget's internal list of items, given
* a handle to one of those items.
*
* This returns the item placed after the @c item, on the container gengrid.
*
* @param[in] obj The object.
*
* @return The item after @c item, or @c NULL if there's none (and on errors)
*
* @ingroup Elm_Gengrid_Item_Group
*/
EAPI Elm_Widget_Item *elm_gengrid_item_next_get(const Elm_Gengrid_Item *obj);
/**
* @brief Control whether a given gengrid item is selected or not
*
* This API returns true for all the items selected in multi-select mode as
* well.
*
* This sets the selected state of an item. If multi-selection is not enabled
* on the containing gengrid and @c selected is true, any other previously
* selected items will get unselected in favor of this new one.
*
* @param[in] obj The object.
* @param[in] selected The selected state ($true selected, @c false not
* selected)
*
* @ingroup Elm_Gengrid_Item_Group
*/
EAPI void elm_gengrid_item_selected_set(Elm_Gengrid_Item *obj, Eina_Bool selected);
/**
* @brief Control whether a given gengrid item is selected or not
*
* This API returns true for all the items selected in multi-select mode as
* well.
*
* This sets the selected state of an item. If multi-selection is not enabled
* on the containing gengrid and @c selected is true, any other previously
* selected items will get unselected in favor of this new one.
*
* @param[in] obj The object.
*
* @return The selected state ($true selected, @c false not selected)
*
* @ingroup Elm_Gengrid_Item_Group
*/
EAPI Eina_Bool elm_gengrid_item_selected_get(const Elm_Gengrid_Item *obj);
/**
* @brief Get the Gengrid Item class for the given Gengrid Item.
*
* This returns the Gengrid_Item_Class for the given item. It can be used to
* examine the function pointers and item_style.
*
* @param[in] obj The object.
*
* @return Gengrid Item class for the given item
*
* @ingroup Elm_Gengrid_Item_Group
*/
EAPI const Elm_Gengrid_Item_Class *elm_gengrid_item_item_class_get(const Elm_Gengrid_Item *obj);
/**
* @brief Get the index of the item. It is only valid once displayed.
*
* @param[in] obj The object.
*
* @return The position inside the list of item.
*
* @ingroup Elm_Gengrid_Item_Group
*/
EAPI int elm_gengrid_item_index_get(const Elm_Gengrid_Item *obj);
/**
* @brief Get a given gengrid item's position, relative to the whole gengrid's
* grid area.
*
* This returns the "logical" position of the item within the gengrid. For
* example, $(0, 1) would stand for first row, second column.
*
* @param[in] obj The object.
* @param[out] x Pointer to variable to store the item's <b>row number</b>.
* @param[out] y Pointer to variable to store the item's <b>column number</b>.
*
* @ingroup Elm_Gengrid_Item_Group
*/
EAPI void elm_gengrid_item_pos_get(const Elm_Gengrid_Item *obj, unsigned int *x, unsigned int *y);
/**
* @brief Control the gengrid item's select mode.
*
* (If getting mode fails, it returns ELM_OBJECT_SELECT_MODE_MAX)
*
* elm_gengrid_select_mode_set() changes item's select mode. -
* ELM_OBJECT_SELECT_MODE_DEFAULT : The item 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 the item entirely and they will neither appear selected
* nor call selected callback functions. - ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY
* : This will apply no-finger-size rule with ELM_OBJECT_SELECT_MODE_NONE.
* No-finger-size rule makes an item can be smaller than lower limit. Clickable
* objects should be bigger than human touch point device (your finger) for
* some touch or small screen devices. So it is enabled, the item can be shrink
* than predefined finger-size value. And the item will be updated.
*
* @param[in] obj The object.
* @param[in] mode The selected mode
*
* @ingroup Elm_Gengrid_Item_Group
*/
EAPI void elm_gengrid_item_select_mode_set(Elm_Gengrid_Item *obj, Elm_Object_Select_Mode mode);
/**
* @brief Control the gengrid item's select mode.
*
* (If getting mode fails, it returns ELM_OBJECT_SELECT_MODE_MAX)
*
* elm_gengrid_select_mode_set() changes item's select mode. -
* ELM_OBJECT_SELECT_MODE_DEFAULT : The item 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 the item entirely and they will neither appear selected
* nor call selected callback functions. - ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY
* : This will apply no-finger-size rule with ELM_OBJECT_SELECT_MODE_NONE.
* No-finger-size rule makes an item can be smaller than lower limit. Clickable
* objects should be bigger than human touch point device (your finger) for
* some touch or small screen devices. So it is enabled, the item can be shrink
* than predefined finger-size value. And the item will be updated.
*
* @param[in] obj The object.
*
* @return The selected mode
*
* @ingroup Elm_Gengrid_Item_Group
*/
EAPI Elm_Object_Select_Mode elm_gengrid_item_select_mode_get(const Elm_Gengrid_Item *obj);
/**
* @brief Custom size mode for non-homogeneous gengrid.
*
* Resize dimensions of a gengrid item.
*
* In case of a horizontal grid, only the widths only be resized and in case of
* vertical only the heights can be resized. Item size should be set by
* elm_gengrid_item_size_set() beforehand.
*
* The values set by elm_gengrid_item_size_set() will be used for the dimension
* that remains fixed.
*
* @param[in] obj The object.
* @param[in] w The item's width.
* @param[in] h The item's height.
*
* @since 1.19
*
* @ingroup Elm_Gengrid_Item_Group
*/
EAPI void elm_gengrid_item_custom_size_set(Elm_Gengrid_Item *obj, int w, int h);
/**
* @brief Custom size mode for non-homogeneous gengrid.
*
* Get the dimensions of a gengrid item.
*
* Gives the dimensions set with elm_gengrid_item_custom_size_set(). If the
* item has not been modified values set with elm_gengrid_item_size_set() are
* obtained.
*
* @param[in] obj The object.
* @param[out] w The item's width.
* @param[out] h The item's height.
*
* @since 1.19
*
* @ingroup Elm_Gengrid_Item_Group
*/
EAPI void elm_gengrid_item_custom_size_get(const Elm_Gengrid_Item *obj, int *w, int *h);
/**
* @brief Show the portion of a gengrid's internal grid containing a given
* item, immediately.
*
* This causes gengrid to redraw its viewport's contents to the region
* containing the given @c item item, if it is not fully visible.
*
* @param[in] obj The object.
* @param[in] type Where to position the item in the viewport.
*
* @ingroup Elm_Gengrid_Item_Group
*/
EAPI void elm_gengrid_item_show(Elm_Gengrid_Item *obj, Elm_Gengrid_Item_Scrollto_Type type);
/**
* @brief Animatedly bring in, to the visible area of a gengrid, a given item
* on it.
*
* This causes gengrid to jump to the given @c item and show it (by scrolling),
* if it is not fully visible. This will use animation to do so and take a
* period of time to complete.
*
* @param[in] obj The object.
* @param[in] type Where to position the item in the viewport.
*
* @ingroup Elm_Gengrid_Item_Group
*/
EAPI void elm_gengrid_item_bring_in(Elm_Gengrid_Item *obj, Elm_Gengrid_Item_Scrollto_Type type);
/**
* @brief Update the contents of a given gengrid item
*
* This updates an item by calling all the item class functions again to get
* the contents, texts and states. Use this when the original item data has
* changed and you want the changes to be reflected.
* @param[in] obj The object.
*
* @ingroup Elm_Gengrid_Item_Group
*/
EAPI void elm_gengrid_item_update(Elm_Gengrid_Item *obj);
/**
* @brief Update the part of an item
*
* This updates an item's part by calling item's fetching functions again to
* get the contents, texts and states. Use this when the original item data has
* changed and the changes are desired to be reflected. Second parts argument
* is used for globbing to match '*', '?', and '.' It can be used at updating
* multi fields.
*
* Use elm_gengrid_realized_items_update() to update an item's all property.
*
* @param[in] obj The object.
* @param[in] parts The name of item's part
* @param[in] itf The type of item's part type
*
* @since 1.15
*
* @ingroup Elm_Gengrid_Item_Group
*/
EAPI void elm_gengrid_item_fields_update(Elm_Gengrid_Item *obj, const char *parts, Elm_Gengrid_Item_Field_Type itf);
/**
* @brief Update the item class of a gengrid item.
*
* This sets another class of the item, changing the way that it is displayed.
* After changing the item class, elm_gengrid_item_update() is called on the
* item @c it.
*
* @param[in] obj The object.
* @param[in] itc The gengrid item class describing the function pointers and
* the item style.
*
* @ingroup Elm_Gengrid_Item_Group
*/
EAPI void elm_gengrid_item_item_class_update(Elm_Gengrid_Item *obj, const Elm_Gengrid_Item_Class *itc);
/**
* @brief Unset all contents fetched by the item class
*
* This instructs gengrid to release references to contents in the item,
* meaning that they will no longer be managed by gengrid and are floating
* "orphans" that can be re-used elsewhere if the user wants to.
*
* @param[in] obj The object.
* @param[out] l The contents list to return.
*
* @since 1.18
*
* @ingroup Elm_Gengrid_Item_Group
*/
EAPI void elm_gengrid_item_all_contents_unset(Elm_Gengrid_Item *obj, Eina_List **l);
#endif

View File

@ -275,5 +275,5 @@ EAPI void elm_gengrid_wheel_disabled_set(Evas_Object *obj, Eina_Bool disabled);
*/
EAPI Eina_Bool elm_gengrid_wheel_disabled_get(const Evas_Object *obj);
#include "elm_gengrid_item.eo.legacy.h"
#include "elm_gengrid.eo.legacy.h"
#include "elm_gengrid_item_eo.legacy.h"
#include "elm_gengrid_eo.legacy.h"

View File

@ -1,18 +0,0 @@
class Elm.Gengrid.Pan extends Elm.Pan
{
[[Elementary gengrid pan class]]
legacy_prefix: elm_gengrid_pan;
eo_prefix: elm_obj_gengrid_pan;
event_prefix: elm_gengrid_pan;
implements {
class.constructor;
Efl.Object.destructor;
Efl.Gfx.Entity.position { set; }
Efl.Gfx.Entity.size { set; }
Efl.Canvas.Group.group_calculate;
Elm.Pan.content_size { get; }
Elm.Pan.pos { get; set; }
Elm.Pan.pos_min { get; }
Elm.Pan.pos_max { get; }
}
}

View File

@ -0,0 +1,67 @@
void _elm_gengrid_pan_efl_object_destructor(Eo *obj, Elm_Gengrid_Pan_Data *pd);
void _elm_gengrid_pan_efl_gfx_entity_position_set(Eo *obj, Elm_Gengrid_Pan_Data *pd, Eina_Position2D pos);
void _elm_gengrid_pan_efl_gfx_entity_size_set(Eo *obj, Elm_Gengrid_Pan_Data *pd, Eina_Size2D size);
void _elm_gengrid_pan_efl_canvas_group_group_calculate(Eo *obj, Elm_Gengrid_Pan_Data *pd);
void _elm_gengrid_pan_elm_pan_content_size_get(const Eo *obj, Elm_Gengrid_Pan_Data *pd, int *w, int *h);
void _elm_gengrid_pan_elm_pan_pos_set(Eo *obj, Elm_Gengrid_Pan_Data *pd, int x, int y);
void _elm_gengrid_pan_elm_pan_pos_get(const Eo *obj, Elm_Gengrid_Pan_Data *pd, int *x, int *y);
void _elm_gengrid_pan_elm_pan_pos_min_get(const Eo *obj, Elm_Gengrid_Pan_Data *pd, int *x, int *y);
void _elm_gengrid_pan_elm_pan_pos_max_get(const Eo *obj, Elm_Gengrid_Pan_Data *pd, int *x, int *y);
static Eina_Bool
_elm_gengrid_pan_class_initializer(Efl_Class *klass)
{
const Efl_Object_Ops *opsp = NULL;
const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
#ifndef ELM_GENGRID_PAN_EXTRA_OPS
#define ELM_GENGRID_PAN_EXTRA_OPS
#endif
EFL_OPS_DEFINE(ops,
EFL_OBJECT_OP_FUNC(efl_destructor, _elm_gengrid_pan_efl_object_destructor),
EFL_OBJECT_OP_FUNC(efl_gfx_entity_position_set, _elm_gengrid_pan_efl_gfx_entity_position_set),
EFL_OBJECT_OP_FUNC(efl_gfx_entity_size_set, _elm_gengrid_pan_efl_gfx_entity_size_set),
EFL_OBJECT_OP_FUNC(efl_canvas_group_calculate, _elm_gengrid_pan_efl_canvas_group_group_calculate),
EFL_OBJECT_OP_FUNC(elm_obj_pan_content_size_get, _elm_gengrid_pan_elm_pan_content_size_get),
EFL_OBJECT_OP_FUNC(elm_obj_pan_pos_set, _elm_gengrid_pan_elm_pan_pos_set),
EFL_OBJECT_OP_FUNC(elm_obj_pan_pos_get, _elm_gengrid_pan_elm_pan_pos_get),
EFL_OBJECT_OP_FUNC(elm_obj_pan_pos_min_get, _elm_gengrid_pan_elm_pan_pos_min_get),
EFL_OBJECT_OP_FUNC(elm_obj_pan_pos_max_get, _elm_gengrid_pan_elm_pan_pos_max_get),
ELM_GENGRID_PAN_EXTRA_OPS
);
opsp = &ops;
return efl_class_functions_set(klass, opsp, ropsp);
}
static const Efl_Class_Description _elm_gengrid_pan_class_desc = {
EO_VERSION,
"Elm.Gengrid.Pan",
EFL_CLASS_TYPE_REGULAR,
sizeof(Elm_Gengrid_Pan_Data),
_elm_gengrid_pan_class_initializer,
_elm_gengrid_pan_class_constructor,
NULL
};
EFL_DEFINE_CLASS(elm_gengrid_pan_class_get, &_elm_gengrid_pan_class_desc, ELM_PAN_CLASS, NULL);

View File

@ -0,0 +1,24 @@
#ifndef _ELM_GENGRID_PAN_EO_H_
#define _ELM_GENGRID_PAN_EO_H_
#ifndef _ELM_GENGRID_PAN_EO_CLASS_TYPE
#define _ELM_GENGRID_PAN_EO_CLASS_TYPE
typedef Eo Elm_Gengrid_Pan;
#endif
#ifndef _ELM_GENGRID_PAN_EO_TYPES
#define _ELM_GENGRID_PAN_EO_TYPES
#endif
/** Elementary gengrid pan class
*
* @ingroup Elm_Gengrid_Pan
*/
#define ELM_GENGRID_PAN_CLASS elm_gengrid_pan_class_get()
EWAPI const Efl_Class *elm_gengrid_pan_class_get(void);
#endif

View File

@ -0,0 +1,17 @@
#ifndef _ELM_GENGRID_PAN_EO_LEGACY_H_
#define _ELM_GENGRID_PAN_EO_LEGACY_H_
#ifndef _ELM_GENGRID_PAN_EO_CLASS_TYPE
#define _ELM_GENGRID_PAN_EO_CLASS_TYPE
typedef Eo Elm_Gengrid_Pan;
#endif
#ifndef _ELM_GENGRID_PAN_EO_TYPES
#define _ELM_GENGRID_PAN_EO_TYPES
#endif
#endif

View File

@ -26,7 +26,7 @@
//we need those for legacy compatible code
#include "elm_genlist.eo.h"
#include "elm_gengrid.eo.h"
#include "elm_gengrid_eo.h"
#include "elm_widget_gengrid.h"
#define SEMI_BROKEN_QUICKLAUNCH 1

View File

@ -8,7 +8,7 @@
#include <Elementary.h>
#include "elm_genlist.eo.h"
#include "elm_gengrid.eo.h"
#include "elm_gengrid_eo.h"
#include "elm_priv.h"
#include "efl_ui_focus_composition_adapter.eo.h"

View File

@ -1,8 +1,6 @@
pub_legacy_eo_files = [
'efl_ui_clock_legacy.eo',
'elm_interface_fileselector.eo',
'elm_gengrid.eo',
'elm_gengrid_pan.eo',
'elm_genlist.eo',
'elm_genlist_pan.eo',
'elm_gesture_layer.eo',
@ -29,7 +27,6 @@ pub_legacy_eo_files = [
'elm_index_item.eo',
'elm_widget_item_static_focus.eo',
'elm_genlist_item.eo',
'elm_gengrid_item.eo',
'elm_list_item.eo',
'elm_popup_item.eo',
'elm_ctxpopup_part.eo',
@ -746,6 +743,12 @@ elementary_pub_headers = [
'elm_flipselector_eo.legacy.h',
'elm_flipselector_item_eo.h',
'elm_flipselector_item_eo.legacy.h',
'elm_gengrid_eo.h',
'elm_gengrid_eo.legacy.h',
'elm_gengrid_item_eo.h',
'elm_gengrid_item_eo.legacy.h',
'elm_gengrid_pan_eo.h',
'elm_gengrid_pan_eo.legacy.h',
'elm_hoversel_eo.h',
'elm_hoversel_eo.legacy.h',
'elm_hoversel_item_eo.h',