From f0d755c08bde6faaa5454bf420b2e04cd516b35c Mon Sep 17 00:00:00 2001 From: devilhorns Date: Tue, 23 Feb 2010 20:53:34 +0000 Subject: [PATCH] Add atoms/functions for keyboard geometry. This will be used w/ conformant apps to notify them of keyboard changes so they can move widgets around, etc, etc. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@46402 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/ecore_x/Ecore_X.h | 2 ++ src/lib/ecore_x/Ecore_X_Atoms.h | 1 + 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 | 31 +++++++++++++++++++++++++++++++ 5 files changed, 36 insertions(+) diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h index 535220f..d48a68c 100644 --- a/src/lib/ecore_x/Ecore_X.h +++ b/src/lib/ecore_x/Ecore_X.h @@ -1590,6 +1590,8 @@ EAPI void ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win, int x, int EAPI int ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h); EAPI void ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win, int x, int y, int w, int h); EAPI int ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h); +EAPI void ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win, int x, int y, int w, int h); +EAPI int ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h); 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_e_illume_quickpanel_state_set(Ecore_X_Window win, Ecore_X_Illume_Quickpanel_State state); diff --git a/src/lib/ecore_x/Ecore_X_Atoms.h b/src/lib/ecore_x/Ecore_X_Atoms.h index aea8ed7..2e1a957 100644 --- a/src/lib/ecore_x/Ecore_X_Atoms.h +++ b/src/lib/ecore_x/Ecore_X_Atoms.h @@ -224,6 +224,7 @@ 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_INDICATOR_GEOMETRY; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON; diff --git a/src/lib/ecore_x/ecore_x_atoms_decl.h b/src/lib/ecore_x/ecore_x_atoms_decl.h index 674a391..81746ca 100644 --- a/src/lib/ecore_x/ecore_x_atoms_decl.h +++ b/src/lib/ecore_x/ecore_x_atoms_decl.h @@ -246,6 +246,7 @@ 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_INDICATOR_GEOMETRY = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY = 0; +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON = 0; diff --git a/src/lib/ecore_x/xlib/ecore_x_atoms.c b/src/lib/ecore_x/xlib/ecore_x_atoms.c index 61bddd5..f4178a4 100644 --- a/src/lib/ecore_x/xlib/ecore_x_atoms.c +++ b/src/lib/ecore_x/xlib/ecore_x_atoms.c @@ -239,6 +239,7 @@ _ecore_x_atoms_init(void) { "_E_ILLUME_DRAG_END", &ECORE_X_ATOM_E_ILLUME_DRAG_END }, { "_E_ILLUME_INDICATOR_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY }, { "_E_ILLUME_SOFTKEY_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY }, + { "_E_ILLUME_KEYBOARD_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY }, { "_E_ILLUME_QUICKPANEL", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL }, { "_E_ILLUME_QUICKPANEL_STATE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE }, { "_E_ILLUME_QUICKPANEL_ON", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON }, diff --git a/src/lib/ecore_x/xlib/ecore_x_e.c b/src/lib/ecore_x/xlib/ecore_x_e.c index 38c0564..7c290f1 100644 --- a/src/lib/ecore_x/xlib/ecore_x_e.c +++ b/src/lib/ecore_x/xlib/ecore_x_e.c @@ -415,6 +415,37 @@ ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win, int *x, int *y, int *w return 1; } +EAPI void +ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win, int x, int y, int w, int h) +{ + unsigned int geom[4]; + + geom[0] = x; + geom[1] = y; + geom[2] = w; + geom[3] = h; + ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY, + geom, 4); +} + +EAPI int +ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h) +{ + int ret = 0; + unsigned int geom[4]; + + ret = + ecore_x_window_prop_card32_get(win, + ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY, + geom, 4); + if (ret != 4) return 0; + if (x) *x = geom[0]; + if (y) *y = geom[1]; + if (w) *w = geom[2]; + if (h) *h = geom[3]; + return 1; +} + static Ecore_X_Atom _ecore_x_e_quickpanel_atom_get(Ecore_X_Illume_Quickpanel_State state) { -- 2.7.4