From c32dbe801ae7708b735cd22a65f6b212d678aacd Mon Sep 17 00:00:00 2001 From: devilhorns Date: Thu, 14 Jan 2010 02:30:06 +0000 Subject: [PATCH] Functions & Atoms for get/set of bottom_panel geometry (for use with elm_conformant widget). git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@45102 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 | 3 ++- src/lib/ecore_x/xlib/ecore_x_e.c | 31 +++++++++++++++++++++++++++++++ 5 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h index 8c8e026..78362a3 100644 --- a/src/lib/ecore_x/Ecore_X.h +++ b/src/lib/ecore_x/Ecore_X.h @@ -1573,6 +1573,8 @@ EAPI int ecore_x_e_illume_quickpanel_priority_minor_get(Ecore_X_ EAPI void ecore_x_e_illume_home_send(Ecore_X_Window win); EAPI void ecore_x_e_illume_top_shelf_geometry_set(Ecore_X_Window win, int x, int y, int w, int h); EAPI int ecore_x_e_illume_top_shelf_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h); +EAPI void ecore_x_e_illume_bottom_panel_geometry_set(Ecore_X_Window win, int x, int y, int w, int h); +EAPI int ecore_x_e_illume_bottom_panel_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h); EAPI void ecore_x_xinerama_query_screens_prefetch(void); diff --git a/src/lib/ecore_x/Ecore_X_Atoms.h b/src/lib/ecore_x/Ecore_X_Atoms.h index 610b464..a95bae7 100644 --- a/src/lib/ecore_x/Ecore_X_Atoms.h +++ b/src/lib/ecore_x/Ecore_X_Atoms.h @@ -223,5 +223,6 @@ EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_TOP_SHELF_GEOMETRY; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_BOTTOM_PANEL_GEOMETRY; #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 2427947..4410ae8 100644 --- a/src/lib/ecore_x/ecore_x_atoms_decl.h +++ b/src/lib/ecore_x/ecore_x_atoms_decl.h @@ -246,3 +246,4 @@ EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_TOP_SHELF_GEOMETRY = 0; +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_BOTTOM_PANEL_GEOMETRY = 0; diff --git a/src/lib/ecore_x/xlib/ecore_x_atoms.c b/src/lib/ecore_x/xlib/ecore_x_atoms.c index 4532467..4fc8bb2 100644 --- a/src/lib/ecore_x/xlib/ecore_x_atoms.c +++ b/src/lib/ecore_x/xlib/ecore_x_atoms.c @@ -238,7 +238,8 @@ _ecore_x_atoms_init(void) { "_E_ILLUME_QUICKPANEL_OFF", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF }, { "_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR }, { "_E_ILLUME_QUICKPANEL_PRIORITY_MINOR", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR }, - { "_E_ILLUME_TOP_SHELF_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_TOP_SHELF_GEOMETRY } + { "_E_ILLUME_TOP_SHELF_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_TOP_SHELF_GEOMETRY }, + { "_E_ILLUME_BOTTOM_PANEL_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_BOTTOM_PANEL_GEOMETRY } }; 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 cfa37c5..5e33630 100644 --- a/src/lib/ecore_x/xlib/ecore_x_e.c +++ b/src/lib/ecore_x/xlib/ecore_x_e.c @@ -446,3 +446,34 @@ ecore_x_e_illume_top_shelf_geometry_get(Ecore_X_Window win, int *x, int *y, int if (h) *h = geom[3]; return 1; } + +EAPI void +ecore_x_e_illume_bottom_panel_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_BOTTOM_PANEL_GEOMETRY, + geom, 4); +} + +EAPI int +ecore_x_e_illume_bottom_panel_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_BOTTOM_PANEL_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; +} -- 2.7.4