ecore_x_window_geometry_get() added

SVN revision: 9068
This commit is contained in:
xcomputerman 2004-02-21 21:09:13 +00:00 committed by xcomputerman
parent a2df8a3305
commit d4a727c911
2 changed files with 32 additions and 0 deletions

View File

@ -732,6 +732,7 @@ void ecore_x_window_raise(Ecore_X_Window win);
void ecore_x_window_lower(Ecore_X_Window win);
void ecore_x_window_reparent(Ecore_X_Window win, Ecore_X_Window new_parent, int x, int y);
void ecore_x_window_size_get(Ecore_X_Window win, int *w, int *h);
void ecore_x_window_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h);
void ecore_x_window_cursor_show(Ecore_X_Window win, int show);
void ecore_x_window_defaults_set(Ecore_X_Window win);

View File

@ -383,6 +383,37 @@ ecore_x_window_size_get(Ecore_X_Window win, int *w, int *h)
if (h) *h = (int)ret_h;
}
/**
* To be documented.
*
* FIXME: To be fixed.
*/
void
ecore_x_window_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h)
{
Window dummy_win;
int ret_x, ret_y;
unsigned int ret_w, ret_h, dummy_border, dummy_depth;
if (!win)
win = DefaultRootWindow(_ecore_x_disp);
ret_w = 0;
ret_h = 0;
if (!XGetGeometry(_ecore_x_disp, win, &dummy_win, &ret_x, &ret_y,
&ret_w, &ret_h, &dummy_border, &dummy_depth))
{
ret_x = 0;
ret_y = 0;
ret_w = 0;
ret_h = 0;
}
if (x) *x = ret_x;
if (y) *y = ret_y;
if (w) *w = (int) ret_w;
if (h) *h = (int) ret_h;
}
/**
* To be documented.
*