summaryrefslogtreecommitdiff
path: root/hw/xscreen/xs-globals.c
blob: 2ae894ccb72b4979a30814a03bd55e80f4cb9575 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <X11/Xmd.h>
#include <X11/XCB/xcb.h>
#include "screenint.h"
#include "scrnintstr.h"

#include "xs-globals.h"
#include "xs-gc.h"
#include "xs-window.h"

XCBConnection *xsConnection;
XCBDRAWABLE    xsDefaultDrawables[MAXDEPTH];
XCBDRAWABLE    xsBackingRoot;
int            xsFontPrivateIndex;
int            xsGCPrivateIndex;
int            xsWindowPrivateIndex;

void xsAllocPrivateIndecies(ScreenPtr pScreen)
{
    xsFontPrivateIndex   = AllocateFontPrivateIndex();
    xsGCPrivateIndex     = AllocateGCPrivateIndex();
    xsWindowPrivateIndex = AllocateWindowPrivateIndex();
    AllocateWindowPrivate(pScreen, xsWindowPrivateIndex, sizeof(XscreenPrivWindow));
    AllocateGCPrivate(pScreen, xsGCPrivateIndex, sizeof(XscreenPrivGC));
}