summaryrefslogtreecommitdiff
path: root/hw/xscreen/xs-globals.h
blob: f30e2480ea51310f3f296907422854b3a35f75b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef _XS_GLOBALS_INCL_
#define _XS_GLOBALS_INCL_

#define MAXDEPTH 32

typedef enum {
    XS_OWNED,
    XS_UNOWNED,
} XSOwnership;

#define XS_DRAWABLE_ID(/*DrawablePtr*/ d) \
    (((d)->type == DRAWABLE_WINDOW)? \
     ((xcb_drawable_t) (XS_WINDOW_PRIV((WindowPtr)(d))->window)) : \
     ((xcb_drawable_t) (XS_PIXMAP_PRIV((PixmapPtr)(d))->pixmap)))

extern xcb_connection_t *xsConnection;
extern xcb_drawable_t    xsDefaultDrawables[MAXDEPTH];
extern xcb_drawable_t    xsBackingRoot;
extern int            xsFontPrivateIndex;
extern int            xsGCPrivateIndex;
extern int            xsWindowPrivateIndex;
void xsAllocPrivateIndecies(ScreenPtr pScreen);
#endif