more launcher test code.... and mapbuf object used by launcher test code.
SVN revision: 45575
This commit is contained in:
parent
99cea068ba
commit
f7a8067a66
|
@ -22300,8 +22300,10 @@ group
|
|||
type: SWALLOW;
|
||||
description
|
||||
{
|
||||
fixed: 1 1;
|
||||
state: "default" 0.0;
|
||||
align: 0.0 0.0;
|
||||
rel2.relative: 1.0 0.0;
|
||||
}
|
||||
}
|
||||
part
|
||||
|
@ -22324,8 +22326,10 @@ group
|
|||
type: SWALLOW;
|
||||
description
|
||||
{
|
||||
fixed: 1 1;
|
||||
state: "default" 0.0;
|
||||
align: 0.0 1.0;
|
||||
rel1.relative: 0.0 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,57 @@
|
|||
#include <Elementary.h>
|
||||
#ifndef ELM_LIB_QUICKLAUNCH
|
||||
|
||||
static void
|
||||
mode_cb(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
Evas_Object *mb = data;
|
||||
if (elm_mapbuf_enabled_get(mb))
|
||||
elm_mapbuf_enabled_set(mb, 0);
|
||||
else
|
||||
elm_mapbuf_enabled_set(mb, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
full_cb(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
Evas_Object *win = data;
|
||||
elm_win_fullscreen_set(win, !elm_win_fullscreen_get(win));
|
||||
}
|
||||
|
||||
static void
|
||||
alpha_cb(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
Evas_Object *mb = data;
|
||||
elm_mapbuf_alpha_set(mb, elm_check_state_get(obj));
|
||||
}
|
||||
|
||||
static void
|
||||
smooth_cb(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
Evas_Object *mb = data;
|
||||
elm_mapbuf_smooth_set(mb, elm_check_state_get(obj));
|
||||
}
|
||||
|
||||
static void
|
||||
close_cb(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
Evas_Object *win = data;
|
||||
evas_object_del(data);
|
||||
}
|
||||
|
||||
void
|
||||
test_launcher(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
Evas_Object *win, *bg, *sc, *tb, *pad;
|
||||
Evas_Object *win, *bg, *sc, *tb, *pad, *bt, *ic, *lb, *tb2, *mb, *ck;
|
||||
int i, j, k, n, m;
|
||||
char buf[PATH_MAX];
|
||||
const char *names[] =
|
||||
{
|
||||
"Hello", "World", "Things", "Should",
|
||||
"Work", "Great", "These", "Days",
|
||||
"Lots", "Of", "Labels", "Make",
|
||||
"Everyone", "Happy", "And", "Calm"
|
||||
};
|
||||
|
||||
win = elm_win_add(NULL, "launcher", ELM_WIN_BASIC);
|
||||
elm_win_title_set(win, "Launcher");
|
||||
|
@ -14,13 +60,15 @@ test_launcher(void *data, Evas_Object *obj, void *event_info)
|
|||
bg = elm_bg_add(win);
|
||||
snprintf(buf, sizeof(buf), "%s/images/sky_04.jpg", PACKAGE_DATA_DIR);
|
||||
elm_bg_file_set(bg, buf, NULL);
|
||||
elm_win_resize_object_add(win, bg);
|
||||
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_win_resize_object_add(win, bg);
|
||||
evas_object_show(bg);
|
||||
|
||||
|
||||
mb = elm_mapbuf_add(win);
|
||||
|
||||
tb = elm_table_add(win);
|
||||
evas_object_size_hint_weight_set(bg, 0.0, 0.0);
|
||||
evas_object_size_hint_align_set(bg, 0.5, 0.5);
|
||||
evas_object_size_hint_weight_set(tb, 0.0, 0.0);
|
||||
evas_object_size_hint_align_set(tb, 0.5, 0.5);
|
||||
n = 0; m = 0;
|
||||
for (k = 0 ; k < 5; k++)
|
||||
{
|
||||
|
@ -52,15 +100,6 @@ test_launcher(void *data, Evas_Object *obj, void *event_info)
|
|||
{
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
Evas_Object *ic, *lb;
|
||||
const char *names[] =
|
||||
{
|
||||
"Hello", "World", "Things", "Should",
|
||||
"Work", "Great", "These", "Days",
|
||||
"Lots", "Of", "Labels", "Make",
|
||||
"Everyone", "Happy", "And", "Calm"
|
||||
};
|
||||
|
||||
ic = elm_icon_add(win);
|
||||
snprintf(buf, sizeof(buf), "%s/images/icon_%02i.png", PACKAGE_DATA_DIR, n);
|
||||
elm_icon_file_set(ic, buf, NULL);
|
||||
|
@ -83,6 +122,8 @@ test_launcher(void *data, Evas_Object *obj, void *event_info)
|
|||
}
|
||||
}
|
||||
}
|
||||
elm_mapbuf_content_set(mb, tb);
|
||||
evas_object_show(tb);
|
||||
|
||||
sc = elm_scroller_add(win);
|
||||
elm_scroller_bounce_set(sc, 1, 0);
|
||||
|
@ -90,13 +131,63 @@ test_launcher(void *data, Evas_Object *obj, void *event_info)
|
|||
evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_win_resize_object_add(win, sc);
|
||||
|
||||
elm_scroller_content_set(sc, tb);
|
||||
evas_object_show(tb);
|
||||
elm_scroller_content_set(sc, mb);
|
||||
evas_object_show(mb);
|
||||
|
||||
elm_scroller_page_relative_set(sc, 1.0, 1.0);
|
||||
// elm_scroller_page_size_set(sc, 200, 200);
|
||||
evas_object_show(sc);
|
||||
|
||||
|
||||
tb2 = elm_table_add(win);
|
||||
evas_object_size_hint_weight_set(tb2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_win_resize_object_add(win, tb2);
|
||||
|
||||
ck = elm_check_add(win);
|
||||
elm_check_label_set(ck, "Mapbuf");
|
||||
elm_check_state_set(ck, 0);
|
||||
evas_object_smart_callback_add(ck, "changed", mode_cb, mb);
|
||||
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(ck, 0.05, 0.99);
|
||||
elm_table_pack(tb2, ck, 0, 0, 1, 1);
|
||||
evas_object_show(ck);
|
||||
|
||||
ck = elm_check_add(win);
|
||||
elm_check_label_set(ck, "Alpha");
|
||||
elm_check_state_set(ck, 1);
|
||||
evas_object_smart_callback_add(ck, "changed", alpha_cb, mb);
|
||||
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(ck, 0.20, 0.99);
|
||||
elm_table_pack(tb2, ck, 1, 0, 1, 1);
|
||||
evas_object_show(ck);
|
||||
|
||||
ck = elm_check_add(win);
|
||||
elm_check_label_set(ck, "Smooth");
|
||||
elm_check_state_set(ck, 1);
|
||||
evas_object_smart_callback_add(ck, "changed", smooth_cb, mb);
|
||||
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(ck, 0.40, 0.99);
|
||||
elm_table_pack(tb2, ck, 2, 0, 1, 1);
|
||||
evas_object_show(ck);
|
||||
|
||||
ck = elm_check_add(win);
|
||||
elm_check_label_set(ck, "Fullscreen");
|
||||
elm_check_state_set(ck, 0);
|
||||
evas_object_smart_callback_add(ck, "changed", full_cb, win);
|
||||
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(ck, 0.5, 0.99);
|
||||
elm_table_pack(tb2, ck, 3, 0, 1, 1);
|
||||
evas_object_show(ck);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_button_label_set(bt, "Close");
|
||||
evas_object_smart_callback_add(bt, "clicked", close_cb, win);
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(bt, 0.95, 0.99);
|
||||
elm_table_pack(tb2, bt, 4, 0, 1, 1);
|
||||
evas_object_show(bt);
|
||||
|
||||
evas_object_show(tb2);
|
||||
|
||||
evas_object_resize(win, 480, 800);
|
||||
evas_object_show(win);
|
||||
}
|
||||
|
|
|
@ -1283,6 +1283,15 @@ extern "C" {
|
|||
EAPI Evas_Object *elm_conformant_add(Evas_Object *parent);
|
||||
EAPI void elm_conformant_content_set(Evas_Object *obj, Evas_Object *content);
|
||||
|
||||
EAPI Evas_Object *elm_mapbuf_add(Evas_Object *parent);
|
||||
EAPI void elm_mapbuf_content_set(Evas_Object *obj, Evas_Object *content);
|
||||
EAPI void elm_mapbuf_enabled_set(Evas_Object *obj, Eina_Bool enabled);
|
||||
EAPI Eina_Bool elm_mapbuf_enabled_get(const Evas_Object *obj);
|
||||
EAPI void elm_mapbuf_smooth_set(Evas_Object *obj, Eina_Bool smooth);
|
||||
EAPI Eina_Bool elm_mapbuf_smooth_get(const Evas_Object *obj);
|
||||
EAPI void elm_mapbuf_alpha_set(Evas_Object *obj, Eina_Bool alpha);
|
||||
EAPI Eina_Bool elm_mapbuf_alpha_get(const Evas_Object *obj);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -70,6 +70,7 @@ elm_panel.c \
|
|||
elm_map.c \
|
||||
elm_flip.c \
|
||||
elm_conform.c \
|
||||
elm_mapbuf.c \
|
||||
\
|
||||
elc_notepad.c \
|
||||
elc_anchorview.c \
|
||||
|
|
|
@ -65,28 +65,32 @@ elm_conformant_add(Evas_Object *parent)
|
|||
_elm_theme_set(wd->base, "conformant", "base", "default");
|
||||
elm_widget_resize_object_set(obj, wd->base);
|
||||
|
||||
// FIXME: broken. doesnt handle property changes, keyboard popup or not
|
||||
// etc. doesnt gettop helf geometry either.
|
||||
#ifdef HAVE_ELEMENTARY_X
|
||||
int sh = -1;
|
||||
|
||||
ecore_x_e_illume_top_shelf_geometry_get(ecore_x_window_root_first_get(),
|
||||
NULL, NULL, NULL, &sh);
|
||||
if (sh < 0) sh = 32;
|
||||
printf("sh0: %i\n", sh);
|
||||
if (sh < 1) sh = 1;
|
||||
|
||||
wd->shelf = evas_object_rectangle_add(evas);
|
||||
evas_object_color_set(wd->shelf, 0, 0, 0, 0);
|
||||
evas_object_size_hint_min_set(wd->shelf, -1, sh);
|
||||
evas_object_size_hint_max_set(wd->shelf, -1, sh);
|
||||
evas_object_size_hint_min_set(wd->shelf, 0, sh);
|
||||
evas_object_size_hint_max_set(wd->shelf, -1, -1);
|
||||
edje_object_part_swallow(wd->base, "elm.swallow.shelf", wd->shelf);
|
||||
|
||||
sh = -1;
|
||||
ecore_x_e_illume_bottom_panel_geometry_get(ecore_x_window_root_first_get(),
|
||||
NULL, NULL, NULL, &sh);
|
||||
if (sh < 0) sh = 32;
|
||||
printf("sh1: %i\n", sh);
|
||||
if (sh < 1) sh = 1;
|
||||
|
||||
wd->panel = evas_object_rectangle_add(evas);
|
||||
evas_object_color_set(wd->panel, 0, 0, 0, 0);
|
||||
evas_object_size_hint_min_set(wd->panel, -1, sh);
|
||||
evas_object_size_hint_max_set(wd->panel, -1, sh);
|
||||
evas_object_size_hint_min_set(wd->panel, 0, sh);
|
||||
evas_object_size_hint_max_set(wd->panel, -1, -1);
|
||||
edje_object_part_swallow(wd->base, "elm.swallow.panel", wd->panel);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#include <Elementary.h>
|
||||
#include "elm_priv.h"
|
||||
|
||||
#if 1 // working on it
|
||||
|
||||
/**
|
||||
* @defgroup Flip Flip
|
||||
*
|
||||
|
@ -29,6 +27,8 @@ static void _sizing_eval(Evas_Object *obj);
|
|||
static void _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
||||
static void _sub_del(void *data, Evas_Object *obj, void *event_info);
|
||||
|
||||
static void _configure(Evas_Object *obj);
|
||||
|
||||
static void
|
||||
_del_hook(Evas_Object *obj)
|
||||
{
|
||||
|
@ -210,6 +210,7 @@ _flip(Evas_Object *obj)
|
|||
evas_object_map_enable_set(wd->back.content, 0);
|
||||
wd->animator = NULL;
|
||||
wd->state = !wd->state;
|
||||
_configure(obj);
|
||||
evas_object_smart_callback_call(obj, "animate,done", NULL);
|
||||
return 0;
|
||||
}
|
||||
|
@ -224,12 +225,14 @@ _configure(Evas_Object *obj)
|
|||
evas_object_geometry_get(obj, &x, &y, &w, &h);
|
||||
if (wd->front.content)
|
||||
{
|
||||
evas_object_move(wd->front.content, x, y);
|
||||
if (!wd->animator)
|
||||
evas_object_move(wd->front.content, x, y);
|
||||
evas_object_resize(wd->front.content, w, h);
|
||||
}
|
||||
if (wd->back.content)
|
||||
{
|
||||
evas_object_move(wd->back.content, x, y);
|
||||
if (!wd->animator)
|
||||
evas_object_move(wd->back.content, x, y);
|
||||
evas_object_resize(wd->back.content, w, h);
|
||||
}
|
||||
_flip(obj);
|
||||
|
@ -383,4 +386,3 @@ elm_flip_go(Evas_Object *obj, Elm_Flip_Mode mode)
|
|||
wd->start = ecore_loop_time_get();
|
||||
wd->len = 0.5;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,253 @@
|
|||
#include <Elementary.h>
|
||||
#include "elm_priv.h"
|
||||
|
||||
#if 1 // working on it
|
||||
|
||||
/**
|
||||
* @defgroup Mapbuf Mapbuf
|
||||
*
|
||||
* This holds 1 content object and uses an Evas Map to move/resize etc. it.
|
||||
*/
|
||||
|
||||
typedef struct _Widget_Data Widget_Data;
|
||||
|
||||
struct _Widget_Data
|
||||
{
|
||||
Evas_Object *content;
|
||||
Eina_Bool enabled : 1;
|
||||
Eina_Bool alpha : 1;
|
||||
Eina_Bool smooth : 1;
|
||||
};
|
||||
|
||||
static void _del_hook(Evas_Object *obj);
|
||||
static void _theme_hook(Evas_Object *obj);
|
||||
static void _sizing_eval(Evas_Object *obj);
|
||||
static void _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
||||
static void _sub_del(void *data, Evas_Object *obj, void *event_info);
|
||||
|
||||
static void
|
||||
_del_hook(Evas_Object *obj)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
free(wd);
|
||||
}
|
||||
|
||||
static void
|
||||
_theme_hook(Evas_Object *obj)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
_sizing_eval(obj);
|
||||
}
|
||||
|
||||
static void
|
||||
_sizing_eval(Evas_Object *obj)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
Evas_Coord minw = -1, minh = -1, minw2 = -1, minh2 = -1;
|
||||
Evas_Coord maxw = -1, maxh = -1, maxw2 = -1, maxh2 = -1;
|
||||
|
||||
if (wd->content)
|
||||
{
|
||||
evas_object_size_hint_min_get(wd->content, &minw, &minh);
|
||||
evas_object_size_hint_max_get(wd->content, &maxw, &maxh);
|
||||
}
|
||||
|
||||
evas_object_size_hint_min_set(obj, minw, minh);
|
||||
evas_object_size_hint_max_set(obj, maxw, maxh);
|
||||
}
|
||||
|
||||
static void
|
||||
_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(data);
|
||||
_sizing_eval(data);
|
||||
}
|
||||
|
||||
static void
|
||||
_sub_del(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
Evas_Object *sub = event_info;
|
||||
|
||||
if (sub == wd->content)
|
||||
{
|
||||
evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
_changed_size_hints, obj);
|
||||
wd->content = NULL;
|
||||
_sizing_eval(obj);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_mapbuf(Evas_Object *obj)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
Evas_Coord x, y, w, h;
|
||||
|
||||
evas_object_geometry_get(obj, &x, &y, &w, &h);
|
||||
if (wd->enabled)
|
||||
{
|
||||
Evas_Map *m;
|
||||
Evas_Coord cx, cy, cz, px, py, foc;
|
||||
|
||||
evas_object_map_set(wd->content, NULL);
|
||||
evas_object_map_enable_set(wd->content, 0);
|
||||
m = evas_map_new(4);
|
||||
evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0);
|
||||
evas_map_smooth_set(m, wd->smooth);
|
||||
evas_map_alpha_set(m, wd->alpha);
|
||||
evas_object_map_set(wd->content, m);
|
||||
evas_object_map_enable_set(wd->content, wd->enabled);
|
||||
evas_map_free(m);
|
||||
}
|
||||
else
|
||||
{
|
||||
evas_object_map_set(wd->content, NULL);
|
||||
evas_object_map_enable_set(wd->content, 0);
|
||||
evas_object_move(wd->content, x, y);
|
||||
evas_object_resize(wd->content, w, h);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_configure(Evas_Object *obj)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
Evas_Coord x, y, w, h;
|
||||
evas_object_geometry_get(obj, &x, &y, &w, &h);
|
||||
if (wd->content)
|
||||
{
|
||||
if (!wd->enabled) evas_object_move(wd->content, x, y);
|
||||
evas_object_resize(wd->content, w, h);
|
||||
_mapbuf(obj);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_move(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
_configure(obj);
|
||||
}
|
||||
|
||||
static void
|
||||
_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
_configure(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new mapbuf to the parent
|
||||
*
|
||||
* @param parent The parent object
|
||||
* @return The new object or NULL if it cannot be created
|
||||
*
|
||||
* @ingroup Mapbuf
|
||||
*/
|
||||
EAPI Evas_Object *
|
||||
elm_mapbuf_add(Evas_Object *parent)
|
||||
{
|
||||
Evas_Object *obj;
|
||||
Evas *e;
|
||||
Widget_Data *wd;
|
||||
|
||||
wd = ELM_NEW(Widget_Data);
|
||||
e = evas_object_evas_get(parent);
|
||||
obj = elm_widget_add(e);
|
||||
elm_widget_type_set(obj, "mapbuf");
|
||||
elm_widget_sub_object_add(parent, obj);
|
||||
elm_widget_data_set(obj, wd);
|
||||
elm_widget_del_hook_set(obj, _del_hook);
|
||||
elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
|
||||
evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
|
||||
evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE, _move, NULL);
|
||||
evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _resize, NULL);
|
||||
|
||||
wd->enabled = 0;
|
||||
wd->alpha = 1;
|
||||
wd->smooth = 1;
|
||||
|
||||
_sizing_eval(obj);
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the mapbuf front content
|
||||
*
|
||||
* @param obj The mapbuf object
|
||||
* @param content The content will be filled in this mapbuf object
|
||||
*
|
||||
* @ingroup Mapbuf
|
||||
*/
|
||||
EAPI void
|
||||
elm_mapbuf_content_set(Evas_Object *obj, Evas_Object *content)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
|
||||
if ((wd->content != content) && (wd->content))
|
||||
{
|
||||
elm_widget_sub_object_del(obj, wd->content);
|
||||
evas_object_smart_member_del(wd->content);
|
||||
}
|
||||
wd->content = content;
|
||||
if (content)
|
||||
{
|
||||
elm_widget_sub_object_add(content, obj);
|
||||
evas_object_smart_member_add(obj, content);
|
||||
evas_object_event_callback_add(content,
|
||||
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
_changed_size_hints, obj);
|
||||
_sizing_eval(obj);
|
||||
}
|
||||
_configure(obj);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_mapbuf_enabled_set(Evas_Object *obj, Eina_Bool enabled)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (wd->enabled == enabled) return;
|
||||
wd->enabled = enabled;
|
||||
_configure(obj);
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_mapbuf_enabled_get(const Evas_Object *obj)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
return wd->enabled;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_mapbuf_smooth_set(Evas_Object *obj, Eina_Bool smooth)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (wd->smooth == smooth) return;
|
||||
wd->smooth = smooth;
|
||||
_configure(obj);
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_mapbuf_smooth_get(const Evas_Object *obj)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
return wd->smooth;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_mapbuf_alpha_set(Evas_Object *obj, Eina_Bool alpha)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (wd->alpha == alpha) return;
|
||||
wd->alpha = alpha;
|
||||
_configure(obj);
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_mapbuf_alpha_get(const Evas_Object *obj)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
return wd->alpha;
|
||||
}
|
||||
|
||||
#endif
|
|
@ -5,7 +5,7 @@
|
|||
#include "elm_priv.h"
|
||||
|
||||
/**
|
||||
* @defgroup Menu menu
|
||||
* @defgroup Menu Menu
|
||||
*
|
||||
* A menu is a list of items display on top of the window. Each item can have a sub-menu. It can be used to
|
||||
* display a menu on right click, in a toolbar ...
|
||||
|
@ -475,6 +475,8 @@ elm_menu_add(Evas_Object *parent)
|
|||
*
|
||||
* @param obj The menu object.
|
||||
* @param parent The new parent.
|
||||
*
|
||||
* @ingroup Menu
|
||||
*/
|
||||
EAPI void
|
||||
elm_menu_parent_set(Evas_Object *obj, Evas_Object *parent)
|
||||
|
@ -510,6 +512,8 @@ elm_menu_parent_set(Evas_Object *obj, Evas_Object *parent)
|
|||
* @param obj The menu object.
|
||||
* @param x The new position.
|
||||
* @param y The new position.
|
||||
*
|
||||
* @ingroup Menu
|
||||
*/
|
||||
EAPI void
|
||||
elm_menu_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
||||
|
@ -526,6 +530,8 @@ elm_menu_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
|||
* Get the Evas_Object of an Elm_Menu_Item
|
||||
*
|
||||
* @param it The menu item object.
|
||||
*
|
||||
* @ingroup Menu
|
||||
*/
|
||||
EAPI Evas_Object *
|
||||
elm_menu_object_get(const Elm_Menu_Item *it)
|
||||
|
@ -537,12 +543,13 @@ elm_menu_object_get(const Elm_Menu_Item *it)
|
|||
* Add an item at the end
|
||||
*
|
||||
* @param obj The menu object.
|
||||
* @param icon A icon display on the item. The icon will be destryed by the
|
||||
* menu.
|
||||
* @param icon A icon display on the item. The icon will be destryed by the menu.
|
||||
* @param label The label of the item.
|
||||
* @param func Function called when the user select the item.
|
||||
* @param data Data sent by the callback.
|
||||
* #return Returns the new item.
|
||||
* @return Returns the new item.
|
||||
*
|
||||
* @ingroup Menu
|
||||
*/
|
||||
EAPI Elm_Menu_Item *
|
||||
elm_menu_item_add(Evas_Object *obj, Elm_Menu_Item *parent, Evas_Object *icon, const char *label, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data)
|
||||
|
|
Loading…
Reference in New Issue