2 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
5 #include "ecore_x_private.h"
9 * @defgroup Ecore_X_Drawable_Group X Drawable Functions
11 * Functions that operate on drawables.
16 * Retrieves the geometry of the given drawable.
17 * @param d The given drawable.
18 * @param x Pointer to an integer into which the X position is to be stored.
19 * @param y Pointer to an integer into which the Y position is to be stored.
20 * @param w Pointer to an integer into which the width is to be stored.
21 * @param h Pointer to an integer into which the height is to be stored.
22 * @ingroup Ecore_X_Drawable_Group
25 ecore_x_drawable_geometry_get(Ecore_X_Drawable d, int *x, int *y, int *w, int *h)
29 unsigned int ret_w, ret_h, dummy_border, dummy_depth;
31 if (!XGetGeometry(_ecore_x_disp, d, &dummy_win, &ret_x, &ret_y,
32 &ret_w, &ret_h, &dummy_border, &dummy_depth))
42 if (w) *w = (int) ret_w;
43 if (h) *h = (int) ret_h;
47 * Retrieves the width of the border of the given drawable.
48 * @param d The given drawable.
49 * @return The border width of the given drawable.
50 * @ingroup Ecore_X_Drawable_Group
53 ecore_x_drawable_border_width_get(Ecore_X_Drawable d)
57 unsigned int dummy_w, dummy_h, border_ret, dummy_depth;
59 if (!XGetGeometry(_ecore_x_disp, d, &dummy_win, &dummy_x, &dummy_y,
60 &dummy_w, &dummy_h, &border_ret, &dummy_depth))
63 return (int) border_ret;
67 * Retrieves the depth of the given drawable.
68 * @param d The given drawable.
69 * @return The depth of the given drawable.
70 * @ingroup Ecore_X_Drawable_Group
73 ecore_x_drawable_depth_get(Ecore_X_Drawable d)
77 unsigned int dummy_w, dummy_h, dummy_border, depth_ret;
79 if (!XGetGeometry(_ecore_x_disp, d, &dummy_win, &dummy_x, &dummy_y,
80 &dummy_w, &dummy_h, &dummy_border, &depth_ret))
83 return (int) depth_ret;