2 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
10 #include "ecore_x_private.h"
14 * @defgroup Ecore_X_Pixmap_Group X Pixmap Functions
16 * Functions that operate on pixmaps.
20 * Creates a new pixmap.
21 * @param win Window used to determine which screen of the display the
22 * pixmap should be created on. If 0, the default root window
24 * @param w Width of the new pixmap.
25 * @param h Height of the new pixmap.
26 * @param dep Depth of the pixmap. If 0, the default depth of the default
29 * @ingroup Ecore_X_Pixmap_Group
32 ecore_x_pixmap_new(Ecore_X_Window win, int w, int h, int dep)
34 LOGFN(__FILE__, __LINE__, __FUNCTION__);
35 if (win == 0) win = DefaultRootWindow(_ecore_x_disp);
36 if (dep == 0) dep = DefaultDepth(_ecore_x_disp, DefaultScreen(_ecore_x_disp));
37 return XCreatePixmap(_ecore_x_disp, win, w, h, dep);
41 * Deletes the reference to the given pixmap.
43 * If no other clients have a reference to the given pixmap, the server
46 * @param pmap The given pixmap.
47 * @ingroup Ecore_X_Pixmap_Group
50 ecore_x_pixmap_free(Ecore_X_Pixmap pmap)
52 LOGFN(__FILE__, __LINE__, __FUNCTION__);
53 XFreePixmap(_ecore_x_disp, pmap);
57 * Pastes a rectangular area of the given pixmap onto the given drawable.
58 * @param pmap The given pixmap.
59 * @param dest The given drawable.
60 * @param gc The graphics context which governs which operation will
61 * be used to paste the area onto the drawable.
62 * @param sx The X position of the area on the pixmap.
63 * @param sy The Y position of the area on the pixmap.
64 * @param w The width of the area.
65 * @param h The height of the area.
66 * @param dx The X position at which to paste the area on @p dest.
67 * @param dy The Y position at which to paste the area on @p dest.
68 * @ingroup Ecore_X_Pixmap_Group
71 ecore_x_pixmap_paste(Ecore_X_Pixmap pmap, Ecore_X_Drawable dest,
72 Ecore_X_GC gc, int sx, int sy,
73 int w, int h, int dx, int dy)
75 LOGFN(__FILE__, __LINE__, __FUNCTION__);
76 XCopyArea(_ecore_x_disp, pmap, dest, gc, sx, sy, w, h, dx, dy);
80 * Retrieves the size of the given pixmap.
81 * @param pmap The given pixmap.
82 * @param x Pointer to an integer in which to store the X position.
83 * @param y Pointer to an integer in which to store the Y position.
84 * @param w Pointer to an integer in which to store the width.
85 * @param h Pointer to an integer in which to store the height.
86 * @ingroup Ecore_X_Pixmap_Group
89 ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap, int *x, int *y, int *w, int *h)
91 LOGFN(__FILE__, __LINE__, __FUNCTION__);
92 if (pmap) ecore_x_drawable_geometry_get(pmap, x, y, w, h);
96 * Retrieves the depth of the given pixmap.
97 * @param pmap The given pixmap.
98 * @return The depth of the pixmap.
99 * @ingroup Ecore_X_Pixmap_Group
102 ecore_x_pixmap_depth_get(Ecore_X_Pixmap pmap)
104 LOGFN(__FILE__, __LINE__, __FUNCTION__);
105 return ecore_x_drawable_depth_get(pmap);