3 #endif /* ifdef HAVE_CONFIG_H */
5 #include "ecore_x_private.h"
8 * @defgroup Ecore_X_Drawable_Group X Drawable Functions
10 * Functions that operate on drawables.
14 * Retrieves the geometry of the given drawable.
15 * @param d The given drawable.
16 * @param x Pointer to an integer into which the X position is to be stored.
17 * @param y Pointer to an integer into which the Y position is to be stored.
18 * @param w Pointer to an integer into which the width is to be stored.
19 * @param h Pointer to an integer into which the height is to be stored.
20 * @ingroup Ecore_X_Drawable_Group
23 ecore_x_drawable_geometry_get(Ecore_X_Drawable d,
31 unsigned int ret_w, ret_h, dummy_border, dummy_depth;
33 LOGFN(__FILE__, __LINE__, __FUNCTION__);
34 if (!XGetGeometry(_ecore_x_disp, d, &dummy_win, &ret_x, &ret_y,
35 &ret_w, &ret_h, &dummy_border, &dummy_depth))
54 } /* ecore_x_drawable_geometry_get */
57 * Retrieves the width of the border of the given drawable.
58 * @param d The given drawable.
59 * @return The border width of the given drawable.
60 * @ingroup Ecore_X_Drawable_Group
63 ecore_x_drawable_border_width_get(Ecore_X_Drawable d)
67 unsigned int dummy_w, dummy_h, border_ret, dummy_depth;
69 LOGFN(__FILE__, __LINE__, __FUNCTION__);
70 if (!XGetGeometry(_ecore_x_disp, d, &dummy_win, &dummy_x, &dummy_y,
71 &dummy_w, &dummy_h, &border_ret, &dummy_depth))
74 return (int)border_ret;
75 } /* ecore_x_drawable_border_width_get */
78 * Retrieves the depth of the given drawable.
79 * @param d The given drawable.
80 * @return The depth of the given drawable.
81 * @ingroup Ecore_X_Drawable_Group
84 ecore_x_drawable_depth_get(Ecore_X_Drawable d)
88 unsigned int dummy_w, dummy_h, dummy_border, depth_ret;
90 LOGFN(__FILE__, __LINE__, __FUNCTION__);
91 if (!XGetGeometry(_ecore_x_disp, d, &dummy_win, &dummy_x, &dummy_y,
92 &dummy_w, &dummy_h, &dummy_border, &depth_ret))
95 return (int)depth_ret;
96 } /* ecore_x_drawable_depth_get */
99 * Fill the specified rectangle on a drawable.
100 * @param d The given drawable.
101 * @param gc The graphic context that controls the fill rules.
102 * @param x The X coordinate of the top-left corner of the rectangle.
103 * @param y The Y coordinate of the top-left corner of the rectangle.
104 * @param width The width of the rectangle.
105 * @param height The height of the rectangle.
108 ecore_x_drawable_rectangle_fill(Ecore_X_Drawable d,
115 LOGFN(__FILE__, __LINE__, __FUNCTION__);
116 XFillRectangle(_ecore_x_disp, d, gc, x, y, width, height);
117 } /* ecore_x_drawable_rectangle_fill */