forked from enlightenment/efl
Elementary: Diskselector documentation
SVN revision: 61416
This commit is contained in:
parent
a2ad0ab50e
commit
ff07752d57
|
@ -32,6 +32,10 @@
|
||||||
* @ref calendar_example_06
|
* @ref calendar_example_06
|
||||||
*
|
*
|
||||||
* @ref clock_example
|
* @ref clock_example
|
||||||
|
|
||||||
|
* @ref diskselector_example_01
|
||||||
|
*
|
||||||
|
* @ref diskselector_example_02
|
||||||
*
|
*
|
||||||
* @ref flipselector_example
|
* @ref flipselector_example
|
||||||
*
|
*
|
||||||
|
@ -1423,6 +1427,212 @@
|
||||||
* @example clock_example.c
|
* @example clock_example.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @page diskselector_example_01 Diskselector widget example
|
||||||
|
*
|
||||||
|
* This code places 4 Elementary diskselector widgets on a window, each of
|
||||||
|
* them exemplifying a part of the widget's API.
|
||||||
|
*
|
||||||
|
* All of them will have weekdays as items, since we won't focus
|
||||||
|
* on items management on this example. For an example about this subject,
|
||||||
|
* check @ref diskselector_example_02.
|
||||||
|
*
|
||||||
|
* The first of them is a default diskselector.
|
||||||
|
* @dontinclude diskselector_example_01.c
|
||||||
|
* @skipline lbl
|
||||||
|
* @until }
|
||||||
|
* @skipline elm_diskselector_add
|
||||||
|
* @until evas_object_show
|
||||||
|
*
|
||||||
|
* We are just adding the diskselector, so as you can see, defaults for it are:
|
||||||
|
* @li Only 3 items visible each time.
|
||||||
|
* @li Only 3 characters are displayed for labels on side positions.
|
||||||
|
* @li The first added item remains centeres, i.e., it's the selected item.
|
||||||
|
*
|
||||||
|
* To add items, we are just appending it on a loop, using function
|
||||||
|
* elm_diskselector_item_append(), that will be better exaplained on
|
||||||
|
* items management example.
|
||||||
|
*
|
||||||
|
* For a circular diskselector, check the second widget. A circular
|
||||||
|
* diskselector will display first item after last, and last previous to
|
||||||
|
* the first one. So, as you can see, @b Sa will appears on left side
|
||||||
|
* of selected @b Sunday. This property is set with
|
||||||
|
* elm_diskselector_round_set().
|
||||||
|
*
|
||||||
|
* Also, we decide to display only 2 character for side labels, instead of 3.
|
||||||
|
* For this we call elm_diskselector_side_label_length_set(). As result,
|
||||||
|
* we'll see @b Mo displayed instead of @b Mon, when @b Monday is on a
|
||||||
|
* side position.
|
||||||
|
*
|
||||||
|
* @skipline elm_diskselector_add
|
||||||
|
* @until evas_object_show
|
||||||
|
*
|
||||||
|
* But so far, we are only displaying 3 items at once. If more are wanted,
|
||||||
|
* is enough to call elm_diskselector_display_item_num_set(), as you can
|
||||||
|
* see here:
|
||||||
|
* @skipline elm_diskselector_add
|
||||||
|
* @until evas_object_show
|
||||||
|
*
|
||||||
|
* @note You can't set less than 3 items to be displayed.
|
||||||
|
*
|
||||||
|
* Finally, if a bounce effect is required, or you would like to see
|
||||||
|
* scrollbars, it is possible. But, for default theme, diskselector
|
||||||
|
* scrollbars will be invisible anyway.
|
||||||
|
* @skipline elm_diskselector_add
|
||||||
|
* @until evas_object_show
|
||||||
|
*
|
||||||
|
* See the full @ref diskselector_example_01.c "diskselector_example_01.c"
|
||||||
|
* code, whose window should look like this picture:
|
||||||
|
* @image html screenshots/diskselector_example_01.png
|
||||||
|
* @image latex screenshots/diskselector_example_01.eps
|
||||||
|
*
|
||||||
|
* @example diskselector_example_01.c
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @page diskselector_example_02 Diskselector - Items management
|
||||||
|
*
|
||||||
|
* This code places a Elementary diskselector widgets on a window,
|
||||||
|
* along with some buttons trigerring actions on it (though its API).
|
||||||
|
* It covers most of Elm_Diskselector_Item functions.
|
||||||
|
*
|
||||||
|
* On our @c main function, we are adding a default diskselector with
|
||||||
|
* 3 items. We are only setting their labels (second parameter of function
|
||||||
|
* elm_diskselector_item_append):
|
||||||
|
* @dontinclude diskselector_example_02.c
|
||||||
|
* @skipline elm_diskselector_add
|
||||||
|
* @until Item 2
|
||||||
|
*
|
||||||
|
* Next we are adding lots of buttons, each one for a callback function
|
||||||
|
* that will realize a task covering part of diskselector items API.
|
||||||
|
* Lets check the first one:
|
||||||
|
* @skipline elm_button_add
|
||||||
|
* @until evas_object_show
|
||||||
|
*
|
||||||
|
* We are labeling the button with a task description with
|
||||||
|
* elm_object_text_set() and setting a callback
|
||||||
|
* function evas_object_smart_callback_add().
|
||||||
|
* Each callback function will have the signature:
|
||||||
|
* <tt> static void _task_cb(void *data, Evas_Object *obj,
|
||||||
|
* void *event_info)</tt> with the function name varying for each task.
|
||||||
|
*
|
||||||
|
* Now let's cover all of them.
|
||||||
|
*
|
||||||
|
* <b> Appending an item: </b>
|
||||||
|
* @dontinclude diskselector_example_02.c
|
||||||
|
* @skipline _add_cb
|
||||||
|
* @until }
|
||||||
|
*
|
||||||
|
* All items are included on diskselector after last one. You @b can't
|
||||||
|
* preprend items.
|
||||||
|
*
|
||||||
|
* The first parameter of elm_diskselector_item_append() is the diskselector
|
||||||
|
* object, that we are receiving as data on our callback function.
|
||||||
|
* The second one is a label, the string that will be placed in the center
|
||||||
|
* of our item. As we don't wan't icons or callback functions, we can
|
||||||
|
* send NULL as third, fourth and fifth parameters.
|
||||||
|
*
|
||||||
|
* <b> Appending an item with icon: </b>
|
||||||
|
* @dontinclude diskselector_example_02.c
|
||||||
|
* @skipline _add_ic_cb
|
||||||
|
* @until }
|
||||||
|
*
|
||||||
|
* If an icon is required, you can pass it as third paramenter on our
|
||||||
|
* elm_diskselector_item_append() function. It will be place on the
|
||||||
|
* left side of item's label, that will be shifted to right a bit.
|
||||||
|
*
|
||||||
|
* For more details about how to create icons, look for elm_icon examples.
|
||||||
|
*
|
||||||
|
* <b> Appending an item with callback function for selected: </b>
|
||||||
|
* @dontinclude diskselector_example_02.c
|
||||||
|
* @skipline _sel_cb
|
||||||
|
* @until }
|
||||||
|
* @until }
|
||||||
|
*
|
||||||
|
* To set a callback function that will be called every time an item is
|
||||||
|
* selected, i.e., everytime the diskselector stops with this item in
|
||||||
|
* center position, just pass the function as fourth paramenter.
|
||||||
|
*
|
||||||
|
* <b> Appending an item with callback function for selected with data: </b>
|
||||||
|
* @dontinclude diskselector_example_02.c
|
||||||
|
* @skipline _sel_data_cb
|
||||||
|
* @until }
|
||||||
|
* @until }
|
||||||
|
* @until }
|
||||||
|
* @until }
|
||||||
|
*
|
||||||
|
* If the callback function request an extra data, it can be attached to our
|
||||||
|
* item passing a pointer for data as fifth parameter.
|
||||||
|
* Our function _sel_data_cb will receive it as <tt> void *data </tt>.
|
||||||
|
*
|
||||||
|
* If you want to free this data, or handle that the way you need when the
|
||||||
|
* item is deleted, set a callback function for that, with
|
||||||
|
* elm_diskselector_item_del_cb_set().
|
||||||
|
*
|
||||||
|
* As you can see we check if @c it is not @c NULL after appending it.
|
||||||
|
* If an error happens, we won't try to set a function for it.
|
||||||
|
*
|
||||||
|
* <b> Deleting an item: </b>
|
||||||
|
* @dontinclude diskselector_example_02.c
|
||||||
|
* @skip _del_cb
|
||||||
|
* @skipline _del_cb
|
||||||
|
* @until }
|
||||||
|
*
|
||||||
|
* To delete an item we simple need to call elm_diskselector_item_del() with
|
||||||
|
* a pointer for such item.
|
||||||
|
*
|
||||||
|
* If you need, you can get selected item with
|
||||||
|
* elm_diskselector_selected_item_get(), that will return a pointer for it.
|
||||||
|
*
|
||||||
|
* <b> Unselecting an item: </b>
|
||||||
|
* @dontinclude diskselector_example_02.c
|
||||||
|
* @skipline _unselect_cb
|
||||||
|
* @until }
|
||||||
|
*
|
||||||
|
* To select an item, you should call elm_diskselector_item_selected_set()
|
||||||
|
* passing @c EINA_TRUE, and to unselect it, @c EINA_FALSE.
|
||||||
|
*
|
||||||
|
* If you unselect the selected item, diskselector will automatically select
|
||||||
|
* the first item.
|
||||||
|
*
|
||||||
|
* <b> Printing all items: </b>
|
||||||
|
* @dontinclude diskselector_example_02.c
|
||||||
|
* @skipline _print_cb
|
||||||
|
* @until }
|
||||||
|
*
|
||||||
|
* <b> Clearing the diskselector: </b>
|
||||||
|
* @dontinclude diskselector_example_02.c
|
||||||
|
* @skipline _clear_cb
|
||||||
|
* @until }
|
||||||
|
*
|
||||||
|
* <b> Selecting the first item: </b>
|
||||||
|
* @dontinclude diskselector_example_02.c
|
||||||
|
* @skipline _select_first_cb
|
||||||
|
* @until }
|
||||||
|
*
|
||||||
|
* <b> Selecting the last item: </b>
|
||||||
|
* @dontinclude diskselector_example_02.c
|
||||||
|
* @skipline _select_last_cb
|
||||||
|
* @until }
|
||||||
|
*
|
||||||
|
* <b> Selecting the next item: </b>
|
||||||
|
* @dontinclude diskselector_example_02.c
|
||||||
|
* @skipline _select_next_cb
|
||||||
|
* @until }
|
||||||
|
*
|
||||||
|
* <b> Selecting the previous item: </b>
|
||||||
|
* @dontinclude diskselector_example_02.c
|
||||||
|
* @skipline _select_prev_cb
|
||||||
|
* @until }
|
||||||
|
*
|
||||||
|
* See the full @ref diskselector_example_02.c "diskselector_example_02.c"
|
||||||
|
* code, whose window should look like this picture:
|
||||||
|
* @image html screenshots/diskselector_example_02.png
|
||||||
|
* @image latex screenshots/diskselector_example_02.eps
|
||||||
|
*
|
||||||
|
* @example diskselector_example_02.c
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @page flipselector_example Flip selector widget example
|
* @page flipselector_example Flip selector widget example
|
||||||
*
|
*
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
|
@ -62,6 +62,8 @@ SRCS = \
|
||||||
fileselector_example.c \
|
fileselector_example.c \
|
||||||
fileselector_button_example.c \
|
fileselector_button_example.c \
|
||||||
fileselector_entry_example.c \
|
fileselector_entry_example.c \
|
||||||
|
diskselector_example_01.c \
|
||||||
|
diskselector_example_02.c \
|
||||||
theme_example.edc
|
theme_example.edc
|
||||||
|
|
||||||
pkglib_PROGRAMS =
|
pkglib_PROGRAMS =
|
||||||
|
@ -112,6 +114,8 @@ pkglib_PROGRAMS += \
|
||||||
calendar_example_06 \
|
calendar_example_06 \
|
||||||
clock_example \
|
clock_example \
|
||||||
image_example_01 \
|
image_example_01 \
|
||||||
|
diskselector_example_01 \
|
||||||
|
diskselector_example_02 \
|
||||||
flipselector_example \
|
flipselector_example \
|
||||||
fileselector_example \
|
fileselector_example \
|
||||||
fileselector_button_example \
|
fileselector_button_example \
|
||||||
|
@ -146,6 +150,8 @@ SCREENSHOTS = \
|
||||||
calendar_example_06:calendar_example_06.png:0.0 \
|
calendar_example_06:calendar_example_06.png:0.0 \
|
||||||
clock_example:clock_example.png:0.5 \
|
clock_example:clock_example.png:0.5 \
|
||||||
image_example_01:image_example_01.png:0.0 \
|
image_example_01:image_example_01.png:0.0 \
|
||||||
|
diskselector_example_01:diskselector_example_01.png:0.2 \
|
||||||
|
diskselector_example_02:diskselector_example_02.png:0.2 \
|
||||||
flipselector_example:flipselector_example.png:0.0 \
|
flipselector_example:flipselector_example.png:0.0 \
|
||||||
fileselector_example:fileselector_example.png:0.0
|
fileselector_example:fileselector_example.png:0.0
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,106 @@
|
||||||
|
/**
|
||||||
|
* Simple Elementary's <b>diskselector widget</b> example, illustrating its
|
||||||
|
* usage and API.
|
||||||
|
*
|
||||||
|
* See stdout/stderr for output. Compile with:
|
||||||
|
*
|
||||||
|
* @verbatim
|
||||||
|
* gcc -g `pkg-config --cflags --libs elementary` diskselector_example_01.c -o diskselector_example_01
|
||||||
|
* @endverbatim
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <Elementary.h>
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include "elementary_config.h"
|
||||||
|
#else
|
||||||
|
# define __UNUSED__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static void
|
||||||
|
_on_done(void *data __UNUSED__,
|
||||||
|
Evas_Object *obj __UNUSED__,
|
||||||
|
void *event_info __UNUSED__)
|
||||||
|
{
|
||||||
|
elm_exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI int
|
||||||
|
elm_main(int argc __UNUSED__, char **argv __UNUSED__)
|
||||||
|
{
|
||||||
|
Evas_Object *win, *bg, *bx, *ds;
|
||||||
|
unsigned int i;
|
||||||
|
static const char *lbl[] =
|
||||||
|
{
|
||||||
|
"Sunday",
|
||||||
|
"Monday",
|
||||||
|
"Tuesday",
|
||||||
|
"Wednesday",
|
||||||
|
"Thursday",
|
||||||
|
"Friday",
|
||||||
|
"Saturday"
|
||||||
|
};
|
||||||
|
|
||||||
|
win = elm_win_add(NULL, "diskselector", ELM_WIN_BASIC);
|
||||||
|
elm_win_title_set(win, "Diskselector Example");
|
||||||
|
evas_object_smart_callback_add(win, "delete,request", _on_done, NULL);
|
||||||
|
|
||||||
|
bg = elm_bg_add(win);
|
||||||
|
elm_win_resize_object_add(win, bg);
|
||||||
|
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_show(bg);
|
||||||
|
|
||||||
|
bx = elm_box_add(win);
|
||||||
|
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
elm_win_resize_object_add(win, bx);
|
||||||
|
evas_object_show(bx);
|
||||||
|
|
||||||
|
/* default */
|
||||||
|
ds = elm_diskselector_add(win);
|
||||||
|
evas_object_size_hint_weight_set(ds, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(ds, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
elm_box_pack_end(bx, ds);
|
||||||
|
for (i = 0; i < sizeof(lbl) / sizeof(lbl[0]); i++)
|
||||||
|
elm_diskselector_item_append(ds, lbl[i], NULL, NULL, NULL);
|
||||||
|
evas_object_show(ds);
|
||||||
|
|
||||||
|
/* set round mode and define side label length */
|
||||||
|
ds = elm_diskselector_add(win);
|
||||||
|
evas_object_size_hint_weight_set(ds, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(ds, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
elm_box_pack_end(bx, ds);
|
||||||
|
for (i = 0; i < sizeof(lbl) / sizeof(lbl[0]); i++)
|
||||||
|
elm_diskselector_item_append(ds, lbl[i], NULL, NULL, NULL);
|
||||||
|
elm_diskselector_round_set(ds, EINA_TRUE);
|
||||||
|
elm_diskselector_side_label_length_set(ds, 2);
|
||||||
|
evas_object_show(ds);
|
||||||
|
|
||||||
|
/* display more than 3 items */
|
||||||
|
ds = elm_diskselector_add(win);
|
||||||
|
evas_object_size_hint_weight_set(ds, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(ds, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
elm_box_pack_end(bx, ds);
|
||||||
|
for (i = 0; i < sizeof(lbl) / sizeof(lbl[0]); i++)
|
||||||
|
elm_diskselector_item_append(ds, lbl[i], NULL, NULL, NULL);
|
||||||
|
elm_diskselector_display_item_num_set(ds, 5);
|
||||||
|
evas_object_show(ds);
|
||||||
|
|
||||||
|
/* set bounce and scroller policy */
|
||||||
|
ds = elm_diskselector_add(win);
|
||||||
|
evas_object_size_hint_weight_set(ds, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(ds, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
elm_box_pack_end(bx, ds);
|
||||||
|
for (i = 0; i < sizeof(lbl) / sizeof(lbl[0]); i++)
|
||||||
|
elm_diskselector_item_append(ds, lbl[i], NULL, NULL, NULL);
|
||||||
|
elm_diskselector_bounce_set(ds, EINA_TRUE, EINA_TRUE);
|
||||||
|
elm_diskselector_scroller_policy_set(ds, ELM_SCROLLER_POLICY_AUTO,
|
||||||
|
ELM_SCROLLER_POLICY_ON);
|
||||||
|
evas_object_show(ds);
|
||||||
|
|
||||||
|
evas_object_resize(win, 320, 480);
|
||||||
|
evas_object_show(win);
|
||||||
|
|
||||||
|
elm_run();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
ELM_MAIN()
|
|
@ -0,0 +1,355 @@
|
||||||
|
/**
|
||||||
|
* Elementary's <b>diskselector widget</b> example, illustrating its
|
||||||
|
* covering most of item functions.
|
||||||
|
*
|
||||||
|
* See stdout/stderr for output. Compile with:
|
||||||
|
*
|
||||||
|
* @verbatim
|
||||||
|
* gcc -g `pkg-config --cflags --libs elementary` diskselector_example_02.c -o diskselector_example_02
|
||||||
|
* @endverbatim
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <Elementary.h>
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include "elementary_config.h"
|
||||||
|
#else
|
||||||
|
# define __UNUSED__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static int counter = 3;
|
||||||
|
|
||||||
|
static void
|
||||||
|
_on_done(void *data __UNUSED__,
|
||||||
|
Evas_Object *obj __UNUSED__,
|
||||||
|
void *event_info __UNUSED__)
|
||||||
|
{
|
||||||
|
elm_exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_add_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
|
{
|
||||||
|
Elm_Diskselector_Item *it;
|
||||||
|
Evas_Object *ds = data;
|
||||||
|
char label[32];
|
||||||
|
|
||||||
|
snprintf(label, sizeof(label), "Item %i", counter++);
|
||||||
|
it = elm_diskselector_item_append(ds, label, NULL, NULL, NULL);
|
||||||
|
if (!it)
|
||||||
|
printf("Error adding item\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_add_ic_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
|
{
|
||||||
|
Elm_Diskselector_Item *it;
|
||||||
|
Evas_Object *ic, *ds = data;
|
||||||
|
char label[32];
|
||||||
|
|
||||||
|
snprintf(label, sizeof(label), "Item %i", counter++);
|
||||||
|
ic = elm_icon_add(ds);
|
||||||
|
elm_icon_standard_set(ic, "home");
|
||||||
|
|
||||||
|
it = elm_diskselector_item_append(ds, label, ic, NULL, NULL);
|
||||||
|
if (!it)
|
||||||
|
printf("Error adding item with icon\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_sel_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
|
||||||
|
{
|
||||||
|
Elm_Diskselector_Item *it = event_info;
|
||||||
|
printf("Selected label: %s\n", elm_diskselector_item_label_get(it));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_add_func_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
|
{
|
||||||
|
Elm_Diskselector_Item *it;
|
||||||
|
Evas_Object *ds = data;
|
||||||
|
char label[32];
|
||||||
|
|
||||||
|
snprintf(label, sizeof(label), "Item %i", counter++);
|
||||||
|
it = elm_diskselector_item_append(ds, label, NULL, _sel_cb, NULL);
|
||||||
|
if (!it)
|
||||||
|
printf("Error adding item\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_sel_data_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info)
|
||||||
|
{
|
||||||
|
char *content = data;
|
||||||
|
Elm_Diskselector_Item *it = event_info;
|
||||||
|
printf("Selected label: %s with data: %s\n",
|
||||||
|
elm_diskselector_item_label_get(it), content);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_free_data(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
|
{
|
||||||
|
free(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_add_data_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
|
{
|
||||||
|
Elm_Diskselector_Item *it;
|
||||||
|
Evas_Object *ds = data;
|
||||||
|
char label[32];
|
||||||
|
char *content = malloc(sizeof(char) * 32);
|
||||||
|
|
||||||
|
snprintf(content, 32, "Item content %i", counter);
|
||||||
|
snprintf(label, sizeof(label), "Item %i", counter++);
|
||||||
|
it = elm_diskselector_item_append(ds, label, NULL, _sel_data_cb, content);
|
||||||
|
if (!it) {
|
||||||
|
printf("Error adding item\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
elm_diskselector_item_del_cb_set(it, _free_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_del_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
|
{
|
||||||
|
Elm_Diskselector_Item *selected_item;
|
||||||
|
Evas_Object *ds = data;
|
||||||
|
|
||||||
|
selected_item = elm_diskselector_selected_item_get(ds);
|
||||||
|
elm_diskselector_item_del(selected_item);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_unselect_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
|
{
|
||||||
|
Elm_Diskselector_Item *selected_item;
|
||||||
|
Evas_Object *ds = data;
|
||||||
|
|
||||||
|
selected_item = elm_diskselector_selected_item_get(ds);
|
||||||
|
elm_diskselector_item_selected_set(selected_item, EINA_FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_print_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
|
{
|
||||||
|
const Eina_List *l, *items;
|
||||||
|
Elm_Diskselector_Item *it;
|
||||||
|
Evas_Object *ds = data;
|
||||||
|
|
||||||
|
items = elm_diskselector_items_get(ds);
|
||||||
|
EINA_LIST_FOREACH(items, l, it)
|
||||||
|
printf("%s\n", elm_diskselector_item_label_get(it));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_clear_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
|
{
|
||||||
|
Evas_Object *ds = data;
|
||||||
|
elm_diskselector_clear(ds);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_select_first_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
|
{
|
||||||
|
Elm_Diskselector_Item *first_item;
|
||||||
|
Evas_Object *ds = data;
|
||||||
|
|
||||||
|
first_item = elm_diskselector_first_item_get(ds);
|
||||||
|
if (first_item)
|
||||||
|
elm_diskselector_item_selected_set(first_item, EINA_TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_select_last_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
|
{
|
||||||
|
Elm_Diskselector_Item *last_item;
|
||||||
|
Evas_Object *ds = data;
|
||||||
|
|
||||||
|
last_item = elm_diskselector_last_item_get(ds);
|
||||||
|
if (last_item)
|
||||||
|
elm_diskselector_item_selected_set(last_item, EINA_TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_select_next_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
|
{
|
||||||
|
Elm_Diskselector_Item *selected_item, *next_item;
|
||||||
|
Evas_Object *ds = data;
|
||||||
|
|
||||||
|
selected_item = elm_diskselector_selected_item_get(ds);
|
||||||
|
if (!selected_item) return;
|
||||||
|
|
||||||
|
next_item = elm_diskselector_item_next_get(selected_item);
|
||||||
|
if (next_item)
|
||||||
|
elm_diskselector_item_selected_set(next_item, EINA_TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_select_prev_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
|
{
|
||||||
|
Elm_Diskselector_Item *selected_item, *prev_item;
|
||||||
|
Evas_Object *ds = data;
|
||||||
|
|
||||||
|
selected_item = elm_diskselector_selected_item_get(ds);
|
||||||
|
if (!selected_item) return;
|
||||||
|
|
||||||
|
prev_item = elm_diskselector_item_prev_get(selected_item);
|
||||||
|
if (prev_item)
|
||||||
|
elm_diskselector_item_selected_set(prev_item, EINA_TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI int
|
||||||
|
elm_main(int argc __UNUSED__, char **argv __UNUSED__)
|
||||||
|
{
|
||||||
|
Evas_Object *win, *bg, *bx, *hbx, *ds, *bt;
|
||||||
|
|
||||||
|
win = elm_win_add(NULL, "diskselector", ELM_WIN_BASIC);
|
||||||
|
elm_win_title_set(win, "Diskselector Items Example");
|
||||||
|
evas_object_smart_callback_add(win, "delete,request", _on_done, NULL);
|
||||||
|
|
||||||
|
bg = elm_bg_add(win);
|
||||||
|
elm_win_resize_object_add(win, bg);
|
||||||
|
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_show(bg);
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
ds = elm_diskselector_add(win);
|
||||||
|
evas_object_size_hint_weight_set(ds, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(ds, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
elm_box_pack_end(bx, ds);
|
||||||
|
evas_object_show(ds);
|
||||||
|
|
||||||
|
elm_diskselector_item_append(ds, "Item 0", NULL, NULL, NULL);
|
||||||
|
elm_diskselector_item_append(ds, "Item 1", NULL, NULL, NULL);
|
||||||
|
elm_diskselector_item_append(ds, "Item 2", NULL, NULL, NULL);
|
||||||
|
|
||||||
|
hbx = elm_box_add(win);
|
||||||
|
elm_box_horizontal_set(hbx, EINA_TRUE);
|
||||||
|
evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(hbx, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
elm_box_pack_end(bx, hbx);
|
||||||
|
evas_object_show(hbx);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_object_text_set(bt, "Append item");
|
||||||
|
evas_object_smart_callback_add(bt, "clicked", _add_cb, ds);
|
||||||
|
elm_box_pack_end(hbx, bt);
|
||||||
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_object_text_set(bt, "Append with icon");
|
||||||
|
evas_object_smart_callback_add(bt, "clicked", _add_ic_cb, ds);
|
||||||
|
elm_box_pack_end(hbx, bt);
|
||||||
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_object_text_set(bt, "Append with selected function");
|
||||||
|
evas_object_smart_callback_add(bt, "clicked", _add_func_cb, ds);
|
||||||
|
elm_box_pack_end(hbx, bt);
|
||||||
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_object_text_set(bt, "Append with data");
|
||||||
|
evas_object_smart_callback_add(bt, "clicked", _add_data_cb, ds);
|
||||||
|
elm_box_pack_end(hbx, bt);
|
||||||
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
hbx = elm_box_add(win);
|
||||||
|
elm_box_horizontal_set(hbx, EINA_TRUE);
|
||||||
|
evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(hbx, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
elm_box_pack_end(bx, hbx);
|
||||||
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_show(hbx);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_object_text_set(bt, "Delete item");
|
||||||
|
evas_object_smart_callback_add(bt, "clicked", _del_cb, ds);
|
||||||
|
elm_box_pack_end(hbx, bt);
|
||||||
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_object_text_set(bt, "Unselect item");
|
||||||
|
evas_object_smart_callback_add(bt, "clicked", _unselect_cb, ds);
|
||||||
|
elm_box_pack_end(hbx, bt);
|
||||||
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_object_text_set(bt, "Print items");
|
||||||
|
evas_object_smart_callback_add(bt, "clicked", _print_cb, ds);
|
||||||
|
elm_box_pack_end(hbx, bt);
|
||||||
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_object_text_set(bt, "Clear");
|
||||||
|
evas_object_smart_callback_add(bt, "clicked", _clear_cb, ds);
|
||||||
|
elm_box_pack_end(hbx, bt);
|
||||||
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
hbx = elm_box_add(win);
|
||||||
|
elm_box_horizontal_set(hbx, EINA_TRUE);
|
||||||
|
evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(hbx, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
elm_box_pack_end(bx, hbx);
|
||||||
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_show(hbx);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_object_text_set(bt, "Select first item");
|
||||||
|
evas_object_smart_callback_add(bt, "clicked", _select_first_cb, ds);
|
||||||
|
elm_box_pack_end(hbx, bt);
|
||||||
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_object_text_set(bt, "Select last item");
|
||||||
|
evas_object_smart_callback_add(bt, "clicked", _select_last_cb, ds);
|
||||||
|
elm_box_pack_end(hbx, bt);
|
||||||
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_object_text_set(bt, "Select next item");
|
||||||
|
evas_object_smart_callback_add(bt, "clicked", _select_next_cb, ds);
|
||||||
|
elm_box_pack_end(hbx, bt);
|
||||||
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_object_text_set(bt, "Select previous item");
|
||||||
|
evas_object_smart_callback_add(bt, "clicked", _select_prev_cb, ds);
|
||||||
|
elm_box_pack_end(hbx, bt);
|
||||||
|
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
evas_object_show(win);
|
||||||
|
|
||||||
|
elm_run();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
ELM_MAIN()
|
|
@ -8977,52 +8977,782 @@ extern "C" {
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* diskselector */
|
/**
|
||||||
typedef struct _Elm_Diskselector_Item Elm_Diskselector_Item;
|
* @defgroup Diskselector Diskselector
|
||||||
|
* @ingroup Elementary
|
||||||
|
*
|
||||||
|
* A diskselector is a kind of list widget. It scrolls horizontally,
|
||||||
|
* and can contain label and icon objects. Three items are displayed
|
||||||
|
* with the selected one in the middle.
|
||||||
|
*
|
||||||
|
* It can act like a circular list with round mode and labels can be
|
||||||
|
* reduced for a defined length for side items.
|
||||||
|
*
|
||||||
|
* Smart callbacks one can listen to:
|
||||||
|
* - "selected" - when item is selected, i.e. scroller stops.
|
||||||
|
*
|
||||||
|
* Available styles for it:
|
||||||
|
* - @c "default"
|
||||||
|
*
|
||||||
|
* List of examples:
|
||||||
|
* @li @ref diskselector_example_01
|
||||||
|
* @li @ref diskselector_example_02
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @addtogroup Diskselector
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct _Elm_Diskselector_Item Elm_Diskselector_Item; /**< Item handle for a diskselector item. Created with elm_diskselector_item_append() and deleted with elm_diskselector_item_del(). */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new diskselector widget to the given parent Elementary
|
||||||
|
* (container) object.
|
||||||
|
*
|
||||||
|
* @param parent The parent object.
|
||||||
|
* @return a new diskselector widget handle or @c NULL, on errors.
|
||||||
|
*
|
||||||
|
* This function inserts a new diskselector widget on the canvas.
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
EAPI Evas_Object *elm_diskselector_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
|
EAPI Evas_Object *elm_diskselector_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
|
||||||
EAPI Eina_Bool elm_diskselector_round_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
|
||||||
|
/**
|
||||||
|
* Enable or disable round mode.
|
||||||
|
*
|
||||||
|
* @param obj The diskselector object.
|
||||||
|
* @param round @c EINA_TRUE to enable round mode or @c EINA_FALSE to
|
||||||
|
* disable it.
|
||||||
|
*
|
||||||
|
* Disabled by default. If round mode is enabled the items list will
|
||||||
|
* work like a circle list, so when the user reaches the last item,
|
||||||
|
* the first one will popup.
|
||||||
|
*
|
||||||
|
* @see elm_diskselector_round_get()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
EAPI void elm_diskselector_round_set(Evas_Object *obj, Eina_Bool round) EINA_ARG_NONNULL(1);
|
EAPI void elm_diskselector_round_set(Evas_Object *obj, Eina_Bool round) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a value whether round mode is enabled or not.
|
||||||
|
*
|
||||||
|
* @see elm_diskselector_round_set() for details.
|
||||||
|
*
|
||||||
|
* @param obj The diskselector object.
|
||||||
|
* @return @c EINA_TRUE means round mode is enabled. @c EINA_FALSE indicates
|
||||||
|
* it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned.
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI Eina_Bool elm_diskselector_round_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the side labels max length.
|
||||||
|
*
|
||||||
|
* @deprecated use elm_diskselector_side_label_length_get() instead:
|
||||||
|
*
|
||||||
|
* @param obj The diskselector object.
|
||||||
|
* @return The max length defined for side labels, or 0 if not a valid
|
||||||
|
* diskselector.
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
EINA_DEPRECATED EAPI int elm_diskselector_side_label_lenght_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
EINA_DEPRECATED EAPI int elm_diskselector_side_label_lenght_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the side labels max length.
|
||||||
|
*
|
||||||
|
* @deprecated use elm_diskselector_side_label_length_set() instead:
|
||||||
|
*
|
||||||
|
* @param obj The diskselector object.
|
||||||
|
* @param len The max length defined for side labels.
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
EINA_DEPRECATED EAPI void elm_diskselector_side_label_lenght_set(Evas_Object *obj, int len) EINA_ARG_NONNULL(1);
|
EINA_DEPRECATED EAPI void elm_diskselector_side_label_lenght_set(Evas_Object *obj, int len) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the side labels max length.
|
||||||
|
*
|
||||||
|
* @see elm_diskselector_side_label_length_set() for details.
|
||||||
|
*
|
||||||
|
* @param obj The diskselector object.
|
||||||
|
* @return The max length defined for side labels, or 0 if not a valid
|
||||||
|
* diskselector.
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
EAPI int elm_diskselector_side_label_length_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
EAPI int elm_diskselector_side_label_length_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the side labels max length.
|
||||||
|
*
|
||||||
|
* @param obj The diskselector object.
|
||||||
|
* @param len The max length defined for side labels.
|
||||||
|
*
|
||||||
|
* Length is the number of characters of items' label that will be
|
||||||
|
* visible when it's set on side positions. It will just crop
|
||||||
|
* the string after defined size. E.g.:
|
||||||
|
*
|
||||||
|
* An item with label "January" would be displayed on side position as
|
||||||
|
* "Jan" if max length is set to 3, or "Janu", if this property
|
||||||
|
* is set to 4.
|
||||||
|
*
|
||||||
|
* When it's selected, the entire label will be displayed, except for
|
||||||
|
* width restrictions. In this case label will be cropped and "..."
|
||||||
|
* will be concatenated.
|
||||||
|
*
|
||||||
|
* Default side label max length is 3.
|
||||||
|
*
|
||||||
|
* This property will be applyed over all items, included before or
|
||||||
|
* later this function call.
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
EAPI void elm_diskselector_side_label_length_set(Evas_Object *obj, int len) EINA_ARG_NONNULL(1);
|
EAPI void elm_diskselector_side_label_length_set(Evas_Object *obj, int len) EINA_ARG_NONNULL(1);
|
||||||
EAPI void elm_diskselector_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) EINA_ARG_NONNULL(1);
|
|
||||||
EAPI void elm_diskselector_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1);
|
/**
|
||||||
EAPI void elm_diskselector_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v) EINA_ARG_NONNULL(1);
|
* Set the number of items to be displayed.
|
||||||
EAPI void elm_diskselector_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v) EINA_ARG_NONNULL(1);
|
*
|
||||||
EAPI void elm_diskselector_clear(Evas_Object *obj) EINA_ARG_NONNULL(1);
|
* @param obj The diskselector object.
|
||||||
EAPI const Eina_List *elm_diskselector_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
* @param num The number of items the diskselector will display.
|
||||||
EAPI Elm_Diskselector_Item *elm_diskselector_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1);
|
*
|
||||||
EAPI void elm_diskselector_item_del(Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
* Default value is 3, and also it's the minimun. If @p num is less
|
||||||
EAPI void elm_diskselector_item_del_cb_set(Elm_Diskselector_Item *item, Evas_Smart_Cb func) EINA_ARG_NONNULL(1);
|
* than 3, it will be set to 3.
|
||||||
EAPI void *elm_diskselector_item_data_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
*
|
||||||
EAPI Evas_Object *elm_diskselector_item_icon_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
* Also, it can be set on theme, using data item @c display_item_num
|
||||||
EAPI void elm_diskselector_item_icon_set(Elm_Diskselector_Item *item, Evas_Object *icon) EINA_ARG_NONNULL(1);
|
* on group "elm/diskselector/item/X", where X is style set.
|
||||||
EAPI const char *elm_diskselector_item_label_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
* E.g.:
|
||||||
EAPI void elm_diskselector_item_label_set(Elm_Diskselector_Item *item, const char *label) EINA_ARG_NONNULL(1);
|
*
|
||||||
EAPI Elm_Diskselector_Item *elm_diskselector_selected_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
* group { name: "elm/diskselector/item/X";
|
||||||
EAPI void elm_diskselector_item_selected_set(Elm_Diskselector_Item *item, Eina_Bool selected) EINA_ARG_NONNULL(1);
|
* data {
|
||||||
EAPI Eina_Bool elm_diskselector_item_selected_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
* item: "display_item_num" "5";
|
||||||
EAPI Elm_Diskselector_Item *elm_diskselector_first_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
* }
|
||||||
EAPI Elm_Diskselector_Item *elm_diskselector_last_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
*
|
||||||
EAPI Elm_Diskselector_Item *elm_diskselector_item_prev_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
* @ingroup Diskselector
|
||||||
EAPI Elm_Diskselector_Item *elm_diskselector_item_next_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
*/
|
||||||
EAPI void elm_diskselector_item_tooltip_text_set(Elm_Diskselector_Item *item, const char *text) EINA_ARG_NONNULL(1);
|
|
||||||
EAPI void elm_diskselector_item_tooltip_content_cb_set(Elm_Diskselector_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) EINA_ARG_NONNULL(1);
|
|
||||||
EAPI void elm_diskselector_item_tooltip_unset(Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
|
||||||
EAPI void elm_diskselector_item_tooltip_style_set(Elm_Diskselector_Item *item, const char *style) EINA_ARG_NONNULL(1);
|
|
||||||
EAPI const char *elm_diskselector_item_tooltip_style_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
|
||||||
EAPI void elm_diskselector_item_cursor_set(Elm_Diskselector_Item *item, const char *cursor) EINA_ARG_NONNULL(1);
|
|
||||||
EAPI const char *elm_diskselector_item_cursor_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
|
||||||
EAPI void elm_diskselector_item_cursor_unset(Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
|
||||||
EAPI void elm_diskselector_item_cursor_style_set(Elm_Diskselector_Item *item, const char *style) EINA_ARG_NONNULL(1);
|
|
||||||
EAPI const char *elm_diskselector_item_cursor_style_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
|
||||||
EAPI void elm_diskselector_item_cursor_engine_only_set(Elm_Diskselector_Item *item, Eina_Bool engine_only) EINA_ARG_NONNULL(1);
|
|
||||||
EAPI Eina_Bool elm_diskselector_item_cursor_engine_only_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
|
||||||
EAPI void elm_diskselector_display_item_num_set(Evas_Object *obj, int num) EINA_ARG_NONNULL(1);
|
EAPI void elm_diskselector_display_item_num_set(Evas_Object *obj, int num) EINA_ARG_NONNULL(1);
|
||||||
/* smart callbacks called:
|
|
||||||
* "selected" - when item is selected (scroller stops)
|
/**
|
||||||
|
* Set bouncing behaviour when the scrolled content reaches an edge.
|
||||||
|
*
|
||||||
|
* Tell the internal scroller object whether it should bounce or not
|
||||||
|
* when it reaches the respective edges for each axis.
|
||||||
|
*
|
||||||
|
* @param obj The anchorview object.
|
||||||
|
* @param h_bounce Whether to bounce or not in the horizontal axis.
|
||||||
|
* @param v_bounce Whether to bounce or not in the vertical axis.
|
||||||
|
*
|
||||||
|
* @see elm_scroller_bounce_set()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI void elm_diskselector_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the bouncing behaviour of the internal scroller.
|
||||||
|
*
|
||||||
|
* Get whether the internal scroller should bounce when the edge of each
|
||||||
|
* axis is reached scrolling.
|
||||||
|
*
|
||||||
|
* @param obj The anchorview object.
|
||||||
|
* @param h_bounce Pointer where to store the bounce state of the horizontal
|
||||||
|
* axis.
|
||||||
|
* @param v_bounce Pointer where to store the bounce state of the vertical
|
||||||
|
* axis.
|
||||||
|
*
|
||||||
|
* @see elm_scroller_bounce_get()
|
||||||
|
* @see elm_diskselector_bounce_set()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI void elm_diskselector_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the scrollbar policy.
|
||||||
|
*
|
||||||
|
* @see elm_diskselector_scroller_policy_get() for details.
|
||||||
|
*
|
||||||
|
* @param obj The diskselector object.
|
||||||
|
* @param policy_h Pointer where to store horizontal scrollbar policy.
|
||||||
|
* @param policy_v Pointer where to store vertical scrollbar policy.
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI void elm_diskselector_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the scrollbar policy.
|
||||||
|
*
|
||||||
|
* @param obj The diskselector object.
|
||||||
|
* @param policy_h Horizontal scrollbar policy.
|
||||||
|
* @param policy_v Vertical scrollbar policy.
|
||||||
|
*
|
||||||
|
* This sets the scrollbar visibility policy for the given scroller.
|
||||||
|
* #ELM_SCROLLER_POLICY_AUTO means the scrollber is made visible if it
|
||||||
|
* is needed, and otherwise kept hidden. #ELM_SCROLLER_POLICY_ON turns
|
||||||
|
* it on all the time, and #ELM_SCROLLER_POLICY_OFF always keeps it off.
|
||||||
|
* This applies respectively for the horizontal and vertical scrollbars.
|
||||||
|
*
|
||||||
|
* The both are disabled by default, i.e., are set to
|
||||||
|
* #ELM_SCROLLER_POLICY_OFF.
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI void elm_diskselector_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove all diskselector's items.
|
||||||
|
*
|
||||||
|
* @param obj The diskselector object.
|
||||||
|
*
|
||||||
|
* @see elm_diskselector_item_del()
|
||||||
|
* @see elm_diskselector_item_append()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI void elm_diskselector_clear(Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a list of all the diskselector items.
|
||||||
|
*
|
||||||
|
* @param obj The diskselector object.
|
||||||
|
* @return An @c Eina_List of diskselector items, #Elm_Diskselector_Item,
|
||||||
|
* or @c NULL on failure.
|
||||||
|
*
|
||||||
|
* @see elm_diskselector_item_append()
|
||||||
|
* @see elm_diskselector_item_del()
|
||||||
|
* @see elm_diskselector_clear()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI const Eina_List *elm_diskselector_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Appends a new item to the diskselector object.
|
||||||
|
*
|
||||||
|
* @param obj The diskselector object.
|
||||||
|
* @param label The label of the diskselector item.
|
||||||
|
* @param icon The icon object to use at left side of the item. An
|
||||||
|
* icon can be any Evas object, but usually it is an icon created
|
||||||
|
* with elm_icon_add().
|
||||||
|
* @param func The function to call when the item is selected.
|
||||||
|
* @param data The data to associate with the item for related callbacks.
|
||||||
|
*
|
||||||
|
* @return The created item or @c NULL upon failure.
|
||||||
|
*
|
||||||
|
* A new item will be created and appended to the diskselector, i.e., will
|
||||||
|
* be set as last item. Also, if there is no selected item, it will
|
||||||
|
* be selected. This will always happens for the first appended item.
|
||||||
|
*
|
||||||
|
* If no icon is set, label will be centered on item position, otherwise
|
||||||
|
* the icon will be placed at left of the label, that will be shifted
|
||||||
|
* to the right.
|
||||||
|
*
|
||||||
|
* Items created with this method can be deleted with
|
||||||
|
* elm_diskselector_item_del().
|
||||||
|
*
|
||||||
|
* Associated @p data can be properly freed when item is deleted if a
|
||||||
|
* callback function is set with elm_diskselector_item_del_cb_set().
|
||||||
|
*
|
||||||
|
* If a function is passed as argument, it will be called everytime this item
|
||||||
|
* is selected, i.e., the user stops the diskselector with this
|
||||||
|
* item on center position. If such function isn't needed, just passing
|
||||||
|
* @c NULL as @p func is enough. The same should be done for @p data.
|
||||||
|
*
|
||||||
|
* Simple example (with no function callback or data associated):
|
||||||
|
* @code
|
||||||
|
* disk = elm_diskselector_add(win);
|
||||||
|
* ic = elm_icon_add(win);
|
||||||
|
* elm_icon_file_set(ic, "path/to/image", NULL);
|
||||||
|
* elm_icon_scale_set(ic, EINA_TRUE, EINA_TRUE);
|
||||||
|
* elm_diskselector_item_append(disk, "label", ic, NULL, NULL);
|
||||||
|
* @endcode
|
||||||
|
*
|
||||||
|
* @see elm_diskselector_item_del()
|
||||||
|
* @see elm_diskselector_item_del_cb_set()
|
||||||
|
* @see elm_diskselector_clear()
|
||||||
|
* @see elm_icon_add()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI Elm_Diskselector_Item *elm_diskselector_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete them item from the diskselector.
|
||||||
|
*
|
||||||
|
* @param it The item of diskselector to be deleted.
|
||||||
|
*
|
||||||
|
* If deleting all diskselector items is required, elm_diskselector_clear()
|
||||||
|
* should be used instead of getting items list and deleting each one.
|
||||||
|
*
|
||||||
|
* @see elm_diskselector_clear()
|
||||||
|
* @see elm_diskselector_item_append()
|
||||||
|
* @see elm_diskselector_item_del_cb_set()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI void elm_diskselector_item_del(Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the function called when a diskselector item is freed.
|
||||||
|
*
|
||||||
|
* @param it The item to set the callback on
|
||||||
|
* @param func The function called
|
||||||
|
*
|
||||||
|
* If there is a @p func, then it will be called prior item's memory release.
|
||||||
|
* That will be called with the following arguments:
|
||||||
|
* @li item's data;
|
||||||
|
* @li item's Evas object;
|
||||||
|
* @li item itself;
|
||||||
|
*
|
||||||
|
* This way, a data associated to a diskselector item could be properly
|
||||||
|
* freed.
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI void elm_diskselector_item_del_cb_set(Elm_Diskselector_Item *item, Evas_Smart_Cb func) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the data associated to the item.
|
||||||
|
*
|
||||||
|
* @param it The diskselector item
|
||||||
|
* @return The data associated to @p it
|
||||||
|
*
|
||||||
|
* The return value is a pointer to data associated to @item when it was
|
||||||
|
* created, with function elm_diskselector_item_append(). If no data
|
||||||
|
* was passed as argument, it will return @c NULL.
|
||||||
|
*
|
||||||
|
* @see elm_diskselector_item_append()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI void *elm_diskselector_item_data_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the icon associated to the item.
|
||||||
|
*
|
||||||
|
* @param it The diskselector item
|
||||||
|
* @param icon The icon object to associate with @p it
|
||||||
|
*
|
||||||
|
* The icon object to use at left side of the item. An
|
||||||
|
* icon can be any Evas object, but usually it is an icon created
|
||||||
|
* with elm_icon_add().
|
||||||
|
*
|
||||||
|
* Once the icon object is set, a previously set one will be deleted.
|
||||||
|
* You probably don't want, then, to have the @b same icon object set
|
||||||
|
* for more than one item of the diskselector.
|
||||||
|
*
|
||||||
|
* If an icon was passed as argument on item creation, with function
|
||||||
|
* elm_diskselector_item_append(), it will be already
|
||||||
|
* associated to the item.
|
||||||
|
*
|
||||||
|
* @see elm_diskselector_item_append()
|
||||||
|
* @see elm_diskselector_item_icon_get()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI void elm_diskselector_item_icon_set(Elm_Diskselector_Item *item, Evas_Object *icon) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the icon associated to the item.
|
||||||
|
*
|
||||||
|
* @param it The diskselector item
|
||||||
|
* @return The icon associated to @p it
|
||||||
|
*
|
||||||
|
* The return value is a pointer to the icon associated to @item when it was
|
||||||
|
* created, with function elm_diskselector_item_append(), or later
|
||||||
|
* with function elm_diskselector_item_icon_set. If no icon
|
||||||
|
* was passed as argument, it will return @c NULL.
|
||||||
|
*
|
||||||
|
* @see elm_diskselector_item_append()
|
||||||
|
* @see elm_diskselector_item_icon_set()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI Evas_Object *elm_diskselector_item_icon_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the label of item.
|
||||||
|
*
|
||||||
|
* @param it The item of diskselector.
|
||||||
|
* @param label The label of item.
|
||||||
|
*
|
||||||
|
* The label to be displayed by the item.
|
||||||
|
*
|
||||||
|
* If no icon is set, label will be centered on item position, otherwise
|
||||||
|
* the icon will be placed at left of the label, that will be shifted
|
||||||
|
* to the right.
|
||||||
|
*
|
||||||
|
* An item with label "January" would be displayed on side position as
|
||||||
|
* "Jan" if max length is set to 3 with function
|
||||||
|
* elm_diskselector_side_label_lenght_set(), or "Janu", if this property
|
||||||
|
* is set to 4.
|
||||||
|
*
|
||||||
|
* When this @item is selected, the entire label will be displayed,
|
||||||
|
* except for width restrictions.
|
||||||
|
* In this case label will be cropped and "..." will be concatenated,
|
||||||
|
* but only for display purposes. It will keep the entire string, so
|
||||||
|
* if diskselector is resized the remaining characters will be displayed.
|
||||||
|
*
|
||||||
|
* If a label was passed as argument on item creation, with function
|
||||||
|
* elm_diskselector_item_append(), it will be already
|
||||||
|
* displayed by the item.
|
||||||
|
*
|
||||||
|
* @see elm_diskselector_side_label_lenght_set()
|
||||||
|
* @see elm_diskselector_item_label_get()
|
||||||
|
* @see elm_diskselector_item_append()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI void elm_diskselector_item_label_set(Elm_Diskselector_Item *item, const char *label) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the label of item.
|
||||||
|
*
|
||||||
|
* @param it The item of diskselector.
|
||||||
|
* @return The label of item.
|
||||||
|
*
|
||||||
|
* The return value is a pointer to the label associated to @item when it was
|
||||||
|
* created, with function elm_diskselector_item_append(), or later
|
||||||
|
* with function elm_diskselector_item_label_set. If no label
|
||||||
|
* was passed as argument, it will return @c NULL.
|
||||||
|
*
|
||||||
|
* @see elm_diskselector_item_label_set() for more details.
|
||||||
|
* @see elm_diskselector_item_append()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI const char *elm_diskselector_item_label_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the selected item.
|
||||||
|
*
|
||||||
|
* @param obj The diskselector object.
|
||||||
|
* @return The selected diskselector item.
|
||||||
|
*
|
||||||
|
* The selected item can be unselected with function
|
||||||
|
* elm_diskselector_item_selected_set(), and the first item of
|
||||||
|
* diskselector will be selected.
|
||||||
|
*
|
||||||
|
* The selected item always will be centered on diskselector, with
|
||||||
|
* full label displayed, i.e., max lenght set to side labels won't
|
||||||
|
* apply on the selected item. More details on
|
||||||
|
* elm_diskselector_side_label_length_set().
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI Elm_Diskselector_Item *elm_diskselector_selected_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the selected state of an item.
|
||||||
|
*
|
||||||
|
* @param it The diskselector item
|
||||||
|
* @param selected The selected state
|
||||||
|
*
|
||||||
|
* This sets the selected state of the given item @p it.
|
||||||
|
* @c EINA_TRUE for selected, @c EINA_FALSE for not selected.
|
||||||
|
*
|
||||||
|
* If a new item is selected the previosly selected will be unselected.
|
||||||
|
* Previoulsy selected item can be get with function
|
||||||
|
* elm_diskselector_selected_item_get().
|
||||||
|
*
|
||||||
|
* If the item @p it is unselected, the first item of diskselector will
|
||||||
|
* be selected.
|
||||||
|
*
|
||||||
|
* Selected items will be visible on center position of diskselector.
|
||||||
|
* So if it was on another position before selected, or was invisible,
|
||||||
|
* diskselector will animate items until the selected item reaches center
|
||||||
|
* position.
|
||||||
|
*
|
||||||
|
* @see elm_diskselector_item_selected_get()
|
||||||
|
* @see elm_diskselector_selected_item_get()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI void elm_diskselector_item_selected_set(Elm_Diskselector_Item *item, Eina_Bool selected) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get whether the @p item is selected or not.
|
||||||
|
*
|
||||||
|
* @param it The diskselector item.
|
||||||
|
* @return @c EINA_TRUE means item is selected. @c EINA_FALSE indicates
|
||||||
|
* it's not. If @p obj is @c NULL, @c EINA_FALSE is returned.
|
||||||
|
*
|
||||||
|
* @see elm_diskselector_selected_item_set() for details.
|
||||||
|
* @see elm_diskselector_item_selected_get()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI Eina_Bool elm_diskselector_item_selected_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the first item of the diskselector.
|
||||||
|
*
|
||||||
|
* @param obj The diskselector object.
|
||||||
|
* @return The first item, or @c NULL if none.
|
||||||
|
*
|
||||||
|
* The list of items follows append order. So it will return the first
|
||||||
|
* item appended to the widget that wasn't deleted.
|
||||||
|
*
|
||||||
|
* @see elm_diskselector_item_append()
|
||||||
|
* @see elm_diskselector_items_get()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI Elm_Diskselector_Item *elm_diskselector_first_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the last item of the diskselector.
|
||||||
|
*
|
||||||
|
* @param obj The diskselector object.
|
||||||
|
* @return The last item, or @c NULL if none.
|
||||||
|
*
|
||||||
|
* The list of items follows append order. So it will return last first
|
||||||
|
* item appended to the widget that wasn't deleted.
|
||||||
|
*
|
||||||
|
* @see elm_diskselector_item_append()
|
||||||
|
* @see elm_diskselector_items_get()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI Elm_Diskselector_Item *elm_diskselector_last_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the item before @p item in diskselector.
|
||||||
|
*
|
||||||
|
* @param it The diskselector item.
|
||||||
|
* @return The item before @p item, or @c NULL if none or on failure.
|
||||||
|
*
|
||||||
|
* The list of items follows append order. So it will return item appended
|
||||||
|
* just before @item and that wasn't deleted.
|
||||||
|
*
|
||||||
|
* If it is the first item, @c NULL will be returned.
|
||||||
|
* First item can be get by elm_diskselector_first_item_get().
|
||||||
|
*
|
||||||
|
* @see elm_diskselector_item_append()
|
||||||
|
* @see elm_diskselector_items_get()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI Elm_Diskselector_Item *elm_diskselector_item_prev_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the item after @p item in diskselector.
|
||||||
|
*
|
||||||
|
* @param it The diskselector item.
|
||||||
|
* @return The item after @p item, or @c NULL if none or on failure.
|
||||||
|
*
|
||||||
|
* The list of items follows append order. So it will return item appended
|
||||||
|
* just after @item and that wasn't deleted.
|
||||||
|
*
|
||||||
|
* If it is the last item, @c NULL will be returned.
|
||||||
|
* Last item can be get by elm_diskselector_last_item_get().
|
||||||
|
*
|
||||||
|
* @see elm_diskselector_item_append()
|
||||||
|
* @see elm_diskselector_items_get()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI Elm_Diskselector_Item *elm_diskselector_item_next_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the text to be shown in the diskselector item.
|
||||||
|
*
|
||||||
|
* @param item Target item
|
||||||
|
* @param text The text to set in the content
|
||||||
|
*
|
||||||
|
* Setup the text as tooltip to object. The item can have only one tooltip,
|
||||||
|
* so any previous tooltip data is removed.
|
||||||
|
*
|
||||||
|
* @see elm_object_tooltip_text_set() for more details.
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI void elm_diskselector_item_tooltip_text_set(Elm_Diskselector_Item *item, const char *text) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the content to be shown in the tooltip item.
|
||||||
|
*
|
||||||
|
* Setup the tooltip to item. The item can have only one tooltip,
|
||||||
|
* so any previous tooltip data is removed. @p func(with @p data) will
|
||||||
|
* be called every time that need show the tooltip and it should
|
||||||
|
* return a valid Evas_Object. This object is then managed fully by
|
||||||
|
* tooltip system and is deleted when the tooltip is gone.
|
||||||
|
*
|
||||||
|
* @param item the diskselector item being attached a tooltip.
|
||||||
|
* @param func the function used to create the tooltip contents.
|
||||||
|
* @param data what to provide to @a func as callback data/context.
|
||||||
|
* @param del_cb called when data is not needed anymore, either when
|
||||||
|
* another callback replaces @func, the tooltip is unset with
|
||||||
|
* elm_diskselector_item_tooltip_unset() or the owner @a item
|
||||||
|
* dies. This callback receives as the first parameter the
|
||||||
|
* given @a data, and @c event_info is the item.
|
||||||
|
*
|
||||||
|
* @see elm_object_tooltip_content_cb_set() for more details.
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI void elm_diskselector_item_tooltip_content_cb_set(Elm_Diskselector_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unset tooltip from item.
|
||||||
|
*
|
||||||
|
* @param item diskselector item to remove previously set tooltip.
|
||||||
|
*
|
||||||
|
* Remove tooltip from item. The callback provided as del_cb to
|
||||||
|
* elm_diskselector_item_tooltip_content_cb_set() will be called to notify
|
||||||
|
* it is not used anymore.
|
||||||
|
*
|
||||||
|
* @see elm_object_tooltip_unset() for more details.
|
||||||
|
* @see elm_diskselector_item_tooltip_content_cb_set()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI void elm_diskselector_item_tooltip_unset(Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets a different style for this item tooltip.
|
||||||
|
*
|
||||||
|
* @note before you set a style you should define a tooltip with
|
||||||
|
* elm_diskselector_item_tooltip_content_cb_set() or
|
||||||
|
* elm_diskselector_item_tooltip_text_set()
|
||||||
|
*
|
||||||
|
* @param item diskselector item with tooltip already set.
|
||||||
|
* @param style the theme style to use (default, transparent, ...)
|
||||||
|
*
|
||||||
|
* @see elm_object_tooltip_style_set() for more details.
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI void elm_diskselector_item_tooltip_style_set(Elm_Diskselector_Item *item, const char *style) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the style for this item tooltip.
|
||||||
|
*
|
||||||
|
* @param item diskselector item with tooltip already set.
|
||||||
|
* @return style the theme style in use, defaults to "default". If the
|
||||||
|
* object does not have a tooltip set, then NULL is returned.
|
||||||
|
*
|
||||||
|
* @see elm_object_tooltip_style_get() for more details.
|
||||||
|
* @see elm_diskselector_item_tooltip_style_set()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI const char *elm_diskselector_item_tooltip_style_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the cursor to be shown when mouse is over the diskselector item
|
||||||
|
*
|
||||||
|
* @param item Target item
|
||||||
|
* @param cursor the cursor name to be used.
|
||||||
|
*
|
||||||
|
* @see elm_object_cursor_set() for more details.
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI void elm_diskselector_item_cursor_set(Elm_Diskselector_Item *item, const char *cursor) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the cursor to be shown when mouse is over the diskselector item
|
||||||
|
*
|
||||||
|
* @param item diskselector item with cursor already set.
|
||||||
|
* @return the cursor name.
|
||||||
|
*
|
||||||
|
* @see elm_object_cursor_get() for more details.
|
||||||
|
* @see elm_diskselector_cursor_set()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI const char *elm_diskselector_item_cursor_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unset the cursor to be shown when mouse is over the diskselector item
|
||||||
|
*
|
||||||
|
* @param item Target item
|
||||||
|
*
|
||||||
|
* @see elm_object_cursor_unset() for more details.
|
||||||
|
* @see elm_diskselector_cursor_set()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI void elm_diskselector_item_cursor_unset(Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets a different style for this item cursor.
|
||||||
|
*
|
||||||
|
* @note before you set a style you should define a cursor with
|
||||||
|
* elm_diskselector_item_cursor_set()
|
||||||
|
*
|
||||||
|
* @param item diskselector item with cursor already set.
|
||||||
|
* @param style the theme style to use (default, transparent, ...)
|
||||||
|
*
|
||||||
|
* @see elm_object_cursor_style_set() for more details.
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI void elm_diskselector_item_cursor_style_set(Elm_Diskselector_Item *item, const char *style) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the style for this item cursor.
|
||||||
|
*
|
||||||
|
* @param item diskselector item with cursor already set.
|
||||||
|
* @return style the theme style in use, defaults to "default". If the
|
||||||
|
* object does not have a cursor set, then @c NULL is returned.
|
||||||
|
*
|
||||||
|
* @see elm_object_cursor_style_get() for more details.
|
||||||
|
* @see elm_diskselector_item_cursor_style_set()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI const char *elm_diskselector_item_cursor_style_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set if the cursor set should be searched on the theme or should use
|
||||||
|
* the provided by the engine, only.
|
||||||
|
*
|
||||||
|
* @note before you set if should look on theme you should define a cursor
|
||||||
|
* with elm_diskselector_item_cursor_set().
|
||||||
|
* By default it will only look for cursors provided by the engine.
|
||||||
|
*
|
||||||
|
* @param item widget item with cursor already set.
|
||||||
|
* @param engine_only boolean to define if cursors set with
|
||||||
|
* elm_diskselector_item_cursor_set() should be searched only
|
||||||
|
* between cursors provided by the engine or searched on widget's
|
||||||
|
* theme as well.
|
||||||
|
*
|
||||||
|
* @see elm_object_cursor_engine_only_set() for more details.
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI void elm_diskselector_item_cursor_engine_only_set(Elm_Diskselector_Item *item, Eina_Bool engine_only) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the cursor engine only usage for this item cursor.
|
||||||
|
*
|
||||||
|
* @param item widget item with cursor already set.
|
||||||
|
* @return engine_only boolean to define it cursors should be looked only
|
||||||
|
* between the provided by the engine or searched on widget's theme as well.
|
||||||
|
* If the item does not have a cursor set, then @c EINA_FALSE is returned.
|
||||||
|
*
|
||||||
|
* @see elm_object_cursor_engine_only_get() for more details.
|
||||||
|
* @see elm_diskselector_item_cursor_engine_only_set()
|
||||||
|
*
|
||||||
|
* @ingroup Diskselector
|
||||||
|
*/
|
||||||
|
EAPI Eina_Bool elm_diskselector_item_cursor_engine_only_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,18 +1,3 @@
|
||||||
/**
|
|
||||||
* @defgroup Diskselector
|
|
||||||
*
|
|
||||||
* A diskselector is a kind of list widget. It scrolls horizontally,
|
|
||||||
* and can contain label and icon objects. Three items are displayed
|
|
||||||
* with the selected on the middle.
|
|
||||||
*
|
|
||||||
* It can act like a circular list with round mode and labels can be
|
|
||||||
* reduced for a defined length for side items.
|
|
||||||
*
|
|
||||||
* Signals that you can add callbacks for are:
|
|
||||||
*
|
|
||||||
* "selected" - when item is selected (scroller stops)
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <Elementary.h>
|
#include <Elementary.h>
|
||||||
#include "elm_priv.h"
|
#include "elm_priv.h"
|
||||||
|
|
||||||
|
@ -767,14 +752,6 @@ _round_items_add(Widget_Data *wd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Add a new diskselector object
|
|
||||||
*
|
|
||||||
* @param parent The parent object
|
|
||||||
* @return The new object or NULL if it cannot be created
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
elm_diskselector_add(Evas_Object *parent)
|
elm_diskselector_add(Evas_Object *parent)
|
||||||
{
|
{
|
||||||
|
@ -859,17 +836,6 @@ elm_diskselector_add(Evas_Object *parent)
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get round mode
|
|
||||||
*
|
|
||||||
* If round mode is activated the items list will work like a circle list,
|
|
||||||
* so when the user reaches the last item, the first one will popup.
|
|
||||||
*
|
|
||||||
* @param obj The diskselector object
|
|
||||||
* @return if or not set round mode or false if not a valid diskselector
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
elm_diskselector_round_get(const Evas_Object *obj)
|
elm_diskselector_round_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
@ -879,17 +845,6 @@ elm_diskselector_round_get(const Evas_Object *obj)
|
||||||
return wd->round;
|
return wd->round;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set round mode
|
|
||||||
*
|
|
||||||
* If round mode is activated the items list will work like a circle list,
|
|
||||||
* so when the user reaches the last item, the first one will popup.
|
|
||||||
*
|
|
||||||
* @param it The item of diskselector
|
|
||||||
* @param if or not set round mode
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_diskselector_round_set(Evas_Object * obj, Eina_Bool round)
|
elm_diskselector_round_set(Evas_Object * obj, Eina_Bool round)
|
||||||
{
|
{
|
||||||
|
@ -947,15 +902,6 @@ elm_diskselector_round_set(Evas_Object * obj, Eina_Bool round)
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the side labels max length
|
|
||||||
*
|
|
||||||
* @param obj The diskselector object
|
|
||||||
* @return The max length defined for side labels, or 0 if not a valid
|
|
||||||
* diskselector
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI int
|
EAPI int
|
||||||
elm_diskselector_side_label_length_get(const Evas_Object *obj)
|
elm_diskselector_side_label_length_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
@ -965,14 +911,6 @@ elm_diskselector_side_label_length_get(const Evas_Object *obj)
|
||||||
return wd->len_side;
|
return wd->len_side;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the side labels max length
|
|
||||||
*
|
|
||||||
* @param obj The diskselector object
|
|
||||||
* @param len The max length defined for side labels
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_diskselector_side_label_length_set(Evas_Object *obj, int len)
|
elm_diskselector_side_label_length_set(Evas_Object *obj, int len)
|
||||||
{
|
{
|
||||||
|
@ -994,19 +932,6 @@ elm_diskselector_side_label_lenght_get(const Evas_Object *obj)
|
||||||
return elm_diskselector_side_label_length_get(obj);
|
return elm_diskselector_side_label_length_get(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set bounce mode
|
|
||||||
*
|
|
||||||
* This will enable or disable the scroller bounce mode for the diskselector.
|
|
||||||
* See elm_scroller_bounce_set() for details. Horizontal bounce is enabled by
|
|
||||||
* default.
|
|
||||||
*
|
|
||||||
* @param obj The diskselector object
|
|
||||||
* @param h_bounce Allow bounce horizontally
|
|
||||||
* @param v_bounce Allow bounce vertically
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_diskselector_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
|
elm_diskselector_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
|
||||||
{
|
{
|
||||||
|
@ -1017,15 +942,6 @@ elm_diskselector_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bo
|
||||||
elm_smart_scroller_bounce_allow_set(wd->scroller, h_bounce, v_bounce);
|
elm_smart_scroller_bounce_allow_set(wd->scroller, h_bounce, v_bounce);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the bounce mode
|
|
||||||
*
|
|
||||||
* @param obj The Diskselector object
|
|
||||||
* @param h_bounce Allow bounce horizontally
|
|
||||||
* @param v_bounce Allow bounce vertically
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_diskselector_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce)
|
elm_diskselector_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce)
|
||||||
{
|
{
|
||||||
|
@ -1035,23 +951,6 @@ elm_diskselector_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bo
|
||||||
elm_smart_scroller_bounce_allow_get(wd->scroller, h_bounce, v_bounce);
|
elm_smart_scroller_bounce_allow_get(wd->scroller, h_bounce, v_bounce);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the scrollbar policy
|
|
||||||
*
|
|
||||||
* This sets the scrollbar visibility policy for the given scroller.
|
|
||||||
* ELM_SMART_SCROLLER_POLICY_AUTO means the scrollber is made visible if it
|
|
||||||
* is needed, and otherwise kept hidden. ELM_SMART_SCROLLER_POLICY_ON turns
|
|
||||||
* it on all the time, and ELM_SMART_SCROLLER_POLICY_OFF always keeps it off.
|
|
||||||
* This applies respectively for the horizontal and vertical scrollbars.
|
|
||||||
* The both are disabled by default.
|
|
||||||
*
|
|
||||||
* @param obj The diskselector object
|
|
||||||
* @param policy_h Horizontal scrollbar policy
|
|
||||||
* @param policy_v Vertical scrollbar policy
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_diskselector_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v)
|
elm_diskselector_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v)
|
||||||
{
|
{
|
||||||
|
@ -1064,23 +963,6 @@ elm_diskselector_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy
|
||||||
*policy_v = (Elm_Scroller_Policy) s_policy_v;
|
*policy_v = (Elm_Scroller_Policy) s_policy_v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the scrollbar policy
|
|
||||||
*
|
|
||||||
* This sets the scrollbar visibility policy for the given scroller.
|
|
||||||
* ELM_SMART_SCROLLER_POLICY_AUTO means the scrollber is made visible if it
|
|
||||||
* is needed, and otherwise kept hidden. ELM_SMART_SCROLLER_POLICY_ON turns
|
|
||||||
* it on all the time, and ELM_SMART_SCROLLER_POLICY_OFF always keeps it off.
|
|
||||||
* This applies respectively for the horizontal and vertical scrollbars.
|
|
||||||
* The both are disabled by default.
|
|
||||||
*
|
|
||||||
* @param obj The diskselector object
|
|
||||||
* @param policy_h Horizontal scrollbar policy
|
|
||||||
* @param policy_v Vertical scrollbar policy
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_diskselector_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v)
|
elm_diskselector_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v)
|
||||||
{
|
{
|
||||||
|
@ -1092,13 +974,6 @@ elm_diskselector_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy polic
|
||||||
elm_smart_scroller_policy_set(wd->scroller, policy_h, policy_v);
|
elm_smart_scroller_policy_set(wd->scroller, policy_h, policy_v);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Clears a diskselector of all items.
|
|
||||||
*
|
|
||||||
* @param obj The diskselector object
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_diskselector_clear(Evas_Object *obj)
|
elm_diskselector_clear(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
@ -1115,14 +990,6 @@ elm_diskselector_clear(Evas_Object *obj)
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a list of all the diskselector items.
|
|
||||||
*
|
|
||||||
* @param obj The diskselector object
|
|
||||||
* @return An Eina_List* of the diskselector items, or NULL on failure
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI const Eina_List *
|
EAPI const Eina_List *
|
||||||
elm_diskselector_items_get(const Evas_Object *obj)
|
elm_diskselector_items_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
@ -1132,19 +999,6 @@ elm_diskselector_items_get(const Evas_Object *obj)
|
||||||
return wd->items;
|
return wd->items;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Appends an item to the diskselector object.
|
|
||||||
*
|
|
||||||
* @param obj The diskselector object
|
|
||||||
* @param label The label of the diskselector item
|
|
||||||
* @param icon The icon object to use for the left side of the item
|
|
||||||
* @param func The function to call when the item is selected
|
|
||||||
* @param data The data to associate with the item for related callbacks
|
|
||||||
*
|
|
||||||
* @return The created item or NULL upon failure
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI Elm_Diskselector_Item *
|
EAPI Elm_Diskselector_Item *
|
||||||
elm_diskselector_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, const void *data)
|
elm_diskselector_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
|
@ -1186,13 +1040,6 @@ elm_diskselector_item_append(Evas_Object *obj, const char *label, Evas_Object *i
|
||||||
return it;
|
return it;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Delete the item
|
|
||||||
*
|
|
||||||
* @param it The item of diskselector
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_diskselector_item_del(Elm_Diskselector_Item * it)
|
elm_diskselector_item_del(Elm_Diskselector_Item * it)
|
||||||
{
|
{
|
||||||
|
@ -1293,14 +1140,6 @@ elm_diskselector_item_del(Elm_Diskselector_Item * it)
|
||||||
_sizing_eval(wd->self);
|
_sizing_eval(wd->self);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the label of item
|
|
||||||
*
|
|
||||||
* @param it The item of diskselector
|
|
||||||
* @return The label of item
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI const char *
|
EAPI const char *
|
||||||
elm_diskselector_item_label_get(const Elm_Diskselector_Item * it)
|
elm_diskselector_item_label_get(const Elm_Diskselector_Item * it)
|
||||||
{
|
{
|
||||||
|
@ -1308,14 +1147,6 @@ elm_diskselector_item_label_get(const Elm_Diskselector_Item * it)
|
||||||
return it->label;
|
return it->label;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the label of item
|
|
||||||
*
|
|
||||||
* @param it The item of diskselector
|
|
||||||
* @param label The label of item
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_diskselector_item_label_set(Elm_Diskselector_Item * it, const char *label)
|
elm_diskselector_item_label_set(Elm_Diskselector_Item * it, const char *label)
|
||||||
{
|
{
|
||||||
|
@ -1324,14 +1155,6 @@ elm_diskselector_item_label_set(Elm_Diskselector_Item * it, const char *label)
|
||||||
edje_object_part_text_set(it->base.view, "elm.text", it->label);
|
edje_object_part_text_set(it->base.view, "elm.text", it->label);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the selected item
|
|
||||||
*
|
|
||||||
* @param obj The diskselector object
|
|
||||||
* @return The selected diskselector item
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI Elm_Diskselector_Item *
|
EAPI Elm_Diskselector_Item *
|
||||||
elm_diskselector_selected_item_get(const Evas_Object *obj)
|
elm_diskselector_selected_item_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
@ -1341,19 +1164,6 @@ elm_diskselector_selected_item_get(const Evas_Object *obj)
|
||||||
return wd->selected_item;
|
return wd->selected_item;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the selected state of an item
|
|
||||||
*
|
|
||||||
* This sets the selected state (EINA_TRUE selected, EINA_FALSE not selected)
|
|
||||||
* of the given item @p it.
|
|
||||||
* If a new item is selected the previosly selected will be unselected.
|
|
||||||
* If the item @p it is unselected, the first item will be selected.
|
|
||||||
*
|
|
||||||
* @param it The diskselector item
|
|
||||||
* @param selected The selected state
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_diskselector_item_selected_set(Elm_Diskselector_Item *it, Eina_Bool selected)
|
elm_diskselector_item_selected_set(Elm_Diskselector_Item *it, Eina_Bool selected)
|
||||||
{
|
{
|
||||||
|
@ -1377,14 +1187,6 @@ elm_diskselector_item_selected_set(Elm_Diskselector_Item *it, Eina_Bool selected
|
||||||
ecore_idler_add(_move_scroller, it->base.widget);
|
ecore_idler_add(_move_scroller, it->base.widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Get the selected state of @p item.
|
|
||||||
*
|
|
||||||
* @param it The diskselector item
|
|
||||||
* @return If true, the item is selected
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
elm_diskselector_item_selected_get(const Elm_Diskselector_Item *it)
|
elm_diskselector_item_selected_get(const Elm_Diskselector_Item *it)
|
||||||
{
|
{
|
||||||
|
@ -1396,14 +1198,6 @@ elm_diskselector_item_selected_get(const Elm_Diskselector_Item *it)
|
||||||
return (wd->selected_item == it);
|
return (wd->selected_item == it);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the function called when a diskselector item is freed.
|
|
||||||
*
|
|
||||||
* @param it The item to set the callback on
|
|
||||||
* @param func The function called
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_diskselector_item_del_cb_set(Elm_Diskselector_Item *it, Evas_Smart_Cb func)
|
elm_diskselector_item_del_cb_set(Elm_Diskselector_Item *it, Evas_Smart_Cb func)
|
||||||
{
|
{
|
||||||
|
@ -1411,14 +1205,6 @@ elm_diskselector_item_del_cb_set(Elm_Diskselector_Item *it, Evas_Smart_Cb func)
|
||||||
elm_widget_item_del_cb_set(it, func);
|
elm_widget_item_del_cb_set(it, func);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the data associated with the item.
|
|
||||||
*
|
|
||||||
* @param it The diskselector item
|
|
||||||
* @return The data associated with @p it
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI void *
|
EAPI void *
|
||||||
elm_diskselector_item_data_get(const Elm_Diskselector_Item *it)
|
elm_diskselector_item_data_get(const Elm_Diskselector_Item *it)
|
||||||
{
|
{
|
||||||
|
@ -1426,14 +1212,6 @@ elm_diskselector_item_data_get(const Elm_Diskselector_Item *it)
|
||||||
return elm_widget_item_data_get(it);
|
return elm_widget_item_data_get(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the icon associated with the item.
|
|
||||||
*
|
|
||||||
* @param it The diskselector item
|
|
||||||
* @return The icon associated with @p it
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
elm_diskselector_item_icon_get(const Elm_Diskselector_Item *it)
|
elm_diskselector_item_icon_get(const Elm_Diskselector_Item *it)
|
||||||
{
|
{
|
||||||
|
@ -1441,18 +1219,6 @@ elm_diskselector_item_icon_get(const Elm_Diskselector_Item *it)
|
||||||
return it->icon;
|
return it->icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the icon associated with the item.
|
|
||||||
*
|
|
||||||
* Once the icon object is set, a previously set one will be deleted.
|
|
||||||
* You probably don't want, then, to have the <b>same</b> icon object set
|
|
||||||
* for more than one item of the diskselector.
|
|
||||||
*
|
|
||||||
* @param it The diskselector item
|
|
||||||
* @param icon The icon object to associate with @p it
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_diskselector_item_icon_set(Elm_Diskselector_Item *it, Evas_Object *icon)
|
elm_diskselector_item_icon_set(Elm_Diskselector_Item *it, Evas_Object *icon)
|
||||||
{
|
{
|
||||||
|
@ -1465,14 +1231,6 @@ elm_diskselector_item_icon_set(Elm_Diskselector_Item *it, Evas_Object *icon)
|
||||||
edje_object_part_swallow(it->base.view, "elm.swallow.icon", icon);
|
edje_object_part_swallow(it->base.view, "elm.swallow.icon", icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the item before @p it in the list.
|
|
||||||
*
|
|
||||||
* @param it The diskselector item
|
|
||||||
* @return The item before @p it, or NULL on failure
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI Elm_Diskselector_Item *
|
EAPI Elm_Diskselector_Item *
|
||||||
elm_diskselector_item_prev_get(const Elm_Diskselector_Item *it)
|
elm_diskselector_item_prev_get(const Elm_Diskselector_Item *it)
|
||||||
{
|
{
|
||||||
|
@ -1481,14 +1239,6 @@ elm_diskselector_item_prev_get(const Elm_Diskselector_Item *it)
|
||||||
else return NULL;
|
else return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the item after @p it in the list.
|
|
||||||
*
|
|
||||||
* @param it The diskselector item
|
|
||||||
* @return The item after @p it, or NULL on failure
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI Elm_Diskselector_Item *
|
EAPI Elm_Diskselector_Item *
|
||||||
elm_diskselector_item_next_get(const Elm_Diskselector_Item *it)
|
elm_diskselector_item_next_get(const Elm_Diskselector_Item *it)
|
||||||
{
|
{
|
||||||
|
@ -1497,14 +1247,6 @@ elm_diskselector_item_next_get(const Elm_Diskselector_Item *it)
|
||||||
else return NULL;
|
else return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the first item in the diskselector
|
|
||||||
*
|
|
||||||
* @param obj The diskselector object
|
|
||||||
* @return The first item, or NULL if none
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI Elm_Diskselector_Item *
|
EAPI Elm_Diskselector_Item *
|
||||||
elm_diskselector_first_item_get(const Evas_Object *obj)
|
elm_diskselector_first_item_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
@ -1518,14 +1260,6 @@ elm_diskselector_first_item_get(const Evas_Object *obj)
|
||||||
return eina_list_data_get(wd->items);
|
return eina_list_data_get(wd->items);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the last item in the diskselector
|
|
||||||
*
|
|
||||||
* @param obj The diskselector object
|
|
||||||
* @return The last item, or NULL if none
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI Elm_Diskselector_Item *
|
EAPI Elm_Diskselector_Item *
|
||||||
elm_diskselector_last_item_get(const Evas_Object *obj)
|
elm_diskselector_last_item_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
@ -1539,17 +1273,6 @@ elm_diskselector_last_item_get(const Evas_Object *obj)
|
||||||
return eina_list_data_get(eina_list_last(wd->items));
|
return eina_list_data_get(eina_list_last(wd->items));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the text to be shown in the diskselector item.
|
|
||||||
*
|
|
||||||
* @param item Target item
|
|
||||||
* @param text The text to set in the content
|
|
||||||
*
|
|
||||||
* Setup the text as tooltip to object. The item can have only one tooltip,
|
|
||||||
* so any previous tooltip data is removed.
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_diskselector_item_tooltip_text_set(Elm_Diskselector_Item *item, const char *text)
|
elm_diskselector_item_tooltip_text_set(Elm_Diskselector_Item *item, const char *text)
|
||||||
{
|
{
|
||||||
|
@ -1557,26 +1280,6 @@ elm_diskselector_item_tooltip_text_set(Elm_Diskselector_Item *item, const char *
|
||||||
elm_widget_item_tooltip_text_set(item, text);
|
elm_widget_item_tooltip_text_set(item, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the content to be shown in the tooltip item
|
|
||||||
*
|
|
||||||
* Setup the tooltip to item. The item can have only one tooltip,
|
|
||||||
* so any previous tooltip data is removed. @p func(with @p data) will
|
|
||||||
* be called every time that need show the tooltip and it should
|
|
||||||
* return a valid Evas_Object. This object is then managed fully by
|
|
||||||
* tooltip system and is deleted when the tooltip is gone.
|
|
||||||
*
|
|
||||||
* @param item the diskselector item being attached a tooltip.
|
|
||||||
* @param func the function used to create the tooltip contents.
|
|
||||||
* @param data what to provide to @a func as callback data/context.
|
|
||||||
* @param del_cb called when data is not needed anymore, either when
|
|
||||||
* another callback replaces @func, the tooltip is unset with
|
|
||||||
* elm_diskselector_item_tooltip_unset() or the owner @a item
|
|
||||||
* dies. This callback receives as the first parameter the
|
|
||||||
* given @a data, and @c event_info is the item.
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_diskselector_item_tooltip_content_cb_set(Elm_Diskselector_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb)
|
elm_diskselector_item_tooltip_content_cb_set(Elm_Diskselector_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb)
|
||||||
{
|
{
|
||||||
|
@ -1584,19 +1287,6 @@ elm_diskselector_item_tooltip_content_cb_set(Elm_Diskselector_Item *item, Elm_To
|
||||||
elm_widget_item_tooltip_content_cb_set(item, func, data, del_cb);
|
elm_widget_item_tooltip_content_cb_set(item, func, data, del_cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Unset tooltip from item
|
|
||||||
*
|
|
||||||
* @param item diskselector item to remove previously set tooltip.
|
|
||||||
*
|
|
||||||
* Remove tooltip from item. The callback provided as del_cb to
|
|
||||||
* elm_diskselector_item_tooltip_content_cb_set() will be called to notify
|
|
||||||
* it is not used anymore.
|
|
||||||
*
|
|
||||||
* @see elm_diskselector_item_tooltip_content_cb_set()
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_diskselector_item_tooltip_unset(Elm_Diskselector_Item *item)
|
elm_diskselector_item_tooltip_unset(Elm_Diskselector_Item *item)
|
||||||
{
|
{
|
||||||
|
@ -1604,18 +1294,6 @@ elm_diskselector_item_tooltip_unset(Elm_Diskselector_Item *item)
|
||||||
elm_widget_item_tooltip_unset(item);
|
elm_widget_item_tooltip_unset(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets a different style for this item tooltip.
|
|
||||||
*
|
|
||||||
* @note before you set a style you should define a tooltip with
|
|
||||||
* elm_diskselector_item_tooltip_content_cb_set() or
|
|
||||||
* elm_diskselector_item_tooltip_text_set()
|
|
||||||
*
|
|
||||||
* @param item diskselector item with tooltip already set.
|
|
||||||
* @param style the theme style to use (default, transparent, ...)
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_diskselector_item_tooltip_style_set(Elm_Diskselector_Item *item, const char *style)
|
elm_diskselector_item_tooltip_style_set(Elm_Diskselector_Item *item, const char *style)
|
||||||
{
|
{
|
||||||
|
@ -1623,15 +1301,6 @@ elm_diskselector_item_tooltip_style_set(Elm_Diskselector_Item *item, const char
|
||||||
elm_widget_item_tooltip_style_set(item, style);
|
elm_widget_item_tooltip_style_set(item, style);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the style for this item tooltip.
|
|
||||||
*
|
|
||||||
* @param item diskselector item with tooltip already set.
|
|
||||||
* @return style the theme style in use, defaults to "default". If the
|
|
||||||
* object does not have a tooltip set, then NULL is returned.
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI const char *
|
EAPI const char *
|
||||||
elm_diskselector_item_tooltip_style_get(const Elm_Diskselector_Item *item)
|
elm_diskselector_item_tooltip_style_get(const Elm_Diskselector_Item *item)
|
||||||
{
|
{
|
||||||
|
@ -1639,15 +1308,6 @@ elm_diskselector_item_tooltip_style_get(const Elm_Diskselector_Item *item)
|
||||||
return elm_widget_item_tooltip_style_get(item);
|
return elm_widget_item_tooltip_style_get(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the cursor to be shown when mouse is over the diskselector item
|
|
||||||
*
|
|
||||||
* @param item Target item
|
|
||||||
* @param cursor the cursor name to be used.
|
|
||||||
*
|
|
||||||
* @see elm_object_cursor_set()
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_diskselector_item_cursor_set(Elm_Diskselector_Item *item, const char *cursor)
|
elm_diskselector_item_cursor_set(Elm_Diskselector_Item *item, const char *cursor)
|
||||||
{
|
{
|
||||||
|
@ -1655,14 +1315,6 @@ elm_diskselector_item_cursor_set(Elm_Diskselector_Item *item, const char *cursor
|
||||||
elm_widget_item_cursor_set(item, cursor);
|
elm_widget_item_cursor_set(item, cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the cursor to be shown when mouse is over the diskselector item
|
|
||||||
*
|
|
||||||
* @param item diskselector item with cursor already set.
|
|
||||||
* @return the cursor name.
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI const char *
|
EAPI const char *
|
||||||
elm_diskselector_item_cursor_get(const Elm_Diskselector_Item *item)
|
elm_diskselector_item_cursor_get(const Elm_Diskselector_Item *item)
|
||||||
{
|
{
|
||||||
|
@ -1670,14 +1322,6 @@ elm_diskselector_item_cursor_get(const Elm_Diskselector_Item *item)
|
||||||
return elm_widget_item_cursor_get(item);
|
return elm_widget_item_cursor_get(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Unset the cursor to be shown when mouse is over the diskselector item
|
|
||||||
*
|
|
||||||
* @param item Target item
|
|
||||||
*
|
|
||||||
* @see elm_object_cursor_unset()
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_diskselector_item_cursor_unset(Elm_Diskselector_Item *item)
|
elm_diskselector_item_cursor_unset(Elm_Diskselector_Item *item)
|
||||||
{
|
{
|
||||||
|
@ -1685,17 +1329,6 @@ elm_diskselector_item_cursor_unset(Elm_Diskselector_Item *item)
|
||||||
elm_widget_item_cursor_unset(item);
|
elm_widget_item_cursor_unset(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets a different style for this item cursor.
|
|
||||||
*
|
|
||||||
* @note before you set a style you should define a cursor with
|
|
||||||
* elm_diskselector_item_cursor_set()
|
|
||||||
*
|
|
||||||
* @param item diskselector item with cursor already set.
|
|
||||||
* @param style the theme style to use (default, transparent, ...)
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_diskselector_item_cursor_style_set(Elm_Diskselector_Item *item, const char *style)
|
elm_diskselector_item_cursor_style_set(Elm_Diskselector_Item *item, const char *style)
|
||||||
{
|
{
|
||||||
|
@ -1703,15 +1336,6 @@ elm_diskselector_item_cursor_style_set(Elm_Diskselector_Item *item, const char *
|
||||||
elm_widget_item_cursor_style_set(item, style);
|
elm_widget_item_cursor_style_set(item, style);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the style for this item cursor.
|
|
||||||
*
|
|
||||||
* @param item diskselector item with cursor already set.
|
|
||||||
* @return style the theme style in use, defaults to "default". If the
|
|
||||||
* object does not have a cursor set, then NULL is returned.
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI const char *
|
EAPI const char *
|
||||||
elm_diskselector_item_cursor_style_get(const Elm_Diskselector_Item *item)
|
elm_diskselector_item_cursor_style_get(const Elm_Diskselector_Item *item)
|
||||||
{
|
{
|
||||||
|
@ -1719,20 +1343,6 @@ elm_diskselector_item_cursor_style_get(const Elm_Diskselector_Item *item)
|
||||||
return elm_widget_item_cursor_style_get(item);
|
return elm_widget_item_cursor_style_get(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set if the cursor set should be searched on the theme or should use
|
|
||||||
* the provided by the engine, only.
|
|
||||||
*
|
|
||||||
* @note before you set if should look on theme you should define a cursor
|
|
||||||
* with elm_object_cursor_set(). By default it will only look for cursors
|
|
||||||
* provided by the engine.
|
|
||||||
*
|
|
||||||
* @param item widget item with cursor already set.
|
|
||||||
* @param engine_only boolean to define it cursors should be looked only
|
|
||||||
* between the provided by the engine or searched on widget's theme as well.
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_diskselector_item_cursor_engine_only_set(Elm_Diskselector_Item *item, Eina_Bool engine_only)
|
elm_diskselector_item_cursor_engine_only_set(Elm_Diskselector_Item *item, Eina_Bool engine_only)
|
||||||
{
|
{
|
||||||
|
@ -1740,30 +1350,13 @@ elm_diskselector_item_cursor_engine_only_set(Elm_Diskselector_Item *item, Eina_B
|
||||||
elm_widget_item_cursor_engine_only_set(item, engine_only);
|
elm_widget_item_cursor_engine_only_set(item, engine_only);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the cursor engine only usage for this item cursor.
|
|
||||||
*
|
|
||||||
* @param item widget item with cursor already set.
|
|
||||||
* @return engine_only boolean to define it cursors should be looked only
|
|
||||||
* between the provided by the engine or searched on widget's theme as well. If
|
|
||||||
* the object does not have a cursor set, then EINA_FALSE is returned.
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
elm_diskselector_item_cursor_engine_only_get(const Elm_Diskselector_Item *item)
|
elm_diskselector_item_cursor_engine_only_get(const Elm_Diskselector_Item *item)
|
||||||
{
|
{
|
||||||
ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(item, EINA_FALSE);
|
ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(item, EINA_FALSE);
|
||||||
return elm_widget_item_cursor_engine_only_get(item);
|
return elm_widget_item_cursor_engine_only_get(item);
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* Set the number of items to be displayed
|
|
||||||
*
|
|
||||||
* @param obj The diskselector object
|
|
||||||
* @param num The number of itmes that diskselector will display
|
|
||||||
*
|
|
||||||
* @ingroup Diskselector
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_diskselector_display_item_num_set(Evas_Object *obj, int num)
|
elm_diskselector_display_item_num_set(Evas_Object *obj, int num)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue