2 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
9 #include "ecore_x_private.h"
13 * @defgroup Ecore_X_Drawable_Group X Drawable Functions
15 * Functions that operate on drawables.
20 * Retrieves the geometry of the given drawable.
21 * @param d The given drawable.
22 * @param x Pointer to an integer into which the X position is to be stored.
23 * @param y Pointer to an integer into which the Y position is to be stored.
24 * @param w Pointer to an integer into which the width is to be stored.
25 * @param h Pointer to an integer into which the height is to be stored.
26 * @ingroup Ecore_X_Drawable_Group
29 ecore_x_drawable_geometry_get(Ecore_X_Drawable d, int *x, int *y, int *w, int *h)
33 unsigned int ret_w, ret_h, dummy_border, dummy_depth;
35 LOGFN(__FILE__, __LINE__, __FUNCTION__);
36 if (!XGetGeometry(_ecore_x_disp, d, &dummy_win, &ret_x, &ret_y,
37 &ret_w, &ret_h, &dummy_border, &dummy_depth))
47 if (w) *w = (int) ret_w;
48 if (h) *h = (int) ret_h;
52 * Retrieves the width of the border of the given drawable.
53 * @param d The given drawable.
54 * @return The border width of the given drawable.
55 * @ingroup Ecore_X_Drawable_Group
58 ecore_x_drawable_border_width_get(Ecore_X_Drawable d)
62 unsigned int dummy_w, dummy_h, border_ret, dummy_depth;
64 LOGFN(__FILE__, __LINE__, __FUNCTION__);
65 if (!XGetGeometry(_ecore_x_disp, d, &dummy_win, &dummy_x, &dummy_y,
66 &dummy_w, &dummy_h, &border_ret, &dummy_depth))
69 return (int) border_ret;
73 * Retrieves the depth of the given drawable.
74 * @param d The given drawable.
75 * @return The depth of the given drawable.
76 * @ingroup Ecore_X_Drawable_Group
79 ecore_x_drawable_depth_get(Ecore_X_Drawable d)
83 unsigned int dummy_w, dummy_h, dummy_border, depth_ret;
85 LOGFN(__FILE__, __LINE__, __FUNCTION__);
86 if (!XGetGeometry(_ecore_x_disp, d, &dummy_win, &dummy_x, &dummy_y,
87 &dummy_w, &dummy_h, &dummy_border, &depth_ret))
90 return (int) depth_ret;
94 * Fill the specified rectangle on a drawable.
95 * @param d The given drawable.
96 * @param gc The graphic context that controls the fill rules.
97 * @param x The X coordinate of the top-left corner of the rectangle.
98 * @param y The Y coordinate of the top-left corner of the rectangle.
99 * @param width The width of the rectangle.
100 * @param height The height of the rectangle.
103 ecore_x_drawable_rectangle_fill(Ecore_X_Drawable d, Ecore_X_GC gc, int x, int y, int width, int height)
105 LOGFN(__FILE__, __LINE__, __FUNCTION__);
106 XFillRectangle(_ecore_x_disp, d, gc, x, y, width, height);