From 02679c156fa305b37ca2da55ff801e548583fbe4 Mon Sep 17 00:00:00 2001 From: devilhorns Date: Wed, 23 Dec 2009 15:26:19 +0000 Subject: [PATCH] Add atoms/props/functions to set/get if a window is a 'illume quickpanel'. Fix some formatting. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@44692 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/ecore_x/Ecore_X.h | 10 +++++----- src/lib/ecore_x/Ecore_X_Atoms.h | 1 + src/lib/ecore_x/ecore_x_atoms_decl.h | 2 +- src/lib/ecore_x/xlib/ecore_x_atoms.c | 3 ++- src/lib/ecore_x/xlib/ecore_x_e.c | 21 ++++++++++++++++++++- 5 files changed, 29 insertions(+), 8 deletions(-) diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h index b534208..d8e7407 100644 --- a/src/lib/ecore_x/Ecore_X.h +++ b/src/lib/ecore_x/Ecore_X.h @@ -1024,9 +1024,9 @@ typedef enum _Ecore_X_Illume_Mode #define ECORE_X_WINDOW_LAYER_ABOVE 6 /* Property list operations */ -#define ECORE_X_PROP_LIST_REMOVE 0 -#define ECORE_X_PROP_LIST_ADD 1 -#define ECORE_X_PROP_LIST_TOGGLE 2 +#define ECORE_X_PROP_LIST_REMOVE 0 +#define ECORE_X_PROP_LIST_ADD 1 +#define ECORE_X_PROP_LIST_TOGGLE 2 EAPI int ecore_x_init(const char *name); EAPI int ecore_x_shutdown(void); @@ -1317,7 +1317,6 @@ EAPI void ecore_x_get_atom_name_fetch(void); EAPI char *ecore_x_atom_name_get(Ecore_X_Atom atom); - EAPI void ecore_x_icccm_init(void); EAPI void ecore_x_icccm_state_set(Ecore_X_Window win, Ecore_X_Window_State_Hint state); EAPI Ecore_X_Window_State_Hint ecore_x_icccm_state_get(Ecore_X_Window win); @@ -1551,7 +1550,8 @@ EAPI void ecore_x_e_illume_drag_locked_set(Ecore_X_Window win, un EAPI int ecore_x_e_illume_drag_locked_get(Ecore_X_Window win); EAPI void ecore_x_e_illume_drag_start_send(Ecore_X_Window win); EAPI void ecore_x_e_illume_drag_end_send(Ecore_X_Window win); - +EAPI void ecore_x_e_illume_quickpanel_set(Ecore_X_Window win, unsigned int is_quickpanel); +EAPI int ecore_x_e_illume_quickpanel_get(Ecore_X_Window win); EAPI void ecore_x_xinerama_query_screens_prefetch(void); EAPI void ecore_x_xinerama_query_screens_fetch(void); diff --git a/src/lib/ecore_x/Ecore_X_Atoms.h b/src/lib/ecore_x/Ecore_X_Atoms.h index 408ef2b..2567993 100644 --- a/src/lib/ecore_x/Ecore_X_Atoms.h +++ b/src/lib/ecore_x/Ecore_X_Atoms.h @@ -214,5 +214,6 @@ EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_START; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_END; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL; #endif /* _ECORE_X_ATOMS_H */ diff --git a/src/lib/ecore_x/ecore_x_atoms_decl.h b/src/lib/ecore_x/ecore_x_atoms_decl.h index 78c3267..efd33d2 100644 --- a/src/lib/ecore_x/ecore_x_atoms_decl.h +++ b/src/lib/ecore_x/ecore_x_atoms_decl.h @@ -237,4 +237,4 @@ EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_START = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_END = 0; - +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL = 0; diff --git a/src/lib/ecore_x/xlib/ecore_x_atoms.c b/src/lib/ecore_x/xlib/ecore_x_atoms.c index ae9cbb2..fd1b738 100644 --- a/src/lib/ecore_x/xlib/ecore_x_atoms.c +++ b/src/lib/ecore_x/xlib/ecore_x_atoms.c @@ -226,7 +226,8 @@ _ecore_x_atoms_init(void) { "_E_ILLUME_DRAG", &ECORE_X_ATOM_E_ILLUME_DRAG }, { "_E_ILLUME_DRAG_LOCKED", &ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED }, { "_E_ILLUME_DRAG_START", &ECORE_X_ATOM_E_ILLUME_DRAG_START }, - { "_E_ILLUME_DRAG_END", &ECORE_X_ATOM_E_ILLUME_DRAG_END } + { "_E_ILLUME_DRAG_END", &ECORE_X_ATOM_E_ILLUME_DRAG_END }, + { "_E_ILLUME_QUICKPANEL", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL } }; Atom *atoms; char **names; diff --git a/src/lib/ecore_x/xlib/ecore_x_e.c b/src/lib/ecore_x/xlib/ecore_x_e.c index 1e86da4..03c0cbe 100644 --- a/src/lib/ecore_x/xlib/ecore_x_e.c +++ b/src/lib/ecore_x/xlib/ecore_x_e.c @@ -192,7 +192,8 @@ ecore_x_e_illume_conformant_get(Ecore_X_Window win) { unsigned int val = 0; - if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_CONFORMANT, &val, 1)) + if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_CONFORMANT, + &val, 1)) return 0; return val; } @@ -291,3 +292,21 @@ ecore_x_e_illume_drag_end_send(Ecore_X_Window win) ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 1, 0, 0, 0, 0); } + +EAPI void +ecore_x_e_illume_quickpanel_set(Ecore_X_Window win, unsigned int is_quickpanel) +{ + ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL, + &is_quickpanel, 1); +} + +EAPI int +ecore_x_e_illume_quickpanel_get(Ecore_X_Window win) +{ + unsigned int val = 0; + + if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL, + &val, 1)) + return 0; + return val; +} -- 2.7.4