2005-01-12 08:03:09 -08:00
|
|
|
#ifdef E_TYPEDEFS
|
2004-11-24 19:37:45 -08:00
|
|
|
|
2010-08-01 07:29:19 -07:00
|
|
|
typedef struct _E_Manager E_Manager;
|
|
|
|
typedef struct _E_Manager_Comp E_Manager_Comp;
|
|
|
|
typedef struct _E_Manager_Comp_Source E_Manager_Comp_Source;
|
2004-11-24 19:37:45 -08:00
|
|
|
|
2005-01-12 08:03:09 -08:00
|
|
|
#else
|
|
|
|
#ifndef E_MANAGER_H
|
|
|
|
#define E_MANAGER_H
|
|
|
|
|
2010-06-24 09:19:12 -07:00
|
|
|
#define E_MANAGER_TYPE (int) 0xE0b01008
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2012-12-12 11:21:31 -08:00
|
|
|
extern EAPI int E_EVENT_MANAGER_KEYS_GRAB;
|
|
|
|
|
2004-11-24 19:37:45 -08:00
|
|
|
struct _E_Manager
|
|
|
|
{
|
|
|
|
E_Object e_obj_inherit;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2004-11-24 19:37:45 -08:00
|
|
|
Ecore_X_Window win;
|
2005-06-02 02:49:07 -07:00
|
|
|
int num;
|
2004-11-24 19:37:45 -08:00
|
|
|
int x, y, w, h;
|
|
|
|
char visible : 1;
|
|
|
|
Ecore_X_Window root;
|
2008-10-22 04:49:33 -07:00
|
|
|
Eina_List *handlers;
|
|
|
|
Eina_List *containers;
|
2005-09-28 06:30:49 -07:00
|
|
|
|
|
|
|
E_Pointer *pointer;
|
2007-09-23 18:16:47 -07:00
|
|
|
Ecore_X_Window initwin;
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2010-08-01 07:29:19 -07:00
|
|
|
E_Manager_Comp *comp;
|
2012-02-20 19:16:32 -08:00
|
|
|
Ecore_Timer *clear_timer;
|
2004-11-24 19:37:45 -08:00
|
|
|
};
|
|
|
|
|
2011-10-10 13:30:33 -07:00
|
|
|
struct _E_Manager_Comp
|
|
|
|
{
|
|
|
|
struct {
|
|
|
|
Evas * (*evas_get) (void *data, E_Manager *man);
|
|
|
|
void (*update) (void *data, E_Manager *man);
|
|
|
|
const Eina_List * (*src_list_get) (void *data, E_Manager *man);
|
|
|
|
Evas_Object * (*src_image_get) (void *data, E_Manager *man, E_Manager_Comp_Source *src);
|
|
|
|
Evas_Object * (*src_shadow_get) (void *data, E_Manager *man, E_Manager_Comp_Source *src);
|
|
|
|
Evas_Object * (*src_image_mirror_add) (void *data, E_Manager *man, E_Manager_Comp_Source *src);
|
|
|
|
Eina_Bool (*src_visible_get) (void *data, E_Manager *man, E_Manager_Comp_Source *src);
|
|
|
|
void (*src_hidden_set) (void *data, E_Manager *man, E_Manager_Comp_Source *src, Eina_Bool hidden);
|
|
|
|
Eina_Bool (*src_hidden_get) (void *data, E_Manager *man, E_Manager_Comp_Source *src);
|
|
|
|
E_Manager_Comp_Source * (*src_get) (void *data, E_Manager *man, Ecore_X_Window win);
|
2012-07-05 07:57:05 -07:00
|
|
|
E_Manager_Comp_Source * (*border_src_get) (void *data, E_Manager *man, Ecore_X_Window win);
|
2011-10-10 14:09:26 -07:00
|
|
|
E_Popup * (*src_popup_get) (void *data, E_Manager *man, E_Manager_Comp_Source *src);
|
|
|
|
E_Border * (*src_border_get) (void *data, E_Manager *man, E_Manager_Comp_Source *src);
|
|
|
|
Ecore_X_Window (*src_window_get) (void *data, E_Manager *man, E_Manager_Comp_Source *src);
|
2011-10-10 13:30:33 -07:00
|
|
|
} func;
|
|
|
|
void *data;
|
|
|
|
};
|
|
|
|
|
2010-11-22 07:21:32 -08:00
|
|
|
EINTERN int e_manager_init(void);
|
|
|
|
EINTERN int e_manager_shutdown(void);
|
2008-10-22 04:49:33 -07:00
|
|
|
EAPI Eina_List *e_manager_list(void);
|
2012-06-20 23:19:43 -07:00
|
|
|
|
2005-08-25 06:48:32 -07:00
|
|
|
EAPI E_Manager *e_manager_new(Ecore_X_Window root, int num);
|
2005-02-13 04:31:31 -08:00
|
|
|
EAPI void e_manager_manage_windows(E_Manager *man);
|
2005-01-05 00:30:25 -08:00
|
|
|
EAPI void e_manager_show(E_Manager *man);
|
|
|
|
EAPI void e_manager_hide(E_Manager *man);
|
|
|
|
EAPI void e_manager_move(E_Manager *man, int x, int y);
|
|
|
|
EAPI void e_manager_resize(E_Manager *man, int w, int h);
|
|
|
|
EAPI void e_manager_move_resize(E_Manager *man, int x, int y, int w, int h);
|
|
|
|
EAPI void e_manager_raise(E_Manager *man);
|
|
|
|
EAPI void e_manager_lower(E_Manager *man);
|
2005-07-27 21:35:45 -07:00
|
|
|
EAPI E_Manager *e_manager_current_get(void);
|
2005-08-25 06:41:26 -07:00
|
|
|
EAPI E_Manager *e_manager_number_get(int num);
|
2005-02-13 03:17:46 -08:00
|
|
|
|
2005-04-29 12:42:19 -07:00
|
|
|
EAPI void e_managers_keys_grab(void);
|
|
|
|
EAPI void e_managers_keys_ungrab(void);
|
2010-08-01 07:29:19 -07:00
|
|
|
|
|
|
|
// tenative api for e's compositor to advertise to the rest of e the comp
|
|
|
|
// canvas. on comp evas register (set evas) we send:
|
|
|
|
// e_msg_send("comp.manager", "comp.change", 0, man);
|
|
|
|
// so to hook up to it:
|
|
|
|
// static void handler(void *data, const char *name, const char *info, int val, E_Object *obj, void *msgdata)
|
|
|
|
// {
|
2010-08-02 23:10:33 -07:00
|
|
|
// if (!strcmp(name, "comp.manager"))
|
2010-08-01 07:29:19 -07:00
|
|
|
// {
|
|
|
|
// if (!strcmp(info, "change.comp"))
|
|
|
|
// { // compositor canvas added or deleted
|
|
|
|
// Evas *e = e_manager_comp_evas_get((E_Manager *)obj);
|
|
|
|
// if (!e) printf("No comp manager\n");
|
|
|
|
// else printf("comp canvas = %p\n", e);
|
|
|
|
// }
|
|
|
|
/// FIXME: implement below
|
2010-08-02 23:10:33 -07:00
|
|
|
// else if (!strcmp(info, "resize.comp"))
|
2010-08-01 07:29:19 -07:00
|
|
|
// { // compositor canvas resized
|
|
|
|
// }
|
2010-08-02 23:10:33 -07:00
|
|
|
// else if (!strcmp(info, "add.src"))
|
2010-08-01 07:29:19 -07:00
|
|
|
// { // compositor source added
|
|
|
|
// }
|
2010-08-02 23:10:33 -07:00
|
|
|
// else if (!strcmp(info, "del.src"))
|
2010-08-01 07:29:19 -07:00
|
|
|
// { // compositor source deleted
|
|
|
|
// }
|
2010-08-02 23:10:33 -07:00
|
|
|
// else if (!strcmp(info, "config.src"))
|
2010-08-01 07:29:19 -07:00
|
|
|
// { // compositor src reconfigured (moved, resized)
|
|
|
|
// }
|
2010-08-02 23:10:33 -07:00
|
|
|
// else if (!strcmp(info, "visible.src"))
|
2010-08-01 07:29:19 -07:00
|
|
|
// { // compositor src shown or hidden
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// e_msg_handler_add(handler, mydata);
|
2012-06-20 23:19:43 -07:00
|
|
|
//
|
2010-08-01 07:29:19 -07:00
|
|
|
// remember to listen to zone confiugre events like:
|
|
|
|
// E_EVENT_ZONE_MOVE_RESIZE
|
|
|
|
// E_EVENT_ZONE_ADD
|
|
|
|
// E_EVENT_ZONE_DEL
|
2012-06-20 23:19:43 -07:00
|
|
|
//
|
|
|
|
// only 1 compositor can own a manager at a time, so before you "set" the
|
2010-08-01 07:29:19 -07:00
|
|
|
// comp evas, you need to get it and make sure it's NULL, if so, then
|
|
|
|
// you can set the update func and the comp evas
|
|
|
|
EAPI void e_manager_comp_set(E_Manager *man, E_Manager_Comp *comp);
|
|
|
|
EAPI Evas *e_manager_comp_evas_get(E_Manager *man);
|
|
|
|
EAPI void e_manager_comp_evas_update(E_Manager *man);
|
|
|
|
EAPI const Eina_List *e_manager_comp_src_list(E_Manager *man);
|
|
|
|
EAPI Evas_Object *e_manager_comp_src_image_get(E_Manager *man, E_Manager_Comp_Source *src);
|
|
|
|
EAPI Evas_Object *e_manager_comp_src_shadow_get(E_Manager *man, E_Manager_Comp_Source *src);
|
|
|
|
EAPI Evas_Object *e_manager_comp_src_image_mirror_add(E_Manager *man, E_Manager_Comp_Source *src);
|
|
|
|
EAPI Eina_Bool e_manager_comp_src_visible_get(E_Manager *man, E_Manager_Comp_Source *src);
|
|
|
|
EAPI void e_manager_comp_src_hidden_set(E_Manager *man, E_Manager_Comp_Source *src, Eina_Bool hidden);
|
|
|
|
EAPI Eina_Bool e_manager_comp_src_hidden_get(E_Manager *man, E_Manager_Comp_Source *src);
|
|
|
|
EAPI void e_manager_comp_event_resize_send(E_Manager *man);
|
|
|
|
EAPI void e_manager_comp_event_src_add_send(E_Manager *man, E_Manager_Comp_Source *src, void (*afterfunc) (void *data, E_Manager *man, E_Manager_Comp_Source *src), void *data);
|
|
|
|
EAPI void e_manager_comp_event_src_del_send(E_Manager *man, E_Manager_Comp_Source *src, void (*afterfunc) (void *data, E_Manager *man, E_Manager_Comp_Source *src), void *data);
|
|
|
|
EAPI void e_manager_comp_event_src_config_send(E_Manager *man, E_Manager_Comp_Source *src, void (*afterfunc) (void *data, E_Manager *man, E_Manager_Comp_Source *src), void *data);
|
|
|
|
EAPI void e_manager_comp_event_src_visibility_send(E_Manager *man, E_Manager_Comp_Source *src, void (*afterfunc) (void *data, E_Manager *man, E_Manager_Comp_Source *src), void *data);
|
2011-10-10 13:30:33 -07:00
|
|
|
EAPI E_Manager_Comp_Source *e_manager_comp_src_get(E_Manager *man, Ecore_X_Window win);
|
2012-07-05 07:57:05 -07:00
|
|
|
EAPI E_Manager_Comp_Source *e_manager_comp_border_src_get(E_Manager *man, Ecore_X_Window win);
|
2011-10-10 14:09:26 -07:00
|
|
|
EAPI E_Popup *e_manager_comp_src_popup_get(E_Manager *man, E_Manager_Comp_Source *src);
|
|
|
|
EAPI E_Border *e_manager_comp_src_border_get(E_Manager *man, E_Manager_Comp_Source *src);
|
|
|
|
EAPI Ecore_X_Window e_manager_comp_src_window_get(E_Manager *man, E_Manager_Comp_Source *src);
|
2004-11-24 19:37:45 -08:00
|
|
|
#endif
|
2005-01-12 08:03:09 -08:00
|
|
|
#endif
|