2008-09-29 23:58:56 -07:00
|
|
|
#ifndef ELM_PRIV_H
|
|
|
|
#define ELM_PRIV_H
|
2008-12-18 16:34:56 -08:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "elementary_config.h"
|
|
|
|
#endif
|
2008-12-09 22:33:24 -08:00
|
|
|
#ifdef HAVE_ELEMENTARY_X
|
2008-12-18 17:23:34 -08:00
|
|
|
# include <Ecore_X.h>
|
2008-12-09 22:33:24 -08:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_ELEMENTARY_FB
|
2008-12-18 17:23:34 -08:00
|
|
|
# include <Ecore_Fb.h>
|
2008-12-09 22:33:24 -08:00
|
|
|
#endif
|
2008-12-18 16:34:56 -08:00
|
|
|
#ifdef HAVE_ELEMENTARY_WINCE
|
2008-12-18 17:23:34 -08:00
|
|
|
# include <Ecore_WinCE.h>
|
2008-12-08 21:40:38 -08:00
|
|
|
#endif
|
|
|
|
|
2008-09-29 23:58:56 -07:00
|
|
|
#include "els_pan.h"
|
|
|
|
#include "els_scroller.h"
|
|
|
|
#include "els_box.h"
|
|
|
|
#include "els_icon.h"
|
|
|
|
|
2010-09-09 18:54:05 -07:00
|
|
|
|
|
|
|
#define CRITICAL(...) EINA_LOG_DOM_CRIT(_elm_log_dom, __VA_ARGS__)
|
|
|
|
#define ERR(...) EINA_LOG_DOM_ERR(_elm_log_dom, __VA_ARGS__)
|
|
|
|
#define WRN(...) EINA_LOG_DOM_WARN(_elm_log_dom, __VA_ARGS__)
|
|
|
|
#define INF(...) EINA_LOG_DOM_INFO(_elm_log_dom, __VA_ARGS__)
|
|
|
|
#define DBG(...) EINA_LOG_DOM_DBG(_elm_log_dom, __VA_ARGS__)
|
|
|
|
|
2008-09-29 23:58:56 -07:00
|
|
|
// FIXME: totally disorganised. clean this up!
|
2009-09-28 21:35:35 -07:00
|
|
|
//
|
2009-09-23 15:56:47 -07:00
|
|
|
// Why EAPI in a private header ?
|
2009-09-28 21:35:35 -07:00
|
|
|
// EAPI is temporaty - that widget api will change, but makign it EAPI right now to indicate its bound for externalness
|
2008-09-29 23:58:56 -07:00
|
|
|
|
2010-05-11 18:03:46 -07:00
|
|
|
struct _Elm_Theme
|
|
|
|
{
|
|
|
|
Eina_List *overlay;
|
|
|
|
Eina_List *themes;
|
|
|
|
Eina_List *extension;
|
|
|
|
Eina_Hash *cache;
|
|
|
|
const char *theme;
|
|
|
|
int ref;
|
|
|
|
};
|
|
|
|
|
2008-09-29 23:58:56 -07:00
|
|
|
typedef enum _Elm_Engine
|
|
|
|
{
|
|
|
|
ELM_SOFTWARE_X11,
|
|
|
|
ELM_SOFTWARE_FB,
|
2010-01-19 07:34:24 -08:00
|
|
|
ELM_SOFTWARE_DIRECTFB,
|
2008-09-29 23:58:56 -07:00
|
|
|
ELM_SOFTWARE_16_X11,
|
|
|
|
ELM_XRENDER_X11,
|
2008-12-18 16:34:56 -08:00
|
|
|
ELM_OPENGL_X11,
|
2009-01-22 13:43:07 -08:00
|
|
|
ELM_SOFTWARE_WIN32,
|
2010-01-13 00:17:15 -08:00
|
|
|
ELM_SOFTWARE_16_WINCE,
|
|
|
|
ELM_SOFTWARE_SDL,
|
2010-02-04 10:34:44 -08:00
|
|
|
ELM_SOFTWARE_16_SDL,
|
|
|
|
ELM_OPENGL_SDL
|
2008-09-29 23:58:56 -07:00
|
|
|
} Elm_Engine;
|
|
|
|
|
|
|
|
typedef struct _Elm_Config Elm_Config;
|
|
|
|
|
2010-09-02 07:33:04 -07:00
|
|
|
/* increment this whenever we change config enough that you need new
|
|
|
|
* defaults for elm to work.
|
|
|
|
*/
|
|
|
|
#define ELM_CONFIG_EPOCH 0x0001
|
|
|
|
/* increment this whenever a new set of config values are added but the users
|
|
|
|
* config doesn't need to be wiped - simply new values need to be put in
|
|
|
|
*/
|
|
|
|
#define ELM_CONFIG_FILE_GENERATION 0x0001
|
|
|
|
#define ELM_CONFIG_VERSION ((ELM_CONFIG_EPOCH << 16) | ELM_CONFIG_FILE_GENERATION)
|
|
|
|
|
2008-09-29 23:58:56 -07:00
|
|
|
struct _Elm_Config
|
|
|
|
{
|
2010-09-02 07:33:04 -07:00
|
|
|
int config_version;
|
2008-09-29 23:58:56 -07:00
|
|
|
int engine;
|
|
|
|
int thumbscroll_enable;
|
|
|
|
int thumbscroll_threshhold;
|
|
|
|
double thumbscroll_momentum_threshhold;
|
|
|
|
double thumbscroll_friction;
|
2009-05-08 04:27:32 -07:00
|
|
|
double thumbscroll_bounce_friction;
|
2009-09-24 00:35:54 -07:00
|
|
|
double page_scroll_friction;
|
2009-09-24 00:40:14 -07:00
|
|
|
double bring_in_scroll_friction;
|
2009-09-24 00:35:54 -07:00
|
|
|
double zoom_friction;
|
2009-05-08 04:27:32 -07:00
|
|
|
int thumbscroll_bounce_enable;
|
2008-09-29 23:58:56 -07:00
|
|
|
double scale;
|
2008-10-16 05:03:01 -07:00
|
|
|
int bgpixmap;
|
|
|
|
int compositing;
|
2009-02-03 02:27:52 -08:00
|
|
|
Eina_List *font_dirs;
|
|
|
|
int font_hinting;
|
|
|
|
int image_cache;
|
|
|
|
int font_cache;
|
2010-01-18 01:38:52 -08:00
|
|
|
int finger_size;
|
2009-02-27 23:32:50 -08:00
|
|
|
double fps;
|
2010-01-18 01:38:52 -08:00
|
|
|
const char *theme;
|
|
|
|
const char *modules;
|
2010-09-10 17:52:33 -07:00
|
|
|
double tooltip_delay;
|
2008-09-29 23:58:56 -07:00
|
|
|
};
|
|
|
|
|
2009-09-28 21:35:35 -07:00
|
|
|
typedef struct _Elm_Module Elm_Module;
|
|
|
|
|
|
|
|
struct _Elm_Module
|
|
|
|
{
|
|
|
|
int version;
|
|
|
|
const char *name;
|
2009-12-01 03:03:14 -08:00
|
|
|
const char *as;
|
2009-09-28 21:35:35 -07:00
|
|
|
const char *so_path;
|
|
|
|
const char *data_dir;
|
|
|
|
const char *bin_dir;
|
|
|
|
void *handle;
|
|
|
|
void *data;
|
2009-12-01 03:03:14 -08:00
|
|
|
void *api;
|
2009-09-28 21:35:35 -07:00
|
|
|
int (*init_func) (Elm_Module *m);
|
|
|
|
int (*shutdown_func) (Elm_Module *m);
|
|
|
|
int references;
|
|
|
|
};
|
|
|
|
|
2010-06-17 01:50:43 -07:00
|
|
|
|
|
|
|
enum _elm_sel_type {
|
|
|
|
ELM_SEL_PRIMARY,
|
|
|
|
ELM_SEL_SECONDARY,
|
|
|
|
ELM_SEL_CLIPBOARD,
|
2010-09-06 23:56:16 -07:00
|
|
|
ELM_SEL_XDND,
|
2010-06-17 01:50:43 -07:00
|
|
|
|
|
|
|
ELM_SEL_MAX,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum _elm_sel_format {
|
2010-09-07 21:55:05 -07:00
|
|
|
/** Plain unformated text: Used for things that don't want rich markup */
|
|
|
|
ELM_SEL_FORMAT_TEXT = 0x01,
|
|
|
|
/** Edje textblock markup, including inline images */
|
|
|
|
ELM_SEL_FORMAT_MARKUP = 0x02,
|
|
|
|
/** Images */
|
|
|
|
ELM_SEL_FORMAT_IMAGE = 0x04,
|
2010-06-17 01:50:43 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-09-29 23:58:56 -07:00
|
|
|
#define ELM_NEW(t) calloc(1, sizeof(t))
|
|
|
|
|
2008-10-06 18:23:49 -07:00
|
|
|
void _elm_win_shutdown(void);
|
2008-11-14 22:09:04 -08:00
|
|
|
void _elm_win_rescale(void);
|
2008-10-06 18:23:49 -07:00
|
|
|
|
2010-05-11 18:03:46 -07:00
|
|
|
int _elm_theme_object_set(Evas_Object *parent, Evas_Object *o, const char *clas, const char *group, const char *style);
|
|
|
|
int _elm_theme_object_icon_set(Evas_Object *parent, Evas_Object *o, const char *group, const char *style);
|
|
|
|
int _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *group, const char *style);
|
|
|
|
int _elm_theme_icon_set(Elm_Theme *th, Evas_Object *o, const char *group, const char *style);
|
|
|
|
int _elm_theme_parse(Elm_Theme *th, const char *theme);
|
2010-04-28 16:14:04 -07:00
|
|
|
void _elm_theme_shutdown(void);
|
2009-01-13 01:20:53 -08:00
|
|
|
|
2009-09-28 21:35:35 -07:00
|
|
|
void _elm_module_init(void);
|
|
|
|
void _elm_module_shutdown(void);
|
2009-12-01 03:03:14 -08:00
|
|
|
void _elm_module_parse(const char *s);
|
|
|
|
Elm_Module *_elm_module_find_as(const char *as);
|
|
|
|
Elm_Module *_elm_module_add(const char *name, const char *as);
|
2009-09-28 21:35:35 -07:00
|
|
|
void _elm_module_del(Elm_Module *m);
|
|
|
|
const void *_elm_module_symbol_get(Elm_Module *m, const char *name);
|
|
|
|
|
2008-10-06 18:23:49 -07:00
|
|
|
/* FIXME: should this be public? for now - private (but public symbols) */
|
|
|
|
EAPI Evas_Object *elm_widget_add(Evas *evas);
|
|
|
|
EAPI void elm_widget_del_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
|
2008-10-24 19:11:06 -07:00
|
|
|
EAPI void elm_widget_del_pre_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
|
2008-10-06 18:23:49 -07:00
|
|
|
EAPI void elm_widget_focus_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
|
|
|
|
EAPI void elm_widget_activate_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
|
|
|
|
EAPI void elm_widget_disable_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
|
2008-11-14 22:09:04 -08:00
|
|
|
EAPI void elm_widget_theme_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
|
2009-11-17 08:32:45 -08:00
|
|
|
EAPI void elm_widget_changed_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
|
2010-06-15 07:11:13 -07:00
|
|
|
EAPI void elm_widget_signal_emit_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj, const char *emission, const char *source));
|
2010-06-28 08:32:20 -07:00
|
|
|
EAPI void elm_widget_signal_callback_add_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj, const char *emission, const char *source, void (*func_cb) (void *data, Evas_Object *o, const char *emission, const char *source), void *data));
|
|
|
|
EAPI void elm_widget_signal_callback_del_hook_set(Evas_Object *obj, void *(*func) (Evas_Object *obj, const char *emission, const char *source, void (*func_cb) (void *data, Evas_Object *o, const char *emission, const char *source)));
|
2008-11-14 22:09:04 -08:00
|
|
|
EAPI void elm_widget_theme(Evas_Object *obj);
|
2008-10-06 18:23:49 -07:00
|
|
|
EAPI void elm_widget_on_focus_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data);
|
|
|
|
EAPI void elm_widget_on_change_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data);
|
2008-10-17 07:40:54 -07:00
|
|
|
EAPI void elm_widget_on_show_region_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data);
|
2008-10-06 18:23:49 -07:00
|
|
|
EAPI void elm_widget_data_set(Evas_Object *obj, void *data);
|
2009-02-25 07:54:26 -08:00
|
|
|
EAPI void *elm_widget_data_get(const Evas_Object *obj);
|
2008-10-06 18:23:49 -07:00
|
|
|
EAPI void elm_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj);
|
|
|
|
EAPI void elm_widget_sub_object_del(Evas_Object *obj, Evas_Object *sobj);
|
|
|
|
EAPI void elm_widget_resize_object_set(Evas_Object *obj, Evas_Object *sobj);
|
2008-10-07 23:38:20 -07:00
|
|
|
EAPI void elm_widget_hover_object_set(Evas_Object *obj, Evas_Object *sobj);
|
2010-06-15 07:11:13 -07:00
|
|
|
EAPI void elm_widget_signal_emit(Evas_Object *obj, const char *emission, const char *source);
|
2010-06-28 08:32:20 -07:00
|
|
|
EAPI void elm_widget_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source), void *data);
|
|
|
|
EAPI void *elm_widget_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source));
|
2008-10-06 18:23:49 -07:00
|
|
|
EAPI void elm_widget_can_focus_set(Evas_Object *obj, int can_focus);
|
2009-02-25 07:54:26 -08:00
|
|
|
EAPI int elm_widget_can_focus_get(const Evas_Object *obj);
|
|
|
|
EAPI int elm_widget_focus_get(const Evas_Object *obj);
|
|
|
|
EAPI Evas_Object *elm_widget_focused_object_get(const Evas_Object *obj);
|
|
|
|
EAPI Evas_Object *elm_widget_top_get(const Evas_Object *obj);
|
2008-10-06 18:23:49 -07:00
|
|
|
EAPI int elm_widget_focus_jump(Evas_Object *obj, int forward);
|
|
|
|
EAPI void elm_widget_focus_set(Evas_Object *obj, int first);
|
|
|
|
EAPI void elm_widget_focused_object_clear(Evas_Object *obj);
|
2009-02-25 07:54:26 -08:00
|
|
|
EAPI Evas_Object *elm_widget_parent_get(const Evas_Object *obj);
|
2008-10-06 18:23:49 -07:00
|
|
|
EAPI void elm_widget_focus_steal(Evas_Object *obj);
|
|
|
|
EAPI void elm_widget_activate(Evas_Object *obj);
|
|
|
|
EAPI void elm_widget_change(Evas_Object *obj);
|
|
|
|
EAPI void elm_widget_disabled_set(Evas_Object *obj, int disabled);
|
2009-02-25 07:54:26 -08:00
|
|
|
EAPI int elm_widget_disabled_get(const Evas_Object *obj);
|
2008-10-17 07:40:54 -07:00
|
|
|
EAPI void elm_widget_show_region_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
|
2009-02-25 07:54:26 -08:00
|
|
|
EAPI void elm_widget_show_region_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
|
2009-07-06 23:46:51 -07:00
|
|
|
EAPI void elm_widget_scroll_hold_push(Evas_Object *obj);
|
|
|
|
EAPI void elm_widget_scroll_hold_pop(Evas_Object *obj);
|
2009-02-25 07:54:26 -08:00
|
|
|
EAPI int elm_widget_scroll_hold_get(const Evas_Object *obj);
|
2009-07-06 23:46:51 -07:00
|
|
|
EAPI void elm_widget_scroll_freeze_push(Evas_Object *obj);
|
|
|
|
EAPI void elm_widget_scroll_freeze_pop(Evas_Object *obj);
|
2009-03-20 08:08:33 -07:00
|
|
|
EAPI int elm_widget_scroll_freeze_get(const Evas_Object *obj);
|
2009-02-02 21:09:03 -08:00
|
|
|
EAPI void elm_widget_scale_set(Evas_Object *obj, double scale);
|
2009-02-25 07:54:26 -08:00
|
|
|
EAPI double elm_widget_scale_get(const Evas_Object *obj);
|
2010-05-11 18:03:46 -07:00
|
|
|
EAPI void elm_widget_theme_set(Evas_Object *obj, Elm_Theme *th);
|
|
|
|
EAPI Elm_Theme *elm_widget_theme_get(const Evas_Object *obj);
|
2009-04-22 21:03:27 -07:00
|
|
|
EAPI void elm_widget_style_set(Evas_Object *obj, const char *style);
|
|
|
|
EAPI const char *elm_widget_style_get(const Evas_Object *obj);
|
2009-05-13 05:21:52 -07:00
|
|
|
EAPI void elm_widget_type_set(Evas_Object *obj, const char *type);
|
|
|
|
EAPI const char *elm_widget_type_get(const Evas_Object *obj);
|
2010-05-07 06:21:45 -07:00
|
|
|
EAPI void elm_widget_drag_lock_x_set(Evas_Object *obj, Eina_Bool lock);
|
|
|
|
EAPI void elm_widget_drag_lock_y_set(Evas_Object *obj, Eina_Bool lock);
|
2010-07-10 15:05:37 -07:00
|
|
|
EAPI Eina_Bool elm_widget_drag_lock_x_get(const Evas_Object *obj);
|
|
|
|
EAPI Eina_Bool elm_widget_drag_lock_y_get(const Evas_Object *obj);
|
|
|
|
EAPI int elm_widget_drag_child_locked_x_get(const Evas_Object *obj);
|
|
|
|
EAPI int elm_widget_drag_child_locked_y_get(const Evas_Object *obj);
|
2010-05-07 06:21:45 -07:00
|
|
|
|
2010-03-22 14:36:59 -07:00
|
|
|
EAPI Eina_Bool elm_widget_is(const Evas_Object *obj);
|
|
|
|
EAPI Evas_Object *elm_widget_parent_widget_get(const Evas_Object *obj);
|
|
|
|
|
2010-09-10 17:52:33 -07:00
|
|
|
typedef struct _Elm_Tooltip Elm_Tooltip;
|
Tooltips: split owner/eventarea, allow subitems to have indepentent tooltips.
Now owner widget (elm_widget) is just used to listen for theme changes
and create/destroy the tooltip data. The actual mouse events operates
on all Evas_Object and is the one where tooltip data is actually
stored.
The public API is basically the same, just the event_info is now NULL
to avoid confusion.
The internal API introduces elm_object_sub_tooltip_content_cb_set()
and as the first parameter the eventarea. While this may be confusing,
as the second parameter is the actual elementary object, it is the one
that all other calls receive, like elm_object_tooltip_hide() or
elm_object_tooltip_unset(), thus it does make sense to have such order.
Also internal API, elm_widget_item_tooltip_* functions were
added. They are a variation of the widget API to handle its items, as
such the func() gets one more parameter: item, and the del_cb() gets
the item as event_info (that's why the public widget version got
event_info always NULL, to not confuse with this one!)
Widgets with items that makes sense to have tooltips got extra API:
* toolbar
* list
* gengrid
* genlist
SVN revision: 52173
2010-09-12 14:05:13 -07:00
|
|
|
void elm_widget_tooltip_add(Evas_Object *obj, Elm_Tooltip *tt);
|
|
|
|
void elm_widget_tooltip_del(Evas_Object *obj, Elm_Tooltip *tt);
|
2010-09-10 17:52:33 -07:00
|
|
|
void elm_tooltip_theme(Elm_Tooltip *tt);
|
Tooltips: split owner/eventarea, allow subitems to have indepentent tooltips.
Now owner widget (elm_widget) is just used to listen for theme changes
and create/destroy the tooltip data. The actual mouse events operates
on all Evas_Object and is the one where tooltip data is actually
stored.
The public API is basically the same, just the event_info is now NULL
to avoid confusion.
The internal API introduces elm_object_sub_tooltip_content_cb_set()
and as the first parameter the eventarea. While this may be confusing,
as the second parameter is the actual elementary object, it is the one
that all other calls receive, like elm_object_tooltip_hide() or
elm_object_tooltip_unset(), thus it does make sense to have such order.
Also internal API, elm_widget_item_tooltip_* functions were
added. They are a variation of the widget API to handle its items, as
such the func() gets one more parameter: item, and the del_cb() gets
the item as event_info (that's why the public widget version got
event_info always NULL, to not confuse with this one!)
Widgets with items that makes sense to have tooltips got extra API:
* toolbar
* list
* gengrid
* genlist
SVN revision: 52173
2010-09-12 14:05:13 -07:00
|
|
|
EAPI void elm_object_sub_tooltip_content_cb_set(Evas_Object *eventarea, Evas_Object *owner, Elm_Tooltip_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
|
|
|
|
|
2010-09-10 17:52:33 -07:00
|
|
|
|
2010-03-13 19:48:22 -08:00
|
|
|
EAPI Eina_List *_elm_stringlist_get(const char *str);
|
|
|
|
EAPI void _elm_stringlist_free(Eina_List *list);
|
2009-09-23 15:56:47 -07:00
|
|
|
|
2010-03-26 18:19:44 -07:00
|
|
|
Eina_Bool _elm_widget_type_check(const Evas_Object *obj, const char *type);
|
|
|
|
|
2010-09-09 18:54:05 -07:00
|
|
|
typedef struct _Elm_Widget_Item Elm_Widget_Item; /**< base structure for all widget items that are not Elm_Widget themselves */
|
|
|
|
struct _Elm_Widget_Item
|
|
|
|
{
|
|
|
|
/* ef1 ~~ efl, el3 ~~ elm */
|
|
|
|
#define ELM_WIDGET_ITEM_MAGIC 0xef1e1301
|
|
|
|
EINA_MAGIC
|
|
|
|
Evas_Object *widget; /**< the owner widget that owns this item */
|
|
|
|
Evas_Object *view; /**< the base view object */
|
|
|
|
const void *data; /**< item specific data */
|
|
|
|
Evas_Smart_Cb del_cb; /**< used to notify the item is being deleted */
|
|
|
|
/* widget variations should have data from here and on */
|
|
|
|
/* @todo: TODO check if this is enough for 1.0 release, maybe add padding! */
|
|
|
|
};
|
|
|
|
|
|
|
|
Elm_Widget_Item *_elm_widget_item_new(Evas_Object *parent, size_t alloc_size);
|
|
|
|
void _elm_widget_item_del(Elm_Widget_Item *item);
|
|
|
|
void _elm_widget_item_pre_notify_del(Elm_Widget_Item *item);
|
|
|
|
void _elm_widget_item_del_cb_set(Elm_Widget_Item *item, Evas_Smart_Cb del_cb);
|
|
|
|
void _elm_widget_item_data_set(Elm_Widget_Item *item, const void *data);
|
|
|
|
void *_elm_widget_item_data_get(const Elm_Widget_Item *item);
|
Tooltips: split owner/eventarea, allow subitems to have indepentent tooltips.
Now owner widget (elm_widget) is just used to listen for theme changes
and create/destroy the tooltip data. The actual mouse events operates
on all Evas_Object and is the one where tooltip data is actually
stored.
The public API is basically the same, just the event_info is now NULL
to avoid confusion.
The internal API introduces elm_object_sub_tooltip_content_cb_set()
and as the first parameter the eventarea. While this may be confusing,
as the second parameter is the actual elementary object, it is the one
that all other calls receive, like elm_object_tooltip_hide() or
elm_object_tooltip_unset(), thus it does make sense to have such order.
Also internal API, elm_widget_item_tooltip_* functions were
added. They are a variation of the widget API to handle its items, as
such the func() gets one more parameter: item, and the del_cb() gets
the item as event_info (that's why the public widget version got
event_info always NULL, to not confuse with this one!)
Widgets with items that makes sense to have tooltips got extra API:
* toolbar
* list
* gengrid
* genlist
SVN revision: 52173
2010-09-12 14:05:13 -07:00
|
|
|
void _elm_widget_item_tooltip_text_set(Elm_Widget_Item *item, const char *text);
|
|
|
|
void _elm_widget_item_tooltip_content_cb_set(Elm_Widget_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
|
|
|
|
void _elm_widget_item_tooltip_unset(Elm_Widget_Item *item);
|
|
|
|
void _elm_widget_item_tooltip_style_set(Elm_Widget_Item *item, const char *style);
|
|
|
|
const char *_elm_widget_item_tooltip_style_get(const Elm_Widget_Item *item);
|
|
|
|
|
|
|
|
|
2010-09-09 18:54:05 -07:00
|
|
|
/**
|
|
|
|
* Convenience macro to create new widget item, doing casts for you.
|
|
|
|
* @see _elm_widget_item_new()
|
|
|
|
* @param parent a valid elm_widget variant.
|
|
|
|
* @param type the C type that extends Elm_Widget_Item
|
|
|
|
*/
|
|
|
|
#define elm_widget_item_new(parent, type) \
|
|
|
|
(type *)_elm_widget_item_new((parent), sizeof(type))
|
|
|
|
/**
|
|
|
|
* Convenience macro to delete widget item, doing casts for you.
|
|
|
|
* @see _elm_widget_item_del()
|
|
|
|
* @param item a valid item.
|
|
|
|
*/
|
|
|
|
#define elm_widget_item_del(item) \
|
|
|
|
_elm_widget_item_del((Elm_Widget_Item *)item)
|
|
|
|
/**
|
|
|
|
* Convenience macro to notify deletion of widget item, doing casts for you.
|
|
|
|
* @see _elm_widget_item_pre_notify_del()
|
|
|
|
*/
|
|
|
|
#define elm_widget_item_pre_notify_del(item) \
|
|
|
|
_elm_widget_item_pre_notify_del((Elm_Widget_Item *)item)
|
|
|
|
/**
|
|
|
|
* Convenience macro to set deletion callback of widget item, doing casts for you.
|
|
|
|
* @see _elm_widget_item_del_cb_set()
|
|
|
|
*/
|
|
|
|
#define elm_widget_item_del_cb_set(item, del_cb) \
|
|
|
|
_elm_widget_item_del_cb_set((Elm_Widget_Item *)item, del_cb)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set item's data
|
|
|
|
* @see _elm_widget_item_data_set()
|
|
|
|
*/
|
|
|
|
#define elm_widget_item_data_set(item, data) \
|
|
|
|
_elm_widget_item_data_set((Elm_Widget_Item *)item, data)
|
|
|
|
/**
|
|
|
|
* Get item's data
|
|
|
|
* @see _elm_widget_item_data_get()
|
|
|
|
*/
|
|
|
|
#define elm_widget_item_data_get(item) \
|
|
|
|
_elm_widget_item_data_get((const Elm_Widget_Item *)item)
|
|
|
|
|
Tooltips: split owner/eventarea, allow subitems to have indepentent tooltips.
Now owner widget (elm_widget) is just used to listen for theme changes
and create/destroy the tooltip data. The actual mouse events operates
on all Evas_Object and is the one where tooltip data is actually
stored.
The public API is basically the same, just the event_info is now NULL
to avoid confusion.
The internal API introduces elm_object_sub_tooltip_content_cb_set()
and as the first parameter the eventarea. While this may be confusing,
as the second parameter is the actual elementary object, it is the one
that all other calls receive, like elm_object_tooltip_hide() or
elm_object_tooltip_unset(), thus it does make sense to have such order.
Also internal API, elm_widget_item_tooltip_* functions were
added. They are a variation of the widget API to handle its items, as
such the func() gets one more parameter: item, and the del_cb() gets
the item as event_info (that's why the public widget version got
event_info always NULL, to not confuse with this one!)
Widgets with items that makes sense to have tooltips got extra API:
* toolbar
* list
* gengrid
* genlist
SVN revision: 52173
2010-09-12 14:05:13 -07:00
|
|
|
/**
|
|
|
|
* Convenience function to set widget item tooltip as a text string.
|
|
|
|
* @see _elm_widget_item_tooltip_text_set()
|
|
|
|
*/
|
|
|
|
#define elm_widget_item_tooltip_text_set(item, text) \
|
|
|
|
_elm_widget_item_tooltip_text_set((Elm_Widget_Item *)item, text)
|
|
|
|
/**
|
|
|
|
* Convenience function to set widget item tooltip.
|
|
|
|
* @see _elm_widget_item_tooltip_content_cb_set()
|
|
|
|
*/
|
|
|
|
#define elm_widget_item_tooltip_content_cb_set(item, func, data, del_cb) \
|
|
|
|
_elm_widget_item_tooltip_content_cb_set((Elm_Widget_Item *)item, \
|
|
|
|
func, data, del_cb)
|
|
|
|
/**
|
|
|
|
* Convenience function to unset widget item tooltip.
|
|
|
|
* @see _elm_widget_item_tooltip_unset()
|
|
|
|
*/
|
|
|
|
#define elm_widget_item_tooltip_unset(item) \
|
|
|
|
_elm_widget_item_tooltip_unset((Elm_Widget_Item *)item)
|
|
|
|
/**
|
|
|
|
* Convenience function to change item's tooltip style.
|
|
|
|
* @see _elm_widget_item_tooltip_style_set()
|
|
|
|
*/
|
|
|
|
#define elm_widget_item_tooltip_style_set(item, style) \
|
|
|
|
_elm_widget_item_tooltip_style_set((Elm_Widget_Item *)item, style)
|
|
|
|
/**
|
|
|
|
* Convenience function to query item's tooltip style.
|
|
|
|
* @see _elm_widget_item_tooltip_style_get()
|
|
|
|
*/
|
|
|
|
#define elm_widget_item_tooltip_style_get(item) \
|
|
|
|
_elm_widget_item_tooltip_style_get((const Elm_Widget_Item *)item)
|
|
|
|
|
|
|
|
|
|
|
|
void _elm_widget_item_tooltip_content_cb_set(Elm_Widget_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
|
2010-09-09 18:54:05 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Cast and ensure the given pointer is an Elm_Widget_Item or return NULL.
|
|
|
|
*/
|
|
|
|
#define ELM_WIDGET_ITEM(item) \
|
|
|
|
((item && EINA_MAGIC_CHECK(item, ELM_WIDGET_ITEM_MAGIC)) ? \
|
|
|
|
((Elm_Widget_Item *)(item)) : NULL)
|
|
|
|
|
|
|
|
#define ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, ...) \
|
|
|
|
do \
|
|
|
|
{ \
|
|
|
|
if (!item) \
|
|
|
|
{ \
|
|
|
|
CRITICAL("Elm_Widget_Item " # item " is NULL!"); \
|
|
|
|
return __VA_ARGS__; \
|
|
|
|
} \
|
|
|
|
if (!EINA_MAGIC_CHECK(item, ELM_WIDGET_ITEM_MAGIC)) \
|
|
|
|
{ \
|
|
|
|
EINA_MAGIC_FAIL(item, ELM_WIDGET_ITEM_MAGIC); \
|
|
|
|
return __VA_ARGS__; \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
while (0)
|
|
|
|
|
Tooltips: split owner/eventarea, allow subitems to have indepentent tooltips.
Now owner widget (elm_widget) is just used to listen for theme changes
and create/destroy the tooltip data. The actual mouse events operates
on all Evas_Object and is the one where tooltip data is actually
stored.
The public API is basically the same, just the event_info is now NULL
to avoid confusion.
The internal API introduces elm_object_sub_tooltip_content_cb_set()
and as the first parameter the eventarea. While this may be confusing,
as the second parameter is the actual elementary object, it is the one
that all other calls receive, like elm_object_tooltip_hide() or
elm_object_tooltip_unset(), thus it does make sense to have such order.
Also internal API, elm_widget_item_tooltip_* functions were
added. They are a variation of the widget API to handle its items, as
such the func() gets one more parameter: item, and the del_cb() gets
the item as event_info (that's why the public widget version got
event_info always NULL, to not confuse with this one!)
Widgets with items that makes sense to have tooltips got extra API:
* toolbar
* list
* gengrid
* genlist
SVN revision: 52173
2010-09-12 14:05:13 -07:00
|
|
|
#define ELM_WIDGET_ITEM_CHECK_OR_GOTO(item, label) \
|
|
|
|
do \
|
|
|
|
{ \
|
|
|
|
if (!item) \
|
|
|
|
{ \
|
|
|
|
CRITICAL("Elm_Widget_Item " # item " is NULL!"); \
|
|
|
|
goto label; \
|
|
|
|
} \
|
|
|
|
if (!EINA_MAGIC_CHECK(item, ELM_WIDGET_ITEM_MAGIC)) \
|
|
|
|
{ \
|
|
|
|
EINA_MAGIC_FAIL(item, ELM_WIDGET_ITEM_MAGIC); \
|
|
|
|
goto label; \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
while (0)
|
|
|
|
|
2010-09-09 18:54:05 -07:00
|
|
|
|
2010-03-31 05:38:58 -07:00
|
|
|
void _elm_unneed_ethumb(void);
|
|
|
|
|
2010-05-07 08:49:06 -07:00
|
|
|
void _elm_rescale(void);
|
|
|
|
|
|
|
|
void _elm_config_init(void);
|
|
|
|
void _elm_config_sub_init(void);
|
|
|
|
void _elm_config_shutdown(void);
|
|
|
|
|
2010-09-06 23:56:16 -07:00
|
|
|
/* FIXME: nash formatiing */
|
|
|
|
typedef struct Elm_Drop_Data {
|
|
|
|
int x,y;
|
|
|
|
|
|
|
|
enum _elm_sel_format format;
|
|
|
|
void *data;
|
|
|
|
int len;
|
|
|
|
} Elm_Drop_Data;
|
|
|
|
|
|
|
|
typedef Eina_Bool (*elm_drop_cb)(void *, Evas_Object *, Elm_Drop_Data *data);
|
|
|
|
|
2010-06-17 01:50:43 -07:00
|
|
|
Eina_Bool elm_selection_set(enum _elm_sel_type selection, Evas_Object *widget, enum _elm_sel_format format, const char *buf);
|
|
|
|
Eina_Bool elm_selection_clear(enum _elm_sel_type selection, Evas_Object *widget);
|
2010-06-23 01:08:17 -07:00
|
|
|
Eina_Bool elm_selection_get(enum _elm_sel_type selection, enum _elm_sel_format format, Evas_Object *widget);
|
2010-09-06 23:56:16 -07:00
|
|
|
/* FIXME: Need a typedef for the callback */
|
|
|
|
Eina_Bool elm_drop_target_add(Evas_Object *widget,
|
|
|
|
enum _elm_sel_type, elm_drop_cb, void *);
|
|
|
|
Eina_Bool elm_drop_target_del(Evas_Object *widget);
|
2010-09-09 01:59:42 -07:00
|
|
|
Eina_Bool elm_drag_start(Evas_Object *, enum _elm_sel_format,
|
2010-09-10 01:24:21 -07:00
|
|
|
const char *,
|
|
|
|
void (*)(void *,Evas_Object*),void*);
|
2010-06-17 01:50:43 -07:00
|
|
|
|
2010-07-15 23:38:59 -07:00
|
|
|
Eina_Bool _elm_dangerous_call_check(const char *call);
|
2010-06-17 01:50:43 -07:00
|
|
|
|
2010-08-10 16:58:57 -07:00
|
|
|
void _elm_widtype_register(const char **ptr);
|
|
|
|
|
|
|
|
|
|
|
|
#define ELM_SET_WIDTYPE(widtype, type) \
|
|
|
|
do { \
|
|
|
|
if (!widtype) { \
|
|
|
|
widtype = eina_stringshare_add(type); \
|
|
|
|
_elm_widtype_register(&widtype); \
|
|
|
|
} \
|
|
|
|
} while (0)
|
2010-06-17 01:50:43 -07:00
|
|
|
|
2010-03-13 19:48:22 -08:00
|
|
|
//#define ELM_CHECK_WIDTYPE(obj, widtype) if (elm_widget_type_get(obj) != widtype) return
|
2010-03-26 18:19:44 -07:00
|
|
|
#define ELM_CHECK_WIDTYPE(obj, widtype) if (!_elm_widget_type_check((obj), (widtype))) return
|
2009-09-23 15:56:47 -07:00
|
|
|
|
2008-09-29 23:58:56 -07:00
|
|
|
extern char *_elm_appname;
|
|
|
|
extern Elm_Config *_elm_config;
|
2009-01-13 01:20:53 -08:00
|
|
|
extern const char *_elm_data_dir;
|
2009-09-28 21:35:35 -07:00
|
|
|
extern const char *_elm_lib_dir;
|
2009-09-11 07:21:58 -07:00
|
|
|
extern int _elm_log_dom;
|
|
|
|
|
2010-04-12 01:27:10 -07:00
|
|
|
extern Eina_List *_elm_win_list;
|
|
|
|
|
2008-09-29 23:58:56 -07:00
|
|
|
#endif
|