1 #include "ecore_xcb_private.h"
4 * @defgroup Ecore_X_Drawable_Group X Drawable Functions
5 * @ingroup Ecore_X_Group
7 * Functions that operate on drawables.
11 * Fill the specified rectangle on a drawable.
12 * @param d The given drawable.
13 * @param gc The graphic context that controls the fill rules.
14 * @param x The X coordinate of the top-left corner of the rectangle.
15 * @param y The Y coordinate of the top-left corner of the rectangle.
16 * @param width The width of the rectangle.
17 * @param height The height of the rectangle.
20 ecore_x_drawable_rectangle_fill(Ecore_X_Drawable draw,
29 LOGFN(__FILE__, __LINE__, __FUNCTION__);
36 xcb_poly_fill_rectangle(_ecore_xcb_conn, draw, gc, 1,
37 (const xcb_rectangle_t *)&rect);
42 * Retrieves the geometry of the given drawable.
43 * @param d The given drawable.
44 * @param x Pointer to an integer into which the X position is to be stored.
45 * @param y Pointer to an integer into which the Y position is to be stored.
46 * @param w Pointer to an integer into which the width is to be stored.
47 * @param h Pointer to an integer into which the height is to be stored.
48 * @ingroup Ecore_X_Drawable_Group
51 ecore_x_drawable_geometry_get(Ecore_X_Drawable draw,
57 xcb_get_geometry_cookie_t cookie;
58 xcb_get_geometry_reply_t *reply;
60 LOGFN(__FILE__, __LINE__, __FUNCTION__);
67 cookie = xcb_get_geometry_unchecked(_ecore_xcb_conn, draw);
68 reply = xcb_get_geometry_reply(_ecore_xcb_conn, cookie, NULL);
72 if (w) *w = (int)reply->width;
73 if (h) *h = (int)reply->height;
78 * Retrieves the width of the border of the given drawable.
79 * @param d The given drawable.
80 * @return The border width of the given drawable.
81 * @ingroup Ecore_X_Drawable_Group
84 ecore_x_drawable_border_width_get(Ecore_X_Drawable d)
86 xcb_get_geometry_cookie_t cookie;
87 xcb_get_geometry_reply_t *reply;
90 LOGFN(__FILE__, __LINE__, __FUNCTION__);
93 cookie = xcb_get_geometry_unchecked(_ecore_xcb_conn, d);
94 reply = xcb_get_geometry_reply(_ecore_xcb_conn, cookie, NULL);
96 ret = (int)reply->border_width;
102 * Retrieves the depth of the given drawable.
103 * @param d The given drawable.
104 * @return The depth of the given drawable.
105 * @ingroup Ecore_X_Drawable_Group
108 ecore_x_drawable_depth_get(Ecore_X_Drawable d)
110 xcb_get_geometry_cookie_t cookie;
111 xcb_get_geometry_reply_t *reply;
114 LOGFN(__FILE__, __LINE__, __FUNCTION__);
117 cookie = xcb_get_geometry_unchecked(_ecore_xcb_conn, d);
118 reply = xcb_get_geometry_reply(_ecore_xcb_conn, cookie, NULL);
119 if (!reply) return 0;
120 ret = (int)reply->depth;