1 #include "ecore_xcb_private.h"
4 * @defgroup Ecore_X_Drawable_Group X Drawable Functions
6 * Functions that operate on drawables.
10 * Fill the specified rectangle on a drawable.
11 * @param d The given drawable.
12 * @param gc The graphic context that controls the fill rules.
13 * @param x The X coordinate of the top-left corner of the rectangle.
14 * @param y The Y coordinate of the top-left corner of the rectangle.
15 * @param width The width of the rectangle.
16 * @param height The height of the rectangle.
19 ecore_x_drawable_rectangle_fill(Ecore_X_Drawable draw,
28 LOGFN(__FILE__, __LINE__, __FUNCTION__);
35 xcb_poly_fill_rectangle(_ecore_xcb_conn, draw, gc, 1,
36 (const xcb_rectangle_t *)&rect);
41 * Retrieves the geometry of the given drawable.
42 * @param d The given drawable.
43 * @param x Pointer to an integer into which the X position is to be stored.
44 * @param y Pointer to an integer into which the Y position is to be stored.
45 * @param w Pointer to an integer into which the width is to be stored.
46 * @param h Pointer to an integer into which the height is to be stored.
47 * @ingroup Ecore_X_Drawable_Group
50 ecore_x_drawable_geometry_get(Ecore_X_Drawable draw,
56 xcb_get_geometry_cookie_t cookie;
57 xcb_get_geometry_reply_t *reply;
59 LOGFN(__FILE__, __LINE__, __FUNCTION__);
66 cookie = xcb_get_geometry_unchecked(_ecore_xcb_conn, draw);
67 reply = xcb_get_geometry_reply(_ecore_xcb_conn, cookie, NULL);
71 if (w) *w = (int)reply->width;
72 if (h) *h = (int)reply->height;
77 * Retrieves the width of the border of the given drawable.
78 * @param d The given drawable.
79 * @return The border width of the given drawable.
80 * @ingroup Ecore_X_Drawable_Group
83 ecore_x_drawable_border_width_get(Ecore_X_Drawable d)
85 xcb_get_geometry_cookie_t cookie;
86 xcb_get_geometry_reply_t *reply;
89 LOGFN(__FILE__, __LINE__, __FUNCTION__);
92 cookie = xcb_get_geometry_unchecked(_ecore_xcb_conn, d);
93 reply = xcb_get_geometry_reply(_ecore_xcb_conn, cookie, NULL);
95 ret = (int)reply->border_width;
101 * Retrieves the depth of the given drawable.
102 * @param d The given drawable.
103 * @return The depth of the given drawable.
104 * @ingroup Ecore_X_Drawable_Group
107 ecore_x_drawable_depth_get(Ecore_X_Drawable d)
109 xcb_get_geometry_cookie_t cookie;
110 xcb_get_geometry_reply_t *reply;
113 LOGFN(__FILE__, __LINE__, __FUNCTION__);
116 cookie = xcb_get_geometry_unchecked(_ecore_xcb_conn, d);
117 reply = xcb_get_geometry_reply(_ecore_xcb_conn, cookie, NULL);
118 if (!reply) return 0;
119 ret = (int)reply->depth;