diff options
Diffstat (limited to 'include/pixmapstr.h')
-rw-r--r-- | include/pixmapstr.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/pixmapstr.h b/include/pixmapstr.h index 0800c62b2..40af5c4a3 100644 --- a/include/pixmapstr.h +++ b/include/pixmapstr.h @@ -80,6 +80,28 @@ typedef struct _Pixmap { short screen_y; #endif unsigned usage_hint; /* see CREATE_PIXMAP_USAGE_* */ + + PixmapPtr master_pixmap; /* pointer to master copy of pixmap for pixmap sharing */ } PixmapRec; +static inline void +PixmapBox(BoxPtr box, PixmapPtr pixmap) +{ + box->x1 = 0; + box->x2 = pixmap->drawable.width; + + box->y1 = 0; + box->y2 = pixmap->drawable.height; +} + + +static inline void +PixmapRegionInit(RegionPtr region, PixmapPtr pixmap) +{ + BoxRec box; + + PixmapBox(&box, pixmap); + RegionInit(region, &box, 1); +} + #endif /* PIXMAPSTRUCT_H */ |