2 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
5 #include "ecore_xcb_private.h"
10 * @defgroup Ecore_X_Drawable_Group X Drawable Functions
12 * Functions that operate on drawables.
17 * Sends the GetGeometry request.
18 * @param drawable Drawable whose characteristics are sought.
19 * @ingroup Ecore_X_Drawable_Group
22 ecore_x_drawable_geometry_get_prefetch(Ecore_X_Drawable drawable)
24 xcb_get_geometry_cookie_t cookie;
26 cookie = xcb_get_geometry_unchecked(_ecore_xcb_conn, drawable);
27 _ecore_xcb_cookie_cache(cookie.sequence);
32 * Gets the reply of the GetGeometry request sent by ecore_x_atom_get_prefetch().
33 * @ingroup Ecore_X_Drawable_Group
36 ecore_x_drawable_geometry_get_fetch(void)
38 xcb_get_geometry_cookie_t cookie;
39 xcb_get_geometry_reply_t *reply;
41 cookie.sequence = _ecore_xcb_cookie_get();
42 reply = xcb_get_geometry_reply(_ecore_xcb_conn, cookie, NULL);
43 _ecore_xcb_reply_cache(reply);
48 * Retrieves the geometry of the given drawable.
49 * @param drawable Unused.
50 * @param x Pointer to an integer into which the X position is to be stored.
51 * @param y Pointer to an integer into which the Y position is to be stored.
52 * @param width Pointer to an integer into which the width is to be stored.
53 * @param height Pointer to an integer into which the height is to be stored.
55 * To use this function, you must call before, and in order,
56 * ecore_x_drawable_geometry_get_prefetch(), which sends the GetGeometry request,
57 * then ecore_x_drawable_geometry_get_fetch(), which gets the reply.
58 * @ingroup Ecore_X_Drawable_Group
61 ecore_x_drawable_geometry_get(Ecore_X_Drawable drawable __UNUSED__,
67 xcb_get_geometry_reply_t *reply;
69 reply = _ecore_xcb_reply_get();
74 if (width) *width = 0;
75 if (height) *height = 0;
81 if (width) *width = reply->width;
82 if (height) *height = reply->height;
87 * Retrieves the width of the border of the given drawable.
88 * @param drawable Unused.
89 * @return The border width of the given drawable.
91 * To use this function, you must call before, and in order,
92 * ecore_x_drawable_geometry_get_prefetch(), which sends the GetGeometry request,
93 * then ecore_x_drawable_geometry_get_fetch(), which gets the reply.
94 * @ingroup Ecore_X_Drawable_Group
97 ecore_x_drawable_border_width_get(Ecore_X_Drawable drawable __UNUSED__)
99 xcb_get_geometry_reply_t *reply;
101 reply = _ecore_xcb_reply_get();
105 return reply->border_width;
110 * Retrieves the depth of the given drawable.
111 * @param drawable Unused.
112 * @return The depth of the given drawable.
114 * To use this function, you must call before, and in order,
115 * ecore_x_drawable_geometry_get_prefetch(), which sends the GetGeometry request,
116 * then ecore_x_drawable_geometry_get_fetch(), which gets the reply.
117 * @ingroup Ecore_X_Drawable_Group
120 ecore_x_drawable_depth_get(Ecore_X_Drawable drawable __UNUSED__)
122 xcb_get_geometry_reply_t *reply;
124 reply = _ecore_xcb_reply_get();