3 #endif /* ifdef HAVE_CONFIG_H */
6 #include "ecore_x_private.h"
10 * @defgroup Ecore_X_Pixmap_Group X Pixmap Functions
12 * Functions that operate on pixmaps.
16 * Creates a new pixmap.
17 * @param win Window used to determine which screen of the display the
18 * pixmap should be created on. If 0, the default root window
20 * @param w Width of the new pixmap.
21 * @param h Height of the new pixmap.
22 * @param dep Depth of the pixmap. If 0, the default depth of the default
25 * @ingroup Ecore_X_Pixmap_Group
28 ecore_x_pixmap_new(Ecore_X_Window win,
33 LOGFN(__FILE__, __LINE__, __FUNCTION__);
35 win = DefaultRootWindow(_ecore_x_disp);
38 dep = DefaultDepth(_ecore_x_disp, DefaultScreen(_ecore_x_disp));
40 return XCreatePixmap(_ecore_x_disp, win, w, h, dep);
44 * Deletes the reference to the given pixmap.
46 * If no other clients have a reference to the given pixmap, the server
49 * @param pmap The given pixmap.
50 * @ingroup Ecore_X_Pixmap_Group
53 ecore_x_pixmap_free(Ecore_X_Pixmap pmap)
55 LOGFN(__FILE__, __LINE__, __FUNCTION__);
56 XFreePixmap(_ecore_x_disp, pmap);
60 * Pastes a rectangular area of the given pixmap onto the given drawable.
61 * @param pmap The given pixmap.
62 * @param dest The given drawable.
63 * @param gc The graphics context which governs which operation will
64 * be used to paste the area onto the drawable.
65 * @param sx The X position of the area on the pixmap.
66 * @param sy The Y position of the area on the pixmap.
67 * @param w The width of the area.
68 * @param h The height of the area.
69 * @param dx The X position at which to paste the area on @p dest.
70 * @param dy The Y position at which to paste the area on @p dest.
71 * @ingroup Ecore_X_Pixmap_Group
74 ecore_x_pixmap_paste(Ecore_X_Pixmap pmap,
75 Ecore_X_Drawable dest,
84 LOGFN(__FILE__, __LINE__, __FUNCTION__);
85 XCopyArea(_ecore_x_disp, pmap, dest, gc, sx, sy, w, h, dx, dy);
89 * Retrieves the size of the given pixmap.
90 * @param pmap The given pixmap.
91 * @param x Pointer to an integer in which to store the X position.
92 * @param y Pointer to an integer in which to store the Y position.
93 * @param w Pointer to an integer in which to store the width.
94 * @param h Pointer to an integer in which to store the height.
95 * @ingroup Ecore_X_Pixmap_Group
98 ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap,
104 LOGFN(__FILE__, __LINE__, __FUNCTION__);
106 ecore_x_drawable_geometry_get(pmap, x, y, w, h);
110 * Retrieves the depth of the given pixmap.
111 * @param pmap The given pixmap.
112 * @return The depth of the pixmap.
113 * @ingroup Ecore_X_Pixmap_Group
116 ecore_x_pixmap_depth_get(Ecore_X_Pixmap pmap)
118 LOGFN(__FILE__, __LINE__, __FUNCTION__);
119 return ecore_x_drawable_depth_get(pmap);