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-13 00:56:23 -07:00
|
|
|
#include "elm_widget.h"
|
2010-09-09 18:54:05 -07:00
|
|
|
|
|
|
|
#define CRITICAL(...) EINA_LOG_DOM_CRIT(_elm_log_dom, __VA_ARGS__)
|
2010-09-13 00:56:23 -07:00
|
|
|
#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__)
|
2010-09-09 18:54:05 -07:00
|
|
|
|
2010-09-13 00:56:23 -07:00
|
|
|
typedef struct _Elm_Config Elm_Config;
|
|
|
|
typedef struct _Elm_Module Elm_Module;
|
2008-09-29 23:58:56 -07:00
|
|
|
|
2010-05-11 18:03:46 -07:00
|
|
|
struct _Elm_Theme
|
|
|
|
{
|
2010-09-13 00:56:23 -07:00
|
|
|
Eina_List *overlay;
|
|
|
|
Eina_List *themes;
|
|
|
|
Eina_List *extension;
|
|
|
|
Eina_Hash *cache;
|
2010-11-05 01:37:31 -07:00
|
|
|
Elm_Theme *ref_theme;
|
|
|
|
Eina_List *referrers;
|
2010-05-11 18:03:46 -07:00
|
|
|
const char *theme;
|
2010-09-13 00:56:23 -07:00
|
|
|
int ref;
|
2010-05-11 18:03:46 -07:00
|
|
|
};
|
|
|
|
|
2010-09-13 00:56:23 -07:00
|
|
|
/* increment this whenever we change config enough that you need new
|
|
|
|
* defaults for elm to work.
|
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
|
|
|
*/
|
2010-09-13 00:56:23 -07:00
|
|
|
#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
|
2010-09-09 18:54:05 -07:00
|
|
|
*/
|
2010-11-24 09:11:34 -08:00
|
|
|
#define ELM_CONFIG_FILE_GENERATION 0x0003
|
2010-09-13 00:56:23 -07:00
|
|
|
#define ELM_CONFIG_VERSION ((ELM_CONFIG_EPOCH << 16) | ELM_CONFIG_FILE_GENERATION)
|
2010-11-24 00:22:02 -08:00
|
|
|
/* NB: profile configuration files (.src) must have their
|
|
|
|
* "config_version" entry's value up-to-date with ELM_CONFIG_VERSION
|
|
|
|
* (in decimal)!! */
|
2010-03-31 05:38:58 -07:00
|
|
|
|
2010-11-01 14:10:07 -07:00
|
|
|
/* note: always remember to sync it with elm_config.c */
|
|
|
|
extern const char *_elm_engines[];
|
|
|
|
|
2010-11-05 01:37:31 -07:00
|
|
|
#define ELM_SOFTWARE_X11 (_elm_engines[0])
|
|
|
|
#define ELM_SOFTWARE_FB (_elm_engines[1])
|
2010-11-01 14:10:07 -07:00
|
|
|
#define ELM_SOFTWARE_DIRECTFB (_elm_engines[2])
|
2010-11-05 01:37:31 -07:00
|
|
|
#define ELM_SOFTWARE_16_X11 (_elm_engines[3])
|
|
|
|
#define ELM_SOFTWARE_8_X11 (_elm_engines[4])
|
|
|
|
#define ELM_XRENDER_X11 (_elm_engines[5])
|
|
|
|
#define ELM_OPENGL_X11 (_elm_engines[6])
|
|
|
|
#define ELM_SOFTWARE_WIN32 (_elm_engines[7])
|
2010-11-01 14:10:07 -07:00
|
|
|
#define ELM_SOFTWARE_16_WINCE (_elm_engines[8])
|
2010-11-05 01:37:31 -07:00
|
|
|
#define ELM_SOFTWARE_SDL (_elm_engines[9])
|
|
|
|
#define ELM_SOFTWARE_16_SDL (_elm_engines[10])
|
|
|
|
#define ELM_OPENGL_SDL (_elm_engines[11])
|
2010-11-01 14:10:07 -07:00
|
|
|
|
2010-11-18 02:01:24 -08:00
|
|
|
#define ELM_FONT_TOKEN_STYLE ":style="
|
|
|
|
|
2010-09-13 00:56:23 -07:00
|
|
|
struct _Elm_Config
|
|
|
|
{
|
|
|
|
int config_version;
|
2010-11-01 14:10:07 -07:00
|
|
|
const char *engine;
|
2010-10-21 11:26:14 -07:00
|
|
|
Eina_Bool thumbscroll_enable;
|
2010-10-21 12:35:12 -07:00
|
|
|
int thumbscroll_threshold;
|
|
|
|
double thumbscroll_momentum_threshold;
|
2010-09-13 00:56:23 -07:00
|
|
|
double thumbscroll_friction;
|
|
|
|
double thumbscroll_bounce_friction;
|
|
|
|
double page_scroll_friction;
|
|
|
|
double bring_in_scroll_friction;
|
|
|
|
double zoom_friction;
|
2010-10-21 11:26:14 -07:00
|
|
|
Eina_Bool thumbscroll_bounce_enable;
|
2010-11-05 02:31:51 -07:00
|
|
|
double thumbscroll_border_friction;
|
2010-09-13 00:56:23 -07:00
|
|
|
double scale;
|
|
|
|
int bgpixmap;
|
|
|
|
int compositing;
|
|
|
|
Eina_List *font_dirs;
|
2010-11-18 02:01:24 -08:00
|
|
|
Eina_List *font_overlays;
|
2010-09-13 00:56:23 -07:00
|
|
|
int font_hinting;
|
2010-11-22 22:10:58 -08:00
|
|
|
int cache_flush_poll_interval;
|
2010-09-13 00:56:23 -07:00
|
|
|
int image_cache;
|
|
|
|
int font_cache;
|
2010-11-22 22:10:58 -08:00
|
|
|
int edje_cache;
|
|
|
|
int edje_collection_cache;
|
2010-09-13 00:56:23 -07:00
|
|
|
int finger_size;
|
|
|
|
double fps;
|
|
|
|
const char *theme;
|
|
|
|
const char *modules;
|
|
|
|
double tooltip_delay;
|
2010-10-21 11:26:14 -07:00
|
|
|
Eina_Bool cursor_engine_only;
|
|
|
|
Eina_Bool focus_highlight_enable;
|
|
|
|
Eina_Bool focus_highlight_animate;
|
|
|
|
int toolbar_shrink_mode;
|
|
|
|
Eina_Bool fileselector_expand_enable;
|
|
|
|
Eina_Bool inwin_dialogs_enable;
|
|
|
|
int icon_size;
|
2010-11-24 09:11:34 -08:00
|
|
|
double longpress_timeout;
|
2010-09-13 00:56:23 -07:00
|
|
|
};
|
2010-05-07 08:49:06 -07:00
|
|
|
|
2010-09-13 00:56:23 -07:00
|
|
|
struct _Elm_Module
|
|
|
|
{
|
|
|
|
int version;
|
|
|
|
const char *name;
|
|
|
|
const char *as;
|
|
|
|
const char *so_path;
|
|
|
|
const char *data_dir;
|
|
|
|
const char *bin_dir;
|
|
|
|
void *handle;
|
|
|
|
void *data;
|
|
|
|
void *api;
|
|
|
|
int (*init_func) (Elm_Module *m);
|
|
|
|
int (*shutdown_func) (Elm_Module *m);
|
|
|
|
int references;
|
|
|
|
};
|
2010-05-07 08:49:06 -07:00
|
|
|
|
2010-09-13 00:56:23 -07:00
|
|
|
void _elm_win_shutdown(void);
|
2010-11-05 01:37:31 -07:00
|
|
|
void _elm_win_rescale(Elm_Theme *th, Eina_Bool use_theme);
|
2010-09-06 23:56:16 -07:00
|
|
|
|
2010-10-21 11:58:37 -07:00
|
|
|
Eina_Bool _elm_theme_object_set(Evas_Object *parent, Evas_Object *o, const char *clas, const char *group, const char *style);
|
|
|
|
Eina_Bool _elm_theme_object_icon_set(Evas_Object *parent, Evas_Object *o, const char *group, const char *style);
|
|
|
|
Eina_Bool _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *group, const char *style);
|
|
|
|
Eina_Bool _elm_theme_icon_set(Elm_Theme *th, Evas_Object *o, const char *group, const char *style);
|
|
|
|
Eina_Bool _elm_theme_parse(Elm_Theme *th, const char *theme);
|
2010-09-13 00:56:23 -07:00
|
|
|
void _elm_theme_shutdown(void);
|
2010-09-06 23:56:16 -07:00
|
|
|
|
2010-09-13 00:56:23 -07:00
|
|
|
void _elm_module_init(void);
|
|
|
|
void _elm_module_shutdown(void);
|
|
|
|
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);
|
|
|
|
void _elm_module_del(Elm_Module *m);
|
|
|
|
const void *_elm_module_symbol_get(Elm_Module *m, const char *name);
|
2010-09-06 23:56:16 -07:00
|
|
|
|
2010-09-13 00:56:23 -07:00
|
|
|
void _elm_widget_type_clear(void);
|
2010-10-22 11:29:51 -07:00
|
|
|
void _elm_widget_focus_region_show(const Evas_Object *obj);
|
2010-06-17 01:50:43 -07:00
|
|
|
|
2010-09-13 00:56:23 -07:00
|
|
|
void _elm_unneed_ethumb(void);
|
2010-06-17 01:50:43 -07:00
|
|
|
|
2010-09-13 00:56:23 -07:00
|
|
|
void _elm_rescale(void);
|
2010-08-10 16:58:57 -07:00
|
|
|
|
2010-09-13 00:56:23 -07:00
|
|
|
void _elm_config_init(void);
|
|
|
|
void _elm_config_sub_init(void);
|
|
|
|
void _elm_config_shutdown(void);
|
2010-10-28 13:57:44 -07:00
|
|
|
Eina_Bool _elm_config_save(void);
|
|
|
|
void _elm_config_reload(void);
|
|
|
|
|
2010-11-21 22:56:06 -08:00
|
|
|
void _elm_recache(void);
|
|
|
|
|
2010-10-25 06:08:19 -07:00
|
|
|
const char *_elm_config_current_profile_get(void);
|
2010-10-28 13:57:44 -07:00
|
|
|
const char *_elm_config_profile_dir_get(const char *prof, Eina_Bool is_user);
|
2010-10-25 06:08:19 -07:00
|
|
|
Eina_List *_elm_config_profiles_list(void);
|
|
|
|
void _elm_config_profile_set(const char *profile);
|
2010-08-10 16:58:57 -07:00
|
|
|
|
2010-11-01 14:10:14 -07:00
|
|
|
void _elm_config_engine_set(const char *engine);
|
|
|
|
|
2010-11-18 02:01:24 -08:00
|
|
|
Eina_List *_elm_config_font_overlays_list(void);
|
|
|
|
void _elm_config_font_overlay_set(const char *text_class, const char *font, Evas_Font_Size size);
|
|
|
|
void _elm_config_font_overlay_remove(const char *text_class);
|
|
|
|
void _elm_config_font_overlay_apply(void);
|
|
|
|
Eina_List *_elm_config_text_classes_get(void);
|
|
|
|
void _elm_config_text_classes_free(Eina_List *l);
|
|
|
|
|
|
|
|
Elm_Font_Properties *_elm_font_properties_get(Eina_Hash **font_hash, const char *font);
|
|
|
|
Eina_Hash *_elm_font_available_hash_add(Eina_Hash *font_hash, const char *full_name);
|
|
|
|
void _elm_font_available_hash_del(Eina_Hash *hash);
|
|
|
|
|
2010-09-13 00:56:23 -07:00
|
|
|
void elm_tooltip_theme(Elm_Tooltip *tt);
|
|
|
|
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-25 15:01:19 -07:00
|
|
|
void elm_cursor_theme(Elm_Cursor *cur);
|
|
|
|
void elm_object_sub_cursor_set(Evas_Object *eventarea, Evas_Object *owner, const char *cursor);
|
2010-06-17 01:50:43 -07:00
|
|
|
|
2010-10-20 14:30:03 -07:00
|
|
|
void elm_menu_clone(Evas_Object *from_menu, Evas_Object *to_menu, Elm_Menu_Item *parent);
|
|
|
|
|
2010-09-13 00:56:23 -07:00
|
|
|
Eina_Bool _elm_dangerous_call_check(const char *call);
|
2009-09-11 07:21:58 -07:00
|
|
|
|
2010-09-23 15:30:47 -07:00
|
|
|
Evas_Object *_elm_scroller_edje_object_get(Evas_Object *obj);
|
|
|
|
|
2010-12-19 22:05:09 -08:00
|
|
|
char *_elm_util_mkup_to_text(const char *mkup);
|
|
|
|
char *_elm_util_text_to_mkup(const char *text);
|
|
|
|
|
2010-09-13 00:56:23 -07:00
|
|
|
extern char *_elm_appname;
|
|
|
|
extern Elm_Config *_elm_config;
|
|
|
|
extern const char *_elm_data_dir;
|
|
|
|
extern const char *_elm_lib_dir;
|
|
|
|
extern int _elm_log_dom;
|
|
|
|
extern Eina_List *_elm_win_list;
|
2010-04-12 01:27:10 -07:00
|
|
|
|
2008-09-29 23:58:56 -07:00
|
|
|
#endif
|