gengrid_example.c
#include <Elementary.h>
typedef struct _Example_Item
{
const char *path;
} Example_Item;
static const char *imgs[9] =
{
"panel_01.jpg",
"plant_01.jpg",
"rock_01.jpg",
"rock_02.jpg",
"sky_01.jpg",
"sky_02.jpg",
"sky_03.jpg",
"sky_04.jpg",
"wood_01.jpg",
};
static Elm_Gengrid_Item_Class *gic = NULL;
static Evas_Object *before_bt, *after_bt;
/* change layouting mode */
static void
_horizontal_grid(void *data,
Evas_Object *obj,
void *event_info EINA_UNUSED)
{
Evas_Object *grid = data;
elm_gengrid_horizontal_set(grid, elm_check_state_get(obj));
}
/* "always select" callback */
static void
_always_select_change(void *data,
Evas_Object *obj,
void *event_info EINA_UNUSED)
{
Evas_Object *grid = data;
Eina_Bool always = elm_check_state_get(obj);
if (always)
elm_gengrid_select_mode_set(grid, ELM_OBJECT_SELECT_MODE_ALWAYS);
else
elm_gengrid_select_mode_set(grid, ELM_OBJECT_SELECT_MODE_DEFAULT);
printf("\"Always select\" mode for gengrid items is now %s\n",
always ? "on" : "off");
}
/* "bouncing mode" callback */
static void
_bouncing_change(void *data,
Evas_Object *obj,
void *event_info EINA_UNUSED)
{
Evas_Object *grid = data;
Eina_Bool bounce = elm_check_state_get(obj);
elm_scroller_bounce_set(grid, bounce, bounce);
printf("Bouncing effect for gengrid is now %s\n",
bounce ? "on" : "off");
}
/* multi-selection callback */
static void
_multi_change(void *data,
Evas_Object *obj,
void *event_info EINA_UNUSED)
{
Evas_Object *grid = data;
Eina_Bool multi = elm_check_state_get(obj);
elm_gengrid_multi_select_set(grid, multi);
printf("Multi-selection for gengrid is now %s\n",
multi ? "on" : "off");
elm_object_disabled_set(before_bt, multi);
elm_object_disabled_set(after_bt, multi);
if (!multi)
{
Elm_Object_Item *gg_it;
const Eina_List *selected = elm_gengrid_selected_items_get(grid), *l;
EINA_LIST_FOREACH(selected, l, gg_it)
elm_gengrid_item_selected_set(gg_it, EINA_FALSE);
}
}
/* no selection callback */
static void
_no_sel_change(void *data,
Evas_Object *obj,
void *event_info EINA_UNUSED)
{
Evas_Object *grid = data;
Eina_Bool no_sel = elm_check_state_get(obj);
if (no_sel)
elm_gengrid_select_mode_set(grid, ELM_OBJECT_SELECT_MODE_NONE);
else
elm_gengrid_select_mode_set(grid, ELM_OBJECT_SELECT_MODE_DEFAULT);
printf("Selection for gengrid items is now %s\n",
no_sel ? "disabled" : "enabled");
}
/* item selection callback */
static void
_grid_sel(void *data,
Evas_Object *obj EINA_UNUSED,
void *event_info)
{
unsigned int x, y;
Example_Item *it = elm_object_item_data_get(event_info);
elm_gengrid_item_pos_get(event_info, &x, &y);
printf("Item [%p], with data [%p], path %s, at position (%u, %u),"
" has been selected\n", event_info, data, it->path, x, y);
}
/* new item with random path */
static Example_Item *
_item_new(void)
{
Example_Item *it;
it = malloc(sizeof(*it));
it->path = eina_stringshare_add(imgs[rand() % (sizeof(imgs) /
sizeof(imgs[0]))]);
return it;
}
/* "insert before" callback */
static void
_before_bt_clicked(void *data,
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
Example_Item *it;
Evas_Object *grid = data;
Elm_Object_Item *sel;
sel = elm_gengrid_selected_item_get(grid);
if (!sel)
return;
it = _item_new();
elm_gengrid_item_insert_before(grid, gic, it, sel, _grid_sel, NULL);
}
/* "insert after" callback */
static void
_after_bt_clicked(void *data,
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
Example_Item *it;
Evas_Object *grid = data;
Elm_Object_Item *sel;
sel = elm_gengrid_selected_item_get(grid);
if (!sel)
return;
it = _item_new();
elm_gengrid_item_insert_after(grid, gic, it, sel, _grid_sel, NULL);
}
/* prepend an item */
static void
_prepend_bt_clicked(void *data,
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
Example_Item *it;
Evas_Object *grid = data;
it = _item_new();
elm_gengrid_item_prepend(grid, gic, it, _grid_sel, NULL);
}
/* append an item */
static void
_append_bt_clicked(void *data,
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
Evas_Object *grid = data;
Example_Item *it = _item_new();
elm_gengrid_item_append(grid, gic, it, _grid_sel, NULL);
}
/* delete items */
static void
_clear_cb(void *data,
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
elm_gengrid_clear(data);
printf("Clearing the grid!\n");
}
/* bring in 1st item */
static void
_bring_1st_clicked(void *data,
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
Elm_Object_Item *gg_it = elm_gengrid_first_item_get(data);
if (!gg_it) return;
elm_gengrid_item_bring_in(gg_it, ELM_GENGRID_ITEM_SCROLLTO_IN);
}
/* show last item */
static void
_show_last_clicked(void *data,
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
Elm_Object_Item *gg_it = elm_gengrid_last_item_get(data);
if (!gg_it) return;
elm_gengrid_item_show(gg_it, ELM_GENGRID_ITEM_SCROLLTO_IN);
}
/* disable selected item */
static void
_toggle_disabled_cb(void *data,
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
Elm_Object_Item *gg_it = elm_gengrid_selected_item_get(data);
if (!gg_it) return;
elm_gengrid_item_selected_set(gg_it, EINA_FALSE);
elm_object_item_disabled_set(gg_it, EINA_TRUE);
}
/* change items' size */
static void
_size_changed(void *data,
Evas_Object *obj,
void *event_info EINA_UNUSED)
{
Evas_Object *grid = data;
int size = elm_spinner_value_get(obj);
elm_gengrid_item_size_set(grid, size, size);
}
/* item double click callback */
static void
_double_click(void *data EINA_UNUSED,
Evas_Object *obj EINA_UNUSED,
void *event_info)
{
printf("Double click on item with handle %p\n", event_info);
}
/* item long press callback */
static void
_long_pressed(void *data EINA_UNUSED,
Evas_Object *obj EINA_UNUSED,
void *event_info)
{
printf("Long press on item with handle %p\n", event_info);
}
/* label fetching callback */
static char *
_grid_label_get(void *data,
Evas_Object *obj EINA_UNUSED,
const char *part EINA_UNUSED)
{
const Example_Item *it = data;
char buf[256];
snprintf(buf, sizeof(buf), "Photo %s", it->path);
return strdup(buf);
}
/* icon fetching callback */
static Evas_Object *
_grid_content_get(void *data,
Evas_Object *obj,
const char *part)
{
const Example_Item *it = data;
if (!strcmp(part, "elm.swallow.icon"))
{
Evas_Object *icon = elm_bg_add(obj);
char buf[PATH_MAX];
snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(),
it->path);
elm_bg_file_set(icon, buf, NULL);
evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1,
1);
evas_object_show(icon);
return icon;
}
else if (!strcmp(part, "elm.swallow.end"))
{
Evas_Object *ck;
ck = elm_check_add(obj);
evas_object_propagate_events_set(ck, EINA_FALSE);
evas_object_show(ck);
return ck;
}
return NULL;
}
/* state fetching callback */
static Eina_Bool
_grid_state_get(void *data EINA_UNUSED,
Evas_Object *obj EINA_UNUSED,
const char *part EINA_UNUSED)
{
return EINA_FALSE;
}
/* deletion callback */
static void
_grid_del(void *data,
Evas_Object *obj EINA_UNUSED)
{
Example_Item *it = data;
eina_stringshare_del(it->path);
free(it);
}
/* scrolling animation stopped callback */
static void
_grid_scroll_stopped_cb(void *data EINA_UNUSED,
Evas_Object *obj,
void *event_info EINA_UNUSED)
{
int h_pagenumber = 0, v_pagenumber = 0;
elm_scroller_current_page_get(obj, &h_pagenumber, &v_pagenumber);
printf("Grid current horiz page is %d, vert page is %d\n",
h_pagenumber, v_pagenumber);
}
/* items grid horizontal alignment change */
static void
_h_align_change_cb(void *data,
Evas_Object *obj,
void *event_info EINA_UNUSED)
{
double v_align;
double val = elm_slider_value_get(obj);
elm_gengrid_align_get(data, NULL, &v_align);
printf("Setting horizontal alignment to %f\n", val);
elm_gengrid_align_set(data, val, v_align);
}
static void
_v_align_change_cb(void *data,
Evas_Object *obj,
void *event_info EINA_UNUSED)
{
double h_align;
double val = elm_slider_value_get(obj);
elm_gengrid_align_get(data, &h_align, NULL);
printf("Setting vertical alignment to %f\n", val);
elm_gengrid_align_set(data, h_align, val);
}
/* page relative size change */
static void
_page_change_cb(void *data,
Evas_Object *obj,
void *event_info EINA_UNUSED)
{
double val = elm_slider_value_get(obj);
elm_scroller_page_relative_set(data, val, val);
printf("Setting grid page's relative size to %f\n", val);
}
EAPI_MAIN int
elm_main(int argc EINA_UNUSED,
char **argv EINA_UNUSED)
{
Evas_Object *win, *grid, *bx, *hbx_1, *hbx_2, *hbx_3, *bt, *ck, *sl, *sp;
Eina_Bool bounce;
double h, v;
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
elm_app_info_set(elm_main, "elementary", "images");
win = elm_win_util_standard_add("gengrid", "Generic Grid Example");
elm_win_autodel_set(win, EINA_TRUE);
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
evas_object_show(bx);
grid = elm_gengrid_add(win);
elm_gengrid_item_size_set(grid, 150, 150);
evas_object_size_hint_weight_set(grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(grid, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(bx, grid);
evas_object_smart_callback_add(grid, "clicked,double", _double_click, NULL);
evas_object_smart_callback_add(grid, "longpressed", _long_pressed, NULL);
evas_object_show(grid);
hbx_1 = elm_box_add(win);
evas_object_size_hint_weight_set(hbx_1, EVAS_HINT_EXPAND, 0.0);
elm_box_horizontal_set(hbx_1, EINA_TRUE);
elm_box_pack_end(bx, hbx_1);
evas_object_show(hbx_1);
bt = elm_button_add(win);
elm_object_text_set(bt, "Append");
evas_object_smart_callback_add(bt, "clicked", _append_bt_clicked, grid);
elm_box_pack_end(hbx_1, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_object_text_set(bt, "Prepend");
evas_object_smart_callback_add(bt, "clicked", _prepend_bt_clicked, grid);
elm_box_pack_end(hbx_1, bt);
evas_object_show(bt);
before_bt = elm_button_add(win);
elm_object_text_set(before_bt, "Insert before");
evas_object_smart_callback_add(before_bt, "clicked", _before_bt_clicked,
grid);
elm_box_pack_end(hbx_1, before_bt);
evas_object_show(before_bt);
after_bt = elm_button_add(win);
elm_object_text_set(after_bt, "Insert after");
evas_object_smart_callback_add(after_bt, "clicked", _after_bt_clicked, grid);
elm_box_pack_end(hbx_1, after_bt);
evas_object_show(after_bt);
bt = elm_button_add(win);
elm_object_text_set(bt, "Clear");
evas_object_smart_callback_add(bt, "clicked", _clear_cb, grid);
elm_box_pack_end(hbx_1, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_object_text_set(bt, "Bring in 1st");
evas_object_smart_callback_add(bt, "clicked", _bring_1st_clicked, grid);
elm_box_pack_end(hbx_1, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_object_text_set(bt, "Show last");
evas_object_smart_callback_add(bt, "clicked", _show_last_clicked, grid);
elm_box_pack_end(hbx_1, bt);
evas_object_show(bt);
sp = elm_spinner_add(win);
elm_spinner_min_max_set(sp, 10, 1024);
elm_spinner_value_set(sp, 150);
elm_spinner_label_format_set(sp, "Item size: %.0f");
evas_object_smart_callback_add(sp, "changed", _size_changed, grid);
evas_object_size_hint_weight_set(sp, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_pack_end(hbx_1, sp);
evas_object_show(sp);
hbx_2 = elm_box_add(win);
evas_object_size_hint_weight_set(hbx_2, EVAS_HINT_EXPAND, 0.0);
elm_box_horizontal_set(hbx_2, EINA_TRUE);
elm_box_pack_end(bx, hbx_2);
evas_object_show(hbx_2);
bt = elm_button_add(win);
elm_object_text_set(bt, "Disable item");
evas_object_smart_callback_add(bt, "clicked", _toggle_disabled_cb, grid);
elm_box_pack_end(hbx_2, bt);
evas_object_show(bt);
ck = elm_check_add(win);
elm_object_text_set(ck, "Horizontal mode");
evas_object_smart_callback_add(ck, "changed", _horizontal_grid, grid);
elm_box_pack_end(hbx_2, ck);
evas_object_show(ck);
ck = elm_check_add(win);
elm_object_text_set(ck, "Always select");
evas_object_smart_callback_add(ck, "changed", _always_select_change, grid);
elm_box_pack_end(hbx_2, ck);
evas_object_show(ck);
ck = elm_check_add(win);
elm_scroller_bounce_get(grid, &bounce, NULL);
elm_object_text_set(ck, "Bouncing");
elm_check_state_set(ck, bounce);
evas_object_smart_callback_add(ck, "changed", _bouncing_change, grid);
elm_box_pack_end(hbx_2, ck);
evas_object_show(ck);
ck = elm_check_add(win);
elm_object_text_set(ck, "Multi-selection");
elm_check_state_set(ck, elm_gengrid_multi_select_get(grid));
evas_object_smart_callback_add(ck, "changed", _multi_change, grid);
elm_box_pack_end(hbx_2, ck);
evas_object_show(ck);
ck = elm_check_add(win);
elm_object_text_set(ck, "No selection");
evas_object_smart_callback_add(ck, "changed", _no_sel_change, grid);
elm_box_pack_end(hbx_2, ck);
evas_object_show(ck);
hbx_3 = elm_box_add(win);
evas_object_size_hint_weight_set(hbx_3, EVAS_HINT_EXPAND, 0.0);
elm_box_horizontal_set(hbx_3, EINA_TRUE);
elm_box_pack_end(bx, hbx_3);
evas_object_show(hbx_3);
elm_gengrid_align_get(grid, &h, &v);
evas_object_smart_callback_add(grid, "scroll,anim,stop", _grid_scroll_stopped_cb, NULL);
sl = elm_slider_add(win);
elm_object_text_set(sl, "Horiz. alignment");
elm_slider_span_size_set(sl, 100);
evas_object_size_hint_align_set(sl, 0.5, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(sl, 0.0, EVAS_HINT_EXPAND);
elm_slider_indicator_format_set(sl, "%1.1f");
elm_slider_value_set(sl, h);
elm_box_pack_end(hbx_3, sl);
evas_object_show(sl);
evas_object_smart_callback_add(sl, "changed", _h_align_change_cb, grid);
sl = elm_slider_add(win);
elm_object_text_set(sl, "Vert. alignment");
elm_slider_span_size_set(sl, 100);
evas_object_size_hint_align_set(sl, 0.5, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(sl, 0.0, EVAS_HINT_EXPAND);
elm_slider_indicator_format_set(sl, "%1.1f");
elm_slider_value_set(sl, v);
elm_box_pack_end(hbx_3, sl);
evas_object_show(sl);
evas_object_smart_callback_add(sl, "changed", _v_align_change_cb, grid);
elm_gengrid_align_get(grid, &h, &v);
sl = elm_slider_add(win);
elm_object_text_set(sl, "Page rel. size");
elm_slider_span_size_set(sl, 100);
evas_object_size_hint_align_set(sl, 0.5, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(sl, 0.0, EVAS_HINT_EXPAND);
elm_slider_indicator_format_set(sl, "%1.1f");
elm_slider_value_set(sl, h);
elm_box_pack_end(hbx_3, sl);
evas_object_show(sl);
_page_change_cb(grid, sl, NULL);
evas_object_smart_callback_add(sl, "changed", _page_change_cb, grid);
if (!gic)
{
gic = elm_gengrid_item_class_new();
gic->item_style = "default";
gic->func.text_get = _grid_label_get;
gic->func.content_get = _grid_content_get;
gic->func.state_get = _grid_state_get;
gic->func.del = _grid_del;
} // we only create the first time its needed. we dont unref/free
_append_bt_clicked(grid, NULL, NULL);
_append_bt_clicked(grid, NULL, NULL);
_append_bt_clicked(grid, NULL, NULL);
evas_object_resize(win, 600, 600);
evas_object_show(win);
elm_run();
return 0;
}
ELM_MAIN()
EVAS_HINT_EXPAND
#define EVAS_HINT_EXPAND
Use with evas_object_size_hint_weight_set(), evas_object_size_hint_weight_get(), evas_object_size_hin...
Definition Evas_Common.h:297
EVAS_ASPECT_CONTROL_VERTICAL
@ EVAS_ASPECT_CONTROL_VERTICAL
Use all vertical container space to place an object, using the given aspect.
Definition Evas_Common.h:377
EVAS_HINT_FILL
#define EVAS_HINT_FILL
Use with evas_object_size_hint_align_set(), evas_object_size_hint_align_get(), evas_object_size_hint_...
Definition Evas_Common.h:298
Eina_List
struct _Eina_List Eina_List
Type for a generic double linked list.
Definition eina_list.h:304
EINA_LIST_FOREACH
#define EINA_LIST_FOREACH(list, l, _data)
Definition for the macro to iterate over a list.
Definition eina_list.h:1415
eina_stringshare_add
EINA_API Eina_Stringshare * eina_stringshare_add(const char *str)
Retrieves an instance of a string for use in a program.
Definition eina_stringshare.c:606
eina_stringshare_del
EINA_API void eina_stringshare_del(Eina_Stringshare *str)
Notes that the given string has lost an instance.
Definition eina_stringshare.c:533
EINA_TRUE
#define EINA_TRUE
boolean value TRUE (numerical value 1)
Definition eina_types.h:539
EINA_FALSE
#define EINA_FALSE
boolean value FALSE (numerical value 0)
Definition eina_types.h:533
Eina_Bool
unsigned char Eina_Bool
Type to mimic a boolean.
Definition eina_types.h:527
EINA_UNUSED
#define EINA_UNUSED
Used to indicate that a function parameter is purposely unused.
Definition eina_types.h:339
elm_app_info_set
void elm_app_info_set(void *mainfunc, const char *dom, const char *checkfile)
Re-locate the application somewhere else after compilation, if the developer wishes for easier distri...
Definition elm_main.c:496
elm_app_data_dir_get
const char * elm_app_data_dir_get(void)
Get the application's run time data prefix directory, as set by elm_app_info_set() and the way (envir...
Definition elm_main.c:586
elm_bg_file_set
Eina_Bool elm_bg_file_set(Eo *obj, const char *file, const char *group)
Sets the file (image or edje collection) to give life for the background.
Definition efl_ui_bg.c:188
elm_bg_add
Evas_Object * elm_bg_add(Evas_Object *parent)
Adds a new background to the parent.
Definition efl_ui_bg.c:304
elm_box_horizontal_set
void elm_box_horizontal_set(Elm_Box *obj, Eina_Bool horizontal)
Set the horizontal orientation.
Definition elm_box_eo.legacy.c:27
elm_box_add
Evas_Object * elm_box_add(Evas_Object *parent)
Add a new box to the parent.
Definition elm_box.c:363
elm_box_pack_end
void elm_box_pack_end(Elm_Box *obj, Efl_Canvas_Object *subobj)
Add an object at the end of the pack list.
Definition elm_box_eo.legacy.c:57
elm_button_add
Evas_Object * elm_button_add(Evas_Object *parent)
Add a new button to the parent's canvas.
Definition efl_ui_button.c:459
elm_check_state_get
Eina_Bool elm_check_state_get(const Evas_Object *obj)
Get the state of the check object.
Definition efl_ui_check.c:381
elm_check_add
Evas_Object * elm_check_add(Evas_Object *parent)
Add a new Check object.
Definition efl_ui_check.c:516
elm_check_state_set
void elm_check_state_set(Evas_Object *obj, Eina_Bool state)
Set the on/off state of the check object.
Definition efl_ui_check.c:372
elm_object_item_disabled_set
void elm_object_item_disabled_set(Elm_Widget_Item *obj, Eina_Bool disable)
Control the disabled state of a widget item.
Definition elm_widget_item_eo.legacy.c:111
ELM_MAIN
#define ELM_MAIN()
macro to be used after the elm_main() function
Definition elm_general.h:556
elm_object_item_data_get
void * elm_object_item_data_get(const Elm_Object_Item *it)
Get the data associated with an object item.
Definition efl_ui_widget.c:3796
elm_object_disabled_set
void elm_object_disabled_set(Evas_Object *obj, Eina_Bool disabled)
Set the disabled state of an Elementary object.
Definition elm_main.c:1613
elm_policy_set
Eina_Bool elm_policy_set(unsigned int policy, int value)
Set a new policy's value (for a given policy group/identifier).
Definition elm_main.c:1380
Elm_Object_Item
Eo Elm_Object_Item
An Elementary Object item handle.
Definition elm_object_item.h:6
elm_run
void elm_run(void)
Run Elementary's main loop.
Definition elm_main.c:1357
ELM_POLICY_QUIT_LAST_WINDOW_CLOSED
@ ELM_POLICY_QUIT_LAST_WINDOW_CLOSED
quit when the application's last window is closed
Definition elm_general.h:248
ELM_OBJECT_SELECT_MODE_NONE
@ ELM_OBJECT_SELECT_MODE_NONE
no select mode.
Definition elm_general.h:43
ELM_OBJECT_SELECT_MODE_DEFAULT
@ ELM_OBJECT_SELECT_MODE_DEFAULT
default select mode.
Definition elm_general.h:34
ELM_OBJECT_SELECT_MODE_ALWAYS
@ ELM_OBJECT_SELECT_MODE_ALWAYS
always select mode.
Definition elm_general.h:39
ELM_POLICY_QUIT
@ ELM_POLICY_QUIT
under which circumstances the application should quit automatically.
Definition elm_general.h:227
elm_gengrid_item_append
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)
Append a new item in a given gengrid widget.
Definition elm_gengrid_eo.legacy.c:189
elm_gengrid_item_insert_before
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)
Insert an item before another in a gengrid widget.
Definition elm_gengrid_eo.legacy.c:159
elm_gengrid_align_get
void elm_gengrid_align_get(const Elm_Gengrid *obj, double *align_x, double *align_y)
Get the items grid's alignment values within a given gengrid widget.
Definition elm_gengrid_eo.legacy.c:9
elm_gengrid_multi_select_set
void elm_gengrid_multi_select_set(Elm_Gengrid *obj, Eina_Bool multi)
Enable or disable multi-selection in a given gengrid widget.
Definition elm_gengrid_eo.legacy.c:27
elm_gengrid_selected_items_get
const Eina_List * elm_gengrid_selected_items_get(const Elm_Gengrid *obj)
Get a list of selected items in a given gengrid.
Definition elm_gengrid_eo.legacy.c:147
elm_gengrid_add
Evas_Object * elm_gengrid_add(Evas_Object *parent)
Add a new gengrid widget to the given parent Elementary (container) object.
Definition elm_gengrid.c:4254
elm_gengrid_first_item_get
Elm_Widget_Item * elm_gengrid_first_item_get(const Elm_Gengrid *obj)
Get the first item in a given gengrid widget.
Definition elm_gengrid_eo.legacy.c:141
elm_gengrid_align_set
void elm_gengrid_align_set(Elm_Gengrid *obj, double align_x, double align_y)
Set the items grid's alignment within a given gengrid widget.
Definition elm_gengrid_eo.legacy.c:3
elm_gengrid_select_mode_set
void elm_gengrid_select_mode_set(Elm_Gengrid *obj, Elm_Object_Select_Mode mode)
Set the gengrid select mode.
Definition elm_gengrid_eo.legacy.c:51
elm_gengrid_multi_select_get
Eina_Bool elm_gengrid_multi_select_get(const Elm_Gengrid *obj)
Get whether multi-selection is enabled or disabled for a given gengrid widget.
Definition elm_gengrid_eo.legacy.c:33
elm_gengrid_item_insert_after
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)
Insert an item after another in a gengrid widget.
Definition elm_gengrid_eo.legacy.c:171
elm_gengrid_last_item_get
Elm_Widget_Item * elm_gengrid_last_item_get(const Elm_Gengrid *obj)
Get the last item in a given gengrid widget.
Definition elm_gengrid_eo.legacy.c:153
elm_gengrid_item_prepend
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)
Prepend a new item in a given gengrid widget.
Definition elm_gengrid_eo.legacy.c:195
elm_gengrid_horizontal_set
void elm_gengrid_horizontal_set(Elm_Gengrid *obj, Eina_Bool horizontal)
Set the direction in which a given gengrid widget will expand while placing its items.
Definition elm_gengrid_eo.legacy.c:117
elm_gengrid_item_pos_get
void elm_gengrid_item_pos_get(const Elm_Object_Item *it, unsigned int *x, unsigned int *y)
Get a given gengrid item's position, relative to the whole gengrid's grid area.
Definition elm_gengrid_item_eo.legacy.c:39
elm_gengrid_item_class_new
Elm_Gengrid_Item_Class * elm_gengrid_item_class_new(void)
Add a new gengrid item class in a given gengrid widget.
Definition elm_gengrid.c:5409
elm_gengrid_item_size_set
void elm_gengrid_item_size_set(Elm_Gengrid *obj, int w, int h)
Set the size for the items of a given gengrid widget.
Definition elm_gengrid_eo.legacy.c:93
elm_gengrid_clear
void elm_gengrid_clear(Elm_Gengrid *obj)
Remove all items from a given gengrid widget.
Definition elm_gengrid_eo.legacy.c:201
elm_gengrid_selected_item_get
Elm_Widget_Item * elm_gengrid_selected_item_get(const Elm_Gengrid *obj)
Get the selected item in a given gengrid widget.
Definition elm_gengrid_eo.legacy.c:129
elm_gengrid_item_bring_in
void elm_gengrid_item_bring_in(Elm_Gengrid_Item *obj, Elm_Gengrid_Item_Scrollto_Type type)
Animatedly bring in, to the visible area of a gengrid, a given item on it.
Definition elm_gengrid_item_eo.legacy.c:75
elm_gengrid_item_show
void elm_gengrid_item_show(Elm_Gengrid_Item *obj, Elm_Gengrid_Item_Scrollto_Type type)
Show the portion of a gengrid's internal grid containing a given item, immediately.
Definition elm_gengrid_item_eo.legacy.c:69
elm_gengrid_item_selected_set
void elm_gengrid_item_selected_set(Elm_Gengrid_Item *obj, Eina_Bool selected)
Control whether a given gengrid item is selected or not.
Definition elm_gengrid_item_eo.legacy.c:15
ELM_GENGRID_ITEM_SCROLLTO_IN
@ ELM_GENGRID_ITEM_SCROLLTO_IN
To the nearest viewport.
Definition elm_general.h:397
elm_scroller_page_relative_set
void elm_scroller_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel)
Set scroll page size relative to viewport size.
Definition elm_scroller.c:1070
elm_scroller_current_page_get
void elm_scroller_current_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber)
Get scroll current page number.
Definition elm_scroller.c:1138
elm_scroller_bounce_set
void elm_scroller_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
Set bouncing behavior.
Definition elm_scroller.c:1050
elm_scroller_bounce_get
void elm_scroller_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce)
Get the bounce behaviour.
Definition elm_scroller.c:1060
elm_slider_value_get
double elm_slider_value_get(const Evas_Object *obj)
Get the value displayed by the slider.
Definition elm_slider.c:1531
elm_slider_add
Evas_Object * elm_slider_add(Evas_Object *parent)
Add a new slider widget to the given parent Elementary (container) object.
Definition elm_slider.c:1437
elm_slider_value_set
void elm_slider_value_set(Evas_Object *obj, double val)
Set the value the slider displays.
Definition elm_slider.c:1517
elm_slider_indicator_format_set
void elm_slider_indicator_format_set(Evas_Object *obj, const char *indicator)
Set the format string for the indicator label.
Definition elm_slider.c:1740
elm_slider_span_size_set
void elm_slider_span_size_set(Evas_Object *obj, Evas_Coord size)
Set the (exact) length of the bar region of a given slider widget.
Definition elm_slider.c:1444
elm_spinner_value_get
double elm_spinner_value_get(const Evas_Object *obj)
Control the value the spinner displays.
Definition elm_spinner.c:1387
elm_spinner_add
Evas_Object * elm_spinner_add(Evas_Object *parent)
Add a new spinner widget to the given parent Elementary (container) object.
Definition elm_spinner.c:1350
elm_spinner_label_format_set
void elm_spinner_label_format_set(Elm_Spinner *obj, const char *fmt)
Control the format string of the displayed label.
Definition elm_spinner_eo.legacy.c:63
elm_spinner_min_max_set
void elm_spinner_min_max_set(Evas_Object *obj, double min, double max)
Control the minimum and maximum values for the spinner.
Definition elm_spinner.c:1357
elm_spinner_value_set
void elm_spinner_value_set(Evas_Object *obj, double val)
Control the value the spinner displays.
Definition elm_spinner.c:1381
elm_win_util_standard_add
Evas_Object * elm_win_util_standard_add(const char *name, const char *title)
Adds a window object with standard setup.
Definition efl_ui_win.c:9587
elm_win_resize_object_add
void elm_win_resize_object_add(Eo *obj, Evas_Object *subobj)
Add subobj as a resize object of window obj.
Definition efl_ui_win.c:9002
elm_win_autodel_set
void elm_win_autodel_set(Eo *obj, Eina_Bool autodel)
Set the window's autodel state.
Definition efl_ui_win.c:6199
evas_object_show
EVAS_API void evas_object_show(Evas_Object *eo_obj)
Makes the given Evas object visible.
Definition evas_object_main.c:1814
evas_object_size_hint_weight_set
EVAS_API void evas_object_size_hint_weight_set(Evas_Object *obj, double x, double y)
Sets the hints for an object's weight.
Definition evas_object_main.c:2638
evas_object_size_hint_align_set
EVAS_API void evas_object_size_hint_align_set(Evas_Object *obj, double x, double y)
Sets the hints for an object's alignment.
Definition evas_object_main.c:2650
evas_object_size_hint_aspect_set
EVAS_API void evas_object_size_hint_aspect_set(Evas_Object *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h)
Sets the hints for an object's aspect ratio.
Definition evas_object_main.c:2581
Evas_Object
Efl_Canvas_Object Evas_Object
An Evas Object handle.
Definition Evas_Common.h:185
evas_object_resize
EVAS_API void evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
Changes the size of the given Evas object.
Definition evas_object_main.c:1236
evas_object_propagate_events_set
EVAS_API void evas_object_propagate_events_set(Efl_Canvas_Object *obj, Eina_Bool propagate)
Set whether events on a smart object's member should be propagated up to its parent.
Definition efl_canvas_object_eo.legacy.c:63
evas_object_smart_callback_add
EVAS_API void evas_object_smart_callback_add(Evas_Object *eo_obj, const char *event, Evas_Smart_Cb func, const void *data)
Add (register) a callback function to the smart event specified by event on the smart object obj.
Definition evas_object_smart.c:1040
_Elm_Gen_Item_Class_Functions::state_get
Elm_Gen_Item_State_Get_Cb state_get
State fetching class function for genlist/gengrid item classes.
Definition elm_gen.h:101
_Elm_Gen_Item_Class_Functions::del
Elm_Gen_Item_Del_Cb del
Deletion class function for genlist/gengrid item classes.
Definition elm_gen.h:102
_Elm_Gen_Item_Class_Functions::content_get
Elm_Gen_Item_Content_Get_Cb content_get
Content fetching class function for genlist/gengrid item classes.
Definition elm_gen.h:100
_Elm_Gen_Item_Class_Functions::text_get
Elm_Gen_Item_Text_Get_Cb text_get
Text fetching class function for genlist/gengrid item classes.
Definition elm_gen.h:99
_Elm_Gen_Item_Class::func
Elm_Gen_Item_Class_Functions func
Set of callbacks.
Definition elm_gen.h:126
_Elm_Gen_Item_Class::item_style
const char * item_style
Name of the visual style to use for this item.
Definition elm_gen.h:118