3 #endif /* ifdef HAVE_CONFIG_H */
6 #include "ecore_x_private.h"
10 * @defgroup Ecore_X_Pixmap_Group X Pixmap Functions
11 * @ingroup Ecore_X_Group
13 * Functions that operate on pixmaps.
17 * Creates a new pixmap.
18 * @param win Window used to determine which screen of the display the
19 * pixmap should be created on. If 0, the default root window
21 * @param w Width of the new pixmap.
22 * @param h Height of the new pixmap.
23 * @param dep Depth of the pixmap. If 0, the default depth of the default
26 * @ingroup Ecore_X_Pixmap_Group
29 ecore_x_pixmap_new(Ecore_X_Window win,
35 LOGFN(__FILE__, __LINE__, __FUNCTION__);
37 win = DefaultRootWindow(_ecore_x_disp);
40 dep = DefaultDepth(_ecore_x_disp, DefaultScreen(_ecore_x_disp));
42 pm = XCreatePixmap(_ecore_x_disp, win, w, h, dep);
43 if (_ecore_xlib_sync) ecore_x_sync();
48 * Deletes the reference to the given pixmap.
50 * If no other clients have a reference to the given pixmap, the server
53 * @param pmap The given pixmap.
54 * @ingroup Ecore_X_Pixmap_Group
57 ecore_x_pixmap_free(Ecore_X_Pixmap pmap)
59 LOGFN(__FILE__, __LINE__, __FUNCTION__);
61 XFreePixmap(_ecore_x_disp, pmap);
62 if (_ecore_xlib_sync) ecore_x_sync();
66 * Pastes a rectangular area of the given pixmap onto the given drawable.
67 * @param pmap The given pixmap.
68 * @param dest The given drawable.
69 * @param gc The graphics context which governs which operation will
70 * be used to paste the area onto the drawable.
71 * @param sx The X position of the area on the pixmap.
72 * @param sy The Y position of the area on the pixmap.
73 * @param w The width of the area.
74 * @param h The height of the area.
75 * @param dx The X position at which to paste the area on @p dest.
76 * @param dy The Y position at which to paste the area on @p dest.
77 * @ingroup Ecore_X_Pixmap_Group
80 ecore_x_pixmap_paste(Ecore_X_Pixmap pmap,
81 Ecore_X_Drawable dest,
90 LOGFN(__FILE__, __LINE__, __FUNCTION__);
91 XCopyArea(_ecore_x_disp, pmap, dest, gc, sx, sy, w, h, dx, dy);
92 if (_ecore_xlib_sync) ecore_x_sync();
96 * Retrieves the size of the given pixmap.
97 * @param pmap The given pixmap.
98 * @param x Pointer to an integer in which to store the X position.
99 * @param y Pointer to an integer in which to store the Y position.
100 * @param w Pointer to an integer in which to store the width.
101 * @param h Pointer to an integer in which to store the height.
102 * @ingroup Ecore_X_Pixmap_Group
105 ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap,
111 LOGFN(__FILE__, __LINE__, __FUNCTION__);
113 ecore_x_drawable_geometry_get(pmap, x, y, w, h);
114 if (_ecore_xlib_sync) ecore_x_sync();
118 * Retrieves the depth of the given pixmap.
119 * @param pmap The given pixmap.
120 * @return The depth of the pixmap.
121 * @ingroup Ecore_X_Pixmap_Group
124 ecore_x_pixmap_depth_get(Ecore_X_Pixmap pmap)
127 LOGFN(__FILE__, __LINE__, __FUNCTION__);
128 ret = ecore_x_drawable_depth_get(pmap);
129 if (_ecore_xlib_sync) ecore_x_sync();