Xxf86dga.h revision 329fdfe9
1/* 2 Copyright (c) 1999 XFree86 Inc 3*/ 4 5#ifndef _XF86DGA_H_ 6#define _XF86DGA_H_ 7 8#include <X11/Xfuncproto.h> 9#include <X11/extensions/xf86dgaconst.h> 10#include <X11/extensions/xf86dga1.h> 11 12_XFUNCPROTOBEGIN 13 14typedef struct { 15 int type; 16 unsigned long serial; 17 Display *display; 18 int screen; 19 Time time; 20 unsigned int state; 21 unsigned int button; 22} XDGAButtonEvent; 23 24typedef struct { 25 int type; 26 unsigned long serial; 27 Display *display; 28 int screen; 29 Time time; 30 unsigned int state; 31 unsigned int keycode; 32} XDGAKeyEvent; 33 34typedef struct { 35 int type; 36 unsigned long serial; 37 Display *display; 38 int screen; 39 Time time; 40 unsigned int state; 41 int dx; 42 int dy; 43} XDGAMotionEvent; 44 45typedef union { 46 int type; 47 XDGAButtonEvent xbutton; 48 XDGAKeyEvent xkey; 49 XDGAMotionEvent xmotion; 50 long pad[24]; 51} XDGAEvent; 52 53Bool XDGAQueryExtension( 54 Display *dpy, 55 int *eventBase, 56 int *erroBase 57); 58 59Bool XDGAQueryVersion( 60 Display *dpy, 61 int *majorVersion, 62 int *minorVersion 63); 64 65XDGAMode* XDGAQueryModes( 66 Display *dpy, 67 int screen, 68 int *num 69); 70 71XDGADevice* XDGASetMode( 72 Display *dpy, 73 int screen, 74 int mode 75); 76 77Bool XDGAOpenFramebuffer( 78 Display *dpy, 79 int screen 80); 81 82void XDGACloseFramebuffer( 83 Display *dpy, 84 int screen 85); 86 87void XDGASetViewport( 88 Display *dpy, 89 int screen, 90 int x, 91 int y, 92 int flags 93); 94 95void XDGAInstallColormap( 96 Display *dpy, 97 int screen, 98 Colormap cmap 99); 100 101Colormap XDGACreateColormap( 102 Display *dpy, 103 int screen, 104 XDGADevice *device, 105 int alloc 106); 107 108void XDGASelectInput( 109 Display *dpy, 110 int screen, 111 long event_mask 112); 113 114void XDGAFillRectangle( 115 Display *dpy, 116 int screen, 117 int x, 118 int y, 119 unsigned int width, 120 unsigned int height, 121 unsigned long color 122); 123 124 125void XDGACopyArea( 126 Display *dpy, 127 int screen, 128 int srcx, 129 int srcy, 130 unsigned int width, 131 unsigned int height, 132 int dstx, 133 int dsty 134); 135 136 137void XDGACopyTransparentArea( 138 Display *dpy, 139 int screen, 140 int srcx, 141 int srcy, 142 unsigned int width, 143 unsigned int height, 144 int dstx, 145 int dsty, 146 unsigned long key 147); 148 149int XDGAGetViewportStatus( 150 Display *dpy, 151 int screen 152); 153 154void XDGASync( 155 Display *dpy, 156 int screen 157); 158 159Bool XDGASetClientVersion( 160 Display *dpy 161); 162 163void XDGAChangePixmapMode( 164 Display *dpy, 165 int screen, 166 int *x, 167 int *y, 168 int mode 169); 170 171 172void XDGAKeyEventToXKeyEvent(XDGAKeyEvent* dk, XKeyEvent* xk); 173 174 175_XFUNCPROTOEND 176#endif /* _XF86DGA_H_ */ 177