diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | include/X11/extensions/xf86dga.h | 176 | ||||
-rw-r--r-- | include/X11/extensions/xf86dga1.h | 115 | ||||
-rw-r--r-- | src/Makefile.am | 8 | ||||
-rw-r--r-- | src/XF86DGA.c | 2 | ||||
-rw-r--r-- | src/XF86DGA2.c | 2 |
6 files changed, 301 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index c72affe..1d2062f 100644 --- a/configure.ac +++ b/configure.ac @@ -15,7 +15,7 @@ AC_PROG_LIBTOOL XORG_CWARNFLAGS # Checks for pkg-config packages -PKG_CHECK_MODULES(XXF86DGA, xproto x11 xextproto xext [xf86dgaproto >= 2.0.3]) +PKG_CHECK_MODULES(XXF86DGA, xproto x11 xextproto xext [xf86dgaproto >= 2.0.99.1]) XXF86DGA_CFLAGS="$CWARNFLAGS $XXF86DGA_CFLAGS" XORG_CHECK_MALLOC_ZERO diff --git a/include/X11/extensions/xf86dga.h b/include/X11/extensions/xf86dga.h new file mode 100644 index 0000000..3b14ff3 --- /dev/null +++ b/include/X11/extensions/xf86dga.h @@ -0,0 +1,176 @@ +/* + Copyright (c) 1999 XFree86 Inc +*/ + +#ifndef _XF86DGA_H_ +#define _XF86DGA_H_ + +#include <X11/Xfuncproto.h> +#include <X11/extensions/xf86dgaconst.h> +#include <X11/extensions/xf86dga1.h> + +_XFUNCPROTOBEGIN + +typedef struct { + int type; + unsigned long serial; + Display *display; + int screen; + Time time; + unsigned int state; + unsigned int button; +} XDGAButtonEvent; + +typedef struct { + int type; + unsigned long serial; + Display *display; + int screen; + Time time; + unsigned int state; + unsigned int keycode; +} XDGAKeyEvent; + +typedef struct { + int type; + unsigned long serial; + Display *display; + int screen; + Time time; + unsigned int state; + int dx; + int dy; +} XDGAMotionEvent; + +typedef union { + int type; + XDGAButtonEvent xbutton; + XDGAKeyEvent xkey; + XDGAMotionEvent xmotion; + long pad[24]; +} XDGAEvent; + +Bool XDGAQueryExtension( + Display *dpy, + int *eventBase, + int *erroBase +); + +Bool XDGAQueryVersion( + Display *dpy, + int *majorVersion, + int *minorVersion +); + +XDGAMode* XDGAQueryModes( + Display *dpy, + int screen, + int *num +); + +XDGADevice* XDGASetMode( + Display *dpy, + int screen, + int mode +); + +Bool XDGAOpenFramebuffer( + Display *dpy, + int screen +); + +void XDGACloseFramebuffer( + Display *dpy, + int screen +); + +void XDGASetViewport( + Display *dpy, + int screen, + int x, + int y, + int flags +); + +void XDGAInstallColormap( + Display *dpy, + int screen, + Colormap cmap +); + +Colormap XDGACreateColormap( + Display *dpy, + int screen, + XDGADevice *device, + int alloc +); + +void XDGASelectInput( + Display *dpy, + int screen, + long event_mask +); + +void XDGAFillRectangle( + Display *dpy, + int screen, + int x, + int y, + unsigned int width, + unsigned int height, + unsigned long color +); + + +void XDGACopyArea( + Display *dpy, + int screen, + int srcx, + int srcy, + unsigned int width, + unsigned int height, + int dstx, + int dsty +); + + +void XDGACopyTransparentArea( + Display *dpy, + int screen, + int srcx, + int srcy, + unsigned int width, + unsigned int height, + int dstx, + int dsty, + unsigned long key +); + +int XDGAGetViewportStatus( + Display *dpy, + int screen +); + +void XDGASync( + Display *dpy, + int screen +); + +Bool XDGASetClientVersion( + Display *dpy +); + +void XDGAChangePixmapMode( + Display *dpy, + int screen, + int *x, + int *y, + int mode +); + + +void XDGAKeyEventToXKeyEvent(XDGAKeyEvent* dk, XKeyEvent* xk); + + +_XFUNCPROTOEND +#endif /* _XF86DGA_H_ */ diff --git a/include/X11/extensions/xf86dga1.h b/include/X11/extensions/xf86dga1.h new file mode 100644 index 0000000..0fc97aa --- /dev/null +++ b/include/X11/extensions/xf86dga1.h @@ -0,0 +1,115 @@ +/* + +Copyright (c) 1995 Jon Tombs +Copyright (c) 1995 XFree86 Inc + +*/ + +/************************************************************************ + + THIS IS THE OLD DGA API AND IS OBSOLETE. PLEASE DO NOT USE IT ANYMORE + +************************************************************************/ + +#ifndef _XF86DGA1_H_ +#define _XF86DGA1_H_ + +#include <X11/Xfuncproto.h> +#include <X11/extensions/xf86dga1const.h> + +_XFUNCPROTOBEGIN + +Bool XF86DGAQueryVersion( + Display* /* dpy */, + int* /* majorVersion */, + int* /* minorVersion */ +); + +Bool XF86DGAQueryExtension( + Display* /* dpy */, + int* /* event_base */, + int* /* error_base */ +); + +Status XF86DGAGetVideoLL( + Display* /* dpy */, + int /* screen */, + unsigned int * /* base addr */, + int * /* width */, + int * /* bank_size */, + int * /* ram_size */ +); + +Status XF86DGAGetVideo( + Display* /* dpy */, + int /* screen */, + char ** /* base addr */, + int * /* width */, + int * /* bank_size */, + int * /* ram_size */ +); + +Status XF86DGADirectVideo( + Display* /* dpy */, + int /* screen */, + int /* enable */ +); + +Status XF86DGADirectVideoLL( + Display* /* dpy */, + int /* screen */, + int /* enable */ +); + +Status XF86DGAGetViewPortSize( + Display* /* dpy */, + int /* screen */, + int * /* width */, + int * /* height */ +); + +Status XF86DGASetViewPort( + Display* /* dpy */, + int /* screen */, + int x /* X */, + int y /* Y */ +); + +Status XF86DGAGetVidPage( + Display* /* dpy */, + int /* screen */, + int * /* vid page */ +); + +Status XF86DGASetVidPage( + Display* /* dpy */, + int /* screen */, + int /* vid page */ +); + +Status XF86DGAInstallColormap( + Display* /* dpy */, + int /* screen */, + Colormap /*Colormap */ +); + +int XF86DGAForkApp( + int screen +); + +Status XF86DGAQueryDirectVideo( + Display * /* dpy */, + int /* screen */, + int * /* flags */ +); + +Bool XF86DGAViewPortChanged( + Display * /* dpy */, + int /* screen */, + int /* n */ +); + + +_XFUNCPROTOEND + +#endif /* _XF86DGA1_H_ */ diff --git a/src/Makefile.am b/src/Makefile.am index dc22283..dd159ef 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,6 +2,12 @@ lib_LTLIBRARIES = libXxf86dga.la libXxf86dga_la_SOURCES = XF86DGA.c XF86DGA2.c -AM_CFLAGS = $(XXF86DGA_CFLAGS) $(MALLOC_ZERO_CFLAGS) +AM_CFLAGS = -I $(top_srcdir)/include \ + $(XXF86DGA_CFLAGS) $(MALLOC_ZERO_CFLAGS) + libXxf86dga_la_LIBADD = $(XXF86DGA_LIBS) libXxf86dga_la_LDFLAGS = -version-number 1:0:0 + +libXxf86dgaincludedir = $(includedir)/X11/extensions +libXxf86dgainclude_HEADERS = $(top_srcdir)/include/X11/extensions/xf86dga.h \ + $(top_srcdir)/include/X11/extensions/xf86dga1.h diff --git a/src/XF86DGA.c b/src/XF86DGA.c index 573a53f..4fedd12 100644 --- a/src/XF86DGA.c +++ b/src/XF86DGA.c @@ -63,7 +63,7 @@ Copyright (c) 1995,1996 The XFree86 Project, Inc #define NEED_REPLIES #include <X11/Xlibint.h> #include <X11/extensions/xf86dga.h> -#include <X11/extensions/xf86dgastr.h> +#include <X11/extensions/xf86dgaproto.h> #include <X11/extensions/Xext.h> #include <X11/extensions/extutil.h> diff --git a/src/XF86DGA2.c b/src/XF86DGA2.c index 533901f..5eb5aad 100644 --- a/src/XF86DGA2.c +++ b/src/XF86DGA2.c @@ -19,7 +19,7 @@ Copyright (c) 1995,1996 The XFree86 Project, Inc #define NEED_REPLIES #include <X11/Xlibint.h> #include <X11/extensions/xf86dga.h> -#include <X11/extensions/xf86dgastr.h> +#include <X11/extensions/xf86dgaproto.h> #include <X11/extensions/Xext.h> #include <X11/extensions/extutil.h> #include <stdio.h> |