From 67ade18c0fbe1e0ba94a400000a5882e496b4e8c Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Wed, 16 Dec 2009 02:20:38 +0000 Subject: [PATCH] Add atoms for illume drag start & end so that policies can handle dragging in their own way. SVN revision: 44492 --- legacy/ecore/src/lib/ecore_x/Ecore_X.h | 4 +++ legacy/ecore/src/lib/ecore_x/Ecore_X_Atoms.h | 3 ++ .../src/lib/ecore_x/ecore_x_atoms_decl.h | 3 ++ .../src/lib/ecore_x/xlib/ecore_x_atoms.c | 4 ++- legacy/ecore/src/lib/ecore_x/xlib/ecore_x_e.c | 32 +++++++++++++++++++ 5 files changed, 45 insertions(+), 1 deletion(-) diff --git a/legacy/ecore/src/lib/ecore_x/Ecore_X.h b/legacy/ecore/src/lib/ecore_x/Ecore_X.h index 6d5c2d7175..3258a5a589 100644 --- a/legacy/ecore/src/lib/ecore_x/Ecore_X.h +++ b/legacy/ecore/src/lib/ecore_x/Ecore_X.h @@ -1544,6 +1544,10 @@ EAPI Ecore_X_Illume_Mode ecore_x_e_illume_mode_get(Ecore_X_Window win); EAPI void ecore_x_e_illume_mode_send(Ecore_X_Window win, Ecore_X_Illume_Mode mode); EAPI void ecore_x_e_illume_back_send(Ecore_X_Window win); EAPI void ecore_x_e_illume_close_send(Ecore_X_Window win); +EAPI void ecore_x_e_illume_drag_set(Ecore_X_Window win, unsigned int drag); +EAPI int ecore_x_e_illume_drag_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_xinerama_query_screens_prefetch(void); diff --git a/legacy/ecore/src/lib/ecore_x/Ecore_X_Atoms.h b/legacy/ecore/src/lib/ecore_x/Ecore_X_Atoms.h index 6bb73a2e49..255b2ba05b 100644 --- a/legacy/ecore/src/lib/ecore_x/Ecore_X_Atoms.h +++ b/legacy/ecore/src/lib/ecore_x/Ecore_X_Atoms.h @@ -210,5 +210,8 @@ EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_MODE_SINGLE; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_MODE_DUAL; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_BACK; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CLOSE; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_START; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_END; #endif /* _ECORE_X_ATOMS_H */ diff --git a/legacy/ecore/src/lib/ecore_x/ecore_x_atoms_decl.h b/legacy/ecore/src/lib/ecore_x/ecore_x_atoms_decl.h index d3827f2d8e..f912b51869 100644 --- a/legacy/ecore/src/lib/ecore_x/ecore_x_atoms_decl.h +++ b/legacy/ecore/src/lib/ecore_x/ecore_x_atoms_decl.h @@ -233,3 +233,6 @@ EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_MODE_SINGLE = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_MODE_DUAL = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_BACK = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CLOSE = 0; +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG = 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; diff --git a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_atoms.c b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_atoms.c index a6d8796dd2..f3c5e2cc05 100644 --- a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_atoms.c +++ b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_atoms.c @@ -223,7 +223,9 @@ _ecore_x_atoms_init(void) { "_E_ILLUME_MODE_SINGLE", &ECORE_X_ATOM_E_ILLUME_MODE_SINGLE }, { "_E_ILLUME_MODE_DUAL", &ECORE_X_ATOM_E_ILLUME_MODE_DUAL }, { "_E_ILLUME_BACK", &ECORE_X_ATOM_E_ILLUME_BACK }, - { "_E_ILLUME_CLOSE", &ECORE_X_ATOM_E_ILLUME_CLOSE } + { "_E_ILLUME_DRAG", &ECORE_X_ATOM_E_ILLUME_DRAG }, + { "_E_ILLUME_DRAG_START", &ECORE_X_ATOM_E_ILLUME_DRAG_START }, + { "_E_ILLUME_DRAG_END", &ECORE_X_ATOM_E_ILLUME_DRAG_END } }; Atom *atoms; char **names; diff --git a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_e.c b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_e.c index 5e4ff680e2..d68368cc0c 100644 --- a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_e.c +++ b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_e.c @@ -199,3 +199,35 @@ ecore_x_e_illume_close_send(Ecore_X_Window win) ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 1, 0, 0, 0, 0); } + +EAPI void +ecore_x_e_illume_drag_set(Ecore_X_Window win, unsigned int drag) +{ + ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG,&drag, 1); +} + +EAPI int +ecore_x_e_illume_drag_get(Ecore_X_Window win) +{ + unsigned int val = 0; + + if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_DRAG, &val, 1)) + return 0; + return val; +} + +EAPI void +ecore_x_e_illume_drag_start_send(Ecore_X_Window win) +{ + ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_DRAG_START, + ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, + 1, 0, 0, 0, 0); +} + +EAPI void +ecore_x_e_illume_drag_end_send(Ecore_X_Window win) +{ + ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_DRAG_END, + ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, + 1, 0, 0, 0, 0); +}