1 #include "ecore_xcb_private.h"
4 * @defgroup Ecore_X_Pixmap_Group X Pixmap Functions
6 * Functions that operate on pixmaps.
10 * Creates a new pixmap.
11 * @param win Window used to determine which screen of the display the
12 * pixmap should be created on. If 0, the default root window
14 * @param w Width of the new pixmap.
15 * @param h Height of the new pixmap.
16 * @param dep Depth of the pixmap. If 0, the default depth of the default
19 * @ingroup Ecore_X_Pixmap_Group
22 ecore_x_pixmap_new(Ecore_X_Window win, int w, int h, int dep)
26 LOGFN(__FILE__, __LINE__, __FUNCTION__);
28 if (win == 0) win = ((xcb_screen_t *)_ecore_xcb_screen)->root;
29 if (dep == 0) dep = ((xcb_screen_t *)_ecore_xcb_screen)->root_depth;
31 pmap = xcb_generate_id(_ecore_xcb_conn);
32 xcb_create_pixmap(_ecore_xcb_conn, dep, pmap, win, w, h);
39 * Deletes the reference to the given pixmap.
41 * If no other clients have a reference to the given pixmap, the server
44 * @param pmap The given pixmap.
45 * @ingroup Ecore_X_Pixmap_Group
48 ecore_x_pixmap_free(Ecore_X_Pixmap pmap)
50 LOGFN(__FILE__, __LINE__, __FUNCTION__);
52 xcb_free_pixmap(_ecore_xcb_conn, 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, Ecore_X_GC gc, int sx, int sy, int w, int h, int dx, int dy)
73 LOGFN(__FILE__, __LINE__, __FUNCTION__);
75 xcb_copy_area(_ecore_xcb_conn, pmap, dest, gc, sx, sy, dx, dy, w, h);
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__);
94 ecore_x_drawable_geometry_get(pmap, x, y, w, h);
98 * Retrieves the depth of the given pixmap.
99 * @param pmap The given pixmap.
100 * @return The depth of the pixmap.
101 * @ingroup Ecore_X_Pixmap_Group
104 ecore_x_pixmap_depth_get(Ecore_X_Pixmap pmap)
106 LOGFN(__FILE__, __LINE__, __FUNCTION__);
108 return ecore_x_drawable_depth_get(pmap);