2 #include "ecore_x_private.h"
6 * @defgroup Ecore_X_Pixmap_Group X Pixmap Functions
8 * Functions that operate on pixmaps.
12 * Creates a new pixmap.
13 * @param win Window used to determine which screen of the display the
14 * pixmap should be created on. If 0, the default root window
16 * @param w Width of the new pixmap.
17 * @param h Height of the new pixmap.
18 * @param dep Depth of the pixmap. If 0, the default depth of the default
21 * @ingroup Ecore_X_Pixmap_Group
24 ecore_x_pixmap_new(Ecore_X_Window win, int w, int h, int dep)
26 if (win == 0) win = DefaultRootWindow(_ecore_x_disp);
27 if (dep == 0) dep = DefaultDepth(_ecore_x_disp, DefaultScreen(_ecore_x_disp));
28 return XCreatePixmap(_ecore_x_disp, win, w, h, dep);
32 * Deletes the reference to the given pixmap.
34 * If no other clients have a reference to the given pixmap, the server
37 * @param pmap The given pixmap.
38 * @ingroup Ecore_X_Pixmap_Group
41 ecore_x_pixmap_del(Ecore_X_Pixmap pmap)
43 XFreePixmap(_ecore_x_disp, pmap);
47 * Pastes a rectangular area of the given pixmap onto the given drawable.
48 * @param pmap The given pixmap.
49 * @param dest The given drawable.
50 * @param gc The graphics context which governs which operation will
51 * be used to paste the area onto the drawable.
52 * @param sx The X position of the area on the pixmap.
53 * @param sy The Y position of the area on the pixmap.
54 * @param w The width of the area.
55 * @param h The height of the area.
56 * @param dx The X position at which to paste the area on @p dest.
57 * @param dy The Y position at which to paste the area on @p dest.
58 * @ingroup Ecore_X_Pixmap_Group
61 ecore_x_pixmap_paste(Ecore_X_Pixmap pmap, Ecore_X_Drawable dest,
62 Ecore_X_GC gc, int sx, int sy,
63 int w, int h, int dx, int dy)
65 XCopyArea(_ecore_x_disp, pmap, dest, gc, sx, sy, w, h, dx, dy);
69 * Retrieves the size of the given pixmap.
70 * @param pmap The given pixmap.
71 * @param x Pointer to an integer in which to store the X position.
72 * @param y Pointer to an integer in which to store the Y position.
73 * @param w Pointer to an integer in which to store the width.
74 * @param h Pointer to an integer in which to store the height.
75 * @ingroup Ecore_X_Pixmap_Group
78 ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap, int *x, int *y, int *w, int *h)
81 ecore_x_drawable_geometry_get(pmap, x, y, w, h);
85 * Retrieves the depth of the given pixmap.
86 * @param pmap The given pixmap.
87 * @return The depth of the pixmap.
88 * @ingroup Ecore_X_Pixmap_Group
91 ecore_x_pixmap_depth_get(Ecore_X_Pixmap pmap)
93 return ecore_x_drawable_depth_get(pmap);