From fc79caa75921353665b074f4409fb3afaeb1096d Mon Sep 17 00:00:00 2001 From: devilhorns Date: Wed, 16 Dec 2009 19:43:53 +0000 Subject: [PATCH] Add atoms & functions to set/get if illume dragging is enabled on a given window. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@44511 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/ecore_x/Ecore_X.h | 2 ++ src/lib/ecore_x/Ecore_X_Atoms.h | 3 ++- src/lib/ecore_x/ecore_x_atoms_decl.h | 1 + src/lib/ecore_x/xlib/ecore_x_atoms.c | 1 + src/lib/ecore_x/xlib/ecore_x_e.c | 20 +++++++++++++++++++- 5 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h index 3258a5a..3b1be4c 100644 --- a/src/lib/ecore_x/Ecore_X.h +++ b/src/lib/ecore_x/Ecore_X.h @@ -1546,6 +1546,8 @@ 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_locked_set(Ecore_X_Window win, unsigned int is_locked); +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); diff --git a/src/lib/ecore_x/Ecore_X_Atoms.h b/src/lib/ecore_x/Ecore_X_Atoms.h index 255b2ba..408ef2b 100644 --- a/src/lib/ecore_x/Ecore_X_Atoms.h +++ b/src/lib/ecore_x/Ecore_X_Atoms.h @@ -203,7 +203,7 @@ EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME; -/* atom to determine if an app is illume compliant */ +/* Illume specific atoms */ EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CONFORMANT; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_MODE; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_MODE_SINGLE; @@ -211,6 +211,7 @@ 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_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; diff --git a/src/lib/ecore_x/ecore_x_atoms_decl.h b/src/lib/ecore_x/ecore_x_atoms_decl.h index f912b51..8d9d846 100644 --- a/src/lib/ecore_x/ecore_x_atoms_decl.h +++ b/src/lib/ecore_x/ecore_x_atoms_decl.h @@ -234,5 +234,6 @@ 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_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; diff --git a/src/lib/ecore_x/xlib/ecore_x_atoms.c b/src/lib/ecore_x/xlib/ecore_x_atoms.c index f3c5e2c..ae9cbb2 100644 --- a/src/lib/ecore_x/xlib/ecore_x_atoms.c +++ b/src/lib/ecore_x/xlib/ecore_x_atoms.c @@ -224,6 +224,7 @@ _ecore_x_atoms_init(void) { "_E_ILLUME_MODE_DUAL", &ECORE_X_ATOM_E_ILLUME_MODE_DUAL }, { "_E_ILLUME_BACK", &ECORE_X_ATOM_E_ILLUME_BACK }, { "_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 } }; diff --git a/src/lib/ecore_x/xlib/ecore_x_e.c b/src/lib/ecore_x/xlib/ecore_x_e.c index d68368c..e5bfb36 100644 --- a/src/lib/ecore_x/xlib/ecore_x_e.c +++ b/src/lib/ecore_x/xlib/ecore_x_e.c @@ -203,7 +203,7 @@ 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) { - ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG,&drag, 1); + ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG, &drag, 1); } EAPI int @@ -217,6 +217,24 @@ ecore_x_e_illume_drag_get(Ecore_X_Window win) } EAPI void +ecore_x_e_illume_drag_locked_set(Ecore_X_Window win, unsigned int is_locked) +{ + ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED, + &is_locked, 1); +} + +EAPI int +ecore_x_e_illume_drag_locked_get(Ecore_X_Window win) +{ + unsigned int val = 0; + + if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED, + &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, -- 2.7.4