From f737cd925efe452787443b039ae65b8d85081bb3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 15 Nov 2006 17:50:02 +1030 Subject: [PATCH 001/634] o fix minor error in comment for GetPointerEvents() --- dix/getevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/getevents.c b/dix/getevents.c index c1b8840f9..a888df6e3 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -473,7 +473,7 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type, /** - * Generate a series of xEvents (returned in xE) representing pointer + * Generate a series of xEvents (returned in events) representing pointer * motion, or button presses. Xi and XKB-aware. * * events is not NULL-terminated; the return value is the number of events. From bffb1f9b67c8d3d264c0c3fd703cf7e57dcdf7b7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 15 Nov 2006 17:53:13 +1030 Subject: [PATCH 002/634] removed unused variables drag and local from xf86PostMotionEvent --- hw/xfree86/common/xf86Xinput.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index be3368dff..50df56633 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -434,8 +434,6 @@ xf86PostMotionEvent(DeviceIntPtr device, { va_list var; int i = 0, nevents = 0; - Bool drag = xf86SendDragEvents(device); - LocalDevicePtr local = (LocalDevicePtr) device->public.devicePrivate; int *valuators = NULL; int flags = 0; From 4d07b503727ba86315b90d6f45b06ed6185724b2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 16 Nov 2006 10:55:15 +1030 Subject: [PATCH 003/634] dix: cleaned up GetPointerEvents() to avoid code duplication. --- dix/getevents.c | 51 ++++++++++++++++++------------------------------- 1 file changed, 19 insertions(+), 32 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index a888df6e3..2077ce2a7 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -488,7 +488,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, CARD32 ms = 0; deviceKeyButtonPointer *kbp = NULL; Bool sendValuators = (type == MotionNotify || flags & POINTER_ABSOLUTE); - DeviceIntPtr cp = inputInfo.pointer; + DeviceIntPtr pointer = NULL; int x = 0, y = 0; /* Sanity checks. */ @@ -525,6 +525,11 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, kbp->time = ms; kbp->deviceid = pDev->id; + if (pDev->coreEvents) + pointer = inputInfo.pointer; + else + pointer = pDev; + /* Set x and y based on whether this is absolute or relative, and * accelerate if we need to. */ if (flags & POINTER_ABSOLUTE) { @@ -532,20 +537,14 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, x = valuators[0]; } else { - if (pDev->coreEvents) - x = cp->valuator->lastx; - else - x = pDev->valuator->lastx; + x = pointer->valuator->lastx; } if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) { y = valuators[1 - first_valuator]; } else { - if (pDev->coreEvents) - x = cp->valuator->lasty; - else - y = pDev->valuator->lasty; + y = pointer->valuator->lasty; } } else { @@ -553,28 +552,15 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, acceleratePointer(pDev, first_valuator, num_valuators, valuators); - if (pDev->coreEvents) { - if (first_valuator == 0 && num_valuators >= 1) - x = cp->valuator->lastx + valuators[0]; - else - x = cp->valuator->lastx; + if (first_valuator == 0 && num_valuators >= 1) + x = pointer->valuator->lastx + valuators[0]; + else + x = pointer->valuator->lastx; - if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) - y = cp->valuator->lasty + valuators[1 - first_valuator]; - else - y = cp->valuator->lasty; - } - else { - if (first_valuator == 0 && num_valuators >= 1) - x = pDev->valuator->lastx + valuators[0]; - else - x = pDev->valuator->lastx; - - if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) - y = pDev->valuator->lasty + valuators[1 - first_valuator]; - else - y = pDev->valuator->lasty; - } + if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) + y = pointer->valuator->lasty + valuators[1 - first_valuator]; + else + y = pointer->valuator->lasty; } /* Clip both x and y to the defined limits (usually co-ord space limit). */ @@ -596,8 +582,9 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); if (pDev->coreEvents) { - cp->valuator->lastx = x; - cp->valuator->lasty = y; + /* set the virtual core pointer's coordinates */ + pointer->valuator->lastx = x; + pointer->valuator->lasty = y; } pDev->valuator->lastx = x; pDev->valuator->lasty = y; From 7ce2dc57844872cc340b60387d4d1cb3d982633e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 16 Nov 2006 12:51:08 +1030 Subject: [PATCH 004/634] dix: merge with code cleanup from master GetPointerEvents treats events in the same way as XINPUT devices when flag has POINTER_MULTIPOINTER set. xfree86/common: added XI86_MP_DEVICE flag and parsing in xf86ProcessCommonOptions added POINTER_MULTIPOINTER define. Is used in xf86PostMotionEvent and xf86PostButtonEvent for the flags that are passed into GetPointerEvents() global: added flags to configure.ac to enable/disable MPX define added flags to dix-config.h.in to define MPX --- Changelog | 25 +++++++++++++++++++++ configure.ac | 9 ++++++++ dix/getevents.c | 25 +++++++++++++++++++++ hw/xfree86/common/xf86Xinput.c | 40 ++++++++++++++++++++++++++++++++-- hw/xfree86/common/xf86Xinput.h | 4 ++++ include/dix-config.h.in | 3 +++ include/input.h | 3 +++ 7 files changed, 107 insertions(+), 2 deletions(-) create mode 100644 Changelog diff --git a/Changelog b/Changelog new file mode 100644 index 000000000..d8f930037 --- /dev/null +++ b/Changelog @@ -0,0 +1,25 @@ +MPX Changelog file + +== 16.11.06 == +dix: + merge with code cleanup from master + GetPointerEvents treats events in the same way as XINPUT devices when flag + has POINTER_MULTIPOINTER set. + +xfree86/common: + added XI86_MP_DEVICE flag and parsing in xf86ProcessCommonOptions + added POINTER_MULTIPOINTER define. Is used in xf86PostMotionEvent and + xf86PostButtonEvent for the flags that are passed into GetPointerEvents() + +global: + added flags to configure.ac to enable/disable MPX define + added flags to dix-config.h.in to #define MPX + +Files: + dix/getevents.c + hw/xfree86/common/xf86Xinput.c + hw/xfree86/common/xf86Xinput.h + include/input.h + configure.ac + include/dix-config.h.in + diff --git a/configure.ac b/configure.ac index 2108db4d3..706df9137 100644 --- a/configure.ac +++ b/configure.ac @@ -421,6 +421,7 @@ AC_ARG_ENABLE(builtin-fonts, AS_HELP_STRING([--enable-builtin-fonts], [Use only AC_ARG_ENABLE(null-root-cursor, AS_HELP_STRING([--enable-null-root-cursor], [Use an empty root cursor (default: use core cursor)]), [NULL_ROOT_CURSOR=$enableval], [NULL_ROOT_CURSOR=no]) +AC_ARG_ENABLE(mpx, AS_HELP_STRING([--disable-mpx], [Disable MPX multipointer support (Default: enabled)]), [MPX=$enableval], [MPX=yes]) dnl Extensions. AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=yes]) @@ -783,6 +784,14 @@ AC_DEFINE(XINPUT, 1, [Support X Input extension]) XI_LIB='$(top_builddir)/Xi/libXi.la' XI_INC='-I$(top_srcdir)/Xi' +dnl Enable MPX multipointer extension +AC_MSG_CHECKING([whether to use MPX extension]) +AC_MSG_RESULT([$MPX]) +AM_CONDITIONAL(MPX, [test "x$MPX" = xyes]) + +if test "x$MPX" = xyes; then + AC_DEFINE(MPX, 1, [Support MPX multipointer extension]) +fi AM_CONDITIONAL(XF86UTILS, test "x$XF86UTILS" = xyes) AC_DEFINE(SHAPE, 1, [Support SHAPE extension]) diff --git a/dix/getevents.c b/dix/getevents.c index 2077ce2a7..eb3c2a58c 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -21,6 +21,15 @@ * * Author: Daniel Stone */ +#ifdef MPX + /* + * MPX additions: + * Copyright © 2006 Peter Hutterer + * License see above. + * Author: Peter Hutterer + * + */ +#endif #ifdef HAVE_DIX_CONFIG_H #include @@ -480,6 +489,11 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type, * The DDX is responsible for allocating the event structure in the first * place via GetMaximumEventsNum(), and for freeing it. */ +#ifdef MPX + /* In MPX, flags can be set to POINTER_MULTIPOINTER to indicate that the + * device is a multipointer device. MP devices always send core events. + */ +#endif _X_EXPORT int GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, int flags, int first_valuator, int num_valuators, @@ -525,6 +539,11 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, kbp->time = ms; kbp->deviceid = pDev->id; +#ifdef MPX + if (flags & POINTER_MULTIPOINTER) + pointer = pDev; + else +#endif if (pDev->coreEvents) pointer = inputInfo.pointer; else @@ -581,6 +600,12 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); +#ifdef MPX + if (flags & POINTER_MULTIPOINTER) + { + // noop, just to fit MPX in easier with the following if + } else +#endif if (pDev->coreEvents) { /* set the virtual core pointer's coordinates */ pointer->valuator->lastx = x; diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 50df56633..0dc392a5c 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -47,6 +47,17 @@ */ /* $XConsortium: xf86Xinput.c /main/14 1996/10/27 11:05:25 kaleb $ */ +#ifdef MPX + /* + * MPX additions: + * Copyright © 2006 Peter Hutterer + * License see above. + * Author: Peter Hutterer + * + */ +#endif + + #ifdef HAVE_XORG_CONFIG_H #include #endif @@ -133,6 +144,13 @@ xf86ProcessCommonOptions(LocalDevicePtr local, xf86Msg(X_CONFIG, "%s: always reports core events\n", local->name); } +#ifdef MPX + if (xf86SetBoolOption(list, "IsMPDevice", 0)) { + local->flags |= XI86_MP_DEVICE; + xf86Msg(X_CONFIG, "%s: is MP device\n", local->name); + } +#endif + if (xf86SetBoolOption(list, "SendDragEvents", 1)) { local->flags |= XI86_SEND_DRAG_EVENTS; } else { @@ -196,6 +214,9 @@ xf86ActivateDevice(LocalDevicePtr local) xf86XinputFinalizeInit(dev); dev->coreEvents = local->flags & XI86_ALWAYS_CORE; +#ifdef MPX + dev->coreEvents |= local->flags & XI86_MP_DEVICE; +#endif RegisterOtherDevice(dev); if (serverGeneration == 1) @@ -441,6 +462,11 @@ xf86PostMotionEvent(DeviceIntPtr device, flags = POINTER_ABSOLUTE; else flags = POINTER_RELATIVE | POINTER_ACCELERATE; + +#ifdef MPX + if (device->coreEvents & XI86_MP_DEVICE) + flags |= POINTER_MULTIPOINTER; +#endif valuators = xcalloc(sizeof(int), num_valuators); @@ -507,6 +533,17 @@ xf86PostButtonEvent(DeviceIntPtr device, va_list var; int *valuators = NULL; int i = 0, nevents = 0; + int flags = 0; + + if (is_absolute) + flags = POINTER_ABSOLUTE; + else + flags = POINTER_RELATIVE; + +#ifdef MPX + if (device->coreEvents & XI86_MP_DEVICE) + flags |= POINTER_MULTIPOINTER; +#endif valuators = xcalloc(sizeof(int), num_valuators); @@ -522,8 +559,7 @@ xf86PostButtonEvent(DeviceIntPtr device, nevents = GetPointerEvents(xf86Events, device, is_down ? ButtonPress : ButtonRelease, button, - is_absolute ? POINTER_ABSOLUTE : - POINTER_RELATIVE, + flags, first_valuator, num_valuators, valuators); for (i = 0; i < nevents; i++) diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h index fe65643ce..4c752cd32 100644 --- a/hw/xfree86/common/xf86Xinput.h +++ b/hw/xfree86/common/xf86Xinput.h @@ -83,6 +83,10 @@ #define XI86_POINTER_CAPABLE 0x40 /* capable of being a core pointer */ #define XI86_KEYBOARD_CAPABLE 0x80 /* capable of being a core keyboard */ +#ifdef MPX +#define XI86_MP_DEVICE 0x100 /* device is multipointer device */ +#endif + #define XI_PRIVATE(dev) \ (((LocalDevicePtr)((dev)->public.devicePrivate))->private) diff --git a/include/dix-config.h.in b/include/dix-config.h.in index 1120337e8..ed7a3d776 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -347,6 +347,9 @@ /* Support X Input extension */ #undef XINPUT +/* Support MPX multipointer extension */ +#undef MPX + /* Build XKB */ #undef XKB diff --git a/include/input.h b/include/input.h index e7017cb27..c7b2dfeba 100644 --- a/include/input.h +++ b/include/input.h @@ -62,6 +62,9 @@ SOFTWARE. #define POINTER_RELATIVE (1 << 1) #define POINTER_ABSOLUTE (1 << 2) #define POINTER_ACCELERATE (1 << 3) +#ifdef MPX +#define POINTER_MULTIPOINTER (1 << 4) +#endif #define MAP_LENGTH 256 #define DOWN_LENGTH 32 /* 256/8 => number of bytes to hold 256 bits */ From c957a16180810fbd58526e1a670d82384fb4a61d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 16 Nov 2006 15:11:14 +1030 Subject: [PATCH 005/634] dix: added isMPdev field to _DeviceIntRec, is used in GetPointerEvents() mieq: avoid merging events from different devices in mieqEnqueue() xfree86/common isMPdev field used from xf86ActivateDevice(), xf86PostMotionEvent() and xf86PostButtonEvent() --- Changelog | 14 ++++++++++++++ dix/getevents.c | 5 +++++ hw/xfree86/common/xf86Xinput.c | 6 +++--- include/inputstr.h | 3 +++ mi/mieq.c | 6 ++++++ 5 files changed, 31 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index d8f930037..3b5e9add3 100644 --- a/Changelog +++ b/Changelog @@ -23,3 +23,17 @@ Files: configure.ac include/dix-config.h.in + +dix: added isMPdev field to _DeviceIntRec, is used in GetPointerEvents() + +mieq: avoid merging events from different devices in mieqEnqueue() + +xfree86/common + isMPdev field used from xf86ActivateDevice(), xf86PostMotionEvent() + and xf86PostButtonEvent() + +Files: + dix/getevents.c + hw/xfree86/common/xf86Xinput.c + include/inputstr.h + mi/mieq.c diff --git a/dix/getevents.c b/dix/getevents.c index eb3c2a58c..9c7b7230b 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -636,7 +636,12 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, num_valuators, valuators); } +#ifdef MPX + /* MPX devices always send core events */ + if (pDev->coreEvents || pDev->isMPDev) { +#else if (pDev->coreEvents) { +#endif events->u.u.type = type; events->u.keyButtonPointer.time = ms; events->u.keyButtonPointer.rootX = x; diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 0dc392a5c..888ad4235 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -215,7 +215,7 @@ xf86ActivateDevice(LocalDevicePtr local) dev->coreEvents = local->flags & XI86_ALWAYS_CORE; #ifdef MPX - dev->coreEvents |= local->flags & XI86_MP_DEVICE; + dev->isMPDev = local->flags & XI86_MP_DEVICE; #endif RegisterOtherDevice(dev); @@ -464,7 +464,7 @@ xf86PostMotionEvent(DeviceIntPtr device, flags = POINTER_RELATIVE | POINTER_ACCELERATE; #ifdef MPX - if (device->coreEvents & XI86_MP_DEVICE) + if (device->isMPDev) flags |= POINTER_MULTIPOINTER; #endif @@ -541,7 +541,7 @@ xf86PostButtonEvent(DeviceIntPtr device, flags = POINTER_RELATIVE; #ifdef MPX - if (device->coreEvents & XI86_MP_DEVICE) + if (device->isMPDev) flags |= POINTER_MULTIPOINTER; #endif diff --git a/include/inputstr.h b/include/inputstr.h index ada94e6b4..231dffc3e 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -288,6 +288,9 @@ typedef struct _DeviceIntRec { Bool inited; /* TRUE if INIT returns Success */ Bool enabled; /* TRUE if ON returns Success */ Bool coreEvents; /* TRUE if device also sends core */ +#ifdef MPX + Bool isMPDev; /* TRUE if multipointer device */ +#endif GrabPtr grab; /* the grabber - used by DIX */ struct { Bool frozen; diff --git a/mi/mieq.c b/mi/mieq.c index 80915fd73..b901fbcd6 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -101,6 +101,12 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e) deviceKeyButtonPointer *lastkbp = (deviceKeyButtonPointer *) &laste->event[0]; +#ifdef MPX + /* avoid merging events from different devices */ + if (e->u.u.type == MotionNotify && pDev->isMPDev) + isMotion = pDev->id; + else +#endif if (e->u.u.type == MotionNotify) isMotion = inputInfo.pointer->id; else if (e->u.u.type == DeviceMotionNotify) From 5388423eb05daefcc71067b6ab96b6e57c44ef5c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 16 Nov 2006 20:43:27 +1030 Subject: [PATCH 006/634] mieq: EQ processing handles MP devices global: MPX define added to xorg-server.h.in xfree86/common: small fix to avoid byte overflow --- Changelog | 12 ++++++++++++ hw/xfree86/common/xf86Xinput.c | 5 ++++- include/xorg-server.h.in | 3 +++ mi/mieq.c | 26 +++++++++++++++++++++++++- 4 files changed, 44 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 3b5e9add3..87501fb3a 100644 --- a/Changelog +++ b/Changelog @@ -37,3 +37,15 @@ Files: hw/xfree86/common/xf86Xinput.c include/inputstr.h mi/mieq.c + + +mieq: EQ processing handles MP devices + +global: MPX define added to xorg-server.h.in + +xfree86/common: small fix to avoid byte overflow + +Files: + mi/mieq.c + hw/xfree86/common/xf86Xinput.c + include/xserver-config.h.in diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 888ad4235..2cb1441db 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -215,7 +215,10 @@ xf86ActivateDevice(LocalDevicePtr local) dev->coreEvents = local->flags & XI86_ALWAYS_CORE; #ifdef MPX - dev->isMPDev = local->flags & XI86_MP_DEVICE; + if (local->flags & XI86_MP_DEVICE) + dev->isMPDev = TRUE; + else + dev->isMPDev = FALSE; #endif RegisterOtherDevice(dev); diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in index 48196d8b6..c58e2b39a 100644 --- a/include/xorg-server.h.in +++ b/include/xorg-server.h.in @@ -142,6 +142,9 @@ /* Support X Input extension */ #undef XINPUT +/* Support MPX multipointer extension */ +#undef MPX + /* Build XKB */ #undef XKB diff --git a/mi/mieq.c b/mi/mieq.c index b901fbcd6..d19933520 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -24,6 +24,15 @@ in this Software without prior written authorization from The Open Group. * * Author: Keith Packard, MIT X Consortium */ +#ifdef MPX + /* + * MPX additions: + * Copyright © 2006 Peter Hutterer + * License see above. + * Author: Peter Hutterer + * + */ +#endif /* * mieq.c @@ -218,13 +227,28 @@ mieqProcessInputEvents() else if (e->event[0].u.u.type == MotionNotify || e->event[0].u.u.type == ButtonPress || e->event[0].u.u.type == ButtonRelease) { - SwitchCorePointer(e->pDev); +#ifdef MPX + if (!e->pDev->isMPDev) +#endif + SwitchCorePointer(e->pDev); dev = inputInfo.pointer; + } else { dev = e->pDev; } +#ifdef MPX + /* MPX devices send both core and Xi events. Depending on what + * event we have, dev is set to either the core pointer or the + * device. This gives us the right processing function but we need + * to pass the right device in too. + * Any device that is not a MP device is processed as usual. + */ + if (e->pDev->isMPDev) + dev->public.processInputProc(e->event, e->pDev, e->nevents); + else +#endif dev->public.processInputProc(e->event, dev, e->nevents); } } From 94e106a898c44daeb228bcb031b85f996ddc96b0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 17 Nov 2006 15:10:37 +1030 Subject: [PATCH 007/634] dix: moved isMPdev field to end of _DeviceIntRec structure mi: added miMPPointers array to mipointer.c added DeviceIntPtr to all miPointerSpriteFuncs. Coming from miPointer we use inputInfo.pointer as standard value. ABI BREAK! ramdac: forcing failed HW Cursor initialisation. MPX needs software rendering. changes to use new miPointerSpriteFunc (this required externing inputInfo, should probably be fixed at a later point). RAC: changes to use new miPointerSpriteFuncs. --- Changelog | 25 +++++++++++++ hw/xfree86/rac/xf86RAC.c | 30 ++++++++------- hw/xfree86/ramdac/xf86Cursor.c | 61 ++++++++++++++++++++----------- hw/xfree86/ramdac/xf86HWCurs.c | 7 ++++ include/inputstr.h | 6 +-- mi/mipointer.c | 67 +++++++++++++++++++++++++++++----- mi/mipointer.h | 4 ++ mi/misprite.c | 36 +++++++++++++----- 8 files changed, 180 insertions(+), 56 deletions(-) diff --git a/Changelog b/Changelog index 87501fb3a..86bce4d3c 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,30 @@ MPX Changelog file +== 17.11.06 == +dix: moved isMPdev field to end of _DeviceIntRec structure + +mi: + added miMPPointers array to mipointer.c + added DeviceIntPtr to all miPointerSpriteFuncs. Coming from miPointer + we use inputInfo.pointer as standard value. ABI BREAK! + +ramdac: + forcing failed HW Cursor initialisation. MPX needs software rendering. + changes to use new miPointerSpriteFunc (this required externing + inputInfo, should probably be fixed at a later point). + + +RAC: changes to use new miPointerSpriteFuncs. + +Files: + include/inputstr.h + mi/mipointer.c + mi/mipointer.h + mi/misprite.c + hw/xfree86/ramdac/xf86HWCurs.c + hw/xfree86/ramdac/xf86Cursor.c + hw/xfree86/rac/xf86RAC.c + == 16.11.06 == dix: merge with code cleanup from master diff --git a/hw/xfree86/rac/xf86RAC.c b/hw/xfree86/rac/xf86RAC.c index aba86226e..23dab862f 100644 --- a/hw/xfree86/rac/xf86RAC.c +++ b/hw/xfree86/rac/xf86RAC.c @@ -224,11 +224,14 @@ static void RACPolyGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit, static void RACPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDraw, int dx, int dy, int xOrg, int yOrg ); /* miSpriteFuncs */ -static Bool RACSpriteRealizeCursor(ScreenPtr pScreen, CursorPtr pCur); -static Bool RACSpriteUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCur); -static void RACSpriteSetCursor(ScreenPtr pScreen, CursorPtr pCur, - int x, int y); -static void RACSpriteMoveCursor(ScreenPtr pScreen, int x, int y); +static Bool RACSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCur); +static Bool RACSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCur); +static void RACSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCur, int x, int y); +static void RACSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + int x, int y); #ifdef RENDER static void RACComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, @@ -1158,46 +1161,47 @@ RACPushPixels( /* miSpriteFuncs */ static Bool -RACSpriteRealizeCursor(ScreenPtr pScreen, CursorPtr pCur) +RACSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur) { Bool val; SPRITE_PROLOG; DPRINT_S("RACSpriteRealizeCursor",pScreen->myNum); ENABLE; - val = PointPriv->spriteFuncs->RealizeCursor(pScreen, pCur); + val = PointPriv->spriteFuncs->RealizeCursor(pDev, pScreen, pCur); SPRITE_EPILOG; return val; } static Bool -RACSpriteUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCur) +RACSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur) { Bool val; SPRITE_PROLOG; DPRINT_S("RACSpriteUnrealizeCursor",pScreen->myNum); ENABLE; - val = PointPriv->spriteFuncs->UnrealizeCursor(pScreen, pCur); + val = PointPriv->spriteFuncs->UnrealizeCursor(pDev, pScreen, pCur); SPRITE_EPILOG; return val; } static void -RACSpriteSetCursor(ScreenPtr pScreen, CursorPtr pCur, int x, int y) +RACSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCur, int x, int y) { SPRITE_PROLOG; DPRINT_S("RACSpriteSetCursor",pScreen->myNum); ENABLE; - PointPriv->spriteFuncs->SetCursor(pScreen, pCur, x, y); + PointPriv->spriteFuncs->SetCursor(pDev, pScreen, pCur, x, y); SPRITE_EPILOG; } static void -RACSpriteMoveCursor(ScreenPtr pScreen, int x, int y) +RACSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { SPRITE_PROLOG; DPRINT_S("RACSpriteMoveCursor",pScreen->myNum); ENABLE; - PointPriv->spriteFuncs->MoveCursor(pScreen, x, y); + PointPriv->spriteFuncs->MoveCursor(pDev, pScreen, x, y); SPRITE_EPILOG; } diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c index a903f7f02..ec813e068 100644 --- a/hw/xfree86/ramdac/xf86Cursor.c +++ b/hw/xfree86/ramdac/xf86Cursor.c @@ -8,15 +8,25 @@ #include "colormapst.h" #include "cursorstr.h" +/* FIXME: This was added with the ABI change of the miPointerSpriteFuncs for + * MPX. + * inputInfo is needed to pass the core pointer as the default argument into + * the cursor functions. + * + * Externing inputInfo is not the nice way to do it but it works. + */ +#include "inputstr.h" +extern InputInfo inputInfo; + int xf86CursorScreenIndex = -1; static unsigned long xf86CursorGeneration = 0; /* sprite functions */ -static Bool xf86CursorRealizeCursor(ScreenPtr, CursorPtr); -static Bool xf86CursorUnrealizeCursor(ScreenPtr, CursorPtr); -static void xf86CursorSetCursor(ScreenPtr, CursorPtr, int, int); -static void xf86CursorMoveCursor(ScreenPtr, int, int); +static Bool xf86CursorRealizeCursor(DeviceIntPtr, ScreenPtr, CursorPtr); +static Bool xf86CursorUnrealizeCursor(DeviceIntPtr, ScreenPtr, CursorPtr); +static void xf86CursorSetCursor(DeviceIntPtr, ScreenPtr, CursorPtr, int, int); +static void xf86CursorMoveCursor(DeviceIntPtr, ScreenPtr, int, int); static miPointerSpriteFuncRec xf86CursorSpriteFuncs = { xf86CursorRealizeCursor, @@ -194,14 +204,17 @@ xf86CursorEnableDisableFBAccess( int index, Bool enable) { + DeviceIntPtr pDev = inputInfo.pointer; + ScreenPtr pScreen = screenInfo.screens[index]; xf86CursorScreenPtr ScreenPriv = pScreen->devPrivates[xf86CursorScreenIndex].ptr; if (!enable && ScreenPriv->CurrentCursor != NullCursor) { ScreenPriv->SavedCursor = ScreenPriv->CurrentCursor; - xf86CursorSetCursor(pScreen, NullCursor, ScreenPriv->x, ScreenPriv->y); - ScreenPriv->isUp = FALSE; + xf86CursorSetCursor(pDev, pScreen, NullCursor, ScreenPriv->x, + ScreenPriv->y); + ScreenPriv->isUp = FALSE; ScreenPriv->SWCursor = TRUE; } @@ -214,7 +227,7 @@ xf86CursorEnableDisableFBAccess( * Re-set current cursor so drivers can react to FB access having been * temporarily disabled. */ - xf86CursorSetCursor(pScreen, ScreenPriv->SavedCursor, + xf86CursorSetCursor(pDev, pScreen, ScreenPriv->SavedCursor, ScreenPriv->x, ScreenPriv->y); ScreenPriv->SavedCursor = NULL; } @@ -251,7 +264,7 @@ xf86CursorSwitchMode(int index, DisplayModePtr mode, int flags) /****** miPointerSpriteFunctions *******/ static Bool -xf86CursorRealizeCursor(ScreenPtr pScreen, CursorPtr pCurs) +xf86CursorRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs) { xf86CursorScreenPtr ScreenPriv = pScreen->devPrivates[xf86CursorScreenIndex].ptr; @@ -259,11 +272,12 @@ xf86CursorRealizeCursor(ScreenPtr pScreen, CursorPtr pCurs) if (pCurs->refcnt <= 1) pCurs->devPriv[pScreen->myNum] = NULL; - return (*ScreenPriv->spriteFuncs->RealizeCursor)(pScreen, pCurs); + return (*ScreenPriv->spriteFuncs->RealizeCursor)(pDev, pScreen, pCurs); } static Bool -xf86CursorUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCurs) +xf86CursorUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCurs) { xf86CursorScreenPtr ScreenPriv = pScreen->devPrivates[xf86CursorScreenIndex].ptr; @@ -273,11 +287,12 @@ xf86CursorUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCurs) pCurs->devPriv[pScreen->myNum] = NULL; } - return (*ScreenPriv->spriteFuncs->UnrealizeCursor)(pScreen, pCurs); + return (*ScreenPriv->spriteFuncs->UnrealizeCursor)(pDev, pScreen, pCurs); } static void -xf86CursorSetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) +xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, + int x, int y) { xf86CursorScreenPtr ScreenPriv = pScreen->devPrivates[xf86CursorScreenIndex].ptr; @@ -294,8 +309,10 @@ xf86CursorSetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) if (pCurs == NullCursor) { /* means we're supposed to remove the cursor */ if (ScreenPriv->SWCursor) - (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, NullCursor, x, y); - else if (ScreenPriv->isUp) { + (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, + x, y); + else if + (ScreenPriv->isUp) { xf86SetCursor(pScreen, NullCursor, x, y); ScreenPriv->isUp = FALSE; } @@ -319,7 +336,7 @@ xf86CursorSetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) { if (ScreenPriv->SWCursor) /* remove the SW cursor */ - (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, NullCursor, x, y); + (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, x, y); xf86SetCursor(pScreen, pCurs, x, y); ScreenPriv->SWCursor = FALSE; @@ -344,11 +361,11 @@ xf86CursorSetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) if (pCurs->bits->emptyMask && !ScreenPriv->showTransparent) pCurs = NullCursor; - (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, pCurs, x, y); + (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, pCurs, x, y); } static void -xf86CursorMoveCursor(ScreenPtr pScreen, int x, int y) +xf86CursorMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { xf86CursorScreenPtr ScreenPriv = pScreen->devPrivates[xf86CursorScreenIndex].ptr; @@ -357,10 +374,10 @@ xf86CursorMoveCursor(ScreenPtr pScreen, int x, int y) ScreenPriv->y = y; if (ScreenPriv->CursorToRestore) - xf86CursorSetCursor(pScreen, ScreenPriv->CursorToRestore, + xf86CursorSetCursor(pDev, pScreen, ScreenPriv->CursorToRestore, ScreenPriv->x, ScreenPriv->y); else if (ScreenPriv->SWCursor) - (*ScreenPriv->spriteFuncs->MoveCursor)(pScreen, x, y); + (*ScreenPriv->spriteFuncs->MoveCursor)(pDev, pScreen, x, y); else if (ScreenPriv->isUp) xf86MoveCursor(pScreen, x, y); } @@ -368,6 +385,8 @@ xf86CursorMoveCursor(ScreenPtr pScreen, int x, int y) void xf86ForceHWCursor (ScreenPtr pScreen, Bool on) { + DeviceIntPtr pDev = inputInfo.pointer; + xf86CursorScreenPtr ScreenPriv = pScreen->devPrivates[xf86CursorScreenIndex].ptr; @@ -378,7 +397,7 @@ xf86ForceHWCursor (ScreenPtr pScreen, Bool on) if (ScreenPriv->SWCursor && ScreenPriv->CurrentCursor) { ScreenPriv->HWCursorForced = TRUE; - xf86CursorSetCursor (pScreen, ScreenPriv->CurrentCursor, + xf86CursorSetCursor (pDev, pScreen, ScreenPriv->CurrentCursor, ScreenPriv->x, ScreenPriv->y); } else @@ -390,7 +409,7 @@ xf86ForceHWCursor (ScreenPtr pScreen, Bool on) if (--ScreenPriv->ForceHWCursorCount == 0) { if (ScreenPriv->HWCursorForced && ScreenPriv->CurrentCursor) - xf86CursorSetCursor (pScreen, ScreenPriv->CurrentCursor, + xf86CursorSetCursor (pDev, pScreen, ScreenPriv->CurrentCursor, ScreenPriv->x, ScreenPriv->y); } } diff --git a/hw/xfree86/ramdac/xf86HWCurs.c b/hw/xfree86/ramdac/xf86HWCurs.c index 91caea047..b76b8005f 100644 --- a/hw/xfree86/ramdac/xf86HWCurs.c +++ b/hw/xfree86/ramdac/xf86HWCurs.c @@ -73,6 +73,13 @@ static unsigned char* RealizeCursorInterleave64(xf86CursorInfoPtr, CursorPtr); Bool xf86InitHardwareCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr) { + +#ifdef MPX + /* Graphics cards cannot render multiple cursors in hardware. We have to + software render them. */ + return FALSE; +#endif + if ((infoPtr->MaxWidth <= 0) || (infoPtr->MaxHeight <= 0)) return FALSE; diff --git a/include/inputstr.h b/include/inputstr.h index 231dffc3e..6f6b6760c 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -288,9 +288,6 @@ typedef struct _DeviceIntRec { Bool inited; /* TRUE if INIT returns Success */ Bool enabled; /* TRUE if ON returns Success */ Bool coreEvents; /* TRUE if device also sends core */ -#ifdef MPX - Bool isMPDev; /* TRUE if multipointer device */ -#endif GrabPtr grab; /* the grabber - used by DIX */ struct { Bool frozen; @@ -332,6 +329,9 @@ typedef struct _DeviceIntRec { DevUnion *devPrivates; int nPrivates; DeviceUnwrapProc unwrapProc; +#ifdef MPX + Bool isMPDev; /* TRUE if multipointer device */ +#endif } DeviceIntRec; typedef struct { diff --git a/mi/mipointer.c b/mi/mipointer.c index dbe2aaeab..7d5d18f60 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -27,6 +27,15 @@ Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ +#ifdef MPX + /* + * MPX additions: + * Copyright © 2006 Peter Hutterer + * License see above. + * Author: Peter Hutterer + * + */ +#endif #ifdef HAVE_DIX_CONFIG_H #include @@ -58,6 +67,11 @@ static unsigned long miPointerGeneration = 0; static miPointerRec miPointer; +#ifdef MPX +/* Multipointers */ +static miPointerRec miMPPointers[MAX_DEVICES]; +#endif + static Bool miPointerRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); static Bool miPointerUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); static Bool miPointerDisplayCursor(ScreenPtr pScreen, CursorPtr pCursor); @@ -77,6 +91,9 @@ miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) miPointerScreenFuncPtr screenFuncs; Bool waitForUpdate; { +#ifdef MPX + int mpPtrIdx = 0; /* loop counter */ +#endif miPointerScreenPtr pScreenPriv; if (miPointerGeneration != serverGeneration) @@ -128,6 +145,28 @@ miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) miPointer.confined = FALSE; miPointer.x = 0; miPointer.y = 0; + +#ifdef MPX + /* + * Set up pointer objects for multipointer devices. + */ + while(mpPtrIdx < MAX_DEVICES) + { + miMPPointers[mpPtrIdx].pScreen = NULL; + miMPPointers[mpPtrIdx].pSpriteScreen = NULL; + miMPPointers[mpPtrIdx].pCursor = NULL; + miMPPointers[mpPtrIdx].pSpriteCursor = NULL; + miMPPointers[mpPtrIdx].limits.x1 = 0; + miMPPointers[mpPtrIdx].limits.x2 = 32767; + miMPPointers[mpPtrIdx].limits.y1 = 0; + miMPPointers[mpPtrIdx].limits.y2 = 32767; + miMPPointers[mpPtrIdx].confined = FALSE; + miMPPointers[mpPtrIdx].x = 0; + miMPPointers[mpPtrIdx].y = 0; + mpPtrIdx++; + } +#endif + return TRUE; } @@ -156,9 +195,11 @@ miPointerRealizeCursor (pScreen, pCursor) ScreenPtr pScreen; CursorPtr pCursor; { + DeviceIntPtr pDev = inputInfo.pointer; + SetupScreen(pScreen); - return (*pScreenPriv->spriteFuncs->RealizeCursor) (pScreen, pCursor); + return (*pScreenPriv->spriteFuncs->RealizeCursor) (pDev, pScreen, pCursor); } static Bool @@ -166,9 +207,10 @@ miPointerUnrealizeCursor (pScreen, pCursor) ScreenPtr pScreen; CursorPtr pCursor; { + DeviceIntPtr pDev = inputInfo.pointer; SetupScreen(pScreen); - return (*pScreenPriv->spriteFuncs->UnrealizeCursor) (pScreen, pCursor); + return (*pScreenPriv->spriteFuncs->UnrealizeCursor) (pDev, pScreen, pCursor); } static Bool @@ -236,6 +278,8 @@ miPointerWarpCursor (pScreen, x, y) ScreenPtr pScreen; int x, y; { + DeviceIntPtr pDev = inputInfo.pointer; + SetupScreen (pScreen); if (miPointer.pScreen != pScreen) @@ -243,7 +287,7 @@ miPointerWarpCursor (pScreen, x, y) if (GenerateEvent) { - miPointerMove (pScreen, x, y, GetTimeInMillis()); + miPointerMoved (pDev, pScreen, x, y, GetTimeInMillis()); } else { @@ -254,7 +298,7 @@ miPointerWarpCursor (pScreen, x, y) miPointer.devx = x; miPointer.devy = y; if(!miPointer.pCursor->bits->emptyMask) - (*pScreenPriv->spriteFuncs->MoveCursor) (pScreen, x, y); + (*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y); } miPointer.x = x; miPointer.y = y; @@ -313,13 +357,13 @@ miPointerUpdateSprite (DeviceIntPtr pDev) if (miPointer.pCursor) { (*pOldPriv->spriteFuncs->SetCursor) - (miPointer.pSpriteScreen, NullCursor, 0, 0); + (pDev, miPointer.pSpriteScreen, NullCursor, 0, 0); } (*pOldPriv->screenFuncs->CrossScreen) (miPointer.pSpriteScreen, FALSE); } (*pScreenPriv->screenFuncs->CrossScreen) (pScreen, TRUE); (*pScreenPriv->spriteFuncs->SetCursor) - (pScreen, miPointer.pCursor, x, y); + (pDev, pScreen, miPointer.pCursor, x, y); miPointer.devx = x; miPointer.devy = y; miPointer.pSpriteCursor = miPointer.pCursor; @@ -333,7 +377,7 @@ miPointerUpdateSprite (DeviceIntPtr pDev) pCursor = miPointer.pCursor; if (pCursor->bits->emptyMask && !pScreenPriv->showTransparent) pCursor = NullCursor; - (*pScreenPriv->spriteFuncs->SetCursor) (pScreen, pCursor, x, y); + (*pScreenPriv->spriteFuncs->SetCursor) (pDev, pScreen, pCursor, x, y); miPointer.devx = x; miPointer.devy = y; @@ -344,7 +388,7 @@ miPointerUpdateSprite (DeviceIntPtr pDev) miPointer.devx = x; miPointer.devy = y; if(!miPointer.pCursor->bits->emptyMask) - (*pScreenPriv->spriteFuncs->MoveCursor) (pScreen, x, y); + (*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y); } } @@ -413,7 +457,12 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y, unsigned long time) if (!pScreen) return; /* called before ready */ +#ifdef MPX + if (!pDev || + !(pDev->coreEvents || pDev == inputInfo.pointer || pDev->isMPDev)) +#else if (!pDev || !(pDev->coreEvents || pDev == inputInfo.pointer)) +#endif return; if (*x < 0 || *x >= pScreen->width || *y < 0 || *y >= pScreen->height) @@ -482,7 +531,7 @@ miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, miPointer.devx = x; miPointer.devy = y; if(!miPointer.pCursor->bits->emptyMask) - (*pScreenPriv->spriteFuncs->MoveCursor) (pScreen, x, y); + (*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y); } miPointer.x = x; diff --git a/mi/mipointer.h b/mi/mipointer.h index 30e89444b..8e66ae6ab 100644 --- a/mi/mipointer.h +++ b/mi/mipointer.h @@ -37,20 +37,24 @@ in this Software without prior written authorization from The Open Group. typedef struct _miPointerSpriteFuncRec { Bool (*RealizeCursor)( + DeviceIntPtr /* pDev */, ScreenPtr /* pScr */, CursorPtr /* pCurs */ ); Bool (*UnrealizeCursor)( + DeviceIntPtr /* pDev */, ScreenPtr /* pScr */, CursorPtr /* pCurs */ ); void (*SetCursor)( + DeviceIntPtr /* pDev */, ScreenPtr /* pScr */, CursorPtr /* pCurs */, int /* x */, int /* y */ ); void (*MoveCursor)( + DeviceIntPtr /* pDev */, ScreenPtr /* pScr */, int /* x */, int /* y */ diff --git a/mi/misprite.c b/mi/misprite.c index 286c7552a..cc7ab951f 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -29,6 +29,15 @@ Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ +#ifdef MPX + /* + * MPX additions: + * Copyright © 2006 Peter Hutterer + * License see above. + * Author: Peter Hutterer + * + */ +#endif #ifdef HAVE_DIX_CONFIG_H #include @@ -105,11 +114,14 @@ static void miSpriteComputeSaved(ScreenPtr pScreen); * pointer-sprite method table */ -static Bool miSpriteRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); -static Bool miSpriteUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); -static void miSpriteSetCursor(ScreenPtr pScreen, CursorPtr pCursor, - int x, int y); -static void miSpriteMoveCursor(ScreenPtr pScreen, int x, int y); +static Bool miSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor); +static Bool miSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor); +static void miSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor, int x, int y); +static void miSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + int x, int y); _X_EXPORT miPointerSpriteFuncRec miSpritePointerFuncs = { miSpriteRealizeCursor, @@ -603,7 +615,8 @@ miSpriteSaveDoomedAreas (pWin, pObscured, dx, dy) #define SPRITE_PAD 8 static Bool -miSpriteRealizeCursor (pScreen, pCursor) +miSpriteRealizeCursor (pDev, pScreen, pCursor) + DeviceIntPtr pDev; ScreenPtr pScreen; CursorPtr pCursor; { @@ -616,7 +629,8 @@ miSpriteRealizeCursor (pScreen, pCursor) } static Bool -miSpriteUnrealizeCursor (pScreen, pCursor) +miSpriteUnrealizeCursor (pDev, pScreen, pCursor) + DeviceIntPtr pDev; ScreenPtr pScreen; CursorPtr pCursor; { @@ -627,7 +641,8 @@ miSpriteUnrealizeCursor (pScreen, pCursor) } static void -miSpriteSetCursor (pScreen, pCursor, x, y) +miSpriteSetCursor (pDev, pScreen, pCursor, x, y) + DeviceIntPtr pDev; ScreenPtr pScreen; CursorPtr pCursor; int x; @@ -729,14 +744,15 @@ miSpriteSetCursor (pScreen, pCursor, x, y) } static void -miSpriteMoveCursor (pScreen, x, y) +miSpriteMoveCursor (pDev, pScreen, x, y) + DeviceIntPtr pDev; ScreenPtr pScreen; int x, y; { miSpriteScreenPtr pScreenPriv; pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - miSpriteSetCursor (pScreen, pScreenPriv->pCursor, x, y); + miSpriteSetCursor (pDev, pScreen, pScreenPriv->pCursor, x, y); } /* From 90bea69dfdd63f58ee326887359ad1b35a31cb5f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 17 Nov 2006 18:03:43 +1030 Subject: [PATCH 008/634] mi: added miCursorInfoRec to contain info of the MPX cursors. calling miUpdatePointerSprite() from event queue for MPX devices. adding device-specific processing to miPointer*() functions. dix: Call to SetCursorPosition in CheckMotion() temporarily disabled. xfree86/common: call to miPointerUpdateSprite() disabled, is done from the EQ NOTE: This build will not display cursor images. BUG: The second mouse does to take correct x coordinates. --- Changelog | 23 +++++ dix/events.c | 2 + hw/xfree86/common/xf86Events.c | 3 + mi/mieq.c | 12 +++ mi/mipointer.c | 181 ++++++++++++++++++++++++--------- mi/mipointer.h | 5 + mi/misprite.c | 33 +++++- mi/mispritest.h | 15 +++ 8 files changed, 225 insertions(+), 49 deletions(-) diff --git a/Changelog b/Changelog index 86bce4d3c..484ac4d7c 100644 --- a/Changelog +++ b/Changelog @@ -25,6 +25,29 @@ Files: hw/xfree86/ramdac/xf86Cursor.c hw/xfree86/rac/xf86RAC.c + +mi: + added miCursorInfoRec to contain info of the MPX cursors. + calling miUpdatePointerSprite() from event queue for MPX devices. + adding device-specific processing to miPointer*() functions. + +dix: Call to SetCursorPosition in CheckMotion() temporarily disabled. + +xfree86/common: call to miPointerUpdateSprite() disabled, is done from the EQ + +NOTE: This build will not display cursor images. +BUG: The second mouse does to take correct x coordinates. + +Files: + mi/mispritestr.h + mi/misprite.c + mi/mipointer.c + mi/mipointer.h + mi/mieq.c + dix/events.c + hw/xfree86/common/xf86Events.c + + == 16.11.06 == dix: merge with code cleanup from master diff --git a/dix/events.c b/dix/events.c index e5701eec2..19ed97cd7 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2012,6 +2012,7 @@ CheckMotion(xEvent *xE) xeviehot.y = sprite.hot.y; #endif sprite.hotPhys = sprite.hot; +#ifndef MPX if ((sprite.hotPhys.x != XE_KBPTR.rootX) || (sprite.hotPhys.y != XE_KBPTR.rootY)) { @@ -2019,6 +2020,7 @@ CheckMotion(xEvent *xE) sprite.hotPhys.pScreen, sprite.hotPhys.x, sprite.hotPhys.y, FALSE); } +#endif XE_KBPTR.rootX = sprite.hot.x; XE_KBPTR.rootY = sprite.hot.y; } diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 5469426f2..a552491ce 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -246,7 +246,10 @@ ProcessInputEvents () xf86Info.inputPending = FALSE; mieqProcessInputEvents(); +#ifndef MPX + /* For MPX, this is done inside the mieqProcessInputEvents() */ miPointerUpdateSprite(inputInfo.pointer); +#endif miPointerGetPosition(inputInfo.pointer, &x, &y); xf86SetViewport(xf86Info.currentScreen, x, y); diff --git a/mi/mieq.c b/mi/mieq.c index d19933520..30a61e609 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -251,5 +251,17 @@ mieqProcessInputEvents() #endif dev->public.processInputProc(e->event, dev, e->nevents); } +#ifdef MPX + /* + * This is inefficient as we update the sprite for each event rather + * than at the end of the event queue. But we don't know if the + * next event is from the same device, so it's better to do it here. + */ + if (e->event[0].u.u.type == MotionNotify && + (e->pDev->isMPDev || e->pDev->coreEvents)) + { + miPointerUpdateSprite(e->pDev); + } +#endif } } diff --git a/mi/mipointer.c b/mi/mipointer.c index 7d5d18f60..8f049c48e 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -70,6 +70,14 @@ static miPointerRec miPointer; #ifdef MPX /* Multipointers */ static miPointerRec miMPPointers[MAX_DEVICES]; + + +/* Check if the given device is a MP device. */ +_X_EXPORT Bool +IsMPDev(DeviceIntPtr pDev) +{ + return (pDev && pDev->isMPDev && pDev->id < MAX_DEVICES); +} #endif static Bool miPointerRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); @@ -175,12 +183,23 @@ miPointerCloseScreen (index, pScreen) int index; ScreenPtr pScreen; { + int mpPointerIdx = 0; SetupScreen(pScreen); if (pScreen == miPointer.pScreen) miPointer.pScreen = 0; if (pScreen == miPointer.pSpriteScreen) miPointer.pSpriteScreen = 0; +#ifdef MPX + while(mpPointerIdx < MAX_DEVICES) + { + if (pScreen == miMPPointers[mpPointerIdx].pScreen) + miMPPointers[mpPointerIdx].pScreen = 0; + if (pScreen == miMPPointers[mpPointerIdx].pSpriteScreen) + miMPPointers[mpPointerIdx].pSpriteScreen = 0; + mpPointerIdx++; + } +#endif pScreen->CloseScreen = pScreenPriv->CloseScreen; xfree ((pointer) pScreenPriv); return (*pScreen->CloseScreen) (index, pScreen); @@ -218,6 +237,16 @@ miPointerDisplayCursor (pScreen, pCursor) ScreenPtr pScreen; CursorPtr pCursor; { +#ifdef MPX + int mpPtrIdx = 0; + while (mpPtrIdx < MAX_DEVICES) + { + miMPPointers[mpPtrIdx].pCursor = pCursor; + miMPPointers[mpPtrIdx].pScreen = pScreen; + mpPtrIdx++; + } + +#endif miPointer.pCursor = pCursor; miPointer.pScreen = pScreen; miPointerUpdateSprite(inputInfo.pointer); @@ -329,65 +358,78 @@ miPointerUpdateSprite (DeviceIntPtr pDev) miPointerScreenPtr pScreenPriv; CursorPtr pCursor; int x, y, devx, devy; + miPointerPtr pointer; +#ifdef MPX + if (!pDev || + !(pDev->coreEvents || pDev == inputInfo.pointer || pDev->isMPDev)) +#else if (!pDev || !(pDev->coreEvents || pDev == inputInfo.pointer)) +#endif return; - pScreen = miPointer.pScreen; +#ifdef MPX + if (IsMPDev(pDev)) + pointer = &miMPPointers[pDev->id]; + else + pointer = &miPointer; +#endif + + pScreen = pointer->pScreen; if (!pScreen) return; - x = miPointer.x; - y = miPointer.y; - devx = miPointer.devx; - devy = miPointer.devy; + x = pointer->x; + y = pointer->y; + devx = pointer->devx; + devy = pointer->devy; pScreenPriv = GetScreenPrivate (pScreen); /* * if the cursor has switched screens, disable the sprite * on the old screen */ - if (pScreen != miPointer.pSpriteScreen) + if (pScreen != pointer->pSpriteScreen) { - if (miPointer.pSpriteScreen) + if (pointer->pSpriteScreen) { miPointerScreenPtr pOldPriv; - pOldPriv = GetScreenPrivate (miPointer.pSpriteScreen); - if (miPointer.pCursor) + pOldPriv = GetScreenPrivate (pointer->pSpriteScreen); + if (pointer->pCursor) { (*pOldPriv->spriteFuncs->SetCursor) - (pDev, miPointer.pSpriteScreen, NullCursor, 0, 0); + (pDev, pointer->pSpriteScreen, NullCursor, 0, 0); } - (*pOldPriv->screenFuncs->CrossScreen) (miPointer.pSpriteScreen, FALSE); + (*pOldPriv->screenFuncs->CrossScreen) (pointer->pSpriteScreen, FALSE); } (*pScreenPriv->screenFuncs->CrossScreen) (pScreen, TRUE); (*pScreenPriv->spriteFuncs->SetCursor) - (pDev, pScreen, miPointer.pCursor, x, y); - miPointer.devx = x; - miPointer.devy = y; - miPointer.pSpriteCursor = miPointer.pCursor; - miPointer.pSpriteScreen = pScreen; + (pDev, pScreen, pointer->pCursor, x, y); + pointer->devx = x; + pointer->devy = y; + pointer->pSpriteCursor = pointer->pCursor; + pointer->pSpriteScreen = pScreen; } /* * if the cursor has changed, display the new one */ - else if (miPointer.pCursor != miPointer.pSpriteCursor) + else if (pointer->pCursor != pointer->pSpriteCursor) { - pCursor = miPointer.pCursor; + pCursor = pointer->pCursor; if (pCursor->bits->emptyMask && !pScreenPriv->showTransparent) pCursor = NullCursor; (*pScreenPriv->spriteFuncs->SetCursor) (pDev, pScreen, pCursor, x, y); - miPointer.devx = x; - miPointer.devy = y; - miPointer.pSpriteCursor = miPointer.pCursor; + pointer->devx = x; + pointer->devy = y; + pointer->pSpriteCursor = pointer->pCursor; } else if (x != devx || y != devy) { - miPointer.devx = x; - miPointer.devy = y; - if(!miPointer.pCursor->bits->emptyMask) + pointer->devx = x; + pointer->devy = y; + if(!pointer->pCursor->bits->emptyMask) (*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y); } } @@ -421,8 +463,17 @@ miPointerSetScreen(DeviceIntPtr pDev, int screen_no, int x, int y) pScreenPriv = GetScreenPrivate (pScreen); (*pScreenPriv->screenFuncs->NewEventScreen) (pScreen, FALSE); NewCurrentScreen (pScreen, x, y); - miPointer.limits.x2 = pScreen->width; - miPointer.limits.y2 = pScreen->height; +#ifdef MPX + if (IsMPDev(pDev)) + { + miMPPointers[pDev->id].limits.x2 = pScreen->width; + miMPPointers[pDev->id].limits.y2 = pScreen->height; + } +#endif + { + miPointer.limits.x2 = pScreen->width; + miPointer.limits.y2 = pScreen->height; + } } _X_EXPORT ScreenPtr @@ -434,6 +485,10 @@ miPointerCurrentScreen () _X_EXPORT ScreenPtr miPointerGetScreen(DeviceIntPtr pDev) { +#ifdef MPX + if (IsMPDev(pDev)) + return miMPPointers[pDev->id].pScreen; +#endif return miPointer.pScreen; } @@ -453,7 +508,15 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y, unsigned long time) ScreenPtr pScreen; ScreenPtr newScreen; - pScreen = miPointer.pScreen; + miPointerPtr pointer; +#ifdef MPX + if (IsMPDev(pDev)) + pointer = &(miMPPointers[pDev->id]); + else +#endif + pointer = &miPointer; + + pScreen = pointer->pScreen; if (!pScreen) return; /* called before ready */ @@ -468,7 +531,7 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y, unsigned long time) if (*x < 0 || *x >= pScreen->width || *y < 0 || *y >= pScreen->height) { pScreenPriv = GetScreenPrivate (pScreen); - if (!miPointer.confined) + if (!pointer->confined) { newScreen = pScreen; (*pScreenPriv->screenFuncs->CursorOffScreen) (&newScreen, x, y); @@ -478,22 +541,22 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y, unsigned long time) (*pScreenPriv->screenFuncs->NewEventScreen) (pScreen, FALSE); pScreenPriv = GetScreenPrivate (pScreen); /* Smash the confine to the new screen */ - miPointer.limits.x2 = pScreen->width; - miPointer.limits.y2 = pScreen->height; + pointer->limits.x2 = pScreen->width; + pointer->limits.y2 = pScreen->height; } } } /* Constrain the sprite to the current limits. */ - if (*x < miPointer.limits.x1) - *x = miPointer.limits.x1; - if (*x >= miPointer.limits.x2) - *x = miPointer.limits.x2 - 1; - if (*y < miPointer.limits.y1) - *y = miPointer.limits.y1; - if (*y >= miPointer.limits.y2) - *y = miPointer.limits.y2 - 1; + if (*x < pointer->limits.x1) + *x = pointer->limits.x1; + if (*x >= pointer->limits.x2) + *x = pointer->limits.x2 - 1; + if (*y < pointer->limits.y1) + *y = pointer->limits.y1; + if (*y >= pointer->limits.y2) + *y = pointer->limits.y2 - 1; - if (miPointer.x == *x && miPointer.y == *y && miPointer.pScreen == pScreen) + if (pointer->x == *x && pointer->y == *y && pointer->pScreen == pScreen) return; miPointerMoved(pDev, pScreen, *x, *y, time); @@ -508,8 +571,18 @@ miPointerPosition (int *x, int *y) _X_EXPORT void miPointerGetPosition(DeviceIntPtr pDev, int *x, int *y) { - *x = miPointer.x; - *y = miPointer.y; +#ifdef MPX + if (IsMPDev(pDev)) + { + *x = miMPPointers[pDev->id].x; + *y = miMPPointers[pDev->id].y; + } + else +#endif + { + *x = miPointer.x; + *y = miPointer.y; + } } void @@ -523,18 +596,30 @@ void miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, unsigned long time) { + miPointerPtr pointer; SetupScreen(pScreen); - if (pDev && (pDev->coreEvents || pDev == inputInfo.pointer) && +#ifdef MPX + if (IsMPDev(pDev)) + pointer = &miMPPointers[pDev->id]; + else +#endif + pointer = &miPointer; + + if (pDev && (pDev->coreEvents || pDev == inputInfo.pointer +#ifdef MPX + || pDev->isMPDev +#endif + ) && !pScreenPriv->waitForUpdate && pScreen == miPointer.pSpriteScreen) { - miPointer.devx = x; - miPointer.devy = y; - if(!miPointer.pCursor->bits->emptyMask) + pointer->devx = x; + pointer->devy = y; + if(!pointer->pCursor->bits->emptyMask) (*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y); } - miPointer.x = x; - miPointer.y = y; - miPointer.pScreen = pScreen; + pointer->x = x; + pointer->y = y; + pointer->pScreen = pScreen; } diff --git a/mi/mipointer.h b/mi/mipointer.h index 8e66ae6ab..832aa5aab 100644 --- a/mi/mipointer.h +++ b/mi/mipointer.h @@ -187,4 +187,9 @@ extern void miPointerMoved( extern int miPointerScreenIndex; +#ifdef MPX +_X_EXPORT Bool IsMPDev(DeviceIntPtr pDev); +#endif; + + #endif /* MIPOINTER_H */ diff --git a/mi/misprite.c b/mi/misprite.c index cc7ab951f..f0530d2b0 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -65,6 +65,10 @@ in this Software without prior written authorization from The Open Group. #endif # include "damage.h" +#ifdef MPX +# include "inputstr.h" /* for MAX_DEVICES */ +#endif + #define SPRITE_DEBUG_ENABLE 0 #if SPRITE_DEBUG_ENABLE #define SPRITE_DEBUG(x) ErrorF x @@ -165,6 +169,9 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs) miSpriteCursorFuncPtr cursorFuncs; miPointerScreenFuncPtr screenFuncs; { +#ifdef MPX + int mpCursorIdx = 0; +#endif miSpriteScreenPtr pScreenPriv; VisualPtr pVisual; @@ -247,6 +254,24 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs) pScreen->BlockHandler = miSpriteBlockHandler; +#ifdef MPX + /* alloc and zero memory for all MPX cursors */ + pScreenPriv->mpCursors = (miCursorInfoPtr)xalloc(MAX_DEVICES * sizeof(miCursorInfoRec)); + while (mpCursorIdx < MAX_DEVICES) + { + miCursorInfoPtr cursor = &(pScreenPriv->mpCursors[mpCursorIdx]); + + cursor->pCursor = NULL; + cursor->x = 0; + cursor->y = 0; + cursor->isUp = FALSE; + cursor->shouldBeUp = FALSE; + cursor->pCacheWin = NullWindow; + + mpCursorIdx++; + } +#endif + return TRUE; } @@ -750,9 +775,15 @@ miSpriteMoveCursor (pDev, pScreen, x, y) int x, y; { miSpriteScreenPtr pScreenPriv; + CursorPtr pCursor; pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - miSpriteSetCursor (pDev, pScreen, pScreenPriv->pCursor, x, y); + pCursor = pScreenPriv->pCursor; +#ifdef MPX + if (IsMPDev(pDev)) + pCursor = pScreenPriv->mpCursors[pDev->id].pCursor; +#endif + miSpriteSetCursor (pDev, pScreen, pCursor, x, y); } /* diff --git a/mi/mispritest.h b/mi/mispritest.h index 5075f0580..24ab11e93 100644 --- a/mi/mispritest.h +++ b/mi/mispritest.h @@ -43,6 +43,18 @@ in this Software without prior written authorization from The Open Group. #endif # include "damage.h" +#ifdef MPX +typedef struct { + CursorPtr pCursor; + int x; /* cursor hotspot */ + int y; + BoxRec saved; /* saved area from the screen */ + Bool isUp; /* cursor in frame buffer */ + Bool shouldBeUp; /* cursor should be displayed */ + WindowPtr pCacheWin; /* window the cursor last seen in */ +} miCursorInfoRec, *miCursorInfoPtr; +#endif + /* * per screen information */ @@ -82,6 +94,9 @@ typedef struct { VisualPtr pVisual; miSpriteCursorFuncPtr funcs; DamagePtr pDamage; /* damage tracking structure */ +#ifdef MPX + miCursorInfoPtr mpCursors; /* all cursor's info */ +#endif } miSpriteScreenRec, *miSpriteScreenPtr; #define SOURCE_COLOR 0 From 7b4b619d4c268804199f9f4775eb56604f0b80e8 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 20 Nov 2006 13:10:07 +1030 Subject: [PATCH 009/634] mi: moved core pointer information from miSpriteScreenRec into a miCursorInfoRec. bugfix in mipointer, semicolon after preprocessor statement --- Changelog | 10 ++ mi/mipointer.h | 2 +- mi/misprite.c | 268 ++++++++++++++++++++++++++---------------------- mi/mispritest.h | 29 ++---- 4 files changed, 167 insertions(+), 142 deletions(-) diff --git a/Changelog b/Changelog index 484ac4d7c..a04f0f17e 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,14 @@ MPX Changelog file +== 20.11.06 == + +mi: moved core pointer information from miSpriteScreenRec into a + miCursorInfoRec. + bugfix in mipointer, semicolon after preprocessor statement + +Files: + mi/mispritest.h + mi/misprite.c + mi/mipointer.c == 17.11.06 == dix: moved isMPdev field to end of _DeviceIntRec structure diff --git a/mi/mipointer.h b/mi/mipointer.h index 832aa5aab..1b01ba19b 100644 --- a/mi/mipointer.h +++ b/mi/mipointer.h @@ -189,7 +189,7 @@ extern int miPointerScreenIndex; #ifdef MPX _X_EXPORT Bool IsMPDev(DeviceIntPtr pDev); -#endif; +#endif #endif /* MIPOINTER_H */ diff --git a/mi/misprite.c b/mi/misprite.c index f0530d2b0..6d5ffdfed 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -149,8 +149,8 @@ miSpriteReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - if (pScreenPriv->isUp && - RECT_IN_REGION (pScreen, pRegion, &pScreenPriv->saved) != rgnOUT) + if (pScreenPriv->cp->isUp && + RECT_IN_REGION (pScreen, pRegion, &pScreenPriv->cp->saved) != rgnOUT) { SPRITE_DEBUG(("Damage remove\n")); miSpriteRemoveCursor (pScreen); @@ -221,23 +221,25 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs) pScreenPriv->BlockHandler = pScreen->BlockHandler; - pScreenPriv->pCursor = NULL; - pScreenPriv->x = 0; - pScreenPriv->y = 0; - pScreenPriv->isUp = FALSE; - pScreenPriv->shouldBeUp = FALSE; - pScreenPriv->pCacheWin = NullWindow; - pScreenPriv->isInCacheWin = FALSE; - pScreenPriv->checkPixels = TRUE; - pScreenPriv->pInstalledMap = NULL; - pScreenPriv->pColormap = NULL; + pScreenPriv->cp = (miCursorInfoPtr)xalloc(sizeof(miCursorInfoRec)); + pScreenPriv->cp->pCursor = NULL; + pScreenPriv->cp->x = 0; + pScreenPriv->cp->y = 0; + pScreenPriv->cp->isUp = FALSE; + pScreenPriv->cp->shouldBeUp = FALSE; + pScreenPriv->cp->pCacheWin = NullWindow; + pScreenPriv->cp->isInCacheWin = FALSE; + pScreenPriv->cp->checkPixels = TRUE; + pScreenPriv->cp->pInstalledMap = NULL; + pScreenPriv->cp->pColormap = NULL; + pScreenPriv->cp->colors[SOURCE_COLOR].red = 0; + pScreenPriv->cp->colors[SOURCE_COLOR].green = 0; + pScreenPriv->cp->colors[SOURCE_COLOR].blue = 0; + pScreenPriv->cp->colors[MASK_COLOR].red = 0; + pScreenPriv->cp->colors[MASK_COLOR].green = 0; + pScreenPriv->cp->colors[MASK_COLOR].blue = 0; + pScreenPriv->funcs = cursorFuncs; - pScreenPriv->colors[SOURCE_COLOR].red = 0; - pScreenPriv->colors[SOURCE_COLOR].green = 0; - pScreenPriv->colors[SOURCE_COLOR].blue = 0; - pScreenPriv->colors[MASK_COLOR].red = 0; - pScreenPriv->colors[MASK_COLOR].green = 0; - pScreenPriv->colors[MASK_COLOR].blue = 0; pScreen->devPrivates[miSpriteScreenIndex].ptr = (pointer) pScreenPriv; pScreen->CloseScreen = miSpriteCloseScreen; @@ -267,6 +269,16 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs) cursor->isUp = FALSE; cursor->shouldBeUp = FALSE; cursor->pCacheWin = NullWindow; + cursor->isInCacheWin = FALSE; + cursor->checkPixels = TRUE; + cursor->pInstalledMap = NULL; + cursor->pColormap = NULL; + cursor->colors[SOURCE_COLOR].red = 0; + cursor->colors[SOURCE_COLOR].green = 0; + cursor->colors[SOURCE_COLOR].blue = 0; + cursor->colors[MASK_COLOR].red = 0; + cursor->colors[MASK_COLOR].green = 0; + cursor->colors[MASK_COLOR].blue = 0; mpCursorIdx++; } @@ -326,8 +338,9 @@ miSpriteGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; if (pDrawable->type == DRAWABLE_WINDOW && - pScreenPriv->isUp && - ORG_OVERLAP(&pScreenPriv->saved,pDrawable->x,pDrawable->y, sx, sy, w, h)) + pScreenPriv->cp->isUp && + ORG_OVERLAP(&pScreenPriv->cp->saved,pDrawable->x,pDrawable->y, + sx, sy, w, h)) { SPRITE_DEBUG (("GetImage remove\n")); miSpriteRemoveCursor (pScreen); @@ -355,7 +368,7 @@ miSpriteGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - if (pDrawable->type == DRAWABLE_WINDOW && pScreenPriv->isUp) + if (pDrawable->type == DRAWABLE_WINDOW && pScreenPriv->cp->isUp) { register DDXPointPtr pts; register int *widths; @@ -370,7 +383,7 @@ miSpriteGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart) nPts--; pts++, widths++) { - if (SPN_OVERLAP(&pScreenPriv->saved,pts->y+yorg, + if (SPN_OVERLAP(&pScreenPriv->cp->saved,pts->y+yorg, pts->x+xorg,*widths)) { SPRITE_DEBUG (("GetSpans remove\n")); @@ -397,8 +410,8 @@ miSpriteSourceValidate (pDrawable, x, y, width, height) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - if (pDrawable->type == DRAWABLE_WINDOW && pScreenPriv->isUp && - ORG_OVERLAP(&pScreenPriv->saved, pDrawable->x, pDrawable->y, + if (pDrawable->type == DRAWABLE_WINDOW && pScreenPriv->cp->isUp && + ORG_OVERLAP(&pScreenPriv->cp->saved, pDrawable->x, pDrawable->y, x, y, width, height)) { SPRITE_DEBUG (("SourceValidate remove\n")); @@ -423,8 +436,8 @@ miSpriteCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) /* * Damage will take care of destination check */ - if (pScreenPriv->isUp && - RECT_IN_REGION (pScreen, prgnSrc, &pScreenPriv->saved) != rgnOUT) + if (pScreenPriv->cp->isUp && + RECT_IN_REGION (pScreen, prgnSrc, &pScreenPriv->cp->saved) != rgnOUT) { SPRITE_DEBUG (("CopyWindow remove\n")); miSpriteRemoveCursor (pScreen); @@ -452,7 +465,7 @@ miSpriteBlockHandler (i, blockData, pTimeout, pReadmask) SCREEN_EPILOGUE(pScreen, BlockHandler); - if (!pPriv->isUp && pPriv->shouldBeUp) + if (!pPriv->cp->isUp && pPriv->cp->shouldBeUp) { SPRITE_DEBUG (("BlockHandler restore\n")); miSpriteRestoreCursor (pScreen); @@ -474,11 +487,11 @@ miSpriteInstallColormap (pMap) SCREEN_EPILOGUE(pScreen, InstallColormap); - pPriv->pInstalledMap = pMap; - if (pPriv->pColormap != pMap) + pPriv->cp->pInstalledMap = pMap; + if (pPriv->cp->pColormap != pMap) { - pPriv->checkPixels = TRUE; - if (pPriv->isUp) + pPriv->cp->checkPixels = TRUE; + if (pPriv->cp->isUp) miSpriteRemoveCursor (pScreen); } } @@ -503,7 +516,7 @@ miSpriteStoreColors (pMap, ndef, pdef) SCREEN_EPILOGUE(pScreen, StoreColors); - if (pPriv->pColormap == pMap) + if (pPriv->cp->pColormap == pMap) { updated = 0; pVisual = pMap->pVisual; @@ -514,8 +527,8 @@ miSpriteStoreColors (pMap, ndef, pdef) #define MaskMatch(a,b,mask) (((a) & (pVisual->mask)) == ((b) & (pVisual->mask))) #define UpdateDAC(plane,dac,mask) {\ - if (MaskMatch (pPriv->colors[plane].pixel,pdef[i].pixel,mask)) {\ - pPriv->colors[plane].dac = pdef[i].dac; \ + if (MaskMatch (pPriv->cp->colors[plane].pixel,pdef[i].pixel,mask)) {\ + pPriv->cp->colors[plane].dac = pdef[i].dac; \ updated = 1; \ } \ } @@ -536,15 +549,15 @@ miSpriteStoreColors (pMap, ndef, pdef) /* PseudoColor/GrayScale - match on exact pixel */ for (i = 0; i < ndef; i++) { - if (pdef[i].pixel == pPriv->colors[SOURCE_COLOR].pixel) + if (pdef[i].pixel == pPriv->cp->colors[SOURCE_COLOR].pixel) { - pPriv->colors[SOURCE_COLOR] = pdef[i]; + pPriv->cp->colors[SOURCE_COLOR] = pdef[i]; if (++updated == 2) break; } - if (pdef[i].pixel == pPriv->colors[MASK_COLOR].pixel) + if (pdef[i].pixel == pPriv->cp->colors[MASK_COLOR].pixel) { - pPriv->colors[MASK_COLOR] = pdef[i]; + pPriv->cp->colors[MASK_COLOR] = pdef[i]; if (++updated == 2) break; } @@ -552,8 +565,8 @@ miSpriteStoreColors (pMap, ndef, pdef) } if (updated) { - pPriv->checkPixels = TRUE; - if (pPriv->isUp) + pPriv->cp->checkPixels = TRUE; + if (pPriv->cp->isUp) miSpriteRemoveCursor (pScreen); } } @@ -567,10 +580,10 @@ miSpriteFindColors (ScreenPtr pScreen) CursorPtr pCursor; xColorItem *sourceColor, *maskColor; - pCursor = pScreenPriv->pCursor; - sourceColor = &pScreenPriv->colors[SOURCE_COLOR]; - maskColor = &pScreenPriv->colors[MASK_COLOR]; - if (pScreenPriv->pColormap != pScreenPriv->pInstalledMap || + pCursor = pScreenPriv->cp->pCursor; + sourceColor = &pScreenPriv->cp->colors[SOURCE_COLOR]; + maskColor = &pScreenPriv->cp->colors[MASK_COLOR]; + if (pScreenPriv->cp->pColormap != pScreenPriv->cp->pInstalledMap || !(pCursor->foreRed == sourceColor->red && pCursor->foreGreen == sourceColor->green && pCursor->foreBlue == sourceColor->blue && @@ -578,20 +591,20 @@ miSpriteFindColors (ScreenPtr pScreen) pCursor->backGreen == maskColor->green && pCursor->backBlue == maskColor->blue)) { - pScreenPriv->pColormap = pScreenPriv->pInstalledMap; + pScreenPriv->cp->pColormap = pScreenPriv->cp->pInstalledMap; sourceColor->red = pCursor->foreRed; sourceColor->green = pCursor->foreGreen; sourceColor->blue = pCursor->foreBlue; - FakeAllocColor (pScreenPriv->pColormap, sourceColor); + FakeAllocColor (pScreenPriv->cp->pColormap, sourceColor); maskColor->red = pCursor->backRed; maskColor->green = pCursor->backGreen; maskColor->blue = pCursor->backBlue; - FakeAllocColor (pScreenPriv->pColormap, maskColor); + FakeAllocColor (pScreenPriv->cp->pColormap, maskColor); /* "free" the pixels right away, don't let this confuse you */ - FakeFreeColor(pScreenPriv->pColormap, sourceColor->pixel); - FakeFreeColor(pScreenPriv->pColormap, maskColor->pixel); + FakeFreeColor(pScreenPriv->cp->pColormap, sourceColor->pixel); + FakeFreeColor(pScreenPriv->cp->pColormap, maskColor->pixel); } - pScreenPriv->checkPixels = FALSE; + pScreenPriv->cp->checkPixels = FALSE; } /* @@ -613,9 +626,9 @@ miSpriteSaveDoomedAreas (pWin, pObscured, dx, dy) SCREEN_PROLOGUE (pScreen, SaveDoomedAreas); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - if (pScreenPriv->isUp) + if (pScreenPriv->cp->isUp) { - cursorBox = pScreenPriv->saved; + cursorBox = pScreenPriv->cp->saved; if (dx || dy) { @@ -648,8 +661,8 @@ miSpriteRealizeCursor (pDev, pScreen, pCursor) miSpriteScreenPtr pScreenPriv; pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - if (pCursor == pScreenPriv->pCursor) - pScreenPriv->checkPixels = TRUE; + if (pCursor == pScreenPriv->cp->pCursor) + pScreenPriv->cp->checkPixels = TRUE; return (*pScreenPriv->funcs->RealizeCursor) (pScreen, pCursor); } @@ -678,80 +691,85 @@ miSpriteSetCursor (pDev, pScreen, pCursor, x, y) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; if (!pCursor) { - pScreenPriv->shouldBeUp = FALSE; - if (pScreenPriv->isUp) + pScreenPriv->cp->shouldBeUp = FALSE; + if (pScreenPriv->cp->isUp) miSpriteRemoveCursor (pScreen); - pScreenPriv->pCursor = 0; + pScreenPriv->cp->pCursor = 0; return; } - pScreenPriv->shouldBeUp = TRUE; - if (pScreenPriv->x == x && - pScreenPriv->y == y && - pScreenPriv->pCursor == pCursor && - !pScreenPriv->checkPixels) + pScreenPriv->cp->shouldBeUp = TRUE; + if (pScreenPriv->cp->x == x && + pScreenPriv->cp->y == y && + pScreenPriv->cp->pCursor == pCursor && + !pScreenPriv->cp->checkPixels) { return; } - pScreenPriv->x = x; - pScreenPriv->y = y; - pScreenPriv->pCacheWin = NullWindow; - if (pScreenPriv->checkPixels || pScreenPriv->pCursor != pCursor) + pScreenPriv->cp->x = x; + pScreenPriv->cp->y = y; + pScreenPriv->cp->pCacheWin = NullWindow; + if (pScreenPriv->cp->checkPixels || pScreenPriv->cp->pCursor != pCursor) { - pScreenPriv->pCursor = pCursor; + pScreenPriv->cp->pCursor = pCursor; miSpriteFindColors (pScreen); } - if (pScreenPriv->isUp) { + if (pScreenPriv->cp->isUp) { int sx, sy; /* * check to see if the old saved region * encloses the new sprite, in which case we use * the flicker-free MoveCursor primitive. */ - sx = pScreenPriv->x - (int)pCursor->bits->xhot; - sy = pScreenPriv->y - (int)pCursor->bits->yhot; - if (sx + (int) pCursor->bits->width >= pScreenPriv->saved.x1 && - sx < pScreenPriv->saved.x2 && - sy + (int) pCursor->bits->height >= pScreenPriv->saved.y1 && - sy < pScreenPriv->saved.y2 && + sx = pScreenPriv->cp->x - (int)pCursor->bits->xhot; + sy = pScreenPriv->cp->y - (int)pCursor->bits->yhot; + if (sx + (int) pCursor->bits->width >= pScreenPriv->cp->saved.x1 && + sx < pScreenPriv->cp->saved.x2 && + sy + (int) pCursor->bits->height >= pScreenPriv->cp->saved.y1 && + sy < pScreenPriv->cp->saved.y2 && (int) pCursor->bits->width + (2 * SPRITE_PAD) == - pScreenPriv->saved.x2 - pScreenPriv->saved.x1 && + pScreenPriv->cp->saved.x2 - pScreenPriv->cp->saved.x1 && (int) pCursor->bits->height + (2 * SPRITE_PAD) == - pScreenPriv->saved.y2 - pScreenPriv->saved.y1 + pScreenPriv->cp->saved.y2 - pScreenPriv->cp->saved.y1 ) { DamageDrawInternal (pScreen, TRUE); miSpriteIsUpFALSE (pScreen, pScreenPriv); - if (!(sx >= pScreenPriv->saved.x1 && - sx + (int)pCursor->bits->width < pScreenPriv->saved.x2 && - sy >= pScreenPriv->saved.y1 && - sy + (int)pCursor->bits->height < pScreenPriv->saved.y2)) - { + if (!(sx >= pScreenPriv->cp->saved.x1 && + sx + (int)pCursor->bits->width < pScreenPriv->cp->saved.x2 + && sy >= pScreenPriv->cp->saved.y1 && + sy + (int)pCursor->bits->height < + pScreenPriv->cp->saved.y2)) + { int oldx1, oldy1, dx, dy; - oldx1 = pScreenPriv->saved.x1; - oldy1 = pScreenPriv->saved.y1; + oldx1 = pScreenPriv->cp->saved.x1; + oldy1 = pScreenPriv->cp->saved.y1; dx = oldx1 - (sx - SPRITE_PAD); dy = oldy1 - (sy - SPRITE_PAD); - pScreenPriv->saved.x1 -= dx; - pScreenPriv->saved.y1 -= dy; - pScreenPriv->saved.x2 -= dx; - pScreenPriv->saved.y2 -= dy; + pScreenPriv->cp->saved.x1 -= dx; + pScreenPriv->cp->saved.y1 -= dy; + pScreenPriv->cp->saved.x2 -= dx; + pScreenPriv->cp->saved.y2 -= dy; (void) (*pScreenPriv->funcs->ChangeSave) (pScreen, - pScreenPriv->saved.x1, - pScreenPriv->saved.y1, - pScreenPriv->saved.x2 - pScreenPriv->saved.x1, - pScreenPriv->saved.y2 - pScreenPriv->saved.y1, + pScreenPriv->cp->saved.x1, + pScreenPriv->cp->saved.y1, + pScreenPriv->cp->saved.x2 - + pScreenPriv->cp->saved.x1, + pScreenPriv->cp->saved.y2 - + pScreenPriv->cp->saved.y1, dx, dy); } (void) (*pScreenPriv->funcs->MoveCursor) (pScreen, pCursor, - pScreenPriv->saved.x1, - pScreenPriv->saved.y1, - pScreenPriv->saved.x2 - pScreenPriv->saved.x1, - pScreenPriv->saved.y2 - pScreenPriv->saved.y1, - sx - pScreenPriv->saved.x1, - sy - pScreenPriv->saved.y1, - pScreenPriv->colors[SOURCE_COLOR].pixel, - pScreenPriv->colors[MASK_COLOR].pixel); + pScreenPriv->cp->saved.x1, + pScreenPriv->cp->saved.y1, + pScreenPriv->cp->saved.x2 - + pScreenPriv->cp->saved.x1, + pScreenPriv->cp->saved.y2 - + pScreenPriv->cp->saved.y1, + sx - pScreenPriv->cp->saved.x1, + sy - pScreenPriv->cp->saved.y1, + pScreenPriv->cp->colors[SOURCE_COLOR].pixel, + pScreenPriv->cp->colors[MASK_COLOR].pixel); miSpriteIsUpTRUE (pScreen, pScreenPriv); DamageDrawInternal (pScreen, FALSE); } @@ -761,7 +779,7 @@ miSpriteSetCursor (pDev, pScreen, pCursor, x, y) miSpriteRemoveCursor (pScreen); } } - if (!pScreenPriv->isUp && pScreenPriv->pCursor) + if (!pScreenPriv->cp->isUp && pScreenPriv->cp->pCursor) { SPRITE_DEBUG (("SetCursor restore\n")); miSpriteRestoreCursor (pScreen); @@ -778,7 +796,7 @@ miSpriteMoveCursor (pDev, pScreen, x, y) CursorPtr pCursor; pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - pCursor = pScreenPriv->pCursor; + pCursor = pScreenPriv->cp->pCursor; #ifdef MPX if (IsMPDev(pDev)) pCursor = pScreenPriv->mpCursors[pDev->id].pCursor; @@ -799,12 +817,14 @@ miSpriteRemoveCursor (pScreen) DamageDrawInternal (pScreen, TRUE); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; miSpriteIsUpFALSE (pScreen, pScreenPriv); - pScreenPriv->pCacheWin = NullWindow; + pScreenPriv->cp->pCacheWin = NullWindow; if (!(*pScreenPriv->funcs->RestoreUnderCursor) (pScreen, - pScreenPriv->saved.x1, - pScreenPriv->saved.y1, - pScreenPriv->saved.x2 - pScreenPriv->saved.x1, - pScreenPriv->saved.y2 - pScreenPriv->saved.y1)) + pScreenPriv->cp->saved.x1, + pScreenPriv->cp->saved.y1, + pScreenPriv->cp->saved.x2 - + pScreenPriv->cp->saved.x1, + pScreenPriv->cp->saved.y2 - + pScreenPriv->cp->saved.y1)) { miSpriteIsUpTRUE (pScreen, pScreenPriv); } @@ -827,20 +847,22 @@ miSpriteRestoreCursor (pScreen) DamageDrawInternal (pScreen, TRUE); miSpriteComputeSaved (pScreen); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - pCursor = pScreenPriv->pCursor; - x = pScreenPriv->x - (int)pCursor->bits->xhot; - y = pScreenPriv->y - (int)pCursor->bits->yhot; + pCursor = pScreenPriv->cp->pCursor; + x = pScreenPriv->cp->x - (int)pCursor->bits->xhot; + y = pScreenPriv->cp->y - (int)pCursor->bits->yhot; if ((*pScreenPriv->funcs->SaveUnderCursor) (pScreen, - pScreenPriv->saved.x1, - pScreenPriv->saved.y1, - pScreenPriv->saved.x2 - pScreenPriv->saved.x1, - pScreenPriv->saved.y2 - pScreenPriv->saved.y1)) + pScreenPriv->cp->saved.x1, + pScreenPriv->cp->saved.y1, + pScreenPriv->cp->saved.x2 - + pScreenPriv->cp->saved.x1, + pScreenPriv->cp->saved.y2 - + pScreenPriv->cp->saved.y1)) { - if (pScreenPriv->checkPixels) + if (pScreenPriv->cp->checkPixels) miSpriteFindColors (pScreen); if ((*pScreenPriv->funcs->PutUpCursor) (pScreen, pCursor, x, y, - pScreenPriv->colors[SOURCE_COLOR].pixel, - pScreenPriv->colors[MASK_COLOR].pixel)) + pScreenPriv->cp->colors[SOURCE_COLOR].pixel, + pScreenPriv->cp->colors[MASK_COLOR].pixel)) { miSpriteIsUpTRUE (pScreen, pScreenPriv); } @@ -862,15 +884,15 @@ miSpriteComputeSaved (pScreen) CursorPtr pCursor; pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - pCursor = pScreenPriv->pCursor; - x = pScreenPriv->x - (int)pCursor->bits->xhot; - y = pScreenPriv->y - (int)pCursor->bits->yhot; + pCursor = pScreenPriv->cp->pCursor; + x = pScreenPriv->cp->x - (int)pCursor->bits->xhot; + y = pScreenPriv->cp->y - (int)pCursor->bits->yhot; w = pCursor->bits->width; h = pCursor->bits->height; wpad = SPRITE_PAD; hpad = SPRITE_PAD; - pScreenPriv->saved.x1 = x - wpad; - pScreenPriv->saved.y1 = y - hpad; - pScreenPriv->saved.x2 = pScreenPriv->saved.x1 + w + wpad * 2; - pScreenPriv->saved.y2 = pScreenPriv->saved.y1 + h + hpad * 2; + pScreenPriv->cp->saved.x1 = x - wpad; + pScreenPriv->cp->saved.y1 = y - hpad; + pScreenPriv->cp->saved.x2 = pScreenPriv->cp->saved.x1 + w + wpad * 2; + pScreenPriv->cp->saved.y2 = pScreenPriv->cp->saved.y1 + h + hpad * 2; } diff --git a/mi/mispritest.h b/mi/mispritest.h index 24ab11e93..4608c4efb 100644 --- a/mi/mispritest.h +++ b/mi/mispritest.h @@ -43,7 +43,6 @@ in this Software without prior written authorization from The Open Group. #endif # include "damage.h" -#ifdef MPX typedef struct { CursorPtr pCursor; int x; /* cursor hotspot */ @@ -52,8 +51,12 @@ typedef struct { Bool isUp; /* cursor in frame buffer */ Bool shouldBeUp; /* cursor should be displayed */ WindowPtr pCacheWin; /* window the cursor last seen in */ + Bool isInCacheWin; + Bool checkPixels; /* check colormap collision */ + xColorItem colors[2]; + ColormapPtr pInstalledMap; + ColormapPtr pColormap; } miCursorInfoRec, *miCursorInfoPtr; -#endif /* * per screen information @@ -79,18 +82,8 @@ typedef struct { /* os layer procedures */ ScreenBlockHandlerProcPtr BlockHandler; - CursorPtr pCursor; - int x; /* cursor hotspot */ - int y; - BoxRec saved; /* saved area from the screen */ - Bool isUp; /* cursor in frame buffer */ - Bool shouldBeUp; /* cursor should be displayed */ - WindowPtr pCacheWin; /* window the cursor last seen in */ - Bool isInCacheWin; - Bool checkPixels; /* check colormap collision */ - xColorItem colors[2]; - ColormapPtr pInstalledMap; - ColormapPtr pColormap; + miCursorInfoPtr cp; /* core pointer */ + VisualPtr pVisual; miSpriteCursorFuncPtr funcs; DamagePtr pDamage; /* damage tracking structure */ @@ -102,14 +95,14 @@ typedef struct { #define SOURCE_COLOR 0 #define MASK_COLOR 1 -#define miSpriteIsUpTRUE(pScreen, pScreenPriv) if (!pScreenPriv->isUp) { \ - pScreenPriv->isUp = TRUE; \ +#define miSpriteIsUpTRUE(pScreen, pScreenPriv) if (!pScreenPriv->cp->isUp) { \ + pScreenPriv->cp->isUp = TRUE; \ DamageRegister (&(*pScreen->GetScreenPixmap) (pScreen)->drawable, pScreenPriv->pDamage); \ } -#define miSpriteIsUpFALSE(pScreen, pScreenPriv) if (pScreenPriv->isUp) { \ +#define miSpriteIsUpFALSE(pScreen, pScreenPriv) if (pScreenPriv->cp->isUp) { \ DamageUnregister (&(*pScreen->GetScreenPixmap) (pScreen)->drawable, pScreenPriv->pDamage); \ - pScreenPriv->isUp = FALSE; \ + pScreenPriv->cp->isUp = FALSE; \ } /* From b1bbdf464d2f8799fa3429c1c27ca998c5f3e94a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 20 Nov 2006 17:58:30 +1030 Subject: [PATCH 010/634] mi: added MPX to miSprite functions. NOTE: This version will render multiple cursors but with an artefact each time when devices alternate. --- Changelog | 12 ++ dix/events.c | 1 + mi/misprite.c | 489 ++++++++++++++++++++++++++++++++++++------------ mi/mispritest.h | 19 +- 4 files changed, 393 insertions(+), 128 deletions(-) diff --git a/Changelog b/Changelog index a04f0f17e..bcf5e8b49 100644 --- a/Changelog +++ b/Changelog @@ -10,6 +10,18 @@ Files: mi/misprite.c mi/mipointer.c + +mi: added MPX to miSprite functions. + +Files: + mi/mispritest.h + mi/misprite.c + mi/mipointer.c + dix/events.c + +NOTE: This version will render multiple cursors but with an artefact each time +when devices alternate. + == 17.11.06 == dix: moved isMPdev field to end of _DeviceIntRec structure diff --git a/dix/events.c b/dix/events.c index 19ed97cd7..f50e246e0 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2114,6 +2114,7 @@ DefineInitialRootWindow(register WindowPtr win) sprite.current->refcnt++; spriteTraceGood = 1; ROOT = win; +/* FIXME: This only limits the core pointer, not the MPX pointer */ (*pScreen->CursorLimits) ( pScreen, sprite.current, &sprite.hotLimits, &sprite.physLimits); sprite.confined = FALSE; diff --git a/mi/misprite.c b/mi/misprite.c index 6d5ffdfed..262487861 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -105,7 +105,8 @@ static void miSpriteStoreColors(ColormapPtr pMap, int ndef, static void miSpriteSaveDoomedAreas(WindowPtr pWin, RegionPtr pObscured, int dx, int dy); -static void miSpriteComputeSaved(ScreenPtr pScreen); +static void miSpriteComputeSaved(miCursorInfoPtr pDevCursor, + ScreenPtr pScreen); #define SCREEN_PROLOGUE(pScreen, field)\ ((pScreen)->field = \ @@ -138,8 +139,10 @@ _X_EXPORT miPointerSpriteFuncRec miSpritePointerFuncs = { * other misc functions */ -static void miSpriteRemoveCursor(ScreenPtr pScreen); -static void miSpriteRestoreCursor(ScreenPtr pScreen); +static void miSpriteRemoveCursor(miCursorInfoPtr pDevCursor, + ScreenPtr pScreen); +static void miSpriteRestoreCursor(miCursorInfoPtr pDevCursor, + ScreenPtr pScreen); static void miSpriteReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure) @@ -153,7 +156,7 @@ miSpriteReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure) RECT_IN_REGION (pScreen, pRegion, &pScreenPriv->cp->saved) != rgnOUT) { SPRITE_DEBUG(("Damage remove\n")); - miSpriteRemoveCursor (pScreen); + miSpriteRemoveCursor (pScreenPriv->cp, pScreen); } } @@ -314,8 +317,12 @@ miSpriteCloseScreen (i, pScreen) pScreen->StoreColors = pScreenPriv->StoreColors; pScreen->SaveDoomedAreas = pScreenPriv->SaveDoomedAreas; - miSpriteIsUpFALSE (pScreen, pScreenPriv); + miSpriteIsUpFALSE (pScreenPriv->cp, pScreen, pScreenPriv); DamageDestroy (pScreenPriv->pDamage); + +#ifdef MPX + xfree((pointer)(pScreenPriv->mpCursors)); +#endif xfree ((pointer) pScreenPriv); @@ -343,9 +350,29 @@ miSpriteGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine) sx, sy, w, h)) { SPRITE_DEBUG (("GetImage remove\n")); - miSpriteRemoveCursor (pScreen); + miSpriteRemoveCursor (pScreenPriv->cp, pScreen); } +#ifdef MPX + /* check for MPX cursors in the target region */ + if (pDrawable->type == DRAWABLE_WINDOW) + { + int mpCursorIdx = 0; + while (mpCursorIdx < MAX_DEVICES) + { + miCursorInfoPtr pMPCursor = &pScreenPriv->mpCursors[mpCursorIdx]; + if (pMPCursor->isUp && + ORG_OVERLAP(&pMPCursor->saved,pDrawable->x,pDrawable->y, + sx, sy, w, h)) + { + SPRITE_DEBUG("GetImage remove MPX\n"); + } + miSpriteRemoveCursor(pMPCursor, pScreen); + mpCursorIdx++; + } + } +#endif + (*pScreen->GetImage) (pDrawable, sx, sy, w, h, format, planemask, pdstLine); @@ -387,12 +414,47 @@ miSpriteGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart) pts->x+xorg,*widths)) { SPRITE_DEBUG (("GetSpans remove\n")); - miSpriteRemoveCursor (pScreen); + miSpriteRemoveCursor (pScreenPriv->cp, pScreen); break; } } } +#ifdef MPX + if (pDrawable->type == DRAWABLE_WINDOW) + { + + int mpCursorIdx = 0; + + while(mpCursorIdx < MAX_DEVICES) + { + miCursorInfoPtr pMPCursor = &pScreenPriv->mpCursors[mpCursorIdx]; + register DDXPointPtr pts; + register int *widths; + register int nPts; + register int xorg, + yorg; + xorg = pDrawable->x; + yorg = pDrawable->y; + + for (pts = ppt, widths = pwidth, nPts = nspans; + nPts--; + pts++, widths++) + { + if (SPN_OVERLAP(&pMPCursor->saved,pts->y+yorg, + pts->x+xorg,*widths)) + { + SPRITE_DEBUG (("GetSpans remove\n")); + miSpriteRemoveCursor (pMPCursor, pScreen); + break; + } + } + mpCursorIdx++; + } + } + +#endif + (*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart); SCREEN_EPILOGUE (pScreen, GetSpans); @@ -415,9 +477,28 @@ miSpriteSourceValidate (pDrawable, x, y, width, height) x, y, width, height)) { SPRITE_DEBUG (("SourceValidate remove\n")); - miSpriteRemoveCursor (pScreen); + miSpriteRemoveCursor (pScreenPriv->cp, pScreen); } +#ifdef MPX + if (pDrawable->type == DRAWABLE_WINDOW) + { + int mpCursorIdx = 0; + while (mpCursorIdx < MAX_DEVICES) + { + miCursorInfoPtr pMPCursor = &pScreenPriv->mpCursors[mpCursorIdx]; + if (pMPCursor->isUp && ORG_OVERLAP(&pMPCursor->saved, + pDrawable->x, pDrawable->y, x, y, width, height)) + { + SPRITE_DEBUG(("SourceValidate remove MPX\n")); + miSpriteRemoveCursor(pMPCursor, pScreen); + } + mpCursorIdx++; + } + + } +#endif + if (pScreen->SourceValidate) (*pScreen->SourceValidate) (pDrawable, x, y, width, height); @@ -440,8 +521,27 @@ miSpriteCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) RECT_IN_REGION (pScreen, prgnSrc, &pScreenPriv->cp->saved) != rgnOUT) { SPRITE_DEBUG (("CopyWindow remove\n")); - miSpriteRemoveCursor (pScreen); + miSpriteRemoveCursor (pScreenPriv->cp, pScreen); } +#ifdef MPX + { + int mpCursorIdx = 0; + while (mpCursorIdx < MAX_DEVICES) + { + miCursorInfoPtr pMPCursor = &pScreenPriv->mpCursors[mpCursorIdx]; + + if (pMPCursor->isUp && RECT_IN_REGION (pScreen, prgnSrc, + &pMPCursor->saved) != rgnOUT) + + { + SPRITE_DEBUG(("CopyWindow remove MPX\n")); + miSpriteRemoveCursor(pMPCursor, pScreen); + } + mpCursorIdx++; + } + + } +#endif (*pScreen->CopyWindow) (pWindow, ptOldOrg, prgnSrc); SCREEN_EPILOGUE (pScreen, CopyWindow); @@ -468,8 +568,25 @@ miSpriteBlockHandler (i, blockData, pTimeout, pReadmask) if (!pPriv->cp->isUp && pPriv->cp->shouldBeUp) { SPRITE_DEBUG (("BlockHandler restore\n")); - miSpriteRestoreCursor (pScreen); + miSpriteRestoreCursor (pPriv->cp, pScreen); } + +#ifdef MPX + { + int mpCursorIdx = 0; + while (mpCursorIdx < MAX_DEVICES) + { + miCursorInfoPtr pMPCursor = &pPriv->mpCursors[mpCursorIdx]; + if (!pMPCursor->isUp && pMPCursor->shouldBeUp) + { + SPRITE_DEBUG (("BlockHandler restore MPX\n")); + miSpriteRestoreCursor (pMPCursor, pScreen); + } + + mpCursorIdx++; + } + } +#endif } static void @@ -492,8 +609,27 @@ miSpriteInstallColormap (pMap) { pPriv->cp->checkPixels = TRUE; if (pPriv->cp->isUp) - miSpriteRemoveCursor (pScreen); + miSpriteRemoveCursor (pPriv->cp, pScreen); } + +#ifdef MPX + { + int mpCursorIdx = 0; + while (mpCursorIdx < MAX_DEVICES) + { + miCursorInfoPtr pMPCursor = &pPriv->mpCursors[mpCursorIdx]; + pMPCursor->pInstalledMap = pMap; + if (pMPCursor->pColormap != pMap) + { + pMPCursor->checkPixels = TRUE; + if (pMPCursor->isUp) + miSpriteRemoveCursor(pMPCursor, pScreen); + } + mpCursorIdx++; + } + } +#endif + } static void @@ -526,22 +662,22 @@ miSpriteStoreColors (pMap, ndef, pdef) #define MaskMatch(a,b,mask) (((a) & (pVisual->mask)) == ((b) & (pVisual->mask))) -#define UpdateDAC(plane,dac,mask) {\ - if (MaskMatch (pPriv->cp->colors[plane].pixel,pdef[i].pixel,mask)) {\ - pPriv->cp->colors[plane].dac = pdef[i].dac; \ +#define UpdateDAC(dev, plane,dac,mask) {\ + if (MaskMatch (dev->colors[plane].pixel,pdef[i].pixel,mask)) {\ + dev->colors[plane].dac = pdef[i].dac; \ updated = 1; \ } \ } -#define CheckDirect(plane) \ - UpdateDAC(plane,red,redMask) \ - UpdateDAC(plane,green,greenMask) \ - UpdateDAC(plane,blue,blueMask) +#define CheckDirect(dev, plane) \ + UpdateDAC(dev, plane,red,redMask) \ + UpdateDAC(dev, plane,green,greenMask) \ + UpdateDAC(dev, plane,blue,blueMask) for (i = 0; i < ndef; i++) { - CheckDirect (SOURCE_COLOR) - CheckDirect (MASK_COLOR) + CheckDirect (pPriv->cp, SOURCE_COLOR) + CheckDirect (pPriv->cp, MASK_COLOR) } } else @@ -567,23 +703,75 @@ miSpriteStoreColors (pMap, ndef, pdef) { pPriv->cp->checkPixels = TRUE; if (pPriv->cp->isUp) - miSpriteRemoveCursor (pScreen); + miSpriteRemoveCursor (pPriv->cp, pScreen); } } + +#ifdef MPX + { + int mpCursorIdx = 0; + + while (mpCursorIdx < MAX_DEVICES) + { + miCursorInfoPtr pMPCursor = &pPriv->mpCursors[mpCursorIdx]; + + if (pPriv->cp->pColormap == pMap) + { + updated = 0; + pVisual = pMap->pVisual; + if (pVisual->class == DirectColor) + { + for (i = 0; i < ndef; i++) + { + CheckDirect (pMPCursor, SOURCE_COLOR) + CheckDirect (pMPCursor, MASK_COLOR) + } + } + else + { + /* PseudoColor/GrayScale - match on exact pixel */ + for (i = 0; i < ndef; i++) + { + if (pdef[i].pixel == + pMPCursor->colors[SOURCE_COLOR].pixel) + { + pMPCursor->colors[SOURCE_COLOR] = pdef[i]; + if (++updated == 2) + break; + } + if (pdef[i].pixel == + pMPCursor->colors[MASK_COLOR].pixel) + { + pMPCursor->colors[MASK_COLOR] = pdef[i]; + if (++updated == 2) + break; + } + } + } + if (updated) + { + pMPCursor->checkPixels = TRUE; + if (pMPCursor->isUp) + miSpriteRemoveCursor (pMPCursor, pScreen); + } + } + mpCursorIdx++; + } + } +#endif + } static void -miSpriteFindColors (ScreenPtr pScreen) +miSpriteFindColors (miCursorInfoPtr pDevCursor, ScreenPtr pScreen) { - miSpriteScreenPtr pScreenPriv = (miSpriteScreenPtr) - pScreen->devPrivates[miSpriteScreenIndex].ptr; CursorPtr pCursor; xColorItem *sourceColor, *maskColor; - pCursor = pScreenPriv->cp->pCursor; - sourceColor = &pScreenPriv->cp->colors[SOURCE_COLOR]; - maskColor = &pScreenPriv->cp->colors[MASK_COLOR]; - if (pScreenPriv->cp->pColormap != pScreenPriv->cp->pInstalledMap || + pCursor = pDevCursor->pCursor; + sourceColor = &pDevCursor->colors[SOURCE_COLOR]; + maskColor = &pDevCursor->colors[MASK_COLOR]; + if (pDevCursor->pColormap != pDevCursor->pInstalledMap || !(pCursor->foreRed == sourceColor->red && pCursor->foreGreen == sourceColor->green && pCursor->foreBlue == sourceColor->blue && @@ -591,20 +779,22 @@ miSpriteFindColors (ScreenPtr pScreen) pCursor->backGreen == maskColor->green && pCursor->backBlue == maskColor->blue)) { - pScreenPriv->cp->pColormap = pScreenPriv->cp->pInstalledMap; + pDevCursor->pColormap = pDevCursor->pInstalledMap; sourceColor->red = pCursor->foreRed; sourceColor->green = pCursor->foreGreen; sourceColor->blue = pCursor->foreBlue; - FakeAllocColor (pScreenPriv->cp->pColormap, sourceColor); + FakeAllocColor (pDevCursor->pColormap, sourceColor); maskColor->red = pCursor->backRed; maskColor->green = pCursor->backGreen; maskColor->blue = pCursor->backBlue; - FakeAllocColor (pScreenPriv->cp->pColormap, maskColor); + FakeAllocColor (pDevCursor->pColormap, maskColor); /* "free" the pixels right away, don't let this confuse you */ - FakeFreeColor(pScreenPriv->cp->pColormap, sourceColor->pixel); - FakeFreeColor(pScreenPriv->cp->pColormap, maskColor->pixel); + FakeFreeColor(pDevCursor->pColormap, sourceColor->pixel); + FakeFreeColor(pDevCursor->pColormap, maskColor->pixel); } - pScreenPriv->cp->checkPixels = FALSE; + + pDevCursor->checkPixels = FALSE; + } /* @@ -638,8 +828,33 @@ miSpriteSaveDoomedAreas (pWin, pObscured, dx, dy) cursorBox.y2 += dy; } if (RECT_IN_REGION( pScreen, pObscured, &cursorBox) != rgnOUT) - miSpriteRemoveCursor (pScreen); + miSpriteRemoveCursor (pScreenPriv->cp, pScreen); } +#ifdef MPX + { + int mpCursorIdx = 0; + while (mpCursorIdx < MAX_DEVICES) + { + miCursorInfoPtr pMPCursor = &pScreenPriv->mpCursors[mpCursorIdx]; + + if (pMPCursor->isUp) + { + cursorBox = pMPCursor->saved; + + if (dx || dy) + { + cursorBox.x1 += dx; + cursorBox.y1 += dy; + cursorBox.x2 += dx; + cursorBox.y2 += dy; + } + if (RECT_IN_REGION( pScreen, pObscured, &cursorBox) != rgnOUT) + miSpriteRemoveCursor (pMPCursor, pScreen); + } + mpCursorIdx++; + } + } +#endif (*pScreen->SaveDoomedAreas) (pWin, pObscured, dx, dy); @@ -663,6 +878,21 @@ miSpriteRealizeCursor (pDev, pScreen, pCursor) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; if (pCursor == pScreenPriv->cp->pCursor) pScreenPriv->cp->checkPixels = TRUE; +#ifdef MPX + { + int mpCursorIdx = 0; + while (mpCursorIdx < MAX_DEVICES) + { + miCursorInfoPtr pMPCursor = &pScreenPriv->mpCursors[mpCursorIdx]; + + if (pCursor == pMPCursor->pCursor) + pMPCursor->checkPixels = TRUE; + + mpCursorIdx++; + } + } +#endif + return (*pScreenPriv->funcs->RealizeCursor) (pScreen, pCursor); } @@ -689,101 +919,112 @@ miSpriteSetCursor (pDev, pScreen, pCursor, x, y) miSpriteScreenPtr pScreenPriv; pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; + miCursorInfoPtr pointer = pScreenPriv->cp; +#ifdef MPX + if (IsMPDev(pDev)) + pointer = &pScreenPriv->mpCursors[pDev->id]; +#endif + if (!pCursor) { - pScreenPriv->cp->shouldBeUp = FALSE; - if (pScreenPriv->cp->isUp) - miSpriteRemoveCursor (pScreen); - pScreenPriv->cp->pCursor = 0; + pointer->shouldBeUp = FALSE; + if (pointer->isUp) + miSpriteRemoveCursor (pointer, pScreen); + pointer->pCursor = 0; return; } - pScreenPriv->cp->shouldBeUp = TRUE; - if (pScreenPriv->cp->x == x && - pScreenPriv->cp->y == y && - pScreenPriv->cp->pCursor == pCursor && - !pScreenPriv->cp->checkPixels) + pointer->shouldBeUp = TRUE; + if (pointer->x == x && + pointer->y == y && + pointer->pCursor == pCursor && + !pointer->checkPixels) { return; } - pScreenPriv->cp->x = x; - pScreenPriv->cp->y = y; - pScreenPriv->cp->pCacheWin = NullWindow; - if (pScreenPriv->cp->checkPixels || pScreenPriv->cp->pCursor != pCursor) + pointer->x = x; + pointer->y = y; + pointer->pCacheWin = NullWindow; + if (pointer->checkPixels || pointer->pCursor != pCursor) { - pScreenPriv->cp->pCursor = pCursor; - miSpriteFindColors (pScreen); + pointer->pCursor = pCursor; + miSpriteFindColors (pointer, pScreen); } - if (pScreenPriv->cp->isUp) { + if (pointer->isUp) { +#if 0 + /* FIXME: Disabled for MPX, should be rewritten */ int sx, sy; /* * check to see if the old saved region * encloses the new sprite, in which case we use * the flicker-free MoveCursor primitive. */ - sx = pScreenPriv->cp->x - (int)pCursor->bits->xhot; - sy = pScreenPriv->cp->y - (int)pCursor->bits->yhot; - if (sx + (int) pCursor->bits->width >= pScreenPriv->cp->saved.x1 && - sx < pScreenPriv->cp->saved.x2 && - sy + (int) pCursor->bits->height >= pScreenPriv->cp->saved.y1 && - sy < pScreenPriv->cp->saved.y2 && + sx = pointer->x - (int)pCursor->bits->xhot; + sy = pointer->y - (int)pCursor->bits->yhot; + if (sx + (int) pCursor->bits->width >= pointer->saved.x1 && + sx < pointer->saved.x2 && + sy + (int) pCursor->bits->height >= pointer->saved.y1 && + sy < pointer->saved.y2 && (int) pCursor->bits->width + (2 * SPRITE_PAD) == - pScreenPriv->cp->saved.x2 - pScreenPriv->cp->saved.x1 && + pointer->saved.x2 - pointer->saved.x1 && (int) pCursor->bits->height + (2 * SPRITE_PAD) == - pScreenPriv->cp->saved.y2 - pScreenPriv->cp->saved.y1 + pointer->saved.y2 - pointer->saved.y1 ) { DamageDrawInternal (pScreen, TRUE); miSpriteIsUpFALSE (pScreen, pScreenPriv); - if (!(sx >= pScreenPriv->cp->saved.x1 && - sx + (int)pCursor->bits->width < pScreenPriv->cp->saved.x2 - && sy >= pScreenPriv->cp->saved.y1 && + if (!(sx >= pointer->saved.x1 && + sx + (int)pCursor->bits->width < pointer->saved.x2 + && sy >= pointer->saved.y1 && sy + (int)pCursor->bits->height < - pScreenPriv->cp->saved.y2)) + pointer->saved.y2)) { int oldx1, oldy1, dx, dy; - oldx1 = pScreenPriv->cp->saved.x1; - oldy1 = pScreenPriv->cp->saved.y1; + oldx1 = pointer->saved.x1; + oldy1 = pointer->saved.y1; dx = oldx1 - (sx - SPRITE_PAD); dy = oldy1 - (sy - SPRITE_PAD); - pScreenPriv->cp->saved.x1 -= dx; - pScreenPriv->cp->saved.y1 -= dy; - pScreenPriv->cp->saved.x2 -= dx; - pScreenPriv->cp->saved.y2 -= dy; + pointer->saved.x1 -= dx; + pointer->saved.y1 -= dy; + pointer->saved.x2 -= dx; + pointer->saved.y2 -= dy; (void) (*pScreenPriv->funcs->ChangeSave) (pScreen, - pScreenPriv->cp->saved.x1, - pScreenPriv->cp->saved.y1, - pScreenPriv->cp->saved.x2 - - pScreenPriv->cp->saved.x1, - pScreenPriv->cp->saved.y2 - - pScreenPriv->cp->saved.y1, + pointer->saved.x1, + pointer->saved.y1, + pointer->saved.x2 - + pointer->saved.x1, + pointer->saved.y2 - + pointer->saved.y1, dx, dy); } (void) (*pScreenPriv->funcs->MoveCursor) (pScreen, pCursor, - pScreenPriv->cp->saved.x1, - pScreenPriv->cp->saved.y1, - pScreenPriv->cp->saved.x2 - - pScreenPriv->cp->saved.x1, - pScreenPriv->cp->saved.y2 - - pScreenPriv->cp->saved.y1, - sx - pScreenPriv->cp->saved.x1, - sy - pScreenPriv->cp->saved.y1, - pScreenPriv->cp->colors[SOURCE_COLOR].pixel, - pScreenPriv->cp->colors[MASK_COLOR].pixel); + pointer->saved.x1, + pointer->saved.y1, + pointer->saved.x2 - + pointer->saved.x1, + pointer->saved.y2 - + pointer->saved.y1, + sx - pointer->saved.x1, + sy - pointer->saved.y1, + pointer->colors[SOURCE_COLOR].pixel, + pointer->colors[MASK_COLOR].pixel); miSpriteIsUpTRUE (pScreen, pScreenPriv); DamageDrawInternal (pScreen, FALSE); } else +#endif { SPRITE_DEBUG (("SetCursor remove\n")); - miSpriteRemoveCursor (pScreen); + miSpriteRemoveCursor (pointer, pScreen); } } - if (!pScreenPriv->cp->isUp && pScreenPriv->cp->pCursor) + + if (!pointer->isUp && pointer->pCursor) { SPRITE_DEBUG (("SetCursor restore\n")); - miSpriteRestoreCursor (pScreen); + miSpriteRestoreCursor (pointer, pScreen); } + } static void @@ -797,6 +1038,7 @@ miSpriteMoveCursor (pDev, pScreen, x, y) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; pCursor = pScreenPriv->cp->pCursor; + #ifdef MPX if (IsMPDev(pDev)) pCursor = pScreenPriv->mpCursors[pDev->id].pCursor; @@ -809,24 +1051,25 @@ miSpriteMoveCursor (pDev, pScreen, x, y) */ static void -miSpriteRemoveCursor (pScreen) +miSpriteRemoveCursor (pDevCursor, pScreen) + miCursorInfoPtr pDevCursor; ScreenPtr pScreen; { miSpriteScreenPtr pScreenPriv; DamageDrawInternal (pScreen, TRUE); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - miSpriteIsUpFALSE (pScreen, pScreenPriv); - pScreenPriv->cp->pCacheWin = NullWindow; + miSpriteIsUpFALSE (pDevCursor, pScreen, pScreenPriv); + pDevCursor->pCacheWin = NullWindow; if (!(*pScreenPriv->funcs->RestoreUnderCursor) (pScreen, - pScreenPriv->cp->saved.x1, - pScreenPriv->cp->saved.y1, - pScreenPriv->cp->saved.x2 - - pScreenPriv->cp->saved.x1, - pScreenPriv->cp->saved.y2 - - pScreenPriv->cp->saved.y1)) + pDevCursor->saved.x1, + pDevCursor->saved.y1, + pDevCursor->saved.x2 - + pDevCursor->saved.x1, + pDevCursor->saved.y2 - + pDevCursor->saved.y1)) { - miSpriteIsUpTRUE (pScreen, pScreenPriv); + miSpriteIsUpTRUE (pDevCursor, pScreen, pScreenPriv); } DamageDrawInternal (pScreen, FALSE); } @@ -837,7 +1080,8 @@ miSpriteRemoveCursor (pScreen) */ static void -miSpriteRestoreCursor (pScreen) +miSpriteRestoreCursor (pDevCursor, pScreen) + miCursorInfoPtr pDevCursor; ScreenPtr pScreen; { miSpriteScreenPtr pScreenPriv; @@ -845,26 +1089,26 @@ miSpriteRestoreCursor (pScreen) CursorPtr pCursor; DamageDrawInternal (pScreen, TRUE); - miSpriteComputeSaved (pScreen); + miSpriteComputeSaved (pDevCursor, pScreen); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - pCursor = pScreenPriv->cp->pCursor; - x = pScreenPriv->cp->x - (int)pCursor->bits->xhot; - y = pScreenPriv->cp->y - (int)pCursor->bits->yhot; + pCursor = pDevCursor->pCursor; + x = pDevCursor->x - (int)pCursor->bits->xhot; + y = pDevCursor->y - (int)pCursor->bits->yhot; if ((*pScreenPriv->funcs->SaveUnderCursor) (pScreen, - pScreenPriv->cp->saved.x1, - pScreenPriv->cp->saved.y1, - pScreenPriv->cp->saved.x2 - - pScreenPriv->cp->saved.x1, - pScreenPriv->cp->saved.y2 - - pScreenPriv->cp->saved.y1)) + pDevCursor->saved.x1, + pDevCursor->saved.y1, + pDevCursor->saved.x2 - + pDevCursor->saved.x1, + pDevCursor->saved.y2 - + pDevCursor->saved.y1)) { - if (pScreenPriv->cp->checkPixels) - miSpriteFindColors (pScreen); + if (pDevCursor->checkPixels) + miSpriteFindColors (pDevCursor, pScreen); if ((*pScreenPriv->funcs->PutUpCursor) (pScreen, pCursor, x, y, - pScreenPriv->cp->colors[SOURCE_COLOR].pixel, - pScreenPriv->cp->colors[MASK_COLOR].pixel)) + pDevCursor->colors[SOURCE_COLOR].pixel, + pDevCursor->colors[MASK_COLOR].pixel)) { - miSpriteIsUpTRUE (pScreen, pScreenPriv); + miSpriteIsUpTRUE (pDevCursor, pScreen, pScreenPriv); } } DamageDrawInternal (pScreen, FALSE); @@ -875,7 +1119,8 @@ miSpriteRestoreCursor (pScreen) */ static void -miSpriteComputeSaved (pScreen) +miSpriteComputeSaved (pDevCursor, pScreen) + miCursorInfoPtr pDevCursor; ScreenPtr pScreen; { miSpriteScreenPtr pScreenPriv; @@ -884,15 +1129,15 @@ miSpriteComputeSaved (pScreen) CursorPtr pCursor; pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - pCursor = pScreenPriv->cp->pCursor; - x = pScreenPriv->cp->x - (int)pCursor->bits->xhot; - y = pScreenPriv->cp->y - (int)pCursor->bits->yhot; + pCursor = pDevCursor->pCursor; + x = pDevCursor->x - (int)pCursor->bits->xhot; + y = pDevCursor->y - (int)pCursor->bits->yhot; w = pCursor->bits->width; h = pCursor->bits->height; wpad = SPRITE_PAD; hpad = SPRITE_PAD; - pScreenPriv->cp->saved.x1 = x - wpad; - pScreenPriv->cp->saved.y1 = y - hpad; - pScreenPriv->cp->saved.x2 = pScreenPriv->cp->saved.x1 + w + wpad * 2; - pScreenPriv->cp->saved.y2 = pScreenPriv->cp->saved.y1 + h + hpad * 2; + pDevCursor->saved.x1 = x - wpad; + pDevCursor->saved.y1 = y - hpad; + pDevCursor->saved.x2 = pDevCursor->saved.x1 + w + wpad * 2; + pDevCursor->saved.y2 = pDevCursor->saved.y1 + h + hpad * 2; } diff --git a/mi/mispritest.h b/mi/mispritest.h index 4608c4efb..e4235345b 100644 --- a/mi/mispritest.h +++ b/mi/mispritest.h @@ -95,14 +95,21 @@ typedef struct { #define SOURCE_COLOR 0 #define MASK_COLOR 1 -#define miSpriteIsUpTRUE(pScreen, pScreenPriv) if (!pScreenPriv->cp->isUp) { \ - pScreenPriv->cp->isUp = TRUE; \ - DamageRegister (&(*pScreen->GetScreenPixmap) (pScreen)->drawable, pScreenPriv->pDamage); \ +static int damageRegister = 0; +#define miSpriteIsUpTRUE(pDevCursor, pScreen, pScreenPriv) if (!pDevCursor->isUp) { \ + pDevCursor->isUp = TRUE; \ + if (!damageRegister ) { \ + damageRegister++; \ + DamageRegister (&(*pScreen->GetScreenPixmap) (pScreen)->drawable, pScreenPriv->pDamage); \ + } \ } -#define miSpriteIsUpFALSE(pScreen, pScreenPriv) if (pScreenPriv->cp->isUp) { \ - DamageUnregister (&(*pScreen->GetScreenPixmap) (pScreen)->drawable, pScreenPriv->pDamage); \ - pScreenPriv->cp->isUp = FALSE; \ +#define miSpriteIsUpFALSE(pDevCursor, pScreen, pScreenPriv) if (pDevCursor->isUp) { \ + if (damageRegister) { \ + damageRegister--; \ + DamageUnregister (&(*pScreen->GetScreenPixmap) (pScreen)->drawable, pScreenPriv->pDamage); \ + } \ + pDevCursor->isUp = FALSE; \ } /* From 3bad452d12d620df91b1f37d06c650ded96bfafe Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 21 Nov 2006 11:26:21 +1030 Subject: [PATCH 011/634] mi: added MPX to miSpriteReportDamage added id field to miCursorInfoPtr, required to pass through to miDC core pointer uses mpCursors array as well. added miDCBufferRec for future use with MPX TAG: MPX_BEFORE_MIDC_API_BREAK --- Changelog | 13 ++++ mi/midispcur.c | 173 ++++++++++++++++++++++++++++++------------------ mi/misprite.c | 23 +++++++ mi/mispritest.h | 1 + 4 files changed, 146 insertions(+), 64 deletions(-) diff --git a/Changelog b/Changelog index bcf5e8b49..e0bdeddea 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,17 @@ MPX Changelog file +== 21.11.06 == +mi: added MPX to miSpriteReportDamage + added id field to miCursorInfoPtr, required to pass through to miDC + core pointer uses mpCursors array as well. + added miDCBufferRec for future use with MPX + +Files: + mi/midispcur.c + mi/misprite.c + mi/mispritest.h + +TAG: MPX_BEFORE_MIDC_API_BREAK + == 20.11.06 == mi: moved core pointer information from miSpriteScreenRec into a diff --git a/mi/midispcur.c b/mi/midispcur.c index de009cbaf..a46331bb4 100644 --- a/mi/midispcur.c +++ b/mi/midispcur.c @@ -52,6 +52,10 @@ in this Software without prior written authorization from The Open Group. # include "picturestr.h" #endif +#ifdef MPX +# include "inputstr.h" +#endif + /* per-screen private data */ static int miDCScreenIndex; @@ -64,12 +68,19 @@ typedef struct { GCPtr pSaveGC, pRestoreGC; GCPtr pMoveGC; GCPtr pPixSourceGC, pPixMaskGC; - CloseScreenProcPtr CloseScreen; PixmapPtr pSave, pTemp; #ifdef ARGB_CURSOR PicturePtr pRootPicture; PicturePtr pTempPicture; #endif +} miDCBufferRec, *miDCBufferPtr; + +typedef struct { + miDCBufferPtr pCoreBuffer; /* for core pointer */ +#ifdef MPX + miDCBufferPtr pMPBuffers; /* for MPX pointers */ +#endif + CloseScreenProcPtr CloseScreen; } miDCScreenRec, *miDCScreenPtr; /* per-cursor per-screen private data */ @@ -131,20 +142,54 @@ miDCInitialize (pScreen, screenFuncs) /* * initialize the entire private structure to zeros */ + pScreenPriv->pCoreBuffer = (miDCBufferPtr)xalloc(sizeof(miDCBufferRec)); - pScreenPriv->pSourceGC = - pScreenPriv->pMaskGC = - pScreenPriv->pSaveGC = - pScreenPriv->pRestoreGC = - pScreenPriv->pMoveGC = - pScreenPriv->pPixSourceGC = - pScreenPriv->pPixMaskGC = NULL; + pScreenPriv->pCoreBuffer->pSourceGC = + pScreenPriv->pCoreBuffer->pMaskGC = + pScreenPriv->pCoreBuffer->pSaveGC = + pScreenPriv->pCoreBuffer->pRestoreGC = + pScreenPriv->pCoreBuffer->pMoveGC = + pScreenPriv->pCoreBuffer->pPixSourceGC = + pScreenPriv->pCoreBuffer->pPixMaskGC = NULL; #ifdef ARGB_CURSOR - pScreenPriv->pRootPicture = NULL; - pScreenPriv->pTempPicture = NULL; + pScreenPriv->pCoreBuffer->pRootPicture = NULL; + pScreenPriv->pCoreBuffer->pTempPicture = NULL; #endif - pScreenPriv->pSave = pScreenPriv->pTemp = NULL; + pScreenPriv->pCoreBuffer->pSave = pScreenPriv->pCoreBuffer->pTemp = NULL; + +#ifdef MPX + { + int mpBufferIdx = 0; + + pScreenPriv->pMPBuffers = (miDCBufferPtr)xalloc(MAX_DEVICES * + sizeof(miDCBufferRec)); + + /* virtual core pointer ID is 1, we might as well use the array */ + xfree(pScreenPriv->pCoreBuffer); + pScreenPriv->pCoreBuffer = &pScreenPriv->pMPBuffers[1]; + + while (mpBufferIdx < MAX_DEVICES) + { + miDCBufferPtr pBuffer = &pScreenPriv->pMPBuffers[mpBufferIdx]; + pBuffer->pSourceGC = + pBuffer->pMaskGC = + pBuffer->pSaveGC = + pBuffer->pRestoreGC = + pBuffer->pMoveGC = + pBuffer->pPixSourceGC = + pBuffer->pPixMaskGC = NULL; +#ifdef ARGB_CURSOR + pBuffer->pRootPicture = NULL; + pBuffer->pTempPicture = NULL; +#endif + + pBuffer->pSave = pBuffer->pTemp = NULL; + + mpBufferIdx++; + } + } +#endif pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = miDCCloseScreen; @@ -172,20 +217,20 @@ miDCCloseScreen (index, pScreen) pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; pScreen->CloseScreen = pScreenPriv->CloseScreen; - tossGC (pScreenPriv->pSourceGC); - tossGC (pScreenPriv->pMaskGC); - tossGC (pScreenPriv->pSaveGC); - tossGC (pScreenPriv->pRestoreGC); - tossGC (pScreenPriv->pMoveGC); - tossGC (pScreenPriv->pPixSourceGC); - tossGC (pScreenPriv->pPixMaskGC); - tossPix (pScreenPriv->pSave); - tossPix (pScreenPriv->pTemp); + tossGC (pScreenPriv->pCoreBuffer->pSourceGC); + tossGC (pScreenPriv->pCoreBuffer->pMaskGC); + tossGC (pScreenPriv->pCoreBuffer->pSaveGC); + tossGC (pScreenPriv->pCoreBuffer->pRestoreGC); + tossGC (pScreenPriv->pCoreBuffer->pMoveGC); + tossGC (pScreenPriv->pCoreBuffer->pPixSourceGC); + tossGC (pScreenPriv->pCoreBuffer->pPixMaskGC); + tossPix (pScreenPriv->pCoreBuffer->pSave); + tossPix (pScreenPriv->pCoreBuffer->pTemp); #ifdef ARGB_CURSOR #if 0 /* This has been free()d before */ tossPict (pScreenPriv->pRootPicture); #endif - tossPict (pScreenPriv->pTempPicture); + tossPict (pScreenPriv->pCoreBuffer->pTempPicture); #endif xfree ((pointer) pScreenPriv); return (*pScreen->CloseScreen) (index, pScreen); @@ -481,12 +526,12 @@ miDCPutUpCursor (pScreen, pCursor, x, y, source, mask) #ifdef ARGB_CURSOR if (pPriv->pPicture) { - if (!EnsurePicture(pScreenPriv->pRootPicture, &pWin->drawable, pWin)) + if (!EnsurePicture(pScreenPriv->pCoreBuffer->pRootPicture, &pWin->drawable, pWin)) return FALSE; CompositePicture (PictOpOver, pPriv->pPicture, NULL, - pScreenPriv->pRootPicture, + pScreenPriv->pCoreBuffer->pRootPicture, 0, 0, 0, 0, x, y, pCursor->bits->width, @@ -495,16 +540,16 @@ miDCPutUpCursor (pScreen, pCursor, x, y, source, mask) else #endif { - if (!EnsureGC(pScreenPriv->pSourceGC, pWin)) + if (!EnsureGC(pScreenPriv->pCoreBuffer->pSourceGC, pWin)) return FALSE; - if (!EnsureGC(pScreenPriv->pMaskGC, pWin)) + if (!EnsureGC(pScreenPriv->pCoreBuffer->pMaskGC, pWin)) { - FreeGC (pScreenPriv->pSourceGC, (GContext) 0); - pScreenPriv->pSourceGC = 0; + FreeGC (pScreenPriv->pCoreBuffer->pSourceGC, (GContext) 0); + pScreenPriv->pCoreBuffer->pSourceGC = 0; return FALSE; } miDCPutBits ((DrawablePtr)pWin, pPriv, - pScreenPriv->pSourceGC, pScreenPriv->pMaskGC, + pScreenPriv->pCoreBuffer->pSourceGC, pScreenPriv->pCoreBuffer->pMaskGC, x, y, pCursor->bits->width, pCursor->bits->height, source, mask); } @@ -522,20 +567,20 @@ miDCSaveUnderCursor (pScreen, x, y, w, h) GCPtr pGC; pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; - pSave = pScreenPriv->pSave; + pSave = pScreenPriv->pCoreBuffer->pSave; pWin = WindowTable[pScreen->myNum]; if (!pSave || pSave->drawable.width < w || pSave->drawable.height < h) { if (pSave) (*pScreen->DestroyPixmap) (pSave); - pScreenPriv->pSave = pSave = + pScreenPriv->pCoreBuffer->pSave = pSave = (*pScreen->CreatePixmap) (pScreen, w, h, pScreen->rootDepth); if (!pSave) return FALSE; } - if (!EnsureGC(pScreenPriv->pSaveGC, pWin)) + if (!EnsureGC(pScreenPriv->pCoreBuffer->pSaveGC, pWin)) return FALSE; - pGC = pScreenPriv->pSaveGC; + pGC = pScreenPriv->pCoreBuffer->pSaveGC; if (pSave->drawable.serialNumber != pGC->serialNumber) ValidateGC ((DrawablePtr) pSave, pGC); (*pGC->ops->CopyArea) ((DrawablePtr) pWin, (DrawablePtr) pSave, pGC, @@ -554,13 +599,13 @@ miDCRestoreUnderCursor (pScreen, x, y, w, h) GCPtr pGC; pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; - pSave = pScreenPriv->pSave; + pSave = pScreenPriv->pCoreBuffer->pSave; pWin = WindowTable[pScreen->myNum]; if (!pSave) return FALSE; - if (!EnsureGC(pScreenPriv->pRestoreGC, pWin)) + if (!EnsureGC(pScreenPriv->pCoreBuffer->pRestoreGC, pWin)) return FALSE; - pGC = pScreenPriv->pRestoreGC; + pGC = pScreenPriv->pCoreBuffer->pRestoreGC; if (pWin->drawable.serialNumber != pGC->serialNumber) ValidateGC ((DrawablePtr) pWin, pGC); (*pGC->ops->CopyArea) ((DrawablePtr) pSave, (DrawablePtr) pWin, pGC, @@ -580,16 +625,16 @@ miDCChangeSave (pScreen, x, y, w, h, dx, dy) int sourcex, sourcey, destx, desty, copyw, copyh; pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; - pSave = pScreenPriv->pSave; + pSave = pScreenPriv->pCoreBuffer->pSave; pWin = WindowTable[pScreen->myNum]; /* * restore the bits which are about to get trashed */ if (!pSave) return FALSE; - if (!EnsureGC(pScreenPriv->pRestoreGC, pWin)) + if (!EnsureGC(pScreenPriv->pCoreBuffer->pRestoreGC, pWin)) return FALSE; - pGC = pScreenPriv->pRestoreGC; + pGC = pScreenPriv->pCoreBuffer->pRestoreGC; if (pWin->drawable.serialNumber != pGC->serialNumber) ValidateGC ((DrawablePtr) pWin, pGC); /* @@ -627,9 +672,9 @@ miDCChangeSave (pScreen, x, y, w, h, dx, dy) (*pGC->ops->CopyArea) ((DrawablePtr) pSave, (DrawablePtr) pWin, pGC, 0, sourcey, -dx, copyh, x + dx, desty); } - if (!EnsureGC(pScreenPriv->pSaveGC, pWin)) + if (!EnsureGC(pScreenPriv->pCoreBuffer->pSaveGC, pWin)) return FALSE; - pGC = pScreenPriv->pSaveGC; + pGC = pScreenPriv->pCoreBuffer->pSaveGC; if (pSave->drawable.serialNumber != pGC->serialNumber) ValidateGC ((DrawablePtr) pSave, pGC); /* @@ -724,39 +769,39 @@ miDCMoveCursor (pScreen, pCursor, x, y, w, h, dx, dy, source, mask) } pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; pWin = WindowTable[pScreen->myNum]; - pTemp = pScreenPriv->pTemp; + pTemp = pScreenPriv->pCoreBuffer->pTemp; if (!pTemp || - pTemp->drawable.width != pScreenPriv->pSave->drawable.width || - pTemp->drawable.height != pScreenPriv->pSave->drawable.height) + pTemp->drawable.width != pScreenPriv->pCoreBuffer->pSave->drawable.width || + pTemp->drawable.height != pScreenPriv->pCoreBuffer->pSave->drawable.height) { if (pTemp) (*pScreen->DestroyPixmap) (pTemp); #ifdef ARGB_CURSOR - if (pScreenPriv->pTempPicture) + if (pScreenPriv->pCoreBuffer->pTempPicture) { - FreePicture (pScreenPriv->pTempPicture, 0); - pScreenPriv->pTempPicture = 0; + FreePicture (pScreenPriv->pCoreBuffer->pTempPicture, 0); + pScreenPriv->pCoreBuffer->pTempPicture = 0; } #endif - pScreenPriv->pTemp = pTemp = (*pScreen->CreatePixmap) - (pScreen, w, h, pScreenPriv->pSave->drawable.depth); + pScreenPriv->pCoreBuffer->pTemp = pTemp = (*pScreen->CreatePixmap) + (pScreen, w, h, pScreenPriv->pCoreBuffer->pSave->drawable.depth); if (!pTemp) return FALSE; } - if (!pScreenPriv->pMoveGC) + if (!pScreenPriv->pCoreBuffer->pMoveGC) { - pScreenPriv->pMoveGC = CreateGC ((DrawablePtr)pTemp, + pScreenPriv->pCoreBuffer->pMoveGC = CreateGC ((DrawablePtr)pTemp, GCGraphicsExposures, &gcval, &status); - if (!pScreenPriv->pMoveGC) + if (!pScreenPriv->pCoreBuffer->pMoveGC) return FALSE; } /* * copy the saved area to a temporary pixmap */ - pGC = pScreenPriv->pMoveGC; + pGC = pScreenPriv->pCoreBuffer->pMoveGC; if (pGC->serialNumber != pTemp->drawable.serialNumber) ValidateGC ((DrawablePtr) pTemp, pGC); - (*pGC->ops->CopyArea)((DrawablePtr)pScreenPriv->pSave, + (*pGC->ops->CopyArea)((DrawablePtr)pScreenPriv->pCoreBuffer->pSave, (DrawablePtr)pTemp, pGC, 0, 0, w, h, 0, 0); /* @@ -765,12 +810,12 @@ miDCMoveCursor (pScreen, pCursor, x, y, w, h, dx, dy, source, mask) #ifdef ARGB_CURSOR if (pPriv->pPicture) { - if (!EnsurePicture(pScreenPriv->pTempPicture, &pTemp->drawable, pWin)) + if (!EnsurePicture(pScreenPriv->pCoreBuffer->pTempPicture, &pTemp->drawable, pWin)) return FALSE; CompositePicture (PictOpOver, pPriv->pPicture, NULL, - pScreenPriv->pTempPicture, + pScreenPriv->pCoreBuffer->pTempPicture, 0, 0, 0, 0, dx, dy, pCursor->bits->width, @@ -779,22 +824,22 @@ miDCMoveCursor (pScreen, pCursor, x, y, w, h, dx, dy, source, mask) else #endif { - if (!pScreenPriv->pPixSourceGC) + if (!pScreenPriv->pCoreBuffer->pPixSourceGC) { - pScreenPriv->pPixSourceGC = CreateGC ((DrawablePtr)pTemp, + pScreenPriv->pCoreBuffer->pPixSourceGC = CreateGC ((DrawablePtr)pTemp, GCGraphicsExposures, &gcval, &status); - if (!pScreenPriv->pPixSourceGC) + if (!pScreenPriv->pCoreBuffer->pPixSourceGC) return FALSE; } - if (!pScreenPriv->pPixMaskGC) + if (!pScreenPriv->pCoreBuffer->pPixMaskGC) { - pScreenPriv->pPixMaskGC = CreateGC ((DrawablePtr)pTemp, + pScreenPriv->pCoreBuffer->pPixMaskGC = CreateGC ((DrawablePtr)pTemp, GCGraphicsExposures, &gcval, &status); - if (!pScreenPriv->pPixMaskGC) + if (!pScreenPriv->pCoreBuffer->pPixMaskGC) return FALSE; } miDCPutBits ((DrawablePtr)pTemp, pPriv, - pScreenPriv->pPixSourceGC, pScreenPriv->pPixMaskGC, + pScreenPriv->pCoreBuffer->pPixSourceGC, pScreenPriv->pCoreBuffer->pPixMaskGC, dx, dy, pCursor->bits->width, pCursor->bits->height, source, mask); } @@ -803,9 +848,9 @@ miDCMoveCursor (pScreen, pCursor, x, y, w, h, dx, dy, source, mask) * copy the temporary pixmap onto the screen */ - if (!EnsureGC(pScreenPriv->pRestoreGC, pWin)) + if (!EnsureGC(pScreenPriv->pCoreBuffer->pRestoreGC, pWin)) return FALSE; - pGC = pScreenPriv->pRestoreGC; + pGC = pScreenPriv->pCoreBuffer->pRestoreGC; if (pWin->drawable.serialNumber != pGC->serialNumber) ValidateGC ((DrawablePtr) pWin, pGC); diff --git a/mi/misprite.c b/mi/misprite.c index 262487861..c9e4174ee 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -158,6 +158,24 @@ miSpriteReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure) SPRITE_DEBUG(("Damage remove\n")); miSpriteRemoveCursor (pScreenPriv->cp, pScreen); } + +#ifdef MPX + { + int mpCursorIdx = 0; + while (mpCursorIdx < MAX_DEVICES) + { + miCursorInfoPtr pMPCursor = &pScreenPriv->mpCursors[mpCursorIdx]; + + if (pMPCursor->isUp && + RECT_IN_REGION (pScreen, pRegion, &pMPCursor->saved) != rgnOUT) + { + SPRITE_DEBUG(("Damage remove MPX\n")); + miSpriteRemoveCursor(pMPCursor, pScreen); + } + mpCursorIdx++; + } + } +#endif } /* @@ -266,6 +284,7 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs) { miCursorInfoPtr cursor = &(pScreenPriv->mpCursors[mpCursorIdx]); + cursor->id = mpCursorIdx; cursor->pCursor = NULL; cursor->x = 0; cursor->y = 0; @@ -285,6 +304,10 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs) mpCursorIdx++; } + + /* virtual core pointer has id 1, we might as well save the memory */ + xfree(pScreenPriv->cp); + pScreenPriv->cp = &(pScreenPriv->mpCursors[1]); #endif return TRUE; diff --git a/mi/mispritest.h b/mi/mispritest.h index e4235345b..ff4bb4a7d 100644 --- a/mi/mispritest.h +++ b/mi/mispritest.h @@ -44,6 +44,7 @@ in this Software without prior written authorization from The Open Group. # include "damage.h" typedef struct { + int id; /* id, corresponds with device id */ CursorPtr pCursor; int x; /* cursor hotspot */ int y; From 1107d8bea22eea26f7b666f1c00a53360b7d237e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 21 Nov 2006 14:00:46 +1030 Subject: [PATCH 012/634] mi: added device ID to miSpriteCursorFuncRec functions added MPX code to midispcur.c BUG: Core pointer changes whenever MPX cursor changes shape. --- Changelog | 12 +++ mi/midispcur.c | 199 ++++++++++++++++++++++++++++++++----------------- mi/misprite.c | 9 ++- mi/misprite.h | 5 ++ 4 files changed, 154 insertions(+), 71 deletions(-) diff --git a/Changelog b/Changelog index e0bdeddea..3477d43ff 100644 --- a/Changelog +++ b/Changelog @@ -12,6 +12,18 @@ Files: TAG: MPX_BEFORE_MIDC_API_BREAK + +mi: added device ID to miSpriteCursorFuncRec functions + added MPX code to midispcur.c + + +Files: + mi/midispcur.c + mi/misprite.c + mi/mispritest.h + +BUG: Core pointer changes whenever MPX cursor changes shape. + == 20.11.06 == mi: moved core pointer information from miSpriteScreenRec into a diff --git a/mi/midispcur.c b/mi/midispcur.c index a46331bb4..8b961d54d 100644 --- a/mi/midispcur.c +++ b/mi/midispcur.c @@ -54,6 +54,10 @@ in this Software without prior written authorization from The Open Group. #ifdef MPX # include "inputstr.h" + + +#define SaneID(a) (a >= 0 && a < MAX_DEVICES) + #endif /* per-screen private data */ @@ -98,18 +102,22 @@ typedef struct { static Bool miDCRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); static Bool miDCUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); -static Bool miDCPutUpCursor(ScreenPtr pScreen, CursorPtr pCursor, - int x, int y, unsigned long source, - unsigned long mask); -static Bool miDCSaveUnderCursor(ScreenPtr pScreen, int x, int y, +static Bool miDCPutUpCursor(int deviceid, ScreenPtr pScreen, + CursorPtr pCursor, int x, int y, + unsigned long source, unsigned long mask); +static Bool miDCSaveUnderCursor(int deviceid, ScreenPtr pScreen, + int x, int y, int w, int h); -static Bool miDCRestoreUnderCursor(ScreenPtr pScreen, int x, int y, +static Bool miDCRestoreUnderCursor(int deviceid, ScreenPtr pScreen, + int x, int y, int w, int h); -static Bool miDCMoveCursor(ScreenPtr pScreen, CursorPtr pCursor, - int x, int y, int w, int h, int dx, int dy, +static Bool miDCMoveCursor(int deviceid, ScreenPtr pScreen, + CursorPtr pCursor, int x, int y, + int w, int h, int dx, int dy, unsigned long source, unsigned long mask); -static Bool miDCChangeSave(ScreenPtr pScreen, int x, int y, int w, int h, - int dx, int dy); +static Bool miDCChangeSave(int deviceid, ScreenPtr pScreen, + int x, int y, int w, int h, + int dx, int dy); static miSpriteCursorFuncRec miDCFuncs = { miDCRealizeCursor, @@ -214,24 +222,42 @@ miDCCloseScreen (index, pScreen) ScreenPtr pScreen; { miDCScreenPtr pScreenPriv; + miDCBufferPtr pBuffer; pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; pScreen->CloseScreen = pScreenPriv->CloseScreen; - tossGC (pScreenPriv->pCoreBuffer->pSourceGC); - tossGC (pScreenPriv->pCoreBuffer->pMaskGC); - tossGC (pScreenPriv->pCoreBuffer->pSaveGC); - tossGC (pScreenPriv->pCoreBuffer->pRestoreGC); - tossGC (pScreenPriv->pCoreBuffer->pMoveGC); - tossGC (pScreenPriv->pCoreBuffer->pPixSourceGC); - tossGC (pScreenPriv->pCoreBuffer->pPixMaskGC); - tossPix (pScreenPriv->pCoreBuffer->pSave); - tossPix (pScreenPriv->pCoreBuffer->pTemp); + pBuffer = pScreenPriv->pCoreBuffer; + +#ifdef MPX + { + int mpBufferIdx = 0; + while (mpBufferIdx < MAX_DEVICES) + { + pBuffer = &pScreenPriv->pMPBuffers[mpBufferIdx]; + +#endif + tossGC (pBuffer->pSourceGC); + tossGC (pBuffer->pMaskGC); + tossGC (pBuffer->pSaveGC); + tossGC (pBuffer->pRestoreGC); + tossGC (pBuffer->pMoveGC); + tossGC (pBuffer->pPixSourceGC); + tossGC (pBuffer->pPixMaskGC); + tossPix (pBuffer->pSave); + tossPix (pBuffer->pTemp); #ifdef ARGB_CURSOR #if 0 /* This has been free()d before */ - tossPict (pScreenPriv->pRootPicture); + tossPict (pScreenPriv->pRootPicture); #endif - tossPict (pScreenPriv->pCoreBuffer->pTempPicture); + tossPict (pBuffer->pTempPicture); #endif + +#ifdef MPX + mpBufferIdx++; + } + } +#endif + xfree ((pointer) pScreenPriv); return (*pScreen->CloseScreen) (index, pScreen); } @@ -504,7 +530,8 @@ miDCMakeGC( static Bool -miDCPutUpCursor (pScreen, pCursor, x, y, source, mask) +miDCPutUpCursor (deviceid, pScreen, pCursor, x, y, source, mask) + int deviceid; ScreenPtr pScreen; CursorPtr pCursor; int x, y; @@ -512,6 +539,7 @@ miDCPutUpCursor (pScreen, pCursor, x, y, source, mask) { miDCScreenPtr pScreenPriv; miDCCursorPtr pPriv; + miDCBufferPtr pBuffer; WindowPtr pWin; pPriv = (miDCCursorPtr) pCursor->bits->devPriv[pScreen->myNum]; @@ -523,15 +551,22 @@ miDCPutUpCursor (pScreen, pCursor, x, y, source, mask) } pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; pWin = WindowTable[pScreen->myNum]; + pBuffer = pScreenPriv->pCoreBuffer; + +#ifdef MPX + if (SaneID(deviceid)) + pBuffer = &pScreenPriv->pMPBuffers[deviceid]; +#endif + #ifdef ARGB_CURSOR if (pPriv->pPicture) { - if (!EnsurePicture(pScreenPriv->pCoreBuffer->pRootPicture, &pWin->drawable, pWin)) + if (!EnsurePicture(pBuffer->pRootPicture, &pWin->drawable, pWin)) return FALSE; CompositePicture (PictOpOver, pPriv->pPicture, NULL, - pScreenPriv->pCoreBuffer->pRootPicture, + pBuffer->pRootPicture, 0, 0, 0, 0, x, y, pCursor->bits->width, @@ -540,16 +575,16 @@ miDCPutUpCursor (pScreen, pCursor, x, y, source, mask) else #endif { - if (!EnsureGC(pScreenPriv->pCoreBuffer->pSourceGC, pWin)) + if (!EnsureGC(pBuffer->pSourceGC, pWin)) return FALSE; - if (!EnsureGC(pScreenPriv->pCoreBuffer->pMaskGC, pWin)) + if (!EnsureGC(pBuffer->pMaskGC, pWin)) { - FreeGC (pScreenPriv->pCoreBuffer->pSourceGC, (GContext) 0); - pScreenPriv->pCoreBuffer->pSourceGC = 0; + FreeGC (pBuffer->pSourceGC, (GContext) 0); + pBuffer->pSourceGC = 0; return FALSE; } miDCPutBits ((DrawablePtr)pWin, pPriv, - pScreenPriv->pCoreBuffer->pSourceGC, pScreenPriv->pCoreBuffer->pMaskGC, + pBuffer->pSourceGC, pBuffer->pMaskGC, x, y, pCursor->bits->width, pCursor->bits->height, source, mask); } @@ -557,30 +592,37 @@ miDCPutUpCursor (pScreen, pCursor, x, y, source, mask) } static Bool -miDCSaveUnderCursor (pScreen, x, y, w, h) +miDCSaveUnderCursor (deviceid, pScreen, x, y, w, h) + int deviceid; ScreenPtr pScreen; int x, y, w, h; { miDCScreenPtr pScreenPriv; + miDCBufferPtr pBuffer; PixmapPtr pSave; WindowPtr pWin; GCPtr pGC; pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; - pSave = pScreenPriv->pCoreBuffer->pSave; + pBuffer = pScreenPriv->pCoreBuffer; +#ifdef MPX + if (SaneID(deviceid)) + pBuffer = &pScreenPriv->pMPBuffers[deviceid]; +#endif + pSave = pBuffer->pSave; pWin = WindowTable[pScreen->myNum]; if (!pSave || pSave->drawable.width < w || pSave->drawable.height < h) { if (pSave) (*pScreen->DestroyPixmap) (pSave); - pScreenPriv->pCoreBuffer->pSave = pSave = + pBuffer->pSave = pSave = (*pScreen->CreatePixmap) (pScreen, w, h, pScreen->rootDepth); if (!pSave) return FALSE; } - if (!EnsureGC(pScreenPriv->pCoreBuffer->pSaveGC, pWin)) + if (!EnsureGC(pBuffer->pSaveGC, pWin)) return FALSE; - pGC = pScreenPriv->pCoreBuffer->pSaveGC; + pGC = pBuffer->pSaveGC; if (pSave->drawable.serialNumber != pGC->serialNumber) ValidateGC ((DrawablePtr) pSave, pGC); (*pGC->ops->CopyArea) ((DrawablePtr) pWin, (DrawablePtr) pSave, pGC, @@ -589,23 +631,30 @@ miDCSaveUnderCursor (pScreen, x, y, w, h) } static Bool -miDCRestoreUnderCursor (pScreen, x, y, w, h) +miDCRestoreUnderCursor (deviceid, pScreen, x, y, w, h) + int deviceid; ScreenPtr pScreen; int x, y, w, h; { miDCScreenPtr pScreenPriv; + miDCBufferPtr pBuffer; PixmapPtr pSave; WindowPtr pWin; GCPtr pGC; pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; - pSave = pScreenPriv->pCoreBuffer->pSave; + pBuffer = pScreenPriv->pCoreBuffer; +#ifdef MPX + if (SaneID(deviceid)) + pBuffer = &pScreenPriv->pMPBuffers[deviceid]; +#endif + pSave = pBuffer->pSave; pWin = WindowTable[pScreen->myNum]; if (!pSave) return FALSE; - if (!EnsureGC(pScreenPriv->pCoreBuffer->pRestoreGC, pWin)) + if (!EnsureGC(pBuffer->pRestoreGC, pWin)) return FALSE; - pGC = pScreenPriv->pCoreBuffer->pRestoreGC; + pGC = pBuffer->pRestoreGC; if (pWin->drawable.serialNumber != pGC->serialNumber) ValidateGC ((DrawablePtr) pWin, pGC); (*pGC->ops->CopyArea) ((DrawablePtr) pSave, (DrawablePtr) pWin, pGC, @@ -614,27 +663,34 @@ miDCRestoreUnderCursor (pScreen, x, y, w, h) } static Bool -miDCChangeSave (pScreen, x, y, w, h, dx, dy) +miDCChangeSave (deviceid, pScreen, x, y, w, h, dx, dy) + int deviceid; ScreenPtr pScreen; int x, y, w, h, dx, dy; { miDCScreenPtr pScreenPriv; + miDCBufferPtr pBuffer; PixmapPtr pSave; WindowPtr pWin; GCPtr pGC; int sourcex, sourcey, destx, desty, copyw, copyh; pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; - pSave = pScreenPriv->pCoreBuffer->pSave; + pBuffer = pScreenPriv->pCoreBuffer; +#ifdef MPX + if (SaneID(deviceid)) + pBuffer = &pScreenPriv->pMPBuffers[deviceid]; +#endif + pSave = pBuffer->pSave; pWin = WindowTable[pScreen->myNum]; /* * restore the bits which are about to get trashed */ if (!pSave) return FALSE; - if (!EnsureGC(pScreenPriv->pCoreBuffer->pRestoreGC, pWin)) + if (!EnsureGC(pBuffer->pRestoreGC, pWin)) return FALSE; - pGC = pScreenPriv->pCoreBuffer->pRestoreGC; + pGC = pBuffer->pRestoreGC; if (pWin->drawable.serialNumber != pGC->serialNumber) ValidateGC ((DrawablePtr) pWin, pGC); /* @@ -672,9 +728,9 @@ miDCChangeSave (pScreen, x, y, w, h, dx, dy) (*pGC->ops->CopyArea) ((DrawablePtr) pSave, (DrawablePtr) pWin, pGC, 0, sourcey, -dx, copyh, x + dx, desty); } - if (!EnsureGC(pScreenPriv->pCoreBuffer->pSaveGC, pWin)) + if (!EnsureGC(pBuffer->pSaveGC, pWin)) return FALSE; - pGC = pScreenPriv->pCoreBuffer->pSaveGC; + pGC = pBuffer->pSaveGC; if (pSave->drawable.serialNumber != pGC->serialNumber) ValidateGC ((DrawablePtr) pSave, pGC); /* @@ -746,7 +802,8 @@ miDCChangeSave (pScreen, x, y, w, h, dx, dy) } static Bool -miDCMoveCursor (pScreen, pCursor, x, y, w, h, dx, dy, source, mask) +miDCMoveCursor (deviceid, pScreen, pCursor, x, y, w, h, dx, dy, source, mask) + int deviceid; ScreenPtr pScreen; CursorPtr pCursor; int x, y, w, h, dx, dy; @@ -754,6 +811,7 @@ miDCMoveCursor (pScreen, pCursor, x, y, w, h, dx, dy, source, mask) { miDCCursorPtr pPriv; miDCScreenPtr pScreenPriv; + miDCBufferPtr pBuffer; int status; WindowPtr pWin; GCPtr pGC; @@ -769,39 +827,44 @@ miDCMoveCursor (pScreen, pCursor, x, y, w, h, dx, dy, source, mask) } pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; pWin = WindowTable[pScreen->myNum]; - pTemp = pScreenPriv->pCoreBuffer->pTemp; + pBuffer = pScreenPriv->pCoreBuffer; +#ifdef MPX + if (SaneID(deviceid)) + pBuffer = &pScreenPriv->pMPBuffers[deviceid]; +#endif + pTemp = pBuffer->pTemp; if (!pTemp || - pTemp->drawable.width != pScreenPriv->pCoreBuffer->pSave->drawable.width || - pTemp->drawable.height != pScreenPriv->pCoreBuffer->pSave->drawable.height) + pTemp->drawable.width != pBuffer->pSave->drawable.width || + pTemp->drawable.height != pBuffer->pSave->drawable.height) { if (pTemp) (*pScreen->DestroyPixmap) (pTemp); #ifdef ARGB_CURSOR - if (pScreenPriv->pCoreBuffer->pTempPicture) + if (pBuffer->pTempPicture) { - FreePicture (pScreenPriv->pCoreBuffer->pTempPicture, 0); - pScreenPriv->pCoreBuffer->pTempPicture = 0; + FreePicture (pBuffer->pTempPicture, 0); + pBuffer->pTempPicture = 0; } #endif - pScreenPriv->pCoreBuffer->pTemp = pTemp = (*pScreen->CreatePixmap) - (pScreen, w, h, pScreenPriv->pCoreBuffer->pSave->drawable.depth); + pBuffer->pTemp = pTemp = (*pScreen->CreatePixmap) + (pScreen, w, h, pBuffer->pSave->drawable.depth); if (!pTemp) return FALSE; } - if (!pScreenPriv->pCoreBuffer->pMoveGC) + if (!pBuffer->pMoveGC) { - pScreenPriv->pCoreBuffer->pMoveGC = CreateGC ((DrawablePtr)pTemp, + pBuffer->pMoveGC = CreateGC ((DrawablePtr)pTemp, GCGraphicsExposures, &gcval, &status); - if (!pScreenPriv->pCoreBuffer->pMoveGC) + if (!pBuffer->pMoveGC) return FALSE; } /* * copy the saved area to a temporary pixmap */ - pGC = pScreenPriv->pCoreBuffer->pMoveGC; + pGC = pBuffer->pMoveGC; if (pGC->serialNumber != pTemp->drawable.serialNumber) ValidateGC ((DrawablePtr) pTemp, pGC); - (*pGC->ops->CopyArea)((DrawablePtr)pScreenPriv->pCoreBuffer->pSave, + (*pGC->ops->CopyArea)((DrawablePtr)pBuffer->pSave, (DrawablePtr)pTemp, pGC, 0, 0, w, h, 0, 0); /* @@ -810,12 +873,12 @@ miDCMoveCursor (pScreen, pCursor, x, y, w, h, dx, dy, source, mask) #ifdef ARGB_CURSOR if (pPriv->pPicture) { - if (!EnsurePicture(pScreenPriv->pCoreBuffer->pTempPicture, &pTemp->drawable, pWin)) + if (!EnsurePicture(pBuffer->pTempPicture, &pTemp->drawable, pWin)) return FALSE; CompositePicture (PictOpOver, pPriv->pPicture, NULL, - pScreenPriv->pCoreBuffer->pTempPicture, + pBuffer->pTempPicture, 0, 0, 0, 0, dx, dy, pCursor->bits->width, @@ -824,22 +887,22 @@ miDCMoveCursor (pScreen, pCursor, x, y, w, h, dx, dy, source, mask) else #endif { - if (!pScreenPriv->pCoreBuffer->pPixSourceGC) + if (!pBuffer->pPixSourceGC) { - pScreenPriv->pCoreBuffer->pPixSourceGC = CreateGC ((DrawablePtr)pTemp, + pBuffer->pPixSourceGC = CreateGC ((DrawablePtr)pTemp, GCGraphicsExposures, &gcval, &status); - if (!pScreenPriv->pCoreBuffer->pPixSourceGC) + if (!pBuffer->pPixSourceGC) return FALSE; } - if (!pScreenPriv->pCoreBuffer->pPixMaskGC) + if (!pBuffer->pPixMaskGC) { - pScreenPriv->pCoreBuffer->pPixMaskGC = CreateGC ((DrawablePtr)pTemp, + pBuffer->pPixMaskGC = CreateGC ((DrawablePtr)pTemp, GCGraphicsExposures, &gcval, &status); - if (!pScreenPriv->pCoreBuffer->pPixMaskGC) + if (!pBuffer->pPixMaskGC) return FALSE; } miDCPutBits ((DrawablePtr)pTemp, pPriv, - pScreenPriv->pCoreBuffer->pPixSourceGC, pScreenPriv->pCoreBuffer->pPixMaskGC, + pBuffer->pPixSourceGC, pBuffer->pPixMaskGC, dx, dy, pCursor->bits->width, pCursor->bits->height, source, mask); } @@ -848,9 +911,9 @@ miDCMoveCursor (pScreen, pCursor, x, y, w, h, dx, dy, source, mask) * copy the temporary pixmap onto the screen */ - if (!EnsureGC(pScreenPriv->pCoreBuffer->pRestoreGC, pWin)) + if (!EnsureGC(pBuffer->pRestoreGC, pWin)) return FALSE; - pGC = pScreenPriv->pCoreBuffer->pRestoreGC; + pGC = pBuffer->pRestoreGC; if (pWin->drawable.serialNumber != pGC->serialNumber) ValidateGC ((DrawablePtr) pWin, pGC); diff --git a/mi/misprite.c b/mi/misprite.c index c9e4174ee..81e51edcb 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -1084,7 +1084,8 @@ miSpriteRemoveCursor (pDevCursor, pScreen) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; miSpriteIsUpFALSE (pDevCursor, pScreen, pScreenPriv); pDevCursor->pCacheWin = NullWindow; - if (!(*pScreenPriv->funcs->RestoreUnderCursor) (pScreen, + if (!(*pScreenPriv->funcs->RestoreUnderCursor) (pDevCursor->id, + pScreen, pDevCursor->saved.x1, pDevCursor->saved.y1, pDevCursor->saved.x2 - @@ -1117,7 +1118,8 @@ miSpriteRestoreCursor (pDevCursor, pScreen) pCursor = pDevCursor->pCursor; x = pDevCursor->x - (int)pCursor->bits->xhot; y = pDevCursor->y - (int)pCursor->bits->yhot; - if ((*pScreenPriv->funcs->SaveUnderCursor) (pScreen, + if ((*pScreenPriv->funcs->SaveUnderCursor) (pDevCursor->id, + pScreen, pDevCursor->saved.x1, pDevCursor->saved.y1, pDevCursor->saved.x2 - @@ -1127,7 +1129,8 @@ miSpriteRestoreCursor (pDevCursor, pScreen) { if (pDevCursor->checkPixels) miSpriteFindColors (pDevCursor, pScreen); - if ((*pScreenPriv->funcs->PutUpCursor) (pScreen, pCursor, x, y, + if ((*pScreenPriv->funcs->PutUpCursor) (pDevCursor->id, pScreen, + pCursor, x, y, pDevCursor->colors[SOURCE_COLOR].pixel, pDevCursor->colors[MASK_COLOR].pixel)) { diff --git a/mi/misprite.h b/mi/misprite.h index 5173b7736..e0c55d09b 100644 --- a/mi/misprite.h +++ b/mi/misprite.h @@ -42,6 +42,7 @@ typedef struct { CursorPtr /*pCursor*/ ); Bool (*PutUpCursor)( + int /* deviceid */, ScreenPtr /*pScreen*/, CursorPtr /*pCursor*/, int /*x*/, @@ -50,6 +51,7 @@ typedef struct { unsigned long /*mask*/ ); Bool (*SaveUnderCursor)( + int /* deviceid */, ScreenPtr /*pScreen*/, int /*x*/, int /*y*/, @@ -57,6 +59,7 @@ typedef struct { int /*h*/ ); Bool (*RestoreUnderCursor)( + int /* deviceid */, ScreenPtr /*pScreen*/, int /*x*/, int /*y*/, @@ -64,6 +67,7 @@ typedef struct { int /*h*/ ); Bool (*MoveCursor)( + int /* deviceid */, ScreenPtr /*pScreen*/, CursorPtr /*pCursor*/, int /*x*/, @@ -76,6 +80,7 @@ typedef struct { unsigned long /*mask*/ ); Bool (*ChangeSave)( + int /* deviceid */, ScreenPtr /*pScreen*/, int /*x*/, int /*y*/, From 447efdc01d4f8922205ba26e52c9e5ff9f5cb90e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 21 Nov 2006 14:46:00 +1030 Subject: [PATCH 013/634] mi: constrain MPX cursors to screen --- Changelog | 8 ++++++++ dix/events.c | 15 +++++++++++++-- include/scrnintstr.h | 1 + mi/mipointer.c | 15 ++++++++++++--- 4 files changed, 34 insertions(+), 5 deletions(-) diff --git a/Changelog b/Changelog index 3477d43ff..80e1846a8 100644 --- a/Changelog +++ b/Changelog @@ -24,6 +24,14 @@ Files: BUG: Core pointer changes whenever MPX cursor changes shape. + +mi: constrain MPX cursors to screen + +Files: + dix/events.c + mi/mipointer.c + include/scrnintstr.h + == 20.11.06 == mi: moved core pointer information from miSpriteScreenRec into a diff --git a/dix/events.c b/dix/events.c index f50e246e0..4c33fd49e 100644 --- a/dix/events.c +++ b/dix/events.c @@ -392,7 +392,7 @@ XineramaConstrainCursor(void) newBox.y1 += panoramiXdataPtr[0].y - panoramiXdataPtr[pScreen->myNum].y; newBox.y2 += panoramiXdataPtr[0].y - panoramiXdataPtr[pScreen->myNum].y; - (* pScreen->ConstrainCursor)(pScreen, &newBox); + (* pScreen->ConstrainCursor)(inputInfo.pointer, pScreen, &newBox); } static void @@ -735,7 +735,7 @@ CheckPhysLimits( (*pScreen->CursorLimits) (pScreen, cursor, &sprite.hotLimits, &sprite.physLimits); sprite.confined = confineToScreen; - (* pScreen->ConstrainCursor)(pScreen, &sprite.physLimits); + (* pScreen->ConstrainCursor)(inputInfo.pointer, pScreen, &sprite.physLimits); if (new.x < sprite.physLimits.x1) new.x = sprite.physLimits.x1; else @@ -2118,7 +2118,18 @@ DefineInitialRootWindow(register WindowPtr win) (*pScreen->CursorLimits) ( pScreen, sprite.current, &sprite.hotLimits, &sprite.physLimits); sprite.confined = FALSE; +#ifdef MPX + { + DeviceIntPtr pDev = inputInfo.devices; + while(pDev) + { + (*pScreen->ConstrainCursor) (pDev, pScreen, &sprite.physLimits); + pDev = pDev->next; + } + } +#else (*pScreen->ConstrainCursor) (pScreen, &sprite.physLimits); +#endif (*pScreen->SetCursorPosition) (pScreen, sprite.hot.x, sprite.hot.y, FALSE); (*pScreen->DisplayCursor) (pScreen, sprite.current); diff --git a/include/scrnintstr.h b/include/scrnintstr.h index 36135153f..4fa2919df 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -257,6 +257,7 @@ typedef Bool (* UnrealizeFontProcPtr)( FontPtr /*pFont*/); typedef void (* ConstrainCursorProcPtr)( + DeviceIntPtr /*pDev*/, ScreenPtr /*pScreen*/, BoxPtr /*pBox*/); diff --git a/mi/mipointer.c b/mi/mipointer.c index 8f049c48e..d3f5a5471 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -83,8 +83,10 @@ IsMPDev(DeviceIntPtr pDev) static Bool miPointerRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); static Bool miPointerUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); static Bool miPointerDisplayCursor(ScreenPtr pScreen, CursorPtr pCursor); -static void miPointerConstrainCursor(ScreenPtr pScreen, BoxPtr pBox); -static void miPointerPointerNonInterestBox(ScreenPtr pScreen, BoxPtr pBox); +static void miPointerConstrainCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + BoxPtr pBox); +static void miPointerPointerNonInterestBox(ScreenPtr + pScreen, BoxPtr pBox); static void miPointerCursorLimits(ScreenPtr pScreen, CursorPtr pCursor, BoxPtr pHotBox, BoxPtr pTopLeftBox); static Bool miPointerSetCursorPosition(ScreenPtr pScreen, int x, int y, @@ -254,10 +256,17 @@ miPointerDisplayCursor (pScreen, pCursor) } static void -miPointerConstrainCursor (pScreen, pBox) +miPointerConstrainCursor (pDev, pScreen, pBox) + DeviceIntPtr pDev; ScreenPtr pScreen; BoxPtr pBox; { +#ifdef MPX + if (IsMPDev(pDev)) + { + miMPPointers[pDev->id].limits = *pBox; + } +#endif miPointer.limits = *pBox; miPointer.confined = PointerConfinedToScreen(); } From fd8b9a6eaee28a453a00af14195b81ef1890a577 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 21 Nov 2006 15:24:43 +1030 Subject: [PATCH 014/634] TAG: MPX_BEFORE_DIX_API_BREAK --- Changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changelog b/Changelog index 80e1846a8..18bbeb473 100644 --- a/Changelog +++ b/Changelog @@ -32,6 +32,8 @@ Files: mi/mipointer.c include/scrnintstr.h +TAG: MPX_BEFORE_DIX_API_BREAK + == 20.11.06 == mi: moved core pointer information from miSpriteScreenRec into a From 9db851c22d4befb95bfb074b96620261d8e32ac9 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 21 Nov 2006 18:15:04 +1030 Subject: [PATCH 015/634] dix: moved sprite from static to be pointer of type SpritePtr added SpriteRecs for MPX devices changed sprite dependency and added MPX functionality to parts of events.c (ConfineToShape, PostNewCursor, XineramaCheckMotion, CheckMotion, XineramaChangeToCursor, ChangeToCursor, CheckPhysLimits, PointerConfinedToScreen) added DeviceIntRec param to GetSpritePosition(). This required some minor changes in ddx, xtest, xkb and xfixes. mi: changed miPointer to pointer instead of static struct. --- Changelog | 24 ++ Xext/xtest.c | 2 +- Xi/exevents.c | 6 +- dix/events.c | 904 +++++++++++++++++++++++++++-------------------- include/cursor.h | 5 +- mi/mieq.c | 14 +- mi/mipointer.c | 192 +++++----- xfixes/cursor.c | 4 +- xkb/ddxDevBtn.c | 2 +- xkb/ddxFakeBtn.c | 2 +- xkb/ddxFakeMtn.c | 2 +- xkb/xkbActions.c | 2 +- 12 files changed, 658 insertions(+), 501 deletions(-) diff --git a/Changelog b/Changelog index 18bbeb473..d872517fe 100644 --- a/Changelog +++ b/Changelog @@ -34,6 +34,30 @@ Files: TAG: MPX_BEFORE_DIX_API_BREAK + + +dix: moved sprite from static to be pointer of type SpritePtr + added SpriteRecs for MPX devices + changed sprite dependency and added MPX functionality to parts + of events.c (ConfineToShape, PostNewCursor, XineramaCheckMotion, + CheckMotion, XineramaChangeToCursor, ChangeToCursor, CheckPhysLimits, + PointerConfinedToScreen) + added DeviceIntRec param to GetSpritePosition(). This required some + minor changes in ddx, xtest, xkb and xfixes. + +mi: changed miPointer to pointer instead of static struct. + +Files: + dix/events.c + dix/exevents.c + Xext/xtest.c + ddx/ddxFakeBtn.c + ddx/ddxFakeMtn.c + ddx/ddxDevBtn.c + xkb/xkbActions.c + xfixes/cursor.c + mi/mieq.c + == 20.11.06 == mi: moved core pointer information from miSpriteScreenRec into a diff --git a/Xext/xtest.c b/Xext/xtest.c index 83f8b8cc6..18111c0df 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -379,7 +379,7 @@ ProcXTestFakeInput(client) if (ev->u.u.detail == xTrue) { int x, y; - GetSpritePosition(&x, &y); + GetSpritePosition(inputInfo.pointer, &x, &y); ev->u.keyButtonPointer.rootX += x; ev->u.keyButtonPointer.rootY += y; } diff --git a/Xi/exevents.c b/Xi/exevents.c index 92a5f0599..7f7e12886 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -119,13 +119,17 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count) deviceValuator *xV = (deviceValuator *) xE; if (xE->u.u.type != DeviceValuator) { - GetSpritePosition(&rootX, &rootY); + GetSpritePosition(other, &rootX, &rootY); xE->u.keyButtonPointer.rootX = rootX; xE->u.keyButtonPointer.rootY = rootY; key = xE->u.u.detail; NoticeEventTime(xE); xE->u.keyButtonPointer.state = inputInfo.keyboard->key->state | +#ifdef MPX + other->button->state; +#else inputInfo.pointer->button->state; +#endif bit = 1 << (key & 7); } if (DeviceEventCallback) { diff --git a/dix/events.c b/dix/events.c index 4c33fd49e..2def70465 100644 --- a/dix/events.c +++ b/dix/events.c @@ -236,7 +236,7 @@ static WindowPtr *spriteTrace = (WindowPtr *)NULL; static int spriteTraceSize = 0; static int spriteTraceGood; -static struct { +typedef struct { CursorPtr current; BoxRec hotLimits; /* logical constraints of hot spot */ Bool confined; /* confined to screen */ @@ -254,7 +254,15 @@ static struct { WindowPtr windows[MAXSCREENS]; WindowPtr confineWin; /* confine window */ #endif -} sprite; /* info about the cursor sprite */ +} SpriteRec, *SpritePtr; + +static SpritePtr sprite; /* info about the cursor sprite */ + +#ifdef MPX +static SpritePtr mpsprites; /* info about the MPX sprites */ + +extern BOOL IsMPDev(DeviceIntPtr dev); +#endif #ifdef XEVIE _X_EXPORT WindowPtr xeviewin; @@ -326,12 +334,12 @@ static CARD8 criticalEvents[32] = }; #ifdef PANORAMIX -static void ConfineToShape(RegionPtr shape, int *px, int *py); -static void PostNewCursor(void); +static void ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py); +static void PostNewCursor(DeviceIntPtr pDev); #define SyntheticMotion(x, y) \ PostSyntheticMotion(x, y, noPanoramiXExtension ? 0 : \ - sprite.screen->myNum, \ + sprite->screen->myNum, \ syncEvents.playingEvents ? \ syncEvents.time.milliseconds : \ currentTime.milliseconds); @@ -350,7 +358,7 @@ XineramaSetCursorPosition( to send the message too and what the coordinates relative to that screen are. */ - pScreen = sprite.screen; + pScreen = sprite->screen; x += panoramiXdataPtr[0].x; y += panoramiXdataPtr[0].y; @@ -369,9 +377,9 @@ XineramaSetCursorPosition( } } - sprite.screen = pScreen; - sprite.hotPhys.x = x - panoramiXdataPtr[0].x; - sprite.hotPhys.y = y - panoramiXdataPtr[0].y; + sprite->screen = pScreen; + sprite->hotPhys.x = x - panoramiXdataPtr[0].x; + sprite->hotPhys.y = y - panoramiXdataPtr[0].y; x -= panoramiXdataPtr[pScreen->myNum].x; y -= panoramiXdataPtr[pScreen->myNum].y; @@ -382,8 +390,8 @@ XineramaSetCursorPosition( static void XineramaConstrainCursor(void) { - ScreenPtr pScreen = sprite.screen; - BoxRec newBox = sprite.physLimits; + ScreenPtr pScreen = sprite->screen; + BoxRec newBox = sprite->physLimits; /* Translate the constraining box to the screen the sprite is actually on */ @@ -405,27 +413,27 @@ XineramaCheckPhysLimits( if (!cursor) return; - new = sprite.hotPhys; + new = sprite->hotPhys; /* I don't care what the DDX has to say about it */ - sprite.physLimits = sprite.hotLimits; + sprite->physLimits = sprite->hotLimits; /* constrain the pointer to those limits */ - if (new.x < sprite.physLimits.x1) - new.x = sprite.physLimits.x1; + if (new.x < sprite->physLimits.x1) + new.x = sprite->physLimits.x1; else - if (new.x >= sprite.physLimits.x2) - new.x = sprite.physLimits.x2 - 1; - if (new.y < sprite.physLimits.y1) - new.y = sprite.physLimits.y1; + if (new.x >= sprite->physLimits.x2) + new.x = sprite->physLimits.x2 - 1; + if (new.y < sprite->physLimits.y1) + new.y = sprite->physLimits.y1; else - if (new.y >= sprite.physLimits.y2) - new.y = sprite.physLimits.y2 - 1; + if (new.y >= sprite->physLimits.y2) + new.y = sprite->physLimits.y2 - 1; - if (sprite.hotShape) /* more work if the shape is a mess */ - ConfineToShape(sprite.hotShape, &new.x, &new.y); + if (sprite->hotShape) /* more work if the shape is a mess */ + ConfineToShape(inputInfo.pointer, sprite->hotShape, &new.x, &new.y); - if((new.x != sprite.hotPhys.x) || (new.y != sprite.hotPhys.y)) + if((new.x != sprite->hotPhys.x) || (new.y != sprite->hotPhys.y)) { XineramaSetCursorPosition (new.x, new.y, generateEvents); if (!generateEvents) @@ -441,7 +449,7 @@ static Bool XineramaSetWindowPntrs(WindowPtr pWin) { if(pWin == WindowTable[0]) { - memcpy(sprite.windows, WindowTable, + memcpy(sprite->windows, WindowTable, PanoramiXNumScreens*sizeof(WindowPtr)); } else { PanoramiXRes *win; @@ -453,8 +461,8 @@ XineramaSetWindowPntrs(WindowPtr pWin) return FALSE; for(i = 0; i < PanoramiXNumScreens; i++) { - sprite.windows[i] = LookupIDByType(win->info[i].id, RT_WINDOW); - if(!sprite.windows[i]) /* window is being unmapped */ + sprite->windows[i] = LookupIDByType(win->info[i].id, RT_WINDOW); + if(!sprite->windows[i]) /* window is being unmapped */ return FALSE; } } @@ -469,9 +477,9 @@ XineramaCheckVirtualMotion( if (qe) { - sprite.hot.pScreen = qe->pScreen; /* should always be Screen 0 */ - sprite.hot.x = qe->event->u.keyButtonPointer.rootX; - sprite.hot.y = qe->event->u.keyButtonPointer.rootY; + sprite->hot.pScreen = qe->pScreen; /* should always be Screen 0 */ + sprite->hot.x = qe->event->u.keyButtonPointer.rootX; + sprite->hot.y = qe->event->u.keyButtonPointer.rootY; pWin = inputInfo.pointer->grab ? inputInfo.pointer->grab->confineTo : NullWindow; } @@ -485,8 +493,8 @@ XineramaCheckVirtualMotion( i = PanoramiXNumScreens - 1; - REGION_COPY(sprite.screen, &sprite.Reg2, - &sprite.windows[i]->borderSize); + REGION_COPY(sprite->screen, &sprite->Reg2, + &sprite->windows[i]->borderSize); off_x = panoramiXdataPtr[i].x; off_y = panoramiXdataPtr[i].y; @@ -495,97 +503,105 @@ XineramaCheckVirtualMotion( y = off_y - panoramiXdataPtr[i].y; if(x || y) - REGION_TRANSLATE(sprite.screen, &sprite.Reg2, x, y); + REGION_TRANSLATE(sprite->screen, &sprite->Reg2, x, y); - REGION_UNION(sprite.screen, &sprite.Reg2, &sprite.Reg2, - &sprite.windows[i]->borderSize); + REGION_UNION(sprite->screen, &sprite->Reg2, &sprite->Reg2, + &sprite->windows[i]->borderSize); off_x = panoramiXdataPtr[i].x; off_y = panoramiXdataPtr[i].y; } - lims = *REGION_EXTENTS(sprite.screen, &sprite.Reg2); + lims = *REGION_EXTENTS(sprite->screen, &sprite->Reg2); - if (sprite.hot.x < lims.x1) - sprite.hot.x = lims.x1; - else if (sprite.hot.x >= lims.x2) - sprite.hot.x = lims.x2 - 1; - if (sprite.hot.y < lims.y1) - sprite.hot.y = lims.y1; - else if (sprite.hot.y >= lims.y2) - sprite.hot.y = lims.y2 - 1; + if (sprite->hot.x < lims.x1) + sprite->hot.x = lims.x1; + else if (sprite->hot.x >= lims.x2) + sprite->hot.x = lims.x2 - 1; + if (sprite->hot.y < lims.y1) + sprite->hot.y = lims.y1; + else if (sprite->hot.y >= lims.y2) + sprite->hot.y = lims.y2 - 1; - if (REGION_NUM_RECTS(&sprite.Reg2) > 1) - ConfineToShape(&sprite.Reg2, &sprite.hot.x, &sprite.hot.y); + if (REGION_NUM_RECTS(&sprite->Reg2) > 1) + ConfineToShape(inputInfo.pointer, &sprite->Reg2, &sprite->hot.x, &sprite->hot.y); if (qe) { - qe->pScreen = sprite.hot.pScreen; - qe->event->u.keyButtonPointer.rootX = sprite.hot.x; - qe->event->u.keyButtonPointer.rootY = sprite.hot.y; + qe->pScreen = sprite->hot.pScreen; + qe->event->u.keyButtonPointer.rootX = sprite->hot.x; + qe->event->u.keyButtonPointer.rootY = sprite->hot.y; } } #ifdef XEVIE - xeviehot.x = sprite.hot.x; - xeviehot.y = sprite.hot.y; + xeviehot.x = sprite->hot.x; + xeviehot.y = sprite->hot.y; #endif } static Bool -XineramaCheckMotion(xEvent *xE) +XineramaCheckMotion(xEvent *xE, DeviceIntPtr pDev) { - WindowPtr prevSpriteWin = sprite.win; + WindowPtr prevSpriteWin; + SpritePtr pSprite = sprite; + +#ifdef MPX + if (IsMPDev(pDev)) + pSprite = &mpsprites[pDev->id]; +#endif + + prevSpriteWin = pSprite->win; if (xE && !syncEvents.playingEvents) { /* Motion events entering DIX get translated to Screen 0 coordinates. Replayed events have already been translated since they've entered DIX before */ - XE_KBPTR.rootX += panoramiXdataPtr[sprite.screen->myNum].x - + XE_KBPTR.rootX += panoramiXdataPtr[pSprite->screen->myNum].x - panoramiXdataPtr[0].x; - XE_KBPTR.rootY += panoramiXdataPtr[sprite.screen->myNum].y - + XE_KBPTR.rootY += panoramiXdataPtr[pSprite->screen->myNum].y - panoramiXdataPtr[0].y; - sprite.hot.x = XE_KBPTR.rootX; - sprite.hot.y = XE_KBPTR.rootY; - if (sprite.hot.x < sprite.physLimits.x1) - sprite.hot.x = sprite.physLimits.x1; - else if (sprite.hot.x >= sprite.physLimits.x2) - sprite.hot.x = sprite.physLimits.x2 - 1; - if (sprite.hot.y < sprite.physLimits.y1) - sprite.hot.y = sprite.physLimits.y1; - else if (sprite.hot.y >= sprite.physLimits.y2) - sprite.hot.y = sprite.physLimits.y2 - 1; + pSprite->hot.x = XE_KBPTR.rootX; + pSprite->hot.y = XE_KBPTR.rootY; + if (pSprite->hot.x < pSprite->physLimits.x1) + pSprite->hot.x = pSprite->physLimits.x1; + else if (pSprite->hot.x >= pSprite->physLimits.x2) + pSprite->hot.x = pSprite->physLimits.x2 - 1; + if (pSprite->hot.y < pSprite->physLimits.y1) + pSprite->hot.y = pSprite->physLimits.y1; + else if (pSprite->hot.y >= pSprite->physLimits.y2) + pSprite->hot.y = pSprite->physLimits.y2 - 1; - if (sprite.hotShape) - ConfineToShape(sprite.hotShape, &sprite.hot.x, &sprite.hot.y); + if (pSprite->hotShape) + ConfineToShape(pDev, pSprite->hotShape, &pSprite->hot.x, &pSprite->hot.y); - sprite.hotPhys = sprite.hot; - if ((sprite.hotPhys.x != XE_KBPTR.rootX) || - (sprite.hotPhys.y != XE_KBPTR.rootY)) + pSprite->hotPhys = pSprite->hot; + if ((pSprite->hotPhys.x != XE_KBPTR.rootX) || + (pSprite->hotPhys.y != XE_KBPTR.rootY)) { XineramaSetCursorPosition( - sprite.hotPhys.x, sprite.hotPhys.y, FALSE); + pSprite->hotPhys.x, pSprite->hotPhys.y, FALSE); } - XE_KBPTR.rootX = sprite.hot.x; - XE_KBPTR.rootY = sprite.hot.y; + XE_KBPTR.rootX = pSprite->hot.x; + XE_KBPTR.rootY = pSprite->hot.y; } #ifdef XEVIE - xeviehot.x = sprite.hot.x; - xeviehot.y = sprite.hot.y; + xeviehot.x = pSprite->hot.x; + xeviehot.y = pSprite->hot.y; xeviewin = #endif - sprite.win = XYToWindow(sprite.hot.x, sprite.hot.y); + pSprite->win = XYToWindow(pSprite->hot.x, pSprite->hot.y); - if (sprite.win != prevSpriteWin) + if (pSprite->win != prevSpriteWin) { if (prevSpriteWin != NullWindow) { if (!xE) UpdateCurrentTimeIf(); - DoEnterLeaveEvents(prevSpriteWin, sprite.win, NotifyNormal); + DoEnterLeaveEvents(prevSpriteWin, pSprite->win, NotifyNormal); } - PostNewCursor(); + PostNewCursor(pDev); return FALSE; } return TRUE; @@ -599,7 +615,7 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents) if (syncEvents.playingEvents) { XineramaCheckVirtualMotion((QdEventPtr)NULL, pWin); - SyntheticMotion(sprite.hot.x, sprite.hot.y); + SyntheticMotion(sprite->hot.x, sprite->hot.y); } else { @@ -610,8 +626,8 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents) i = PanoramiXNumScreens - 1; - REGION_COPY(sprite.screen, &sprite.Reg1, - &sprite.windows[i]->borderSize); + REGION_COPY(sprite->screen, &sprite->Reg1, + &sprite->windows[i]->borderSize); off_x = panoramiXdataPtr[i].x; off_y = panoramiXdataPtr[i].y; @@ -620,42 +636,42 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents) y = off_y - panoramiXdataPtr[i].y; if(x || y) - REGION_TRANSLATE(sprite.screen, &sprite.Reg1, x, y); + REGION_TRANSLATE(sprite->screen, &sprite->Reg1, x, y); - REGION_UNION(sprite.screen, &sprite.Reg1, &sprite.Reg1, - &sprite.windows[i]->borderSize); + REGION_UNION(sprite->screen, &sprite->Reg1, &sprite->Reg1, + &sprite->windows[i]->borderSize); off_x = panoramiXdataPtr[i].x; off_y = panoramiXdataPtr[i].y; } - sprite.hotLimits = *REGION_EXTENTS(sprite.screen, &sprite.Reg1); + sprite->hotLimits = *REGION_EXTENTS(sprite->screen, &sprite->Reg1); - if(REGION_NUM_RECTS(&sprite.Reg1) > 1) - sprite.hotShape = &sprite.Reg1; + if(REGION_NUM_RECTS(&sprite->Reg1) > 1) + sprite->hotShape = &sprite->Reg1; else - sprite.hotShape = NullRegion; + sprite->hotShape = NullRegion; - sprite.confined = FALSE; - sprite.confineWin = (pWin == WindowTable[0]) ? NullWindow : pWin; + sprite->confined = FALSE; + sprite->confineWin = (pWin == WindowTable[0]) ? NullWindow : pWin; - XineramaCheckPhysLimits(sprite.current, generateEvents); + XineramaCheckPhysLimits(sprite->current, generateEvents); } } static void -XineramaChangeToCursor(CursorPtr cursor) +XineramaChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) { - if (cursor != sprite.current) + if (cursor != sprite->current) { - if ((sprite.current->bits->xhot != cursor->bits->xhot) || - (sprite.current->bits->yhot != cursor->bits->yhot)) + if ((sprite->current->bits->xhot != cursor->bits->xhot) || + (sprite->current->bits->yhot != cursor->bits->yhot)) XineramaCheckPhysLimits(cursor, FALSE); - (*sprite.screen->DisplayCursor)(sprite.screen, cursor); - FreeCursor(sprite.current, (Cursor)0); - sprite.current = cursor; - sprite.current->refcnt++; + (*sprite->screen->DisplayCursor)(sprite->screen, cursor); + FreeCursor(sprite->current, (Cursor)0); + sprite->current = cursor; + sprite->current->refcnt++; } } @@ -680,15 +696,20 @@ SetCriticalEvent(int event) #ifdef SHAPE static void -ConfineToShape(RegionPtr shape, int *px, int *py) +ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py) { BoxRec box; int x = *px, y = *py; int incx = 1, incy = 1; + SpritePtr pSprite = sprite; +#ifdef MPX + if (IsMPDev(pDev)) + pSprite = &mpsprites[pDev->id]; +#endif - if (POINT_IN_REGION(sprite.hot.pScreen, shape, x, y, &box)) + if (POINT_IN_REGION(pSprite->hot.pScreen, shape, x, y, &box)) return; - box = *REGION_EXTENTS(sprite.hot.pScreen, shape); + box = *REGION_EXTENTS(pSprite->hot.pScreen, shape); /* this is rather crude */ do { x += incx; @@ -710,7 +731,7 @@ ConfineToShape(RegionPtr shape, int *px, int *py) else if (y < box.y1) return; /* should never get here! */ } - } while (!POINT_IN_REGION(sprite.hot.pScreen, shape, x, y, &box)); + } while (!POINT_IN_REGION(pSprite->hot.pScreen, shape, x, y, &box)); *px = x; *py = y; } @@ -718,43 +739,50 @@ ConfineToShape(RegionPtr shape, int *px, int *py) static void CheckPhysLimits( + DeviceIntPtr pDev, CursorPtr cursor, Bool generateEvents, Bool confineToScreen, ScreenPtr pScreen) { HotSpot new; + SpritePtr pSprite = sprite; + +#ifdef MPX + if (IsMPDev(pDev)) + pSprite = &mpsprites[pDev->id]; +#endif if (!cursor) return; - new = sprite.hotPhys; + new = pSprite->hotPhys; if (pScreen) new.pScreen = pScreen; else pScreen = new.pScreen; - (*pScreen->CursorLimits) (pScreen, cursor, &sprite.hotLimits, - &sprite.physLimits); - sprite.confined = confineToScreen; - (* pScreen->ConstrainCursor)(inputInfo.pointer, pScreen, &sprite.physLimits); - if (new.x < sprite.physLimits.x1) - new.x = sprite.physLimits.x1; + (*pScreen->CursorLimits) (pScreen, cursor, &pSprite->hotLimits, + &pSprite->physLimits); + pSprite->confined = confineToScreen; + (* pScreen->ConstrainCursor)(pDev, pScreen, &pSprite->physLimits); + if (new.x < pSprite->physLimits.x1) + new.x = pSprite->physLimits.x1; else - if (new.x >= sprite.physLimits.x2) - new.x = sprite.physLimits.x2 - 1; - if (new.y < sprite.physLimits.y1) - new.y = sprite.physLimits.y1; + if (new.x >= pSprite->physLimits.x2) + new.x = pSprite->physLimits.x2 - 1; + if (new.y < pSprite->physLimits.y1) + new.y = pSprite->physLimits.y1; else - if (new.y >= sprite.physLimits.y2) - new.y = sprite.physLimits.y2 - 1; + if (new.y >= pSprite->physLimits.y2) + new.y = pSprite->physLimits.y2 - 1; #ifdef SHAPE - if (sprite.hotShape) - ConfineToShape(sprite.hotShape, &new.x, &new.y); + if (pSprite->hotShape) + ConfineToShape(pDev, pSprite->hotShape, &new.x, &new.y); #endif - if ((pScreen != sprite.hotPhys.pScreen) || - (new.x != sprite.hotPhys.x) || (new.y != sprite.hotPhys.y)) + if ((pScreen != pSprite->hotPhys.pScreen) || + (new.x != pSprite->hotPhys.x) || (new.y != pSprite->hotPhys.y)) { - if (pScreen != sprite.hotPhys.pScreen) - sprite.hotPhys = new; + if (pScreen != pSprite->hotPhys.pScreen) + pSprite->hotPhys = new; (*pScreen->SetCursorPosition) (pScreen, new.x, new.y, generateEvents); if (!generateEvents) SyntheticMotion(new.x, new.y); @@ -774,9 +802,9 @@ CheckVirtualMotion( #endif if (qe) { - sprite.hot.pScreen = qe->pScreen; - sprite.hot.x = qe->event->u.keyButtonPointer.rootX; - sprite.hot.y = qe->event->u.keyButtonPointer.rootY; + sprite->hot.pScreen = qe->pScreen; + sprite->hot.x = qe->event->u.keyButtonPointer.rootX; + sprite->hot.y = qe->event->u.keyButtonPointer.rootY; pWin = inputInfo.pointer->grab ? inputInfo.pointer->grab->confineTo : NullWindow; } @@ -784,36 +812,36 @@ CheckVirtualMotion( { BoxRec lims; - if (sprite.hot.pScreen != pWin->drawable.pScreen) + if (sprite->hot.pScreen != pWin->drawable.pScreen) { - sprite.hot.pScreen = pWin->drawable.pScreen; - sprite.hot.x = sprite.hot.y = 0; + sprite->hot.pScreen = pWin->drawable.pScreen; + sprite->hot.x = sprite->hot.y = 0; } lims = *REGION_EXTENTS(pWin->drawable.pScreen, &pWin->borderSize); - if (sprite.hot.x < lims.x1) - sprite.hot.x = lims.x1; - else if (sprite.hot.x >= lims.x2) - sprite.hot.x = lims.x2 - 1; - if (sprite.hot.y < lims.y1) - sprite.hot.y = lims.y1; - else if (sprite.hot.y >= lims.y2) - sprite.hot.y = lims.y2 - 1; + if (sprite->hot.x < lims.x1) + sprite->hot.x = lims.x1; + else if (sprite->hot.x >= lims.x2) + sprite->hot.x = lims.x2 - 1; + if (sprite->hot.y < lims.y1) + sprite->hot.y = lims.y1; + else if (sprite->hot.y >= lims.y2) + sprite->hot.y = lims.y2 - 1; #ifdef SHAPE if (wBoundingShape(pWin)) - ConfineToShape(&pWin->borderSize, &sprite.hot.x, &sprite.hot.y); + ConfineToShape(inputInfo.pointer, &pWin->borderSize, &sprite->hot.x, &sprite->hot.y); #endif if (qe) { - qe->pScreen = sprite.hot.pScreen; - qe->event->u.keyButtonPointer.rootX = sprite.hot.x; - qe->event->u.keyButtonPointer.rootY = sprite.hot.y; + qe->pScreen = sprite->hot.pScreen; + qe->event->u.keyButtonPointer.rootX = sprite->hot.x; + qe->event->u.keyButtonPointer.rootY = sprite->hot.y; } } #ifdef XEVIE - xeviehot.x = sprite.hot.x; - xeviehot.y = sprite.hot.y; + xeviehot.x = sprite->hot.x; + xeviehot.y = sprite->hot.y; #endif - ROOT = WindowTable[sprite.hot.pScreen->myNum]; + ROOT = WindowTable[sprite->hot.pScreen->myNum]; } static void @@ -831,47 +859,59 @@ ConfineCursorToWindow(WindowPtr pWin, Bool generateEvents, Bool confineToScreen) if (syncEvents.playingEvents) { CheckVirtualMotion((QdEventPtr)NULL, pWin); - SyntheticMotion(sprite.hot.x, sprite.hot.y); + SyntheticMotion(sprite->hot.x, sprite->hot.y); } else { - sprite.hotLimits = *REGION_EXTENTS( pScreen, &pWin->borderSize); + sprite->hotLimits = *REGION_EXTENTS( pScreen, &pWin->borderSize); #ifdef SHAPE - sprite.hotShape = wBoundingShape(pWin) ? &pWin->borderSize + sprite->hotShape = wBoundingShape(pWin) ? &pWin->borderSize : NullRegion; #endif - CheckPhysLimits(sprite.current, generateEvents, confineToScreen, - pScreen); + CheckPhysLimits(inputInfo.pointer, sprite->current, generateEvents, + confineToScreen, pScreen); } } _X_EXPORT Bool -PointerConfinedToScreen() +PointerConfinedToScreen(DeviceIntPtr pDev) { - return sprite.confined; + SpritePtr pSprite = sprite; +#ifdef MPX + if (IsMPDev(pDev)) + pSprite = &mpsprites[pDev->id]; +#endif + return pSprite->confined; } static void -ChangeToCursor(CursorPtr cursor) +ChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) { + SpritePtr pSprite = sprite; + +#ifdef MPX + if (IsMPDev(pDev)) + pSprite = &mpsprites[pDev->id]; +#endif + #ifdef PANORAMIX if(!noPanoramiXExtension) { - XineramaChangeToCursor(cursor); + XineramaChangeToCursor(pDev, cursor); return; } #endif - if (cursor != sprite.current) + if (cursor != pSprite->current) { - if ((sprite.current->bits->xhot != cursor->bits->xhot) || - (sprite.current->bits->yhot != cursor->bits->yhot)) - CheckPhysLimits(cursor, FALSE, sprite.confined, + if ((pSprite->current->bits->xhot != cursor->bits->xhot) || + (pSprite->current->bits->yhot != cursor->bits->yhot)) + CheckPhysLimits(pDev, cursor, FALSE, pSprite->confined, (ScreenPtr)NULL); - (*sprite.hotPhys.pScreen->DisplayCursor) (sprite.hotPhys.pScreen, + (*sprite->hotPhys.pScreen->DisplayCursor) (pSprite->hotPhys.pScreen, cursor); - FreeCursor(sprite.current, (Cursor)0); - sprite.current = cursor; - sprite.current->refcnt++; + FreeCursor(pSprite->current, (Cursor)0); + pSprite->current = cursor; + pSprite->current->refcnt++; } } @@ -885,10 +925,17 @@ IsParent(register WindowPtr a, register WindowPtr b) } static void -PostNewCursor(void) +PostNewCursor(DeviceIntPtr pDev) { register WindowPtr win; - register GrabPtr grab = inputInfo.pointer->grab; + register GrabPtr grab = pDev->grab; + SpritePtr pSprite = sprite; + +#ifdef MPX + if (IsMPDev(pDev)) + pSprite = &mpsprites[pDev->id]; +#endif + if (syncEvents.playingEvents) return; @@ -896,20 +943,20 @@ PostNewCursor(void) { if (grab->cursor) { - ChangeToCursor(grab->cursor); + ChangeToCursor(pDev, grab->cursor); return; } - if (IsParent(grab->window, sprite.win)) - win = sprite.win; + if (IsParent(grab->window, pSprite->win)) + win = pSprite->win; else win = grab->window; } else - win = sprite.win; + win = pSprite->win; for (; win; win = win->parent) if (win->optional && win->optional->cursor != NullCursor) { - ChangeToCursor(win->optional->cursor); + ChangeToCursor(pDev, win->optional->cursor); return; } } @@ -923,20 +970,25 @@ GetCurrentRootWindow() _X_EXPORT WindowPtr GetSpriteWindow() { - return sprite.win; + return sprite->win; } _X_EXPORT CursorPtr GetSpriteCursor() { - return sprite.current; + return sprite->current; } _X_EXPORT void -GetSpritePosition(int *px, int *py) +GetSpritePosition(DeviceIntPtr pDev, int *px, int *py) { - *px = sprite.hotPhys.x; - *py = sprite.hotPhys.y; + SpritePtr pSprite = sprite; +#ifdef MPX + if (IsMPDev(pDev)) + pSprite = &mpsprites[pDev->id]; +#endif + *px = pSprite->hotPhys.x; + *py = pSprite->hotPhys.y; } #ifdef PANORAMIX @@ -944,7 +996,7 @@ _X_EXPORT int XineramaGetCursorScreen() { if(!noPanoramiXExtension) { - return sprite.screen->myNum; + return sprite->screen->myNum; } else { return 0; } @@ -1013,7 +1065,7 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) */ if (xE->u.u.type == MotionNotify) XE_KBPTR.root = - WindowTable[sprite.hotPhys.pScreen->myNum]->drawable.id; + WindowTable[sprite->hotPhys.pScreen->myNum]->drawable.id; eventinfo.events = xE; eventinfo.count = count; CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo); @@ -1022,21 +1074,21 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) { #ifdef PANORAMIX if(!noPanoramiXExtension) { - XE_KBPTR.rootX += panoramiXdataPtr[sprite.screen->myNum].x - + XE_KBPTR.rootX += panoramiXdataPtr[sprite->screen->myNum].x - panoramiXdataPtr[0].x; - XE_KBPTR.rootY += panoramiXdataPtr[sprite.screen->myNum].y - + XE_KBPTR.rootY += panoramiXdataPtr[sprite->screen->myNum].y - panoramiXdataPtr[0].y; } #endif - sprite.hotPhys.x = XE_KBPTR.rootX; - sprite.hotPhys.y = XE_KBPTR.rootY; + sprite->hotPhys.x = XE_KBPTR.rootX; + sprite->hotPhys.y = XE_KBPTR.rootY; /* do motion compression */ if (tail && (tail->event->u.u.type == MotionNotify) && - (tail->pScreen == sprite.hotPhys.pScreen)) + (tail->pScreen == sprite->hotPhys.pScreen)) { - tail->event->u.keyButtonPointer.rootX = sprite.hotPhys.x; - tail->event->u.keyButtonPointer.rootY = sprite.hotPhys.y; + tail->event->u.keyButtonPointer.rootX = sprite->hotPhys.x; + tail->event->u.keyButtonPointer.rootY = sprite->hotPhys.y; tail->event->u.keyButtonPointer.time = XE_KBPTR.time; tail->months = currentTime.months; return; @@ -1047,7 +1099,7 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) return; qe->next = (QdEventPtr)NULL; qe->device = device; - qe->pScreen = sprite.hotPhys.pScreen; + qe->pScreen = sprite->hotPhys.pScreen; qe->months = currentTime.months; qe->event = (xEvent *)(qe + 1); qe->evcount = count; @@ -1083,10 +1135,10 @@ PlayReleasedEvents(void) if(!noPanoramiXExtension) { qe->event->u.keyButtonPointer.rootX += panoramiXdataPtr[0].x - - panoramiXdataPtr[sprite.screen->myNum].x; + panoramiXdataPtr[sprite->screen->myNum].x; qe->event->u.keyButtonPointer.rootY += panoramiXdataPtr[0].y - - panoramiXdataPtr[sprite.screen->myNum].y; + panoramiXdataPtr[sprite->screen->myNum].y; } #endif (*qe->device->public.processInputProc)(qe->event, qe->device, @@ -1171,14 +1223,14 @@ playmore: /* the following may have been skipped during replay, so do it now */ if ((grab = inputInfo.pointer->grab) && grab->confineTo) { - if (grab->confineTo->drawable.pScreen != sprite.hotPhys.pScreen) - sprite.hotPhys.x = sprite.hotPhys.y = 0; + if (grab->confineTo->drawable.pScreen != sprite->hotPhys.pScreen) + sprite->hotPhys.x = sprite->hotPhys.y = 0; ConfineCursorToWindow(grab->confineTo, TRUE, TRUE); } else - ConfineCursorToWindow(WindowTable[sprite.hotPhys.pScreen->myNum], + ConfineCursorToWindow(WindowTable[sprite->hotPhys.pScreen->myNum], TRUE, FALSE); - PostNewCursor(); + PostNewCursor(inputInfo.pointer); } #ifdef RANDR @@ -1189,12 +1241,12 @@ ScreenRestructured (ScreenPtr pScreen) if ((grab = inputInfo.pointer->grab) && grab->confineTo) { - if (grab->confineTo->drawable.pScreen != sprite.hotPhys.pScreen) - sprite.hotPhys.x = sprite.hotPhys.y = 0; + if (grab->confineTo->drawable.pScreen != sprite->hotPhys.pScreen) + sprite->hotPhys.x = sprite->hotPhys.y = 0; ConfineCursorToWindow(grab->confineTo, TRUE, TRUE); } else - ConfineCursorToWindow(WindowTable[sprite.hotPhys.pScreen->myNum], + ConfineCursorToWindow(WindowTable[sprite->hotPhys.pScreen->myNum], TRUE, FALSE); } #endif @@ -1238,12 +1290,12 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab, TimeStamp time, Bool autoGrab) { WindowPtr oldWin = (mouse->grab) ? mouse->grab->window - : sprite.win; + : sprite->win; if (grab->confineTo) { - if (grab->confineTo->drawable.pScreen != sprite.hotPhys.pScreen) - sprite.hotPhys.x = sprite.hotPhys.y = 0; + if (grab->confineTo->drawable.pScreen != sprite->hotPhys.pScreen) + sprite->hotPhys.x = sprite->hotPhys.y = 0; ConfineCursorToWindow(grab->confineTo, FALSE, TRUE); } DoEnterLeaveEvents(oldWin, grab->window, NotifyGrab); @@ -1257,7 +1309,7 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab, mouse->activeGrab = *grab; mouse->grab = &mouse->activeGrab; mouse->fromPassiveGrab = autoGrab; - PostNewCursor(); + PostNewCursor(inputInfo.pointer); CheckGrabForSyncs(mouse,(Bool)grab->pointerMode, (Bool)grab->keyboardMode); } @@ -1276,10 +1328,10 @@ DeactivatePointerGrab(register DeviceIntPtr mouse) if (dev->sync.other == grab) dev->sync.other = NullGrab; } - DoEnterLeaveEvents(grab->window, sprite.win, NotifyUngrab); + DoEnterLeaveEvents(grab->window, sprite->win, NotifyUngrab); if (grab->confineTo) ConfineCursorToWindow(ROOT, FALSE, FALSE); - PostNewCursor(); + PostNewCursor(inputInfo.pointer); if (grab->cursor) FreeCursor(grab->cursor, (Cursor)0); ComputeFreezes(); @@ -1295,7 +1347,7 @@ ActivateKeyboardGrab(register DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, else if (keybd->focus) oldWin = keybd->focus->win; else - oldWin = sprite.win; + oldWin = sprite->win; if (oldWin == FollowKeyboardWin) oldWin = inputInfo.keyboard->focus->win; if (keybd->valuator) @@ -1317,7 +1369,7 @@ DeactivateKeyboardGrab(register DeviceIntPtr keybd) register GrabPtr grab = keybd->grab; register DeviceIntPtr dev; register WindowPtr focusWin = keybd->focus ? keybd->focus->win - : sprite.win; + : sprite->win; if (focusWin == FollowKeyboardWin) focusWin = inputInfo.keyboard->focus->win; @@ -1782,7 +1834,7 @@ FixUpEventFromWindow( } XE_KBPTR.root = ROOT->drawable.id; XE_KBPTR.event = pWin->drawable.id; - if (sprite.hot.pScreen == pWin->drawable.pScreen) + if (sprite->hot.pScreen == pWin->drawable.pScreen) { XE_KBPTR.sameScreen = xTrue; XE_KBPTR.child = child; @@ -1916,8 +1968,8 @@ PointInBorderSize(WindowPtr pWin, int x, int y) int i; for(i = 1; i < PanoramiXNumScreens; i++) { - if(POINT_IN_REGION(sprite.screen, - &sprite.windows[i]->borderSize, + if(POINT_IN_REGION(sprite->screen, + &sprite->windows[i]->borderSize, x + panoramiXdataPtr[0].x - panoramiXdataPtr[i].x, y + panoramiXdataPtr[0].y - panoramiXdataPtr[i].y, &box)) @@ -1977,74 +2029,82 @@ XYToWindow(int x, int y) } static Bool -CheckMotion(xEvent *xE) +CheckMotion(xEvent *xE, DeviceIntPtr pDev) { - WindowPtr prevSpriteWin = sprite.win; + WindowPtr prevSpriteWin; + SpritePtr pSprite = sprite; + +#ifdef MPX + if (IsMPDev(pDev)) + pSprite = &mpsprites[pDev->id]; +#endif + + prevSpriteWin = pSprite->win; #ifdef PANORAMIX if(!noPanoramiXExtension) - return XineramaCheckMotion(xE); + return XineramaCheckMotion(xE, pDev); #endif if (xE && !syncEvents.playingEvents) { - if (sprite.hot.pScreen != sprite.hotPhys.pScreen) + if (pSprite->hot.pScreen != pSprite->hotPhys.pScreen) { - sprite.hot.pScreen = sprite.hotPhys.pScreen; - ROOT = WindowTable[sprite.hot.pScreen->myNum]; + pSprite->hot.pScreen = pSprite->hotPhys.pScreen; + ROOT = WindowTable[pSprite->hot.pScreen->myNum]; } - sprite.hot.x = XE_KBPTR.rootX; - sprite.hot.y = XE_KBPTR.rootY; - if (sprite.hot.x < sprite.physLimits.x1) - sprite.hot.x = sprite.physLimits.x1; - else if (sprite.hot.x >= sprite.physLimits.x2) - sprite.hot.x = sprite.physLimits.x2 - 1; - if (sprite.hot.y < sprite.physLimits.y1) - sprite.hot.y = sprite.physLimits.y1; - else if (sprite.hot.y >= sprite.physLimits.y2) - sprite.hot.y = sprite.physLimits.y2 - 1; + pSprite->hot.x = XE_KBPTR.rootX; + pSprite->hot.y = XE_KBPTR.rootY; + if (pSprite->hot.x < pSprite->physLimits.x1) + pSprite->hot.x = pSprite->physLimits.x1; + else if (pSprite->hot.x >= pSprite->physLimits.x2) + pSprite->hot.x = pSprite->physLimits.x2 - 1; + if (pSprite->hot.y < pSprite->physLimits.y1) + pSprite->hot.y = pSprite->physLimits.y1; + else if (pSprite->hot.y >= pSprite->physLimits.y2) + pSprite->hot.y = pSprite->physLimits.y2 - 1; #ifdef SHAPE - if (sprite.hotShape) - ConfineToShape(sprite.hotShape, &sprite.hot.x, &sprite.hot.y); + if (pSprite->hotShape) + ConfineToShape(pDev, pSprite->hotShape, &pSprite->hot.x, &pSprite->hot.y); #endif #ifdef XEVIE - xeviehot.x = sprite.hot.x; - xeviehot.y = sprite.hot.y; + xeviehot.x = pSprite->hot.x; + xeviehot.y = pSprite->hot.y; #endif - sprite.hotPhys = sprite.hot; + pSprite->hotPhys = pSprite->hot; #ifndef MPX - if ((sprite.hotPhys.x != XE_KBPTR.rootX) || - (sprite.hotPhys.y != XE_KBPTR.rootY)) + if ((pSprite->hotPhys.x != XE_KBPTR.rootX) || + (pSprite->hotPhys.y != XE_KBPTR.rootY)) { - (*sprite.hotPhys.pScreen->SetCursorPosition)( - sprite.hotPhys.pScreen, - sprite.hotPhys.x, sprite.hotPhys.y, FALSE); + (*pSprite->hotPhys.pScreen->SetCursorPosition)( + pSprite->hotPhys.pScreen, + pSprite->hotPhys.x, pSprite->hotPhys.y, FALSE); } #endif - XE_KBPTR.rootX = sprite.hot.x; - XE_KBPTR.rootY = sprite.hot.y; + XE_KBPTR.rootX = pSprite->hot.x; + XE_KBPTR.rootY = pSprite->hot.y; } #ifdef XEVIE xeviewin = #endif - sprite.win = XYToWindow(sprite.hot.x, sprite.hot.y); + pSprite->win = XYToWindow(pSprite->hot.x, pSprite->hot.y); #ifdef notyet - if (!(sprite.win->deliverableEvents & + if (!(pSprite->win->deliverableEvents & Motion_Filter(inputInfo.pointer->button)) !syncEvents.playingEvents) { /* XXX Do PointerNonInterestBox here */ } #endif - if (sprite.win != prevSpriteWin) + if (pSprite->win != prevSpriteWin) { if (prevSpriteWin != NullWindow) { if (!xE) UpdateCurrentTimeIf(); - DoEnterLeaveEvents(prevSpriteWin, sprite.win, NotifyNormal); + DoEnterLeaveEvents(prevSpriteWin, pSprite->win, NotifyNormal); } - PostNewCursor(); + PostNewCursor(pDev); return FALSE; } return TRUE; @@ -2053,7 +2113,7 @@ CheckMotion(xEvent *xE) _X_EXPORT void WindowsRestructured() { - (void) CheckMotion((xEvent *)NULL); + (void) CheckMotion((xEvent *)NULL, inputInfo.pointer); } #ifdef PANORAMIX @@ -2068,29 +2128,29 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) if (noPanoramiXExtension) return; - sprite.hot.x -= xoff; - sprite.hot.y -= yoff; + sprite->hot.x -= xoff; + sprite->hot.y -= yoff; - sprite.hotPhys.x -= xoff; - sprite.hotPhys.y -= yoff; + sprite->hotPhys.x -= xoff; + sprite->hotPhys.y -= yoff; - sprite.hotLimits.x1 -= xoff; - sprite.hotLimits.y1 -= yoff; - sprite.hotLimits.x2 -= xoff; - sprite.hotLimits.y2 -= yoff; + sprite->hotLimits.x1 -= xoff; + sprite->hotLimits.y1 -= yoff; + sprite->hotLimits.x2 -= xoff; + sprite->hotLimits.y2 -= yoff; - if (REGION_NOTEMPTY(sprite.screen, &sprite.Reg1)) - REGION_TRANSLATE(sprite.screen, &sprite.Reg1, xoff, yoff); - if (REGION_NOTEMPTY(sprite.screen, &sprite.Reg2)) - REGION_TRANSLATE(sprite.screen, &sprite.Reg2, xoff, yoff); + if (REGION_NOTEMPTY(sprite->screen, &sprite->Reg1)) + REGION_TRANSLATE(sprite->screen, &sprite->Reg1, xoff, yoff); + if (REGION_NOTEMPTY(sprite->screen, &sprite->Reg2)) + REGION_TRANSLATE(sprite->screen, &sprite->Reg2, xoff, yoff); /* FIXME: if we call ConfineCursorToWindow, must we do anything else? */ if ((grab = inputInfo.pointer->grab) && grab->confineTo) { - if (grab->confineTo->drawable.pScreen != sprite.hotPhys.pScreen) - sprite.hotPhys.x = sprite.hotPhys.y = 0; + if (grab->confineTo->drawable.pScreen != sprite->hotPhys.pScreen) + sprite->hotPhys.x = sprite->hotPhys.y = 0; ConfineCursorToWindow(grab->confineTo, TRUE, TRUE); } else - ConfineCursorToWindow(WindowTable[sprite.hotPhys.pScreen->myNum], + ConfineCursorToWindow(WindowTable[sprite->hotPhys.pScreen->myNum], TRUE, FALSE); } #endif @@ -2099,55 +2159,72 @@ void DefineInitialRootWindow(register WindowPtr win) { register ScreenPtr pScreen = win->drawable.pScreen; - - sprite.hotPhys.pScreen = pScreen; - sprite.hotPhys.x = pScreen->width / 2; - sprite.hotPhys.y = pScreen->height / 2; - sprite.hot = sprite.hotPhys; - sprite.hotLimits.x2 = pScreen->width; - sprite.hotLimits.y2 = pScreen->height; -#ifdef XEVIE - xeviewin = -#endif - sprite.win = win; - sprite.current = wCursor (win); - sprite.current->refcnt++; - spriteTraceGood = 1; - ROOT = win; -/* FIXME: This only limits the core pointer, not the MPX pointer */ - (*pScreen->CursorLimits) ( - pScreen, sprite.current, &sprite.hotLimits, &sprite.physLimits); - sprite.confined = FALSE; + SpritePtr pSprite = sprite; #ifdef MPX + int mpSpriteIdx = 0; + DeviceIntPtr pDev; + + + while (mpSpriteIdx < MAX_DEVICES) { - DeviceIntPtr pDev = inputInfo.devices; + pSprite = &mpsprites[mpSpriteIdx]; +#endif + + pSprite->hotPhys.pScreen = pScreen; + pSprite->hotPhys.x = pScreen->width / 2; + pSprite->hotPhys.y = pScreen->height / 2; + pSprite->hot = pSprite->hotPhys; + pSprite->hotLimits.x2 = pScreen->width; + pSprite->hotLimits.y2 = pScreen->height; +#ifdef XEVIE + xeviewin = +#endif + pSprite->win = win; + pSprite->current = wCursor (win); + pSprite->current->refcnt++; + spriteTraceGood = 1; + ROOT = win; + (*pScreen->CursorLimits) ( pScreen, pSprite->current, + &pSprite->hotLimits, &pSprite->physLimits); + pSprite->confined = FALSE; + +#ifdef MPX + /* this is ugly */ + pDev = inputInfo.devices; while(pDev) { - (*pScreen->ConstrainCursor) (pDev, pScreen, &sprite.physLimits); + if (pDev->id == mpSpriteIdx) + (*pScreen->ConstrainCursor) (pDev, pScreen, &pSprite->physLimits); + pDev = pDev->next; } - } #else - (*pScreen->ConstrainCursor) (pScreen, &sprite.physLimits); + (*pScreen->ConstrainCursor) (inputInfo.pointer, pScreen, + &pSprite->physLimits); #endif - (*pScreen->SetCursorPosition) (pScreen, sprite.hot.x, sprite.hot.y, FALSE); - (*pScreen->DisplayCursor) (pScreen, sprite.current); + (*pScreen->SetCursorPosition) (pScreen, pSprite->hot.x, pSprite->hot.y, + FALSE); + (*pScreen->DisplayCursor) (pScreen, pSprite->current); #ifdef PANORAMIX - if(!noPanoramiXExtension) { - sprite.hotLimits.x1 = -panoramiXdataPtr[0].x; - sprite.hotLimits.y1 = -panoramiXdataPtr[0].y; - sprite.hotLimits.x2 = PanoramiXPixWidth - panoramiXdataPtr[0].x; - sprite.hotLimits.y2 = PanoramiXPixHeight - panoramiXdataPtr[0].y; - sprite.physLimits = sprite.hotLimits; - sprite.confineWin = NullWindow; + if(!noPanoramiXExtension) { + pSprite->hotLimits.x1 = -panoramiXdataPtr[0].x; + pSprite->hotLimits.y1 = -panoramiXdataPtr[0].y; + pSprite->hotLimits.x2 = PanoramiXPixWidth - panoramiXdataPtr[0].x; + pSprite->hotLimits.y2 = PanoramiXPixHeight - panoramiXdataPtr[0].y; + pSprite->physLimits = pSprite->hotLimits; + pSprite->confineWin = NullWindow; #ifdef SHAPE - sprite.hotShape = NullRegion; + pSprite->hotShape = NullRegion; #endif - sprite.screen = pScreen; - /* gotta UNINIT these someplace */ - REGION_NULL(pScreen, &sprite.Reg1); - REGION_NULL(pScreen, &sprite.Reg2); + pSprite->screen = pScreen; + /* gotta UNINIT these someplace */ + REGION_NULL(pScreen, &pSprite->Reg1); + REGION_NULL(pScreen, &pSprite->Reg2); + } +#endif +#ifdef MPX + mpSpriteIdx++; } #endif } @@ -2162,39 +2239,39 @@ DefineInitialRootWindow(register WindowPtr win) void WindowHasNewCursor(WindowPtr pWin) { - PostNewCursor(); + PostNewCursor(inputInfo.pointer); } _X_EXPORT void NewCurrentScreen(ScreenPtr newScreen, int x, int y) { - sprite.hotPhys.x = x; - sprite.hotPhys.y = y; + sprite->hotPhys.x = x; + sprite->hotPhys.y = y; #ifdef PANORAMIX if(!noPanoramiXExtension) { - sprite.hotPhys.x += panoramiXdataPtr[newScreen->myNum].x - + sprite->hotPhys.x += panoramiXdataPtr[newScreen->myNum].x - panoramiXdataPtr[0].x; - sprite.hotPhys.y += panoramiXdataPtr[newScreen->myNum].y - + sprite->hotPhys.y += panoramiXdataPtr[newScreen->myNum].y - panoramiXdataPtr[0].y; - if (newScreen != sprite.screen) { - sprite.screen = newScreen; + if (newScreen != sprite->screen) { + sprite->screen = newScreen; /* Make sure we tell the DDX to update its copy of the screen */ - if(sprite.confineWin) - XineramaConfineCursorToWindow(sprite.confineWin, TRUE); + if(sprite->confineWin) + XineramaConfineCursorToWindow(sprite->confineWin, TRUE); else XineramaConfineCursorToWindow(WindowTable[0], TRUE); /* if the pointer wasn't confined, the DDX won't get told of the pointer warp so we reposition it here */ if(!syncEvents.playingEvents) - (*sprite.screen->SetCursorPosition)(sprite.screen, - sprite.hotPhys.x + panoramiXdataPtr[0].x - - panoramiXdataPtr[sprite.screen->myNum].x, - sprite.hotPhys.y + panoramiXdataPtr[0].y - - panoramiXdataPtr[sprite.screen->myNum].y, FALSE); + (*sprite->screen->SetCursorPosition)(sprite->screen, + sprite->hotPhys.x + panoramiXdataPtr[0].x - + panoramiXdataPtr[sprite->screen->myNum].x, + sprite->hotPhys.y + panoramiXdataPtr[0].y - + panoramiXdataPtr[sprite->screen->myNum].y, FALSE); } } else #endif - if (newScreen != sprite.hotPhys.pScreen) + if (newScreen != sprite->hotPhys.pScreen) ConfineCursorToWindow(WindowTable[newScreen->myNum], TRUE, FALSE); } @@ -2222,7 +2299,7 @@ XineramaPointInWindowIsVisible( yoff = y + panoramiXdataPtr[0].y; for(i = 1; i < PanoramiXNumScreens; i++) { - pWin = sprite.windows[i]; + pWin = sprite->windows[i]; pScreen = pWin->drawable.pScreen; x = xoff - panoramiXdataPtr[i].x; y = yoff - panoramiXdataPtr[i].y; @@ -2255,8 +2332,8 @@ XineramaWarpPointer(ClientPtr client) if (!dest) return BadWindow; } - x = sprite.hotPhys.x; - y = sprite.hotPhys.y; + x = sprite->hotPhys.x; + y = sprite->hotPhys.y; if (stuff->srcWid != None) { @@ -2294,16 +2371,16 @@ XineramaWarpPointer(ClientPtr client) x += stuff->dstX; y += stuff->dstY; - if (x < sprite.physLimits.x1) - x = sprite.physLimits.x1; - else if (x >= sprite.physLimits.x2) - x = sprite.physLimits.x2 - 1; - if (y < sprite.physLimits.y1) - y = sprite.physLimits.y1; - else if (y >= sprite.physLimits.y2) - y = sprite.physLimits.y2 - 1; - if (sprite.hotShape) - ConfineToShape(sprite.hotShape, &x, &y); + if (x < sprite->physLimits.x1) + x = sprite->physLimits.x1; + else if (x >= sprite->physLimits.x2) + x = sprite->physLimits.x2 - 1; + if (y < sprite->physLimits.y1) + y = sprite->physLimits.y1; + else if (y >= sprite->physLimits.y2) + y = sprite->physLimits.y2 - 1; + if (sprite->hotShape) + ConfineToShape(inputInfo.pointer, sprite->hotShape, &x, &y); XineramaSetCursorPosition(x, y, TRUE); @@ -2335,8 +2412,8 @@ ProcWarpPointer(ClientPtr client) if (!dest) return BadWindow; } - x = sprite.hotPhys.x; - y = sprite.hotPhys.y; + x = sprite->hotPhys.x; + y = sprite->hotPhys.y; if (stuff->srcWid != None) { @@ -2349,7 +2426,7 @@ ProcWarpPointer(ClientPtr client) winX = source->drawable.x; winY = source->drawable.y; - if (source->drawable.pScreen != sprite.hotPhys.pScreen || + if (source->drawable.pScreen != sprite->hotPhys.pScreen || x < winX + stuff->srcX || y < winY + stuff->srcY || (stuff->srcWidth != 0 && @@ -2365,7 +2442,7 @@ ProcWarpPointer(ClientPtr client) y = dest->drawable.y; newScreen = dest->drawable.pScreen; } else - newScreen = sprite.hotPhys.pScreen; + newScreen = sprite->hotPhys.pScreen; x += stuff->dstX; y += stuff->dstY; @@ -2379,23 +2456,23 @@ ProcWarpPointer(ClientPtr client) else if (y >= newScreen->height) y = newScreen->height - 1; - if (newScreen == sprite.hotPhys.pScreen) + if (newScreen == sprite->hotPhys.pScreen) { - if (x < sprite.physLimits.x1) - x = sprite.physLimits.x1; - else if (x >= sprite.physLimits.x2) - x = sprite.physLimits.x2 - 1; - if (y < sprite.physLimits.y1) - y = sprite.physLimits.y1; - else if (y >= sprite.physLimits.y2) - y = sprite.physLimits.y2 - 1; + if (x < sprite->physLimits.x1) + x = sprite->physLimits.x1; + else if (x >= sprite->physLimits.x2) + x = sprite->physLimits.x2 - 1; + if (y < sprite->physLimits.y1) + y = sprite->physLimits.y1; + else if (y >= sprite->physLimits.y2) + y = sprite->physLimits.y2 - 1; #if defined(SHAPE) - if (sprite.hotShape) - ConfineToShape(sprite.hotShape, &x, &y); + if (sprite->hotShape) + ConfineToShape(inputInfo.pointer, sprite->hotShape, &x, &y); #endif (*newScreen->SetCursorPosition)(newScreen, x, y, TRUE); } - else if (!PointerConfinedToScreen()) + else if (!PointerConfinedToScreen(inputInfo.pointer)) { NewCurrentScreen(newScreen, x, y); } @@ -2405,7 +2482,7 @@ ProcWarpPointer(ClientPtr client) static Bool BorderSizeNotEmpty(WindowPtr pWin) { - if(REGION_NOTEMPTY(sprite.hotPhys.pScreen, &pWin->borderSize)) + if(REGION_NOTEMPTY(sprite->hotPhys.pScreen, &pWin->borderSize)) return TRUE; #ifdef PANORAMIX @@ -2413,7 +2490,7 @@ BorderSizeNotEmpty(WindowPtr pWin) int i; for(i = 1; i < PanoramiXNumScreens; i++) { - if(REGION_NOTEMPTY(sprite.screen, &sprite.windows[i]->borderSize)) + if(REGION_NOTEMPTY(sprite->screen, &sprite->windows[i]->borderSize)) return TRUE; } } @@ -2624,10 +2701,10 @@ DeliverGrabbedEvent(register xEvent *xE, register DeviceIntPtr thisDev, else focus = PointerRootWin; if (focus == PointerRootWin) - deliveries = DeliverDeviceEvents(sprite.win, xE, grab, NullWindow, + deliveries = DeliverDeviceEvents(sprite->win, xE, grab, NullWindow, thisDev, count); - else if (focus && (focus == sprite.win || IsParent(focus, sprite.win))) - deliveries = DeliverDeviceEvents(sprite.win, xE, grab, focus, + else if (focus && (focus == sprite->win || IsParent(focus, sprite->win))) + deliveries = DeliverDeviceEvents(sprite->win, xE, grab, focus, thisDev, count); else if (focus) deliveries = DeliverDeviceEvents(focus, xE, grab, focus, @@ -2760,8 +2837,8 @@ drawable.id:0; ))) #endif XE_KBPTR.state = (keyc->state | inputInfo.pointer->button->state); - XE_KBPTR.rootX = sprite.hot.x; - XE_KBPTR.rootY = sprite.hot.y; + XE_KBPTR.rootX = sprite->hot.x; + XE_KBPTR.rootY = sprite->hot.y; key = xE->u.u.detail; kptr = &keyc->down[key >> 3]; bit = 1 << (key & 7); @@ -2837,7 +2914,7 @@ drawable.id:0; if (grab) DeliverGrabbedEvent(xE, keybd, deactivateGrab, count); else - DeliverFocusedEvent(keybd, xE, sprite.win, count); + DeliverFocusedEvent(keybd, xE, sprite->win, count); if (deactivateGrab) (*keybd->DeactivateGrab)(keybd); @@ -2891,6 +2968,13 @@ ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count register GrabPtr grab = mouse->grab; Bool deactivateGrab = FALSE; register ButtonClassPtr butc = mouse->button; + SpritePtr pSprite = sprite; + +#ifdef MPX + if (IsMPDev(mouse)) + pSprite = &mpsprites[mouse->id]; +#endif + #ifdef XKB XkbSrvInfoPtr xkbi= inputInfo.keyboard->key->xkbInfo; #endif @@ -2926,7 +3010,7 @@ ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count /* see comment in EnqueueEvents regarding the next three lines */ if (xE->u.u.type == MotionNotify) XE_KBPTR.root = - WindowTable[sprite.hotPhys.pScreen->myNum]->drawable.id; + WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id; eventinfo.events = xE; eventinfo.count = count; CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo); @@ -2938,8 +3022,8 @@ ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count register BYTE *kptr; int bit; - XE_KBPTR.rootX = sprite.hot.x; - XE_KBPTR.rootY = sprite.hot.y; + XE_KBPTR.rootX = pSprite->hot.x; + XE_KBPTR.rootY = pSprite->hot.y; key = xE->u.u.detail; kptr = &butc->down[key >> 3]; @@ -2980,12 +3064,12 @@ ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count FatalError("bogus pointer event from ddx"); } } - else if (!CheckMotion(xE)) + else if (!CheckMotion(xE, mouse)) return; if (grab) DeliverGrabbedEvent(xE, mouse, deactivateGrab, count); else - DeliverDeviceEvents(sprite.win, xE, NullGrab, NullWindow, + DeliverDeviceEvents(pSprite->win, xE, NullGrab, NullWindow, mouse, count); if (deactivateGrab) (*mouse->DeactivateGrab)(mouse); @@ -3235,8 +3319,8 @@ EnterLeaveEvent( event.u.u.type = type; event.u.u.detail = detail; event.u.enterLeave.time = currentTime.milliseconds; - event.u.enterLeave.rootX = sprite.hot.x; - event.u.enterLeave.rootY = sprite.hot.y; + event.u.enterLeave.rootX = sprite->hot.x; + event.u.enterLeave.rootY = sprite->hot.y; /* Counts on the same initial structure of crossing & button events! */ FixUpEventFromWindow(&event, pWin, None, FALSE); /* Enter/Leave events always set child */ @@ -3441,7 +3525,7 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) if ((fromWin == NullWindow) || (fromWin == PointerRootWin)) { if (fromWin == PointerRootWin) - FocusOutEvents(dev, sprite.win, ROOT, mode, NotifyPointer, + FocusOutEvents(dev, sprite->win, ROOT, mode, NotifyPointer, TRUE); /* Notify all the roots */ #ifdef PANORAMIX @@ -3454,8 +3538,8 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) } else { - if (IsParent(fromWin, sprite.win)) - FocusOutEvents(dev, sprite.win, fromWin, mode, NotifyPointer, + if (IsParent(fromWin, sprite->win)) + FocusOutEvents(dev, sprite->win, fromWin, mode, NotifyPointer, FALSE); FocusEvent(dev, FocusOut, mode, NotifyNonlinear, fromWin); /* next call catches the root too, if the screen changed */ @@ -3471,7 +3555,7 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) for (i=0; iwin, NullWindow, mode, NotifyPointer, TRUE); } else @@ -3479,7 +3563,7 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) if ((fromWin == NullWindow) || (fromWin == PointerRootWin)) { if (fromWin == PointerRootWin) - FocusOutEvents(dev, sprite.win, ROOT, mode, NotifyPointer, + FocusOutEvents(dev, sprite->win, ROOT, mode, NotifyPointer, TRUE); #ifdef PANORAMIX if ( !noPanoramiXExtension ) @@ -3492,8 +3576,8 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) (void)FocusInEvents(dev, ROOT, toWin, toWin, mode, NotifyNonlinearVirtual, TRUE); FocusEvent(dev, FocusIn, mode, NotifyNonlinear, toWin); - if (IsParent(toWin, sprite.win)) - (void)FocusInEvents(dev, toWin, sprite.win, NullWindow, mode, + if (IsParent(toWin, sprite->win)) + (void)FocusInEvents(dev, toWin, sprite->win, NullWindow, mode, NotifyPointer, FALSE); } else @@ -3504,21 +3588,21 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) FocusOutEvents(dev, fromWin->parent, toWin, mode, NotifyVirtual, FALSE); FocusEvent(dev, FocusIn, mode, NotifyInferior, toWin); - if ((IsParent(toWin, sprite.win)) && - (sprite.win != fromWin) && - (!IsParent(fromWin, sprite.win)) && - (!IsParent(sprite.win, fromWin))) - (void)FocusInEvents(dev, toWin, sprite.win, NullWindow, + if ((IsParent(toWin, sprite->win)) && + (sprite->win != fromWin) && + (!IsParent(fromWin, sprite->win)) && + (!IsParent(sprite->win, fromWin))) + (void)FocusInEvents(dev, toWin, sprite->win, NullWindow, mode, NotifyPointer, FALSE); } else if (IsParent(fromWin, toWin)) { - if ((IsParent(fromWin, sprite.win)) && - (sprite.win != fromWin) && - (!IsParent(toWin, sprite.win)) && - (!IsParent(sprite.win, toWin))) - FocusOutEvents(dev, sprite.win, fromWin, mode, + if ((IsParent(fromWin, sprite->win)) && + (sprite->win != fromWin) && + (!IsParent(toWin, sprite->win)) && + (!IsParent(sprite->win, toWin))) + FocusOutEvents(dev, sprite->win, fromWin, mode, NotifyPointer, FALSE); FocusEvent(dev, FocusOut, mode, NotifyInferior, fromWin); (void)FocusInEvents(dev, fromWin, toWin, toWin, mode, @@ -3530,8 +3614,8 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) /* neither fromWin or toWin is child of other */ WindowPtr common = CommonAncestor(toWin, fromWin); /* common == NullWindow ==> different screens */ - if (IsParent(fromWin, sprite.win)) - FocusOutEvents(dev, sprite.win, fromWin, mode, + if (IsParent(fromWin, sprite->win)) + FocusOutEvents(dev, sprite->win, fromWin, mode, NotifyPointer, FALSE); FocusEvent(dev, FocusOut, mode, NotifyNonlinear, fromWin); if (fromWin->parent != NullWindow) @@ -3541,8 +3625,8 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) (void)FocusInEvents(dev, common, toWin, toWin, mode, NotifyNonlinearVirtual, FALSE); FocusEvent(dev, FocusIn, mode, NotifyNonlinear, toWin); - if (IsParent(toWin, sprite.win)) - (void)FocusInEvents(dev, toWin, sprite.win, NullWindow, + if (IsParent(toWin, sprite->win)) + (void)FocusInEvents(dev, toWin, sprite->win, NullWindow, mode, NotifyPointer, FALSE); } } @@ -3808,7 +3892,7 @@ ProcChangeActivePointerGrab(ClientPtr client) grab->cursor = newCursor; if (newCursor) newCursor->refcnt++; - PostNewCursor(); + PostNewCursor(inputInfo.pointer); if (oldCursor) FreeCursor(oldCursor, (Cursor)0); grab->eventMask = stuff->eventMask; @@ -3958,15 +4042,15 @@ ProcQueryPointer(ClientPtr client) rep.mask = mouse->button->state | inputInfo.keyboard->key->state; rep.length = 0; rep.root = (ROOT)->drawable.id; - rep.rootX = sprite.hot.x; - rep.rootY = sprite.hot.y; + rep.rootX = sprite->hot.x; + rep.rootY = sprite->hot.y; rep.child = None; - if (sprite.hot.pScreen == pWin->drawable.pScreen) + if (sprite->hot.pScreen == pWin->drawable.pScreen) { rep.sameScreen = xTrue; - rep.winX = sprite.hot.x - pWin->drawable.x; - rep.winY = sprite.hot.y - pWin->drawable.y; - for (t = sprite.win; t; t = t->parent) + rep.winX = sprite->hot.x - pWin->drawable.x; + rep.winY = sprite->hot.y - pWin->drawable.y; + for (t = sprite->win; t; t = t->parent) if (t->parent == pWin) { rep.child = t->drawable.id; @@ -4001,7 +4085,19 @@ InitEvents() { int i; - sprite.hot.pScreen = sprite.hotPhys.pScreen = (ScreenPtr)NULL; + sprite = (SpritePtr)xalloc(sizeof(SpriteRec)); + if (!sprite) + FatalError("failed to allocate sprite struct"); + +#ifdef MPX + mpsprites = (SpritePtr)xalloc(MAX_DEVICES * sizeof(SpriteRec)); + if (!mpsprites) + FatalError("failed to allocate MPX sprite structs"); + xfree(sprite); + sprite = &mpsprites[1]; +#endif + + sprite->hot.pScreen = sprite->hotPhys.pScreen = (ScreenPtr)NULL; inputInfo.numDevices = 0; inputInfo.devices = (DeviceIntPtr)NULL; inputInfo.off_devices = (DeviceIntPtr)NULL; @@ -4020,13 +4116,34 @@ InitEvents() #ifdef XEVIE xeviewin = #endif - sprite.win = NullWindow; - sprite.current = NullCursor; - sprite.hotLimits.x1 = 0; - sprite.hotLimits.y1 = 0; - sprite.hotLimits.x2 = 0; - sprite.hotLimits.y2 = 0; - sprite.confined = FALSE; + sprite->win = NullWindow; + sprite->current = NullCursor; + sprite->hotLimits.x1 = 0; + sprite->hotLimits.y1 = 0; + sprite->hotLimits.x2 = 0; + sprite->hotLimits.y2 = 0; + sprite->confined = FALSE; + +#ifdef MPX + { + int mpSpriteIdx = 0; + while(mpSpriteIdx < MAX_DEVICES) + { + SpritePtr pSprite = &mpsprites[mpSpriteIdx]; + pSprite->hot.pScreen = pSprite->hotPhys.pScreen = (ScreenPtr)NULL; + pSprite->win = NullWindow; + pSprite->current = NullCursor; + pSprite->hotLimits.x1 = 0; + pSprite->hotLimits.y1 = 0; + pSprite->hotLimits.x2 = 0; + pSprite->hotLimits.y2 = 0; + pSprite->confined = FALSE; + + mpSpriteIdx++; + } + } +#endif + syncEvents.replayDev = (DeviceIntPtr)NULL; syncEvents.replayWin = NullWindow; while (syncEvents.pending) @@ -4055,6 +4172,13 @@ CloseDownEvents(void) xfree(spriteTrace); spriteTrace = NULL; spriteTraceSize = 0; + +#ifdef MPX + /* sprite points to mpsprites[1] in MPX, don't free it separately */ + xfree(mpsprites); +#else + xfree(sprite); +#endif } int @@ -4092,7 +4216,7 @@ ProcSendEvent(ClientPtr client) } if (stuff->destination == PointerWindow) - pWin = sprite.win; + pWin = sprite->win; else if (stuff->destination == InputFocus) { WindowPtr inputFocus = inputInfo.keyboard->focus->win; @@ -4105,10 +4229,10 @@ ProcSendEvent(ClientPtr client) if (inputFocus == PointerRootWin) inputFocus = ROOT; - if (IsParent(inputFocus, sprite.win)) + if (IsParent(inputFocus, sprite->win)) { effectiveFocus = inputFocus; - pWin = sprite.win; + pWin = sprite->win; } else effectiveFocus = pWin = inputFocus; @@ -4499,12 +4623,12 @@ ProcRecolorCursor(ClientPtr client) pscr = screenInfo.screens[nscr]; #ifdef PANORAMIX if(!noPanoramiXExtension) - displayed = (pscr == sprite.screen); + displayed = (pscr == sprite->screen); else #endif - displayed = (pscr == sprite.hotPhys.pScreen); + displayed = (pscr == sprite->hotPhys.pScreen); ( *pscr->RecolorCursor)(pscr, pCursor, - (pCursor == sprite.current) && displayed); + (pCursor == sprite->current) && displayed); } return (Success); } diff --git a/include/cursor.h b/include/cursor.h index bdf4fd301..b28f8db5b 100644 --- a/include/cursor.h +++ b/include/cursor.h @@ -59,6 +59,8 @@ SOFTWARE. #define ARGB_CURSOR #endif +struct _DeviceIntRec; + typedef struct _Cursor *CursorPtr; typedef struct _CursorMetric *CursorMetricPtr; @@ -133,9 +135,10 @@ extern void NewCurrentScreen( int /*x*/, int /*y*/); -extern Bool PointerConfinedToScreen(void); +extern Bool PointerConfinedToScreen(struct _DeviceIntRec* /* pDev */); extern void GetSpritePosition( + struct _DeviceIntRec* /* pDev */, int * /*px*/, int * /*py*/); diff --git a/mi/mieq.c b/mi/mieq.c index 30a61e609..2d1238810 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -239,11 +239,9 @@ mieqProcessInputEvents() } #ifdef MPX - /* MPX devices send both core and Xi events. Depending on what - * event we have, dev is set to either the core pointer or the - * device. This gives us the right processing function but we need - * to pass the right device in too. - * Any device that is not a MP device is processed as usual. + /* MPX devices send both core and Xi events. + * Use dev to get the correct processing function but supply + * e->pDev to pass the correct device */ if (e->pDev->isMPDev) dev->public.processInputProc(e->event, e->pDev, e->nevents); @@ -252,11 +250,7 @@ mieqProcessInputEvents() dev->public.processInputProc(e->event, dev, e->nevents); } #ifdef MPX - /* - * This is inefficient as we update the sprite for each event rather - * than at the end of the event queue. But we don't know if the - * next event is from the same device, so it's better to do it here. - */ + /* Update the sprite now. Next event may be from different device. */ if (e->event[0].u.u.type == MotionNotify && (e->pDev->isMPDev || e->pDev->coreEvents)) { diff --git a/mi/mipointer.c b/mi/mipointer.c index d3f5a5471..27692234c 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -1,5 +1,5 @@ /* - * mipointer.c + * miPointer->c */ @@ -65,7 +65,7 @@ static unsigned long miPointerGeneration = 0; * until more than one pointer device exists. */ -static miPointerRec miPointer; +static miPointerPtr miPointer; #ifdef MPX /* Multipointers */ @@ -144,19 +144,27 @@ miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) /* * set up the pointer object */ - miPointer.pScreen = NULL; - miPointer.pSpriteScreen = NULL; - miPointer.pCursor = NULL; - miPointer.pSpriteCursor = NULL; - miPointer.limits.x1 = 0; - miPointer.limits.x2 = 32767; - miPointer.limits.y1 = 0; - miPointer.limits.y2 = 32767; - miPointer.confined = FALSE; - miPointer.x = 0; - miPointer.y = 0; + miPointer = (miPointerPtr)xalloc(sizeof(miPointerRec)); + if (!miPointer) + { + xfree(pScreenPriv); + return FALSE; + } + miPointer->pScreen = NULL; + miPointer->pSpriteScreen = NULL; + miPointer->pCursor = NULL; + miPointer->pSpriteCursor = NULL; + miPointer->limits.x1 = 0; + miPointer->limits.x2 = 32767; + miPointer->limits.y1 = 0; + miPointer->limits.y2 = 32767; + miPointer->confined = FALSE; + miPointer->x = 0; + miPointer->y = 0; #ifdef MPX + xfree(miPointer); + miPointer = &miMPPointers[1]; /* * Set up pointer objects for multipointer devices. */ @@ -188,10 +196,10 @@ miPointerCloseScreen (index, pScreen) int mpPointerIdx = 0; SetupScreen(pScreen); - if (pScreen == miPointer.pScreen) - miPointer.pScreen = 0; - if (pScreen == miPointer.pSpriteScreen) - miPointer.pSpriteScreen = 0; + if (pScreen == miPointer->pScreen) + miPointer->pScreen = 0; + if (pScreen == miPointer->pSpriteScreen) + miPointer->pSpriteScreen = 0; #ifdef MPX while(mpPointerIdx < MAX_DEVICES) { @@ -249,8 +257,8 @@ miPointerDisplayCursor (pScreen, pCursor) } #endif - miPointer.pCursor = pCursor; - miPointer.pScreen = pScreen; + miPointer->pCursor = pCursor; + miPointer->pScreen = pScreen; miPointerUpdateSprite(inputInfo.pointer); return TRUE; } @@ -261,14 +269,13 @@ miPointerConstrainCursor (pDev, pScreen, pBox) ScreenPtr pScreen; BoxPtr pBox; { + miPointerPtr pPointer = miPointer; #ifdef MPX if (IsMPDev(pDev)) - { - miMPPointers[pDev->id].limits = *pBox; - } + pPointer = &miMPPointers[pDev->id]; #endif - miPointer.limits = *pBox; - miPointer.confined = PointerConfinedToScreen(); + pPointer->limits = *pBox; + pPointer->confined = PointerConfinedToScreen(pDev); } /*ARGSUSED*/ @@ -320,7 +327,7 @@ miPointerWarpCursor (pScreen, x, y) SetupScreen (pScreen); - if (miPointer.pScreen != pScreen) + if (miPointer->pScreen != pScreen) (*pScreenPriv->screenFuncs->NewEventScreen) (pScreen, TRUE); if (GenerateEvent) @@ -331,16 +338,16 @@ miPointerWarpCursor (pScreen, x, y) { /* everything from miPointerMove except the event and history */ - if (!pScreenPriv->waitForUpdate && pScreen == miPointer.pSpriteScreen) + if (!pScreenPriv->waitForUpdate && pScreen == miPointer->pSpriteScreen) { - miPointer.devx = x; - miPointer.devy = y; - if(!miPointer.pCursor->bits->emptyMask) + miPointer->devx = x; + miPointer->devy = y; + if(!miPointer->pCursor->bits->emptyMask) (*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y); } - miPointer.x = x; - miPointer.y = y; - miPointer.pScreen = pScreen; + miPointer->x = x; + miPointer->y = y; + miPointer->pScreen = pScreen; } } @@ -367,7 +374,7 @@ miPointerUpdateSprite (DeviceIntPtr pDev) miPointerScreenPtr pScreenPriv; CursorPtr pCursor; int x, y, devx, devy; - miPointerPtr pointer; + miPointerPtr pPointer; #ifdef MPX if (!pDev || @@ -379,66 +386,66 @@ miPointerUpdateSprite (DeviceIntPtr pDev) #ifdef MPX if (IsMPDev(pDev)) - pointer = &miMPPointers[pDev->id]; + pPointer = &miMPPointers[pDev->id]; else - pointer = &miPointer; + pPointer = miPointer; #endif - pScreen = pointer->pScreen; + pScreen = pPointer->pScreen; if (!pScreen) return; - x = pointer->x; - y = pointer->y; - devx = pointer->devx; - devy = pointer->devy; + x = pPointer->x; + y = pPointer->y; + devx = pPointer->devx; + devy = pPointer->devy; pScreenPriv = GetScreenPrivate (pScreen); /* * if the cursor has switched screens, disable the sprite * on the old screen */ - if (pScreen != pointer->pSpriteScreen) + if (pScreen != pPointer->pSpriteScreen) { - if (pointer->pSpriteScreen) + if (pPointer->pSpriteScreen) { miPointerScreenPtr pOldPriv; - pOldPriv = GetScreenPrivate (pointer->pSpriteScreen); - if (pointer->pCursor) + pOldPriv = GetScreenPrivate (pPointer->pSpriteScreen); + if (pPointer->pCursor) { (*pOldPriv->spriteFuncs->SetCursor) - (pDev, pointer->pSpriteScreen, NullCursor, 0, 0); + (pDev, pPointer->pSpriteScreen, NullCursor, 0, 0); } - (*pOldPriv->screenFuncs->CrossScreen) (pointer->pSpriteScreen, FALSE); + (*pOldPriv->screenFuncs->CrossScreen) (pPointer->pSpriteScreen, FALSE); } (*pScreenPriv->screenFuncs->CrossScreen) (pScreen, TRUE); (*pScreenPriv->spriteFuncs->SetCursor) - (pDev, pScreen, pointer->pCursor, x, y); - pointer->devx = x; - pointer->devy = y; - pointer->pSpriteCursor = pointer->pCursor; - pointer->pSpriteScreen = pScreen; + (pDev, pScreen, pPointer->pCursor, x, y); + pPointer->devx = x; + pPointer->devy = y; + pPointer->pSpriteCursor = pPointer->pCursor; + pPointer->pSpriteScreen = pScreen; } /* * if the cursor has changed, display the new one */ - else if (pointer->pCursor != pointer->pSpriteCursor) + else if (pPointer->pCursor != pPointer->pSpriteCursor) { - pCursor = pointer->pCursor; + pCursor = pPointer->pCursor; if (pCursor->bits->emptyMask && !pScreenPriv->showTransparent) pCursor = NullCursor; (*pScreenPriv->spriteFuncs->SetCursor) (pDev, pScreen, pCursor, x, y); - pointer->devx = x; - pointer->devy = y; - pointer->pSpriteCursor = pointer->pCursor; + pPointer->devx = x; + pPointer->devy = y; + pPointer->pSpriteCursor = pPointer->pCursor; } else if (x != devx || y != devy) { - pointer->devx = x; - pointer->devy = y; - if(!pointer->pCursor->bits->emptyMask) + pPointer->devx = x; + pPointer->devy = y; + if(!pPointer->pCursor->bits->emptyMask) (*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y); } } @@ -451,7 +458,7 @@ miPointerUpdateSprite (DeviceIntPtr pDev) void miPointerDeltaCursor (int dx, int dy, unsigned long time) { - int x = miPointer.x + dx, y = miPointer.y + dy; + int x = miPointer->x + dx, y = miPointer->y + dy; miPointerSetPosition(inputInfo.pointer, &x, &y, time); } @@ -480,8 +487,8 @@ miPointerSetScreen(DeviceIntPtr pDev, int screen_no, int x, int y) } #endif { - miPointer.limits.x2 = pScreen->width; - miPointer.limits.y2 = pScreen->height; + miPointer->limits.x2 = pScreen->width; + miPointer->limits.y2 = pScreen->height; } } @@ -498,7 +505,7 @@ miPointerGetScreen(DeviceIntPtr pDev) if (IsMPDev(pDev)) return miMPPointers[pDev->id].pScreen; #endif - return miPointer.pScreen; + return miPointer->pScreen; } /* Move the pointer to x, y on the current screen, update the sprite, and @@ -517,15 +524,15 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y, unsigned long time) ScreenPtr pScreen; ScreenPtr newScreen; - miPointerPtr pointer; + miPointerPtr pPointer; #ifdef MPX if (IsMPDev(pDev)) - pointer = &(miMPPointers[pDev->id]); + pPointer = &(miMPPointers[pDev->id]); else #endif - pointer = &miPointer; + pPointer = miPointer; - pScreen = pointer->pScreen; + pScreen = pPointer->pScreen; if (!pScreen) return; /* called before ready */ @@ -540,7 +547,7 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y, unsigned long time) if (*x < 0 || *x >= pScreen->width || *y < 0 || *y >= pScreen->height) { pScreenPriv = GetScreenPrivate (pScreen); - if (!pointer->confined) + if (!pPointer->confined) { newScreen = pScreen; (*pScreenPriv->screenFuncs->CursorOffScreen) (&newScreen, x, y); @@ -550,23 +557,24 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y, unsigned long time) (*pScreenPriv->screenFuncs->NewEventScreen) (pScreen, FALSE); pScreenPriv = GetScreenPrivate (pScreen); /* Smash the confine to the new screen */ - pointer->limits.x2 = pScreen->width; - pointer->limits.y2 = pScreen->height; + pPointer->limits.x2 = pScreen->width; + pPointer->limits.y2 = pScreen->height; } } } /* Constrain the sprite to the current limits. */ - if (*x < pointer->limits.x1) - *x = pointer->limits.x1; - if (*x >= pointer->limits.x2) - *x = pointer->limits.x2 - 1; - if (*y < pointer->limits.y1) - *y = pointer->limits.y1; - if (*y >= pointer->limits.y2) - *y = pointer->limits.y2 - 1; + if (*x < pPointer->limits.x1) + *x = pPointer->limits.x1; + if (*x >= pPointer->limits.x2) + *x = pPointer->limits.x2 - 1; + if (*y < pPointer->limits.y1) + *y = pPointer->limits.y1; + if (*y >= pPointer->limits.y2) + *y = pPointer->limits.y2 - 1; - if (pointer->x == *x && pointer->y == *y && pointer->pScreen == pScreen) - return; + if (pPointer->x == *x && pPointer->y == *y && + pPointer->pScreen == pScreen) + return; miPointerMoved(pDev, pScreen, *x, *y, time); } @@ -589,8 +597,8 @@ miPointerGetPosition(DeviceIntPtr pDev, int *x, int *y) else #endif { - *x = miPointer.x; - *y = miPointer.y; + *x = miPointer->x; + *y = miPointer->y; } } @@ -605,30 +613,30 @@ void miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, unsigned long time) { - miPointerPtr pointer; + miPointerPtr pPointer; SetupScreen(pScreen); #ifdef MPX if (IsMPDev(pDev)) - pointer = &miMPPointers[pDev->id]; + pPointer = &miMPPointers[pDev->id]; else #endif - pointer = &miPointer; + pPointer = miPointer; if (pDev && (pDev->coreEvents || pDev == inputInfo.pointer #ifdef MPX || pDev->isMPDev #endif ) && - !pScreenPriv->waitForUpdate && pScreen == miPointer.pSpriteScreen) + !pScreenPriv->waitForUpdate && pScreen == pPointer->pSpriteScreen) { - pointer->devx = x; - pointer->devy = y; - if(!pointer->pCursor->bits->emptyMask) + pPointer->devx = x; + pPointer->devy = y; + if(!pPointer->pCursor->bits->emptyMask) (*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y); } - pointer->x = x; - pointer->y = y; - pointer->pScreen = pScreen; + pPointer->x = x; + pPointer->y = y; + pPointer->pScreen = pScreen; } diff --git a/xfixes/cursor.c b/xfixes/cursor.c index c75e74442..22f9b0942 100755 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -355,7 +355,7 @@ ProcXFixesGetCursorImage (ClientPtr client) pCursor = CursorCurrent; if (!pCursor) return BadCursor; - GetSpritePosition (&x, &y); + GetSpritePosition (inputInfo.pointer, &x, &y); width = pCursor->bits->width; height = pCursor->bits->height; npixels = width * height; @@ -503,7 +503,7 @@ ProcXFixesGetCursorImageAndName (ClientPtr client) pCursor = CursorCurrent; if (!pCursor) return BadCursor; - GetSpritePosition (&x, &y); + GetSpritePosition (inputInfo.pointer, &x, &y); width = pCursor->bits->width; height = pCursor->bits->height; npixels = width * height; diff --git a/xkb/ddxDevBtn.c b/xkb/ddxDevBtn.c index 3de8f8721..dd7d4459c 100644 --- a/xkb/ddxDevBtn.c +++ b/xkb/ddxDevBtn.c @@ -60,7 +60,7 @@ int nAxes, i, count; if (nAxes > 6) nAxes = 6; - GetSpritePosition(&x,&y); + GetSpritePosition(dev, &x,&y); btn= (deviceKeyButtonPointer *) &events[0]; val= (deviceValuator *) &events[1]; if (press) btn->type= DeviceButtonPress; diff --git a/xkb/ddxFakeBtn.c b/xkb/ddxFakeBtn.c index f7b746b05..3f23542fe 100644 --- a/xkb/ddxFakeBtn.c +++ b/xkb/ddxFakeBtn.c @@ -49,7 +49,7 @@ DevicePtr ptr; if ((ptr = LookupPointerDevice())==NULL) return; - GetSpritePosition(&x,&y); + GetSpritePosition(inputInfo.pointer, &x,&y); ev.u.u.type = event; ev.u.u.detail = button; ev.u.keyButtonPointer.time = GetTimeInMillis(); diff --git a/xkb/ddxFakeMtn.c b/xkb/ddxFakeMtn.c index a19819fd7..3dd733b32 100644 --- a/xkb/ddxFakeMtn.c +++ b/xkb/ddxFakeMtn.c @@ -53,7 +53,7 @@ XkbDDXFakePointerMotion(unsigned flags,int x,int y) int oldX,oldY; ScreenPtr pScreen, oldScreen; - GetSpritePosition(&oldX, &oldY); + GetSpritePosition(inputInfo.pointer, &oldX, &oldY); pScreen = oldScreen = GetSpriteWindow()->drawable.pScreen; #ifdef PANORAMIX diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index e0bf89c7b..7b074b53f 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -875,7 +875,7 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(xkbi->device); if ((filter->keycode!=0)&&(filter->keycode!=keycode)) return 1; - GetSpritePosition(&x,&y); + GetSpritePosition(inputInfo.pointer, &x,&y); ev.u.keyButtonPointer.time = GetTimeInMillis(); ev.u.keyButtonPointer.rootX = x; ev.u.keyButtonPointer.rootY = y; From efd4f3c6ffec804c68ba5df17cc117da264fb7c4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 21 Nov 2006 20:31:30 +1030 Subject: [PATCH 016/634] dix: WindowsRestructured() calls CheckMotion() on all devices mi: core pointer was checked twice in miSpriteReportDamage, miSpriteInstallColormap, miSpriteStoreColors, miSpriteSaveDoomedAreas and miSpriteRealiseCursor using damage bug (see comment in file) to avoid artefacts --- Changelog | 12 +++ dix/events.c | 12 ++- mi/misprite.c | 205 +++++++++++++++++++++++++----------------------- mi/mispritest.h | 15 +++- 4 files changed, 141 insertions(+), 103 deletions(-) diff --git a/Changelog b/Changelog index d872517fe..40ccea37c 100644 --- a/Changelog +++ b/Changelog @@ -58,6 +58,18 @@ Files: xfixes/cursor.c mi/mieq.c +dix: WindowsRestructured() calls CheckMotion() on all devices + +mi: core pointer was checked twice in miSpriteReportDamage, + miSpriteInstallColormap, miSpriteStoreColors, miSpriteSaveDoomedAreas + and miSpriteRealiseCursor + using damage bug (see comment in file) to avoid artefacts + +Files: + dix/events.c + mi/misprite.c + mi/mispritest.h + == 20.11.06 == mi: moved core pointer information from miSpriteScreenRec into a diff --git a/dix/events.c b/dix/events.c index 2def70465..a06a05196 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2072,7 +2072,7 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev) xeviehot.y = pSprite->hot.y; #endif pSprite->hotPhys = pSprite->hot; -#ifndef MPX +#ifndef MPX /* XXX ndef!! */ if ((pSprite->hotPhys.x != XE_KBPTR.rootX) || (pSprite->hotPhys.y != XE_KBPTR.rootY)) { @@ -2113,7 +2113,17 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev) _X_EXPORT void WindowsRestructured() { +#ifdef MPX + DeviceIntPtr pDev = inputInfo.devices; + while(pDev) + { + if (pDev != inputInfo.keyboard) + CheckMotion((xEvent *)NULL, pDev); + pDev = pDev->next; + } +#else (void) CheckMotion((xEvent *)NULL, inputInfo.pointer); +#endif } #ifdef PANORAMIX diff --git a/mi/misprite.c b/mi/misprite.c index 81e51edcb..dcb9e608f 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -69,7 +69,7 @@ in this Software without prior written authorization from The Open Group. # include "inputstr.h" /* for MAX_DEVICES */ #endif -#define SPRITE_DEBUG_ENABLE 0 +#define SPRITE_DEBUG_ENABLE 1 #if SPRITE_DEBUG_ENABLE #define SPRITE_DEBUG(x) ErrorF x #else @@ -152,12 +152,6 @@ miSpriteReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - if (pScreenPriv->cp->isUp && - RECT_IN_REGION (pScreen, pRegion, &pScreenPriv->cp->saved) != rgnOUT) - { - SPRITE_DEBUG(("Damage remove\n")); - miSpriteRemoveCursor (pScreenPriv->cp, pScreen); - } #ifdef MPX { @@ -175,6 +169,13 @@ miSpriteReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure) mpCursorIdx++; } } +#else + if (pScreenPriv->cp->isUp && + RECT_IN_REGION (pScreen, pRegion, &pScreenPriv->cp->saved) != rgnOUT) + { + SPRITE_DEBUG(("Damage remove\n")); + miSpriteRemoveCursor (pScreenPriv->cp, pScreen); + } #endif } @@ -310,6 +311,8 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs) pScreenPriv->cp = &(pScreenPriv->mpCursors[1]); #endif + damageRegister = 0; + return TRUE; } @@ -388,7 +391,7 @@ miSpriteGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine) ORG_OVERLAP(&pMPCursor->saved,pDrawable->x,pDrawable->y, sx, sy, w, h)) { - SPRITE_DEBUG("GetImage remove MPX\n"); + SPRITE_DEBUG(("GetImage remove MPX\n")); } miSpriteRemoveCursor(pMPCursor, pScreen); mpCursorIdx++; @@ -588,12 +591,6 @@ miSpriteBlockHandler (i, blockData, pTimeout, pReadmask) SCREEN_EPILOGUE(pScreen, BlockHandler); - if (!pPriv->cp->isUp && pPriv->cp->shouldBeUp) - { - SPRITE_DEBUG (("BlockHandler restore\n")); - miSpriteRestoreCursor (pPriv->cp, pScreen); - } - #ifdef MPX { int mpCursorIdx = 0; @@ -609,6 +606,13 @@ miSpriteBlockHandler (i, blockData, pTimeout, pReadmask) mpCursorIdx++; } } +#else + if (!pPriv->cp->isUp && pPriv->cp->shouldBeUp) + { + SPRITE_DEBUG (("BlockHandler restore\n")); + miSpriteRestoreCursor (pPriv->cp, pScreen); + } + #endif } @@ -627,13 +631,6 @@ miSpriteInstallColormap (pMap) SCREEN_EPILOGUE(pScreen, InstallColormap); - pPriv->cp->pInstalledMap = pMap; - if (pPriv->cp->pColormap != pMap) - { - pPriv->cp->checkPixels = TRUE; - if (pPriv->cp->isUp) - miSpriteRemoveCursor (pPriv->cp, pScreen); - } #ifdef MPX { @@ -651,6 +648,14 @@ miSpriteInstallColormap (pMap) mpCursorIdx++; } } +#else + pPriv->cp->pInstalledMap = pMap; + if (pPriv->cp->pColormap != pMap) + { + pPriv->cp->checkPixels = TRUE; + if (pPriv->cp->isUp) + miSpriteRemoveCursor (pPriv->cp, pScreen); + } #endif } @@ -675,14 +680,6 @@ miSpriteStoreColors (pMap, ndef, pdef) SCREEN_EPILOGUE(pScreen, StoreColors); - if (pPriv->cp->pColormap == pMap) - { - updated = 0; - pVisual = pMap->pVisual; - if (pVisual->class == DirectColor) - { - /* Direct color - match on any of the subfields */ - #define MaskMatch(a,b,mask) (((a) & (pVisual->mask)) == ((b) & (pVisual->mask))) #define UpdateDAC(dev, plane,dac,mask) {\ @@ -697,39 +694,6 @@ miSpriteStoreColors (pMap, ndef, pdef) UpdateDAC(dev, plane,green,greenMask) \ UpdateDAC(dev, plane,blue,blueMask) - for (i = 0; i < ndef; i++) - { - CheckDirect (pPriv->cp, SOURCE_COLOR) - CheckDirect (pPriv->cp, MASK_COLOR) - } - } - else - { - /* PseudoColor/GrayScale - match on exact pixel */ - for (i = 0; i < ndef; i++) - { - if (pdef[i].pixel == pPriv->cp->colors[SOURCE_COLOR].pixel) - { - pPriv->cp->colors[SOURCE_COLOR] = pdef[i]; - if (++updated == 2) - break; - } - if (pdef[i].pixel == pPriv->cp->colors[MASK_COLOR].pixel) - { - pPriv->cp->colors[MASK_COLOR] = pdef[i]; - if (++updated == 2) - break; - } - } - } - if (updated) - { - pPriv->cp->checkPixels = TRUE; - if (pPriv->cp->isUp) - miSpriteRemoveCursor (pPriv->cp, pScreen); - } - } - #ifdef MPX { int mpCursorIdx = 0; @@ -781,6 +745,47 @@ miSpriteStoreColors (pMap, ndef, pdef) mpCursorIdx++; } } +#else + if (pPriv->cp->pColormap == pMap) + { + updated = 0; + pVisual = pMap->pVisual; + if (pVisual->class == DirectColor) + { + /* Direct color - match on any of the subfields */ + + for (i = 0; i < ndef; i++) + { + CheckDirect (pPriv->cp, SOURCE_COLOR) + CheckDirect (pPriv->cp, MASK_COLOR) + } + } + else + { + /* PseudoColor/GrayScale - match on exact pixel */ + for (i = 0; i < ndef; i++) + { + if (pdef[i].pixel == pPriv->cp->colors[SOURCE_COLOR].pixel) + { + pPriv->cp->colors[SOURCE_COLOR] = pdef[i]; + if (++updated == 2) + break; + } + if (pdef[i].pixel == pPriv->cp->colors[MASK_COLOR].pixel) + { + pPriv->cp->colors[MASK_COLOR] = pdef[i]; + if (++updated == 2) + break; + } + } + } + if (updated) + { + pPriv->cp->checkPixels = TRUE; + if (pPriv->cp->isUp) + miSpriteRemoveCursor (pPriv->cp, pScreen); + } + } #endif } @@ -839,20 +844,6 @@ miSpriteSaveDoomedAreas (pWin, pObscured, dx, dy) SCREEN_PROLOGUE (pScreen, SaveDoomedAreas); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - if (pScreenPriv->cp->isUp) - { - cursorBox = pScreenPriv->cp->saved; - - if (dx || dy) - { - cursorBox.x1 += dx; - cursorBox.y1 += dy; - cursorBox.x2 += dx; - cursorBox.y2 += dy; - } - if (RECT_IN_REGION( pScreen, pObscured, &cursorBox) != rgnOUT) - miSpriteRemoveCursor (pScreenPriv->cp, pScreen); - } #ifdef MPX { int mpCursorIdx = 0; @@ -877,6 +868,21 @@ miSpriteSaveDoomedAreas (pWin, pObscured, dx, dy) mpCursorIdx++; } } +#else + if (pScreenPriv->cp->isUp) + { + cursorBox = pScreenPriv->cp->saved; + + if (dx || dy) + { + cursorBox.x1 += dx; + cursorBox.y1 += dy; + cursorBox.x2 += dx; + cursorBox.y2 += dy; + } + if (RECT_IN_REGION( pScreen, pObscured, &cursorBox) != rgnOUT) + miSpriteRemoveCursor (pScreenPriv->cp, pScreen); + } #endif (*pScreen->SaveDoomedAreas) (pWin, pObscured, dx, dy); @@ -899,8 +905,6 @@ miSpriteRealizeCursor (pDev, pScreen, pCursor) miSpriteScreenPtr pScreenPriv; pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - if (pCursor == pScreenPriv->cp->pCursor) - pScreenPriv->cp->checkPixels = TRUE; #ifdef MPX { int mpCursorIdx = 0; @@ -914,6 +918,9 @@ miSpriteRealizeCursor (pDev, pScreen, pCursor) mpCursorIdx++; } } +#else + if (pCursor == pScreenPriv->cp->pCursor) + pScreenPriv->cp->checkPixels = TRUE; #endif return (*pScreenPriv->funcs->RealizeCursor) (pScreen, pCursor); @@ -942,37 +949,37 @@ miSpriteSetCursor (pDev, pScreen, pCursor, x, y) miSpriteScreenPtr pScreenPriv; pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - miCursorInfoPtr pointer = pScreenPriv->cp; + miCursorInfoPtr pPointer = pScreenPriv->cp; #ifdef MPX if (IsMPDev(pDev)) - pointer = &pScreenPriv->mpCursors[pDev->id]; + pPointer = &pScreenPriv->mpCursors[pDev->id]; #endif if (!pCursor) { - pointer->shouldBeUp = FALSE; - if (pointer->isUp) - miSpriteRemoveCursor (pointer, pScreen); - pointer->pCursor = 0; + pPointer->shouldBeUp = FALSE; + if (pPointer->isUp) + miSpriteRemoveCursor (pPointer, pScreen); + pPointer->pCursor = 0; return; } - pointer->shouldBeUp = TRUE; - if (pointer->x == x && - pointer->y == y && - pointer->pCursor == pCursor && - !pointer->checkPixels) + pPointer->shouldBeUp = TRUE; + if (pPointer->x == x && + pPointer->y == y && + pPointer->pCursor == pCursor && + !pPointer->checkPixels) { return; } - pointer->x = x; - pointer->y = y; - pointer->pCacheWin = NullWindow; - if (pointer->checkPixels || pointer->pCursor != pCursor) + pPointer->x = x; + pPointer->y = y; + pPointer->pCacheWin = NullWindow; + if (pPointer->checkPixels || pPointer->pCursor != pCursor) { - pointer->pCursor = pCursor; - miSpriteFindColors (pointer, pScreen); + pPointer->pCursor = pCursor; + miSpriteFindColors (pPointer, pScreen); } - if (pointer->isUp) { + if (pPointer->isUp) { #if 0 /* FIXME: Disabled for MPX, should be rewritten */ int sx, sy; @@ -1038,14 +1045,14 @@ miSpriteSetCursor (pDev, pScreen, pCursor, x, y) #endif { SPRITE_DEBUG (("SetCursor remove\n")); - miSpriteRemoveCursor (pointer, pScreen); + miSpriteRemoveCursor (pPointer, pScreen); } } - if (!pointer->isUp && pointer->pCursor) + if (!pPointer->isUp && pPointer->pCursor) { SPRITE_DEBUG (("SetCursor restore\n")); - miSpriteRestoreCursor (pointer, pScreen); + miSpriteRestoreCursor (pPointer, pScreen); } } diff --git a/mi/mispritest.h b/mi/mispritest.h index ff4bb4a7d..0ba5365ad 100644 --- a/mi/mispritest.h +++ b/mi/mispritest.h @@ -97,17 +97,26 @@ typedef struct { #define MASK_COLOR 1 static int damageRegister = 0; +/* + * FIXME: MPX uses a bug at the moment. The semaphore system in place will + * call miSpriteIsUpTRUE multiple times and thus DamageUnregister() will never + * be called in miSpriteIsUpFALSE. + * This gets rid of cursor rendering artefacts but I don't know how this + * affects applications. + * Without any semaphore system in place DamageRegister will be called twice + * and segfault. + */ #define miSpriteIsUpTRUE(pDevCursor, pScreen, pScreenPriv) if (!pDevCursor->isUp) { \ pDevCursor->isUp = TRUE; \ if (!damageRegister ) { \ - damageRegister++; \ DamageRegister (&(*pScreen->GetScreenPixmap) (pScreen)->drawable, pScreenPriv->pDamage); \ } \ + damageRegister++; \ } #define miSpriteIsUpFALSE(pDevCursor, pScreen, pScreenPriv) if (pDevCursor->isUp) { \ - if (damageRegister) { \ - damageRegister--; \ + damageRegister--; \ + if (!damageRegister) { \ DamageUnregister (&(*pScreen->GetScreenPixmap) (pScreen)->drawable, pScreenPriv->pDamage); \ } \ pDevCursor->isUp = FALSE; \ From 70383105de279df553874efa56b37a7b3e426ea1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 22 Nov 2006 15:27:16 +1030 Subject: [PATCH 017/634] mi: added DevToSprite() conversion function fixed miSpriteRealize to use passed pDev argument instead of looping. dix: changed sprite dependency and added MPX functionality to parts of events.c (XineramaChangeToCursor, XineramaCheckPhysLimits, XineramaConstrainCursor) Xi: fix: accessing other->buttons for keyboard segfaulted the server --- Changelog | 18 ++++++++++++ Xi/exevents.c | 6 +--- dix/events.c | 77 ++++++++++++++++++++++++++++++++------------------ mi/mipointer.c | 23 ++++++++++++++- mi/misprite.c | 34 +++++++++++++++------- 5 files changed, 115 insertions(+), 43 deletions(-) diff --git a/Changelog b/Changelog index 40ccea37c..93f1455d4 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,22 @@ MPX Changelog file +== 22.11.06 == + +mi: added DevToSprite() conversion function + fixed miSpriteRealize to use passed pDev argument instead of looping. + +dix: changed sprite dependency and added MPX functionality to parts of + events.c (XineramaChangeToCursor, XineramaCheckPhysLimits, + XineramaConstrainCursor) + +Xi: fix: accessing other->buttons for keyboard segfaulted the server + +Files: + mi/misprite.c + mi/mipointer.c + dix/events.c + Xi/exevents.c + + == 21.11.06 == mi: added MPX to miSpriteReportDamage added id field to miCursorInfoPtr, required to pass through to miDC diff --git a/Xi/exevents.c b/Xi/exevents.c index 7f7e12886..13687e3a5 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -125,11 +125,7 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count) key = xE->u.u.detail; NoticeEventTime(xE); xE->u.keyButtonPointer.state = inputInfo.keyboard->key->state | -#ifdef MPX - other->button->state; -#else - inputInfo.pointer->button->state; -#endif + inputInfo.pointer->button->state; /* FIXME: change for MPX */ bit = 1 << (key & 7); } if (DeviceEventCallback) { diff --git a/dix/events.c b/dix/events.c index a06a05196..bb6bcfc41 100644 --- a/dix/events.c +++ b/dix/events.c @@ -388,10 +388,19 @@ XineramaSetCursorPosition( static void -XineramaConstrainCursor(void) +XineramaConstrainCursor(DeviceIntPtr pDev) { - ScreenPtr pScreen = sprite->screen; - BoxRec newBox = sprite->physLimits; + SpritePtr pSprite = sprite; + ScreenPtr pScreen; + BoxRec newBox; + +#ifdef MPX + if (IsMPDev(pDev)) + pSprite = &mpsprites[pDev->id]; +#endif + + pScreen = pSprite->screen; + newBox = pSprite->physLimits; /* Translate the constraining box to the screen the sprite is actually on */ @@ -400,40 +409,46 @@ XineramaConstrainCursor(void) newBox.y1 += panoramiXdataPtr[0].y - panoramiXdataPtr[pScreen->myNum].y; newBox.y2 += panoramiXdataPtr[0].y - panoramiXdataPtr[pScreen->myNum].y; - (* pScreen->ConstrainCursor)(inputInfo.pointer, pScreen, &newBox); + (* pScreen->ConstrainCursor)(pDev, pScreen, &newBox); } static void XineramaCheckPhysLimits( + DeviceIntPtr pDev, CursorPtr cursor, Bool generateEvents ){ HotSpot new; + SpritePtr pSprite = sprite; if (!cursor) return; +#ifdef MPX + if (IsMPDev(pDev)) + pSprite = &mpsprites[pDev->id]; +#endif - new = sprite->hotPhys; + new = pSprite->hotPhys; /* I don't care what the DDX has to say about it */ - sprite->physLimits = sprite->hotLimits; + pSprite->physLimits = pSprite->hotLimits; /* constrain the pointer to those limits */ - if (new.x < sprite->physLimits.x1) - new.x = sprite->physLimits.x1; + if (new.x < pSprite->physLimits.x1) + new.x = pSprite->physLimits.x1; else - if (new.x >= sprite->physLimits.x2) - new.x = sprite->physLimits.x2 - 1; - if (new.y < sprite->physLimits.y1) - new.y = sprite->physLimits.y1; + if (new.x >= pSprite->physLimits.x2) + new.x = pSprite->physLimits.x2 - 1; + if (new.y < pSprite->physLimits.y1) + new.y = pSprite->physLimits.y1; else - if (new.y >= sprite->physLimits.y2) - new.y = sprite->physLimits.y2 - 1; + if (new.y >= pSprite->physLimits.y2) + new.y = pSprite->physLimits.y2 - 1; - if (sprite->hotShape) /* more work if the shape is a mess */ - ConfineToShape(inputInfo.pointer, sprite->hotShape, &new.x, &new.y); + if (pSprite->hotShape) /* more work if the shape is a mess */ + ConfineToShape(pDev, pSprite->hotShape, &new.x, &new.y); - if((new.x != sprite->hotPhys.x) || (new.y != sprite->hotPhys.y)) + if((new.x != pSprite->hotPhys.x) || (new.y != pSprite->hotPhys.y)) { XineramaSetCursorPosition (new.x, new.y, generateEvents); if (!generateEvents) @@ -441,7 +456,7 @@ XineramaCheckPhysLimits( } /* Tell DDX what the limits are */ - XineramaConstrainCursor(); + XineramaConstrainCursor(pDev); } @@ -655,7 +670,8 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents) sprite->confined = FALSE; sprite->confineWin = (pWin == WindowTable[0]) ? NullWindow : pWin; - XineramaCheckPhysLimits(sprite->current, generateEvents); + XineramaCheckPhysLimits(inputInfo.pointer, sprite->current, + generateEvents); } } @@ -663,15 +679,22 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents) static void XineramaChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) { - if (cursor != sprite->current) + SpritePtr pSprite = sprite; + +#ifdef MPX + if (IsMPDev(pDev)) + pSprite = &mpsprites[pDev->id]; +#endif + + if (cursor != pSprite->current) { - if ((sprite->current->bits->xhot != cursor->bits->xhot) || - (sprite->current->bits->yhot != cursor->bits->yhot)) - XineramaCheckPhysLimits(cursor, FALSE); - (*sprite->screen->DisplayCursor)(sprite->screen, cursor); - FreeCursor(sprite->current, (Cursor)0); - sprite->current = cursor; - sprite->current->refcnt++; + if ((pSprite->current->bits->xhot != cursor->bits->xhot) || + (pSprite->current->bits->yhot != cursor->bits->yhot)) + XineramaCheckPhysLimits(pDev, cursor, FALSE); + (*pSprite->screen->DisplayCursor)(pSprite->screen, cursor); + FreeCursor(pSprite->current, (Cursor)0); + pSprite->current = cursor; + pSprite->current->refcnt++; } } diff --git a/mi/mipointer.c b/mi/mipointer.c index 27692234c..f954ba656 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -227,8 +227,18 @@ miPointerRealizeCursor (pScreen, pCursor) DeviceIntPtr pDev = inputInfo.pointer; SetupScreen(pScreen); - +#ifdef MPX + pDev = inputInfo.devices; + while(pDev) + { + if (pDev != inputInfo.keyboard) + (*pScreenPriv->spriteFuncs->RealizeCursor) (pDev, pScreen, pCursor); + pDev = pDev->next; + } + return TRUE; +#else return (*pScreenPriv->spriteFuncs->RealizeCursor) (pDev, pScreen, pCursor); +#endif } static Bool @@ -239,7 +249,18 @@ miPointerUnrealizeCursor (pScreen, pCursor) DeviceIntPtr pDev = inputInfo.pointer; SetupScreen(pScreen); +#ifdef MPX + pDev = inputInfo.devices; + while(pDev) + { + if (pDev != inputInfo.keyboard) + (*pScreenPriv->spriteFuncs->UnrealizeCursor) (pDev, pScreen, pCursor); + pDev = pDev->next; + } + return TRUE; +#else return (*pScreenPriv->spriteFuncs->UnrealizeCursor) (pDev, pScreen, pCursor); +#endif } static Bool diff --git a/mi/misprite.c b/mi/misprite.c index dcb9e608f..8907a3da9 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -67,8 +67,11 @@ in this Software without prior written authorization from The Open Group. #ifdef MPX # include "inputstr.h" /* for MAX_DEVICES */ + +static miCursorInfoPtr DevToSprite(DeviceIntPtr pDev, ScreenPtr pScreen); #endif + #define SPRITE_DEBUG_ENABLE 1 #if SPRITE_DEBUG_ENABLE #define SPRITE_DEBUG(x) ErrorF x @@ -907,16 +910,9 @@ miSpriteRealizeCursor (pDev, pScreen, pCursor) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; #ifdef MPX { - int mpCursorIdx = 0; - while (mpCursorIdx < MAX_DEVICES) - { - miCursorInfoPtr pMPCursor = &pScreenPriv->mpCursors[mpCursorIdx]; - - if (pCursor == pMPCursor->pCursor) - pMPCursor->checkPixels = TRUE; - - mpCursorIdx++; - } + miCursorInfoPtr pMPCursor = DevToSprite(pDev, pScreen); + if (pCursor == pMPCursor->pCursor) + pMPCursor->checkPixels = TRUE; } #else if (pCursor == pScreenPriv->cp->pCursor) @@ -1174,3 +1170,21 @@ miSpriteComputeSaved (pDevCursor, pScreen) pDevCursor->saved.x2 = pDevCursor->saved.x1 + w + wpad * 2; pDevCursor->saved.y2 = pDevCursor->saved.y1 + h + hpad * 2; } + +#ifdef MPX +static miCursorInfoPtr DevToSprite(DeviceIntPtr pDev, ScreenPtr pScreen) +{ + miSpriteScreenPtr pScreenPriv; + pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; + int mpCursorIdx = 0; + while(mpCursorIdx < MAX_DEVICES) + { + miCursorInfoPtr pMPCursor = &pScreenPriv->mpCursors[mpCursorIdx]; + if (pMPCursor->id == pDev->id) + return pMPCursor; + mpCursorIdx++; + } + return pScreenPriv->cp; +} + +#endif From 8c16f21d5df08b028e93440d632939a5fdbf5876 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 22 Nov 2006 17:06:47 +1030 Subject: [PATCH 018/634] dix GetSpriteWindow() adjusted for MPX added device dependency for MPX to DoEnterLeaveEvents, EnterLeaveEvents, EnterNotifies, LeaveNotifies and FixUpEventFromWindow. --- Changelog | 13 +++++++ Xext/security.c | 4 +- Xi/exevents.c | 6 +-- dix/events.c | 99 ++++++++++++++++++++++++++++++++---------------- include/dix.h | 2 +- xkb/ddxFakeMtn.c | 2 +- 6 files changed, 86 insertions(+), 40 deletions(-) diff --git a/Changelog b/Changelog index 93f1455d4..458060ccf 100644 --- a/Changelog +++ b/Changelog @@ -17,6 +17,19 @@ Files: Xi/exevents.c +dix GetSpriteWindow() adjusted for MPX + added device dependency for MPX to DoEnterLeaveEvents, + EnterLeaveEvents, EnterNotifies, LeaveNotifies and + FixUpEventFromWindow. + +Files: + Xext/security.c + Xi/exevents.c + ddx/ddxFakeMtn.c + dix/events.c + include/dix.h + + == 21.11.06 == mi: added MPX to miSpriteReportDamage added id field to miCursorInfoPtr, required to pass through to miDC diff --git a/Xext/security.c b/Xext/security.c index ac762794a..c1c8f1f8f 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -745,12 +745,12 @@ SecurityDetermineEventPropogationLimits( if (pFocusWin == PointerRootWin) { /* focus follows the pointer */ - *ppWin = GetSpriteWindow(); + *ppWin = GetSpriteWindow(dev); *ppStopWin = NULL; /* propogate all the way to the root */ } else { /* a real window is set for the focus */ - WindowPtr pSpriteWin = GetSpriteWindow(); + WindowPtr pSpriteWin = GetSpriteWindow(dev); *ppStopWin = pFocusWin->parent; /* don't go past the focus window */ /* if the pointer is in a subwindow of the focus window, start diff --git a/Xi/exevents.c b/Xi/exevents.c index 13687e3a5..d89c379e9 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -276,9 +276,9 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count) if (grab) DeliverGrabbedEvent(xE, other, deactivateDeviceGrab, count); else if (other->focus) - DeliverFocusedEvent(other, xE, GetSpriteWindow(), count); + DeliverFocusedEvent(other, xE, GetSpriteWindow(other), count); else - DeliverDeviceEvents(GetSpriteWindow(), xE, NullGrab, NullWindow, + DeliverDeviceEvents(GetSpriteWindow(other), xE, NullGrab, NullWindow, other, count); if (deactivateDeviceGrab == TRUE) @@ -781,7 +781,7 @@ SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate, { WindowPtr pWin; WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */ - WindowPtr spriteWin = GetSpriteWindow(); + WindowPtr spriteWin = GetSpriteWindow(d); if (dest == PointerWindow) pWin = spriteWin; diff --git a/dix/events.c b/dix/events.c index bb6bcfc41..492e4a415 100644 --- a/dix/events.c +++ b/dix/events.c @@ -270,6 +270,7 @@ _X_EXPORT HotSpot xeviehot; #endif static void DoEnterLeaveEvents( + DeviceIntPtr pDev, WindowPtr fromWin, WindowPtr toWin, int mode @@ -614,8 +615,9 @@ XineramaCheckMotion(xEvent *xE, DeviceIntPtr pDev) if (prevSpriteWin != NullWindow) { if (!xE) UpdateCurrentTimeIf(); - DoEnterLeaveEvents(prevSpriteWin, pSprite->win, NotifyNormal); - } + DoEnterLeaveEvents(pDev, prevSpriteWin, pSprite->win, + NotifyNormal); + } PostNewCursor(pDev); return FALSE; } @@ -991,8 +993,13 @@ GetCurrentRootWindow() } _X_EXPORT WindowPtr -GetSpriteWindow() +GetSpriteWindow(DeviceIntPtr pDev) { +#ifdef MPX + if(IsMPDev(pDev)) + return mpsprites[pDev->id].win; +#endif + return sprite->win; } @@ -1321,7 +1328,7 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab, sprite->hotPhys.x = sprite->hotPhys.y = 0; ConfineCursorToWindow(grab->confineTo, FALSE, TRUE); } - DoEnterLeaveEvents(oldWin, grab->window, NotifyGrab); + DoEnterLeaveEvents(mouse, oldWin, grab->window, NotifyGrab); mouse->valuator->motionHintWindow = NullWindow; if (syncEvents.playingEvents) mouse->grabTime = syncEvents.time; @@ -1351,7 +1358,7 @@ DeactivatePointerGrab(register DeviceIntPtr mouse) if (dev->sync.other == grab) dev->sync.other = NullGrab; } - DoEnterLeaveEvents(grab->window, sprite->win, NotifyUngrab); + DoEnterLeaveEvents(mouse, grab->window, sprite->win, NotifyUngrab); if (grab->confineTo) ConfineCursorToWindow(ROOT, FALSE, FALSE); PostNewCursor(inputInfo.pointer); @@ -1823,11 +1830,18 @@ MaybeDeliverEventsToClient(register WindowPtr pWin, xEvent *pEvents, static void FixUpEventFromWindow( + DeviceIntPtr pDev, xEvent *xE, WindowPtr pWin, Window child, Bool calcChild) { + SpritePtr pSprite = sprite; +#ifdef MPX + if (IsMPDev(pDev)) + pSprite = &mpsprites[pDev->id]; +#endif + if (calcChild) { WindowPtr w=spriteTrace[spriteTraceGood-1]; @@ -1857,7 +1871,7 @@ FixUpEventFromWindow( } XE_KBPTR.root = ROOT->drawable.id; XE_KBPTR.event = pWin->drawable.id; - if (sprite->hot.pScreen == pWin->drawable.pScreen) + if (pSprite->hot.pScreen == pWin->drawable.pScreen) { XE_KBPTR.sameScreen = xTrue; XE_KBPTR.child = child; @@ -1896,7 +1910,7 @@ DeliverDeviceEvents(register WindowPtr pWin, register xEvent *xE, GrabPtr grab, { if (inputMasks && (inputMasks->inputEvents[mskidx] & filter)) { - FixUpEventFromWindow(xE, pWin, child, FALSE); + FixUpEventFromWindow(dev, xE, pWin, child, FALSE); deliveries = DeliverEventsToWindow(pWin, xE, count, filter, grab, mskidx); if (deliveries > 0) @@ -1921,7 +1935,7 @@ DeliverDeviceEvents(register WindowPtr pWin, register xEvent *xE, GrabPtr grab, { if ((wOtherEventMasks(pWin)|pWin->eventMask) & filter) { - FixUpEventFromWindow(xE, pWin, child, FALSE); + FixUpEventFromWindow(dev, xE, pWin, child, FALSE); deliveries = DeliverEventsToWindow(pWin, xE, count, filter, grab, 0); if (deliveries > 0) @@ -2125,8 +2139,9 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev) if (prevSpriteWin != NullWindow) { if (!xE) UpdateCurrentTimeIf(); - DoEnterLeaveEvents(prevSpriteWin, pSprite->win, NotifyNormal); - } + DoEnterLeaveEvents(pDev, prevSpriteWin, pSprite->win, + NotifyNormal); + } PostNewCursor(pDev); return FALSE; } @@ -2600,7 +2615,7 @@ CheckPassiveGrabsOnWindow( #endif (*device->ActivateGrab)(device, grab, currentTime, TRUE); - FixUpEventFromWindow(xE, grab->window, None, TRUE); + FixUpEventFromWindow(device, xE, grab->window, None, TRUE); (void) TryClientEvents(rClient(grab), xE, count, filters[xE->u.u.type], @@ -2705,7 +2720,7 @@ DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count) return; } /* just deliver it to the focus window */ - FixUpEventFromWindow(xE, focus, None, FALSE); + FixUpEventFromWindow(inputInfo.pointer, xE, focus, None, FALSE); if (xE->u.u.type & EXTENSION_EVENT_BASE) mskidx = keybd->id; (void)DeliverEventsToWindow(focus, xE, count, filters[xE->u.u.type], @@ -2745,7 +2760,7 @@ DeliverGrabbedEvent(register xEvent *xE, register DeviceIntPtr thisDev, } if (!deliveries) { - FixUpEventFromWindow(xE, grab->window, None, TRUE); + FixUpEventFromWindow(thisDev, xE, grab->window, None, TRUE); deliveries = TryClientEvents(rClient(grab), xE, count, (Mask)grab->eventMask, filters[xE->u.u.type], grab); @@ -3321,6 +3336,7 @@ CommonAncestor( static void EnterLeaveEvent( + DeviceIntPtr pDev, int type, int mode, int detail, @@ -3330,7 +3346,7 @@ EnterLeaveEvent( xEvent event; register DeviceIntPtr keybd = inputInfo.keyboard; WindowPtr focus; - register DeviceIntPtr mouse = inputInfo.pointer; + register DeviceIntPtr mouse = pDev; register GrabPtr grab = mouse->grab; Mask mask; @@ -3355,7 +3371,7 @@ EnterLeaveEvent( event.u.enterLeave.rootX = sprite->hot.x; event.u.enterLeave.rootY = sprite->hot.y; /* Counts on the same initial structure of crossing & button events! */ - FixUpEventFromWindow(&event, pWin, None, FALSE); + FixUpEventFromWindow(mouse, &event, pWin, None, FALSE); /* Enter/Leave events always set child */ event.u.enterLeave.child = child; event.u.enterLeave.flags = event.u.keyButtonPointer.sameScreen ? @@ -3406,18 +3422,26 @@ EnterLeaveEvent( } static void -EnterNotifies(WindowPtr ancestor, WindowPtr child, int mode, int detail) +EnterNotifies(DeviceIntPtr pDev, + WindowPtr ancestor, + WindowPtr child, + int mode, + int detail) { WindowPtr parent = child->parent; if (ancestor == parent) return; - EnterNotifies(ancestor, parent, mode, detail); - EnterLeaveEvent(EnterNotify, mode, detail, parent, child->drawable.id); -} + EnterNotifies(pDev, ancestor, parent, mode, detail); + EnterLeaveEvent(pDev, EnterNotify, mode, detail, parent, + child->drawable.id); } static void -LeaveNotifies(WindowPtr child, WindowPtr ancestor, int mode, int detail) +LeaveNotifies(DeviceIntPtr pDev, + WindowPtr child, + WindowPtr ancestor, + int mode, + int detail) { register WindowPtr pWin; @@ -3425,36 +3449,45 @@ LeaveNotifies(WindowPtr child, WindowPtr ancestor, int mode, int detail) return; for (pWin = child->parent; pWin != ancestor; pWin = pWin->parent) { - EnterLeaveEvent(LeaveNotify, mode, detail, pWin, child->drawable.id); - child = pWin; + EnterLeaveEvent(pDev, LeaveNotify, mode, detail, pWin, + child->drawable.id); + child = pWin; } } static void -DoEnterLeaveEvents(WindowPtr fromWin, WindowPtr toWin, int mode) +DoEnterLeaveEvents(DeviceIntPtr pDev, + WindowPtr fromWin, + WindowPtr toWin, + int mode) { if (fromWin == toWin) return; if (IsParent(fromWin, toWin)) { - EnterLeaveEvent(LeaveNotify, mode, NotifyInferior, fromWin, None); - EnterNotifies(fromWin, toWin, mode, NotifyVirtual); - EnterLeaveEvent(EnterNotify, mode, NotifyAncestor, toWin, None); + EnterLeaveEvent(pDev, LeaveNotify, mode, NotifyInferior, fromWin, + None); + EnterNotifies(pDev, fromWin, toWin, mode, + NotifyVirtual); + EnterLeaveEvent(pDev, EnterNotify, mode, NotifyAncestor, toWin, None); } else if (IsParent(toWin, fromWin)) { - EnterLeaveEvent(LeaveNotify, mode, NotifyAncestor, fromWin, None); - LeaveNotifies(fromWin, toWin, mode, NotifyVirtual); - EnterLeaveEvent(EnterNotify, mode, NotifyInferior, toWin, None); + EnterLeaveEvent(pDev, LeaveNotify, mode, NotifyAncestor, fromWin, + None); + LeaveNotifies(pDev, fromWin, toWin, mode, NotifyVirtual); + EnterLeaveEvent(pDev, EnterNotify, mode, NotifyInferior, toWin, None); } else { /* neither fromWin nor toWin is descendent of the other */ WindowPtr common = CommonAncestor(toWin, fromWin); /* common == NullWindow ==> different screens */ - EnterLeaveEvent(LeaveNotify, mode, NotifyNonlinear, fromWin, None); - LeaveNotifies(fromWin, common, mode, NotifyNonlinearVirtual); - EnterNotifies(common, toWin, mode, NotifyNonlinearVirtual); - EnterLeaveEvent(EnterNotify, mode, NotifyNonlinear, toWin, None); + EnterLeaveEvent(pDev, LeaveNotify, mode, NotifyNonlinear, fromWin, + None); + LeaveNotifies(pDev, fromWin, common, mode, NotifyNonlinearVirtual); + EnterNotifies(pDev, common, toWin, mode, NotifyNonlinearVirtual); + EnterLeaveEvent(pDev, EnterNotify, mode, NotifyNonlinear, toWin, + None); } } diff --git a/include/dix.h b/include/dix.h index a5a570a51..0c66d8d57 100644 --- a/include/dix.h +++ b/include/dix.h @@ -525,7 +525,7 @@ extern Bool IsParent( extern WindowPtr GetCurrentRootWindow(void); -extern WindowPtr GetSpriteWindow(void); +extern WindowPtr GetSpriteWindow(DeviceIntPtr pDev); extern void NoticeEventTime(xEventPtr /* xE */); diff --git a/xkb/ddxFakeMtn.c b/xkb/ddxFakeMtn.c index 3dd733b32..7e75c1586 100644 --- a/xkb/ddxFakeMtn.c +++ b/xkb/ddxFakeMtn.c @@ -54,7 +54,7 @@ int oldX,oldY; ScreenPtr pScreen, oldScreen; GetSpritePosition(inputInfo.pointer, &oldX, &oldY); - pScreen = oldScreen = GetSpriteWindow()->drawable.pScreen; + pScreen = oldScreen = GetSpriteWindow(inputInfo.pointer)->drawable.pScreen; #ifdef PANORAMIX if (!noPanoramiXExtension) { From f52d53e060d0468b658a565688d1f92c156405c7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 22 Nov 2006 17:58:57 +1030 Subject: [PATCH 019/634] dix: DeliverEventsToWindow adjusted for MPX mi: sprite debugging disabled --- Changelog | 36 +++++++++++++++++++++++++++++------- Xi/exevents.c | 12 ++++++------ dix/events.c | 44 ++++++++++++++++++++++---------------------- include/dix.h | 1 + mi/misprite.c | 2 +- 5 files changed, 59 insertions(+), 36 deletions(-) diff --git a/Changelog b/Changelog index 458060ccf..1f323ad26 100644 --- a/Changelog +++ b/Changelog @@ -13,9 +13,10 @@ Xi: fix: accessing other->buttons for keyboard segfaulted the server Files: mi/misprite.c mi/mipointer.c - dix/events.c - Xi/exevents.c + dix/events.c + Xi/exevents.c +____________________________________________________________ dix GetSpriteWindow() adjusted for MPX added device dependency for MPX to DoEnterLeaveEvents, @@ -23,11 +24,23 @@ dix GetSpriteWindow() adjusted for MPX FixUpEventFromWindow. Files: - Xext/security.c - Xi/exevents.c - ddx/ddxFakeMtn.c - dix/events.c - include/dix.h + Xext/security.c + Xi/exevents.c + ddx/ddxFakeMtn.c + dix/events.c + include/dix.h + +____________________________________________________________ + +dix: DeliverEventsToWindow adjusted for MPX + +mi: sprite debugging disabled + +Files: + dix/events.c + Xi/exevents.c + mi/misprite.c + include/dix.h == 21.11.06 == @@ -43,6 +56,7 @@ Files: TAG: MPX_BEFORE_MIDC_API_BREAK +____________________________________________________________ mi: added device ID to miSpriteCursorFuncRec functions added MPX code to midispcur.c @@ -55,6 +69,7 @@ Files: BUG: Core pointer changes whenever MPX cursor changes shape. +____________________________________________________________ mi: constrain MPX cursors to screen @@ -66,6 +81,7 @@ Files: TAG: MPX_BEFORE_DIX_API_BREAK +____________________________________________________________ dix: moved sprite from static to be pointer of type SpritePtr added SpriteRecs for MPX devices @@ -89,6 +105,8 @@ Files: xfixes/cursor.c mi/mieq.c +____________________________________________________________ + dix: WindowsRestructured() calls CheckMotion() on all devices mi: core pointer was checked twice in miSpriteReportDamage, @@ -112,6 +130,7 @@ Files: mi/misprite.c mi/mipointer.c +____________________________________________________________ mi: added MPX to miSprite functions. @@ -149,6 +168,7 @@ Files: hw/xfree86/ramdac/xf86Cursor.c hw/xfree86/rac/xf86RAC.c +____________________________________________________________ mi: added miCursorInfoRec to contain info of the MPX cursors. @@ -195,6 +215,7 @@ Files: configure.ac include/dix-config.h.in +____________________________________________________________ dix: added isMPdev field to _DeviceIntRec, is used in GetPointerEvents() @@ -210,6 +231,7 @@ Files: include/inputstr.h mi/mieq.c +____________________________________________________________ mieq: EQ processing handles MP devices diff --git a/Xi/exevents.c b/Xi/exevents.c index d89c379e9..ecbb1990a 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -394,7 +394,7 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, event.window = pWin->drawable.id; event.time = currentTime.milliseconds; - (void)DeliverEventsToWindow(pWin, (xEvent *) & event, 1, + (void)DeliverEventsToWindow(dev, pWin, (xEvent *) & event, 1, DeviceFocusChangeMask, NullGrab, dev->id); if ((type == DeviceFocusIn) && @@ -490,7 +490,7 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, } } - (void)DeliverEventsToWindow(pWin, (xEvent *) sev, evcount, + (void)DeliverEventsToWindow(dev, pWin, (xEvent *) sev, evcount, DeviceStateNotifyMask, NullGrab, dev->id); xfree(sev); } @@ -820,7 +820,7 @@ SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate, ev->u.u.type |= 0x80; if (propagate) { for (; pWin; pWin = pWin->parent) { - if (DeliverEventsToWindow(pWin, ev, count, mask, NullGrab, d->id)) + if (DeliverEventsToWindow(d, pWin, ev, count, mask, NullGrab, d->id)) return Success; if (pWin == effectiveFocus) return Success; @@ -830,7 +830,7 @@ SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate, break; } } else - (void)(DeliverEventsToWindow(pWin, ev, count, mask, NullGrab, d->id)); + (void)(DeliverEventsToWindow(d, pWin, ev, count, mask, NullGrab, d->id)); return Success; } @@ -1229,7 +1229,7 @@ FindInterestedChildren(DeviceIntPtr dev, WindowPtr p1, Mask mask, while (p1) { p2 = p1->firstChild; - (void)DeliverEventsToWindow(p1, ev, count, mask, NullGrab, dev->id); + (void)DeliverEventsToWindow(dev, p1, ev, count, mask, NullGrab, dev->id); FindInterestedChildren(dev, p2, mask, ev, count); p1 = p1->nextSib; } @@ -1249,7 +1249,7 @@ SendEventToAllWindows(DeviceIntPtr dev, Mask mask, xEvent * ev, int count) for (i = 0; i < screenInfo.numScreens; i++) { pWin = WindowTable[i]; - (void)DeliverEventsToWindow(pWin, ev, count, mask, NullGrab, dev->id); + (void)DeliverEventsToWindow(dev, pWin, ev, count, mask, NullGrab, dev->id); p1 = pWin->firstChild; FindInterestedChildren(dev, p1, mask, ev, count); } diff --git a/dix/events.c b/dix/events.c index 492e4a415..82d5d058f 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1673,8 +1673,8 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask, } int -DeliverEventsToWindow(register WindowPtr pWin, xEvent *pEvents, int count, - Mask filter, GrabPtr grab, int mskidx) +DeliverEventsToWindow(DeviceIntPtr pDev, register WindowPtr pWin, xEvent + *pEvents, int count, Mask filter, GrabPtr grab, int mskidx) { int deliveries = 0, nondeliveries = 0; int attempt; @@ -1736,7 +1736,7 @@ DeliverEventsToWindow(register WindowPtr pWin, xEvent *pEvents, int count, { GrabRec tempGrab; - tempGrab.device = inputInfo.pointer; + tempGrab.device = pDev; tempGrab.resource = client->clientAsMask; tempGrab.window = pWin; tempGrab.ownerEvents = (deliveryMask & OwnerGrabButtonMask) ? TRUE : FALSE; @@ -1745,11 +1745,11 @@ DeliverEventsToWindow(register WindowPtr pWin, xEvent *pEvents, int count, tempGrab.pointerMode = GrabModeAsync; tempGrab.confineTo = NullWindow; tempGrab.cursor = NullCursor; - (*inputInfo.pointer->ActivateGrab)(inputInfo.pointer, &tempGrab, + (*inputInfo.pointer->ActivateGrab)(pDev, &tempGrab, currentTime, TRUE); } else if ((type == MotionNotify) && deliveries) - inputInfo.pointer->valuator->motionHintWindow = pWin; + pDev->valuator->motionHintWindow = pWin; #ifdef XINPUT else { @@ -1911,7 +1911,7 @@ DeliverDeviceEvents(register WindowPtr pWin, register xEvent *xE, GrabPtr grab, if (inputMasks && (inputMasks->inputEvents[mskidx] & filter)) { FixUpEventFromWindow(dev, xE, pWin, child, FALSE); - deliveries = DeliverEventsToWindow(pWin, xE, count, filter, + deliveries = DeliverEventsToWindow(dev, pWin, xE, count, filter, grab, mskidx); if (deliveries > 0) return deliveries; @@ -1936,7 +1936,7 @@ DeliverDeviceEvents(register WindowPtr pWin, register xEvent *xE, GrabPtr grab, if ((wOtherEventMasks(pWin)|pWin->eventMask) & filter) { FixUpEventFromWindow(dev, xE, pWin, child, FALSE); - deliveries = DeliverEventsToWindow(pWin, xE, count, filter, + deliveries = DeliverEventsToWindow(dev, pWin, xE, count, filter, grab, 0); if (deliveries > 0) return deliveries; @@ -1971,20 +1971,20 @@ DeliverEvents(register WindowPtr pWin, register xEvent *xE, int count, if ((filter & SubstructureNotifyMask) && (xE->u.u.type != CreateNotify)) xE->u.destroyNotify.event = pWin->drawable.id; if (filter != StructureAndSubMask) - return DeliverEventsToWindow(pWin, xE, count, filter, NullGrab, 0); - deliveries = DeliverEventsToWindow(pWin, xE, count, StructureNotifyMask, + return DeliverEventsToWindow(inputInfo.pointer, pWin, xE, count, filter, NullGrab, 0); + deliveries = DeliverEventsToWindow(inputInfo.pointer, pWin, xE, count, StructureNotifyMask, NullGrab, 0); if (pWin->parent) { xE->u.destroyNotify.event = pWin->parent->drawable.id; - deliveries += DeliverEventsToWindow(pWin->parent, xE, count, + deliveries += DeliverEventsToWindow(inputInfo.pointer, pWin->parent, xE, count, SubstructureNotifyMask, NullGrab, 0); if (xE->u.u.type == ReparentNotify) { xE->u.destroyNotify.event = otherParent->drawable.id; - deliveries += DeliverEventsToWindow(otherParent, xE, count, - SubstructureNotifyMask, + deliveries += DeliverEventsToWindow(inputInfo.pointer, + otherParent, xE, count, SubstructureNotifyMask, NullGrab, 0); } } @@ -2723,7 +2723,7 @@ DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count) FixUpEventFromWindow(inputInfo.pointer, xE, focus, None, FALSE); if (xE->u.u.type & EXTENSION_EVENT_BASE) mskidx = keybd->id; - (void)DeliverEventsToWindow(focus, xE, count, filters[xE->u.u.type], + (void)DeliverEventsToWindow(keybd, focus, xE, count, filters[xE->u.u.type], NullGrab, mskidx); } @@ -3394,7 +3394,7 @@ EnterLeaveEvent( (void)TryClientEvents(rClient(grab), &event, 1, mask, filters[type], grab); else - (void)DeliverEventsToWindow(pWin, &event, 1, filters[type], + (void)DeliverEventsToWindow(pDev, pWin, &event, 1, filters[type], NullGrab, 0); } if ((type == EnterNotify) && (mask & KeymapStateMask)) @@ -3416,7 +3416,7 @@ EnterLeaveEvent( (void)TryClientEvents(rClient(grab), (xEvent *)&ke, 1, mask, KeymapStateMask, grab); else - (void)DeliverEventsToWindow(pWin, (xEvent *)&ke, 1, + (void)DeliverEventsToWindow(pDev, pWin, (xEvent *)&ke, 1, KeymapStateMask, NullGrab, 0); } } @@ -3507,8 +3507,8 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, register WindowPtr event.u.u.type = type; event.u.u.detail = detail; event.u.focus.window = pWin->drawable.id; - (void)DeliverEventsToWindow(pWin, &event, 1, filters[type], NullGrab, - 0); + (void)DeliverEventsToWindow(dev, pWin, &event, 1, filters[type], NullGrab, + 0); if ((type == FocusIn) && ((pWin->eventMask | wOtherEventMasks(pWin)) & KeymapStateMask)) { @@ -3523,7 +3523,7 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, register WindowPtr #endif memmove((char *)&ke.map[0], (char *)&dev->key->down[1], 31); ke.type = KeymapNotify; - (void)DeliverEventsToWindow(pWin, (xEvent *)&ke, 1, + (void)DeliverEventsToWindow(dev, pWin, (xEvent *)&ke, 1, KeymapStateMask, NullGrab, 0); } } @@ -4318,8 +4318,8 @@ ProcSendEvent(ClientPtr client) { for (;pWin; pWin = pWin->parent) { - if (DeliverEventsToWindow(pWin, &stuff->event, 1, stuff->eventMask, - NullGrab, 0)) + if (DeliverEventsToWindow(inputInfo.pointer, pWin, &stuff->event, + 1, stuff->eventMask, NullGrab, 0)) return Success; if (pWin == effectiveFocus) return Success; @@ -4329,8 +4329,8 @@ ProcSendEvent(ClientPtr client) } } else - (void)DeliverEventsToWindow(pWin, &stuff->event, 1, stuff->eventMask, - NullGrab, 0); + (void)DeliverEventsToWindow(inputInfo.pointer, pWin, &stuff->event, 1, + stuff->eventMask, NullGrab, 0); return Success; } diff --git a/include/dix.h b/include/dix.h index 0c66d8d57..d59cccc44 100644 --- a/include/dix.h +++ b/include/dix.h @@ -570,6 +570,7 @@ extern void ReleaseActiveGrabs( ClientPtr client); extern int DeliverEventsToWindow( + DeviceIntPtr /* pWin */, WindowPtr /* pWin */, xEventPtr /* pEvents */, int /* count */, diff --git a/mi/misprite.c b/mi/misprite.c index 8907a3da9..ec83e80c8 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -72,7 +72,7 @@ static miCursorInfoPtr DevToSprite(DeviceIntPtr pDev, ScreenPtr pScreen); #endif -#define SPRITE_DEBUG_ENABLE 1 +#define SPRITE_DEBUG_ENABLE 0 #if SPRITE_DEBUG_ENABLE #define SPRITE_DEBUG(x) ErrorF x #else From 1c7568b8a1417257fa67c7fca69aa253099b9461 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 23 Nov 2006 17:15:14 +1030 Subject: [PATCH 020/634] mi: closing memory leak, miPointer is freed in miPointerCloseScreen bugfix: uninitialized pPointer in miPointerGetPosition ifndef MPX adding DeviceIntPtr parameter to ScreenRec's cursor functions. cleanup of miPointer code to use same scheme in each function dix: MPHasCursor() function determines checking whether to invoke cursor rendering. animcur: adding DeviceIntPtr parameter to cursor functions but animcur relies on the core pointer right now. xfixes: adding DeviceIntPtr parameter to cursor functions but xfixes relies on the core pointer right now. rac: adding DeviceIntPtr parameter to cursor functions but RAC relies on the core pointer right now. ramdac: adding DeviceIntPtr parameter to cursor functions but ramdac relies on the core pointer right now. --- Changelog | 47 +++++- XTrap/xtrapddmi.c | 5 +- Xext/xtest.c | 4 +- dix/cursor.c | 143 +++++++++++++++---- dix/events.c | 120 ++++++++++------ hw/xfree86/common/xf86Cursor.c | 8 +- hw/xfree86/common/xf86RandR.c | 3 +- hw/xfree86/dri/dri.c | 3 +- hw/xfree86/rac/xf86RAC.c | 44 +++--- hw/xfree86/ramdac/xf86Cursor.c | 5 +- include/cursor.h | 1 + include/dix.h | 4 + include/inputstr.h | 2 +- include/scrnintstr.h | 7 + mi/mi.h | 1 + mi/micursor.c | 16 ++- mi/mieq.c | 2 +- mi/mipointer.c | 253 +++++++++++++++------------------ mi/mipointer.h | 2 + render/animcur.c | 50 ++++--- xfixes/cursor.c | 11 +- xkb/ddxFakeMtn.c | 4 +- 22 files changed, 466 insertions(+), 269 deletions(-) diff --git a/Changelog b/Changelog index 1f323ad26..66f12f84e 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,49 @@ MPX Changelog file +== 23.11.06 == +mi: closing memory leak, miPointer is freed in miPointerCloseScreen + bugfix: uninitialized pPointer in miPointerGetPosition ifndef MPX + adding DeviceIntPtr parameter to ScreenRec's cursor functions. + cleanup of miPointer code to use same scheme in each function + +dix: MPHasCursor() function determines checking whether to invoke + cursor rendering. + +animcur: adding DeviceIntPtr parameter to cursor functions but animcur relies + on the core pointer right now. + +xfixes: adding DeviceIntPtr parameter to cursor functions but xfixes relies on + the core pointer right now. + +rac: adding DeviceIntPtr parameter to cursor functions but RAC relies on + the core pointer right now. + +ramdac: adding DeviceIntPtr parameter to cursor functions but ramdac relies on + the core pointer right now. + +Files: + mi/mipointer.c + mi/mipointer.h + mi/micursor.c + mi/mi.h + mi/mieq.c + include/cursor.h + include/inputstr.h + include/scrnintstr.h + include/dix.h + dix/events.c + dix/cursor.c + Xext/xtest.c + render/animcur.c + xfixes/cursor.c + XTrap/xtrapddmi.c + xkb/ddxFakeMtn.c + hw/xfree86/common/xf86Cursor.c + hw/xfree86/common/xf86RandR.c + hw/xfree86/rac/xf86RAC.c + hw/xfree86/ramdac/xf86Cursor.c + hw/xfree86/dri/dri.c + + == 22.11.06 == mi: added DevToSprite() conversion function @@ -26,7 +71,7 @@ dix GetSpriteWindow() adjusted for MPX Files: Xext/security.c Xi/exevents.c - ddx/ddxFakeMtn.c + xkb/ddxFakeMtn.c dix/events.c include/dix.h diff --git a/XTrap/xtrapddmi.c b/XTrap/xtrapddmi.c index 73a20c1f6..c633b8d36 100644 --- a/XTrap/xtrapddmi.c +++ b/XTrap/xtrapddmi.c @@ -60,6 +60,7 @@ SOFTWARE. # include "extnsionst.h" /* Server ExtensionEntry definitions */ # include "scrnintstr.h" /* Screen struct */ #endif +#include "inputstr.h" #include #include @@ -130,8 +131,8 @@ int XETrapSimulateXEvent(register xXTrapInputReq *request, { /* Set new cursor position on screen */ XETrap_avail.data.cur_x = x; XETrap_avail.data.cur_y = y; - NewCurrentScreen (pScr, x, y); /* fix from amnonc@mercury.co.il */ - if (!(*pScr->SetCursorPosition)(pScr, x, y, xFalse)) + NewCurrentScreen (inputInfo.pointer, pScr, x, y); /* fix from amnonc@mercury.co.il */ + if (!(*pScr->SetCursorPosition)(inputInfo.pointer, pScr, x, y, xFalse)) { status = BadImplementation; } diff --git a/Xext/xtest.c b/Xext/xtest.c index 18111c0df..66c84d752 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -433,13 +433,13 @@ ProcXTestFakeInput(client) if (root != GetCurrentRootWindow()) #endif { - NewCurrentScreen(root->drawable.pScreen, + NewCurrentScreen(dev, root->drawable.pScreen, ev->u.keyButtonPointer.rootX, ev->u.keyButtonPointer.rootY); return client->noClientException; } (*root->drawable.pScreen->SetCursorPosition) - (root->drawable.pScreen, + (dev, root->drawable.pScreen, ev->u.keyButtonPointer.rootX, ev->u.keyButtonPointer.rootY, FALSE); break; diff --git a/dix/cursor.c b/dix/cursor.c index b9ede1f76..92297b923 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -59,6 +59,7 @@ SOFTWARE. #include "cursorstr.h" #include "dixfontstr.h" #include "opaque.h" +#include "inputstr.h" typedef struct _GlyphShare { FontPtr font; @@ -114,14 +115,26 @@ FreeCursor(pointer value, XID cid) CursorPtr pCurs = (CursorPtr)value; ScreenPtr pscr; + DeviceIntPtr pDev; if ( --pCurs->refcnt > 0) return(Success); + pDev = inputInfo.pointer; + for (nscr = 0; nscr < screenInfo.numScreens; nscr++) { pscr = screenInfo.screens[nscr]; - (void)( *pscr->UnrealizeCursor)( pscr, pCurs); +#ifdef MPX + pDev = inputInfo.devices; + while(pDev) + { +#endif + (void)( *pscr->UnrealizeCursor)(pDev, pscr, pCurs); +#ifdef MPX + pDev = pDev->next; + } +#endif } FreeCursorBits(pCurs->bits); xfree( pCurs); @@ -171,6 +184,7 @@ AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, CursorPtr pCurs; int nscr; ScreenPtr pscr; + DeviceIntPtr pDev; pCurs = (CursorPtr)xalloc(sizeof(CursorRec) + sizeof(CursorBits)); if (!pCurs) @@ -207,23 +221,62 @@ AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, pCurs->backGreen = backGreen; pCurs->backBlue = backBlue; + pDev = inputInfo.pointer; /* * realize the cursor for every screen */ for (nscr = 0; nscr < screenInfo.numScreens; nscr++) { - pscr = screenInfo.screens[nscr]; - if (!( *pscr->RealizeCursor)( pscr, pCurs)) - { - while (--nscr >= 0) - { - pscr = screenInfo.screens[nscr]; - ( *pscr->UnrealizeCursor)( pscr, pCurs); - } - FreeCursorBits(bits); - xfree(pCurs); - return (CursorPtr)NULL; - } + pscr = screenInfo.screens[nscr]; +#ifdef MPX + pDev = inputInfo.devices; + while(pDev) + { + if (MPHasCursor(pDev)) + { +#endif + if (!( *pscr->RealizeCursor)(pDev, pscr, pCurs)) + { +#ifdef MPX + /* Realize failed for device pDev on screen pscr. + * We have to assume that for all devices before, realize + * worked. We need to rollback all devices so far on the + * current screen and then all devices on previous + * screens. + */ + DeviceIntPtr pDevIt = inputInfo.devices; /*dev iterator*/ + while(pDevIt && pDevIt != pDev) + { + if (MPHasCursor(pDevIt)) + ( *pscr->UnrealizeCursor)(pDevIt, pscr, pCurs); + pDevIt = pDevIt->next; + } +#endif + while (--nscr >= 0) + { + pscr = screenInfo.screens[nscr]; +#ifdef MPX + /* now unrealize all devices on previous screens */ + pDevIt = inputInfo.devices; + while (pDevIt) + { + if (MPHasCursor(pDevIt)) + ( *pscr->UnrealizeCursor)(pDevIt, pscr, pCurs); + pDevIt = pDevIt->next; + } +#else + ( *pscr->UnrealizeCursor)(pDev, pscr, pCurs); +#endif + } + FreeCursorBits(bits); + xfree(pCurs); + return (CursorPtr)NULL; + } +#ifdef MPX + } + pDev = pDev->next; + } +#endif } return pCurs; } @@ -260,6 +313,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, int nscr; ScreenPtr pscr; GlyphSharePtr pShare; + DeviceIntPtr pDev; sourcefont = (FontPtr) SecurityLookupIDByType(client, source, RT_FONT, SecurityReadAccess); @@ -398,23 +452,62 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, pCurs->backGreen = backGreen; pCurs->backBlue = backBlue; + pDev = inputInfo.pointer; /* * realize the cursor for every screen */ for (nscr = 0; nscr < screenInfo.numScreens; nscr++) { - pscr = screenInfo.screens[nscr]; - if (!( *pscr->RealizeCursor)( pscr, pCurs)) - { - while (--nscr >= 0) - { - pscr = screenInfo.screens[nscr]; - ( *pscr->UnrealizeCursor)( pscr, pCurs); - } - FreeCursorBits(pCurs->bits); - xfree(pCurs); - return BadAlloc; - } + pscr = screenInfo.screens[nscr]; +#ifdef MPX + pDev = inputInfo.devices; + while(pDev) + { + if (MPHasCursor(pDev)) + { +#endif + if (!( *pscr->RealizeCursor)(pDev, pscr, pCurs)) + { +#ifdef MPX + /* Realize failed for device pDev on screen pscr. + * We have to assume that for all devices before, realize + * worked. We need to rollback all devices so far on the + * current screen and then all devices on previous + * screens. + */ + DeviceIntPtr pDevIt = inputInfo.devices; /*dev iterator*/ + while(pDevIt && pDevIt != pDev) + { + if (MPHasCursor(pDevIt)) + ( *pscr->UnrealizeCursor)(pDevIt, pscr, pCurs); + pDevIt = pDevIt->next; + } +#endif + while (--nscr >= 0) + { + pscr = screenInfo.screens[nscr]; +#ifdef MPX + /* now unrealize all devices on previous screens */ + pDevIt = inputInfo.devices; + while (pDevIt) + { + if (MPHasCursor(pDevIt)) + ( *pscr->UnrealizeCursor)(pDevIt, pscr, pCurs); + pDevIt = pDevIt->next; + } +#else + ( *pscr->UnrealizeCursor)(pDev, pscr, pCurs); +#endif + } + FreeCursorBits(bits); + xfree(pCurs); + return BadAlloc; + } +#ifdef MPX + } + pDev = pDev->next; + } +#endif } *ppCurs = pCurs; return Success; diff --git a/dix/events.c b/dix/events.c index 82d5d058f..d3b0e58bc 100644 --- a/dix/events.c +++ b/dix/events.c @@ -262,6 +262,19 @@ static SpritePtr sprite; /* info about the cursor sprite */ static SpritePtr mpsprites; /* info about the MPX sprites */ extern BOOL IsMPDev(DeviceIntPtr dev); + +/** + * True for the core pointer and any MPX device. + * False for any other device (including keyboards). + * Does ID checking for sane range as well. + */ +_X_EXPORT Bool +MPHasCursor(DeviceIntPtr pDev) +{ + return (pDev == inputInfo.pointer || + (pDev->isMPDev && pDev->id < MAX_DEVICES)); +} + #endif #ifdef XEVIE @@ -347,6 +360,7 @@ static void PostNewCursor(DeviceIntPtr pDev); static Bool XineramaSetCursorPosition( + DeviceIntPtr pDev, int x, int y, Bool generateEvent @@ -354,12 +368,18 @@ XineramaSetCursorPosition( ScreenPtr pScreen; BoxRec box; int i; + SpritePtr pSprite = sprite; + +#ifdef MPX + if (IsMPDev(pDev)) + pSprite = &mpsprites[pDev->id]; +#endif /* x,y are in Screen 0 coordinates. We need to decide what Screen to send the message too and what the coordinates relative to that screen are. */ - pScreen = sprite->screen; + pScreen = pSprite->screen; x += panoramiXdataPtr[0].x; y += panoramiXdataPtr[0].y; @@ -378,13 +398,13 @@ XineramaSetCursorPosition( } } - sprite->screen = pScreen; - sprite->hotPhys.x = x - panoramiXdataPtr[0].x; - sprite->hotPhys.y = y - panoramiXdataPtr[0].y; + pSprite->screen = pScreen; + pSprite->hotPhys.x = x - panoramiXdataPtr[0].x; + pSprite->hotPhys.y = y - panoramiXdataPtr[0].y; x -= panoramiXdataPtr[pScreen->myNum].x; y -= panoramiXdataPtr[pScreen->myNum].y; - return (*pScreen->SetCursorPosition)(pScreen, x, y, generateEvent); + return (*pScreen->SetCursorPosition)(pDev, pScreen, x, y, generateEvent); } @@ -451,7 +471,7 @@ XineramaCheckPhysLimits( if((new.x != pSprite->hotPhys.x) || (new.y != pSprite->hotPhys.y)) { - XineramaSetCursorPosition (new.x, new.y, generateEvents); + XineramaSetCursorPosition (pDev, new.x, new.y, generateEvents); if (!generateEvents) SyntheticMotion(new.x, new.y); } @@ -597,7 +617,7 @@ XineramaCheckMotion(xEvent *xE, DeviceIntPtr pDev) (pSprite->hotPhys.y != XE_KBPTR.rootY)) { XineramaSetCursorPosition( - pSprite->hotPhys.x, pSprite->hotPhys.y, FALSE); + pDev, pSprite->hotPhys.x, pSprite->hotPhys.y, FALSE); } XE_KBPTR.rootX = pSprite->hot.x; XE_KBPTR.rootY = pSprite->hot.y; @@ -693,7 +713,7 @@ XineramaChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) if ((pSprite->current->bits->xhot != cursor->bits->xhot) || (pSprite->current->bits->yhot != cursor->bits->yhot)) XineramaCheckPhysLimits(pDev, cursor, FALSE); - (*pSprite->screen->DisplayCursor)(pSprite->screen, cursor); + (*pSprite->screen->DisplayCursor)(pDev, pSprite->screen, cursor); FreeCursor(pSprite->current, (Cursor)0); pSprite->current = cursor; pSprite->current->refcnt++; @@ -785,7 +805,7 @@ CheckPhysLimits( new.pScreen = pScreen; else pScreen = new.pScreen; - (*pScreen->CursorLimits) (pScreen, cursor, &pSprite->hotLimits, + (*pScreen->CursorLimits) (pDev, pScreen, cursor, &pSprite->hotLimits, &pSprite->physLimits); pSprite->confined = confineToScreen; (* pScreen->ConstrainCursor)(pDev, pScreen, &pSprite->physLimits); @@ -808,8 +828,9 @@ CheckPhysLimits( { if (pScreen != pSprite->hotPhys.pScreen) pSprite->hotPhys = new; - (*pScreen->SetCursorPosition) (pScreen, new.x, new.y, generateEvents); - if (!generateEvents) + (*pScreen->SetCursorPosition) + (pDev, pScreen, new.x, new.y, generateEvents); + if (!generateEvents) SyntheticMotion(new.x, new.y); } } @@ -932,8 +953,9 @@ ChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) (pSprite->current->bits->yhot != cursor->bits->yhot)) CheckPhysLimits(pDev, cursor, FALSE, pSprite->confined, (ScreenPtr)NULL); - (*sprite->hotPhys.pScreen->DisplayCursor) (pSprite->hotPhys.pScreen, - cursor); + (*sprite->hotPhys.pScreen->DisplayCursor) (pDev, + pSprite->hotPhys.pScreen, + cursor); FreeCursor(pSprite->current, (Cursor)0); pSprite->current = cursor; pSprite->current->refcnt++; @@ -2208,10 +2230,9 @@ DefineInitialRootWindow(register WindowPtr win) { register ScreenPtr pScreen = win->drawable.pScreen; SpritePtr pSprite = sprite; + DeviceIntPtr pDev = inputInfo.pointer; #ifdef MPX int mpSpriteIdx = 0; - DeviceIntPtr pDev; - while (mpSpriteIdx < MAX_DEVICES) { @@ -2232,7 +2253,7 @@ DefineInitialRootWindow(register WindowPtr win) pSprite->current->refcnt++; spriteTraceGood = 1; ROOT = win; - (*pScreen->CursorLimits) ( pScreen, pSprite->current, + (*pScreen->CursorLimits) ( pDev, pScreen, pSprite->current, &pSprite->hotLimits, &pSprite->physLimits); pSprite->confined = FALSE; @@ -2241,18 +2262,20 @@ DefineInitialRootWindow(register WindowPtr win) pDev = inputInfo.devices; while(pDev) { - if (pDev->id == mpSpriteIdx) - (*pScreen->ConstrainCursor) (pDev, pScreen, &pSprite->physLimits); - + if (pDev->id == mpSpriteIdx && MPHasCursor(pDev)) + { +#endif + (*pScreen->ConstrainCursor) (pDev, pScreen, + &pSprite->physLimits); + (*pScreen->SetCursorPosition) (pDev, pScreen, pSprite->hot.x, + pSprite->hot.y, + FALSE); + (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current); +#ifdef MPX + } pDev = pDev->next; } -#else - (*pScreen->ConstrainCursor) (inputInfo.pointer, pScreen, - &pSprite->physLimits); #endif - (*pScreen->SetCursorPosition) (pScreen, pSprite->hot.x, pSprite->hot.y, - FALSE); - (*pScreen->DisplayCursor) (pScreen, pSprite->current); #ifdef PANORAMIX if(!noPanoramiXExtension) { @@ -2291,35 +2314,43 @@ WindowHasNewCursor(WindowPtr pWin) } _X_EXPORT void -NewCurrentScreen(ScreenPtr newScreen, int x, int y) +NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y) { - sprite->hotPhys.x = x; - sprite->hotPhys.y = y; + SpritePtr pSprite = sprite; +#ifdef MPX + if (IsMPDev(pDev)) + pSprite = &mpsprites[pDev->id]; +#endif + + pSprite->hotPhys.x = x; + pSprite->hotPhys.y = y; #ifdef PANORAMIX if(!noPanoramiXExtension) { - sprite->hotPhys.x += panoramiXdataPtr[newScreen->myNum].x - + pSprite->hotPhys.x += panoramiXdataPtr[newScreen->myNum].x - panoramiXdataPtr[0].x; - sprite->hotPhys.y += panoramiXdataPtr[newScreen->myNum].y - + pSprite->hotPhys.y += panoramiXdataPtr[newScreen->myNum].y - panoramiXdataPtr[0].y; - if (newScreen != sprite->screen) { - sprite->screen = newScreen; + if (newScreen != pSprite->screen) { + pSprite->screen = newScreen; /* Make sure we tell the DDX to update its copy of the screen */ - if(sprite->confineWin) - XineramaConfineCursorToWindow(sprite->confineWin, TRUE); + if(pSprite->confineWin) + XineramaConfineCursorToWindow(pSprite->confineWin, TRUE); else XineramaConfineCursorToWindow(WindowTable[0], TRUE); /* if the pointer wasn't confined, the DDX won't get told of the pointer warp so we reposition it here */ if(!syncEvents.playingEvents) - (*sprite->screen->SetCursorPosition)(sprite->screen, - sprite->hotPhys.x + panoramiXdataPtr[0].x - - panoramiXdataPtr[sprite->screen->myNum].x, - sprite->hotPhys.y + panoramiXdataPtr[0].y - - panoramiXdataPtr[sprite->screen->myNum].y, FALSE); + (*pSprite->screen->SetCursorPosition)( + pDev, + pSprite->screen, + pSprite->hotPhys.x + panoramiXdataPtr[0].x - + panoramiXdataPtr[pSprite->screen->myNum].x, + pSprite->hotPhys.y + panoramiXdataPtr[0].y - + panoramiXdataPtr[pSprite->screen->myNum].y, FALSE); } } else #endif - if (newScreen != sprite->hotPhys.pScreen) + if (newScreen != pSprite->hotPhys.pScreen) ConfineCursorToWindow(WindowTable[newScreen->myNum], TRUE, FALSE); } @@ -2430,7 +2461,7 @@ XineramaWarpPointer(ClientPtr client) if (sprite->hotShape) ConfineToShape(inputInfo.pointer, sprite->hotShape, &x, &y); - XineramaSetCursorPosition(x, y, TRUE); + XineramaSetCursorPosition(inputInfo.pointer, x, y, TRUE); return Success; } @@ -2518,11 +2549,12 @@ ProcWarpPointer(ClientPtr client) if (sprite->hotShape) ConfineToShape(inputInfo.pointer, sprite->hotShape, &x, &y); #endif - (*newScreen->SetCursorPosition)(newScreen, x, y, TRUE); + (*newScreen->SetCursorPosition)(inputInfo.pointer, newScreen, x, y, + TRUE); } else if (!PointerConfinedToScreen(inputInfo.pointer)) { - NewCurrentScreen(newScreen, x, y); + NewCurrentScreen(inputInfo.pointer, newScreen, x, y); } return Success; } @@ -4693,7 +4725,7 @@ ProcRecolorCursor(ClientPtr client) else #endif displayed = (pscr == sprite->hotPhys.pScreen); - ( *pscr->RecolorCursor)(pscr, pCursor, + ( *pscr->RecolorCursor)(inputInfo.pointer, pscr, pCursor, (pCursor == sprite->current) && displayed); } return (Success); diff --git a/hw/xfree86/common/xf86Cursor.c b/hw/xfree86/common/xf86Cursor.c index 46d812804..27264a252 100644 --- a/hw/xfree86/common/xf86Cursor.c +++ b/hw/xfree86/common/xf86Cursor.c @@ -69,7 +69,7 @@ typedef struct { static Bool xf86CursorOffScreen(ScreenPtr *pScreen, int *x, int *y); static void xf86CrossScreen(ScreenPtr pScreen, Bool entering); -static void xf86WarpCursor(ScreenPtr pScreen, int x, int y); +static void xf86WarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y); static void xf86PointerMoved(int scrnIndex, int x, int y); @@ -269,7 +269,7 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode) (*pScr->AdjustFrame)(pScr->scrnIndex, pScr->frameX0, pScr->frameY0, 0); if (pScreen == pCursorScreen) - xf86WarpCursor(pScreen, px, py); + xf86WarpCursor(inputInfo.pointer, pScreen, px, py); return Switched; } @@ -430,11 +430,11 @@ xf86CrossScreen (ScreenPtr pScreen, Bool entering) /* ARGSUSED */ static void -xf86WarpCursor (ScreenPtr pScreen, int x, int y) +xf86WarpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { int sigstate; sigstate = xf86BlockSIGIO (); - miPointerWarpCursor(pScreen,x,y); + miPointerWarpCursor(pDev, pScreen,x,y); xf86Info.currentScreen = pScreen; xf86UnblockSIGIO (sigstate); diff --git a/hw/xfree86/common/xf86RandR.c b/hw/xfree86/common/xf86RandR.c index 288d72193..87d5a364b 100644 --- a/hw/xfree86/common/xf86RandR.c +++ b/hw/xfree86/common/xf86RandR.c @@ -34,6 +34,7 @@ #include "xf86DDC.h" #include "mipointer.h" #include +#include "inputstr.h" typedef struct _xf86RandRInfo { CreateScreenResourcesProcPtr CreateScreenResources; @@ -291,7 +292,7 @@ xf86RandRSetConfig (ScreenPtr pScreen, xf86SetViewport(pScreen, px, py); - (*pScreen->SetCursorPosition) (pScreen, px, py, FALSE); + (*pScreen->SetCursorPosition) (inputInfo.pointer, pScreen, px, py, FALSE); } return TRUE; diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c index a49c63212..76f0b702a 100644 --- a/hw/xfree86/dri/dri.c +++ b/hw/xfree86/dri/dri.c @@ -70,6 +70,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "mi.h" #include "mipointer.h" #include "xf86_OSproc.h" +#include "inputstr.h" #if !defined(PANORAMIX) extern Bool noPanoramiXExtension; @@ -2013,7 +2014,7 @@ DRIAdjustFrame(int scrnIndex, int x, int y, int flags) if (px > pScrn->frameX1) px = pScrn->frameX1; if (py < pScrn->frameY0) py = pScrn->frameY0; if (py > pScrn->frameY1) py = pScrn->frameY1; - pScreen->SetCursorPosition(pScreen, px, py, TRUE); + pScreen->SetCursorPosition(inputInfo.pointer, pScreen, px, py, TRUE); return; } diff --git a/hw/xfree86/rac/xf86RAC.c b/hw/xfree86/rac/xf86RAC.c index 23dab862f..022f4748e 100644 --- a/hw/xfree86/rac/xf86RAC.c +++ b/hw/xfree86/rac/xf86RAC.c @@ -154,13 +154,16 @@ static PixmapPtr RACCreatePixmap(ScreenPtr pScreen, int w, int h, int depth); static Bool RACCreateGC(GCPtr pGC); static Bool RACSaveScreen(ScreenPtr pScreen, Bool unblank); static void RACStoreColors (ColormapPtr pmap, int ndef, xColorItem *pdefs); -static void RACRecolorCursor (ScreenPtr pScreen, CursorPtr pCurs, - Bool displayed); -static Bool RACRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor); -static Bool RACUnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor); -static Bool RACDisplayCursor (ScreenPtr pScreen, CursorPtr pCursor); -static Bool RACSetCursorPosition (ScreenPtr pScreen, int x, int y, - Bool generateEvent); +static void RACRecolorCursor (DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCurs, Bool displayed); +static Bool RACRealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor); +static Bool RACUnrealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor); +static Bool RACDisplayCursor (DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor); +static Bool RACSetCursorPosition (DeviceIntPtr pDev, ScreenPtr pScreen, + int x, int y, Bool generateEvent); static void RACAdjustFrame(int index, int x, int y, int flags); static Bool RACSwitchMode(int index, DisplayModePtr mode, int flags); static Bool RACEnterVT(int index, int flags); @@ -586,6 +589,7 @@ RACStoreColors ( static void RACRecolorCursor ( + DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, Bool displayed @@ -594,15 +598,16 @@ RACRecolorCursor ( DPRINT_S("RACRecolorCursor",pScreen->myNum); SCREEN_PROLOG (RecolorCursor); ENABLE; - (*pScreen->RecolorCursor) (pScreen,pCurs,displayed); + (*pScreen->RecolorCursor) (pDev, pScreen,pCurs,displayed); SCREEN_EPILOG ( RecolorCursor, RACRecolorCursor); } static Bool RACRealizeCursor ( - ScreenPtr pScreen, - CursorPtr pCursor + DeviceIntPtr pDev, + ScreenPtr pScreen, + CursorPtr pCursor ) { Bool val; @@ -610,7 +615,7 @@ RACRealizeCursor ( DPRINT_S("RACRealizeCursor",pScreen->myNum); SCREEN_PROLOG (RealizeCursor); ENABLE; - val = (*pScreen->RealizeCursor) (pScreen,pCursor); + val = (*pScreen->RealizeCursor) (pDev, pScreen,pCursor); SCREEN_EPILOG ( RealizeCursor, RACRealizeCursor); return val; @@ -618,8 +623,9 @@ RACRealizeCursor ( static Bool RACUnrealizeCursor ( - ScreenPtr pScreen, - CursorPtr pCursor + DeviceIntPtr pDev, + ScreenPtr pScreen, + CursorPtr pCursor ) { Bool val; @@ -627,7 +633,7 @@ RACUnrealizeCursor ( DPRINT_S("RACUnrealizeCursor",pScreen->myNum); SCREEN_PROLOG (UnrealizeCursor); ENABLE; - val = (*pScreen->UnrealizeCursor) (pScreen,pCursor); + val = (*pScreen->UnrealizeCursor) (pDev, pScreen,pCursor); SCREEN_EPILOG ( UnrealizeCursor, RACUnrealizeCursor); return val; @@ -635,8 +641,9 @@ RACUnrealizeCursor ( static Bool RACDisplayCursor ( - ScreenPtr pScreen, - CursorPtr pCursor + DeviceIntPtr pDev, + ScreenPtr pScreen, + CursorPtr pCursor ) { Bool val; @@ -644,7 +651,7 @@ RACDisplayCursor ( DPRINT_S("RACDisplayCursor",pScreen->myNum); SCREEN_PROLOG (DisplayCursor); ENABLE; - val = (*pScreen->DisplayCursor) (pScreen,pCursor); + val = (*pScreen->DisplayCursor) (pDev, pScreen,pCursor); SCREEN_EPILOG ( DisplayCursor, RACDisplayCursor); return val; @@ -652,6 +659,7 @@ RACDisplayCursor ( static Bool RACSetCursorPosition ( + DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, Bool generateEvent) @@ -661,7 +669,7 @@ RACSetCursorPosition ( DPRINT_S("RACSetCursorPosition",pScreen->myNum); SCREEN_PROLOG (SetCursorPosition); ENABLE; - val = (*pScreen->SetCursorPosition) (pScreen,x,y,generateEvent); + val = (*pScreen->SetCursorPosition) (pDev, pScreen,x,y,generateEvent); SCREEN_EPILOG ( SetCursorPosition, RACSetCursorPosition); return val; diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c index ec813e068..5a8509bdb 100644 --- a/hw/xfree86/ramdac/xf86Cursor.c +++ b/hw/xfree86/ramdac/xf86Cursor.c @@ -38,7 +38,7 @@ static miPointerSpriteFuncRec xf86CursorSpriteFuncs = { /* Screen functions */ static void xf86CursorInstallColormap(ColormapPtr); -static void xf86CursorRecolorCursor(ScreenPtr, CursorPtr, Bool); +static void xf86CursorRecolorCursor(DeviceIntPtr pDev, ScreenPtr, CursorPtr, Bool); static Bool xf86CursorCloseScreen(int, ScreenPtr); static void xf86CursorQueryBestSize(int, unsigned short*, unsigned short*, ScreenPtr); @@ -181,6 +181,7 @@ xf86CursorInstallColormap(ColormapPtr pMap) static void xf86CursorRecolorCursor( + DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, Bool displayed) @@ -192,7 +193,7 @@ xf86CursorRecolorCursor( return; if (ScreenPriv->SWCursor) - (*ScreenPriv->RecolorCursor)(pScreen, pCurs, displayed); + (*ScreenPriv->RecolorCursor)(pDev, pScreen, pCurs, displayed); else xf86RecolorCursor(pScreen, pCurs, displayed); } diff --git a/include/cursor.h b/include/cursor.h index b28f8db5b..7aacf23f5 100644 --- a/include/cursor.h +++ b/include/cursor.h @@ -131,6 +131,7 @@ extern void CheckCursorConfinement( WindowPtr /*pWin*/); extern void NewCurrentScreen( + struct _DeviceIntRec* /*pDev*/, ScreenPtr /*newScreen*/, int /*x*/, int /*y*/); diff --git a/include/dix.h b/include/dix.h index d59cccc44..6f2e43ae5 100644 --- a/include/dix.h +++ b/include/dix.h @@ -821,4 +821,8 @@ extern int xstrcasecmp(char *s1, char *s2); /* ffs.c */ extern int ffs(int i); +#ifdef MPX +extern Bool MPHasCursor(DeviceIntPtr pDev); +#endif + #endif /* DIX_H */ diff --git a/include/inputstr.h b/include/inputstr.h index 6f6b6760c..512829373 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -330,7 +330,7 @@ typedef struct _DeviceIntRec { int nPrivates; DeviceUnwrapProc unwrapProc; #ifdef MPX - Bool isMPDev; /* TRUE if multipointer device */ + Bool isMPDev; /* TRUE if multipointer device */ #endif } DeviceIntRec; diff --git a/include/scrnintstr.h b/include/scrnintstr.h index 4fa2919df..629d45ed8 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -121,6 +121,7 @@ typedef void (* GetSpansProcPtr)( char * /*pdstStart*/); typedef void (* PointerNonInterestBoxProcPtr)( + DeviceIntPtr /*pDev*/, ScreenPtr /*pScreen*/, BoxPtr /*pBox*/); @@ -262,29 +263,35 @@ typedef void (* ConstrainCursorProcPtr)( BoxPtr /*pBox*/); typedef void (* CursorLimitsProcPtr)( + DeviceIntPtr /* pDev */, ScreenPtr /*pScreen*/, CursorPtr /*pCursor*/, BoxPtr /*pHotBox*/, BoxPtr /*pTopLeftBox*/); typedef Bool (* DisplayCursorProcPtr)( + DeviceIntPtr /* pDev */, ScreenPtr /*pScreen*/, CursorPtr /*pCursor*/); typedef Bool (* RealizeCursorProcPtr)( + DeviceIntPtr /* pDev */, ScreenPtr /*pScreen*/, CursorPtr /*pCursor*/); typedef Bool (* UnrealizeCursorProcPtr)( + DeviceIntPtr /* pDev */, ScreenPtr /*pScreen*/, CursorPtr /*pCursor*/); typedef void (* RecolorCursorProcPtr)( + DeviceIntPtr /* pDev */, ScreenPtr /*pScreen*/, CursorPtr /*pCursor*/, Bool /*displayed*/); typedef Bool (* SetCursorPositionProcPtr)( + DeviceIntPtr /* pDev */, ScreenPtr /*pScreen*/, int /*x*/, int /*y*/, diff --git a/mi/mi.h b/mi/mi.h index 8d9d120bd..6b67e42c7 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -137,6 +137,7 @@ extern void miPutImage( /* micursor.c */ extern void miRecolorCursor( + DeviceIntPtr /* pDev */, ScreenPtr /*pScr*/, CursorPtr /*pCurs*/, Bool /*displayed*/ diff --git a/mi/micursor.c b/mi/micursor.c index 6e06fbc07..af2cd0870 100644 --- a/mi/micursor.c +++ b/mi/micursor.c @@ -52,24 +52,26 @@ SOFTWARE. #include "cursor.h" #include "misc.h" #include "mi.h" +#include "inputstr.h" extern Bool Must_have_memory; _X_EXPORT void -miRecolorCursor( pScr, pCurs, displayed) - ScreenPtr pScr; - CursorPtr pCurs; - Bool displayed; +miRecolorCursor( pDev, pScr, pCurs, displayed) + DeviceIntPtr pDev; + ScreenPtr pScr; + CursorPtr pCurs; + Bool displayed; { /* * This is guaranteed to correct any color-dependent state which may have * been bound up in private state created by RealizeCursor */ - (* pScr->UnrealizeCursor)( pScr, pCurs); + (* pScr->UnrealizeCursor)( pDev, pScr, pCurs); Must_have_memory = TRUE; /* XXX */ - (* pScr->RealizeCursor)( pScr, pCurs); + (* pScr->RealizeCursor)( pDev, pScr, pCurs); Must_have_memory = FALSE; /* XXX */ if ( displayed) - (* pScr->DisplayCursor)( pScr, pCurs); + (* pScr->DisplayCursor)( pDev, pScr, pCurs); } diff --git a/mi/mieq.c b/mi/mieq.c index 2d1238810..40a3a52c5 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -209,7 +209,7 @@ mieqProcessInputEvents() miEventQueue.head = 0; else ++miEventQueue.head; - NewCurrentScreen (miEventQueue.pDequeueScreen, x, y); + NewCurrentScreen (e->pDev, miEventQueue.pDequeueScreen, x, y); } else { if (miEventQueue.head == QUEUE_SIZE - 1) diff --git a/mi/mipointer.c b/mi/mipointer.c index f954ba656..acce4ccab 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -68,7 +68,9 @@ static unsigned long miPointerGeneration = 0; static miPointerPtr miPointer; #ifdef MPX -/* Multipointers */ +/* Multipointers + * ID of a device == index in this array. + */ static miPointerRec miMPPointers[MAX_DEVICES]; @@ -80,19 +82,26 @@ IsMPDev(DeviceIntPtr pDev) } #endif -static Bool miPointerRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); -static Bool miPointerUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); -static Bool miPointerDisplayCursor(ScreenPtr pScreen, CursorPtr pCursor); +static Bool miPointerRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor); +static Bool miPointerUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor); +static Bool miPointerDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor); static void miPointerConstrainCursor(DeviceIntPtr pDev, ScreenPtr pScreen, BoxPtr pBox); -static void miPointerPointerNonInterestBox(ScreenPtr - pScreen, BoxPtr pBox); -static void miPointerCursorLimits(ScreenPtr pScreen, CursorPtr pCursor, - BoxPtr pHotBox, BoxPtr pTopLeftBox); -static Bool miPointerSetCursorPosition(ScreenPtr pScreen, int x, int y, +static void miPointerPointerNonInterestBox(DeviceIntPtr pDev, + ScreenPtr pScreen, BoxPtr pBox); +static void miPointerCursorLimits(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor, BoxPtr pHotBox, + BoxPtr pTopLeftBox); +static Bool miPointerSetCursorPosition(DeviceIntPtr pDev, ScreenPtr pScreen, + int x, int y, Bool generateEvent); static Bool miPointerCloseScreen(int index, ScreenPtr pScreen); -static void miPointerMove(ScreenPtr pScreen, int x, int y, unsigned long time); +static void miPointerMove(DeviceIntPtr pDev, ScreenPtr pScreen, + int x, int y, + unsigned long time); _X_EXPORT Bool miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) @@ -101,9 +110,6 @@ miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) miPointerScreenFuncPtr screenFuncs; Bool waitForUpdate; { -#ifdef MPX - int mpPtrIdx = 0; /* loop counter */ -#endif miPointerScreenPtr pScreenPriv; if (miPointerGeneration != serverGeneration) @@ -147,7 +153,7 @@ miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) miPointer = (miPointerPtr)xalloc(sizeof(miPointerRec)); if (!miPointer) { - xfree(pScreenPriv); + xfree((pointer)pScreenPriv); return FALSE; } miPointer->pScreen = NULL; @@ -165,23 +171,26 @@ miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) #ifdef MPX xfree(miPointer); miPointer = &miMPPointers[1]; - /* - * Set up pointer objects for multipointer devices. - */ - while(mpPtrIdx < MAX_DEVICES) { - miMPPointers[mpPtrIdx].pScreen = NULL; - miMPPointers[mpPtrIdx].pSpriteScreen = NULL; - miMPPointers[mpPtrIdx].pCursor = NULL; - miMPPointers[mpPtrIdx].pSpriteCursor = NULL; - miMPPointers[mpPtrIdx].limits.x1 = 0; - miMPPointers[mpPtrIdx].limits.x2 = 32767; - miMPPointers[mpPtrIdx].limits.y1 = 0; - miMPPointers[mpPtrIdx].limits.y2 = 32767; - miMPPointers[mpPtrIdx].confined = FALSE; - miMPPointers[mpPtrIdx].x = 0; - miMPPointers[mpPtrIdx].y = 0; - mpPtrIdx++; + int mpPtrIdx = 0; /* loop counter */ + /* + * Set up pointer objects for multipointer devices. + */ + while(mpPtrIdx < MAX_DEVICES) + { + miMPPointers[mpPtrIdx].pScreen = NULL; + miMPPointers[mpPtrIdx].pSpriteScreen = NULL; + miMPPointers[mpPtrIdx].pCursor = NULL; + miMPPointers[mpPtrIdx].pSpriteCursor = NULL; + miMPPointers[mpPtrIdx].limits.x1 = 0; + miMPPointers[mpPtrIdx].limits.x2 = 32767; + miMPPointers[mpPtrIdx].limits.y1 = 0; + miMPPointers[mpPtrIdx].limits.y2 = 32767; + miMPPointers[mpPtrIdx].confined = FALSE; + miMPPointers[mpPtrIdx].x = 0; + miMPPointers[mpPtrIdx].y = 0; + mpPtrIdx++; + } } #endif @@ -196,10 +205,6 @@ miPointerCloseScreen (index, pScreen) int mpPointerIdx = 0; SetupScreen(pScreen); - if (pScreen == miPointer->pScreen) - miPointer->pScreen = 0; - if (pScreen == miPointer->pSpriteScreen) - miPointer->pSpriteScreen = 0; #ifdef MPX while(mpPointerIdx < MAX_DEVICES) { @@ -209,6 +214,12 @@ miPointerCloseScreen (index, pScreen) miMPPointers[mpPointerIdx].pSpriteScreen = 0; mpPointerIdx++; } +#else + if (pScreen == miPointer->pScreen) + miPointer->pScreen = 0; + if (pScreen == miPointer->pSpriteScreen) + miPointer->pSpriteScreen = 0; + xfree((pointer)miPointer); #endif pScreen->CloseScreen = pScreenPriv->CloseScreen; xfree ((pointer) pScreenPriv); @@ -220,67 +231,44 @@ miPointerCloseScreen (index, pScreen) */ static Bool -miPointerRealizeCursor (pScreen, pCursor) - ScreenPtr pScreen; - CursorPtr pCursor; +miPointerRealizeCursor (pDev, pScreen, pCursor) + DeviceIntPtr pDev; + ScreenPtr pScreen; + CursorPtr pCursor; { - DeviceIntPtr pDev = inputInfo.pointer; - SetupScreen(pScreen); -#ifdef MPX - pDev = inputInfo.devices; - while(pDev) - { - if (pDev != inputInfo.keyboard) - (*pScreenPriv->spriteFuncs->RealizeCursor) (pDev, pScreen, pCursor); - pDev = pDev->next; - } - return TRUE; -#else return (*pScreenPriv->spriteFuncs->RealizeCursor) (pDev, pScreen, pCursor); -#endif } static Bool -miPointerUnrealizeCursor (pScreen, pCursor) - ScreenPtr pScreen; - CursorPtr pCursor; +miPointerUnrealizeCursor (pDev, pScreen, pCursor) + DeviceIntPtr pDev; + ScreenPtr pScreen; + CursorPtr pCursor; { - DeviceIntPtr pDev = inputInfo.pointer; SetupScreen(pScreen); - -#ifdef MPX - pDev = inputInfo.devices; - while(pDev) - { - if (pDev != inputInfo.keyboard) - (*pScreenPriv->spriteFuncs->UnrealizeCursor) (pDev, pScreen, pCursor); - pDev = pDev->next; - } - return TRUE; -#else return (*pScreenPriv->spriteFuncs->UnrealizeCursor) (pDev, pScreen, pCursor); -#endif } static Bool -miPointerDisplayCursor (pScreen, pCursor) - ScreenPtr pScreen; - CursorPtr pCursor; +miPointerDisplayCursor (pDev, pScreen, pCursor) + DeviceIntPtr pDev; + ScreenPtr pScreen; + CursorPtr pCursor; { #ifdef MPX - int mpPtrIdx = 0; - while (mpPtrIdx < MAX_DEVICES) - { - miMPPointers[mpPtrIdx].pCursor = pCursor; - miMPPointers[mpPtrIdx].pScreen = pScreen; - mpPtrIdx++; - } + /* use core pointer for non MPX devices */ + if (!IsMPDev(pDev)) + pDev = inputInfo.pointer; -#endif + miMPPointers[pDev->id].pCursor = pCursor; + miMPPointers[pDev->id].pScreen = pScreen; + miPointerUpdateSprite(pDev); +#else miPointer->pCursor = pCursor; miPointer->pScreen = pScreen; miPointerUpdateSprite(inputInfo.pointer); +#endif return TRUE; } @@ -301,20 +289,22 @@ miPointerConstrainCursor (pDev, pScreen, pBox) /*ARGSUSED*/ static void -miPointerPointerNonInterestBox (pScreen, pBox) - ScreenPtr pScreen; - BoxPtr pBox; +miPointerPointerNonInterestBox (pDev, pScreen, pBox) + DeviceIntPtr pDev; + ScreenPtr pScreen; + BoxPtr pBox; { /* until DIX uses this, this will remain a stub */ } /*ARGSUSED*/ static void -miPointerCursorLimits(pScreen, pCursor, pHotBox, pTopLeftBox) - ScreenPtr pScreen; - CursorPtr pCursor; - BoxPtr pHotBox; - BoxPtr pTopLeftBox; +miPointerCursorLimits(pDev, pScreen, pCursor, pHotBox, pTopLeftBox) + DeviceIntPtr pDev; + ScreenPtr pScreen; + CursorPtr pCursor; + BoxPtr pHotBox; + BoxPtr pTopLeftBox; { *pTopLeftBox = *pHotBox; } @@ -322,33 +312,40 @@ miPointerCursorLimits(pScreen, pCursor, pHotBox, pTopLeftBox) static Bool GenerateEvent; static Bool -miPointerSetCursorPosition(pScreen, x, y, generateEvent) - ScreenPtr pScreen; - int x, y; - Bool generateEvent; +miPointerSetCursorPosition(pDev, pScreen, x, y, generateEvent) + DeviceIntPtr pDev; + ScreenPtr pScreen; + int x, y; + Bool generateEvent; { SetupScreen (pScreen); GenerateEvent = generateEvent; /* device dependent - must pend signal and call miPointerWarpCursor */ - (*pScreenPriv->screenFuncs->WarpCursor) (pScreen, x, y); + (*pScreenPriv->screenFuncs->WarpCursor) (pDev, pScreen, x, y); if (!generateEvent) - miPointerUpdateSprite(inputInfo.pointer); + miPointerUpdateSprite(pDev); return TRUE; } /* Once signals are ignored, the WarpCursor function can call this */ _X_EXPORT void -miPointerWarpCursor (pScreen, x, y) - ScreenPtr pScreen; - int x, y; +miPointerWarpCursor (pDev, pScreen, x, y) + DeviceIntPtr pDev; + ScreenPtr pScreen; + int x, y; { - DeviceIntPtr pDev = inputInfo.pointer; - + miPointerPtr pPointer = miPointer; SetupScreen (pScreen); - if (miPointer->pScreen != pScreen) +#ifdef MPX + if (IsMPDev(pDev)) + pPointer = &miMPPointers[pDev->id]; +#endif + + + if (pPointer->pScreen != pScreen) (*pScreenPriv->screenFuncs->NewEventScreen) (pScreen, TRUE); if (GenerateEvent) @@ -359,16 +356,16 @@ miPointerWarpCursor (pScreen, x, y) { /* everything from miPointerMove except the event and history */ - if (!pScreenPriv->waitForUpdate && pScreen == miPointer->pSpriteScreen) + if (!pScreenPriv->waitForUpdate && pScreen == pPointer->pSpriteScreen) { - miPointer->devx = x; - miPointer->devy = y; - if(!miPointer->pCursor->bits->emptyMask) + pPointer->devx = x; + pPointer->devy = y; + if(!pPointer->pCursor->bits->emptyMask) (*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y); } - miPointer->x = x; - miPointer->y = y; - miPointer->pScreen = pScreen; + pPointer->x = x; + pPointer->y = y; + pPointer->pScreen = pScreen; } } @@ -395,7 +392,7 @@ miPointerUpdateSprite (DeviceIntPtr pDev) miPointerScreenPtr pScreenPriv; CursorPtr pCursor; int x, y, devx, devy; - miPointerPtr pPointer; + miPointerPtr pPointer = miPointer; #ifdef MPX if (!pDev || @@ -408,8 +405,6 @@ miPointerUpdateSprite (DeviceIntPtr pDev) #ifdef MPX if (IsMPDev(pDev)) pPointer = &miMPPointers[pDev->id]; - else - pPointer = miPointer; #endif pScreen = pPointer->pScreen; @@ -495,22 +490,18 @@ miPointerSetScreen(DeviceIntPtr pDev, int screen_no, int x, int y) { miPointerScreenPtr pScreenPriv; ScreenPtr pScreen; + miPointerPtr pPointer = miPointer; pScreen = screenInfo.screens[screen_no]; pScreenPriv = GetScreenPrivate (pScreen); (*pScreenPriv->screenFuncs->NewEventScreen) (pScreen, FALSE); - NewCurrentScreen (pScreen, x, y); + NewCurrentScreen (pDev, pScreen, x, y); #ifdef MPX if (IsMPDev(pDev)) - { - miMPPointers[pDev->id].limits.x2 = pScreen->width; - miMPPointers[pDev->id].limits.y2 = pScreen->height; - } + pPointer = &miMPPointers[pDev->id]; #endif - { - miPointer->limits.x2 = pScreen->width; - miPointer->limits.y2 = pScreen->height; - } + pPointer->limits.x2 = pScreen->width; + pPointer->limits.y2 = pScreen->height; } _X_EXPORT ScreenPtr @@ -522,11 +513,12 @@ miPointerCurrentScreen () _X_EXPORT ScreenPtr miPointerGetScreen(DeviceIntPtr pDev) { + miPointerPtr pPointer; #ifdef MPX if (IsMPDev(pDev)) - return miMPPointers[pDev->id].pScreen; + pPointer = &miMPPointers[pDev->id]; #endif - return miPointer->pScreen; + return pPointer->pScreen; } /* Move the pointer to x, y on the current screen, update the sprite, and @@ -545,13 +537,11 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y, unsigned long time) ScreenPtr pScreen; ScreenPtr newScreen; - miPointerPtr pPointer; + miPointerPtr pPointer = miPointer; #ifdef MPX if (IsMPDev(pDev)) pPointer = &(miMPPointers[pDev->id]); - else #endif - pPointer = miPointer; pScreen = pPointer->pScreen; if (!pScreen) @@ -609,24 +599,19 @@ miPointerPosition (int *x, int *y) _X_EXPORT void miPointerGetPosition(DeviceIntPtr pDev, int *x, int *y) { + miPointerPtr pPointer = miPointer; #ifdef MPX if (IsMPDev(pDev)) - { - *x = miMPPointers[pDev->id].x; - *y = miMPPointers[pDev->id].y; - } - else + pPointer = &miMPPointers[pDev->id]; #endif - { - *x = miPointer->x; - *y = miPointer->y; - } + *x = pPointer->x; + *y = pPointer->y; } void -miPointerMove (ScreenPtr pScreen, int x, int y, unsigned long time) +miPointerMove (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, unsigned long time) { - miPointerMoved(inputInfo.pointer, pScreen, x, y, time); + miPointerMoved(pDev, pScreen, x, y, time); } /* Move the pointer on the current screen, and update the sprite. */ @@ -634,15 +619,13 @@ void miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, unsigned long time) { - miPointerPtr pPointer; + miPointerPtr pPointer = miPointer; SetupScreen(pScreen); #ifdef MPX if (IsMPDev(pDev)) pPointer = &miMPPointers[pDev->id]; - else #endif - pPointer = miPointer; if (pDev && (pDev->coreEvents || pDev == inputInfo.pointer #ifdef MPX diff --git a/mi/mipointer.h b/mi/mipointer.h index 1b01ba19b..85c5c8b2e 100644 --- a/mi/mipointer.h +++ b/mi/mipointer.h @@ -72,6 +72,7 @@ typedef struct _miPointerScreenFuncRec { int /* entering */ ); void (*WarpCursor)( + DeviceIntPtr /*pDev*/, ScreenPtr /* pScr */, int /* x */, int /* y */ @@ -99,6 +100,7 @@ extern Bool miPointerInitialize( ); extern void miPointerWarpCursor( + DeviceIntPtr /*pDev*/, ScreenPtr /*pScreen*/, int /*x*/, int /*y*/ diff --git a/render/animcur.c b/render/animcur.c index 8e4f59d1b..2b552a3a2 100644 --- a/render/animcur.c +++ b/render/animcur.c @@ -44,6 +44,7 @@ #include "dixfontstr.h" #include "opaque.h" #include "picturestr.h" +#include "inputstr.h" typedef struct _AnimCurElt { CursorPtr pCursor; /* cursor to show */ @@ -100,11 +101,13 @@ int AnimCurGeneration; #define Unwrap(as,s,elt) ((s)->elt = (as)->elt) static Bool -AnimCurDisplayCursor (ScreenPtr pScreen, +AnimCurDisplayCursor (DeviceIntPtr pDev, + ScreenPtr pScreen, CursorPtr pCursor); static Bool -AnimCurSetCursorPosition (ScreenPtr pScreen, +AnimCurSetCursorPosition (DeviceIntPtr pDev, + ScreenPtr pScreen, int x, int y, Bool generateEvent); @@ -134,7 +137,8 @@ AnimCurCloseScreen (int index, ScreenPtr pScreen) } static void -AnimCurCursorLimits (ScreenPtr pScreen, +AnimCurCursorLimits (DeviceIntPtr pDev, + ScreenPtr pScreen, CursorPtr pCursor, BoxPtr pHotBox, BoxPtr pTopLeftBox) @@ -146,11 +150,13 @@ AnimCurCursorLimits (ScreenPtr pScreen, { AnimCurPtr ac = GetAnimCur(pCursor); - (*pScreen->CursorLimits) (pScreen, ac->elts[0].pCursor, pHotBox, pTopLeftBox); + (*pScreen->CursorLimits) (pDev, pScreen, ac->elts[0].pCursor, + pHotBox, pTopLeftBox); } else { - (*pScreen->CursorLimits) (pScreen, pCursor, pHotBox, pTopLeftBox); + (*pScreen->CursorLimits) (inputInfo.pointer, pScreen, pCursor, + pHotBox, pTopLeftBox); } Wrap (as, pScreen, CursorLimits, AnimCurCursorLimits); } @@ -187,7 +193,9 @@ AnimCurScreenBlockHandler (int screenNum, */ DisplayCursor = pScreen->DisplayCursor; pScreen->DisplayCursor = as->DisplayCursor; - (void) (*pScreen->DisplayCursor) (pScreen, ac->elts[elt].pCursor); + (void) (*pScreen->DisplayCursor) (inputInfo.pointer, + pScreen, + ac->elts[elt].pCursor); as->DisplayCursor = pScreen->DisplayCursor; pScreen->DisplayCursor = DisplayCursor; @@ -202,7 +210,8 @@ AnimCurScreenBlockHandler (int screenNum, } static Bool -AnimCurDisplayCursor (ScreenPtr pScreen, +AnimCurDisplayCursor (DeviceIntPtr pDev, + ScreenPtr pScreen, CursorPtr pCursor) { AnimCurScreenPtr as = GetAnimCurScreen(pScreen); @@ -215,7 +224,8 @@ AnimCurDisplayCursor (ScreenPtr pScreen, { AnimCurPtr ac = GetAnimCur(pCursor); - ret = (*pScreen->DisplayCursor) (pScreen, ac->elts[0].pCursor); + ret = (*pScreen->DisplayCursor) + (pDev, pScreen, ac->elts[0].pCursor); if (ret) { animCurState.elt = 0; @@ -231,14 +241,15 @@ AnimCurDisplayCursor (ScreenPtr pScreen, { animCurState.pCursor = 0; animCurState.pScreen = 0; - ret = (*pScreen->DisplayCursor) (pScreen, pCursor); + ret = (*pScreen->DisplayCursor) (pDev, pScreen, pCursor); } Wrap (as, pScreen, DisplayCursor, AnimCurDisplayCursor); return ret; } static Bool -AnimCurSetCursorPosition (ScreenPtr pScreen, +AnimCurSetCursorPosition (DeviceIntPtr pDev, + ScreenPtr pScreen, int x, int y, Bool generateEvent) @@ -249,13 +260,14 @@ AnimCurSetCursorPosition (ScreenPtr pScreen, Unwrap (as, pScreen, SetCursorPosition); if (animCurState.pCursor) animCurState.pScreen = pScreen; - ret = (*pScreen->SetCursorPosition) (pScreen, x, y, generateEvent); + ret = (*pScreen->SetCursorPosition) (pDev, pScreen, x, y, generateEvent); Wrap (as, pScreen, SetCursorPosition, AnimCurSetCursorPosition); return ret; } static Bool -AnimCurRealizeCursor (ScreenPtr pScreen, +AnimCurRealizeCursor (DeviceIntPtr pDev, + ScreenPtr pScreen, CursorPtr pCursor) { AnimCurScreenPtr as = GetAnimCurScreen(pScreen); @@ -265,13 +277,14 @@ AnimCurRealizeCursor (ScreenPtr pScreen, if (IsAnimCur(pCursor)) ret = TRUE; else - ret = (*pScreen->RealizeCursor) (pScreen, pCursor); + ret = (*pScreen->RealizeCursor) (pDev, pScreen, pCursor); Wrap (as, pScreen, RealizeCursor, AnimCurRealizeCursor); return ret; } static Bool -AnimCurUnrealizeCursor (ScreenPtr pScreen, +AnimCurUnrealizeCursor (DeviceIntPtr pDev, + ScreenPtr pScreen, CursorPtr pCursor) { AnimCurScreenPtr as = GetAnimCurScreen(pScreen); @@ -289,13 +302,14 @@ AnimCurUnrealizeCursor (ScreenPtr pScreen, ret = TRUE; } else - ret = (*pScreen->UnrealizeCursor) (pScreen, pCursor); + ret = (*pScreen->UnrealizeCursor) (pDev, pScreen, pCursor); Wrap (as, pScreen, UnrealizeCursor, AnimCurUnrealizeCursor); return ret; } static void -AnimCurRecolorCursor (ScreenPtr pScreen, +AnimCurRecolorCursor (DeviceIntPtr pDev, + ScreenPtr pScreen, CursorPtr pCursor, Bool displayed) { @@ -308,12 +322,12 @@ AnimCurRecolorCursor (ScreenPtr pScreen, int i; for (i = 0; i < ac->nelt; i++) - (*pScreen->RecolorCursor) (pScreen, ac->elts[i].pCursor, + (*pScreen->RecolorCursor) (pDev, pScreen, ac->elts[i].pCursor, displayed && animCurState.elt == i); } else - (*pScreen->RecolorCursor) (pScreen, pCursor, displayed); + (*pScreen->RecolorCursor) (pDev, pScreen, pCursor, displayed); Wrap (as, pScreen, RecolorCursor, AnimCurRecolorCursor); } diff --git a/xfixes/cursor.c b/xfixes/cursor.c index 22f9b0942..3bcd4361e 100755 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -122,7 +122,8 @@ typedef struct _CursorScreen { #define Unwrap(as,s,elt) ((s)->elt = (as)->elt) static Bool -CursorDisplayCursor (ScreenPtr pScreen, +CursorDisplayCursor (DeviceIntPtr pDev, + ScreenPtr pScreen, CursorPtr pCursor) { CursorScreenPtr cs = GetCursorScreen(pScreen); @@ -131,9 +132,9 @@ CursorDisplayCursor (ScreenPtr pScreen, Unwrap (cs, pScreen, DisplayCursor); if (cs->pCursorHideCounts != NULL) { - ret = (*pScreen->DisplayCursor) (pScreen, pInvisibleCursor); + ret = (*pScreen->DisplayCursor) (pDev, pScreen, pInvisibleCursor); } else { - ret = (*pScreen->DisplayCursor) (pScreen, pCursor); + ret = (*pScreen->DisplayCursor) (pDev, pScreen, pCursor); } if (pCursor != CursorCurrent) @@ -866,7 +867,7 @@ ProcXFixesHideCursor (ClientPtr client) ret = createCursorHideCount(client, pWin->drawable.pScreen); if (ret == Success) { - (void) CursorDisplayCursor(pWin->drawable.pScreen, CursorCurrent); + (void) CursorDisplayCursor(inputInfo.pointer, pWin->drawable.pScreen, CursorCurrent); } return ret; @@ -953,7 +954,7 @@ CursorFreeHideCount (pointer data, XID id) ScreenPtr pScreen = pChc->pScreen; deleteCursorHideCount(pChc, pChc->pScreen); - (void) CursorDisplayCursor(pScreen, CursorCurrent); + (void) CursorDisplayCursor(inputInfo.pointer, pScreen, CursorCurrent); return 1; } diff --git a/xkb/ddxFakeMtn.c b/xkb/ddxFakeMtn.c index 7e75c1586..d15c5c193 100644 --- a/xkb/ddxFakeMtn.c +++ b/xkb/ddxFakeMtn.c @@ -113,7 +113,7 @@ ScreenPtr pScreen, oldScreen; } if (pScreen != oldScreen) - NewCurrentScreen(pScreen, oldX, oldY); + NewCurrentScreen(inputInfo.pointer, pScreen, oldX, oldY); if (pScreen->SetCursorPosition) - (*pScreen->SetCursorPosition)(pScreen, oldX, oldY, TRUE); + (*pScreen->SetCursorPosition)(inputInfo.pointer, pScreen, oldX, oldY, TRUE); } From a2340a73687dfd93affb6de28a33d73fd808c96b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 27 Nov 2006 14:47:23 +1030 Subject: [PATCH 021/634] mi: free allocated memory in miDCCloseScreen and in miDCInitialize in case of errors. Some copyright notices. misprite.c passes DeviceIntPtr around and down to DC (previously miCursorInfoPtr and the plain device id). Large cleanup in misprite.c to avoid code duplication. --- Changelog | 13 ++ mi/midispcur.c | 70 +++--- mi/misprite.c | 601 ++++++++++++++++++++++--------------------------- mi/misprite.h | 10 +- 4 files changed, 332 insertions(+), 362 deletions(-) diff --git a/Changelog b/Changelog index 66f12f84e..c309ad503 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,17 @@ MPX Changelog file +== 27.11.06 == +mi: free allocated memory in miDCCloseScreen and in miDCInitialize in case + of errors. + Some copyright notices. + misprite.c passes DeviceIntPtr around and down to DC (previously + miCursorInfoPtr and the plain device id). + Large cleanup in misprite.c to avoid code duplication. + +Files: + mi/midispcur.c + mi/misprite.c + mi/misprite.h + == 23.11.06 == mi: closing memory leak, miPointer is freed in miPointerCloseScreen bugfix: uninitialized pPointer in miPointerGetPosition ifndef MPX diff --git a/mi/midispcur.c b/mi/midispcur.c index 8b961d54d..514fae88d 100644 --- a/mi/midispcur.c +++ b/mi/midispcur.c @@ -29,6 +29,12 @@ Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ +/* + * MPX additions: + * Copyright © 2006 Peter Hutterer + * Author: Peter Hutterer + * + */ #ifdef HAVE_DIX_CONFIG_H #include @@ -55,9 +61,7 @@ in this Software without prior written authorization from The Open Group. #ifdef MPX # include "inputstr.h" - #define SaneID(a) (a >= 0 && a < MAX_DEVICES) - #endif /* per-screen private data */ @@ -102,20 +106,20 @@ typedef struct { static Bool miDCRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); static Bool miDCUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); -static Bool miDCPutUpCursor(int deviceid, ScreenPtr pScreen, +static Bool miDCPutUpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y, unsigned long source, unsigned long mask); -static Bool miDCSaveUnderCursor(int deviceid, ScreenPtr pScreen, +static Bool miDCSaveUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, int w, int h); -static Bool miDCRestoreUnderCursor(int deviceid, ScreenPtr pScreen, +static Bool miDCRestoreUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, int w, int h); -static Bool miDCMoveCursor(int deviceid, ScreenPtr pScreen, +static Bool miDCMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y, int w, int h, int dx, int dy, unsigned long source, unsigned long mask); -static Bool miDCChangeSave(int deviceid, ScreenPtr pScreen, +static Bool miDCChangeSave(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, int w, int h, int dx, int dy); @@ -173,7 +177,7 @@ miDCInitialize (pScreen, screenFuncs) pScreenPriv->pMPBuffers = (miDCBufferPtr)xalloc(MAX_DEVICES * sizeof(miDCBufferRec)); - /* virtual core pointer ID is 1, we might as well use the array */ + /* virtual core pointer ID is 1 */ xfree(pScreenPriv->pCoreBuffer); pScreenPriv->pCoreBuffer = &pScreenPriv->pMPBuffers[1]; @@ -206,6 +210,11 @@ miDCInitialize (pScreen, screenFuncs) if (!miSpriteInitialize (pScreen, &miDCFuncs, screenFuncs)) { +#ifdef MPX + xfree((pointer)pScreenPriv->pMPBuffers); +#else + xfree((pointer)pScreenPriv->pCoreBuffer); +#endif xfree ((pointer) pScreenPriv); return FALSE; } @@ -256,6 +265,11 @@ miDCCloseScreen (index, pScreen) mpBufferIdx++; } } + + xfree((pointer) pScreenPriv->pMPBuffers); +#else + + xfree((pointer) pScreenPriv->pCoreBuffer); #endif xfree ((pointer) pScreenPriv); @@ -530,8 +544,8 @@ miDCMakeGC( static Bool -miDCPutUpCursor (deviceid, pScreen, pCursor, x, y, source, mask) - int deviceid; +miDCPutUpCursor (pDev, pScreen, pCursor, x, y, source, mask) + DeviceIntPtr pDev; ScreenPtr pScreen; CursorPtr pCursor; int x, y; @@ -554,8 +568,8 @@ miDCPutUpCursor (deviceid, pScreen, pCursor, x, y, source, mask) pBuffer = pScreenPriv->pCoreBuffer; #ifdef MPX - if (SaneID(deviceid)) - pBuffer = &pScreenPriv->pMPBuffers[deviceid]; + if (MPHasCursor(pDev)) + pBuffer = &pScreenPriv->pMPBuffers[pDev->id]; #endif #ifdef ARGB_CURSOR @@ -592,8 +606,8 @@ miDCPutUpCursor (deviceid, pScreen, pCursor, x, y, source, mask) } static Bool -miDCSaveUnderCursor (deviceid, pScreen, x, y, w, h) - int deviceid; +miDCSaveUnderCursor (pDev, pScreen, x, y, w, h) + DeviceIntPtr pDev; ScreenPtr pScreen; int x, y, w, h; { @@ -606,8 +620,8 @@ miDCSaveUnderCursor (deviceid, pScreen, x, y, w, h) pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; pBuffer = pScreenPriv->pCoreBuffer; #ifdef MPX - if (SaneID(deviceid)) - pBuffer = &pScreenPriv->pMPBuffers[deviceid]; + if (MPHasCursor(pDev)) + pBuffer = &pScreenPriv->pMPBuffers[pDev->id]; #endif pSave = pBuffer->pSave; pWin = WindowTable[pScreen->myNum]; @@ -631,8 +645,8 @@ miDCSaveUnderCursor (deviceid, pScreen, x, y, w, h) } static Bool -miDCRestoreUnderCursor (deviceid, pScreen, x, y, w, h) - int deviceid; +miDCRestoreUnderCursor (pDev, pScreen, x, y, w, h) + DeviceIntPtr pDev; ScreenPtr pScreen; int x, y, w, h; { @@ -645,8 +659,8 @@ miDCRestoreUnderCursor (deviceid, pScreen, x, y, w, h) pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; pBuffer = pScreenPriv->pCoreBuffer; #ifdef MPX - if (SaneID(deviceid)) - pBuffer = &pScreenPriv->pMPBuffers[deviceid]; + if (MPHasCursor(pDev)) + pBuffer = &pScreenPriv->pMPBuffers[pDev->id]; #endif pSave = pBuffer->pSave; pWin = WindowTable[pScreen->myNum]; @@ -663,8 +677,8 @@ miDCRestoreUnderCursor (deviceid, pScreen, x, y, w, h) } static Bool -miDCChangeSave (deviceid, pScreen, x, y, w, h, dx, dy) - int deviceid; +miDCChangeSave (pDev, pScreen, x, y, w, h, dx, dy) + DeviceIntPtr pDev; ScreenPtr pScreen; int x, y, w, h, dx, dy; { @@ -678,8 +692,8 @@ miDCChangeSave (deviceid, pScreen, x, y, w, h, dx, dy) pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; pBuffer = pScreenPriv->pCoreBuffer; #ifdef MPX - if (SaneID(deviceid)) - pBuffer = &pScreenPriv->pMPBuffers[deviceid]; + if (MPHasCursor(pDev)) + pBuffer = &pScreenPriv->pMPBuffers[pDev->id]; #endif pSave = pBuffer->pSave; pWin = WindowTable[pScreen->myNum]; @@ -802,8 +816,8 @@ miDCChangeSave (deviceid, pScreen, x, y, w, h, dx, dy) } static Bool -miDCMoveCursor (deviceid, pScreen, pCursor, x, y, w, h, dx, dy, source, mask) - int deviceid; +miDCMoveCursor (pDev, pScreen, pCursor, x, y, w, h, dx, dy, source, mask) + DeviceIntPtr pDev; ScreenPtr pScreen; CursorPtr pCursor; int x, y, w, h, dx, dy; @@ -829,8 +843,8 @@ miDCMoveCursor (deviceid, pScreen, pCursor, x, y, w, h, dx, dy, source, mask) pWin = WindowTable[pScreen->myNum]; pBuffer = pScreenPriv->pCoreBuffer; #ifdef MPX - if (SaneID(deviceid)) - pBuffer = &pScreenPriv->pMPBuffers[deviceid]; + if (MPHasCursor(pDev)) + pBuffer = &pScreenPriv->pMPBuffers[pDev->id]; #endif pTemp = pBuffer->pTemp; if (!pTemp || diff --git a/mi/misprite.c b/mi/misprite.c index ec83e80c8..e51599e63 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -29,15 +29,12 @@ Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -#ifdef MPX - /* - * MPX additions: - * Copyright © 2006 Peter Hutterer - * License see above. - * Author: Peter Hutterer - * - */ -#endif +/* + * MPX additions: + * Copyright © 2006 Peter Hutterer + * Author: Peter Hutterer + * + */ #ifdef HAVE_DIX_CONFIG_H #include @@ -66,9 +63,7 @@ in this Software without prior written authorization from The Open Group. # include "damage.h" #ifdef MPX -# include "inputstr.h" /* for MAX_DEVICES */ - -static miCursorInfoPtr DevToSprite(DeviceIntPtr pDev, ScreenPtr pScreen); +# include "inputstr.h" #endif @@ -108,7 +103,7 @@ static void miSpriteStoreColors(ColormapPtr pMap, int ndef, static void miSpriteSaveDoomedAreas(WindowPtr pWin, RegionPtr pObscured, int dx, int dy); -static void miSpriteComputeSaved(miCursorInfoPtr pDevCursor, +static void miSpriteComputeSaved(DeviceIntPtr pDev, ScreenPtr pScreen); #define SCREEN_PROLOGUE(pScreen, field)\ @@ -142,9 +137,9 @@ _X_EXPORT miPointerSpriteFuncRec miSpritePointerFuncs = { * other misc functions */ -static void miSpriteRemoveCursor(miCursorInfoPtr pDevCursor, +static void miSpriteRemoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen); -static void miSpriteRestoreCursor(miCursorInfoPtr pDevCursor, +static void miSpriteRestoreCursor(DeviceIntPtr pDev, ScreenPtr pScreen); static void @@ -152,32 +147,30 @@ miSpriteReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure) { ScreenPtr pScreen = closure; miSpriteScreenPtr pScreenPriv; + miCursorInfoPtr pCursorInfo; + DeviceIntPtr pDev = inputInfo.pointer; pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - + pCursorInfo = pScreenPriv->cp; #ifdef MPX + pDev = inputInfo.devices; + while(pDev) { - int mpCursorIdx = 0; - while (mpCursorIdx < MAX_DEVICES) + if (MPHasCursor(pDev)) { - miCursorInfoPtr pMPCursor = &pScreenPriv->mpCursors[mpCursorIdx]; - - if (pMPCursor->isUp && - RECT_IN_REGION (pScreen, pRegion, &pMPCursor->saved) != rgnOUT) + pCursorInfo = &pScreenPriv->mpCursors[pDev->id]; +#endif + if (pCursorInfo->isUp && + RECT_IN_REGION (pScreen, pRegion, &pCursorInfo->saved) + != rgnOUT) { - SPRITE_DEBUG(("Damage remove MPX\n")); - miSpriteRemoveCursor(pMPCursor, pScreen); + SPRITE_DEBUG(("Damage remove\n")); + miSpriteRemoveCursor (pDev, pScreen); } - mpCursorIdx++; +#ifdef MPX } - } -#else - if (pScreenPriv->cp->isUp && - RECT_IN_REGION (pScreen, pRegion, &pScreenPriv->cp->saved) != rgnOUT) - { - SPRITE_DEBUG(("Damage remove\n")); - miSpriteRemoveCursor (pScreenPriv->cp, pScreen); + pDev = pDev->next; } #endif } @@ -351,6 +344,8 @@ miSpriteCloseScreen (i, pScreen) #ifdef MPX xfree((pointer)(pScreenPriv->mpCursors)); +#else + xfree((pointer)(pScreenPriv->cp)); #endif xfree ((pointer) pScreenPriv); @@ -368,37 +363,33 @@ miSpriteGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine) { ScreenPtr pScreen = pDrawable->pScreen; miSpriteScreenPtr pScreenPriv; + DeviceIntPtr pDev = inputInfo.pointer; + miCursorInfoPtr pCursorInfo; SCREEN_PROLOGUE (pScreen, GetImage); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - - if (pDrawable->type == DRAWABLE_WINDOW && - pScreenPriv->cp->isUp && - ORG_OVERLAP(&pScreenPriv->cp->saved,pDrawable->x,pDrawable->y, - sx, sy, w, h)) - { - SPRITE_DEBUG (("GetImage remove\n")); - miSpriteRemoveCursor (pScreenPriv->cp, pScreen); - } + pCursorInfo = pScreenPriv->cp; #ifdef MPX - /* check for MPX cursors in the target region */ - if (pDrawable->type == DRAWABLE_WINDOW) + pDev = inputInfo.devices; + while (pDev) { - int mpCursorIdx = 0; - while (mpCursorIdx < MAX_DEVICES) + if (MPHasCursor(pDev)) { - miCursorInfoPtr pMPCursor = &pScreenPriv->mpCursors[mpCursorIdx]; - if (pMPCursor->isUp && - ORG_OVERLAP(&pMPCursor->saved,pDrawable->x,pDrawable->y, - sx, sy, w, h)) - { - SPRITE_DEBUG(("GetImage remove MPX\n")); - } - miSpriteRemoveCursor(pMPCursor, pScreen); - mpCursorIdx++; + pCursorInfo = &pScreenPriv->mpCursors[pDev->id]; +#endif + if (pDrawable->type == DRAWABLE_WINDOW && + pCursorInfo->isUp && + ORG_OVERLAP(&pCursorInfo->saved,pDrawable->x,pDrawable->y, + sx, sy, w, h)) + { + SPRITE_DEBUG (("GetImage remove\n")); + miSpriteRemoveCursor (pDev, pScreen); + } +#ifdef MPX } + pDev = pDev->next; } #endif @@ -419,69 +410,51 @@ miSpriteGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart) { ScreenPtr pScreen = pDrawable->pScreen; miSpriteScreenPtr pScreenPriv; + DeviceIntPtr pDev = inputInfo.pointer; + miCursorInfoPtr pCursorInfo; SCREEN_PROLOGUE (pScreen, GetSpans); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - - if (pDrawable->type == DRAWABLE_WINDOW && pScreenPriv->cp->isUp) - { - register DDXPointPtr pts; - register int *widths; - register int nPts; - register int xorg, - yorg; - - xorg = pDrawable->x; - yorg = pDrawable->y; - - for (pts = ppt, widths = pwidth, nPts = nspans; - nPts--; - pts++, widths++) - { - if (SPN_OVERLAP(&pScreenPriv->cp->saved,pts->y+yorg, - pts->x+xorg,*widths)) - { - SPRITE_DEBUG (("GetSpans remove\n")); - miSpriteRemoveCursor (pScreenPriv->cp, pScreen); - break; - } - } - } + pCursorInfo = pScreenPriv->cp; #ifdef MPX - if (pDrawable->type == DRAWABLE_WINDOW) + pDev = inputInfo.devices; + while(pDev) { - - int mpCursorIdx = 0; - - while(mpCursorIdx < MAX_DEVICES) + if (MPHasCursor(pDev)) { - miCursorInfoPtr pMPCursor = &pScreenPriv->mpCursors[mpCursorIdx]; - register DDXPointPtr pts; - register int *widths; - register int nPts; - register int xorg, - yorg; - xorg = pDrawable->x; - yorg = pDrawable->y; + pCursorInfo = &pScreenPriv->mpCursors[pDev->id]; +#endif - for (pts = ppt, widths = pwidth, nPts = nspans; - nPts--; - pts++, widths++) + if (pDrawable->type == DRAWABLE_WINDOW && pCursorInfo->isUp) { - if (SPN_OVERLAP(&pMPCursor->saved,pts->y+yorg, - pts->x+xorg,*widths)) + register DDXPointPtr pts; + register int *widths; + register int nPts; + register int xorg, + yorg; + + xorg = pDrawable->x; + yorg = pDrawable->y; + + for (pts = ppt, widths = pwidth, nPts = nspans; + nPts--; + pts++, widths++) { - SPRITE_DEBUG (("GetSpans remove\n")); - miSpriteRemoveCursor (pMPCursor, pScreen); - break; + if (SPN_OVERLAP(&pCursorInfo->saved,pts->y+yorg, + pts->x+xorg,*widths)) + { + SPRITE_DEBUG (("GetSpans remove\n")); + miSpriteRemoveCursor (pDev, pScreen); + break; + } } } - mpCursorIdx++; +#ifdef MPX } + pDev = pDev->next; } - #endif (*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart); @@ -496,38 +469,36 @@ miSpriteSourceValidate (pDrawable, x, y, width, height) { ScreenPtr pScreen = pDrawable->pScreen; miSpriteScreenPtr pScreenPriv; + DeviceIntPtr pDev = inputInfo.pointer; + miCursorInfoPtr pCursorInfo; SCREEN_PROLOGUE (pScreen, SourceValidate); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - - if (pDrawable->type == DRAWABLE_WINDOW && pScreenPriv->cp->isUp && - ORG_OVERLAP(&pScreenPriv->cp->saved, pDrawable->x, pDrawable->y, - x, y, width, height)) - { - SPRITE_DEBUG (("SourceValidate remove\n")); - miSpriteRemoveCursor (pScreenPriv->cp, pScreen); - } + pCursorInfo = pScreenPriv->cp; #ifdef MPX - if (pDrawable->type == DRAWABLE_WINDOW) + pDev = inputInfo.devices; + while(pDev) { - int mpCursorIdx = 0; - while (mpCursorIdx < MAX_DEVICES) + if (MPHasCursor(pDev)) { - miCursorInfoPtr pMPCursor = &pScreenPriv->mpCursors[mpCursorIdx]; - if (pMPCursor->isUp && ORG_OVERLAP(&pMPCursor->saved, - pDrawable->x, pDrawable->y, x, y, width, height)) + pCursorInfo = &pScreenPriv->mpCursors[pDev->id]; +#endif + if (pDrawable->type == DRAWABLE_WINDOW && pCursorInfo->isUp && + ORG_OVERLAP(&pCursorInfo->saved, pDrawable->x, pDrawable->y, + x, y, width, height)) { - SPRITE_DEBUG(("SourceValidate remove MPX\n")); - miSpriteRemoveCursor(pMPCursor, pScreen); + SPRITE_DEBUG (("SourceValidate remove\n")); + miSpriteRemoveCursor (pDev, pScreen); } - mpCursorIdx++; +#ifdef MPX } - + pDev = pDev->next; } #endif + if (pScreen->SourceValidate) (*pScreen->SourceValidate) (pDrawable, x, y, width, height); @@ -539,36 +510,34 @@ miSpriteCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { ScreenPtr pScreen = pWindow->drawable.pScreen; miSpriteScreenPtr pScreenPriv; + DeviceIntPtr pDev = inputInfo.pointer; + miCursorInfoPtr pCursorInfo; SCREEN_PROLOGUE (pScreen, CopyWindow); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - /* - * Damage will take care of destination check - */ - if (pScreenPriv->cp->isUp && - RECT_IN_REGION (pScreen, prgnSrc, &pScreenPriv->cp->saved) != rgnOUT) - { - SPRITE_DEBUG (("CopyWindow remove\n")); - miSpriteRemoveCursor (pScreenPriv->cp, pScreen); - } + pCursorInfo = pScreenPriv->cp; + #ifdef MPX + pDev = inputInfo.devices; + while(pDev) { - int mpCursorIdx = 0; - while (mpCursorIdx < MAX_DEVICES) + if (MPHasCursor(pDev)) { - miCursorInfoPtr pMPCursor = &pScreenPriv->mpCursors[mpCursorIdx]; - - if (pMPCursor->isUp && RECT_IN_REGION (pScreen, prgnSrc, - &pMPCursor->saved) != rgnOUT) - + pCursorInfo = &pScreenPriv->mpCursors[pDev->id]; +#endif + /* + * Damage will take care of destination check + */ + if (pCursorInfo->isUp && + RECT_IN_REGION (pScreen, prgnSrc, &pCursorInfo->saved) != rgnOUT) { - SPRITE_DEBUG(("CopyWindow remove MPX\n")); - miSpriteRemoveCursor(pMPCursor, pScreen); + SPRITE_DEBUG (("CopyWindow remove\n")); + miSpriteRemoveCursor (pDev, pScreen); } - mpCursorIdx++; +#ifdef MPX } - + pDev = pDev->next; } #endif @@ -585,8 +554,11 @@ miSpriteBlockHandler (i, blockData, pTimeout, pReadmask) { ScreenPtr pScreen = screenInfo.screens[i]; miSpriteScreenPtr pPriv; + DeviceIntPtr pDev = inputInfo.pointer; + miCursorInfoPtr pCursorInfo; pPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; + pCursorInfo = pPriv->cp; SCREEN_PROLOGUE(pScreen, BlockHandler); @@ -595,28 +567,24 @@ miSpriteBlockHandler (i, blockData, pTimeout, pReadmask) SCREEN_EPILOGUE(pScreen, BlockHandler); #ifdef MPX + pDev = inputInfo.devices; + while(pDev) { - int mpCursorIdx = 0; - while (mpCursorIdx < MAX_DEVICES) + if (MPHasCursor(pDev)) { - miCursorInfoPtr pMPCursor = &pPriv->mpCursors[mpCursorIdx]; - if (!pMPCursor->isUp && pMPCursor->shouldBeUp) - { - SPRITE_DEBUG (("BlockHandler restore MPX\n")); - miSpriteRestoreCursor (pMPCursor, pScreen); - } - - mpCursorIdx++; - } - } -#else - if (!pPriv->cp->isUp && pPriv->cp->shouldBeUp) - { - SPRITE_DEBUG (("BlockHandler restore\n")); - miSpriteRestoreCursor (pPriv->cp, pScreen); - } - + pCursorInfo = &pPriv->mpCursors[pDev->id]; #endif + if (!pCursorInfo->isUp && pCursorInfo->shouldBeUp) + { + SPRITE_DEBUG (("BlockHandler restore\n")); + miSpriteRestoreCursor (pDev, pScreen); + } +#ifdef MPX + } + pDev = pDev->next; + } +#endif + } static void @@ -625,8 +593,12 @@ miSpriteInstallColormap (pMap) { ScreenPtr pScreen = pMap->pScreen; miSpriteScreenPtr pPriv; + DeviceIntPtr pDev = inputInfo.pointer; + miCursorInfoPtr pCursorInfo; + int cursorIdx; pPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; + pCursorInfo = pPriv->cp; SCREEN_PROLOGUE(pScreen, InstallColormap); @@ -634,30 +606,34 @@ miSpriteInstallColormap (pMap) SCREEN_EPILOGUE(pScreen, InstallColormap); - #ifdef MPX + /* InstallColormap is called before devices are initialized. We cannot + * just run through the device list, we need to go through all possible + * sprite structs.*/ + cursorIdx = 0; + while(cursorIdx < MAX_DEVICES) { - int mpCursorIdx = 0; - while (mpCursorIdx < MAX_DEVICES) + pCursorInfo = &pPriv->mpCursors[cursorIdx]; +#endif + pCursorInfo->pInstalledMap = pMap; + if (pCursorInfo->pColormap != pMap) { - miCursorInfoPtr pMPCursor = &pPriv->mpCursors[mpCursorIdx]; - pMPCursor->pInstalledMap = pMap; - if (pMPCursor->pColormap != pMap) + pCursorInfo->checkPixels = TRUE; + if (pCursorInfo->isUp) { - pMPCursor->checkPixels = TRUE; - if (pMPCursor->isUp) - miSpriteRemoveCursor(pMPCursor, pScreen); +#ifdef MPX + /* find matching device */ + pDev = inputInfo.devices; + while(pDev && pDev->id != cursorIdx) + pDev = pDev->next; + if (!pDev) + pDev = inputInfo.pointer; +#endif + miSpriteRemoveCursor (pDev, pScreen); } - mpCursorIdx++; } - } -#else - pPriv->cp->pInstalledMap = pMap; - if (pPriv->cp->pColormap != pMap) - { - pPriv->cp->checkPixels = TRUE; - if (pPriv->cp->isUp) - miSpriteRemoveCursor (pPriv->cp, pScreen); +#ifdef MPX + cursorIdx++; } #endif @@ -674,10 +650,13 @@ miSpriteStoreColors (pMap, ndef, pdef) int i; int updated; VisualPtr pVisual; + DeviceIntPtr pDev = inputInfo.pointer; + miCursorInfoPtr pCursorInfo; pPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; SCREEN_PROLOGUE(pScreen, StoreColors); + pCursorInfo = pPriv->cp; (*pScreen->StoreColors) (pMap, ndef, pdef); @@ -698,23 +677,25 @@ miSpriteStoreColors (pMap, ndef, pdef) UpdateDAC(dev, plane,blue,blueMask) #ifdef MPX + pDev = inputInfo.devices; + while(pDev) { - int mpCursorIdx = 0; - - while (mpCursorIdx < MAX_DEVICES) + if (MPHasCursor(pDev)) { - miCursorInfoPtr pMPCursor = &pPriv->mpCursors[mpCursorIdx]; - - if (pPriv->cp->pColormap == pMap) + pCursorInfo = &pPriv->mpCursors[pDev->id]; +#endif + if (pCursorInfo->pColormap == pMap) { updated = 0; pVisual = pMap->pVisual; if (pVisual->class == DirectColor) { + /* Direct color - match on any of the subfields */ + for (i = 0; i < ndef; i++) { - CheckDirect (pMPCursor, SOURCE_COLOR) - CheckDirect (pMPCursor, MASK_COLOR) + CheckDirect (pPriv->cp, SOURCE_COLOR) + CheckDirect (pPriv->cp, MASK_COLOR) } } else @@ -723,16 +704,16 @@ miSpriteStoreColors (pMap, ndef, pdef) for (i = 0; i < ndef; i++) { if (pdef[i].pixel == - pMPCursor->colors[SOURCE_COLOR].pixel) + pCursorInfo->colors[SOURCE_COLOR].pixel) { - pMPCursor->colors[SOURCE_COLOR] = pdef[i]; + pCursorInfo->colors[SOURCE_COLOR] = pdef[i]; if (++updated == 2) break; } if (pdef[i].pixel == - pMPCursor->colors[MASK_COLOR].pixel) + pCursorInfo->colors[MASK_COLOR].pixel) { - pMPCursor->colors[MASK_COLOR] = pdef[i]; + pCursorInfo->colors[MASK_COLOR] = pdef[i]; if (++updated == 2) break; } @@ -740,54 +721,14 @@ miSpriteStoreColors (pMap, ndef, pdef) } if (updated) { - pMPCursor->checkPixels = TRUE; - if (pMPCursor->isUp) - miSpriteRemoveCursor (pMPCursor, pScreen); + pCursorInfo->checkPixels = TRUE; + if (pCursorInfo->isUp) + miSpriteRemoveCursor (pDev, pScreen); } } - mpCursorIdx++; +#ifdef MPX } - } -#else - if (pPriv->cp->pColormap == pMap) - { - updated = 0; - pVisual = pMap->pVisual; - if (pVisual->class == DirectColor) - { - /* Direct color - match on any of the subfields */ - - for (i = 0; i < ndef; i++) - { - CheckDirect (pPriv->cp, SOURCE_COLOR) - CheckDirect (pPriv->cp, MASK_COLOR) - } - } - else - { - /* PseudoColor/GrayScale - match on exact pixel */ - for (i = 0; i < ndef; i++) - { - if (pdef[i].pixel == pPriv->cp->colors[SOURCE_COLOR].pixel) - { - pPriv->cp->colors[SOURCE_COLOR] = pdef[i]; - if (++updated == 2) - break; - } - if (pdef[i].pixel == pPriv->cp->colors[MASK_COLOR].pixel) - { - pPriv->cp->colors[MASK_COLOR] = pdef[i]; - if (++updated == 2) - break; - } - } - } - if (updated) - { - pPriv->cp->checkPixels = TRUE; - if (pPriv->cp->isUp) - miSpriteRemoveCursor (pPriv->cp, pScreen); - } + pDev = pDev->next; } #endif @@ -841,22 +782,27 @@ miSpriteSaveDoomedAreas (pWin, pObscured, dx, dy) ScreenPtr pScreen; miSpriteScreenPtr pScreenPriv; BoxRec cursorBox; + DeviceIntPtr pDev = inputInfo.pointer; + miCursorInfoPtr pCursorInfo; pScreen = pWin->drawable.pScreen; SCREEN_PROLOGUE (pScreen, SaveDoomedAreas); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; -#ifdef MPX - { - int mpCursorIdx = 0; - while (mpCursorIdx < MAX_DEVICES) - { - miCursorInfoPtr pMPCursor = &pScreenPriv->mpCursors[mpCursorIdx]; + pCursorInfo = pScreenPriv->cp; - if (pMPCursor->isUp) +#ifdef MPX + pDev = inputInfo.devices; + while(pDev) + { + if(MPHasCursor(pDev)) + { + pCursorInfo = &pScreenPriv->mpCursors[pDev->id]; +#endif + if (pCursorInfo->isUp) { - cursorBox = pMPCursor->saved; + cursorBox = pCursorInfo->saved; if (dx || dy) { @@ -866,25 +812,12 @@ miSpriteSaveDoomedAreas (pWin, pObscured, dx, dy) cursorBox.y2 += dy; } if (RECT_IN_REGION( pScreen, pObscured, &cursorBox) != rgnOUT) - miSpriteRemoveCursor (pMPCursor, pScreen); + miSpriteRemoveCursor (pDev, pScreen); } - mpCursorIdx++; - } - } -#else - if (pScreenPriv->cp->isUp) - { - cursorBox = pScreenPriv->cp->saved; - if (dx || dy) - { - cursorBox.x1 += dx; - cursorBox.y1 += dy; - cursorBox.x2 += dx; - cursorBox.y2 += dy; - } - if (RECT_IN_REGION( pScreen, pObscured, &cursorBox) != rgnOUT) - miSpriteRemoveCursor (pScreenPriv->cp, pScreen); +#ifdef MPX + } + pDev = pDev->next; } #endif @@ -906,19 +839,19 @@ miSpriteRealizeCursor (pDev, pScreen, pCursor) CursorPtr pCursor; { miSpriteScreenPtr pScreenPriv; + miCursorInfoPtr pCursorInfo; pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; + pCursorInfo = pScreenPriv->cp; + #ifdef MPX - { - miCursorInfoPtr pMPCursor = DevToSprite(pDev, pScreen); - if (pCursor == pMPCursor->pCursor) - pMPCursor->checkPixels = TRUE; - } -#else - if (pCursor == pScreenPriv->cp->pCursor) - pScreenPriv->cp->checkPixels = TRUE; + if (MPHasCursor(pDev)) + pCursorInfo = &pScreenPriv->mpCursors[pDev->id]; #endif + if (pCursor == pCursorInfo->pCursor) + pCursorInfo->checkPixels = TRUE; + return (*pScreenPriv->funcs->RealizeCursor) (pScreen, pCursor); } @@ -947,7 +880,7 @@ miSpriteSetCursor (pDev, pScreen, pCursor, x, y) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; miCursorInfoPtr pPointer = pScreenPriv->cp; #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pPointer = &pScreenPriv->mpCursors[pDev->id]; #endif @@ -955,7 +888,7 @@ miSpriteSetCursor (pDev, pScreen, pCursor, x, y) { pPointer->shouldBeUp = FALSE; if (pPointer->isUp) - miSpriteRemoveCursor (pPointer, pScreen); + miSpriteRemoveCursor (pDev, pScreen); pPointer->pCursor = 0; return; } @@ -1041,14 +974,14 @@ miSpriteSetCursor (pDev, pScreen, pCursor, x, y) #endif { SPRITE_DEBUG (("SetCursor remove\n")); - miSpriteRemoveCursor (pPointer, pScreen); + miSpriteRemoveCursor (pDev, pScreen); } } if (!pPointer->isUp && pPointer->pCursor) { SPRITE_DEBUG (("SetCursor restore\n")); - miSpriteRestoreCursor (pPointer, pScreen); + miSpriteRestoreCursor (pDev, pScreen); } } @@ -1066,7 +999,7 @@ miSpriteMoveCursor (pDev, pScreen, x, y) pCursor = pScreenPriv->cp->pCursor; #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pCursor = pScreenPriv->mpCursors[pDev->id].pCursor; #endif miSpriteSetCursor (pDev, pScreen, pCursor, x, y); @@ -1077,26 +1010,35 @@ miSpriteMoveCursor (pDev, pScreen, x, y) */ static void -miSpriteRemoveCursor (pDevCursor, pScreen) - miCursorInfoPtr pDevCursor; +miSpriteRemoveCursor (pDev, pScreen) + DeviceIntPtr pDev; ScreenPtr pScreen; { miSpriteScreenPtr pScreenPriv; + miCursorInfoPtr pCursorInfo; + DamageDrawInternal (pScreen, TRUE); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - miSpriteIsUpFALSE (pDevCursor, pScreen, pScreenPriv); - pDevCursor->pCacheWin = NullWindow; - if (!(*pScreenPriv->funcs->RestoreUnderCursor) (pDevCursor->id, + pCursorInfo = pScreenPriv->cp; + +#ifdef MPX + if (MPHasCursor(pDev)) + pCursorInfo = &pScreenPriv->mpCursors[pDev->id]; +#endif + + miSpriteIsUpFALSE (pCursorInfo, pScreen, pScreenPriv); + pCursorInfo->pCacheWin = NullWindow; + if (!(*pScreenPriv->funcs->RestoreUnderCursor) (pDev, pScreen, - pDevCursor->saved.x1, - pDevCursor->saved.y1, - pDevCursor->saved.x2 - - pDevCursor->saved.x1, - pDevCursor->saved.y2 - - pDevCursor->saved.y1)) + pCursorInfo->saved.x1, + pCursorInfo->saved.y1, + pCursorInfo->saved.x2 - + pCursorInfo->saved.x1, + pCursorInfo->saved.y2 - + pCursorInfo->saved.y1)) { - miSpriteIsUpTRUE (pDevCursor, pScreen, pScreenPriv); + miSpriteIsUpTRUE (pCursorInfo, pScreen, pScreenPriv); } DamageDrawInternal (pScreen, FALSE); } @@ -1107,37 +1049,46 @@ miSpriteRemoveCursor (pDevCursor, pScreen) */ static void -miSpriteRestoreCursor (pDevCursor, pScreen) - miCursorInfoPtr pDevCursor; +miSpriteRestoreCursor (pDev, pScreen) + DeviceIntPtr pDev; ScreenPtr pScreen; { miSpriteScreenPtr pScreenPriv; int x, y; CursorPtr pCursor; + miCursorInfoPtr pCursorInfo; DamageDrawInternal (pScreen, TRUE); - miSpriteComputeSaved (pDevCursor, pScreen); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - pCursor = pDevCursor->pCursor; - x = pDevCursor->x - (int)pCursor->bits->xhot; - y = pDevCursor->y - (int)pCursor->bits->yhot; - if ((*pScreenPriv->funcs->SaveUnderCursor) (pDevCursor->id, + pCursorInfo = pScreenPriv->cp; + +#ifdef MPX + if (MPHasCursor(pDev)) + pCursorInfo = &pScreenPriv->mpCursors[pDev->id]; +#endif + + miSpriteComputeSaved (pDev, pScreen); + pCursor = pCursorInfo->pCursor; + + x = pCursorInfo->x - (int)pCursor->bits->xhot; + y = pCursorInfo->y - (int)pCursor->bits->yhot; + if ((*pScreenPriv->funcs->SaveUnderCursor) (pDev, pScreen, - pDevCursor->saved.x1, - pDevCursor->saved.y1, - pDevCursor->saved.x2 - - pDevCursor->saved.x1, - pDevCursor->saved.y2 - - pDevCursor->saved.y1)) + pCursorInfo->saved.x1, + pCursorInfo->saved.y1, + pCursorInfo->saved.x2 - + pCursorInfo->saved.x1, + pCursorInfo->saved.y2 - + pCursorInfo->saved.y1)) { - if (pDevCursor->checkPixels) - miSpriteFindColors (pDevCursor, pScreen); - if ((*pScreenPriv->funcs->PutUpCursor) (pDevCursor->id, pScreen, + if (pCursorInfo->checkPixels) + miSpriteFindColors (pCursorInfo, pScreen); + if ((*pScreenPriv->funcs->PutUpCursor) (pDev, pScreen, pCursor, x, y, - pDevCursor->colors[SOURCE_COLOR].pixel, - pDevCursor->colors[MASK_COLOR].pixel)) + pCursorInfo->colors[SOURCE_COLOR].pixel, + pCursorInfo->colors[MASK_COLOR].pixel)) { - miSpriteIsUpTRUE (pDevCursor, pScreen, pScreenPriv); + miSpriteIsUpTRUE (pCursorInfo, pScreen, pScreenPriv); } } DamageDrawInternal (pScreen, FALSE); @@ -1148,43 +1099,35 @@ miSpriteRestoreCursor (pDevCursor, pScreen) */ static void -miSpriteComputeSaved (pDevCursor, pScreen) - miCursorInfoPtr pDevCursor; +miSpriteComputeSaved (pDev, pScreen) + DeviceIntPtr pDev; ScreenPtr pScreen; { miSpriteScreenPtr pScreenPriv; int x, y, w, h; int wpad, hpad; CursorPtr pCursor; + miCursorInfoPtr pCursorInfo; pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - pCursor = pDevCursor->pCursor; - x = pDevCursor->x - (int)pCursor->bits->xhot; - y = pDevCursor->y - (int)pCursor->bits->yhot; + pCursorInfo = pScreenPriv->cp; + +#ifdef MPX + if (MPHasCursor(pDev)) + pCursorInfo = &pScreenPriv->mpCursors[pDev->id]; +#endif + + + pCursor = pCursorInfo->pCursor; + x = pCursorInfo->x - (int)pCursor->bits->xhot; + y = pCursorInfo->y - (int)pCursor->bits->yhot; w = pCursor->bits->width; h = pCursor->bits->height; wpad = SPRITE_PAD; hpad = SPRITE_PAD; - pDevCursor->saved.x1 = x - wpad; - pDevCursor->saved.y1 = y - hpad; - pDevCursor->saved.x2 = pDevCursor->saved.x1 + w + wpad * 2; - pDevCursor->saved.y2 = pDevCursor->saved.y1 + h + hpad * 2; + pCursorInfo->saved.x1 = x - wpad; + pCursorInfo->saved.y1 = y - hpad; + pCursorInfo->saved.x2 = pCursorInfo->saved.x1 + w + wpad * 2; + pCursorInfo->saved.y2 = pCursorInfo->saved.y1 + h + hpad * 2; } -#ifdef MPX -static miCursorInfoPtr DevToSprite(DeviceIntPtr pDev, ScreenPtr pScreen) -{ - miSpriteScreenPtr pScreenPriv; - pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - int mpCursorIdx = 0; - while(mpCursorIdx < MAX_DEVICES) - { - miCursorInfoPtr pMPCursor = &pScreenPriv->mpCursors[mpCursorIdx]; - if (pMPCursor->id == pDev->id) - return pMPCursor; - mpCursorIdx++; - } - return pScreenPriv->cp; -} - -#endif diff --git a/mi/misprite.h b/mi/misprite.h index e0c55d09b..96d2d7d54 100644 --- a/mi/misprite.h +++ b/mi/misprite.h @@ -42,7 +42,7 @@ typedef struct { CursorPtr /*pCursor*/ ); Bool (*PutUpCursor)( - int /* deviceid */, + DeviceIntPtr /*pDev*/, ScreenPtr /*pScreen*/, CursorPtr /*pCursor*/, int /*x*/, @@ -51,7 +51,7 @@ typedef struct { unsigned long /*mask*/ ); Bool (*SaveUnderCursor)( - int /* deviceid */, + DeviceIntPtr /*pDev*/, ScreenPtr /*pScreen*/, int /*x*/, int /*y*/, @@ -59,7 +59,7 @@ typedef struct { int /*h*/ ); Bool (*RestoreUnderCursor)( - int /* deviceid */, + DeviceIntPtr /*pDev*/, ScreenPtr /*pScreen*/, int /*x*/, int /*y*/, @@ -67,7 +67,7 @@ typedef struct { int /*h*/ ); Bool (*MoveCursor)( - int /* deviceid */, + DeviceIntPtr /*pDev*/, ScreenPtr /*pScreen*/, CursorPtr /*pCursor*/, int /*x*/, @@ -80,7 +80,7 @@ typedef struct { unsigned long /*mask*/ ); Bool (*ChangeSave)( - int /* deviceid */, + DeviceIntPtr /*pDev*/, ScreenPtr /*pScreen*/, int /*x*/, int /*y*/, From 023da4e804ad260eaf0c50d2ec7213dd514e2113 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 27 Nov 2006 15:54:33 +1030 Subject: [PATCH 022/634] mi: mipointer.c cleanup, reducing code duplication, using MPHasCursor() instead of IsMPDev() --- Changelog | 8 ++++ mi/mipointer.c | 117 +++++++++++++++++++++++-------------------------- 2 files changed, 62 insertions(+), 63 deletions(-) diff --git a/Changelog b/Changelog index c309ad503..b73e93a40 100644 --- a/Changelog +++ b/Changelog @@ -12,6 +12,14 @@ Files: mi/misprite.c mi/misprite.h +____________________________________________________________ + +mi: mipointer.c cleanup, reducing code duplication, using MPHasCursor() + instead of IsMPDev() + +Files: + mi/mipointer.c + == 23.11.06 == mi: closing memory leak, miPointer is freed in miPointerCloseScreen bugfix: uninitialized pPointer in miPointerGetPosition ifndef MPX diff --git a/mi/mipointer.c b/mi/mipointer.c index acce4ccab..db9a6f888 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -27,7 +27,6 @@ Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -#ifdef MPX /* * MPX additions: * Copyright © 2006 Peter Hutterer @@ -35,7 +34,6 @@ in this Software without prior written authorization from The Open Group. * Author: Peter Hutterer * */ -#endif #ifdef HAVE_DIX_CONFIG_H #include @@ -111,6 +109,7 @@ miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) Bool waitForUpdate; { miPointerScreenPtr pScreenPriv; + miPointerPtr pPointer; if (miPointerGeneration != serverGeneration) { @@ -150,26 +149,15 @@ miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) /* * set up the pointer object */ +#if !defined MPX miPointer = (miPointerPtr)xalloc(sizeof(miPointerRec)); if (!miPointer) { xfree((pointer)pScreenPriv); return FALSE; } - miPointer->pScreen = NULL; - miPointer->pSpriteScreen = NULL; - miPointer->pCursor = NULL; - miPointer->pSpriteCursor = NULL; - miPointer->limits.x1 = 0; - miPointer->limits.x2 = 32767; - miPointer->limits.y1 = 0; - miPointer->limits.y2 = 32767; - miPointer->confined = FALSE; - miPointer->x = 0; - miPointer->y = 0; - -#ifdef MPX - xfree(miPointer); + pPointer = miPointer; +#else /* ifdef MPX */ miPointer = &miMPPointers[1]; { int mpPtrIdx = 0; /* loop counter */ @@ -178,17 +166,21 @@ miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) */ while(mpPtrIdx < MAX_DEVICES) { - miMPPointers[mpPtrIdx].pScreen = NULL; - miMPPointers[mpPtrIdx].pSpriteScreen = NULL; - miMPPointers[mpPtrIdx].pCursor = NULL; - miMPPointers[mpPtrIdx].pSpriteCursor = NULL; - miMPPointers[mpPtrIdx].limits.x1 = 0; - miMPPointers[mpPtrIdx].limits.x2 = 32767; - miMPPointers[mpPtrIdx].limits.y1 = 0; - miMPPointers[mpPtrIdx].limits.y2 = 32767; - miMPPointers[mpPtrIdx].confined = FALSE; - miMPPointers[mpPtrIdx].x = 0; - miMPPointers[mpPtrIdx].y = 0; + pPointer = &miMPPointers[mpPtrIdx]; +#endif + + pPointer->pScreen = NULL; + pPointer->pSpriteScreen = NULL; + pPointer->pCursor = NULL; + pPointer->pSpriteCursor = NULL; + pPointer->limits.x1 = 0; + pPointer->limits.x2 = 32767; + pPointer->limits.y1 = 0; + pPointer->limits.y2 = 32767; + pPointer->confined = FALSE; + pPointer->x = 0; + pPointer->y = 0; +#ifdef MPX mpPtrIdx++; } } @@ -202,23 +194,26 @@ miPointerCloseScreen (index, pScreen) int index; ScreenPtr pScreen; { - int mpPointerIdx = 0; SetupScreen(pScreen); + miPointerPtr pPointer = miPointer; #ifdef MPX + int mpPointerIdx = 0; + while(mpPointerIdx < MAX_DEVICES) { - if (pScreen == miMPPointers[mpPointerIdx].pScreen) - miMPPointers[mpPointerIdx].pScreen = 0; - if (pScreen == miMPPointers[mpPointerIdx].pSpriteScreen) - miMPPointers[mpPointerIdx].pSpriteScreen = 0; + pPointer = &miMPPointers[mpPointerIdx]; +#endif + if (pScreen == pPointer->pScreen) + pPointer->pScreen = 0; + if (pScreen == pPointer->pSpriteScreen) + pPointer->pSpriteScreen = 0; +#ifdef MPX mpPointerIdx++; } -#else - if (pScreen == miPointer->pScreen) - miPointer->pScreen = 0; - if (pScreen == miPointer->pSpriteScreen) - miPointer->pSpriteScreen = 0; +#endif + +#if !defined MPX xfree((pointer)miPointer); #endif pScreen->CloseScreen = pScreenPriv->CloseScreen; @@ -256,19 +251,15 @@ miPointerDisplayCursor (pDev, pScreen, pCursor) ScreenPtr pScreen; CursorPtr pCursor; { + miPointerPtr pPointer = miPointer; #ifdef MPX /* use core pointer for non MPX devices */ - if (!IsMPDev(pDev)) - pDev = inputInfo.pointer; - - miMPPointers[pDev->id].pCursor = pCursor; - miMPPointers[pDev->id].pScreen = pScreen; - miPointerUpdateSprite(pDev); -#else - miPointer->pCursor = pCursor; - miPointer->pScreen = pScreen; - miPointerUpdateSprite(inputInfo.pointer); + if (MPHasCursor(pDev)) + pPointer = &miMPPointers[pDev->id]; #endif + pPointer->pCursor = pCursor; + pPointer->pScreen = pScreen; + miPointerUpdateSprite(pDev); return TRUE; } @@ -280,7 +271,7 @@ miPointerConstrainCursor (pDev, pScreen, pBox) { miPointerPtr pPointer = miPointer; #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pPointer = &miMPPointers[pDev->id]; #endif pPointer->limits = *pBox; @@ -340,7 +331,7 @@ miPointerWarpCursor (pDev, pScreen, x, y) SetupScreen (pScreen); #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pPointer = &miMPPointers[pDev->id]; #endif @@ -394,16 +385,16 @@ miPointerUpdateSprite (DeviceIntPtr pDev) int x, y, devx, devy; miPointerPtr pPointer = miPointer; -#ifdef MPX if (!pDev || - !(pDev->coreEvents || pDev == inputInfo.pointer || pDev->isMPDev)) -#else - if (!pDev || !(pDev->coreEvents || pDev == inputInfo.pointer)) + !(pDev->coreEvents || pDev == inputInfo.pointer +#ifdef MPX + || pDev->isMPDev #endif + )) return; #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pPointer = &miMPPointers[pDev->id]; #endif @@ -497,7 +488,7 @@ miPointerSetScreen(DeviceIntPtr pDev, int screen_no, int x, int y) (*pScreenPriv->screenFuncs->NewEventScreen) (pScreen, FALSE); NewCurrentScreen (pDev, pScreen, x, y); #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pPointer = &miMPPointers[pDev->id]; #endif pPointer->limits.x2 = pScreen->width; @@ -515,7 +506,7 @@ miPointerGetScreen(DeviceIntPtr pDev) { miPointerPtr pPointer; #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pPointer = &miMPPointers[pDev->id]; #endif return pPointer->pScreen; @@ -539,7 +530,7 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y, unsigned long time) miPointerPtr pPointer = miPointer; #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pPointer = &(miMPPointers[pDev->id]); #endif @@ -547,12 +538,12 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y, unsigned long time) if (!pScreen) return; /* called before ready */ -#ifdef MPX if (!pDev || - !(pDev->coreEvents || pDev == inputInfo.pointer || pDev->isMPDev)) -#else - if (!pDev || !(pDev->coreEvents || pDev == inputInfo.pointer)) + !(pDev->coreEvents || pDev == inputInfo.pointer +#ifdef MPX + || pDev->isMPDev #endif + )) return; if (*x < 0 || *x >= pScreen->width || *y < 0 || *y >= pScreen->height) @@ -601,7 +592,7 @@ miPointerGetPosition(DeviceIntPtr pDev, int *x, int *y) { miPointerPtr pPointer = miPointer; #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pPointer = &miMPPointers[pDev->id]; #endif *x = pPointer->x; @@ -623,7 +614,7 @@ miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, SetupScreen(pScreen); #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pPointer = &miMPPointers[pDev->id]; #endif From 85ea408e38f452bcf9109f14fd1016d159692a99 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 27 Nov 2006 18:07:16 +1030 Subject: [PATCH 023/634] mi: malloc checks for misprite and midispcur, code cleanup removed IsMPDev() --- Changelog | 16 +++++++- dix/events.c | 40 +++++++++--------- mi/midispcur.c | 40 +++++++++--------- mi/mipointer.c | 7 ---- mi/misprite.c | 108 ++++++++++++++++++++++++------------------------- 5 files changed, 106 insertions(+), 105 deletions(-) diff --git a/Changelog b/Changelog index b73e93a40..5482251c4 100644 --- a/Changelog +++ b/Changelog @@ -14,12 +14,24 @@ Files: ____________________________________________________________ -mi: mipointer.c cleanup, reducing code duplication, using MPHasCursor() - instead of IsMPDev() +mi: mipointer.c cleanup, reducing code duplication, using MPHasCursor(), + removing IsMPDev() Files: mi/mipointer.c +____________________________________________________________ + +mi: malloc checks for misprite and midispcur, code cleanup + removed IsMPDev() + +Files: + mi/misprite.c + mi/mipointer.c + mi/midispcur.c + dix/events.c + + == 23.11.06 == mi: closing memory leak, miPointer is freed in miPointerCloseScreen bugfix: uninitialized pPointer in miPointerGetPosition ifndef MPX diff --git a/dix/events.c b/dix/events.c index d3b0e58bc..27f42e1ba 100644 --- a/dix/events.c +++ b/dix/events.c @@ -259,9 +259,9 @@ typedef struct { static SpritePtr sprite; /* info about the cursor sprite */ #ifdef MPX -static SpritePtr mpsprites; /* info about the MPX sprites */ +#define MPXDBG(...) fprintf (stderr, "MPX: " __VA_ARGS__) -extern BOOL IsMPDev(DeviceIntPtr dev); +static SpritePtr mpsprites; /* info about the MPX sprites */ /** * True for the core pointer and any MPX device. @@ -371,7 +371,7 @@ XineramaSetCursorPosition( SpritePtr pSprite = sprite; #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pSprite = &mpsprites[pDev->id]; #endif @@ -416,7 +416,7 @@ XineramaConstrainCursor(DeviceIntPtr pDev) BoxRec newBox; #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pSprite = &mpsprites[pDev->id]; #endif @@ -445,7 +445,7 @@ XineramaCheckPhysLimits( if (!cursor) return; #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pSprite = &mpsprites[pDev->id]; #endif @@ -583,7 +583,7 @@ XineramaCheckMotion(xEvent *xE, DeviceIntPtr pDev) SpritePtr pSprite = sprite; #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pSprite = &mpsprites[pDev->id]; #endif @@ -704,7 +704,7 @@ XineramaChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) SpritePtr pSprite = sprite; #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pSprite = &mpsprites[pDev->id]; #endif @@ -748,7 +748,7 @@ ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py) int incx = 1, incy = 1; SpritePtr pSprite = sprite; #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pSprite = &mpsprites[pDev->id]; #endif @@ -794,7 +794,7 @@ CheckPhysLimits( SpritePtr pSprite = sprite; #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pSprite = &mpsprites[pDev->id]; #endif @@ -924,7 +924,7 @@ PointerConfinedToScreen(DeviceIntPtr pDev) { SpritePtr pSprite = sprite; #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pSprite = &mpsprites[pDev->id]; #endif return pSprite->confined; @@ -936,7 +936,7 @@ ChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) SpritePtr pSprite = sprite; #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pSprite = &mpsprites[pDev->id]; #endif @@ -979,7 +979,7 @@ PostNewCursor(DeviceIntPtr pDev) SpritePtr pSprite = sprite; #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pSprite = &mpsprites[pDev->id]; #endif @@ -1018,7 +1018,7 @@ _X_EXPORT WindowPtr GetSpriteWindow(DeviceIntPtr pDev) { #ifdef MPX - if(IsMPDev(pDev)) + if(MPHasCursor(pDev)) return mpsprites[pDev->id].win; #endif @@ -1036,7 +1036,7 @@ GetSpritePosition(DeviceIntPtr pDev, int *px, int *py) { SpritePtr pSprite = sprite; #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pSprite = &mpsprites[pDev->id]; #endif *px = pSprite->hotPhys.x; @@ -1860,7 +1860,7 @@ FixUpEventFromWindow( { SpritePtr pSprite = sprite; #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pSprite = &mpsprites[pDev->id]; #endif @@ -2094,7 +2094,7 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev) SpritePtr pSprite = sprite; #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pSprite = &mpsprites[pDev->id]; #endif @@ -2131,7 +2131,7 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev) xeviehot.y = pSprite->hot.y; #endif pSprite->hotPhys = pSprite->hot; -#ifndef MPX /* XXX ndef!! */ +#if !defined MPX if ((pSprite->hotPhys.x != XE_KBPTR.rootX) || (pSprite->hotPhys.y != XE_KBPTR.rootY)) { @@ -2177,7 +2177,7 @@ WindowsRestructured() DeviceIntPtr pDev = inputInfo.devices; while(pDev) { - if (pDev != inputInfo.keyboard) + if (MPHasCursor(pDev)) CheckMotion((xEvent *)NULL, pDev); pDev = pDev->next; } @@ -2318,7 +2318,7 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y) { SpritePtr pSprite = sprite; #ifdef MPX - if (IsMPDev(pDev)) + if (MPHasCursor(pDev)) pSprite = &mpsprites[pDev->id]; #endif @@ -3051,7 +3051,7 @@ ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count SpritePtr pSprite = sprite; #ifdef MPX - if (IsMPDev(mouse)) + if (MPHasCursor(mouse)) pSprite = &mpsprites[mouse->id]; #endif diff --git a/mi/midispcur.c b/mi/midispcur.c index 514fae88d..0b4ef49d6 100644 --- a/mi/midispcur.c +++ b/mi/midispcur.c @@ -139,6 +139,7 @@ miDCInitialize (pScreen, screenFuncs) miPointerScreenFuncPtr screenFuncs; { miDCScreenPtr pScreenPriv; + miDCBufferPtr pBuffer; if (miDCGeneration != serverGeneration) { @@ -154,36 +155,33 @@ miDCInitialize (pScreen, screenFuncs) /* * initialize the entire private structure to zeros */ +#if !defined MPX pScreenPriv->pCoreBuffer = (miDCBufferPtr)xalloc(sizeof(miDCBufferRec)); - - pScreenPriv->pCoreBuffer->pSourceGC = - pScreenPriv->pCoreBuffer->pMaskGC = - pScreenPriv->pCoreBuffer->pSaveGC = - pScreenPriv->pCoreBuffer->pRestoreGC = - pScreenPriv->pCoreBuffer->pMoveGC = - pScreenPriv->pCoreBuffer->pPixSourceGC = - pScreenPriv->pCoreBuffer->pPixMaskGC = NULL; -#ifdef ARGB_CURSOR - pScreenPriv->pCoreBuffer->pRootPicture = NULL; - pScreenPriv->pCoreBuffer->pTempPicture = NULL; -#endif - - pScreenPriv->pCoreBuffer->pSave = pScreenPriv->pCoreBuffer->pTemp = NULL; - -#ifdef MPX + if (!pScreenPriv->pCoreBuffer) + { + xfree((pointer)pScreenPriv); + return FALSE; + } + pBuffer = pScreenPriv->pCoreBuffer; +#else /* ifdef MPX */ { int mpBufferIdx = 0; pScreenPriv->pMPBuffers = (miDCBufferPtr)xalloc(MAX_DEVICES * sizeof(miDCBufferRec)); - + if (!pScreenPriv->pMPBuffers) + { + xfree((pointer)pScreenPriv); + return FALSE; + } + /* virtual core pointer ID is 1 */ - xfree(pScreenPriv->pCoreBuffer); pScreenPriv->pCoreBuffer = &pScreenPriv->pMPBuffers[1]; - while (mpBufferIdx < MAX_DEVICES) + while(mpBufferIdx < MAX_DEVICES) { - miDCBufferPtr pBuffer = &pScreenPriv->pMPBuffers[mpBufferIdx]; + pBuffer = &pScreenPriv->pMPBuffers[mpBufferIdx]; +#endif pBuffer->pSourceGC = pBuffer->pMaskGC = pBuffer->pSaveGC = @@ -198,11 +196,13 @@ miDCInitialize (pScreen, screenFuncs) pBuffer->pSave = pBuffer->pTemp = NULL; +#ifdef MPX mpBufferIdx++; } } #endif + pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = miDCCloseScreen; diff --git a/mi/mipointer.c b/mi/mipointer.c index db9a6f888..6ccc7299d 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -71,13 +71,6 @@ static miPointerPtr miPointer; */ static miPointerRec miMPPointers[MAX_DEVICES]; - -/* Check if the given device is a MP device. */ -_X_EXPORT Bool -IsMPDev(DeviceIntPtr pDev) -{ - return (pDev && pDev->isMPDev && pDev->id < MAX_DEVICES); -} #endif static Bool miPointerRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, diff --git a/mi/misprite.c b/mi/misprite.c index e51599e63..ec90ad2dc 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -187,11 +187,9 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs) miSpriteCursorFuncPtr cursorFuncs; miPointerScreenFuncPtr screenFuncs; { -#ifdef MPX - int mpCursorIdx = 0; -#endif miSpriteScreenPtr pScreenPriv; VisualPtr pVisual; + miCursorInfoPtr pCursorInfo; if (!DamageSetup (pScreen)) return FALSE; @@ -239,73 +237,71 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs) pScreenPriv->BlockHandler = pScreen->BlockHandler; +#if !defined MPX pScreenPriv->cp = (miCursorInfoPtr)xalloc(sizeof(miCursorInfoRec)); - pScreenPriv->cp->pCursor = NULL; - pScreenPriv->cp->x = 0; - pScreenPriv->cp->y = 0; - pScreenPriv->cp->isUp = FALSE; - pScreenPriv->cp->shouldBeUp = FALSE; - pScreenPriv->cp->pCacheWin = NullWindow; - pScreenPriv->cp->isInCacheWin = FALSE; - pScreenPriv->cp->checkPixels = TRUE; - pScreenPriv->cp->pInstalledMap = NULL; - pScreenPriv->cp->pColormap = NULL; - pScreenPriv->cp->colors[SOURCE_COLOR].red = 0; - pScreenPriv->cp->colors[SOURCE_COLOR].green = 0; - pScreenPriv->cp->colors[SOURCE_COLOR].blue = 0; - pScreenPriv->cp->colors[MASK_COLOR].red = 0; - pScreenPriv->cp->colors[MASK_COLOR].green = 0; - pScreenPriv->cp->colors[MASK_COLOR].blue = 0; + if (!pScreenPriv->cp) + { + xfree((pointer)pScreenPriv); + return FALSE; + } + pCursorInfo = pScreenPriv->cp; +#else + /* alloc and zero memory for all MPX cursors */ + pScreenPriv->mpCursors = (miCursorInfoPtr)xalloc(MAX_DEVICES * sizeof(miCursorInfoRec)); + if (!pScreenPriv->mpCursors) + { + xfree((pointer)pScreenPriv->cp); + xfree((pointer)pScreenPriv); + return FALSE; + } + pScreenPriv->cp = &(pScreenPriv->mpCursors[1]); + + { + int mpCursorIdx = 0; + while (mpCursorIdx < MAX_DEVICES) + { + pCursorInfo = &(pScreenPriv->mpCursors[mpCursorIdx]); +#endif + + pCursorInfo->pCursor = NULL; + pCursorInfo->x = 0; + pCursorInfo->y = 0; + pCursorInfo->isUp = FALSE; + pCursorInfo->shouldBeUp = FALSE; + pCursorInfo->pCacheWin = NullWindow; + pCursorInfo->isInCacheWin = FALSE; + pCursorInfo->checkPixels = TRUE; + pCursorInfo->pInstalledMap = NULL; + pCursorInfo->pColormap = NULL; + pCursorInfo->colors[SOURCE_COLOR].red = 0; + pCursorInfo->colors[SOURCE_COLOR].green = 0; + pCursorInfo->colors[SOURCE_COLOR].blue = 0; + pCursorInfo->colors[MASK_COLOR].red = 0; + pCursorInfo->colors[MASK_COLOR].green = 0; + pCursorInfo->colors[MASK_COLOR].blue = 0; + +#ifdef MPX + mpCursorIdx++; + } + } +#endif pScreenPriv->funcs = cursorFuncs; pScreen->devPrivates[miSpriteScreenIndex].ptr = (pointer) pScreenPriv; - + pScreen->CloseScreen = miSpriteCloseScreen; pScreen->GetImage = miSpriteGetImage; pScreen->GetSpans = miSpriteGetSpans; pScreen->SourceValidate = miSpriteSourceValidate; - + pScreen->CopyWindow = miSpriteCopyWindow; - + pScreen->SaveDoomedAreas = miSpriteSaveDoomedAreas; - + pScreen->InstallColormap = miSpriteInstallColormap; pScreen->StoreColors = miSpriteStoreColors; pScreen->BlockHandler = miSpriteBlockHandler; - -#ifdef MPX - /* alloc and zero memory for all MPX cursors */ - pScreenPriv->mpCursors = (miCursorInfoPtr)xalloc(MAX_DEVICES * sizeof(miCursorInfoRec)); - while (mpCursorIdx < MAX_DEVICES) - { - miCursorInfoPtr cursor = &(pScreenPriv->mpCursors[mpCursorIdx]); - - cursor->id = mpCursorIdx; - cursor->pCursor = NULL; - cursor->x = 0; - cursor->y = 0; - cursor->isUp = FALSE; - cursor->shouldBeUp = FALSE; - cursor->pCacheWin = NullWindow; - cursor->isInCacheWin = FALSE; - cursor->checkPixels = TRUE; - cursor->pInstalledMap = NULL; - cursor->pColormap = NULL; - cursor->colors[SOURCE_COLOR].red = 0; - cursor->colors[SOURCE_COLOR].green = 0; - cursor->colors[SOURCE_COLOR].blue = 0; - cursor->colors[MASK_COLOR].red = 0; - cursor->colors[MASK_COLOR].green = 0; - cursor->colors[MASK_COLOR].blue = 0; - - mpCursorIdx++; - } - - /* virtual core pointer has id 1, we might as well save the memory */ - xfree(pScreenPriv->cp); - pScreenPriv->cp = &(pScreenPriv->mpCursors[1]); -#endif damageRegister = 0; From e88bc0e55a6937ff0b47fe38f60bfa8991196578 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 28 Nov 2006 14:34:36 +1030 Subject: [PATCH 024/634] mi: Bugfix: FreeCursor ignores negative refcounts. mieq: Bugfix: Motion notifies did overwrite DeviceMotionNotifies --- Changelog | 9 +++++++++ dix/cursor.c | 5 ++++- mi/mieq.c | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 5482251c4..a9989ebf1 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,13 @@ MPX Changelog file +== 28.11.06 == +mi: Bugfix: FreeCursor ignores negative refcounts. + +mieq: Bugfix: Motion notifies did overwrite DeviceMotionNotifies + +Files: + dix/cursor.c + mi/mieq.c + == 27.11.06 == mi: free allocated memory in miDCCloseScreen and in miDCInitialize in case of errors. diff --git a/dix/cursor.c b/dix/cursor.c index 92297b923..6da763b44 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -117,7 +117,10 @@ FreeCursor(pointer value, XID cid) ScreenPtr pscr; DeviceIntPtr pDev; - if ( --pCurs->refcnt > 0) + /* FIXME: MPX: When FreeClientRessources is called, it calls FreeCursor + * too often. Refcnt gots < 0 and FreeCursorBits segfaults because the + * memory is already freed. */ + if ( --pCurs->refcnt != 0) return(Success); pDev = inputInfo.pointer; diff --git a/mi/mieq.c b/mi/mieq.c index 40a3a52c5..b40944ee1 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -119,7 +119,7 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e) if (e->u.u.type == MotionNotify) isMotion = inputInfo.pointer->id; else if (e->u.u.type == DeviceMotionNotify) - isMotion = pDev->id; + isMotion = pDev->id | (1 << 8); /* flag to indicate DeviceMotion */ /* We silently steal valuator events: just tack them on to the last * motion event they need to be attached to. Sigh. */ From bdf718907b3202815a04ec28a868689708f43da9 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 28 Nov 2006 18:06:34 +1030 Subject: [PATCH 025/634] dix: missing parameter to SetCursorPosition in CheckMotion ifndef MPX mi: missing include in misprite.c ifndef MPX --- Changelog | 11 +++++++++++ dix/events.c | 2 +- mi/misprite.c | 4 +--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Changelog b/Changelog index a9989ebf1..7d0d80c65 100644 --- a/Changelog +++ b/Changelog @@ -8,6 +8,17 @@ Files: dix/cursor.c mi/mieq.c +____________________________________________________________ + +dix: missing parameter to SetCursorPosition in CheckMotion ifndef MPX + +mi: missing include in misprite.c ifndef MPX + +Files: + dix/events.c + mi/misprite.c + + == 27.11.06 == mi: free allocated memory in miDCCloseScreen and in miDCInitialize in case of errors. diff --git a/dix/events.c b/dix/events.c index 27f42e1ba..8ef318a22 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2136,7 +2136,7 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev) (pSprite->hotPhys.y != XE_KBPTR.rootY)) { (*pSprite->hotPhys.pScreen->SetCursorPosition)( - pSprite->hotPhys.pScreen, + pDev, pSprite->hotPhys.pScreen, pSprite->hotPhys.x, pSprite->hotPhys.y, FALSE); } #endif diff --git a/mi/misprite.c b/mi/misprite.c index ec90ad2dc..e55032bb8 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -56,15 +56,13 @@ in this Software without prior written authorization from The Open Group. # include "mispritest.h" # include "dixfontstr.h" # include +# include "inputstr.h" #ifdef RENDER # include "mipict.h" #endif # include "damage.h" -#ifdef MPX -# include "inputstr.h" -#endif #define SPRITE_DEBUG_ENABLE 0 From afd6af65510b0147f16f08314045b3506bfa9d89 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 29 Nov 2006 17:55:15 +1030 Subject: [PATCH 026/634] mpx: Infrastructure for MPX extension, GetExtensionVersion request works. --- Changelog | 17 +++ Makefile.am | 2 + configure.ac | 19 +-- include/globals.h | 4 + mi/miinitext.c | 9 ++ mpx/Makefile.am | 9 ++ mpx/extinit.c | 287 ++++++++++++++++++++++++++++++++++++++++++++++ mpx/getvers.c | 80 +++++++++++++ mpx/getvers.h | 22 ++++ mpx/mpxglobals.h | 15 +++ mpx/selectev.c | 16 +++ os/utils.c | 3 + 12 files changed, 475 insertions(+), 8 deletions(-) create mode 100644 mpx/Makefile.am create mode 100644 mpx/extinit.c create mode 100644 mpx/getvers.c create mode 100644 mpx/getvers.h create mode 100644 mpx/mpxglobals.h create mode 100644 mpx/selectev.c diff --git a/Changelog b/Changelog index 7d0d80c65..c818bce63 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,21 @@ MPX Changelog file +== 29.11.206 == +mpx: Infrastructure for MPX extension, GetExtensionVersion request works. + +Files: + mpx/ + mpx/Makefile.am + mpx/extinit.c + mpx/getvers.c + mpx/getvers.h + mpxglobals.h + mpx/selectev.c + configure.ac + Makefile.am + os/utils.c + mi/miinitext.c + include/globals.h + == 28.11.06 == mi: Bugfix: FreeCursor ignores negative refcounts. diff --git a/Makefile.am b/Makefile.am index f35539e49..572d0882f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -42,6 +42,7 @@ SUBDIRS = \ randr \ render \ Xi \ + mpx \ xkb \ $(DBE_DIR) \ $(MFB_DIR) \ @@ -78,6 +79,7 @@ DIST_SUBDIRS = \ randr \ render \ Xi \ + mpx \ xkb \ dbe \ mfb \ diff --git a/configure.ac b/configure.ac index 706df9137..e5d2f5ea2 100644 --- a/configure.ac +++ b/configure.ac @@ -791,6 +791,8 @@ AM_CONDITIONAL(MPX, [test "x$MPX" = xyes]) if test "x$MPX" = xyes; then AC_DEFINE(MPX, 1, [Support MPX multipointer extension]) + MPX_LIB='$(top_builddir)/mpx/libmpx.la' + MPX_INC='-I$(top_srcdir)/mpx' fi AM_CONDITIONAL(XF86UTILS, test "x$XF86UTILS" = xyes) @@ -1026,7 +1028,7 @@ if test "x$DMX" = xyes; then modules not found.]) fi DMX_INCLUDES="$XEXT_INC $RENDER_INC $XTRAP_INC $RECORD_INC" - XDMX_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $RENDER_LIB $XTRAP_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $OS_LIB $CWRAP_LIB" + XDMX_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $RENDER_LIB $XTRAP_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $OS_LIB $CWRAP_LIB $MPX_LIB" AC_SUBST([XDMX_LIBS]) dnl USB sources in DMX require @@ -1065,7 +1067,7 @@ AC_MSG_RESULT([$XVFB]) AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes]) if test "x$XVFB" = xyes; then - XVFB_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS" + XVFB_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS $MPX_LIB" AC_SUBST([XVFB_LIBS]) fi @@ -1081,7 +1083,7 @@ AC_MSG_RESULT([$XNEST]) AM_CONDITIONAL(XNEST, [test "x$XNEST" = xyes]) if test "x$XNEST" = xyes; then - XNEST_LIBS="$XSERVER_LIBS $FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS" + XNEST_LIBS="$XSERVER_LIBS $FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS $MPX_LIB" AC_SUBST([XNEST_LIBS]) fi @@ -1110,7 +1112,7 @@ AC_MSG_RESULT([$XGL]) AM_CONDITIONAL(XGL, [test "x$XGL" = xyes]) if test "x$XGL" = xyes; then - XGL_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB" + XGL_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $MPX_LIB" AC_SUBST([XGL_LIBS]) AC_DEFINE(XGL_MODULAR, 1, [Use loadable XGL modules]) @@ -1131,7 +1133,7 @@ AC_MSG_RESULT([$XEGL]) AM_CONDITIONAL(XEGL, [test "x$XEGL" = xyes]) if test "x$XEGL" = xyes; then - XEGL_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB" + XEGL_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $MPX_LIB" AC_SUBST([XEGL_LIBS]) fi @@ -1147,7 +1149,7 @@ AC_MSG_RESULT([$XGLX]) AM_CONDITIONAL(XGLX, [test "x$XGLX" = xyes]) if test "x$XGLX" = xyes; then - XGLX_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB" + XGLX_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $MPX_LIB" AC_SUBST([XGLX_LIBS]) fi @@ -1168,7 +1170,7 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os' XORG_INCS="$XORG_DDXINCS $XORG_OSINCS" XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H" - XORG_LIBS="$COMPOSITE_LIB $MI_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XPSTUBS_LIB $OS_LIB" + XORG_LIBS="$COMPOSITE_LIB $MI_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XPSTUBS_LIB $OS_LIB $MPX_LIB" if test "x$DGA" = xauto; then PKG_CHECK_MODULES(DGA, xf86dgaproto, [DGA=yes], [DGA=no]) @@ -1633,7 +1635,7 @@ if test "$KDRIVE" = yes; then # dix os fb mi extension glx (NOTYET) damage shadow xpstubs #KDRIVE_PURE_LIBS="$DIX_LIB $OS_LIB $FB_LIB $XEXT_LIB $MIEXT_DAMAGE_LIB \ # $MIEXT_SHADOW_LIB $XPSTUBS_LIB" - KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB" + KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB $MPX_LIB" KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a' case $host_os in *linux*) @@ -1826,6 +1828,7 @@ render/Makefile xkb/Makefile Xext/Makefile Xi/Makefile +mpx/Makefile xfixes/Makefile exa/Makefile hw/Makefile diff --git a/include/globals.h b/include/globals.h index 821b12bdb..ef2256199 100644 --- a/include/globals.h +++ b/include/globals.h @@ -63,6 +63,10 @@ extern Bool noCompositeExtension; extern Bool noDamageExtension; #endif +#ifdef MPX +extern Bool noMPXExtension; +#endif + #ifdef DBE extern Bool noDbeExtension; #endif diff --git a/mi/miinitext.c b/mi/miinitext.c index cb3447372..3d9522d78 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -384,6 +384,9 @@ extern void DamageExtensionInit(INITARGS); #ifdef COMPOSITE extern void CompositeExtensionInit(INITARGS); #endif +#ifdef MPX +extern void MPXExtensionInit(INITARGS); +#endif /* The following is only a small first step towards run-time * configurable extensions. @@ -663,6 +666,9 @@ InitExtensions(argc, argv) #ifdef DAMAGE if (!noDamageExtension) DamageExtensionInit(); #endif +#ifdef MPX + if (!noMPXExtension) MPXExtensionInit(); +#endif } void @@ -733,6 +739,9 @@ static ExtensionModule staticExtensions[] = { #ifdef XEVIE { XevieExtensionInit, "XEVIE", &noXevieExtension, NULL }, #endif +#ifdef MPX + { MPXExtensionInit, "MPX", &noMPXExtension, NULL }, +#endif { NULL, NULL, NULL, NULL, NULL } }; diff --git a/mpx/Makefile.am b/mpx/Makefile.am new file mode 100644 index 000000000..db75eb53e --- /dev/null +++ b/mpx/Makefile.am @@ -0,0 +1,9 @@ +noinst_LTLIBRARIES = libmpx.la + +AM_CFLAGS = $(DIX_CFLAGS) + +libmpx_la_SOURCES = \ + extinit.c \ + getvers.c \ + getvers.h + diff --git a/mpx/extinit.c b/mpx/extinit.c new file mode 100644 index 000000000..59bc49448 --- /dev/null +++ b/mpx/extinit.c @@ -0,0 +1,287 @@ +/* Copyright 2006 by Peter Hutterer */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "inputstr.h" +//#include "gcstruct.h" /* pointer for extnsionst.h */ +#include "extnsionst.h" /* extension entry */ +#include +#include + +#include "mpxextinit.h" +#include "swaprep.h" + +#include "getvers.h" + +static Mask lastExtEventMask = 1; +int ExtEventIndex; +Mask ExtValidMasks[EMASKSIZE]; + +XExtEventInfo EventInfo[32]; + +/***************************************************************** + * + * Externs defined elsewhere in the X server. + * + */ + +extern XExtensionVersion AllExtensionVersions[]; + +Mask PropagateMask[MAX_DEVICES]; + +/***************************************************************** + * + * Globals referenced elsewhere in the server. + * + */ + +int MPXReqCode = 0; +int MPXEventBase = 0; +int MPXErrorBase = 0; + +int MPXButtonPress; +int MPXButtonRelease; +int MPXMotionNotify; + +/***************************************************************** + * + * Declarations of local routines. + * + */ + +static XExtensionVersion thisversion = { MPX_Present, + MPX_Major, + MPX_Minor +}; + +/********************************************************************** + * + * MPXExtensionInit - initialize the input extension. + * + * Called from InitExtensions in main() or from QueryExtension() if the + * extension is dynamically loaded. + * + * This extension has several events and errors. + * + */ + +void +MPXExtensionInit(void) +{ + ExtensionEntry *extEntry; + + extEntry = AddExtension(MPXNAME, MPXEVENTS, MPXERRORS, + ProcMPXDispatch, SProcMPXDispatch, + MPXResetProc, StandardMinorOpcode); + if (extEntry) { + MPXReqCode = extEntry->base; + MPXEventBase = extEntry->eventBase; + MPXErrorBase = extEntry->errorBase; + + AllExtensionVersions[MPXReqCode - 128] = thisversion; + MPXFixExtensionEvents(extEntry); + ReplySwapVector[MPXReqCode] = (ReplySwapPtr) SReplyMPXDispatch; + EventSwapVector[MPXButtonPress] = SEventMPXDispatch; + EventSwapVector[MPXButtonRelease] = SEventMPXDispatch; + EventSwapVector[MPXMotionNotify] = SEventMPXDispatch; + } else { + FatalError("MPXExtensionInit: AddExtensions failed\n"); + } +} + +/************************************************************************* + * + * ProcMPXDispatch - main dispatch routine for requests to this extension. + * This routine is used if server and client have the same byte ordering. + * + */ + +int +ProcMPXDispatch(register ClientPtr client) +{ + REQUEST(xReq); + if (stuff->data == MPX_GetExtensionVersion) + return (ProcMPXGetExtensionVersion(client)); + else { + SendErrorToClient(client, MPXReqCode, stuff->data, 0, BadRequest); + } + + return (BadRequest); +} + +/******************************************************************************* + * + * SProcMPXDispatch + * + * Main swapped dispatch routine for requests to this extension. + * This routine is used if server and client do not have the same byte ordering. + * + */ + +int +SProcMPXDispatch(register ClientPtr client) +{ + REQUEST(xReq); + if (stuff->data == MPX_GetExtensionVersion) + return (SProcMPXGetExtensionVersion(client)); + else { + SendErrorToClient(client, MPXReqCode, stuff->data, 0, BadRequest); + } + + return (BadRequest); +} + +/*********************************************************************** + * + * MPXResetProc. + * Remove reply-swapping routine. + * Remove event-swapping routine. + * + */ + +void +MPXResetProc(ExtensionEntry* unused) +{ + ReplySwapVector[MPXReqCode] = ReplyNotSwappd; + EventSwapVector[MPXButtonPress] = NotImplemented; + EventSwapVector[MPXButtonRelease] = NotImplemented; + EventSwapVector[MPXMotionNotify] = NotImplemented; + +} + +void SReplyMPXDispatch(ClientPtr client, int len, mpxGetExtensionVersionReply* rep) +{ + if (rep->RepType == MPX_GetExtensionVersion) + SRepMPXGetExtensionVersion(client, len, + (mpxGetExtensionVersionReply*) rep); + else { + FatalError("MPX confused sending swapped reply"); + } +} + +void +SEventMPXDispatch(xEvent* from, xEvent* to) +{ + int type = from->u.u.type & 0177; + if (type == MPXButtonPress) { + SKeyButtonPtrEvent(from, to); + to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; + } else if (type == MPXButtonRelease) { + SKeyButtonPtrEvent(from, to); + to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; + } else if (type == MPXMotionNotify) { + SKeyButtonPtrEvent(from, to); + to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; + } else { + FatalError("XInputExtension: Impossible event!\n"); + } +} + +void +MPXFixExtensionEvents(ExtensionEntry* extEntry) +{ + Mask mask; + + MPXButtonPress = extEntry->eventBase; + MPXButtonRelease = MPXButtonPress + 1; + MPXMotionNotify = MPXButtonRelease + 1; + + mask = MPXGetNextExtEventMask(); + MPXSetMaskForExtEvent(mask, MPXButtonPress); + MPXAllowPropagateSuppress(mask); + + mask = MPXGetNextExtEventMask(); + MPXSetMaskForExtEvent(mask, MPXButtonRelease); + MPXAllowPropagateSuppress(mask); + + mask = MPXGetNextExtEventMask(); + MPXSetMaskForExtEvent(mask, MPXMotionNotify); + MPXAllowPropagateSuppress(mask); + +} + +/************************************************************************** + * + * Return the next available extension event mask. + * + */ +Mask +MPXGetNextExtEventMask(void) +{ + int i; + Mask mask = lastExtEventMask; + + if (lastExtEventMask == 0) { + FatalError("MPXGetNextExtEventMask: no more events are available."); + } + lastExtEventMask <<= 1; + + for (i = 0; i < MAX_DEVICES; i++) + ExtValidMasks[i] |= mask; + return mask; +} + +/************************************************************************** + * + * Assign the specified mask to the specified event. + * + */ + +void +MPXSetMaskForExtEvent(Mask mask, int event) +{ + + EventInfo[ExtEventIndex].mask = mask; + EventInfo[ExtEventIndex++].type = event; + + if ((event < LASTEvent) || (event >= 128)) + FatalError("MaskForExtensionEvent: bogus event number"); + SetMaskForEvent(mask, event); +} + +/************************************************************************ + * + * This function restores extension event types and masks to their + * initial state. + * + */ + +void +MPXRestoreExtensionEvents(void) +{ + int i; + + MPXReqCode = 0; + for (i = 0; i < ExtEventIndex - 1; i++) { + if ((EventInfo[i].type >= LASTEvent) && (EventInfo[i].type < 128)) + SetMaskForEvent(0, EventInfo[i].type); + EventInfo[i].mask = 0; + EventInfo[i].type = 0; + } + + ExtEventIndex = 0; + lastExtEventMask = 1; + MPXButtonPress = 0; + MPXButtonRelease = 1; + MPXMotionNotify = 2; +} + +/************************************************************************** + * + * Allow the specified event to have its propagation suppressed. + * The default is to not allow suppression of propagation. + * + */ + +void +MPXAllowPropagateSuppress(Mask mask) +{ + int i; + + for (i = 0; i < MAX_DEVICES; i++) + PropagateMask[i] |= mask; +} diff --git a/mpx/getvers.c b/mpx/getvers.c new file mode 100644 index 000000000..4663c5459 --- /dev/null +++ b/mpx/getvers.c @@ -0,0 +1,80 @@ +/* Copyright 2006 by Peter Hutterer */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include + +#include "mpxglobals.h" +#include "getvers.h" + +XExtensionVersion AllExtensionVersions[128]; + +/*********************************************************************** + * + * Handle a request from a client with a different byte order than us. + * + */ + +int +SProcMPXGetExtensionVersion(register ClientPtr client) +{ + register char n; + + REQUEST(mpxGetExtensionVersionReq); + swaps(&stuff->length, n); + swaps(&stuff->major_version, n); + swaps(&stuff->minor_version, n); + REQUEST_AT_LEAST_SIZE(mpxGetExtensionVersionReq); + return (ProcMPXGetExtensionVersion(client)); +} + +/*********************************************************************** + * + * This procedure writes the reply for the XGetExtensionVersion function. + */ + +int +ProcMPXGetExtensionVersion(register ClientPtr client) +{ + mpxGetExtensionVersionReply rep; + + REQUEST(mpxGetExtensionVersionReq); + REQUEST_SIZE_MATCH(mpxGetExtensionVersionReq); + + rep.repType = X_Reply; + rep.RepType = MPX_GetExtensionVersion; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + rep.major_version = AllExtensionVersions[MPXReqCode - 128].major_version; + rep.minor_version = AllExtensionVersions[MPXReqCode - 128].minor_version; + WriteReplyToClient(client, sizeof(mpxGetExtensionVersionReply), &rep); + + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the MPXGetExtensionVersion function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepMPXGetExtensionVersion(ClientPtr client, int size, + mpxGetExtensionVersionReply * rep) +{ + register char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swaps(&rep->major_version, n); + swaps(&rep->minor_version, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/mpx/getvers.h b/mpx/getvers.h new file mode 100644 index 000000000..da2401818 --- /dev/null +++ b/mpx/getvers.h @@ -0,0 +1,22 @@ +/* Copyright 2006 by Peter Hutterer */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef GETVERS_H +#define GETVERS_H 1 + +int SProcMPXGetExtensionVersion(ClientPtr /* client */ + ); + +int ProcMPXGetExtensionVersion(ClientPtr /* client */ + ); + +void SRepMPXGetExtensionVersion(ClientPtr /* client */ , + int /* size */ , + mpxGetExtensionVersionReply * /* rep */ + ); + +#endif + diff --git a/mpx/mpxglobals.h b/mpx/mpxglobals.h new file mode 100644 index 000000000..d74710c96 --- /dev/null +++ b/mpx/mpxglobals.h @@ -0,0 +1,15 @@ +/* Copyright 2006 by Peter Hutterer */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +extern int MPXReqCode; +extern int MPXEventBase; +extern int MPXErrorBase; + +extern int MPXButtonPress; +extern int MPXButtonRelease; +extern int MPXMotionNotify; + +extern Mask PropagateMask[]; diff --git a/mpx/selectev.c b/mpx/selectev.c new file mode 100644 index 000000000..d29d3f15b --- /dev/null +++ b/mpx/selectev.c @@ -0,0 +1,16 @@ +/* Copyright 2006 by Peter Hutterer */ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ + diff --git a/os/utils.c b/os/utils.c index 9824501e7..42d41ce85 100644 --- a/os/utils.c +++ b/os/utils.c @@ -252,6 +252,9 @@ _X_EXPORT Bool noXIdleExtension = FALSE; #ifdef XV _X_EXPORT Bool noXvExtension = FALSE; #endif +#ifdef MPX +_X_EXPORT Bool noMPXExtension = FALSE; +#endif #define X_INCLUDE_NETDB_H #include From 416f1bb99a6d4557f2863ae941868e47e11bbb3b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 1 Dec 2006 15:56:52 +1030 Subject: [PATCH 027/634] mpx: SelectEvents and GetEventBase requests. Some renaming and cleaning up in extinit.c MPXLastEvent added Xi: ShouldFreeInputMask() from XI is not static any more, used in mpx dix: GetPointerEvents() allocates MPX event for MPX devices. DeliverDeviceEvents() caters for MPX devices. --- Changelog | 46 ++++++++++- Xi/exevents.c | 4 +- configure.ac | 2 +- dix/events.c | 14 ++++ dix/getevents.c | 35 ++++++-- include/mpxevents.h | 19 +++++ include/mpxextinit.h | 72 +++++++++++++++++ mpx/Makefile.am | 9 ++- mpx/extinit.c | 95 ++++++++++++---------- mpx/getevbase.c | 55 +++++++++++++ mpx/getevbase.h | 16 ++++ mpx/getvers.c | 5 +- mpx/listdev.c | 187 +++++++++++++++++++++++++++++++++++++++++++ mpx/listdev.h | 53 ++++++++++++ mpx/mpxglobals.h | 16 +++- mpx/selectev.c | 132 +++++++++++++++++++++++++++++- mpx/selectev.h | 17 ++++ 17 files changed, 720 insertions(+), 57 deletions(-) create mode 100644 include/mpxevents.h create mode 100644 include/mpxextinit.h create mode 100644 mpx/getevbase.c create mode 100644 mpx/getevbase.h create mode 100644 mpx/listdev.c create mode 100644 mpx/listdev.h create mode 100644 mpx/selectev.h diff --git a/Changelog b/Changelog index c818bce63..a63021c87 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,49 @@ MPX Changelog file -== 29.11.206 == +== 01.12.06 == + +mpx: SelectEvents and GetEventBase requests. + Some renaming and cleaning up in extinit.c + MPXLastEvent added + +Xi: ShouldFreeInputMask() from XI is not static any more, used in mpx + +dix: GetPointerEvents() allocates MPX event for MPX devices. + DeliverDeviceEvents() caters for MPX devices. + + +Files: + configure.ac + mpx/Makefile.am + mpx/extinit.c + mpx/getvers.c + mpx/getevbase.c + mpx/getevbase.h + mpx/listdev.c + mpx/listdev.h + mpx/mpxglobals.h + mpx/selectev.c + mpx/selectev.h + mpx/mpxevents.h + Xi/exevents.c + dix/events.c + dix/getevents.c + include/mpxevents.h + include/mpxextinit.h + + +== 30.11.06 +mpx: Adding ListDevices request. Minor changes, using + MPXRestoreExtensionEvents() when resetting. + +Files: + mpx/Makefile.am + mpx/extinit.c + mpx/listdev.c + mpx/listdev.h + mpx/mpxextinit.h + + +== 29.11.06 == mpx: Infrastructure for MPX extension, GetExtensionVersion request works. Files: diff --git a/Xi/exevents.c b/Xi/exevents.c index ecbb1990a..26c3f4ba2 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -82,7 +82,7 @@ SOFTWARE. #define Motion_Filter(class) (DevicePointerMotionMask | \ (class)->state | (class)->motionMask) -static Bool ShouldFreeInputMasks(WindowPtr /* pWin */ , +Bool ShouldFreeInputMasks(WindowPtr /* pWin */ , Bool /* ignoreSelectedEvents */ ); static Bool MakeInputMasks(WindowPtr /* pWin */ @@ -1196,7 +1196,7 @@ DeviceEventSuppressForWindow(WindowPtr pWin, ClientPtr client, Mask mask, return Success; } -static Bool +Bool ShouldFreeInputMasks(WindowPtr pWin, Bool ignoreSelectedEvents) { int i; diff --git a/configure.ac b/configure.ac index e5d2f5ea2..fa1a5c859 100644 --- a/configure.ac +++ b/configure.ac @@ -1003,7 +1003,7 @@ AC_EGREP_CPP([I_AM_SVR4],[ AC_DEFINE([SVR4],1,[Define to 1 on systems derived from System V Release 4]) AC_MSG_RESULT([yes])], AC_MSG_RESULT([no])) -XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC" +XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC $MPX_INC" AC_DEFINE_UNQUOTED(X_BYTE_ORDER,[$ENDIAN],[Endian order]) AC_SUBST([XSERVER_LIBS]) diff --git a/dix/events.c b/dix/events.c index 8ef318a22..c7d4df028 100644 --- a/dix/events.c +++ b/dix/events.c @@ -107,6 +107,12 @@ of the copyright holder. ******************************************************************/ +/* + * MPX additions + * Copyright 2006 by Peter Hutterer + * Author: Peter Hutterer + */ + #ifdef HAVE_DIX_CONFIG_H #include @@ -171,6 +177,10 @@ xEvent *xeviexE; #include "dixgrabs.h" #include "dispatch.h" +#ifdef MPX +#include "mpxglobals.h" +#endif + #define EXTENSION_EVENT_BASE 64 #define NoSuchEvent 0x80000000 /* so doesn't match NoEventMask */ @@ -1924,6 +1934,10 @@ DeliverDeviceEvents(register WindowPtr pWin, register xEvent *xE, GrabPtr grab, { register OtherInputMasks *inputMasks; int mskidx = dev->id; +#ifdef MPX + if (IsMPXEvent(xE)) + mskidx = MPXmskidx; +#endif inputMasks = wOtherInputMasks(pWin); if (inputMasks && !(filter & inputMasks->deliverableEvents[mskidx])) diff --git a/dix/getevents.c b/dix/getevents.c index 9c7b7230b..7c121a5ca 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -21,15 +21,12 @@ * * Author: Daniel Stone */ -#ifdef MPX /* * MPX additions: * Copyright © 2006 Peter Hutterer - * License see above. * Author: Peter Hutterer * */ -#endif #ifdef HAVE_DIX_CONFIG_H #include @@ -72,6 +69,11 @@ extern Bool XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies); #include "exglobals.h" #include "extnsionst.h" +#ifdef MPX +#include +#include +#include "mpxglobals.h" +#endif /* Maximum number of valuators, divided by six, rounded up, to get number * of events. */ @@ -511,7 +513,11 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, if ((type == ButtonPress || type == ButtonRelease) && !pDev->button) return 0; - +#ifdef MPX + if (pDev->isMPDev) + num_events = 3; + else +#endif if (pDev->coreEvents) num_events = 2; else @@ -603,7 +609,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, #ifdef MPX if (flags & POINTER_MULTIPOINTER) { - // noop, just to fit MPX in easier with the following if + // noop, just less intrusive to fit MPX in like that } else #endif if (pDev->coreEvents) { @@ -637,6 +643,25 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, } #ifdef MPX + if (pDev->isMPDev) + { + /* MPX events are the same as XI events but without valuators. */ + memcpy(events, kbp, sizeof(deviceKeyButtonPointer)); + switch(type) + { + case ButtonPress: + events->u.u.type = MPXButtonPress; + break; + case ButtonRelease: + events->u.u.type = MPXButtonRelease; + break; + case MotionNotify: + events->u.u.type = MPXMotionNotify; + break; + } + events++; + } + /* MPX devices always send core events */ if (pDev->coreEvents || pDev->isMPDev) { #else diff --git a/include/mpxevents.h b/include/mpxevents.h new file mode 100644 index 000000000..99bf2b009 --- /dev/null +++ b/include/mpxevents.h @@ -0,0 +1,19 @@ +/* Copyright 2006 by Peter Hutterer */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef MPXEVENTS_H +#define MPXEVENTS_H 1 + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ + +extern int MPXSelectForWindow( + WindowPtr /* pWin */, + ClientPtr /* client */, + int /* mask */); + +#endif diff --git a/include/mpxextinit.h b/include/mpxextinit.h new file mode 100644 index 000000000..7fbb4c432 --- /dev/null +++ b/include/mpxextinit.h @@ -0,0 +1,72 @@ +/* Copyright 2006 by Peter Hutterer */ + +/******************************************************************** + * Interface of mpx/extinit.c + */ + +#ifndef MPXEXTINIT_H +#define MPXEXTINIT_H + +#include "extnsionst.h" + +void +MPXExtensionInit( + void + ); + +int +ProcMPXDispatch ( + ClientPtr /* client */ + ); + +int +SProcMPXDispatch( + ClientPtr /* client */ + ); + +void +SReplyMPXDispatch ( + ClientPtr /* client */, + int /* len */, + mpxGetExtensionVersionReply * /* rep */ + ); + +void +SEventMPXDispatch ( + xEvent * /* from */, + xEvent * /* to */ + ); + +void +MPXFixExtensionEvents ( + ExtensionEntry * /* extEntry */ + ); + +void +MPXResetProc( + ExtensionEntry * /* unused */ + ); + +Mask +MPXGetNextExtEventMask ( + void +); + +void +MPXSetMaskForExtEvent( + Mask /* mask */, + int /* event */ + ); + +void +MPXAllowPropagateSuppress ( + Mask /* mask */ + ); + +void +MPXRestoreExtensionEvents ( + void + ); +#endif + + diff --git a/mpx/Makefile.am b/mpx/Makefile.am index db75eb53e..63c384fe2 100644 --- a/mpx/Makefile.am +++ b/mpx/Makefile.am @@ -5,5 +5,12 @@ AM_CFLAGS = $(DIX_CFLAGS) libmpx_la_SOURCES = \ extinit.c \ getvers.c \ - getvers.h + getvers.h \ + listdev.c \ + listdev.h \ + selectev.c \ + selectev.h \ + mpxglobals.h \ + getevbase.c \ + getevbase.h diff --git a/mpx/extinit.c b/mpx/extinit.c index 59bc49448..89a9dc713 100644 --- a/mpx/extinit.c +++ b/mpx/extinit.c @@ -11,17 +11,36 @@ #include "extnsionst.h" /* extension entry */ #include #include +#include +#include "mpxglobals.h" #include "mpxextinit.h" #include "swaprep.h" #include "getvers.h" +#include "listdev.h" +#include "selectev.h" +#include "getevbase.h" static Mask lastExtEventMask = 1; -int ExtEventIndex; -Mask ExtValidMasks[EMASKSIZE]; +int MPXEventIndex; +MPXExtEventInfo EventInfo[32]; + +/** + * MPX piggybacks on the X Input extension's event system. Each window has an + * array of event masks, from 0 to MAX_DEVICES. In XI, each device can have + * separate event masks. Before an event is delivered, the array at the index + * of the device is checked. + * + * Two things: + * -) core devices do not send input extension events + * -) MPX events are not device specific. + * + * Since the mask of the core pointer (index 1) is thus not used by XI, MPX + * can use it for the event mask. This also makes MPX less intrusive. + */ +int MPXmskidx = 1; -XExtEventInfo EventInfo[32]; /***************************************************************** * @@ -29,7 +48,7 @@ XExtEventInfo EventInfo[32]; * */ -extern XExtensionVersion AllExtensionVersions[]; +extern MPXExtensionVersion AllExtensionVersions[]; Mask PropagateMask[MAX_DEVICES]; @@ -46,6 +65,7 @@ int MPXErrorBase = 0; int MPXButtonPress; int MPXButtonRelease; int MPXMotionNotify; +int MPXLastEvent; /***************************************************************** * @@ -53,7 +73,8 @@ int MPXMotionNotify; * */ -static XExtensionVersion thisversion = { MPX_Present, +static MPXExtensionVersion thisversion = { + MPX_Present, MPX_Major, MPX_Minor }; @@ -106,6 +127,12 @@ ProcMPXDispatch(register ClientPtr client) REQUEST(xReq); if (stuff->data == MPX_GetExtensionVersion) return (ProcMPXGetExtensionVersion(client)); + if (stuff->data == MPX_ListDevices) + return (ProcMPXListDevices(client)); + if (stuff->data == MPX_SelectEvents) + return (ProcMPXSelectEvents(client)); + if (stuff->data == MPX_GetEventBase) + return (ProcMPXGetEventBase(client)); else { SendErrorToClient(client, MPXReqCode, stuff->data, 0, BadRequest); } @@ -128,6 +155,12 @@ SProcMPXDispatch(register ClientPtr client) REQUEST(xReq); if (stuff->data == MPX_GetExtensionVersion) return (SProcMPXGetExtensionVersion(client)); + if (stuff->data == MPX_ListDevices) + return (SProcMPXListDevices(client)); + if (stuff->data == MPX_SelectEvents) + return (SProcMPXSelectEvents(client)); + if (stuff->data == MPX_GetEventBase) + return (SProcMPXGetEventBase(client)); else { SendErrorToClient(client, MPXReqCode, stuff->data, 0, BadRequest); } @@ -151,6 +184,8 @@ MPXResetProc(ExtensionEntry* unused) EventSwapVector[MPXButtonRelease] = NotImplemented; EventSwapVector[MPXMotionNotify] = NotImplemented; + MPXRestoreExtensionEvents(); + } void SReplyMPXDispatch(ClientPtr client, int len, mpxGetExtensionVersionReply* rep) @@ -158,6 +193,9 @@ void SReplyMPXDispatch(ClientPtr client, int len, mpxGetExtensionVersionReply* r if (rep->RepType == MPX_GetExtensionVersion) SRepMPXGetExtensionVersion(client, len, (mpxGetExtensionVersionReply*) rep); + if (rep->RepType == MPX_ListDevices) + SRepMPXListDevices(client, len, + (mpxListDevicesReply*) rep); else { FatalError("MPX confused sending swapped reply"); } @@ -184,46 +222,16 @@ SEventMPXDispatch(xEvent* from, xEvent* to) void MPXFixExtensionEvents(ExtensionEntry* extEntry) { - Mask mask; - MPXButtonPress = extEntry->eventBase; MPXButtonRelease = MPXButtonPress + 1; MPXMotionNotify = MPXButtonRelease + 1; + MPXLastEvent = MPXMotionNotify + 1; - mask = MPXGetNextExtEventMask(); - MPXSetMaskForExtEvent(mask, MPXButtonPress); - MPXAllowPropagateSuppress(mask); - - mask = MPXGetNextExtEventMask(); - MPXSetMaskForExtEvent(mask, MPXButtonRelease); - MPXAllowPropagateSuppress(mask); - - mask = MPXGetNextExtEventMask(); - MPXSetMaskForExtEvent(mask, MPXMotionNotify); - MPXAllowPropagateSuppress(mask); - + MPXSetMaskForExtEvent(MPXButtonPressMask, MPXButtonPress); + MPXSetMaskForExtEvent(MPXButtonReleaseMask, MPXButtonRelease); + MPXSetMaskForExtEvent(MPXPointerMotionMask, MPXMotionNotify); } -/************************************************************************** - * - * Return the next available extension event mask. - * - */ -Mask -MPXGetNextExtEventMask(void) -{ - int i; - Mask mask = lastExtEventMask; - - if (lastExtEventMask == 0) { - FatalError("MPXGetNextExtEventMask: no more events are available."); - } - lastExtEventMask <<= 1; - - for (i = 0; i < MAX_DEVICES; i++) - ExtValidMasks[i] |= mask; - return mask; -} /************************************************************************** * @@ -235,8 +243,8 @@ void MPXSetMaskForExtEvent(Mask mask, int event) { - EventInfo[ExtEventIndex].mask = mask; - EventInfo[ExtEventIndex++].type = event; + EventInfo[MPXEventIndex].mask = mask; + EventInfo[MPXEventIndex++].type = event; if ((event < LASTEvent) || (event >= 128)) FatalError("MaskForExtensionEvent: bogus event number"); @@ -256,14 +264,14 @@ MPXRestoreExtensionEvents(void) int i; MPXReqCode = 0; - for (i = 0; i < ExtEventIndex - 1; i++) { + for (i = 0; i < MPXEventIndex - 1; i++) { if ((EventInfo[i].type >= LASTEvent) && (EventInfo[i].type < 128)) SetMaskForEvent(0, EventInfo[i].type); EventInfo[i].mask = 0; EventInfo[i].type = 0; } - ExtEventIndex = 0; + MPXEventIndex = 0; lastExtEventMask = 1; MPXButtonPress = 0; MPXButtonRelease = 1; @@ -285,3 +293,4 @@ MPXAllowPropagateSuppress(Mask mask) for (i = 0; i < MAX_DEVICES; i++) PropagateMask[i] |= mask; } + diff --git a/mpx/getevbase.c b/mpx/getevbase.c new file mode 100644 index 000000000..7ec82f676 --- /dev/null +++ b/mpx/getevbase.c @@ -0,0 +1,55 @@ +/* Copyright 2006 by Peter Hutterer */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include +#include + +#include "mpxglobals.h" +#include "getevbase.h" + +/*********************************************************************** + * + * This procedure writes the reply for the MPXGetEventBase function. + */ +int +ProcMPXGetEventBase(register ClientPtr client) +{ + mpxGetEventBaseReply rep; + + REQUEST(mpxGetEventBaseReq); + REQUEST_SIZE_MATCH(mpxGetEventBaseReq); + + memset(&rep, 0, sizeof(mpxGetEventBaseReply)); + rep.repType = X_Reply; + rep.RepType = MPX_GetEventBase; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + rep.eventBase = MPXEventBase; + + WriteReplyToClient(client, sizeof(mpxGetEventBaseReply), &rep); + + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the MPXGetEventBase function. + */ +int +SProcMPXGetEventBase(register ClientPtr client) +{ + register char n; + + REQUEST(mpxGetEventBaseReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(mpxGetEventBaseReq); + return (ProcMPXGetEventBase(client)); +} + diff --git a/mpx/getevbase.h b/mpx/getevbase.h new file mode 100644 index 000000000..5ff8284dc --- /dev/null +++ b/mpx/getevbase.h @@ -0,0 +1,16 @@ +/* Copyright 2006 by Peter Hutterer */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef GETEVBASE_H +#define GETEVBASE_H 1 + +int SProcMPXGetEventBase(ClientPtr /* client */ + ); + +int ProcMPXGetEventBase(ClientPtr /* client */ + ); + +#endif /* GETEVBASE_H */ diff --git a/mpx/getvers.c b/mpx/getvers.c index 4663c5459..7297a1fb5 100644 --- a/mpx/getvers.c +++ b/mpx/getvers.c @@ -13,7 +13,7 @@ #include "mpxglobals.h" #include "getvers.h" -XExtensionVersion AllExtensionVersions[128]; +MPXExtensionVersion AllExtensionVersions[128]; /*********************************************************************** * @@ -33,7 +33,6 @@ SProcMPXGetExtensionVersion(register ClientPtr client) REQUEST_AT_LEAST_SIZE(mpxGetExtensionVersionReq); return (ProcMPXGetExtensionVersion(client)); } - /*********************************************************************** * * This procedure writes the reply for the XGetExtensionVersion function. @@ -78,3 +77,5 @@ SRepMPXGetExtensionVersion(ClientPtr client, int size, swaps(&rep->minor_version, n); WriteToClient(client, size, (char *)rep); } + + diff --git a/mpx/listdev.c b/mpx/listdev.c new file mode 100644 index 000000000..8bb27b30b --- /dev/null +++ b/mpx/listdev.c @@ -0,0 +1,187 @@ +/* Copyright 2006 by Peter Hutterer */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "inputstr.h" + +#include +#include + +#include "mpxextinit.h" +#include "mpxglobals.h" + +#include "listdev.h" + +/*********************************************************************** + * + * This procedure lists the MPX devices available to the server. + * + */ +int SProcMPXListDevices(register ClientPtr client) +{ + register char n; + + REQUEST(mpxListDevicesReq); + swaps(&stuff->length, n); + return (ProcMPXListDevices(client)); +} + +/*********************************************************************** + * + * This procedure lists the MPX devices available to the server. + * + * Strongly based on ProcXListInputDevices + */ +int ProcMPXListDevices(register ClientPtr client) +{ + mpxListDevicesReply rep; + int numdevs = 0; + int namesize = 1; /* need 1 extra byte for strcpy */ + int size = 0; + int total_length; + char* devbuf; + char* namebuf; + char *savbuf; + mpxDeviceInfoPtr dev; + DeviceIntPtr d; + + REQUEST_SIZE_MATCH(mpxListDevicesReq); + memset(&rep, 0, sizeof(mpxListDevicesReply)); + rep.repType = X_Reply; + rep.RepType = MPX_ListDevices; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + for (d = inputInfo.devices; d; d = d->next) { + if (d->isMPDev) + { + SizeMPXDeviceInfo(d, &namesize, &size); + numdevs++; + } + } + + for (d = inputInfo.off_devices; d; d = d->next) { + if (d->isMPDev) + { + SizeMPXDeviceInfo(d, &namesize, &size); + numdevs++; + } + } + + total_length = numdevs * sizeof(mpxDeviceInfo) + size + namesize; + devbuf = (char *)xalloc(total_length); + namebuf = devbuf + (numdevs * sizeof(mpxDeviceInfo)); + savbuf = devbuf; + + dev = (mpxDeviceInfoPtr) devbuf; + for (d = inputInfo.devices; d; d = d->next, dev++) + if (d->isMPDev) + SetMPXDeviceInfo(client, d, dev, &devbuf, &namebuf); + for (d = inputInfo.off_devices; d; d = d->next, dev++) + if (d->isMPDev) + SetMPXDeviceInfo(client, d, dev, &devbuf, &namebuf); + + rep.ndevices = numdevs; + rep.length = (total_length + 3) >> 2; + WriteReplyToClient(client, sizeof(mpxListDevicesReply), &rep); + WriteToClient(client, total_length, savbuf); + xfree(savbuf); + return Success; +} + +/*********************************************************************** + * + * This procedure calculates the size of the information to be returned + * for an input device. + * + */ + +void +SizeMPXDeviceInfo(DeviceIntPtr d, int *namesize, int *size) +{ + *namesize += 1; + if (d->name) + *namesize += strlen(d->name); +} + +/*********************************************************************** + * + * This procedure sets information to be returned for an input device. + * + */ + +void +SetMPXDeviceInfo(ClientPtr client, DeviceIntPtr d, mpxDeviceInfoPtr dev, + char **devbuf, char **namebuf) +{ + MPXCopyDeviceName(namebuf, d->name); + MPXCopySwapDevice(client, d, devbuf); +} + + +/*********************************************************************** + * + * This procedure copies data to the DeviceInfo struct, swapping if necessary. + * + * We need the extra byte in the allocated buffer, because the trailing null + * hammers one extra byte, which is overwritten by the next name except for + * the last name copied. + * + */ + +void +MPXCopyDeviceName(char **namebuf, char *name) +{ + char *nameptr = (char *)*namebuf; + + if (name) { + *nameptr++ = strlen(name); + strcpy(nameptr, name); + *namebuf += (strlen(name) + 1); + } else { + *nameptr++ = 0; + *namebuf += 1; + } +} + +/*********************************************************************** + * + * This procedure copies data to the DeviceInfo struct, swapping if necessary. + * + */ +void +MPXCopySwapDevice(register ClientPtr client, DeviceIntPtr d, char **buf) +{ + register char n; + mpxDeviceInfoPtr dev; + + dev = (mpxDeviceInfoPtr) * buf; + memset(dev, 0, sizeof(mpxDeviceInfo)); + + dev->id = d->id; + dev->type = d->type; + if (client->swapped) { + swapl(&dev->type, n); /* macro - braces are required */ + } + *buf += sizeof(mpxDeviceInfo); +} + +/*********************************************************************** + * + * This procedure writes the reply for the MPXListDevices function, + * if the client and server have a different byte ordering. + * + */ +void +SRepMPXListDevices(ClientPtr client, int size, mpxListDevicesReply * rep) +{ + register char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/mpx/listdev.h b/mpx/listdev.h new file mode 100644 index 000000000..0d2e0dc22 --- /dev/null +++ b/mpx/listdev.h @@ -0,0 +1,53 @@ +/* Copyright 2006 by Peter Hutterer */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef LISTDEV_H +#define LISTDEV_H 1 + + +#include +#include +#include "inputstr.h" + +#include +#include + +#include "mpxextinit.h" +#include "mpxglobals.h" + +int SProcMPXListDevices(ClientPtr /* client */ + ); + +int ProcMPXListDevices(ClientPtr /* client */ + ); + +void SizeMPXDeviceInfo(DeviceIntPtr /* d */ , + int * /* namesize */ , + int * /* size */ + ); + +void SetMPXDeviceInfo(ClientPtr /* client */ , + DeviceIntPtr /* d */ , + mpxDeviceInfoPtr /* dev */ , + char ** /* devbuf */ , + char ** /* namebuf */ + ); + + +void MPXCopyDeviceName(char ** /* namebuf */ , + char * /* name */ + ); + +void MPXCopySwapDevice(ClientPtr /* client */ , + DeviceIntPtr /* d */ , + char ** /* buf */ + ); + +void SRepMPXListDevices(ClientPtr /* client */ , + int /* size */ , + mpxListDevicesReply * /* rep */ + ); +#endif diff --git a/mpx/mpxglobals.h b/mpx/mpxglobals.h index d74710c96..73f399032 100644 --- a/mpx/mpxglobals.h +++ b/mpx/mpxglobals.h @@ -4,12 +4,26 @@ #include #endif +#ifndef MPXGLOBALS_H +#define MPXGLOBALS_H 1 + extern int MPXReqCode; extern int MPXEventBase; extern int MPXErrorBase; +extern Mask PropagateMask[]; + +extern int MPXmskidx; + +/* events */ extern int MPXButtonPress; extern int MPXButtonRelease; extern int MPXMotionNotify; +extern int MPXLastEvent; -extern Mask PropagateMask[]; +#define IsMPXEvent(xE) \ + ((xE)->u.u.type >= MPXEventBase \ + && (xE)->u.u.type < MPXLastEvent) + + +#endif diff --git a/mpx/selectev.c b/mpx/selectev.c index d29d3f15b..1e75a51b9 100644 --- a/mpx/selectev.c +++ b/mpx/selectev.c @@ -12,5 +12,135 @@ #include #include #include "extnsionst.h" -#include "extinit.h" /* LookupDeviceIntRec */ +#include "mpxextinit.h" /* LookupDeviceIntRec */ +#include "mpxglobals.h" +#include "mpxevents.h" + +#include "selectev.h" + +/* functions borrowed from XI */ +extern void RecalculateDeviceDeliverableEvents( + WindowPtr /* pWin */); + +extern int AddExtensionClient ( + WindowPtr /* pWin */, + ClientPtr /* client */, + Mask /* mask */, + int /* mskidx */); +extern Bool +ShouldFreeInputMasks(WindowPtr /* pWin */, + Bool /* ignoreSelectedEvents */); + +/*********************************************************************** + * + * Handle requests from clients with a different byte order. + * + */ + +int +SProcMPXSelectEvents(register ClientPtr client) +{ + register char n; + + REQUEST(mpxSelectEventsReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(mpxSelectEventsReq); + swapl(&stuff->window, n); + return (ProcMPXSelectEvents(client)); +} + +/*********************************************************************** + * + * This procedure selects input from an extension device. + * + */ + +int +ProcMPXSelectEvents(register ClientPtr client) +{ + int ret; + WindowPtr pWin; + + REQUEST(mpxSelectEventsReq); + REQUEST_SIZE_MATCH(mpxSelectEventsReq); + + if (stuff->length != (sizeof(mpxSelectEventsReq) >> 2)) + { + SendErrorToClient(client, MPXReqCode, MPX_SelectEvents, 0, + BadLength); + return Success; + } + + pWin = (WindowPtr) LookupWindow(stuff->window, client); + if (!pWin) + { + client->errorValue = stuff->window; + SendErrorToClient(client, MPXReqCode, MPX_SelectEvents, 0, + BadWindow); + return Success; + } + + if (stuff->mask >= MPXHighestMask) + { + client->errorValue = stuff->mask; + SendErrorToClient(client, MPXReqCode, MPX_SelectEvents, 0, + BadValue); + } + + if ((ret = MPXSelectForWindow(pWin, client, stuff->mask)) != Success) + { + SendErrorToClient(client, MPXReqCode, MPX_SelectEvents, 0, ret); + return Success; + } + + return Success; +} + +/** + * Selects a set of events for a given window. + * Different to XI, MPX is not device dependent. Either the client gets events + * from all devices or none. + * + * This method borrows some functions from XI, due to the piggyback on the + * core pointer (see comment in extinit.c) + */ +int +MPXSelectForWindow(WindowPtr pWin, ClientPtr client, int mask) +{ + InputClientsPtr others; + int ret; + + if (mask >= MPXHighestMask) + { + client->errorValue = mask; + return BadValue; + } + + if (wOtherInputMasks(pWin)) + { + for (others = wOtherInputMasks(pWin)->inputClients; others; + others = others->next) + { + if (SameClient(others, client)) { + others->mask[MPXmskidx] = mask; + if (mask == 0) + { + /* clean up stuff */ + RecalculateDeviceDeliverableEvents(pWin); + if (ShouldFreeInputMasks(pWin, FALSE)) + FreeResource(others->resource, RT_NONE); + return Success; + } + goto maskSet; + } + } + } + /* borrow from XI here */ + if ((ret = AddExtensionClient(pWin, client, mask, MPXmskidx)) != Success) + return ret; +maskSet: + RecalculateDeviceDeliverableEvents(pWin); + return Success; + +} diff --git a/mpx/selectev.h b/mpx/selectev.h new file mode 100644 index 000000000..702619987 --- /dev/null +++ b/mpx/selectev.h @@ -0,0 +1,17 @@ +/* Copyright 2006 by Peter Hutterer */ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef SELECTEV_H +#define SELECTEV_H 1 + +int SProcMPXSelectEvents(ClientPtr /* client */ + ); + +int ProcMPXSelectEvents(ClientPtr /* client */ + ); + +#endif /* SELECTEV_H */ From 2a511492f9a235d3f5390ab87b6c643cbea92d88 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 5 Dec 2006 15:45:18 +1030 Subject: [PATCH 028/634] Xi: adding MPX checks to ProcessOtherEvents mpx: adding QueryPointer request and reply adjusting names of requests to Xlib compatible naming (xMPX*** instead of mpx***) --- Changelog | 22 +++++++++++ Xi/exevents.c | 33 ++++++++++++---- include/mpxextinit.h | 2 +- mpx/Makefile.am | 4 +- mpx/extinit.c | 33 ++++++++-------- mpx/getevbase.c | 16 ++++---- mpx/getvers.c | 20 +++++----- mpx/getvers.h | 2 +- mpx/listdev.c | 32 ++++++++-------- mpx/listdev.h | 4 +- mpx/queryptr.c | 90 ++++++++++++++++++++++++++++++++++++++++++++ mpx/queryptr.h | 16 ++++++++ mpx/selectev.c | 18 ++++----- 13 files changed, 222 insertions(+), 70 deletions(-) create mode 100644 mpx/queryptr.c create mode 100644 mpx/queryptr.h diff --git a/Changelog b/Changelog index a63021c87..fbf136079 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,26 @@ MPX Changelog file +== 05.12.06 == +Xi: adding MPX checks to ProcessOtherEvents + +mpx: adding QueryPointer request and reply + adjusting names of requests to Xlib compatible naming (xMPX*** instead of + mpx***) + + +Files: + Xi/exevents.c + mpx/Makefile.am + mpx/extinit.c + mpx/getevbase.c + mpx/getvers.c + mpx/queryptr.c + mpx/queryptr.h + mpx/selectev.c + mpx/listdev.h + mpx/listdev.c + include/mpxextinit.h + + == 01.12.06 == mpx: SelectEvents and GetEventBase requests. diff --git a/Xi/exevents.c b/Xi/exevents.c index 26c3f4ba2..8150b1e90 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -73,6 +73,12 @@ SOFTWARE. #include "dixgrabs.h" /* CreateGrab() */ #include "scrnintstr.h" +#ifdef MPX +#include +#include +#include "mpxglobals.h" +#endif + #define WID(w) ((w) ? ((w)->drawable.id) : 0) #define AllModifiersMask ( \ ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \ @@ -230,7 +236,11 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count) if (other->fromPassiveGrab && (key == other->activatingKey)) deactivateDeviceGrab = TRUE; - } else if (xE->u.u.type == DeviceButtonPress) { + } else if (xE->u.u.type == DeviceButtonPress +#ifdef MPX + || xE->u.u.type == MPXButtonPress +#endif + ) { if (!b) return; @@ -246,11 +256,17 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count) if (xE->u.u.detail <= 5) b->state |= (Button1Mask >> 1) << xE->u.u.detail; SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify); - if (!grab) - if (CheckDeviceGrabs(other, xE, 0, count)) - return; +#ifdef MPX + if (xE->u.u.type == DeviceButtonPress) +#endif + if (!grab) + if (CheckDeviceGrabs(other, xE, 0, count)) + return; - } else if (xE->u.u.type == DeviceButtonRelease) { + } else if (xE->u.u.type == DeviceButtonRelease +#ifdef MPX + || xE->u.u.type == MPXButtonRelease +#endif) { if (!b) return; @@ -266,8 +282,11 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count) if (xE->u.u.detail <= 5) b->state &= ~((Button1Mask >> 1) << xE->u.u.detail); SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify); - if (!b->state && other->fromPassiveGrab) - deactivateDeviceGrab = TRUE; +#ifdef MPX + if (xE->u.u.type == DeviceButtonRelease) +#endif + if (!b->state && other->fromPassiveGrab) + deactivateDeviceGrab = TRUE; } else if (xE->u.u.type == ProximityIn) other->valuator->mode &= ~OutOfProximity; else if (xE->u.u.type == ProximityOut) diff --git a/include/mpxextinit.h b/include/mpxextinit.h index 7fbb4c432..02be6c1f6 100644 --- a/include/mpxextinit.h +++ b/include/mpxextinit.h @@ -28,7 +28,7 @@ void SReplyMPXDispatch ( ClientPtr /* client */, int /* len */, - mpxGetExtensionVersionReply * /* rep */ + xMPXGetExtensionVersionReply * /* rep */ ); void diff --git a/mpx/Makefile.am b/mpx/Makefile.am index 63c384fe2..b35d8e7fe 100644 --- a/mpx/Makefile.am +++ b/mpx/Makefile.am @@ -12,5 +12,7 @@ libmpx_la_SOURCES = \ selectev.h \ mpxglobals.h \ getevbase.c \ - getevbase.h + getevbase.h \ + queryptr.h \ + queryptr.c diff --git a/mpx/extinit.c b/mpx/extinit.c index 89a9dc713..4b4bd477e 100644 --- a/mpx/extinit.c +++ b/mpx/extinit.c @@ -7,7 +7,6 @@ #include #include #include "inputstr.h" -//#include "gcstruct.h" /* pointer for extnsionst.h */ #include "extnsionst.h" /* extension entry */ #include #include @@ -21,6 +20,7 @@ #include "listdev.h" #include "selectev.h" #include "getevbase.h" +#include "queryptr.h" static Mask lastExtEventMask = 1; int MPXEventIndex; @@ -74,7 +74,6 @@ int MPXLastEvent; */ static MPXExtensionVersion thisversion = { - MPX_Present, MPX_Major, MPX_Minor }; @@ -125,14 +124,16 @@ int ProcMPXDispatch(register ClientPtr client) { REQUEST(xReq); - if (stuff->data == MPX_GetExtensionVersion) + if (stuff->data == X_MPXGetExtensionVersion) return (ProcMPXGetExtensionVersion(client)); - if (stuff->data == MPX_ListDevices) + if (stuff->data == X_MPXListDevices) return (ProcMPXListDevices(client)); - if (stuff->data == MPX_SelectEvents) + if (stuff->data == X_MPXSelectEvents) return (ProcMPXSelectEvents(client)); - if (stuff->data == MPX_GetEventBase) + if (stuff->data == X_MPXGetEventBase) return (ProcMPXGetEventBase(client)); + if (stuff->data == X_MPXQueryPointer) + return (ProcMPXQueryPointer(client)); else { SendErrorToClient(client, MPXReqCode, stuff->data, 0, BadRequest); } @@ -153,14 +154,16 @@ int SProcMPXDispatch(register ClientPtr client) { REQUEST(xReq); - if (stuff->data == MPX_GetExtensionVersion) + if (stuff->data == X_MPXGetExtensionVersion) return (SProcMPXGetExtensionVersion(client)); - if (stuff->data == MPX_ListDevices) + if (stuff->data == X_MPXListDevices) return (SProcMPXListDevices(client)); - if (stuff->data == MPX_SelectEvents) + if (stuff->data == X_MPXSelectEvents) return (SProcMPXSelectEvents(client)); - if (stuff->data == MPX_GetEventBase) + if (stuff->data == X_MPXGetEventBase) return (SProcMPXGetEventBase(client)); + if (stuff->data == X_MPXQueryPointer) + return (SProcMPXQueryPointer(client)); else { SendErrorToClient(client, MPXReqCode, stuff->data, 0, BadRequest); } @@ -188,14 +191,14 @@ MPXResetProc(ExtensionEntry* unused) } -void SReplyMPXDispatch(ClientPtr client, int len, mpxGetExtensionVersionReply* rep) +void SReplyMPXDispatch(ClientPtr client, int len, xMPXGetExtensionVersionReply* rep) { - if (rep->RepType == MPX_GetExtensionVersion) + if (rep->RepType == X_MPXGetExtensionVersion) SRepMPXGetExtensionVersion(client, len, - (mpxGetExtensionVersionReply*) rep); - if (rep->RepType == MPX_ListDevices) + (xMPXGetExtensionVersionReply*) rep); + if (rep->RepType == X_MPXListDevices) SRepMPXListDevices(client, len, - (mpxListDevicesReply*) rep); + (xMPXListDevicesReply*) rep); else { FatalError("MPX confused sending swapped reply"); } diff --git a/mpx/getevbase.c b/mpx/getevbase.c index 7ec82f676..8b0f598d2 100644 --- a/mpx/getevbase.c +++ b/mpx/getevbase.c @@ -20,20 +20,20 @@ int ProcMPXGetEventBase(register ClientPtr client) { - mpxGetEventBaseReply rep; + xMPXGetEventBaseReply rep; - REQUEST(mpxGetEventBaseReq); - REQUEST_SIZE_MATCH(mpxGetEventBaseReq); + REQUEST(xMPXGetEventBaseReq); + REQUEST_SIZE_MATCH(xMPXGetEventBaseReq); - memset(&rep, 0, sizeof(mpxGetEventBaseReply)); + memset(&rep, 0, sizeof(xMPXGetEventBaseReply)); rep.repType = X_Reply; - rep.RepType = MPX_GetEventBase; + rep.RepType = X_MPXGetEventBase; rep.length = 0; rep.sequenceNumber = client->sequence; rep.eventBase = MPXEventBase; - WriteReplyToClient(client, sizeof(mpxGetEventBaseReply), &rep); + WriteReplyToClient(client, sizeof(xMPXGetEventBaseReply), &rep); return Success; } @@ -47,9 +47,9 @@ SProcMPXGetEventBase(register ClientPtr client) { register char n; - REQUEST(mpxGetEventBaseReq); + REQUEST(xMPXGetEventBaseReq); swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(mpxGetEventBaseReq); + REQUEST_SIZE_MATCH(xMPXGetEventBaseReq); return (ProcMPXGetEventBase(client)); } diff --git a/mpx/getvers.c b/mpx/getvers.c index 7297a1fb5..fc3fc56f2 100644 --- a/mpx/getvers.c +++ b/mpx/getvers.c @@ -26,11 +26,11 @@ SProcMPXGetExtensionVersion(register ClientPtr client) { register char n; - REQUEST(mpxGetExtensionVersionReq); + REQUEST(xMPXGetExtensionVersionReq); swaps(&stuff->length, n); swaps(&stuff->major_version, n); swaps(&stuff->minor_version, n); - REQUEST_AT_LEAST_SIZE(mpxGetExtensionVersionReq); + REQUEST_AT_LEAST_SIZE(xMPXGetExtensionVersionReq); return (ProcMPXGetExtensionVersion(client)); } /*********************************************************************** @@ -41,19 +41,19 @@ SProcMPXGetExtensionVersion(register ClientPtr client) int ProcMPXGetExtensionVersion(register ClientPtr client) { - mpxGetExtensionVersionReply rep; + xMPXGetExtensionVersionReply rep; - REQUEST(mpxGetExtensionVersionReq); - REQUEST_SIZE_MATCH(mpxGetExtensionVersionReq); + REQUEST(xMPXGetExtensionVersionReq); + REQUEST_SIZE_MATCH(xMPXGetExtensionVersionReq); rep.repType = X_Reply; - rep.RepType = MPX_GetExtensionVersion; + rep.RepType = X_MPXGetExtensionVersion; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.major_version = AllExtensionVersions[MPXReqCode - 128].major_version; - rep.minor_version = AllExtensionVersions[MPXReqCode - 128].minor_version; - WriteReplyToClient(client, sizeof(mpxGetExtensionVersionReply), &rep); + rep.major_version = AllExtensionVersions[MPXReqCode - 128].major; + rep.minor_version = AllExtensionVersions[MPXReqCode - 128].minor; + WriteReplyToClient(client, sizeof(xMPXGetExtensionVersionReply), &rep); return Success; } @@ -67,7 +67,7 @@ ProcMPXGetExtensionVersion(register ClientPtr client) void SRepMPXGetExtensionVersion(ClientPtr client, int size, - mpxGetExtensionVersionReply * rep) + xMPXGetExtensionVersionReply * rep) { register char n; diff --git a/mpx/getvers.h b/mpx/getvers.h index da2401818..8800ac629 100644 --- a/mpx/getvers.h +++ b/mpx/getvers.h @@ -15,7 +15,7 @@ int ProcMPXGetExtensionVersion(ClientPtr /* client */ void SRepMPXGetExtensionVersion(ClientPtr /* client */ , int /* size */ , - mpxGetExtensionVersionReply * /* rep */ + xMPXGetExtensionVersionReply * /* rep */ ); #endif diff --git a/mpx/listdev.c b/mpx/listdev.c index 8bb27b30b..f97711095 100644 --- a/mpx/listdev.c +++ b/mpx/listdev.c @@ -25,7 +25,7 @@ int SProcMPXListDevices(register ClientPtr client) { register char n; - REQUEST(mpxListDevicesReq); + REQUEST(xMPXListDevicesReq); swaps(&stuff->length, n); return (ProcMPXListDevices(client)); } @@ -38,7 +38,7 @@ int SProcMPXListDevices(register ClientPtr client) */ int ProcMPXListDevices(register ClientPtr client) { - mpxListDevicesReply rep; + xMPXListDevicesReply rep; int numdevs = 0; int namesize = 1; /* need 1 extra byte for strcpy */ int size = 0; @@ -46,13 +46,13 @@ int ProcMPXListDevices(register ClientPtr client) char* devbuf; char* namebuf; char *savbuf; - mpxDeviceInfoPtr dev; + xMPXDeviceInfoPtr dev; DeviceIntPtr d; - REQUEST_SIZE_MATCH(mpxListDevicesReq); - memset(&rep, 0, sizeof(mpxListDevicesReply)); + REQUEST_SIZE_MATCH(xMPXListDevicesReq); + memset(&rep, 0, sizeof(xMPXListDevicesReply)); rep.repType = X_Reply; - rep.RepType = MPX_ListDevices; + rep.RepType = X_MPXListDevices; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -72,12 +72,12 @@ int ProcMPXListDevices(register ClientPtr client) } } - total_length = numdevs * sizeof(mpxDeviceInfo) + size + namesize; + total_length = numdevs * sizeof(xMPXDeviceInfo) + size + namesize; devbuf = (char *)xalloc(total_length); - namebuf = devbuf + (numdevs * sizeof(mpxDeviceInfo)); + namebuf = devbuf + (numdevs * sizeof(xMPXDeviceInfo)); savbuf = devbuf; - dev = (mpxDeviceInfoPtr) devbuf; + dev = (xMPXDeviceInfoPtr) devbuf; for (d = inputInfo.devices; d; d = d->next, dev++) if (d->isMPDev) SetMPXDeviceInfo(client, d, dev, &devbuf, &namebuf); @@ -87,7 +87,7 @@ int ProcMPXListDevices(register ClientPtr client) rep.ndevices = numdevs; rep.length = (total_length + 3) >> 2; - WriteReplyToClient(client, sizeof(mpxListDevicesReply), &rep); + WriteReplyToClient(client, sizeof(xMPXListDevicesReply), &rep); WriteToClient(client, total_length, savbuf); xfree(savbuf); return Success; @@ -115,7 +115,7 @@ SizeMPXDeviceInfo(DeviceIntPtr d, int *namesize, int *size) */ void -SetMPXDeviceInfo(ClientPtr client, DeviceIntPtr d, mpxDeviceInfoPtr dev, +SetMPXDeviceInfo(ClientPtr client, DeviceIntPtr d, xMPXDeviceInfoPtr dev, char **devbuf, char **namebuf) { MPXCopyDeviceName(namebuf, d->name); @@ -157,17 +157,17 @@ void MPXCopySwapDevice(register ClientPtr client, DeviceIntPtr d, char **buf) { register char n; - mpxDeviceInfoPtr dev; + xMPXDeviceInfoPtr dev; - dev = (mpxDeviceInfoPtr) * buf; - memset(dev, 0, sizeof(mpxDeviceInfo)); + dev = (xMPXDeviceInfoPtr) * buf; + memset(dev, 0, sizeof(xMPXDeviceInfo)); dev->id = d->id; dev->type = d->type; if (client->swapped) { swapl(&dev->type, n); /* macro - braces are required */ } - *buf += sizeof(mpxDeviceInfo); + *buf += sizeof(xMPXDeviceInfo); } /*********************************************************************** @@ -177,7 +177,7 @@ MPXCopySwapDevice(register ClientPtr client, DeviceIntPtr d, char **buf) * */ void -SRepMPXListDevices(ClientPtr client, int size, mpxListDevicesReply * rep) +SRepMPXListDevices(ClientPtr client, int size, xMPXListDevicesReply * rep) { register char n; diff --git a/mpx/listdev.h b/mpx/listdev.h index 0d2e0dc22..079fe8eb6 100644 --- a/mpx/listdev.h +++ b/mpx/listdev.h @@ -31,7 +31,7 @@ void SizeMPXDeviceInfo(DeviceIntPtr /* d */ , void SetMPXDeviceInfo(ClientPtr /* client */ , DeviceIntPtr /* d */ , - mpxDeviceInfoPtr /* dev */ , + xMPXDeviceInfoPtr /* dev */ , char ** /* devbuf */ , char ** /* namebuf */ ); @@ -48,6 +48,6 @@ void MPXCopySwapDevice(ClientPtr /* client */ , void SRepMPXListDevices(ClientPtr /* client */ , int /* size */ , - mpxListDevicesReply * /* rep */ + xMPXListDevicesReply * /* rep */ ); #endif diff --git a/mpx/queryptr.c b/mpx/queryptr.c new file mode 100644 index 000000000..716207410 --- /dev/null +++ b/mpx/queryptr.c @@ -0,0 +1,90 @@ +/* Copyright 2006 by Peter Hutterer */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include "inputstr.h" +#include "windowstr.h" +#include +#include + +#include "mpxglobals.h" + +#include "queryptr.h" + +/*********************************************************************** + * + * This procedure writes the reply for the MPXQueryPointer function. + */ +int +ProcMPXQueryPointer(register ClientPtr client) +{ + xMPXQueryPointerReply rep; + DeviceIntPtr pDev; + WindowPtr root, win; + int x, y; + + REQUEST(xMPXQueryPointerReq); + REQUEST_SIZE_MATCH(xMPXQueryPointerReq); + + pDev = LookupDeviceIntRec(stuff->deviceid); + if (!pDev->isMPDev) + { + SendErrorToClient(client, MPXReqCode, X_MPXQueryPointer, + stuff->deviceid, BadValue); + return Success; + } + + + memset(&rep, 0, sizeof(xMPXQueryPointerReply)); + rep.repType = X_Reply; + rep.RepType = X_MPXQueryPointer; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + root = GetCurrentRootWindow(); + win = GetSpriteWindow(pDev); + GetSpritePosition(pDev, &x, &y); + + rep.root = root->drawable.id; + rep.root_x = x; + rep.root_y = y; + if (win != root) + { + rep.child = win->drawable.id; + rep.win_x = x - win->drawable.x; + rep.win_y = y - win->drawable.y; + } + else + { + rep.child = None; + rep.win_x = x; + rep.win_y = y; + } + + + rep.mask = pDev->button->state | inputInfo.keyboard->key->state; + + WriteReplyToClient(client, sizeof(xMPXQueryPointerReply), &rep); + + return Success; +} + + +/*********************************************************************** + * + * This procedure writes the reply for the MPXQueryPointer function. + */ +int +SProcMPXQueryPointer(register ClientPtr client) +{ + register char n; + + REQUEST(xMPXQueryPointerReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xMPXQueryPointerReq); + return (ProcMPXQueryPointer(client)); +} diff --git a/mpx/queryptr.h b/mpx/queryptr.h new file mode 100644 index 000000000..c89397ca1 --- /dev/null +++ b/mpx/queryptr.h @@ -0,0 +1,16 @@ +/* Copyright 2006 by Peter Hutterer */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef QUERYPTR_H +#define QUERYPTR_H 1 + +int SProcMPXQueryPointer(ClientPtr /* client */ + ); + +int ProcMPXQueryPointer(ClientPtr /* client */ + ); + +#endif /* QUERYPTR_H */ diff --git a/mpx/selectev.c b/mpx/selectev.c index 1e75a51b9..fc2ff9c10 100644 --- a/mpx/selectev.c +++ b/mpx/selectev.c @@ -42,9 +42,9 @@ SProcMPXSelectEvents(register ClientPtr client) { register char n; - REQUEST(mpxSelectEventsReq); + REQUEST(xMPXSelectEventsReq); swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(mpxSelectEventsReq); + REQUEST_SIZE_MATCH(xMPXSelectEventsReq); swapl(&stuff->window, n); return (ProcMPXSelectEvents(client)); } @@ -61,12 +61,12 @@ ProcMPXSelectEvents(register ClientPtr client) int ret; WindowPtr pWin; - REQUEST(mpxSelectEventsReq); - REQUEST_SIZE_MATCH(mpxSelectEventsReq); + REQUEST(xMPXSelectEventsReq); + REQUEST_SIZE_MATCH(xMPXSelectEventsReq); - if (stuff->length != (sizeof(mpxSelectEventsReq) >> 2)) + if (stuff->length != (sizeof(xMPXSelectEventsReq) >> 2)) { - SendErrorToClient(client, MPXReqCode, MPX_SelectEvents, 0, + SendErrorToClient(client, MPXReqCode, X_MPXSelectEvents, 0, BadLength); return Success; } @@ -75,7 +75,7 @@ ProcMPXSelectEvents(register ClientPtr client) if (!pWin) { client->errorValue = stuff->window; - SendErrorToClient(client, MPXReqCode, MPX_SelectEvents, 0, + SendErrorToClient(client, MPXReqCode, X_MPXSelectEvents, 0, BadWindow); return Success; } @@ -83,13 +83,13 @@ ProcMPXSelectEvents(register ClientPtr client) if (stuff->mask >= MPXHighestMask) { client->errorValue = stuff->mask; - SendErrorToClient(client, MPXReqCode, MPX_SelectEvents, 0, + SendErrorToClient(client, MPXReqCode, X_MPXSelectEvents, 0, BadValue); } if ((ret = MPXSelectForWindow(pWin, client, stuff->mask)) != Success) { - SendErrorToClient(client, MPXReqCode, MPX_SelectEvents, 0, ret); + SendErrorToClient(client, MPXReqCode, X_MPXSelectEvents, 0, ret); return Success; } From eb1d9f51af19dab20a95c2830ca1c508d8ee66bb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 5 Dec 2006 18:50:19 +1030 Subject: [PATCH 029/634] Ironing some glitches caused by the merge --- Changelog | 9 +++++++++ Xi/exevents.c | 3 ++- dix/events.c | 2 +- randr/rrpointer.c | 5 +++-- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Changelog b/Changelog index 54c2f9e16..5a264ab22 100644 --- a/Changelog +++ b/Changelog @@ -24,6 +24,15 @@ ____________________________________________________________ Merging from master +____________________________________________________________ + +Ironing some glitches caused by the merge + +Files: + Xi/exevents.c + randr/rrpointer.c + dix/events.c + == 01.12.06 == diff --git a/Xi/exevents.c b/Xi/exevents.c index 8150b1e90..9c6519351 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -266,7 +266,8 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count) } else if (xE->u.u.type == DeviceButtonRelease #ifdef MPX || xE->u.u.type == MPXButtonRelease -#endif) { +#endif + ) { if (!b) return; diff --git a/dix/events.c b/dix/events.c index 3d7abd82d..8d7167ef1 100644 --- a/dix/events.c +++ b/dix/events.c @@ -360,7 +360,7 @@ static void ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py) static void PostNewCursor(DeviceIntPtr pDev); #define SyntheticMotion(x, y) \ - PostSyntheticMotion(x, y, sprite.screen, \ + PostSyntheticMotion(x, y, sprite->screen, \ syncEvents.playingEvents ? \ syncEvents.time.milliseconds : \ currentTime.milliseconds); diff --git a/randr/rrpointer.c b/randr/rrpointer.c index c092e494b..b9ee3bce2 100644 --- a/randr/rrpointer.c +++ b/randr/rrpointer.c @@ -21,6 +21,7 @@ */ #include "randrstr.h" +#include "inputstr.h" /* * When the pointer moves, check to see if the specified position is outside @@ -87,7 +88,7 @@ RRPointerToNearestCrtc (ScreenPtr pScreen, int x, int y, RRCrtcPtr skip) } } if (best_dx || best_dy) - (*pScreen->SetCursorPosition) (pScreen, x + best_dx, y + best_dy, TRUE); + (*pScreen->SetCursorPosition) (inputInfo.pointer, pScreen, x + best_dx, y + best_dy, TRUE); pScrPriv->pointerCrtc = nearest; } @@ -132,6 +133,6 @@ RRPointerScreenConfigured (ScreenPtr pScreen) if (pScreen != pCurrentScreen) return; - GetSpritePosition (&x, &y); + GetSpritePosition(inputInfo.pointer, &x, &y); RRPointerToNearestCrtc (pScreen, x, y, NULL); } From ae3c24da34cd8eeb77a6389861856fd51e0841f5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 11 Dec 2006 18:09:59 +1030 Subject: [PATCH 030/634] dix: Moving SpriteRec into DeviceIntRec removing global sprite structure beginning to remove MPX ifdefs xnest: Fix to make xnest compile again --- Changelog | 22 + XTrap/xtrapdi.c | 3 +- Xext/xtest.c | 5 +- dix/devices.c | 4 + dix/events.c | 865 +++++++++++++++------------------ dix/getevents.c | 17 +- hw/xfree86/common/xf86Xinput.c | 23 +- hw/xnest/Events.c | 3 +- include/cursor.h | 2 +- include/dix.h | 4 + include/dixevents.h | 8 +- include/input.h | 4 +- include/inputstr.h | 28 +- record/record.c | 3 +- 14 files changed, 480 insertions(+), 511 deletions(-) diff --git a/Changelog b/Changelog index 5a264ab22..463d028de 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,26 @@ MPX Changelog file +== 12.12.06 == +dix: Moving SpriteRec into DeviceIntRec + removing global sprite structure + beginning to remove MPX ifdefs + +xnest: Fix to make xnest compile again + +Files: + dix/getevents.c + dix/events.c + dix/devices.c + hw/xfree86/common/xf86Xinput.c + include/cursor.h + include/dix.h + include/dixevents.h + include/input.h + include/inputstr.h + XTrap/xtrapdi.c + Xext/xtest.c + hw/xnest/Events.c + record/record.c + == 05.12.06 == Xi: adding MPX checks to ProcessOtherEvents diff --git a/XTrap/xtrapdi.c b/XTrap/xtrapdi.c index c5d640d0b..ec85518f4 100644 --- a/XTrap/xtrapdi.c +++ b/XTrap/xtrapdi.c @@ -71,6 +71,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif #include "pixmapstr.h" /* DrawableRec */ #include "windowstr.h" /* Drawable Lookup structures */ +#include "inputstr.h" #include #include #include @@ -1564,7 +1565,7 @@ void XETrapStampAndMail(xEvent *x_event) data.u.event.u.u.type == ButtonRelease || data.u.event.u.u.type == KeyPress || data.u.event.u.u.type == KeyRelease)) { - int scr = XineramaGetCursorScreen(); + int scr = XineramaGetCursorScreen(inputInfo.pointer); data.u.event.u.keyButtonPointer.rootX += panoramiXdataPtr[scr].x - panoramiXdataPtr[0].x; data.u.event.u.keyButtonPointer.rootY += diff --git a/Xext/xtest.c b/Xext/xtest.c index 66c84d752..7b2aa755d 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -148,7 +148,7 @@ ProcXTestCompareCursor(client) if (stuff->cursor == None) pCursor = NullCursor; else if (stuff->cursor == XTestCurrentCursor) - pCursor = GetSpriteCursor(); + pCursor = GetSpriteCursor(inputInfo.pointer); else { pCursor = (CursorPtr)LookupIDByType(stuff->cursor, RT_CURSOR); if (!pCursor) @@ -426,7 +426,8 @@ ProcXTestFakeInput(client) #ifdef PANORAMIX if ((!noPanoramiXExtension - && root->drawable.pScreen->myNum != XineramaGetCursorScreen()) + && root->drawable.pScreen->myNum + != XineramaGetCursorScreen(inputInfo.pointer)) || (noPanoramiXExtension && root != GetCurrentRootWindow())) #else diff --git a/dix/devices.c b/dix/devices.c index e6a504954..b4896ac9f 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -366,8 +366,12 @@ InitCoreDevices() if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) FatalError("Couldn't allocate pointer devPrivates\n"); dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; + InitSprite(dev, TRUE); (void)ActivateDevice(dev); inputInfo.pointer = dev; + /* the core keyboard is initialised by now. set the keyboard's sprite + * to the core pointer's sprite. */ + InitSprite(inputInfo.keyboard, FALSE); } } diff --git a/dix/events.c b/dix/events.c index 8d7167ef1..f438b07f1 100644 --- a/dix/events.c +++ b/dix/events.c @@ -175,9 +175,7 @@ xEvent *xeviexE; #include "dixgrabs.h" #include "dispatch.h" -#ifdef MPX #include "mpxglobals.h" -#endif #define EXTENSION_EVENT_BASE 64 @@ -244,33 +242,9 @@ static WindowPtr *spriteTrace = (WindowPtr *)NULL; static int spriteTraceSize = 0; static int spriteTraceGood; -typedef struct { - CursorPtr current; - BoxRec hotLimits; /* logical constraints of hot spot */ - Bool confined; /* confined to screen */ -#if defined(SHAPE) || defined(PANORAMIX) - RegionPtr hotShape; /* additional logical shape constraint */ -#endif - BoxRec physLimits; /* physical constraints of hot spot */ - WindowPtr win; /* window of logical position */ - HotSpot hot; /* logical pointer position */ - HotSpot hotPhys; /* physical pointer position */ -#ifdef PANORAMIX - ScreenPtr screen; /* all others are in Screen 0 coordinates */ - RegionRec Reg1; /* Region 1 for confining motion */ - RegionRec Reg2; /* Region 2 for confining virtual motion */ - WindowPtr windows[MAXSCREENS]; - WindowPtr confineWin; /* confine window */ -#endif -} SpriteRec, *SpritePtr; -static SpritePtr sprite; /* info about the cursor sprite */ - -#ifdef MPX #define MPXDBG(...) fprintf (stderr, "MPX: " __VA_ARGS__) -static SpritePtr mpsprites; /* info about the MPX sprites */ - /** * True for the core pointer and any MPX device. * False for any other device (including keyboards). @@ -283,8 +257,6 @@ MPHasCursor(DeviceIntPtr pDev) (pDev->isMPDev && pDev->id < MAX_DEVICES)); } -#endif - #ifdef XEVIE _X_EXPORT WindowPtr xeviewin; _X_EXPORT HotSpot xeviehot; @@ -359,8 +331,8 @@ static CARD8 criticalEvents[32] = static void ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py); static void PostNewCursor(DeviceIntPtr pDev); -#define SyntheticMotion(x, y) \ - PostSyntheticMotion(x, y, sprite->screen, \ +#define SyntheticMotion(dev, x, y) \ + PostSyntheticMotion(dev, x, y, dev->pSprite->screen, \ syncEvents.playingEvents ? \ syncEvents.time.milliseconds : \ currentTime.milliseconds); @@ -375,12 +347,7 @@ XineramaSetCursorPosition( ScreenPtr pScreen; BoxRec box; int i; - SpritePtr pSprite = sprite; - -#ifdef MPX - if (MPHasCursor(pDev)) - pSprite = &mpsprites[pDev->id]; -#endif + SpritePtr pSprite = pDev->pSprite; /* x,y are in Screen 0 coordinates. We need to decide what Screen to send the message too and what the coordinates relative to @@ -418,15 +385,10 @@ XineramaSetCursorPosition( static void XineramaConstrainCursor(DeviceIntPtr pDev) { - SpritePtr pSprite = sprite; + SpritePtr pSprite = pDev->pSprite; ScreenPtr pScreen; BoxRec newBox; -#ifdef MPX - if (MPHasCursor(pDev)) - pSprite = &mpsprites[pDev->id]; -#endif - pScreen = pSprite->screen; newBox = pSprite->physLimits; @@ -447,14 +409,10 @@ XineramaCheckPhysLimits( Bool generateEvents ){ HotSpot new; - SpritePtr pSprite = sprite; + SpritePtr pSprite = pDev->pSprite; if (!cursor) return; -#ifdef MPX - if (MPHasCursor(pDev)) - pSprite = &mpsprites[pDev->id]; -#endif new = pSprite->hotPhys; @@ -480,7 +438,7 @@ XineramaCheckPhysLimits( { XineramaSetCursorPosition (pDev, new.x, new.y, generateEvents); if (!generateEvents) - SyntheticMotion(new.x, new.y); + SyntheticMotion(pDev, new.x, new.y); } /* Tell DDX what the limits are */ @@ -489,10 +447,12 @@ XineramaCheckPhysLimits( static Bool -XineramaSetWindowPntrs(WindowPtr pWin) +XineramaSetWindowPntrs(DeviceIntPtr pDev, WindowPtr pWin) { + SpritePtr pSprite = pDev->pSprite; + if(pWin == WindowTable[0]) { - memcpy(sprite->windows, WindowTable, + memcpy(pSprite->windows, WindowTable, PanoramiXNumScreens*sizeof(WindowPtr)); } else { PanoramiXRes *win; @@ -504,8 +464,8 @@ XineramaSetWindowPntrs(WindowPtr pWin) return FALSE; for(i = 0; i < PanoramiXNumScreens; i++) { - sprite->windows[i] = LookupIDByType(win->info[i].id, RT_WINDOW); - if(!sprite->windows[i]) /* window is being unmapped */ + pSprite->windows[i] = LookupIDByType(win->info[i].id, RT_WINDOW); + if(!pSprite->windows[i]) /* window is being unmapped */ return FALSE; } } @@ -514,16 +474,18 @@ XineramaSetWindowPntrs(WindowPtr pWin) static void XineramaCheckVirtualMotion( + DeviceIntPtr pDev, QdEventPtr qe, - WindowPtr pWin -){ + WindowPtr pWin) +{ + SpritePtr pSprite = pDev->pSprite; if (qe) { - sprite->hot.pScreen = qe->pScreen; /* should always be Screen 0 */ - sprite->hot.x = qe->event->u.keyButtonPointer.rootX; - sprite->hot.y = qe->event->u.keyButtonPointer.rootY; - pWin = inputInfo.pointer->grab ? inputInfo.pointer->grab->confineTo : + pSprite->hot.pScreen = qe->pScreen; /* should always be Screen 0 */ + pSprite->hot.x = qe->event->u.keyButtonPointer.rootX; + pSprite->hot.y = qe->event->u.keyButtonPointer.rootY; + pWin = pDev->grab ? pDev->grab->confineTo : NullWindow; } if (pWin) @@ -531,13 +493,13 @@ XineramaCheckVirtualMotion( int x, y, off_x, off_y, i; BoxRec lims; - if(!XineramaSetWindowPntrs(pWin)) + if(!XineramaSetWindowPntrs(pDev, pWin)) return; i = PanoramiXNumScreens - 1; - REGION_COPY(sprite->screen, &sprite->Reg2, - &sprite->windows[i]->borderSize); + REGION_COPY(pSprite->screen, &pSprite->Reg2, + &pSprite->windows[i]->borderSize); off_x = panoramiXdataPtr[i].x; off_y = panoramiXdataPtr[i].y; @@ -546,39 +508,40 @@ XineramaCheckVirtualMotion( y = off_y - panoramiXdataPtr[i].y; if(x || y) - REGION_TRANSLATE(sprite->screen, &sprite->Reg2, x, y); + REGION_TRANSLATE(pSprite->screen, &pSprite->Reg2, x, y); - REGION_UNION(sprite->screen, &sprite->Reg2, &sprite->Reg2, - &sprite->windows[i]->borderSize); + REGION_UNION(pSprite->screen, &pSprite->Reg2, &pSprite->Reg2, + &pSprite->windows[i]->borderSize); off_x = panoramiXdataPtr[i].x; off_y = panoramiXdataPtr[i].y; } - lims = *REGION_EXTENTS(sprite->screen, &sprite->Reg2); + lims = *REGION_EXTENTS(pSprite->screen, &pSprite->Reg2); - if (sprite->hot.x < lims.x1) - sprite->hot.x = lims.x1; - else if (sprite->hot.x >= lims.x2) - sprite->hot.x = lims.x2 - 1; - if (sprite->hot.y < lims.y1) - sprite->hot.y = lims.y1; - else if (sprite->hot.y >= lims.y2) - sprite->hot.y = lims.y2 - 1; + if (pSprite->hot.x < lims.x1) + pSprite->hot.x = lims.x1; + else if (pSprite->hot.x >= lims.x2) + pSprite->hot.x = lims.x2 - 1; + if (pSprite->hot.y < lims.y1) + pSprite->hot.y = lims.y1; + else if (pSprite->hot.y >= lims.y2) + pSprite->hot.y = lims.y2 - 1; - if (REGION_NUM_RECTS(&sprite->Reg2) > 1) - ConfineToShape(inputInfo.pointer, &sprite->Reg2, &sprite->hot.x, &sprite->hot.y); + if (REGION_NUM_RECTS(&pSprite->Reg2) > 1) + ConfineToShape(pDev, &pSprite->Reg2, + &pSprite->hot.x, &pSprite->hot.y); if (qe) { - qe->pScreen = sprite->hot.pScreen; - qe->event->u.keyButtonPointer.rootX = sprite->hot.x; - qe->event->u.keyButtonPointer.rootY = sprite->hot.y; + qe->pScreen = pSprite->hot.pScreen; + qe->event->u.keyButtonPointer.rootX = pSprite->hot.x; + qe->event->u.keyButtonPointer.rootY = pSprite->hot.y; } } #ifdef XEVIE - xeviehot.x = sprite->hot.x; - xeviehot.y = sprite->hot.y; + xeviehot.x = pSprite->hot.x; + xeviehot.y = pSprite->hot.y; #endif } @@ -587,12 +550,7 @@ static Bool XineramaCheckMotion(xEvent *xE, DeviceIntPtr pDev) { WindowPtr prevSpriteWin; - SpritePtr pSprite = sprite; - -#ifdef MPX - if (MPHasCursor(pDev)) - pSprite = &mpsprites[pDev->id]; -#endif + SpritePtr pSprite = pDev->pSprite; prevSpriteWin = pSprite->win; @@ -653,25 +611,28 @@ XineramaCheckMotion(xEvent *xE, DeviceIntPtr pDev) static void -XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents) +XineramaConfineCursorToWindow(DeviceIntPtr pDev, + WindowPtr pWin, + Bool generateEvents) { + SpritePtr pSprite = pDev->pSprite; if (syncEvents.playingEvents) { - XineramaCheckVirtualMotion((QdEventPtr)NULL, pWin); - SyntheticMotion(sprite->hot.x, sprite->hot.y); + XineramaCheckVirtualMotion(pDev, (QdEventPtr)NULL, pWin); + SyntheticMotion(pDev, pSprite->hot.x, pSprite->hot.y); } else { int x, y, off_x, off_y, i; - if(!XineramaSetWindowPntrs(pWin)) + if(!XineramaSetWindowPntrs(pDev, pWin)) return; i = PanoramiXNumScreens - 1; - REGION_COPY(sprite->screen, &sprite->Reg1, - &sprite->windows[i]->borderSize); + REGION_COPY(pSprite->screen, &pSprite->Reg1, + &pSprite->windows[i]->borderSize); off_x = panoramiXdataPtr[i].x; off_y = panoramiXdataPtr[i].y; @@ -680,26 +641,26 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents) y = off_y - panoramiXdataPtr[i].y; if(x || y) - REGION_TRANSLATE(sprite->screen, &sprite->Reg1, x, y); + REGION_TRANSLATE(pSprite->screen, &pSprite->Reg1, x, y); - REGION_UNION(sprite->screen, &sprite->Reg1, &sprite->Reg1, - &sprite->windows[i]->borderSize); + REGION_UNION(pSprite->screen, &pSprite->Reg1, &pSprite->Reg1, + &pSprite->windows[i]->borderSize); off_x = panoramiXdataPtr[i].x; off_y = panoramiXdataPtr[i].y; } - sprite->hotLimits = *REGION_EXTENTS(sprite->screen, &sprite->Reg1); + pSprite->hotLimits = *REGION_EXTENTS(pSprite->screen, &pSprite->Reg1); - if(REGION_NUM_RECTS(&sprite->Reg1) > 1) - sprite->hotShape = &sprite->Reg1; + if(REGION_NUM_RECTS(&pSprite->Reg1) > 1) + pSprite->hotShape = &pSprite->Reg1; else - sprite->hotShape = NullRegion; + pSprite->hotShape = NullRegion; - sprite->confined = FALSE; - sprite->confineWin = (pWin == WindowTable[0]) ? NullWindow : pWin; + pSprite->confined = FALSE; + pSprite->confineWin = (pWin == WindowTable[0]) ? NullWindow : pWin; - XineramaCheckPhysLimits(inputInfo.pointer, sprite->current, + XineramaCheckPhysLimits(pDev, pSprite->current, generateEvents); } } @@ -708,12 +669,7 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents) static void XineramaChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) { - SpritePtr pSprite = sprite; - -#ifdef MPX - if (MPHasCursor(pDev)) - pSprite = &mpsprites[pDev->id]; -#endif + SpritePtr pSprite = pDev->pSprite; if (cursor != pSprite->current) { @@ -753,11 +709,7 @@ ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py) BoxRec box; int x = *px, y = *py; int incx = 1, incy = 1; - SpritePtr pSprite = sprite; -#ifdef MPX - if (MPHasCursor(pDev)) - pSprite = &mpsprites[pDev->id]; -#endif + SpritePtr pSprite = pDev->pSprite; if (POINT_IN_REGION(pSprite->hot.pScreen, shape, x, y, &box)) return; @@ -798,12 +750,7 @@ CheckPhysLimits( ScreenPtr pScreen) { HotSpot new; - SpritePtr pSprite = sprite; - -#ifdef MPX - if (MPHasCursor(pDev)) - pSprite = &mpsprites[pDev->id]; -#endif + SpritePtr pSprite = pDev->pSprite; if (!cursor) return; @@ -838,90 +785,94 @@ CheckPhysLimits( (*pScreen->SetCursorPosition) (pDev, pScreen, new.x, new.y, generateEvents); if (!generateEvents) - SyntheticMotion(new.x, new.y); + SyntheticMotion(pDev, new.x, new.y); } } static void CheckVirtualMotion( + register DeviceIntPtr pDev, register QdEventPtr qe, register WindowPtr pWin) { + SpritePtr pSprite = pDev->pSprite; + #ifdef PANORAMIX if(!noPanoramiXExtension) { - XineramaCheckVirtualMotion(qe, pWin); + XineramaCheckVirtualMotion(pDev, qe, pWin); return; } #endif if (qe) { - sprite->hot.pScreen = qe->pScreen; - sprite->hot.x = qe->event->u.keyButtonPointer.rootX; - sprite->hot.y = qe->event->u.keyButtonPointer.rootY; - pWin = inputInfo.pointer->grab ? inputInfo.pointer->grab->confineTo : - NullWindow; + pSprite->hot.pScreen = qe->pScreen; + pSprite->hot.x = qe->event->u.keyButtonPointer.rootX; + pSprite->hot.y = qe->event->u.keyButtonPointer.rootY; + pWin = pDev->grab ? pDev->grab->confineTo : NullWindow; } if (pWin) { BoxRec lims; - if (sprite->hot.pScreen != pWin->drawable.pScreen) + if (pSprite->hot.pScreen != pWin->drawable.pScreen) { - sprite->hot.pScreen = pWin->drawable.pScreen; - sprite->hot.x = sprite->hot.y = 0; + pSprite->hot.pScreen = pWin->drawable.pScreen; + pSprite->hot.x = pSprite->hot.y = 0; } lims = *REGION_EXTENTS(pWin->drawable.pScreen, &pWin->borderSize); - if (sprite->hot.x < lims.x1) - sprite->hot.x = lims.x1; - else if (sprite->hot.x >= lims.x2) - sprite->hot.x = lims.x2 - 1; - if (sprite->hot.y < lims.y1) - sprite->hot.y = lims.y1; - else if (sprite->hot.y >= lims.y2) - sprite->hot.y = lims.y2 - 1; + if (pSprite->hot.x < lims.x1) + pSprite->hot.x = lims.x1; + else if (pSprite->hot.x >= lims.x2) + pSprite->hot.x = lims.x2 - 1; + if (pSprite->hot.y < lims.y1) + pSprite->hot.y = lims.y1; + else if (pSprite->hot.y >= lims.y2) + pSprite->hot.y = lims.y2 - 1; #ifdef SHAPE if (wBoundingShape(pWin)) - ConfineToShape(inputInfo.pointer, &pWin->borderSize, &sprite->hot.x, &sprite->hot.y); + ConfineToShape(pDev, &pWin->borderSize, + &pSprite->hot.x, &pSprite->hot.y); #endif if (qe) { - qe->pScreen = sprite->hot.pScreen; - qe->event->u.keyButtonPointer.rootX = sprite->hot.x; - qe->event->u.keyButtonPointer.rootY = sprite->hot.y; + qe->pScreen = pSprite->hot.pScreen; + qe->event->u.keyButtonPointer.rootX = pSprite->hot.x; + qe->event->u.keyButtonPointer.rootY = pSprite->hot.y; } } #ifdef XEVIE - xeviehot.x = sprite->hot.x; - xeviehot.y = sprite->hot.y; + xeviehot.x = pSprite->hot.x; + xeviehot.y = pSprite->hot.y; #endif - ROOT = WindowTable[sprite->hot.pScreen->myNum]; + ROOT = WindowTable[pSprite->hot.pScreen->myNum]; } static void -ConfineCursorToWindow(WindowPtr pWin, Bool generateEvents, Bool confineToScreen) +ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, Bool confineToScreen) { ScreenPtr pScreen = pWin->drawable.pScreen; + SpritePtr pSprite = pDev->pSprite; #ifdef PANORAMIX if(!noPanoramiXExtension) { - XineramaConfineCursorToWindow(pWin, generateEvents); + XineramaConfineCursorToWindow(pDev, pWin, generateEvents); return; } #endif if (syncEvents.playingEvents) { - CheckVirtualMotion((QdEventPtr)NULL, pWin); - SyntheticMotion(sprite->hot.x, sprite->hot.y); + CheckVirtualMotion(pDev, (QdEventPtr)NULL, pWin); + SyntheticMotion(pDev, pSprite->hot.x, pSprite->hot.y); } else { - sprite->hotLimits = *REGION_EXTENTS( pScreen, &pWin->borderSize); + pSprite->hotLimits = *REGION_EXTENTS( pScreen, &pWin->borderSize); #ifdef SHAPE - sprite->hotShape = wBoundingShape(pWin) ? &pWin->borderSize + pSprite->hotShape = wBoundingShape(pWin) ? &pWin->borderSize : NullRegion; #endif - CheckPhysLimits(inputInfo.pointer, sprite->current, generateEvents, + CheckPhysLimits(pDev, pSprite->current, generateEvents, confineToScreen, pScreen); } } @@ -929,23 +880,13 @@ ConfineCursorToWindow(WindowPtr pWin, Bool generateEvents, Bool confineToScreen) _X_EXPORT Bool PointerConfinedToScreen(DeviceIntPtr pDev) { - SpritePtr pSprite = sprite; -#ifdef MPX - if (MPHasCursor(pDev)) - pSprite = &mpsprites[pDev->id]; -#endif - return pSprite->confined; + return pDev->pSprite->confined; } static void ChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) { - SpritePtr pSprite = sprite; - -#ifdef MPX - if (MPHasCursor(pDev)) - pSprite = &mpsprites[pDev->id]; -#endif + SpritePtr pSprite = pDev->pSprite; #ifdef PANORAMIX if(!noPanoramiXExtension) { @@ -960,7 +901,7 @@ ChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) (pSprite->current->bits->yhot != cursor->bits->yhot)) CheckPhysLimits(pDev, cursor, FALSE, pSprite->confined, (ScreenPtr)NULL); - (*sprite->hotPhys.pScreen->DisplayCursor) (pDev, + (*pSprite->hotPhys.pScreen->DisplayCursor) (pDev, pSprite->hotPhys.pScreen, cursor); FreeCursor(pSprite->current, (Cursor)0); @@ -983,13 +924,7 @@ PostNewCursor(DeviceIntPtr pDev) { register WindowPtr win; register GrabPtr grab = pDev->grab; - SpritePtr pSprite = sprite; - -#ifdef MPX - if (MPHasCursor(pDev)) - pSprite = &mpsprites[pDev->id]; -#endif - + SpritePtr pSprite = pDev->pSprite; if (syncEvents.playingEvents) return; @@ -1024,38 +959,29 @@ GetCurrentRootWindow() _X_EXPORT WindowPtr GetSpriteWindow(DeviceIntPtr pDev) { -#ifdef MPX - if(MPHasCursor(pDev)) - return mpsprites[pDev->id].win; -#endif - - return sprite->win; + return pDev->pSprite->win; } _X_EXPORT CursorPtr -GetSpriteCursor() +GetSpriteCursor(DeviceIntPtr pDev) { - return sprite->current; + return pDev->pSprite->current; } _X_EXPORT void GetSpritePosition(DeviceIntPtr pDev, int *px, int *py) { - SpritePtr pSprite = sprite; -#ifdef MPX - if (MPHasCursor(pDev)) - pSprite = &mpsprites[pDev->id]; -#endif + SpritePtr pSprite = pDev->pSprite; *px = pSprite->hotPhys.x; *py = pSprite->hotPhys.y; } #ifdef PANORAMIX _X_EXPORT int -XineramaGetCursorScreen() +XineramaGetCursorScreen(DeviceIntPtr pDev) { if(!noPanoramiXExtension) { - return sprite->screen->myNum; + return pDev->pSprite->screen->myNum; } else { return 0; } @@ -1100,6 +1026,7 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) register QdEventPtr tail = *syncEvents.pendtail; register QdEventPtr qe; xEvent *qxE; + SpritePtr pSprite = device->pSprite; NoticeTime(xE); @@ -1124,7 +1051,7 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) */ if (xE->u.u.type == MotionNotify) XE_KBPTR.root = - WindowTable[sprite->hotPhys.pScreen->myNum]->drawable.id; + WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id; eventinfo.events = xE; eventinfo.count = count; CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo); @@ -1133,21 +1060,21 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) { #ifdef PANORAMIX if(!noPanoramiXExtension) { - XE_KBPTR.rootX += panoramiXdataPtr[sprite->screen->myNum].x - + XE_KBPTR.rootX += panoramiXdataPtr[pSprite->screen->myNum].x - panoramiXdataPtr[0].x; - XE_KBPTR.rootY += panoramiXdataPtr[sprite->screen->myNum].y - + XE_KBPTR.rootY += panoramiXdataPtr[pSprite->screen->myNum].y - panoramiXdataPtr[0].y; } #endif - sprite->hotPhys.x = XE_KBPTR.rootX; - sprite->hotPhys.y = XE_KBPTR.rootY; + pSprite->hotPhys.x = XE_KBPTR.rootX; + pSprite->hotPhys.y = XE_KBPTR.rootY; /* do motion compression */ if (tail && (tail->event->u.u.type == MotionNotify) && - (tail->pScreen == sprite->hotPhys.pScreen)) + (tail->pScreen == pSprite->hotPhys.pScreen)) { - tail->event->u.keyButtonPointer.rootX = sprite->hotPhys.x; - tail->event->u.keyButtonPointer.rootY = sprite->hotPhys.y; + tail->event->u.keyButtonPointer.rootX = pSprite->hotPhys.x; + tail->event->u.keyButtonPointer.rootY = pSprite->hotPhys.y; tail->event->u.keyButtonPointer.time = XE_KBPTR.time; tail->months = currentTime.months; return; @@ -1158,7 +1085,7 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) return; qe->next = (QdEventPtr)NULL; qe->device = device; - qe->pScreen = sprite->hotPhys.pScreen; + qe->pScreen = pSprite->hotPhys.pScreen; qe->months = currentTime.months; qe->event = (xEvent *)(qe + 1); qe->evcount = count; @@ -1174,6 +1101,7 @@ PlayReleasedEvents(void) { register QdEventPtr *prev, qe; register DeviceIntPtr dev; + DeviceIntPtr pDev; prev = &syncEvents.pending; while ( (qe = *prev) ) @@ -1181,10 +1109,11 @@ PlayReleasedEvents(void) if (!qe->device->sync.frozen) { *prev = qe->next; + pDev = qe->device; if (*syncEvents.pendtail == *prev) syncEvents.pendtail = prev; if (qe->event->u.u.type == MotionNotify) - CheckVirtualMotion(qe, NullWindow); + CheckVirtualMotion(pDev, qe, NullWindow); syncEvents.time.months = qe->months; syncEvents.time.milliseconds = qe->event->u.keyButtonPointer.time; #ifdef PANORAMIX @@ -1194,10 +1123,10 @@ PlayReleasedEvents(void) if(!noPanoramiXExtension) { qe->event->u.keyButtonPointer.rootX += panoramiXdataPtr[0].x - - panoramiXdataPtr[sprite->screen->myNum].x; + panoramiXdataPtr[pDev->pSprite->screen->myNum].x; qe->event->u.keyButtonPointer.rootY += panoramiXdataPtr[0].y - - panoramiXdataPtr[sprite->screen->myNum].y; + panoramiXdataPtr[pDev->pSprite->screen->myNum].y; } #endif (*qe->device->public.processInputProc)(qe->event, qe->device, @@ -1279,17 +1208,27 @@ playmore: } } syncEvents.playingEvents = FALSE; - /* the following may have been skipped during replay, so do it now */ - if ((grab = inputInfo.pointer->grab) && grab->confineTo) + for (dev = inputInfo.devices; dev; dev = dev->next) { - if (grab->confineTo->drawable.pScreen != sprite->hotPhys.pScreen) - sprite->hotPhys.x = sprite->hotPhys.y = 0; - ConfineCursorToWindow(grab->confineTo, TRUE, TRUE); + if (MPHasCursor(dev)) + { + /* the following may have been skipped during replay, + so do it now */ + if ((grab = dev->grab) && grab->confineTo) + { + if (grab->confineTo->drawable.pScreen != + dev->pSprite->hotPhys.pScreen) + dev->pSprite->hotPhys.x = + dev->pSprite->hotPhys.y = 0; + ConfineCursorToWindow(dev, grab->confineTo, TRUE, TRUE); + } + else + ConfineCursorToWindow(dev, + WindowTable[dev->pSprite->hotPhys.pScreen->myNum], + TRUE, FALSE); + PostNewCursor(dev); + } } - else - ConfineCursorToWindow(WindowTable[sprite->hotPhys.pScreen->myNum], - TRUE, FALSE); - PostNewCursor(inputInfo.pointer); } #ifdef RANDR @@ -1297,16 +1236,23 @@ void ScreenRestructured (ScreenPtr pScreen) { GrabPtr grab; + DeviceIntPtr pDev; - if ((grab = inputInfo.pointer->grab) && grab->confineTo) + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if (grab->confineTo->drawable.pScreen != sprite->hotPhys.pScreen) - sprite->hotPhys.x = sprite->hotPhys.y = 0; - ConfineCursorToWindow(grab->confineTo, TRUE, TRUE); + + if ((grab = pDev->grab) && grab->confineTo) + { + if (grab->confineTo->drawable.pScreen + != pDev->pSprite->hotPhys.pScreen) + pDev->pSprite->hotPhys.x = pDev->pSprite->hotPhys.y = 0; + ConfineCursorToWindow(pDev, grab->confineTo, TRUE, TRUE); + } + else + ConfineCursorToWindow(pDev, + WindowTable[pDev->pSprite->hotPhys.pScreen->myNum], + TRUE, FALSE); } - else - ConfineCursorToWindow(WindowTable[sprite->hotPhys.pScreen->myNum], - TRUE, FALSE); } #endif @@ -1349,13 +1295,14 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab, TimeStamp time, Bool autoGrab) { WindowPtr oldWin = (mouse->grab) ? mouse->grab->window - : sprite->win; + : mouse->pSprite->win; if (grab->confineTo) { - if (grab->confineTo->drawable.pScreen != sprite->hotPhys.pScreen) - sprite->hotPhys.x = sprite->hotPhys.y = 0; - ConfineCursorToWindow(grab->confineTo, FALSE, TRUE); + if (grab->confineTo->drawable.pScreen + != mouse->pSprite->hotPhys.pScreen) + mouse->pSprite->hotPhys.x = mouse->pSprite->hotPhys.y = 0; + ConfineCursorToWindow(mouse, grab->confineTo, FALSE, TRUE); } DoEnterLeaveEvents(mouse, oldWin, grab->window, NotifyGrab); mouse->valuator->motionHintWindow = NullWindow; @@ -1387,10 +1334,11 @@ DeactivatePointerGrab(register DeviceIntPtr mouse) if (dev->sync.other == grab) dev->sync.other = NullGrab; } - DoEnterLeaveEvents(mouse, grab->window, sprite->win, NotifyUngrab); + DoEnterLeaveEvents(mouse, grab->window, + mouse->pSprite->win, NotifyUngrab); if (grab->confineTo) - ConfineCursorToWindow(ROOT, FALSE, FALSE); - PostNewCursor(inputInfo.pointer); + ConfineCursorToWindow(mouse, ROOT, FALSE, FALSE); + PostNewCursor(mouse); if (grab->cursor) FreeCursor(grab->cursor, (Cursor)0); ComputeFreezes(); @@ -1406,7 +1354,7 @@ ActivateKeyboardGrab(register DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, else if (keybd->focus) oldWin = keybd->focus->win; else - oldWin = sprite->win; + oldWin = keybd->pSprite->win; if (oldWin == FollowKeyboardWin) oldWin = inputInfo.keyboard->focus->win; if (keybd->valuator) @@ -1428,7 +1376,7 @@ DeactivateKeyboardGrab(register DeviceIntPtr keybd) register GrabPtr grab = keybd->grab; register DeviceIntPtr dev; register WindowPtr focusWin = keybd->focus ? keybd->focus->win - : sprite->win; + : keybd->pSprite->win; if (focusWin == FollowKeyboardWin) focusWin = inputInfo.keyboard->focus->win; @@ -1865,11 +1813,7 @@ FixUpEventFromWindow( Window child, Bool calcChild) { - SpritePtr pSprite = sprite; -#ifdef MPX - if (MPHasCursor(pDev)) - pSprite = &mpsprites[pDev->id]; -#endif + SpritePtr pSprite = pDev->pSprite; if (calcChild) { @@ -1931,10 +1875,9 @@ DeliverDeviceEvents(register WindowPtr pWin, register xEvent *xE, GrabPtr grab, { register OtherInputMasks *inputMasks; int mskidx = dev->id; -#ifdef MPX + if (IsMPXEvent(xE)) mskidx = MPXmskidx; -#endif inputMasks = wOtherInputMasks(pWin); if (inputMasks && !(filter & inputMasks->deliverableEvents[mskidx])) @@ -2029,17 +1972,19 @@ static Bool PointInBorderSize(WindowPtr pWin, int x, int y) { BoxRec box; + SpritePtr pSprite = inputInfo.pointer->pSprite; if(POINT_IN_REGION(pWin->drawable.pScreen, &pWin->borderSize, x, y, &box)) return TRUE; #ifdef PANORAMIX - if(!noPanoramiXExtension && XineramaSetWindowPntrs(pWin)) { + if(!noPanoramiXExtension && + XineramaSetWindowPntrs(inputInfo.pointer, pWin)) { int i; for(i = 1; i < PanoramiXNumScreens; i++) { - if(POINT_IN_REGION(sprite->screen, - &sprite->windows[i]->borderSize, + if(POINT_IN_REGION(pSprite->screen, + &pSprite->windows[i]->borderSize, x + panoramiXdataPtr[0].x - panoramiXdataPtr[i].x, y + panoramiXdataPtr[0].y - panoramiXdataPtr[i].y, &box)) @@ -2102,12 +2047,7 @@ static Bool CheckMotion(xEvent *xE, DeviceIntPtr pDev) { WindowPtr prevSpriteWin; - SpritePtr pSprite = sprite; - -#ifdef MPX - if (MPHasCursor(pDev)) - pSprite = &mpsprites[pDev->id]; -#endif + SpritePtr pSprite = pDev->pSprite; prevSpriteWin = pSprite->win; @@ -2184,7 +2124,6 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev) _X_EXPORT void WindowsRestructured() { -#ifdef MPX DeviceIntPtr pDev = inputInfo.devices; while(pDev) { @@ -2192,9 +2131,6 @@ WindowsRestructured() CheckMotion((xEvent *)NULL, pDev); pDev = pDev->next; } -#else - (void) CheckMotion((xEvent *)NULL, inputInfo.pointer); -#endif } #ifdef PANORAMIX @@ -2206,33 +2142,48 @@ WindowsRestructured() void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) { GrabPtr grab; + DeviceIntPtr pDev; + SpritePtr pSprite; if (noPanoramiXExtension) return; - - sprite->hot.x -= xoff; - sprite->hot.y -= yoff; - sprite->hotPhys.x -= xoff; - sprite->hotPhys.y -= yoff; + pDev = inputInfo.devices; + while(pDev) + { + if (MPHasCursor(pDev)) + { + pSprite = pDev->pSprite; + pSprite->hot.x -= xoff; + pSprite->hot.y -= yoff; - sprite->hotLimits.x1 -= xoff; - sprite->hotLimits.y1 -= yoff; - sprite->hotLimits.x2 -= xoff; - sprite->hotLimits.y2 -= yoff; + pSprite->hotPhys.x -= xoff; + pSprite->hotPhys.y -= yoff; - if (REGION_NOTEMPTY(sprite->screen, &sprite->Reg1)) - REGION_TRANSLATE(sprite->screen, &sprite->Reg1, xoff, yoff); - if (REGION_NOTEMPTY(sprite->screen, &sprite->Reg2)) - REGION_TRANSLATE(sprite->screen, &sprite->Reg2, xoff, yoff); + pSprite->hotLimits.x1 -= xoff; + pSprite->hotLimits.y1 -= yoff; + pSprite->hotLimits.x2 -= xoff; + pSprite->hotLimits.y2 -= yoff; - /* FIXME: if we call ConfineCursorToWindow, must we do anything else? */ - if ((grab = inputInfo.pointer->grab) && grab->confineTo) { - if (grab->confineTo->drawable.pScreen != sprite->hotPhys.pScreen) - sprite->hotPhys.x = sprite->hotPhys.y = 0; - ConfineCursorToWindow(grab->confineTo, TRUE, TRUE); - } else - ConfineCursorToWindow(WindowTable[sprite->hotPhys.pScreen->myNum], - TRUE, FALSE); + if (REGION_NOTEMPTY(pSprite->screen, &pSprite->Reg1)) + REGION_TRANSLATE(pSprite->screen, &pSprite->Reg1, xoff, yoff); + if (REGION_NOTEMPTY(pSprite->screen, &pSprite->Reg2)) + REGION_TRANSLATE(pSprite->screen, &pSprite->Reg2, xoff, yoff); + + /* FIXME: if we call ConfineCursorToWindow, must we do anything else? */ + if ((grab = inputInfo.pointer->grab) && grab->confineTo) { + if (grab->confineTo->drawable.pScreen + != pSprite->hotPhys.pScreen) + pSprite->hotPhys.x = pSprite->hotPhys.y = 0; + ConfineCursorToWindow(pDev, grab->confineTo, TRUE, TRUE); + } else + ConfineCursorToWindow( + pDev, + WindowTable[pSprite->hotPhys.pScreen->myNum], + TRUE, FALSE); + + } + pDev = pDev->next; + } } #endif @@ -2240,75 +2191,60 @@ void DefineInitialRootWindow(register WindowPtr win) { register ScreenPtr pScreen = win->drawable.pScreen; - SpritePtr pSprite = sprite; - DeviceIntPtr pDev = inputInfo.pointer; -#ifdef MPX - int mpSpriteIdx = 0; + SpritePtr pSprite; + DeviceIntPtr pDev = inputInfo.devices; - while (mpSpriteIdx < MAX_DEVICES) + while (pDev) { - pSprite = &mpsprites[mpSpriteIdx]; -#endif - - pSprite->hotPhys.pScreen = pScreen; - pSprite->hotPhys.x = pScreen->width / 2; - pSprite->hotPhys.y = pScreen->height / 2; - pSprite->hot = pSprite->hotPhys; - pSprite->hotLimits.x2 = pScreen->width; - pSprite->hotLimits.y2 = pScreen->height; -#ifdef XEVIE - xeviewin = -#endif - pSprite->win = win; - pSprite->current = wCursor (win); - pSprite->current->refcnt++; - spriteTraceGood = 1; - ROOT = win; - (*pScreen->CursorLimits) ( pDev, pScreen, pSprite->current, - &pSprite->hotLimits, &pSprite->physLimits); - pSprite->confined = FALSE; - -#ifdef MPX - /* this is ugly */ - pDev = inputInfo.devices; - while(pDev) + if (MPHasCursor(pDev)) { - if (pDev->id == mpSpriteIdx && MPHasCursor(pDev)) - { -#endif - (*pScreen->ConstrainCursor) (pDev, pScreen, - &pSprite->physLimits); - (*pScreen->SetCursorPosition) (pDev, pScreen, pSprite->hot.x, - pSprite->hot.y, - FALSE); - (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current); -#ifdef MPX - } - pDev = pDev->next; - } + pSprite = pDev->pSprite; + + pSprite->hotPhys.pScreen = pScreen; + pSprite->hotPhys.x = pScreen->width / 2; + pSprite->hotPhys.y = pScreen->height / 2; + pSprite->hot = pSprite->hotPhys; + pSprite->hotLimits.x2 = pScreen->width; + pSprite->hotLimits.y2 = pScreen->height; +#ifdef XEVIE + xeviewin = #endif + pSprite->win = win; + pSprite->current = wCursor (win); + pSprite->current->refcnt++; + spriteTraceGood = 1; + ROOT = win; + (*pScreen->CursorLimits) ( pDev, pScreen, pSprite->current, + &pSprite->hotLimits, &pSprite->physLimits); + pSprite->confined = FALSE; + + (*pScreen->ConstrainCursor) (pDev, pScreen, + &pSprite->physLimits); + (*pScreen->SetCursorPosition) (pDev, pScreen, pSprite->hot.x, + pSprite->hot.y, + FALSE); + (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current); #ifdef PANORAMIX - if(!noPanoramiXExtension) { - pSprite->hotLimits.x1 = -panoramiXdataPtr[0].x; - pSprite->hotLimits.y1 = -panoramiXdataPtr[0].y; - pSprite->hotLimits.x2 = PanoramiXPixWidth - panoramiXdataPtr[0].x; - pSprite->hotLimits.y2 = PanoramiXPixHeight - panoramiXdataPtr[0].y; - pSprite->physLimits = pSprite->hotLimits; - pSprite->confineWin = NullWindow; + if(!noPanoramiXExtension) { + pSprite->hotLimits.x1 = -panoramiXdataPtr[0].x; + pSprite->hotLimits.y1 = -panoramiXdataPtr[0].y; + pSprite->hotLimits.x2 = PanoramiXPixWidth - panoramiXdataPtr[0].x; + pSprite->hotLimits.y2 = PanoramiXPixHeight - panoramiXdataPtr[0].y; + pSprite->physLimits = pSprite->hotLimits; + pSprite->confineWin = NullWindow; #ifdef SHAPE - pSprite->hotShape = NullRegion; + pSprite->hotShape = NullRegion; +#endif + pSprite->screen = pScreen; + /* gotta UNINIT these someplace */ + REGION_NULL(pScreen, &pSprite->Reg1); + REGION_NULL(pScreen, &pSprite->Reg2); + } #endif - pSprite->screen = pScreen; - /* gotta UNINIT these someplace */ - REGION_NULL(pScreen, &pSprite->Reg1); - REGION_NULL(pScreen, &pSprite->Reg2); } -#endif -#ifdef MPX - mpSpriteIdx++; + pDev = pDev->next; } -#endif } /* @@ -2327,11 +2263,7 @@ WindowHasNewCursor(WindowPtr pWin) _X_EXPORT void NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y) { - SpritePtr pSprite = sprite; -#ifdef MPX - if (MPHasCursor(pDev)) - pSprite = &mpsprites[pDev->id]; -#endif + SpritePtr pSprite = pDev->pSprite; pSprite->hotPhys.x = x; pSprite->hotPhys.y = y; @@ -2345,9 +2277,10 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y) pSprite->screen = newScreen; /* Make sure we tell the DDX to update its copy of the screen */ if(pSprite->confineWin) - XineramaConfineCursorToWindow(pSprite->confineWin, TRUE); + XineramaConfineCursorToWindow(pDev, + pSprite->confineWin, TRUE); else - XineramaConfineCursorToWindow(WindowTable[0], TRUE); + XineramaConfineCursorToWindow(pDev, WindowTable[0], TRUE); /* if the pointer wasn't confined, the DDX won't get told of the pointer warp so we reposition it here */ if(!syncEvents.playingEvents) @@ -2362,7 +2295,8 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y) } else #endif if (newScreen != pSprite->hotPhys.pScreen) - ConfineCursorToWindow(WindowTable[newScreen->myNum], TRUE, FALSE); + ConfineCursorToWindow(pDev, WindowTable[newScreen->myNum], + TRUE, FALSE); } #ifdef PANORAMIX @@ -2383,13 +2317,13 @@ XineramaPointInWindowIsVisible( if (POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box)) return TRUE; - if(!XineramaSetWindowPntrs(pWin)) return FALSE; + if(!XineramaSetWindowPntrs(inputInfo.pointer, pWin)) return FALSE; xoff = x + panoramiXdataPtr[0].x; yoff = y + panoramiXdataPtr[0].y; for(i = 1; i < PanoramiXNumScreens; i++) { - pWin = sprite->windows[i]; + pWin = inputInfo.pointer->pSprite->windows[i]; pScreen = pWin->drawable.pScreen; x = xoff - panoramiXdataPtr[i].x; y = yoff - panoramiXdataPtr[i].y; @@ -2412,6 +2346,7 @@ XineramaWarpPointer(ClientPtr client) { WindowPtr dest = NULL; int x, y; + SpritePtr pSprite = inputInfo.pointer->pSprite; REQUEST(xWarpPointerReq); @@ -2422,8 +2357,8 @@ XineramaWarpPointer(ClientPtr client) if (!dest) return BadWindow; } - x = sprite->hotPhys.x; - y = sprite->hotPhys.y; + x = pSprite->hotPhys.x; + y = pSprite->hotPhys.y; if (stuff->srcWid != None) { @@ -2461,16 +2396,16 @@ XineramaWarpPointer(ClientPtr client) x += stuff->dstX; y += stuff->dstY; - if (x < sprite->physLimits.x1) - x = sprite->physLimits.x1; - else if (x >= sprite->physLimits.x2) - x = sprite->physLimits.x2 - 1; - if (y < sprite->physLimits.y1) - y = sprite->physLimits.y1; - else if (y >= sprite->physLimits.y2) - y = sprite->physLimits.y2 - 1; - if (sprite->hotShape) - ConfineToShape(inputInfo.pointer, sprite->hotShape, &x, &y); + if (x < pSprite->physLimits.x1) + x = pSprite->physLimits.x1; + else if (x >= pSprite->physLimits.x2) + x = pSprite->physLimits.x2 - 1; + if (y < pSprite->physLimits.y1) + y = pSprite->physLimits.y1; + else if (y >= pSprite->physLimits.y2) + y = pSprite->physLimits.y2 - 1; + if (pSprite->hotShape) + ConfineToShape(inputInfo.pointer, pSprite->hotShape, &x, &y); XineramaSetCursorPosition(inputInfo.pointer, x, y, TRUE); @@ -2486,6 +2421,7 @@ ProcWarpPointer(ClientPtr client) WindowPtr dest = NULL; int x, y; ScreenPtr newScreen; + SpritePtr pSprite = inputInfo.pointer->pSprite; REQUEST(xWarpPointerReq); @@ -2502,8 +2438,8 @@ ProcWarpPointer(ClientPtr client) if (!dest) return BadWindow; } - x = sprite->hotPhys.x; - y = sprite->hotPhys.y; + x = pSprite->hotPhys.x; + y = pSprite->hotPhys.y; if (stuff->srcWid != None) { @@ -2516,7 +2452,7 @@ ProcWarpPointer(ClientPtr client) winX = source->drawable.x; winY = source->drawable.y; - if (source->drawable.pScreen != sprite->hotPhys.pScreen || + if (source->drawable.pScreen != pSprite->hotPhys.pScreen || x < winX + stuff->srcX || y < winY + stuff->srcY || (stuff->srcWidth != 0 && @@ -2532,7 +2468,7 @@ ProcWarpPointer(ClientPtr client) y = dest->drawable.y; newScreen = dest->drawable.pScreen; } else - newScreen = sprite->hotPhys.pScreen; + newScreen = pSprite->hotPhys.pScreen; x += stuff->dstX; y += stuff->dstY; @@ -2546,19 +2482,19 @@ ProcWarpPointer(ClientPtr client) else if (y >= newScreen->height) y = newScreen->height - 1; - if (newScreen == sprite->hotPhys.pScreen) + if (newScreen == pSprite->hotPhys.pScreen) { - if (x < sprite->physLimits.x1) - x = sprite->physLimits.x1; - else if (x >= sprite->physLimits.x2) - x = sprite->physLimits.x2 - 1; - if (y < sprite->physLimits.y1) - y = sprite->physLimits.y1; - else if (y >= sprite->physLimits.y2) - y = sprite->physLimits.y2 - 1; + if (x < pSprite->physLimits.x1) + x = pSprite->physLimits.x1; + else if (x >= pSprite->physLimits.x2) + x = pSprite->physLimits.x2 - 1; + if (y < pSprite->physLimits.y1) + y = pSprite->physLimits.y1; + else if (y >= pSprite->physLimits.y2) + y = pSprite->physLimits.y2 - 1; #if defined(SHAPE) - if (sprite->hotShape) - ConfineToShape(inputInfo.pointer, sprite->hotShape, &x, &y); + if (pSprite->hotShape) + ConfineToShape(inputInfo.pointer, pSprite->hotShape, &x, &y); #endif (*newScreen->SetCursorPosition)(inputInfo.pointer, newScreen, x, y, TRUE); @@ -2571,17 +2507,18 @@ ProcWarpPointer(ClientPtr client) } static Bool -BorderSizeNotEmpty(WindowPtr pWin) +BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin) { - if(REGION_NOTEMPTY(sprite->hotPhys.pScreen, &pWin->borderSize)) + if(REGION_NOTEMPTY(pDev->pSprite->hotPhys.pScreen, &pWin->borderSize)) return TRUE; #ifdef PANORAMIX - if(!noPanoramiXExtension && XineramaSetWindowPntrs(pWin)) { + if(!noPanoramiXExtension && XineramaSetWindowPntrs(pDev, pWin)) { int i; for(i = 1; i < PanoramiXNumScreens; i++) { - if(REGION_NOTEMPTY(sprite->screen, &sprite->windows[i]->borderSize)) + if(REGION_NOTEMPTY(pDev->pSprite->screen, + &pDev->pSprite->windows[i]->borderSize)) return TRUE; } } @@ -2643,7 +2580,7 @@ CheckPassiveGrabsOnWindow( if (GrabMatchesSecond(&tempGrab, grab) && (!grab->confineTo || (grab->confineTo->realized && - BorderSizeNotEmpty(grab->confineTo)))) + BorderSizeNotEmpty(device, grab->confineTo)))) { if (!XaceHook(XACE_DEVICE_ACCESS, wClient(pWin), device, FALSE)) return FALSE; @@ -2776,6 +2713,7 @@ DeliverGrabbedEvent(register xEvent *xE, register DeviceIntPtr thisDev, int deliveries = 0; register DeviceIntPtr dev; register xEvent *dxE; + SpritePtr pSprite = thisDev->pSprite; if (grab->ownerEvents) { @@ -2790,10 +2728,11 @@ DeliverGrabbedEvent(register xEvent *xE, register DeviceIntPtr thisDev, else focus = PointerRootWin; if (focus == PointerRootWin) - deliveries = DeliverDeviceEvents(sprite->win, xE, grab, NullWindow, - thisDev, count); - else if (focus && (focus == sprite->win || IsParent(focus, sprite->win))) - deliveries = DeliverDeviceEvents(sprite->win, xE, grab, focus, + deliveries = DeliverDeviceEvents(pSprite->win, xE, grab, + NullWindow, thisDev, count); + else if (focus && (focus == pSprite->win || + IsParent(focus, pSprite->win))) + deliveries = DeliverDeviceEvents(pSprite->win, xE, grab, focus, thisDev, count); else if (focus) deliveries = DeliverDeviceEvents(focus, xE, grab, focus, @@ -2926,8 +2865,8 @@ drawable.id:0; ))) #endif XE_KBPTR.state = (keyc->state | inputInfo.pointer->button->state); - XE_KBPTR.rootX = sprite->hot.x; - XE_KBPTR.rootY = sprite->hot.y; + XE_KBPTR.rootX = keybd->pSprite->hot.x; + XE_KBPTR.rootY = keybd->pSprite->hot.y; key = xE->u.u.detail; kptr = &keyc->down[key >> 3]; bit = 1 << (key & 7); @@ -3003,7 +2942,7 @@ drawable.id:0; if (grab) DeliverGrabbedEvent(xE, keybd, deactivateGrab, count); else - DeliverFocusedEvent(keybd, xE, sprite->win, count); + DeliverFocusedEvent(keybd, xE, keybd->pSprite->win, count); if (deactivateGrab) (*keybd->DeactivateGrab)(keybd); @@ -3055,12 +2994,8 @@ ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count register GrabPtr grab = mouse->grab; Bool deactivateGrab = FALSE; register ButtonClassPtr butc = mouse->button; - SpritePtr pSprite = sprite; + SpritePtr pSprite = mouse->pSprite; -#ifdef MPX - if (MPHasCursor(mouse)) - pSprite = &mpsprites[mouse->id]; -#endif #ifdef XKB XkbSrvInfoPtr xkbi= inputInfo.keyboard->key->xkbInfo; @@ -3407,8 +3342,8 @@ EnterLeaveEvent( event.u.u.type = type; event.u.u.detail = detail; event.u.enterLeave.time = currentTime.milliseconds; - event.u.enterLeave.rootX = sprite->hot.x; - event.u.enterLeave.rootY = sprite->hot.y; + event.u.enterLeave.rootX = pDev->pSprite->hot.x; + event.u.enterLeave.rootY = pDev->pSprite->hot.y; /* Counts on the same initial structure of crossing & button events! */ FixUpEventFromWindow(mouse, &event, pWin, None, FALSE); /* Enter/Leave events always set child */ @@ -3611,6 +3546,7 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) int out, in; /* for holding details for to/from PointerRoot/None */ int i; + SpritePtr pSprite = dev->pSprite; if (fromWin == toWin) return; @@ -3623,8 +3559,8 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) if ((fromWin == NullWindow) || (fromWin == PointerRootWin)) { if (fromWin == PointerRootWin) - FocusOutEvents(dev, sprite->win, ROOT, mode, NotifyPointer, - TRUE); + FocusOutEvents(dev, pSprite->win, ROOT, mode, + NotifyPointer, TRUE); /* Notify all the roots */ #ifdef PANORAMIX if ( !noPanoramiXExtension ) @@ -3636,8 +3572,8 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) } else { - if (IsParent(fromWin, sprite->win)) - FocusOutEvents(dev, sprite->win, fromWin, mode, NotifyPointer, + if (IsParent(fromWin, pSprite->win)) + FocusOutEvents(dev, pSprite->win, fromWin, mode, NotifyPointer, FALSE); FocusEvent(dev, FocusOut, mode, NotifyNonlinear, fromWin); /* next call catches the root too, if the screen changed */ @@ -3653,7 +3589,7 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) for (i=0; iwin, NullWindow, mode, + (void)FocusInEvents(dev, ROOT, pSprite->win, NullWindow, mode, NotifyPointer, TRUE); } else @@ -3661,7 +3597,7 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) if ((fromWin == NullWindow) || (fromWin == PointerRootWin)) { if (fromWin == PointerRootWin) - FocusOutEvents(dev, sprite->win, ROOT, mode, NotifyPointer, + FocusOutEvents(dev, pSprite->win, ROOT, mode, NotifyPointer, TRUE); #ifdef PANORAMIX if ( !noPanoramiXExtension ) @@ -3674,8 +3610,8 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) (void)FocusInEvents(dev, ROOT, toWin, toWin, mode, NotifyNonlinearVirtual, TRUE); FocusEvent(dev, FocusIn, mode, NotifyNonlinear, toWin); - if (IsParent(toWin, sprite->win)) - (void)FocusInEvents(dev, toWin, sprite->win, NullWindow, mode, + if (IsParent(toWin, pSprite->win)) + (void)FocusInEvents(dev, toWin, pSprite->win, NullWindow, mode, NotifyPointer, FALSE); } else @@ -3686,21 +3622,21 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) FocusOutEvents(dev, fromWin->parent, toWin, mode, NotifyVirtual, FALSE); FocusEvent(dev, FocusIn, mode, NotifyInferior, toWin); - if ((IsParent(toWin, sprite->win)) && - (sprite->win != fromWin) && - (!IsParent(fromWin, sprite->win)) && - (!IsParent(sprite->win, fromWin))) - (void)FocusInEvents(dev, toWin, sprite->win, NullWindow, + if ((IsParent(toWin, pSprite->win)) && + (pSprite->win != fromWin) && + (!IsParent(fromWin, pSprite->win)) && + (!IsParent(pSprite->win, fromWin))) + (void)FocusInEvents(dev, toWin, pSprite->win, NullWindow, mode, NotifyPointer, FALSE); } else if (IsParent(fromWin, toWin)) { - if ((IsParent(fromWin, sprite->win)) && - (sprite->win != fromWin) && - (!IsParent(toWin, sprite->win)) && - (!IsParent(sprite->win, toWin))) - FocusOutEvents(dev, sprite->win, fromWin, mode, + if ((IsParent(fromWin, pSprite->win)) && + (pSprite->win != fromWin) && + (!IsParent(toWin, pSprite->win)) && + (!IsParent(pSprite->win, toWin))) + FocusOutEvents(dev, pSprite->win, fromWin, mode, NotifyPointer, FALSE); FocusEvent(dev, FocusOut, mode, NotifyInferior, fromWin); (void)FocusInEvents(dev, fromWin, toWin, toWin, mode, @@ -3712,8 +3648,8 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) /* neither fromWin or toWin is child of other */ WindowPtr common = CommonAncestor(toWin, fromWin); /* common == NullWindow ==> different screens */ - if (IsParent(fromWin, sprite->win)) - FocusOutEvents(dev, sprite->win, fromWin, mode, + if (IsParent(fromWin, pSprite->win)) + FocusOutEvents(dev, pSprite->win, fromWin, mode, NotifyPointer, FALSE); FocusEvent(dev, FocusOut, mode, NotifyNonlinear, fromWin); if (fromWin->parent != NullWindow) @@ -3723,8 +3659,8 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) (void)FocusInEvents(dev, common, toWin, toWin, mode, NotifyNonlinearVirtual, FALSE); FocusEvent(dev, FocusIn, mode, NotifyNonlinear, toWin); - if (IsParent(toWin, sprite->win)) - (void)FocusInEvents(dev, toWin, sprite->win, NullWindow, + if (IsParent(toWin, pSprite->win)) + (void)FocusInEvents(dev, toWin, pSprite->win, NullWindow, mode, NotifyPointer, FALSE); } } @@ -3914,7 +3850,8 @@ ProcGrabPointer(ClientPtr client) rep.status = AlreadyGrabbed; else if ((!pWin->realized) || (confineTo && - !(confineTo->realized && BorderSizeNotEmpty(confineTo)))) + !(confineTo->realized + && BorderSizeNotEmpty(device, confineTo)))) rep.status = GrabNotViewable; else if (device->sync.frozen && device->sync.other && !SameClient(device->sync.other, client)) @@ -3930,7 +3867,7 @@ ProcGrabPointer(ClientPtr client) if (grab) { if (grab->confineTo && !confineTo) - ConfineCursorToWindow(ROOT, FALSE, FALSE); + ConfineCursorToWindow(device, ROOT, FALSE, FALSE); oldCursor = grab->cursor; } tempGrab.cursor = cursor; @@ -4127,6 +4064,7 @@ ProcQueryPointer(ClientPtr client) WindowPtr pWin, t; REQUEST(xResourceReq); DeviceIntPtr mouse = inputInfo.pointer; + SpritePtr pSprite = mouse->pSprite; REQUEST_SIZE_MATCH(xResourceReq); pWin = SecurityLookupWindow(stuff->id, client, SecurityReadAccess); @@ -4139,15 +4077,15 @@ ProcQueryPointer(ClientPtr client) rep.mask = mouse->button->state | inputInfo.keyboard->key->state; rep.length = 0; rep.root = (ROOT)->drawable.id; - rep.rootX = sprite->hot.x; - rep.rootY = sprite->hot.y; + rep.rootX = pSprite->hot.x; + rep.rootY = pSprite->hot.y; rep.child = None; - if (sprite->hot.pScreen == pWin->drawable.pScreen) + if (pSprite->hot.pScreen == pWin->drawable.pScreen) { rep.sameScreen = xTrue; - rep.winX = sprite->hot.x - pWin->drawable.x; - rep.winY = sprite->hot.y - pWin->drawable.y; - for (t = sprite->win; t; t = t->parent) + rep.winX = pSprite->hot.x - pWin->drawable.x; + rep.winY = pSprite->hot.y - pWin->drawable.y; + for (t = pSprite->win; t; t = t->parent) if (t->parent == pWin) { rep.child = t->drawable.id; @@ -4182,19 +4120,6 @@ InitEvents() { int i; - sprite = (SpritePtr)xalloc(sizeof(SpriteRec)); - if (!sprite) - FatalError("failed to allocate sprite struct"); - -#ifdef MPX - mpsprites = (SpritePtr)xalloc(MAX_DEVICES * sizeof(SpriteRec)); - if (!mpsprites) - FatalError("failed to allocate MPX sprite structs"); - xfree(sprite); - sprite = &mpsprites[1]; -#endif - - sprite->hot.pScreen = sprite->hotPhys.pScreen = (ScreenPtr)NULL; inputInfo.numDevices = 0; inputInfo.devices = (DeviceIntPtr)NULL; inputInfo.off_devices = (DeviceIntPtr)NULL; @@ -4211,34 +4136,7 @@ InitEvents() lastEventMask = OwnerGrabButtonMask; filters[MotionNotify] = PointerMotionMask; #ifdef XEVIE - xeviewin = -#endif - sprite->win = NullWindow; - sprite->current = NullCursor; - sprite->hotLimits.x1 = 0; - sprite->hotLimits.y1 = 0; - sprite->hotLimits.x2 = 0; - sprite->hotLimits.y2 = 0; - sprite->confined = FALSE; - -#ifdef MPX - { - int mpSpriteIdx = 0; - while(mpSpriteIdx < MAX_DEVICES) - { - SpritePtr pSprite = &mpsprites[mpSpriteIdx]; - pSprite->hot.pScreen = pSprite->hotPhys.pScreen = (ScreenPtr)NULL; - pSprite->win = NullWindow; - pSprite->current = NullCursor; - pSprite->hotLimits.x1 = 0; - pSprite->hotLimits.y1 = 0; - pSprite->hotLimits.x2 = 0; - pSprite->hotLimits.y2 = 0; - pSprite->confined = FALSE; - - mpSpriteIdx++; - } - } + xeviewin = NULL; #endif syncEvents.replayDev = (DeviceIntPtr)NULL; @@ -4263,19 +4161,41 @@ InitEvents() } } + +/** + * Initialize a sprite structure for the given device. If hasCursor is False, + * let the device use the core pointer's sprite structure. + */ +void +InitSprite(DeviceIntPtr pDev, Bool hasCursor) +{ + if (hasCursor) + { + SpritePtr pSprite = (SpritePtr)xalloc(sizeof(SpriteRec)); + if (!pSprite) + FatalError("failed to allocate sprite struct"); + pSprite->hot.pScreen = pSprite->hotPhys.pScreen = (ScreenPtr)NULL; + pSprite->win = NullWindow; + pSprite->current = NullCursor; + pSprite->hotLimits.x1 = 0; + pSprite->hotLimits.y1 = 0; + pSprite->hotLimits.x2 = 0; + pSprite->hotLimits.y2 = 0; + pSprite->confined = FALSE; + + pDev->pSprite = pSprite; + } else + { + pDev->pSprite = inputInfo.pointer->pSprite; + } +} + void CloseDownEvents(void) { xfree(spriteTrace); spriteTrace = NULL; spriteTraceSize = 0; - -#ifdef MPX - /* sprite points to mpsprites[1] in MPX, don't free it separately */ - xfree(mpsprites); -#else - xfree(sprite); -#endif } int @@ -4283,6 +4203,7 @@ ProcSendEvent(ClientPtr client) { WindowPtr pWin; WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */ + SpritePtr pSprite = inputInfo.pointer->pSprite; REQUEST(xSendEventReq); REQUEST_SIZE_MATCH(xSendEventReq); @@ -4313,7 +4234,7 @@ ProcSendEvent(ClientPtr client) } if (stuff->destination == PointerWindow) - pWin = sprite->win; + pWin = pSprite->win; else if (stuff->destination == InputFocus) { WindowPtr inputFocus = inputInfo.keyboard->focus->win; @@ -4326,10 +4247,10 @@ ProcSendEvent(ClientPtr client) if (inputFocus == PointerRootWin) inputFocus = ROOT; - if (IsParent(inputFocus, sprite->win)) + if (IsParent(inputFocus, pSprite->win)) { effectiveFocus = inputFocus; - pWin = sprite->win; + pWin = pSprite->win; } else effectiveFocus = pWin = inputFocus; @@ -4658,19 +4579,24 @@ DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) _X_EXPORT void CheckCursorConfinement(WindowPtr pWin) { - GrabPtr grab = inputInfo.pointer->grab; + GrabPtr grab; WindowPtr confineTo; + DeviceIntPtr pDev; #ifdef PANORAMIX if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum) return; #endif - if (grab && (confineTo = grab->confineTo)) + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if (!BorderSizeNotEmpty(confineTo)) - (*inputInfo.pointer->DeactivateGrab)(inputInfo.pointer); - else if ((pWin == confineTo) || IsParent(pWin, confineTo)) - ConfineCursorToWindow(confineTo, TRUE, TRUE); + grab = pDev->grab; + if (grab && (confineTo = grab->confineTo)) + { + if (!BorderSizeNotEmpty(pDev, confineTo)) + (*inputInfo.pointer->DeactivateGrab)(pDev); + else if ((pWin == confineTo) || IsParent(pWin, confineTo)) + ConfineCursorToWindow(pDev, confineTo, TRUE, TRUE); + } } } @@ -4696,6 +4622,7 @@ ProcRecolorCursor(ClientPtr client) int nscr; ScreenPtr pscr; Bool displayed; + SpritePtr pSprite = inputInfo.pointer->pSprite; REQUEST(xRecolorCursorReq); REQUEST_SIZE_MATCH(xRecolorCursorReq); @@ -4720,12 +4647,12 @@ ProcRecolorCursor(ClientPtr client) pscr = screenInfo.screens[nscr]; #ifdef PANORAMIX if(!noPanoramiXExtension) - displayed = (pscr == sprite->screen); + displayed = (pscr == pSprite->screen); else #endif - displayed = (pscr == sprite->hotPhys.pScreen); + displayed = (pscr == pSprite->hotPhys.pScreen); ( *pscr->RecolorCursor)(inputInfo.pointer, pscr, pCursor, - (pCursor == sprite->current) && displayed); + (pCursor == pSprite->current) && displayed); } return (Success); } diff --git a/dix/getevents.c b/dix/getevents.c index 0932a1a23..f223f2918 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -488,11 +488,6 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type, * The DDX is responsible for allocating the event structure in the first * place via GetMaximumEventsNum(), and for freeing it. */ -#ifdef MPX - /* In MPX, flags can be set to POINTER_MULTIPOINTER to indicate that the - * device is a multipointer device. MP devices always send core events. - */ -#endif _X_EXPORT int GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, int flags, int first_valuator, int num_valuators, @@ -543,7 +538,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, kbp->deviceid = pDev->id; #ifdef MPX - if (flags & POINTER_MULTIPOINTER) + if (pDev->isMPDev) pointer = pDev; else #endif @@ -604,7 +599,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); #ifdef MPX - if (flags & POINTER_MULTIPOINTER) + if (pDev->isMPDev) { // noop, just less intrusive to fit MPX in like that } else @@ -800,7 +795,11 @@ SwitchCorePointer(DeviceIntPtr pDev) * to shift the pointer to get it inside the new bounds. */ void -PostSyntheticMotion(int x, int y, ScreenPtr pScreen, unsigned long time) +PostSyntheticMotion(DeviceIntPtr pDev, + int x, + int y, + ScreenPtr pScreen, + unsigned long time) { xEvent xE; @@ -820,5 +819,5 @@ PostSyntheticMotion(int x, int y, ScreenPtr pScreen, unsigned long time) xE.u.keyButtonPointer.rootY = y; xE.u.keyButtonPointer.time = time; - (*inputInfo.pointer->public.processInputProc)(&xE, inputInfo.pointer, 1); + (*pDev->public.processInputProc)(&xE, pDev, 1); } diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 2cb1441db..422d43d4d 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -47,7 +47,6 @@ */ /* $XConsortium: xf86Xinput.c /main/14 1996/10/27 11:05:25 kaleb $ */ -#ifdef MPX /* * MPX additions: * Copyright © 2006 Peter Hutterer @@ -55,7 +54,6 @@ * Author: Peter Hutterer * */ -#endif #ifdef HAVE_XORG_CONFIG_H @@ -144,12 +142,10 @@ xf86ProcessCommonOptions(LocalDevicePtr local, xf86Msg(X_CONFIG, "%s: always reports core events\n", local->name); } -#ifdef MPX if (xf86SetBoolOption(list, "IsMPDevice", 0)) { local->flags |= XI86_MP_DEVICE; xf86Msg(X_CONFIG, "%s: is MP device\n", local->name); } -#endif if (xf86SetBoolOption(list, "SendDragEvents", 1)) { local->flags |= XI86_SEND_DRAG_EVENTS; @@ -214,12 +210,9 @@ xf86ActivateDevice(LocalDevicePtr local) xf86XinputFinalizeInit(dev); dev->coreEvents = local->flags & XI86_ALWAYS_CORE; -#ifdef MPX - if (local->flags & XI86_MP_DEVICE) - dev->isMPDev = TRUE; - else - dev->isMPDev = FALSE; -#endif + dev->isMPDev = (local->flags & XI86_MP_DEVICE); + InitSprite(dev, dev->isMPDev); + RegisterOtherDevice(dev); if (serverGeneration == 1) @@ -466,11 +459,6 @@ xf86PostMotionEvent(DeviceIntPtr device, else flags = POINTER_RELATIVE | POINTER_ACCELERATE; -#ifdef MPX - if (device->isMPDev) - flags |= POINTER_MULTIPOINTER; -#endif - valuators = xcalloc(sizeof(int), num_valuators); va_start(var, num_valuators); @@ -543,11 +531,6 @@ xf86PostButtonEvent(DeviceIntPtr device, else flags = POINTER_RELATIVE; -#ifdef MPX - if (device->isMPDev) - flags |= POINTER_MULTIPOINTER; -#endif - valuators = xcalloc(sizeof(int), num_valuators); va_start(var, num_valuators); diff --git a/hw/xnest/Events.c b/hw/xnest/Events.c index a20924128..8f794edcc 100644 --- a/hw/xnest/Events.c +++ b/hw/xnest/Events.c @@ -25,6 +25,7 @@ is" without express or implied warranty. #include "scrnintstr.h" #include "windowstr.h" #include "servermd.h" +#include "inputstr.h" #include "mi.h" @@ -183,7 +184,7 @@ xnestCollectEvents() if (X.xcrossing.detail != NotifyInferior) { pScreen = xnestScreen(X.xcrossing.window); if (pScreen) { - NewCurrentScreen(pScreen, X.xcrossing.x, X.xcrossing.y); + NewCurrentScreen(inputInfo.pointer, pScreen, X.xcrossing.x, X.xcrossing.y); valuators[0] = X.xcrossing.x; valuators[1] = X.xcrossing.y; lastEventTime = GetTimeInMillis(); diff --git a/include/cursor.h b/include/cursor.h index 7aacf23f5..e51394cb5 100644 --- a/include/cursor.h +++ b/include/cursor.h @@ -144,7 +144,7 @@ extern void GetSpritePosition( int * /*py*/); #ifdef PANORAMIX -extern int XineramaGetCursorScreen(void); +extern int XineramaGetCursorScreen(struct _DeviceIntRec* pDev); #endif /* PANORAMIX */ #endif /* CURSOR_H */ diff --git a/include/dix.h b/include/dix.h index 6f2e43ae5..959d5dc45 100644 --- a/include/dix.h +++ b/include/dix.h @@ -649,6 +649,10 @@ extern int GrabDevice( CARD8 * /* status */); extern void InitEvents(void); +extern void InitSprite( + DeviceIntPtr /* pDev */, + Bool /* hasCursor */ + ); extern void CloseDownEvents(void); diff --git a/include/dixevents.h b/include/dixevents.h index c78fb0e85..821a7bf51 100644 --- a/include/dixevents.h +++ b/include/dixevents.h @@ -28,7 +28,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. extern void SetCriticalEvent(int /* event */); -extern CursorPtr GetSpriteCursor(void); +extern CursorPtr GetSpriteCursor(DeviceIntPtr /*pDev*/); extern int ProcAllowEvents(ClientPtr /* client */); @@ -103,7 +103,11 @@ extern int ProcUngrabButton(ClientPtr /* client */); extern int ProcRecolorCursor(ClientPtr /* client */); #ifdef PANORAMIX -extern void PostSyntheticMotion(int x, int y, ScreenPtr pScreen, unsigned long time); +extern void PostSyntheticMotion(DeviceIntPtr pDev, + int x, + int y, + ScreenPtr pScreen, + unsigned long time); #endif #endif /* DIXEVENTS_H */ diff --git a/include/input.h b/include/input.h index 73da42fcf..357ba58c3 100644 --- a/include/input.h +++ b/include/input.h @@ -62,9 +62,6 @@ SOFTWARE. #define POINTER_RELATIVE (1 << 1) #define POINTER_ABSOLUTE (1 << 2) #define POINTER_ACCELERATE (1 << 3) -#ifdef MPX -#define POINTER_MULTIPOINTER (1 << 4) -#endif #define MAP_LENGTH 256 #define DOWN_LENGTH 32 /* 256/8 => number of bytes to hold 256 bits */ @@ -422,6 +419,7 @@ extern int GetProximityEvents( int *valuators); extern void PostSyntheticMotion( + DeviceIntPtr pDev, int x, int y, ScreenPtr pScreen, diff --git a/include/inputstr.h b/include/inputstr.h index 512829373..048a34a7e 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -52,6 +52,7 @@ SOFTWARE. #include "input.h" #include "window.h" #include "dixstruct.h" +#include "cursorstr.h" #define BitIsOn(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7))) @@ -264,6 +265,30 @@ typedef struct _LedFeedbackClassRec { #endif } LedFeedbackClassRec; + +/** + * Sprite information for a device. + */ +typedef struct { + CursorPtr current; + BoxRec hotLimits; /* logical constraints of hot spot */ + Bool confined; /* confined to screen */ +#if defined(SHAPE) || defined(PANORAMIX) + RegionPtr hotShape; /* additional logical shape constraint */ +#endif + BoxRec physLimits; /* physical constraints of hot spot */ + WindowPtr win; /* window of logical position */ + HotSpot hot; /* logical pointer position */ + HotSpot hotPhys; /* physical pointer position */ +#ifdef PANORAMIX + ScreenPtr screen; /* all others are in Screen 0 coordinates */ + RegionRec Reg1; /* Region 1 for confining motion */ + RegionRec Reg2; /* Region 2 for confining virtual motion */ + WindowPtr windows[MAXSCREENS]; + WindowPtr confineWin; /* confine window */ +#endif +} SpriteRec, *SpritePtr; + /* states for devices */ #define NOT_GRABBED 0 @@ -329,9 +354,8 @@ typedef struct _DeviceIntRec { DevUnion *devPrivates; int nPrivates; DeviceUnwrapProc unwrapProc; -#ifdef MPX Bool isMPDev; /* TRUE if multipointer device */ -#endif + SpritePtr pSprite; /* sprite information */ } DeviceIntRec; typedef struct { diff --git a/record/record.c b/record/record.c index 0ed8f84c2..4e7f92aef 100644 --- a/record/record.c +++ b/record/record.c @@ -43,6 +43,7 @@ and Jim Haggerty of Metheus. #include #include "set.h" #include "swaprep.h" +#include "inputstr.h" #include #include @@ -861,7 +862,7 @@ RecordADeviceEvent(CallbackListPtr *pcbl, pointer nulldata, pointer calldata) pev->u.u.type == ButtonRelease || pev->u.u.type == KeyPress || pev->u.u.type == KeyRelease)) { - int scr = XineramaGetCursorScreen(); + int scr = XineramaGetCursorScreen(inputInfo.pointer); memcpy(&shiftedEvent, pev, sizeof(xEvent)); shiftedEvent.u.keyButtonPointer.rootX += panoramiXdataPtr[scr].x - From a96788058e48f3e97c66da6dafd58828f0c2ce53 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 14 Dec 2006 10:50:18 +1030 Subject: [PATCH 031/634] mi: removing MPX ifdefs global sprite renaming in mipointer and misprite fixed: multiple remove cursor call in miSpriteInstallColormap fixed: wrong core pointer usage in miSpriteStoreColors dix: bugfix in CheckCursorConfinement removing MPX ifdefs removing MPX event generation (using Xi solely now) --- Changelog | 20 +++- dix/cursor.c | 37 +------- dix/events.c | 15 +-- dix/getevents.c | 58 ++--------- mi/midispcur.c | 141 +++++++++++---------------- mi/mipointer.c | 143 +++++++--------------------- mi/misprite.c | 248 ++++++++++++++++-------------------------------- mi/mispritest.h | 4 +- 8 files changed, 214 insertions(+), 452 deletions(-) diff --git a/Changelog b/Changelog index 463d028de..7efc82a64 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,22 @@ -MPX Changelog file +== 14.12.06 == +mi: removing MPX ifdefs + global sprite renaming in mipointer and misprite + fixed: multiple remove cursor call in miSpriteInstallColormap + fixed: wrong core pointer usage in miSpriteStoreColors + +dix: bugfix in CheckCursorConfinement + removing MPX ifdefs + removing MPX event generation (using Xi solely now) + +Files: + mi/midispcur.c + mi/misprite.c + mi/mispritest.h + mi/mipointer.c + dix/getevents.c + dix/events.c + dix/cursor.c + == 12.12.06 == dix: Moving SpriteRec into DeviceIntRec removing global sprite structure diff --git a/dix/cursor.c b/dix/cursor.c index 6da763b44..7df854cd4 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -128,16 +128,11 @@ FreeCursor(pointer value, XID cid) for (nscr = 0; nscr < screenInfo.numScreens; nscr++) { pscr = screenInfo.screens[nscr]; -#ifdef MPX - pDev = inputInfo.devices; - while(pDev) + for(pDev = inputInfo.devices; pDev; pDev = pDev->next) { -#endif - (void)( *pscr->UnrealizeCursor)(pDev, pscr, pCurs); -#ifdef MPX - pDev = pDev->next; + if (MPHasCursor(pDev)) + (void)( *pscr->UnrealizeCursor)(pDev, pscr, pCurs); } -#endif } FreeCursorBits(pCurs->bits); xfree( pCurs); @@ -231,16 +226,12 @@ AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, for (nscr = 0; nscr < screenInfo.numScreens; nscr++) { pscr = screenInfo.screens[nscr]; -#ifdef MPX - pDev = inputInfo.devices; - while(pDev) + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (MPHasCursor(pDev)) { -#endif if (!( *pscr->RealizeCursor)(pDev, pscr, pCurs)) { -#ifdef MPX /* Realize failed for device pDev on screen pscr. * We have to assume that for all devices before, realize * worked. We need to rollback all devices so far on the @@ -254,11 +245,9 @@ AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, ( *pscr->UnrealizeCursor)(pDevIt, pscr, pCurs); pDevIt = pDevIt->next; } -#endif while (--nscr >= 0) { pscr = screenInfo.screens[nscr]; -#ifdef MPX /* now unrealize all devices on previous screens */ pDevIt = inputInfo.devices; while (pDevIt) @@ -267,19 +256,14 @@ AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, ( *pscr->UnrealizeCursor)(pDevIt, pscr, pCurs); pDevIt = pDevIt->next; } -#else ( *pscr->UnrealizeCursor)(pDev, pscr, pCurs); -#endif } FreeCursorBits(bits); xfree(pCurs); return (CursorPtr)NULL; } -#ifdef MPX } - pDev = pDev->next; } -#endif } return pCurs; } @@ -462,16 +446,12 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, for (nscr = 0; nscr < screenInfo.numScreens; nscr++) { pscr = screenInfo.screens[nscr]; -#ifdef MPX - pDev = inputInfo.devices; - while(pDev) + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (MPHasCursor(pDev)) { -#endif if (!( *pscr->RealizeCursor)(pDev, pscr, pCurs)) { -#ifdef MPX /* Realize failed for device pDev on screen pscr. * We have to assume that for all devices before, realize * worked. We need to rollback all devices so far on the @@ -485,11 +465,9 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, ( *pscr->UnrealizeCursor)(pDevIt, pscr, pCurs); pDevIt = pDevIt->next; } -#endif while (--nscr >= 0) { pscr = screenInfo.screens[nscr]; -#ifdef MPX /* now unrealize all devices on previous screens */ pDevIt = inputInfo.devices; while (pDevIt) @@ -498,19 +476,14 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, ( *pscr->UnrealizeCursor)(pDevIt, pscr, pCurs); pDevIt = pDevIt->next; } -#else ( *pscr->UnrealizeCursor)(pDev, pscr, pCurs); -#endif } FreeCursorBits(bits); xfree(pCurs); return BadAlloc; } -#ifdef MPX } - pDev = pDev->next; } -#endif } *ppCurs = pCurs; return Success; diff --git a/dix/events.c b/dix/events.c index f438b07f1..5ab076452 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4589,13 +4589,16 @@ CheckCursorConfinement(WindowPtr pWin) for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - grab = pDev->grab; - if (grab && (confineTo = grab->confineTo)) + if (MPHasCursor(pDev)) { - if (!BorderSizeNotEmpty(pDev, confineTo)) - (*inputInfo.pointer->DeactivateGrab)(pDev); - else if ((pWin == confineTo) || IsParent(pWin, confineTo)) - ConfineCursorToWindow(pDev, confineTo, TRUE, TRUE); + grab = pDev->grab; + if (grab && (confineTo = grab->confineTo)) + { + if (!BorderSizeNotEmpty(pDev, confineTo)) + (*inputInfo.pointer->DeactivateGrab)(pDev); + else if ((pWin == confineTo) || IsParent(pWin, confineTo)) + ConfineCursorToWindow(pDev, confineTo, TRUE, TRUE); + } } } } diff --git a/dix/getevents.c b/dix/getevents.c index f223f2918..87937f60d 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -66,12 +66,6 @@ extern Bool XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies); #include "exglobals.h" #include "extnsionst.h" -#ifdef MPX -#include -#include -#include "mpxglobals.h" -#endif - /* Maximum number of valuators, divided by six, rounded up, to get number * of events. */ #define MAX_VALUATOR_EVENTS 6 @@ -505,12 +499,8 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, if ((type == ButtonPress || type == ButtonRelease) && !pDev->button) return 0; -#ifdef MPX - if (pDev->isMPDev) - num_events = 3; - else -#endif - if (pDev->coreEvents) + + if (pDev->coreEvents || pDev->isMPDev) num_events = 2; else num_events = 1; @@ -537,15 +527,10 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, kbp->time = ms; kbp->deviceid = pDev->id; -#ifdef MPX - if (pDev->isMPDev) + if (!pDev->coreEvents || pDev->isMPDev) pointer = pDev; - else -#endif - if (pDev->coreEvents) + else pointer = inputInfo.pointer; - else - pointer = pDev; /* Set x and y based on whether this is absolute or relative, and * accelerate if we need to. */ @@ -598,16 +583,10 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); -#ifdef MPX - if (pDev->isMPDev) - { - // noop, just less intrusive to fit MPX in like that - } else -#endif - if (pDev->coreEvents) { + if (pDev->coreEvents && !pDev->isMPDev) { /* set the virtual core pointer's coordinates */ - pointer->valuator->lastx = x; - pointer->valuator->lasty = y; + inputInfo.pointer->valuator->lastx = x; + inputInfo.pointer->valuator->lasty = y; } pDev->valuator->lastx = x; pDev->valuator->lasty = y; @@ -634,31 +613,8 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, num_valuators, valuators); } -#ifdef MPX - if (pDev->isMPDev) - { - /* MPX events are the same as XI events but without valuators. */ - memcpy(events, kbp, sizeof(deviceKeyButtonPointer)); - switch(type) - { - case ButtonPress: - events->u.u.type = MPXButtonPress; - break; - case ButtonRelease: - events->u.u.type = MPXButtonRelease; - break; - case MotionNotify: - events->u.u.type = MPXMotionNotify; - break; - } - events++; - } - /* MPX devices always send core events */ if (pDev->coreEvents || pDev->isMPDev) { -#else - if (pDev->coreEvents) { -#endif events->u.u.type = type; events->u.keyButtonPointer.time = ms; events->u.keyButtonPointer.rootX = x; diff --git a/mi/midispcur.c b/mi/midispcur.c index 0b4ef49d6..38772f609 100644 --- a/mi/midispcur.c +++ b/mi/midispcur.c @@ -58,11 +58,7 @@ in this Software without prior written authorization from The Open Group. # include "picturestr.h" #endif -#ifdef MPX -# include "inputstr.h" - -#define SaneID(a) (a >= 0 && a < MAX_DEVICES) -#endif +# include "inputstr.h" /* for MAX_DEVICES */ /* per-screen private data */ @@ -83,11 +79,13 @@ typedef struct { #endif } miDCBufferRec, *miDCBufferPtr; +/* + * The core pointer buffer will point to the index of the virtual core pointer + * in the pCursorBuffers array. + */ typedef struct { miDCBufferPtr pCoreBuffer; /* for core pointer */ -#ifdef MPX - miDCBufferPtr pMPBuffers; /* for MPX pointers */ -#endif + miDCBufferPtr pCursorBuffers; /* one for each device */ CloseScreenProcPtr CloseScreen; } miDCScreenRec, *miDCScreenPtr; @@ -140,6 +138,7 @@ miDCInitialize (pScreen, screenFuncs) { miDCScreenPtr pScreenPriv; miDCBufferPtr pBuffer; + int mpBufferIdx; if (miDCGeneration != serverGeneration) { @@ -155,52 +154,37 @@ miDCInitialize (pScreen, screenFuncs) /* * initialize the entire private structure to zeros */ -#if !defined MPX - pScreenPriv->pCoreBuffer = (miDCBufferPtr)xalloc(sizeof(miDCBufferRec)); - if (!pScreenPriv->pCoreBuffer) + + pScreenPriv->pCursorBuffers = (miDCBufferPtr)xalloc(MAX_DEVICES * + sizeof(miDCBufferRec)); + if (!pScreenPriv->pCursorBuffers) { xfree((pointer)pScreenPriv); return FALSE; } - pBuffer = pScreenPriv->pCoreBuffer; -#else /* ifdef MPX */ + + /* virtual core pointer ID is 1 */ + pScreenPriv->pCoreBuffer = &pScreenPriv->pCursorBuffers[1]; + + mpBufferIdx = 0; + while(mpBufferIdx < MAX_DEVICES) { - int mpBufferIdx = 0; - - pScreenPriv->pMPBuffers = (miDCBufferPtr)xalloc(MAX_DEVICES * - sizeof(miDCBufferRec)); - if (!pScreenPriv->pMPBuffers) - { - xfree((pointer)pScreenPriv); - return FALSE; - } - - /* virtual core pointer ID is 1 */ - pScreenPriv->pCoreBuffer = &pScreenPriv->pMPBuffers[1]; - - while(mpBufferIdx < MAX_DEVICES) - { - pBuffer = &pScreenPriv->pMPBuffers[mpBufferIdx]; -#endif - pBuffer->pSourceGC = - pBuffer->pMaskGC = - pBuffer->pSaveGC = - pBuffer->pRestoreGC = - pBuffer->pMoveGC = - pBuffer->pPixSourceGC = - pBuffer->pPixMaskGC = NULL; + pBuffer = &pScreenPriv->pCursorBuffers[mpBufferIdx]; + pBuffer->pSourceGC = + pBuffer->pMaskGC = + pBuffer->pSaveGC = + pBuffer->pRestoreGC = + pBuffer->pMoveGC = + pBuffer->pPixSourceGC = + pBuffer->pPixMaskGC = NULL; #ifdef ARGB_CURSOR pBuffer->pRootPicture = NULL; pBuffer->pTempPicture = NULL; #endif + pBuffer->pSave = pBuffer->pTemp = NULL; - pBuffer->pSave = pBuffer->pTemp = NULL; - -#ifdef MPX - mpBufferIdx++; - } + mpBufferIdx++; } -#endif pScreenPriv->CloseScreen = pScreen->CloseScreen; @@ -210,11 +194,7 @@ miDCInitialize (pScreen, screenFuncs) if (!miSpriteInitialize (pScreen, &miDCFuncs, screenFuncs)) { -#ifdef MPX - xfree((pointer)pScreenPriv->pMPBuffers); -#else - xfree((pointer)pScreenPriv->pCoreBuffer); -#endif + xfree ((pointer) pScreenPriv->pCursorBuffers); xfree ((pointer) pScreenPriv); return FALSE; } @@ -232,28 +212,25 @@ miDCCloseScreen (index, pScreen) { miDCScreenPtr pScreenPriv; miDCBufferPtr pBuffer; + int mpBufferIdx; pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; pScreen->CloseScreen = pScreenPriv->CloseScreen; - pBuffer = pScreenPriv->pCoreBuffer; -#ifdef MPX + mpBufferIdx = 0; + while (mpBufferIdx < MAX_DEVICES) { - int mpBufferIdx = 0; - while (mpBufferIdx < MAX_DEVICES) - { - pBuffer = &pScreenPriv->pMPBuffers[mpBufferIdx]; + pBuffer = &pScreenPriv->pCursorBuffers[mpBufferIdx]; -#endif - tossGC (pBuffer->pSourceGC); - tossGC (pBuffer->pMaskGC); - tossGC (pBuffer->pSaveGC); - tossGC (pBuffer->pRestoreGC); - tossGC (pBuffer->pMoveGC); - tossGC (pBuffer->pPixSourceGC); - tossGC (pBuffer->pPixMaskGC); - tossPix (pBuffer->pSave); - tossPix (pBuffer->pTemp); + tossGC (pBuffer->pSourceGC); + tossGC (pBuffer->pMaskGC); + tossGC (pBuffer->pSaveGC); + tossGC (pBuffer->pRestoreGC); + tossGC (pBuffer->pMoveGC); + tossGC (pBuffer->pPixSourceGC); + tossGC (pBuffer->pPixMaskGC); + tossPix (pBuffer->pSave); + tossPix (pBuffer->pTemp); #ifdef ARGB_CURSOR #if 0 /* This has been free()d before */ tossPict (pScreenPriv->pRootPicture); @@ -261,16 +238,10 @@ miDCCloseScreen (index, pScreen) tossPict (pBuffer->pTempPicture); #endif -#ifdef MPX mpBufferIdx++; - } } - xfree((pointer) pScreenPriv->pMPBuffers); -#else - - xfree((pointer) pScreenPriv->pCoreBuffer); -#endif + xfree((pointer) pScreenPriv->pCursorBuffers); xfree ((pointer) pScreenPriv); return (*pScreen->CloseScreen) (index, pScreen); @@ -567,10 +538,8 @@ miDCPutUpCursor (pDev, pScreen, pCursor, x, y, source, mask) pWin = WindowTable[pScreen->myNum]; pBuffer = pScreenPriv->pCoreBuffer; -#ifdef MPX if (MPHasCursor(pDev)) - pBuffer = &pScreenPriv->pMPBuffers[pDev->id]; -#endif + pBuffer = &pScreenPriv->pCursorBuffers[pDev->id]; #ifdef ARGB_CURSOR if (pPriv->pPicture) @@ -619,10 +588,10 @@ miDCSaveUnderCursor (pDev, pScreen, x, y, w, h) pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; pBuffer = pScreenPriv->pCoreBuffer; -#ifdef MPX + if (MPHasCursor(pDev)) - pBuffer = &pScreenPriv->pMPBuffers[pDev->id]; -#endif + pBuffer = &pScreenPriv->pCursorBuffers[pDev->id]; + pSave = pBuffer->pSave; pWin = WindowTable[pScreen->myNum]; if (!pSave || pSave->drawable.width < w || pSave->drawable.height < h) @@ -658,10 +627,10 @@ miDCRestoreUnderCursor (pDev, pScreen, x, y, w, h) pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; pBuffer = pScreenPriv->pCoreBuffer; -#ifdef MPX + if (MPHasCursor(pDev)) - pBuffer = &pScreenPriv->pMPBuffers[pDev->id]; -#endif + pBuffer = &pScreenPriv->pCursorBuffers[pDev->id]; + pSave = pBuffer->pSave; pWin = WindowTable[pScreen->myNum]; if (!pSave) @@ -691,10 +660,10 @@ miDCChangeSave (pDev, pScreen, x, y, w, h, dx, dy) pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; pBuffer = pScreenPriv->pCoreBuffer; -#ifdef MPX + if (MPHasCursor(pDev)) - pBuffer = &pScreenPriv->pMPBuffers[pDev->id]; -#endif + pBuffer = &pScreenPriv->pCursorBuffers[pDev->id]; + pSave = pBuffer->pSave; pWin = WindowTable[pScreen->myNum]; /* @@ -842,10 +811,10 @@ miDCMoveCursor (pDev, pScreen, pCursor, x, y, w, h, dx, dy, source, mask) pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; pWin = WindowTable[pScreen->myNum]; pBuffer = pScreenPriv->pCoreBuffer; -#ifdef MPX + if (MPHasCursor(pDev)) - pBuffer = &pScreenPriv->pMPBuffers[pDev->id]; -#endif + pBuffer = &pScreenPriv->pCursorBuffers[pDev->id]; + pTemp = pBuffer->pTemp; if (!pTemp || pTemp->drawable.width != pBuffer->pSave->drawable.width || diff --git a/mi/mipointer.c b/mi/mipointer.c index 6ccc7299d..10e6f3ec5 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -1,5 +1,5 @@ /* - * miPointer->c + * mipointer.c */ @@ -63,15 +63,14 @@ static unsigned long miPointerGeneration = 0; * until more than one pointer device exists. */ -static miPointerPtr miPointer; +static miPointerPtr miCorePointer; -#ifdef MPX /* Multipointers * ID of a device == index in this array. */ -static miPointerRec miMPPointers[MAX_DEVICES]; - -#endif +static miPointerRec miPointers[MAX_DEVICES]; +#define MIPOINTER(dev) \ + (MPHasCursor((dev))) ? &miPointers[(dev)->id] : miCorePointer static Bool miPointerRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); @@ -103,6 +102,7 @@ miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) { miPointerScreenPtr pScreenPriv; miPointerPtr pPointer; + int ptrIdx; if (miPointerGeneration != serverGeneration) { @@ -139,29 +139,16 @@ miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) pScreen->SetCursorPosition = miPointerSetCursorPosition; pScreen->RecolorCursor = miRecolorCursor; pScreen->PointerNonInterestBox = miPointerPointerNonInterestBox; + /* * set up the pointer object + * virtual core pointer ID is always 1, so we let it point to the matching + * index in the array. */ -#if !defined MPX - miPointer = (miPointerPtr)xalloc(sizeof(miPointerRec)); - if (!miPointer) + miCorePointer = &miPointers[1]; + for(ptrIdx = 0; ptrIdx < MAX_DEVICES; ptrIdx++) { - xfree((pointer)pScreenPriv); - return FALSE; - } - pPointer = miPointer; -#else /* ifdef MPX */ - miPointer = &miMPPointers[1]; - { - int mpPtrIdx = 0; /* loop counter */ - /* - * Set up pointer objects for multipointer devices. - */ - while(mpPtrIdx < MAX_DEVICES) - { - pPointer = &miMPPointers[mpPtrIdx]; -#endif - + pPointer = &miPointers[ptrIdx]; pPointer->pScreen = NULL; pPointer->pSpriteScreen = NULL; pPointer->pCursor = NULL; @@ -173,11 +160,7 @@ miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) pPointer->confined = FALSE; pPointer->x = 0; pPointer->y = 0; -#ifdef MPX - mpPtrIdx++; - } } -#endif return TRUE; } @@ -187,28 +170,21 @@ miPointerCloseScreen (index, pScreen) int index; ScreenPtr pScreen; { + miPointerPtr pPointer; + int ptrIdx; + SetupScreen(pScreen); - miPointerPtr pPointer = miPointer; -#ifdef MPX - int mpPointerIdx = 0; - - while(mpPointerIdx < MAX_DEVICES) + for(ptrIdx = 0; ptrIdx < MAX_DEVICES; ptrIdx++) { - pPointer = &miMPPointers[mpPointerIdx]; -#endif + pPointer = &miPointers[ptrIdx]; + if (pScreen == pPointer->pScreen) pPointer->pScreen = 0; if (pScreen == pPointer->pSpriteScreen) pPointer->pSpriteScreen = 0; -#ifdef MPX - mpPointerIdx++; } -#endif -#if !defined MPX - xfree((pointer)miPointer); -#endif pScreen->CloseScreen = pScreenPriv->CloseScreen; xfree ((pointer) pScreenPriv); return (*pScreen->CloseScreen) (index, pScreen); @@ -244,12 +220,8 @@ miPointerDisplayCursor (pDev, pScreen, pCursor) ScreenPtr pScreen; CursorPtr pCursor; { - miPointerPtr pPointer = miPointer; -#ifdef MPX - /* use core pointer for non MPX devices */ - if (MPHasCursor(pDev)) - pPointer = &miMPPointers[pDev->id]; -#endif + miPointerPtr pPointer = MIPOINTER(pDev); + pPointer->pCursor = pCursor; pPointer->pScreen = pScreen; miPointerUpdateSprite(pDev); @@ -262,11 +234,8 @@ miPointerConstrainCursor (pDev, pScreen, pBox) ScreenPtr pScreen; BoxPtr pBox; { - miPointerPtr pPointer = miPointer; -#ifdef MPX - if (MPHasCursor(pDev)) - pPointer = &miMPPointers[pDev->id]; -#endif + miPointerPtr pPointer = MIPOINTER(pDev); + pPointer->limits = *pBox; pPointer->confined = PointerConfinedToScreen(pDev); } @@ -320,15 +289,9 @@ miPointerWarpCursor (pDev, pScreen, x, y) ScreenPtr pScreen; int x, y; { - miPointerPtr pPointer = miPointer; + miPointerPtr pPointer = MIPOINTER(pDev); SetupScreen (pScreen); -#ifdef MPX - if (MPHasCursor(pDev)) - pPointer = &miMPPointers[pDev->id]; -#endif - - if (pPointer->pScreen != pScreen) (*pScreenPriv->screenFuncs->NewEventScreen) (pScreen, TRUE); @@ -376,20 +339,13 @@ miPointerUpdateSprite (DeviceIntPtr pDev) miPointerScreenPtr pScreenPriv; CursorPtr pCursor; int x, y, devx, devy; - miPointerPtr pPointer = miPointer; + miPointerPtr pPointer; if (!pDev || - !(pDev->coreEvents || pDev == inputInfo.pointer -#ifdef MPX - || pDev->isMPDev -#endif - )) + !(pDev->coreEvents || pDev == inputInfo.pointer || pDev->isMPDev)) return; -#ifdef MPX - if (MPHasCursor(pDev)) - pPointer = &miMPPointers[pDev->id]; -#endif + pPointer = MIPOINTER(pDev); pScreen = pPointer->pScreen; if (!pScreen) @@ -458,7 +414,7 @@ miPointerUpdateSprite (DeviceIntPtr pDev) void miPointerDeltaCursor (int dx, int dy, unsigned long time) { - int x = miPointer->x + dx, y = miPointer->y + dy; + int x = miCorePointer->x + dx, y = miCorePointer->y + dy; miPointerSetPosition(inputInfo.pointer, &x, &y, time); } @@ -474,16 +430,13 @@ miPointerSetScreen(DeviceIntPtr pDev, int screen_no, int x, int y) { miPointerScreenPtr pScreenPriv; ScreenPtr pScreen; - miPointerPtr pPointer = miPointer; + miPointerPtr pPointer = MIPOINTER(pDev); pScreen = screenInfo.screens[screen_no]; pScreenPriv = GetScreenPrivate (pScreen); (*pScreenPriv->screenFuncs->NewEventScreen) (pScreen, FALSE); NewCurrentScreen (pDev, pScreen, x, y); -#ifdef MPX - if (MPHasCursor(pDev)) - pPointer = &miMPPointers[pDev->id]; -#endif + pPointer->limits.x2 = pScreen->width; pPointer->limits.y2 = pScreen->height; } @@ -497,11 +450,7 @@ miPointerCurrentScreen () _X_EXPORT ScreenPtr miPointerGetScreen(DeviceIntPtr pDev) { - miPointerPtr pPointer; -#ifdef MPX - if (MPHasCursor(pDev)) - pPointer = &miMPPointers[pDev->id]; -#endif + miPointerPtr pPointer = MIPOINTER(pDev); return pPointer->pScreen; } @@ -521,22 +470,14 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y, unsigned long time) ScreenPtr pScreen; ScreenPtr newScreen; - miPointerPtr pPointer = miPointer; -#ifdef MPX - if (MPHasCursor(pDev)) - pPointer = &(miMPPointers[pDev->id]); -#endif + miPointerPtr pPointer = MIPOINTER(pDev); pScreen = pPointer->pScreen; if (!pScreen) return; /* called before ready */ if (!pDev || - !(pDev->coreEvents || pDev == inputInfo.pointer -#ifdef MPX - || pDev->isMPDev -#endif - )) + !(pDev->coreEvents || pDev == inputInfo.pointer || pDev->isMPDev)) return; if (*x < 0 || *x >= pScreen->width || *y < 0 || *y >= pScreen->height) @@ -583,11 +524,7 @@ miPointerPosition (int *x, int *y) _X_EXPORT void miPointerGetPosition(DeviceIntPtr pDev, int *x, int *y) { - miPointerPtr pPointer = miPointer; -#ifdef MPX - if (MPHasCursor(pDev)) - pPointer = &miMPPointers[pDev->id]; -#endif + miPointerPtr pPointer = MIPOINTER(pDev); *x = pPointer->x; *y = pPointer->y; } @@ -603,20 +540,12 @@ void miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, unsigned long time) { - miPointerPtr pPointer = miPointer; + miPointerPtr pPointer = MIPOINTER(pDev); SetupScreen(pScreen); -#ifdef MPX - if (MPHasCursor(pDev)) - pPointer = &miMPPointers[pDev->id]; -#endif - if (pDev && (pDev->coreEvents || pDev == inputInfo.pointer -#ifdef MPX - || pDev->isMPDev -#endif - ) && - !pScreenPriv->waitForUpdate && pScreen == pPointer->pSpriteScreen) + if (pDev && (pDev->coreEvents || pDev == inputInfo.pointer || pDev->isMPDev) + && !pScreenPriv->waitForUpdate && pScreen == pPointer->pSpriteScreen) { pPointer->devx = x; pPointer->devy = y; diff --git a/mi/misprite.c b/mi/misprite.c index e55032bb8..2e3b37641 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -146,31 +146,25 @@ miSpriteReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure) ScreenPtr pScreen = closure; miSpriteScreenPtr pScreenPriv; miCursorInfoPtr pCursorInfo; - DeviceIntPtr pDev = inputInfo.pointer; + DeviceIntPtr pDev; pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - pCursorInfo = pScreenPriv->cp; -#ifdef MPX - pDev = inputInfo.devices; - while(pDev) + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (MPHasCursor(pDev)) { - pCursorInfo = &pScreenPriv->mpCursors[pDev->id]; -#endif + pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; + if (pCursorInfo->isUp && - RECT_IN_REGION (pScreen, pRegion, &pCursorInfo->saved) + RECT_IN_REGION (pScreen, pRegion, &pCursorInfo->saved) != rgnOUT) { SPRITE_DEBUG(("Damage remove\n")); miSpriteRemoveCursor (pDev, pScreen); } -#ifdef MPX } - pDev = pDev->next; } -#endif } /* @@ -188,6 +182,7 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs) miSpriteScreenPtr pScreenPriv; VisualPtr pVisual; miCursorInfoPtr pCursorInfo; + int cursorIdx; if (!DamageSetup (pScreen)) return FALSE; @@ -235,54 +230,41 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs) pScreenPriv->BlockHandler = pScreen->BlockHandler; -#if !defined MPX - pScreenPriv->cp = (miCursorInfoPtr)xalloc(sizeof(miCursorInfoRec)); - if (!pScreenPriv->cp) + /* alloc and zero memory for all cursors */ + pScreenPriv->pDevCursors = + (miCursorInfoPtr)xalloc(MAX_DEVICES * sizeof(miCursorInfoRec)); + + if (!pScreenPriv->pDevCursors) { xfree((pointer)pScreenPriv); return FALSE; } - pCursorInfo = pScreenPriv->cp; -#else - /* alloc and zero memory for all MPX cursors */ - pScreenPriv->mpCursors = (miCursorInfoPtr)xalloc(MAX_DEVICES * sizeof(miCursorInfoRec)); - if (!pScreenPriv->mpCursors) + /* virtual core pointer's ID is 1 */ + pScreenPriv->cp = &(pScreenPriv->pDevCursors[1]); + + cursorIdx = 0; + while (cursorIdx < MAX_DEVICES) { - xfree((pointer)pScreenPriv->cp); - xfree((pointer)pScreenPriv); - return FALSE; + pCursorInfo = &(pScreenPriv->pDevCursors[cursorIdx]); + pCursorInfo->pCursor = NULL; + pCursorInfo->x = 0; + pCursorInfo->y = 0; + pCursorInfo->isUp = FALSE; + pCursorInfo->shouldBeUp = FALSE; + pCursorInfo->pCacheWin = NullWindow; + pCursorInfo->isInCacheWin = FALSE; + pCursorInfo->checkPixels = TRUE; + pCursorInfo->pInstalledMap = NULL; + pCursorInfo->pColormap = NULL; + pCursorInfo->colors[SOURCE_COLOR].red = 0; + pCursorInfo->colors[SOURCE_COLOR].green = 0; + pCursorInfo->colors[SOURCE_COLOR].blue = 0; + pCursorInfo->colors[MASK_COLOR].red = 0; + pCursorInfo->colors[MASK_COLOR].green = 0; + pCursorInfo->colors[MASK_COLOR].blue = 0; + + cursorIdx++; } - pScreenPriv->cp = &(pScreenPriv->mpCursors[1]); - - { - int mpCursorIdx = 0; - while (mpCursorIdx < MAX_DEVICES) - { - pCursorInfo = &(pScreenPriv->mpCursors[mpCursorIdx]); -#endif - - pCursorInfo->pCursor = NULL; - pCursorInfo->x = 0; - pCursorInfo->y = 0; - pCursorInfo->isUp = FALSE; - pCursorInfo->shouldBeUp = FALSE; - pCursorInfo->pCacheWin = NullWindow; - pCursorInfo->isInCacheWin = FALSE; - pCursorInfo->checkPixels = TRUE; - pCursorInfo->pInstalledMap = NULL; - pCursorInfo->pColormap = NULL; - pCursorInfo->colors[SOURCE_COLOR].red = 0; - pCursorInfo->colors[SOURCE_COLOR].green = 0; - pCursorInfo->colors[SOURCE_COLOR].blue = 0; - pCursorInfo->colors[MASK_COLOR].red = 0; - pCursorInfo->colors[MASK_COLOR].green = 0; - pCursorInfo->colors[MASK_COLOR].blue = 0; - -#ifdef MPX - mpCursorIdx++; - } - } -#endif pScreenPriv->funcs = cursorFuncs; pScreen->devPrivates[miSpriteScreenIndex].ptr = (pointer) pScreenPriv; @@ -321,6 +303,7 @@ miSpriteCloseScreen (i, pScreen) ScreenPtr pScreen; { miSpriteScreenPtr pScreenPriv; + DeviceIntPtr pDev; pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; @@ -333,15 +316,18 @@ miSpriteCloseScreen (i, pScreen) pScreen->StoreColors = pScreenPriv->StoreColors; pScreen->SaveDoomedAreas = pScreenPriv->SaveDoomedAreas; - miSpriteIsUpFALSE (pScreenPriv->cp, pScreen, pScreenPriv); + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) + { + if (MPHasCursor(pDev)) + { + miCursorInfoPtr pCursor; + pCursor = &pScreenPriv->pDevCursors[pDev->id]; + miSpriteIsUpFALSE (pCursor, pScreen, pScreenPriv); + } + } DamageDestroy (pScreenPriv->pDamage); -#ifdef MPX - xfree((pointer)(pScreenPriv->mpCursors)); -#else - xfree((pointer)(pScreenPriv->cp)); -#endif - + xfree ((pointer)(pScreenPriv->pDevCursors)); xfree ((pointer) pScreenPriv); return (*pScreen->CloseScreen) (i, pScreen); @@ -363,16 +349,12 @@ miSpriteGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine) SCREEN_PROLOGUE (pScreen, GetImage); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - pCursorInfo = pScreenPriv->cp; -#ifdef MPX - pDev = inputInfo.devices; - while (pDev) + for(pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (MPHasCursor(pDev)) { - pCursorInfo = &pScreenPriv->mpCursors[pDev->id]; -#endif + pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; if (pDrawable->type == DRAWABLE_WINDOW && pCursorInfo->isUp && ORG_OVERLAP(&pCursorInfo->saved,pDrawable->x,pDrawable->y, @@ -381,11 +363,8 @@ miSpriteGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine) SPRITE_DEBUG (("GetImage remove\n")); miSpriteRemoveCursor (pDev, pScreen); } -#ifdef MPX } - pDev = pDev->next; } -#endif (*pScreen->GetImage) (pDrawable, sx, sy, w, h, format, planemask, pdstLine); @@ -410,16 +389,12 @@ miSpriteGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart) SCREEN_PROLOGUE (pScreen, GetSpans); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - pCursorInfo = pScreenPriv->cp; -#ifdef MPX - pDev = inputInfo.devices; - while(pDev) + for(pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (MPHasCursor(pDev)) { - pCursorInfo = &pScreenPriv->mpCursors[pDev->id]; -#endif + pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; if (pDrawable->type == DRAWABLE_WINDOW && pCursorInfo->isUp) { @@ -445,11 +420,8 @@ miSpriteGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart) } } } -#ifdef MPX } - pDev = pDev->next; } -#endif (*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart); @@ -469,16 +441,12 @@ miSpriteSourceValidate (pDrawable, x, y, width, height) SCREEN_PROLOGUE (pScreen, SourceValidate); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - pCursorInfo = pScreenPriv->cp; -#ifdef MPX - pDev = inputInfo.devices; - while(pDev) + for(pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (MPHasCursor(pDev)) { - pCursorInfo = &pScreenPriv->mpCursors[pDev->id]; -#endif + pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; if (pDrawable->type == DRAWABLE_WINDOW && pCursorInfo->isUp && ORG_OVERLAP(&pCursorInfo->saved, pDrawable->x, pDrawable->y, x, y, width, height)) @@ -486,12 +454,8 @@ miSpriteSourceValidate (pDrawable, x, y, width, height) SPRITE_DEBUG (("SourceValidate remove\n")); miSpriteRemoveCursor (pDev, pScreen); } -#ifdef MPX } - pDev = pDev->next; } -#endif - if (pScreen->SourceValidate) (*pScreen->SourceValidate) (pDrawable, x, y, width, height); @@ -510,16 +474,12 @@ miSpriteCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) SCREEN_PROLOGUE (pScreen, CopyWindow); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - pCursorInfo = pScreenPriv->cp; -#ifdef MPX - pDev = inputInfo.devices; - while(pDev) + for(pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (MPHasCursor(pDev)) { - pCursorInfo = &pScreenPriv->mpCursors[pDev->id]; -#endif + pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; /* * Damage will take care of destination check */ @@ -529,11 +489,8 @@ miSpriteCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) SPRITE_DEBUG (("CopyWindow remove\n")); miSpriteRemoveCursor (pDev, pScreen); } -#ifdef MPX } - pDev = pDev->next; } -#endif (*pScreen->CopyWindow) (pWindow, ptOldOrg, prgnSrc); SCREEN_EPILOGUE (pScreen, CopyWindow); @@ -552,7 +509,6 @@ miSpriteBlockHandler (i, blockData, pTimeout, pReadmask) miCursorInfoPtr pCursorInfo; pPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - pCursorInfo = pPriv->cp; SCREEN_PROLOGUE(pScreen, BlockHandler); @@ -560,25 +516,18 @@ miSpriteBlockHandler (i, blockData, pTimeout, pReadmask) SCREEN_EPILOGUE(pScreen, BlockHandler); -#ifdef MPX - pDev = inputInfo.devices; - while(pDev) + for(pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (MPHasCursor(pDev)) { - pCursorInfo = &pPriv->mpCursors[pDev->id]; -#endif + pCursorInfo = &pPriv->pDevCursors[pDev->id]; if (!pCursorInfo->isUp && pCursorInfo->shouldBeUp) { SPRITE_DEBUG (("BlockHandler restore\n")); miSpriteRestoreCursor (pDev, pScreen); } -#ifdef MPX } - pDev = pDev->next; } -#endif - } static void @@ -592,7 +541,6 @@ miSpriteInstallColormap (pMap) int cursorIdx; pPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - pCursorInfo = pPriv->cp; SCREEN_PROLOGUE(pScreen, InstallColormap); @@ -600,37 +548,30 @@ miSpriteInstallColormap (pMap) SCREEN_EPILOGUE(pScreen, InstallColormap); -#ifdef MPX /* InstallColormap is called before devices are initialized. We cannot * just run through the device list, we need to go through all possible * sprite structs.*/ - cursorIdx = 0; - while(cursorIdx < MAX_DEVICES) + for (cursorIdx = 0; cursorIdx < MAX_DEVICES; cursorIdx++) { - pCursorInfo = &pPriv->mpCursors[cursorIdx]; -#endif + pCursorInfo = &pPriv->pDevCursors[cursorIdx]; pCursorInfo->pInstalledMap = pMap; if (pCursorInfo->pColormap != pMap) { pCursorInfo->checkPixels = TRUE; if (pCursorInfo->isUp) { -#ifdef MPX /* find matching device */ - pDev = inputInfo.devices; - while(pDev && pDev->id != cursorIdx) - pDev = pDev->next; - if (!pDev) - pDev = inputInfo.pointer; -#endif - miSpriteRemoveCursor (pDev, pScreen); - } - } -#ifdef MPX - cursorIdx++; + for(pDev = inputInfo.devices; pDev; pDev = pDev->next) + { + if (pDev->id == cursorIdx) + { + miSpriteRemoveCursor(pDev, pScreen); + break; + } + } + } + } } -#endif - } static void @@ -650,7 +591,6 @@ miSpriteStoreColors (pMap, ndef, pdef) pPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; SCREEN_PROLOGUE(pScreen, StoreColors); - pCursorInfo = pPriv->cp; (*pScreen->StoreColors) (pMap, ndef, pdef); @@ -670,14 +610,11 @@ miSpriteStoreColors (pMap, ndef, pdef) UpdateDAC(dev, plane,green,greenMask) \ UpdateDAC(dev, plane,blue,blueMask) -#ifdef MPX - pDev = inputInfo.devices; - while(pDev) + for(pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (MPHasCursor(pDev)) { - pCursorInfo = &pPriv->mpCursors[pDev->id]; -#endif + pCursorInfo = &pPriv->pDevCursors[pDev->id]; if (pCursorInfo->pColormap == pMap) { updated = 0; @@ -688,8 +625,8 @@ miSpriteStoreColors (pMap, ndef, pdef) for (i = 0; i < ndef; i++) { - CheckDirect (pPriv->cp, SOURCE_COLOR) - CheckDirect (pPriv->cp, MASK_COLOR) + CheckDirect (pCursorInfo, SOURCE_COLOR) + CheckDirect (pCursorInfo, MASK_COLOR) } } else @@ -720,11 +657,8 @@ miSpriteStoreColors (pMap, ndef, pdef) miSpriteRemoveCursor (pDev, pScreen); } } -#ifdef MPX } - pDev = pDev->next; } -#endif } @@ -784,16 +718,12 @@ miSpriteSaveDoomedAreas (pWin, pObscured, dx, dy) SCREEN_PROLOGUE (pScreen, SaveDoomedAreas); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - pCursorInfo = pScreenPriv->cp; -#ifdef MPX - pDev = inputInfo.devices; - while(pDev) + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if(MPHasCursor(pDev)) { - pCursorInfo = &pScreenPriv->mpCursors[pDev->id]; -#endif + pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; if (pCursorInfo->isUp) { cursorBox = pCursorInfo->saved; @@ -809,11 +739,8 @@ miSpriteSaveDoomedAreas (pWin, pObscured, dx, dy) miSpriteRemoveCursor (pDev, pScreen); } -#ifdef MPX } - pDev = pDev->next; } -#endif (*pScreen->SaveDoomedAreas) (pWin, pObscured, dx, dy); @@ -838,10 +765,8 @@ miSpriteRealizeCursor (pDev, pScreen, pCursor) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; pCursorInfo = pScreenPriv->cp; -#ifdef MPX if (MPHasCursor(pDev)) - pCursorInfo = &pScreenPriv->mpCursors[pDev->id]; -#endif + pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; if (pCursor == pCursorInfo->pCursor) pCursorInfo->checkPixels = TRUE; @@ -873,10 +798,9 @@ miSpriteSetCursor (pDev, pScreen, pCursor, x, y) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; miCursorInfoPtr pPointer = pScreenPriv->cp; -#ifdef MPX + if (MPHasCursor(pDev)) - pPointer = &pScreenPriv->mpCursors[pDev->id]; -#endif + pPointer = &pScreenPriv->pDevCursors[pDev->id]; if (!pCursor) { @@ -992,10 +916,9 @@ miSpriteMoveCursor (pDev, pScreen, x, y) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; pCursor = pScreenPriv->cp->pCursor; -#ifdef MPX if (MPHasCursor(pDev)) - pCursor = pScreenPriv->mpCursors[pDev->id].pCursor; -#endif + pCursor = pScreenPriv->pDevCursors[pDev->id].pCursor; + miSpriteSetCursor (pDev, pScreen, pCursor, x, y); } @@ -1016,10 +939,8 @@ miSpriteRemoveCursor (pDev, pScreen) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; pCursorInfo = pScreenPriv->cp; -#ifdef MPX if (MPHasCursor(pDev)) - pCursorInfo = &pScreenPriv->mpCursors[pDev->id]; -#endif + pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; miSpriteIsUpFALSE (pCursorInfo, pScreen, pScreenPriv); pCursorInfo->pCacheWin = NullWindow; @@ -1056,10 +977,8 @@ miSpriteRestoreCursor (pDev, pScreen) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; pCursorInfo = pScreenPriv->cp; -#ifdef MPX if (MPHasCursor(pDev)) - pCursorInfo = &pScreenPriv->mpCursors[pDev->id]; -#endif + pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; miSpriteComputeSaved (pDev, pScreen); pCursor = pCursorInfo->pCursor; @@ -1106,11 +1025,8 @@ miSpriteComputeSaved (pDev, pScreen) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; pCursorInfo = pScreenPriv->cp; -#ifdef MPX if (MPHasCursor(pDev)) - pCursorInfo = &pScreenPriv->mpCursors[pDev->id]; -#endif - + pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; pCursor = pCursorInfo->pCursor; x = pCursorInfo->x - (int)pCursor->bits->xhot; diff --git a/mi/mispritest.h b/mi/mispritest.h index 0ba5365ad..39875e0cb 100644 --- a/mi/mispritest.h +++ b/mi/mispritest.h @@ -88,9 +88,7 @@ typedef struct { VisualPtr pVisual; miSpriteCursorFuncPtr funcs; DamagePtr pDamage; /* damage tracking structure */ -#ifdef MPX - miCursorInfoPtr mpCursors; /* all cursor's info */ -#endif + miCursorInfoPtr pDevCursors; /* all cursors' info */ } miSpriteScreenRec, *miSpriteScreenPtr; #define SOURCE_COLOR 0 From 03c554283e49e449fd1282cf32564d15d9fd2c77 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 18 Dec 2006 15:33:54 +1030 Subject: [PATCH 032/634] mi: removing MPX ifdefs global sprite renaming in mipointer and misprite fixed: multiple remove cursor call in miSpriteInstallColormap fixed: wrong core pointer usage in miSpriteStoreColors dix: bugfix in CheckCursorConfinement removing MPX ifdefs removing MPX event generation (using Xi solely now) bugfix GrabDevice: uninitialized field in grab struct caused segfault xfree86: removing MPX fdefs Xi: removing MPX protocol events --- Changelog | 15 +++++++++++--- Xi/exevents.c | 35 ++++++++------------------------ dix/cursor.c | 20 +++++++++--------- dix/devices.c | 3 +++ dix/events.c | 37 +++++++++++++++++----------------- hw/xfree86/common/xf86Events.c | 5 +---- hw/xfree86/common/xf86Xinput.h | 3 --- include/inputstr.h | 1 + mi/midispcur.c | 10 ++++----- mi/mieq.c | 11 +++------- mi/mipointer.c | 2 +- mi/misprite.c | 30 +++++++++++++-------------- 12 files changed, 77 insertions(+), 95 deletions(-) diff --git a/Changelog b/Changelog index 7efc82a64..33f031333 100644 --- a/Changelog +++ b/Changelog @@ -7,15 +7,24 @@ mi: removing MPX ifdefs dix: bugfix in CheckCursorConfinement removing MPX ifdefs removing MPX event generation (using Xi solely now) + bugfix GrabDevice: uninitialized field in grab struct caused segfault + +xfree86: removing MPX fdefs + +Xi: removing MPX protocol events Files: + include/inputstr.h mi/midispcur.c - mi/misprite.c - mi/mispritest.h + mi/mieq.c mi/mipointer.c - dix/getevents.c + mi/misprite.c dix/events.c dix/cursor.c + dix/devices.c + hw/xfree86/common/xf86Events.c + hw/xfree86/common/xf86Input.h + Xi/exevents.c == 12.12.06 == dix: Moving SpriteRec into DeviceIntRec diff --git a/Xi/exevents.c b/Xi/exevents.c index 9c6519351..f1cb64778 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -73,12 +73,6 @@ SOFTWARE. #include "dixgrabs.h" /* CreateGrab() */ #include "scrnintstr.h" -#ifdef MPX -#include -#include -#include "mpxglobals.h" -#endif - #define WID(w) ((w) ? ((w)->drawable.id) : 0) #define AllModifiersMask ( \ ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \ @@ -124,6 +118,7 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count) ValuatorClassPtr v = other->valuator; deviceValuator *xV = (deviceValuator *) xE; + if (xE->u.u.type != DeviceValuator) { GetSpritePosition(other, &rootX, &rootY); xE->u.keyButtonPointer.rootX = rootX; @@ -236,11 +231,7 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count) if (other->fromPassiveGrab && (key == other->activatingKey)) deactivateDeviceGrab = TRUE; - } else if (xE->u.u.type == DeviceButtonPress -#ifdef MPX - || xE->u.u.type == MPXButtonPress -#endif - ) { + } else if (xE->u.u.type == DeviceButtonPress) { if (!b) return; @@ -256,18 +247,11 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count) if (xE->u.u.detail <= 5) b->state |= (Button1Mask >> 1) << xE->u.u.detail; SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify); -#ifdef MPX - if (xE->u.u.type == DeviceButtonPress) -#endif - if (!grab) - if (CheckDeviceGrabs(other, xE, 0, count)) - return; + if (!grab) + if (CheckDeviceGrabs(other, xE, 0, count)) + return; - } else if (xE->u.u.type == DeviceButtonRelease -#ifdef MPX - || xE->u.u.type == MPXButtonRelease -#endif - ) { + } else if (xE->u.u.type == DeviceButtonRelease) { if (!b) return; @@ -283,11 +267,8 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count) if (xE->u.u.detail <= 5) b->state &= ~((Button1Mask >> 1) << xE->u.u.detail); SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify); -#ifdef MPX - if (xE->u.u.type == DeviceButtonRelease) -#endif - if (!b->state && other->fromPassiveGrab) - deactivateDeviceGrab = TRUE; + if (!b->state && other->fromPassiveGrab) + deactivateDeviceGrab = TRUE; } else if (xE->u.u.type == ProximityIn) other->valuator->mode &= ~OutOfProximity; else if (xE->u.u.type == ProximityOut) diff --git a/dix/cursor.c b/dix/cursor.c index 7df854cd4..090ad5eaa 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -120,22 +120,22 @@ FreeCursor(pointer value, XID cid) /* FIXME: MPX: When FreeClientRessources is called, it calls FreeCursor * too often. Refcnt gots < 0 and FreeCursorBits segfaults because the * memory is already freed. */ + MPXDBG("freecursor refcount %d\n", pCurs->refcnt); if ( --pCurs->refcnt != 0) return(Success); - pDev = inputInfo.pointer; - for (nscr = 0; nscr < screenInfo.numScreens; nscr++) { pscr = screenInfo.screens[nscr]; for(pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) (void)( *pscr->UnrealizeCursor)(pDev, pscr, pCurs); } } FreeCursorBits(pCurs->bits); xfree( pCurs); + MPXDBG("freeing memory for cursor\n"); return(Success); } @@ -219,7 +219,6 @@ AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, pCurs->backGreen = backGreen; pCurs->backBlue = backBlue; - pDev = inputInfo.pointer; /* * realize the cursor for every screen */ @@ -228,7 +227,7 @@ AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, pscr = screenInfo.screens[nscr]; for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) { if (!( *pscr->RealizeCursor)(pDev, pscr, pCurs)) { @@ -241,7 +240,7 @@ AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, DeviceIntPtr pDevIt = inputInfo.devices; /*dev iterator*/ while(pDevIt && pDevIt != pDev) { - if (MPHasCursor(pDevIt)) + if (DevHasCursor(pDevIt)) ( *pscr->UnrealizeCursor)(pDevIt, pscr, pCurs); pDevIt = pDevIt->next; } @@ -252,7 +251,7 @@ AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, pDevIt = inputInfo.devices; while (pDevIt) { - if (MPHasCursor(pDevIt)) + if (DevHasCursor(pDevIt)) ( *pscr->UnrealizeCursor)(pDevIt, pscr, pCurs); pDevIt = pDevIt->next; } @@ -439,7 +438,6 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, pCurs->backGreen = backGreen; pCurs->backBlue = backBlue; - pDev = inputInfo.pointer; /* * realize the cursor for every screen */ @@ -448,7 +446,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, pscr = screenInfo.screens[nscr]; for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) { if (!( *pscr->RealizeCursor)(pDev, pscr, pCurs)) { @@ -461,7 +459,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, DeviceIntPtr pDevIt = inputInfo.devices; /*dev iterator*/ while(pDevIt && pDevIt != pDev) { - if (MPHasCursor(pDevIt)) + if (DevHasCursor(pDevIt)) ( *pscr->UnrealizeCursor)(pDevIt, pscr, pCurs); pDevIt = pDevIt->next; } @@ -472,7 +470,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, pDevIt = inputInfo.devices; while (pDevIt) { - if (MPHasCursor(pDevIt)) + if (DevHasCursor(pDevIt)) ( *pscr->UnrealizeCursor)(pDevIt, pscr, pCurs); pDevIt = pDevIt->next; } diff --git a/dix/devices.c b/dix/devices.c index b4896ac9f..adf418ca2 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -497,6 +497,9 @@ CloseDevice(register DeviceIntPtr dev) while (dev->xkb_interest) XkbRemoveResourceClient((DevicePtr)dev,dev->xkb_interest->resource); #endif + + if (DevHasCursor(dev)) + xfree((pointer)dev->pSprite); xfree(dev->sync.event); xfree(dev); diff --git a/dix/events.c b/dix/events.c index 5ab076452..a6fcf4d3b 100644 --- a/dix/events.c +++ b/dix/events.c @@ -175,8 +175,6 @@ xEvent *xeviexE; #include "dixgrabs.h" #include "dispatch.h" -#include "mpxglobals.h" - #define EXTENSION_EVENT_BASE 64 #define NoSuchEvent 0x80000000 /* so doesn't match NoEventMask */ @@ -243,15 +241,13 @@ static int spriteTraceSize = 0; static int spriteTraceGood; -#define MPXDBG(...) fprintf (stderr, "MPX: " __VA_ARGS__) - /** * True for the core pointer and any MPX device. * False for any other device (including keyboards). * Does ID checking for sane range as well. */ _X_EXPORT Bool -MPHasCursor(DeviceIntPtr pDev) +DevHasCursor(DeviceIntPtr pDev) { return (pDev == inputInfo.pointer || (pDev->isMPDev && pDev->id < MAX_DEVICES)); @@ -1210,7 +1206,7 @@ playmore: syncEvents.playingEvents = FALSE; for (dev = inputInfo.devices; dev; dev = dev->next) { - if (MPHasCursor(dev)) + if (DevHasCursor(dev)) { /* the following may have been skipped during replay, so do it now */ @@ -1315,7 +1311,7 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab, mouse->activeGrab = *grab; mouse->grab = &mouse->activeGrab; mouse->fromPassiveGrab = autoGrab; - PostNewCursor(inputInfo.pointer); + PostNewCursor(mouse); CheckGrabForSyncs(mouse,(Bool)grab->pointerMode, (Bool)grab->keyboardMode); } @@ -1876,9 +1872,6 @@ DeliverDeviceEvents(register WindowPtr pWin, register xEvent *xE, GrabPtr grab, register OtherInputMasks *inputMasks; int mskidx = dev->id; - if (IsMPXEvent(xE)) - mskidx = MPXmskidx; - inputMasks = wOtherInputMasks(pWin); if (inputMasks && !(filter & inputMasks->deliverableEvents[mskidx])) return 0; @@ -2082,7 +2075,7 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev) xeviehot.y = pSprite->hot.y; #endif pSprite->hotPhys = pSprite->hot; -#if !defined MPX + if ((pSprite->hotPhys.x != XE_KBPTR.rootX) || (pSprite->hotPhys.y != XE_KBPTR.rootY)) { @@ -2090,7 +2083,7 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev) pDev, pSprite->hotPhys.pScreen, pSprite->hotPhys.x, pSprite->hotPhys.y, FALSE); } -#endif + XE_KBPTR.rootX = pSprite->hot.x; XE_KBPTR.rootY = pSprite->hot.y; } @@ -2127,7 +2120,7 @@ WindowsRestructured() DeviceIntPtr pDev = inputInfo.devices; while(pDev) { - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) CheckMotion((xEvent *)NULL, pDev); pDev = pDev->next; } @@ -2150,7 +2143,7 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) pDev = inputInfo.devices; while(pDev) { - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) { pSprite = pDev->pSprite; pSprite->hot.x -= xoff; @@ -2196,7 +2189,7 @@ DefineInitialRootWindow(register WindowPtr win) while (pDev) { - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) { pSprite = pDev->pSprite; @@ -2257,7 +2250,11 @@ DefineInitialRootWindow(register WindowPtr win) void WindowHasNewCursor(WindowPtr pWin) { - PostNewCursor(inputInfo.pointer); + DeviceIntPtr pDev; + + for(pDev = inputInfo.devices; pDev; pDev = pDev->next) + if (DevHasCursor(pDev)) + PostNewCursor(pDev); } _X_EXPORT void @@ -2996,7 +2993,6 @@ ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count register ButtonClassPtr butc = mouse->button; SpritePtr pSprite = mouse->pSprite; - #ifdef XKB XkbSrvInfoPtr xkbi= inputInfo.keyboard->key->xkbInfo; #endif @@ -3997,6 +3993,9 @@ GrabDevice(register ClientPtr client, register DeviceIntPtr dev, { GrabRec tempGrab; + /* Otherwise segfaults happen on grabbed MPX devices */ + memset(&tempGrab, 0, sizeof(GrabRec)); + tempGrab.window = pWin; tempGrab.resource = client->clientAsMask; tempGrab.ownerEvents = ownerEvents; @@ -4004,6 +4003,8 @@ GrabDevice(register ClientPtr client, register DeviceIntPtr dev, tempGrab.pointerMode = other_mode; tempGrab.eventMask = mask; tempGrab.device = dev; + tempGrab.cursor = NULL; + (*dev->ActivateGrab)(dev, &tempGrab, time, FALSE); *status = GrabSuccess; } @@ -4589,7 +4590,7 @@ CheckCursorConfinement(WindowPtr pWin) for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) { grab = pDev->grab; if (grab && (confineTo = grab->confineTo)) diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index a552491ce..acadc485a 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -246,11 +246,8 @@ ProcessInputEvents () xf86Info.inputPending = FALSE; mieqProcessInputEvents(); -#ifndef MPX - /* For MPX, this is done inside the mieqProcessInputEvents() */ - miPointerUpdateSprite(inputInfo.pointer); -#endif + /* FIXME: This is a problem if we have multiple pointers */ miPointerGetPosition(inputInfo.pointer, &x, &y); xf86SetViewport(xf86Info.currentScreen, x, y); } diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h index 4c752cd32..e8abce7f6 100644 --- a/hw/xfree86/common/xf86Xinput.h +++ b/hw/xfree86/common/xf86Xinput.h @@ -82,10 +82,7 @@ #define XI86_CORE_KEYBOARD 0x20 /* device is the core keyboard */ #define XI86_POINTER_CAPABLE 0x40 /* capable of being a core pointer */ #define XI86_KEYBOARD_CAPABLE 0x80 /* capable of being a core keyboard */ - -#ifdef MPX #define XI86_MP_DEVICE 0x100 /* device is multipointer device */ -#endif #define XI_PRIVATE(dev) \ (((LocalDevicePtr)((dev)->public.devicePrivate))->private) diff --git a/include/inputstr.h b/include/inputstr.h index 048a34a7e..cc3280dc2 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -379,4 +379,5 @@ typedef struct _QdEvent { int evcount; } QdEventRec; +#define MPXDBG(...) ErrorF("MPX: " __VA_ARGS__ ) #endif /* INPUTSTRUCT_H */ diff --git a/mi/midispcur.c b/mi/midispcur.c index 38772f609..35f0fbaa7 100644 --- a/mi/midispcur.c +++ b/mi/midispcur.c @@ -538,7 +538,7 @@ miDCPutUpCursor (pDev, pScreen, pCursor, x, y, source, mask) pWin = WindowTable[pScreen->myNum]; pBuffer = pScreenPriv->pCoreBuffer; - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) pBuffer = &pScreenPriv->pCursorBuffers[pDev->id]; #ifdef ARGB_CURSOR @@ -589,7 +589,7 @@ miDCSaveUnderCursor (pDev, pScreen, x, y, w, h) pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; pBuffer = pScreenPriv->pCoreBuffer; - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) pBuffer = &pScreenPriv->pCursorBuffers[pDev->id]; pSave = pBuffer->pSave; @@ -628,7 +628,7 @@ miDCRestoreUnderCursor (pDev, pScreen, x, y, w, h) pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; pBuffer = pScreenPriv->pCoreBuffer; - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) pBuffer = &pScreenPriv->pCursorBuffers[pDev->id]; pSave = pBuffer->pSave; @@ -661,7 +661,7 @@ miDCChangeSave (pDev, pScreen, x, y, w, h, dx, dy) pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; pBuffer = pScreenPriv->pCoreBuffer; - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) pBuffer = &pScreenPriv->pCursorBuffers[pDev->id]; pSave = pBuffer->pSave; @@ -812,7 +812,7 @@ miDCMoveCursor (pDev, pScreen, pCursor, x, y, w, h, dx, dy, source, mask) pWin = WindowTable[pScreen->myNum]; pBuffer = pScreenPriv->pCoreBuffer; - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) pBuffer = &pScreenPriv->pCursorBuffers[pDev->id]; pTemp = pBuffer->pTemp; diff --git a/mi/mieq.c b/mi/mieq.c index b40944ee1..42cacfda6 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -227,9 +227,7 @@ mieqProcessInputEvents() else if (e->event[0].u.u.type == MotionNotify || e->event[0].u.u.type == ButtonPress || e->event[0].u.u.type == ButtonRelease) { -#ifdef MPX if (!e->pDev->isMPDev) -#endif SwitchCorePointer(e->pDev); dev = inputInfo.pointer; @@ -238,7 +236,6 @@ mieqProcessInputEvents() dev = e->pDev; } -#ifdef MPX /* MPX devices send both core and Xi events. * Use dev to get the correct processing function but supply * e->pDev to pass the correct device @@ -246,16 +243,14 @@ mieqProcessInputEvents() if (e->pDev->isMPDev) dev->public.processInputProc(e->event, e->pDev, e->nevents); else -#endif - dev->public.processInputProc(e->event, dev, e->nevents); + dev->public.processInputProc(e->event, dev, e->nevents); } -#ifdef MPX - /* Update the sprite now. Next event may be from different device. */ + + /* Update the sprite now. Next event may be from different device. */ if (e->event[0].u.u.type == MotionNotify && (e->pDev->isMPDev || e->pDev->coreEvents)) { miPointerUpdateSprite(e->pDev); } -#endif } } diff --git a/mi/mipointer.c b/mi/mipointer.c index 10e6f3ec5..1474cb9be 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -70,7 +70,7 @@ static miPointerPtr miCorePointer; */ static miPointerRec miPointers[MAX_DEVICES]; #define MIPOINTER(dev) \ - (MPHasCursor((dev))) ? &miPointers[(dev)->id] : miCorePointer + (DevHasCursor((dev))) ? &miPointers[(dev)->id] : miCorePointer static Bool miPointerRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); diff --git a/mi/misprite.c b/mi/misprite.c index 2e3b37641..70dda1c3c 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -152,7 +152,7 @@ miSpriteReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure) for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) { pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; @@ -318,7 +318,7 @@ miSpriteCloseScreen (i, pScreen) pScreen->SaveDoomedAreas = pScreenPriv->SaveDoomedAreas; for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) { miCursorInfoPtr pCursor; pCursor = &pScreenPriv->pDevCursors[pDev->id]; @@ -352,7 +352,7 @@ miSpriteGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine) for(pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) { pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; if (pDrawable->type == DRAWABLE_WINDOW && @@ -392,7 +392,7 @@ miSpriteGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart) for(pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) { pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; @@ -444,7 +444,7 @@ miSpriteSourceValidate (pDrawable, x, y, width, height) for(pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) { pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; if (pDrawable->type == DRAWABLE_WINDOW && pCursorInfo->isUp && @@ -477,7 +477,7 @@ miSpriteCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) for(pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) { pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; /* @@ -518,7 +518,7 @@ miSpriteBlockHandler (i, blockData, pTimeout, pReadmask) for(pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) { pCursorInfo = &pPriv->pDevCursors[pDev->id]; if (!pCursorInfo->isUp && pCursorInfo->shouldBeUp) @@ -612,7 +612,7 @@ miSpriteStoreColors (pMap, ndef, pdef) for(pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) { pCursorInfo = &pPriv->pDevCursors[pDev->id]; if (pCursorInfo->pColormap == pMap) @@ -721,7 +721,7 @@ miSpriteSaveDoomedAreas (pWin, pObscured, dx, dy) for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if(MPHasCursor(pDev)) + if(DevHasCursor(pDev)) { pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; if (pCursorInfo->isUp) @@ -765,7 +765,7 @@ miSpriteRealizeCursor (pDev, pScreen, pCursor) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; pCursorInfo = pScreenPriv->cp; - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; if (pCursor == pCursorInfo->pCursor) @@ -799,7 +799,7 @@ miSpriteSetCursor (pDev, pScreen, pCursor, x, y) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; miCursorInfoPtr pPointer = pScreenPriv->cp; - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) pPointer = &pScreenPriv->pDevCursors[pDev->id]; if (!pCursor) @@ -916,7 +916,7 @@ miSpriteMoveCursor (pDev, pScreen, x, y) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; pCursor = pScreenPriv->cp->pCursor; - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) pCursor = pScreenPriv->pDevCursors[pDev->id].pCursor; miSpriteSetCursor (pDev, pScreen, pCursor, x, y); @@ -939,7 +939,7 @@ miSpriteRemoveCursor (pDev, pScreen) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; pCursorInfo = pScreenPriv->cp; - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; miSpriteIsUpFALSE (pCursorInfo, pScreen, pScreenPriv); @@ -977,7 +977,7 @@ miSpriteRestoreCursor (pDev, pScreen) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; pCursorInfo = pScreenPriv->cp; - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; miSpriteComputeSaved (pDev, pScreen); @@ -1025,7 +1025,7 @@ miSpriteComputeSaved (pDev, pScreen) pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; pCursorInfo = pScreenPriv->cp; - if (MPHasCursor(pDev)) + if (DevHasCursor(pDev)) pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; pCursor = pCursorInfo->pCursor; From d8b5394eda9d92b7193004931caa6c24a337b2e6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 18 Dec 2006 17:35:34 +1030 Subject: [PATCH 033/634] Cleaning up ifdef MPX from remaining files, removing it from configure.ac. Removing building mpx extension from Makefile.am --- Changelog | 18 ++++++++++++++++++ Makefile.am | 2 -- configure.ac | 31 +++++++++---------------------- hw/xfree86/ramdac/xf86HWCurs.c | 3 --- include/dix-config.h.in | 3 --- include/dix.h | 4 +--- include/globals.h | 4 ---- include/xorg-server.h.in | 3 --- mi/mieq.c | 7 +------ mi/miinitext.c | 9 --------- mi/mipointer.h | 5 ----- os/utils.c | 3 --- 12 files changed, 29 insertions(+), 63 deletions(-) diff --git a/Changelog b/Changelog index 33f031333..589024860 100644 --- a/Changelog +++ b/Changelog @@ -26,6 +26,24 @@ Files: hw/xfree86/common/xf86Input.h Xi/exevents.c +____________________________________________________________ + +Cleaning up #ifdef MPX from remaining files, removing it from configure.ac. +Removing building mpx extension from Makefile.am + +Files: + Makefile.am + configure.ac + hw/xfree86/ramdac/xf86HWCurs.c + include/dix-config.h.in + include/dix.h + include/globals.h + include/xorg-server.h.in + mi/mieq.c + mi/miinitext.c + mi/mipointer.c + os/utils.c + == 12.12.06 == dix: Moving SpriteRec into DeviceIntRec removing global sprite structure diff --git a/Makefile.am b/Makefile.am index 572d0882f..f35539e49 100644 --- a/Makefile.am +++ b/Makefile.am @@ -42,7 +42,6 @@ SUBDIRS = \ randr \ render \ Xi \ - mpx \ xkb \ $(DBE_DIR) \ $(MFB_DIR) \ @@ -79,7 +78,6 @@ DIST_SUBDIRS = \ randr \ render \ Xi \ - mpx \ xkb \ dbe \ mfb \ diff --git a/configure.ac b/configure.ac index 43d53dc69..cf6b3acd3 100644 --- a/configure.ac +++ b/configure.ac @@ -421,8 +421,6 @@ AC_ARG_ENABLE(builtin-fonts, AS_HELP_STRING([--enable-builtin-fonts], [Use only AC_ARG_ENABLE(null-root-cursor, AS_HELP_STRING([--enable-null-root-cursor], [Use an empty root cursor (default: use core cursor)]), [NULL_ROOT_CURSOR=$enableval], [NULL_ROOT_CURSOR=no]) -AC_ARG_ENABLE(mpx, AS_HELP_STRING([--disable-mpx], [Disable MPX multipointer support (Default: enabled)]), [MPX=$enableval], [MPX=yes]) - dnl Extensions. AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=yes]) AC_ARG_ENABLE(mitshm, AS_HELP_STRING([--disable-shm], [Build SHM extension (default: enabled)]), [MITSHM=$enableval], [MITSHM=yes]) @@ -787,16 +785,6 @@ AC_DEFINE(XINPUT, 1, [Support X Input extension]) XI_LIB='$(top_builddir)/Xi/libXi.la' XI_INC='-I$(top_srcdir)/Xi' -dnl Enable MPX multipointer extension -AC_MSG_CHECKING([whether to use MPX extension]) -AC_MSG_RESULT([$MPX]) -AM_CONDITIONAL(MPX, [test "x$MPX" = xyes]) - -if test "x$MPX" = xyes; then - AC_DEFINE(MPX, 1, [Support MPX multipointer extension]) - MPX_LIB='$(top_builddir)/mpx/libmpx.la' - MPX_INC='-I$(top_srcdir)/mpx' -fi AM_CONDITIONAL(XF86UTILS, test "x$XF86UTILS" = xyes) AC_DEFINE(SHAPE, 1, [Support SHAPE extension]) @@ -1006,7 +994,7 @@ AC_EGREP_CPP([I_AM_SVR4],[ AC_DEFINE([SVR4],1,[Define to 1 on systems derived from System V Release 4]) AC_MSG_RESULT([yes])], AC_MSG_RESULT([no])) -XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC $MPX_INC" +XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC" AC_DEFINE_UNQUOTED(X_BYTE_ORDER,[$ENDIAN],[Endian order]) AC_SUBST([XSERVER_LIBS]) @@ -1031,7 +1019,7 @@ if test "x$DMX" = xyes; then modules not found.]) fi DMX_INCLUDES="$XEXT_INC $RENDER_INC $XTRAP_INC $RECORD_INC" - XDMX_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $RENDER_LIB $XTRAP_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $OS_LIB $CWRAP_LIB $MPX_LIB" + XDMX_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $RENDER_LIB $XTRAP_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $OS_LIB $CWRAP_LIB" AC_SUBST([XDMX_LIBS]) dnl USB sources in DMX require @@ -1070,7 +1058,7 @@ AC_MSG_RESULT([$XVFB]) AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes]) if test "x$XVFB" = xyes; then - XVFB_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS $MPX_LIB" + XVFB_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS" AC_SUBST([XVFB_LIBS]) fi @@ -1086,7 +1074,7 @@ AC_MSG_RESULT([$XNEST]) AM_CONDITIONAL(XNEST, [test "x$XNEST" = xyes]) if test "x$XNEST" = xyes; then - XNEST_LIBS="$XSERVER_LIBS $FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS $MPX_LIB" + XNEST_LIBS="$XSERVER_LIBS $FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS" AC_SUBST([XNEST_LIBS]) fi @@ -1115,7 +1103,7 @@ AC_MSG_RESULT([$XGL]) AM_CONDITIONAL(XGL, [test "x$XGL" = xyes]) if test "x$XGL" = xyes; then - XGL_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $MPX_LIB" + XGL_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB" AC_SUBST([XGL_LIBS]) AC_DEFINE(XGL_MODULAR, 1, [Use loadable XGL modules]) @@ -1136,7 +1124,7 @@ AC_MSG_RESULT([$XEGL]) AM_CONDITIONAL(XEGL, [test "x$XEGL" = xyes]) if test "x$XEGL" = xyes; then - XEGL_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $MPX_LIB" + XEGL_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB" AC_SUBST([XEGL_LIBS]) fi @@ -1152,7 +1140,7 @@ AC_MSG_RESULT([$XGLX]) AM_CONDITIONAL(XGLX, [test "x$XGLX" = xyes]) if test "x$XGLX" = xyes; then - XGLX_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $MPX_LIB" + XGLX_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB" AC_SUBST([XGLX_LIBS]) fi @@ -1173,7 +1161,7 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os' XORG_INCS="$XORG_DDXINCS $XORG_OSINCS" XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H" - XORG_LIBS="$COMPOSITE_LIB $MI_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XPSTUBS_LIB $OS_LIB $MPX_LIB" + XORG_LIBS="$COMPOSITE_LIB $MI_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XPSTUBS_LIB $OS_LIB" if test "x$DGA" = xauto; then PKG_CHECK_MODULES(DGA, xf86dgaproto, [DGA=yes], [DGA=no]) @@ -1639,7 +1627,7 @@ if test "$KDRIVE" = yes; then # dix os fb mi extension glx (NOTYET) damage shadow xpstubs #KDRIVE_PURE_LIBS="$DIX_LIB $OS_LIB $FB_LIB $XEXT_LIB $MIEXT_DAMAGE_LIB \ # $MIEXT_SHADOW_LIB $XPSTUBS_LIB" - KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB $MPX_LIB" + KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB" KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a' case $host_os in *linux*) @@ -1830,7 +1818,6 @@ render/Makefile xkb/Makefile Xext/Makefile Xi/Makefile -mpx/Makefile xfixes/Makefile exa/Makefile hw/Makefile diff --git a/hw/xfree86/ramdac/xf86HWCurs.c b/hw/xfree86/ramdac/xf86HWCurs.c index b76b8005f..2dfc4b27b 100644 --- a/hw/xfree86/ramdac/xf86HWCurs.c +++ b/hw/xfree86/ramdac/xf86HWCurs.c @@ -73,12 +73,9 @@ static unsigned char* RealizeCursorInterleave64(xf86CursorInfoPtr, CursorPtr); Bool xf86InitHardwareCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr) { - -#ifdef MPX /* Graphics cards cannot render multiple cursors in hardware. We have to software render them. */ return FALSE; -#endif if ((infoPtr->MaxWidth <= 0) || (infoPtr->MaxHeight <= 0)) return FALSE; diff --git a/include/dix-config.h.in b/include/dix-config.h.in index 29b044c8a..7aabae2ec 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -350,9 +350,6 @@ /* Support X Input extension */ #undef XINPUT -/* Support MPX multipointer extension */ -#undef MPX - /* Build XKB */ #undef XKB diff --git a/include/dix.h b/include/dix.h index 959d5dc45..aaefb0cbc 100644 --- a/include/dix.h +++ b/include/dix.h @@ -825,8 +825,6 @@ extern int xstrcasecmp(char *s1, char *s2); /* ffs.c */ extern int ffs(int i); -#ifdef MPX -extern Bool MPHasCursor(DeviceIntPtr pDev); -#endif +extern Bool DevHasCursor(DeviceIntPtr pDev); #endif /* DIX_H */ diff --git a/include/globals.h b/include/globals.h index ef2256199..821b12bdb 100644 --- a/include/globals.h +++ b/include/globals.h @@ -63,10 +63,6 @@ extern Bool noCompositeExtension; extern Bool noDamageExtension; #endif -#ifdef MPX -extern Bool noMPXExtension; -#endif - #ifdef DBE extern Bool noDbeExtension; #endif diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in index c58e2b39a..48196d8b6 100644 --- a/include/xorg-server.h.in +++ b/include/xorg-server.h.in @@ -142,9 +142,6 @@ /* Support X Input extension */ #undef XINPUT -/* Support MPX multipointer extension */ -#undef MPX - /* Build XKB */ #undef XKB diff --git a/mi/mieq.c b/mi/mieq.c index 42cacfda6..49bf867cd 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -24,7 +24,6 @@ in this Software without prior written authorization from The Open Group. * * Author: Keith Packard, MIT X Consortium */ -#ifdef MPX /* * MPX additions: * Copyright © 2006 Peter Hutterer @@ -32,7 +31,6 @@ in this Software without prior written authorization from The Open Group. * Author: Peter Hutterer * */ -#endif /* * mieq.c @@ -110,13 +108,10 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e) deviceKeyButtonPointer *lastkbp = (deviceKeyButtonPointer *) &laste->event[0]; -#ifdef MPX /* avoid merging events from different devices */ if (e->u.u.type == MotionNotify && pDev->isMPDev) isMotion = pDev->id; - else -#endif - if (e->u.u.type == MotionNotify) + else if (e->u.u.type == MotionNotify) isMotion = inputInfo.pointer->id; else if (e->u.u.type == DeviceMotionNotify) isMotion = pDev->id | (1 << 8); /* flag to indicate DeviceMotion */ diff --git a/mi/miinitext.c b/mi/miinitext.c index 3d9522d78..cb3447372 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -384,9 +384,6 @@ extern void DamageExtensionInit(INITARGS); #ifdef COMPOSITE extern void CompositeExtensionInit(INITARGS); #endif -#ifdef MPX -extern void MPXExtensionInit(INITARGS); -#endif /* The following is only a small first step towards run-time * configurable extensions. @@ -666,9 +663,6 @@ InitExtensions(argc, argv) #ifdef DAMAGE if (!noDamageExtension) DamageExtensionInit(); #endif -#ifdef MPX - if (!noMPXExtension) MPXExtensionInit(); -#endif } void @@ -739,9 +733,6 @@ static ExtensionModule staticExtensions[] = { #ifdef XEVIE { XevieExtensionInit, "XEVIE", &noXevieExtension, NULL }, #endif -#ifdef MPX - { MPXExtensionInit, "MPX", &noMPXExtension, NULL }, -#endif { NULL, NULL, NULL, NULL, NULL } }; diff --git a/mi/mipointer.h b/mi/mipointer.h index 85c5c8b2e..541e89bdf 100644 --- a/mi/mipointer.h +++ b/mi/mipointer.h @@ -189,9 +189,4 @@ extern void miPointerMoved( extern int miPointerScreenIndex; -#ifdef MPX -_X_EXPORT Bool IsMPDev(DeviceIntPtr pDev); -#endif - - #endif /* MIPOINTER_H */ diff --git a/os/utils.c b/os/utils.c index 42d41ce85..9824501e7 100644 --- a/os/utils.c +++ b/os/utils.c @@ -252,9 +252,6 @@ _X_EXPORT Bool noXIdleExtension = FALSE; #ifdef XV _X_EXPORT Bool noXvExtension = FALSE; #endif -#ifdef MPX -_X_EXPORT Bool noMPXExtension = FALSE; -#endif #define X_INCLUDE_NETDB_H #include From 202b46eb6bf0d5f94973c2bf1e4ebe9d154eadbf Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 20 Dec 2006 13:05:53 +1030 Subject: [PATCH 034/634] xfree86: Changing "IsMPDevice" to "SharedPointer" option. Devices will default to MP devices. Xi: Adding QueryDevicePointer request/reply Adding WarpDevicePointer request/reply --- Changelog | 25 ++++- Xi/Makefile.am | 6 +- Xi/extinit.c | 13 +++ Xi/querydp.c | 166 +++++++++++++++++++++++++++++ Xi/querydp.h | 44 ++++++++ Xi/warpdevp.c | 186 +++++++++++++++++++++++++++++++++ Xi/warpdevp.h | 39 +++++++ dix/cursor.c | 3 - dix/events.c | 3 +- hw/xfree86/common/xf86Cursor.c | 4 +- hw/xfree86/common/xf86Xinput.c | 10 +- hw/xfree86/common/xf86Xinput.h | 2 +- include/dix.h | 7 ++ 13 files changed, 493 insertions(+), 15 deletions(-) create mode 100644 Xi/querydp.c create mode 100644 Xi/querydp.h create mode 100644 Xi/warpdevp.c create mode 100644 Xi/warpdevp.h diff --git a/Changelog b/Changelog index 589024860..f69846509 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,27 @@ -== 14.12.06 == +== 20.12.06 == +xfree86: Changing "IsMPDevice" to "SharedPointer" option. Devices will default + to MP devices. + +Xi: Adding QueryDevicePointer request/reply + Adding WarpDevicePointer request/reply + +Files: + hw/xfree86/common/xf86Xinput.c + hw/xfree86/common/xf86Cursor.c + hw/xfree86/common/xf86Xinput.h + Xi/extinit.c + Xi/querydp.c + Xi/querydp.h + Xi/Makefile.am + Xi/warpdevp.c + Xi/warpdevp.h + dix/cursor.c + dix/events.c + dix/dix.h + +Note: This commit requires libXi additions to use the new functions. + +== 18.12.06 == mi: removing MPX ifdefs global sprite renaming in mipointer and misprite fixed: multiple remove cursor call in miSpriteInstallColormap diff --git a/Xi/Makefile.am b/Xi/Makefile.am index fbe438543..0aa58449f 100644 --- a/Xi/Makefile.am +++ b/Xi/Makefile.am @@ -54,6 +54,8 @@ libXi_la_SOURCES = \ listdev.h \ opendev.c \ opendev.h \ + querydp.c \ + querydp.h \ queryst.c \ queryst.h \ selectev.c \ @@ -75,6 +77,8 @@ libXi_la_SOURCES = \ ungrdevb.c \ ungrdevb.h \ ungrdevk.c \ - ungrdevk.h + ungrdevk.h \ + warpdevp.c \ + warpdevp.h EXTRA_DIST = stubs.c diff --git a/Xi/extinit.c b/Xi/extinit.c index 454883762..161995883 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -98,6 +98,7 @@ SOFTWARE. #include "gtmotion.h" #include "listdev.h" #include "opendev.h" +#include "querydp.h" #include "queryst.h" #include "selectev.h" #include "sendexev.h" @@ -110,6 +111,7 @@ SOFTWARE. #include "ungrdev.h" #include "ungrdevb.h" #include "ungrdevk.h" +#include "warpdevp.h" static Mask lastExtEventMask = 1; int ExtEventIndex; @@ -334,6 +336,10 @@ ProcIDispatch(register ClientPtr client) return (ProcXGetDeviceControl(client)); else if (stuff->data == X_ChangeDeviceControl) return (ProcXChangeDeviceControl(client)); + else if (stuff->data == X_QueryDevicePointer) + return (ProcXQueryDevicePointer(client)); + else if (stuff->data == X_WarpDevicePointer) + return (ProcXWarpDevicePointer(client)); else { SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); } @@ -423,6 +429,10 @@ SProcIDispatch(register ClientPtr client) return (SProcXGetDeviceControl(client)); else if (stuff->data == X_ChangeDeviceControl) return (SProcXChangeDeviceControl(client)); + else if (stuff->data == X_QueryDevicePointer) + return (SProcXQueryDevicePointer(client)); + else if (stuff->data == X_WarpDevicePointer) + return (SProcXWarpDevicePointer(client)); else { SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); } @@ -495,6 +505,9 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep) else if (rep->RepType == X_ChangeDeviceControl) SRepXChangeDeviceControl(client, len, (xChangeDeviceControlReply *) rep); + else if (rep->RepType == X_QueryDevicePointer) + SRepXQueryDevicePointer(client, len, + (xQueryDevicePointerReply *) rep); else { FatalError("XINPUT confused sending swapped reply"); } diff --git a/Xi/querydp.c b/Xi/querydp.c new file mode 100644 index 000000000..04323e42a --- /dev/null +++ b/Xi/querydp.c @@ -0,0 +1,166 @@ +/* + +Copyright 2006 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +/*********************************************************************** + * + * Request to query the pointer location of an extension input device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exevents.h" +#include "exglobals.h" + +#ifdef PANORAMIX +#include "panoramiXsrv.h" +#endif + +#include "querydp.h" + +/*********************************************************************** + * + * This procedure allows a client to query the pointer of a device. + * + */ + +int +SProcXQueryDevicePointer(register ClientPtr client) +{ + register char n; + + REQUEST(xQueryDevicePointerReq); + swaps(&stuff->length, n); + return (ProcXQueryDevicePointer(client)); +} + +int +ProcXQueryDevicePointer(register ClientPtr client) +{ + int rc; + xQueryDevicePointerReply rep; + DeviceIntPtr pDev; + WindowPtr pWin, t; + SpritePtr pSprite; + + REQUEST(xQueryDevicePointerReq); + REQUEST_SIZE_MATCH(xQueryDevicePointerReq); + + pDev = LookupDeviceIntRec(stuff->deviceid); + if (pDev == NULL) { + SendErrorToClient(client, IReqCode, X_QueryDevicePointer, + stuff->deviceid, BadDevice); + return Success; + } + + rc = dixLookupWindow(&pWin, stuff->win, client, DixReadAccess); + if (rc != Success) + { + SendErrorToClient(client, IReqCode, X_QueryDevicePointer, + stuff->win, rc); + return Success; + } + + if (pDev->valuator->motionHintWindow) + MaybeStopHint(pDev, client); + + pSprite = pDev->pSprite; + rep.repType = X_Reply; + rep.RepType = X_QueryDevicePointer; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.mask = pDev->button->state | inputInfo.keyboard->key->state; + rep.root = (GetCurrentRootWindow())->drawable.id; + rep.rootX = pSprite->hot.x; + rep.rootY = pSprite->hot.y; + rep.child = None; + rep.shared = (pDev->isMPDev) ? xFalse : xTrue; + + if (pSprite->hot.pScreen == pWin->drawable.pScreen) + { + rep.sameScreen = xTrue; + rep.winX = pSprite->hot.x - pWin->drawable.x; + rep.winY = pSprite->hot.y - pWin->drawable.y; + for (t = pSprite->win; t; t = t->parent) + if (t->parent == pWin) + { + rep.child = t->drawable.id; + break; + } + } else + { + rep.sameScreen = xFalse; + rep.winX = 0; + rep.winY = 0; + } + +#ifdef PANORAMIX + if(!noPanoramiXExtension) { + rep.rootX += panoramiXdataPtr[0].x; + rep.rootY += panoramiXdataPtr[0].y; + if (stuff->win == rep.root) + { + rep.winX += panoramiXdataPtr[0].x; + rep.winY += panoramiXdataPtr[0].y; + } + } +#endif + + WriteReplyToClient(client, sizeof(xQueryDevicePointerReply), &rep); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XQueryDevicePointer function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXQueryDevicePointer(ClientPtr client, int size, + xQueryDevicePointerReply * rep) +{ + register char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/Xi/querydp.h b/Xi/querydp.h new file mode 100644 index 000000000..acad548ab --- /dev/null +++ b/Xi/querydp.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 2006 by Peter Hutterer + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef QUERYDP_H +#define QUERYDP_H 1 + +int SProcXQueryDevicePointer(ClientPtr /* client */ + ); + +int ProcXQueryDevicePointer(ClientPtr /* client */ + ); + +void SRepXQueryDevicePointer(ClientPtr /* client */ , + int /* size */ , + xQueryDevicePointerReply * /* rep */ + ); + +#endif /* QUERYDP_H */ diff --git a/Xi/warpdevp.c b/Xi/warpdevp.c new file mode 100644 index 000000000..2b558d103 --- /dev/null +++ b/Xi/warpdevp.c @@ -0,0 +1,186 @@ +/* + +Copyright 2006 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +/*********************************************************************** + * + * Request to Warp the pointer location of an extension input device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exevents.h" +#include "exglobals.h" + + +#include "warpdevp.h" +/*********************************************************************** + * + * This procedure allows a client to warp the pointer of a device. + * + */ + +int +SProcXWarpDevicePointer(register ClientPtr client) +{ + register char n; + + REQUEST(xWarpDevicePointerReq); + swaps(&stuff->length, n); + return (ProcXWarpDevicePointer(client)); +} + +int +ProcXWarpDevicePointer(register ClientPtr client) +{ + int err; + int x, y; + WindowPtr dest = NULL; + DeviceIntPtr pDev; + SpritePtr pSprite; + ScreenPtr newScreen; + + REQUEST(xWarpDevicePointerReq); + REQUEST_SIZE_MATCH(xWarpDevicePointerReq); + + /* FIXME: panoramix stuff is missing, look at ProcWarpPointer */ + + pDev = LookupDeviceIntRec(stuff->deviceid); + if (pDev == NULL) { + SendErrorToClient(client, IReqCode, X_WarpDevicePointer, 0, + BadDevice); + return Success; + } + + if (stuff->dst_win != None) + { + err = dixLookupWindow(&dest, stuff->dst_win, client, DixReadAccess); + if (err != Success) + { + SendErrorToClient(client, IReqCode, X_WarpDevicePointer, + stuff->dst_win, err); + return Success; + } + } + + pSprite = pDev->pSprite; + x = pSprite->hotPhys.x; + y = pSprite->hotPhys.y; + + if (stuff->src_win != None) + { + int winX, winY; + WindowPtr src; + + err = dixLookupWindow(&src, stuff->src_win, client, DixReadAccess); + if (err != Success) + { + SendErrorToClient(client, IReqCode, X_WarpDevicePointer, + stuff->src_win, err); + return Success; + } + + winX = src->drawable.x; + winY = src->drawable.y; + if (src->drawable.pScreen != pSprite->hotPhys.pScreen || + x < winX + stuff->src_x || + y < winY + stuff->src_y || + (stuff->src_width != 0 && + winX + stuff->src_x + (int)stuff->src_width < 0) || + (stuff->src_height != 0 && + winY + stuff->src_y + (int)stuff->src_height < y) || + !PointInWindowIsVisible(src, x, y)) + return Success; + } + + if (dest) + { + x = dest->drawable.x; + y = dest->drawable.y; + newScreen = dest->drawable.pScreen; + } else + newScreen = pSprite->hotPhys.pScreen; + + x += stuff->dst_x; + y += stuff->dst_y; + + if (x < 0) + x = 0; + else if (x > newScreen->width) + x = newScreen->width - 1; + + if (y < 0) + y = 0; + else if (y > newScreen->height) + y = newScreen->height - 1; + + if (newScreen == pSprite->hotPhys.pScreen) + { + if (x < pSprite->physLimits.x1) + x = pSprite->physLimits.x1; + else if (x >= pSprite->physLimits.x2) + x = pSprite->physLimits.x2 - 1; + + if (y < pSprite->physLimits.y1) + y = pSprite->physLimits.y1; + else if (y >= pSprite->physLimits.y2) + y = pSprite->physLimits.y2 - 1; + +#if defined(SHAPE) + if (pSprite->hotShape) + ConfineToShape(pDev, pSprite->hotShape, &x, &y); +#endif + (*newScreen->SetCursorPosition)(pDev, newScreen, x, y, TRUE); + } else if (!PointerConfinedToScreen(pDev)) + { + NewCurrentScreen(pDev, newScreen, x, y); + } + + /* if we don't update the device, we get a jump next time it moves */ + pDev->valuator->lastx = x; + pDev->valuator->lasty = x; + miPointerUpdateSprite(pDev); + + /* FIXME: XWarpPointer is supposed to generate an event. It doesn't do it + here though. */ + return Success; +} + diff --git a/Xi/warpdevp.h b/Xi/warpdevp.h new file mode 100644 index 000000000..8ce5b7098 --- /dev/null +++ b/Xi/warpdevp.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 2006 by Peter Hutterer + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef WARPDEVP_H +#define WARPDEVP_H 1 + +int SProcXWarpDevicePointer(ClientPtr /* client */ + ); + +int ProcXWarpDevicePointer(ClientPtr /* client */ + ); + +#endif /* WARPDEVP_H */ diff --git a/dix/cursor.c b/dix/cursor.c index f4e332f66..b58a7bf81 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -117,9 +117,6 @@ FreeCursor(pointer value, XID cid) ScreenPtr pscr; DeviceIntPtr pDev; - /* FIXME: MPX: When FreeClientRessources is called, it calls FreeCursor - * too often. Refcnt gots < 0 and FreeCursorBits segfaults because the - * memory is already freed. */ MPXDBG("freecursor refcount %d\n", pCurs->refcnt); if ( --pCurs->refcnt != 0) return(Success); diff --git a/dix/events.c b/dix/events.c index 73977c9f0..81efb708a 100644 --- a/dix/events.c +++ b/dix/events.c @@ -324,7 +324,6 @@ static CARD8 criticalEvents[32] = }; #ifdef PANORAMIX -static void ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py); static void PostNewCursor(DeviceIntPtr pDev); #define SyntheticMotion(dev, x, y) \ @@ -700,7 +699,7 @@ SetCriticalEvent(int event) } #ifdef SHAPE -static void +void ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py) { BoxRec box; diff --git a/hw/xfree86/common/xf86Cursor.c b/hw/xfree86/common/xf86Cursor.c index 27264a252..bbd6124af 100644 --- a/hw/xfree86/common/xf86Cursor.c +++ b/hw/xfree86/common/xf86Cursor.c @@ -434,9 +434,9 @@ xf86WarpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { int sigstate; sigstate = xf86BlockSIGIO (); - miPointerWarpCursor(pDev, pScreen,x,y); + miPointerWarpCursor(pDev, pScreen, x, y); - xf86Info.currentScreen = pScreen; + xf86Info.currentScreen = pScreen; xf86UnblockSIGIO (sigstate); } diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index c262a9561..6f1ebf768 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -132,10 +132,10 @@ xf86ProcessCommonOptions(LocalDevicePtr local, xf86Msg(X_CONFIG, "%s: always reports core events\n", local->name); } - if (xf86SetBoolOption(list, "IsMPDevice", 0)) { - local->flags |= XI86_MP_DEVICE; - xf86Msg(X_CONFIG, "%s: is MP device\n", local->name); - } + if (xf86SetBoolOption(list, "SharedPointer", 0)) { + local->flags &= ~XI86_SHARED_POINTER; + xf86Msg(X_CONFIG, "%s: is shared device\n", local->name); + } if (xf86SetBoolOption(list, "SendDragEvents", 1)) { local->flags |= XI86_SEND_DRAG_EVENTS; @@ -171,7 +171,7 @@ xf86ActivateDevice(LocalDevicePtr local) local->dev = dev; dev->coreEvents = local->flags & XI86_ALWAYS_CORE; - dev->isMPDev = (local->flags & XI86_MP_DEVICE); + dev->isMPDev = !(local->flags & XI86_SHARED_POINTER); InitSprite(dev, dev->isMPDev); RegisterOtherDevice(dev); diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h index e8abce7f6..4eaf8fc6d 100644 --- a/hw/xfree86/common/xf86Xinput.h +++ b/hw/xfree86/common/xf86Xinput.h @@ -82,7 +82,7 @@ #define XI86_CORE_KEYBOARD 0x20 /* device is the core keyboard */ #define XI86_POINTER_CAPABLE 0x40 /* capable of being a core pointer */ #define XI86_KEYBOARD_CAPABLE 0x80 /* capable of being a core keyboard */ -#define XI86_MP_DEVICE 0x100 /* device is multipointer device */ +#define XI86_SHARED_POINTER 0x100 /* device shares core cursor */ #define XI_PRIVATE(dev) \ (((LocalDevicePtr)((dev)->public.devicePrivate))->private) diff --git a/include/dix.h b/include/dix.h index 266241906..8e34211c0 100644 --- a/include/dix.h +++ b/include/dix.h @@ -416,6 +416,13 @@ extern void SetMaskForEvent( Mask /* mask */, int /* event */); +#ifdef SHAPE +extern void ConfineToShape( + DeviceIntPtr /* pDev */, + RegionPtr /* shape */, + int* /* px */, + int* /* py */); +#endif extern Bool IsParent( WindowPtr /* maybeparent */, From b55e1239ac3b2962a33d8af1f911cc0f01f40f23 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 20 Dec 2006 14:43:38 +1030 Subject: [PATCH 035/634] xfree86: fix xf86ActivateDevice(): only set to MP device if not a keyboard --- Changelog | 9 +++++++++ Xi/extinit.c | 15 +++++++++++++++ hw/xfree86/common/xf86Xinput.c | 3 ++- include/extinit.h | 4 ++++ 4 files changed, 30 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index f69846509..01bc1e8b1 100644 --- a/Changelog +++ b/Changelog @@ -21,6 +21,15 @@ Files: Note: This commit requires libXi additions to use the new functions. +____________________________________________________________ + +xfree86: fix xf86ActivateDevice(): only set to MP device if not a keyboard + +Files: + hw/xfree86/common/xf86Xinput.c + include/extinit.h + Xi/extinit.c + == 18.12.06 == mi: removing MPX ifdefs global sprite renaming in mipointer and misprite diff --git a/Xi/extinit.c b/Xi/extinit.c index 161995883..7c737a143 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -866,6 +866,21 @@ AssignTypeAndName(DeviceIntPtr dev, Atom type, char *name) strcpy(dev->name, name); } +/*********************************************************************** + * + * Returns true if a device may require a pointer (is not a keyboard). + * + */ +_X_EXPORT Bool +MayNeedPointer(DeviceIntPtr dev) +{ + /* return false if device is a keyboard */ + if (dev_type[0].type == dev->type) + return FALSE; + + return TRUE; +} + /*********************************************************************** * * Make device type atoms. diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 6f1ebf768..bf97112b4 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -171,7 +171,8 @@ xf86ActivateDevice(LocalDevicePtr local) local->dev = dev; dev->coreEvents = local->flags & XI86_ALWAYS_CORE; - dev->isMPDev = !(local->flags & XI86_SHARED_POINTER); + dev->isMPDev = + MayNeedPointer(dev) && !(local->flags & XI86_SHARED_POINTER); InitSprite(dev, dev->isMPDev); RegisterOtherDevice(dev); diff --git a/include/extinit.h b/include/extinit.h index 2087d74d6..5546b210f 100644 --- a/include/extinit.h +++ b/include/extinit.h @@ -131,6 +131,10 @@ AssignTypeAndName ( char * /* name */ ); +Bool MayNeedPointer( + DeviceIntPtr /* dev */ + ); + void MakeDeviceTypeAtoms ( void From 056c919d849a78c8d507bfcecfa74c0b0165751a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 20 Dec 2006 14:49:17 +1030 Subject: [PATCH 036/634] removing MPX extension files --- Changelog | 8 ++ include/mpxevents.h | 19 --- include/mpxextinit.h | 72 ----------- mpx/Makefile.am | 18 --- mpx/extinit.c | 299 ------------------------------------------- mpx/getevbase.c | 55 -------- mpx/getevbase.h | 16 --- mpx/getvers.c | 81 ------------ mpx/getvers.h | 22 ---- mpx/listdev.c | 187 --------------------------- mpx/listdev.h | 53 -------- mpx/mpxglobals.h | 29 ----- mpx/queryptr.c | 90 ------------- mpx/queryptr.h | 16 --- mpx/selectev.c | 146 --------------------- mpx/selectev.h | 17 --- 16 files changed, 8 insertions(+), 1120 deletions(-) delete mode 100644 include/mpxevents.h delete mode 100644 include/mpxextinit.h delete mode 100644 mpx/Makefile.am delete mode 100644 mpx/extinit.c delete mode 100644 mpx/getevbase.c delete mode 100644 mpx/getevbase.h delete mode 100644 mpx/getvers.c delete mode 100644 mpx/getvers.h delete mode 100644 mpx/listdev.c delete mode 100644 mpx/listdev.h delete mode 100644 mpx/mpxglobals.h delete mode 100644 mpx/queryptr.c delete mode 100644 mpx/queryptr.h delete mode 100644 mpx/selectev.c delete mode 100644 mpx/selectev.h diff --git a/Changelog b/Changelog index 01bc1e8b1..0cf051ff8 100644 --- a/Changelog +++ b/Changelog @@ -30,6 +30,14 @@ Files: include/extinit.h Xi/extinit.c +____________________________________________________________ +removing MPX extension files + +Files: + mpx/ + include/mpxevents.h + include/mpxextinit.h + == 18.12.06 == mi: removing MPX ifdefs global sprite renaming in mipointer and misprite diff --git a/include/mpxevents.h b/include/mpxevents.h deleted file mode 100644 index 99bf2b009..000000000 --- a/include/mpxevents.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2006 by Peter Hutterer */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef MPXEVENTS_H -#define MPXEVENTS_H 1 - -#include /* for inputstr.h */ -#include /* Request macro */ -#include "inputstr.h" /* DeviceIntPtr */ - -extern int MPXSelectForWindow( - WindowPtr /* pWin */, - ClientPtr /* client */, - int /* mask */); - -#endif diff --git a/include/mpxextinit.h b/include/mpxextinit.h deleted file mode 100644 index 02be6c1f6..000000000 --- a/include/mpxextinit.h +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright 2006 by Peter Hutterer */ - -/******************************************************************** - * Interface of mpx/extinit.c - */ - -#ifndef MPXEXTINIT_H -#define MPXEXTINIT_H - -#include "extnsionst.h" - -void -MPXExtensionInit( - void - ); - -int -ProcMPXDispatch ( - ClientPtr /* client */ - ); - -int -SProcMPXDispatch( - ClientPtr /* client */ - ); - -void -SReplyMPXDispatch ( - ClientPtr /* client */, - int /* len */, - xMPXGetExtensionVersionReply * /* rep */ - ); - -void -SEventMPXDispatch ( - xEvent * /* from */, - xEvent * /* to */ - ); - -void -MPXFixExtensionEvents ( - ExtensionEntry * /* extEntry */ - ); - -void -MPXResetProc( - ExtensionEntry * /* unused */ - ); - -Mask -MPXGetNextExtEventMask ( - void -); - -void -MPXSetMaskForExtEvent( - Mask /* mask */, - int /* event */ - ); - -void -MPXAllowPropagateSuppress ( - Mask /* mask */ - ); - -void -MPXRestoreExtensionEvents ( - void - ); -#endif - - diff --git a/mpx/Makefile.am b/mpx/Makefile.am deleted file mode 100644 index b35d8e7fe..000000000 --- a/mpx/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -noinst_LTLIBRARIES = libmpx.la - -AM_CFLAGS = $(DIX_CFLAGS) - -libmpx_la_SOURCES = \ - extinit.c \ - getvers.c \ - getvers.h \ - listdev.c \ - listdev.h \ - selectev.c \ - selectev.h \ - mpxglobals.h \ - getevbase.c \ - getevbase.h \ - queryptr.h \ - queryptr.c - diff --git a/mpx/extinit.c b/mpx/extinit.c deleted file mode 100644 index 4b4bd477e..000000000 --- a/mpx/extinit.c +++ /dev/null @@ -1,299 +0,0 @@ -/* Copyright 2006 by Peter Hutterer */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "inputstr.h" -#include "extnsionst.h" /* extension entry */ -#include -#include -#include - -#include "mpxglobals.h" -#include "mpxextinit.h" -#include "swaprep.h" - -#include "getvers.h" -#include "listdev.h" -#include "selectev.h" -#include "getevbase.h" -#include "queryptr.h" - -static Mask lastExtEventMask = 1; -int MPXEventIndex; -MPXExtEventInfo EventInfo[32]; - -/** - * MPX piggybacks on the X Input extension's event system. Each window has an - * array of event masks, from 0 to MAX_DEVICES. In XI, each device can have - * separate event masks. Before an event is delivered, the array at the index - * of the device is checked. - * - * Two things: - * -) core devices do not send input extension events - * -) MPX events are not device specific. - * - * Since the mask of the core pointer (index 1) is thus not used by XI, MPX - * can use it for the event mask. This also makes MPX less intrusive. - */ -int MPXmskidx = 1; - - -/***************************************************************** - * - * Externs defined elsewhere in the X server. - * - */ - -extern MPXExtensionVersion AllExtensionVersions[]; - -Mask PropagateMask[MAX_DEVICES]; - -/***************************************************************** - * - * Globals referenced elsewhere in the server. - * - */ - -int MPXReqCode = 0; -int MPXEventBase = 0; -int MPXErrorBase = 0; - -int MPXButtonPress; -int MPXButtonRelease; -int MPXMotionNotify; -int MPXLastEvent; - -/***************************************************************** - * - * Declarations of local routines. - * - */ - -static MPXExtensionVersion thisversion = { - MPX_Major, - MPX_Minor -}; - -/********************************************************************** - * - * MPXExtensionInit - initialize the input extension. - * - * Called from InitExtensions in main() or from QueryExtension() if the - * extension is dynamically loaded. - * - * This extension has several events and errors. - * - */ - -void -MPXExtensionInit(void) -{ - ExtensionEntry *extEntry; - - extEntry = AddExtension(MPXNAME, MPXEVENTS, MPXERRORS, - ProcMPXDispatch, SProcMPXDispatch, - MPXResetProc, StandardMinorOpcode); - if (extEntry) { - MPXReqCode = extEntry->base; - MPXEventBase = extEntry->eventBase; - MPXErrorBase = extEntry->errorBase; - - AllExtensionVersions[MPXReqCode - 128] = thisversion; - MPXFixExtensionEvents(extEntry); - ReplySwapVector[MPXReqCode] = (ReplySwapPtr) SReplyMPXDispatch; - EventSwapVector[MPXButtonPress] = SEventMPXDispatch; - EventSwapVector[MPXButtonRelease] = SEventMPXDispatch; - EventSwapVector[MPXMotionNotify] = SEventMPXDispatch; - } else { - FatalError("MPXExtensionInit: AddExtensions failed\n"); - } -} - -/************************************************************************* - * - * ProcMPXDispatch - main dispatch routine for requests to this extension. - * This routine is used if server and client have the same byte ordering. - * - */ - -int -ProcMPXDispatch(register ClientPtr client) -{ - REQUEST(xReq); - if (stuff->data == X_MPXGetExtensionVersion) - return (ProcMPXGetExtensionVersion(client)); - if (stuff->data == X_MPXListDevices) - return (ProcMPXListDevices(client)); - if (stuff->data == X_MPXSelectEvents) - return (ProcMPXSelectEvents(client)); - if (stuff->data == X_MPXGetEventBase) - return (ProcMPXGetEventBase(client)); - if (stuff->data == X_MPXQueryPointer) - return (ProcMPXQueryPointer(client)); - else { - SendErrorToClient(client, MPXReqCode, stuff->data, 0, BadRequest); - } - - return (BadRequest); -} - -/******************************************************************************* - * - * SProcMPXDispatch - * - * Main swapped dispatch routine for requests to this extension. - * This routine is used if server and client do not have the same byte ordering. - * - */ - -int -SProcMPXDispatch(register ClientPtr client) -{ - REQUEST(xReq); - if (stuff->data == X_MPXGetExtensionVersion) - return (SProcMPXGetExtensionVersion(client)); - if (stuff->data == X_MPXListDevices) - return (SProcMPXListDevices(client)); - if (stuff->data == X_MPXSelectEvents) - return (SProcMPXSelectEvents(client)); - if (stuff->data == X_MPXGetEventBase) - return (SProcMPXGetEventBase(client)); - if (stuff->data == X_MPXQueryPointer) - return (SProcMPXQueryPointer(client)); - else { - SendErrorToClient(client, MPXReqCode, stuff->data, 0, BadRequest); - } - - return (BadRequest); -} - -/*********************************************************************** - * - * MPXResetProc. - * Remove reply-swapping routine. - * Remove event-swapping routine. - * - */ - -void -MPXResetProc(ExtensionEntry* unused) -{ - ReplySwapVector[MPXReqCode] = ReplyNotSwappd; - EventSwapVector[MPXButtonPress] = NotImplemented; - EventSwapVector[MPXButtonRelease] = NotImplemented; - EventSwapVector[MPXMotionNotify] = NotImplemented; - - MPXRestoreExtensionEvents(); - -} - -void SReplyMPXDispatch(ClientPtr client, int len, xMPXGetExtensionVersionReply* rep) -{ - if (rep->RepType == X_MPXGetExtensionVersion) - SRepMPXGetExtensionVersion(client, len, - (xMPXGetExtensionVersionReply*) rep); - if (rep->RepType == X_MPXListDevices) - SRepMPXListDevices(client, len, - (xMPXListDevicesReply*) rep); - else { - FatalError("MPX confused sending swapped reply"); - } -} - -void -SEventMPXDispatch(xEvent* from, xEvent* to) -{ - int type = from->u.u.type & 0177; - if (type == MPXButtonPress) { - SKeyButtonPtrEvent(from, to); - to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; - } else if (type == MPXButtonRelease) { - SKeyButtonPtrEvent(from, to); - to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; - } else if (type == MPXMotionNotify) { - SKeyButtonPtrEvent(from, to); - to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; - } else { - FatalError("XInputExtension: Impossible event!\n"); - } -} - -void -MPXFixExtensionEvents(ExtensionEntry* extEntry) -{ - MPXButtonPress = extEntry->eventBase; - MPXButtonRelease = MPXButtonPress + 1; - MPXMotionNotify = MPXButtonRelease + 1; - MPXLastEvent = MPXMotionNotify + 1; - - MPXSetMaskForExtEvent(MPXButtonPressMask, MPXButtonPress); - MPXSetMaskForExtEvent(MPXButtonReleaseMask, MPXButtonRelease); - MPXSetMaskForExtEvent(MPXPointerMotionMask, MPXMotionNotify); -} - - -/************************************************************************** - * - * Assign the specified mask to the specified event. - * - */ - -void -MPXSetMaskForExtEvent(Mask mask, int event) -{ - - EventInfo[MPXEventIndex].mask = mask; - EventInfo[MPXEventIndex++].type = event; - - if ((event < LASTEvent) || (event >= 128)) - FatalError("MaskForExtensionEvent: bogus event number"); - SetMaskForEvent(mask, event); -} - -/************************************************************************ - * - * This function restores extension event types and masks to their - * initial state. - * - */ - -void -MPXRestoreExtensionEvents(void) -{ - int i; - - MPXReqCode = 0; - for (i = 0; i < MPXEventIndex - 1; i++) { - if ((EventInfo[i].type >= LASTEvent) && (EventInfo[i].type < 128)) - SetMaskForEvent(0, EventInfo[i].type); - EventInfo[i].mask = 0; - EventInfo[i].type = 0; - } - - MPXEventIndex = 0; - lastExtEventMask = 1; - MPXButtonPress = 0; - MPXButtonRelease = 1; - MPXMotionNotify = 2; -} - -/************************************************************************** - * - * Allow the specified event to have its propagation suppressed. - * The default is to not allow suppression of propagation. - * - */ - -void -MPXAllowPropagateSuppress(Mask mask) -{ - int i; - - for (i = 0; i < MAX_DEVICES; i++) - PropagateMask[i] |= mask; -} - diff --git a/mpx/getevbase.c b/mpx/getevbase.c deleted file mode 100644 index 8b0f598d2..000000000 --- a/mpx/getevbase.c +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright 2006 by Peter Hutterer */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include /* for inputstr.h */ -#include /* Request macro */ -#include "inputstr.h" /* DeviceIntPtr */ -#include -#include - -#include "mpxglobals.h" -#include "getevbase.h" - -/*********************************************************************** - * - * This procedure writes the reply for the MPXGetEventBase function. - */ -int -ProcMPXGetEventBase(register ClientPtr client) -{ - xMPXGetEventBaseReply rep; - - REQUEST(xMPXGetEventBaseReq); - REQUEST_SIZE_MATCH(xMPXGetEventBaseReq); - - memset(&rep, 0, sizeof(xMPXGetEventBaseReply)); - rep.repType = X_Reply; - rep.RepType = X_MPXGetEventBase; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - rep.eventBase = MPXEventBase; - - WriteReplyToClient(client, sizeof(xMPXGetEventBaseReply), &rep); - - return Success; -} - -/*********************************************************************** - * - * This procedure writes the reply for the MPXGetEventBase function. - */ -int -SProcMPXGetEventBase(register ClientPtr client) -{ - register char n; - - REQUEST(xMPXGetEventBaseReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xMPXGetEventBaseReq); - return (ProcMPXGetEventBase(client)); -} - diff --git a/mpx/getevbase.h b/mpx/getevbase.h deleted file mode 100644 index 5ff8284dc..000000000 --- a/mpx/getevbase.h +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright 2006 by Peter Hutterer */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef GETEVBASE_H -#define GETEVBASE_H 1 - -int SProcMPXGetEventBase(ClientPtr /* client */ - ); - -int ProcMPXGetEventBase(ClientPtr /* client */ - ); - -#endif /* GETEVBASE_H */ diff --git a/mpx/getvers.c b/mpx/getvers.c deleted file mode 100644 index fc3fc56f2..000000000 --- a/mpx/getvers.c +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright 2006 by Peter Hutterer */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include /* for inputstr.h */ -#include /* Request macro */ -#include "inputstr.h" /* DeviceIntPtr */ -#include -#include - -#include "mpxglobals.h" -#include "getvers.h" - -MPXExtensionVersion AllExtensionVersions[128]; - -/*********************************************************************** - * - * Handle a request from a client with a different byte order than us. - * - */ - -int -SProcMPXGetExtensionVersion(register ClientPtr client) -{ - register char n; - - REQUEST(xMPXGetExtensionVersionReq); - swaps(&stuff->length, n); - swaps(&stuff->major_version, n); - swaps(&stuff->minor_version, n); - REQUEST_AT_LEAST_SIZE(xMPXGetExtensionVersionReq); - return (ProcMPXGetExtensionVersion(client)); -} -/*********************************************************************** - * - * This procedure writes the reply for the XGetExtensionVersion function. - */ - -int -ProcMPXGetExtensionVersion(register ClientPtr client) -{ - xMPXGetExtensionVersionReply rep; - - REQUEST(xMPXGetExtensionVersionReq); - REQUEST_SIZE_MATCH(xMPXGetExtensionVersionReq); - - rep.repType = X_Reply; - rep.RepType = X_MPXGetExtensionVersion; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - rep.major_version = AllExtensionVersions[MPXReqCode - 128].major; - rep.minor_version = AllExtensionVersions[MPXReqCode - 128].minor; - WriteReplyToClient(client, sizeof(xMPXGetExtensionVersionReply), &rep); - - return Success; -} - -/*********************************************************************** - * - * This procedure writes the reply for the MPXGetExtensionVersion function, - * if the client and server have a different byte ordering. - * - */ - -void -SRepMPXGetExtensionVersion(ClientPtr client, int size, - xMPXGetExtensionVersionReply * rep) -{ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swaps(&rep->major_version, n); - swaps(&rep->minor_version, n); - WriteToClient(client, size, (char *)rep); -} - - diff --git a/mpx/getvers.h b/mpx/getvers.h deleted file mode 100644 index 8800ac629..000000000 --- a/mpx/getvers.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright 2006 by Peter Hutterer */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef GETVERS_H -#define GETVERS_H 1 - -int SProcMPXGetExtensionVersion(ClientPtr /* client */ - ); - -int ProcMPXGetExtensionVersion(ClientPtr /* client */ - ); - -void SRepMPXGetExtensionVersion(ClientPtr /* client */ , - int /* size */ , - xMPXGetExtensionVersionReply * /* rep */ - ); - -#endif - diff --git a/mpx/listdev.c b/mpx/listdev.c deleted file mode 100644 index f97711095..000000000 --- a/mpx/listdev.c +++ /dev/null @@ -1,187 +0,0 @@ -/* Copyright 2006 by Peter Hutterer */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "inputstr.h" - -#include -#include - -#include "mpxextinit.h" -#include "mpxglobals.h" - -#include "listdev.h" - -/*********************************************************************** - * - * This procedure lists the MPX devices available to the server. - * - */ -int SProcMPXListDevices(register ClientPtr client) -{ - register char n; - - REQUEST(xMPXListDevicesReq); - swaps(&stuff->length, n); - return (ProcMPXListDevices(client)); -} - -/*********************************************************************** - * - * This procedure lists the MPX devices available to the server. - * - * Strongly based on ProcXListInputDevices - */ -int ProcMPXListDevices(register ClientPtr client) -{ - xMPXListDevicesReply rep; - int numdevs = 0; - int namesize = 1; /* need 1 extra byte for strcpy */ - int size = 0; - int total_length; - char* devbuf; - char* namebuf; - char *savbuf; - xMPXDeviceInfoPtr dev; - DeviceIntPtr d; - - REQUEST_SIZE_MATCH(xMPXListDevicesReq); - memset(&rep, 0, sizeof(xMPXListDevicesReply)); - rep.repType = X_Reply; - rep.RepType = X_MPXListDevices; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - for (d = inputInfo.devices; d; d = d->next) { - if (d->isMPDev) - { - SizeMPXDeviceInfo(d, &namesize, &size); - numdevs++; - } - } - - for (d = inputInfo.off_devices; d; d = d->next) { - if (d->isMPDev) - { - SizeMPXDeviceInfo(d, &namesize, &size); - numdevs++; - } - } - - total_length = numdevs * sizeof(xMPXDeviceInfo) + size + namesize; - devbuf = (char *)xalloc(total_length); - namebuf = devbuf + (numdevs * sizeof(xMPXDeviceInfo)); - savbuf = devbuf; - - dev = (xMPXDeviceInfoPtr) devbuf; - for (d = inputInfo.devices; d; d = d->next, dev++) - if (d->isMPDev) - SetMPXDeviceInfo(client, d, dev, &devbuf, &namebuf); - for (d = inputInfo.off_devices; d; d = d->next, dev++) - if (d->isMPDev) - SetMPXDeviceInfo(client, d, dev, &devbuf, &namebuf); - - rep.ndevices = numdevs; - rep.length = (total_length + 3) >> 2; - WriteReplyToClient(client, sizeof(xMPXListDevicesReply), &rep); - WriteToClient(client, total_length, savbuf); - xfree(savbuf); - return Success; -} - -/*********************************************************************** - * - * This procedure calculates the size of the information to be returned - * for an input device. - * - */ - -void -SizeMPXDeviceInfo(DeviceIntPtr d, int *namesize, int *size) -{ - *namesize += 1; - if (d->name) - *namesize += strlen(d->name); -} - -/*********************************************************************** - * - * This procedure sets information to be returned for an input device. - * - */ - -void -SetMPXDeviceInfo(ClientPtr client, DeviceIntPtr d, xMPXDeviceInfoPtr dev, - char **devbuf, char **namebuf) -{ - MPXCopyDeviceName(namebuf, d->name); - MPXCopySwapDevice(client, d, devbuf); -} - - -/*********************************************************************** - * - * This procedure copies data to the DeviceInfo struct, swapping if necessary. - * - * We need the extra byte in the allocated buffer, because the trailing null - * hammers one extra byte, which is overwritten by the next name except for - * the last name copied. - * - */ - -void -MPXCopyDeviceName(char **namebuf, char *name) -{ - char *nameptr = (char *)*namebuf; - - if (name) { - *nameptr++ = strlen(name); - strcpy(nameptr, name); - *namebuf += (strlen(name) + 1); - } else { - *nameptr++ = 0; - *namebuf += 1; - } -} - -/*********************************************************************** - * - * This procedure copies data to the DeviceInfo struct, swapping if necessary. - * - */ -void -MPXCopySwapDevice(register ClientPtr client, DeviceIntPtr d, char **buf) -{ - register char n; - xMPXDeviceInfoPtr dev; - - dev = (xMPXDeviceInfoPtr) * buf; - memset(dev, 0, sizeof(xMPXDeviceInfo)); - - dev->id = d->id; - dev->type = d->type; - if (client->swapped) { - swapl(&dev->type, n); /* macro - braces are required */ - } - *buf += sizeof(xMPXDeviceInfo); -} - -/*********************************************************************** - * - * This procedure writes the reply for the MPXListDevices function, - * if the client and server have a different byte ordering. - * - */ -void -SRepMPXListDevices(ClientPtr client, int size, xMPXListDevicesReply * rep) -{ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - WriteToClient(client, size, (char *)rep); -} diff --git a/mpx/listdev.h b/mpx/listdev.h deleted file mode 100644 index 079fe8eb6..000000000 --- a/mpx/listdev.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright 2006 by Peter Hutterer */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef LISTDEV_H -#define LISTDEV_H 1 - - -#include -#include -#include "inputstr.h" - -#include -#include - -#include "mpxextinit.h" -#include "mpxglobals.h" - -int SProcMPXListDevices(ClientPtr /* client */ - ); - -int ProcMPXListDevices(ClientPtr /* client */ - ); - -void SizeMPXDeviceInfo(DeviceIntPtr /* d */ , - int * /* namesize */ , - int * /* size */ - ); - -void SetMPXDeviceInfo(ClientPtr /* client */ , - DeviceIntPtr /* d */ , - xMPXDeviceInfoPtr /* dev */ , - char ** /* devbuf */ , - char ** /* namebuf */ - ); - - -void MPXCopyDeviceName(char ** /* namebuf */ , - char * /* name */ - ); - -void MPXCopySwapDevice(ClientPtr /* client */ , - DeviceIntPtr /* d */ , - char ** /* buf */ - ); - -void SRepMPXListDevices(ClientPtr /* client */ , - int /* size */ , - xMPXListDevicesReply * /* rep */ - ); -#endif diff --git a/mpx/mpxglobals.h b/mpx/mpxglobals.h deleted file mode 100644 index 73f399032..000000000 --- a/mpx/mpxglobals.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright 2006 by Peter Hutterer */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef MPXGLOBALS_H -#define MPXGLOBALS_H 1 - -extern int MPXReqCode; -extern int MPXEventBase; -extern int MPXErrorBase; - -extern Mask PropagateMask[]; - -extern int MPXmskidx; - -/* events */ -extern int MPXButtonPress; -extern int MPXButtonRelease; -extern int MPXMotionNotify; -extern int MPXLastEvent; - -#define IsMPXEvent(xE) \ - ((xE)->u.u.type >= MPXEventBase \ - && (xE)->u.u.type < MPXLastEvent) - - -#endif diff --git a/mpx/queryptr.c b/mpx/queryptr.c deleted file mode 100644 index 716207410..000000000 --- a/mpx/queryptr.c +++ /dev/null @@ -1,90 +0,0 @@ -/* Copyright 2006 by Peter Hutterer */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "inputstr.h" -#include "windowstr.h" -#include -#include - -#include "mpxglobals.h" - -#include "queryptr.h" - -/*********************************************************************** - * - * This procedure writes the reply for the MPXQueryPointer function. - */ -int -ProcMPXQueryPointer(register ClientPtr client) -{ - xMPXQueryPointerReply rep; - DeviceIntPtr pDev; - WindowPtr root, win; - int x, y; - - REQUEST(xMPXQueryPointerReq); - REQUEST_SIZE_MATCH(xMPXQueryPointerReq); - - pDev = LookupDeviceIntRec(stuff->deviceid); - if (!pDev->isMPDev) - { - SendErrorToClient(client, MPXReqCode, X_MPXQueryPointer, - stuff->deviceid, BadValue); - return Success; - } - - - memset(&rep, 0, sizeof(xMPXQueryPointerReply)); - rep.repType = X_Reply; - rep.RepType = X_MPXQueryPointer; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - root = GetCurrentRootWindow(); - win = GetSpriteWindow(pDev); - GetSpritePosition(pDev, &x, &y); - - rep.root = root->drawable.id; - rep.root_x = x; - rep.root_y = y; - if (win != root) - { - rep.child = win->drawable.id; - rep.win_x = x - win->drawable.x; - rep.win_y = y - win->drawable.y; - } - else - { - rep.child = None; - rep.win_x = x; - rep.win_y = y; - } - - - rep.mask = pDev->button->state | inputInfo.keyboard->key->state; - - WriteReplyToClient(client, sizeof(xMPXQueryPointerReply), &rep); - - return Success; -} - - -/*********************************************************************** - * - * This procedure writes the reply for the MPXQueryPointer function. - */ -int -SProcMPXQueryPointer(register ClientPtr client) -{ - register char n; - - REQUEST(xMPXQueryPointerReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xMPXQueryPointerReq); - return (ProcMPXQueryPointer(client)); -} diff --git a/mpx/queryptr.h b/mpx/queryptr.h deleted file mode 100644 index c89397ca1..000000000 --- a/mpx/queryptr.h +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright 2006 by Peter Hutterer */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef QUERYPTR_H -#define QUERYPTR_H 1 - -int SProcMPXQueryPointer(ClientPtr /* client */ - ); - -int ProcMPXQueryPointer(ClientPtr /* client */ - ); - -#endif /* QUERYPTR_H */ diff --git a/mpx/selectev.c b/mpx/selectev.c deleted file mode 100644 index fc2ff9c10..000000000 --- a/mpx/selectev.c +++ /dev/null @@ -1,146 +0,0 @@ -/* Copyright 2006 by Peter Hutterer */ - - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include /* for inputstr.h */ -#include /* Request macro */ -#include "inputstr.h" /* DeviceIntPtr */ -#include "windowstr.h" /* window structure */ -#include -#include -#include "extnsionst.h" -#include "mpxextinit.h" /* LookupDeviceIntRec */ -#include "mpxglobals.h" -#include "mpxevents.h" - -#include "selectev.h" - -/* functions borrowed from XI */ -extern void RecalculateDeviceDeliverableEvents( - WindowPtr /* pWin */); - -extern int AddExtensionClient ( - WindowPtr /* pWin */, - ClientPtr /* client */, - Mask /* mask */, - int /* mskidx */); -extern Bool -ShouldFreeInputMasks(WindowPtr /* pWin */, - Bool /* ignoreSelectedEvents */); - -/*********************************************************************** - * - * Handle requests from clients with a different byte order. - * - */ - -int -SProcMPXSelectEvents(register ClientPtr client) -{ - register char n; - - REQUEST(xMPXSelectEventsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xMPXSelectEventsReq); - swapl(&stuff->window, n); - return (ProcMPXSelectEvents(client)); -} - -/*********************************************************************** - * - * This procedure selects input from an extension device. - * - */ - -int -ProcMPXSelectEvents(register ClientPtr client) -{ - int ret; - WindowPtr pWin; - - REQUEST(xMPXSelectEventsReq); - REQUEST_SIZE_MATCH(xMPXSelectEventsReq); - - if (stuff->length != (sizeof(xMPXSelectEventsReq) >> 2)) - { - SendErrorToClient(client, MPXReqCode, X_MPXSelectEvents, 0, - BadLength); - return Success; - } - - pWin = (WindowPtr) LookupWindow(stuff->window, client); - if (!pWin) - { - client->errorValue = stuff->window; - SendErrorToClient(client, MPXReqCode, X_MPXSelectEvents, 0, - BadWindow); - return Success; - } - - if (stuff->mask >= MPXHighestMask) - { - client->errorValue = stuff->mask; - SendErrorToClient(client, MPXReqCode, X_MPXSelectEvents, 0, - BadValue); - } - - if ((ret = MPXSelectForWindow(pWin, client, stuff->mask)) != Success) - { - SendErrorToClient(client, MPXReqCode, X_MPXSelectEvents, 0, ret); - return Success; - } - - return Success; -} - -/** - * Selects a set of events for a given window. - * Different to XI, MPX is not device dependent. Either the client gets events - * from all devices or none. - * - * This method borrows some functions from XI, due to the piggyback on the - * core pointer (see comment in extinit.c) - */ -int -MPXSelectForWindow(WindowPtr pWin, ClientPtr client, int mask) -{ - InputClientsPtr others; - int ret; - - if (mask >= MPXHighestMask) - { - client->errorValue = mask; - return BadValue; - } - - if (wOtherInputMasks(pWin)) - { - for (others = wOtherInputMasks(pWin)->inputClients; others; - others = others->next) - { - if (SameClient(others, client)) { - others->mask[MPXmskidx] = mask; - if (mask == 0) - { - /* clean up stuff */ - RecalculateDeviceDeliverableEvents(pWin); - if (ShouldFreeInputMasks(pWin, FALSE)) - FreeResource(others->resource, RT_NONE); - return Success; - } - goto maskSet; - } - } - } - /* borrow from XI here */ - if ((ret = AddExtensionClient(pWin, client, mask, MPXmskidx)) != Success) - return ret; -maskSet: - RecalculateDeviceDeliverableEvents(pWin); - return Success; - -} - diff --git a/mpx/selectev.h b/mpx/selectev.h deleted file mode 100644 index 702619987..000000000 --- a/mpx/selectev.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright 2006 by Peter Hutterer */ - - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef SELECTEV_H -#define SELECTEV_H 1 - -int SProcMPXSelectEvents(ClientPtr /* client */ - ); - -int ProcMPXSelectEvents(ClientPtr /* client */ - ); - -#endif /* SELECTEV_H */ From 9fd2f167ec02ee170b87f02ddca89eba0b2e2389 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 20 Dec 2006 16:30:36 +1030 Subject: [PATCH 037/634] xfree86: fix xf86ProcessCommonOptions() core and shared pointer assignment TAG: mpx-0.3.0 --- Changelog | 9 +++++++++ hw/xfree86/common/xf86Xinput.c | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 0cf051ff8..ef42159ff 100644 --- a/Changelog +++ b/Changelog @@ -38,6 +38,15 @@ Files: include/mpxevents.h include/mpxextinit.h +____________________________________________________________ +xfree86: fix xf86ProcessCommonOptions() core and shared pointer assignment + +Files: + hw/xfree86/common/xf86Xinput.c + +TAG: mpx-0.3.0 + + == 18.12.06 == mi: removing MPX ifdefs global sprite renaming in mipointer and misprite diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index bf97112b4..fd2a4513a 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -124,11 +124,12 @@ _X_EXPORT void xf86ProcessCommonOptions(LocalDevicePtr local, pointer list) { - if (!xf86SetBoolOption(list, "AlwaysCore", 0) || + if (xf86SetBoolOption(list, "AlwaysCore", 0) || xf86SetBoolOption(list, "SendCoreEvents", 0) || xf86SetBoolOption(list, "CorePointer", 0) || xf86SetBoolOption(list, "CoreKeyboard", 0)) { local->flags |= XI86_ALWAYS_CORE; + local->flags |= XI86_SHARED_POINTER; xf86Msg(X_CONFIG, "%s: always reports core events\n", local->name); } From 95e1a88050dde61e9b2407428042a43e47b46e18 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 8 Jan 2007 12:31:18 +1030 Subject: [PATCH 038/634] Xi: Adding ChangeDeviceCursor request --- Changelog | 14 +++ Xi/Makefile.am | 2 + Xi/chdevcur.c | 123 ++++++++++++++++++++++ Xi/chdevcur.h | 39 +++++++ Xi/extinit.c | 3 + dix/events.c | 17 +++- dix/window.c | 242 +++++++++++++++++++++++++++++++++++++++++++- include/window.h | 13 +++ include/windowstr.h | 8 ++ 9 files changed, 456 insertions(+), 5 deletions(-) create mode 100644 Xi/chdevcur.c create mode 100644 Xi/chdevcur.h diff --git a/Changelog b/Changelog index ef42159ff..431e008b9 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,17 @@ +== 08.01.06 == +Xi: Adding ChangeDeviceCursor request + +Files: + dix/window.c + dix/events.c + include/window.h + include/windowstr.h + Xi/extinit.c + Xi/chdevcur.c + Xi/chdevcur.h + Xi/Makefile.am + + == 20.12.06 == xfree86: Changing "IsMPDevice" to "SharedPointer" option. Devices will default to MP devices. diff --git a/Xi/Makefile.am b/Xi/Makefile.am index 0aa58449f..9e7d1c43e 100644 --- a/Xi/Makefile.am +++ b/Xi/Makefile.am @@ -5,6 +5,8 @@ AM_CFLAGS = $(DIX_CFLAGS) libXi_la_SOURCES = \ allowev.c \ allowev.h \ + chdevcur.c \ + chdevcur.h \ chgdctl.c \ chgdctl.h \ chgfctl.c \ diff --git a/Xi/chdevcur.c b/Xi/chdevcur.c new file mode 100644 index 000000000..fc4b0e01d --- /dev/null +++ b/Xi/chdevcur.c @@ -0,0 +1,123 @@ +/* + +Copyright 2006 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +/*********************************************************************** + * + * Request to change a given device pointer's cursor. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exevents.h" +#include "exglobals.h" + +#include "chdevcur.h" + +/*********************************************************************** + * + * This procedure allows a client to set one pointer's cursor. + * + */ + +int +SProcXChangeDeviceCursor(register ClientPtr client) +{ + register char n; + + REQUEST(xChangeDeviceCursorReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xChangeDeviceCursorReq); + return (ProcXChangeDeviceCursor(client)); +} + +int ProcXChangeDeviceCursor(register ClientPtr client) +{ + int err; + WindowPtr pWin = NULL; + DeviceIntPtr pDev = NULL; + CursorPtr pCursor = NULL; + + REQUEST(xChangeDeviceCursorReq); + REQUEST_SIZE_MATCH(xChangeDeviceCursorReq); + + pDev = LookupDeviceIntRec(stuff->deviceid); + if (pDev == NULL) { + SendErrorToClient(client, IReqCode, X_ChangeDeviceCursor, 0, + BadDevice); + return Success; + } + + if (stuff->win != None) + { + err = dixLookupWindow(&pWin, stuff->win, client, DixReadWriteAccess); + if (err != Success) + { + SendErrorToClient(client, IReqCode, X_ChangeDeviceCursor, + stuff->win, err); + return Success; + } + } + + if (stuff->cursor == None) + { + if (pWin == WindowTable[pWin->drawable.pScreen->myNum]) + pCursor = rootCursor; + else + pCursor = (CursorPtr)None; + } + else + { + pCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, + RT_CURSOR, DixReadAccess); + if (!pCursor) + { + SendErrorToClient(client, IReqCode, X_ChangeDeviceCursor, + stuff->cursor, BadCursor); + return Success; + } + } + + ChangeWindowDeviceCursor(pWin, pDev, pCursor); + + return Success; +} + diff --git a/Xi/chdevcur.h b/Xi/chdevcur.h new file mode 100644 index 000000000..92c8d4f0d --- /dev/null +++ b/Xi/chdevcur.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 2006 by Peter Hutterer + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef CHDEVCUR_H +#define CHDEVCUR_H 1 + +int SProcXChangeDeviceCursor(ClientPtr /* client */ + ); + +int ProcXChangeDeviceCursor(ClientPtr /* client */ + ); + +#endif /* CHDEVCUR_H */ diff --git a/Xi/extinit.c b/Xi/extinit.c index 7c737a143..82bed5000 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -74,6 +74,7 @@ SOFTWARE. /* modules local to Xi */ #include "allowev.h" +#include "chdevcur.h" #include "chgdctl.h" #include "chgfctl.h" #include "chgkbd.h" @@ -340,6 +341,8 @@ ProcIDispatch(register ClientPtr client) return (ProcXQueryDevicePointer(client)); else if (stuff->data == X_WarpDevicePointer) return (ProcXWarpDevicePointer(client)); + else if (stuff->data == X_ChangeDeviceCursor) + return (ProcXChangeDeviceCursor(client)); else { SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); } diff --git a/dix/events.c b/dix/events.c index 81efb708a..3c11723c1 100644 --- a/dix/events.c +++ b/dix/events.c @@ -921,6 +921,7 @@ PostNewCursor(DeviceIntPtr pDev) register WindowPtr win; register GrabPtr grab = pDev->grab; SpritePtr pSprite = pDev->pSprite; + CursorPtr pCursor; if (syncEvents.playingEvents) return; @@ -939,11 +940,19 @@ PostNewCursor(DeviceIntPtr pDev) else win = pSprite->win; for (; win; win = win->parent) - if (win->optional && win->optional->cursor != NullCursor) - { - ChangeToCursor(pDev, win->optional->cursor); - return; + { + if (win->optional) + { + pCursor = WindowGetDeviceCursor(win, pDev); + if (!pCursor && win->optional->cursor != NullCursor) + pCursor = win->optional->cursor; + if (pCursor) + { + ChangeToCursor(pDev, pCursor); + return; + } } + } } _X_EXPORT WindowPtr diff --git a/dix/window.c b/dix/window.c index e33140dd4..604af384d 100644 --- a/dix/window.c +++ b/dix/window.c @@ -110,6 +110,7 @@ Equipment Corporation. #include "validate.h" #include "windowstr.h" #include "input.h" +#include "inputstr.h" #include "resource.h" #include "colormapst.h" #include "cursorstr.h" @@ -135,12 +136,21 @@ Equipment Corporation. * GetWindowAttributes, DeleteWindow, DestroySubWindows, * HandleSaveSet, ReparentWindow, MapWindow, MapSubWindows, * UnmapWindow, UnmapSubWindows, ConfigureWindow, CirculateWindow, - * + * ChangeWindowDeviceCursor ******/ static unsigned char _back_lsb[4] = {0x88, 0x22, 0x44, 0x11}; static unsigned char _back_msb[4] = {0x11, 0x44, 0x22, 0x88}; +static Bool WindowParentHasDeviceCursor(WindowPtr pWin, + DeviceIntPtr pDev, + CursorPtr pCurs); +static Bool +WindowSeekDeviceCursor(WindowPtr pWin, + DeviceIntPtr pDev, + DevCursNodePtr* pNode, + DevCursNodePtr* pPrev); + _X_EXPORT int screenIsSaved = SCREEN_SAVER_OFF; _X_EXPORT ScreenSaverStuffRec savedScreenInfo[MAXSCREENS]; @@ -440,6 +450,7 @@ CreateRootWindow(ScreenPtr pScreen) #endif #ifdef XINPUT pWin->optional->inputMasks = NULL; + pWin->optional->deviceCursors = NULL; #endif pWin->optional->colormap = pScreen->defColormap; pWin->optional->visual = pScreen->rootVisual; @@ -3639,6 +3650,17 @@ CheckWindowOptionalNeed (register WindowPtr w) if (optional->inputMasks != NULL) return; #endif + if (optional->deviceCursors != NULL) + { + DevCursNodePtr pNode = optional->deviceCursors; + while(pNode) + { + if (pNode->cursor != None) + return; + pNode = pNode->next; + } + } + parentOptional = FindWindowWithOptional(w)->optional; if (optional->visual != parentOptional->visual) return; @@ -3683,6 +3705,7 @@ MakeWindowOptional (register WindowPtr pWin) #endif #ifdef XINPUT optional->inputMasks = NULL; + optional->deviceCursors = NULL; #endif parentOptional = FindWindowWithOptional(pWin)->optional; optional->visual = parentOptional->visual; @@ -3731,10 +3754,227 @@ DisposeWindowOptional (register WindowPtr pWin) } else pWin->cursorIsNone = TRUE; + + if (pWin->optional->deviceCursors) + { + DevCursorList pList; + DevCursorList pPrev; + pList = pWin->optional->deviceCursors; + while(pList) + { + if (pList->cursor) + FreeCursor(pList->cursor, (XID)0); + pPrev = pList; + pList = pList->next; + xfree(pPrev); + } + pWin->optional->deviceCursors = NULL; + } + xfree (pWin->optional); pWin->optional = NULL; } +/* + * Changes the cursor struct for the given device and the given window. + * A cursor that does not have a device cursor set will use whatever the + * standard cursor is for the window. If all devices have a cursor set, + * changing the window cursor (e.g. using XDefineCursor()) will not have any + * visible effect. Only when one of the device cursors is set to None again, + * this device's cursor will display the changed standard cursor. + * + * CursorIsNone of the window struct is NOT modified if you set a device + * cursor. + * + * Assumption: If there is a node for a device in the list, the device has a + * cursor. If the cursor is set to None, it is inherited by the parent. + */ +int ChangeWindowDeviceCursor(register WindowPtr pWin, + DeviceIntPtr pDev, + CursorPtr pCursor) +{ + DevCursNodePtr pNode, pPrev; + CursorPtr pOldCursor = NULL; + ScreenPtr pScreen; + WindowPtr pChild; + + if (!pWin->optional && !MakeWindowOptional(pWin)) + return BadAlloc; + + /* 1) Check if window has device cursor set + * Yes: 1.1) swap cursor with given cursor if parent does not have same + * cursor, free old cursor + * 1.2) free old cursor, use parent cursor + * No: 1.1) add node to beginning of list. + * 1.2) add cursor to node if parent does not have same cursor + * 1.3) use parent cursor if parent does not have same cursor + * 2) Patch up children if child has a devcursor + * 2.1) if child has cursor None, it inherited from parent, set to old + * cursor + * 2.2) if child has same cursor as new cursor, remove and set to None + */ + + pScreen = pWin->drawable.pScreen; + + if (WindowSeekDeviceCursor(pWin, pDev, &pNode, &pPrev)) + { + /* has device cursor */ + + if (pNode->cursor == pCursor) + return Success; + + pOldCursor = pNode->cursor; + + if (!pCursor) /* remove from list */ + { + pPrev->next = pNode->next; + xfree(pNode); + } + + } else + { + /* no device cursor yet */ + DevCursNodePtr pNewNode; + + if (!pCursor) + return Success; + + pNewNode = (DevCursNodePtr)xalloc(sizeof(DevCursNodeRec)); + pNewNode->dev = pDev; + pNewNode->next = pWin->optional->deviceCursors; + pWin->optional->deviceCursors = pNewNode; + pNode = pNewNode; + + } + + if (pCursor && WindowParentHasDeviceCursor(pWin, pDev, pCursor)) + pNode->cursor = None; + else + { + pNode->cursor = pCursor; + pCursor->refcnt++; + } + + pNode = pPrev = NULL; + /* fix up children */ + for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) + { + if (WindowSeekDeviceCursor(pChild, pDev, &pNode, &pPrev)) + { + if (pNode->cursor == None) /* inherited from parent */ + { + pNode->cursor = pOldCursor; + pOldCursor->refcnt++; + } else if (pNode->cursor == pCursor) + { + pNode->cursor = None; + FreeCursor(pCursor, (Cursor)0); /* fix up refcnt */ + } + } + } + + if (pWin->realized) + WindowHasNewCursor(pWin); + + if (pOldCursor) + FreeCursor(pOldCursor, (Cursor)0); + + /* FIXME: We SHOULD check for an error value here XXX + (comment taken from ChangeWindowAttributes) */ + (*pScreen->ChangeWindowAttributes)(pWin, CWCursor); + + return Success; +} + +/* Get device cursor for given device or None if none is set */ +CursorPtr WindowGetDeviceCursor(WindowPtr pWin, DeviceIntPtr pDev) +{ + DevCursorList pList; + + if (!pWin->optional || !pWin->optional->deviceCursors) + return NULL; + + pList = pWin->optional->deviceCursors; + + while(pList) + { + if (pList->dev == pDev) + { + if (pList->cursor == None) /* inherited from parent */ + return WindowGetDeviceCursor(pWin->parent, pDev); + else + return pList->cursor; + } + pList = pList->next; + } + return NULL; +} + +/* Searches for a DevCursorNode for the given window and device. If one is + * found, return True and set pNode and pPrev to the node and to the node + * before the node respectively. Otherwise return False. + */ +static Bool +WindowSeekDeviceCursor(WindowPtr pWin, + DeviceIntPtr pDev, + DevCursNodePtr* pNode, + DevCursNodePtr* pPrev) +{ + DevCursorList pList; + + if (!pWin->optional) + return FALSE; + + pList = pWin->optional->deviceCursors; + while(pList) + { + if (pList->next) + { + if (pList->next->dev == pDev) + { + *pNode = pList->next; + *pPrev = pList; + return TRUE; + } + } + pList = pList->next; + } + return FALSE; +} + +/* Return True if a parent has the same device cursor set or False if + * otherwise + */ +static Bool +WindowParentHasDeviceCursor(WindowPtr pWin, + DeviceIntPtr pDev, + CursorPtr pCursor) +{ + WindowPtr pParent; + DevCursNodePtr pParentNode, pParentPrev; + + pParent = pWin->parent; + while(pParent) + { + if (WindowSeekDeviceCursor(pParent, pDev, + &pParentNode, &pParentPrev)) + { + /* if there is a node in the list, the win has a dev cursor */ + if (!pParentNode->cursor) /* inherited. loop needs to cont. */ + { + } else if (pParentNode->cursor == pCursor) /* inherit */ + return TRUE; + else /* different cursor */ + return FALSE; + } + else + /* parent does not have a device cursor for our device */ + return FALSE; + } + return FALSE; +} + + #ifndef NOLOGOHACK static void DrawLogo(WindowPtr pWin) diff --git a/include/window.h b/include/window.h index bddeb252b..8f2522cbb 100644 --- a/include/window.h +++ b/include/window.h @@ -67,6 +67,10 @@ SOFTWARE. #define WT_NOMATCH 3 #define NullWindow ((WindowPtr) 0) +/* Forward declaration, we can't include input.h here */ +struct _DeviceIntRec; +struct _Cursor; + typedef struct _BackingStore *BackingStorePtr; typedef struct _Window *WindowPtr; @@ -143,6 +147,15 @@ extern int ChangeWindowAttributes( XID* /*vlist*/, ClientPtr /*client*/); +extern int ChangeWindowDeviceCursor( + WindowPtr /*pWin*/, + struct _DeviceIntRec* /*pDev*/, + struct _Cursor* /*pCursor*/); + +extern struct _Cursor* WindowGetDeviceCursor( + WindowPtr /*pWin*/, + struct _DeviceIntRec* /*pDev*/); + /* Quartz support on Mac OS X uses the HIToolbox framework whose GetWindowAttributes function conflicts here. */ #ifdef __DARWIN__ diff --git a/include/windowstr.h b/include/windowstr.h index a37dc6b75..4e9c82cb5 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -70,6 +70,13 @@ SOFTWARE. #define SameBorder(as, a, bs, b) \ EqualPixUnion(as, a, bs, b) +/* used as NULL-terminated list */ +typedef struct _DevCursorNode { + CursorPtr cursor; + DeviceIntPtr dev; + struct _DevCursorNode* next; +} DevCursNodeRec, *DevCursNodePtr, *DevCursorList; + typedef struct _WindowOpt { VisualID visual; /* default: same as parent */ CursorPtr cursor; /* default: window.cursorNone */ @@ -89,6 +96,7 @@ typedef struct _WindowOpt { #ifdef XINPUT struct _OtherInputMasks *inputMasks; /* default: NULL */ #endif + DevCursorList deviceCursors; /* default: NULL */ } WindowOptRec, *WindowOptPtr; #define BackgroundPixel 2L From a7ab7932938820a795bb6fb8e0444e0824433b99 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 8 Jan 2007 17:31:16 +1030 Subject: [PATCH 039/634] xfree86: fix XI86_SHARED_POINTER flag setting --- Changelog | 6 ++++++ hw/xfree86/common/xf86Xinput.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 431e008b9..17ee9c5e8 100644 --- a/Changelog +++ b/Changelog @@ -11,6 +11,12 @@ Files: Xi/chdevcur.h Xi/Makefile.am +____________________________________________________________ + +xfree86: fix XI86_SHARED_POINTER flag setting + +File: + hw/xfree86/common/xf86Xinput.c == 20.12.06 == xfree86: Changing "IsMPDevice" to "SharedPointer" option. Devices will default diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index fd2a4513a..dc07b3f07 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -134,7 +134,7 @@ xf86ProcessCommonOptions(LocalDevicePtr local, } if (xf86SetBoolOption(list, "SharedPointer", 0)) { - local->flags &= ~XI86_SHARED_POINTER; + local->flags |= XI86_SHARED_POINTER; xf86Msg(X_CONFIG, "%s: is shared device\n", local->name); } From ea82333dc1799a7e013205adbc89874bc8d273cb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 10 Jan 2007 14:52:13 +1030 Subject: [PATCH 040/634] Xi: add missing call for SProcXChangeDeviceCursor add DeviceEnterNotify and DeviceLeaveNotify fix: QueryDevicePointer crashed if called with keyboard device --- Changelog | 575 ---------------------------------------------- Xi/exglobals.h | 2 + Xi/extinit.c | 52 +++++ Xi/querydp.c | 2 +- dix/events.c | 79 ++++--- include/extinit.h | 12 + 6 files changed, 120 insertions(+), 602 deletions(-) delete mode 100644 Changelog diff --git a/Changelog b/Changelog deleted file mode 100644 index 17ee9c5e8..000000000 --- a/Changelog +++ /dev/null @@ -1,575 +0,0 @@ -== 08.01.06 == -Xi: Adding ChangeDeviceCursor request - -Files: - dix/window.c - dix/events.c - include/window.h - include/windowstr.h - Xi/extinit.c - Xi/chdevcur.c - Xi/chdevcur.h - Xi/Makefile.am - -____________________________________________________________ - -xfree86: fix XI86_SHARED_POINTER flag setting - -File: - hw/xfree86/common/xf86Xinput.c - -== 20.12.06 == -xfree86: Changing "IsMPDevice" to "SharedPointer" option. Devices will default - to MP devices. - -Xi: Adding QueryDevicePointer request/reply - Adding WarpDevicePointer request/reply - -Files: - hw/xfree86/common/xf86Xinput.c - hw/xfree86/common/xf86Cursor.c - hw/xfree86/common/xf86Xinput.h - Xi/extinit.c - Xi/querydp.c - Xi/querydp.h - Xi/Makefile.am - Xi/warpdevp.c - Xi/warpdevp.h - dix/cursor.c - dix/events.c - dix/dix.h - -Note: This commit requires libXi additions to use the new functions. - -____________________________________________________________ - -xfree86: fix xf86ActivateDevice(): only set to MP device if not a keyboard - -Files: - hw/xfree86/common/xf86Xinput.c - include/extinit.h - Xi/extinit.c - -____________________________________________________________ -removing MPX extension files - -Files: - mpx/ - include/mpxevents.h - include/mpxextinit.h - -____________________________________________________________ -xfree86: fix xf86ProcessCommonOptions() core and shared pointer assignment - -Files: - hw/xfree86/common/xf86Xinput.c - -TAG: mpx-0.3.0 - - -== 18.12.06 == -mi: removing MPX ifdefs - global sprite renaming in mipointer and misprite - fixed: multiple remove cursor call in miSpriteInstallColormap - fixed: wrong core pointer usage in miSpriteStoreColors - -dix: bugfix in CheckCursorConfinement - removing MPX ifdefs - removing MPX event generation (using Xi solely now) - bugfix GrabDevice: uninitialized field in grab struct caused segfault - -xfree86: removing MPX fdefs - -Xi: removing MPX protocol events - -Files: - include/inputstr.h - mi/midispcur.c - mi/mieq.c - mi/mipointer.c - mi/misprite.c - dix/events.c - dix/cursor.c - dix/devices.c - hw/xfree86/common/xf86Events.c - hw/xfree86/common/xf86Input.h - Xi/exevents.c - -____________________________________________________________ - -Cleaning up #ifdef MPX from remaining files, removing it from configure.ac. -Removing building mpx extension from Makefile.am - -Files: - Makefile.am - configure.ac - hw/xfree86/ramdac/xf86HWCurs.c - include/dix-config.h.in - include/dix.h - include/globals.h - include/xorg-server.h.in - mi/mieq.c - mi/miinitext.c - mi/mipointer.c - os/utils.c - -== 12.12.06 == -dix: Moving SpriteRec into DeviceIntRec - removing global sprite structure - beginning to remove MPX ifdefs - -xnest: Fix to make xnest compile again - -Files: - dix/getevents.c - dix/events.c - dix/devices.c - hw/xfree86/common/xf86Xinput.c - include/cursor.h - include/dix.h - include/dixevents.h - include/input.h - include/inputstr.h - XTrap/xtrapdi.c - Xext/xtest.c - hw/xnest/Events.c - record/record.c - -== 05.12.06 == -Xi: adding MPX checks to ProcessOtherEvents - -mpx: adding QueryPointer request and reply - adjusting names of requests to Xlib compatible naming (xMPX*** instead of - mpx***) - - -Files: - Xi/exevents.c - mpx/Makefile.am - mpx/extinit.c - mpx/getevbase.c - mpx/getvers.c - mpx/queryptr.c - mpx/queryptr.h - mpx/selectev.c - mpx/listdev.h - mpx/listdev.c - include/mpxextinit.h - -____________________________________________________________ - -Merging from master - -____________________________________________________________ - -Ironing some glitches caused by the merge - -Files: - Xi/exevents.c - randr/rrpointer.c - dix/events.c - - -== 01.12.06 == - -mpx: SelectEvents and GetEventBase requests. - Some renaming and cleaning up in extinit.c - MPXLastEvent added - -Xi: ShouldFreeInputMask() from XI is not static any more, used in mpx - -dix: GetPointerEvents() allocates MPX event for MPX devices. - DeliverDeviceEvents() caters for MPX devices. - - -Files: - configure.ac - mpx/Makefile.am - mpx/extinit.c - mpx/getvers.c - mpx/getevbase.c - mpx/getevbase.h - mpx/listdev.c - mpx/listdev.h - mpx/mpxglobals.h - mpx/selectev.c - mpx/selectev.h - mpx/mpxevents.h - Xi/exevents.c - dix/events.c - dix/getevents.c - include/mpxevents.h - include/mpxextinit.h - - -== 30.11.06 -mpx: Adding ListDevices request. Minor changes, using - MPXRestoreExtensionEvents() when resetting. - -Files: - mpx/Makefile.am - mpx/extinit.c - mpx/listdev.c - mpx/listdev.h - mpx/mpxextinit.h - - -== 29.11.06 == -mpx: Infrastructure for MPX extension, GetExtensionVersion request works. - -Files: - mpx/ - mpx/Makefile.am - mpx/extinit.c - mpx/getvers.c - mpx/getvers.h - mpxglobals.h - mpx/selectev.c - configure.ac - Makefile.am - os/utils.c - mi/miinitext.c - include/globals.h - -== 28.11.06 == -mi: Bugfix: FreeCursor ignores negative refcounts. - -mieq: Bugfix: Motion notifies did overwrite DeviceMotionNotifies - -Files: - dix/cursor.c - mi/mieq.c - -____________________________________________________________ - -dix: missing parameter to SetCursorPosition in CheckMotion ifndef MPX - -mi: missing include in misprite.c ifndef MPX - -Files: - dix/events.c - mi/misprite.c - - -== 27.11.06 == -mi: free allocated memory in miDCCloseScreen and in miDCInitialize in case - of errors. - Some copyright notices. - misprite.c passes DeviceIntPtr around and down to DC (previously - miCursorInfoPtr and the plain device id). - Large cleanup in misprite.c to avoid code duplication. - -Files: - mi/midispcur.c - mi/misprite.c - mi/misprite.h - -____________________________________________________________ - -mi: mipointer.c cleanup, reducing code duplication, using MPHasCursor(), - removing IsMPDev() - -Files: - mi/mipointer.c - -____________________________________________________________ - -mi: malloc checks for misprite and midispcur, code cleanup - removed IsMPDev() - -Files: - mi/misprite.c - mi/mipointer.c - mi/midispcur.c - dix/events.c - - -== 23.11.06 == -mi: closing memory leak, miPointer is freed in miPointerCloseScreen - bugfix: uninitialized pPointer in miPointerGetPosition ifndef MPX - adding DeviceIntPtr parameter to ScreenRec's cursor functions. - cleanup of miPointer code to use same scheme in each function - -dix: MPHasCursor() function determines checking whether to invoke - cursor rendering. - -animcur: adding DeviceIntPtr parameter to cursor functions but animcur relies - on the core pointer right now. - -xfixes: adding DeviceIntPtr parameter to cursor functions but xfixes relies on - the core pointer right now. - -rac: adding DeviceIntPtr parameter to cursor functions but RAC relies on - the core pointer right now. - -ramdac: adding DeviceIntPtr parameter to cursor functions but ramdac relies on - the core pointer right now. - -Files: - mi/mipointer.c - mi/mipointer.h - mi/micursor.c - mi/mi.h - mi/mieq.c - include/cursor.h - include/inputstr.h - include/scrnintstr.h - include/dix.h - dix/events.c - dix/cursor.c - Xext/xtest.c - render/animcur.c - xfixes/cursor.c - XTrap/xtrapddmi.c - xkb/ddxFakeMtn.c - hw/xfree86/common/xf86Cursor.c - hw/xfree86/common/xf86RandR.c - hw/xfree86/rac/xf86RAC.c - hw/xfree86/ramdac/xf86Cursor.c - hw/xfree86/dri/dri.c - - -== 22.11.06 == - -mi: added DevToSprite() conversion function - fixed miSpriteRealize to use passed pDev argument instead of looping. - -dix: changed sprite dependency and added MPX functionality to parts of - events.c (XineramaChangeToCursor, XineramaCheckPhysLimits, - XineramaConstrainCursor) - -Xi: fix: accessing other->buttons for keyboard segfaulted the server - -Files: - mi/misprite.c - mi/mipointer.c - dix/events.c - Xi/exevents.c - -____________________________________________________________ - -dix GetSpriteWindow() adjusted for MPX - added device dependency for MPX to DoEnterLeaveEvents, - EnterLeaveEvents, EnterNotifies, LeaveNotifies and - FixUpEventFromWindow. - -Files: - Xext/security.c - Xi/exevents.c - xkb/ddxFakeMtn.c - dix/events.c - include/dix.h - -____________________________________________________________ - -dix: DeliverEventsToWindow adjusted for MPX - -mi: sprite debugging disabled - -Files: - dix/events.c - Xi/exevents.c - mi/misprite.c - include/dix.h - - -== 21.11.06 == -mi: added MPX to miSpriteReportDamage - added id field to miCursorInfoPtr, required to pass through to miDC - core pointer uses mpCursors array as well. - added miDCBufferRec for future use with MPX - -Files: - mi/midispcur.c - mi/misprite.c - mi/mispritest.h - -TAG: MPX_BEFORE_MIDC_API_BREAK - -____________________________________________________________ - -mi: added device ID to miSpriteCursorFuncRec functions - added MPX code to midispcur.c - - -Files: - mi/midispcur.c - mi/misprite.c - mi/mispritest.h - -BUG: Core pointer changes whenever MPX cursor changes shape. - -____________________________________________________________ - -mi: constrain MPX cursors to screen - -Files: - dix/events.c - mi/mipointer.c - include/scrnintstr.h - -TAG: MPX_BEFORE_DIX_API_BREAK - - -____________________________________________________________ - -dix: moved sprite from static to be pointer of type SpritePtr - added SpriteRecs for MPX devices - changed sprite dependency and added MPX functionality to parts - of events.c (ConfineToShape, PostNewCursor, XineramaCheckMotion, - CheckMotion, XineramaChangeToCursor, ChangeToCursor, CheckPhysLimits, - PointerConfinedToScreen) - added DeviceIntRec param to GetSpritePosition(). This required some - minor changes in ddx, xtest, xkb and xfixes. - -mi: changed miPointer to pointer instead of static struct. - -Files: - dix/events.c - dix/exevents.c - Xext/xtest.c - ddx/ddxFakeBtn.c - ddx/ddxFakeMtn.c - ddx/ddxDevBtn.c - xkb/xkbActions.c - xfixes/cursor.c - mi/mieq.c - -____________________________________________________________ - -dix: WindowsRestructured() calls CheckMotion() on all devices - -mi: core pointer was checked twice in miSpriteReportDamage, - miSpriteInstallColormap, miSpriteStoreColors, miSpriteSaveDoomedAreas - and miSpriteRealiseCursor - using damage bug (see comment in file) to avoid artefacts - -Files: - dix/events.c - mi/misprite.c - mi/mispritest.h - -== 20.11.06 == - -mi: moved core pointer information from miSpriteScreenRec into a - miCursorInfoRec. - bugfix in mipointer, semicolon after preprocessor statement - -Files: - mi/mispritest.h - mi/misprite.c - mi/mipointer.c - -____________________________________________________________ - -mi: added MPX to miSprite functions. - -Files: - mi/mispritest.h - mi/misprite.c - mi/mipointer.c - dix/events.c - -NOTE: This version will render multiple cursors but with an artefact each time -when devices alternate. - -== 17.11.06 == -dix: moved isMPdev field to end of _DeviceIntRec structure - -mi: - added miMPPointers array to mipointer.c - added DeviceIntPtr to all miPointerSpriteFuncs. Coming from miPointer - we use inputInfo.pointer as standard value. ABI BREAK! - -ramdac: - forcing failed HW Cursor initialisation. MPX needs software rendering. - changes to use new miPointerSpriteFunc (this required externing - inputInfo, should probably be fixed at a later point). - - -RAC: changes to use new miPointerSpriteFuncs. - -Files: - include/inputstr.h - mi/mipointer.c - mi/mipointer.h - mi/misprite.c - hw/xfree86/ramdac/xf86HWCurs.c - hw/xfree86/ramdac/xf86Cursor.c - hw/xfree86/rac/xf86RAC.c - -____________________________________________________________ - -mi: - added miCursorInfoRec to contain info of the MPX cursors. - calling miUpdatePointerSprite() from event queue for MPX devices. - adding device-specific processing to miPointer*() functions. - -dix: Call to SetCursorPosition in CheckMotion() temporarily disabled. - -xfree86/common: call to miPointerUpdateSprite() disabled, is done from the EQ - -NOTE: This build will not display cursor images. -BUG: The second mouse does to take correct x coordinates. - -Files: - mi/mispritestr.h - mi/misprite.c - mi/mipointer.c - mi/mipointer.h - mi/mieq.c - dix/events.c - hw/xfree86/common/xf86Events.c - - -== 16.11.06 == -dix: - merge with code cleanup from master - GetPointerEvents treats events in the same way as XINPUT devices when flag - has POINTER_MULTIPOINTER set. - -xfree86/common: - added XI86_MP_DEVICE flag and parsing in xf86ProcessCommonOptions - added POINTER_MULTIPOINTER define. Is used in xf86PostMotionEvent and - xf86PostButtonEvent for the flags that are passed into GetPointerEvents() - -global: - added flags to configure.ac to enable/disable MPX define - added flags to dix-config.h.in to #define MPX - -Files: - dix/getevents.c - hw/xfree86/common/xf86Xinput.c - hw/xfree86/common/xf86Xinput.h - include/input.h - configure.ac - include/dix-config.h.in - -____________________________________________________________ - -dix: added isMPdev field to _DeviceIntRec, is used in GetPointerEvents() - -mieq: avoid merging events from different devices in mieqEnqueue() - -xfree86/common - isMPdev field used from xf86ActivateDevice(), xf86PostMotionEvent() - and xf86PostButtonEvent() - -Files: - dix/getevents.c - hw/xfree86/common/xf86Xinput.c - include/inputstr.h - mi/mieq.c - -____________________________________________________________ - -mieq: EQ processing handles MP devices - -global: MPX define added to xorg-server.h.in - -xfree86/common: small fix to avoid byte overflow - -Files: - mi/mieq.c - hw/xfree86/common/xf86Xinput.c - include/xserver-config.h.in diff --git a/Xi/exglobals.h b/Xi/exglobals.h index 3afd1bb9e..bc4a60d85 100644 --- a/Xi/exglobals.h +++ b/Xi/exglobals.h @@ -70,6 +70,8 @@ extern int DeviceButtonStateNotify; extern int DeviceMappingNotify; extern int ChangeDeviceNotify; extern int DevicePresenceNotify; +extern int DeviceEnterNotify; +extern int DeviceLeaveNotify; extern int RT_INPUTCLIENT; diff --git a/Xi/extinit.c b/Xi/extinit.c index 82bed5000..8948e6c6a 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -170,6 +170,8 @@ Mask DeviceOwnerGrabButtonMask; Mask DeviceButtonGrabMask; Mask DeviceButtonMotionMask; Mask DevicePresenceNotifyMask; +Mask DeviceEnterWindowMask; +Mask DeviceLeaveWindowMask; int DeviceValuator; int DeviceKeyPress; @@ -187,6 +189,8 @@ int DeviceButtonStateNotify; int DeviceMappingNotify; int ChangeDeviceNotify; int DevicePresenceNotify; +int DeviceEnterNotify; +int DeviceLeaveNotify; int RT_INPUTCLIENT; @@ -251,6 +255,8 @@ XInputExtensionInit(void) EventSwapVector[DeviceButtonStateNotify] = SEventIDispatch; EventSwapVector[DeviceMappingNotify] = SEventIDispatch; EventSwapVector[ChangeDeviceNotify] = SEventIDispatch; + EventSwapVector[DeviceEnterNotify] = SEventIDispatch; + EventSwapVector[DeviceLeaveNotify] = SEventIDispatch; } else { FatalError("IExtensionInit: AddExtensions failed\n"); } @@ -436,6 +442,8 @@ SProcIDispatch(register ClientPtr client) return (SProcXQueryDevicePointer(client)); else if (stuff->data == X_WarpDevicePointer) return (SProcXWarpDevicePointer(client)); + else if (stuff->data == X_ChangeDeviceCursor) + return (SProcXChangeDeviceCursor(client)); else { SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); } @@ -566,6 +574,10 @@ SEventIDispatch(xEvent * from, xEvent * to) DO_SWAP(SDeviceMappingNotifyEvent, deviceMappingNotify); else if (type == ChangeDeviceNotify) DO_SWAP(SChangeDeviceNotifyEvent, changeDeviceNotify); + else if (type == DeviceEnterNotify) + DO_SWAP(SDeviceEnterNotifyEvent, deviceEnterNotify); + else if (type == DeviceLeaveNotify) + DO_SWAP(SDeviceLeaveNotifyEvent, deviceLeaveNotify); else { FatalError("XInputExtension: Impossible event!\n"); } @@ -671,6 +683,31 @@ SDevicePresenceNotifyEvent (devicePresenceNotify *from, devicePresenceNotify *to swaps(&to->control, n); } +void SDeviceEnterNotifyEvent (deviceEnterNotify *from, deviceEnterNotify *to) +{ + register char n; + + *to = *from; + swaps(&to->sequenceNumber,n); + swapl(&to->time, n); +} + +void SDeviceLeaveNotifyEvent (deviceLeaveNotify *from, deviceLeaveNotify *to) +{ + register char n; + + *to = *from; + swaps(&to->sequenceNumber,n); + swapl(&to->time, n); + swapl(&to->root, n); + swapl(&to->event, n); + swapl(&to->child, n); + swaps(&to->rootX, n); + swaps(&to->rootY, n); + swaps(&to->eventX, n); + swaps(&to->eventY, n); +} + /************************************************************************ * * This function sets up extension event types and masks. @@ -698,6 +735,8 @@ FixExtensionEvents(ExtensionEntry * extEntry) DeviceKeyStateNotify = ChangeDeviceNotify + 1; DeviceButtonStateNotify = DeviceKeyStateNotify + 1; DevicePresenceNotify = DeviceButtonStateNotify + 1; + DeviceEnterNotify = DevicePresenceNotify + 1; + DeviceLeaveNotify = DeviceEnterNotify + 1; event_base[KeyClass] = DeviceKeyPress; event_base[ButtonClass] = DeviceButtonPress; @@ -773,6 +812,15 @@ FixExtensionEvents(ExtensionEntry * extEntry) DevicePresenceNotifyMask = GetNextExtEventMask(); SetEventInfo(DevicePresenceNotifyMask, _devicePresence); + + DeviceEnterWindowMask = GetNextExtEventMask(); + SetMaskForExtEvent(DeviceEnterWindowMask, DeviceEnterNotify); + AllowPropagateSuppress(DeviceEnterWindowMask); + + DeviceLeaveWindowMask = GetNextExtEventMask(); + SetMaskForExtEvent(DeviceLeaveWindowMask, DeviceLeaveNotify); + AllowPropagateSuppress(DeviceLeaveWindowMask); + SetEventInfo(0, _noExtensionEvent); } @@ -814,6 +862,8 @@ RestoreExtensionEvents(void) DeviceKeyStateNotify = 13; DeviceButtonStateNotify = 13; DevicePresenceNotify = 14; + DeviceEnterNotify = 15; + DeviceLeaveNotify = 16; BadDevice = 0; BadEvent = 1; @@ -852,6 +902,8 @@ IResetProc(ExtensionEntry * unused) EventSwapVector[DeviceMappingNotify] = NotImplemented; EventSwapVector[ChangeDeviceNotify] = NotImplemented; EventSwapVector[DevicePresenceNotify] = NotImplemented; + EventSwapVector[DeviceEnterNotify] = NotImplemented; + EventSwapVector[DeviceLeaveNotify] = NotImplemented; RestoreExtensionEvents(); } diff --git a/Xi/querydp.c b/Xi/querydp.c index 04323e42a..c1ba2ee3b 100644 --- a/Xi/querydp.c +++ b/Xi/querydp.c @@ -84,7 +84,7 @@ ProcXQueryDevicePointer(register ClientPtr client) REQUEST_SIZE_MATCH(xQueryDevicePointerReq); pDev = LookupDeviceIntRec(stuff->deviceid); - if (pDev == NULL) { + if (pDev == NULL || pDev->valuator == NULL) { SendErrorToClient(client, IReqCode, X_QueryDevicePointer, stuff->deviceid, BadDevice); return Success; diff --git a/dix/events.c b/dix/events.c index 3c11723c1..23fb1ecfa 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3322,13 +3322,17 @@ EnterLeaveEvent( register WindowPtr pWin, Window child) { - xEvent event; + xEvent event; register DeviceIntPtr keybd = inputInfo.keyboard; WindowPtr focus; register DeviceIntPtr mouse = pDev; register GrabPtr grab = mouse->grab; Mask mask; + deviceEnterNotify *devEnterLeave; + int mskidx; + OtherInputMasks *inputMasks; + if ((pWin == mouse->valuator->motionHintWindow) && (detail != NotifyInferior)) mouse->valuator->motionHintWindow = NullWindow; @@ -3342,33 +3346,35 @@ EnterLeaveEvent( { mask = pWin->eventMask | wOtherEventMasks(pWin); } + + event.u.u.type = type; + event.u.u.detail = detail; + event.u.enterLeave.time = currentTime.milliseconds; + event.u.enterLeave.rootX = pDev->pSprite->hot.x; + event.u.enterLeave.rootY = pDev->pSprite->hot.y; + /* Counts on the same initial structure of crossing & button events! */ + FixUpEventFromWindow(mouse, &event, pWin, None, FALSE); + /* Enter/Leave events always set child */ + event.u.enterLeave.child = child; + event.u.enterLeave.flags = event.u.keyButtonPointer.sameScreen ? + ELFlagSameScreen : 0; +#ifdef XKB + if (!noXkbExtension) { + event.u.enterLeave.state = mouse->button->state & 0x1f00; + event.u.enterLeave.state |= + XkbGrabStateFromRec(&keybd->key->xkbInfo->state); + } else +#endif + event.u.enterLeave.state = keybd->key->state | mouse->button->state; + event.u.enterLeave.mode = mode; + focus = keybd->focus->win; + if ((focus != NoneWin) && + ((pWin == focus) || (focus == PointerRootWin) || + IsParent(focus, pWin))) + event.u.enterLeave.flags |= ELFlagFocus; + if (mask & filters[type]) { - event.u.u.type = type; - event.u.u.detail = detail; - event.u.enterLeave.time = currentTime.milliseconds; - event.u.enterLeave.rootX = pDev->pSprite->hot.x; - event.u.enterLeave.rootY = pDev->pSprite->hot.y; - /* Counts on the same initial structure of crossing & button events! */ - FixUpEventFromWindow(mouse, &event, pWin, None, FALSE); - /* Enter/Leave events always set child */ - event.u.enterLeave.child = child; - event.u.enterLeave.flags = event.u.keyButtonPointer.sameScreen ? - ELFlagSameScreen : 0; -#ifdef XKB - if (!noXkbExtension) { - event.u.enterLeave.state = mouse->button->state & 0x1f00; - event.u.enterLeave.state |= - XkbGrabStateFromRec(&keybd->key->xkbInfo->state); - } else -#endif - event.u.enterLeave.state = keybd->key->state | mouse->button->state; - event.u.enterLeave.mode = mode; - focus = keybd->focus->win; - if ((focus != NoneWin) && - ((pWin == focus) || (focus == PointerRootWin) || - IsParent(focus, pWin))) - event.u.enterLeave.flags |= ELFlagFocus; if (grab) (void)TryClientEvents(rClient(grab), &event, 1, mask, filters[type], grab); @@ -3376,6 +3382,27 @@ EnterLeaveEvent( (void)DeliverEventsToWindow(pDev, pWin, &event, 1, filters[type], NullGrab, 0); } + + devEnterLeave = (deviceEnterNotify*)&event; + devEnterLeave->type = (type == EnterNotify) ? DeviceEnterNotify : + DeviceLeaveNotify; + devEnterLeave->type = (type == EnterNotify) ? DeviceEnterNotify : + DeviceLeaveNotify; + devEnterLeave->deviceid = pDev->id; + mskidx = pDev->id; + inputMasks = wOtherInputMasks(pWin); + if (inputMasks && + (filters[devEnterLeave->type] & inputMasks->deliverableEvents[mskidx])) + { + if (grab) + (void)TryClientEvents(rClient(grab), (xEvent*)devEnterLeave, 1, + mask, filters[devEnterLeave->type], grab); + else + (void)DeliverEventsToWindow(pDev, pWin, (xEvent*)devEnterLeave, + 1, filters[devEnterLeave->type], + NullGrab, pDev->id); + } + if ((type == EnterNotify) && (mask & KeymapStateMask)) { xKeymapEvent ke; diff --git a/include/extinit.h b/include/extinit.h index 5546b210f..6cf7bf737 100644 --- a/include/extinit.h +++ b/include/extinit.h @@ -109,6 +109,18 @@ SDevicePresenceNotifyEvent ( devicePresenceNotify * /* to */ ); +void +SDeviceEnterNotifyEvent ( + deviceEnterNotify * /* from */, + deviceEnterNotify * /* to */ + ); + +void +SDeviceLeaveNotifyEvent ( + deviceLeaveNotify * /* from */, + deviceLeaveNotify * /* to */ + ); + void FixExtensionEvents ( ExtensionEntry * /* extEntry */ From 5e2f8dee6331645fcbd2734c43698eb4f9c5b116 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 11 Jan 2007 14:05:39 +1030 Subject: [PATCH 041/634] mi: remove core pointer special handling. No event has core pointer as device now. dix: zero pSprite memory, stop segfaults on server restart. --- dix/events.c | 6 ++++-- mi/mieq.c | 5 +---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dix/events.c b/dix/events.c index 23fb1ecfa..0380ad1b7 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2172,7 +2172,7 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) REGION_TRANSLATE(pSprite->screen, &pSprite->Reg2, xoff, yoff); /* FIXME: if we call ConfineCursorToWindow, must we do anything else? */ - if ((grab = inputInfo.pointer->grab) && grab->confineTo) { + if ((grab = pDev->grab) && grab->confineTo) { if (grab->confineTo->drawable.pScreen != pSprite->hotPhys.pScreen) pSprite->hotPhys.x = pSprite->hotPhys.y = 0; @@ -3902,6 +3902,7 @@ ProcGrabPointer(ClientPtr client) oldCursor = grab->cursor; } tempGrab.cursor = cursor; + /* FIXME: refcnt?? */ tempGrab.resource = client->clientAsMask; tempGrab.ownerEvents = stuff->ownerEvents; tempGrab.eventMask = stuff->eventMask; @@ -3958,7 +3959,7 @@ ProcChangeActivePointerGrab(ClientPtr client) grab->cursor = newCursor; if (newCursor) newCursor->refcnt++; - PostNewCursor(inputInfo.pointer); + PostNewCursor(device); if (oldCursor) FreeCursor(oldCursor, (Cursor)0); grab->eventMask = stuff->eventMask; @@ -4213,6 +4214,7 @@ InitSprite(DeviceIntPtr pDev, Bool hasCursor) SpritePtr pSprite = (SpritePtr)xalloc(sizeof(SpriteRec)); if (!pSprite) FatalError("failed to allocate sprite struct"); + memset(pSprite, 0, sizeof(SpriteRec)); pSprite->hot.pScreen = pSprite->hotPhys.pScreen = (ScreenPtr)NULL; pSprite->win = NullWindow; pSprite->current = NullCursor; diff --git a/mi/mieq.c b/mi/mieq.c index 49bf867cd..0744e6c2c 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -235,10 +235,7 @@ mieqProcessInputEvents() * Use dev to get the correct processing function but supply * e->pDev to pass the correct device */ - if (e->pDev->isMPDev) - dev->public.processInputProc(e->event, e->pDev, e->nevents); - else - dev->public.processInputProc(e->event, dev, e->nevents); + dev->public.processInputProc(e->event, e->pDev, e->nevents); } /* Update the sprite now. Next event may be from different device. */ From ba547d4f6a2707f51f0d826389d2d418fb62367a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 12 Jan 2007 14:42:02 +1030 Subject: [PATCH 042/634] mi: Quick fix to stop segfault on non-core keyboards. --- dix/cursor.c | 1 - mi/mieq.c | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/dix/cursor.c b/dix/cursor.c index b58a7bf81..cf515c11a 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -117,7 +117,6 @@ FreeCursor(pointer value, XID cid) ScreenPtr pscr; DeviceIntPtr pDev; - MPXDBG("freecursor refcount %d\n", pCurs->refcnt); if ( --pCurs->refcnt != 0) return(Success); diff --git a/mi/mieq.c b/mi/mieq.c index 0744e6c2c..b336277d4 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -231,6 +231,14 @@ mieqProcessInputEvents() dev = e->pDev; } + /* FIXME: Keyboard extension devices do not have devPrivates + * initialized, resulting in a segfault in XkbHandleActions. */ + if (e->event[0].u.u.type == DeviceKeyPress || + e->event[0].u.u.type == DeviceKeyRelease || + e->event[0].u.u.type == KeyPress || + e->event[0].u.u.type == KeyRelease) + e->pDev = dev = inputInfo.keyboard; + /* MPX devices send both core and Xi events. * Use dev to get the correct processing function but supply * e->pDev to pass the correct device From cc3d66d4a53fee8f1d940bb8c7f032c94b9c25f6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 15 Nov 2006 17:50:02 +1030 Subject: [PATCH 043/634] o fix minor error in comment for GetPointerEvents() --- dix/getevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/getevents.c b/dix/getevents.c index 8b2a44d70..6f364ec0e 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -470,7 +470,7 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type, /** - * Generate a series of xEvents (returned in xE) representing pointer + * Generate a series of xEvents (returned in events) representing pointer * motion, or button presses. Xi and XKB-aware. * * events is not NULL-terminated; the return value is the number of events. From f3418b52dcf2ab4982504856ab9fae3e726ee6d2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 29 Jan 2007 16:10:03 +1030 Subject: [PATCH 044/634] mi: Fix cursor rendering issues. --- mi/misprite.c | 91 ++++++++++++++++++++++++++++++++++++++----------- mi/mispritest.h | 38 +++++++++------------ 2 files changed, 88 insertions(+), 41 deletions(-) diff --git a/mi/misprite.c b/mi/misprite.c index 70dda1c3c..8639c5629 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -137,6 +137,8 @@ _X_EXPORT miPointerSpriteFuncRec miSpritePointerFuncs = { static void miSpriteRemoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen); +static void miSpriteSaveUnderCursor(DeviceIntPtr pDev, + ScreenPtr pScreen); static void miSpriteRestoreCursor(DeviceIntPtr pDev, ScreenPtr pScreen); @@ -516,6 +518,18 @@ miSpriteBlockHandler (i, blockData, pTimeout, pReadmask) SCREEN_EPILOGUE(pScreen, BlockHandler); + for(pDev = inputInfo.devices; pDev; pDev = pDev->next) + { + if (DevHasCursor(pDev)) + { + pCursorInfo = &pPriv->pDevCursors[pDev->id]; + if (!pCursorInfo->isUp && pCursorInfo->shouldBeUp) + { + SPRITE_DEBUG (("BlockHandler restore\n")); + miSpriteSaveUnderCursor (pDev, pScreen); + } + } + } for(pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (DevHasCursor(pDev)) @@ -891,14 +905,15 @@ miSpriteSetCursor (pDev, pScreen, pCursor, x, y) else #endif { - SPRITE_DEBUG (("SetCursor remove\n")); + SPRITE_DEBUG (("SetCursor remove %d\n", pDev->id)); miSpriteRemoveCursor (pDev, pScreen); } } if (!pPointer->isUp && pPointer->pCursor) { - SPRITE_DEBUG (("SetCursor restore\n")); + SPRITE_DEBUG (("SetCursor restore %d\n", pDev->id)); + miSpriteSaveUnderCursor(pDev, pScreen); miSpriteRestoreCursor (pDev, pScreen); } @@ -944,6 +959,7 @@ miSpriteRemoveCursor (pDev, pScreen) miSpriteIsUpFALSE (pCursorInfo, pScreen, pScreenPriv); pCursorInfo->pCacheWin = NullWindow; + miSpriteDisableDamage(pScreen, pScreenPriv); if (!(*pScreenPriv->funcs->RestoreUnderCursor) (pDev, pScreen, pCursorInfo->saved.x1, @@ -955,9 +971,53 @@ miSpriteRemoveCursor (pDev, pScreen) { miSpriteIsUpTRUE (pCursorInfo, pScreen, pScreenPriv); } + miSpriteEnableDamage(pScreen, pScreenPriv); DamageDrawInternal (pScreen, FALSE); } +/* + * Called from the block handler, saves area under cursor + * before waiting for something to do. + */ + +static void +miSpriteSaveUnderCursor(pDev, pScreen) + DeviceIntPtr pDev; + ScreenPtr pScreen; +{ + miSpriteScreenPtr pScreenPriv; + int x, y; + CursorPtr pCursor; + miCursorInfoPtr pCursorInfo; + + DamageDrawInternal (pScreen, TRUE); + pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; + pCursorInfo = pScreenPriv->cp; + + if (DevHasCursor(pDev)) + pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; + + miSpriteComputeSaved (pDev, pScreen); + pCursor = pCursorInfo->pCursor; + + x = pCursorInfo->x - (int)pCursor->bits->xhot; + y = pCursorInfo->y - (int)pCursor->bits->yhot; + miSpriteDisableDamage(pScreen, pScreenPriv); + + (*pScreenPriv->funcs->SaveUnderCursor) (pDev, + pScreen, + pCursorInfo->saved.x1, + pCursorInfo->saved.y1, + pCursorInfo->saved.x2 - + pCursorInfo->saved.x1, + pCursorInfo->saved.y2 - + pCursorInfo->saved.y1); + SPRITE_DEBUG(("SaveUnderCursor %d\n", pDev->id)); + miSpriteEnableDamage(pScreen, pScreenPriv); + DamageDrawInternal (pScreen, FALSE); +} + + /* * Called from the block handler, restores the cursor * before waiting for something to do. @@ -985,25 +1045,18 @@ miSpriteRestoreCursor (pDev, pScreen) x = pCursorInfo->x - (int)pCursor->bits->xhot; y = pCursorInfo->y - (int)pCursor->bits->yhot; - if ((*pScreenPriv->funcs->SaveUnderCursor) (pDev, - pScreen, - pCursorInfo->saved.x1, - pCursorInfo->saved.y1, - pCursorInfo->saved.x2 - - pCursorInfo->saved.x1, - pCursorInfo->saved.y2 - - pCursorInfo->saved.y1)) + miSpriteDisableDamage(pScreen, pScreenPriv); + SPRITE_DEBUG(("RestoreCursor %d\n", pDev->id)); + if (pCursorInfo->checkPixels) + miSpriteFindColors (pCursorInfo, pScreen); + if ((*pScreenPriv->funcs->PutUpCursor) (pDev, pScreen, + pCursor, x, y, + pCursorInfo->colors[SOURCE_COLOR].pixel, + pCursorInfo->colors[MASK_COLOR].pixel)) { - if (pCursorInfo->checkPixels) - miSpriteFindColors (pCursorInfo, pScreen); - if ((*pScreenPriv->funcs->PutUpCursor) (pDev, pScreen, - pCursor, x, y, - pCursorInfo->colors[SOURCE_COLOR].pixel, - pCursorInfo->colors[MASK_COLOR].pixel)) - { - miSpriteIsUpTRUE (pCursorInfo, pScreen, pScreenPriv); - } + miSpriteIsUpTRUE (pCursorInfo, pScreen, pScreenPriv); } + miSpriteEnableDamage(pScreen, pScreenPriv); DamageDrawInternal (pScreen, FALSE); } diff --git a/mi/mispritest.h b/mi/mispritest.h index 39875e0cb..8c8cd5314 100644 --- a/mi/mispritest.h +++ b/mi/mispritest.h @@ -95,30 +95,24 @@ typedef struct { #define MASK_COLOR 1 static int damageRegister = 0; -/* - * FIXME: MPX uses a bug at the moment. The semaphore system in place will - * call miSpriteIsUpTRUE multiple times and thus DamageUnregister() will never - * be called in miSpriteIsUpFALSE. - * This gets rid of cursor rendering artefacts but I don't know how this - * affects applications. - * Without any semaphore system in place DamageRegister will be called twice - * and segfault. - */ -#define miSpriteIsUpTRUE(pDevCursor, pScreen, pScreenPriv) if (!pDevCursor->isUp) { \ - pDevCursor->isUp = TRUE; \ - if (!damageRegister ) { \ - DamageRegister (&(*pScreen->GetScreenPixmap) (pScreen)->drawable, pScreenPriv->pDamage); \ - } \ - damageRegister++; \ + +#define miSpriteDisableDamage(pScreen, pScreenPriv) \ + if (damageRegister) { \ + DamageUnregister (&(*pScreen->GetScreenPixmap) (pScreen)->drawable, pScreenPriv->pDamage); \ + damageRegister = 0; \ } -#define miSpriteIsUpFALSE(pDevCursor, pScreen, pScreenPriv) if (pDevCursor->isUp) { \ - damageRegister--; \ - if (!damageRegister) { \ - DamageUnregister (&(*pScreen->GetScreenPixmap) (pScreen)->drawable, pScreenPriv->pDamage); \ - } \ - pDevCursor->isUp = FALSE; \ -} +#define miSpriteEnableDamage(pScreen, pScreenPriv) \ + if (!damageRegister) {\ + damageRegister = 1; \ + DamageRegister (&(*pScreen->GetScreenPixmap) (pScreen)->drawable, pScreenPriv->pDamage); \ + } + +#define miSpriteIsUpTRUE(pDevCursor, pScreen, pScreenPriv) if (!pDevCursor->isUp) \ + pDevCursor->isUp = TRUE; + +#define miSpriteIsUpFALSE(pDevCursor, pScreen, pScreenPriv) if (pDevCursor->isUp) \ + pDevCursor->isUp = FALSE; /* * Overlap BoxPtr and Box elements From 4aaaa70d1b52346213fad46777c006a93c4ece5d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 29 Jan 2007 18:23:24 +1030 Subject: [PATCH 045/634] Xi: Adding ChangePointerKeyboardPairing request Adding PointerKeyboardPairingChanged event Correct error values for XWarpDevicePointer dix: Adding device argument to SendMappingNotify Adding spriteOwner flag to devices --- Xi/Makefile.am | 2 + Xi/chpkpair.c | 100 +++++++++++++++++++++++++++++++++ Xi/chpkpair.h | 40 +++++++++++++ Xi/exglobals.h | 4 ++ Xi/extinit.c | 40 +++++++++++-- Xi/warpdevp.c | 3 +- dix/devices.c | 15 +++-- dix/events.c | 10 ++-- dix/getevents.c | 2 +- hw/xfree86/common/xf86Xinput.c | 21 +++++-- include/extinit.h | 8 ++- include/input.h | 1 + include/inputstr.h | 7 ++- 13 files changed, 226 insertions(+), 27 deletions(-) create mode 100644 Xi/chpkpair.c create mode 100644 Xi/chpkpair.h diff --git a/Xi/Makefile.am b/Xi/Makefile.am index 9e7d1c43e..90000308d 100644 --- a/Xi/Makefile.am +++ b/Xi/Makefile.am @@ -19,6 +19,8 @@ libXi_la_SOURCES = \ chgprop.h \ chgptr.c \ chgptr.h \ + chpkpair.c \ + chpkpair.h \ closedev.c \ closedev.h \ devbell.c \ diff --git a/Xi/chpkpair.c b/Xi/chpkpair.c new file mode 100644 index 000000000..b8624178d --- /dev/null +++ b/Xi/chpkpair.c @@ -0,0 +1,100 @@ +/* + +Copyright 2006 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +/*********************************************************************** + * + * Request change pairing between pointer and keyboard device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exevents.h" +#include "exglobals.h" + + +#include "chpkpair.h" + +/*********************************************************************** + * + * This procedure allows a client to change the pairing of a pointer with a + * a keyboard. + * + */ + +int SProcXChangePointerKeyboardPairing(register ClientPtr client) +{ + register char n; + + REQUEST(xChangePointerKeyboardPairingReq); + swaps(&stuff->length, n); + return (ProcXChangePointerKeyboardPairing(client)); +} + +int +ProcXChangePointerKeyboardPairing(register ClientPtr client) +{ + DeviceIntPtr pPointer, pKeyboard; + + REQUEST(xChangePointerKeyboardPairingReq); + REQUEST_SIZE_MATCH(xChangePointerKeyboardPairingReq); + + pPointer = LookupDeviceIntRec(stuff->pointer); + if (pPointer == NULL) + { + SendErrorToClient(client, IReqCode, X_ChangePointerKeyboardPairing, + stuff->pointer, BadDevice); + return Success; + } + + pKeyboard = LookupDeviceIntRec(stuff->keyboard); + if (pKeyboard == NULL) + { + SendErrorToClient(client, IReqCode, X_ChangePointerKeyboardPairing, + stuff->keyboard, BadDevice); + return Success; + } + + pKeyboard->pSprite = pPointer->pSprite; + + /* TODO: generate event here... */ + return Success; +} diff --git a/Xi/chpkpair.h b/Xi/chpkpair.h new file mode 100644 index 000000000..1acf54921 --- /dev/null +++ b/Xi/chpkpair.h @@ -0,0 +1,40 @@ +/************************************************************ + +Copyright 2006 by Peter Hutterer + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef CHPKPAIR_H +#define CHPKPAIR_H 1 + +int SProcXChangePointerKeyboardPairing(ClientPtr /* client */ + ); + +int ProcXChangePointerKeyboardPairing(ClientPtr /* client */ + ); + +#endif /* WARPDEVP_H */ + diff --git a/Xi/exglobals.h b/Xi/exglobals.h index bc4a60d85..811375e25 100644 --- a/Xi/exglobals.h +++ b/Xi/exglobals.h @@ -52,6 +52,9 @@ extern Mask DeviceOwnerGrabButtonMask; extern Mask DeviceButtonGrabMask; extern Mask DeviceButtonMotionMask; extern Mask DevicePresenceNotifyMask; +extern Mask DeviceEnterWindowMask; +extern Mask DeviceLeaveWindowMask; +extern Mask PointerKeyboardPairingChangedNotifyMask; extern Mask PropagateMask[]; extern int DeviceValuator; @@ -72,6 +75,7 @@ extern int ChangeDeviceNotify; extern int DevicePresenceNotify; extern int DeviceEnterNotify; extern int DeviceLeaveNotify; +extern int PointerKeyboardPairingChangedNotify; extern int RT_INPUTCLIENT; diff --git a/Xi/extinit.c b/Xi/extinit.c index 8948e6c6a..a08ec77fa 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -80,6 +80,7 @@ SOFTWARE. #include "chgkbd.h" #include "chgprop.h" #include "chgptr.h" +#include "chpkpair.h" #include "closedev.h" #include "devbell.h" #include "getbmap.h" @@ -172,6 +173,7 @@ Mask DeviceButtonMotionMask; Mask DevicePresenceNotifyMask; Mask DeviceEnterWindowMask; Mask DeviceLeaveWindowMask; +Mask PointerKeyboardPairingChangedMask; int DeviceValuator; int DeviceKeyPress; @@ -191,6 +193,7 @@ int ChangeDeviceNotify; int DevicePresenceNotify; int DeviceEnterNotify; int DeviceLeaveNotify; +int PointerKeyboardPairingChangedNotify; int RT_INPUTCLIENT; @@ -257,6 +260,7 @@ XInputExtensionInit(void) EventSwapVector[ChangeDeviceNotify] = SEventIDispatch; EventSwapVector[DeviceEnterNotify] = SEventIDispatch; EventSwapVector[DeviceLeaveNotify] = SEventIDispatch; + EventSwapVector[PointerKeyboardPairingChangedNotify] = SEventIDispatch; } else { FatalError("IExtensionInit: AddExtensions failed\n"); } @@ -349,6 +353,8 @@ ProcIDispatch(register ClientPtr client) return (ProcXWarpDevicePointer(client)); else if (stuff->data == X_ChangeDeviceCursor) return (ProcXChangeDeviceCursor(client)); + else if (stuff->data == X_ChangePointerKeyboardPairing) + return (ProcXChangePointerKeyboardPairing(client)); else { SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); } @@ -444,6 +450,8 @@ SProcIDispatch(register ClientPtr client) return (SProcXWarpDevicePointer(client)); else if (stuff->data == X_ChangeDeviceCursor) return (SProcXChangeDeviceCursor(client)); + else if (stuff->data == X_ChangePointerKeyboardPairing) + return (SProcXChangePointerKeyboardPairing(client)); else { SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); } @@ -578,6 +586,8 @@ SEventIDispatch(xEvent * from, xEvent * to) DO_SWAP(SDeviceEnterNotifyEvent, deviceEnterNotify); else if (type == DeviceLeaveNotify) DO_SWAP(SDeviceLeaveNotifyEvent, deviceLeaveNotify); + else if (type == PointerKeyboardPairingChangedNotify) + DO_SWAP(SPointerKeyboardPairingChangedNotifyEvent, pairingChangedNotify); else { FatalError("XInputExtension: Impossible event!\n"); } @@ -708,6 +718,16 @@ void SDeviceLeaveNotifyEvent (deviceLeaveNotify *from, deviceLeaveNotify *to) swaps(&to->eventY, n); } +void SPointerKeyboardPairingChangedNotifyEvent (pairingChangedNotify *from, + pairingChangedNotify *to) +{ + register char n; + + *to = *from; + swaps(&to->sequenceNumber, n); + swapl(&to->time, n); +} + /************************************************************************ * * This function sets up extension event types and masks. @@ -737,6 +757,7 @@ FixExtensionEvents(ExtensionEntry * extEntry) DevicePresenceNotify = DeviceButtonStateNotify + 1; DeviceEnterNotify = DevicePresenceNotify + 1; DeviceLeaveNotify = DeviceEnterNotify + 1; + PointerKeyboardPairingChangedNotify = DeviceLeaveNotify + 1; event_base[KeyClass] = DeviceKeyPress; event_base[ButtonClass] = DeviceButtonPress; @@ -821,6 +842,11 @@ FixExtensionEvents(ExtensionEntry * extEntry) SetMaskForExtEvent(DeviceLeaveWindowMask, DeviceLeaveNotify); AllowPropagateSuppress(DeviceLeaveWindowMask); + PointerKeyboardPairingChangedMask = GetNextExtEventMask(); + SetMaskForExtEvent(PointerKeyboardPairingChangedMask, + PointerKeyboardPairingChangedNotify); + AllowPropagateSuppress(PointerKeyboardPairingChangedMask); + SetEventInfo(0, _noExtensionEvent); } @@ -864,6 +890,7 @@ RestoreExtensionEvents(void) DevicePresenceNotify = 14; DeviceEnterNotify = 15; DeviceLeaveNotify = 16; + PointerKeyboardPairingChangedNotify = 17; BadDevice = 0; BadEvent = 1; @@ -904,6 +931,7 @@ IResetProc(ExtensionEntry * unused) EventSwapVector[DevicePresenceNotify] = NotImplemented; EventSwapVector[DeviceEnterNotify] = NotImplemented; EventSwapVector[DeviceLeaveNotify] = NotImplemented; + EventSwapVector[PointerKeyboardPairingChangedNotify] = NotImplemented; RestoreExtensionEvents(); } @@ -923,17 +951,17 @@ AssignTypeAndName(DeviceIntPtr dev, Atom type, char *name) /*********************************************************************** * - * Returns true if a device may require a pointer (is not a keyboard). + * Returns true if a device may require a pointer (is a mouse). + * FIXME: Other devices should be able to get a pointer too... * */ _X_EXPORT Bool -MayNeedPointer(DeviceIntPtr dev) +IsPointerDevice(DeviceIntPtr dev) { - /* return false if device is a keyboard */ - if (dev_type[0].type == dev->type) - return FALSE; + if (dev_type[1].type == dev->type) + return TRUE; - return TRUE; + return FALSE; } /*********************************************************************** diff --git a/Xi/warpdevp.c b/Xi/warpdevp.c index 2b558d103..a9ddb0b6b 100644 --- a/Xi/warpdevp.c +++ b/Xi/warpdevp.c @@ -85,7 +85,8 @@ ProcXWarpDevicePointer(register ClientPtr client) pDev = LookupDeviceIntRec(stuff->deviceid); if (pDev == NULL) { - SendErrorToClient(client, IReqCode, X_WarpDevicePointer, 0, + SendErrorToClient(client, IReqCode, X_WarpDevicePointer, + stuff->deviceid, BadDevice); return Success; } diff --git a/dix/devices.c b/dix/devices.c index 41e866717..bc7ca892c 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -1072,8 +1072,8 @@ InitKeyboardDeviceStruct(DevicePtr device, KeySymsPtr pKeySyms, } _X_EXPORT void -SendMappingNotify(unsigned request, unsigned firstKeyCode, unsigned count, - ClientPtr client) +SendMappingNotify(DeviceIntPtr pDev, unsigned request, unsigned firstKeyCode, + unsigned count, ClientPtr client) { int i; xEvent event; @@ -1088,8 +1088,7 @@ SendMappingNotify(unsigned request, unsigned firstKeyCode, unsigned count, #ifdef XKB if (!noXkbExtension && ((request == MappingKeyboard) || (request == MappingModifier))) { - XkbApplyMappingChange(inputInfo.keyboard,request,firstKeyCode,count, - client); + XkbApplyMappingChange(pDev,request,firstKeyCode,count, client); } #endif @@ -1253,7 +1252,7 @@ ProcSetModifierMapping(ClientPtr client) stuff->numKeyPerModifier); /* FIXME: Send mapping notifies for all the extended devices as well. */ - SendMappingNotify(MappingModifier, 0, 0, client); + SendMappingNotify(inputInfo.keyboard, MappingModifier, 0, 0, client); WriteReplyToClient(client, sizeof(xSetModifierMappingReply), &rep); return client->noClientException; } @@ -1324,8 +1323,8 @@ ProcChangeKeyboardMapping(ClientPtr client) } /* FIXME: Send mapping notifies for all the extended devices as well. */ - SendMappingNotify(MappingKeyboard, stuff->firstKeyCode, stuff->keyCodes, - client); + SendMappingNotify(inputInfo.keyboard, MappingKeyboard, + stuff->firstKeyCode, stuff->keyCodes, client); return client->noClientException; } @@ -1393,7 +1392,7 @@ ProcSetPointerMapping(ClientPtr client) } /* FIXME: Send mapping notifies for all the extended devices as well. */ - SendMappingNotify(MappingPointer, 0, 0, client); + SendMappingNotify(inputInfo.pointer, MappingPointer, 0, 0, client); WriteReplyToClient(client, sizeof(xSetPointerMappingReply), &rep); return Success; } diff --git a/dix/events.c b/dix/events.c index 0380ad1b7..a931e410e 100644 --- a/dix/events.c +++ b/dix/events.c @@ -242,15 +242,13 @@ static int spriteTraceGood; /** - * True for the core pointer and any MPX device. - * False for any other device (including keyboards). - * Does ID checking for sane range as well. + * True if device owns a cursor, false if device shares a cursor sprite with + * another device. */ _X_EXPORT Bool DevHasCursor(DeviceIntPtr pDev) { - return (pDev == inputInfo.pointer || - (pDev->isMPDev && pDev->id < MAX_DEVICES)); + return pDev->spriteOwner; } #ifdef XEVIE @@ -4225,9 +4223,11 @@ InitSprite(DeviceIntPtr pDev, Bool hasCursor) pSprite->confined = FALSE; pDev->pSprite = pSprite; + pDev->spriteOwner = TRUE; } else { pDev->pSprite = inputInfo.pointer->pSprite; + pDev->spriteOwner = FALSE; } } diff --git a/dix/getevents.c b/dix/getevents.c index 7e0b63fc9..8eaacf146 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -724,7 +724,7 @@ SwitchCoreKeyboard(DeviceIntPtr pDev) } #endif - SendMappingNotify(MappingKeyboard, ckeyc->curKeySyms.minKeyCode, + SendMappingNotify(pDev, MappingKeyboard, ckeyc->curKeySyms.minKeyCode, (ckeyc->curKeySyms.maxKeyCode - ckeyc->curKeySyms.minKeyCode), serverClient); diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index dc07b3f07..6218b3572 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -171,11 +171,24 @@ xf86ActivateDevice(LocalDevicePtr local) dev->public.devicePrivate = (pointer) local; local->dev = dev; - dev->coreEvents = local->flags & XI86_ALWAYS_CORE; - dev->isMPDev = - MayNeedPointer(dev) && !(local->flags & XI86_SHARED_POINTER); - InitSprite(dev, dev->isMPDev); + dev->coreEvents = local->flags & XI86_ALWAYS_CORE; + dev->isMPDev = !(local->flags & XI86_SHARED_POINTER); +#ifdef XKB + if (!IsPointerDevice(dev)) + { + /* FIXME: that's not the nice way to do it. XKB wraps the previously + * set procs, so if we don't have them here, our event will disappear + * in a black hole.*/ + dev->public.processInputProc = CoreProcessKeyboardEvent; + dev->public.realInputProc = CoreProcessKeyboardEvent; + if (!noXkbExtension) + XkbSetExtension(dev, ProcessKeyboardEvent); + } +#endif + + /* Only create a new sprite if it's a non-shared pointer */ + InitSprite(dev, IsPointerDevice(dev) && dev->isMPDev); RegisterOtherDevice(dev); if (serverGeneration == 1) diff --git a/include/extinit.h b/include/extinit.h index 6cf7bf737..d7aa54137 100644 --- a/include/extinit.h +++ b/include/extinit.h @@ -121,6 +121,12 @@ SDeviceLeaveNotifyEvent ( deviceLeaveNotify * /* to */ ); +void +SPointerKeyboardPairingChangedNotifyEvent ( + pairingChangedNotify * /* from */, + pairingChangedNotify * /* to */ + ); + void FixExtensionEvents ( ExtensionEntry * /* extEntry */ @@ -143,7 +149,7 @@ AssignTypeAndName ( char * /* name */ ); -Bool MayNeedPointer( +Bool IsPointerDevice( DeviceIntPtr /* dev */ ); diff --git a/include/input.h b/include/input.h index a1c21f8a1..96a28a5a1 100644 --- a/include/input.h +++ b/include/input.h @@ -323,6 +323,7 @@ extern Bool InitKeyboardDeviceStruct( KbdCtrlProcPtr /*controlProc*/); extern void SendMappingNotify( + DeviceIntPtr /* pDev */, unsigned int /*request*/, unsigned int /*firstKeyCode*/, unsigned int /*count*/, diff --git a/include/inputstr.h b/include/inputstr.h index cc3280dc2..c4a2d1855 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -178,7 +178,7 @@ typedef struct _ButtonClassRec { } ButtonClassRec, *ButtonClassPtr; typedef struct _FocusClassRec { - WindowPtr win; + WindowPtr win; /* May be set to a int constant (e.g. PointerRootWin)! */ int revert; TimeStamp time; WindowPtr *trace; @@ -355,7 +355,12 @@ typedef struct _DeviceIntRec { int nPrivates; DeviceUnwrapProc unwrapProc; Bool isMPDev; /* TRUE if multipointer device */ + /* Each devices has a sprite. However, keyboards and shared pointers do + not in fact own a sprite but rather have their pointer set to the + sprite of another device. pSprite always has to point to a valid + sprite. spriteOwner indicates whether it is the device's sprite. */ SpritePtr pSprite; /* sprite information */ + Bool spriteOwner; /* FALSE if shared sprite, see above*/ } DeviceIntRec; typedef struct { From a309c936bb79e2fea04a96ce33c7da99ed902484 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 5 Feb 2007 11:38:44 +1030 Subject: [PATCH 046/634] xkb: Daniel's patch to stop evdev keyboard segfaults. mi: Remove quickfix from ba547d4f6a2707f51f0d826389d2d418fb62367a --- mi/mieq.c | 8 -------- xkb/xkbUtils.c | 3 ++- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/mi/mieq.c b/mi/mieq.c index 478b61ef0..6ed5ef357 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -244,14 +244,6 @@ mieqProcessInputEvents() dev = e->pDev; } - /* FIXME: Keyboard extension devices do not have devPrivates - * initialized, resulting in a segfault in XkbHandleActions. */ - if (e->event[0].u.u.type == DeviceKeyPress || - e->event[0].u.u.type == DeviceKeyRelease || - e->event[0].u.u.type == KeyPress || - e->event[0].u.u.type == KeyRelease) - e->pDev = dev = inputInfo.keyboard; - /* MPX devices send both core and Xi events. * Use dev to get the correct processing function but supply * e->pDev to pass the correct device diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index 400306a22..e24c1f0b4 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -1220,7 +1220,8 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) tmp = xalloc(src->max_key_code + 1); if (!tmp) return FALSE; - dst->map->syms = tmp; + /*dst->map->syms = tmp;*/ + dst->map->modmap = tmp; } memcpy(dst->map->modmap, src->map->modmap, src->max_key_code + 1); } From 7cd73b00a29469d37a7f526cc9b35cc927a13ae2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 5 Feb 2007 14:48:48 +1030 Subject: [PATCH 047/634] dix: If POINTER_CORE_ONLY is set, GetPointerEvents() only creates a core event mi: fix: Create motion event in miPointerMoved --- dix/getevents.c | 25 ++++++++++++++++--------- include/input.h | 1 + mi/mipointer.c | 29 +++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 9 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index 8eaacf146..f9e6962c2 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -481,6 +481,9 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type, * events is not NULL-terminated; the return value is the number of events. * The DDX is responsible for allocating the event structure in the first * place via GetMaximumEventsNum(), and for freeing it. + * + * If flag has POINTER_CORE_ONLY set, no XI or valuator event will be + * generated. */ _X_EXPORT int GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, @@ -494,6 +497,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, Bool sendValuators = (type == MotionNotify || flags & POINTER_ABSOLUTE); DeviceIntPtr pointer = NULL; int x = 0, y = 0; + Bool coreOnly = (flags & POINTER_CORE_ONLY); /* Sanity checks. */ if (type != MotionNotify && type != ButtonPress && type != ButtonRelease) @@ -502,7 +506,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, if ((type == ButtonPress || type == ButtonRelease) && !pDev->button) return 0; - if (pDev->coreEvents || pDev->isMPDev) + if (!coreOnly && (pDev->coreEvents || pDev->isMPDev)) num_events = 2; else num_events = 1; @@ -512,7 +516,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, } /* Do we need to send a DeviceValuator event? */ - if (sendValuators) { + if (!coreOnly & sendValuators) { if ((((num_valuators - 1) / 6) + 1) > MAX_VALUATOR_EVENTS) num_valuators = MAX_VALUATOR_EVENTS * 6; num_events += ((num_valuators - 1) / 6) + 1; @@ -608,16 +612,19 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, kbp->root_x = x; kbp->root_y = y; - events++; - if (sendValuators) { - kbp->deviceid |= MORE_EVENTS; - clipValuators(pDev, first_valuator, num_valuators, valuators); - events = getValuatorEvents(events, pDev, first_valuator, - num_valuators, valuators); + if (!coreOnly) + { + events++; + if (sendValuators) { + kbp->deviceid |= MORE_EVENTS; + clipValuators(pDev, first_valuator, num_valuators, valuators); + events = getValuatorEvents(events, pDev, first_valuator, + num_valuators, valuators); + } } /* MPX devices always send core events */ - if (pDev->coreEvents || pDev->isMPDev) { + if (coreOnly || pDev->coreEvents || pDev->isMPDev) { events->u.u.type = type; events->u.keyButtonPointer.time = ms; events->u.keyButtonPointer.rootX = x; diff --git a/include/input.h b/include/input.h index 96a28a5a1..f7d12cb5c 100644 --- a/include/input.h +++ b/include/input.h @@ -62,6 +62,7 @@ SOFTWARE. #define POINTER_RELATIVE (1 << 1) #define POINTER_ABSOLUTE (1 << 2) #define POINTER_ACCELERATE (1 << 3) +#define POINTER_CORE_ONLY (1 << 4) /* do not generate XI event */ #define MAP_LENGTH 256 #define DOWN_LENGTH 32 /* 256/8 => number of bytes to hold 256 bits */ diff --git a/mi/mipointer.c b/mi/mipointer.c index 1474cb9be..432333d44 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -540,6 +540,10 @@ void miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, unsigned long time) { + xEvent* events; + int i, nevents; + int valuators[2]; + int flags; miPointerPtr pPointer = MIPOINTER(pDev); SetupScreen(pScreen); @@ -556,4 +560,29 @@ miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, pPointer->x = x; pPointer->y = y; pPointer->pScreen = pScreen; + + /* generate event here */ + valuators[0] = x; + valuators[1] = y; + events = (xEvent*)xcalloc(sizeof(xEvent), GetMaximumEventsNum()); + if (!events) + { + FatalError("Could not allocate event store.\n"); + return; + } + + flags = POINTER_ABSOLUTE; + + /* If called from ProcWarpCursor, pDev is the VCP and we must not generate + an XI event. */ + if (pDev == inputInfo.pointer) + flags |= POINTER_CORE_ONLY; + + nevents = GetPointerEvents(events, pDev, MotionNotify, 0, + flags, 0, 2, valuators); + + for (i = 0; i < nevents; i++) + mieqEnqueue(pDev, &events[i]); + + xfree(events); } From 33ef546b942977bb2573156eaba5269350d16f99 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 14 Feb 2007 11:18:43 +1030 Subject: [PATCH 048/634] dix: Clean up GetPointerEvents. If pDev == inputInfo.pointer, assume that we do not want Xi events. mi: Remove POINTER_CORE_ONLY flag. --- dix/getevents.c | 42 +++++++++++++++++++++--------------------- include/input.h | 1 - mi/mipointer.c | 10 +--------- 3 files changed, 22 insertions(+), 31 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index f9e6962c2..ccaa232d9 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -482,8 +482,6 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type, * The DDX is responsible for allocating the event structure in the first * place via GetMaximumEventsNum(), and for freeing it. * - * If flag has POINTER_CORE_ONLY set, no XI or valuator event will be - * generated. */ _X_EXPORT int GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, @@ -497,7 +495,8 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, Bool sendValuators = (type == MotionNotify || flags & POINTER_ABSOLUTE); DeviceIntPtr pointer = NULL; int x = 0, y = 0; - Bool coreOnly = (flags & POINTER_CORE_ONLY); + /* The core pointer must not send Xi events. */ + Bool coreOnly = (pDev == inputInfo.pointer); /* Sanity checks. */ if (type != MotionNotify && type != ButtonPress && type != ButtonRelease) @@ -530,10 +529,6 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, ms = GetTimeInMillis(); - kbp = (deviceKeyButtonPointer *) events; - kbp->time = ms; - kbp->deviceid = pDev->id; - if (!pDev->coreEvents || pDev->isMPDev) pointer = pDev; else @@ -598,22 +593,27 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, pDev->valuator->lastx = x; pDev->valuator->lasty = y; - if (type == MotionNotify) { - kbp->type = DeviceMotionNotify; - } - else { - if (type == ButtonPress) - kbp->type = DeviceButtonPress; - else if (type == ButtonRelease) - kbp->type = DeviceButtonRelease; - kbp->detail = pDev->button->map[buttons]; - } - - kbp->root_x = x; - kbp->root_y = y; - + /* create Xi event */ if (!coreOnly) { + kbp = (deviceKeyButtonPointer *) events; + kbp->time = ms; + kbp->deviceid = pDev->id; + + if (type == MotionNotify) { + kbp->type = DeviceMotionNotify; + } + else { + if (type == ButtonPress) + kbp->type = DeviceButtonPress; + else if (type == ButtonRelease) + kbp->type = DeviceButtonRelease; + kbp->detail = pDev->button->map[buttons]; + } + + kbp->root_x = x; + kbp->root_y = y; + events++; if (sendValuators) { kbp->deviceid |= MORE_EVENTS; diff --git a/include/input.h b/include/input.h index f7d12cb5c..96a28a5a1 100644 --- a/include/input.h +++ b/include/input.h @@ -62,7 +62,6 @@ SOFTWARE. #define POINTER_RELATIVE (1 << 1) #define POINTER_ABSOLUTE (1 << 2) #define POINTER_ACCELERATE (1 << 3) -#define POINTER_CORE_ONLY (1 << 4) /* do not generate XI event */ #define MAP_LENGTH 256 #define DOWN_LENGTH 32 /* 256/8 => number of bytes to hold 256 bits */ diff --git a/mi/mipointer.c b/mi/mipointer.c index 432333d44..ed82fcd8a 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -543,7 +543,6 @@ miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, xEvent* events; int i, nevents; int valuators[2]; - int flags; miPointerPtr pPointer = MIPOINTER(pDev); SetupScreen(pScreen); @@ -571,15 +570,8 @@ miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, return; } - flags = POINTER_ABSOLUTE; - - /* If called from ProcWarpCursor, pDev is the VCP and we must not generate - an XI event. */ - if (pDev == inputInfo.pointer) - flags |= POINTER_CORE_ONLY; - nevents = GetPointerEvents(events, pDev, MotionNotify, 0, - flags, 0, 2, valuators); + POINTER_ABSOLUTE, 0, 2, valuators); for (i = 0; i < nevents; i++) mieqEnqueue(pDev, &events[i]); From 25104ed2e6050f86691104b34eeaf3147eb83c4a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 14 Feb 2007 11:26:53 +1030 Subject: [PATCH 049/634] dix: fix typo in condition. --- dix/getevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/getevents.c b/dix/getevents.c index ccaa232d9..a8d9ec3db 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -515,7 +515,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, } /* Do we need to send a DeviceValuator event? */ - if (!coreOnly & sendValuators) { + if (!coreOnly && sendValuators) { if ((((num_valuators - 1) / 6) + 1) > MAX_VALUATOR_EVENTS) num_valuators = MAX_VALUATOR_EVENTS * 6; num_events += ((num_valuators - 1) / 6) + 1; From f6c3b9fa97ccf85e96f15435d564a1c261e40532 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 15 Feb 2007 13:51:20 +1030 Subject: [PATCH 050/634] xfree86: mouse and keyboard hotplugging support. New mouse devices will get new cursors, keyboard devices use VCP's focus until paired. --- dix/events.c | 102 +++++++++++++++++---------------- hw/xfree86/common/xf86Xinput.c | 17 +++++- include/dix.h | 8 +++ 3 files changed, 76 insertions(+), 51 deletions(-) diff --git a/dix/events.c b/dix/events.c index a931e410e..57a356db3 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2043,7 +2043,7 @@ XYToWindow(int x, int y) return spriteTrace[spriteTraceGood-1]; } -static Bool +Bool CheckMotion(xEvent *xE, DeviceIntPtr pDev) { WindowPtr prevSpriteWin; @@ -2190,63 +2190,67 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) void DefineInitialRootWindow(register WindowPtr win) { - register ScreenPtr pScreen = win->drawable.pScreen; - SpritePtr pSprite; DeviceIntPtr pDev = inputInfo.devices; +#ifdef XEVIE + xeviewin = win; +#endif + ROOT = win; + while (pDev) { if (DevHasCursor(pDev)) - { - pSprite = pDev->pSprite; - - pSprite->hotPhys.pScreen = pScreen; - pSprite->hotPhys.x = pScreen->width / 2; - pSprite->hotPhys.y = pScreen->height / 2; - pSprite->hot = pSprite->hotPhys; - pSprite->hotLimits.x2 = pScreen->width; - pSprite->hotLimits.y2 = pScreen->height; -#ifdef XEVIE - xeviewin = -#endif - pSprite->win = win; - pSprite->current = wCursor (win); - pSprite->current->refcnt++; - spriteTraceGood = 1; - ROOT = win; - (*pScreen->CursorLimits) ( pDev, pScreen, pSprite->current, - &pSprite->hotLimits, &pSprite->physLimits); - pSprite->confined = FALSE; - - (*pScreen->ConstrainCursor) (pDev, pScreen, - &pSprite->physLimits); - (*pScreen->SetCursorPosition) (pDev, pScreen, pSprite->hot.x, - pSprite->hot.y, - FALSE); - (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current); - -#ifdef PANORAMIX - if(!noPanoramiXExtension) { - pSprite->hotLimits.x1 = -panoramiXdataPtr[0].x; - pSprite->hotLimits.y1 = -panoramiXdataPtr[0].y; - pSprite->hotLimits.x2 = PanoramiXPixWidth - panoramiXdataPtr[0].x; - pSprite->hotLimits.y2 = PanoramiXPixHeight - panoramiXdataPtr[0].y; - pSprite->physLimits = pSprite->hotLimits; - pSprite->confineWin = NullWindow; -#ifdef SHAPE - pSprite->hotShape = NullRegion; -#endif - pSprite->screen = pScreen; - /* gotta UNINIT these someplace */ - REGION_NULL(pScreen, &pSprite->Reg1); - REGION_NULL(pScreen, &pSprite->Reg2); - } -#endif - } + InitializeSprite(pDev, win); pDev = pDev->next; } } +void +InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) +{ + SpritePtr pSprite; + ScreenPtr pScreen = pWin->drawable.pScreen; + + pSprite = pDev->pSprite; + pSprite->hotPhys.pScreen = pScreen; + pSprite->hotPhys.x = pScreen->width / 2; + pSprite->hotPhys.y = pScreen->height / 2; + pSprite->hot = pSprite->hotPhys; + pSprite->hotLimits.x2 = pScreen->width; + pSprite->hotLimits.y2 = pScreen->height; + pSprite->win = pWin; + pSprite->current = wCursor (pWin); + pSprite->current->refcnt++; + + (*pScreen->CursorLimits) ( pDev, pScreen, pSprite->current, + &pSprite->hotLimits, &pSprite->physLimits); + pSprite->confined = FALSE; + + (*pScreen->ConstrainCursor) (pDev, pScreen, + &pSprite->physLimits); + (*pScreen->SetCursorPosition) (pDev, pScreen, pSprite->hot.x, + pSprite->hot.y, + FALSE); + (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current); +#ifdef PANORAMIX + if(!noPanoramiXExtension) { + pSprite->hotLimits.x1 = -panoramiXdataPtr[0].x; + pSprite->hotLimits.y1 = -panoramiXdataPtr[0].y; + pSprite->hotLimits.x2 = PanoramiXPixWidth - panoramiXdataPtr[0].x; + pSprite->hotLimits.y2 = PanoramiXPixHeight - panoramiXdataPtr[0].y; + pSprite->physLimits = pSprite->hotLimits; + pSprite->confineWin = NullWindow; +#ifdef SHAPE + pSprite->hotShape = NullRegion; +#endif + pSprite->screen = pScreen; + /* gotta UNINIT these someplace */ + REGION_NULL(pScreen, &pSprite->Reg1); + REGION_NULL(pScreen, &pSprite->Reg2); + } +#endif +} + /* * This does not take any shortcuts, and even ignores its argument, since * it does not happen very often, and one has to walk up the tree since diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 6218b3572..c2ea10825 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -129,7 +129,6 @@ xf86ProcessCommonOptions(LocalDevicePtr local, xf86SetBoolOption(list, "CorePointer", 0) || xf86SetBoolOption(list, "CoreKeyboard", 0)) { local->flags |= XI86_ALWAYS_CORE; - local->flags |= XI86_SHARED_POINTER; xf86Msg(X_CONFIG, "%s: always reports core events\n", local->name); } @@ -378,6 +377,16 @@ NewInputDeviceRequest (InputOption *options) } } + if (!drv) { + xf86Msg(X_ERROR, "No input driver specified (ignoring)\n"); + return BadMatch; + } + + if (!idev->identifier) { + xf86Msg(X_ERROR, "No device identifier specified (ignoring)\n"); + return BadMatch; + } + if (!drv->PreInit) { xf86Msg(X_ERROR, "Input driver `%s' has no PreInit function (ignoring)\n", @@ -407,10 +416,14 @@ NewInputDeviceRequest (InputOption *options) xf86ActivateDevice(pInfo); dev = pInfo->dev; - dev->inited = ((*dev->deviceProc)(dev, DEVICE_INIT) == Success); + ActivateDevice(dev); if (dev->inited && dev->startup) EnableDevice(dev); + /* send enter/leave event, update sprite window */ + InitializeSprite(dev, GetCurrentRootWindow()); + CheckMotion(NULL, dev); + return Success; } diff --git a/include/dix.h b/include/dix.h index 8e34211c0..1c6b16379 100644 --- a/include/dix.h +++ b/include/dix.h @@ -494,6 +494,10 @@ extern int DeliverDeviceEvents( extern void DefineInitialRootWindow( WindowPtr /* win */); +extern void InitializeSprite( + DeviceIntPtr /* pDev */, + WindowPtr /* pWin */); + extern void WindowHasNewCursor( WindowPtr /* pWin */); @@ -578,6 +582,10 @@ extern int DeliverEvents( int /*count*/, WindowPtr /*otherParent*/); +extern Bool +CheckMotion( + xEvent* /* xE */, + DeviceIntPtr /* pDev */); extern void WriteEventsToClient( ClientPtr /*pClient*/, From cd0af7a7856e8246e27acc5513d219a094211625 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 21 Feb 2007 10:08:41 +1030 Subject: [PATCH 051/634] Xi, dix: Only one client at a time can change the pointer-keyboard pairing, using xRegisterPairingClient request. --- Xi/Makefile.am | 2 + Xi/chpkpair.c | 12 +++++- Xi/extinit.c | 8 ++++ Xi/regpair.c | 108 ++++++++++++++++++++++++++++++++++++++++++++++++ Xi/regpair.h | 43 +++++++++++++++++++ dix/devices.c | 52 +++++++++++++++++++++++ dix/dispatch.c | 1 + include/input.h | 7 ++++ 8 files changed, 232 insertions(+), 1 deletion(-) create mode 100644 Xi/regpair.c create mode 100644 Xi/regpair.h diff --git a/Xi/Makefile.am b/Xi/Makefile.am index 90000308d..5d3417e65 100644 --- a/Xi/Makefile.am +++ b/Xi/Makefile.am @@ -62,6 +62,8 @@ libXi_la_SOURCES = \ querydp.h \ queryst.c \ queryst.h \ + regpair.c \ + regpair.h \ selectev.c \ selectev.h \ sendexev.c \ diff --git a/Xi/chpkpair.c b/Xi/chpkpair.c index b8624178d..8e79a7502 100644 --- a/Xi/chpkpair.c +++ b/Xi/chpkpair.c @@ -73,10 +73,13 @@ int ProcXChangePointerKeyboardPairing(register ClientPtr client) { DeviceIntPtr pPointer, pKeyboard; + int ret; REQUEST(xChangePointerKeyboardPairingReq); REQUEST_SIZE_MATCH(xChangePointerKeyboardPairingReq); + /* check if client is registered */ + pPointer = LookupDeviceIntRec(stuff->pointer); if (pPointer == NULL) { @@ -93,7 +96,14 @@ ProcXChangePointerKeyboardPairing(register ClientPtr client) return Success; } - pKeyboard->pSprite = pPointer->pSprite; + ret = PairDevices(client, pPointer, pKeyboard); + if (ret != Success) + { + SendErrorToClient(client, IReqCode, X_ChangePointerKeyboardPairing, + 0, ret); + return Success; + } + /* TODO: generate event here... */ return Success; diff --git a/Xi/extinit.c b/Xi/extinit.c index a08ec77fa..cf4f509e9 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -102,6 +102,7 @@ SOFTWARE. #include "opendev.h" #include "querydp.h" #include "queryst.h" +#include "regpair.h" #include "selectev.h" #include "sendexev.h" #include "chgkmap.h" @@ -355,6 +356,8 @@ ProcIDispatch(register ClientPtr client) return (ProcXChangeDeviceCursor(client)); else if (stuff->data == X_ChangePointerKeyboardPairing) return (ProcXChangePointerKeyboardPairing(client)); + else if (stuff->data == X_RegisterPairingClient) + return (ProcXRegisterPairingClient(client)); else { SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); } @@ -452,6 +455,8 @@ SProcIDispatch(register ClientPtr client) return (SProcXChangeDeviceCursor(client)); else if (stuff->data == X_ChangePointerKeyboardPairing) return (SProcXChangePointerKeyboardPairing(client)); + else if (stuff->data == X_RegisterPairingClient) + return (SProcXRegisterPairingClient(client)); else { SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); } @@ -527,6 +532,9 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep) else if (rep->RepType == X_QueryDevicePointer) SRepXQueryDevicePointer(client, len, (xQueryDevicePointerReply *) rep); + else if (rep->RepType == X_RegisterPairingClient) + SRepXRegisterPairingClient(client, len, + (xRegisterPairingClientReply *) rep); else { FatalError("XINPUT confused sending swapped reply"); } diff --git a/Xi/regpair.c b/Xi/regpair.c new file mode 100644 index 000000000..cfaddb841 --- /dev/null +++ b/Xi/regpair.c @@ -0,0 +1,108 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +/*********************************************************************** + * + * Request to authenticate as pairing client + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include +#include +#include "extnsionst.h" +#include "exevents.h" +#include "exglobals.h" + +#include "regpair.h" + +/*********************************************************************** + * + * This procedure allows a client to register the pairing of a pointer + * with a keyboard. + * + */ + +int +SProcXRegisterPairingClient(ClientPtr client) +{ + char n; + REQUEST(xRegisterPairingClientReq); + swaps(&stuff->length, n); + return ProcXRegisterPairingClient(client); +} + +int +ProcXRegisterPairingClient(ClientPtr client) +{ + xRegisterPairingClientReply rep; + + REQUEST(xRegisterPairingClientReq); + REQUEST_SIZE_MATCH(xRegisterPairingClientReq); + + if (stuff->disable) + UnregisterPairingClient(client); + + rep.repType = X_Reply; + rep.RepType = X_RegisterPairingClient; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.success = stuff->disable || RegisterPairingClient(client); + + WriteReplyToClient(client, sizeof(xRegisterPairingClientReply), &rep); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XRegisterPairingClient function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXRegisterPairingClient(ClientPtr client, int size, + xRegisterPairingClientReply* rep) +{ + register char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + WriteToClient(client, size, (char *)rep); +} + diff --git a/Xi/regpair.h b/Xi/regpair.h new file mode 100644 index 000000000..b2bfaff3e --- /dev/null +++ b/Xi/regpair.h @@ -0,0 +1,43 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef REGPAIR_H +#define REGPAIR_H 1 + +int SProcXRegisterPairingClient(ClientPtr /* client */); +int ProcXRegisterPairingClient(ClientPtr /* client */); + +void SRepXRegisterPairingClient(ClientPtr /* client */, + int /* size */, + xRegisterPairingClientReply* /* rep */); + +#endif /* REGPAIR_H */ diff --git a/dix/devices.c b/dix/devices.c index bc7ca892c..ad5cd5042 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -81,6 +81,9 @@ SOFTWARE. int CoreDevicePrivatesIndex = 0, CoreDevicePrivatesGeneration = -1; +/* The client that is allowed to change pointer-keyboard pairings. */ +static ClientPtr pairingClient = NULL; + DeviceIntPtr AddInputDevice(DeviceProc deviceProc, Bool autoStart) { @@ -1926,5 +1929,54 @@ ProcQueryKeymap(ClientPtr client) bzero((char *)&rep.map[0], 32); WriteReplyToClient(client, sizeof(xQueryKeymapReply), &rep); + + return Success; +} + +/* Pair the keyboard to the pointer device. Keyboard events will follow the + * pointer sprite. + */ +int +PairDevices(ClientPtr client, DeviceIntPtr pointer, DeviceIntPtr keyboard) +{ + if (!pairingClient) + RegisterPairingClient(client); + else if (pairingClient != client) + return BadAccess; + + keyboard->pSprite = pointer->pSprite; return Success; } + +/* + * Register a client to be able to pair devices. + */ +Bool +RegisterPairingClient(ClientPtr client) +{ + if (!pairingClient) + { + pairingClient = client; + } else if (pairingClient != client) + { + return False; + } + return True; +} + +/* + * Unregister pairing client; + */ +Bool +UnregisterPairingClient(ClientPtr client) +{ + if (pairingClient) + { + if ( pairingClient == client) + { + pairingClient = NULL; + } else + return False; + } + return True; +} diff --git a/dix/dispatch.c b/dix/dispatch.c index d44687ec3..a795d17a5 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3568,6 +3568,7 @@ CloseDownClient(register ClientPtr client) DeleteClientFromAnySelections(client); ReleaseActiveGrabs(client); DeleteClientFontStuff(client); + UnregisterPairingClient(client); /* other clients can pair devices */ if (!really_close_down) { /* This frees resources that should never be retained diff --git a/include/input.h b/include/input.h index 96a28a5a1..d2e26efc1 100644 --- a/include/input.h +++ b/include/input.h @@ -454,4 +454,11 @@ extern void DDXRingBell( int pitch, int duration); +extern int PairDevices(ClientPtr client, + DeviceIntPtr pointer, + DeviceIntPtr keyboard); + +extern Bool RegisterPairingClient(ClientPtr client); +extern Bool UnregisterPairingClient(ClientPtr client); + #endif /* INPUT_H */ From 4b8b0e377a27ec904b2028c89aed11c6416af26c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 22 Feb 2007 20:00:59 +1030 Subject: [PATCH 052/634] Xi: Add access control request handling. dix: New file access.c to handle all access control for devices. --- Xi/Makefile.am | 8 +- Xi/chaccess.c | 177 +++++++++++++++++++++++++++ Xi/chaccess.h | 39 ++++++ Xi/extinit.c | 25 +++- Xi/grabacc.c | 102 ++++++++++++++++ Xi/grabacc.h | 41 +++++++ Xi/qryacces.c | 128 ++++++++++++++++++++ Xi/qryacces.h | 41 +++++++ dix/Makefile.am | 1 + dix/access.c | 287 ++++++++++++++++++++++++++++++++++++++++++++ dix/dispatch.c | 1 + dix/events.c | 23 ++-- dix/window.c | 21 +++- include/input.h | 38 ++++-- include/windowstr.h | 9 ++ 15 files changed, 921 insertions(+), 20 deletions(-) create mode 100644 Xi/chaccess.c create mode 100644 Xi/chaccess.h create mode 100644 Xi/grabacc.c create mode 100644 Xi/grabacc.h create mode 100644 Xi/qryacces.c create mode 100644 Xi/qryacces.h create mode 100644 dix/access.c diff --git a/Xi/Makefile.am b/Xi/Makefile.am index 5d3417e65..e77c8a382 100644 --- a/Xi/Makefile.am +++ b/Xi/Makefile.am @@ -20,7 +20,9 @@ libXi_la_SOURCES = \ chgptr.c \ chgptr.h \ chpkpair.c \ - chpkpair.h \ + chpkpair.h \ + chaccess.c \ + chaccess.h \ closedev.c \ closedev.h \ devbell.c \ @@ -46,6 +48,8 @@ libXi_la_SOURCES = \ getselev.h \ getvers.c \ getvers.h \ + grabacc.c \ + grabacc.h \ grabdev.c \ grabdev.h \ grabdevb.c \ @@ -62,6 +66,8 @@ libXi_la_SOURCES = \ querydp.h \ queryst.c \ queryst.h \ + qryacces.c \ + qryacces.h \ regpair.c \ regpair.h \ selectev.c \ diff --git a/Xi/chaccess.c b/Xi/chaccess.c new file mode 100644 index 000000000..5005e9435 --- /dev/null +++ b/Xi/chaccess.c @@ -0,0 +1,177 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exevents.h" +#include "exglobals.h" + +#include "chaccess.h" + +/*********************************************************************** + * This procedure allows a client to change window access control. + */ + +int +SProcXChangeWindowAccess(ClientPtr client) +{ + char n; + REQUEST(xChangeWindowAccessReq); + + swaps(&stuff->length, n); + swapl(&stuff->win, n); + return ProcXChangeWindowAccess(client); +} + +int +ProcXChangeWindowAccess(ClientPtr client) +{ + int padding, err, i; + CARD8* deviceids = NULL; + WindowPtr win; + DeviceIntPtr* perm_devices = NULL; + DeviceIntPtr* deny_devices = NULL; + REQUEST(xChangeWindowAccessReq); + REQUEST_AT_LEAST_SIZE(xChangeWindowAccessReq); + + + padding = (4 - ((stuff->npermit + stuff->ndeny) % 4)) % 4; + + if (stuff->length != ((sizeof(xChangeWindowAccessReq) + + (stuff->npermit + stuff->ndeny + padding)) >> 2)) + { + SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, + 0, BadLength); + return Success; + } + + + err = dixLookupWindow(&win, stuff->win, client, DixWriteAccess); + if (err != Success) + { + SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, + stuff->win, err); + return Success; + } + + /* Are we clearing? if so, ignore the rest */ + if (stuff->clear) + { + err = ACClearWindowAccess(client, win, stuff->clear); + if (err != Success) + SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, 0, err); + return Success; + } + + if (stuff->npermit || stuff->ndeny) + deviceids = (CARD8*)&stuff[1]; + + if (stuff->npermit) + { + perm_devices = + (DeviceIntPtr*)xalloc(stuff->npermit * sizeof(DeviceIntPtr)); + if (!perm_devices) + { + ErrorF("ProcXChangeWindowAccess: alloc failure.\n"); + SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, 0, + BadImplementation); + return Success; + } + + /* if one of the devices cannot be accessed, we don't do anything.*/ + for (i = 0; i < stuff->npermit; i++) + { + perm_devices[i] = LookupDeviceIntRec(deviceids[i]); + if (!perm_devices[i]) + { + xfree(perm_devices); + SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, + deviceids[i], BadDevice); + return Success; + } + } + } + + if (stuff->ndeny) + { + deny_devices = + (DeviceIntPtr*)xalloc(stuff->ndeny * sizeof(DeviceIntPtr)); + if (!deny_devices) + { + ErrorF("ProcXChangeWindowAccecss: alloc failure.\n"); + SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, 0, + BadImplementation); + + xfree(perm_devices); + return Success; + } + + for (i = 0; i < stuff->ndeny; i++) + { + deny_devices[i] = + LookupDeviceIntRec(deviceids[i+stuff->npermit]); + + if (!deny_devices[i]) + { + xfree(perm_devices); + xfree(deny_devices); + SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, + deviceids[i + stuff->npermit], BadDevice); + return Success; + } + } + } + + err = ACChangeWindowAccess(client, win, stuff->defaultRule, + perm_devices, stuff->npermit, + deny_devices, stuff->ndeny); + if (err != Success) + { + SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, + stuff->win, err); + return Success; + } + + xfree(perm_devices); + xfree(deny_devices); + return Success; +} + diff --git a/Xi/chaccess.h b/Xi/chaccess.h new file mode 100644 index 000000000..8c2c6003e --- /dev/null +++ b/Xi/chaccess.h @@ -0,0 +1,39 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef CHACCESS_H +#define CHACCESS_H 1 + +int SProcXChangeWindowAccess(ClientPtr /* client */); +int ProcXChangeWindowAccess(ClientPtr /* client */); + +#endif /* CHACCESS_H */ diff --git a/Xi/extinit.c b/Xi/extinit.c index cf4f509e9..598348e13 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -74,6 +74,7 @@ SOFTWARE. /* modules local to Xi */ #include "allowev.h" +#include "chaccess.h" #include "chdevcur.h" #include "chgdctl.h" #include "chgfctl.h" @@ -94,12 +95,14 @@ SOFTWARE. #include "getselev.h" #include "getvers.h" #include "getvers.h" +#include "grabacc.h" #include "grabdev.h" #include "grabdevb.h" #include "grabdevk.h" #include "gtmotion.h" #include "listdev.h" #include "opendev.h" +#include "qryacces.c" #include "querydp.h" #include "queryst.h" #include "regpair.h" @@ -358,6 +361,12 @@ ProcIDispatch(register ClientPtr client) return (ProcXChangePointerKeyboardPairing(client)); else if (stuff->data == X_RegisterPairingClient) return (ProcXRegisterPairingClient(client)); + else if (stuff->data == X_GrabAccessControl) + return (ProcXGrabAccessControl(client)); + else if (stuff->data == X_ChangeWindowAccess) + return (ProcXChangeWindowAccess(client)); + else if (stuff->data == X_QueryWindowAccess) + return ProcXQueryWindowAccess(client); else { SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); } @@ -457,6 +466,12 @@ SProcIDispatch(register ClientPtr client) return (SProcXChangePointerKeyboardPairing(client)); else if (stuff->data == X_RegisterPairingClient) return (SProcXRegisterPairingClient(client)); + else if (stuff->data == X_GrabAccessControl) + return (SProcXGrabAccessControl(client)); + else if (stuff->data == X_ChangeWindowAccess) + return (SProcXChangeWindowAccess(client)); + else if (stuff->data == X_QueryWindowAccess) + return SProcXQueryWindowAccess(client); else { SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); } @@ -531,10 +546,16 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep) (xChangeDeviceControlReply *) rep); else if (rep->RepType == X_QueryDevicePointer) SRepXQueryDevicePointer(client, len, - (xQueryDevicePointerReply *) rep); + (xQueryDevicePointerReply *) rep); else if (rep->RepType == X_RegisterPairingClient) SRepXRegisterPairingClient(client, len, - (xRegisterPairingClientReply *) rep); + (xRegisterPairingClientReply *) rep); + else if (rep->RepType == X_GrabAccessControl) + SRepXGrabAccessControl(client, len, + (xGrabAccessControlReply*) rep); + else if (rep->RepType == X_QueryWindowAccess) + SRepXQueryWindowAccess(client, len, + (xQueryWindowAccessReply*) rep); else { FatalError("XINPUT confused sending swapped reply"); } diff --git a/Xi/grabacc.c b/Xi/grabacc.c new file mode 100644 index 000000000..db9c9f2ca --- /dev/null +++ b/Xi/grabacc.c @@ -0,0 +1,102 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exevents.h" +#include "exglobals.h" + +#include "grabacc.h" + +/*********************************************************************** + * + * This procedure allows a client to register as the global client to control + * any window access. + * + */ +int +SProcXGrabAccessControl(ClientPtr client) +{ + char n; + REQUEST(xGrabAccessControlReq); + + swaps(&stuff->length, n); + return ProcXGrabAccessControl(client); +} + +int +ProcXGrabAccessControl(ClientPtr client) +{ + xGrabAccessControlReply rep; + REQUEST(xGrabAccessControlReq); + REQUEST_SIZE_MATCH(xGrabAccessControlReq); + + if (stuff->ungrab) + ACUnregisterClient(client); + + rep.repType = X_Reply; + rep.RepType = X_GrabAccessControl; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.success = stuff->ungrab || ACRegisterClient(client); + + WriteReplyToClient(client, sizeof(xGrabAccessControlReply), &rep); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XGrabAccessControl function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGrabAccessControl(ClientPtr client, int size, + xGrabAccessControlReply* rep) +{ + register char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + WriteToClient(client, size, (char *)rep); +} + diff --git a/Xi/grabacc.h b/Xi/grabacc.h new file mode 100644 index 000000000..6dcbcad33 --- /dev/null +++ b/Xi/grabacc.h @@ -0,0 +1,41 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef GRABACC_H +#define GRABACC_H 1 + +int SProcXGrabAccessControl(ClientPtr /* client */); + +int ProcXGrabAccessControl(ClientPtr /* client */); +void SRepXGrabAccessControl(ClientPtr client, int size, + xGrabAccessControlReply* rep); +#endif /* GRABACC_H */ diff --git a/Xi/qryacces.c b/Xi/qryacces.c new file mode 100644 index 000000000..817bec8a3 --- /dev/null +++ b/Xi/qryacces.c @@ -0,0 +1,128 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exevents.h" +#include "exglobals.h" + +#include "qryacces.h" + +/*********************************************************************** + * This procedure allows a client to query window access control. + */ + +int +SProcXQueryWindowAccess(ClientPtr client) +{ + char n; + REQUEST(xQueryWindowAccessReq); + + swaps(&stuff->length, n); + swapl(&stuff->win, n); + return ProcXQueryWindowAccess(client); +} + +int +ProcXQueryWindowAccess(ClientPtr client) +{ + int err; + WindowPtr win; + DeviceIntPtr *perm, *deny; + int nperm, ndeny, i; + int defaultRule; + CARD8* deviceids; + xQueryWindowAccessReply rep; + + REQUEST(xQueryWindowAccessReq); + REQUEST_SIZE_MATCH(xQueryWindowAccessReq); + + err = dixLookupWindow(&win, stuff->win, client, DixReadAccess); + if (err != Success) + { + SendErrorToClient(client, IReqCode, X_QueryWindowAccess, + stuff->win, err); + return Success; + } + + ACQueryWindowAccess(win, &defaultRule, &perm, &nperm, &deny, &ndeny); + + rep.repType = X_Reply; + rep.RepType = X_QueryWindowAccess; + rep.sequenceNumber = client->sequence; + rep.length = (nperm + ndeny + 3) >> 2; + rep.defaultRule = defaultRule; + rep.npermit = nperm; + rep.ndeny = ndeny; + WriteReplyToClient(client, sizeof(xQueryWindowAccessReply), &rep); + + if (nperm + ndeny) + { + deviceids = (CARD8*)xalloc((nperm + ndeny) * sizeof(CARD8)); + if (!deviceids) + { + ErrorF("ProcXQueryWindowAccess: xalloc failure.\n"); + SendErrorToClient(client, IReqCode, X_QueryWindowAccess, + 0, BadImplementation); + return Success; + } + + for (i = 0; i < nperm; i++) + deviceids[i] = perm[i]->id; + for (i = 0; i < ndeny; i++) + deviceids[i + nperm] = deny[i]->id; + + WriteToClient(client, nperm + ndeny, (char*)deviceids); + xfree(deviceids); + } + return Success; +} + +void +SRepXQueryWindowAccess(ClientPtr client, + int size, + xQueryWindowAccessReply* rep) +{ + char n; + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + WriteToClient(client, size, (char*)rep); +} diff --git a/Xi/qryacces.h b/Xi/qryacces.h new file mode 100644 index 000000000..5fce9aec2 --- /dev/null +++ b/Xi/qryacces.h @@ -0,0 +1,41 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef QRYACCES_H +#define QRYACCES_H 1 + +int SProcXQueryWindowAccess(ClientPtr /* client */); +int ProcXQueryWindowAccess(ClientPtr /* client */); +void SRepXQueryWindowAccess(ClientPtr /* client */, + int /* size */, + xQueryWindowAccessReply* /* rep */); +#endif diff --git a/dix/Makefile.am b/dix/Makefile.am index a1f02c1b6..d9083ea52 100644 --- a/dix/Makefile.am +++ b/dix/Makefile.am @@ -5,6 +5,7 @@ AM_CFLAGS = $(DIX_CFLAGS) \ -DVENDOR_RELEASE="@VENDOR_RELEASE@" libdix_la_SOURCES = \ + access.c \ atom.c \ colormap.c \ cursor.c \ diff --git a/dix/access.c b/dix/access.c new file mode 100644 index 000000000..970d7c49a --- /dev/null +++ b/dix/access.c @@ -0,0 +1,287 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +/* This file controls the access control lists for each window. + * Each device can be explicitely allowed or denied access to a given window. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include + +#include "input.h" +#include "inputstr.h" +#include "windowstr.h" + + +/* Only one single client can be responsible for window access control. */ +static ClientPtr ACClient = NULL; + + +/* Forward declarations */ +static void acReplaceList(DeviceIntPtr** list, + int* count, + DeviceIntPtr* devices, + int ndevices); + +/* Register global window access control client + * Return True on success or False otherwise. + */ + +Bool +ACRegisterClient(ClientPtr client) +{ + if (ACClient && ACClient != client) + return False; + + ACClient = client; + return True; +} + + +/* Unregister global client. If client is not the registered client, nothing + * happens and False is returned. If no client is registered, return True. + * Returns True if client was registred and is now unregistered. + */ + +Bool +ACUnregisterClient(ClientPtr client) +{ + if (ACClient && ACClient != client) + return False; + + ACClient = NULL; + return True; +} + +/* Clears all access control for the window and remove the default rule, + * depending on what is set. */ +int ACClearWindowAccess(ClientPtr client, + WindowPtr win, + int what) +{ + if (client != ACClient && client != wClient(win)) + return BadAccess; + + if (!win->optional) + { + /* we shouldn't get here if programmers know what they're doing. + * A client should not request to clear a window's access controls + * if they've never been set before anyway. If they do, do nothing and + * let the client figure out what to do next. + */ + return Success; + } + + if (what & WindowAccessClearPerm) + { + xfree(win->optional->access.perm); + win->optional->access.perm = NULL; + win->optional->access.nperm = 0; + } + + if (what & WindowAccessClearDeny) + { + xfree(win->optional->access.deny); + win->optional->access.deny = NULL; + win->optional->access.ndeny = 0; + } + + if (what & WindowAccessClearRule) + win->optional->access.defaultRule = WindowAccessNoRule; + + return Success; +} + +/* + * Changes window access control. + * + * Returns Success or BadAccess if the client is not allowed to change + * anything. + */ + +int +ACChangeWindowAccess(ClientPtr client, + WindowPtr win, + int defaultRule, + DeviceIntPtr* perm_devices, + int nperm, + DeviceIntPtr* deny_devices, + int ndeny) +{ + if (client != ACClient && client != wClient(win)) + return BadAccess; + + if (!win->optional && !MakeWindowOptional(win)) + { + ErrorF("ACChangeWindowAcccess: Failed to make window optional.\n"); + return BadImplementation; + } + + if (defaultRule != WindowAccessKeepRule) + win->optional->access.defaultRule = defaultRule; + + if (nperm) + { + acReplaceList(&win->optional->access.perm, + &win->optional->access.nperm, + perm_devices, nperm); + } + + if (ndeny) + { + acReplaceList(&win->optional->access.deny, + &win->optional->access.ndeny, + deny_devices, ndeny); + } + + return Success; +} + +static void +acReplaceList(DeviceIntPtr** list, + int* count, + DeviceIntPtr* devices, + int ndevices) +{ + xfree(*list); + *list = NULL; + *count = 0; + + if (ndevices) + { + *list = + xalloc(ndevices * sizeof(DeviceIntPtr*)); + if (!*list) + { + ErrorF("ACChangeWindowAccess: out of memory\n"); + return; + } + memcpy(*list, + devices, + ndevices * sizeof(DeviceIntPtr)); + *count = ndevices; + } + return; +} + +/* + * Query the given window for the devices allowed to access a window. + * The caller is responsible for freeing perm and deny. + */ +void +ACQueryWindowAccess(WindowPtr win, + int* defaultRule, + DeviceIntPtr** perm, + int* nperm, + DeviceIntPtr** deny, + int* ndeny) +{ + *defaultRule = WindowAccessNoRule; + *perm = NULL; + *nperm = 0; + *deny = NULL; + *ndeny = 0; + + if (!win->optional) + return; + + *defaultRule = win->optional->access.defaultRule; + + if (win->optional->access.nperm) + { + *nperm = win->optional->access.nperm; + *perm = (DeviceIntPtr*)xalloc(*nperm * sizeof(DeviceIntPtr)); + if (!*perm) + { + ErrorF("ACQuerywinAccess: xalloc failure\n"); + return; + } + memcpy(*perm, + win->optional->access.perm, + *nperm * sizeof(DeviceIntPtr)); + } + + if (win->optional->access.ndeny) + { + *ndeny = win->optional->access.ndeny; + *deny = (DeviceIntPtr*)xalloc(*ndeny * sizeof(DeviceIntPtr)); + if (!*deny) + { + ErrorF("ACQuerywinAccess: xalloc failure\n"); + return; + } + memcpy(*deny, + win->optional->access.deny, + *ndeny * sizeof(DeviceIntPtr)); + } +} + +/* + * Check if the given device is allowed to send events to the window. Returns + * true if device is allowed or false otherwise. + * + * Checks are done in the following order until a result is found: + * If the device is explicitely permitted, allow. + * If the window has a default of DenyAll, do not allow. + * If the device is explicitely denied, do not allow. + * Check parent window. Rinse, wash, repeat. + * If no rule could be found, allow. + */ +Bool +ACDeviceAllowed(WindowPtr win, DeviceIntPtr dev) +{ + int i; + + if (!win) /* happens for parent of RootWindow */ + return True; + + if (!win->optional) /* no list, check parent */ + return ACDeviceAllowed(win->parent, dev); + + for (i = 0; i < win->optional->access.nperm; i++) + { + if (win->optional->access.perm[i]->id == dev->id) + return True; + } + + if (win->optional->access.defaultRule == WindowAccessDenyAll) + return False; + + for (i = 0; i < win->optional->access.ndeny; i++) + { + if (win->optional->access.deny[i]->id == dev->id) + return False; + } + + return ACDeviceAllowed(win->parent, dev); +} + diff --git a/dix/dispatch.c b/dix/dispatch.c index a795d17a5..98183cc65 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3568,6 +3568,7 @@ CloseDownClient(register ClientPtr client) DeleteClientFromAnySelections(client); ReleaseActiveGrabs(client); DeleteClientFontStuff(client); + ACUnregisterClient(client); UnregisterPairingClient(client); /* other clients can pair devices */ if (!really_close_down) { diff --git a/dix/events.c b/dix/events.c index 57a356db3..5ea9a65c2 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1663,6 +1663,9 @@ DeliverEventsToWindow(DeviceIntPtr pDev, register WindowPtr pWin, xEvent Mask deliveryMask = 0; /* If a grab occurs due to a button press, then this mask is the mask of the grab. */ int type = pEvents->u.u.type; + + if (!ACDeviceAllowed(pWin, pDev)) + return 0; /* CantBeFiltered means only window owner gets the event */ if ((filter == CantBeFiltered) || !(type & EXTENSION_EVENT_BASE)) @@ -2748,16 +2751,20 @@ DeliverGrabbedEvent(register xEvent *xE, register DeviceIntPtr thisDev, } if (!deliveries) { - FixUpEventFromWindow(thisDev, xE, grab->window, None, TRUE); - deliveries = TryClientEvents(rClient(grab), xE, count, - (Mask)grab->eventMask, - filters[xE->u.u.type], grab); - if (deliveries && (xE->u.u.type == MotionNotify + if (ACDeviceAllowed(grab->window, thisDev)) + { + + FixUpEventFromWindow(thisDev, xE, grab->window, None, TRUE); + deliveries = TryClientEvents(rClient(grab), xE, count, + (Mask)grab->eventMask, + filters[xE->u.u.type], grab); + if (deliveries && (xE->u.u.type == MotionNotify #ifdef XINPUT - || xE->u.u.type == DeviceMotionNotify + || xE->u.u.type == DeviceMotionNotify #endif - )) - thisDev->valuator->motionHintWindow = grab->window; + )) + thisDev->valuator->motionHintWindow = grab->window; + } } if (deliveries && !deactivateGrab && (xE->u.u.type != MotionNotify #ifdef XINPUT diff --git a/dix/window.c b/dix/window.c index 604af384d..3d7972812 100644 --- a/dix/window.c +++ b/dix/window.c @@ -452,6 +452,13 @@ CreateRootWindow(ScreenPtr pScreen) pWin->optional->inputMasks = NULL; pWin->optional->deviceCursors = NULL; #endif + + pWin->optional->access.perm = NULL; + pWin->optional->access.deny = NULL; + pWin->optional->access.nperm = 0; + pWin->optional->access.ndeny = 0; + pWin->optional->access.defaultRule = 0; + pWin->optional->colormap = pScreen->defColormap; pWin->optional->visual = pScreen->rootVisual; @@ -505,7 +512,6 @@ CreateRootWindow(ScreenPtr pScreen) if (disableSaveUnders) pScreen->saveUnderSupport = NotUseful; - return TRUE; } @@ -523,6 +529,7 @@ InitRootWindow(WindowPtr pWin) pWin->optional->cursor = rootCursor; rootCursor->refcnt++; + if (!blackRoot && !whiteRoot) { MakeRootTile(pWin); backFlag |= CWBackPixmap; @@ -3660,6 +3667,9 @@ CheckWindowOptionalNeed (register WindowPtr w) pNode = pNode->next; } } + if (optional->access.nperm != 0 || + optional->access.ndeny != 0) + return; parentOptional = FindWindowWithOptional(w)->optional; if (optional->visual != parentOptional->visual) @@ -3705,8 +3715,12 @@ MakeWindowOptional (register WindowPtr pWin) #endif #ifdef XINPUT optional->inputMasks = NULL; - optional->deviceCursors = NULL; #endif + optional->deviceCursors = NULL; + optional->access.nperm = 0; + optional->access.ndeny = 0; + optional->access.perm = NULL; + optional->access.deny = NULL; parentOptional = FindWindowWithOptional(pWin)->optional; optional->visual = parentOptional->visual; if (!pWin->cursorIsNone) @@ -3771,6 +3785,9 @@ DisposeWindowOptional (register WindowPtr pWin) pWin->optional->deviceCursors = NULL; } + xfree(pWin->optional->access.perm); + xfree(pWin->optional->access.deny); + xfree (pWin->optional); pWin->optional = NULL; } diff --git a/include/input.h b/include/input.h index d2e26efc1..a7b1e84d3 100644 --- a/include/input.h +++ b/include/input.h @@ -445,6 +445,37 @@ extern void SwitchCorePointer(DeviceIntPtr pDev); extern DeviceIntPtr LookupDeviceIntRec( CARD8 deviceid); +/* Pairing input devices */ +extern int PairDevices(ClientPtr client, + DeviceIntPtr pointer, + DeviceIntPtr keyboard); + +extern Bool RegisterPairingClient(ClientPtr client); +extern Bool UnregisterPairingClient(ClientPtr client); + +/* Window/device based access control */ +extern Bool ACRegisterClient(ClientPtr client); +extern Bool ACUnregisterClient(ClientPtr client); +extern int ACClearWindowAccess(ClientPtr client, + WindowPtr win, + int what); +extern int ACChangeWindowAccess(ClientPtr client, + WindowPtr win, + int defaultRule, + DeviceIntPtr* perm_devices, + int npermit, + DeviceIntPtr* deny_devices, + int ndeny); +extern void ACQueryWindowAccess(WindowPtr win, + int* defaultRule, + DeviceIntPtr** perm, + int* nperm, + DeviceIntPtr** deny, + int* ndeny); + +extern Bool ACDeviceAllowed(WindowPtr win, + DeviceIntPtr dev); + /* Implemented by the DDX. */ extern int NewInputDeviceRequest( InputOption *options); @@ -454,11 +485,4 @@ extern void DDXRingBell( int pitch, int duration); -extern int PairDevices(ClientPtr client, - DeviceIntPtr pointer, - DeviceIntPtr keyboard); - -extern Bool RegisterPairingClient(ClientPtr client); -extern Bool UnregisterPairingClient(ClientPtr client); - #endif /* INPUT_H */ diff --git a/include/windowstr.h b/include/windowstr.h index 4e9c82cb5..882f8a524 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -77,6 +77,14 @@ typedef struct _DevCursorNode { struct _DevCursorNode* next; } DevCursNodeRec, *DevCursNodePtr, *DevCursorList; +typedef struct _WindowAccessRec { + int defaultRule; /* WindowAccessDenyAll */ + DeviceIntPtr* perm; + int nperm; + DeviceIntPtr* deny; + int ndeny; +} WindowAccessRec, *WindowAccessPtr; + typedef struct _WindowOpt { VisualID visual; /* default: same as parent */ CursorPtr cursor; /* default: window.cursorNone */ @@ -97,6 +105,7 @@ typedef struct _WindowOpt { struct _OtherInputMasks *inputMasks; /* default: NULL */ #endif DevCursorList deviceCursors; /* default: NULL */ + WindowAccessRec access; } WindowOptRec, *WindowOptPtr; #define BackgroundPixel 2L From bc4ae25433e38a25a2012f9f233d500665172a4b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 23 Feb 2007 12:06:51 +1030 Subject: [PATCH 053/634] xfree86: Don't initialize sprites for devices that don't own a sprite (stops keyboard hotplug segfaults) --- hw/xfree86/common/xf86Xinput.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index c2ea10825..608fa9bb2 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -421,7 +421,8 @@ NewInputDeviceRequest (InputOption *options) EnableDevice(dev); /* send enter/leave event, update sprite window */ - InitializeSprite(dev, GetCurrentRootWindow()); + if (dev->spriteOwner) + InitializeSprite(dev, GetCurrentRootWindow()); CheckMotion(NULL, dev); return Success; From 2a35d44b6d87f96a7ce90dc8f0142f48cc176e95 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 28 Feb 2007 15:43:06 +1030 Subject: [PATCH 054/634] Update device valuators on XTest motion event, otherwise the cursor jumps between coordinates stored in device and coordinates sent by the event. --- Xext/xtest.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Xext/xtest.c b/Xext/xtest.c index c59adeaee..d46d6e7d9 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -316,7 +316,7 @@ ProcXTestFakeInput(client) #ifdef XINPUT if (!extension) #endif /* XINPUT */ - dev = (DeviceIntPtr)LookupKeyboardDevice(); + dev = inputInfo.keyboard; if (ev->u.u.detail < dev->key->curKeySyms.minKeyCode || ev->u.u.detail > dev->key->curKeySyms.maxKeyCode) { @@ -360,7 +360,8 @@ ProcXTestFakeInput(client) break; } #endif /* XINPUT */ - dev = (DeviceIntPtr)LookupPointerDevice(); + if (!dev) + dev = inputInfo.pointer; if (ev->u.keyButtonPointer.root == None) root = GetCurrentRootWindow(); else @@ -378,7 +379,7 @@ ProcXTestFakeInput(client) if (ev->u.u.detail == xTrue) { int x, y; - GetSpritePosition(inputInfo.pointer, &x, &y); + GetSpritePosition(dev, &x, &y); ev->u.keyButtonPointer.rootX += x; ev->u.keyButtonPointer.rootY += y; } @@ -442,13 +443,15 @@ ProcXTestFakeInput(client) (dev, root->drawable.pScreen, ev->u.keyButtonPointer.rootX, ev->u.keyButtonPointer.rootY, FALSE); + dev->valuator->lastx = ev->u.keyButtonPointer.rootX; + dev->valuator->lasty = ev->u.keyButtonPointer.rootY; break; case ButtonPress: case ButtonRelease: #ifdef XINPUT if (!extension) #endif /* XINPUT */ - dev = (DeviceIntPtr)LookupPointerDevice(); + dev = inputInfo.pointer; if (!ev->u.u.detail || ev->u.u.detail > dev->button->numButtons) { client->errorValue = ev->u.u.detail; From 43bd35fcf85b51b7e5714844bade90184dbd746f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 1 Mar 2007 17:19:37 +1030 Subject: [PATCH 055/634] dix: Remove InitSprite, work can be done by InitializeSprite. Free sprite struct if a spriteOwner is paired. xfree86: Use PairDevices instead of passing booleans around when creating a sprite. Xext: Switch back to using LookupPointer/KeyboardDevice instead of inputInfo.xyz. --- Xext/xtest.c | 8 ++++---- autogen.sh | 2 +- dix/devices.c | 11 +++++++++-- dix/events.c | 21 +++++++++++++++++---- hw/xfree86/common/xf86Xinput.c | 6 +++++- hw/xfree86/os-support/linux/lnx_agp.c | 1 + include/inputstr.h | 2 +- 7 files changed, 38 insertions(+), 13 deletions(-) diff --git a/Xext/xtest.c b/Xext/xtest.c index d46d6e7d9..cb7b5b83b 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -316,7 +316,7 @@ ProcXTestFakeInput(client) #ifdef XINPUT if (!extension) #endif /* XINPUT */ - dev = inputInfo.keyboard; + dev = (DeviceIntPtr)LookupKeyboardDevice(); if (ev->u.u.detail < dev->key->curKeySyms.minKeyCode || ev->u.u.detail > dev->key->curKeySyms.maxKeyCode) { @@ -361,7 +361,7 @@ ProcXTestFakeInput(client) } #endif /* XINPUT */ if (!dev) - dev = inputInfo.pointer; + dev = (DeviceIntPtr*)LookupPointerDevice(); if (ev->u.keyButtonPointer.root == None) root = GetCurrentRootWindow(); else @@ -427,7 +427,7 @@ ProcXTestFakeInput(client) #ifdef PANORAMIX if ((!noPanoramiXExtension && root->drawable.pScreen->myNum - != XineramaGetCursorScreen(inputInfo.pointer)) + != XineramaGetCursorScreen(dev)) || (noPanoramiXExtension && root != GetCurrentRootWindow())) #else @@ -451,7 +451,7 @@ ProcXTestFakeInput(client) #ifdef XINPUT if (!extension) #endif /* XINPUT */ - dev = inputInfo.pointer; + dev = (DeviceIntPtr*)LookupPointerDevice(); if (!ev->u.u.detail || ev->u.u.detail > dev->button->numButtons) { client->errorValue = ev->u.u.detail; diff --git a/autogen.sh b/autogen.sh index 904cd6746..1176abd5b 100755 --- a/autogen.sh +++ b/autogen.sh @@ -9,4 +9,4 @@ cd $srcdir autoreconf -v --install || exit 1 cd $ORIGDIR || exit $? -$srcdir/configure --enable-maintainer-mode "$@" +$srcdir/configure --enable-maintainer-mode --disable-dmx "$@" diff --git a/dix/devices.c b/dix/devices.c index ad5cd5042..747d7822b 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -1937,14 +1937,21 @@ ProcQueryKeymap(ClientPtr client) * pointer sprite. */ int -PairDevices(ClientPtr client, DeviceIntPtr pointer, DeviceIntPtr keyboard) +PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd) { if (!pairingClient) RegisterPairingClient(client); else if (pairingClient != client) return BadAccess; - keyboard->pSprite = pointer->pSprite; + if (kbd->spriteOwner) + { + xfree(kbd->pSprite); + kbd->pSprite = NULL; + kbd->spriteOwner = FALSE; + } + + kbd->pSprite = ptr->pSprite; return Success; } diff --git a/dix/events.c b/dix/events.c index 5ea9a65c2..a1e72f187 100644 --- a/dix/events.c +++ b/dix/events.c @@ -240,7 +240,6 @@ static WindowPtr *spriteTrace = (WindowPtr *)NULL; static int spriteTraceSize = 0; static int spriteTraceGood; - /** * True if device owns a cursor, false if device shares a cursor sprite with * another device. @@ -2212,8 +2211,16 @@ void InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) { SpritePtr pSprite; - ScreenPtr pScreen = pWin->drawable.pScreen; + ScreenPtr pScreen; + if (!pDev->pSprite) + { + pDev->pSprite = (SpritePtr)xcalloc(1, sizeof(SpriteRec)); + if (!pDev->pSprite) + FatalError("InitializeSprite: failed to allocate sprite struct"); + } + + pScreen = (pWin) ? pWin->drawable.pScreen : (ScreenPtr)NULL; pSprite = pDev->pSprite; pSprite->hotPhys.pScreen = pScreen; pSprite->hotPhys.x = pScreen->width / 2; @@ -2222,8 +2229,12 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) pSprite->hotLimits.x2 = pScreen->width; pSprite->hotLimits.y2 = pScreen->height; pSprite->win = pWin; - pSprite->current = wCursor (pWin); - pSprite->current->refcnt++; + if (pWin) + { + pSprite->current = wCursor(pWin); + pSprite->current->refcnt++; + } else + pSprite->current = NullCursor; (*pScreen->CursorLimits) ( pDev, pScreen, pSprite->current, &pSprite->hotLimits, &pSprite->physLimits); @@ -2252,6 +2263,8 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) REGION_NULL(pScreen, &pSprite->Reg2); } #endif + + pDev->spriteOwner = TRUE; } /* diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 608fa9bb2..41118c043 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -187,7 +187,11 @@ xf86ActivateDevice(LocalDevicePtr local) #endif /* Only create a new sprite if it's a non-shared pointer */ - InitSprite(dev, IsPointerDevice(dev) && dev->isMPDev); + if (IsPointerDevice(dev) && dev->isMPDev) + InitializeSprite(pDev, NullWindow); + else + PairDevices(pairingClient, inputInfo.pointer, pDev); + RegisterOtherDevice(dev); if (serverGeneration == 1) diff --git a/hw/xfree86/os-support/linux/lnx_agp.c b/hw/xfree86/os-support/linux/lnx_agp.c index ded9e0fae..300b08df6 100644 --- a/hw/xfree86/os-support/linux/lnx_agp.c +++ b/hw/xfree86/os-support/linux/lnx_agp.c @@ -10,6 +10,7 @@ #ifdef HAVE_XORG_CONFIG_H #include +#include #endif #include diff --git a/include/inputstr.h b/include/inputstr.h index c4a2d1855..90a985b5f 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -355,7 +355,7 @@ typedef struct _DeviceIntRec { int nPrivates; DeviceUnwrapProc unwrapProc; Bool isMPDev; /* TRUE if multipointer device */ - /* Each devices has a sprite. However, keyboards and shared pointers do + /* Each device has a sprite. However, keyboards and shared pointers do not in fact own a sprite but rather have their pointer set to the sprite of another device. pSprite always has to point to a valid sprite. spriteOwner indicates whether it is the device's sprite. */ From e43b8a4e40991ca6e545bda4cf9b9bd7a2bf22e2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 2 Mar 2007 15:21:46 +1030 Subject: [PATCH 056/634] dix: Add ClientPointer to client, used for picking which pointer to use in ambiguious request. PickPointer and PickKeyboard are used for getting the appropriate pointer when situation is unclear. Fix some issues with InitializeSprite. dix, xfree86: Remove last traces of InitSprite. --- dix/devices.c | 32 +++++- dix/dispatch.c | 2 + dix/events.c | 181 ++++++++++++++++++++------------- hw/xfree86/common/xf86Xinput.c | 6 +- include/dix.h | 6 ++ include/dixstruct.h | 2 + include/input.h | 2 + 7 files changed, 152 insertions(+), 79 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 747d7822b..f053e3401 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -342,6 +342,7 @@ InitCoreDevices() dev->ActivateGrab = ActivateKeyboardGrab; dev->DeactivateGrab = DeactivateKeyboardGrab; dev->coreEvents = FALSE; + dev->spriteOwner = FALSE; if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) FatalError("Couldn't allocate keyboard devPrivates\n"); dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; @@ -369,12 +370,12 @@ InitCoreDevices() if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) FatalError("Couldn't allocate pointer devPrivates\n"); dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; - InitSprite(dev, TRUE); + InitializeSprite(dev, NullWindow); (void)ActivateDevice(dev); inputInfo.pointer = dev; /* the core keyboard is initialised by now. set the keyboard's sprite * to the core pointer's sprite. */ - InitSprite(inputInfo.keyboard, FALSE); + PairDevices(pairingClient, inputInfo.pointer, inputInfo.keyboard); } } @@ -421,6 +422,7 @@ CloseDevice(register DeviceIntPtr dev) StringFeedbackPtr s, snext; BellFeedbackPtr b, bnext; LedFeedbackPtr l, lnext; + int j; if (dev->inited) (void)(*dev->deviceProc)(dev, DEVICE_CLOSE); @@ -504,6 +506,13 @@ CloseDevice(register DeviceIntPtr dev) if (DevHasCursor(dev)) xfree((pointer)dev->pSprite); + /* a client may have the device set as client pointer */ + for (j = 0; j < currentMaxClients; j++) + { + if (clients[j]->clientPtr == dev) + PickPointer(clients[j]); + } + xfree(dev->sync.event); xfree(dev); } @@ -1955,6 +1964,25 @@ PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd) return Success; } +/* Return the pointer that is paired with the given keyboard. If no pointer is + * paired, return the virtual core pointer + */ +DeviceIntPtr +GetPairedPointer(DeviceIntPtr kbd) +{ + DeviceIntPtr ptr = inputInfo.devices; + while(ptr) + { + if (ptr->pSprite == kbd->pSprite && ptr->spriteOwner) + { + return ptr; + } + ptr = ptr->next; + } + + return inputInfo.pointer; +} + /* * Register a client to be able to pair devices. */ diff --git a/dix/dispatch.c b/dix/dispatch.c index 98183cc65..54931a1d3 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3730,6 +3730,8 @@ void InitClient(ClientPtr client, int i, pointer ospriv) client->smart_stop_tick = SmartScheduleTime; client->smart_check_tick = SmartScheduleTime; #endif + + client->clientPtr = NULL; } int diff --git a/dix/events.c b/dix/events.c index a1e72f187..5be923a27 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1508,8 +1508,8 @@ int ProcAllowEvents(register ClientPtr client) { TimeStamp time; - DeviceIntPtr mouse = inputInfo.pointer; - DeviceIntPtr keybd = inputInfo.keyboard; + DeviceIntPtr mouse = PickPointer(client); + DeviceIntPtr keybd = PickKeyboard(client); REQUEST(xAllowEventsReq); REQUEST_SIZE_MATCH(xAllowEventsReq); @@ -2103,7 +2103,7 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev) pSprite->win = XYToWindow(pSprite->hot.x, pSprite->hot.y); #ifdef notyet if (!(pSprite->win->deliverableEvents & - Motion_Filter(inputInfo.pointer->button)) + Motion_Filter(pDev->button)) !syncEvents.playingEvents) { /* XXX Do PointerNonInterestBox here */ @@ -2220,15 +2220,23 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) FatalError("InitializeSprite: failed to allocate sprite struct"); } - pScreen = (pWin) ? pWin->drawable.pScreen : (ScreenPtr)NULL; pSprite = pDev->pSprite; + pDev->spriteOwner = TRUE; + + pScreen = (pWin) ? pWin->drawable.pScreen : (ScreenPtr)NULL; + pSprite->hot.pScreen = pScreen; pSprite->hotPhys.pScreen = pScreen; - pSprite->hotPhys.x = pScreen->width / 2; - pSprite->hotPhys.y = pScreen->height / 2; + if (pScreen) + { + pSprite->hotPhys.x = pScreen->width / 2; + pSprite->hotPhys.y = pScreen->height / 2; + pSprite->hotLimits.x2 = pScreen->width; + pSprite->hotLimits.y2 = pScreen->height; + } + pSprite->hot = pSprite->hotPhys; - pSprite->hotLimits.x2 = pScreen->width; - pSprite->hotLimits.y2 = pScreen->height; pSprite->win = pWin; + if (pWin) { pSprite->current = wCursor(pWin); @@ -2236,16 +2244,19 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) } else pSprite->current = NullCursor; - (*pScreen->CursorLimits) ( pDev, pScreen, pSprite->current, - &pSprite->hotLimits, &pSprite->physLimits); - pSprite->confined = FALSE; + if (pScreen) + { + (*pScreen->CursorLimits) ( pDev, pScreen, pSprite->current, + &pSprite->hotLimits, &pSprite->physLimits); + pSprite->confined = FALSE; - (*pScreen->ConstrainCursor) (pDev, pScreen, - &pSprite->physLimits); - (*pScreen->SetCursorPosition) (pDev, pScreen, pSprite->hot.x, - pSprite->hot.y, - FALSE); - (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current); + (*pScreen->ConstrainCursor) (pDev, pScreen, + &pSprite->physLimits); + (*pScreen->SetCursorPosition) (pDev, pScreen, pSprite->hot.x, + pSprite->hot.y, + FALSE); + (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current); + } #ifdef PANORAMIX if(!noPanoramiXExtension) { pSprite->hotLimits.x1 = -panoramiXdataPtr[0].x; @@ -2264,7 +2275,6 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) } #endif - pDev->spriteOwner = TRUE; } /* @@ -2370,7 +2380,7 @@ XineramaWarpPointer(ClientPtr client) { WindowPtr dest = NULL; int x, y, rc; - SpritePtr pSprite = inputInfo.pointer->pSprite; + SpritePtr pSprite = PickPointer(client)->pSprite; REQUEST(xWarpPointerReq); @@ -2429,9 +2439,9 @@ XineramaWarpPointer(ClientPtr client) else if (y >= pSprite->physLimits.y2) y = pSprite->physLimits.y2 - 1; if (pSprite->hotShape) - ConfineToShape(inputInfo.pointer, pSprite->hotShape, &x, &y); + ConfineToShape(PickPointer(client), pSprite->hotShape, &x, &y); - XineramaSetCursorPosition(inputInfo.pointer, x, y, TRUE); + XineramaSetCursorPosition(PickPointer(client), x, y, TRUE); return Success; } @@ -2445,7 +2455,7 @@ ProcWarpPointer(ClientPtr client) WindowPtr dest = NULL; int x, y, rc; ScreenPtr newScreen; - SpritePtr pSprite = inputInfo.pointer->pSprite; + SpritePtr pSprite = PickPointer(client)->pSprite; REQUEST(xWarpPointerReq); @@ -2518,14 +2528,14 @@ ProcWarpPointer(ClientPtr client) y = pSprite->physLimits.y2 - 1; #if defined(SHAPE) if (pSprite->hotShape) - ConfineToShape(inputInfo.pointer, pSprite->hotShape, &x, &y); + ConfineToShape(PickPointer(client), pSprite->hotShape, &x, &y); #endif - (*newScreen->SetCursorPosition)(inputInfo.pointer, newScreen, x, y, + (*newScreen->SetCursorPosition)(PickPointer(client), newScreen, x, y, TRUE); } - else if (!PointerConfinedToScreen(inputInfo.pointer)) + else if (!PointerConfinedToScreen(PickPointer(client))) { - NewCurrentScreen(inputInfo.pointer, newScreen, x, y); + NewCurrentScreen(PickPointer(client), newScreen, x, y); } return Success; } @@ -2892,7 +2902,7 @@ drawable.id:0; #endif ))) #endif - XE_KBPTR.state = (keyc->state | inputInfo.pointer->button->state); + XE_KBPTR.state = (keyc->state | GetPairedPointer(keybd)->button->state); XE_KBPTR.rootX = keybd->pSprite->hot.x; XE_KBPTR.rootY = keybd->pSprite->hot.y; key = xE->u.u.detail; @@ -2925,7 +2935,7 @@ drawable.id:0; } return; } - inputInfo.pointer->valuator->motionHintWindow = NullWindow; + GetPairedPointer(keybd)->valuator->motionHintWindow = NullWindow; *kptr |= bit; keyc->prev_state = keyc->state; for (i = 0, mask = 1; modifiers; i++, mask <<= 1) @@ -2947,7 +2957,7 @@ drawable.id:0; case KeyRelease: if (!(*kptr & bit)) /* guard against duplicates */ return; - inputInfo.pointer->valuator->motionHintWindow = NullWindow; + GetPairedPointer(keybd)->valuator->motionHintWindow = NullWindow; *kptr &= ~bit; keyc->prev_state = keyc->state; for (i = 0, mask = 1; modifiers; i++, mask <<= 1) @@ -3837,7 +3847,7 @@ int ProcGrabPointer(ClientPtr client) { xGrabPointerReply rep; - DeviceIntPtr device = inputInfo.pointer; + DeviceIntPtr device = PickPointer(client); GrabPtr grab; WindowPtr pWin, confineTo; CursorPtr cursor, oldCursor; @@ -3945,7 +3955,7 @@ ProcGrabPointer(ClientPtr client) int ProcChangeActivePointerGrab(ClientPtr client) { - DeviceIntPtr device = inputInfo.pointer; + DeviceIntPtr device = PickPointer(client); register GrabPtr grab = device->grab; CursorPtr newCursor, oldCursor; REQUEST(xChangeActivePointerGrabReq); @@ -3991,7 +4001,7 @@ ProcChangeActivePointerGrab(ClientPtr client) int ProcUngrabPointer(ClientPtr client) { - DeviceIntPtr device = inputInfo.pointer; + DeviceIntPtr device = PickPointer(client); GrabPtr grab; TimeStamp time; REQUEST(xResourceReq); @@ -4122,7 +4132,7 @@ ProcQueryPointer(ClientPtr client) { xQueryPointerReply rep; WindowPtr pWin, t; - DeviceIntPtr mouse = inputInfo.pointer; + DeviceIntPtr mouse = PickPointer(client); SpritePtr pSprite = mouse->pSprite; int rc; @@ -4224,37 +4234,6 @@ InitEvents() } -/** - * Initialize a sprite structure for the given device. If hasCursor is False, - * let the device use the core pointer's sprite structure. - */ -void -InitSprite(DeviceIntPtr pDev, Bool hasCursor) -{ - if (hasCursor) - { - SpritePtr pSprite = (SpritePtr)xalloc(sizeof(SpriteRec)); - if (!pSprite) - FatalError("failed to allocate sprite struct"); - memset(pSprite, 0, sizeof(SpriteRec)); - pSprite->hot.pScreen = pSprite->hotPhys.pScreen = (ScreenPtr)NULL; - pSprite->win = NullWindow; - pSprite->current = NullCursor; - pSprite->hotLimits.x1 = 0; - pSprite->hotLimits.y1 = 0; - pSprite->hotLimits.x2 = 0; - pSprite->hotLimits.y2 = 0; - pSprite->confined = FALSE; - - pDev->pSprite = pSprite; - pDev->spriteOwner = TRUE; - } else - { - pDev->pSprite = inputInfo.pointer->pSprite; - pDev->spriteOwner = FALSE; - } -} - void CloseDownEvents(void) { @@ -4268,7 +4247,7 @@ ProcSendEvent(ClientPtr client) { WindowPtr pWin; WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */ - SpritePtr pSprite = inputInfo.pointer->pSprite; + SpritePtr pSprite = PickPointer(client)->pSprite; REQUEST(xSendEventReq); REQUEST_SIZE_MATCH(xSendEventReq); @@ -4335,8 +4314,8 @@ ProcSendEvent(ClientPtr client) { for (;pWin; pWin = pWin->parent) { - if (DeliverEventsToWindow(inputInfo.pointer, pWin, &stuff->event, - 1, stuff->eventMask, NullGrab, 0)) + if (DeliverEventsToWindow(PickPointer(client), pWin, + &stuff->event, 1, stuff->eventMask, NullGrab, 0)) return Success; if (pWin == effectiveFocus) return Success; @@ -4346,8 +4325,8 @@ ProcSendEvent(ClientPtr client) } } else - (void)DeliverEventsToWindow(inputInfo.pointer, pWin, &stuff->event, 1, - stuff->eventMask, NullGrab, 0); + (void)DeliverEventsToWindow(PickPointer(client), pWin, &stuff->event, + 1, stuff->eventMask, NullGrab, 0); return Success; } @@ -4511,7 +4490,7 @@ ProcGrabButton(ClientPtr client) } - grab = CreateGrab(client->index, inputInfo.pointer, pWin, + grab = CreateGrab(client->index, PickPointer(client), pWin, (Mask)stuff->eventMask, (Bool)stuff->ownerEvents, (Bool) stuff->keyboardMode, (Bool)stuff->pointerMode, inputInfo.keyboard, stuff->modifiers, ButtonPress, @@ -4540,7 +4519,7 @@ ProcUngrabButton(ClientPtr client) if (rc != Success) return rc; tempGrab.resource = client->clientAsMask; - tempGrab.device = inputInfo.pointer; + tempGrab.device = PickPointer(client); tempGrab.window = pWin; tempGrab.modifiersDetail.exact = stuff->modifiers; tempGrab.modifiersDetail.pMask = NULL; @@ -4694,7 +4673,7 @@ ProcRecolorCursor(ClientPtr client) int nscr; ScreenPtr pscr; Bool displayed; - SpritePtr pSprite = inputInfo.pointer->pSprite; + SpritePtr pSprite = PickPointer(client)->pSprite; REQUEST(xRecolorCursorReq); REQUEST_SIZE_MATCH(xRecolorCursorReq); @@ -4723,7 +4702,7 @@ ProcRecolorCursor(ClientPtr client) else #endif displayed = (pscr == pSprite->hotPhys.pScreen); - ( *pscr->RecolorCursor)(inputInfo.pointer, pscr, pCursor, + ( *pscr->RecolorCursor)(PickPointer(client), pscr, pCursor, (pCursor == pSprite->current) && displayed); } return (Success); @@ -4810,3 +4789,59 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) (void)WriteToClient(pClient, count * sizeof(xEvent), (char *) events); } } + +/* PickPointer will pick an appropriate pointer for the given client. + * + * If a client pointer is set, it will pick the client pointer, otherwise the + * first available pointer in the list. If no physical device is attached, it + * will pick the core pointer. + */ +_X_EXPORT DeviceIntPtr +PickPointer(ClientPtr client) +{ + if (!client->clientPtr) + { + /* look if there is a real device attached */ + DeviceIntPtr it = inputInfo.devices; + while (it) + { + if (it != inputInfo.pointer && it->spriteOwner) + { + client->clientPtr = it; + break; + } + it = it->next; + } + + if (!it) + { + ErrorF("Picking VCP\n"); + client->clientPtr = inputInfo.pointer; + } + } + return client->clientPtr; +} + +/* PickKeyboard will pick an appropriate keyboard for the given client by + * searching the list of devices for the keyboard device that is paired with + * the client's pointer. + * If no pointer is paired with the keyboard, the virtual core keyboard is + * returned. + */ +_X_EXPORT DeviceIntPtr +PickKeyboard(ClientPtr client) +{ + DeviceIntPtr dev; + DeviceIntPtr ptr = inputInfo.devices; + ptr = PickPointer(client); + + while(dev) + { + if (ptr->pSprite == dev->pSprite) + return dev; + dev = dev->next; + } + + return inputInfo.keyboard; +} + diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 41118c043..31be1e36a 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -188,9 +188,9 @@ xf86ActivateDevice(LocalDevicePtr local) /* Only create a new sprite if it's a non-shared pointer */ if (IsPointerDevice(dev) && dev->isMPDev) - InitializeSprite(pDev, NullWindow); + InitializeSprite(dev, GetCurrentRootWindow()); else - PairDevices(pairingClient, inputInfo.pointer, pDev); + PairDevices(NULL, inputInfo.pointer, dev); RegisterOtherDevice(dev); @@ -425,8 +425,6 @@ NewInputDeviceRequest (InputOption *options) EnableDevice(dev); /* send enter/leave event, update sprite window */ - if (dev->spriteOwner) - InitializeSprite(dev, GetCurrentRootWindow()); CheckMotion(NULL, dev); return Success; diff --git a/include/dix.h b/include/dix.h index 1c6b16379..95c69f057 100644 --- a/include/dix.h +++ b/include/dix.h @@ -602,6 +602,12 @@ extern int TryClientEvents( extern void WindowsRestructured(void); +extern DeviceIntPtr PickPointer( + ClientPtr /* client */); + +extern DeviceIntPtr PickKeyboard( + ClientPtr /* client */); + #ifdef PANORAMIX extern void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff); #endif diff --git a/include/dixstruct.h b/include/dixstruct.h index b5ffcca49..530009a8b 100644 --- a/include/dixstruct.h +++ b/include/dixstruct.h @@ -140,6 +140,8 @@ typedef struct _Client { long smart_stop_tick; long smart_check_tick; #endif + + DeviceIntPtr clientPtr; } ClientRec; #ifdef SMART_SCHEDULE diff --git a/include/input.h b/include/input.h index a7b1e84d3..433cc9419 100644 --- a/include/input.h +++ b/include/input.h @@ -450,6 +450,8 @@ extern int PairDevices(ClientPtr client, DeviceIntPtr pointer, DeviceIntPtr keyboard); +extern DeviceIntPtr GetPairedPointer(DeviceIntPtr kbd); + extern Bool RegisterPairingClient(ClientPtr client); extern Bool UnregisterPairingClient(ClientPtr client); From 57aa5e908dc11d5d8c27ed705c526f1416c1e8ad Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 2 Mar 2007 17:14:37 +1030 Subject: [PATCH 057/634] dix, Xext, Xtrap, Xi: replace inputInfo.pointer with PickPointer where possible. More replacements to come. --- XTrap/xtrapddmi.c | 4 ++-- Xext/xtest.c | 6 +++--- Xi/grabdevb.c | 2 +- Xi/grabdevk.c | 2 +- Xi/ungrdevb.c | 2 +- Xi/ungrdevk.c | 2 +- dix/devices.c | 29 ++++++++++++++++++++--------- 7 files changed, 29 insertions(+), 18 deletions(-) diff --git a/XTrap/xtrapddmi.c b/XTrap/xtrapddmi.c index c633b8d36..ec094ecf4 100644 --- a/XTrap/xtrapddmi.c +++ b/XTrap/xtrapddmi.c @@ -97,8 +97,8 @@ int XETrapSimulateXEvent(register xXTrapInputReq *request, xEvent xev; register int x = request->input.x; register int y = request->input.y; - DevicePtr keydev = LookupKeyboardDevice(); - DevicePtr ptrdev = LookupPointerDevice(); + DevicePtr keydev = (DevicePtr)PickKeyboard(client); + DevicePtr ptrdev = (DevicePtr)PickPointer(client); if (request->input.screen < screenInfo.numScreens) { diff --git a/Xext/xtest.c b/Xext/xtest.c index cb7b5b83b..93e88c471 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -316,7 +316,7 @@ ProcXTestFakeInput(client) #ifdef XINPUT if (!extension) #endif /* XINPUT */ - dev = (DeviceIntPtr)LookupKeyboardDevice(); + dev = PickKeyboard(client); if (ev->u.u.detail < dev->key->curKeySyms.minKeyCode || ev->u.u.detail > dev->key->curKeySyms.maxKeyCode) { @@ -361,7 +361,7 @@ ProcXTestFakeInput(client) } #endif /* XINPUT */ if (!dev) - dev = (DeviceIntPtr*)LookupPointerDevice(); + dev = PickPointer(client); if (ev->u.keyButtonPointer.root == None) root = GetCurrentRootWindow(); else @@ -451,7 +451,7 @@ ProcXTestFakeInput(client) #ifdef XINPUT if (!extension) #endif /* XINPUT */ - dev = (DeviceIntPtr*)LookupPointerDevice(); + dev = PickPointer(client); if (!ev->u.u.detail || ev->u.u.detail > dev->button->numButtons) { client->errorValue = ev->u.u.detail; diff --git a/Xi/grabdevb.c b/Xi/grabdevb.c index 4333550f1..d79a36c8d 100644 --- a/Xi/grabdevb.c +++ b/Xi/grabdevb.c @@ -140,7 +140,7 @@ ProcXGrabDeviceButton(ClientPtr client) return Success; } } else - mdev = (DeviceIntPtr) LookupKeyboardDevice(); + mdev = PickKeyboard(client); class = (XEventClass *) (&stuff[1]); /* first word of values */ diff --git a/Xi/grabdevk.c b/Xi/grabdevk.c index 71e72d56f..1120149d3 100644 --- a/Xi/grabdevk.c +++ b/Xi/grabdevk.c @@ -137,7 +137,7 @@ ProcXGrabDeviceKey(ClientPtr client) return Success; } } else - mdev = (DeviceIntPtr) LookupKeyboardDevice(); + mdev = PickKeyboard(client); class = (XEventClass *) (&stuff[1]); /* first word of values */ diff --git a/Xi/ungrdevb.c b/Xi/ungrdevb.c index 8db9307ce..b75916f42 100644 --- a/Xi/ungrdevb.c +++ b/Xi/ungrdevb.c @@ -133,7 +133,7 @@ ProcXUngrabDeviceButton(ClientPtr client) return Success; } } else - mdev = (DeviceIntPtr) LookupKeyboardDevice(); + mdev = PickKeyboard(client); rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixUnknownAccess); if (rc != Success) { diff --git a/Xi/ungrdevk.c b/Xi/ungrdevk.c index ebb83bce7..e8c006ae6 100644 --- a/Xi/ungrdevk.c +++ b/Xi/ungrdevk.c @@ -132,7 +132,7 @@ ProcXUngrabDeviceKey(ClientPtr client) return Success; } } else - mdev = (DeviceIntPtr) LookupKeyboardDevice(); + mdev = PickKeyboard(client); rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixUnknownAccess); if (rc != Success) { diff --git a/dix/devices.c b/dix/devices.c index f053e3401..87b3927f9 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -597,6 +597,8 @@ RemoveDevice(DeviceIntPtr dev) int NumMotionEvents() { + /* only called to fill data in initial connection reply. + * VCP is ok here, it is the only fixed device we have. */ return inputInfo.pointer->valuator->numMotionEvents; } @@ -1376,6 +1378,7 @@ ProcSetPointerMapping(ClientPtr client) REQUEST(xSetPointerMappingReq); BYTE *map; int ret; + DeviceIntPtr ptr = PickPointer(client); xSetPointerMappingReply rep; REQUEST_AT_LEAST_SIZE(xSetPointerMappingReq); @@ -1389,14 +1392,18 @@ ProcSetPointerMapping(ClientPtr client) /* So we're bounded here by the number of core buttons. This check * probably wants disabling through XFixes. */ - if (stuff->nElts != inputInfo.pointer->button->numButtons) { + /* MPX: With ClientPointer, we can return the right number of buttons. + * Let's just hope nobody changed ClientPointer between GetPointerMapping + * and SetPointerMapping + */ + if (stuff->nElts != ptr->button->numButtons) { client->errorValue = stuff->nElts; return BadValue; } if (BadDeviceMap(&map[0], (int)stuff->nElts, 1, 255, &client->errorValue)) return BadValue; - ret = DoSetPointerMapping(inputInfo.pointer, map, stuff->nElts); + ret = DoSetPointerMapping(ptr, map, stuff->nElts); if (ret != Success) { rep.success = ret; WriteReplyToClient(client, sizeof(xSetPointerMappingReply), &rep); @@ -1404,7 +1411,7 @@ ProcSetPointerMapping(ClientPtr client) } /* FIXME: Send mapping notifies for all the extended devices as well. */ - SendMappingNotify(inputInfo.pointer, MappingPointer, 0, 0, client); + SendMappingNotify(ptr, MappingPointer, 0, 0, client); WriteReplyToClient(client, sizeof(xSetPointerMappingReply), &rep); return Success; } @@ -1414,7 +1421,8 @@ ProcGetKeyboardMapping(ClientPtr client) { xGetKeyboardMappingReply rep; REQUEST(xGetKeyboardMappingReq); - KeySymsPtr curKeySyms = &inputInfo.keyboard->key->curKeySyms; + DeviceIntPtr kbd = PickKeyboard(client); + KeySymsPtr curKeySyms = &kbd->key->curKeySyms; REQUEST_SIZE_MATCH(xGetKeyboardMappingReq); @@ -1449,7 +1457,9 @@ int ProcGetPointerMapping(ClientPtr client) { xGetPointerMappingReply rep; - ButtonClassPtr butc = inputInfo.pointer->button; + /* Apps may get different values each time they call GetPointerMapping as + * the ClientPointer could change. */ + ButtonClassPtr butc = PickPointer(client)->button; REQUEST_SIZE_MATCH(xReq); rep.type = X_Reply; @@ -1753,7 +1763,7 @@ ProcBell(ClientPtr client) int ProcChangePointerControl(ClientPtr client) { - DeviceIntPtr mouse = inputInfo.pointer; + DeviceIntPtr mouse = PickPointer(client); PtrCtrl ctrl; /* might get BadValue part way through */ REQUEST(xChangePointerControlReq); @@ -1809,7 +1819,7 @@ ProcChangePointerControl(ClientPtr client) for (mouse = inputInfo.devices; mouse; mouse = mouse->next) { - if ((mouse->coreEvents || mouse == inputInfo.pointer) && + if ((mouse->coreEvents || mouse == PickPointer(client)) && mouse->ptrfeed && mouse->ptrfeed->CtrlProc) { mouse->ptrfeed->ctrl = ctrl; (*mouse->ptrfeed->CtrlProc)(mouse, &mouse->ptrfeed->ctrl); @@ -1822,7 +1832,8 @@ ProcChangePointerControl(ClientPtr client) int ProcGetPointerControl(ClientPtr client) { - register PtrCtrl *ctrl = &inputInfo.pointer->ptrfeed->ctrl; + DeviceIntPtr ptr = PickPointer(client); + PtrCtrl *ctrl = &ptr->ptrfeed->ctrl; xGetPointerControlReply rep; REQUEST_SIZE_MATCH(xReq); @@ -1860,7 +1871,7 @@ ProcGetMotionEvents(ClientPtr client) xGetMotionEventsReply rep; int i, count, xmin, xmax, ymin, ymax, rc; unsigned long nEvents; - DeviceIntPtr mouse = inputInfo.pointer; + DeviceIntPtr mouse = PickPointer(client); TimeStamp start, stop; REQUEST(xGetMotionEventsReq); From 12175b668a94e23994f724b366a691ec312cce69 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 15 Nov 2006 17:50:02 +1030 Subject: [PATCH 058/634] o fix minor error in comment for GetPointerEvents() --- dix/getevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/getevents.c b/dix/getevents.c index 935112d85..77d1e2106 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -470,7 +470,7 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type, /** - * Generate a series of xEvents (returned in xE) representing pointer + * Generate a series of xEvents (returned in events) representing pointer * motion, or button presses. Xi and XKB-aware. * * events is not NULL-terminated; the return value is the number of events. From 39aa79177196e21bcdbaf8e44adead9ef91e6ee5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 5 Mar 2007 15:31:16 +1030 Subject: [PATCH 059/634] dix: Add GuessFreePointerDevice(). Runs through device list and tries to find a pointer that hasn't been paired yet. xfree86: Use GuessFreePointerDevice() for newly connected non-sprite devices. --- dix/devices.c | 42 ++++++++++++++++++++++++++++++++++ hw/xfree86/common/xf86Xinput.c | 6 +++-- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 87b3927f9..919558658 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2026,3 +2026,45 @@ UnregisterPairingClient(ClientPtr client) } return True; } + +/* Guess a pointer that could be a good one for pairing. Any pointer that is + * not yet paired with keyboard is considered a good one. + * If no pointer is found, the last real pointer is chosen. If that doesn't + * work either, we take the core pointer. + */ +DeviceIntPtr +GuessFreePointerDevice() +{ + DeviceIntPtr it, it2; + DeviceIntPtr lastRealPtr = NULL; + + it = inputInfo.devices; + + while(it) + { + /* found device with a sprite? */ + if (it != inputInfo.pointer && it->spriteOwner) + { + lastRealPtr = it; + + it2 = inputInfo.devices; + while(it2) + { + /* something paired with it? */ + if (it != it2 && it2->pSprite == it->pSprite) + break; + + it2 = it2->next; + } + + if (it2) + break; + + /* woohoo! no pairing set up for 'it' yet */ + return it; + } + it = it->next; + } + + return (lastRealPtr) ? lastRealPtr : inputInfo.pointer; +} diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 31be1e36a..c6d6b360e 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -189,8 +189,10 @@ xf86ActivateDevice(LocalDevicePtr local) /* Only create a new sprite if it's a non-shared pointer */ if (IsPointerDevice(dev) && dev->isMPDev) InitializeSprite(dev, GetCurrentRootWindow()); - else - PairDevices(NULL, inputInfo.pointer, dev); + else { + /* pair with a free device */ + PairDevices(NULL, GuessFreePointerDevice(), dev); + } RegisterOtherDevice(dev); From 537bc2ead4d154552cbdc3a19e335f82af63792c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 7 Mar 2007 18:19:20 +1030 Subject: [PATCH 060/634] Xi: Don't deactivate core grabs from non-core button/key releases. dix: set coreGrab flag for grabs caused by GrabPointer and button presses. remove virtual core devices from device list, only real devices are in the list now. Auto-pair each keyboard with a real pointer if one is available, provides multiple keyboards automatically after startup if devices are configured. fix GuessFreePointerDevice() to do what it's supposed to do. mi: fix: call miPointerMove from miPointerWarpCursor. fix: remove unused id field from miCursorInfoRec don't update sprite for virtual core pointer. --- Xi/exevents.c | 18 +++++++++++------- dix/cursor.c | 32 +++++++++++++++++++++++++++++++ dix/devices.c | 50 ++++++++++++++++++++++++++++++++++--------------- dix/events.c | 15 ++++++++++----- include/input.h | 2 ++ mi/mipointer.c | 8 ++++---- mi/mispritest.h | 1 - 7 files changed, 94 insertions(+), 32 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 7e80926e4..5dbb0e226 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -104,12 +104,12 @@ RegisterOtherDevice(DeviceIntPtr device) } /*ARGSUSED*/ void -ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count) +ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) { - register BYTE *kptr; - register int i; - register CARD16 modifiers; - register CARD16 mask; + BYTE *kptr; + int i; + CARD16 modifiers; + CARD16 mask; GrabPtr grab = other->grab; Bool deactivateDeviceGrab = FALSE; int key = 0, bit = 0, rootX, rootY; @@ -229,7 +229,9 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count) } } - if (other->fromPassiveGrab && (key == other->activatingKey)) + if (other->fromPassiveGrab && + !other->grab->coreGrab && + (key == other->activatingKey)) deactivateDeviceGrab = TRUE; } else if (xE->u.u.type == DeviceButtonPress) { if (!b) @@ -267,7 +269,9 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count) if (xE->u.u.detail <= 5) b->state &= ~((Button1Mask >> 1) << xE->u.u.detail); SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify); - if (!b->state && other->fromPassiveGrab) + if (!b->state + && other->fromPassiveGrab + && !other->grab->coreGrab) deactivateDeviceGrab = TRUE; } else if (xE->u.u.type == ProximityIn) other->valuator->mode &= ~OutOfProximity; diff --git a/dix/cursor.c b/dix/cursor.c index cf515c11a..e44a5efb0 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -440,6 +440,33 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, for (nscr = 0; nscr < screenInfo.numScreens; nscr++) { pscr = screenInfo.screens[nscr]; + + if (!(*pscr->RealizeCursor)(inputInfo.pointer, pscr, pCurs)) + { + DeviceIntPtr pDevIt = inputInfo.devices; /*dev iterator*/ + /* Realize for core pointer failed. Unrealize everything from + * previous screens. + */ + while (--nscr >= 0) + { + pscr = screenInfo.screens[nscr]; + /* now unrealize all devices on previous screens */ + ( *pscr->UnrealizeCursor)(inputInfo.pointer, pscr, pCurs); + + pDevIt = inputInfo.devices; + while (pDevIt) + { + if (DevHasCursor(pDevIt)) + ( *pscr->UnrealizeCursor)(pDevIt, pscr, pCurs); + pDevIt = pDevIt->next; + } + ( *pscr->UnrealizeCursor)(pDev, pscr, pCurs); + } + FreeCursorBits(bits); + xfree(pCurs); + return BadAlloc; + } + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (DevHasCursor(pDev)) @@ -459,10 +486,15 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, ( *pscr->UnrealizeCursor)(pDevIt, pscr, pCurs); pDevIt = pDevIt->next; } + + (*pscr->UnrealizeCursor)(inputInfo.pointer, pscr, pCurs); + while (--nscr >= 0) { pscr = screenInfo.screens[nscr]; /* now unrealize all devices on previous screens */ + ( *pscr->UnrealizeCursor)(inputInfo.pointer, pscr, pCurs); + pDevIt = inputInfo.devices; while (pDevIt) { diff --git a/dix/devices.c b/dix/devices.c index 919558658..9e0879450 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -347,7 +347,15 @@ InitCoreDevices() FatalError("Couldn't allocate keyboard devPrivates\n"); dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; (void)ActivateDevice(dev); + + /* Enable device, and then remove it from the device list. Virtual + * devices are kept separate, not in the standard device list. + */ + if (dev->inited && dev->startup) + EnableDevice(dev); + inputInfo.off_devices = inputInfo.devices = NULL; inputInfo.keyboard = dev; + inputInfo.keyboard->next = NULL; } if (!inputInfo.pointer) { @@ -372,7 +380,17 @@ InitCoreDevices() dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; InitializeSprite(dev, NullWindow); (void)ActivateDevice(dev); + + /* Enable device, and then remove it from the device list. Virtual + * devices are kept separate, not in the standard device list. + */ + if (dev->inited && dev->startup) + EnableDevice(dev); + inputInfo.off_devices = inputInfo.devices = NULL; inputInfo.pointer = dev; + inputInfo.pointer->next = NULL; + + /* the core keyboard is initialised by now. set the keyboard's sprite * to the core pointer's sprite. */ PairDevices(pairingClient, inputInfo.pointer, inputInfo.keyboard); @@ -382,7 +400,7 @@ InitCoreDevices() int InitAndStartDevices() { - register DeviceIntPtr dev, next; + DeviceIntPtr dev, next; for (dev = inputInfo.off_devices; dev; dev = dev->next) { DebugF("(dix) initialising device %d\n", dev->id); @@ -395,21 +413,25 @@ InitAndStartDevices() if (dev->inited && dev->startup) (void)EnableDevice(dev); } - for (dev = inputInfo.devices; - dev && (dev != inputInfo.keyboard); - dev = dev->next) - if (!dev || (dev != inputInfo.keyboard)) { + + if (!inputInfo.keyboard) { ErrorF("No core keyboard\n"); return BadImplementation; } - for (dev = inputInfo.devices; - dev && (dev != inputInfo.pointer); - dev = dev->next) - ; - if (!dev || (dev != inputInfo.pointer)) { + if (!inputInfo.pointer) { ErrorF("No core pointer\n"); return BadImplementation; } + + /* All of the devices are started up now. Try to pair each keyboard with a + * real pointer, if possible. */ + for (dev = inputInfo.devices; dev; dev = dev->next) + { + if (!DevHasCursor(dev)) + PairDevices(NULL, GuessFreePointerDevice(), dev); + } + + return Success; } @@ -2043,7 +2065,7 @@ GuessFreePointerDevice() while(it) { /* found device with a sprite? */ - if (it != inputInfo.pointer && it->spriteOwner) + if (it->spriteOwner) { lastRealPtr = it; @@ -2057,11 +2079,9 @@ GuessFreePointerDevice() it2 = it2->next; } - if (it2) - break; - /* woohoo! no pairing set up for 'it' yet */ - return it; + if (!it2) + return it; } it = it->next; } diff --git a/dix/events.c b/dix/events.c index 5be923a27..23d5f22fc 100644 --- a/dix/events.c +++ b/dix/events.c @@ -247,7 +247,7 @@ static int spriteTraceGood; _X_EXPORT Bool DevHasCursor(DeviceIntPtr pDev) { - return pDev->spriteOwner; + return (pDev != inputInfo.pointer && pDev->spriteOwner); } #ifdef XEVIE @@ -1663,6 +1663,8 @@ DeliverEventsToWindow(DeviceIntPtr pDev, register WindowPtr pWin, xEvent this mask is the mask of the grab. */ int type = pEvents->u.u.type; + /* if a is denied, we return 0. This could cause the caller to + * traverse the parent. May be bad! (whot) */ if (!ACDeviceAllowed(pWin, pDev)) return 0; @@ -1727,6 +1729,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, register WindowPtr pWin, xEvent tempGrab.pointerMode = GrabModeAsync; tempGrab.confineTo = NullWindow; tempGrab.cursor = NullCursor; + tempGrab.coreGrab = True; (*inputInfo.pointer->ActivateGrab)(pDev, &tempGrab, currentTime, TRUE); } @@ -1868,8 +1871,8 @@ FixUpEventFromWindow( } int -DeliverDeviceEvents(register WindowPtr pWin, register xEvent *xE, GrabPtr grab, - register WindowPtr stopAt, DeviceIntPtr dev, int count) +DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab, + WindowPtr stopAt, DeviceIntPtr dev, int count) { Window child = None; int type = xE->u.u.type; @@ -1878,7 +1881,7 @@ DeliverDeviceEvents(register WindowPtr pWin, register xEvent *xE, GrabPtr grab, if (type & EXTENSION_EVENT_BASE) { - register OtherInputMasks *inputMasks; + OtherInputMasks *inputMasks; int mskidx = dev->id; inputMasks = wOtherInputMasks(pWin); @@ -2199,6 +2202,8 @@ DefineInitialRootWindow(register WindowPtr win) #endif ROOT = win; + InitializeSprite(inputInfo.pointer, win); + while (pDev) { if (DevHasCursor(pDev)) @@ -2274,7 +2279,6 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) REGION_NULL(pScreen, &pSprite->Reg2); } #endif - } /* @@ -3943,6 +3947,7 @@ ProcGrabPointer(ClientPtr client) tempGrab.keyboardMode = stuff->keyboardMode; tempGrab.pointerMode = stuff->pointerMode; tempGrab.device = device; + tempGrab.coreGrab = True; (*device->ActivateGrab)(device, &tempGrab, time, FALSE); if (oldCursor) FreeCursor (oldCursor, (Cursor)0); diff --git a/include/input.h b/include/input.h index 433cc9419..ca81b1af6 100644 --- a/include/input.h +++ b/include/input.h @@ -455,6 +455,8 @@ extern DeviceIntPtr GetPairedPointer(DeviceIntPtr kbd); extern Bool RegisterPairingClient(ClientPtr client); extern Bool UnregisterPairingClient(ClientPtr client); +extern DeviceIntPtr GuessFreePointerDevice(); + /* Window/device based access control */ extern Bool ACRegisterClient(ClientPtr client); extern Bool ACUnregisterClient(ClientPtr client); diff --git a/mi/mipointer.c b/mi/mipointer.c index 5df7a0ab6..edb5c5fec 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -302,7 +302,7 @@ miPointerWarpCursor (pDev, pScreen, x, y) if (GenerateEvent) { - miPointerMoved (pDev, pScreen, x, y, GetTimeInMillis()); + miPointerMove (pDev, pScreen, x, y, GetTimeInMillis()); } else { @@ -346,8 +346,8 @@ miPointerUpdateSprite (DeviceIntPtr pDev) int x, y, devx, devy; miPointerPtr pPointer; - if (!pDev || - !(pDev->coreEvents || pDev == inputInfo.pointer || pDev->isMPDev)) + if (!pDev || pDev == inputInfo.pointer || + !(pDev->coreEvents || pDev->isMPDev)) return; pPointer = MIPOINTER(pDev); @@ -540,7 +540,7 @@ miPointerMove (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, unsigned long int i, nevents; int valuators[2]; - miPointerMoved(inputInfo.pointer, pScreen, x, y, time); + miPointerMoved(pDev, pScreen, x, y, time); /* generate motion notify */ valuators[0] = x; diff --git a/mi/mispritest.h b/mi/mispritest.h index 8c8cd5314..8cc206420 100644 --- a/mi/mispritest.h +++ b/mi/mispritest.h @@ -44,7 +44,6 @@ in this Software without prior written authorization from The Open Group. # include "damage.h" typedef struct { - int id; /* id, corresponds with device id */ CursorPtr pCursor; int x; /* cursor hotspot */ int y; From ceca5670fee99b5feceaa2453f1ac32d1bfe7dcd Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 8 Mar 2007 17:17:23 +1030 Subject: [PATCH 061/634] dix: Each device needs to differ between a core grab and an XI grab, otherwise a Xi grab may overwrite or release a core grab. Replace grab and associates with coreGrab and deviceGrab structures, adjust rest of dix/Xi/etc to compile. xfree86: Don't check for core devices, we'll have the virtual ones anyway. If we check, the first mouse device is duplicated and sends double events. --- Xext/security.c | 7 +- Xi/allowev.c | 12 +- Xi/chgdctl.c | 2 +- Xi/closedev.c | 4 +- Xi/exevents.c | 41 ++-- Xi/setdval.c | 2 +- Xi/setmode.c | 2 +- Xi/ungrdev.c | 6 +- dix/devices.c | 42 ++-- dix/events.c | 353 +++++++++++++++++++-------------- hw/xfree86/common/xf86Config.c | 2 - hw/xfree86/common/xf86DGA.c | 10 +- hw/xfree86/common/xf86Events.c | 22 +- include/dix.h | 3 +- include/input.h | 2 +- include/inputstr.h | 42 ++-- xkb/xkbEvents.c | 5 +- 17 files changed, 325 insertions(+), 232 deletions(-) diff --git a/Xext/security.c b/Xext/security.c index 6e58b09a6..e9d2875fd 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -822,10 +822,13 @@ CALLBACK(SecurityCheckDeviceAccess) untrusted_got_event = FALSE; found_event_window = FALSE; - if (dev->grab) + /* We can just use coreGrab as a comment a few lines above clearly states + "device security other than keyboard is not implemented yet". The core + kbd should never have a device grab set. */ + if (dev->coreGrab.grab) { untrusted_got_event = - (TRUSTLEVEL(rClient(dev->grab)) != XSecurityClientTrusted); + (TRUSTLEVEL(rClient(dev->coreGrab.grab)) != XSecurityClientTrusted); } else { diff --git a/Xi/allowev.c b/Xi/allowev.c index ea9c5de08..c9e4c87d2 100644 --- a/Xi/allowev.c +++ b/Xi/allowev.c @@ -111,22 +111,22 @@ ProcXAllowDeviceEvents(register ClientPtr client) switch (stuff->mode) { case ReplayThisDevice: - AllowSome(client, time, thisdev, NOT_GRABBED); + AllowSome(client, time, thisdev, NOT_GRABBED, FALSE); break; case SyncThisDevice: - AllowSome(client, time, thisdev, FREEZE_NEXT_EVENT); + AllowSome(client, time, thisdev, FREEZE_NEXT_EVENT, FALSE); break; case AsyncThisDevice: - AllowSome(client, time, thisdev, THAWED); + AllowSome(client, time, thisdev, THAWED, FALSE); break; case AsyncOtherDevices: - AllowSome(client, time, thisdev, THAW_OTHERS); + AllowSome(client, time, thisdev, THAW_OTHERS, FALSE); break; case SyncAll: - AllowSome(client, time, thisdev, FREEZE_BOTH_NEXT_EVENT); + AllowSome(client, time, thisdev, FREEZE_BOTH_NEXT_EVENT, FALSE); break; case AsyncAll: - AllowSome(client, time, thisdev, THAWED_BOTH); + AllowSome(client, time, thisdev, THAWED_BOTH, FALSE); break; default: SendErrorToClient(client, IReqCode, X_AllowDeviceEvents, 0, BadValue); diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c index badd93822..899015a02 100644 --- a/Xi/chgdctl.c +++ b/Xi/chgdctl.c @@ -138,7 +138,7 @@ ProcXChangeDeviceControl(ClientPtr client) ret = BadMatch; goto out; } - if ((dev->grab) && !SameClient(dev->grab, client)) { + if ((dev->deviceGrab.grab) && !SameClient(dev->deviceGrab.grab, client)) { rep.status = AlreadyGrabbed; ret = Success; goto out; diff --git a/Xi/closedev.c b/Xi/closedev.c index cc83e6a5b..7bdd3730f 100644 --- a/Xi/closedev.c +++ b/Xi/closedev.c @@ -109,8 +109,8 @@ ProcXCloseDevice(register ClientPtr client) return Success; } - if (d->grab && SameClient(d->grab, client)) - (*d->DeactivateGrab) (d); /* release active grab */ + if (d->deviceGrab.grab && SameClient(d->deviceGrab.grab, client)) + (*d->deviceGrab.DeactivateGrab) (d); /* release active grab */ /* Remove event selections from all windows for events from this device * and selected by this client. diff --git a/Xi/exevents.c b/Xi/exevents.c index 5dbb0e226..6cedafb50 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -99,8 +99,17 @@ RegisterOtherDevice(DeviceIntPtr device) { device->public.processInputProc = ProcessOtherEvent; device->public.realInputProc = ProcessOtherEvent; - (device)->ActivateGrab = ActivateKeyboardGrab; - (device)->DeactivateGrab = DeactivateKeyboardGrab; + (device)->deviceGrab.ActivateGrab = ActivateKeyboardGrab; + (device)->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; + if (IsPointerDevice(device)) + { + (device)->coreGrab.ActivateGrab = ActivatePointerGrab; + (device)->coreGrab.DeactivateGrab = DeactivatePointerGrab; + } else + { + (device)->coreGrab.ActivateGrab = ActivateKeyboardGrab; + (device)->coreGrab.DeactivateGrab = DeactivateKeyboardGrab; + } } /*ARGSUSED*/ void @@ -110,7 +119,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) int i; CARD16 modifiers; CARD16 mask; - GrabPtr grab = other->grab; + GrabPtr grab = other->deviceGrab.grab; Bool deactivateDeviceGrab = FALSE; int key = 0, bit = 0, rootX, rootY; ButtonClassPtr b = other->button; @@ -203,7 +212,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) } } if (!grab && CheckDeviceGrabs(other, xE, 0, count)) { - other->activatingKey = key; + other->deviceGrab.activatingKey = key; return; } } else if (xE->u.u.type == DeviceKeyRelease) { @@ -229,9 +238,9 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) } } - if (other->fromPassiveGrab && - !other->grab->coreGrab && - (key == other->activatingKey)) + if (other->deviceGrab.fromPassiveGrab && + !other->deviceGrab.grab->coreGrab && + (key == other->deviceGrab.activatingKey)) deactivateDeviceGrab = TRUE; } else if (xE->u.u.type == DeviceButtonPress) { if (!b) @@ -270,8 +279,8 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) b->state &= ~((Button1Mask >> 1) << xE->u.u.detail); SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify); if (!b->state - && other->fromPassiveGrab - && !other->grab->coreGrab) + && other->deviceGrab.fromPassiveGrab + && !other->deviceGrab.grab->coreGrab) deactivateDeviceGrab = TRUE; } else if (xE->u.u.type == ProximityIn) other->valuator->mode &= ~OutOfProximity; @@ -287,7 +296,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) other, count); if (deactivateDeviceGrab == TRUE) - (*other->DeactivateGrab) (other); + (*other->deviceGrab.DeactivateGrab) (other); } _X_EXPORT int @@ -663,7 +672,7 @@ SelectForWindow(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client, if (dev->valuator) if ((dev->valuator->motionHintWindow == pWin) && (mask & DevicePointerMotionHintMask) && - !(check & DevicePointerMotionHintMask) && !dev->grab) + !(check & DevicePointerMotionHintMask) && !dev->deviceGrab.grab) dev->valuator->motionHintWindow = NullWindow; RecalculateDeviceDeliverableEvents(pWin); return Success; @@ -1034,8 +1043,8 @@ DeleteDeviceFromAnyExtEvents(WindowPtr pWin, DeviceIntPtr dev) * any input focus changes. * Deactivating a device grab should cause focus events. */ - if (dev->grab && (dev->grab->window == pWin)) - (*dev->DeactivateGrab) (dev); + if (dev->deviceGrab.grab && (dev->deviceGrab.grab->window == pWin)) + (*dev->deviceGrab.DeactivateGrab) (dev); /* If the focus window is a root window (ie. has no parent) * then don't delete the focus from it. */ @@ -1045,7 +1054,7 @@ DeleteDeviceFromAnyExtEvents(WindowPtr pWin, DeviceIntPtr dev) /* If a grab is in progress, then alter the mode of focus events. */ - if (dev->grab) + if (dev->deviceGrab.grab) focusEventMode = NotifyWhileGrabbed; switch (dev->focus->revert) { @@ -1139,7 +1148,7 @@ CheckDeviceGrabAndHintWindow(WindowPtr pWin, int type, tempGrab.pointerMode = GrabModeAsync; tempGrab.confineTo = NullWindow; tempGrab.cursor = NullCursor; - (*dev->ActivateGrab) (dev, &tempGrab, currentTime, TRUE); + (*dev->deviceGrab.ActivateGrab) (dev, &tempGrab, currentTime, TRUE); } } @@ -1162,7 +1171,7 @@ void MaybeStopDeviceHint(register DeviceIntPtr dev, ClientPtr client) { WindowPtr pWin; - GrabPtr grab = dev->grab; + GrabPtr grab = dev->deviceGrab.grab; pWin = dev->valuator->motionHintWindow; diff --git a/Xi/setdval.c b/Xi/setdval.c index 958b2ac21..ce9b02d2f 100644 --- a/Xi/setdval.c +++ b/Xi/setdval.c @@ -125,7 +125,7 @@ ProcXSetDeviceValuators(register ClientPtr client) return Success; } - if ((dev->grab) && !SameClient(dev->grab, client)) + if ((dev->deviceGrab.grab) && !SameClient(dev->deviceGrab.grab, client)) rep.status = AlreadyGrabbed; else rep.status = SetDeviceValuators(client, dev, (int *)&stuff[1], diff --git a/Xi/setmode.c b/Xi/setmode.c index 11feb6d32..ff5a3bcfc 100644 --- a/Xi/setmode.c +++ b/Xi/setmode.c @@ -113,7 +113,7 @@ ProcXSetDeviceMode(register ClientPtr client) SendErrorToClient(client, IReqCode, X_SetDeviceMode, 0, BadMatch); return Success; } - if ((dev->grab) && !SameClient(dev->grab, client)) + if ((dev->deviceGrab.grab) && !SameClient(dev->deviceGrab.grab, client)) rep.status = AlreadyGrabbed; else rep.status = SetDeviceMode(client, dev, stuff->mode); diff --git a/Xi/ungrdev.c b/Xi/ungrdev.c index 980fa9339..a028a228f 100644 --- a/Xi/ungrdev.c +++ b/Xi/ungrdev.c @@ -106,12 +106,12 @@ ProcXUngrabDevice(register ClientPtr client) SendErrorToClient(client, IReqCode, X_UngrabDevice, 0, BadDevice); return Success; } - grab = dev->grab; + grab = dev->deviceGrab.grab; time = ClientTimeToServerTime(stuff->time); if ((CompareTimeStamps(time, currentTime) != LATER) && - (CompareTimeStamps(time, dev->grabTime) != EARLIER) && + (CompareTimeStamps(time, dev->deviceGrab.grabTime) != EARLIER) && (grab) && SameClient(grab, client)) - (*dev->DeactivateGrab) (dev); + (*dev->deviceGrab.DeactivateGrab) (dev); return Success; } diff --git a/dix/devices.c b/dix/devices.c index 9e0879450..05a03b572 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -104,14 +104,27 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart) dev->public.enqueueInputProc = EnqueueEvent; dev->deviceProc = deviceProc; dev->startup = autoStart; - dev->sync.frozen = FALSE; - dev->sync.other = NullGrab; - dev->sync.state = NOT_GRABBED; - dev->sync.event = (xEvent *) NULL; - dev->sync.evcount = 0; - dev->grab = NullGrab; - dev->grabTime = currentTime; - dev->fromPassiveGrab = FALSE; + + /* core grab defaults */ + dev->coreGrab.sync.frozen = FALSE; + dev->coreGrab.sync.other = NullGrab; + dev->coreGrab.sync.state = NOT_GRABBED; + dev->coreGrab.sync.event = (xEvent *) NULL; + dev->coreGrab.sync.evcount = 0; + dev->coreGrab.grab = NullGrab; + dev->coreGrab.grabTime = currentTime; + dev->coreGrab.fromPassiveGrab = FALSE; + + /* device grab defaults */ + dev->deviceGrab.sync.frozen = FALSE; + dev->deviceGrab.sync.other = NullGrab; + dev->deviceGrab.sync.state = NOT_GRABBED; + dev->deviceGrab.sync.event = (xEvent *) NULL; + dev->deviceGrab.sync.evcount = 0; + dev->deviceGrab.grab = NullGrab; + dev->deviceGrab.grabTime = currentTime; + dev->deviceGrab.fromPassiveGrab = FALSE; + dev->key = (KeyClassPtr)NULL; dev->valuator = (ValuatorClassPtr)NULL; dev->button = (ButtonClassPtr)NULL; @@ -339,8 +352,8 @@ InitCoreDevices() dev->public.processInputProc = ProcessKeyboardEvent; dev->public.realInputProc = ProcessKeyboardEvent; #endif - dev->ActivateGrab = ActivateKeyboardGrab; - dev->DeactivateGrab = DeactivateKeyboardGrab; + dev->coreGrab.ActivateGrab = ActivateKeyboardGrab; + dev->coreGrab.DeactivateGrab = DeactivateKeyboardGrab; dev->coreEvents = FALSE; dev->spriteOwner = FALSE; if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) @@ -372,8 +385,8 @@ InitCoreDevices() dev->public.processInputProc = ProcessPointerEvent; dev->public.realInputProc = ProcessPointerEvent; #endif - dev->ActivateGrab = ActivatePointerGrab; - dev->DeactivateGrab = DeactivatePointerGrab; + dev->coreGrab.ActivateGrab = ActivatePointerGrab; + dev->coreGrab.DeactivateGrab = DeactivatePointerGrab; dev->coreEvents = FALSE; if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) FatalError("Couldn't allocate pointer devPrivates\n"); @@ -535,7 +548,8 @@ CloseDevice(register DeviceIntPtr dev) PickPointer(clients[j]); } - xfree(dev->sync.event); + xfree(dev->coreGrab.sync.event); + xfree(dev->deviceGrab.sync.event); xfree(dev); } @@ -1872,7 +1886,7 @@ ProcGetPointerControl(ClientPtr client) void MaybeStopHint(register DeviceIntPtr dev, ClientPtr client) { - GrabPtr grab = dev->grab; + GrabPtr grab = dev->coreGrab.grab; if ((grab && SameClient(grab, client) && ((grab->eventMask & PointerMotionHintMask) || diff --git a/dix/events.c b/dix/events.c index 23d5f22fc..66d63cc3b 100644 --- a/dix/events.c +++ b/dix/events.c @@ -478,7 +478,7 @@ XineramaCheckVirtualMotion( pSprite->hot.pScreen = qe->pScreen; /* should always be Screen 0 */ pSprite->hot.x = qe->event->u.keyButtonPointer.rootX; pSprite->hot.y = qe->event->u.keyButtonPointer.rootY; - pWin = pDev->grab ? pDev->grab->confineTo : + pWin = pDev->coreGrab.grab ? pDev->coreGrab.grab->confineTo : NullWindow; } if (pWin) @@ -801,7 +801,7 @@ CheckVirtualMotion( pSprite->hot.pScreen = qe->pScreen; pSprite->hot.x = qe->event->u.keyButtonPointer.rootX; pSprite->hot.y = qe->event->u.keyButtonPointer.rootY; - pWin = pDev->grab ? pDev->grab->confineTo : NullWindow; + pWin = pDev->coreGrab.grab ? pDev->coreGrab.grab->confineTo : NullWindow; } if (pWin) { @@ -916,7 +916,7 @@ static void PostNewCursor(DeviceIntPtr pDev) { register WindowPtr win; - register GrabPtr grab = pDev->grab; + register GrabPtr grab = pDev->coreGrab.grab; SpritePtr pSprite = pDev->pSprite; CursorPtr pCursor; @@ -1108,7 +1108,7 @@ PlayReleasedEvents(void) prev = &syncEvents.pending; while ( (qe = *prev) ) { - if (!qe->device->sync.frozen) + if (!qe->device->coreGrab.sync.frozen) { *prev = qe->next; pDev = qe->device; @@ -1134,7 +1134,7 @@ PlayReleasedEvents(void) (*qe->device->public.processInputProc)(qe->event, qe->device, qe->evcount); xfree(qe); - for (dev = inputInfo.devices; dev && dev->sync.frozen; dev = dev->next) + for (dev = inputInfo.devices; dev && dev->coreGrab.sync.frozen; dev = dev->next) ; if (!dev) break; @@ -1150,7 +1150,7 @@ PlayReleasedEvents(void) static void FreezeThaw(register DeviceIntPtr dev, Bool frozen) { - dev->sync.frozen = frozen; + dev->coreGrab.sync.frozen = frozen; if (frozen) dev->public.processInputProc = dev->public.enqueueInputProc; else @@ -1169,14 +1169,15 @@ ComputeFreezes() register DeviceIntPtr dev; for (dev = inputInfo.devices; dev; dev = dev->next) - FreezeThaw(dev, dev->sync.other || (dev->sync.state >= FROZEN)); + FreezeThaw(dev, dev->coreGrab.sync.other || + (dev->coreGrab.sync.state >= FROZEN)); if (syncEvents.playingEvents || (!replayDev && !syncEvents.pending)) return; syncEvents.playingEvents = TRUE; if (replayDev) { - xE = replayDev->sync.event; - count = replayDev->sync.evcount; + xE = replayDev->coreGrab.sync.event; + count = replayDev->coreGrab.sync.evcount; syncEvents.replayDev = (DeviceIntPtr)NULL; w = XYToWindow( XE_KBPTR.rootX, XE_KBPTR.rootY); @@ -1203,7 +1204,7 @@ ComputeFreezes() playmore: for (dev = inputInfo.devices; dev; dev = dev->next) { - if (!dev->sync.frozen) + if (!dev->coreGrab.sync.frozen) { PlayReleasedEvents(); break; @@ -1216,7 +1217,7 @@ playmore: { /* the following may have been skipped during replay, so do it now */ - if ((grab = dev->grab) && grab->confineTo) + if ((grab = dev->coreGrab.grab) && grab->confineTo) { if (grab->confineTo->drawable.pScreen != dev->pSprite->hotPhys.pScreen) @@ -1243,7 +1244,9 @@ ScreenRestructured (ScreenPtr pScreen) for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if ((grab = pDev->grab) && grab->confineTo) + /* GrabDevice doesn't have a confineTo field, so we don't need to + * worry about it. */ + if ((grab = pDev->coreGrab.grab) && grab->confineTo) { if (grab->confineTo->drawable.pScreen != pDev->pSprite->hotPhys.pScreen) @@ -1261,31 +1264,31 @@ ScreenRestructured (ScreenPtr pScreen) void CheckGrabForSyncs(register DeviceIntPtr thisDev, Bool thisMode, Bool otherMode) { - register GrabPtr grab = thisDev->grab; + register GrabPtr grab = thisDev->coreGrab.grab; register DeviceIntPtr dev; if (thisMode == GrabModeSync) - thisDev->sync.state = FROZEN_NO_EVENT; + thisDev->coreGrab.sync.state = FROZEN_NO_EVENT; else { /* free both if same client owns both */ - thisDev->sync.state = THAWED; - if (thisDev->sync.other && - (CLIENT_BITS(thisDev->sync.other->resource) == + thisDev->coreGrab.sync.state = THAWED; + if (thisDev->coreGrab.sync.other && + (CLIENT_BITS(thisDev->coreGrab.sync.other->resource) == CLIENT_BITS(grab->resource))) - thisDev->sync.other = NullGrab; + thisDev->coreGrab.sync.other = NullGrab; } for (dev = inputInfo.devices; dev; dev = dev->next) { if (dev != thisDev) { if (otherMode == GrabModeSync) - dev->sync.other = grab; + dev->coreGrab.sync.other = grab; else { /* free both if same client owns both */ - if (dev->sync.other && - (CLIENT_BITS(dev->sync.other->resource) == + if (dev->coreGrab.sync.other && + (CLIENT_BITS(dev->coreGrab.sync.other->resource) == CLIENT_BITS(grab->resource))) - dev->sync.other = NullGrab; + dev->coreGrab.sync.other = NullGrab; } } } @@ -1296,8 +1299,9 @@ void ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab, TimeStamp time, Bool autoGrab) { - WindowPtr oldWin = (mouse->grab) ? mouse->grab->window - : mouse->pSprite->win; + WindowPtr oldWin = (mouse->coreGrab.grab) ? + mouse->coreGrab.grab->window + : mouse->pSprite->win; if (grab->confineTo) { @@ -1309,14 +1313,14 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab, DoEnterLeaveEvents(mouse, oldWin, grab->window, NotifyGrab); mouse->valuator->motionHintWindow = NullWindow; if (syncEvents.playingEvents) - mouse->grabTime = syncEvents.time; + mouse->coreGrab.grabTime = syncEvents.time; else - mouse->grabTime = time; + mouse->coreGrab.grabTime = time; if (grab->cursor) grab->cursor->refcnt++; - mouse->activeGrab = *grab; - mouse->grab = &mouse->activeGrab; - mouse->fromPassiveGrab = autoGrab; + mouse->coreGrab.activeGrab = *grab; + mouse->coreGrab.grab = &mouse->coreGrab.activeGrab; + mouse->coreGrab.fromPassiveGrab = autoGrab; PostNewCursor(mouse); CheckGrabForSyncs(mouse,(Bool)grab->pointerMode, (Bool)grab->keyboardMode); } @@ -1324,17 +1328,17 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab, void DeactivatePointerGrab(register DeviceIntPtr mouse) { - register GrabPtr grab = mouse->grab; + register GrabPtr grab = mouse->coreGrab.grab; register DeviceIntPtr dev; mouse->valuator->motionHintWindow = NullWindow; - mouse->grab = NullGrab; - mouse->sync.state = NOT_GRABBED; - mouse->fromPassiveGrab = FALSE; + mouse->coreGrab.grab = NullGrab; + mouse->coreGrab.sync.state = NOT_GRABBED; + mouse->coreGrab.fromPassiveGrab = FALSE; for (dev = inputInfo.devices; dev; dev = dev->next) { - if (dev->sync.other == grab) - dev->sync.other = NullGrab; + if (dev->coreGrab.sync.other == grab) + dev->coreGrab.sync.other = NullGrab; } DoEnterLeaveEvents(mouse, grab->window, mouse->pSprite->win, NotifyUngrab); @@ -1351,8 +1355,8 @@ ActivateKeyboardGrab(register DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, { WindowPtr oldWin; - if (keybd->grab) - oldWin = keybd->grab->window; + if (keybd->coreGrab.grab) + oldWin = keybd->coreGrab.grab->window; else if (keybd->focus) oldWin = keybd->focus->win; else @@ -1363,19 +1367,19 @@ ActivateKeyboardGrab(register DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, keybd->valuator->motionHintWindow = NullWindow; DoFocusEvents(keybd, oldWin, grab->window, NotifyGrab); if (syncEvents.playingEvents) - keybd->grabTime = syncEvents.time; + keybd->coreGrab.grabTime = syncEvents.time; else - keybd->grabTime = time; - keybd->activeGrab = *grab; - keybd->grab = &keybd->activeGrab; - keybd->fromPassiveGrab = passive; + keybd->coreGrab.grabTime = time; + keybd->coreGrab.activeGrab = *grab; + keybd->coreGrab.grab = &keybd->coreGrab.activeGrab; + keybd->coreGrab.fromPassiveGrab = passive; CheckGrabForSyncs(keybd, (Bool)grab->keyboardMode, (Bool)grab->pointerMode); } void DeactivateKeyboardGrab(register DeviceIntPtr keybd) { - register GrabPtr grab = keybd->grab; + register GrabPtr grab = keybd->coreGrab.grab; register DeviceIntPtr dev; register WindowPtr focusWin = keybd->focus ? keybd->focus->win : keybd->pSprite->win; @@ -1384,49 +1388,61 @@ DeactivateKeyboardGrab(register DeviceIntPtr keybd) focusWin = inputInfo.keyboard->focus->win; if (keybd->valuator) keybd->valuator->motionHintWindow = NullWindow; - keybd->grab = NullGrab; - keybd->sync.state = NOT_GRABBED; - keybd->fromPassiveGrab = FALSE; + keybd->coreGrab.grab = NullGrab; + keybd->coreGrab.sync.state = NOT_GRABBED; + keybd->coreGrab.fromPassiveGrab = FALSE; for (dev = inputInfo.devices; dev; dev = dev->next) { - if (dev->sync.other == grab) - dev->sync.other = NullGrab; + if (dev->coreGrab.sync.other == grab) + dev->coreGrab.sync.other = NullGrab; } DoFocusEvents(keybd, grab->window, focusWin, NotifyUngrab); ComputeFreezes(); } +/* + * Core flag decides whether to work on the coreGrab or deviceGrab sync + * fields. + */ void -AllowSome(ClientPtr client, TimeStamp time, DeviceIntPtr thisDev, int newState) +AllowSome(ClientPtr client, + TimeStamp time, + DeviceIntPtr thisDev, + int newState, + Bool core) { Bool thisGrabbed, otherGrabbed, othersFrozen, thisSynced; TimeStamp grabTime; register DeviceIntPtr dev; + GrabInfoPtr devgrabinfo, + grabinfo = (core) ? &thisDev->coreGrab : &thisDev->deviceGrab; - thisGrabbed = thisDev->grab && SameClient(thisDev->grab, client); + thisGrabbed = grabinfo->grab && SameClient(grabinfo->grab, client); thisSynced = FALSE; otherGrabbed = FALSE; othersFrozen = TRUE; - grabTime = thisDev->grabTime; + grabTime = grabinfo->grabTime; for (dev = inputInfo.devices; dev; dev = dev->next) { + devgrabinfo = (core) ? &dev->coreGrab : &dev->deviceGrab; + if (dev == thisDev) continue; - if (dev->grab && SameClient(dev->grab, client)) + if (devgrabinfo->grab && SameClient(devgrabinfo->grab, client)) { if (!(thisGrabbed || otherGrabbed) || - (CompareTimeStamps(dev->grabTime, grabTime) == LATER)) - grabTime = dev->grabTime; + (CompareTimeStamps(devgrabinfo->grabTime, grabTime) == LATER)) + grabTime = devgrabinfo->grabTime; otherGrabbed = TRUE; - if (thisDev->sync.other == dev->grab) + if (grabinfo->sync.other == devgrabinfo->grab) thisSynced = TRUE; - if (dev->sync.state < FROZEN) + if (devgrabinfo->sync.state < FROZEN) othersFrozen = FALSE; } - else if (!dev->sync.other || !SameClient(dev->sync.other, client)) + else if (!devgrabinfo->sync.other || !SameClient(devgrabinfo->sync.other, client)) othersFrozen = FALSE; } - if (!((thisGrabbed && thisDev->sync.state >= FROZEN) || thisSynced)) + if (!((thisGrabbed && grabinfo->sync.state >= FROZEN) || thisSynced)) return; if ((CompareTimeStamps(time, currentTime) == LATER) || (CompareTimeStamps(time, grabTime) == EARLIER)) @@ -1435,17 +1451,17 @@ AllowSome(ClientPtr client, TimeStamp time, DeviceIntPtr thisDev, int newState) { case THAWED: /* Async */ if (thisGrabbed) - thisDev->sync.state = THAWED; + grabinfo->sync.state = THAWED; if (thisSynced) - thisDev->sync.other = NullGrab; + grabinfo->sync.other = NullGrab; ComputeFreezes(); break; case FREEZE_NEXT_EVENT: /* Sync */ if (thisGrabbed) { - thisDev->sync.state = FREEZE_NEXT_EVENT; + grabinfo->sync.state = FREEZE_NEXT_EVENT; if (thisSynced) - thisDev->sync.other = NullGrab; + grabinfo->sync.other = NullGrab; ComputeFreezes(); } break; @@ -1454,10 +1470,13 @@ AllowSome(ClientPtr client, TimeStamp time, DeviceIntPtr thisDev, int newState) { for (dev = inputInfo.devices; dev; dev = dev->next) { - if (dev->grab && SameClient(dev->grab, client)) - dev->sync.state = THAWED; - if (dev->sync.other && SameClient(dev->sync.other, client)) - dev->sync.other = NullGrab; + devgrabinfo = (core) ? &dev->coreGrab : &dev->deviceGrab; + if (devgrabinfo->grab + && SameClient(devgrabinfo->grab, client)) + devgrabinfo->sync.state = THAWED; + if (devgrabinfo->sync.other && + SameClient(devgrabinfo->sync.other, client)) + devgrabinfo->sync.other = NullGrab; } ComputeFreezes(); } @@ -1467,22 +1486,25 @@ AllowSome(ClientPtr client, TimeStamp time, DeviceIntPtr thisDev, int newState) { for (dev = inputInfo.devices; dev; dev = dev->next) { - if (dev->grab && SameClient(dev->grab, client)) - dev->sync.state = FREEZE_BOTH_NEXT_EVENT; - if (dev->sync.other && SameClient(dev->sync.other, client)) - dev->sync.other = NullGrab; + devgrabinfo = (core) ? &dev->coreGrab : &dev->deviceGrab; + if (devgrabinfo->grab + && SameClient(devgrabinfo->grab, client)) + devgrabinfo->sync.state = FREEZE_BOTH_NEXT_EVENT; + if (devgrabinfo->sync.other + && SameClient(devgrabinfo->sync.other, client)) + devgrabinfo->sync.other = NullGrab; } ComputeFreezes(); } break; case NOT_GRABBED: /* Replay */ - if (thisGrabbed && thisDev->sync.state == FROZEN_WITH_EVENT) + if (thisGrabbed && grabinfo->sync.state == FROZEN_WITH_EVENT) { if (thisSynced) - thisDev->sync.other = NullGrab; + grabinfo->sync.other = NullGrab; syncEvents.replayDev = thisDev; - syncEvents.replayWin = thisDev->grab->window; - (*thisDev->DeactivateGrab)(thisDev); + syncEvents.replayWin = grabinfo->grab->window; + (*grabinfo->DeactivateGrab)(thisDev); syncEvents.replayDev = (DeviceIntPtr)NULL; } break; @@ -1493,10 +1515,13 @@ AllowSome(ClientPtr client, TimeStamp time, DeviceIntPtr thisDev, int newState) { if (dev == thisDev) continue; - if (dev->grab && SameClient(dev->grab, client)) - dev->sync.state = THAWED; - if (dev->sync.other && SameClient(dev->sync.other, client)) - dev->sync.other = NullGrab; + devgrabinfo = (core) ? &dev->coreGrab : &dev->deviceGrab; + if (devgrabinfo->grab + && SameClient(devgrabinfo->grab, client)) + devgrabinfo->sync.state = THAWED; + if (devgrabinfo->sync.other + && SameClient(devgrabinfo->sync.other, client)) + devgrabinfo->sync.other = NullGrab; } ComputeFreezes(); } @@ -1517,28 +1542,28 @@ ProcAllowEvents(register ClientPtr client) switch (stuff->mode) { case ReplayPointer: - AllowSome(client, time, mouse, NOT_GRABBED); + AllowSome(client, time, mouse, NOT_GRABBED, True); break; case SyncPointer: - AllowSome(client, time, mouse, FREEZE_NEXT_EVENT); + AllowSome(client, time, mouse, FREEZE_NEXT_EVENT, True); break; case AsyncPointer: - AllowSome(client, time, mouse, THAWED); + AllowSome(client, time, mouse, THAWED, True); break; case ReplayKeyboard: - AllowSome(client, time, keybd, NOT_GRABBED); + AllowSome(client, time, keybd, NOT_GRABBED, True); break; case SyncKeyboard: - AllowSome(client, time, keybd, FREEZE_NEXT_EVENT); + AllowSome(client, time, keybd, FREEZE_NEXT_EVENT, True); break; case AsyncKeyboard: - AllowSome(client, time, keybd, THAWED); + AllowSome(client, time, keybd, THAWED, True); break; case SyncBoth: - AllowSome(client, time, keybd, FREEZE_BOTH_NEXT_EVENT); + AllowSome(client, time, keybd, FREEZE_BOTH_NEXT_EVENT, True); break; case AsyncBoth: - AllowSome(client, time, keybd, THAWED_BOTH); + AllowSome(client, time, keybd, THAWED_BOTH, True); break; default: client->errorValue = stuff->mode; @@ -1560,9 +1585,15 @@ ReleaseActiveGrabs(ClientPtr client) done = TRUE; for (dev = inputInfo.devices; dev; dev = dev->next) { - if (dev->grab && SameClient(dev->grab, client)) + if (dev->coreGrab.grab && SameClient(dev->coreGrab.grab, client)) { - (*dev->DeactivateGrab)(dev); + (*dev->coreGrab.DeactivateGrab)(dev); + done = FALSE; + } + + if (dev->deviceGrab.grab && SameClient(dev->deviceGrab.grab, client)) + { + (*dev->deviceGrab.DeactivateGrab)(dev); done = FALSE; } } @@ -1730,7 +1761,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, register WindowPtr pWin, xEvent tempGrab.confineTo = NullWindow; tempGrab.cursor = NullCursor; tempGrab.coreGrab = True; - (*inputInfo.pointer->ActivateGrab)(pDev, &tempGrab, + (*inputInfo.pointer->coreGrab.ActivateGrab)(pDev, &tempGrab, currentTime, TRUE); } else if ((type == MotionNotify) && deliveries) @@ -2175,7 +2206,7 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) REGION_TRANSLATE(pSprite->screen, &pSprite->Reg2, xoff, yoff); /* FIXME: if we call ConfineCursorToWindow, must we do anything else? */ - if ((grab = pDev->grab) && grab->confineTo) { + if ((grab = pDev->coreGrab.grab) && grab->confineTo) { if (grab->confineTo->drawable.pScreen != pSprite->hotPhys.pScreen) pSprite->hotPhys.x = pSprite->hotPhys.y = 0; @@ -2576,6 +2607,7 @@ CheckPassiveGrabsOnWindow( { register GrabPtr grab = wPassiveGrabs(pWin); GrabRec tempGrab; + GrabInfoPtr grabinfo; register xEvent *dxE; if (!grab) @@ -2629,7 +2661,9 @@ CheckPassiveGrabsOnWindow( tempGrab.modifiersDetail.exact&(~0x1f00); } #endif - (*device->ActivateGrab)(device, grab, currentTime, TRUE); + grabinfo = (xE->u.u.type & EXTENSION_EVENT_BASE) ? + &device->deviceGrab : &device->coreGrab; + (*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE); FixUpEventFromWindow(device, xE, grab->window, None, TRUE); @@ -2637,20 +2671,20 @@ CheckPassiveGrabsOnWindow( filters[xE->u.u.type], filters[xE->u.u.type], grab); - if (device->sync.state == FROZEN_NO_EVENT) + if (grabinfo->sync.state == FROZEN_NO_EVENT) { - if (device->sync.evcount < count) + if (grabinfo->sync.evcount < count) { Must_have_memory = TRUE; /* XXX */ - device->sync.event = (xEvent *)xrealloc(device->sync.event, + grabinfo->sync.event = (xEvent *)xrealloc(grabinfo->sync.event, count* sizeof(xEvent)); Must_have_memory = FALSE; /* XXX */ } - device->sync.evcount = count; - for (dxE = device->sync.event; --count >= 0; dxE++, xE++) + grabinfo->sync.evcount = count; + for (dxE = grabinfo->sync.event; --count >= 0; dxE++, xE++) *dxE = *xE; - device->sync.state = FROZEN_WITH_EVENT; + grabinfo->sync.state = FROZEN_WITH_EVENT; } return TRUE; } @@ -2747,12 +2781,20 @@ void DeliverGrabbedEvent(register xEvent *xE, register DeviceIntPtr thisDev, Bool deactivateGrab, int count) { - register GrabPtr grab = thisDev->grab; + register GrabPtr grab; + GrabInfoPtr grabinfo; int deliveries = 0; register DeviceIntPtr dev; register xEvent *dxE; SpritePtr pSprite = thisDev->pSprite; + if (xE->u.u.type & EXTENSION_EVENT_BASE) + grabinfo = &thisDev->deviceGrab; + else + grabinfo = &thisDev->coreGrab; + + grab = grabinfo->grab; + if (grab->ownerEvents) { WindowPtr focus; @@ -2798,7 +2840,7 @@ DeliverGrabbedEvent(register xEvent *xE, register DeviceIntPtr thisDev, && xE->u.u.type != DeviceMotionNotify #endif )) - switch (thisDev->sync.state) + switch (grabinfo->sync.state) { case FREEZE_BOTH_NEXT_EVENT: for (dev = inputInfo.devices; dev; dev = dev->next) @@ -2806,26 +2848,26 @@ DeliverGrabbedEvent(register xEvent *xE, register DeviceIntPtr thisDev, if (dev == thisDev) continue; FreezeThaw(dev, TRUE); - if ((dev->sync.state == FREEZE_BOTH_NEXT_EVENT) && - (CLIENT_BITS(dev->grab->resource) == - CLIENT_BITS(thisDev->grab->resource))) - dev->sync.state = FROZEN_NO_EVENT; + if ((grabinfo->sync.state == FREEZE_BOTH_NEXT_EVENT) && + (CLIENT_BITS(grab->resource) == + CLIENT_BITS(grab->resource))) + grabinfo->sync.state = FROZEN_NO_EVENT; else - dev->sync.other = thisDev->grab; + grabinfo->sync.other = grab; } /* fall through */ case FREEZE_NEXT_EVENT: - thisDev->sync.state = FROZEN_WITH_EVENT; + grabinfo->sync.state = FROZEN_WITH_EVENT; FreezeThaw(thisDev, TRUE); - if (thisDev->sync.evcount < count) + if (grabinfo->sync.evcount < count) { Must_have_memory = TRUE; /* XXX */ - thisDev->sync.event = (xEvent *)xrealloc(thisDev->sync.event, + grabinfo->sync.event = (xEvent *)xrealloc(grabinfo->sync.event, count*sizeof(xEvent)); Must_have_memory = FALSE; /* XXX */ } - thisDev->sync.evcount = count; - for (dxE = thisDev->sync.event; --count >= 0; dxE++, xE++) + grabinfo->sync.evcount = count; + for (dxE = grabinfo->sync.event; --count >= 0; dxE++, xE++) *dxE = *xE; break; } @@ -2843,9 +2885,11 @@ ProcessKeyboardEvent (register xEvent *xE, register DeviceIntPtr keybd, int coun register int i; register CARD8 modifiers; register CARD16 mask; - GrabPtr grab = keybd->grab; + register GrabPtr grab; + GrabInfoPtr grabinfo; Bool deactivateGrab = FALSE; register KeyClassPtr keyc = keybd->key; + #ifdef XEVIE static Window rootWin = 0; @@ -2886,6 +2930,13 @@ drawable.id:0; } #endif + if (xE->u.u.type & EXTENSION_EVENT_BASE) + grabinfo = &keybd->deviceGrab; + else + grabinfo = &keybd->coreGrab; + + grab = grabinfo->grab; + if (!syncEvents.playingEvents) { NoticeTime(xE); @@ -2954,7 +3005,7 @@ drawable.id:0; } if (!grab && CheckDeviceGrabs(keybd, xE, 0, count)) { - keybd->activatingKey = key; + grabinfo->activatingKey = key; return; } break; @@ -2975,7 +3026,7 @@ drawable.id:0; modifiers &= ~mask; } } - if (keybd->fromPassiveGrab && (key == keybd->activatingKey)) + if (grabinfo->fromPassiveGrab && (key == grabinfo->activatingKey)) deactivateGrab = TRUE; break; default: @@ -2986,7 +3037,7 @@ drawable.id:0; else DeliverFocusedEvent(keybd, xE, keybd->pSprite->win, count); if (deactivateGrab) - (*keybd->DeactivateGrab)(keybd); + (*grabinfo->DeactivateGrab)(keybd); XaceHook(XACE_KEY_AVAIL, xE, keybd, count); } @@ -3033,7 +3084,7 @@ CoreProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int c ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count) #endif { - register GrabPtr grab = mouse->grab; + GrabPtr grab = mouse->coreGrab.grab; Bool deactivateGrab = FALSE; register ButtonClassPtr butc = mouse->button; SpritePtr pSprite = mouse->pSprite; @@ -3120,7 +3171,7 @@ ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count if (xE->u.u.detail <= 5) butc->state &= ~((Button1Mask >> 1) << xE->u.u.detail); filters[MotionNotify] = Motion_Filter(butc); - if (!butc->state && mouse->fromPassiveGrab) + if (!butc->state && mouse->coreGrab.fromPassiveGrab) deactivateGrab = TRUE; break; default: @@ -3135,7 +3186,7 @@ ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count DeliverDeviceEvents(pSprite->win, xE, NullGrab, NullWindow, mouse, count); if (deactivateGrab) - (*mouse->DeactivateGrab)(mouse); + (*mouse->coreGrab.DeactivateGrab)(mouse); } #define AtMostOneClient \ @@ -3277,7 +3328,7 @@ maskSet: if ((inputInfo.pointer->valuator->motionHintWindow == pWin) && (mask & PointerMotionHintMask) && !(check & PointerMotionHintMask) && - !inputInfo.pointer->grab) + !inputInfo.pointer->coreGrab.grab) /* VCP shouldn't have deviceGrab */ inputInfo.pointer->valuator->motionHintWindow = NullWindow; RecalculateDeliverableEvents(pWin); return Success; @@ -3362,7 +3413,8 @@ EnterLeaveEvent( register DeviceIntPtr keybd = inputInfo.keyboard; WindowPtr focus; register DeviceIntPtr mouse = pDev; - register GrabPtr grab = mouse->grab; + GrabPtr grab = mouse->coreGrab.grab; + GrabPtr devgrab = mouse->deviceGrab.grab; Mask mask; deviceEnterNotify *devEnterLeave; @@ -3430,9 +3482,9 @@ EnterLeaveEvent( if (inputMasks && (filters[devEnterLeave->type] & inputMasks->deliverableEvents[mskidx])) { - if (grab) - (void)TryClientEvents(rClient(grab), (xEvent*)devEnterLeave, 1, - mask, filters[devEnterLeave->type], grab); + if (devgrab) + (void)TryClientEvents(rClient(devgrab), (xEvent*)devEnterLeave, 1, + mask, filters[devEnterLeave->type], devgrab); else (void)DeliverEventsToWindow(pDev, pWin, (xEvent*)devEnterLeave, 1, filters[devEnterLeave->type], @@ -3776,7 +3828,7 @@ SetInputFocus( if ((CompareTimeStamps(time, currentTime) == LATER) || (CompareTimeStamps(time, focus->time) == EARLIER)) return Success; - mode = (dev->grab) ? NotifyWhileGrabbed : NotifyNormal; + mode = (dev->coreGrab.grab) ? NotifyWhileGrabbed : NotifyNormal; if (focus->win == FollowKeyboardWin) DoFocusEvents(dev, inputInfo.keyboard->focus->win, focusWin, mode); else @@ -3912,7 +3964,7 @@ ProcGrabPointer(ClientPtr client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.length = 0; - grab = device->grab; + grab = device->coreGrab.grab; if ((grab) && !SameClient(grab, client)) rep.status = AlreadyGrabbed; else if ((!pWin->realized) || @@ -3920,11 +3972,12 @@ ProcGrabPointer(ClientPtr client) !(confineTo->realized && BorderSizeNotEmpty(device, confineTo)))) rep.status = GrabNotViewable; - else if (device->sync.frozen && - device->sync.other && !SameClient(device->sync.other, client)) + else if (device->coreGrab.sync.frozen && + device->coreGrab.sync.other && + !SameClient(device->coreGrab.sync.other, client)) rep.status = GrabFrozen; else if ((CompareTimeStamps(time, currentTime) == LATER) || - (CompareTimeStamps(time, device->grabTime) == EARLIER)) + (CompareTimeStamps(time, device->coreGrab.grabTime) == EARLIER)) rep.status = GrabInvalidTime; else { @@ -3948,7 +4001,7 @@ ProcGrabPointer(ClientPtr client) tempGrab.pointerMode = stuff->pointerMode; tempGrab.device = device; tempGrab.coreGrab = True; - (*device->ActivateGrab)(device, &tempGrab, time, FALSE); + (*device->coreGrab.ActivateGrab)(device, &tempGrab, time, FALSE); if (oldCursor) FreeCursor (oldCursor, (Cursor)0); rep.status = GrabSuccess; @@ -3961,7 +4014,7 @@ int ProcChangeActivePointerGrab(ClientPtr client) { DeviceIntPtr device = PickPointer(client); - register GrabPtr grab = device->grab; + register GrabPtr grab = device->coreGrab.grab; CursorPtr newCursor, oldCursor; REQUEST(xChangeActivePointerGrabReq); TimeStamp time; @@ -3990,7 +4043,7 @@ ProcChangeActivePointerGrab(ClientPtr client) return Success; time = ClientTimeToServerTime(stuff->time); if ((CompareTimeStamps(time, currentTime) == LATER) || - (CompareTimeStamps(time, device->grabTime) == EARLIER)) + (CompareTimeStamps(time, device->coreGrab.grabTime) == EARLIER)) return Success; oldCursor = grab->cursor; grab->cursor = newCursor; @@ -4013,12 +4066,12 @@ ProcUngrabPointer(ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); UpdateCurrentTime(); - grab = device->grab; + grab = device->coreGrab.grab; time = ClientTimeToServerTime(stuff->id); if ((CompareTimeStamps(time, currentTime) != LATER) && - (CompareTimeStamps(time, device->grabTime) != EARLIER) && + (CompareTimeStamps(time, device->coreGrab.grabTime) != EARLIER) && (grab) && SameClient(grab, client)) - (*device->DeactivateGrab)(device); + (*device->coreGrab.DeactivateGrab)(device); return Success; } @@ -4052,16 +4105,16 @@ GrabDevice(register ClientPtr client, register DeviceIntPtr dev, if (rc != Success) return rc; time = ClientTimeToServerTime(ctime); - grab = dev->grab; + grab = dev->coreGrab.grab; if (grab && !SameClient(grab, client)) *status = AlreadyGrabbed; else if (!pWin->realized) *status = GrabNotViewable; else if ((CompareTimeStamps(time, currentTime) == LATER) || - (CompareTimeStamps(time, dev->grabTime) == EARLIER)) + (CompareTimeStamps(time, dev->coreGrab.grabTime) == EARLIER)) *status = GrabInvalidTime; - else if (dev->sync.frozen && - dev->sync.other && !SameClient(dev->sync.other, client)) + else if (dev->coreGrab.sync.frozen && + dev->coreGrab.sync.other && !SameClient(dev->coreGrab.sync.other, client)) *status = GrabFrozen; else { @@ -4079,7 +4132,7 @@ GrabDevice(register ClientPtr client, register DeviceIntPtr dev, tempGrab.device = dev; tempGrab.cursor = NULL; - (*dev->ActivateGrab)(dev, &tempGrab, time, FALSE); + (*dev->coreGrab.ActivateGrab)(dev, &tempGrab, time, FALSE); *status = GrabSuccess; } return Success; @@ -4123,12 +4176,12 @@ ProcUngrabKeyboard(ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); UpdateCurrentTime(); - grab = device->grab; + grab = device->coreGrab.grab; time = ClientTimeToServerTime(stuff->id); if ((CompareTimeStamps(time, currentTime) != LATER) && - (CompareTimeStamps(time, device->grabTime) != EARLIER) && + (CompareTimeStamps(time, device->coreGrab.grabTime) != EARLIER) && (grab) && SameClient(grab, client)) - (*device->DeactivateGrab)(device); + (*device->coreGrab.DeactivateGrab)(device); return Success; } @@ -4547,19 +4600,21 @@ DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) FocusClassPtr focus = keybd->focus; OtherClientsPtr oc; GrabPtr passive; + GrabPtr grab; /* Deactivate any grabs performed on this window, before making any input focus changes. */ - - if (mouse->grab && - ((mouse->grab->window == pWin) || (mouse->grab->confineTo == pWin))) - (*mouse->DeactivateGrab)(mouse); + grab = mouse->coreGrab.grab; + if (grab && + ((grab->window == pWin) || (grab->confineTo == pWin))) + (*mouse->coreGrab.DeactivateGrab)(mouse); /* Deactivating a keyboard grab should cause focus events. */ - if (keybd->grab && (keybd->grab->window == pWin)) - (*keybd->DeactivateGrab)(keybd); + grab = keybd->coreGrab.grab; + if (grab && (grab->window == pWin)) + (*keybd->coreGrab.DeactivateGrab)(keybd); /* If the focus window is a root window (ie. has no parent) then don't delete the focus from it. */ @@ -4570,7 +4625,7 @@ DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) /* If a grab is in progress, then alter the mode of focus events. */ - if (keybd->grab) + if (keybd->coreGrab.grab) focusEventMode = NotifyWhileGrabbed; switch (focus->revert) @@ -4644,11 +4699,11 @@ CheckCursorConfinement(WindowPtr pWin) { if (DevHasCursor(pDev)) { - grab = pDev->grab; + grab = pDev->coreGrab.grab; if (grab && (confineTo = grab->confineTo)) { if (!BorderSizeNotEmpty(pDev, confineTo)) - (*inputInfo.pointer->DeactivateGrab)(pDev); + (*inputInfo.pointer->coreGrab.DeactivateGrab)(pDev); else if ((pWin == confineTo) || IsParent(pWin, confineTo)) ConfineCursorToWindow(pDev, confineTo, TRUE, TRUE); } diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index c0e21dd5e..2981e173c 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -2478,8 +2478,6 @@ xf86HandleConfigFile(Bool autoconfig) return CONFIG_PARSE_ERROR; } - checkInput(&xf86ConfigLayout); - /* * Handle some command line options that can override some of the * ServerFlags settings. diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index 204457fb1..9a24040af 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c @@ -1030,9 +1030,11 @@ DGAProcessKeyboardEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr keybd) else { /* If the keyboard is actively grabbed, deliver a grabbed core event */ - if (keybd->grab && !keybd->fromPassiveGrab) + if (keybd->coreGrab.grab && !keybd->coreGrab.fromPassiveGrab) { - core.u.u.type = coreEquiv; + /* I've got no clue if that is correct but only working on core + * grabs seems the right thing here. (whot) */ + core.u.u.type = coreEquiv; core.u.u.detail = de->u.u.detail; core.u.keyButtonPointer.time = de->u.event.time; core.u.keyButtonPointer.eventX = de->u.event.dx; @@ -1109,8 +1111,10 @@ DGAProcessPointerEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr mouse) else { /* If the pointer is actively grabbed, deliver a grabbed core event */ - if (mouse->grab && !mouse->fromPassiveGrab) + if (mouse->coreGrab.grab && !mouse->coreGrab.fromPassiveGrab) { + /* I've got no clue if that is correct but only working on core + * grabs seems the right thing here. (whot) */ core.u.u.type = coreEquiv; core.u.u.detail = de->u.u.detail; core.u.keyButtonPointer.time = de->u.event.time; diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 5f4371432..a91f6b34e 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -290,12 +290,13 @@ xf86ProcessActionEvent(ActionEvent action, void *arg) break; case ACTION_DISABLEGRAB: if (!xf86Info.grabInfo.disabled && xf86Info.grabInfo.allowDeactivate) { - if (inputInfo.pointer && inputInfo.pointer->grab != NULL && - inputInfo.pointer->DeactivateGrab) - inputInfo.pointer->DeactivateGrab(inputInfo.pointer); - if (inputInfo.keyboard && inputInfo.keyboard->grab != NULL && - inputInfo.keyboard->DeactivateGrab) - inputInfo.keyboard->DeactivateGrab(inputInfo.keyboard); + if (inputInfo.pointer && inputInfo.pointer->coreGrab.grab != NULL && + inputInfo.pointer->coreGrab.DeactivateGrab) + inputInfo.pointer->coreGrab.DeactivateGrab(inputInfo.pointer); + if (inputInfo.keyboard && + inputInfo.keyboard->coreGrab.grab != NULL && + inputInfo.keyboard->coreGrab.DeactivateGrab) + inputInfo.keyboard->coreGrab.DeactivateGrab(inputInfo.keyboard); } break; case ACTION_CLOSECLIENT: @@ -303,10 +304,11 @@ xf86ProcessActionEvent(ActionEvent action, void *arg) ClientPtr pointer, keyboard, server; pointer = keyboard = server = NULL; - if (inputInfo.pointer && inputInfo.pointer->grab != NULL) - pointer = clients[CLIENT_ID(inputInfo.pointer->grab->resource)]; - if (inputInfo.keyboard && inputInfo.keyboard->grab != NULL) { - keyboard = clients[CLIENT_ID(inputInfo.keyboard->grab->resource)]; + if (inputInfo.pointer && inputInfo.pointer->coreGrab.grab != NULL) + pointer = clients[CLIENT_ID(inputInfo.pointer->coreGrab.grab->resource)]; + if (inputInfo.keyboard && inputInfo.keyboard->coreGrab.grab != NULL) + { + keyboard = clients[CLIENT_ID(inputInfo.keyboard->coreGrab.grab->resource)]; if (keyboard == pointer) keyboard = NULL; } diff --git a/include/dix.h b/include/dix.h index 95c69f057..f22f48964 100644 --- a/include/dix.h +++ b/include/dix.h @@ -469,7 +469,8 @@ extern void AllowSome( ClientPtr /* client */, TimeStamp /* time */, DeviceIntPtr /* thisDev */, - int /* newState */); + int /* newState */, + Bool /* core */); extern void ReleaseActiveGrabs( ClientPtr client); diff --git a/include/input.h b/include/input.h index ca81b1af6..2d72f838b 100644 --- a/include/input.h +++ b/include/input.h @@ -455,7 +455,7 @@ extern DeviceIntPtr GetPairedPointer(DeviceIntPtr kbd); extern Bool RegisterPairingClient(ClientPtr client); extern Bool UnregisterPairingClient(ClientPtr client); -extern DeviceIntPtr GuessFreePointerDevice(); +extern DeviceIntPtr GuessFreePointerDevice(void); /* Window/device based access control */ extern Bool ACRegisterClient(ClientPtr client); diff --git a/include/inputstr.h b/include/inputstr.h index 90a985b5f..8c3e5604d 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -300,11 +300,31 @@ typedef struct { #define FROZEN_NO_EVENT 5 #define FROZEN_WITH_EVENT 6 #define THAW_OTHERS 7 +typedef struct _GrabInfoRec { + TimeStamp grabTime; + Bool fromPassiveGrab; + GrabRec activeGrab; + GrabPtr grab; + CARD8 activatingKey; + void (*ActivateGrab) ( + DeviceIntPtr /*device*/, + GrabPtr /*grab*/, + TimeStamp /*time*/, + Bool /*autoGrab*/); + void (*DeactivateGrab)( + DeviceIntPtr /*device*/); + struct { + Bool frozen; + int state; + GrabPtr other; /* if other grab has this frozen */ + xEvent *event; /* saved to be replayed */ + int evcount; + } sync; +} GrabInfoRec, *GrabInfoPtr; typedef struct _DeviceIntRec { DeviceRec public; DeviceIntPtr next; - TimeStamp grabTime; Bool startup; /* true if needs to be turned on at server intialization time */ DeviceProc deviceProc; /* proc(DevicePtr, DEVICE_xx). It is @@ -313,27 +333,11 @@ typedef struct _DeviceIntRec { Bool inited; /* TRUE if INIT returns Success */ Bool enabled; /* TRUE if ON returns Success */ Bool coreEvents; /* TRUE if device also sends core */ - GrabPtr grab; /* the grabber - used by DIX */ - struct { - Bool frozen; - int state; - GrabPtr other; /* if other grab has this frozen */ - xEvent *event; /* saved to be replayed */ - int evcount; - } sync; + GrabInfoRec coreGrab; /* grab on core events */ + GrabInfoRec deviceGrab; /* grab on device events */ Atom type; char *name; CARD8 id; - CARD8 activatingKey; - Bool fromPassiveGrab; - GrabRec activeGrab; - void (*ActivateGrab) ( - DeviceIntPtr /*device*/, - GrabPtr /*grab*/, - TimeStamp /*time*/, - Bool /*autoGrab*/); - void (*DeactivateGrab)( - DeviceIntPtr /*device*/); KeyClassPtr key; ValuatorClassPtr valuator; ButtonClassPtr button; diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c index 139221f3f..eeb9dec7c 100644 --- a/xkb/xkbEvents.c +++ b/xkb/xkbEvents.c @@ -808,6 +808,7 @@ XkbFilterEvents(ClientPtr pClient,int nEvents,xEvent *xE) int i, button_mask; DeviceIntPtr pXDev = (DeviceIntPtr)LookupKeyboardDevice(); XkbSrvInfoPtr xkbi; +GrabInfoPtr grabinfo; xkbi= pXDev->key->xkbInfo; if ( pClient->xkbClientFlags & _XkbClientInitialized ) { @@ -831,7 +832,9 @@ XkbSrvInfoPtr xkbi; (_XkbIsReleaseEvent(xE[0].u.u.type)) ) { return False; } - if ((pXDev->grab != NullGrab) && pXDev->fromPassiveGrab && + /* just coreGrab is fine, pXDev is inputInfo.keyboard (see above) */ + if ((pXDev->coreGrab.grab != NullGrab) + && pXDev->coreGrab.fromPassiveGrab && ((xE[0].u.u.type==KeyPress)||(xE[0].u.u.type==KeyRelease))) { register unsigned state,flags; From b3b2a6a0d43d1724e04d69588f8a55c3270e5523 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 8 Mar 2007 22:16:17 +1030 Subject: [PATCH 062/634] dix: Check if client has a grab on any other device before mouse/kbd event is delivered to the client. Client's don't cope well with receiving core events from other devices when having a grab on a pointer or keyboard. --- dix/cursor.c | 1 - dix/events.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++ include/dix.h | 5 +++++ 3 files changed, 62 insertions(+), 1 deletion(-) diff --git a/dix/cursor.c b/dix/cursor.c index e44a5efb0..23a2cc916 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -131,7 +131,6 @@ FreeCursor(pointer value, XID cid) } FreeCursorBits(pCurs->bits); xfree( pCurs); - MPXDBG("freeing memory for cursor\n"); return(Success); } diff --git a/dix/events.c b/dix/events.c index 66d63cc3b..f6d643846 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1706,6 +1706,12 @@ DeliverEventsToWindow(DeviceIntPtr pDev, register WindowPtr pWin, xEvent if (filter != CantBeFiltered && !((wOtherEventMasks(pWin)|pWin->eventMask) & filter)) return 0; + + /* core event? check for grab interference */ + if (!(type & EXTENSION_EVENT_BASE) && + IsInterferingGrab(wClient(pWin), pDev, pEvents)) + return 0; + if ( (attempt = TryClientEvents(wClient(pWin), pEvents, count, pWin->eventMask, filter, grab)) ) { @@ -1734,6 +1740,11 @@ DeliverEventsToWindow(DeviceIntPtr pDev, register WindowPtr pWin, xEvent other = (InputClients *)wOtherClients(pWin); for (; other; other = other->next) { + /* core event? check for grab interference */ + if (!(type & EXTENSION_EVENT_BASE) && + IsInterferingGrab(rClient(other), pDev, pEvents)) + continue; + if ( (attempt = TryClientEvents(rClient(other), pEvents, count, other->mask[mskidx], filter, grab)) ) { @@ -4905,3 +4916,49 @@ PickKeyboard(ClientPtr client) return inputInfo.keyboard; } +/* A client that has one or more core grabs does not get core events from + * devices it does not have a grab on. Legacy applications behave bad + * otherwise because they are not used to it and the events interfere. + * Only applies for core events. + * + * Return true if a core event from the device would interfere and should not + * be delivered. + */ +Bool +IsInterferingGrab(ClientPtr client, DeviceIntPtr dev, xEvent* event) +{ + DeviceIntPtr it = inputInfo.devices; + + if (dev->coreGrab.grab && SameClient(dev->coreGrab.grab, client)) + return FALSE; + + switch(event->u.u.type) + { + case KeyPress: + case KeyRelease: + case ButtonPress: + case ButtonRelease: + case MotionNotify: + case EnterNotify: + case LeaveNotify: + break; + default: + return FALSE; + } + + while(it) + { + if (it != dev) + { + if (it->coreGrab.grab && SameClient(it->coreGrab.grab, client)) + { + return TRUE; + + } + } + it = it->next; + } + + return FALSE; +} + diff --git a/include/dix.h b/include/dix.h index f22f48964..56d2f1712 100644 --- a/include/dix.h +++ b/include/dix.h @@ -609,6 +609,11 @@ extern DeviceIntPtr PickPointer( extern DeviceIntPtr PickKeyboard( ClientPtr /* client */); +extern Bool IsInterferingGrab( + ClientPtr /* client */, + DeviceIntPtr /* dev */, + xEvent* /* events */); + #ifdef PANORAMIX extern void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff); #endif From 07806f4081f8dcd3b5733b590eb6e5b4cae734ad Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 9 Mar 2007 15:45:25 +1030 Subject: [PATCH 063/634] Xi: Add SetClientPointer request handling. --- Xi/Makefile.am | 2 + Xi/extinit.c | 5 +++ Xi/setcptr.c | 105 +++++++++++++++++++++++++++++++++++++++++++++++++ Xi/setcptr.h | 39 ++++++++++++++++++ dix/cursor.c | 1 + dix/events.c | 72 ++++++--------------------------- include/dix.h | 10 ++--- 7 files changed, 170 insertions(+), 64 deletions(-) create mode 100644 Xi/setcptr.c create mode 100644 Xi/setcptr.h diff --git a/Xi/Makefile.am b/Xi/Makefile.am index e77c8a382..16d0e8d3f 100644 --- a/Xi/Makefile.am +++ b/Xi/Makefile.am @@ -76,6 +76,8 @@ libXi_la_SOURCES = \ sendexev.h \ setbmap.c \ setbmap.h \ + setcptr.c \ + setcptr.h \ setdval.c \ setdval.h \ setfocus.c \ diff --git a/Xi/extinit.c b/Xi/extinit.c index 598348e13..ff6e4ac0e 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -110,6 +110,7 @@ SOFTWARE. #include "sendexev.h" #include "chgkmap.h" #include "setbmap.h" +#include "setcptr.h" #include "setdval.h" #include "setfocus.h" #include "setmmap.h" @@ -367,6 +368,8 @@ ProcIDispatch(register ClientPtr client) return (ProcXChangeWindowAccess(client)); else if (stuff->data == X_QueryWindowAccess) return ProcXQueryWindowAccess(client); + else if (stuff->data == X_SetClientPointer) + return ProcXSetClientPointer(client); else { SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); } @@ -472,6 +475,8 @@ SProcIDispatch(register ClientPtr client) return (SProcXChangeWindowAccess(client)); else if (stuff->data == X_QueryWindowAccess) return SProcXQueryWindowAccess(client); + else if (stuff->data == X_SetClientPointer) + return SProcXSetClientPointer(client); else { SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); } diff --git a/Xi/setcptr.c b/Xi/setcptr.c new file mode 100644 index 000000000..25874f0a5 --- /dev/null +++ b/Xi/setcptr.c @@ -0,0 +1,105 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +/*********************************************************************** + * + * Request to set the client pointer for the owner of the given window. + * All subsequent calls that are ambiguous will choose the client pointer as + * default value. + */ + + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exevents.h" +#include "exglobals.h" + +#include "setcptr.h" + +int +SProcXSetClientPointer(ClientPtr client) +{ + char n; + + REQUEST(xSetClientPointerReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xSetClientPointerReq); + return (ProcXSetClientPointer(client)); +} + +int +ProcXSetClientPointer(ClientPtr client) +{ + DeviceIntPtr pDev; + WindowPtr pWin; + int err; + + REQUEST(xSetClientPointerReq); + REQUEST_SIZE_MATCH(xSetClientPointerReq); + + + pDev = LookupDeviceIntRec(stuff->deviceid); + if (pDev == NULL || !IsPointerDevice(pDev)) + { + SendErrorToClient(client, IReqCode, X_SetClientPointer, 0, + BadDevice); + return Success; + } + + if (stuff->win != None) + { + err = dixLookupWindow(&pWin, stuff->win, client, DixReadWriteAccess); + if (err != Success) + { + SendErrorToClient(client, IReqCode, X_SetClientPointer, + stuff->win, err); + return Success; + } + } + + if (!SetClientPointer(wClient(pWin), client, pDev)) + { + SendErrorToClient(client, IReqCode, X_SetClientPointer, + stuff->win, BadAccess); + return Success; + } + return Success; +} diff --git a/Xi/setcptr.h b/Xi/setcptr.h new file mode 100644 index 000000000..0c24fd4dd --- /dev/null +++ b/Xi/setcptr.h @@ -0,0 +1,39 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef SETCPTR_H +#define SETCPTR_H 1 + +int SProcXSetClientPointer(ClientPtr /* client */); +int ProcXSetClientPointer(ClientPtr /* client */); + +#endif /* SETCPTR_H */ diff --git a/dix/cursor.c b/dix/cursor.c index 23a2cc916..e44a5efb0 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -131,6 +131,7 @@ FreeCursor(pointer value, XID cid) } FreeCursorBits(pCurs->bits); xfree( pCurs); + MPXDBG("freeing memory for cursor\n"); return(Success); } diff --git a/dix/events.c b/dix/events.c index f6d643846..4e77577a8 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1706,12 +1706,6 @@ DeliverEventsToWindow(DeviceIntPtr pDev, register WindowPtr pWin, xEvent if (filter != CantBeFiltered && !((wOtherEventMasks(pWin)|pWin->eventMask) & filter)) return 0; - - /* core event? check for grab interference */ - if (!(type & EXTENSION_EVENT_BASE) && - IsInterferingGrab(wClient(pWin), pDev, pEvents)) - return 0; - if ( (attempt = TryClientEvents(wClient(pWin), pEvents, count, pWin->eventMask, filter, grab)) ) { @@ -1740,11 +1734,6 @@ DeliverEventsToWindow(DeviceIntPtr pDev, register WindowPtr pWin, xEvent other = (InputClients *)wOtherClients(pWin); for (; other; other = other->next) { - /* core event? check for grab interference */ - if (!(type & EXTENSION_EVENT_BASE) && - IsInterferingGrab(rClient(other), pDev, pEvents)) - continue; - if ( (attempt = TryClientEvents(rClient(other), pEvents, count, other->mask[mskidx], filter, grab)) ) { @@ -4861,11 +4850,22 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) } } +/* + * Set the client pointer for the given client. Second parameter setter could + * be used in the future to determine access rights. Unused for now. + */ +_X_EXPORT Bool +SetClientPointer(ClientPtr client, ClientPtr setter, DeviceIntPtr device) +{ + client->clientPtr = device; + return TRUE; +} + /* PickPointer will pick an appropriate pointer for the given client. * * If a client pointer is set, it will pick the client pointer, otherwise the * first available pointer in the list. If no physical device is attached, it - * will pick the core pointer. + * will pick the core pointer, but will not store it on the client. */ _X_EXPORT DeviceIntPtr PickPointer(ClientPtr client) @@ -4887,7 +4887,7 @@ PickPointer(ClientPtr client) if (!it) { ErrorF("Picking VCP\n"); - client->clientPtr = inputInfo.pointer; + return inputInfo.pointer; } } return client->clientPtr; @@ -4916,49 +4916,3 @@ PickKeyboard(ClientPtr client) return inputInfo.keyboard; } -/* A client that has one or more core grabs does not get core events from - * devices it does not have a grab on. Legacy applications behave bad - * otherwise because they are not used to it and the events interfere. - * Only applies for core events. - * - * Return true if a core event from the device would interfere and should not - * be delivered. - */ -Bool -IsInterferingGrab(ClientPtr client, DeviceIntPtr dev, xEvent* event) -{ - DeviceIntPtr it = inputInfo.devices; - - if (dev->coreGrab.grab && SameClient(dev->coreGrab.grab, client)) - return FALSE; - - switch(event->u.u.type) - { - case KeyPress: - case KeyRelease: - case ButtonPress: - case ButtonRelease: - case MotionNotify: - case EnterNotify: - case LeaveNotify: - break; - default: - return FALSE; - } - - while(it) - { - if (it != dev) - { - if (it->coreGrab.grab && SameClient(it->coreGrab.grab, client)) - { - return TRUE; - - } - } - it = it->next; - } - - return FALSE; -} - diff --git a/include/dix.h b/include/dix.h index 56d2f1712..06dafbb70 100644 --- a/include/dix.h +++ b/include/dix.h @@ -603,17 +603,17 @@ extern int TryClientEvents( extern void WindowsRestructured(void); +extern Bool SetClientPointer( + ClientPtr /* client */, + ClientPtr /* setter */, + DeviceIntPtr /* device */); + extern DeviceIntPtr PickPointer( ClientPtr /* client */); extern DeviceIntPtr PickKeyboard( ClientPtr /* client */); -extern Bool IsInterferingGrab( - ClientPtr /* client */, - DeviceIntPtr /* dev */, - xEvent* /* events */); - #ifdef PANORAMIX extern void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff); #endif From 577464af4362e5a32cf7165b5128655dd86c6200 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 9 Mar 2007 17:13:05 +1030 Subject: [PATCH 064/634] dix: restore commit b3b2a6a0d43d1724e04d69588f8a55c3270e5523 that for some reason got wiped. fix ProcGrabKeyboard to use PickKeyboard fix PickKeyboard to actually work. --- dix/events.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++---- include/dix.h | 5 ++++ 2 files changed, 67 insertions(+), 5 deletions(-) diff --git a/dix/events.c b/dix/events.c index 4e77577a8..b4b929f6c 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1706,6 +1706,11 @@ DeliverEventsToWindow(DeviceIntPtr pDev, register WindowPtr pWin, xEvent if (filter != CantBeFiltered && !((wOtherEventMasks(pWin)|pWin->eventMask) & filter)) return 0; + + if (!(type & EXTENSION_EVENT_BASE) && + IsInterferingGrab(wClient(pWin), pDev, pEvents)) + return 0; + if ( (attempt = TryClientEvents(wClient(pWin), pEvents, count, pWin->eventMask, filter, grab)) ) { @@ -1734,6 +1739,11 @@ DeliverEventsToWindow(DeviceIntPtr pDev, register WindowPtr pWin, xEvent other = (InputClients *)wOtherClients(pWin); for (; other; other = other->next) { + /* core event? check for grab interference */ + if (!(type & EXTENSION_EVENT_BASE) && + IsInterferingGrab(rClient(other), pDev, pEvents)) + continue; + if ( (attempt = TryClientEvents(rClient(other), pEvents, count, other->mask[mskidx], filter, grab)) ) { @@ -4144,11 +4154,12 @@ ProcGrabKeyboard(ClientPtr client) xGrabKeyboardReply rep; REQUEST(xGrabKeyboardReq); int result; + DeviceIntPtr keyboard = PickKeyboard(client); REQUEST_SIZE_MATCH(xGrabKeyboardReq); - if (XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE)) - result = GrabDevice(client, inputInfo.keyboard, stuff->keyboardMode, + if (XaceHook(XACE_DEVICE_ACCESS, client, keyboard, TRUE)) + result = GrabDevice(client, keyboard, stuff->keyboardMode, stuff->pointerMode, stuff->grabWindow, stuff->ownerEvents, stuff->time, KeyPressMask | KeyReleaseMask, &rep.status); @@ -4169,7 +4180,7 @@ ProcGrabKeyboard(ClientPtr client) int ProcUngrabKeyboard(ClientPtr client) { - DeviceIntPtr device = inputInfo.keyboard; + DeviceIntPtr device = PickKeyboard(client); GrabPtr grab; TimeStamp time; REQUEST(xResourceReq); @@ -4902,8 +4913,8 @@ PickPointer(ClientPtr client) _X_EXPORT DeviceIntPtr PickKeyboard(ClientPtr client) { - DeviceIntPtr dev; - DeviceIntPtr ptr = inputInfo.devices; + DeviceIntPtr ptr; + DeviceIntPtr dev = inputInfo.devices; ptr = PickPointer(client); while(dev) @@ -4916,3 +4927,49 @@ PickKeyboard(ClientPtr client) return inputInfo.keyboard; } +/* A client that has one or more core grabs does not get core events from + * devices it does not have a grab on. Legacy applications behave bad + * otherwise because they are not used to it and the events interfere. + * Only applies for core events. + * + * Return true if a core event from the device would interfere and should not + * be delivered. + */ +Bool +IsInterferingGrab(ClientPtr client, DeviceIntPtr dev, xEvent* event) +{ + DeviceIntPtr it = inputInfo.devices; + + if (dev->coreGrab.grab && SameClient(dev->coreGrab.grab, client)) + return FALSE; + + switch(event->u.u.type) + { + case KeyPress: + case KeyRelease: + case ButtonPress: + case ButtonRelease: + case MotionNotify: + case EnterNotify: + case LeaveNotify: + break; + default: + return FALSE; + } + + while(it) + { + if (it != dev) + { + if (it->coreGrab.grab && SameClient(it->coreGrab.grab, client)) + { + return TRUE; + + } + } + it = it->next; + } + + return FALSE; +} + diff --git a/include/dix.h b/include/dix.h index 06dafbb70..57cdce33d 100644 --- a/include/dix.h +++ b/include/dix.h @@ -614,6 +614,11 @@ extern DeviceIntPtr PickPointer( extern DeviceIntPtr PickKeyboard( ClientPtr /* client */); +extern Bool IsInterferingGrab( + ClientPtr /* client */, + DeviceIntPtr /* dev */, + xEvent* /* events */); + #ifdef PANORAMIX extern void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff); #endif From ce9409acebd994cf1809050f2cc8e1db66130f12 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 13 Mar 2007 19:16:56 +1030 Subject: [PATCH 065/634] dix: Get the state from the paired device and the real device to fill the state field in the event, rather than using the virtual devices. ProcessPointerEvent: name argument "device" instead of "other". Add GetPairedKeyboard(). --- Xi/exevents.c | 89 +++++++++++++++++++++++++++++-------------------- dix/devices.c | 17 ++++++++++ dix/events.c | 14 +++----- include/input.h | 1 + 4 files changed, 75 insertions(+), 46 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 6cedafb50..bc2618968 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -113,29 +113,46 @@ RegisterOtherDevice(DeviceIntPtr device) } /*ARGSUSED*/ void -ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) +ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) { BYTE *kptr; int i; CARD16 modifiers; CARD16 mask; - GrabPtr grab = other->deviceGrab.grab; + GrabPtr grab = device->deviceGrab.grab; Bool deactivateDeviceGrab = FALSE; int key = 0, bit = 0, rootX, rootY; - ButtonClassPtr b = other->button; - KeyClassPtr k = other->key; - ValuatorClassPtr v = other->valuator; + ButtonClassPtr b = device->button; + KeyClassPtr k = device->key; + ValuatorClassPtr v = device->valuator; deviceValuator *xV = (deviceValuator *) xE; - if (xE->u.u.type != DeviceValuator) { - GetSpritePosition(other, &rootX, &rootY); + DeviceIntPtr mouse = NULL, kbd = NULL; + GetSpritePosition(device, &rootX, &rootY); xE->u.keyButtonPointer.rootX = rootX; xE->u.keyButtonPointer.rootY = rootY; key = xE->u.u.detail; NoticeEventTime(xE); - xE->u.keyButtonPointer.state = inputInfo.keyboard->key->state | - inputInfo.pointer->button->state; /* FIXME: change for MPX */ + + /* If 'device' is a pointer device, we need to get the paired keyboard + * for the state. If there is none, the kbd bits of state are 0. + * If 'device' is a keyboard device, get the paired pointer and use the + * pointer's state for the button bits. + */ + if (IsPointerDevice(device)) + { + kbd = GetPairedKeyboard(device); + mouse = device; + } + else + { + mouse = GetPairedPointer(device); + kbd = device; + } + xE->u.keyButtonPointer.state = (kbd) ? (kbd->key->state) : 0; + xE->u.keyButtonPointer.state |= (mouse) ? (mouse->button->state) : 0; + bit = 1 << (key & 7); } if (DeviceEventCallback) { @@ -155,7 +172,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) || (xV->num_valuators && (first + xV->num_valuators > v->numAxes)))) FatalError("Bad valuators reported for device %s\n", - other->name); + device->name); xV->device_state = 0; if (k) xV->device_state |= k->state; @@ -192,15 +209,15 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) if (*kptr & bit) { /* allow ddx to generate multiple downs */ if (!modifiers) { xE->u.u.type = DeviceKeyRelease; - ProcessOtherEvent(xE, other, count); + ProcessOtherEvent(xE, device, count); xE->u.u.type = DeviceKeyPress; /* release can have side effects, don't fall through */ - ProcessOtherEvent(xE, other, count); + ProcessOtherEvent(xE, device, count); } return; } - if (other->valuator) - other->valuator->motionHintWindow = NullWindow; + if (device->valuator) + device->valuator->motionHintWindow = NullWindow; *kptr |= bit; k->prev_state = k->state; for (i = 0, mask = 1; modifiers; i++, mask <<= 1) { @@ -211,8 +228,8 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) modifiers &= ~mask; } } - if (!grab && CheckDeviceGrabs(other, xE, 0, count)) { - other->deviceGrab.activatingKey = key; + if (!grab && CheckDeviceGrabs(device, xE, 0, count)) { + device->deviceGrab.activatingKey = key; return; } } else if (xE->u.u.type == DeviceKeyRelease) { @@ -223,8 +240,8 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) if (!(*kptr & bit)) /* guard against duplicates */ return; modifiers = k->modifierMap[key]; - if (other->valuator) - other->valuator->motionHintWindow = NullWindow; + if (device->valuator) + device->valuator->motionHintWindow = NullWindow; *kptr &= ~bit; k->prev_state = k->state; for (i = 0, mask = 1; modifiers; i++, mask <<= 1) { @@ -238,9 +255,9 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) } } - if (other->deviceGrab.fromPassiveGrab && - !other->deviceGrab.grab->coreGrab && - (key == other->deviceGrab.activatingKey)) + if (device->deviceGrab.fromPassiveGrab && + !device->deviceGrab.grab->coreGrab && + (key == device->deviceGrab.activatingKey)) deactivateDeviceGrab = TRUE; } else if (xE->u.u.type == DeviceButtonPress) { if (!b) @@ -248,8 +265,8 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) kptr = &b->down[key >> 3]; *kptr |= bit; - if (other->valuator) - other->valuator->motionHintWindow = NullWindow; + if (device->valuator) + device->valuator->motionHintWindow = NullWindow; b->buttonsDown++; b->motionMask = DeviceButtonMotionMask; xE->u.u.detail = b->map[key]; @@ -259,7 +276,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) b->state |= (Button1Mask >> 1) << xE->u.u.detail; SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify); if (!grab) - if (CheckDeviceGrabs(other, xE, 0, count)) + if (CheckDeviceGrabs(device, xE, 0, count)) return; } else if (xE->u.u.type == DeviceButtonRelease) { @@ -268,8 +285,8 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) kptr = &b->down[key >> 3]; *kptr &= ~bit; - if (other->valuator) - other->valuator->motionHintWindow = NullWindow; + if (device->valuator) + device->valuator->motionHintWindow = NullWindow; if (!--b->buttonsDown) b->motionMask = 0; xE->u.u.detail = b->map[key]; @@ -279,24 +296,24 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) b->state &= ~((Button1Mask >> 1) << xE->u.u.detail); SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify); if (!b->state - && other->deviceGrab.fromPassiveGrab - && !other->deviceGrab.grab->coreGrab) + && device->deviceGrab.fromPassiveGrab + && !device->deviceGrab.grab->coreGrab) deactivateDeviceGrab = TRUE; } else if (xE->u.u.type == ProximityIn) - other->valuator->mode &= ~OutOfProximity; + device->valuator->mode &= ~OutOfProximity; else if (xE->u.u.type == ProximityOut) - other->valuator->mode |= OutOfProximity; + device->valuator->mode |= OutOfProximity; if (grab) - DeliverGrabbedEvent(xE, other, deactivateDeviceGrab, count); - else if (other->focus) - DeliverFocusedEvent(other, xE, GetSpriteWindow(other), count); + DeliverGrabbedEvent(xE, device, deactivateDeviceGrab, count); + else if (device->focus) + DeliverFocusedEvent(device, xE, GetSpriteWindow(device), count); else - DeliverDeviceEvents(GetSpriteWindow(other), xE, NullGrab, NullWindow, - other, count); + DeliverDeviceEvents(GetSpriteWindow(device), xE, NullGrab, NullWindow, + device, count); if (deactivateDeviceGrab == TRUE) - (*other->deviceGrab.DeactivateGrab) (other); + (*device->deviceGrab.DeactivateGrab) (device); } _X_EXPORT int diff --git a/dix/devices.c b/dix/devices.c index 05a03b572..6c177863c 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2030,6 +2030,23 @@ GetPairedPointer(DeviceIntPtr kbd) return inputInfo.pointer; } +/* Find the keyboard device that is paired with the given pointer. If none is + * found, return NULL. + */ +_X_EXPORT DeviceIntPtr +GetPairedKeyboard(DeviceIntPtr ptr) +{ + DeviceIntPtr dev = inputInfo.devices; + + while(dev) + { + if (ptr->pSprite == dev->pSprite) + return dev; + dev = dev->next; + } + return dev; +} + /* * Register a client to be able to pair devices. */ diff --git a/dix/events.c b/dix/events.c index b4b929f6c..fbbae1de9 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4913,18 +4913,12 @@ PickPointer(ClientPtr client) _X_EXPORT DeviceIntPtr PickKeyboard(ClientPtr client) { - DeviceIntPtr ptr; - DeviceIntPtr dev = inputInfo.devices; - ptr = PickPointer(client); + DeviceIntPtr ptr = PickPointer(client); + DeviceIntPtr kbd; - while(dev) - { - if (ptr->pSprite == dev->pSprite) - return dev; - dev = dev->next; - } + kbd = GetPairedKeyboard(ptr); - return inputInfo.keyboard; + return (kbd) ? kbd : inputInfo.keyboard; } /* A client that has one or more core grabs does not get core events from diff --git a/include/input.h b/include/input.h index 2d72f838b..765d71dc3 100644 --- a/include/input.h +++ b/include/input.h @@ -451,6 +451,7 @@ extern int PairDevices(ClientPtr client, DeviceIntPtr keyboard); extern DeviceIntPtr GetPairedPointer(DeviceIntPtr kbd); +extern DeviceIntPtr GetPairedKeyboard(DeviceIntPtr ptr); extern Bool RegisterPairingClient(ClientPtr client); extern Bool UnregisterPairingClient(ClientPtr client); From c3eb248cf93a3afd9168acfb88254606beddd7a8 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 14 Mar 2007 13:21:33 +1030 Subject: [PATCH 066/634] dix: fix: don't skip first item in list when seeking for a device cursor. --- dix/window.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dix/window.c b/dix/window.c index 3d7972812..6c3558343 100644 --- a/dix/window.c +++ b/dix/window.c @@ -3930,6 +3930,7 @@ CursorPtr WindowGetDeviceCursor(WindowPtr pWin, DeviceIntPtr pDev) /* Searches for a DevCursorNode for the given window and device. If one is * found, return True and set pNode and pPrev to the node and to the node * before the node respectively. Otherwise return False. + * If the device is the first in list, pPrev is set to NULL. */ static Bool WindowSeekDeviceCursor(WindowPtr pWin, @@ -3943,6 +3944,14 @@ WindowSeekDeviceCursor(WindowPtr pWin, return FALSE; pList = pWin->optional->deviceCursors; + + if (pList && pList->dev == pDev) + { + *pNode = pList; + *pPrev = NULL; + return TRUE; + } + while(pList) { if (pList->next) From c5b07fb717289f61b54d7b093421bcb92124b839 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 14 Mar 2007 17:42:30 +1030 Subject: [PATCH 067/634] kdrive: update kdrive to new mi API with additional device argument. Includes an update of ati_cursor.c and i810_cursor.c --- autogen.sh | 2 +- hw/kdrive/ati/ati_cursor.c | 20 +++++++++++--------- hw/kdrive/ephyr/ephyrinit.c | 8 ++++---- hw/kdrive/i810/i810_cursor.c | 11 ++++++----- hw/kdrive/src/kinput.c | 6 +++--- 5 files changed, 25 insertions(+), 22 deletions(-) diff --git a/autogen.sh b/autogen.sh index 1176abd5b..66acd288d 100755 --- a/autogen.sh +++ b/autogen.sh @@ -9,4 +9,4 @@ cd $srcdir autoreconf -v --install || exit 1 cd $ORIGDIR || exit $? -$srcdir/configure --enable-maintainer-mode --disable-dmx "$@" +$srcdir/configure --enable-maintainer-mode --disable-dmx --enable-kdrive "$@" diff --git a/hw/kdrive/ati/ati_cursor.c b/hw/kdrive/ati/ati_cursor.c index e8c711707..082062d3d 100644 --- a/hw/kdrive/ati/ati_cursor.c +++ b/hw/kdrive/ati/ati_cursor.c @@ -28,9 +28,10 @@ #include "ati_reg.h" #include "cursorstr.h" #include "ati_draw.h" +#include "inputstr.h" static void -ATIMoveCursor(ScreenPtr pScreen, int x, int y) +ATIMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { KdScreenPriv(pScreen); ATICardInfo(pScreenPriv); @@ -360,7 +361,7 @@ ATIUnloadCursor(ScreenPtr pScreen) } static Bool -ATIRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) +ATIRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { KdScreenPriv(pScreen); ATICardInfo(pScreenPriv); @@ -375,26 +376,26 @@ ATIRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) { int x, y; - miPointerPosition(&x, &y); + miPointerGetPosition(pDev, &x, &y); if (atic->is_radeon) RadeonLoadCursor (pScreen); else ClassicLoadCursor(pScreen); /* Move to new position */ - ATIMoveCursor(pScreen, x, y); + ATIMoveCursor(pDev, pScreen, x, y); } return TRUE; } static Bool -ATIUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) +ATIUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { return TRUE; } static void -ATISetCursor(ScreenPtr pScreen, CursorPtr pCursor, int x, int y) +ATISetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y) { KdScreenPriv(pScreen); ATICardInfo(pScreenPriv); @@ -413,7 +414,7 @@ ATISetCursor(ScreenPtr pScreen, CursorPtr pCursor, int x, int y) else ClassicLoadCursor(pScreen); /* Move to new position */ - ATIMoveCursor(pScreen, x, y); + ATIMoveCursor(pDev, pScreen, x, y); } else ATIUnloadCursor(pScreen); @@ -465,6 +466,7 @@ ATICursorSave(ScreenPtr pScreen, KdOffscreenArea *area) void ATICursorEnable(ScreenPtr pScreen) { + DeviceIntPtr pDev = inputInfo.pointer; KdScreenPriv(pScreen); ATICardInfo(pScreenPriv); ATIScreenInfo(pScreenPriv); @@ -489,13 +491,13 @@ ATICursorEnable(ScreenPtr pScreen) if (pCurPriv->pCursor) { int x, y; - miPointerPosition(&x, &y); + miPointerGetPosition(pDev, &x, &y); if (atic->is_radeon) RadeonLoadCursor(pScreen); else ClassicLoadCursor(pScreen); /* Move to new position */ - ATIMoveCursor(pScreen, x, y); + ATIMoveCursor(pDev, pScreen, x, y); } else ATIUnloadCursor(pScreen); diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c index a77b87e5e..8310f6590 100644 --- a/hw/kdrive/ephyr/ephyrinit.c +++ b/hw/kdrive/ephyr/ephyrinit.c @@ -151,25 +151,25 @@ OsVendorInit (void) /* 'Fake' cursor stuff, could be improved */ static Bool -ephyrRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) +ephyrRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { return TRUE; } static Bool -ephyrUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) +ephyrUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { return TRUE; } static void -ephyrSetCursor(ScreenPtr pScreen, CursorPtr pCursor, int x, int y) +ephyrSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y) { ; } static void -ephyrMoveCursor(ScreenPtr pScreen, int x, int y) +ephyrMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { ; } diff --git a/hw/kdrive/i810/i810_cursor.c b/hw/kdrive/i810/i810_cursor.c index cf4f717f2..d361bf077 100644 --- a/hw/kdrive/i810/i810_cursor.c +++ b/hw/kdrive/i810/i810_cursor.c @@ -78,6 +78,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "kxv.h" #include "i810.h" #include "cursorstr.h" +#include "inputstr.h" #define SetupCursor(s) KdScreenPriv(pScreen); \ i810CardInfo(pScreenPriv); \ @@ -129,7 +130,7 @@ _i810MoveCursor(ScreenPtr pScreen, int x, int y) static void i810LoadCursor(ScreenPtr pScreen, int x, int y); static void -i810MoveCursor (ScreenPtr pScreen, int x, int y) +i810MoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { KdScreenPriv(pScreen); i810ScreenInfo(pScreenPriv); @@ -281,7 +282,7 @@ i810UnloadCursor(ScreenPtr pScreen) static Bool -i810RealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) +i810RealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { KdScreenPriv(pScreen); i810ScreenInfo(pScreenPriv); @@ -297,7 +298,7 @@ i810RealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) { int x, y; - miPointerPosition (&x, &y); + miPointerGetPosition (pDev, &x, &y); i810LoadCursor (pScreen, x, y); } } @@ -305,13 +306,13 @@ i810RealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) } static Bool -i810UnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) +i810UnrealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { return TRUE; } static void -i810SetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y) +i810SetCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y) { KdScreenPriv(pScreen); i810ScreenInfo(pScreenPriv); diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index 3bf6bad2b..23fede246 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -2219,11 +2219,11 @@ KdCrossScreen(ScreenPtr pScreen, Bool entering) int KdCurScreen; /* current event screen */ static void -KdWarpCursor (ScreenPtr pScreen, int x, int y) +KdWarpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { KdBlockSigio (); KdCurScreen = pScreen->myNum; - miPointerWarpCursor (pScreen, x, y); + miPointerWarpCursor(pDev, pScreen, x, y); KdUnblockSigio (); } @@ -2238,7 +2238,7 @@ void ProcessInputEvents () { mieqProcessInputEvents(); - miPointerUpdate(); + miPointerUpdateSprite(inputInfo.pointer); if (kdSwitchPending) KdProcessSwitch (); KdCheckLock (); From 456f429ad655ab4d80e30c58291d801966a613b2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 15 Mar 2007 21:48:19 +1030 Subject: [PATCH 068/634] dix: fix: don't return when device is same as argument. fix: set access default rule to 0 on init. --- dix/devices.c | 2 +- dix/window.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index 6c177863c..42eebf104 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2040,7 +2040,7 @@ GetPairedKeyboard(DeviceIntPtr ptr) while(dev) { - if (ptr->pSprite == dev->pSprite) + if (ptr != dev && ptr->pSprite == dev->pSprite) return dev; dev = dev->next; } diff --git a/dix/window.c b/dix/window.c index 6c3558343..38bd74fe7 100644 --- a/dix/window.c +++ b/dix/window.c @@ -3721,6 +3721,7 @@ MakeWindowOptional (register WindowPtr pWin) optional->access.ndeny = 0; optional->access.perm = NULL; optional->access.deny = NULL; + optional->access.defaultRule = 0; parentOptional = FindWindowWithOptional(pWin)->optional; optional->visual = parentOptional->visual; if (!pWin->cursorIsNone) From 65b0eb60b0b9e6405aa2e3d4c712ec4d2f0da070 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 16 Mar 2007 15:52:24 +1030 Subject: [PATCH 069/634] Xi: move IsPointerDevice into dix. dix: IsPointerDevice and IsKeyboardDevice, use same ways to identify type of device as XI does for the XListInputDevices reply. Autopair each non-pointer device with VCP when activating, pair with real device after activation. Don't return non-keyboard devices when calling GetPairedKeyboard or PickKeyboard, otherwise we segfault for 'evdev brain'. --- Xi/extinit.c | 15 --------------- dix/devices.c | 15 +++++++++++++-- dix/events.c | 32 ++++++++++++++++++++++++++++++-- hw/xfree86/common/xf86Xinput.c | 11 +++-------- include/dix.h | 3 +++ include/extinit.h | 4 ---- 6 files changed, 49 insertions(+), 31 deletions(-) diff --git a/Xi/extinit.c b/Xi/extinit.c index ff6e4ac0e..672d333e1 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -983,21 +983,6 @@ AssignTypeAndName(DeviceIntPtr dev, Atom type, char *name) strcpy(dev->name, name); } -/*********************************************************************** - * - * Returns true if a device may require a pointer (is a mouse). - * FIXME: Other devices should be able to get a pointer too... - * - */ -_X_EXPORT Bool -IsPointerDevice(DeviceIntPtr dev) -{ - if (dev_type[1].type == dev->type) - return TRUE; - - return FALSE; -} - /*********************************************************************** * * Make device type atoms. diff --git a/dix/devices.c b/dix/devices.c index 42eebf104..0c1553e85 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -221,6 +221,11 @@ ActivateDevice(DeviceIntPtr dev) SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask, (xEvent *) &ev, 1); + if (IsPointerDevice(dev) && dev->isMPDev) + InitializeSprite(dev, GetCurrentRootWindow()); + else + PairDevices(NULL, inputInfo.pointer, dev); + return ret; } @@ -403,7 +408,6 @@ InitCoreDevices() inputInfo.pointer = dev; inputInfo.pointer->next = NULL; - /* the core keyboard is initialised by now. set the keyboard's sprite * to the core pointer's sprite. */ PairDevices(pairingClient, inputInfo.pointer, inputInfo.keyboard); @@ -1995,6 +1999,9 @@ ProcQueryKeymap(ClientPtr client) int PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd) { + if (!ptr) + return BadDevice; + if (!pairingClient) RegisterPairingClient(client); else if (pairingClient != client) @@ -2032,6 +2039,8 @@ GetPairedPointer(DeviceIntPtr kbd) /* Find the keyboard device that is paired with the given pointer. If none is * found, return NULL. + * We also check if the paired device is a keyboard. If not (e.g. evdev brain) + * we don't return it. This probably needs to be fixed. */ _X_EXPORT DeviceIntPtr GetPairedKeyboard(DeviceIntPtr ptr) @@ -2040,7 +2049,9 @@ GetPairedKeyboard(DeviceIntPtr ptr) while(dev) { - if (ptr != dev && ptr->pSprite == dev->pSprite) + if (ptr != dev && + IsKeyboardDevice(dev) && + ptr->pSprite == dev->pSprite) return dev; dev = dev->next; } diff --git a/dix/events.c b/dix/events.c index fbbae1de9..ca12d2285 100644 --- a/dix/events.c +++ b/dix/events.c @@ -250,6 +250,27 @@ DevHasCursor(DeviceIntPtr pDev) return (pDev != inputInfo.pointer && pDev->spriteOwner); } +/* + * Return true if a device is a pointer, check is the same as used by XI to + * fill the 'use' field. + */ +_X_EXPORT Bool +IsPointerDevice(DeviceIntPtr dev) +{ + return ((dev->valuator && dev->button) || dev == inputInfo.pointer); +} + +/* + * Return true if a device is a keyboard, check is the same as used by XI to + * fill the 'use' field. + */ +_X_EXPORT Bool +IsKeyboardDevice(DeviceIntPtr dev) +{ + return ((dev->key && dev->kbdfeed) || dev == inputInfo.keyboard); +} + + #ifdef XEVIE _X_EXPORT WindowPtr xeviewin; _X_EXPORT HotSpot xeviehot; @@ -4914,9 +4935,16 @@ _X_EXPORT DeviceIntPtr PickKeyboard(ClientPtr client) { DeviceIntPtr ptr = PickPointer(client); - DeviceIntPtr kbd; + DeviceIntPtr kbd = inputInfo.devices; - kbd = GetPairedKeyboard(ptr); + while(kbd) + { + if (ptr != kbd && + IsKeyboardDevice(kbd) && + ptr->pSprite == kbd->pSprite) + return kbd; + kbd = kbd->next; + } return (kbd) ? kbd : inputInfo.keyboard; } diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index c6d6b360e..db3998025 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -186,14 +186,6 @@ xf86ActivateDevice(LocalDevicePtr local) } #endif - /* Only create a new sprite if it's a non-shared pointer */ - if (IsPointerDevice(dev) && dev->isMPDev) - InitializeSprite(dev, GetCurrentRootWindow()); - else { - /* pair with a free device */ - PairDevices(NULL, GuessFreePointerDevice(), dev); - } - RegisterOtherDevice(dev); if (serverGeneration == 1) @@ -426,6 +418,9 @@ NewInputDeviceRequest (InputOption *options) if (dev->inited && dev->startup) EnableDevice(dev); + if (!IsPointerDevice(dev)) + PairDevices(NULL, GuessFreePointerDevice(), dev); + /* send enter/leave event, update sprite window */ CheckMotion(NULL, dev); diff --git a/include/dix.h b/include/dix.h index 57cdce33d..44862ad23 100644 --- a/include/dix.h +++ b/include/dix.h @@ -757,4 +757,7 @@ extern int ffs(int i); extern Bool DevHasCursor(DeviceIntPtr pDev); +extern Bool IsPointerDevice( DeviceIntPtr dev); +extern Bool IsKeyboardDevice(DeviceIntPtr dev); + #endif /* DIX_H */ diff --git a/include/extinit.h b/include/extinit.h index d7aa54137..ead59be24 100644 --- a/include/extinit.h +++ b/include/extinit.h @@ -149,10 +149,6 @@ AssignTypeAndName ( char * /* name */ ); -Bool IsPointerDevice( - DeviceIntPtr /* dev */ - ); - void MakeDeviceTypeAtoms ( void From b167583fe234a536aa6187e17f21da85be4f0b7f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 15 Nov 2006 17:50:02 +1030 Subject: [PATCH 070/634] o fix minor error in comment for GetPointerEvents() --- dix/getevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/getevents.c b/dix/getevents.c index 935112d85..77d1e2106 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -470,7 +470,7 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type, /** - * Generate a series of xEvents (returned in xE) representing pointer + * Generate a series of xEvents (returned in events) representing pointer * motion, or button presses. Xi and XKB-aware. * * events is not NULL-terminated; the return value is the number of events. From 0acf993e2878d0866fd4e2db8252c1ea6841e494 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 19 Mar 2007 16:11:01 +1030 Subject: [PATCH 071/634] dix: Move sprite initalization/pairing from ActivateDevice to EnableDevice. zero out spriteTrace, otherwise GetCurrentRootWindow() may return invalid data. Evdev adds previously hotplugged devices on its own when rescanning, and ActivateDevice does not get called for those devices. Sprites need to be initialized or paired before the device gets started, so the safest place to do so is EnableDevice (which actually does get called by the evdev driver). --- dix/devices.c | 11 +++++------ dix/events.c | 5 +++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 927d16e8d..579203f1f 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -173,6 +173,11 @@ EnableDevice(DeviceIntPtr dev) dev->enabled = TRUE; *prev = dev->next; + if (IsPointerDevice(dev) && dev->isMPDev) + InitializeSprite(dev, GetCurrentRootWindow()); + else + PairDevices(NULL, inputInfo.pointer, dev); + for (prev = &inputInfo.devices; *prev; prev = &(*prev)->next) ; *prev = dev; @@ -221,11 +226,6 @@ ActivateDevice(DeviceIntPtr dev) SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask, (xEvent *) &ev, 1); - if (IsPointerDevice(dev) && dev->isMPDev) - InitializeSprite(dev, GetCurrentRootWindow()); - else - PairDevices(NULL, inputInfo.pointer, dev); - return ret; } @@ -448,7 +448,6 @@ InitAndStartDevices() PairDevices(NULL, GuessFreePointerDevice(), dev); } - return Success; } diff --git a/dix/events.c b/dix/events.c index dc9c4e507..c9b5a4f32 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4290,6 +4290,11 @@ InitEvents() { spriteTraceSize = 32; spriteTrace = (WindowPtr *)xalloc(32*sizeof(WindowPtr)); + /* FIXME: spriteTrace[0] needs to be NULL, otherwise + * GetCurrentRootWindow() in EnableDevice() may return a invalid + * value. (whot) + */ + memset(spriteTrace, 0, 32 * sizeof(WindowPtr)); if (!spriteTrace) FatalError("failed to allocate spriteTrace"); } From f8cd19bd1692d12a6047c088a626a6ae715d469d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 22 Mar 2007 17:47:01 +1030 Subject: [PATCH 072/634] Xi: add GetClientPointer and GetPointerPairing requests. dix: use PickKeyboard for ProcSetInputFocus and ProcGetInputFocus instead of the core keyboard. --- Xi/Makefile.am | 4 ++ Xi/extinit.c | 14 +++++++ Xi/getcptr.c | 111 +++++++++++++++++++++++++++++++++++++++++++++++++ Xi/getcptr.h | 43 +++++++++++++++++++ Xi/getpairp.c | 110 ++++++++++++++++++++++++++++++++++++++++++++++++ Xi/getpairp.h | 45 ++++++++++++++++++++ Xi/querydp.c | 1 + dix/cursor.c | 1 - dix/events.c | 6 ++- 9 files changed, 332 insertions(+), 3 deletions(-) create mode 100644 Xi/getcptr.c create mode 100644 Xi/getcptr.h create mode 100644 Xi/getpairp.c create mode 100644 Xi/getpairp.h diff --git a/Xi/Makefile.am b/Xi/Makefile.am index 16d0e8d3f..9b1253e0b 100644 --- a/Xi/Makefile.am +++ b/Xi/Makefile.am @@ -32,6 +32,8 @@ libXi_la_SOURCES = \ extinit.c \ getbmap.c \ getbmap.h \ + getcptr.c \ + getcptr.h \ getdctl.c \ getdctl.h \ getfctl.c \ @@ -42,6 +44,8 @@ libXi_la_SOURCES = \ getkmap.h \ getmmap.c \ getmmap.h \ + getpairp.c \ + getpairp.h \ getprop.c \ getprop.h \ getselev.c \ diff --git a/Xi/extinit.c b/Xi/extinit.c index 672d333e1..3766a9516 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -86,11 +86,13 @@ SOFTWARE. #include "devbell.h" #include "getbmap.h" #include "getbmap.h" +#include "getcptr.h" #include "getdctl.h" #include "getfctl.h" #include "getfocus.h" #include "getkmap.h" #include "getmmap.h" +#include "getpairp.h" #include "getprop.h" #include "getselev.h" #include "getvers.h" @@ -370,6 +372,10 @@ ProcIDispatch(register ClientPtr client) return ProcXQueryWindowAccess(client); else if (stuff->data == X_SetClientPointer) return ProcXSetClientPointer(client); + else if (stuff->data == X_GetClientPointer) + return ProcXGetClientPointer(client); + else if (stuff->data == X_GetPairedPointer) + return ProcXGetPairedPointer(client); else { SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); } @@ -477,6 +483,10 @@ SProcIDispatch(register ClientPtr client) return SProcXQueryWindowAccess(client); else if (stuff->data == X_SetClientPointer) return SProcXSetClientPointer(client); + else if (stuff->data == X_GetClientPointer) + return SProcXGetClientPointer(client); + else if (stuff->data == X_GetPairedPointer) + return SProcXGetPairedPointer(client); else { SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); } @@ -561,6 +571,10 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep) else if (rep->RepType == X_QueryWindowAccess) SRepXQueryWindowAccess(client, len, (xQueryWindowAccessReply*) rep); + else if (rep->RepType == X_GetClientPointer) + SRepXGetClientPointer(client, len, (xGetClientPointerReply*) rep); + else if (rep->RepType == X_GetPairedPointer) + SRepXGetPairedPointer(client, len, (xGetPairedPointerReply*) rep); else { FatalError("XINPUT confused sending swapped reply"); } diff --git a/Xi/getcptr.c b/Xi/getcptr.c new file mode 100644 index 000000000..d9ca4d360 --- /dev/null +++ b/Xi/getcptr.c @@ -0,0 +1,111 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exevents.h" +#include "exglobals.h" + +#include "getcptr.h" + +/*********************************************************************** + * This procedure allows a client to query another client's client pointer + * setting. + */ + +int +SProcXGetClientPointer(ClientPtr client) +{ + char n; + REQUEST(xGetClientPointerReq); + + swaps(&stuff->length, n); + swapl(&stuff->win, n); + return ProcXGetClientPointer(client); +} + +int ProcXGetClientPointer(ClientPtr client) +{ + int err; + WindowPtr win; + ClientPtr winclient; + xGetClientPointerReply rep; + REQUEST(xGetClientPointerReq); + REQUEST_SIZE_MATCH(xGetClientPointerReq); + + err = dixLookupWindow(&win, stuff->win, client, DixReadAccess); + if (err != Success) + { + SendErrorToClient(client, IReqCode, X_GetClientPointer, + stuff->win, err); + return Success; + } + + winclient = wClient(win); + + rep.repType = X_Reply; + rep.RepType = X_GetClientPointer; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.set = (winclient->clientPtr != NULL); + rep.deviceid = (winclient->clientPtr) ? winclient->clientPtr->id : 0; + + WriteReplyToClient(client, sizeof(xGetClientPointerReply), &rep); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XGetClientPointer function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGetClientPointer(ClientPtr client, int size, + xGetClientPointerReply* rep) +{ + char n; + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + WriteToClient(client, size, (char *)rep); +} + diff --git a/Xi/getcptr.h b/Xi/getcptr.h new file mode 100644 index 000000000..456d1bac2 --- /dev/null +++ b/Xi/getcptr.h @@ -0,0 +1,43 @@ +/************************************************************ + +Copyright 2007 by Peter Hutterer + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef GETCPTR_H +#define GETCPTR_H 1 +int SProcXGetClientPointer(ClientPtr /* client */ + ); + +int ProcXGetClientPointer(ClientPtr /* client */ + ); + +void SRepXGetClientPointer(ClientPtr /* client */, + int /* size */, + xGetClientPointerReply* /* rep */ + ); + +#endif /* GETCPTR_H */ diff --git a/Xi/getpairp.c b/Xi/getpairp.c new file mode 100644 index 000000000..4f1ff0316 --- /dev/null +++ b/Xi/getpairp.c @@ -0,0 +1,110 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exevents.h" +#include "exglobals.h" + +#ifdef PANORAMIX +#include "panoramiXsrv.h" +#endif + +#include "getpairp.h" + +/*********************************************************************** + * + * This procedure allows a client to query the paired pointer for a keyboard + * device. + * + */ + +int +SProcXGetPairedPointer(ClientPtr client) +{ + char n; + REQUEST(xGetPairedPointerReq); + swaps(&stuff->length, n); + return (ProcXGetPairedPointer(client)); +} + +int +ProcXGetPairedPointer(ClientPtr client) +{ + xGetPairedPointerReply rep; + DeviceIntPtr kbd, ptr; + + REQUEST(xGetPairedPointerReq); + REQUEST_SIZE_MATCH(xGetPairedPointerReq); + + kbd = LookupDeviceIntRec(stuff->deviceid); + if (!kbd || !kbd->key) { + SendErrorToClient(client, IReqCode, X_GetPairedPointer, + stuff->deviceid, BadDevice); + return Success; + } + + ptr = GetPairedPointer(kbd); + + rep.repType = X_Reply; + rep.RepType = X_GetPairedPointer; + rep.length = 0; + rep.sequenceNumber = client->sequence; + if (ptr == inputInfo.pointer) + { + rep.paired = FALSE; + rep.deviceid = 0; + } else + { + rep.paired = TRUE; + rep.deviceid = ptr->id; + } + WriteReplyToClient(client, sizeof(xGetPairedPointerReply), &rep); + return Success; +} + +void +SRepXGetPairedPointer(ClientPtr client, int size, + xGetPairedPointerReply* rep) +{ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + WriteToClient(client, size, (char *)rep); +} diff --git a/Xi/getpairp.h b/Xi/getpairp.h new file mode 100644 index 000000000..9b4759e71 --- /dev/null +++ b/Xi/getpairp.h @@ -0,0 +1,45 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef GETPAIRP_H +#define GETPAIRP_H 1 + +int SProcXGetPairedPointer(ClientPtr /* client */ + ); +int ProcXGetPairedPointer(ClientPtr /* client */ + ); +void SRepXGetPairedPointer(ClientPtr /* client */, + int /* size */, + xGetPairedPointerReply* /* rep */ + ); + +#endif /* GETPAIRP_H */ diff --git a/Xi/querydp.c b/Xi/querydp.c index c1ba2ee3b..a24dad0a5 100644 --- a/Xi/querydp.c +++ b/Xi/querydp.c @@ -164,3 +164,4 @@ SRepXQueryDevicePointer(ClientPtr client, int size, swapl(&rep->length, n); WriteToClient(client, size, (char *)rep); } + diff --git a/dix/cursor.c b/dix/cursor.c index 5b5c498b0..c58e2fa16 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -131,7 +131,6 @@ FreeCursor(pointer value, XID cid) } FreeCursorBits(pCurs->bits); xfree( pCurs); - MPXDBG("freeing memory for cursor\n"); return(Success); } diff --git a/dix/events.c b/dix/events.c index c9b5a4f32..65d6eaed6 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3897,6 +3897,7 @@ int ProcSetInputFocus(client) ClientPtr client; { + DeviceIntPtr kbd = PickKeyboard(client); REQUEST(xSetInputFocusReq); REQUEST_SIZE_MATCH(xSetInputFocusReq); @@ -3904,16 +3905,17 @@ ProcSetInputFocus(client) if (!XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE)) return Success; - return SetInputFocus(client, inputInfo.keyboard, stuff->focus, + return SetInputFocus(client, kbd, stuff->focus, stuff->revertTo, stuff->time, FALSE); } int ProcGetInputFocus(ClientPtr client) { + DeviceIntPtr kbd = PickKeyboard(client); xGetInputFocusReply rep; /* REQUEST(xReq); */ - FocusClassPtr focus = inputInfo.keyboard->focus; + FocusClassPtr focus = kbd->focus; REQUEST_SIZE_MATCH(xReq); rep.type = X_Reply; From e54311395e1e7ae458c8ce59da0914706c4a04f6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 25 Mar 2007 09:41:33 +0930 Subject: [PATCH 073/634] dix: Increase allocation size for core keyboard keymap to avoid buffer overrun when copying keymap from extension devices. --- dix/devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index 579203f1f..10843d456 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -259,7 +259,7 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what) keySyms.mapWidth = 4; keySyms.map = (KeySym *)xcalloc(sizeof(KeySym), (keySyms.maxKeyCode - - keySyms.minKeyCode) * + keySyms.minKeyCode + 1) * keySyms.mapWidth); if (!keySyms.map) { ErrorF("Couldn't allocate core keymap\n"); From 5f9c10e8da0d9d96cc00a38cdf9a8c3030063e03 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 25 Mar 2007 15:00:03 +0930 Subject: [PATCH 074/634] Clean up DeviceIntPtr, prepare for Server 1.4 ABI. Move sprite-related information into a new SpriteInfoRec, remove isMPDev flag. --- Xi/querydp.c | 4 +- Xi/warpdevp.c | 2 +- dix/devices.c | 34 ++++++--- dix/events.c | 133 +++++++++++++++++---------------- dix/getevents.c | 15 +--- hw/xfree86/common/xf86Xinput.c | 2 +- include/inputstr.h | 17 +++-- mi/mieq.c | 8 +- mi/mipointer.c | 8 +- 9 files changed, 111 insertions(+), 112 deletions(-) diff --git a/Xi/querydp.c b/Xi/querydp.c index a24dad0a5..af93fed2f 100644 --- a/Xi/querydp.c +++ b/Xi/querydp.c @@ -101,7 +101,7 @@ ProcXQueryDevicePointer(register ClientPtr client) if (pDev->valuator->motionHintWindow) MaybeStopHint(pDev, client); - pSprite = pDev->pSprite; + pSprite = pDev->spriteInfo->sprite; rep.repType = X_Reply; rep.RepType = X_QueryDevicePointer; rep.length = 0; @@ -111,7 +111,7 @@ ProcXQueryDevicePointer(register ClientPtr client) rep.rootX = pSprite->hot.x; rep.rootY = pSprite->hot.y; rep.child = None; - rep.shared = (pDev->isMPDev) ? xFalse : xTrue; + rep.shared = (pDev->spriteInfo->spriteOwner) ? xFalse : xTrue; if (pSprite->hot.pScreen == pWin->drawable.pScreen) { diff --git a/Xi/warpdevp.c b/Xi/warpdevp.c index a9ddb0b6b..8df7e14db 100644 --- a/Xi/warpdevp.c +++ b/Xi/warpdevp.c @@ -102,7 +102,7 @@ ProcXWarpDevicePointer(register ClientPtr client) } } - pSprite = pDev->pSprite; + pSprite = pDev->spriteInfo->sprite; x = pSprite->hotPhys.x; y = pSprite->hotPhys.y; diff --git a/dix/devices.c b/dix/devices.c index 10843d456..724ef982d 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -147,6 +147,13 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart) dev->inited = FALSE; dev->enabled = FALSE; + /* sprite defaults */ + dev->spriteInfo = (SpriteInfoPtr)xcalloc(sizeof(SpriteInfoRec), 1); + if (!dev->spriteInfo) + return (DeviceIntPtr)NULL; + dev->spriteInfo->sprite = NULL; + dev->spriteInfo->spriteOwner = FALSE; + for (prev = &inputInfo.off_devices; *prev; prev = &(*prev)->next) ; *prev = dev; @@ -173,7 +180,7 @@ EnableDevice(DeviceIntPtr dev) dev->enabled = TRUE; *prev = dev->next; - if (IsPointerDevice(dev) && dev->isMPDev) + if (IsPointerDevice(dev) && dev->spriteInfo->spriteOwner) InitializeSprite(dev, GetCurrentRootWindow()); else PairDevices(NULL, inputInfo.pointer, dev); @@ -360,7 +367,7 @@ InitCoreDevices() dev->coreGrab.ActivateGrab = ActivateKeyboardGrab; dev->coreGrab.DeactivateGrab = DeactivateKeyboardGrab; dev->coreEvents = FALSE; - dev->spriteOwner = FALSE; + dev->spriteInfo->spriteOwner = FALSE; if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) FatalError("Couldn't allocate keyboard devPrivates\n"); dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; @@ -542,7 +549,7 @@ CloseDevice(DeviceIntPtr dev) #endif if (DevHasCursor(dev)) - xfree((pointer)dev->pSprite); + xfree((pointer)dev->spriteInfo->sprite); /* a client may have the device set as client pointer */ for (j = 0; j < currentMaxClients; j++) @@ -556,6 +563,7 @@ CloseDevice(DeviceIntPtr dev) xfree(dev->coreGrab.sync.event); xfree(dev->deviceGrab.sync.event); + xfree(dev->spriteInfo); xfree(dev); } @@ -2009,14 +2017,14 @@ PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd) else if (pairingClient != client) return BadAccess; - if (kbd->spriteOwner) + if (kbd->spriteInfo->spriteOwner) { - xfree(kbd->pSprite); - kbd->pSprite = NULL; - kbd->spriteOwner = FALSE; + xfree(kbd->spriteInfo->sprite); + kbd->spriteInfo->sprite = NULL; + kbd->spriteInfo->spriteOwner = FALSE; } - kbd->pSprite = ptr->pSprite; + kbd->spriteInfo->sprite = ptr->spriteInfo->sprite; return Success; } @@ -2029,7 +2037,8 @@ GetPairedPointer(DeviceIntPtr kbd) DeviceIntPtr ptr = inputInfo.devices; while(ptr) { - if (ptr->pSprite == kbd->pSprite && ptr->spriteOwner) + if (ptr->spriteInfo->sprite == kbd->spriteInfo->sprite && + ptr->spriteInfo->spriteOwner) { return ptr; } @@ -2053,7 +2062,7 @@ GetPairedKeyboard(DeviceIntPtr ptr) { if (ptr != dev && IsKeyboardDevice(dev) && - ptr->pSprite == dev->pSprite) + ptr->spriteInfo->sprite == dev->spriteInfo->sprite) return dev; dev = dev->next; } @@ -2109,7 +2118,7 @@ GuessFreePointerDevice() while(it) { /* found device with a sprite? */ - if (it->spriteOwner) + if (it->spriteInfo->spriteOwner) { lastRealPtr = it; @@ -2117,7 +2126,8 @@ GuessFreePointerDevice() while(it2) { /* something paired with it? */ - if (it != it2 && it2->pSprite == it->pSprite) + if (it != it2 && + it2->spriteInfo->sprite == it->spriteInfo->sprite) break; it2 = it2->next; diff --git a/dix/events.c b/dix/events.c index 65d6eaed6..9f7e08de7 100644 --- a/dix/events.c +++ b/dix/events.c @@ -247,7 +247,7 @@ static int spriteTraceGood; _X_EXPORT Bool DevHasCursor(DeviceIntPtr pDev) { - return (pDev != inputInfo.pointer && pDev->spriteOwner); + return (pDev != inputInfo.pointer && pDev->spriteInfo->spriteOwner); } /* @@ -346,7 +346,7 @@ static void PostNewCursor(DeviceIntPtr pDev); #define SyntheticMotion(dev, x, y) \ PostSyntheticMotion(dev, x, y, noPanoramiXExtension ? 0 : \ - dev->pSprite->screen->myNum, \ + dev->spriteInfo->sprite->screen->myNum, \ syncEvents.playingEvents ? \ syncEvents.time.milliseconds : \ currentTime.milliseconds); @@ -361,7 +361,7 @@ XineramaSetCursorPosition( ScreenPtr pScreen; BoxRec box; int i; - SpritePtr pSprite = pDev->pSprite; + SpritePtr pSprite = pDev->spriteInfo->sprite; /* x,y are in Screen 0 coordinates. We need to decide what Screen to send the message too and what the coordinates relative to @@ -399,7 +399,7 @@ XineramaSetCursorPosition( static void XineramaConstrainCursor(DeviceIntPtr pDev) { - SpritePtr pSprite = pDev->pSprite; + SpritePtr pSprite = pDev->spriteInfo->sprite; ScreenPtr pScreen; BoxRec newBox; @@ -423,7 +423,7 @@ XineramaCheckPhysLimits( Bool generateEvents ){ HotSpot new; - SpritePtr pSprite = pDev->pSprite; + SpritePtr pSprite = pDev->spriteInfo->sprite; if (!cursor) return; @@ -463,7 +463,7 @@ XineramaCheckPhysLimits( static Bool XineramaSetWindowPntrs(DeviceIntPtr pDev, WindowPtr pWin) { - SpritePtr pSprite = pDev->pSprite; + SpritePtr pSprite = pDev->spriteInfo->sprite; if(pWin == WindowTable[0]) { memcpy(pSprite->windows, WindowTable, @@ -492,7 +492,7 @@ XineramaCheckVirtualMotion( QdEventPtr qe, WindowPtr pWin) { - SpritePtr pSprite = pDev->pSprite; + SpritePtr pSprite = pDev->spriteInfo->sprite; if (qe) { @@ -564,7 +564,7 @@ static Bool XineramaCheckMotion(xEvent *xE, DeviceIntPtr pDev) { WindowPtr prevSpriteWin; - SpritePtr pSprite = pDev->pSprite; + SpritePtr pSprite = pDev->spriteInfo->sprite; prevSpriteWin = pSprite->win; @@ -629,7 +629,7 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents) { - SpritePtr pSprite = pDev->pSprite; + SpritePtr pSprite = pDev->spriteInfo->sprite; if (syncEvents.playingEvents) { @@ -683,7 +683,7 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev, static void XineramaChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) { - SpritePtr pSprite = pDev->pSprite; + SpritePtr pSprite = pDev->spriteInfo->sprite; if (cursor != pSprite->current) { @@ -723,7 +723,7 @@ ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py) BoxRec box; int x = *px, y = *py; int incx = 1, incy = 1; - SpritePtr pSprite = pDev->pSprite; + SpritePtr pSprite = pDev->spriteInfo->sprite; if (POINT_IN_REGION(pSprite->hot.pScreen, shape, x, y, &box)) return; @@ -764,7 +764,7 @@ CheckPhysLimits( ScreenPtr pScreen) { HotSpot new; - SpritePtr pSprite = pDev->pSprite; + SpritePtr pSprite = pDev->spriteInfo->sprite; if (!cursor) return; @@ -809,7 +809,7 @@ CheckVirtualMotion( QdEventPtr qe, WindowPtr pWin) { - SpritePtr pSprite = pDev->pSprite; + SpritePtr pSprite = pDev->spriteInfo->sprite; #ifdef PANORAMIX if(!noPanoramiXExtension) { @@ -865,7 +865,7 @@ static void ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, Bool confineToScreen) { ScreenPtr pScreen = pWin->drawable.pScreen; - SpritePtr pSprite = pDev->pSprite; + SpritePtr pSprite = pDev->spriteInfo->sprite; #ifdef PANORAMIX if(!noPanoramiXExtension) { @@ -894,13 +894,13 @@ ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, Bo _X_EXPORT Bool PointerConfinedToScreen(DeviceIntPtr pDev) { - return pDev->pSprite->confined; + return pDev->spriteInfo->sprite->confined; } static void ChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) { - SpritePtr pSprite = pDev->pSprite; + SpritePtr pSprite = pDev->spriteInfo->sprite; #ifdef PANORAMIX if(!noPanoramiXExtension) { @@ -938,7 +938,7 @@ PostNewCursor(DeviceIntPtr pDev) { WindowPtr win; GrabPtr grab = pDev->coreGrab.grab; - SpritePtr pSprite = pDev->pSprite; + SpritePtr pSprite = pDev->spriteInfo->sprite; CursorPtr pCursor; if (syncEvents.playingEvents) @@ -982,19 +982,19 @@ GetCurrentRootWindow() _X_EXPORT WindowPtr GetSpriteWindow(DeviceIntPtr pDev) { - return pDev->pSprite->win; + return pDev->spriteInfo->sprite->win; } _X_EXPORT CursorPtr GetSpriteCursor(DeviceIntPtr pDev) { - return pDev->pSprite->current; + return pDev->spriteInfo->sprite->current; } _X_EXPORT void GetSpritePosition(DeviceIntPtr pDev, int *px, int *py) { - SpritePtr pSprite = pDev->pSprite; + SpritePtr pSprite = pDev->spriteInfo->sprite; *px = pSprite->hotPhys.x; *py = pSprite->hotPhys.y; } @@ -1004,7 +1004,7 @@ _X_EXPORT int XineramaGetCursorScreen(DeviceIntPtr pDev) { if(!noPanoramiXExtension) { - return pDev->pSprite->screen->myNum; + return pDev->spriteInfo->sprite->screen->myNum; } else { return 0; } @@ -1049,7 +1049,7 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) QdEventPtr tail = *syncEvents.pendtail; QdEventPtr qe; xEvent *qxE; - SpritePtr pSprite = device->pSprite; + SpritePtr pSprite = device->spriteInfo->sprite; NoticeTime(xE); @@ -1146,10 +1146,10 @@ PlayReleasedEvents(void) if(!noPanoramiXExtension) { qe->event->u.keyButtonPointer.rootX += panoramiXdataPtr[0].x - - panoramiXdataPtr[pDev->pSprite->screen->myNum].x; + panoramiXdataPtr[pDev->spriteInfo->sprite->screen->myNum].x; qe->event->u.keyButtonPointer.rootY += panoramiXdataPtr[0].y - - panoramiXdataPtr[pDev->pSprite->screen->myNum].y; + panoramiXdataPtr[pDev->spriteInfo->sprite->screen->myNum].y; } #endif (*qe->device->public.processInputProc)(qe->event, qe->device, @@ -1241,14 +1241,14 @@ playmore: if ((grab = dev->coreGrab.grab) && grab->confineTo) { if (grab->confineTo->drawable.pScreen != - dev->pSprite->hotPhys.pScreen) - dev->pSprite->hotPhys.x = - dev->pSprite->hotPhys.y = 0; + dev->spriteInfo->sprite->hotPhys.pScreen) + dev->spriteInfo->sprite->hotPhys.x = + dev->spriteInfo->sprite->hotPhys.y = 0; ConfineCursorToWindow(dev, grab->confineTo, TRUE, TRUE); } else ConfineCursorToWindow(dev, - WindowTable[dev->pSprite->hotPhys.pScreen->myNum], + WindowTable[dev->spriteInfo->sprite->hotPhys.pScreen->myNum], TRUE, FALSE); PostNewCursor(dev); } @@ -1270,13 +1270,13 @@ ScreenRestructured (ScreenPtr pScreen) if ((grab = pDev->coreGrab.grab) && grab->confineTo) { if (grab->confineTo->drawable.pScreen - != pDev->pSprite->hotPhys.pScreen) - pDev->pSprite->hotPhys.x = pDev->pSprite->hotPhys.y = 0; + != pDev->spriteInfo->sprite->hotPhys.pScreen) + pDev->spriteInfo->sprite->hotPhys.x = pDev->spriteInfo->sprite->hotPhys.y = 0; ConfineCursorToWindow(pDev, grab->confineTo, TRUE, TRUE); } else ConfineCursorToWindow(pDev, - WindowTable[pDev->pSprite->hotPhys.pScreen->myNum], + WindowTable[pDev->spriteInfo->sprite->hotPhys.pScreen->myNum], TRUE, FALSE); } } @@ -1322,13 +1322,14 @@ ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, { WindowPtr oldWin = (mouse->coreGrab.grab) ? mouse->coreGrab.grab->window - : mouse->pSprite->win; + : mouse->spriteInfo->sprite->win; if (grab->confineTo) { if (grab->confineTo->drawable.pScreen - != mouse->pSprite->hotPhys.pScreen) - mouse->pSprite->hotPhys.x = mouse->pSprite->hotPhys.y = 0; + != mouse->spriteInfo->sprite->hotPhys.pScreen) + mouse->spriteInfo->sprite->hotPhys.x = + mouse->spriteInfo->sprite->hotPhys.y = 0; ConfineCursorToWindow(mouse, grab->confineTo, FALSE, TRUE); } DoEnterLeaveEvents(mouse, oldWin, grab->window, NotifyGrab); @@ -1362,7 +1363,7 @@ DeactivatePointerGrab(DeviceIntPtr mouse) dev->coreGrab.sync.other = NullGrab; } DoEnterLeaveEvents(mouse, grab->window, - mouse->pSprite->win, NotifyUngrab); + mouse->spriteInfo->sprite->win, NotifyUngrab); if (grab->confineTo) ConfineCursorToWindow(mouse, ROOT, FALSE, FALSE); PostNewCursor(mouse); @@ -1381,7 +1382,7 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool pass else if (keybd->focus) oldWin = keybd->focus->win; else - oldWin = keybd->pSprite->win; + oldWin = keybd->spriteInfo->sprite->win; if (oldWin == FollowKeyboardWin) oldWin = inputInfo.keyboard->focus->win; if (keybd->valuator) @@ -1403,7 +1404,7 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd) GrabPtr grab = keybd->coreGrab.grab; DeviceIntPtr dev; WindowPtr focusWin = keybd->focus ? keybd->focus->win - : keybd->pSprite->win; + : keybd->spriteInfo->sprite->win; if (focusWin == FollowKeyboardWin) focusWin = inputInfo.keyboard->focus->win; @@ -1883,7 +1884,7 @@ FixUpEventFromWindow( Window child, Bool calcChild) { - SpritePtr pSprite = pDev->pSprite; + SpritePtr pSprite = pDev->spriteInfo->sprite; if (calcChild) { @@ -2039,7 +2040,7 @@ static Bool PointInBorderSize(WindowPtr pWin, int x, int y) { BoxRec box; - SpritePtr pSprite = inputInfo.pointer->pSprite; + SpritePtr pSprite = inputInfo.pointer->spriteInfo->sprite; if(POINT_IN_REGION(pWin->drawable.pScreen, &pWin->borderSize, x, y, &box)) return TRUE; @@ -2114,7 +2115,7 @@ Bool CheckMotion(xEvent *xE, DeviceIntPtr pDev) { WindowPtr prevSpriteWin; - SpritePtr pSprite = pDev->pSprite; + SpritePtr pSprite = pDev->spriteInfo->sprite; prevSpriteWin = pSprite->win; @@ -2219,7 +2220,7 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) { if (DevHasCursor(pDev)) { - pSprite = pDev->pSprite; + pSprite = pDev->spriteInfo->sprite; pSprite->hot.x -= xoff; pSprite->hot.y -= yoff; @@ -2280,15 +2281,15 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) SpritePtr pSprite; ScreenPtr pScreen; - if (!pDev->pSprite) + if (!pDev->spriteInfo->sprite) { - pDev->pSprite = (SpritePtr)xcalloc(1, sizeof(SpriteRec)); - if (!pDev->pSprite) + pDev->spriteInfo->sprite = (SpritePtr)xcalloc(1, sizeof(SpriteRec)); + if (!pDev->spriteInfo->sprite) FatalError("InitializeSprite: failed to allocate sprite struct"); } - pSprite = pDev->pSprite; - pDev->spriteOwner = TRUE; + pSprite = pDev->spriteInfo->sprite; + pDev->spriteInfo->spriteOwner = TRUE; pScreen = (pWin) ? pWin->drawable.pScreen : (ScreenPtr)NULL; pSprite->hot.pScreen = pScreen; @@ -2363,7 +2364,7 @@ WindowHasNewCursor(WindowPtr pWin) _X_EXPORT void NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y) { - SpritePtr pSprite = pDev->pSprite; + SpritePtr pSprite = pDev->spriteInfo->sprite; pSprite->hotPhys.x = x; pSprite->hotPhys.y = y; @@ -2423,7 +2424,7 @@ XineramaPointInWindowIsVisible( yoff = y + panoramiXdataPtr[0].y; for(i = 1; i < PanoramiXNumScreens; i++) { - pWin = inputInfo.pointer->pSprite->windows[i]; + pWin = inputInfo.pointer->spriteInfo->sprite->windows[i]; pScreen = pWin->drawable.pScreen; x = xoff - panoramiXdataPtr[i].x; y = yoff - panoramiXdataPtr[i].y; @@ -2446,7 +2447,7 @@ XineramaWarpPointer(ClientPtr client) { WindowPtr dest = NULL; int x, y, rc; - SpritePtr pSprite = PickPointer(client)->pSprite; + SpritePtr pSprite = PickPointer(client)->spriteInfo->sprite; REQUEST(xWarpPointerReq); @@ -2521,7 +2522,7 @@ ProcWarpPointer(ClientPtr client) WindowPtr dest = NULL; int x, y, rc; ScreenPtr newScreen; - SpritePtr pSprite = PickPointer(client)->pSprite; + SpritePtr pSprite = PickPointer(client)->spriteInfo->sprite; REQUEST(xWarpPointerReq); @@ -2609,7 +2610,7 @@ ProcWarpPointer(ClientPtr client) static Bool BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin) { - if(REGION_NOTEMPTY(pDev->pSprite->hotPhys.pScreen, &pWin->borderSize)) + if(REGION_NOTEMPTY(pDev->spriteInfo->sprite->hotPhys.pScreen, &pWin->borderSize)) return TRUE; #ifdef PANORAMIX @@ -2617,8 +2618,8 @@ BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin) int i; for(i = 1; i < PanoramiXNumScreens; i++) { - if(REGION_NOTEMPTY(pDev->pSprite->screen, - &pDev->pSprite->windows[i]->borderSize)) + if(REGION_NOTEMPTY(pDev->spriteInfo->sprite->screen, + &pDev->spriteInfo->sprite->windows[i]->borderSize)) return TRUE; } } @@ -2817,7 +2818,7 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, int deliveries = 0; DeviceIntPtr dev; xEvent *dxE; - SpritePtr pSprite = thisDev->pSprite; + SpritePtr pSprite = thisDev->spriteInfo->sprite; if (xE->u.u.type & EXTENSION_EVENT_BASE) grabinfo = &thisDev->deviceGrab; @@ -2988,8 +2989,8 @@ drawable.id:0; ))) #endif XE_KBPTR.state = (keyc->state | GetPairedPointer(keybd)->button->state); - XE_KBPTR.rootX = keybd->pSprite->hot.x; - XE_KBPTR.rootY = keybd->pSprite->hot.y; + XE_KBPTR.rootX = keybd->spriteInfo->sprite->hot.x; + XE_KBPTR.rootY = keybd->spriteInfo->sprite->hot.y; key = xE->u.u.detail; kptr = &keyc->down[key >> 3]; bit = 1 << (key & 7); @@ -3065,7 +3066,7 @@ drawable.id:0; if (grab) DeliverGrabbedEvent(xE, keybd, deactivateGrab, count); else - DeliverFocusedEvent(keybd, xE, keybd->pSprite->win, count); + DeliverFocusedEvent(keybd, xE, keybd->spriteInfo->sprite->win, count); if (deactivateGrab) (*grabinfo->DeactivateGrab)(keybd); @@ -3117,7 +3118,7 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) GrabPtr grab = mouse->coreGrab.grab; Bool deactivateGrab = FALSE; ButtonClassPtr butc = mouse->button; - SpritePtr pSprite = mouse->pSprite; + SpritePtr pSprite = mouse->spriteInfo->sprite; #ifdef XKB XkbSrvInfoPtr xkbi= inputInfo.keyboard->key->xkbInfo; @@ -3468,8 +3469,8 @@ EnterLeaveEvent( event.u.u.type = type; event.u.u.detail = detail; event.u.enterLeave.time = currentTime.milliseconds; - event.u.enterLeave.rootX = pDev->pSprite->hot.x; - event.u.enterLeave.rootY = pDev->pSprite->hot.y; + event.u.enterLeave.rootX = pDev->spriteInfo->sprite->hot.x; + event.u.enterLeave.rootY = pDev->spriteInfo->sprite->hot.y; /* Counts on the same initial structure of crossing & button events! */ FixUpEventFromWindow(mouse, &event, pWin, None, FALSE); /* Enter/Leave events always set child */ @@ -3696,7 +3697,7 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) int out, in; /* for holding details for to/from PointerRoot/None */ int i; - SpritePtr pSprite = dev->pSprite; + SpritePtr pSprite = dev->spriteInfo->sprite; if (fromWin == toWin) return; @@ -4224,7 +4225,7 @@ ProcQueryPointer(ClientPtr client) xQueryPointerReply rep; WindowPtr pWin, t; DeviceIntPtr mouse = PickPointer(client); - SpritePtr pSprite = mouse->pSprite; + SpritePtr pSprite = mouse->spriteInfo->sprite; int rc; REQUEST(xResourceReq); @@ -4343,7 +4344,7 @@ ProcSendEvent(ClientPtr client) { WindowPtr pWin; WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */ - SpritePtr pSprite = PickPointer(client)->pSprite; + SpritePtr pSprite = PickPointer(client)->spriteInfo->sprite; REQUEST(xSendEventReq); REQUEST_SIZE_MATCH(xSendEventReq); @@ -4771,7 +4772,7 @@ ProcRecolorCursor(ClientPtr client) int nscr; ScreenPtr pscr; Bool displayed; - SpritePtr pSprite = PickPointer(client)->pSprite; + SpritePtr pSprite = PickPointer(client)->spriteInfo->sprite; REQUEST(xRecolorCursorReq); REQUEST_SIZE_MATCH(xRecolorCursorReq); @@ -4914,7 +4915,7 @@ PickPointer(ClientPtr client) DeviceIntPtr it = inputInfo.devices; while (it) { - if (it != inputInfo.pointer && it->spriteOwner) + if (it != inputInfo.pointer && it->spriteInfo->spriteOwner) { client->clientPtr = it; break; @@ -4947,7 +4948,7 @@ PickKeyboard(ClientPtr client) { if (ptr != kbd && IsKeyboardDevice(kbd) && - ptr->pSprite == kbd->pSprite) + ptr->spriteInfo->sprite == kbd->spriteInfo->sprite) return kbd; kbd = kbd->next; } diff --git a/dix/getevents.c b/dix/getevents.c index 3f113fc8f..e95caddd7 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -505,7 +505,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, if ((type == ButtonPress || type == ButtonRelease) && !pDev->button) return 0; - if (!coreOnly && (pDev->coreEvents || pDev->isMPDev)) + if (!coreOnly && (pDev->coreEvents)) num_events = 2; else num_events = 1; @@ -529,10 +529,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, ms = GetTimeInMillis(); - if (!pDev->coreEvents || pDev->isMPDev) - pointer = pDev; - else - pointer = inputInfo.pointer; + pointer = pDev; /* Set x and y based on whether this is absolute or relative, and * accelerate if we need to. */ @@ -585,11 +582,6 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); - if (pDev->coreEvents && !pDev->isMPDev) { - /* set the virtual core pointer's coordinates */ - inputInfo.pointer->valuator->lastx = x; - inputInfo.pointer->valuator->lasty = y; - } pDev->valuator->lastx = x; pDev->valuator->lasty = y; @@ -623,8 +615,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, } } - /* MPX devices always send core events */ - if (coreOnly || pDev->coreEvents || pDev->isMPDev) { + if (coreOnly || pDev->coreEvents) { events->u.u.type = type; events->u.keyButtonPointer.time = ms; events->u.keyButtonPointer.rootX = x; diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index db3998025..a9ce21156 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -171,7 +171,7 @@ xf86ActivateDevice(LocalDevicePtr local) local->dev = dev; dev->coreEvents = local->flags & XI86_ALWAYS_CORE; - dev->isMPDev = !(local->flags & XI86_SHARED_POINTER); + dev->spriteInfo->spriteOwner = !(local->flags & XI86_SHARED_POINTER); #ifdef XKB if (!IsPointerDevice(dev)) diff --git a/include/inputstr.h b/include/inputstr.h index 8c3e5604d..d4ba81158 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -322,6 +322,15 @@ typedef struct _GrabInfoRec { } sync; } GrabInfoRec, *GrabInfoPtr; +typedef struct _SpriteInfoRec { + /* sprite must always point to a valid sprite. For devices sharing the + * sprite, let sprite point to a paired spriteOwner's sprite. */ + SpritePtr sprite; /* sprite information */ + Bool spriteOwner; /* True if device owns the sprite */ + DeviceIntPtr paired; /* the real owner of the sprite or + NULL if spriteOwner is TRUE*/ +} SpriteInfoRec, *SpriteInfoPtr; + typedef struct _DeviceIntRec { DeviceRec public; DeviceIntPtr next; @@ -358,13 +367,7 @@ typedef struct _DeviceIntRec { DevUnion *devPrivates; int nPrivates; DeviceUnwrapProc unwrapProc; - Bool isMPDev; /* TRUE if multipointer device */ - /* Each device has a sprite. However, keyboards and shared pointers do - not in fact own a sprite but rather have their pointer set to the - sprite of another device. pSprite always has to point to a valid - sprite. spriteOwner indicates whether it is the device's sprite. */ - SpritePtr pSprite; /* sprite information */ - Bool spriteOwner; /* FALSE if shared sprite, see above*/ + SpriteInfoPtr spriteInfo; } DeviceIntRec; typedef struct { diff --git a/mi/mieq.c b/mi/mieq.c index 6ed5ef357..4949f20c1 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -115,7 +115,7 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e) &laste->event[0]; /* avoid merging events from different devices */ - if (e->u.u.type == MotionNotify && pDev->isMPDev) + if (e->u.u.type == MotionNotify) isMotion = pDev->id; else if (e->u.u.type == MotionNotify) isMotion = inputInfo.pointer->id; @@ -235,10 +235,7 @@ mieqProcessInputEvents() else if (e->event[0].u.u.type == MotionNotify || e->event[0].u.u.type == ButtonPress || e->event[0].u.u.type == ButtonRelease) { - if (!e->pDev->isMPDev) - SwitchCorePointer(e->pDev); dev = inputInfo.pointer; - } else { dev = e->pDev; @@ -252,8 +249,7 @@ mieqProcessInputEvents() } /* Update the sprite now. Next event may be from different device. */ - if (e->event[0].u.u.type == MotionNotify && - (e->pDev->isMPDev || e->pDev->coreEvents)) + if (e->event[0].u.u.type == MotionNotify && e->pDev->coreEvents) { miPointerUpdateSprite(e->pDev); } diff --git a/mi/mipointer.c b/mi/mipointer.c index edb5c5fec..3c09064c7 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -346,8 +346,7 @@ miPointerUpdateSprite (DeviceIntPtr pDev) int x, y, devx, devy; miPointerPtr pPointer; - if (!pDev || pDev == inputInfo.pointer || - !(pDev->coreEvents || pDev->isMPDev)) + if (!pDev || pDev == inputInfo.pointer || !pDev->coreEvents) return; pPointer = MIPOINTER(pDev); @@ -481,8 +480,7 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y, unsigned long time) if (!pScreen) return; /* called before ready */ - if (!pDev || - !(pDev->coreEvents || pDev == inputInfo.pointer || pDev->isMPDev)) + if (!pDev || !(pDev->coreEvents || pDev == inputInfo.pointer)) return; if (*x < 0 || *x >= pScreen->width || *y < 0 || *y >= pScreen->height) @@ -574,7 +572,7 @@ miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, SetupScreen(pScreen); - if (pDev && (pDev->coreEvents || pDev == inputInfo.pointer || pDev->isMPDev) + if (pDev && (pDev->coreEvents || pDev == inputInfo.pointer) && !pScreenPriv->waitForUpdate && pScreen == pPointer->pSpriteScreen) { pPointer->devx = x; From 0c607f4b1902f993597e09ea7a2c83bc1cca9b96 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 29 Mar 2007 14:43:50 +0930 Subject: [PATCH 075/634] dix: Pick keyboard instead of using virtual keyboard in Grab/UngrabKey. --- dix/events.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dix/events.c b/dix/events.c index 9f7e08de7..a51a56c1d 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4433,7 +4433,7 @@ ProcUngrabKey(ClientPtr client) REQUEST(xUngrabKeyReq); WindowPtr pWin; GrabRec tempGrab; - DeviceIntPtr keybd = inputInfo.keyboard; + DeviceIntPtr keybd = PickKeyboard(client); int rc; REQUEST_SIZE_MATCH(xUngrabKeyReq); @@ -4475,7 +4475,7 @@ ProcGrabKey(ClientPtr client) WindowPtr pWin; REQUEST(xGrabKeyReq); GrabPtr grab; - DeviceIntPtr keybd = inputInfo.keyboard; + DeviceIntPtr keybd = PickKeyboard(client); int rc; REQUEST_SIZE_MATCH(xGrabKeyReq); From 20e4314b178e1a093bce85e93329d4bcfb4f4210 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 29 Mar 2007 19:12:32 +0930 Subject: [PATCH 076/634] dix: Try to get closer to the correct refcnt for cursors. This commit introduces a memory leak, as the refcnt never seems to get down to 0 and thus cursors will not be freed. Solves the problems with GNOME segfaulting every 30 seconds though. --- dix/cursor.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dix/cursor.c b/dix/cursor.c index c58e2fa16..27ae9f17d 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -196,11 +196,10 @@ AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, bits->height = cm->height; bits->xhot = cm->xhot; bits->yhot = cm->yhot; - bits->refcnt = -1; + pCurs->refcnt = 0; CheckForEmptyMask(bits); pCurs->bits = bits; - pCurs->refcnt = 1; #ifdef XFIXES pCurs->serialNumber = ++cursorSerial; pCurs->name = None; @@ -224,6 +223,7 @@ AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, { if (DevHasCursor(pDev)) { + pCurs->refcnt++; if (!( *pscr->RealizeCursor)(pDev, pscr, pCurs)) { /* Realize failed for device pDev on screen pscr. @@ -419,7 +419,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, } CheckForEmptyMask(bits); pCurs->bits = bits; - pCurs->refcnt = 1; + pCurs->refcnt = 0; #ifdef XFIXES pCurs->serialNumber = ++cursorSerial; pCurs->name = None; @@ -440,6 +440,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, { pscr = screenInfo.screens[nscr]; + pCurs->refcnt++; if (!(*pscr->RealizeCursor)(inputInfo.pointer, pscr, pCurs)) { DeviceIntPtr pDevIt = inputInfo.devices; /*dev iterator*/ @@ -470,6 +471,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, { if (DevHasCursor(pDev)) { + pCurs->refcnt++; if (!( *pscr->RealizeCursor)(pDev, pscr, pCurs)) { /* Realize failed for device pDev on screen pscr. From 63d8f01819ef44ea3bf0d4fb20ba1d698ae91cd2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 30 Mar 2007 14:59:43 +0930 Subject: [PATCH 077/634] dix: Fix wrong cursor refcount. Calloc cursor struct to ensure devPrivates are zeroed out and don't increase the refcnt for devices automatically when allocating a new cursor. Use new DeviceIsPointerType() to detect if device is a pointer _before_ device has been activated and can thus be identified and set up grab functions accordingly. This way we can increase the refcnt when we get a pointer grab. --- Xi/exevents.c | 2 +- Xi/extinit.c | 16 ++++++++++++ dix/cursor.c | 47 ++++++++-------------------------- dix/events.c | 1 - hw/xfree86/common/xf86Xinput.c | 2 +- include/extinit.h | 5 ++++ 6 files changed, 34 insertions(+), 39 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index bc2618968..3e3f15a1d 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -101,7 +101,7 @@ RegisterOtherDevice(DeviceIntPtr device) device->public.realInputProc = ProcessOtherEvent; (device)->deviceGrab.ActivateGrab = ActivateKeyboardGrab; (device)->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; - if (IsPointerDevice(device)) + if (DeviceIsPointerType(device)) { (device)->coreGrab.ActivateGrab = ActivatePointerGrab; (device)->coreGrab.DeactivateGrab = DeactivatePointerGrab; diff --git a/Xi/extinit.c b/Xi/extinit.c index 3766a9516..971617ebb 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -983,6 +983,22 @@ IResetProc(ExtensionEntry * unused) RestoreExtensionEvents(); } +/***************************************************************** + * + * Returns TRUE if the device has some sort of pointer type. + * + */ + +Bool +DeviceIsPointerType(DeviceIntPtr dev) +{ + if (dev_type[1].type == dev->type) + return TRUE; + + return FALSE; +} + + /*********************************************************************** * * Assign an id and type to an input device. diff --git a/dix/cursor.c b/dix/cursor.c index 27ae9f17d..5886422d5 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -179,7 +179,7 @@ AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, ScreenPtr pscr; DeviceIntPtr pDev; - pCurs = (CursorPtr)xalloc(sizeof(CursorRec) + sizeof(CursorBits)); + pCurs = (CursorPtr)xcalloc(sizeof(CursorRec) + sizeof(CursorBits), 1); if (!pCurs) { xfree(psrcbits); @@ -196,7 +196,7 @@ AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, bits->height = cm->height; bits->xhot = cm->xhot; bits->yhot = cm->yhot; - pCurs->refcnt = 0; + pCurs->refcnt = 1; CheckForEmptyMask(bits); pCurs->bits = bits; @@ -215,6 +215,8 @@ AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, /* * realize the cursor for every screen + * Do not change the refcnt, this will be changed when ChangeToCursor + * actually changes the sprite. */ for (nscr = 0; nscr < screenInfo.numScreens; nscr++) { @@ -223,7 +225,6 @@ AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, { if (DevHasCursor(pDev)) { - pCurs->refcnt++; if (!( *pscr->RealizeCursor)(pDev, pscr, pCurs)) { /* Realize failed for device pDev on screen pscr. @@ -325,7 +326,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, } if (pShare) { - pCurs = (CursorPtr)xalloc(sizeof(CursorRec)); + pCurs = (CursorPtr)xcalloc(sizeof(CursorRec), 1); if (!pCurs) return BadAlloc; bits = pShare->bits; @@ -367,7 +368,8 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, } if (sourcefont != maskfont) { - pCurs = (CursorPtr)xalloc(sizeof(CursorRec) + sizeof(CursorBits)); + pCurs = + (CursorPtr)xcalloc(sizeof(CursorRec) + sizeof(CursorBits), 1); if (pCurs) bits = (CursorBitsPtr)((char *)pCurs + sizeof(CursorRec)); else @@ -375,9 +377,9 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, } else { - pCurs = (CursorPtr)xalloc(sizeof(CursorRec)); + pCurs = (CursorPtr)xcalloc(sizeof(CursorRec), 1); if (pCurs) - bits = (CursorBitsPtr)xalloc(sizeof(CursorBits)); + bits = (CursorBitsPtr)xcalloc(sizeof(CursorBits), 1); else bits = (CursorBitsPtr)NULL; } @@ -417,9 +419,10 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, sharedGlyphs = pShare; } } + CheckForEmptyMask(bits); pCurs->bits = bits; - pCurs->refcnt = 0; + pCurs->refcnt = 1; #ifdef XFIXES pCurs->serialNumber = ++cursorSerial; pCurs->name = None; @@ -440,38 +443,10 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, { pscr = screenInfo.screens[nscr]; - pCurs->refcnt++; - if (!(*pscr->RealizeCursor)(inputInfo.pointer, pscr, pCurs)) - { - DeviceIntPtr pDevIt = inputInfo.devices; /*dev iterator*/ - /* Realize for core pointer failed. Unrealize everything from - * previous screens. - */ - while (--nscr >= 0) - { - pscr = screenInfo.screens[nscr]; - /* now unrealize all devices on previous screens */ - ( *pscr->UnrealizeCursor)(inputInfo.pointer, pscr, pCurs); - - pDevIt = inputInfo.devices; - while (pDevIt) - { - if (DevHasCursor(pDevIt)) - ( *pscr->UnrealizeCursor)(pDevIt, pscr, pCurs); - pDevIt = pDevIt->next; - } - ( *pscr->UnrealizeCursor)(pDev, pscr, pCurs); - } - FreeCursorBits(bits); - xfree(pCurs); - return BadAlloc; - } - for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (DevHasCursor(pDev)) { - pCurs->refcnt++; if (!( *pscr->RealizeCursor)(pDev, pscr, pCurs)) { /* Realize failed for device pDev on screen pscr. diff --git a/dix/events.c b/dix/events.c index a51a56c1d..c482f5c74 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4024,7 +4024,6 @@ ProcGrabPointer(ClientPtr client) oldCursor = grab->cursor; } tempGrab.cursor = cursor; - /* FIXME: refcnt?? */ tempGrab.resource = client->clientAsMask; tempGrab.ownerEvents = stuff->ownerEvents; tempGrab.eventMask = stuff->eventMask; diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index a9ce21156..2c740018c 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -174,7 +174,7 @@ xf86ActivateDevice(LocalDevicePtr local) dev->spriteInfo->spriteOwner = !(local->flags & XI86_SHARED_POINTER); #ifdef XKB - if (!IsPointerDevice(dev)) + if (!DeviceIsPointerType(dev)) { /* FIXME: that's not the nice way to do it. XKB wraps the previously * set procs, so if we don't have them here, our event will disappear diff --git a/include/extinit.h b/include/extinit.h index ead59be24..7a12b1be9 100644 --- a/include/extinit.h +++ b/include/extinit.h @@ -142,6 +142,11 @@ IResetProc( ExtensionEntry * /* unused */ ); +Bool +DeviceIsPointerType( + DeviceIntPtr dev + ); + void AssignTypeAndName ( DeviceIntPtr /* dev */, From a12054757d21edacc1c24c3077b9214726652829 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 2 Apr 2007 11:20:44 +0930 Subject: [PATCH 078/634] Xi: fix ProcXListInputDevices to include the virtual core devices. --- Xi/listdev.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Xi/listdev.c b/Xi/listdev.c index 02d55ad4c..33266ae4c 100644 --- a/Xi/listdev.c +++ b/Xi/listdev.c @@ -116,6 +116,10 @@ ProcXListInputDevices(register ClientPtr client) AddOtherInputDevices(); + SizeDeviceInfo(inputInfo.keyboard, &namesize, &size); + SizeDeviceInfo(inputInfo.pointer, &namesize, &size); + numdevs = 2; + for (d = inputInfo.devices; d; d = d->next) { SizeDeviceInfo(d, &namesize, &size); numdevs++; @@ -132,6 +136,11 @@ ProcXListInputDevices(register ClientPtr client) savbuf = devbuf; dev = (xDeviceInfoPtr) devbuf; + ListDeviceInfo(client, inputInfo.keyboard, dev++, + &devbuf, &classbuf, &namebuf); + ListDeviceInfo(client, inputInfo.pointer, dev++, + &devbuf, &classbuf, &namebuf); + for (d = inputInfo.devices; d; d = d->next, dev++) ListDeviceInfo(client, d, dev, &devbuf, &classbuf, &namebuf); for (d = inputInfo.off_devices; d; d = d->next, dev++) From 96ce17aa94413c4b8bcb61cae71167050130a307 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 15 Nov 2006 17:50:02 +1030 Subject: [PATCH 079/634] o fix minor error in comment for GetPointerEvents() --- dix/getevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/getevents.c b/dix/getevents.c index 3f636bc80..219d1a1c8 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -470,7 +470,7 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type, /** - * Generate a series of xEvents (returned in xE) representing pointer + * Generate a series of xEvents (returned in events) representing pointer * motion, or button presses. Xi and XKB-aware. * * events is not NULL-terminated; the return value is the number of events. From 9b0b3406682b5a3161e6c3895771523214c37207 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 3 Apr 2007 15:06:26 +0930 Subject: [PATCH 080/634] Make GrabDevice differ between core grabs and device grabs. --- Xi/grabdev.c | 2 +- dix/events.c | 16 +++++++++------- include/dix.h | 3 ++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Xi/grabdev.c b/Xi/grabdev.c index e2809efb1..143b98c73 100644 --- a/Xi/grabdev.c +++ b/Xi/grabdev.c @@ -141,7 +141,7 @@ ProcXGrabDevice(ClientPtr client) error = GrabDevice(client, dev, stuff->this_device_mode, stuff->other_devices_mode, stuff->grabWindow, stuff->ownerEvents, stuff->time, - tmp[stuff->deviceid].mask, &rep.status); + tmp[stuff->deviceid].mask, &rep.status, FALSE); if (error != Success) { SendErrorToClient(client, IReqCode, X_GrabDevice, 0, error); diff --git a/dix/events.c b/dix/events.c index de8ff9b6b..03d82e911 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4110,12 +4110,14 @@ ProcUngrabPointer(ClientPtr client) int GrabDevice(ClientPtr client, DeviceIntPtr dev, unsigned this_mode, unsigned other_mode, Window grabWindow, - unsigned ownerEvents, Time ctime, Mask mask, CARD8 *status) + unsigned ownerEvents, Time ctime, Mask mask, CARD8 *status, + Bool coreGrab) { WindowPtr pWin; GrabPtr grab; TimeStamp time; int rc; + GrabInfoPtr grabInfo = (coreGrab) ? &dev->coreGrab : &dev->deviceGrab; UpdateCurrentTime(); if ((this_mode != GrabModeSync) && (this_mode != GrabModeAsync)) @@ -4137,16 +4139,16 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, if (rc != Success) return rc; time = ClientTimeToServerTime(ctime); - grab = dev->coreGrab.grab; + grab = grabInfo->grab; if (grab && !SameClient(grab, client)) *status = AlreadyGrabbed; else if (!pWin->realized) *status = GrabNotViewable; else if ((CompareTimeStamps(time, currentTime) == LATER) || - (CompareTimeStamps(time, dev->coreGrab.grabTime) == EARLIER)) + (CompareTimeStamps(time, grabInfo->grabTime) == EARLIER)) *status = GrabInvalidTime; - else if (dev->coreGrab.sync.frozen && - dev->coreGrab.sync.other && !SameClient(dev->coreGrab.sync.other, client)) + else if (grabInfo->sync.frozen && + grabInfo->sync.other && !SameClient(grabInfo->sync.other, client)) *status = GrabFrozen; else { @@ -4164,7 +4166,7 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, tempGrab.device = dev; tempGrab.cursor = NULL; - (*dev->coreGrab.ActivateGrab)(dev, &tempGrab, time, FALSE); + (*grabInfo->ActivateGrab)(dev, &tempGrab, time, FALSE); *status = GrabSuccess; } return Success; @@ -4184,7 +4186,7 @@ ProcGrabKeyboard(ClientPtr client) result = GrabDevice(client, keyboard, stuff->keyboardMode, stuff->pointerMode, stuff->grabWindow, stuff->ownerEvents, stuff->time, - KeyPressMask | KeyReleaseMask, &rep.status); + KeyPressMask | KeyReleaseMask, &rep.status, TRUE); else { result = Success; rep.status = AlreadyGrabbed; diff --git a/include/dix.h b/include/dix.h index 2ad6c77fa..1b112a1ca 100644 --- a/include/dix.h +++ b/include/dix.h @@ -485,7 +485,8 @@ extern int GrabDevice( unsigned /* ownerEvents */, Time /* ctime */, Mask /* mask */, - CARD8 * /* status */); + CARD8 * /* status */, + Bool /* coreGrab */); extern void InitEvents(void); extern void InitSprite( From f09ee168e234d0a9416e15f2916726b975cad293 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 3 Apr 2007 15:07:00 +0930 Subject: [PATCH 081/634] Revert "o fix minor error in comment for GetPointerEvents()" This reverts commit 96ce17aa94413c4b8bcb61cae71167050130a307. --- dix/getevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/getevents.c b/dix/getevents.c index 219d1a1c8..3f636bc80 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -470,7 +470,7 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type, /** - * Generate a series of xEvents (returned in events) representing pointer + * Generate a series of xEvents (returned in xE) representing pointer * motion, or button presses. Xi and XKB-aware. * * events is not NULL-terminated; the return value is the number of events. From 207f710d16337839c2427aa16fad70a49834153e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 3 Apr 2007 19:02:14 +0930 Subject: [PATCH 082/634] Delete all grabs from all devices when deleting a window. --- dix/events.c | 118 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 69 insertions(+), 49 deletions(-) diff --git a/dix/events.c b/dix/events.c index 03d82e911..94e60dc81 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4637,7 +4637,7 @@ DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) WindowPtr parent; DeviceIntPtr mouse = inputInfo.pointer; DeviceIntPtr keybd = inputInfo.keyboard; - FocusClassPtr focus = keybd->focus; + FocusClassPtr focus; OtherClientsPtr oc; GrabPtr passive; GrabPtr grab; @@ -4650,62 +4650,82 @@ DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) ((grab->window == pWin) || (grab->confineTo == pWin))) (*mouse->coreGrab.DeactivateGrab)(mouse); - /* Deactivating a keyboard grab should cause focus events. */ + /* Deactivating a keyboard grab should cause focus events. */ grab = keybd->coreGrab.grab; if (grab && (grab->window == pWin)) (*keybd->coreGrab.DeactivateGrab)(keybd); - /* If the focus window is a root window (ie. has no parent) then don't - delete the focus from it. */ - - if ((pWin == focus->win) && (pWin->parent != NullWindow)) + /* And now the real devices */ + for (mouse = inputInfo.devices; mouse; mouse = mouse->next) { - int focusEventMode = NotifyNormal; - - /* If a grab is in progress, then alter the mode of focus events. */ - - if (keybd->coreGrab.grab) - focusEventMode = NotifyWhileGrabbed; - - switch (focus->revert) - { - case RevertToNone: - DoFocusEvents(keybd, pWin, NoneWin, focusEventMode); - focus->win = NoneWin; - focus->traceGood = 0; - break; - case RevertToParent: - parent = pWin; - do - { - parent = parent->parent; - focus->traceGood--; - } while (!parent->realized -/* This would be a good protocol change -- windows being reparented - during SaveSet processing would cause the focus to revert to the - nearest enclosing window which will survive the death of the exiting - client, instead of ending up reverting to a dying window and thence - to None - */ -#ifdef NOTDEF - || clients[CLIENT_ID(parent->drawable.id)]->clientGone -#endif - ); - DoFocusEvents(keybd, pWin, parent, focusEventMode); - focus->win = parent; - focus->revert = RevertToNone; - break; - case RevertToPointerRoot: - DoFocusEvents(keybd, pWin, PointerRootWin, focusEventMode); - focus->win = PointerRootWin; - focus->traceGood = 0; - break; - } + grab = mouse->coreGrab.grab; + if (grab && ((grab->window == pWin) || (grab->confineTo == pWin))) + (*mouse->coreGrab.DeactivateGrab)(mouse); } - if (mouse->valuator->motionHintWindow == pWin) - mouse->valuator->motionHintWindow = NullWindow; + + for (keybd = inputInfo.devices; keybd; keybd = keybd->next) + { + if (IsKeyboardDevice(keybd)) + { + focus = keybd->focus; + + /* If the focus window is a root window (ie. has no parent) then don't + delete the focus from it. */ + + if ((pWin == focus->win) && (pWin->parent != NullWindow)) + { + int focusEventMode = NotifyNormal; + + /* If a grab is in progress, then alter the mode of focus events. */ + + if (keybd->coreGrab.grab) + focusEventMode = NotifyWhileGrabbed; + + switch (focus->revert) + { + case RevertToNone: + DoFocusEvents(keybd, pWin, NoneWin, focusEventMode); + focus->win = NoneWin; + focus->traceGood = 0; + break; + case RevertToParent: + parent = pWin; + do + { + parent = parent->parent; + focus->traceGood--; + } while (!parent->realized + /* This would be a good protocol change -- windows being reparented + during SaveSet processing would cause the focus to revert to the + nearest enclosing window which will survive the death of the exiting + client, instead of ending up reverting to a dying window and thence + to None + */ +#ifdef NOTDEF + || clients[CLIENT_ID(parent->drawable.id)]->clientGone +#endif + ); + DoFocusEvents(keybd, pWin, parent, focusEventMode); + focus->win = parent; + focus->revert = RevertToNone; + break; + case RevertToPointerRoot: + DoFocusEvents(keybd, pWin, PointerRootWin, focusEventMode); + focus->win = PointerRootWin; + focus->traceGood = 0; + break; + } + } + } + + if (IsPointerDevice(keybd)) + { + if (keybd->valuator->motionHintWindow == pWin) + keybd->valuator->motionHintWindow = NullWindow; + } + } if (freeResources) { From 676188531b2bd7679ee1831b5c517df3e6d215c5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 4 Apr 2007 17:35:06 +0930 Subject: [PATCH 083/634] Unrealize cursor only once, not per device. --- dix/cursor.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dix/cursor.c b/dix/cursor.c index 5886422d5..709c71dd2 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -123,11 +123,7 @@ FreeCursor(pointer value, XID cid) for (nscr = 0; nscr < screenInfo.numScreens; nscr++) { pscr = screenInfo.screens[nscr]; - for(pDev = inputInfo.devices; pDev; pDev = pDev->next) - { - if (DevHasCursor(pDev)) - (void)( *pscr->UnrealizeCursor)(pDev, pscr, pCurs); - } + (void)( *pscr->UnrealizeCursor)(pDev, pscr, pCurs); } FreeCursorBits(pCurs->bits); xfree( pCurs); From 7f36ba57062096e9c67889d5b7dd64e2fb0004e7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 4 Apr 2007 17:38:10 +0930 Subject: [PATCH 084/634] Allow for multiple animated cursors. --- render/animcur.c | 90 ++++++++++++++++++++++++++++-------------------- 1 file changed, 53 insertions(+), 37 deletions(-) diff --git a/render/animcur.c b/render/animcur.c index 7bddc0dad..1172877dc 100644 --- a/render/animcur.c +++ b/render/animcur.c @@ -80,7 +80,8 @@ typedef struct _AnimCurState { CARD32 time; } AnimCurStateRec, *AnimCurStatePtr; -static AnimCurStateRec animCurState; +/* What a waste. But we need an API change to alloc it per device only. */ +static AnimCurStateRec animCurState[MAX_DEVICES]; static unsigned char empty[4]; @@ -175,35 +176,47 @@ AnimCurScreenBlockHandler (int screenNum, { ScreenPtr pScreen = screenInfo.screens[screenNum]; AnimCurScreenPtr as = GetAnimCurScreen(pScreen); + DeviceIntPtr dev; + CARD32 now = 0, + soonest = ~0; /* earliest time to wakeup again */ - if (pScreen == animCurState.pScreen) + for (dev = inputInfo.devices; dev; dev = dev->next) { - CARD32 now = GetTimeInMillis (); - - if ((INT32) (now - animCurState.time) >= 0) + if (IsPointerDevice(dev) && pScreen == animCurState[dev->id].pScreen) { - AnimCurPtr ac = GetAnimCur(animCurState.pCursor); - int elt = (animCurState.elt + 1) % ac->nelt; - DisplayCursorProcPtr DisplayCursor; + if (!now) now = GetTimeInMillis (); - /* - * Not a simple Unwrap/Wrap as this - * isn't called along the DisplayCursor - * wrapper chain. - */ - DisplayCursor = pScreen->DisplayCursor; - pScreen->DisplayCursor = as->DisplayCursor; - (void) (*pScreen->DisplayCursor) (inputInfo.pointer, - pScreen, - ac->elts[elt].pCursor); - as->DisplayCursor = pScreen->DisplayCursor; - pScreen->DisplayCursor = DisplayCursor; + if ((INT32) (now - animCurState[dev->id].time) >= 0) + { + AnimCurPtr ac = GetAnimCur(animCurState[dev->id].pCursor); + int elt = (animCurState[dev->id].elt + 1) % ac->nelt; + DisplayCursorProcPtr DisplayCursor; - animCurState.elt = elt; - animCurState.time = now + ac->elts[elt].delay; + /* + * Not a simple Unwrap/Wrap as this + * isn't called along the DisplayCursor + * wrapper chain. + */ + DisplayCursor = pScreen->DisplayCursor; + pScreen->DisplayCursor = as->DisplayCursor; + (void) (*pScreen->DisplayCursor) (dev, + pScreen, + ac->elts[elt].pCursor); + as->DisplayCursor = pScreen->DisplayCursor; + pScreen->DisplayCursor = DisplayCursor; + + animCurState[dev->id].elt = elt; + animCurState[dev->id].time = now + ac->elts[elt].delay; + } + + if (soonest > animCurState[dev->id].time) + soonest = animCurState[dev->id].time; } - AdjustWaitForDelay (pTimeout, animCurState.time - now); } + + if (now) + AdjustWaitForDelay (pTimeout, soonest - now); + Unwrap (as, pScreen, BlockHandler); (*pScreen->BlockHandler) (screenNum, blockData, pTimeout, pReadmask); Wrap (as, pScreen, BlockHandler, AnimCurScreenBlockHandler); @@ -220,7 +233,7 @@ AnimCurDisplayCursor (DeviceIntPtr pDev, Unwrap (as, pScreen, DisplayCursor); if (IsAnimCur(pCursor)) { - if (pCursor != animCurState.pCursor) + if (pCursor != animCurState[pDev->id].pCursor) { AnimCurPtr ac = GetAnimCur(pCursor); @@ -228,10 +241,10 @@ AnimCurDisplayCursor (DeviceIntPtr pDev, (pDev, pScreen, ac->elts[0].pCursor); if (ret) { - animCurState.elt = 0; - animCurState.time = GetTimeInMillis () + ac->elts[0].delay; - animCurState.pCursor = pCursor; - animCurState.pScreen = pScreen; + animCurState[pDev->id].elt = 0; + animCurState[pDev->id].time = GetTimeInMillis () + ac->elts[0].delay; + animCurState[pDev->id].pCursor = pCursor; + animCurState[pDev->id].pScreen = pScreen; } } else @@ -239,8 +252,8 @@ AnimCurDisplayCursor (DeviceIntPtr pDev, } else { - animCurState.pCursor = 0; - animCurState.pScreen = 0; + animCurState[pDev->id].pCursor = 0; + animCurState[pDev->id].pScreen = 0; ret = (*pScreen->DisplayCursor) (pDev, pScreen, pCursor); } Wrap (as, pScreen, DisplayCursor, AnimCurDisplayCursor); @@ -258,8 +271,8 @@ AnimCurSetCursorPosition (DeviceIntPtr pDev, Bool ret; Unwrap (as, pScreen, SetCursorPosition); - if (animCurState.pCursor) - animCurState.pScreen = pScreen; + if (animCurState[pDev->id].pCursor) + animCurState[pDev->id].pScreen = pScreen; ret = (*pScreen->SetCursorPosition) (pDev, pScreen, x, y, generateEvent); Wrap (as, pScreen, SetCursorPosition, AnimCurSetCursorPosition); return ret; @@ -324,7 +337,7 @@ AnimCurRecolorCursor (DeviceIntPtr pDev, for (i = 0; i < ac->nelt; i++) (*pScreen->RecolorCursor) (pDev, pScreen, ac->elts[i].pCursor, displayed && - animCurState.elt == i); + animCurState[pDev->id].elt == i); } else (*pScreen->RecolorCursor) (pDev, pScreen, pCursor, displayed); @@ -338,14 +351,17 @@ AnimCurInit (ScreenPtr pScreen) if (AnimCurGeneration != serverGeneration) { + int i; AnimCurScreenPrivateIndex = AllocateScreenPrivateIndex (); if (AnimCurScreenPrivateIndex < 0) return FALSE; AnimCurGeneration = serverGeneration; - animCurState.pCursor = 0; - animCurState.pScreen = 0; - animCurState.elt = 0; - animCurState.time = 0; + for (i = 0; i < MAX_DEVICES; i++) { + animCurState[i].pCursor = 0; + animCurState[i].pScreen = 0; + animCurState[i].elt = 0; + animCurState[i].time = 0; + } } as = (AnimCurScreenPtr) xalloc (sizeof (AnimCurScreenRec)); if (!as) From 5c4deb71a1cb981ea7e2e25d2b3a1179f27efa5a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 5 Apr 2007 14:21:46 +0930 Subject: [PATCH 085/634] Synthesize WarpPointer events for the actual device rather than the VCP. --- mi/mipointer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mi/mipointer.c b/mi/mipointer.c index 863a4052a..b9f54c18c 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -467,7 +467,6 @@ static void miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, unsigned long time) { - int valuators[2]; miPointerPtr pPointer = MIPOINTER(pDev); SetupScreen(pScreen); @@ -574,9 +573,8 @@ miPointerMove (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, unsigned long } } - nevents = GetPointerEvents(events, inputInfo.pointer, MotionNotify, 0, - POINTER_ABSOLUTE, 0, 2, valuators); + nevents = GetPointerEvents(events, pDev, MotionNotify, 0, POINTER_ABSOLUTE, 0, 2, valuators); for (i = 0; i < nevents; i++) - mieqEnqueue(inputInfo.pointer, &events[i]); + mieqEnqueue(pDev, &events[i]); } From aa77ffb510abe004802ab9acc6996e4c6fe3ebb2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 9 Apr 2007 18:27:22 +0930 Subject: [PATCH 086/634] Fix: pick new ClientPointer when device is closed. --- dix/devices.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index 411188d8f..30c267094 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -556,7 +556,10 @@ CloseDevice(DeviceIntPtr dev) for (j = 0; j < currentMaxClients; j++) { if (clients[j]->clientPtr == dev) - PickPointer(clients[j]); + { + clients[j]->clientPtr = NULL; + clients[j]->clientPtr = PickPointer(clients[j]); + } } if (dev->devPrivates) From 00b1d52f4103a07568dcebcdaa860b9b51f19b4d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 9 Apr 2007 18:32:00 +0930 Subject: [PATCH 087/634] Adding some comments to devices.c. --- dix/devices.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/dix/devices.c b/dix/devices.c index 30c267094..a08053516 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -85,6 +85,9 @@ static int CoreDevicePrivatesGeneration = -1; /* The client that is allowed to change pointer-keyboard pairings. */ static ClientPtr pairingClient = NULL; +/** + * Alloc memory for new sprite, reset to default values + */ DeviceIntPtr AddInputDevice(DeviceProc deviceProc, Bool autoStart) { @@ -163,6 +166,12 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart) return dev; } +/** + * Enable the device through the driver, initialize the DIX sprite or pair the + * device, add the device to the device list. + * + * After calling EnableDevice(), a device can and will send events. + */ Bool EnableDevice(DeviceIntPtr dev) { @@ -194,6 +203,9 @@ EnableDevice(DeviceIntPtr dev) return TRUE; } +/** + * Shut device down through drivers, remove from device list. + */ Bool DisableDevice(DeviceIntPtr dev) { @@ -341,6 +353,14 @@ CorePointerProc(DeviceIntPtr pDev, int what) return Success; } +/** + * Initialize a virtual core keyboard and a virtual core pointer. + * + * Both devices are not tied to physical devices, but guarantee that there is + * always a keyboard and a pointer present and keep the protocol semantics. + * Both core devices are NOT part of the device list and act only as a + * fallback if no physical device is available. + */ void InitCoreDevices() { @@ -422,6 +442,13 @@ InitCoreDevices() } } +/** + * Activate and enable all devices. + * + * After InitAndStartDevices() all devices are finished with their setup + * routines and start emitting events. + * Each physical keyboard is paired with the first available unpaired pointer. + */ int InitAndStartDevices() { @@ -459,6 +486,9 @@ InitAndStartDevices() return Success; } +/** + * Shut down device and free memory. + */ static void CloseDevice(DeviceIntPtr dev) { From 6081b8c76f7d934bd4e9584a2f6d55636c5289d2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 9 Apr 2007 18:35:47 +0930 Subject: [PATCH 088/634] Don't explicitly init sprite for VCP, EnableDevice() will take care of that. --- dix/devices.c | 1 - 1 file changed, 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index a08053516..4794d6f79 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -424,7 +424,6 @@ InitCoreDevices() if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) FatalError("Couldn't allocate pointer devPrivates\n"); dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; - InitializeSprite(dev, NullWindow); (void)ActivateDevice(dev); /* Enable device, and then remove it from the device list. Virtual From 7cef789fa13ae53bfba6dc7b5a7928b7362b2522 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 9 Apr 2007 18:37:48 +0930 Subject: [PATCH 089/634] Close down virtual core devices when closing all devices. --- dix/devices.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dix/devices.c b/dix/devices.c index 4794d6f79..2b55679ed 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -605,6 +605,9 @@ CloseDownDevices() { DeviceIntPtr dev, next; + CloseDevice(inputInfo.keyboard); + CloseDevice(inputInfo.pointer); + for (dev = inputInfo.devices; dev; dev = next) { next = dev->next; From f1f8b562aaaa6ec32ab0d0697f964d92d6d536a4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 9 Apr 2007 19:31:59 +0930 Subject: [PATCH 090/634] Alloc sprite memory in devices' devPrivates, allow undisplaying cursors. Improve memory usage by allocating the sprite's memory only to devices that actually have a sprite and provide means to remove a device's cursor from the screen (more hotplugging, yay!). This commit breaks ScreenRec's ABI. --- dix/devices.c | 37 +++- dix/main.c | 2 + hw/xfree86/common/xf86Events.c | 10 +- include/dix.h | 4 + include/input.h | 2 + include/scrnintstr.h | 16 ++ mi/midispcur.c | 165 ++++++++--------- mi/mipointer.c | 141 +++++++++----- mi/mipointer.h | 12 ++ mi/misprite.c | 327 +++++++++++++++++---------------- mi/misprite.h | 8 + mi/mispritest.h | 13 +- 12 files changed, 444 insertions(+), 293 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 2b55679ed..0a91997ea 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -225,18 +225,29 @@ DisableDevice(DeviceIntPtr dev) return TRUE; } +/** + * Initialize device through driver, allocate memory for cursor sprite (if + * applicable) and send a PresenceNotify event to all clients. + * + * Must be called before EnableDevice. + */ int ActivateDevice(DeviceIntPtr dev) { int ret = Success; devicePresenceNotify ev; DeviceIntRec dummyDev; + ScreenPtr pScreen = screenInfo.screens[0]; if (!dev || !dev->deviceProc) return BadImplementation; ret = (*dev->deviceProc) (dev, DEVICE_INIT); dev->inited = (ret == Success); + + /* Initialize memory for sprites. */ + if (IsPointerDevice(dev)) + pScreen->DeviceCursorInitialize(dev, pScreen); ev.type = DevicePresenceNotify; ev.time = currentTime.milliseconds; @@ -497,11 +508,16 @@ CloseDevice(DeviceIntPtr dev) StringFeedbackPtr s, snext; BellFeedbackPtr b, bnext; LedFeedbackPtr l, lnext; + ScreenPtr screen = screenInfo.screens[0]; int j; if (dev->inited) (void)(*dev->deviceProc)(dev, DEVICE_CLOSE); + /* free sprite memory */ + if (IsPointerDevice(dev)) + screen->DeviceCursorCleanup(dev, screen); + xfree(dev->name); if (dev->key) { @@ -624,6 +640,22 @@ CloseDownDevices() inputInfo.pointer = NULL; } +/** + * Remove the cursor sprite for all devices. This needs to be done before any + * resources are freed or any device is deleted. + */ +void +UndisplayDevices() +{ + DeviceIntPtr dev; + ScreenPtr screen = screenInfo.screens[0]; + + for (dev = inputInfo.devices; dev; dev = dev->next) + { + screen->UndisplayCursor(dev, screen); + } +} + int RemoveDevice(DeviceIntPtr dev) { @@ -631,23 +663,26 @@ RemoveDevice(DeviceIntPtr dev) int ret = BadMatch; devicePresenceNotify ev; DeviceIntRec dummyDev; + ScreenPtr screen = screenInfo.screens[0]; DebugF("(dix) removing device %d\n", dev->id); if (!dev || dev == inputInfo.keyboard || dev == inputInfo.pointer) return BadImplementation; + screen->UndisplayCursor(dev, screen); + prev = NULL; for (tmp = inputInfo.devices; tmp; (prev = tmp), (tmp = next)) { next = tmp->next; if (tmp == dev) { - CloseDevice(tmp); if (prev==NULL) inputInfo.devices = next; else prev->next = next; + CloseDevice(tmp); ret = Success; } } diff --git a/dix/main.c b/dix/main.c index 92c30b639..c7a0f6b7b 100644 --- a/dix/main.c +++ b/dix/main.c @@ -466,6 +466,8 @@ main(int argc, char *argv[], char *envp[]) Dispatch(); + UndisplayDevices(); + /* Now free up whatever must be freed */ if (screenIsSaved == SCREEN_SAVER_ON) SaveScreens(SCREEN_SAVER_OFF, ScreenSaverReset); diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 84588996d..f826b3bc7 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -247,9 +247,13 @@ ProcessInputEvents () mieqProcessInputEvents(); - /* FIXME: This is a problem if we have multiple pointers */ - miPointerGetPosition(inputInfo.pointer, &x, &y); - xf86SetViewport(xf86Info.currentScreen, x, y); + /* PIE can be called after devices have been shut down. Blame DGA. */ + if (inputInfo.pointer) + { + /* FIXME: This is a problem if we have multiple pointers */ + miPointerGetPosition(inputInfo.pointer, &x, &y); + xf86SetViewport(xf86Info.currentScreen, x, y); + } } void diff --git a/include/dix.h b/include/dix.h index 1b112a1ca..385f56cc8 100644 --- a/include/dix.h +++ b/include/dix.h @@ -424,6 +424,10 @@ extern int DeliverDeviceEvents( extern void DefineInitialRootWindow( WindowPtr /* win */); +extern void SetupSprite( + DeviceIntPtr /* pDev */, + ScreenPtr /* pScreen */); + extern void InitializeSprite( DeviceIntPtr /* pDev */, WindowPtr /* pWin */); diff --git a/include/input.h b/include/input.h index 765d71dc3..2debce93c 100644 --- a/include/input.h +++ b/include/input.h @@ -190,6 +190,8 @@ extern int InitAndStartDevices(void); extern void CloseDownDevices(void); +extern void UndisplayDevices(void); + extern int RemoveDevice( DeviceIntPtr /*dev*/); diff --git a/include/scrnintstr.h b/include/scrnintstr.h index 0d468c338..3cfd6c381 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -431,6 +431,18 @@ typedef void (* MarkUnrealizedWindowProcPtr)( WindowPtr /*pWin*/, Bool /*fromConfigure*/); +typedef void (* UndisplayCursorProcPtr)( + DeviceIntPtr /* pDev */, + ScreenPtr /* pScreen */); + +typedef Bool (* DeviceCursorInitializeProcPtr)( + DeviceIntPtr /* pDev */, + ScreenPtr /* pScreen */); + +typedef void (* DeviceCursorCleanupProcPtr)( + DeviceIntPtr /* pDev */, + ScreenPtr /* pScreen */); + typedef struct _Screen { int myNum; /* index of this instance in Screens[] */ ATOM id; @@ -587,6 +599,10 @@ typedef struct _Screen { ChangeBorderWidthProcPtr ChangeBorderWidth; MarkUnrealizedWindowProcPtr MarkUnrealizedWindow; + /* Device cursor procedures */ + UndisplayCursorProcPtr UndisplayCursor; + DeviceCursorInitializeProcPtr DeviceCursorInitialize; + DeviceCursorCleanupProcPtr DeviceCursorCleanup; } ScreenRec; typedef struct _ScreenInfo { diff --git a/mi/midispcur.c b/mi/midispcur.c index 35f0fbaa7..d4471f9e5 100644 --- a/mi/midispcur.c +++ b/mi/midispcur.c @@ -67,6 +67,9 @@ static unsigned long miDCGeneration = 0; static Bool miDCCloseScreen(int index, ScreenPtr pScreen); +/* per device private data */ +static int miDCSpriteIndex; + typedef struct { GCPtr pSourceGC, pMaskGC; GCPtr pSaveGC, pRestoreGC; @@ -79,13 +82,16 @@ typedef struct { #endif } miDCBufferRec, *miDCBufferPtr; +#define MIDCBUFFER(dev) \ + ((DevHasCursor(dev)) ? \ + (miDCBufferPtr)dev->devPrivates[miDCSpriteIndex].ptr :\ + (miDCBufferPtr)inputInfo.pointer->devPrivates[miDCSpriteIndex].ptr) + /* * The core pointer buffer will point to the index of the virtual core pointer * in the pCursorBuffers array. */ typedef struct { - miDCBufferPtr pCoreBuffer; /* for core pointer */ - miDCBufferPtr pCursorBuffers; /* one for each device */ CloseScreenProcPtr CloseScreen; } miDCScreenRec, *miDCScreenPtr; @@ -121,6 +127,9 @@ static Bool miDCChangeSave(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, int w, int h, int dx, int dy); +static Bool miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen); +static void miDCDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen); + static miSpriteCursorFuncRec miDCFuncs = { miDCRealizeCursor, miDCUnrealizeCursor, @@ -129,6 +138,8 @@ static miSpriteCursorFuncRec miDCFuncs = { miDCRestoreUnderCursor, miDCMoveCursor, miDCChangeSave, + miDCDeviceInitialize, + miDCDeviceCleanup }; _X_EXPORT Bool @@ -137,8 +148,6 @@ miDCInitialize (pScreen, screenFuncs) miPointerScreenFuncPtr screenFuncs; { miDCScreenPtr pScreenPriv; - miDCBufferPtr pBuffer; - int mpBufferIdx; if (miDCGeneration != serverGeneration) { @@ -151,41 +160,8 @@ miDCInitialize (pScreen, screenFuncs) if (!pScreenPriv) return FALSE; - /* - * initialize the entire private structure to zeros - */ - - pScreenPriv->pCursorBuffers = (miDCBufferPtr)xalloc(MAX_DEVICES * - sizeof(miDCBufferRec)); - if (!pScreenPriv->pCursorBuffers) - { - xfree((pointer)pScreenPriv); - return FALSE; - } - - /* virtual core pointer ID is 1 */ - pScreenPriv->pCoreBuffer = &pScreenPriv->pCursorBuffers[1]; - - mpBufferIdx = 0; - while(mpBufferIdx < MAX_DEVICES) - { - pBuffer = &pScreenPriv->pCursorBuffers[mpBufferIdx]; - pBuffer->pSourceGC = - pBuffer->pMaskGC = - pBuffer->pSaveGC = - pBuffer->pRestoreGC = - pBuffer->pMoveGC = - pBuffer->pPixSourceGC = - pBuffer->pPixMaskGC = NULL; -#ifdef ARGB_CURSOR - pBuffer->pRootPicture = NULL; - pBuffer->pTempPicture = NULL; -#endif - pBuffer->pSave = pBuffer->pTemp = NULL; - - mpBufferIdx++; - } + miDCSpriteIndex = AllocateDevicePrivateIndex(); pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = miDCCloseScreen; @@ -194,7 +170,6 @@ miDCInitialize (pScreen, screenFuncs) if (!miSpriteInitialize (pScreen, &miDCFuncs, screenFuncs)) { - xfree ((pointer) pScreenPriv->pCursorBuffers); xfree ((pointer) pScreenPriv); return FALSE; } @@ -211,38 +186,10 @@ miDCCloseScreen (index, pScreen) ScreenPtr pScreen; { miDCScreenPtr pScreenPriv; - miDCBufferPtr pBuffer; - int mpBufferIdx; pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; pScreen->CloseScreen = pScreenPriv->CloseScreen; - mpBufferIdx = 0; - while (mpBufferIdx < MAX_DEVICES) - { - pBuffer = &pScreenPriv->pCursorBuffers[mpBufferIdx]; - - tossGC (pBuffer->pSourceGC); - tossGC (pBuffer->pMaskGC); - tossGC (pBuffer->pSaveGC); - tossGC (pBuffer->pRestoreGC); - tossGC (pBuffer->pMoveGC); - tossGC (pBuffer->pPixSourceGC); - tossGC (pBuffer->pPixMaskGC); - tossPix (pBuffer->pSave); - tossPix (pBuffer->pTemp); -#ifdef ARGB_CURSOR -#if 0 /* This has been free()d before */ - tossPict (pScreenPriv->pRootPicture); -#endif - tossPict (pBuffer->pTempPicture); -#endif - - mpBufferIdx++; - } - - xfree((pointer) pScreenPriv->pCursorBuffers); - xfree ((pointer) pScreenPriv); return (*pScreen->CloseScreen) (index, pScreen); } @@ -536,10 +483,7 @@ miDCPutUpCursor (pDev, pScreen, pCursor, x, y, source, mask) } pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; pWin = WindowTable[pScreen->myNum]; - pBuffer = pScreenPriv->pCoreBuffer; - - if (DevHasCursor(pDev)) - pBuffer = &pScreenPriv->pCursorBuffers[pDev->id]; + pBuffer = MIDCBUFFER(pDev); #ifdef ARGB_CURSOR if (pPriv->pPicture) @@ -587,10 +531,7 @@ miDCSaveUnderCursor (pDev, pScreen, x, y, w, h) GCPtr pGC; pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; - pBuffer = pScreenPriv->pCoreBuffer; - - if (DevHasCursor(pDev)) - pBuffer = &pScreenPriv->pCursorBuffers[pDev->id]; + pBuffer = MIDCBUFFER(pDev); pSave = pBuffer->pSave; pWin = WindowTable[pScreen->myNum]; @@ -626,10 +567,7 @@ miDCRestoreUnderCursor (pDev, pScreen, x, y, w, h) GCPtr pGC; pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; - pBuffer = pScreenPriv->pCoreBuffer; - - if (DevHasCursor(pDev)) - pBuffer = &pScreenPriv->pCursorBuffers[pDev->id]; + pBuffer = MIDCBUFFER(pDev); pSave = pBuffer->pSave; pWin = WindowTable[pScreen->myNum]; @@ -659,10 +597,7 @@ miDCChangeSave (pDev, pScreen, x, y, w, h, dx, dy) int sourcex, sourcey, destx, desty, copyw, copyh; pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; - pBuffer = pScreenPriv->pCoreBuffer; - - if (DevHasCursor(pDev)) - pBuffer = &pScreenPriv->pCursorBuffers[pDev->id]; + pBuffer = MIDCBUFFER(pDev); pSave = pBuffer->pSave; pWin = WindowTable[pScreen->myNum]; @@ -810,10 +745,7 @@ miDCMoveCursor (pDev, pScreen, pCursor, x, y, w, h, dx, dy, source, mask) } pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; pWin = WindowTable[pScreen->myNum]; - pBuffer = pScreenPriv->pCoreBuffer; - - if (DevHasCursor(pDev)) - pBuffer = &pScreenPriv->pCursorBuffers[pDev->id]; + pBuffer = MIDCBUFFER(pDev); pTemp = pBuffer->pTemp; if (!pTemp || @@ -905,3 +837,62 @@ miDCMoveCursor (pDev, pScreen, pCursor, x, y, w, h, dx, dy, source, mask) 0, 0, w, h, x, y); return TRUE; } + +static Bool +miDCDeviceInitialize(pDev, pScreen) + DeviceIntPtr pDev; + ScreenPtr pScreen; +{ + miDCBufferPtr pBuffer; + + if (!AllocateDevicePrivate(pDev, miDCSpriteIndex)) + return FALSE; + + pBuffer = + pDev->devPrivates[miDCSpriteIndex].ptr = xalloc(sizeof(miDCBufferRec)); + + pBuffer->pSourceGC = + pBuffer->pMaskGC = + pBuffer->pSaveGC = + pBuffer->pRestoreGC = + pBuffer->pMoveGC = + pBuffer->pPixSourceGC = + pBuffer->pPixMaskGC = NULL; +#ifdef ARGB_CURSOR + pBuffer->pRootPicture = NULL; + pBuffer->pTempPicture = NULL; +#endif + pBuffer->pSave = pBuffer->pTemp = NULL; + + return TRUE; +} + +static void +miDCDeviceCleanup(pDev, pScreen) + DeviceIntPtr pDev; + ScreenPtr pScreen; +{ + miDCBufferPtr pBuffer; + + if (DevHasCursor(pDev)) + { + pBuffer = MIDCBUFFER(pDev); + tossGC (pBuffer->pSourceGC); + tossGC (pBuffer->pMaskGC); + tossGC (pBuffer->pSaveGC); + tossGC (pBuffer->pRestoreGC); + tossGC (pBuffer->pMoveGC); + tossGC (pBuffer->pPixSourceGC); + tossGC (pBuffer->pPixMaskGC); + tossPix (pBuffer->pSave); + tossPix (pBuffer->pTemp); +#ifdef ARGB_CURSOR +#if 0 /* This has been free()d before */ + tossPict (pScreenPriv->pRootPicture); +#endif + tossPict (pBuffer->pTempPicture); +#endif + xfree(pDev->devPrivates[miDCSpriteIndex].ptr); + pDev->devPrivates[miDCSpriteIndex].ptr = NULL; + } +} diff --git a/mi/mipointer.c b/mi/mipointer.c index b9f54c18c..b06a0be3e 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -54,18 +54,12 @@ static unsigned long miPointerGeneration = 0; #define GetScreenPrivate(s) ((miPointerScreenPtr) ((s)->devPrivates[miPointerScreenIndex].ptr)) #define SetupScreen(s) miPointerScreenPtr pScreenPriv = GetScreenPrivate(s) -/* - * until more than one pointer device exists. - */ +static int miPointerPrivatesIndex = 0; -static miPointerPtr miCorePointer; - -/* Multipointers - * ID of a device == index in this array. - */ -static miPointerRec miPointers[MAX_DEVICES]; #define MIPOINTER(dev) \ - (DevHasCursor((dev))) ? &miPointers[(dev)->id] : miCorePointer + ((DevHasCursor((dev))) ? \ + (miPointerPtr) dev->devPrivates[miPointerPrivatesIndex].ptr : \ + (miPointerPtr) inputInfo.pointer->devPrivates[miPointerPrivatesIndex].ptr) static Bool miPointerRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); @@ -73,6 +67,7 @@ static Bool miPointerUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); static Bool miPointerDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); +static void miPointerUndisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen); static void miPointerConstrainCursor(DeviceIntPtr pDev, ScreenPtr pScreen, BoxPtr pBox); static void miPointerPointerNonInterestBox(DeviceIntPtr pDev, @@ -87,6 +82,9 @@ static Bool miPointerCloseScreen(int index, ScreenPtr pScreen); static void miPointerMove(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, unsigned long time); +static Bool miPointerDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen); +static void miPointerDeviceCleanup(DeviceIntPtr pDev, + ScreenPtr pScreen); static xEvent* events; /* for WarpPointer MotionNotifies */ @@ -98,8 +96,6 @@ miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) Bool waitForUpdate; { miPointerScreenPtr pScreenPriv; - miPointerPtr pPointer; - int ptrIdx; if (miPointerGeneration != serverGeneration) { @@ -131,33 +127,17 @@ miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) pScreen->ConstrainCursor = miPointerConstrainCursor; pScreen->CursorLimits = miPointerCursorLimits; pScreen->DisplayCursor = miPointerDisplayCursor; + pScreen->UndisplayCursor = miPointerUndisplayCursor; + pScreen->UndisplayCursor = miPointerUndisplayCursor; pScreen->RealizeCursor = miPointerRealizeCursor; pScreen->UnrealizeCursor = miPointerUnrealizeCursor; pScreen->SetCursorPosition = miPointerSetCursorPosition; pScreen->RecolorCursor = miRecolorCursor; pScreen->PointerNonInterestBox = miPointerPointerNonInterestBox; + pScreen->DeviceCursorInitialize = miPointerDeviceInitialize; + pScreen->DeviceCursorCleanup = miPointerDeviceCleanup; - /* - * set up the pointer object - * virtual core pointer ID is always 1, so we let it point to the matching - * index in the array. - */ - miCorePointer = &miPointers[1]; - for(ptrIdx = 0; ptrIdx < MAX_DEVICES; ptrIdx++) - { - pPointer = &miPointers[ptrIdx]; - pPointer->pScreen = NULL; - pPointer->pSpriteScreen = NULL; - pPointer->pCursor = NULL; - pPointer->pSpriteCursor = NULL; - pPointer->limits.x1 = 0; - pPointer->limits.x2 = 32767; - pPointer->limits.y1 = 0; - pPointer->limits.y2 = 32767; - pPointer->confined = FALSE; - pPointer->x = 0; - pPointer->y = 0; - } + miPointerPrivatesIndex = AllocateDevicePrivateIndex(); events = NULL; return TRUE; @@ -169,20 +149,30 @@ miPointerCloseScreen (index, pScreen) ScreenPtr pScreen; { miPointerPtr pPointer; - int ptrIdx; + DeviceIntPtr pDev; SetupScreen(pScreen); - for(ptrIdx = 0; ptrIdx < MAX_DEVICES; ptrIdx++) +#if 0 + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - pPointer = &miPointers[ptrIdx]; + if (DevHasCursor(pDev)) + { + pPointer = MIPOINTER(pDev); - if (pScreen == pPointer->pScreen) - pPointer->pScreen = 0; - if (pScreen == pPointer->pSpriteScreen) - pPointer->pSpriteScreen = 0; + if (pScreen == pPointer->pScreen) + pPointer->pScreen = 0; + if (pScreen == pPointer->pSpriteScreen) + pPointer->pSpriteScreen = 0; + } } + if (MIPOINTER(inputInfo.pointer)->pScreen == pScreen) + MIPOINTER(inputInfo.pointer)->pScreen = 0; + if (MIPOINTER(inputInfo.pointer)->pSpriteScreen == pScreen) + MIPOINTER(inputInfo.pointer)->pSpriteScreen = 0; +#endif + pScreen->CloseScreen = pScreenPriv->CloseScreen; xfree ((pointer) pScreenPriv); xfree ((pointer) events); @@ -228,6 +218,15 @@ miPointerDisplayCursor (pDev, pScreen, pCursor) return TRUE; } +static void +miPointerUndisplayCursor(pDev, pScreen) + DeviceIntPtr pDev; + ScreenPtr pScreen; +{ + SetupScreen(pScreen); + (*pScreenPriv->spriteFuncs->UndisplayCursor)(pDev, pScreen); +} + static void miPointerConstrainCursor (pDev, pScreen, pBox) DeviceIntPtr pDev; @@ -281,6 +280,65 @@ miPointerSetCursorPosition(pDev, pScreen, x, y, generateEvent) return TRUE; } +/* Set up sprite information for the device. + This function will be called once for each device after it is initialized + in the DIX. + */ +static Bool +miPointerDeviceInitialize(pDev, pScreen) + DeviceIntPtr pDev; + ScreenPtr pScreen; +{ + miPointerPtr pPointer; + SetupScreen (pScreen); + + if (!AllocateDevicePrivate(pDev, miPointerPrivatesIndex)) + return FALSE; + + pPointer = xalloc(sizeof(miPointerRec)); + if (!pPointer) + return FALSE; + + pPointer->pScreen = NULL; + pPointer->pSpriteScreen = NULL; + pPointer->pCursor = NULL; + pPointer->pSpriteCursor = NULL; + pPointer->limits.x1 = 0; + pPointer->limits.x2 = 32767; + pPointer->limits.y1 = 0; + pPointer->limits.y2 = 32767; + pPointer->confined = FALSE; + pPointer->x = 0; + pPointer->y = 0; + + if (!((*pScreenPriv->spriteFuncs->DeviceCursorInitialize)(pDev, pScreen))) + { + xfree(pPointer); + return FALSE; + } + + pDev->devPrivates[miPointerPrivatesIndex].ptr = pPointer; + return TRUE; +} + +/* Clean up after device. + This function will be called once before the device is freed in the DIX + */ +static void +miPointerDeviceCleanup(pDev, pScreen) + DeviceIntPtr pDev; + ScreenPtr pScreen; +{ + if (DevHasCursor(pDev)) + { + SetupScreen(pScreen); + (*pScreenPriv->spriteFuncs->DeviceCursorCleanup)(pDev, pScreen); + xfree(pDev->devPrivates[miPointerPrivatesIndex].ptr); + pDev->devPrivates[miPointerPrivatesIndex].ptr = NULL; + } +} + + /* Once signals are ignored, the WarpCursor function can call this */ _X_EXPORT void @@ -413,7 +471,8 @@ miPointerUpdateSprite (DeviceIntPtr pDev) void miPointerDeltaCursor (int dx, int dy, unsigned long time) { - int x = miCorePointer->x + dx, y = miCorePointer->y + dy; + int x = MIPOINTER(inputInfo.pointer)->x = dx; + int y = MIPOINTER(inputInfo.pointer)->y = dy; miPointerSetPosition(inputInfo.pointer, &x, &y, time); } diff --git a/mi/mipointer.h b/mi/mipointer.h index c4834139a..666a6eb94 100644 --- a/mi/mipointer.h +++ b/mi/mipointer.h @@ -53,6 +53,18 @@ typedef struct _miPointerSpriteFuncRec { int /* x */, int /* y */ ); + Bool (*DeviceCursorInitialize)( + DeviceIntPtr /* pDev */, + ScreenPtr /* pScr */ + ); + void (*DeviceCursorCleanup)( + DeviceIntPtr /* pDev */, + ScreenPtr /* pScr */ + ); + void (*UndisplayCursor)( + DeviceIntPtr /* pDev */, + ScreenPtr /* pScr */ + ); } miPointerSpriteFuncRec, *miPointerSpriteFuncPtr; typedef struct _miPointerScreenFuncRec { diff --git a/mi/misprite.c b/mi/misprite.c index bb67f48da..60774b562 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -72,6 +72,13 @@ in this Software without prior written authorization from The Open Group. #define SPRITE_DEBUG(x) #endif + +static int miSpriteDevPrivatesIndex; +#define MISPRITE(dev) \ + ((DevHasCursor(dev)) ? \ + (miCursorInfoPtr) dev->devPrivates[miSpriteDevPrivatesIndex].ptr : \ + (miCursorInfoPtr) inputInfo.pointer->devPrivates[miSpriteDevPrivatesIndex].ptr) + /* * screen wrappers */ @@ -104,6 +111,11 @@ static void miSpriteSaveDoomedAreas(WindowPtr pWin, static void miSpriteComputeSaved(DeviceIntPtr pDev, ScreenPtr pScreen); +static Bool miSpriteDeviceCursorInitialize(DeviceIntPtr pDev, + ScreenPtr pScreen); +static void miSpriteDeviceCursorCleanup(DeviceIntPtr pDev, + ScreenPtr pScreen); + #define SCREEN_PROLOGUE(pScreen, field)\ ((pScreen)->field = \ ((miSpriteScreenPtr) (pScreen)->devPrivates[miSpriteScreenIndex].ptr)->field) @@ -123,12 +135,16 @@ static void miSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y); static void miSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y); +static void miSpriteUndisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen); _X_EXPORT miPointerSpriteFuncRec miSpritePointerFuncs = { miSpriteRealizeCursor, miSpriteUnrealizeCursor, miSpriteSetCursor, miSpriteMoveCursor, + miSpriteDeviceCursorInitialize, + miSpriteDeviceCursorCleanup, + miSpriteUndisplayCursor }; /* @@ -156,7 +172,7 @@ miSpriteReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure) { if (DevHasCursor(pDev)) { - pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; + pCursorInfo = MISPRITE(pDev); if (pCursorInfo->isUp && RECT_IN_REGION (pScreen, pRegion, &pCursorInfo->saved) @@ -183,8 +199,6 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs) { miSpriteScreenPtr pScreenPriv; VisualPtr pVisual; - miCursorInfoPtr pCursorInfo; - int cursorIdx; if (!DamageSetup (pScreen)) return FALSE; @@ -231,44 +245,19 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs) pScreenPriv->StoreColors = pScreen->StoreColors; pScreenPriv->BlockHandler = pScreen->BlockHandler; - - /* alloc and zero memory for all cursors */ - pScreenPriv->pDevCursors = - (miCursorInfoPtr)xalloc(MAX_DEVICES * sizeof(miCursorInfoRec)); - if (!pScreenPriv->pDevCursors) - { - xfree((pointer)pScreenPriv); - return FALSE; - } - /* virtual core pointer's ID is 1 */ - pScreenPriv->cp = &(pScreenPriv->pDevCursors[1]); - - cursorIdx = 0; - while (cursorIdx < MAX_DEVICES) - { - pCursorInfo = &(pScreenPriv->pDevCursors[cursorIdx]); - pCursorInfo->pCursor = NULL; - pCursorInfo->x = 0; - pCursorInfo->y = 0; - pCursorInfo->isUp = FALSE; - pCursorInfo->shouldBeUp = FALSE; - pCursorInfo->pCacheWin = NullWindow; - pCursorInfo->isInCacheWin = FALSE; - pCursorInfo->checkPixels = TRUE; - pCursorInfo->pInstalledMap = NULL; - pCursorInfo->pColormap = NULL; - pCursorInfo->colors[SOURCE_COLOR].red = 0; - pCursorInfo->colors[SOURCE_COLOR].green = 0; - pCursorInfo->colors[SOURCE_COLOR].blue = 0; - pCursorInfo->colors[MASK_COLOR].red = 0; - pCursorInfo->colors[MASK_COLOR].green = 0; - pCursorInfo->colors[MASK_COLOR].blue = 0; - - cursorIdx++; - } + pScreenPriv->DeviceCursorInitialize = pScreen->DeviceCursorInitialize; + pScreenPriv->DeviceCursorCleanup = pScreen->DeviceCursorCleanup; + pScreenPriv->pInstalledMap = NULL; + pScreenPriv->pColormap = NULL; pScreenPriv->funcs = cursorFuncs; + pScreenPriv->colors[SOURCE_COLOR].red = 0; + pScreenPriv->colors[SOURCE_COLOR].green = 0; + pScreenPriv->colors[SOURCE_COLOR].blue = 0; + pScreenPriv->colors[MASK_COLOR].red = 0; + pScreenPriv->colors[MASK_COLOR].green = 0; + pScreenPriv->colors[MASK_COLOR].blue = 0; pScreen->devPrivates[miSpriteScreenIndex].ptr = (pointer) pScreenPriv; pScreen->CloseScreen = miSpriteCloseScreen; @@ -286,6 +275,8 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs) pScreen->BlockHandler = miSpriteBlockHandler; damageRegister = 0; + miSpriteDevPrivatesIndex = AllocateDevicePrivateIndex(); + return TRUE; } @@ -318,18 +309,8 @@ miSpriteCloseScreen (i, pScreen) pScreen->StoreColors = pScreenPriv->StoreColors; pScreen->SaveDoomedAreas = pScreenPriv->SaveDoomedAreas; - for (pDev = inputInfo.devices; pDev; pDev = pDev->next) - { - if (DevHasCursor(pDev)) - { - miCursorInfoPtr pCursor; - pCursor = &pScreenPriv->pDevCursors[pDev->id]; - miSpriteIsUpFALSE (pCursor, pScreen, pScreenPriv); - } - } DamageDestroy (pScreenPriv->pDamage); - xfree ((pointer)(pScreenPriv->pDevCursors)); xfree ((pointer) pScreenPriv); return (*pScreen->CloseScreen) (i, pScreen); @@ -356,7 +337,7 @@ miSpriteGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine) { if (DevHasCursor(pDev)) { - pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; + pCursorInfo = MISPRITE(pDev); if (pDrawable->type == DRAWABLE_WINDOW && pCursorInfo->isUp && ORG_OVERLAP(&pCursorInfo->saved,pDrawable->x,pDrawable->y, @@ -396,7 +377,7 @@ miSpriteGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart) { if (DevHasCursor(pDev)) { - pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; + pCursorInfo = MISPRITE(pDev); if (pDrawable->type == DRAWABLE_WINDOW && pCursorInfo->isUp) { @@ -448,7 +429,7 @@ miSpriteSourceValidate (pDrawable, x, y, width, height) { if (DevHasCursor(pDev)) { - pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; + pCursorInfo = MISPRITE(pDev); if (pDrawable->type == DRAWABLE_WINDOW && pCursorInfo->isUp && ORG_OVERLAP(&pCursorInfo->saved, pDrawable->x, pDrawable->y, x, y, width, height)) @@ -481,7 +462,7 @@ miSpriteCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { if (DevHasCursor(pDev)) { - pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; + pCursorInfo = MISPRITE(pDev); /* * Damage will take care of destination check */ @@ -522,7 +503,7 @@ miSpriteBlockHandler (i, blockData, pTimeout, pReadmask) { if (DevHasCursor(pDev)) { - pCursorInfo = &pPriv->pDevCursors[pDev->id]; + pCursorInfo = MISPRITE(pDev); if (!pCursorInfo->isUp && pCursorInfo->shouldBeUp) { SPRITE_DEBUG (("BlockHandler restore\n")); @@ -534,7 +515,7 @@ miSpriteBlockHandler (i, blockData, pTimeout, pReadmask) { if (DevHasCursor(pDev)) { - pCursorInfo = &pPriv->pDevCursors[pDev->id]; + pCursorInfo = MISPRITE(pDev); if (!pCursorInfo->isUp && pCursorInfo->shouldBeUp) { SPRITE_DEBUG (("BlockHandler restore\n")); @@ -550,9 +531,6 @@ miSpriteInstallColormap (pMap) { ScreenPtr pScreen = pMap->pScreen; miSpriteScreenPtr pPriv; - DeviceIntPtr pDev = inputInfo.pointer; - miCursorInfoPtr pCursorInfo; - int cursorIdx; pPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; @@ -562,29 +540,23 @@ miSpriteInstallColormap (pMap) SCREEN_EPILOGUE(pScreen, InstallColormap); - /* InstallColormap is called before devices are initialized. We cannot - * just run through the device list, we need to go through all possible - * sprite structs.*/ - for (cursorIdx = 0; cursorIdx < MAX_DEVICES; cursorIdx++) + /* InstallColormap can be called before devices are initialized. */ + pPriv->pInstalledMap = pMap; + if (pPriv->pColormap != pMap) { - pCursorInfo = &pPriv->pDevCursors[cursorIdx]; - pCursorInfo->pInstalledMap = pMap; - if (pCursorInfo->pColormap != pMap) + DeviceIntPtr pDev; + miCursorInfoPtr pCursorInfo; + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - pCursorInfo->checkPixels = TRUE; - if (pCursorInfo->isUp) + if (DevHasCursor(pDev)) { - /* find matching device */ - for(pDev = inputInfo.devices; pDev; pDev = pDev->next) - { - if (pDev->id == cursorIdx) - { - miSpriteRemoveCursor(pDev, pScreen); - break; - } - } - } - } + pCursorInfo = MISPRITE(pDev); + pCursorInfo->checkPixels = TRUE; + if (pCursorInfo->isUp) + miSpriteRemoveCursor(pDev, pScreen); + } + } + } } @@ -599,8 +571,8 @@ miSpriteStoreColors (pMap, ndef, pdef) int i; int updated; VisualPtr pVisual; - DeviceIntPtr pDev = inputInfo.pointer; - miCursorInfoPtr pCursorInfo; + DeviceIntPtr pDev = inputInfo.pointer; + miCursorInfoPtr pCursorInfo; pPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; @@ -610,6 +582,14 @@ miSpriteStoreColors (pMap, ndef, pdef) SCREEN_EPILOGUE(pScreen, StoreColors); + if (pPriv->pColormap == pMap) + { + updated = 0; + pVisual = pMap->pVisual; + if (pVisual->class == DirectColor) + { + /* Direct color - match on any of the subfields */ + #define MaskMatch(a,b,mask) (((a) & (pVisual->mask)) == ((b) & (pVisual->mask))) #define UpdateDAC(dev, plane,dac,mask) {\ @@ -624,48 +604,40 @@ miSpriteStoreColors (pMap, ndef, pdef) UpdateDAC(dev, plane,green,greenMask) \ UpdateDAC(dev, plane,blue,blueMask) - for(pDev = inputInfo.devices; pDev; pDev = pDev->next) - { - if (DevHasCursor(pDev)) - { - pCursorInfo = &pPriv->pDevCursors[pDev->id]; - if (pCursorInfo->pColormap == pMap) + for (i = 0; i < ndef; i++) { - updated = 0; - pVisual = pMap->pVisual; - if (pVisual->class == DirectColor) + CheckDirect (pPriv, SOURCE_COLOR) + CheckDirect (pPriv, MASK_COLOR) + } + } + else + { + /* PseudoColor/GrayScale - match on exact pixel */ + for (i = 0; i < ndef; i++) + { + if (pdef[i].pixel == + pPriv->colors[SOURCE_COLOR].pixel) { - /* Direct color - match on any of the subfields */ - - for (i = 0; i < ndef; i++) - { - CheckDirect (pCursorInfo, SOURCE_COLOR) - CheckDirect (pCursorInfo, MASK_COLOR) - } + pPriv->colors[SOURCE_COLOR] = pdef[i]; + if (++updated == 2) + break; } - else + if (pdef[i].pixel == + pPriv->colors[MASK_COLOR].pixel) { - /* PseudoColor/GrayScale - match on exact pixel */ - for (i = 0; i < ndef; i++) - { - if (pdef[i].pixel == - pCursorInfo->colors[SOURCE_COLOR].pixel) - { - pCursorInfo->colors[SOURCE_COLOR] = pdef[i]; - if (++updated == 2) - break; - } - if (pdef[i].pixel == - pCursorInfo->colors[MASK_COLOR].pixel) - { - pCursorInfo->colors[MASK_COLOR] = pdef[i]; - if (++updated == 2) - break; - } - } + pPriv->colors[MASK_COLOR] = pdef[i]; + if (++updated == 2) + break; } - if (updated) + } + } + if (updated) + { + for(pDev = inputInfo.devices; pDev; pDev = pDev->next) + { + if (DevHasCursor(pDev)) { + pCursorInfo = MISPRITE(pDev); pCursorInfo->checkPixels = TRUE; if (pCursorInfo->isUp) miSpriteRemoveCursor (pDev, pScreen); @@ -673,19 +645,20 @@ miSpriteStoreColors (pMap, ndef, pdef) } } } - } static void miSpriteFindColors (miCursorInfoPtr pDevCursor, ScreenPtr pScreen) { + miSpriteScreenPtr pScreenPriv = (miSpriteScreenPtr) + pScreen->devPrivates[miSpriteScreenIndex].ptr; CursorPtr pCursor; xColorItem *sourceColor, *maskColor; pCursor = pDevCursor->pCursor; - sourceColor = &pDevCursor->colors[SOURCE_COLOR]; - maskColor = &pDevCursor->colors[MASK_COLOR]; - if (pDevCursor->pColormap != pDevCursor->pInstalledMap || + sourceColor = &pScreenPriv->colors[SOURCE_COLOR]; + maskColor = &pScreenPriv->colors[MASK_COLOR]; + if (pScreenPriv->pColormap != pScreenPriv->pInstalledMap || !(pCursor->foreRed == sourceColor->red && pCursor->foreGreen == sourceColor->green && pCursor->foreBlue == sourceColor->blue && @@ -693,18 +666,18 @@ miSpriteFindColors (miCursorInfoPtr pDevCursor, ScreenPtr pScreen) pCursor->backGreen == maskColor->green && pCursor->backBlue == maskColor->blue)) { - pDevCursor->pColormap = pDevCursor->pInstalledMap; + pScreenPriv->pColormap = pScreenPriv->pInstalledMap; sourceColor->red = pCursor->foreRed; sourceColor->green = pCursor->foreGreen; sourceColor->blue = pCursor->foreBlue; - FakeAllocColor (pDevCursor->pColormap, sourceColor); + FakeAllocColor (pScreenPriv->pColormap, sourceColor); maskColor->red = pCursor->backRed; maskColor->green = pCursor->backGreen; maskColor->blue = pCursor->backBlue; - FakeAllocColor (pDevCursor->pColormap, maskColor); + FakeAllocColor (pScreenPriv->pColormap, maskColor); /* "free" the pixels right away, don't let this confuse you */ - FakeFreeColor(pDevCursor->pColormap, sourceColor->pixel); - FakeFreeColor(pDevCursor->pColormap, maskColor->pixel); + FakeFreeColor(pScreenPriv->pColormap, sourceColor->pixel); + FakeFreeColor(pScreenPriv->pColormap, maskColor->pixel); } pDevCursor->checkPixels = FALSE; @@ -737,7 +710,7 @@ miSpriteSaveDoomedAreas (pWin, pObscured, dx, dy) { if(DevHasCursor(pDev)) { - pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; + pCursorInfo = MISPRITE(pDev); if (pCursorInfo->isUp) { cursorBox = pCursorInfo->saved; @@ -777,10 +750,7 @@ miSpriteRealizeCursor (pDev, pScreen, pCursor) miCursorInfoPtr pCursorInfo; pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - pCursorInfo = pScreenPriv->cp; - - if (DevHasCursor(pDev)) - pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; + pCursorInfo = MISPRITE(pDev); if (pCursor == pCursorInfo->pCursor) pCursorInfo->checkPixels = TRUE; @@ -811,10 +781,7 @@ miSpriteSetCursor (pDev, pScreen, pCursor, x, y) miSpriteScreenPtr pScreenPriv; pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - miCursorInfoPtr pPointer = pScreenPriv->cp; - - if (DevHasCursor(pDev)) - pPointer = &pScreenPriv->pDevCursors[pDev->id]; + miCursorInfoPtr pPointer = MISPRITE(pDev); if (!pCursor) { @@ -929,14 +896,76 @@ miSpriteMoveCursor (pDev, pScreen, x, y) CursorPtr pCursor; pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - pCursor = pScreenPriv->cp->pCursor; - - if (DevHasCursor(pDev)) - pCursor = pScreenPriv->pDevCursors[pDev->id].pCursor; + pCursor = MISPRITE(pDev)->pCursor; miSpriteSetCursor (pDev, pScreen, pCursor, x, y); } + +static Bool +miSpriteDeviceCursorInitialize(pDev, pScreen) + DeviceIntPtr pDev; + ScreenPtr pScreen; +{ + miSpriteScreenPtr pScreenPriv; + miCursorInfoPtr pCursorInfo; + int ret = FALSE; + + pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; + + if (!AllocateDevicePrivate(pDev, miSpriteDevPrivatesIndex)) + return FALSE; + + pCursorInfo = + pDev->devPrivates[miSpriteDevPrivatesIndex].ptr = + xalloc(sizeof(miCursorInfoRec)); + if (!pCursorInfo) + return FALSE; + + pCursorInfo->pCursor = NULL; + pCursorInfo->x = 0; + pCursorInfo->y = 0; + pCursorInfo->isUp = FALSE; + pCursorInfo->shouldBeUp = FALSE; + pCursorInfo->pCacheWin = NullWindow; + pCursorInfo->isInCacheWin = FALSE; + pCursorInfo->checkPixels = TRUE; + + ret = (*pScreenPriv->funcs->DeviceCursorInitialize)(pDev, pScreen); + if (!ret) + { + xfree(pCursorInfo); + pDev->devPrivates[miSpriteDevPrivatesIndex].ptr = NULL; + } + return ret; +} + +static void +miSpriteDeviceCursorCleanup(pDev, pScreen) + DeviceIntPtr pDev; + ScreenPtr pScreen; +{ + if (DevHasCursor(pDev)) + { + miSpriteScreenPtr pScreenPriv; + pScreenPriv = + (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; + + (*pScreenPriv->funcs->DeviceCursorCleanup)(pDev, pScreen); + pDev->devPrivates[miSpriteDevPrivatesIndex].ptr = NULL; + xfree(MISPRITE(pDev)); + } +} + +static void +miSpriteUndisplayCursor(pDev, pScreen) + DeviceIntPtr pDev; + ScreenPtr pScreen; +{ + if (MISPRITE(pDev)->isUp) + miSpriteRemoveCursor(pDev, pScreen); +} + /* * undraw/draw cursor */ @@ -952,10 +981,7 @@ miSpriteRemoveCursor (pDev, pScreen) DamageDrawInternal (pScreen, TRUE); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - pCursorInfo = pScreenPriv->cp; - - if (DevHasCursor(pDev)) - pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; + pCursorInfo = MISPRITE(pDev); miSpriteIsUpFALSE (pCursorInfo, pScreen, pScreenPriv); pCursorInfo->pCacheWin = NullWindow; @@ -992,10 +1018,7 @@ miSpriteSaveUnderCursor(pDev, pScreen) DamageDrawInternal (pScreen, TRUE); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - pCursorInfo = pScreenPriv->cp; - - if (DevHasCursor(pDev)) - pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; + pCursorInfo = MISPRITE(pDev); miSpriteComputeSaved (pDev, pScreen); pCursor = pCursorInfo->pCursor; @@ -1035,10 +1058,7 @@ miSpriteRestoreCursor (pDev, pScreen) DamageDrawInternal (pScreen, TRUE); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - pCursorInfo = pScreenPriv->cp; - - if (DevHasCursor(pDev)) - pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; + pCursorInfo = MISPRITE(pDev); miSpriteComputeSaved (pDev, pScreen); pCursor = pCursorInfo->pCursor; @@ -1051,8 +1071,8 @@ miSpriteRestoreCursor (pDev, pScreen) miSpriteFindColors (pCursorInfo, pScreen); if ((*pScreenPriv->funcs->PutUpCursor) (pDev, pScreen, pCursor, x, y, - pCursorInfo->colors[SOURCE_COLOR].pixel, - pCursorInfo->colors[MASK_COLOR].pixel)) + pScreenPriv->colors[SOURCE_COLOR].pixel, + pScreenPriv->colors[MASK_COLOR].pixel)) { miSpriteIsUpTRUE (pCursorInfo, pScreen, pScreenPriv); } @@ -1076,10 +1096,7 @@ miSpriteComputeSaved (pDev, pScreen) miCursorInfoPtr pCursorInfo; pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - pCursorInfo = pScreenPriv->cp; - - if (DevHasCursor(pDev)) - pCursorInfo = &pScreenPriv->pDevCursors[pDev->id]; + pCursorInfo = MISPRITE(pDev); pCursor = pCursorInfo->pCursor; x = pCursorInfo->x - (int)pCursor->bits->xhot; diff --git a/mi/misprite.h b/mi/misprite.h index 96d2d7d54..72dc06fc7 100644 --- a/mi/misprite.h +++ b/mi/misprite.h @@ -89,6 +89,14 @@ typedef struct { int /*dx*/, int /*dy*/ ); + Bool (*DeviceCursorInitialize)( + DeviceIntPtr /*pDev*/, + ScreenPtr /*pScreen*/ +); + void (*DeviceCursorCleanup)( + DeviceIntPtr /*pDev*/, + ScreenPtr /*pScreen*/ +); } miSpriteCursorFuncRec, *miSpriteCursorFuncPtr; diff --git a/mi/mispritest.h b/mi/mispritest.h index 8cc206420..f4155b5d5 100644 --- a/mi/mispritest.h +++ b/mi/mispritest.h @@ -53,9 +53,6 @@ typedef struct { WindowPtr pCacheWin; /* window the cursor last seen in */ Bool isInCacheWin; Bool checkPixels; /* check colormap collision */ - xColorItem colors[2]; - ColormapPtr pInstalledMap; - ColormapPtr pColormap; } miCursorInfoRec, *miCursorInfoPtr; /* @@ -81,13 +78,17 @@ typedef struct { /* os layer procedures */ ScreenBlockHandlerProcPtr BlockHandler; + + /* device cursor procedures */ + DeviceCursorInitializeProcPtr DeviceCursorInitialize; + DeviceCursorCleanupProcPtr DeviceCursorCleanup; - miCursorInfoPtr cp; /* core pointer */ - + xColorItem colors[2]; + ColormapPtr pInstalledMap; + ColormapPtr pColormap; VisualPtr pVisual; miSpriteCursorFuncPtr funcs; DamagePtr pDamage; /* damage tracking structure */ - miCursorInfoPtr pDevCursors; /* all cursors' info */ } miSpriteScreenRec, *miSpriteScreenPtr; #define SOURCE_COLOR 0 From 547d720938b3668666d60110d79b150b1e9325c6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 12 Apr 2007 11:16:19 +0930 Subject: [PATCH 091/634] Remove workaround for a NULL core pointer in ProcessInputEvents. This workaround is obsolete with 33a5d9605e3e282f6aa1921d7321a2a12ef02c42 --- hw/xfree86/common/xf86Events.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index f826b3bc7..84588996d 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -247,13 +247,9 @@ ProcessInputEvents () mieqProcessInputEvents(); - /* PIE can be called after devices have been shut down. Blame DGA. */ - if (inputInfo.pointer) - { - /* FIXME: This is a problem if we have multiple pointers */ - miPointerGetPosition(inputInfo.pointer, &x, &y); - xf86SetViewport(xf86Info.currentScreen, x, y); - } + /* FIXME: This is a problem if we have multiple pointers */ + miPointerGetPosition(inputInfo.pointer, &x, &y); + xf86SetViewport(xf86Info.currentScreen, x, y); } void From e7b47b1758ed20e75ee267b3a09e91bf2861f6fd Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 12 Apr 2007 16:24:42 +0930 Subject: [PATCH 092/634] Change core enter/leave semantics for multiple pointers. Send EnterNotify when first device enters the window, LeaveNotify when the last device leaves the window. Additional devices will not cause additional Enter/LeaveNotifies. --- dix/events.c | 25 +++++++++++++++++++------ dix/main.c | 2 ++ dix/window.c | 18 ++++++++++++++++++ include/window.h | 2 ++ include/windowstr.h | 1 + 5 files changed, 42 insertions(+), 6 deletions(-) diff --git a/dix/events.c b/dix/events.c index 46905aa30..444c1032a 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2270,7 +2270,10 @@ DefineInitialRootWindow(WindowPtr win) while (pDev) { if (DevHasCursor(pDev)) + { InitializeSprite(pDev, win); + win->devPrivates[EnterLeavePrivatesIndex].val++; + } pDev = pDev->next; } } @@ -3447,6 +3450,7 @@ EnterLeaveEvent( GrabPtr grab = mouse->coreGrab.grab; GrabPtr devgrab = mouse->deviceGrab.grab; Mask mask; + long* inWindow; /* no of sprites inside pWin */ deviceEnterNotify *devEnterLeave; int mskidx; @@ -3492,14 +3496,23 @@ EnterLeaveEvent( IsParent(focus, pWin))) event.u.enterLeave.flags |= ELFlagFocus; + inWindow = &pWin->devPrivates[EnterLeavePrivatesIndex].val; + + (type == EnterNotify) ? (*inWindow)++ : (*inWindow)--; + if (mask & filters[type]) { - if (grab) - (void)TryClientEvents(rClient(grab), &event, 1, mask, - filters[type], grab); - else - (void)DeliverEventsToWindow(pDev, pWin, &event, 1, filters[type], - NullGrab, 0); + /* only send core events for the first device to enter and the last + one to leave */ + if ((*inWindow) == (LeaveNotify - type)) + { + if (grab) + (void)TryClientEvents(rClient(grab), &event, 1, mask, + filters[type], grab); + else + (void)DeliverEventsToWindow(pDev, pWin, &event, 1, filters[type], + NullGrab, 0); + } } devEnterLeave = (deviceEnterNotify*)&event; diff --git a/dix/main.c b/dix/main.c index ac3bfad64..f5b89ba05 100644 --- a/dix/main.c +++ b/dix/main.c @@ -391,6 +391,8 @@ main(int argc, char *argv[], char *envp[]) FatalError("failed to create scratch GCs"); if (!CreateDefaultStipple(i)) FatalError("failed to create default stipple"); + if (!InitWindowPrivates(pScreen)) + FatalError("Failed to init window privates."); if (!CreateRootWindow(pScreen)) FatalError("failed to create root window"); } diff --git a/dix/window.c b/dix/window.c index 4e553193e..5a03642d8 100644 --- a/dix/window.c +++ b/dix/window.c @@ -155,6 +155,8 @@ _X_EXPORT int screenIsSaved = SCREEN_SAVER_OFF; _X_EXPORT ScreenSaverStuffRec savedScreenInfo[MAXSCREENS]; +_X_EXPORT int EnterLeavePrivatesIndex = -1; + #if 0 extern void DeleteWindowFromAnyEvents(); extern Mask EventMaskForClient(); @@ -3969,6 +3971,22 @@ WindowParentHasDeviceCursor(WindowPtr pWin, return FALSE; } +/** + * Initialize some mandatory devPrivates for windows. + * + * At the moment, this includes only the enter/leave semaphore. + * + * Returns TRUE on success. + */ +_X_EXPORT Bool +InitWindowPrivates(ScreenPtr screen) +{ + if (EnterLeavePrivatesIndex == -1) + EnterLeavePrivatesIndex = AllocateWindowPrivateIndex(); + + return AllocateWindowPrivate(screen, EnterLeavePrivatesIndex, 0); +} + #ifndef NOLOGOHACK static void DrawLogo(WindowPtr pWin) diff --git a/include/window.h b/include/window.h index 87118e3b0..707272a6e 100644 --- a/include/window.h +++ b/include/window.h @@ -268,4 +268,6 @@ extern void DisableMapUnmapEvents( extern void EnableMapUnmapEvents( WindowPtr /* pWin */ ); +Bool InitWindowPrivates( + ScreenPtr /* screen */); #endif /* WINDOW_H */ diff --git a/include/windowstr.h b/include/windowstr.h index 95954a7c3..4683abeaa 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -216,6 +216,7 @@ typedef struct _ScreenSaverStuff { extern int screenIsSaved; extern ScreenSaverStuffRec savedScreenInfo[MAXSCREENS]; +extern int EnterLeavePrivatesIndex; /* * this is the configuration parameter "NO_BACK_SAVE" From 2bb3c81fc1ca98c909309f3af7e9c8ca6b695657 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 12 Apr 2007 16:35:43 +0930 Subject: [PATCH 093/634] Use paired kbd instead of VCK for EnterLeaveEvents, sanitize variable naming. --- dix/events.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/dix/events.c b/dix/events.c index 444c1032a..294aa2f94 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3436,7 +3436,7 @@ CommonAncestor( static void EnterLeaveEvent( - DeviceIntPtr pDev, + DeviceIntPtr mouse, int type, int mode, int detail, @@ -3444,9 +3444,8 @@ EnterLeaveEvent( Window child) { xEvent event; - DeviceIntPtr keybd = inputInfo.keyboard; WindowPtr focus; - DeviceIntPtr mouse = pDev; + DeviceIntPtr keybd; GrabPtr grab = mouse->coreGrab.grab; GrabPtr devgrab = mouse->deviceGrab.grab; Mask mask; @@ -3456,6 +3455,9 @@ EnterLeaveEvent( int mskidx; OtherInputMasks *inputMasks; + if (!(keybd = GetPairedKeyboard(mouse))) + keybd = inputInfo.keyboard; + if ((pWin == mouse->valuator->motionHintWindow) && (detail != NotifyInferior)) mouse->valuator->motionHintWindow = NullWindow; @@ -3473,8 +3475,8 @@ EnterLeaveEvent( event.u.u.type = type; event.u.u.detail = detail; event.u.enterLeave.time = currentTime.milliseconds; - event.u.enterLeave.rootX = pDev->spriteInfo->sprite->hot.x; - event.u.enterLeave.rootY = pDev->spriteInfo->sprite->hot.y; + event.u.enterLeave.rootX = mouse->spriteInfo->sprite->hot.x; + event.u.enterLeave.rootY = mouse->spriteInfo->sprite->hot.y; /* Counts on the same initial structure of crossing & button events! */ FixUpEventFromWindow(mouse, &event, pWin, None, FALSE); /* Enter/Leave events always set child */ @@ -3510,7 +3512,7 @@ EnterLeaveEvent( (void)TryClientEvents(rClient(grab), &event, 1, mask, filters[type], grab); else - (void)DeliverEventsToWindow(pDev, pWin, &event, 1, filters[type], + (void)DeliverEventsToWindow(mouse, pWin, &event, 1, filters[type], NullGrab, 0); } } @@ -3520,8 +3522,8 @@ EnterLeaveEvent( DeviceLeaveNotify; devEnterLeave->type = (type == EnterNotify) ? DeviceEnterNotify : DeviceLeaveNotify; - devEnterLeave->deviceid = pDev->id; - mskidx = pDev->id; + devEnterLeave->deviceid = mouse->id; + mskidx = mouse->id; inputMasks = wOtherInputMasks(pWin); if (inputMasks && (filters[devEnterLeave->type] & inputMasks->deliverableEvents[mskidx])) @@ -3530,9 +3532,9 @@ EnterLeaveEvent( (void)TryClientEvents(rClient(devgrab), (xEvent*)devEnterLeave, 1, mask, filters[devEnterLeave->type], devgrab); else - (void)DeliverEventsToWindow(pDev, pWin, (xEvent*)devEnterLeave, + (void)DeliverEventsToWindow(mouse, pWin, (xEvent*)devEnterLeave, 1, filters[devEnterLeave->type], - NullGrab, pDev->id); + NullGrab, mouse->id); } if ((type == EnterNotify) && (mask & KeymapStateMask)) @@ -3550,7 +3552,7 @@ EnterLeaveEvent( (void)TryClientEvents(rClient(grab), (xEvent *)&ke, 1, mask, KeymapStateMask, grab); else - (void)DeliverEventsToWindow(pDev, pWin, (xEvent *)&ke, 1, + (void)DeliverEventsToWindow(mouse, pWin, (xEvent *)&ke, 1, KeymapStateMask, NullGrab, 0); } } From ea27b09d3a973d9a4943f205b24940b8624cf405 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 13 Apr 2007 17:15:22 +0930 Subject: [PATCH 094/634] Deliver FocusIn/FocusOut events for all devices. Don't use VCK in SetInputFocus and DeliverFocusedEvent. --- dix/events.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/dix/events.c b/dix/events.c index 294aa2f94..e515f107a 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2787,9 +2787,9 @@ CheckDeviceGrabs(DeviceIntPtr device, xEvent *xE, void DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count) { + DeviceIntPtr pointer; WindowPtr focus = keybd->focus->win; int mskidx = 0; - if (focus == FollowKeyboardWin) focus = inputInfo.keyboard->focus->win; if (!focus) @@ -2804,8 +2804,11 @@ DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count) if (DeliverDeviceEvents(window, xE, NullGrab, focus, keybd, count)) return; } + pointer = GetPairedPointer(keybd); + if (!pointer) + pointer = inputInfo.pointer; /* just deliver it to the focus window */ - FixUpEventFromWindow(inputInfo.pointer, xE, focus, None, FALSE); + FixUpEventFromWindow(pointer, xE, focus, None, FALSE); if (xE->u.u.type & EXTENSION_EVENT_BASE) mskidx = keybd->id; (void)DeliverEventsToWindow(keybd, focus, xE, count, filters[xE->u.u.type], @@ -3632,13 +3635,8 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) { xEvent event; -#ifdef XINPUT if (dev != inputInfo.keyboard) - { DeviceFocusEvent(dev, type, mode, detail, pWin); - return; - } -#endif event.u.focus.mode = mode; event.u.u.type = type; event.u.u.detail = detail; @@ -3846,6 +3844,8 @@ SetInputFocus( WindowPtr focusWin; int mode, rc; TimeStamp time; + DeviceIntPtr keybd; /* used for FollowKeyboard or FollowKeyboardWin */ + UpdateCurrentTime(); if ((revertTo != RevertToParent) && @@ -3857,10 +3857,22 @@ SetInputFocus( return BadValue; } time = ClientTimeToServerTime(ctime); + + if (IsKeyboardDevice(dev)) + keybd = dev; + else + { + keybd = GetPairedKeyboard(dev); + if (!keybd) + keybd = inputInfo.keyboard; + } + if ((focusID == None) || (focusID == PointerRoot)) focusWin = (WindowPtr)(long)focusID; else if ((focusID == FollowKeyboard) && followOK) - focusWin = inputInfo.keyboard->focus->win; + { + focusWin = keybd->focus->win; + } else { rc = dixLookupWindow(&focusWin, focusID, client, DixReadAccess); if (rc != Success) @@ -3876,7 +3888,7 @@ SetInputFocus( return Success; mode = (dev->coreGrab.grab) ? NotifyWhileGrabbed : NotifyNormal; if (focus->win == FollowKeyboardWin) - DoFocusEvents(dev, inputInfo.keyboard->focus->win, focusWin, mode); + DoFocusEvents(dev, keybd->focus->win, focusWin, mode); else DoFocusEvents(dev, focus->win, focusWin, mode); focus->time = time; From 451d5464b4e8a2516b8a4598b3c4eb14656be90e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 17 Apr 2007 11:17:04 +0930 Subject: [PATCH 095/634] Change enter/leave semantics for events with detail Notify{Nonlinear}Virtual. Core enter/leave events with detail Notify{Ancestor|Inferior|Nonlinear} are only sent for the first/last pointer to enter/leave. Events with detail Notify{Nonlinear}Virtual are sent at all times, but not to those windows that currently have one or more pointers inside their boundaries. --- dix/events.c | 59 +++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 45 insertions(+), 14 deletions(-) diff --git a/dix/events.c b/dix/events.c index e515f107a..def209eb8 100644 --- a/dix/events.c +++ b/dix/events.c @@ -281,7 +281,7 @@ static void DoEnterLeaveEvents( WindowPtr fromWin, WindowPtr toWin, int mode -); +); static WindowPtr XYToWindow( int x, @@ -3453,6 +3453,7 @@ EnterLeaveEvent( GrabPtr devgrab = mouse->deviceGrab.grab; Mask mask; long* inWindow; /* no of sprites inside pWin */ + Bool sendevent = FALSE; deviceEnterNotify *devEnterLeave; int mskidx; @@ -3503,21 +3504,51 @@ EnterLeaveEvent( inWindow = &pWin->devPrivates[EnterLeavePrivatesIndex].val; - (type == EnterNotify) ? (*inWindow)++ : (*inWindow)--; + /* + * Sending multiple core enter/leave events to the same window confuse the + * client. + * We can send multiple events that have detail NotifyVirtual or + * NotifyNonlinearVirtual however. + * + * For standard events (NotifyAncestor, NotifyInferior, NotifyNonlinear) + * we only send an enter event for the first pointer to enter. A leave + * event is sent for the last pointer to leave. + * + * For events with Virtual detail, we send them only to a window that does + * not have a pointer inside. + * + * For a window tree in the form of + * + * A -> Bp -> C -> D + * \ (where B and E have pointers) + * -> Ep + * + * If the pointer moves from E into D, a LeaveNotify is sent to E, an + * EnterNotify is sent to D, an EnterNotify with detail + * NotifyNonlinearVirtual to C and nothing to B. + */ - if (mask & filters[type]) + if (event.u.u.detail != NotifyVirtual && + event.u.u.detail != NotifyNonlinearVirtual) { - /* only send core events for the first device to enter and the last - one to leave */ - if ((*inWindow) == (LeaveNotify - type)) - { - if (grab) - (void)TryClientEvents(rClient(grab), &event, 1, mask, - filters[type], grab); - else - (void)DeliverEventsToWindow(mouse, pWin, &event, 1, filters[type], - NullGrab, 0); - } + (type == EnterNotify) ? (*inWindow)++ : (*inWindow)--; + + if (((*inWindow) == (LeaveNotify - type))) + sendevent = TRUE; + } else + { + if (!(*inWindow)) + sendevent = TRUE; + } + + if ((mask & filters[type]) && sendevent) + { + if (grab) + (void)TryClientEvents(rClient(grab), &event, 1, mask, + filters[type], grab); + else + (void)DeliverEventsToWindow(mouse, pWin, &event, 1, filters[type], + NullGrab, 0); } devEnterLeave = (deviceEnterNotify*)&event; From b6aec7f6f906a18d13586d63afabf1ee4fbb11c3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 17 Apr 2007 16:51:16 +0930 Subject: [PATCH 096/634] Change FocusIn/Out semantics to match Enter/Leave semantics. --- dix/events.c | 94 +++++++++++++++++++++++++++++++++++---------- dix/window.c | 15 ++++++-- include/inputstr.h | 1 - include/windowstr.h | 10 ++++- 4 files changed, 93 insertions(+), 27 deletions(-) diff --git a/dix/events.c b/dix/events.c index def209eb8..1733e2d1e 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2272,7 +2272,7 @@ DefineInitialRootWindow(WindowPtr win) if (DevHasCursor(pDev)) { InitializeSprite(pDev, win); - win->devPrivates[EnterLeavePrivatesIndex].val++; + win->devPrivates[FocusPrivatesIndex].val++; } pDev = pDev->next; } @@ -3452,7 +3452,7 @@ EnterLeaveEvent( GrabPtr grab = mouse->coreGrab.grab; GrabPtr devgrab = mouse->deviceGrab.grab; Mask mask; - long* inWindow; /* no of sprites inside pWin */ + int* inWindow; /* no of sprites inside pWin */ Bool sendevent = FALSE; deviceEnterNotify *devEnterLeave; @@ -3502,7 +3502,7 @@ EnterLeaveEvent( IsParent(focus, pWin))) event.u.enterLeave.flags |= ELFlagFocus; - inWindow = &pWin->devPrivates[EnterLeavePrivatesIndex].val; + inWindow = &((FocusSemaphoresPtr)pWin->devPrivates[FocusPrivatesIndex].ptr)->enterleave; /* * Sending multiple core enter/leave events to the same window confuse the @@ -3665,28 +3665,80 @@ static void FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) { xEvent event; + int* numFoci; /* no of foci the window has already */ + Bool sendevent = FALSE; + FocusSemaphoresPtr focus; if (dev != inputInfo.keyboard) DeviceFocusEvent(dev, type, mode, detail, pWin); - event.u.focus.mode = mode; - event.u.u.type = type; - event.u.u.detail = detail; - event.u.focus.window = pWin->drawable.id; - (void)DeliverEventsToWindow(dev, pWin, &event, 1, filters[type], NullGrab, - 0); - if ((type == FocusIn) && - ((pWin->eventMask | wOtherEventMasks(pWin)) & KeymapStateMask)) - { - xKeymapEvent ke; - ClientPtr client = clients[CLIENT_ID(pWin->drawable.id)]; - if (XaceHook(XACE_DEVICE_ACCESS, client, dev, FALSE)) - memmove((char *)&ke.map[0], (char *)&dev->key->down[1], 31); - else - bzero((char *)&ke.map[0], 31); - ke.type = KeymapNotify; - (void)DeliverEventsToWindow(dev, pWin, (xEvent *)&ke, 1, - KeymapStateMask, NullGrab, 0); + /* + * Same procedure as for Enter/Leave events. + * + * Sending multiple core FocusIn/Out events to the same window may confuse + * the client. + * We can send multiple events that have detail NotifyVirtual, + * NotifyNonlinearVirtual, NotifyPointerRoot, NotifyDetailNone or + * NotifyPointer however. + * + * For standard events (NotifyAncestor, NotifyInferior, NotifyNonlinear) + * we only send an FocusIn event for the first kbd to set the focus. A + * FocusOut event is sent for the last kbd to set the focus away from the + * window.. + * + * For events with Virtual detail, we send them only to a window that does + * not have a focus from another keyboard. + * + * For a window tree in the form of + * + * A -> Bf -> C -> D + * \ (where B and E have focus) + * -> Ef + * + * If the focus changes from E into D, a FocusOut is sent to E, a + * FocusIn is sent to D, a FocusIn with detail + * NotifyNonlinearVirtual to C and nothing to B. + */ + + numFoci = + &((FocusSemaphoresPtr)pWin->devPrivates[FocusPrivatesIndex].ptr)->focusinout; + if (detail != NotifyVirtual && + detail != NotifyNonlinearVirtual && + detail != NotifyPointer && + detail != NotifyPointerRoot && + detail != NotifyDetailNone) + { + (type == FocusIn) ? (*numFoci)++ : (*numFoci)--; + if (((*numFoci) == (FocusOut - type))) + sendevent = TRUE; + } else + { + if (!(*numFoci)) + sendevent = TRUE; + } + + if (sendevent) + { + event.u.focus.mode = mode; + event.u.u.type = type; + event.u.u.detail = detail; + event.u.focus.window = pWin->drawable.id; + (void)DeliverEventsToWindow(dev, pWin, &event, 1, filters[type], NullGrab, + 0); + if ((type == FocusIn) && + ((pWin->eventMask | wOtherEventMasks(pWin)) & KeymapStateMask)) + { + xKeymapEvent ke; + ClientPtr client = clients[CLIENT_ID(pWin->drawable.id)]; + if (XaceHook(XACE_DEVICE_ACCESS, client, dev, FALSE)) + memmove((char *)&ke.map[0], (char *)&dev->key->down[1], 31); + else + bzero((char *)&ke.map[0], 31); + + ke.type = KeymapNotify; + (void)DeliverEventsToWindow(dev, pWin, (xEvent *)&ke, 1, + KeymapStateMask, NullGrab, 0); + } } } diff --git a/dix/window.c b/dix/window.c index 5a03642d8..484693906 100644 --- a/dix/window.c +++ b/dix/window.c @@ -155,7 +155,7 @@ _X_EXPORT int screenIsSaved = SCREEN_SAVER_OFF; _X_EXPORT ScreenSaverStuffRec savedScreenInfo[MAXSCREENS]; -_X_EXPORT int EnterLeavePrivatesIndex = -1; +_X_EXPORT int FocusPrivatesIndex = -1; #if 0 extern void DeleteWindowFromAnyEvents(); @@ -312,6 +312,12 @@ SetWindowToDefaults(WindowPtr pWin) #ifdef COMPOSITE pWin->redirectDraw = 0; #endif + + ((FocusSemaphoresPtr) + pWin->devPrivates[FocusPrivatesIndex].ptr)->enterleave = 0; + ((FocusSemaphoresPtr) + pWin->devPrivates[FocusPrivatesIndex].ptr)->focusinout = 0; + } static void @@ -3981,10 +3987,11 @@ WindowParentHasDeviceCursor(WindowPtr pWin, _X_EXPORT Bool InitWindowPrivates(ScreenPtr screen) { - if (EnterLeavePrivatesIndex == -1) - EnterLeavePrivatesIndex = AllocateWindowPrivateIndex(); + if (FocusPrivatesIndex == -1) + FocusPrivatesIndex = AllocateWindowPrivateIndex(); - return AllocateWindowPrivate(screen, EnterLeavePrivatesIndex, 0); + return AllocateWindowPrivate(screen, FocusPrivatesIndex, + sizeof(FocusSemaphoresRec)); } #ifndef NOLOGOHACK diff --git a/include/inputstr.h b/include/inputstr.h index d8d12d732..bdb7518f2 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -391,5 +391,4 @@ typedef struct _QdEvent { int evcount; } QdEventRec; -#define MPXDBG(...) ErrorF("MPX: " __VA_ARGS__ ) #endif /* INPUTSTRUCT_H */ diff --git a/include/windowstr.h b/include/windowstr.h index 4683abeaa..87158b263 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -216,7 +216,15 @@ typedef struct _ScreenSaverStuff { extern int screenIsSaved; extern ScreenSaverStuffRec savedScreenInfo[MAXSCREENS]; -extern int EnterLeavePrivatesIndex; +extern int FocusPrivatesIndex; + +/* Used to maintain semantics of core protocol for Enter/LeaveNotifies and + * FocusIn/Out events for multiple pointers/keyboards. + */ +typedef struct _FocusSemaphores { + int enterleave; + int focusinout; +} FocusSemaphoresRec, *FocusSemaphoresPtr; /* * this is the configuration parameter "NO_BACK_SAVE" From ae75afcb1b5419102c5be10b8826ceed50d2ef5d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 18 Apr 2007 12:10:05 +0930 Subject: [PATCH 097/634] Change dbus 'listDevices' call to not require an argument. Update dbus-api documentation, plug memory leak on dbus reply error. --- config/config.c | 33 ++++++++++++++++++++------------- config/dbus-api | 4 ++++ 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/config/config.c b/config/config.c index 9828091f4..4861d9ead 100644 --- a/config/config.c +++ b/config/config.c @@ -280,11 +280,6 @@ configMessage(DBusConnection *connection, DBusMessage *message, void *closure) if (strcmp(dbus_message_get_interface(message), "org.x.config.input") == 0) { - if (!dbus_message_iter_init(message, &iter)) { - ErrorF("[config] failed to init iterator\n"); - dbus_error_free(&error); - return DBUS_HANDLER_RESULT_NEED_MEMORY; /* ?? */ - } if (!(reply = dbus_message_new_method_return(message))) { ErrorF("[config] failed to create the reply message\n"); @@ -292,18 +287,30 @@ configMessage(DBusConnection *connection, DBusMessage *message, void *closure) return DBUS_HANDLER_RESULT_NEED_MEMORY; } dbus_message_iter_init_append(reply, &r_iter); - - if (strcmp(dbus_message_get_member(message), "add") == 0) - ret = configAddDevice(message, &iter, reply, &r_iter, &error); - else if (strcmp(dbus_message_get_member(message), "remove") == 0) - ret = configRemoveDevice(message, &iter, &error); - else if (strcmp(dbus_message_get_member(message), "listDevices") == 0) - ret = configListDevices(message, &iter, reply, &r_iter, &error); - if (ret != BadDrawable && ret != BadAlloc) { + /* listDevices doesn't take any arguments */ + if (strcmp(dbus_message_get_member(message), "listDevices") == 0) + ret = configListDevices(message, NULL, reply, &r_iter, &error); + else + { + if (!dbus_message_iter_init(message, &iter)) { + ErrorF("[config] failed to init iterator\n"); + dbus_message_unref(reply); + dbus_error_free(&error); + return DBUS_HANDLER_RESULT_NEED_MEMORY; /* ?? */ + } + + if (strcmp(dbus_message_get_member(message), "add") == 0) + ret = configAddDevice(message, &iter, reply, &r_iter, &error); + else if (strcmp(dbus_message_get_member(message), "remove") == 0) + ret = configRemoveDevice(message, &iter, &error); + } + + if (ret != BadDrawable && ret != BadAlloc) { if (!strlen(dbus_message_get_signature(reply))) if (!dbus_message_iter_append_basic(&r_iter, DBUS_TYPE_INT32, &ret)) { ErrorF("[config] couldn't append to iterator\n"); + dbus_message_unref(reply); dbus_error_free(&error); return DBUS_HANDLER_RESULT_HANDLED; } diff --git a/config/dbus-api b/config/dbus-api index 53bb3e45d..cada792f5 100644 --- a/config/dbus-api +++ b/config/dbus-api @@ -33,3 +33,7 @@ org.x.config.input: i is the signature. Same return values as org.x.config.input.add. + + org.x.config.input.listDevices: + Lists the currently active devices. + Return value is sequence of ... From 9c30f7422121a0443c8d612d06181e17d8af9730 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 19 Apr 2007 12:00:24 +0930 Subject: [PATCH 098/634] config: Return errors as negative numbers, device ids as positive numbers. Update dbus-api documentation. --- config/config.c | 3 +++ config/dbus-api | 20 +++++++++----------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/config/config.c b/config/config.c index 4861d9ead..9b38faf49 100644 --- a/config/config.c +++ b/config/config.c @@ -308,12 +308,15 @@ configMessage(DBusConnection *connection, DBusMessage *message, void *closure) if (ret != BadDrawable && ret != BadAlloc) { if (!strlen(dbus_message_get_signature(reply))) + { + ret = -ret; /* return errors as negative numbers */ if (!dbus_message_iter_append_basic(&r_iter, DBUS_TYPE_INT32, &ret)) { ErrorF("[config] couldn't append to iterator\n"); dbus_message_unref(reply); dbus_error_free(&error); return DBUS_HANDLER_RESULT_HANDLED; } + } if (!dbus_connection_send(bus, reply, NULL)) ErrorF("[config] failed to send reply\n"); diff --git a/config/dbus-api b/config/dbus-api index cada792f5..654c22bec 100644 --- a/config/dbus-api +++ b/config/dbus-api @@ -15,25 +15,23 @@ org.x.config.input: Option names beginning with _ are not allowed; they are reserved for internal use. - Returns one int32, which is an X Status, as defined in X.h. If - everything is successful, Success will be returned. BadMatch will - be returned if the options given do not match any device. BadValue - is returned for a malformed message. + Returns one signed int32, which is the device id of the new device. + If the return value is a negative number, it represents the X + Status, as defined in X.h. BadMatch will be returned if the options + given do not match any device. BadValue is returned for a malformed + message. (Example: 8 is new device id 8. -8 is BadMatch.) Notably, BadAlloc is never returned: the server internally signals to D-BUS that the attempt failed for lack of memory. - The return does not notify the client of which devices were created - or modified as a result of this request: clients are encouraged to - listen for the XInput DevicePresenceNotify event to monitor changes - in the device list. - org.x.config.input.remove: Takes one int32 argument, which is the device ID to remove, i.e.: i is the signature. - Same return values as org.x.config.input.add. + + Returns one signed int32 which represents an X status as defined in + X.h. See org.x.config.input.add. Error codes are negative numbers. org.x.config.input.listDevices: - Lists the currently active devices. + Lists the currently active devices. No argument. Return value is sequence of ... From d61ed6c8a2823a3532439d5cb9f355129c93f523 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 19 Apr 2007 18:08:55 +0930 Subject: [PATCH 099/634] Check for NULL devices in CloseDevice(). --- dix/devices.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dix/devices.c b/dix/devices.c index 6edf1384e..9e48c0b9a 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -523,6 +523,9 @@ CloseDevice(DeviceIntPtr dev) ScreenPtr screen = screenInfo.screens[0]; int j; + if (!dev) + return; + if (dev->inited) (void)(*dev->deviceProc)(dev, DEVICE_CLOSE); From 82f97e1c0cc15b050edc82a8f3b9a423d6cf5fe7 Mon Sep 17 00:00:00 2001 From: Paulo Ricardo Zanoni Date: Thu, 26 Apr 2007 15:58:50 +0930 Subject: [PATCH 100/634] Enable event delivery for multiple heads. Requires moving the spriteTrace into the DeviceIntRec and adjusting a few functions to take in device argument, most notably XYToWindow(). Cursor rendering on the second screen is busted. --- XTrap/xtrapdi.c | 6 +- Xext/xevie.c | 2 +- Xext/xtest.c | 6 +- Xi/exevents.c | 2 +- Xi/querydp.c | 2 +- dix/devices.c | 24 ++++-- dix/events.c | 137 ++++++++++++++++-------------- dix/main.c | 1 - hw/xwin/winwin32rootlesswndproc.c | 8 +- include/dix.h | 2 +- include/inputstr.h | 12 +++ mi/mi.h | 1 + mi/mieq.c | 24 +++--- mi/mipointer.c | 7 +- mi/mipointer.h | 1 + randr/rrpointer.c | 8 +- 16 files changed, 143 insertions(+), 100 deletions(-) diff --git a/XTrap/xtrapdi.c b/XTrap/xtrapdi.c index bc15bbd86..0b70d7b1d 100644 --- a/XTrap/xtrapdi.c +++ b/XTrap/xtrapdi.c @@ -102,7 +102,7 @@ globalref int_function XETrapProcVector[256L]; /* The "shadowed" ProcVector */ #ifndef VECTORED_EVENTS globalref int_function EventProcVector[XETrapCoreEvents]; #else -extern WindowPtr GetCurrentRootWindow(); +extern WindowPtr GetCurrentRootWindow(DeviceIntPtr); globalref int_function EventProcVector[128L]; #endif static int_function keybd_process_inp = NULL; /* Used for VECTORED_EVENTS */ @@ -1620,7 +1620,9 @@ int XETrapEventVector(ClientPtr client, xEvent *x_event) (x_event->u.u.type <= MotionNotify) && (!x_event->u.keyButtonPointer.sameScreen))) { /* we've moved/warped to another screen */ - WindowPtr root_win = GetCurrentRootWindow(); + /* XXX: we're getting the client's pointer root window. + * is this correct? Should it be the client's keyboard? */ + WindowPtr root_win = GetCurrentRootWindow(PickPointer(client)); current_screen = root_win->drawable.pScreen->myNum; } data.hdr.screen = current_screen; diff --git a/Xext/xevie.c b/Xext/xevie.c index 7922913ba..0feb4d7aa 100644 --- a/Xext/xevie.c +++ b/Xext/xevie.c @@ -463,7 +463,7 @@ XevieKbdProcessInputProc(xEvent *xE, DeviceIntPtr dev, int count) xevieModifiersOn = TRUE; xE->u.keyButtonPointer.event = xeviewin->drawable.id; - xE->u.keyButtonPointer.root = GetCurrentRootWindow()->drawable.id; + xE->u.keyButtonPointer.root = GetCurrentRootWindow(dev)->drawable.id; xE->u.keyButtonPointer.child = (xeviewin->firstChild) ? xeviewin->firstChild->drawable.id:0; xE->u.keyButtonPointer.rootX = xeviehot.x; diff --git a/Xext/xtest.c b/Xext/xtest.c index 93e88c471..963029cce 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -363,7 +363,7 @@ ProcXTestFakeInput(client) if (!dev) dev = PickPointer(client); if (ev->u.keyButtonPointer.root == None) - root = GetCurrentRootWindow(); + root = GetCurrentRootWindow(dev); else { rc = dixLookupWindow(&root, ev->u.keyButtonPointer.root, client, @@ -428,10 +428,10 @@ ProcXTestFakeInput(client) if ((!noPanoramiXExtension && root->drawable.pScreen->myNum != XineramaGetCursorScreen(dev)) - || (noPanoramiXExtension && root != GetCurrentRootWindow())) + || (noPanoramiXExtension && root != GetCurrentRootWindow(dev))) #else - if (root != GetCurrentRootWindow()) + if (root != GetCurrentRootWindow(dev)) #endif { NewCurrentScreen(dev, root->drawable.pScreen, diff --git a/Xi/exevents.c b/Xi/exevents.c index 26f3640b7..d00dc2994 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -835,7 +835,7 @@ SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate, /* If the input focus is PointerRootWin, send the event to where * the pointer is if possible, then perhaps propogate up to root. */ if (inputFocus == PointerRootWin) - inputFocus = GetCurrentRootWindow(); + inputFocus = GetCurrentRootWindow(d); if (IsParent(inputFocus, spriteWin)) { effectiveFocus = inputFocus; diff --git a/Xi/querydp.c b/Xi/querydp.c index d2ed0b80a..6224f1362 100644 --- a/Xi/querydp.c +++ b/Xi/querydp.c @@ -107,7 +107,7 @@ ProcXQueryDevicePointer(ClientPtr client) rep.length = 0; rep.sequenceNumber = client->sequence; rep.mask = pDev->button->state | inputInfo.keyboard->key->state; - rep.root = (GetCurrentRootWindow())->drawable.id; + rep.root = (GetCurrentRootWindow(pDev))->drawable.id; rep.rootX = pSprite->hot.x; rep.rootY = pSprite->hot.y; rep.child = None; diff --git a/dix/devices.c b/dix/devices.c index 9e48c0b9a..cf6090d80 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -194,6 +194,14 @@ EnableDevice(DeviceIntPtr dev) *prev && (*prev != dev); prev = &(*prev)->next) ; + + /* Sprites will be initialized with their 'windows' just when inside the + * DefineInitialRootWindow function! */ + if (IsPointerDevice(dev) && dev->spriteInfo->spriteOwner) + InitializeSprite(dev, NullWindow); + else + PairDevices(NULL, inputInfo.pointer, dev); + if ((*prev != dev) || !dev->inited || ((ret = (*dev->deviceProc)(dev, DEVICE_ON)) != Success)) { ErrorF("couldn't enable device %d\n", dev->id); @@ -202,11 +210,6 @@ EnableDevice(DeviceIntPtr dev) dev->enabled = TRUE; *prev = dev->next; - if (IsPointerDevice(dev) && dev->spriteInfo->spriteOwner) - InitializeSprite(dev, GetCurrentRootWindow()); - else - PairDevices(NULL, inputInfo.pointer, dev); - for (prev = &inputInfo.devices; *prev; prev = &(*prev)->next) ; *prev = dev; @@ -272,6 +275,11 @@ ActivateDevice(DeviceIntPtr dev) return ret; } +int +DeactivateDevice(DeviceIntPtr dev) +{ +} + static void CoreKeyboardBell(int volume, DeviceIntPtr pDev, pointer arg, int something) { @@ -614,8 +622,10 @@ CloseDevice(DeviceIntPtr dev) XkbRemoveResourceClient((DevicePtr)dev,dev->xkb_interest->resource); #endif - if (DevHasCursor(dev)) - xfree((pointer)dev->spriteInfo->sprite); + if (DevHasCursor(dev)) { + xfree(dev->spriteInfo->sprite->spriteTrace); + xfree(dev->spriteInfo->sprite); + } /* a client may have the device set as client pointer */ for (j = 0; j < currentMaxClients; j++) diff --git a/dix/events.c b/dix/events.c index 1733e2d1e..a751e3c6a 100644 --- a/dix/events.c +++ b/dix/events.c @@ -230,15 +230,7 @@ static struct { TimeStamp time; } syncEvents; -/* - * The window trace information is used to avoid having to compute all the - * windows between the root and the current pointer window each time a button - * or key goes down. The grabs on each of those windows must be checked. - */ -static WindowPtr *spriteTrace = (WindowPtr *)NULL; -#define ROOT spriteTrace[0] -static int spriteTraceSize = 0; -static int spriteTraceGood; +#define RootWindow(dev) dev->spriteInfo->sprite->spriteTrace[0] /** * True if device owns a cursor, false if device shares a cursor sprite with @@ -284,6 +276,7 @@ static void DoEnterLeaveEvents( ); static WindowPtr XYToWindow( + DeviceIntPtr pDev, int x, int y ); @@ -607,7 +600,7 @@ XineramaCheckMotion(xEvent *xE, DeviceIntPtr pDev) xeviehot.y = pSprite->hot.y; xeviewin = #endif - pSprite->win = XYToWindow(pSprite->hot.x, pSprite->hot.y); + pSprite->win = XYToWindow(pDev, pSprite->hot.x, pSprite->hot.y); if (pSprite->win != prevSpriteWin) { @@ -858,7 +851,7 @@ CheckVirtualMotion( xeviehot.x = pSprite->hot.x; xeviehot.y = pSprite->hot.y; #endif - ROOT = WindowTable[pSprite->hot.pScreen->myNum]; + RootWindow(pDev) = WindowTable[pSprite->hot.pScreen->myNum]; } static void @@ -973,10 +966,15 @@ PostNewCursor(DeviceIntPtr pDev) } } + +/** + * @param dev device which you want to know its current root window + * @return root window where dev's sprite is located + */ _X_EXPORT WindowPtr -GetCurrentRootWindow(void) +GetCurrentRootWindow(DeviceIntPtr dev) { - return ROOT; + return RootWindow(dev); } _X_EXPORT WindowPtr @@ -1201,10 +1199,11 @@ ComputeFreezes(void) count = replayDev->coreGrab.sync.evcount; syncEvents.replayDev = (DeviceIntPtr)NULL; - w = XYToWindow( XE_KBPTR.rootX, XE_KBPTR.rootY); - for (i = 0; i < spriteTraceGood; i++) + w = XYToWindow(replayDev, XE_KBPTR.rootX, XE_KBPTR.rootY); + for (i = 0; i < replayDev->spriteInfo->sprite->spriteTraceGood; i++) { - if (syncEvents.replayWin == spriteTrace[i]) + if (syncEvents.replayWin == + replayDev->spriteInfo->sprite->spriteTrace[i]) { if (!CheckDeviceGrabs(replayDev, xE, i+1, count)) { if (replayDev->focus) @@ -1365,7 +1364,7 @@ DeactivatePointerGrab(DeviceIntPtr mouse) DoEnterLeaveEvents(mouse, grab->window, mouse->spriteInfo->sprite->win, NotifyUngrab); if (grab->confineTo) - ConfineCursorToWindow(mouse, ROOT, FALSE, FALSE); + ConfineCursorToWindow(mouse, RootWindow(mouse), FALSE, FALSE); PostNewCursor(mouse); if (grab->cursor) FreeCursor(grab->cursor, (Cursor)0); @@ -1888,7 +1887,7 @@ FixUpEventFromWindow( if (calcChild) { - WindowPtr w=spriteTrace[spriteTraceGood-1]; + WindowPtr w= pSprite->spriteTrace[pSprite->spriteTraceGood-1]; /* If the search ends up past the root should the child field be set to none or should the value in the argument be passed through. It probably doesn't matter since everyone calls @@ -1913,7 +1912,7 @@ FixUpEventFromWindow( w = w->parent; } } - XE_KBPTR.root = ROOT->drawable.id; + XE_KBPTR.root = RootWindow(pDev)->drawable.id; XE_KBPTR.event = pWin->drawable.id; if (pSprite->hot.pScreen == pWin->drawable.pScreen) { @@ -2064,13 +2063,15 @@ PointInBorderSize(WindowPtr pWin, int x, int y) } static WindowPtr -XYToWindow(int x, int y) +XYToWindow(DeviceIntPtr pDev, int x, int y) { WindowPtr pWin; BoxRec box; + SpritePtr pSprite; - spriteTraceGood = 1; /* root window still there */ - pWin = ROOT->firstChild; + pSprite = pDev->spriteInfo->sprite; + pSprite->spriteTraceGood = 1; /* root window still there */ + pWin = RootWindow(pDev)->firstChild; while (pWin) { if ((pWin->mapped) && @@ -2094,21 +2095,22 @@ XYToWindow(int x, int y) #endif ) { - if (spriteTraceGood >= spriteTraceSize) + if (pSprite->spriteTraceGood >= pSprite->spriteTraceSize) { - spriteTraceSize += 10; + pSprite->spriteTraceSize += 10; Must_have_memory = TRUE; /* XXX */ - spriteTrace = (WindowPtr *)xrealloc( - spriteTrace, spriteTraceSize*sizeof(WindowPtr)); + pSprite->spriteTrace = (WindowPtr *)xrealloc( + pSprite->spriteTrace, + pSprite->spriteTraceSize*sizeof(WindowPtr)); Must_have_memory = FALSE; /* XXX */ } - spriteTrace[spriteTraceGood++] = pWin; + pSprite->spriteTrace[pSprite->spriteTraceGood++] = pWin; pWin = pWin->firstChild; } else pWin = pWin->nextSib; } - return spriteTrace[spriteTraceGood-1]; + return pSprite->spriteTrace[pSprite->spriteTraceGood-1]; } Bool @@ -2129,7 +2131,7 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev) if (pSprite->hot.pScreen != pSprite->hotPhys.pScreen) { pSprite->hot.pScreen = pSprite->hotPhys.pScreen; - ROOT = WindowTable[pSprite->hot.pScreen->myNum]; + RootWindow(pDev) = WindowTable[pSprite->hot.pScreen->myNum]; } pSprite->hot.x = XE_KBPTR.rootX; pSprite->hot.y = XE_KBPTR.rootY; @@ -2166,7 +2168,7 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev) #ifdef XEVIE xeviewin = #endif - pSprite->win = XYToWindow(pSprite->hot.x, pSprite->hot.y); + pSprite->win = XYToWindow(pDev, pSprite->hot.x, pSprite->hot.y); #ifdef notyet if (!(pSprite->win->deliverableEvents & Motion_Filter(pDev->button)) @@ -2263,7 +2265,6 @@ DefineInitialRootWindow(WindowPtr win) #ifdef XEVIE xeviewin = win; #endif - ROOT = win; InitializeSprite(inputInfo.pointer, win); @@ -2312,8 +2313,25 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) { pSprite->current = wCursor(pWin); pSprite->current->refcnt++; - } else + pSprite->spriteTrace = (WindowPtr *)xcalloc(1, 32*sizeof(WindowPtr)); + if (!pSprite->spriteTrace) + FatalError("Failed to allocate spriteTrace"); + pSprite->spriteTraceSize = 32; + + RootWindow(pDev) = pWin; + pSprite->spriteTraceGood = 1; + + pSprite->pEnqueueScreen = pScreen; + pSprite->pDequeueScreen = pSprite->pEnqueueScreen; + + } else { pSprite->current = NullCursor; + pSprite->spriteTrace = NULL; + pSprite->spriteTraceSize = 0; + pSprite->spriteTraceGood = 0; + pSprite->pEnqueueScreen = screenInfo.screens[0]; + pSprite->pDequeueScreen = pSprite->pEnqueueScreen; + } if (pScreen) { @@ -2768,14 +2786,15 @@ CheckDeviceGrabs(DeviceIntPtr device, xEvent *xE, } if ((focus->win == NoneWin) || - (i >= spriteTraceGood) || - ((i > checkFirst) && (pWin != spriteTrace[i-1]))) + (i >= device->spriteInfo->sprite->spriteTraceGood) || + ((i > checkFirst) && + (pWin != device->spriteInfo->sprite->spriteTrace[i-1]))) return FALSE; } - for (; i < spriteTraceGood; i++) + for (; i < device->spriteInfo->sprite->spriteTraceGood; i++) { - pWin = spriteTrace[i]; + pWin = device->spriteInfo->sprite->spriteTrace[i]; if (pWin->optional && CheckPassiveGrabsOnWindow(pWin, device, xE, count)) return TRUE; @@ -2946,7 +2965,7 @@ ProcessKeyboardEvent (xEvent *xE, DeviceIntPtr keybd, int count) { xeviekb = keybd; if(!rootWin) { - rootWin = GetCurrentRootWindow()->drawable.id; + rootWin = GetCurrentRootWindow(keybd)->drawable.id; } xE->u.keyButtonPointer.event = xeviewin->drawable.id; xE->u.keyButtonPointer.root = rootWin; @@ -3806,8 +3825,8 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) if ((fromWin == NullWindow) || (fromWin == PointerRootWin)) { if (fromWin == PointerRootWin) - FocusOutEvents(dev, pSprite->win, ROOT, mode, - NotifyPointer, TRUE); + FocusOutEvents(dev, pSprite->win, RootWindow(dev), mode, + NotifyPointer, TRUE); /* Notify all the roots */ #ifdef PANORAMIX if ( !noPanoramiXExtension ) @@ -3836,16 +3855,16 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) for (i=0; iwin, NullWindow, mode, - NotifyPointer, TRUE); + (void)FocusInEvents(dev, RootWindow(dev), pSprite->win, + NullWindow, mode, NotifyPointer, TRUE); } else { if ((fromWin == NullWindow) || (fromWin == PointerRootWin)) { if (fromWin == PointerRootWin) - FocusOutEvents(dev, pSprite->win, ROOT, mode, NotifyPointer, - TRUE); + FocusOutEvents(dev, pSprite->win, RootWindow(dev), mode, + NotifyPointer, TRUE); #ifdef PANORAMIX if ( !noPanoramiXExtension ) FocusEvent(dev, FocusOut, mode, out, WindowTable[0]); @@ -3854,7 +3873,7 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) for (i=0; iparent != NullWindow) - (void)FocusInEvents(dev, ROOT, toWin, toWin, mode, + (void)FocusInEvents(dev, RootWindow(dev), toWin, toWin, mode, NotifyNonlinearVirtual, TRUE); FocusEvent(dev, FocusIn, mode, NotifyNonlinear, toWin); if (IsParent(toWin, pSprite->win)) @@ -4130,7 +4149,7 @@ ProcGrabPointer(ClientPtr client) if (grab) { if (grab->confineTo && !confineTo) - ConfineCursorToWindow(device, ROOT, FALSE, FALSE); + ConfineCursorToWindow(device, RootWindow(device), FALSE, FALSE); oldCursor = grab->cursor; } tempGrab.cursor = cursor; @@ -4351,7 +4370,7 @@ ProcQueryPointer(ClientPtr client) rep.sequenceNumber = client->sequence; rep.mask = mouse->button->state | inputInfo.keyboard->key->state; rep.length = 0; - rep.root = (ROOT)->drawable.id; + rep.root = (RootWindow(mouse))->drawable.id; rep.rootX = pSprite->hot.x; rep.rootY = pSprite->hot.y; rep.child = None; @@ -4400,19 +4419,6 @@ InitEvents(void) inputInfo.off_devices = (DeviceIntPtr)NULL; inputInfo.keyboard = (DeviceIntPtr)NULL; inputInfo.pointer = (DeviceIntPtr)NULL; - if (spriteTraceSize == 0) - { - spriteTraceSize = 32; - spriteTrace = (WindowPtr *)xalloc(32*sizeof(WindowPtr)); - /* FIXME: spriteTrace[0] needs to be NULL, otherwise - * GetCurrentRootWindow() in EnableDevice() may return a invalid - * value. (whot) - */ - memset(spriteTrace, 0, 32 * sizeof(WindowPtr)); - if (!spriteTrace) - FatalError("failed to allocate spriteTrace"); - } - spriteTraceGood = 0; lastEventMask = OwnerGrabButtonMask; filters[MotionNotify] = PointerMotionMask; #ifdef XEVIE @@ -4441,13 +4447,14 @@ InitEvents(void) } } - -void +/** + * This function is deprecated! It shouldn't be used anymore. It used to free + * the spriteTraces, but now they are freed when the SpriteRec is freed. + */ +_X_DEPRECATED void CloseDownEvents(void) { - xfree(spriteTrace); - spriteTrace = NULL; - spriteTraceSize = 0; + } int @@ -4497,7 +4504,7 @@ ProcSendEvent(ClientPtr client) /* If the input focus is PointerRootWin, send the event to where the pointer is if possible, then perhaps propogate up to root. */ if (inputFocus == PointerRootWin) - inputFocus = ROOT; + inputFocus = pSprite->spriteTrace[0]; /* Root window! */ if (IsParent(inputFocus, pSprite->win)) { diff --git a/dix/main.c b/dix/main.c index f5b89ba05..2f064a9a7 100644 --- a/dix/main.c +++ b/dix/main.c @@ -498,7 +498,6 @@ main(int argc, char *argv[], char *envp[]) FreeScreen(screenInfo.screens[i]); screenInfo.numScreens = i; } - CloseDownEvents(); xfree(WindowTable); WindowTable = NULL; FreeFonts(); diff --git a/hw/xwin/winwin32rootlesswndproc.c b/hw/xwin/winwin32rootlesswndproc.c index ffa84938f..54df8892c 100755 --- a/hw/xwin/winwin32rootlesswndproc.c +++ b/hw/xwin/winwin32rootlesswndproc.c @@ -299,7 +299,9 @@ IsRaiseOnClick (WindowPtr pWin) struct _Window *pwin; struct _Property *prop; - WindowPtr pRoot = GetCurrentRootWindow (); + /* XXX We're getting inputInfo.poniter here, but this might be really wrong. + * Which pointer's current window do we want? */ + WindowPtr pRoot = GetCurrentRootWindow (inputInfo.pointer); if (!pWin) { @@ -352,7 +354,9 @@ IsMouseActive (WindowPtr pWin) struct _Window *pwin; struct _Property *prop; - WindowPtr pRoot = GetCurrentRootWindow (); + /* XXX We're getting inputInfo.poniter here, but this might be really wrong. + * Which pointer's current window do we want? */ + WindowPtr pRoot = GetCurrentRootWindow (inputInfo.pointer); if (!pWin) { diff --git a/include/dix.h b/include/dix.h index 385f56cc8..9da265deb 100644 --- a/include/dix.h +++ b/include/dix.h @@ -357,7 +357,7 @@ extern Bool IsParent( WindowPtr /* maybeparent */, WindowPtr /* child */); -extern WindowPtr GetCurrentRootWindow(void); +extern WindowPtr GetCurrentRootWindow(DeviceIntPtr pDev); extern WindowPtr GetSpriteWindow(DeviceIntPtr pDev); diff --git a/include/inputstr.h b/include/inputstr.h index bdb7518f2..4924cb1cc 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -287,6 +287,18 @@ typedef struct { WindowPtr windows[MAXSCREENS]; WindowPtr confineWin; /* confine window */ #endif + /* The window trace information is used at dix/events.c to avoid having + * to compute all the windows between the root and the current pointer + * window each time a button or key goes down. The grabs on each of those + * windows must be checked. + * spriteTraces should only be used at dix/events.c! */ + WindowPtr *spriteTrace; + int spriteTraceSize; + int spriteTraceGood; + + ScreenPtr pEnqueueScreen; /* screen events are being delivered to */ + ScreenPtr pDequeueScreen; /* screen events are being dispatched to */ + } SpriteRec, *SpritePtr; /* states for devices */ diff --git a/mi/mi.h b/mi/mi.h index fad2d19a6..f83c42b2c 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -158,6 +158,7 @@ extern void mieqEnqueue( ); extern void mieqSwitchScreen( + DeviceIntPtr /* pDev */, ScreenPtr /*pScreen*/, Bool /*fromDIX*/ ); diff --git a/mi/mieq.c b/mi/mieq.c index 143a94f5b..2eeb21eea 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -67,6 +67,9 @@ in this Software without prior written authorization from The Open Group. #define QUEUE_SIZE 512 +#define EnqueueScreen(dev) dev->spriteInfo->sprite->pEnqueueScreen +#define DequeueScreen(dev) dev->spriteInfo->sprite->pDequeueScreen + typedef struct _Event { xEvent event[7]; int nevents; @@ -79,8 +82,6 @@ typedef struct _EventQueue { CARD32 lastEventTime; /* to avoid time running backwards */ int lastMotion; /* device ID if last event motion? */ EventRec events[QUEUE_SIZE]; /* static allocation for signals */ - ScreenPtr pEnqueueScreen; /* screen events are being delivered to */ - ScreenPtr pDequeueScreen; /* screen events are being dispatched to */ mieqHandler handlers[128]; /* custom event handler */ } EventQueueRec, *EventQueuePtr; @@ -94,8 +95,6 @@ mieqInit(void) miEventQueue.head = miEventQueue.tail = 0; miEventQueue.lastEventTime = GetTimeInMillis (); miEventQueue.lastMotion = FALSE; - miEventQueue.pEnqueueScreen = screenInfo.screens[0]; - miEventQueue.pDequeueScreen = miEventQueue.pEnqueueScreen; for (i = 0; i < 128; i++) miEventQueue.handlers[i] = NULL; SetInputCheck(&miEventQueue.head, &miEventQueue.tail); @@ -179,18 +178,18 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e) miEventQueue.lastEventTime = miEventQueue.events[oldtail].event[0].u.keyButtonPointer.time; - miEventQueue.events[oldtail].pScreen = miEventQueue.pEnqueueScreen; + miEventQueue.events[oldtail].pScreen = EnqueueScreen(pDev); miEventQueue.events[oldtail].pDev = pDev; miEventQueue.lastMotion = isMotion; } void -mieqSwitchScreen(ScreenPtr pScreen, Bool fromDIX) +mieqSwitchScreen(DeviceIntPtr pDev, ScreenPtr pScreen, Bool fromDIX) { - miEventQueue.pEnqueueScreen = pScreen; + EnqueueScreen(pDev) = pScreen; if (fromDIX) - miEventQueue.pDequeueScreen = pScreen; + DequeueScreen(pDev) = pScreen; } void @@ -224,15 +223,15 @@ mieqProcessInputEvents(void) e = &miEventQueue.events[miEventQueue.head]; /* Assumption - screen switching can only occur on motion events. */ - if (e->pScreen != miEventQueue.pDequeueScreen) { - miEventQueue.pDequeueScreen = e->pScreen; + if (e->pScreen != DequeueScreen(e->pDev)) { + DequeueScreen(e->pDev) = e->pScreen; x = e->event[0].u.keyButtonPointer.rootX; y = e->event[0].u.keyButtonPointer.rootY; if (miEventQueue.head == QUEUE_SIZE - 1) miEventQueue.head = 0; else ++miEventQueue.head; - NewCurrentScreen (e->pDev, miEventQueue.pDequeueScreen, x, y); + NewCurrentScreen (e->pDev, DequeueScreen(e->pDev), x, y); } else { if (miEventQueue.head == QUEUE_SIZE - 1) @@ -243,7 +242,8 @@ mieqProcessInputEvents(void) /* If someone's registered a custom event handler, let them * steal it. */ if (miEventQueue.handlers[e->event->u.u.type]) { - miEventQueue.handlers[e->event->u.u.type](miEventQueue.pDequeueScreen->myNum, + miEventQueue.handlers[e->event->u.u.type]( + DequeueScreen(e->pDev)->myNum, e->event, dev, e->nevents); return; diff --git a/mi/mipointer.c b/mi/mipointer.c index b06a0be3e..b14c2c7d3 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -351,7 +351,7 @@ miPointerWarpCursor (pDev, pScreen, x, y) SetupScreen (pScreen); if (pPointer->pScreen != pScreen) - (*pScreenPriv->screenFuncs->NewEventScreen) (pScreen, TRUE); + (*pScreenPriv->screenFuncs->NewEventScreen) (pDev, pScreen, TRUE); if (GenerateEvent) { @@ -492,7 +492,7 @@ miPointerSetScreen(DeviceIntPtr pDev, int screen_no, int x, int y) pScreen = screenInfo.screens[screen_no]; pScreenPriv = GetScreenPrivate (pScreen); - (*pScreenPriv->screenFuncs->NewEventScreen) (pScreen, FALSE); + (*pScreenPriv->screenFuncs->NewEventScreen) (pDev, pScreen, FALSE); NewCurrentScreen (pDev, pScreen, x, y); pPointer->limits.x2 = pScreen->width; @@ -570,7 +570,8 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y, unsigned long time) if (newScreen != pScreen) { pScreen = newScreen; - (*pScreenPriv->screenFuncs->NewEventScreen) (pScreen, FALSE); + (*pScreenPriv->screenFuncs->NewEventScreen) (pDev, pScreen, + FALSE); pScreenPriv = GetScreenPrivate (pScreen); /* Smash the confine to the new screen */ pPointer->limits.x2 = pScreen->width; diff --git a/mi/mipointer.h b/mi/mipointer.h index 666a6eb94..cc9c03730 100644 --- a/mi/mipointer.h +++ b/mi/mipointer.h @@ -88,6 +88,7 @@ typedef struct _miPointerScreenFuncRec { xEventPtr /* event */ ); void (*NewEventScreen)( + DeviceIntPtr /* pDev */, ScreenPtr /* pScr */, Bool /* fromDIX */ ); diff --git a/randr/rrpointer.c b/randr/rrpointer.c index fec5d45bf..722b22c99 100644 --- a/randr/rrpointer.c +++ b/randr/rrpointer.c @@ -135,10 +135,16 @@ RRPointerMoved (ScreenPtr pScreen, int x, int y) void RRPointerScreenConfigured (ScreenPtr pScreen) { - WindowPtr pRoot = GetCurrentRootWindow (); + WindowPtr pRoot = GetCurrentRootWindow (inputInfo.pointer); ScreenPtr pCurrentScreen = pRoot ? pRoot->drawable.pScreen : NULL; int x, y; + /* XXX: GetCurrentRootWindow revices an argument, It is inputInfo.pointer, + * but I really think this is wrong... What do we do here? This was made so + * that it can compile, but I don't think randr should assume there is just + * one pointer. There might be more than one pointer on the screen! So, what + * to do? What happens? */ + if (pScreen != pCurrentScreen) return; GetSpritePosition(inputInfo.pointer, &x, &y); From cfc01115af4136b2dad8218ba6b389513a356a2e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 26 Apr 2007 22:18:35 +0930 Subject: [PATCH 101/634] Fix cursor rendering for multi-head. Before putting anything on the screen, check if the GC was made for the ScreenRec we want to render to. If not, toss the GC and create a new one. This is not the best solution but it does the job for now. Same thing for ARGB cursors except that it's even uglier. Also remember the screen the cursor was rendered to and check for the right screen in the BlockHandler, SourceValidate and a few others. Only remove or restore the cursor if we are rendering to the same screen, otherwise we get artefacts that are both funky and really annoying. --- mi/midispcur.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++++ mi/misprite.c | 27 ++++++++++++++------ mi/mispritest.h | 1 + 3 files changed, 87 insertions(+), 8 deletions(-) diff --git a/mi/midispcur.c b/mi/midispcur.c index d4471f9e5..d7a8964dc 100644 --- a/mi/midispcur.c +++ b/mi/midispcur.c @@ -488,6 +488,15 @@ miDCPutUpCursor (pDev, pScreen, pCursor, x, y, source, mask) #ifdef ARGB_CURSOR if (pPriv->pPicture) { + /* see comment in miDCPutUpCursor */ + if (pBuffer->pRootPicture && + pBuffer->pRootPicture->pDrawable && + pBuffer->pRootPicture->pDrawable->pScreen != pScreen) + { + tossPict(pBuffer->pRootPicture); + pBuffer->pRootPicture = NULL; + } + if (!EnsurePicture(pBuffer->pRootPicture, &pWin->drawable, pWin)) return FALSE; CompositePicture (PictOpOver, @@ -502,6 +511,25 @@ miDCPutUpCursor (pDev, pScreen, pCursor, x, y, source, mask) else #endif { + /** + * XXX: Before MPX, the sourceGC and maskGC were attached to the + * screen, and would switch as the screen switches. With mpx we have + * the GC's attached to the device now, so each time we switch screen + * we need to make sure the GC's are allocated on the new screen. + * This is ... not optimal. (whot) + */ + if (pBuffer->pSourceGC && pScreen != pBuffer->pSourceGC->pScreen) + { + tossGC(pBuffer->pSourceGC); + pBuffer->pSourceGC = NULL; + } + + if (pBuffer->pMaskGC && pScreen != pBuffer->pMaskGC->pScreen) + { + tossGC(pBuffer->pMaskGC); + pBuffer->pMaskGC = NULL; + } + if (!EnsureGC(pBuffer->pSourceGC, pWin)) return FALSE; if (!EnsureGC(pBuffer->pMaskGC, pWin)) @@ -544,6 +572,12 @@ miDCSaveUnderCursor (pDev, pScreen, x, y, w, h) if (!pSave) return FALSE; } + /* see comment in miDCPutUpCursor */ + if (pBuffer->pSaveGC && pBuffer->pSaveGC->pScreen != pScreen) + { + tossGC(pBuffer->pSaveGC); + pBuffer->pSaveGC = NULL; + } if (!EnsureGC(pBuffer->pSaveGC, pWin)) return FALSE; pGC = pBuffer->pSaveGC; @@ -573,6 +607,12 @@ miDCRestoreUnderCursor (pDev, pScreen, x, y, w, h) pWin = WindowTable[pScreen->myNum]; if (!pSave) return FALSE; + /* see comment in miDCPutUpCursor */ + if (pBuffer->pRestoreGC && pBuffer->pRestoreGC->pScreen != pScreen) + { + tossGC(pBuffer->pRestoreGC); + pBuffer->pRestoreGC = NULL; + } if (!EnsureGC(pBuffer->pRestoreGC, pWin)) return FALSE; pGC = pBuffer->pRestoreGC; @@ -606,6 +646,12 @@ miDCChangeSave (pDev, pScreen, x, y, w, h, dx, dy) */ if (!pSave) return FALSE; + /* see comment in miDCPutUpCursor */ + if (pBuffer->pRestoreGC && pBuffer->pRestoreGC->pScreen != pScreen) + { + tossGC(pBuffer->pRestoreGC); + pBuffer->pRestoreGC = NULL; + } if (!EnsureGC(pBuffer->pRestoreGC, pWin)) return FALSE; pGC = pBuffer->pRestoreGC; @@ -646,6 +692,12 @@ miDCChangeSave (pDev, pScreen, x, y, w, h, dx, dy) (*pGC->ops->CopyArea) ((DrawablePtr) pSave, (DrawablePtr) pWin, pGC, 0, sourcey, -dx, copyh, x + dx, desty); } + /* see comment in miDCPutUpCursor */ + if (pBuffer->pSaveGC && pBuffer->pSaveGC->pScreen != pScreen) + { + tossGC(pBuffer->pSaveGC); + pBuffer->pSaveGC = NULL; + } if (!EnsureGC(pBuffer->pSaveGC, pWin)) return FALSE; pGC = pBuffer->pSaveGC; @@ -788,6 +840,15 @@ miDCMoveCursor (pDev, pScreen, pCursor, x, y, w, h, dx, dy, source, mask) #ifdef ARGB_CURSOR if (pPriv->pPicture) { + /* see comment in miDCPutUpCursor */ + if (pBuffer->pTempPicture && + pBuffer->pTempPicture->pDrawable && + pBuffer->pTempPicture->pDrawable->pScreen != pScreen) + { + tossPict(pBuffer->pTempPicture); + pBuffer->pTempPicture = NULL; + } + if (!EnsurePicture(pBuffer->pTempPicture, &pTemp->drawable, pWin)) return FALSE; CompositePicture (PictOpOver, @@ -822,6 +883,12 @@ miDCMoveCursor (pDev, pScreen, pCursor, x, y, w, h, dx, dy, source, mask) source, mask); } + /* see comment in miDCPutUpCursor */ + if (pBuffer->pRestoreGC && pBuffer->pRestoreGC->pScreen != pScreen) + { + tossGC(pBuffer->pRestoreGC); + pBuffer->pRestoreGC = NULL; + } /* * copy the temporary pixmap onto the screen */ diff --git a/mi/misprite.c b/mi/misprite.c index 60774b562..6e4215270 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -79,6 +79,7 @@ static int miSpriteDevPrivatesIndex; (miCursorInfoPtr) dev->devPrivates[miSpriteDevPrivatesIndex].ptr : \ (miCursorInfoPtr) inputInfo.pointer->devPrivates[miSpriteDevPrivatesIndex].ptr) + /* * screen wrappers */ @@ -175,6 +176,7 @@ miSpriteReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure) pCursorInfo = MISPRITE(pDev); if (pCursorInfo->isUp && + pCursorInfo->pScreen == pScreen && RECT_IN_REGION (pScreen, pRegion, &pCursorInfo->saved) != rgnOUT) { @@ -277,7 +279,6 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs) damageRegister = 0; miSpriteDevPrivatesIndex = AllocateDevicePrivateIndex(); - return TRUE; } @@ -340,6 +341,7 @@ miSpriteGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine) pCursorInfo = MISPRITE(pDev); if (pDrawable->type == DRAWABLE_WINDOW && pCursorInfo->isUp && + pCursorInfo->pScreen == pScreen && ORG_OVERLAP(&pCursorInfo->saved,pDrawable->x,pDrawable->y, sx, sy, w, h)) { @@ -379,7 +381,9 @@ miSpriteGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart) { pCursorInfo = MISPRITE(pDev); - if (pDrawable->type == DRAWABLE_WINDOW && pCursorInfo->isUp) + if (pDrawable->type == DRAWABLE_WINDOW && + pCursorInfo->isUp && + pCursorInfo->pScreen == pScreen) { DDXPointPtr pts; int *widths; @@ -431,6 +435,7 @@ miSpriteSourceValidate (pDrawable, x, y, width, height) { pCursorInfo = MISPRITE(pDev); if (pDrawable->type == DRAWABLE_WINDOW && pCursorInfo->isUp && + pCursorInfo->pScreen == pScreen && ORG_OVERLAP(&pCursorInfo->saved, pDrawable->x, pDrawable->y, x, y, width, height)) { @@ -466,7 +471,7 @@ miSpriteCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) /* * Damage will take care of destination check */ - if (pCursorInfo->isUp && + if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen && RECT_IN_REGION (pScreen, prgnSrc, &pCursorInfo->saved) != rgnOUT) { SPRITE_DEBUG (("CopyWindow remove\n")); @@ -504,7 +509,9 @@ miSpriteBlockHandler (i, blockData, pTimeout, pReadmask) if (DevHasCursor(pDev)) { pCursorInfo = MISPRITE(pDev); - if (!pCursorInfo->isUp && pCursorInfo->shouldBeUp) + if (!pCursorInfo->isUp + && pCursorInfo->pScreen == pScreen + && pCursorInfo->shouldBeUp) { SPRITE_DEBUG (("BlockHandler restore\n")); miSpriteSaveUnderCursor (pDev, pScreen); @@ -516,7 +523,9 @@ miSpriteBlockHandler (i, blockData, pTimeout, pReadmask) if (DevHasCursor(pDev)) { pCursorInfo = MISPRITE(pDev); - if (!pCursorInfo->isUp && pCursorInfo->shouldBeUp) + if (!pCursorInfo->isUp && + pCursorInfo->pScreen == pScreen && + pCursorInfo->shouldBeUp) { SPRITE_DEBUG (("BlockHandler restore\n")); miSpriteRestoreCursor (pDev, pScreen); @@ -552,7 +561,7 @@ miSpriteInstallColormap (pMap) { pCursorInfo = MISPRITE(pDev); pCursorInfo->checkPixels = TRUE; - if (pCursorInfo->isUp) + if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen) miSpriteRemoveCursor(pDev, pScreen); } } @@ -639,7 +648,7 @@ miSpriteStoreColors (pMap, ndef, pdef) { pCursorInfo = MISPRITE(pDev); pCursorInfo->checkPixels = TRUE; - if (pCursorInfo->isUp) + if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen) miSpriteRemoveCursor (pDev, pScreen); } } @@ -711,7 +720,7 @@ miSpriteSaveDoomedAreas (pWin, pObscured, dx, dy) if(DevHasCursor(pDev)) { pCursorInfo = MISPRITE(pDev); - if (pCursorInfo->isUp) + if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen) { cursorBox = pCursorInfo->saved; @@ -930,6 +939,7 @@ miSpriteDeviceCursorInitialize(pDev, pScreen) pCursorInfo->pCacheWin = NullWindow; pCursorInfo->isInCacheWin = FALSE; pCursorInfo->checkPixels = TRUE; + pCursorInfo->pScreen = FALSE; ret = (*pScreenPriv->funcs->DeviceCursorInitialize)(pDev, pScreen); if (!ret) @@ -1075,6 +1085,7 @@ miSpriteRestoreCursor (pDev, pScreen) pScreenPriv->colors[MASK_COLOR].pixel)) { miSpriteIsUpTRUE (pCursorInfo, pScreen, pScreenPriv); + pCursorInfo->pScreen = pScreen; } miSpriteEnableDamage(pScreen, pScreenPriv); DamageDrawInternal (pScreen, FALSE); diff --git a/mi/mispritest.h b/mi/mispritest.h index f4155b5d5..81efa44e4 100644 --- a/mi/mispritest.h +++ b/mi/mispritest.h @@ -53,6 +53,7 @@ typedef struct { WindowPtr pCacheWin; /* window the cursor last seen in */ Bool isInCacheWin; Bool checkPixels; /* check colormap collision */ + ScreenPtr pScreen; } miCursorInfoRec, *miCursorInfoPtr; /* From 339b73e710a0920608a3fbcb20b406f0f6c4e0f6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 27 Apr 2007 13:24:27 +0930 Subject: [PATCH 102/634] Allow events to grabWindows event if the device is not grabbed. This kinda makes popup windows useable if the WM doesn't set the ClientPointer. Kinda. --- dix/events.c | 27 +++++++++++++++++++++------ include/dix.h | 1 + 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/dix/events.c b/dix/events.c index a751e3c6a..da3f6aa7e 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1729,7 +1729,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent return 0; if (!(type & EXTENSION_EVENT_BASE) && - IsInterferingGrab(wClient(pWin), pDev, pEvents)) + IsInterferingGrab(wClient(pWin), pWin, pDev, pEvents)) return 0; if ( (attempt = TryClientEvents(wClient(pWin), pEvents, count, @@ -1762,7 +1762,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent { /* core event? check for grab interference */ if (!(type & EXTENSION_EVENT_BASE) && - IsInterferingGrab(rClient(other), pDev, pEvents)) + IsInterferingGrab(rClient(other), pWin, pDev, pEvents)) continue; if ( (attempt = TryClientEvents(rClient(other), pEvents, count, @@ -5097,15 +5097,19 @@ PickKeyboard(ClientPtr client) /* A client that has one or more core grabs does not get core events from * devices it does not have a grab on. Legacy applications behave bad * otherwise because they are not used to it and the events interfere. + * The one exception is: if we're about to send an event to a window that is + * specified as grab window, we still do it. This makes popup menus + * half-useable for WMs that don't set the ClientPointer. * Only applies for core events. * * Return true if a core event from the device would interfere and should not * be delivered. */ Bool -IsInterferingGrab(ClientPtr client, DeviceIntPtr dev, xEvent* event) +IsInterferingGrab(ClientPtr client, WindowPtr win, DeviceIntPtr dev, xEvent* event) { - DeviceIntPtr it = inputInfo.devices; + DeviceIntPtr it; + Bool mayInterfere = FALSE; if (dev->coreGrab.grab && SameClient(dev->coreGrab.grab, client)) return FALSE; @@ -5124,19 +5128,30 @@ IsInterferingGrab(ClientPtr client, DeviceIntPtr dev, xEvent* event) return FALSE; } + it = inputInfo.devices; while(it) { if (it != dev) { if (it->coreGrab.grab && SameClient(it->coreGrab.grab, client)) { - return TRUE; + /* there's a client with a grab on some device. + * if we're delivering to the very same window that is + * grabbed (or a child), we're good */ + WindowPtr parent = win; + while(parent) + { + if (it->coreGrab.grab->window == parent) + return FALSE; + parent = parent->parent; + } + mayInterfere = TRUE; } } it = it->next; } - return FALSE; + return mayInterfere; } diff --git a/include/dix.h b/include/dix.h index 9da265deb..93472e832 100644 --- a/include/dix.h +++ b/include/dix.h @@ -550,6 +550,7 @@ extern DeviceIntPtr PickKeyboard( extern Bool IsInterferingGrab( ClientPtr /* client */, + WindowPtr /* win */, DeviceIntPtr /* dev */, xEvent* /* events */); From 5e439109292e54b5c4d1a7bc7b6ac0e42ee285f7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 30 Apr 2007 12:57:42 +0930 Subject: [PATCH 103/634] Add GenericEvent extension to Xext. This adds (unconditional) support for the GE extension. Anything from now on that sends events in MPX will have to use the GE extension. No GE, no MPX events. GE is not actually used yet from anywhere with this commit. You will need to update x11proto, xextproto, libX11, libXext and xcb to the matching xge branches. Things will _NOT_ work without the updated protocol headers and libraries. --- Xext/Makefile.am | 6 +- Xext/geext.c | 384 ++++++++++++++++++++++++++++++++++++++++++++ Xext/geext.h | 64 ++++++++ Xext/geint.h | 60 +++++++ dix/events.c | 145 +++++++++++++---- dix/window.c | 17 ++ include/windowstr.h | 13 ++ mi/miinitext.c | 6 + os/utils.c | 2 + 9 files changed, 660 insertions(+), 37 deletions(-) create mode 100644 Xext/geext.c create mode 100644 Xext/geext.h create mode 100644 Xext/geint.h diff --git a/Xext/Makefile.am b/Xext/Makefile.am index 6ea3d7445..29a01ee99 100644 --- a/Xext/Makefile.am +++ b/Xext/Makefile.am @@ -23,7 +23,8 @@ BUILTIN_SRCS = \ shape.c \ sleepuntil.c \ sleepuntil.h \ - xtest.c + xtest.c \ + geext.c # Sources always included in libXextmodule.la & libXext.la MODULE_SRCS = \ @@ -178,5 +179,6 @@ EXTRA_DIST = \ $(EXTRA_MULTIBUFFER_SRCS) \ $(FONTCACHE_SRCS) \ $(BIGFONT_SRCS) \ - $(DPMS_SRCS) + $(DPMS_SRCS) \ + $(GE_SRCS) diff --git a/Xext/geext.c b/Xext/geext.c new file mode 100644 index 000000000..7c4573e8c --- /dev/null +++ b/Xext/geext.c @@ -0,0 +1,384 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif +#include "windowstr.h" +#include + +#include "geint.h" +#include "geext.h" + +int GEEventBase; +int GEErrorBase; +int GEClientPrivateIndex; +int GEEventType; /* The opcode for all GenericEvents will have. */ + +/* Struct to keep information about registered extensions + */ +typedef struct _GEExtension { + /* event swap function */ + void (*evswap)(xGenericEvent* from, xGenericEvent* to); +} GEExtension, *GEExtensionPtr; + +/* All registered extensions */ +static GEExtension GEExtensions[MAXEXTENSIONS]; + +/* Major available requests */ +static const int version_requests[] = { + X_GEQueryVersion, /* before client sends QueryVersion */ + X_GEQueryVersion, /* must be set to last request in version 1 */ +}; + +/* Forward declarations */ +static void SGEGenericEvent(xEvent* from, xEvent* to); + +#define NUM_VERSION_REQUESTS (sizeof (version_requests) / sizeof (version_requests[0])) + +/************************************************************/ +/* request handlers */ +/************************************************************/ + +static int ProcGEQueryVersion(ClientPtr client) +{ + int n; + GEClientInfoPtr pGEClient = GEGetClient(client); + xGEQueryVersionReply rep; + REQUEST(xGEQueryVersionReq); + + REQUEST_SIZE_MATCH(xGEQueryVersionReq); + + rep.repType = X_Reply; + rep.RepType = X_GEQueryVersion; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + if (stuff->majorVersion < GE_MAJOR) { + rep.majorVersion = stuff->majorVersion; + rep.minorVersion = stuff->minorVersion; + } else { + rep.majorVersion = GE_MAJOR; + if (stuff->majorVersion == GE_MAJOR && + stuff->minorVersion < GE_MINOR) + rep.minorVersion = stuff->minorVersion; + else + rep.minorVersion = GE_MINOR; + } + + pGEClient->major_version = rep.majorVersion; + pGEClient->minor_version = rep.minorVersion; + + if (client->swapped) + { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swaps(&rep.majorVersion, n); + swaps(&rep.minorVersion, n); + } + + + WriteToClient(client, sizeof(xGEQueryVersionReply), (char*)&rep); + return(client->noClientException); +} + +int (*ProcGEVector[GENumberRequests])(ClientPtr) = { + /* Version 1.0 */ + ProcGEQueryVersion +}; + +/************************************************************/ +/* swapped request handlers */ +/************************************************************/ +static int +SProcGEQueryVersion(ClientPtr client) +{ + int n; + REQUEST(xGEQueryVersionReq); + + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xGEQueryVersionReq); + swaps(&stuff->majorVersion, n); + swaps(&stuff->minorVersion, n); + return(*ProcGEVector[stuff->ReqType])(client); +} + +int (*SProcGEVector[GENumberRequests])(ClientPtr) = { + /* Version 1.0 */ + SProcGEQueryVersion +}; + + +/************************************************************/ +/* callbacks */ +/************************************************************/ + +/* dispatch requests */ +static int +ProcGEDispatch(ClientPtr client) +{ + GEClientInfoPtr pGEClient = GEGetClient(client); + REQUEST(xGEReq); + + if (pGEClient->major_version >= NUM_VERSION_REQUESTS) + return BadRequest; + if (stuff->ReqType > version_requests[pGEClient->major_version]) + return BadRequest; + + return (ProcGEVector[stuff->ReqType])(client); +} + +/* dispatch swapped requests */ +static int +SProcGEDispatch(ClientPtr client) +{ + REQUEST(xGEReq); + if (stuff->ReqType >= GENumberRequests) + return BadRequest; + return (*SProcGEVector[stuff->ReqType])(client); +} + +/* new client callback */ +static void GEClientCallback(CallbackListPtr *list, + pointer closure, + pointer data) +{ + NewClientInfoRec *clientinfo = (NewClientInfoRec *) data; + ClientPtr pClient = clientinfo->client; + GEClientInfoPtr pGEClient = GEGetClient(pClient); + + pGEClient->major_version = 0; + pGEClient->minor_version = 0; +} + +/* reset extension */ +static void +GEResetProc(ExtensionEntry *extEntry) +{ + DeleteCallback(&ClientStateCallback, GEClientCallback, 0); + EventSwapVector[GenericEvent] = NotImplemented; + + GEEventBase = 0; + GEErrorBase = 0; + GEEventType = 0; +} + +/* Calls the registered event swap function for the extension. */ +static void +SGEGenericEvent(xEvent* from, xEvent* to) +{ + xGenericEvent* gefrom = (xGenericEvent*)from; + xGenericEvent* geto = (xGenericEvent*)to; + + if (gefrom->extension > MAXEXTENSIONS) + { + ErrorF("GE: Invalid extension offset for event.\n"); + return; + } + + if (GEExtensions[gefrom->extension & 0x7F].evswap) + GEExtensions[gefrom->extension & 0x7F].evswap(gefrom, geto); +} + +/* init extension, register at server */ +void +GEExtensionInit(void) +{ + ExtensionEntry *extEntry; + + GEClientPrivateIndex = AllocateClientPrivateIndex(); + if (!AllocateClientPrivate(GEClientPrivateIndex, + sizeof(GEClientRec))) + { + FatalError("GEExtensionInit: Alloc client private failed.\n"); + } + + if(!AddCallback(&ClientStateCallback, GEClientCallback, 0)) + { + FatalError("GEExtensionInit: register client callback failed.\n"); + } + + if((extEntry = AddExtension(GE_NAME, + GENumberEvents, GENumberErrors, + ProcGEDispatch, SProcGEDispatch, + GEResetProc, StandardMinorOpcode)) != 0) + { + GEEventBase = extEntry->eventBase; + GEErrorBase = extEntry->errorBase; + GEEventType = GEEventBase; + + memset(GEExtensions, 0, sizeof(GEExtensions)); + + EventSwapVector[GEEventBase + X_GenericEvent] = + (EventSwapPtr) SGEGenericEvent; + } else { + FatalError("GEInit: AddExtensions failed.\n"); + } + +} + +/************************************************************/ +/* interface for extensions */ +/************************************************************/ + +/* Register extension with GE. + * Requires the event swap function as parameter. The function will be called + * each time an event is sent to a client with different byte order. + * Returns extension offset. This offset is to be used in all generic events + * sent to the client. + */ +void GERegisterExtension( + int extension, + void (*ev_swap)(xGenericEvent* from, xGenericEvent* to) + ) +{ + if ((extension & 0x7F) >= MAXEXTENSIONS) + FatalError("GE: extension > MAXEXTENSIONS. This should not happen.\n"); + + /* extension opcodes are > 128, might as well save some space here */ + GEExtensions[extension & 0x7f].evswap = ev_swap; +} + + +/* Sets type and extension field for a generic event. This is just an + * auxiliary function, extensions could do it manually too. */ +void GEInitEvent(xGenericEvent* ev, int extension) +{ + ev->type = GenericEvent; + ev->extension = extension; + ev->length = 0; +} + +/* Recalculates the summary mask for the window. */ +static void +GERecalculateWinMask(WindowPtr pWin) +{ + int i; + GEClientPtr it; + GEEventMasksPtr evmasks; + + if (!pWin->optional) + return; + + evmasks = pWin->optional->geMasks; + + for (i = 0; i < MAXEXTENSIONS; i++) + { + evmasks->eventMasks[i] = 0; + } + + it = pWin->optional->geMasks->geClients; + while(it) + { + for (i = 0; i < MAXEXTENSIONS; i++) + { + evmasks->eventMasks[i] |= it->eventMask[i]; + } + it = it->next; + } +} + +/* Set generic event mask for given window. */ +void GEWindowSetMask(ClientPtr pClient, WindowPtr pWin, int extension, Mask mask) +{ + GEClientPtr cli; + + extension = (extension & 0x7F); + + if (extension > MAXEXTENSIONS) + { + ErrorF("Invalid extension number.\n"); + return; + } + + if (!pWin->optional && !MakeWindowOptional(pWin)) + { + ErrorF("GE: Could not make window optional.\n"); + return; + } + + if (mask) + { + GEEventMasksPtr evmasks = pWin->optional->geMasks; + + /* check for existing client */ + cli = evmasks->geClients; + while(cli) + { + if (cli->client == pClient) + break; + cli = cli->next; + } + if (!cli) + { + /* new client */ + cli = (GEClientPtr)xcalloc(1, sizeof(GEClientRec)); + if (!cli) + { + ErrorF("GE: Insufficient memory to alloc client.\n"); + return; + } + cli->next = evmasks->geClients; + cli->client = pClient; + evmasks->geClients = cli; + } + cli->eventMask[extension] = mask; + } else + { + /* remove client. */ + cli = pWin->optional->geMasks->geClients; + if (cli->client == pClient) + { + pWin->optional->geMasks->geClients = cli->next; + xfree(cli); + } else + { + GEClientPtr prev = cli; + cli = cli->next; + + while(cli) + { + if (cli->client == pClient) + { + prev->next = cli->next; + xfree(cli); + break; + } + prev = cli; + cli = cli->next; + } + } + if (!cli) + return; + } + + GERecalculateWinMask(pWin); +} + + diff --git a/Xext/geext.h b/Xext/geext.h new file mode 100644 index 000000000..53aa21c8b --- /dev/null +++ b/Xext/geext.h @@ -0,0 +1,64 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _GEEXT_H_ +#define _GEEXT_H_ +#include + +/* Returns the extension offset from the event */ +#define GEEXT(ev) (((xGenericEvent*)(ev))->extension) + +#define GEEXTIDX(ev) (GEEXT(ev) & 0x7F) +/* Typecast to generic event */ +#define GEV(ev) ((xGenericEvent*)(ev)) +/* True if mask is set for extension on window */ +#define GEMaskIsSet(pWin, extension, mask) \ + ((pWin)->optional && \ + (pWin)->optional->geMasks && \ + ((pWin)->optional->geMasks->eventMasks[(extension) & 0x7F] & (mask))) + +/* Returns first client */ +#define GECLIENT(pWin) \ + (((pWin)->optional) ? (pWin)->optional->geMasks->geClients : NULL) + +/* Interface for other extensions */ +Mask GENextMask(int extension); +void GEWindowSetMask(ClientPtr pClient, WindowPtr pWin, int extension, Mask mask); +void GERegisterExtension( + int extension, + void (*ev_dispatch)(xGenericEvent* from, xGenericEvent* to)); +void GEInitEvent(xGenericEvent* ev, int extension); + + +void GEExtensionInit(void); + +#endif /* _GEEXT_H_ */ diff --git a/Xext/geint.h b/Xext/geint.h new file mode 100644 index 000000000..9e131d3b3 --- /dev/null +++ b/Xext/geint.h @@ -0,0 +1,60 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _GEINT_H_ +#define _GEINT_H_ + +#define NEED_EVENTS +#include +#include +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include + +extern int GEEventType; +extern int GEEventBase; +extern int GEErrorBase; +extern int GEClientPrivateIndex; + +typedef struct _GEClientInfo { + CARD32 major_version; + CARD32 minor_version; +} GEClientInfoRec, *GEClientInfoPtr; + +#define GEGetClient(pClient) ((GEClientInfoPtr) (pClient)->devPrivates[GEClientPrivateIndex].ptr) + +extern int (*ProcGEVector[/*GENumRequests*/])(ClientPtr); +extern int (*SProcGEVector[/*GENumRequests*/])(ClientPtr); + +#endif /* _GEINT_H_ */ diff --git a/dix/events.c b/dix/events.c index deb2da104..836d755f6 100644 --- a/dix/events.c +++ b/dix/events.c @@ -178,6 +178,11 @@ static xEvent *xeviexE; #include "dixevents.h" #include "dixgrabs.h" #include "dispatch.h" + +#include +#include "geext.h" +#include "geint.h" + /** * Extension events type numbering starts at EXTENSION_EVENT_BASE. */ @@ -260,6 +265,9 @@ static struct { #define RootWindow(dev) dev->spriteInfo->sprite->spriteTrace[0] +static xEvent* swapEvent = NULL; +static int swapEventLen = 0; + /** * True if device owns a cursor, false if device shares a cursor sprite with * another device. @@ -1850,7 +1858,8 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent return 0; /* CantBeFiltered means only window owner gets the event */ - if ((filter == CantBeFiltered) || !(type & EXTENSION_EVENT_BASE)) + if ((filter == CantBeFiltered) || + (!(type & EXTENSION_EVENT_BASE) && type != GenericEvent)) { /* if nobody ever wants to see this event, skip some work */ if (filter != CantBeFiltered && @@ -1875,37 +1884,70 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent } if (filter != CantBeFiltered) { - if (type & EXTENSION_EVENT_BASE) - { - OtherInputMasks *inputMasks; + /* Handle generic events */ + if (type == GenericEvent) + { + GEClientPtr pClient; + /* FIXME: We don't do more than one GenericEvent at a time yet. */ + if (count > 1) + { + ErrorF("Do not send more than one GenericEvent at a time!\n"); + return 0; + } - inputMasks = wOtherInputMasks(pWin); - if (!inputMasks || - !(inputMasks->inputEvents[mskidx] & filter)) - return 0; - other = inputMasks->inputClients; - } - else - other = (InputClients *)wOtherClients(pWin); - for (; other; other = other->next) - { - /* core event? check for grab interference */ - if (!(type & EXTENSION_EVENT_BASE) && - IsInterferingGrab(rClient(other), pWin, pDev, pEvents)) - continue; + /* if we get here, filter should be set to the GE specific mask. + check if any client wants it */ + if (!GEMaskIsSet(pWin, GEEXT(pEvents), filter)) + return 0; - if ( (attempt = TryClientEvents(rClient(other), pEvents, count, - other->mask[mskidx], filter, grab)) ) - { - if (attempt > 0) - { - deliveries++; - client = rClient(other); - deliveryMask = other->mask[mskidx]; - } else - nondeliveries--; - } - } + /* run through all clients, deliver event */ + for (pClient = GECLIENT(pWin); pClient; pClient = pClient->next) + { + if (pClient->eventMask[GEEXTIDX(pEvents)] & filter) + { + if (TryClientEvents(pClient->client, pEvents, count, + pClient->eventMask[GEEXTIDX(pEvents)], filter, grab) > 0) + { + deliveries++; + } else + nondeliveries--; + } + } + } + else { + /* Traditional event */ + if (type & EXTENSION_EVENT_BASE) + { + OtherInputMasks *inputMasks; + + inputMasks = wOtherInputMasks(pWin); + if (!inputMasks || + !(inputMasks->inputEvents[mskidx] & filter)) + return 0; + other = inputMasks->inputClients; + } + else + other = (InputClients *)wOtherClients(pWin); + for (; other; other = other->next) + { + /* core event? check for grab interference */ + if (!(type & EXTENSION_EVENT_BASE) && + IsInterferingGrab(rClient(other), pWin, pDev, pEvents)) + continue; + + if ( (attempt = TryClientEvents(rClient(other), pEvents, count, + other->mask[mskidx], filter, grab)) ) + { + if (attempt > 0) + { + deliveries++; + client = rClient(other); + deliveryMask = other->mask[mskidx]; + } else + nondeliveries--; + } + } + } } if ((type == ButtonPress) && deliveries && (!grab)) { @@ -5378,8 +5420,9 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) #ifdef PANORAMIX xEvent eventCopy; #endif - xEvent eventTo, *eventFrom; - int i; + xEvent *eventTo, *eventFrom; + int i, + eventlength = sizeof(xEvent); #ifdef XKB if ((!noXkbExtension)&&(!XkbFilterEvents(pClient, count, events))) @@ -5436,21 +5479,53 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) } } #endif + /* Just a safety check to make sure we only have one GenericEvent, it just + * makes things easier for me right now. (whot) */ + for (i = 1; i < count; i++) + { + if (events[i].u.u.type == GenericEvent) + { + ErrorF("TryClientEvents: Only one GenericEvent at a time."); + return; + } + } + + if (events->u.u.type == GenericEvent) + { + eventlength += ((xGenericEvent*)events)->length * 4; + if (eventlength > swapEventLen) + { + swapEventLen = eventlength; + swapEvent = Xrealloc(swapEvent, swapEventLen); + if (!swapEvent) + { + FatalError("WriteEventsToClient: Out of memory.\n"); + return; + } + } + } + if(pClient->swapped) { for(i = 0; i < count; i++) { eventFrom = &events[i]; + eventTo = swapEvent; + /* Remember to strip off the leading bit of type in case this event was sent with "SendEvent." */ (*EventSwapVector[eventFrom->u.u.type & 0177]) - (eventFrom, &eventTo); - (void)WriteToClient(pClient, sizeof(xEvent), (char *)&eventTo); + (eventFrom, eventTo); + + (void)WriteToClient(pClient, eventlength, (char *)&eventTo); } } else { - (void)WriteToClient(pClient, count * sizeof(xEvent), (char *) events); + /* only one GenericEvent, remember? that means either count is 1 and + * eventlength is arbitrary or eventlength is 32 and count doesn't + * matter. And we're all set. Woohoo. */ + (void)WriteToClient(pClient, count * eventlength, (char *) events); } } diff --git a/dix/window.c b/dix/window.c index 484693906..b49abdfe5 100644 --- a/dix/window.c +++ b/dix/window.c @@ -455,6 +455,7 @@ CreateRootWindow(ScreenPtr pScreen) #ifdef XINPUT pWin->optional->inputMasks = NULL; pWin->optional->deviceCursors = NULL; + pWin->optional->geMasks = NULL; #endif pWin->optional->access.perm = NULL; @@ -3700,6 +3701,9 @@ CheckWindowOptionalNeed (WindowPtr w) optional->access.ndeny != 0) return; + if (optional->geMasks != NULL) + return; + parentOptional = FindWindowWithOptional(w)->optional; if (optional->visual != parentOptional->visual) return; @@ -3746,6 +3750,19 @@ MakeWindowOptional (WindowPtr pWin) optional->inputMasks = NULL; #endif optional->deviceCursors = NULL; + + optional->geMasks = (GEEventMasksPtr)xalloc(sizeof(GEEventMasksRec)); + if (!optional->geMasks) + { + xfree(optional); + return FALSE; + } else { + int i; + optional->geMasks->geClients = 0; + for (i = 0; i < MAXEXTENSIONS; i++) + optional->geMasks->eventMasks[i] = 0; + } + optional->access.nperm = 0; optional->access.ndeny = 0; optional->access.perm = NULL; diff --git a/include/windowstr.h b/include/windowstr.h index 87158b263..a1d501d37 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -77,6 +77,18 @@ typedef struct _DevCursorNode { struct _DevCursorNode* next; } DevCursNodeRec, *DevCursNodePtr, *DevCursorList; +typedef struct _GEClientRec { + Mask eventMask[MAXEXTENSIONS]; + ClientPtr client; + struct _GEClientRec* next; +} GEClientRec, *GEClientPtr; + +/* Mask structure for GE extension. Allows one mask per extension. */ +typedef struct _GEEventMasks { + Mask eventMasks[MAXEXTENSIONS]; + struct _GEClientRec* geClients; +} GEEventMasksRec, *GEEventMasksPtr; + typedef struct _WindowAccessRec { int defaultRule; /* WindowAccessDenyAll */ DeviceIntPtr* perm; @@ -105,6 +117,7 @@ typedef struct _WindowOpt { struct _OtherInputMasks *inputMasks; /* default: NULL */ #endif DevCursorList deviceCursors; /* default: NULL */ + struct _GEEventMasks* geMasks; /* default: NULL */ WindowAccessRec access; } WindowOptRec, *WindowOptPtr; diff --git a/mi/miinitext.c b/mi/miinitext.c index 0fc6d1521..cad978d3b 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -215,6 +215,7 @@ extern Bool noXIdleExtension; #ifdef XV extern Bool noXvExtension; #endif +extern Bool noGEExtension; #ifndef XFree86LOADER #define INITARGS void @@ -386,6 +387,7 @@ extern void DamageExtensionInit(INITARGS); #ifdef COMPOSITE extern void CompositeExtensionInit(INITARGS); #endif +extern void GEExtensionInit(INITARGS); /* The following is only a small first step towards run-time * configurable extensions. @@ -398,6 +400,7 @@ typedef struct { static ExtensionToggle ExtensionToggleList[] = { /* sort order is extension name string as shown in xdpyinfo */ + { "Generic Events", &noGEExtension }, #ifdef BIGREQS { "BIG-REQUESTS", &noBigReqExtension }, #endif @@ -531,6 +534,8 @@ InitExtensions(argc, argv) int argc; char *argv[]; { + if (!noGEExtension) GEExtensionInit(); + #ifdef XCSECURITY SecurityExtensionSetup(); #endif @@ -684,6 +689,7 @@ InitVisualWrap() #else /* XFree86LOADER */ /* List of built-in (statically linked) extensions */ static ExtensionModule staticExtensions[] = { + { GEExtensionInit, "Generic Event Extension", &noGEExtension, NULL, NULL}, #ifdef MITSHM { ShmExtensionInit, SHMNAME, &noMITShmExtension, NULL, NULL }, #endif diff --git a/os/utils.c b/os/utils.c index 5058285e8..e45edd17f 100644 --- a/os/utils.c +++ b/os/utils.c @@ -236,6 +236,8 @@ _X_EXPORT Bool noXIdleExtension = FALSE; _X_EXPORT Bool noXvExtension = FALSE; #endif +_X_EXPORT Bool noGEExtension = FALSE; + #define X_INCLUDE_NETDB_H #include From b043a184509cfe5c4c4691ecde1a4a065e53d575 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 1 May 2007 09:54:33 +0930 Subject: [PATCH 104/634] Check VCP's and VCK's ids when searching for a new device id. Both VCP and VCK are not in the inputInfo.devices list anymore, so we need to check them separately. If we don't do this, we end up re-using ids 0 and 1, causing all sorts of grief for clients. --- dix/devices.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dix/devices.c b/dix/devices.c index a6e141559..27271f304 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -99,6 +99,10 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart) /* Find next available id */ memset(devind, 0, sizeof(char)*MAX_DEVICES); + if (inputInfo.keyboard) + devind[inputInfo.keyboard->id]++; + if (inputInfo.pointer) + devind[inputInfo.pointer->id]++; for (devtmp = inputInfo.devices; devtmp; devtmp = devtmp->next) devind[devtmp->id]++; for (devtmp = inputInfo.off_devices; devtmp; devtmp = devtmp->next) From 325380adb20ec2b82e176d75599fd4bc97a3b918 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 1 May 2007 11:02:05 +0930 Subject: [PATCH 105/634] Check and re-set paired devices when initializing sprites. If we don't do this, a device that is paired before a sprite has been initialized for the paired device will not actually get the right sprite and segfault the server on focus events. Happens for the VCK. --- dix/devices.c | 1 + dix/events.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/dix/devices.c b/dix/devices.c index 27271f304..a415a8e26 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2158,6 +2158,7 @@ PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd) } kbd->spriteInfo->sprite = ptr->spriteInfo->sprite; + kbd->spriteInfo->paired = ptr; return Success; } diff --git a/dix/events.c b/dix/events.c index 836d755f6..f767f7095 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2528,9 +2528,25 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) if (!pDev->spriteInfo->sprite) { + DeviceIntPtr it; + pDev->spriteInfo->sprite = (SpritePtr)xcalloc(1, sizeof(SpriteRec)); if (!pDev->spriteInfo->sprite) FatalError("InitializeSprite: failed to allocate sprite struct"); + + /* We may have paired another device with this device before our + * device had a actual sprite. We need to check for this and reset the + * sprite field for all paired devices. + * + * The VCK is always paired with the VCP before the VCP has a sprite. + */ + for (it = inputInfo.devices; it; it = it->next) + { + if (it->spriteInfo->paired == pDev) + it->spriteInfo->sprite = pDev->spriteInfo->sprite; + } + if (inputInfo.keyboard->spriteInfo->paired == pDev) + inputInfo.keyboard->spriteInfo->sprite = pDev->spriteInfo->sprite; } pSprite = pDev->spriteInfo->sprite; From 8b42ba64e169a35df2a90528dcb0cd06be0f67a1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 1 May 2007 12:12:58 +0930 Subject: [PATCH 106/634] Send PointerKeyboardPairingChangedNotifyEvent using XGE. Needs updated inputproto and libXi. --- Xi/Makefile.am | 4 +++- Xi/chpkpair.c | 27 ++++++++++++++++++++++++- Xi/chpkpair.h | 5 +++++ Xi/extinit.c | 55 +++++++++++++++++++++++++++++++------------------- 4 files changed, 68 insertions(+), 23 deletions(-) diff --git a/Xi/Makefile.am b/Xi/Makefile.am index 9b1253e0b..346453cb6 100644 --- a/Xi/Makefile.am +++ b/Xi/Makefile.am @@ -97,6 +97,8 @@ libXi_la_SOURCES = \ ungrdevk.c \ ungrdevk.h \ warpdevp.c \ - warpdevp.h + warpdevp.h \ + xiselev.c \ + xiselev.h EXTRA_DIST = stubs.c diff --git a/Xi/chpkpair.c b/Xi/chpkpair.c index fcbdcdf2e..555c8e1ca 100644 --- a/Xi/chpkpair.c +++ b/Xi/chpkpair.c @@ -44,11 +44,14 @@ from the author. #include "windowstr.h" /* window structure */ #include "scrnintstr.h" /* screen structure */ #include +#include #include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" #include "exglobals.h" +#include "geext.h" #include "chpkpair.h" @@ -74,6 +77,7 @@ ProcXChangePointerKeyboardPairing(ClientPtr client) { DeviceIntPtr pPointer, pKeyboard; int ret; + pairingChangedNotify ev; REQUEST(xChangePointerKeyboardPairingReq); REQUEST_SIZE_MATCH(xChangePointerKeyboardPairingReq); @@ -105,6 +109,27 @@ ProcXChangePointerKeyboardPairing(ClientPtr client) } - /* TODO: generate event here... */ + memset(&ev, 0, sizeof(pairingChangedNotify)); + GEInitEvent(GEV(&ev), IReqCode); + ev.evtype = XI_PointerKeyboardPairingChangedNotify; + ev.pointer = pPointer->id; + ev.keyboard = pKeyboard->id; + ev.length = 0; + ev.time = currentTime.milliseconds; + SendEventToAllWindows(inputInfo.pointer, + XI_PointerKeyboardPairingChangedMask, + (xEvent*)&ev, 1); return Success; } + +/* Event swap proc */ +void +SPointerKeyboardPairingChangedNotifyEvent (pairingChangedNotify *from, + pairingChangedNotify *to) +{ + char n; + + *to = *from; + swaps(&to->sequenceNumber, n); + swapl(&to->time, n); +} diff --git a/Xi/chpkpair.h b/Xi/chpkpair.h index 1acf54921..b0d410d74 100644 --- a/Xi/chpkpair.h +++ b/Xi/chpkpair.h @@ -36,5 +36,10 @@ int SProcXChangePointerKeyboardPairing(ClientPtr /* client */ int ProcXChangePointerKeyboardPairing(ClientPtr /* client */ ); +void +SPointerKeyboardPairingChangedNotifyEvent (pairingChangedNotify* /* from */, + pairingChangedNotify* /* to */ + ); + #endif /* WARPDEVP_H */ diff --git a/Xi/extinit.c b/Xi/extinit.c index 9d921fa07..c58a10f16 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -65,6 +65,8 @@ SOFTWARE. #include "extnsionst.h" /* extension entry */ #include #include +#include +#include "geext.h" /* extension interfaces for ge */ #include "dixevents.h" #include "exevents.h" @@ -121,6 +123,8 @@ SOFTWARE. #include "ungrdevb.h" #include "ungrdevk.h" #include "warpdevp.h" +#include "xiselev.h" + static Mask lastExtEventMask = 1; int ExtEventIndex; @@ -180,7 +184,6 @@ Mask DeviceButtonMotionMask; Mask DevicePresenceNotifyMask; Mask DeviceEnterWindowMask; Mask DeviceLeaveWindowMask; -Mask PointerKeyboardPairingChangedMask; int DeviceValuator; int DeviceKeyPress; @@ -200,6 +203,8 @@ int ChangeDeviceNotify; int DevicePresenceNotify; int DeviceEnterNotify; int DeviceLeaveNotify; + +/* GE events */ int PointerKeyboardPairingChangedNotify; int RT_INPUTCLIENT; @@ -225,6 +230,26 @@ static XExtensionVersion thisversion = { XI_Present, XI_Add_DevicePresenceNotify_Minor }; +/**************************************************************** + * + * EventSwap for generic events coming from the GE extension. + */ + +static void +XIGEEventSwap(xGenericEvent* from, xGenericEvent* to) +{ + int n; + + swaps(&from->sequenceNumber, n); + switch(from->evtype) + { + case XI_PointerKeyboardPairingChangedNotify: + SPointerKeyboardPairingChangedNotifyEvent + ((pairingChangedNotify*)from, (pairingChangedNotify*)to); + break; + } +} + /************************************************************************* * * ProcIDispatch - main dispatch routine for requests to this extension. @@ -314,6 +339,8 @@ ProcIDispatch(ClientPtr client) return (ProcXChangeDeviceCursor(client)); else if (stuff->data == X_ChangePointerKeyboardPairing) return (ProcXChangePointerKeyboardPairing(client)); + else if (stuff->data == X_XiSelectEvent) + return (ProcXiSelectEvent(client)); else if (stuff->data == X_RegisterPairingClient) return (ProcXRegisterPairingClient(client)); else if (stuff->data == X_GrabAccessControl) @@ -425,6 +452,8 @@ SProcIDispatch(ClientPtr client) return (SProcXChangeDeviceCursor(client)); else if (stuff->data == X_ChangePointerKeyboardPairing) return (SProcXChangePointerKeyboardPairing(client)); + else if (stuff->data == X_XiSelectEvent) + return (SProcXiSelectEvent(client)); else if (stuff->data == X_RegisterPairingClient) return (SProcXRegisterPairingClient(client)); else if (stuff->data == X_GrabAccessControl) @@ -659,16 +688,6 @@ SDeviceLeaveNotifyEvent (deviceLeaveNotify *from, deviceLeaveNotify *to) swaps(&to->eventY, n); } -static void -SPointerKeyboardPairingChangedNotifyEvent (pairingChangedNotify *from, - pairingChangedNotify *to) -{ - char n; - - *to = *from; - swaps(&to->sequenceNumber, n); - swapl(&to->time, n); -} /************************************************************************** * @@ -792,7 +811,10 @@ FixExtensionEvents(ExtensionEntry * extEntry) DevicePresenceNotify = DeviceButtonStateNotify + 1; DeviceEnterNotify = DevicePresenceNotify + 1; DeviceLeaveNotify = DeviceEnterNotify + 1; - PointerKeyboardPairingChangedNotify = DeviceLeaveNotify + 1; + + /* GE Events */ + PointerKeyboardPairingChangedNotify = + XI_PointerKeyboardPairingChangedNotify; event_base[KeyClass] = DeviceKeyPress; event_base[ButtonClass] = DeviceButtonPress; @@ -877,11 +899,6 @@ FixExtensionEvents(ExtensionEntry * extEntry) SetMaskForExtEvent(DeviceLeaveWindowMask, DeviceLeaveNotify); AllowPropagateSuppress(DeviceLeaveWindowMask); - PointerKeyboardPairingChangedMask = GetNextExtEventMask(); - SetMaskForExtEvent(PointerKeyboardPairingChangedMask, - PointerKeyboardPairingChangedNotify); - AllowPropagateSuppress(PointerKeyboardPairingChangedMask); - SetEventInfo(0, _noExtensionEvent); } @@ -925,7 +942,6 @@ RestoreExtensionEvents(void) DevicePresenceNotify = 14; DeviceEnterNotify = 15; DeviceLeaveNotify = 16; - PointerKeyboardPairingChangedNotify = 17; BadDevice = 0; BadEvent = 1; @@ -1095,8 +1111,6 @@ SEventIDispatch(xEvent * from, xEvent * to) DO_SWAP(SDeviceEnterNotifyEvent, deviceEnterNotify); else if (type == DeviceLeaveNotify) DO_SWAP(SDeviceLeaveNotifyEvent, deviceLeaveNotify); - else if (type == PointerKeyboardPairingChangedNotify) - DO_SWAP(SPointerKeyboardPairingChangedNotifyEvent, pairingChangedNotify); else { FatalError("XInputExtension: Impossible event!\n"); } @@ -1144,7 +1158,6 @@ XInputExtensionInit(void) EventSwapVector[ChangeDeviceNotify] = SEventIDispatch; EventSwapVector[DeviceEnterNotify] = SEventIDispatch; EventSwapVector[DeviceLeaveNotify] = SEventIDispatch; - EventSwapVector[PointerKeyboardPairingChangedNotify] = SEventIDispatch; } else { FatalError("IExtensionInit: AddExtensions failed\n"); } From 11d0e2109b699714055e263e8963f2c39eded28b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 1 May 2007 14:16:36 +0930 Subject: [PATCH 107/634] Correct enterleave semaphore value for root window. --- dix/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/events.c b/dix/events.c index f767f7095..7d11d14a7 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2514,7 +2514,7 @@ DefineInitialRootWindow(WindowPtr win) if (DevHasCursor(pDev)) { InitializeSprite(pDev, win); - win->devPrivates[FocusPrivatesIndex].val++; + ((FocusSemaphoresPtr)win->devPrivates[FocusPrivatesIndex].ptr)->enterleave++; } pDev = pDev->next; } From 0214d0b96a9b900a8cf5c7f2183add3a411441f3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 1 May 2007 15:49:41 +0930 Subject: [PATCH 108/634] Start devices after windows are initialized. This fixes the hotplug segfault introduced with the multihead changes and cleans up the code a bit as well. --- dix/devices.c | 75 ++++++++++++++++++++++++------------------------- dix/events.c | 13 --------- dix/main.c | 10 ++++--- include/input.h | 4 ++- 4 files changed, 45 insertions(+), 57 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index a415a8e26..bd145a085 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -202,10 +202,11 @@ EnableDevice(DeviceIntPtr dev) prev = &(*prev)->next) ; - /* Sprites will be initialized with their 'windows' just when inside the - * DefineInitialRootWindow function! */ + /* Sprites pop up on the first root window, so we can supply it directly + * here. + */ if (IsPointerDevice(dev) && dev->spriteInfo->spriteOwner) - InitializeSprite(dev, NullWindow); + InitializeSprite(dev, WindowTable[0]); else PairDevices(NULL, inputInfo.pointer, dev); @@ -301,11 +302,6 @@ ActivateDevice(DeviceIntPtr dev) return ret; } -int -DeactivateDevice(DeviceIntPtr dev) -{ -} - static void CoreKeyboardBell(int volume, DeviceIntPtr pDev, pointer arg, int something) { @@ -451,14 +447,7 @@ InitCoreDevices(void) dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; (void)ActivateDevice(dev); - /* Enable device, and then remove it from the device list. Virtual - * devices are kept separate, not in the standard device list. - */ - if (dev->inited && dev->startup) - EnableDevice(dev); - inputInfo.off_devices = inputInfo.devices = NULL; inputInfo.keyboard = dev; - inputInfo.keyboard->next = NULL; } if (!inputInfo.pointer) { @@ -478,35 +467,25 @@ InitCoreDevices(void) dev->coreGrab.ActivateGrab = ActivatePointerGrab; dev->coreGrab.DeactivateGrab = DeactivatePointerGrab; dev->coreEvents = FALSE; + dev->spriteInfo->spriteOwner = TRUE; if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) FatalError("Couldn't allocate pointer devPrivates\n"); dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; (void)ActivateDevice(dev); - /* Enable device, and then remove it from the device list. Virtual - * devices are kept separate, not in the standard device list. - */ - if (dev->inited && dev->startup) - EnableDevice(dev); - inputInfo.off_devices = inputInfo.devices = NULL; inputInfo.pointer = dev; - inputInfo.pointer->next = NULL; - - /* the core keyboard is initialised by now. set the keyboard's sprite - * to the core pointer's sprite. */ - PairDevices(pairingClient, inputInfo.pointer, inputInfo.keyboard); } } /** * Activate and enable all devices. * - * After InitAndStartDevices() all devices are finished with their setup - * routines and start emitting events. - * Each physical keyboard is paired with the first available unpaired pointer. + * InitAndStartDevices needs to be called AFTER the windows are initialized. + * Devices will start sending events after InitAndStartDevices() has + * completed. */ int -InitAndStartDevices(void) +InitAndStartDevices(WindowPtr root) { DeviceIntPtr dev, next; @@ -514,13 +493,6 @@ InitAndStartDevices(void) DebugF("(dix) initialising device %d\n", dev->id); ActivateDevice(dev); } - for (dev = inputInfo.off_devices; dev; dev = next) - { - DebugF("(dix) enabling device %d\n", dev->id); - next = dev->next; - if (dev->inited && dev->startup) - (void)EnableDevice(dev); - } if (!inputInfo.keyboard) { ErrorF("No core keyboard\n"); @@ -531,12 +503,37 @@ InitAndStartDevices(void) return BadImplementation; } - /* All of the devices are started up now. Try to pair each keyboard with a - * real pointer, if possible. */ + /* Now enable all devices */ + if (inputInfo.keyboard->inited && inputInfo.keyboard->startup) + EnableDevice(inputInfo.keyboard); + if (inputInfo.pointer->inited && inputInfo.pointer->startup) + EnableDevice(inputInfo.pointer); + + /* Remove VCP and VCK from device list */ + inputInfo.devices = NULL; + inputInfo.keyboard->next = inputInfo.pointer->next = NULL; + + /* enable real devices */ + for (dev = inputInfo.off_devices; dev; dev = next) + { + DebugF("(dix) enabling device %d\n", dev->id); + next = dev->next; + if (dev->inited && dev->startup) + (void)EnableDevice(dev); + } + + /* All of the devices are started up now. Pair VCK with VCP, then + * pair each real keyboard with a real pointer. + */ + PairDevices(NULL, inputInfo.pointer, inputInfo.keyboard); + for (dev = inputInfo.devices; dev; dev = dev->next) { if (!DevHasCursor(dev)) PairDevices(NULL, GuessFreePointerDevice(), dev); + else + /* enter/leave counter on root window */ + ((FocusSemaphoresPtr)root->devPrivates[FocusPrivatesIndex].ptr)->enterleave++; } return Success; diff --git a/dix/events.c b/dix/events.c index 7d11d14a7..dc7bbfba7 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2501,23 +2501,10 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) void DefineInitialRootWindow(WindowPtr win) { - DeviceIntPtr pDev = inputInfo.devices; - #ifdef XEVIE xeviewin = win; #endif - InitializeSprite(inputInfo.pointer, win); - - while (pDev) - { - if (DevHasCursor(pDev)) - { - InitializeSprite(pDev, win); - ((FocusSemaphoresPtr)win->devPrivates[FocusPrivatesIndex].ptr)->enterleave++; - } - pDev = pDev->next; - } } void diff --git a/dix/main.c b/dix/main.c index 2f064a9a7..e7c700063 100644 --- a/dix/main.c +++ b/dix/main.c @@ -396,10 +396,6 @@ main(int argc, char *argv[], char *envp[]) if (!CreateRootWindow(pScreen)) FatalError("failed to create root window"); } - InitCoreDevices(); - InitInput(argc, argv); - if (InitAndStartDevices() != Success) - FatalError("failed to initialize core devices"); InitFonts(); #ifdef BUILTIN_FONTS @@ -451,6 +447,12 @@ main(int argc, char *argv[], char *envp[]) for (i = 0; i < screenInfo.numScreens; i++) InitRootWindow(WindowTable[i]); DefineInitialRootWindow(WindowTable[0]); + + InitCoreDevices(); + InitInput(argc, argv); + if (InitAndStartDevices(WindowTable[0]) != Success) + FatalError("failed to initialize core devices"); + SaveScreens(SCREEN_SAVER_FORCER, ScreenSaverReset); #ifdef PANORAMIX diff --git a/include/input.h b/include/input.h index 4ba0cad86..401fcece8 100644 --- a/include/input.h +++ b/include/input.h @@ -186,7 +186,9 @@ extern Bool ActivateDevice( extern Bool DisableDevice( DeviceIntPtr /*device*/); -extern int InitAndStartDevices(void); +extern int InitAndStartDevices( + WindowPtr /*root*/); + extern void CloseDownDevices(void); From 58c0fd29272fb6c2f193cff82fb0b0573c607eec Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 2 May 2007 13:50:09 +0930 Subject: [PATCH 109/634] Adjust EQ to support long events. Add RawDeviceEvent (pointers only for now). This commit changes the event queue to use EventLists instead of xEvent arrays. Only EQ is affected, event delivery still uses xEvent* (look for comment in mieqProcessInputEvent). RawDeviceEvents deliver driver information to the client, without clipping or acceleration. --- Xi/exevents.c | 3 +- Xi/extinit.c | 10 +++ dix/events.c | 85 ++++++++++++++++----- dix/getevents.c | 136 ++++++++++++++++++++++++++------- hw/xfree86/common/xf86Priv.h | 3 +- hw/xfree86/common/xf86Xinput.c | 24 +++--- include/dix.h | 4 + include/input.h | 20 ++++- mi/mieq.c | 97 ++++++++++++++++------- mi/mipointer.c | 10 ++- 10 files changed, 299 insertions(+), 93 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index d00dc2994..2ecec968d 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -61,6 +61,7 @@ SOFTWARE. #include #include #include +#include #include "inputstr.h" #include "windowstr.h" #include "miscstruct.h" @@ -127,7 +128,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) ValuatorClassPtr v = device->valuator; deviceValuator *xV = (deviceValuator *) xE; - if (xE->u.u.type != DeviceValuator) { + if (xE->u.u.type != DeviceValuator && xE->u.u.type != GenericEvent) { DeviceIntPtr mouse = NULL, kbd = NULL; GetSpritePosition(device, &rootX, &rootY); xE->u.keyButtonPointer.rootX = rootX; diff --git a/Xi/extinit.c b/Xi/extinit.c index c58a10f16..beac426ee 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -131,6 +131,13 @@ int ExtEventIndex; Mask ExtValidMasks[EMASKSIZE]; Mask ExtExclusiveMasks[EMASKSIZE]; + +static Mask xi_filters[3] = { + XI_PointerKeyboardPairingChangedNotifyMask, + XI_RandomStringEventMask, + XI_RawDeviceEventMask, +}; + static struct dev_type { Atom type; @@ -1158,6 +1165,9 @@ XInputExtensionInit(void) EventSwapVector[ChangeDeviceNotify] = SEventIDispatch; EventSwapVector[DeviceEnterNotify] = SEventIDispatch; EventSwapVector[DeviceLeaveNotify] = SEventIDispatch; + + /* init GE events */ + SetGenericFilter(IReqCode, xi_filters); } else { FatalError("IExtensionInit: AddExtensions failed\n"); } diff --git a/dix/events.c b/dix/events.c index dc7bbfba7..c8b0eb235 100644 --- a/dix/events.c +++ b/dix/events.c @@ -367,6 +367,14 @@ static Mask filters[128] = CantBeFiltered /* MappingNotify */ }; + +/** + * same principle as filters, but one set of filters for each extension. + * The extension is responsible for setting the filters by calling + * SetGenericFilter(). + */ +static Mask* generic_filters[MAXEXTENSIONS]; + static CARD8 criticalEvents[32] = { 0x7c /* key and button events */ @@ -2176,24 +2184,53 @@ DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab, } else { - if (!(filter & pWin->deliverableEvents)) - return 0; - while (pWin) - { - if ((wOtherEventMasks(pWin)|pWin->eventMask) & filter) - { - FixUpEventFromWindow(dev, xE, pWin, child, FALSE); - deliveries = DeliverEventsToWindow(dev, pWin, xE, count, filter, - grab, 0); - if (deliveries > 0) - return deliveries; - } - if ((deliveries < 0) || - (pWin == stopAt) || - (filter & wDontPropagateMask(pWin))) - return 0; - child = pWin->drawable.id; - pWin = pWin->parent; + /* handle generic events */ + if (type == GenericEvent) + { + xGenericEvent* ge = (xGenericEvent*)xE; + + if (count > 1) + { + ErrorF("Do not send more than one GenericEvent at a time!\n"); + return 0; + } + filter = generic_filters[GEEXTIDX(xE)][ge->evtype]; + + while(pWin) + { + if (GEMaskIsSet(pWin, GEEXT(xE), filter)) + { + deliveries = DeliverEventsToWindow(dev, pWin, xE, count, + filter, grab, 0); + if (deliveries > 0) + return deliveries; + } + + pWin = pWin->parent; + } + } + else + { + /* core protocol events */ + if (!(filter & pWin->deliverableEvents)) + return 0; + while (pWin) + { + if ((wOtherEventMasks(pWin)|pWin->eventMask) & filter) + { + FixUpEventFromWindow(dev, xE, pWin, child, FALSE); + deliveries = DeliverEventsToWindow(dev, pWin, xE, count, filter, + grab, 0); + if (deliveries > 0) + return deliveries; + } + if ((deliveries < 0) || + (pWin == stopAt) || + (filter & wDontPropagateMask(pWin))) + return 0; + child = pWin->drawable.id; + pWin = pWin->parent; + } } } return 0; @@ -5660,3 +5697,15 @@ IsInterferingGrab(ClientPtr client, WindowPtr win, DeviceIntPtr dev, xEvent* eve return mayInterfere; } +/** + * Set the filters for a extension. + * The filters array needs to contain the Masks that are applicable for each + * event type for the given extension. + * e.g. if generic event type 2 should be let through for windows with + * MyExampleMask set, make sure that filters[2] == MyExampleMask. + */ +_X_EXPORT void +SetGenericFilter(int extension, Mask* filters) +{ + generic_filters[extension & 0x7f] = filters; +} diff --git a/dix/getevents.c b/dix/getevents.c index 116bab9f2..4f7993f0a 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -314,13 +314,14 @@ clipValuators(DeviceIntPtr pDev, int first_valuator, int num_valuators, * last posted, not just x and y; otherwise relative non-x/y * valuators, though a very narrow use case, will be broken. */ -static xEvent * -getValuatorEvents(xEvent *events, DeviceIntPtr pDev, int first_valuator, +static EventList * +getValuatorEvents(EventList *events, DeviceIntPtr pDev, int first_valuator, int num_valuators, int *valuators) { - deviceValuator *xv = (deviceValuator *) events; + deviceValuator *xv; int i = 0, final_valuator = first_valuator + num_valuators; - for (i = first_valuator; i < final_valuator; i += 6, xv++, events++) { + for (i = first_valuator; i < final_valuator; i += 6, events++) { + xv = (deviceValuator*)events->event; xv->type = DeviceValuator; xv->first_valuator = i; xv->num_valuators = num_valuators; @@ -353,7 +354,7 @@ getValuatorEvents(xEvent *events, DeviceIntPtr pDev, int first_valuator, * valuators. */ _X_EXPORT int -GetKeyboardEvents(xEvent *events, DeviceIntPtr pDev, int type, int key_code) { +GetKeyboardEvents(EventList *events, DeviceIntPtr pDev, int type, int key_code) { return GetKeyboardValuatorEvents(events, pDev, type, key_code, 0, 0, NULL); } @@ -376,7 +377,7 @@ GetKeyboardEvents(xEvent *events, DeviceIntPtr pDev, int type, int key_code) { * KeyPresses. */ _X_EXPORT int -GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type, +GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type, int key_code, int first_valuator, int num_valuators, int *valuators) { int numEvents = 0; @@ -448,7 +449,7 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type, ms = GetTimeInMillis(); - kbp = (deviceKeyButtonPointer *) events; + kbp = (deviceKeyButtonPointer *) events->event; kbp->time = ms; kbp->deviceid = pDev->id; if (type == KeyPress) @@ -465,31 +466,85 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type, } if (pDev->coreEvents) { - events->u.keyButtonPointer.time = ms; - events->u.u.type = type; - events->u.u.detail = key_code; + xEvent* evt = events->event; + evt->u.keyButtonPointer.time = ms; + evt->u.u.type = type; + evt->u.u.detail = key_code; } return numEvents; } +/** + * Initialize an event list and fill with 32 byte sized events. + * This event list is to be passed into GetPointerEvents() and + * GetKeyboardEvents(). + * + * @param num_events Number of elements in list. + */ +_X_EXPORT EventListPtr +InitEventList(int num_events) +{ + EventListPtr events; + int i; + + events = (EventListPtr)xcalloc(num_events, sizeof(EventList)); + if (!events) + return NULL; + + for (i = 0; i < num_events; i++) + { + events[i].evlen = sizeof(xEvent); + events[i].event = xcalloc(1, sizeof(xEvent)); + if (!events[i].event) + { + /* rollback */ + while(i--) + xfree(events[i].event); + xfree(events); + events = NULL; + break; + } + } + + return events; +} /** - * Generate a series of xEvents (returned in xE) representing pointer - * motion, or button presses. Xi and XKB-aware. + * Free an event list. + * + * @param list The list to be freed. + * @param num_events Number of elements in list. + */ +_X_EXPORT void +FreeEventList(EventListPtr list, int num_events) +{ + if (!list) + return; + while(num_events--) + xfree(list[num_events].event); + xfree(list); +} + +/** + * Generate a series of xEvents (filled into the EventList) representing + * pointer motion, or button presses. Xi and XKB-aware. * * events is not NULL-terminated; the return value is the number of events. * The DDX is responsible for allocating the event structure in the first - * place via GetMaximumEventsNum(), and for freeing it. + * place via InitEventList() and GetMaximumEventsNum(), and for freeing it. * */ _X_EXPORT int -GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, +GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, int flags, int first_valuator, int num_valuators, int *valuators) { - int num_events = 0, final_valuator = 0; + int num_events = 0, final_valuator = 0, i; CARD32 ms = 0; + CARD32* valptr; deviceKeyButtonPointer *kbp = NULL; + rawDeviceEvent* ev; + /* Thanks to a broken lib, we _always_ have to chase DeviceMotionNotifies * with DeviceValuators. */ Bool sendValuators = (type == MotionNotify || flags & POINTER_ABSOLUTE); @@ -506,9 +561,9 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, return 0; if (!coreOnly && (pDev->coreEvents)) - num_events = 2; + num_events = 3; else - num_events = 1; + num_events = 2; if (type == MotionNotify && num_valuators <= 0) { return 0; @@ -529,6 +584,34 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, ms = GetTimeInMillis(); + + /* fill up the raw event, after checking that it is large enough to + * accommodate all valuators. + */ + if (events->evlen < + (sizeof(xEvent) + ((num_valuators - 4) * sizeof(CARD32)))) + { + events->evlen = sizeof(xEvent) + + ((num_valuators - 4) * sizeof(CARD32)); + events->event = realloc(events->event, events->evlen); + if (!events->event) + FatalError("Could not allocate event storage.\n"); + } + + ev = (rawDeviceEvent*)events->event; + ev->type = GenericEvent; + ev->evtype = XI_RawDeviceEvent; + ev->extension = IReqCode; + ev->length = (num_valuators > 4) ? (num_valuators - 4) : 0; + ev->buttons = buttons; + ev->num_valuators = num_valuators; + ev->first_valuator = first_valuator; + ev->deviceid = pDev->id; + valptr = &(ev->valuator0); + for (i = 0; i < num_valuators; i++, valptr++) + *valptr = valuators[i]; + + events++; pointer = pDev; /* Set x and y based on whether this is absolute or relative, and @@ -588,7 +671,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, /* create Xi event */ if (!coreOnly) { - kbp = (deviceKeyButtonPointer *) events; + kbp = (deviceKeyButtonPointer *) events->event; kbp->time = ms; kbp->deviceid = pDev->id; @@ -616,19 +699,20 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, } if (coreOnly || pDev->coreEvents) { - events->u.u.type = type; - events->u.keyButtonPointer.time = ms; - events->u.keyButtonPointer.rootX = x; - events->u.keyButtonPointer.rootY = y; + xEvent* evt = events->event; + evt->u.u.type = type; + evt->u.keyButtonPointer.time = ms; + evt->u.keyButtonPointer.rootX = x; + evt->u.keyButtonPointer.rootY = y; if (type == ButtonPress || type == ButtonRelease) { /* We hijack SetPointerMapping to work on all core-sending * devices, so we use the device-specific map here instead of * the core one. */ - events->u.u.detail = pDev->button->map[buttons]; + evt->u.u.detail = pDev->button->map[buttons]; } else { - events->u.u.detail = 0; + evt->u.u.detail = 0; } } @@ -644,11 +728,11 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, * place via GetMaximumEventsNum(), and for freeing it. */ _X_EXPORT int -GetProximityEvents(xEvent *events, DeviceIntPtr pDev, int type, +GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type, int first_valuator, int num_valuators, int *valuators) { int num_events = 0; - deviceKeyButtonPointer *kbp = (deviceKeyButtonPointer *) events; + deviceKeyButtonPointer *kbp = (deviceKeyButtonPointer *) events->event; /* Sanity checks. */ if (type != ProximityIn && type != ProximityOut) diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h index 59ce8da86..0a2f28e84 100644 --- a/hw/xfree86/common/xf86Priv.h +++ b/hw/xfree86/common/xf86Priv.h @@ -38,6 +38,7 @@ #include "xf86Privstr.h" #include "propertyst.h" +#include "input.h" /* * Parameters set ONLY from the command line options @@ -202,7 +203,7 @@ void xf86UnlockServer(void); void xf86InitXkb(void); /* xf86Xinput.c */ -extern xEvent *xf86Events; +extern EventList *xf86Events; #endif /* _NO_XF86_PROTOTYPES */ diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 6bf18f148..1cce1368a 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -103,7 +103,7 @@ #include "dgaproc.h" #endif -xEvent *xf86Events = NULL; +EventListPtr xf86Events = NULL; static Bool xf86SendDragEvents(DeviceIntPtr device) @@ -544,7 +544,7 @@ xf86PostMotionEvent(DeviceIntPtr device, #endif if (!xf86Events) - xf86Events = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum()); + xf86Events = InitEventList(GetMaximumEventsNum()); if (!xf86Events) FatalError("Couldn't allocate event store\n"); @@ -553,11 +553,11 @@ xf86PostMotionEvent(DeviceIntPtr device, valuators); for (i = 0; i < nevents; i++) { - xE = xf86Events + i; + xE = (xf86Events + i)->event; /* Don't post core motion events for devices not registered to send * drag events. */ if (xE->u.u.type != MotionNotify || drag) { - mieqEnqueue(device, xf86Events + i); + mieqEnqueue(device, (xf86Events + i)->event); } } @@ -583,7 +583,7 @@ xf86PostProximityEvent(DeviceIntPtr device, va_end(var); if (!xf86Events) - xf86Events = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum()); + xf86Events = InitEventList(GetMaximumEventsNum()); if (!xf86Events) FatalError("Couldn't allocate event store\n"); @@ -591,7 +591,7 @@ xf86PostProximityEvent(DeviceIntPtr device, is_in ? ProximityIn : ProximityOut, first_valuator, num_valuators, valuators); for (i = 0; i < nevents; i++) - mieqEnqueue(device, xf86Events + i); + mieqEnqueue(device, (xf86Events + i)->event); xfree(valuators); } @@ -625,7 +625,7 @@ xf86PostButtonEvent(DeviceIntPtr device, va_end(var); if (!xf86Events) - xf86Events = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum()); + xf86Events = InitEventList(GetMaximumEventsNum()); if (!xf86Events) FatalError("Couldn't allocate event store\n"); @@ -635,7 +635,7 @@ xf86PostButtonEvent(DeviceIntPtr device, first_valuator, num_valuators, valuators); for (i = 0; i < nevents; i++) - mieqEnqueue(device, xf86Events + i); + mieqEnqueue(device, (xf86Events + i)->event); xfree(valuators); } @@ -658,7 +658,7 @@ xf86PostKeyEvent(DeviceIntPtr device, "broken.\n"); if (!xf86Events) - xf86Events = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum()); + xf86Events = InitEventList(GetMaximumEventsNum()); if (!xf86Events) FatalError("Couldn't allocate event store\n"); @@ -682,7 +682,7 @@ xf86PostKeyEvent(DeviceIntPtr device, } for (i = 0; i < nevents; i++) - mieqEnqueue(device, xf86Events + i); + mieqEnqueue(device, (xf86Events + i)->event); } _X_EXPORT void @@ -702,7 +702,7 @@ xf86PostKeyboardEvent(DeviceIntPtr device, #endif if (!xf86Events) - xf86Events = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum()); + xf86Events = InitEventList(GetMaximumEventsNum()); if (!xf86Events) FatalError("Couldn't allocate event store\n"); @@ -710,7 +710,7 @@ xf86PostKeyboardEvent(DeviceIntPtr device, is_down ? KeyPress : KeyRelease, key_code); for (i = 0; i < nevents; i++) - mieqEnqueue(device, xf86Events + i); + mieqEnqueue(device, (xf86Events + i)->event); } _X_EXPORT LocalDevicePtr diff --git a/include/dix.h b/include/dix.h index 93472e832..1828f43f6 100644 --- a/include/dix.h +++ b/include/dix.h @@ -691,4 +691,8 @@ extern Bool DevHasCursor(DeviceIntPtr pDev); extern Bool IsPointerDevice( DeviceIntPtr dev); extern Bool IsKeyboardDevice(DeviceIntPtr dev); + +/* GE stuff */ +void SetGenericFilter(int extension, Mask* filters); + #endif /* DIX_H */ diff --git a/include/input.h b/include/input.h index 401fcece8..6443a58f6 100644 --- a/include/input.h +++ b/include/input.h @@ -85,6 +85,15 @@ typedef struct _OtherClients *OtherClientsPtr; typedef struct _InputClients *InputClientsPtr; typedef struct _DeviceIntRec *DeviceIntPtr; +typedef struct _EventList { + xEvent* event; + int evlen; /* length of allocated memory for event in bytes. This is not + the actual length of the event. The event's actual length is + 32 for standard events or 32 + + ((xGenericEvent*)event)->length * 4 for GenericEvents */ +} EventList, *EventListPtr; + + typedef int (*DeviceProc)( DeviceIntPtr /*device*/, int /*what*/); @@ -390,8 +399,11 @@ extern void InitInput( extern int GetMaximumEventsNum(void); +extern EventListPtr InitEventList(int num_events); +extern void FreeEventList(EventListPtr list, int num_events); + extern int GetPointerEvents( - xEvent *events, + EventListPtr events, DeviceIntPtr pDev, int type, int buttons, @@ -401,13 +413,13 @@ extern int GetPointerEvents( int *valuators); extern int GetKeyboardEvents( - xEvent *events, + EventListPtr events, DeviceIntPtr pDev, int type, int key_code); extern int GetKeyboardValuatorEvents( - xEvent *events, + EventListPtr events, DeviceIntPtr pDev, int type, int key_code, @@ -416,7 +428,7 @@ extern int GetKeyboardValuatorEvents( int *valuators); extern int GetProximityEvents( - xEvent *events, + EventListPtr events, DeviceIntPtr pDev, int type, int first_valuator, diff --git a/mi/mieq.c b/mi/mieq.c index 2eeb21eea..06fdffc93 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -56,6 +56,7 @@ in this Software without prior written authorization from The Open Group. # include "scrnintstr.h" # include # include +# include # include "extinit.h" # include "exglobals.h" @@ -71,7 +72,7 @@ in this Software without prior written authorization from The Open Group. #define DequeueScreen(dev) dev->spriteInfo->sprite->pDequeueScreen typedef struct _Event { - xEvent event[7]; + EventListPtr events; int nevents; ScreenPtr pScreen; DeviceIntPtr pDev; /* device this event _originated_ from */ @@ -97,6 +98,13 @@ mieqInit(void) miEventQueue.lastMotion = FALSE; for (i = 0; i < 128; i++) miEventQueue.handlers[i] = NULL; + for (i = 0; i < QUEUE_SIZE; i++) + { + EventListPtr evlist = InitEventList(7); /* 1 + MAX_VALUATOR_EVENTS */ + if (!evlist) + FatalError("Could not allocate event queue.\n"); + miEventQueue.events[i].events = evlist; + } SetInputCheck(&miEventQueue.head, &miEventQueue.tail); return TRUE; } @@ -112,23 +120,26 @@ void mieqEnqueue(DeviceIntPtr pDev, xEvent *e) { HWEventQueueType oldtail = miEventQueue.tail, newtail; + EventListPtr evt; int isMotion = 0; - deviceValuator *v = (deviceValuator *) e; - EventPtr laste = &miEventQueue.events[oldtail - 1]; - deviceKeyButtonPointer *lastkbp = (deviceKeyButtonPointer *) - &laste->event[0]; + int evlen; /* avoid merging events from different devices */ if (e->u.u.type == MotionNotify) isMotion = pDev->id; - else if (e->u.u.type == MotionNotify) - isMotion = inputInfo.pointer->id; else if (e->u.u.type == DeviceMotionNotify) isMotion = pDev->id | (1 << 8); /* flag to indicate DeviceMotion */ /* We silently steal valuator events: just tack them on to the last * motion event they need to be attached to. Sigh. */ if (e->u.u.type == DeviceValuator) { + deviceValuator *v = (deviceValuator *) e; + EventPtr laste; + deviceKeyButtonPointer *lastkbp; + + laste = &miEventQueue.events[(oldtail ? oldtail : QUEUE_SIZE)- 1]; + lastkbp = (deviceKeyButtonPointer *) laste->events->event; + if (laste->nevents > 6) { ErrorF("mieqEnqueue: more than six valuator events; dropping.\n"); return; @@ -142,7 +153,8 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e) ErrorF("mieqEnequeue: out-of-order valuator event; dropping.\n"); return; } - memcpy(&(laste->event[laste->nevents++]), e, sizeof(xEvent)); + + memcpy((laste->events[laste->nevents++].event), e, sizeof(xEvent)); return; } @@ -166,18 +178,27 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e) miEventQueue.tail = newtail; } - memcpy(&(miEventQueue.events[oldtail].event[0]), e, sizeof(xEvent)); + evlen = sizeof(xEvent); + if (e->u.u.type == GenericEvent) + evlen += ((xGenericEvent*)e)->length * 4; + + evt = miEventQueue.events[oldtail].events; + if (evt->evlen < evlen) + { + evt->evlen = evlen; + evt->event = xrealloc(evt->event, evt->evlen); + } + + memcpy(evt->event, e, evlen); miEventQueue.events[oldtail].nevents = 1; /* Make sure that event times don't go backwards - this * is "unnecessary", but very useful. */ if (e->u.keyButtonPointer.time < miEventQueue.lastEventTime && miEventQueue.lastEventTime - e->u.keyButtonPointer.time < 10000) - miEventQueue.events[oldtail].event[0].u.keyButtonPointer.time = - miEventQueue.lastEventTime; + evt->event->u.keyButtonPointer.time = miEventQueue.lastEventTime; - miEventQueue.lastEventTime = - miEventQueue.events[oldtail].event[0].u.keyButtonPointer.time; + miEventQueue.lastEventTime = evt->event->u.keyButtonPointer.time; miEventQueue.events[oldtail].pScreen = EnqueueScreen(pDev); miEventQueue.events[oldtail].pDev = pDev; @@ -209,6 +230,7 @@ mieqProcessInputEvents(void) EventRec *e = NULL; int x = 0, y = 0; DeviceIntPtr dev = NULL; + xEvent* event; while (miEventQueue.head != miEventQueue.tail) { if (screenIsSaved == SCREEN_SAVER_ON) @@ -225,8 +247,8 @@ mieqProcessInputEvents(void) /* Assumption - screen switching can only occur on motion events. */ if (e->pScreen != DequeueScreen(e->pDev)) { DequeueScreen(e->pDev) = e->pScreen; - x = e->event[0].u.keyButtonPointer.rootX; - y = e->event[0].u.keyButtonPointer.rootY; + x = e->events[0].event->u.keyButtonPointer.rootX; + y = e->events[0].event->u.keyButtonPointer.rootY; if (miEventQueue.head == QUEUE_SIZE - 1) miEventQueue.head = 0; else @@ -241,39 +263,60 @@ mieqProcessInputEvents(void) /* If someone's registered a custom event handler, let them * steal it. */ - if (miEventQueue.handlers[e->event->u.u.type]) { - miEventQueue.handlers[e->event->u.u.type]( - DequeueScreen(e->pDev)->myNum, - e->event, dev, - e->nevents); + if (miEventQueue.handlers[e->events->event->u.u.type]) { + miEventQueue.handlers[e->events->event->u.u.type]( + DequeueScreen(e->pDev)->myNum, + e->events->event, dev, + e->nevents); return; } /* If this is a core event, make sure our keymap, et al, is * changed to suit. */ - if (e->event[0].u.u.type == KeyPress || - e->event[0].u.u.type == KeyRelease) { + if (e->events->event[0].u.u.type == KeyPress || + e->events->event[0].u.u.type == KeyRelease) { SwitchCoreKeyboard(e->pDev); dev = inputInfo.keyboard; } - else if (e->event[0].u.u.type == MotionNotify || - e->event[0].u.u.type == ButtonPress || - e->event[0].u.u.type == ButtonRelease) { + else if (e->events->event[0].u.u.type == MotionNotify || + e->events->event[0].u.u.type == ButtonPress || + e->events->event[0].u.u.type == ButtonRelease) { dev = inputInfo.pointer; } else { dev = e->pDev; } + + /* FIXME: Bad hack. The only event where we actually get multiple + * events at once is a DeviceMotionNotify followed by + * DeviceValuators. For now it's save enough to just take the + * event directly or copy the bunch of events and pass in the + * copy. Eventually the interface for the processInputProc needs + * to be changed. (whot) + */ + if (e->nevents > 1) + { + int i; + event = xcalloc(e->nevents, sizeof(xEvent)); + for (i = 0; i < e->nevents; i++) + memcpy(&event[i], e->events[i].event, sizeof(xEvent)); + } + else + event = e->events->event; + /* MPX devices send both core and Xi events. * Use dev to get the correct processing function but supply * e->pDev to pass the correct device */ - dev->public.processInputProc(e->event, e->pDev, e->nevents); + dev->public.processInputProc(event, e->pDev, e->nevents); + + if (e->nevents > 1) + xfree(event); } /* Update the sprite now. Next event may be from different device. */ - if (e->event[0].u.u.type == MotionNotify && e->pDev->coreEvents) + if (e->events->event[0].u.u.type == MotionNotify && e->pDev->coreEvents) { miPointerUpdateSprite(e->pDev); } diff --git a/mi/mipointer.c b/mi/mipointer.c index b14c2c7d3..8dc7c7f5f 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -86,7 +86,7 @@ static Bool miPointerDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen); static void miPointerDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen); -static xEvent* events; /* for WarpPointer MotionNotifies */ +static EventList* events; /* for WarpPointer MotionNotifies */ _X_EXPORT Bool miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) @@ -175,7 +175,7 @@ miPointerCloseScreen (index, pScreen) pScreen->CloseScreen = pScreenPriv->CloseScreen; xfree ((pointer) pScreenPriv); - xfree ((pointer) events); + FreeEventList(events, GetMaximumEventsNum()); events = NULL; return (*pScreen->CloseScreen) (index, pScreen); } @@ -624,7 +624,7 @@ miPointerMove (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, unsigned long if (!events) { - events = (xEvent*)xcalloc(sizeof(xEvent), GetMaximumEventsNum()); + events = InitEventList(GetMaximumEventsNum()); if (!events) { @@ -635,6 +635,8 @@ miPointerMove (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, unsigned long nevents = GetPointerEvents(events, pDev, MotionNotify, 0, POINTER_ABSOLUTE, 0, 2, valuators); + OsBlockSignals(); for (i = 0; i < nevents; i++) - mieqEnqueue(pDev, &events[i]); + mieqEnqueue(pDev, events[i].event); + OsReleaseSignals(); } From af25720598bb35d9d953ac8d9a07528289ebfb4a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 2 May 2007 13:51:16 +0930 Subject: [PATCH 110/634] Add missing files for ProcXiSelectEvent. Should have been a part of 5e439109292e54b5c4d1a7bc7b6ac0e42ee285f7. Oh well. --- Xi/xiselev.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++ Xi/xiselev.h | 44 +++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 Xi/xiselev.c create mode 100644 Xi/xiselev.h diff --git a/Xi/xiselev.c b/Xi/xiselev.c new file mode 100644 index 000000000..8740487df --- /dev/null +++ b/Xi/xiselev.c @@ -0,0 +1,78 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +#define NEED_EVENTS +#define NEED_REPLIES + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "dixstruct.h" +#include "windowstr.h" + +#include "exglobals.h" +#include "xiselev.h" +#include "geext.h" + +int +SProcXiSelectEvent(ClientPtr client) +{ + char n; + + REQUEST(xXiSelectEventReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xXiSelectEventReq); + swapl(&stuff->window, n); + swapl(&stuff->mask, n); + return (ProcXiSelectEvent(client)); +} + + +int +ProcXiSelectEvent(ClientPtr client) +{ + int ret; + WindowPtr pWin; + REQUEST(xXiSelectEventReq); + REQUEST_SIZE_MATCH(xXiSelectEventReq); + + ret = dixLookupWindow(&pWin, stuff->window, client, DixReadWriteAccess); + if (ret != Success) + { + SendErrorToClient(client, IReqCode, X_XiSelectEvent, 0, ret); + return Success; + } + + GEWindowSetMask(client, pWin, IReqCode, stuff->mask); + + return Success; +} + diff --git a/Xi/xiselev.h b/Xi/xiselev.h new file mode 100644 index 000000000..91028159b --- /dev/null +++ b/Xi/xiselev.h @@ -0,0 +1,44 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef XISELEV_H +#define XISELEV_H 1 + +int SProcXiSelectEvent(ClientPtr /* client */ + ); + +int ProcXiSelectEvent(ClientPtr /* client */ + ); + +#endif /* XISELEV_H */ + From e6fd4a24ebd205013b41e44aacbbfb847709d2fd Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 2 May 2007 17:49:20 +0930 Subject: [PATCH 111/634] Add handling for FakeDeviceEvent request. Fix a stupid bug from last commit, mask names were wrong. --- Xi/Makefile.am | 2 + Xi/extinit.c | 9 +++- Xi/fakedevdata.c | 128 +++++++++++++++++++++++++++++++++++++++++++++++ Xi/fakedevdata.h | 42 ++++++++++++++++ 4 files changed, 179 insertions(+), 2 deletions(-) create mode 100644 Xi/fakedevdata.c create mode 100644 Xi/fakedevdata.h diff --git a/Xi/Makefile.am b/Xi/Makefile.am index 346453cb6..d020210df 100644 --- a/Xi/Makefile.am +++ b/Xi/Makefile.am @@ -30,6 +30,8 @@ libXi_la_SOURCES = \ exevents.c \ exglobals.h \ extinit.c \ + fakedevdata.c \ + fakedevdata.h \ getbmap.c \ getbmap.h \ getcptr.c \ diff --git a/Xi/extinit.c b/Xi/extinit.c index beac426ee..6d8c96141 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -86,6 +86,7 @@ SOFTWARE. #include "chpkpair.h" #include "closedev.h" #include "devbell.h" +#include "fakedevdata.h" #include "getbmap.h" #include "getbmap.h" #include "getcptr.h" @@ -133,8 +134,8 @@ Mask ExtExclusiveMasks[EMASKSIZE]; static Mask xi_filters[3] = { - XI_PointerKeyboardPairingChangedNotifyMask, - XI_RandomStringEventMask, + XI_PointerKeyboardPairingChangedMask, + XI_RandomStringMask, XI_RawDeviceEventMask, }; @@ -362,6 +363,8 @@ ProcIDispatch(ClientPtr client) return ProcXGetClientPointer(client); else if (stuff->data == X_GetPairedPointer) return ProcXGetPairedPointer(client); + else if (stuff->data == X_FakeDeviceData) + return ProcXFakeDeviceData(client); else { SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); } @@ -475,6 +478,8 @@ SProcIDispatch(ClientPtr client) return SProcXGetClientPointer(client); else if (stuff->data == X_GetPairedPointer) return SProcXGetPairedPointer(client); + else if (stuff->data == X_FakeDeviceData) + return SProcXFakeDeviceData(client); else { SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); } diff --git a/Xi/fakedevdata.c b/Xi/fakedevdata.c new file mode 100644 index 000000000..64f2ea62c --- /dev/null +++ b/Xi/fakedevdata.c @@ -0,0 +1,128 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +/*********************************************************************** + * + * Request to fake data for a given device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exevents.h" +#include "exglobals.h" +#include "mi.h" + +#include "fakedevdata.h" + +static EventListPtr fake_events = NULL; + +int +SProcXFakeDeviceData(ClientPtr client) +{ + char n; + int i; + ValuatorData* p; + + REQUEST(xFakeDeviceDataReq); + + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xFakeDeviceDataReq); + + p = (ValuatorData*)&stuff[1]; + for (i = 0; i < stuff->num_valuators; i++, p++) + swapl(p, n); + + return ProcXFakeDeviceData(client);; +} + +int +ProcXFakeDeviceData(ClientPtr client) +{ + DeviceIntPtr dev; + int nevents, i; + int* valuators = NULL; + + REQUEST(xFakeDeviceDataReq); + REQUEST_AT_LEAST_SIZE(xFakeDeviceDataReq); + + if (stuff->length != (sizeof(xFakeDeviceDataReq) >> 2) + stuff->num_valuators) + { + SendErrorToClient(client, IReqCode, X_FakeDeviceData, 0, BadLength); + return Success; + } + + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_FakeDeviceData, 0, BadDevice); + return Success; + } + + if (!fake_events && !(fake_events = InitEventList(GetMaximumEventsNum()))) + { + SendErrorToClient(client, IReqCode, X_FakeDeviceData, 0, BadAlloc); + return Success; + } + if (stuff->num_valuators) + { + CARD32* valptr = (CARD32*)&stuff[1]; + + valuators = xcalloc(stuff->num_valuators, sizeof(int)); + if (!valuators) + { + SendErrorToClient(client, IReqCode, X_FakeDeviceData, 0, BadAlloc); + return Success; + } + for (i = 0; i < stuff->num_valuators; i++, valptr++) + valuators[i] = (int)(*valptr); + } + + nevents = GetPointerEvents(fake_events, dev, stuff->type, stuff->buttons, + POINTER_RELATIVE, stuff->first_valuator, stuff->num_valuators, + valuators); + + OsBlockSignals(); + for (i = 0; i < nevents; i++) + mieqEnqueue(dev, (fake_events+ i)->event); + OsReleaseSignals(); + xfree(valuators); + return Success; +} diff --git a/Xi/fakedevdata.h b/Xi/fakedevdata.h new file mode 100644 index 000000000..28dd72985 --- /dev/null +++ b/Xi/fakedevdata.h @@ -0,0 +1,42 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef FAKEDEVDATA_H +#define FAKEDEVDATA_H 1 + +int SProcXFakeDeviceData(ClientPtr /* client */ + ); + +int ProcXFakeDeviceData(ClientPtr /* client */ + ); + +#endif /* FAKEDEVDATA_H */ From c03d9a7217f9895feed8cfed3ede4752faf6187c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 2 May 2007 18:16:40 +0930 Subject: [PATCH 112/634] Cleaning up a bit. Register correct event in EventSwapVector. Fix up event swap for GE events, register XI's swap function at GE. --- Xext/geext.c | 3 +-- Xi/chpkpair.c | 2 ++ Xi/extinit.c | 60 ++++++++++++++++++++++++++++++++++----------------- 3 files changed, 43 insertions(+), 22 deletions(-) diff --git a/Xext/geext.c b/Xext/geext.c index 7c4573e8c..fed74dc54 100644 --- a/Xext/geext.c +++ b/Xext/geext.c @@ -235,8 +235,7 @@ GEExtensionInit(void) memset(GEExtensions, 0, sizeof(GEExtensions)); - EventSwapVector[GEEventBase + X_GenericEvent] = - (EventSwapPtr) SGEGenericEvent; + EventSwapVector[X_GenericEvent] = (EventSwapPtr) SGEGenericEvent; } else { FatalError("GEInit: AddExtensions failed.\n"); } diff --git a/Xi/chpkpair.c b/Xi/chpkpair.c index 555c8e1ca..db8e7f6cd 100644 --- a/Xi/chpkpair.c +++ b/Xi/chpkpair.c @@ -131,5 +131,7 @@ SPointerKeyboardPairingChangedNotifyEvent (pairingChangedNotify *from, *to = *from; swaps(&to->sequenceNumber, n); + swapl(&to->length, n); + swapl(&to->evtype, n); swapl(&to->time, n); } diff --git a/Xi/extinit.c b/Xi/extinit.c index 6d8c96141..bfb2bc78b 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -238,25 +238,6 @@ static XExtensionVersion thisversion = { XI_Present, XI_Add_DevicePresenceNotify_Minor }; -/**************************************************************** - * - * EventSwap for generic events coming from the GE extension. - */ - -static void -XIGEEventSwap(xGenericEvent* from, xGenericEvent* to) -{ - int n; - - swaps(&from->sequenceNumber, n); - switch(from->evtype) - { - case XI_PointerKeyboardPairingChangedNotify: - SPointerKeyboardPairingChangedNotifyEvent - ((pairingChangedNotify*)from, (pairingChangedNotify*)to); - break; - } -} /************************************************************************* * @@ -700,6 +681,22 @@ SDeviceLeaveNotifyEvent (deviceLeaveNotify *from, deviceLeaveNotify *to) swaps(&to->eventY, n); } +static void +SRawDeviceEvent(rawDeviceEvent* from, rawDeviceEvent *to) +{ + char n; + int i; + CARD32* valptr; + + + *to = *from; + swaps(&to->sequenceNumber, n); + swapl(&to->length, n); + swapl(&to->evtype, n); + valptr = &to->valuator0; + for (i = 0; i < from->num_valuators; i++, valptr++) + swapl(valptr, n); +} /************************************************************************** * @@ -994,7 +991,6 @@ IResetProc(ExtensionEntry * unused) EventSwapVector[DevicePresenceNotify] = NotImplemented; EventSwapVector[DeviceEnterNotify] = NotImplemented; EventSwapVector[DeviceLeaveNotify] = NotImplemented; - EventSwapVector[PointerKeyboardPairingChangedNotify] = NotImplemented; RestoreExtensionEvents(); } @@ -1128,6 +1124,29 @@ SEventIDispatch(xEvent * from, xEvent * to) } } +/**************************************************************** + * + * EventSwap for generic events coming from the GE extension. + */ + +static void +XIGEEventSwap(xGenericEvent* from, xGenericEvent* to) +{ + int n; + + swaps(&from->sequenceNumber, n); + switch(from->evtype) + { + case XI_PointerKeyboardPairingChangedNotify: + SPointerKeyboardPairingChangedNotifyEvent + ((pairingChangedNotify*)from, (pairingChangedNotify*)to); + break; + case XI_RawDeviceEvent: + SRawDeviceEvent((rawDeviceEvent*)from, (rawDeviceEvent*)to); + break; + } +} + /********************************************************************** * * IExtensionInit - initialize the input extension. @@ -1172,6 +1191,7 @@ XInputExtensionInit(void) EventSwapVector[DeviceLeaveNotify] = SEventIDispatch; /* init GE events */ + GERegisterExtension(IReqCode, XIGEEventSwap); SetGenericFilter(IReqCode, xi_filters); } else { FatalError("IExtensionInit: AddExtensions failed\n"); From cb22bdbe678a9948eda75d464d6701a729664ef0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 3 May 2007 10:05:58 +0930 Subject: [PATCH 113/634] Add selected RamDac functions to xfree86LookupTab. Adding those makes drivers for s3 and tga work again. --- hw/xfree86/loader/xf86sym.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c index 5175f01f9..ca32d6eb8 100644 --- a/hw/xfree86/loader/xf86sym.c +++ b/hw/xfree86/loader/xf86sym.c @@ -97,6 +97,9 @@ #include "xf86DDC.h" #include "edid.h" +#include "xf86RamDac.h" +#include "BT.h" + #ifndef HAS_GLIBC_SIGSETJMP #if defined(setjmp) && defined(__GNU_LIBRARY__) && \ (!defined(__GLIBC__) || (__GLIBC__ < 2) || \ @@ -1255,4 +1258,14 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(xf86I2CWriteRead) SYMFUNC(xf86I2CWriteVec) SYMFUNC(xf86I2CWriteWord) + + /* ramdac */ + SYMFUNC(RamDacInit) + SYMFUNC(RamDacCreateInfoRec) + SYMFUNC(RamDacDestroyInfoRec) + SYMFUNC(RamDacHelperCreateInfoRec) + SYMFUNC(RamDacFreeRec) + SYMFUNC(RamDacHandleColormaps) + SYMFUNC(RamDacGetHWIndex) + SYMFUNC(BTramdacProbe) }; From 4dc973f08c54294e06bc831bd2839fd3aa24ecfb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 14 May 2007 10:42:03 +0930 Subject: [PATCH 114/634] Add ExtendedGrabDevice handling. Add XGE handling in DeliverGrabbedEvent. We can now grab something selecting XGE events, but the current code is a bit messy and doesn't work too well yet. --- Xi/Makefile.am | 2 + Xi/extgrbdev.c | 238 +++++++++++++++++++++++++++++++++++++++++++++ Xi/extgrbdev.h | 46 +++++++++ Xi/extinit.c | 7 ++ Xi/grabdev.c | 7 ++ dix/devices.c | 2 +- dix/events.c | 223 ++++++++++++++++++++++++++++++++++++++---- include/dix.h | 17 +++- include/inputstr.h | 17 ++++ include/misc.h | 1 + 10 files changed, 539 insertions(+), 21 deletions(-) create mode 100644 Xi/extgrbdev.c create mode 100644 Xi/extgrbdev.h diff --git a/Xi/Makefile.am b/Xi/Makefile.am index d020210df..2cf11a042 100644 --- a/Xi/Makefile.am +++ b/Xi/Makefile.am @@ -29,6 +29,8 @@ libXi_la_SOURCES = \ devbell.h \ exevents.c \ exglobals.h \ + extgrbdev.c \ + extgrbdev.h \ extinit.c \ fakedevdata.c \ fakedevdata.h \ diff --git a/Xi/extgrbdev.c b/Xi/extgrbdev.c new file mode 100644 index 000000000..0f0fd30f0 --- /dev/null +++ b/Xi/extgrbdev.c @@ -0,0 +1,238 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +/*********************************************************************** + * + * Request to fake data for a given device. + * + */ + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include +#include +#include "gestr.h" +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exevents.h" +#include "exglobals.h" + +#include "extgrbdev.h" + +int +SProcXExtendedGrabDevice(ClientPtr client) +{ + char n; + int i; + long* p; + + REQUEST(xExtendedGrabDeviceReq); + swaps(&stuff->length, n); + REQUEST_AT_LEAST_SIZE(xExtendedGrabDeviceReq); + + swapl(&stuff->grab_window, n); + swapl(&stuff->time, n); + swapl(&stuff->confine_to, n); + swapl(&stuff->cursor, n); + swaps(&stuff->event_mask, n); + swaps(&stuff->event_count, n); + swaps(&stuff->ge_event_count, n); + + p = (long *)&stuff[1]; + for (i = 0; i < stuff->event_count; i++) { + swapl(p, n); + p++; + } + + for (i = 0; i < stuff->ge_event_count; i++) { + p++; /* first 4 bytes are extension type and padding */ + swapl(p, n); + p++; + } + + return ProcXExtendedGrabDevice(client); +} + + +int +ProcXExtendedGrabDevice(ClientPtr client) +{ + xExtendedGrabDeviceReply rep; + DeviceIntPtr dev; + int err, + errval = 0, + i; + WindowPtr grab_window, + confineTo = 0; + CursorPtr cursor = NULL; + struct tmask tmp[EMASKSIZE]; + TimeStamp time; + XgeEventMask* xgeMask; + GenericMaskPtr gemasks = NULL; + + REQUEST(xExtendedGrabDeviceReq); + REQUEST_AT_LEAST_SIZE(xExtendedGrabDeviceReq); + + if (stuff->length != (sizeof(xExtendedGrabDeviceReq) >> 2) + + stuff->event_count + 2 * stuff->ge_event_count) + { + errval = 0; + err = BadLength; + goto cleanup; + } + + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + errval = stuff->deviceid; + err = BadDevice; + goto cleanup; + } + + err = dixLookupWindow(&grab_window, + stuff->grab_window, + client, + DixReadAccess); + if (err != Success) + { + errval = stuff->grab_window; + goto cleanup; + } + + if (stuff->confine_to) + { + err = dixLookupWindow(&confineTo, + stuff->confine_to, + client, + DixReadAccess); + if (err != Success) + { + errval = stuff->confine_to; + goto cleanup; + } + } + + if (stuff->cursor) + { + cursor = (CursorPtr)SecurityLookupIDByType(client, + stuff->cursor, + RT_CURSOR, + DixReadAccess); + if (!cursor) + { + errval = stuff->cursor; + err = BadCursor; + goto cleanup; + } + } + + rep.repType = X_Reply; + rep.RepType = X_ExtendedGrabDevice; + rep.sequenceNumber = client->sequence; + rep.length = 0; + + if (CreateMaskFromList(client, + (XEventClass*)&stuff[1], + stuff->event_count, + tmp, + dev, + X_GrabDevice) != Success) + return Success; + + time = ClientTimeToServerTime(stuff->time); + + if (stuff->ge_event_count) + { + xgeMask = + (XgeEventMask*)(((XEventClass*)&stuff[1]) + stuff->event_count); + + gemasks = xcalloc(1, sizeof(GenericMaskRec)); + gemasks->extension = xgeMask->extension; + gemasks->mask = xgeMask->evmask; + gemasks->next = NULL; + xgeMask++; + + for (i = 1; i < stuff->ge_event_count; i++, xgeMask++) + { + gemasks->next = xcalloc(1, sizeof(GenericMaskRec)); + gemasks = gemasks->next; + gemasks->extension = xgeMask->extension; + gemasks->mask = xgeMask->evmask; + gemasks->next = NULL; + } + } + + ExtGrabDevice(client, dev, stuff->grabmode, stuff->device_mode, + grab_window, confineTo, time, stuff->owner_events, + cursor, stuff->event_mask, tmp[stuff->deviceid].mask, + gemasks); + + if (err != Success) { + errval = 0; + goto cleanup; + } + +cleanup: + + while(gemasks) + { + GenericMaskPtr prev = gemasks; + gemasks = gemasks->next; + xfree(prev); + } + + if (err == Success) + { + WriteReplyToClient(client, sizeof(xGrabDeviceReply), &rep); + } + else + { + SendErrorToClient(client, IReqCode, + X_ExtendedGrabDevice, + errval, err); + } + return Success; +} + +void +SRepXExtendedGrabDevice(ClientPtr client, int size, + xExtendedGrabDeviceReply* rep) +{ + char n; + swaps(&rep->sequenceNumber, n); + swaps(&rep->length, n); + WriteToClient(client, size, (char*)rep); +} diff --git a/Xi/extgrbdev.h b/Xi/extgrbdev.h new file mode 100644 index 000000000..93075b177 --- /dev/null +++ b/Xi/extgrbdev.h @@ -0,0 +1,46 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef EXTGRBDEV_H +#define EXTGRBDEV_H 1 + +int SProcXExtendedGrabDevice(ClientPtr /* client */ + ); + +int ProcXExtendedGrabDevice(ClientPtr /* client */ + ); + +void SRepXExtendedGrabDevice(ClientPtr client, + int size, + xExtendedGrabDeviceReply* rep); + +#endif /* EXTGRBDEV_H */ diff --git a/Xi/extinit.c b/Xi/extinit.c index bfb2bc78b..088873062 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -85,6 +85,7 @@ SOFTWARE. #include "chgptr.h" #include "chpkpair.h" #include "closedev.h" +#include "extgrbdev.h" #include "devbell.h" #include "fakedevdata.h" #include "getbmap.h" @@ -346,6 +347,8 @@ ProcIDispatch(ClientPtr client) return ProcXGetPairedPointer(client); else if (stuff->data == X_FakeDeviceData) return ProcXFakeDeviceData(client); + else if (stuff->data == X_ExtendedGrabDevice) + return ProcXExtendedGrabDevice(client); else { SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); } @@ -461,6 +464,8 @@ SProcIDispatch(ClientPtr client) return SProcXGetPairedPointer(client); else if (stuff->data == X_FakeDeviceData) return SProcXFakeDeviceData(client); + else if (stuff->data == X_ExtendedGrabDevice) + return SProcXExtendedGrabDevice(client); else { SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); } @@ -549,6 +554,8 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep) SRepXGetClientPointer(client, len, (xGetClientPointerReply*) rep); else if (rep->RepType == X_GetPairedPointer) SRepXGetPairedPointer(client, len, (xGetPairedPointerReply*) rep); + else if (rep->RepType == X_ExtendedGrabDevice) + SRepXExtendedGrabDevice(client, len, (xExtendedGrabDeviceReply*) rep); else { FatalError("XINPUT confused sending swapped reply"); } diff --git a/Xi/grabdev.c b/Xi/grabdev.c index 143b98c73..f3349ba8c 100644 --- a/Xi/grabdev.c +++ b/Xi/grabdev.c @@ -155,6 +155,13 @@ ProcXGrabDevice(ClientPtr client) * * This procedure creates an event mask from a list of XEventClasses. * + * Procedure is as follows: + * An XEventClass is (deviceid << 8 | eventtype). For each entry in the list, + * get the device. Then run through all available event indices (those are + * set when XI starts up) and binary OR's the device's mask to whatever the + * event mask for the given event type was. + * + * mask has to be size EMASKSIZE and pre-allocated. */ int diff --git a/dix/devices.c b/dix/devices.c index bd145a085..d66364909 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -653,7 +653,7 @@ CloseDevice(DeviceIntPtr dev) /* a client may have the device set as client pointer */ for (j = 0; j < currentMaxClients; j++) { - if (clients[j]->clientPtr == dev) + if (clients[j] && clients[j]->clientPtr == dev) { clients[j]->clientPtr = NULL; clients[j]->clientPtr = PickPointer(clients[j]); diff --git a/dix/events.c b/dix/events.c index c8b0eb235..415db6e3e 100644 --- a/dix/events.c +++ b/dix/events.c @@ -170,6 +170,7 @@ static xEvent *xeviexE; #endif #include +#include #include "exglobals.h" #include "exevents.h" #include "exglobals.h" @@ -1401,8 +1402,10 @@ void ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, TimeStamp time, Bool autoGrab) { - WindowPtr oldWin = (mouse->coreGrab.grab) ? - mouse->coreGrab.grab->window + GrabInfoPtr grabinfo = + (grab->coreGrab) ? &mouse->coreGrab : &mouse->deviceGrab; + WindowPtr oldWin = (grabinfo->grab) ? + grabinfo->grab->window : mouse->spriteInfo->sprite->win; if (grab->confineTo) @@ -1416,14 +1419,14 @@ ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, DoEnterLeaveEvents(mouse, oldWin, grab->window, NotifyGrab); mouse->valuator->motionHintWindow = NullWindow; if (syncEvents.playingEvents) - mouse->coreGrab.grabTime = syncEvents.time; + grabinfo->grabTime = syncEvents.time; else - mouse->coreGrab.grabTime = time; + grabinfo->grabTime = time; if (grab->cursor) grab->cursor->refcnt++; - mouse->coreGrab.activeGrab = *grab; - mouse->coreGrab.grab = &mouse->coreGrab.activeGrab; - mouse->coreGrab.fromPassiveGrab = autoGrab; + grabinfo->activeGrab = *grab; + grabinfo->grab = &grabinfo->activeGrab; + grabinfo->fromPassiveGrab = autoGrab; PostNewCursor(mouse); CheckGrabForSyncs(mouse,(Bool)grab->pointerMode, (Bool)grab->keyboardMode); } @@ -1467,10 +1470,12 @@ DeactivatePointerGrab(DeviceIntPtr mouse) void ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool passive) { + GrabInfoPtr grabinfo = + (grab->coreGrab) ? &keybd->coreGrab : &keybd->deviceGrab; WindowPtr oldWin; - if (keybd->coreGrab.grab) - oldWin = keybd->coreGrab.grab->window; + if (grabinfo->grab) + oldWin = grabinfo->grab->window; else if (keybd->focus) oldWin = keybd->focus->win; else @@ -1481,12 +1486,12 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool pass keybd->valuator->motionHintWindow = NullWindow; DoFocusEvents(keybd, oldWin, grab->window, NotifyGrab); if (syncEvents.playingEvents) - keybd->coreGrab.grabTime = syncEvents.time; + grabinfo->grabTime = syncEvents.time; else - keybd->coreGrab.grabTime = time; - keybd->coreGrab.activeGrab = *grab; - keybd->coreGrab.grab = &keybd->coreGrab.activeGrab; - keybd->coreGrab.fromPassiveGrab = passive; + grabinfo->grabTime = time; + grabinfo->activeGrab = *grab; + grabinfo->grab = &grabinfo->activeGrab; + grabinfo->fromPassiveGrab = passive; CheckGrabForSyncs(keybd, (Bool)grab->keyboardMode, (Bool)grab->pointerMode); } @@ -1501,6 +1506,9 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd) WindowPtr focusWin = keybd->focus ? keybd->focus->win : keybd->spriteInfo->sprite->win; + if (!grab) + grab = keybd->deviceGrab.grab; + if (focusWin == FollowKeyboardWin) focusWin = inputInfo.keyboard->focus->win; if (keybd->valuator) @@ -3154,7 +3162,7 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, xEvent *dxE; SpritePtr pSprite = thisDev->spriteInfo->sprite; - if (xE->u.u.type & EXTENSION_EVENT_BASE) + if (xE->u.u.type & EXTENSION_EVENT_BASE || xE->u.u.type == GenericEvent) grabinfo = &thisDev->deviceGrab; else grabinfo = &thisDev->coreGrab; @@ -3188,11 +3196,32 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, { if (ACDeviceAllowed(grab->window, thisDev)) { + if (xE->u.u.type == GenericEvent) + { + /* find evmask for event's extension */ + xGenericEvent* ge = ((xGenericEvent*)xE); + GenericMaskPtr gemask = grab->genericMasks; + while(gemask) + { + if (gemask->extension == ge->extension) + break; + gemask = gemask->next; + } - FixUpEventFromWindow(thisDev, xE, grab->window, None, TRUE); - deliveries = TryClientEvents(rClient(grab), xE, count, - (Mask)grab->eventMask, - filters[xE->u.u.type], grab); + if (!gemask) + return; + + deliveries = TryClientEvents(rClient(grab), xE, count, + gemask->mask, + generic_filters[GEEXTIDX(ge)][ge->evtype], + grab); + } else + { + FixUpEventFromWindow(thisDev, xE, grab->window, None, TRUE); + deliveries = TryClientEvents(rClient(grab), xE, count, + (Mask)grab->eventMask, + filters[xE->u.u.type], grab); + } if (deliveries && (xE->u.u.type == MotionNotify #ifdef XINPUT || xE->u.u.type == DeviceMotionNotify @@ -4726,6 +4755,7 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, tempGrab.eventMask = mask; tempGrab.device = dev; tempGrab.cursor = NULL; + tempGrab.coreGrab = coreGrab; (*grabInfo->ActivateGrab)(dev, &tempGrab, time, FALSE); *status = GrabSuccess; @@ -5709,3 +5739,158 @@ SetGenericFilter(int extension, Mask* filters) { generic_filters[extension & 0x7f] = filters; } + + +/** + * Grab a device properly. + * + * grabmode decides if the grab should be for core events and/or XI device + * events. The latter also applies to generic events. + * grabmode is also used to ungrab a device. + * + * + */ +_X_EXPORT int +ExtGrabDevice(ClientPtr client, + DeviceIntPtr dev, + int grabmode, + int device_mode, + WindowPtr grabWindow, + WindowPtr confineTo, + TimeStamp ctime, + Bool ownerEvents, + CursorPtr cursor, + Mask core_mask, + Mask xi_mask, + GenericMaskPtr ge_masks) +{ + GrabInfoPtr grabinfo; + GrabRec newGrab; + + UpdateCurrentTime(); + if (grabmode & CoreOnlyGrab) + { + CursorPtr oldCursor = NullCursor; + + grabinfo = &dev->coreGrab; + + if (grabinfo->grab && !SameClient(grabinfo->grab, client)) + return AlreadyGrabbed; + + if ((!grabWindow->realized) || + (confineTo && !(confineTo->realized && + BorderSizeNotEmpty(dev, confineTo)))) + return GrabNotViewable; + + if (grabinfo->sync.frozen && grabinfo->sync.other && + !SameClient(grabinfo->sync.other, client)) + return GrabFrozen; + + if ((CompareTimeStamps(ctime, currentTime) == LATER) || + (CompareTimeStamps(ctime, grabinfo->grabTime) == EARLIER)) + return GrabInvalidTime; + + if (grabinfo->grab) + { + if (grabinfo->grab->confineTo) + ConfineCursorToWindow(dev, RootWindow(dev), FALSE, FALSE); + oldCursor = dev->coreGrab.grab->cursor; + } + + memset(&newGrab, 0, sizeof(GrabRec)); + newGrab.cursor = cursor; + newGrab.resource = client->clientAsMask; + newGrab.ownerEvents = ownerEvents; + newGrab.confineTo = confineTo; + newGrab.window = grabWindow; + newGrab.coreGrab = True; + newGrab.device = dev; + newGrab.eventMask = core_mask; + if (IsPointerDevice(dev)) + { + newGrab.keyboardMode = GrabModeAsync; + newGrab.pointerMode = device_mode; + } else + { + newGrab.keyboardMode = device_mode; + newGrab.pointerMode = GrabModeAsync; + } + + (*grabinfo->ActivateGrab)(dev, &newGrab, ctime, FALSE); + + if (oldCursor) + FreeCursor(oldCursor, 0); + } + + if (grabmode & DeviceOnlyGrab) + { + grabinfo = &dev->deviceGrab; + + if (grabinfo->grab && !SameClient(grabinfo->grab, client)) + return AlreadyGrabbed; + + if (!grabWindow->realized) + return GrabNotViewable; + + if ((CompareTimeStamps(ctime, currentTime) == LATER) || + (CompareTimeStamps(ctime, grabinfo->grabTime) == EARLIER)) + return GrabInvalidTime; + + if (grabinfo->sync.frozen && grabinfo->sync.other && + !SameClient(grabinfo->sync.other, client)) + return GrabFrozen; + + memset(&newGrab, 0, sizeof(GrabRec)); + newGrab.window = grabWindow; + newGrab.resource = client->clientAsMask; + newGrab.ownerEvents = ownerEvents; + newGrab.device = dev; + newGrab.cursor = cursor; + newGrab.confineTo = confineTo; + newGrab.eventMask = xi_mask; + newGrab.genericMasks = NULL; + + if (ge_masks) + { + GenericMaskPtr last; + newGrab.genericMasks = xcalloc(1, sizeof(GenericMaskRec)); + *newGrab.genericMasks = *ge_masks; + newGrab.genericMasks->next = NULL; + ge_masks = ge_masks->next; + last = newGrab.genericMasks; + + while(ge_masks) + { + last->next = xcalloc(1, sizeof(GenericMaskRec)); + last = last->next; + *last = *ge_masks; + ge_masks = ge_masks->next; + } + } + + if (IsPointerDevice(dev)) + { + newGrab.keyboardMode = GrabModeAsync; + newGrab.pointerMode = device_mode; + } else + { + newGrab.keyboardMode = device_mode; + newGrab.pointerMode = GrabModeAsync; + } + + (*grabinfo->ActivateGrab)(dev, &newGrab, ctime, FALSE); + } + + if (grabmode & UngrabAll) + { + if (grabmode & UngrabCoreOnly) + grabinfo = &dev->coreGrab; + else + grabinfo = &dev->deviceGrab; + if (grabinfo->grab && SameClient(grabinfo->grab, client)) + (*grabinfo->DeactivateGrab)(dev); + } + + return GrabSuccess; +} + diff --git a/include/dix.h b/include/dix.h index 1828f43f6..60a68eea9 100644 --- a/include/dix.h +++ b/include/dix.h @@ -51,6 +51,8 @@ SOFTWARE. #include "gc.h" #include "window.h" #include "input.h" +#include "cursor.h" +#include #define EARLIER -1 #define SAMETIME 0 @@ -693,6 +695,19 @@ extern Bool IsKeyboardDevice(DeviceIntPtr dev); /* GE stuff */ -void SetGenericFilter(int extension, Mask* filters); +extern void SetGenericFilter(int extension, Mask* filters); + +extern int ExtGrabDevice(ClientPtr client, + DeviceIntPtr dev, + int grabmode, + int device_mode, + WindowPtr grabWindow, + WindowPtr confineTo, + TimeStamp ctime, + Bool ownerEvents, + CursorPtr cursor, + Mask core_mask, + Mask xi_mask, + GenericMaskPtr ge_masks); #endif /* DIX_H */ diff --git a/include/inputstr.h b/include/inputstr.h index 4924cb1cc..837afaa44 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -102,6 +102,22 @@ typedef struct _DetailRec { /* Grab details may be bit masks */ Mask *pMask; } DetailRec; +typedef struct _GenericMaskRec { + int extension; + Mask mask; + struct _GenericMaskRec* next; +} GenericMaskRec; + +/** + * Central struct for device grabs. + * The same struct is used for both core grabs and device grabs, with + * different fields being set. + * If the grab is a core grab (GrabPointer/GrabKeyboard), then the eventMask + * is a combination of standard event masks (i.e. PointerMotionMask | + * ButtonPressMask). + * If the grab is a device grab (GrabDevice), then the eventMask is a + * combination of event masks for a given XI event type (see SetEventInfo). + */ typedef struct _GrabRec { GrabPtr next; /* for chain of passive grabs */ XID resource; @@ -119,6 +135,7 @@ typedef struct _GrabRec { WindowPtr confineTo; /* always NULL for keyboards */ CursorPtr cursor; /* always NULL for keyboards */ Mask eventMask; + GenericMaskPtr genericMasks; /* null terminated list */ } GrabRec; typedef struct _KeyClassRec { diff --git a/include/misc.h b/include/misc.h index 2be1d66a6..05c3dff45 100644 --- a/include/misc.h +++ b/include/misc.h @@ -243,6 +243,7 @@ typedef struct _Box *BoxPtr; typedef struct _xEvent *xEventPtr; typedef struct _xRectangle *xRectanglePtr; typedef struct _GrabRec *GrabPtr; +typedef struct _GenericMaskRec *GenericMaskPtr; /* typedefs from other places - duplicated here to minimize the amount * of unnecessary junk that one would normally have to include to get From 5c680e94938c16e04a4349715cf11796b80400db Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 14 May 2007 12:34:53 +0930 Subject: [PATCH 115/634] Remove double-grab option. We only want one grab per device. --- Xext/security.c | 7 +- Xi/exevents.c | 12 +- Xi/ungrdev.c | 2 +- dix/devices.c | 21 +-- dix/events.c | 242 +++++++++++++-------------------- hw/xfree86/common/xf86DGA.c | 4 +- hw/xfree86/common/xf86Events.c | 20 +-- include/inputstr.h | 3 +- xkb/xkbEvents.c | 5 +- 9 files changed, 121 insertions(+), 195 deletions(-) diff --git a/Xext/security.c b/Xext/security.c index 18ab496b9..715bc31d1 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -822,13 +822,10 @@ CALLBACK(SecurityCheckDeviceAccess) untrusted_got_event = FALSE; found_event_window = FALSE; - /* We can just use coreGrab as a comment a few lines above clearly states - "device security other than keyboard is not implemented yet". The core - kbd should never have a device grab set. */ - if (dev->coreGrab.grab) + if (dev->deviceGrab.grab) { untrusted_got_event = - (TRUSTLEVEL(rClient(dev->coreGrab.grab)) != XSecurityClientTrusted); + (TRUSTLEVEL(rClient(dev->deviceGrab.grab)) != XSecurityClientTrusted); } else { diff --git a/Xi/exevents.c b/Xi/exevents.c index 2ecec968d..98c28851c 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -100,16 +100,14 @@ RegisterOtherDevice(DeviceIntPtr device) { device->public.processInputProc = ProcessOtherEvent; device->public.realInputProc = ProcessOtherEvent; - (device)->deviceGrab.ActivateGrab = ActivateKeyboardGrab; - (device)->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; if (DeviceIsPointerType(device)) { - (device)->coreGrab.ActivateGrab = ActivatePointerGrab; - (device)->coreGrab.DeactivateGrab = DeactivatePointerGrab; - } else + (device)->deviceGrab.ActivateGrab = ActivatePointerGrab; + (device)->deviceGrab.DeactivateGrab = DeactivatePointerGrab; + } else { - (device)->coreGrab.ActivateGrab = ActivateKeyboardGrab; - (device)->coreGrab.DeactivateGrab = DeactivateKeyboardGrab; + (device)->deviceGrab.ActivateGrab = ActivateKeyboardGrab; + (device)->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; } } diff --git a/Xi/ungrdev.c b/Xi/ungrdev.c index b2b71694d..e056ce688 100644 --- a/Xi/ungrdev.c +++ b/Xi/ungrdev.c @@ -111,7 +111,7 @@ ProcXUngrabDevice(ClientPtr client) time = ClientTimeToServerTime(stuff->time); if ((CompareTimeStamps(time, currentTime) != LATER) && (CompareTimeStamps(time, dev->deviceGrab.grabTime) != EARLIER) && - (grab) && SameClient(grab, client)) + (grab) && SameClient(grab, client) && !grab->coreGrab) (*dev->deviceGrab.DeactivateGrab) (dev); return Success; } diff --git a/dix/devices.c b/dix/devices.c index d66364909..ac35fe68c 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -126,16 +126,6 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart) dev->deviceProc = deviceProc; dev->startup = autoStart; - /* core grab defaults */ - dev->coreGrab.sync.frozen = FALSE; - dev->coreGrab.sync.other = NullGrab; - dev->coreGrab.sync.state = NOT_GRABBED; - dev->coreGrab.sync.event = (xEvent *) NULL; - dev->coreGrab.sync.evcount = 0; - dev->coreGrab.grab = NullGrab; - dev->coreGrab.grabTime = currentTime; - dev->coreGrab.fromPassiveGrab = FALSE; - /* device grab defaults */ dev->deviceGrab.sync.frozen = FALSE; dev->deviceGrab.sync.other = NullGrab; @@ -438,8 +428,8 @@ InitCoreDevices(void) dev->public.processInputProc = ProcessKeyboardEvent; dev->public.realInputProc = ProcessKeyboardEvent; #endif - dev->coreGrab.ActivateGrab = ActivateKeyboardGrab; - dev->coreGrab.DeactivateGrab = DeactivateKeyboardGrab; + dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab; + dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; dev->coreEvents = FALSE; dev->spriteInfo->spriteOwner = FALSE; if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) @@ -464,8 +454,8 @@ InitCoreDevices(void) dev->public.processInputProc = ProcessPointerEvent; dev->public.realInputProc = ProcessPointerEvent; #endif - dev->coreGrab.ActivateGrab = ActivatePointerGrab; - dev->coreGrab.DeactivateGrab = DeactivatePointerGrab; + dev->deviceGrab.ActivateGrab = ActivatePointerGrab; + dev->deviceGrab.DeactivateGrab = DeactivatePointerGrab; dev->coreEvents = FALSE; dev->spriteInfo->spriteOwner = TRUE; if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) @@ -663,7 +653,6 @@ CloseDevice(DeviceIntPtr dev) if (dev->devPrivates) xfree(dev->devPrivates); - xfree(dev->coreGrab.sync.event); xfree(dev->deviceGrab.sync.event); xfree(dev->spriteInfo); xfree(dev); @@ -2030,7 +2019,7 @@ ProcGetPointerControl(ClientPtr client) void MaybeStopHint(DeviceIntPtr dev, ClientPtr client) { - GrabPtr grab = dev->coreGrab.grab; + GrabPtr grab = dev->deviceGrab.grab; if ((grab && SameClient(grab, client) && ((grab->eventMask & PointerMotionHintMask) || diff --git a/dix/events.c b/dix/events.c index 415db6e3e..1d9417da2 100644 --- a/dix/events.c +++ b/dix/events.c @@ -539,7 +539,7 @@ XineramaCheckVirtualMotion( pSprite->hot.pScreen = qe->pScreen; /* should always be Screen 0 */ pSprite->hot.x = qe->event->u.keyButtonPointer.rootX; pSprite->hot.y = qe->event->u.keyButtonPointer.rootY; - pWin = pDev->coreGrab.grab ? pDev->coreGrab.grab->confineTo : + pWin = pDev->deviceGrab.grab ? pDev->deviceGrab.grab->confineTo : NullWindow; } if (pWin) @@ -862,7 +862,7 @@ CheckVirtualMotion( pSprite->hot.pScreen = qe->pScreen; pSprite->hot.x = qe->event->u.keyButtonPointer.rootX; pSprite->hot.y = qe->event->u.keyButtonPointer.rootY; - pWin = pDev->coreGrab.grab ? pDev->coreGrab.grab->confineTo : NullWindow; + pWin = pDev->deviceGrab.grab ? pDev->deviceGrab.grab->confineTo : NullWindow; } if (pWin) { @@ -991,7 +991,7 @@ static void PostNewCursor(DeviceIntPtr pDev) { WindowPtr win; - GrabPtr grab = pDev->coreGrab.grab; + GrabPtr grab = pDev->deviceGrab.grab; SpritePtr pSprite = pDev->spriteInfo->sprite; CursorPtr pCursor; @@ -1197,7 +1197,7 @@ PlayReleasedEvents(void) prev = &syncEvents.pending; while ( (qe = *prev) ) { - if (!qe->device->coreGrab.sync.frozen) + if (!qe->device->deviceGrab.sync.frozen) { *prev = qe->next; pDev = qe->device; @@ -1223,7 +1223,7 @@ PlayReleasedEvents(void) (*qe->device->public.processInputProc)(qe->event, qe->device, qe->evcount); xfree(qe); - for (dev = inputInfo.devices; dev && dev->coreGrab.sync.frozen; dev = dev->next) + for (dev = inputInfo.devices; dev && dev->deviceGrab.sync.frozen; dev = dev->next) ; if (!dev) break; @@ -1239,7 +1239,7 @@ PlayReleasedEvents(void) static void FreezeThaw(DeviceIntPtr dev, Bool frozen) { - dev->coreGrab.sync.frozen = frozen; + dev->deviceGrab.sync.frozen = frozen; if (frozen) dev->public.processInputProc = dev->public.enqueueInputProc; else @@ -1258,15 +1258,15 @@ ComputeFreezes(void) DeviceIntPtr dev; for (dev = inputInfo.devices; dev; dev = dev->next) - FreezeThaw(dev, dev->coreGrab.sync.other || - (dev->coreGrab.sync.state >= FROZEN)); + FreezeThaw(dev, dev->deviceGrab.sync.other || + (dev->deviceGrab.sync.state >= FROZEN)); if (syncEvents.playingEvents || (!replayDev && !syncEvents.pending)) return; syncEvents.playingEvents = TRUE; if (replayDev) { - xE = replayDev->coreGrab.sync.event; - count = replayDev->coreGrab.sync.evcount; + xE = replayDev->deviceGrab.sync.event; + count = replayDev->deviceGrab.sync.evcount; syncEvents.replayDev = (DeviceIntPtr)NULL; w = XYToWindow(replayDev, XE_KBPTR.rootX, XE_KBPTR.rootY); @@ -1294,7 +1294,7 @@ ComputeFreezes(void) playmore: for (dev = inputInfo.devices; dev; dev = dev->next) { - if (!dev->coreGrab.sync.frozen) + if (!dev->deviceGrab.sync.frozen) { PlayReleasedEvents(); break; @@ -1307,7 +1307,7 @@ playmore: { /* the following may have been skipped during replay, so do it now */ - if ((grab = dev->coreGrab.grab) && grab->confineTo) + if ((grab = dev->deviceGrab.grab) && grab->confineTo) { if (grab->confineTo->drawable.pScreen != dev->spriteInfo->sprite->hotPhys.pScreen) @@ -1336,7 +1336,7 @@ ScreenRestructured (ScreenPtr pScreen) /* GrabDevice doesn't have a confineTo field, so we don't need to * worry about it. */ - if ((grab = pDev->coreGrab.grab) && grab->confineTo) + if ((grab = pDev->deviceGrab.grab) && grab->confineTo) { if (grab->confineTo->drawable.pScreen != pDev->spriteInfo->sprite->hotPhys.pScreen) @@ -1354,31 +1354,31 @@ ScreenRestructured (ScreenPtr pScreen) void CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode) { - GrabPtr grab = thisDev->coreGrab.grab; + GrabPtr grab = thisDev->deviceGrab.grab; DeviceIntPtr dev; if (thisMode == GrabModeSync) - thisDev->coreGrab.sync.state = FROZEN_NO_EVENT; + thisDev->deviceGrab.sync.state = FROZEN_NO_EVENT; else { /* free both if same client owns both */ - thisDev->coreGrab.sync.state = THAWED; - if (thisDev->coreGrab.sync.other && - (CLIENT_BITS(thisDev->coreGrab.sync.other->resource) == + thisDev->deviceGrab.sync.state = THAWED; + if (thisDev->deviceGrab.sync.other && + (CLIENT_BITS(thisDev->deviceGrab.sync.other->resource) == CLIENT_BITS(grab->resource))) - thisDev->coreGrab.sync.other = NullGrab; + thisDev->deviceGrab.sync.other = NullGrab; } for (dev = inputInfo.devices; dev; dev = dev->next) { if (dev != thisDev) { if (otherMode == GrabModeSync) - dev->coreGrab.sync.other = grab; + dev->deviceGrab.sync.other = grab; else { /* free both if same client owns both */ - if (dev->coreGrab.sync.other && - (CLIENT_BITS(dev->coreGrab.sync.other->resource) == + if (dev->deviceGrab.sync.other && + (CLIENT_BITS(dev->deviceGrab.sync.other->resource) == CLIENT_BITS(grab->resource))) - dev->coreGrab.sync.other = NullGrab; + dev->deviceGrab.sync.other = NullGrab; } } } @@ -1402,8 +1402,7 @@ void ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, TimeStamp time, Bool autoGrab) { - GrabInfoPtr grabinfo = - (grab->coreGrab) ? &mouse->coreGrab : &mouse->deviceGrab; + GrabInfoPtr grabinfo = &mouse->deviceGrab; WindowPtr oldWin = (grabinfo->grab) ? grabinfo->grab->window : mouse->spriteInfo->sprite->win; @@ -1440,17 +1439,17 @@ ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, void DeactivatePointerGrab(DeviceIntPtr mouse) { - GrabPtr grab = mouse->coreGrab.grab; + GrabPtr grab = mouse->deviceGrab.grab; DeviceIntPtr dev; mouse->valuator->motionHintWindow = NullWindow; - mouse->coreGrab.grab = NullGrab; - mouse->coreGrab.sync.state = NOT_GRABBED; - mouse->coreGrab.fromPassiveGrab = FALSE; + mouse->deviceGrab.grab = NullGrab; + mouse->deviceGrab.sync.state = NOT_GRABBED; + mouse->deviceGrab.fromPassiveGrab = FALSE; for (dev = inputInfo.devices; dev; dev = dev->next) { - if (dev->coreGrab.sync.other == grab) - dev->coreGrab.sync.other = NullGrab; + if (dev->deviceGrab.sync.other == grab) + dev->deviceGrab.sync.other = NullGrab; } DoEnterLeaveEvents(mouse, grab->window, mouse->spriteInfo->sprite->win, NotifyUngrab); @@ -1470,8 +1469,7 @@ DeactivatePointerGrab(DeviceIntPtr mouse) void ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool passive) { - GrabInfoPtr grabinfo = - (grab->coreGrab) ? &keybd->coreGrab : &keybd->deviceGrab; + GrabInfoPtr grabinfo = &keybd->deviceGrab; WindowPtr oldWin; if (grabinfo->grab) @@ -1501,7 +1499,7 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool pass void DeactivateKeyboardGrab(DeviceIntPtr keybd) { - GrabPtr grab = keybd->coreGrab.grab; + GrabPtr grab = keybd->deviceGrab.grab; DeviceIntPtr dev; WindowPtr focusWin = keybd->focus ? keybd->focus->win : keybd->spriteInfo->sprite->win; @@ -1513,20 +1511,20 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd) focusWin = inputInfo.keyboard->focus->win; if (keybd->valuator) keybd->valuator->motionHintWindow = NullWindow; - keybd->coreGrab.grab = NullGrab; - keybd->coreGrab.sync.state = NOT_GRABBED; - keybd->coreGrab.fromPassiveGrab = FALSE; + keybd->deviceGrab.grab = NullGrab; + keybd->deviceGrab.sync.state = NOT_GRABBED; + keybd->deviceGrab.fromPassiveGrab = FALSE; for (dev = inputInfo.devices; dev; dev = dev->next) { - if (dev->coreGrab.sync.other == grab) - dev->coreGrab.sync.other = NullGrab; + if (dev->deviceGrab.sync.other == grab) + dev->deviceGrab.sync.other = NullGrab; } DoFocusEvents(keybd, grab->window, focusWin, NotifyUngrab); ComputeFreezes(); } /* - * Core flag decides whether to work on the coreGrab or deviceGrab sync + * Core flag decides whether to work on the deviceGrab or deviceGrab sync * fields. */ void @@ -1540,7 +1538,7 @@ AllowSome(ClientPtr client, TimeStamp grabTime; DeviceIntPtr dev; GrabInfoPtr devgrabinfo, - grabinfo = (core) ? &thisDev->coreGrab : &thisDev->deviceGrab; + grabinfo = (core) ? &thisDev->deviceGrab : &thisDev->deviceGrab; thisGrabbed = grabinfo->grab && SameClient(grabinfo->grab, client); thisSynced = FALSE; @@ -1549,7 +1547,7 @@ AllowSome(ClientPtr client, grabTime = grabinfo->grabTime; for (dev = inputInfo.devices; dev; dev = dev->next) { - devgrabinfo = (core) ? &dev->coreGrab : &dev->deviceGrab; + devgrabinfo = (core) ? &dev->deviceGrab : &dev->deviceGrab; if (dev == thisDev) continue; @@ -1595,7 +1593,7 @@ AllowSome(ClientPtr client, { for (dev = inputInfo.devices; dev; dev = dev->next) { - devgrabinfo = (core) ? &dev->coreGrab : &dev->deviceGrab; + devgrabinfo = (core) ? &dev->deviceGrab : &dev->deviceGrab; if (devgrabinfo->grab && SameClient(devgrabinfo->grab, client)) devgrabinfo->sync.state = THAWED; @@ -1611,7 +1609,7 @@ AllowSome(ClientPtr client, { for (dev = inputInfo.devices; dev; dev = dev->next) { - devgrabinfo = (core) ? &dev->coreGrab : &dev->deviceGrab; + devgrabinfo = (core) ? &dev->deviceGrab : &dev->deviceGrab; if (devgrabinfo->grab && SameClient(devgrabinfo->grab, client)) devgrabinfo->sync.state = FREEZE_BOTH_NEXT_EVENT; @@ -1640,7 +1638,7 @@ AllowSome(ClientPtr client, { if (dev == thisDev) continue; - devgrabinfo = (core) ? &dev->coreGrab : &dev->deviceGrab; + devgrabinfo = (core) ? &dev->deviceGrab : &dev->deviceGrab; if (devgrabinfo->grab && SameClient(devgrabinfo->grab, client)) devgrabinfo->sync.state = THAWED; @@ -1718,9 +1716,9 @@ ReleaseActiveGrabs(ClientPtr client) done = TRUE; for (dev = inputInfo.devices; dev; dev = dev->next) { - if (dev->coreGrab.grab && SameClient(dev->coreGrab.grab, client)) + if (dev->deviceGrab.grab && SameClient(dev->deviceGrab.grab, client)) { - (*dev->coreGrab.DeactivateGrab)(dev); + (*dev->deviceGrab.DeactivateGrab)(dev); done = FALSE; } @@ -1979,7 +1977,8 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent tempGrab.confineTo = NullWindow; tempGrab.cursor = NullCursor; tempGrab.coreGrab = True; - (*inputInfo.pointer->coreGrab.ActivateGrab)(pDev, &tempGrab, + tempGrab.genericMasks = NULL; + (*inputInfo.pointer->deviceGrab.ActivateGrab)(pDev, &tempGrab, currentTime, TRUE); } else if ((type == MotionNotify) && deliveries) @@ -2522,7 +2521,7 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) REGION_TRANSLATE(pSprite->screen, &pSprite->Reg2, xoff, yoff); /* FIXME: if we call ConfineCursorToWindow, must we do anything else? */ - if ((grab = pDev->coreGrab.grab) && grab->confineTo) { + if ((grab = pDev->deviceGrab.grab) && grab->confineTo) { if (grab->confineTo->drawable.pScreen != pSprite->hotPhys.pScreen) pSprite->hotPhys.x = pSprite->hotPhys.y = 0; @@ -3015,7 +3014,7 @@ CheckPassiveGrabsOnWindow( } #endif grabinfo = (xE->u.u.type & EXTENSION_EVENT_BASE) ? - &device->deviceGrab : &device->coreGrab; + &device->deviceGrab : &device->deviceGrab; (*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE); FixUpEventFromWindow(device, xE, grab->window, None, TRUE); @@ -3165,7 +3164,7 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, if (xE->u.u.type & EXTENSION_EVENT_BASE || xE->u.u.type == GenericEvent) grabinfo = &thisDev->deviceGrab; else - grabinfo = &thisDev->coreGrab; + grabinfo = &thisDev->deviceGrab; grab = grabinfo->grab; @@ -3338,7 +3337,7 @@ drawable.id:0; if (xE->u.u.type & EXTENSION_EVENT_BASE) grabinfo = &keybd->deviceGrab; else - grabinfo = &keybd->coreGrab; + grabinfo = &keybd->deviceGrab; grab = grabinfo->grab; @@ -3501,7 +3500,7 @@ CoreProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) #endif { - GrabPtr grab = mouse->coreGrab.grab; + GrabPtr grab = mouse->deviceGrab.grab; Bool deactivateGrab = FALSE; ButtonClassPtr butc = mouse->button; SpritePtr pSprite = mouse->spriteInfo->sprite; @@ -3588,7 +3587,7 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) if (xE->u.u.detail <= 5) butc->state &= ~((Button1Mask >> 1) << xE->u.u.detail); filters[MotionNotify] = Motion_Filter(butc); - if (!butc->state && mouse->coreGrab.fromPassiveGrab) + if (!butc->state && mouse->deviceGrab.fromPassiveGrab) deactivateGrab = TRUE; break; default: @@ -3603,7 +3602,7 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) DeliverDeviceEvents(pSprite->win, xE, NullGrab, NullWindow, mouse, count); if (deactivateGrab) - (*mouse->coreGrab.DeactivateGrab)(mouse); + (*mouse->deviceGrab.DeactivateGrab)(mouse); } #define AtMostOneClient \ @@ -3757,7 +3756,7 @@ maskSet: if ((inputInfo.pointer->valuator->motionHintWindow == pWin) && (mask & PointerMotionHintMask) && !(check & PointerMotionHintMask) && - !inputInfo.pointer->coreGrab.grab) /* VCP shouldn't have deviceGrab */ + !inputInfo.pointer->deviceGrab.grab) /* VCP shouldn't have deviceGrab */ inputInfo.pointer->valuator->motionHintWindow = NullWindow; RecalculateDeliverableEvents(pWin); return Success; @@ -3848,7 +3847,7 @@ EnterLeaveEvent( xEvent event; WindowPtr focus; DeviceIntPtr keybd; - GrabPtr grab = mouse->coreGrab.grab; + GrabPtr grab = mouse->deviceGrab.grab; GrabPtr devgrab = mouse->deviceGrab.grab; Mask mask; int* inWindow; /* no of sprites inside pWin */ @@ -4401,7 +4400,7 @@ SetInputFocus( if ((CompareTimeStamps(time, currentTime) == LATER) || (CompareTimeStamps(time, focus->time) == EARLIER)) return Success; - mode = (dev->coreGrab.grab) ? NotifyWhileGrabbed : NotifyNormal; + mode = (dev->deviceGrab.grab) ? NotifyWhileGrabbed : NotifyNormal; if (focus->win == FollowKeyboardWin) DoFocusEvents(dev, keybd->focus->win, focusWin, mode); else @@ -4556,7 +4555,7 @@ ProcGrabPointer(ClientPtr client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.length = 0; - grab = device->coreGrab.grab; + grab = device->deviceGrab.grab; if ((grab) && !SameClient(grab, client)) rep.status = AlreadyGrabbed; else if ((!pWin->realized) || @@ -4564,12 +4563,12 @@ ProcGrabPointer(ClientPtr client) !(confineTo->realized && BorderSizeNotEmpty(device, confineTo)))) rep.status = GrabNotViewable; - else if (device->coreGrab.sync.frozen && - device->coreGrab.sync.other && - !SameClient(device->coreGrab.sync.other, client)) + else if (device->deviceGrab.sync.frozen && + device->deviceGrab.sync.other && + !SameClient(device->deviceGrab.sync.other, client)) rep.status = GrabFrozen; else if ((CompareTimeStamps(time, currentTime) == LATER) || - (CompareTimeStamps(time, device->coreGrab.grabTime) == EARLIER)) + (CompareTimeStamps(time, device->deviceGrab.grabTime) == EARLIER)) rep.status = GrabInvalidTime; else { @@ -4592,7 +4591,8 @@ ProcGrabPointer(ClientPtr client) tempGrab.pointerMode = stuff->pointerMode; tempGrab.device = device; tempGrab.coreGrab = True; - (*device->coreGrab.ActivateGrab)(device, &tempGrab, time, FALSE); + tempGrab.genericMasks = NULL; + (*device->deviceGrab.ActivateGrab)(device, &tempGrab, time, FALSE); if (oldCursor) FreeCursor (oldCursor, (Cursor)0); rep.status = GrabSuccess; @@ -4613,7 +4613,7 @@ int ProcChangeActivePointerGrab(ClientPtr client) { DeviceIntPtr device = PickPointer(client); - GrabPtr grab = device->coreGrab.grab; + GrabPtr grab = device->deviceGrab.grab; CursorPtr newCursor, oldCursor; REQUEST(xChangeActivePointerGrabReq); TimeStamp time; @@ -4642,7 +4642,7 @@ ProcChangeActivePointerGrab(ClientPtr client) return Success; time = ClientTimeToServerTime(stuff->time); if ((CompareTimeStamps(time, currentTime) == LATER) || - (CompareTimeStamps(time, device->coreGrab.grabTime) == EARLIER)) + (CompareTimeStamps(time, device->deviceGrab.grabTime) == EARLIER)) return Success; oldCursor = grab->cursor; grab->cursor = newCursor; @@ -4670,12 +4670,12 @@ ProcUngrabPointer(ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); UpdateCurrentTime(); - grab = device->coreGrab.grab; + grab = device->deviceGrab.grab; time = ClientTimeToServerTime(stuff->id); if ((CompareTimeStamps(time, currentTime) != LATER) && - (CompareTimeStamps(time, device->coreGrab.grabTime) != EARLIER) && + (CompareTimeStamps(time, device->deviceGrab.grabTime) != EARLIER) && (grab) && SameClient(grab, client)) - (*device->coreGrab.DeactivateGrab)(device); + (*device->deviceGrab.DeactivateGrab)(device); return Success; } @@ -4701,13 +4701,13 @@ int GrabDevice(ClientPtr client, DeviceIntPtr dev, unsigned this_mode, unsigned other_mode, Window grabWindow, unsigned ownerEvents, Time ctime, Mask mask, CARD8 *status, - Bool coreGrab) + Bool deviceGrab) { WindowPtr pWin; GrabPtr grab; TimeStamp time; int rc; - GrabInfoPtr grabInfo = (coreGrab) ? &dev->coreGrab : &dev->deviceGrab; + GrabInfoPtr grabInfo = (deviceGrab) ? &dev->deviceGrab : &dev->deviceGrab; UpdateCurrentTime(); if ((this_mode != GrabModeSync) && (this_mode != GrabModeAsync)) @@ -4755,7 +4755,8 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, tempGrab.eventMask = mask; tempGrab.device = dev; tempGrab.cursor = NULL; - tempGrab.coreGrab = coreGrab; + tempGrab.coreGrab = deviceGrab; + tempGrab.genericMasks = NULL; (*grabInfo->ActivateGrab)(dev, &tempGrab, time, FALSE); *status = GrabSuccess; @@ -4812,12 +4813,12 @@ ProcUngrabKeyboard(ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); UpdateCurrentTime(); - grab = device->coreGrab.grab; + grab = device->deviceGrab.grab; time = ClientTimeToServerTime(stuff->id); if ((CompareTimeStamps(time, currentTime) != LATER) && - (CompareTimeStamps(time, device->coreGrab.grabTime) != EARLIER) && - (grab) && SameClient(grab, client)) - (*device->coreGrab.DeactivateGrab)(device); + (CompareTimeStamps(time, device->deviceGrab.grabTime) != EARLIER) && + (grab) && SameClient(grab, client) && grab->coreGrab) + (*device->deviceGrab.DeactivateGrab)(device); return Success; } @@ -5282,23 +5283,23 @@ DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) /* Deactivate any grabs performed on this window, before making any input focus changes. */ - grab = mouse->coreGrab.grab; + grab = mouse->deviceGrab.grab; if (grab && ((grab->window == pWin) || (grab->confineTo == pWin))) - (*mouse->coreGrab.DeactivateGrab)(mouse); + (*mouse->deviceGrab.DeactivateGrab)(mouse); /* Deactivating a keyboard grab should cause focus events. */ - grab = keybd->coreGrab.grab; + grab = keybd->deviceGrab.grab; if (grab && (grab->window == pWin)) - (*keybd->coreGrab.DeactivateGrab)(keybd); + (*keybd->deviceGrab.DeactivateGrab)(keybd); /* And now the real devices */ for (mouse = inputInfo.devices; mouse; mouse = mouse->next) { - grab = mouse->coreGrab.grab; + grab = mouse->deviceGrab.grab; if (grab && ((grab->window == pWin) || (grab->confineTo == pWin))) - (*mouse->coreGrab.DeactivateGrab)(mouse); + (*mouse->deviceGrab.DeactivateGrab)(mouse); } @@ -5317,7 +5318,7 @@ DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) /* If a grab is in progress, then alter the mode of focus events. */ - if (keybd->coreGrab.grab) + if (keybd->deviceGrab.grab) focusEventMode = NotifyWhileGrabbed; switch (focus->revert) @@ -5398,11 +5399,11 @@ CheckCursorConfinement(WindowPtr pWin) { if (DevHasCursor(pDev)) { - grab = pDev->coreGrab.grab; + grab = pDev->deviceGrab.grab; if (grab && (confineTo = grab->confineTo)) { if (!BorderSizeNotEmpty(pDev, confineTo)) - (*inputInfo.pointer->coreGrab.DeactivateGrab)(pDev); + (*inputInfo.pointer->deviceGrab.DeactivateGrab)(pDev); else if ((pWin == confineTo) || IsParent(pWin, confineTo)) ConfineCursorToWindow(pDev, confineTo, TRUE, TRUE); } @@ -5683,7 +5684,7 @@ IsInterferingGrab(ClientPtr client, WindowPtr win, DeviceIntPtr dev, xEvent* eve DeviceIntPtr it; Bool mayInterfere = FALSE; - if (dev->coreGrab.grab && SameClient(dev->coreGrab.grab, client)) + if (dev->deviceGrab.grab && SameClient(dev->deviceGrab.grab, client)) return FALSE; switch(event->u.u.type) @@ -5705,7 +5706,7 @@ IsInterferingGrab(ClientPtr client, WindowPtr win, DeviceIntPtr dev, xEvent* eve { if (it != dev) { - if (it->coreGrab.grab && SameClient(it->coreGrab.grab, client)) + if (it->deviceGrab.grab && SameClient(it->deviceGrab.grab, client)) { /* there's a client with a grab on some device. * if we're delivering to the very same window that is @@ -5713,7 +5714,7 @@ IsInterferingGrab(ClientPtr client, WindowPtr win, DeviceIntPtr dev, xEvent* eve WindowPtr parent = win; while(parent) { - if (it->coreGrab.grab->window == parent) + if (it->deviceGrab.grab->window == parent) return FALSE; parent = parent->parent; } @@ -5742,11 +5743,10 @@ SetGenericFilter(int extension, Mask* filters) /** - * Grab a device properly. + * Grab a device for core events, XI events or XGE events. * - * grabmode decides if the grab should be for core events and/or XI device - * events. The latter also applies to generic events. - * grabmode is also used to ungrab a device. + * The latter also applies to generic events. + * grabmode is used to ungrab a device. * * */ @@ -5768,59 +5768,6 @@ ExtGrabDevice(ClientPtr client, GrabRec newGrab; UpdateCurrentTime(); - if (grabmode & CoreOnlyGrab) - { - CursorPtr oldCursor = NullCursor; - - grabinfo = &dev->coreGrab; - - if (grabinfo->grab && !SameClient(grabinfo->grab, client)) - return AlreadyGrabbed; - - if ((!grabWindow->realized) || - (confineTo && !(confineTo->realized && - BorderSizeNotEmpty(dev, confineTo)))) - return GrabNotViewable; - - if (grabinfo->sync.frozen && grabinfo->sync.other && - !SameClient(grabinfo->sync.other, client)) - return GrabFrozen; - - if ((CompareTimeStamps(ctime, currentTime) == LATER) || - (CompareTimeStamps(ctime, grabinfo->grabTime) == EARLIER)) - return GrabInvalidTime; - - if (grabinfo->grab) - { - if (grabinfo->grab->confineTo) - ConfineCursorToWindow(dev, RootWindow(dev), FALSE, FALSE); - oldCursor = dev->coreGrab.grab->cursor; - } - - memset(&newGrab, 0, sizeof(GrabRec)); - newGrab.cursor = cursor; - newGrab.resource = client->clientAsMask; - newGrab.ownerEvents = ownerEvents; - newGrab.confineTo = confineTo; - newGrab.window = grabWindow; - newGrab.coreGrab = True; - newGrab.device = dev; - newGrab.eventMask = core_mask; - if (IsPointerDevice(dev)) - { - newGrab.keyboardMode = GrabModeAsync; - newGrab.pointerMode = device_mode; - } else - { - newGrab.keyboardMode = device_mode; - newGrab.pointerMode = GrabModeAsync; - } - - (*grabinfo->ActivateGrab)(dev, &newGrab, ctime, FALSE); - - if (oldCursor) - FreeCursor(oldCursor, 0); - } if (grabmode & DeviceOnlyGrab) { @@ -5883,10 +5830,7 @@ ExtGrabDevice(ClientPtr client, if (grabmode & UngrabAll) { - if (grabmode & UngrabCoreOnly) - grabinfo = &dev->coreGrab; - else - grabinfo = &dev->deviceGrab; + grabinfo = &dev->deviceGrab; if (grabinfo->grab && SameClient(grabinfo->grab, client)) (*grabinfo->DeactivateGrab)(dev); } diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index 83dffa1c6..074c1c704 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c @@ -1114,7 +1114,7 @@ DGAProcessKeyboardEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr keybd) else { /* If the keyboard is actively grabbed, deliver a grabbed core event */ - if (keybd->coreGrab.grab && !keybd->coreGrab.fromPassiveGrab) + if (keybd->deviceGrab.grab && !keybd->deviceGrab.fromPassiveGrab) { /* I've got no clue if that is correct but only working on core * grabs seems the right thing here. (whot) */ @@ -1195,7 +1195,7 @@ DGAProcessPointerEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr mouse) else { /* If the pointer is actively grabbed, deliver a grabbed core event */ - if (mouse->coreGrab.grab && !mouse->coreGrab.fromPassiveGrab) + if (mouse->deviceGrab.grab && !mouse->deviceGrab.fromPassiveGrab) { /* I've got no clue if that is correct but only working on core * grabs seems the right thing here. (whot) */ diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 84588996d..a2f7a2c02 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -290,13 +290,13 @@ xf86ProcessActionEvent(ActionEvent action, void *arg) break; case ACTION_DISABLEGRAB: if (!xf86Info.grabInfo.disabled && xf86Info.grabInfo.allowDeactivate) { - if (inputInfo.pointer && inputInfo.pointer->coreGrab.grab != NULL && - inputInfo.pointer->coreGrab.DeactivateGrab) - inputInfo.pointer->coreGrab.DeactivateGrab(inputInfo.pointer); + if (inputInfo.pointer && inputInfo.pointer->deviceGrab.grab != NULL && + inputInfo.pointer->deviceGrab.DeactivateGrab) + inputInfo.pointer->deviceGrab.DeactivateGrab(inputInfo.pointer); if (inputInfo.keyboard && - inputInfo.keyboard->coreGrab.grab != NULL && - inputInfo.keyboard->coreGrab.DeactivateGrab) - inputInfo.keyboard->coreGrab.DeactivateGrab(inputInfo.keyboard); + inputInfo.keyboard->deviceGrab.grab != NULL && + inputInfo.keyboard->deviceGrab.DeactivateGrab) + inputInfo.keyboard->deviceGrab.DeactivateGrab(inputInfo.keyboard); } break; case ACTION_CLOSECLIENT: @@ -304,11 +304,11 @@ xf86ProcessActionEvent(ActionEvent action, void *arg) ClientPtr pointer, keyboard, server; pointer = keyboard = server = NULL; - if (inputInfo.pointer && inputInfo.pointer->coreGrab.grab != NULL) - pointer = clients[CLIENT_ID(inputInfo.pointer->coreGrab.grab->resource)]; - if (inputInfo.keyboard && inputInfo.keyboard->coreGrab.grab != NULL) + if (inputInfo.pointer && inputInfo.pointer->deviceGrab.grab != NULL) + pointer = clients[CLIENT_ID(inputInfo.pointer->deviceGrab.grab->resource)]; + if (inputInfo.keyboard && inputInfo.keyboard->deviceGrab.grab != NULL) { - keyboard = clients[CLIENT_ID(inputInfo.keyboard->coreGrab.grab->resource)]; + keyboard = clients[CLIENT_ID(inputInfo.keyboard->deviceGrab.grab->resource)]; if (keyboard == pointer) keyboard = NULL; } diff --git a/include/inputstr.h b/include/inputstr.h index 837afaa44..a53588461 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -371,8 +371,7 @@ typedef struct _DeviceIntRec { Bool inited; /* TRUE if INIT returns Success */ Bool enabled; /* TRUE if ON returns Success */ Bool coreEvents; /* TRUE if device also sends core */ - GrabInfoRec coreGrab; /* grab on core events */ - GrabInfoRec deviceGrab; /* grab on device events */ + GrabInfoRec deviceGrab; /* grab on the device */ Atom type; char *name; CARD8 id; diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c index 1e5a43b1b..973e1ad1d 100644 --- a/xkb/xkbEvents.c +++ b/xkb/xkbEvents.c @@ -832,9 +832,8 @@ GrabInfoPtr grabinfo; (_XkbIsReleaseEvent(xE[0].u.u.type)) ) { return False; } - /* just coreGrab is fine, pXDev is inputInfo.keyboard (see above) */ - if ((pXDev->coreGrab.grab != NullGrab) - && pXDev->coreGrab.fromPassiveGrab && + if ((pXDev->deviceGrab.grab != NullGrab) + && pXDev->deviceGrab.fromPassiveGrab && ((xE[0].u.u.type==KeyPress)||(xE[0].u.u.type==KeyRelease))) { register unsigned state,flags; From 81fc6a128b64ad412064405ed45db0175398e3f0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 14 May 2007 18:12:56 +0930 Subject: [PATCH 116/634] Add ungrab support to ExtendedGrabDeviceRequest handling. Polish the code a bit. --- Xi/extgrbdev.c | 49 ++++++++++++------- dix/events.c | 126 +++++++++++++++++++++++-------------------------- include/dix.h | 5 +- 3 files changed, 93 insertions(+), 87 deletions(-) diff --git a/Xi/extgrbdev.c b/Xi/extgrbdev.c index 0f0fd30f0..35756014b 100644 --- a/Xi/extgrbdev.c +++ b/Xi/extgrbdev.c @@ -45,12 +45,15 @@ from the author. #include "scrnintstr.h" /* screen structure */ #include #include +#include #include "gestr.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" #include "exglobals.h" +#include "grabdev.h" /* CreateMaskFromList */ + #include "extgrbdev.h" int @@ -68,9 +71,8 @@ SProcXExtendedGrabDevice(ClientPtr client) swapl(&stuff->time, n); swapl(&stuff->confine_to, n); swapl(&stuff->cursor, n); - swaps(&stuff->event_mask, n); swaps(&stuff->event_count, n); - swaps(&stuff->ge_event_count, n); + swaps(&stuff->generic_event_count, n); p = (long *)&stuff[1]; for (i = 0; i < stuff->event_count; i++) { @@ -78,7 +80,7 @@ SProcXExtendedGrabDevice(ClientPtr client) p++; } - for (i = 0; i < stuff->ge_event_count; i++) { + for (i = 0; i < stuff->generic_event_count; i++) { p++; /* first 4 bytes are extension type and padding */ swapl(p, n); p++; @@ -93,7 +95,7 @@ ProcXExtendedGrabDevice(ClientPtr client) { xExtendedGrabDeviceReply rep; DeviceIntPtr dev; - int err, + int err = Success, errval = 0, i; WindowPtr grab_window, @@ -101,14 +103,25 @@ ProcXExtendedGrabDevice(ClientPtr client) CursorPtr cursor = NULL; struct tmask tmp[EMASKSIZE]; TimeStamp time; - XgeEventMask* xgeMask; + XGenericEventMask* xgeMask; GenericMaskPtr gemasks = NULL; REQUEST(xExtendedGrabDeviceReq); REQUEST_AT_LEAST_SIZE(xExtendedGrabDeviceReq); - if (stuff->length != (sizeof(xExtendedGrabDeviceReq) >> 2) + - stuff->event_count + 2 * stuff->ge_event_count) + if (stuff->ungrab) + { + REQUEST_SIZE_MATCH(xExtendedGrabDeviceReq); + } + + rep.repType = X_Reply; + rep.RepType = X_ExtendedGrabDevice; + rep.sequenceNumber = client->sequence; + rep.length = 0; + + if (!stuff->ungrab && /* other fields are undefined for ungrab */ + (stuff->length != (sizeof(xExtendedGrabDeviceReq) >> 2) + + stuff->event_count + 2 * stuff->generic_event_count)) { errval = 0; err = BadLength; @@ -122,6 +135,13 @@ ProcXExtendedGrabDevice(ClientPtr client) goto cleanup; } + + if (stuff->ungrab) + { + ExtUngrabDevice(client, dev); + goto cleanup; + } + err = dixLookupWindow(&grab_window, stuff->grab_window, client, @@ -159,11 +179,6 @@ ProcXExtendedGrabDevice(ClientPtr client) } } - rep.repType = X_Reply; - rep.RepType = X_ExtendedGrabDevice; - rep.sequenceNumber = client->sequence; - rep.length = 0; - if (CreateMaskFromList(client, (XEventClass*)&stuff[1], stuff->event_count, @@ -174,10 +189,10 @@ ProcXExtendedGrabDevice(ClientPtr client) time = ClientTimeToServerTime(stuff->time); - if (stuff->ge_event_count) + if (stuff->generic_event_count) { xgeMask = - (XgeEventMask*)(((XEventClass*)&stuff[1]) + stuff->event_count); + (XGenericEventMask*)(((XEventClass*)&stuff[1]) + stuff->event_count); gemasks = xcalloc(1, sizeof(GenericMaskRec)); gemasks->extension = xgeMask->extension; @@ -185,7 +200,7 @@ ProcXExtendedGrabDevice(ClientPtr client) gemasks->next = NULL; xgeMask++; - for (i = 1; i < stuff->ge_event_count; i++, xgeMask++) + for (i = 1; i < stuff->generic_event_count; i++, xgeMask++) { gemasks->next = xcalloc(1, sizeof(GenericMaskRec)); gemasks = gemasks->next; @@ -195,9 +210,9 @@ ProcXExtendedGrabDevice(ClientPtr client) } } - ExtGrabDevice(client, dev, stuff->grabmode, stuff->device_mode, + ExtGrabDevice(client, dev, stuff->device_mode, grab_window, confineTo, time, stuff->owner_events, - cursor, stuff->event_mask, tmp[stuff->deviceid].mask, + cursor, tmp[stuff->deviceid].mask, gemasks); if (err != Success) { diff --git a/dix/events.c b/dix/events.c index 1d9417da2..30deeb6d4 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3161,11 +3161,7 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, xEvent *dxE; SpritePtr pSprite = thisDev->spriteInfo->sprite; - if (xE->u.u.type & EXTENSION_EVENT_BASE || xE->u.u.type == GenericEvent) - grabinfo = &thisDev->deviceGrab; - else - grabinfo = &thisDev->deviceGrab; - + grabinfo = &thisDev->deviceGrab; grab = grabinfo->grab; if (grab->ownerEvents) @@ -5743,24 +5739,18 @@ SetGenericFilter(int extension, Mask* filters) /** - * Grab a device for core events, XI events or XGE events. - * - * The latter also applies to generic events. + * Grab a device for XI events and XGE events. * grabmode is used to ungrab a device. - * - * */ _X_EXPORT int ExtGrabDevice(ClientPtr client, DeviceIntPtr dev, - int grabmode, int device_mode, WindowPtr grabWindow, WindowPtr confineTo, TimeStamp ctime, Bool ownerEvents, CursorPtr cursor, - Mask core_mask, Mask xi_mask, GenericMaskPtr ge_masks) { @@ -5769,72 +5759,72 @@ ExtGrabDevice(ClientPtr client, UpdateCurrentTime(); - if (grabmode & DeviceOnlyGrab) - { - grabinfo = &dev->deviceGrab; + grabinfo = &dev->deviceGrab; - if (grabinfo->grab && !SameClient(grabinfo->grab, client)) - return AlreadyGrabbed; + if (grabinfo->grab && !SameClient(grabinfo->grab, client)) + return AlreadyGrabbed; - if (!grabWindow->realized) - return GrabNotViewable; + if (!grabWindow->realized) + return GrabNotViewable; - if ((CompareTimeStamps(ctime, currentTime) == LATER) || + if ((CompareTimeStamps(ctime, currentTime) == LATER) || (CompareTimeStamps(ctime, grabinfo->grabTime) == EARLIER)) - return GrabInvalidTime; + return GrabInvalidTime; - if (grabinfo->sync.frozen && grabinfo->sync.other && - !SameClient(grabinfo->sync.other, client)) - return GrabFrozen; + if (grabinfo->sync.frozen && grabinfo->sync.other && + !SameClient(grabinfo->sync.other, client)) + return GrabFrozen; - memset(&newGrab, 0, sizeof(GrabRec)); - newGrab.window = grabWindow; - newGrab.resource = client->clientAsMask; - newGrab.ownerEvents = ownerEvents; - newGrab.device = dev; - newGrab.cursor = cursor; - newGrab.confineTo = confineTo; - newGrab.eventMask = xi_mask; - newGrab.genericMasks = NULL; + memset(&newGrab, 0, sizeof(GrabRec)); + newGrab.window = grabWindow; + newGrab.resource = client->clientAsMask; + newGrab.ownerEvents = ownerEvents; + newGrab.device = dev; + newGrab.cursor = cursor; + newGrab.confineTo = confineTo; + newGrab.eventMask = xi_mask; + newGrab.genericMasks = NULL; - if (ge_masks) - { - GenericMaskPtr last; - newGrab.genericMasks = xcalloc(1, sizeof(GenericMaskRec)); - *newGrab.genericMasks = *ge_masks; - newGrab.genericMasks->next = NULL; - ge_masks = ge_masks->next; - last = newGrab.genericMasks; - - while(ge_masks) - { - last->next = xcalloc(1, sizeof(GenericMaskRec)); - last = last->next; - *last = *ge_masks; - ge_masks = ge_masks->next; - } - } - - if (IsPointerDevice(dev)) - { - newGrab.keyboardMode = GrabModeAsync; - newGrab.pointerMode = device_mode; - } else - { - newGrab.keyboardMode = device_mode; - newGrab.pointerMode = GrabModeAsync; - } - - (*grabinfo->ActivateGrab)(dev, &newGrab, ctime, FALSE); - } - - if (grabmode & UngrabAll) + if (ge_masks) { - grabinfo = &dev->deviceGrab; - if (grabinfo->grab && SameClient(grabinfo->grab, client)) - (*grabinfo->DeactivateGrab)(dev); + GenericMaskPtr last; + newGrab.genericMasks = xcalloc(1, sizeof(GenericMaskRec)); + *newGrab.genericMasks = *ge_masks; + newGrab.genericMasks->next = NULL; + ge_masks = ge_masks->next; + last = newGrab.genericMasks; + + while(ge_masks) + { + last->next = xcalloc(1, sizeof(GenericMaskRec)); + last = last->next; + *last = *ge_masks; + ge_masks = ge_masks->next; + } } + if (IsPointerDevice(dev)) + { + newGrab.keyboardMode = GrabModeAsync; + newGrab.pointerMode = device_mode; + } else + { + newGrab.keyboardMode = device_mode; + newGrab.pointerMode = GrabModeAsync; + } + + (*grabinfo->ActivateGrab)(dev, &newGrab, ctime, FALSE); return GrabSuccess; } + +_X_EXPORT int +ExtUngrabDevice(ClientPtr client, DeviceIntPtr dev) +{ + GrabInfoPtr grabinfo = &dev->deviceGrab; + if (grabinfo->grab && SameClient(grabinfo->grab, client)) + (*grabinfo->DeactivateGrab)(dev); + return GrabSuccess; +} + + diff --git a/include/dix.h b/include/dix.h index 60a68eea9..736a93e06 100644 --- a/include/dix.h +++ b/include/dix.h @@ -699,15 +699,16 @@ extern void SetGenericFilter(int extension, Mask* filters); extern int ExtGrabDevice(ClientPtr client, DeviceIntPtr dev, - int grabmode, int device_mode, WindowPtr grabWindow, WindowPtr confineTo, TimeStamp ctime, Bool ownerEvents, CursorPtr cursor, - Mask core_mask, Mask xi_mask, GenericMaskPtr ge_masks); +extern int ExtUngrabDevice(ClientPtr client, + DeviceIntPtr dev); + #endif /* DIX_H */ From a8c56372ba8aa36bac09877c478ff53ea5358df7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 15 May 2007 10:24:22 +0930 Subject: [PATCH 117/634] Revert "Allow events to grabWindows event if the device is not grabbed." This reverts commit 339b73e710a0920608a3fbcb20b406f0f6c4e0f6. Allowing those events can lead to race conditions. Conflicts: dix/events.c --- dix/events.c | 28 ++++++---------------------- include/dix.h | 1 - 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/dix/events.c b/dix/events.c index 30deeb6d4..463bf7c25 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1881,7 +1881,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent return 0; if (!(type & EXTENSION_EVENT_BASE) && - IsInterferingGrab(wClient(pWin), pWin, pDev, pEvents)) + IsInterferingGrab(wClient(pWin), pDev, pEvents)) return 0; if ( (attempt = TryClientEvents(wClient(pWin), pEvents, count, @@ -1946,7 +1946,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent { /* core event? check for grab interference */ if (!(type & EXTENSION_EVENT_BASE) && - IsInterferingGrab(rClient(other), pWin, pDev, pEvents)) + IsInterferingGrab(rClient(other), pDev, pEvents)) continue; if ( (attempt = TryClientEvents(rClient(other), pEvents, count, @@ -5666,19 +5666,15 @@ PickKeyboard(ClientPtr client) /* A client that has one or more core grabs does not get core events from * devices it does not have a grab on. Legacy applications behave bad * otherwise because they are not used to it and the events interfere. - * The one exception is: if we're about to send an event to a window that is - * specified as grab window, we still do it. This makes popup menus - * half-useable for WMs that don't set the ClientPointer. * Only applies for core events. * * Return true if a core event from the device would interfere and should not * be delivered. */ Bool -IsInterferingGrab(ClientPtr client, WindowPtr win, DeviceIntPtr dev, xEvent* event) +IsInterferingGrab(ClientPtr client, DeviceIntPtr dev, xEvent* event) { - DeviceIntPtr it; - Bool mayInterfere = FALSE; + DeviceIntPtr it = inputInfo.devices; if (dev->deviceGrab.grab && SameClient(dev->deviceGrab.grab, client)) return FALSE; @@ -5697,31 +5693,19 @@ IsInterferingGrab(ClientPtr client, WindowPtr win, DeviceIntPtr dev, xEvent* eve return FALSE; } - it = inputInfo.devices; while(it) { if (it != dev) { if (it->deviceGrab.grab && SameClient(it->deviceGrab.grab, client)) { - /* there's a client with a grab on some device. - * if we're delivering to the very same window that is - * grabbed (or a child), we're good */ - WindowPtr parent = win; - while(parent) - { - if (it->deviceGrab.grab->window == parent) - return FALSE; - parent = parent->parent; - } - - mayInterfere = TRUE; + return TRUE; } } it = it->next; } - return mayInterfere; + return FALSE; } /** diff --git a/include/dix.h b/include/dix.h index 736a93e06..f0e2f2ae6 100644 --- a/include/dix.h +++ b/include/dix.h @@ -552,7 +552,6 @@ extern DeviceIntPtr PickKeyboard( extern Bool IsInterferingGrab( ClientPtr /* client */, - WindowPtr /* win */, DeviceIntPtr /* dev */, xEvent* /* events */); From bc334286b060bc8d0c829b18acebadf24fbdaf19 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 17 May 2007 10:36:46 +0930 Subject: [PATCH 118/634] Init device axis with -1,-1 minimum values. This is needed to be able to cross to screens located east/north of the current active screen. --- dix/devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index ac35fe68c..4672b2ac1 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -1011,7 +1011,7 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, AllocateMotionHistory(dev); for (i=0; iaxisVal[i]=0; } return TRUE; From 333bab4b235801efd2b2de5b60df5b0c44048d3e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 17 May 2007 17:59:02 +0930 Subject: [PATCH 119/634] Clean up, correct some comments. Send event type down with the RawEvents. --- Xext/geext.c | 12 ++++++------ Xext/geext.h | 1 - Xi/exglobals.h | 2 -- Xi/extinit.c | 11 ++++------- dix/events.c | 21 ++++++++------------- dix/getevents.c | 1 + 6 files changed, 19 insertions(+), 29 deletions(-) diff --git a/Xext/geext.c b/Xext/geext.c index fed74dc54..f0801cbf8 100644 --- a/Xext/geext.c +++ b/Xext/geext.c @@ -246,11 +246,10 @@ GEExtensionInit(void) /* interface for extensions */ /************************************************************/ -/* Register extension with GE. - * Requires the event swap function as parameter. The function will be called - * each time an event is sent to a client with different byte order. - * Returns extension offset. This offset is to be used in all generic events - * sent to the client. +/* Register an extension with GE. The given swap function will be called each + * time an event is sent to a client with different byte order. + * @param extension The extensions major opcode + * @param ev_swap the event swap function. */ void GERegisterExtension( int extension, @@ -266,7 +265,8 @@ void GERegisterExtension( /* Sets type and extension field for a generic event. This is just an - * auxiliary function, extensions could do it manually too. */ + * auxiliary function, extensions could do it manually too. + */ void GEInitEvent(xGenericEvent* ev, int extension) { ev->type = GenericEvent; diff --git a/Xext/geext.h b/Xext/geext.h index 53aa21c8b..7a73e81e6 100644 --- a/Xext/geext.h +++ b/Xext/geext.h @@ -51,7 +51,6 @@ from the author. (((pWin)->optional) ? (pWin)->optional->geMasks->geClients : NULL) /* Interface for other extensions */ -Mask GENextMask(int extension); void GEWindowSetMask(ClientPtr pClient, WindowPtr pWin, int extension, Mask mask); void GERegisterExtension( int extension, diff --git a/Xi/exglobals.h b/Xi/exglobals.h index 8fcd907a3..8cbccf294 100644 --- a/Xi/exglobals.h +++ b/Xi/exglobals.h @@ -52,7 +52,6 @@ extern Mask DeviceButtonMotionMask; extern Mask DevicePresenceNotifyMask; extern Mask DeviceEnterWindowMask; extern Mask DeviceLeaveWindowMask; -extern Mask PointerKeyboardPairingChangedNotifyMask; extern Mask PropagateMask[]; extern int DeviceValuator; @@ -73,7 +72,6 @@ extern int ChangeDeviceNotify; extern int DevicePresenceNotify; extern int DeviceEnterNotify; extern int DeviceLeaveNotify; -extern int PointerKeyboardPairingChangedNotify; extern int RT_INPUTCLIENT; diff --git a/Xi/extinit.c b/Xi/extinit.c index 088873062..99518e125 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -134,6 +134,10 @@ Mask ExtValidMasks[EMASKSIZE]; Mask ExtExclusiveMasks[EMASKSIZE]; +/** + * Filters for various generic events. + * Evtype is index, mask is value at index. + */ static Mask xi_filters[3] = { XI_PointerKeyboardPairingChangedMask, XI_RandomStringMask, @@ -213,9 +217,6 @@ int DevicePresenceNotify; int DeviceEnterNotify; int DeviceLeaveNotify; -/* GE events */ -int PointerKeyboardPairingChangedNotify; - int RT_INPUTCLIENT; /***************************************************************** @@ -828,10 +829,6 @@ FixExtensionEvents(ExtensionEntry * extEntry) DeviceEnterNotify = DevicePresenceNotify + 1; DeviceLeaveNotify = DeviceEnterNotify + 1; - /* GE Events */ - PointerKeyboardPairingChangedNotify = - XI_PointerKeyboardPairingChangedNotify; - event_base[KeyClass] = DeviceKeyPress; event_base[ButtonClass] = DeviceButtonPress; event_base[ValuatorClass] = DeviceMotionNotify; diff --git a/dix/events.c b/dix/events.c index 463bf7c25..b36e4a459 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1523,10 +1523,6 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd) ComputeFreezes(); } -/* - * Core flag decides whether to work on the deviceGrab or deviceGrab sync - * fields. - */ void AllowSome(ClientPtr client, TimeStamp time, @@ -1538,7 +1534,7 @@ AllowSome(ClientPtr client, TimeStamp grabTime; DeviceIntPtr dev; GrabInfoPtr devgrabinfo, - grabinfo = (core) ? &thisDev->deviceGrab : &thisDev->deviceGrab; + grabinfo = &thisDev->deviceGrab; thisGrabbed = grabinfo->grab && SameClient(grabinfo->grab, client); thisSynced = FALSE; @@ -1547,7 +1543,7 @@ AllowSome(ClientPtr client, grabTime = grabinfo->grabTime; for (dev = inputInfo.devices; dev; dev = dev->next) { - devgrabinfo = (core) ? &dev->deviceGrab : &dev->deviceGrab; + devgrabinfo = &dev->deviceGrab; if (dev == thisDev) continue; @@ -1593,7 +1589,7 @@ AllowSome(ClientPtr client, { for (dev = inputInfo.devices; dev; dev = dev->next) { - devgrabinfo = (core) ? &dev->deviceGrab : &dev->deviceGrab; + devgrabinfo = &dev->deviceGrab; if (devgrabinfo->grab && SameClient(devgrabinfo->grab, client)) devgrabinfo->sync.state = THAWED; @@ -1609,7 +1605,7 @@ AllowSome(ClientPtr client, { for (dev = inputInfo.devices; dev; dev = dev->next) { - devgrabinfo = (core) ? &dev->deviceGrab : &dev->deviceGrab; + devgrabinfo = &dev->deviceGrab; if (devgrabinfo->grab && SameClient(devgrabinfo->grab, client)) devgrabinfo->sync.state = FREEZE_BOTH_NEXT_EVENT; @@ -1902,7 +1898,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent if (type == GenericEvent) { GEClientPtr pClient; - /* FIXME: We don't do more than one GenericEvent at a time yet. */ + /* We don't do more than one GenericEvent at a time. */ if (count > 1) { ErrorF("Do not send more than one GenericEvent at a time!\n"); @@ -3013,8 +3009,7 @@ CheckPassiveGrabsOnWindow( tempGrab.modifiersDetail.exact&(~0x1f00); } #endif - grabinfo = (xE->u.u.type & EXTENSION_EVENT_BASE) ? - &device->deviceGrab : &device->deviceGrab; + grabinfo = &device->deviceGrab; (*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE); FixUpEventFromWindow(device, xE, grab->window, None, TRUE); @@ -4703,7 +4698,7 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, GrabPtr grab; TimeStamp time; int rc; - GrabInfoPtr grabInfo = (deviceGrab) ? &dev->deviceGrab : &dev->deviceGrab; + GrabInfoPtr grabInfo = &dev->deviceGrab; UpdateCurrentTime(); if ((this_mode != GrabModeSync) && (this_mode != GrabModeAsync)) @@ -4751,7 +4746,7 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, tempGrab.eventMask = mask; tempGrab.device = dev; tempGrab.cursor = NULL; - tempGrab.coreGrab = deviceGrab; + tempGrab.coreGrab = (deviceGrab) ? FALSE : TRUE; tempGrab.genericMasks = NULL; (*grabInfo->ActivateGrab)(dev, &tempGrab, time, FALSE); diff --git a/dix/getevents.c b/dix/getevents.c index 4f7993f0a..4d1fbb7e4 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -603,6 +603,7 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, ev->evtype = XI_RawDeviceEvent; ev->extension = IReqCode; ev->length = (num_valuators > 4) ? (num_valuators - 4) : 0; + ev->event_type = type; ev->buttons = buttons; ev->num_valuators = num_valuators; ev->first_valuator = first_valuator; From 0b4db74922299df785e6273fdb1bf65c38d36070 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 17 May 2007 18:00:07 +0930 Subject: [PATCH 120/634] Squish the flags into the upper bits of the mode field for EnterLeave events. This way we have enough space for the detail field. --- dix/events.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dix/events.c b/dix/events.c index b36e4a459..13c817a1a 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3940,11 +3940,14 @@ EnterLeaveEvent( NullGrab, 0); } + /* we don't have enough bytes, so we squash flags and mode into + one byte, and use the last byte for the deviceid. */ devEnterLeave = (deviceEnterNotify*)&event; devEnterLeave->type = (type == EnterNotify) ? DeviceEnterNotify : DeviceLeaveNotify; devEnterLeave->type = (type == EnterNotify) ? DeviceEnterNotify : DeviceLeaveNotify; + devEnterLeave->mode |= (event.u.enterLeave.flags << 4); devEnterLeave->deviceid = mouse->id; mskidx = mouse->id; inputMasks = wOtherInputMasks(pWin); From 167e1773de0fb566559d4362ff929eedcdb6d055 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 21 May 2007 10:45:10 +0930 Subject: [PATCH 121/634] Remove unused include "gestr.h" --- Xi/extgrbdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/Xi/extgrbdev.c b/Xi/extgrbdev.c index 35756014b..8ae205339 100644 --- a/Xi/extgrbdev.c +++ b/Xi/extgrbdev.c @@ -46,7 +46,6 @@ from the author. #include #include #include -#include "gestr.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" From d0e8f474099dea40bbea555427772724ccb787d1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 21 May 2007 13:06:21 +0930 Subject: [PATCH 122/634] Change GrabDevice's parameter name back to "coreGrab". Was changed during a global search/replace for 5c680e94938c16e04a4349715cf11796b80400db. Otherwise people like me introduce bugs (e.g. in 333bab4b235801efd2b2de5b60df5b0c44048d3e) --- dix/events.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dix/events.c b/dix/events.c index 13c817a1a..402e3b3c9 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4695,7 +4695,7 @@ int GrabDevice(ClientPtr client, DeviceIntPtr dev, unsigned this_mode, unsigned other_mode, Window grabWindow, unsigned ownerEvents, Time ctime, Mask mask, CARD8 *status, - Bool deviceGrab) + Bool coreGrab) { WindowPtr pWin; GrabPtr grab; @@ -4749,7 +4749,7 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, tempGrab.eventMask = mask; tempGrab.device = dev; tempGrab.cursor = NULL; - tempGrab.coreGrab = (deviceGrab) ? FALSE : TRUE; + tempGrab.coreGrab = coreGrab; tempGrab.genericMasks = NULL; (*grabInfo->ActivateGrab)(dev, &tempGrab, time, FALSE); From b5db863945fa8045995b3bf742c44e40f2650f04 Mon Sep 17 00:00:00 2001 From: Paulo Ricardo Zanoni Date: Wed, 30 May 2007 16:15:15 +0930 Subject: [PATCH 123/634] Allow value None for windows when setting ClientPointer. We need this for clients that need to set the ClientPointer but don't have a window on display yet. If used, it will set the device as the ClientPointer for the requesting client. --- Xi/setcptr.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Xi/setcptr.c b/Xi/setcptr.c index 25874f0a5..66c8981b7 100644 --- a/Xi/setcptr.c +++ b/Xi/setcptr.c @@ -70,6 +70,7 @@ ProcXSetClientPointer(ClientPtr client) { DeviceIntPtr pDev; WindowPtr pWin; + ClientPtr targetClient; int err; REQUEST(xSetClientPointerReq); @@ -93,9 +94,11 @@ ProcXSetClientPointer(ClientPtr client) stuff->win, err); return Success; } - } + targetClient= wClient(pWin); + } else + targetClient = client; - if (!SetClientPointer(wClient(pWin), client, pDev)) + if (!SetClientPointer(targetClient, client, pDev)) { SendErrorToClient(client, IReqCode, X_SetClientPointer, stuff->win, BadAccess); From 182ab3a3d5b28daa86e6d6155e76ce759687ae6d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 30 May 2007 17:44:31 +0930 Subject: [PATCH 124/634] Fix up comments for event.c --- dix/events.c | 89 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 34 deletions(-) diff --git a/dix/events.c b/dix/events.c index 402e3b3c9..9dddf2c46 100644 --- a/dix/events.c +++ b/dix/events.c @@ -237,22 +237,24 @@ static int DontPropagateRefCnts[DNPMCOUNT]; * inputInfo.pointer * is the core pointer. Referred to as "virtual core pointer", "VCP", * "core pointer" or inputInfo.pointer. There is exactly one core pointer, - * but multiple devices may send core events. If a device generates core - * events, those events will appear to originate from the core pointer. + * but multiple devices may send core events. The VCP is only used if no + * physical device is connected and does not have a visible cursor. + * Before the integration of MPX, any core request would operate on the + * VCP/VCK. Core events would always come from one of those two. Now both + * are only fallback devices if no physical devices are available. * * inputInfo.keyboard * is the core keyboard ("virtual core keyboard", "VCK", "core keyboard"). * See inputInfo.pointer. * * inputInfo.devices - * linked list containing all devices including VCK and VCP. The VCK will - * always be the first entry, the VCP the second entry in the device list. + * linked list containing all devices BUT NOT INCLUDING VCK and VCP. * * inputInfo.off_devices * Devices that have not been initialized and are thus turned off. * * inputInfo.numDevices - * Total number of devices. + * Total number of devices (not counting VCP and VCK). */ _X_EXPORT InputInfo inputInfo; @@ -1387,11 +1389,12 @@ CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode) /** * Activate a pointer grab on the given device. A pointer grab will cause all - * core pointer events to be delivered to the grabbing client only. Can cause - * the cursor to change if a grab cursor is set. + * core pointer events of this device to be delivered to the grabbing client only. + * No other device will send core events to the grab client while the grab is + * on, but core events will be sent to other clients. + * Can cause the cursor to change if a grab cursor is set. * - * As a pointer grab can only be issued on the core devices, mouse is always - * inputInfo.pointer. Extension devices are set up for ActivateKeyboardGrab(). + * Extension devices are set up for ActivateKeyboardGrab(). * * @param mouse The device to grab. * @param grab The grab structure, needs to be setup. @@ -1433,8 +1436,7 @@ ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, /** * Delete grab on given device, update the sprite. * - * As a pointer grab can only be issued on the core devices, mouse is always - * inputInfo.pointer. Extension devices are set up for ActivateKeyboardGrab(). + * Extension devices are set up for ActivateKeyboardGrab(). */ void DeactivatePointerGrab(DeviceIntPtr mouse) @@ -1651,7 +1653,7 @@ AllowSome(ClientPtr client, /** * Server-side protocol handling for AllowEvents request. * - * Release some events from a frozen device. Only applicable for core devices. + * Release some events from a frozen device. */ int ProcAllowEvents(ClientPtr client) @@ -2135,9 +2137,6 @@ FixUpEventFromWindow( * Deliver events caused by input devices. Called for all core input events * and XI events. No filtering of events happens before DeliverDeviceEvents(), * it will be called for any event that comes out of the event queue. - * - * For all core events, dev is either inputInfo.pointer or inputInfo.keyboard. - * For all extension events, dev is the device that caused the event. * * @param pWin Window to deliver event to. * @param xE Events to deliver. @@ -2535,8 +2534,8 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) #endif /** - * Set the given window to sane values, display the cursor in the center of - * the screen. Called from main() with the root window on the first screen. + * Called from main() with the root window on the first screen. Used to do a + * lot more when MPX wasn't around yet. Things change. */ void DefineInitialRootWindow(WindowPtr win) @@ -2547,6 +2546,21 @@ DefineInitialRootWindow(WindowPtr win) } +/** + * Initialize a sprite for the given device and set it to some sane values. If + * the device already has a sprite alloc'd, don't realloc but just reset to + * default values. + * If a window is supplied, the sprite will be initialized with the window's + * cursor and positioned in the center of the window's screen. The root window + * is a good choice to pass in here. + * + * It's a good idea to call it only for pointer devices, unless you have a + * really talented keyboard. + * + * @param pDev The device to initialize. + * @param pWin The window where to generate the sprite in. + * + */ void InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) { @@ -3824,7 +3838,7 @@ CommonAncestor( /** * Assembles an EnterNotify or LeaveNotify and sends it event to the client. - * The core devices are used to fill in the event fields. + * Uses the paired keyboard to get some additional information. */ static void EnterLeaveEvent( @@ -4453,7 +4467,7 @@ ProcSetInputFocus(client) /** * Server-side protocol handling for GetInputFocus request. * - * Sends the current input focus for the virtual core keyboard back to the + * Sends the current input focus for the client's keyboard back to the * client. */ int @@ -4481,8 +4495,8 @@ ProcGetInputFocus(ClientPtr client) /** * Server-side protocol handling for Grabpointer request. * - * Sets an active grab on the inputInfo.pointer and returns success status to - * client. + * Sets an active grab on the client's ClientPointer and returns success + * status to client. */ int ProcGrabPointer(ClientPtr client) @@ -4601,7 +4615,7 @@ ProcGrabPointer(ClientPtr client) * Changes properties of the grab hold by the client. If the client does not * hold an active grab on the device, nothing happens. * - * Works on the core pointer only. + * Works on the client's ClientPointer. */ int ProcChangeActivePointerGrab(ClientPtr client) @@ -4652,7 +4666,7 @@ ProcChangeActivePointerGrab(ClientPtr client) /** * Server-side protocol handling for UngrabPointer request. * - * Deletes the pointer grab on the core pointer device. + * Deletes the pointer grab on the client's ClientPointer device. */ int ProcUngrabPointer(ClientPtr client) @@ -4676,7 +4690,7 @@ ProcUngrabPointer(ClientPtr client) /** * Sets a grab on the given device. * - * Called from ProcGrabKeyboard to work on the inputInfo.keyboard. + * Called from ProcGrabKeyboard to work on the client's keyboard. * Called from ProcXGrabDevice to work on the device specified by the client. * * The parameters this_mode and other_mode represent the keyboard_mode and @@ -4761,7 +4775,7 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, /** * Server-side protocol handling for GrabKeyboard request. * - * Grabs the inputInfo.keyboad and returns success status to client. + * Grabs the client's keyboard and returns success status to client. */ int ProcGrabKeyboard(ClientPtr client) @@ -4795,7 +4809,7 @@ ProcGrabKeyboard(ClientPtr client) /** * Server-side protocol handling for UngrabKeyboard request. * - * Deletes a possible grab on the inputInfo.keyboard. + * Deletes a possible grab on the client's keyboard. */ int ProcUngrabKeyboard(ClientPtr client) @@ -4819,7 +4833,8 @@ ProcUngrabKeyboard(ClientPtr client) /** * Server-side protocol handling for QueryPointer request. * - * Returns the current state and position of the core pointer to the client. + * Returns the current state and position of the client's ClientPointer to the + * client. */ int ProcQueryPointer(ClientPtr client) @@ -5029,8 +5044,8 @@ ProcSendEvent(ClientPtr client) /** * Server-side protocol handling for UngrabKey request. * - * Deletes a passive grab for the given key. Only works on the - * inputInfo.keyboard. + * Deletes a passive grab for the given key. Works on the + * client's keyboard. */ int ProcUngrabKey(ClientPtr client) @@ -5077,8 +5092,8 @@ ProcUngrabKey(ClientPtr client) /** * Server-side protocol handling for GrabKey request. * - * Creates a grab for the inputInfo.keyboard and adds it to the list of - * passive grabs. + * Creates a grab for the client's keyboard and adds it to the list of passive + * grabs. */ int ProcGrabKey(ClientPtr client) @@ -5138,8 +5153,8 @@ ProcGrabKey(ClientPtr client) /** * Server-side protocol handling for GrabButton request. * - * Creates a grab for the inputInfo.pointer and adds it as a passive grab to - * the list. + * Creates a grab for the client's ClientPointer and adds it as a passive grab + * to the list. */ int ProcGrabButton(ClientPtr client) @@ -5217,7 +5232,7 @@ ProcGrabButton(ClientPtr client) /** * Server-side protocol handling for UngrabButton request. * - * Deletes a passive grab on the inputInfo.pointer from the list. + * Deletes a passive grab on the client's ClientPointer from the list. */ int ProcUngrabButton(ClientPtr client) @@ -5597,6 +5612,12 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) /* * Set the client pointer for the given client. Second parameter setter could * be used in the future to determine access rights. Unused for now. + * + * A client can have exactly one ClientPointer. Each time a + * request/reply/event is processed and the choice of devices is ambiguous + * (e.g. QueryPointer request), the server will pick the ClientPointer (see + * PickPointer()). + * If a keyboard is needed, the first keyboard paired with the CP is used. */ _X_EXPORT Bool SetClientPointer(ClientPtr client, ClientPtr setter, DeviceIntPtr device) From 26b21157cf934ae387b15faa9ebb060120e6a0d6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 31 May 2007 17:05:14 +0930 Subject: [PATCH 125/634] Add a deviceMask to the GrabRec and don't interfere with passiveGrabs. This quickfixes event delivery problems with XI events when a grab was on. deviceMask is only used when the grab was from a ButtonPress to preserve potential XI event masks. This is not an ideal solution but it works until I have time to work on PassiveGrabs. --- Xi/exevents.c | 3 +++ dix/events.c | 21 ++++++++++++++++++--- include/inputstr.h | 4 ++++ 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 98c28851c..2e9e8267f 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -126,6 +126,9 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) ValuatorClassPtr v = device->valuator; deviceValuator *xV = (deviceValuator *) xE; + if (grab && grab->coreGrab && !device->deviceGrab.fromPassiveGrab) + return; + if (xE->u.u.type != DeviceValuator && xE->u.u.type != GenericEvent) { DeviceIntPtr mouse = NULL, kbd = NULL; GetSpritePosition(device, &rootX, &rootY); diff --git a/dix/events.c b/dix/events.c index 9dddf2c46..ba1463a01 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1839,6 +1839,10 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask, * Deliver events to a window. At this point, we do not yet know if the event * actually needs to be delivered. May activate a grab if the event is a * button press. + * + * Core events are always delivered to the window owner. If the filter is + * something other than CantBeFiltered, the event is also delivered to other + * clients with the matching mask on the window. * * More than one event may be delivered at a time. This is the case with * DeviceMotionNotifies which may be followed by DeviceValuator events. @@ -1964,6 +1968,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent if ((type == ButtonPress) && deliveries && (!grab)) { GrabRec tempGrab; + OtherInputMasks *inputMasks; tempGrab.device = pDev; tempGrab.resource = client->clientAsMask; @@ -1975,6 +1980,11 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent tempGrab.confineTo = NullWindow; tempGrab.cursor = NullCursor; tempGrab.coreGrab = True; + + /* get the XI device mask */ + inputMasks = wOtherInputMasks(pWin); + tempGrab.deviceMask = (inputMasks) ? inputMasks->inputEvents[pDev->id]: 0; + tempGrab.genericMasks = NULL; (*inputInfo.pointer->deviceGrab.ActivateGrab)(pDev, &tempGrab, currentTime, TRUE); @@ -3221,10 +3231,14 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, grab); } else { + Mask mask = grab->eventMask; + if (grabinfo->fromPassiveGrab && (xE->u.u.type & + EXTENSION_EVENT_BASE)) + mask = grab->deviceMask; + FixUpEventFromWindow(thisDev, xE, grab->window, None, TRUE); deliveries = TryClientEvents(rClient(grab), xE, count, - (Mask)grab->eventMask, - filters[xE->u.u.type], grab); + mask, filters[xE->u.u.type], grab); } if (deliveries && (xE->u.u.type == MotionNotify #ifdef XINPUT @@ -5716,7 +5730,8 @@ IsInterferingGrab(ClientPtr client, DeviceIntPtr dev, xEvent* event) { if (it != dev) { - if (it->deviceGrab.grab && SameClient(it->deviceGrab.grab, client)) + if (it->deviceGrab.grab && SameClient(it->deviceGrab.grab, client) + && !it->deviceGrab.fromPassiveGrab) { return TRUE; } diff --git a/include/inputstr.h b/include/inputstr.h index a53588461..986232c79 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -117,6 +117,9 @@ typedef struct _GenericMaskRec { * ButtonPressMask). * If the grab is a device grab (GrabDevice), then the eventMask is a * combination of event masks for a given XI event type (see SetEventInfo). + * + * If the grab is a result of a ButtonPress, then eventMask is the core mask + * and deviceMask is set to the XI event mask for the grab. */ typedef struct _GrabRec { GrabPtr next; /* for chain of passive grabs */ @@ -135,6 +138,7 @@ typedef struct _GrabRec { WindowPtr confineTo; /* always NULL for keyboards */ CursorPtr cursor; /* always NULL for keyboards */ Mask eventMask; + Mask deviceMask; GenericMaskPtr genericMasks; /* null terminated list */ } GrabRec; From 0aaf51546666f71e8d1711978bc7988ec2ecc7d9 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 12 Jun 2007 16:55:26 +0930 Subject: [PATCH 126/634] Zero deviceMask and genericMask when creating a grab via CreateGrab(). --- dix/grabs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dix/grabs.c b/dix/grabs.c index 714fea3e5..e1dd6c546 100644 --- a/dix/grabs.c +++ b/dix/grabs.c @@ -91,6 +91,7 @@ CreateGrab( (device == inputInfo.pointer)); grab->window = window; grab->eventMask = eventMask; + grab->deviceMask = 0; grab->ownerEvents = ownerEvents; grab->keyboardMode = keyboardMode; grab->pointerMode = pointerMode; @@ -104,6 +105,7 @@ CreateGrab( grab->detail.pMask = NULL; grab->confineTo = confineTo; grab->cursor = cursor; + grab->genericMasks = NULL; if (cursor) cursor->refcnt++; return grab; From 3e894974cdd6a75683d4601f71622d1da7ec4395 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 15 Jun 2007 17:16:16 +0930 Subject: [PATCH 127/634] Only decrement buttonsDown when the button count is greater than 0. Device drivers flush their buttons on device init and cause a button down event to be generated. If we unconditionally decrease the buttons, we won't be able to ever get a passive device grab. Format documentation for CheckDeviceGrabs to make it readable. --- Xi/exevents.c | 4 +++- dix/events.c | 31 +++++++++++++++++++++---------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 2e9e8267f..622e8cc33 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -279,6 +279,8 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify); if (!grab) if (CheckDeviceGrabs(device, xE, 0, count)) + /* if a passive grab was activated, the event has been sent + * already */ return; } else if (xE->u.u.type == DeviceButtonRelease) { @@ -289,7 +291,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) *kptr &= ~bit; if (device->valuator) device->valuator->motionHintWindow = NullWindow; - if (!--b->buttonsDown) + if (b->buttonsDown >= 1 && !--b->buttonsDown) b->motionMask = 0; xE->u.u.detail = b->map[key]; if (xE->u.u.detail == 0) diff --git a/dix/events.c b/dix/events.c index ba1463a01..4c5f5b9e2 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2963,6 +2963,7 @@ BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin) /** * "CheckPassiveGrabsOnWindow" checks to see if the event passed in causes a * passive grab set on the window to be activated. + * If a passive grab is activated, the event will be delivered to the client. * * @param pWin The window that may be subject to a passive grab. * @param device Device that caused the event. @@ -3064,16 +3065,26 @@ CheckPassiveGrabsOnWindow( } /** -"CheckDeviceGrabs" handles both keyboard and pointer events that may cause -a passive grab to be activated. If the event is a keyboard event, the -ancestors of the focus window are traced down and tried to see if they have -any passive grabs to be activated. If the focus window itself is reached and -it's descendants contain they pointer, the ancestors of the window that the -pointer is in are then traced down starting at the focus window, otherwise no -grabs are activated. If the event is a pointer event, the ancestors of the -window that the pointer is in are traced down starting at the root until -CheckPassiveGrabs causes a passive grab to activate or all the windows are -tried. PRH + * CheckDeviceGrabs handles both keyboard and pointer events that may cause + * a passive grab to be activated. + * + * If the event is a keyboard event, the ancestors of the focus window are + * traced down and tried to see if they have any passive grabs to be + * activated. If the focus window itself is reached and it's descendants + * contain the pointer, the ancestors of the window that the pointer is in + * are then traced down starting at the focus window, otherwise no grabs are + * activated. + * If the event is a pointer event, the ancestors of the window that the + * pointer is in are traced down starting at the root until CheckPassiveGrabs + * causes a passive grab to activate or all the windows are + * tried. PRH + * + * If a grab is activated, the event has been sent to the client already! + * + * @param device The device that caused the event. + * @param xE The event to handle (most likely {Device}ButtonPress). + * @param count Number of events in list. + * @return TRUE if a grab has been activated or false otherwise. */ Bool From 9e257029c760883c4ea0715d4fd06476f3fe8053 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 19 Jun 2007 11:28:07 +0930 Subject: [PATCH 128/634] Add implicitGrab field to GrabInfoRec. Is set when passive grab is implicit as result of a ButtonPress event. If this is the case, we need to store the XI mask as well as the core mask to ensure delivery of XI events during the grab's lifetime. Remove all core grabs on other devices when client issues a GrabPointer or GrabKeyboard request. Let's assume that the client really only wants one device to interact, so this seems like a reasonable solution. --- dix/devices.c | 1 + dix/events.c | 92 ++++++++++++++++++++++++++++++++++++++++++---- include/dix.h | 4 ++ include/inputstr.h | 6 ++- 4 files changed, 94 insertions(+), 9 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 4672b2ac1..b56423a6d 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -135,6 +135,7 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart) dev->deviceGrab.grab = NullGrab; dev->deviceGrab.grabTime = currentTime; dev->deviceGrab.fromPassiveGrab = FALSE; + dev->deviceGrab.implicitGrab = FALSE; dev->key = (KeyClassPtr)NULL; dev->valuator = (ValuatorClassPtr)NULL; diff --git a/dix/events.c b/dix/events.c index 4c5f5b9e2..f6e90214d 100644 --- a/dix/events.c +++ b/dix/events.c @@ -209,6 +209,12 @@ static xEvent *xeviexE; ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \ Mod3Mask | Mod4Mask | Mod5Mask ) #define AllEventMasks (lastEventMask|(lastEventMask-1)) + +/** + * Used to indicate a implicit passive grab created by a ButtonPress event. + * See DeliverEventsToWindow(). + */ +#define ImplicitGrabMask (1 << 7) /* * The following relies on the fact that the ButtonMotionMasks are equal * to the corresponding ButtonMasks from the current modifier/button state. @@ -1238,6 +1244,14 @@ PlayReleasedEvents(void) } } +/** + * Freeze or thaw the given devices. The device's processing proc is + * switched to either the real processing proc (in case of thawing) or an + * enqueuing processing proc (usually EnqueueEvent()). + * + * @param dev The device to freeze/thaw + * @param frozen True to freeze or false to thaw. + */ static void FreezeThaw(DeviceIntPtr dev, Bool frozen) { @@ -1248,6 +1262,14 @@ FreezeThaw(DeviceIntPtr dev, Bool frozen) dev->public.processInputProc = dev->public.realInputProc; } +/** + * Unfreeze devices and replay all events to the respective clients. + * + * ComputeFreezes takes the first event in the device's frozen event queue. It + * runs up the sprite tree (spriteTrace) and searches for the window to replay + * the events from. If it is found, it checks for passive grabs one down from + * the window or delivers the events. + */ void ComputeFreezes(void) { @@ -1394,7 +1416,8 @@ CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode) * on, but core events will be sent to other clients. * Can cause the cursor to change if a grab cursor is set. * - * Extension devices are set up for ActivateKeyboardGrab(). + * Note that parameter autoGrab may be (True & ImplicitGrabMask) if the grab + * is an implicit grab caused by a ButtonPress event. * * @param mouse The device to grab. * @param grab The grab structure, needs to be setup. @@ -1428,7 +1451,8 @@ ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, grab->cursor->refcnt++; grabinfo->activeGrab = *grab; grabinfo->grab = &grabinfo->activeGrab; - grabinfo->fromPassiveGrab = autoGrab; + grabinfo->fromPassiveGrab = autoGrab & ~ImplicitGrabMask; + grabinfo->implicitGrab = autoGrab & ImplicitGrabMask; PostNewCursor(mouse); CheckGrabForSyncs(mouse,(Bool)grab->pointerMode, (Bool)grab->keyboardMode); } @@ -1987,7 +2011,8 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent tempGrab.genericMasks = NULL; (*inputInfo.pointer->deviceGrab.ActivateGrab)(pDev, &tempGrab, - currentTime, TRUE); + currentTime, + TRUE | ImplicitGrabMask); } else if ((type == MotionNotify) && deliveries) pDev->valuator->motionHintWindow = pWin; @@ -3243,13 +3268,19 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, } else { Mask mask = grab->eventMask; - if (grabinfo->fromPassiveGrab && (xE->u.u.type & - EXTENSION_EVENT_BASE)) + if (grabinfo->fromPassiveGrab && + grabinfo->implicitGrab && + (xE->u.u.type & EXTENSION_EVENT_BASE)) mask = grab->deviceMask; FixUpEventFromWindow(thisDev, xE, grab->window, None, TRUE); - deliveries = TryClientEvents(rClient(grab), xE, count, - mask, filters[xE->u.u.type], grab); + + if (!(!(xE->u.u.type & EXTENSION_EVENT_BASE) && + IsInterferingGrab(rClient(grab), thisDev, xE))) + { + deliveries = TryClientEvents(rClient(grab), xE, count, + mask, filters[xE->u.u.type], grab); + } } if (deliveries && (xE->u.u.type == MotionNotify #ifdef XINPUT @@ -4629,6 +4660,8 @@ ProcGrabPointer(ClientPtr client) if (oldCursor) FreeCursor (oldCursor, (Cursor)0); rep.status = GrabSuccess; + + RemoveOtherCoreGrabs(client, device); } WriteReplyToClient(client, sizeof(xGrabPointerReply), &rep); return Success; @@ -4797,6 +4830,47 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, return Success; } +/** + * Deactivate any core grabs on the given client except the given device. + * + * This fixes race conditions where clients deal with implicit passive grabs + * on one device, but then actively grab their client pointer, which is + * another device. + * + * Grabs are only removed if the other device matches the type of device. If + * dev is a pointer device, only other pointer grabs are removed. Likewise, if + * dev is a keyboard device, only keyboard grabs are removed. + * + * If dev doesn't have a grab, do nothing and go for a beer. + * + * @param client The client that is to be limited. + * @param dev The only device allowed to have a grab on the client. + */ + +_X_EXPORT void +RemoveOtherCoreGrabs(ClientPtr client, DeviceIntPtr dev) +{ + if (!dev || !dev->deviceGrab.grab) + return; + + DeviceIntPtr it = inputInfo.devices; + for (; it; it = it->next) + { + if (it == dev) + continue; + /* check for IsPointer Device */ + + if (it->deviceGrab.grab && + it->deviceGrab.grab->coreGrab && + SameClient(it->deviceGrab.grab, client)) + { + if ((IsPointerDevice(dev) && IsPointerDevice(it)) || + (IsKeyboardDevice(dev) && IsKeyboardDevice(it))) + (*it->deviceGrab.DeactivateGrab)(it); + } + } +} + /** * Server-side protocol handling for GrabKeyboard request. * @@ -4813,10 +4887,13 @@ ProcGrabKeyboard(ClientPtr client) REQUEST_SIZE_MATCH(xGrabKeyboardReq); if (XaceHook(XACE_DEVICE_ACCESS, client, keyboard, TRUE)) + { result = GrabDevice(client, keyboard, stuff->keyboardMode, stuff->pointerMode, stuff->grabWindow, stuff->ownerEvents, stuff->time, KeyPressMask | KeyReleaseMask, &rep.status, TRUE); + RemoveOtherCoreGrabs(client, keyboard); + } else { result = Success; rep.status = AlreadyGrabbed; @@ -5857,3 +5934,4 @@ ExtUngrabDevice(ClientPtr client, DeviceIntPtr dev) } + diff --git a/include/dix.h b/include/dix.h index f0e2f2ae6..be1cb95f2 100644 --- a/include/dix.h +++ b/include/dix.h @@ -494,6 +494,10 @@ extern int GrabDevice( CARD8 * /* status */, Bool /* coreGrab */); +extern void RemoveOtherCoreGrabs( + ClientPtr /* client */, + DeviceIntPtr /* dev */); + extern void InitEvents(void); extern void InitSprite( DeviceIntPtr /* pDev */, diff --git a/include/inputstr.h b/include/inputstr.h index 986232c79..d9128cce8 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -333,9 +333,11 @@ typedef struct { #define FROZEN_NO_EVENT 5 #define FROZEN_WITH_EVENT 6 #define THAW_OTHERS 7 + typedef struct _GrabInfoRec { - TimeStamp grabTime; - Bool fromPassiveGrab; + TimeStamp grabTime; + Bool fromPassiveGrab; /* true if from passive grab */ + Bool implicitGrab; /* implicit from ButtonPress */ GrabRec activeGrab; GrabPtr grab; CARD8 activatingKey; From 5dee64fc99f34e091abce65d47c4b6f026ab4849 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 19 Jun 2007 11:31:22 +0930 Subject: [PATCH 129/634] Add a few comments to ProcXGrabDevice. --- Xi/grabdev.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Xi/grabdev.c b/Xi/grabdev.c index f3349ba8c..f2227bcf1 100644 --- a/Xi/grabdev.c +++ b/Xi/grabdev.c @@ -160,8 +160,19 @@ ProcXGrabDevice(ClientPtr client) * get the device. Then run through all available event indices (those are * set when XI starts up) and binary OR's the device's mask to whatever the * event mask for the given event type was. + * If an error occurs, it is sent to the client. Errors are generated if + * - if the device given in the event classs is invalid + * - if the device in the class list is not the device given as parameter (no + * error if parameter is NULL) * * mask has to be size EMASKSIZE and pre-allocated. + * + * @param client The client to send the error to (if one occurs) + * @param list List of event classes as sent from the client. + * @param count Number of elements in list. + * @param mask Preallocated mask (size EMASKSIZE). + * @param dev The device we're creating masks for. + * @param req The request we're processing. Used to fill in error fields. */ int @@ -179,7 +190,7 @@ CreateMaskFromList(ClientPtr client, XEventClass * list, int count, for (i = 0; i < count; i++, list++) { device = *list >> 8; - if (device > 255) { + if (device > 255) { /* FIXME: we only use 7 bit for devices? */ SendErrorToClient(client, IReqCode, req, 0, BadClass); return BadClass; } From 0c33dc152e372cdc8ae59d9a5696b0774bcd03b7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 21 Jun 2007 15:47:48 +0930 Subject: [PATCH 130/634] Set the detail field for DeviceKeyEvents to the keycode. --- dix/getevents.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dix/getevents.c b/dix/getevents.c index 4d1fbb7e4..6988b8bde 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -452,6 +452,7 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type, kbp = (deviceKeyButtonPointer *) events->event; kbp->time = ms; kbp->deviceid = pDev->id; + kbp->detail = key_code; if (type == KeyPress) kbp->type = DeviceKeyPress; else if (type == KeyRelease) From 8431f6083076cf1e701366767d8f8d32a628200f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 21 Jun 2007 17:00:41 +0930 Subject: [PATCH 131/634] Save processInputProc before wrapping it and restore it later, instead of using a hardcoded ProcessKeyboardEvent. Otherwise we lose the ability to process DeviceKeyEvents after the first key press. --- xkb/xkbActions.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 4c3efe28d..156fb2649 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -1300,7 +1300,8 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); UNWRAP_PROCESS_INPUT_PROC(dev,xkbPrivPtr); dev->public.processInputProc(xE,dev,count); COND_WRAP_PROCESS_INPUT_PROC(dev, xkbPrivPtr, - ProcessKeyboardEvent,xkbUnwrapProc); + (dev == inputInfo.keyboard) ? ProcessKeyboardEvent : ProcessOtherEvent, + xkbUnwrapProc); keyc->modifierMap[key] = realMods; } else CoreProcessPointerEvent(xE,dev,count); From f6f3322fc7562dbfccaf798b05d42ea222860ba8 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 21 Jun 2007 18:16:21 +0930 Subject: [PATCH 132/634] Revert "Save processInputProc before wrapping it and restore it later, instead of" Mixed up source trees, this was a very bad fix. This reverts commit 8431f6083076cf1e701366767d8f8d32a628200f. --- xkb/xkbActions.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 156fb2649..4c3efe28d 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -1300,8 +1300,7 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); UNWRAP_PROCESS_INPUT_PROC(dev,xkbPrivPtr); dev->public.processInputProc(xE,dev,count); COND_WRAP_PROCESS_INPUT_PROC(dev, xkbPrivPtr, - (dev == inputInfo.keyboard) ? ProcessKeyboardEvent : ProcessOtherEvent, - xkbUnwrapProc); + ProcessKeyboardEvent,xkbUnwrapProc); keyc->modifierMap[key] = realMods; } else CoreProcessPointerEvent(xE,dev,count); From 4d5df14f2c4a3108a8c8adfcf4766c0d1a9daad2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 21 Jun 2007 18:24:30 +0930 Subject: [PATCH 133/634] Save processInputProc before wrapping it and restore it later, instead of using a hardcoded ProcessKeyboardEvent. Otherwise we lose the ability to process DeviceKeyEvents after the first key press. This should be the correct fix now. --- include/xkbsrv.h | 3 ++- xkb/xkbActions.c | 17 ++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/include/xkbsrv.h b/include/xkbsrv.h index 5edee539b..e018749a6 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -241,7 +241,8 @@ typedef struct oldprocs->unwrapProc = device->unwrapProc; \ device->unwrapProc = unwrapproc; -#define UNWRAP_PROCESS_INPUT_PROC(device, oldprocs) \ +#define UNWRAP_PROCESS_INPUT_PROC(device, oldprocs, backupproc) \ + backupproc = device->public.processInputProc; \ device->public.processInputProc = oldprocs->processInputProc; \ device->public.realInputProc = oldprocs->realInputProc; \ device->unwrapProc = oldprocs->unwrapProc; diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 4c3efe28d..252c6537e 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -49,10 +49,11 @@ xkbUnwrapProc(DeviceIntPtr device, DeviceHandleProc proc, { xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(device); ProcessInputProc tmp = device->public.processInputProc; + ProcessInputProc dummy; /* unused, but neede for macro */ if(xkbPrivPtr->unwrapProc) xkbPrivPtr->unwrapProc = NULL; - UNWRAP_PROCESS_INPUT_PROC(device,xkbPrivPtr); + UNWRAP_PROCESS_INPUT_PROC(device,xkbPrivPtr, dummy); proc(device,data); WRAP_PROCESS_INPUT_PROC(device,xkbPrivPtr, tmp,xkbUnwrapProc); @@ -867,6 +868,7 @@ int x,y; XkbStateRec old; unsigned mods,mask,oldCoreState = 0,oldCorePrevState = 0; xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(xkbi->device); +ProcessInputProc backupproc; /* never actually used uninitialised, but gcc isn't smart enough * to work that out. */ @@ -919,10 +921,10 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(xkbi->device); realMods = xkbi->device->key->modifierMap[ev.u.u.detail]; xkbi->device->key->modifierMap[ev.u.u.detail] = 0; - UNWRAP_PROCESS_INPUT_PROC(xkbi->device,xkbPrivPtr); + UNWRAP_PROCESS_INPUT_PROC(xkbi->device,xkbPrivPtr, backupproc); xkbi->device->public.processInputProc(&ev,xkbi->device,1); COND_WRAP_PROCESS_INPUT_PROC(xkbi->device, xkbPrivPtr, - ProcessKeyboardEvent,xkbUnwrapProc); + backupproc,xkbUnwrapProc); xkbi->device->key->modifierMap[ev.u.u.detail] = realMods; if ( mask || mods ) { @@ -960,10 +962,10 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(xkbi->device); realMods = xkbi->device->key->modifierMap[ev.u.u.detail]; xkbi->device->key->modifierMap[ev.u.u.detail] = 0; - UNWRAP_PROCESS_INPUT_PROC(xkbi->device,xkbPrivPtr); + UNWRAP_PROCESS_INPUT_PROC(xkbi->device,xkbPrivPtr, backupproc); xkbi->device->public.processInputProc(&ev,xkbi->device,1); COND_WRAP_PROCESS_INPUT_PROC(xkbi->device, xkbPrivPtr, - ProcessKeyboardEvent,xkbUnwrapProc); + backupproc,xkbUnwrapProc); xkbi->device->key->modifierMap[ev.u.u.detail] = realMods; if ( mask || mods ) { @@ -1155,6 +1157,7 @@ Bool pressEvent; #ifdef XINPUT Bool xiEvent; #endif +ProcessInputProc backupproc; xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); @@ -1297,10 +1300,10 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); if (keyEvent) { realMods = keyc->modifierMap[key]; keyc->modifierMap[key] = 0; - UNWRAP_PROCESS_INPUT_PROC(dev,xkbPrivPtr); + UNWRAP_PROCESS_INPUT_PROC(dev,xkbPrivPtr, backupproc); dev->public.processInputProc(xE,dev,count); COND_WRAP_PROCESS_INPUT_PROC(dev, xkbPrivPtr, - ProcessKeyboardEvent,xkbUnwrapProc); + backupproc,xkbUnwrapProc); keyc->modifierMap[key] = realMods; } else CoreProcessPointerEvent(xE,dev,count); From c4e850a781e3b85631cb386d24efcca2a835d4c9 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 25 Jun 2007 13:38:25 +0930 Subject: [PATCH 134/634] Quickfix to stop core key events from doubling up. --- xkb/xkbPrKeyEv.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xkb/xkbPrKeyEv.c b/xkb/xkbPrKeyEv.c index 81124bcfb..02f3c35fe 100644 --- a/xkb/xkbPrKeyEv.c +++ b/xkb/xkbPrKeyEv.c @@ -69,6 +69,13 @@ unsigned ndx; /* below XKB, such as a key that physically locks. XKB does not */ /* do anything to implement the behavior, but it *does* report that */ /* key is hardwired */ + + /* FIXME: this is bad. The down mask is set during ProcessOtherEvent. When + * we start processing the core event (and eventually arrive here), the + * down mask is already set and Xkb thinks it's a repeat event. We just + * silently ignore it for now. + */ +#if 0 if ((behavior.type&XkbKB_Permanent)==0) { switch (behavior.type) { case XkbKB_Default: @@ -153,6 +160,7 @@ unsigned ndx; break; } } +#endif XkbHandleActions(keybd,keybd,xE,count); return; } From 8396bf7c8b4eb6b8f2d1e1ef19887064c69591da Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 26 Jun 2007 12:58:37 +0930 Subject: [PATCH 135/634] Init genericMasks to 0, make sure list is NULL terminated. --- Xi/exevents.c | 1 + dix/events.c | 1 + 2 files changed, 2 insertions(+) diff --git a/Xi/exevents.c b/Xi/exevents.c index 622e8cc33..719e9db0d 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -1169,6 +1169,7 @@ CheckDeviceGrabAndHintWindow(WindowPtr pWin, int type, tempGrab.pointerMode = GrabModeAsync; tempGrab.confineTo = NullWindow; tempGrab.cursor = NullCursor; + tempGrab.genericMasks = NULL; (*dev->deviceGrab.ActivateGrab) (dev, &tempGrab, currentTime, TRUE); } } diff --git a/dix/events.c b/dix/events.c index 58d9ed43a..51bd2d8d2 100644 --- a/dix/events.c +++ b/dix/events.c @@ -5912,6 +5912,7 @@ ExtGrabDevice(ClientPtr client, last->next = xcalloc(1, sizeof(GenericMaskRec)); last = last->next; *last = *ge_masks; + last->next = NULL; ge_masks = ge_masks->next; } } From 49136d3e9fe2d065090ee90c18a49f65fb027c9f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 26 Jun 2007 19:43:54 +0930 Subject: [PATCH 136/634] mieqEnqueue: use modulo for queue tail wrapping. This was previously committed by Michael Daenzer, but was lost during a pull. --- mi/mieq.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mi/mieq.c b/mi/mieq.c index ff20003fc..4b299509d 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -119,7 +119,7 @@ mieqInit(void) void mieqEnqueue(DeviceIntPtr pDev, xEvent *e) { - HWEventQueueType oldtail = miEventQueue.tail, newtail; + unsigned int oldtail = miEventQueue.tail, newtail; EventListPtr evt; int isMotion = 0; int evlen; @@ -138,7 +138,7 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e) EventPtr laste; deviceKeyButtonPointer *lastkbp; - laste = &miEventQueue.events[(oldtail ? oldtail : QUEUE_SIZE) - 1]; + laste = &miEventQueue.events[(oldtail - 1) % QUEUE_SIZE]; lastkbp = (deviceKeyButtonPointer *) laste->events->event; if (laste->nevents > 6) { @@ -161,9 +161,7 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e) if (isMotion && isMotion == miEventQueue.lastMotion && oldtail != miEventQueue.head) { - if (oldtail == 0) - oldtail = QUEUE_SIZE; - oldtail = oldtail - 1; + oldtail = (oldtail - 1) % QUEUE_SIZE; } else { newtail = (oldtail + 1) % QUEUE_SIZE; From 08779c62ba2f4cbfa47e3cf738daf8abd74b60cf Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 27 Jun 2007 11:16:55 +0930 Subject: [PATCH 137/634] Reset grab->next to NULL when we're creating a grab. This is definitely necessary in CheckDeviceGrabAndHintWindow (thanks to Paulo Zanoni for spotting it). We're resetting it everywhere else too, just to be save. --- Xi/exevents.c | 1 + dix/events.c | 7 +++++++ dix/grabs.c | 1 + 3 files changed, 9 insertions(+) diff --git a/Xi/exevents.c b/Xi/exevents.c index 719e9db0d..c13b74705 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -1170,6 +1170,7 @@ CheckDeviceGrabAndHintWindow(WindowPtr pWin, int type, tempGrab.confineTo = NullWindow; tempGrab.cursor = NullCursor; tempGrab.genericMasks = NULL; + tempGrab.next = NULL; (*dev->deviceGrab.ActivateGrab) (dev, &tempGrab, currentTime, TRUE); } } diff --git a/dix/events.c b/dix/events.c index 51bd2d8d2..77d62754f 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2001,6 +2001,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent GrabRec tempGrab; OtherInputMasks *inputMasks; + tempGrab.next = NULL; tempGrab.device = pDev; tempGrab.resource = client->clientAsMask; tempGrab.window = pWin; @@ -3023,6 +3024,7 @@ CheckPassiveGrabsOnWindow( tempGrab.detail.exact = xE->u.u.detail; tempGrab.detail.pMask = NULL; tempGrab.modifiersDetail.pMask = NULL; + tempGrab.next = NULL; for (; grab; grab = grab->next) { #ifdef XKB @@ -4652,6 +4654,7 @@ ProcGrabPointer(ClientPtr client) ConfineCursorToWindow(device, RootWindow(device), FALSE, FALSE); oldCursor = grab->cursor; } + tempGrab.next = NULL; tempGrab.cursor = cursor; tempGrab.resource = client->clientAsMask; tempGrab.ownerEvents = stuff->ownerEvents; @@ -4820,6 +4823,7 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, /* Otherwise segfaults happen on grabbed MPX devices */ memset(&tempGrab, 0, sizeof(GrabRec)); + tempGrab.next = NULL; tempGrab.window = pWin; tempGrab.resource = client->clientAsMask; tempGrab.ownerEvents = ownerEvents; @@ -5192,6 +5196,7 @@ ProcUngrabKey(ClientPtr client) tempGrab.type = KeyPress; tempGrab.detail.exact = stuff->key; tempGrab.detail.pMask = NULL; + tempGrab.next = NULL; if (!DeletePassiveGrabFromList(&tempGrab)) return(BadAlloc); @@ -5370,6 +5375,7 @@ ProcUngrabButton(ClientPtr client) tempGrab.type = ButtonPress; tempGrab.detail.exact = stuff->button; tempGrab.detail.pMask = NULL; + tempGrab.next = NULL; if (!DeletePassiveGrabFromList(&tempGrab)) return(BadAlloc); @@ -5897,6 +5903,7 @@ ExtGrabDevice(ClientPtr client, newGrab.confineTo = confineTo; newGrab.eventMask = xi_mask; newGrab.genericMasks = NULL; + newGrab.next = NULL; if (ge_masks) { diff --git a/dix/grabs.c b/dix/grabs.c index e1dd6c546..af471ebb3 100644 --- a/dix/grabs.c +++ b/dix/grabs.c @@ -106,6 +106,7 @@ CreateGrab( grab->confineTo = confineTo; grab->cursor = cursor; grab->genericMasks = NULL; + grab->next = NULL; if (cursor) cursor->refcnt++; return grab; From c1a16bdcfe7aa907fe78f27dc606a8e5a2699952 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 27 Jun 2007 18:08:03 +0930 Subject: [PATCH 138/634] Add 'evfill' field to GEExtensions. We need this to allow extensions to fill in extra data for an event before it is sent to the client. This is probably to be used like FillUpEventsFromWindow(). --- Xext/geext.c | 18 ++++++++---------- Xext/geext.h | 27 ++++++++++++++++++++++++++- Xi/extinit.c | 12 +++++++++++- dix/events.c | 7 +++++++ 4 files changed, 52 insertions(+), 12 deletions(-) diff --git a/Xext/geext.c b/Xext/geext.c index f0801cbf8..0add5e1fb 100644 --- a/Xext/geext.c +++ b/Xext/geext.c @@ -41,15 +41,8 @@ int GEErrorBase; int GEClientPrivateIndex; int GEEventType; /* The opcode for all GenericEvents will have. */ -/* Struct to keep information about registered extensions - */ -typedef struct _GEExtension { - /* event swap function */ - void (*evswap)(xGenericEvent* from, xGenericEvent* to); -} GEExtension, *GEExtensionPtr; -/* All registered extensions */ -static GEExtension GEExtensions[MAXEXTENSIONS]; +GEExtension GEExtensions[MAXEXTENSIONS]; /* Major available requests */ static const int version_requests[] = { @@ -249,11 +242,15 @@ GEExtensionInit(void) /* Register an extension with GE. The given swap function will be called each * time an event is sent to a client with different byte order. * @param extension The extensions major opcode - * @param ev_swap the event swap function. + * @param ev_swap The event swap function. + * @param ev_fill Called for an event before delivery. The extension now has + * the chance to fill in necessary fields for the event. */ void GERegisterExtension( int extension, - void (*ev_swap)(xGenericEvent* from, xGenericEvent* to) + void (*ev_swap)(xGenericEvent* from, xGenericEvent* to), + void (*ev_fill)(xGenericEvent* ev, DeviceIntPtr pDev, + WindowPtr pWin, GrabPtr pGrab) ) { if ((extension & 0x7F) >= MAXEXTENSIONS) @@ -261,6 +258,7 @@ void GERegisterExtension( /* extension opcodes are > 128, might as well save some space here */ GEExtensions[extension & 0x7f].evswap = ev_swap; + GEExtensions[extension & 0x7f].evfill = ev_fill; } diff --git a/Xext/geext.h b/Xext/geext.h index 7a73e81e6..bac472662 100644 --- a/Xext/geext.h +++ b/Xext/geext.h @@ -34,6 +34,23 @@ from the author. #define _GEEXT_H_ #include +/* Struct to keep information about registered extensions + * + * evswap ... use to swap event fields for different byte ordered clients. + * evfill ... use to fill various event fields from the given parameters. + */ +typedef struct _GEExtension { + void (*evswap)(xGenericEvent* from, xGenericEvent* to); + void (*evfill)(xGenericEvent* ev, + DeviceIntPtr pDev, /* device */ + WindowPtr pWin, /* event window */ + GrabPtr pGrab /* current grab, may be NULL */ + ); +} GEExtension, *GEExtensionPtr; + +/* All registered extensions and their handling functions. */ +extern GEExtension GEExtensions[MAXEXTENSIONS]; + /* Returns the extension offset from the event */ #define GEEXT(ev) (((xGenericEvent*)(ev))->extension) @@ -50,11 +67,19 @@ from the author. #define GECLIENT(pWin) \ (((pWin)->optional) ? (pWin)->optional->geMasks->geClients : NULL) +/* Returns the event_fill for the given event */ +#define GEEventFill(ev) \ + GEExtensions[GEEXTIDX(xE)].evfill + /* Interface for other extensions */ void GEWindowSetMask(ClientPtr pClient, WindowPtr pWin, int extension, Mask mask); void GERegisterExtension( int extension, - void (*ev_dispatch)(xGenericEvent* from, xGenericEvent* to)); + void (*ev_dispatch)(xGenericEvent* from, xGenericEvent* to), + void (*ev_fill)(xGenericEvent* ev, DeviceIntPtr pDev, + WindowPtr pWin, GrabPtr pGrab) + ); + void GEInitEvent(xGenericEvent* ev, int extension); diff --git a/Xi/extinit.c b/Xi/extinit.c index 99518e125..70253fe82 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -1151,6 +1151,16 @@ XIGEEventSwap(xGenericEvent* from, xGenericEvent* to) } } +/** + * EventFill to fill various fields for events before they are delivered to + * the client. + */ +static void +XIGEEventFill(xGenericEvent* ev, DeviceIntPtr pDev, + WindowPtr pWin, GrabPtr grab) +{ +} + /********************************************************************** * * IExtensionInit - initialize the input extension. @@ -1195,7 +1205,7 @@ XInputExtensionInit(void) EventSwapVector[DeviceLeaveNotify] = SEventIDispatch; /* init GE events */ - GERegisterExtension(IReqCode, XIGEEventSwap); + GERegisterExtension(IReqCode, XIGEEventSwap, XIGEEventFill); SetGenericFilter(IReqCode, xi_filters); } else { FatalError("IExtensionInit: AddExtensions failed\n"); diff --git a/dix/events.c b/dix/events.c index 77d62754f..d4af30731 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2129,6 +2129,9 @@ FixUpEventFromWindow( { SpritePtr pSprite = pDev->spriteInfo->sprite; + if (xE->u.u.type == GenericEvent) /* just a safety barrier */ + return; + if (calcChild) { WindowPtr w= pSprite->spriteTrace[pSprite->spriteTraceGood-1]; @@ -2245,6 +2248,8 @@ DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab, { if (GEMaskIsSet(pWin, GEEXT(xE), filter)) { + if (GEExtensions[GEEXTIDX(xE)].evfill) + GEExtensions[GEEXTIDX(xE)].evfill(ge, dev, pWin, grab); deliveries = DeliverEventsToWindow(dev, pWin, xE, count, filter, grab, 0); if (deliveries > 0) @@ -3270,6 +3275,8 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, if (!gemask) return; + if (GEEventFill(xE)) + GEEventFill(xE)(ge, thisDev, grab->window, grab); deliveries = TryClientEvents(rClient(grab), xE, count, gemask->mask, generic_filters[GEEXTIDX(ge)][ge->evtype], From 5ccc09b18244f91a06b3bea20b02a97280d1a229 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 6 Jul 2007 15:43:08 +0930 Subject: [PATCH 139/634] Use the same struct for generic event masks throughout the code. Renaming those structs too. Previously grabs were using a different struct than windows, which was reasonably stupid. --- Xext/geext.c | 14 +++++++------- Xext/geext.h | 16 ++++++++++++++++ Xi/extgrbdev.c | 22 ++++++---------------- dix/events.c | 46 ++++++++++++++++++++++----------------------- dix/window.c | 3 ++- include/dix.h | 1 + include/inputstr.h | 9 ++------- include/misc.h | 1 - include/windowstr.h | 22 ++++++++++------------ 9 files changed, 66 insertions(+), 68 deletions(-) diff --git a/Xext/geext.c b/Xext/geext.c index 0add5e1fb..0c5fcabac 100644 --- a/Xext/geext.c +++ b/Xext/geext.c @@ -207,7 +207,7 @@ GEExtensionInit(void) GEClientPrivateIndex = AllocateClientPrivateIndex(); if (!AllocateClientPrivate(GEClientPrivateIndex, - sizeof(GEClientRec))) + sizeof(GenericMaskRec))) { FatalError("GEExtensionInit: Alloc client private failed.\n"); } @@ -277,8 +277,8 @@ static void GERecalculateWinMask(WindowPtr pWin) { int i; - GEClientPtr it; - GEEventMasksPtr evmasks; + GenericMaskPtr it; + GenericClientMasksPtr evmasks; if (!pWin->optional) return; @@ -304,7 +304,7 @@ GERecalculateWinMask(WindowPtr pWin) /* Set generic event mask for given window. */ void GEWindowSetMask(ClientPtr pClient, WindowPtr pWin, int extension, Mask mask) { - GEClientPtr cli; + GenericMaskPtr cli; extension = (extension & 0x7F); @@ -322,7 +322,7 @@ void GEWindowSetMask(ClientPtr pClient, WindowPtr pWin, int extension, Mask mask if (mask) { - GEEventMasksPtr evmasks = pWin->optional->geMasks; + GenericClientMasksPtr evmasks = pWin->optional->geMasks; /* check for existing client */ cli = evmasks->geClients; @@ -335,7 +335,7 @@ void GEWindowSetMask(ClientPtr pClient, WindowPtr pWin, int extension, Mask mask if (!cli) { /* new client */ - cli = (GEClientPtr)xcalloc(1, sizeof(GEClientRec)); + cli = (GenericMaskPtr)xcalloc(1, sizeof(GenericMaskRec)); if (!cli) { ErrorF("GE: Insufficient memory to alloc client.\n"); @@ -356,7 +356,7 @@ void GEWindowSetMask(ClientPtr pClient, WindowPtr pWin, int extension, Mask mask xfree(cli); } else { - GEClientPtr prev = cli; + GenericMaskPtr prev = cli; cli = cli->next; while(cli) diff --git a/Xext/geext.h b/Xext/geext.h index bac472662..f3352c2a6 100644 --- a/Xext/geext.h +++ b/Xext/geext.h @@ -34,6 +34,21 @@ from the author. #define _GEEXT_H_ #include + +/** + * This struct is used both in the window and by grabs to determine the event + * mask for a client. + * A window will have a linked list of these structs, with one entry per + * client, null-terminated. + * A grab has only one instance of this struct. + */ +typedef struct _GenericMaskRec { + ClientPtr client; /* client who set the event mask */ + Mask eventMask[MAXEXTENSIONS]; /* one mask per extension */ + struct _GenericMaskRec* next; +} GenericMaskRec, *GenericMaskPtr; + + /* Struct to keep information about registered extensions * * evswap ... use to swap event fields for different byte ordered clients. @@ -48,6 +63,7 @@ typedef struct _GEExtension { ); } GEExtension, *GEExtensionPtr; + /* All registered extensions and their handling functions. */ extern GEExtension GEExtensions[MAXEXTENSIONS]; diff --git a/Xi/extgrbdev.c b/Xi/extgrbdev.c index 8ae205339..c4011f5c3 100644 --- a/Xi/extgrbdev.c +++ b/Xi/extgrbdev.c @@ -194,19 +194,13 @@ ProcXExtendedGrabDevice(ClientPtr client) (XGenericEventMask*)(((XEventClass*)&stuff[1]) + stuff->event_count); gemasks = xcalloc(1, sizeof(GenericMaskRec)); - gemasks->extension = xgeMask->extension; - gemasks->mask = xgeMask->evmask; + gemasks->client = client; gemasks->next = NULL; - xgeMask++; + gemasks->eventMask[xgeMask->extension & 0x7F] = xgeMask->evmask; + xgeMask++; for (i = 1; i < stuff->generic_event_count; i++, xgeMask++) - { - gemasks->next = xcalloc(1, sizeof(GenericMaskRec)); - gemasks = gemasks->next; - gemasks->extension = xgeMask->extension; - gemasks->mask = xgeMask->evmask; - gemasks->next = NULL; - } + gemasks->eventMask[xgeMask->extension & 0x7F]= xgeMask->evmask; } ExtGrabDevice(client, dev, stuff->device_mode, @@ -221,12 +215,8 @@ ProcXExtendedGrabDevice(ClientPtr client) cleanup: - while(gemasks) - { - GenericMaskPtr prev = gemasks; - gemasks = gemasks->next; - xfree(prev); - } + if (gemasks) + xfree(gemasks); if (err == Success) { diff --git a/dix/events.c b/dix/events.c index d4af30731..1bec4fc5b 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1934,7 +1934,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent /* Handle generic events */ if (type == GenericEvent) { - GEClientPtr pClient; + GenericMaskPtr pClient; /* We don't do more than one GenericEvent at a time. */ if (count > 1) { @@ -2017,7 +2017,24 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent inputMasks = wOtherInputMasks(pWin); tempGrab.deviceMask = (inputMasks) ? inputMasks->inputEvents[pDev->id]: 0; - tempGrab.genericMasks = NULL; + /* get the XGE event mask. + * FIXME: needs to be freed somewhere too. + */ + if (!pWin->optional || !pWin->optional->geMasks) + tempGrab.genericMasks = NULL; + else + { + GenericClientMasksPtr gemasks = pWin->optional->geMasks; + GenericMaskPtr geclient = gemasks->geClients; + while(geclient && geclient->client != client) + geclient = geclient->next; + if (geclient) + { + tempGrab.genericMasks = xcalloc(1, sizeof(GenericMaskRec)); + *tempGrab.genericMasks = *geclient; + tempGrab.genericMasks->next = NULL; + } + } (*inputInfo.pointer->deviceGrab.ActivateGrab)(pDev, &tempGrab, currentTime, TRUE | ImplicitGrabMask); @@ -3264,21 +3281,15 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, { /* find evmask for event's extension */ xGenericEvent* ge = ((xGenericEvent*)xE); - GenericMaskPtr gemask = grab->genericMasks; - while(gemask) - { - if (gemask->extension == ge->extension) - break; - gemask = gemask->next; - } + GenericMaskPtr gemask = grab->genericMasks; - if (!gemask) + if (!gemask->eventMask[GEEXTIDX(ge)]) return; if (GEEventFill(xE)) GEEventFill(xE)(ge, thisDev, grab->window, grab); deliveries = TryClientEvents(rClient(grab), xE, count, - gemask->mask, + gemask->eventMask[GEEXTIDX(ge)], generic_filters[GEEXTIDX(ge)][ge->evtype], grab); } else @@ -4161,7 +4172,6 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) xEvent event; int* numFoci; /* no of foci the window has already */ Bool sendevent = FALSE; - FocusSemaphoresPtr focus; if (dev != inputInfo.keyboard) DeviceFocusEvent(dev, type, mode, detail, pWin); @@ -5914,21 +5924,9 @@ ExtGrabDevice(ClientPtr client, if (ge_masks) { - GenericMaskPtr last; newGrab.genericMasks = xcalloc(1, sizeof(GenericMaskRec)); *newGrab.genericMasks = *ge_masks; newGrab.genericMasks->next = NULL; - ge_masks = ge_masks->next; - last = newGrab.genericMasks; - - while(ge_masks) - { - last->next = xcalloc(1, sizeof(GenericMaskRec)); - last = last->next; - *last = *ge_masks; - last->next = NULL; - ge_masks = ge_masks->next; - } } if (IsPointerDevice(dev)) diff --git a/dix/window.c b/dix/window.c index b49abdfe5..193f1aa33 100644 --- a/dix/window.c +++ b/dix/window.c @@ -3751,7 +3751,8 @@ MakeWindowOptional (WindowPtr pWin) #endif optional->deviceCursors = NULL; - optional->geMasks = (GEEventMasksPtr)xalloc(sizeof(GEEventMasksRec)); + optional->geMasks = + (GenericClientMasksPtr)xalloc(sizeof(GenericClientMasksRec)); if (!optional->geMasks) { xfree(optional); diff --git a/include/dix.h b/include/dix.h index be1cb95f2..2fc625438 100644 --- a/include/dix.h +++ b/include/dix.h @@ -52,6 +52,7 @@ SOFTWARE. #include "window.h" #include "input.h" #include "cursor.h" +#include "geext.h" #include #define EARLIER -1 diff --git a/include/inputstr.h b/include/inputstr.h index d9128cce8..6c65aa46d 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -53,6 +53,7 @@ SOFTWARE. #include "window.h" #include "dixstruct.h" #include "cursorstr.h" +#include "geext.h" #define BitIsOn(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7))) @@ -102,12 +103,6 @@ typedef struct _DetailRec { /* Grab details may be bit masks */ Mask *pMask; } DetailRec; -typedef struct _GenericMaskRec { - int extension; - Mask mask; - struct _GenericMaskRec* next; -} GenericMaskRec; - /** * Central struct for device grabs. * The same struct is used for both core grabs and device grabs, with @@ -139,7 +134,7 @@ typedef struct _GrabRec { CursorPtr cursor; /* always NULL for keyboards */ Mask eventMask; Mask deviceMask; - GenericMaskPtr genericMasks; /* null terminated list */ + GenericMaskPtr genericMasks; } GrabRec; typedef struct _KeyClassRec { diff --git a/include/misc.h b/include/misc.h index 14c848d1c..e6a5e9eb2 100644 --- a/include/misc.h +++ b/include/misc.h @@ -243,7 +243,6 @@ typedef struct pixman_box16 *BoxPtr; typedef struct _xEvent *xEventPtr; typedef struct _xRectangle *xRectanglePtr; typedef struct _GrabRec *GrabPtr; -typedef struct _GenericMaskRec *GenericMaskPtr; /* typedefs from other places - duplicated here to minimize the amount * of unnecessary junk that one would normally have to include to get diff --git a/include/windowstr.h b/include/windowstr.h index a1d501d37..959ea0ec1 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -77,17 +77,15 @@ typedef struct _DevCursorNode { struct _DevCursorNode* next; } DevCursNodeRec, *DevCursNodePtr, *DevCursorList; -typedef struct _GEClientRec { - Mask eventMask[MAXEXTENSIONS]; - ClientPtr client; - struct _GEClientRec* next; -} GEClientRec, *GEClientPtr; - -/* Mask structure for GE extension. Allows one mask per extension. */ -typedef struct _GEEventMasks { - Mask eventMasks[MAXEXTENSIONS]; - struct _GEClientRec* geClients; -} GEEventMasksRec, *GEEventMasksPtr; +/* Mask structure for GE extension as stored on the window. + * Allows one mask per extension. + * .eventMask - Summary mask for all clients, used for quick checking. + * .geClients - list of clients with their specific mask. + */ +typedef struct _GenericClientMasks { + Mask eventMasks[MAXEXTENSIONS]; + GenericMaskPtr geClients; +} GenericClientMasksRec, *GenericClientMasksPtr; typedef struct _WindowAccessRec { int defaultRule; /* WindowAccessDenyAll */ @@ -117,7 +115,7 @@ typedef struct _WindowOpt { struct _OtherInputMasks *inputMasks; /* default: NULL */ #endif DevCursorList deviceCursors; /* default: NULL */ - struct _GEEventMasks* geMasks; /* default: NULL */ + struct _GenericClientMasks *geMasks;/* default: NULL */ WindowAccessRec access; } WindowOptRec, *WindowOptPtr; From c1a6841a64576b7e688e9ca0d3e0db8acf52d4ae Mon Sep 17 00:00:00 2001 From: Paulo Ricardo Zanoni Date: Tue, 10 Jul 2007 10:08:44 +0930 Subject: [PATCH 140/634] ProcX{Change|Query}WindowAccess: change device list from char* to XID*. --- Xi/chaccess.c | 8 ++++---- Xi/qryacces.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Xi/chaccess.c b/Xi/chaccess.c index 5005e9435..f09920600 100644 --- a/Xi/chaccess.c +++ b/Xi/chaccess.c @@ -65,7 +65,7 @@ int ProcXChangeWindowAccess(ClientPtr client) { int padding, err, i; - CARD8* deviceids = NULL; + XID* deviceids = NULL; WindowPtr win; DeviceIntPtr* perm_devices = NULL; DeviceIntPtr* deny_devices = NULL; @@ -73,10 +73,10 @@ ProcXChangeWindowAccess(ClientPtr client) REQUEST_AT_LEAST_SIZE(xChangeWindowAccessReq); - padding = (4 - ((stuff->npermit + stuff->ndeny) % 4)) % 4; + padding = (4 - (((stuff->npermit + stuff->ndeny) * sizeof(XID)) % 4)) % 4; if (stuff->length != ((sizeof(xChangeWindowAccessReq) + - (stuff->npermit + stuff->ndeny + padding)) >> 2)) + (((stuff->npermit + stuff->ndeny) * sizeof(XID)) + padding)) >> 2)) { SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, 0, BadLength); @@ -102,7 +102,7 @@ ProcXChangeWindowAccess(ClientPtr client) } if (stuff->npermit || stuff->ndeny) - deviceids = (CARD8*)&stuff[1]; + deviceids = (XID*)&stuff[1]; if (stuff->npermit) { diff --git a/Xi/qryacces.c b/Xi/qryacces.c index 817bec8a3..b59696939 100644 --- a/Xi/qryacces.c +++ b/Xi/qryacces.c @@ -69,7 +69,7 @@ ProcXQueryWindowAccess(ClientPtr client) DeviceIntPtr *perm, *deny; int nperm, ndeny, i; int defaultRule; - CARD8* deviceids; + XID* deviceids; xQueryWindowAccessReply rep; REQUEST(xQueryWindowAccessReq); @@ -88,7 +88,7 @@ ProcXQueryWindowAccess(ClientPtr client) rep.repType = X_Reply; rep.RepType = X_QueryWindowAccess; rep.sequenceNumber = client->sequence; - rep.length = (nperm + ndeny + 3) >> 2; + rep.length = ((nperm + ndeny) * sizeof(XID) + 3) >> 2; rep.defaultRule = defaultRule; rep.npermit = nperm; rep.ndeny = ndeny; @@ -96,7 +96,7 @@ ProcXQueryWindowAccess(ClientPtr client) if (nperm + ndeny) { - deviceids = (CARD8*)xalloc((nperm + ndeny) * sizeof(CARD8)); + deviceids = (XID*)xalloc((nperm + ndeny) * sizeof(XID)); if (!deviceids) { ErrorF("ProcXQueryWindowAccess: xalloc failure.\n"); @@ -110,7 +110,7 @@ ProcXQueryWindowAccess(ClientPtr client) for (i = 0; i < ndeny; i++) deviceids[i + nperm] = deny[i]->id; - WriteToClient(client, nperm + ndeny, (char*)deviceids); + WriteToClient(client, (nperm + ndeny) * sizeof(XID), (char*)deviceids); xfree(deviceids); } return Success; From 3312e4dd5e055b2cb445b5d5c617aa7a611eedc1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 6 Jul 2007 16:41:52 +0930 Subject: [PATCH 141/634] Call CheckMotion for all core events. We need to do this to update the sprites x/y coordinate before we assemble a button event. Absolute devices may send a buttonEvent with valuators attached. If we don't update the sprite before assembling the event, the valuators are lost and the button press is delivered to the previous position of the device. Doesn't have any effect on relative devices. --- dix/events.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dix/events.c b/dix/events.c index 1bec4fc5b..9a6ab33f6 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3634,6 +3634,12 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo); } } + /* We need to call CheckMotion for each event. It doesn't really give us + any benefit for relative devices, but absolute devices won't send + button events to the right position. + */ + if (!CheckMotion(xE, mouse) && xE->u.u.type == MotionNotify) + return; if (xE->u.u.type != MotionNotify) { int key; @@ -3682,8 +3688,7 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) FatalError("bogus pointer event from ddx"); } } - else if (!CheckMotion(xE, mouse)) - return; + if (grab) DeliverGrabbedEvent(xE, mouse, deactivateGrab, count); else From 62efc3951a96648cf975302aa6651cb67b87fa64 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 6 Jul 2007 17:00:20 +0930 Subject: [PATCH 142/634] DeliverGrabbedEvent: stop segfault when gemask == NULL. --- dix/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/events.c b/dix/events.c index 9a6ab33f6..8fcbec76a 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3283,7 +3283,7 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, xGenericEvent* ge = ((xGenericEvent*)xE); GenericMaskPtr gemask = grab->genericMasks; - if (!gemask->eventMask[GEEXTIDX(ge)]) + if (!gemask || !gemask->eventMask[GEEXTIDX(ge)]) return; if (GEEventFill(xE)) From 9809715afaafee9baf2aef348c1ebda7e8b3f076 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 9 Jul 2007 10:42:03 +0930 Subject: [PATCH 143/634] Change CheckMotion to ignore non-pointer events but acknowledge XI events. Call CheckMotion from ProcessOtherEvents() to make sure absolute XI events update the sprite before an event is sent. --- Xi/exevents.c | 2 ++ dix/events.c | 72 +++++++++++++++++++++++++++++++++++---------------- 2 files changed, 52 insertions(+), 22 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index c13b74705..8f60561e9 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -129,6 +129,8 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) if (grab && grab->coreGrab && !device->deviceGrab.fromPassiveGrab) return; + CheckMotion(xE, device); + if (xE->u.u.type != DeviceValuator && xE->u.u.type != GenericEvent) { DeviceIntPtr mouse = NULL, kbd = NULL; GetSpritePosition(device, &rootX, &rootY); diff --git a/dix/events.c b/dix/events.c index 8fcbec76a..097ebba69 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2449,10 +2449,16 @@ XYToWindow(DeviceIntPtr pDev, int x, int y) * position, then update the event with the new coordinates that may have been * changed. If the window underneath the sprite has changed, change to new * cursor and send enter/leave events. + * + * CheckMotion() will not do anything and return FALSE if the event is not a + * pointer event. + * + * @return TRUE if the sprite has moved or FALSE otherwise. */ Bool CheckMotion(xEvent *xE, DeviceIntPtr pDev) { + INT16 *rootX, *rootY; WindowPtr prevSpriteWin; SpritePtr pSprite = pDev->spriteInfo->sprite; @@ -2465,21 +2471,44 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev) if (xE && !syncEvents.playingEvents) { - if (pSprite->hot.pScreen != pSprite->hotPhys.pScreen) - { - pSprite->hot.pScreen = pSprite->hotPhys.pScreen; - RootWindow(pDev) = WindowTable[pSprite->hot.pScreen->myNum]; - } - pSprite->hot.x = XE_KBPTR.rootX; - pSprite->hot.y = XE_KBPTR.rootY; - if (pSprite->hot.x < pSprite->physLimits.x1) - pSprite->hot.x = pSprite->physLimits.x1; - else if (pSprite->hot.x >= pSprite->physLimits.x2) - pSprite->hot.x = pSprite->physLimits.x2 - 1; - if (pSprite->hot.y < pSprite->physLimits.y1) - pSprite->hot.y = pSprite->physLimits.y1; - else if (pSprite->hot.y >= pSprite->physLimits.y2) - pSprite->hot.y = pSprite->physLimits.y2 - 1; + /* GetPointerEvents() guarantees that pointer events have the correct + rootX/Y set already. */ + switch(xE->u.u.type) + { + case ButtonPress: + case ButtonRelease: + case MotionNotify: + rootX = &XE_KBPTR.rootX; + rootY = &XE_KBPTR.rootY; + break; + default: + if (xE->u.u.type == DeviceButtonPress || + xE->u.u.type == DeviceButtonRelease || + xE->u.u.type == DeviceMotionNotify) + { + rootX = &((deviceKeyButtonPointer*)xE)->root_x; + rootY = &((deviceKeyButtonPointer*)xE)->root_y; + break; + } + /* all other events return FALSE */ + return FALSE; + } + + if (pSprite->hot.pScreen != pSprite->hotPhys.pScreen) + { + pSprite->hot.pScreen = pSprite->hotPhys.pScreen; + RootWindow(pDev) = WindowTable[pSprite->hot.pScreen->myNum]; + } + pSprite->hot.x = *rootX; + pSprite->hot.y = *rootY; + if (pSprite->hot.x < pSprite->physLimits.x1) + pSprite->hot.x = pSprite->physLimits.x1; + else if (pSprite->hot.x >= pSprite->physLimits.x2) + pSprite->hot.x = pSprite->physLimits.x2 - 1; + if (pSprite->hot.y < pSprite->physLimits.y1) + pSprite->hot.y = pSprite->physLimits.y1; + else if (pSprite->hot.y >= pSprite->physLimits.y2) + pSprite->hot.y = pSprite->physLimits.y2 - 1; #ifdef SHAPE if (pSprite->hotShape) ConfineToShape(pDev, pSprite->hotShape, &pSprite->hot.x, &pSprite->hot.y); @@ -2490,16 +2519,16 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev) #endif pSprite->hotPhys = pSprite->hot; - if ((pSprite->hotPhys.x != XE_KBPTR.rootX) || - (pSprite->hotPhys.y != XE_KBPTR.rootY)) + if ((pSprite->hotPhys.x != *rootX) || + (pSprite->hotPhys.y != *rootY)) { (*pSprite->hotPhys.pScreen->SetCursorPosition)( pDev, pSprite->hotPhys.pScreen, pSprite->hotPhys.x, pSprite->hotPhys.y, FALSE); } - XE_KBPTR.rootX = pSprite->hot.x; - XE_KBPTR.rootY = pSprite->hot.y; + *rootX = pSprite->hot.x; + *rootY = pSprite->hot.y; } #ifdef XEVIE @@ -3635,9 +3664,8 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) } } /* We need to call CheckMotion for each event. It doesn't really give us - any benefit for relative devices, but absolute devices won't send - button events to the right position. - */ + any benefit for relative devices, but absolute devices may not send + button events to the right position otherwise. */ if (!CheckMotion(xE, mouse) && xE->u.u.type == MotionNotify) return; if (xE->u.u.type != MotionNotify) From 583e988b9f7cfb9293144c8309023c0dd1766715 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 10 Jul 2007 09:19:02 +0930 Subject: [PATCH 144/634] Install geext.h, otherwise drivers won't build. --- Xext/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xext/Makefile.am b/Xext/Makefile.am index 2fcac89a3..cdfd0dc71 100644 --- a/Xext/Makefile.am +++ b/Xext/Makefile.am @@ -15,7 +15,7 @@ INCLUDES = -I$(top_srcdir)/hw/xfree86/dixmods/extmod AM_CFLAGS = $(DIX_CFLAGS) if XORG -sdk_HEADERS = xvdix.h xvmcext.h +sdk_HEADERS = xvdix.h xvmcext.h geext.h endif # Sources always included in libXextbuiltin.la & libXext.la From ffdf8f3e452638e6b050fccabee465d6c0300f45 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 10 Jul 2007 13:56:38 +0930 Subject: [PATCH 145/634] DeliverEventsToWindow: ensure that genericMask has a defined value. --- autogen.sh | 2 +- dix/events.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/autogen.sh b/autogen.sh index 66acd288d..54e9f337d 100755 --- a/autogen.sh +++ b/autogen.sh @@ -9,4 +9,4 @@ cd $srcdir autoreconf -v --install || exit 1 cd $ORIGDIR || exit $? -$srcdir/configure --enable-maintainer-mode --disable-dmx --enable-kdrive "$@" +$srcdir/configure --enable-maintainer-mode --disable-dmx --enable-dri --enable-kdrive "$@" diff --git a/dix/events.c b/dix/events.c index 097ebba69..7de8d2ea6 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2020,9 +2020,8 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent /* get the XGE event mask. * FIXME: needs to be freed somewhere too. */ - if (!pWin->optional || !pWin->optional->geMasks) - tempGrab.genericMasks = NULL; - else + tempGrab.genericMasks = NULL; + if (pWin->optional && pWin->optional->geMasks) { GenericClientMasksPtr gemasks = pWin->optional->geMasks; GenericMaskPtr geclient = gemasks->geClients; From 9eddede039f6cbcc323b7e3e4e841c43d3ed4f43 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 16 Jul 2007 18:01:00 +0930 Subject: [PATCH 146/634] mieqEnqueue: Don't try to update the time for GenericEvents. Doing so may overwrite the event's length field and cause havoc. Also check if realloc'd memory did actually return valid pointer. --- mi/mieq.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mi/mieq.c b/mi/mieq.c index 4b299509d..c3f63fb8b 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -184,6 +184,11 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e) { evt->evlen = evlen; evt->event = xrealloc(evt->event, evt->evlen); + if (!evt->event) + { + ErrorF("Running out of memory. Tossing event.\n"); + return; + } } memcpy(evt->event, e, evlen); @@ -191,8 +196,9 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e) /* Make sure that event times don't go backwards - this * is "unnecessary", but very useful. */ - if (e->u.keyButtonPointer.time < miEventQueue.lastEventTime && - miEventQueue.lastEventTime - e->u.keyButtonPointer.time < 10000) + if (e->u.u.type != GenericEvent && + e->u.keyButtonPointer.time < miEventQueue.lastEventTime && + miEventQueue.lastEventTime - e->u.keyButtonPointer.time < 10000) evt->event->u.keyButtonPointer.time = miEventQueue.lastEventTime; miEventQueue.lastEventTime = evt->event->u.keyButtonPointer.time; @@ -293,7 +299,9 @@ mieqProcessInputEvents(void) memcpy(&event[i], e->events[i].event, sizeof(xEvent)); } else + { event = e->events->event; + } /* MPX devices send both core and Xi events. * Use dev to get the correct processing function but supply From a0b87f87fb8753955505958bf3d438eef191302d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 7 Aug 2007 10:49:33 +0930 Subject: [PATCH 147/634] dix: check for core event to determine if grab is a core grab (CreateGrab). Checking for VCP/VCK is simply not a safe way to check if a grab is a core grab. --- dix/grabs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dix/grabs.c b/dix/grabs.c index af471ebb3..9150c3c14 100644 --- a/dix/grabs.c +++ b/dix/grabs.c @@ -87,8 +87,7 @@ CreateGrab( return (GrabPtr)NULL; grab->resource = FakeClientID(client); grab->device = device; - grab->coreGrab = ((device == inputInfo.keyboard) || - (device == inputInfo.pointer)); + grab->coreGrab = (type < LASTEvent); grab->window = window; grab->eventMask = eventMask; grab->deviceMask = 0; From b8abeaf74ee8296d4bc3164a5a253624f984a6d4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 7 Aug 2007 12:32:46 +0930 Subject: [PATCH 148/634] dix: get the paired keyboard for a passive grab (ProcGrabButton). Taking the VCK is only correct if no physical device is connected, and even then it's not really a good idea. --- dix/events.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dix/events.c b/dix/events.c index 7de8d2ea6..faf8eedd5 100644 --- a/dix/events.c +++ b/dix/events.c @@ -5326,6 +5326,7 @@ ProcGrabButton(ClientPtr client) REQUEST(xGrabButtonReq); CursorPtr cursor; GrabPtr grab; + DeviceIntPtr pointer, modifierDevice; int rc; REQUEST_SIZE_MATCH(xGrabButtonReq); @@ -5381,11 +5382,15 @@ ProcGrabButton(ClientPtr client) } } + pointer = PickPointer(client); + modifierDevice = GetPairedKeyboard(pointer); + if (!modifierDevice) + modifierDevice = inputInfo.keyboard; - grab = CreateGrab(client->index, PickPointer(client), pWin, + grab = CreateGrab(client->index, pointer, pWin, (Mask)stuff->eventMask, (Bool)stuff->ownerEvents, (Bool) stuff->keyboardMode, (Bool)stuff->pointerMode, - inputInfo.keyboard, stuff->modifiers, ButtonPress, + modifierDevice, stuff->modifiers, ButtonPress, stuff->button, confineTo, cursor); if (!grab) return BadAlloc; From c02128532e910e813fba94983733942d30c2d5cb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 8 Aug 2007 13:10:00 +0930 Subject: [PATCH 149/634] dix: Allow flexible devices for passive core grabs. A passive core grab doesn't specify the device, and is thus created with the ClientPointer as device. When this grab is activated later, don't actually activate the grab on the grab device, but rather change the device to the one that caused the grab to activate. Same procedure for keyboards. Makes core apps _A LOT_ more useable and reduces the need to set the ClientPointer. Only applies to core grabs! --- dix/events.c | 193 ++++++++++++++++++++++++++++++++++++++++++--- dix/grabs.c | 28 +++++-- include/dixgrabs.h | 3 +- 3 files changed, 207 insertions(+), 17 deletions(-) diff --git a/dix/events.c b/dix/events.c index faf8eedd5..7627f4ebe 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1685,17 +1685,45 @@ AllowSome(ClientPtr client, * Server-side protocol handling for AllowEvents request. * * Release some events from a frozen device. + * + * In some cases, the grab the client has is not on the ClientPointer but on + * some other device (see ProcGrabPointer comments). To cover this case, we + * need to run through all devices to ensure we don't forget the device we + * actually have a grab on. */ int ProcAllowEvents(ClientPtr client) { TimeStamp time; - DeviceIntPtr mouse = PickPointer(client); - DeviceIntPtr keybd = PickKeyboard(client); + DeviceIntPtr mouse = NULL, + grabbed; + DeviceIntPtr keybd = NULL; + GrabPtr grab; REQUEST(xAllowEventsReq); REQUEST_SIZE_MATCH(xAllowEventsReq); time = ClientTimeToServerTime(stuff->time); + + for (grabbed = inputInfo.devices; grabbed; grabbed = grabbed->next) + { + grab = grabbed->deviceGrab.grab; + if (grab && grab->coreGrab && SameClient(grab, client)) + { + if (IsPointerDevice(grabbed)) + mouse = grabbed; + else if (IsKeyboardDevice(grabbed)) + keybd = grabbed; + + if (mouse && keybd) + break; + } + } + + if (!mouse) + mouse = PickPointer(client); + if (!keybd) + keybd = PickKeyboard(client); + switch (stuff->mode) { case ReplayPointer: @@ -3104,7 +3132,8 @@ CheckPassiveGrabsOnWindow( #else grab->modifierDevice->key->state; #endif - if (GrabMatchesSecond(&tempGrab, grab) && + /* ignore the device for core events when comparing grabs */ + if (GrabMatchesSecond(&tempGrab, grab, (xE->u.u.type < LASTEvent)) && (!grab->confineTo || (grab->confineTo->realized && BorderSizeNotEmpty(device, grab->confineTo)))) @@ -3119,6 +3148,23 @@ CheckPassiveGrabsOnWindow( } #endif grabinfo = &device->deviceGrab; + /* A passive grab may have been created for a different device + than it is assigned to at this point in time. + Update the grab's device and modifier device to reflect the + current state. + XXX: Since XGrabDeviceButton requires to specify the + modifierDevice explicitly, we don't override this choice. + This essentially requires a client to re-create all + passiveGrabs when the pairing changes... oh well. + */ + if (xE->u.u.type < LASTEVENT) + { + grab->device = device; + grab->modifierDevice = GetPairedKeyboard(device); + if (!grab->modifierDevice) + grab->modifierDevice = inputInfo.keyboard; + } + (*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE); FixUpEventFromWindow(device, xE, grab->window, None, TRUE); @@ -4607,10 +4653,16 @@ ProcGetInputFocus(ClientPtr client) } /** - * Server-side protocol handling for Grabpointer request. + * Server-side protocol handling for GrabPointer request. * * Sets an active grab on the client's ClientPointer and returns success * status to client. + * + * A special case of GrabPointer is when there is already a grab on some + * device (by the same client). In this case, this grab is overwritten, and + * the device stays as it is. This case can happen when a client has a passive + * grab and then grabs the pointer, or when the client already has an active + * grab and the ClientPointer was changed since. */ int ProcGrabPointer(ClientPtr client) @@ -4623,6 +4675,7 @@ ProcGrabPointer(ClientPtr client) REQUEST(xGrabPointerReq); TimeStamp time; int rc; + DeviceIntPtr grabbed = NULL; REQUEST_SIZE_MATCH(xGrabPointerReq); UpdateCurrentTime(); @@ -4677,6 +4730,21 @@ ProcGrabPointer(ClientPtr client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.length = 0; + + /* Check if a the client already has a grab on a device */ + for(grabbed = inputInfo.devices; grabbed; grabbed = grabbed->next) + { + if (IsPointerDevice(grabbed)) + { + grab = grabbed->deviceGrab.grab; + if (grab && grab->coreGrab && SameClient(grab, client)) + { + device = grabbed; + break; + } + } + } + grab = device->deviceGrab.grab; if ((grab) && !SameClient(grab, client)) rep.status = AlreadyGrabbed; @@ -4720,6 +4788,7 @@ ProcGrabPointer(ClientPtr client) FreeCursor (oldCursor, (Cursor)0); rep.status = GrabSuccess; + /* guarantee only one core pointer grab at a time by this client */ RemoveOtherCoreGrabs(client, device); } WriteReplyToClient(client, sizeof(xGrabPointerReply), &rep); @@ -4732,12 +4801,14 @@ ProcGrabPointer(ClientPtr client) * Changes properties of the grab hold by the client. If the client does not * hold an active grab on the device, nothing happens. * - * Works on the client's ClientPointer. + * Works on the client's ClientPointer, but in some cases the client may have + * a grab on a device that isn't the ClientPointer (see ProcGrabPointer + * comments). */ int ProcChangeActivePointerGrab(ClientPtr client) { - DeviceIntPtr device = PickPointer(client); + DeviceIntPtr device, grabbed; GrabPtr grab = device->deviceGrab.grab; CursorPtr newCursor, oldCursor; REQUEST(xChangeActivePointerGrabReq); @@ -4761,6 +4832,31 @@ ProcChangeActivePointerGrab(ClientPtr client) return BadCursor; } } + if (!grab && !SameClient(grab, client)) + { + /* no grab on ClientPointer, or some other client has a grab on our + * ClientPointer, let's check if we have a pointer grab on some other + * device. */ + for(grabbed = inputInfo.devices; grabbed; grabbed = grabbed->next) + { + if (IsPointerDevice(grabbed)) + { + grab = grabbed->deviceGrab.grab; + if (grab && grab->coreGrab && SameClient(grab, client)) + { + device = grabbed; + break; + } + } + } + /* nope. no grab on any actual device */ + if (!grabbed) + { + device = inputInfo.pointer; + grab = inputInfo.pointer->deviceGrab.grab; + } + } + if (!grab) return Success; if (!SameClient(grab, client)) @@ -4783,12 +4879,17 @@ ProcChangeActivePointerGrab(ClientPtr client) /** * Server-side protocol handling for UngrabPointer request. * - * Deletes the pointer grab on the client's ClientPointer device. + * Deletes a pointer grab on a device the client has grabbed. This should be + * the ClientPointer, but may not be. So we search the device list for a + * device we have a pointer grab on and then ungrab this device. (see + * ProcGrabPointer comments). We are guaranteed that the client doesn't have + * more than one core pointer grab at a time. */ int ProcUngrabPointer(ClientPtr client) { - DeviceIntPtr device = PickPointer(client); + DeviceIntPtr device = PickPointer(client), + grabbed; GrabPtr grab; TimeStamp time; REQUEST(xResourceReq); @@ -4796,6 +4897,31 @@ ProcUngrabPointer(ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); UpdateCurrentTime(); grab = device->deviceGrab.grab; + + if (!grab || !grab->coreGrab || !SameClient(grab, client)) + { + /* No pointer grab on ClientPointer. May be a pointer grab on some + * other device */ + for(grabbed = inputInfo.devices; grabbed; grabbed = grabbed->next) + { + if (IsPointerDevice(grabbed)) + { + grab = grabbed->deviceGrab.grab; + if (grab && grab->coreGrab && SameClient(grab, client)) + { + device = grabbed; + break; + } + } + } + /* nope. no grab on any actual device */ + if (!grabbed) + { + device = inputInfo.pointer; + grab = inputInfo.pointer->deviceGrab.grab; + } + } + time = ClientTimeToServerTime(stuff->id); if ((CompareTimeStamps(time, currentTime) != LATER) && (CompareTimeStamps(time, device->deviceGrab.grabTime) != EARLIER) && @@ -4935,6 +5061,15 @@ RemoveOtherCoreGrabs(ClientPtr client, DeviceIntPtr dev) * Server-side protocol handling for GrabKeyboard request. * * Grabs the client's keyboard and returns success status to client. + * + * In some special cases the client may already have a grab on a keyboard that + * is not the one that is paired with the ClientPointer. This can happen when + * the client alreay has a passive grab on some keyboard device, or when the + * client actively grabbed the keyboard and the ClientPointer or keyboard + * pairing was changed since. + * Therefore, we need to run through all the keyboards available and check if + * there's already a grab on it from our client. The client will only ever + * have one core keyboard grab at a time. */ int ProcGrabKeyboard(ClientPtr client) @@ -4942,16 +5077,32 @@ ProcGrabKeyboard(ClientPtr client) xGrabKeyboardReply rep; REQUEST(xGrabKeyboardReq); int result; - DeviceIntPtr keyboard = PickKeyboard(client); + DeviceIntPtr keyboard = PickKeyboard(client), + grabbed; + GrabPtr grab; REQUEST_SIZE_MATCH(xGrabKeyboardReq); + for (grabbed = inputInfo.devices; grabbed; grabbed = grabbed->next) + { + if (IsKeyboardDevice(grabbed)) + { + grab = grabbed->deviceGrab.grab; + if (grab && grab->coreGrab && SameClient(grab, client)) + { + keyboard = grabbed; + break; + } + } + } + if (XaceHook(XACE_DEVICE_ACCESS, client, keyboard, TRUE)) { result = GrabDevice(client, keyboard, stuff->keyboardMode, stuff->pointerMode, stuff->grabWindow, stuff->ownerEvents, stuff->time, KeyPressMask | KeyReleaseMask, &rep.status, TRUE); + /* ensure only one core keyboard grab by this client */ RemoveOtherCoreGrabs(client, keyboard); } else { @@ -4972,18 +5123,40 @@ ProcGrabKeyboard(ClientPtr client) * Server-side protocol handling for UngrabKeyboard request. * * Deletes a possible grab on the client's keyboard. + * + * We may have a grab on a keyboard that isn't the ClientPointer's keyboard. + * Thus we need to check all keyboar devices for a grab. (see ProcGrabKeyboard + * comments) */ int ProcUngrabKeyboard(ClientPtr client) { - DeviceIntPtr device = PickKeyboard(client); + DeviceIntPtr device = PickKeyboard(client), + grabbed; GrabPtr grab; TimeStamp time; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); UpdateCurrentTime(); + + if (!grab || !grab->coreGrab || !SameClient(grab, client)) + { + for (grabbed = inputInfo.devices; grabbed; grabbed = grabbed->next) + { + if (IsKeyboardDevice(grabbed)) + { + grab = device->deviceGrab.grab; + if (grab && grab->coreGrab && SameClient(grab, client)) + { + device = grabbed; + break; + } + } + } + } grab = device->deviceGrab.grab; + time = ClientTimeToServerTime(stuff->id); if ((CompareTimeStamps(time, currentTime) != LATER) && (CompareTimeStamps(time, device->deviceGrab.grabTime) != EARLIER) && diff --git a/dix/grabs.c b/dix/grabs.c index 9150c3c14..01f4b6439 100644 --- a/dix/grabs.c +++ b/dix/grabs.c @@ -240,12 +240,28 @@ GrabSupersedesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab) return FALSE; } +/** + * Compares two grabs and returns TRUE if the first grab matches the second + * grab. + * + * A match is when + * - the devices set for the grab are equal (this is optional). + * - the event types for both grabs are equal. + * - XXX + * + * @param ignoreDevice TRUE if the device settings on the grabs are to be + * ignored. + * @return TRUE if the grabs match or FALSE otherwise. + */ Bool -GrabMatchesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab) +GrabMatchesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab, Bool ignoreDevice) { - if ((pFirstGrab->device != pSecondGrab->device) || - (pFirstGrab->modifierDevice != pSecondGrab->modifierDevice) || - (pFirstGrab->type != pSecondGrab->type)) + if (!ignoreDevice && + ((pFirstGrab->device != pSecondGrab->device) || + (pFirstGrab->modifierDevice != pSecondGrab->modifierDevice))) + return FALSE; + + if (pFirstGrab->type != pSecondGrab->type) return FALSE; if (GrabSupersedesSecond(pFirstGrab, pSecondGrab) || @@ -278,7 +294,7 @@ AddPassiveGrabToList(GrabPtr pGrab) for (grab = wPassiveGrabs(pGrab->window); grab; grab = grab->next) { - if (GrabMatchesSecond(pGrab, grab)) + if (GrabMatchesSecond(pGrab, grab, FALSE)) { if (CLIENT_BITS(pGrab->resource) != CLIENT_BITS(grab->resource)) { @@ -343,7 +359,7 @@ DeletePassiveGrabFromList(GrabPtr pMinuendGrab) grab = grab->next) { if ((CLIENT_BITS(grab->resource) != CLIENT_BITS(pMinuendGrab->resource)) || - !GrabMatchesSecond(grab, pMinuendGrab)) + !GrabMatchesSecond(grab, pMinuendGrab, FALSE)) continue; if (GrabSupersedesSecond(pMinuendGrab, grab)) { diff --git a/include/dixgrabs.h b/include/dixgrabs.h index 2d66d6ba1..b237ab3ad 100644 --- a/include/dixgrabs.h +++ b/include/dixgrabs.h @@ -47,7 +47,8 @@ extern int DeletePassiveGrab( extern Bool GrabMatchesSecond( GrabPtr /* pFirstGrab */, - GrabPtr /* pSecondGrab */); + GrabPtr /* pSecondGrab */, + Bool /*ignoreDevice*/); extern int AddPassiveGrabToList( GrabPtr /* pGrab */); From b1272eefd9a3e340d65c14903f337747ec82d021 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 8 Aug 2007 15:00:02 +0930 Subject: [PATCH 150/634] Fix typo from last commit. Oh well. --- dix/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/events.c b/dix/events.c index 7627f4ebe..6727a170c 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3157,7 +3157,7 @@ CheckPassiveGrabsOnWindow( This essentially requires a client to re-create all passiveGrabs when the pairing changes... oh well. */ - if (xE->u.u.type < LASTEVENT) + if (xE->u.u.type < LASTEvent) { grab->device = device; grab->modifierDevice = GetPairedKeyboard(device); From 14d0397cded699378fa3c19f4e61dbab7d3a9b2c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 15 Aug 2007 22:12:29 +0930 Subject: [PATCH 151/634] dix: ProcUngrabKeyboard: make sure grab is initialized. This should fix the random segfaults with ProcUngrabKeyboard. Thanks to David Nolden for spotting it. --- dix/events.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dix/events.c b/dix/events.c index 4cfdab757..76894ca55 100644 --- a/dix/events.c +++ b/dix/events.c @@ -5139,6 +5139,8 @@ ProcUngrabKeyboard(ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); UpdateCurrentTime(); + grab = device->deviceGrab.grab; + if (!grab || !grab->coreGrab || !SameClient(grab, client)) { for (grabbed = inputInfo.devices; grabbed; grabbed = grabbed->next) From 2c1431a76e7219e3bd14fd7f7888a8bc4fea0f58 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 20 Aug 2007 10:06:13 +0930 Subject: [PATCH 152/634] dix: ProcChangeActivePointerGrab: make sure variable is initialised. Thanks to Ben Close for spotting it. --- dix/events.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dix/events.c b/dix/events.c index 76894ca55..4c9ca3b8a 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4808,7 +4808,7 @@ int ProcChangeActivePointerGrab(ClientPtr client) { DeviceIntPtr device, grabbed; - GrabPtr grab = device->deviceGrab.grab; + GrabPtr grab; CursorPtr newCursor, oldCursor; REQUEST(xChangeActivePointerGrabReq); TimeStamp time; @@ -4831,7 +4831,11 @@ ProcChangeActivePointerGrab(ClientPtr client) return BadCursor; } } - if (!grab && !SameClient(grab, client)) + + device = PickPointer(client); + grab = device->deviceGrab.grab; + + if (!grab || !SameClient(grab, client)) { /* no grab on ClientPointer, or some other client has a grab on our * ClientPointer, let's check if we have a pointer grab on some other From 88a9828ef906bba973debc191e35ea669b7ec271 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 23 Aug 2007 18:02:10 +0930 Subject: [PATCH 153/634] dix: Only check device events for possible ACLs. We shouldn't be able to restrict events like Expose, etc. with device based ACLs. So we just ignore all non-input events when checking for permissions. --- dix/access.c | 33 ++++++++++++++++++++++++++++++--- dix/events.c | 6 ++++-- include/input.h | 3 ++- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/dix/access.c b/dix/access.c index 970d7c49a..20157162b 100644 --- a/dix/access.c +++ b/dix/access.c @@ -36,6 +36,7 @@ from the author. #include #include +#include "exglobals.h" #include "input.h" #include "inputstr.h" @@ -257,15 +258,41 @@ ACQueryWindowAccess(WindowPtr win, * If no rule could be found, allow. */ Bool -ACDeviceAllowed(WindowPtr win, DeviceIntPtr dev) +ACDeviceAllowed(WindowPtr win, DeviceIntPtr dev, xEvent* xE) { int i; if (!win) /* happens for parent of RootWindow */ return True; + /* there's a number of events we don't care about */ + switch (xE->u.u.type) + { + case ButtonPress: + case ButtonRelease: + case MotionNotify: + case EnterNotify: + case LeaveNotify: + case KeyPress: + case KeyRelease: + break; + default: + if (xE->u.u.type == DeviceMotionNotify || + xE->u.u.type == DeviceButtonPress || + xE->u.u.type == DeviceButtonRelease || + xE->u.u.type == DeviceKeyPress || + xE->u.u.type == DeviceKeyRelease || + xE->u.u.type == DeviceEnterNotify || + xE->u.u.type == DeviceLeaveNotify) + { + break; + } + return True; + } + + if (!win->optional) /* no list, check parent */ - return ACDeviceAllowed(win->parent, dev); + return ACDeviceAllowed(win->parent, dev, xE); for (i = 0; i < win->optional->access.nperm; i++) { @@ -282,6 +309,6 @@ ACDeviceAllowed(WindowPtr win, DeviceIntPtr dev) return False; } - return ACDeviceAllowed(win->parent, dev); + return ACDeviceAllowed(win->parent, dev, xE); } diff --git a/dix/events.c b/dix/events.c index 4c9ca3b8a..0f413a670 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1928,8 +1928,10 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent /* if a is denied, we return 0. This could cause the caller to * traverse the parent. May be bad! (whot) */ - if (!ACDeviceAllowed(pWin, pDev)) + if (!ACDeviceAllowed(pWin, pDev, pEvents)) + { return 0; + } /* CantBeFiltered means only window owner gets the event */ if ((filter == CantBeFiltered) || @@ -3348,7 +3350,7 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, } if (!deliveries) { - if (ACDeviceAllowed(grab->window, thisDev)) + if (ACDeviceAllowed(grab->window, thisDev, xE)) { if (xE->u.u.type == GenericEvent) { diff --git a/include/input.h b/include/input.h index 6443a58f6..d86a969c8 100644 --- a/include/input.h +++ b/include/input.h @@ -495,7 +495,8 @@ extern void ACQueryWindowAccess(WindowPtr win, int* ndeny); extern Bool ACDeviceAllowed(WindowPtr win, - DeviceIntPtr dev); + DeviceIntPtr dev, + xEvent* xE); /* Implemented by the DDX. */ extern int NewInputDeviceRequest( From cc5c926267be099d793e6dfec17916f21c73c64d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 30 Aug 2007 15:51:22 +0930 Subject: [PATCH 154/634] randr: RRPointerScreenConfigured needs to move all pointers. Previous version only moved the VCP, causing "bogus pointer events" lateron. Now we run through the device list, updating each pointer separately if necessary. Also stick a big warning into RRPointerMoved, not sure what device we need to work on here. --- randr/rrpointer.c | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/randr/rrpointer.c b/randr/rrpointer.c index 722b22c99..e3b8b0395 100644 --- a/randr/rrpointer.c +++ b/randr/rrpointer.c @@ -52,7 +52,7 @@ RRCrtcContainsPosition (RRCrtcPtr crtc, int x, int y) * Find the CRTC nearest the specified position, ignoring 'skip' */ static void -RRPointerToNearestCrtc (ScreenPtr pScreen, int x, int y, RRCrtcPtr skip) +RRPointerToNearestCrtc (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, RRCrtcPtr skip) { rrScrPriv (pScreen); int c; @@ -96,7 +96,7 @@ RRPointerToNearestCrtc (ScreenPtr pScreen, int x, int y, RRCrtcPtr skip) } } if (best_dx || best_dy) - (*pScreen->SetCursorPosition) (inputInfo.pointer, pScreen, x + best_dx, y + best_dy, TRUE); + (*pScreen->SetCursorPosition) (pDev, pScreen, x + best_dx, y + best_dy, TRUE); pScrPriv->pointerCrtc = nearest; } @@ -125,28 +125,37 @@ RRPointerMoved (ScreenPtr pScreen, int x, int y) } /* None contain pointer, find nearest */ - RRPointerToNearestCrtc (pScreen, x, y, pointerCrtc); + ErrorF("RRPointerMoved: Untested, may cause \"bogus pointer event\"\n"); + RRPointerToNearestCrtc (inputInfo.pointer, pScreen, x, y, pointerCrtc); } /* - * When the screen is reconfigured, move the pointer to the nearest + * When the screen is reconfigured, move all pointers to the nearest * CRTC */ void RRPointerScreenConfigured (ScreenPtr pScreen) { - WindowPtr pRoot = GetCurrentRootWindow (inputInfo.pointer); - ScreenPtr pCurrentScreen = pRoot ? pRoot->drawable.pScreen : NULL; + WindowPtr pRoot; + ScreenPtr pCurrentScreen; int x, y; - - /* XXX: GetCurrentRootWindow revices an argument, It is inputInfo.pointer, - * but I really think this is wrong... What do we do here? This was made so - * that it can compile, but I don't think randr should assume there is just - * one pointer. There might be more than one pointer on the screen! So, what - * to do? What happens? */ + DeviceIntPtr pDev; if (pScreen != pCurrentScreen) return; - GetSpritePosition(inputInfo.pointer, &x, &y); - RRPointerToNearestCrtc (pScreen, x, y, NULL); + + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) + { + if (IsPointerDevice(pDev)) + { + pRoot = GetCurrentRootWindow(pDev); + pCurrentScreen = pRoot ? pRoot->drawable.pScreen : NULL; + + if (pScreen == pCurrentScreen) + { + GetSpritePosition(pDev, &x, &y); + RRPointerToNearestCrtc (pDev, pScreen, x, y, NULL); + } + } + } } From bfe6b4d2d9952a80f8dbc63eec974ef894e5c226 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 4 Sep 2007 17:44:51 +0930 Subject: [PATCH 155/634] xkb: Store the action filters per device in the XkbSrvInfoRec. Using a global array for action filters is bad. If two keyboard hit a modifier at the same time, releaseing the first one will deactivate the filter and thus the second keyboard can never release the modifier again. --- include/xkbsrv.h | 21 ++++++++++++ xkb/xkbActions.c | 85 ++++++++++++++++++++---------------------------- 2 files changed, 57 insertions(+), 49 deletions(-) diff --git a/include/xkbsrv.h b/include/xkbsrv.h index e018749a6..be2cff67f 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -126,6 +126,24 @@ typedef struct _XkbEventCause { #define _BEEP_LED_CHANGE 14 #define _BEEP_BOUNCE_REJECT 15 +struct _XkbSrvInfo; /* definition see below */ + +typedef struct _XkbFilter { + CARD16 keycode; + CARD8 what; + CARD8 active; + CARD8 filterOthers; + CARD32 priv; + XkbAction upAction; + int (*filter)( + struct _XkbSrvInfo* /* xkbi */, + struct _XkbFilter * /* filter */, + unsigned /* keycode */, + XkbAction * /* action */ + ); + struct _XkbFilter *next; +} XkbFilterRec,*XkbFilterPtr; + typedef struct _XkbSrvInfo { XkbStateRec prev_state; XkbStateRec state; @@ -169,6 +187,9 @@ typedef struct _XkbSrvInfo { OsTimerPtr bounceKeysTimer; OsTimerPtr repeatKeyTimer; OsTimerPtr krgTimer; + + int szFilters; + XkbFilterPtr filters; } XkbSrvInfoRec, *XkbSrvInfoPtr; #define XkbSLI_IsDefault (1L<<0) diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 252c6537e..762b6e586 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -73,7 +73,7 @@ XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc) if (!AllocateDevicePrivate(device, xkbDevicePrivateIndex)) return; - xkbPrivPtr = (xkbDeviceInfoPtr) xalloc(sizeof(xkbDeviceInfoRec)); + xkbPrivPtr = (xkbDeviceInfoPtr) xcalloc(1, sizeof(xkbDeviceInfoRec)); if (!xkbPrivPtr) return; xkbPrivPtr->unwrapProc = NULL; @@ -237,22 +237,6 @@ XkbAction fake; #define SYNTHETIC_KEYCODE 1 #define BTN_ACT_FLAG 0x100 -typedef struct _XkbFilter { - CARD16 keycode; - CARD8 what; - CARD8 active; - CARD8 filterOthers; - CARD32 priv; - XkbAction upAction; - int (*filter)( - XkbSrvInfoPtr /* xkbi */, - struct _XkbFilter * /* filter */, - unsigned /* keycode */, - XkbAction * /* action */ - ); - struct _XkbFilter *next; -} XkbFilterRec,*XkbFilterPtr; - static int _XkbFilterSetState( XkbSrvInfoPtr xkbi, XkbFilterPtr filter, @@ -1099,32 +1083,32 @@ int button; } #endif -static int szFilters = 0; -static XkbFilterPtr filters = NULL; - static XkbFilterPtr _XkbNextFreeFilter( - void + XkbSrvInfoPtr xkbi ) { register int i; - if (szFilters==0) { - szFilters = 4; - filters = _XkbTypedCalloc(szFilters,XkbFilterRec); + if (xkbi->szFilters==0) { + xkbi->szFilters = 4; + xkbi->filters = _XkbTypedCalloc(xkbi->szFilters,XkbFilterRec); /* 6/21/93 (ef) -- XXX! deal with allocation failure */ } - for (i=0;iszFilters;i++) { + if (!xkbi->filters[i].active) { + xkbi->filters[i].keycode = 0; + return &xkbi->filters[i]; } } - szFilters*=2; - filters= _XkbTypedRealloc(filters,szFilters,XkbFilterRec); + xkbi->szFilters*=2; + xkbi->filters= _XkbTypedRealloc(xkbi->filters, + xkbi->szFilters, + XkbFilterRec); /* 6/21/93 (ef) -- XXX! deal with allocation failure */ - bzero(&filters[szFilters/2],(szFilters/2)*sizeof(XkbFilterRec)); - return &filters[szFilters/2]; + bzero(&xkbi->filters[xkbi->szFilters/2], + (xkbi->szFilters/2)*sizeof(XkbFilterRec)); + return &xkbi->filters[xkbi->szFilters/2]; } static int @@ -1133,9 +1117,10 @@ _XkbApplyFilters(XkbSrvInfoPtr xkbi,unsigned kc,XkbAction *pAction) register int i,send; send= 1; - for (i=0;iszFilters;i++) { + if ((xkbi->filters[i].active)&&(xkbi->filters[i].filter)) + send= ((*xkbi->filters[i].filter)(xkbi,&xkbi->filters[i],kc,pAction) + && send); } return send; } @@ -1164,6 +1149,8 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); keyc= kbd->key; xkbi= keyc->xkbInfo; key= xE->u.u.detail; + /* The state may change, so if we're not in the middle of sending a state + * notify, prepare for it */ if ((xkbi->flags&_XkbStateNotifyInProgress)==0) { oldState= xkbi->state; xkbi->flags|= _XkbStateNotifyInProgress; @@ -1200,62 +1187,62 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); switch (act.type) { case XkbSA_SetMods: case XkbSA_SetGroup: - filter = _XkbNextFreeFilter(); + filter = _XkbNextFreeFilter(xkbi); sendEvent = _XkbFilterSetState(xkbi,filter,key,&act); break; case XkbSA_LatchMods: case XkbSA_LatchGroup: - filter = _XkbNextFreeFilter(); + filter = _XkbNextFreeFilter(xkbi); sendEvent=_XkbFilterLatchState(xkbi,filter,key,&act); break; case XkbSA_LockMods: case XkbSA_LockGroup: - filter = _XkbNextFreeFilter(); + filter = _XkbNextFreeFilter(xkbi); sendEvent=_XkbFilterLockState(xkbi,filter,key,&act); break; case XkbSA_ISOLock: - filter = _XkbNextFreeFilter(); + filter = _XkbNextFreeFilter(xkbi); sendEvent=_XkbFilterISOLock(xkbi,filter,key,&act); break; case XkbSA_MovePtr: - filter = _XkbNextFreeFilter(); + filter = _XkbNextFreeFilter(xkbi); sendEvent= _XkbFilterPointerMove(xkbi,filter,key,&act); break; case XkbSA_PtrBtn: case XkbSA_LockPtrBtn: case XkbSA_SetPtrDflt: - filter = _XkbNextFreeFilter(); + filter = _XkbNextFreeFilter(xkbi); sendEvent= _XkbFilterPointerBtn(xkbi,filter,key,&act); break; case XkbSA_Terminate: sendEvent= XkbDDXTerminateServer(dev,key,&act); break; case XkbSA_SwitchScreen: - filter = _XkbNextFreeFilter(); + filter = _XkbNextFreeFilter(xkbi); sendEvent=_XkbFilterSwitchScreen(xkbi,filter,key,&act); break; case XkbSA_SetControls: case XkbSA_LockControls: - filter = _XkbNextFreeFilter(); + filter = _XkbNextFreeFilter(xkbi); sendEvent=_XkbFilterControls(xkbi,filter,key,&act); break; case XkbSA_ActionMessage: - filter = _XkbNextFreeFilter(); + filter = _XkbNextFreeFilter(xkbi); sendEvent=_XkbFilterActionMessage(xkbi,filter,key,&act); break; case XkbSA_RedirectKey: - filter = _XkbNextFreeFilter(); + filter = _XkbNextFreeFilter(xkbi); sendEvent= _XkbFilterRedirectKey(xkbi,filter,key,&act); break; #ifdef XINPUT case XkbSA_DeviceBtn: case XkbSA_LockDeviceBtn: - filter = _XkbNextFreeFilter(); + filter = _XkbNextFreeFilter(xkbi); sendEvent= _XkbFilterDeviceBtn(xkbi,filter,key,&act); break; #endif case XkbSA_XFree86Private: - filter = _XkbNextFreeFilter(); + filter = _XkbNextFreeFilter(xkbi); sendEvent= _XkbFilterXF86Private(xkbi,filter,key,&act); break; } @@ -1355,7 +1342,7 @@ unsigned clear; act.type = XkbSA_LatchMods; act.mods.flags = 0; act.mods.mask = mask&latches; - filter = _XkbNextFreeFilter(); + filter = _XkbNextFreeFilter(xkbi); _XkbFilterLatchState(xkbi,filter,SYNTHETIC_KEYCODE,&act); _XkbFilterLatchState(xkbi,filter,SYNTHETIC_KEYCODE,(XkbAction *)NULL); return Success; @@ -1375,7 +1362,7 @@ XkbAction act; act.type = XkbSA_LatchGroup; act.group.flags = 0; XkbSASetGroup(&act.group,group); - filter = _XkbNextFreeFilter(); + filter = _XkbNextFreeFilter(xkbi); _XkbFilterLatchState(xkbi,filter,SYNTHETIC_KEYCODE,&act); _XkbFilterLatchState(xkbi,filter,SYNTHETIC_KEYCODE,(XkbAction *)NULL); return Success; From c4fff050836feeef8390b7197f1de39af2997811 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 5 Sep 2007 16:19:45 +0930 Subject: [PATCH 156/634] Revert "Input: Fix stuck modifiers (bug #11683)" This reverts commit 6b055e5d9751e3679ff98065e43225ec8a960053. MPX relies on the XI event being delivered before the core event. Device grabs break, amongst other things. I guess stuck modifiers need to be fixed some other way. Conflicts: dix/getevents.c --- dix/getevents.c | 56 +++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index bcbc00bcb..e88c56c5f 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -451,14 +451,6 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type, ms = GetTimeInMillis(); - if (pDev->coreEvents) { - xEvent* evt = events->event; - evt->u.keyButtonPointer.time = ms; - evt->u.u.type = type; - evt->u.u.detail = key_code; - events++; - } - kbp = (deviceKeyButtonPointer *) events->event; kbp->time = ms; kbp->deviceid = pDev->id; @@ -476,6 +468,12 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type, num_valuators, valuators); } + if (pDev->coreEvents) { + events->event->u.keyButtonPointer.time = ms; + events->event->u.u.type = type; + events->event->u.u.detail = key_code; + } + return numEvents; } @@ -677,28 +675,8 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, pDev->valuator->lastx = x; pDev->valuator->lasty = y; - /* for some reason inputInfo.pointer does not have coreEvents set */ - if (coreOnly || pDev->coreEvents) { - xEvent* evt = events->event; - evt->u.u.type = type; - evt->u.keyButtonPointer.time = ms; - evt->u.keyButtonPointer.rootX = x; - evt->u.keyButtonPointer.rootY = y; - - if (type == ButtonPress || type == ButtonRelease) { - /* We hijack SetPointerMapping to work on all core-sending - * devices, so we use the device-specific map here instead of - * the core one. */ - evt->u.u.detail = pDev->button->map[buttons]; - } - else { - evt->u.u.detail = 0; - } - - events++; - } - - if (!coreOnly) { + if (!coreOnly) + { kbp = (deviceKeyButtonPointer *) events->event; kbp->time = ms; kbp->deviceid = pDev->id; @@ -726,6 +704,24 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, } } + /* for some reason inputInfo.pointer does not have coreEvents set */ + if (coreOnly || pDev->coreEvents) { + events->event->u.u.type = type; + events->event->u.keyButtonPointer.time = ms; + events->event->u.keyButtonPointer.rootX = x; + events->event->u.keyButtonPointer.rootY = y; + + if (type == ButtonPress || type == ButtonRelease) { + /* We hijack SetPointerMapping to work on all core-sending + * devices, so we use the device-specific map here instead of + * the core one. */ + events->event->u.u.detail = pDev->button->map[buttons]; + } + else { + events->event->u.u.detail = 0; + } + } + return num_events; } From 03680a384aa423ece75b658f00b96db2628c39fa Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 6 Sep 2007 15:43:47 +0930 Subject: [PATCH 157/634] dix: don't change the device struct while processing core events. The device state needs to be changed while processing the XI event. Core events are always processed after XI, so by then the device is already set up properly. However, we now rely on DeviceButtonMotionMask to be equal to ButtonMotionMask. It already is, but stick a big fat warning in so nobody attempts to change it. This commit disables XKB for the VCK, thus essentially for all devices. Temporarily anyway. --- Xi/exevents.c | 3 --- Xi/extinit.c | 12 +++++++++ dix/devices.c | 4 +-- dix/events.c | 72 ++++++++++++--------------------------------------- 4 files changed, 31 insertions(+), 60 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 8f60561e9..aa2b4c9de 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -126,9 +126,6 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) ValuatorClassPtr v = device->valuator; deviceValuator *xV = (deviceValuator *) xE; - if (grab && grab->coreGrab && !device->deviceGrab.fromPassiveGrab) - return; - CheckMotion(xE, device); if (xE->u.u.type != DeviceValuator && xE->u.u.type != GenericEvent) { diff --git a/Xi/extinit.c b/Xi/extinit.c index 70253fe82..1d23809dc 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -879,8 +879,20 @@ FixExtensionEvents(ExtensionEntry * extEntry) SetEventInfo(GetNextExtEventMask(), _deviceButton3Motion); SetEventInfo(GetNextExtEventMask(), _deviceButton4Motion); SetEventInfo(GetNextExtEventMask(), _deviceButton5Motion); + + /* If DeviceButtonMotionMask is != ButtonMotionMask, event delivery + * breaks down. The device needs the dev->button->motionMask. If DBMM is + * the same as BMM, we can ensure that both core and device events can be + * delivered, without the need for extra structures in the DeviceIntRec. + */ DeviceButtonMotionMask = GetNextExtEventMask(); SetEventInfo(DeviceButtonMotionMask, _deviceButtonMotion); + if (DeviceButtonMotionMask != ButtonMotionMask) + { + /* This should never happen, but if it does, hide under the + * bed and cry for help. */ + ErrorF("DeviceButtonMotionMask != ButtonMotionMask. Trouble!\n"); + } DeviceFocusChangeMask = GetNextExtEventMask(); SetMaskForExtEvent(DeviceFocusChangeMask, DeviceFocusIn); diff --git a/dix/devices.c b/dix/devices.c index 60825c156..fbb6cba66 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -458,8 +458,8 @@ InitCoreDevices(void) #ifdef XKB dev->public.processInputProc = CoreProcessKeyboardEvent; dev->public.realInputProc = CoreProcessKeyboardEvent; - if (!noXkbExtension) - XkbSetExtension(dev, ProcessKeyboardEvent); + /*if (!noXkbExtension)*/ + /*XkbSetExtension(dev, ProcessKeyboardEvent);*/ #else dev->public.processInputProc = ProcessKeyboardEvent; dev->public.realInputProc = ProcessKeyboardEvent; diff --git a/dix/events.c b/dix/events.c index 0f413a670..07a191fa3 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3524,7 +3524,9 @@ drawable.id:0; #endif ))) #endif - XE_KBPTR.state = (keyc->state | GetPairedPointer(keybd)->button->state); + /* ProcessOtherEvent already updated the keyboard's state, so we need to + * access prev_state here! */ + XE_KBPTR.state = (keyc->prev_state | GetPairedPointer(keybd)->button->state); XE_KBPTR.rootX = keybd->spriteInfo->sprite->hot.x; XE_KBPTR.rootY = keybd->spriteInfo->sprite->hot.y; key = xE->u.u.detail; @@ -3545,31 +3547,14 @@ drawable.id:0; switch (xE->u.u.type) { case KeyPress: - if (*kptr & bit) /* allow ddx to generate multiple downs */ - { - if (!modifiers) - { - xE->u.u.type = KeyRelease; - (*keybd->public.processInputProc)(xE, keybd, count); - xE->u.u.type = KeyPress; - /* release can have side effects, don't fall through */ - (*keybd->public.processInputProc)(xE, keybd, count); - } - return; - } - GetPairedPointer(keybd)->valuator->motionHintWindow = NullWindow; - *kptr |= bit; - keyc->prev_state = keyc->state; - for (i = 0, mask = 1; modifiers; i++, mask <<= 1) - { - if (mask & modifiers) - { - /* This key affects modifier "i" */ - keyc->modifierKeyCount[i]++; - keyc->state |= mask; - modifiers &= ~mask; - } - } + /* We MUST NOT change the device itself here. All device state + * changes must be performed in ProcessOtherEvents. We're dealing + * with the same device struct, so if we change it in POE and + * here, we've just screwed up the state by setting it twice. + * + * Devices may not send core events but always send XI events, so + * the state must be changed in POE, not here. + */ if (!grab && CheckDeviceGrabs(keybd, xE, 0, count)) { grabinfo->activatingKey = key; @@ -3579,20 +3564,7 @@ drawable.id:0; case KeyRelease: if (!(*kptr & bit)) /* guard against duplicates */ return; - GetPairedPointer(keybd)->valuator->motionHintWindow = NullWindow; - *kptr &= ~bit; - keyc->prev_state = keyc->state; - for (i = 0, mask = 1; modifiers; i++, mask <<= 1) - { - if (mask & modifiers) { - /* This key affects modifier "i" */ - if (--keyc->modifierKeyCount[i] <= 0) { - keyc->state &= ~mask; - keyc->modifierKeyCount[i] = 0; - } - modifiers &= ~mask; - } - } + /* No device state changes, see comment for KeyPress */ if (grabinfo->fromPassiveGrab && (key == grabinfo->activatingKey)) deactivateGrab = TRUE; break; @@ -3729,31 +3701,21 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) switch (xE->u.u.type) { case ButtonPress: - mouse->valuator->motionHintWindow = NullWindow; - if (!(*kptr & bit)) - butc->buttonsDown++; - butc->motionMask = ButtonMotionMask; - *kptr |= bit; + /* + * We rely on the fact that ButtonMotionMask is the same as + * DeviceButtonMotionMask, so setting the motionMask + * to this value ensures correctness for both XI and core events. + */ if (xE->u.u.detail == 0) return; - if (xE->u.u.detail <= 5) - butc->state |= (Button1Mask >> 1) << xE->u.u.detail; filters[MotionNotify] = Motion_Filter(butc); if (!grab) if (CheckDeviceGrabs(mouse, xE, 0, count)) return; break; case ButtonRelease: - mouse->valuator->motionHintWindow = NullWindow; - if (*kptr & bit) - --butc->buttonsDown; - if (!butc->buttonsDown) - butc->motionMask = 0; - *kptr &= ~bit; if (xE->u.u.detail == 0) return; - if (xE->u.u.detail <= 5) - butc->state &= ~((Button1Mask >> 1) << xE->u.u.detail); filters[MotionNotify] = Motion_Filter(butc); if (!butc->state && mouse->deviceGrab.fromPassiveGrab) deactivateGrab = TRUE; From 49dbe9a757a3d7a0b9ab318242c6cc0cbd4dd1f0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 6 Sep 2007 17:27:28 +0930 Subject: [PATCH 158/634] dix: close virtual core devices after other devices. If a device is paired with the VCP, deleting the VCP before the device will segfault the server when the sprite should get updated. --- dix/devices.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index fbb6cba66..e60601636 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -712,9 +712,6 @@ CloseDownDevices(void) { DeviceIntPtr dev, next; - CloseDevice(inputInfo.keyboard); - CloseDevice(inputInfo.pointer); - for (dev = inputInfo.devices; dev; dev = next) { next = dev->next; @@ -725,6 +722,10 @@ CloseDownDevices(void) next = dev->next; CloseDevice(dev); } + + CloseDevice(inputInfo.keyboard); + CloseDevice(inputInfo.pointer); + inputInfo.devices = NULL; inputInfo.off_devices = NULL; inputInfo.keyboard = NULL; From 6334d4e7be18de5f237c12a6dc20f75aa23477d0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 6 Sep 2007 18:49:57 +0930 Subject: [PATCH 159/634] xkb: enable XI event processing for xkb. XI events can now take the same processing paths as core events, and should do the correct state changes etc. There's some cases where XKB will use KeyPress as type for an event to be delivered to the client. Stuck warnings in, not sure what the correct solution is yet. --- include/xkbsrv.h | 3 ++- xkb/xkbActions.c | 40 +++++++++++++++-------------- xkb/xkbEvents.c | 43 +++++++++++++++++++++++++------ xkb/xkbPrKeyEv.c | 67 +++++++++++++++++++++++++++++++++--------------- 4 files changed, 104 insertions(+), 49 deletions(-) diff --git a/include/xkbsrv.h b/include/xkbsrv.h index be2cff67f..e220f0ac9 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -311,8 +311,9 @@ extern CARD32 xkbDebugFlags; #define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c)) #define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d))) -extern int DeviceKeyPress,DeviceKeyRelease; +extern int DeviceKeyPress,DeviceKeyRelease,DeviceMotionNotify; extern int DeviceButtonPress,DeviceButtonRelease; +extern int DeviceEnterNotify,DeviceLeaveNotify; #ifdef XINPUT #define _XkbIsPressEvent(t) (((t)==KeyPress)||((t)==DeviceKeyPress)) diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 762b6e586..e51b0cca9 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -39,6 +39,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include "xkb.h" #include +#define EXTENSION_EVENT_BASE 64 static unsigned int _xkbServerGeneration; static int xkbDevicePrivateIndex = -1; @@ -83,13 +84,11 @@ XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc) proc,xkbUnwrapProc); } -#ifdef XINPUT extern void ProcessOtherEvent( xEvent * /* xE */, DeviceIntPtr /* dev */, int /* count */ ); -#endif /***====================================================================***/ @@ -673,6 +672,7 @@ _XkbFilterPointerBtn( XkbSrvInfoPtr xkbi, &old,xkbi->desc->ctrls, &cn,False)) { cn.keycode = keycode; + /* XXX: what about DeviceKeyPress? */ cn.eventType = KeyPress; cn.requestMajor = 0; cn.requestMinor = 0; @@ -737,6 +737,7 @@ XkbEventCauseRec cause; ctrls->enabled_ctrls|= change; if (XkbComputeControlsNotify(kbd,&old,ctrls,&cn,False)) { cn.keycode = keycode; + /* XXX: what about DeviceKeyPress? */ cn.eventType = KeyPress; cn.requestMajor = 0; cn.requestMinor = 0; @@ -878,6 +879,7 @@ ProcessInputProc backupproc; filter->filter = _XkbFilterRedirectKey; filter->upAction = *pAction; + /* XXX: what about DeviceKeyPress */ ev.u.u.type = KeyPress; ev.u.u.detail = pAction->redirect.new_key; @@ -905,6 +907,10 @@ ProcessInputProc backupproc; realMods = xkbi->device->key->modifierMap[ev.u.u.detail]; xkbi->device->key->modifierMap[ev.u.u.detail] = 0; + /* XXX: Bad! Since the switch to XI devices xkbi->device will be the + * XI device. Sending a core event through ProcessOtherEvent will + * cause trouble. Somebody should fix this. + */ UNWRAP_PROCESS_INPUT_PROC(xkbi->device,xkbPrivPtr, backupproc); xkbi->device->public.processInputProc(&ev,xkbi->device,1); COND_WRAP_PROCESS_INPUT_PROC(xkbi->device, xkbPrivPtr, @@ -919,6 +925,7 @@ ProcessInputProc backupproc; } else if (filter->keycode==keycode) { + /* XXX: what about DeviceKeyRelease */ ev.u.u.type = KeyRelease; ev.u.u.detail = filter->upAction.redirect.new_key; @@ -946,6 +953,10 @@ ProcessInputProc backupproc; realMods = xkbi->device->key->modifierMap[ev.u.u.detail]; xkbi->device->key->modifierMap[ev.u.u.detail] = 0; + /* XXX: Bad! Since the switch to XI devices xkbi->device will be the + * XI device. Sending a core event through ProcessOtherEvent will + * cause trouble. Somebody should fix this. + */ UNWRAP_PROCESS_INPUT_PROC(xkbi->device,xkbPrivPtr, backupproc); xkbi->device->public.processInputProc(&ev,xkbi->device,1); COND_WRAP_PROCESS_INPUT_PROC(xkbi->device, xkbPrivPtr, @@ -1009,7 +1020,6 @@ _XkbFilterXF86Private( XkbSrvInfoPtr xkbi, return 1; } -#ifdef XINPUT static int _XkbFilterDeviceBtn( XkbSrvInfoPtr xkbi, @@ -1081,7 +1091,6 @@ int button; } return 0; } -#endif static XkbFilterPtr _XkbNextFreeFilter( @@ -1139,9 +1148,7 @@ XkbAction act; XkbFilterPtr filter; Bool keyEvent; Bool pressEvent; -#ifdef XINPUT Bool xiEvent; -#endif ProcessInputProc backupproc; xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); @@ -1162,7 +1169,6 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); xkbi->groupChange = 0; sendEvent = 1; -#ifdef XINPUT keyEvent= ((xE->u.u.type==KeyPress)||(xE->u.u.type==DeviceKeyPress)|| (xE->u.u.type==KeyRelease)||(xE->u.u.type==DeviceKeyRelease)); pressEvent= (xE->u.u.type==KeyPress)||(xE->u.u.type==DeviceKeyPress)|| @@ -1170,10 +1176,6 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); xiEvent= (xE->u.u.type==DeviceKeyPress)||(xE->u.u.type==DeviceKeyRelease)|| (xE->u.u.type==DeviceButtonPress)|| (xE->u.u.type==DeviceButtonRelease); -#else - keyEvent= (xE->u.u.type==KeyPress)||(xE->u.u.type==KeyRelease); - pressEvent= (xE->u.u.type==KeyPress)||(xE->u.u.type==ButtonPress); -#endif if (pressEvent) { if (keyEvent) @@ -1234,13 +1236,11 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); filter = _XkbNextFreeFilter(xkbi); sendEvent= _XkbFilterRedirectKey(xkbi,filter,key,&act); break; -#ifdef XINPUT case XkbSA_DeviceBtn: case XkbSA_LockDeviceBtn: filter = _XkbNextFreeFilter(xkbi); sendEvent= _XkbFilterDeviceBtn(xkbi,filter,key,&act); break; -#endif case XkbSA_XFree86Private: filter = _XkbNextFreeFilter(xkbi); sendEvent= _XkbFilterXF86Private(xkbi,filter,key,&act); @@ -1279,11 +1279,6 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); } if (sendEvent) { -#ifdef XINPUT - if (xiEvent) - ProcessOtherEvent(xE,dev,count); - else -#endif if (keyEvent) { realMods = keyc->modifierMap[key]; keyc->modifierMap[key] = 0; @@ -1293,7 +1288,14 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); backupproc,xkbUnwrapProc); keyc->modifierMap[key] = realMods; } - else CoreProcessPointerEvent(xE,dev,count); + else + { + if (xE->u.u.type & EXTENSION_EVENT_BASE) + ProcessOtherEvent(xE, dev, count); + else + CoreProcessPointerEvent(xE,dev,count); + + } } else if (keyEvent) FixKeyState(xE,dev); diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c index 973e1ad1d..22ca2d6e9 100644 --- a/xkb/xkbEvents.c +++ b/xkb/xkbEvents.c @@ -34,6 +34,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #include +#include #include "inputstr.h" #include "windowstr.h" #include @@ -814,7 +815,9 @@ GrabInfoPtr grabinfo; if ( pClient->xkbClientFlags & _XkbClientInitialized ) { #ifdef DEBUG if ((xkbDebugFlags&0x10)&& - ((xE[0].u.u.type==KeyPress)||(xE[0].u.u.type==KeyRelease))) { + ((xE[0].u.u.type==KeyPress)||(xE[0].u.u.type==KeyRelease)|| + (xE[0].u.u.type==DeviceKeyPress)|| + (xE[0].u.u.type == DeviceKeyRelease))) { ErrorF("XKbFilterWriteEvents:\n"); ErrorF(" Event state= 0x%04x\n",xE[0].u.keyButtonPointer.state); ErrorF(" XkbLastRepeatEvent!=xE (0x%p!=0x%p) %s\n", @@ -834,7 +837,9 @@ GrabInfoPtr grabinfo; } if ((pXDev->deviceGrab.grab != NullGrab) && pXDev->deviceGrab.fromPassiveGrab && - ((xE[0].u.u.type==KeyPress)||(xE[0].u.u.type==KeyRelease))) { + ((xE[0].u.u.type==KeyPress)||(xE[0].u.u.type==KeyRelease)|| + (xE[0].u.u.type==DeviceKeyPress)|| + (xE[0].u.u.type == DeviceKeyRelease))) { register unsigned state,flags; flags= pClient->xkbClientFlags; @@ -879,10 +884,12 @@ GrabInfoPtr grabinfo; type= xE[i].u.u.type; #ifdef DEBUG if ((xkbDebugFlags&0x4)&& - ((xE[0].u.u.type==KeyPress)||(xE[0].u.u.type==KeyRelease))) { + ((xE[i].u.u.type==KeyPress)||(xE[i].u.u.type==KeyRelease)|| + (xE[i].u.u.type==DeviceKeyPress)|| + (xE[i].u.u.type == DeviceKeyRelease))) { XkbStatePtr s= &xkbi->state; ErrorF("XKbFilterWriteEvents (non-XKB):\n"); - ErrorF("event= 0x%04x\n",xE[0].u.keyButtonPointer.state); + ErrorF("event= 0x%04x\n",xE[i].u.keyButtonPointer.state); ErrorF("lookup= 0x%02x, grab= 0x%02x\n",s->lookup_mods, s->grab_mods); ErrorF("compat lookup= 0x%02x, grab= 0x%02x\n", @@ -902,9 +909,22 @@ GrabInfoPtr grabinfo; xE[i].u.keyButtonPointer.state= new; } else if ((type==EnterNotify)||(type==LeaveNotify)) { - xE->u.enterLeave.state&= 0x1F00; - xE->u.enterLeave.state|= xkbi->state.compat_grab_mods; - } + xE[i].u.enterLeave.state&= 0x1F00; + xE[i].u.enterLeave.state|= xkbi->state.compat_grab_mods; + } else if ((type>=DeviceKeyPress)&&(type<=DeviceMotionNotify)) { + CARD16 old, new; + deviceKeyButtonPointer *kbp = (deviceKeyButtonPointer*)&xE[i]; + old= kbp->state&(~0x1F00); + new= kbp->state&0x1F00; + if (old==XkbStateFieldFromRec(&xkbi->state)) + new|= xkbi->state.compat_lookup_mods; + else new|= xkbi->state.compat_grab_mods; + kbp->state= new; + } else if ((type==DeviceEnterNotify)||(type==DeviceLeaveNotify)) { + deviceEnterNotify *del = (deviceEnterNotify*)&xE[i]; + del->state&=0x1F00; + del->state|= xkbi->state.compat_grab_mods; + } button_mask = 1 << xE[i].u.u.detail; if (type == ButtonPress && ((xE[i].u.keyButtonPointer.state >> 7) & button_mask) == button_mask && @@ -913,7 +933,14 @@ GrabInfoPtr grabinfo; ErrorF("Faking release of button %d\n", xE[i].u.u.detail); #endif XkbDDXFakePointerButton(ButtonRelease, xE[i].u.u.detail); - } + } else if (type == DeviceButtonPress && + ((((deviceKeyButtonPointer*)&xE[i])->state >> 7) & button_mask) == button_mask && + (xkbi->lockedPtrButtons & button_mask) == button_mask) { +#ifdef DEBUG + ErrorF("Faking release of button %d\n", ((deviceKeyButtonPointer*)&xE[i])->state) +#endif + XkbDDXFakePointerButton(DeviceButtonRelease, ((deviceKeyButtonPointer*)&xE[i])->state); + } } } return True; diff --git a/xkb/xkbPrKeyEv.c b/xkb/xkbPrKeyEv.c index 02f3c35fe..ba3fcc06c 100644 --- a/xkb/xkbPrKeyEv.c +++ b/xkb/xkbPrKeyEv.c @@ -38,6 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "inputstr.h" #include #include +#define EXTENSION_EVENT_BASE 64 /***====================================================================***/ @@ -50,9 +51,11 @@ XkbSrvInfoPtr xkbi; int key; XkbBehavior behavior; unsigned ndx; +int xiEvent; xkbi= keyc->xkbInfo; key= xE->u.u.detail; + xiEvent= (xE->u.u.type & EXTENSION_EVENT_BASE); #ifdef DEBUG if (xkbDebugFlags&0x8) { ErrorF("XkbPKE: Key %d %s\n",key,(xE->u.u.type==KeyPress?"down":"up")); @@ -70,51 +73,68 @@ unsigned ndx; /* do anything to implement the behavior, but it *does* report that */ /* key is hardwired */ - /* FIXME: this is bad. The down mask is set during ProcessOtherEvent. When - * we start processing the core event (and eventually arrive here), the - * down mask is already set and Xkb thinks it's a repeat event. We just - * silently ignore it for now. - */ -#if 0 if ((behavior.type&XkbKB_Permanent)==0) { switch (behavior.type) { case XkbKB_Default: - if (( xE->u.u.type == KeyPress ) && + if (( xE->u.u.type == KeyPress || + xE->u.u.type == DeviceKeyPress) && (keyc->down[key>>3] & (1<<(key&7)))) { XkbLastRepeatEvent= (pointer)xE; - xE->u.u.type = KeyRelease; + + if (xiEvent) + xE->u.u.type = DeviceKeyRelease; + else + xE->u.u.type = KeyRelease; XkbHandleActions(keybd,keybd,xE,count); - xE->u.u.type = KeyPress; + + if (xiEvent) + xE->u.u.type = DeviceKeyPress; + else + xE->u.u.type = KeyPress; XkbHandleActions(keybd,keybd,xE,count); XkbLastRepeatEvent= NULL; return; } - else if ((xE->u.u.type==KeyRelease) && + else if ((xE->u.u.type==KeyRelease || + xE->u.u.type == DeviceKeyRelease) && (!(keyc->down[key>>3]&(1<<(key&7))))) { XkbLastRepeatEvent= (pointer)&xE; - xE->u.u.type = KeyPress; + if (xiEvent) + xE->u.u.type = DeviceKeyPress; + else + xE->u.u.type = KeyPress; XkbHandleActions(keybd,keybd,xE,count); - xE->u.u.type = KeyRelease; + if (xiEvent) + xE->u.u.type = DeviceKeyRelease; + else + xE->u.u.type = KeyRelease; XkbHandleActions(keybd,keybd,xE,count); XkbLastRepeatEvent= NULL; return; } break; case XkbKB_Lock: - if ( xE->u.u.type == KeyRelease ) + if ( xE->u.u.type == KeyRelease || + xE->u.u.type == DeviceKeyRelease) return; else { int bit= 1<<(key&7); if ( keyc->down[key>>3]&bit ) - xE->u.u.type= KeyRelease; - } + { + if (xiEvent) + xE->u.u.type = DeviceKeyRelease; + else + xE->u.u.type= KeyRelease; + } + } break; case XkbKB_RadioGroup: ndx= (behavior.data&(~XkbKB_RGAllowNone)); if ( ndxnRadioGroups ) { XkbRadioGroupPtr rg; - if ( xE->u.u.type == KeyRelease ) + if ( xE->u.u.type == KeyRelease || + xE->u.u.type == DeviceKeyRelease) return; rg = &xkbi->radioGroups[ndx]; @@ -128,10 +148,16 @@ unsigned ndx; } if ( rg->currentDown!=0 ) { int key = xE->u.u.detail; - xE->u.u.type= KeyRelease; + if (xiEvent) + xE->u.u.type = DeviceKeyRelease; + else + xE->u.u.type= KeyRelease; xE->u.u.detail= rg->currentDown; XkbHandleActions(keybd,keybd,xE,count); - xE->u.u.type= KeyPress; + if (xiEvent) + xE->u.u.type = DeviceKeyPress; + else + xE->u.u.type= KeyPress; xE->u.u.detail= key; } rg->currentDown= key; @@ -160,7 +186,6 @@ unsigned ndx; break; } } -#endif XkbHandleActions(keybd,keybd,xE,count); return; } @@ -181,9 +206,9 @@ XkbSrvInfoPtr xkbi; #endif if ((xkbi->desc->ctrls->enabled_ctrls&XkbAllFilteredEventsMask)==0) XkbProcessKeyboardEvent(xE,keybd,count); - else if (xE->u.u.type==KeyPress) + else if (xE->u.u.type==KeyPress || xE->u.u.type==DeviceKeyPress) AccessXFilterPressEvent(xE,keybd,count); - else if (xE->u.u.type==KeyRelease) + else if (xE->u.u.type==KeyRelease || xE->u.u.type==DeviceKeyRelease) AccessXFilterReleaseEvent(xE,keybd,count); return; } From 5ee409794ee604fcf84886f70429fc2d6b1ff4f1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 6 Sep 2007 18:52:02 +0930 Subject: [PATCH 160/634] dix: add XI event support to FixKeyState. FixKeyState needs to be able to handle XI events, otherwise we get "impossible keyboard events" on server zaps and other special key combos. --- dix/events.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/dix/events.c b/dix/events.c index 07a191fa3..ad9ec1ca1 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3584,7 +3584,7 @@ drawable.id:0; #ifdef XKB /* This function is used to set the key pressed or key released state - this is only used when the pressing of keys does not cause - CoreProcessKeyEvent to be called, as in for example Mouse Keys. + the device's processInputProc to be called, as in for example Mouse Keys. */ void FixKeyState (xEvent *xE, DeviceIntPtr keybd) @@ -3597,22 +3597,19 @@ FixKeyState (xEvent *xE, DeviceIntPtr keybd) kptr = &keyc->down[key >> 3]; bit = 1 << (key & 7); - if (((xE->u.u.type==KeyPress)||(xE->u.u.type==KeyRelease))) { + if (((xE->u.u.type==KeyPress)||(xE->u.u.type==KeyRelease)|| + (xE->u.u.type==DeviceKeyPress)||(xE->u.u.type==DeviceKeyRelease)) + ) { DebugF("FixKeyState: Key %d %s\n",key, - (xE->u.u.type==KeyPress?"down":"up")); + (((xE->u.u.type==KeyPress)||(xE->u.u.type==DeviceKeyPress))?"down":"up")); } - switch (xE->u.u.type) - { - case KeyPress: + if (xE->u.u.type == KeyPress || xE->u.u.type == DeviceKeyPress) *kptr |= bit; - break; - case KeyRelease: + else if (xE->u.u.type == KeyRelease || xE->u.u.type == DeviceKeyRelease) *kptr &= ~bit; - break; - default: - FatalError("Impossible keyboard event"); - } + else + FatalError("Impossible keyboard event"); } #endif From d627061b48ae06d27b37be209d67a3f4f2388dd3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 6 Sep 2007 18:57:00 +0930 Subject: [PATCH 161/634] xfree86: wrap keyboard devices for XKB. Call ProcessOtherEvents first, then for all keyboard devices let them be wrapped by XKB. This way all XI events will go through XKB. Note that the VCK is still not wrapped, so core events will bypass XKB. --- hw/xfree86/common/xf86Xinput.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 4c9de1f50..243623166 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -179,20 +179,15 @@ xf86ActivateDevice(LocalDevicePtr local) dev->coreEvents = local->flags & XI86_ALWAYS_CORE; dev->spriteInfo->spriteOwner = !(local->flags & XI86_SHARED_POINTER); + RegisterOtherDevice(dev); + #ifdef XKB - if (!DeviceIsPointerType(dev)) + if (!DeviceIsPointerType(dev) && !noXkbExtension) { - /* FIXME: that's not the nice way to do it. XKB wraps the previously - * set procs, so if we don't have them here, our event will disappear - * in a black hole.*/ - dev->public.processInputProc = CoreProcessKeyboardEvent; - dev->public.realInputProc = CoreProcessKeyboardEvent; - if (!noXkbExtension) - XkbSetExtension(dev, ProcessKeyboardEvent); + XkbSetExtension(dev, ProcessKeyboardEvent); } #endif - RegisterOtherDevice(dev); if (serverGeneration == 1) xf86Msg(X_INFO, "XINPUT: Adding extended input device \"%s\" (type: %s)\n", From 72b347e681f5667b68257822e7cec02ab4c9cb6d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 7 Sep 2007 14:31:19 +0930 Subject: [PATCH 162/634] dix: Enabling devices must not overwrite existing sprites/pairing. EnableDevices is (amongst others )called after a VT switch. We must not create a new sprite or re-pair the device, otherwise we lose the input device setup that we had before the VT switch. This requires the devices to be in exactly the same order as before the VT switch. Removing a device while on a different VT is probably a bad idea. --- dix/devices.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index e60601636..3ce045cdd 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -210,10 +210,13 @@ EnableDevice(DeviceIntPtr dev) /* Sprites pop up on the first root window, so we can supply it directly * here. */ - if (IsPointerDevice(dev) && dev->spriteInfo->spriteOwner) - InitializeSprite(dev, WindowTable[0]); - else - PairDevices(NULL, inputInfo.pointer, dev); + if (!dev->spriteInfo->sprite) + { + if (IsPointerDevice(dev) && dev->spriteInfo->spriteOwner) + InitializeSprite(dev, WindowTable[0]); + else + PairDevices(NULL, inputInfo.pointer, dev); + } if ((*prev != dev) || !dev->inited || ((ret = (*dev->deviceProc)(dev, DEVICE_ON)) != Success)) { From 12a18cc8903fac53c3c77b23dd8093187594a4f3 Mon Sep 17 00:00:00 2001 From: David Nolden Date: Fri, 14 Sep 2007 22:42:19 +0200 Subject: [PATCH 163/634] compilation-fix in debug mode --- xkb/xkbEvents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c index 22ca2d6e9..b387a8c61 100644 --- a/xkb/xkbEvents.c +++ b/xkb/xkbEvents.c @@ -937,7 +937,7 @@ GrabInfoPtr grabinfo; ((((deviceKeyButtonPointer*)&xE[i])->state >> 7) & button_mask) == button_mask && (xkbi->lockedPtrButtons & button_mask) == button_mask) { #ifdef DEBUG - ErrorF("Faking release of button %d\n", ((deviceKeyButtonPointer*)&xE[i])->state) + ErrorF("Faking release of button %d\n", ((deviceKeyButtonPointer*)&xE[i])->state); #endif XkbDDXFakePointerButton(DeviceButtonRelease, ((deviceKeyButtonPointer*)&xE[i])->state); } From 8840829ab93c4eb62eb58753c015da5307133fe5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 12 Sep 2007 17:40:11 +0930 Subject: [PATCH 164/634] dix: don't compress motion events from different devices (EventEnqueue) --- dix/events.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dix/events.c b/dix/events.c index ad9ec1ca1..87cf7b078 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1173,9 +1173,10 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) #endif pSprite->hotPhys.x = XE_KBPTR.rootX; pSprite->hotPhys.y = XE_KBPTR.rootY; - /* do motion compression */ + /* do motion compression, but not if from different devices */ if (tail && (tail->event->u.u.type == MotionNotify) && + (tail->device == device) && (tail->pScreen == pSprite->hotPhys.pScreen)) { tail->event->u.keyButtonPointer.rootX = pSprite->hotPhys.x; From 06188ce90d2a8146140773f9367f23404b464282 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 12 Sep 2007 18:00:03 +0930 Subject: [PATCH 165/634] dix: Make EnqueueEvent aware of GenericEvents. GenericEvents can be > sizeof(xEvents), so we need to make sure we're allocating and copying enough memory for the event. --- dix/events.c | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/dix/events.c b/dix/events.c index 87cf7b078..8dfea6a96 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1125,13 +1125,19 @@ NoticeEventTime(xEvent *xE) * The following procedures deal with synchronous events * **************************************************************************/ +/** + * EnqueueEvent is a device's processInputProc if a device is frozen. + * Instead of delivering the events to the client, the event is tacked onto a + * linked list for later delivery. + */ void EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) { - QdEventPtr tail = *syncEvents.pendtail; - QdEventPtr qe; - xEvent *qxE; - SpritePtr pSprite = device->spriteInfo->sprite; + QdEventPtr tail = *syncEvents.pendtail; + QdEventPtr qe; + SpritePtr pSprite = device->spriteInfo->sprite; + int eventlen; + NoticeTime(xE); @@ -1186,7 +1192,12 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) return; } } - qe = (QdEventPtr)xalloc(sizeof(QdEventRec) + (count * sizeof(xEvent))); + + eventlen = count * sizeof(xEvent); + if (xE->u.u.type == GenericEvent) /* count is 1 for GenericEvents */ + eventlen += ((xGenericEvent*)xE)->length * 4; + + qe = (QdEventPtr)xalloc(sizeof(QdEventRec) + eventlen); if (!qe) return; qe->next = (QdEventPtr)NULL; @@ -1195,8 +1206,17 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) qe->months = currentTime.months; qe->event = (xEvent *)(qe + 1); qe->evcount = count; - for (qxE = qe->event; --count >= 0; qxE++, xE++) - *qxE = *xE; + if (xE->u.u.type == GenericEvent) + { + memcpy(qe->event, xE, eventlen); + } else + { + xEvent *qxE; + for (qxE = qe->event; --count >= 0; qxE++, xE++) + { + *qxE = *xE; + } + } if (tail) syncEvents.pendtail = &tail->next; *syncEvents.pendtail = qe; From 1c38eac442a3ab9e8469e944f382251957996c5a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 12 Sep 2007 18:09:57 +0930 Subject: [PATCH 166/634] dix: fix comment for DeliverDeviceEvents. DDE is not always called, grabbed or focused devices go through Deliver{Grabbed|Focus}Event first. Thanks to Eamon Walsh for spotting it. --- dix/events.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dix/events.c b/dix/events.c index 8dfea6a96..f13d54276 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2246,9 +2246,14 @@ FixUpEventFromWindow( } /** - * Deliver events caused by input devices. Called for all core input events - * and XI events. No filtering of events happens before DeliverDeviceEvents(), - * it will be called for any event that comes out of the event queue. + * Deliver events caused by input devices. Called for both core input events + * and XI events. + * For events from a non-grabbed, non-focus device, DeliverDeviceEvents is + * called directly from the processInputProc. + * For grabbed devices, DeliverGrabbedEvent is called first, and _may_ call + * DeliverDeviceEvents. + * For focused events, DeliverFocusedEvent is called first, and _may_ call + * DeliverDeviceEvents. * * @param pWin Window to deliver event to. * @param xE Events to deliver. @@ -2257,6 +2262,8 @@ FixUpEventFromWindow( * @param dev The device that is responsible for the event. * @param count number of events in xE. * + * @see DeliverGrabbedEvent + * @see DeliverFocusedEvent */ int DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab, From b484451eab261a919fe94c0c0f56877f7571fc9e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 12 Sep 2007 18:34:51 +0930 Subject: [PATCH 167/634] dix: don't try to access "time" field for GenericEvents in PlayReleasedEvent. GenericEvents can't be parsed to keyButtonPointer, and there's no guarantee that it has a time field anyway. PlayReleasedEvent needs to store the millis when we know it (core events, XI event) and just re-use them for GenericEvents. Yes, this is a hack. But it looks like the time has zero significance anyway. --- dix/events.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dix/events.c b/dix/events.c index f13d54276..3d833ef95 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1228,6 +1228,7 @@ PlayReleasedEvents(void) QdEventPtr *prev, qe; DeviceIntPtr dev; DeviceIntPtr pDev; + static CARD32 lastKnownMillis = 0; /* Hack, see comment below */ prev = &syncEvents.pending; while ( (qe = *prev) ) @@ -1241,7 +1242,17 @@ PlayReleasedEvents(void) if (qe->event->u.u.type == MotionNotify) CheckVirtualMotion(pDev, qe, NullWindow); syncEvents.time.months = qe->months; - syncEvents.time.milliseconds = qe->event->u.keyButtonPointer.time; + /* XXX: Hack! We can't reliably get the time from GenericEvents, + since we don't know which struct it may be. So we store the time + when we know it, and re-use it when we can't get it. */ + if (qe->event->u.u.type == GenericEvent) + { + syncEvents.time.milliseconds = lastKnownMillis; + } else + { + syncEvents.time.milliseconds = qe->event->u.keyButtonPointer.time; + lastKnownMillis = syncEvents.time.milliseconds; + } #ifdef PANORAMIX /* Translate back to the sprite screen since processInputProc will translate from sprite screen to screen 0 upon reentry From 68e0c4988e359e3c9da933946bc703cf8530bdbc Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 12 Sep 2007 20:48:48 +0930 Subject: [PATCH 168/634] dix: fix "possible use of uninitialized variable" warning. The device passed through to UnrealizeCursor isn't used anyway, so setting it to NULL is enough. --- dix/cursor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/cursor.c b/dix/cursor.c index 917dc690c..5f48c83f9 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -115,7 +115,7 @@ FreeCursor(pointer value, XID cid) CursorPtr pCurs = (CursorPtr)value; ScreenPtr pscr; - DeviceIntPtr pDev; + DeviceIntPtr pDev = NULL; /* unused anyway */ if ( --pCurs->refcnt != 0) return(Success); From 1c25c46f3d5f98be8dbf36684aad4302b220e163 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 13 Sep 2007 23:22:27 +0930 Subject: [PATCH 169/634] dix: fix compiler warnings about unused variables. --- dix/events.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dix/events.c b/dix/events.c index 3d833ef95..aab535234 100644 --- a/dix/events.c +++ b/dix/events.c @@ -777,8 +777,9 @@ ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py) BoxRec box; int x = *px, y = *py; int incx = 1, incy = 1; - SpritePtr pSprite = pDev->spriteInfo->sprite; + SpritePtr pSprite; + pSprite = pDev->spriteInfo->sprite; if (POINT_IN_REGION(pSprite->hot.pScreen, shape, x, y, &box)) return; box = *REGION_EXTENTS(pSprite->hot.pScreen, shape); @@ -3488,16 +3489,14 @@ ProcessKeyboardEvent (xEvent *xE, DeviceIntPtr keybd, int count) #endif { int key, bit; - BYTE *kptr; - int i; - CARD8 modifiers; - CARD16 mask; + BYTE *kptr; + CARD8 modifiers; GrabPtr grab; GrabInfoPtr grabinfo; Bool deactivateGrab = FALSE; - KeyClassPtr keyc = keybd->key; + KeyClassPtr keyc = keybd->key; #ifdef XEVIE - static Window rootWin = 0; + static Window rootWin = 0; if(!xeviegrabState && xevieFlag && clients[xevieClientIndex] && (xevieMask & xevieFilters[xE->u.u.type])) { From c4db4d1fcf7fa2ba802a208beee6b3adc83921f5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 13 Sep 2007 23:27:07 +0930 Subject: [PATCH 170/634] include: remove register keywords. --- include/cursor.h | 2 +- include/dix.h | 2 +- include/xkbsrv.h | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/cursor.h b/include/cursor.h index e51394cb5..ef81afc55 100644 --- a/include/cursor.h +++ b/include/cursor.h @@ -119,7 +119,7 @@ extern CursorPtr CreateRootCursor( extern int ServerBitsFromGlyph( FontPtr /*pfont*/, unsigned int /*ch*/, - register CursorMetricPtr /*cm*/, + CursorMetricPtr /*cm*/, unsigned char ** /*ppbits*/); extern Bool CursorMetricsFromGlyph( diff --git a/include/dix.h b/include/dix.h index 5caa6e26a..bec19dd4c 100644 --- a/include/dix.h +++ b/include/dix.h @@ -61,7 +61,7 @@ SOFTWARE. #define NullClient ((ClientPtr) 0) #define REQUEST(type) \ - register type *stuff = (type *)client->requestBuffer + type *stuff = (type *)client->requestBuffer #define REQUEST_SIZE_MATCH(req)\ diff --git a/include/xkbsrv.h b/include/xkbsrv.h index e220f0ac9..a4f15f018 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -737,14 +737,14 @@ extern void AccessXInit( ); extern Bool AccessXFilterPressEvent( - register struct _xEvent * /* xE */, - register DeviceIntPtr /* keybd */, + struct _xEvent * /* xE */, + DeviceIntPtr /* keybd */, int /* count */ ); extern Bool AccessXFilterReleaseEvent( - register struct _xEvent * /* xE */, - register DeviceIntPtr /* keybd */, + struct _xEvent * /* xE */, + DeviceIntPtr /* keybd */, int /* count */ ); From 5d9f6cf51becdeb1d2be9bdeec4bb5d0c4dd0e8b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 13 Sep 2007 23:33:07 +0930 Subject: [PATCH 171/634] dix: cosmetic change. Remove "pointer" variable, might as well use pDev. --- dix/getevents.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index e88c56c5f..12ddc82d4 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -619,7 +619,6 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, *valptr = valuators[i]; events++; - pointer = pDev; /* Set x and y based on whether this is absolute or relative, and * accelerate if we need to. */ @@ -628,14 +627,14 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, x = valuators[0]; } else { - x = pointer->valuator->lastx; + x = pDev->valuator->lastx; } if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) { y = valuators[1 - first_valuator]; } else { - y = pointer->valuator->lasty; + y = pDev->valuator->lasty; } } else { @@ -644,14 +643,14 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, valuators); if (first_valuator == 0 && num_valuators >= 1) - x = pointer->valuator->lastx + valuators[0]; + x = pDev->valuator->lastx + valuators[0]; else - x = pointer->valuator->lastx; + x = pDev->valuator->lastx; if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) - y = pointer->valuator->lasty + valuators[1 - first_valuator]; + y = pDev->valuator->lasty + valuators[1 - first_valuator]; else - y = pointer->valuator->lasty; + y = pDev->valuator->lasty; } /* Clip both x and y to the defined limits (usually co-ord space limit). */ From 275dc77c2972147407584323b866b8acc1654ea0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 25 Sep 2007 21:40:08 +0930 Subject: [PATCH 172/634] dix: add comments to ComputeFreezes() and syncEvents struct. --- dix/events.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/dix/events.c b/dix/events.c index aab535234..f5b0f0037 100644 --- a/dix/events.c +++ b/dix/events.c @@ -263,6 +263,24 @@ static int DontPropagateRefCnts[DNPMCOUNT]; */ _X_EXPORT InputInfo inputInfo; +/** + * syncEvents is the global structure for queued events. + * Devices can be frozen through GrabModeSync pointer grabs. If this is the + * case, events from these devices are added to "pending" instead of being + * processed normally. When the device is unfrozen, events in "pending" are + * replayed and processed as if they would come from the device directly. + * + * pending ... list of queued events + * pendtail ... last event in list + * replayDev ... The device to replay events for. Only set in AllowEvents, in + * which case it is set to the device specified in the request. + * replayWin ... the window the events are supposed to be replayed on. This + * window may be set to the grab's window (but only when + * Replay{Pointer|Keyboard} is given in the XAllowEvents + * request. + * playingEvents ... flag to indicate whether we're in the process of + * replaying events. Only set in ComputeFreezes(). + */ static struct { QdEventPtr pending, *pendtail; DeviceIntPtr replayDev; /* kludgy rock to put flag for */ @@ -1430,6 +1448,9 @@ CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode) CLIENT_BITS(grab->resource))) thisDev->deviceGrab.sync.other = NullGrab; } + /* XXX: other should only work on the paired keyboard, not on all other + devices + */ for (dev = inputInfo.devices; dev; dev = dev->next) { if (dev != thisDev) From b2a4883bd89d406713d4f808e72721ecc1456d67 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 26 Sep 2007 09:20:11 +0930 Subject: [PATCH 173/634] dix: add comments to PlayReleasedEvents() Also stick another warning in, more changes needed for XGE if panoramix is active. --- dix/events.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dix/events.c b/dix/events.c index f5b0f0037..7d69ca531 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1241,6 +1241,15 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) *syncEvents.pendtail = qe; } +/** + * Run through the list of events queued up in syncEvents. + * For each event do: + * If the device for this event is not frozen anymore, take it and process it + * as usually. + * After that, check if there's any devices in the list that are not frozen. + * If there is none, we're done. If there is at least one device that is not + * frozen, then re-run from the beginning of the event queue. + */ static void PlayReleasedEvents(void) { @@ -1276,6 +1285,7 @@ PlayReleasedEvents(void) /* Translate back to the sprite screen since processInputProc will translate from sprite screen to screen 0 upon reentry to the DIX layer */ + /* XXX: we can't do that for generic events */ if(!noPanoramiXExtension) { qe->event->u.keyButtonPointer.rootX += panoramiXdataPtr[0].x - From 340911d7243a7f1095d79b5b2dcfa81b145c2474 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 26 Sep 2007 15:12:49 +0930 Subject: [PATCH 174/634] Wrap core event handling through ProcessOtherEvents. When processing events from the EQ, _always_ call the processInputProc of the matching device. For XI devices, this proc is wrapped in three layers. Core event handling is wrapped by XI event handling, which is wrapped by XKB. A core event now passes through XKB -> XI -> DIX. This gets rid of a sync'd grab problem: with the previous code, core events did disappear during a sync'd device grab on account of mieqProcessInputEvents calling the processInputProc of the VCP/VCK instead of the actual device. This lead to the event being processed as normal instead of being enqueued for later replaying. --- Xi/exevents.c | 59 ++++++++++++++++++++++++++++------ hw/xfree86/common/xf86Xinput.c | 30 +++++++++++++---- mi/mieq.c | 20 ++---------- 3 files changed, 77 insertions(+), 32 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index aa2b4c9de..2baaa58e3 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -89,26 +89,56 @@ Bool ShouldFreeInputMasks(WindowPtr /* pWin */ , static Bool MakeInputMasks(WindowPtr /* pWin */ ); +static int xiDevPrivateIndex = 0; +static int _xiServerGeneration = -1; + +typedef struct { + ProcessInputProc processInputProc; + ProcessInputProc realInputProc; +} xiDevPrivateRec, *xiDevPrivatePtr; + /************************************************************************** * * Procedures for extension device event routing. * */ +#define WRAP_PROCESS_INPUT_PROC(device, saveprocs, newproc) \ + saveprocs->processInputProc = device->public.processInputProc; \ + saveprocs->realInputProc = device->public.realInputProc; \ + device->public.processInputProc = newproc; \ + device->public.realInputProc = newproc; + +#define UNWRAP_PROCESS_INPUT_PROC(device, saveprocs) \ + device->public.processInputProc = saveprocs->processInputProc; \ + device->public.realInputProc = saveprocs->realInputProc; + void RegisterOtherDevice(DeviceIntPtr device) { - device->public.processInputProc = ProcessOtherEvent; - device->public.realInputProc = ProcessOtherEvent; - if (DeviceIsPointerType(device)) + xiDevPrivatePtr xiPrivPtr; + + if (serverGeneration != _xiServerGeneration) { - (device)->deviceGrab.ActivateGrab = ActivatePointerGrab; - (device)->deviceGrab.DeactivateGrab = DeactivatePointerGrab; - } else - { - (device)->deviceGrab.ActivateGrab = ActivateKeyboardGrab; - (device)->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; + xiDevPrivateIndex = AllocateDevicePrivateIndex(); + if (xiDevPrivateIndex == 1) + { + FatalError("[Xi] Could not allocate private index.\n"); + } + _xiServerGeneration = serverGeneration; } + + if (!AllocateDevicePrivate(device, xiDevPrivateIndex)) + FatalError("[Xi] Dev private allocation failed.\n"); + + + xiPrivPtr = (xiDevPrivatePtr)xcalloc(1, sizeof(xiDevPrivateRec)); + if (!xiPrivPtr) + FatalError("[Xi] Cannot get memory for dev private.\n"); + + device->devPrivates[xiDevPrivateIndex].ptr = xiPrivPtr; + + WRAP_PROCESS_INPUT_PROC(device, xiPrivPtr, ProcessOtherEvent); } /*ARGSUSED*/ void @@ -126,6 +156,17 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) ValuatorClassPtr v = device->valuator; deviceValuator *xV = (deviceValuator *) xE; + /* Handle core events. */ + if (xE->u.u.type < LASTEvent && xE->u.u.type != GenericEvent) + { + xiDevPrivatePtr xiPrivPtr = + (xiDevPrivatePtr)device->devPrivates[xiDevPrivateIndex].ptr; + UNWRAP_PROCESS_INPUT_PROC(device, xiPrivPtr); + device->public.processInputProc(xE, device, count); + WRAP_PROCESS_INPUT_PROC(device, xiPrivPtr, ProcessOtherEvent); + return; + } + CheckMotion(xE, device); if (xE->u.u.type != DeviceValuator && xE->u.u.type != GenericEvent) { diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 243623166..31c300811 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -179,15 +179,33 @@ xf86ActivateDevice(LocalDevicePtr local) dev->coreEvents = local->flags & XI86_ALWAYS_CORE; dev->spriteInfo->spriteOwner = !(local->flags & XI86_SHARED_POINTER); - RegisterOtherDevice(dev); - -#ifdef XKB - if (!DeviceIsPointerType(dev) && !noXkbExtension) + if (DeviceIsPointerType(dev)) { - XkbSetExtension(dev, ProcessKeyboardEvent); - } +#ifdef XKB + dev->public.processInputProc = CoreProcessPointerEvent; + dev->public.realInputProc = CoreProcessPointerEvent; +#else + dev->public.processInputProc = ProcessPointerEvent; + dev->public.realInputProc = ProcessPointerEvent; #endif + dev->deviceGrab.ActivateGrab = ActivatePointerGrab; + dev->deviceGrab.DeactivateGrab = DeactivatePointerGrab; + } else + { +#ifdef XKB + dev->public.processInputProc = CoreProcessKeyboardEvent; + dev->public.realInputProc = CoreProcessKeyboardEvent; +#else + dev->public.processInputProc = ProcessKeyboardEvent; + dev->public.realInputProc = ProcessKeyboardEvent; +#endif + dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab; + dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; + } + RegisterOtherDevice(dev); + if (!noXkbExtension) + XkbSetExtension(dev, ProcessOtherEvent); if (serverGeneration == 1) xf86Msg(X_INFO, "XINPUT: Adding extended input device \"%s\" (type: %s)\n", diff --git a/mi/mieq.c b/mi/mieq.c index c3f63fb8b..78e57adc4 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -232,7 +232,6 @@ mieqProcessInputEvents(void) { EventRec *e = NULL; int x = 0, y = 0; - DeviceIntPtr dev = NULL; xEvent* event; while (miEventQueue.head != miEventQueue.tail) { @@ -262,7 +261,8 @@ mieqProcessInputEvents(void) if (miEventQueue.handlers[e->events->event->u.u.type]) { miEventQueue.handlers[e->events->event->u.u.type]( DequeueScreen(e->pDev)->myNum, - e->events->event, dev, + e->events->event, + e->pDev, e->nevents); return; } @@ -272,17 +272,7 @@ mieqProcessInputEvents(void) if (e->events->event[0].u.u.type == KeyPress || e->events->event[0].u.u.type == KeyRelease) { SwitchCoreKeyboard(e->pDev); - dev = inputInfo.keyboard; } - else if (e->events->event[0].u.u.type == MotionNotify || - e->events->event[0].u.u.type == ButtonPress || - e->events->event[0].u.u.type == ButtonRelease) { - dev = inputInfo.pointer; - } - else { - dev = e->pDev; - } - /* FIXME: Bad hack. The only event where we actually get multiple * events at once is a DeviceMotionNotify followed by @@ -303,11 +293,7 @@ mieqProcessInputEvents(void) event = e->events->event; } - /* MPX devices send both core and Xi events. - * Use dev to get the correct processing function but supply - * e->pDev to pass the correct device - */ - dev->public.processInputProc(event, e->pDev, e->nevents); + e->pDev->public.processInputProc(event, e->pDev, e->nevents); if (e->nevents > 1) xfree(event); From 55fd50273ea67eb99a0c8a830349851931298387 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 26 Sep 2007 15:15:34 +0930 Subject: [PATCH 175/634] Xi: unify ErrorFs. Prefix all with [Xi]. --- Xi/chaccess.c | 4 ++-- Xi/extinit.c | 2 +- Xi/qryacces.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Xi/chaccess.c b/Xi/chaccess.c index f09920600..2a0e5fa75 100644 --- a/Xi/chaccess.c +++ b/Xi/chaccess.c @@ -110,7 +110,7 @@ ProcXChangeWindowAccess(ClientPtr client) (DeviceIntPtr*)xalloc(stuff->npermit * sizeof(DeviceIntPtr)); if (!perm_devices) { - ErrorF("ProcXChangeWindowAccess: alloc failure.\n"); + ErrorF("[Xi] ProcXChangeWindowAccess: alloc failure.\n"); SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, 0, BadImplementation); return Success; @@ -136,7 +136,7 @@ ProcXChangeWindowAccess(ClientPtr client) (DeviceIntPtr*)xalloc(stuff->ndeny * sizeof(DeviceIntPtr)); if (!deny_devices) { - ErrorF("ProcXChangeWindowAccecss: alloc failure.\n"); + ErrorF("[Xi] ProcXChangeWindowAccecss: alloc failure.\n"); SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, 0, BadImplementation); diff --git a/Xi/extinit.c b/Xi/extinit.c index 1d23809dc..c1b6eedae 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -891,7 +891,7 @@ FixExtensionEvents(ExtensionEntry * extEntry) { /* This should never happen, but if it does, hide under the * bed and cry for help. */ - ErrorF("DeviceButtonMotionMask != ButtonMotionMask. Trouble!\n"); + ErrorF("[Xi] DeviceButtonMotionMask != ButtonMotionMask. Trouble!\n"); } DeviceFocusChangeMask = GetNextExtEventMask(); diff --git a/Xi/qryacces.c b/Xi/qryacces.c index b59696939..95f2dd0e6 100644 --- a/Xi/qryacces.c +++ b/Xi/qryacces.c @@ -99,7 +99,7 @@ ProcXQueryWindowAccess(ClientPtr client) deviceids = (XID*)xalloc((nperm + ndeny) * sizeof(XID)); if (!deviceids) { - ErrorF("ProcXQueryWindowAccess: xalloc failure.\n"); + ErrorF("[Xi] ProcXQueryWindowAccess: xalloc failure.\n"); SendErrorToClient(client, IReqCode, X_QueryWindowAccess, 0, BadImplementation); return Success; From 394f3c1dbee7270a1d930846d49278424c3072d4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 26 Sep 2007 15:19:37 +0930 Subject: [PATCH 176/634] dix: GetPointerEvents: remove unused variable compiler warning. --- dix/getevents.c | 1 - 1 file changed, 1 deletion(-) diff --git a/dix/getevents.c b/dix/getevents.c index 12ddc82d4..df1dc6a78 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -550,7 +550,6 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, /* Thanks to a broken lib, we _always_ have to chase DeviceMotionNotifies * with DeviceValuators. */ Bool sendValuators = (type == MotionNotify || flags & POINTER_ABSOLUTE); - DeviceIntPtr pointer = NULL; int x = 0, y = 0; /* The core pointer must not send Xi events. */ Bool coreOnly = (pDev == inputInfo.pointer); From 8b508f5d6bd0d3995294d5ff300a856754442999 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 26 Sep 2007 15:19:53 +0930 Subject: [PATCH 177/634] dix: unify ErrorFs. prepend all with [dix]. --- dix/access.c | 8 ++++---- dix/devices.c | 10 +++++----- dix/dixfonts.c | 8 ++++---- dix/dixutils.c | 6 +++--- dix/events.c | 18 +++++++++--------- dix/main.c | 2 +- dix/property.c | 8 ++++---- dix/resource.c | 4 ++-- dix/window.c | 9 +++++---- 9 files changed, 37 insertions(+), 36 deletions(-) diff --git a/dix/access.c b/dix/access.c index 20157162b..e7d39b4c3 100644 --- a/dix/access.c +++ b/dix/access.c @@ -143,7 +143,7 @@ ACChangeWindowAccess(ClientPtr client, if (!win->optional && !MakeWindowOptional(win)) { - ErrorF("ACChangeWindowAcccess: Failed to make window optional.\n"); + ErrorF("[dix] ACChangeWindowAcccess: Failed to make window optional.\n"); return BadImplementation; } @@ -183,7 +183,7 @@ acReplaceList(DeviceIntPtr** list, xalloc(ndevices * sizeof(DeviceIntPtr*)); if (!*list) { - ErrorF("ACChangeWindowAccess: out of memory\n"); + ErrorF("[dix] ACChangeWindowAccess: out of memory\n"); return; } memcpy(*list, @@ -223,7 +223,7 @@ ACQueryWindowAccess(WindowPtr win, *perm = (DeviceIntPtr*)xalloc(*nperm * sizeof(DeviceIntPtr)); if (!*perm) { - ErrorF("ACQuerywinAccess: xalloc failure\n"); + ErrorF("[dix] ACQuerywinAccess: xalloc failure\n"); return; } memcpy(*perm, @@ -237,7 +237,7 @@ ACQueryWindowAccess(WindowPtr win, *deny = (DeviceIntPtr*)xalloc(*ndeny * sizeof(DeviceIntPtr)); if (!*deny) { - ErrorF("ACQuerywinAccess: xalloc failure\n"); + ErrorF("[dix] ACQuerywinAccess: xalloc failure\n"); return; } memcpy(*deny, diff --git a/dix/devices.c b/dix/devices.c index 3ce045cdd..63d7ea4db 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -220,7 +220,7 @@ EnableDevice(DeviceIntPtr dev) if ((*prev != dev) || !dev->inited || ((ret = (*dev->deviceProc)(dev, DEVICE_ON)) != Success)) { - ErrorF("couldn't enable device %d\n", dev->id); + ErrorF("[dix] couldn't enable device %d\n", dev->id); return FALSE; } dev->enabled = TRUE; @@ -357,13 +357,13 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what) keySyms.minKeyCode + 1) * keySyms.mapWidth); if (!keySyms.map) { - ErrorF("Couldn't allocate core keymap\n"); + ErrorF("[dix] Couldn't allocate core keymap\n"); return BadAlloc; } modMap = (CARD8 *)xalloc(MAP_LENGTH); if (!modMap) { - ErrorF("Couldn't allocate core modifier map\n"); + ErrorF("[dix] Couldn't allocate core modifier map\n"); return BadAlloc; } bzero((char *)modMap, MAP_LENGTH); @@ -529,11 +529,11 @@ InitAndStartDevices(WindowPtr root) } if (!inputInfo.keyboard) { - ErrorF("No core keyboard\n"); + ErrorF("[dix] No core keyboard\n"); return BadImplementation; } if (!inputInfo.pointer) { - ErrorF("No core pointer\n"); + ErrorF("[dix] No core pointer\n"); return BadImplementation; } diff --git a/dix/dixfonts.c b/dix/dixfonts.c index c21b3ecb3..9d3bf084c 100644 --- a/dix/dixfonts.c +++ b/dix/dixfonts.c @@ -378,7 +378,7 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna f = (char *)xalloc(lenfname + 1); memmove(f, pfontname, lenfname); f[lenfname] = '\0'; - ErrorF("OpenFont: fontname is \"%s\"\n", f); + ErrorF("[dix] OpenFont: fontname is \"%s\"\n", f); xfree(f); #endif if (!lenfname || lenfname > XLFDMAXFONTNAMELEN) @@ -1628,7 +1628,7 @@ FreeFontPath(FontPathElementPtr *list, int n, Bool force) found++; } if (list[i]->refcount != found) { - ErrorF("FreeFontPath: FPE \"%.*s\" refcount is %d, should be %d; fixing.\n", + ErrorF("[dix] FreeFontPath: FPE \"%.*s\" refcount is %d, should be %d; fixing.\n", list[i]->name_length, list[i]->name, list[i]->refcount, found); list[i]->refcount = found; /* ensure it will get freed */ @@ -1680,7 +1680,7 @@ SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist) if (len == 0) { if (persist) - ErrorF ("Removing empty element from the valid list of fontpaths\n"); + ErrorF("[dix] Removing empty element from the valid list of fontpaths\n"); err = BadValue; } else @@ -1732,7 +1732,7 @@ SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist) { if (persist) { - ErrorF("Could not init font path element %s, removing from list!\n", + ErrorF("[dix] Could not init font path element %s, removing from list!\n", fpe->name); } xfree (fpe->name); diff --git a/dix/dixutils.c b/dix/dixutils.c index c1e30ff18..dc4e08c0d 100644 --- a/dix/dixutils.c +++ b/dix/dixutils.c @@ -288,7 +288,7 @@ SecurityLookupWindow(XID id, ClientPtr client, Mask access_mode) int i = dixLookupWindow(&pWin, id, client, access_mode); static int warn = 1; if (warn-- > 0) - ErrorF("Warning: LookupWindow()/SecurityLookupWindow() " + ErrorF("[dix] Warning: LookupWindow()/SecurityLookupWindow() " "are deprecated. Please convert your driver/module " "to use dixLookupWindow().\n"); return (i == Success) ? pWin : NULL; @@ -307,7 +307,7 @@ SecurityLookupDrawable(XID id, ClientPtr client, Mask access_mode) int i = dixLookupDrawable(&pDraw, id, client, M_DRAWABLE, access_mode); static int warn = 1; if (warn-- > 0) - ErrorF("Warning: LookupDrawable()/SecurityLookupDrawable() " + ErrorF("[dix] Warning: LookupDrawable()/SecurityLookupDrawable() " "are deprecated. Please convert your driver/module " "to use dixLookupDrawable().\n"); return (i == Success) ? pDraw : NULL; @@ -326,7 +326,7 @@ LookupClient(XID id, ClientPtr client) int i = dixLookupClient(&pClient, id, client, DixUnknownAccess); static int warn = 1; if (warn-- > 0) - ErrorF("Warning: LookupClient() is deprecated. Please convert your " + ErrorF("[dix] Warning: LookupClient() is deprecated. Please convert your " "driver/module to use dixLookupClient().\n"); return (i == Success) ? pClient : NULL; } diff --git a/dix/events.c b/dix/events.c index 7d69ca531..b396b6506 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1887,7 +1887,7 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask, int type; #ifdef DEBUG_EVENTS - ErrorF("Event([%d, %d], mask=0x%x), client=%d", + ErrorF("[dix] Event([%d, %d], mask=0x%x), client=%d", pEvents->u.u.type, pEvents->u.u.detail, mask, client->index); #endif if ((client) && (client != serverClient) && (!client->clientGone) && @@ -1904,8 +1904,8 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask, pEvents->u.keyButtonPointer.event) { #ifdef DEBUG_EVENTS - ErrorF("\n"); - ErrorF("motionHintWindow == keyButtonPointer.event\n"); + ErrorF("[dix] \n"); + ErrorF("[dix] motionHintWindow == keyButtonPointer.event\n"); #endif return 1; /* don't send, but pretend we did */ } @@ -1944,14 +1944,14 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask, WriteEventsToClient(client, count, pEvents); #ifdef DEBUG_EVENTS - ErrorF( " delivered\n"); + ErrorF("[dix] delivered\n"); #endif return 1; } else { #ifdef DEBUG_EVENTS - ErrorF("\n"); + ErrorF("[dix] \n"); #endif return 0; } @@ -2031,7 +2031,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent /* We don't do more than one GenericEvent at a time. */ if (count > 1) { - ErrorF("Do not send more than one GenericEvent at a time!\n"); + ErrorF("[dix] Do not send more than one GenericEvent at a time!\n"); return 0; } @@ -2355,7 +2355,7 @@ DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab, if (count > 1) { - ErrorF("Do not send more than one GenericEvent at a time!\n"); + ErrorF("[dix] Do not send more than one GenericEvent at a time!\n"); return 0; } filter = generic_filters[GEEXTIDX(xE)][ge->evtype]; @@ -5942,7 +5942,7 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) { if (events[i].u.u.type == GenericEvent) { - ErrorF("TryClientEvents: Only one GenericEvent at a time."); + ErrorF("[dix] TryClientEvents: Only one GenericEvent at a time.\n"); return; } } @@ -6028,7 +6028,7 @@ PickPointer(ClientPtr client) if (!it) { - ErrorF("Picking VCP\n"); + ErrorF("[dix] Picking VCP\n"); return inputInfo.pointer; } } diff --git a/dix/main.c b/dix/main.c index 5d24922a8..d78d7e8ee 100644 --- a/dix/main.c +++ b/dix/main.c @@ -402,7 +402,7 @@ main(int argc, char *argv[], char *envp[]) } else { if (SetDefaultFontPath(defaultFontPath) != Success) - ErrorF("failed to set default font path '%s'", + ErrorF("[dix] failed to set default font path '%s'", defaultFontPath); } if (!SetDefaultFont(defaultTextFont)) { diff --git a/dix/property.c b/dix/property.c index e281dd765..676810050 100644 --- a/dix/property.c +++ b/dix/property.c @@ -81,11 +81,11 @@ PrintPropertys(WindowPtr pWin) pProp = pWin->userProps; while (pProp) { - ErrorF( "%x %x\n", pProp->propertyName, pProp->type); - ErrorF("property format: %d\n", pProp->format); - ErrorF("property data: \n"); + ErrorF("[dix] %x %x\n", pProp->propertyName, pProp->type); + ErrorF("[dix] property format: %d\n", pProp->format); + ErrorF("[dix] property data: \n"); for (j=0; j<(pProp->format/8)*pProp->size; j++) - ErrorF("%c\n", pProp->data[j]); + ErrorF("[dix] %c\n", pProp->data[j]); pProp = pProp->next; } } diff --git a/dix/resource.c b/dix/resource.c index e83c529d3..e5bc90065 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -468,7 +468,7 @@ AddResource(XID id, RESTYPE type, pointer value) rrec = &clientTable[client]; if (!rrec->buckets) { - ErrorF("AddResource(%lx, %lx, %lx), client=%d \n", + ErrorF("[dix] AddResource(%lx, %lx, %lx), client=%d \n", (unsigned long)id, type, (unsigned long)value, client); FatalError("client not in use\n"); } @@ -589,7 +589,7 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType) } } if (!gotOne) - ErrorF("Freeing resource id=%lX which isn't there.\n", + ErrorF("[dix] Freeing resource id=%lX which isn't there.\n", (unsigned long)id); } diff --git a/dix/window.c b/dix/window.c index 324744661..f296d34be 100644 --- a/dix/window.c +++ b/dix/window.c @@ -206,8 +206,9 @@ PrintChildren(WindowPtr p1, int indent) while (p1) { p2 = p1->firstChild; - for (i=0; idrawable.id); + ErrorF("[dix] "); + for (i=0; idrawable.id); miPrintRegion(&p1->clipList); PrintChildren(p2, indent+4); p1 = p1->nextSib; @@ -222,7 +223,7 @@ PrintWindowTree(void) for (i=0; iclipList); p1 = pWin->firstChild; @@ -2232,7 +2233,7 @@ WhereDoIGoInTheStack( return pWin->nextSib; default: { - ErrorF("Internal error in ConfigureWindow, smode == %d\n",smode ); + ErrorF("[dix] Internal error in ConfigureWindow, smode == %d\n",smode ); return pWin->nextSib; } } From bfc89c035542a10594f5f0cbde1c7e28b7d024a7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 26 Sep 2007 15:23:37 +0930 Subject: [PATCH 178/634] xkb: unify ErrorFs. Prefix all with [xkb]. Output for XkbUseMsg intentionally skipped. --- xkb/ddxBeep.c | 4 ++-- xkb/ddxCtrls.c | 2 +- xkb/ddxKeyClick.c | 2 +- xkb/ddxList.c | 6 +++--- xkb/ddxLoad.c | 34 +++++++++++++++++----------------- xkb/xkb.c | 36 ++++++++++++++++++------------------ xkb/xkbAccessX.c | 4 ++-- xkb/xkbEvents.c | 24 ++++++++++++------------ xkb/xkbInit.c | 10 +++++----- xkb/xkbPrKeyEv.c | 8 ++++---- xkb/xkbSwap.c | 2 +- xkb/xkbUtils.c | 2 +- 12 files changed, 67 insertions(+), 67 deletions(-) diff --git a/xkb/ddxBeep.c b/xkb/ddxBeep.c index 331357ded..2fab4ed78 100644 --- a/xkb/ddxBeep.c +++ b/xkb/ddxBeep.c @@ -141,12 +141,12 @@ Atom name; duration= oldDuration= ctrl->bell_duration; #ifdef DEBUG if (xkbDebugFlags>1) - ErrorF("beep: %d (count= %d)\n",xkbInfo->beepType,xkbInfo->beepCount); + ErrorF("[xkb] beep: %d (count= %d)\n",xkbInfo->beepType,xkbInfo->beepCount); #endif name= None; switch (xkbInfo->beepType) { default: - ErrorF("Unknown beep type %d\n",xkbInfo->beepType); + ErrorF("[xkb] Unknown beep type %d\n",xkbInfo->beepType); case _BEEP_NONE: duration= 0; break; diff --git a/xkb/ddxCtrls.c b/xkb/ddxCtrls.c index 0f7f9187f..73a5e03ac 100644 --- a/xkb/ddxCtrls.c +++ b/xkb/ddxCtrls.c @@ -49,7 +49,7 @@ int realRepeat; ctrl->autoRepeat= 0; #ifdef DEBUG if (xkbDebugFlags&0x4) { - ErrorF("XkbDDXKeybdCtrlProc: setting repeat to %d (real repeat is %d)\n", + ErrorF("[xkb] XkbDDXKeybdCtrlProc: setting repeat to %d (real repeat is %d)\n", ctrl->autoRepeat,realRepeat); } #endif diff --git a/xkb/ddxKeyClick.c b/xkb/ddxKeyClick.c index f48296dbc..10f3f38c0 100644 --- a/xkb/ddxKeyClick.c +++ b/xkb/ddxKeyClick.c @@ -44,7 +44,7 @@ XkbDDXKeyClick(DeviceIntPtr pXDev,int keycode,int synthetic) { #ifdef DEBUG if (xkbDebugFlags) - ErrorF("Click.\n"); + ErrorF("[xkb] Click.\n"); #endif return; } diff --git a/xkb/ddxList.c b/xkb/ddxList.c index a91a9badf..2baf65248 100644 --- a/xkb/ddxList.c +++ b/xkb/ddxList.c @@ -200,10 +200,10 @@ char tmpname[PATH_MAX]; in= Popen(buf,"r"); #else #ifdef DEBUG_CMD - ErrorF("xkb executes: %s\n",buf); + ErrorF("[xkb] xkb executes: %s\n",buf); #endif if (System(buf) < 0) - ErrorF("Could not invoke keymap compiler\n"); + ErrorF("[xkb] Could not invoke keymap compiler\n"); else in= fopen(tmpname, "r"); #endif @@ -271,7 +271,7 @@ char tmpname[PATH_MAX]; fclose(in); else if ((rval=Pclose(in))!=0) { if (xkbDebugFlags) - ErrorF("xkbcomp returned exit code %d\n",rval); + ErrorF("[xkb] xkbcomp returned exit code %d\n",rval); } #else fclose(in); diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c index d79ae7a7b..a0fa6061e 100644 --- a/xkb/ddxLoad.c +++ b/xkb/ddxLoad.c @@ -134,11 +134,11 @@ Win32System(const char *cmdline) 0, NULL )) { - ErrorF("Starting '%s' failed!\n", cmdline); + ErrorF("[xkb] Starting '%s' failed!\n", cmdline); } else { - ErrorF("Starting '%s' failed: %s", cmdline, (char *)buffer); + ErrorF("[xkb] Starting '%s' failed: %s", cmdline, (char *)buffer); LocalFree(buffer); } @@ -258,12 +258,12 @@ char *cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile; } #ifdef DEBUG if (xkbDebugFlags) { - ErrorF("XkbDDXCompileNamedKeymap compiling keymap using:\n"); - ErrorF(" \"cmd\"\n"); + ErrorF("[xkb] XkbDDXCompileNamedKeymap compiling keymap using:\n"); + ErrorF("[xkb] \"cmd\"\n"); } #endif #ifdef DEBUG_CMD - ErrorF("xkb executes: %s\n",cmd); + ErrorF("[xkb] xkb executes: %s\n",cmd); #endif if (System(cmd)==0) { if (nameRtrn) { @@ -277,7 +277,7 @@ char *cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile; return True; } #ifdef DEBUG - ErrorF("Error compiling keymap (%s)\n",names->keymap); + ErrorF("[xkb] Error compiling keymap (%s)\n",names->keymap); #endif if (outFile!=NULL) _XkbFree(outFile); @@ -305,7 +305,7 @@ char tmpname[PATH_MAX]; } else { if (strlen(names->keymap) > PATH_MAX - 1) { - ErrorF("name of keymap (%s) exceeds max length\n", names->keymap); + ErrorF("[xkb] name of keymap (%s) exceeds max length\n", names->keymap); return False; } strcpy(keymap,names->keymap); @@ -360,7 +360,7 @@ char tmpname[PATH_MAX]; if (out!=NULL) { #ifdef DEBUG if (xkbDebugFlags) { - ErrorF("XkbDDXCompileKeymapByNames compiling keymap:\n"); + ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n"); XkbWriteXKBKeymapForNames(stderr,names,NULL,xkb,want,need); } #endif @@ -372,10 +372,10 @@ char tmpname[PATH_MAX]; #endif { #ifdef DEBUG_CMD - ErrorF("xkb executes: %s\n",buf); - ErrorF("xkbcomp input:\n"); + ErrorF("[xkb] xkb executes: %s\n",buf); + ErrorF("[xkb] xkbcomp input:\n"); XkbWriteXKBKeymapForNames(stderr,names,NULL,xkb,want,need); - ErrorF("end xkbcomp input\n"); + ErrorF("[xkb] end xkbcomp input\n"); #endif if (nameRtrn) { strncpy(nameRtrn,keymap,nameRtrnLen); @@ -387,7 +387,7 @@ char tmpname[PATH_MAX]; } #ifdef DEBUG else - ErrorF("Error compiling keymap (%s)\n",keymap); + ErrorF("[xkb] Error compiling keymap (%s)\n",keymap); #endif #ifdef WIN32 /* remove the temporary file */ @@ -397,9 +397,9 @@ char tmpname[PATH_MAX]; #ifdef DEBUG else { #ifndef WIN32 - ErrorF("Could not invoke keymap compiler\n"); + ErrorF("[xkb] Could not invoke keymap compiler\n"); #else - ErrorF("Could not open file %s\n", tmpname); + ErrorF("[xkb] Could not open file %s\n", tmpname); #endif } #endif @@ -478,7 +478,7 @@ unsigned missing; } else if (!XkbDDXCompileNamedKeymap(xkb,names,nameRtrn,nameRtrnLen)) { #ifdef NOISY - ErrorF("Couldn't compile keymap file\n"); + ErrorF("[xkb] Couldn't compile keymap file\n"); #endif return 0; } @@ -486,7 +486,7 @@ unsigned missing; else if (!XkbDDXCompileKeymapByNames(xkb,names,want,need, nameRtrn,nameRtrnLen)){ #ifdef NOISY - ErrorF("Couldn't compile keymap file\n"); + ErrorF("[xkb] Couldn't compile keymap file\n"); #endif return 0; } @@ -504,7 +504,7 @@ unsigned missing; } #ifdef DEBUG else if (xkbDebugFlags) { - ErrorF("Loaded %s, defined=0x%x\n",fileName,finfoRtrn->defined); + ErrorF("[xkb] Loaded %s, defined=0x%x\n",fileName,finfoRtrn->defined); } #endif fclose(file); diff --git a/xkb/xkb.c b/xkb/xkb.c index cf4243070..4f0677aaf 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -170,7 +170,7 @@ ProcXkbUseExtension(ClientPtr client) client->vMinor= stuff->wantedMinor; } else if (xkbDebugFlags&0x1) { - ErrorF("Rejecting client %d (0x%lx) (wants %d.%02d, have %d.%02d)\n", + ErrorF("[xkb] Rejecting client %d (0x%lx) (wants %d.%02d, have %d.%02d)\n", client->index, (long)client->clientAsMask, stuff->wantedMajor,stuff->wantedMinor, @@ -334,7 +334,7 @@ ProcXkbSelectEvents(ClientPtr client) } } if (dataLeft>2) { - ErrorF("Extra data (%d bytes) after SelectEvents\n",dataLeft); + ErrorF("[xkb] Extra data (%d bytes) after SelectEvents\n",dataLeft); return BadLength; } return client->noClientException; @@ -1339,7 +1339,7 @@ char *desc,*start; if ( rep->totalVModMapKeys>0 ) desc= XkbWriteVirtualModMap(xkb,rep,desc,client); if ((desc-start)!=(len)) { - ErrorF("BOGUS LENGTH in write keyboard desc, expected %d, got %ld\n", + ErrorF("[xkb] BOGUS LENGTH in write keyboard desc, expected %d, got %ld\n", len, (unsigned long)(desc-start)); } if (client->swapped) { @@ -2374,7 +2374,7 @@ ProcXkbSetMap(ClientPtr client) return BadValue; } if (((tmp-((char *)stuff))/4)!=stuff->length) { - ErrorF("Internal error! Bad length in XkbSetMap (after check)\n"); + ErrorF("[xkb] Internal error! Bad length in XkbSetMap (after check)\n"); client->errorValue = tmp-((char *)&stuff[1]); return BadLength; } @@ -2425,7 +2425,7 @@ ProcXkbSetMap(ClientPtr client) if (stuff->present&XkbVirtualModMapMask) tmp= SetVirtualModMap(xkbi,stuff,(xkbVModMapWireDesc *)tmp,&change); if (((tmp-((char *)stuff))/4)!=stuff->length) { - ErrorF("Internal error! Bad length in XkbSetMap (after set)\n"); + ErrorF("[xkb] Internal error! Bad length in XkbSetMap (after set)\n"); client->errorValue = tmp-((char *)&stuff[1]); return BadLength; } @@ -2701,7 +2701,7 @@ ProcXkbSetCompatMap(ClientPtr client) } i= XkbPaddedSize((data-((char *)stuff))); if ((i/4)!=stuff->length) { - ErrorF("Internal length error on read in ProcXkbSetCompatMap\n"); + ErrorF("[xkb] Internal length error on read in ProcXkbSetCompatMap\n"); return BadLength; } @@ -3411,7 +3411,7 @@ register int n; } if ((desc-start)!=(length)) { - ErrorF("BOGUS LENGTH in write names, expected %d, got %ld\n", + ErrorF("[xkb] BOGUS LENGTH in write names, expected %d, got %ld\n", length, (unsigned long)(desc-start)); } WriteToClient(client, SIZEOF(xkbGetNamesReply), (char *)rep); @@ -4102,9 +4102,9 @@ xkbDoodadWireDesc * doodadWire; wire= XkbWriteCountedString(wire,doodad->logo.logo_name,swap); break; default: - ErrorF("Unknown doodad type %d in XkbWriteGeomDoodads\n", + ErrorF("[xkb] Unknown doodad type %d in XkbWriteGeomDoodads\n", doodad->any.type); - ErrorF("Ignored\n"); + ErrorF("[xkb] Ignored\n"); break; } } @@ -4332,7 +4332,7 @@ XkbSendGeometry( ClientPtr client, if ( rep->nKeyAliases>0 ) desc = XkbWriteGeomKeyAliases(desc,geom,client->swapped); if ((desc-start)!=(len)) { - ErrorF("BOGUS LENGTH in XkbSendGeometry, expected %d, got %ld\n", + ErrorF("[xkb] BOGUS LENGTH in XkbSendGeometry, expected %d, got %ld\n", len, (unsigned long)(desc-start)); } } @@ -5781,8 +5781,8 @@ char * str; } else if (length!=0) { #ifdef DEBUG - ErrorF("Internal Error! BadLength in ProcXkbGetDeviceInfo\n"); - ErrorF(" Wrote %d fewer bytes than expected\n",length); + ErrorF("[xkb] Internal Error! BadLength in ProcXkbGetDeviceInfo\n"); + ErrorF("[xkb] Wrote %d fewer bytes than expected\n",length); #endif return BadLength; } @@ -6078,25 +6078,25 @@ xkbSetDebuggingFlagsReply rep; newCtrls= xkbDebugCtrls&(~stuff->affectCtrls); newCtrls|= (stuff->ctrls&stuff->affectCtrls); if (xkbDebugFlags || newFlags || stuff->msgLength) { - ErrorF("XkbDebug: Setting debug flags to 0x%lx\n",(long)newFlags); + ErrorF("[xkb] XkbDebug: Setting debug flags to 0x%lx\n",(long)newFlags); if (newCtrls!=xkbDebugCtrls) - ErrorF("XkbDebug: Setting debug controls to 0x%lx\n",(long)newCtrls); + ErrorF("[xkb] XkbDebug: Setting debug controls to 0x%lx\n",(long)newCtrls); } extraLength= (stuff->length<<2)-sz_xkbSetDebuggingFlagsReq; if (stuff->msgLength>0) { char *msg; if (extraLengthmsgLength)) { - ErrorF("XkbDebug: msgLength= %d, length= %ld (should be %d)\n", + ErrorF("[xkb] XkbDebug: msgLength= %d, length= %ld (should be %d)\n", stuff->msgLength,(long)extraLength, XkbPaddedSize(stuff->msgLength)); return BadLength; } msg= (char *)&stuff[1]; if (msg[stuff->msgLength-1]!='\0') { - ErrorF("XkbDebug: message not null-terminated\n"); + ErrorF("[xkb] XkbDebug: message not null-terminated\n"); return BadValue; } - ErrorF("XkbDebug: %s\n",msg); + ErrorF("[xkb] XkbDebug: %s\n",msg); } xkbDebugFlags = newFlags; xkbDebugCtrls = newCtrls; @@ -6193,7 +6193,7 @@ XkbClientGone(pointer data,XID id) DevicePtr pXDev = (DevicePtr)data; if (!XkbRemoveResourceClient(pXDev,id)) { - ErrorF("Internal Error! bad RemoveResourceClient in XkbClientGone\n"); + ErrorF("[xkb] Internal Error! bad RemoveResourceClient in XkbClientGone\n"); } return 1; } diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c index 2954a0c0e..8e897c86c 100644 --- a/xkb/xkbAccessX.c +++ b/xkb/xkbAccessX.c @@ -132,7 +132,7 @@ xEvent xE; xE.u.keyButtonPointer.time = GetTimeInMillis(); #ifdef DEBUG if (xkbDebugFlags&0x8) { - ErrorF("AXKE: Key %d %s\n",keyCode,(xE.u.u.type==KeyPress?"down":"up")); + ErrorF("[xkb] AXKE: Key %d %s\n",keyCode,(xE.u.u.type==KeyPress?"down":"up")); } #endif @@ -530,7 +530,7 @@ KeySym * sym = XkbKeySymsPtr(xkbi->desc,key); if (BitIsOn(keybd->kbdfeed->ctrl.autoRepeats,key)) { #ifdef DEBUG if (xkbDebugFlags&0x10) - ErrorF("Starting software autorepeat...\n"); + ErrorF("[xkb] Starting software autorepeat...\n"); #endif xkbi->repeatKey = key; xkbi->repeatKeyTimer= TimerSet(xkbi->repeatKeyTimer, diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c index b387a8c61..64cddd043 100644 --- a/xkb/xkbEvents.c +++ b/xkb/xkbEvents.c @@ -818,15 +818,15 @@ GrabInfoPtr grabinfo; ((xE[0].u.u.type==KeyPress)||(xE[0].u.u.type==KeyRelease)|| (xE[0].u.u.type==DeviceKeyPress)|| (xE[0].u.u.type == DeviceKeyRelease))) { - ErrorF("XKbFilterWriteEvents:\n"); - ErrorF(" Event state= 0x%04x\n",xE[0].u.keyButtonPointer.state); - ErrorF(" XkbLastRepeatEvent!=xE (0x%p!=0x%p) %s\n", + ErrorF("[xkb] XKbFilterWriteEvents:\n"); + ErrorF("[xkb] Event state= 0x%04x\n",xE[0].u.keyButtonPointer.state); + ErrorF("[xkb] XkbLastRepeatEvent!=xE (0x%p!=0x%p) %s\n", XkbLastRepeatEvent,xE, ((XkbLastRepeatEvent!=(pointer)xE)?"True":"False")); - ErrorF(" (xkbClientEventsFlags&XWDA)==0 (0x%x) %s\n", + ErrorF("[xkb] (xkbClientEventsFlags&XWDA)==0 (0x%x) %s\n", pClient->xkbClientFlags, (_XkbWantsDetectableAutoRepeat(pClient)?"True":"False")); - ErrorF(" !IsRelease(%d) %s\n",xE[0].u.u.type, + ErrorF("[xkb] !IsRelease(%d) %s\n",xE[0].u.u.type, (!_XkbIsReleaseEvent(xE[0].u.u.type))?"True":"False"); } #endif /* DEBUG */ @@ -872,7 +872,7 @@ GrabInfoPtr grabinfo; * when the mouse is released, the server does not behave properly. * Faking a release of the button here solves the problem. */ - ErrorF("Faking release of button %d\n", xE[0].u.u.detail); + ErrorF("[xkb] Faking release of button %d\n", xE[0].u.u.detail); #endif XkbDDXFakePointerButton(ButtonRelease, xE[0].u.u.detail); } @@ -888,11 +888,11 @@ GrabInfoPtr grabinfo; (xE[i].u.u.type==DeviceKeyPress)|| (xE[i].u.u.type == DeviceKeyRelease))) { XkbStatePtr s= &xkbi->state; - ErrorF("XKbFilterWriteEvents (non-XKB):\n"); - ErrorF("event= 0x%04x\n",xE[i].u.keyButtonPointer.state); - ErrorF("lookup= 0x%02x, grab= 0x%02x\n",s->lookup_mods, + ErrorF("[xkb] XKbFilterWriteEvents (non-XKB):\n"); + ErrorF("[xkb] event= 0x%04x\n",xE[i].u.keyButtonPointer.state); + ErrorF("[xkb] lookup= 0x%02x, grab= 0x%02x\n",s->lookup_mods, s->grab_mods); - ErrorF("compat lookup= 0x%02x, grab= 0x%02x\n", + ErrorF("[xkb] compat lookup= 0x%02x, grab= 0x%02x\n", s->compat_lookup_mods, s->compat_grab_mods); } @@ -930,14 +930,14 @@ GrabInfoPtr grabinfo; ((xE[i].u.keyButtonPointer.state >> 7) & button_mask) == button_mask && (xkbi->lockedPtrButtons & button_mask) == button_mask) { #ifdef DEBUG - ErrorF("Faking release of button %d\n", xE[i].u.u.detail); + ErrorF("[xkb] Faking release of button %d\n", xE[i].u.u.detail); #endif XkbDDXFakePointerButton(ButtonRelease, xE[i].u.u.detail); } else if (type == DeviceButtonPress && ((((deviceKeyButtonPointer*)&xE[i])->state >> 7) & button_mask) == button_mask && (xkbi->lockedPtrButtons & button_mask) == button_mask) { #ifdef DEBUG - ErrorF("Faking release of button %d\n", ((deviceKeyButtonPointer*)&xE[i])->state); + ErrorF("[xkb] Faking release of button %d\n", ((deviceKeyButtonPointer*)&xE[i])->state); #endif XkbDDXFakePointerButton(DeviceButtonRelease, ((deviceKeyButtonPointer*)&xE[i])->state); } diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c index c0867adf0..bcfd14990 100644 --- a/xkb/xkbInit.c +++ b/xkb/xkbInit.c @@ -179,12 +179,12 @@ char * pval; name= MakeAtom(_XKB_RF_NAMES_PROP_ATOM,strlen(_XKB_RF_NAMES_PROP_ATOM),1); if (name==None) { - ErrorF("Atom error: %s not created\n",_XKB_RF_NAMES_PROP_ATOM); + ErrorF("[xkb] Atom error: %s not created\n",_XKB_RF_NAMES_PROP_ATOM); return True; } pval= (char*) ALLOCATE_LOCAL(len); if (!pval) { - ErrorF("Allocation error: %s proprerty not created\n", + ErrorF("[xkb] Allocation error: %s proprerty not created\n", _XKB_RF_NAMES_PROP_ATOM); return True; } @@ -218,7 +218,7 @@ char * pval; } pval[out++]= '\0'; if (out!=len) { - ErrorF("Internal Error! bad size (%d!=%d) for _XKB_RULES_NAMES\n", + ErrorF("[xkb] Internal Error! bad size (%d!=%d) for _XKB_RULES_NAMES\n", out,len); } ChangeWindowProperty(WindowTable[0],name,XA_STRING,8,PropModeReplace, @@ -511,7 +511,7 @@ XkbEventCauseRec cause; /* the other here, but for now just complain */ /* can't just update the core range without */ /* reallocating the KeySymsRec (pain) */ - ErrorF("Internal Error!! XKB and core keymap have different range\n"); + ErrorF("[xkb] Internal Error!! XKB and core keymap have different range\n"); } if (XkbAllocClientMap(xkb,XkbAllClientInfoMask,0)!=Success) FatalError("Couldn't allocate client map in XkbInitDevice\n"); @@ -772,7 +772,7 @@ XkbSrvLedInfoPtr sli; if (sli && xkbi) XkbCheckIndicatorMaps(xkbi->device,sli,XkbAllIndicatorsMask); #ifdef DEBUG - else ErrorF("No indicator feedback in XkbFinishInit (shouldn't happen)!\n"); + else ErrorF("[xkb] No indicator feedback in XkbFinishInit (shouldn't happen)!\n"); #endif return softRepeat; } diff --git a/xkb/xkbPrKeyEv.c b/xkb/xkbPrKeyEv.c index ba3fcc06c..212ee945e 100644 --- a/xkb/xkbPrKeyEv.c +++ b/xkb/xkbPrKeyEv.c @@ -58,7 +58,7 @@ int xiEvent; xiEvent= (xE->u.u.type & EXTENSION_EVENT_BASE); #ifdef DEBUG if (xkbDebugFlags&0x8) { - ErrorF("XkbPKE: Key %d %s\n",key,(xE->u.u.type==KeyPress?"down":"up")); + ErrorF("[xkb] XkbPKE: Key %d %s\n",key,(xE->u.u.type==KeyPress?"down":"up")); } #endif @@ -162,7 +162,7 @@ int xiEvent; } rg->currentDown= key; } - else ErrorF("InternalError! Illegal radio group %d\n",ndx); + else ErrorF("[xkb] InternalError! Illegal radio group %d\n",ndx); break; case XkbKB_Overlay1: case XkbKB_Overlay2: { @@ -182,7 +182,7 @@ int xiEvent; } break; default: - ErrorF("unknown key behavior 0x%04x\n",behavior.type); + ErrorF("[xkb] unknown key behavior 0x%04x\n",behavior.type); break; } } @@ -201,7 +201,7 @@ XkbSrvInfoPtr xkbi; #ifdef DEBUG if (xkbDebugFlags&0x8) { int key= xE->u.u.detail; - ErrorF("PKE: Key %d %s\n",key,(xE->u.u.type==KeyPress?"down":"up")); + ErrorF("[xkb] PKE: Key %d %s\n",key,(xE->u.u.type==KeyPress?"down":"up")); } #endif if ((xkbi->desc->ctrls->enabled_ctrls&XkbAllFilteredEventsMask)==0) diff --git a/xkb/xkbSwap.c b/xkb/xkbSwap.c index da4c9053b..bbb2a91f7 100644 --- a/xkb/xkbSwap.c +++ b/xkb/xkbSwap.c @@ -129,7 +129,7 @@ register int n; dataLeft-= (size*2); } if (dataLeft>2) { - ErrorF("Extra data (%d bytes) after SelectEvents\n",dataLeft); + ErrorF("[xkb] Extra data (%d bytes) after SelectEvents\n",dataLeft); return BadLength; } } diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index c7f9a2681..e87064a42 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -2010,7 +2010,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) if (sendNotifies) { if (!pDev) { - ErrorF("XkbCopyKeymap: asked for notifies, but can't find device!\n"); + ErrorF("[xkb] XkbCopyKeymap: asked for notifies, but can't find device!\n"); } else { /* send NewKeyboardNotify if the keycode range changed, else From 27bc1a8fef2bfd3d62fb44f7c7eb0d463ed08632 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 26 Sep 2007 15:24:41 +0930 Subject: [PATCH 179/634] xkb: XkbFilterEvents: Remove unused variable compiler warning. --- xkb/xkbEvents.c | 1 - 1 file changed, 1 deletion(-) diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c index 64cddd043..37d850dfa 100644 --- a/xkb/xkbEvents.c +++ b/xkb/xkbEvents.c @@ -809,7 +809,6 @@ XkbFilterEvents(ClientPtr pClient,int nEvents,xEvent *xE) int i, button_mask; DeviceIntPtr pXDev = (DeviceIntPtr)LookupKeyboardDevice(); XkbSrvInfoPtr xkbi; -GrabInfoPtr grabinfo; xkbi= pXDev->key->xkbInfo; if ( pClient->xkbClientFlags & _XkbClientInitialized ) { From e2cb8515661b1f7826981931d82dee6e05529f04 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 26 Sep 2007 18:01:17 +0930 Subject: [PATCH 180/634] xfree86: pass in the XKB event processing proc instead of the XI one. We need to pass ProcessPointerEvent or ProcessKeyboardEvent to XkbSetExtension, otherwise we lose the xkb layer. --- hw/xfree86/common/xf86Xinput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 31c300811..a43230e14 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -205,7 +205,7 @@ xf86ActivateDevice(LocalDevicePtr local) RegisterOtherDevice(dev); if (!noXkbExtension) - XkbSetExtension(dev, ProcessOtherEvent); + XkbSetExtension(dev, (DeviceIsPointerType(dev)) ? ProcessPointerEvent : ProcessKeyboardEvent); if (serverGeneration == 1) xf86Msg(X_INFO, "XINPUT: Adding extended input device \"%s\" (type: %s)\n", From 3342b5ad47be25c6838321c0aafc28c329c308b5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 26 Sep 2007 18:03:21 +0930 Subject: [PATCH 181/634] Xi: fix the wrapper code for processInputProc wrapping. Followup to [1]. If a core grab causes the device to freeze, it overwrites the processInputProc of the device. [1] would then overwrite this while unwrapping, the device does not thaw anymore. Changing this to only re-wrap if the processInputProc hasn't been changed during the event handling. [1] 340911d7243a7f1095d79b5b2dcfa81b145c2474 --- Xi/exevents.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 2baaa58e3..d844eefea 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -104,15 +104,23 @@ typedef struct { */ #define WRAP_PROCESS_INPUT_PROC(device, saveprocs, newproc) \ - saveprocs->processInputProc = device->public.processInputProc; \ + saveprocs->processInputProc = \ saveprocs->realInputProc = device->public.realInputProc; \ device->public.processInputProc = newproc; \ - device->public.realInputProc = newproc; + device->public.realInputProc = newproc -#define UNWRAP_PROCESS_INPUT_PROC(device, saveprocs) \ +#define UNWRAP_PROCESS_INPUT_PROC(device, saveprocs, backupproc) \ + backupproc = device->public.processInputProc; \ device->public.processInputProc = saveprocs->processInputProc; \ device->public.realInputProc = saveprocs->realInputProc; +#define REWRAP_PROCESS_INPUT_PROC(device, saveprocs, newproc) \ + if (device->public.processInputProc == device->public.realInputProc) \ + device->public.processInputProc = newproc; \ + saveprocs->processInputProc = \ + saveprocs->realInputProc = device->public.realInputProc; \ + device->public.realInputProc = newproc; + void RegisterOtherDevice(DeviceIntPtr device) { @@ -159,11 +167,13 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) /* Handle core events. */ if (xE->u.u.type < LASTEvent && xE->u.u.type != GenericEvent) { + ProcessInputProc backupproc; xiDevPrivatePtr xiPrivPtr = (xiDevPrivatePtr)device->devPrivates[xiDevPrivateIndex].ptr; - UNWRAP_PROCESS_INPUT_PROC(device, xiPrivPtr); + UNWRAP_PROCESS_INPUT_PROC(device, xiPrivPtr, backupproc); device->public.processInputProc(xE, device, count); - WRAP_PROCESS_INPUT_PROC(device, xiPrivPtr, ProcessOtherEvent); + /* only rewraps is the processInputProc hasn't been modified */ + REWRAP_PROCESS_INPUT_PROC(device, xiPrivPtr, backupproc); return; } From 8f9bf927e1beecf9b9ec8877131ec12c765e4d84 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 26 Sep 2007 18:04:59 +0930 Subject: [PATCH 182/634] xkb: Unwrap properly in ProcessPointerEvent. Instead of hardcoding CoreProcessPointerEvent, actually try to unwrap properly and then call the unwrapped processInputProc. Seems to be a better idea, especially since it makes stuff actually work... --- xkb/xkbAccessX.c | 25 ++++++++++++++++++++++++- xkb/xkbActions.c | 4 ++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c index 8e897c86c..063c84423 100644 --- a/xkb/xkbAccessX.c +++ b/xkb/xkbAccessX.c @@ -684,6 +684,8 @@ Bool ignoreKeyEvent = FALSE; /* don't accidentally turn on StickyKeys or the Keyboard Response Group.*/ /* */ /************************************************************************/ +extern int xkbDevicePrivateIndex; +extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer); void ProcessPointerEvent( register xEvent * xE, register DeviceIntPtr mouse, @@ -692,6 +694,8 @@ ProcessPointerEvent( register xEvent * xE, DeviceIntPtr dev = (DeviceIntPtr)LookupKeyboardDevice(); XkbSrvInfoPtr xkbi = dev->key->xkbInfo; unsigned changed = 0; +ProcessInputProc backupproc; +xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(mouse); xkbi->shiftKeyCount = 0; xkbi->lastPtrEventTime= xE->u.keyButtonPointer.time; @@ -703,7 +707,26 @@ unsigned changed = 0; xkbi->lockedPtrButtons&= ~(1<<(xE->u.u.detail&0x7)); changed |= XkbPointerButtonMask; } - CoreProcessPointerEvent(xE,mouse,count); + + /* Guesswork. mostly. + * xkb actuall goes through some effort to transparently wrap the + * processInputProcs (see XkbSetExtension). But we all love fun, so the + * previous XKB implementation just hardcoded the CPPE call here instead + * of unwrapping like anybody with any sense of decency would do. + * I got no clue what the correct thing to do is, but my guess is that + * it's not hardcoding. I may be wrong. whatever it is, don't come whining + * to me. I just work here. + * + * Anyway. here's the old call, if you don't like the wrapping, revert it. + * + * CoreProcessPointerEvent(xE,mouse,count); + * + * see. it's still steaming. told you. (whot) + */ + UNWRAP_PROCESS_INPUT_PROC(mouse, xkbPrivPtr, backupproc); + mouse->public.processInputProc(xE, mouse, count); + COND_WRAP_PROCESS_INPUT_PROC(mouse, xkbPrivPtr, + backupproc, xkbUnwrapProc); xkbi->state.ptr_buttons = mouse->button->state; diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index e51b0cca9..cc707bd44 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -42,9 +42,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define EXTENSION_EVENT_BASE 64 static unsigned int _xkbServerGeneration; -static int xkbDevicePrivateIndex = -1; +int xkbDevicePrivateIndex = -1; -static void +void xkbUnwrapProc(DeviceIntPtr device, DeviceHandleProc proc, pointer data) { From 32d0440c7f6e604807cb14dd32349df6f22c903b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 27 Sep 2007 11:44:03 +0930 Subject: [PATCH 183/634] xkb: xkbHandleActions: let wrapping take care of event delivery. This is hopefully better than hardcodey calling CoreProcessPointerEvent. --- xkb/xkbActions.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index cc707bd44..891b91544 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -1148,7 +1148,6 @@ XkbAction act; XkbFilterPtr filter; Bool keyEvent; Bool pressEvent; -Bool xiEvent; ProcessInputProc backupproc; xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); @@ -1173,9 +1172,6 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); (xE->u.u.type==KeyRelease)||(xE->u.u.type==DeviceKeyRelease)); pressEvent= (xE->u.u.type==KeyPress)||(xE->u.u.type==DeviceKeyPress)|| (xE->u.u.type==ButtonPress)||(xE->u.u.type==DeviceButtonPress); - xiEvent= (xE->u.u.type==DeviceKeyPress)||(xE->u.u.type==DeviceKeyRelease)|| - (xE->u.u.type==DeviceButtonPress)|| - (xE->u.u.type==DeviceButtonRelease); if (pressEvent) { if (keyEvent) @@ -1279,23 +1275,21 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); } if (sendEvent) { + DeviceIntPtr tmpdev; if (keyEvent) { realMods = keyc->modifierMap[key]; keyc->modifierMap[key] = 0; - UNWRAP_PROCESS_INPUT_PROC(dev,xkbPrivPtr, backupproc); - dev->public.processInputProc(xE,dev,count); - COND_WRAP_PROCESS_INPUT_PROC(dev, xkbPrivPtr, - backupproc,xkbUnwrapProc); + tmpdev = dev; + } else + tmpdev = GetPairedPointer(dev); + + + UNWRAP_PROCESS_INPUT_PROC(tmpdev,xkbPrivPtr, backupproc); + dev->public.processInputProc(xE,tmpdev,count); + COND_WRAP_PROCESS_INPUT_PROC(tmpdev, xkbPrivPtr, + backupproc,xkbUnwrapProc); + if (keyEvent) keyc->modifierMap[key] = realMods; - } - else - { - if (xE->u.u.type & EXTENSION_EVENT_BASE) - ProcessOtherEvent(xE, dev, count); - else - CoreProcessPointerEvent(xE,dev,count); - - } } else if (keyEvent) FixKeyState(xE,dev); From de06a47d4ad9c845b098438d9492a5f42483a2ad Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 27 Sep 2007 11:45:03 +0930 Subject: [PATCH 184/634] dix: GetMaximumEventsNum() needs to return 3 + MAX_VALUATOR_EVENTS. Raw events can be generated for pointer events, so 2 + MVE isn't enough. --- dix/getevents.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index df1dc6a78..fda4e27f8 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -191,9 +191,10 @@ updateMotionHistory(DeviceIntPtr pDev, CARD32 ms, int first_valuator, */ _X_EXPORT int GetMaximumEventsNum(void) { - /* Two base events -- core and device, plus valuator events. Multiply - * by two if we're doing key repeats. */ - int ret = 2 + MAX_VALUATOR_EVENTS; + /* Three base events -- raw event, core and device, plus valuator events. + * Multiply by two if we're doing key repeats. + */ + int ret = 3 + MAX_VALUATOR_EVENTS; #ifdef XKB if (noXkbExtension) From 53434edc3d306137d019d95189ecdf0dbff75205 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 27 Sep 2007 22:14:09 +0930 Subject: [PATCH 185/634] dix: take paired keyboard instead of VCK (CoreProcessPointerEvents) --- dix/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/events.c b/dix/events.c index b396b6506..a80355011 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3707,7 +3707,7 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) SpritePtr pSprite = mouse->spriteInfo->sprite; #ifdef XKB - XkbSrvInfoPtr xkbi= inputInfo.keyboard->key->xkbInfo; + XkbSrvInfoPtr xkbi= GetPairedKeyboard(mouse)->key->xkbInfo; #endif #ifdef XEVIE if(xevieFlag && clients[xevieClientIndex] && !xeviegrabState && From be466d8df808c4e4067a7963617bc3f506768f2d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 27 Sep 2007 22:23:05 +0930 Subject: [PATCH 186/634] dix: GetPairedKeyboard() always returns a valid keyboard (VCK if necessary). We need it unconditionally in a few places, and the rest checked for NULL and then set it to VCK anyway. So, fixing up all callers to appreciate the defined return value. --- dix/devices.c | 9 +++++---- dix/events.c | 11 +---------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 63d7ea4db..24eaa4b1d 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2229,15 +2229,16 @@ GetPairedPointer(DeviceIntPtr kbd) } /* Find the keyboard device that is paired with the given pointer. If none is - * found, return NULL. - * We also check if the paired device is a keyboard. If not (e.g. evdev brain) - * we don't return it. This probably needs to be fixed. + * found, return the VCK. */ _X_EXPORT DeviceIntPtr GetPairedKeyboard(DeviceIntPtr ptr) { DeviceIntPtr dev = inputInfo.devices; + if (IsKeyboardDevice(ptr)) + return ptr; + while(dev) { if (ptr != dev && @@ -2246,7 +2247,7 @@ GetPairedKeyboard(DeviceIntPtr ptr) return dev; dev = dev->next; } - return dev; + return (dev) ? dev : inputInfo.keyboard; } /* diff --git a/dix/events.c b/dix/events.c index a80355011..45ff943fb 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3233,8 +3233,6 @@ CheckPassiveGrabsOnWindow( { grab->device = device; grab->modifierDevice = GetPairedKeyboard(device); - if (!grab->modifierDevice) - grab->modifierDevice = inputInfo.keyboard; } (*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE); @@ -4052,8 +4050,7 @@ EnterLeaveEvent( int mskidx; OtherInputMasks *inputMasks; - if (!(keybd = GetPairedKeyboard(mouse))) - keybd = inputInfo.keyboard; + keybd = GetPairedKeyboard(mouse); if ((pWin == mouse->valuator->motionHintWindow) && (detail != NotifyInferior)) @@ -4572,11 +4569,7 @@ SetInputFocus( if (IsKeyboardDevice(dev)) keybd = dev; else - { keybd = GetPairedKeyboard(dev); - if (!keybd) - keybd = inputInfo.keyboard; - } if ((focusID == None) || (focusID == PointerRoot)) focusWin = (WindowPtr)(long)focusID; @@ -5592,8 +5585,6 @@ ProcGrabButton(ClientPtr client) pointer = PickPointer(client); modifierDevice = GetPairedKeyboard(pointer); - if (!modifierDevice) - modifierDevice = inputInfo.keyboard; grab = CreateGrab(client->index, pointer, pWin, (Mask)stuff->eventMask, (Bool)stuff->ownerEvents, From a511c445debbd13e8c48146ecd2d7c97e793f788 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 28 Sep 2007 18:46:41 +0930 Subject: [PATCH 187/634] Remove generation of core events, long live XI! Let the drivers only generate XI events and put those into the event queue. When processing events, generate core events as needed. This fixes a number of problems with XKB and the DIX in general. The previous approach was to put core events and XI events as separate events into the event queue. When being processed, the server had no knowledge of them coming from the same device state change. Anything that would then change the state of the device accordingly was in danger of changing it twice, leading to some funny (i.e. not funny at all) results. Emulating core events while processing XI events fixes this, there is only one path that actually changes the device state now. Although we have to be careful when replaying events from synced devices, otherwise we may lose events. Note: XI has precedence over core for passive grabs, but core events are delivered to the client first. This removes the wrapping added in 340911d7243a7f1095d79b5b2dcfa81b145c2474 --- Xi/exevents.c | 69 ++++++++++++++++++++++++++++++++------------- dix/events.c | 74 +++++++++++++++++++++++++++++++++++++++++++++---- dix/getevents.c | 44 +++++++---------------------- include/dix.h | 1 + mi/mieq.c | 3 +- 5 files changed, 131 insertions(+), 60 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index d844eefea..35669061e 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -149,7 +149,15 @@ RegisterOtherDevice(DeviceIntPtr device) WRAP_PROCESS_INPUT_PROC(device, xiPrivPtr, ProcessOtherEvent); } - /*ARGSUSED*/ void +/** + * Main device event processing function. + * Called from when processing the events from the event queue. + * Generates core events for XI events as needed. + * + * Note that these core events are then delivered first. For passive grabs, XI + * events have preference over core. + */ +void ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) { BYTE *kptr; @@ -163,19 +171,13 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) KeyClassPtr k = device->key; ValuatorClassPtr v = device->valuator; deviceValuator *xV = (deviceValuator *) xE; + BOOL sendCore = FALSE; + xEvent core; + int coretype = 0; - /* Handle core events. */ - if (xE->u.u.type < LASTEvent && xE->u.u.type != GenericEvent) - { - ProcessInputProc backupproc; - xiDevPrivatePtr xiPrivPtr = - (xiDevPrivatePtr)device->devPrivates[xiDevPrivateIndex].ptr; - UNWRAP_PROCESS_INPUT_PROC(device, xiPrivPtr, backupproc); - device->public.processInputProc(xE, device, count); - /* only rewraps is the processInputProc hasn't been modified */ - REWRAP_PROCESS_INPUT_PROC(device, xiPrivPtr, backupproc); - return; - } + coretype = XItoCoreType(xE->u.u.type); + if (device->coreEvents && coretype) + sendCore = TRUE; CheckMotion(xE, device); @@ -280,7 +282,12 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) modifiers &= ~mask; } } - if (!grab && CheckDeviceGrabs(device, xE, 0, count)) { + /* XI grabs have priority */ + core = *xE; + core.u.u.type = coretype; + if (!grab && + (CheckDeviceGrabs(device, xE, 0, count) || + (sendCore && CheckDeviceGrabs(device, &core, 0, 1)))) { device->deviceGrab.activatingKey = key; return; } @@ -308,7 +315,6 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) } if (device->deviceGrab.fromPassiveGrab && - !device->deviceGrab.grab->coreGrab && (key == device->deviceGrab.activatingKey)) deactivateDeviceGrab = TRUE; } else if (xE->u.u.type == DeviceButtonPress) { @@ -328,10 +334,17 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) b->state |= (Button1Mask >> 1) << xE->u.u.detail; SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify); if (!grab) - if (CheckDeviceGrabs(device, xE, 0, count)) + { + core = *xE; + core.u.u.type = coretype; + if (CheckDeviceGrabs(device, xE, 0, count) || + (sendCore && CheckDeviceGrabs(device, &core, 0, 1))) + { /* if a passive grab was activated, the event has been sent * already */ return; + } + } } else if (xE->u.u.type == DeviceButtonRelease) { if (!b) @@ -350,21 +363,39 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) b->state &= ~((Button1Mask >> 1) << xE->u.u.detail); SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify); if (!b->state - && device->deviceGrab.fromPassiveGrab - && !device->deviceGrab.grab->coreGrab) + && device->deviceGrab.fromPassiveGrab) deactivateDeviceGrab = TRUE; } else if (xE->u.u.type == ProximityIn) device->valuator->mode &= ~OutOfProximity; else if (xE->u.u.type == ProximityOut) device->valuator->mode |= OutOfProximity; + if (sendCore) + { + core = *xE; + core.u.u.type = coretype; + } + if (grab) - DeliverGrabbedEvent(xE, device, deactivateDeviceGrab, count); + { + if (sendCore) /* never deactivate from core */ + DeliverGrabbedEvent(&core, device, FALSE , 1); + DeliverGrabbedEvent(xE, device, deactivateDeviceGrab, count); + } else if (device->focus) + { + if (sendCore) + DeliverFocusedEvent(device, &core, GetSpriteWindow(device), 1); DeliverFocusedEvent(device, xE, GetSpriteWindow(device), count); + } else + { + if (sendCore) + DeliverDeviceEvents(GetSpriteWindow(device), &core, NullGrab, + NullWindow, device, 1); DeliverDeviceEvents(GetSpriteWindow(device), xE, NullGrab, NullWindow, device, count); + } if (deactivateDeviceGrab == TRUE) (*device->deviceGrab.DeactivateGrab) (device); diff --git a/dix/events.c b/dix/events.c index 45ff943fb..6eac09049 100644 --- a/dix/events.c +++ b/dix/events.c @@ -294,6 +294,27 @@ static struct { static xEvent* swapEvent = NULL; static int swapEventLen = 0; +/** + * Convert the given event type from an XI event to a core event. + * @return The matching core event type or 0 if there is none. + */ +_X_EXPORT int +XItoCoreType(int xitype) +{ + int coretype = 0; + if (xitype == DeviceMotionNotify) + coretype = MotionNotify; + else if (xitype == DeviceButtonPress) + coretype = ButtonPress; + else if (xitype == DeviceButtonRelease) + coretype = ButtonRelease; + else if (xitype == DeviceKeyPress) + coretype = KeyPress; + else if (xitype == DeviceKeyRelease) + coretype = KeyRelease; + return coretype; +} + /** * True if device owns a cursor, false if device shares a cursor sprite with * another device. @@ -775,9 +796,15 @@ XineramaChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) void SetMaskForEvent(Mask mask, int event) { + int coretype; if ((event < LASTEvent) || (event >= 128)) FatalError("SetMaskForEvent: bogus event number"); filters[event] = mask; + + /* Need to change the mask for the core events too */ + coretype = XItoCoreType(event); + if (coretype) + filters[coretype] = mask; } _X_EXPORT void @@ -1343,10 +1370,11 @@ ComputeFreezes(void) DeviceIntPtr replayDev = syncEvents.replayDev; int i; WindowPtr w; - xEvent *xE; + xEvent *xE, core; int count; GrabPtr grab; DeviceIntPtr dev; + BOOL sendCore; for (dev = inputInfo.devices; dev; dev = dev->next) FreezeThaw(dev, dev->deviceGrab.sync.other || @@ -1367,11 +1395,38 @@ ComputeFreezes(void) replayDev->spriteInfo->sprite->spriteTrace[i]) { if (!CheckDeviceGrabs(replayDev, xE, i+1, count)) { + /* There is no other client that gets a passive grab on + * the event anymore. Emulate core event if necessary and + * deliver it too. + * However, we might get here with a core event, in which + * case we mustn't emulate a core event. + * XXX: I think this may break things. If a client has a + * device grab, and another client a core grab on an + * inferior window, we never get the core grab. (whot) + */ + sendCore = (replayDev->coreEvents && + (xE->u.u.type & EXTENSION_EVENT_BASE && + XItoCoreType(xE->u.u.type))); + + if (sendCore) + { + core = *xE; + core.u.u.type = XItoCoreType(xE->u.u.type); + } if (replayDev->focus) + { + if (sendCore) + DeliverFocusedEvent(replayDev, &core, w, 1); DeliverFocusedEvent(replayDev, xE, w, count); + } else + { + if (sendCore) + DeliverDeviceEvents(w, &core, NullGrab, + NullWindow, replayDev, 1); DeliverDeviceEvents(w, xE, NullGrab, NullWindow, replayDev, count); + } } goto playmore; } @@ -2089,7 +2144,13 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent } } } - if ((type == ButtonPress) && deliveries && (!grab)) + /* + * Note that since core events are delivered first, an implicit grab may + * be activated on a core grab, stopping the XI events. + */ + if ((type == DeviceButtonPress || type == ButtonPress) + && deliveries + && (!grab)) { GrabRec tempGrab; OtherInputMasks *inputMasks; @@ -2104,7 +2165,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent tempGrab.pointerMode = GrabModeAsync; tempGrab.confineTo = NullWindow; tempGrab.cursor = NullCursor; - tempGrab.coreGrab = True; + tempGrab.coreGrab = (type == ButtonPress); /* get the XI device mask */ inputMasks = wOtherInputMasks(pWin); @@ -2127,9 +2188,8 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent tempGrab.genericMasks->next = NULL; } } - (*inputInfo.pointer->deviceGrab.ActivateGrab)(pDev, &tempGrab, - currentTime, - TRUE | ImplicitGrabMask); + (*pDev->deviceGrab.ActivateGrab)(pDev, &tempGrab, + currentTime, TRUE | ImplicitGrabMask); } else if ((type == MotionNotify) && deliveries) pDev->valuator->motionHintWindow = pWin; @@ -3182,6 +3242,8 @@ CheckPassiveGrabsOnWindow( XkbSrvInfoPtr xkbi; gdev= grab->modifierDevice; + if (grab->coreGrab) + gdev = GetPairedKeyboard(device); xkbi= gdev->key->xkbInfo; #endif tempGrab.modifierDevice = grab->modifierDevice; diff --git a/dix/getevents.c b/dix/getevents.c index fda4e27f8..7457078e5 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -191,10 +191,10 @@ updateMotionHistory(DeviceIntPtr pDev, CARD32 ms, int first_valuator, */ _X_EXPORT int GetMaximumEventsNum(void) { - /* Three base events -- raw event, core and device, plus valuator events. + /* Three base events -- raw event and device, plus valuator events. * Multiply by two if we're doing key repeats. */ - int ret = 3 + MAX_VALUATOR_EVENTS; + int ret = 2 + MAX_VALUATOR_EVENTS; #ifdef XKB if (noXkbExtension) @@ -366,6 +366,9 @@ GetKeyboardEvents(EventList *events, DeviceIntPtr pDev, int type, int key_code) * Returns a set of keyboard events for KeyPress/KeyRelease, optionally * also with valuator events. Handles Xi and XKB. * + * DOES NOT GENERATE CORE EVENTS! Core events are created when processing the + * event (ProcessOtherEvent). + * * events is not NULL-terminated; the return value is the number of events. * The DDX is responsible for allocating the event structure in the first * place via GetMaximumEventsNum(), and for freeing it. @@ -399,10 +402,7 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type, (pDev->coreEvents && !inputInfo.keyboard->key)) return 0; - if (pDev->coreEvents) - numEvents = 2; - else - numEvents = 1; + numEvents = 1; if (num_valuators) { if ((num_valuators / 6) + 1 > MAX_VALUATOR_EVENTS) @@ -469,12 +469,6 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type, num_valuators, valuators); } - if (pDev->coreEvents) { - events->event->u.keyButtonPointer.time = ms; - events->event->u.u.type = type; - events->event->u.u.detail = key_code; - } - return numEvents; } @@ -533,6 +527,9 @@ FreeEventList(EventListPtr list, int num_events) * Generate a series of xEvents (filled into the EventList) representing * pointer motion, or button presses. Xi and XKB-aware. * + * DOES NOT GENERATE CORE EVENTS! Core events are created when processing the + * event (ProcessOtherEvent). + * * events is not NULL-terminated; the return value is the number of events. * The DDX is responsible for allocating the event structure in the first * place via InitEventList() and GetMaximumEventsNum(), and for freeing it. @@ -567,10 +564,7 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, if (!pDev->valuator) return 0; - if (!coreOnly && pDev->coreEvents) - num_events = 3; - else - num_events = 2; + num_events = 2; if (type == MotionNotify && num_valuators <= 0) return 0; @@ -703,24 +697,6 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, } } - /* for some reason inputInfo.pointer does not have coreEvents set */ - if (coreOnly || pDev->coreEvents) { - events->event->u.u.type = type; - events->event->u.keyButtonPointer.time = ms; - events->event->u.keyButtonPointer.rootX = x; - events->event->u.keyButtonPointer.rootY = y; - - if (type == ButtonPress || type == ButtonRelease) { - /* We hijack SetPointerMapping to work on all core-sending - * devices, so we use the device-specific map here instead of - * the core one. */ - events->event->u.u.detail = pDev->button->map[buttons]; - } - else { - events->event->u.u.detail = 0; - } - } - return num_events; } diff --git a/include/dix.h b/include/dix.h index bec19dd4c..34abb2d87 100644 --- a/include/dix.h +++ b/include/dix.h @@ -689,6 +689,7 @@ typedef struct { extern int xstrcasecmp(char *s1, char *s2); #endif +extern int XItoCoreType(int xi_type); extern Bool DevHasCursor(DeviceIntPtr pDev); extern Bool IsPointerDevice( DeviceIntPtr dev); diff --git a/mi/mieq.c b/mi/mieq.c index 78e57adc4..9e0f5befb 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -300,7 +300,8 @@ mieqProcessInputEvents(void) } /* Update the sprite now. Next event may be from different device. */ - if (e->events->event[0].u.u.type == MotionNotify && e->pDev->coreEvents) + if (e->events->event[0].u.u.type == DeviceMotionNotify + && e->pDev->coreEvents) { miPointerUpdateSprite(e->pDev); } From 113011221a4fcbd70bc592930b35f20d55809f1e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 1 Oct 2007 21:42:01 +0930 Subject: [PATCH 188/634] Xi, xfree86: Remove leftovers of the XI wrapper code. --- Xi/exevents.c | 56 ++-------------------------------- hw/xfree86/common/xf86Xinput.c | 14 --------- 2 files changed, 2 insertions(+), 68 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 35669061e..1bcc101a7 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -89,64 +89,12 @@ Bool ShouldFreeInputMasks(WindowPtr /* pWin */ , static Bool MakeInputMasks(WindowPtr /* pWin */ ); -static int xiDevPrivateIndex = 0; -static int _xiServerGeneration = -1; - -typedef struct { - ProcessInputProc processInputProc; - ProcessInputProc realInputProc; -} xiDevPrivateRec, *xiDevPrivatePtr; - -/************************************************************************** - * - * Procedures for extension device event routing. - * - */ - -#define WRAP_PROCESS_INPUT_PROC(device, saveprocs, newproc) \ - saveprocs->processInputProc = \ - saveprocs->realInputProc = device->public.realInputProc; \ - device->public.processInputProc = newproc; \ - device->public.realInputProc = newproc - -#define UNWRAP_PROCESS_INPUT_PROC(device, saveprocs, backupproc) \ - backupproc = device->public.processInputProc; \ - device->public.processInputProc = saveprocs->processInputProc; \ - device->public.realInputProc = saveprocs->realInputProc; - -#define REWRAP_PROCESS_INPUT_PROC(device, saveprocs, newproc) \ - if (device->public.processInputProc == device->public.realInputProc) \ - device->public.processInputProc = newproc; \ - saveprocs->processInputProc = \ - saveprocs->realInputProc = device->public.realInputProc; \ - device->public.realInputProc = newproc; void RegisterOtherDevice(DeviceIntPtr device) { - xiDevPrivatePtr xiPrivPtr; - - if (serverGeneration != _xiServerGeneration) - { - xiDevPrivateIndex = AllocateDevicePrivateIndex(); - if (xiDevPrivateIndex == 1) - { - FatalError("[Xi] Could not allocate private index.\n"); - } - _xiServerGeneration = serverGeneration; - } - - if (!AllocateDevicePrivate(device, xiDevPrivateIndex)) - FatalError("[Xi] Dev private allocation failed.\n"); - - - xiPrivPtr = (xiDevPrivatePtr)xcalloc(1, sizeof(xiDevPrivateRec)); - if (!xiPrivPtr) - FatalError("[Xi] Cannot get memory for dev private.\n"); - - device->devPrivates[xiDevPrivateIndex].ptr = xiPrivPtr; - - WRAP_PROCESS_INPUT_PROC(device, xiPrivPtr, ProcessOtherEvent); + device->public.processInputProc = ProcessOtherEvent; + device->public.realInputProc = ProcessOtherEvent; } /** diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index a43230e14..a458c1119 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -181,24 +181,10 @@ xf86ActivateDevice(LocalDevicePtr local) if (DeviceIsPointerType(dev)) { -#ifdef XKB - dev->public.processInputProc = CoreProcessPointerEvent; - dev->public.realInputProc = CoreProcessPointerEvent; -#else - dev->public.processInputProc = ProcessPointerEvent; - dev->public.realInputProc = ProcessPointerEvent; -#endif dev->deviceGrab.ActivateGrab = ActivatePointerGrab; dev->deviceGrab.DeactivateGrab = DeactivatePointerGrab; } else { -#ifdef XKB - dev->public.processInputProc = CoreProcessKeyboardEvent; - dev->public.realInputProc = CoreProcessKeyboardEvent; -#else - dev->public.processInputProc = ProcessKeyboardEvent; - dev->public.realInputProc = ProcessKeyboardEvent; -#endif dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab; dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; } From 54ce7436b2579bb20728eab7c8d460b531c378af Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 2 Oct 2007 10:49:46 +0930 Subject: [PATCH 189/634] xfree86: update all pointers when calling xf86SwitchMode Center the frame around the first pointer found and then update all pointers on the same screen to move to the edges (if necessary). Note: xf86WarpCursor needs to be modified, is using deprecated miPointerWarpCursor and will kill the server when called with inputInfo.pointer. --- hw/xfree86/common/xf86Cursor.c | 53 ++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/common/xf86Cursor.c b/hw/xfree86/common/xf86Cursor.c index 38bd38c62..d6fa60461 100644 --- a/hw/xfree86/common/xf86Cursor.c +++ b/hw/xfree86/common/xf86Cursor.c @@ -206,6 +206,7 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode) ScreenPtr pCursorScreen; Bool Switched; int px, py; + DeviceIntPtr dev, it; if (!pScr->vtSema || !mode || !pScr->SwitchMode) return FALSE; @@ -221,9 +222,20 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode) if (mode->HDisplay > pScr->virtualX || mode->VDisplay > pScr->virtualY) return FALSE; - pCursorScreen = miPointerGetScreen(inputInfo.pointer); + /* Let's take an educated guess for which pointer to take here. And about as + educated as it gets is to take the first pointer we find. + */ + for (dev = inputInfo.devices; dev; dev = dev->next) + { + if (IsPointerDevice(dev) && dev->spriteInfo->spriteOwner) + break; + } + if (!dev) + dev = inputInfo.pointer; + + pCursorScreen = miPointerGetScreen(dev); if (pScreen == pCursorScreen) - miPointerGetPosition(inputInfo.pointer, &px, &py); + miPointerGetPosition(dev, &px, &py); xf86EnterServerState(SETUP); Switched = (*pScr->SwitchMode)(pScr->scrnIndex, mode, 0); @@ -232,6 +244,7 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode) /* * Adjust frame for new display size. + * Frame is centered around cursor position if cursor is on same screen. */ if (pScreen == pCursorScreen) pScr->frameX0 = px - (mode->HDisplay / 2) + 1; @@ -266,8 +279,42 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode) if (pScr->AdjustFrame) (*pScr->AdjustFrame)(pScr->scrnIndex, pScr->frameX0, pScr->frameY0, 0); + /* The original code centered the frame around the cursor if possible. + * Since this is hard to achieve with multiple cursors, we do the following: + * - center around the first pointer + * - move all other pointers to the nearest edge on the screen (or leave + * them unmodified if they are within the boundaries). + */ if (pScreen == pCursorScreen) - xf86WarpCursor(inputInfo.pointer, pScreen, px, py); + { + xf86WarpCursor(dev, pScreen, px, py); + } + + for (it = inputInfo.devices; it; it = it->next) + { + if (it == dev) + continue; + + if (IsPointerDevice(it) && it->spriteInfo->spriteOwner) + { + pCursorScreen = miPointerGetScreen(it); + if (pScreen == pCursorScreen) + { + miPointerGetPosition(it, &px, &py); + if (px < pScr->frameX0) + px = pScr->frameX0; + else if (px > pScr->frameX1) + px = pScr->frameX1; + + if(py < pScr->frameY0) + py = pScr->frameY0; + else if(py > pScr->frameY1) + py = pScr->frameY1; + + xf86WarpCursor(it, pScreen, px, py); + } + } + } return Switched; } From 122ae65ed90195c584a770027b4d14ef65f72492 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 2 Oct 2007 10:50:59 +0930 Subject: [PATCH 190/634] xfree86: xf86DGA: some cleanup to use the correct devices instead of VCP/VCK. --- hw/xfree86/common/xf86DGA.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index 074c1c704..ea8baaf2e 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c @@ -1144,15 +1144,15 @@ DGAProcessPointerEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr mouse) * Fill in remaining event state */ de->u.event.screen = pScreen->myNum; - de->u.event.state = butc->state | inputInfo.keyboard->key->state; + de->u.event.state = butc->state | GetPairedKeyboard(mouse)->key->state; /* * Keep the core state in sync by duplicating what * CoreProcessPointerEvent does */ if (coreEquiv != MotionNotify) { - register int key; - register BYTE *kptr; + int key; + BYTE *kptr; int bit; key = de->u.u.detail; @@ -1295,10 +1295,10 @@ DGAHandleEvent(int screen_num, xEvent *event, DeviceIntPtr device, int nevents) switch (coreEquiv) { case KeyPress: case KeyRelease: - DGAProcessKeyboardEvent (pScreen, de, inputInfo.keyboard); + DGAProcessKeyboardEvent (pScreen, de, device); break; default: - DGAProcessPointerEvent (pScreen, de, inputInfo.pointer); + DGAProcessPointerEvent (pScreen, de, device); break; } } From 45ec6cd1fb242363c91ad8af1fd4a27a7f02621a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 2 Oct 2007 13:19:07 +0930 Subject: [PATCH 191/634] xfree86: fix DGA to use the correct devices. DGAStealXXXEvent modified to take in device argument. The evdev driver only sends one valuator when only one axis changed. We need to check for DGA either way (xf86PostMotionEventP), otherwise we lose purely horizontal/vertical movements. Note that DGA does not do XI events. --- hw/xfree86/common/xf86DGA.c | 21 +++++++------- hw/xfree86/common/xf86Xinput.c | 43 +++++++++++++++++------------ hw/xfree86/dixmods/extmod/dgaproc.h | 7 +++-- 3 files changed, 40 insertions(+), 31 deletions(-) diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index ea8baaf2e..553679dad 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c @@ -916,7 +916,7 @@ DGAVTSwitch(void) } Bool -DGAStealKeyEvent(int index, int key_code, int is_down) +DGAStealKeyEvent(DeviceIntPtr dev, int index, int key_code, int is_down) { DGAScreenPtr pScreenPriv; dgaEvent de; @@ -932,7 +932,7 @@ DGAStealKeyEvent(int index, int key_code, int is_down) de.u.u.type = *XDGAEventBase + (is_down ? KeyPress : KeyRelease); de.u.u.detail = key_code; de.u.event.time = GetTimeInMillis(); - mieqEnqueue (inputInfo.keyboard, (xEvent *) &de); + mieqEnqueue (dev, (xEvent *) &de); return TRUE; } @@ -940,7 +940,7 @@ DGAStealKeyEvent(int index, int key_code, int is_down) static int DGAMouseX, DGAMouseY; Bool -DGAStealMotionEvent(int index, int dx, int dy) +DGAStealMotionEvent(DeviceIntPtr dev, int index, int dx, int dy) { DGAScreenPtr pScreenPriv; dgaEvent de; @@ -970,12 +970,12 @@ DGAStealMotionEvent(int index, int dx, int dy) de.u.event.dy = dy; de.u.event.pad1 = DGAMouseX; de.u.event.pad2 = DGAMouseY; - mieqEnqueue (inputInfo.pointer, (xEvent *) &de); + mieqEnqueue (dev, (xEvent *) &de); return TRUE; } Bool -DGAStealButtonEvent(int index, int button, int is_down) +DGAStealButtonEvent(DeviceIntPtr dev, int index, int button, int is_down) { DGAScreenPtr pScreenPriv; dgaEvent de; @@ -995,7 +995,7 @@ DGAStealButtonEvent(int index, int button, int is_down) de.u.event.dy = 0; de.u.event.pad1 = DGAMouseX; de.u.event.pad2 = DGAMouseY; - mieqEnqueue (inputInfo.pointer, (xEvent *) &de); + mieqEnqueue (dev, (xEvent *) &de); return TRUE; } @@ -1038,6 +1038,7 @@ DGAProcessKeyboardEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr keybd) xEvent core; KeyClassPtr keyc = keybd->key; DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); + DeviceIntPtr pointer = GetPairedPointer(keybd); coreEquiv = de->u.u.type - *XDGAEventBase; @@ -1047,7 +1048,7 @@ DGAProcessKeyboardEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr keybd) de->u.event.dx = 0; de->u.event.dy = 0; de->u.event.screen = pScreen->myNum; - de->u.event.state = keyc->state | (inputInfo.pointer)->button->state; + de->u.event.state = keyc->state | pointer->button->state; /* * Keep the core state in sync by duplicating what @@ -1060,7 +1061,7 @@ DGAProcessKeyboardEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr keybd) switch (coreEquiv) { case KeyPress: - inputInfo.pointer->valuator->motionHintWindow = NullWindow; + pointer->valuator->motionHintWindow = NullWindow; *kptr |= bit; keyc->prev_state = keyc->state; #ifdef XKB @@ -1081,7 +1082,7 @@ DGAProcessKeyboardEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr keybd) } break; case KeyRelease: - inputInfo.pointer->valuator->motionHintWindow = NullWindow; + pointer->valuator->motionHintWindow = NullWindow; *kptr &= ~bit; keyc->prev_state = keyc->state; #ifdef XKB @@ -1197,8 +1198,6 @@ DGAProcessPointerEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr mouse) /* If the pointer is actively grabbed, deliver a grabbed core event */ if (mouse->deviceGrab.grab && !mouse->deviceGrab.fromPassiveGrab) { - /* I've got no clue if that is correct but only working on core - * grabs seems the right thing here. (whot) */ core.u.u.type = coreEquiv; core.u.u.detail = de->u.u.detail; core.u.keyButtonPointer.time = de->u.event.time; diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index a458c1119..c6df92c36 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -539,7 +539,7 @@ xf86PostMotionEventP(DeviceIntPtr device, int *valuators) { int i = 0, nevents = 0; - int dx, dy; + int dx = 0, dy = 0; Bool drag = xf86SendDragEvents(device); xEvent *xE = NULL; int index; @@ -551,18 +551,25 @@ xf86PostMotionEventP(DeviceIntPtr device, flags = POINTER_RELATIVE | POINTER_ACCELERATE; #if XFreeXDGA - if (first_valuator == 0 && num_valuators >= 2) { - if (miPointerGetScreen(inputInfo.pointer)) { - index = miPointerGetScreen(inputInfo.pointer)->myNum; - if (is_absolute) { - dx = valuators[0] - device->valuator->lastx; - dy = valuators[1] - device->valuator->lasty; - } - else { + /* The evdev driver may not always send all axes across. */ + if (num_valuators >= 1 && first_valuator <= 1) { + if (miPointerGetScreen(device)) { + index = miPointerGetScreen(device)->myNum; + if (first_valuator == 0) + { dx = valuators[0]; - dy = valuators[1]; + if (is_absolute) + dx -= device->valuator->lastx; } - if (DGAStealMotionEvent(index, dx, dy)) + + if (first_valuator == 1 || num_valuators >= 2) + { + dy = valuators[1 - first_valuator]; + if (is_absolute) + dy -= device->valuator->lasty; + } + + if (DGAStealMotionEvent(device, index, dx, dy)) return; } } @@ -633,9 +640,9 @@ xf86PostButtonEvent(DeviceIntPtr device, int index; #if XFreeXDGA - if (miPointerGetScreen(inputInfo.pointer)) { - index = miPointerGetScreen(inputInfo.pointer)->myNum; - if (DGAStealButtonEvent(index, button, is_down)) + if (miPointerGetScreen(device)) { + index = miPointerGetScreen(device)->myNum; + if (DGAStealButtonEvent(device, index, button, is_down)) return; } #endif @@ -716,9 +723,11 @@ xf86PostKeyboardEvent(DeviceIntPtr device, int index; #if XFreeXDGA - if (miPointerGetScreen(inputInfo.pointer)) { - index = miPointerGetScreen(inputInfo.pointer)->myNum; - if (DGAStealKeyEvent(index, key_code, is_down)) + DeviceIntPtr pointer = GetPairedPointer(device); + + if (miPointerGetScreen(pointer)) { + index = miPointerGetScreen(pointer)->myNum; + if (DGAStealKeyEvent(device, index, key_code, is_down)) return; } #endif diff --git a/hw/xfree86/dixmods/extmod/dgaproc.h b/hw/xfree86/dixmods/extmod/dgaproc.h index aaea4e20c..f4d3fe45b 100644 --- a/hw/xfree86/dixmods/extmod/dgaproc.h +++ b/hw/xfree86/dixmods/extmod/dgaproc.h @@ -120,9 +120,10 @@ int DGAGetOldDGAMode(int Index); int DGAGetModeInfo(int Index, XDGAModePtr mode, int num); Bool DGAVTSwitch(void); -Bool DGAStealButtonEvent(int Index, int button, int is_down); -Bool DGAStealMotionEvent(int Index, int dx, int dy); -Bool DGAStealKeyEvent(int Index, int key_code, int is_down); +Bool DGAStealButtonEvent(DeviceIntPtr dev, int Index, int button, + int is_down); +Bool DGAStealMotionEvent(DeviceIntPtr dev, int Index, int dx, int dy); +Bool DGAStealKeyEvent(DeviceIntPtr dev, int Index, int key_code, int is_down); Bool DGAIsDgaEvent (xEvent *e); Bool DGADeliverEvent (ScreenPtr pScreen, xEvent *e); From 2b075e97ec913ebe19290181e36bb169410b820b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 2 Oct 2007 13:28:40 +0930 Subject: [PATCH 192/634] mi: switch core keyboard on XI events, not only on core events. We only get core events through the EQ in exceptional cases, so make sure we actually swap the core keymap for XI events as well. Gives us back the ability to have multiple keyboard layouts simultaneously. --- mi/mieq.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mi/mieq.c b/mi/mieq.c index 9e0f5befb..f5e119efb 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -267,10 +267,12 @@ mieqProcessInputEvents(void) return; } - /* If this is a core event, make sure our keymap, et al, is - * changed to suit. */ - if (e->events->event[0].u.u.type == KeyPress || - e->events->event[0].u.u.type == KeyRelease) { + /* Make sure our keymap, et al, is changed to suit. */ + if ((e->events->event[0].u.u.type == DeviceKeyPress || + e->events->event[0].u.u.type == DeviceKeyRelease || + e->events->event[0].u.u.type == KeyPress || + e->events->event[0].u.u.type == KeyRelease) && + e->pDev->coreEvents) { SwitchCoreKeyboard(e->pDev); } From f965a5f3454a95ddffb2faf9b291feff46305adf Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 2 Oct 2007 16:20:27 +0930 Subject: [PATCH 193/634] dix: Ignore devices when deleting passive core grabs. --- dix/grabs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/grabs.c b/dix/grabs.c index f1d00867e..d51511cd8 100644 --- a/dix/grabs.c +++ b/dix/grabs.c @@ -406,7 +406,7 @@ DeletePassiveGrabFromList(GrabPtr pMinuendGrab) grab = grab->next) { if ((CLIENT_BITS(grab->resource) != CLIENT_BITS(pMinuendGrab->resource)) || - !GrabMatchesSecond(grab, pMinuendGrab, FALSE)) + !GrabMatchesSecond(grab, pMinuendGrab, (grab->coreGrab))) continue; if (GrabSupersedesSecond(pMinuendGrab, grab)) { From 05106ac9839102c0e4a3ce5d9d83d19abf129f8a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 3 Oct 2007 11:33:10 +0930 Subject: [PATCH 194/634] dix: change Enter/Leave semaphore handling to accommodate for NotifyGrab. This is a half-assed attempt at getting rid of some enter-leave problems. When a grab is activated, the events didn't get sent before, leading to interesting results. This commit papers over it but doesn't actually fix it properly. The whole enter/leave (focusin/out) structure needs to be ripped out and changed for multiple devices. --- dix/events.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/dix/events.c b/dix/events.c index 6eac09049..35abffd80 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4160,7 +4160,7 @@ EnterLeaveEvent( * Sending multiple core enter/leave events to the same window confuse the * client. * We can send multiple events that have detail NotifyVirtual or - * NotifyNonlinearVirtual however. + * NotifyNonlinearVirtual however. For most clients anyway. * * For standard events (NotifyAncestor, NotifyInferior, NotifyNonlinear) * we only send an enter event for the first pointer to enter. A leave @@ -4183,8 +4183,6 @@ EnterLeaveEvent( if (event.u.u.detail != NotifyVirtual && event.u.u.detail != NotifyNonlinearVirtual) { - (type == EnterNotify) ? (*inWindow)++ : (*inWindow)--; - if (((*inWindow) == (LeaveNotify - type))) sendevent = TRUE; } else @@ -4289,6 +4287,22 @@ LeaveNotifies(DeviceIntPtr pDev, } } +#define FOCUS_SEMAPHORE_MODIFY(win, field, mode, val) \ + { \ + if (mode != NotifyGrab && mode != NotifyUngrab) \ + { \ + FocusSemaphoresPtr sem;\ + sem = (FocusSemaphoresPtr)win->devPrivates[FocusPrivatesIndex].ptr; \ + sem->field += val; \ + } \ + } +#define ENTER_LEAVE_SEMAPHORE_UP(win, mode) \ + FOCUS_SEMAPHORE_MODIFY(win, enterleave, mode, 1); + +#define ENTER_LEAVE_SEMAPHORE_DOWN(win, mode) \ + FOCUS_SEMAPHORE_MODIFY(win, enterleave, mode, -1); + + /** * Figure out if enter/leave events are necessary and send them to the * appropriate windows. @@ -4306,27 +4320,33 @@ DoEnterLeaveEvents(DeviceIntPtr pDev, return; if (IsParent(fromWin, toWin)) { + ENTER_LEAVE_SEMAPHORE_DOWN(fromWin, mode); EnterLeaveEvent(pDev, LeaveNotify, mode, NotifyInferior, fromWin, None); EnterNotifies(pDev, fromWin, toWin, mode, NotifyVirtual); + ENTER_LEAVE_SEMAPHORE_UP(toWin, mode); EnterLeaveEvent(pDev, EnterNotify, mode, NotifyAncestor, toWin, None); } else if (IsParent(toWin, fromWin)) { + ENTER_LEAVE_SEMAPHORE_DOWN(fromWin, mode); EnterLeaveEvent(pDev, LeaveNotify, mode, NotifyAncestor, fromWin, None); LeaveNotifies(pDev, fromWin, toWin, mode, NotifyVirtual); + ENTER_LEAVE_SEMAPHORE_UP(toWin, mode); EnterLeaveEvent(pDev, EnterNotify, mode, NotifyInferior, toWin, None); } else { /* neither fromWin nor toWin is descendent of the other */ WindowPtr common = CommonAncestor(toWin, fromWin); /* common == NullWindow ==> different screens */ + ENTER_LEAVE_SEMAPHORE_DOWN(fromWin, mode); EnterLeaveEvent(pDev, LeaveNotify, mode, NotifyNonlinear, fromWin, None); LeaveNotifies(pDev, fromWin, common, mode, NotifyNonlinearVirtual); EnterNotifies(pDev, common, toWin, mode, NotifyNonlinearVirtual); + ENTER_LEAVE_SEMAPHORE_UP(toWin, mode); EnterLeaveEvent(pDev, EnterNotify, mode, NotifyNonlinear, toWin, None); } From 0b485067823620b5dbd9ef2b3e13bd35ad5a4410 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 3 Oct 2007 14:22:55 +0930 Subject: [PATCH 195/634] dix: send NotifyGrab/NotifyUngrab focus events regardless of semaphore state. This is just papering over a problem. The whole focus system needs to be revised. --- dix/events.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dix/events.c b/dix/events.c index 35abffd80..64892920b 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4374,7 +4374,7 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) * For standard events (NotifyAncestor, NotifyInferior, NotifyNonlinear) * we only send an FocusIn event for the first kbd to set the focus. A * FocusOut event is sent for the last kbd to set the focus away from the - * window.. + * window. * * For events with Virtual detail, we send them only to a window that does * not have a focus from another keyboard. @@ -4392,7 +4392,9 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) numFoci = &((FocusSemaphoresPtr)pWin->devPrivates[FocusPrivatesIndex].ptr)->focusinout; - if (detail != NotifyVirtual && + if (mode == NotifyGrab || mode == NotifyUngrab) + sendevent = TRUE; + else if (detail != NotifyVirtual && detail != NotifyNonlinearVirtual && detail != NotifyPointer && detail != NotifyPointerRoot && From 1eebb03a3190947a8102f2ddc73766cf98d34c84 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 3 Oct 2007 15:18:17 +0930 Subject: [PATCH 196/634] dix: ignore passive grab if the client already has a grab on the device. In some cases a button press may activate a passive core grab. If the client owning the passive grab already has a core grab on another device, don't actually activate it. Otherwise the client gets two simultaneous passive core grabs, and may never ungrab the device again (only if the other grab uses GrabModeSync). Reproducable: fire up gnome-session, open up gnome-terminal. Click with the ClientPointer onto the window decoration, then click with another pointer onto an application icon in the panel. Drag the icon out, release the button and voila - you just lost your second mouse. --- dix/events.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/dix/events.c b/dix/events.c index 64892920b..8141a4051 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3297,6 +3297,35 @@ CheckPassiveGrabsOnWindow( grab->modifierDevice = GetPairedKeyboard(device); } + /* In some cases a passive core grab may exist, but the client + * already has a core grab on some other device. In this case we + * must not get the grab, otherwise we may never ungrab the + * device. + */ + + if (grab->coreGrab) + { + DeviceIntPtr other; + BOOL interfering = FALSE; + for (other = inputInfo.devices; other; other = other->next) + { + GrabPtr othergrab = other->deviceGrab.grab; + if (othergrab && othergrab->coreGrab && + SameClient(grab, rClient(othergrab)) && + ((IsPointerDevice(grab->device) && + IsPointerDevice(othergrab->device)) || + (IsKeyboardDevice(grab->device) && + IsKeyboardDevice(othergrab->device)))) + { + interfering = TRUE; + break; + } + } + if (interfering) + continue; + } + + (*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE); FixUpEventFromWindow(device, xE, grab->window, None, TRUE); From 9f2b493e34e93881101f31e631901d3fe56da4f0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 27 Sep 2007 15:35:41 +0930 Subject: [PATCH 197/634] xkb: remove some warning comments. Obsolete with 340911d7243a7f1095d79b5b2dcfa81b145c2474. --- xkb/xkbActions.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 891b91544..dd4d7c1db 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -907,10 +907,6 @@ ProcessInputProc backupproc; realMods = xkbi->device->key->modifierMap[ev.u.u.detail]; xkbi->device->key->modifierMap[ev.u.u.detail] = 0; - /* XXX: Bad! Since the switch to XI devices xkbi->device will be the - * XI device. Sending a core event through ProcessOtherEvent will - * cause trouble. Somebody should fix this. - */ UNWRAP_PROCESS_INPUT_PROC(xkbi->device,xkbPrivPtr, backupproc); xkbi->device->public.processInputProc(&ev,xkbi->device,1); COND_WRAP_PROCESS_INPUT_PROC(xkbi->device, xkbPrivPtr, @@ -953,10 +949,6 @@ ProcessInputProc backupproc; realMods = xkbi->device->key->modifierMap[ev.u.u.detail]; xkbi->device->key->modifierMap[ev.u.u.detail] = 0; - /* XXX: Bad! Since the switch to XI devices xkbi->device will be the - * XI device. Sending a core event through ProcessOtherEvent will - * cause trouble. Somebody should fix this. - */ UNWRAP_PROCESS_INPUT_PROC(xkbi->device,xkbPrivPtr, backupproc); xkbi->device->public.processInputProc(&ev,xkbi->device,1); COND_WRAP_PROCESS_INPUT_PROC(xkbi->device, xkbPrivPtr, From ab88cb8d2e7c1410f9ed2be928b38f176b132e11 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 3 Oct 2007 18:08:33 +0930 Subject: [PATCH 198/634] Xext: add missing geint.h to Makefile.am (un-breaks make dist) --- Xext/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xext/Makefile.am b/Xext/Makefile.am index cdfd0dc71..e9e2d9ca1 100644 --- a/Xext/Makefile.am +++ b/Xext/Makefile.am @@ -15,7 +15,7 @@ INCLUDES = -I$(top_srcdir)/hw/xfree86/dixmods/extmod AM_CFLAGS = $(DIX_CFLAGS) if XORG -sdk_HEADERS = xvdix.h xvmcext.h geext.h +sdk_HEADERS = xvdix.h xvmcext.h geext.h geint.h endif # Sources always included in libXextbuiltin.la & libXext.la From ff2351246da30b56a3a8f90654993c41b8eb3921 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 5 Oct 2007 12:19:03 +0930 Subject: [PATCH 199/634] dix: When pairing, only check for access right if client is set. If the pairing client is not set, then the pairing is initiated internally (e.g. when a new keyboard device is configured). In this case we _must_ pair regardless of who is the pairing client. --- dix/devices.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index 24eaa4b1d..7cf82eead 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2184,6 +2184,9 @@ ProcQueryKeymap(ClientPtr client) /* Pair the keyboard to the pointer device. Keyboard events will follow the * pointer sprite. + * If the client is set, the request to pair comes from some client. In this + * case, we need to check for access. If the client is NULL, it's from an + * internal automatic pairing, we must always permit this. */ int PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd) @@ -2193,7 +2196,7 @@ PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd) if (!pairingClient) RegisterPairingClient(client); - else if (pairingClient != client) + else if (client && pairingClient != client) return BadAccess; if (kbd->spriteInfo->spriteOwner) From d42909b23a9be64a26aa349c1d6dcd8b228bffa7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 5 Oct 2007 13:04:10 +0930 Subject: [PATCH 200/634] dix: when disabling a device, make sure all paired devices are re-paired. We re-pair them with the VCP, not a real device! If we would do otherwise, somebody may change our keyboard focus and thus get us typing where we don't want to type. --- dix/devices.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index 7cf82eead..59404e9cf 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -252,7 +252,7 @@ EnableDevice(DeviceIntPtr dev) Bool DisableDevice(DeviceIntPtr dev) { - DeviceIntPtr *prev; + DeviceIntPtr *prev, paired; DeviceIntRec dummyDev; devicePresenceNotify ev; @@ -268,6 +268,16 @@ DisableDevice(DeviceIntPtr dev) dev->next = inputInfo.off_devices; inputInfo.off_devices = dev; + /* Some other device may have been paired with this device. + Re-pair with VCP. We don't repair with a real device, as this + may cause somebody suddenly typing where they shouldn't. + */ + for (paired = inputInfo.devices; paired; paired = paired->next) + { + if (paired->spriteInfo->paired == dev) + PairDevices(NULL, inputInfo.pointer, paired); + } + ev.type = DevicePresenceNotify; ev.time = currentTime.milliseconds; ev.devchange = DeviceDisabled; From 042e16458b751ad0fcfa1ebbdd74d7d48036b22a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 9 Oct 2007 23:07:51 +0930 Subject: [PATCH 201/634] dix: change a few inputInfo.keyboard over to PickKeyboard() --- dix/devices.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 59404e9cf..37a98a090 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -1514,7 +1514,7 @@ int ProcGetModifierMapping(ClientPtr client) { xGetModifierMappingReply rep; - KeyClassPtr keyc = inputInfo.keyboard->key; + KeyClassPtr keyc = PickKeyboard(client)->key; REQUEST_SIZE_MATCH(xReq); rep.type = X_Reply; @@ -1537,7 +1537,7 @@ ProcChangeKeyboardMapping(ClientPtr client) REQUEST(xChangeKeyboardMappingReq); unsigned len; KeySymsRec keysyms; - KeySymsPtr curKeySyms = &inputInfo.keyboard->key->curKeySyms; + KeySymsPtr curKeySyms = &PickKeyboard(client)->key->curKeySyms; DeviceIntPtr pDev = NULL; REQUEST_AT_LEAST_SIZE(xChangeKeyboardMappingReq); @@ -1940,7 +1940,7 @@ int ProcGetKeyboardControl (ClientPtr client) { int i; - KeybdCtrl *ctrl = &inputInfo.keyboard->kbdfeed->ctrl; + KeybdCtrl *ctrl = &PickKeyboard(client)->kbdfeed->ctrl; xGetKeyboardControlReply rep; REQUEST_SIZE_MATCH(xReq); @@ -1962,7 +1962,7 @@ ProcGetKeyboardControl (ClientPtr client) int ProcBell(ClientPtr client) { - DeviceIntPtr keybd = inputInfo.keyboard; + DeviceIntPtr keybd = PickKeyboard(client); int base = keybd->kbdfeed->ctrl.bell; int newpercent; REQUEST(xBellReq); @@ -2174,7 +2174,7 @@ ProcQueryKeymap(ClientPtr client) { xQueryKeymapReply rep; int i; - CARD8 *down = inputInfo.keyboard->key->down; + CARD8 *down = PickKeyboard(client)->key->down; REQUEST_SIZE_MATCH(xReq); rep.type = X_Reply; From ce9bf9a19185a36ac2f7ae75acd320ab8d03d247 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 14 Oct 2007 01:50:40 +0930 Subject: [PATCH 202/634] include: add "master" field to DeviceIntRec. "master" points to the device this device is attached to. Event sent by the device will also be routed through the master. master and spriteOwner are mutually exclusive. --- include/inputstr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/inputstr.h b/include/inputstr.h index cbbc4e2bd..146fbc8b6 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -398,6 +398,7 @@ typedef struct _DeviceIntRec { int nPrivates; DeviceUnwrapProc unwrapProc; SpriteInfoPtr spriteInfo; + DeviceIntPtr master; /* master device */ } DeviceIntRec; typedef struct { From be1565f6b8fb09eba9941d6f7c485bf5fb25fe7a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 14 Oct 2007 01:53:54 +0930 Subject: [PATCH 203/634] dix: Set core devices to ProcessOtherEvents, set sendCore and XKB. Even the virtual core devices should send through ProcessOtherEvents. --- dix/devices.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 37a98a090..9e9fca3e3 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -469,21 +469,22 @@ InitCoreDevices(void) FatalError("Failed to allocate core keyboard"); dev->name = strdup("Virtual core keyboard"); #ifdef XKB - dev->public.processInputProc = CoreProcessKeyboardEvent; - dev->public.realInputProc = CoreProcessKeyboardEvent; - /*if (!noXkbExtension)*/ - /*XkbSetExtension(dev, ProcessKeyboardEvent);*/ + dev->public.processInputProc = ProcessOtherEvent; + dev->public.realInputProc = ProcessOtherEvent; + if (!noXkbExtension) + XkbSetExtension(dev, ProcessKeyboardEvent); #else dev->public.processInputProc = ProcessKeyboardEvent; dev->public.realInputProc = ProcessKeyboardEvent; #endif dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab; dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; - dev->coreEvents = FALSE; + dev->coreEvents = TRUE; dev->spriteInfo->spriteOwner = FALSE; if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) FatalError("Couldn't allocate keyboard devPrivates\n"); dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; + dev->master = NULL; (void)ActivateDevice(dev); inputInfo.keyboard = dev; @@ -495,8 +496,8 @@ InitCoreDevices(void) FatalError("Failed to allocate core pointer"); dev->name = strdup("Virtual core pointer"); #ifdef XKB - dev->public.processInputProc = CoreProcessPointerEvent; - dev->public.realInputProc = CoreProcessPointerEvent; + dev->public.processInputProc = ProcessOtherEvent; + dev->public.realInputProc = ProcessOtherEvent; if (!noXkbExtension) XkbSetExtension(dev, ProcessPointerEvent); #else @@ -505,11 +506,12 @@ InitCoreDevices(void) #endif dev->deviceGrab.ActivateGrab = ActivatePointerGrab; dev->deviceGrab.DeactivateGrab = DeactivatePointerGrab; - dev->coreEvents = FALSE; + dev->coreEvents = TRUE; dev->spriteInfo->spriteOwner = TRUE; if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) FatalError("Couldn't allocate pointer devPrivates\n"); dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; + dev->master = NULL; (void)ActivateDevice(dev); inputInfo.pointer = dev; From bd7d5255ce4865b684f7d8bcf80ba9872a1af22d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Oct 2007 11:18:31 +0930 Subject: [PATCH 204/634] dix: add AttachDevice, needed to attach a slave device to a master device. For now, we don't allow attaching slaves to other slaves, and we don't allow pairing slaves with other slaves. Pairing is for master keyboard->master pointer only. Attaching is for slave device->master device only. --- dix/devices.c | 47 ++++++++++++++++++++++++++++++++++++++--------- include/input.h | 3 +++ 2 files changed, 41 insertions(+), 9 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 9e9fca3e3..c41fa0c69 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -540,11 +540,11 @@ InitAndStartDevices(WindowPtr root) ActivateDevice(dev); } - if (!inputInfo.keyboard) { + if (!inputInfo.keyboard) { /* In theory, this cannot happen */ ErrorF("[dix] No core keyboard\n"); return BadImplementation; } - if (!inputInfo.pointer) { + if (!inputInfo.pointer) { /* In theory, this cannot happen */ ErrorF("[dix] No core pointer\n"); return BadImplementation; } @@ -555,10 +555,6 @@ InitAndStartDevices(WindowPtr root) if (inputInfo.pointer->inited && inputInfo.pointer->startup) EnableDevice(inputInfo.pointer); - /* Remove VCP and VCK from device list */ - inputInfo.devices = NULL; - inputInfo.keyboard->next = inputInfo.pointer->next = NULL; - /* enable real devices */ for (dev = inputInfo.off_devices; dev; dev = next) { @@ -569,17 +565,20 @@ InitAndStartDevices(WindowPtr root) } /* All of the devices are started up now. Pair VCK with VCP, then - * pair each real keyboard with a real pointer. + * attach each device to the initial master. */ PairDevices(NULL, inputInfo.pointer, inputInfo.keyboard); for (dev = inputInfo.devices; dev; dev = dev->next) { if (!DevHasCursor(dev)) - PairDevices(NULL, GuessFreePointerDevice(), dev); + AttachDevice(NULL, dev, inputInfo.keyboard); else + { + AttachDevice(NULL, dev, inputInfo.pointer); /* enter/leave counter on root window */ ((FocusSemaphoresPtr)root->devPrivates[FocusPrivatesIndex].ptr)->enterleave++; + } } return Success; @@ -2195,7 +2194,7 @@ ProcQueryKeymap(ClientPtr client) } /* Pair the keyboard to the pointer device. Keyboard events will follow the - * pointer sprite. + * pointer sprite. Only applicable for master devices. * If the client is set, the request to pair comes from some client. In this * case, we need to check for access. If the client is NULL, it's from an * internal automatic pairing, we must always permit this. @@ -2206,6 +2205,10 @@ PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd) if (!ptr) return BadDevice; + /* Don't allow pairing for slave devices */ + if (ptr->master || kbd->master) + return BadDevice; + if (!pairingClient) RegisterPairingClient(client); else if (client && pairingClient != client) @@ -2223,6 +2226,32 @@ PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd) return Success; } +/** + * Attach device 'dev' to device 'master'. + * Client is set to the client that issued the request, or NULL if it comes + * from some internal automatic pairing. + * + * We don't allow multi-layer hierarchies right now. You can't attach a slave + * to another slave. + */ +int +AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) +{ + if (!dev || !master) + return BadDevice; + + if (master->master) /* can't attach to slave device */ + return BadDevice; + + if (!pairingClient) + RegisterPairingClient(client); + else if (client && pairingClient != client) + return BadAccess; + + dev->master = master; + + return Success; +} /* Return the pointer that is paired with the given keyboard. If no pointer is * paired, return the virtual core pointer */ diff --git a/include/input.h b/include/input.h index d86a969c8..1ef36b8d8 100644 --- a/include/input.h +++ b/include/input.h @@ -465,6 +465,9 @@ extern DeviceIntPtr LookupDeviceIntRec( extern int PairDevices(ClientPtr client, DeviceIntPtr pointer, DeviceIntPtr keyboard); +extern int AttachDevice(ClientPtr client, + DeviceIntPtr slave, + DeviceIntPtr master); extern DeviceIntPtr GetPairedPointer(DeviceIntPtr kbd); extern DeviceIntPtr GetPairedKeyboard(DeviceIntPtr ptr); From 204f2dc89ef662b57400b128c30c15e8cf32f323 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 14 Oct 2007 04:13:06 +0930 Subject: [PATCH 205/634] include: add "isMaster" field to DeviceIntRec. Set to TRUE for master devices. Also fixing up comment for paired field in spriteInfo, will be set bidirectional from now on. --- include/inputstr.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/inputstr.h b/include/inputstr.h index 146fbc8b6..d96e24a96 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -357,8 +357,9 @@ typedef struct _SpriteInfoRec { * sprite, let sprite point to a paired spriteOwner's sprite. */ SpritePtr sprite; /* sprite information */ Bool spriteOwner; /* True if device owns the sprite */ - DeviceIntPtr paired; /* the real owner of the sprite or - NULL if spriteOwner is TRUE*/ + DeviceIntPtr paired; /* The paired device. Keyboard if + spriteOwner is TRUE, otherwise the + pointer that owns the sprite. */ } SpriteInfoRec, *SpriteInfoPtr; typedef struct _DeviceIntRec { @@ -373,6 +374,7 @@ typedef struct _DeviceIntRec { Bool enabled; /* TRUE if ON returns Success */ Bool coreEvents; /* TRUE if device also sends core */ GrabInfoRec deviceGrab; /* grab on the device */ + Bool isMaster; /* TRUE if device is master */ Atom type; char *name; CARD8 id; From 70efd3d06a15093661933bda4ec21e306dece4a4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Oct 2007 11:30:32 +0930 Subject: [PATCH 206/634] dix: fix up Activate/Enable/Disable device. Set isMaster for VCP/VCK. Init sprites for master pointer devices. Pair master kbds with master pointers (1:1 pairing!). Attach other devices to VCP/VCK. --- dix/devices.c | 84 +++++++++++++++++++++++++++++++++++++------------ include/input.h | 1 + 2 files changed, 65 insertions(+), 20 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index c41fa0c69..2dd3f9e5e 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -189,8 +189,9 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart) * list. Initialize the DIX sprite or pair the device. All clients are * notified about the device being enabled. * - * A device will send events once enabled. - * + * A master pointer device needs to be enabled before a master keyboard + * device. + * * @param The device to be enabled. * @return TRUE on success or FALSE otherwise. */ @@ -200,6 +201,7 @@ EnableDevice(DeviceIntPtr dev) DeviceIntPtr *prev; int ret; DeviceIntRec dummyDev; + DeviceIntPtr other; devicePresenceNotify ev; for (prev = &inputInfo.off_devices; @@ -207,15 +209,26 @@ EnableDevice(DeviceIntPtr dev) prev = &(*prev)->next) ; - /* Sprites pop up on the first root window, so we can supply it directly - * here. - */ if (!dev->spriteInfo->sprite) { - if (IsPointerDevice(dev) && dev->spriteInfo->spriteOwner) - InitializeSprite(dev, WindowTable[0]); - else - PairDevices(NULL, inputInfo.pointer, dev); + if (dev->isMaster) + { + /* Sprites appear on first root window, so we can hardcode it */ + if (dev->spriteInfo->spriteOwner) + InitializeSprite(dev, WindowTable[0]); + else if ((other = NextFreePointerDevice()) == NULL) + { + ErrorF("[dix] cannot find pointer to pair with. " + "This is a bug.\n"); + return FALSE; + } else + PairDevices(NULL, other, dev); + } else + { + other = (IsPointerDevice(dev)) ? inputInfo.pointer : + inputInfo.keyboard; + AttachDevice(NULL, dev, other); + } } if ((*prev != dev) || !dev->inited || @@ -247,12 +260,15 @@ EnableDevice(DeviceIntPtr dev) * list. A device will not send events while disabled. All clients are * notified about the device being disabled. * + * Master keyboard devices have to be disabled before master pointer devices + * otherwise things turn bad. + * * @return TRUE on success or FALSE otherwise. */ Bool DisableDevice(DeviceIntPtr dev) { - DeviceIntPtr *prev, paired; + DeviceIntPtr *prev, other; DeviceIntRec dummyDev; devicePresenceNotify ev; @@ -262,20 +278,34 @@ DisableDevice(DeviceIntPtr dev) ; if (*prev != dev) return FALSE; + + if (dev->isMaster && dev->spriteInfo->sprite) + { + for (other = inputInfo.devices; other; other = other->next) + { + if (other->spriteInfo->paired == dev) + { + ErrorF("[dix] cannot disable device, still paired. " + "This is a bug. \n"); + return FALSE; + } + } + } + (void)(*dev->deviceProc)(dev, DEVICE_OFF); dev->enabled = FALSE; *prev = dev->next; dev->next = inputInfo.off_devices; inputInfo.off_devices = dev; - /* Some other device may have been paired with this device. - Re-pair with VCP. We don't repair with a real device, as this - may cause somebody suddenly typing where they shouldn't. - */ - for (paired = inputInfo.devices; paired; paired = paired->next) + /* float attached devices */ + if (dev->isMaster) { - if (paired->spriteInfo->paired == dev) - PairDevices(NULL, inputInfo.pointer, paired); + for (other = inputInfo.devices; other; other = other->next) + { + if (other->master == dev) + AttachDevice(NULL, dev, NULL); + } } ev.type = DevicePresenceNotify; @@ -313,7 +343,7 @@ ActivateDevice(DeviceIntPtr dev) dev->inited = (ret == Success); /* Initialize memory for sprites. */ - if (IsPointerDevice(dev)) + if (dev->isMaster && dev->spriteInfo->spriteOwner) pScreen->DeviceCursorInitialize(dev, pScreen); ev.type = DevicePresenceNotify; @@ -485,6 +515,7 @@ InitCoreDevices(void) FatalError("Couldn't allocate keyboard devPrivates\n"); dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; dev->master = NULL; + dev->isMaster = TRUE; (void)ActivateDevice(dev); inputInfo.keyboard = dev; @@ -512,6 +543,7 @@ InitCoreDevices(void) FatalError("Couldn't allocate pointer devPrivates\n"); dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; dev->master = NULL; + dev->isMaster = TRUE; (void)ActivateDevice(dev); inputInfo.pointer = dev; @@ -550,10 +582,10 @@ InitAndStartDevices(WindowPtr root) } /* Now enable all devices */ - if (inputInfo.keyboard->inited && inputInfo.keyboard->startup) - EnableDevice(inputInfo.keyboard); if (inputInfo.pointer->inited && inputInfo.pointer->startup) EnableDevice(inputInfo.pointer); + if (inputInfo.keyboard->inited && inputInfo.keyboard->startup) + EnableDevice(inputInfo.keyboard); /* enable real devices */ for (dev = inputInfo.off_devices; dev; dev = next) @@ -2367,3 +2399,15 @@ GuessFreePointerDevice() return (lastRealPtr) ? lastRealPtr : inputInfo.pointer; } + +DeviceIntPtr +NextFreePointerDevice() +{ + DeviceIntPtr dev; + for (dev = inputInfo.devices; dev; dev = dev->next) + if (dev->isMaster && + dev->spriteInfo->spriteOwner && + !dev->spriteInfo->paired) + return dev; + return NULL; +} diff --git a/include/input.h b/include/input.h index 1ef36b8d8..f41514a43 100644 --- a/include/input.h +++ b/include/input.h @@ -476,6 +476,7 @@ extern Bool RegisterPairingClient(ClientPtr client); extern Bool UnregisterPairingClient(ClientPtr client); extern DeviceIntPtr GuessFreePointerDevice(void); +extern DeviceIntPtr NextFreePointerDevice(void); /* Window/device based access control */ extern Bool ACRegisterClient(ClientPtr client); From 38baac71bdbb8c7e882e3e39133615cfed894a6b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 14 Oct 2007 04:21:42 +0930 Subject: [PATCH 207/634] dix: Set bidirectional pairing, don't allow pairing with already paired devs. --- dix/devices.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index 2dd3f9e5e..7be0d6941 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2238,7 +2238,10 @@ PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd) return BadDevice; /* Don't allow pairing for slave devices */ - if (ptr->master || kbd->master) + if (!ptr->isMaster || !kbd->isMaster) + return BadDevice; + + if (ptr->spriteInfo->paired) return BadDevice; if (!pairingClient) @@ -2255,6 +2258,7 @@ PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd) kbd->spriteInfo->sprite = ptr->spriteInfo->sprite; kbd->spriteInfo->paired = ptr; + ptr->spriteInfo->paired = kbd; return Success; } From 3e07e73fefc100e491d1e465cb162373d1d82425 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Oct 2007 11:34:29 +0930 Subject: [PATCH 208/634] dix: remove pairing/attachment from InitAndStartDevices. If we enabled in the correct order, this has all been done already. --- dix/devices.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 7be0d6941..f886120cc 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -215,7 +215,10 @@ EnableDevice(DeviceIntPtr dev) { /* Sprites appear on first root window, so we can hardcode it */ if (dev->spriteInfo->spriteOwner) + { InitializeSprite(dev, WindowTable[0]); + ((FocusSemaphoresPtr)(WindowTable[0])->devPrivates[FocusPrivatesIndex].ptr)->enterleave++; + } else if ((other = NextFreePointerDevice()) == NULL) { ErrorF("[dix] cannot find pointer to pair with. " @@ -596,23 +599,6 @@ InitAndStartDevices(WindowPtr root) (void)EnableDevice(dev); } - /* All of the devices are started up now. Pair VCK with VCP, then - * attach each device to the initial master. - */ - PairDevices(NULL, inputInfo.pointer, inputInfo.keyboard); - - for (dev = inputInfo.devices; dev; dev = dev->next) - { - if (!DevHasCursor(dev)) - AttachDevice(NULL, dev, inputInfo.keyboard); - else - { - AttachDevice(NULL, dev, inputInfo.pointer); - /* enter/leave counter on root window */ - ((FocusSemaphoresPtr)root->devPrivates[FocusPrivatesIndex].ptr)->enterleave++; - } - } - return Success; } From 032e906711202d376af95b37bb0cdf14a3648256 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Oct 2007 11:57:42 +0930 Subject: [PATCH 209/634] dix: Remove GetPairedPointer, GetPairedKeyboard in favour of GetPairedDevice. --- dix/devices.c | 41 +++++++---------------------------------- 1 file changed, 7 insertions(+), 34 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index f886120cc..b4d04b47e 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2274,46 +2274,19 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) return Success; } -/* Return the pointer that is paired with the given keyboard. If no pointer is - * paired, return the virtual core pointer - */ -DeviceIntPtr -GetPairedPointer(DeviceIntPtr kbd) -{ - DeviceIntPtr ptr = inputInfo.devices; - while(ptr) - { - if (ptr->spriteInfo->sprite == kbd->spriteInfo->sprite && - ptr->spriteInfo->spriteOwner) - { - return ptr; - } - ptr = ptr->next; - } - return inputInfo.pointer; -} - -/* Find the keyboard device that is paired with the given pointer. If none is - * found, return the VCK. +/* Return the device paired with the given device or NULL. */ _X_EXPORT DeviceIntPtr -GetPairedKeyboard(DeviceIntPtr ptr) +GetPairedDevice(DeviceIntPtr dev) { - DeviceIntPtr dev = inputInfo.devices; - - if (IsKeyboardDevice(ptr)) - return ptr; - - while(dev) + if (!dev->spriteInfo->paired) { - if (ptr != dev && - IsKeyboardDevice(dev) && - ptr->spriteInfo->sprite == dev->spriteInfo->sprite) - return dev; - dev = dev->next; + ErrorF("[dix] No device paired with %d (%s).\n", + dev->id, dev->name); + return NULL; } - return (dev) ? dev : inputInfo.keyboard; + return dev->spriteInfo->paired; } /* From 7503d1340726e0a529f04304d177ed2ceb8fbc91 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 14 Oct 2007 07:50:13 +0930 Subject: [PATCH 210/634] dix: don't check VCK and VCP separately when looking for device ids. Both are part of the device list again, so we cover them there. --- dix/devices.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index b4d04b47e..7a9932a2d 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -107,10 +107,6 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart) /* Find next available id */ memset(devind, 0, sizeof(char)*MAX_DEVICES); - if (inputInfo.keyboard) - devind[inputInfo.keyboard->id]++; - if (inputInfo.pointer) - devind[inputInfo.pointer->id]++; for (devtmp = inputInfo.devices; devtmp; devtmp = devtmp->next) devind[devtmp->id]++; for (devtmp = inputInfo.off_devices; devtmp; devtmp = devtmp->next) From e4fd981b48723b77a6c1a528638a771b9cc35472 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 14 Oct 2007 07:52:11 +0930 Subject: [PATCH 211/634] dix: check for isMaster before calling DeviceCursorCleanup. --- dix/devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index 7a9932a2d..b47ae5991 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -624,7 +624,7 @@ CloseDevice(DeviceIntPtr dev) (void)(*dev->deviceProc)(dev, DEVICE_CLOSE); /* free sprite memory */ - if (IsPointerDevice(dev)) + if (dev->isMaster && dev->spriteInfo->sprite) screen->DeviceCursorCleanup(dev, screen); xfree(dev->name); From 9ccc9ab6f29f68298b68cdb5c9b4bd57a095f05a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 14 Oct 2007 07:53:00 +0930 Subject: [PATCH 212/634] dix: don't call CloseDevice on VCP/VCK separately. --- dix/devices.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index b47ae5991..a4360e583 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -751,9 +751,6 @@ CloseDownDevices(void) CloseDevice(dev); } - CloseDevice(inputInfo.keyboard); - CloseDevice(inputInfo.pointer); - inputInfo.devices = NULL; inputInfo.off_devices = NULL; inputInfo.keyboard = NULL; From 0c5f65ecd3ad11fbdb1cab3cb1d0eb4f33bb4e35 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 14 Oct 2007 07:57:24 +0930 Subject: [PATCH 213/634] dix: don't allow slave devices as ClientPointer --- dix/events.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dix/events.c b/dix/events.c index 8141a4051..b84d18dee 100644 --- a/dix/events.c +++ b/dix/events.c @@ -6103,6 +6103,16 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) _X_EXPORT Bool SetClientPointer(ClientPtr client, ClientPtr setter, DeviceIntPtr device) { + if (!device->isMaster) + { + ErrorF("[dix] Need master device for ClientPointer. This is a bug.\n"); + return FALSE; + } else if (!device->spriteInfo->spriteOwner) + { + ErrorF("[dix] Device %d does not have a sprite. " + "Cannot be ClientPointer\n", device->id); + return FALSE; + } client->clientPtr = device; return TRUE; } From 9ecbbf198f4cec398897736e173e7e8c56bf6f94 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 14 Oct 2007 08:00:06 +0930 Subject: [PATCH 214/634] dix: adjust PickPointer and PickKeyboard to get the first master device. Simplifies it a lot, since we always have at least one master device available at all times, so less mucking around. --- dix/events.c | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/dix/events.c b/dix/events.c index b84d18dee..58188c894 100644 --- a/dix/events.c +++ b/dix/events.c @@ -6117,34 +6117,22 @@ SetClientPointer(ClientPtr client, ClientPtr setter, DeviceIntPtr device) return TRUE; } -/* PickPointer will pick an appropriate pointer for the given client. - * - * If a client pointer is set, it will pick the client pointer, otherwise the - * first available pointer in the list. If no physical device is attached, it - * will pick the core pointer, but will not store it on the client. - */ +/* PickPointer will pick an appropriate pointer for the given client. */ _X_EXPORT DeviceIntPtr PickPointer(ClientPtr client) { if (!client->clientPtr) { - /* look if there is a real device attached */ DeviceIntPtr it = inputInfo.devices; while (it) { - if (it != inputInfo.pointer && it->spriteInfo->spriteOwner) + if (it->isMaster && it->spriteInfo->spriteOwner) { client->clientPtr = it; break; } it = it->next; } - - if (!it) - { - ErrorF("[dix] Picking VCP\n"); - return inputInfo.pointer; - } } return client->clientPtr; } @@ -6159,18 +6147,15 @@ _X_EXPORT DeviceIntPtr PickKeyboard(ClientPtr client) { DeviceIntPtr ptr = PickPointer(client); - DeviceIntPtr kbd = inputInfo.devices; + DeviceIntPtr kbd = ptr->spriteInfo->paired; - while(kbd) + if (!kbd) { - if (ptr != kbd && - IsKeyboardDevice(kbd) && - ptr->spriteInfo->sprite == kbd->spriteInfo->sprite) - return kbd; - kbd = kbd->next; + ErrorF("[dix] ClientPointer not paired with a keyboard. This " + "is a bug.\n"); } - return (kbd) ? kbd : inputInfo.keyboard; + return kbd; } /* A client that has one or more core grabs does not get core events from From 6c259a08d917f94fd7381453b625b07826d3ef9c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Oct 2007 13:09:19 +0930 Subject: [PATCH 215/634] include: remove unused GetPairedPointer/Keyboard declarations. --- include/input.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/input.h b/include/input.h index f41514a43..a176bbab7 100644 --- a/include/input.h +++ b/include/input.h @@ -469,8 +469,7 @@ extern int AttachDevice(ClientPtr client, DeviceIntPtr slave, DeviceIntPtr master); -extern DeviceIntPtr GetPairedPointer(DeviceIntPtr kbd); -extern DeviceIntPtr GetPairedKeyboard(DeviceIntPtr ptr); +extern DeviceIntPtr GetPairedDevice(DeviceIntPtr kbd); extern Bool RegisterPairingClient(ClientPtr client); extern Bool UnregisterPairingClient(ClientPtr client); From 840bde3d32f3627dfc3d7d8b6564a61a8014933b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Oct 2007 13:09:35 +0930 Subject: [PATCH 216/634] dix: GetPairedDevice: return dev paired with master for slave devices. --- dix/devices.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index a4360e583..0f43d1287 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2268,11 +2268,17 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) return Success; } -/* Return the device paired with the given device or NULL. +/** + * Return the device paired with the given device or NULL. + * Returns the device paired with the parent master if the given device is a + * slave device. */ _X_EXPORT DeviceIntPtr GetPairedDevice(DeviceIntPtr dev) { + if (!dev->isMaster && dev->master) + dev = dev->master; + if (!dev->spriteInfo->paired) { ErrorF("[dix] No device paired with %d (%s).\n", From e9f149fb56747f7eaa0f714dce97b067b007c47e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Oct 2007 14:24:20 +0930 Subject: [PATCH 217/634] Fix up detritus from removing GetPairedPointer/Keyboard. --- Xi/exevents.c | 4 ++-- Xi/getpairp.c | 15 ++++----------- dix/events.c | 18 ++++++++---------- hw/xfree86/common/xf86DGA.c | 4 ++-- hw/xfree86/common/xf86Xinput.c | 2 +- xkb/xkbActions.c | 2 +- 6 files changed, 18 insertions(+), 27 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 1bcc101a7..49400e8d4 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -144,12 +144,12 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) */ if (IsPointerDevice(device)) { - kbd = GetPairedKeyboard(device); + kbd = GetPairedDevice(device); mouse = device; } else { - mouse = GetPairedPointer(device); + mouse = GetPairedDevice(device); kbd = device; } xE->u.keyButtonPointer.state = (kbd) ? (kbd->key->state) : 0; diff --git a/Xi/getpairp.c b/Xi/getpairp.c index 4f1ff0316..1833a00e1 100644 --- a/Xi/getpairp.c +++ b/Xi/getpairp.c @@ -73,27 +73,20 @@ ProcXGetPairedPointer(ClientPtr client) REQUEST_SIZE_MATCH(xGetPairedPointerReq); kbd = LookupDeviceIntRec(stuff->deviceid); - if (!kbd || !kbd->key) { + if (!kbd || !kbd->key || !kbd->isMaster) { SendErrorToClient(client, IReqCode, X_GetPairedPointer, stuff->deviceid, BadDevice); return Success; } - ptr = GetPairedPointer(kbd); + ptr = GetPairedDevice(kbd); rep.repType = X_Reply; rep.RepType = X_GetPairedPointer; rep.length = 0; rep.sequenceNumber = client->sequence; - if (ptr == inputInfo.pointer) - { - rep.paired = FALSE; - rep.deviceid = 0; - } else - { - rep.paired = TRUE; - rep.deviceid = ptr->id; - } + rep.paired = TRUE; + rep.deviceid = ptr->id; WriteReplyToClient(client, sizeof(xGetPairedPointerReply), &rep); return Success; } diff --git a/dix/events.c b/dix/events.c index 58188c894..5bdf14552 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3243,7 +3243,7 @@ CheckPassiveGrabsOnWindow( gdev= grab->modifierDevice; if (grab->coreGrab) - gdev = GetPairedKeyboard(device); + gdev = GetPairedDevice(device); xkbi= gdev->key->xkbInfo; #endif tempGrab.modifierDevice = grab->modifierDevice; @@ -3294,7 +3294,7 @@ CheckPassiveGrabsOnWindow( if (xE->u.u.type < LASTEvent) { grab->device = device; - grab->modifierDevice = GetPairedKeyboard(device); + grab->modifierDevice = GetPairedDevice(device); } /* In some cases a passive core grab may exist, but the client @@ -3453,9 +3453,7 @@ DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count) if (DeliverDeviceEvents(window, xE, NullGrab, focus, keybd, count)) return; } - pointer = GetPairedPointer(keybd); - if (!pointer) - pointer = inputInfo.pointer; + pointer = GetPairedDevice(keybd); /* just deliver it to the focus window */ FixUpEventFromWindow(pointer, xE, focus, None, FALSE); if (xE->u.u.type & EXTENSION_EVENT_BASE) @@ -3684,7 +3682,7 @@ drawable.id:0; #endif /* ProcessOtherEvent already updated the keyboard's state, so we need to * access prev_state here! */ - XE_KBPTR.state = (keyc->prev_state | GetPairedPointer(keybd)->button->state); + XE_KBPTR.state = (keyc->prev_state | GetPairedDevice(keybd)->button->state); XE_KBPTR.rootX = keybd->spriteInfo->sprite->hot.x; XE_KBPTR.rootY = keybd->spriteInfo->sprite->hot.y; key = xE->u.u.detail; @@ -3796,7 +3794,7 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) SpritePtr pSprite = mouse->spriteInfo->sprite; #ifdef XKB - XkbSrvInfoPtr xkbi= GetPairedKeyboard(mouse)->key->xkbInfo; + XkbSrvInfoPtr xkbi= GetPairedDevice(mouse)->key->xkbInfo; #endif #ifdef XEVIE if(xevieFlag && clients[xevieClientIndex] && !xeviegrabState && @@ -4141,7 +4139,7 @@ EnterLeaveEvent( int mskidx; OtherInputMasks *inputMasks; - keybd = GetPairedKeyboard(mouse); + keybd = GetPairedDevice(mouse); if ((pWin == mouse->valuator->motionHintWindow) && (detail != NotifyInferior)) @@ -4682,7 +4680,7 @@ SetInputFocus( if (IsKeyboardDevice(dev)) keybd = dev; else - keybd = GetPairedKeyboard(dev); + keybd = GetPairedDevice(dev); if ((focusID == None) || (focusID == PointerRoot)) focusWin = (WindowPtr)(long)focusID; @@ -5697,7 +5695,7 @@ ProcGrabButton(ClientPtr client) } pointer = PickPointer(client); - modifierDevice = GetPairedKeyboard(pointer); + modifierDevice = GetPairedDevice(pointer); grab = CreateGrab(client->index, pointer, pWin, (Mask)stuff->eventMask, (Bool)stuff->ownerEvents, diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index 553679dad..74788be89 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c @@ -1038,7 +1038,7 @@ DGAProcessKeyboardEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr keybd) xEvent core; KeyClassPtr keyc = keybd->key; DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); - DeviceIntPtr pointer = GetPairedPointer(keybd); + DeviceIntPtr pointer = GetPairedDevice(keybd); coreEquiv = de->u.u.type - *XDGAEventBase; @@ -1145,7 +1145,7 @@ DGAProcessPointerEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr mouse) * Fill in remaining event state */ de->u.event.screen = pScreen->myNum; - de->u.event.state = butc->state | GetPairedKeyboard(mouse)->key->state; + de->u.event.state = butc->state | GetPairedDevice(mouse)->key->state; /* * Keep the core state in sync by duplicating what * CoreProcessPointerEvent does diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index c6df92c36..acc3ae6e0 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -723,7 +723,7 @@ xf86PostKeyboardEvent(DeviceIntPtr device, int index; #if XFreeXDGA - DeviceIntPtr pointer = GetPairedPointer(device); + DeviceIntPtr pointer = GetPairedDevice(device); if (miPointerGetScreen(pointer)) { index = miPointerGetScreen(pointer)->myNum; diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index dd4d7c1db..32b9e0d8f 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -1273,7 +1273,7 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); keyc->modifierMap[key] = 0; tmpdev = dev; } else - tmpdev = GetPairedPointer(dev); + tmpdev = GetPairedDevice(dev); UNWRAP_PROCESS_INPUT_PROC(tmpdev,xkbPrivPtr, backupproc); From c7b878b90406781c97db751a9b454e2b6baee0e1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Oct 2007 15:07:31 +0930 Subject: [PATCH 218/634] dix: don't treat VCK/VCP separately in DevHasCursor, IsPointer/KeyboardDevice. --- dix/events.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dix/events.c b/dix/events.c index 5bdf14552..50d06c465 100644 --- a/dix/events.c +++ b/dix/events.c @@ -322,7 +322,7 @@ XItoCoreType(int xitype) _X_EXPORT Bool DevHasCursor(DeviceIntPtr pDev) { - return (pDev != inputInfo.pointer && pDev->spriteInfo->spriteOwner); + return pDev->spriteInfo->spriteOwner; } /* @@ -332,7 +332,7 @@ DevHasCursor(DeviceIntPtr pDev) _X_EXPORT Bool IsPointerDevice(DeviceIntPtr dev) { - return ((dev->valuator && dev->button) || dev == inputInfo.pointer); + return (dev->valuator && dev->button); } /* @@ -342,7 +342,7 @@ IsPointerDevice(DeviceIntPtr dev) _X_EXPORT Bool IsKeyboardDevice(DeviceIntPtr dev) { - return ((dev->key && dev->kbdfeed) || dev == inputInfo.keyboard); + return (dev->key && dev->kbdfeed); } #ifdef XEVIE From 271d4c3d6255318aabb9ad1ea444f534ed456f0b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Oct 2007 15:50:07 +0930 Subject: [PATCH 219/634] xfree86: remove XI86_SHARED_POINTER flag. Not needed anymore. By default, all devices are slaves of first master device. --- hw/xfree86/common/xf86Xinput.c | 7 +------ hw/xfree86/common/xf86Xinput.h | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index acc3ae6e0..711bf94d4 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -135,11 +135,6 @@ xf86ProcessCommonOptions(LocalDevicePtr local, xf86Msg(X_CONFIG, "%s: always reports core events\n", local->name); } - if (xf86SetBoolOption(list, "SharedPointer", 0)) { - local->flags |= XI86_SHARED_POINTER; - xf86Msg(X_CONFIG, "%s: is shared device\n", local->name); - } - if (xf86SetBoolOption(list, "SendDragEvents", 1)) { local->flags |= XI86_SEND_DRAG_EVENTS; } else { @@ -177,7 +172,7 @@ xf86ActivateDevice(LocalDevicePtr local) local->dev = dev; dev->coreEvents = local->flags & XI86_ALWAYS_CORE; - dev->spriteInfo->spriteOwner = !(local->flags & XI86_SHARED_POINTER); + dev->spriteInfo->spriteOwner = FALSE; if (DeviceIsPointerType(dev)) { diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h index 7fddfb1d7..d88bbbeee 100644 --- a/hw/xfree86/common/xf86Xinput.h +++ b/hw/xfree86/common/xf86Xinput.h @@ -81,7 +81,6 @@ #define XI86_CORE_KEYBOARD 0x20 /* device is the core keyboard */ #define XI86_POINTER_CAPABLE 0x40 /* capable of being a core pointer */ #define XI86_KEYBOARD_CAPABLE 0x80 /* capable of being a core keyboard */ -#define XI86_SHARED_POINTER 0x100 /* device shares core cursor */ #define XI_PRIVATE(dev) \ (((LocalDevicePtr)((dev)->public.devicePrivate))->private) From e6bd8ae0608bd8379c5ac962f69cd0bcc54f9734 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Oct 2007 15:59:30 +0930 Subject: [PATCH 220/634] dix: set the device's sprite when using AttachDevice Sprite is set to the master device's sprite. --- dix/devices.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dix/devices.c b/dix/devices.c index 0f43d1287..75dfa696b 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2264,6 +2264,7 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) return BadAccess; dev->master = master; + dev->spriteInfo->sprite = master->spriteInfo->sprite; return Success; } From b6ccf721b0a582150858d68f91967fb4e319c340 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Oct 2007 17:35:06 +0930 Subject: [PATCH 221/634] include: add "lastSlave" field to DeviceIntRec. Set to the last slave device that routed events through the master. --- include/inputstr.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/inputstr.h b/include/inputstr.h index d96e24a96..b2304ddfa 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -400,7 +400,10 @@ typedef struct _DeviceIntRec { int nPrivates; DeviceUnwrapProc unwrapProc; SpriteInfoPtr spriteInfo; + union { DeviceIntPtr master; /* master device */ + DeviceIntPtr lastSlave; /* last slave device used */ + } u; } DeviceIntRec; typedef struct { From 90d077e537ac4cb7d79d67afcf3984a3e8d65fe8 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Oct 2007 17:37:33 +0930 Subject: [PATCH 222/634] dix: GetPointerEvents: get state from master device before applying valuators. We need to get lastx/y from the master device before we start applying acceleration etc. Otherwise we get jumping cursors, which is reasonably bad. --- dix/getevents.c | 48 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index 7457078e5..694d40401 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -544,6 +544,7 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, CARD32* valptr; deviceKeyButtonPointer *kbp = NULL; rawDeviceEvent* ev; + DeviceIntPtr master; /* Thanks to a broken lib, we _always_ have to chase DeviceMotionNotifies * with DeviceValuators. */ @@ -558,17 +559,55 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, if ((type == ButtonPress || type == ButtonRelease) && !pDev->button) return 0; - + /* FIXME: I guess it should, in theory, be possible to post button events * from devices without valuators. */ if (!pDev->valuator) return 0; - num_events = 2; - if (type == MotionNotify && num_valuators <= 0) return 0; + ms = GetTimeInMillis(); + + num_events = 2; + + master = pDev->u.master; + if (master && master->u.lastSlave != pDev) + { +#if 0 + /* XXX: we should enqueue the state changed event here */ + devStateEvent *state; + num_events++; + state = events->event; + + state->type = GenericEvent; + state->extension = IReqCode; + state->evtype = XI_DeviceStateChangedNotify; + state->deviceid = master->deviceid; + state->new_slave = pDev->id; + state->time = ms; + events++; + +#endif + + /* now we need to update our device to the master's device - welcome + * to hell. + * We need to match each device's capabilities to the previous + * capabilities as used by the master. Valuator[N] of master has to + * be written into valuator[N] of pDev. For all relative valuators. + * Otherwise we get jumpy valuators. + * + * However, this if iffy, if pDev->num_valuators != + * master->num_valuators. What do we do with the others? + * + * XXX: just do lastx/y for now. + */ + pDev->valuator->lastx = master->valuator->lastx; + pDev->valuator->lasty = master->valuator->lasty; + master->u.lastSlave = pDev; + } + /* Do we need to send a DeviceValuator event? */ if (!coreOnly && sendValuators) { if ((((num_valuators - 1) / 6) + 1) > MAX_VALUATOR_EVENTS) @@ -582,7 +621,6 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, if (first_valuator < 0 || final_valuator > pDev->valuator->numAxes) return 0; - ms = GetTimeInMillis(); /* fill up the raw event, after checking that it is large enough to @@ -667,6 +705,8 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, pDev->valuator->lastx = x; pDev->valuator->lasty = y; + master->valuator->lastx = x; + master->valuator->lasty = y; if (!coreOnly) { From caa69d8f7b92b80669df02e1001409d7c653e7e4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Oct 2007 17:38:13 +0930 Subject: [PATCH 223/634] dix: fix detritus from adding lastSlave field. --- dix/devices.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 75dfa696b..3e5405b54 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -302,7 +302,7 @@ DisableDevice(DeviceIntPtr dev) { for (other = inputInfo.devices; other; other = other->next) { - if (other->master == dev) + if (other->u.master == dev) AttachDevice(NULL, dev, NULL); } } @@ -513,7 +513,7 @@ InitCoreDevices(void) if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) FatalError("Couldn't allocate keyboard devPrivates\n"); dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; - dev->master = NULL; + dev->u.lastSlave = NULL; dev->isMaster = TRUE; (void)ActivateDevice(dev); @@ -541,7 +541,7 @@ InitCoreDevices(void) if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) FatalError("Couldn't allocate pointer devPrivates\n"); dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; - dev->master = NULL; + dev->u.lastSlave = NULL; dev->isMaster = TRUE; (void)ActivateDevice(dev); @@ -2255,7 +2255,7 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) if (!dev || !master) return BadDevice; - if (master->master) /* can't attach to slave device */ + if (!master->isMaster) /* can't attach to slave device */ return BadDevice; if (!pairingClient) @@ -2263,7 +2263,7 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) else if (client && pairingClient != client) return BadAccess; - dev->master = master; + dev->u.master = master; dev->spriteInfo->sprite = master->spriteInfo->sprite; return Success; @@ -2277,8 +2277,8 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) _X_EXPORT DeviceIntPtr GetPairedDevice(DeviceIntPtr dev) { - if (!dev->isMaster && dev->master) - dev = dev->master; + if (!dev->isMaster && dev->u.master) + dev = dev->u.master; if (!dev->spriteInfo->paired) { From b697c4ed145968d3c3281bb85e628f1b068b09fc Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Oct 2007 17:47:06 +0930 Subject: [PATCH 224/634] dix: CheckPassiveGrabOnWindow: only get paired device for non-keyboards. --- dix/events.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dix/events.c b/dix/events.c index 50d06c465..d342d3628 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3243,7 +3243,12 @@ CheckPassiveGrabsOnWindow( gdev= grab->modifierDevice; if (grab->coreGrab) - gdev = GetPairedDevice(device); + { + if (IsPointerDevice(device)) + gdev = GetPairedDevice(device); + else + gdev = device; + } xkbi= gdev->key->xkbInfo; #endif tempGrab.modifierDevice = grab->modifierDevice; From 5eb033835e92ea951cc385fd709af9656b3772d8 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Oct 2007 18:03:52 +0930 Subject: [PATCH 225/634] mi: don't exclude inputInfo.pointer from rendering. --- mi/mipointer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mi/mipointer.c b/mi/mipointer.c index 8dc7c7f5f..eabc43563 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -399,7 +399,7 @@ miPointerUpdateSprite (DeviceIntPtr pDev) int x, y, devx, devy; miPointerPtr pPointer; - if (!pDev || pDev == inputInfo.pointer || !pDev->coreEvents) + if (!pDev || !pDev->coreEvents) return; pPointer = MIPOINTER(pDev); @@ -530,7 +530,7 @@ miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, SetupScreen(pScreen); - if (pDev && (pDev->coreEvents || pDev == inputInfo.pointer) + if (pDev && pDev->coreEvents && !pScreenPriv->waitForUpdate && pScreen == pPointer->pSpriteScreen) { pPointer->devx = x; @@ -557,7 +557,7 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y, unsigned long time) if (!pScreen) return; /* called before ready */ - if (!pDev || !(pDev->coreEvents || pDev == inputInfo.pointer)) + if (!pDev || !pDev->coreEvents) return; if (*x < 0 || *x >= pScreen->width || *y < 0 || *y >= pScreen->height) From 5fe9bfd23f17b84c3afaa82f75a7c517c9f8e0d3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Oct 2007 18:23:48 +0930 Subject: [PATCH 226/634] xfree86: NIDR: don't call PairDevices explicitly. set isMaster to FALSE explicitly. Pairing isn't necessary, attachment should be done in EnableDevices. --- hw/xfree86/common/xf86Xinput.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 711bf94d4..fc846ba58 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -172,6 +172,7 @@ xf86ActivateDevice(LocalDevicePtr local) local->dev = dev; dev->coreEvents = local->flags & XI86_ALWAYS_CORE; + dev->isMaster = FALSE; dev->spriteInfo->spriteOwner = FALSE; if (DeviceIsPointerType(dev)) @@ -447,9 +448,6 @@ NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev) (!is_auto || xf86Info.autoEnableDevices)) EnableDevice(dev); - if (!IsPointerDevice(dev)) - PairDevices(NULL, GuessFreePointerDevice(), dev); - /* send enter/leave event, update sprite window */ CheckMotion(NULL, dev); From 299573f4617c3b5599bb65069e96d050277b9471 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Oct 2007 18:40:15 +0930 Subject: [PATCH 227/634] dix: add AllocMasterDevice for creation of new master devices. Devices are initiated pretty much the same as the core devices. --- dix/devices.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ include/input.h | 4 +++ 2 files changed, 70 insertions(+) diff --git a/dix/devices.c b/dix/devices.c index 3e5405b54..ef5ebf94d 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2374,3 +2374,69 @@ NextFreePointerDevice() return dev; return NULL; } +/** + * Create a new master device (== one pointer, one keyboard device). + * Only allocates the devices, you will need to call ActivateDevice() and + * EnableDevice() manually. + */ +int +AllocMasterDevice(char* name, DeviceIntPtr* ptr, DeviceIntPtr* keybd) +{ + DeviceIntPtr pointer; + DeviceIntPtr keyboard; + + pointer = AddInputDevice(CorePointerProc, TRUE); + if (!pointer) + return BadAlloc; + + pointer->name = xcalloc(strlen(name) + strlen("-ptr") + 1, sizeof(char)); + strcpy(pointer->name, name); + strcat(pointer->name, "-ptr"); + +#ifdef XKB + pointer->public.processInputProc = ProcessOtherEvent; + pointer->public.realInputProc = ProcessOtherEvent; + if (!noXkbExtension) + XkbSetExtension(pointer, ProcessPointerEvent); +#else + pointer->public.processInputProc = ProcessPointerEvent; + pointer->public.realInputProc = ProcessPointerEvent; +#endif + pointer->deviceGrab.ActivateGrab = ActivatePointerGrab; + pointer->deviceGrab.DeactivateGrab = DeactivatePointerGrab; + pointer->coreEvents = TRUE; + pointer->spriteInfo->spriteOwner = TRUE; + + pointer->u.lastSlave = NULL; + pointer->isMaster = TRUE; + + keyboard = AddInputDevice(CoreKeyboardProc, TRUE); + if (!keyboard) + return BadAlloc; + + keyboard->name = xcalloc(strlen(name) + strlen("-keybd") + 1, sizeof(char)); + strcpy(keyboard->name, name); + strcat(keyboard->name, "-keybd"); + +#ifdef XKB + keyboard->public.processInputProc = ProcessOtherEvent; + keyboard->public.realInputProc = ProcessOtherEvent; + if (!noXkbExtension) + XkbSetExtension(keyboard, ProcessKeyboardEvent); +#else + keyboard->public.processInputProc = ProcessKeyboardEvent; + keyboard->public.realInputProc = ProcessKeyboardEvent; +#endif + keyboard->deviceGrab.ActivateGrab = ActivateKeyboardGrab; + keyboard->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; + keyboard->coreEvents = TRUE; + keyboard->spriteInfo->spriteOwner = FALSE; + + keyboard->u.lastSlave = NULL; + keyboard->isMaster = TRUE; + + *ptr = pointer; + *keybd = keyboard; + + return Success; +} diff --git a/include/input.h b/include/input.h index a176bbab7..d6a38e639 100644 --- a/include/input.h +++ b/include/input.h @@ -477,6 +477,10 @@ extern Bool UnregisterPairingClient(ClientPtr client); extern DeviceIntPtr GuessFreePointerDevice(void); extern DeviceIntPtr NextFreePointerDevice(void); +extern int AllocMasterDevice(char* name, + DeviceIntPtr* ptr, + DeviceIntPtr* keybd); + /* Window/device based access control */ extern Bool ACRegisterClient(ClientPtr client); extern Bool ACUnregisterClient(ClientPtr client); From 1d9ebbac8c589cae7e4952083692b6d148def9bc Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Oct 2007 18:46:12 +0930 Subject: [PATCH 228/634] dix: Make InitCoreDevices use AllocMasterDevice. Also change naming a bit, append "pointer" and "keyboard" to master devices instead of -ptr and -keybd. --- dix/devices.c | 75 ++++++++++++--------------------------------------- 1 file changed, 17 insertions(+), 58 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index ef5ebf94d..af086a437 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -485,68 +485,27 @@ CorePointerProc(DeviceIntPtr pDev, int what) void InitCoreDevices(void) { - DeviceIntPtr dev; - if (CoreDevicePrivatesGeneration != serverGeneration) { CoreDevicePrivatesIndex = AllocateDevicePrivateIndex(); CoreDevicePrivatesGeneration = serverGeneration; } - if (!inputInfo.keyboard) { - dev = AddInputDevice(CoreKeyboardProc, TRUE); - if (!dev) - FatalError("Failed to allocate core keyboard"); - dev->name = strdup("Virtual core keyboard"); -#ifdef XKB - dev->public.processInputProc = ProcessOtherEvent; - dev->public.realInputProc = ProcessOtherEvent; - if (!noXkbExtension) - XkbSetExtension(dev, ProcessKeyboardEvent); -#else - dev->public.processInputProc = ProcessKeyboardEvent; - dev->public.realInputProc = ProcessKeyboardEvent; -#endif - dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab; - dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; - dev->coreEvents = TRUE; - dev->spriteInfo->spriteOwner = FALSE; - if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) - FatalError("Couldn't allocate keyboard devPrivates\n"); - dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; - dev->u.lastSlave = NULL; - dev->isMaster = TRUE; - (void)ActivateDevice(dev); + if (AllocMasterDevice("Virtual core", + &inputInfo.pointer, + &inputInfo.keyboard) == BadAlloc) + FatalError("Failed to allocate core devices"); - inputInfo.keyboard = dev; - } + if (!AllocateDevicePrivate(inputInfo.keyboard, CoreDevicePrivatesIndex)) + FatalError("Couldn't allocate keyboard devPrivates\n"); + inputInfo.keyboard->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; - if (!inputInfo.pointer) { - dev = AddInputDevice(CorePointerProc, TRUE); - if (!dev) - FatalError("Failed to allocate core pointer"); - dev->name = strdup("Virtual core pointer"); -#ifdef XKB - dev->public.processInputProc = ProcessOtherEvent; - dev->public.realInputProc = ProcessOtherEvent; - if (!noXkbExtension) - XkbSetExtension(dev, ProcessPointerEvent); -#else - dev->public.processInputProc = ProcessPointerEvent; - dev->public.realInputProc = ProcessPointerEvent; -#endif - dev->deviceGrab.ActivateGrab = ActivatePointerGrab; - dev->deviceGrab.DeactivateGrab = DeactivatePointerGrab; - dev->coreEvents = TRUE; - dev->spriteInfo->spriteOwner = TRUE; - if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) - FatalError("Couldn't allocate pointer devPrivates\n"); - dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; - dev->u.lastSlave = NULL; - dev->isMaster = TRUE; - (void)ActivateDevice(dev); + if (!AllocateDevicePrivate(inputInfo.pointer, CoreDevicePrivatesIndex)) + FatalError("Couldn't allocate pointer devPrivates\n"); + inputInfo.pointer->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; + + ActivateDevice(inputInfo.keyboard); + ActivateDevice(inputInfo.pointer); - inputInfo.pointer = dev; - } } /** @@ -2389,9 +2348,9 @@ AllocMasterDevice(char* name, DeviceIntPtr* ptr, DeviceIntPtr* keybd) if (!pointer) return BadAlloc; - pointer->name = xcalloc(strlen(name) + strlen("-ptr") + 1, sizeof(char)); + pointer->name = xcalloc(strlen(name) + strlen(" pointer") + 1, sizeof(char)); strcpy(pointer->name, name); - strcat(pointer->name, "-ptr"); + strcat(pointer->name, " pointer"); #ifdef XKB pointer->public.processInputProc = ProcessOtherEvent; @@ -2414,9 +2373,9 @@ AllocMasterDevice(char* name, DeviceIntPtr* ptr, DeviceIntPtr* keybd) if (!keyboard) return BadAlloc; - keyboard->name = xcalloc(strlen(name) + strlen("-keybd") + 1, sizeof(char)); + keyboard->name = xcalloc(strlen(name) + strlen(" keyboard") + 1, sizeof(char)); strcpy(keyboard->name, name); - strcat(keyboard->name, "-keybd"); + strcat(keyboard->name, " keyboard"); #ifdef XKB keyboard->public.processInputProc = ProcessOtherEvent; From de70cfdbe60eb6e7bf3e74dfd1ac34de554deff1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 17 Oct 2007 09:52:30 +0930 Subject: [PATCH 229/634] mi: fix some macros to allow multiple cursors for master devices. Macros defaulted to inputInfo.pointe rfor devices that weren't spriteOwners. Changed to take the device's master device now. This includes sticking in a number of checks and warnings that cursor rendering won't be called for floating devices. --- mi/midispcur.c | 2 +- mi/mipointer.c | 60 +++++++++++++++++++++++++++++++++++++++----------- mi/misprite.c | 48 ++++++++++++++++++++++++++++++++++++++-- 3 files changed, 94 insertions(+), 16 deletions(-) diff --git a/mi/midispcur.c b/mi/midispcur.c index d7a8964dc..16ece10e6 100644 --- a/mi/midispcur.c +++ b/mi/midispcur.c @@ -85,7 +85,7 @@ typedef struct { #define MIDCBUFFER(dev) \ ((DevHasCursor(dev)) ? \ (miDCBufferPtr)dev->devPrivates[miDCSpriteIndex].ptr :\ - (miDCBufferPtr)inputInfo.pointer->devPrivates[miDCSpriteIndex].ptr) + (miDCBufferPtr)dev->u.master->devPrivates[miDCSpriteIndex].ptr) /* * The core pointer buffer will point to the index of the virtual core pointer diff --git a/mi/mipointer.c b/mi/mipointer.c index eabc43563..0db4d2c56 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -59,7 +59,7 @@ static int miPointerPrivatesIndex = 0; #define MIPOINTER(dev) \ ((DevHasCursor((dev))) ? \ (miPointerPtr) dev->devPrivates[miPointerPrivatesIndex].ptr : \ - (miPointerPtr) inputInfo.pointer->devPrivates[miPointerPrivatesIndex].ptr) + (miPointerPtr) dev->u.master->devPrivates[miPointerPrivatesIndex].ptr) static Bool miPointerRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); @@ -210,7 +210,12 @@ miPointerDisplayCursor (pDev, pScreen, pCursor) ScreenPtr pScreen; CursorPtr pCursor; { - miPointerPtr pPointer = MIPOINTER(pDev); + miPointerPtr pPointer; + + if (!pDev->isMaster && !pDev->u.master) + return FALSE; + + pPointer = MIPOINTER(pDev); pPointer->pCursor = pCursor; pPointer->pScreen = pScreen; @@ -233,7 +238,12 @@ miPointerConstrainCursor (pDev, pScreen, pBox) ScreenPtr pScreen; BoxPtr pBox; { - miPointerPtr pPointer = MIPOINTER(pDev); + miPointerPtr pPointer; + + if (!pDev->isMaster && !pDev->u.master) + return; + + pPointer = MIPOINTER(pDev); pPointer->limits = *pBox; pPointer->confined = PointerConfinedToScreen(pDev); @@ -347,7 +357,11 @@ miPointerWarpCursor (pDev, pScreen, x, y) ScreenPtr pScreen; int x, y; { - miPointerPtr pPointer = MIPOINTER(pDev); + miPointerPtr pPointer; + + if (!pDev->isMaster && !pDev->u.master) + return; + pPointer = MIPOINTER(pDev); SetupScreen (pScreen); if (pPointer->pScreen != pScreen) @@ -399,7 +413,7 @@ miPointerUpdateSprite (DeviceIntPtr pDev) int x, y, devx, devy; miPointerPtr pPointer; - if (!pDev || !pDev->coreEvents) + if (!pDev || !pDev->coreEvents || (!pDev->isMaster && !pDev->u.master)) return; pPointer = MIPOINTER(pDev); @@ -488,7 +502,12 @@ miPointerSetScreen(DeviceIntPtr pDev, int screen_no, int x, int y) { miPointerScreenPtr pScreenPriv; ScreenPtr pScreen; - miPointerPtr pPointer = MIPOINTER(pDev); + miPointerPtr pPointer; + + if (!pDev->isMaster && !pDev->u.master) + return; + + pPointer = MIPOINTER(pDev); pScreen = screenInfo.screens[screen_no]; pScreenPriv = GetScreenPrivate (pScreen); @@ -508,8 +527,10 @@ miPointerCurrentScreen () _X_EXPORT ScreenPtr miPointerGetScreen(DeviceIntPtr pDev) { - miPointerPtr pPointer = MIPOINTER(pDev); - return pPointer->pScreen; + if (!pDev->isMaster && !pDev->u.master) + return NULL; + + return MIPOINTER(pDev)->pScreen; } /* Move the pointer to x, y on the current screen, update the sprite, and @@ -526,9 +547,13 @@ static void miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, unsigned long time) { - miPointerPtr pPointer = MIPOINTER(pDev); + miPointerPtr pPointer; SetupScreen(pScreen); + if (!pDev->isMaster && !pDev->u.master) + return; + + pPointer = MIPOINTER(pDev); if (pDev && pDev->coreEvents && !pScreenPriv->waitForUpdate && pScreen == pPointer->pSpriteScreen) @@ -551,8 +576,12 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y, unsigned long time) ScreenPtr pScreen; ScreenPtr newScreen; - miPointerPtr pPointer = MIPOINTER(pDev); + miPointerPtr pPointer; + + if (!pDev->isMaster && !pDev->u.master) + return; + pPointer = MIPOINTER(pDev); pScreen = pPointer->pScreen; if (!pScreen) return; /* called before ready */ @@ -605,9 +634,14 @@ miPointerPosition (int *x, int *y) _X_EXPORT void miPointerGetPosition(DeviceIntPtr pDev, int *x, int *y) { - miPointerPtr pPointer = MIPOINTER(pDev); - *x = pPointer->x; - *y = pPointer->y; + if (!pDev->isMaster && !pDev->u.master) + { + ErrorF("[mi] miPointerGetPosition called for floating device.\n"); + return; + } + + *x = MIPOINTER(pDev)->x; + *y = MIPOINTER(pDev)->y; } void diff --git a/mi/misprite.c b/mi/misprite.c index 6e4215270..6aad36cfb 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -77,7 +77,7 @@ static int miSpriteDevPrivatesIndex; #define MISPRITE(dev) \ ((DevHasCursor(dev)) ? \ (miCursorInfoPtr) dev->devPrivates[miSpriteDevPrivatesIndex].ptr : \ - (miCursorInfoPtr) inputInfo.pointer->devPrivates[miSpriteDevPrivatesIndex].ptr) + (miCursorInfoPtr) dev->u.master->devPrivates[miSpriteDevPrivatesIndex].ptr) /* @@ -759,6 +759,12 @@ miSpriteRealizeCursor (pDev, pScreen, pCursor) miCursorInfoPtr pCursorInfo; pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; + + if (!pDev->isMaster && !pDev->u.master) + { + ErrorF("[mi] miSpriteRealizeCursor called for floating device.\n"); + return FALSE; + } pCursorInfo = MISPRITE(pDev); if (pCursor == pCursorInfo->pCursor) @@ -790,7 +796,14 @@ miSpriteSetCursor (pDev, pScreen, pCursor, x, y) miSpriteScreenPtr pScreenPriv; pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - miCursorInfoPtr pPointer = MISPRITE(pDev); + miCursorInfoPtr pPointer; + + if (!pDev->isMaster && !pDev->u.master) + { + ErrorF("[mi] miSpriteSetCursor called for floating device.\n"); + return; + } + pPointer = MISPRITE(pDev); if (!pCursor) { @@ -905,6 +918,11 @@ miSpriteMoveCursor (pDev, pScreen, x, y) CursorPtr pCursor; pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; + if (!pDev->isMaster && !pDev->u.master) + { + ErrorF("[mi] miSpriteMoveCursor called for floating device.\n"); + return; + } pCursor = MISPRITE(pDev)->pCursor; miSpriteSetCursor (pDev, pScreen, pCursor, x, y); @@ -972,6 +990,11 @@ miSpriteUndisplayCursor(pDev, pScreen) DeviceIntPtr pDev; ScreenPtr pScreen; { + if (!pDev->isMaster && !pDev->u.master) + { + ErrorF("[mi] miSpriteUndisplayCursor called for floating device.\n"); + return; + } if (MISPRITE(pDev)->isUp) miSpriteRemoveCursor(pDev, pScreen); } @@ -989,6 +1012,11 @@ miSpriteRemoveCursor (pDev, pScreen) miCursorInfoPtr pCursorInfo; + if (!pDev->isMaster && !pDev->u.master) + { + ErrorF("[mi] miSpriteRemoveCursor called for floating device.\n"); + return; + } DamageDrawInternal (pScreen, TRUE); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; pCursorInfo = MISPRITE(pDev); @@ -1026,6 +1054,11 @@ miSpriteSaveUnderCursor(pDev, pScreen) CursorPtr pCursor; miCursorInfoPtr pCursorInfo; + if (!pDev->isMaster && !pDev->u.master) + { + ErrorF("[mi] miSpriteSaveUnderCursor called for floating device.\n"); + return; + } DamageDrawInternal (pScreen, TRUE); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; pCursorInfo = MISPRITE(pDev); @@ -1065,6 +1098,12 @@ miSpriteRestoreCursor (pDev, pScreen) int x, y; CursorPtr pCursor; miCursorInfoPtr pCursorInfo; + + if (!pDev->isMaster && !pDev->u.master) + { + ErrorF("[mi] miSpriteRestoreCursor called for floating device.\n"); + return; + } DamageDrawInternal (pScreen, TRUE); pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; @@ -1106,6 +1145,11 @@ miSpriteComputeSaved (pDev, pScreen) CursorPtr pCursor; miCursorInfoPtr pCursorInfo; + if (!pDev->isMaster && !pDev->u.master) + { + ErrorF("[mi] miSpriteComputeSaved called for floating device.\n"); + return; + } pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; pCursorInfo = MISPRITE(pDev); From ae9fc10adec8f9bf0492d14d435f8f11e0163b27 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 17 Oct 2007 10:41:04 +0930 Subject: [PATCH 230/634] Xi: don't send core events for slave devices. --- Xi/exevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 49400e8d4..3f096a6a2 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -124,7 +124,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) int coretype = 0; coretype = XItoCoreType(xE->u.u.type); - if (device->coreEvents && coretype) + if (device->isMaster && device->coreEvents && coretype) sendCore = TRUE; CheckMotion(xE, device); From 8b7c4249d82d07e852d8d8c15c7ab9977dd1f31c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 17 Oct 2007 10:41:58 +0930 Subject: [PATCH 231/634] mi: call processInputProc for master devices after slave event processing. More work is needed to sort out grabs though. --- mi/mieq.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mi/mieq.c b/mi/mieq.c index f5e119efb..7d6d110b8 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -296,6 +296,9 @@ mieqProcessInputEvents(void) } e->pDev->public.processInputProc(event, e->pDev, e->nevents); + if (!e->pDev->isMaster && e->pDev->u.master) + e->pDev->u.master->public.processInputProc(event, + e->pDev->u.master, e->nevents); if (e->nevents > 1) xfree(event); From 9aadde377991bfbd88524d02106bec3dedd6e7c9 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 17 Oct 2007 12:05:50 +0930 Subject: [PATCH 232/634] mi: don't call UndisplayCursor for non-sprite-owners. Segfaults are bad. --- mi/mipointer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mi/mipointer.c b/mi/mipointer.c index 0db4d2c56..7a3257827 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -229,7 +229,8 @@ miPointerUndisplayCursor(pDev, pScreen) ScreenPtr pScreen; { SetupScreen(pScreen); - (*pScreenPriv->spriteFuncs->UndisplayCursor)(pDev, pScreen); + if (pDev->isMaster && pDev->spriteInfo->spriteOwner) + (*pScreenPriv->spriteFuncs->UndisplayCursor)(pDev, pScreen); } static void From cfcc6e14b9a15f7979ba0df9c105cf563bef98fa Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 19 Oct 2007 11:28:44 +0930 Subject: [PATCH 233/634] Xi: return all master devices as type IsXPointer/Keyboard when listing devs. Slave devices are reported as IsXExtensionPointer/Keyboard. --- Xi/listdev.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Xi/listdev.c b/Xi/listdev.c index a9fd40156..5b5d26e1b 100644 --- a/Xi/listdev.c +++ b/Xi/listdev.c @@ -177,9 +177,9 @@ CopySwapDevice(ClientPtr client, DeviceIntPtr d, int num_classes, dev->id = d->id; dev->type = d->type; dev->num_classes = num_classes; - if (d == inputInfo.keyboard) + if (d->isMaster && IsKeyboardDevice(d)) dev->use = IsXKeyboard; - else if (d == inputInfo.pointer) + else if (d->isMaster && IsPointerDevice(d)) dev->use = IsXPointer; else if (d->key && d->kbdfeed) dev->use = IsXExtensionKeyboard; @@ -328,10 +328,6 @@ ProcXListInputDevices(ClientPtr client) AddOtherInputDevices(); - SizeDeviceInfo(inputInfo.keyboard, &namesize, &size); - SizeDeviceInfo(inputInfo.pointer, &namesize, &size); - numdevs = 2; - for (d = inputInfo.devices; d; d = d->next) { SizeDeviceInfo(d, &namesize, &size); numdevs++; @@ -348,11 +344,6 @@ ProcXListInputDevices(ClientPtr client) savbuf = devbuf; dev = (xDeviceInfoPtr) devbuf; - ListDeviceInfo(client, inputInfo.keyboard, dev++, - &devbuf, &classbuf, &namebuf); - ListDeviceInfo(client, inputInfo.pointer, dev++, - &devbuf, &classbuf, &namebuf); - for (d = inputInfo.devices; d; d = d->next, dev++) ListDeviceInfo(client, d, dev, &devbuf, &classbuf, &namebuf); for (d = inputInfo.off_devices; d; d = d->next, dev++) From 6dcde0e9c1d068d9fc4a772d29d1d4c6cc57aeb9 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 18 Oct 2007 12:21:07 +0930 Subject: [PATCH 234/634] Xi: set master device's id in ListDevices Reply. --- Xi/listdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Xi/listdev.c b/Xi/listdev.c index 5b5d26e1b..8753b292c 100644 --- a/Xi/listdev.c +++ b/Xi/listdev.c @@ -187,6 +187,9 @@ CopySwapDevice(ClientPtr client, DeviceIntPtr d, int num_classes, dev->use = IsXExtensionPointer; else dev->use = IsXExtensionDevice; + if (!d->isMaster) + dev->attached = (d->u.master) ? d->u.master->id : IsFloating; + if (client->swapped) { swapl(&dev->type, n); /* macro - braces are required */ } From 5ba738935f0d786e4670adf3b05ad42fc5e710fd Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 19 Oct 2007 14:36:37 +0930 Subject: [PATCH 235/634] Xi: remove ChangePointerKeyboardPairing in favour of ChangeDeviceHierarchy. --- Xi/Makefile.am | 4 +- Xi/chdevhier.c | 231 +++++++++++++++++++++++++++++++++++++++++++++++++ Xi/chdevhier.h | 45 ++++++++++ Xi/extinit.c | 14 ++- dix/devices.c | 1 + 5 files changed, 284 insertions(+), 11 deletions(-) create mode 100644 Xi/chdevhier.c create mode 100644 Xi/chdevhier.h diff --git a/Xi/Makefile.am b/Xi/Makefile.am index 2cf11a042..407928df1 100644 --- a/Xi/Makefile.am +++ b/Xi/Makefile.am @@ -9,6 +9,8 @@ libXi_la_SOURCES = \ chdevcur.h \ chgdctl.c \ chgdctl.h \ + chdevhier.c \ + chdevhier.h \ chgfctl.c \ chgfctl.h \ chgkbd.c \ @@ -19,8 +21,6 @@ libXi_la_SOURCES = \ chgprop.h \ chgptr.c \ chgptr.h \ - chpkpair.c \ - chpkpair.h \ chaccess.c \ chaccess.h \ closedev.c \ diff --git a/Xi/chdevhier.c b/Xi/chdevhier.c new file mode 100644 index 000000000..c916c0f47 --- /dev/null +++ b/Xi/chdevhier.c @@ -0,0 +1,231 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +/*********************************************************************** + * + * Request change in the device hierarchy. + * + */ + + +#define NEED_EVENTS +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include +#include +#include +#include +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exevents.h" +#include "exglobals.h" +#include "geext.h" + +#include "chdevhier.h" + + +/*********************************************************************** + * + * This procedure allows a client to change the device hierarchy through + * adding new master devices, removing them, etc. + * + */ + +int SProcXChangeDeviceHierarchy(ClientPtr client) +{ + char n; + + REQUEST(xChangeDeviceHierarchyReq); + swaps(&stuff->length, n); + return (ProcXChangeDeviceHierarchy(client)); +} + +#define SWAPIF(cmd) if (client->swapped) { cmd; } + +int +ProcXChangeDeviceHierarchy(ClientPtr client) +{ + DeviceIntPtr ptr, keybd; + xAnyHierarchyChangeInfo *any; + int required_len = sizeof(xChangeDeviceHierarchyReq); + char n; + + REQUEST(xChangeDeviceHierarchyReq); + REQUEST_AT_LEAST_SIZE(xChangeDeviceHierarchyReq); + + /* XXX: check if client is allowed to change hierarch */ + + + any = (xAnyHierarchyChangeInfo*)&stuff[1]; + while(stuff->num_changes--) + { + SWAPIF(swapl(&any->type, n)); + SWAPIF(swaps(&any->length, n)); + + required_len += any->length; + if ((stuff->length * 4) < required_len) + return BadLength; + + switch(any->type) + { + case CH_CreateMasterDevice: + { + xCreateMasterInfo* c = (xCreateMasterInfo*)any; + char* name; + int ret; + + SWAPIF(swaps(&c->namelen, n)); + name = xcalloc(c->namelen + 1, sizeof(char)); + strncpy(name, (char*)&c[1], c->namelen); + + ret = AllocMasterDevice(name, &ptr, &keybd); + if (ret != Success) + { + xfree(name); + return ret; + } + + if (!c->sendCore) + ptr->coreEvents = keybd->coreEvents = FALSE; + + ActivateDevice(ptr); + ActivateDevice(keybd); + + if (c->enable) + { + EnableDevice(ptr); + EnableDevice(keybd); + } + xfree(name); + } + break; + case CH_RemoveMasterDevice: + { + xRemoveMasterInfo* r = (xRemoveMasterInfo*)any; + + if (r->returnMode != AttachToMaster && + r->returnMode != Floating) + return BadValue; + + ptr = LookupDeviceIntRec(r->deviceid); + if (!ptr || !ptr->isMaster) + return BadDevice; + + /* XXX: For now, don't allow removal of VCP, VCK */ + if (ptr == inputInfo.pointer || + ptr == inputInfo.keyboard) + return BadDevice; + + /* disable keyboards first */ + if (IsPointerDevice(ptr)) + keybd = ptr->spriteInfo->paired; + else + { + keybd = ptr; + ptr = keybd->spriteInfo->paired; + } + + /* Disabling sends the devices floating, reattach them if + * desired. */ + if (r->returnMode == AttachToMaster) + { + DeviceIntPtr attached, + newptr, + newkeybd; + + newptr = LookupDeviceIntRec(r->returnPointer); + newkeybd = LookupDeviceIntRec(r->returnKeyboard); + if (!newptr || !newptr->isMaster || + !newkeybd || !newkeybd->isMaster) + return BadDevice; + + for (attached = inputInfo.devices; + attached; + attached = attached->next) + { + if (!attached->isMaster) { + if (attached->u.master == ptr) + AttachDevice(client, attached, newptr); + if (attached->u.master == keybd) + AttachDevice(client, attached, newkeybd); + } + } + } + + /* can't disable until we removed pairing */ + keybd->spriteInfo->paired = NULL; + ptr->spriteInfo->paired = NULL; + DisableDevice(keybd); + DisableDevice(ptr); + + RemoveDevice(keybd); + RemoveDevice(ptr); + } + break; + case CH_ChangeAttachment: + { + xChangeAttachmentInfo* c = (xChangeAttachmentInfo*)any; + + ptr = LookupDeviceIntRec(c->deviceid); + if (!ptr || ptr->isMaster) + return BadDevice; + + if (c->changeMode == Floating) + AttachDevice(client, ptr, NULL); + else + { + DeviceIntPtr newmaster = LookupDeviceIntRec(c->newMaster); + if (!newmaster || !newmaster->isMaster) + return BadDevice; + + if ((IsPointerDevice(newmaster) && + !IsPointerDevice(ptr)) || + (IsKeyboardDevice(newmaster) && + !IsKeyboardDevice(ptr))) + return BadDevice; + AttachDevice(client, ptr, newmaster); + } + + } + break; + } + + any = (xAnyHierarchyChangeInfo*)((char*)any + any->length); + } + + return Success; +} + diff --git a/Xi/chdevhier.h b/Xi/chdevhier.h new file mode 100644 index 000000000..1853fa720 --- /dev/null +++ b/Xi/chdevhier.h @@ -0,0 +1,45 @@ +/* + +Copyright 2007 Peter Hutterer + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +/*********************************************************************** + * + * Request change in the device hierarchy. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef CHDEVHIER_H +#define CHDEVHIER_H 1 + +int SProcXChangeDeviceHierarchy(ClientPtr /* client */); +int ProcXChangeDeviceHierarchy(ClientPtr /* client */); + +#endif diff --git a/Xi/extinit.c b/Xi/extinit.c index c1b6eedae..c933e55b8 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -79,11 +79,11 @@ SOFTWARE. #include "chaccess.h" #include "chdevcur.h" #include "chgdctl.h" +#include "chdevhier.h" #include "chgfctl.h" #include "chgkbd.h" #include "chgprop.h" #include "chgptr.h" -#include "chpkpair.h" #include "closedev.h" #include "extgrbdev.h" #include "devbell.h" @@ -328,8 +328,8 @@ ProcIDispatch(ClientPtr client) return (ProcXWarpDevicePointer(client)); else if (stuff->data == X_ChangeDeviceCursor) return (ProcXChangeDeviceCursor(client)); - else if (stuff->data == X_ChangePointerKeyboardPairing) - return (ProcXChangePointerKeyboardPairing(client)); + else if (stuff->data == X_ChangeDeviceHierarchy) + return (ProcXChangeDeviceHierarchy(client)); else if (stuff->data == X_XiSelectEvent) return (ProcXiSelectEvent(client)); else if (stuff->data == X_RegisterPairingClient) @@ -445,8 +445,8 @@ SProcIDispatch(ClientPtr client) return (SProcXWarpDevicePointer(client)); else if (stuff->data == X_ChangeDeviceCursor) return (SProcXChangeDeviceCursor(client)); - else if (stuff->data == X_ChangePointerKeyboardPairing) - return (SProcXChangePointerKeyboardPairing(client)); + else if (stuff->data == X_ChangeDeviceHierarchy) + return (SProcXChangeDeviceHierarchy(client)); else if (stuff->data == X_XiSelectEvent) return (SProcXiSelectEvent(client)); else if (stuff->data == X_RegisterPairingClient) @@ -1153,10 +1153,6 @@ XIGEEventSwap(xGenericEvent* from, xGenericEvent* to) swaps(&from->sequenceNumber, n); switch(from->evtype) { - case XI_PointerKeyboardPairingChangedNotify: - SPointerKeyboardPairingChangedNotifyEvent - ((pairingChangedNotify*)from, (pairingChangedNotify*)to); - break; case XI_RawDeviceEvent: SRawDeviceEvent((rawDeviceEvent*)from, (rawDeviceEvent*)to); break; diff --git a/dix/devices.c b/dix/devices.c index af086a437..d97133980 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2343,6 +2343,7 @@ AllocMasterDevice(char* name, DeviceIntPtr* ptr, DeviceIntPtr* keybd) { DeviceIntPtr pointer; DeviceIntPtr keyboard; + *ptr = *keybd = NULL; pointer = AddInputDevice(CorePointerProc, TRUE); if (!pointer) From 155e2c559ed0dbf31b6d39d48648a3ee22b37635 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 19 Oct 2007 14:37:07 +0930 Subject: [PATCH 236/634] Xi: advertise as XInput v2 capable --- Xi/extinit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Xi/extinit.c b/Xi/extinit.c index c933e55b8..d02053cca 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -236,8 +236,8 @@ Mask PropagateMask[MAX_DEVICES]; */ static XExtensionVersion thisversion = { XI_Present, - XI_Add_DevicePresenceNotify_Major, - XI_Add_DevicePresenceNotify_Minor + XI_2_Major, + XI_2_Minor }; From d9caa469b9bb4eb6125b890820853062fc2c4441 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 19 Oct 2007 15:26:09 +0930 Subject: [PATCH 237/634] Xi: allow VCP/VCK to be OpenDevice'd as well. All devices deserve to be equal. Except master devices, they are a bit more equal than the others. --- Xi/opendev.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Xi/opendev.c b/Xi/opendev.c index 0b0671d49..192cddc06 100644 --- a/Xi/opendev.c +++ b/Xi/opendev.c @@ -106,12 +106,6 @@ ProcXOpenDevice(ClientPtr client) REQUEST(xOpenDeviceReq); REQUEST_SIZE_MATCH(xOpenDeviceReq); - if (stuff->deviceid == inputInfo.pointer->id || - stuff->deviceid == inputInfo.keyboard->id) { - SendErrorToClient(client, IReqCode, X_OpenDevice, 0, BadDevice); - return Success; - } - if ((dev = LookupDeviceIntRec(stuff->deviceid)) == NULL) { /* not open */ for (dev = inputInfo.off_devices; dev; dev = dev->next) if (dev->id == stuff->deviceid) From 7ef863720dc79107fc2cd17ce684366c87e001a4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 23 Oct 2007 17:28:03 +0930 Subject: [PATCH 238/634] dix: Create new sprite for floating devices. Floating devices get sprites, but still aren't spriteOwners. This prevents them from getting rendered, and also stops segfaulting. (not really solving the problems with keyboards though) --- dix/devices.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index d97133980..7e7e646ad 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2205,16 +2205,18 @@ PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd) * Client is set to the client that issued the request, or NULL if it comes * from some internal automatic pairing. * + * Master may be NULL to set the device floating. + * * We don't allow multi-layer hierarchies right now. You can't attach a slave * to another slave. */ int AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) { - if (!dev || !master) + if (!dev || dev->isMaster) return BadDevice; - if (!master->isMaster) /* can't attach to slave device */ + if (master && !master->isMaster) /* can't attach to slaves */ return BadDevice; if (!pairingClient) @@ -2222,8 +2224,27 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) else if (client && pairingClient != client) return BadAccess; + /* set from floating to floating? */ + if (!dev->u.master && !master) + return Success; + + /* free the existing sprite. */ + if (!dev->u.master && dev->spriteInfo->sprite) + xfree(dev->spriteInfo->sprite); + dev->u.master = master; - dev->spriteInfo->sprite = master->spriteInfo->sprite; + + /* If device is set to floating, we need to create a sprite for it, + * otherwise things go bad. However, we don't want to render the cursor, + * so we reset spriteOwner. + */ + if (!master) + { + /* current root window */ + InitializeSprite(dev, dev->spriteInfo->sprite->spriteTrace[0]); + dev->spriteInfo->spriteOwner = FALSE; + } else + dev->spriteInfo->sprite = master->spriteInfo->sprite; return Success; } From 02508614b9f882ba1559fb4581dcf812118fdf89 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 24 Oct 2007 10:09:18 +0930 Subject: [PATCH 239/634] dix: check for core passive grabs on inferiors when replaying events. --- dix/events.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dix/events.c b/dix/events.c index 8141a4051..7a21af1d1 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1400,18 +1400,24 @@ ComputeFreezes(void) * deliver it too. * However, we might get here with a core event, in which * case we mustn't emulate a core event. - * XXX: I think this may break things. If a client has a - * device grab, and another client a core grab on an - * inferior window, we never get the core grab. (whot) */ sendCore = (replayDev->coreEvents && (xE->u.u.type & EXTENSION_EVENT_BASE && XItoCoreType(xE->u.u.type))); + if (sendCore) { core = *xE; core.u.u.type = XItoCoreType(xE->u.u.type); + /* * XXX: Not sure if this is correct: we need to + * check inferior windows for core passive grabs. + */ + if (CheckDeviceGrabs(replayDev, &core, i+1, 1)) + { + syncEvents.playingEvents = FALSE; + return; + } } if (replayDev->focus) { From b7ee005d327372c1e414ee6c526f9f7aee14bc86 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 24 Oct 2007 10:26:12 +0930 Subject: [PATCH 240/634] dix: Don't interfere grabs the interfering device is of different type. A pointer device should be able to send events while the client has a core grab on a keyboard device, and likewise. --- dix/events.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dix/events.c b/dix/events.c index 7a21af1d1..2032b42ca 100644 --- a/dix/events.c +++ b/dix/events.c @@ -6206,7 +6206,9 @@ IsInterferingGrab(ClientPtr client, DeviceIntPtr dev, xEvent* event) if (it->deviceGrab.grab && SameClient(it->deviceGrab.grab, client) && !it->deviceGrab.fromPassiveGrab) { - return TRUE; + if ((IsPointerDevice(it) && IsPointerDevice(dev)) || + (IsKeyboardDevice(it) && IsKeyboardDevice(dev))) + return TRUE; } } it = it->next; From 15944b8f02752eedd61be34a6a29dd6b82a0ac97 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 7 Nov 2007 11:33:24 +1030 Subject: [PATCH 241/634] mi: duplicate event before processing it, so master has original values Event values may get changed in the event processing stage, so we need to duplicate it to pump different events through for slave and master device. --- mi/mieq.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/mi/mieq.c b/mi/mieq.c index 7d6d110b8..20004f3de 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -232,7 +232,8 @@ mieqProcessInputEvents(void) { EventRec *e = NULL; int x = 0, y = 0; - xEvent* event; + xEvent* event, + *master_event; while (miEventQueue.head != miEventQueue.tail) { if (screenIsSaved == SCREEN_SAVER_ON) @@ -283,25 +284,43 @@ mieqProcessInputEvents(void) * copy. Eventually the interface for the processInputProc needs * to be changed. (whot) */ + + /* The event is changed during event processing, so we need to + * memcpy the event we have and pass the copy through for master + */ if (e->nevents > 1) { int i; event = xcalloc(e->nevents, sizeof(xEvent)); + master_event = xcalloc(e->nevents, sizeof(xEvent)); + if (!event || !master_event) + FatalError("[mi] No memory left for event processing.\n"); for (i = 0; i < e->nevents; i++) + { memcpy(&event[i], e->events[i].event, sizeof(xEvent)); + memcpy(&master_event[i], e->events[i].event, sizeof(xEvent)); + } } else { + int len = sizeof(xEvent); event = e->events->event; + if (event->u.u.type == GenericEvent) + len += GEV(event)->length * 4; + master_event = xalloc(len); + if (!master_event) + FatalError("[mi] No memory left for master event.\n"); + memcpy(master_event, event, len); } e->pDev->public.processInputProc(event, e->pDev, e->nevents); if (!e->pDev->isMaster && e->pDev->u.master) - e->pDev->u.master->public.processInputProc(event, + e->pDev->u.master->public.processInputProc(master_event, e->pDev->u.master, e->nevents); if (e->nevents > 1) xfree(event); + xfree(master_event); } /* Update the sprite now. Next event may be from different device. */ From a8808ac3d093f33b39de109107d396fe0a02c4fc Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 7 Nov 2007 11:42:58 +1030 Subject: [PATCH 242/634] Xi: don't call CheckMotion for slave devices. This essentially disables enter/leave for slave devices, but re-enables them for master devices. Which is a good thing after all. --- Xi/exevents.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 3f096a6a2..cf73bfd85 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -127,7 +127,8 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) if (device->isMaster && device->coreEvents && coretype) sendCore = TRUE; - CheckMotion(xE, device); + if (device->isMaster) + CheckMotion(xE, device); if (xE->u.u.type != DeviceValuator && xE->u.u.type != GenericEvent) { DeviceIntPtr mouse = NULL, kbd = NULL; From 180220f284823c486e7001ef00f1279dc548c9c7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 8 Nov 2007 10:00:35 +1030 Subject: [PATCH 243/634] Xi: return BadDevice for slave devices on ProcXSetClientPointer Also clean up to return error codes instead of sending the error manually. --- Xi/setcptr.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/Xi/setcptr.c b/Xi/setcptr.c index 66c8981b7..ad8f571db 100644 --- a/Xi/setcptr.c +++ b/Xi/setcptr.c @@ -78,11 +78,10 @@ ProcXSetClientPointer(ClientPtr client) pDev = LookupDeviceIntRec(stuff->deviceid); - if (pDev == NULL || !IsPointerDevice(pDev)) + if (pDev == NULL || !IsPointerDevice(pDev) || !pDev->isMaster) { - SendErrorToClient(client, IReqCode, X_SetClientPointer, 0, - BadDevice); - return Success; + client->errorValue = stuff->deviceid; + return BadDevice; } if (stuff->win != None) @@ -90,19 +89,18 @@ ProcXSetClientPointer(ClientPtr client) err = dixLookupWindow(&pWin, stuff->win, client, DixReadWriteAccess); if (err != Success) { - SendErrorToClient(client, IReqCode, X_SetClientPointer, - stuff->win, err); - return Success; + client->errorValue = stuff->win; + return err; } targetClient= wClient(pWin); } else targetClient = client; - + if (!SetClientPointer(targetClient, client, pDev)) { - SendErrorToClient(client, IReqCode, X_SetClientPointer, - stuff->win, BadAccess); - return Success; + client->errorValue = stuff->win; + return BadAccess; } + return Success; } From 3063f0c6679bdbea13f360cff8d09a88b9871da9 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 8 Nov 2007 11:51:03 +1030 Subject: [PATCH 244/634] mi: change the device id to the master devices' when duplicating the event. Move the event duplication into a CopyGetMasterEvent(), makes the code a bit better to read. --- mi/mieq.c | 92 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 74 insertions(+), 18 deletions(-) diff --git a/mi/mieq.c b/mi/mieq.c index 20004f3de..26eab6f44 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -226,6 +226,68 @@ mieqSetHandler(int event, mieqHandler handler) miEventQueue.handlers[event] = handler; } +/** + * Change the device id of the given event to the given device's id. + */ +static void +ChangeDeviceID(DeviceIntPtr dev, xEvent* event) +{ + int type = event->u.u.type; + + if (type == DeviceKeyPress || type == DeviceKeyRelease || + type == DeviceButtonPress || type == DeviceButtonRelease || + type == DeviceMotionNotify) + ((deviceKeyButtonPointer*)event)->deviceid = dev->id; + else if (type == DeviceValuator) + ((deviceValuator*)event)->deviceid = dev->id; + else if (type == GenericEvent) + { + /* FIXME: need to put something into XGE to make this saner */ + xGenericEvent* generic = (xGenericEvent*)event; + if (generic->extension == IReqCode + && generic->evtype == XI_RawDeviceEvent) + { + rawDeviceEvent* raw = (rawDeviceEvent*)event; + raw->deviceid = dev->id; + } else + ErrorF("[mi] Unknown generic event, cannot change id.\n"); + } else + ErrorF("[mi] Unknown event type, cannot change id.\n"); +} + +/** + * Copy the given event into master. + * @param mdev The master device + * @param original The event as it came from the EQ + * @param master The event after being copied + * @param count Number of events in original. + */ +static void +CopyGetMasterEvent(DeviceIntPtr mdev, xEvent* original, + xEvent** master, int count) +{ + if (count > 1) { + *master = xcalloc(count, sizeof(xEvent)); + if (!*master) + FatalError("[mi] No memory left for master event.\n"); + while(count--) + { + memcpy(&(*master)[count], &original[count], sizeof(xEvent)); + ChangeDeviceID(mdev, &(*master)[count]); + } + } else + { + int len = sizeof(xEvent); + if (original->u.u.type == GenericEvent) + len += GEV(original)->length * 4; + *master = xalloc(len); + if (!*master) + FatalError("[mi] No memory left for master event.\n"); + memcpy(*master, original, len); + ChangeDeviceID(mdev, *master); + } +} + /* Call this from ProcessInputEvents(). */ void mieqProcessInputEvents(void) @@ -233,7 +295,7 @@ mieqProcessInputEvents(void) EventRec *e = NULL; int x = 0, y = 0; xEvent* event, - *master_event; + *master_event = NULL; while (miEventQueue.head != miEventQueue.tail) { if (screenIsSaved == SCREEN_SAVER_ON) @@ -284,39 +346,32 @@ mieqProcessInputEvents(void) * copy. Eventually the interface for the processInputProc needs * to be changed. (whot) */ - - /* The event is changed during event processing, so we need to - * memcpy the event we have and pass the copy through for master - */ if (e->nevents > 1) { int i; event = xcalloc(e->nevents, sizeof(xEvent)); - master_event = xcalloc(e->nevents, sizeof(xEvent)); - if (!event || !master_event) + if (!event) FatalError("[mi] No memory left for event processing.\n"); for (i = 0; i < e->nevents; i++) { memcpy(&event[i], e->events[i].event, sizeof(xEvent)); - memcpy(&master_event[i], e->events[i].event, sizeof(xEvent)); } - } - else - { - int len = sizeof(xEvent); + } else event = e->events->event; - if (event->u.u.type == GenericEvent) - len += GEV(event)->length * 4; - master_event = xalloc(len); - if (!master_event) - FatalError("[mi] No memory left for master event.\n"); - memcpy(master_event, event, len); + if (!e->pDev->isMaster && e->pDev->u.master) + { + CopyGetMasterEvent(e->pDev->u.master, event, + &master_event, e->nevents); } + /* process slave first, then master */ e->pDev->public.processInputProc(event, e->pDev, e->nevents); + if (!e->pDev->isMaster && e->pDev->u.master) + { e->pDev->u.master->public.processInputProc(master_event, e->pDev->u.master, e->nevents); + } if (e->nevents > 1) xfree(event); @@ -331,3 +386,4 @@ mieqProcessInputEvents(void) } } } + From 59b304d8a24fecd094296feb217823f0c73d6f82 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 8 Nov 2007 15:44:18 +1030 Subject: [PATCH 245/634] dix, mi: stop segfaults when a floating device emits events. For pointers: don't try to set master->valuator fields if there is no master. For keyboards: check if device is valid before trying to access the fields in miPointerGetScreen (btw. this disables DGA events for floating keyboards). Also stop the hideous number of ErrorFs if we request the paired device for a floating dev. --- dix/devices.c | 5 +---- dix/getevents.c | 7 +++++-- mi/mipointer.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 30fc7b33d..c9831ea92 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2265,11 +2265,8 @@ GetPairedDevice(DeviceIntPtr dev) dev = dev->u.master; if (!dev->spriteInfo->paired) - { - ErrorF("[dix] No device paired with %d (%s).\n", - dev->id, dev->name); return NULL; - } + return dev->spriteInfo->paired; } diff --git a/dix/getevents.c b/dix/getevents.c index 30443018c..a23eabea2 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -736,8 +736,11 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, pDev->valuator->lastx = x; pDev->valuator->lasty = y; - master->valuator->lastx = x; - master->valuator->lasty = y; + if (master) + { + master->valuator->lastx = x; + master->valuator->lasty = y; + } if (!coreOnly) { diff --git a/mi/mipointer.c b/mi/mipointer.c index 7b565799e..b2f31c1d5 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -529,7 +529,7 @@ miPointerCurrentScreen () _X_EXPORT ScreenPtr miPointerGetScreen(DeviceIntPtr pDev) { - if (!pDev->isMaster && !pDev->u.master) + if (!pDev || (!pDev->isMaster && !pDev->u.master)) return NULL; return MIPOINTER(pDev)->pScreen; From cb75f09146a3c17b1a67b636bbf7229c65c83b35 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 9 Nov 2007 11:29:18 +1030 Subject: [PATCH 246/634] dix: calloc root window's Generic Event mask, stops segfaults. --- dix/window.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dix/window.c b/dix/window.c index 23acbd63b..51891a88e 100644 --- a/dix/window.c +++ b/dix/window.c @@ -455,7 +455,12 @@ CreateRootWindow(ScreenPtr pScreen) #ifdef XINPUT pWin->optional->inputMasks = NULL; pWin->optional->deviceCursors = NULL; - pWin->optional->geMasks = NULL; + pWin->optional->geMasks = (GenericClientMasksPtr)xcalloc(1, sizeof(GenericClientMasksRec)); + if (!pWin->optional->geMasks) + { + xfree(pWin->optional); + return FALSE; + } #endif pWin->optional->access.perm = NULL; From 676b26ca3e9b142cf007af3f439aa1993f2247c4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 8 Nov 2007 17:54:17 +1030 Subject: [PATCH 247/634] Xi: notify the clients when the device hierarchy has been changed. --- Xi/chdevhier.c | 10 ++++++++++ Xi/extinit.c | 5 ++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Xi/chdevhier.c b/Xi/chdevhier.c index c916c0f47..338c07433 100644 --- a/Xi/chdevhier.c +++ b/Xi/chdevhier.c @@ -79,9 +79,11 @@ int ProcXChangeDeviceHierarchy(ClientPtr client) { DeviceIntPtr ptr, keybd; + DeviceIntRec dummyDev; xAnyHierarchyChangeInfo *any; int required_len = sizeof(xChangeDeviceHierarchyReq); char n; + deviceHierarchyChangedEvent ev; REQUEST(xChangeDeviceHierarchyReq); REQUEST_AT_LEAST_SIZE(xChangeDeviceHierarchyReq); @@ -226,6 +228,14 @@ ProcXChangeDeviceHierarchy(ClientPtr client) any = (xAnyHierarchyChangeInfo*)((char*)any + any->length); } + ev.type = GenericEvent; + ev.extension = IReqCode; + ev.length = 0; + ev.evtype = XI_DeviceHierarchyChangedNotify; + ev.time = GetTimeInMillis(); + + SendEventToAllWindows(&dummyDev, XI_DeviceHierarchyChangedMask, + (xEvent*)&ev, 1); return Success; } diff --git a/Xi/extinit.c b/Xi/extinit.c index de2653f43..0ecb421f0 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -137,9 +137,8 @@ Mask ExtExclusiveMasks[EMASKSIZE]; * Evtype is index, mask is value at index. */ static Mask xi_filters[3] = { - XI_PointerKeyboardPairingChangedMask, - XI_RandomStringMask, - XI_RawDeviceEventMask, + XI_DeviceHierarchyChangedMask, + XI_RawDeviceEventMask, }; static struct dev_type From 5bbc468b702f62d7c91d41aabcc27eeb553f6959 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 9 Nov 2007 11:33:27 +1030 Subject: [PATCH 248/634] dix: grabbing an attached SD sets it floating for the duration of the grab. --- dix/events.c | 91 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 83 insertions(+), 8 deletions(-) diff --git a/dix/events.c b/dix/events.c index 8a8761855..c3589f0c8 100644 --- a/dix/events.c +++ b/dix/events.c @@ -237,6 +237,7 @@ _X_EXPORT CallbackListPtr DeviceEventCallback; Mask DontPropagateMasks[DNPMCOUNT]; static int DontPropagateRefCnts[DNPMCOUNT]; + /** * Main input device struct. * inputInfo.pointer @@ -1540,6 +1541,54 @@ CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode) ComputeFreezes(); } +/* Only ever used if a grab is called on an attached slave device. */ +static int GrabPrivateIndex = -1; +typedef struct _GrabMemoryRec { + DeviceIntPtr oldmaster; +} GrabMemoryRec, *GrabMemoryPtr; + +/** + * Save the device's master device in the devPrivates. This needs to be done + * if a client directly grabs a slave device that is attached to a master. For + * the duration of the grab, the device is detached, ungrabbing re-attaches it + * though. + */ +static void +SaveOldMaster(DeviceIntPtr dev) +{ + GrabMemoryPtr gm; + + if (GrabPrivateIndex == -1) + GrabPrivateIndex = AllocateDevicePrivateIndex(); + + if (!AllocateDevicePrivate(dev, GrabPrivateIndex) || + !(gm = xalloc(sizeof(GrabMemoryRec)))) + { + ErrorF("[dix] Cannot allocate grab private. Grab not " + "possible on device.\n"); + return; + } + gm->oldmaster = dev->u.master; + dev->devPrivates[GrabPrivateIndex].ptr = gm; +} + +static void +RestoreOldMaster(DeviceIntPtr dev) +{ + GrabMemoryPtr gm; + + if (dev->isMaster || GrabPrivateIndex == -1) + return; + + gm = ((GrabMemoryPtr)dev->devPrivates[GrabPrivateIndex].ptr); + if (gm) + { + dev->u.master = gm->oldmaster; + xfree(gm); + dev->devPrivates[GrabPrivateIndex].ptr = NULL; + } +} + /** * Activate a pointer grab on the given device. A pointer grab will cause all * core pointer events of this device to be delivered to the grabbing client only. @@ -1563,6 +1612,14 @@ ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, WindowPtr oldWin = (grabinfo->grab) ? grabinfo->grab->window : mouse->spriteInfo->sprite->win; + Bool isPassive = autoGrab & ~ImplicitGrabMask; + + /* slave devices need to float for the duration of the grab. */ + if (!isPassive && !mouse->isMaster) + { + SaveOldMaster(mouse); + AttachDevice(NULL, mouse, NULL); + } if (grab->confineTo) { @@ -1582,7 +1639,7 @@ ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, grab->cursor->refcnt++; grabinfo->activeGrab = *grab; grabinfo->grab = &grabinfo->activeGrab; - grabinfo->fromPassiveGrab = autoGrab & ~ImplicitGrabMask; + grabinfo->fromPassiveGrab = isPassive; grabinfo->implicitGrab = autoGrab & ImplicitGrabMask; PostNewCursor(mouse); CheckGrabForSyncs(mouse,(Bool)grab->pointerMode, (Bool)grab->keyboardMode); @@ -1598,6 +1655,7 @@ DeactivatePointerGrab(DeviceIntPtr mouse) { GrabPtr grab = mouse->deviceGrab.grab; DeviceIntPtr dev; + Bool wasPassive= mouse->deviceGrab.fromPassiveGrab; mouse->valuator->motionHintWindow = NullWindow; mouse->deviceGrab.grab = NullGrab; @@ -1615,6 +1673,10 @@ DeactivatePointerGrab(DeviceIntPtr mouse) PostNewCursor(mouse); if (grab->cursor) FreeCursor(grab->cursor, (Cursor)0); + + if (!wasPassive) + RestoreOldMaster(mouse); + ComputeFreezes(); } @@ -1629,6 +1691,13 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool pass GrabInfoPtr grabinfo = &keybd->deviceGrab; WindowPtr oldWin; + /* slave devices need to float for the duration of the grab. */ + if (!passive && !keybd->isMaster) + { + SaveOldMaster(keybd); + AttachDevice(NULL, keybd, NULL); + } + if (grabinfo->grab) oldWin = grabinfo->grab->window; else if (keybd->focus) @@ -1660,9 +1729,7 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd) DeviceIntPtr dev; WindowPtr focusWin = keybd->focus ? keybd->focus->win : keybd->spriteInfo->sprite->win; - - if (!grab) - grab = keybd->deviceGrab.grab; + Bool wasPassive = keybd->deviceGrab.fromPassiveGrab; if (focusWin == FollowKeyboardWin) focusWin = inputInfo.keyboard->focus->win; @@ -1677,6 +1744,10 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd) dev->deviceGrab.sync.other = NullGrab; } DoFocusEvents(keybd, grab->window, focusWin, NotifyUngrab); + + if (!wasPassive) + RestoreOldMaster(keybd); + ComputeFreezes(); } @@ -4243,13 +4314,17 @@ EnterLeaveEvent( #ifdef XKB if (!noXkbExtension) { event.u.enterLeave.state = mouse->button->state & 0x1f00; - event.u.enterLeave.state |= - XkbGrabStateFromRec(&keybd->key->xkbInfo->state); + if (keybd) + event.u.enterLeave.state |= + XkbGrabStateFromRec(&keybd->key->xkbInfo->state); } else #endif - event.u.enterLeave.state = keybd->key->state | mouse->button->state; + { + event.u.enterLeave.state = (keybd) ? keybd->key->state : 0; + event.u.enterLeave.state |+ mouse->button->state; + } event.u.enterLeave.mode = mode; - focus = keybd->focus->win; + focus = (keybd) ? keybd->focus->win : None; if ((focus != NoneWin) && ((pWin == focus) || (focus == PointerRootWin) || IsParent(focus, pWin))) From c0a05805783ee3d38fbcc0fb45f4aa3c511785f0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 9 Nov 2007 23:07:10 +1030 Subject: [PATCH 249/634] Xext: add simple macro to easily check a generic event's type. --- Xext/geext.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Xext/geext.h b/Xext/geext.h index f3352c2a6..1ba71e070 100644 --- a/Xext/geext.h +++ b/Xext/geext.h @@ -87,6 +87,12 @@ extern GEExtension GEExtensions[MAXEXTENSIONS]; #define GEEventFill(ev) \ GEExtensions[GEEXTIDX(xE)].evfill +#define GEIsType(ev, ext, ev_type) \ + ((ev->u.u.type == GenericEvent) && \ + ((xGenericEvent*)(ev))->extension == ext && \ + ((xGenericEvent*)(ev))->evtype == ev_type) + + /* Interface for other extensions */ void GEWindowSetMask(ClientPtr pClient, WindowPtr pWin, int extension, Mask mask); void GERegisterExtension( From 7a81bafc9bc7048560b17483e6addf58469a05d0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 9 Nov 2007 23:10:24 +1030 Subject: [PATCH 250/634] Xi, dix: Add ability to change MD classes + send event when doing so. Each time a different slave device sends through a master, an DeviceClassesChangedEvent is enqueued. When this event is processed, all classes of the matching master device are changed, and the event is sent to the clients. Next time the master is queried, it thus shows the evclasses of the last slave device. The original classes are stored in the devPrivates. TODO: if all slave devices are removed, the master's original classes need to be restored. --- Xi/exevents.c | 57 ++++++++++++++++++++++ Xi/extinit.c | 51 ++++++++++++++++++++ Xi/listdev.c | 15 +++--- Xi/listdev.h | 14 ++++++ dix/devices.c | 122 +++++++++++++++++++++++++++++++++++++----------- dix/getevents.c | 93 ++++++++++++++++++++++++------------ mi/mieq.c | 7 +-- 7 files changed, 293 insertions(+), 66 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 4c57fd017..617aef7b4 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -73,6 +73,7 @@ SOFTWARE. #include "dixevents.h" /* DeliverFocusedEvent */ #include "dixgrabs.h" /* CreateGrab() */ #include "scrnintstr.h" +#include "listdev.h" /* for CopySwapXXXClass */ #ifdef XKB #include "xkbsrv.h" @@ -127,6 +128,62 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) xEvent core; int coretype = 0; + /* This event is always the first we get, before the actual events with + * the data. However, the way how the DDX is set up, "device" will + * actually be the slave device that caused the event. + */ + if (GEIsType(xE, IReqCode, XI_DeviceClassesChangedNotify)) + { + deviceClassesChangedEvent* dcce = (deviceClassesChangedEvent*)xE; + DeviceIntPtr master = device->u.master; + char* classbuff; + + if (device->isMaster) + return; + + if (!master) /* if device was set floating between SIGIO and now */ + return; + + dcce->deviceid = master->id; + dcce->num_classes = 0; + + master->key = device->key; + master->valuator = device->valuator; + master->button = device->button; + master->focus = device->focus; + master->proximity = device->proximity; + master->absolute = device->absolute; + master->kbdfeed = device->kbdfeed; + master->ptrfeed = device->ptrfeed; + master->intfeed = device->intfeed; + master->stringfeed = device->stringfeed; + master->bell = device->bell; + master->leds = device->leds; + + /* event is already correct size, see comment in GetPointerEvents */ + classbuff = (char*)&xE[1]; + if (master->key) + { + /* we don't actually swap here, swapping is done later */ + CopySwapKeyClass(NullClient, master->key, &classbuff); + dcce->num_classes++; + } + if (master->button) + { + CopySwapButtonClass(NullClient, master->button, &classbuff); + dcce->num_classes++; + } + if (master->valuator) + { + CopySwapValuatorClass(NullClient, master->valuator, &classbuff); + dcce->num_classes++; + } + + SendEventToAllWindows(master, XI_DeviceClassesChangedMask, + xE, 1); + return; + } + coretype = XItoCoreType(xE->u.u.type); if (device->isMaster && device->coreEvents && coretype) sendCore = TRUE; diff --git a/Xi/extinit.c b/Xi/extinit.c index 0ecb421f0..017b6935a 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -703,6 +703,53 @@ SRawDeviceEvent(rawDeviceEvent* from, rawDeviceEvent *to) swapl(valptr, n); } +static void +SDeviceClassesChangedEvent(deviceClassesChangedEvent* from, + deviceClassesChangedEvent* to) +{ + char n; + int i, j; + xAnyClassPtr any; + + *to = *from; + memcpy(&to[1], &from[1], from->length * 4); + + swaps(&to->sequenceNumber, n); + swapl(&to->length, n); + swapl(&to->time, n); + + /* now swap the actual classes */ + any = (xAnyClassPtr)&to[1]; + for (i = 0; i < to->num_classes; i++) + { + switch(any->class) + { + case KeyClass: + swaps(&((xKeyInfoPtr)any)->num_keys, n); + break; + case ButtonClass: + swaps(&((xButtonInfoPtr)any)->num_buttons, n); + break; + case ValuatorClass: + { + xValuatorInfoPtr v = (xValuatorInfoPtr)any; + xAxisInfoPtr a = (xAxisInfoPtr)&v[1]; + + swapl(&v->motion_buffer_size, n); + for (j = 0; j < v->num_axes; j++) + { + swapl(&a->min_value, n); + swapl(&a->max_value, n); + swapl(&a->resolution, n); + a++; + } + } + break; + } + any = (xAnyClassPtr)((char*)any + any->length); + } +} + /************************************************************************** * * Allow the specified event to have its propagation suppressed. @@ -1153,6 +1200,10 @@ XIGEEventSwap(xGenericEvent* from, xGenericEvent* to) case XI_RawDeviceEvent: SRawDeviceEvent((rawDeviceEvent*)from, (rawDeviceEvent*)to); break; + case XI_DeviceClassesChangedNotify: + SDeviceClassesChangedEvent((deviceClassesChangedEvent*)from, + (deviceClassesChangedEvent*)to); + break; } } diff --git a/Xi/listdev.c b/Xi/listdev.c index 8753b292c..962998efe 100644 --- a/Xi/listdev.c +++ b/Xi/listdev.c @@ -68,7 +68,6 @@ SOFTWARE. #include "listdev.h" -#define VPC 20 /* Max # valuators per chunk */ /*********************************************************************** * @@ -143,7 +142,7 @@ CopyDeviceName(char **namebuf, char *name) * */ -static void +void CopySwapButtonClass(ClientPtr client, ButtonClassPtr b, char **buf) { char n; @@ -153,7 +152,7 @@ CopySwapButtonClass(ClientPtr client, ButtonClassPtr b, char **buf) b2->class = ButtonClass; b2->length = sizeof(xButtonInfo); b2->num_buttons = b->numButtons; - if (client->swapped) { + if (client && client->swapped) { swaps(&b2->num_buttons, n); /* macro - braces are required */ } *buf += sizeof(xButtonInfo); @@ -202,7 +201,7 @@ CopySwapDevice(ClientPtr client, DeviceIntPtr d, int num_classes, * */ -static void +void CopySwapKeyClass(ClientPtr client, KeyClassPtr k, char **buf) { char n; @@ -214,7 +213,7 @@ CopySwapKeyClass(ClientPtr client, KeyClassPtr k, char **buf) k2->min_keycode = k->curKeySyms.minKeyCode; k2->max_keycode = k->curKeySyms.maxKeyCode; k2->num_keys = k2->max_keycode - k2->min_keycode + 1; - if (client->swapped) { + if (client && client->swapped) { swaps(&k2->num_keys, n); } *buf += sizeof(xKeyInfo); @@ -232,7 +231,7 @@ CopySwapKeyClass(ClientPtr client, KeyClassPtr k, char **buf) * */ -static int +int CopySwapValuatorClass(ClientPtr client, ValuatorClassPtr v, char **buf) { int i, j, axes, t_axes; @@ -252,7 +251,7 @@ CopySwapValuatorClass(ClientPtr client, ValuatorClassPtr v, char **buf) v2->num_axes = t_axes; v2->mode = v->mode & DeviceMode; v2->motion_buffer_size = v->numMotionEvents; - if (client->swapped) { + if (client && client->swapped) { swapl(&v2->motion_buffer_size, n); } *buf += sizeof(xValuatorInfo); @@ -262,7 +261,7 @@ CopySwapValuatorClass(ClientPtr client, ValuatorClassPtr v, char **buf) a2->min_value = a->min_value; a2->max_value = a->max_value; a2->resolution = a->resolution; - if (client->swapped) { + if (client && client->swapped) { swapl(&a2->min_value, n); swapl(&a2->max_value, n); swapl(&a2->resolution, n); diff --git a/Xi/listdev.h b/Xi/listdev.h index db376decf..afdcd6992 100644 --- a/Xi/listdev.h +++ b/Xi/listdev.h @@ -30,6 +30,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef LISTDEV_H #define LISTDEV_H 1 +#define VPC 20 /* Max # valuators per chunk */ + int SProcXListInputDevices(ClientPtr /* client */ ); @@ -41,4 +43,16 @@ void SRepXListInputDevices(ClientPtr /* client */ , xListInputDevicesReply * /* rep */ ); +void +CopySwapKeyClass(ClientPtr /* client */, + KeyClassPtr /* k */, + char** /* buf */); +void +CopySwapButtonClass(ClientPtr /* client */, + ButtonClassPtr /* b */, + char** /* buf */); +int +CopySwapValuatorClass(ClientPtr /* client */, + ValuatorClassPtr /* v */, + char** /* buf */); #endif /* LISTDEV_H */ diff --git a/dix/devices.c b/dix/devices.c index c9831ea92..b42337820 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -84,8 +84,25 @@ SOFTWARE. * This file handles input device-related stuff. */ +typedef struct { + KeyClassPtr key; + ValuatorClassPtr valuator; + ButtonClassPtr button; + FocusClassPtr focus; + ProximityClassPtr proximity; + AbsoluteClassPtr absolute; + KbdFeedbackPtr kbdfeed; + PtrFeedbackPtr ptrfeed; + IntegerFeedbackPtr intfeed; + StringFeedbackPtr stringfeed; + BellFeedbackPtr bell; + LedFeedbackPtr leds; +} ClassesRec, *ClassesPtr; + + int CoreDevicePrivatesIndex = 0; static int CoreDevicePrivatesGeneration = -1; +int MasterDevClassesPrivIdx = -1; /* The client that is allowed to change pointer-keyboard pairings. */ static ClientPtr pairingClient = NULL; @@ -385,9 +402,16 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what) #ifdef XKB XkbComponentNamesRec names; #endif + ClassesPtr classes; switch (what) { case DEVICE_INIT: + if (MasterDevClassesPrivIdx == -1) + MasterDevClassesPrivIdx = AllocateDevicePrivateIndex(); + + if (!AllocateDevicePrivate(pDev, MasterDevClassesPrivIdx) || + !(classes = xcalloc(1, sizeof(ClassesRec)))) + keySyms.minKeyCode = 8; keySyms.maxKeyCode = 255; keySyms.mapWidth = 4; @@ -425,6 +449,19 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what) xfree(keySyms.map); xfree(modMap); + classes->key = pDev->key; + classes->valuator = pDev->valuator; + classes->button = pDev->button; + classes->focus = pDev->focus; + classes->proximity = pDev->proximity; + classes->absolute = pDev->absolute; + classes->kbdfeed = pDev->kbdfeed; + classes->ptrfeed = pDev->ptrfeed; + classes->intfeed = pDev->intfeed; + classes->stringfeed = pDev->stringfeed; + classes->bell = pDev->bell; + classes->leds = pDev->leds; + pDev->devPrivates[MasterDevClassesPrivIdx].ptr = classes; break; case DEVICE_CLOSE: @@ -439,15 +476,27 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what) /** * Device control function for the Virtual Core Pointer. + * + * Aside from initialisation, it backs up the original device classes into the + * devicePrivates. This only needs to be done for master devices. */ static int CorePointerProc(DeviceIntPtr pDev, int what) { BYTE map[33]; int i = 0; + ClassesPtr classes; + switch (what) { case DEVICE_INIT: + if (MasterDevClassesPrivIdx == -1) + MasterDevClassesPrivIdx = AllocateDevicePrivateIndex(); + + if (!AllocateDevicePrivate(pDev, MasterDevClassesPrivIdx) || + !(classes = xcalloc(1, sizeof(ClassesRec)))) + return BadAlloc; + for (i = 1; i <= 32; i++) map[i] = i; InitPointerDeviceStruct((DevicePtr)pDev, map, 32, @@ -457,6 +506,21 @@ CorePointerProc(DeviceIntPtr pDev, int what) pDev->valuator->lastx = pDev->valuator->axisVal[0]; pDev->valuator->axisVal[1] = screenInfo.screens[0]->height / 2; pDev->valuator->lasty = pDev->valuator->axisVal[1]; + + classes->key = pDev->key; + classes->valuator = pDev->valuator; + classes->button = pDev->button; + classes->focus = pDev->focus; + classes->proximity = pDev->proximity; + classes->absolute = pDev->absolute; + classes->kbdfeed = pDev->kbdfeed; + classes->ptrfeed = pDev->ptrfeed; + classes->intfeed = pDev->intfeed; + classes->stringfeed = pDev->stringfeed; + classes->bell = pDev->bell; + classes->leds = pDev->leds; + + pDev->devPrivates[MasterDevClassesPrivIdx].ptr = classes; break; case DEVICE_CLOSE: @@ -574,6 +638,7 @@ CloseDevice(DeviceIntPtr dev) BellFeedbackPtr b, bnext; LedFeedbackPtr l, lnext; ScreenPtr screen = screenInfo.screens[0]; + ClassesPtr classes; int j; if (!dev) @@ -588,41 +653,46 @@ CloseDevice(DeviceIntPtr dev) xfree(dev->name); - if (dev->key) { + if (dev->isMaster) + classes = (ClassesPtr)dev->devPrivates[MasterDevClassesPrivIdx].ptr; + else + classes = (ClassesPtr)&dev->key; + + if (classes->key) { #ifdef XKB - if (dev->key->xkbInfo) - XkbFreeInfo(dev->key->xkbInfo); + if (classes->key->xkbInfo) + XkbFreeInfo(classes->key->xkbInfo); #endif - xfree(dev->key->curKeySyms.map); - xfree(dev->key->modifierKeyMap); - xfree(dev->key); + xfree(classes->key->curKeySyms.map); + xfree(classes->key->modifierKeyMap); + xfree(classes->key); } - if (dev->valuator) { + if (classes->valuator) { /* Counterpart to 'biggest hack ever' in init. */ - if (dev->valuator->motion && - dev->valuator->GetMotionProc == GetMotionHistory) - xfree(dev->valuator->motion); - xfree(dev->valuator); + if (classes->valuator->motion && + classes->valuator->GetMotionProc == GetMotionHistory) + xfree(classes->valuator->motion); + xfree(classes->valuator); } - if (dev->button) { + if (classes->button) { #ifdef XKB - if (dev->button->xkb_acts) - xfree(dev->button->xkb_acts); + if (classes->button->xkb_acts) + xfree(classes->button->xkb_acts); #endif - xfree(dev->button); + xfree(classes->button); } - if (dev->focus) { - xfree(dev->focus->trace); - xfree(dev->focus); + if (classes->focus) { + xfree(classes->focus->trace); + xfree(classes->focus); } - if (dev->proximity) - xfree(dev->proximity); + if (classes->proximity) + xfree(classes->proximity); - for (k = dev->kbdfeed; k; k = knext) { + for (k = classes->kbdfeed; k; k = knext) { knext = k->next; #ifdef XKB if (k->xkb_sli) @@ -631,29 +701,29 @@ CloseDevice(DeviceIntPtr dev) xfree(k); } - for (p = dev->ptrfeed; p; p = pnext) { + for (p = classes->ptrfeed; p; p = pnext) { pnext = p->next; xfree(p); } - for (i = dev->intfeed; i; i = inext) { + for (i = classes->intfeed; i; i = inext) { inext = i->next; xfree(i); } - for (s = dev->stringfeed; s; s = snext) { + for (s = classes->stringfeed; s; s = snext) { snext = s->next; xfree(s->ctrl.symbols_supported); xfree(s->ctrl.symbols_displayed); xfree(s); } - for (b = dev->bell; b; b = bnext) { + for (b = classes->bell; b; b = bnext) { bnext = b->next; xfree(b); } - for (l = dev->leds; l; l = lnext) { + for (l = classes->leds; l; l = lnext) { lnext = l->next; #ifdef XKB if (l->xkb_sli) diff --git a/dix/getevents.c b/dix/getevents.c index a23eabea2..425b60234 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -67,6 +67,7 @@ extern Bool XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies); #include "exevents.h" #include "exglobals.h" #include "extnsionst.h" +#include "listdev.h" /* for sizing up DeviceClassesChangedEvent */ /* Maximum number of valuators, divided by six, rounded up, to get number * of events. */ @@ -110,6 +111,52 @@ key_autorepeats(DeviceIntPtr pDev, int key_code) (1 << (key_code & 7))); } +static void +CreateClassesChangedEvent(EventList* event, + DeviceIntPtr master, + DeviceIntPtr slave) +{ + deviceClassesChangedEvent *dcce; + int len = sizeof(xEvent); + CARD32 ms = GetTimeInMillis(); + + /* XXX: ok, this is a bit weird. We need to alloc enough size for the + * event so it can be filled in in POE lateron. Reason being that if + * we realloc the event in POE we can get SIGABRT when we try to free + * or realloc the original pointer. + * We can only do it here as we don't have the EventList in the event + * processing any more. + * + * Code is basically same as in Xi/listdev.c + */ + if (slave->key) + len += sizeof(xKeyInfo); + if (slave->button) + len += sizeof(xButtonInfo); + if (slave->valuator) + { + int chunks = ((int)slave->valuator->numAxes + 19) / VPC; + len += (chunks * sizeof(xValuatorInfo) + + slave->valuator->numAxes * sizeof(xAxisInfo)); + } + if (event->evlen < len) + { + event->event = realloc(event->event, len); + if (!event->event) + FatalError("[dix] Cannot allocate memory for " + "DeviceClassesChangedEvent.\n"); + event->evlen = len; + } + + dcce = (deviceClassesChangedEvent*)event->event; + dcce->type = GenericEvent; + dcce->extension = IReqCode; + dcce->evtype = XI_DeviceClassesChangedNotify; + dcce->time = ms; + dcce->new_slave = slave->id; + dcce->length = (len - sizeof(xEvent))/4; +} + /** * Allocate the motion history buffer. */ @@ -415,6 +462,7 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type, KeySym *map = pDev->key->curKeySyms.map; KeySym sym = map[key_code * pDev->key->curKeySyms.mapWidth]; deviceKeyButtonPointer *kbp = NULL; + DeviceIntPtr master; if (!events) return 0; @@ -432,6 +480,18 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type, if (key_code < 8 || key_code > 255) return 0; + master = pDev->u.master; + if (master && master->u.lastSlave != pDev) + { + CreateClassesChangedEvent(events, master, pDev); + + pDev->valuator->lastx = master->valuator->lastx; + pDev->valuator->lasty = master->valuator->lasty; + master->u.lastSlave = pDev; + numEvents++; + events++; + } + if (num_valuators) { if ((num_valuators / 6) + 1 > MAX_VALUATOR_EVENTS) num_valuators = MAX_VALUATOR_EVENTS; @@ -606,37 +666,14 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, master = pDev->u.master; if (master && master->u.lastSlave != pDev) { -#if 0 - /* XXX: we should enqueue the state changed event here */ - devStateEvent *state; - num_events++; - state = events->event; + CreateClassesChangedEvent(events, master, pDev); - state->type = GenericEvent; - state->extension = IReqCode; - state->evtype = XI_DeviceStateChangedNotify; - state->deviceid = master->deviceid; - state->new_slave = pDev->id; - state->time = ms; - events++; - -#endif - - /* now we need to update our device to the master's device - welcome - * to hell. - * We need to match each device's capabilities to the previous - * capabilities as used by the master. Valuator[N] of master has to - * be written into valuator[N] of pDev. For all relative valuators. - * Otherwise we get jumpy valuators. - * - * However, this if iffy, if pDev->num_valuators != - * master->num_valuators. What do we do with the others? - * - * XXX: just do lastx/y for now. - */ pDev->valuator->lastx = master->valuator->lastx; pDev->valuator->lasty = master->valuator->lasty; master->u.lastSlave = pDev; + + num_events++; + events++; } /* Do we need to send a DeviceValuator event? */ @@ -652,8 +689,6 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, if (first_valuator < 0 || final_valuator > pDev->valuator->numAxes) return 0; - - /* fill up the raw event, after checking that it is large enough to * accommodate all valuators. */ diff --git a/mi/mieq.c b/mi/mieq.c index 26eab6f44..7ea12fe8c 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -243,12 +243,13 @@ ChangeDeviceID(DeviceIntPtr dev, xEvent* event) else if (type == GenericEvent) { /* FIXME: need to put something into XGE to make this saner */ - xGenericEvent* generic = (xGenericEvent*)event; - if (generic->extension == IReqCode - && generic->evtype == XI_RawDeviceEvent) + if (GEIsType(event, IReqCode, XI_RawDeviceEvent)) { rawDeviceEvent* raw = (rawDeviceEvent*)event; raw->deviceid = dev->id; + } else if (GEIsType(event, IReqCode, XI_DeviceClassesChangedNotify)) + { + // do nothing or drink a beer. your choice. } else ErrorF("[mi] Unknown generic event, cannot change id.\n"); } else From a05f43bf3e9629df98e93c366d4327f20ed81e6c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 12 Nov 2007 11:35:18 +1030 Subject: [PATCH 251/634] dix: When the last slave is removed, set master to the original classes. DeviceClassesChangedEvent is sent to the client, where device == new slave. --- Xi/exevents.c | 23 ++++------------------- Xi/listdev.c | 31 +++++++++++++++++++------------ Xi/listdev.h | 16 +++++----------- dix/devices.c | 42 ++++++++++++++++++++++++++++++++++++++++++ dix/getevents.c | 2 +- include/input.h | 3 +++ 6 files changed, 74 insertions(+), 43 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 617aef7b4..3ef32006c 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -162,25 +162,10 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) /* event is already correct size, see comment in GetPointerEvents */ classbuff = (char*)&xE[1]; - if (master->key) - { - /* we don't actually swap here, swapping is done later */ - CopySwapKeyClass(NullClient, master->key, &classbuff); - dcce->num_classes++; - } - if (master->button) - { - CopySwapButtonClass(NullClient, master->button, &classbuff); - dcce->num_classes++; - } - if (master->valuator) - { - CopySwapValuatorClass(NullClient, master->valuator, &classbuff); - dcce->num_classes++; - } - - SendEventToAllWindows(master, XI_DeviceClassesChangedMask, - xE, 1); + /* we don't actually swap if there's a NullClient, swapping is done + * later when event is delivered. */ + CopySwapClasses(NullClient, master, &dcce->num_classes, &classbuff); + SendEventToAllWindows(master, XI_DeviceClassesChangedMask, xE, 1); return; } diff --git a/Xi/listdev.c b/Xi/listdev.c index 962998efe..1810c9b62 100644 --- a/Xi/listdev.c +++ b/Xi/listdev.c @@ -142,7 +142,7 @@ CopyDeviceName(char **namebuf, char *name) * */ -void +static void CopySwapButtonClass(ClientPtr client, ButtonClassPtr b, char **buf) { char n; @@ -201,7 +201,7 @@ CopySwapDevice(ClientPtr client, DeviceIntPtr d, int num_classes, * */ -void +static void CopySwapKeyClass(ClientPtr client, KeyClassPtr k, char **buf) { char n; @@ -231,7 +231,7 @@ CopySwapKeyClass(ClientPtr client, KeyClassPtr k, char **buf) * */ -int +static int CopySwapValuatorClass(ClientPtr client, ValuatorClassPtr v, char **buf) { int i, j, axes, t_axes; @@ -286,17 +286,24 @@ ListDeviceInfo(ClientPtr client, DeviceIntPtr d, xDeviceInfoPtr dev, { CopyDeviceName(namebuf, d->name); CopySwapDevice(client, d, 0, devbuf); - if (d->key != NULL) { - CopySwapKeyClass(client, d->key, classbuf); - dev->num_classes++; + CopySwapClasses(client, d, &dev->num_classes, classbuf); +} + +void +CopySwapClasses(ClientPtr client, DeviceIntPtr dev, CARD8 *num_classes, + char** classbuf) +{ + if (dev->key != NULL) { + CopySwapKeyClass(client, dev->key, classbuf); + (*num_classes)++; } - if (d->button != NULL) { - CopySwapButtonClass(client, d->button, classbuf); - dev->num_classes++; + if (dev->button != NULL) { + CopySwapButtonClass(client, dev->button, classbuf); + (*num_classes)++; } - if (d->valuator != NULL) { - dev->num_classes += - CopySwapValuatorClass(client, d->valuator, classbuf); + if (dev->valuator != NULL) { + (*num_classes) += + CopySwapValuatorClass(client, dev->valuator, classbuf); } } diff --git a/Xi/listdev.h b/Xi/listdev.h index afdcd6992..22a0d91c8 100644 --- a/Xi/listdev.h +++ b/Xi/listdev.h @@ -44,15 +44,9 @@ void SRepXListInputDevices(ClientPtr /* client */ , ); void -CopySwapKeyClass(ClientPtr /* client */, - KeyClassPtr /* k */, - char** /* buf */); -void -CopySwapButtonClass(ClientPtr /* client */, - ButtonClassPtr /* b */, - char** /* buf */); -int -CopySwapValuatorClass(ClientPtr /* client */, - ValuatorClassPtr /* v */, - char** /* buf */); +CopySwapClasses(ClientPtr /* client */, + DeviceIntPtr /* dev */, + CARD8* /* num_classes */, + char** /* classbuf */); + #endif /* LISTDEV_H */ diff --git a/dix/devices.c b/dix/devices.c index b42337820..2c6d3e1b1 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -79,6 +79,7 @@ SOFTWARE. #include #include "exglobals.h" #include "exevents.h" +#include "listdev.h" /* for CopySwapXXXClass */ /** @file * This file handles input device-related stuff. @@ -2314,9 +2315,50 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) */ if (!master) { + DeviceIntPtr it; /* current root window */ InitializeSprite(dev, dev->spriteInfo->sprite->spriteTrace[0]); dev->spriteInfo->spriteOwner = FALSE; + + /* the master may need to restore the original classes, search for a + * device that is still paired with our master. */ + for (it = inputInfo.devices; it; it = it->next) + if (!it->isMaster && it->u.master == master) + break; + + if (!it) /* no dev is paired with our master */ + { + ClassesPtr classes; + EventList event = { NULL, 0}; + char* classbuf; + + classes = master->devPrivates[MasterDevClassesPrivIdx].ptr; + master->key = classes->key; + master->valuator = classes->valuator; + master->button = classes->button; + master->focus = classes->focus; + master->proximity = classes->proximity; + master->absolute = classes->absolute; + master->kbdfeed = classes->kbdfeed; + master->ptrfeed = classes->ptrfeed; + master->intfeed = classes->intfeed; + master->stringfeed = classes->stringfeed; + master->bell = classes->bell; + master->leds = classes->leds; + + /* Send event to clients */ + CreateClassesChangedEvent(&event, master, master); + deviceClassesChangedEvent *dcce = + (deviceClassesChangedEvent*)event.event; + dcce->deviceid = master->id; + dcce->num_classes = 0; + classbuf = (char*)&event.event[1]; + CopySwapClasses(NullClient, master, &dcce->num_classes, &classbuf); + SendEventToAllWindows(master, XI_DeviceClassesChangedMask, + event.event, 1); + xfree(event.event); + } + } else dev->spriteInfo->sprite = master->spriteInfo->sprite; diff --git a/dix/getevents.c b/dix/getevents.c index 425b60234..e366d2223 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -111,7 +111,7 @@ key_autorepeats(DeviceIntPtr pDev, int key_code) (1 << (key_code & 7))); } -static void +void CreateClassesChangedEvent(EventList* event, DeviceIntPtr master, DeviceIntPtr slave) diff --git a/include/input.h b/include/input.h index d6a38e639..dbf6aee20 100644 --- a/include/input.h +++ b/include/input.h @@ -402,6 +402,9 @@ extern int GetMaximumEventsNum(void); extern EventListPtr InitEventList(int num_events); extern void FreeEventList(EventListPtr list, int num_events); +extern void CreateClassesChangedEvent(EventListPtr event, + DeviceIntPtr master, + DeviceIntPtr slave); extern int GetPointerEvents( EventListPtr events, DeviceIntPtr pDev, From 5a7a65a3c978a65e8ff39d0cc9878527ec42adc9 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 12 Nov 2007 12:37:39 +1030 Subject: [PATCH 252/634] mi: avoid SIGABRT by setting master_event to NULL. --- mi/mieq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mi/mieq.c b/mi/mieq.c index 7ea12fe8c..f0af4b0ba 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -363,7 +363,8 @@ mieqProcessInputEvents(void) { CopyGetMasterEvent(e->pDev->u.master, event, &master_event, e->nevents); - } + } else + master_event = NULL; /* process slave first, then master */ e->pDev->public.processInputProc(event, e->pDev, e->nevents); From 23365d28651f7942fdafb889bcbbd019470a4274 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 12 Nov 2007 13:08:38 +1030 Subject: [PATCH 253/634] dix: allow grab modifier device to be NULL. This can happen if we check for a passive core grab and our device is a floating slave device. Doesn't really change anything as SDs can't send core events but it stops the server from segfaulting. --- dix/events.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/dix/events.c b/dix/events.c index c3589f0c8..daebe3588 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3379,7 +3379,7 @@ CheckPassiveGrabsOnWindow( { #ifdef XKB DeviceIntPtr gdev; - XkbSrvInfoPtr xkbi; + XkbSrvInfoPtr xkbi = NULL; gdev= grab->modifierDevice; if (grab->coreGrab) @@ -3389,7 +3389,8 @@ CheckPassiveGrabsOnWindow( else gdev = device; } - xkbi= gdev->key->xkbInfo; + if (gdev) + xkbi= gdev->key->xkbInfo; #endif tempGrab.modifierDevice = grab->modifierDevice; if ((device == grab->modifierDevice) && @@ -3400,16 +3401,20 @@ CheckPassiveGrabsOnWindow( )) tempGrab.modifiersDetail.exact = #ifdef XKB - (noXkbExtension?gdev->key->prev_state:xkbi->state.grab_mods); + (noXkbExtension) ? + ((gdev) ? gdev->key->prev_state : 0) : + ((xkbi) ? xkbi->state.grab_mods : 0); #else - grab->modifierDevice->key->prev_state; + (gdev) ? gdev->key->prev_state : 0; #endif else tempGrab.modifiersDetail.exact = #ifdef XKB - (noXkbExtension ? gdev->key->state : xkbi->state.grab_mods); + (noXkbExtension) ? + ((gdev) ? gdev->key->state : 0) : + ((xkbi) ? xkbi->state.grab_mods : 0); #else - grab->modifierDevice->key->state; + (gdev) ? gdev->key->state : 0; #endif /* ignore the device for core events when comparing grabs */ if (GrabMatchesSecond(&tempGrab, grab, (xE->u.u.type < LASTEvent)) && From 70b4087c4dd1904d9d655f4afb9dfcea4f137f7a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 12 Nov 2007 13:10:39 +1030 Subject: [PATCH 254/634] dix: don't unconditionally update valuators during key events. Master may not have valuators, device may not have valuators. --- dix/getevents.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index e366d2223..d9adadf43 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -485,8 +485,11 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type, { CreateClassesChangedEvent(events, master, pDev); - pDev->valuator->lastx = master->valuator->lastx; - pDev->valuator->lasty = master->valuator->lasty; + if (master->valuator && pDev->valuator) + { + pDev->valuator->lastx = master->valuator->lastx; + pDev->valuator->lasty = master->valuator->lasty; + } master->u.lastSlave = pDev; numEvents++; events++; From 2b1d946392ce28b96941341778b2b526aa0fb126 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 13 Nov 2007 09:51:33 +1030 Subject: [PATCH 255/634] xkb: disable xkb key repeats (temporarily) Haven't quite figured out yet how to make these repeats work. Because we share the class between devices, the key state is already set when we process the master device's event, causing a repeat on each event. --- xkb/xkbPrKeyEv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xkb/xkbPrKeyEv.c b/xkb/xkbPrKeyEv.c index f007f75f2..147df3e4c 100644 --- a/xkb/xkbPrKeyEv.c +++ b/xkb/xkbPrKeyEv.c @@ -76,6 +76,7 @@ int xiEvent; if ((behavior.type&XkbKB_Permanent)==0) { switch (behavior.type) { case XkbKB_Default: +#if 0 if (( xE->u.u.type == KeyPress || xE->u.u.type == DeviceKeyPress) && (keyc->down[key>>3] & (1<<(key&7)))) { @@ -112,6 +113,7 @@ int xiEvent; XkbLastRepeatEvent= NULL; return; } +#endif break; case XkbKB_Lock: if ( xE->u.u.type == KeyRelease || From 51239f87ce42ad564ceee1761980391947294511 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 13 Nov 2007 11:26:16 +1030 Subject: [PATCH 256/634] dix: Send MappingNotify when keyboard maps change. If a slave device is attached to a master device, then we need to send a mapping notify to the client. Mapping notify needs to be sent if - different slave device but on same master - different master This gives you funny behaviour with the ClientPointer. When a MappingNotify is sent to the client, the client usually responds with a GetKeyboardMapping. This will retrieve the ClientPointer's keyboard mapping, regardless of which keyboard sent the last mapping notify request. So depending on the CP setting, your keyboard may change layout in each app... --- dix/getevents.c | 76 +++++++++++++++++++++++-------------------------- mi/mieq.c | 5 ++-- xkb/xkbUtils.c | 5 +++- 3 files changed, 42 insertions(+), 44 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index d9adadf43..b0211b61a 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -867,63 +867,57 @@ GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type, /** - * Note that pDev was the last device to send a core event. This function - * copies the complete keymap from the originating device to the core - * device, and makes sure the appropriate notifications are generated. + * pDev is the slave device that is about to send an event. If it is attached + * to a master device, then we need to send a mapping notify to the client. + * To do so, we need to remember the last master device that sent a mapping + * event. + * + * Mapping notify needs to be sent in the following cases: + * - different slave device on same master + * - different master * * Call this just before processInputProc. + * + * XXX: They way how the code is we also send a map notify if the slave device + * stays the same, but the master changes. This isn't really necessary though. + * + * XXX: this gives you funny behaviour with the ClientPointer. When a + * MappingNotify is sent to the client, the client usually responds with a + * GetKeyboardMapping. This will retrieve the ClientPointer's keyboard + * mapping, regardless of which keyboard sent the last mapping notify request. + * So depending on the CP setting, your keyboard may change layout in each + * app... */ _X_EXPORT void SwitchCoreKeyboard(DeviceIntPtr pDev) { - KeyClassPtr ckeyc = inputInfo.keyboard->key; + static DeviceIntPtr lastMapNotifyDevice = NULL; + DeviceIntPtr master; + KeyClassPtr ckeyc; int i = 0; + BOOL sendNotify = FALSE; - if (inputInfo.keyboard->devPrivates[CoreDevicePrivatesIndex].ptr != pDev) { - memcpy(ckeyc->modifierMap, pDev->key->modifierMap, MAP_LENGTH); - if (ckeyc->modifierKeyMap) - xfree(ckeyc->modifierKeyMap); - ckeyc->modifierKeyMap = xalloc(8 * pDev->key->maxKeysPerModifier); - memcpy(ckeyc->modifierKeyMap, pDev->key->modifierKeyMap, - (8 * pDev->key->maxKeysPerModifier)); + if (pDev->isMaster || !pDev->u.master) + return; - ckeyc->maxKeysPerModifier = pDev->key->maxKeysPerModifier; - ckeyc->curKeySyms.minKeyCode = pDev->key->curKeySyms.minKeyCode; - ckeyc->curKeySyms.maxKeyCode = pDev->key->curKeySyms.maxKeyCode; - SetKeySymsMap(&ckeyc->curKeySyms, &pDev->key->curKeySyms); + master = pDev->u.master; + ckeyc = master->key; - /* - * Copy state from the extended keyboard to core. If you omit this, - * holding Ctrl on keyboard one, and pressing Q on keyboard two, will - * cause your app to quit. This feels wrong to me, hence the below - * code. - * - * XXX: If you synthesise core modifier events, the state will get - * clobbered here. You'll have to work out something sensible - * to fix that. Good luck. - */ + if (master->devPrivates[CoreDevicePrivatesIndex].ptr != pDev) { + master->devPrivates[CoreDevicePrivatesIndex].ptr = pDev; + sendNotify = TRUE; + } -#define KEYBOARD_MASK (ShiftMask | LockMask | ControlMask | Mod1Mask | \ - Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask) - ckeyc->state &= ~(KEYBOARD_MASK); - ckeyc->state |= (pDev->key->state & KEYBOARD_MASK); -#undef KEYBOARD_MASK - for (i = 0; i < 8; i++) - ckeyc->modifierKeyCount[i] = pDev->key->modifierKeyCount[i]; - -#ifdef XKB - if (!noXkbExtension && pDev->key->xkbInfo && pDev->key->xkbInfo->desc) { - if (!XkbCopyKeymap(pDev->key->xkbInfo->desc, ckeyc->xkbInfo->desc, - True)) - FatalError("Couldn't pivot keymap from device to core!\n"); - } -#endif + if (lastMapNotifyDevice != master) + sendNotify = TRUE; + if (sendNotify) + { SendMappingNotify(pDev, MappingKeyboard, ckeyc->curKeySyms.minKeyCode, (ckeyc->curKeySyms.maxKeyCode - ckeyc->curKeySyms.minKeyCode), serverClient); - inputInfo.keyboard->devPrivates[CoreDevicePrivatesIndex].ptr = pDev; + lastMapNotifyDevice = master; } } diff --git a/mi/mieq.c b/mi/mieq.c index f0af4b0ba..11439cfac 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -335,8 +335,9 @@ mieqProcessInputEvents(void) if ((e->events->event[0].u.u.type == DeviceKeyPress || e->events->event[0].u.u.type == DeviceKeyRelease || e->events->event[0].u.u.type == KeyPress || - e->events->event[0].u.u.type == KeyRelease) && - e->pDev->coreEvents) { + e->events->event[0].u.u.type == KeyRelease) && + !e->pDev->isMaster) + { SwitchCoreKeyboard(e->pDev); } diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index e87064a42..d49a3c63d 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -935,7 +935,10 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) xkbMapNotify mn; xkbNewKeyboardNotify nkn; - if (!src || !dst || src == dst) + if (src == dst) + return TRUE; + + if (!src || !dst) return FALSE; /* client map */ From c703849e79391bb1bb01a994bb8d5cf2eb64e48b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 13 Nov 2007 16:50:18 +1030 Subject: [PATCH 257/634] dix: Attach spriteInfoRec to same memory block as the DeviceIntRec. No need to alloc a separate one, we never do anything special with it anyway. --- dix/devices.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 2c6d3e1b1..7841e642c 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -134,7 +134,7 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart) if (devid >= MAX_DEVICES) return (DeviceIntPtr)NULL; - dev = (DeviceIntPtr) xcalloc(sizeof(DeviceIntRec), 1); + dev = (DeviceIntPtr) xcalloc(sizeof(DeviceIntRec) + sizeof(SpriteInfoRec), 1); if (!dev) return (DeviceIntPtr)NULL; dev->name = (char *)NULL; @@ -183,9 +183,7 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart) dev->enabled = FALSE; /* sprite defaults */ - dev->spriteInfo = (SpriteInfoPtr)xcalloc(sizeof(SpriteInfoRec), 1); - if (!dev->spriteInfo) - return (DeviceIntPtr)NULL; + dev->spriteInfo = (SpriteInfoPtr)&dev[1]; dev->spriteInfo->sprite = NULL; dev->spriteInfo->spriteOwner = FALSE; @@ -757,7 +755,6 @@ CloseDevice(DeviceIntPtr dev) xfree(dev->devPrivates); xfree(dev->deviceGrab.sync.event); - xfree(dev->spriteInfo); xfree(dev); } From 5031238aad2b6b7511aab0f9d15edfbdd2b4cce7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 13 Nov 2007 16:58:23 +1030 Subject: [PATCH 258/634] dix: remove trailing/wrong whitespaces from devices.c and events.c --- dix/devices.c | 140 +++++------ dix/events.c | 666 +++++++++++++++++++++++++------------------------- 2 files changed, 403 insertions(+), 403 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 7841e642c..fa80a0c32 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -27,13 +27,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -203,7 +203,7 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart) * * A master pointer device needs to be enabled before a master keyboard * device. - * + * * @param The device to be enabled. * @return TRUE on success or FALSE otherwise. */ @@ -300,7 +300,7 @@ DisableDevice(DeviceIntPtr dev) { if (other->spriteInfo->paired == dev) { - ErrorF("[dix] cannot disable device, still paired. " + ErrorF("[dix] cannot disable device, still paired. " "This is a bug. \n"); return FALSE; } @@ -316,7 +316,7 @@ DisableDevice(DeviceIntPtr dev) /* float attached devices */ if (dev->isMaster) { - for (other = inputInfo.devices; other; other = other->next) + for (other = inputInfo.devices; other; other = other->next) { if (other->u.master == dev) AttachDevice(NULL, dev, NULL); @@ -337,7 +337,7 @@ DisableDevice(DeviceIntPtr dev) /** * Initialise a new device through the driver and tell all clients about the * new device. - * + * * Must be called before EnableDevice. * The device will NOT send events until it is enabled! * @@ -360,7 +360,7 @@ ActivateDevice(DeviceIntPtr dev) /* Initialize memory for sprites. */ if (dev->isMaster && dev->spriteInfo->spriteOwner) pScreen->DeviceCursorInitialize(dev, pScreen); - + ev.type = DevicePresenceNotify; ev.time = currentTime.milliseconds; ev.devchange = DeviceAdded; @@ -391,7 +391,7 @@ CoreKeyboardCtl(DeviceIntPtr pDev, KeybdCtrl *ctrl) } /** - * Device control function for the Virtual Core Keyboard. + * Device control function for the Virtual Core Keyboard. */ static int CoreKeyboardProc(DeviceIntPtr pDev, int what) @@ -475,7 +475,7 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what) /** * Device control function for the Virtual Core Pointer. - * + * * Aside from initialisation, it backs up the original device classes into the * devicePrivates. This only needs to be done for master devices. */ @@ -492,7 +492,7 @@ CorePointerProc(DeviceIntPtr pDev, int what) if (MasterDevClassesPrivIdx == -1) MasterDevClassesPrivIdx = AllocateDevicePrivateIndex(); - if (!AllocateDevicePrivate(pDev, MasterDevClassesPrivIdx) || + if (!AllocateDevicePrivate(pDev, MasterDevClassesPrivIdx) || !(classes = xcalloc(1, sizeof(ClassesRec)))) return BadAlloc; @@ -553,8 +553,8 @@ InitCoreDevices(void) CoreDevicePrivatesGeneration = serverGeneration; } - if (AllocMasterDevice("Virtual core", - &inputInfo.pointer, + if (AllocMasterDevice("Virtual core", + &inputInfo.pointer, &inputInfo.keyboard) == BadAlloc) FatalError("Failed to allocate core devices"); @@ -573,14 +573,14 @@ InitCoreDevices(void) /** * Activate all switched-off devices and then enable all those devices. - * + * * Will return an error if no core keyboard or core pointer is present. * In theory this should never happen if you call InitCoreDevices() first. * * InitAndStartDevices needs to be called AFTER the windows are initialized. * Devices will start sending events after InitAndStartDevices() has * completed. - * + * * @return Success or error code on failure. */ int @@ -621,7 +621,7 @@ InitAndStartDevices(WindowPtr root) } /** - * Close down a device and free all resources. + * Close down a device and free all resources. * Once closed down, the driver will probably not expect you that you'll ever * enable it again and free associated structs. If you want the device to just * be disabled, DisableDevice(). @@ -654,7 +654,7 @@ CloseDevice(DeviceIntPtr dev) if (dev->isMaster) classes = (ClassesPtr)dev->devPrivates[MasterDevClassesPrivIdx].ptr; - else + else classes = (ClassesPtr)&dev->key; if (classes->key) { @@ -704,7 +704,7 @@ CloseDevice(DeviceIntPtr dev) pnext = p->next; xfree(p); } - + for (i = classes->intfeed; i; i = inext) { inext = i->next; xfree(i); @@ -735,7 +735,7 @@ CloseDevice(DeviceIntPtr dev) while (dev->xkb_interest) XkbRemoveResourceClient((DevicePtr)dev,dev->xkb_interest->resource); #endif - + if (DevHasCursor(dev)) { xfree(dev->spriteInfo->sprite->spriteTrace); xfree(dev->spriteInfo->sprite); @@ -759,7 +759,7 @@ CloseDevice(DeviceIntPtr dev) } /** - * Shut down all devices, free all resources, etc. + * Shut down all devices, free all resources, etc. * Only useful if you're shutting down the server! */ void @@ -788,7 +788,7 @@ CloseDownDevices(void) * Remove the cursor sprite for all devices. This needs to be done before any * resources are freed or any device is deleted. */ -void +void UndisplayDevices() { DeviceIntPtr dev; @@ -802,7 +802,7 @@ UndisplayDevices() /** * Remove a device from the device list, closes it and thus frees all - * resources. + * resources. * Removes both enabled and disabled devices and notifies all devices about * the removal of the device. */ @@ -855,7 +855,7 @@ RemoveDevice(DeviceIntPtr dev) ret = Success; } } - + if (ret == Success) { inputInfo.numDevices--; ev.type = DevicePresenceNotify; @@ -873,7 +873,7 @@ RemoveDevice(DeviceIntPtr dev) int NumMotionEvents(void) { - /* only called to fill data in initial connection reply. + /* only called to fill data in initial connection reply. * VCP is ok here, it is the only fixed device we have. */ return inputInfo.pointer->valuator->numMotionEvents; } @@ -1023,7 +1023,7 @@ InitKeyClassDeviceStruct(DeviceIntPtr dev, KeySymsPtr pKeySyms, CARD8 pModifiers { int i; KeyClassPtr keyc; - + keyc = (KeyClassPtr)xalloc(sizeof(KeyClassRec)); if (!keyc) return FALSE; @@ -1058,7 +1058,7 @@ InitKeyClassDeviceStruct(DeviceIntPtr dev, KeySymsPtr pKeySyms, CARD8 pModifiers } _X_EXPORT Bool -InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, +InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, CARD8 *map) { ButtonClassPtr butc; @@ -1082,8 +1082,8 @@ InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, } _X_EXPORT Bool -InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, - ValuatorMotionProcPtr motionProc, +InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, + ValuatorMotionProcPtr motionProc, int numMotionEvents, int mode) { int i; @@ -1176,7 +1176,7 @@ InitFocusClassDeviceStruct(DeviceIntPtr dev) } _X_EXPORT Bool -InitKbdFeedbackClassDeviceStruct(DeviceIntPtr dev, BellProcPtr bellProc, +InitKbdFeedbackClassDeviceStruct(DeviceIntPtr dev, BellProcPtr bellProc, KbdCtrlProcPtr controlProc) { KbdFeedbackPtr feedc; @@ -1240,7 +1240,7 @@ static IntegerCtrl defaultIntegerControl = { _X_EXPORT Bool InitStringFeedbackClassDeviceStruct ( - DeviceIntPtr dev, StringCtrlProcPtr controlProc, + DeviceIntPtr dev, StringCtrlProcPtr controlProc, int max_symbols, int num_symbols_supported, KeySym *symbols) { int i; @@ -1253,9 +1253,9 @@ InitStringFeedbackClassDeviceStruct ( feedc->ctrl.num_symbols_supported = num_symbols_supported; feedc->ctrl.num_symbols_displayed = 0; feedc->ctrl.max_symbols = max_symbols; - feedc->ctrl.symbols_supported = (KeySym *) + feedc->ctrl.symbols_supported = (KeySym *) xalloc (sizeof (KeySym) * num_symbols_supported); - feedc->ctrl.symbols_displayed = (KeySym *) + feedc->ctrl.symbols_displayed = (KeySym *) xalloc (sizeof (KeySym) * max_symbols); if (!feedc->ctrl.symbols_supported || !feedc->ctrl.symbols_displayed) { @@ -1279,7 +1279,7 @@ InitStringFeedbackClassDeviceStruct ( } _X_EXPORT Bool -InitBellFeedbackClassDeviceStruct (DeviceIntPtr dev, BellProcPtr bellProc, +InitBellFeedbackClassDeviceStruct (DeviceIntPtr dev, BellProcPtr bellProc, BellCtrlProcPtr controlProc) { BellFeedbackPtr feedc; @@ -1338,8 +1338,8 @@ InitIntegerFeedbackClassDeviceStruct (DeviceIntPtr dev, IntegerCtrlProcPtr contr } _X_EXPORT Bool -InitPointerDeviceStruct(DevicePtr device, CARD8 *map, int numButtons, - ValuatorMotionProcPtr motionProc, +InitPointerDeviceStruct(DevicePtr device, CARD8 *map, int numButtons, + ValuatorMotionProcPtr motionProc, PtrCtrlProcPtr controlProc, int numMotionEvents, int numAxes) { @@ -1352,9 +1352,9 @@ InitPointerDeviceStruct(DevicePtr device, CARD8 *map, int numButtons, } _X_EXPORT Bool -InitKeyboardDeviceStruct(DevicePtr device, KeySymsPtr pKeySyms, - CARD8 pModifiers[], BellProcPtr bellProc, - KbdCtrlProcPtr controlProc) +InitKeyboardDeviceStruct(DevicePtr device, KeySymsPtr pKeySyms, + CARD8 pModifiers[], BellProcPtr bellProc, + KbdCtrlProcPtr controlProc) { DeviceIntPtr dev = (DeviceIntPtr)device; @@ -1525,13 +1525,13 @@ DoSetModifierMapping(ClientPtr client, KeyCode *inputMap, return Success; } -int +int ProcSetModifierMapping(ClientPtr client) { xSetModifierMappingReply rep; DeviceIntPtr dev; REQUEST(xSetModifierMappingReq); - + REQUEST_AT_LEAST_SIZE(xSetModifierMappingReq); if (client->req_len != ((stuff->numKeyPerModifier << 1) + @@ -1583,7 +1583,7 @@ ProcChangeKeyboardMapping(ClientPtr client) DeviceIntPtr pDev = NULL; REQUEST_AT_LEAST_SIZE(xChangeKeyboardMappingReq); - len = client->req_len - (sizeof(xChangeKeyboardMappingReq) >> 2); + len = client->req_len - (sizeof(xChangeKeyboardMappingReq) >> 2); if (len != (stuff->keyCodes * stuff->keySymsPerKeyCode)) return BadLength; @@ -1671,7 +1671,7 @@ ProcSetPointerMapping(ClientPtr client) rep.sequenceNumber = client->sequence; rep.success = MappingSuccess; map = (BYTE *)&stuff[1]; - + /* So we're bounded here by the number of core buttons. This check * probably wants disabling through XFixes. */ /* MPX: With ClientPointer, we can return the right number of buttons. @@ -1750,7 +1750,7 @@ ProcGetPointerMapping(ClientPtr client) rep.length = ((unsigned)rep.nElts + (4-1))/4; WriteReplyToClient(client, sizeof(xGetPointerMappingReply), &rep); (void)WriteToClient(client, (int)rep.nElts, (char *)&butc->map[1]); - return Success; + return Success; } void @@ -1790,7 +1790,7 @@ DoChangeKeyboardControl (ClientPtr client, DeviceIntPtr keybd, XID *vlist, index2 = (BITS32) lowbit (vmask); vmask &= ~index2; switch (index2) { - case KBKeyClickPercent: + case KBKeyClickPercent: t = (INT8)*vlist; vlist++; if (t == -1) { @@ -1940,7 +1940,7 @@ DoChangeKeyboardControl (ClientPtr client, DeviceIntPtr keybd, XID *vlist, return Success; #undef DO_ALL -} +} int ProcChangeKeyboardControl (ClientPtr client) @@ -2000,7 +2000,7 @@ ProcGetKeyboardControl (ClientPtr client) rep.map[i] = ctrl->autoRepeats[i]; WriteReplyToClient(client, sizeof(xGetKeyboardControlReply), &rep); return Success; -} +} int ProcBell(ClientPtr client) @@ -2013,7 +2013,7 @@ ProcBell(ClientPtr client) if (!keybd->kbdfeed->BellProc) return BadDevice; - + if (stuff->percent < -100 || stuff->percent > 100) { client->errorValue = stuff->percent; return BadValue; @@ -2023,7 +2023,7 @@ ProcBell(ClientPtr client) if (stuff->percent < 0) newpercent = base + newpercent; else - newpercent = base - newpercent + stuff->percent; + newpercent = base - newpercent + stuff->percent; for (keybd = inputInfo.devices; keybd; keybd = keybd->next) { if ((keybd->coreEvents || keybd == inputInfo.keyboard) && @@ -2040,7 +2040,7 @@ ProcBell(ClientPtr client) } return Success; -} +} int ProcChangePointerControl(ClientPtr client) @@ -2050,10 +2050,10 @@ ProcChangePointerControl(ClientPtr client) REQUEST(xChangePointerControlReq); REQUEST_SIZE_MATCH(xChangePointerControlReq); - + if (!mouse->ptrfeed->CtrlProc) return BadDevice; - + ctrl = mouse->ptrfeed->ctrl; if ((stuff->doAccel != xTrue) && (stuff->doAccel != xFalse)) { client->errorValue = stuff->doAccel; @@ -2109,7 +2109,7 @@ ProcChangePointerControl(ClientPtr client) } return Success; -} +} int ProcGetPointerControl(ClientPtr client) @@ -2231,17 +2231,17 @@ ProcQueryKeymap(ClientPtr client) bzero((char *)&rep.map[0], 32); WriteReplyToClient(client, sizeof(xQueryKeymapReply), &rep); - + return Success; } /* Pair the keyboard to the pointer device. Keyboard events will follow the - * pointer sprite. Only applicable for master devices. + * pointer sprite. Only applicable for master devices. * If the client is set, the request to pair comes from some client. In this * case, we need to check for access. If the client is NULL, it's from an * internal automatic pairing, we must always permit this. */ -int +int PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd) { if (!ptr) @@ -2277,15 +2277,15 @@ PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd) * Client is set to the client that issued the request, or NULL if it comes * from some internal automatic pairing. * - * Master may be NULL to set the device floating. + * Master may be NULL to set the device floating. * * We don't allow multi-layer hierarchies right now. You can't attach a slave - * to another slave. + * to another slave. */ int AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) { - if (!dev || dev->isMaster) + if (!dev || dev->isMaster) return BadDevice; if (master && !master->isMaster) /* can't attach to slaves */ @@ -2345,13 +2345,13 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) /* Send event to clients */ CreateClassesChangedEvent(&event, master, master); - deviceClassesChangedEvent *dcce = + deviceClassesChangedEvent *dcce = (deviceClassesChangedEvent*)event.event; dcce->deviceid = master->id; dcce->num_classes = 0; classbuf = (char*)&event.event[1]; CopySwapClasses(NullClient, master, &dcce->num_classes, &classbuf); - SendEventToAllWindows(master, XI_DeviceClassesChangedMask, + SendEventToAllWindows(master, XI_DeviceClassesChangedMask, event.event, 1); xfree(event.event); } @@ -2380,7 +2380,7 @@ GetPairedDevice(DeviceIntPtr dev) } /* - * Register a client to be able to pair devices. + * Register a client to be able to pair devices. */ Bool RegisterPairingClient(ClientPtr client) @@ -2398,22 +2398,22 @@ RegisterPairingClient(ClientPtr client) /* * Unregister pairing client; */ -Bool +Bool UnregisterPairingClient(ClientPtr client) { - if (pairingClient) + if (pairingClient) { if ( pairingClient == client) { pairingClient = NULL; - } else + } else return False; } return True; } /* Guess a pointer that could be a good one for pairing. Any pointer that is - * not yet paired with keyboard is considered a good one. + * not yet paired with keyboard is considered a good one. * If no pointer is found, the last real pointer is chosen. If that doesn't * work either, we take the core pointer. */ @@ -2422,7 +2422,7 @@ GuessFreePointerDevice() { DeviceIntPtr it, it2; DeviceIntPtr lastRealPtr = NULL; - + it = inputInfo.devices; while(it) @@ -2436,7 +2436,7 @@ GuessFreePointerDevice() while(it2) { /* something paired with it? */ - if (it != it2 && + if (it != it2 && it2->spriteInfo->sprite == it->spriteInfo->sprite) break; @@ -2458,8 +2458,8 @@ NextFreePointerDevice() { DeviceIntPtr dev; for (dev = inputInfo.devices; dev; dev = dev->next) - if (dev->isMaster && - dev->spriteInfo->spriteOwner && + if (dev->isMaster && + dev->spriteInfo->spriteOwner && !dev->spriteInfo->paired) return dev; return NULL; diff --git a/dix/events.c b/dix/events.c index daebe3588..88ce50179 100644 --- a/dix/events.c +++ b/dix/events.c @@ -27,13 +27,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -107,7 +107,7 @@ of the copyright holder. ******************************************************************/ -/* +/* * MPX additions * Copyright 2006 by Peter Hutterer * Author: Peter Hutterer @@ -239,22 +239,22 @@ static int DontPropagateRefCnts[DNPMCOUNT]; /** - * Main input device struct. - * inputInfo.pointer + * Main input device struct. + * inputInfo.pointer * is the core pointer. Referred to as "virtual core pointer", "VCP", * "core pointer" or inputInfo.pointer. There is exactly one core pointer, * but multiple devices may send core events. The VCP is only used if no - * physical device is connected and does not have a visible cursor. + * physical device is connected and does not have a visible cursor. * Before the integration of MPX, any core request would operate on the * VCP/VCK. Core events would always come from one of those two. Now both * are only fallback devices if no physical devices are available. - * + * * inputInfo.keyboard * is the core keyboard ("virtual core keyboard", "VCK", "core keyboard"). * See inputInfo.pointer. - * + * * inputInfo.devices - * linked list containing all devices BUT NOT INCLUDING VCK and VCP. + * linked list containing all devices BUT NOT INCLUDING VCK and VCP. * * inputInfo.off_devices * Devices that have not been initialized and are thus turned off. @@ -316,12 +316,12 @@ XItoCoreType(int xitype) return coretype; } -/** +/** * True if device owns a cursor, false if device shares a cursor sprite with * another device. */ _X_EXPORT Bool -DevHasCursor(DeviceIntPtr pDev) +DevHasCursor(DeviceIntPtr pDev) { return pDev->spriteInfo->spriteOwner; } @@ -352,11 +352,11 @@ _X_EXPORT HotSpot xeviehot; #endif static void DoEnterLeaveEvents( - DeviceIntPtr pDev, + DeviceIntPtr pDev, WindowPtr fromWin, WindowPtr toWin, int mode -); +); static WindowPtr XYToWindow( DeviceIntPtr pDev, @@ -416,9 +416,9 @@ static Mask filters[128] = }; -/** +/** * same principle as filters, but one set of filters for each extension. - * The extension is responsible for setting the filters by calling + * The extension is responsible for setting the filters by calling * SetGenericFilter(). */ static Mask* generic_filters[MAXEXTENSIONS]; @@ -441,8 +441,8 @@ static void PostNewCursor(DeviceIntPtr pDev); static Bool XineramaSetCursorPosition( DeviceIntPtr pDev, - int x, - int y, + int x, + int y, Bool generateEvent ){ ScreenPtr pScreen; @@ -451,7 +451,7 @@ XineramaSetCursorPosition( SpritePtr pSprite = pDev->spriteInfo->sprite; /* x,y are in Screen 0 coordinates. We need to decide what Screen - to send the message too and what the coordinates relative to + to send the message too and what the coordinates relative to that screen are. */ pScreen = pSprite->screen; @@ -459,11 +459,11 @@ XineramaSetCursorPosition( y += panoramiXdataPtr[0].y; if(!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum], - x, y, &box)) + x, y, &box)) { - FOR_NSCREENS(i) + FOR_NSCREENS(i) { - if(i == pScreen->myNum) + if(i == pScreen->myNum) continue; if(POINT_IN_REGION(pScreen, &XineramaScreenRegions[i], x, y, &box)) { @@ -514,7 +514,7 @@ XineramaCheckPhysLimits( if (!cursor) return; - + new = pSprite->hotPhys; /* I don't care what the DDX has to say about it */ @@ -553,7 +553,7 @@ XineramaSetWindowPntrs(DeviceIntPtr pDev, WindowPtr pWin) SpritePtr pSprite = pDev->spriteInfo->sprite; if(pWin == WindowTable[0]) { - memcpy(pSprite->windows, WindowTable, + memcpy(pSprite->windows, WindowTable, PanoramiXNumScreens*sizeof(WindowPtr)); } else { PanoramiXRes *win; @@ -577,7 +577,7 @@ static void XineramaCheckVirtualMotion( DeviceIntPtr pDev, QdEventPtr qe, - WindowPtr pWin) + WindowPtr pWin) { SpritePtr pSprite = pDev->spriteInfo->sprite; @@ -598,9 +598,9 @@ XineramaCheckVirtualMotion( return; i = PanoramiXNumScreens - 1; - - REGION_COPY(pSprite->screen, &pSprite->Reg2, - &pSprite->windows[i]->borderSize); + + REGION_COPY(pSprite->screen, &pSprite->Reg2, + &pSprite->windows[i]->borderSize); off_x = panoramiXdataPtr[i].x; off_y = panoramiXdataPtr[i].y; @@ -610,8 +610,8 @@ XineramaCheckVirtualMotion( if(x || y) REGION_TRANSLATE(pSprite->screen, &pSprite->Reg2, x, y); - - REGION_UNION(pSprite->screen, &pSprite->Reg2, &pSprite->Reg2, + + REGION_UNION(pSprite->screen, &pSprite->Reg2, &pSprite->Reg2, &pSprite->windows[i]->borderSize); off_x = panoramiXdataPtr[i].x; @@ -629,8 +629,8 @@ XineramaCheckVirtualMotion( else if (pSprite->hot.y >= lims.y2) pSprite->hot.y = lims.y2 - 1; - if (REGION_NUM_RECTS(&pSprite->Reg2) > 1) - ConfineToShape(pDev, &pSprite->Reg2, + if (REGION_NUM_RECTS(&pSprite->Reg2) > 1) + ConfineToShape(pDev, &pSprite->Reg2, &pSprite->hot.x, &pSprite->hot.y); if (qe) @@ -658,7 +658,7 @@ XineramaCheckMotion(xEvent *xE, DeviceIntPtr pDev) if (xE && !syncEvents.playingEvents) { /* Motion events entering DIX get translated to Screen 0 - coordinates. Replayed events have already been + coordinates. Replayed events have already been translated since they've entered DIX before */ XE_KBPTR.rootX += panoramiXdataPtr[pSprite->screen->myNum].x - panoramiXdataPtr[0].x; @@ -675,7 +675,7 @@ XineramaCheckMotion(xEvent *xE, DeviceIntPtr pDev) else if (pSprite->hot.y >= pSprite->physLimits.y2) pSprite->hot.y = pSprite->physLimits.y2 - 1; - if (pSprite->hotShape) + if (pSprite->hotShape) ConfineToShape(pDev, pSprite->hotShape, &pSprite->hot.x, &pSprite->hot.y); pSprite->hotPhys = pSprite->hot; @@ -702,7 +702,7 @@ XineramaCheckMotion(xEvent *xE, DeviceIntPtr pDev) if (!xE) UpdateCurrentTimeIf(); DoEnterLeaveEvents(pDev, prevSpriteWin, pSprite->win, - NotifyNormal); + NotifyNormal); } PostNewCursor(pDev); return FALSE; @@ -712,8 +712,8 @@ XineramaCheckMotion(xEvent *xE, DeviceIntPtr pDev) static void -XineramaConfineCursorToWindow(DeviceIntPtr pDev, - WindowPtr pWin, +XineramaConfineCursorToWindow(DeviceIntPtr pDev, + WindowPtr pWin, Bool generateEvents) { SpritePtr pSprite = pDev->spriteInfo->sprite; @@ -731,9 +731,9 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev, return; i = PanoramiXNumScreens - 1; - - REGION_COPY(pSprite->screen, &pSprite->Reg1, - &pSprite->windows[i]->borderSize); + + REGION_COPY(pSprite->screen, &pSprite->Reg1, + &pSprite->windows[i]->borderSize); off_x = panoramiXdataPtr[i].x; off_y = panoramiXdataPtr[i].y; @@ -743,8 +743,8 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev, if(x || y) REGION_TRANSLATE(pSprite->screen, &pSprite->Reg1, x, y); - - REGION_UNION(pSprite->screen, &pSprite->Reg1, &pSprite->Reg1, + + REGION_UNION(pSprite->screen, &pSprite->Reg1, &pSprite->Reg1, &pSprite->windows[i]->borderSize); off_x = panoramiXdataPtr[i].x; @@ -757,12 +757,12 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev, pSprite->hotShape = &pSprite->Reg1; else pSprite->hotShape = NullRegion; - + pSprite->confined = FALSE; pSprite->confineWin = (pWin == WindowTable[0]) ? NullWindow : pWin; XineramaCheckPhysLimits(pDev, pSprite->current, - generateEvents); + generateEvents); } } @@ -777,7 +777,7 @@ XineramaChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) if ((pSprite->current->bits->xhot != cursor->bits->xhot) || (pSprite->current->bits->yhot != cursor->bits->yhot)) XineramaCheckPhysLimits(pDev, cursor, FALSE); - (*pSprite->screen->DisplayCursor)(pDev, pSprite->screen, cursor); + (*pSprite->screen->DisplayCursor)(pDev, pSprite->screen, cursor); FreeCursor(pSprite->current, (Cursor)0); pSprite->current = cursor; pSprite->current->refcnt++; @@ -823,7 +823,7 @@ ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py) BoxRec box; int x = *px, y = *py; int incx = 1, incy = 1; - SpritePtr pSprite; + SpritePtr pSprite; pSprite = pDev->spriteInfo->sprite; if (POINT_IN_REGION(pSprite->hot.pScreen, shape, x, y, &box)) @@ -858,7 +858,7 @@ ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py) static void CheckPhysLimits( - DeviceIntPtr pDev, + DeviceIntPtr pDev, CursorPtr cursor, Bool generateEvents, Bool confineToScreen, @@ -890,15 +890,15 @@ CheckPhysLimits( new.y = pSprite->physLimits.y2 - 1; #ifdef SHAPE if (pSprite->hotShape) - ConfineToShape(pDev, pSprite->hotShape, &new.x, &new.y); + ConfineToShape(pDev, pSprite->hotShape, &new.x, &new.y); #endif if ((pScreen != pSprite->hotPhys.pScreen) || (new.x != pSprite->hotPhys.x) || (new.y != pSprite->hotPhys.y)) { if (pScreen != pSprite->hotPhys.pScreen) pSprite->hotPhys = new; - (*pScreen->SetCursorPosition) - (pDev, pScreen, new.x, new.y, generateEvents); + (*pScreen->SetCursorPosition) + (pDev, pScreen, new.x, new.y, generateEvents); if (!generateEvents) SyntheticMotion(pDev, new.x, new.y); } @@ -945,7 +945,7 @@ CheckVirtualMotion( pSprite->hot.y = lims.y2 - 1; #ifdef SHAPE if (wBoundingShape(pWin)) - ConfineToShape(pDev, &pWin->borderSize, + ConfineToShape(pDev, &pWin->borderSize, &pSprite->hot.x, &pSprite->hot.y); #endif if (qe) @@ -972,7 +972,7 @@ ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, Bo if(!noPanoramiXExtension) { XineramaConfineCursorToWindow(pDev, pWin, generateEvents); return; - } + } #endif if (syncEvents.playingEvents) @@ -1033,7 +1033,7 @@ ChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) } /** - * @returns true if b is a descendent of a + * @returns true if b is a descendent of a */ Bool IsParent(WindowPtr a, WindowPtr b) @@ -1046,7 +1046,7 @@ IsParent(WindowPtr a, WindowPtr b) /** * Update the cursor displayed on the screen. * - * Called whenever a cursor may have changed shape or position. + * Called whenever a cursor may have changed shape or position. */ static void PostNewCursor(DeviceIntPtr pDev) @@ -1074,7 +1074,7 @@ PostNewCursor(DeviceIntPtr pDev) win = pSprite->win; for (; win; win = win->parent) { - if (win->optional) + if (win->optional) { pCursor = WindowGetDeviceCursor(win, pDev); if (!pCursor && win->optional->cursor != NullCursor) @@ -1173,16 +1173,16 @@ NoticeEventTime(xEvent *xE) **************************************************************************/ /** - * EnqueueEvent is a device's processInputProc if a device is frozen. + * EnqueueEvent is a device's processInputProc if a device is frozen. * Instead of delivering the events to the client, the event is tacked onto a * linked list for later delivery. */ void EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) { - QdEventPtr tail = *syncEvents.pendtail; - QdEventPtr qe; - SpritePtr pSprite = device->spriteInfo->sprite; + QdEventPtr tail = *syncEvents.pendtail; + QdEventPtr qe; + SpritePtr pSprite = device->spriteInfo->sprite; int eventlen; @@ -1190,7 +1190,7 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) #ifdef XKB /* Fix for key repeating bug. */ - if (device->key != NULL && device->key->xkbInfo != NULL && + if (device->key != NULL && device->key->xkbInfo != NULL && xE->u.u.type == KeyRelease) AccessXCancelRepeatKey(device->key->xkbInfo, xE->u.u.detail); #endif @@ -1271,9 +1271,9 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) /** * Run through the list of events queued up in syncEvents. - * For each event do: + * For each event do: * If the device for this event is not frozen anymore, take it and process it - * as usually. + * as usually. * After that, check if there's any devices in the list that are not frozen. * If there is none, we're done. If there is at least one device that is not * frozen, then re-run from the beginning of the event queue. @@ -1315,11 +1315,11 @@ PlayReleasedEvents(void) to the DIX layer */ /* XXX: we can't do that for generic events */ if(!noPanoramiXExtension) { - qe->event->u.keyButtonPointer.rootX += - panoramiXdataPtr[0].x - + qe->event->u.keyButtonPointer.rootX += + panoramiXdataPtr[0].x - panoramiXdataPtr[pDev->spriteInfo->sprite->screen->myNum].x; - qe->event->u.keyButtonPointer.rootY += - panoramiXdataPtr[0].y - + qe->event->u.keyButtonPointer.rootY += + panoramiXdataPtr[0].y - panoramiXdataPtr[pDev->spriteInfo->sprite->screen->myNum].y; } #endif @@ -1336,7 +1336,7 @@ PlayReleasedEvents(void) } else prev = &qe->next; - } + } } /** @@ -1378,7 +1378,7 @@ ComputeFreezes(void) BOOL sendCore; for (dev = inputInfo.devices; dev; dev = dev->next) - FreezeThaw(dev, dev->deviceGrab.sync.other || + FreezeThaw(dev, dev->deviceGrab.sync.other || (dev->deviceGrab.sync.state >= FROZEN)); if (syncEvents.playingEvents || (!replayDev && !syncEvents.pending)) return; @@ -1412,7 +1412,7 @@ ComputeFreezes(void) core = *xE; core.u.u.type = XItoCoreType(xE->u.u.type); /* * XXX: Not sure if this is correct: we need to - * check inferior windows for core passive grabs. + * check inferior windows for core passive grabs. */ if (CheckDeviceGrabs(replayDev, &core, i+1, 1)) { @@ -1458,12 +1458,12 @@ playmore: { if (DevHasCursor(dev)) { - /* the following may have been skipped during replay, + /* the following may have been skipped during replay, so do it now */ if ((grab = dev->deviceGrab.grab) && grab->confineTo) { if (grab->confineTo->drawable.pScreen != - dev->spriteInfo->sprite->hotPhys.pScreen) + dev->spriteInfo->sprite->hotPhys.pScreen) dev->spriteInfo->sprite->hotPhys.x = dev->spriteInfo->sprite->hotPhys.y = 0; ConfineCursorToWindow(dev, grab->confineTo, TRUE, TRUE); @@ -1491,13 +1491,13 @@ ScreenRestructured (ScreenPtr pScreen) * worry about it. */ if ((grab = pDev->deviceGrab.grab) && grab->confineTo) { - if (grab->confineTo->drawable.pScreen + if (grab->confineTo->drawable.pScreen != pDev->spriteInfo->sprite->hotPhys.pScreen) pDev->spriteInfo->sprite->hotPhys.x = pDev->spriteInfo->sprite->hotPhys.y = 0; ConfineCursorToWindow(pDev, grab->confineTo, TRUE, TRUE); } else - ConfineCursorToWindow(pDev, + ConfineCursorToWindow(pDev, WindowTable[pDev->spriteInfo->sprite->hotPhys.pScreen->myNum], TRUE, FALSE); } @@ -1521,7 +1521,7 @@ CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode) thisDev->deviceGrab.sync.other = NullGrab; } /* XXX: other should only work on the paired keyboard, not on all other - devices + devices */ for (dev = inputInfo.devices; dev; dev = dev->next) { @@ -1591,25 +1591,25 @@ RestoreOldMaster(DeviceIntPtr dev) /** * Activate a pointer grab on the given device. A pointer grab will cause all - * core pointer events of this device to be delivered to the grabbing client only. + * core pointer events of this device to be delivered to the grabbing client only. * No other device will send core events to the grab client while the grab is * on, but core events will be sent to other clients. * Can cause the cursor to change if a grab cursor is set. - * + * * Note that parameter autoGrab may be (True & ImplicitGrabMask) if the grab * is an implicit grab caused by a ButtonPress event. - * + * * @param mouse The device to grab. * @param grab The grab structure, needs to be setup. * @param autoGrab True if the grab was caused by a button down event and not - * explicitely by a client. + * explicitely by a client. */ void -ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, +ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, TimeStamp time, Bool autoGrab) { GrabInfoPtr grabinfo = &mouse->deviceGrab; - WindowPtr oldWin = (grabinfo->grab) ? + WindowPtr oldWin = (grabinfo->grab) ? grabinfo->grab->window : mouse->spriteInfo->sprite->win; Bool isPassive = autoGrab & ~ImplicitGrabMask; @@ -1623,9 +1623,9 @@ ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, if (grab->confineTo) { - if (grab->confineTo->drawable.pScreen + if (grab->confineTo->drawable.pScreen != mouse->spriteInfo->sprite->hotPhys.pScreen) - mouse->spriteInfo->sprite->hotPhys.x = + mouse->spriteInfo->sprite->hotPhys.x = mouse->spriteInfo->sprite->hotPhys.y = 0; ConfineCursorToWindow(mouse, grab->confineTo, FALSE, TRUE); } @@ -1666,7 +1666,7 @@ DeactivatePointerGrab(DeviceIntPtr mouse) if (dev->deviceGrab.sync.other == grab) dev->deviceGrab.sync.other = NullGrab; } - DoEnterLeaveEvents(mouse, grab->window, + DoEnterLeaveEvents(mouse, grab->window, mouse->spriteInfo->sprite->win, NotifyUngrab); if (grab->confineTo) ConfineCursorToWindow(mouse, RootWindow(mouse), FALSE, FALSE); @@ -1681,7 +1681,7 @@ DeactivatePointerGrab(DeviceIntPtr mouse) } /** - * Activate a keyboard grab on the given device. + * Activate a keyboard grab on the given device. * * Extension devices have ActivateKeyboardGrab() set as their grabbing proc. */ @@ -1720,7 +1720,7 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool pass } /** - * Delete keyboard grab for the given device. + * Delete keyboard grab for the given device. */ void DeactivateKeyboardGrab(DeviceIntPtr keybd) @@ -1752,16 +1752,16 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd) } void -AllowSome(ClientPtr client, - TimeStamp time, - DeviceIntPtr thisDev, - int newState, +AllowSome(ClientPtr client, + TimeStamp time, + DeviceIntPtr thisDev, + int newState, Bool core) { Bool thisGrabbed, otherGrabbed, othersFrozen, thisSynced; TimeStamp grabTime; DeviceIntPtr dev; - GrabInfoPtr devgrabinfo, + GrabInfoPtr devgrabinfo, grabinfo = &thisDev->deviceGrab; thisGrabbed = grabinfo->grab && SameClient(grabinfo->grab, client); @@ -1796,7 +1796,7 @@ AllowSome(ClientPtr client, return; switch (newState) { - case THAWED: /* Async */ + case THAWED: /* Async */ if (thisGrabbed) grabinfo->sync.state = THAWED; if (thisSynced) @@ -1818,10 +1818,10 @@ AllowSome(ClientPtr client, for (dev = inputInfo.devices; dev; dev = dev->next) { devgrabinfo = &dev->deviceGrab; - if (devgrabinfo->grab + if (devgrabinfo->grab && SameClient(devgrabinfo->grab, client)) devgrabinfo->sync.state = THAWED; - if (devgrabinfo->sync.other && + if (devgrabinfo->sync.other && SameClient(devgrabinfo->sync.other, client)) devgrabinfo->sync.other = NullGrab; } @@ -1834,10 +1834,10 @@ AllowSome(ClientPtr client, for (dev = inputInfo.devices; dev; dev = dev->next) { devgrabinfo = &dev->deviceGrab; - if (devgrabinfo->grab + if (devgrabinfo->grab && SameClient(devgrabinfo->grab, client)) devgrabinfo->sync.state = FREEZE_BOTH_NEXT_EVENT; - if (devgrabinfo->sync.other + if (devgrabinfo->sync.other && SameClient(devgrabinfo->sync.other, client)) devgrabinfo->sync.other = NullGrab; } @@ -1863,10 +1863,10 @@ AllowSome(ClientPtr client, if (dev == thisDev) continue; devgrabinfo = (core) ? &dev->deviceGrab : &dev->deviceGrab; - if (devgrabinfo->grab + if (devgrabinfo->grab && SameClient(devgrabinfo->grab, client)) devgrabinfo->sync.state = THAWED; - if (devgrabinfo->sync.other + if (devgrabinfo->sync.other && SameClient(devgrabinfo->sync.other, client)) devgrabinfo->sync.other = NullGrab; } @@ -1879,8 +1879,8 @@ AllowSome(ClientPtr client, /** * Server-side protocol handling for AllowEvents request. * - * Release some events from a frozen device. - * + * Release some events from a frozen device. + * * In some cases, the grab the client has is not on the ClientPointer but on * some other device (see ProcGrabPointer comments). To cover this case, we * need to run through all devices to ensure we don't forget the device we @@ -1909,7 +1909,7 @@ ProcAllowEvents(ClientPtr client) else if (IsKeyboardDevice(grabbed)) keybd = grabbed; - if (mouse && keybd) + if (mouse && keybd) break; } } @@ -1924,19 +1924,19 @@ ProcAllowEvents(ClientPtr client) case ReplayPointer: AllowSome(client, time, mouse, NOT_GRABBED, True); break; - case SyncPointer: + case SyncPointer: AllowSome(client, time, mouse, FREEZE_NEXT_EVENT, True); break; - case AsyncPointer: + case AsyncPointer: AllowSome(client, time, mouse, THAWED, True); break; - case ReplayKeyboard: + case ReplayKeyboard: AllowSome(client, time, keybd, NOT_GRABBED, True); break; - case SyncKeyboard: + case SyncKeyboard: AllowSome(client, time, keybd, FREEZE_NEXT_EVENT, True); break; - case AsyncKeyboard: + case AsyncKeyboard: AllowSome(client, time, keybd, THAWED, True); break; case SyncBoth: @@ -1945,7 +1945,7 @@ ProcAllowEvents(ClientPtr client) case AsyncBoth: AllowSome(client, time, keybd, THAWED_BOTH, True); break; - default: + default: client->errorValue = stuff->mode; return BadValue; } @@ -1965,21 +1965,21 @@ ReleaseActiveGrabs(ClientPtr client) * releasing active grabs. */ do { - done = TRUE; - for (dev = inputInfo.devices; dev; dev = dev->next) - { + done = TRUE; + for (dev = inputInfo.devices; dev; dev = dev->next) + { if (dev->deviceGrab.grab && SameClient(dev->deviceGrab.grab, client)) { - (*dev->deviceGrab.DeactivateGrab)(dev); - done = FALSE; + (*dev->deviceGrab.DeactivateGrab)(dev); + done = FALSE; } if (dev->deviceGrab.grab && SameClient(dev->deviceGrab.grab, client)) { - (*dev->deviceGrab.DeactivateGrab)(dev); - done = FALSE; + (*dev->deviceGrab.DeactivateGrab)(dev); + done = FALSE; } - } + } } while (!done); } @@ -1995,24 +1995,24 @@ ReleaseActiveGrabs(ClientPtr client) * * TryClientEvents() is the last station before actually writing the events to * the socket. Anything that is not filtered here, will get delivered to the - * client. - * An event is only delivered if + * client. + * An event is only delivered if * - mask and filter match up. * - no other client has a grab on the device that caused the event. - * + * * * @param client The target client to deliver to. * @param pEvents The events to be delivered. * @param count Number of elements in pEvents. * @param mask Event mask as set by the window. * @param filter Mask based on event type. - * @param grab Possible grab on the device that caused the event. + * @param grab Possible grab on the device that caused the event. * * @return 1 if event was delivered, 0 if not or -1 if grab was not set by the * client. */ _X_EXPORT int -TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask, +TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask, Mask filter, GrabPtr grab) { int i; @@ -2093,19 +2093,19 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask, * Deliver events to a window. At this point, we do not yet know if the event * actually needs to be delivered. May activate a grab if the event is a * button press. - * + * * Core events are always delivered to the window owner. If the filter is * something other than CantBeFiltered, the event is also delivered to other * clients with the matching mask on the window. * * More than one event may be delivered at a time. This is the case with * DeviceMotionNotifies which may be followed by DeviceValuator events. - * + * * @param pWin The window that would get the event. * @param pEvents The events to be delivered. * @param count Number of elements in pEvents. * @param filter Mask based on event type. - * @param grab Possible grab on the device that caused the event. + * @param grab Possible grab on the device that caused the event. * @param mskidx Mask index, depending on device that caused event. * * @return Number of events delivered to various clients. @@ -2121,7 +2121,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent Mask deliveryMask = 0; /* If a grab occurs due to a button press, then this mask is the mask of the grab. */ int type = pEvents->u.u.type; - + /* if a is denied, we return 0. This could cause the caller to * traverse the parent. May be bad! (whot) */ if (!ACDeviceAllowed(pWin, pDev, pEvents)) @@ -2130,15 +2130,15 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent } /* CantBeFiltered means only window owner gets the event */ - if ((filter == CantBeFiltered) || + if ((filter == CantBeFiltered) || (!(type & EXTENSION_EVENT_BASE) && type != GenericEvent)) { /* if nobody ever wants to see this event, skip some work */ if (filter != CantBeFiltered && !((wOtherEventMasks(pWin)|pWin->eventMask) & filter)) return 0; - - if (!(type & EXTENSION_EVENT_BASE) && + + if (!(type & EXTENSION_EVENT_BASE) && IsInterferingGrab(wClient(pWin), pDev, pEvents)) return 0; @@ -2177,11 +2177,11 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent { if (pClient->eventMask[GEEXTIDX(pEvents)] & filter) { - if (TryClientEvents(pClient->client, pEvents, count, + if (TryClientEvents(pClient->client, pEvents, count, pClient->eventMask[GEEXTIDX(pEvents)], filter, grab) > 0) { deliveries++; - } else + } else nondeliveries--; } } @@ -2248,7 +2248,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent inputMasks = wOtherInputMasks(pWin); tempGrab.deviceMask = (inputMasks) ? inputMasks->inputEvents[pDev->id]: 0; - /* get the XGE event mask. + /* get the XGE event mask. * FIXME: needs to be freed somewhere too. */ tempGrab.genericMasks = NULL; @@ -2294,11 +2294,11 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent */ #ifdef PANORAMIX -static int +static int XineramaTryClientEventsResult( ClientPtr client, GrabPtr grab, - Mask mask, + Mask mask, Mask filter ){ if ((client) && (client != serverClient) && (!client->clientGone) && @@ -2321,7 +2321,7 @@ XineramaTryClientEventsResult( * @param dontClient Don't deliver to the dontClient. */ int -MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents, +MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents, int count, Mask filter, ClientPtr dontClient) { OtherClients *other; @@ -2332,7 +2332,7 @@ MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents, if (wClient(pWin) == dontClient) return 0; #ifdef PANORAMIX - if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum) + if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum) return XineramaTryClientEventsResult( wClient(pWin), NullGrab, pWin->eventMask, filter); #endif @@ -2346,7 +2346,7 @@ MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents, if (SameClient(other, dontClient)) return 0; #ifdef PANORAMIX - if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum) + if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum) return XineramaTryClientEventsResult( rClient(other), NullGrab, other->mask, filter); #endif @@ -2381,29 +2381,29 @@ FixUpEventFromWindow( if (calcChild) { WindowPtr w= pSprite->spriteTrace[pSprite->spriteTraceGood-1]; - /* If the search ends up past the root should the child field be - set to none or should the value in the argument be passed - through. It probably doesn't matter since everyone calls + /* If the search ends up past the root should the child field be + set to none or should the value in the argument be passed + through. It probably doesn't matter since everyone calls this function with child == None anyway. */ - while (w) + while (w) { /* If the source window is same as event window, child should be none. Don't bother going all all the way back to the root. */ - if (w == pWin) - { - child = None; - break; + if (w == pWin) + { + child = None; + break; } - + if (w->parent == pWin) { child = w->drawable.id; break; } - w = w->parent; - } + w = w->parent; + } } XE_KBPTR.root = RootWindow(pDev)->drawable.id; XE_KBPTR.event = pWin->drawable.id; @@ -2427,7 +2427,7 @@ FixUpEventFromWindow( /** * Deliver events caused by input devices. Called for both core input events - * and XI events. + * and XI events. * For events from a non-grabbed, non-focus device, DeliverDeviceEvents is * called directly from the processInputProc. * For grabbed devices, DeliverGrabbedEvent is called first, and _may_ call @@ -2446,7 +2446,7 @@ FixUpEventFromWindow( * @see DeliverFocusedEvent */ int -DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab, +DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab, WindowPtr stopAt, DeviceIntPtr dev, int count) { Window child = None; @@ -2503,7 +2503,7 @@ DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab, { if (GEExtensions[GEEXTIDX(xE)].evfill) GEExtensions[GEEXTIDX(xE)].evfill(ge, dev, pWin, grab); - deliveries = DeliverEventsToWindow(dev, pWin, xE, count, + deliveries = DeliverEventsToWindow(dev, pWin, xE, count, filter, grab, 0); if (deliveries > 0) return deliveries; @@ -2511,7 +2511,7 @@ DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab, pWin = pWin->parent; } - } + } else { /* core protocol events */ @@ -2542,7 +2542,7 @@ DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab, /** * Deliver event to a window and it's immediate parent. Used for most window * events (CreateNotify, ConfigureNotify, etc.). Not useful for events that - * propagate up the tree or extension events + * propagate up the tree or extension events * * In case of a ReparentNotify event, the event will be delivered to the * otherParent as well. @@ -2553,7 +2553,7 @@ DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab, * @param otherParent Used for ReparentNotify events. */ _X_EXPORT int -DeliverEvents(WindowPtr pWin, xEvent *xE, int count, +DeliverEvents(WindowPtr pWin, xEvent *xE, int count, WindowPtr otherParent) { Mask filter; @@ -2591,7 +2591,7 @@ DeliverEvents(WindowPtr pWin, xEvent *xE, int count, } -static Bool +static Bool PointInBorderSize(WindowPtr pWin, int x, int y) { BoxRec box; @@ -2601,15 +2601,15 @@ PointInBorderSize(WindowPtr pWin, int x, int y) return TRUE; #ifdef PANORAMIX - if(!noPanoramiXExtension && + if(!noPanoramiXExtension && XineramaSetWindowPntrs(inputInfo.pointer, pWin)) { int i; for(i = 1; i < PanoramiXNumScreens; i++) { - if(POINT_IN_REGION(pSprite->screen, - &pSprite->windows[i]->borderSize, - x + panoramiXdataPtr[0].x - panoramiXdataPtr[i].x, - y + panoramiXdataPtr[0].y - panoramiXdataPtr[i].y, + if(POINT_IN_REGION(pSprite->screen, + &pSprite->windows[i]->borderSize, + x + panoramiXdataPtr[0].x - panoramiXdataPtr[i].x, + y + panoramiXdataPtr[0].y - panoramiXdataPtr[i].y, &box)) return TRUE; } @@ -2629,7 +2629,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y) * * @returns the window at the given coordinates. */ -static WindowPtr +static WindowPtr XYToWindow(DeviceIntPtr pDev, int x, int y) { WindowPtr pWin; @@ -2689,7 +2689,7 @@ XYToWindow(DeviceIntPtr pDev, int x, int y) * CheckMotion() will not do anything and return FALSE if the event is not a * pointer event. * - * @return TRUE if the sprite has moved or FALSE otherwise. + * @return TRUE if the sprite has moved or FALSE otherwise. */ Bool CheckMotion(xEvent *xE, DeviceIntPtr pDev) @@ -2697,7 +2697,7 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev) INT16 *rootX, *rootY; WindowPtr prevSpriteWin; SpritePtr pSprite = pDev->spriteInfo->sprite; - + prevSpriteWin = pSprite->win; #ifdef PANORAMIX @@ -2785,7 +2785,7 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev) if (!xE) UpdateCurrentTimeIf(); DoEnterLeaveEvents(pDev, prevSpriteWin, pSprite->win, - NotifyNormal); + NotifyNormal); } PostNewCursor(pDev); return FALSE; @@ -2835,7 +2835,7 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) pSprite->hotPhys.x -= xoff; pSprite->hotPhys.y -= yoff; - pSprite->hotLimits.x1 -= xoff; + pSprite->hotLimits.x1 -= xoff; pSprite->hotLimits.y1 -= yoff; pSprite->hotLimits.x2 -= xoff; pSprite->hotLimits.y2 -= yoff; @@ -2847,7 +2847,7 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) /* FIXME: if we call ConfineCursorToWindow, must we do anything else? */ if ((grab = pDev->deviceGrab.grab) && grab->confineTo) { - if (grab->confineTo->drawable.pScreen + if (grab->confineTo->drawable.pScreen != pSprite->hotPhys.pScreen) pSprite->hotPhys.x = pSprite->hotPhys.y = 0; ConfineCursorToWindow(pDev, grab->confineTo, TRUE, TRUE); @@ -2889,13 +2889,13 @@ DefineInitialRootWindow(WindowPtr win) * * @param pDev The device to initialize. * @param pWin The window where to generate the sprite in. - * + * */ -void +void InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) { SpritePtr pSprite; - ScreenPtr pScreen; + ScreenPtr pScreen; if (!pDev->spriteInfo->sprite) { @@ -2941,7 +2941,7 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) { pSprite->current = wCursor(pWin); pSprite->current->refcnt++; - pSprite->spriteTrace = (WindowPtr *)xcalloc(1, 32*sizeof(WindowPtr)); + pSprite->spriteTrace = (WindowPtr *)xcalloc(1, 32*sizeof(WindowPtr)); if (!pSprite->spriteTrace) FatalError("Failed to allocate spriteTrace"); pSprite->spriteTraceSize = 32; @@ -2971,7 +2971,7 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) &pSprite->physLimits); (*pScreen->SetCursorPosition) (pDev, pScreen, pSprite->hot.x, pSprite->hot.y, - FALSE); + FALSE); (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current); } #ifdef PANORAMIX @@ -3082,33 +3082,33 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y) pSprite->hotPhys.y = y; #ifdef PANORAMIX if(!noPanoramiXExtension) { - pSprite->hotPhys.x += panoramiXdataPtr[newScreen->myNum].x - + pSprite->hotPhys.x += panoramiXdataPtr[newScreen->myNum].x - panoramiXdataPtr[0].x; - pSprite->hotPhys.y += panoramiXdataPtr[newScreen->myNum].y - + pSprite->hotPhys.y += panoramiXdataPtr[newScreen->myNum].y - panoramiXdataPtr[0].y; if (newScreen != pSprite->screen) { pSprite->screen = newScreen; /* Make sure we tell the DDX to update its copy of the screen */ if(pSprite->confineWin) - XineramaConfineCursorToWindow(pDev, + XineramaConfineCursorToWindow(pDev, pSprite->confineWin, TRUE); else XineramaConfineCursorToWindow(pDev, WindowTable[0], TRUE); - /* if the pointer wasn't confined, the DDX won't get + /* if the pointer wasn't confined, the DDX won't get told of the pointer warp so we reposition it here */ if(!syncEvents.playingEvents) (*pSprite->screen->SetCursorPosition)( pDev, pSprite->screen, - pSprite->hotPhys.x + panoramiXdataPtr[0].x - + pSprite->hotPhys.x + panoramiXdataPtr[0].x - panoramiXdataPtr[pSprite->screen->myNum].x, - pSprite->hotPhys.y + panoramiXdataPtr[0].y - + pSprite->hotPhys.y + panoramiXdataPtr[0].y - panoramiXdataPtr[pSprite->screen->myNum].y, FALSE); } - } else + } else #endif if (newScreen != pSprite->hotPhys.pScreen) - ConfineCursorToWindow(pDev, WindowTable[newScreen->myNum], + ConfineCursorToWindow(pDev, WindowTable[newScreen->myNum], TRUE, FALSE); } @@ -3129,11 +3129,11 @@ XineramaPointInWindowIsVisible( if (POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box)) return TRUE; - + if(!XineramaSetWindowPntrs(inputInfo.pointer, pWin)) return FALSE; - xoff = x + panoramiXdataPtr[0].x; - yoff = y + panoramiXdataPtr[0].y; + xoff = x + panoramiXdataPtr[0].x; + yoff = y + panoramiXdataPtr[0].y; for(i = 1; i < PanoramiXNumScreens; i++) { pWin = inputInfo.pointer->spriteInfo->sprite->windows[i]; @@ -3145,7 +3145,7 @@ XineramaPointInWindowIsVisible( && (!wInputShape(pWin) || POINT_IN_REGION(pWin->drawable.pScreen, wInputShape(pWin), - x - pWin->drawable.x, + x - pWin->drawable.x, y - pWin->drawable.y, &box))) return TRUE; @@ -3175,9 +3175,9 @@ XineramaWarpPointer(ClientPtr client) if (stuff->srcWid != None) { int winX, winY; - XID winID = stuff->srcWid; + XID winID = stuff->srcWid; WindowPtr source; - + rc = dixLookupWindow(&source, winID, client, DixReadAccess); if (rc != Success) return rc; @@ -3204,7 +3204,7 @@ XineramaWarpPointer(ClientPtr client) x -= panoramiXdataPtr[0].x; y -= panoramiXdataPtr[0].y; } - } + } x += stuff->dstX; y += stuff->dstY; @@ -3260,9 +3260,9 @@ ProcWarpPointer(ClientPtr client) if (stuff->srcWid != None) { int winX, winY; - XID winID = stuff->srcWid; + XID winID = stuff->srcWid; WindowPtr source; - + rc = dixLookupWindow(&source, winID, client, DixReadAccess); if (rc != Success) return rc; @@ -3279,12 +3279,12 @@ ProcWarpPointer(ClientPtr client) !PointInWindowIsVisible(source, x, y)) return Success; } - if (dest) + if (dest) { x = dest->drawable.x; y = dest->drawable.y; newScreen = dest->drawable.pScreen; - } else + } else newScreen = pSprite->hotPhys.pScreen; x += stuff->dstX; @@ -3314,7 +3314,7 @@ ProcWarpPointer(ClientPtr client) ConfineToShape(PickPointer(client), pSprite->hotShape, &x, &y); #endif (*newScreen->SetCursorPosition)(PickPointer(client), newScreen, x, y, - TRUE); + TRUE); } else if (!PointerConfinedToScreen(PickPointer(client))) { @@ -3323,7 +3323,7 @@ ProcWarpPointer(ClientPtr client) return Success; } -static Bool +static Bool BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin) { if(REGION_NOTEMPTY(pDev->spriteInfo->sprite->hotPhys.pScreen, &pWin->borderSize)) @@ -3334,7 +3334,7 @@ BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin) int i; for(i = 1; i < PanoramiXNumScreens; i++) { - if(REGION_NOTEMPTY(pDev->spriteInfo->sprite->screen, + if(REGION_NOTEMPTY(pDev->spriteInfo->sprite->screen, &pDev->spriteInfo->sprite->windows[i]->borderSize)) return TRUE; } @@ -3343,11 +3343,11 @@ BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin) return FALSE; } -/** +/** * "CheckPassiveGrabsOnWindow" checks to see if the event passed in causes a - * passive grab set on the window to be activated. + * passive grab set on the window to be activated. * If a passive grab is activated, the event will be delivered to the client. - * + * * @param pWin The window that may be subject to a passive grab. * @param device Device that caused the event. * @param xE List of events (multiple ones for DeviceMotionNotify) @@ -3419,7 +3419,7 @@ CheckPassiveGrabsOnWindow( /* ignore the device for core events when comparing grabs */ if (GrabMatchesSecond(&tempGrab, grab, (xE->u.u.type < LASTEvent)) && (!grab->confineTo || - (grab->confineTo->realized && + (grab->confineTo->realized && BorderSizeNotEmpty(device, grab->confineTo)))) { if (!XaceHook(XACE_DEVICE_ACCESS, wClient(pWin), device, FALSE)) @@ -3440,10 +3440,10 @@ CheckPassiveGrabsOnWindow( modifierDevice explicitly, we don't override this choice. This essentially requires a client to re-create all passiveGrabs when the pairing changes... oh well. - */ + */ if (xE->u.u.type < LASTEvent) { - grab->device = device; + grab->device = device; grab->modifierDevice = GetPairedDevice(device); } @@ -3477,7 +3477,7 @@ CheckPassiveGrabsOnWindow( (*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE); - + FixUpEventFromWindow(device, xE, grab->window, None, TRUE); (void) TryClientEvents(rClient(grab), xE, count, @@ -3497,8 +3497,8 @@ CheckPassiveGrabsOnWindow( grabinfo->sync.evcount = count; for (dxE = grabinfo->sync.event; --count >= 0; dxE++, xE++) *dxE = *xE; - grabinfo->sync.state = FROZEN_WITH_EVENT; - } + grabinfo->sync.state = FROZEN_WITH_EVENT; + } return TRUE; } } @@ -3507,14 +3507,14 @@ CheckPassiveGrabsOnWindow( /** * CheckDeviceGrabs handles both keyboard and pointer events that may cause - * a passive grab to be activated. + * a passive grab to be activated. * * If the event is a keyboard event, the ancestors of the focus window are * traced down and tried to see if they have any passive grabs to be * activated. If the focus window itself is reached and it's descendants * contain the pointer, the ancestors of the window that the pointer is in * are then traced down starting at the focus window, otherwise no grabs are - * activated. + * activated. * If the event is a pointer event, the ancestors of the window that the * pointer is in are traced down starting at the root until CheckPassiveGrabs * causes a passive grab to activate or all the windows are @@ -3529,7 +3529,7 @@ CheckPassiveGrabsOnWindow( */ Bool -CheckDeviceGrabs(DeviceIntPtr device, xEvent *xE, +CheckDeviceGrabs(DeviceIntPtr device, xEvent *xE, int checkFirst, int count) { int i; @@ -3554,7 +3554,7 @@ CheckDeviceGrabs(DeviceIntPtr device, xEvent *xE, CheckPassiveGrabsOnWindow(pWin, device, xE, count)) return TRUE; } - + if ((focus->win == NoneWin) || (i >= device->spriteInfo->sprite->spriteTraceGood) || ((i > checkFirst) && @@ -3620,7 +3620,7 @@ DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count) * @param deactivateGrab True if the device's grab should be deactivated. */ void -DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, +DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, Bool deactivateGrab, int count) { GrabPtr grab; @@ -3646,9 +3646,9 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, else focus = PointerRootWin; if (focus == PointerRootWin) - deliveries = DeliverDeviceEvents(pSprite->win, xE, grab, + deliveries = DeliverDeviceEvents(pSprite->win, xE, grab, NullWindow, thisDev, count); - else if (focus && (focus == pSprite->win || + else if (focus && (focus == pSprite->win || IsParent(focus, pSprite->win))) deliveries = DeliverDeviceEvents(pSprite->win, xE, grab, focus, thisDev, count); @@ -3671,15 +3671,15 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, if (GEEventFill(xE)) GEEventFill(xE)(ge, thisDev, grab->window, grab); - deliveries = TryClientEvents(rClient(grab), xE, count, + deliveries = TryClientEvents(rClient(grab), xE, count, gemask->eventMask[GEEXTIDX(ge)], generic_filters[GEEXTIDX(ge)][ge->evtype], grab); - } else + } else { Mask mask = grab->eventMask; if (grabinfo->fromPassiveGrab && - grabinfo->implicitGrab && + grabinfo->implicitGrab && (xE->u.u.type & EXTENSION_EVENT_BASE)) mask = grab->deviceMask; @@ -3739,7 +3739,7 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, } /** - * Main keyboard event processing function for core keyboard events. + * Main keyboard event processing function for core keyboard events. * Updates the events fields from the current pointer state and delivers the * event. * @@ -3852,11 +3852,11 @@ drawable.id:0; switch (xE->u.u.type) { - case KeyPress: + case KeyPress: /* We MUST NOT change the device itself here. All device state * changes must be performed in ProcessOtherEvents. We're dealing * with the same device struct, so if we change it in POE and - * here, we've just screwed up the state by setting it twice. + * here, we've just screwed up the state by setting it twice. * * Devices may not send core events but always send XI events, so * the state must be changed in POE, not here. @@ -3867,14 +3867,14 @@ drawable.id:0; return; } break; - case KeyRelease: + case KeyRelease: if (!(*kptr & bit)) /* guard against duplicates */ return; /* No device state changes, see comment for KeyPress */ if (grabinfo->fromPassiveGrab && (key == grabinfo->activatingKey)) deactivateGrab = TRUE; break; - default: + default: FatalError("Impossible keyboard event"); } if (grab) @@ -3889,7 +3889,7 @@ drawable.id:0; #ifdef XKB /* This function is used to set the key pressed or key released state - - this is only used when the pressing of keys does not cause + this is only used when the pressing of keys does not cause the device's processInputProc to be called, as in for example Mouse Keys. */ void @@ -3919,8 +3919,8 @@ FixKeyState (xEvent *xE, DeviceIntPtr keybd) } #endif -/** - * Main pointer event processing function for core pointer events. +/** + * Main pointer event processing function for core pointer events. * For motion events: update the sprite. * For all other events: Update the event fields based on the current sprite * state. @@ -4003,7 +4003,7 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) bit = 1 << (key & 7); switch (xE->u.u.type) { - case ButtonPress: + case ButtonPress: /* * We rely on the fact that ButtonMotionMask is the same as * DeviceButtonMotionMask, so setting the motionMask @@ -4016,14 +4016,14 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) if (CheckDeviceGrabs(mouse, xE, 0, count)) return; break; - case ButtonRelease: + case ButtonRelease: if (xE->u.u.detail == 0) return; filters[MotionNotify] = Motion_Filter(butc); if (!butc->state && mouse->deviceGrab.fromPassiveGrab) deactivateGrab = TRUE; break; - default: + default: FatalError("bogus pointer event from ddx"); } } @@ -4184,7 +4184,7 @@ EventSelectForWindow(WindowPtr pWin, ClientPtr client, Mask mask) if (!AddResource(others->resource, RT_OTHERCLIENT, (pointer)pWin)) return BadAlloc; } -maskSet: +maskSet: if ((inputInfo.pointer->valuator->motionHintWindow == pWin) && (mask & PointerMotionHintMask) && !(check & PointerMotionHintMask) && @@ -4195,7 +4195,7 @@ maskSet: } int -EventSuppressForWindow(WindowPtr pWin, ClientPtr client, +EventSuppressForWindow(WindowPtr pWin, ClientPtr client, Mask mask, Bool *checkOptional) { int i, free; @@ -4253,7 +4253,7 @@ EventSuppressForWindow(WindowPtr pWin, ClientPtr client, /** * @return The window that is the first ancestor of both a and b. */ -static WindowPtr +static WindowPtr CommonAncestor( WindowPtr a, WindowPtr b) @@ -4264,7 +4264,7 @@ CommonAncestor( } /** - * Assembles an EnterNotify or LeaveNotify and sends it event to the client. + * Assembles an EnterNotify or LeaveNotify and sends it event to the client. * Uses the paired keyboard to get some additional information. */ static void @@ -4283,7 +4283,7 @@ EnterLeaveEvent( GrabPtr devgrab = mouse->deviceGrab.grab; Mask mask; int* inWindow; /* no of sprites inside pWin */ - Bool sendevent = FALSE; + Bool sendevent = FALSE; deviceEnterNotify *devEnterLeave; int mskidx; @@ -4320,7 +4320,7 @@ EnterLeaveEvent( if (!noXkbExtension) { event.u.enterLeave.state = mouse->button->state & 0x1f00; if (keybd) - event.u.enterLeave.state |= + event.u.enterLeave.state |= XkbGrabStateFromRec(&keybd->key->xkbInfo->state); } else #endif @@ -4339,29 +4339,29 @@ EnterLeaveEvent( /* * Sending multiple core enter/leave events to the same window confuse the - * client. + * client. * We can send multiple events that have detail NotifyVirtual or * NotifyNonlinearVirtual however. For most clients anyway. * * For standard events (NotifyAncestor, NotifyInferior, NotifyNonlinear) * we only send an enter event for the first pointer to enter. A leave - * event is sent for the last pointer to leave. + * event is sent for the last pointer to leave. * * For events with Virtual detail, we send them only to a window that does * not have a pointer inside. * - * For a window tree in the form of + * For a window tree in the form of * - * A -> Bp -> C -> D + * A -> Bp -> C -> D * \ (where B and E have pointers) - * -> Ep - * + * -> Ep + * * If the pointer moves from E into D, a LeaveNotify is sent to E, an * EnterNotify is sent to D, an EnterNotify with detail * NotifyNonlinearVirtual to C and nothing to B. */ - if (event.u.u.detail != NotifyVirtual && + if (event.u.u.detail != NotifyVirtual && event.u.u.detail != NotifyNonlinearVirtual) { if (((*inWindow) == (LeaveNotify - type))) @@ -4382,7 +4382,7 @@ EnterLeaveEvent( NullGrab, 0); } - /* we don't have enough bytes, so we squash flags and mode into + /* we don't have enough bytes, so we squash flags and mode into one byte, and use the last byte for the deviceid. */ devEnterLeave = (deviceEnterNotify*)&event; devEnterLeave->type = (type == EnterNotify) ? DeviceEnterNotify : @@ -4393,15 +4393,15 @@ EnterLeaveEvent( devEnterLeave->deviceid = mouse->id; mskidx = mouse->id; inputMasks = wOtherInputMasks(pWin); - if (inputMasks && + if (inputMasks && (filters[devEnterLeave->type] & inputMasks->deliverableEvents[mskidx])) { if (devgrab) (void)TryClientEvents(rClient(devgrab), (xEvent*)devEnterLeave, 1, mask, filters[devEnterLeave->type], devgrab); else - (void)DeliverEventsToWindow(mouse, pWin, (xEvent*)devEnterLeave, - 1, filters[devEnterLeave->type], + (void)DeliverEventsToWindow(mouse, pWin, (xEvent*)devEnterLeave, + 1, filters[devEnterLeave->type], NullGrab, mouse->id); } @@ -4430,11 +4430,11 @@ EnterLeaveEvent( * This function recurses. */ static void -EnterNotifies(DeviceIntPtr pDev, - WindowPtr ancestor, - WindowPtr child, - int mode, - int detail) +EnterNotifies(DeviceIntPtr pDev, + WindowPtr ancestor, + WindowPtr child, + int mode, + int detail) { WindowPtr parent = child->parent; @@ -4450,10 +4450,10 @@ EnterNotifies(DeviceIntPtr pDev, * This function recurses. */ static void -LeaveNotifies(DeviceIntPtr pDev, - WindowPtr child, - WindowPtr ancestor, - int mode, +LeaveNotifies(DeviceIntPtr pDev, + WindowPtr child, + WindowPtr ancestor, + int mode, int detail) { WindowPtr pWin; @@ -4463,7 +4463,7 @@ LeaveNotifies(DeviceIntPtr pDev, for (pWin = child->parent; pWin != ancestor; pWin = pWin->parent) { EnterLeaveEvent(pDev, LeaveNotify, mode, detail, pWin, - child->drawable.id); + child->drawable.id); child = pWin; } } @@ -4478,7 +4478,7 @@ LeaveNotifies(DeviceIntPtr pDev, } \ } #define ENTER_LEAVE_SEMAPHORE_UP(win, mode) \ - FOCUS_SEMAPHORE_MODIFY(win, enterleave, mode, 1); + FOCUS_SEMAPHORE_MODIFY(win, enterleave, mode, 1); #define ENTER_LEAVE_SEMAPHORE_DOWN(win, mode) \ FOCUS_SEMAPHORE_MODIFY(win, enterleave, mode, -1); @@ -4487,23 +4487,23 @@ LeaveNotifies(DeviceIntPtr pDev, /** * Figure out if enter/leave events are necessary and send them to the * appropriate windows. - * + * * @param fromWin Window the sprite moved out of. * @param toWin Window the sprite moved into. */ static void -DoEnterLeaveEvents(DeviceIntPtr pDev, - WindowPtr fromWin, - WindowPtr toWin, - int mode) +DoEnterLeaveEvents(DeviceIntPtr pDev, + WindowPtr fromWin, + WindowPtr toWin, + int mode) { if (fromWin == toWin) return; if (IsParent(fromWin, toWin)) { - ENTER_LEAVE_SEMAPHORE_DOWN(fromWin, mode); + ENTER_LEAVE_SEMAPHORE_DOWN(fromWin, mode); EnterLeaveEvent(pDev, LeaveNotify, mode, NotifyInferior, fromWin, - None); + None); EnterNotifies(pDev, fromWin, toWin, mode, NotifyVirtual); ENTER_LEAVE_SEMAPHORE_UP(toWin, mode); @@ -4511,8 +4511,8 @@ DoEnterLeaveEvents(DeviceIntPtr pDev, } else if (IsParent(toWin, fromWin)) { - ENTER_LEAVE_SEMAPHORE_DOWN(fromWin, mode); - EnterLeaveEvent(pDev, LeaveNotify, mode, NotifyAncestor, fromWin, + ENTER_LEAVE_SEMAPHORE_DOWN(fromWin, mode); + EnterLeaveEvent(pDev, LeaveNotify, mode, NotifyAncestor, fromWin, None); LeaveNotifies(pDev, fromWin, toWin, mode, NotifyVirtual); ENTER_LEAVE_SEMAPHORE_UP(toWin, mode); @@ -4522,14 +4522,14 @@ DoEnterLeaveEvents(DeviceIntPtr pDev, { /* neither fromWin nor toWin is descendent of the other */ WindowPtr common = CommonAncestor(toWin, fromWin); /* common == NullWindow ==> different screens */ - ENTER_LEAVE_SEMAPHORE_DOWN(fromWin, mode); + ENTER_LEAVE_SEMAPHORE_DOWN(fromWin, mode); EnterLeaveEvent(pDev, LeaveNotify, mode, NotifyNonlinear, fromWin, - None); + None); LeaveNotifies(pDev, fromWin, common, mode, NotifyNonlinearVirtual); EnterNotifies(pDev, common, toWin, mode, NotifyNonlinearVirtual); ENTER_LEAVE_SEMAPHORE_UP(toWin, mode); EnterLeaveEvent(pDev, EnterNotify, mode, NotifyNonlinear, toWin, - None); + None); } } @@ -4547,7 +4547,7 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) * Same procedure as for Enter/Leave events. * * Sending multiple core FocusIn/Out events to the same window may confuse - * the client. + * the client. * We can send multiple events that have detail NotifyVirtual, * NotifyNonlinearVirtual, NotifyPointerRoot, NotifyDetailNone or * NotifyPointer however. @@ -4560,12 +4560,12 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) * For events with Virtual detail, we send them only to a window that does * not have a focus from another keyboard. * - * For a window tree in the form of + * For a window tree in the form of * - * A -> Bf -> C -> D + * A -> Bf -> C -> D * \ (where B and E have focus) - * -> Ef - * + * -> Ef + * * If the focus changes from E into D, a FocusOut is sent to E, a * FocusIn is sent to D, a FocusIn with detail * NotifyNonlinearVirtual to C and nothing to B. @@ -4575,8 +4575,8 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) &((FocusSemaphoresPtr)pWin->devPrivates[FocusPrivatesIndex].ptr)->focusinout; if (mode == NotifyGrab || mode == NotifyUngrab) sendevent = TRUE; - else if (detail != NotifyVirtual && - detail != NotifyNonlinearVirtual && + else if (detail != NotifyVirtual && + detail != NotifyNonlinearVirtual && detail != NotifyPointer && detail != NotifyPointerRoot && detail != NotifyDetailNone) @@ -4677,15 +4677,15 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) if ((toWin == NullWindow) || (toWin == PointerRootWin)) { if ((fromWin == NullWindow) || (fromWin == PointerRootWin)) - { + { if (fromWin == PointerRootWin) FocusOutEvents(dev, pSprite->win, RootWindow(dev), mode, NotifyPointer, TRUE); /* Notify all the roots */ #ifdef PANORAMIX - if ( !noPanoramiXExtension ) + if ( !noPanoramiXExtension ) FocusEvent(dev, FocusOut, mode, out, WindowTable[0]); - else + else #endif for (i=0; iwin, RootWindow(dev), mode, NotifyPointer, TRUE); #ifdef PANORAMIX - if ( !noPanoramiXExtension ) + if ( !noPanoramiXExtension ) FocusEvent(dev, FocusOut, mode, out, WindowTable[0]); - else + else #endif for (i=0; iwin)) - (void)FocusInEvents(dev, toWin, pSprite->win, NullWindow, mode, + (void)FocusInEvents(dev, toWin, pSprite->win, NullWindow, mode, NotifyPointer, FALSE); } else @@ -4790,14 +4790,14 @@ DoFocusEvents(DeviceIntPtr dev, WindowPtr fromWin, WindowPtr toWin, int mode) /** * Set the input focus to the given window. Subsequent keyboard events will be * delivered to the given window. - * + * * Usually called from ProcSetInputFocus as result of a client request. If so, * the device is the inputInfo.keyboard. * If called from ProcXSetInputFocus as result of a client xinput request, the * device is set to the device specified by the client. * * @param client Client that requested input focus change. - * @param dev Focus device. + * @param dev Focus device. * @param focusID The window to obtain the focus. Can be PointerRoot or None. * @param revertTo Specifies where the focus reverts to when window becomes * unviewable. @@ -4846,7 +4846,7 @@ SetInputFocus( rc = dixLookupWindow(&focusWin, focusID, client, DixReadAccess); if (rc != Success) return rc; - /* It is a match error to try to set the input focus to an + /* It is a match error to try to set the input focus to an unviewable window. */ if(!focusWin->realized) return(BadMatch); @@ -4884,7 +4884,7 @@ SetInputFocus( Must_have_memory = FALSE; /* XXX */ } focus->traceGood = depth; - for (pWin = focusWin, depth--; pWin; pWin = pWin->parent, depth--) + for (pWin = focusWin, depth--; pWin; pWin = pWin->parent, depth--) focus->trace[depth] = pWin; } return Success; @@ -4913,7 +4913,7 @@ ProcSetInputFocus(client) /** * Server-side protocol handling for GetInputFocus request. - * + * * Sends the current input focus for the client's keyboard back to the * client. */ @@ -4993,7 +4993,7 @@ ProcGrabPointer(ClientPtr client) return rc; if (stuff->confineTo == None) confineTo = NullWindow; - else + else { rc = dixLookupWindow(&confineTo, stuff->confineTo, client, DixReadAccess); @@ -5037,11 +5037,11 @@ ProcGrabPointer(ClientPtr client) rep.status = AlreadyGrabbed; else if ((!pWin->realized) || (confineTo && - !(confineTo->realized + !(confineTo->realized && BorderSizeNotEmpty(device, confineTo)))) rep.status = GrabNotViewable; else if (device->deviceGrab.sync.frozen && - device->deviceGrab.sync.other && + device->deviceGrab.sync.other && !SameClient(device->deviceGrab.sync.other, client)) rep.status = GrabFrozen; else if ((CompareTimeStamps(time, currentTime) == LATER) || @@ -5053,7 +5053,7 @@ ProcGrabPointer(ClientPtr client) oldCursor = NullCursor; if (grab) - { + { if (grab->confineTo && !confineTo) ConfineCursorToWindow(device, RootWindow(device), FALSE, FALSE); oldCursor = grab->cursor; @@ -5086,11 +5086,11 @@ ProcGrabPointer(ClientPtr client) * Server-side protocol handling for ChangeActivePointerGrab request. * * Changes properties of the grab hold by the client. If the client does not - * hold an active grab on the device, nothing happens. + * hold an active grab on the device, nothing happens. * * Works on the client's ClientPointer, but in some cases the client may have * a grab on a device that isn't the ClientPointer (see ProcGrabPointer - * comments). + * comments). */ int ProcChangeActivePointerGrab(ClientPtr client) @@ -5223,25 +5223,25 @@ ProcUngrabPointer(ClientPtr client) /** * Sets a grab on the given device. - * + * * Called from ProcGrabKeyboard to work on the client's keyboard. * Called from ProcXGrabDevice to work on the device specified by the client. - * + * * The parameters this_mode and other_mode represent the keyboard_mode and - * pointer_mode parameters of XGrabKeyboard(). + * pointer_mode parameters of XGrabKeyboard(). * See man page for details on all the parameters - * + * * @param client Client that owns the grab. - * @param dev The device to grab. + * @param dev The device to grab. * @param this_mode GrabModeSync or GrabModeAsync * @param other_mode GrabModeSync or GrabModeAsync * @param status Return code to be returned to the caller. - * + * * @returns Success or BadValue. */ int -GrabDevice(ClientPtr client, DeviceIntPtr dev, - unsigned this_mode, unsigned other_mode, Window grabWindow, +GrabDevice(ClientPtr client, DeviceIntPtr dev, + unsigned this_mode, unsigned other_mode, Window grabWindow, unsigned ownerEvents, Time ctime, Mask mask, CARD8 *status, Bool coreGrab) { @@ -5317,7 +5317,7 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, * Grabs are only removed if the other device matches the type of device. If * dev is a pointer device, only other pointer grabs are removed. Likewise, if * dev is a keyboard device, only keyboard grabs are removed. - * + * * If dev doesn't have a grab, do nothing and go for a beer. * * @param client The client that is to be limited. @@ -5462,7 +5462,7 @@ ProcUngrabKeyboard(ClientPtr client) * Server-side protocol handling for QueryPointer request. * * Returns the current state and position of the client's ClientPointer to the - * client. + * client. */ int ProcQueryPointer(ClientPtr client) @@ -5521,7 +5521,7 @@ ProcQueryPointer(ClientPtr client) WriteReplyToClient(client, sizeof(xQueryPointerReply), &rep); - return(Success); + return(Success); } /** @@ -5579,7 +5579,7 @@ CloseDownEvents(void) /** * Server-side protocol handling for SendEvent request. * - * Locates the window to send the event to and forwards the event. + * Locates the window to send the event to and forwards the event. */ int ProcSendEvent(ClientPtr client) @@ -5595,7 +5595,7 @@ ProcSendEvent(ClientPtr client) extension. */ if ( ! ((stuff->event.u.u.type > X_Reply && - stuff->event.u.u.type < LASTEvent) || + stuff->event.u.u.type < LASTEvent) || (stuff->event.u.u.type >= EXTENSION_EVENT_BASE && stuff->event.u.u.type < (unsigned)lastEvent))) { @@ -5627,7 +5627,7 @@ ProcSendEvent(ClientPtr client) /* If the input focus is PointerRootWin, send the event to where the pointer is if possible, then perhaps propogate up to root. */ - if (inputFocus == PointerRootWin) + if (inputFocus == PointerRootWin) inputFocus = pSprite->spriteTrace[0]; /* Root window! */ if (IsParent(inputFocus, pSprite->win)) @@ -5722,7 +5722,7 @@ ProcUngrabKey(ClientPtr client) * Server-side protocol handling for GrabKey request. * * Creates a grab for the client's keyboard and adds it to the list of passive - * grabs. + * grabs. */ int ProcGrabKey(ClientPtr client) @@ -5768,10 +5768,10 @@ ProcGrabKey(ClientPtr client) if (rc != Success) return rc; - grab = CreateGrab(client->index, keybd, pWin, + grab = CreateGrab(client->index, keybd, pWin, (Mask)(KeyPressMask | KeyReleaseMask), (Bool)stuff->ownerEvents, (Bool)stuff->keyboardMode, (Bool)stuff->pointerMode, - keybd, stuff->modifiers, KeyPress, stuff->key, + keybd, stuff->modifiers, KeyPress, stuff->key, NullWindow, NullCursor); if (!grab) return BadAlloc; @@ -5851,7 +5851,7 @@ ProcGrabButton(ClientPtr client) pointer = PickPointer(client); modifierDevice = GetPairedDevice(pointer); - grab = CreateGrab(client->index, pointer, pWin, + grab = CreateGrab(client->index, pointer, pWin, (Mask)stuff->eventMask, (Bool)stuff->ownerEvents, (Bool) stuff->keyboardMode, (Bool)stuff->pointerMode, modifierDevice, stuff->modifiers, ButtonPress, @@ -5920,7 +5920,7 @@ DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) FocusClassPtr focus; OtherClientsPtr oc; GrabPtr passive; - GrabPtr grab; + GrabPtr grab; /* Deactivate any grabs performed on this window, before making any @@ -5951,7 +5951,7 @@ DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) { focus = keybd->focus; - /* If the focus window is a root window (ie. has no parent) then don't + /* If the focus window is a root window (ie. has no parent) then don't delete the focus from it. */ if ((pWin == focus->win) && (pWin->parent != NullWindow)) @@ -6077,14 +6077,14 @@ ProcRecolorCursor(ClientPtr client) CursorPtr pCursor; int nscr; ScreenPtr pscr; - Bool displayed; + Bool displayed; SpritePtr pSprite = PickPointer(client)->spriteInfo->sprite; REQUEST(xRecolorCursorReq); REQUEST_SIZE_MATCH(xRecolorCursorReq); pCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, RT_CURSOR, DixWriteAccess); - if ( !pCursor) + if ( !pCursor) { client->errorValue = stuff->cursor; return (BadCursor); @@ -6119,10 +6119,10 @@ ProcRecolorCursor(ClientPtr client) * the given event type. * * In the case of DeviceMotionNotify trailed by DeviceValuators, the events - * can be more than one. Usually it's just one event. + * can be more than one. Usually it's just one event. * * Do not modify the event structure passed in. See comment below. - * + * * @param pClient Client to send events to. * @param count Number of events. * @param events The event list. @@ -6143,8 +6143,8 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) #endif #ifdef PANORAMIX - if(!noPanoramiXExtension && - (panoramiXdataPtr[0].x || panoramiXdataPtr[0].y)) + if(!noPanoramiXExtension && + (panoramiXdataPtr[0].x || panoramiXdataPtr[0].y)) { switch(events->u.u.type) { case MotionNotify: @@ -6154,17 +6154,17 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) case KeyRelease: case EnterNotify: case LeaveNotify: - /* + /* When multiple clients want the same event DeliverEventsToWindow - passes the same event structure multiple times so we can't - modify the one passed to us + passes the same event structure multiple times so we can't + modify the one passed to us */ count = 1; /* should always be 1 */ memcpy(&eventCopy, events, sizeof(xEvent)); eventCopy.u.keyButtonPointer.rootX += panoramiXdataPtr[0].x; eventCopy.u.keyButtonPointer.rootY += panoramiXdataPtr[0].y; - if(eventCopy.u.keyButtonPointer.event == - eventCopy.u.keyButtonPointer.root) + if(eventCopy.u.keyButtonPointer.event == + eventCopy.u.keyButtonPointer.root) { eventCopy.u.keyButtonPointer.eventX += panoramiXdataPtr[0].x; eventCopy.u.keyButtonPointer.eventY += panoramiXdataPtr[0].y; @@ -6191,7 +6191,7 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) XSERVER_SEND_EVENT(pClient->index, events[i].u.u.type, &events[i]); } } -#endif +#endif /* Just a safety check to make sure we only have one GenericEvent, it just * makes things easier for me right now. (whot) */ for (i = 1; i < count; i++) @@ -6199,7 +6199,7 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) if (events[i].u.u.type == GenericEvent) { ErrorF("[dix] TryClientEvents: Only one GenericEvent at a time.\n"); - return; + return; } } @@ -6249,7 +6249,7 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) * A client can have exactly one ClientPointer. Each time a * request/reply/event is processed and the choice of devices is ambiguous * (e.g. QueryPointer request), the server will pick the ClientPointer (see - * PickPointer()). + * PickPointer()). * If a keyboard is needed, the first keyboard paired with the CP is used. */ _X_EXPORT Bool @@ -6261,7 +6261,7 @@ SetClientPointer(ClientPtr client, ClientPtr setter, DeviceIntPtr device) return FALSE; } else if (!device->spriteInfo->spriteOwner) { - ErrorF("[dix] Device %d does not have a sprite. " + ErrorF("[dix] Device %d does not have a sprite. " "Cannot be ClientPointer\n", device->id); return FALSE; } @@ -6303,7 +6303,7 @@ PickKeyboard(ClientPtr client) if (!kbd) { - ErrorF("[dix] ClientPointer not paired with a keyboard. This " + ErrorF("[dix] ClientPointer not paired with a keyboard. This " "is a bug.\n"); } @@ -6318,7 +6318,7 @@ PickKeyboard(ClientPtr client) * Return true if a core event from the device would interfere and should not * be delivered. */ -Bool +Bool IsInterferingGrab(ClientPtr client, DeviceIntPtr dev, xEvent* event) { DeviceIntPtr it = inputInfo.devices; @@ -6359,13 +6359,13 @@ IsInterferingGrab(ClientPtr client, DeviceIntPtr dev, xEvent* event) } /** - * Set the filters for a extension. + * Set the filters for a extension. * The filters array needs to contain the Masks that are applicable for each * event type for the given extension. * e.g. if generic event type 2 should be let through for windows with * MyExampleMask set, make sure that filters[2] == MyExampleMask. */ -_X_EXPORT void +_X_EXPORT void SetGenericFilter(int extension, Mask* filters) { generic_filters[extension & 0x7f] = filters; @@ -6377,15 +6377,15 @@ SetGenericFilter(int extension, Mask* filters) * grabmode is used to ungrab a device. */ _X_EXPORT int -ExtGrabDevice(ClientPtr client, - DeviceIntPtr dev, +ExtGrabDevice(ClientPtr client, + DeviceIntPtr dev, int device_mode, - WindowPtr grabWindow, - WindowPtr confineTo, - TimeStamp ctime, - Bool ownerEvents, - CursorPtr cursor, - Mask xi_mask, + WindowPtr grabWindow, + WindowPtr confineTo, + TimeStamp ctime, + Bool ownerEvents, + CursorPtr cursor, + Mask xi_mask, GenericMaskPtr ge_masks) { GrabInfoPtr grabinfo; From e96d926d64f7fb63f6bf2aa0ea0a8440a188947b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 13 Nov 2007 17:14:35 +1030 Subject: [PATCH 259/634] Xi: remove trailing whitespaces. --- Xi/chaccess.c | 38 +++++++++++++++---------------- Xi/chdevcur.c | 14 ++++++------ Xi/chdevhier.c | 18 +++++++-------- Xi/chpkpair.c | 16 ++++++------- Xi/closedev.c | 2 +- Xi/exevents.c | 14 ++++++------ Xi/extgrbdev.c | 58 ++++++++++++++++++++++++------------------------ Xi/extinit.c | 26 +++++++++++----------- Xi/fakedevdata.c | 4 ++-- Xi/getcptr.c | 8 +++---- Xi/grabacc.c | 4 ++-- Xi/grabdev.c | 6 ++--- Xi/listdev.c | 4 ++-- Xi/qryacces.c | 12 +++++----- Xi/querydp.c | 8 +++---- Xi/regpair.c | 8 +++---- Xi/sendexev.c | 2 +- Xi/stubs.c | 10 ++++----- Xi/warpdevp.c | 8 +++---- 19 files changed, 130 insertions(+), 130 deletions(-) diff --git a/Xi/chaccess.c b/Xi/chaccess.c index 2a0e5fa75..9baa871d4 100644 --- a/Xi/chaccess.c +++ b/Xi/chaccess.c @@ -50,9 +50,9 @@ from the author. * This procedure allows a client to change window access control. */ -int +int SProcXChangeWindowAccess(ClientPtr client) -{ +{ char n; REQUEST(xChangeWindowAccessReq); @@ -61,7 +61,7 @@ SProcXChangeWindowAccess(ClientPtr client) return ProcXChangeWindowAccess(client); } -int +int ProcXChangeWindowAccess(ClientPtr client) { int padding, err, i; @@ -71,14 +71,14 @@ ProcXChangeWindowAccess(ClientPtr client) DeviceIntPtr* deny_devices = NULL; REQUEST(xChangeWindowAccessReq); REQUEST_AT_LEAST_SIZE(xChangeWindowAccessReq); - + padding = (4 - (((stuff->npermit + stuff->ndeny) * sizeof(XID)) % 4)) % 4; - if (stuff->length != ((sizeof(xChangeWindowAccessReq) + + if (stuff->length != ((sizeof(xChangeWindowAccessReq) + (((stuff->npermit + stuff->ndeny) * sizeof(XID)) + padding)) >> 2)) { - SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, + SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, 0, BadLength); return Success; } @@ -87,7 +87,7 @@ ProcXChangeWindowAccess(ClientPtr client) err = dixLookupWindow(&win, stuff->win, client, DixWriteAccess); if (err != Success) { - SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, + SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, stuff->win, err); return Success; } @@ -106,12 +106,12 @@ ProcXChangeWindowAccess(ClientPtr client) if (stuff->npermit) { - perm_devices = + perm_devices = (DeviceIntPtr*)xalloc(stuff->npermit * sizeof(DeviceIntPtr)); if (!perm_devices) { ErrorF("[Xi] ProcXChangeWindowAccess: alloc failure.\n"); - SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, 0, + SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, 0, BadImplementation); return Success; } @@ -123,8 +123,8 @@ ProcXChangeWindowAccess(ClientPtr client) if (!perm_devices[i]) { xfree(perm_devices); - SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, - deviceids[i], BadDevice); + SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, + deviceids[i], BadDevice); return Success; } } @@ -132,12 +132,12 @@ ProcXChangeWindowAccess(ClientPtr client) if (stuff->ndeny) { - deny_devices = + deny_devices = (DeviceIntPtr*)xalloc(stuff->ndeny * sizeof(DeviceIntPtr)); if (!deny_devices) { ErrorF("[Xi] ProcXChangeWindowAccecss: alloc failure.\n"); - SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, 0, + SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, 0, BadImplementation); xfree(perm_devices); @@ -146,15 +146,15 @@ ProcXChangeWindowAccess(ClientPtr client) for (i = 0; i < stuff->ndeny; i++) { - deny_devices[i] = + deny_devices[i] = LookupDeviceIntRec(deviceids[i+stuff->npermit]); - + if (!deny_devices[i]) { xfree(perm_devices); xfree(deny_devices); - SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, - deviceids[i + stuff->npermit], BadDevice); + SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, + deviceids[i + stuff->npermit], BadDevice); return Success; } } @@ -165,11 +165,11 @@ ProcXChangeWindowAccess(ClientPtr client) deny_devices, stuff->ndeny); if (err != Success) { - SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, + SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, stuff->win, err); return Success; } - + xfree(perm_devices); xfree(deny_devices); return Success; diff --git a/Xi/chdevcur.c b/Xi/chdevcur.c index e69a26613..dfa45ee57 100644 --- a/Xi/chdevcur.c +++ b/Xi/chdevcur.c @@ -82,7 +82,7 @@ int ProcXChangeDeviceCursor(ClientPtr client) pDev = LookupDeviceIntRec(stuff->deviceid); if (pDev == NULL) { SendErrorToClient(client, IReqCode, X_ChangeDeviceCursor, 0, - BadDevice); + BadDevice); return Success; } @@ -91,7 +91,7 @@ int ProcXChangeDeviceCursor(ClientPtr client) err = dixLookupWindow(&pWin, stuff->win, client, DixReadWriteAccess); if (err != Success) { - SendErrorToClient(client, IReqCode, X_ChangeDeviceCursor, + SendErrorToClient(client, IReqCode, X_ChangeDeviceCursor, stuff->win, err); return Success; } @@ -103,18 +103,18 @@ int ProcXChangeDeviceCursor(ClientPtr client) pCursor = rootCursor; else pCursor = (CursorPtr)None; - } - else + } + else { pCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, - RT_CURSOR, DixReadAccess); + RT_CURSOR, DixReadAccess); if (!pCursor) { - SendErrorToClient(client, IReqCode, X_ChangeDeviceCursor, + SendErrorToClient(client, IReqCode, X_ChangeDeviceCursor, stuff->cursor, BadCursor); return Success; } - } + } ChangeWindowDeviceCursor(pWin, pDev, pCursor); diff --git a/Xi/chdevhier.c b/Xi/chdevhier.c index 338c07433..ac912f75c 100644 --- a/Xi/chdevhier.c +++ b/Xi/chdevhier.c @@ -90,7 +90,7 @@ ProcXChangeDeviceHierarchy(ClientPtr client) /* XXX: check if client is allowed to change hierarch */ - + any = (xAnyHierarchyChangeInfo*)&stuff[1]; while(stuff->num_changes--) { @@ -108,7 +108,7 @@ ProcXChangeDeviceHierarchy(ClientPtr client) xCreateMasterInfo* c = (xCreateMasterInfo*)any; char* name; int ret; - + SWAPIF(swaps(&c->namelen, n)); name = xcalloc(c->namelen + 1, sizeof(char)); strncpy(name, (char*)&c[1], c->namelen); @@ -138,7 +138,7 @@ ProcXChangeDeviceHierarchy(ClientPtr client) { xRemoveMasterInfo* r = (xRemoveMasterInfo*)any; - if (r->returnMode != AttachToMaster && + if (r->returnMode != AttachToMaster && r->returnMode != Floating) return BadValue; @@ -164,8 +164,8 @@ ProcXChangeDeviceHierarchy(ClientPtr client) * desired. */ if (r->returnMode == AttachToMaster) { - DeviceIntPtr attached, - newptr, + DeviceIntPtr attached, + newptr, newkeybd; newptr = LookupDeviceIntRec(r->returnPointer); @@ -174,8 +174,8 @@ ProcXChangeDeviceHierarchy(ClientPtr client) !newkeybd || !newkeybd->isMaster) return BadDevice; - for (attached = inputInfo.devices; - attached; + for (attached = inputInfo.devices; + attached; attached = attached->next) { if (!attached->isMaster) { @@ -216,7 +216,7 @@ ProcXChangeDeviceHierarchy(ClientPtr client) if ((IsPointerDevice(newmaster) && !IsPointerDevice(ptr)) || (IsKeyboardDevice(newmaster) && - !IsKeyboardDevice(ptr))) + !IsKeyboardDevice(ptr))) return BadDevice; AttachDevice(client, ptr, newmaster); } @@ -234,7 +234,7 @@ ProcXChangeDeviceHierarchy(ClientPtr client) ev.evtype = XI_DeviceHierarchyChangedNotify; ev.time = GetTimeInMillis(); - SendEventToAllWindows(&dummyDev, XI_DeviceHierarchyChangedMask, + SendEventToAllWindows(&dummyDev, XI_DeviceHierarchyChangedMask, (xEvent*)&ev, 1); return Success; } diff --git a/Xi/chpkpair.c b/Xi/chpkpair.c index db8e7f6cd..c44a2635a 100644 --- a/Xi/chpkpair.c +++ b/Xi/chpkpair.c @@ -77,7 +77,7 @@ ProcXChangePointerKeyboardPairing(ClientPtr client) { DeviceIntPtr pPointer, pKeyboard; int ret; - pairingChangedNotify ev; + pairingChangedNotify ev; REQUEST(xChangePointerKeyboardPairingReq); REQUEST_SIZE_MATCH(xChangePointerKeyboardPairingReq); @@ -87,16 +87,16 @@ ProcXChangePointerKeyboardPairing(ClientPtr client) pPointer = LookupDeviceIntRec(stuff->pointer); if (pPointer == NULL) { - SendErrorToClient(client, IReqCode, X_ChangePointerKeyboardPairing, - stuff->pointer, BadDevice); + SendErrorToClient(client, IReqCode, X_ChangePointerKeyboardPairing, + stuff->pointer, BadDevice); return Success; } pKeyboard = LookupDeviceIntRec(stuff->keyboard); if (pKeyboard == NULL) { - SendErrorToClient(client, IReqCode, X_ChangePointerKeyboardPairing, - stuff->keyboard, BadDevice); + SendErrorToClient(client, IReqCode, X_ChangePointerKeyboardPairing, + stuff->keyboard, BadDevice); return Success; } @@ -116,15 +116,15 @@ ProcXChangePointerKeyboardPairing(ClientPtr client) ev.keyboard = pKeyboard->id; ev.length = 0; ev.time = currentTime.milliseconds; - SendEventToAllWindows(inputInfo.pointer, + SendEventToAllWindows(inputInfo.pointer, XI_PointerKeyboardPairingChangedMask, (xEvent*)&ev, 1); return Success; } /* Event swap proc */ -void -SPointerKeyboardPairingChangedNotifyEvent (pairingChangedNotify *from, +void +SPointerKeyboardPairingChangedNotifyEvent (pairingChangedNotify *from, pairingChangedNotify *to) { char n; diff --git a/Xi/closedev.c b/Xi/closedev.c index cd6e53740..f9a0f4f48 100644 --- a/Xi/closedev.c +++ b/Xi/closedev.c @@ -154,7 +154,7 @@ ProcXCloseDevice(ClientPtr client) if (d->deviceGrab.grab && SameClient(d->deviceGrab.grab, client)) (*d->deviceGrab.DeactivateGrab) (d); /* release active grab */ - /* Remove event selections from all windows for events from this device + /* Remove event selections from all windows for events from this device * and selected by this client. * Delete passive grabs from all windows for this device. */ diff --git a/Xi/exevents.c b/Xi/exevents.c index 3ef32006c..511930b8e 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -103,10 +103,10 @@ RegisterOtherDevice(DeviceIntPtr device) } /** - * Main device event processing function. - * Called from when processing the events from the event queue. + * Main device event processing function. + * Called from when processing the events from the event queue. * Generates core events for XI events as needed. - * + * * Note that these core events are then delivered first. For passive grabs, XI * events have preference over core. */ @@ -309,7 +309,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) } } - if (device->deviceGrab.fromPassiveGrab && + if (device->deviceGrab.fromPassiveGrab && (key == device->deviceGrab.activatingKey)) deactivateDeviceGrab = TRUE; } else if (xE->u.u.type == DeviceButtonPress) { @@ -357,7 +357,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) if (xE->u.u.detail <= 5) b->state &= ~((Button1Mask >> 1) << xE->u.u.detail); SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify); - if (!b->state + if (!b->state && device->deviceGrab.fromPassiveGrab) deactivateDeviceGrab = TRUE; } else if (xE->u.u.type == ProximityIn) @@ -413,7 +413,7 @@ InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, int maxval, int resolution, int min_res, int max_res) { AxisInfoPtr ax; - + if (!dev || !dev->valuator) return; @@ -1122,7 +1122,7 @@ DeleteDeviceFromAnyExtEvents(WindowPtr pWin, DeviceIntPtr dev) if (dev->deviceGrab.grab && (dev->deviceGrab.grab->window == pWin)) (*dev->deviceGrab.DeactivateGrab) (dev); - /* If the focus window is a root window (ie. has no parent) + /* If the focus window is a root window (ie. has no parent) * then don't delete the focus from it. */ if (dev->focus && (pWin == dev->focus->win) && (pWin->parent != NullWindow)) { diff --git a/Xi/extgrbdev.c b/Xi/extgrbdev.c index c4011f5c3..7cafdbaab 100644 --- a/Xi/extgrbdev.c +++ b/Xi/extgrbdev.c @@ -55,7 +55,7 @@ from the author. #include "extgrbdev.h" -int +int SProcXExtendedGrabDevice(ClientPtr client) { char n; @@ -89,15 +89,15 @@ SProcXExtendedGrabDevice(ClientPtr client) } -int +int ProcXExtendedGrabDevice(ClientPtr client) { xExtendedGrabDeviceReply rep; DeviceIntPtr dev; - int err = Success, + int err = Success, errval = 0, i; - WindowPtr grab_window, + WindowPtr grab_window, confineTo = 0; CursorPtr cursor = NULL; struct tmask tmp[EMASKSIZE]; @@ -119,7 +119,7 @@ ProcXExtendedGrabDevice(ClientPtr client) rep.length = 0; if (!stuff->ungrab && /* other fields are undefined for ungrab */ - (stuff->length != (sizeof(xExtendedGrabDeviceReq) >> 2) + + (stuff->length != (sizeof(xExtendedGrabDeviceReq) >> 2) + stuff->event_count + 2 * stuff->generic_event_count)) { errval = 0; @@ -141,21 +141,21 @@ ProcXExtendedGrabDevice(ClientPtr client) goto cleanup; } - err = dixLookupWindow(&grab_window, - stuff->grab_window, - client, + err = dixLookupWindow(&grab_window, + stuff->grab_window, + client, DixReadAccess); if (err != Success) { errval = stuff->grab_window; goto cleanup; } - + if (stuff->confine_to) { - err = dixLookupWindow(&confineTo, - stuff->confine_to, - client, + err = dixLookupWindow(&confineTo, + stuff->confine_to, + client, DixReadAccess); if (err != Success) { @@ -166,10 +166,10 @@ ProcXExtendedGrabDevice(ClientPtr client) if (stuff->cursor) { - cursor = (CursorPtr)SecurityLookupIDByType(client, + cursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, - RT_CURSOR, - DixReadAccess); + RT_CURSOR, + DixReadAccess); if (!cursor) { errval = stuff->cursor; @@ -178,11 +178,11 @@ ProcXExtendedGrabDevice(ClientPtr client) } } - if (CreateMaskFromList(client, + if (CreateMaskFromList(client, (XEventClass*)&stuff[1], - stuff->event_count, - tmp, - dev, + stuff->event_count, + tmp, + dev, X_GrabDevice) != Success) return Success; @@ -190,7 +190,7 @@ ProcXExtendedGrabDevice(ClientPtr client) if (stuff->generic_event_count) { - xgeMask = + xgeMask = (XGenericEventMask*)(((XEventClass*)&stuff[1]) + stuff->event_count); gemasks = xcalloc(1, sizeof(GenericMaskRec)); @@ -203,16 +203,16 @@ ProcXExtendedGrabDevice(ClientPtr client) gemasks->eventMask[xgeMask->extension & 0x7F]= xgeMask->evmask; } - ExtGrabDevice(client, dev, stuff->device_mode, - grab_window, confineTo, time, stuff->owner_events, - cursor, tmp[stuff->deviceid].mask, + ExtGrabDevice(client, dev, stuff->device_mode, + grab_window, confineTo, time, stuff->owner_events, + cursor, tmp[stuff->deviceid].mask, gemasks); if (err != Success) { errval = 0; goto cleanup; } - + cleanup: if (gemasks) @@ -221,18 +221,18 @@ cleanup: if (err == Success) { WriteReplyToClient(client, sizeof(xGrabDeviceReply), &rep); - } - else + } + else { - SendErrorToClient(client, IReqCode, - X_ExtendedGrabDevice, + SendErrorToClient(client, IReqCode, + X_ExtendedGrabDevice, errval, err); } return Success; } void -SRepXExtendedGrabDevice(ClientPtr client, int size, +SRepXExtendedGrabDevice(ClientPtr client, int size, xExtendedGrabDeviceReply* rep) { char n; diff --git a/Xi/extinit.c b/Xi/extinit.c index 017b6935a..aed008326 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -133,7 +133,7 @@ Mask ExtExclusiveMasks[EMASKSIZE]; /** - * Filters for various generic events. + * Filters for various generic events. * Evtype is index, mask is value at index. */ static Mask xi_filters[3] = { @@ -355,7 +355,7 @@ ProcIDispatch(ClientPtr client) /******************************************************************************* * - * SProcXDispatch + * SProcXDispatch * * Main swapped dispatch routine for requests to this extension. * This routine is used if server and client do not have the same byte ordering. @@ -659,7 +659,7 @@ SDevicePresenceNotifyEvent (devicePresenceNotify *from, devicePresenceNotify *to swaps(&to->control, n); } -static void +static void SDeviceEnterNotifyEvent (deviceEnterNotify *from, deviceEnterNotify *to) { char n; @@ -669,7 +669,7 @@ SDeviceEnterNotifyEvent (deviceEnterNotify *from, deviceEnterNotify *to) swapl(&to->time, n); } -static void +static void SDeviceLeaveNotifyEvent (deviceLeaveNotify *from, deviceLeaveNotify *to) { char n; @@ -692,7 +692,7 @@ SRawDeviceEvent(rawDeviceEvent* from, rawDeviceEvent *to) char n; int i; CARD32* valptr; - + *to = *from; swaps(&to->sequenceNumber, n); @@ -704,7 +704,7 @@ SRawDeviceEvent(rawDeviceEvent* from, rawDeviceEvent *to) } static void -SDeviceClassesChangedEvent(deviceClassesChangedEvent* from, +SDeviceClassesChangedEvent(deviceClassesChangedEvent* from, deviceClassesChangedEvent* to) { char n; @@ -717,7 +717,7 @@ SDeviceClassesChangedEvent(deviceClassesChangedEvent* from, swaps(&to->sequenceNumber, n); swapl(&to->length, n); swapl(&to->time, n); - + /* now swap the actual classes */ any = (xAnyClassPtr)&to[1]; for (i = 0; i < to->num_classes; i++) @@ -796,7 +796,7 @@ GetNextExtEventMask(void) * * Since extension event types will never be less than 64, we can use * 0-63 in the EventInfo array as the "type" to be used to look up this - * mask. This means that the corresponding macros such as + * mask. This means that the corresponding macros such as * DevicePointerMotionHint must have access to the same constants. * */ @@ -973,7 +973,7 @@ FixExtensionEvents(ExtensionEntry * extEntry) /************************************************************************ * - * This function restores extension event types and masks to their + * This function restores extension event types and masks to their * initial state. * */ @@ -1189,7 +1189,7 @@ SEventIDispatch(xEvent * from, xEvent * to) * EventSwap for generic events coming from the GE extension. */ -static void +static void XIGEEventSwap(xGenericEvent* from, xGenericEvent* to) { int n; @@ -1201,7 +1201,7 @@ XIGEEventSwap(xGenericEvent* from, xGenericEvent* to) SRawDeviceEvent((rawDeviceEvent*)from, (rawDeviceEvent*)to); break; case XI_DeviceClassesChangedNotify: - SDeviceClassesChangedEvent((deviceClassesChangedEvent*)from, + SDeviceClassesChangedEvent((deviceClassesChangedEvent*)from, (deviceClassesChangedEvent*)to); break; } @@ -1211,8 +1211,8 @@ XIGEEventSwap(xGenericEvent* from, xGenericEvent* to) * EventFill to fill various fields for events before they are delivered to * the client. */ -static void -XIGEEventFill(xGenericEvent* ev, DeviceIntPtr pDev, +static void +XIGEEventFill(xGenericEvent* ev, DeviceIntPtr pDev, WindowPtr pWin, GrabPtr grab) { } diff --git a/Xi/fakedevdata.c b/Xi/fakedevdata.c index 64f2ea62c..2ebb7c38c 100644 --- a/Xi/fakedevdata.c +++ b/Xi/fakedevdata.c @@ -74,7 +74,7 @@ SProcXFakeDeviceData(ClientPtr client) return ProcXFakeDeviceData(client);; } -int +int ProcXFakeDeviceData(ClientPtr client) { DeviceIntPtr dev; @@ -92,7 +92,7 @@ ProcXFakeDeviceData(ClientPtr client) dev = LookupDeviceIntRec(stuff->deviceid); if (dev == NULL) { - SendErrorToClient(client, IReqCode, X_FakeDeviceData, 0, BadDevice); + SendErrorToClient(client, IReqCode, X_FakeDeviceData, 0, BadDevice); return Success; } diff --git a/Xi/getcptr.c b/Xi/getcptr.c index d9ca4d360..ba69f9c56 100644 --- a/Xi/getcptr.c +++ b/Xi/getcptr.c @@ -74,8 +74,8 @@ int ProcXGetClientPointer(ClientPtr client) err = dixLookupWindow(&win, stuff->win, client, DixReadAccess); if (err != Success) { - SendErrorToClient(client, IReqCode, X_GetClientPointer, - stuff->win, err); + SendErrorToClient(client, IReqCode, X_GetClientPointer, + stuff->win, err); return Success; } @@ -99,8 +99,8 @@ int ProcXGetClientPointer(ClientPtr client) * */ -void -SRepXGetClientPointer(ClientPtr client, int size, +void +SRepXGetClientPointer(ClientPtr client, int size, xGetClientPointerReply* rep) { char n; diff --git a/Xi/grabacc.c b/Xi/grabacc.c index 59888ee15..83b8736b5 100644 --- a/Xi/grabacc.c +++ b/Xi/grabacc.c @@ -62,7 +62,7 @@ SProcXGrabAccessControl(ClientPtr client) return ProcXGrabAccessControl(client); } -int +int ProcXGrabAccessControl(ClientPtr client) { xGrabAccessControlReply rep; @@ -90,7 +90,7 @@ ProcXGrabAccessControl(ClientPtr client) */ void -SRepXGrabAccessControl(ClientPtr client, int size, +SRepXGrabAccessControl(ClientPtr client, int size, xGrabAccessControlReply* rep) { char n; diff --git a/Xi/grabdev.c b/Xi/grabdev.c index 16f4b7ea2..a963aa4a1 100644 --- a/Xi/grabdev.c +++ b/Xi/grabdev.c @@ -147,12 +147,12 @@ ProcXGrabDevice(ClientPtr client) * * This procedure creates an event mask from a list of XEventClasses. * - * Procedure is as follows: + * Procedure is as follows: * An XEventClass is (deviceid << 8 | eventtype). For each entry in the list, * get the device. Then run through all available event indices (those are * set when XI starts up) and binary OR's the device's mask to whatever the - * event mask for the given event type was. - * If an error occurs, it is sent to the client. Errors are generated if + * event mask for the given event type was. + * If an error occurs, it is sent to the client. Errors are generated if * - if the device given in the event classs is invalid * - if the device in the class list is not the device given as parameter (no * error if parameter is NULL) diff --git a/Xi/listdev.c b/Xi/listdev.c index 1810c9b62..a0be219f7 100644 --- a/Xi/listdev.c +++ b/Xi/listdev.c @@ -186,7 +186,7 @@ CopySwapDevice(ClientPtr client, DeviceIntPtr d, int num_classes, dev->use = IsXExtensionPointer; else dev->use = IsXExtensionDevice; - if (!d->isMaster) + if (!d->isMaster) dev->attached = (d->u.master) ? d->u.master->id : IsFloating; if (client->swapped) { @@ -225,7 +225,7 @@ CopySwapKeyClass(ClientPtr client, KeyClassPtr k, char **buf) * * Devices may have up to 255 valuators. The length of a ValuatorClass is * defined to be sizeof(ValuatorClassInfo) + num_axes * sizeof (xAxisInfo). - * The maximum length is therefore (8 + 255 * 12) = 3068. However, the + * The maximum length is therefore (8 + 255 * 12) = 3068. However, the * length field is one byte. If a device has more than 20 valuators, we * must therefore return multiple valuator classes to the client. * diff --git a/Xi/qryacces.c b/Xi/qryacces.c index 95f2dd0e6..673028c2d 100644 --- a/Xi/qryacces.c +++ b/Xi/qryacces.c @@ -78,8 +78,8 @@ ProcXQueryWindowAccess(ClientPtr client) err = dixLookupWindow(&win, stuff->win, client, DixReadAccess); if (err != Success) { - SendErrorToClient(client, IReqCode, X_QueryWindowAccess, - stuff->win, err); + SendErrorToClient(client, IReqCode, X_QueryWindowAccess, + stuff->win, err); return Success; } @@ -100,8 +100,8 @@ ProcXQueryWindowAccess(ClientPtr client) if (!deviceids) { ErrorF("[Xi] ProcXQueryWindowAccess: xalloc failure.\n"); - SendErrorToClient(client, IReqCode, X_QueryWindowAccess, - 0, BadImplementation); + SendErrorToClient(client, IReqCode, X_QueryWindowAccess, + 0, BadImplementation); return Success; } @@ -117,8 +117,8 @@ ProcXQueryWindowAccess(ClientPtr client) } void -SRepXQueryWindowAccess(ClientPtr client, - int size, +SRepXQueryWindowAccess(ClientPtr client, + int size, xQueryWindowAccessReply* rep) { char n; diff --git a/Xi/querydp.c b/Xi/querydp.c index 6224f1362..85b480279 100644 --- a/Xi/querydp.c +++ b/Xi/querydp.c @@ -86,14 +86,14 @@ ProcXQueryDevicePointer(ClientPtr client) pDev = LookupDeviceIntRec(stuff->deviceid); if (pDev == NULL || pDev->valuator == NULL) { SendErrorToClient(client, IReqCode, X_QueryDevicePointer, - stuff->deviceid, BadDevice); + stuff->deviceid, BadDevice); return Success; } rc = dixLookupWindow(&pWin, stuff->win, client, DixReadAccess); if (rc != Success) { - SendErrorToClient(client, IReqCode, X_QueryDevicePointer, + SendErrorToClient(client, IReqCode, X_QueryDevicePointer, stuff->win, rc); return Success; } @@ -111,7 +111,7 @@ ProcXQueryDevicePointer(ClientPtr client) rep.rootX = pSprite->hot.x; rep.rootY = pSprite->hot.y; rep.child = None; - rep.shared = (pDev->spriteInfo->spriteOwner) ? xFalse : xTrue; + rep.shared = (pDev->spriteInfo->spriteOwner) ? xFalse : xTrue; if (pSprite->hot.pScreen == pWin->drawable.pScreen) { @@ -155,7 +155,7 @@ ProcXQueryDevicePointer(ClientPtr client) */ void -SRepXQueryDevicePointer(ClientPtr client, int size, +SRepXQueryDevicePointer(ClientPtr client, int size, xQueryDevicePointerReply * rep) { char n; diff --git a/Xi/regpair.c b/Xi/regpair.c index cfaddb841..3fe459150 100644 --- a/Xi/regpair.c +++ b/Xi/regpair.c @@ -53,12 +53,12 @@ from the author. /*********************************************************************** * - * This procedure allows a client to register the pairing of a pointer + * This procedure allows a client to register the pairing of a pointer * with a keyboard. * */ -int +int SProcXRegisterPairingClient(ClientPtr client) { char n; @@ -67,7 +67,7 @@ SProcXRegisterPairingClient(ClientPtr client) return ProcXRegisterPairingClient(client); } -int +int ProcXRegisterPairingClient(ClientPtr client) { xRegisterPairingClientReply rep; @@ -96,7 +96,7 @@ ProcXRegisterPairingClient(ClientPtr client) */ void -SRepXRegisterPairingClient(ClientPtr client, int size, +SRepXRegisterPairingClient(ClientPtr client, int size, xRegisterPairingClientReply* rep) { register char n; diff --git a/Xi/sendexev.c b/Xi/sendexev.c index 20b415a1f..12fe7d2cf 100644 --- a/Xi/sendexev.c +++ b/Xi/sendexev.c @@ -110,7 +110,7 @@ SProcXSendExtensionEvent(ClientPtr client) /*********************************************************************** * - * Send an event to some client, as if it had come from an extension input + * Send an event to some client, as if it had come from an extension input * device. * */ diff --git a/Xi/stubs.c b/Xi/stubs.c index 40cd02fe1..744447adc 100644 --- a/Xi/stubs.c +++ b/Xi/stubs.c @@ -88,7 +88,7 @@ CloseInputDevice(DeviceIntPtr d, ClientPtr client) * * Caller: ProcXListInputDevices * - * This is the implementation-dependent routine to initialize an input + * This is the implementation-dependent routine to initialize an input * device to the point that information about it can be listed. * Some implementations open all input devices when the server is first * initialized, and never close them. Other implementations open only @@ -100,12 +100,12 @@ CloseInputDevice(DeviceIntPtr d, ClientPtr client) * This procedure should be used by implementations that do not initialize * all input devices at server startup. It should do device-dependent * initialization for any devices not previously initialized, and call - * AddInputDevice for each of those devices so that a DeviceIntRec will be + * AddInputDevice for each of those devices so that a DeviceIntRec will be * created for them. * * The default implementation is to do nothing (assume all input devices * are initialized during X server initialization and kept open). - * The commented-out sample code shows what you might do if you don't want + * The commented-out sample code shows what you might do if you don't want * the default. * */ @@ -114,7 +114,7 @@ void AddOtherInputDevices(void) { /********************************************************************** - for each uninitialized device, do something like: + for each uninitialized device, do something like: DeviceIntPtr dev; DeviceProc deviceProc; @@ -137,7 +137,7 @@ AddOtherInputDevices(void) * initialized, and never close them. Other implementations open only * the X pointer and keyboard devices during server initialization, * and only open other input devices when some client makes an - * XOpenDevice request. This entry point is for the latter type of + * XOpenDevice request. This entry point is for the latter type of * implementation. * * If the physical device is not already open, do it here. In this case, diff --git a/Xi/warpdevp.c b/Xi/warpdevp.c index 82d71d524..a675bdcd1 100644 --- a/Xi/warpdevp.c +++ b/Xi/warpdevp.c @@ -87,7 +87,7 @@ ProcXWarpDevicePointer(ClientPtr client) if (pDev == NULL) { SendErrorToClient(client, IReqCode, X_WarpDevicePointer, stuff->deviceid, - BadDevice); + BadDevice); return Success; } @@ -96,7 +96,7 @@ ProcXWarpDevicePointer(ClientPtr client) err = dixLookupWindow(&dest, stuff->dst_win, client, DixReadAccess); if (err != Success) { - SendErrorToClient(client, IReqCode, X_WarpDevicePointer, + SendErrorToClient(client, IReqCode, X_WarpDevicePointer, stuff->dst_win, err); return Success; } @@ -114,14 +114,14 @@ ProcXWarpDevicePointer(ClientPtr client) err = dixLookupWindow(&src, stuff->src_win, client, DixReadAccess); if (err != Success) { - SendErrorToClient(client, IReqCode, X_WarpDevicePointer, + SendErrorToClient(client, IReqCode, X_WarpDevicePointer, stuff->src_win, err); return Success; } winX = src->drawable.x; winY = src->drawable.y; - if (src->drawable.pScreen != pSprite->hotPhys.pScreen || + if (src->drawable.pScreen != pSprite->hotPhys.pScreen || x < winX + stuff->src_x || y < winY + stuff->src_y || (stuff->src_width != 0 && From 0bdfeb55fc559ffe0334df69ba6e9e711b26dc18 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 13 Nov 2007 17:31:20 +1030 Subject: [PATCH 260/634] Xi: remove RegisterPairingClient handling. Deprecated with device hierarchy. --- Xi/Makefile.am | 2 - Xi/extinit.c | 8 ---- Xi/regpair.c | 108 ------------------------------------------------- Xi/regpair.h | 43 -------------------- 4 files changed, 161 deletions(-) delete mode 100644 Xi/regpair.c delete mode 100644 Xi/regpair.h diff --git a/Xi/Makefile.am b/Xi/Makefile.am index 407928df1..9c5658d2d 100644 --- a/Xi/Makefile.am +++ b/Xi/Makefile.am @@ -76,8 +76,6 @@ libXi_la_SOURCES = \ queryst.h \ qryacces.c \ qryacces.h \ - regpair.c \ - regpair.h \ selectev.c \ selectev.h \ sendexev.c \ diff --git a/Xi/extinit.c b/Xi/extinit.c index aed008326..07ef2666d 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -109,7 +109,6 @@ SOFTWARE. #include "qryacces.c" #include "querydp.h" #include "queryst.h" -#include "regpair.h" #include "selectev.h" #include "sendexev.h" #include "chgkmap.h" @@ -329,8 +328,6 @@ ProcIDispatch(ClientPtr client) return (ProcXChangeDeviceHierarchy(client)); else if (stuff->data == X_XiSelectEvent) return (ProcXiSelectEvent(client)); - else if (stuff->data == X_RegisterPairingClient) - return (ProcXRegisterPairingClient(client)); else if (stuff->data == X_GrabAccessControl) return (ProcXGrabAccessControl(client)); else if (stuff->data == X_ChangeWindowAccess) @@ -446,8 +443,6 @@ SProcIDispatch(ClientPtr client) return (SProcXChangeDeviceHierarchy(client)); else if (stuff->data == X_XiSelectEvent) return (SProcXiSelectEvent(client)); - else if (stuff->data == X_RegisterPairingClient) - return (SProcXRegisterPairingClient(client)); else if (stuff->data == X_GrabAccessControl) return (SProcXGrabAccessControl(client)); else if (stuff->data == X_ChangeWindowAccess) @@ -539,9 +534,6 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep) else if (rep->RepType == X_QueryDevicePointer) SRepXQueryDevicePointer(client, len, (xQueryDevicePointerReply *) rep); - else if (rep->RepType == X_RegisterPairingClient) - SRepXRegisterPairingClient(client, len, - (xRegisterPairingClientReply *) rep); else if (rep->RepType == X_GrabAccessControl) SRepXGrabAccessControl(client, len, (xGrabAccessControlReply*) rep); diff --git a/Xi/regpair.c b/Xi/regpair.c deleted file mode 100644 index 3fe459150..000000000 --- a/Xi/regpair.c +++ /dev/null @@ -1,108 +0,0 @@ -/* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ - -/*********************************************************************** - * - * Request to authenticate as pairing client - * - */ - -#define NEED_EVENTS -#define NEED_REPLIES - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include /* for inputstr.h */ -#include /* Request macro */ -#include "inputstr.h" /* DeviceIntPtr */ -#include "windowstr.h" /* window structure */ -#include -#include -#include "extnsionst.h" -#include "exevents.h" -#include "exglobals.h" - -#include "regpair.h" - -/*********************************************************************** - * - * This procedure allows a client to register the pairing of a pointer - * with a keyboard. - * - */ - -int -SProcXRegisterPairingClient(ClientPtr client) -{ - char n; - REQUEST(xRegisterPairingClientReq); - swaps(&stuff->length, n); - return ProcXRegisterPairingClient(client); -} - -int -ProcXRegisterPairingClient(ClientPtr client) -{ - xRegisterPairingClientReply rep; - - REQUEST(xRegisterPairingClientReq); - REQUEST_SIZE_MATCH(xRegisterPairingClientReq); - - if (stuff->disable) - UnregisterPairingClient(client); - - rep.repType = X_Reply; - rep.RepType = X_RegisterPairingClient; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.success = stuff->disable || RegisterPairingClient(client); - - WriteReplyToClient(client, sizeof(xRegisterPairingClientReply), &rep); - return Success; -} - -/*********************************************************************** - * - * This procedure writes the reply for the XRegisterPairingClient function, - * if the client and server have a different byte ordering. - * - */ - -void -SRepXRegisterPairingClient(ClientPtr client, int size, - xRegisterPairingClientReply* rep) -{ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - WriteToClient(client, size, (char *)rep); -} - diff --git a/Xi/regpair.h b/Xi/regpair.h deleted file mode 100644 index b2bfaff3e..000000000 --- a/Xi/regpair.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef REGPAIR_H -#define REGPAIR_H 1 - -int SProcXRegisterPairingClient(ClientPtr /* client */); -int ProcXRegisterPairingClient(ClientPtr /* client */); - -void SRepXRegisterPairingClient(ClientPtr /* client */, - int /* size */, - xRegisterPairingClientReply* /* rep */); - -#endif /* REGPAIR_H */ From 240b10fa9c32510a380a73a8acdd8267c81e538b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 14 Nov 2007 12:18:08 +1030 Subject: [PATCH 261/634] Xi: Move updating the device state from POE into separate function. POE now only deals with processing the event and calling the appropriate delivery methods. Actually modifying the device state is done in UpdateDeviceState. This separation should make it easier to avoid setting the state twice when master events are processed. --- Xi/exevents.c | 386 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 233 insertions(+), 153 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 511930b8e..f60f634b7 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -102,31 +102,69 @@ RegisterOtherDevice(DeviceIntPtr device) device->public.realInputProc = ProcessOtherEvent; } -/** - * Main device event processing function. - * Called from when processing the events from the event queue. - * Generates core events for XI events as needed. - * - * Note that these core events are then delivered first. For passive grabs, XI - * events have preference over core. - */ -void -ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) +static void +ChangeMasterDeviceClasses(DeviceIntPtr device, + deviceClassesChangedEvent *dcce) +{ + DeviceIntPtr master = device->u.master; + char* classbuff; + + if (device->isMaster) + return; + + if (!master) /* if device was set floating between SIGIO and now */ + return; + + dcce->deviceid = master->id; + dcce->num_classes = 0; + + master->key = device->key; + master->valuator = device->valuator; + master->button = device->button; + master->focus = device->focus; + master->proximity = device->proximity; + master->absolute = device->absolute; + master->kbdfeed = device->kbdfeed; + master->ptrfeed = device->ptrfeed; + master->intfeed = device->intfeed; + master->stringfeed = device->stringfeed; + master->bell = device->bell; + master->leds = device->leds; + + /* event is already correct size, see comment in GetPointerEvents */ + classbuff = (char*)&dcce[1]; + /* we don't actually swap if there's a NullClient, swapping is done + * later when event is delivered. */ + CopySwapClasses(NullClient, master, &dcce->num_classes, &classbuff); + SendEventToAllWindows(master, XI_DeviceClassesChangedMask, + (xEvent*)dcce, 1); +} + +/** + * Update the device state according to the data in the event. + * + * return values are + * DEFAULT ... process as normal + * DONT_PROCESS ... return immediately from caller + * IS_REPEAT .. event is a repeat event. + */ +#define DEFAULT 0 +#define DONT_PROCESS 1 +#define IS_REPEAT 2 +static int +UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) { - BYTE *kptr; int i; - CARD16 modifiers; - CARD16 mask; - GrabPtr grab = device->deviceGrab.grab; - Bool deactivateDeviceGrab = FALSE; - int key = 0, bit = 0, rootX, rootY; - ButtonClassPtr b = device->button; - KeyClassPtr k = device->key; - ValuatorClassPtr v = device->valuator; - deviceValuator *xV = (deviceValuator *) xE; - BOOL sendCore = FALSE; - xEvent core; - int coretype = 0; + int key = 0, + bit = 0; + + KeyClassPtr k = device->key; + ButtonClassPtr b = device->button; + ValuatorClassPtr v = device->valuator; + deviceValuator *xV = (deviceValuator *) xE; + BYTE *kptr = NULL; + CARD16 modifiers = 0, + mask = 0; /* This event is always the first we get, before the actual events with * the data. However, the way how the DDX is set up, "device" will @@ -134,99 +172,31 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) */ if (GEIsType(xE, IReqCode, XI_DeviceClassesChangedNotify)) { - deviceClassesChangedEvent* dcce = (deviceClassesChangedEvent*)xE; - DeviceIntPtr master = device->u.master; - char* classbuff; - - if (device->isMaster) - return; - - if (!master) /* if device was set floating between SIGIO and now */ - return; - - dcce->deviceid = master->id; - dcce->num_classes = 0; - - master->key = device->key; - master->valuator = device->valuator; - master->button = device->button; - master->focus = device->focus; - master->proximity = device->proximity; - master->absolute = device->absolute; - master->kbdfeed = device->kbdfeed; - master->ptrfeed = device->ptrfeed; - master->intfeed = device->intfeed; - master->stringfeed = device->stringfeed; - master->bell = device->bell; - master->leds = device->leds; - - /* event is already correct size, see comment in GetPointerEvents */ - classbuff = (char*)&xE[1]; - /* we don't actually swap if there's a NullClient, swapping is done - * later when event is delivered. */ - CopySwapClasses(NullClient, master, &dcce->num_classes, &classbuff); - SendEventToAllWindows(master, XI_DeviceClassesChangedMask, xE, 1); - return; + ChangeMasterDeviceClasses(device, (deviceClassesChangedEvent*)xE); + return DONT_PROCESS; /* event has been sent already */ } - coretype = XItoCoreType(xE->u.u.type); - if (device->isMaster && device->coreEvents && coretype) - sendCore = TRUE; + /* currently no other generic event modifies the device */ + if (xE->u.u.type == GenericEvent) + return DEFAULT; - if (device->isMaster) - CheckMotion(xE, device); - - if (xE->u.u.type != DeviceValuator && xE->u.u.type != GenericEvent) { - DeviceIntPtr mouse = NULL, kbd = NULL; - GetSpritePosition(device, &rootX, &rootY); - xE->u.keyButtonPointer.rootX = rootX; - xE->u.keyButtonPointer.rootY = rootY; - key = xE->u.u.detail; - NoticeEventTime(xE); - - /* If 'device' is a pointer device, we need to get the paired keyboard - * for the state. If there is none, the kbd bits of state are 0. - * If 'device' is a keyboard device, get the paired pointer and use the - * pointer's state for the button bits. - */ - if (IsPointerDevice(device)) - { - kbd = GetPairedDevice(device); - mouse = device; - } - else - { - mouse = GetPairedDevice(device); - kbd = device; - } - xE->u.keyButtonPointer.state = (kbd) ? (kbd->key->state) : 0; - xE->u.keyButtonPointer.state |= (mouse) ? (mouse->button->state) : 0; - - bit = 1 << (key & 7); + if (xE->u.u.type != DeviceValuator) + { + key = xE->u.u.detail; + bit = 1 << (key & 7); } - if (DeviceEventCallback) { - DeviceEventInfoRec eventinfo; - eventinfo.events = (xEventPtr) xE; - eventinfo.count = count; - CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo); - } - for (i = 1; i < count; i++) + /* Update device axis */ + for (i = 1; i < count; i++) { if ((++xV)->type == DeviceValuator) { - int first = xV->first_valuator; int *axisvals; + int first = xV->first_valuator; - if (xV->num_valuators - && (!v - || (xV->num_valuators - && (first + xV->num_valuators > v->numAxes)))) + if (xV->num_valuators && + (!v || (xV->num_valuators && + (first + xV->num_valuators > v->numAxes)))) FatalError("Bad valuators reported for device %s\n", device->name); - xV->device_state = 0; - if (k) - xV->device_state |= k->state; - if (b) - xV->device_state |= b->state; if (v && v->axisVal) { axisvals = v->axisVal; switch (xV->num_valuators) { @@ -248,22 +218,16 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) } } } + } if (xE->u.u.type == DeviceKeyPress) { if (!k) - return; + return DONT_PROCESS; modifiers = k->modifierMap[key]; kptr = &k->down[key >> 3]; if (*kptr & bit) { /* allow ddx to generate multiple downs */ - if (!modifiers) { - xE->u.u.type = DeviceKeyRelease; - ProcessOtherEvent(xE, device, count); - xE->u.u.type = DeviceKeyPress; - /* release can have side effects, don't fall through */ - ProcessOtherEvent(xE, device, count); - } - return; + return IS_REPEAT; } if (device->valuator) device->valuator->motionHintWindow = NullWindow; @@ -277,22 +241,13 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) modifiers &= ~mask; } } - /* XI grabs have priority */ - core = *xE; - core.u.u.type = coretype; - if (!grab && - (CheckDeviceGrabs(device, xE, 0, count) || - (sendCore && CheckDeviceGrabs(device, &core, 0, 1)))) { - device->deviceGrab.activatingKey = key; - return; - } } else if (xE->u.u.type == DeviceKeyRelease) { if (!k) - return; + return DONT_PROCESS; kptr = &k->down[key >> 3]; if (!(*kptr & bit)) /* guard against duplicates */ - return; + return DONT_PROCESS; modifiers = k->modifierMap[key]; if (device->valuator) device->valuator->motionHintWindow = NullWindow; @@ -308,26 +263,167 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) modifiers &= ~mask; } } - - if (device->deviceGrab.fromPassiveGrab && - (key == device->deviceGrab.activatingKey)) - deactivateDeviceGrab = TRUE; } else if (xE->u.u.type == DeviceButtonPress) { if (!b) - return; + return DONT_PROCESS; kptr = &b->down[key >> 3]; *kptr |= bit; if (device->valuator) device->valuator->motionHintWindow = NullWindow; - b->buttonsDown++; + if (!device->isMaster) + b->buttonsDown++; b->motionMask = DeviceButtonMotionMask; + if (!device->isMaster && !b->map[key]) /* bit already unset for MDs */ + return DONT_PROCESS; + if (b->map[key] <= 5) + b->state |= (Button1Mask >> 1) << b->map[key]; + SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify); + } else if (xE->u.u.type == DeviceButtonRelease) { + if (!b) + return DONT_PROCESS; + + kptr = &b->down[key >> 3]; + if (!(*kptr & bit)) + return DONT_PROCESS; + *kptr &= ~bit; + if (device->valuator) + device->valuator->motionHintWindow = NullWindow; + if (!device->isMaster) + b->buttonsDown--; + if (b->buttonsDown >= 1 && !b->buttonsDown) + b->motionMask = 0; + if (!b->map[key]) + return DONT_PROCESS; + if (b->map[key] <= 5) + b->state &= ~((Button1Mask >> 1) << b->map[key]); + SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify); + } else if (xE->u.u.type == ProximityIn) + device->valuator->mode &= ~OutOfProximity; + else if (xE->u.u.type == ProximityOut) + device->valuator->mode |= OutOfProximity; + + return DEFAULT; +} + +/** + * Main device event processing function. + * Called from when processing the events from the event queue. + * Generates core events for XI events as needed. + * + * Note that these core events are then delivered first. For passive grabs, XI + * events have preference over core. + */ +void +ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) +{ + int i; + CARD16 modifiers; + GrabPtr grab = device->deviceGrab.grab; + Bool deactivateDeviceGrab = FALSE; + int key = 0, rootX, rootY; + ButtonClassPtr b = device->button; + KeyClassPtr k = device->key; + ValuatorClassPtr v = device->valuator; + deviceValuator *xV = (deviceValuator *) xE; + BOOL sendCore = FALSE; + xEvent core; + int coretype = 0; + int ret = 0; + + ret = UpdateDeviceState(device, xE, count); + if (ret == DONT_PROCESS) + return; + + coretype = XItoCoreType(xE->u.u.type); + if (device->isMaster && device->coreEvents && coretype) + sendCore = TRUE; + + if (device->isMaster) + CheckMotion(xE, device); + + if (xE->u.u.type != DeviceValuator && xE->u.u.type != GenericEvent) { + DeviceIntPtr mouse = NULL, kbd = NULL; + GetSpritePosition(device, &rootX, &rootY); + xE->u.keyButtonPointer.rootX = rootX; + xE->u.keyButtonPointer.rootY = rootY; + NoticeEventTime(xE); + + /* If 'device' is a pointer device, we need to get the paired keyboard + * for the state. If there is none, the kbd bits of state are 0. + * If 'device' is a keyboard device, get the paired pointer and use the + * pointer's state for the button bits. + */ + if (IsPointerDevice(device)) + { + kbd = GetPairedDevice(device); + mouse = device; + } + else + { + mouse = GetPairedDevice(device); + kbd = device; + } + xE->u.keyButtonPointer.state = (kbd) ? (kbd->key->state) : 0; + xE->u.keyButtonPointer.state |= (mouse) ? (mouse->button->state) : 0; + + key = xE->u.u.detail; + } + if (DeviceEventCallback) { + DeviceEventInfoRec eventinfo; + + eventinfo.events = (xEventPtr) xE; + eventinfo.count = count; + CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo); + } + + /* Valuator event handling */ + for (i = 1; i < count; i++) { + if ((++xV)->type == DeviceValuator) { + int first = xV->first_valuator; + if (xV->num_valuators + && (!v + || (xV->num_valuators + && (first + xV->num_valuators > v->numAxes)))) + FatalError("Bad valuators reported for device %s\n", + device->name); + xV->device_state = 0; + if (k) + xV->device_state |= k->state; + if (b) + xV->device_state |= b->state; + } + } + + if (xE->u.u.type == DeviceKeyPress) { + if (ret == IS_REPEAT) { /* allow ddx to generate multiple downs */ + modifiers = k->modifierMap[key]; + if (!modifiers) { + xE->u.u.type = DeviceKeyRelease; + ProcessOtherEvent(xE, device, count); + xE->u.u.type = DeviceKeyPress; + /* release can have side effects, don't fall through */ + ProcessOtherEvent(xE, device, count); + } + return; + } + /* XI grabs have priority */ + core = *xE; + core.u.u.type = coretype; + if (!grab && + (CheckDeviceGrabs(device, xE, 0, count) || + (sendCore && CheckDeviceGrabs(device, &core, 0, 1)))) { + device->deviceGrab.activatingKey = key; + return; + } + } else if (xE->u.u.type == DeviceKeyRelease) { + if (device->deviceGrab.fromPassiveGrab && + (key == device->deviceGrab.activatingKey)) + deactivateDeviceGrab = TRUE; + } else if (xE->u.u.type == DeviceButtonPress) { xE->u.u.detail = b->map[key]; if (xE->u.u.detail == 0) return; - if (xE->u.u.detail <= 5) - b->state |= (Button1Mask >> 1) << xE->u.u.detail; - SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify); if (!grab) { core = *xE; @@ -342,28 +438,12 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) } } else if (xE->u.u.type == DeviceButtonRelease) { - if (!b) - return; - - kptr = &b->down[key >> 3]; - *kptr &= ~bit; - if (device->valuator) - device->valuator->motionHintWindow = NullWindow; - if (b->buttonsDown >= 1 && !--b->buttonsDown) - b->motionMask = 0; xE->u.u.detail = b->map[key]; if (xE->u.u.detail == 0) return; - if (xE->u.u.detail <= 5) - b->state &= ~((Button1Mask >> 1) << xE->u.u.detail); - SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify); - if (!b->state - && device->deviceGrab.fromPassiveGrab) + if (!b->state && device->deviceGrab.fromPassiveGrab) deactivateDeviceGrab = TRUE; - } else if (xE->u.u.type == ProximityIn) - device->valuator->mode &= ~OutOfProximity; - else if (xE->u.u.type == ProximityOut) - device->valuator->mode |= OutOfProximity; + } if (sendCore) { From b44c1118f3bab6d5f28fa42e0c322fbaec005012 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 14 Nov 2007 14:08:21 +1030 Subject: [PATCH 262/634] dix: Return Success from ProcBell if no BellProc is set. We must not return BadDevice, this causes applications to crash. If no BellProc is set, just quietly do nothing and report a Success. --- dix/devices.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index fa80a0c32..2960e0950 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2011,8 +2011,13 @@ ProcBell(ClientPtr client) REQUEST(xBellReq); REQUEST_SIZE_MATCH(xBellReq); + /* Seems like no keyboard actually has the BellProc set. Returning + * BadDevice (previous code) will make apps crash badly. The man pages + * doesn't say anything about a BadDevice being returned either. + * So just quietly do nothing and pretend everything has worked. + */ if (!keybd->kbdfeed->BellProc) - return BadDevice; + return Success; if (stuff->percent < -100 || stuff->percent > 100) { client->errorValue = stuff->percent; From cc4586df600af571815d5cdda2028c0d074c8469 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 14 Nov 2007 14:27:52 +1030 Subject: [PATCH 263/634] Xi: toggle the public.devPrivate as well when switching device classes. The master needs to have the same devPrivate as the slave, in case a client issues a request that goes down to the driver. Example: if a driver wants to ring the keyboard bell, it'll pick a keyboard. The KeyClassPtr will direct it to the matching method in the driver, but because the MD doesn't have the devPrivate set the driver segfaults. Even if all drivers were updated to not dereference the nullpointer, nothing would actually ever happen. To avoid this, we flip the master's public.devPrivate to the last SDs devPrivate. --- Xi/exevents.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Xi/exevents.c b/Xi/exevents.c index f60f634b7..91035c7cb 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -118,6 +118,7 @@ ChangeMasterDeviceClasses(DeviceIntPtr device, dcce->deviceid = master->id; dcce->num_classes = 0; + master->public.devicePrivate = device->public.devicePrivate; master->key = device->key; master->valuator = device->valuator; master->button = device->button; From 64711a094893e83764bbeda538c6e877ebe2af79 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 15 Nov 2007 10:41:34 +1030 Subject: [PATCH 264/634] Xi: When switching MD classes, make a deep copy instead of pointer flip. Turns out it's really really hard synchronising device state across multiple duplicated events if they all share the same struct. So instead of doing so, when the SD changes deep-copy all it's classes into the MD. The MD then has the same capabilities, but the state can be set separately. This should fix xkb, key state, repeat etc. problems. Updating the device state allows us to remove the SwitchCoreKeyboard from the event gathering, it's all done during event processing now. --- Xi/exevents.c | 214 ++++++++++++++++++++++++++++++++++++++++++------ dix/getevents.c | 57 ------------- include/input.h | 3 +- 3 files changed, 192 insertions(+), 82 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 91035c7cb..1bf6c5179 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -76,7 +76,9 @@ SOFTWARE. #include "listdev.h" /* for CopySwapXXXClass */ #ifdef XKB +#include #include "xkbsrv.h" +extern Bool XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies); #endif #define WID(w) ((w) ? ((w)->drawable.id) : 0) @@ -102,6 +104,154 @@ RegisterOtherDevice(DeviceIntPtr device) device->public.realInputProc = ProcessOtherEvent; } +/** + * Copy the device->key into master->key and send a mapping notify to the + * clients if appropriate. + * master->key needs to be allocated by the caller. + * + * Device is the slave device. If it is attached to a master device, we may + * need to send a mapping notify to the client because it causes the MD + * to change state. + * + * Mapping notify needs to be sent in the following cases: + * - different slave device on same master + * - different master + * + * XXX: They way how the code is we also send a map notify if the slave device + * stays the same, but the master changes. This isn't really necessary though. + * + * XXX: this gives you funny behaviour with the ClientPointer. When a + * MappingNotify is sent to the client, the client usually responds with a + * GetKeyboardMapping. This will retrieve the ClientPointer's keyboard + * mapping, regardless of which keyboard sent the last mapping notify request. + * So depending on the CP setting, your keyboard may change layout in each + * app... + * + * This code is basically the old SwitchCoreKeyboard. + */ + +static void +CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master) +{ + static DeviceIntPtr lastMapNotifyDevice = NULL; + KeyClassPtr mk, dk; /* master, device */ + BOOL sendNotify = FALSE; + int i; + + if (device == master) + return; + + dk = device->key; + mk = master->key; + + if (master->devPrivates[CoreDevicePrivatesIndex].ptr != device) { + memcpy(mk->modifierMap, dk->modifierMap, MAP_LENGTH); + + mk->modifierKeyMap = xcalloc(8, dk->maxKeysPerModifier); + if (!mk->modifierKeyMap) + FatalError("[Xi] no memory for class shift.\n"); + memcpy(mk->modifierKeyMap, dk->modifierKeyMap, + (8 * dk->maxKeysPerModifier)); + + mk->maxKeysPerModifier = dk->maxKeysPerModifier; + mk->curKeySyms.minKeyCode = dk->curKeySyms.minKeyCode; + mk->curKeySyms.maxKeyCode = dk->curKeySyms.maxKeyCode; + SetKeySymsMap(&mk->curKeySyms, &dk->curKeySyms); + + /* + * Copy state from the extended keyboard to core. If you omit this, + * holding Ctrl on keyboard one, and pressing Q on keyboard two, will + * cause your app to quit. This feels wrong to me, hence the below + * code. + * + * XXX: If you synthesise core modifier events, the state will get + * clobbered here. You'll have to work out something sensible + * to fix that. Good luck. + */ + +#define KEYBOARD_MASK (ShiftMask | LockMask | ControlMask | Mod1Mask | \ + Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask) + mk->state &= ~(KEYBOARD_MASK); + mk->state |= (dk->state & KEYBOARD_MASK); +#undef KEYBOARD_MASK + for (i = 0; i < 8; i++) + mk->modifierKeyCount[i] = dk->modifierKeyCount[i]; + +#ifdef XKB + if (!mk->xkbInfo || !mk->xkbInfo->desc) + XkbInitDevice(master); + if (!noXkbExtension && dk->xkbInfo && dk->xkbInfo->desc) { + if (!XkbCopyKeymap(dk->xkbInfo->desc, mk->xkbInfo->desc, True)) + FatalError("Couldn't pivot keymap from device to core!\n"); + } +#endif + + master->devPrivates[CoreDevicePrivatesIndex].ptr = device; + sendNotify = TRUE; + } else if (lastMapNotifyDevice != master) + sendNotify = TRUE; + + if (sendNotify) + { + SendMappingNotify(master, MappingKeyboard, + mk->curKeySyms.minKeyCode, + (mk->curKeySyms.maxKeyCode - + mk->curKeySyms.minKeyCode), + serverClient); + lastMapNotifyDevice = master; + } +} + +_X_EXPORT void +DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) +{ +#define ALLOC_COPY_CLASS_IF(field, type) \ + if (from->field)\ + { \ + to->field = xcalloc(1, sizeof(type)); \ + if (!to->field) \ + FatalError("[Xi] no memory for class shift.\n"); \ + memcpy(to->field, from->field, sizeof(type)); \ + } + + ALLOC_COPY_CLASS_IF(key, KeyClassRec); + if (to->key) + { +#ifdef XKB + to->key->xkbInfo = NULL; +#endif + CopyKeyClass(from, to); + } + + if (from->valuator) + { + ValuatorClassPtr v; + to->valuator = xalloc(sizeof(ValuatorClassRec) + + from->valuator->numAxes * sizeof(AxisInfo) + + from->valuator->numAxes * sizeof(unsigned int)); + v = to->valuator; + if (!v) + FatalError("[Xi] no memory for class shift.\n"); + memcpy(v, from->valuator, sizeof(ValuatorClassRec)); + v->axes = (AxisInfoPtr)&v[1]; + memcpy(v->axes, from->valuator->axes, v->numAxes * sizeof(AxisInfo)); + } + + ALLOC_COPY_CLASS_IF(button, ButtonClassRec); + /* XXX: XkbAction needs to be copied */ + ALLOC_COPY_CLASS_IF(focus, FocusClassRec); + ALLOC_COPY_CLASS_IF(proximity, ProximityClassRec); + ALLOC_COPY_CLASS_IF(absolute, AbsoluteClassRec); + ALLOC_COPY_CLASS_IF(kbdfeed, KbdFeedbackClassRec); + /* XXX: XkbSrvLedInfo needs to be copied*/ + ALLOC_COPY_CLASS_IF(ptrfeed, PtrFeedbackClassRec); + ALLOC_COPY_CLASS_IF(intfeed, IntegerFeedbackClassRec); + ALLOC_COPY_CLASS_IF(stringfeed, StringFeedbackClassRec); + ALLOC_COPY_CLASS_IF(bell, BellFeedbackClassRec); + ALLOC_COPY_CLASS_IF(leds, LedFeedbackClassRec); + /* XXX: XkbSrvLedInfo needs to be copied. */ +} + static void ChangeMasterDeviceClasses(DeviceIntPtr device, deviceClassesChangedEvent *dcce) @@ -119,21 +269,31 @@ ChangeMasterDeviceClasses(DeviceIntPtr device, dcce->num_classes = 0; master->public.devicePrivate = device->public.devicePrivate; - master->key = device->key; - master->valuator = device->valuator; - master->button = device->button; - master->focus = device->focus; - master->proximity = device->proximity; - master->absolute = device->absolute; - master->kbdfeed = device->kbdfeed; - master->ptrfeed = device->ptrfeed; - master->intfeed = device->intfeed; - master->stringfeed = device->stringfeed; - master->bell = device->bell; - master->leds = device->leds; + + if (master->key) + xfree(master->key->modifierKeyMap); +#ifdef XKB + if (master->key && master->key->xkbInfo) + XkbFreeInfo(master->key->xkbInfo); +#endif + xfree(master->key); master->key = NULL; + xfree(master->valuator); master->valuator = NULL; + xfree(master->button); master->button = NULL; + xfree(master->focus); master->focus = NULL; + xfree(master->proximity); master->proximity = NULL; + xfree(master->absolute); master->absolute = NULL; + xfree(master->kbdfeed); master->kbdfeed = NULL; + xfree(master->ptrfeed); master->ptrfeed = NULL; + xfree(master->stringfeed); master->stringfeed = NULL; + xfree(master->bell); master->bell = NULL; + xfree(master->leds); master->leds = NULL; + xfree(master->intfeed); master->intfeed = NULL; + + DeepCopyDeviceClasses(device, master); /* event is already correct size, see comment in GetPointerEvents */ classbuff = (char*)&dcce[1]; + /* we don't actually swap if there's a NullClient, swapping is done * later when event is delivered. */ CopySwapClasses(NullClient, master, &dcce->num_classes, &classbuff); @@ -159,9 +319,9 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) int key = 0, bit = 0; - KeyClassPtr k = device->key; - ButtonClassPtr b = device->button; - ValuatorClassPtr v = device->valuator; + KeyClassPtr k = NULL; + ButtonClassPtr b = NULL; + ValuatorClassPtr v = NULL; deviceValuator *xV = (deviceValuator *) xE; BYTE *kptr = NULL; CARD16 modifiers = 0, @@ -181,6 +341,11 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) if (xE->u.u.type == GenericEvent) return DEFAULT; + k = device->key; + v = device->valuator; + b = device->button; + + if (xE->u.u.type != DeviceValuator) { key = xE->u.u.detail; @@ -272,10 +437,9 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) *kptr |= bit; if (device->valuator) device->valuator->motionHintWindow = NullWindow; - if (!device->isMaster) - b->buttonsDown++; + b->buttonsDown++; b->motionMask = DeviceButtonMotionMask; - if (!device->isMaster && !b->map[key]) /* bit already unset for MDs */ + if (!b->map[key]) return DONT_PROCESS; if (b->map[key] <= 5) b->state |= (Button1Mask >> 1) << b->map[key]; @@ -290,9 +454,7 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) *kptr &= ~bit; if (device->valuator) device->valuator->motionHintWindow = NullWindow; - if (!device->isMaster) - b->buttonsDown--; - if (b->buttonsDown >= 1 && !b->buttonsDown) + if (b->buttonsDown >= 1 && !--b->buttonsDown) b->motionMask = 0; if (!b->map[key]) return DONT_PROCESS; @@ -323,9 +485,9 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) GrabPtr grab = device->deviceGrab.grab; Bool deactivateDeviceGrab = FALSE; int key = 0, rootX, rootY; - ButtonClassPtr b = device->button; - KeyClassPtr k = device->key; - ValuatorClassPtr v = device->valuator; + ButtonClassPtr b; + KeyClassPtr k; + ValuatorClassPtr v; deviceValuator *xV = (deviceValuator *) xE; BOOL sendCore = FALSE; xEvent core; @@ -336,6 +498,10 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) if (ret == DONT_PROCESS) return; + v = device->valuator; + b = device->button; + k = device->key; + coretype = XItoCoreType(xE->u.u.type); if (device->isMaster && device->coreEvents && coretype) sendCore = TRUE; diff --git a/dix/getevents.c b/dix/getevents.c index b0211b61a..20beff370 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -865,63 +865,6 @@ GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type, return num_events; } - -/** - * pDev is the slave device that is about to send an event. If it is attached - * to a master device, then we need to send a mapping notify to the client. - * To do so, we need to remember the last master device that sent a mapping - * event. - * - * Mapping notify needs to be sent in the following cases: - * - different slave device on same master - * - different master - * - * Call this just before processInputProc. - * - * XXX: They way how the code is we also send a map notify if the slave device - * stays the same, but the master changes. This isn't really necessary though. - * - * XXX: this gives you funny behaviour with the ClientPointer. When a - * MappingNotify is sent to the client, the client usually responds with a - * GetKeyboardMapping. This will retrieve the ClientPointer's keyboard - * mapping, regardless of which keyboard sent the last mapping notify request. - * So depending on the CP setting, your keyboard may change layout in each - * app... - */ -_X_EXPORT void -SwitchCoreKeyboard(DeviceIntPtr pDev) -{ - static DeviceIntPtr lastMapNotifyDevice = NULL; - DeviceIntPtr master; - KeyClassPtr ckeyc; - int i = 0; - BOOL sendNotify = FALSE; - - if (pDev->isMaster || !pDev->u.master) - return; - - master = pDev->u.master; - ckeyc = master->key; - - if (master->devPrivates[CoreDevicePrivatesIndex].ptr != pDev) { - master->devPrivates[CoreDevicePrivatesIndex].ptr = pDev; - sendNotify = TRUE; - } - - if (lastMapNotifyDevice != master) - sendNotify = TRUE; - - if (sendNotify) - { - SendMappingNotify(pDev, MappingKeyboard, ckeyc->curKeySyms.minKeyCode, - (ckeyc->curKeySyms.maxKeyCode - - ckeyc->curKeySyms.minKeyCode), - serverClient); - lastMapNotifyDevice = master; - } -} - - /** * Note that pDev was the last function to send a core pointer event. * Currently a no-op. diff --git a/include/input.h b/include/input.h index dbf6aee20..91ce4eeef 100644 --- a/include/input.h +++ b/include/input.h @@ -458,7 +458,6 @@ extern int GetMotionHistory( unsigned long stop, ScreenPtr pScreen); -extern void SwitchCoreKeyboard(DeviceIntPtr pDev); extern void SwitchCorePointer(DeviceIntPtr pDev); extern DeviceIntPtr LookupDeviceIntRec( @@ -483,6 +482,8 @@ extern DeviceIntPtr NextFreePointerDevice(void); extern int AllocMasterDevice(char* name, DeviceIntPtr* ptr, DeviceIntPtr* keybd); +extern void DeepCopyDeviceClasses(DeviceIntPtr from, + DeviceIntPtr to); /* Window/device based access control */ extern Bool ACRegisterClient(ClientPtr client); From a08665d4d3b0a7d567a90bb9bbfe4abafd6f3887 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 15 Nov 2007 10:42:29 +1030 Subject: [PATCH 265/634] mi: don't call SwitchCoreKeyboard, we switch during event processing now. --- mi/mieq.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/mi/mieq.c b/mi/mieq.c index 11439cfac..5dcc40461 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -331,23 +331,13 @@ mieqProcessInputEvents(void) return; } - /* Make sure our keymap, et al, is changed to suit. */ - if ((e->events->event[0].u.u.type == DeviceKeyPress || - e->events->event[0].u.u.type == DeviceKeyRelease || - e->events->event[0].u.u.type == KeyPress || - e->events->event[0].u.u.type == KeyRelease) && - !e->pDev->isMaster) - { - SwitchCoreKeyboard(e->pDev); - } - /* FIXME: Bad hack. The only event where we actually get multiple * events at once is a DeviceMotionNotify followed by * DeviceValuators. For now it's save enough to just take the * event directly or copy the bunch of events and pass in the * copy. Eventually the interface for the processInputProc needs * to be changed. (whot) - */ + */ if (e->nevents > 1) { int i; @@ -372,7 +362,7 @@ mieqProcessInputEvents(void) if (!e->pDev->isMaster && e->pDev->u.master) { - e->pDev->u.master->public.processInputProc(master_event, + e->pDev->u.master->public.processInputProc(master_event, e->pDev->u.master, e->nevents); } @@ -382,7 +372,7 @@ mieqProcessInputEvents(void) } /* Update the sprite now. Next event may be from different device. */ - if (e->events->event[0].u.u.type == DeviceMotionNotify + if (e->events->event[0].u.u.type == DeviceMotionNotify && e->pDev->coreEvents) { miPointerUpdateSprite(e->pDev); From c758e5a664a52045ad419340044beebb6774a336 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 15 Nov 2007 10:47:20 +1030 Subject: [PATCH 266/634] dix: Make sure core MDs copy their initial classes before they are used. Anything in dev->key, dev->valuator etc. of a MD must always be a copy of the original class. The intial classes of an MD (the ones set up before an SD is attached) as well, as we may have to restore them if no SD is attached anymore. --- dix/devices.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index 2960e0950..65d19806f 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -402,6 +402,7 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what) XkbComponentNamesRec names; #endif ClassesPtr classes; + DeviceIntRec dummy; switch (what) { case DEVICE_INIT: @@ -460,6 +461,19 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what) classes->stringfeed = pDev->stringfeed; classes->bell = pDev->bell; classes->leds = pDev->leds; + + /* Each time we switch classes we free the MD's classes and copy the + * SD's classes into the MD. We mustn't lose the first set of classes + * though as we need it to restore them when the last SD disconnects. + * + * So we create a fake device, seem to copy from the fake to the real + * one, thus ending up with a copy of the original ones in our MD. + * + * If we don't do that, we're in SIGABRT territory (double-frees, etc) + */ + memcpy(&dummy, pDev, sizeof(DeviceIntRec)); + DeepCopyDeviceClasses(&dummy, pDev); + pDev->devPrivates[MasterDevClassesPrivIdx].ptr = classes; break; @@ -485,6 +499,7 @@ CorePointerProc(DeviceIntPtr pDev, int what) BYTE map[33]; int i = 0; ClassesPtr classes; + DeviceIntRec dummy; switch (what) { @@ -519,6 +534,10 @@ CorePointerProc(DeviceIntPtr pDev, int what) classes->bell = pDev->bell; classes->leds = pDev->leds; + /* See comment in CoreKeyboardProc. */ + memcpy(&dummy, pDev, sizeof(DeviceIntRec)); + DeepCopyDeviceClasses(&dummy, pDev); + pDev->devPrivates[MasterDevClassesPrivIdx].ptr = classes; break; @@ -568,7 +587,6 @@ InitCoreDevices(void) ActivateDevice(inputInfo.keyboard); ActivateDevice(inputInfo.pointer); - } /** From b05246696d14bd35aa53b49302707b51206c72a6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 15 Nov 2007 11:31:43 +1030 Subject: [PATCH 267/634] Xi: free XkbSrvLedInfos as well when freeing an MD's device classes. --- Xi/exevents.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Xi/exevents.c b/Xi/exevents.c index 1bf6c5179..158f523f0 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -278,14 +278,23 @@ ChangeMasterDeviceClasses(DeviceIntPtr device, #endif xfree(master->key); master->key = NULL; xfree(master->valuator); master->valuator = NULL; + /* XXX: xkb_acts needs to be freed for master->button */ xfree(master->button); master->button = NULL; xfree(master->focus); master->focus = NULL; xfree(master->proximity); master->proximity = NULL; xfree(master->absolute); master->absolute = NULL; +#ifdef XKB + if (master->kbdfeed && master->kbdfeed->xkb_sli) + XkbFreeSrvLedInfo(master->kbdfeed->xkb_sli); +#endif xfree(master->kbdfeed); master->kbdfeed = NULL; xfree(master->ptrfeed); master->ptrfeed = NULL; xfree(master->stringfeed); master->stringfeed = NULL; xfree(master->bell); master->bell = NULL; +#ifdef XKB + if (master->leds && master->leds->xkb_sli) + XkbFreeSrvLedInfo(master->leds->xkb_sli); +#endif xfree(master->leds); master->leds = NULL; xfree(master->intfeed); master->intfeed = NULL; From 1635832c1635374033686d3a943b77adbd60bb98 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 15 Nov 2007 11:35:07 +1030 Subject: [PATCH 268/634] Revert "xkb: disable xkb key repeats (temporarily)" This reverts commit 2b1d946392ce28b96941341778b2b526aa0fb126. --- xkb/xkbPrKeyEv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/xkb/xkbPrKeyEv.c b/xkb/xkbPrKeyEv.c index 147df3e4c..f007f75f2 100644 --- a/xkb/xkbPrKeyEv.c +++ b/xkb/xkbPrKeyEv.c @@ -76,7 +76,6 @@ int xiEvent; if ((behavior.type&XkbKB_Permanent)==0) { switch (behavior.type) { case XkbKB_Default: -#if 0 if (( xE->u.u.type == KeyPress || xE->u.u.type == DeviceKeyPress) && (keyc->down[key>>3] & (1<<(key&7)))) { @@ -113,7 +112,6 @@ int xiEvent; XkbLastRepeatEvent= NULL; return; } -#endif break; case XkbKB_Lock: if ( xE->u.u.type == KeyRelease || From 18833d648fd7e1a5e962b93636bbbb38aca9c454 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 15 Nov 2007 12:13:59 +1030 Subject: [PATCH 269/634] Xi: reset xkb-stuff to NULL after copying (DeepCopyDeviceClasses) Having two devices point to the same xkb stuff causes SIGABRTs. Also, don't init a MD's xkbInfo unless the SD has an xkbInfo. --- Xi/exevents.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 158f523f0..f9ea1c9ac 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -178,9 +178,9 @@ CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master) mk->modifierKeyCount[i] = dk->modifierKeyCount[i]; #ifdef XKB - if (!mk->xkbInfo || !mk->xkbInfo->desc) - XkbInitDevice(master); if (!noXkbExtension && dk->xkbInfo && dk->xkbInfo->desc) { + if (!mk->xkbInfo || !mk->xkbInfo->desc) + XkbInitDevice(master); if (!XkbCopyKeymap(dk->xkbInfo->desc, mk->xkbInfo->desc, True)) FatalError("Couldn't pivot keymap from device to core!\n"); } @@ -238,18 +238,36 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) } ALLOC_COPY_CLASS_IF(button, ButtonClassRec); +#ifdef XKB + if (to->button) + { + to->button->xkb_acts = NULL; /* XXX: XkbAction needs to be copied */ + } +#endif ALLOC_COPY_CLASS_IF(focus, FocusClassRec); ALLOC_COPY_CLASS_IF(proximity, ProximityClassRec); ALLOC_COPY_CLASS_IF(absolute, AbsoluteClassRec); ALLOC_COPY_CLASS_IF(kbdfeed, KbdFeedbackClassRec); +#ifdef XKB + if (to->kbdfeed) + { + to->kbdfeed->xkb_sli = NULL; /* XXX: XkbSrvLedInfo needs to be copied*/ + } +#endif ALLOC_COPY_CLASS_IF(ptrfeed, PtrFeedbackClassRec); ALLOC_COPY_CLASS_IF(intfeed, IntegerFeedbackClassRec); ALLOC_COPY_CLASS_IF(stringfeed, StringFeedbackClassRec); ALLOC_COPY_CLASS_IF(bell, BellFeedbackClassRec); ALLOC_COPY_CLASS_IF(leds, LedFeedbackClassRec); - /* XXX: XkbSrvLedInfo needs to be copied. */ +#ifdef XKB + if (to->leds) + { + to->leds->xkb_sli = NULL; + /* XXX: XkbSrvLedInfo needs to be copied*/ + } +#endif } static void From b40646dc104fb03ea7cc0b27fae573aecaab486e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 15 Nov 2007 15:43:44 +1030 Subject: [PATCH 270/634] dix: Add FreeDeviceClass and FreeFeedbackClass for centralised xfree. Ensures that we only have one way of freeing a device class to avoid leaks in ChangeMasterDeviceClasses and other places. --- Xi/exevents.c | 29 +---- dix/devices.c | 264 +++++++++++++++++++++++++++++---------------- include/input.h | 4 + include/inputstr.h | 16 +++ 4 files changed, 190 insertions(+), 123 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index f9ea1c9ac..539501116 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -288,34 +288,7 @@ ChangeMasterDeviceClasses(DeviceIntPtr device, master->public.devicePrivate = device->public.devicePrivate; - if (master->key) - xfree(master->key->modifierKeyMap); -#ifdef XKB - if (master->key && master->key->xkbInfo) - XkbFreeInfo(master->key->xkbInfo); -#endif - xfree(master->key); master->key = NULL; - xfree(master->valuator); master->valuator = NULL; - /* XXX: xkb_acts needs to be freed for master->button */ - xfree(master->button); master->button = NULL; - xfree(master->focus); master->focus = NULL; - xfree(master->proximity); master->proximity = NULL; - xfree(master->absolute); master->absolute = NULL; -#ifdef XKB - if (master->kbdfeed && master->kbdfeed->xkb_sli) - XkbFreeSrvLedInfo(master->kbdfeed->xkb_sli); -#endif - xfree(master->kbdfeed); master->kbdfeed = NULL; - xfree(master->ptrfeed); master->ptrfeed = NULL; - xfree(master->stringfeed); master->stringfeed = NULL; - xfree(master->bell); master->bell = NULL; -#ifdef XKB - if (master->leds && master->leds->xkb_sli) - XkbFreeSrvLedInfo(master->leds->xkb_sli); -#endif - xfree(master->leds); master->leds = NULL; - xfree(master->intfeed); master->intfeed = NULL; - + FreeAllDeviceClasses(&master->key); DeepCopyDeviceClasses(device, master); /* event is already correct size, see comment in GetPointerEvents */ diff --git a/dix/devices.c b/dix/devices.c index 65d19806f..bf1126f66 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -85,22 +85,6 @@ SOFTWARE. * This file handles input device-related stuff. */ -typedef struct { - KeyClassPtr key; - ValuatorClassPtr valuator; - ButtonClassPtr button; - FocusClassPtr focus; - ProximityClassPtr proximity; - AbsoluteClassPtr absolute; - KbdFeedbackPtr kbdfeed; - PtrFeedbackPtr ptrfeed; - IntegerFeedbackPtr intfeed; - StringFeedbackPtr stringfeed; - BellFeedbackPtr bell; - LedFeedbackPtr leds; -} ClassesRec, *ClassesPtr; - - int CoreDevicePrivatesIndex = 0; static int CoreDevicePrivatesGeneration = -1; int MasterDevClassesPrivIdx = -1; @@ -638,6 +622,174 @@ InitAndStartDevices(WindowPtr root) return Success; } +_X_EXPORT void +FreeAllDeviceClasses(ClassesPtr classes) +{ + if (!classes) + return; + + FreeDeviceClass(KeyClass, (pointer)&classes->key); + FreeDeviceClass(ValuatorClass, (pointer)&classes->valuator); + FreeDeviceClass(ButtonClass, (pointer)&classes->button); + FreeDeviceClass(FocusClass, (pointer)&classes->focus); + FreeDeviceClass(ProximityClass, (pointer)&classes->proximity); + + FreeFeedbackClass(KbdFeedbackClass, (pointer)&classes->kbdfeed); + FreeFeedbackClass(PtrFeedbackClass, (pointer)&classes->ptrfeed); + FreeFeedbackClass(IntegerFeedbackClass, (pointer)&classes->intfeed); + FreeFeedbackClass(StringFeedbackClass, (pointer)&classes->stringfeed); + FreeFeedbackClass(BellFeedbackClass, (pointer)&classes->bell); + FreeFeedbackClass(LedFeedbackClass, (pointer)&classes->leds); + +} + +/** + * Free the given device class and reset the pointer to NULL. + */ +_X_EXPORT void +FreeDeviceClass(int type, pointer *class) +{ + if (!(*class)) + return; + + switch(type) + { + case KeyClass: + { + KeyClassPtr* k = (KeyClassPtr*)class; +#ifdef XKB + if ((*k)->xkbInfo) + XkbFreeInfo((*k)->xkbInfo); +#endif + + xfree((*k)->curKeySyms.map); + xfree((*k)->modifierKeyMap); + xfree((*k)); + break; + } + case ButtonClass: + { + ButtonClassPtr *b = (ButtonClassPtr*)class; +#ifdef XKB + if ((*b)->xkb_acts) + xfree((*b)->xkb_acts); +#endif + xfree((*b)); + break; + } + case ValuatorClass: + { + ValuatorClassPtr *v = (ValuatorClassPtr*)class; + + /* Counterpart to 'biggest hack ever' in init. */ + if ((*v)->motion && (*v)->GetMotionProc == GetMotionHistory) + xfree((*v)->motion); + xfree((*v)); + break; + } + case FocusClass: + { + FocusClassPtr *f = (FocusClassPtr*)class; + xfree((*f)->trace); + xfree((*f)); + break; + } + case ProximityClass: + { + ProximityClassPtr *p = (ProximityClassPtr*)class; + xfree((*p)); + break; + } + + } + *class = NULL; +} +_X_EXPORT void +FreeFeedbackClass(int type, pointer *class) +{ + if (!(*class)) + return; + + switch(type) + { + case KbdFeedbackClass: + { + KbdFeedbackPtr *kbdfeed = (KbdFeedbackPtr*)class; + KbdFeedbackPtr k, knext; + for (k = (*kbdfeed); k; k = knext) { + knext = k->next; +#ifdef XKB + if (k->xkb_sli) + XkbFreeSrvLedInfo(k->xkb_sli); +#endif + xfree(k); + } + break; + } + case PtrFeedbackClass: + { + PtrFeedbackPtr *ptrfeed = (PtrFeedbackPtr*)class; + PtrFeedbackPtr p, pnext; + + for (p = (*ptrfeed); p; p = pnext) { + pnext = p->next; + xfree(p); + } + break; + } + case IntegerFeedbackClass: + { + IntegerFeedbackPtr *intfeed = (IntegerFeedbackPtr*)class; + IntegerFeedbackPtr i, inext; + + for (i = (*intfeed); i; i = inext) { + inext = i->next; + xfree(i); + } + break; + } + case StringFeedbackClass: + { + StringFeedbackPtr *stringfeed = (StringFeedbackPtr*)class; + StringFeedbackPtr s, snext; + + for (s = (*stringfeed); s; s = snext) { + snext = s->next; + xfree(s->ctrl.symbols_supported); + xfree(s->ctrl.symbols_displayed); + xfree(s); + } + break; + } + case BellFeedbackClass: + { + BellFeedbackPtr *bell = (BellFeedbackPtr*)class; + BellFeedbackPtr b, bnext; + + for (b = (*bell); b; b = bnext) { + bnext = b->next; + xfree(b); + } + break; + } + case LedFeedbackClass: + { + LedFeedbackPtr *leds = (LedFeedbackPtr*)class; + LedFeedbackPtr l, lnext; + + for (l = (*leds); l; l = lnext) { + lnext = l->next; +#ifdef XKB + if (l->xkb_sli) + XkbFreeSrvLedInfo(l->xkb_sli); +#endif + xfree(l); + } + break; + } + } + *class = NULL; +} /** * Close down a device and free all resources. * Once closed down, the driver will probably not expect you that you'll ever @@ -648,12 +800,6 @@ InitAndStartDevices(WindowPtr root) static void CloseDevice(DeviceIntPtr dev) { - KbdFeedbackPtr k, knext; - PtrFeedbackPtr p, pnext; - IntegerFeedbackPtr i, inext; - StringFeedbackPtr s, snext; - BellFeedbackPtr b, bnext; - LedFeedbackPtr l, lnext; ScreenPtr screen = screenInfo.screens[0]; ClassesPtr classes; int j; @@ -675,79 +821,7 @@ CloseDevice(DeviceIntPtr dev) else classes = (ClassesPtr)&dev->key; - if (classes->key) { -#ifdef XKB - if (classes->key->xkbInfo) - XkbFreeInfo(classes->key->xkbInfo); -#endif - xfree(classes->key->curKeySyms.map); - xfree(classes->key->modifierKeyMap); - xfree(classes->key); - } - - if (classes->valuator) { - /* Counterpart to 'biggest hack ever' in init. */ - if (classes->valuator->motion && - classes->valuator->GetMotionProc == GetMotionHistory) - xfree(classes->valuator->motion); - xfree(classes->valuator); - } - - if (classes->button) { -#ifdef XKB - if (classes->button->xkb_acts) - xfree(classes->button->xkb_acts); -#endif - xfree(classes->button); - } - - if (classes->focus) { - xfree(classes->focus->trace); - xfree(classes->focus); - } - - if (classes->proximity) - xfree(classes->proximity); - - for (k = classes->kbdfeed; k; k = knext) { - knext = k->next; -#ifdef XKB - if (k->xkb_sli) - XkbFreeSrvLedInfo(k->xkb_sli); -#endif - xfree(k); - } - - for (p = classes->ptrfeed; p; p = pnext) { - pnext = p->next; - xfree(p); - } - - for (i = classes->intfeed; i; i = inext) { - inext = i->next; - xfree(i); - } - - for (s = classes->stringfeed; s; s = snext) { - snext = s->next; - xfree(s->ctrl.symbols_supported); - xfree(s->ctrl.symbols_displayed); - xfree(s); - } - - for (b = classes->bell; b; b = bnext) { - bnext = b->next; - xfree(b); - } - - for (l = classes->leds; l; l = lnext) { - lnext = l->next; -#ifdef XKB - if (l->xkb_sli) - XkbFreeSrvLedInfo(l->xkb_sli); -#endif - xfree(l); - } + FreeAllDeviceClasses(classes); #ifdef XKB while (dev->xkb_interest) diff --git a/include/input.h b/include/input.h index 91ce4eeef..9e73dc26e 100644 --- a/include/input.h +++ b/include/input.h @@ -84,6 +84,7 @@ typedef unsigned long Leds; typedef struct _OtherClients *OtherClientsPtr; typedef struct _InputClients *InputClientsPtr; typedef struct _DeviceIntRec *DeviceIntPtr; +typedef struct _ClassesRec *ClassesPtr; typedef struct _EventList { xEvent* event; @@ -484,6 +485,9 @@ extern int AllocMasterDevice(char* name, DeviceIntPtr* keybd); extern void DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to); +extern void FreeDeviceClass(int type, pointer* class); +extern void FreeFeedbackClass(int type, pointer* class); +extern void FreeAllDeviceClasses(ClassesPtr classes); /* Window/device based access control */ extern Bool ACRegisterClient(ClientPtr client); diff --git a/include/inputstr.h b/include/inputstr.h index 507e7b0bd..0589097ec 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -283,6 +283,22 @@ typedef struct _LedFeedbackClassRec { } LedFeedbackClassRec; +typedef struct _ClassesRec { + KeyClassPtr key; + ValuatorClassPtr valuator; + ButtonClassPtr button; + FocusClassPtr focus; + ProximityClassPtr proximity; + AbsoluteClassPtr absolute; + KbdFeedbackPtr kbdfeed; + PtrFeedbackPtr ptrfeed; + IntegerFeedbackPtr intfeed; + StringFeedbackPtr stringfeed; + BellFeedbackPtr bell; + LedFeedbackPtr leds; +} ClassesRec; + + /** * Sprite information for a device. */ From 53539688cab990a7df1851d64f3ee4e11920a86b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 15 Nov 2007 16:23:48 +1030 Subject: [PATCH 271/634] dix: SetKeySymMap should alloc the map if dst doesn't have one already. --- dix/devices.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index bf1126f66..1792e9e3f 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -1046,10 +1046,9 @@ SetKeySymsMap(KeySymsPtr dst, KeySymsPtr src) KeySym *map; int bytes = sizeof(KeySym) * src->mapWidth * (dst->maxKeyCode - dst->minKeyCode + 1); - map = (KeySym *)xalloc(bytes); + map = (KeySym *)xcalloc(1, bytes); if (!map) return FALSE; - bzero((char *)map, bytes); if (dst->map) { for (i = 0; i <= dst->maxKeyCode-dst->minKeyCode; i++) @@ -1060,6 +1059,15 @@ SetKeySymsMap(KeySymsPtr dst, KeySymsPtr src) } dst->mapWidth = src->mapWidth; dst->map = map; + } else if (!dst->map) + { + KeySym *map; + int bytes = sizeof(KeySym) * src->mapWidth * + (dst->maxKeyCode - dst->minKeyCode + 1); + map = (KeySym *)xcalloc(1, bytes); + if (!map) + return FALSE; + dst->map = map; } memmove((char *)&dst->map[rowDif * dst->mapWidth], (char *)src->map, From 070195dbf88eb121e65f802e023aa37ed1f2c2ac Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 15 Nov 2007 16:27:18 +1030 Subject: [PATCH 272/634] Xi: fix up sloppy class copying causing segfaults. --- Xi/exevents.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Xi/exevents.c b/Xi/exevents.c index 539501116..837afa383 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -220,6 +220,7 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) #ifdef XKB to->key->xkbInfo = NULL; #endif + to->key->curKeySyms.map = NULL; CopyKeyClass(from, to); } @@ -233,8 +234,12 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) if (!v) FatalError("[Xi] no memory for class shift.\n"); memcpy(v, from->valuator, sizeof(ValuatorClassRec)); + v->motion = NULL; + v->axes = (AxisInfoPtr)&v[1]; memcpy(v->axes, from->valuator->axes, v->numAxes * sizeof(AxisInfo)); + + v->axisVal = (int*)(v->axes + from->valuator->numAxes); } ALLOC_COPY_CLASS_IF(button, ButtonClassRec); From 83926cb8bef6288b89e801c5e60b3f40e923e16e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 15 Nov 2007 17:41:07 +1030 Subject: [PATCH 273/634] Xi: Only alloc modifierKeyMap if ->maxKeysPerModifier > 0 Sometimes (e.g. on my debian ppc box) maxKeysPerModifier of the SD is 0. So we try to malloc(0), bringing the whole server down with a FatalError because it looks as if the malloc failed. This is bad, so only alloc if we actually have something to alloc. --- Xi/exevents.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 837afa383..1cef825cd 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -147,11 +147,14 @@ CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master) if (master->devPrivates[CoreDevicePrivatesIndex].ptr != device) { memcpy(mk->modifierMap, dk->modifierMap, MAP_LENGTH); - mk->modifierKeyMap = xcalloc(8, dk->maxKeysPerModifier); - if (!mk->modifierKeyMap) - FatalError("[Xi] no memory for class shift.\n"); - memcpy(mk->modifierKeyMap, dk->modifierKeyMap, - (8 * dk->maxKeysPerModifier)); + if (dk->maxKeysPerModifier) + { + mk->modifierKeyMap = xcalloc(8, dk->maxKeysPerModifier); + if (!mk->modifierKeyMap) + FatalError("[Xi] no memory for class shift.\n"); + memcpy(mk->modifierKeyMap, dk->modifierKeyMap, + (8 * dk->maxKeysPerModifier)); + } mk->maxKeysPerModifier = dk->maxKeysPerModifier; mk->curKeySyms.minKeyCode = dk->curKeySyms.minKeyCode; From 9de1ebe2a80164507cbe2ef688f284225e0ec808 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 16 Nov 2007 10:45:28 +1030 Subject: [PATCH 274/634] dix: Fix up class restoring when last SD disconnects. Old code was fundamentally broken, fixes now are: - free the MDs current device classes - copy the device classes instead of flipping the pointers - check for the old MD, not the new one. --- dix/devices.c | 51 +++++++++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 1792e9e3f..045f74f0c 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2390,6 +2390,7 @@ PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd) int AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) { + DeviceIntPtr oldmaster; if (!dev || dev->isMaster) return BadDevice; @@ -2409,6 +2410,7 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) if (!dev->u.master && dev->spriteInfo->sprite) xfree(dev->spriteInfo->sprite); + oldmaster = dev->u.master; dev->u.master = master; /* If device is set to floating, we need to create a sprite for it, @@ -2417,52 +2419,49 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) */ if (!master) { - DeviceIntPtr it; /* current root window */ InitializeSprite(dev, dev->spriteInfo->sprite->spriteTrace[0]); dev->spriteInfo->spriteOwner = FALSE; - /* the master may need to restore the original classes, search for a - * device that is still paired with our master. */ + } else + dev->spriteInfo->sprite = master->spriteInfo->sprite; + + /* If we were connected to master device before, this MD may need to + * change back to it's original classes. + */ + if (oldmaster) + { + DeviceIntPtr it; for (it = inputInfo.devices; it; it = it->next) - if (!it->isMaster && it->u.master == master) + if (!it->isMaster && it->u.master == oldmaster) break; - if (!it) /* no dev is paired with our master */ + if (!it) /* no dev is paired with old master */ { ClassesPtr classes; EventList event = { NULL, 0}; char* classbuf; + DeviceIntRec dummy; - classes = master->devPrivates[MasterDevClassesPrivIdx].ptr; - master->key = classes->key; - master->valuator = classes->valuator; - master->button = classes->button; - master->focus = classes->focus; - master->proximity = classes->proximity; - master->absolute = classes->absolute; - master->kbdfeed = classes->kbdfeed; - master->ptrfeed = classes->ptrfeed; - master->intfeed = classes->intfeed; - master->stringfeed = classes->stringfeed; - master->bell = classes->bell; - master->leds = classes->leds; + FreeAllDeviceClasses((ClassesPtr)&oldmaster->key); + classes = oldmaster->devPrivates[MasterDevClassesPrivIdx].ptr; + memcpy(&dummy.key, classes, sizeof(ClassesRec)); + DeepCopyDeviceClasses(&dummy, oldmaster); /* Send event to clients */ - CreateClassesChangedEvent(&event, master, master); + CreateClassesChangedEvent(&event, oldmaster, oldmaster); deviceClassesChangedEvent *dcce = - (deviceClassesChangedEvent*)event.event; - dcce->deviceid = master->id; + (deviceClassesChangedEvent*)event.event; + dcce->deviceid = oldmaster->id; dcce->num_classes = 0; classbuf = (char*)&event.event[1]; - CopySwapClasses(NullClient, master, &dcce->num_classes, &classbuf); - SendEventToAllWindows(master, XI_DeviceClassesChangedMask, + CopySwapClasses(NullClient, oldmaster, + &dcce->num_classes, &classbuf); + SendEventToAllWindows(oldmaster, XI_DeviceClassesChangedMask, event.event, 1); xfree(event.event); } - - } else - dev->spriteInfo->sprite = master->spriteInfo->sprite; + } return Success; } From 497862df2fcd67531fbe0f876c20a09884ee74df Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 16 Nov 2007 11:20:22 +1030 Subject: [PATCH 275/634] dix: explicitly float all attached SDs before closing down devices. Some drivers flush on shutdown, if our SD is still attached we'd be trying to route an event through a non-existing device. --- dix/devices.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dix/devices.c b/dix/devices.c index 045f74f0c..bc3313c6f 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -859,6 +859,17 @@ CloseDownDevices(void) { DeviceIntPtr dev, next; + /* Float all SDs before closing them. Note that at this point resources + * (e.g. cursors) have been freed already, so we can't just call + * AttachDevice(NULL, dev, NULL). Instead, we have to forcibly set master + * to NULL and pretend nothing happened. + */ + for (dev = inputInfo.devices; dev; dev = dev->next) + { + if (!dev->isMaster && dev->u.master) + dev->u.master = NULL; + } + for (dev = inputInfo.devices; dev; dev = next) { next = dev->next; From 3c39dd19ec2a53b8854279e3b03131098031473a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 16 Nov 2007 12:12:14 +1030 Subject: [PATCH 276/634] Xi: Deep-copy full list of FeedbackClasses. All feedback classes are linked lists and the whole list has to be duplicated, not just the first entry. Xkb stuff still missing. --- Xi/exevents.c | 118 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 108 insertions(+), 10 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 1cef825cd..d72f00ac2 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -205,6 +205,106 @@ CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master) } } +/** + * Copies the feedback classes from device "from" into device "to". Classes + * are duplicated (not just flipping the pointers). All feedback classes are + * linked lists, the full list is duplicated. + * + * XXX: some XKB stuff is still missing. + */ +static void +DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) +{ + if (from->kbdfeed) + { + KbdFeedbackPtr *k, it; + k = &to->kbdfeed; + for(it = from->kbdfeed; it; it = it->next) + { + *k = xcalloc(1, sizeof(KbdFeedbackClassRec)); + (*k)->BellProc = it->BellProc; + (*k)->CtrlProc = it->CtrlProc; + (*k)->ctrl = it->ctrl; + /* XXX: xkb_sli needs to be copied */ + + k = &(*k)->next; + } + } + + if (from->ptrfeed) + { + PtrFeedbackPtr *p, it; + p = &to->ptrfeed; + for (it = from->ptrfeed; it; it = it->next) + { + *p = xcalloc(1, sizeof(PtrFeedbackClassRec)); + (*p)->CtrlProc = it->CtrlProc; + (*p)->ctrl = it->ctrl; + /* XXX: xkb_sli needs to be copied */ + + p = &(*p)->next; + } + } + + if (from->intfeed) + { + IntegerFeedbackPtr *i, it; + i = &to->intfeed; + for (it = from->intfeed; it; it = it->next) + { + *i = xcalloc(1, sizeof(IntegerFeedbackClassRec)); + (*i)->CtrlProc = it->CtrlProc; + (*i)->ctrl = it->ctrl; + + i = &(*i)->next; + } + } + + if (from->stringfeed) + { + StringFeedbackPtr *s, it; + s = &to->stringfeed; + for (it = from->stringfeed; it; it = it->next) + { + *s = xcalloc(1, sizeof(StringFeedbackClassRec)); + (*s)->CtrlProc = it->CtrlProc; + (*s)->ctrl = it->ctrl; + + s = &(*s)->next; + } + } + + if (from->bell) + { + BellFeedbackPtr *b, it; + b = &to->bell; + for (it = from->bell; it; it = it->next) + { + *b = xcalloc(1, sizeof(BellFeedbackClassRec)); + (*b)->BellProc = it->BellProc; + (*b)->CtrlProc = it->CtrlProc; + (*b)->ctrl = it->ctrl; + + b = &(*b)->next; + } + } + + if (from->leds) + { + LedFeedbackPtr *l, it; + l = &to->leds; + for (it = from->leds; it; it = it->next) + { + *l = xcalloc(1, sizeof(LedFeedbackClassRec)); + (*l)->CtrlProc = it->CtrlProc; + (*l)->ctrl = it->ctrl; + /* XXX: xkb_sli needs to be copied */ + + l = &(*l)->next; + } + } +} + _X_EXPORT void DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) { @@ -256,26 +356,24 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) ALLOC_COPY_CLASS_IF(focus, FocusClassRec); ALLOC_COPY_CLASS_IF(proximity, ProximityClassRec); ALLOC_COPY_CLASS_IF(absolute, AbsoluteClassRec); + ALLOC_COPY_CLASS_IF(kbdfeed, KbdFeedbackClassRec); #ifdef XKB if (to->kbdfeed) { to->kbdfeed->xkb_sli = NULL; /* XXX: XkbSrvLedInfo needs to be copied*/ + to->kbdfeed->next = NULL; } #endif ALLOC_COPY_CLASS_IF(ptrfeed, PtrFeedbackClassRec); - ALLOC_COPY_CLASS_IF(intfeed, IntegerFeedbackClassRec); - ALLOC_COPY_CLASS_IF(stringfeed, StringFeedbackClassRec); - ALLOC_COPY_CLASS_IF(bell, BellFeedbackClassRec); - ALLOC_COPY_CLASS_IF(leds, LedFeedbackClassRec); -#ifdef XKB - if (to->leds) + if (to->ptrfeed) { - to->leds->xkb_sli = NULL; - /* XXX: XkbSrvLedInfo needs to be copied*/ + to->ptrfeed->next = NULL; } -#endif + + + DeepCopyFeedbackClasses(from, to); } static void @@ -296,7 +394,7 @@ ChangeMasterDeviceClasses(DeviceIntPtr device, master->public.devicePrivate = device->public.devicePrivate; - FreeAllDeviceClasses(&master->key); + FreeAllDeviceClasses((ClassesPtr)&master->key); DeepCopyDeviceClasses(device, master); /* event is already correct size, see comment in GetPointerEvents */ From be3321c2e9fad228a9ee5fef47680a47bc9e39a4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 16 Nov 2007 12:12:41 +1030 Subject: [PATCH 277/634] dix: Free both current classes and original classes when closing an MD. --- dix/devices.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index bc3313c6f..7512529e8 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -817,10 +817,12 @@ CloseDevice(DeviceIntPtr dev) xfree(dev->name); if (dev->isMaster) + { classes = (ClassesPtr)dev->devPrivates[MasterDevClassesPrivIdx].ptr; - else - classes = (ClassesPtr)&dev->key; + FreeAllDeviceClasses(classes); + } + classes = (ClassesPtr)&dev->key; FreeAllDeviceClasses(classes); #ifdef XKB From 12dd6e9911de187e0ebee86434e8c24a67c990f9 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 16 Nov 2007 17:23:09 +1030 Subject: [PATCH 278/634] dix: reset MD's devPrivate classes to NULL before device initialisation. XkbInitKeyboardDefviceStruct may call FatalError if it fails. FatalError then cleans up all the devices, resulting in a segfault if the pointer is uninitialised. --- dix/devices.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dix/devices.c b/dix/devices.c index 7512529e8..7d889a2c1 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -396,6 +396,8 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what) if (!AllocateDevicePrivate(pDev, MasterDevClassesPrivIdx) || !(classes = xcalloc(1, sizeof(ClassesRec)))) + pDev->devPrivates[MasterDevClassesPrivIdx].ptr = NULL; + keySyms.minKeyCode = 8; keySyms.maxKeyCode = 255; keySyms.mapWidth = 4; @@ -495,6 +497,8 @@ CorePointerProc(DeviceIntPtr pDev, int what) !(classes = xcalloc(1, sizeof(ClassesRec)))) return BadAlloc; + pDev->devPrivates[MasterDevClassesPrivIdx].ptr = NULL; + for (i = 1; i <= 32; i++) map[i] = i; InitPointerDeviceStruct((DevicePtr)pDev, map, 32, From 75e5e9f88c5f974d996dd81e672cd3709d361a44 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 17 Nov 2007 13:46:01 +1030 Subject: [PATCH 279/634] Xi: add missing XI_DeviceClassesChangedMask to XI filters array. --- Xi/extinit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Xi/extinit.c b/Xi/extinit.c index 07ef2666d..2d077b2aa 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -135,8 +135,9 @@ Mask ExtExclusiveMasks[EMASKSIZE]; * Filters for various generic events. * Evtype is index, mask is value at index. */ -static Mask xi_filters[3] = { +static Mask xi_filters[4] = { XI_DeviceHierarchyChangedMask, + XI_DeviceClassesChangedMask, XI_RawDeviceEventMask, }; From bad96e5a864e40fbd47265d7fb6eaa67c55fac11 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 18 Nov 2007 15:02:24 +1030 Subject: [PATCH 280/634] dix: getevents.c remove trailing whitespaces. --- dix/getevents.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index 20beff370..585fddd69 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -23,7 +23,7 @@ * * Author: Daniel Stone */ - /* + /* * MPX additions: * Copyright © 2006 Peter Hutterer * Author: Peter Hutterer @@ -263,7 +263,7 @@ updateMotionHistory(DeviceIntPtr pDev, CARD32 ms, int first_valuator, _X_EXPORT int GetMaximumEventsNum(void) { /* Three base events -- raw event and device, plus valuator events. - * Multiply by two if we're doing key repeats. + * Multiply by two if we're doing key repeats. */ int ret = 2 + MAX_VALUATOR_EVENTS; @@ -567,7 +567,7 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type, } /** - * Initialize an event list and fill with 32 byte sized events. + * Initialize an event list and fill with 32 byte sized events. * This event list is to be passed into GetPointerEvents() and * GetKeyboardEvents(). * @@ -653,7 +653,7 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, if ((type == ButtonPress || type == ButtonRelease) && !pDev->button) return 0; - + /* FIXME: I guess it should, in theory, be possible to post button events * from devices without valuators. */ if (!pDev->valuator) @@ -693,12 +693,12 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, return 0; /* fill up the raw event, after checking that it is large enough to - * accommodate all valuators. + * accommodate all valuators. */ - if (events->evlen < + if (events->evlen < (sizeof(xEvent) + ((num_valuators - 4) * sizeof(CARD32)))) { - events->evlen = sizeof(xEvent) + + events->evlen = sizeof(xEvent) + ((num_valuators - 4) * sizeof(CARD32)); events->event = realloc(events->event, events->evlen); if (!events->event) @@ -886,11 +886,11 @@ SwitchCorePointer(DeviceIntPtr pDev) * to shift the pointer to get it inside the new bounds. */ void -PostSyntheticMotion(DeviceIntPtr pDev, - int x, - int y, +PostSyntheticMotion(DeviceIntPtr pDev, + int x, + int y, int screen, - unsigned long time) + unsigned long time) { xEvent xE; From e5dd7a95791748c57cab75c0d8ba9d37f72edccf Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 21 Nov 2007 15:59:31 +1030 Subject: [PATCH 281/634] Xext: Scruffy the janitor don't like no "register" keywords. --- Xext/EVI.c | 4 +-- Xext/appgroup.c | 36 ++++++++++----------- Xext/bigreq.c | 4 +-- Xext/cup.c | 22 ++++++------- Xext/dpms.c | 60 +++++++++++++++++----------------- Xext/fontcache.c | 28 ++++++++-------- Xext/mbuf.c | 76 ++++++++++++++++++++++---------------------- Xext/mbufbf.c | 8 ++--- Xext/mitmisc.c | 18 +++++------ Xext/panoramiX.c | 12 +++---- Xext/panoramiXSwap.c | 12 +++---- Xext/sampleEVI.c | 2 +- Xext/saver.c | 10 +++--- Xext/security.c | 10 +++--- Xext/shape.c | 74 +++++++++++++++++++++--------------------- Xext/shm.c | 42 ++++++++++++------------ Xext/sync.c | 38 +++++++++++----------- Xext/xcmisc.c | 28 ++++++++-------- Xext/xevie.c | 28 ++++++++-------- Xext/xprint.c | 16 +++++----- Xext/xres.c | 4 +-- Xext/xtest.c | 38 +++++++++++----------- Xext/xvdisp.c | 68 +++++++++++++++++++-------------------- Xext/xvmc.c | 4 +-- 24 files changed, 321 insertions(+), 321 deletions(-) diff --git a/Xext/EVI.c b/Xext/EVI.c index 8fe3481d4..edf8d66e9 100644 --- a/Xext/EVI.c +++ b/Xext/EVI.c @@ -45,7 +45,7 @@ ProcEVIQueryVersion(ClientPtr client) { /* REQUEST(xEVIQueryVersionReq); */ xEVIQueryVersionReply rep; - register int n; + int n; REQUEST_SIZE_MATCH (xEVIQueryVersionReq); rep.type = X_Reply; rep.length = 0; @@ -144,7 +144,7 @@ SProcEVIQueryVersion(ClientPtr client) static int SProcEVIGetVisualInfo(ClientPtr client) { - register int n; + int n; REQUEST(xEVIGetVisualInfoReq); swaps(&stuff->length, n); return ProcEVIGetVisualInfo(client); diff --git a/Xext/appgroup.c b/Xext/appgroup.c index 7bd205587..d721afce0 100644 --- a/Xext/appgroup.c +++ b/Xext/appgroup.c @@ -183,11 +183,11 @@ void XagResetProc( static int ProcXagQueryVersion( - register ClientPtr client) + ClientPtr client) { /* REQUEST (xXagQueryVersionReq); */ xXagQueryVersionReply rep; - register int n; + int n; REQUEST_SIZE_MATCH (xXagQueryVersionReq); rep.type = X_Reply; @@ -378,7 +378,7 @@ int AttrValidate( } static int ProcXagCreate ( - register ClientPtr client) + ClientPtr client) { REQUEST (xXagCreateReq); AppGroupPtr pAppGrp; @@ -409,7 +409,7 @@ static int ProcXagCreate ( } static int ProcXagDestroy( - register ClientPtr client) + ClientPtr client) { AppGroupPtr pAppGrp; REQUEST (xXagDestroyReq); @@ -426,7 +426,7 @@ static int ProcXagDestroy( static int ProcXagGetAttr( - register ClientPtr client) + ClientPtr client) { AppGroupPtr pAppGrp; REQUEST (xXagGetAttrReq); @@ -462,7 +462,7 @@ int ProcXagGetAttr( static int ProcXagQuery( - register ClientPtr client) + ClientPtr client) { ClientPtr pClient; AppGroupPtr pAppGrp; @@ -497,7 +497,7 @@ int ProcXagQuery( static int ProcXagCreateAssoc( - register ClientPtr client) + ClientPtr client) { REQUEST (xXagCreateAssocReq); @@ -520,7 +520,7 @@ int ProcXagCreateAssoc( static int ProcXagDestroyAssoc( - register ClientPtr client) + ClientPtr client) { /* REQUEST (xXagDestroyAssocReq); */ @@ -531,7 +531,7 @@ int ProcXagDestroyAssoc( static int ProcXagDispatch ( - register ClientPtr client) + ClientPtr client) { REQUEST (xReq); switch (stuff->data) @@ -557,9 +557,9 @@ int ProcXagDispatch ( static int SProcXagQueryVersion( - register ClientPtr client) + ClientPtr client) { - register int n; + int n; REQUEST(xXagQueryVersionReq); swaps(&stuff->length, n); return ProcXagQueryVersion(client); @@ -569,7 +569,7 @@ static int SProcXagCreate( ClientPtr client) { - register int n; + int n; REQUEST (xXagCreateReq); swaps (&stuff->length, n); REQUEST_AT_LEAST_SIZE (xXagCreateReq); @@ -583,7 +583,7 @@ static int SProcXagDestroy( ClientPtr client) { - register int n; + int n; REQUEST (xXagDestroyReq); swaps (&stuff->length, n); REQUEST_SIZE_MATCH (xXagDestroyReq); @@ -595,7 +595,7 @@ static int SProcXagGetAttr( ClientPtr client) { - register int n; + int n; REQUEST (xXagGetAttrReq); swaps (&stuff->length, n); REQUEST_SIZE_MATCH (xXagGetAttrReq); @@ -607,7 +607,7 @@ static int SProcXagQuery( ClientPtr client) { - register int n; + int n; REQUEST (xXagQueryReq); swaps (&stuff->length, n); REQUEST_SIZE_MATCH (xXagQueryReq); @@ -619,7 +619,7 @@ static int SProcXagCreateAssoc( ClientPtr client) { - register int n; + int n; REQUEST (xXagCreateAssocReq); swaps (&stuff->length, n); REQUEST_SIZE_MATCH (xXagCreateAssocReq); @@ -633,7 +633,7 @@ static int SProcXagDestroyAssoc( ClientPtr client) { - register int n; + int n; REQUEST (xXagDestroyAssocReq); swaps (&stuff->length, n); REQUEST_SIZE_MATCH (xXagDestroyAssocReq); @@ -643,7 +643,7 @@ int SProcXagDestroyAssoc( static int SProcXagDispatch( - register ClientPtr client) + ClientPtr client) { REQUEST(xReq); switch (stuff->data) diff --git a/Xext/bigreq.c b/Xext/bigreq.c index fcd848aec..f1f85f9fb 100644 --- a/Xext/bigreq.c +++ b/Xext/bigreq.c @@ -79,11 +79,11 @@ BigReqResetProc (extEntry) static int ProcBigReqDispatch (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xBigReqEnableReq); xBigReqEnableReply rep; - register int n; + int n; if (client->swapped) { swaps(&stuff->length, n); diff --git a/Xext/cup.c b/Xext/cup.c index 6bfa27837..d146959e4 100644 --- a/Xext/cup.c +++ b/Xext/cup.c @@ -163,11 +163,11 @@ void ResetProc( static int ProcQueryVersion( - register ClientPtr client) + ClientPtr client) { /* REQUEST (xXcupQueryVersionReq); */ xXcupQueryVersionReply rep; - register int n; + int n; REQUEST_SIZE_MATCH (xXcupQueryVersionReq); rep.type = X_Reply; @@ -187,12 +187,12 @@ int ProcQueryVersion( static int ProcGetReservedColormapEntries( - register ClientPtr client) + ClientPtr client) { REQUEST (xXcupGetReservedColormapEntriesReq); xXcupGetReservedColormapEntriesReply rep; xColorItem* cptr; - register int n; + int n; REQUEST_SIZE_MATCH (xXcupGetReservedColormapEntriesReq); @@ -220,7 +220,7 @@ int ProcGetReservedColormapEntries( static int ProcStoreColors( - register ClientPtr client) + ClientPtr client) { REQUEST (xXcupStoreColorsReq); ColormapPtr pcmp; @@ -279,7 +279,7 @@ int ProcStoreColors( static int ProcDispatch( - register ClientPtr client) + ClientPtr client) { REQUEST (xReq); switch (stuff->data) @@ -297,9 +297,9 @@ int ProcDispatch( static int SProcQueryVersion( - register ClientPtr client) + ClientPtr client) { - register int n; + int n; REQUEST(xXcupQueryVersionReq); swaps(&stuff->length, n); @@ -310,7 +310,7 @@ static int SProcGetReservedColormapEntries( ClientPtr client) { - register int n; + int n; REQUEST (xXcupGetReservedColormapEntriesReq); swaps (&stuff->length, n); @@ -323,7 +323,7 @@ static int SProcXcupStoreColors( ClientPtr client) { - register int n; + int n; int count; xColorItem* pItem; @@ -339,7 +339,7 @@ int SProcXcupStoreColors( static int SProcDispatch( - register ClientPtr client) + ClientPtr client) { REQUEST(xReq); switch (stuff->data) diff --git a/Xext/dpms.c b/Xext/dpms.c index aced40639..edd9ff766 100644 --- a/Xext/dpms.c +++ b/Xext/dpms.c @@ -99,11 +99,11 @@ DPMSResetProc (extEntry) static int ProcDPMSGetVersion(client) - register ClientPtr client; + ClientPtr client; { /* REQUEST(xDPMSGetVersionReq); */ xDPMSGetVersionReply rep; - register int n; + int n; REQUEST_SIZE_MATCH(xDPMSGetVersionReq); @@ -122,11 +122,11 @@ ProcDPMSGetVersion(client) } static int -ProcDPMSCapable(register ClientPtr client) +ProcDPMSCapable(ClientPtr client) { /* REQUEST(xDPMSCapableReq); */ xDPMSCapableReply rep; - register int n; + int n; REQUEST_SIZE_MATCH(xDPMSCapableReq); @@ -144,11 +144,11 @@ ProcDPMSCapable(register ClientPtr client) static int ProcDPMSGetTimeouts(client) - register ClientPtr client; + ClientPtr client; { /* REQUEST(xDPMSGetTimeoutsReq); */ xDPMSGetTimeoutsReply rep; - register int n; + int n; REQUEST_SIZE_MATCH(xDPMSGetTimeoutsReq); @@ -171,7 +171,7 @@ ProcDPMSGetTimeouts(client) static int ProcDPMSSetTimeouts(client) - register ClientPtr client; + ClientPtr client; { REQUEST(xDPMSSetTimeoutsReq); @@ -198,7 +198,7 @@ ProcDPMSSetTimeouts(client) static int ProcDPMSEnable(client) - register ClientPtr client; + ClientPtr client; { /* REQUEST(xDPMSEnableReq); */ @@ -212,7 +212,7 @@ ProcDPMSEnable(client) static int ProcDPMSDisable(client) - register ClientPtr client; + ClientPtr client; { /* REQUEST(xDPMSDisableReq); */ @@ -227,7 +227,7 @@ ProcDPMSDisable(client) static int ProcDPMSForceLevel(client) - register ClientPtr client; + ClientPtr client; { REQUEST(xDPMSForceLevelReq); @@ -259,11 +259,11 @@ ProcDPMSForceLevel(client) } static int -ProcDPMSInfo(register ClientPtr client) +ProcDPMSInfo(ClientPtr client) { /* REQUEST(xDPMSInfoReq); */ xDPMSInfoReply rep; - register int n; + int n; REQUEST_SIZE_MATCH(xDPMSInfoReq); @@ -283,7 +283,7 @@ ProcDPMSInfo(register ClientPtr client) static int ProcDPMSDispatch (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xReq); @@ -312,9 +312,9 @@ ProcDPMSDispatch (client) static int SProcDPMSGetVersion(client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST(xDPMSGetVersionReq); swaps(&stuff->length, n); @@ -325,10 +325,10 @@ SProcDPMSGetVersion(client) } static int -SProcDPMSCapable(register ClientPtr client) +SProcDPMSCapable(ClientPtr client) { REQUEST(xDPMSCapableReq); - register int n; + int n; swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xDPMSCapableReq); @@ -338,10 +338,10 @@ SProcDPMSCapable(register ClientPtr client) static int SProcDPMSGetTimeouts(client) - register ClientPtr client; + ClientPtr client; { REQUEST(xDPMSGetTimeoutsReq); - register int n; + int n; swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xDPMSGetTimeoutsReq); @@ -351,10 +351,10 @@ SProcDPMSGetTimeouts(client) static int SProcDPMSSetTimeouts(client) - register ClientPtr client; + ClientPtr client; { REQUEST(xDPMSSetTimeoutsReq); - register int n; + int n; swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xDPMSSetTimeoutsReq); @@ -367,10 +367,10 @@ SProcDPMSSetTimeouts(client) static int SProcDPMSEnable(client) - register ClientPtr client; + ClientPtr client; { REQUEST(xDPMSEnableReq); - register int n; + int n; swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xDPMSEnableReq); @@ -380,10 +380,10 @@ SProcDPMSEnable(client) static int SProcDPMSDisable(client) - register ClientPtr client; + ClientPtr client; { REQUEST(xDPMSDisableReq); - register int n; + int n; swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xDPMSDisableReq); @@ -393,10 +393,10 @@ SProcDPMSDisable(client) static int SProcDPMSForceLevel(client) - register ClientPtr client; + ClientPtr client; { REQUEST(xDPMSForceLevelReq); - register int n; + int n; swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xDPMSForceLevelReq); @@ -408,10 +408,10 @@ SProcDPMSForceLevel(client) static int SProcDPMSInfo(client) - register ClientPtr client; + ClientPtr client; { REQUEST(xDPMSInfoReq); - register int n; + int n; swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xDPMSInfoReq); @@ -421,7 +421,7 @@ SProcDPMSInfo(client) static int SProcDPMSDispatch (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xReq); switch (stuff->data) diff --git a/Xext/fontcache.c b/Xext/fontcache.c index c54340b61..1b1ca41aa 100644 --- a/Xext/fontcache.c +++ b/Xext/fontcache.c @@ -100,10 +100,10 @@ FontCacheResetProc (extEntry) static int ProcFontCacheQueryVersion(client) - register ClientPtr client; + ClientPtr client; { xFontCacheQueryVersionReply rep; - register int n; + int n; REQUEST_SIZE_MATCH(xFontCacheQueryVersionReq); rep.type = X_Reply; @@ -123,11 +123,11 @@ ProcFontCacheQueryVersion(client) static int ProcFontCacheGetCacheSettings(client) - register ClientPtr client; + ClientPtr client; { xFontCacheGetCacheSettingsReply rep; FontCacheSettings cinfo; - register int n; + int n; REQUEST_SIZE_MATCH(xFontCacheGetCacheSettingsReq); rep.type = X_Reply; @@ -161,11 +161,11 @@ ProcFontCacheGetCacheSettings(client) static int ProcFontCacheGetCacheStatistics(client) - register ClientPtr client; + ClientPtr client; { xFontCacheGetCacheStatisticsReply rep; FontCacheStatistics cstats; - register int n; + int n; REQUEST_SIZE_MATCH(xFontCacheGetCacheStatisticsReq); rep.type = X_Reply; @@ -214,7 +214,7 @@ ProcFontCacheGetCacheStatistics(client) static int ProcFontCacheChangeCacheSettings(client) - register ClientPtr client; + ClientPtr client; { FontCacheSettings cs; @@ -243,7 +243,7 @@ ProcFontCacheChangeCacheSettings(client) static int ProcFontCacheDispatch (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xReq); switch (stuff->data) @@ -263,9 +263,9 @@ ProcFontCacheDispatch (client) static int SProcFontCacheQueryVersion(client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST(xFontCacheQueryVersionReq); swaps(&stuff->length, n); return ProcFontCacheQueryVersion(client); @@ -275,7 +275,7 @@ static int SProcFontCacheGetCacheSettings(client) ClientPtr client; { - register int n; + int n; REQUEST(xFontCacheGetCacheSettingsReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xFontCacheGetCacheSettingsReq); @@ -286,7 +286,7 @@ static int SProcFontCacheGetCacheStatistics(client) ClientPtr client; { - register int n; + int n; REQUEST(xFontCacheGetCacheStatisticsReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xFontCacheGetCacheStatisticsReq); @@ -297,7 +297,7 @@ static int SProcFontCacheChangeCacheSettings(client) ClientPtr client; { - register int n; + int n; REQUEST(xFontCacheChangeCacheSettingsReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xFontCacheChangeCacheSettingsReq); @@ -311,7 +311,7 @@ SProcFontCacheChangeCacheSettings(client) static int SProcFontCacheDispatch (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xReq); switch (stuff->data) diff --git a/Xext/mbuf.c b/Xext/mbuf.c index 729656048..348a18db3 100644 --- a/Xext/mbuf.c +++ b/Xext/mbuf.c @@ -282,10 +282,10 @@ ExtensionEntry *extEntry; static int ProcGetBufferVersion (client) - register ClientPtr client; + ClientPtr client; { xMbufGetBufferVersionReply rep; - register int n; + int n; REQUEST_SIZE_MATCH (xMbufGetBufferVersionReq); rep.type = X_Reply; @@ -441,11 +441,11 @@ CreateImageBuffers (pWin, nbuf, ids, action, hint) static int ProcCreateImageBuffers (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xMbufCreateImageBuffersReq); xMbufCreateImageBuffersReply rep; - register int n; + int n; WindowPtr pWin; XID *ids; int len, nbuf, i, err, rc; @@ -506,7 +506,7 @@ ProcCreateImageBuffers (client) static int ProcDisplayImageBuffers (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xMbufDisplayImageBuffersReq); MultibufferPtr *pMultibuffer; @@ -579,7 +579,7 @@ MultibufferResType); static int ProcDestroyImageBuffers (client) - register ClientPtr client; + ClientPtr client; { REQUEST (xMbufDestroyImageBuffersReq); WindowPtr pWin; @@ -595,7 +595,7 @@ ProcDestroyImageBuffers (client) static int ProcSetMBufferAttributes (client) - register ClientPtr client; + ClientPtr client; { REQUEST (xMbufSetMBufferAttributesReq); WindowPtr pWin; @@ -694,7 +694,7 @@ ProcGetMBufferAttributes (client) static int ProcSetBufferAttributes (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xMbufSetBufferAttributesReq); MultibufferPtr pMultibuffer; @@ -736,7 +736,7 @@ ProcSetBufferAttributes (client) int ProcGetBufferAttributes (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xMbufGetBufferAttributesReq); MultibufferPtr pMultibuffer; @@ -780,7 +780,7 @@ ProcGetBufferAttributes (client) static int ProcGetBufferInfo (client) - register ClientPtr client; + ClientPtr client; { REQUEST (xMbufGetBufferInfoReq); DrawablePtr pDrawable; @@ -845,7 +845,7 @@ ProcGetBufferInfo (client) static int ProcClearImageBufferArea (client) - register ClientPtr client; + ClientPtr client; { REQUEST (xMbufClearImageBufferAreaReq); MultibufferPtr pMultibuffer; @@ -907,7 +907,7 @@ ProcClearImageBufferArea (client) static int ProcMultibufferDispatch (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xReq); switch (stuff->data) { @@ -938,9 +938,9 @@ ProcMultibufferDispatch (client) static int SProcGetBufferVersion (client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST (xMbufGetBufferVersionReq); swaps (&stuff->length, n); @@ -949,9 +949,9 @@ SProcGetBufferVersion (client) static int SProcCreateImageBuffers (client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST (xMbufCreateImageBuffersReq); swaps (&stuff->length, n); @@ -963,9 +963,9 @@ SProcCreateImageBuffers (client) static int SProcDisplayImageBuffers (client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST (xMbufDisplayImageBuffersReq); swaps (&stuff->length, n); @@ -978,9 +978,9 @@ SProcDisplayImageBuffers (client) static int SProcDestroyImageBuffers (client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST (xMbufDestroyImageBuffersReq); swaps (&stuff->length, n); @@ -991,9 +991,9 @@ SProcDestroyImageBuffers (client) static int SProcSetMBufferAttributes (client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST (xMbufSetMBufferAttributesReq); swaps (&stuff->length, n); @@ -1006,9 +1006,9 @@ SProcSetMBufferAttributes (client) static int SProcGetMBufferAttributes (client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST (xMbufGetMBufferAttributesReq); swaps (&stuff->length, n); @@ -1019,9 +1019,9 @@ SProcGetMBufferAttributes (client) static int SProcSetBufferAttributes (client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST (xMbufSetBufferAttributesReq); swaps (&stuff->length, n); @@ -1034,9 +1034,9 @@ SProcSetBufferAttributes (client) static int SProcGetBufferAttributes (client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST (xMbufGetBufferAttributesReq); swaps (&stuff->length, n); @@ -1047,9 +1047,9 @@ SProcGetBufferAttributes (client) static int SProcGetBufferInfo (client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST (xMbufGetBufferInfoReq); swaps (&stuff->length, n); @@ -1060,9 +1060,9 @@ SProcGetBufferInfo (client) static int SProcClearImageBufferArea(client) - register ClientPtr client; + ClientPtr client; { - register char n; + char n; REQUEST(xMbufClearImageBufferAreaReq); swaps(&stuff->length, n); @@ -1077,7 +1077,7 @@ SProcClearImageBufferArea(client) static int SProcMultibufferDispatch (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xReq); switch (stuff->data) { @@ -1297,7 +1297,7 @@ QueueDisplayRequest (client, activateTime) /* swap the request back so we can simply re-execute it */ if (client->swapped) { - register int n; + int n; REQUEST (xMbufDisplayImageBuffersReq); SwapRestL(stuff); @@ -1370,9 +1370,9 @@ MultibufferExpose (pMultibuffer, pRegion) { xEvent *pEvent; PixmapPtr pPixmap; - register xEvent *pe; - register BoxPtr pBox; - register int i; + xEvent *pe; + BoxPtr pBox; + int i; int numRects; pPixmap = pMultibuffer->pPixmap; @@ -1682,7 +1682,7 @@ OtherClientDelete (value, id) XID id; { MultibufferPtr pMultibuffer = (MultibufferPtr)value; - register OtherClientsPtr other, prev; + OtherClientsPtr other, prev; prev = 0; for (other = pMultibuffer->otherClients; other; other = other->next) diff --git a/Xext/mbufbf.c b/Xext/mbufbf.c index a3b3de79d..afa6177ab 100644 --- a/Xext/mbufbf.c +++ b/Xext/mbufbf.c @@ -600,9 +600,9 @@ bufDrawSelectPlane(pScreen, selectPlane, prgn, bufferNum) { DrawablePtr pDrawable; GCPtr pGC; - register int i; - register BoxPtr pbox; - register xRectangle *prect; + int i; + BoxPtr pbox; + xRectangle *prect; int numRects; XID value; @@ -882,7 +882,7 @@ bufChangeWindowAttributes(pWin, mask) static void bufWindowExposures(pWin, prgn, other_exposed) WindowPtr pWin; - register RegionPtr prgn, other_exposed; + RegionPtr prgn, other_exposed; { ScreenPtr pScreen = pWin->drawable.pScreen; mbufWindowPtr pMBWindow = MB_WINDOW_PRIV(pWin); diff --git a/Xext/mitmisc.c b/Xext/mitmisc.c index 924b88063..365c7e638 100644 --- a/Xext/mitmisc.c +++ b/Xext/mitmisc.c @@ -83,7 +83,7 @@ ExtensionEntry *extEntry; static int ProcMITSetBugMode(client) - register ClientPtr client; + ClientPtr client; { REQUEST(xMITSetBugModeReq); @@ -95,10 +95,10 @@ ProcMITSetBugMode(client) static int ProcMITGetBugMode(client) - register ClientPtr client; + ClientPtr client; { xMITGetBugModeReply rep; - register int n; + int n; REQUEST_SIZE_MATCH(xMITGetBugModeReq); rep.type = X_Reply; @@ -115,7 +115,7 @@ ProcMITGetBugMode(client) static int ProcMITDispatch (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xReq); switch (stuff->data) @@ -131,9 +131,9 @@ ProcMITDispatch (client) static int SProcMITSetBugMode(client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST(xMITSetBugModeReq); swaps(&stuff->length, n); @@ -142,9 +142,9 @@ SProcMITSetBugMode(client) static int SProcMITGetBugMode(client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST(xMITGetBugModeReq); swaps(&stuff->length, n); @@ -153,7 +153,7 @@ SProcMITGetBugMode(client) static int SProcMITDispatch (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xReq); switch (stuff->data) diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index 95df04320..93c6fb4c5 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -916,7 +916,7 @@ ProcPanoramiXGetState(ClientPtr client) REQUEST(xPanoramiXGetStateReq); WindowPtr pWin; xPanoramiXGetStateReply rep; - register int n, rc; + int n, rc; REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); @@ -943,7 +943,7 @@ ProcPanoramiXGetScreenCount(ClientPtr client) REQUEST(xPanoramiXGetScreenCountReq); WindowPtr pWin; xPanoramiXGetScreenCountReply rep; - register int n, rc; + int n, rc; REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); @@ -969,7 +969,7 @@ ProcPanoramiXGetScreenSize(ClientPtr client) REQUEST(xPanoramiXGetScreenSizeReq); WindowPtr pWin; xPanoramiXGetScreenSizeReply rep; - register int n, rc; + int n, rc; REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); @@ -1014,7 +1014,7 @@ ProcXineramaIsActive(ClientPtr client) rep.state = !noPanoramiXExtension; #endif if (client->swapped) { - register int n; + int n; swaps (&rep.sequenceNumber, n); swapl (&rep.length, n); swapl (&rep.state, n); @@ -1037,7 +1037,7 @@ ProcXineramaQueryScreens(ClientPtr client) rep.number = (noPanoramiXExtension) ? 0 : PanoramiXNumScreens; rep.length = rep.number * sz_XineramaScreenInfo >> 2; if (client->swapped) { - register int n; + int n; swaps (&rep.sequenceNumber, n); swapl (&rep.length, n); swapl (&rep.number, n); @@ -1055,7 +1055,7 @@ ProcXineramaQueryScreens(ClientPtr client) scratch.height = panoramiXdataPtr[i].height; if(client->swapped) { - register int n; + int n; swaps (&scratch.x_org, n); swaps (&scratch.y_org, n); swaps (&scratch.width, n); diff --git a/Xext/panoramiXSwap.c b/Xext/panoramiXSwap.c index da445ffe1..dabab1f0e 100644 --- a/Xext/panoramiXSwap.c +++ b/Xext/panoramiXSwap.c @@ -55,7 +55,7 @@ static int SProcPanoramiXQueryVersion (ClientPtr client) { REQUEST(xPanoramiXQueryVersionReq); - register int n; + int n; swaps(&stuff->length,n); REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq); @@ -66,7 +66,7 @@ static int SProcPanoramiXGetState(ClientPtr client) { REQUEST(xPanoramiXGetStateReq); - register int n; + int n; swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); @@ -77,7 +77,7 @@ static int SProcPanoramiXGetScreenCount(ClientPtr client) { REQUEST(xPanoramiXGetScreenCountReq); - register int n; + int n; swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); @@ -88,7 +88,7 @@ static int SProcPanoramiXGetScreenSize(ClientPtr client) { REQUEST(xPanoramiXGetScreenSizeReq); - register int n; + int n; swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); @@ -100,7 +100,7 @@ static int SProcXineramaIsActive(ClientPtr client) { REQUEST(xXineramaIsActiveReq); - register int n; + int n; swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xXineramaIsActiveReq); @@ -112,7 +112,7 @@ static int SProcXineramaQueryScreens(ClientPtr client) { REQUEST(xXineramaQueryScreensReq); - register int n; + int n; swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); diff --git a/Xext/sampleEVI.c b/Xext/sampleEVI.c index 7508aa773..5dd6e452b 100644 --- a/Xext/sampleEVI.c +++ b/Xext/sampleEVI.c @@ -46,7 +46,7 @@ static int sampleGetVisualInfo( VisualID32 *temp_conflict; xExtendedVisualInfo *evi; int max_visuals = 0, max_sz_conflict, sz_conflict = 0; - register int visualI, scrI, sz_evi = 0, conflictI, n_conflict; + int visualI, scrI, sz_evi = 0, conflictI, n_conflict; *evi_rn = evi = (xExtendedVisualInfo *)xalloc(max_sz_evi); if (!*evi_rn) return BadAlloc; diff --git a/Xext/saver.c b/Xext/saver.c index a590583df..99b87aae2 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -755,10 +755,10 @@ ScreenSaverHandle (pScreen, xstate, force) static int ProcScreenSaverQueryVersion (client) - register ClientPtr client; + ClientPtr client; { xScreenSaverQueryVersionReply rep; - register int n; + int n; REQUEST_SIZE_MATCH (xScreenSaverQueryVersionReq); rep.type = X_Reply; @@ -776,11 +776,11 @@ ProcScreenSaverQueryVersion (client) static int ProcScreenSaverQueryInfo (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xScreenSaverQueryInfoReq); xScreenSaverQueryInfoReply rep; - register int n, rc; + int n, rc; ScreenSaverStuffPtr pSaver; DrawablePtr pDraw; CARD32 lastInput; @@ -849,7 +849,7 @@ ProcScreenSaverQueryInfo (client) static int ProcScreenSaverSelectInput (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xScreenSaverSelectInputReq); DrawablePtr pDraw; diff --git a/Xext/security.c b/Xext/security.c index a8b4690e5..231ea51ec 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -336,7 +336,7 @@ ProcSecurityQueryVersion( rep.minorVersion = SECURITY_MINOR_VERSION; if(client->swapped) { - register char n; + char n; swaps(&rep.sequenceNumber, n); swaps(&rep.majorVersion, n); swaps(&rep.minorVersion, n); @@ -554,7 +554,7 @@ ProcSecurityGenerateAuthorization( if (client->swapped) { - register char n; + char n; swapl(&rep.length, n); swaps(&rep.sequenceNumber, n); swapl(&rep.authId, n); @@ -633,7 +633,7 @@ SProcSecurityQueryVersion( ClientPtr client) { REQUEST(xSecurityQueryVersionReq); - register char n; + char n; swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xSecurityQueryVersionReq); @@ -648,7 +648,7 @@ SProcSecurityGenerateAuthorization( ClientPtr client) { REQUEST(xSecurityGenerateAuthorizationReq); - register char n; + char n; CARD32 *values; unsigned long nvalues; @@ -671,7 +671,7 @@ SProcSecurityRevokeAuthorization( ClientPtr client) { REQUEST(xSecurityRevokeAuthorizationReq); - register char n; + char n; swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq); diff --git a/Xext/shape.c b/Xext/shape.c index 6515a10d7..2425eeb3b 100644 --- a/Xext/shape.c +++ b/Xext/shape.c @@ -282,10 +282,10 @@ CreateClipShape (pWin) static int ProcShapeQueryVersion (client) - register ClientPtr client; + ClientPtr client; { xShapeQueryVersionReply rep; - register int n; + int n; REQUEST_SIZE_MATCH (xShapeQueryVersionReq); rep.type = X_Reply; @@ -310,7 +310,7 @@ ProcShapeQueryVersion (client) static int ProcShapeRectangles (client) - register ClientPtr client; + ClientPtr client; { WindowPtr pWin; ScreenPtr pScreen; @@ -381,7 +381,7 @@ ProcShapeRectangles (client) #ifdef PANORAMIX static int ProcPanoramiXShapeRectangles( - register ClientPtr client) + ClientPtr client) { REQUEST(xShapeRectanglesReq); PanoramiXRes *win; @@ -410,7 +410,7 @@ ProcPanoramiXShapeRectangles( static int ProcShapeMask (client) - register ClientPtr client; + ClientPtr client; { WindowPtr pWin; ScreenPtr pScreen; @@ -480,7 +480,7 @@ ProcShapeMask (client) #ifdef PANORAMIX static int ProcPanoramiXShapeMask( - register ClientPtr client) + ClientPtr client) { REQUEST(xShapeMaskReq); PanoramiXRes *win, *pmap; @@ -517,7 +517,7 @@ ProcPanoramiXShapeMask( static int ProcShapeCombine (client) - register ClientPtr client; + ClientPtr client; { WindowPtr pSrcWin, pDestWin; ScreenPtr pScreen; @@ -609,7 +609,7 @@ ProcShapeCombine (client) #ifdef PANORAMIX static int ProcPanoramiXShapeCombine( - register ClientPtr client) + ClientPtr client) { REQUEST(xShapeCombineReq); PanoramiXRes *win, *win2; @@ -641,7 +641,7 @@ ProcPanoramiXShapeCombine( static int ProcShapeOffset (client) - register ClientPtr client; + ClientPtr client; { WindowPtr pWin; ScreenPtr pScreen; @@ -682,7 +682,7 @@ ProcShapeOffset (client) #ifdef PANORAMIX static int ProcPanoramiXShapeOffset( - register ClientPtr client) + ClientPtr client) { REQUEST(xShapeOffsetReq); PanoramiXRes *win; @@ -706,13 +706,13 @@ ProcPanoramiXShapeOffset( static int ProcShapeQueryExtents (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xShapeQueryExtentsReq); WindowPtr pWin; xShapeQueryExtentsReply rep; BoxRec extents, *pExtents; - register int n, rc; + int n, rc; RegionPtr region; REQUEST_SIZE_MATCH (xShapeQueryExtentsReq); @@ -817,7 +817,7 @@ ShapeFreeEvents (data, id) static int ProcShapeSelectInput (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xShapeSelectInputReq); WindowPtr pWin; @@ -989,14 +989,14 @@ SendShapeNotify (pWin, which) static int ProcShapeInputSelected (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xShapeInputSelectedReq); WindowPtr pWin; ShapeEventPtr pShapeEvent, *pHead; int enabled, rc; xShapeInputSelectedReply rep; - register int n; + int n; REQUEST_SIZE_MATCH (xShapeInputSelectedReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); @@ -1030,7 +1030,7 @@ ProcShapeInputSelected (client) static int ProcShapeGetRectangles (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xShapeGetRectanglesReq); WindowPtr pWin; @@ -1038,7 +1038,7 @@ ProcShapeGetRectangles (client) xRectangle *rects; int nrects, i, rc; RegionPtr region; - register int n; + int n; REQUEST_SIZE_MATCH(xShapeGetRectanglesReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); @@ -1116,7 +1116,7 @@ ProcShapeGetRectangles (client) static int ProcShapeDispatch (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xReq); switch (stuff->data) { @@ -1181,9 +1181,9 @@ SShapeNotifyEvent(from, to) static int SProcShapeQueryVersion (client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST (xShapeQueryVersionReq); swaps (&stuff->length, n); @@ -1192,9 +1192,9 @@ SProcShapeQueryVersion (client) static int SProcShapeRectangles (client) - register ClientPtr client; + ClientPtr client; { - register char n; + char n; REQUEST (xShapeRectanglesReq); swaps (&stuff->length, n); @@ -1208,9 +1208,9 @@ SProcShapeRectangles (client) static int SProcShapeMask (client) - register ClientPtr client; + ClientPtr client; { - register char n; + char n; REQUEST (xShapeMaskReq); swaps (&stuff->length, n); @@ -1224,9 +1224,9 @@ SProcShapeMask (client) static int SProcShapeCombine (client) - register ClientPtr client; + ClientPtr client; { - register char n; + char n; REQUEST (xShapeCombineReq); swaps (&stuff->length, n); @@ -1240,9 +1240,9 @@ SProcShapeCombine (client) static int SProcShapeOffset (client) - register ClientPtr client; + ClientPtr client; { - register char n; + char n; REQUEST (xShapeOffsetReq); swaps (&stuff->length, n); @@ -1255,9 +1255,9 @@ SProcShapeOffset (client) static int SProcShapeQueryExtents (client) - register ClientPtr client; + ClientPtr client; { - register char n; + char n; REQUEST (xShapeQueryExtentsReq); swaps (&stuff->length, n); @@ -1268,9 +1268,9 @@ SProcShapeQueryExtents (client) static int SProcShapeSelectInput (client) - register ClientPtr client; + ClientPtr client; { - register char n; + char n; REQUEST (xShapeSelectInputReq); swaps (&stuff->length, n); @@ -1281,9 +1281,9 @@ SProcShapeSelectInput (client) static int SProcShapeInputSelected (client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST (xShapeInputSelectedReq); swaps (&stuff->length, n); @@ -1294,10 +1294,10 @@ SProcShapeInputSelected (client) static int SProcShapeGetRectangles (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xShapeGetRectanglesReq); - register char n; + char n; swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xShapeGetRectanglesReq); @@ -1307,7 +1307,7 @@ SProcShapeGetRectangles (client) static int SProcShapeDispatch (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xReq); switch (stuff->data) { diff --git a/Xext/shm.c b/Xext/shm.c index 5937a0358..97a48cd73 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -343,10 +343,10 @@ ShmRegisterFbFuncs(pScreen) static int ProcShmQueryVersion(client) - register ClientPtr client; + ClientPtr client; { xShmQueryVersionReply rep; - register int n; + int n; REQUEST_SIZE_MATCH(xShmQueryVersionReq); rep.type = X_Reply; @@ -438,7 +438,7 @@ shm_access(ClientPtr client, SHMPERM_TYPE *perm, int readonly) static int ProcShmAttach(client) - register ClientPtr client; + ClientPtr client; { SHMSTAT_TYPE buf; ShmDescPtr shmdesc; @@ -518,7 +518,7 @@ ShmDetachSegment(value, shmseg) static int ProcShmDetach(client) - register ClientPtr client; + ClientPtr client; { ShmDescPtr shmdesc; REQUEST(xShmDetachReq); @@ -595,7 +595,7 @@ fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) #ifdef PANORAMIX static int -ProcPanoramiXShmPutImage(register ClientPtr client) +ProcPanoramiXShmPutImage(ClientPtr client) { int j, result = 0, orig_x, orig_y; PanoramiXRes *draw, *gc; @@ -742,7 +742,7 @@ ProcPanoramiXShmGetImage(ClientPtr client) } if (client->swapped) { - register int n; + int n; swaps(&xgi.sequenceNumber, n); swapl(&xgi.length, n); swapl(&xgi.visual, n); @@ -755,7 +755,7 @@ ProcPanoramiXShmGetImage(ClientPtr client) static int ProcPanoramiXShmCreatePixmap( - register ClientPtr client) + ClientPtr client) { ScreenPtr pScreen = NULL; PixmapPtr pMap = NULL; @@ -846,7 +846,7 @@ CreatePmap: static int ProcShmPutImage(client) - register ClientPtr client; + ClientPtr client; { GCPtr pGC; DrawablePtr pDraw; @@ -950,7 +950,7 @@ ProcShmPutImage(client) static int ProcShmGetImage(client) - register ClientPtr client; + ClientPtr client; { DrawablePtr pDraw; long lenPer = 0, length; @@ -1069,7 +1069,7 @@ fbShmCreatePixmap (pScreen, width, height, depth, addr) int depth; char *addr; { - register PixmapPtr pPixmap; + PixmapPtr pPixmap; pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, pScreen->rootDepth, 0); if (!pPixmap) @@ -1085,12 +1085,12 @@ fbShmCreatePixmap (pScreen, width, height, depth, addr) static int ProcShmCreatePixmap(client) - register ClientPtr client; + ClientPtr client; { PixmapPtr pMap; DrawablePtr pDraw; DepthPtr pDepth; - register int i, rc; + int i, rc; ShmDescPtr shmdesc; REQUEST(xShmCreatePixmapReq); @@ -1143,7 +1143,7 @@ CreatePmap: static int ProcShmDispatch (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xReq); switch (stuff->data) @@ -1192,9 +1192,9 @@ SShmCompletionEvent(from, to) static int SProcShmQueryVersion(client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST(xShmQueryVersionReq); swaps(&stuff->length, n); @@ -1205,7 +1205,7 @@ static int SProcShmAttach(client) ClientPtr client; { - register int n; + int n; REQUEST(xShmAttachReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xShmAttachReq); @@ -1218,7 +1218,7 @@ static int SProcShmDetach(client) ClientPtr client; { - register int n; + int n; REQUEST(xShmDetachReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xShmDetachReq); @@ -1230,7 +1230,7 @@ static int SProcShmPutImage(client) ClientPtr client; { - register int n; + int n; REQUEST(xShmPutImageReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xShmPutImageReq); @@ -1253,7 +1253,7 @@ static int SProcShmGetImage(client) ClientPtr client; { - register int n; + int n; REQUEST(xShmGetImageReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xShmGetImageReq); @@ -1272,7 +1272,7 @@ static int SProcShmCreatePixmap(client) ClientPtr client; { - register int n; + int n; REQUEST(xShmCreatePixmapReq); swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xShmCreatePixmapReq); @@ -1287,7 +1287,7 @@ SProcShmCreatePixmap(client) static int SProcShmDispatch (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xReq); switch (stuff->data) diff --git a/Xext/sync.c b/Xext/sync.c index e87e0bd24..cea8f0acd 100644 --- a/Xext/sync.c +++ b/Xext/sync.c @@ -1405,7 +1405,7 @@ ProcSyncListSystemCounters(client) if (client->swapped) { - register char n; + char n; swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); swapl(&rep.nCounters, n); @@ -1425,7 +1425,7 @@ ProcSyncListSystemCounters(client) if (client->swapped) { - register char n; + char n; swapl(&walklist->counter, n); swapl(&walklist->resolution_hi, n); swapl(&walklist->resolution_lo, n); @@ -1514,7 +1514,7 @@ ProcSyncGetPriority(client) if (client->swapped) { - register char n; + char n; swaps(&rep.sequenceNumber, n); swapl(&rep.priority, n); } @@ -1799,7 +1799,7 @@ ProcSyncQueryCounter(client) rep.value_lo = XSyncValueLow32(pCounter->value); if (client->swapped) { - register char n; + char n; swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); swapl(&rep.value_hi, n); @@ -1981,7 +1981,7 @@ ProcSyncQueryAlarm(client) if (client->swapped) { - register char n; + char n; swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); swapl(&rep.counter, n); @@ -2070,7 +2070,7 @@ SProcSyncInitialize(client) ClientPtr client; { REQUEST(xSyncInitializeReq); - register char n; + char n; swaps(&stuff->length, n); REQUEST_SIZE_MATCH (xSyncInitializeReq); @@ -2083,7 +2083,7 @@ SProcSyncListSystemCounters(client) ClientPtr client; { REQUEST(xSyncListSystemCountersReq); - register char n; + char n; swaps(&stuff->length, n); REQUEST_SIZE_MATCH (xSyncListSystemCountersReq); @@ -2096,7 +2096,7 @@ SProcSyncCreateCounter(client) ClientPtr client; { REQUEST(xSyncCreateCounterReq); - register char n; + char n; swaps(&stuff->length, n); REQUEST_SIZE_MATCH (xSyncCreateCounterReq); @@ -2112,7 +2112,7 @@ SProcSyncSetCounter(client) ClientPtr client; { REQUEST(xSyncSetCounterReq); - register char n; + char n; swaps(&stuff->length, n); REQUEST_SIZE_MATCH (xSyncSetCounterReq); @@ -2128,7 +2128,7 @@ SProcSyncChangeCounter(client) ClientPtr client; { REQUEST(xSyncChangeCounterReq); - register char n; + char n; swaps(&stuff->length, n); REQUEST_SIZE_MATCH (xSyncChangeCounterReq); @@ -2144,7 +2144,7 @@ SProcSyncQueryCounter(client) ClientPtr client; { REQUEST(xSyncQueryCounterReq); - register char n; + char n; swaps(&stuff->length, n); REQUEST_SIZE_MATCH (xSyncQueryCounterReq); @@ -2158,7 +2158,7 @@ SProcSyncDestroyCounter(client) ClientPtr client; { REQUEST(xSyncDestroyCounterReq); - register char n; + char n; swaps(&stuff->length, n); REQUEST_SIZE_MATCH (xSyncDestroyCounterReq); @@ -2172,7 +2172,7 @@ SProcSyncAwait(client) ClientPtr client; { REQUEST(xSyncAwaitReq); - register char n; + char n; swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xSyncAwaitReq); @@ -2187,7 +2187,7 @@ SProcSyncCreateAlarm(client) ClientPtr client; { REQUEST(xSyncCreateAlarmReq); - register char n; + char n; swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xSyncCreateAlarmReq); @@ -2203,7 +2203,7 @@ SProcSyncChangeAlarm(client) ClientPtr client; { REQUEST(xSyncChangeAlarmReq); - register char n; + char n; swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq); @@ -2218,7 +2218,7 @@ SProcSyncQueryAlarm(client) ClientPtr client; { REQUEST(xSyncQueryAlarmReq); - register char n; + char n; swaps(&stuff->length, n); REQUEST_SIZE_MATCH (xSyncQueryAlarmReq); @@ -2232,7 +2232,7 @@ SProcSyncDestroyAlarm(client) ClientPtr client; { REQUEST(xSyncDestroyAlarmReq); - register char n; + char n; swaps(&stuff->length, n); REQUEST_SIZE_MATCH (xSyncDestroyAlarmReq); @@ -2246,7 +2246,7 @@ SProcSyncSetPriority(client) ClientPtr client; { REQUEST(xSyncSetPriorityReq); - register char n; + char n; swaps(&stuff->length, n); REQUEST_SIZE_MATCH (xSyncSetPriorityReq); @@ -2261,7 +2261,7 @@ SProcSyncGetPriority(client) ClientPtr client; { REQUEST(xSyncGetPriorityReq); - register char n; + char n; swaps(&stuff->length, n); REQUEST_SIZE_MATCH (xSyncGetPriorityReq); diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c index 8c7a86e6a..45450ef74 100644 --- a/Xext/xcmisc.c +++ b/Xext/xcmisc.c @@ -93,10 +93,10 @@ XCMiscResetProc (extEntry) static int ProcXCMiscGetVersion(client) - register ClientPtr client; + ClientPtr client; { xXCMiscGetVersionReply rep; - register int n; + int n; REQUEST_SIZE_MATCH(xXCMiscGetVersionReq); rep.type = X_Reply; @@ -115,10 +115,10 @@ ProcXCMiscGetVersion(client) static int ProcXCMiscGetXIDRange(client) - register ClientPtr client; + ClientPtr client; { xXCMiscGetXIDRangeReply rep; - register int n; + int n; XID min_id, max_id; REQUEST_SIZE_MATCH(xXCMiscGetXIDRangeReq); @@ -139,11 +139,11 @@ ProcXCMiscGetXIDRange(client) static int ProcXCMiscGetXIDList(client) - register ClientPtr client; + ClientPtr client; { REQUEST(xXCMiscGetXIDListReq); xXCMiscGetXIDListReply rep; - register int n; + int n; XID *pids; unsigned int count; @@ -179,7 +179,7 @@ ProcXCMiscGetXIDList(client) static int ProcXCMiscDispatch (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xReq); switch (stuff->data) @@ -197,9 +197,9 @@ ProcXCMiscDispatch (client) static int SProcXCMiscGetVersion(client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST(xXCMiscGetVersionReq); swaps(&stuff->length, n); @@ -211,9 +211,9 @@ SProcXCMiscGetVersion(client) static int SProcXCMiscGetXIDRange(client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST(xReq); swaps(&stuff->length, n); @@ -222,9 +222,9 @@ SProcXCMiscGetXIDRange(client) static int SProcXCMiscGetXIDList(client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST(xXCMiscGetXIDListReq); swaps(&stuff->length, n); @@ -234,7 +234,7 @@ SProcXCMiscGetXIDList(client) static int SProcXCMiscDispatch (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xReq); switch (stuff->data) diff --git a/Xext/xevie.c b/Xext/xevie.c index 0feb4d7aa..501625554 100644 --- a/Xext/xevie.c +++ b/Xext/xevie.c @@ -63,7 +63,7 @@ extern Bool noXkbExtension; #endif extern int xeviegrabState; -static int ProcDispatch (register ClientPtr client), SProcDispatch (register ClientPtr client); +static int ProcDispatch (ClientPtr client), SProcDispatch (ClientPtr client); static void ResetProc (ExtensionEntry *extEntry); static unsigned char ReqCode = 0; @@ -164,7 +164,7 @@ void ResetProc (ExtensionEntry *extEntry) } static -int ProcQueryVersion (register ClientPtr client) +int ProcQueryVersion (ClientPtr client) { xXevieQueryVersionReply rep; @@ -179,7 +179,7 @@ int ProcQueryVersion (register ClientPtr client) } static -int ProcStart (register ClientPtr client) +int ProcStart (ClientPtr client) { xXevieStartReply rep; @@ -220,7 +220,7 @@ int ProcStart (register ClientPtr client) } static -int ProcEnd (register ClientPtr client) +int ProcEnd (ClientPtr client) { xXevieEndReply rep; @@ -239,7 +239,7 @@ int ProcEnd (register ClientPtr client) } static -int ProcSend (register ClientPtr client) +int ProcSend (ClientPtr client) { REQUEST (xXevieSendReq); xXevieSendReply rep; @@ -285,7 +285,7 @@ int ProcSend (register ClientPtr client) } static -int ProcSelectInput (register ClientPtr client) +int ProcSelectInput (ClientPtr client) { REQUEST (xXevieSelectInputReq); xXevieSelectInputReply rep; @@ -301,7 +301,7 @@ int ProcSelectInput (register ClientPtr client) } static -int ProcDispatch (register ClientPtr client) +int ProcDispatch (ClientPtr client) { REQUEST (xReq); switch (stuff->data) @@ -322,9 +322,9 @@ int ProcDispatch (register ClientPtr client) } static -int SProcQueryVersion (register ClientPtr client) +int SProcQueryVersion (ClientPtr client) { - register int n; + int n; REQUEST(xXevieQueryVersionReq); swaps(&stuff->length, n); @@ -334,7 +334,7 @@ int SProcQueryVersion (register ClientPtr client) static int SProcStart (ClientPtr client) { - register int n; + int n; REQUEST (xXevieStartReq); swaps (&stuff->length, n); @@ -346,7 +346,7 @@ int SProcStart (ClientPtr client) static int SProcEnd (ClientPtr client) { - register int n; + int n; REQUEST (xXevieEndReq); swaps (&stuff->length, n); @@ -358,7 +358,7 @@ int SProcEnd (ClientPtr client) static int SProcSend (ClientPtr client) { - register int n; + int n; REQUEST (xXevieSendReq); swaps (&stuff->length, n); @@ -370,7 +370,7 @@ int SProcSend (ClientPtr client) static int SProcSelectInput (ClientPtr client) { - register int n; + int n; REQUEST (xXevieSelectInputReq); swaps (&stuff->length, n); @@ -381,7 +381,7 @@ int SProcSelectInput (ClientPtr client) static -int SProcDispatch (register ClientPtr client) +int SProcDispatch (ClientPtr client) { REQUEST(xReq); switch (stuff->data) diff --git a/Xext/xprint.c b/Xext/xprint.c index 4ac13e6d1..df189a1ac 100644 --- a/Xext/xprint.c +++ b/Xext/xprint.c @@ -570,7 +570,7 @@ ProcXpQueryVersion(ClientPtr client) { /* REQUEST(xPrintQueryVersionReq); */ xPrintQueryVersionReply rep; - register int n; + int n; long l; REQUEST_SIZE_MATCH(xPrintQueryVersionReq); @@ -1101,8 +1101,8 @@ ProcXpGetContext(ClientPtr client) xPrintGetContextReply rep; XpContextPtr pContext; - register int n; - register long l; + int n; + long l; REQUEST_SIZE_MATCH(xPrintGetContextReq); @@ -1383,11 +1383,11 @@ XpFreePage(pointer data, XID id) static void InitContextPrivates(XpContextPtr context) { - register char *ptr; + char *ptr; DevUnion *ppriv; - register unsigned *sizes; - register unsigned size; - register int i; + unsigned *sizes; + unsigned size; + int i; if (totalContextSize == sizeof(XpContextRec)) ppriv = (DevUnion *)NULL; @@ -2330,7 +2330,7 @@ ProcXpInputSelected(ClientPtr client) { REQUEST(xPrintInputSelectedReq); xPrintInputSelectedReply rep; - register int n; + int n; long l; XpClientPtr pXpClient; XpContextPtr pContext; diff --git a/Xext/xres.c b/Xext/xres.c index 32cc9030d..9bbf0a48d 100644 --- a/Xext/xres.c +++ b/Xext/xres.c @@ -93,7 +93,7 @@ ProcXResQueryClients (ClientPtr client) scratch.resource_mask = RESOURCE_ID_MASK; if(client->swapped) { - register int n; + int n; swapl (&scratch.resource_base, n); swapl (&scratch.resource_mask, n); } @@ -175,7 +175,7 @@ ProcXResQueryClientResources (ClientPtr client) scratch.count = counts[i]; if(client->swapped) { - register int n; + int n; swapl (&scratch.resource_type, n); swapl (&scratch.count, n); } diff --git a/Xext/xtest.c b/Xext/xtest.c index 963029cce..711b57c09 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -112,10 +112,10 @@ ExtensionEntry *extEntry; static int ProcXTestGetVersion(client) - register ClientPtr client; + ClientPtr client; { xXTestGetVersionReply rep; - register int n; + int n; REQUEST_SIZE_MATCH(xXTestGetVersionReq); rep.type = X_Reply; @@ -133,13 +133,13 @@ ProcXTestGetVersion(client) static int ProcXTestCompareCursor(client) - register ClientPtr client; + ClientPtr client; { REQUEST(xXTestCompareCursorReq); xXTestCompareCursorReply rep; WindowPtr pWin; CursorPtr pCursor; - register int n, rc; + int n, rc; REQUEST_SIZE_MATCH(xXTestCompareCursorReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); @@ -170,7 +170,7 @@ ProcXTestCompareCursor(client) static int ProcXTestFakeInput(client) - register ClientPtr client; + ClientPtr client; { REQUEST(xXTestFakeInputReq); int nev, n, type, rc; @@ -468,7 +468,7 @@ ProcXTestFakeInput(client) static int ProcXTestGrabControl(client) - register ClientPtr client; + ClientPtr client; { REQUEST(xXTestGrabControlReq); @@ -487,7 +487,7 @@ ProcXTestGrabControl(client) static int ProcXTestDispatch (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xReq); switch (stuff->data) @@ -507,9 +507,9 @@ ProcXTestDispatch (client) static int SProcXTestGetVersion(client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST(xXTestGetVersionReq); swaps(&stuff->length, n); @@ -520,9 +520,9 @@ SProcXTestGetVersion(client) static int SProcXTestCompareCursor(client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST(xXTestCompareCursorReq); swaps(&stuff->length, n); @@ -534,11 +534,11 @@ SProcXTestCompareCursor(client) static int XTestSwapFakeInput(client, req) - register ClientPtr client; + ClientPtr client; xReq *req; { - register int nev; - register xEvent *ev; + int nev; + xEvent *ev; xEvent sev; EventSwapPtr proc; @@ -560,9 +560,9 @@ XTestSwapFakeInput(client, req) static int SProcXTestFakeInput(client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST(xReq); swaps(&stuff->length, n); @@ -574,9 +574,9 @@ SProcXTestFakeInput(client) static int SProcXTestGrabControl(client) - register ClientPtr client; + ClientPtr client; { - register int n; + int n; REQUEST(xXTestGrabControlReq); swaps(&stuff->length, n); @@ -586,7 +586,7 @@ SProcXTestGrabControl(client) static int SProcXTestDispatch (client) - register ClientPtr client; + ClientPtr client; { REQUEST(xReq); switch (stuff->data) diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c index 21d00aa7f..5465e25b9 100644 --- a/Xext/xvdisp.c +++ b/Xext/xvdisp.c @@ -1334,7 +1334,7 @@ ProcXvListImageFormats(ClientPtr client) static int SProcXvQueryExtension(ClientPtr client) { - register char n; + char n; REQUEST(xvQueryExtensionReq); swaps(&stuff->length, n); return ProcXvQueryExtension(client); @@ -1343,7 +1343,7 @@ SProcXvQueryExtension(ClientPtr client) static int SProcXvQueryAdaptors(ClientPtr client) { - register char n; + char n; REQUEST(xvQueryAdaptorsReq); swaps(&stuff->length, n); swapl(&stuff->window, n); @@ -1353,7 +1353,7 @@ SProcXvQueryAdaptors(ClientPtr client) static int SProcXvQueryEncodings(ClientPtr client) { - register char n; + char n; REQUEST(xvQueryEncodingsReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1363,7 +1363,7 @@ SProcXvQueryEncodings(ClientPtr client) static int SProcXvGrabPort(ClientPtr client) { - register char n; + char n; REQUEST(xvGrabPortReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1374,7 +1374,7 @@ SProcXvGrabPort(ClientPtr client) static int SProcXvUngrabPort(ClientPtr client) { - register char n; + char n; REQUEST(xvUngrabPortReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1385,7 +1385,7 @@ SProcXvUngrabPort(ClientPtr client) static int SProcXvPutVideo(ClientPtr client) { - register char n; + char n; REQUEST(xvPutVideoReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1405,7 +1405,7 @@ SProcXvPutVideo(ClientPtr client) static int SProcXvPutStill(ClientPtr client) { - register char n; + char n; REQUEST(xvPutStillReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1425,7 +1425,7 @@ SProcXvPutStill(ClientPtr client) static int SProcXvGetVideo(ClientPtr client) { - register char n; + char n; REQUEST(xvGetVideoReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1445,7 +1445,7 @@ SProcXvGetVideo(ClientPtr client) static int SProcXvGetStill(ClientPtr client) { - register char n; + char n; REQUEST(xvGetStillReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1465,7 +1465,7 @@ SProcXvGetStill(ClientPtr client) static int SProcXvPutImage(ClientPtr client) { - register char n; + char n; REQUEST(xvPutImageReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1489,7 +1489,7 @@ SProcXvPutImage(ClientPtr client) static int SProcXvShmPutImage(ClientPtr client) { - register char n; + char n; REQUEST(xvShmPutImageReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1516,7 +1516,7 @@ SProcXvShmPutImage(ClientPtr client) static int SProcXvSelectVideoNotify(ClientPtr client) { - register char n; + char n; REQUEST(xvSelectVideoNotifyReq); swaps(&stuff->length, n); swapl(&stuff->drawable, n); @@ -1526,7 +1526,7 @@ SProcXvSelectVideoNotify(ClientPtr client) static int SProcXvSelectPortNotify(ClientPtr client) { - register char n; + char n; REQUEST(xvSelectPortNotifyReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1536,7 +1536,7 @@ SProcXvSelectPortNotify(ClientPtr client) static int SProcXvStopVideo(ClientPtr client) { - register char n; + char n; REQUEST(xvStopVideoReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1547,7 +1547,7 @@ SProcXvStopVideo(ClientPtr client) static int SProcXvSetPortAttribute(ClientPtr client) { - register char n; + char n; REQUEST(xvSetPortAttributeReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1558,7 +1558,7 @@ SProcXvSetPortAttribute(ClientPtr client) static int SProcXvGetPortAttribute(ClientPtr client) { - register char n; + char n; REQUEST(xvGetPortAttributeReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1569,7 +1569,7 @@ SProcXvGetPortAttribute(ClientPtr client) static int SProcXvQueryBestSize(ClientPtr client) { - register char n; + char n; REQUEST(xvQueryBestSizeReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1583,7 +1583,7 @@ SProcXvQueryBestSize(ClientPtr client) static int SProcXvQueryPortAttributes(ClientPtr client) { - register char n; + char n; REQUEST(xvQueryPortAttributesReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1593,7 +1593,7 @@ SProcXvQueryPortAttributes(ClientPtr client) static int SProcXvQueryImageAttributes(ClientPtr client) { - register char n; + char n; REQUEST(xvQueryImageAttributesReq); swaps(&stuff->length, n); swapl(&stuff->id, n); @@ -1605,7 +1605,7 @@ SProcXvQueryImageAttributes(ClientPtr client) static int SProcXvListImageFormats(ClientPtr client) { - register char n; + char n; REQUEST(xvListImageFormatsReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1618,7 +1618,7 @@ SWriteQueryExtensionReply( ClientPtr client, xvQueryExtensionReply *rep ){ - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); @@ -1635,7 +1635,7 @@ SWriteQueryAdaptorsReply( ClientPtr client, xvQueryAdaptorsReply *rep ){ - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); @@ -1651,7 +1651,7 @@ SWriteQueryEncodingsReply( ClientPtr client, xvQueryEncodingsReply *rep ){ - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); @@ -1667,7 +1667,7 @@ SWriteAdaptorInfo( ClientPtr client, xvAdaptorInfo *pAdaptor ){ - register char n; + char n; swapl(&pAdaptor->base_id, n); swaps(&pAdaptor->name_size, n); @@ -1684,7 +1684,7 @@ SWriteEncodingInfo( ClientPtr client, xvEncodingInfo *pEncoding ){ - register char n; + char n; swapl(&pEncoding->encoding, n); swaps(&pEncoding->name_size, n); @@ -1702,7 +1702,7 @@ SWriteFormat( ClientPtr client, xvFormat *pFormat ){ - register char n; + char n; swapl(&pFormat->visual, n); (void)WriteToClient(client, sz_xvFormat, (char *)pFormat); @@ -1715,7 +1715,7 @@ SWriteAttributeInfo( ClientPtr client, xvAttributeInfo *pAtt ){ - register char n; + char n; swapl(&pAtt->flags, n); swapl(&pAtt->size, n); @@ -1731,7 +1731,7 @@ SWriteImageFormatInfo( ClientPtr client, xvImageFormatInfo *pImage ){ - register char n; + char n; swapl(&pImage->id, n); swapl(&pImage->red_mask, n); @@ -1759,7 +1759,7 @@ SWriteGrabPortReply( ClientPtr client, xvGrabPortReply *rep ){ - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); @@ -1774,7 +1774,7 @@ SWriteGetPortAttributeReply( ClientPtr client, xvGetPortAttributeReply *rep ){ - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); @@ -1790,7 +1790,7 @@ SWriteQueryBestSizeReply( ClientPtr client, xvQueryBestSizeReply *rep ){ - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); @@ -1807,7 +1807,7 @@ SWriteQueryPortAttributesReply( ClientPtr client, xvQueryPortAttributesReply *rep ){ - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); @@ -1824,7 +1824,7 @@ SWriteQueryImageAttributesReply( ClientPtr client, xvQueryImageAttributesReply *rep ){ - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); @@ -1844,7 +1844,7 @@ SWriteListImageFormatsReply( ClientPtr client, xvListImageFormatsReply *rep ){ - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); diff --git a/Xext/xvmc.c b/Xext/xvmc.c index ae358936e..97a02c1b1 100644 --- a/Xext/xvmc.c +++ b/Xext/xvmc.c @@ -613,8 +613,8 @@ ProcXvMCGetDRInfo(ClientPtr client) #ifdef HAS_XVMCSHM patternP = (CARD32 *)shmat( stuff->shmKey, NULL, SHM_RDONLY ); if ( -1 != (long) patternP) { - register volatile CARD32 *patternC = patternP; - register int i; + volatile CARD32 *patternC = patternP; + int i; CARD32 magic = stuff->magic; rep.isLocal = 1; From 33f15689922ad9f1193f803bc1636c82c23ab99e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 21 Nov 2007 16:06:44 +1030 Subject: [PATCH 282/634] xtest: switch an inputInfo.pointer over to PickPointer. Couple of whitespace fixes too. --- Xext/xtest.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Xext/xtest.c b/Xext/xtest.c index 711b57c09..bd203b193 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -124,7 +124,7 @@ ProcXTestGetVersion(client) rep.majorVersion = XTestMajorVersion; rep.minorVersion = XTestMinorVersion; if (client->swapped) { - swaps(&rep.sequenceNumber, n); + swaps(&rep.sequenceNumber, n); swaps(&rep.minorVersion, n); } WriteToClient(client, sizeof(xXTestGetVersionReply), (char *)&rep); @@ -139,7 +139,8 @@ ProcXTestCompareCursor(client) xXTestCompareCursorReply rep; WindowPtr pWin; CursorPtr pCursor; - int n, rc; + int n, rc; + DeviceIntPtr pointer = PickPointer(client); REQUEST_SIZE_MATCH(xXTestCompareCursorReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); @@ -148,10 +149,10 @@ ProcXTestCompareCursor(client) if (stuff->cursor == None) pCursor = NullCursor; else if (stuff->cursor == XTestCurrentCursor) - pCursor = GetSpriteCursor(inputInfo.pointer); + pCursor = GetSpriteCursor(pointer); else { pCursor = (CursorPtr)LookupIDByType(stuff->cursor, RT_CURSOR); - if (!pCursor) + if (!pCursor) { client->errorValue = stuff->cursor; return (BadCursor); @@ -162,7 +163,7 @@ ProcXTestCompareCursor(client) rep.sequenceNumber = client->sequence; rep.same = (wCursor(pWin) == pCursor); if (client->swapped) { - swaps(&rep.sequenceNumber, n); + swaps(&rep.sequenceNumber, n); } WriteToClient(client, sizeof(xXTestCompareCursorReply), (char *)&rep); return(client->noClientException); @@ -276,7 +277,7 @@ ProcXTestFakeInput(client) /* swap the request back so we can simply re-execute it */ if (client->swapped) { - (void) XTestSwapFakeInput(client, (xReq *)stuff); + (void) XTestSwapFakeInput(client, (xReq *)stuff); swaps(&stuff->length, n); } ResetCurrentRequest (client); @@ -426,7 +427,7 @@ ProcXTestFakeInput(client) #ifdef PANORAMIX if ((!noPanoramiXExtension - && root->drawable.pScreen->myNum + && root->drawable.pScreen->myNum != XineramaGetCursorScreen(dev)) || (noPanoramiXExtension && root != GetCurrentRootWindow(dev))) @@ -545,14 +546,14 @@ XTestSwapFakeInput(client, req) nev = ((req->length << 2) - sizeof(xReq)) / sizeof(xEvent); for (ev = (xEvent *)&req[1]; --nev >= 0; ev++) { - /* Swap event */ - proc = EventSwapVector[ev->u.u.type & 0177]; + /* Swap event */ + proc = EventSwapVector[ev->u.u.type & 0177]; /* no swapping proc; invalid event type? */ - if (!proc || proc == NotImplemented) { + if (!proc || proc == NotImplemented) { client->errorValue = ev->u.u.type; return BadValue; } - (*proc)(ev, &sev); + (*proc)(ev, &sev); *ev = sev; } return Success; From 9ed43eff48201520797f89a12bb3b2f5819bd99f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 21 Nov 2007 17:16:27 +1030 Subject: [PATCH 283/634] Xi: allow clients to specify pure client id in SetClientPointer. If no window was found with the given ID, try if there's a client with the ID. Allows us to set the CP for apps that don't open windows (e.g. x2x). --- Xi/setcptr.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Xi/setcptr.c b/Xi/setcptr.c index ad8f571db..a3bd9c2ec 100644 --- a/Xi/setcptr.c +++ b/Xi/setcptr.c @@ -89,10 +89,17 @@ ProcXSetClientPointer(ClientPtr client) err = dixLookupWindow(&pWin, stuff->win, client, DixReadWriteAccess); if (err != Success) { - client->errorValue = stuff->win; - return err; - } - targetClient= wClient(pWin); + /* window could not be found. maybe the window ID given was a pure + client id? */ + err = dixLookupClient(&targetClient, stuff->win, + client, DixReadWriteAccess); + if (err != Success) + { + client->errorValue = stuff->win; + return err; + } + } else + targetClient= wClient(pWin); } else targetClient = client; From f9269bebae27bbc9d0e03e02943166b83946623d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 22 Nov 2007 17:30:14 +1030 Subject: [PATCH 284/634] DeviceIntRec: move lastx/lasty from valuator into DeviceIntRec. We free the ValuatorClassRec quite regularly. If a SIGIO is handled while we're swapping device classes, we can bring the server down when we try to access lastx/lasty of the master device. --- Xext/xtest.c | 4 ++-- Xi/warpdevp.c | 4 ++-- dix/devices.c | 6 ++---- dix/getevents.c | 28 ++++++++++++++-------------- hw/xfree86/common/xf86Xinput.c | 8 ++++---- include/inputstr.h | 4 ++-- 6 files changed, 26 insertions(+), 28 deletions(-) diff --git a/Xext/xtest.c b/Xext/xtest.c index bd203b193..371be4e9e 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -444,8 +444,8 @@ ProcXTestFakeInput(client) (dev, root->drawable.pScreen, ev->u.keyButtonPointer.rootX, ev->u.keyButtonPointer.rootY, FALSE); - dev->valuator->lastx = ev->u.keyButtonPointer.rootX; - dev->valuator->lasty = ev->u.keyButtonPointer.rootY; + dev->lastx = ev->u.keyButtonPointer.rootX; + dev->lasty = ev->u.keyButtonPointer.rootY; break; case ButtonPress: case ButtonRelease: diff --git a/Xi/warpdevp.c b/Xi/warpdevp.c index a675bdcd1..85fa7a902 100644 --- a/Xi/warpdevp.c +++ b/Xi/warpdevp.c @@ -176,8 +176,8 @@ ProcXWarpDevicePointer(ClientPtr client) } /* if we don't update the device, we get a jump next time it moves */ - pDev->valuator->lastx = x; - pDev->valuator->lasty = x; + pDev->lastx = x; + pDev->lasty = x; miPointerUpdateSprite(pDev); /* FIXME: XWarpPointer is supposed to generate an event. It doesn't do it diff --git a/dix/devices.c b/dix/devices.c index 7d889a2c1..98cd290e2 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -505,9 +505,9 @@ CorePointerProc(DeviceIntPtr pDev, int what) GetMotionHistory, (PtrCtrlProcPtr)NoopDDA, GetMotionHistorySize(), 2); pDev->valuator->axisVal[0] = screenInfo.screens[0]->width / 2; - pDev->valuator->lastx = pDev->valuator->axisVal[0]; + pDev->lastx = pDev->valuator->axisVal[0]; pDev->valuator->axisVal[1] = screenInfo.screens[0]->height / 2; - pDev->valuator->lasty = pDev->valuator->axisVal[1]; + pDev->lasty = pDev->valuator->axisVal[1]; classes->key = pDev->key; classes->valuator = pDev->valuator; @@ -1226,8 +1226,6 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, valc->mode = mode; valc->axes = (AxisInfoPtr)(valc + 1); valc->axisVal = (int *)(valc->axes + numAxes); - valc->lastx = 0; - valc->lasty = 0; valc->dxremaind = 0; valc->dyremaind = 0; dev->valuator = valc; diff --git a/dix/getevents.c b/dix/getevents.c index 585fddd69..6791bd820 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -487,8 +487,8 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type, if (master->valuator && pDev->valuator) { - pDev->valuator->lastx = master->valuator->lastx; - pDev->valuator->lasty = master->valuator->lasty; + pDev->lastx = master->lastx; + pDev->lasty = master->lasty; } master->u.lastSlave = pDev; numEvents++; @@ -671,8 +671,8 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, { CreateClassesChangedEvent(events, master, pDev); - pDev->valuator->lastx = master->valuator->lastx; - pDev->valuator->lasty = master->valuator->lasty; + pDev->lastx = master->lastx; + pDev->lasty = master->lasty; master->u.lastSlave = pDev; num_events++; @@ -728,14 +728,14 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, x = valuators[0]; } else { - x = pDev->valuator->lastx; + x = pDev->lastx; } if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) { y = valuators[1 - first_valuator]; } else { - y = pDev->valuator->lasty; + y = pDev->lasty; } } else { @@ -744,14 +744,14 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, valuators); if (first_valuator == 0 && num_valuators >= 1) - x = pDev->valuator->lastx + valuators[0]; + x = pDev->lastx + valuators[0]; else - x = pDev->valuator->lastx; + x = pDev->lastx; if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) - y = pDev->valuator->lasty + valuators[1 - first_valuator]; + y = pDev->lasty + valuators[1 - first_valuator]; else - y = pDev->valuator->lasty; + y = pDev->lasty; } /* Clip both x and y to the defined limits (usually co-ord space limit). */ @@ -772,12 +772,12 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); - pDev->valuator->lastx = x; - pDev->valuator->lasty = y; + pDev->lastx = x; + pDev->lasty = y; if (master) { - master->valuator->lastx = x; - master->valuator->lasty = y; + master->lastx = x; + master->lasty = y; } if (!coreOnly) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 810f45b33..7223f1dfa 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -554,14 +554,14 @@ xf86PostMotionEventP(DeviceIntPtr device, { dx = valuators[0]; if (is_absolute) - dx -= device->valuator->lastx; + dx -= device->lastx; } if (first_valuator == 1 || num_valuators >= 2) { dy = valuators[1 - first_valuator]; if (is_absolute) - dy -= device->valuator->lasty; + dy -= device->lasty; } if (DGAStealMotionEvent(device, index, dx, dy)) @@ -825,11 +825,11 @@ xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum) { if (axnum == 0) { dev->valuator->axisVal[0] = screenInfo.screens[0]->width / 2; - dev->valuator->lastx = dev->valuator->axisVal[0]; + dev->lastx = dev->valuator->axisVal[0]; } else if (axnum == 1) { dev->valuator->axisVal[1] = screenInfo.screens[0]->height / 2; - dev->valuator->lasty = dev->valuator->axisVal[1]; + dev->lasty = dev->valuator->axisVal[1]; } } diff --git a/include/inputstr.h b/include/inputstr.h index 0589097ec..bcb8079b4 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -174,8 +174,6 @@ typedef struct _ValuatorClassRec { AxisInfoPtr axes; unsigned short numAxes; int *axisVal; - int lastx, lasty; /* last event recorded, not posted to - * client; see dix/devices.c */ int dxremaind, dyremaind; /* for acceleration */ CARD8 mode; } ValuatorClassRec, *ValuatorClassPtr; @@ -421,6 +419,8 @@ typedef struct _DeviceIntRec { DeviceIntPtr master; /* master device */ DeviceIntPtr lastSlave; /* last slave device used */ } u; + int lastx, lasty; /* last event recorded, not posted to + * client; see dix/devices.c */ } DeviceIntRec; typedef struct { From 691da031319dc59b9496101358c267f317abfd1e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 22 Nov 2007 17:44:39 +1030 Subject: [PATCH 285/634] Xi: allocate motion history for master device. We're still missing out on the actual content of the history but at least this way we don't segfault. --- Xi/exevents.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Xi/exevents.c b/Xi/exevents.c index d72f00ac2..8c8cdfdd4 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -338,6 +338,7 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) FatalError("[Xi] no memory for class shift.\n"); memcpy(v, from->valuator, sizeof(ValuatorClassRec)); v->motion = NULL; + AllocateMotionHistory(to); /*XXX should be copied somehow */ v->axes = (AxisInfoPtr)&v[1]; memcpy(v->axes, from->valuator->axes, v->numAxes * sizeof(AxisInfo)); From 5dabe448bda68a483bf444a4adfed2b25b30f600 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 24 Nov 2007 15:00:43 +1030 Subject: [PATCH 286/634] dix: Add special treatment of NotifyUngrab for enter/leave events. In some cases (e.g. using x2x) the previous model broke, with a window ending not counting down to 0 anymore. Special treatment for NotifyUngrab seems to help here. Current solution: If a NotifyGrab is to be sent ignore it. If a NotifyUngrab enter is sent, only adjust the semaphore if it is on 0. Likewise, do the same for a NotifyUngrab leave if the semaphore is on 1. This seems to work alright so far. --- dix/events.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/dix/events.c b/dix/events.c index 88ce50179..123f21f41 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4468,15 +4468,20 @@ LeaveNotifies(DeviceIntPtr pDev, } } +/* welcome to insanity */ #define FOCUS_SEMAPHORE_MODIFY(win, field, mode, val) \ - { \ - if (mode != NotifyGrab && mode != NotifyUngrab) \ - { \ - FocusSemaphoresPtr sem;\ - sem = (FocusSemaphoresPtr)win->devPrivates[FocusPrivatesIndex].ptr; \ +{ \ + FocusSemaphoresPtr sem;\ + sem = (FocusSemaphoresPtr)win->devPrivates[FocusPrivatesIndex].ptr; \ + if (mode != NotifyGrab && mode != NotifyUngrab) { \ + sem->field += val; \ + } else if (mode == NotifyUngrab) { \ + if (sem->field == 0 && val > 0) \ sem->field += val; \ - } \ - } + else if (sem->field == 1 && val < 0) \ + sem->field += val; \ + } \ +} #define ENTER_LEAVE_SEMAPHORE_UP(win, mode) \ FOCUS_SEMAPHORE_MODIFY(win, enterleave, mode, 1); From bf3198c8c56289244c58d36c6869442479fd3481 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 24 Nov 2007 15:00:57 +1030 Subject: [PATCH 287/634] dix: fix typo --- dix/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/events.c b/dix/events.c index 123f21f41..43f4e3796 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4326,7 +4326,7 @@ EnterLeaveEvent( #endif { event.u.enterLeave.state = (keybd) ? keybd->key->state : 0; - event.u.enterLeave.state |+ mouse->button->state; + event.u.enterLeave.state |= mouse->button->state; } event.u.enterLeave.mode = mode; focus = (keybd) ? keybd->focus->win : None; From a4edfbef022f9635c2c9b9eb229cb622834dc68c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 24 Nov 2007 16:16:48 +1030 Subject: [PATCH 288/634] mi: only call UpdateSpriteForScreen if the screen actually changed. If we call it unconditionally, we flip the dev->spriteInfo->sprite permanently when using XTestFakeInput (once in CheckMotion as called from the processInputProc, another time in UpdateSpriteForScreen when we actually warp the cursor). USFS also updates to the screen's root window unconditionally, which is not really what we want if we haven't changed screen at all. --- mi/mipointer.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mi/mipointer.c b/mi/mipointer.c index b2f31c1d5..ff5882380 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -359,6 +359,7 @@ miPointerWarpCursor (pDev, pScreen, x, y) int x, y; { miPointerPtr pPointer; + BOOL changedScreen = FALSE; if (!pDev->isMaster && !pDev->u.master) return; @@ -366,7 +367,10 @@ miPointerWarpCursor (pDev, pScreen, x, y) SetupScreen (pScreen); if (pPointer->pScreen != pScreen) + { (*pScreenPriv->screenFuncs->NewEventScreen) (pDev, pScreen, TRUE); + changedScreen = TRUE; + } if (GenerateEvent) { @@ -387,7 +391,8 @@ miPointerWarpCursor (pDev, pScreen, x, y) pPointer->y = y; pPointer->pScreen = pScreen; } - UpdateSpriteForScreen (pDev, pScreen) ; + if (changedScreen) + UpdateSpriteForScreen (pDev, pScreen) ; } /* From 0f2398d06ce591724e388b3270800c5e22b3de2d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 27 Nov 2007 10:22:44 +1030 Subject: [PATCH 289/634] Xi: set DeviceXXXState's length fields to the correct size of the struct. Setting it to the size of a pointer is an interesting but equally wrong approach. Luckily Xlib never used this field anyway so nobody got hurt so far. Spotted by Simon Thum. --- Xi/getdctl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Xi/getdctl.c b/Xi/getdctl.c index 8a84e91bc..7175dc253 100644 --- a/Xi/getdctl.c +++ b/Xi/getdctl.c @@ -128,7 +128,7 @@ static void CopySwapDeviceAbsCalib (ClientPtr client, AbsoluteClassPtr dts, xDeviceAbsCalibState *calib = (xDeviceAbsCalibState *) buf; calib->control = DEVICE_ABS_CALIB; - calib->length = sizeof(calib); + calib->length = sizeof(xDeviceAbsCalibState); calib->min_x = dts->min_x; calib->max_x = dts->max_x; calib->min_y = dts->min_y; @@ -159,7 +159,7 @@ static void CopySwapDeviceAbsArea (ClientPtr client, AbsoluteClassPtr dts, xDeviceAbsAreaState *area = (xDeviceAbsAreaState *) buf; area->control = DEVICE_ABS_AREA; - area->length = sizeof(area); + area->length = sizeof(xDeviceAbsAreaState); area->offset_x = dts->offset_x; area->offset_y = dts->offset_y; area->width = dts->width; @@ -185,7 +185,7 @@ static void CopySwapDeviceCore (ClientPtr client, DeviceIntPtr dev, char *buf) xDeviceCoreState *c = (xDeviceCoreState *) buf; c->control = DEVICE_CORE; - c->length = sizeof(c); + c->length = sizeof(xDeviceCoreState); c->status = dev->coreEvents; c->iscore = (dev == inputInfo.keyboard || dev == inputInfo.pointer); @@ -202,7 +202,7 @@ static void CopySwapDeviceEnable (ClientPtr client, DeviceIntPtr dev, char *buf) xDeviceEnableState *e = (xDeviceEnableState *) buf; e->control = DEVICE_ENABLE; - e->length = sizeof(e); + e->length = sizeof(xDeviceEnableState); e->enable = dev->enabled; if (client->swapped) { From e4fe0a3cb789b8757f1c80f606dfe32bccada582 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 29 Nov 2007 09:55:24 +1030 Subject: [PATCH 290/634] xkb: swap a LookupKeyboardDevice over in favour of GetPairedDevice The former always returns the VCK, which is obviously wrong if we have multiple devices. --- xkb/xkbAccessX.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c index 063c84423..b26c91880 100644 --- a/xkb/xkbAccessX.c +++ b/xkb/xkbAccessX.c @@ -691,7 +691,7 @@ ProcessPointerEvent( register xEvent * xE, register DeviceIntPtr mouse, int count) { -DeviceIntPtr dev = (DeviceIntPtr)LookupKeyboardDevice(); +DeviceIntPtr dev = GetPairedDevice(mouse); XkbSrvInfoPtr xkbi = dev->key->xkbInfo; unsigned changed = 0; ProcessInputProc backupproc; From 9eb8ea9e615ebd8b568711eeca36aa84aa781ad3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 30 Nov 2007 11:32:59 +1030 Subject: [PATCH 291/634] dix: only freeze the paired MD on a grab, not all other devices. --- dix/events.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/dix/events.c b/dix/events.c index 43f4e3796..418079de6 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1520,23 +1520,24 @@ CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode) CLIENT_BITS(grab->resource))) thisDev->deviceGrab.sync.other = NullGrab; } - /* XXX: other should only work on the paired keyboard, not on all other - devices + + /* + XXX: Direct slave grab won't freeze the paired master device. + The correct thing to do would be to freeze all SDs attached to the + paired master device. */ - for (dev = inputInfo.devices; dev; dev = dev->next) + if (thisDev->isMaster) { - if (dev != thisDev) - { - if (otherMode == GrabModeSync) - dev->deviceGrab.sync.other = grab; - else - { /* free both if same client owns both */ - if (dev->deviceGrab.sync.other && - (CLIENT_BITS(dev->deviceGrab.sync.other->resource) == - CLIENT_BITS(grab->resource))) - dev->deviceGrab.sync.other = NullGrab; - } - } + dev = GetPairedDevice(thisDev); + if (otherMode == GrabModeSync) + dev->deviceGrab.sync.other = grab; + else + { /* free both if same client owns both */ + if (dev->deviceGrab.sync.other && + (CLIENT_BITS(dev->deviceGrab.sync.other->resource) == + CLIENT_BITS(grab->resource))) + dev->deviceGrab.sync.other = NullGrab; + } } ComputeFreezes(); } From 6216abe0c1a94efa4b2f0d14e88278f128304cd2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 30 Nov 2007 11:34:24 +1030 Subject: [PATCH 292/634] dix: avoid activating the VCP/VCK twice. This may set dev->key-xkbinfo to NULL, causing a segfault in xkb code lateron. Spotted by David Huggins-Daines. --- dix/devices.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 98cd290e2..4c9c4fb97 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -572,9 +572,6 @@ InitCoreDevices(void) if (!AllocateDevicePrivate(inputInfo.pointer, CoreDevicePrivatesIndex)) FatalError("Couldn't allocate pointer devPrivates\n"); inputInfo.pointer->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; - - ActivateDevice(inputInfo.keyboard); - ActivateDevice(inputInfo.pointer); } /** From 004876355b43fb4d3c2bc5653a7dc1bfd3f985ee Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 30 Nov 2007 13:56:04 +1030 Subject: [PATCH 293/634] dix: Remove RegisterPairingClient and UnregisterPairingClient. --- dix/devices.c | 43 ------------------------------------------- dix/dispatch.c | 1 - include/input.h | 1 - 3 files changed, 45 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 4c9c4fb97..59db5095c 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2371,11 +2371,6 @@ PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd) if (ptr->spriteInfo->paired) return BadDevice; - if (!pairingClient) - RegisterPairingClient(client); - else if (client && pairingClient != client) - return BadAccess; - if (kbd->spriteInfo->spriteOwner) { xfree(kbd->spriteInfo->sprite); @@ -2409,11 +2404,6 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) if (master && !master->isMaster) /* can't attach to slaves */ return BadDevice; - if (!pairingClient) - RegisterPairingClient(client); - else if (client && pairingClient != client) - return BadAccess; - /* set from floating to floating? */ if (!dev->u.master && !master) return Success; @@ -2495,39 +2485,6 @@ GetPairedDevice(DeviceIntPtr dev) return dev->spriteInfo->paired; } -/* - * Register a client to be able to pair devices. - */ -Bool -RegisterPairingClient(ClientPtr client) -{ - if (!pairingClient) - { - pairingClient = client; - } else if (pairingClient != client) - { - return False; - } - return True; -} - -/* - * Unregister pairing client; - */ -Bool -UnregisterPairingClient(ClientPtr client) -{ - if (pairingClient) - { - if ( pairingClient == client) - { - pairingClient = NULL; - } else - return False; - } - return True; -} - /* Guess a pointer that could be a good one for pairing. Any pointer that is * not yet paired with keyboard is considered a good one. * If no pointer is found, the last real pointer is chosen. If that doesn't diff --git a/dix/dispatch.c b/dix/dispatch.c index 5e43902a6..34b0de105 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3572,7 +3572,6 @@ CloseDownClient(ClientPtr client) ReleaseActiveGrabs(client); DeleteClientFontStuff(client); ACUnregisterClient(client); - UnregisterPairingClient(client); /* other clients can pair devices */ if (!really_close_down) { /* This frees resources that should never be retained diff --git a/include/input.h b/include/input.h index 9e73dc26e..c436943e3 100644 --- a/include/input.h +++ b/include/input.h @@ -475,7 +475,6 @@ extern int AttachDevice(ClientPtr client, extern DeviceIntPtr GetPairedDevice(DeviceIntPtr kbd); extern Bool RegisterPairingClient(ClientPtr client); -extern Bool UnregisterPairingClient(ClientPtr client); extern DeviceIntPtr GuessFreePointerDevice(void); extern DeviceIntPtr NextFreePointerDevice(void); From 28b93d74a11a1064d68a214fcaa7b0aede864a38 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 3 Dec 2007 14:32:53 +1030 Subject: [PATCH 294/634] ephyr: miPointerWarpCursor needs the device parameter. Thanks to Mitchell Quille for spotting it. --- hw/kdrive/ephyr/ephyr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index 52f5dcf60..efcca5a33 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -829,7 +829,7 @@ ephyrWarpCursor (ScreenPtr pScreen, int x, int y) { ephyrBlockSigio (); ephyrCurScreen = pScreen->myNum; - miPointerWarpCursor (pScreen, x, y); + miPointerWarpCursor (inputInfo.pointer, pScreen, x, y); ephyrUnblockSigio (); } From 09c0c1a3cc4807813774a3c0e28a7ba9a87bb5c7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 4 Dec 2007 16:51:52 +1030 Subject: [PATCH 295/634] dix: remove #ifdef XINPUT. No escaping XINPUT anymore. --- dix/events.c | 36 +++++++++--------------------------- dix/window.c | 6 ------ 2 files changed, 9 insertions(+), 33 deletions(-) diff --git a/dix/events.c b/dix/events.c index 418079de6..5242f4308 100644 --- a/dix/events.c +++ b/dix/events.c @@ -371,9 +371,7 @@ extern int lastEvent; static Mask lastEventMask; -#ifdef XINPUT extern int DeviceMotionNotify; -#endif #define CantBeFiltered NoEventMask static Mask filters[128] = @@ -2049,7 +2047,6 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask, pEvents->u.u.detail = NotifyNormal; } } -#ifdef XINPUT else { if ((type == DeviceMotionNotify) && @@ -2057,7 +2054,6 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask, ((deviceKeyButtonPointer*)pEvents, mask) != 0) return 1; } -#endif type &= 0177; if (type != KeymapNotify) { @@ -2271,7 +2267,6 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent } else if ((type == MotionNotify) && deliveries) pDev->valuator->motionHintWindow = pWin; -#ifdef XINPUT else { if (((type == DeviceMotionNotify) @@ -2283,7 +2278,6 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent (deviceKeyButtonPointer*) pEvents, grab, client, deliveryMask); } -#endif if (deliveries) return deliveries; return nondeliveries; @@ -3395,11 +3389,7 @@ CheckPassiveGrabsOnWindow( #endif tempGrab.modifierDevice = grab->modifierDevice; if ((device == grab->modifierDevice) && - ((xE->u.u.type == KeyPress) -#if defined(XINPUT) && defined(XKB) - || (xE->u.u.type == DeviceKeyPress) -#endif - )) + ((xE->u.u.type == KeyPress) || (xE->u.u.type == DeviceKeyPress))) tempGrab.modifiersDetail.exact = #ifdef XKB (noXkbExtension) ? @@ -3537,11 +3527,8 @@ CheckDeviceGrabs(DeviceIntPtr device, xEvent *xE, WindowPtr pWin = NULL; FocusClassPtr focus = device->focus; - if (((xE->u.u.type == ButtonPress) -#if defined(XINPUT) && defined(XKB) - || (xE->u.u.type == DeviceButtonPress) -#endif - ) && (device->button->buttonsDown != 1)) + if (((xE->u.u.type == ButtonPress) || (xE->u.u.type == DeviceButtonPress)) + && (device->button->buttonsDown != 1)) return FALSE; i = checkFirst; @@ -3694,18 +3681,13 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, } } if (deliveries && (xE->u.u.type == MotionNotify -#ifdef XINPUT - || xE->u.u.type == DeviceMotionNotify -#endif - )) + || xE->u.u.type == DeviceMotionNotify)) thisDev->valuator->motionHintWindow = grab->window; } } - if (deliveries && !deactivateGrab && (xE->u.u.type != MotionNotify -#ifdef XINPUT - && xE->u.u.type != DeviceMotionNotify -#endif - )) + if (deliveries && !deactivateGrab && + (xE->u.u.type != MotionNotify && xE->u.u.type != DeviceMotionNotify)) + { switch (grabinfo->sync.state) { case FREEZE_BOTH_NEXT_EVENT: @@ -3737,6 +3719,7 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, *dxE = *xE; break; } + } } /** @@ -6022,9 +6005,8 @@ DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) while ( (passive = wPassiveGrabs(pWin)) ) FreeResource(passive->resource, RT_NONE); } -#ifdef XINPUT + DeleteWindowFromAnyExtEvents(pWin, freeResources); -#endif } /** diff --git a/dix/window.c b/dix/window.c index 51891a88e..76e5dec05 100644 --- a/dix/window.c +++ b/dix/window.c @@ -452,7 +452,6 @@ CreateRootWindow(ScreenPtr pScreen) pWin->optional->clipShape = NULL; pWin->optional->inputShape = NULL; #endif -#ifdef XINPUT pWin->optional->inputMasks = NULL; pWin->optional->deviceCursors = NULL; pWin->optional->geMasks = (GenericClientMasksPtr)xcalloc(1, sizeof(GenericClientMasksRec)); @@ -461,7 +460,6 @@ CreateRootWindow(ScreenPtr pScreen) xfree(pWin->optional); return FALSE; } -#endif pWin->optional->access.perm = NULL; pWin->optional->access.deny = NULL; @@ -3690,10 +3688,8 @@ CheckWindowOptionalNeed (WindowPtr w) if (optional->inputShape != NULL) return; #endif -#ifdef XINPUT if (optional->inputMasks != NULL) return; -#endif if (optional->deviceCursors != NULL) { DevCursNodePtr pNode = optional->deviceCursors; @@ -3753,9 +3749,7 @@ MakeWindowOptional (WindowPtr pWin) optional->clipShape = NULL; optional->inputShape = NULL; #endif -#ifdef XINPUT optional->inputMasks = NULL; -#endif optional->deviceCursors = NULL; optional->geMasks = From 0931f40bf1bd6e00b8d95968d761a495b2c9a46c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 4 Dec 2007 17:08:56 +1030 Subject: [PATCH 296/634] dix: comments, whitespaces, copyright fixes. Removing my copyright message for now, should eventually be in line with the rest of the messages. --- dix/events.c | 12 ++++++------ dix/getevents.c | 14 ++++---------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/dix/events.c b/dix/events.c index 5242f4308..21b0eeea3 100644 --- a/dix/events.c +++ b/dix/events.c @@ -107,12 +107,6 @@ of the copyright holder. ******************************************************************/ -/* - * MPX additions - * Copyright 2006 by Peter Hutterer - * Author: Peter Hutterer - */ - /** @file * This file handles event delivery and a big part of the server-side protocol * handling (the parts for input devices). @@ -5022,6 +5016,12 @@ ProcGrabPointer(ClientPtr client) } grab = device->deviceGrab.grab; + /* check for + 1. other client has a grab on the device already. + 2. window is viewable + 3. other client has this device as frozen "other" device + 4. times are screwed. + */ if ((grab) && !SameClient(grab, client)) rep.status = AlreadyGrabbed; else if ((!pWin->realized) || diff --git a/dix/getevents.c b/dix/getevents.c index 6791bd820..9f955cf7b 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -23,12 +23,6 @@ * * Author: Daniel Stone */ - /* - * MPX additions: - * Copyright © 2006 Peter Hutterer - * Author: Peter Hutterer - * - */ #ifdef HAVE_DIX_CONFIG_H #include @@ -112,18 +106,18 @@ key_autorepeats(DeviceIntPtr pDev, int key_code) } void -CreateClassesChangedEvent(EventList* event, - DeviceIntPtr master, +CreateClassesChangedEvent(EventList* event, + DeviceIntPtr master, DeviceIntPtr slave) { - deviceClassesChangedEvent *dcce; + deviceClassesChangedEvent *dcce; int len = sizeof(xEvent); CARD32 ms = GetTimeInMillis(); /* XXX: ok, this is a bit weird. We need to alloc enough size for the * event so it can be filled in in POE lateron. Reason being that if * we realloc the event in POE we can get SIGABRT when we try to free - * or realloc the original pointer. + * or realloc the original pointer. * We can only do it here as we don't have the EventList in the event * processing any more. * From f44d7dcb5fefca3ddfd45e75d0bd0b47ec785e48 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 4 Dec 2007 19:07:46 +1030 Subject: [PATCH 297/634] dix: change the filters to be per-device. If we have one global filter, one pointer may change the filter value and affect another pointer. Reproduceable effect: blackbox and xterm, start dragging xterm then click anywhere with the other pointer (attached to different masterd device!). The button release resets the filter[Motion_Filter(button)] value, thus stopping dragging and no event is sent to the client anymore. Having the filters set per device gets around this. --- Xi/exevents.c | 4 ++-- Xi/extinit.c | 12 +++++++--- dix/events.c | 64 ++++++++++++++++++++++++++++++++------------------- include/dix.h | 1 + 4 files changed, 52 insertions(+), 29 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 8c8cdfdd4..f0d288ff4 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -550,7 +550,7 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) return DONT_PROCESS; if (b->map[key] <= 5) b->state |= (Button1Mask >> 1) << b->map[key]; - SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify); + SetMaskForEvent(device->id, Motion_Filter(b), DeviceMotionNotify); } else if (xE->u.u.type == DeviceButtonRelease) { if (!b) return DONT_PROCESS; @@ -567,7 +567,7 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) return DONT_PROCESS; if (b->map[key] <= 5) b->state &= ~((Button1Mask >> 1) << b->map[key]); - SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify); + SetMaskForEvent(device->id, Motion_Filter(b), DeviceMotionNotify); } else if (xE->u.u.type == ProximityIn) device->valuator->mode &= ~OutOfProximity; else if (xE->u.u.type == ProximityOut) diff --git a/Xi/extinit.c b/Xi/extinit.c index 2d077b2aa..cc75d23f4 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -827,13 +827,16 @@ SetExclusiveAccess(Mask mask) static void SetMaskForExtEvent(Mask mask, int event) { + int i; EventInfo[ExtEventIndex].mask = mask; EventInfo[ExtEventIndex++].type = event; if ((event < LASTEvent) || (event >= 128)) FatalError("MaskForExtensionEvent: bogus event number"); - SetMaskForEvent(mask, event); + + for (i = 0; i < MAX_DEVICES; i++) + SetMaskForEvent(i, mask, event); } /************************************************************************ @@ -974,13 +977,16 @@ FixExtensionEvents(ExtensionEntry * extEntry) static void RestoreExtensionEvents(void) { - int i; + int i, j; IReqCode = 0; for (i = 0; i < ExtEventIndex - 1; i++) { if ((EventInfo[i].type >= LASTEvent) && (EventInfo[i].type < 128)) - SetMaskForEvent(0, EventInfo[i].type); + { + for (j = 0; j < MAX_DEVICES; j++) + SetMaskForEvent(j, 0, EventInfo[i].type); + } EventInfo[i].mask = 0; EventInfo[i].type = 0; } diff --git a/dix/events.c b/dix/events.c index 21b0eeea3..046e4cde5 100644 --- a/dix/events.c +++ b/dix/events.c @@ -367,8 +367,12 @@ static Mask lastEventMask; extern int DeviceMotionNotify; +/** + * Event filters. One set of filters for each device, but only the first layer + * is initialized. The rest is memcpy'd in InitEvents. + */ #define CantBeFiltered NoEventMask -static Mask filters[128] = +static Mask filters[MAX_DEVICES][128] = { { NoSuchEvent, /* 0 */ NoSuchEvent, /* 1 */ @@ -405,7 +409,7 @@ static Mask filters[128] = ColormapChangeMask, /* ColormapNotify */ CantBeFiltered, /* ClientMessage */ CantBeFiltered /* MappingNotify */ -}; +}}; /** @@ -787,17 +791,19 @@ XineramaChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) #endif /* PANORAMIX */ void -SetMaskForEvent(Mask mask, int event) +SetMaskForEvent(int deviceid, Mask mask, int event) { int coretype; + if (deviceid < 0 || deviceid > MAX_DEVICES) + FatalError("SetMaskForEvent: bogus device id"); if ((event < LASTEvent) || (event >= 128)) FatalError("SetMaskForEvent: bogus event number"); - filters[event] = mask; + filters[deviceid][event] = mask; /* Need to change the mask for the core events too */ coretype = XItoCoreType(event); if (coretype) - filters[coretype] = mask; + filters[deviceid][coretype] = mask; } _X_EXPORT void @@ -2440,7 +2446,7 @@ DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab, { Window child = None; int type = xE->u.u.type; - Mask filter = filters[type]; + Mask filter = filters[dev->id][type]; int deliveries = 0; if (type & EXTENSION_EVENT_BASE) @@ -2555,7 +2561,9 @@ DeliverEvents(WindowPtr pWin, xEvent *xE, int count, if (!count) return 0; - filter = filters[xE->u.u.type]; + /* We don't know a device here. However, this should only ever be called + for a non-device event so we are safe to use 0*/ + filter = filters[0][xE->u.u.type]; if ((filter & SubstructureNotifyMask) && (xE->u.u.type != CreateNotify)) xE->u.destroyNotify.event = pWin->drawable.id; if (filter != StructureAndSubMask) @@ -3466,8 +3474,8 @@ CheckPassiveGrabsOnWindow( FixUpEventFromWindow(device, xE, grab->window, None, TRUE); (void) TryClientEvents(rClient(grab), xE, count, - filters[xE->u.u.type], - filters[xE->u.u.type], grab); + filters[device->id][xE->u.u.type], + filters[device->id][xE->u.u.type], grab); if (grabinfo->sync.state == FROZEN_NO_EVENT) { @@ -3590,7 +3598,8 @@ DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count) FixUpEventFromWindow(pointer, xE, focus, None, FALSE); if (xE->u.u.type & EXTENSION_EVENT_BASE) mskidx = keybd->id; - (void)DeliverEventsToWindow(keybd, focus, xE, count, filters[xE->u.u.type], + (void)DeliverEventsToWindow(keybd, focus, xE, count, + filters[keybd->id][xE->u.u.type], NullGrab, mskidx); } @@ -3671,7 +3680,7 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, IsInterferingGrab(rClient(grab), thisDev, xE))) { deliveries = TryClientEvents(rClient(grab), xE, count, - mask, filters[xE->u.u.type], grab); + mask, filters[thisDev->id][xE->u.u.type], grab); } } if (deliveries && (xE->u.u.type == MotionNotify @@ -3989,7 +3998,7 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) */ if (xE->u.u.detail == 0) return; - filters[MotionNotify] = Motion_Filter(butc); + filters[mouse->id][Motion_Filter(butc)] = MotionNotify; if (!grab) if (CheckDeviceGrabs(mouse, xE, 0, count)) return; @@ -3997,7 +4006,7 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) case ButtonRelease: if (xE->u.u.detail == 0) return; - filters[MotionNotify] = Motion_Filter(butc); + filters[mouse->id][Motion_Filter(butc)] = MotionNotify; if (!butc->state && mouse->deviceGrab.fromPassiveGrab) deactivateGrab = TRUE; break; @@ -4350,14 +4359,14 @@ EnterLeaveEvent( sendevent = TRUE; } - if ((mask & filters[type]) && sendevent) + if ((mask & filters[mouse->id][type]) && sendevent) { if (grab) (void)TryClientEvents(rClient(grab), &event, 1, mask, - filters[type], grab); + filters[mouse->id][type], grab); else - (void)DeliverEventsToWindow(mouse, pWin, &event, 1, filters[type], - NullGrab, 0); + (void)DeliverEventsToWindow(mouse, pWin, &event, 1, + filters[mouse->id][type], NullGrab, 0); } /* we don't have enough bytes, so we squash flags and mode into @@ -4372,15 +4381,17 @@ EnterLeaveEvent( mskidx = mouse->id; inputMasks = wOtherInputMasks(pWin); if (inputMasks && - (filters[devEnterLeave->type] & inputMasks->deliverableEvents[mskidx])) + (filters[mouse->id][devEnterLeave->type] & + inputMasks->deliverableEvents[mskidx])) { if (devgrab) (void)TryClientEvents(rClient(devgrab), (xEvent*)devEnterLeave, 1, - mask, filters[devEnterLeave->type], devgrab); + mask, filters[mouse->id][devEnterLeave->type], + devgrab); else (void)DeliverEventsToWindow(mouse, pWin, (xEvent*)devEnterLeave, - 1, filters[devEnterLeave->type], - NullGrab, mouse->id); + 1, filters[mouse->id][devEnterLeave->type], + NullGrab, mouse->id); } if ((type == EnterNotify) && (mask & KeymapStateMask)) @@ -4579,8 +4590,8 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) event.u.u.type = type; event.u.u.detail = detail; event.u.focus.window = pWin->drawable.id; - (void)DeliverEventsToWindow(dev, pWin, &event, 1, filters[type], NullGrab, - 0); + (void)DeliverEventsToWindow(dev, pWin, &event, 1, + filters[dev->id][type], NullGrab, 0); if ((type == FocusIn) && ((pWin->eventMask | wOtherEventMasks(pWin)) & KeymapStateMask)) { @@ -5528,7 +5539,12 @@ InitEvents(void) inputInfo.keyboard = (DeviceIntPtr)NULL; inputInfo.pointer = (DeviceIntPtr)NULL; lastEventMask = OwnerGrabButtonMask; - filters[MotionNotify] = PointerMotionMask; + filters[0][PointerMotionMask] = MotionNotify; + for (i = 1; i < MAX_DEVICES; i++) + { + memcpy(&filters[i], filters[0], sizeof(filters[0])); + } + #ifdef XEVIE xeviewin = NULL; #endif diff --git a/include/dix.h b/include/dix.h index db90579aa..6da3ee86f 100644 --- a/include/dix.h +++ b/include/dix.h @@ -345,6 +345,7 @@ extern void SetVendorString(char *string); /* events.c */ extern void SetMaskForEvent( + int /* deviceid */, Mask /* mask */, int /* event */); From 447cd5d411875b62eb1a501bf00e604225b74d26 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 4 Dec 2007 19:09:37 +1030 Subject: [PATCH 298/634] dix: update comments about inputInfo.pointer. --- dix/events.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/dix/events.c b/dix/events.c index 046e4cde5..340e2bcc7 100644 --- a/dix/events.c +++ b/dix/events.c @@ -237,24 +237,21 @@ static int DontPropagateRefCnts[DNPMCOUNT]; * inputInfo.pointer * is the core pointer. Referred to as "virtual core pointer", "VCP", * "core pointer" or inputInfo.pointer. There is exactly one core pointer, - * but multiple devices may send core events. The VCP is only used if no - * physical device is connected and does not have a visible cursor. - * Before the integration of MPX, any core request would operate on the - * VCP/VCK. Core events would always come from one of those two. Now both - * are only fallback devices if no physical devices are available. + * but multiple devices may send core events. The VCP is the first master + * pointer device and cannot be deleted. * * inputInfo.keyboard * is the core keyboard ("virtual core keyboard", "VCK", "core keyboard"). * See inputInfo.pointer. * * inputInfo.devices - * linked list containing all devices BUT NOT INCLUDING VCK and VCP. + * linked list containing all devices including VCP and VCK. * * inputInfo.off_devices * Devices that have not been initialized and are thus turned off. * * inputInfo.numDevices - * Total number of devices (not counting VCP and VCK). + * Total number of devices. */ _X_EXPORT InputInfo inputInfo; From 117458d2db49efd3f04432ff45871b44c7d4ad57 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 7 Dec 2007 20:18:49 +1030 Subject: [PATCH 299/634] mi: change infamous "Tossed event ..." error for something more explanatory. Few whitespace errors fixed. Two ErrorF's prefixed with [mi]. --- mi/mieq.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mi/mieq.c b/mi/mieq.c index 5dcc40461..15155124c 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -142,7 +142,7 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e) lastkbp = (deviceKeyButtonPointer *) laste->events->event; if (laste->nevents > 6) { - ErrorF("mieqEnqueue: more than six valuator events; dropping.\n"); + ErrorF("[mi] mieqEnqueue: more than six valuator events; dropping.\n"); return; } if (oldtail == miEventQueue.head || @@ -151,7 +151,7 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e) lastkbp->type == DeviceButtonRelease) || ((lastkbp->deviceid & DEVICE_BITS) != (v->deviceid & DEVICE_BITS))) { - ErrorF("mieqEnequeue: out-of-order valuator event; dropping.\n"); + ErrorF("[mi] mieqEnequeue: out-of-order valuator event; dropping.\n"); return; } @@ -164,12 +164,13 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e) oldtail = (oldtail - 1) % QUEUE_SIZE; } else { - newtail = (oldtail + 1) % QUEUE_SIZE; - /* Toss events which come in late. Usually this means your server's + newtail = (oldtail + 1) % QUEUE_SIZE; + /* Toss events which come in late. Usually this means your server's * stuck in an infinite loop somewhere, but SIGIO is still getting * handled. */ - if (newtail == miEventQueue.head) { - ErrorF("tossed event which came in late\n"); + if (newtail == miEventQueue.head) { + ErrorF("[mi] EQ overflowing. The server is probably stuck " + "in an infinite loop.\n"); return; } miEventQueue.tail = newtail; From c5acf401dad6fbca47f2bb870185c1d08ac947a5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 7 Dec 2007 20:19:43 +1030 Subject: [PATCH 300/634] mi: unify last two ErrorF's in mieq.c --- mi/mieq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mi/mieq.c b/mi/mieq.c index 15155124c..31f838c35 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -187,7 +187,7 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e) evt->event = xrealloc(evt->event, evt->evlen); if (!evt->event) { - ErrorF("Running out of memory. Tossing event.\n"); + ErrorF("[mi] Running out of memory. Tossing event.\n"); return; } } @@ -221,7 +221,7 @@ void mieqSetHandler(int event, mieqHandler handler) { if (handler && miEventQueue.handlers[event]) - ErrorF("mieq: warning: overriding existing handler %p with %p for " + ErrorF("[mi] mieq: warning: overriding existing handler %p with %p for " "event %d\n", miEventQueue.handlers[event], handler, event); miEventQueue.handlers[event] = handler; From 3a058456e0ce531b21ae2b37be8868b8e0d56e56 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 7 Dec 2007 20:23:36 +1030 Subject: [PATCH 301/634] mi: unify ErrorFs, prepend [mi] --- mi/miinitext.c | 6 +++--- mi/miregion.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mi/miinitext.c b/mi/miinitext.c index 6eb035268..45a14aff1 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -518,11 +518,11 @@ void EnableDisableExtensionError(char *name, Bool enable) { ExtensionToggle *ext = &ExtensionToggleList[0]; - ErrorF("Extension \"%s\" is not recognized\n", name); - ErrorF("Only the following extensions can be run-time %s:\n", + ErrorF("[mi] Extension \"%s\" is not recognized\n", name); + ErrorF("[mi] Only the following extensions can be run-time %s:\n", enable ? "enabled" : "disabled"); for (ext = &ExtensionToggleList[0]; ext->name != NULL; ext++) - ErrorF(" %s\n", ext->name); + ErrorF("[mi] %s\n", ext->name); } #ifndef XFree86LOADER diff --git a/mi/miregion.c b/mi/miregion.c index 45768a34f..6316561e1 100644 --- a/mi/miregion.c +++ b/mi/miregion.c @@ -267,13 +267,13 @@ miPrintRegion(rgn) num = REGION_NUM_RECTS(rgn); size = REGION_SIZE(rgn); rects = REGION_RECTS(rgn); - ErrorF("num: %d size: %d\n", num, size); - ErrorF("extents: %d %d %d %d\n", + ErrorF("[mi] num: %d size: %d\n", num, size); + ErrorF("[mi] extents: %d %d %d %d\n", rgn->extents.x1, rgn->extents.y1, rgn->extents.x2, rgn->extents.y2); for (i = 0; i < num; i++) - ErrorF("%d %d %d %d \n", + ErrorF("[mi] %d %d %d %d \n", rects[i].x1, rects[i].y1, rects[i].x2, rects[i].y2); - ErrorF("\n"); + ErrorF("[mi] \n"); } _X_EXPORT Bool From d86e7f2ecc0a0129a722ffaca93dfc7c0c60e842 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 7 Dec 2007 20:40:21 +1030 Subject: [PATCH 302/634] dix: when getting a bogus event, at least print out the type. --- dix/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/events.c b/dix/events.c index 340e2bcc7..bb4225944 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4008,7 +4008,7 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) deactivateGrab = TRUE; break; default: - FatalError("bogus pointer event from ddx"); + FatalError("bogus pointer event from ddx. Type %d\n", xE->u.u.type); } } From 9f6ae61ad12cc2813d04405458e1ca5aed8a539e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 18 Dec 2007 13:57:07 +1030 Subject: [PATCH 303/634] dix: set the correct number of valuators in valuator events. (first_valuator + num_valuators) must never be larger than the number of axes, otherwise DIX freaks out. And from looking at libXI, anything larger than 6 is wrong too. --- dix/getevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/getevents.c b/dix/getevents.c index 9f955cf7b..f21bb1b88 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -392,7 +392,7 @@ getValuatorEvents(EventList *events, DeviceIntPtr pDev, int first_valuator, xv = (deviceValuator*)events->event; xv->type = DeviceValuator; xv->first_valuator = i; - xv->num_valuators = num_valuators; + xv->num_valuators = ((num_valuators - i) > 6) ? 6 : (num_valuators - i); xv->deviceid = pDev->id; switch (final_valuator - i) { case 6: From eace88989c3b65d5c20e9f37ea9b23c7c8e19335 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 19 Dec 2007 16:20:36 +1030 Subject: [PATCH 304/634] include: never overwrite realInputProc with enqueueInputProc. Bug #13511 In some cases (triggered by a key repeat during a sync grab) XKB unwrapping can overwrite the device's realInputProc with the enqueueInputProc. When the grab is released and the events are replayed, we end up in an infinite loop. Each event is replayed and in replaying pushed to the end of the queue again. This fix is a hack only. It ensures that the realInputProc is never overwritten with the enqueueInputProc. This fixes Bug #13511 (https://bugs.freedesktop.org/show_bug.cgi?id=13511) --- include/xkbsrv.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/xkbsrv.h b/include/xkbsrv.h index 4395c87e3..b9d70843a 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -258,7 +258,8 @@ typedef struct device->public.processInputProc = proc; \ oldprocs->processInputProc = \ oldprocs->realInputProc = device->public.realInputProc; \ - device->public.realInputProc = proc; \ + if (proc != device->public.enqueueInputProc) \ + device->public.realInputProc = proc; \ oldprocs->unwrapProc = device->unwrapProc; \ device->unwrapProc = unwrapproc; From c7e9b67c547c97b2c943eab555b4fe2844e8a91f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 3 Jan 2008 18:09:56 +1030 Subject: [PATCH 305/634] dix: free ClassesRec when a BadAlloc occurs during CoreKeyboardProc. --- dix/devices.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dix/devices.c b/dix/devices.c index ed69cb869..f1a75957a 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -415,12 +415,14 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what) keySyms.mapWidth); if (!keySyms.map) { ErrorF("[dix] Couldn't allocate core keymap\n"); + xfree(classes); return BadAlloc; } modMap = (CARD8 *)xalloc(MAP_LENGTH); if (!modMap) { ErrorF("[dix] Couldn't allocate core modifier map\n"); + xfree(classes); return BadAlloc; } bzero((char *)modMap, MAP_LENGTH); From 37194b13554f0d36343cf73324b128b15bb6a338 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 3 Jan 2008 18:36:33 +1030 Subject: [PATCH 306/634] Xi: switch to using "rc" (instead of "err") as returncode. All the rest of XI uses rc and returns rc in case of error, so make mpx-related stuff comply. This stops the rest of XI sending the error manually. This is just a cosmetic change to be in line with the rest. --- Xi/chaccess.c | 49 ++++++++++++++++++------------------------------ Xi/chdevcur.c | 18 ++++++++---------- Xi/extgrbdev.c | 24 ++++++++++++------------ Xi/fakedevdata.c | 9 +++------ Xi/qryacces.c | 14 +++++--------- Xi/setcptr.c | 18 +++++++++--------- Xi/warpdevp.c | 24 ++++++++++-------------- Xi/xiselev.c | 9 ++++----- 8 files changed, 69 insertions(+), 96 deletions(-) diff --git a/Xi/chaccess.c b/Xi/chaccess.c index 872612e47..a58409bbc 100644 --- a/Xi/chaccess.c +++ b/Xi/chaccess.c @@ -63,7 +63,7 @@ SProcXChangeWindowAccess(ClientPtr client) int ProcXChangeWindowAccess(ClientPtr client) { - int padding, err, i; + int padding, rc, i; XID* deviceids = NULL; WindowPtr win; DeviceIntPtr* perm_devices = NULL; @@ -77,27 +77,21 @@ ProcXChangeWindowAccess(ClientPtr client) if (stuff->length != ((sizeof(xChangeWindowAccessReq) + (((stuff->npermit + stuff->ndeny) * sizeof(XID)) + padding)) >> 2)) { - SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, - 0, BadLength); - return Success; + return BadLength; } - err = dixLookupWindow(&win, stuff->win, client, DixWriteAccess); - if (err != Success) + rc = dixLookupWindow(&win, stuff->win, client, DixWriteAccess); + if (rc != Success) { - SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, - stuff->win, err); - return Success; + return rc; } /* Are we clearing? if so, ignore the rest */ if (stuff->clear) { - err = ACClearWindowAccess(client, win, stuff->clear); - if (err != Success) - SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, 0, err); - return Success; + rc = ACClearWindowAccess(client, win, stuff->clear); + return rc; } if (stuff->npermit || stuff->ndeny) @@ -110,20 +104,18 @@ ProcXChangeWindowAccess(ClientPtr client) if (!perm_devices) { ErrorF("[Xi] ProcXChangeWindowAccess: alloc failure.\n"); - SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, 0, - BadImplementation); - return Success; + return BadImplementation; } /* if one of the devices cannot be accessed, we don't do anything.*/ for (i = 0; i < stuff->npermit; i++) { - err = dixLookupDevice(&perm_devices[i], deviceids[i], client, + rc = dixLookupDevice(&perm_devices[i], deviceids[i], client, DixWriteAccess); - if (err != Success) + if (rc != Success) { xfree(perm_devices); - return err; + return rc; } } } @@ -135,36 +127,31 @@ ProcXChangeWindowAccess(ClientPtr client) if (!deny_devices) { ErrorF("[Xi] ProcXChangeWindowAccecss: alloc failure.\n"); - SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, 0, - BadImplementation); - xfree(perm_devices); - return Success; + return BadImplementation; } for (i = 0; i < stuff->ndeny; i++) { - err = dixLookupDevice(&deny_devices[i], + rc = dixLookupDevice(&deny_devices[i], deviceids[i+stuff->npermit], client, DixWriteAccess); - if (err != Success) + if (rc != Success) { xfree(perm_devices); xfree(deny_devices); - return err; + return rc; } } } - err = ACChangeWindowAccess(client, win, stuff->defaultRule, + rc = ACChangeWindowAccess(client, win, stuff->defaultRule, perm_devices, stuff->npermit, deny_devices, stuff->ndeny); - if (err != Success) + if (rc != Success) { - SendErrorToClient(client, IReqCode, X_ChangeWindowAccess, - stuff->win, err); - return Success; + return rc; } xfree(perm_devices); diff --git a/Xi/chdevcur.c b/Xi/chdevcur.c index 0baee58ba..0a149008a 100644 --- a/Xi/chdevcur.c +++ b/Xi/chdevcur.c @@ -71,7 +71,7 @@ SProcXChangeDeviceCursor(ClientPtr client) int ProcXChangeDeviceCursor(ClientPtr client) { - int err; + int rc; WindowPtr pWin = NULL; DeviceIntPtr pDev = NULL; CursorPtr pCursor = NULL; @@ -79,15 +79,15 @@ int ProcXChangeDeviceCursor(ClientPtr client) REQUEST(xChangeDeviceCursorReq); REQUEST_SIZE_MATCH(xChangeDeviceCursorReq); - err = dixLookupDevice(&pDev, stuff->deviceid, client, DixSetAttrAccess); - if (err != Success) - return err; + rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixSetAttrAccess); + if (rc != Success) + return rc; if (stuff->win != None) { - err = dixLookupWindow(&pWin, stuff->win, client, DixSetAttrAccess); - if (err != Success) - return err; + rc = dixLookupWindow(&pWin, stuff->win, client, DixSetAttrAccess); + if (rc != Success) + return rc; } if (stuff->cursor == None) @@ -103,9 +103,7 @@ int ProcXChangeDeviceCursor(ClientPtr client) RT_CURSOR, DixReadAccess); if (!pCursor) { - SendErrorToClient(client, IReqCode, X_ChangeDeviceCursor, - stuff->cursor, BadCursor); - return Success; + return BadCursor; } } diff --git a/Xi/extgrbdev.c b/Xi/extgrbdev.c index 7738f1555..72f887958 100644 --- a/Xi/extgrbdev.c +++ b/Xi/extgrbdev.c @@ -93,7 +93,7 @@ ProcXExtendedGrabDevice(ClientPtr client) { xExtendedGrabDeviceReply rep; DeviceIntPtr dev; - int err = Success, + int rc = Success, errval = 0, i; WindowPtr grab_window, @@ -122,12 +122,12 @@ ProcXExtendedGrabDevice(ClientPtr client) stuff->event_count + 2 * stuff->generic_event_count)) { errval = 0; - err = BadLength; + rc = BadLength; goto cleanup; } - err = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess); - if (err != Success) { + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess); + if (rc != Success) { goto cleanup; } @@ -138,11 +138,11 @@ ProcXExtendedGrabDevice(ClientPtr client) goto cleanup; } - err = dixLookupWindow(&grab_window, + rc = dixLookupWindow(&grab_window, stuff->grab_window, client, DixReadAccess); - if (err != Success) + if (rc != Success) { errval = stuff->grab_window; goto cleanup; @@ -150,11 +150,11 @@ ProcXExtendedGrabDevice(ClientPtr client) if (stuff->confine_to) { - err = dixLookupWindow(&confineTo, + rc = dixLookupWindow(&confineTo, stuff->confine_to, client, DixReadAccess); - if (err != Success) + if (rc != Success) { errval = stuff->confine_to; goto cleanup; @@ -170,7 +170,7 @@ ProcXExtendedGrabDevice(ClientPtr client) if (!cursor) { errval = stuff->cursor; - err = BadCursor; + rc = BadCursor; goto cleanup; } } @@ -205,7 +205,7 @@ ProcXExtendedGrabDevice(ClientPtr client) cursor, tmp[stuff->deviceid].mask, gemasks); - if (err != Success) { + if (rc != Success) { errval = 0; goto cleanup; } @@ -215,13 +215,13 @@ cleanup: if (gemasks) xfree(gemasks); - if (err == Success) + if (rc == Success) { WriteReplyToClient(client, sizeof(xGrabDeviceReply), &rep); } else { - return err; + return rc; } return Success; } diff --git a/Xi/fakedevdata.c b/Xi/fakedevdata.c index 7f2d3ec4e..92ee8ee09 100644 --- a/Xi/fakedevdata.c +++ b/Xi/fakedevdata.c @@ -86,8 +86,7 @@ ProcXFakeDeviceData(ClientPtr client) if (stuff->length != (sizeof(xFakeDeviceDataReq) >> 2) + stuff->num_valuators) { - SendErrorToClient(client, IReqCode, X_FakeDeviceData, 0, BadLength); - return Success; + return BadLength; } rc = dixLookupDevice(&dev, stuff->deviceid, client, DixWriteAccess); @@ -96,8 +95,7 @@ ProcXFakeDeviceData(ClientPtr client) if (!fake_events && !(fake_events = InitEventList(GetMaximumEventsNum()))) { - SendErrorToClient(client, IReqCode, X_FakeDeviceData, 0, BadAlloc); - return Success; + return BadAlloc; } if (stuff->num_valuators) { @@ -106,8 +104,7 @@ ProcXFakeDeviceData(ClientPtr client) valuators = xcalloc(stuff->num_valuators, sizeof(int)); if (!valuators) { - SendErrorToClient(client, IReqCode, X_FakeDeviceData, 0, BadAlloc); - return Success; + return BadAlloc; } for (i = 0; i < stuff->num_valuators; i++, valptr++) valuators[i] = (int)(*valptr); diff --git a/Xi/qryacces.c b/Xi/qryacces.c index 673028c2d..ab627e2b1 100644 --- a/Xi/qryacces.c +++ b/Xi/qryacces.c @@ -64,7 +64,7 @@ SProcXQueryWindowAccess(ClientPtr client) int ProcXQueryWindowAccess(ClientPtr client) { - int err; + int rc; WindowPtr win; DeviceIntPtr *perm, *deny; int nperm, ndeny, i; @@ -75,12 +75,10 @@ ProcXQueryWindowAccess(ClientPtr client) REQUEST(xQueryWindowAccessReq); REQUEST_SIZE_MATCH(xQueryWindowAccessReq); - err = dixLookupWindow(&win, stuff->win, client, DixReadAccess); - if (err != Success) + rc = dixLookupWindow(&win, stuff->win, client, DixReadAccess); + if (rc != Success) { - SendErrorToClient(client, IReqCode, X_QueryWindowAccess, - stuff->win, err); - return Success; + return rc; } ACQueryWindowAccess(win, &defaultRule, &perm, &nperm, &deny, &ndeny); @@ -100,9 +98,7 @@ ProcXQueryWindowAccess(ClientPtr client) if (!deviceids) { ErrorF("[Xi] ProcXQueryWindowAccess: xalloc failure.\n"); - SendErrorToClient(client, IReqCode, X_QueryWindowAccess, - 0, BadImplementation); - return Success; + return BadImplementation; } for (i = 0; i < nperm; i++) diff --git a/Xi/setcptr.c b/Xi/setcptr.c index 8dd71817f..968e5cd5c 100644 --- a/Xi/setcptr.c +++ b/Xi/setcptr.c @@ -70,15 +70,15 @@ ProcXSetClientPointer(ClientPtr client) DeviceIntPtr pDev; WindowPtr pWin; ClientPtr targetClient; - int err; + int rc; REQUEST(xSetClientPointerReq); REQUEST_SIZE_MATCH(xSetClientPointerReq); - err = dixLookupDevice(&pDev, stuff->deviceid, client, DixWriteAccess); - if (err != Success) - return err; + rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixWriteAccess); + if (rc != Success) + return rc; if (!IsPointerDevice(pDev) || !pDev->isMaster) { @@ -88,18 +88,18 @@ ProcXSetClientPointer(ClientPtr client) if (stuff->win != None) { - err = dixLookupWindow(&pWin, stuff->win, client, DixWriteAccess); - if (err != Success) + rc = dixLookupWindow(&pWin, stuff->win, client, DixWriteAccess); + if (rc != Success) { /* window could not be found. maybe the window ID given was a pure client id? */ /* XXX: Needs to be fixed for XACE */ - err = dixLookupClient(&targetClient, stuff->win, + rc = dixLookupClient(&targetClient, stuff->win, client, DixWriteAccess); - if (err != Success) + if (rc != Success) { client->errorValue = stuff->win; - return err; + return rc; } } else targetClient= wClient(pWin); diff --git a/Xi/warpdevp.c b/Xi/warpdevp.c index 24661d099..26081eb59 100644 --- a/Xi/warpdevp.c +++ b/Xi/warpdevp.c @@ -70,7 +70,7 @@ SProcXWarpDevicePointer(ClientPtr client) int ProcXWarpDevicePointer(ClientPtr client) { - int err; + int rc; int x, y; WindowPtr dest = NULL; DeviceIntPtr pDev; @@ -82,19 +82,17 @@ ProcXWarpDevicePointer(ClientPtr client) /* FIXME: panoramix stuff is missing, look at ProcWarpPointer */ - err = dixLookupDevice(&pDev, stuff->deviceid, client, DixWriteAccess); + rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixWriteAccess); - if (err != Success) - return err; + if (rc != Success) + return rc; if (stuff->dst_win != None) { - err = dixLookupWindow(&dest, stuff->dst_win, client, DixReadAccess); - if (err != Success) + rc = dixLookupWindow(&dest, stuff->dst_win, client, DixReadAccess); + if (rc != Success) { - SendErrorToClient(client, IReqCode, X_WarpDevicePointer, - stuff->dst_win, err); - return Success; + return rc; } } @@ -107,12 +105,10 @@ ProcXWarpDevicePointer(ClientPtr client) int winX, winY; WindowPtr src; - err = dixLookupWindow(&src, stuff->src_win, client, DixReadAccess); - if (err != Success) + rc = dixLookupWindow(&src, stuff->src_win, client, DixReadAccess); + if (rc != Success) { - SendErrorToClient(client, IReqCode, X_WarpDevicePointer, - stuff->src_win, err); - return Success; + return rc; } winX = src->drawable.x; diff --git a/Xi/xiselev.c b/Xi/xiselev.c index 59f75b547..3c85032d5 100644 --- a/Xi/xiselev.c +++ b/Xi/xiselev.c @@ -59,16 +59,15 @@ SProcXiSelectEvent(ClientPtr client) int ProcXiSelectEvent(ClientPtr client) { - int ret; + int rc; WindowPtr pWin; REQUEST(xXiSelectEventReq); REQUEST_SIZE_MATCH(xXiSelectEventReq); - ret = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); - if (ret != Success) + rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (rc != Success) { - SendErrorToClient(client, IReqCode, X_XiSelectEvent, 0, ret); - return Success; + return rc; } GEWindowSetMask(client, pWin, IReqCode, stuff->mask); From 521fdc28d86d091495da3558d26ab4a938250ffe Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 3 Jan 2008 18:43:18 +1030 Subject: [PATCH 307/634] xfixes: switch a few inputInfo.pointer to PickPointer --- xfixes/cursor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xfixes/cursor.c b/xfixes/cursor.c index a804a8963..fd75df7b9 100755 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -355,7 +355,7 @@ ProcXFixesGetCursorImage (ClientPtr client) pCursor, RT_NONE, NULL, DixReadAccess); if (rc != Success) return rc; - GetSpritePosition (inputInfo.pointer, &x, &y); + GetSpritePosition (PickPointer(client), &x, &y); width = pCursor->bits->width; height = pCursor->bits->height; npixels = width * height; @@ -507,7 +507,7 @@ ProcXFixesGetCursorImageAndName (ClientPtr client) pCursor, RT_NONE, NULL, DixReadAccess|DixGetAttrAccess); if (rc != Success) return rc; - GetSpritePosition (inputInfo.pointer, &x, &y); + GetSpritePosition (PickPointer(client), &x, &y); width = pCursor->bits->width; height = pCursor->bits->height; npixels = width * height; @@ -879,7 +879,7 @@ ProcXFixesHideCursor (ClientPtr client) ret = createCursorHideCount(client, pWin->drawable.pScreen); if (ret == Success) { - (void) CursorDisplayCursor(inputInfo.pointer, pWin->drawable.pScreen, CursorCurrent); + (void) CursorDisplayCursor(PickPointer(client), pWin->drawable.pScreen, CursorCurrent); } return ret; From 9cc41b88dfebb3f1e0a7cb5c224146e651a2cda4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 3 Jan 2008 18:47:28 +1030 Subject: [PATCH 308/634] Xi: ProcXSetClientPointer should directly check for the client from the id. The window ID includes the client ID anyway, so we might as well just look up the client directly instead of trying to get the window first and the client from the window. This also fixes a possible issue with XACE. If the client had permission to write on the client but not on the window, the previous approach would have failed. --- Xi/setcptr.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/Xi/setcptr.c b/Xi/setcptr.c index 968e5cd5c..7313a9d92 100644 --- a/Xi/setcptr.c +++ b/Xi/setcptr.c @@ -68,7 +68,6 @@ int ProcXSetClientPointer(ClientPtr client) { DeviceIntPtr pDev; - WindowPtr pWin; ClientPtr targetClient; int rc; @@ -88,21 +87,12 @@ ProcXSetClientPointer(ClientPtr client) if (stuff->win != None) { - rc = dixLookupWindow(&pWin, stuff->win, client, DixWriteAccess); + rc = dixLookupClient(&targetClient, stuff->win, client, + DixWriteAccess); + if (rc != Success) - { - /* window could not be found. maybe the window ID given was a pure - client id? */ - /* XXX: Needs to be fixed for XACE */ - rc = dixLookupClient(&targetClient, stuff->win, - client, DixWriteAccess); - if (rc != Success) - { - client->errorValue = stuff->win; - return rc; - } - } else - targetClient= wClient(pWin); + return rc; + } else targetClient = client; From b2da44c76d68a76f20e90bccb268ebf65e132b49 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 3 Jan 2008 18:51:44 +1030 Subject: [PATCH 309/634] dix: DoChangeKeyboardControl shouldn't be using inputInfo.keyboard. --- dix/devices.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index f1a75957a..8d98f132b 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2016,8 +2016,8 @@ DoChangeKeyboardControl (ClientPtr client, DeviceIntPtr keybd, XID *vlist, case KBKey: key = (KeyCode)*vlist; vlist++; - if ((KeyCode)key < inputInfo.keyboard->key->curKeySyms.minKeyCode || - (KeyCode)key > inputInfo.keyboard->key->curKeySyms.maxKeyCode) { + if ((KeyCode)key < keybd->key->curKeySyms.minKeyCode || + (KeyCode)key > keybd->key->curKeySyms.maxKeyCode) { client->errorValue = key; return BadValue; } From e4a214e40d35aa957c83b86b4e4abc86c22fbde0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 4 Jan 2008 13:32:53 +1030 Subject: [PATCH 310/634] dix: don't free device's devPrivates manually, dixFreePrivates does it. Merge detritus from last pull. --- dix/devices.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 8d98f132b..74212b246 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -843,9 +843,6 @@ CloseDevice(DeviceIntPtr dev) } } - if (dev->devPrivates) - xfree(dev->devPrivates); - xfree(dev->deviceGrab.sync.event); dixFreePrivates(dev->devPrivates); xfree(dev); From 249b9b30c11e03bb113b37cf4712bf88debf6f05 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 4 Jan 2008 13:49:48 +1030 Subject: [PATCH 311/634] Xi: remove file for the obsolete ChangePointerKeyboardPairing request handling. --- Xi/chpkpair.c | 137 -------------------------------------------------- 1 file changed, 137 deletions(-) delete mode 100644 Xi/chpkpair.c diff --git a/Xi/chpkpair.c b/Xi/chpkpair.c deleted file mode 100644 index c44a2635a..000000000 --- a/Xi/chpkpair.c +++ /dev/null @@ -1,137 +0,0 @@ -/* - -Copyright 2006 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ - -/*********************************************************************** - * - * Request change pairing between pointer and keyboard device. - * - */ - -#define NEED_EVENTS -#define NEED_REPLIES -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include /* for inputstr.h */ -#include /* Request macro */ -#include "inputstr.h" /* DeviceIntPtr */ -#include "windowstr.h" /* window structure */ -#include "scrnintstr.h" /* screen structure */ -#include -#include -#include -#include -#include "extnsionst.h" -#include "extinit.h" /* LookupDeviceIntRec */ -#include "exevents.h" -#include "exglobals.h" -#include "geext.h" - - -#include "chpkpair.h" - -/*********************************************************************** - * - * This procedure allows a client to change the pairing of a pointer with a - * a keyboard. - * - */ - -int SProcXChangePointerKeyboardPairing(ClientPtr client) -{ - char n; - - REQUEST(xChangePointerKeyboardPairingReq); - swaps(&stuff->length, n); - return (ProcXChangePointerKeyboardPairing(client)); -} - -int -ProcXChangePointerKeyboardPairing(ClientPtr client) -{ - DeviceIntPtr pPointer, pKeyboard; - int ret; - pairingChangedNotify ev; - - REQUEST(xChangePointerKeyboardPairingReq); - REQUEST_SIZE_MATCH(xChangePointerKeyboardPairingReq); - - /* check if client is registered */ - - pPointer = LookupDeviceIntRec(stuff->pointer); - if (pPointer == NULL) - { - SendErrorToClient(client, IReqCode, X_ChangePointerKeyboardPairing, - stuff->pointer, BadDevice); - return Success; - } - - pKeyboard = LookupDeviceIntRec(stuff->keyboard); - if (pKeyboard == NULL) - { - SendErrorToClient(client, IReqCode, X_ChangePointerKeyboardPairing, - stuff->keyboard, BadDevice); - return Success; - } - - ret = PairDevices(client, pPointer, pKeyboard); - if (ret != Success) - { - SendErrorToClient(client, IReqCode, X_ChangePointerKeyboardPairing, - 0, ret); - return Success; - } - - - memset(&ev, 0, sizeof(pairingChangedNotify)); - GEInitEvent(GEV(&ev), IReqCode); - ev.evtype = XI_PointerKeyboardPairingChangedNotify; - ev.pointer = pPointer->id; - ev.keyboard = pKeyboard->id; - ev.length = 0; - ev.time = currentTime.milliseconds; - SendEventToAllWindows(inputInfo.pointer, - XI_PointerKeyboardPairingChangedMask, - (xEvent*)&ev, 1); - return Success; -} - -/* Event swap proc */ -void -SPointerKeyboardPairingChangedNotifyEvent (pairingChangedNotify *from, - pairingChangedNotify *to) -{ - char n; - - *to = *from; - swaps(&to->sequenceNumber, n); - swapl(&to->length, n); - swapl(&to->evtype, n); - swapl(&to->time, n); -} From 57a491e6d3ebec464c0c861b02c9ddcb1cc62c3c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 7 Jan 2008 20:06:32 +1030 Subject: [PATCH 312/634] dix: init GrabPrivateKey to correct value. Merge detritus from last pull. --- dix/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/events.c b/dix/events.c index d2309ebbe..2872bf850 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1538,7 +1538,7 @@ CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode) } /* Only ever used if a grab is called on an attached slave device. */ -static DevPrivateKey GrabPrivateKey = -1; +static DevPrivateKey GrabPrivateKey = &GrabPrivateKey; typedef struct _GrabMemoryRec { DeviceIntPtr oldmaster; } GrabMemoryRec, *GrabMemoryPtr; From 20ace6321ac464d821c67a82c7023f74ae038176 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 7 Jan 2008 20:08:56 +1030 Subject: [PATCH 313/634] dix: don't try to confine cursor on screen restructure if there is no cursor. Stops segfaulting when using xrandr. Yay. --- dix/events.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dix/events.c b/dix/events.c index 2872bf850..0ce07d5df 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1481,6 +1481,8 @@ ScreenRestructured (ScreenPtr pScreen) for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { + if (!DevHasCursor(pDev)) + continue; /* GrabDevice doesn't have a confineTo field, so we don't need to * worry about it. */ From 4e85c7c322faf14c14e4229fa294b8e3d3a4d304 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 9 Jan 2008 17:36:39 +1030 Subject: [PATCH 314/634] Xi: keep a counter of buttons down to avoid duplicate press/release events. If two devices are attached to the same master device, pressing button 1 on each of them leads to two button presses from the same device. Some apps really don't like that. So we just put a counter in place and only send the first press and the last release. --- Xi/exevents.c | 29 ++++++++++++++++++++++------- dix/devices.c | 2 +- include/inputstr.h | 2 +- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index e577e3b25..fa3956597 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -348,13 +348,28 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) } ALLOC_COPY_CLASS_IF(button, ButtonClassRec); -#ifdef XKB if (to->button) { + int i; + DeviceIntPtr sd; + + memset(to->button, 0, MAP_LENGTH); + /* merge button states from all attached devices */ + for (sd = inputInfo.devices; sd; sd = sd->next) + { + if (sd->isMaster || sd->u.master != to) + continue; + + for (i = 0; i < MAP_LENGTH; i++) + { + to->button->down[i] += sd->button->down[i]; + } + } +#ifdef XKB to->button->xkb_acts = NULL; /* XXX: XkbAction needs to be copied */ - } #endif + } ALLOC_COPY_CLASS_IF(focus, FocusClassRec); ALLOC_COPY_CLASS_IF(proximity, ProximityClassRec); ALLOC_COPY_CLASS_IF(absolute, AbsoluteClassRec); @@ -541,8 +556,8 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) if (!b) return DONT_PROCESS; - kptr = &b->down[key >> 3]; - *kptr |= bit; + if (b->down[key]++ > 0) + return DONT_PROCESS; if (device->valuator) device->valuator->motionHintWindow = NullWindow; b->buttonsDown++; @@ -556,10 +571,10 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) if (!b) return DONT_PROCESS; - kptr = &b->down[key >> 3]; - if (!(*kptr & bit)) + if (b->down[key] == 0) + return DONT_PROCESS; + if (--b->down[key] > 0) return DONT_PROCESS; - *kptr &= ~bit; if (device->valuator) device->valuator->motionHintWindow = NullWindow; if (b->buttonsDown >= 1 && !--b->buttonsDown) diff --git a/dix/devices.c b/dix/devices.c index 74212b246..a784637c6 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -1178,7 +1178,7 @@ InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, butc->buttonsDown = 0; butc->state = 0; butc->motionMask = 0; - bzero((char *)butc->down, DOWN_LENGTH); + bzero((char *)butc->down, MAP_LENGTH); #ifdef XKB butc->xkb_acts= NULL; #endif diff --git a/include/inputstr.h b/include/inputstr.h index 9011ba28a..8c1d5fc5a 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -184,7 +184,7 @@ typedef struct _ButtonClassRec { CARD8 buttonsDown; /* number of buttons currently down */ unsigned short state; Mask motionMask; - CARD8 down[DOWN_LENGTH]; + CARD8 down[MAP_LENGTH]; CARD8 map[MAP_LENGTH]; #ifdef XKB union _XkbAction *xkb_acts; From a83a0c5a144da67dab96a857b849a5692b73245d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 13 Jan 2008 16:14:29 +1030 Subject: [PATCH 315/634] dix: remove obsolete comment. Pairings don't exist anymore and the documented issue is a non-issue now. --- dix/events.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dix/events.c b/dix/events.c index 0ce07d5df..ca5bae52e 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3446,10 +3446,8 @@ CheckPassiveGrabsOnWindow( than it is assigned to at this point in time. Update the grab's device and modifier device to reflect the current state. - XXX: Since XGrabDeviceButton requires to specify the + Since XGrabDeviceButton requires to specify the modifierDevice explicitly, we don't override this choice. - This essentially requires a client to re-create all - passiveGrabs when the pairing changes... oh well. */ if (xE->u.u.type < LASTEvent) { From 0969a9f7497e10794a6534321c10a0e1ac680ad7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 15 Jan 2008 11:31:12 +1030 Subject: [PATCH 316/634] dix: Emulate core events within CheckDeviceGrabs and ComputeFreezes. This should restore the correct passive grab processing. When checking for passive grabs, the core event is emulated and we check first for XI grabs on the window, then for core grabs. Regardless of which event activates the grab, the XI event is stored in the device's EQ. When replaying the event, we take the XI event and replay it on the next window, again including the emulation of the core event. --- Xi/exevents.c | 21 ++++---------- dix/events.c | 79 +++++++++++++++++++++++++++++---------------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index fa3956597..d32a55fd1 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -697,12 +697,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) } return; } - /* XI grabs have priority */ - core = *xE; - core.u.u.type = coretype; - if (!grab && - (CheckDeviceGrabs(device, xE, 0, count) || - (sendCore && CheckDeviceGrabs(device, &core, 0, 1)))) { + if (!grab && CheckDeviceGrabs(device, xE, 0, count)) { device->deviceGrab.activatingKey = key; return; } @@ -714,17 +709,11 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) xE->u.u.detail = key; if (xE->u.u.detail == 0) return; - if (!grab) + if (!grab && CheckDeviceGrabs(device, xE, 0, count)) { - core = *xE; - core.u.u.type = coretype; - if (CheckDeviceGrabs(device, xE, 0, count) || - (sendCore && CheckDeviceGrabs(device, &core, 0, 1))) - { - /* if a passive grab was activated, the event has been sent - * already */ - return; - } + /* if a passive grab was activated, the event has been sent + * already */ + return; } } else if (xE->u.u.type == DeviceButtonRelease) { diff --git a/dix/events.c b/dix/events.c index ca5bae52e..4de3b01b1 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1359,6 +1359,9 @@ FreezeThaw(DeviceIntPtr dev, Bool frozen) * runs up the sprite tree (spriteTrace) and searches for the window to replay * the events from. If it is found, it checks for passive grabs one down from * the window or delivers the events. + * + * Since the events in the EQ are always XI events, we need to emulate core + * events here. */ static void ComputeFreezes(void) @@ -1391,30 +1394,10 @@ ComputeFreezes(void) replayDev->spriteInfo->sprite->spriteTrace[i]) { if (!CheckDeviceGrabs(replayDev, xE, i+1, count)) { - /* There is no other client that gets a passive grab on - * the event anymore. Emulate core event if necessary and - * deliver it too. - * However, we might get here with a core event, in which - * case we mustn't emulate a core event. - */ - sendCore = (replayDev->coreEvents && - (xE->u.u.type & EXTENSION_EVENT_BASE && - XItoCoreType(xE->u.u.type))); + sendCore = (replayDev->coreEvents && replayDev->isMaster); + core = *xE; + core.u.u.type = XItoCoreType(xE->u.u.type); - - if (sendCore) - { - core = *xE; - core.u.u.type = XItoCoreType(xE->u.u.type); - /* * XXX: Not sure if this is correct: we need to - * check inferior windows for core passive grabs. - */ - if (CheckDeviceGrabs(replayDev, &core, i+1, 1)) - { - syncEvents.playingEvents = FALSE; - return; - } - } if (replayDev->focus) { if (sendCore) @@ -3367,7 +3350,9 @@ BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin) * @param pWin The window that may be subject to a passive grab. * @param device Device that caused the event. * @param xE List of events (multiple ones for DeviceMotionNotify) - * @count number of elements in xE. + * @param count number of elements in xE. + * @param store The event that will be stored on the device (always XI) + * @param scount number of elements in store. */ static Bool @@ -3375,7 +3360,9 @@ CheckPassiveGrabsOnWindow( WindowPtr pWin, DeviceIntPtr device, xEvent *xE, - int count) + int count, + xEvent *store, + int scount) { GrabPtr grab = wPassiveGrabs(pWin); GrabRec tempGrab; @@ -3494,17 +3481,18 @@ CheckPassiveGrabsOnWindow( if (grabinfo->sync.state == FROZEN_NO_EVENT) { - if (grabinfo->sync.evcount < count) + if (grabinfo->sync.evcount < scount) { Must_have_memory = TRUE; /* XXX */ grabinfo->sync.event = (xEvent *)xrealloc(grabinfo->sync.event, - count* + scount* sizeof(xEvent)); Must_have_memory = FALSE; /* XXX */ } - grabinfo->sync.evcount = count; - for (dxE = grabinfo->sync.event; --count >= 0; dxE++, xE++) - *dxE = *xE; + grabinfo->sync.evcount = scount; + /* we always store the XI event, never the core event */ + for (dxE = grabinfo->sync.event; --scount >= 0; dxE++, store++) + *dxE = *store; grabinfo->sync.state = FROZEN_WITH_EVENT; } return TRUE; @@ -3530,8 +3518,11 @@ CheckPassiveGrabsOnWindow( * * If a grab is activated, the event has been sent to the client already! * + * The event we pass in must always be an XI event. From this, we then emulate + * the core event and then check for grabs. + * * @param device The device that caused the event. - * @param xE The event to handle (most likely {Device}ButtonPress). + * @param xE The event to handle (Device{Button|Key}Press). * @param count Number of events in list. * @return TRUE if a grab has been activated or false otherwise. */ @@ -3543,11 +3534,26 @@ CheckDeviceGrabs(DeviceIntPtr device, xEvent *xE, int i; WindowPtr pWin = NULL; FocusClassPtr focus = device->focus; + xEvent core; + BOOL sendCore = (device->isMaster && device->coreEvents); - if (((xE->u.u.type == ButtonPress) || (xE->u.u.type == DeviceButtonPress)) + if ((xE->u.u.type == DeviceButtonPress) && (device->button->buttonsDown != 1)) return FALSE; + if (xE->u.u.type < EXTENSION_EVENT_BASE) + { + ErrorF("[dix] Core event passed into CheckDeviceGrabs.\n"); + return FALSE; + } + + + if (sendCore) + { + core = *xE; + core.u.u.type = XItoCoreType(xE->u.u.type); + } + i = checkFirst; if (focus) @@ -3555,8 +3561,11 @@ CheckDeviceGrabs(DeviceIntPtr device, xEvent *xE, for (; i < focus->traceGood; i++) { pWin = focus->trace[i]; + /* XI grabs have precendence */ if (pWin->optional && - CheckPassiveGrabsOnWindow(pWin, device, xE, count)) + (CheckPassiveGrabsOnWindow(pWin, device, xE, count, xE, count) + || (sendCore && CheckPassiveGrabsOnWindow(pWin, device, &core, + 1, xE, count)))) return TRUE; } @@ -3571,7 +3580,9 @@ CheckDeviceGrabs(DeviceIntPtr device, xEvent *xE, { pWin = device->spriteInfo->sprite->spriteTrace[i]; if (pWin->optional && - CheckPassiveGrabsOnWindow(pWin, device, xE, count)) + (CheckPassiveGrabsOnWindow(pWin, device, xE, count, xE, count) || + (sendCore && CheckPassiveGrabsOnWindow(pWin, device, &core, 1, + xE, count)))) return TRUE; } From 32aa252e988be8cbfd4f7e373fb7b7736ef1f5f2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 15 Jan 2008 15:22:39 +1030 Subject: [PATCH 317/634] dix: Process an input event as a single event, instead of two separate ones. This is a significant shift in how input events are perceived. The common approach was to treat a core event as a different entity than the XI event. This could result in the XI event being delivered to a different client than the core event. This doesn't work nicely if they come from the same device. Instead, we treat an input event as a single event, that is delivered through two separate APIs. So when delivering an event, we first try the XI event, then the core event. If the window want's neither, we go to the parent and repeat. Once either core or XI has been delivered, the processing stops. Important: Different to the previous method, if a client registers for core button events, the parent window will not get XI events. This should only cause problems when you're mixing core and XI events, so don't do that! Generic events don't fit into this yet, they cause me headaches. --- Xi/exevents.c | 19 ---- dix/events.c | 246 +++++++++++++++++++++++++++++--------------------- 2 files changed, 145 insertions(+), 120 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index d32a55fd1..23d0c47b6 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -724,32 +724,13 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) deactivateDeviceGrab = TRUE; } - if (sendCore) - { - core = *xE; - core.u.u.type = coretype; - } - if (grab) - { - if (sendCore) /* never deactivate from core */ - DeliverGrabbedEvent(&core, device, FALSE , 1); DeliverGrabbedEvent(xE, device, deactivateDeviceGrab, count); - } else if (device->focus) - { - if (sendCore) - DeliverFocusedEvent(device, &core, GetSpriteWindow(device), 1); DeliverFocusedEvent(device, xE, GetSpriteWindow(device), count); - } else - { - if (sendCore) - DeliverDeviceEvents(GetSpriteWindow(device), &core, NullGrab, - NullWindow, device, 1); DeliverDeviceEvents(GetSpriteWindow(device), xE, NullGrab, NullWindow, device, count); - } if (deactivateDeviceGrab == TRUE) (*device->deviceGrab.DeactivateGrab) (device); diff --git a/dix/events.c b/dix/events.c index 4de3b01b1..4006c2992 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1369,11 +1369,10 @@ ComputeFreezes(void) DeviceIntPtr replayDev = syncEvents.replayDev; int i; WindowPtr w; - xEvent *xE, core; + xEvent *xE; int count; GrabPtr grab; DeviceIntPtr dev; - BOOL sendCore; for (dev = inputInfo.devices; dev; dev = dev->next) FreezeThaw(dev, dev->deviceGrab.sync.other || @@ -1394,24 +1393,11 @@ ComputeFreezes(void) replayDev->spriteInfo->sprite->spriteTrace[i]) { if (!CheckDeviceGrabs(replayDev, xE, i+1, count)) { - sendCore = (replayDev->coreEvents && replayDev->isMaster); - core = *xE; - core.u.u.type = XItoCoreType(xE->u.u.type); - if (replayDev->focus) - { - if (sendCore) - DeliverFocusedEvent(replayDev, &core, w, 1); DeliverFocusedEvent(replayDev, xE, w, count); - } else - { - if (sendCore) - DeliverDeviceEvents(w, &core, NullGrab, - NullWindow, replayDev, 1); DeliverDeviceEvents(w, xE, NullGrab, NullWindow, replayDev, count); - } } goto playmore; } @@ -2439,92 +2425,97 @@ DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab, int type = xE->u.u.type; Mask filter = filters[dev->id][type]; int deliveries = 0; + OtherInputMasks *inputMasks; + int mskidx = dev->id; + xEvent core; if (XaceHook(XACE_SEND_ACCESS, NULL, dev, pWin, xE, count)) return 0; - if (type & EXTENSION_EVENT_BASE) + /* handle generic events */ + /* XXX: Generic events aren't quite handled correctly yet. They should + * eventually fit in with the rest of the stuff + */ + if (type == GenericEvent) { - OtherInputMasks *inputMasks; - int mskidx = dev->id; + WindowPtr win = pWin; + xGenericEvent* ge = (xGenericEvent*)xE; - inputMasks = wOtherInputMasks(pWin); - if (inputMasks && !(filter & inputMasks->deliverableEvents[mskidx])) - return 0; - while (pWin) - { - if (inputMasks && (inputMasks->inputEvents[mskidx] & filter)) - { - FixUpEventFromWindow(dev, xE, pWin, child, FALSE); - deliveries = DeliverEventsToWindow(dev, pWin, xE, count, filter, - grab, mskidx); - if (deliveries > 0) - return deliveries; - } - if ((deliveries < 0) || - (pWin == stopAt) || - (inputMasks && - (filter & inputMasks->dontPropagateMask[mskidx]))) - return 0; - child = pWin->drawable.id; - pWin = pWin->parent; - if (pWin) - inputMasks = wOtherInputMasks(pWin); - } - } - else - { - /* handle generic events */ - if (type == GenericEvent) + if (count > 1) { - xGenericEvent* ge = (xGenericEvent*)xE; - - if (count > 1) - { - ErrorF("[dix] Do not send more than one GenericEvent at a time!\n"); - return 0; - } - filter = generic_filters[GEEXTIDX(xE)][ge->evtype]; - - while(pWin) - { - if (GEMaskIsSet(pWin, GEEXT(xE), filter)) - { - if (GEExtensions[GEEXTIDX(xE)].evfill) - GEExtensions[GEEXTIDX(xE)].evfill(ge, dev, pWin, grab); - deliveries = DeliverEventsToWindow(dev, pWin, xE, count, - filter, grab, 0); - if (deliveries > 0) - return deliveries; - } - - pWin = pWin->parent; - } + ErrorF("[dix] Do not send more than one GenericEvent at a time!\n"); + return 0; } - else + filter = generic_filters[GEEXTIDX(xE)][ge->evtype]; + + while(win) { - /* core protocol events */ - if (!(filter & pWin->deliverableEvents)) + if (GEMaskIsSet(win, GEEXT(xE), filter)) + { + if (GEExtensions[GEEXTIDX(xE)].evfill) + GEExtensions[GEEXTIDX(xE)].evfill(ge, dev, win, grab); + deliveries = DeliverEventsToWindow(dev, win, xE, count, + filter, grab, 0); + if (deliveries > 0) + return deliveries; + } + + win = win->parent; + } + } + + while (pWin && type != GenericEvent) + { + /* First try XI event delivery */ + inputMasks = wOtherInputMasks(pWin); + if (inputMasks && (filter & inputMasks->deliverableEvents[mskidx])) + { + + if (inputMasks && (inputMasks->inputEvents[mskidx] & filter)) + { + FixUpEventFromWindow(dev, xE, pWin, child, FALSE); + deliveries = DeliverEventsToWindow(dev, pWin, xE, count, + filter, grab, mskidx); + if (deliveries > 0) + return deliveries; + } + + if ((deliveries < 0) || + (pWin == stopAt) || + (inputMasks && + (filter & inputMasks->dontPropagateMask[mskidx]))) return 0; - while (pWin) + } + + if (dev->isMaster && dev->coreEvents) + { + + /* no XI event delivered. Try core event */ + core = *xE; + core.u.u.type = XItoCoreType(xE->u.u.type); + + if (filter & pWin->deliverableEvents) { if ((wOtherEventMasks(pWin)|pWin->eventMask) & filter) { - FixUpEventFromWindow(dev, xE, pWin, child, FALSE); - deliveries = DeliverEventsToWindow(dev, pWin, xE, count, filter, - grab, 0); + FixUpEventFromWindow(dev, &core, pWin, child, FALSE); + deliveries = DeliverEventsToWindow(dev, pWin, &core, 1, + filter, grab, 0); if (deliveries > 0) return deliveries; } + if ((deliveries < 0) || (pWin == stopAt) || (filter & wDontPropagateMask(pWin))) return 0; - child = pWin->drawable.id; - pWin = pWin->parent; } - } + } + + child = pWin->drawable.id; + pWin = pWin->parent; } + return 0; } @@ -3604,7 +3595,10 @@ DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count) { DeviceIntPtr pointer; WindowPtr focus = keybd->focus->win; - int mskidx = 0; + BOOL sendCore = (keybd->isMaster && keybd->coreEvents); + xEvent core; + int deliveries = 0; + if (focus == FollowKeyboardWin) focus = inputInfo.keyboard->focus->win; if (!focus) @@ -3622,13 +3616,29 @@ DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count) pointer = GetPairedDevice(keybd); if (XaceHook(XACE_SEND_ACCESS, NULL, keybd, focus, xE, count)) return; + + if (sendCore) + { + core = *xE; + core.u.u.type = XItoCoreType(xE->u.u.type); + } + /* just deliver it to the focus window */ FixUpEventFromWindow(pointer, xE, focus, None, FALSE); - if (xE->u.u.type & EXTENSION_EVENT_BASE) - mskidx = keybd->id; - (void)DeliverEventsToWindow(keybd, focus, xE, count, - filters[keybd->id][xE->u.u.type], - NullGrab, mskidx); + deliveries = DeliverEventsToWindow(keybd, focus, xE, count, + filters[keybd->id][xE->u.u.type], + NullGrab, keybd->id); + + if (deliveries > 0) + return; + + if (sendCore) + { + FixUpEventFromWindow(keybd, &core, focus, None, FALSE); + deliveries = DeliverEventsToWindow(keybd, focus, &core, 1, + filters[keybd->id][xE->u.u.type], + NullGrab, 0); + } } /** @@ -3646,8 +3656,9 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, GrabInfoPtr grabinfo; int deliveries = 0; DeviceIntPtr dev; - xEvent *dxE; + xEvent *dxE, core; SpritePtr pSprite = thisDev->spriteInfo->sprite; + BOOL sendCore = FALSE; grabinfo = &thisDev->deviceGrab; grab = grabinfo->grab; @@ -3697,23 +3708,56 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, } else { Mask mask = grab->eventMask; - if (grabinfo->fromPassiveGrab && - grabinfo->implicitGrab && - (xE->u.u.type & EXTENSION_EVENT_BASE)) - mask = grab->deviceMask; - FixUpEventFromWindow(thisDev, xE, grab->window, None, TRUE); - - if (XaceHook(XACE_SEND_ACCESS, 0, thisDev, grab->window, xE, - count) || - XaceHook(XACE_RECEIVE_ACCESS, rClient(grab), grab->window, - xE, count)) - deliveries = 1; /* don't send, but pretend we did */ - else if (!(!(xE->u.u.type & EXTENSION_EVENT_BASE) && - IsInterferingGrab(rClient(grab), thisDev, xE))) + sendCore = (thisDev->isMaster && thisDev->coreEvents); + /* try core event */ + if (sendCore && grab->coreGrab) { - deliveries = TryClientEvents(rClient(grab), xE, count, - mask, filters[thisDev->id][xE->u.u.type], grab); + core = *xE; + core.u.u.type = XItoCoreType(xE->u.u.type); + FixUpEventFromWindow(thisDev, &core, grab->window, + None, TRUE); + if (XaceHook(XACE_SEND_ACCESS, 0, thisDev, + grab->window, &core, 1) || + XaceHook(XACE_RECEIVE_ACCESS, rClient(grab), + grab->window, &count, 1)) + deliveries = 1; /* don't send, but pretend we did */ + else if (!IsInterferingGrab(rClient(grab), thisDev, + &core)) + { + deliveries = TryClientEvents(rClient(grab), &core, 1, + mask, + filters[thisDev->id][core.u.u.type], + grab); + } + } + + if (!deliveries) + { + /* try XI event */ + if (grabinfo->fromPassiveGrab && + grabinfo->implicitGrab && + (xE->u.u.type & EXTENSION_EVENT_BASE)) + mask = grab->deviceMask; + FixUpEventFromWindow(thisDev, xE, grab->window, + None, TRUE); + + if (XaceHook(XACE_SEND_ACCESS, 0, thisDev, + grab->window, xE, count) || + XaceHook(XACE_RECEIVE_ACCESS, rClient(grab), + grab->window, + xE, count)) + deliveries = 1; /* don't send, but pretend we did */ + else + { + deliveries = + TryClientEvents(rClient(grab), + xE, count, + mask, + filters[thisDev->id][xE->u.u.type], + grab); + } + } } if (deliveries && (xE->u.u.type == MotionNotify From 4fd0885978be286a68b689824f1d910f929a52b0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 15 Jan 2008 18:58:42 +1030 Subject: [PATCH 318/634] Xi: remove some leftovers from ProcessOtherEvents. Core handling not needed anymore here. --- Xi/exevents.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 23d0c47b6..faf391fc3 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -595,10 +595,7 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) /** * Main device event processing function. * Called from when processing the events from the event queue. - * Generates core events for XI events as needed. * - * Note that these core events are then delivered first. For passive grabs, XI - * events have preference over core. */ void ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) @@ -612,8 +609,6 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) KeyClassPtr k; ValuatorClassPtr v; deviceValuator *xV = (deviceValuator *) xE; - BOOL sendCore = FALSE; - xEvent core; int coretype = 0; int ret = 0; @@ -625,10 +620,6 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) b = device->button; k = device->key; - coretype = XItoCoreType(xE->u.u.type); - if (device->isMaster && device->coreEvents && coretype) - sendCore = TRUE; - if (device->isMaster) CheckMotion(xE, device); From 2a988ed75b7634d7cb6e83bb7aa89bc8768d3a58 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 15 Jan 2008 19:14:46 +1030 Subject: [PATCH 319/634] xkb: don't do core key repeats, XI only is the path to light. --- xkb/xkbAccessX.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c index a035d8d32..975b2eb5f 100644 --- a/xkb/xkbAccessX.c +++ b/xkb/xkbAccessX.c @@ -318,9 +318,8 @@ BOOL is_core; is_core = (dev == inputInfo.keyboard); key = xkbi->repeatKey; - AccessXKeyboardEvent(dev, is_core ? KeyRelease : DeviceKeyRelease, key, - True); - AccessXKeyboardEvent(dev, is_core ? KeyPress : DeviceKeyPress, key, True); + AccessXKeyboardEvent(dev, DeviceKeyRelease, key, True); + AccessXKeyboardEvent(dev, DeviceKeyPress, key, True); return xkbi->desc->ctrls->repeat_interval; } From b0bf4308acb706abc87c51658c2251fa86231c35 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 15 Jan 2008 19:15:09 +1030 Subject: [PATCH 320/634] dix: print out an error when core type can't be converted. Helps a bit in tracking down bugs. --- dix/events.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dix/events.c b/dix/events.c index 4006c2992..59688c73c 100644 --- a/dix/events.c +++ b/dix/events.c @@ -304,6 +304,9 @@ XItoCoreType(int xitype) coretype = KeyPress; else if (xitype == DeviceKeyRelease) coretype = KeyRelease; + + if (coretype == 0) + ErrorF("[dix] Cannot convert type %d to core.\n", xitype); return coretype; } From 6e17184486c4309ec8b47c7cfd11fef60bb360ac Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 18 Jan 2008 17:52:38 +1030 Subject: [PATCH 321/634] Xi: Check for DestroyAccess when trying to delete a master device. --- Xi/chdevhier.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/Xi/chdevhier.c b/Xi/chdevhier.c index 0b2e3f1ab..65ff3873b 100644 --- a/Xi/chdevhier.c +++ b/Xi/chdevhier.c @@ -88,9 +88,6 @@ ProcXChangeDeviceHierarchy(ClientPtr client) REQUEST(xChangeDeviceHierarchyReq); REQUEST_AT_LEAST_SIZE(xChangeDeviceHierarchyReq); - /* XXX: check if client is allowed to change hierarch */ - - any = (xAnyHierarchyChangeInfo*)&stuff[1]; while(stuff->num_changes--) { @@ -109,10 +106,13 @@ ProcXChangeDeviceHierarchy(ClientPtr client) char* name; int ret; + /* XXX: check for creation permission */ + SWAPIF(swaps(&c->namelen, n)); name = xcalloc(c->namelen + 1, sizeof(char)); strncpy(name, (char*)&c[1], c->namelen); + ret = AllocMasterDevice(name, &ptr, &keybd); if (ret != Success) { @@ -143,7 +143,7 @@ ProcXChangeDeviceHierarchy(ClientPtr client) return BadValue; rc = dixLookupDevice(&ptr, r->deviceid, client, - DixWriteAccess); + DixDestroyAccess); if (rc != Success) return rc; @@ -160,13 +160,26 @@ ProcXChangeDeviceHierarchy(ClientPtr client) /* disable keyboards first */ if (IsPointerDevice(ptr)) - keybd = ptr->spriteInfo->paired; + { + rc = dixLookupDevice(&keybd, + ptr->spriteInfo->paired->id, + client, + DixDestroyAccess); + if (rc != Success) + return rc; + } else { keybd = ptr; - ptr = keybd->spriteInfo->paired; + rc = dixLookupDevice(&ptr, + keybd->spriteInfo->paired->id, + client, + DixDestroyAccess); + if (rc != Success) + return rc; } + /* Disabling sends the devices floating, reattach them if * desired. */ if (r->returnMode == AttachToMaster) From 883811c2bed9c6fcb706effbf83ddc97518b6f0c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 18 Jan 2008 18:48:46 +1030 Subject: [PATCH 322/634] dix: remove inputInfo.pointer reference in TryClientEvents. Unfortunately, this requires a change in the TCE API, and thus a change in all callers. Tough luck. --- Xext/xvmain.c | 8 +++--- dix/dispatch.c | 9 ++++--- dix/events.c | 51 +++++++++++++++++++++---------------- hw/xfree86/common/xf86DGA.c | 4 +-- include/dix.h | 1 + mi/miexpose.c | 4 +-- 6 files changed, 43 insertions(+), 34 deletions(-) diff --git a/Xext/xvmain.c b/Xext/xvmain.c index 9834fcfa0..e92a248e8 100644 --- a/Xext/xvmain.c +++ b/Xext/xvmain.c @@ -541,8 +541,8 @@ int reason; event.u.videoNotify.drawable = pDraw->id; event.u.videoNotify.port = pPort->id; event.u.videoNotify.reason = reason; - (void) TryClientEvents(pn->client, (xEventPtr)&event, 1, NoEventMask, - NoEventMask, NullGrab); + TryClientEvents(pn->client, NULL, (xEventPtr)&event, 1, + NoEventMask, NoEventMask, NullGrab); } pn = pn->next; } @@ -573,8 +573,8 @@ XvdiSendPortNotify( event.u.portNotify.port = pPort->id; event.u.portNotify.attribute = attribute; event.u.portNotify.value = value; - (void) TryClientEvents(pn->client, (xEventPtr)&event, 1, NoEventMask, - NoEventMask, NullGrab); + TryClientEvents(pn->client, NULL, (xEventPtr)&event, 1, + NoEventMask, NoEventMask, NullGrab); } pn = pn->next; } diff --git a/dix/dispatch.c b/dix/dispatch.c index b3816a51e..a555aa1b8 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1023,7 +1023,8 @@ ProcSetSelectionOwner(ClientPtr client) event.u.selectionClear.time = time.milliseconds; event.u.selectionClear.window = CurrentSelections[i].window; event.u.selectionClear.atom = CurrentSelections[i].selection; - (void) TryClientEvents (CurrentSelections[i].client, &event, 1, + TryClientEvents (CurrentSelections[i].client, NULL, + &event, 1, NoEventMask, NoEventMask /* CantBeFiltered */, NullGrab); } @@ -1158,7 +1159,7 @@ ProcConvertSelection(ClientPtr client) event.u.selectionRequest.target = stuff->target; event.u.selectionRequest.property = stuff->property; if (TryClientEvents( - CurrentSelections[i].client, &event, 1, NoEventMask, + CurrentSelections[i].client, NULL, &event, 1, NoEventMask, NoEventMask /* CantBeFiltered */, NullGrab)) return (client->noClientException); } @@ -1168,8 +1169,8 @@ ProcConvertSelection(ClientPtr client) event.u.selectionNotify.selection = stuff->selection; event.u.selectionNotify.target = stuff->target; event.u.selectionNotify.property = None; - (void) TryClientEvents(client, &event, 1, NoEventMask, - NoEventMask /* CantBeFiltered */, NullGrab); + TryClientEvents(client, NULL, &event, 1, NoEventMask, + NoEventMask /* CantBeFiltered */, NullGrab); return (client->noClientException); } else diff --git a/dix/events.c b/dix/events.c index 59688c73c..c91e73bb4 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1968,6 +1968,7 @@ ReleaseActiveGrabs(ClientPtr client) * * * @param client The target client to deliver to. + * @param dev The device the event came from. May be NULL. * @param pEvents The events to be delivered. * @param count Number of elements in pEvents. * @param mask Event mask as set by the window. @@ -1978,8 +1979,8 @@ ReleaseActiveGrabs(ClientPtr client) * client. */ _X_EXPORT int -TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask, - Mask filter, GrabPtr grab) +TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents, + int count, Mask mask, Mask filter, GrabPtr grab) { int i; int type; @@ -1998,7 +1999,7 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask, { if (mask & PointerMotionHintMask) { - if (WID(inputInfo.pointer->valuator->motionHintWindow) == + if (WID(dev->valuator->motionHintWindow) == pEvents->u.keyButtonPointer.event) { #ifdef DEBUG_EVENTS @@ -2108,8 +2109,9 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent if (XaceHook(XACE_RECEIVE_ACCESS, wClient(pWin), pWin, pEvents, count)) /* do nothing */; - else if ( (attempt = TryClientEvents(wClient(pWin), pEvents, count, - pWin->eventMask, filter, grab)) ) + else if ( (attempt = TryClientEvents(wClient(pWin), pDev, pEvents, + count, pWin->eventMask, + filter, grab)) ) { if (attempt > 0) { @@ -2146,8 +2148,10 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent if (XaceHook(XACE_RECEIVE_ACCESS, pClient->client, pWin, pEvents, count)) /* do nothing */; - else if (TryClientEvents(pClient->client, pEvents, count, - pClient->eventMask[GEEXTIDX(pEvents)], filter, grab) > 0) + else if (TryClientEvents(pClient->client, pDev, + pEvents, count, + pClient->eventMask[GEEXTIDX(pEvents)], + filter, grab) > 0) { deliveries++; } else @@ -2179,8 +2183,10 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent if (XaceHook(XACE_RECEIVE_ACCESS, rClient(other), pWin, pEvents, count)) /* do nothing */; - else if ( (attempt = TryClientEvents(rClient(other), pEvents, count, - other->mask[mskidx], filter, grab)) ) + else if ( (attempt = TryClientEvents(rClient(other), pDev, + pEvents, count, + other->mask[mskidx], + filter, grab)) ) { if (attempt > 0) { @@ -2308,7 +2314,7 @@ MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents, #endif if (XaceHook(XACE_RECEIVE_ACCESS, wClient(pWin), pWin, pEvents, count)) return 1; /* don't send, but pretend we did */ - return TryClientEvents(wClient(pWin), pEvents, count, + return TryClientEvents(wClient(pWin), NULL, pEvents, count, pWin->eventMask, filter, NullGrab); } for (other = wOtherClients(pWin); other; other = other->next) @@ -2325,7 +2331,7 @@ MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents, if (XaceHook(XACE_RECEIVE_ACCESS, rClient(other), pWin, pEvents, count)) return 1; /* don't send, but pretend we did */ - return TryClientEvents(rClient(other), pEvents, count, + return TryClientEvents(rClient(other), NULL, pEvents, count, other->mask, filter, NullGrab); } } @@ -3469,7 +3475,7 @@ CheckPassiveGrabsOnWindow( FixUpEventFromWindow(device, xE, grab->window, None, TRUE); - (void) TryClientEvents(rClient(grab), xE, count, + (void) TryClientEvents(rClient(grab), device, xE, count, filters[device->id][xE->u.u.type], filters[device->id][xE->u.u.type], grab); @@ -3704,8 +3710,8 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, if (GEEventFill(xE)) GEEventFill(xE)(ge, thisDev, grab->window, grab); - deliveries = TryClientEvents(rClient(grab), xE, count, - gemask->eventMask[GEEXTIDX(ge)], + deliveries = TryClientEvents(rClient(grab), thisDev, xE, + count, gemask->eventMask[GEEXTIDX(ge)], generic_filters[GEEXTIDX(ge)][ge->evtype], grab); } else @@ -3728,8 +3734,8 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, else if (!IsInterferingGrab(rClient(grab), thisDev, &core)) { - deliveries = TryClientEvents(rClient(grab), &core, 1, - mask, + deliveries = TryClientEvents(rClient(grab), thisDev, + &core, 1, mask, filters[thisDev->id][core.u.u.type], grab); } @@ -3754,7 +3760,7 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, else { deliveries = - TryClientEvents(rClient(grab), + TryClientEvents(rClient(grab), thisDev, xE, count, mask, filters[thisDev->id][xE->u.u.type], @@ -4452,10 +4458,10 @@ EnterLeaveEvent( if ((mask & filters[mouse->id][type]) && sendevent) { if (grab) - (void)TryClientEvents(rClient(grab), &event, 1, mask, + TryClientEvents(rClient(grab), mouse, &event, 1, mask, filters[mouse->id][type], grab); else - (void)DeliverEventsToWindow(mouse, pWin, &event, 1, + DeliverEventsToWindow(mouse, pWin, &event, 1, filters[mouse->id][type], NullGrab, 0); } @@ -4475,7 +4481,8 @@ EnterLeaveEvent( inputMasks->deliverableEvents[mskidx])) { if (devgrab) - (void)TryClientEvents(rClient(devgrab), (xEvent*)devEnterLeave, 1, + (void)TryClientEvents(rClient(devgrab), mouse, + (xEvent*)devEnterLeave, 1, mask, filters[mouse->id][devEnterLeave->type], devgrab); else @@ -4496,8 +4503,8 @@ EnterLeaveEvent( ke.type = KeymapNotify; if (grab) - (void)TryClientEvents(rClient(grab), (xEvent *)&ke, 1, mask, - KeymapStateMask, grab); + (void)TryClientEvents(rClient(grab), keybd, (xEvent *)&ke, 1, + mask, KeymapStateMask, grab); else (void)DeliverEventsToWindow(mouse, pWin, (xEvent *)&ke, 1, KeymapStateMask, NullGrab, 0); diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index dfec4b1ae..89fdec6f5 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c @@ -1105,7 +1105,7 @@ DGAProcessKeyboardEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr keybd) if (pScreenPriv->client) { /* If the DGA client has selected input, then deliver based on the usual filter */ - TryClientEvents (pScreenPriv->client, (xEvent *) de, 1, + TryClientEvents (pScreenPriv->client, keybd, (xEvent *) de, 1, filters[coreEquiv], pScreenPriv->input, 0); } else @@ -1186,7 +1186,7 @@ DGAProcessPointerEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr mouse) if (pScreenPriv->client) { /* If the DGA client has selected input, then deliver based on the usual filter */ - TryClientEvents (pScreenPriv->client, (xEvent *) de, 1, + TryClientEvents (pScreenPriv->client, mouse, (xEvent *) de, 1, filters[coreEquiv], pScreenPriv->input, 0); } else diff --git a/include/dix.h b/include/dix.h index fc862dffd..079645d0e 100644 --- a/include/dix.h +++ b/include/dix.h @@ -502,6 +502,7 @@ extern void WriteEventsToClient( extern int TryClientEvents( ClientPtr /*client*/, + DeviceIntPtr /* device */, xEventPtr /*pEvents*/, int /*count*/, Mask /*mask*/, diff --git a/mi/miexpose.c b/mi/miexpose.c index 2d3b0d510..ebf73e7b0 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -385,7 +385,7 @@ miSendGraphicsExpose (client, pRgn, drawable, major, minor) pe->u.graphicsExposure.majorEvent = major; pe->u.graphicsExposure.minorEvent = minor; } - TryClientEvents(client, pEvent, numRects, + TryClientEvents(client, NULL, pEvent, numRects, (Mask)0, NoEventMask, NullGrab); xfree(pEvent); } @@ -396,7 +396,7 @@ miSendGraphicsExpose (client, pRgn, drawable, major, minor) event.u.noExposure.drawable = drawable; event.u.noExposure.majorEvent = major; event.u.noExposure.minorEvent = minor; - TryClientEvents(client, &event, 1, + TryClientEvents(client, NULL, &event, 1, (Mask)0, NoEventMask, NullGrab); } } From d323fd64206ddb4221daa7cf7504daf62c5e7d90 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 18 Jan 2008 19:17:42 +1030 Subject: [PATCH 323/634] dix: remove inputInfo.pointer refernce in EventSelectForWindow If the window being changed is set as the motion hint window for any device, the device's motion hint window is set to NULL. Which is kinda what the old code did, except that it did it with only the VCP. --- dix/events.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/dix/events.c b/dix/events.c index c91e73bb4..c3697da88 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4202,6 +4202,7 @@ EventSelectForWindow(WindowPtr pWin, ClientPtr client, Mask mask) { Mask check; OtherClients * others; + DeviceIntPtr dev; int rc; if (mask & ~AllEventMasks) @@ -4268,11 +4269,14 @@ EventSelectForWindow(WindowPtr pWin, ClientPtr client, Mask mask) return BadAlloc; } maskSet: - if ((inputInfo.pointer->valuator->motionHintWindow == pWin) && - (mask & PointerMotionHintMask) && - !(check & PointerMotionHintMask) && - !inputInfo.pointer->deviceGrab.grab) /* VCP shouldn't have deviceGrab */ - inputInfo.pointer->valuator->motionHintWindow = NullWindow; + if ((mask & PointerMotionHintMask) && !(check & PointerMotionHintMask)) + { + for (dev = inputInfo.devices; dev; dev = dev->next) + { + if (dev->valuator && dev->valuator->motionHintWindow == pWin) + dev->valuator->motionHintWindow = NullWindow; + } + } RecalculateDeliverableEvents(pWin); return Success; } From 8949d81a3c79eef351d7c018c76692dcca74b63e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 18 Jan 2008 19:45:54 +1030 Subject: [PATCH 324/634] include: mark CoreProcessPointerEvent, CoreProcessKeyboardEvent as deprecated. ProcessOtherEvent does all the work now. --- include/input.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/input.h b/include/input.h index 638471686..da02aea8a 100644 --- a/include/input.h +++ b/include/input.h @@ -375,12 +375,12 @@ extern void ProcessKeyboardEvent( extern void CoreProcessPointerEvent( xEventPtr /*xE*/, DeviceIntPtr /*mouse*/, - int /*count*/); + int /*count*/) _X_DEPRECATED; -extern void CoreProcessKeyboardEvent( +extern _X_DEPRECATED void CoreProcessKeyboardEvent( xEventPtr /*xE*/, DeviceIntPtr /*keybd*/, - int /*count*/); + int /*count*/) _X_DEPRECATED; #endif extern Bool LegalModifier( From 8a925d201efac52ef663ea3ff46acc5046178666 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 18 Jan 2008 20:06:29 +1030 Subject: [PATCH 325/634] dix: free the genericMasks when ungrabbing. This finally plugs a memory hole created by grabs registering for generic events. --- dix/events.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/dix/events.c b/dix/events.c index c3697da88..de68b570c 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1627,6 +1627,14 @@ DeactivatePointerGrab(DeviceIntPtr mouse) mouse->deviceGrab.grab = NullGrab; mouse->deviceGrab.sync.state = NOT_GRABBED; mouse->deviceGrab.fromPassiveGrab = FALSE; + + /* make sure the potential XGE event mask is freed too*/ + if (grab->genericMasks) + { + xfree(grab->genericMasks); + grab->genericMasks = NULL; + } + for (dev = inputInfo.devices; dev; dev = dev->next) { if (dev->deviceGrab.sync.other == grab) @@ -1704,6 +1712,12 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd) keybd->deviceGrab.grab = NullGrab; keybd->deviceGrab.sync.state = NOT_GRABBED; keybd->deviceGrab.fromPassiveGrab = FALSE; + if (grab->genericMasks) + { + xfree(grab->genericMasks); + grab->genericMasks = NULL; + } + for (dev = inputInfo.devices; dev; dev = dev->next) { if (dev->deviceGrab.sync.other == grab) @@ -2226,9 +2240,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent inputMasks = wOtherInputMasks(pWin); tempGrab.deviceMask = (inputMasks) ? inputMasks->inputEvents[pDev->id]: 0; - /* get the XGE event mask. - * FIXME: needs to be freed somewhere too. - */ + /* get the XGE event mask. */ tempGrab.genericMasks = NULL; if (pWin->optional && pWin->optional->geMasks) { From cd2ad4c2ed58b49cee085174e77c242048159321 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 18 Jan 2008 20:11:55 +1030 Subject: [PATCH 326/634] dix: remove some superfluous lines in ProcChangeActivePointerGrab. --- dix/events.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dix/events.c b/dix/events.c index de68b570c..f4925e494 100644 --- a/dix/events.c +++ b/dix/events.c @@ -5265,16 +5265,11 @@ ProcChangeActivePointerGrab(ClientPtr client) if (grab && grab->coreGrab && SameClient(grab, client)) { device = grabbed; + grab = device->deviceGrab.grab; break; } } } - /* nope. no grab on any actual device */ - if (!grabbed) - { - device = inputInfo.pointer; - grab = inputInfo.pointer->deviceGrab.grab; - } } if (!grab) From 6492d513c0022d70f838d1b2561442c7a41e401f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 18 Jan 2008 21:44:22 +1030 Subject: [PATCH 327/634] dix: if a client has a core grab, return the grab device on QueryPointer. The correct thing would be to return the ClientPointer. However, if the client for some reason has a core grab on another device (e.g. as result of a passive grab), return the coordinates of the grabbed device instead. This makes the use of nautilus a bit saner. --- dix/events.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dix/events.c b/dix/events.c index f4925e494..f955d8152 100644 --- a/dix/events.c +++ b/dix/events.c @@ -5595,7 +5595,8 @@ ProcQueryPointer(ClientPtr client) xQueryPointerReply rep; WindowPtr pWin, t; DeviceIntPtr mouse = PickPointer(client); - SpritePtr pSprite = mouse->spriteInfo->sprite; + DeviceIntPtr dev; + SpritePtr pSprite; int rc; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); @@ -5607,6 +5608,19 @@ ProcQueryPointer(ClientPtr client) if (rc != Success) return rc; + for (dev = inputInfo.devices; dev; dev = dev->next) + { + if (dev->isMaster && IsPointerDevice(dev) && + dev->deviceGrab.grab && dev->deviceGrab.grab->coreGrab && + SameClient(dev->deviceGrab.grab, client)) + { + /* special case, we have a grab on the device so we need to return + * this one */ + mouse = dev; + } + } + + pSprite = mouse->spriteInfo->sprite; if (mouse->valuator->motionHintWindow) MaybeStopHint(mouse, client); rep.type = X_Reply; From ba315ae5ddd00763147a4b0cdcacba7691793dfc Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 21 Jan 2008 23:43:53 +1030 Subject: [PATCH 328/634] Xi: add XACE hooks for device creation (ChangeDeviceHierarchy) AddInputDevice checks for permissions already, so all we do is modify a few callers to let AID sort it out. --- Xi/chdevhier.c | 10 ++++------ dix/devices.c | 12 ++++++------ hw/vfb/InitInput.c | 4 ++-- hw/xfree86/common/xf86Xinput.c | 2 +- hw/xnest/Init.c | 4 ++-- include/input.h | 4 +++- xkb/xkbLEDs.c | 3 +++ 7 files changed, 21 insertions(+), 18 deletions(-) diff --git a/Xi/chdevhier.c b/Xi/chdevhier.c index 65ff3873b..b7495678a 100644 --- a/Xi/chdevhier.c +++ b/Xi/chdevhier.c @@ -52,6 +52,7 @@ from the author. #include "exevents.h" #include "exglobals.h" #include "geext.h" +#include "xace.h" #include "chdevhier.h" @@ -104,20 +105,17 @@ ProcXChangeDeviceHierarchy(ClientPtr client) { xCreateMasterInfo* c = (xCreateMasterInfo*)any; char* name; - int ret; - - /* XXX: check for creation permission */ SWAPIF(swaps(&c->namelen, n)); name = xcalloc(c->namelen + 1, sizeof(char)); strncpy(name, (char*)&c[1], c->namelen); - ret = AllocMasterDevice(name, &ptr, &keybd); - if (ret != Success) + rc = AllocMasterDevice(client, name, &ptr, &keybd); + if (rc != Success) { xfree(name); - return ret; + return rc; } if (!c->sendCore) diff --git a/dix/devices.c b/dix/devices.c index e78c1e7ec..0ffc798e8 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -100,7 +100,7 @@ DevPrivateKey CoreDevicePrivateKey = &CoreDevicePrivateKey; * @return The newly created device. */ DeviceIntPtr -AddInputDevice(DeviceProc deviceProc, Bool autoStart) +AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) { DeviceIntPtr dev, *prev; /* not a typo */ DeviceIntPtr devtmp; @@ -562,9 +562,9 @@ CorePointerProc(DeviceIntPtr pDev, int what) void InitCoreDevices(void) { - if (AllocMasterDevice("Virtual core", + if (AllocMasterDevice(serverClient, "Virtual core", &inputInfo.pointer, - &inputInfo.keyboard) == BadAlloc) + &inputInfo.keyboard) != Success) FatalError("Failed to allocate core devices"); } @@ -2597,13 +2597,13 @@ NextFreePointerDevice() * EnableDevice() manually. */ int -AllocMasterDevice(char* name, DeviceIntPtr* ptr, DeviceIntPtr* keybd) +AllocMasterDevice(ClientPtr client, char* name, DeviceIntPtr* ptr, DeviceIntPtr* keybd) { DeviceIntPtr pointer; DeviceIntPtr keyboard; *ptr = *keybd = NULL; - pointer = AddInputDevice(CorePointerProc, TRUE); + pointer = AddInputDevice(client, CorePointerProc, TRUE); if (!pointer) return BadAlloc; @@ -2628,7 +2628,7 @@ AllocMasterDevice(char* name, DeviceIntPtr* ptr, DeviceIntPtr* keybd) pointer->u.lastSlave = NULL; pointer->isMaster = TRUE; - keyboard = AddInputDevice(CoreKeyboardProc, TRUE); + keyboard = AddInputDevice(client, CoreKeyboardProc, TRUE); if (!keyboard) return BadAlloc; diff --git a/hw/vfb/InitInput.c b/hw/vfb/InitInput.c index 99cf56c70..393698f35 100644 --- a/hw/vfb/InitInput.c +++ b/hw/vfb/InitInput.c @@ -318,8 +318,8 @@ void InitInput(int argc, char *argv[]) { DeviceIntPtr p, k; - p = AddInputDevice(vfbMouseProc, TRUE); - k = AddInputDevice(vfbKeybdProc, TRUE); + p = AddInputDevice(serverClient, vfbMouseProc, TRUE); + k = AddInputDevice(serverClient, vfbKeybdProc, TRUE); RegisterPointerDevice(p); RegisterKeyboardDevice(k); (void)mieqInit(); diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 92298e187..a3b19e98a 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -158,7 +158,7 @@ xf86ActivateDevice(LocalDevicePtr local) DeviceIntPtr dev; if (local->flags & XI86_CONFIGURED) { - dev = AddInputDevice(local->device_control, TRUE); + dev = AddInputDevice(serverClient, local->device_control, TRUE); if (dev == NULL) FatalError("Too many input devices"); diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c index 7b344e25f..de80cb578 100644 --- a/hw/xnest/Init.c +++ b/hw/xnest/Init.c @@ -89,8 +89,8 @@ InitOutput(ScreenInfo *screenInfo, int argc, char *argv[]) void InitInput(int argc, char *argv[]) { - xnestPointerDevice = AddInputDevice(xnestPointerProc, TRUE); - xnestKeyboardDevice = AddInputDevice(xnestKeyboardProc, TRUE); + xnestPointerDevice = AddInputDevice(serverClient, xnestPointerProc, TRUE); + xnestKeyboardDevice = AddInputDevice(serverClient, xnestKeyboardProc, TRUE); if (!xnestEvents) xnestEvents = (xEvent *) xcalloc(sizeof(xEvent), GetMaximumEventsNum()); diff --git a/include/input.h b/include/input.h index da02aea8a..18636766b 100644 --- a/include/input.h +++ b/include/input.h @@ -180,6 +180,7 @@ typedef struct _InputOption { extern void InitCoreDevices(void); extern DeviceIntPtr AddInputDevice( + ClientPtr /*client*/, DeviceProc /*deviceProc*/, Bool /*autoStart*/); @@ -471,7 +472,8 @@ extern Bool RegisterPairingClient(ClientPtr client); extern DeviceIntPtr GuessFreePointerDevice(void); extern DeviceIntPtr NextFreePointerDevice(void); -extern int AllocMasterDevice(char* name, +extern int AllocMasterDevice(ClientPtr client, + char* name, DeviceIntPtr* ptr, DeviceIntPtr* keybd); extern void DeepCopyDeviceClasses(DeviceIntPtr from, diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c index 2877af0c4..55ce12aad 100644 --- a/xkb/xkbLEDs.c +++ b/xkb/xkbLEDs.c @@ -63,6 +63,9 @@ XkbSrvLedInfoPtr sli; sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0); + if (!sli) + return update; + if (state_changes&(XkbModifierStateMask|XkbGroupStateMask)) update|= sli->usesEffective; if (state_changes&(XkbModifierBaseMask|XkbGroupBaseMask)) From 94a6a65ae7414c8247aa1741ec5c7561e6f4bbe0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 23 Jan 2008 15:43:48 +1030 Subject: [PATCH 329/634] Xext: allow per-device GE masks. Instead of a single mask per client we allow the storage of a mask per client per device. --- Xext/geext.c | 12 +++++++----- Xext/geext.h | 11 +++++++---- Xi/xiselev.c | 9 ++++++--- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/Xext/geext.c b/Xext/geext.c index 8f48e4493..0127a05f1 100644 --- a/Xext/geext.c +++ b/Xext/geext.c @@ -300,7 +300,8 @@ GERecalculateWinMask(WindowPtr pWin) } /* Set generic event mask for given window. */ -void GEWindowSetMask(ClientPtr pClient, WindowPtr pWin, int extension, Mask mask) +void GEWindowSetMask(ClientPtr pClient, DeviceIntPtr pDev, + WindowPtr pWin, int extension, Mask mask) { GenericMaskPtr cli; @@ -326,13 +327,13 @@ void GEWindowSetMask(ClientPtr pClient, WindowPtr pWin, int extension, Mask mask cli = evmasks->geClients; while(cli) { - if (cli->client == pClient) + if (cli->client == pClient && cli->dev == pDev) break; cli = cli->next; } if (!cli) { - /* new client */ + /* new client and/or new device */ cli = (GenericMaskPtr)xcalloc(1, sizeof(GenericMaskRec)); if (!cli) { @@ -341,6 +342,7 @@ void GEWindowSetMask(ClientPtr pClient, WindowPtr pWin, int extension, Mask mask } cli->next = evmasks->geClients; cli->client = pClient; + cli->dev = pDev; evmasks->geClients = cli; } cli->eventMask[extension] = mask; @@ -348,7 +350,7 @@ void GEWindowSetMask(ClientPtr pClient, WindowPtr pWin, int extension, Mask mask { /* remove client. */ cli = pWin->optional->geMasks->geClients; - if (cli->client == pClient) + if (cli->client == pClient && cli->dev == pDev) { pWin->optional->geMasks->geClients = cli->next; xfree(cli); @@ -359,7 +361,7 @@ void GEWindowSetMask(ClientPtr pClient, WindowPtr pWin, int extension, Mask mask while(cli) { - if (cli->client == pClient) + if (cli->client == pClient && cli->dev == pDev) { prev->next = cli->next; xfree(cli); diff --git a/Xext/geext.h b/Xext/geext.h index 1ba71e070..a9021277b 100644 --- a/Xext/geext.h +++ b/Xext/geext.h @@ -39,12 +39,13 @@ from the author. * This struct is used both in the window and by grabs to determine the event * mask for a client. * A window will have a linked list of these structs, with one entry per - * client, null-terminated. + * client per device, null-terminated. * A grab has only one instance of this struct. */ typedef struct _GenericMaskRec { - ClientPtr client; /* client who set the event mask */ - Mask eventMask[MAXEXTENSIONS]; /* one mask per extension */ + ClientPtr client; /* client who set the event mask */ + DeviceIntPtr dev; + Mask eventMask[MAXEXTENSIONS]; /* one mask per extension */ struct _GenericMaskRec* next; } GenericMaskRec, *GenericMaskPtr; @@ -94,7 +95,9 @@ extern GEExtension GEExtensions[MAXEXTENSIONS]; /* Interface for other extensions */ -void GEWindowSetMask(ClientPtr pClient, WindowPtr pWin, int extension, Mask mask); +void GEWindowSetMask(ClientPtr pClient, DeviceIntPtr pDev, + WindowPtr pWin, int extension, Mask mask); + void GERegisterExtension( int extension, void (*ev_dispatch)(xGenericEvent* from, xGenericEvent* to), diff --git a/Xi/xiselev.c b/Xi/xiselev.c index 3c85032d5..601b10caf 100644 --- a/Xi/xiselev.c +++ b/Xi/xiselev.c @@ -61,16 +61,19 @@ ProcXiSelectEvent(ClientPtr client) { int rc; WindowPtr pWin; + DeviceIntPtr pDev; REQUEST(xXiSelectEventReq); REQUEST_SIZE_MATCH(xXiSelectEventReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); if (rc != Success) - { return rc; - } - GEWindowSetMask(client, pWin, IReqCode, stuff->mask); + rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixReadAccess); + if (rc != Success) + return rc; + + GEWindowSetMask(client, pDev, pWin, IReqCode, stuff->mask); return Success; } From 91dc8c43d2343e494c59023484883f4683bdc639 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 23 Jan 2008 15:45:02 +1030 Subject: [PATCH 330/634] Xi: Change window access right check to RecieveAccess in XiSelectEvent. --- Xi/xiselev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xi/xiselev.c b/Xi/xiselev.c index 601b10caf..f24dd3625 100644 --- a/Xi/xiselev.c +++ b/Xi/xiselev.c @@ -65,7 +65,7 @@ ProcXiSelectEvent(ClientPtr client) REQUEST(xXiSelectEventReq); REQUEST_SIZE_MATCH(xXiSelectEventReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixReceiveAccess); if (rc != Success) return rc; From 379f057646588fa3211d7ba0ec8d77d2fc0ad246 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 23 Jan 2008 16:08:37 +1030 Subject: [PATCH 331/634] Xext: add GEDeviceMaskIsSet (GE mask checking per device) If a mask was set for the NULL device, then we pretend the mask is set for all devices. --- Xext/geext.c | 34 ++++++++++++++++++++++++++++++++++ Xext/geext.h | 3 ++- dix/events.c | 4 ++-- 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/Xext/geext.c b/Xext/geext.c index 0127a05f1..77bb181ee 100644 --- a/Xext/geext.c +++ b/Xext/geext.c @@ -378,4 +378,38 @@ void GEWindowSetMask(ClientPtr pClient, DeviceIntPtr pDev, GERecalculateWinMask(pWin); } +/** + * Return TRUE if the mask for the given device is set. + * @param pWin Window the event may be delivered to. + * @param pDev Device the device originating the event. May be NULL. + * @param extension Extension ID + * @param mask Event mask + */ +BOOL GEDeviceMaskIsSet(WindowPtr pWin, DeviceIntPtr pDev, + int extension, Mask mask) +{ + GenericMaskPtr gemask; + + if (!pWin->optional || !pWin->optional->geMasks) + return FALSE; + + extension &= 0x7F; + + if (!pWin->optional->geMasks->eventMasks[extension] & mask) + return FALSE; + + + gemask = pWin->optional->geMasks->geClients; + + while(gemask) + { + if ((!gemask->dev || gemask->dev == pDev) && + (gemask->eventMask[extension] & mask)) + return TRUE; + + gemask = gemask->next; + } + + return FALSE; +} diff --git a/Xext/geext.h b/Xext/geext.h index a9021277b..577654a17 100644 --- a/Xext/geext.h +++ b/Xext/geext.h @@ -106,7 +106,8 @@ void GERegisterExtension( ); void GEInitEvent(xGenericEvent* ev, int extension); - +BOOL GEDeviceMaskIsSet(WindowPtr pWin, DeviceIntPtr pDev, + int extension, Mask mask); void GEExtensionInit(void); diff --git a/dix/events.c b/dix/events.c index f955d8152..2928554ff 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2151,7 +2151,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent /* if we get here, filter should be set to the GE specific mask. check if any client wants it */ - if (!GEMaskIsSet(pWin, GEEXT(pEvents), filter)) + if (!GEDeviceMaskIsSet(pWin, pDev, GEEXT(pEvents), filter)) return 0; /* run through all clients, deliver event */ @@ -2471,7 +2471,7 @@ DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab, while(win) { - if (GEMaskIsSet(win, GEEXT(xE), filter)) + if (GEDeviceMaskIsSet(win, dev, GEEXT(xE), filter)) { if (GEExtensions[GEEXTIDX(xE)].evfill) GEExtensions[GEEXTIDX(xE)].evfill(ge, dev, win, grab); From 466f6552190d1b83d66ebfd71e07921ed6210ee2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 23 Jan 2008 16:11:31 +1030 Subject: [PATCH 332/634] Xi: if deviceid is > 127 assume GE mask is for all devices (XiSelectEvent). --- Xi/xiselev.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Xi/xiselev.c b/Xi/xiselev.c index f24dd3625..2bfbd82c5 100644 --- a/Xi/xiselev.c +++ b/Xi/xiselev.c @@ -69,9 +69,13 @@ ProcXiSelectEvent(ClientPtr client) if (rc != Success) return rc; - rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixReadAccess); - if (rc != Success) - return rc; + if (stuff->deviceid & (0x1 << 7)) /* all devices */ + pDev = NULL; + else { + rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixReadAccess); + if (rc != Success) + return rc; + } GEWindowSetMask(client, pDev, pWin, IReqCode, stuff->mask); From 7732898aaa70e076000f6e6aa9420482896ed996 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Jan 2008 11:48:13 +1030 Subject: [PATCH 333/634] config: add a debug message, fix a whitespace error. --- config/hal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/hal.c b/config/hal.c index 4ab296159..52a011333 100644 --- a/config/hal.c +++ b/config/hal.c @@ -105,7 +105,7 @@ get_prop_string(LibHalContext *hal_ctx, const char *udi, const char *name) char *prop, *ret; prop = libhal_device_get_property_string(hal_ctx, udi, name, NULL); - DebugF(" [config/hal] getting %s on %s returned %s\n", name, udi, prop); + DebugF("[config/hal] getting %s on %s returned %s\n", name, udi, prop); if (prop) { ret = xstrdup(prop); libhal_free_string(prop); @@ -234,8 +234,9 @@ device_added(LibHalContext *hal_ctx, const char *udi) if (xkb_options) add_option(&options, "xkb_options", xkb_options); + DebugF("[config/hal] Adding device %s\n", name); if (NewInputDeviceRequest(options, &dev) != Success) { - DebugF("[config/hal] NewInputDeviceRequest failed\n"); + ErrorF("[config/hal] NewInputDeviceRequest failed\n"); dev = NULL; goto unwind; } From fb07fab2c07e7b0834724541dc47bfba02ba8574 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Jan 2008 13:45:22 +1030 Subject: [PATCH 334/634] config: only shutdown libhal if the connection is valid. Thanks to libdbus' extensive use of assert we won't just get an error, it'll bring the whole server down for us. --- config/hal.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/config/hal.c b/config/hal.c index 52a011333..1575422c3 100644 --- a/config/hal.c +++ b/config/hal.c @@ -283,12 +283,14 @@ disconnect_hook(void *data) struct config_hal_info *info = data; if (info->hal_ctx) { - dbus_error_init(&error); - if (!libhal_ctx_shutdown(info->hal_ctx, &error)) - DebugF("[config/hal] couldn't shut down context: %s (%s)\n", - error.name, error.message); + if (dbus_connection_get_is_connected(info->system_bus)) { + dbus_error_init(&error); + if (!libhal_ctx_shutdown(info->hal_ctx, &error)) + DebugF("[config/hal] couldn't shut down context: %s (%s)\n", + error.name, error.message); + dbus_error_free(&error); + } libhal_ctx_free(info->hal_ctx); - dbus_error_free(&error); } info->hal_ctx = NULL; From d23266522390a4ef7203ae7c062b2b920e45f9d7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Jan 2008 13:54:47 +1030 Subject: [PATCH 335/634] config: check connection != NULL before getting dbus' dispatch status. --- config/dbus-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/dbus-core.c b/config/dbus-core.c index 9cf153076..b349c6e3c 100644 --- a/config/dbus-core.c +++ b/config/dbus-core.c @@ -56,8 +56,9 @@ wakeup_handler(pointer data, int err, pointer read_mask) if (info->connection && FD_ISSET(info->fd, (fd_set *) read_mask)) { do { dbus_connection_read_write_dispatch(info->connection, 0); - } while (dbus_connection_get_dispatch_status(info->connection) == - DBUS_DISPATCH_DATA_REMAINS); + } while (info->connection && + dbus_connection_get_is_connected(info->connection) && + dbus_connection_get_dispatch_status(info->connection) == DBUS_DISPATCH_DATA_REMAINS); } } From 210eeef495770c1883c842ff003c28ce25f279d4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 26 Jan 2008 09:39:54 +1030 Subject: [PATCH 336/634] config: don't reset connection info on disconnect. If dbus is restarted, we try to connect again and this is difficult if the busname and/or busobject is not set. --- config/dbus.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config/dbus.c b/config/dbus.c index f6ac4c11c..0be42afb6 100644 --- a/config/dbus.c +++ b/config/dbus.c @@ -396,9 +396,6 @@ err_start: static void disconnect_hook(void *data) { - struct connection_info *info = data; - - reset_info(info); } #if 0 @@ -440,4 +437,6 @@ void config_dbus_fini(void) { config_dbus_core_remove_hook(&core_hook); + connection_data.busname[0] = '\0'; + connection_data.busobject[0] = '\0'; } From 6c38682084e24b18bac0ea75729b1183aeb01600 Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Thu, 31 Jan 2008 15:51:32 +1030 Subject: [PATCH 337/634] kdrive: AddInputClient takes a ClientPtr. --- hw/kdrive/src/kinput.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index c7c10e4e2..5b1dc5cdc 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -1015,7 +1015,7 @@ KdAddKeyboard (KdKeyboardInfo *ki) if (!ki) return !Success; - ki->dixdev = AddInputDevice(KdKeyboardProc, TRUE); + ki->dixdev = AddInputDevice(serverClient, KdKeyboardProc, TRUE); if (!ki->dixdev) { ErrorF("Couldn't register keyboard device %s\n", ki->name ? ki->name : "(unnamed)"); @@ -1084,7 +1084,7 @@ KdAddPointer (KdPointerInfo *pi) pi->mouseState = start; pi->eventHeld = FALSE; - pi->dixdev = AddInputDevice(KdPointerProc, TRUE); + pi->dixdev = AddInputDevice(serverClient, KdPointerProc, TRUE); if (!pi->dixdev) { ErrorF("Couldn't add pointer device %s\n", pi->name ? pi->name : "(unnamed)"); From 96eafa3d4f05997dac8be6a8d66a92410511824c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 5 Feb 2008 16:01:56 +1030 Subject: [PATCH 338/634] xkb: when copying sections, make sure num_rows is set too. (cherry picked from commit 41991fb991313202e8e6b513fe928ba14f8fcb87) --- xkb/xkbUtils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index 68ecb32d8..740bc7d49 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -1809,6 +1809,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) return FALSE; dsection->rows = tmp; } + dsection->num_rows = ssection->num_rows; for (j = 0, srow = ssection->rows, drow = dsection->rows; j < ssection->num_rows; j++, srow++, drow++) { From 9d5edebe9664f4ac35b82830e000a72d5ca9cbe4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 7 Feb 2008 21:22:50 +1030 Subject: [PATCH 339/634] Xi: finish XKB initialisation before copying the keymap. --- Xi/exevents.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Xi/exevents.c b/Xi/exevents.c index faf391fc3..46ee66d74 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -184,7 +184,10 @@ CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master) #ifdef XKB if (!noXkbExtension && dk->xkbInfo && dk->xkbInfo->desc) { if (!mk->xkbInfo || !mk->xkbInfo->desc) + { XkbInitDevice(master); + XkbFinishDeviceInit(master); + } if (!XkbCopyKeymap(dk->xkbInfo->desc, mk->xkbInfo->desc, True)) FatalError("Couldn't pivot keymap from device to core!\n"); } From 0b0a09797302ac2171db5df20fc5110aafc8efbb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 7 Feb 2008 15:48:04 +1030 Subject: [PATCH 340/634] xkb: when copying the keymap, make sure the structs default to 0/NULL. It actually does help if a pointer is NULL rather than pointing to nirvana when you're trying to free it lateron. Who would have thought? (cherry picked from commit 7a97ca667405a42d008265c3a870210cc1da97dd) --- xkb/xkbUtils.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index 740bc7d49..91aee18c4 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -1733,9 +1733,8 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) else { if (dst->geom->sz_shapes) { xfree(dst->geom->shapes); - dst->geom->shapes = NULL; } - + dst->geom->shapes = NULL; dst->geom->num_shapes = 0; dst->geom->sz_shapes = 0; } @@ -1784,6 +1783,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) } dst->geom->num_sections = 0; + dst->geom->sections = NULL; } if (src->geom->num_sections) { @@ -1795,6 +1795,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) tmp = xalloc(src->geom->num_sections * sizeof(XkbSectionRec)); if (!tmp) return FALSE; + memset(tmp, 0, src->geom->num_sections * sizeof(XkbSectionRec)); dst->geom->sections = tmp; dst->geom->num_sections = src->geom->num_sections; @@ -1831,6 +1832,10 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) return FALSE; dsection->doodads = tmp; } + else { + dsection->doodads = NULL; + } + for (k = 0, sdoodad = ssection->doodads, ddoodad = dsection->doodads; @@ -1858,9 +1863,9 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) else { if (dst->geom->sz_sections) { xfree(dst->geom->sections); - dst->geom->sections = NULL; } + dst->geom->sections = NULL; dst->geom->num_sections = 0; dst->geom->sz_sections = 0; } @@ -1889,6 +1894,8 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) } } } + dst->geom->num_doodads = 0; + dst->geom->doodads = NULL; } if (src->geom->num_doodads) { @@ -1901,7 +1908,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) sizeof(XkbDoodadRec)); if (!tmp) return FALSE; - bzero(tmp, src->geom->num_doodads * sizeof(XkbDoodadRec)); + memset(tmp, 0, src->geom->num_doodads * sizeof(XkbDoodadRec)); dst->geom->doodads = tmp; dst->geom->sz_doodads = src->geom->num_doodads; @@ -1930,9 +1937,9 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) else { if (dst->geom->sz_doodads) { xfree(dst->geom->doodads); - dst->geom->doodads = NULL; } + dst->geom->doodads = NULL; dst->geom->num_doodads = 0; dst->geom->sz_doodads = 0; } @@ -1960,10 +1967,10 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) dst->geom->num_key_aliases = dst->geom->sz_key_aliases; } else { - if (dst->geom->sz_key_aliases && dst->geom->key_aliases) { + if (dst->geom->key_aliases) { xfree(dst->geom->key_aliases); - dst->geom->key_aliases = NULL; } + dst->geom->key_aliases = NULL; dst->geom->num_key_aliases = 0; dst->geom->sz_key_aliases = 0; } @@ -1994,8 +2001,8 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) else { if (dst->geom->label_font) { xfree(dst->geom->label_font); - dst->geom->label_font = NULL; } + dst->geom->label_font = NULL; dst->geom->label_color = NULL; dst->geom->base_color = NULL; } From acb412d5399f865b5048fdd683147cea0f19f0c1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 14 Feb 2008 09:27:51 +1030 Subject: [PATCH 341/634] dix: Don't generate RawDeviceEvents anymore. These events have been removed from the protocol pending some more refinement and more thoughtful integration. --- dix/getevents.c | 37 +++---------------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index b70437122..ee58f0203 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -258,9 +258,9 @@ updateMotionHistory(DeviceIntPtr pDev, CARD32 ms, int first_valuator, */ _X_EXPORT int GetMaximumEventsNum(void) { - /* Three base events -- raw event and device, plus valuator events. + /* One base event -- device, plus valuator events. * Multiply by two if we're doing non-XKB key repeats. */ - int ret = 2 + MAX_VALUATOR_EVENTS; + int ret = 1 + MAX_VALUATOR_EVENTS; #ifdef XKB if (noXkbExtension) @@ -628,11 +628,9 @@ _X_EXPORT int GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, int flags, int first_valuator, int num_valuators, int *valuators) { - int num_events = 0, final_valuator = 0, i; + int num_events = 0, final_valuator = 0; CARD32 ms = 0; - CARD32* valptr; deviceKeyButtonPointer *kbp = NULL; - rawDeviceEvent* ev; DeviceIntPtr master; /* Thanks to a broken lib, we _always_ have to chase DeviceMotionNotifies @@ -687,35 +685,6 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, if (first_valuator < 0 || final_valuator > pDev->valuator->numAxes) return 0; - /* fill up the raw event, after checking that it is large enough to - * accommodate all valuators. - */ - if (events->evlen < - (sizeof(xEvent) + ((num_valuators - 4) * sizeof(CARD32)))) - { - events->evlen = sizeof(xEvent) + - ((num_valuators - 4) * sizeof(CARD32)); - events->event = realloc(events->event, events->evlen); - if (!events->event) - FatalError("Could not allocate event storage.\n"); - } - - ev = (rawDeviceEvent*)events->event; - ev->type = GenericEvent; - ev->evtype = XI_RawDeviceEvent; - ev->extension = IReqCode; - ev->length = (num_valuators > 4) ? (num_valuators - 4) : 0; - ev->event_type = type; - ev->buttons = buttons; - ev->num_valuators = num_valuators; - ev->first_valuator = first_valuator; - ev->deviceid = pDev->id; - valptr = &(ev->valuator0); - for (i = 0; i < num_valuators; i++, valptr++) - *valptr = valuators[i]; - - events++; - /* Set x and y based on whether this is absolute or relative, and * accelerate if we need to. */ if (flags & POINTER_ABSOLUTE) { From b81c330f70c4a4c8f37216aa4856c7f8db93a375 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 14 Feb 2008 09:32:54 +1030 Subject: [PATCH 342/634] mi: remove RawDeviceEvent's ID changing. --- mi/mieq.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mi/mieq.c b/mi/mieq.c index a1a434a47..a15b24f29 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -246,11 +246,7 @@ ChangeDeviceID(DeviceIntPtr dev, xEvent* event) else if (type == GenericEvent) { /* FIXME: need to put something into XGE to make this saner */ - if (GEIsType(event, IReqCode, XI_RawDeviceEvent)) - { - rawDeviceEvent* raw = (rawDeviceEvent*)event; - raw->deviceid = dev->id; - } else if (GEIsType(event, IReqCode, XI_DeviceClassesChangedNotify)) + if (GEIsType(event, IReqCode, XI_DeviceClassesChangedNotify)) { // do nothing or drink a beer. your choice. } else From b35a9efa16d9e14378a95c11fa39171b78710996 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 14 Feb 2008 09:41:49 +1030 Subject: [PATCH 343/634] Xi: Remove files for GrabAccessControl. --- Xi/Makefile.am | 2 - Xi/extinit.c | 5 --- Xi/grabacc.c | 102 ------------------------------------------------- Xi/grabacc.h | 41 -------------------- 4 files changed, 150 deletions(-) delete mode 100644 Xi/grabacc.c delete mode 100644 Xi/grabacc.h diff --git a/Xi/Makefile.am b/Xi/Makefile.am index 9c5658d2d..040663814 100644 --- a/Xi/Makefile.am +++ b/Xi/Makefile.am @@ -56,8 +56,6 @@ libXi_la_SOURCES = \ getselev.h \ getvers.c \ getvers.h \ - grabacc.c \ - grabacc.h \ grabdev.c \ grabdev.h \ grabdevb.c \ diff --git a/Xi/extinit.c b/Xi/extinit.c index 6aa1ece29..9c42a5d15 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -100,7 +100,6 @@ SOFTWARE. #include "getselev.h" #include "getvers.h" #include "getvers.h" -#include "grabacc.h" #include "grabdev.h" #include "grabdevb.h" #include "grabdevk.h" @@ -330,8 +329,6 @@ ProcIDispatch(ClientPtr client) return (ProcXChangeDeviceHierarchy(client)); else if (stuff->data == X_XiSelectEvent) return (ProcXiSelectEvent(client)); - else if (stuff->data == X_GrabAccessControl) - return (ProcXGrabAccessControl(client)); else if (stuff->data == X_ChangeWindowAccess) return (ProcXChangeWindowAccess(client)); else if (stuff->data == X_QueryWindowAccess) @@ -445,8 +442,6 @@ SProcIDispatch(ClientPtr client) return (SProcXChangeDeviceHierarchy(client)); else if (stuff->data == X_XiSelectEvent) return (SProcXiSelectEvent(client)); - else if (stuff->data == X_GrabAccessControl) - return (SProcXGrabAccessControl(client)); else if (stuff->data == X_ChangeWindowAccess) return (SProcXChangeWindowAccess(client)); else if (stuff->data == X_QueryWindowAccess) diff --git a/Xi/grabacc.c b/Xi/grabacc.c deleted file mode 100644 index 83b8736b5..000000000 --- a/Xi/grabacc.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ - -#define NEED_EVENTS -#define NEED_REPLIES -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include /* for inputstr.h */ -#include /* Request macro */ -#include "inputstr.h" /* DeviceIntPtr */ -#include "windowstr.h" /* window structure */ -#include "scrnintstr.h" /* screen structure */ -#include -#include -#include "extnsionst.h" -#include "extinit.h" /* LookupDeviceIntRec */ -#include "exevents.h" -#include "exglobals.h" - -#include "grabacc.h" - -/*********************************************************************** - * - * This procedure allows a client to register as the global client to control - * any window access. - * - */ -int -SProcXGrabAccessControl(ClientPtr client) -{ - char n; - REQUEST(xGrabAccessControlReq); - - swaps(&stuff->length, n); - return ProcXGrabAccessControl(client); -} - -int -ProcXGrabAccessControl(ClientPtr client) -{ - xGrabAccessControlReply rep; - REQUEST(xGrabAccessControlReq); - REQUEST_SIZE_MATCH(xGrabAccessControlReq); - - if (stuff->ungrab) - ACUnregisterClient(client); - - rep.repType = X_Reply; - rep.RepType = X_GrabAccessControl; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.success = stuff->ungrab || ACRegisterClient(client); - - WriteReplyToClient(client, sizeof(xGrabAccessControlReply), &rep); - return Success; -} - -/*********************************************************************** - * - * This procedure writes the reply for the XGrabAccessControl function, - * if the client and server have a different byte ordering. - * - */ - -void -SRepXGrabAccessControl(ClientPtr client, int size, - xGrabAccessControlReply* rep) -{ - char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - WriteToClient(client, size, (char *)rep); -} - diff --git a/Xi/grabacc.h b/Xi/grabacc.h deleted file mode 100644 index 6dcbcad33..000000000 --- a/Xi/grabacc.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef GRABACC_H -#define GRABACC_H 1 - -int SProcXGrabAccessControl(ClientPtr /* client */); - -int ProcXGrabAccessControl(ClientPtr /* client */); -void SRepXGrabAccessControl(ClientPtr client, int size, - xGrabAccessControlReply* rep); -#endif /* GRABACC_H */ From c99a9a97290c51bf2843f42d5683888cea8a3ff6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 14 Feb 2008 09:43:49 +1030 Subject: [PATCH 344/634] Xi: remove raw device events. Need to be better refined. --- Xi/extinit.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/Xi/extinit.c b/Xi/extinit.c index 9c42a5d15..f8c992798 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -138,7 +138,6 @@ Mask ExtExclusiveMasks[EMASKSIZE]; static Mask xi_filters[4] = { XI_DeviceHierarchyChangedMask, XI_DeviceClassesChangedMask, - XI_RawDeviceEventMask, }; static struct dev_type @@ -675,23 +674,6 @@ SDeviceLeaveNotifyEvent (deviceLeaveNotify *from, deviceLeaveNotify *to) swaps(&to->eventY, n); } -static void -SRawDeviceEvent(rawDeviceEvent* from, rawDeviceEvent *to) -{ - char n; - int i; - CARD32* valptr; - - - *to = *from; - swaps(&to->sequenceNumber, n); - swapl(&to->length, n); - swapl(&to->evtype, n); - valptr = &to->valuator0; - for (i = 0; i < from->num_valuators; i++, valptr++) - swapl(valptr, n); -} - static void SDeviceClassesChangedEvent(deviceClassesChangedEvent* from, deviceClassesChangedEvent* to) @@ -1169,9 +1151,6 @@ XIGEEventSwap(xGenericEvent* from, xGenericEvent* to) swaps(&from->sequenceNumber, n); switch(from->evtype) { - case XI_RawDeviceEvent: - SRawDeviceEvent((rawDeviceEvent*)from, (rawDeviceEvent*)to); - break; case XI_DeviceClassesChangedNotify: SDeviceClassesChangedEvent((deviceClassesChangedEvent*)from, (deviceClassesChangedEvent*)to); From b885588756450e2fa25fdd191e300e1c5dd37ec3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 14 Feb 2008 09:47:31 +1030 Subject: [PATCH 345/634] Xi: remove FakeDeviceData calls. And one leftover from GrabAccessControl. FakeDeviceData needs more thoughtful integration. --- Xi/Makefile.am | 2 - Xi/extinit.c | 8 --- Xi/fakedevdata.c | 123 ----------------------------------------------- Xi/fakedevdata.h | 42 ---------------- 4 files changed, 175 deletions(-) delete mode 100644 Xi/fakedevdata.c delete mode 100644 Xi/fakedevdata.h diff --git a/Xi/Makefile.am b/Xi/Makefile.am index 040663814..7804c51c6 100644 --- a/Xi/Makefile.am +++ b/Xi/Makefile.am @@ -32,8 +32,6 @@ libXi_la_SOURCES = \ extgrbdev.c \ extgrbdev.h \ extinit.c \ - fakedevdata.c \ - fakedevdata.h \ getbmap.c \ getbmap.h \ getcptr.c \ diff --git a/Xi/extinit.c b/Xi/extinit.c index f8c992798..0cf429f98 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -86,7 +86,6 @@ SOFTWARE. #include "closedev.h" #include "extgrbdev.h" #include "devbell.h" -#include "fakedevdata.h" #include "getbmap.h" #include "getbmap.h" #include "getcptr.h" @@ -338,8 +337,6 @@ ProcIDispatch(ClientPtr client) return ProcXGetClientPointer(client); else if (stuff->data == X_GetPairedPointer) return ProcXGetPairedPointer(client); - else if (stuff->data == X_FakeDeviceData) - return ProcXFakeDeviceData(client); else if (stuff->data == X_ExtendedGrabDevice) return ProcXExtendedGrabDevice(client); else { @@ -451,8 +448,6 @@ SProcIDispatch(ClientPtr client) return SProcXGetClientPointer(client); else if (stuff->data == X_GetPairedPointer) return SProcXGetPairedPointer(client); - else if (stuff->data == X_FakeDeviceData) - return SProcXFakeDeviceData(client); else if (stuff->data == X_ExtendedGrabDevice) return SProcXExtendedGrabDevice(client); else { @@ -530,9 +525,6 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep) else if (rep->RepType == X_QueryDevicePointer) SRepXQueryDevicePointer(client, len, (xQueryDevicePointerReply *) rep); - else if (rep->RepType == X_GrabAccessControl) - SRepXGrabAccessControl(client, len, - (xGrabAccessControlReply*) rep); else if (rep->RepType == X_QueryWindowAccess) SRepXQueryWindowAccess(client, len, (xQueryWindowAccessReply*) rep); diff --git a/Xi/fakedevdata.c b/Xi/fakedevdata.c deleted file mode 100644 index 92ee8ee09..000000000 --- a/Xi/fakedevdata.c +++ /dev/null @@ -1,123 +0,0 @@ -/* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ - -/*********************************************************************** - * - * Request to fake data for a given device. - * - */ - -#define NEED_EVENTS -#define NEED_REPLIES -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include /* for inputstr.h */ -#include /* Request macro */ -#include "inputstr.h" /* DeviceIntPtr */ -#include "windowstr.h" /* window structure */ -#include "scrnintstr.h" /* screen structure */ -#include -#include -#include "extnsionst.h" -#include "exevents.h" -#include "exglobals.h" -#include "mi.h" - -#include "fakedevdata.h" - -static EventListPtr fake_events = NULL; - -int -SProcXFakeDeviceData(ClientPtr client) -{ - char n; - int i; - ValuatorData* p; - - REQUEST(xFakeDeviceDataReq); - - swaps(&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xFakeDeviceDataReq); - - p = (ValuatorData*)&stuff[1]; - for (i = 0; i < stuff->num_valuators; i++, p++) - swapl(p, n); - - return ProcXFakeDeviceData(client);; -} - -int -ProcXFakeDeviceData(ClientPtr client) -{ - DeviceIntPtr dev; - int nevents, i; - int* valuators = NULL; - int rc; - - REQUEST(xFakeDeviceDataReq); - REQUEST_AT_LEAST_SIZE(xFakeDeviceDataReq); - - if (stuff->length != (sizeof(xFakeDeviceDataReq) >> 2) + stuff->num_valuators) - { - return BadLength; - } - - rc = dixLookupDevice(&dev, stuff->deviceid, client, DixWriteAccess); - if (rc != Success) - return rc; - - if (!fake_events && !(fake_events = InitEventList(GetMaximumEventsNum()))) - { - return BadAlloc; - } - if (stuff->num_valuators) - { - CARD32* valptr = (CARD32*)&stuff[1]; - - valuators = xcalloc(stuff->num_valuators, sizeof(int)); - if (!valuators) - { - return BadAlloc; - } - for (i = 0; i < stuff->num_valuators; i++, valptr++) - valuators[i] = (int)(*valptr); - } - - nevents = GetPointerEvents(fake_events, dev, stuff->type, stuff->buttons, - POINTER_RELATIVE, stuff->first_valuator, stuff->num_valuators, - valuators); - - OsBlockSignals(); - for (i = 0; i < nevents; i++) - mieqEnqueue(dev, (fake_events+ i)->event); - OsReleaseSignals(); - xfree(valuators); - return Success; -} diff --git a/Xi/fakedevdata.h b/Xi/fakedevdata.h deleted file mode 100644 index 28dd72985..000000000 --- a/Xi/fakedevdata.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef FAKEDEVDATA_H -#define FAKEDEVDATA_H 1 - -int SProcXFakeDeviceData(ClientPtr /* client */ - ); - -int ProcXFakeDeviceData(ClientPtr /* client */ - ); - -#endif /* FAKEDEVDATA_H */ From 921c298c4cdd2c879403ebdacbef48129058cad4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 14 Feb 2008 09:48:19 +1030 Subject: [PATCH 346/634] Xi: QueryDevicePointer doesn't have a shared field anymore. --- Xi/querydp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/Xi/querydp.c b/Xi/querydp.c index 629d8ef88..310334693 100644 --- a/Xi/querydp.c +++ b/Xi/querydp.c @@ -113,7 +113,6 @@ ProcXQueryDevicePointer(ClientPtr client) rep.rootX = pSprite->hot.x; rep.rootY = pSprite->hot.y; rep.child = None; - rep.shared = (pDev->spriteInfo->spriteOwner) ? xFalse : xTrue; if (pSprite->hot.pScreen == pWin->drawable.pScreen) { From 24db28230120ecc2b65b25164b6e7b407970f9e2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 18 Feb 2008 16:16:19 +1030 Subject: [PATCH 347/634] dix: set num_events to 1 by default. (no RawDeviceEvents anymore) This should have been part of acb412d5399f865b5048fdd683147cea0f19f0c1. --- dix/getevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/getevents.c b/dix/getevents.c index ee58f0203..1f8f0e02d 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -657,7 +657,7 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, ms = GetTimeInMillis(); - num_events = 2; + num_events = 1; master = pDev->u.master; if (master && master->u.lastSlave != pDev) From 660739c6bc84cb74f43a277052ce163fae654417 Mon Sep 17 00:00:00 2001 From: Benjamin Close Date: Fri, 15 Feb 2008 13:36:34 +1030 Subject: [PATCH 348/634] dix: Handle the case where a device cursor was removed correctly In the case that the device cursor was the first in the list of cursors the window knew about, unsetting the cursor could lead to a segfault due to pPrev being NULL. Instead catch the condition and correctly remove the node from the list. Since there is no cursor now set on the device, we simply return success as the parent windows cursor will propogate down later. Signed-off-by: Peter Hutterer --- dix/window.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dix/window.c b/dix/window.c index 3b69e4547..a941dacd7 100644 --- a/dix/window.c +++ b/dix/window.c @@ -3823,8 +3823,14 @@ ChangeWindowDeviceCursor(WindowPtr pWin, if (!pCursor) /* remove from list */ { - pPrev->next = pNode->next; + if(pPrev) + pPrev->next = pNode->next; + else + /* first item in list */ + pWin->optional->deviceCursors = pNode->next; + xfree(pNode); + return Success; } } else From 088067c891a78670d9509f48f56bf3ff9c16a30d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 18 Feb 2008 16:46:07 +1030 Subject: [PATCH 349/634] Xi: even if ChangeDeviceHierarchy fails, we may need to send an event. Changes are committed instantly, so if at least one change was successful, we must send an event to the client, even if subsequent ones fail. --- Xi/chdevhier.c | 68 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 44 insertions(+), 24 deletions(-) diff --git a/Xi/chdevhier.c b/Xi/chdevhier.c index b7495678a..e9a5076a9 100644 --- a/Xi/chdevhier.c +++ b/Xi/chdevhier.c @@ -84,6 +84,7 @@ ProcXChangeDeviceHierarchy(ClientPtr client) int required_len = sizeof(xChangeDeviceHierarchyReq); char n; int rc; + int nchanges = 0; deviceHierarchyChangedEvent ev; REQUEST(xChangeDeviceHierarchyReq); @@ -115,7 +116,7 @@ ProcXChangeDeviceHierarchy(ClientPtr client) if (rc != Success) { xfree(name); - return rc; + goto unwind; } if (!c->sendCore) @@ -130,6 +131,7 @@ ProcXChangeDeviceHierarchy(ClientPtr client) EnableDevice(keybd); } xfree(name); + nchanges++; } break; case CH_RemoveMasterDevice: @@ -143,18 +145,22 @@ ProcXChangeDeviceHierarchy(ClientPtr client) rc = dixLookupDevice(&ptr, r->deviceid, client, DixDestroyAccess); if (rc != Success) - return rc; + goto unwind; if (!ptr->isMaster) { client->errorValue = r->deviceid; - return BadDevice; + rc = BadDevice; + goto unwind; } /* XXX: For now, don't allow removal of VCP, VCK */ if (ptr == inputInfo.pointer || ptr == inputInfo.keyboard) - return BadDevice; + { + rc = BadDevice; + goto unwind; + } /* disable keyboards first */ if (IsPointerDevice(ptr)) @@ -164,7 +170,7 @@ ProcXChangeDeviceHierarchy(ClientPtr client) client, DixDestroyAccess); if (rc != Success) - return rc; + goto unwind; } else { @@ -174,7 +180,7 @@ ProcXChangeDeviceHierarchy(ClientPtr client) client, DixDestroyAccess); if (rc != Success) - return rc; + goto unwind; } @@ -189,23 +195,25 @@ ProcXChangeDeviceHierarchy(ClientPtr client) rc = dixLookupDevice(&newptr, r->returnPointer, client, DixWriteAccess); if (rc != Success) - return rc; + goto unwind; if (!newptr->isMaster) { client->errorValue = r->returnPointer; - return BadDevice; + rc = BadDevice; + goto unwind; } rc = dixLookupDevice(&newkeybd, r->returnKeyboard, client, DixWriteAccess); if (rc != Success) - return rc; + goto unwind; if (!newkeybd->isMaster) { client->errorValue = r->returnKeyboard; - return BadDevice; + rc = BadDevice; + goto unwind; } for (attached = inputInfo.devices; @@ -229,6 +237,7 @@ ProcXChangeDeviceHierarchy(ClientPtr client) RemoveDevice(keybd); RemoveDevice(ptr); + nchanges++; } break; case CH_ChangeAttachment: @@ -238,12 +247,13 @@ ProcXChangeDeviceHierarchy(ClientPtr client) rc = dixLookupDevice(&ptr, c->deviceid, client, DixWriteAccess); if (rc != Success) - return rc; + goto unwind; if (ptr->isMaster) { client->errorValue = c->deviceid; - return BadDevice; + rc = BadDevice; + goto unwind; } if (c->changeMode == Floating) @@ -254,21 +264,25 @@ ProcXChangeDeviceHierarchy(ClientPtr client) rc = dixLookupDevice(&newmaster, c->newMaster, client, DixWriteAccess); if (rc != Success) - return rc; + goto unwind; if (!newmaster->isMaster) { client->errorValue = c->newMaster; - return BadDevice; + rc = BadDevice; + goto unwind; } if ((IsPointerDevice(newmaster) && !IsPointerDevice(ptr)) || (IsKeyboardDevice(newmaster) && !IsKeyboardDevice(ptr))) - return BadDevice; + { + rc = BadDevice; + goto unwind; + } AttachDevice(client, ptr, newmaster); } - + nchanges++; } break; } @@ -276,14 +290,20 @@ ProcXChangeDeviceHierarchy(ClientPtr client) any = (xAnyHierarchyChangeInfo*)((char*)any + any->length); } - ev.type = GenericEvent; - ev.extension = IReqCode; - ev.length = 0; - ev.evtype = XI_DeviceHierarchyChangedNotify; - ev.time = GetTimeInMillis(); +unwind: - SendEventToAllWindows(&dummyDev, XI_DeviceHierarchyChangedMask, - (xEvent*)&ev, 1); - return Success; + if (nchanges > 0) /* even if an error occured, we need to send an event if + we changed anything in the hierarchy. */ + { + ev.type = GenericEvent; + ev.extension = IReqCode; + ev.length = 0; + ev.evtype = XI_DeviceHierarchyChangedNotify; + ev.time = GetTimeInMillis(); + + SendEventToAllWindows(&dummyDev, XI_DeviceHierarchyChangedMask, + (xEvent*)&ev, 1); + } + return rc; } From 6d9d18bf7708eb9e640ef732b5dc4c99aa6d5feb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 18 Feb 2008 17:25:15 +1030 Subject: [PATCH 350/634] dix: add support for WindowAccessAllowAll in device access checking. AllowAll is the last check before the parent window is checked. This allows to override a DenyAll in the parent window in a simpler way than before (the previous method required all devices to be in the permit list). --- dix/access.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dix/access.c b/dix/access.c index e7d39b4c3..dc66db897 100644 --- a/dix/access.c +++ b/dix/access.c @@ -254,6 +254,7 @@ ACQueryWindowAccess(WindowPtr win, * If the device is explicitely permitted, allow. * If the window has a default of DenyAll, do not allow. * If the device is explicitely denied, do not allow. + * If the window has a default of AllowAll, allow. * Check parent window. Rinse, wash, repeat. * If no rule could be found, allow. */ @@ -309,6 +310,9 @@ ACDeviceAllowed(WindowPtr win, DeviceIntPtr dev, xEvent* xE) return False; } + if (win->optional->access.defaultRule == WindowAccessAllowAll) + return True; + return ACDeviceAllowed(win->parent, dev, xE); } From 09a8fc5c7a79ca22fc23224bb544f2e709681f3f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 3 Feb 2008 07:47:18 +1030 Subject: [PATCH 351/634] Xi: make SizeDeviceInfo public and re-use from CreateClassesChangedEvent. --- Xi/listdev.c | 2 +- Xi/listdev.h | 5 +++++ dix/getevents.c | 15 +++------------ 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Xi/listdev.c b/Xi/listdev.c index 4aa2688dc..50f34e46c 100644 --- a/Xi/listdev.c +++ b/Xi/listdev.c @@ -92,7 +92,7 @@ SProcXListInputDevices(ClientPtr client) * */ -static void +_X_EXPORT void SizeDeviceInfo(DeviceIntPtr d, int *namesize, int *size) { int chunks; diff --git a/Xi/listdev.h b/Xi/listdev.h index 22a0d91c8..39ea2d635 100644 --- a/Xi/listdev.h +++ b/Xi/listdev.h @@ -49,4 +49,9 @@ CopySwapClasses(ClientPtr /* client */, CARD8* /* num_classes */, char** /* classbuf */); +void +SizeDeviceInfo(DeviceIntPtr /* dev */, + int* /* namesize */, + int* /* size */); + #endif /* LISTDEV_H */ diff --git a/dix/getevents.c b/dix/getevents.c index 1f8f0e02d..840fa2b89 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -113,6 +113,7 @@ CreateClassesChangedEvent(EventList* event, deviceClassesChangedEvent *dcce; int len = sizeof(xEvent); CARD32 ms = GetTimeInMillis(); + int namelen = 0; /* dummy */ /* XXX: ok, this is a bit weird. We need to alloc enough size for the * event so it can be filled in in POE lateron. Reason being that if @@ -120,19 +121,9 @@ CreateClassesChangedEvent(EventList* event, * or realloc the original pointer. * We can only do it here as we don't have the EventList in the event * processing any more. - * - * Code is basically same as in Xi/listdev.c */ - if (slave->key) - len += sizeof(xKeyInfo); - if (slave->button) - len += sizeof(xButtonInfo); - if (slave->valuator) - { - int chunks = ((int)slave->valuator->numAxes + 19) / VPC; - len += (chunks * sizeof(xValuatorInfo) + - slave->valuator->numAxes * sizeof(xAxisInfo)); - } + SizeDeviceInfo(slave, &namelen, &len); + if (event->evlen < len) { event->event = realloc(event->event, len); From 3fe64d8d271aea0863bf01b0376f3eceec0c90b5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 3 Feb 2008 09:56:19 +1030 Subject: [PATCH 352/634] Move input event list initialisation and storage from DDX to DIX. Rather than letting the DDX allocate the events, allocate them once in the DIX and just pass it around when needed. DDX should call GetEventList() to obtain this list and then pass it into Get{Pointer|Keyboard}Events. --- dix/events.c | 4 ++++ dix/getevents.c | 11 +++++++++++ hw/kdrive/src/kinput.c | 16 +++++++--------- hw/xfree86/common/xf86Xinput.c | 30 +++++------------------------- include/input.h | 3 +++ 5 files changed, 30 insertions(+), 34 deletions(-) diff --git a/dix/events.c b/dix/events.c index 2928554ff..1155178b1 100644 --- a/dix/events.c +++ b/dix/events.c @@ -5711,6 +5711,10 @@ InitEvents(void) DontPropagateMasks[i] = 0; DontPropagateRefCnts[i] = 0; } + + InputEventList = InitEventList(GetMaximumEventsNum()); + if (!InputEventList) + FatalError("[dix] Failed to allocate input event list.\n"); } /** diff --git a/dix/getevents.c b/dix/getevents.c index 840fa2b89..2a9df0f40 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -70,6 +70,17 @@ extern Bool XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies); /* Number of motion history events to store. */ #define MOTION_HISTORY_SIZE 256 +/* InputEventList is the container list for all input events generated by the + * DDX. The DDX is expected to call GetEventList() and then pass the list into + * Get{Pointer|Keyboard}Events. + */ +EventListPtr InputEventList = NULL; + +_X_EXPORT EventListPtr +GetEventList() +{ + return InputEventList; +} /** * Pick some arbitrary size for Xi motion history. diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index 5b1dc5cdc..78b44199e 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -65,7 +65,7 @@ static struct KdConfigDevice *kdConfigPointers = NULL; static KdKeyboardDriver *kdKeyboardDrivers = NULL; static KdPointerDriver *kdPointerDrivers = NULL; -static xEvent *kdEvents = NULL; +static EventListPtr *kdEvents = NULL; static Bool kdInputEnabled; static Bool kdOffScreen; @@ -1391,11 +1391,6 @@ KdInitInput (void) ErrorF("Failed to add keyboard!\n"); } - if (!kdEvents) - kdEvents = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum()); - if (!kdEvents) - FatalError("Couldn't allocate event buffer\n"); - mieqInit(); } @@ -1984,6 +1979,7 @@ KdReleaseAllKeys (void) key++) { if (IsKeyDown(ki, key)) { KdHandleKeyboardEvent(ki, KeyRelease, key); + kdEvents = GetEventList(); nEvents = GetKeyboardEvents(kdEvents, ki->dixdev, KeyRelease, key); for (i = 0; i < nEvents; i++) KdQueueEvent (ki->dixdev, kdEvents + i); @@ -2048,9 +2044,10 @@ KdEnqueueKeyboardEvent(KdKeyboardInfo *ki, KdHandleKeyboardEvent(ki, type, key_code); } + kdEvents = GetEventList(); nEvents = GetKeyboardEvents(kdEvents, ki->dixdev, type, key_code); for (i = 0; i < nEvents; i++) - KdQueueEvent(ki->dixdev, kdEvents + i); + KdQueueEvent(ki->dixdev, kdEvents); } else { ErrorF("driver %s wanted to post scancode %d outside of [%d, %d]!\n", @@ -2148,8 +2145,9 @@ _KdEnqueuePointerEvent (KdPointerInfo *pi, int type, int x, int y, int z, if (!force && KdHandlePointerEvent(pi, type, x, y, z, b, absrel)) return; - nEvents = GetPointerEvents(kdEvents, pi->dixdev, type, b, absrel, 0, 3, - valuators); + kdEvents = GetEventList(); + nEvents = GetPointerEvents(kdEvents, pi->dixdev, type, b, absrel, + 0, 3, valuators); for (i = 0; i < nEvents; i++) KdQueueEvent(pi->dixdev, kdEvents + i); } diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index f99e540a4..a928b4cd3 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -569,11 +569,7 @@ xf86PostMotionEventP(DeviceIntPtr device, } #endif - if (!xf86Events) - xf86Events = InitEventList(GetMaximumEventsNum()); - if (!xf86Events) - FatalError("Couldn't allocate event store\n"); - + xf86Events = GetEventList(); nevents = GetPointerEvents(xf86Events, device, MotionNotify, 0, flags, first_valuator, num_valuators, valuators); @@ -605,11 +601,7 @@ xf86PostProximityEvent(DeviceIntPtr device, valuators[i] = va_arg(var, int); va_end(var); - if (!xf86Events) - xf86Events = InitEventList(GetMaximumEventsNum()); - if (!xf86Events) - FatalError("Couldn't allocate event store\n"); - + xf86Events = GetEventList(); nevents = GetProximityEvents(xf86Events, device, is_in ? ProximityIn : ProximityOut, first_valuator, num_valuators, valuators); @@ -647,11 +639,7 @@ xf86PostButtonEvent(DeviceIntPtr device, valuators[i] = va_arg(var, int); va_end(var); - if (!xf86Events) - xf86Events = InitEventList(GetMaximumEventsNum()); - if (!xf86Events) - FatalError("Couldn't allocate event store\n"); - + xf86Events = GetEventList(); nevents = GetPointerEvents(xf86Events, device, is_down ? ButtonPress : ButtonRelease, button, (is_absolute) ? POINTER_ABSOLUTE : POINTER_RELATIVE, @@ -680,11 +668,6 @@ xf86PostKeyEvent(DeviceIntPtr device, "badly south after this message, then xf86PostKeyEvent is " "broken.\n"); - if (!xf86Events) - xf86Events = InitEventList(GetMaximumEventsNum()); - if (!xf86Events) - FatalError("Couldn't allocate event store\n"); - if (is_absolute) { valuators = xcalloc(sizeof(int), num_valuators); va_start(var, num_valuators); @@ -692,6 +675,7 @@ xf86PostKeyEvent(DeviceIntPtr device, valuators[i] = va_arg(var, int); va_end(var); + xf86Events = GetEventList(); nevents = GetKeyboardValuatorEvents(xf86Events, device, is_down ? KeyPress : KeyRelease, key_code, first_valuator, @@ -726,11 +710,7 @@ xf86PostKeyboardEvent(DeviceIntPtr device, } #endif - if (!xf86Events) - xf86Events = InitEventList(GetMaximumEventsNum()); - if (!xf86Events) - FatalError("Couldn't allocate event store\n"); - + xf86Events = GetEventList(); nevents = GetKeyboardEvents(xf86Events, device, is_down ? KeyPress : KeyRelease, key_code); diff --git a/include/input.h b/include/input.h index 18636766b..fb24e7637 100644 --- a/include/input.h +++ b/include/input.h @@ -94,6 +94,8 @@ typedef struct _EventList { ((xGenericEvent*)event)->length * 4 for GenericEvents */ } EventList, *EventListPtr; +/* The DIX stores incoming input events in this list */ +extern EventListPtr InputEventList; typedef int (*DeviceProc)( DeviceIntPtr /*device*/, @@ -396,6 +398,7 @@ extern void InitInput( extern int GetMaximumEventsNum(void); +extern EventListPtr GetEventList(); extern EventListPtr InitEventList(int num_events); extern void FreeEventList(EventListPtr list, int num_events); From 77dba004a9aaf35f183f61ff6875a491a52aa030 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 3 Feb 2008 10:10:46 +1030 Subject: [PATCH 353/634] dix: add InputEventListLen and SetMinimumEventSize The latter is used to increase the amount of allocated memory for the event list. This will be needed for ClassesChangedEvents that can be of more or less arbitrary size (larger than 32 anyway). --- dix/events.c | 3 ++- dix/getevents.c | 24 ++++++++++++++++++++++++ include/input.h | 4 ++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/dix/events.c b/dix/events.c index 1155178b1..bf2df9f44 100644 --- a/dix/events.c +++ b/dix/events.c @@ -5712,7 +5712,8 @@ InitEvents(void) DontPropagateRefCnts[i] = 0; } - InputEventList = InitEventList(GetMaximumEventsNum()); + InputEventListLen = GetMaximumEventsNum(); + InputEventList = InitEventList(InputEventListLen); if (!InputEventList) FatalError("[dix] Failed to allocate input event list.\n"); } diff --git a/dix/getevents.c b/dix/getevents.c index 2a9df0f40..407ac58b2 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -75,6 +75,7 @@ extern Bool XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies); * Get{Pointer|Keyboard}Events. */ EventListPtr InputEventList = NULL; +int InputEventListLen = 0; _X_EXPORT EventListPtr GetEventList() @@ -598,6 +599,29 @@ InitEventList(int num_events) return events; } +/** + * Allocs min_size memory for each event in the list. + */ +_X_EXPORT void +SetMinimumEventSize(EventListPtr list, int num_events, int min_size) +{ + if (!list) + return; + + while(num_events--) + { + if (list[num_events].evlen < min_size) + { + list[num_events].event = realloc(list[num_events].event, min_size); + if (!list[num_events].event) + { + FatalError("[dix] Failed to set event list's " + "min_size to %d.\n", min_size); + } + } + } +} + /** * Free an event list. * diff --git a/include/input.h b/include/input.h index fb24e7637..af330a798 100644 --- a/include/input.h +++ b/include/input.h @@ -96,6 +96,7 @@ typedef struct _EventList { /* The DIX stores incoming input events in this list */ extern EventListPtr InputEventList; +extern int InputEventListLen; typedef int (*DeviceProc)( DeviceIntPtr /*device*/, @@ -400,6 +401,9 @@ extern int GetMaximumEventsNum(void); extern EventListPtr GetEventList(); extern EventListPtr InitEventList(int num_events); +extern void SetMinimumEventSize(EventListPtr list, + int num_events, + int min_size); extern void FreeEventList(EventListPtr list, int num_events); extern void CreateClassesChangedEvent(EventListPtr event, From 74628d639719815c1beff4cac84662fa41c55925 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 3 Feb 2008 10:15:40 +1030 Subject: [PATCH 354/634] dix: change GetEventList to return length of list and set parameter in place. Changing DDXs to use new prototype too. --- dix/getevents.c | 7 ++++--- hw/kdrive/src/kinput.c | 8 ++++---- hw/xfree86/common/xf86Xinput.c | 10 +++++----- include/input.h | 2 +- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index 407ac58b2..15b7dc30b 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -77,10 +77,11 @@ extern Bool XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies); EventListPtr InputEventList = NULL; int InputEventListLen = 0; -_X_EXPORT EventListPtr -GetEventList() +_X_EXPORT int +GetEventList(EventListPtr* list) { - return InputEventList; + *list = InputEventList; + return InputEventListLen; } /** diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index 78b44199e..62a82618a 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -65,7 +65,7 @@ static struct KdConfigDevice *kdConfigPointers = NULL; static KdKeyboardDriver *kdKeyboardDrivers = NULL; static KdPointerDriver *kdPointerDrivers = NULL; -static EventListPtr *kdEvents = NULL; +static EventListPtr kdEvents = NULL; static Bool kdInputEnabled; static Bool kdOffScreen; @@ -1979,7 +1979,7 @@ KdReleaseAllKeys (void) key++) { if (IsKeyDown(ki, key)) { KdHandleKeyboardEvent(ki, KeyRelease, key); - kdEvents = GetEventList(); + GetEventList(&kdEvents); nEvents = GetKeyboardEvents(kdEvents, ki->dixdev, KeyRelease, key); for (i = 0; i < nEvents; i++) KdQueueEvent (ki->dixdev, kdEvents + i); @@ -2044,7 +2044,7 @@ KdEnqueueKeyboardEvent(KdKeyboardInfo *ki, KdHandleKeyboardEvent(ki, type, key_code); } - kdEvents = GetEventList(); + GetEventList(&kdEvents); nEvents = GetKeyboardEvents(kdEvents, ki->dixdev, type, key_code); for (i = 0; i < nEvents; i++) KdQueueEvent(ki->dixdev, kdEvents); @@ -2145,7 +2145,7 @@ _KdEnqueuePointerEvent (KdPointerInfo *pi, int type, int x, int y, int z, if (!force && KdHandlePointerEvent(pi, type, x, y, z, b, absrel)) return; - kdEvents = GetEventList(); + GetEventList(&kdEvents); nEvents = GetPointerEvents(kdEvents, pi->dixdev, type, b, absrel, 0, 3, valuators); for (i = 0; i < nEvents; i++) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index a928b4cd3..d2c05313d 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -569,7 +569,7 @@ xf86PostMotionEventP(DeviceIntPtr device, } #endif - xf86Events = GetEventList(); + GetEventList(&xf86Events); nevents = GetPointerEvents(xf86Events, device, MotionNotify, 0, flags, first_valuator, num_valuators, valuators); @@ -601,7 +601,7 @@ xf86PostProximityEvent(DeviceIntPtr device, valuators[i] = va_arg(var, int); va_end(var); - xf86Events = GetEventList(); + GetEventList(&xf86Events); nevents = GetProximityEvents(xf86Events, device, is_in ? ProximityIn : ProximityOut, first_valuator, num_valuators, valuators); @@ -639,7 +639,7 @@ xf86PostButtonEvent(DeviceIntPtr device, valuators[i] = va_arg(var, int); va_end(var); - xf86Events = GetEventList(); + GetEventList(&xf86Events); nevents = GetPointerEvents(xf86Events, device, is_down ? ButtonPress : ButtonRelease, button, (is_absolute) ? POINTER_ABSOLUTE : POINTER_RELATIVE, @@ -675,7 +675,7 @@ xf86PostKeyEvent(DeviceIntPtr device, valuators[i] = va_arg(var, int); va_end(var); - xf86Events = GetEventList(); + GetEventList(&xf86Events); nevents = GetKeyboardValuatorEvents(xf86Events, device, is_down ? KeyPress : KeyRelease, key_code, first_valuator, @@ -710,7 +710,7 @@ xf86PostKeyboardEvent(DeviceIntPtr device, } #endif - xf86Events = GetEventList(); + GetEventList(&xf86Events); nevents = GetKeyboardEvents(xf86Events, device, is_down ? KeyPress : KeyRelease, key_code); diff --git a/include/input.h b/include/input.h index af330a798..9ba12db79 100644 --- a/include/input.h +++ b/include/input.h @@ -399,7 +399,7 @@ extern void InitInput( extern int GetMaximumEventsNum(void); -extern EventListPtr GetEventList(); +extern int GetEventList(EventListPtr* list); extern EventListPtr InitEventList(int num_events); extern void SetMinimumEventSize(EventListPtr list, int num_events, From 750d70267679ddee10590c80ec621d890bd3d4a7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 3 Feb 2008 10:25:15 +1030 Subject: [PATCH 355/634] dix: Ensure enough memory for ClassesChangedEvent for a new device. Before we enable the device through the driver, we size it up and make sure that the events in the event list contain enough bytes for a possible ClassesChangedEvent lateron. --- dix/devices.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dix/devices.c b/dix/devices.c index 0ffc798e8..38466f889 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -206,6 +206,10 @@ EnableDevice(DeviceIntPtr dev) DeviceIntRec dummyDev; DeviceIntPtr other; devicePresenceNotify ev; + int namelen = 0; /* dummy */ + int evsize = sizeof(xEvent); + int listlen; + EventListPtr evlist; for (prev = &inputInfo.off_devices; *prev && (*prev != dev); @@ -238,6 +242,18 @@ EnableDevice(DeviceIntPtr dev) } } + /* Before actually enabling the device, we need to make sure the event + * list's events have enough memory for a ClassesChangedEvent from the + * device + */ + + SizeDeviceInfo(dev, &namelen, &evsize); + + listlen = GetEventList(&evlist); + OsBlockSignals(); + SetMinimumEventSize(evlist, listlen, evsize); + OsReleaseSignals(); + if ((*prev != dev) || !dev->inited || ((ret = (*dev->deviceProc)(dev, DEVICE_ON)) != Success)) { ErrorF("[dix] couldn't enable device %d\n", dev->id); From f14a62f823e257f92745bbcde11838f2ddd32ac8 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 19 Feb 2008 21:44:10 +1030 Subject: [PATCH 356/634] dix: set evlen to the size of the reallocated memory. What a good idea this is... I'm very proud of myself. --- dix/getevents.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dix/getevents.c b/dix/getevents.c index 15b7dc30b..753790653 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -613,6 +613,7 @@ SetMinimumEventSize(EventListPtr list, int num_events, int min_size) { if (list[num_events].evlen < min_size) { + list[num_events].evlen = min_size; list[num_events].event = realloc(list[num_events].event, min_size); if (!list[num_events].event) { From 27b21278939a06ab6a22c9902f202eae6c5fae72 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 25 Feb 2008 17:00:42 +1030 Subject: [PATCH 357/634] Xi: remove ungrab handling of ExtendedUngrabDevice request. This can be done by UngrabDevice, no need for separate codepaths. --- Xi/extgrbdev.c | 17 ++--------------- dix/events.c | 12 ------------ include/dix.h | 3 --- 3 files changed, 2 insertions(+), 30 deletions(-) diff --git a/Xi/extgrbdev.c b/Xi/extgrbdev.c index 72f887958..6458404b7 100644 --- a/Xi/extgrbdev.c +++ b/Xi/extgrbdev.c @@ -107,19 +107,13 @@ ProcXExtendedGrabDevice(ClientPtr client) REQUEST(xExtendedGrabDeviceReq); REQUEST_AT_LEAST_SIZE(xExtendedGrabDeviceReq); - if (stuff->ungrab) - { - REQUEST_SIZE_MATCH(xExtendedGrabDeviceReq); - } - rep.repType = X_Reply; rep.RepType = X_ExtendedGrabDevice; rep.sequenceNumber = client->sequence; rep.length = 0; - if (!stuff->ungrab && /* other fields are undefined for ungrab */ - (stuff->length != (sizeof(xExtendedGrabDeviceReq) >> 2) + - stuff->event_count + 2 * stuff->generic_event_count)) + if (stuff->length != (sizeof(xExtendedGrabDeviceReq) >> 2) + + stuff->event_count + 2 * stuff->generic_event_count) { errval = 0; rc = BadLength; @@ -131,13 +125,6 @@ ProcXExtendedGrabDevice(ClientPtr client) goto cleanup; } - - if (stuff->ungrab) - { - ExtUngrabDevice(client, dev); - goto cleanup; - } - rc = dixLookupWindow(&grab_window, stuff->grab_window, client, diff --git a/dix/events.c b/dix/events.c index bf2df9f44..0b9b76884 100644 --- a/dix/events.c +++ b/dix/events.c @@ -6604,15 +6604,3 @@ ExtGrabDevice(ClientPtr client, return GrabSuccess; } - -_X_EXPORT int -ExtUngrabDevice(ClientPtr client, DeviceIntPtr dev) -{ - GrabInfoPtr grabinfo = &dev->deviceGrab; - if (grabinfo->grab && SameClient(grabinfo->grab, client)) - (*grabinfo->DeactivateGrab)(dev); - return GrabSuccess; -} - - - diff --git a/include/dix.h b/include/dix.h index 079645d0e..1ed4af02e 100644 --- a/include/dix.h +++ b/include/dix.h @@ -698,7 +698,4 @@ extern int ExtGrabDevice(ClientPtr client, CursorPtr cursor, Mask xi_mask, GenericMaskPtr ge_masks); -extern int ExtUngrabDevice(ClientPtr client, - DeviceIntPtr dev); - #endif /* DIX_H */ From d61f481a4455dd2a94674d2b7b26429cf9dcece3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 25 Feb 2008 17:52:45 +1030 Subject: [PATCH 358/634] Xi: remove GetPairedPointer handling. obsolete, ListInputDevices provides this information now. --- Xi/Makefile.am | 2 - Xi/extinit.c | 7 ---- Xi/getpairp.c | 104 ------------------------------------------------- Xi/getpairp.h | 45 --------------------- 4 files changed, 158 deletions(-) delete mode 100644 Xi/getpairp.c delete mode 100644 Xi/getpairp.h diff --git a/Xi/Makefile.am b/Xi/Makefile.am index 7804c51c6..2af1940eb 100644 --- a/Xi/Makefile.am +++ b/Xi/Makefile.am @@ -46,8 +46,6 @@ libXi_la_SOURCES = \ getkmap.h \ getmmap.c \ getmmap.h \ - getpairp.c \ - getpairp.h \ getprop.c \ getprop.h \ getselev.c \ diff --git a/Xi/extinit.c b/Xi/extinit.c index 0cf429f98..f1c282493 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -94,7 +94,6 @@ SOFTWARE. #include "getfocus.h" #include "getkmap.h" #include "getmmap.h" -#include "getpairp.h" #include "getprop.h" #include "getselev.h" #include "getvers.h" @@ -335,8 +334,6 @@ ProcIDispatch(ClientPtr client) return ProcXSetClientPointer(client); else if (stuff->data == X_GetClientPointer) return ProcXGetClientPointer(client); - else if (stuff->data == X_GetPairedPointer) - return ProcXGetPairedPointer(client); else if (stuff->data == X_ExtendedGrabDevice) return ProcXExtendedGrabDevice(client); else { @@ -446,8 +443,6 @@ SProcIDispatch(ClientPtr client) return SProcXSetClientPointer(client); else if (stuff->data == X_GetClientPointer) return SProcXGetClientPointer(client); - else if (stuff->data == X_GetPairedPointer) - return SProcXGetPairedPointer(client); else if (stuff->data == X_ExtendedGrabDevice) return SProcXExtendedGrabDevice(client); else { @@ -530,8 +525,6 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep) (xQueryWindowAccessReply*) rep); else if (rep->RepType == X_GetClientPointer) SRepXGetClientPointer(client, len, (xGetClientPointerReply*) rep); - else if (rep->RepType == X_GetPairedPointer) - SRepXGetPairedPointer(client, len, (xGetPairedPointerReply*) rep); else if (rep->RepType == X_ExtendedGrabDevice) SRepXExtendedGrabDevice(client, len, (xExtendedGrabDeviceReply*) rep); else { diff --git a/Xi/getpairp.c b/Xi/getpairp.c deleted file mode 100644 index 59ed18909..000000000 --- a/Xi/getpairp.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include /* for inputstr.h */ -#include /* Request macro */ -#include "inputstr.h" /* DeviceIntPtr */ -#include "windowstr.h" /* window structure */ -#include -#include -#include "extnsionst.h" -#include "exevents.h" -#include "exglobals.h" - -#ifdef PANORAMIX -#include "panoramiXsrv.h" -#endif - -#include "getpairp.h" - -/*********************************************************************** - * - * This procedure allows a client to query the paired pointer for a keyboard - * device. - * - */ - -int -SProcXGetPairedPointer(ClientPtr client) -{ - char n; - REQUEST(xGetPairedPointerReq); - swaps(&stuff->length, n); - return (ProcXGetPairedPointer(client)); -} - -int -ProcXGetPairedPointer(ClientPtr client) -{ - xGetPairedPointerReply rep; - DeviceIntPtr kbd, ptr; - int rc; - - REQUEST(xGetPairedPointerReq); - REQUEST_SIZE_MATCH(xGetPairedPointerReq); - - rc = dixLookupDevice(&kbd, stuff->deviceid, client, DixReadAccess); - if (rc != Success) - return rc; - else if (!kbd->key || !kbd->isMaster) { - client->errorValue = stuff->deviceid; - return BadDevice; - } - - ptr = GetPairedDevice(kbd); - - rep.repType = X_Reply; - rep.RepType = X_GetPairedPointer; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.paired = TRUE; - rep.deviceid = ptr->id; - WriteReplyToClient(client, sizeof(xGetPairedPointerReply), &rep); - return Success; -} - -void -SRepXGetPairedPointer(ClientPtr client, int size, - xGetPairedPointerReply* rep) -{ - char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - WriteToClient(client, size, (char *)rep); -} diff --git a/Xi/getpairp.h b/Xi/getpairp.h deleted file mode 100644 index 9b4759e71..000000000 --- a/Xi/getpairp.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef GETPAIRP_H -#define GETPAIRP_H 1 - -int SProcXGetPairedPointer(ClientPtr /* client */ - ); -int ProcXGetPairedPointer(ClientPtr /* client */ - ); -void SRepXGetPairedPointer(ClientPtr /* client */, - int /* size */, - xGetPairedPointerReply* /* rep */ - ); - -#endif /* GETPAIRP_H */ From ce9fb2f8c4610016e49321018fc9b24729380afc Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 26 Feb 2008 13:19:54 +1030 Subject: [PATCH 359/634] Xi: MDs return the paired device's ID in attached field of ListInputDevices. --- Xi/listdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Xi/listdev.c b/Xi/listdev.c index 50f34e46c..3fb0ab314 100644 --- a/Xi/listdev.c +++ b/Xi/listdev.c @@ -188,6 +188,8 @@ CopySwapDevice(ClientPtr client, DeviceIntPtr d, int num_classes, dev->use = IsXExtensionDevice; if (!d->isMaster) dev->attached = (d->u.master) ? d->u.master->id : IsFloating; + else + dev->attached = GetPairedDevice(d)->id; if (client->swapped) { swapl(&dev->type, n); /* macro - braces are required */ From 23ae68a4c74a2ec90b4130c37b0d0aec3f4082ce Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 26 Feb 2008 15:12:36 +1030 Subject: [PATCH 360/634] dix: before copying the classes the first time, set the VCK's classes to NULL. XkbFinishDeviceInit does the following: xkbi->kbdProc= pXDev->kbdfeed->CtrlProc; pXDev->kbdfeed->CtrlProc= XkbDDXKeybdCtrlProc; If we directly copy the device classes for the VCK, pXDev->kbdfeed->CtrlProc at the time of copying is still XbkDDXKeybdCtrlProc. So at some point XkbDDXKeybdCtrlProc is called, and calls itself, and calls itself, and... Setting the device's classes to NULL seems to fix things. The memory isn't lost, it gets stored into the devPrivates and freed at device closing time. --- dix/devices.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/dix/devices.c b/dix/devices.c index 38466f889..f036985de 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -484,6 +484,21 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what) * If we don't do that, we're in SIGABRT territory (double-frees, etc) */ memcpy(&dummy, pDev, sizeof(DeviceIntRec)); + /* Need to set them to NULL. Otherwise, Xkb does some weird stuff and + * the dev->key->xkbInfo->kbdProc starts calling itself. This can + * probably be fixed in a better way, but I don't know how. (whot) */ + pDev->key = NULL; + pDev->valuator = NULL; + pDev->button = NULL; + pDev->focus = NULL; + pDev->proximity = NULL; + pDev->absolute = NULL; + pDev->kbdfeed = NULL; + pDev->ptrfeed = NULL; + pDev->intfeed = NULL; + pDev->stringfeed = NULL; + pDev->bell = NULL; + pDev->leds = NULL; DeepCopyDeviceClasses(&dummy, pDev); dixSetPrivate(&pDev->devPrivates, MasterDevClassesPrivateKey, @@ -547,6 +562,20 @@ CorePointerProc(DeviceIntPtr pDev, int what) /* See comment in CoreKeyboardProc. */ memcpy(&dummy, pDev, sizeof(DeviceIntRec)); + /* Need to set them to NULL for the VCK (see CoreKeyboardProc). Not + * sure if also necessary for the VCP, but it doesn't seem to hurt */ + pDev->key = NULL; + pDev->valuator = NULL; + pDev->button = NULL; + pDev->focus = NULL; + pDev->proximity = NULL; + pDev->absolute = NULL; + pDev->kbdfeed = NULL; + pDev->ptrfeed = NULL; + pDev->intfeed = NULL; + pDev->stringfeed = NULL; + pDev->bell = NULL; + pDev->leds = NULL; DeepCopyDeviceClasses(&dummy, pDev); dixSetPrivate(&pDev->devPrivates, MasterDevClassesPrivateKey, classes); From 7b4f3616f75a541b819d99c28bb6cb73761b6066 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 4 Mar 2008 18:29:15 +1030 Subject: [PATCH 361/634] Xi: add deviceid to QueryDevicePointer request. Why not, we had the padding anyway. Suggested by Jim Gettys on the X.Org mailing list. --- Xi/querydp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Xi/querydp.c b/Xi/querydp.c index 310334693..ac11025b3 100644 --- a/Xi/querydp.c +++ b/Xi/querydp.c @@ -113,6 +113,7 @@ ProcXQueryDevicePointer(ClientPtr client) rep.rootX = pSprite->hot.x; rep.rootY = pSprite->hot.y; rep.child = None; + rep.deviceid = pDev->id; if (pSprite->hot.pScreen == pWin->drawable.pScreen) { From 8e562fe26ff77c03be0855afb08e43f3ed0bd4b9 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 5 Mar 2008 15:11:41 +1030 Subject: [PATCH 362/634] Xi: remove false memset from DeepCopyDeviceClasses. It's wrong, needs to be different, but I haven't had enough coffee to figure out what it needs to do yet. --- Xi/exevents.c | 1 - 1 file changed, 1 deletion(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 46ee66d74..fe7f8dc28 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -356,7 +356,6 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) int i; DeviceIntPtr sd; - memset(to->button, 0, MAP_LENGTH); /* merge button states from all attached devices */ for (sd = inputInfo.devices; sd; sd = sd->next) { From 4eb87c8693b57d9354832c76417797394656333e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 4 Apr 2008 14:20:18 +1030 Subject: [PATCH 363/634] Xi: don't free device classes before copying them. First commit in a series to come. --- Xi/exevents.c | 1 - 1 file changed, 1 deletion(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index fe7f8dc28..b21c73d23 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -413,7 +413,6 @@ ChangeMasterDeviceClasses(DeviceIntPtr device, master->public.devicePrivate = device->public.devicePrivate; - FreeAllDeviceClasses((ClassesPtr)&master->key); DeepCopyDeviceClasses(device, master); /* event is already correct size, see comment in GetPointerEvents */ From 52fc7aed18930fc9e6bcfdd5dbc28ae559978288 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 4 Apr 2008 14:47:23 +1030 Subject: [PATCH 364/634] Xi: only alloc memory for feedback classes if it doesn't already exist. --- Xi/exevents.c | 60 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 6 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index b21c73d23..9c771a45b 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -225,7 +225,15 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) k = &to->kbdfeed; for(it = from->kbdfeed; it; it = it->next) { - *k = xcalloc(1, sizeof(KbdFeedbackClassRec)); + if (!(*k)) + { + *k = xcalloc(1, sizeof(KbdFeedbackClassRec)); + if (!*k) + { + ErrorF("[Xi] Cannot alloc memory for class copy."); + return; + } + } (*k)->BellProc = it->BellProc; (*k)->CtrlProc = it->CtrlProc; (*k)->ctrl = it->ctrl; @@ -241,7 +249,15 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) p = &to->ptrfeed; for (it = from->ptrfeed; it; it = it->next) { - *p = xcalloc(1, sizeof(PtrFeedbackClassRec)); + if (!(*p)) + { + *p = xcalloc(1, sizeof(PtrFeedbackClassRec)); + if (!*p) + { + ErrorF("[Xi] Cannot alloc memory for class copy."); + return; + } + } (*p)->CtrlProc = it->CtrlProc; (*p)->ctrl = it->ctrl; /* XXX: xkb_sli needs to be copied */ @@ -256,7 +272,15 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) i = &to->intfeed; for (it = from->intfeed; it; it = it->next) { - *i = xcalloc(1, sizeof(IntegerFeedbackClassRec)); + if (!(*i)) + { + *i = xcalloc(1, sizeof(IntegerFeedbackClassRec)); + if (!(*i)) + { + ErrorF("[Xi] Cannot alloc memory for class copy."); + return; + } + } (*i)->CtrlProc = it->CtrlProc; (*i)->ctrl = it->ctrl; @@ -270,7 +294,15 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) s = &to->stringfeed; for (it = from->stringfeed; it; it = it->next) { - *s = xcalloc(1, sizeof(StringFeedbackClassRec)); + if (!(*s)) + { + *s = xcalloc(1, sizeof(StringFeedbackClassRec)); + if (!(*s)) + { + ErrorF("[Xi] Cannot alloc memory for class copy."); + return; + } + } (*s)->CtrlProc = it->CtrlProc; (*s)->ctrl = it->ctrl; @@ -284,7 +316,15 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) b = &to->bell; for (it = from->bell; it; it = it->next) { - *b = xcalloc(1, sizeof(BellFeedbackClassRec)); + if (!(*b)) + { + *b = xcalloc(1, sizeof(BellFeedbackClassRec)); + if (!(*b)) + { + ErrorF("[Xi] Cannot alloc memory for class copy."); + return; + } + } (*b)->BellProc = it->BellProc; (*b)->CtrlProc = it->CtrlProc; (*b)->ctrl = it->ctrl; @@ -299,7 +339,15 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) l = &to->leds; for (it = from->leds; it; it = it->next) { - *l = xcalloc(1, sizeof(LedFeedbackClassRec)); + if (!(*l)) + { + *l = xcalloc(1, sizeof(LedFeedbackClassRec)); + if (!(*l)) + { + ErrorF("[Xi] Cannot alloc memory for class copy."); + return; + } + } (*l)->CtrlProc = it->CtrlProc; (*l)->ctrl = it->ctrl; /* XXX: xkb_sli needs to be copied */ From 035b1b6995e670ce5593e8aceb08f9ec812c70ea Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 4 Apr 2008 15:00:06 +1030 Subject: [PATCH 365/634] Xi: remove duplicate copying of kbdfeed and ptrfeed. --- Xi/exevents.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 9c771a45b..b2403bc11 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -424,22 +424,6 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) ALLOC_COPY_CLASS_IF(proximity, ProximityClassRec); ALLOC_COPY_CLASS_IF(absolute, AbsoluteClassRec); - ALLOC_COPY_CLASS_IF(kbdfeed, KbdFeedbackClassRec); -#ifdef XKB - if (to->kbdfeed) - { - to->kbdfeed->xkb_sli = NULL; - /* XXX: XkbSrvLedInfo needs to be copied*/ - to->kbdfeed->next = NULL; - } -#endif - ALLOC_COPY_CLASS_IF(ptrfeed, PtrFeedbackClassRec); - if (to->ptrfeed) - { - to->ptrfeed->next = NULL; - } - - DeepCopyFeedbackClasses(from, to); } From 502689847b86be5619da7134646d55a1ac322a2c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 4 Apr 2008 15:01:53 +1030 Subject: [PATCH 366/634] Xi: ALLOC_COPY_CLASS_IF should only alloc if to->field doesn't exist. --- Xi/exevents.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index b2403bc11..c16b0c888 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -363,9 +363,12 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) #define ALLOC_COPY_CLASS_IF(field, type) \ if (from->field)\ { \ - to->field = xcalloc(1, sizeof(type)); \ if (!to->field) \ + { \ + to->field = xcalloc(1, sizeof(type)); \ + if (!to->field) \ FatalError("[Xi] no memory for class shift.\n"); \ + } \ memcpy(to->field, from->field, sizeof(type)); \ } From d0395a753079f291a78d9ab86810b5f84f237491 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 4 Apr 2008 15:05:26 +1030 Subject: [PATCH 367/634] Xi: realloc to->valuator instead of allocing it blindly. --- Xi/exevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index c16b0c888..5e72bae1c 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -385,7 +385,7 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) if (from->valuator) { ValuatorClassPtr v; - to->valuator = xalloc(sizeof(ValuatorClassRec) + + to->valuator = xrealloc(to->valuator, sizeof(ValuatorClassRec) + from->valuator->numAxes * sizeof(AxisInfo) + from->valuator->numAxes * sizeof(unsigned int)); v = to->valuator; From 8f38feb3e464986dc523dabd3447ba13263a3a4a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 5 Apr 2008 20:37:09 +1030 Subject: [PATCH 368/634] Xi: add comments for DeepCopyDeviceClasses, ChangeMasterDeviceClasses. --- Xi/exevents.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Xi/exevents.c b/Xi/exevents.c index 5e72bae1c..252256a70 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -357,6 +357,11 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) } } +/** + * Copies the CONTENT of the classes of device from into the classes in device + * to. From and to are identical after finishing. + */ + _X_EXPORT void DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) { @@ -430,6 +435,12 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) DeepCopyFeedbackClasses(from, to); } +/** + * Change MD to look like SD by copying all classes over. An event is sent to + * all interested clients. + * @param device The slave device + * @param dcce Pointer to the event struct. + */ static void ChangeMasterDeviceClasses(DeviceIntPtr device, deviceClassesChangedEvent *dcce) From 638a50552e3e2190eac9721deb72e7365bdd52e4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 6 Apr 2008 08:36:21 +0930 Subject: [PATCH 369/634] dix: remove debug error message about XI->core type conversion. --- dix/events.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/dix/events.c b/dix/events.c index 0b9b76884..6ecd90c08 100644 --- a/dix/events.c +++ b/dix/events.c @@ -305,8 +305,6 @@ XItoCoreType(int xitype) else if (xitype == DeviceKeyRelease) coretype = KeyRelease; - if (coretype == 0) - ErrorF("[dix] Cannot convert type %d to core.\n", xitype); return coretype; } From b46a00918691cbd5ca80b6d3acae7614f93e073b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 6 Apr 2008 09:02:57 +0930 Subject: [PATCH 370/634] dix: sprite may be NULL, don't dereference it then. In some rare cases (e.g. when the init fails) a device's sprite is NULL, dereferencing it to xfree the spriteTrace is a bad idea then. --- dix/devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index 61b3b66af..c4cde2660 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -873,7 +873,7 @@ CloseDevice(DeviceIntPtr dev) XkbRemoveResourceClient((DevicePtr)dev,dev->xkb_interest->resource); #endif - if (DevHasCursor(dev)) { + if (DevHasCursor(dev) && dev->spriteInfo->sprite) { xfree(dev->spriteInfo->sprite->spriteTrace); xfree(dev->spriteInfo->sprite); } From 6271df6953bea462be7e9e01744e5dd46841e867 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 8 Apr 2008 08:42:58 +0930 Subject: [PATCH 371/634] xkb: don't overwrite CtrlProc in the second run of XkbFinishDeviceInit. XkbFinishDeviceInit is called once when the device is initialised, but also when a class copy causes the key class of a device to change. In this case, overwriting the CtrlProc of the KeybdFeedbackClass with XkbDDXKeybdCtrlProc sets up a nice recursive loop of XkbDDXKeybdCtrlProc calling itself until the cows come home. --- xkb/xkbInit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c index ce5de077e..0d5d15ef3 100644 --- a/xkb/xkbInit.c +++ b/xkb/xkbInit.c @@ -726,7 +726,10 @@ XkbSrvLedInfoPtr sli; if (pXDev && pXDev->key && pXDev->key->xkbInfo && pXDev->kbdfeed) { xkbi= pXDev->key->xkbInfo; xkb= xkbi->desc; - if (pXDev->kbdfeed) { + /* If we come from DeepCopyDeviceClasses, the CtrlProc was already set + * to XkbDDXKeybdCtrlProc, overwriting it leads to happy recursion. + */ + if (pXDev->kbdfeed && pXDev->kbdfeed->CtrlProc != XkbDDXKeybdCtrlProc) { xkbi->kbdProc= pXDev->kbdfeed->CtrlProc; pXDev->kbdfeed->CtrlProc= XkbDDXKeybdCtrlProc; } From 32e4a88ae613c7200d84d5621344b418b656346b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 8 Apr 2008 08:42:58 +0930 Subject: [PATCH 372/634] xkb: don't overwrite CtrlProc in the second run of XkbFinishDeviceInit. XkbFinishDeviceInit is called once when the device is initialised, but also when a class copy causes the key class of a device to change. In this case, overwriting the CtrlProc of the KeybdFeedbackClass with XkbDDXKeybdCtrlProc sets up a nice recursive loop of XkbDDXKeybdCtrlProc calling itself until the cows come home. --- xkb/xkbInit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c index ce5de077e..0d5d15ef3 100644 --- a/xkb/xkbInit.c +++ b/xkb/xkbInit.c @@ -726,7 +726,10 @@ XkbSrvLedInfoPtr sli; if (pXDev && pXDev->key && pXDev->key->xkbInfo && pXDev->kbdfeed) { xkbi= pXDev->key->xkbInfo; xkb= xkbi->desc; - if (pXDev->kbdfeed) { + /* If we come from DeepCopyDeviceClasses, the CtrlProc was already set + * to XkbDDXKeybdCtrlProc, overwriting it leads to happy recursion. + */ + if (pXDev->kbdfeed && pXDev->kbdfeed->CtrlProc != XkbDDXKeybdCtrlProc) { xkbi->kbdProc= pXDev->kbdfeed->CtrlProc; pXDev->kbdfeed->CtrlProc= XkbDDXKeybdCtrlProc; } From 5ffbcfec3d37d3b627a78acfa00dbafc5948df82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Vigerl=C3=B6f?= Date: Tue, 8 Apr 2008 14:42:00 +0930 Subject: [PATCH 373/634] dix: Ensure Proximity events don't kill the server. Add Prox events to the if-clauses with the other events that are usually sent from the input devices. Ensure that the event deliverers won't try to deliver events of type '0' (some extended events doesn't have an equivalent core-type) Small modification by Peter Hutterer. Signed-off-by: Peter Hutterer --- dix/events.c | 36 ++++++++++++++++++++---------------- dix/getevents.c | 17 ++++++++++++++++- mi/mieq.c | 3 ++- 3 files changed, 38 insertions(+), 18 deletions(-) diff --git a/dix/events.c b/dix/events.c index 6ecd90c08..42ae3f1cb 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2513,7 +2513,7 @@ DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab, core = *xE; core.u.u.type = XItoCoreType(xE->u.u.type); - if (filter & pWin->deliverableEvents) + if (core.u.u.type && filter & pWin->deliverableEvents) { if ((wOtherEventMasks(pWin)|pWin->eventMask) & filter) { @@ -3562,6 +3562,8 @@ CheckDeviceGrabs(DeviceIntPtr device, xEvent *xE, { core = *xE; core.u.u.type = XItoCoreType(xE->u.u.type); + if(!core.u.u.type) /* probably a Proximity event, can't grab for those */ + return FALSE; } i = checkFirst; @@ -3651,7 +3653,7 @@ DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count) if (deliveries > 0) return; - if (sendCore) + if (sendCore && core.u.u.type) { FixUpEventFromWindow(keybd, &core, focus, None, FALSE); deliveries = DeliverEventsToWindow(keybd, focus, &core, 1, @@ -3734,20 +3736,22 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, { core = *xE; core.u.u.type = XItoCoreType(xE->u.u.type); - FixUpEventFromWindow(thisDev, &core, grab->window, - None, TRUE); - if (XaceHook(XACE_SEND_ACCESS, 0, thisDev, - grab->window, &core, 1) || - XaceHook(XACE_RECEIVE_ACCESS, rClient(grab), - grab->window, &count, 1)) - deliveries = 1; /* don't send, but pretend we did */ - else if (!IsInterferingGrab(rClient(grab), thisDev, - &core)) - { - deliveries = TryClientEvents(rClient(grab), thisDev, - &core, 1, mask, - filters[thisDev->id][core.u.u.type], - grab); + if(core.u.u.type) { + FixUpEventFromWindow(thisDev, &core, grab->window, + None, TRUE); + if (XaceHook(XACE_SEND_ACCESS, 0, thisDev, + grab->window, &core, 1) || + XaceHook(XACE_RECEIVE_ACCESS, rClient(grab), + grab->window, &count, 1)) + deliveries = 1; /* don't send, but pretend we did */ + else if (!IsInterferingGrab(rClient(grab), thisDev, + &core)) + { + deliveries = TryClientEvents(rClient(grab), thisDev, + &core, 1, mask, + filters[thisDev->id][core.u.u.type], + grab); + } } } diff --git a/dix/getevents.c b/dix/getevents.c index b73531816..037d68ceb 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -816,7 +816,8 @@ GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type, int first_valuator, int num_valuators, int *valuators) { int num_events = 1; - deviceKeyButtonPointer *kbp = (deviceKeyButtonPointer *) events->event; + deviceKeyButtonPointer *kbp; + DeviceIntPtr master; /* Sanity checks. */ if (type != ProximityIn && type != ProximityOut) @@ -840,6 +841,20 @@ GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type, (num_valuators + first_valuator) > pDev->valuator->numAxes) return 0; + master = pDev->u.master; + if (master && master->u.lastSlave != pDev) + { + CreateClassesChangedEvent(events, master, pDev); + + pDev->lastx = master->lastx; + pDev->lasty = master->lasty; + master->u.lastSlave = pDev; + + num_events++; + events++; + } + + kbp = (deviceKeyButtonPointer *) events->event; kbp->type = type; kbp->deviceid = pDev->id; kbp->detail = 0; diff --git a/mi/mieq.c b/mi/mieq.c index a15b24f29..2759d165a 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -239,7 +239,8 @@ ChangeDeviceID(DeviceIntPtr dev, xEvent* event) if (type == DeviceKeyPress || type == DeviceKeyRelease || type == DeviceButtonPress || type == DeviceButtonRelease || - type == DeviceMotionNotify) + type == DeviceMotionNotify || type == ProximityIn || + type == ProximityOut) ((deviceKeyButtonPointer*)event)->deviceid = dev->id; else if (type == DeviceValuator) ((deviceValuator*)event)->deviceid = dev->id; From ea05cf0813b2b7c8cd2151cb935820753ae7997a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 8 Apr 2008 22:09:11 +0930 Subject: [PATCH 374/634] Xi: check if source has a key class before copying. --- Xi/exevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 225d3e524..757d57a23 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -378,7 +378,7 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) } ALLOC_COPY_CLASS_IF(key, KeyClassRec); - if (to->key) + if (to->key && from->key) { #ifdef XKB to->key->xkbInfo = NULL; From 60c38d248c1a89392c2c6695c3802f4b54e4c00b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 9 Apr 2008 07:46:53 +0930 Subject: [PATCH 375/634] Xi: plug memory leak, free previous motion history before allocating new. --- Xi/exevents.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Xi/exevents.c b/Xi/exevents.c index 757d57a23..4c967b212 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -390,6 +390,8 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) if (from->valuator) { ValuatorClassPtr v; + if (to->valuator) + xfree(to->valuator->motion); to->valuator = xrealloc(to->valuator, sizeof(ValuatorClassRec) + from->valuator->numAxes * sizeof(AxisInfo) + from->valuator->numAxes * sizeof(unsigned int)); From 389dae73cc0f3693f49807fd2de146c454ba9783 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 9 Apr 2008 08:26:00 +0930 Subject: [PATCH 376/634] Xi: If device "to" has a class but "from" doesn't, free the class in "to". --- Xi/exevents.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/Xi/exevents.c b/Xi/exevents.c index 4c967b212..f28952fdc 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -241,6 +241,9 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) k = &(*k)->next; } + } else if (to->kbdfeed && !from->kbdfeed) + { + FreeFeedbackClass(KbdFeedbackClass, (pointer)&to->kbdfeed); } if (from->ptrfeed) @@ -264,6 +267,9 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) p = &(*p)->next; } + } else if (to->ptrfeed && !from->ptrfeed) + { + FreeFeedbackClass(PtrFeedbackClass, (pointer)&to->ptrfeed); } if (from->intfeed) @@ -286,6 +292,9 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) i = &(*i)->next; } + } else if (to->intfeed && !from->intfeed) + { + FreeFeedbackClass(IntegerFeedbackClass, (pointer)&to->intfeed); } if (from->stringfeed) @@ -308,6 +317,9 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) s = &(*s)->next; } + } else if (to->stringfeed && !from->stringfeed) + { + FreeFeedbackClass(StringFeedbackClass, (pointer)&to->stringfeed); } if (from->bell) @@ -331,6 +343,9 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) b = &(*b)->next; } + } else if (to->bell && !from->bell) + { + FreeFeedbackClass(BellFeedbackClass, (pointer)&to->bell); } if (from->leds) @@ -354,6 +369,9 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) l = &(*l)->next; } + } else if (to->leds && !from->leds) + { + FreeFeedbackClass(LedFeedbackClass, (pointer)&to->leds); } } @@ -385,6 +403,9 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) #endif to->key->curKeySyms.map = NULL; CopyKeyClass(from, to); + } else if (to->key && !from->key) + { + FreeDeviceClass(KeyClass, (pointer)&to->key); } if (from->valuator) @@ -406,6 +427,9 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) memcpy(v->axes, from->valuator->axes, v->numAxes * sizeof(AxisInfo)); v->axisVal = (int*)(v->axes + from->valuator->numAxes); + } else if (to->valuator && !from->valuator) + { + FreeDeviceClass(ValuatorClass, (pointer)&to->valuator); } ALLOC_COPY_CLASS_IF(button, ButtonClassRec); @@ -429,10 +453,28 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) to->button->xkb_acts = NULL; /* XXX: XkbAction needs to be copied */ #endif + } else if (to->button && !from->button) + { + FreeDeviceClass(ButtonClass, (pointer)&to->button); } + + ALLOC_COPY_CLASS_IF(focus, FocusClassRec); + if (to->focus && !from->focus) + { + FreeDeviceClass(FocusClass, (pointer)&to->focus); + } ALLOC_COPY_CLASS_IF(proximity, ProximityClassRec); + if (to->proximity && !from->proximity) + { + FreeDeviceClass(ProximityClass, (pointer)&to->proximity); + } ALLOC_COPY_CLASS_IF(absolute, AbsoluteClassRec); + if (to->absolute && !from->absolute) + { + xfree(to->absolute); + to->absolute = NULL; + } DeepCopyFeedbackClasses(from, to); } From e7211eb0b3d10323dab681bcb18580405ea18ab2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 10 Apr 2008 08:08:54 +0930 Subject: [PATCH 377/634] Xi: When attaching, check for ptr -> ptr and keybd -> keybd. Some pointer devices have key classes (e.g. MS Optical Desktop 2000). The previous test was performed as Error if ptr -> keybd or keybd -> ptr. This doesnt work with such devices. New test is Succeed if ptr->ptr or keybd->keybd. --- Xi/chdevhier.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Xi/chdevhier.c b/Xi/chdevhier.c index e9a5076a9..36797d90c 100644 --- a/Xi/chdevhier.c +++ b/Xi/chdevhier.c @@ -272,10 +272,10 @@ ProcXChangeDeviceHierarchy(ClientPtr client) goto unwind; } - if ((IsPointerDevice(newmaster) && - !IsPointerDevice(ptr)) || + if (!((IsPointerDevice(newmaster) && + IsPointerDevice(ptr)) || (IsKeyboardDevice(newmaster) && - !IsKeyboardDevice(ptr))) + IsKeyboardDevice(ptr)))) { rc = BadDevice; goto unwind; From 8e0a6529303a52acc10905dd47c72a0d60979676 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 10 Apr 2008 08:25:36 +0930 Subject: [PATCH 378/634] dix: When floating, set sprite to NULL before calling InitializeSprite. InitializeSprite won't create a new one if it already exists, with the result of overwriting the master's sprite. This master sprite is then assigned to the floating slave, and freed when the slave is reattached later. Setting the sprite to NULL forces InitializeSprite to alloc a new one, and this one can be freed without further repercussions. --- dix/devices.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index c4cde2660..df194de17 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2506,7 +2506,7 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) return Success; /* free the existing sprite. */ - if (!dev->u.master && dev->spriteInfo->sprite) + if (!dev->u.master && dev->spriteInfo->paired == dev) xfree(dev->spriteInfo->sprite); oldmaster = dev->u.master; @@ -2515,15 +2515,22 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) /* If device is set to floating, we need to create a sprite for it, * otherwise things go bad. However, we don't want to render the cursor, * so we reset spriteOwner. + * Sprite has to be forced to NULL first, otherwise InitializeSprite won't + * alloc new memory but overwrite the previous one. */ if (!master) { - /* current root window */ - InitializeSprite(dev, dev->spriteInfo->sprite->spriteTrace[0]); + WindowPtr currentRoot = dev->spriteInfo->sprite->spriteTrace[0]; + dev->spriteInfo->sprite = NULL; + InitializeSprite(dev, currentRoot); dev->spriteInfo->spriteOwner = FALSE; - + dev->spriteInfo->paired = dev; } else + { dev->spriteInfo->sprite = master->spriteInfo->sprite; + dev->spriteInfo->paired = master; + dev->spriteInfo->spriteOwner = FALSE; + } /* If we were connected to master device before, this MD may need to * change back to it's original classes. From 5a4c6621aaf4e886f2c3b633e837ba359fedf921 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 10 Apr 2008 08:29:05 +0930 Subject: [PATCH 379/634] Xi: some extra checks for validity of kbd and mouse. Floating SDs are paired with themselves, so the paired device may not be a proper keyboard or mouse. Put some extra checks in to avoid dereferencing a nullpointer later. --- Xi/exevents.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Xi/exevents.c b/Xi/exevents.c index f28952fdc..38f6cb57a 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -730,11 +730,15 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) { kbd = GetPairedDevice(device); mouse = device; + if (!kbd->key) /* can happen with floating SDs */ + kbd = NULL; } else { mouse = GetPairedDevice(device); kbd = device; + if (!mouse->valuator || !mouse->button) /* may be float. SDs */ + mouse = NULL; } xE->u.keyButtonPointer.state = (kbd) ? (kbd->key->state) : 0; xE->u.keyButtonPointer.state |= (mouse) ? (mouse->button->state) : 0; From df2545b98d888924209cb889a68737c15f1aa209 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 10 Apr 2008 08:50:43 +0930 Subject: [PATCH 380/634] xfree86: Sanity check before retrieving the paired device. Some pointer devices send key events [1], blindly getting the paired device crashes the server. So let's check if the device is a pointer before we try to get the paired device. [1] The MS Wireless Optical Desktop 2000's multimedia keys are sent through the pointer device, not through the keyboard device. --- hw/xfree86/common/xf86Xinput.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index d8e23ee8d..c2dd6004b 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -722,7 +722,10 @@ xf86PostKeyboardEvent(DeviceIntPtr device, int index; #if XFreeXDGA - DeviceIntPtr pointer = GetPairedDevice(device); + DeviceIntPtr pointer; + + /* Some pointers send key events, paired device is wrong then. */ + pointer = IsPointerDevice(device) ? device : GetPairedDevice(device); if (miPointerGetScreen(pointer)) { index = miPointerGetScreen(pointer)->myNum; From cc7dab2d04da4ca164eeec1a3296df1706585466 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 10 Apr 2008 09:58:50 +0930 Subject: [PATCH 381/634] dix: Dont deliver grabbed pointer events to a focus window. If an pointer event is being processed during a device grab, don't deliver it to the focus window, even if the device has a focus class. Reason being that some pointers may have a focus class, thus killing drag-and-drop. --- dix/events.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dix/events.c b/dix/events.c index 6ecd90c08..a2a0c1a67 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3686,7 +3686,18 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, { WindowPtr focus; - if (thisDev->focus) + /* Hack: Some pointer device have a focus class. So we need to check + * for the type of event, to see if we really want to deliver it to + * the focus window. For pointer events, the answer is no. + */ + if (xE->u.u.type == DeviceButtonPress || + xE->u.u.type == DeviceButtonRelease || + xE->u.u.type == DeviceMotionNotify || + xE->u.u.type == ProximityIn || + xE->u.u.type == ProximityOut) + { + focus = PointerRootWin; + } else if (thisDev->focus) { focus = thisDev->focus->win; if (focus == FollowKeyboardWin) From bce6091c6b04ff2db704ae4f161179d21dcbec59 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 10 Apr 2008 09:59:45 +0930 Subject: [PATCH 382/634] dix: Extend IsKeyboardDevice() to not include pointer devices. If a pointer devices has key classes as well, don't register it as a keyboard device. Let's see how much that change will break. --- dix/events.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dix/events.c b/dix/events.c index a2a0c1a67..305502ac9 100644 --- a/dix/events.c +++ b/dix/events.c @@ -331,11 +331,14 @@ IsPointerDevice(DeviceIntPtr dev) /* * Return true if a device is a keyboard, check is the same as used by XI to * fill the 'use' field. + * + * Some pointer devices have keys as well (e.g. multimedia keys). Try to not + * count them as keyboard devices. */ _X_EXPORT Bool IsKeyboardDevice(DeviceIntPtr dev) { - return (dev->key && dev->kbdfeed); + return (dev->key && dev->kbdfeed) && !IsPointerDevice(dev);; } #ifdef XEVIE From 48249425275cc90242497aee9968e5f1ffc86698 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 10 Apr 2008 14:36:10 +0930 Subject: [PATCH 383/634] Xi: dont copy FocusClassRec if the master already has one. Blindly copying will override the focus setting of the master. If there's XI applications running, they may set the SD focus, while leaving the MD's focus as it was. In this case, after a class swap we still want to get the MD's events to the same window as before. --- Xi/exevents.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 38f6cb57a..ba7f3b2bb 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -459,11 +459,29 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) } - ALLOC_COPY_CLASS_IF(focus, FocusClassRec); - if (to->focus && !from->focus) + /* We can't just copy over the focus class. When an app sets the focus, + * it'll do so on the master device. Copying the SDs focus means losing + * the focus. + * So we only copy the focus class if the device didn't have one, + * otherwise we leave it as it is. + */ + if (from->focus) { - FreeDeviceClass(FocusClass, (pointer)&to->focus); + if (!to->focus) + { + to->focus = xcalloc(1, sizeof(FocusClassRec)); + if (!to->focus) + FatalError("[Xi] no memory for class shift.\n"); + memcpy(to->focus->trace, from->focus->trace, + from->focus->traceSize * sizeof(WindowPtr)); + } + } else if (to->focus) + { + /* properly freeing the class would also free the sprite trace, which + * is still in use by the SD. just xfree the struct. */ + xfree(to->focus); } + ALLOC_COPY_CLASS_IF(proximity, ProximityClassRec); if (to->proximity && !from->proximity) { From a88386ee277d136caaaeec305f8753f23f9b6274 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 10 Apr 2008 14:36:57 +0930 Subject: [PATCH 384/634] Xi: only DeliverFocusedEvents if the event is not a pointer event. A pointer device may have a focus class, but even if so, pointer events must be delivered to the sprite window, not the focus window. --- Xi/exevents.c | 28 +++++++++++++++++++++++++++- dix/events.c | 4 ++-- include/dix.h | 1 + 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index ba7f3b2bb..a93fef452 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -104,6 +104,32 @@ RegisterOtherDevice(DeviceIntPtr device) device->public.realInputProc = ProcessOtherEvent; } +_X_EXPORT Bool +IsPointerEvent(xEvent* xE) +{ + switch(xE->u.u.type) + { + case ButtonPress: + case ButtonRelease: + case MotionNotify: + case EnterNotify: + case LeaveNotify: + return TRUE; + default: + if (xE->u.u.type == DeviceButtonPress || + xE->u.u.type == DeviceButtonRelease || + xE->u.u.type == DeviceMotionNotify || + xE->u.u.type == DeviceEnterNotify || + xE->u.u.type == DeviceLeaveNotify || + xE->u.u.type == ProximityIn || + xE->u.u.type == ProximityOut) + { + return TRUE; + } + } + return FALSE; +} + /** * Copy the device->key into master->key and send a mapping notify to the * clients if appropriate. @@ -830,7 +856,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) if (grab) DeliverGrabbedEvent(xE, device, deactivateDeviceGrab, count); - else if (device->focus) + else if (device->focus && !IsPointerEvent(xE)) DeliverFocusedEvent(device, xE, GetSpriteWindow(device), count); else DeliverDeviceEvents(GetSpriteWindow(device), xE, NullGrab, NullWindow, diff --git a/dix/events.c b/dix/events.c index 305502ac9..144591469 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1397,7 +1397,7 @@ ComputeFreezes(void) replayDev->spriteInfo->sprite->spriteTrace[i]) { if (!CheckDeviceGrabs(replayDev, xE, i+1, count)) { - if (replayDev->focus) + if (replayDev->focus && !IsPointerEvent(xE)) DeliverFocusedEvent(replayDev, xE, w, count); else DeliverDeviceEvents(w, xE, NullGrab, NullWindow, @@ -1407,7 +1407,7 @@ ComputeFreezes(void) } } /* must not still be in the same stack */ - if (replayDev->focus) + if (replayDev->focus && !IsPointerEvent(xE)) DeliverFocusedEvent(replayDev, xE, w, count); else DeliverDeviceEvents(w, xE, NullGrab, NullWindow, replayDev, count); diff --git a/include/dix.h b/include/dix.h index e00df29a2..57ffee9b9 100644 --- a/include/dix.h +++ b/include/dix.h @@ -615,6 +615,7 @@ extern int XItoCoreType(int xi_type); extern Bool DevHasCursor(DeviceIntPtr pDev); extern Bool IsPointerDevice( DeviceIntPtr dev); extern Bool IsKeyboardDevice(DeviceIntPtr dev); +extern Bool IsPointerEvent(xEvent* xE); /* * These are deprecated compatibility functions and will be removed soon! From 04dff74ffdf727015e3721aae4ea13acc498cd1c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 10 Apr 2008 19:22:59 +0930 Subject: [PATCH 385/634] dix: Rework Enter/Leave semaphore system. Instead of a simple counter, use bits to keep track of which device is where etc. When device enters a window (or sets focus), the bit matching the device is set, when it leaves again, it is unset. If there are 0 bits set, then Leave/Enter/Focus events may be sent to the client. Same theory as before, but this should get around the insanity with Grab/Ungrab special cases. Those cases are basically untested though. --- dix/devices.c | 3 +- dix/events.c | 124 ++++++++++++++++++++++++-------------------- dix/window.c | 2 + include/input.h | 35 +++++++++++++ include/windowstr.h | 12 +++-- 5 files changed, 114 insertions(+), 62 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index df194de17..2d7885e28 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -224,8 +224,7 @@ EnableDevice(DeviceIntPtr dev) if (dev->spriteInfo->spriteOwner) { InitializeSprite(dev, WindowTable[0]); - ((FocusSemaphoresPtr)dixLookupPrivate(&(WindowTable[0])->devPrivates, - FocusPrivatesKey))->enterleave++; + ENTER_LEAVE_SEMAPHORE_SET(WindowTable[0], dev); } else if ((other = NextFreePointerDevice()) == NULL) { diff --git a/dix/events.c b/dix/events.c index 144591469..1b62db05f 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4393,7 +4393,7 @@ EnterLeaveEvent( GrabPtr grab = mouse->deviceGrab.grab; GrabPtr devgrab = mouse->deviceGrab.grab; Mask mask; - int* inWindow; /* no of sprites inside pWin */ + int inWindow; /* zero if no sprites are in window */ Bool sendevent = FALSE; deviceEnterNotify *devEnterLeave; @@ -4446,7 +4446,6 @@ EnterLeaveEvent( IsParent(focus, pWin))) event.u.enterLeave.flags |= ELFlagFocus; - inWindow = &((FocusSemaphoresPtr)dixLookupPrivate(&pWin->devPrivates, FocusPrivatesKey))->enterleave; /* * Sending multiple core enter/leave events to the same window confuse the @@ -4472,16 +4471,15 @@ EnterLeaveEvent( * NotifyNonlinearVirtual to C and nothing to B. */ - if (event.u.u.detail != NotifyVirtual && - event.u.u.detail != NotifyNonlinearVirtual) - { - if (((*inWindow) == (LeaveNotify - type))) - sendevent = TRUE; - } else - { - if (!(*inWindow)) - sendevent = TRUE; - } + /* Clear bit for device, but don't worry about SDs. */ + if (mouse->isMaster && type == LeaveNotify && + (mode != NotifyVirtual && mode != NotifyNonlinearVirtual)) + ENTER_LEAVE_SEMAPHORE_UNSET(pWin, mouse); + + inWindow = EnterLeaveSemaphoresIsset(pWin); + + if (!inWindow) + sendevent = TRUE; if ((mask & filters[mouse->id][type]) && sendevent) { @@ -4493,6 +4491,10 @@ EnterLeaveEvent( filters[mouse->id][type], NullGrab, 0); } + if (mouse->isMaster && type == EnterNotify && + (mode != NotifyVirtual && mode != NotifyNonlinearVirtual)) + ENTER_LEAVE_SEMAPHORE_SET(pWin, mouse); + /* we don't have enough bytes, so we squash flags and mode into one byte, and use the last byte for the deviceid. */ devEnterLeave = (deviceEnterNotify*)&event; @@ -4582,25 +4584,6 @@ LeaveNotifies(DeviceIntPtr pDev, } } -/* welcome to insanity */ -#define FOCUS_SEMAPHORE_MODIFY(win, field, mode, val) \ -{ \ - FocusSemaphoresPtr sem;\ - sem = (FocusSemaphoresPtr)dixLookupPrivate(&win->devPrivates, FocusPrivatesKey); \ - if (mode != NotifyGrab && mode != NotifyUngrab) { \ - sem->field += val; \ - } else if (mode == NotifyUngrab) { \ - if (sem->field == 0 && val > 0) \ - sem->field += val; \ - else if (sem->field == 1 && val < 0) \ - sem->field += val; \ - } \ -} -#define ENTER_LEAVE_SEMAPHORE_UP(win, mode) \ - FOCUS_SEMAPHORE_MODIFY(win, enterleave, mode, 1); - -#define ENTER_LEAVE_SEMAPHORE_DOWN(win, mode) \ - FOCUS_SEMAPHORE_MODIFY(win, enterleave, mode, -1); /** @@ -4620,33 +4603,27 @@ DoEnterLeaveEvents(DeviceIntPtr pDev, return; if (IsParent(fromWin, toWin)) { - ENTER_LEAVE_SEMAPHORE_DOWN(fromWin, mode); EnterLeaveEvent(pDev, LeaveNotify, mode, NotifyInferior, fromWin, None); EnterNotifies(pDev, fromWin, toWin, mode, NotifyVirtual); - ENTER_LEAVE_SEMAPHORE_UP(toWin, mode); EnterLeaveEvent(pDev, EnterNotify, mode, NotifyAncestor, toWin, None); } else if (IsParent(toWin, fromWin)) { - ENTER_LEAVE_SEMAPHORE_DOWN(fromWin, mode); EnterLeaveEvent(pDev, LeaveNotify, mode, NotifyAncestor, fromWin, None); LeaveNotifies(pDev, fromWin, toWin, mode, NotifyVirtual); - ENTER_LEAVE_SEMAPHORE_UP(toWin, mode); EnterLeaveEvent(pDev, EnterNotify, mode, NotifyInferior, toWin, None); } else { /* neither fromWin nor toWin is descendent of the other */ WindowPtr common = CommonAncestor(toWin, fromWin); /* common == NullWindow ==> different screens */ - ENTER_LEAVE_SEMAPHORE_DOWN(fromWin, mode); EnterLeaveEvent(pDev, LeaveNotify, mode, NotifyNonlinear, fromWin, None); LeaveNotifies(pDev, fromWin, common, mode, NotifyNonlinearVirtual); EnterNotifies(pDev, common, toWin, mode, NotifyNonlinearVirtual); - ENTER_LEAVE_SEMAPHORE_UP(toWin, mode); EnterLeaveEvent(pDev, EnterNotify, mode, NotifyNonlinear, toWin, None); } @@ -4656,7 +4633,7 @@ static void FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) { xEvent event; - int* numFoci; /* no of foci the window has already */ + int numFoci; /* zero if no device has focus on window */ Bool sendevent = FALSE; if (dev != inputInfo.keyboard) @@ -4690,25 +4667,18 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) * NotifyNonlinearVirtual to C and nothing to B. */ - numFoci = - &((FocusSemaphoresPtr)dixLookupPrivate(&pWin->devPrivates, - FocusPrivatesKey))->focusinout; - if (mode == NotifyGrab || mode == NotifyUngrab) + if (dev->isMaster && type == FocusOut && + (detail != NotifyVirtual && + detail != NotifyNonlinearVirtual && + detail != NotifyPointer && + detail != NotifyPointerRoot && + detail != NotifyDetailNone)) + FOCUS_SEMAPHORE_UNSET(pWin, dev); + + numFoci = FocusSemaphoresIsset(pWin); + + if (!numFoci) sendevent = TRUE; - else if (detail != NotifyVirtual && - detail != NotifyNonlinearVirtual && - detail != NotifyPointer && - detail != NotifyPointerRoot && - detail != NotifyDetailNone) - { - (type == FocusIn) ? (*numFoci)++ : (*numFoci)--; - if (((*numFoci) == (FocusOut - type))) - sendevent = TRUE; - } else - { - if (!(*numFoci)) - sendevent = TRUE; - } if (sendevent) { @@ -4733,6 +4703,14 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) KeymapStateMask, NullGrab, 0); } } + + if (dev->isMaster && type == FocusIn && + (detail != NotifyVirtual && + detail != NotifyNonlinearVirtual && + detail != NotifyPointer && + detail != NotifyPointerRoot && + detail != NotifyDetailNone)) + FOCUS_SEMAPHORE_SET(pWin, dev); } /* @@ -6616,3 +6594,37 @@ ExtGrabDevice(ClientPtr client, return GrabSuccess; } +/* + * @return Zero if no device is currently in window, non-zero otherwise. + */ +int +EnterLeaveSemaphoresIsset(WindowPtr win) +{ + FocusSemaphoresPtr sem; + int set = 0; + int i; + + sem = (FocusSemaphoresPtr)dixLookupPrivate(&win->devPrivates, FocusPrivatesKey); + for (i = 0; i < (MAX_DEVICES + 7)/8; i++) + set += sem->enterleave[i]; + + return set; +} + +/* + * @return Zero if no devices has focus on the window, non-zero otherwise. + */ +int +FocusSemaphoresIsset(WindowPtr win) +{ + FocusSemaphoresPtr sem; + int set = 0; + int i; + + sem = (FocusSemaphoresPtr)dixLookupPrivate(&win->devPrivates, FocusPrivatesKey); + for (i = 0; i < (MAX_DEVICES + 7)/8; i++) + set += sem->focusinout[i]; + + return set; +} + diff --git a/dix/window.c b/dix/window.c index ee4c75649..d3160c903 100644 --- a/dix/window.c +++ b/dix/window.c @@ -366,6 +366,7 @@ CreateRootWindow(ScreenPtr pScreen) WindowPtr pWin; BoxRec box; PixmapFormatRec *format; + FocusSemaphoresPtr sem; pWin = (WindowPtr)xalloc(sizeof(WindowRec)); if (!pWin) @@ -484,6 +485,7 @@ CreateRootWindow(ScreenPtr pScreen) if (disableSaveUnders) pScreen->saveUnderSupport = NotUseful; + return TRUE; } diff --git a/include/input.h b/include/input.h index 9ba12db79..0c993eed0 100644 --- a/include/input.h +++ b/include/input.h @@ -80,6 +80,39 @@ SOFTWARE. #define RevertToFollowKeyboard 3 #endif +/* Used for enter/leave and focus in/out semaphores */ +#define SEMAPHORE_FIELD_SET(win, dev, field) \ +{ \ + FocusSemaphoresPtr sem; \ + sem = (FocusSemaphoresPtr)dixLookupPrivate(&win->devPrivates, FocusPrivatesKey); \ + sem->field[dev->id/8] |= (1 << (dev->id % 8)); \ +} + +#define SEMAPHORE_FIELD_UNSET(win, dev, field) \ +{ \ + FocusSemaphoresPtr sem; \ + sem = (FocusSemaphoresPtr)dixLookupPrivate(&win->devPrivates, FocusPrivatesKey); \ + sem->field[dev->id/8] &= ~(1 << (dev->id % 8)); \ +} + +#define ENTER_LEAVE_SEMAPHORE_SET(win, dev) \ + SEMAPHORE_FIELD_SET(win, dev, enterleave); + +#define ENTER_LEAVE_SEMAPHORE_UNSET(win, dev) \ + SEMAPHORE_FIELD_UNSET(win, dev, enterleave); + +#define ENTER_LEAVE_SEMAPHORE_ISSET(win, dev) \ + ((FocusSemaphoresPtr)dixLookupPrivate(&win->devPrivates, FocusPrivatesKey))->enterleave[dev->id/8] & (1 << (dev->id % 8)) + +#define FOCUS_SEMAPHORE_SET(win, dev) \ + SEMAPHORE_FIELD_SET(win, dev, focusinout); + +#define FOCUS_SEMAPHORE_UNSET(win, dev) \ + SEMAPHORE_FIELD_UNSET(win, dev, focusinout); + +#define FOCUS_SEMAPHORE_ISSET(win, dev) \ + ((FocusSemaphoresPtr)dixLookupPrivate(&win->devPrivates, FocusPrivatesKey))->focusinout[dev->id/8] & (1 << (dev->id % 8)) + typedef unsigned long Leds; typedef struct _OtherClients *OtherClientsPtr; typedef struct _InputClients *InputClientsPtr; @@ -488,6 +521,8 @@ extern void DeepCopyDeviceClasses(DeviceIntPtr from, extern void FreeDeviceClass(int type, pointer* class); extern void FreeFeedbackClass(int type, pointer* class); extern void FreeAllDeviceClasses(ClassesPtr classes); +extern int EnterLeaveSemaphoresIsset(WindowPtr win); +extern int FocusSemaphoresIsset(WindowPtr win); /* Window/device based access control */ extern Bool ACRegisterClient(ClientPtr client); diff --git a/include/windowstr.h b/include/windowstr.h index 406087e17..a36dc2972 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -59,6 +59,7 @@ SOFTWARE. #include "miscstruct.h" #include #include "opaque.h" +#include "inputstr.h" #define GuaranteeNothing 0 #define GuaranteeVisBack 1 @@ -257,11 +258,14 @@ extern ScreenSaverStuffRec savedScreenInfo[MAXSCREENS]; extern DevPrivateKey FocusPrivatesKey; /* Used to maintain semantics of core protocol for Enter/LeaveNotifies and - * FocusIn/Out events for multiple pointers/keyboards. - */ + * FocusIn/Out events for multiple pointers/keyboards. + * + * Each device ID corresponds to one bit. If set, the device is in the + * window/has focus. + */ typedef struct _FocusSemaphores { - int enterleave; - int focusinout; + char enterleave[(MAX_DEVICES + 7)/8]; + char focusinout[(MAX_DEVICES + 7)/8]; } FocusSemaphoresRec, *FocusSemaphoresPtr; /* From b4380d8030927c940ddaea83c4cf24e0b9eb7b96 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 10 Apr 2008 19:25:43 +0930 Subject: [PATCH 386/634] dix: don't free MDs classes on init. The device classes aren't deleted anymore on a class change, so there's no need to store the MD's original classes. We should however restore the MD to sane defaults when disconnecting the last device, consider this as TODO item. --- dix/devices.c | 103 +------------------------------------------------- 1 file changed, 1 insertion(+), 102 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 2d7885e28..a78a1255d 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -88,8 +88,6 @@ SOFTWARE. /* The client that is allowed to change pointer-keyboard pairings. */ static ClientPtr pairingClient = NULL; - -DevPrivateKey MasterDevClassesPrivateKey = &MasterDevClassesPrivateKey; DevPrivateKey CoreDevicePrivateKey = &CoreDevicePrivateKey; /** @@ -409,7 +407,6 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what) XkbComponentNamesRec names; #endif ClassesPtr classes; - DeviceIntRec dummy; switch (what) { case DEVICE_INIT: @@ -419,8 +416,6 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what) return BadAlloc; } - dixSetPrivate(&pDev->devPrivates, MasterDevClassesPrivateKey, NULL); - keySyms.minKeyCode = 8; keySyms.maxKeyCode = 255; keySyms.mapWidth = 4; @@ -459,53 +454,9 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what) xfree(keySyms.map); xfree(modMap); - - classes->key = pDev->key; - classes->valuator = pDev->valuator; - classes->button = pDev->button; - classes->focus = pDev->focus; - classes->proximity = pDev->proximity; - classes->absolute = pDev->absolute; - classes->kbdfeed = pDev->kbdfeed; - classes->ptrfeed = pDev->ptrfeed; - classes->intfeed = pDev->intfeed; - classes->stringfeed = pDev->stringfeed; - classes->bell = pDev->bell; - classes->leds = pDev->leds; - - /* Each time we switch classes we free the MD's classes and copy the - * SD's classes into the MD. We mustn't lose the first set of classes - * though as we need it to restore them when the last SD disconnects. - * - * So we create a fake device, seem to copy from the fake to the real - * one, thus ending up with a copy of the original ones in our MD. - * - * If we don't do that, we're in SIGABRT territory (double-frees, etc) - */ - memcpy(&dummy, pDev, sizeof(DeviceIntRec)); - /* Need to set them to NULL. Otherwise, Xkb does some weird stuff and - * the dev->key->xkbInfo->kbdProc starts calling itself. This can - * probably be fixed in a better way, but I don't know how. (whot) */ - pDev->key = NULL; - pDev->valuator = NULL; - pDev->button = NULL; - pDev->focus = NULL; - pDev->proximity = NULL; - pDev->absolute = NULL; - pDev->kbdfeed = NULL; - pDev->ptrfeed = NULL; - pDev->intfeed = NULL; - pDev->stringfeed = NULL; - pDev->bell = NULL; - pDev->leds = NULL; - DeepCopyDeviceClasses(&dummy, pDev); - - dixSetPrivate(&pDev->devPrivates, MasterDevClassesPrivateKey, - classes); break; case DEVICE_CLOSE: - dixSetPrivate(&pDev->devPrivates, CoreDevicePrivateKey, NULL); break; default: @@ -526,16 +477,12 @@ CorePointerProc(DeviceIntPtr pDev, int what) BYTE map[33]; int i = 0; ClassesPtr classes; - DeviceIntRec dummy; - switch (what) { case DEVICE_INIT: if (!(classes = xcalloc(1, sizeof(ClassesRec)))) return BadAlloc; - dixSetPrivate(&pDev->devPrivates, MasterDevClassesPrivateKey, NULL); - for (i = 1; i <= 32; i++) map[i] = i; InitPointerDeviceStruct((DevicePtr)pDev, map, 32, @@ -545,43 +492,9 @@ CorePointerProc(DeviceIntPtr pDev, int what) pDev->lastx = pDev->valuator->axisVal[0]; pDev->valuator->axisVal[1] = screenInfo.screens[0]->height / 2; pDev->lasty = pDev->valuator->axisVal[1]; - - classes->key = pDev->key; - classes->valuator = pDev->valuator; - classes->button = pDev->button; - classes->focus = pDev->focus; - classes->proximity = pDev->proximity; - classes->absolute = pDev->absolute; - classes->kbdfeed = pDev->kbdfeed; - classes->ptrfeed = pDev->ptrfeed; - classes->intfeed = pDev->intfeed; - classes->stringfeed = pDev->stringfeed; - classes->bell = pDev->bell; - classes->leds = pDev->leds; - - /* See comment in CoreKeyboardProc. */ - memcpy(&dummy, pDev, sizeof(DeviceIntRec)); - /* Need to set them to NULL for the VCK (see CoreKeyboardProc). Not - * sure if also necessary for the VCP, but it doesn't seem to hurt */ - pDev->key = NULL; - pDev->valuator = NULL; - pDev->button = NULL; - pDev->focus = NULL; - pDev->proximity = NULL; - pDev->absolute = NULL; - pDev->kbdfeed = NULL; - pDev->ptrfeed = NULL; - pDev->intfeed = NULL; - pDev->stringfeed = NULL; - pDev->bell = NULL; - pDev->leds = NULL; - DeepCopyDeviceClasses(&dummy, pDev); - - dixSetPrivate(&pDev->devPrivates, MasterDevClassesPrivateKey, classes); break; case DEVICE_CLOSE: - dixSetPrivate(&pDev->devPrivates, CoreDevicePrivateKey, NULL); break; default: @@ -857,13 +770,6 @@ CloseDevice(DeviceIntPtr dev) xfree(dev->name); - if (dev->isMaster) - { - classes = (ClassesPtr)dixLookupPrivate(&dev->devPrivates, - MasterDevClassesPrivateKey); - FreeAllDeviceClasses(classes); - } - classes = (ClassesPtr)&dev->key; FreeAllDeviceClasses(classes); @@ -2543,16 +2449,9 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) if (!it) /* no dev is paired with old master */ { - ClassesPtr classes; + /* XXX: reset to defaults */ EventList event = { NULL, 0}; char* classbuf; - DeviceIntRec dummy; - - FreeAllDeviceClasses((ClassesPtr)&oldmaster->key); - classes = (ClassesPtr)dixLookupPrivate(&oldmaster->devPrivates, - MasterDevClassesPrivateKey); - memcpy(&dummy.key, classes, sizeof(ClassesRec)); - DeepCopyDeviceClasses(&dummy, oldmaster); /* Send event to clients */ CreateClassesChangedEvent(&event, oldmaster, oldmaster); From 4219e94c2f7d431be433eceddfe79760a1ee31a1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 13 Apr 2008 08:27:31 +0930 Subject: [PATCH 387/634] xkb: Add XkbCopySrvLedInfo, deep-copies a XkbSrvLedInfoRec. --- include/xkbsrv.h | 8 ++++++++ xkb/xkbLEDs.c | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/include/xkbsrv.h b/include/xkbsrv.h index fef341a8f..7db9eef0b 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -576,6 +576,14 @@ extern XkbSrvLedInfoPtr XkbAllocSrvLedInfo( unsigned int /* needed_parts */ ); +extern XkbSrvLedInfoPtr XkbCopySrvLedInfo( + DeviceIntPtr /* dev */, + XkbSrvLedInfoPtr /* src */, + KbdFeedbackPtr /* kf */, + LedFeedbackPtr /* lf */ +); + + extern XkbSrvLedInfoPtr XkbFindSrvLedInfo( DeviceIntPtr /* dev */, unsigned int /* class */, diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c index 55ce12aad..d7ada5749 100644 --- a/xkb/xkbLEDs.c +++ b/xkb/xkbLEDs.c @@ -615,6 +615,45 @@ XkbFreeSrvLedInfo(XkbSrvLedInfoPtr sli) return; } +/* + * XkbSrvLedInfoPtr + * XkbCopySrvLedInfo(dev,src,kf,lf) + * + * Takes the given XkbSrvLedInfoPtr and duplicates it. A deep copy is made, + * thus the new copy behaves like the original one and can be freed with + * XkbFreeSrvLedInfo. + */ +XkbSrvLedInfoPtr +XkbCopySrvLedInfo( DeviceIntPtr from, + XkbSrvLedInfoPtr src, + KbdFeedbackPtr kf, + LedFeedbackPtr lf) +{ + XkbSrvLedInfoPtr sli_new; + + if (!src) + goto finish; + + sli_new = _XkbTypedCalloc(1, XkbSrvLedInfoRec); + if (!sli_new) + goto finish; + + memcpy(src, sli_new, sizeof(XkbSrvLedInfoRec)); + if (sli_new->class == KbdFeedbackClass) + sli_new->fb.kf = kf; + else + sli_new->fb.lf = lf; + + if (sli_new->flags & XkbSLI_IsDefault) { + sli_new->names= _XkbTypedCalloc(XkbNumIndicators,Atom); + sli_new->maps= _XkbTypedCalloc(XkbNumIndicators,XkbIndicatorMapRec); + } /* else sli_new->names/maps is pointing to + dev->key->xkbInfo->desc->names->indicators; + dev->key->xkbInfo->desc->names->indicators; */ + +finish: + return sli_new; +} /***====================================================================***/ From bf6679cba40a936d46008c886d204ed521a4971a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 13 Apr 2008 08:28:07 +0930 Subject: [PATCH 388/634] Xi: copy the XkbSrvLedInfo too when copying device classes. --- Xi/exevents.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index a93fef452..815eb7c6c 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -263,7 +263,11 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) (*k)->BellProc = it->BellProc; (*k)->CtrlProc = it->CtrlProc; (*k)->ctrl = it->ctrl; - /* XXX: xkb_sli needs to be copied */ +#ifdef XKB + if ((*k)->xkb_sli) + XkbFreeSrvLedInfo((*k)->xkb_sli); + (*k)->xkb_sli = XkbCopySrvLedInfo(from, it->xkb_sli, *k, NULL); +#endif k = &(*k)->next; } @@ -289,7 +293,6 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) } (*p)->CtrlProc = it->CtrlProc; (*p)->ctrl = it->ctrl; - /* XXX: xkb_sli needs to be copied */ p = &(*p)->next; } @@ -391,7 +394,11 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) } (*l)->CtrlProc = it->CtrlProc; (*l)->ctrl = it->ctrl; - /* XXX: xkb_sli needs to be copied */ +#ifdef XKB + if ((*l)->xkb_sli) + XkbFreeSrvLedInfo((*l)->xkb_sli); + (*l)->xkb_sli = XkbCopySrvLedInfo(from, it->xkb_sli, NULL, *l); +#endif l = &(*l)->next; } From 961f6660902163e99727c2dcc1a039f32b083859 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 13 Apr 2008 09:31:16 +0930 Subject: [PATCH 389/634] Xi: modifierKeyMap needs to be set to NULL when copying classes. Otherwise we have a double reference to the same memory area. --- Xi/exevents.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Xi/exevents.c b/Xi/exevents.c index 815eb7c6c..1d4dc51bf 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -434,6 +434,7 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) #ifdef XKB to->key->xkbInfo = NULL; #endif + to->key->modifierKeyMap = NULL; to->key->curKeySyms.map = NULL; CopyKeyClass(from, to); } else if (to->key && !from->key) From 415c6df0da1197d487456b4c48e2e28e7ded8b8e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 13 Apr 2008 11:46:44 +0930 Subject: [PATCH 390/634] Xi: copy feedback classes first, in some cases xkb relies on kbdfeed. XkbInitIndicatorMap (in XkbInitDevice) calls XkbFindSrvLedInfo. This accesses the devices kbdfeed struct, which is all nice and dandy if it is NULL. When copying the device classes however, kbdfeed may not be NULL and thus XkbFindSrvLedInfo goes on its merry way to do whatever it does. By copying kbdfeed first, we avoid XkbFSLI to reference the "old" kbdfeed struct of the previous SD. --- Xi/exevents.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 1d4dc51bf..6fa08d133 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -416,6 +416,11 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) _X_EXPORT void DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) { + /* XkbInitDevice (->XkbInitIndicatorMap->XkbFindSrvLedInfo) relies on the + * kbdfeed to be set up properly, so let's do the feedback classes first. + */ + DeepCopyFeedbackClasses(from, to); + #define ALLOC_COPY_CLASS_IF(field, type) \ if (from->field)\ { \ @@ -528,7 +533,6 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) to->absolute = NULL; } - DeepCopyFeedbackClasses(from, to); } /** From 3106ba1116e3b9d893f66a93e4a91cc61e23226a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 13 Apr 2008 11:48:06 +0930 Subject: [PATCH 391/634] xkb: two fixes to avoid server crashes. - map can be NULL in some cases, so don't try to dereference it. - don't default to inputInfo.keyboard This is firefighting, I presume something in the class copy may have gone wrong to get a NULL map in the first instance? --- xkb/xkbLEDs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c index d7ada5749..1ea3e1116 100644 --- a/xkb/xkbLEDs.c +++ b/xkb/xkbLEDs.c @@ -447,7 +447,7 @@ XkbIndicatorMapPtr map; XkbDescPtr xkb; if ((sli->flags&XkbSLI_HasOwnState)==0) - dev= inputInfo.keyboard; + return; sli->usesBase&= ~which; sli->usesLatched&= ~which; @@ -462,7 +462,7 @@ XkbDescPtr xkb; if (which&bit) { CARD8 what; - if (!XkbIM_InUse(map)) + if (!map || !XkbIM_InUse(map)) continue; sli->mapsPresent|= bit; From 6faf5b97b92953c331d6540ceb18fd0a77197fea Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 13 Apr 2008 15:42:33 +0930 Subject: [PATCH 392/634] Xi: fix up modifierKeyMap copying. Setting it to NULL isn't correct either. The correct behaviour is to realloc it to the size necessary (or newly alloc it/free it). Otherwise we have a memleak. --- Xi/exevents.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 6fa08d133..cf0e8984b 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -176,11 +176,16 @@ CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master) if (dk->maxKeysPerModifier) { - mk->modifierKeyMap = xcalloc(8, dk->maxKeysPerModifier); + mk->modifierKeyMap = xrealloc(mk->modifierKeyMap, + 8 * dk->maxKeysPerModifier); if (!mk->modifierKeyMap) FatalError("[Xi] no memory for class shift.\n"); memcpy(mk->modifierKeyMap, dk->modifierKeyMap, (8 * dk->maxKeysPerModifier)); + } else + { + xfree(mk->modifierKeyMap); + mk->modifierKeyMap = NULL; } mk->maxKeysPerModifier = dk->maxKeysPerModifier; @@ -439,7 +444,6 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) #ifdef XKB to->key->xkbInfo = NULL; #endif - to->key->modifierKeyMap = NULL; to->key->curKeySyms.map = NULL; CopyKeyClass(from, to); } else if (to->key && !from->key) From 755f9e5d7898056cf3bead69ce25a10e23995582 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 13 Apr 2008 16:49:25 +0930 Subject: [PATCH 393/634] dix: Ignore focus for passive grabs if the event is a pointer event. --- dix/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/events.c b/dix/events.c index 1b62db05f..e25ec30cf 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3546,7 +3546,7 @@ CheckDeviceGrabs(DeviceIntPtr device, xEvent *xE, { int i; WindowPtr pWin = NULL; - FocusClassPtr focus = device->focus; + FocusClassPtr focus = IsPointerEvent(xE) ? NULL : device->focus; xEvent core; BOOL sendCore = (device->isMaster && device->coreEvents); From 3c4c9938f31755c5a59995fdcfa138c99db76bbf Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 13 Apr 2008 16:52:14 +0930 Subject: [PATCH 394/634] Xi: Fix pointer handling in KeyClassRec copy. We don't free the class anymore, so just store the previous pointers, do the memcpy from the SD and then restore the pointers. Plugs a memleak too, before xkbInfo was never freed. --- Xi/exevents.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index cf0e8984b..aee78c669 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -438,13 +438,36 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) memcpy(to->field, from->field, sizeof(type)); \ } - ALLOC_COPY_CLASS_IF(key, KeyClassRec); - if (to->key && from->key) + if (from->key) { + KeyCode *oldModKeyMap; + KeySym *oldMap; #ifdef XKB - to->key->xkbInfo = NULL; + struct _XkbSrvInfo *oldXkbInfo; #endif - to->key->curKeySyms.map = NULL; + + if (!to->key) + { + to->key = xcalloc(1, sizeof(KeyClassRec)); + if (!to->key) + FatalError("[Xi] no memory for class shift.\n"); + } + + + oldModKeyMap = to->key->modifierKeyMap; + oldMap = to->key->curKeySyms.map; +#ifdef XKB + oldXkbInfo = to->key->xkbInfo; +#endif + + memcpy(to->key, from->key, sizeof(KeyClassRec)); + + to->key->modifierKeyMap = oldModKeyMap; + to->key->curKeySyms.map = oldMap; +#ifdef XKB + to->key->xkbInfo = oldXkbInfo; +#endif + CopyKeyClass(from, to); } else if (to->key && !from->key) { From fde3c836628b6cdec3e5d107d6b1b99bc8b86912 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 13 Apr 2008 17:08:51 +0930 Subject: [PATCH 395/634] Xi: copy the KeySyms.map over from the source. --- Xi/exevents.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Xi/exevents.c b/Xi/exevents.c index aee78c669..2a7afa9d4 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -462,6 +462,15 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) memcpy(to->key, from->key, sizeof(KeyClassRec)); + if (!oldMap) /* newly created key struct */ + { + int bytes = (to->key->curKeySyms.maxKeyCode - + to->key->curKeySyms.minKeyCode + 1) * + to->key->curKeySyms.mapWidth; + oldMap = (KeySym *)xcalloc(sizeof(KeySym), bytes); + memcpy(oldMap, from->key->curKeySyms.map, bytes); + } + to->key->modifierKeyMap = oldModKeyMap; to->key->curKeySyms.map = oldMap; #ifdef XKB From cb48d880856fd196ab8e8de5eb1f14944a1b4fff Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 13 Apr 2008 19:48:28 +0930 Subject: [PATCH 396/634] Xi: store unused classes in devPrivates. Rather than freeing/allocing classes each time the device capabilities need to swap, store them in the devPrivates system. When a class is unused, it is pushed into the devPrivates, and later recovered when needed again. This saves us a lot of memory allocations/frees, admittedly on the cost of some memory. --- Xi/exevents.c | 145 ++++++++++++++++++++++++++++++++++++++------------ dix/devices.c | 10 ++++ 2 files changed, 120 insertions(+), 35 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 2a7afa9d4..d99f609e2 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -96,6 +96,9 @@ Bool ShouldFreeInputMasks(WindowPtr /* pWin */ , static Bool MakeInputMasks(WindowPtr /* pWin */ ); +/* Used to sture classes currently not in use by an MD */ +extern DevPrivateKey UnusedClassesPrivateKey; + void RegisterOtherDevice(DeviceIntPtr device) @@ -416,28 +419,22 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) /** * Copies the CONTENT of the classes of device from into the classes in device * to. From and to are identical after finishing. + * + * If to does not have classes from currenly has, the classes are stored in + * to's devPrivates system. Later, we recover it again from there if needed. + * Saves a few memory allocations. */ _X_EXPORT void DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) { + ClassesPtr classes; + /* XkbInitDevice (->XkbInitIndicatorMap->XkbFindSrvLedInfo) relies on the * kbdfeed to be set up properly, so let's do the feedback classes first. */ DeepCopyFeedbackClasses(from, to); -#define ALLOC_COPY_CLASS_IF(field, type) \ - if (from->field)\ - { \ - if (!to->field) \ - { \ - to->field = xcalloc(1, sizeof(type)); \ - if (!to->field) \ - FatalError("[Xi] no memory for class shift.\n"); \ - } \ - memcpy(to->field, from->field, sizeof(type)); \ - } - if (from->key) { KeyCode *oldModKeyMap; @@ -445,15 +442,19 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) #ifdef XKB struct _XkbSrvInfo *oldXkbInfo; #endif - if (!to->key) { - to->key = xcalloc(1, sizeof(KeyClassRec)); + classes = dixLookupPrivate(&to->devPrivates, + UnusedClassesPrivateKey); + to->key = classes->key; if (!to->key) - FatalError("[Xi] no memory for class shift.\n"); + { + to->key = xcalloc(1, sizeof(KeyClassRec)); + if (!to->key) + FatalError("[Xi] no memory for class shift.\n"); + } } - oldModKeyMap = to->key->modifierKeyMap; oldMap = to->key->curKeySyms.map; #ifdef XKB @@ -480,14 +481,22 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) CopyKeyClass(from, to); } else if (to->key && !from->key) { - FreeDeviceClass(KeyClass, (pointer)&to->key); + ClassesPtr classes; + classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes->key = to->key; + to->key = NULL; } if (from->valuator) { ValuatorClassPtr v; - if (to->valuator) - xfree(to->valuator->motion); + if (!to->valuator) + { + classes = dixLookupPrivate(&to->devPrivates, + UnusedClassesPrivateKey); + to->valuator = classes->valuator; + } + to->valuator = xrealloc(to->valuator, sizeof(ValuatorClassRec) + from->valuator->numAxes * sizeof(AxisInfo) + from->valuator->numAxes * sizeof(unsigned int)); @@ -504,14 +513,28 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) v->axisVal = (int*)(v->axes + from->valuator->numAxes); } else if (to->valuator && !from->valuator) { - FreeDeviceClass(ValuatorClass, (pointer)&to->valuator); + ClassesPtr classes; + classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes->valuator = to->valuator; + to->valuator = NULL; } - ALLOC_COPY_CLASS_IF(button, ButtonClassRec); - if (to->button) + if (from->button) { int i; DeviceIntPtr sd; + if (!to->button) + { + classes = dixLookupPrivate(&to->devPrivates, + UnusedClassesPrivateKey); + to->button = classes->button; + if (!to->button) + { + to->button = xcalloc(1, sizeof(ButtonClassRec)); + if (!to->button) + FatalError("[Xi] no memory for class shift.\n"); + } + } /* merge button states from all attached devices */ for (sd = inputInfo.devices; sd; sd = sd->next) @@ -530,7 +553,10 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) #endif } else if (to->button && !from->button) { - FreeDeviceClass(ButtonClass, (pointer)&to->button); + ClassesPtr classes; + classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes->button = to->button; + to->button = NULL; } @@ -544,29 +570,78 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) { if (!to->focus) { - to->focus = xcalloc(1, sizeof(FocusClassRec)); + WindowPtr *oldTrace; + + classes = dixLookupPrivate(&to->devPrivates, + UnusedClassesPrivateKey); + to->focus = classes->focus; if (!to->focus) - FatalError("[Xi] no memory for class shift.\n"); + { + to->focus = xcalloc(1, sizeof(FocusClassRec)); + if (!to->focus) + FatalError("[Xi] no memory for class shift.\n"); + } + oldTrace = to->focus->trace; + memcpy(to->focus, from->focus, sizeof(FocusClassRec)); + to->focus->trace = xrealloc(oldTrace, + to->focus->traceSize * sizeof(WindowPtr)); + if (!to->focus->trace && to->focus->traceSize) + FatalError("[Xi] no memory for trace.\n"); memcpy(to->focus->trace, from->focus->trace, from->focus->traceSize * sizeof(WindowPtr)); } } else if (to->focus) { - /* properly freeing the class would also free the sprite trace, which - * is still in use by the SD. just xfree the struct. */ - xfree(to->focus); + ClassesPtr classes; + classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes->focus = to->focus; + to->focus = NULL; } - ALLOC_COPY_CLASS_IF(proximity, ProximityClassRec); - if (to->proximity && !from->proximity) + if (from->proximity) { - FreeDeviceClass(ProximityClass, (pointer)&to->proximity); + if (!to->proximity) + { + classes = dixLookupPrivate(&to->devPrivates, + UnusedClassesPrivateKey); + to->proximity = classes->proximity; + if (!to->proximity) + { + to->proximity = xcalloc(1, sizeof(ProximityClassRec)); + if (!to->proximity) + FatalError("[Xi] no memory for class shift.\n"); + } + } + memcpy(to->proximity, from->proximity, sizeof(ProximityClassRec)); + } else if (to->proximity) + { + ClassesPtr classes; + classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes->proximity = to->proximity; + to->proximity = NULL; } - ALLOC_COPY_CLASS_IF(absolute, AbsoluteClassRec); - if (to->absolute && !from->absolute) + + if (from->absolute) { - xfree(to->absolute); - to->absolute = NULL; + if (!to->absolute) + { + classes = dixLookupPrivate(&to->devPrivates, + UnusedClassesPrivateKey); + to->absolute = classes->absolute; + if (!to->absolute) + { + to->absolute = xcalloc(1, sizeof(AbsoluteClassRec)); + if (!to->absolute) + FatalError("[Xi] no memory for class shift.\n"); + } + } + memcpy(to->absolute, from->absolute, sizeof(AbsoluteClassRec)); + } else if (to->absolute) + { + ClassesPtr classes; + classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes->absolute = to->absolute; + to->absolute = NULL; } } diff --git a/dix/devices.c b/dix/devices.c index a78a1255d..266a66c61 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -89,6 +89,8 @@ SOFTWARE. /* The client that is allowed to change pointer-keyboard pairings. */ static ClientPtr pairingClient = NULL; DevPrivateKey CoreDevicePrivateKey = &CoreDevicePrivateKey; +/* Used to sture classes currently not in use by an MD */ +DevPrivateKey UnusedClassesPrivateKey = &UnusedClassesPrivateKey; /** * Create a new input device and init it to sane values. The device is added @@ -2550,6 +2552,7 @@ AllocMasterDevice(ClientPtr client, char* name, DeviceIntPtr* ptr, DeviceIntPtr* { DeviceIntPtr pointer; DeviceIntPtr keyboard; + ClassesPtr classes; *ptr = *keybd = NULL; pointer = AddInputDevice(client, CorePointerProc, TRUE); @@ -2602,6 +2605,13 @@ AllocMasterDevice(ClientPtr client, char* name, DeviceIntPtr* ptr, DeviceIntPtr* keyboard->u.lastSlave = NULL; keyboard->isMaster = TRUE; + + /* The ClassesRec stores the device classes currently not used. */ + classes = xcalloc(1, sizeof(ClassesRec)); + dixSetPrivate(&pointer->devPrivates, UnusedClassesPrivateKey, classes); + classes = xcalloc(1, sizeof(ClassesRec)); + dixSetPrivate(&keyboard->devPrivates, UnusedClassesPrivateKey, classes); + *ptr = pointer; *keybd = keyboard; From 6866e84e3c607d00d88eab2249c2619d6707c1a4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 13 Apr 2008 19:57:51 +0930 Subject: [PATCH 397/634] Xi: store feedback classes in devProviates system as well. This is a follow-up to cb48d880856fd196ab8e8de5eb1f14944a1b4fff. --- Xi/exevents.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 73 insertions(+), 6 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index d99f609e2..4417e6c61 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -253,9 +253,19 @@ CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master) static void DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) { + ClassesPtr classes; + if (from->kbdfeed) { KbdFeedbackPtr *k, it; + + if (!to->kbdfeed) + { + classes = dixLookupPrivate(&to->devPrivates, + UnusedClassesPrivateKey); + to->kbdfeed = classes->kbdfeed; + } + k = &to->kbdfeed; for(it = from->kbdfeed; it; it = it->next) { @@ -281,12 +291,22 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) } } else if (to->kbdfeed && !from->kbdfeed) { - FreeFeedbackClass(KbdFeedbackClass, (pointer)&to->kbdfeed); + ClassesPtr classes; + classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes->kbdfeed = to->kbdfeed; + to->kbdfeed = NULL; } if (from->ptrfeed) { PtrFeedbackPtr *p, it; + if (!to->ptrfeed) + { + classes = dixLookupPrivate(&to->devPrivates, + UnusedClassesPrivateKey); + to->ptrfeed = classes->ptrfeed; + } + p = &to->ptrfeed; for (it = from->ptrfeed; it; it = it->next) { @@ -306,12 +326,23 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) } } else if (to->ptrfeed && !from->ptrfeed) { - FreeFeedbackClass(PtrFeedbackClass, (pointer)&to->ptrfeed); + ClassesPtr classes; + classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes->ptrfeed = to->ptrfeed; + to->ptrfeed = NULL; } if (from->intfeed) { IntegerFeedbackPtr *i, it; + + if (!to->intfeed) + { + classes = dixLookupPrivate(&to->devPrivates, + UnusedClassesPrivateKey); + to->intfeed = classes->intfeed; + } + i = &to->intfeed; for (it = from->intfeed; it; it = it->next) { @@ -331,12 +362,23 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) } } else if (to->intfeed && !from->intfeed) { - FreeFeedbackClass(IntegerFeedbackClass, (pointer)&to->intfeed); + ClassesPtr classes; + classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes->intfeed = to->intfeed; + to->intfeed = NULL; } if (from->stringfeed) { StringFeedbackPtr *s, it; + + if (!to->stringfeed) + { + classes = dixLookupPrivate(&to->devPrivates, + UnusedClassesPrivateKey); + to->stringfeed = classes->stringfeed; + } + s = &to->stringfeed; for (it = from->stringfeed; it; it = it->next) { @@ -356,12 +398,23 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) } } else if (to->stringfeed && !from->stringfeed) { - FreeFeedbackClass(StringFeedbackClass, (pointer)&to->stringfeed); + ClassesPtr classes; + classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes->stringfeed = to->stringfeed; + to->stringfeed = NULL; } if (from->bell) { BellFeedbackPtr *b, it; + + if (!to->bell) + { + classes = dixLookupPrivate(&to->devPrivates, + UnusedClassesPrivateKey); + to->bell = classes->bell; + } + b = &to->bell; for (it = from->bell; it; it = it->next) { @@ -382,12 +435,23 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) } } else if (to->bell && !from->bell) { - FreeFeedbackClass(BellFeedbackClass, (pointer)&to->bell); + ClassesPtr classes; + classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes->bell = to->bell; + to->bell = NULL; } if (from->leds) { LedFeedbackPtr *l, it; + + if (!to->leds) + { + classes = dixLookupPrivate(&to->devPrivates, + UnusedClassesPrivateKey); + to->leds = classes->leds; + } + l = &to->leds; for (it = from->leds; it; it = it->next) { @@ -412,7 +476,10 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) } } else if (to->leds && !from->leds) { - FreeFeedbackClass(LedFeedbackClass, (pointer)&to->leds); + ClassesPtr classes; + classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes->leds = to->leds; + to->leds = NULL; } } From 4cf9c5909d926ec322ed1c7df47f95bd872bb607 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 15 Apr 2008 13:56:11 +0930 Subject: [PATCH 398/634] Xi: fix up button count. Some leftover code from the previously used alloc/free device classes left us with a incorrect button count. So a button release didn't come through if a different pointer was moved after the button press. --- Xi/exevents.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Xi/exevents.c b/Xi/exevents.c index 4417e6c61..4dd9fceb8 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -603,6 +603,8 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) } } + to->button->buttonsDown = 0; + memset(to->button->down, 0, MAP_LENGTH); /* merge button states from all attached devices */ for (sd = inputInfo.devices; sd; sd = sd->next) { @@ -612,6 +614,7 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) for (i = 0; i < MAP_LENGTH; i++) { to->button->down[i] += sd->button->down[i]; + to->button->buttonsDown++; } } #ifdef XKB From 48d33ab9b672b3b3ca308000cdbd573d1e368ff9 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 15 Apr 2008 14:29:53 +0930 Subject: [PATCH 399/634] dix: float attached devices _before_ disabling the master. It also helps if we're actually providing the correct argument to AttachDevice... --- dix/devices.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 266a66c61..d4459168f 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -301,6 +301,16 @@ DisableDevice(DeviceIntPtr dev) if (*prev != dev) return FALSE; + /* float attached devices */ + if (dev->isMaster) + { + for (other = inputInfo.devices; other; other = other->next) + { + if (other->u.master == dev) + AttachDevice(NULL, other, NULL); + } + } + if (dev->isMaster && dev->spriteInfo->sprite) { for (other = inputInfo.devices; other; other = other->next) @@ -320,16 +330,6 @@ DisableDevice(DeviceIntPtr dev) dev->next = inputInfo.off_devices; inputInfo.off_devices = dev; - /* float attached devices */ - if (dev->isMaster) - { - for (other = inputInfo.devices; other; other = other->next) - { - if (other->u.master == dev) - AttachDevice(NULL, dev, NULL); - } - } - ev.type = DevicePresenceNotify; ev.time = currentTime.milliseconds; ev.devchange = DeviceDisabled; From 51c8fd69ec9292f5e18cdc7f60e1716fbd6ae61a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 15 Apr 2008 15:09:40 +0930 Subject: [PATCH 400/634] dix: free the unused device classes when closing a device. This also requires to NULL-ify all pointers while we're actually using them, otherwise we'd try to free them twice. --- Xi/exevents.c | 19 +++++++++++++------ dix/devices.c | 7 +++++++ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 4dd9fceb8..f41250821 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -519,7 +519,8 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) to->key = xcalloc(1, sizeof(KeyClassRec)); if (!to->key) FatalError("[Xi] no memory for class shift.\n"); - } + } else + classes->key = NULL; } oldModKeyMap = to->key->modifierKeyMap; @@ -562,6 +563,8 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); to->valuator = classes->valuator; + if (to->valuator) + classes->valuator = NULL; } to->valuator = xrealloc(to->valuator, sizeof(ValuatorClassRec) + @@ -600,7 +603,8 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) to->button = xcalloc(1, sizeof(ButtonClassRec)); if (!to->button) FatalError("[Xi] no memory for class shift.\n"); - } + } else + classes->button = NULL; } to->button->buttonsDown = 0; @@ -650,7 +654,9 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) to->focus = xcalloc(1, sizeof(FocusClassRec)); if (!to->focus) FatalError("[Xi] no memory for class shift.\n"); - } + } else + classes->focus = NULL; + oldTrace = to->focus->trace; memcpy(to->focus, from->focus, sizeof(FocusClassRec)); to->focus->trace = xrealloc(oldTrace, @@ -680,7 +686,8 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) to->proximity = xcalloc(1, sizeof(ProximityClassRec)); if (!to->proximity) FatalError("[Xi] no memory for class shift.\n"); - } + } else + classes->proximity = NULL; } memcpy(to->proximity, from->proximity, sizeof(ProximityClassRec)); } else if (to->proximity) @@ -703,7 +710,8 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) to->absolute = xcalloc(1, sizeof(AbsoluteClassRec)); if (!to->absolute) FatalError("[Xi] no memory for class shift.\n"); - } + } else + classes->absolute = NULL; } memcpy(to->absolute, from->absolute, sizeof(AbsoluteClassRec)); } else if (to->absolute) @@ -713,7 +721,6 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) classes->absolute = to->absolute; to->absolute = NULL; } - } /** diff --git a/dix/devices.c b/dix/devices.c index d4459168f..fe70e7870 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -775,6 +775,13 @@ CloseDevice(DeviceIntPtr dev) classes = (ClassesPtr)&dev->key; FreeAllDeviceClasses(classes); + if (dev->isMaster) + { + classes = dixLookupPrivate(&dev->devPrivates, UnusedClassesPrivateKey); + FreeAllDeviceClasses(classes); + } + + #ifdef XKB while (dev->xkb_interest) XkbRemoveResourceClient((DevicePtr)dev,dev->xkb_interest->resource); From aa6687322de85a2d1025a3ae851fb290a089b2d3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 15 Apr 2008 23:03:06 +0930 Subject: [PATCH 401/634] Xi: when copying button classes, copy xkb_acts as well. This should be the last piece in the quest for the class copy. --- Xi/exevents.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index f41250821..a828044fa 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -247,8 +247,6 @@ CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master) * Copies the feedback classes from device "from" into device "to". Classes * are duplicated (not just flipping the pointers). All feedback classes are * linked lists, the full list is duplicated. - * - * XXX: some XKB stuff is still missing. */ static void DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) @@ -622,8 +620,18 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) } } #ifdef XKB - to->button->xkb_acts = NULL; - /* XXX: XkbAction needs to be copied */ + if (from->button->xkb_acts) + { + if (!to->button->xkb_acts) + { + to->button->xkb_acts = xcalloc(1, sizeof(XkbAction)); + if (!to->button->xkb_acts) + FatalError("[Xi] not enough memory for xkb_acts.\n"); + } + memcpy(to->button->xkb_acts, from->button->xkb_acts, + sizeof(XkbAction)); + } else + xfree(to->button->xkb_acts); #endif } else if (to->button && !from->button) { From eebdf69e9a52e071e0467a1f99de135df4d1eabc Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 18 Apr 2008 09:22:37 +0930 Subject: [PATCH 402/634] xkb: mixing up src and dst in a memcpy is suboptimal. --- xkb/xkbLEDs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c index 1ea3e1116..2b8efcef2 100644 --- a/xkb/xkbLEDs.c +++ b/xkb/xkbLEDs.c @@ -638,7 +638,7 @@ XkbCopySrvLedInfo( DeviceIntPtr from, if (!sli_new) goto finish; - memcpy(src, sli_new, sizeof(XkbSrvLedInfoRec)); + memcpy(sli_new, src, sizeof(XkbSrvLedInfoRec)); if (sli_new->class == KbdFeedbackClass) sli_new->fb.kf = kf; else From cb0168b4ac5c59cdce6f0a6d89ddd9f30d93b5f3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 18 Apr 2008 09:48:06 +0930 Subject: [PATCH 403/634] Xext: xtest.c: death to tabs+spaces indendation, remove #define XINPUT --- Xext/xtest.c | 672 +++++++++++++++++++++++++-------------------------- 1 file changed, 331 insertions(+), 341 deletions(-) diff --git a/Xext/xtest.c b/Xext/xtest.c index 8d27e16a5..0c96b3c33 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -1,30 +1,30 @@ /* -Copyright 1992, 1998 The Open Group + Copyright 1992, 1998 The Open Group -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. + Permission to use, copy, modify, distribute, and sell this software and its + documentation for any purpose is hereby granted without fee, provided that + the above copyright notice appear in all copies and that both that + copyright notice and this permission notice appear in supporting + documentation. -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. + Except as contained in this notice, the name of The Open Group shall + not be used in advertising or otherwise to promote the sale, use or + other dealings in this Software without prior written authorization + from The Open Group. -*/ + */ #ifdef HAVE_DIX_CONFIG_H #include @@ -45,17 +45,13 @@ from The Open Group. #define _XTEST_SERVER_ #include #include -#ifdef XINPUT #include #include #define EXTENSION_EVENT_BASE 64 -#endif /* XINPUT */ #include "modinit.h" -#ifdef XINPUT extern int DeviceValuator; -#endif /* XINPUT */ #ifdef PANORAMIX #include "panoramiX.h" @@ -63,12 +59,12 @@ extern int DeviceValuator; #endif static void XTestResetProc( - ExtensionEntry * /* extEntry */ -); + ExtensionEntry * /* extEntry */ + ); static int XTestSwapFakeInput( - ClientPtr /* client */, - xReq * /* req */ -); + ClientPtr /* client */, + xReq * /* req */ + ); static DISPATCH_PROC(ProcXTestCompareCursor); static DISPATCH_PROC(ProcXTestDispatch); @@ -85,23 +81,23 @@ void XTestExtensionInit(INITARGS) { AddExtension(XTestExtensionName, 0, 0, - ProcXTestDispatch, SProcXTestDispatch, - XTestResetProc, StandardMinorOpcode); + ProcXTestDispatch, SProcXTestDispatch, + XTestResetProc, StandardMinorOpcode); } /*ARGSUSED*/ static void XTestResetProc (extEntry) -ExtensionEntry *extEntry; + ExtensionEntry *extEntry; { } static int ProcXTestGetVersion(client) - ClientPtr client; + ClientPtr client; { xXTestGetVersionReply rep; - int n; + int n; REQUEST_SIZE_MATCH(xXTestGetVersionReq); rep.type = X_Reply; @@ -110,8 +106,8 @@ ProcXTestGetVersion(client) rep.majorVersion = XTestMajorVersion; rep.minorVersion = XTestMinorVersion; if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swaps(&rep.minorVersion, n); + swaps(&rep.sequenceNumber, n); + swaps(&rep.minorVersion, n); } WriteToClient(client, sizeof(xXTestGetVersionReply), (char *)&rep); return(client->noClientException); @@ -119,7 +115,7 @@ ProcXTestGetVersion(client) static int ProcXTestCompareCursor(client) - ClientPtr client; + ClientPtr client; { REQUEST(xXTestCompareCursorReq); xXTestCompareCursorReply rep; @@ -133,24 +129,24 @@ ProcXTestCompareCursor(client) if (rc != Success) return rc; if (stuff->cursor == None) - pCursor = NullCursor; + pCursor = NullCursor; else if (stuff->cursor == XTestCurrentCursor) - pCursor = GetSpriteCursor(ptr); + pCursor = GetSpriteCursor(ptr); else { - rc = dixLookupResource((pointer *)&pCursor, stuff->cursor, RT_CURSOR, - client, DixReadAccess); - if (rc != Success) - { - client->errorValue = stuff->cursor; - return (rc == BadValue) ? BadCursor : rc; - } + rc = dixLookupResource((pointer *)&pCursor, stuff->cursor, RT_CURSOR, + client, DixReadAccess); + if (rc != Success) + { + client->errorValue = stuff->cursor; + return (rc == BadValue) ? BadCursor : rc; + } } rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; rep.same = (wCursor(pWin) == pCursor); if (client->swapped) { - swaps(&rep.sequenceNumber, n); + swaps(&rep.sequenceNumber, n); } WriteToClient(client, sizeof(xXTestCompareCursorReply), (char *)&rep); return(client->noClientException); @@ -158,298 +154,292 @@ ProcXTestCompareCursor(client) static int ProcXTestFakeInput(client) - ClientPtr client; + ClientPtr client; { REQUEST(xXTestFakeInputReq); int nev, n, type, rc; xEvent *ev; DeviceIntPtr dev = NULL; WindowPtr root; -#ifdef XINPUT Bool extension = FALSE; deviceValuator *dv = NULL; int base; int *values; -#endif /* XINPUT */ nev = (stuff->length << 2) - sizeof(xReq); if ((nev % sizeof(xEvent)) || !nev) - return BadLength; + return BadLength; nev /= sizeof(xEvent); UpdateCurrentTime(); ev = (xEvent *)&((xReq *)stuff)[1]; type = ev->u.u.type & 0177; -#ifdef XINPUT + if (type >= EXTENSION_EVENT_BASE) { - type -= DeviceValuator; - switch (type) { - case XI_DeviceKeyPress: - case XI_DeviceKeyRelease: - case XI_DeviceButtonPress: - case XI_DeviceButtonRelease: - case XI_DeviceMotionNotify: - case XI_ProximityIn: - case XI_ProximityOut: - break; - default: - client->errorValue = ev->u.u.type; - return BadValue; - } - if (nev == 1 && type == XI_DeviceMotionNotify) - return BadLength; - if (type == XI_DeviceMotionNotify) - base = ((deviceValuator *)(ev+1))->first_valuator; - else - base = 0; - for (n = 1; n < nev; n++) - { - dv = (deviceValuator *)(ev + n); - if (dv->type != DeviceValuator) - { - client->errorValue = dv->type; - return BadValue; - } - if (dv->first_valuator != base) - { - client->errorValue = dv->first_valuator; - return BadValue; - } - if (!dv->num_valuators || dv->num_valuators > 6) - { - client->errorValue = dv->num_valuators; - return BadValue; - } - base += dv->num_valuators; - } - type = type - XI_DeviceKeyPress + KeyPress; - extension = TRUE; + type -= DeviceValuator; + switch (type) { + case XI_DeviceKeyPress: + case XI_DeviceKeyRelease: + case XI_DeviceButtonPress: + case XI_DeviceButtonRelease: + case XI_DeviceMotionNotify: + case XI_ProximityIn: + case XI_ProximityOut: + break; + default: + client->errorValue = ev->u.u.type; + return BadValue; + } + if (nev == 1 && type == XI_DeviceMotionNotify) + return BadLength; /* DevMotion must be followed by DevValuator */ + if (type == XI_DeviceMotionNotify) + base = ((deviceValuator *)(ev+1))->first_valuator; + else + base = 0; + for (n = 1; n < nev; n++) + { + dv = (deviceValuator *)(ev + n); + if (dv->type != DeviceValuator) + { + client->errorValue = dv->type; + return BadValue; + } + if (dv->first_valuator != base) + { + client->errorValue = dv->first_valuator; + return BadValue; + } + if (!dv->num_valuators || dv->num_valuators > 6) + { + client->errorValue = dv->num_valuators; + return BadValue; + } + base += dv->num_valuators; + } + type = type - XI_DeviceKeyPress + KeyPress; + extension = TRUE; } else -#endif /* XINPUT */ { - if (nev != 1) - return BadLength; - switch (type) - { - case KeyPress: - case KeyRelease: - case MotionNotify: - case ButtonPress: - case ButtonRelease: - break; - default: - client->errorValue = ev->u.u.type; - return BadValue; - } + if (nev != 1) + return BadLength; + switch (type) + { + case KeyPress: + case KeyRelease: + case MotionNotify: + case ButtonPress: + case ButtonRelease: + break; + default: + client->errorValue = ev->u.u.type; + return BadValue; + } } + + /* If the event has a time set, wait for it to pass */ if (ev->u.keyButtonPointer.time) { - TimeStamp activateTime; - CARD32 ms; + TimeStamp activateTime; + CARD32 ms; - activateTime = currentTime; - ms = activateTime.milliseconds + ev->u.keyButtonPointer.time; - if (ms < activateTime.milliseconds) - activateTime.months++; - activateTime.milliseconds = ms; - ev->u.keyButtonPointer.time = 0; + activateTime = currentTime; + ms = activateTime.milliseconds + ev->u.keyButtonPointer.time; + if (ms < activateTime.milliseconds) + activateTime.months++; + activateTime.milliseconds = ms; + ev->u.keyButtonPointer.time = 0; - /* see mbuf.c:QueueDisplayRequest for code similar to this */ + /* see mbuf.c:QueueDisplayRequest for code similar to this */ - if (!ClientSleepUntil(client, &activateTime, NULL, NULL)) - { - return BadAlloc; - } - /* swap the request back so we can simply re-execute it */ - if (client->swapped) - { - (void) XTestSwapFakeInput(client, (xReq *)stuff); - swaps(&stuff->length, n); - } - ResetCurrentRequest (client); - client->sequence--; - return Success; + if (!ClientSleepUntil(client, &activateTime, NULL, NULL)) + { + return BadAlloc; + } + /* swap the request back so we can simply re-execute it */ + if (client->swapped) + { + (void) XTestSwapFakeInput(client, (xReq *)stuff); + swaps(&stuff->length, n); + } + ResetCurrentRequest (client); + client->sequence--; + return Success; } -#ifdef XINPUT + if (extension) { - rc = dixLookupDevice(&dev, stuff->deviceid & 0177, client, - DixWriteAccess); - if (rc != Success) - { - client->errorValue = stuff->deviceid & 0177; - return rc; - } - if (nev > 1) - { - dv = (deviceValuator *)(ev + 1); - if (!dev->valuator || dv->first_valuator >= dev->valuator->numAxes) - { - client->errorValue = dv->first_valuator; - return BadValue; - } - if (dv->first_valuator + dv->num_valuators > - dev->valuator->numAxes) - { - client->errorValue = dv->num_valuators; - return BadValue; - } - } + rc = dixLookupDevice(&dev, stuff->deviceid & 0177, client, + DixWriteAccess); + if (rc != Success) + { + client->errorValue = stuff->deviceid & 0177; + return rc; + } + if (nev > 1) + { + dv = (deviceValuator *)(ev + 1); + if (!dev->valuator || dv->first_valuator >= dev->valuator->numAxes) + { + client->errorValue = dv->first_valuator; + return BadValue; + } + if (dv->first_valuator + dv->num_valuators > + dev->valuator->numAxes) + { + client->errorValue = dv->num_valuators; + return BadValue; + } + } } -#endif /* XINPUT */ switch (type) { - case KeyPress: - case KeyRelease: -#ifdef XINPUT - if (!extension) -#endif /* XINPUT */ - dev = PickKeyboard(client); - if (ev->u.u.detail < dev->key->curKeySyms.minKeyCode || - ev->u.u.detail > dev->key->curKeySyms.maxKeyCode) - { - client->errorValue = ev->u.u.detail; - return BadValue; - } - break; - case MotionNotify: -#ifdef XINPUT - if (extension) - { - if (ev->u.u.detail != xFalse && ev->u.u.detail != xTrue) - { - client->errorValue = ev->u.u.detail; - return BadValue; - } - if (ev->u.u.detail == xTrue && dev->valuator->mode == Absolute) - { - values = dev->valuator->axisVal + dv->first_valuator; - for (n = 1; n < nev; n++) - { - dv = (deviceValuator *)(ev + n); - switch (dv->num_valuators) - { - case 6: - dv->valuator5 += values[5]; - case 5: - dv->valuator4 += values[4]; - case 4: - dv->valuator3 += values[3]; - case 3: - dv->valuator2 += values[2]; - case 2: - dv->valuator1 += values[1]; - case 1: - dv->valuator0 += values[0]; - } - values += 6; - } - } - break; - } -#endif /* XINPUT */ - if (!dev) - dev = PickPointer(client); - if (ev->u.keyButtonPointer.root == None) - root = GetCurrentRootWindow(dev); - else - { - rc = dixLookupWindow(&root, ev->u.keyButtonPointer.root, client, - DixGetAttrAccess); - if (rc != Success) - return rc; - if (root->parent) - { - client->errorValue = ev->u.keyButtonPointer.root; - return BadValue; - } - } - if (ev->u.u.detail == xTrue) - { - int x, y; - GetSpritePosition(dev, &x, &y); - ev->u.keyButtonPointer.rootX += x; - ev->u.keyButtonPointer.rootY += y; - } - else if (ev->u.u.detail != xFalse) - { - client->errorValue = ev->u.u.detail; - return BadValue; - } + case KeyPress: + case KeyRelease: + if (!extension) + dev = PickKeyboard(client); + if (ev->u.u.detail < dev->key->curKeySyms.minKeyCode || + ev->u.u.detail > dev->key->curKeySyms.maxKeyCode) + { + client->errorValue = ev->u.u.detail; + return BadValue; + } + break; + case MotionNotify: + if (extension) + { + if (ev->u.u.detail != xFalse && ev->u.u.detail != xTrue) + { + client->errorValue = ev->u.u.detail; + return BadValue; + } + /* detail is True for relative coordinates */ + if (ev->u.u.detail == xTrue && dev->valuator->mode == Absolute) + { + values = dev->valuator->axisVal + dv->first_valuator; + for (n = 1; n < nev; n++) + { + dv = (deviceValuator *)(ev + n); + switch (dv->num_valuators) + { + case 6: + dv->valuator5 += values[5]; + case 5: + dv->valuator4 += values[4]; + case 4: + dv->valuator3 += values[3]; + case 3: + dv->valuator2 += values[2]; + case 2: + dv->valuator1 += values[1]; + case 1: + dv->valuator0 += values[0]; + } + values += 6; + } + } + break; + } + + if (!dev) + dev = PickPointer(client); + if (ev->u.keyButtonPointer.root == None) + root = GetCurrentRootWindow(dev); + else + { + rc = dixLookupWindow(&root, ev->u.keyButtonPointer.root, client, + DixGetAttrAccess); + if (rc != Success) + return rc; + if (root->parent) + { + client->errorValue = ev->u.keyButtonPointer.root; + return BadValue; + } + } + if (ev->u.u.detail == xTrue) + { + int x, y; + GetSpritePosition(dev, &x, &y); + ev->u.keyButtonPointer.rootX += x; + ev->u.keyButtonPointer.rootY += y; + } + else if (ev->u.u.detail != xFalse) + { + client->errorValue = ev->u.u.detail; + return BadValue; + } #ifdef PANORAMIX - if (!noPanoramiXExtension) { - ScreenPtr pScreen = root->drawable.pScreen; - BoxRec box; - int i; - int x = ev->u.keyButtonPointer.rootX + panoramiXdataPtr[0].x; - int y = ev->u.keyButtonPointer.rootY + panoramiXdataPtr[0].y; - if (!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum], - x, y, &box)) { - FOR_NSCREENS(i) { - if (i == pScreen->myNum) continue; - if (POINT_IN_REGION(pScreen, - &XineramaScreenRegions[i], - x, y, &box)) { - root = WindowTable[i]; - x -= panoramiXdataPtr[i].x; - y -= panoramiXdataPtr[i].y; - ev->u.keyButtonPointer.rootX = x; - ev->u.keyButtonPointer.rootY = y; - break; - } - } - } - } + if (!noPanoramiXExtension) { + ScreenPtr pScreen = root->drawable.pScreen; + BoxRec box; + int i; + int x = ev->u.keyButtonPointer.rootX + panoramiXdataPtr[0].x; + int y = ev->u.keyButtonPointer.rootY + panoramiXdataPtr[0].y; + if (!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum], + x, y, &box)) { + FOR_NSCREENS(i) { + if (i == pScreen->myNum) continue; + if (POINT_IN_REGION(pScreen, + &XineramaScreenRegions[i], + x, y, &box)) { + root = WindowTable[i]; + x -= panoramiXdataPtr[i].x; + y -= panoramiXdataPtr[i].y; + ev->u.keyButtonPointer.rootX = x; + ev->u.keyButtonPointer.rootY = y; + break; + } + } + } + } #endif - if (ev->u.keyButtonPointer.rootX < 0) - ev->u.keyButtonPointer.rootX = 0; - else if (ev->u.keyButtonPointer.rootX >= root->drawable.width) - ev->u.keyButtonPointer.rootX = root->drawable.width - 1; - if (ev->u.keyButtonPointer.rootY < 0) - ev->u.keyButtonPointer.rootY = 0; - else if (ev->u.keyButtonPointer.rootY >= root->drawable.height) - ev->u.keyButtonPointer.rootY = root->drawable.height - 1; + if (ev->u.keyButtonPointer.rootX < 0) + ev->u.keyButtonPointer.rootX = 0; + else if (ev->u.keyButtonPointer.rootX >= root->drawable.width) + ev->u.keyButtonPointer.rootX = root->drawable.width - 1; + if (ev->u.keyButtonPointer.rootY < 0) + ev->u.keyButtonPointer.rootY = 0; + else if (ev->u.keyButtonPointer.rootY >= root->drawable.height) + ev->u.keyButtonPointer.rootY = root->drawable.height - 1; #ifdef PANORAMIX - if ((!noPanoramiXExtension - && root->drawable.pScreen->myNum - != XineramaGetCursorScreen(dev)) - || (noPanoramiXExtension && root != GetCurrentRootWindow(dev))) + if ((!noPanoramiXExtension + && root->drawable.pScreen->myNum + != XineramaGetCursorScreen(dev)) + || (noPanoramiXExtension && root != GetCurrentRootWindow(dev))) #else - if (root != GetCurrentRootWindow(dev)) + if (root != GetCurrentRootWindow(dev)) #endif - { - NewCurrentScreen(dev, root->drawable.pScreen, - ev->u.keyButtonPointer.rootX, - ev->u.keyButtonPointer.rootY); - return client->noClientException; - } - (*root->drawable.pScreen->SetCursorPosition) - (dev, root->drawable.pScreen, - ev->u.keyButtonPointer.rootX, - ev->u.keyButtonPointer.rootY, FALSE); - dev->lastx = ev->u.keyButtonPointer.rootX; - dev->lasty = ev->u.keyButtonPointer.rootY; - break; - case ButtonPress: - case ButtonRelease: -#ifdef XINPUT - if (!extension) -#endif /* XINPUT */ - dev = PickPointer(client); - if (!ev->u.u.detail || ev->u.u.detail > dev->button->numButtons) - { - client->errorValue = ev->u.u.detail; - return BadValue; - } - break; + { + NewCurrentScreen(dev, root->drawable.pScreen, + ev->u.keyButtonPointer.rootX, + ev->u.keyButtonPointer.rootY); + return client->noClientException; + } + (*root->drawable.pScreen->SetCursorPosition) + (dev, root->drawable.pScreen, + ev->u.keyButtonPointer.rootX, + ev->u.keyButtonPointer.rootY, FALSE); + dev->lastx = ev->u.keyButtonPointer.rootX; + dev->lasty = ev->u.keyButtonPointer.rootY; + break; + case ButtonPress: + case ButtonRelease: + if (!extension) + dev = PickPointer(client); + if (!ev->u.u.detail || ev->u.u.detail > dev->button->numButtons) + { + client->errorValue = ev->u.u.detail; + return BadValue; + } + break; } if (screenIsSaved == SCREEN_SAVER_ON) - dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); + dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); ev->u.keyButtonPointer.time = currentTime.milliseconds; (*dev->public.processInputProc)(ev, dev, nev); return client->noClientException; @@ -457,48 +447,48 @@ ProcXTestFakeInput(client) static int ProcXTestGrabControl(client) - ClientPtr client; + ClientPtr client; { REQUEST(xXTestGrabControlReq); REQUEST_SIZE_MATCH(xXTestGrabControlReq); if ((stuff->impervious != xTrue) && (stuff->impervious != xFalse)) { - client->errorValue = stuff->impervious; + client->errorValue = stuff->impervious; return(BadValue); } if (stuff->impervious) - MakeClientGrabImpervious(client); + MakeClientGrabImpervious(client); else - MakeClientGrabPervious(client); + MakeClientGrabPervious(client); return(client->noClientException); } static int ProcXTestDispatch (client) - ClientPtr client; + ClientPtr client; { REQUEST(xReq); switch (stuff->data) { - case X_XTestGetVersion: - return ProcXTestGetVersion(client); - case X_XTestCompareCursor: - return ProcXTestCompareCursor(client); - case X_XTestFakeInput: - return ProcXTestFakeInput(client); - case X_XTestGrabControl: - return ProcXTestGrabControl(client); - default: - return BadRequest; + case X_XTestGetVersion: + return ProcXTestGetVersion(client); + case X_XTestCompareCursor: + return ProcXTestCompareCursor(client); + case X_XTestFakeInput: + return ProcXTestFakeInput(client); + case X_XTestGrabControl: + return ProcXTestGrabControl(client); + default: + return BadRequest; } } static int SProcXTestGetVersion(client) - ClientPtr client; + ClientPtr client; { - int n; + int n; REQUEST(xXTestGetVersionReq); swaps(&stuff->length, n); @@ -509,9 +499,9 @@ SProcXTestGetVersion(client) static int SProcXTestCompareCursor(client) - ClientPtr client; + ClientPtr client; { - int n; + int n; REQUEST(xXTestCompareCursorReq); swaps(&stuff->length, n); @@ -523,49 +513,49 @@ SProcXTestCompareCursor(client) static int XTestSwapFakeInput(client, req) - ClientPtr client; + ClientPtr client; xReq *req; { - int nev; - xEvent *ev; + int nev; + xEvent *ev; xEvent sev; EventSwapPtr proc; nev = ((req->length << 2) - sizeof(xReq)) / sizeof(xEvent); for (ev = (xEvent *)&req[1]; --nev >= 0; ev++) { - /* Swap event */ - proc = EventSwapVector[ev->u.u.type & 0177]; - /* no swapping proc; invalid event type? */ - if (!proc || proc == NotImplemented) { - client->errorValue = ev->u.u.type; - return BadValue; - } - (*proc)(ev, &sev); - *ev = sev; + /* Swap event */ + proc = EventSwapVector[ev->u.u.type & 0177]; + /* no swapping proc; invalid event type? */ + if (!proc || proc == NotImplemented) { + client->errorValue = ev->u.u.type; + return BadValue; + } + (*proc)(ev, &sev); + *ev = sev; } return Success; } static int SProcXTestFakeInput(client) - ClientPtr client; + ClientPtr client; { - int n; + int n; REQUEST(xReq); swaps(&stuff->length, n); n = XTestSwapFakeInput(client, stuff); if (n != Success) - return n; + return n; return ProcXTestFakeInput(client); } static int SProcXTestGrabControl(client) - ClientPtr client; + ClientPtr client; { - int n; + int n; REQUEST(xXTestGrabControlReq); swaps(&stuff->length, n); @@ -575,20 +565,20 @@ SProcXTestGrabControl(client) static int SProcXTestDispatch (client) - ClientPtr client; + ClientPtr client; { REQUEST(xReq); switch (stuff->data) { - case X_XTestGetVersion: - return SProcXTestGetVersion(client); - case X_XTestCompareCursor: - return SProcXTestCompareCursor(client); - case X_XTestFakeInput: - return SProcXTestFakeInput(client); - case X_XTestGrabControl: - return SProcXTestGrabControl(client); - default: - return BadRequest; + case X_XTestGetVersion: + return SProcXTestGetVersion(client); + case X_XTestCompareCursor: + return SProcXTestCompareCursor(client); + case X_XTestFakeInput: + return SProcXTestFakeInput(client); + case X_XTestGrabControl: + return SProcXTestGrabControl(client); + default: + return BadRequest; } } From e0eaf8e5e3fa7a11c087851dff93f50f6907c4a5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 18 Apr 2008 10:57:47 +0930 Subject: [PATCH 404/634] Xext: Let XTestFakeInput update the sprite for XI events. Since XI devices can have their own sprite now, we need to update the sprite coordinates too when processing an XI event. Note: This doesn't deal with the device hierarchy correctly yet. --- Xext/xtest.c | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/Xext/xtest.c b/Xext/xtest.c index 0c96b3c33..5f0b25eb8 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -338,7 +338,23 @@ ProcXTestFakeInput(client) values += 6; } } - break; + /* For XI events, the actual event is mostly unset. Since we + * want to update the sprite nontheless, we need to fake up + * sane values for the event. */ + + ev->u.keyButtonPointer.root = None; + dv = (deviceValuator*)(ev + 1); + if (dv->num_valuators && dv->first_valuator == 0) + ev->u.keyButtonPointer.rootX = dv->valuator0; + else + ev->u.keyButtonPointer.rootX = 0; + + /* XXX: AFAIK, XI requires always sending _all_ valuators, + * i.e. you can't just send vals 3 - 7. (whot) */ + if (dv->num_valuators > 1 && dv->first_valuator == 0) + ev->u.keyButtonPointer.rootY = dv->valuator1; + else + ev->u.keyButtonPointer.rootY = 0; } if (!dev) @@ -360,9 +376,13 @@ ProcXTestFakeInput(client) if (ev->u.u.detail == xTrue) { int x, y; - GetSpritePosition(dev, &x, &y); - ev->u.keyButtonPointer.rootX += x; - ev->u.keyButtonPointer.rootY += y; + if (!extension || !dev->valuator->mode == Absolute) + { + /* if Absolute, rootX already has the final coords. */ + GetSpritePosition(dev, &x, &y); + ev->u.keyButtonPointer.rootX += x; + ev->u.keyButtonPointer.rootY += y; + } } else if (ev->u.u.detail != xFalse) { @@ -431,6 +451,12 @@ ProcXTestFakeInput(client) case ButtonRelease: if (!extension) dev = PickPointer(client); + else + { + /* For XI events, the rootX/Y is unset. */ + ev->u.keyButtonPointer.rootX = dev->lastx; + ev->u.keyButtonPointer.rootY = dev->lasty; + } if (!ev->u.u.detail || ev->u.u.detail > dev->button->numButtons) { client->errorValue = ev->u.u.detail; From 3b93631e59ca4d312d318eac4015e0a79ad6351f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 18 Apr 2008 11:31:54 +0930 Subject: [PATCH 405/634] dix: remove coreOnly check. Core pointer must generate XI events now. This flag was only used when an event is generated by Warp[Device]Pointer. Since the VCP now happily generates core events, this flag is obsolete. --- dix/getevents.c | 49 ++++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index 037d68ceb..d352ebe78 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -664,8 +664,6 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, deviceKeyButtonPointer *kbp = NULL; DeviceIntPtr master; int x = 0, y = 0; - /* The core pointer must not send Xi events. */ - Bool coreOnly = (pDev == inputInfo.pointer); /* Sanity checks. */ if (type != MotionNotify && type != ButtonPress && type != ButtonRelease) @@ -700,7 +698,7 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, } /* Do we need to send a DeviceValuator event? */ - if (!coreOnly && num_valuators) { + if (num_valuators) { if ((((num_valuators - 1) / 6) + 1) > MAX_VALUATOR_EVENTS) num_valuators = MAX_VALUATOR_EVENTS * 6; num_events += ((num_valuators - 1) / 6) + 1; @@ -771,33 +769,30 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, master->lasty = y; } - if (!coreOnly) - { - kbp = (deviceKeyButtonPointer *) events->event; - kbp->time = ms; - kbp->deviceid = pDev->id; + kbp = (deviceKeyButtonPointer *) events->event; + kbp->time = ms; + kbp->deviceid = pDev->id; - if (type == MotionNotify) { - kbp->type = DeviceMotionNotify; - } - else { - if (type == ButtonPress) - kbp->type = DeviceButtonPress; - else if (type == ButtonRelease) - kbp->type = DeviceButtonRelease; - kbp->detail = pDev->button->map[buttons]; - } + if (type == MotionNotify) { + kbp->type = DeviceMotionNotify; + } + else { + if (type == ButtonPress) + kbp->type = DeviceButtonPress; + else if (type == ButtonRelease) + kbp->type = DeviceButtonRelease; + kbp->detail = pDev->button->map[buttons]; + } - kbp->root_x = x; - kbp->root_y = y; + kbp->root_x = x; + kbp->root_y = y; - events++; - if (num_valuators) { - kbp->deviceid |= MORE_EVENTS; - clipValuators(pDev, first_valuator, num_valuators, valuators); - events = getValuatorEvents(events, pDev, first_valuator, - num_valuators, valuators); - } + events++; + if (num_valuators) { + kbp->deviceid |= MORE_EVENTS; + clipValuators(pDev, first_valuator, num_valuators, valuators); + events = getValuatorEvents(events, pDev, first_valuator, + num_valuators, valuators); } return num_events; From 8209fdbc7c7f2dd068b30ff184b5fbf00db78686 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 18 Apr 2008 20:53:57 +0930 Subject: [PATCH 406/634] Xext: Update sprite on fake input only for MDs and floating SDs. --- Xext/xtest.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Xext/xtest.c b/Xext/xtest.c index 5f0b25eb8..721dacc0c 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -440,10 +440,14 @@ ProcXTestFakeInput(client) ev->u.keyButtonPointer.rootY); return client->noClientException; } - (*root->drawable.pScreen->SetCursorPosition) - (dev, root->drawable.pScreen, - ev->u.keyButtonPointer.rootX, - ev->u.keyButtonPointer.rootY, FALSE); + /* Only update sprite for MDs and floating SDs */ + if (dev->isMaster || (!dev->isMaster && !dev->u.master)) + { + (*root->drawable.pScreen->SetCursorPosition) + (dev, root->drawable.pScreen, + ev->u.keyButtonPointer.rootX, + ev->u.keyButtonPointer.rootY, FALSE); + } dev->lastx = ev->u.keyButtonPointer.rootX; dev->lasty = ev->u.keyButtonPointer.rootY; break; From fb784d99c521823339bf00b70b9824f735d88875 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 18 Apr 2008 20:57:42 +0930 Subject: [PATCH 407/634] mi: fix typo in comment. --- mi/mieq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mi/mieq.c b/mi/mieq.c index 2759d165a..cae55162f 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -333,7 +333,7 @@ mieqProcessInputEvents(void) /* FIXME: Bad hack. The only event where we actually get multiple * events at once is a DeviceMotionNotify followed by - * DeviceValuators. For now it's save enough to just take the + * DeviceValuators. For now it's safe enough to just take the * event directly or copy the bunch of events and pass in the * copy. Eventually the interface for the processInputProc needs * to be changed. (whot) From 179a082c26f9e562492ee2e59e7f44f949f39f9c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 18 Apr 2008 21:13:10 +0930 Subject: [PATCH 408/634] Xext: route event through master if required (XTestFakeInput) --- Xext/xtest.c | 10 +++++++++- mi/mieq.c | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Xext/xtest.c b/Xext/xtest.c index 721dacc0c..e11f35876 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -471,7 +471,15 @@ ProcXTestFakeInput(client) if (screenIsSaved == SCREEN_SAVER_ON) dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); ev->u.keyButtonPointer.time = currentTime.milliseconds; - (*dev->public.processInputProc)(ev, dev, nev); + if (!dev->isMaster && dev->u.master) + { /* duplicate and route through master */ + xEvent *master_event = NULL; + CopyGetMasterEvent(dev->u.master, ev, &master_event, nev); + (*dev->public.processInputProc)(ev, dev, nev); + (*dev->public.processInputProc)(master_event, dev->u.master, nev); + xfree(master_event); + } else + (*dev->public.processInputProc)(ev, dev, nev); return client->noClientException; } diff --git a/mi/mieq.c b/mi/mieq.c index cae55162f..1c85030a3 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -263,7 +263,7 @@ ChangeDeviceID(DeviceIntPtr dev, xEvent* event) * @param master The event after being copied * @param count Number of events in original. */ -static void +void CopyGetMasterEvent(DeviceIntPtr mdev, xEvent* original, xEvent** master, int count) { From c3659cb414ef05da8fa09009b2b82a3deeeb4f3a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 22 Apr 2008 21:54:02 +0930 Subject: [PATCH 409/634] dix: always send FocusIn events if mode is NotifyUngrab. In the case of a NotifyUngrab, the flag for the device may already be set but we still need to send the FocusIn event. --- dix/events.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dix/events.c b/dix/events.c index 7b503ac4e..04342fc0f 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4690,6 +4690,8 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) if (!numFoci) sendevent = TRUE; + else if (mode == NotifyUngrab && FOCUS_SEMAPHORE_ISSET(pWin, dev)) + sendevent = TRUE; if (sendevent) { From 275cdc1c74b7e43ecd931d312469fecc8d998ed1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 23 Apr 2008 16:16:15 +0930 Subject: [PATCH 410/634] xfree86: pass correct value to mieqEnqueue (merge detritus I guess) --- hw/xfree86/common/xf86Events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index d1e4393fd..f408fc929 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -818,7 +818,7 @@ xf86ReleaseKeys(DeviceIntPtr pDev) int sigstate = xf86BlockSIGIO (); nevents = GetKeyboardEvents(xf86Events, pDev, KeyRelease, i); for (j = 0; j < nevents; j++) - mieqEnqueue(pDev, xf86Events + j); + mieqEnqueue(pDev, (xf86Events + j)->event); xf86UnblockSIGIO(sigstate); } break; From 5f3e5b3462bb02e828c70d0e1890b5a83d399d42 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 24 Apr 2008 11:03:23 +0930 Subject: [PATCH 411/634] Xext: remove trailing whitespaces in geext.{c|h} --- Xext/geext.c | 34 +++++++++++++++++----------------- Xext/geext.h | 10 +++++----- Xext/geint.h | 2 +- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Xext/geext.c b/Xext/geext.c index 77bb181ee..83473226f 100644 --- a/Xext/geext.c +++ b/Xext/geext.c @@ -78,7 +78,7 @@ static int ProcGEQueryVersion(ClientPtr client) rep.minorVersion = stuff->minorVersion; } else { rep.majorVersion = GE_MAJOR; - if (stuff->majorVersion == GE_MAJOR && + if (stuff->majorVersion == GE_MAJOR && stuff->minorVersion < GE_MINOR) rep.minorVersion = stuff->minorVersion; else @@ -90,8 +90,8 @@ static int ProcGEQueryVersion(ClientPtr client) if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); swaps(&rep.majorVersion, n); swaps(&rep.minorVersion, n); } @@ -132,7 +132,7 @@ int (*SProcGEVector[GENumberRequests])(ClientPtr) = { /************************************************************/ /* dispatch requests */ -static int +static int ProcGEDispatch(ClientPtr client) { GEClientInfoPtr pGEClient = GEGetClient(client); @@ -188,7 +188,7 @@ GEResetProc(ExtensionEntry *extEntry) } /* Calls the registered event swap function for the extension. */ -static void +static void SGEGenericEvent(xEvent* from, xEvent* to) { xGenericEvent* gefrom = (xGenericEvent*)from; @@ -215,9 +215,9 @@ GEExtensionInit(void) FatalError("GEExtensionInit: register client callback failed.\n"); } - if((extEntry = AddExtension(GE_NAME, - GENumberEvents, GENumberErrors, - ProcGEDispatch, SProcGEDispatch, + if((extEntry = AddExtension(GE_NAME, + GENumberEvents, GENumberErrors, + ProcGEDispatch, SProcGEDispatch, GEResetProc, StandardMinorOpcode)) != 0) { GEEventBase = extEntry->eventBase; @@ -239,15 +239,15 @@ GEExtensionInit(void) /* Register an extension with GE. The given swap function will be called each * time an event is sent to a client with different byte order. - * @param extension The extensions major opcode - * @param ev_swap The event swap function. + * @param extension The extensions major opcode + * @param ev_swap The event swap function. * @param ev_fill Called for an event before delivery. The extension now has * the chance to fill in necessary fields for the event. */ void GERegisterExtension( - int extension, + int extension, void (*ev_swap)(xGenericEvent* from, xGenericEvent* to), - void (*ev_fill)(xGenericEvent* ev, DeviceIntPtr pDev, + void (*ev_fill)(xGenericEvent* ev, DeviceIntPtr pDev, WindowPtr pWin, GrabPtr pGrab) ) { @@ -261,8 +261,8 @@ void GERegisterExtension( /* Sets type and extension field for a generic event. This is just an - * auxiliary function, extensions could do it manually too. - */ + * auxiliary function, extensions could do it manually too. + */ void GEInitEvent(xGenericEvent* ev, int extension) { ev->type = GenericEvent; @@ -271,7 +271,7 @@ void GEInitEvent(xGenericEvent* ev, int extension) } /* Recalculates the summary mask for the window. */ -static void +static void GERecalculateWinMask(WindowPtr pWin) { int i; @@ -300,7 +300,7 @@ GERecalculateWinMask(WindowPtr pWin) } /* Set generic event mask for given window. */ -void GEWindowSetMask(ClientPtr pClient, DeviceIntPtr pDev, +void GEWindowSetMask(ClientPtr pClient, DeviceIntPtr pDev, WindowPtr pWin, int extension, Mask mask) { GenericMaskPtr cli; @@ -403,7 +403,7 @@ BOOL GEDeviceMaskIsSet(WindowPtr pWin, DeviceIntPtr pDev, while(gemask) { - if ((!gemask->dev || gemask->dev == pDev) && + if ((!gemask->dev || gemask->dev == pDev) && (gemask->eventMask[extension] & mask)) return TRUE; diff --git a/Xext/geext.h b/Xext/geext.h index 577654a17..84539a94a 100644 --- a/Xext/geext.h +++ b/Xext/geext.h @@ -1,4 +1,4 @@ -/* +/* Copyright 2007 Peter Hutterer @@ -46,7 +46,7 @@ typedef struct _GenericMaskRec { ClientPtr client; /* client who set the event mask */ DeviceIntPtr dev; Mask eventMask[MAXEXTENSIONS]; /* one mask per extension */ - struct _GenericMaskRec* next; + struct _GenericMaskRec* next; } GenericMaskRec, *GenericMaskPtr; @@ -57,7 +57,7 @@ typedef struct _GenericMaskRec { */ typedef struct _GEExtension { void (*evswap)(xGenericEvent* from, xGenericEvent* to); - void (*evfill)(xGenericEvent* ev, + void (*evfill)(xGenericEvent* ev, DeviceIntPtr pDev, /* device */ WindowPtr pWin, /* event window */ GrabPtr pGrab /* current grab, may be NULL */ @@ -101,12 +101,12 @@ void GEWindowSetMask(ClientPtr pClient, DeviceIntPtr pDev, void GERegisterExtension( int extension, void (*ev_dispatch)(xGenericEvent* from, xGenericEvent* to), - void (*ev_fill)(xGenericEvent* ev, DeviceIntPtr pDev, + void (*ev_fill)(xGenericEvent* ev, DeviceIntPtr pDev, WindowPtr pWin, GrabPtr pGrab) ); void GEInitEvent(xGenericEvent* ev, int extension); -BOOL GEDeviceMaskIsSet(WindowPtr pWin, DeviceIntPtr pDev, +BOOL GEDeviceMaskIsSet(WindowPtr pWin, DeviceIntPtr pDev, int extension, Mask mask); void GEExtensionInit(void); diff --git a/Xext/geint.h b/Xext/geint.h index 57404d872..7747234f1 100644 --- a/Xext/geint.h +++ b/Xext/geint.h @@ -1,4 +1,4 @@ -/* +/* Copyright 2007 Peter Hutterer From 745b90cde1007383ec8c887f02439a34ab427f31 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 24 Apr 2008 11:27:22 +0930 Subject: [PATCH 412/634] Xext: re-do the XGE versioning handling. Basically the same approach RandR takes. Remember which one the client requested, send back the one the server supports. Also divide XGE server version (now defined in geext.c) and the client's version (still in the protocol definition). --- Xext/geext.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/Xext/geext.c b/Xext/geext.c index 83473226f..c6c871390 100644 --- a/Xext/geext.c +++ b/Xext/geext.c @@ -1,4 +1,4 @@ -/* +/* Copyright 2007 Peter Hutterer @@ -36,6 +36,11 @@ from the author. #include "geint.h" #include "geext.h" +/* Currently supported XGE version */ +#define SERVER_GE_MAJOR 1 +#define SERVER_GE_MINOR 0 + + int GEEventBase; int GEErrorBase; DevPrivateKey GEClientPrivateKey = &GEClientPrivateKey; @@ -73,20 +78,13 @@ static int ProcGEQueryVersion(ClientPtr client) rep.length = 0; rep.sequenceNumber = client->sequence; - if (stuff->majorVersion < GE_MAJOR) { - rep.majorVersion = stuff->majorVersion; - rep.minorVersion = stuff->minorVersion; - } else { - rep.majorVersion = GE_MAJOR; - if (stuff->majorVersion == GE_MAJOR && - stuff->minorVersion < GE_MINOR) - rep.minorVersion = stuff->minorVersion; - else - rep.minorVersion = GE_MINOR; - } + /* return the supported version by the server */ + rep.majorVersion = SERVER_GE_MAJOR; + rep.minorVersion = SERVER_GE_MINOR; - pGEClient->major_version = rep.majorVersion; - pGEClient->minor_version = rep.minorVersion; + /* Remember version the client requested */ + pGEClient->major_version = stuff->majorVersion; + pGEClient->minor_version = stuff->minorVersion; if (client->swapped) { @@ -156,7 +154,12 @@ SProcGEDispatch(ClientPtr client) return (*SProcGEVector[stuff->ReqType])(client); } -/* new client callback */ +/** + * Called when a new client inits a connection to the X server. + * + * We alloc a simple struct to store the client's major/minor version. Can be + * used in the furture for versioning support. + */ static void GEClientCallback(CallbackListPtr *list, pointer closure, pointer data) From d0890c40b9a9c7965c08608e6950c078a29aac16 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 24 Apr 2008 11:32:36 +0930 Subject: [PATCH 413/634] Xext: add a few lines of comments to XGE. --- Xext/geext.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/Xext/geext.c b/Xext/geext.c index c6c871390..19763a034 100644 --- a/Xext/geext.c +++ b/Xext/geext.c @@ -178,7 +178,7 @@ static void GEClientCallback(CallbackListPtr *list, pGEClient->minor_version = 0; } -/* reset extension */ +/* Reset extension. Called on server shutdown. */ static void GEResetProc(ExtensionEntry *extEntry) { @@ -190,7 +190,13 @@ GEResetProc(ExtensionEntry *extEntry) GEEventType = 0; } -/* Calls the registered event swap function for the extension. */ +/* Calls the registered event swap function for the extension. + * + * Each extension can register a swap function to handle GenericEvents being + * swapped properly. The server calls SGEGenericEvent() before the event is + * written on the wire, this one calls the registered swap function to do the + * work. + */ static void SGEGenericEvent(xEvent* from, xEvent* to) { @@ -207,7 +213,10 @@ SGEGenericEvent(xEvent* from, xEvent* to) GEExtensions[gefrom->extension & 0x7F].evswap(gefrom, geto); } -/* init extension, register at server */ +/* Init extension, register at server. + * Since other extensions may rely on XGE (XInput does already), it is a good + * idea to init XGE first, before any other extension. + */ void GEExtensionInit(void) { @@ -357,8 +366,8 @@ void GEWindowSetMask(ClientPtr pClient, DeviceIntPtr pDev, { pWin->optional->geMasks->geClients = cli->next; xfree(cli); - } else - { + } else + { GenericMaskPtr prev = cli; cli = cli->next; From cc13f87cd8ac54223fdb0b3d3c043dc9b9be5a42 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 24 Apr 2008 11:43:47 +0930 Subject: [PATCH 414/634] Xext: XGE: change function definition to have return value on separate line. This seems to be the common style in most parts of the server. --- Xext/geext.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/Xext/geext.c b/Xext/geext.c index 19763a034..29ddacd08 100644 --- a/Xext/geext.c +++ b/Xext/geext.c @@ -64,7 +64,8 @@ static void SGEGenericEvent(xEvent* from, xEvent* to); /* request handlers */ /************************************************************/ -static int ProcGEQueryVersion(ClientPtr client) +static int +ProcGEQueryVersion(ClientPtr client) { int n; GEClientInfoPtr pGEClient = GEGetClient(client); @@ -160,9 +161,10 @@ SProcGEDispatch(ClientPtr client) * We alloc a simple struct to store the client's major/minor version. Can be * used in the furture for versioning support. */ -static void GEClientCallback(CallbackListPtr *list, - pointer closure, - pointer data) +static void +GEClientCallback(CallbackListPtr *list, + pointer closure, + pointer data) { NewClientInfoRec *clientinfo = (NewClientInfoRec *) data; ClientPtr pClient = clientinfo->client; @@ -256,12 +258,11 @@ GEExtensionInit(void) * @param ev_fill Called for an event before delivery. The extension now has * the chance to fill in necessary fields for the event. */ -void GERegisterExtension( - int extension, - void (*ev_swap)(xGenericEvent* from, xGenericEvent* to), - void (*ev_fill)(xGenericEvent* ev, DeviceIntPtr pDev, - WindowPtr pWin, GrabPtr pGrab) - ) +void +GERegisterExtension(int extension, + void (*ev_swap)(xGenericEvent* from, xGenericEvent* to), + void (*ev_fill)(xGenericEvent* ev, DeviceIntPtr pDev, + WindowPtr pWin, GrabPtr pGrab)) { if ((extension & 0x7F) >= MAXEXTENSIONS) FatalError("GE: extension > MAXEXTENSIONS. This should not happen.\n"); @@ -275,7 +276,8 @@ void GERegisterExtension( /* Sets type and extension field for a generic event. This is just an * auxiliary function, extensions could do it manually too. */ -void GEInitEvent(xGenericEvent* ev, int extension) +void +GEInitEvent(xGenericEvent* ev, int extension) { ev->type = GenericEvent; ev->extension = extension; @@ -312,8 +314,9 @@ GERecalculateWinMask(WindowPtr pWin) } /* Set generic event mask for given window. */ -void GEWindowSetMask(ClientPtr pClient, DeviceIntPtr pDev, - WindowPtr pWin, int extension, Mask mask) +void +GEWindowSetMask(ClientPtr pClient, DeviceIntPtr pDev, + WindowPtr pWin, int extension, Mask mask) { GenericMaskPtr cli; @@ -397,8 +400,9 @@ void GEWindowSetMask(ClientPtr pClient, DeviceIntPtr pDev, * @param extension Extension ID * @param mask Event mask */ -BOOL GEDeviceMaskIsSet(WindowPtr pWin, DeviceIntPtr pDev, - int extension, Mask mask) +BOOL +GEDeviceMaskIsSet(WindowPtr pWin, DeviceIntPtr pDev, + int extension, Mask mask) { GenericMaskPtr gemask; From 7dc40c8eca90ec1bfab84b6f54418b64c0e62d63 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 24 Apr 2008 12:47:29 +0930 Subject: [PATCH 415/634] xfree86: Don't free master devices. The previous check works in the master-branch, but doesn't work with MPX. We actually copy the SD's information into the MDs public.devicePrivate, so we need to explicitly check whether a device is a MD before freeing the module. --- hw/xfree86/common/xf86Xinput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 30e0e6bd7..8ff31e845 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -490,7 +490,7 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) } RemoveDevice(pDev); - if (!pInfo) /* VCP and VCK */ + if (pDev->isMaster) return; if(drv->UnInit) From cb8cb87bc6decf75832c3724687000ecb658226e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Apr 2008 10:09:50 +0930 Subject: [PATCH 416/634] Xi: remove unused #define DISPATCH --- Xi/extinit.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Xi/extinit.c b/Xi/extinit.c index f1c282493..fa15478f3 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -458,11 +458,6 @@ SProcIDispatch(ClientPtr client) * */ -/* FIXME: this would be more concise and readable in ANSI C */ -#define DISPATCH(code) \ - if (rep->RepType == X_##code) \ - SRepX##code (client, len, (x##code##Reply *) rep) - static void SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep) /* All we look at is the type field */ From 6015b7a81252cd1729e6f4045f9b0c885c95b183 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Apr 2008 10:41:30 +0930 Subject: [PATCH 417/634] Xi: handle requests through a dispatch handler. Same principle as e.g. in the RandR extension, rather than having a load of if (type == XI_whatever) use an array of function pointers. --- Xi/extinit.c | 299 +++++++++++++++++++-------------------------------- 1 file changed, 111 insertions(+), 188 deletions(-) diff --git a/Xi/extinit.c b/Xi/extinit.c index fa15478f3..838efdd1c 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -166,6 +166,109 @@ static struct dev_type CARD8 event_base[numInputClasses]; XExtEventInfo EventInfo[32]; +/** + * Dispatch vector. Functions defined in here will be called when the matching + * request arrives. + */ +static int (*ProcIVector[])(ClientPtr) = { + NULL, /* 0 */ + ProcXGetExtensionVersion, /* 1 */ + ProcXListInputDevices, /* 2 */ + ProcXOpenDevice, /* 3 */ + ProcXCloseDevice, /* 4 */ + ProcXSetDeviceMode, /* 5 */ + ProcXSelectExtensionEvent, /* 6 */ + ProcXGetSelectedExtensionEvents, /* 7 */ + ProcXChangeDeviceDontPropagateList, /* 8 */ + ProcXGetDeviceDontPropagateList, /* 9 */ + ProcXGetDeviceMotionEvents, /* 10 */ + ProcXChangeKeyboardDevice, /* 11 */ + ProcXChangePointerDevice, /* 12 */ + ProcXGrabDevice, /* 13 */ + ProcXUngrabDevice, /* 14 */ + ProcXGrabDeviceKey, /* 15 */ + ProcXUngrabDeviceKey, /* 16 */ + ProcXGrabDeviceButton, /* 17 */ + ProcXUngrabDeviceButton, /* 18 */ + ProcXAllowDeviceEvents, /* 19 */ + ProcXGetDeviceFocus, /* 20 */ + ProcXSetDeviceFocus, /* 21 */ + ProcXGetFeedbackControl, /* 22 */ + ProcXChangeFeedbackControl, /* 23 */ + ProcXGetDeviceKeyMapping, /* 24 */ + ProcXChangeDeviceKeyMapping, /* 25 */ + ProcXGetDeviceModifierMapping, /* 26 */ + ProcXSetDeviceModifierMapping, /* 27 */ + ProcXGetDeviceButtonMapping, /* 28 */ + ProcXSetDeviceButtonMapping, /* 29 */ + ProcXQueryDeviceState, /* 30 */ + ProcXSendExtensionEvent, /* 31 */ + ProcXDeviceBell, /* 32 */ + ProcXSetDeviceValuators, /* 33 */ + ProcXGetDeviceControl, /* 34 */ + ProcXChangeDeviceControl, /* 35 */ + ProcXQueryDevicePointer, /* 36 */ + ProcXWarpDevicePointer, /* 37 */ + ProcXChangeDeviceCursor, /* 38 */ + ProcXChangeDeviceHierarchy, /* 39 */ + ProcXiSelectEvent, /* 40 */ + ProcXChangeWindowAccess, /* 41 */ + ProcXQueryWindowAccess, /* 42 */ + ProcXSetClientPointer, /* 43 */ + ProcXGetClientPointer, /* 44 */ + ProcXExtendedGrabDevice /* 45 */ +}; + +/* For swapped clients */ +static int (*SProcIVector[])(ClientPtr) = { + NULL, /* 0 */ + SProcXGetExtensionVersion, /* 1 */ + SProcXListInputDevices, /* 2 */ + SProcXOpenDevice, /* 3 */ + SProcXCloseDevice, /* 4 */ + SProcXSetDeviceMode, /* 5 */ + SProcXSelectExtensionEvent, /* 6 */ + SProcXGetSelectedExtensionEvents, /* 7 */ + SProcXChangeDeviceDontPropagateList, /* 8 */ + SProcXGetDeviceDontPropagateList, /* 9 */ + SProcXGetDeviceMotionEvents, /* 10 */ + SProcXChangeKeyboardDevice, /* 11 */ + SProcXChangePointerDevice, /* 12 */ + SProcXGrabDevice, /* 13 */ + SProcXUngrabDevice, /* 14 */ + SProcXGrabDeviceKey, /* 15 */ + SProcXUngrabDeviceKey, /* 16 */ + SProcXGrabDeviceButton, /* 17 */ + SProcXUngrabDeviceButton, /* 18 */ + SProcXAllowDeviceEvents, /* 19 */ + SProcXGetDeviceFocus, /* 20 */ + SProcXSetDeviceFocus, /* 21 */ + SProcXGetFeedbackControl, /* 22 */ + SProcXChangeFeedbackControl, /* 23 */ + SProcXGetDeviceKeyMapping, /* 24 */ + SProcXChangeDeviceKeyMapping, /* 25 */ + SProcXGetDeviceModifierMapping, /* 26 */ + SProcXSetDeviceModifierMapping, /* 27 */ + SProcXGetDeviceButtonMapping, /* 28 */ + SProcXSetDeviceButtonMapping, /* 29 */ + SProcXQueryDeviceState, /* 30 */ + SProcXSendExtensionEvent, /* 31 */ + SProcXDeviceBell, /* 32 */ + SProcXSetDeviceValuators, /* 33 */ + SProcXGetDeviceControl, /* 34 */ + SProcXChangeDeviceControl, /* 35 */ + SProcXQueryDevicePointer, /* 36 */ + SProcXWarpDevicePointer, /* 37 */ + SProcXChangeDeviceCursor, /* 38 */ + SProcXChangeDeviceHierarchy, /* 39 */ + SProcXiSelectEvent, /* 40 */ + SProcXChangeWindowAccess, /* 41 */ + SProcXQueryWindowAccess, /* 42 */ + SProcXSetClientPointer, /* 43 */ + SProcXGetClientPointer, /* 44 */ + SProcXExtendedGrabDevice /* 45 */ +}; + /***************************************************************** * * Globals referenced elsewhere in the server. @@ -246,100 +349,10 @@ static int ProcIDispatch(ClientPtr client) { REQUEST(xReq); - if (stuff->data == X_GetExtensionVersion) - return (ProcXGetExtensionVersion(client)); - if (stuff->data == X_ListInputDevices) - return (ProcXListInputDevices(client)); - else if (stuff->data == X_OpenDevice) - return (ProcXOpenDevice(client)); - else if (stuff->data == X_CloseDevice) - return (ProcXCloseDevice(client)); - else if (stuff->data == X_SetDeviceMode) - return (ProcXSetDeviceMode(client)); - else if (stuff->data == X_SelectExtensionEvent) - return (ProcXSelectExtensionEvent(client)); - else if (stuff->data == X_GetSelectedExtensionEvents) - return (ProcXGetSelectedExtensionEvents(client)); - else if (stuff->data == X_ChangeDeviceDontPropagateList) - return (ProcXChangeDeviceDontPropagateList(client)); - else if (stuff->data == X_GetDeviceDontPropagateList) - return (ProcXGetDeviceDontPropagateList(client)); - else if (stuff->data == X_GetDeviceMotionEvents) - return (ProcXGetDeviceMotionEvents(client)); - else if (stuff->data == X_ChangeKeyboardDevice) - return (ProcXChangeKeyboardDevice(client)); - else if (stuff->data == X_ChangePointerDevice) - return (ProcXChangePointerDevice(client)); - else if (stuff->data == X_GrabDevice) - return (ProcXGrabDevice(client)); - else if (stuff->data == X_UngrabDevice) - return (ProcXUngrabDevice(client)); - else if (stuff->data == X_GrabDeviceKey) - return (ProcXGrabDeviceKey(client)); - else if (stuff->data == X_UngrabDeviceKey) - return (ProcXUngrabDeviceKey(client)); - else if (stuff->data == X_GrabDeviceButton) - return (ProcXGrabDeviceButton(client)); - else if (stuff->data == X_UngrabDeviceButton) - return (ProcXUngrabDeviceButton(client)); - else if (stuff->data == X_AllowDeviceEvents) - return (ProcXAllowDeviceEvents(client)); - else if (stuff->data == X_GetDeviceFocus) - return (ProcXGetDeviceFocus(client)); - else if (stuff->data == X_SetDeviceFocus) - return (ProcXSetDeviceFocus(client)); - else if (stuff->data == X_GetFeedbackControl) - return (ProcXGetFeedbackControl(client)); - else if (stuff->data == X_ChangeFeedbackControl) - return (ProcXChangeFeedbackControl(client)); - else if (stuff->data == X_GetDeviceKeyMapping) - return (ProcXGetDeviceKeyMapping(client)); - else if (stuff->data == X_ChangeDeviceKeyMapping) - return (ProcXChangeDeviceKeyMapping(client)); - else if (stuff->data == X_GetDeviceModifierMapping) - return (ProcXGetDeviceModifierMapping(client)); - else if (stuff->data == X_SetDeviceModifierMapping) - return (ProcXSetDeviceModifierMapping(client)); - else if (stuff->data == X_GetDeviceButtonMapping) - return (ProcXGetDeviceButtonMapping(client)); - else if (stuff->data == X_SetDeviceButtonMapping) - return (ProcXSetDeviceButtonMapping(client)); - else if (stuff->data == X_QueryDeviceState) - return (ProcXQueryDeviceState(client)); - else if (stuff->data == X_SendExtensionEvent) - return (ProcXSendExtensionEvent(client)); - else if (stuff->data == X_DeviceBell) - return (ProcXDeviceBell(client)); - else if (stuff->data == X_SetDeviceValuators) - return (ProcXSetDeviceValuators(client)); - else if (stuff->data == X_GetDeviceControl) - return (ProcXGetDeviceControl(client)); - else if (stuff->data == X_ChangeDeviceControl) - return (ProcXChangeDeviceControl(client)); - else if (stuff->data == X_QueryDevicePointer) - return (ProcXQueryDevicePointer(client)); - else if (stuff->data == X_WarpDevicePointer) - return (ProcXWarpDevicePointer(client)); - else if (stuff->data == X_ChangeDeviceCursor) - return (ProcXChangeDeviceCursor(client)); - else if (stuff->data == X_ChangeDeviceHierarchy) - return (ProcXChangeDeviceHierarchy(client)); - else if (stuff->data == X_XiSelectEvent) - return (ProcXiSelectEvent(client)); - else if (stuff->data == X_ChangeWindowAccess) - return (ProcXChangeWindowAccess(client)); - else if (stuff->data == X_QueryWindowAccess) - return ProcXQueryWindowAccess(client); - else if (stuff->data == X_SetClientPointer) - return ProcXSetClientPointer(client); - else if (stuff->data == X_GetClientPointer) - return ProcXGetClientPointer(client); - else if (stuff->data == X_ExtendedGrabDevice) - return ProcXExtendedGrabDevice(client); - else { - SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); - } - return (BadRequest); + if (stuff->data > IREQUESTS || !ProcIVector[stuff->data]) + return BadRequest; + + return (*ProcIVector[stuff->data])(client); } /******************************************************************************* @@ -355,100 +368,10 @@ static int SProcIDispatch(ClientPtr client) { REQUEST(xReq); - if (stuff->data == X_GetExtensionVersion) - return (SProcXGetExtensionVersion(client)); - if (stuff->data == X_ListInputDevices) - return (SProcXListInputDevices(client)); - else if (stuff->data == X_OpenDevice) - return (SProcXOpenDevice(client)); - else if (stuff->data == X_CloseDevice) - return (SProcXCloseDevice(client)); - else if (stuff->data == X_SetDeviceMode) - return (SProcXSetDeviceMode(client)); - else if (stuff->data == X_SelectExtensionEvent) - return (SProcXSelectExtensionEvent(client)); - else if (stuff->data == X_GetSelectedExtensionEvents) - return (SProcXGetSelectedExtensionEvents(client)); - else if (stuff->data == X_ChangeDeviceDontPropagateList) - return (SProcXChangeDeviceDontPropagateList(client)); - else if (stuff->data == X_GetDeviceDontPropagateList) - return (SProcXGetDeviceDontPropagateList(client)); - else if (stuff->data == X_GetDeviceMotionEvents) - return (SProcXGetDeviceMotionEvents(client)); - else if (stuff->data == X_ChangeKeyboardDevice) - return (SProcXChangeKeyboardDevice(client)); - else if (stuff->data == X_ChangePointerDevice) - return (SProcXChangePointerDevice(client)); - else if (stuff->data == X_GrabDevice) - return (SProcXGrabDevice(client)); - else if (stuff->data == X_UngrabDevice) - return (SProcXUngrabDevice(client)); - else if (stuff->data == X_GrabDeviceKey) - return (SProcXGrabDeviceKey(client)); - else if (stuff->data == X_UngrabDeviceKey) - return (SProcXUngrabDeviceKey(client)); - else if (stuff->data == X_GrabDeviceButton) - return (SProcXGrabDeviceButton(client)); - else if (stuff->data == X_UngrabDeviceButton) - return (SProcXUngrabDeviceButton(client)); - else if (stuff->data == X_AllowDeviceEvents) - return (SProcXAllowDeviceEvents(client)); - else if (stuff->data == X_GetDeviceFocus) - return (SProcXGetDeviceFocus(client)); - else if (stuff->data == X_SetDeviceFocus) - return (SProcXSetDeviceFocus(client)); - else if (stuff->data == X_GetFeedbackControl) - return (SProcXGetFeedbackControl(client)); - else if (stuff->data == X_ChangeFeedbackControl) - return (SProcXChangeFeedbackControl(client)); - else if (stuff->data == X_GetDeviceKeyMapping) - return (SProcXGetDeviceKeyMapping(client)); - else if (stuff->data == X_ChangeDeviceKeyMapping) - return (SProcXChangeDeviceKeyMapping(client)); - else if (stuff->data == X_GetDeviceModifierMapping) - return (SProcXGetDeviceModifierMapping(client)); - else if (stuff->data == X_SetDeviceModifierMapping) - return (SProcXSetDeviceModifierMapping(client)); - else if (stuff->data == X_GetDeviceButtonMapping) - return (SProcXGetDeviceButtonMapping(client)); - else if (stuff->data == X_SetDeviceButtonMapping) - return (SProcXSetDeviceButtonMapping(client)); - else if (stuff->data == X_QueryDeviceState) - return (SProcXQueryDeviceState(client)); - else if (stuff->data == X_SendExtensionEvent) - return (SProcXSendExtensionEvent(client)); - else if (stuff->data == X_DeviceBell) - return (SProcXDeviceBell(client)); - else if (stuff->data == X_SetDeviceValuators) - return (SProcXSetDeviceValuators(client)); - else if (stuff->data == X_GetDeviceControl) - return (SProcXGetDeviceControl(client)); - else if (stuff->data == X_ChangeDeviceControl) - return (SProcXChangeDeviceControl(client)); - else if (stuff->data == X_QueryDevicePointer) - return (SProcXQueryDevicePointer(client)); - else if (stuff->data == X_WarpDevicePointer) - return (SProcXWarpDevicePointer(client)); - else if (stuff->data == X_ChangeDeviceCursor) - return (SProcXChangeDeviceCursor(client)); - else if (stuff->data == X_ChangeDeviceHierarchy) - return (SProcXChangeDeviceHierarchy(client)); - else if (stuff->data == X_XiSelectEvent) - return (SProcXiSelectEvent(client)); - else if (stuff->data == X_ChangeWindowAccess) - return (SProcXChangeWindowAccess(client)); - else if (stuff->data == X_QueryWindowAccess) - return SProcXQueryWindowAccess(client); - else if (stuff->data == X_SetClientPointer) - return SProcXSetClientPointer(client); - else if (stuff->data == X_GetClientPointer) - return SProcXGetClientPointer(client); - else if (stuff->data == X_ExtendedGrabDevice) - return SProcXExtendedGrabDevice(client); - else { - SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest); - } - return (BadRequest); + if (stuff->data > IREQUESTS || !SProcIVector[stuff->data]) + return BadRequest; + + return (*SProcIVector[stuff->data])(client); } /********************************************************************** From c14b858aeced81ff43723644f2de0f5c43f55755 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Apr 2008 11:02:12 +0930 Subject: [PATCH 418/634] Xi: fix two compiler warnings unused variable in exevents.c implicit declaration in warpdevp.c --- Xi/exevents.c | 1 - Xi/warpdevp.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index a828044fa..a83d5edb3 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -952,7 +952,6 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) KeyClassPtr k; ValuatorClassPtr v; deviceValuator *xV = (deviceValuator *) xE; - int coretype = 0; int ret = 0; ret = UpdateDeviceState(device, xE, count); diff --git a/Xi/warpdevp.c b/Xi/warpdevp.c index 26081eb59..21fe22c12 100644 --- a/Xi/warpdevp.c +++ b/Xi/warpdevp.c @@ -48,6 +48,7 @@ from the author. #include "extnsionst.h" #include "exevents.h" #include "exglobals.h" +#include "mipointer.h" /* for miPointerUpdateSprite */ #include "warpdevp.h" From d9c38e84cc492b931a2238757d438f562946e5bc Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Apr 2008 11:04:02 +0930 Subject: [PATCH 419/634] dix: remove pairingClient definition. This variable was used originally to determine which client is allowed to change the pointer-keyboard pairing. For now, we just let anyone change it and see how that works out. --- dix/devices.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 656707ca5..b3c9efcc2 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -86,8 +86,6 @@ SOFTWARE. * This file handles input device-related stuff. */ -/* The client that is allowed to change pointer-keyboard pairings. */ -static ClientPtr pairingClient = NULL; DevPrivateKey CoreDevicePrivateKey = &CoreDevicePrivateKey; /* Used to sture classes currently not in use by an MD */ DevPrivateKey UnusedClassesPrivateKey = &UnusedClassesPrivateKey; From 97552413d213337e4bff8c89b06d58a09d722b05 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Apr 2008 11:13:05 +0930 Subject: [PATCH 420/634] dix: remove "unused variable" compiler warning. --- dix/window.c | 1 - 1 file changed, 1 deletion(-) diff --git a/dix/window.c b/dix/window.c index 33e9752b6..08d738e28 100644 --- a/dix/window.c +++ b/dix/window.c @@ -367,7 +367,6 @@ CreateRootWindow(ScreenPtr pScreen) WindowPtr pWin; BoxRec box; PixmapFormatRec *format; - FocusSemaphoresPtr sem; pWin = (WindowPtr)xalloc(sizeof(WindowRec)); if (!pWin) From dcdc66fcfc7957aa7875fbf74fa3a55989a9a187 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Apr 2008 11:14:32 +0930 Subject: [PATCH 421/634] dix: add mi.h include to stop compiler warning --- dix/window.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dix/window.c b/dix/window.c index 08d738e28..98a905c44 100644 --- a/dix/window.c +++ b/dix/window.c @@ -123,6 +123,7 @@ Equipment Corporation. #endif #include "dixevents.h" #include "globals.h" +#include "mi.h" /* miPaintWindow */ #include "privates.h" #include "xace.h" From 89add4ee986e38b833bb58750b3e5a664efb6f4a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Apr 2008 11:19:12 +0930 Subject: [PATCH 422/634] dix: remove obsolete InitWindowPrivates(). --- dix/main.c | 2 -- dix/window.c | 13 ------------- include/window.h | 2 -- 3 files changed, 17 deletions(-) diff --git a/dix/main.c b/dix/main.c index f7824ee83..d99cb2d75 100644 --- a/dix/main.c +++ b/dix/main.c @@ -377,8 +377,6 @@ main(int argc, char *argv[], char *envp[]) FatalError("failed to create scratch GCs"); if (!CreateDefaultStipple(i)) FatalError("failed to create default stipple"); - if (!InitWindowPrivates(pScreen)) - FatalError("Failed to init window privates."); if (!CreateRootWindow(pScreen)) FatalError("failed to create root window"); } diff --git a/dix/window.c b/dix/window.c index 98a905c44..6b9506825 100644 --- a/dix/window.c +++ b/dix/window.c @@ -3924,19 +3924,6 @@ WindowParentHasDeviceCursor(WindowPtr pWin, return FALSE; } -/** - * Initialize some mandatory devPrivates for windows. - * - * At the moment, this includes only the enter/leave semaphore. - * - * Returns TRUE on success. - */ -_X_EXPORT Bool -InitWindowPrivates(ScreenPtr screen) -{ - /* obsolete with devPrivates rework */ -} - #ifndef NOLOGOHACK static void DrawLogo(WindowPtr pWin) diff --git a/include/window.h b/include/window.h index 8dbef2211..04cbe2627 100644 --- a/include/window.h +++ b/include/window.h @@ -269,6 +269,4 @@ extern void DisableMapUnmapEvents( extern void EnableMapUnmapEvents( WindowPtr /* pWin */ ); -Bool InitWindowPrivates( - ScreenPtr /* screen */); #endif /* WINDOW_H */ From 3fc67b4205851dcffcc431a07a885828549bd9cf Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Apr 2008 11:37:32 +0930 Subject: [PATCH 423/634] Xi: remove leftover chpkpair.h file. Used to contain declarations for ChangePointerKeyboardPairing request handling. --- Xi/chpkpair.h | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 Xi/chpkpair.h diff --git a/Xi/chpkpair.h b/Xi/chpkpair.h deleted file mode 100644 index b0d410d74..000000000 --- a/Xi/chpkpair.h +++ /dev/null @@ -1,45 +0,0 @@ -/************************************************************ - -Copyright 2006 by Peter Hutterer - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of the above listed -copyright holder(s) not be used in advertising or publicity pertaining -to distribution of the software without specific, written prior -permission. - -THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD -TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE -LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -********************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef CHPKPAIR_H -#define CHPKPAIR_H 1 - -int SProcXChangePointerKeyboardPairing(ClientPtr /* client */ - ); - -int ProcXChangePointerKeyboardPairing(ClientPtr /* client */ - ); - -void -SPointerKeyboardPairingChangedNotifyEvent (pairingChangedNotify* /* from */, - pairingChangedNotify* /* to */ - ); - -#endif /* WARPDEVP_H */ - From f5ac98747de921d48f36d4f3f66dbe73e26a6760 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Apr 2008 14:50:24 +0930 Subject: [PATCH 424/634] Standardise copyright headers for all new files created as part of MPX. --- COPYING | 1 + Xext/geext.c | 50 ++++++++++++++++------------------ Xext/geint.h | 50 ++++++++++++++++------------------ Xi/chaccess.c | 49 ++++++++++++++++----------------- Xi/chaccess.h | 49 ++++++++++++++++----------------- Xi/chdevcur.c | 49 ++++++++++++++++----------------- Xi/chdevcur.h | 48 ++++++++++++++++---------------- Xi/chdevhier.c | 49 ++++++++++++++++----------------- Xi/chdevhier.h | 49 ++++++++++++++++----------------- Xi/extgrbdev.c | 49 ++++++++++++++++----------------- Xi/extgrbdev.h | 49 ++++++++++++++++----------------- Xi/getcptr.c | 49 ++++++++++++++++----------------- Xi/getcptr.h | 48 ++++++++++++++++---------------- Xi/qryacces.c | 49 ++++++++++++++++----------------- Xi/qryacces.h | 49 ++++++++++++++++----------------- Xi/querydp.c | 49 ++++++++++++++++----------------- Xi/querydp.h | 48 ++++++++++++++++---------------- Xi/setcptr.c | 49 ++++++++++++++++----------------- Xi/setcptr.h | 49 ++++++++++++++++----------------- Xi/warpdevp.c | 49 ++++++++++++++++----------------- Xi/warpdevp.h | 48 ++++++++++++++++---------------- Xi/xiselev.c | 49 ++++++++++++++++----------------- Xi/xiselev.h | 50 ++++++++++++++++------------------ dix/access.c | 49 ++++++++++++++++----------------- hw/xfree86/common/xf86Xinput.c | 9 ------ mi/mieq.c | 7 ----- mi/mipointer.c | 7 ----- mi/misprite.c | 6 ---- 28 files changed, 534 insertions(+), 622 deletions(-) diff --git a/COPYING b/COPYING index 2b464e0d4..ddfb20189 100644 --- a/COPYING +++ b/COPYING @@ -9,6 +9,7 @@ Stone). Copyright © 2000-2001 Juliusz Chroboczek Copyright © 2006-2007 Intel Corporation Copyright © 2006 Nokia Corporation +Copyright © 2006-2008 Peter Hutterer Copyright © 1999 Keith Packard Copyright © 2005-2007 Daniel Stone Copyright © 2006 Luc Verhaegen diff --git a/Xext/geext.c b/Xext/geext.c index 29ddacd08..afede22c7 100644 --- a/Xext/geext.c +++ b/Xext/geext.c @@ -1,31 +1,27 @@ /* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ - + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/Xext/geint.h b/Xext/geint.h index 7747234f1..2e0eb094c 100644 --- a/Xext/geint.h +++ b/Xext/geint.h @@ -1,31 +1,27 @@ /* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ - + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ #ifdef HAVE_DIX_CONFIG_H #include #endif diff --git a/Xi/chaccess.c b/Xi/chaccess.c index a58409bbc..3ef29fc71 100644 --- a/Xi/chaccess.c +++ b/Xi/chaccess.c @@ -1,30 +1,27 @@ /* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ #define NEED_EVENTS #define NEED_REPLIES diff --git a/Xi/chaccess.h b/Xi/chaccess.h index 8c2c6003e..090258c9f 100644 --- a/Xi/chaccess.h +++ b/Xi/chaccess.h @@ -1,30 +1,27 @@ /* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/Xi/chdevcur.c b/Xi/chdevcur.c index 0a149008a..867bf9787 100644 --- a/Xi/chdevcur.c +++ b/Xi/chdevcur.c @@ -1,30 +1,27 @@ /* - -Copyright 2006 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ /*********************************************************************** * diff --git a/Xi/chdevcur.h b/Xi/chdevcur.h index 92c8d4f0d..af8627913 100644 --- a/Xi/chdevcur.h +++ b/Xi/chdevcur.h @@ -1,27 +1,27 @@ -/************************************************************ - -Copyright 2006 by Peter Hutterer - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of the above listed -copyright holder(s) not be used in advertising or publicity pertaining -to distribution of the software without specific, written prior -permission. - -THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD -TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE -LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -********************************************************/ +/* + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/Xi/chdevhier.c b/Xi/chdevhier.c index 36797d90c..1d5784364 100644 --- a/Xi/chdevhier.c +++ b/Xi/chdevhier.c @@ -1,30 +1,27 @@ /* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ /*********************************************************************** * diff --git a/Xi/chdevhier.h b/Xi/chdevhier.h index 1853fa720..85c1a39a7 100644 --- a/Xi/chdevhier.h +++ b/Xi/chdevhier.h @@ -1,30 +1,27 @@ /* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ /*********************************************************************** * diff --git a/Xi/extgrbdev.c b/Xi/extgrbdev.c index 6458404b7..c92c31dcd 100644 --- a/Xi/extgrbdev.c +++ b/Xi/extgrbdev.c @@ -1,30 +1,27 @@ /* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ /*********************************************************************** * diff --git a/Xi/extgrbdev.h b/Xi/extgrbdev.h index 93075b177..7e2b0ea83 100644 --- a/Xi/extgrbdev.h +++ b/Xi/extgrbdev.h @@ -1,30 +1,27 @@ /* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/Xi/getcptr.c b/Xi/getcptr.c index ba69f9c56..c85fced68 100644 --- a/Xi/getcptr.c +++ b/Xi/getcptr.c @@ -1,30 +1,27 @@ /* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ #define NEED_EVENTS #define NEED_REPLIES diff --git a/Xi/getcptr.h b/Xi/getcptr.h index 456d1bac2..cf8cd2e45 100644 --- a/Xi/getcptr.h +++ b/Xi/getcptr.h @@ -1,27 +1,27 @@ -/************************************************************ - -Copyright 2007 by Peter Hutterer - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of the above listed -copyright holder(s) not be used in advertising or publicity pertaining -to distribution of the software without specific, written prior -permission. - -THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD -TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE -LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -********************************************************/ +/* + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/Xi/qryacces.c b/Xi/qryacces.c index ab627e2b1..b3cc27a39 100644 --- a/Xi/qryacces.c +++ b/Xi/qryacces.c @@ -1,30 +1,27 @@ /* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ #define NEED_EVENTS #define NEED_REPLIES diff --git a/Xi/qryacces.h b/Xi/qryacces.h index 5fce9aec2..085d93a8b 100644 --- a/Xi/qryacces.h +++ b/Xi/qryacces.h @@ -1,30 +1,27 @@ /* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/Xi/querydp.c b/Xi/querydp.c index ac11025b3..bd0a1c54e 100644 --- a/Xi/querydp.c +++ b/Xi/querydp.c @@ -1,30 +1,27 @@ /* - -Copyright 2006 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ /*********************************************************************** * diff --git a/Xi/querydp.h b/Xi/querydp.h index acad548ab..e8c5165ba 100644 --- a/Xi/querydp.h +++ b/Xi/querydp.h @@ -1,27 +1,27 @@ -/************************************************************ - -Copyright 2006 by Peter Hutterer - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of the above listed -copyright holder(s) not be used in advertising or publicity pertaining -to distribution of the software without specific, written prior -permission. - -THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD -TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE -LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -********************************************************/ +/* + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/Xi/setcptr.c b/Xi/setcptr.c index 7313a9d92..f73a44cb0 100644 --- a/Xi/setcptr.c +++ b/Xi/setcptr.c @@ -1,30 +1,27 @@ /* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ /*********************************************************************** * diff --git a/Xi/setcptr.h b/Xi/setcptr.h index 0c24fd4dd..114623cc4 100644 --- a/Xi/setcptr.h +++ b/Xi/setcptr.h @@ -1,30 +1,27 @@ /* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/Xi/warpdevp.c b/Xi/warpdevp.c index 21fe22c12..5ea613205 100644 --- a/Xi/warpdevp.c +++ b/Xi/warpdevp.c @@ -1,30 +1,27 @@ /* - -Copyright 2006 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ /*********************************************************************** * diff --git a/Xi/warpdevp.h b/Xi/warpdevp.h index 8ce5b7098..7034e163a 100644 --- a/Xi/warpdevp.h +++ b/Xi/warpdevp.h @@ -1,27 +1,27 @@ -/************************************************************ - -Copyright 2006 by Peter Hutterer - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of the above listed -copyright holder(s) not be used in advertising or publicity pertaining -to distribution of the software without specific, written prior -permission. - -THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD -TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE -LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -********************************************************/ +/* + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/Xi/xiselev.c b/Xi/xiselev.c index 2bfbd82c5..fc0a0f0f5 100644 --- a/Xi/xiselev.c +++ b/Xi/xiselev.c @@ -1,30 +1,27 @@ /* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ #define NEED_EVENTS #define NEED_REPLIES diff --git a/Xi/xiselev.h b/Xi/xiselev.h index 91028159b..e84640744 100644 --- a/Xi/xiselev.h +++ b/Xi/xiselev.h @@ -1,31 +1,27 @@ /* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ - + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/dix/access.c b/dix/access.c index dc66db897..e29ab867f 100644 --- a/dix/access.c +++ b/dix/access.c @@ -1,30 +1,27 @@ /* - -Copyright 2007 Peter Hutterer - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the author shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the author. - -*/ + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, UniSA, NICTA + */ /* This file controls the access control lists for each window. * Each device can be explicitely allowed or denied access to a given window. diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 8ff31e845..9f293cc5d 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -46,15 +46,6 @@ * authorization from the copyright holder(s) and author(s). */ - /* - * MPX additions: - * Copyright © 2006 Peter Hutterer - * License see above. - * Author: Peter Hutterer - * - */ - - #ifdef HAVE_XORG_CONFIG_H #include #endif diff --git a/mi/mieq.c b/mi/mieq.c index 1c85030a3..082ebab91 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -24,13 +24,6 @@ in this Software without prior written authorization from The Open Group. * * Author: Keith Packard, MIT X Consortium */ - /* - * MPX additions: - * Copyright © 2006 Peter Hutterer - * License see above. - * Author: Peter Hutterer - * - */ /* * mieq.c diff --git a/mi/mipointer.c b/mi/mipointer.c index 42d38c084..8f8086cc9 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -22,13 +22,6 @@ Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ - /* - * MPX additions: - * Copyright © 2006 Peter Hutterer - * License see above. - * Author: Peter Hutterer - * - */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/mi/misprite.c b/mi/misprite.c index 2be814fdc..c998e556a 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -29,12 +29,6 @@ Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* - * MPX additions: - * Copyright © 2006 Peter Hutterer - * Author: Peter Hutterer - * - */ #ifdef HAVE_DIX_CONFIG_H #include From 93ee33830778b9ec85ad81496572677a30022b09 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Apr 2008 15:02:13 +0930 Subject: [PATCH 425/634] dix: let PickPointer() return devices that are core-grabbed by the client. If the client currently holds a core grab on any device, this device has priority, even over the ClientPointer. --- dix/events.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/dix/events.c b/dix/events.c index 04342fc0f..9bf40f8da 100644 --- a/dix/events.c +++ b/dix/events.c @@ -6435,10 +6435,31 @@ SetClientPointer(ClientPtr client, ClientPtr setter, DeviceIntPtr device) return TRUE; } -/* PickPointer will pick an appropriate pointer for the given client. */ +/* PickPointer will pick an appropriate pointer for the given client. + * + * An "appropriate device" is (in order of priority): + * 1) A device the given client has a core grab on. + * 2) A device set as ClientPointer for the given client. + * 3) The first master device. + */ _X_EXPORT DeviceIntPtr PickPointer(ClientPtr client) { + DeviceIntPtr it = inputInfo.devices; + + /* First, check if the client currently has a grab on a device. Even + * keyboards count. */ + for(it = inputInfo.devices; it; it = it->next) + { + GrabPtr grab = it->deviceGrab.grab; + if (grab && grab->coreGrab && SameClient(grab, client)) + { + if (!IsPointerDevice(it)) + it = GetPairedDevice(it); + return it; /* Always return a core grabbed device */ + } + } + if (!client->clientPtr) { DeviceIntPtr it = inputInfo.devices; From 6198bad07edc51ff4a264a9361c5e9b6c74647a6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Apr 2008 15:02:40 +0930 Subject: [PATCH 426/634] dix: remove misleading (stale) comment --- dix/events.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/dix/events.c b/dix/events.c index 9bf40f8da..5919e2641 100644 --- a/dix/events.c +++ b/dix/events.c @@ -6479,8 +6479,6 @@ PickPointer(ClientPtr client) /* PickKeyboard will pick an appropriate keyboard for the given client by * searching the list of devices for the keyboard device that is paired with * the client's pointer. - * If no pointer is paired with the keyboard, the virtual core keyboard is - * returned. */ _X_EXPORT DeviceIntPtr PickKeyboard(ClientPtr client) From b093bf3ec37367172be3b44a04f0f43890ba7d7d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Apr 2008 15:15:31 +0930 Subject: [PATCH 427/634] dix: don't search for grabbed devices, PickPointer does it for us now. Follow-up to 93ee33830778b9ec85ad81496572677a30022b09. --- dix/events.c | 157 +++------------------------------------------------ 1 file changed, 8 insertions(+), 149 deletions(-) diff --git a/dix/events.c b/dix/events.c index 5919e2641..779be813f 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1861,44 +1861,20 @@ AllowSome(ClientPtr client, * Server-side protocol handling for AllowEvents request. * * Release some events from a frozen device. - * - * In some cases, the grab the client has is not on the ClientPointer but on - * some other device (see ProcGrabPointer comments). To cover this case, we - * need to run through all devices to ensure we don't forget the device we - * actually have a grab on. */ int ProcAllowEvents(ClientPtr client) { TimeStamp time; - DeviceIntPtr mouse = NULL, - grabbed; + DeviceIntPtr mouse = NULL; DeviceIntPtr keybd = NULL; - GrabPtr grab; REQUEST(xAllowEventsReq); REQUEST_SIZE_MATCH(xAllowEventsReq); time = ClientTimeToServerTime(stuff->time); - for (grabbed = inputInfo.devices; grabbed; grabbed = grabbed->next) - { - grab = grabbed->deviceGrab.grab; - if (grab && grab->coreGrab && SameClient(grab, client)) - { - if (IsPointerDevice(grabbed)) - mouse = grabbed; - else if (IsKeyboardDevice(grabbed)) - keybd = grabbed; - - if (mouse && keybd) - break; - } - } - - if (!mouse) - mouse = PickPointer(client); - if (!keybd) - keybd = PickKeyboard(client); + mouse = PickPointer(client); + keybd = PickKeyboard(client); switch (stuff->mode) { @@ -5061,12 +5037,6 @@ ProcGetInputFocus(ClientPtr client) * * Sets an active grab on the client's ClientPointer and returns success * status to client. - * - * A special case of GrabPointer is when there is already a grab on some - * device (by the same client). In this case, this grab is overwritten, and - * the device stays as it is. This case can happen when a client has a passive - * grab and then grabs the pointer, or when the client already has an active - * grab and the ClientPointer was changed since. */ int ProcGrabPointer(ClientPtr client) @@ -5080,7 +5050,6 @@ ProcGrabPointer(ClientPtr client) TimeStamp time; Mask access_mode = DixGrabAccess; int rc; - DeviceIntPtr grabbed = NULL; REQUEST_SIZE_MATCH(xGrabPointerReq); UpdateCurrentTime(); @@ -5144,20 +5113,6 @@ ProcGrabPointer(ClientPtr client) rep.sequenceNumber = client->sequence; rep.length = 0; - /* Check if a the client already has a grab on a device */ - for(grabbed = inputInfo.devices; grabbed; grabbed = grabbed->next) - { - if (IsPointerDevice(grabbed)) - { - grab = grabbed->deviceGrab.grab; - if (grab && grab->coreGrab && SameClient(grab, client)) - { - device = grabbed; - break; - } - } - } - grab = device->deviceGrab.grab; /* check for 1. other client has a grab on the device already. @@ -5219,15 +5174,11 @@ ProcGrabPointer(ClientPtr client) * * Changes properties of the grab hold by the client. If the client does not * hold an active grab on the device, nothing happens. - * - * Works on the client's ClientPointer, but in some cases the client may have - * a grab on a device that isn't the ClientPointer (see ProcGrabPointer - * comments). */ int ProcChangeActivePointerGrab(ClientPtr client) { - DeviceIntPtr device, grabbed; + DeviceIntPtr device; GrabPtr grab; CursorPtr newCursor, oldCursor; REQUEST(xChangeActivePointerGrabReq); @@ -5255,26 +5206,6 @@ ProcChangeActivePointerGrab(ClientPtr client) device = PickPointer(client); grab = device->deviceGrab.grab; - if (!grab || !SameClient(grab, client)) - { - /* no grab on ClientPointer, or some other client has a grab on our - * ClientPointer, let's check if we have a pointer grab on some other - * device. */ - for(grabbed = inputInfo.devices; grabbed; grabbed = grabbed->next) - { - if (IsPointerDevice(grabbed)) - { - grab = grabbed->deviceGrab.grab; - if (grab && grab->coreGrab && SameClient(grab, client)) - { - device = grabbed; - grab = device->deviceGrab.grab; - break; - } - } - } - } - if (!grab) return Success; if (!SameClient(grab, client)) @@ -5297,17 +5228,12 @@ ProcChangeActivePointerGrab(ClientPtr client) /** * Server-side protocol handling for UngrabPointer request. * - * Deletes a pointer grab on a device the client has grabbed. This should be - * the ClientPointer, but may not be. So we search the device list for a - * device we have a pointer grab on and then ungrab this device. (see - * ProcGrabPointer comments). We are guaranteed that the client doesn't have - * more than one core pointer grab at a time. + * Deletes a pointer grab on a device the client has grabbed. */ int ProcUngrabPointer(ClientPtr client) { - DeviceIntPtr device = PickPointer(client), - grabbed; + DeviceIntPtr device = PickPointer(client); GrabPtr grab; TimeStamp time; REQUEST(xResourceReq); @@ -5316,30 +5242,6 @@ ProcUngrabPointer(ClientPtr client) UpdateCurrentTime(); grab = device->deviceGrab.grab; - if (!grab || !grab->coreGrab || !SameClient(grab, client)) - { - /* No pointer grab on ClientPointer. May be a pointer grab on some - * other device */ - for(grabbed = inputInfo.devices; grabbed; grabbed = grabbed->next) - { - if (IsPointerDevice(grabbed)) - { - grab = grabbed->deviceGrab.grab; - if (grab && grab->coreGrab && SameClient(grab, client)) - { - device = grabbed; - break; - } - } - } - /* nope. no grab on any actual device */ - if (!grabbed) - { - device = inputInfo.pointer; - grab = inputInfo.pointer->deviceGrab.grab; - } - } - time = ClientTimeToServerTime(stuff->id); if ((CompareTimeStamps(time, currentTime) != LATER) && (CompareTimeStamps(time, device->deviceGrab.grabTime) != EARLIER) && @@ -5487,15 +5389,6 @@ RemoveOtherCoreGrabs(ClientPtr client, DeviceIntPtr dev) * Server-side protocol handling for GrabKeyboard request. * * Grabs the client's keyboard and returns success status to client. - * - * In some special cases the client may already have a grab on a keyboard that - * is not the one that is paired with the ClientPointer. This can happen when - * the client alreay has a passive grab on some keyboard device, or when the - * client actively grabbed the keyboard and the ClientPointer or keyboard - * pairing was changed since. - * Therefore, we need to run through all the keyboards available and check if - * there's already a grab on it from our client. The client will only ever - * have one core keyboard grab at a time. */ int ProcGrabKeyboard(ClientPtr client) @@ -5503,24 +5396,10 @@ ProcGrabKeyboard(ClientPtr client) xGrabKeyboardReply rep; REQUEST(xGrabKeyboardReq); int result; - DeviceIntPtr keyboard = PickKeyboard(client), - grabbed; - GrabPtr grab; + DeviceIntPtr keyboard = PickKeyboard(client); REQUEST_SIZE_MATCH(xGrabKeyboardReq); - for (grabbed = inputInfo.devices; grabbed; grabbed = grabbed->next) - { - if (IsKeyboardDevice(grabbed)) - { - grab = grabbed->deviceGrab.grab; - if (grab && grab->coreGrab && SameClient(grab, client)) - { - keyboard = grabbed; - break; - } - } - } result = GrabDevice(client, keyboard, stuff->keyboardMode, stuff->pointerMode, stuff->grabWindow, stuff->ownerEvents, stuff->time, @@ -5542,16 +5421,11 @@ ProcGrabKeyboard(ClientPtr client) * Server-side protocol handling for UngrabKeyboard request. * * Deletes a possible grab on the client's keyboard. - * - * We may have a grab on a keyboard that isn't the ClientPointer's keyboard. - * Thus we need to check all keyboar devices for a grab. (see ProcGrabKeyboard - * comments) */ int ProcUngrabKeyboard(ClientPtr client) { - DeviceIntPtr device = PickKeyboard(client), - grabbed; + DeviceIntPtr device = PickKeyboard(client); GrabPtr grab; TimeStamp time; REQUEST(xResourceReq); @@ -5561,21 +5435,6 @@ ProcUngrabKeyboard(ClientPtr client) grab = device->deviceGrab.grab; - if (!grab || !grab->coreGrab || !SameClient(grab, client)) - { - for (grabbed = inputInfo.devices; grabbed; grabbed = grabbed->next) - { - if (IsKeyboardDevice(grabbed)) - { - grab = device->deviceGrab.grab; - if (grab && grab->coreGrab && SameClient(grab, client)) - { - device = grabbed; - break; - } - } - } - } grab = device->deviceGrab.grab; time = ClientTimeToServerTime(stuff->id); From be5ff2b8d8a392eb8611e1fcd6da4752d68a7f9d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Apr 2008 16:25:13 +0930 Subject: [PATCH 428/634] Xi: remove some superflous code --- Xi/getvers.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Xi/getvers.c b/Xi/getvers.c index a4afe808f..1e17eea5a 100644 --- a/Xi/getvers.c +++ b/Xi/getvers.c @@ -85,7 +85,7 @@ SProcXGetExtensionVersion(ClientPtr client) /*********************************************************************** * - * This procedure lists the input devices available to the server. + * This procedure returns the major/minor version of the X Input extension. * */ @@ -105,14 +105,10 @@ ProcXGetExtensionVersion(ClientPtr client) rep.RepType = X_GetExtensionVersion; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.major_version = 0; - rep.minor_version = 0; - rep.present = TRUE; - if (rep.present) { - rep.major_version = AllExtensionVersions[IReqCode - 128].major_version; - rep.minor_version = AllExtensionVersions[IReqCode - 128].minor_version; - } + rep.major_version = AllExtensionVersions[IReqCode - 128].major_version; + rep.minor_version = AllExtensionVersions[IReqCode - 128].minor_version; + WriteReplyToClient(client, sizeof(xGetExtensionVersionReply), &rep); return Success; From 1d0438de176551aaeff549664f00b8bd83d465af Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Apr 2008 16:28:58 +0930 Subject: [PATCH 429/634] Xi: remove RemoveOtherCoreGrabs() PickPointer() returns grabbed devices, so we can't get a double grab anyway. --- dix/events.c | 47 ----------------------------------------------- include/dix.h | 4 ---- 2 files changed, 51 deletions(-) diff --git a/dix/events.c b/dix/events.c index 779be813f..73b7fa0f2 100644 --- a/dix/events.c +++ b/dix/events.c @@ -5161,9 +5161,6 @@ ProcGrabPointer(ClientPtr client) if (oldCursor) FreeCursor (oldCursor, (Cursor)0); rep.status = GrabSuccess; - - /* guarantee only one core pointer grab at a time by this client */ - RemoveOtherCoreGrabs(client, device); } WriteReplyToClient(client, sizeof(xGrabPointerReply), &rep); return Success; @@ -5344,47 +5341,6 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, return Success; } -/** - * Deactivate any core grabs on the given client except the given device. - * - * This fixes race conditions where clients deal with implicit passive grabs - * on one device, but then actively grab their client pointer, which is - * another device. - * - * Grabs are only removed if the other device matches the type of device. If - * dev is a pointer device, only other pointer grabs are removed. Likewise, if - * dev is a keyboard device, only keyboard grabs are removed. - * - * If dev doesn't have a grab, do nothing and go for a beer. - * - * @param client The client that is to be limited. - * @param dev The only device allowed to have a grab on the client. - */ - -_X_EXPORT void -RemoveOtherCoreGrabs(ClientPtr client, DeviceIntPtr dev) -{ - if (!dev || !dev->deviceGrab.grab) - return; - - DeviceIntPtr it = inputInfo.devices; - for (; it; it = it->next) - { - if (it == dev) - continue; - /* check for IsPointer Device */ - - if (it->deviceGrab.grab && - it->deviceGrab.grab->coreGrab && - SameClient(it->deviceGrab.grab, client)) - { - if ((IsPointerDevice(dev) && IsPointerDevice(it)) || - (IsKeyboardDevice(dev) && IsKeyboardDevice(it))) - (*it->deviceGrab.DeactivateGrab)(it); - } - } -} - /** * Server-side protocol handling for GrabKeyboard request. * @@ -5405,9 +5361,6 @@ ProcGrabKeyboard(ClientPtr client) stuff->ownerEvents, stuff->time, KeyPressMask | KeyReleaseMask, &rep.status, TRUE); - /* ensure only one core keyboard grab by this client */ - RemoveOtherCoreGrabs(client, keyboard); - if (result != Success) return result; rep.type = X_Reply; diff --git a/include/dix.h b/include/dix.h index 57ffee9b9..970b1d880 100644 --- a/include/dix.h +++ b/include/dix.h @@ -460,10 +460,6 @@ extern int GrabDevice( CARD8 * /* status */, Bool /* coreGrab */); -extern void RemoveOtherCoreGrabs( - ClientPtr /* client */, - DeviceIntPtr /* dev */); - extern void InitEvents(void); extern void InitSprite( DeviceIntPtr /* pDev */, From e251c9e75afdc5e32f2bc9801712272358934266 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Apr 2008 16:49:35 +0930 Subject: [PATCH 430/634] Remove all traces of #ifdef XINPUT and the matching bits from the configure.ac --- configure.ac | 2 +- hw/dmx/dmxclient.h | 2 -- hw/dmx/dmxlog.c | 4 ---- hw/dmx/dmxlog.h | 2 -- hw/dmx/input/dmxcommon.h | 4 ---- hw/dmx/input/dmxeq.c | 23 +++++------------------ hw/dmx/input/dmxevents.c | 14 -------------- hw/dmx/input/dmxinputinit.c | 19 ------------------- hw/xfree86/common/xf86Config.c | 2 -- hw/xfree86/common/xf86Cursor.c | 2 -- hw/xfree86/common/xf86Globals.c | 2 -- hw/xfree86/common/xf86Init.c | 4 ---- hw/xfree86/common/xf86MiscExt.c | 4 ---- hw/xfree86/common/xf86Privstr.h | 2 -- hw/xfree86/common/xf86Xinput.c | 6 ------ hw/xfree86/common/xf86Xinput.h | 4 ---- hw/xfree86/loader/dixsym.c | 6 ++---- hw/xfree86/loader/loadmod.c | 2 -- hw/xfree86/loader/xf86sym.c | 6 ------ hw/xgl/egl/kinput.c | 2 -- hw/xprint/ddxInit.c | 4 ---- hw/xquartz/darwin.c | 2 -- hw/xwin/winmouse.c | 8 ++++---- include/dix-config.h.in | 3 --- include/globals.h | 2 -- include/windowstr.h | 6 ------ mi/miinitext.c | 8 -------- os/utils.c | 2 -- 28 files changed, 12 insertions(+), 135 deletions(-) diff --git a/configure.ac b/configure.ac index d3a231705..166d9f603 100644 --- a/configure.ac +++ b/configure.ac @@ -1004,7 +1004,7 @@ DAMAGE_INC='-I$(top_srcdir)/damageext' MIEXT_DAMAGE_LIB='$(top_builddir)/miext/damage/libdamage.la' MIEXT_DAMAGE_INC='-I$(top_srcdir)/miext/damage' -AC_DEFINE(XINPUT, 1, [Support X Input extension]) +# XINPUT extension is integral part of the server XI_LIB='$(top_builddir)/Xi/libXi.la' XI_INC='-I$(top_srcdir)/Xi' diff --git a/hw/dmx/dmxclient.h b/hw/dmx/dmxclient.h index 8f018d153..91ba0493c 100644 --- a/hw/dmx/dmxclient.h +++ b/hw/dmx/dmxclient.h @@ -98,9 +98,7 @@ typedef XID KeySym64; #include #endif -#ifdef XINPUT #include -#endif /* Always include these, since we query them even if we don't export XINPUT. */ #include /* For XDevice */ diff --git a/hw/dmx/dmxlog.c b/hw/dmx/dmxlog.c index 31a74cdf1..94b803528 100644 --- a/hw/dmx/dmxlog.c +++ b/hw/dmx/dmxlog.c @@ -42,10 +42,8 @@ #include "dmx.h" #include "dmxlog.h" #include "dmxinput.h" -#ifdef XINPUT #include #include -#endif static dmxLogLevel dmxCurrentLogLevel = dmxDebug; @@ -279,7 +277,6 @@ void dmxLogVisual(DMXScreenInfo *dmxScreen, XVisualInfo *vi, int defaultVisual) } } -#ifdef XINPUT /** Translate a (normalized) XInput event \a type into a human-readable * string. */ const char *dmxXInputEventName(int type) @@ -304,7 +301,6 @@ const char *dmxXInputEventName(int type) } } -#endif #endif /** Translate an event \a type into a human-readable string. */ diff --git a/hw/dmx/dmxlog.h b/hw/dmx/dmxlog.h index 8a5f725c8..7b614bd73 100644 --- a/hw/dmx/dmxlog.h +++ b/hw/dmx/dmxlog.h @@ -70,9 +70,7 @@ extern void dmxLogInputCont(DMXInputInfo *dmxInput, const char *format, ...); extern void dmxLogArgs(dmxLogLevel logLevel, int argc, char **argv); extern void dmxLogVisual(DMXScreenInfo *dmxScreen, XVisualInfo *vi, int defaultVisual); -#ifdef XINPUT extern const char *dmxXInputEventName(int type); #endif -#endif #endif diff --git a/hw/dmx/input/dmxcommon.h b/hw/dmx/input/dmxcommon.h index 1cc935d0b..a9b260cd9 100644 --- a/hw/dmx/input/dmxcommon.h +++ b/hw/dmx/input/dmxcommon.h @@ -63,13 +63,9 @@ #define DMX_COMMON_XKB DMX_COMMON_OTHER #endif -#ifdef XINPUT #define DMX_COMMON_PRIVATE \ DMX_COMMON_XKB; \ XDevice *xi -#else -#define DMX_COMMON_PRIVATE DMX_COMMON_OTHER -#endif #define GETONLYPRIVFROMPRIVATE \ myPrivate *priv = private diff --git a/hw/dmx/input/dmxeq.c b/hw/dmx/input/dmxeq.c index dff0b4423..afa2b2cd3 100644 --- a/hw/dmx/input/dmxeq.c +++ b/hw/dmx/input/dmxeq.c @@ -79,10 +79,8 @@ #include "inputstr.h" #include "scrnintstr.h" /* For screenInfo */ -#ifdef XINPUT #include #define EXTENSION_PROC_ARGS void * -#endif #if DMX_EQ_DEBUG #define DMXDBG2(f,a,b) dmxLog(dmxDebug,f,a,b) @@ -100,9 +98,7 @@ typedef struct _Event { xEvent event; /**< Event. */ ScreenPtr pScreen; /**< Screen on which event occurred. */ -#ifdef XINPUT deviceValuator valuator; /**< XInput device valuator information. */ -#endif } EventRec, *EventPtr; /** Event queue. */ @@ -183,15 +179,11 @@ void dmxeqEnqueue(xEvent *e) /* Store the event in the queue */ dmxEventQueue.events[oldtail].event = *e; -#ifdef XINPUT - { - /* If this is an XInput event, store the - * valuator event, too */ - deviceKeyButtonPointer *ev = (deviceKeyButtonPointer *)e; - if (e->u.u.type >= LASTEvent && (ev->deviceid & MORE_EVENTS)) - dmxEventQueue.events[oldtail].valuator = *(deviceValuator *)(ev+1); - } -#endif + /* If this is an XInput event, store the + * valuator event, too */ + deviceKeyButtonPointer *ev = (deviceKeyButtonPointer *)e; + if (e->u.u.type >= LASTEvent && (ev->deviceid & MORE_EVENTS)) + dmxEventQueue.events[oldtail].valuator = *(deviceValuator *)(ev+1); /* Make sure that event times don't go * backwards - this is "unnecessary", @@ -211,7 +203,6 @@ void dmxeqSwitchScreen(ScreenPtr pScreen, Bool fromDIX) if (fromDIX) dmxEventQueue.pDequeueScreen = pScreen; } -#ifdef XINPUT static void dmxeqProcessXInputEvent(xEvent *xe, EventRec *e) { deviceKeyButtonPointer *ev = (deviceKeyButtonPointer *)xe; @@ -238,7 +229,6 @@ static void dmxeqProcessXInputEvent(xEvent *xe, EventRec *e) pDevice->public.processInputProc(xe, pDevice, 1); } } -#endif /** * This function is called from #ProcessInputEvents() to remove events @@ -285,11 +275,8 @@ void dmxeqProcessInputEvents(void) (DeviceIntPtr)dmxEventQueue.pKbd, 1); break; default: -#ifdef XINPUT dmxeqProcessXInputEvent(xe, e); break; -#endif - /* ifndef XINPUT, fall through */ case ButtonPress: case ButtonRelease: case MotionNotify: diff --git a/hw/dmx/input/dmxevents.c b/hw/dmx/input/dmxevents.c index 26dc067dc..2e24ff42f 100644 --- a/hw/dmx/input/dmxevents.c +++ b/hw/dmx/input/dmxevents.c @@ -57,9 +57,7 @@ #include "mipointer.h" #include "mi.h" -#ifdef XINPUT #include "XIstubs.h" -#endif static int dmxGlobalX, dmxGlobalY; /* Global cursor position */ static int dmxGlobalInvalid; /* Flag indicating dmxCoreMotion @@ -154,7 +152,6 @@ static int dmxCheckFunctionKeys(DMXLocalInputInfoPtr dmxLocal, return 0; } -#ifdef XINPUT static void dmxEnqueueExtEvent(DMXLocalInputInfoPtr dmxLocal, xEvent *e, DMXBlockType block) { @@ -208,7 +205,6 @@ static void dmxEnqueueExtEvent(DMXLocalInputInfoPtr dmxLocal, xEvent *e, if (block) dmxSigioUnblock(); } -#endif DMXScreenInfo *dmxFindFirstScreen(int x, int y) { @@ -331,7 +327,6 @@ dmxCoreMotion(DevicePtr pDev, int x, int y, int delta, DMXBlockType block) -#ifdef XINPUT #define DMX_MAX_AXES 32 /* Max axes reported by this routine */ static void dmxExtMotion(DMXLocalInputInfoPtr dmxLocal, int *v, int firstAxis, int axesCount, @@ -537,7 +532,6 @@ static int dmxTranslateAndEnqueueExtEvent(DMXLocalInputInfoPtr dmxLocal, } return 0; } -#endif static int dmxGetButtonMapping(DMXLocalInputInfoPtr dmxLocal, int button) { @@ -578,14 +572,12 @@ void dmxInvalidateGlobalPosition(void) void dmxMotion(DevicePtr pDev, int *v, int firstAxes, int axesCount, DMXMotionType type, DMXBlockType block) { -#ifdef XINPUT GETDMXLOCALFROMPDEV; if (!dmxLocal->sendsCore) { dmxExtMotion(dmxLocal, v, firstAxes, axesCount, type, block); return; } -#endif if (axesCount == 2) { switch (type) { case DMX_RELATIVE: @@ -739,17 +731,13 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym, * control of the input device LEDs. */ return; default: -#ifdef XINPUT if (type == ProximityIn || type == ProximityOut) { if (dmxLocal->sendsCore) return; /* Not a core event */ break; } -#endif if (type >= LASTEvent) { -#ifdef XINPUT if (dmxTranslateAndEnqueueExtEvent(dmxLocal, e, block)) -#endif dmxLogInput(dmxInput, "Unhandled extension event: %d\n", type); } else { dmxLogInput(dmxInput, "Unhandled event: %d (%s)\n", @@ -764,11 +752,9 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym, xE.u.u.detail = detail; xE.u.keyButtonPointer.time = GetTimeInMillis(); -#ifdef XINPUT if (!dmxLocal->sendsCore) dmxEnqueueExtEvent(dmxLocal, &xE, block); else -#endif dmxeqEnqueue(&xE); #endif /*00*/ } diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c index fd4eeaacb..7b5cc73a3 100644 --- a/hw/dmx/input/dmxinputinit.c +++ b/hw/dmx/input/dmxinputinit.c @@ -73,13 +73,11 @@ #include "windowstr.h" #include "mi.h" -#ifdef XINPUT #include #include #include "exevents.h" #define EXTENSION_PROC_ARGS void * #include "extinit.h" -#endif /* From XI.h */ #ifndef Relative @@ -462,9 +460,7 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what) GETDMXINPUTFROMPDEVICE; int fd; DMXLocalInitInfo info; -#ifdef XINPUT int i; -#endif if (dmxInput->detached) return Success; @@ -504,41 +500,33 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what) GetMaximumEventsNum(), #endif Relative); -#ifdef XINPUT for (i = 0; i < info.numRelAxes; i++) InitValuatorAxisStruct(pDevice, i, info.minval[0], info.maxval[0], info.res[0], info.minres[0], info.maxres[0]); -#endif } else if (info.numRelAxes) { InitValuatorClassDeviceStruct(pDevice, info.numRelAxes, dmxPointerGetMotionEvents, dmxPointerGetMotionBufferSize(), Relative); -#ifdef XINPUT for (i = 0; i < info.numRelAxes; i++) InitValuatorAxisStruct(pDevice, i, info.minval[0], info.maxval[0], info.res[0], info.minres[0], info.maxres[0]); -#endif } else if (info.numAbsAxes) { InitValuatorClassDeviceStruct(pDevice, info.numAbsAxes, dmxPointerGetMotionEvents, dmxPointerGetMotionBufferSize(), Absolute); -#ifdef XINPUT for (i = 0; i < info.numAbsAxes; i++) InitValuatorAxisStruct(pDevice, i+info.numRelAxes, info.minval[i+1], info.maxval[i+1], info.res[i+1], info.minres[i+1], info.maxres[i+1]); -#endif } } if (info.focusClass) InitFocusClassDeviceStruct(pDevice); -#ifdef XINPUT if (info.proximityClass) InitProximityClassDeviceStruct(pDevice); -#endif if (info.ptrFeedbackClass) InitPtrFeedbackClassDeviceStruct(pDevice, dmxChangePointerControl); if (info.kbdFeedbackClass) @@ -759,17 +747,10 @@ static DeviceIntPtr dmxAddDevice(DMXLocalInputInfoPtr dmxLocal) } } -#ifdef XINPUT if (!name) { name = "extension"; registerProcPtr = RegisterOtherDevice; } -#else - if (!name) - dmxLog(dmxFatal, - "Server not build with XINPUT support (cannot add %s)\n", - dmxLocal->name); -#endif if (!name || !registerProcPtr) dmxLog(dmxFatal, "Cannot add device %s\n", dmxLocal->name); diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index b6e1186a6..601b9bbc7 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -62,10 +62,8 @@ #include "extension.h" #include "Pci.h" -#ifdef XINPUT #include "xf86Xinput.h" extern DeviceAssocRec mouse_assoc; -#endif #ifdef XKB #undef XKB_IN_SERVER diff --git a/hw/xfree86/common/xf86Cursor.c b/hw/xfree86/common/xf86Cursor.c index 725fcb296..c6f603959 100644 --- a/hw/xfree86/common/xf86Cursor.c +++ b/hw/xfree86/common/xf86Cursor.c @@ -44,10 +44,8 @@ #include "xf86Priv.h" #include "xf86_OSproc.h" -#ifdef XINPUT #include #include "xf86Xinput.h" -#endif #ifdef XFreeXDGA #include "dgaproc.h" diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c index 0dc42c66b..14bef39ea 100644 --- a/hw/xfree86/common/xf86Globals.c +++ b/hw/xfree86/common/xf86Globals.c @@ -100,9 +100,7 @@ xf86InfoRec xf86Info = { FALSE, /* vtSysreq */ SKWhenNeeded, /* ddxSpecialKeys */ NULL, /* pMouse */ -#ifdef XINPUT NULL, /* mouseLocal */ -#endif -1, /* lastEventTime */ FALSE, /* vtRequestsPending */ FALSE, /* inputPending */ diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 6d5eaadc3..bf45d7630 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -71,12 +71,8 @@ #include "xf86Date.h" #include "xf86Build.h" #include "mipointer.h" -#ifdef XINPUT #include #include -#else -#include "inputstr.h" -#endif #include "xf86DDC.h" #include "xf86Xinput.h" #include "xf86InPriv.h" diff --git a/hw/xfree86/common/xf86MiscExt.c b/hw/xfree86/common/xf86MiscExt.c index 40c196a3e..8817b792a 100644 --- a/hw/xfree86/common/xf86MiscExt.c +++ b/hw/xfree86/common/xf86MiscExt.c @@ -48,13 +48,9 @@ #define XF86_OS_PRIVS #include "xf86_OSlib.h" -#ifdef XINPUT #include #include #include "xf86Xinput.h" -#else -#include "inputstr.h" -#endif #include "xf86OSmouse.h" diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h index 8cab56ec8..318a59f19 100644 --- a/hw/xfree86/common/xf86Privstr.h +++ b/hw/xfree86/common/xf86Privstr.h @@ -80,9 +80,7 @@ typedef struct { /* mouse part */ DeviceIntPtr pMouse; -#ifdef XINPUT pointer mouseLocal; -#endif /* event handler part */ int lastEventTime; diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 9f293cc5d..527930642 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -52,17 +52,13 @@ #include #include -#ifdef XINPUT #include #include -#endif #include "xf86.h" #include "xf86Priv.h" #include "xf86Xinput.h" -#ifdef XINPUT #include "XIstubs.h" #include "xf86Optrec.h" -#endif #include "mipointer.h" #include "xf86InPriv.h" @@ -193,7 +189,6 @@ xf86ActivateDevice(LocalDevicePtr local) } -#ifdef XINPUT /*********************************************************************** * * Caller: ProcXOpenDevice @@ -322,7 +317,6 @@ void AddOtherInputDevices() { } -#endif int NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev) diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h index d88bbbeee..dd72ec733 100644 --- a/hw/xfree86/common/xf86Xinput.h +++ b/hw/xfree86/common/xf86Xinput.h @@ -57,11 +57,9 @@ #endif #include "xf86str.h" #include "inputstr.h" -#ifdef XINPUT #include #include #include "XIstubs.h" -#endif /* Input device flags */ #define XI86_OPEN_ON_INIT 0x01 /* open the device at startup time */ @@ -89,7 +87,6 @@ #define TS_Raw 60 #define TS_Scaled 61 -#ifdef XINPUT /* This holds the input driver entry and module information. */ typedef struct _InputDriverRec { int driverVersion; @@ -103,7 +100,6 @@ typedef struct _InputDriverRec { pointer module; int refCount; } InputDriverRec, *InputDriverPtr; -#endif /* This is to input devices what the ScrnInfoRec is to screens. */ diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index 61dec59c4..a2a239099 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -422,9 +422,9 @@ _X_HIDDEN void *dixLookupTab[] = { #ifdef PANORAMIX SYMVAR(noPanoramiXExtension) #endif -#ifdef XINPUT + SYMVAR(noXInputExtension) -#endif + #ifdef XIDLE SYMVAR(noXIdleExtension) #endif @@ -481,14 +481,12 @@ _X_HIDDEN void *dixLookupTab[] = { SYMVAR(XkbDfltRepeatInterval) #endif -#ifdef XINPUT /* Xi */ /* exevents.c */ SYMFUNC(InitValuatorAxisStruct) SYMFUNC(InitProximityClassDeviceStruct) /* extinit.c */ SYMFUNC(AssignTypeAndName) -#endif /* xf86DGA.c */ /* XXX This is exported from the DDX, not DIX. */ diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c index 7f3bbe49c..04719a687 100644 --- a/hw/xfree86/loader/loadmod.c +++ b/hw/xfree86/loader/loadmod.c @@ -59,9 +59,7 @@ #include "misc.h" #include "xf86.h" #include "xf86Priv.h" -#ifdef XINPUT #include "xf86Xinput.h" -#endif #include "loader.h" #include "xf86Optrec.h" diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c index 1d3e63971..e15b07a46 100644 --- a/hw/xfree86/loader/xf86sym.c +++ b/hw/xfree86/loader/xf86sym.c @@ -64,9 +64,7 @@ #include "xf86_OSproc.h" #include "xf86Parser.h" #include "xf86Config.h" -#ifdef XINPUT # include "xf86Xinput.h" -#endif #include "xf86OSmouse.h" #ifdef XV #include "xf86xv.h" @@ -291,14 +289,12 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(xf86UnbindGARTMemory) SYMFUNC(xf86EnableAGP) SYMFUNC(xf86GARTCloseScreen) -#ifdef XINPUT SYMFUNC(XisbNew) SYMFUNC(XisbFree) SYMFUNC(XisbRead) SYMFUNC(XisbWrite) SYMFUNC(XisbTrace) SYMFUNC(XisbBlockDuration) -#endif /* xf86Bus.c */ SYMFUNC(xf86CheckPciSlot) @@ -673,7 +669,6 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(GetTimeInMillis) /* xf86Xinput.c */ -#ifdef XINPUT SYMFUNC(xf86ProcessCommonOptions) SYMFUNC(xf86PostMotionEvent) SYMFUNC(xf86PostProximityEvent) @@ -684,7 +679,6 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(xf86ActivateDevice) SYMFUNC(xf86XInputSetScreen) SYMFUNC(xf86ScaleAxis) -#endif #ifdef DPMSExtension SYMFUNC(DPMSGet) SYMFUNC(DPMSSet) diff --git a/hw/xgl/egl/kinput.c b/hw/xgl/egl/kinput.c index f892dc173..6c1018cb3 100644 --- a/hw/xgl/egl/kinput.c +++ b/hw/xgl/egl/kinput.c @@ -612,7 +612,6 @@ eglInitInput(KdMouseFuncs *pMouseFuncs, RegisterKeyboardDevice(pKeyboard); miRegisterPointerDevice(screenInfo.screens[0], pPointer); mieqInit(&pKeyboard->public, &pPointer->public); -#ifdef XINPUT { static long zero1, zero2; @@ -620,7 +619,6 @@ eglInitInput(KdMouseFuncs *pMouseFuncs, ErrorF("Extended Input Devices not yet supported. Impelement it at line %d in %s\n", __LINE__, __FILE__); } -#endif } /* diff --git a/hw/xprint/ddxInit.c b/hw/xprint/ddxInit.c index d744121aa..5cb24726b 100644 --- a/hw/xprint/ddxInit.c +++ b/hw/xprint/ddxInit.c @@ -284,8 +284,6 @@ ddxProcessArgument ( return(0); } -#ifdef XINPUT - #include #include #include "XIstubs.h" @@ -373,8 +371,6 @@ SetDeviceValuators ( } -#endif /* XINPUT */ - #ifdef AIXV3 /* * This is just to get the server to link on AIX, where some bits diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index aad55fc64..7e927c841 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -47,12 +47,10 @@ #include "globals.h" #include "dix.h" -#ifdef XINPUT # include # include # include "exevents.h" # include "extinit.h" -#endif #include #include diff --git a/hw/xwin/winmouse.c b/hw/xwin/winmouse.c index 1507dd34f..be2b66a08 100644 --- a/hw/xwin/winmouse.c +++ b/hw/xwin/winmouse.c @@ -36,7 +36,7 @@ #endif #include "win.h" -#if defined(XFree86Server) && defined(XINPUT) +#if defined(XFree86Server) #include "inputstr.h" /* Peek the internal button mapping */ @@ -106,7 +106,7 @@ winMouseProc (DeviceIntPtr pDeviceInt, int iState) 2); free(map); -#if defined(XFree86Server) && defined(XINPUT) +#if defined(XFree86Server) g_winMouseButtonMap = pDeviceInt->button->map; #endif break; @@ -116,7 +116,7 @@ winMouseProc (DeviceIntPtr pDeviceInt, int iState) break; case DEVICE_CLOSE: -#if defined(XFree86Server) && defined(XINPUT) +#if defined(XFree86Server) g_winMouseButtonMap = NULL; #endif case DEVICE_OFF: @@ -225,7 +225,7 @@ winMouseButtonsSendEvent (int iEventType, int iButton) /* Load an xEvent and enqueue the event */ xCurrentEvent.u.u.type = iEventType; -#if defined(XFree86Server) && defined(XINPUT) +#if defined(XFree86Server) if (g_winMouseButtonMap) xCurrentEvent.u.u.detail = g_winMouseButtonMap[iButton]; else diff --git a/include/dix-config.h.in b/include/dix-config.h.in index 177908265..2d1ec9159 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -371,9 +371,6 @@ /* Support Xinerama extension */ #undef XINERAMA -/* Support X Input extension */ -#undef XINPUT - /* Build XKB */ #undef XKB diff --git a/include/globals.h b/include/globals.h index 9e5060d5f..e2e48044c 100644 --- a/include/globals.h +++ b/include/globals.h @@ -151,9 +151,7 @@ extern Bool noXkbExtension; extern Bool noPanoramiXExtension; #endif -#ifdef XINPUT extern Bool noXInputExtension; -#endif #ifdef XIDLE extern Bool noXIdleExtension; diff --git a/include/windowstr.h b/include/windowstr.h index a895a8805..0e45262d8 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -113,9 +113,7 @@ typedef struct _WindowOpt { RegionPtr clipShape; /* default: NULL */ RegionPtr inputShape; /* default: NULL */ #endif -#ifdef XINPUT struct _OtherInputMasks *inputMasks; /* default: NULL */ -#endif DevCursorList deviceCursors; /* default: NULL */ struct _GenericClientMasks *geMasks;/* default: NULL */ WindowAccessRec access; @@ -214,11 +212,7 @@ extern Mask DontPropagateMasks[]; #define wDontPropagateMask(w) wUseDefault(w, dontPropagateMask, DontPropagateMasks[(w)->dontPropagate]) #define wOtherEventMasks(w) wUseDefault(w, otherEventMasks, 0) #define wOtherClients(w) wUseDefault(w, otherClients, NULL) -#ifdef XINPUT #define wOtherInputMasks(w) wUseDefault(w, inputMasks, NULL) -#else -#define wOtherInputMasks(w) NULL -#endif #define wPassiveGrabs(w) wUseDefault(w, passiveGrabs, NULL) #define wUserProps(w) wUseDefault(w, userProps, NULL) #define wBackingBitPlanes(w) wUseDefault(w, backingBitPlanes, ~0L) diff --git a/mi/miinitext.c b/mi/miinitext.c index 4f3b92e31..00f0d271a 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -197,9 +197,7 @@ extern Bool noPanoramiXExtension; #ifdef INXQUARTZ extern Bool noPseudoramiXExtension; #endif -#ifdef XINPUT extern Bool noXInputExtension; -#endif #ifdef XIDLE extern Bool noXIdleExtension; #endif @@ -262,9 +260,7 @@ extern void PanoramiXExtensionInit(INITARGS); #ifdef INXQUARTZ extern void PseudoramiXExtensionInit(INITARGS); #endif -#ifdef XINPUT extern void XInputExtensionInit(INITARGS); -#endif #ifdef XTEST extern void XTestExtensionInit(INITARGS); #endif @@ -448,9 +444,7 @@ static ExtensionToggle ExtensionToggleList[] = #ifdef PANORAMIX { "XINERAMA", &noPanoramiXExtension }, #endif -#ifdef XINPUT { "XInputExtension", &noXInputExtension }, -#endif #ifdef XKB { "XKEYBOARD", &noXkbExtension }, #endif @@ -632,9 +626,7 @@ static ExtensionModule staticExtensions[] = { #ifdef MITSHM { ShmExtensionInit, SHMNAME, &noMITShmExtension, NULL, NULL }, #endif -#ifdef XINPUT { XInputExtensionInit, "XInputExtension", &noXInputExtension, NULL, NULL }, -#endif #ifdef XTEST { XTestExtensionInit, XTestExtensionName, &noTestExtensions, NULL, NULL }, #endif diff --git a/os/utils.c b/os/utils.c index d1bc1a18a..4bebeca9e 100644 --- a/os/utils.c +++ b/os/utils.c @@ -214,9 +214,7 @@ _X_EXPORT Bool noXFixesExtension = FALSE; /* Xinerama is disabled by default unless enabled via +xinerama */ _X_EXPORT Bool noPanoramiXExtension = TRUE; #endif -#ifdef XINPUT _X_EXPORT Bool noXInputExtension = FALSE; -#endif #ifdef XIDLE _X_EXPORT Bool noXIdleExtension = FALSE; #endif From b304b0a65cc57127cdea103f2c5114e4ea79af41 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 26 Apr 2008 17:38:55 +0930 Subject: [PATCH 431/634] Xi: add versioning support. Remember the version the client sent to us, so we can adjust our replies accordingly. This requires the client to use the {major|minor}Version fields in the GetExtensionVersion request. However, they were padding before, so we must assume they are garbage if nbytes is non-zero. If nbytes is zero, the client is probably a new client and we can handle it correctly. --- Xi/exglobals.h | 2 ++ Xi/extinit.c | 39 +++++++++++++++++++++++++++++++++++---- Xi/getvers.c | 17 +++++++++++++++++ include/exevents.h | 9 +++++++++ 4 files changed, 63 insertions(+), 4 deletions(-) diff --git a/Xi/exglobals.h b/Xi/exglobals.h index 8cbccf294..4c23d84b4 100644 --- a/Xi/exglobals.h +++ b/Xi/exglobals.h @@ -31,6 +31,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifdef HAVE_DIX_CONFIG_H #include #endif +#include "privates.h" #ifndef EXGLOBALS_H #define EXGLOBALS_H 1 @@ -75,4 +76,5 @@ extern int DeviceLeaveNotify; extern int RT_INPUTCLIENT; +extern DevPrivateKey XIClientPrivateKey; #endif /* EXGLOBALS_H */ diff --git a/Xi/extinit.c b/Xi/extinit.c index 838efdd1c..a647b9e18 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -72,6 +72,7 @@ SOFTWARE. #include "exglobals.h" #include "swaprep.h" #include "registry.h" +#include "privates.h" /* modules local to Xi */ #include "allowev.h" @@ -324,19 +325,42 @@ int RT_INPUTCLIENT; extern XExtensionVersion AllExtensionVersions[]; + Mask PropagateMask[MAX_DEVICES]; +/***************************************************************** + * + * Versioning support + * + */ + +DevPrivateKey XIClientPrivateKey = &XIClientPrivateKey; + +static XExtensionVersion thisversion = { XI_Present, + XI_2_Major, + XI_2_Minor +}; + + /***************************************************************** * * Declarations of local routines. * */ -static XExtensionVersion thisversion = { XI_Present, - XI_2_Major, - XI_2_Minor -}; +static void +XIClientCallback(CallbackListPtr *list, + pointer closure, + pointer data) +{ + NewClientInfoRec *clientinfo = (NewClientInfoRec*)data; + ClientPtr pClient = clientinfo->client; + XIClientPtr pXIClient; + pXIClient = dixLookupPrivate(&pClient->devPrivates, XIClientPrivateKey); + pXIClient->major_version = 0; + pXIClient->minor_version = 0; +} /************************************************************************* * @@ -1080,6 +1104,7 @@ XIGEEventFill(xGenericEvent* ev, DeviceIntPtr pDev, * * This extension has several events and errors. * + * XI is mandatory nowadays, so if we fail to init XI, we die. */ void @@ -1087,6 +1112,12 @@ XInputExtensionInit(void) { ExtensionEntry *extEntry; + if (!dixRequestPrivate(XIClientPrivateKey, sizeof(XIClientRec))) + FatalError("Cannot request private for XI.\n"); + + if (!AddCallback(&ClientStateCallback, XIClientCallback, 0)) + FatalError("Failed to add callback to XI.\n"); + extEntry = AddExtension(INAME, IEVENTS, IERRORS, ProcIDispatch, SProcIDispatch, IResetProc, StandardMinorOpcode); if (extEntry) { diff --git a/Xi/getvers.c b/Xi/getvers.c index 1e17eea5a..43a1a4d26 100644 --- a/Xi/getvers.c +++ b/Xi/getvers.c @@ -59,6 +59,7 @@ SOFTWARE. #include "inputstr.h" /* DeviceIntPtr */ #include #include +#include "exevents.h" #include "exglobals.h" #include "getvers.h" @@ -93,6 +94,7 @@ int ProcXGetExtensionVersion(ClientPtr client) { xGetExtensionVersionReply rep; + XIClientPtr pXIClient; REQUEST(xGetExtensionVersionReq); REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq); @@ -101,6 +103,21 @@ ProcXGetExtensionVersion(ClientPtr client) stuff->nbytes + 3) >> 2) return BadLength; + pXIClient = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey); + + /* GetExtensionVersionReq before XI 2 didn't supply the client's + * major/minor. So we don't actually have a clue what they support. + * {major|minor}Version was added as part of XI, so if they are set, we + * know we can trust it. In this case the client must set nbytes to 0 + * though, otherwise we have to assume that the version are padding + * garbage. + */ + if (!stuff->nbytes) /* Client using XQueryInputVersion(). */ + { + pXIClient->major_version = stuff->majorVersion; + pXIClient->minor_version = stuff->minorVersion; + } /* else version unknown, leave it at 0.0 */ + rep.repType = X_Reply; rep.RepType = X_GetExtensionVersion; rep.length = 0; diff --git a/include/exevents.h b/include/exevents.h index 0892f4d0a..8d5d5dd49 100644 --- a/include/exevents.h +++ b/include/exevents.h @@ -32,6 +32,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include +/** + * Attached to the devPrivates of each client. Specifies the version number as + * supported by the client. + */ +typedef struct _XIClientRec { + int major_version; + int minor_version; +} XIClientRec, *XIClientPtr; + extern void RegisterOtherDevice ( DeviceIntPtr /* device */); From 8973a3f7983240407dd6da59b3643f40e6a3d83a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 26 Apr 2008 17:48:52 +0930 Subject: [PATCH 432/634] Xi: disable XI for clients < XI 2.0 Sorry. With the huge changes in the device handling I honestly don't know how to support XI and XI2 alongside. So let's just pretend XI doesn't exist if a client doesn't request it supporting XI2. --- Xi/getvers.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Xi/getvers.c b/Xi/getvers.c index 43a1a4d26..daf9a028a 100644 --- a/Xi/getvers.c +++ b/Xi/getvers.c @@ -122,7 +122,10 @@ ProcXGetExtensionVersion(ClientPtr client) rep.RepType = X_GetExtensionVersion; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.present = TRUE; + if (!pXIClient->major_version < XI_2_Major) /* sorry, no XI 1.x anymore. */ + rep.present = FALSE; + else + rep.present = TRUE; rep.major_version = AllExtensionVersions[IReqCode - 128].major_version; rep.minor_version = AllExtensionVersions[IReqCode - 128].minor_version; From 7447a30fb27ed50a20a85b5a2de9afe7dea8cfa5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 26 Apr 2008 19:03:13 +0930 Subject: [PATCH 433/634] Xi: if a pre-XI2 client tries to list the devices, pretend we don't have any. XI 1.x isn't supported anymore, so let's pretend we don't have any devices. This stops clients from opening them and thus stops interference. --- Xi/listdev.c | 64 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 17 deletions(-) diff --git a/Xi/listdev.c b/Xi/listdev.c index 3fb0ab314..fc2748e41 100644 --- a/Xi/listdev.c +++ b/Xi/listdev.c @@ -64,6 +64,7 @@ SOFTWARE. #include "XIstubs.h" #include "extnsionst.h" #include "exglobals.h" /* FIXME */ +#include "exevents.h" #include "xace.h" #include "listdev.h" @@ -313,12 +314,17 @@ CopySwapClasses(ClientPtr client, DeviceIntPtr dev, CARD8 *num_classes, * * This procedure lists the input devices available to the server. * + * If this request is called by a client that has not issued a + * GetExtensionVersion request with major/minor version set, we pretend no + * devices are available. It's the only thing we can do to stop pre-XI 2 + * clients. */ int ProcXListInputDevices(ClientPtr client) { xListInputDevicesReply rep; + XIClientPtr pXIClient; int numdevs = 0; int namesize = 1; /* need 1 extra byte for strcpy */ int rc, size = 0; @@ -337,21 +343,38 @@ ProcXListInputDevices(ClientPtr client) rep.length = 0; rep.sequenceNumber = client->sequence; + pXIClient = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey); + AddOtherInputDevices(); - for (d = inputInfo.devices; d; d = d->next) { - rc = XaceHook(XACE_DEVICE_ACCESS, client, d, DixGetAttrAccess); - if (rc != Success) - return rc; - SizeDeviceInfo(d, &namesize, &size); - numdevs++; - } - for (d = inputInfo.off_devices; d; d = d->next) { - rc = XaceHook(XACE_DEVICE_ACCESS, client, d, DixGetAttrAccess); - if (rc != Success) - return rc; - SizeDeviceInfo(d, &namesize, &size); - numdevs++; + if (!pXIClient->major_version >= XI_2_Major) { + for (d = inputInfo.devices; d; d = d->next) { + rc = XaceHook(XACE_DEVICE_ACCESS, client, d, DixGetAttrAccess); + if (rc != Success) + return rc; + SizeDeviceInfo(d, &namesize, &size); + numdevs++; + } + for (d = inputInfo.off_devices; d; d = d->next) { + rc = XaceHook(XACE_DEVICE_ACCESS, client, d, DixGetAttrAccess); + if (rc != Success) + return rc; + SizeDeviceInfo(d, &namesize, &size); + numdevs++; + } + } else + { + /* Pretend we don't have XI devices connected */ + rc = XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.pointer, DixGetAttrAccess); + if (rc != Success) + return rc; + rc = XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, DixGetAttrAccess); + if (rc != Success) + return rc; + + SizeDeviceInfo(inputInfo.pointer, &namesize, &size); + SizeDeviceInfo(inputInfo.keyboard, &namesize, &size); + numdevs = 2; } total_length = numdevs * sizeof(xDeviceInfo) + size + namesize; @@ -361,10 +384,17 @@ ProcXListInputDevices(ClientPtr client) savbuf = devbuf; dev = (xDeviceInfoPtr) devbuf; - for (d = inputInfo.devices; d; d = d->next, dev++) - ListDeviceInfo(client, d, dev, &devbuf, &classbuf, &namebuf); - for (d = inputInfo.off_devices; d; d = d->next, dev++) - ListDeviceInfo(client, d, dev, &devbuf, &classbuf, &namebuf); + if (pXIClient->major_version >= XI_2_Major) + { + for (d = inputInfo.devices; d; d = d->next, dev++) + ListDeviceInfo(client, d, dev, &devbuf, &classbuf, &namebuf); + for (d = inputInfo.off_devices; d; d = d->next, dev++) + ListDeviceInfo(client, d, dev, &devbuf, &classbuf, &namebuf); + } else + { + ListDeviceInfo(client, inputInfo.pointer, dev, &devbuf, &classbuf, &namebuf); + ListDeviceInfo(client, inputInfo.keyboard, dev, &devbuf, &classbuf, &namebuf); + } rep.ndevices = numdevs; rep.length = (total_length + 3) >> 2; From 87071b604c4b7c3c79ab784e2c09ff691e2bc5ad Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 26 Apr 2008 19:37:57 +0930 Subject: [PATCH 434/634] Revert "Xi: disable XI for clients < XI 2.0" Turns out some programs don't like this change. gnome-settings-daemon crashes hard if you tell it that XI doesn't exist. So, tell them we have XI, but leave the other change (the one that pretends no devices are available). This reverts commit 8973a3f7983240407dd6da59b3643f40e6a3d83a. --- Xi/getvers.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Xi/getvers.c b/Xi/getvers.c index daf9a028a..43a1a4d26 100644 --- a/Xi/getvers.c +++ b/Xi/getvers.c @@ -122,10 +122,7 @@ ProcXGetExtensionVersion(ClientPtr client) rep.RepType = X_GetExtensionVersion; rep.length = 0; rep.sequenceNumber = client->sequence; - if (!pXIClient->major_version < XI_2_Major) /* sorry, no XI 1.x anymore. */ - rep.present = FALSE; - else - rep.present = TRUE; + rep.present = TRUE; rep.major_version = AllExtensionVersions[IReqCode - 128].major_version; rep.minor_version = AllExtensionVersions[IReqCode - 128].minor_version; From 684b5d8382bf0bc6cd55774226ee362e81c0adbf Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 26 Apr 2008 19:55:59 +0930 Subject: [PATCH 435/634] Xi: whoops, stray ! caused a bit of memory mess. --- Xi/listdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xi/listdev.c b/Xi/listdev.c index fc2748e41..b588c247d 100644 --- a/Xi/listdev.c +++ b/Xi/listdev.c @@ -347,7 +347,7 @@ ProcXListInputDevices(ClientPtr client) AddOtherInputDevices(); - if (!pXIClient->major_version >= XI_2_Major) { + if (pXIClient->major_version >= XI_2_Major) { for (d = inputInfo.devices; d; d = d->next) { rc = XaceHook(XACE_DEVICE_ACCESS, client, d, DixGetAttrAccess); if (rc != Success) From b5004722a208479a4bc762ff428bf4cbeb430d53 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 28 Apr 2008 10:26:01 +0930 Subject: [PATCH 436/634] Xi: Only return VCP, VCK and floating SDs to Xi 1.x clients. This is better than the approach implemented with 8973a3f7983240407dd6da59b3643f40e6a3d83a which disabled XI altogether for 1.x. Instead, return a device list that resembles a traditional XI setup on pre XI 2.0 servers. If the client tries to open a device other than a floating SD, return a BadDevice error. --- Xi/listdev.c | 91 ++++++++++++++++++++++++++++++---------------------- Xi/opendev.c | 11 +++++++ 2 files changed, 63 insertions(+), 39 deletions(-) diff --git a/Xi/listdev.c b/Xi/listdev.c index b588c247d..c484dcca7 100644 --- a/Xi/listdev.c +++ b/Xi/listdev.c @@ -315,9 +315,9 @@ CopySwapClasses(ClientPtr client, DeviceIntPtr dev, CARD8 *num_classes, * This procedure lists the input devices available to the server. * * If this request is called by a client that has not issued a - * GetExtensionVersion request with major/minor version set, we pretend no - * devices are available. It's the only thing we can do to stop pre-XI 2 - * clients. + * GetExtensionVersion request with major/minor version set, we don't send the + * complete device list. Instead, we only send the VCP, the VCK and floating + * SDs. This resembles the setup found on XI 1.x machines. */ int @@ -347,34 +347,35 @@ ProcXListInputDevices(ClientPtr client) AddOtherInputDevices(); - if (pXIClient->major_version >= XI_2_Major) { - for (d = inputInfo.devices; d; d = d->next) { - rc = XaceHook(XACE_DEVICE_ACCESS, client, d, DixGetAttrAccess); - if (rc != Success) - return rc; - SizeDeviceInfo(d, &namesize, &size); - numdevs++; - } - for (d = inputInfo.off_devices; d; d = d->next) { - rc = XaceHook(XACE_DEVICE_ACCESS, client, d, DixGetAttrAccess); - if (rc != Success) - return rc; - SizeDeviceInfo(d, &namesize, &size); - numdevs++; - } - } else - { - /* Pretend we don't have XI devices connected */ - rc = XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.pointer, DixGetAttrAccess); - if (rc != Success) - return rc; - rc = XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, DixGetAttrAccess); - if (rc != Success) - return rc; + for (d = inputInfo.devices; d; d = d->next) { + if (pXIClient->major_version < XI_2_Major) + { + if (d->isMaster && + d != inputInfo.pointer && + d != inputInfo.keyboard) + continue; /* don't send master devices other than VCP/VCK */ - SizeDeviceInfo(inputInfo.pointer, &namesize, &size); - SizeDeviceInfo(inputInfo.keyboard, &namesize, &size); - numdevs = 2; + if (!d->isMaster && d->u.master) + continue; /* don't send attached SDs */ + } + rc = XaceHook(XACE_DEVICE_ACCESS, client, d, DixGetAttrAccess); + if (rc != Success) + return rc; + SizeDeviceInfo(d, &namesize, &size); + numdevs++; + } + + for (d = inputInfo.off_devices; d; d = d->next) { + if (pXIClient->major_version < XI_2_Major && + !d->isMaster && + d->u.master) /* XXX can off_devices be attached? */ + continue; /* don't send attached SDs */ + + rc = XaceHook(XACE_DEVICE_ACCESS, client, d, DixGetAttrAccess); + if (rc != Success) + return rc; + SizeDeviceInfo(d, &namesize, &size); + numdevs++; } total_length = numdevs * sizeof(xDeviceInfo) + size + namesize; @@ -384,18 +385,30 @@ ProcXListInputDevices(ClientPtr client) savbuf = devbuf; dev = (xDeviceInfoPtr) devbuf; - if (pXIClient->major_version >= XI_2_Major) + for (d = inputInfo.devices; d; d = d->next) { - for (d = inputInfo.devices; d; d = d->next, dev++) - ListDeviceInfo(client, d, dev, &devbuf, &classbuf, &namebuf); - for (d = inputInfo.off_devices; d; d = d->next, dev++) - ListDeviceInfo(client, d, dev, &devbuf, &classbuf, &namebuf); - } else - { - ListDeviceInfo(client, inputInfo.pointer, dev, &devbuf, &classbuf, &namebuf); - ListDeviceInfo(client, inputInfo.keyboard, dev, &devbuf, &classbuf, &namebuf); + if (pXIClient->major_version < XI_2_Major) + { + if (d->isMaster && + d != inputInfo.pointer && + d != inputInfo.keyboard) + continue; /* don't count master devices other than VCP/VCK */ + + if (!d->isMaster && d->u.master) + continue; /* don't count attached SDs */ + } + ListDeviceInfo(client, d, dev++, &devbuf, &classbuf, &namebuf); } + for (d = inputInfo.off_devices; d; d = d->next) + { + if (pXIClient->major_version < XI_2_Major && + !d->isMaster && + d->u.master) /* XXX can off_devices be attached? */ + continue; /* don't send attached SDs */ + + ListDeviceInfo(client, d, dev++, &devbuf, &classbuf, &namebuf); + } rep.ndevices = numdevs; rep.length = (total_length + 3) >> 2; WriteReplyToClient(client, sizeof(xListInputDevicesReply), &rep); diff --git a/Xi/opendev.c b/Xi/opendev.c index f14f848bf..c51bb7e3f 100644 --- a/Xi/opendev.c +++ b/Xi/opendev.c @@ -62,6 +62,7 @@ SOFTWARE. #include "XIstubs.h" #include "windowstr.h" /* window structure */ #include "exglobals.h" +#include "exevents.h" #include "opendev.h" @@ -98,6 +99,7 @@ ProcXOpenDevice(ClientPtr client) int status = Success; xOpenDeviceReply rep; DeviceIntPtr dev; + XIClientPtr pXIClient; REQUEST(xOpenDeviceReq); REQUEST_SIZE_MATCH(xOpenDeviceReq); @@ -113,6 +115,15 @@ ProcXOpenDevice(ClientPtr client) } else if (status != Success) return status; + /* Don't let XI 1.x clients open devices other than floating SDs. */ + pXIClient = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey); + if (pXIClient->major_version < XI_2_Major) + { + if (dev->isMaster || (!dev->isMaster && dev->u.master)) + return BadDevice; + } + + OpenInputDevice(dev, client, &status); if (status != Success) return status; From 1fab51edfc82e1ef60dfa29fd5d93478066a3998 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 28 Apr 2008 11:37:21 +0930 Subject: [PATCH 437/634] mi: guard against NULL-pointer dereference. --- mi/misprite.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mi/misprite.c b/mi/misprite.c index c998e556a..9e4b6851e 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -916,12 +916,15 @@ miSpriteUndisplayCursor(pDev, pScreen) DeviceIntPtr pDev; ScreenPtr pScreen; { + miCursorInfoPtr pCursorInfo; + if (!pDev->isMaster && !pDev->u.master) { ErrorF("[mi] miSpriteUndisplayCursor called for floating device.\n"); return; } - if (MISPRITE(pDev)->isUp) + pCursorInfo = MISPRITE(pDev); + if (pCursorInfo && pCursorInfo->isUp) miSpriteRemoveCursor(pDev, pScreen); } From 53dba5381fdd8f644e16aaa0ecb05df4dc615b23 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 28 Apr 2008 11:37:52 +0930 Subject: [PATCH 438/634] dix: if alloc of a master keyboard fails, remove the master pointer. --- dix/devices.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index b3c9efcc2..37feb34a3 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -863,6 +863,11 @@ UndisplayDevices() * resources. * Removes both enabled and disabled devices and notifies all devices about * the removal of the device. + * + * No PresenceNotify is sent for device that the client never saw. This can + * happen if a malloc fails during the addition of master devices. If + * dev->init is FALSE it means the client never received a DeviceAdded event, + * so let's not send a DeviceRemoved event either. */ int RemoveDevice(DeviceIntPtr dev) @@ -873,12 +878,14 @@ RemoveDevice(DeviceIntPtr dev) DeviceIntRec dummyDev; ScreenPtr screen = screenInfo.screens[0]; int deviceid; + int initialized; DebugF("(dix) removing device %d\n", dev->id); if (!dev || dev == inputInfo.keyboard || dev == inputInfo.pointer) return BadImplementation; + initialized = dev->inited; screen->UndisplayCursor(dev, screen); deviceid = dev->id; @@ -914,7 +921,7 @@ RemoveDevice(DeviceIntPtr dev) } } - if (ret == Success) { + if (ret == Success && initialized) { inputInfo.numDevices--; ev.type = DevicePresenceNotify; ev.time = currentTime.milliseconds; @@ -2587,7 +2594,10 @@ AllocMasterDevice(ClientPtr client, char* name, DeviceIntPtr* ptr, DeviceIntPtr* keyboard = AddInputDevice(client, CoreKeyboardProc, TRUE); if (!keyboard) + { + RemoveDevice(pointer); return BadAlloc; + } keyboard->name = xcalloc(strlen(name) + strlen(" keyboard") + 1, sizeof(char)); strcpy(keyboard->name, name); From f2a20294fe26f4c9d245d24d065331fefd8f830d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 28 Apr 2008 16:56:22 +0930 Subject: [PATCH 439/634] dix: store all valuators as they come from the device in the valuator events. The event's sequenceNumber is mis-used to determine whether the values are relative or absolute. --- dix/getevents.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index d352ebe78..0a44a809f 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -386,13 +386,15 @@ clipValuators(DeviceIntPtr pDev, int first_valuator, int num_valuators, * Fills events with valuator events for pDev, as given by the other * parameters. * + * Note that we mis-use the sequence number to store the absolute bit. + * * FIXME: Need to fix ValuatorClassRec to store all the valuators as * last posted, not just x and y; otherwise relative non-x/y * valuators, though a very narrow use case, will be broken. */ static EventList * -getValuatorEvents(EventList *events, DeviceIntPtr pDev, int first_valuator, - int num_valuators, int *valuators) { +getValuatorEvents(EventList *events, DeviceIntPtr pDev, int absolute, + int first_valuator, int num_valuators, int *valuators) { deviceValuator *xv; int i = 0, final_valuator = first_valuator + num_valuators; @@ -419,6 +421,8 @@ getValuatorEvents(EventList *events, DeviceIntPtr pDev, int first_valuator, if (i + 6 < final_valuator) xv->deviceid |= MORE_EVENTS; + + xv->sequenceNumber = (absolute) ? Absolute : Relative; } return events; @@ -561,8 +565,8 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type, if (num_valuators) { kbp->deviceid |= MORE_EVENTS; clipValuators(pDev, first_valuator, num_valuators, valuators); - events = getValuatorEvents(events, pDev, first_valuator, - num_valuators, valuators); + events = getValuatorEvents(events, pDev, FALSE /* relative */, + first_valuator, num_valuators, valuators); } return numEvents; @@ -751,14 +755,6 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, * to the current screen. Right now, we only have one history buffer, * so we don't set this for both the device and core.*/ miPointerSetPosition(pDev, &x, &y, ms); - - /* Drop x and y back into the valuators list, if they were originally - * present. */ - if (first_valuator == 0 && num_valuators >= 1) - valuators[0] = x; - if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) - valuators[1 - first_valuator] = y; - updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); pDev->lastx = x; @@ -791,8 +787,8 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, if (num_valuators) { kbp->deviceid |= MORE_EVENTS; clipValuators(pDev, first_valuator, num_valuators, valuators); - events = getValuatorEvents(events, pDev, first_valuator, - num_valuators, valuators); + events = getValuatorEvents(events, pDev, (flags & POINTER_ABSOLUTE), + first_valuator, num_valuators, valuators); } return num_events; @@ -859,8 +855,8 @@ GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type, kbp->deviceid |= MORE_EVENTS; events++; clipValuators(pDev, first_valuator, num_valuators, valuators); - events = getValuatorEvents(events, pDev, first_valuator, - num_valuators, valuators); + events = getValuatorEvents(events, pDev, False /* relative */, + first_valuator, num_valuators, valuators); } return num_events; From 3a922c5d07509703a3eeda2bbec6f332e6b0ffac Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 28 Apr 2008 17:32:54 +0930 Subject: [PATCH 440/634] Xi: apply ValuatorEvent data to the device's valuators. After UpdateDeviceState, the device has the current position in absolute coordinates, the event has the correct valuator data to be delivered to the client. --- Xi/exevents.c | 102 +++++++++++++++++++++++++++++++++++++-------- include/inputstr.h | 2 +- 2 files changed, 86 insertions(+), 18 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index a83d5edb3..bbe70e486 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -823,6 +823,7 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) if ((++xV)->type == DeviceValuator) { int *axisvals; int first = xV->first_valuator; + BOOL change = FALSE; if (xV->num_valuators && (!v || (xV->num_valuators && @@ -830,24 +831,91 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) FatalError("Bad valuators reported for device %s\n", device->name); if (v && v->axisVal) { + /* The device always stores values in absolute. Only the + * delivery mode changes. + * If device is mode Absolute, and event is Relative + * dev += event + * event = dev + * If device is mode Absolute, and event is Absolute + * dev = event + * If device is mode Relative, and event is Absolute + * swap = (event - device) + * dev = event + * event = delta + * If device is mode Relative, and event is Relative + * dev += event + * + * XXX: axis clipping for relative events? + */ axisvals = v->axisVal; - switch (xV->num_valuators) { - case 6: - *(axisvals + first + 5) = xV->valuator5; - case 5: - *(axisvals + first + 4) = xV->valuator4; - case 4: - *(axisvals + first + 3) = xV->valuator3; - case 3: - *(axisvals + first + 2) = xV->valuator2; - case 2: - *(axisvals + first + 1) = xV->valuator1; - case 1: - *(axisvals + first) = xV->valuator0; - case 0: - default: - break; - } + if (xV->sequenceNumber & Absolute) { + int delta; + if (v->mode == Relative) /* device reports relative */ + { + change = TRUE; + xV->sequenceNumber &= ~Absolute; + } + + switch (xV->num_valuators) { + case 6: + if (change) delta = xV->valuator5 - *(axisvals + first + 5); + *(axisvals + first + 5) = xV->valuator5; + if (change) xV->valuator5 = delta; + case 5: + if (change) delta = xV->valuator4 - *(axisvals + first + 4); + *(axisvals + first + 4) = xV->valuator4; + if (change) xV->valuator4 = delta; + case 4: + if (change) delta = xV->valuator3 - *(axisvals + first + 3); + *(axisvals + first + 3) = xV->valuator3; + if (change) xV->valuator3 = delta; + case 3: + if (change) delta = xV->valuator2 - *(axisvals + first + 2); + *(axisvals + first + 2) = xV->valuator2; + if (change) xV->valuator2 = delta; + case 2: + if (change) delta = xV->valuator1 - *(axisvals + first + 1); + *(axisvals + first + 1) = xV->valuator1; + if (change) xV->valuator1 = delta; + case 1: + if (change) delta = xV->valuator0 - *(axisvals + first); + *(axisvals + first) = xV->valuator0; + if (change) xV->valuator0 = delta; + case 0: + default: + break; + } + } else { /* event is relative */ + if (v->mode == Absolute) /* device reports absolute */ + { + change = TRUE; + xV->sequenceNumber |= Absolute; + } + + switch (xV->num_valuators) { + case 6: + *(axisvals + first + 5) += xV->valuator5; + if (change) xV->valuator5 = *(axisvals + first + 5); + case 5: + *(axisvals + first + 4) += xV->valuator4; + if (change) xV->valuator4 = *(axisvals + first + 4); + case 4: + *(axisvals + first + 3) += xV->valuator3; + if (change) xV->valuator3 = *(axisvals + first + 3); + case 3: + *(axisvals + first + 2) += xV->valuator2; + if (change) xV->valuator2 = *(axisvals + first + 2); + case 2: + *(axisvals + first + 1) += xV->valuator1; + if (change) xV->valuator1 = *(axisvals + first + 1); + case 1: + *(axisvals + first) += xV->valuator0; + if (change) xV->valuator0 = *(axisvals + first); + case 0: + default: + break; + } + } } } } diff --git a/include/inputstr.h b/include/inputstr.h index 8c1d5fc5a..d117e554d 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -174,7 +174,7 @@ typedef struct _ValuatorClassRec { AxisInfoPtr axes; unsigned short numAxes; - int *axisVal; + int *axisVal; /* always absolute, but device-coord system */ int dxremaind, dyremaind; /* for acceleration */ CARD8 mode; } ValuatorClassRec, *ValuatorClassPtr; From 46340b740640b76b52b8e69bc67f9201c7e974c3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 29 Apr 2008 14:17:48 +0930 Subject: [PATCH 441/634] Xi: change UpdateDeviceState to be _X_EXPORT. --- Xi/exevents.c | 2 +- include/exevents.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index bbe70e486..68e82dde9 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -778,7 +778,7 @@ ChangeMasterDeviceClasses(DeviceIntPtr device, #define DEFAULT 0 #define DONT_PROCESS 1 #define IS_REPEAT 2 -static int +_X_EXPORT int UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) { int i; diff --git a/include/exevents.h b/include/exevents.h index 8d5d5dd49..664e236dc 100644 --- a/include/exevents.h +++ b/include/exevents.h @@ -44,6 +44,12 @@ typedef struct _XIClientRec { extern void RegisterOtherDevice ( DeviceIntPtr /* device */); +extern int +UpdateDeviceState ( + DeviceIntPtr /* device */, + xEventPtr /* xE */, + int /* count */); + extern void ProcessOtherEvent ( xEventPtr /* FIXME deviceKeyButtonPointer * xE */, DeviceIntPtr /* other */, From 8208b842b7dd3b30bafdd74147bdfa63bc00cc40 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 29 Apr 2008 14:19:42 +0930 Subject: [PATCH 442/634] Xi: add IEventBase global variable. Stores event base for X Input events. --- Xi/exglobals.h | 1 + Xi/extinit.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Xi/exglobals.h b/Xi/exglobals.h index 4c23d84b4..0b1caf99c 100644 --- a/Xi/exglobals.h +++ b/Xi/exglobals.h @@ -37,6 +37,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #define EXGLOBALS_H 1 extern int IReqCode; +extern int IEventBase; extern int BadDevice; extern int BadMode; extern int DeviceBusy; diff --git a/Xi/extinit.c b/Xi/extinit.c index a647b9e18..99ace898f 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -277,6 +277,7 @@ static int (*SProcIVector[])(ClientPtr) = { */ int IReqCode = 0; +int IEventBase = 0; int BadDevice = 0; static int BadEvent = 1; int BadMode = 2; @@ -885,6 +886,7 @@ RestoreExtensionEvents(void) int i, j; IReqCode = 0; + IEventBase = 0; for (i = 0; i < ExtEventIndex - 1; i++) { if ((EventInfo[i].type >= LASTEvent) && (EventInfo[i].type < 128)) @@ -1122,6 +1124,7 @@ XInputExtensionInit(void) SProcIDispatch, IResetProc, StandardMinorOpcode); if (extEntry) { IReqCode = extEntry->base; + IEventBase = extEntry->eventBase; AllExtensionVersions[IReqCode - 128] = thisversion; MakeDeviceTypeAtoms(); RT_INPUTCLIENT = CreateNewResourceType((DeleteType) InputClientGone); From ec2fca7e6f7ce8fdf33d959b7adeaae935ec4b37 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 29 Apr 2008 14:40:44 +0930 Subject: [PATCH 443/634] xfree86: DGA needs to call into Xi. Two steps: first use UpdateDeviceState() instead of replicating the device changing code. And emulate XI events instead of core events. --- hw/xfree86/common/xf86DGA.c | 153 ++++++++---------------------------- 1 file changed, 33 insertions(+), 120 deletions(-) diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index 89fdec6f5..9c79505f4 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c @@ -46,6 +46,7 @@ #include #endif #include "xf86Xinput.h" +#include "exglobals.h" #include "mi.h" @@ -1025,17 +1026,12 @@ static Mask filters[] = static void DGAProcessKeyboardEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr keybd) { - int key, bit; - register BYTE *kptr; - register int i; - register CARD8 modifiers; - register CARD16 mask; int coreEquiv; - xEvent core; + xEvent xi; KeyClassPtr keyc = keybd->key; DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); DeviceIntPtr pointer = GetPairedDevice(keybd); - + coreEquiv = de->u.u.type - *XDGAEventBase; /* @@ -1046,59 +1042,10 @@ DGAProcessKeyboardEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr keybd) de->u.event.screen = pScreen->myNum; de->u.event.state = keyc->state | pointer->button->state; - /* - * Keep the core state in sync by duplicating what - * CoreProcessKeyboardEvent does - */ - key = de->u.u.detail; - kptr = &keyc->down[key >> 3]; - bit = 1 << (key & 7); - modifiers = keyc->modifierMap[key]; - switch (coreEquiv) - { - case KeyPress: - pointer->valuator->motionHintWindow = NullWindow; - *kptr |= bit; - keyc->prev_state = keyc->state; -#ifdef XKB - if (noXkbExtension) -#endif - { - - for (i = 0, mask = 1; modifiers; i++, mask <<= 1) - { - if (mask & modifiers) - { - /* This key affects modifier "i" */ - keyc->modifierKeyCount[i]++; - keyc->state |= mask; - modifiers &= ~mask; - } - } - } - break; - case KeyRelease: - pointer->valuator->motionHintWindow = NullWindow; - *kptr &= ~bit; - keyc->prev_state = keyc->state; -#ifdef XKB - if (noXkbExtension) -#endif - { - for (i = 0, mask = 1; modifiers; i++, mask <<= 1) - { - if (mask & modifiers) { - /* This key affects modifier "i" */ - if (--keyc->modifierKeyCount[i] <= 0) { - keyc->state &= ~mask; - keyc->modifierKeyCount[i] = 0; - } - modifiers &= ~mask; - } - } - } - break; - } + de->u.u.type = (IEventBase - 1) + coreEquiv; /* change to XI event */ + UpdateDeviceState(keybd, de); + de->u.u.type = *XDGAEventBase + coreEquiv; /* change back */ + /* * Deliver the DGA event */ @@ -1113,17 +1060,16 @@ DGAProcessKeyboardEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr keybd) /* If the keyboard is actively grabbed, deliver a grabbed core event */ if (keybd->deviceGrab.grab && !keybd->deviceGrab.fromPassiveGrab) { - /* I've got no clue if that is correct but only working on core - * grabs seems the right thing here. (whot) */ - core.u.u.type = coreEquiv; - core.u.u.detail = de->u.u.detail; - core.u.keyButtonPointer.time = de->u.event.time; - core.u.keyButtonPointer.eventX = de->u.event.dx; - core.u.keyButtonPointer.eventY = de->u.event.dy; - core.u.keyButtonPointer.rootX = de->u.event.dx; - core.u.keyButtonPointer.rootY = de->u.event.dy; - core.u.keyButtonPointer.state = de->u.event.state; - DeliverGrabbedEvent (&core, keybd, FALSE, 1); + xi.u.u.type = (IEventBase - 1) + coreEquiv; + xi.u.u.detail = de->u.u.detail; + xi.u.keyButtonPointer.time = de->u.event.time; + xi.u.keyButtonPointer.eventX = de->u.event.dx; + xi.u.keyButtonPointer.eventY = de->u.event.dy; + xi.u.keyButtonPointer.rootX = de->u.event.dx; + xi.u.keyButtonPointer.rootY = de->u.event.dy; + xi.u.keyButtonPointer.state = de->u.event.state; + ((deviceKeyButtonPointer*)&xi)->deviceid = keybd->id; + DeliverGrabbedEvent (&xi, keybd, FALSE, 1); } } } @@ -1132,9 +1078,9 @@ static void DGAProcessPointerEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr mouse) { ButtonClassPtr butc = mouse->button; - int coreEquiv; + int coreEquiv; DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); - xEvent core; + xEvent xi; coreEquiv = de->u.u.type - *XDGAEventBase; /* @@ -1142,44 +1088,11 @@ DGAProcessPointerEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr mouse) */ de->u.event.screen = pScreen->myNum; de->u.event.state = butc->state | GetPairedDevice(mouse)->key->state; - /* - * Keep the core state in sync by duplicating what - * CoreProcessPointerEvent does - */ - if (coreEquiv != MotionNotify) - { - int key; - BYTE *kptr; - int bit; - - key = de->u.u.detail; - kptr = &butc->down[key >> 3]; - bit = 1 << (key & 7); - switch (coreEquiv) - { - case ButtonPress: - mouse->valuator->motionHintWindow = NullWindow; - if (!(*kptr & bit)) - butc->buttonsDown++; - butc->motionMask = ButtonMotionMask; - *kptr |= bit; - if (key <= 5) - butc->state |= (Button1Mask >> 1) << key; - break; - case ButtonRelease: - mouse->valuator->motionHintWindow = NullWindow; - if (*kptr & bit) - --butc->buttonsDown; - if (!butc->buttonsDown) - butc->motionMask = 0; - *kptr &= ~bit; - if (key == 0) - return; - if (key <= 5) - butc->state &= ~((Button1Mask >> 1) << key); - break; - } - } + + de->u.u.type = (IEventBase - 1) + coreEquiv; /* change to XI event */ + UpdateDeviceState(mouse, de); + de->u.u.type = *XDGAEventBase + coreEquiv; /* change back */ + /* * Deliver the DGA event */ @@ -1194,15 +1107,15 @@ DGAProcessPointerEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr mouse) /* If the pointer is actively grabbed, deliver a grabbed core event */ if (mouse->deviceGrab.grab && !mouse->deviceGrab.fromPassiveGrab) { - core.u.u.type = coreEquiv; - core.u.u.detail = de->u.u.detail; - core.u.keyButtonPointer.time = de->u.event.time; - core.u.keyButtonPointer.eventX = de->u.event.dx; - core.u.keyButtonPointer.eventY = de->u.event.dy; - core.u.keyButtonPointer.rootX = de->u.event.dx; - core.u.keyButtonPointer.rootY = de->u.event.dy; - core.u.keyButtonPointer.state = de->u.event.state; - DeliverGrabbedEvent (&core, mouse, FALSE, 1); + xi.u.u.type = (IEventBase - 1 ) + coreEquiv; + xi.u.u.detail = de->u.u.detail; + xi.u.keyButtonPointer.time = de->u.event.time; + xi.u.keyButtonPointer.eventX = de->u.event.dx; + xi.u.keyButtonPointer.eventY = de->u.event.dy; + xi.u.keyButtonPointer.rootX = de->u.event.dx; + xi.u.keyButtonPointer.rootY = de->u.event.dy; + xi.u.keyButtonPointer.state = de->u.event.state; + DeliverGrabbedEvent (&xi, mouse, FALSE, 1); } } } From ff36753755360aaa16ab8604a0ab78123884b57d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 29 Apr 2008 14:53:41 +0930 Subject: [PATCH 444/634] mi: call the custom event handlers for both MD and SD. --- mi/mieq.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/mi/mieq.c b/mi/mieq.c index 082ebab91..9f818677b 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -313,16 +313,7 @@ mieqProcessInputEvents(void) NewCurrentScreen (e->pDev, DequeueScreen(e->pDev), x, y); } else { - /* If someone's registered a custom event handler, let them - * steal it. */ - if (miEventQueue.handlers[e->events->event->u.u.type]) { - miEventQueue.handlers[e->events->event->u.u.type]( - DequeueScreen(e->pDev)->myNum, - e->events->event, - e->pDev, - e->nevents); - return; - } + mieqHandler handler; /* FIXME: Bad hack. The only event where we actually get multiple * events at once is a DeviceMotionNotify followed by @@ -350,13 +341,27 @@ mieqProcessInputEvents(void) } else master_event = NULL; - /* process slave first, then master */ - e->pDev->public.processInputProc(event, e->pDev, e->nevents); - - if (!e->pDev->isMaster && e->pDev->u.master) + /* If someone's registered a custom event handler, let them + * steal it. */ + if ((handler = miEventQueue.handlers[e->events->event->u.u.type])) { - e->pDev->u.master->public.processInputProc(master_event, - e->pDev->u.master, e->nevents); + handler(DequeueScreen(e->pDev)->myNum, e->events->event, + e->pDev, e->nevents); + if (!e->pDev->isMaster && e->pDev->u.master) + { + handler(DequeueScreen(e->pDev->u.master)->myNum, + e->events->event, e->pDev->u.master, e->nevents); + } + } else + { + /* process slave first, then master */ + e->pDev->public.processInputProc(event, e->pDev, e->nevents); + + if (!e->pDev->isMaster && e->pDev->u.master) + { + e->pDev->u.master->public.processInputProc(master_event, + e->pDev->u.master, e->nevents); + } } if (e->nevents > 1) From 2b179c32ac40f5258d95ae16da96a79fa8eea696 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 29 Apr 2008 15:15:16 +0930 Subject: [PATCH 445/634] include: add declaration for CopyGetMasterEvent to shut up compiler warning. --- include/input.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/input.h b/include/input.h index 0c993eed0..10dadfebc 100644 --- a/include/input.h +++ b/include/input.h @@ -512,12 +512,18 @@ extern Bool RegisterPairingClient(ClientPtr client); extern DeviceIntPtr GuessFreePointerDevice(void); extern DeviceIntPtr NextFreePointerDevice(void); +extern void CopyGetMasterEvent(DeviceIntPtr mdev, + xEvent* original, + xEvent** master, + int count); + extern int AllocMasterDevice(ClientPtr client, char* name, DeviceIntPtr* ptr, DeviceIntPtr* keybd); extern void DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to); + extern void FreeDeviceClass(int type, pointer* class); extern void FreeFeedbackClass(int type, pointer* class); extern void FreeAllDeviceClasses(ClassesPtr classes); From 18b33dd4ff46f63bad70b493b1d0b0758c961ada Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 29 Apr 2008 15:24:55 +0930 Subject: [PATCH 446/634] Xi: stop excessive use of _X_EXPORT. --- Xi/exevents.c | 6 +++--- Xi/extinit.c | 2 +- Xi/listdev.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 68e82dde9..761950ead 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -107,7 +107,7 @@ RegisterOtherDevice(DeviceIntPtr device) device->public.realInputProc = ProcessOtherEvent; } -_X_EXPORT Bool +Bool IsPointerEvent(xEvent* xE) { switch(xE->u.u.type) @@ -490,7 +490,7 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) * Saves a few memory allocations. */ -_X_EXPORT void +void DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) { ClassesPtr classes; @@ -778,7 +778,7 @@ ChangeMasterDeviceClasses(DeviceIntPtr device, #define DEFAULT 0 #define DONT_PROCESS 1 #define IS_REPEAT 2 -_X_EXPORT int +int UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) { int i; diff --git a/Xi/extinit.c b/Xi/extinit.c index 99ace898f..1d68d1e27 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -966,7 +966,7 @@ IResetProc(ExtensionEntry * unused) * */ -_X_EXPORT Bool +Bool DeviceIsPointerType(DeviceIntPtr dev) { if (dev_type[1].type == dev->type) diff --git a/Xi/listdev.c b/Xi/listdev.c index c484dcca7..ce549da50 100644 --- a/Xi/listdev.c +++ b/Xi/listdev.c @@ -93,7 +93,7 @@ SProcXListInputDevices(ClientPtr client) * */ -_X_EXPORT void +void SizeDeviceInfo(DeviceIntPtr d, int *namesize, int *size) { int chunks; From 00acb40f2bc5bb4a1977b9b08db75630677ff787 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 30 Apr 2008 11:29:03 +0930 Subject: [PATCH 447/634] dix: fix typo in clipAxis. Check needs to be (min_axis < max_axis), not (min_axis < min_axis) --- dix/getevents.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index 0a44a809f..e9c1db0f5 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -358,8 +358,9 @@ clipAxis(DeviceIntPtr pDev, int axisNum, int *val) { AxisInfoPtr axes = pDev->valuator->axes + axisNum; - /* No clipping if the value-range <= 0 */ - if(axes->min_value < axes->min_value) { + /* Don't clip if min_value and max_value are the same, or if an invalid + range is specified. */ + if(axes->min_value < axes->max_value) { if (*val < axes->min_value) *val = axes->min_value; if (*val > axes->max_value) From ffaccc2dc91f4ca4ea10da010206a0a7d2b5540c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 30 Apr 2008 11:45:19 +0930 Subject: [PATCH 448/634] input: replace -1 as default axis limit with NO_AXIS_LIMIT define. This allows easier refacturing of the coordinate limit handling. Grepping for -1 is boring. --- Xi/exevents.c | 13 +++++++++++-- dix/devices.c | 15 ++++++++------- dix/getevents.c | 17 +++++++++-------- include/input.h | 2 ++ 4 files changed, 30 insertions(+), 17 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 761950ead..d0c10d9da 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -1153,13 +1153,22 @@ InitProximityClassDeviceStruct(DeviceIntPtr dev) return TRUE; } +/** + * Initialise the device's valuators. The memory must already be allocated, + * this function merely inits the matching axis (specified through axnum) to + * sane values. + * + * It is a condition that (minval < maxval). + * + * @see InitValuatorClassDeviceStruct + */ _X_EXPORT void InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, int maxval, int resolution, int min_res, int max_res) { AxisInfoPtr ax; - - if (!dev || !dev->valuator) + + if (!dev || !dev->valuator || minval > maxval) return; ax = dev->valuator->axes + axnum; diff --git a/dix/devices.c b/dix/devices.c index 37feb34a3..abd3cb6d2 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -1187,7 +1187,8 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, AllocateMotionHistory(dev); for (i=0; iaxisVal[i]=0; } return TRUE; @@ -1203,10 +1204,10 @@ InitAbsoluteClassDeviceStruct(DeviceIntPtr dev) return FALSE; /* we don't do anything sensible with these, but should */ - abs->min_x = -1; - abs->min_y = -1; - abs->max_x = -1; - abs->max_y = -1; + abs->min_x = NO_AXIS_LIMITS; + abs->min_y = NO_AXIS_LIMITS; + abs->max_x = NO_AXIS_LIMITS; + abs->max_y = NO_AXIS_LIMITS; abs->flip_x = 0; abs->flip_y = 0; abs->rotation = 0; @@ -1214,8 +1215,8 @@ InitAbsoluteClassDeviceStruct(DeviceIntPtr dev) abs->offset_x = 0; abs->offset_y = 0; - abs->width = -1; - abs->height = -1; + abs->width = NO_AXIS_LIMITS; + abs->height = NO_AXIS_LIMITS; abs->following = 0; abs->screen = 0; diff --git a/dix/getevents.c b/dix/getevents.c index e9c1db0f5..a358bb3e9 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -358,14 +358,15 @@ clipAxis(DeviceIntPtr pDev, int axisNum, int *val) { AxisInfoPtr axes = pDev->valuator->axes + axisNum; - /* Don't clip if min_value and max_value are the same, or if an invalid - range is specified. */ - if(axes->min_value < axes->max_value) { - if (*val < axes->min_value) - *val = axes->min_value; - if (*val > axes->max_value) - *val = axes->max_value; - } + /* InitValuatoraAxisStruct ensures that (min < max) */ + + if (axes->min_value != NO_AXIS_LIMITS && + *val < axis->min_value) + *val = axes->min_value; + + if (axes->max_value != NO_AXIS_LIMITS && + *val > axes->max_value) + *val = axes->max_value; } /** diff --git a/include/input.h b/include/input.h index 10dadfebc..ec6ac90e1 100644 --- a/include/input.h +++ b/include/input.h @@ -63,6 +63,8 @@ SOFTWARE. #define POINTER_ABSOLUTE (1 << 2) #define POINTER_ACCELERATE (1 << 3) +#define NO_AXIS_LIMITS -1 + #define MAP_LENGTH 256 #define DOWN_LENGTH 32 /* 256/8 => number of bytes to hold 256 bits */ #define NullGrab ((GrabPtr)NULL) From fea39c94bcc8b635d37530d8a27ee92acab484fe Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 30 Apr 2008 13:17:14 +0930 Subject: [PATCH 449/634] dix: fix typo from last commit. --- dix/getevents.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index a358bb3e9..6f25fe822 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -356,17 +356,17 @@ acceleratePointer(DeviceIntPtr pDev, int first_valuator, int num_valuators, static void clipAxis(DeviceIntPtr pDev, int axisNum, int *val) { - AxisInfoPtr axes = pDev->valuator->axes + axisNum; + AxisInfoPtr axis = pDev->valuator->axes + axisNum; /* InitValuatoraAxisStruct ensures that (min < max) */ - if (axes->min_value != NO_AXIS_LIMITS && + if (axis->min_value != NO_AXIS_LIMITS && *val < axis->min_value) - *val = axes->min_value; + *val = axis->min_value; - if (axes->max_value != NO_AXIS_LIMITS && - *val > axes->max_value) - *val = axes->max_value; + if (axis->max_value != NO_AXIS_LIMITS && + *val > axis->max_value) + *val = axis->max_value; } /** From a0e6a7d4f507c5c0a0b11adb10394af58a0a6e07 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 30 Apr 2008 17:57:48 +0930 Subject: [PATCH 450/634] dix: resize EQ to minimum size to avoid reallocs during SIGIO. When a new device is added, calculate the event size needed if a DCCE event is sent and set the EQ's event size to this minimum. This avoids reallocs when a event is sent (which may happen during a SIGIO). --- dix/devices.c | 1 + mi/mi.h | 4 ++++ mi/mieq.c | 10 ++++++++++ 3 files changed, 15 insertions(+) diff --git a/dix/devices.c b/dix/devices.c index abd3cb6d2..802bf79d0 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -249,6 +249,7 @@ EnableDevice(DeviceIntPtr dev) listlen = GetEventList(&evlist); OsBlockSignals(); SetMinimumEventSize(evlist, listlen, evsize); + mieqResizeEvents(evsize); OsReleaseSignals(); if ((*prev != dev) || !dev->inited || diff --git a/mi/mi.h b/mi/mi.h index 842edf319..0af1a1bd3 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -153,6 +153,10 @@ extern Bool mieqInit( void ); +extern void mieqResize( + int /* min_size */ +); + extern void mieqEnqueue( DeviceIntPtr /*pDev*/, xEventPtr /*e*/ diff --git a/mi/mieq.c b/mi/mieq.c index 9f818677b..3ab893650 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -102,6 +102,16 @@ mieqInit(void) return TRUE; } +/* Ensure all events in the EQ are at least size bytes. */ +Bool +mieqResizeEvents(int min_size) +{ + int i; + + for (i = 0; i < QUEUE_SIZE; i++) + SetMinimumEventSize(miEventQueue.events[i].events, 7, min_size); +} + /* * Must be reentrant with ProcessInputEvents. Assumption: mieqEnqueue * will never be interrupted. If this is called from both signal From 8e56fd9728d63a7a48ef44503425c6e25c7c9ffb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 2 May 2008 10:22:06 +0930 Subject: [PATCH 451/634] dix: continue to check for invalid valuator ranges. In an ideal world, the drivers would init all axes with NO_AXIS_LIMIT. In the real world, this is an ABI break, so let's just leave the old check in. --- dix/getevents.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dix/getevents.c b/dix/getevents.c index 6f25fe822..414e27e21 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -358,7 +358,14 @@ clipAxis(DeviceIntPtr pDev, int axisNum, int *val) { AxisInfoPtr axis = pDev->valuator->axes + axisNum; - /* InitValuatoraAxisStruct ensures that (min < max) */ + /* InitValuatoraAxisStruct ensures that (min < max). */ + + + /* FIXME: drivers need to be updated, evdev e.g. inits axes as min = 0 and + * max = -1. Leave this extra check until the drivers have been updated. + */ + if (axis->max_value < axis->min_value) + return; if (axis->min_value != NO_AXIS_LIMITS && *val < axis->min_value) From 6f63724b28c8b3fd85314fb95d1e4f363b610e19 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 2 May 2008 14:56:58 +0930 Subject: [PATCH 452/634] xfree86: don't try to repaint the cursor before cursors exist. --- hw/xfree86/modes/xf86Cursors.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c index 42a4eaaf9..73a46635f 100644 --- a/hw/xfree86/modes/xf86Cursors.c +++ b/hw/xfree86/modes/xf86Cursors.c @@ -596,8 +596,10 @@ xf86_reload_cursors (ScreenPtr screen) CursorPtr cursor; int x, y; - /* initial mode setting will not have set a screen yet */ - if (!screen) + /* initial mode setting will not have set a screen yet. + May be called before the devices are initialised. + */ + if (!screen || !inputInfo.pointer) return; scrn = xf86Screens[screen->myNum]; xf86_config = XF86_CRTC_CONFIG_PTR(scrn); From 6acc2acd0db2826add7c47e94e4061d169a41f88 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Mon, 5 May 2008 15:32:26 -0700 Subject: [PATCH 453/634] Rootless: mi doesn't let us resize root, so we need to do it ourselves... (cherry picked from commit c1ec36e28cff857664090cc8792db1ae93b783fa) --- miext/rootless/rootlessWindow.c | 67 ++++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 23 deletions(-) diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index df1d3a879..0edafe7ea 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -1338,34 +1338,55 @@ RootlessResizeWindow(WindowPtr pWin, int x, int y, RegionRec saveRoot; RL_DEBUG_MSG("resizewindow start (win 0x%x) ", pWin); + + if(pWin->parent) { + if (winRec) { + oldBW = winRec->borderWidth; + oldX = winRec->x; + oldY = winRec->y; + oldW = winRec->width; + oldH = winRec->height; - if (winRec) { - oldBW = winRec->borderWidth; - oldX = winRec->x; - oldY = winRec->y; - oldW = winRec->width; - oldH = winRec->height; + newBW = oldBW; + newX = x; + newY = y; + newW = w + 2*newBW; + newH = h + 2*newBW; - newBW = oldBW; - newX = x; - newY = y; - newW = w + 2*newBW; - newH = h + 2*newBW; + resize_after = StartFrameResize(pWin, TRUE, + oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } - resize_after = StartFrameResize(pWin, TRUE, - oldX, oldY, oldW, oldH, oldBW, - newX, newY, newW, newH, newBW); - } + HUGE_ROOT(pWin); + SCREEN_UNWRAP(pScreen, ResizeWindow); + pScreen->ResizeWindow(pWin, x, y, w, h, pSib); + SCREEN_WRAP(pScreen, ResizeWindow); + NORMAL_ROOT(pWin); - HUGE_ROOT(pWin); - SCREEN_UNWRAP(pScreen, ResizeWindow); - pScreen->ResizeWindow(pWin, x, y, w, h, pSib); - SCREEN_WRAP(pScreen, ResizeWindow); - NORMAL_ROOT(pWin); + if (winRec) { + FinishFrameResize(pWin, TRUE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW, resize_after); + } + } else { + /* Special case for resizing the root window */ + BoxRec box; - if (winRec) { - FinishFrameResize(pWin, TRUE, oldX, oldY, oldW, oldH, oldBW, - newX, newY, newW, newH, newBW, resize_after); + pWin->drawable.x = x; + pWin->drawable.y = y; + pWin->drawable.width = w; + pWin->drawable.height = h; + + box.x1 = x; box.y1 = y; + box.x2 = x + w; box.y2 = y + h; + REGION_UNINIT(pScreen, &pWin->winSize); + REGION_INIT(pScreen, &pWin->winSize, &box, 1); + REGION_COPY(pScreen, &pWin->borderSize, &pWin->winSize); + REGION_COPY(pScreen, &pWin->clipList, &pWin->winSize); + REGION_COPY(pScreen, &pWin->borderClip, &pWin->winSize); + + miSendExposures(pWin, &pWin->borderClip, + pWin->drawable.x, pWin->drawable.y); } RL_DEBUG_MSG("resizewindow end\n"); From 3df88c17e315b5ae580096e4bc88920d1f452e83 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 6 May 2008 11:50:20 +0930 Subject: [PATCH 454/634] xfree86: re-enable hardware cursor (for a single cursor) This commit enables HW rendering for cursors again, but only for a single cursor. Other cursors can be created, however they will not be visible. --- hw/xfree86/ramdac/xf86Cursor.c | 48 +++++++++++++++++++++++++++++++++- hw/xfree86/ramdac/xf86HWCurs.c | 4 --- 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c index 5c909c7c4..61fb0ed58 100644 --- a/hw/xfree86/ramdac/xf86Cursor.c +++ b/hw/xfree86/ramdac/xf86Cursor.c @@ -26,12 +26,18 @@ static Bool xf86CursorRealizeCursor(DeviceIntPtr, ScreenPtr, CursorPtr); static Bool xf86CursorUnrealizeCursor(DeviceIntPtr, ScreenPtr, CursorPtr); static void xf86CursorSetCursor(DeviceIntPtr, ScreenPtr, CursorPtr, int, int); static void xf86CursorMoveCursor(DeviceIntPtr, ScreenPtr, int, int); +static Bool xf86DeviceCursorInitialize(DeviceIntPtr, ScreenPtr); +static void xf86DeviceCursorCleanup(DeviceIntPtr, ScreenPtr); +static void xf86DeviceCursorUndisplay(DeviceIntPtr, ScreenPtr); static miPointerSpriteFuncRec xf86CursorSpriteFuncs = { xf86CursorRealizeCursor, xf86CursorUnrealizeCursor, xf86CursorSetCursor, - xf86CursorMoveCursor + xf86CursorMoveCursor, + xf86DeviceCursorInitialize, + xf86DeviceCursorCleanup, + xf86DeviceCursorUndisplay }; /* Screen functions */ @@ -420,3 +426,43 @@ xf86DestroyCursorInfoRec(xf86CursorInfoPtr infoPtr) { xfree(infoPtr); } + +/** + * New cursor has been created. Do your initalizations here. + */ +static Bool +xf86DeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) +{ + xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, xf86CursorScreenKey); + + /* Init SW cursor */ + return (*ScreenPriv->spriteFuncs->DeviceCursorInitialize)(pDev, pScreen); +} + +/** + * Cursor has been removed. Clean up after yourself. + */ +static void +xf86DeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) +{ + xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, xf86CursorScreenKey); + + /* Clean up SW cursor */ + (*ScreenPriv->spriteFuncs->DeviceCursorCleanup)(pDev, pScreen); +} + +/** + * Called on server shutdown to remove all cursors from the screen before + * bringing the server down. + */ +static void +xf86DeviceCursorUndisplay(DeviceIntPtr pDev, ScreenPtr pScreen) +{ + xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, xf86CursorScreenKey); + + /* Undisplay SW cursor */ + (*ScreenPriv->spriteFuncs->UndisplayCursor)(pDev, pScreen); +} diff --git a/hw/xfree86/ramdac/xf86HWCurs.c b/hw/xfree86/ramdac/xf86HWCurs.c index 4c5ef4039..d10e283d7 100644 --- a/hw/xfree86/ramdac/xf86HWCurs.c +++ b/hw/xfree86/ramdac/xf86HWCurs.c @@ -73,10 +73,6 @@ static unsigned char* RealizeCursorInterleave64(xf86CursorInfoPtr, CursorPtr); Bool xf86InitHardwareCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr) { - /* Graphics cards cannot render multiple cursors in hardware. We have to - software render them. */ - return FALSE; - if ((infoPtr->MaxWidth <= 0) || (infoPtr->MaxHeight <= 0)) return FALSE; From b9c1a57e7a98dea63cd362f714411547e728a85a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 6 May 2008 14:51:23 +0930 Subject: [PATCH 455/634] xfree86: switch between to SW cursors if more than 1 sprite is available. Switches back to HW cursors when sprites other than the VCP are removed. The current state requires the cursor to change shape once before it updates to SW / HW rendering (whatever is appropriate), e.g. by moving into a different window. Until this is done, the cursor is invisible. --- hw/xfree86/ramdac/xf86Cursor.c | 44 +++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c index 61fb0ed58..4ecb03e7b 100644 --- a/hw/xfree86/ramdac/xf86Cursor.c +++ b/hw/xfree86/ramdac/xf86Cursor.c @@ -20,6 +20,8 @@ extern InputInfo inputInfo; DevPrivateKey xf86CursorScreenKey = &xf86CursorScreenKey; +#define XF86_FORCE_SW_CURSOR (1 << 7) + /* sprite functions */ static Bool xf86CursorRealizeCursor(DeviceIntPtr, ScreenPtr, CursorPtr); @@ -325,25 +327,29 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, PointPriv = (miPointerScreenPtr)dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); - if (infoPtr->pScrn->vtSema && (ScreenPriv->ForceHWCursorCount || (( -#ifdef ARGB_CURSOR - pCurs->bits->argb && infoPtr->UseHWCursorARGB && - (*infoPtr->UseHWCursorARGB) (pScreen, pCurs) ) || ( - pCurs->bits->argb == 0 && -#endif - (pCurs->bits->height <= infoPtr->MaxHeight) && - (pCurs->bits->width <= infoPtr->MaxWidth) && - (!infoPtr->UseHWCursor || (*infoPtr->UseHWCursor)(pScreen, pCurs)))))) + if (!(ScreenPriv->SWCursor & XF86_FORCE_SW_CURSOR)) { + if (infoPtr->pScrn->vtSema && (ScreenPriv->ForceHWCursorCount || (( +#ifdef ARGB_CURSOR + pCurs->bits->argb && infoPtr->UseHWCursorARGB && + (*infoPtr->UseHWCursorARGB) (pScreen, pCurs) ) || ( + pCurs->bits->argb == 0 && +#endif + (pCurs->bits->height <= infoPtr->MaxHeight) && + (pCurs->bits->width <= infoPtr->MaxWidth) && + (!infoPtr->UseHWCursor || (*infoPtr->UseHWCursor)(pScreen, pCurs)))))) + { if (ScreenPriv->SWCursor) /* remove the SW cursor */ - (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, x, y); + (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, x, y); xf86SetCursor(pScreen, pCurs, x, y); ScreenPriv->SWCursor = FALSE; ScreenPriv->isUp = TRUE; PointPriv->waitForUpdate = !infoPtr->pScrn->silkenMouse; return; + } + } PointPriv->waitForUpdate = TRUE; @@ -358,10 +364,12 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, } } - ScreenPriv->SWCursor = TRUE; + if (!ScreenPriv->SWCursor) + ScreenPriv->SWCursor = TRUE; if (pCurs->bits->emptyMask && !ScreenPriv->showTransparent) pCurs = NullCursor; + (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, pCurs, x, y); } @@ -436,6 +444,9 @@ xf86DeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( &pScreen->devPrivates, xf86CursorScreenKey); + if (pDev != inputInfo.pointer) + ScreenPriv->SWCursor = TRUE | XF86_FORCE_SW_CURSOR; + /* Init SW cursor */ return (*ScreenPriv->spriteFuncs->DeviceCursorInitialize)(pDev, pScreen); } @@ -446,9 +457,20 @@ xf86DeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) static void xf86DeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) { + DeviceIntPtr it; xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( &pScreen->devPrivates, xf86CursorScreenKey); + for (it = inputInfo.devices; it; it = it->next) + { + if (it->isMaster && it != inputInfo.pointer && it != + inputInfo.keyboard) + break; + } + + if (!it) /* no other sprites except VCP. restore HW rendering */ + ScreenPriv->SWCursor = TRUE; + /* Clean up SW cursor */ (*ScreenPriv->spriteFuncs->DeviceCursorCleanup)(pDev, pScreen); } From e4ebfed1785597b48b68e1bbdde3e5c4061b749f Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 6 May 2008 16:46:37 +1000 Subject: [PATCH 456/634] xf86edid: fix typo in debug output --- hw/xfree86/modes/xf86EdidModes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c index 09d00393e..057b93d7b 100644 --- a/hw/xfree86/modes/xf86EdidModes.c +++ b/hw/xfree86/modes/xf86EdidModes.c @@ -363,7 +363,7 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing, /* We only do seperate sync currently */ if (timing->sync != 0x03) { xf86DrvMsg(scrnIndex, X_INFO, - "%s: %dx%d Warning: We only handle seperate" + "%s: %dx%d Warning: We only handle separate" " sync.\n", __func__, timing->h_active, timing->v_active); } From 9e0d73fd8a43647b648ec5b2f0bcaae30c03259c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 6 May 2008 17:52:15 +0930 Subject: [PATCH 457/634] xfree86: call SetCursor for the VCP when switching between SW/HW rendering. We need a manual call to SetCursor when we switch from SW to HW rendering and the other way round. This way we display the new cursor after removing the old one. In addition, we only update the internal state for the VCP's sprite. This way, when we switch back to HW rendering the state is up-to-date and wasn't overwritten with the other sprite's state. The second part is a hack. It would be better to keep a state for each sprite, but then again we don't have hardware that can render multiple cursors so we might as well do with the hack. --- hw/xfree86/ramdac/xf86Cursor.c | 59 +++++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 15 deletions(-) diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c index 4ecb03e7b..010575b2e 100644 --- a/hw/xfree86/ramdac/xf86Cursor.c +++ b/hw/xfree86/ramdac/xf86Cursor.c @@ -302,10 +302,16 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr; miPointerScreenPtr PointPriv; - ScreenPriv->CurrentCursor = pCurs; - ScreenPriv->x = x; - ScreenPriv->y = y; - ScreenPriv->CursorToRestore = NULL; + /* only update for VCP, otherwise we get cursor jumps when removing a + sprite. The second cursor is never HW rendered anyway. */ + if (pDev == inputInfo.pointer || + (!pDev->isMaster && pDev->u.master == inputInfo.pointer)) + { + ScreenPriv->CurrentCursor = pCurs; + ScreenPriv->x = x; + ScreenPriv->y = y; + ScreenPriv->CursorToRestore = NULL; + } if (!infoPtr->pScrn->vtSema) ScreenPriv->SavedCursor = pCurs; @@ -322,8 +328,12 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, return; } - ScreenPriv->HotX = pCurs->bits->xhot; - ScreenPriv->HotY = pCurs->bits->yhot; + if (pDev == inputInfo.pointer || + (!pDev->isMaster && pDev->u.master == inputInfo.pointer)) + { + ScreenPriv->HotX = pCurs->bits->xhot; + ScreenPriv->HotY = pCurs->bits->yhot; + } PointPriv = (miPointerScreenPtr)dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); @@ -379,12 +389,17 @@ xf86CursorMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( &pScreen->devPrivates, xf86CursorScreenKey); - ScreenPriv->x = x; - ScreenPriv->y = y; + /* only update coordinate state for first sprite, otherwise we get jumps + when removing a sprite. The second sprite is never HW rendered anyway */ + if (pDev == inputInfo.pointer || + (!pDev->isMaster && pDev->u.master == inputInfo.pointer)) + { + ScreenPriv->x = x; + ScreenPriv->y = y; + } if (ScreenPriv->CursorToRestore) - xf86CursorSetCursor(pDev, pScreen, ScreenPriv->CursorToRestore, - ScreenPriv->x, ScreenPriv->y); + xf86CursorSetCursor(pDev, pScreen, ScreenPriv->CursorToRestore, x, y); else if (ScreenPriv->SWCursor) (*ScreenPriv->spriteFuncs->MoveCursor)(pDev, pScreen, x, y); else if (ScreenPriv->isUp) @@ -441,14 +456,24 @@ xf86DestroyCursorInfoRec(xf86CursorInfoPtr infoPtr) static Bool xf86DeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) { + int ret; xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( &pScreen->devPrivates, xf86CursorScreenKey); - if (pDev != inputInfo.pointer) - ScreenPriv->SWCursor = TRUE | XF86_FORCE_SW_CURSOR; - /* Init SW cursor */ - return (*ScreenPriv->spriteFuncs->DeviceCursorInitialize)(pDev, pScreen); + ret = (*ScreenPriv->spriteFuncs->DeviceCursorInitialize)(pDev, pScreen); + + if (pDev != inputInfo.pointer) + { + if (!ScreenPriv->SWCursor) + { + ScreenPriv->spriteFuncs->SetCursor(inputInfo.pointer, pScreen, + ScreenPriv->CurrentCursor, ScreenPriv->x, ScreenPriv->y); + } + ScreenPriv->SWCursor = TRUE | XF86_FORCE_SW_CURSOR; + } + + return ret; } /** @@ -469,7 +494,11 @@ xf86DeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) } if (!it) /* no other sprites except VCP. restore HW rendering */ - ScreenPriv->SWCursor = TRUE; + { + ScreenPriv->SWCursor = TRUE; + xf86CursorSetCursor(inputInfo.pointer, pScreen, + ScreenPriv->CurrentCursor, ScreenPriv->x, ScreenPriv->y); + } /* Clean up SW cursor */ (*ScreenPriv->spriteFuncs->DeviceCursorCleanup)(pDev, pScreen); From d41d677ab4118e73140ea2392e0d48eb361af1cf Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Mon, 5 May 2008 20:55:08 -0700 Subject: [PATCH 458/634] Xquartz: experimental embedding of Sparkle.framework (cherry picked from commit b7a1a640cef8c69442859cbf89034ad362a19684) --- .../English.lproj/main.nib/designable.nib | 79 ++++++++------ .../English.lproj/main.nib/keyedobjects.nib | Bin 37918 -> 38309 bytes hw/xquartz/bundle/Sparkle.framework/Headers | 1 + hw/xquartz/bundle/Sparkle.framework/Resources | 1 + hw/xquartz/bundle/Sparkle.framework/Sparkle | 1 + .../A/Headers/NSApplication+AppCopies.h | 13 +++ .../A/Headers/NSFileManager+Authentication.h | 11 ++ .../A/Headers/NSFileManager+Verification.h | 15 +++ .../Versions/A/Headers/NSString+extras.h | 61 +++++++++++ .../Versions/A/Headers/RSS.h | 98 ++++++++++++++++++ .../Versions/A/Headers/SUAppcast.h | 27 +++++ .../Versions/A/Headers/SUAppcastItem.h | 57 ++++++++++ .../A/Headers/SUAutomaticUpdateAlert.h | 21 ++++ .../Versions/A/Headers/SUConstants.h | 20 ++++ .../Versions/A/Headers/SUStatusChecker.h | 26 +++++ .../Versions/A/Headers/SUStatusController.h | 33 ++++++ .../Versions/A/Headers/SUUnarchiver.h | 25 +++++ .../Versions/A/Headers/SUUpdateAlert.h | 40 +++++++ .../Versions/A/Headers/SUUpdater.h | 55 ++++++++++ .../Versions/A/Headers/SUUtilities.h | 20 ++++ .../Versions/A/Headers/Sparkle.h | 22 ++++ .../Versions/A/Resources/Info.plist | 22 ++++ .../A/Resources/SUStatus.nib/classes.nib | 12 +++ .../A/Resources/SUStatus.nib/info.nib | 16 +++ .../A/Resources/SUStatus.nib/keyedobjects.nib | Bin 0 -> 6873 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6589 bytes .../ca.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../ca.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10881 bytes .../A/Resources/ca.lproj/Sparkle.strings | Bin 0 -> 7138 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6559 bytes .../cs.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../cs.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10744 bytes .../A/Resources/cs.lproj/Sparkle.strings | Bin 0 -> 6978 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6380 bytes .../cy.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../cy.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10691 bytes .../A/Resources/cy.lproj/Sparkle.strings | Bin 0 -> 6910 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6438 bytes .../da.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../da.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10841 bytes .../A/Resources/da.lproj/Sparkle.strings | Bin 0 -> 6944 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6406 bytes .../de.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../de.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10689 bytes .../A/Resources/de.lproj/Sparkle.strings | Bin 0 -> 6938 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 16 +++ .../keyedobjects.nib | Bin 0 -> 6571 bytes .../en.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../en.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10634 bytes .../A/Resources/en.lproj/Sparkle.strings | Bin 0 -> 6908 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6380 bytes .../es.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../es.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10634 bytes .../A/Resources/es.lproj/Sparkle.strings | Bin 0 -> 6910 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6583 bytes .../fi.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../fi.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10787 bytes .../A/Resources/fi.lproj/Sparkle.strings | Bin 0 -> 6954 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6548 bytes .../fr.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../fr.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10882 bytes .../A/Resources/fr.lproj/Sparkle.strings | Bin 0 -> 7344 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6498 bytes .../he.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../he.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10712 bytes .../A/Resources/he.lproj/Sparkle.strings | Bin 0 -> 6212 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6380 bytes .../hu.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../hu.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10634 bytes .../A/Resources/hu.lproj/Sparkle.strings | Bin 0 -> 6910 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6380 bytes .../id.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../id.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10634 bytes .../A/Resources/id.lproj/Sparkle.strings | Bin 0 -> 6910 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6380 bytes .../is.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../is.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10634 bytes .../A/Resources/is.lproj/Sparkle.strings | Bin 0 -> 6942 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6415 bytes .../it.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../it.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10700 bytes .../A/Resources/it.lproj/Sparkle.strings | Bin 0 -> 7170 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6450 bytes .../ja.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../ja.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10724 bytes .../A/Resources/ja.lproj/Sparkle.strings | Bin 0 -> 5994 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6380 bytes .../ko.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../ko.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10634 bytes .../A/Resources/ko.lproj/Sparkle.strings | Bin 0 -> 6910 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6380 bytes .../nl.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../nl.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10634 bytes .../A/Resources/nl.lproj/Sparkle.strings | Bin 0 -> 6910 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6380 bytes .../no.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../no.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10634 bytes .../A/Resources/no.lproj/Sparkle.strings | Bin 0 -> 7056 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6565 bytes .../pl.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../pl.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10720 bytes .../A/Resources/pl.lproj/Sparkle.strings | Bin 0 -> 7076 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6380 bytes .../ru.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../ru.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10634 bytes .../A/Resources/ru.lproj/Sparkle.strings | Bin 0 -> 6922 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6574 bytes .../sk.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../sk.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10776 bytes .../A/Resources/sk.lproj/Sparkle.strings | Bin 0 -> 6902 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6380 bytes .../sv.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../sv.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10634 bytes .../A/Resources/sv.lproj/Sparkle.strings | Bin 0 -> 6912 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6380 bytes .../th.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../th.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10691 bytes .../A/Resources/th.lproj/Sparkle.strings | Bin 0 -> 6910 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6568 bytes .../tr.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../tr.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10773 bytes .../A/Resources/tr.lproj/Sparkle.strings | Bin 0 -> 6936 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6346 bytes .../zh_CN.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../zh_CN.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10489 bytes .../A/Resources/zh_CN.lproj/Sparkle.strings | Bin 0 -> 5536 bytes .../SUAutomaticUpdateAlert.nib/classes.nib | 12 +++ .../SUAutomaticUpdateAlert.nib/info.nib | 12 +++ .../keyedobjects.nib | Bin 0 -> 6380 bytes .../zh_TW.lproj/SUUpdateAlert.nib/classes.nib | 21 ++++ .../zh_TW.lproj/SUUpdateAlert.nib/info.nib | 16 +++ .../SUUpdateAlert.nib/keyedobjects.nib | Bin 0 -> 10742 bytes .../A/Resources/zh_TW.lproj/Sparkle.strings | Bin 0 -> 8562 bytes .../Sparkle.framework/Versions/A/Sparkle | Bin 0 -> 197376 bytes .../bundle/Sparkle.framework/Versions/Current | 1 + .../bundle/X11.xcodeproj/project.pbxproj | 35 ++++++- 210 files changed, 2269 insertions(+), 33 deletions(-) create mode 120000 hw/xquartz/bundle/Sparkle.framework/Headers create mode 120000 hw/xquartz/bundle/Sparkle.framework/Resources create mode 120000 hw/xquartz/bundle/Sparkle.framework/Sparkle create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSApplication+AppCopies.h create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h create mode 100755 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSString+extras.h create mode 100755 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/RSS.h create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcast.h create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUConstants.h create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusChecker.h create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusController.h create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUnarchiver.h create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdater.h create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUtilities.h create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/Sparkle.h create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/Info.plist create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/Sparkle.strings create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/classes.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/info.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/Sparkle.strings create mode 100755 hw/xquartz/bundle/Sparkle.framework/Versions/A/Sparkle create mode 120000 hw/xquartz/bundle/Sparkle.framework/Versions/Current diff --git a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib index c159d6ee1..c93d02372 100644 --- a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib +++ b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib @@ -66,6 +66,14 @@ + + + Check for updates... + + 2147483647 + + + YES @@ -1500,6 +1508,9 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 + + SUUpdater + @@ -2000,6 +2011,14 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 300394 + + + checkForUpdates: + + + + 300397 + @@ -2136,6 +2155,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 + @@ -3050,6 +3070,17 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 + + 300395 + + + Updater + + + 300396 + + + @@ -3121,7 +3152,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 244.IBWindowTemplateEditedContentRect 244.ImportedFromIB2 244.editorWindowContentRectSynchronizationRect - 244.lastResizeAction 244.windowTemplate.hasMaxSize 244.windowTemplate.hasMinSize 244.windowTemplate.maxSize @@ -3142,7 +3172,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 285.IBWindowTemplateEditedContentRect 285.ImportedFromIB2 285.editorWindowContentRectSynchronizationRect - 285.lastResizeAction 285.windowTemplate.hasMaxSize 285.windowTemplate.hasMinSize 285.windowTemplate.maxSize @@ -3188,6 +3217,8 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 300368.ImportedFromIB2 300370.IBPluginDependency 300370.ImportedFromIB2 + 300395.IBPluginDependency + 300396.IBPluginDependency 305.IBPluginDependency 305.ImportedFromIB2 310.IBPluginDependency @@ -3368,19 +3399,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 {{313, 353}, {484, 280}} {{184, 290}, {481, 345}} - - YES - - YES - IBResizeActionFinalFrame - IBResizeActionInitialFrame - - - YES - {{182, 481}, {484, 280}} - {{182, 103}, {536, 658}} - - {3.40282e+38, 3.40282e+38} @@ -3401,19 +3419,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 {{407, 545}, {454, 311}} {{433, 406}, {486, 327}} - - YES - - YES - IBResizeActionFinalFrame - IBResizeActionInitialFrame - - - YES - {{537, 554}, {454, 311}} - {{537, 576}, {471, 289}} - - {3.40282e+38, 3.40282e+38} @@ -3460,6 +3465,8 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3593,7 +3600,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - 300394 + 300397 @@ -3623,6 +3630,18 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 YES + + SUUpdater + NSObject + + checkForUpdates: + id + + + IBDocumentRelativeSource + ../Sparkle.framework/Versions/A/Headers/SUUpdater.h + + X11Controller NSObject @@ -3728,7 +3747,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 0 - + ../X11.xcodeproj 3 diff --git a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib index 95420e4f77d13556c624c3232b9c713cb056a537..066fdbe9eb259c9a99037890359e0707d073b5a7 100644 GIT binary patch literal 38309 zcmdSC2VfLc*EfFeow8+ilHK%5Hof->3WN?)LqZEBgk%GOBpb2`9h|Eaks=+GBGOb4 zP(VaLK#B#sfC?6@s3?LU*x`Tf%x*p9Gq;|5+CArYXGYalRXXa^ z(oQ3c2;vZr1SBE@G7gTKV5@Uf+G~oU>g}~dqDt$^##F+k!BO^6V{K*i4ljgfuYU*W zkbZcNjw#y3^3wWJ1(%pT`xN%HO}3SHa8}xB;V6=j38kZK)EecZPN*~Lj(VYmXa(AY zo*1B=*%W$b~yu@Cme0XPJQVk-{E zQ8*5#;Vhhub8s%c8+XFpaSvRC2jC&N7=4I`;}N(FkHzC~6&{Z#;pun=o{i_=`FJs2 zf*-+~@fQ3zehwePhw%~oGJXZ0!XLr4kMZaDOZ+wd4u6k-z&{g248%wz;zhhk5D6wx zB#|VMWRgO1@fMOt?j{|`J*0s2Cqv=)Ffy9d5Id(k=0}k z*+@2#?ND+D*-f4$FOpZttK=kkhrCP9kq^m7&lgL4z8Y?%FX0vaSw0{xDDJ!ZVUGmcbI#b zdxd+0dzU-IeawBro##I1E^wE*E8I2i7w%W?ckU*y<7M81_vK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^aw4cztNNQG(ATz&`b0x{e#}5x9MGapFX6I=~McgzM!S_O|*QpLbOu!?P#^= zJJENeHKTQ+^`Z@;jiMh!n?##OTSePM+eJG@J4d@kKZ^ER*oUk;OJKd3 zgSnW8>C9vS2ARboEQt+dX)Kdvvs_m8l!FyA!G^LCY!n;I#1*!OHL+rT!lEo?j6$#%27Y(G21j-h?;jt$17Bfp_NJ_(%L7ych4w6|QnG_i;ZD zmDMjXPvprwm1polJckeAAM+^Z+~&jiNIr&t!vDoT<&*iBd@7&LXY$#69$&y0@g;mY zU&Yt(_526EnQ!Ae_%6PO@8bvg5q^xH;HUXH{yV?Sukjnagx}>4_#^(5Kj$y`Yf)ZQ z6jekuQA5-ebwoYUP{fMHqM2wZ+KBd|ljthqMGw(a^broB3QZUSh=72?5?J&X14Nq0 z6gi?mP*Es^7%oPOabkk_xA;s<5z|DGm?dV5d18TBD83Ub#P?#2ST8n;AH^22UF;OQ z#XfOR92UjmxHu`!iQmN~aYft^CE|{_Cmx7L;;DEpUW!-pEm=uclQm?FtR?Hn2C|X- zKsJ*tWgFREc9flEHyJOx%LLh5DpHkR>63mLl3|%7Q)PzClDRTpMkSL&@lPt=XpS zw?lT=PO?+&EPJq>Zxg%F=Jqgqls(oSZ%?!*+h5rKvA?os*>mjq_P6#Dd%3;ZUT1Hx zH`!b49riAJkG;=6XcyZj?Thwh`-*+rzGvUJpV=?$mqRNKty%`Sl%?!Y>;F^Z@qhRK I=FkTJ2f!?eUH||9 diff --git a/hw/xquartz/bundle/Sparkle.framework/Headers b/hw/xquartz/bundle/Sparkle.framework/Headers new file mode 120000 index 000000000..a177d2a6b --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Resources b/hw/xquartz/bundle/Sparkle.framework/Resources new file mode 120000 index 000000000..953ee36f3 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Sparkle b/hw/xquartz/bundle/Sparkle.framework/Sparkle new file mode 120000 index 000000000..b2c52731e --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Sparkle @@ -0,0 +1 @@ +Versions/Current/Sparkle \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSApplication+AppCopies.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSApplication+AppCopies.h new file mode 100644 index 000000000..ee901e685 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSApplication+AppCopies.h @@ -0,0 +1,13 @@ +// +// NSApplication+AppCopies.h +// Sparkle +// +// Created by Andy Matuschak on 3/16/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import + +@interface NSApplication (SUAppCopies) +- (int)copiesRunning; +@end diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h new file mode 100644 index 000000000..c995911ca --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h @@ -0,0 +1,11 @@ +// +// NSFileManager+Authentication.m +// Sparkle +// +// Created by Andy Matuschak on 3/9/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +@interface NSFileManager (SUAuthenticationAdditions) +- (BOOL)movePathWithAuthentication:(NSString *)src toPath:(NSString *)dst; +@end diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h new file mode 100644 index 000000000..f0ce7c20c --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h @@ -0,0 +1,15 @@ +// +// NSFileManager+Verification.h +// Sparkle +// +// Created by Andy Matuschak on 3/16/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import + +// For the paranoid folks! +@interface NSFileManager (SUVerification) +- (BOOL)validatePath:(NSString *)path withMD5Hash:(NSString *)hash; +- (BOOL)validatePath:(NSString *)path withEncodedDSASignature:(NSString *)encodedSignature; +@end diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSString+extras.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSString+extras.h new file mode 100755 index 000000000..498e4d01c --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/NSString+extras.h @@ -0,0 +1,61 @@ +/* + +BSD License + +Copyright (c) 2002, Brent Simmons +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +* Neither the name of ranchero.com or Brent Simmons nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +*/ + + +/* + NSString+extras.h + NetNewsWire + + Created by Brent Simmons on Fri Jun 14 2002. + Copyright (c) 2002 Brent Simmons. All rights reserved. +*/ + + +#import +#import + + +@interface NSString (extras) + +- (NSString *)stringWithSubstitute:(NSString *)subs forCharactersFromSet:(NSCharacterSet *)set; + +- (NSString *) trimWhiteSpace; + +- (NSString *) stripHTML; + +- (NSString *) ellipsizeAfterNWords: (int) n; + ++ (BOOL) stringIsEmpty: (NSString *) s; + + +@end diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/RSS.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/RSS.h new file mode 100755 index 000000000..82da04a44 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/RSS.h @@ -0,0 +1,98 @@ +/* + +BSD License + +Copyright (c) 2002, Brent Simmons +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +* Neither the name of ranchero.com or Brent Simmons nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +*/ + +/* + RSS.h + A class for reading RSS feeds. + + Created by Brent Simmons on Wed Apr 17 2002. + Copyright (c) 2002 Brent Simmons. All rights reserved. +*/ + + +#import +#import +#import "NSString+extras.h" + + +@interface RSS : NSObject { + + NSDictionary *headerItems; + NSMutableArray *newsItems; + NSString *version; + + BOOL flRdf; + BOOL normalize; + } + + +/*Public*/ + +- (RSS *) initWithTitle: (NSString *) title andDescription: (NSString *) description; + +- (RSS *) initWithData: (NSData *) rssData normalize: (BOOL) fl; + +- (RSS *) initWithURL: (NSURL *) url normalize: (BOOL) fl; +- (RSS *) initWithURL: (NSURL *) url normalize: (BOOL) fl userAgent:(NSString *)userAgent; + +- (NSDictionary *) headerItems; + +- (NSMutableArray *) newsItems; + +- (NSString *) version; + +// AMM's extensions for Sparkle +- (NSDictionary *)newestItem; + + +/*Private*/ + +- (void) createheaderdictionary: (CFXMLTreeRef) tree; + +- (void) createitemsarray: (CFXMLTreeRef) tree; + +- (void) setversionstring: (CFXMLTreeRef) tree; + +- (void) flattenimagechildren: (CFXMLTreeRef) tree into: (NSMutableDictionary *) dictionary; + +- (void) flattensourceattributes: (CFXMLNodeRef) node into: (NSMutableDictionary *) dictionary; + +- (CFXMLTreeRef) getchanneltree: (CFXMLTreeRef) tree; + +- (CFXMLTreeRef) getnamedtree: (CFXMLTreeRef) currentTree name: (NSString *) name; + +- (void) normalizeRSSItem: (NSMutableDictionary *) rssItem; + +- (NSString *) getelementvalue: (CFXMLTreeRef) tree; + +@end diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcast.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcast.h new file mode 100644 index 000000000..209fe2061 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcast.h @@ -0,0 +1,27 @@ +// +// SUAppcast.h +// Sparkle +// +// Created by Andy Matuschak on 3/12/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import + +@class RSS, SUAppcastItem; +@interface SUAppcast : NSObject { + NSArray *items; + id delegate; +} + +- (void)fetchAppcastFromURL:(NSURL *)url; +- (void)setDelegate:delegate; + +- (SUAppcastItem *)newestItem; +- (NSArray *)items; + +@end + +@interface NSObject (SUAppcastDelegate) +- appcastDidFinishLoading:(SUAppcast *)appcast; +@end \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h new file mode 100644 index 000000000..c0202e3d9 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h @@ -0,0 +1,57 @@ +// +// SUAppcastItem.h +// Sparkle +// +// Created by Andy Matuschak on 3/12/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import + + +@interface SUAppcastItem : NSObject { + NSString *title; + NSDate *date; + NSString *description; + + NSURL *releaseNotesURL; + + NSString *DSASignature; + NSString *MD5Sum; + + NSURL *fileURL; + NSString *fileVersion; + NSString *versionString; +} + +// Initializes with data from a dictionary provided by the RSS class. +- initWithDictionary:(NSDictionary *)dict; + +- (NSString *)title; +- (void)setTitle:(NSString *)aTitle; + +- (NSDate *)date; +- (void)setDate:(NSDate *)aDate; + +- (NSString *)description; +- (void)setDescription:(NSString *)aDescription; + +- (NSURL *)releaseNotesURL; +- (void)setReleaseNotesURL:(NSURL *)aReleaseNotesURL; + +- (NSString *)DSASignature; +- (void)setDSASignature:(NSString *)aDSASignature; + +- (NSString *)MD5Sum; +- (void)setMD5Sum:(NSString *)aMd5Sum; + +- (NSURL *)fileURL; +- (void)setFileURL:(NSURL *)aFileURL; + +- (NSString *)fileVersion; +- (void)setFileVersion:(NSString *)aFileVersion; + +- (NSString *)versionString; +- (void)setVersionString:(NSString *)versionString; + +@end diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h new file mode 100644 index 000000000..fc0ac9fd0 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h @@ -0,0 +1,21 @@ +// +// SUAutomaticUpdateAlert.h +// Sparkle +// +// Created by Andy Matuschak on 3/18/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import + +@class SUAppcastItem; +@interface SUAutomaticUpdateAlert : NSWindowController { + SUAppcastItem *updateItem; +} + +- initWithAppcastItem:(SUAppcastItem *)item; + +- (IBAction)relaunchNow:sender; +- (IBAction)relaunchLater:sender; + +@end diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUConstants.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUConstants.h new file mode 100644 index 000000000..bfbe625bb --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUConstants.h @@ -0,0 +1,20 @@ +// +// SUConstants.h +// Sparkle +// +// Created by Andy Matuschak on 3/16/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +extern NSString *SUUpdaterWillRestartNotification; + +extern NSString *SUCheckAtStartupKey; +extern NSString *SUFeedURLKey; +extern NSString *SUShowReleaseNotesKey; +extern NSString *SUSkippedVersionKey; +extern NSString *SUScheduledCheckIntervalKey; +extern NSString *SULastCheckTimeKey; +extern NSString *SUExpectsDSASignatureKey; +extern NSString *SUPublicDSAKeyKey; +extern NSString *SUAutomaticallyUpdateKey; +extern NSString *SUAllowsAutomaticUpdatesKey; \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusChecker.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusChecker.h new file mode 100644 index 000000000..e83d15206 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusChecker.h @@ -0,0 +1,26 @@ +// +// SUStatusChecker.h +// Sparkle +// +// Created by Evan Schoenberg on 7/6/06. +// + +#import +#import + +@class SUStatusChecker; + +@protocol SUStatusCheckerDelegate +//versionString will be nil and isNewVersion will be NO if version checking fails. +- (void)statusChecker:(SUStatusChecker *)statusChecker foundVersion:(NSString *)versionString isNewVersion:(BOOL)isNewVersion; +@end + +@interface SUStatusChecker : SUUpdater { + id scDelegate; +} + +// Create a status checker which will notifiy delegate once the appcast version is determined. +// Notification occurs via the method defined in the SUStatusCheckerDelegate informal protocol. ++ (SUStatusChecker *)statusCheckerForDelegate:(id)delegate; + +@end diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusController.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusController.h new file mode 100644 index 000000000..19a3f89ec --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUStatusController.h @@ -0,0 +1,33 @@ +// +// SUStatusController.h +// Sparkle +// +// Created by Andy Matuschak on 3/14/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import + + +@interface SUStatusController : NSWindowController { + double progressValue, maxProgressValue; + NSString *title, *statusText, *buttonTitle; + IBOutlet NSButton *actionButton; +} + +// Pass 0 for the max progress value to get an indeterminate progress bar. +// Pass nil for the status text to not show it. +- (void)beginActionWithTitle:(NSString *)title maxProgressValue:(double)maxProgressValue statusText:(NSString *)statusText; + +// If isDefault is YES, the button's key equivalent will be \r. +- (void)setButtonTitle:(NSString *)buttonTitle target:target action:(SEL)action isDefault:(BOOL)isDefault; +- (void)setButtonEnabled:(BOOL)enabled; + +- (double)progressValue; +- (void)setProgressValue:(double)value; +- (double)maxProgressValue; +- (void)setMaxProgressValue:(double)value; + +- (void)setStatusText:(NSString *)statusText; + +@end diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUnarchiver.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUnarchiver.h new file mode 100644 index 000000000..da111c158 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUnarchiver.h @@ -0,0 +1,25 @@ +// +// SUUnarchiver.h +// Sparkle +// +// Created by Andy Matuschak on 3/16/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import + + +@interface SUUnarchiver : NSObject { + id delegate; +} + +- (void)unarchivePath:(NSString *)path; +- (void)setDelegate:delegate; + +@end + +@interface NSObject (SUUnarchiverDelegate) +- (void)unarchiver:(SUUnarchiver *)unarchiver extractedLength:(long)length; +- (void)unarchiverDidFinish:(SUUnarchiver *)unarchiver; +- (void)unarchiverDidFail:(SUUnarchiver *)unarchiver; +@end \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h new file mode 100644 index 000000000..69c281749 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h @@ -0,0 +1,40 @@ +// +// SUUpdateAlert.h +// Sparkle +// +// Created by Andy Matuschak on 3/12/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import + +typedef enum +{ + SUInstallUpdateChoice, + SURemindMeLaterChoice, + SUSkipThisVersionChoice +} SUUpdateAlertChoice; + +@class WebView, SUAppcastItem; +@interface SUUpdateAlert : NSWindowController { + SUAppcastItem *updateItem; + id delegate; + + IBOutlet WebView *releaseNotesView; + IBOutlet NSTextField *description; + NSProgressIndicator *releaseNotesSpinner; + BOOL webViewFinishedLoading; +} + +- initWithAppcastItem:(SUAppcastItem *)item; +- (void)setDelegate:delegate; + +- (IBAction)installUpdate:sender; +- (IBAction)skipThisVersion:sender; +- (IBAction)remindMeLater:sender; + +@end + +@interface NSObject (SUUpdateAlertDelegate) +- (void)updateAlert:(SUUpdateAlert *)updateAlert finishedWithChoice:(SUUpdateAlertChoice)updateChoice; +@end diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdater.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdater.h new file mode 100644 index 000000000..5f82914bc --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUpdater.h @@ -0,0 +1,55 @@ +// +// SUUpdater.h +// Sparkle +// +// Created by Andy Matuschak on 1/4/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import + +// Before you use Sparkle in your app, you must set SUFeedURL in Info.plist to the +// address of the appcast on your webserver. If you don't already have an +// appcast, please see the Sparkle documentation to learn about how to set one up. + +// .zip, .dmg, .tar, .tbz, .tgz archives are supported at this time. + +// By default, Sparkle offers to show the user the release notes of the build they'll be +// getting, which it assumes are in the description (or body) field of the relevant RSS item. +// Set SUShowReleaseNotes to in Info.plist to hide the button. + +@class SUAppcastItem, SUUpdateAlert, SUStatusController; +@interface SUUpdater : NSObject { + SUAppcastItem *updateItem; + + SUStatusController *statusController; + SUUpdateAlert *updateAlert; + + NSURLDownload *downloader; + NSString *downloadPath; + + NSTimer *checkTimer; + NSTimeInterval checkInterval; + + BOOL verbose; + BOOL updateInProgress; +} + +// This IBAction is meant for a main menu item. Hook up any menu item to this action, +// and Sparkle will check for updates and report back its findings verbosely. +- (IBAction)checkForUpdates:sender; + +// This method is similar to the above, but it's intended for updates initiated by +// the computer instead of by the user. It does not alert the user when he is up to date, +// and it remains silent about network errors in fetching the feed. This is what you +// want to call to update programmatically; only use checkForUpdates: with buttons and menu items. +- (void)checkForUpdatesInBackground; + +// This method allows you to schedule a check to run every time interval. You can +// pass 0 to this method to cancel a previously scheduled timer. You probably don't want +// to call this directly: if you set a SUScheduledCheckInterval key in Info.plist or +// the user defaults, Sparkle will set this up for you automatically on startup. You might +// just want to call this every time the user changes the setting in the preferences. +- (void)scheduleCheckWithInterval:(NSTimeInterval)interval; + +@end \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUtilities.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUtilities.h new file mode 100644 index 000000000..5af355083 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/SUUtilities.h @@ -0,0 +1,20 @@ +// +// SUUtilities.h +// Sparkle +// +// Created by Andy Matuschak on 3/12/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import + +id SUInfoValueForKey(NSString *key); +NSString *SUHostAppName(); +NSString *SUHostAppDisplayName(); +NSString *SUHostAppVersion(); +NSString *SUHostAppVersionString(); + +NSComparisonResult SUStandardVersionComparison(NSString * versionA, NSString * versionB); + +// If running make localizable-strings for genstrings, ignore the error on this line. +NSString *SULocalizedString(NSString *key, NSString *comment); diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/Sparkle.h b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/Sparkle.h new file mode 100644 index 000000000..13e9b2156 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Headers/Sparkle.h @@ -0,0 +1,22 @@ +// +// Sparkle.h +// Sparkle +// +// Created by Andy Matuschak on 3/16/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#import "SUUpdater.h" +#import "SUUtilities.h" +#import "SUConstants.h" +#import "SUAppcast.h" +#import "SUAppcastItem.h" +#import "SUUpdateAlert.h" +#import "SUAutomaticUpdateAlert.h" +#import "SUStatusController.h" +#import "SUUnarchiver.h" +#import "SUStatusChecker.h" + +#import "NSApplication+AppCopies.h" +#import "NSFileManager+Authentication.h" +#import "NSFileManager+Verification.h" \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/Info.plist b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/Info.plist new file mode 100644 index 000000000..c154cb61e --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + Sparkle + CFBundleIdentifier + org.andymatuschak.Sparkle + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Sparkle + CFBundlePackageType + FMWK + CFBundleSignature + ???? + CFBundleVersion + 1.1 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib new file mode 100644 index 000000000..ff40c9ddf --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib @@ -0,0 +1,12 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + CLASS = SUStatusController; + LANGUAGE = ObjC; + OUTLETS = {actionButton = id; }; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib new file mode 100644 index 000000000..99183444c --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib @@ -0,0 +1,16 @@ + + + + + IBDocumentLocation + 69 10 356 240 0 0 1280 832 + IBFramework Version + 443.0 + IBOpenObjects + + 5 + + IBSystem Version + 8H14 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000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D zyi>i?y)(U~-g0l)+vruj&E6L88gJBlop+!2A@3vJ$GlH?pY%TEeb4)`_muav_cJO> zzc@%7BW8=U#cFYh7#G)zcZ)m4z2eWr--+*vABZ1`AB(5N)8dyt=Ck_(zG=Q0z7k)V zZDgI)AjlbUC;&1h@_wVrU^6&QV_3!sT?0?k%xc`9vsQ+*N)Bex= zU--ZBpYwk!iBgV~Cry$Hq$yIdG)w7HO^2Dz!-oDJ5-`wo2Qi+oe0CJEb1! zQRzA91?iX4i_%NdE7GgdLFtfmR5~u5luk*fr8Cm!(pl*%>74Yf46IOeIUn zR&temWwKJJ6e&}c>B>x{R4G>~lsU>= + + + + IBDocumentLocation + 188 142 356 240 0 0 1280 1002 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..15daf3081231de924d80ee94c9ede541ca4f31ec GIT binary patch literal 6589 zcmai233wD$wm!G2_qD34SVim!0TDvzbP@=QNEQNNX+k;)TS90$MN-h|Zo4~>5CT^O z#uX5GipXOyVN*d|9*zq#j&DTVmCX$mm2qYq7seSkTzKbJbpj83^U_~xxpnV7=lthC z=bn2P#3O1ld47S;sp+vY*U7{prW#T2N#-f#(saSkgW^BPCC7epu z3GP5}iqfjo7p6OUfUMpACRo5)TUL~;9%PzV!XI@Cf8 znqdX31PV96D!36=!y32~Hp4xz1-3y4?1B5?0eBGh!{hJ_9DFACy_}X(iiS0SCD>W02xZM$aQ2qDIpWcBr=suCqXh3 zzs@4F$vmQvh2(mYAWKLqX(ubl4P-63ovb5wk-N!eau3-?{)-$SPmrg{pU4sNB6*p- zLS7}WkvGXva)NwBJ|SO`bDWVgac0iKSvebLCjrjExj7Fvh#Sp~;l^^;a^tw`x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CU;x2Vha!+wry63s)yH$7Gy~=&7dyBi% z{eb&9_c8Yg_gn6F-0!)+cb{|r#>Iq~5?jSKv0dCO-X}gF z?iCM+Pl*S`=f$Jqaq*=1w)n1iO8h`PE&feBE1vh5J^ejbd$K(fJr$mqr^VCm+2Fa` zv)!}XbI9|8=UvY!&j+5iNv`x#vsIcb=alqtsjKEA^B5OI|5M%9I94 zgQX!-mXt4*N|U6?(o`uRl}i;;rBp4=l0s5KN=Zwk7HOHZTv{PfX_d5ES|{Br?UD9N zf0SO6-j+U+K9 + + + + IBDocumentLocation + 425 40 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..17f2f3de0f2f6d8823af59f5861b0a0483fdea4b GIT binary patch literal 10881 zcmai4349aP)<5^&q)pPaohE70q)js!RuM{D3KS5eWf2ex(y}ilZPPZ8CN)XfYW0GM zJfEVXqPRj?UBLx6a6=y=0%8Rb6vY)0aY3IOD&M&?X{o^XeVt#DnYsJ9|8vg&oZE`} zU?3XH%{>4FC@|209ugoCOjA1gB9*m)x&FxHj`$S~ghOQ=W8wPA9m5r~{gtt3xs+N` zdZmAXzp5x+(E?=Y>UY5a#u+1vbF^wzzL<}b&1r-|5||+mdP5($3d;%xn8#oC+ zz-jmueuFb`7RT63bVN@~B#S7dGsz+OWDqGPSCY}>Dl(o-#Jj2ZDJK;q0ymNx7ejq=QpUJP}PpYGOnoLt@DwSwD&7nPMF3qC_ zbTGYwj-X@dI68q&r!%OZR?`|fpI$>bT|}>^OXv;s-}F{`C%uc_L+_&x()Dx$-9n$F zTj>k*Mfwu`58X-k(Rb*6`Yvsu@6q?^A^H(LO24AV>DTlG{ht0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q`TvuR^r++ z4Kx$7fdssGls!Foa7Qh{wX6n*p6MD`oo79R(?E7lb76b*W?ja=jspxe+Q2y=XCB{K z$&L@f{a^@7k~^>(k_I~-WNko)S#4cr2h~7uFF(PO^lLA0e4-Zn!r&t28?AS~nv34> z4ss0BFS?s~t=F*-F`CwO9b^2B%-$Dw+|AO%i_Q%-BSzH_xeKqqEHmG%`0|PHBQpLi z$AK+h@d+YfVIReR@_^$byK{7v=*>-=A|3lHn^V4phU)#N^^O5%2= z*eH1uJ|D?Xi9+*9U8Ruif}^(8^RcW%)#W-1UZ66CXUL_j(7+&bIV61i@2#eqamvsR9|kL81K4*nHYv@4d#&@jSW`t})NZ^qk5!FV9p=uWk7 z^p}zx&T#Ia)qHCna<;f0OPI4};(*A|cu%oNkt^yyb9AYJB2RC&*1Da-e(#pGPUKb8 ziEy^}6=XxS44akQK36-vsk5%rN+B1S$C=c8x-VJUoDb(Y?>mQ=4AqU3cOQQ3O2{ zV?PPs|i^ZCfGw5IAVRRZS`n>BxxXX-EC???{skLrwYbzOqF(a5J5 znBHjMOM8&CsONm)aBm9h|t*b zd(U{e75dT!oP%}A*4-V|q{F!nWf4aO+zcOdds~}%kF5Gg5*APJTR(fZ@6&hHO7~Y0 z!j5L7_I}pbzH4VbaUuw!hp~oRpCFsl#Ano;l@vs;5Kk*UqZhIA@?HKY_4n^Yce1Yi_{cL!yXbiDd2bQ^Oz12XwIIo9#F4J{zu1F! OV?8R6O)=CKO#T79qO$h@ literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..3e65b1ff5 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/classes.nib @@ -0,0 +1,12 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = {relaunchLater = id; relaunchNow = id; }; + CLASS = SUAutomaticUpdateAlert; + LANGUAGE = ObjC; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/info.nib new file mode 100644 index 000000000..082030262 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/info.nib @@ -0,0 +1,12 @@ + + + + + IBDocumentLocation + 136 94 356 240 0 0 1024 746 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..ac43a0cee6b83ce628cce69b73b65d5f32350823 GIT binary patch literal 6559 zcmai2349afwm;uDStk2TX4nyP%OXoD=>}z$F0>SAC{0@m6iS*5G>|4SNn1)Oej;$) z5JjFB6&0zVsEA%4UKiXIQBkqtj*9zp_xW6|xNy(Rq=g5*`;uQW+d1EN&j0++`OY_u z@kltC@_LT~0SX)#zz8NVgLT2MKqA-_ZdDR>!|*Q|jzz17rDE~AVX?*)N-&jd5L`b0 zY^7ZZ6{ZE!S1xE=Pu9dIY?gZtqTcobfM!*CQ{gE!$r_y|6R&*4k> z4*nZ{fPcboDEmA7L5##s97HAq$UxXb29d#JC>cXC$@yeDDIqh+OfrYeC4Mp=pVpBD zWC>BoGI9Y)kXF)8I>}mc5!pyKkt@lyOKLRv(N;eA>{ zXV6kw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t#e)O+Tyyy^|0#^*JG|HTu-@XPn}9+IAto|X + + + + IBDocumentLocation + 425 40 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..208496318c55d5790c7e715b344ad9e55b78548f GIT binary patch literal 10744 zcmai434Bw<);}|oG)t5AHfgi8X_L#Mh%9Z{sUR(D14k(LH zal;J+g|Z6>D!4pU5I0m%*&c%8%2QEs!CgeYGxw$if$#g8-%akFJIk3f|8vg&%(T2F z7>LHQvkwCS3Ji3hhXgQyc|se1q+(j2PKk_fgJ01=I8@Rm7OolJCR{#Usfb0(q~xOF zp-R0{nIErc1F~S{0WgATa$!Lyty-l&=I3N<3Sp247RZ5a&>gOWK9COsVGLA2Ei}Mw zFdr7cLRbX1!@uATSPGBAW3Up|zy^2%w!$`e5_Z4~@G86p2jLKW03X7~a0N8BNCG-9)^~NI8kXLJ}o0SVU?` z9hn6S$ZS$i=8y(*6KN#3l1Is7WF=Wen#gLhhO8y)$a=B?9w3jCO=L6K0%5Y1JWZY< z|0X-hOXL;uHrYo$CZCX#6`<`ScEYH@%-eKp&=$&`0T7x{hw6PtqOq zdHQeqB7Kd%PT!&L()Z{AdXOHX|Di|ehx7#ff__QAqNnKh^auJQ{fYig|6ss$%m`bV ziJ6&=e#z`CRlH~EOvchytTk)Lu3^2|b!<4B!~$$On?cTy=U9-`nF-dzL6fyyWXIXbDRxX3?KQST=g700WIHEfp1y4dB2* zWn3Us8J-m#+onQ{Cpy%`KuZ!&>QGuMe2ULN8_ao${1*v0D1s8s3P)yOn?d1FY`8z< zuT~-xus>yX3@eT;DjppU$M_+Bo`1$a=ZE>Ha|z)mdBR*mxse~?2j&v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{dPlJ_MaOa3(Z_vAm5|4RN_0*OjGDM2!#;aQ|4sjYOi zbd7Ya)KTgzsl98U<<^wjQtnH+Kjp!c zhf|iOG^K1z*_E;{>+!NJz|g9>+Or|OYM)? zSJ+qDx7eSt@3!x;zimHgKWRU0|237QCZ&2(+ooox_DUU=IwrL=HI_O*bz$o5sduC< zPJKLebLtbR+ftuQ-JbeP>T{_F(h|~)Y34LbT2h*nW=l&=>yvhUT2WeAnm?@~O-ZXx zTb{NpZBN?1wBu=CrTyZd4vWL>Xzl3i80Z-6D0B>U40nuhjB*q^#yBQAN*z-iQymSC zg^qh1OC66oRysC1UU0nR*zMTkc-8T`W3S^a$3Dk9j`tj=9p5{Cbo}J_+3~C6cc;zS z#o5i-!`aK3=j`LW-dW|G<-Eyxvy(e-b*^+aIoCMXIoCTkIyX6Ab^hTz>pbT??;yYb+>!|BH*Ke-B-7dG+eVx0nyPvzjJ-|K4JEqH%)2F0QO;^%C zN&hkZr}SUaf6pKp){Nwgl#KL@)*0{NC&kWC1mj`9|J$9TtiCwR-f)!rKKV(;DFd%a7%4|pH)F7-a*UEzJqyUM%T zyVkqjyV1MJyWRV?cfa>t?*Z>2?-B1&?=kNO-V@%By`OqN_kQbRKE2Q2Gx-vIR$sC& z#b@`W`J6ttFT>Z)m+QOEH^?{Mr}!d1?t9F)!MD-3$+z9N!}qLjx9_a)obS9$WG3rn zgKUx$WviSlr^t3WO?Jv|IYZ8ry|OH~mfOl#%h$-)${pp-a*o_Z?k4w@>*WTyQNBf< zE8i;5mlw*n%Xi3&<-6s3 literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings new file mode 100644 index 0000000000000000000000000000000000000000..232852ca0d7b3cd1a44dedab849fafb45eebe247 GIT binary patch literal 6978 zcmeI1%Z?jG6o$*&NIXF{oe_`_MH2!`gu*Cf5h5i~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.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..b619eb4ab4539674743cea9361ae86faa9c1ca4f GIT binary patch literal 6380 zcmai233wD$wmzq-_qDnzECH1Uf*^#D6~ZEBBajf9Kxc(O=yX>|OQ$>ZLWnWr1qBh@ zb=((B08w<1LC0-ea79GKh~fgGqkb;qQ=f{s0q;~*C+3N7Uf1_^ZTH@D&VT>^+;gj` zEfkE!GcykX0tYlVFsKJg)j@|!xD%<0{#M* z0E0EK7A}R$U>)25x4^A%8{7$-VH?~F+u=TV5FUmn;h*pd?1Nr-6W)do;UoALd5W^K70)i;2U@p zkKw=ZM-DlTzU?>>xD2{}~ zG@p^EHlxKMUo0lawAPC}-ub~mjAl8u*yHv1T4nWmiN~94ro1_GNTrW9K!Y|wpKZb8 ztqGFhkX#!K2O{mUnl!&+PZ>~igJ`DQsiw4EbeD`kGdAQ8{ts}lG)f+}N1`jJPiZ6^ zpXUqvmdnw48c$vwr-n5i@4`qV&cf_!b`k4j5!S)3WfwC8yN;Py8w;^(n4W}pYZQdCqT+}@;_Hu~7iN+J7eE0`K~hSw&CICTD1zc1D25W4 zPWaAC#C-&)SB_VEy!5a2ECtWKFdODT8I;3ZsDOFQ%to+Wc0Q|MHEap%VrU=$OXOHQ7^WB_VFHk_uk^)RYCYZxUy~ea6wV@0gH1&=jluBp zeh$@WnSweb-%yO+NFwT&8OP3M!v&6=#m-@tcVQ_s!ZPqd6B+kI0Ay&UqXmL+A*_H9 zv_ep2uQGEBR7?KtG#VS=-6exc8(lh(aJ}I4@**WR%DLGx~?#{`%>F&w7U0v_Mdbk`mz!k8O zK-vUX!c}x!4cE~BwQwC=Pjlh*`$*Mvj(3D)0+1*Xm&0)d_`-0Iv?9moZDA<5Jgg{+ zrbnGBB5?n8wg7C9iKWsy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&!jJ;@1*ag l + + + + IBDocumentLocation + 425 40 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..81c59b757587358bbabd4343563376b80d4c474a GIT binary patch literal 10691 zcmaia34BvU*Z!HAq;1lqy-nI|O_Li$LB&!^feNy;AdAqlq?EGOw7qQuX;PCEs1+Pg z5f}6oR9ulA1w=(r5fuSZ5qWvpL}YWt9k*AJ50&rCy=g(<|NVP^N$xUt=FFMrob#MB zt!fMfWAVJa{Xl>M10Cog36jA$wtXO4T_2pPL@V0kS1cF_m$i>a8Y|jIswOMd@mQsl zUg{sJG%GbliG~&+a~AJ`6fjI2Qk<(bs|mydoIIC7^pFZB=mOoKJ6s37p$M*r(NGOd z&;qx^9WV#(gt>4R+zt1@qp%2`g2k{Lo`!Ys96S#%zy^37-iGb47xuwnI0DDv8~7H! zgP-6RI0b*e88}NAJV$gyPmIJ(+L0?rF3Bf-NHG~ohLMqE6e-8EarmhuRU`^`k{F4@ zT+&3Ql4&r9Oef9cX3|1#Av4HrWD$9aEGA3HQnHLJCo9NGvWh$n50TYm4OvT`g$Q|$ zyhvUquaQmUO|p&bBp;CDhs7JxD*Ihv*S{lzv7(r{B{b=t=q`{f+)kPtnu#Z+ey` zF(XTZ=U6(En1lYnoXjPjGnsY3yB*n;ESGg={a7*cvjF*pMOY)diA7nA#aR=ZN?v8t z*mTyyX0j*Q>+B8oCXKVr>@Bv1ZDrfo+iW{~hrP?*V>{UUY$yAG?PC9CyWs@;58K1` zvVCknJIFp}M@P30H-$pSB@37#4bnk^46uL|G9e3WUL57xvG%(3yM{?b5$qMlDI^(UH%Cl_}q-qAXkpmoqXwp8jb z58}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bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..3e65b1ff5 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/classes.nib @@ -0,0 +1,12 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = {relaunchLater = id; relaunchNow = id; }; + CLASS = SUAutomaticUpdateAlert; + LANGUAGE = ObjC; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/info.nib new file mode 100644 index 000000000..5a7568096 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/info.nib @@ -0,0 +1,12 @@ + + + + + IBDocumentLocation + 188 142 356 240 0 0 1280 1002 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..d371ff21d9e947292a6e7105b8e82eb4eeef951e GIT binary patch literal 6438 zcmai233wD$wmzq-m+HN`ssTZT76Pb*kQKrrl7)nX&;&XO2?Ro?yC5x{?$Ap@j2SPe zh~S1hqbMeT3*(?q=hJcD1w}_QxQwFUs82-&mqA4bd8ev6F;9H+y1uWg>fU?qJ?B6F zIrrRZZi|Ey$?WX?fWQF{1~7sN%wTQE2*iUe;dUinpFw|#a4cGrk&Ly~XT+K>P=d)s z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tvsc>}+H33$_9gbE_9lDC z{vUI!Yl5r9RpY92)w>qE8eN^PE?2kfVi$9*b6x7%>gsdt zcfI9$$Mvr3fa?R-A=j6#Bd(uCI|ZPq1>S72L0l!K#7o4@;_c!t@h{@D;y&>m@m=wN z_f}Qb02bl?mi-+BuH-QG-;AlD9x4TN%N%zl3%Ko7D)}#5^1T_B(+Gb zQoD48v`M;3x<=Y8T`%1z-7Ia9Zk4u5JEe!Eze + + + + IBDocumentLocation + 425 40 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..d51f9ad2ebf9b29b4a30b33089cf12a4b7c07851 GIT binary patch literal 10841 zcmai42Ygf2_doaEv}w|$eNEDgrfFURh%!nkW&c20uz)}rZP`#m``QN5q$Vk=q8A5F zL=iVCP=+i;#0~xg_d;cesE7+uL=X@a7yonLOG^d*|9{^n$$R(Raqc12@3} zxEXGNTj4gi9qxdK;4xSR%V8C)g(qPXJO!KKS=a`z!yB+0_Q2EgCGU}g^>QHIS2RCY#0P zvUzMNdx>pj+t|zOzw8yZo$X++ve($_><#uNdyBoz-eK>;VfG$-pY3EHun*ZsY!}ms2u(DE##e&mJ;^UN=a#=n|O2KlwyoF!DMZM=C!4g(y>8Y zIHZgVhN~j8Vq@D@iuJ^V8X2ff;z?af8--7a9cYU=&ZEB-fyGgza8@Kb1IH9c!toJ- zaG*wsPQdw;*>UVRwxo1SBogO)=M%!e<%jsk{G0iN@$Y!@e4^tid>`LEpHQB}L7L9# zF64SXbb|uiyt-jQ7T0k$rL?@f9yM4g3@Oq0F6arppf~gxukA*OP1J6}*nI``fxc65 zd_ycAsnd2czIjU(k~FkvV5BkRZ6pp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hm7`8BqT1f zcUs1_hi*%QKG+L?*oCKZevY?UoLX?5>&-%(f*%*JG*evb4Y(n%M^@qso@%lBJiKV2 z-(Z9{f2bYMY^-%7aSLk}vL(!P5MzavV1cRrU=U&+j)&#z%?`_8e%P)KkA0%?XE6gC zuF@wl*R#xYSYfHt?EA0d{V+7+6h;>zD>7Bu$=~QRkuL41%WTd}*faB|85@sc73|Cm z`v|gQQDg!)`)z*bEO;I=I6JNam*ez@#=KA093(|<_?O*5mlIC)opZ`aTvw$d&C7me zn{7*eruZi}uoL(#r8lRWtKkpxf|;s`B`dHkn&T^7h?4cmffsR#5$%Uf4s;IL ziI303EhXc^?rjhoI1;u6`X*z;TWo*` z3p(ST>H9*fs$evt%dC-W5~8%oz#7Z3Q0!f46`t0PJZE-fK}tLwhUhOlAB5g_BW!G3 z-+?qWV8(kb9vN;>b4_S=g}ZZZ*fsXU$W&BgCC501XANny&%hFB(x9*ld?pu;(ttDb)8=3iI@vK8e8Fvf@u!%Ks`KZL^B&k4bQ0z9(am++m=$qRQna zTzLB^W^~28V-JK}N3k0Ah6(arw7;zOROfR4rj9Jqej6Fi-Zt#5c6b_oI#6tuI=G28 zNc(n5B}f#nl-uU54nfx*T_`&n!b#-mvR{9<^FzsgEo}4MFGp=t!+kMiJG-~nSn4i) z^2&ayx})gxY;*iwlE09Bd_QqzR5EeSZB!7{Cd1IVzbfLH&ar*n)yjRYAHv5=zo~e8 zd&Teav)nn_?&FM z%)aay{n+>J?w#+~wma155`Yvu_zQN?ZI0rr5 zqs)3xYq&$@DzRk$yUqloW{p)#H?(s{sHtZ^9`jOXEgK&Dz2xaDAG{R$YxOZ + + + + IBDocumentLocation + 188 142 356 240 0 0 1280 1002 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomatic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 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..aeec008765ab49756bc2a8d825d4f4f48561060a GIT binary patch literal 10689 zcmai430#y_*T2gQ%nA=P!)y#Q&*Pp8vAL2KXr_f|f;)%um)?f0ef&K+zn^oY&--P;2Uruz7dbb3>jF;dRyc93P%kc`l60bs!;5GO;ycR!? z!gw8i8NY&G!&~qh_#ON{-i<%SC-6!9CH@+Jhkw97;h*uZ_)nrCT4E+iB$)^#m1K}B zNhZl6x#Svh9T`DJlQCo*DJ5k@Ce@^d%qF)GM&^*)$sOcQ@-OlLd6+yx9w$$cXUKB0 zf~+Sml8t0Dd5yeI-X%N8Uh)CiM?NI2+xB7 z6OGUYI-5R5U!kwkO>{GTjc%b^>Fe|j`X+sgzD>8$chFaKJAIe#p#P>j>3eh+eV^_o zF}jEDr61D$^w792p@v}aQ^A7FCG3v z4TnMi*>FS!?a-h<8kM7J>&ZpMqXSh@0CIFnQE`#KPFAkVii+dS_?t_I*=i>vaVt^;{J7p@h7u>~HpibtvNd6824v&C@v%--X z&}Vo!6dUCa`D^6JBp6Sg9fOABi;BmF!!h;|`PeQtd~p0G>n!Nj~iDH&MW5!p}Yy;cM-eB9=`|Jaje+Z376VOC72~7qGrl3qzhNhx&G!6Mt1t@fw9E}A+ z{uo#Y6biN&3VqA0AOnOkzK9IX$Bs^kb5rnsSA zj?4_mvp^I@i!j%1aYcCkXhhHjp$}*T-;E>CyBDV7-G+{M^$a#g05MCn$fN3HpI{zG?$rK z5=&+ROJNq42#%3oUmujkF~f$7_5Nr~t_b@hRbmVTC>OGdc_sJAH^C#{M%&Ok zirYxwHaeEcI+Y8KrlzdSe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ogPk~nf_q&Ax|ykNO_>J?UHI zd&ale*Wz2|Tj5*fTjN{n+vwZv+w0rsYxV8-9rS(dJK{U)JMKH-``mZZcgA;4)QR22 zf#PtnM4T$tiZ_W7F(x*Pw~9=>Tih=05O<2Z#NFavai7>K?iUY=AB#uCqvCP#g!s95 zQv6E%TKq=*PCO(2Af6R}7Jm_c6aNtZ6#tSEr2=V~G+Y`XT`v_%Mba2)tW+Y6mnKS+ zrBZ3CG)=0Is-$YER+=sarI1uFMWmQCQ<^Q^EZrjADluuUbcZxgnlIfW-7DQMEsz#U z4@-|qk4sNVi==0y#Zrs3Oj;qWlGaFTrH#@n(kAI`X`8fN+9U0i_DP4OKLqM$ O{zH$bf7^ab-~SJC{z0n% literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings new file mode 100644 index 0000000000000000000000000000000000000000..92064db7fc6d197903e946d8deb2042e4803dc35 GIT binary patch literal 6938 zcmds+TW=dh6vyYepJIuqS}Ig-j|dgF1gRj>iU<(AZQ@IoI(D>P*Dary&(Nm|`2WuF zWM*xXq)jJW6xo}Z**SAA|2a4R@n`rb+zVAW2y=ZO>-$uHqc97d#%H0`%=6HMq2`8~ zISMcJ&H6;MGyONxJNGqrPn2$jy>MHjkHa*K!!ym!^{jexdm4YC4{v@F-tWErT<_29 z{ZD%7kZ1Q_UiOtvQ}6tupKHSJJ^qYeUmc zCn>71)ZUSv=;(!Mv(p}Qi#|BfX}4Nig!eT5N&A+f3H_J$f2C0)J+jBCa?VsIEk*ZO zJVSpjZXQUVeZ9J5=#l?c+R=(Kl=^Ztnu7;ycqm#f)$Q=vdgrfN@4|2TxGYOOCz?y# zv(5?7;e?rSQ{G~YcmT6VhF-wzbZvnXjh$ckg4aqohQo#Aca+tdsWn2MNBSN~2N!FR z6QMNJu1Fs{cQ$hR=U6u+U$`u6u)(xJ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le.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..3e65b1ff5 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib @@ -0,0 +1,12 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = {relaunchLater = id; relaunchNow = id; }; + CLASS = SUAutomaticUpdateAlert; + LANGUAGE = ObjC; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib new file mode 100644 index 000000000..2f65f2f49 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib @@ -0,0 +1,16 @@ + + + + + IBDocumentLocation + 188 142 356 240 0 0 1280 1002 + IBFramework Version + 443.0 + IBOpenObjects + + 5 + + IBSystem Version + 8H14 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..c4201cf26aa4490d0092bd8c36f61259550aa224 GIT binary patch literal 6571 zcmai233wD$wm!G2m#SWCV+UzNM3fk^6Lzu?2nkJ~lMq56bh<0h&~%4h2m!$>0wN&e zfGenA!sc_3LBtscMMUJG&bY9MxD4a+d=HoT9LM1yZgZ-t6Z62C*Y$l}+r9Uk^WXnJ z_tb4_35Vi|tgJIYfB_avUG&59MI+VeiD*k*dbDYQ8c4(& z1-I8%p|+{PqEt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^CPrDDhPrE;Hf9n1p z_h;@eP=a>BiBc3$ii&WH&?E$fW?{atKnM#Fp+#6B+$L-k9uc++j|m;ZF5zwAGvRyD zA}V5%R% z`N{$%tVEO+C8i{lCCXA|nR2VLQlZK!Wwo+aS*NU5HY%Hx2b2eutxAWoQ`xQTSAMHJ Zr5sj{Vqu9tM%(ey&U1`&=fCpCKLLTjt6~5E literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..0071ac077 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib @@ -0,0 +1,21 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + {CLASS = NSObject; LANGUAGE = ObjC; }, + { + ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; + CLASS = SUUpdateAlert; + LANGUAGE = ObjC; + OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; + SUPERCLASS = NSWindowController; + }, + { + ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; + CLASS = SUUpdateAlertController; + LANGUAGE = ObjC; + OUTLETS = {releaseNotesView = id; }; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib new file mode 100644 index 000000000..2b25ad033 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib @@ -0,0 +1,16 @@ + + + + + IBDocumentLocation + 425 40 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..be3dbd9069137fd7dfa8bbde36f0a264de1c690c GIT binary patch literal 10634 zcmaia2Ygdy_y2jGCux&3X>XG@t8H>GLu8dMW(93QhCmrDd(^bOZ6j$?laygaA5akW z#f6ACp@4vjfQk!TxNsm_M8$=QxJ6zUqQCRpn-&EA@4xqxY=bZ03=X;*ps>V<- z7SGGu4+JPMFn|$~AQ>!^Is~HC^}(5HbYchmiUlL#iVpEep$c&t)ND=Qza z&QWVh5)JJ@7OvO>CNNJMR+_6fs|mydoNP=d3{t=f`Op)3!9~y?O5jo$2i4F7&2T*| zfQ4`aEP@;1Cb$`v!vpXjtbo<94jzMzun9K97T5-_!fUV>_Q8kn5qtv2;2ZcBeuCrh z8~hF@;UAo1BQX#ov5;)ij$A-;NdXx^O383Cf{YAVM~hC&*Le zIkJ_!KwcqllXu7`0tRK6Gjbu|;kX^xMun;-U8d#V`SR=cVJj0@_iOpuq z*i-Cj_6&QLJ;%1PZ8XlFXD_f9*-P*hdzo!#udr9yYwUIQ2HU~jWN)#z**k0}dzbBD z``N*99l}ka&?k}|Y>*0RAVE6V!2ubN2~Kc<8$95JEXal&@PQv>P@o;OhYrvYE`UyO zA#{c=&=tBtcgTevkf*_Lln%-9fl!l*!1R=rmsD4)u~@Jw7z)Pc42*=s2-!$f2kpR6 zAQn?&dh5w$<)eZ%F$8jKN?CbXph4BnrlAEwU|!~sEdJ~B(Ain^j>(CSb;v7>n!=t5O8o5C7czB&cHr{BjNbSKsZpR zMknET>g+f+9A8#GHWG>Ref%H(IX}Yp^UvlH!oT22^9bc8et_?pM}QkSNLO&W7nNQB zg;0cR*VZef;s(y9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kQi(`%BamQB2YmPS@yB!A|#~jBUCo_^V92rVRmyDhn12V>BOwI^o z%*nVZ<3Aa|9mO?6eeu6AAH;;#9w>s$+5 zH@H@~4!91w4!J&b9d>=<`pk92b=-Br-PzsCJ=9&{p6(90XS!#*uX11QzQ)bn^WE3G z7r1Y5-{`)>z0|$Tz1-d6UgKWtUhjU%{ib`j`y2Pqo>Y(Iv3oK+PLJEu+0)h2-P6M} z$TQe8)N`3XU)u-m-Rr_6It7`Ue4N|bvWyXte>)uXPwCU zHS1KiFZ;smF4^6(bF=fZ3$lx{du5N!o|N5?eO30{>}#{&n&WAaF`7(X&d>wtAd|iCqe7U~izLCCBzA?UX-#Fg{U!!lnZ;5ZIZ<%ko z?_S?p-zMKq-!9)C-#*^~-$CCY--o`#zE6Cg`HuL$^d0pb^L^_(;rqi+{eHjVZ}0Eu z@8s|7@9OXF@8Qq)7y5hpd;9zPi~armgZ#XpM0v-o2l=)bMs%2WRb8qh0> literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings new file mode 100644 index 0000000000000000000000000000000000000000..6bf42f79b03ffd17af6b43ea71a0ba4eda2c5f7e GIT binary patch literal 6908 zcmeHM+iuf95S{0Kg&Tni6$-aUgdi$?sE`V(gis&d*hwwYIEs^o{5){ZOqN|YQR;?l zf&{7@d+)PnX3xw{fBcl^ax96QONrkuesA!X%TOjLk7SIRTPY+%U51(~nd6u3ebf%| zm7`A^b;p?LKw9z`r57@go_s@XiFZ<~YoYuW4|~3pM=N{3s@1pT4Q4)wAnALRjlb8D zN`?28?r4ZF?ydp~DfTizEq9-yj_(;-S!?|hAdsUiQ*0)R

9bv=gE4isb}jh%C|I ziZ=HcZIv9N{1xM-n3MC*^*ceS0E!%AvvQpQR+?hoE@bBXC8T)=H0!9^&WPjgclUa+ z>b7?n-wF!of~Q~#jS_2~g26(o*Qy8VbB2d|OK>u1{S~xSqA%^^77uMBg(cBy+V^NC z&WgK2%B*kIz7u)!+lqO%h?H6WQ)P=L)}ET-SvIA_#d@qsKv3|4m4mqy3C+1UTEsI4g-GO z_PqPuJvFq7SvT47y18QQlKzn1kr5*JS$^D+OFLO=&k5Oold;(9iyJT885}w!Y<|dJJ9E8mjojrJ^JD{{@9)XR0hVFtYYU^)x_2Y9|Jht|c6oyH%Nsc3OYd#!wXs%aRNK`E z+QqpcLPXl`qW<>H_Ao@(&pkN9t3}?A+z@ zbuu>}5l7-PU~G0_*(;aNx=>5@c_nYt%}4A);wE-cmw4TXI1-=3mOXw}inG!u`53HZ zr8q0mKI-{R;_59aWbGz><4F0X7TKP{r`X*ilx|(0*it!LWd7G%h?l6|9!Hw>c{j^U zTZV{n=w_Z~Ih*71*~}=>r*o&wJ{2gt9F%3B!c}=A8N&Zt2A(&*o@$i&9~Yyo&Q>Lw wY3JC`WBiMIk7Grbu#76OVONf|8viqLq%oq!gYN$!?j9SS@JsOT{k + + + + IBDocumentLocation + 188 142 356 240 0 0 1280 1002 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..b619eb4ab4539674743cea9361ae86faa9c1ca4f GIT binary patch literal 6380 zcmai233wD$wmzq-_qDnzECH1Uf*^#D6~ZEBBajf9Kxc(O=yX>|OQ$>ZLWnWr1qBh@ zb=((B08w<1LC0-ea79GKh~fgGqkb;qQ=f{s0q;~*C+3N7Uf1_^ZTH@D&VT>^+;gj` zEfkE!GcykX0tYlVFsKJg)j@|!xD%<0{#M* z0E0EK7A}R$U>)25x4^A%8{7$-VH?~F+u=TV5FUmn;h*pd?1Nr-6W)do;UoALd5W^K70)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!x6)$ zhA#~#jRvFLm}(qloM@bCEH;)KYm5eoyMn)?;DRAj~PEQer){I_?by( zGMG#zi^*!To1CWeOy#DfrVCAR(^}JIruC)`rj4d6O;?+4Fx_Ih)pWmUm+3Ln9@9&v zy{3Jp*GwOozBGMf`q6APOXd;gbn`Ux4D(ELfw{Q) z>nxXBHdr=VuC#2mykyyH*=N~rIbb9u@p`P}lQ7*nYq_<; z>akW@Tdfi6N^8s-x3*h5tew^yt*=<$w|;FsX%lU3TefYEt=v{&^VlkF3vE@ldfQ^# z5?iA!V7uG4-S)8UAGXJAdu;n`uiHMgeQi5o*V*m%q4tsX@%HoWGwlWTGJBv+TQq2mk3w@#BY)j8aGwsVAYq;saTz**!han5qi zc9uDtoHsjfb>8m0(|Nb^9%qkptMl*9hn;(zz0O0ZxN2ODu4dO?TvxcZxpul9cD?L6;5zL3z;)bpN_2^mI7l2Kri#PG zv&9kONO80{M$8a%#2Mmzae?R+tHoNeUR*3L5gSFH=odp`mw1V|M!Zy9CtfaIA#M_{ z60Z?&5$_Xsh!2W8#a-fV@e%P+@p17<@kOy$JR*J}{wi^jQyMCzO2efzX^b>h%9N_5 zTB%-IEG>~5C7kEKtg&!jJ;@1*ag l + + + + IBDocumentLocation + 425 40 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..236c082b7b7ab556173032f83295d118589b9af1 GIT binary patch literal 10634 zcmaia34Bw<_Wzlgq)pPKy-k|6ZE`P*$X2?sR?rp%Do~b|eW{_nZ6hJ6Ny=hH2NXo# z!v#dd6$%Kb2rjsR8*aEDyNHUrBJLv34SD{~+?y5z{_o%WNpkPpSOA??ToB##u50i=u!B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&p*sR!aveK+F$7(>mToL^e^x) z^Dpxttz|=r>AQ-3#sDb)GC@>>1GY}12 z8Hfj(0@nnV2UY}D2JQ~r8@NBPI8P?(pM=_`YRVJrOH6%Qe}uzt_)K~C?l28N~JPZ8Lv!KCM#2wY9*-DD5_Gg zgp?V|OeLyZsl=5gv7K)|0pKU;*Y(r|F(WBPyQe7 CH7pna literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings new file mode 100644 index 0000000000000000000000000000000000000000..08538d327d37fcaf8b4876aa849da42eaf407b6e GIT binary patch literal 6910 zcmeHM+iuf95S{0Kg&Tni6$-aUgdi$?sE`V(gis&d*hwwYIEs^o{5){ZOqN|YQR;?l zf&{7@d+)PnX3xw{fBcl^ax96QONrkuesA!X%TOjLk7SIRTPY+%U51(~nd6u3ebf%| zm7`A^b;p?LKw9z`r57@go_s@XiFZ<~YoYuW4|~3pM=N{3s@1pT4Q4)wAnALRjlb8D zN`?28?r4ZF?ydp~DfTizEq9-yj_(;-S!?|hAdsUiQ*0)R

9bv=gE4isb}jh%C|I ziZ=HcZIv9N{1xM-n3MC*^*ceS0E!%AvvQpQR+?hoE@bBXC8T)=H0!9^&WPjgclUa+ z>b7?n-wF!of~Q~#jS_2~g26(o*Qy8VbB2d|OK>u1{S~xSqA%^^77uMBg(cBy+V^NC z&WgK2%B*kIz7u)!+lqO%h?H6WQ)P=L)}ET-SvIA_#d@qsKv3|4m4mqy3C+1UTEsI4g-GO z_PqPuJvFq7SvT47y18QQlKzn1kr5*JS$^D+OFLO=&k5Oold;(9iyJT885}w!Y<|dJJ9E8mjojrJ^JD{{@9)XR0hVFtYYU^)x_2Y9|Jht|c6oyH%Nsc3OYd#!wXs%aRNK`E z+QqpcLPXl`qW<>H_Ao@(&pkN9t3}?A+z@ zbuu>}5l7-PU~G0_*(;aNx=>5@c_nYt%}4A);wE-cmw4TXI1-=3mOXw}inG!u`53HZ zr8q0mKI-{R;_59aWbGz><4F0X7TKP{r`X*ilx|(0*it!LWd7G%h?l6|9!Hw>c{j^U zTZV{n=w_Z~Ih*71*~}=>r*o&wJ{2gt9F%3B!c}=A8N&Zt2A(&*o@$i&9~Yyo&Q>Lw wY3JC`WBiMIk7Grbu#76OVONf|8viqLq%oq!gYN$!?j9SS@JsOT{k>JvUjc}EOaK4? literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..3e65b1ff5 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/classes.nib @@ -0,0 +1,12 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = {relaunchLater = id; relaunchNow = id; }; + CLASS = SUAutomaticUpdateAlert; + LANGUAGE = ObjC; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/info.nib new file mode 100644 index 000000000..5a7568096 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/info.nib @@ -0,0 +1,12 @@ + + + + + IBDocumentLocation + 188 142 356 240 0 0 1280 1002 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..e7f61432a3597b14a71c5330fd8fe062a3084efc GIT binary patch literal 6583 zcma)A33wD$wm!G2m+HN$t5`*BLqLQOI-LZ4NJ-Z7 zE`MOI+%7j1raQWUtlR!Na9~+nR+O!GYX~YqO7`-bzy@~6fqa+%Q(+nu!c3S4iy;On zSPfSKg{xo7ssMejAtyNN3=K+OeW=|-up6tU|zT(iBV22@(29EW?8#l><^^7sZY+G zQXQjDP^VAOyEg9+)P`~4h&(?WZHTodYcoUYdg_F_8Avm=r7fk8!dBV?eX&7j+27B= z(ga%A8cVFeF{QDnQW1;>m&u8RIG^06V8>d2pehzqXq2v}D`^Lf(RO+ZT}4fFBjsqE zM(74=q`(iNOb;UNgIvf%$2DhFlc<5R_58pRFd3#S!KqS79H~3Bpx3i{o-ZpZj)h{uJ`Z|eIvQ{Z%)k(&rIg%G z&H5TeP}~j0Py$mB--?tHL_hh@&}|qajzIY?7d0=Rj(y zx=4~Pr9c~~tfSfjGj>BOv_U(pgbr9m9n?u(l&1o9Q!@&oFdmP{p30I^Pdu1Zq|j3t#oC=re;o|c?!-??LkYh$X*N=rR0dD-4` zI}A-PSXNwp?!y6yP&gv1^h;K1rl?SyvC=>5+%Zx|hc7qFGcmU_%hNF-FUvC_ue0-Q zSO?d_b#Oi0fFRunH^I$#tcMNwdkbuYO&E(nD2S@Yv(g@s5kRDbB1aV!_`+xywIV0+ zX<;P1EUGFB!=r@?3EX$>BD{x+jqit z*n#Anf(C1gsFv1Y|GtLawHtQsf}OAncEep~I@cn7keezFiC6?Fsoubu`pArlq(#li zlRd%zX?Klw8`*!>eSNk2VNW;gfd^E7Fv7nfLIeu$_G$85p+5wFK%qa3Lf?n7%%wTh zhobbnb(SbqK|ZPp@-aA|spdip_0o)beo#k8jyFHcljHNMJjpGXgx3>QqC5#t!P7{U zXVOIZFL)N7g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0tA`?Tm5C2^oQSR5)26Nif)F+0@??}h7e#JjV{RXC + + + + IBDocumentLocation + 425 40 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..ac21bcba231d538f843fbb6d8ac9616452fc6320 GIT binary patch literal 10787 zcmaia349Y(*Y~;iCT)_Y?KDZVG)*#75EY@cr9fGwWf2q#(y}i#v{M>LlbWO~Rvs^? zh(6+i`+~BI8=!)spdux^*yCT^E|F#zwWquXrdLscfByHjHW=oj6&oPQ z)ER0`X|kaW$ee{c!35^<1IzODW;MY?kdswegh3iup%6MjXXpVvp%nVTaHxhxXo8#I zW|#xFz+AW$ZiD~AL+}_p4hvx^tbmoU3Rc5&uogDJTktmQg5B^jd;*`rQTP_VgP-6y z{0@J>NjQyjtRelO@<qry1p3EdSlE=v7WFc8Z7Lz4pDOpCAlPAauxQ{$Vo+i(bXCX>fkr&8| zyhh$6?~!ffGjfO=CSQ?n$oJ$Y@(cNu{7z0$12xignn5$EM6+o=?LZ4?AuXo8 z=@oPU9YTlF;dC4wPgPn=C(-Hjddlf6dLzAw-c0{X@1*zA`{;x85&9TiMwipo^f|hg zzD!@CuhO^aX8JzeK|i27=`OmPen|JxPv}AVH9bPVp-1VD^e6f={e}KP|75@n%mk~L znOT^P9$|Lo5bs$IQ}AgXYsD^Mm$GiG2OG@BvJjihrm!%pC&yWYtYcBuz^-L6*2t!_ z2iS}3CAN;e%wA#Z;cK>my~7eZs z4#wkZTyH(5ykbbGCXPUkk1ek#57w*N_4x9NWHa&R{2@gjeSmTL0L^nt9R99E=1f zsj<;Go;p2&4M&t$42wn+d^bPMzu;f;J^b@ogz&>WWfq~_#P{-@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0xDqc)NLfc>8(Fy%pY&caC?i_crhC-g(};yz{;HdRKaPcz1et zd-rt_xV@)*ZW`d zZ}h+Ef7}0#|FHjS|2O_`{onhK`F{$S1KvQpKz^VgP!uQ*^bQOR)CTGTlLO&EB+w9u z1rmX&f$4$k0@nxr6X1c_ftv#J0`mip1l9#!32X?w7T6fr6nHDJIj|+LHLxx4e&B<^ zuE3tahk?%mCjx&2{tBE5{3C-*WrLg|n`Db@l`~|QoG%y1MRKv+SuT;g$vxy=a&Ngz z?ko3~E9D9DO!*f1UU`wcQr;+Um3PZ~(oV@&3X~$HSm~^k zDBYAEN-w3iQl|7(`YQvJE0sY?xiVB4rc^2;lu^nUWt=iWxkd>oOO@ry3gs!~8D*ui zT6tbsqr9lBQ(jRvD6c6Sl}*Z9%4TJYvQ^opysvzq>{9k9A1WUy2b52gPnAQ;7s_Gf zYvmi|TjhJ@nDUcyT=`Wwq5PrzrJPd!$%8zaXUI#*Gv!(Gta%xEt~_^MPF}0L)_HC6 dI^-4P73Fo$!z59BC??wC!w%@b&EI)L{vU^dNm~E_ literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fi.lproj/Sparkle.strings new file mode 100644 index 0000000000000000000000000000000000000000..c52cf30ced86e6628aef76744f03c40f73c271e2 GIT binary patch literal 6954 zcmd^^-EJF4429=9Pq8*yBn=9uKbJ+38mWP%1`;DpQuuOX$+jX{5+tovy|133mu=2R zYO*sc!%=FCFH#7Wc4ucf!$b0rL;v${coH6mD!d32eV^(3N}qlhhlTE^VWyGmFbF-3 z^)&J>tn|(E3yqF-)z_Q@jXjp62Vp;at-J5SD4d6(Mko5Mvax;L|Exb|ejmQdWk8fG!l0HWBaNbatucO=ddjHJucUup&w7T; z!ftqqp!%w-1_uLwR383nB#^un3Vd+SvY5_ipv2uCQ?>oWN%;?V}w)4iBp3Z}`^1 zPWD4zq_`ch0NzP#f`Ho*X-LmkMgD!^;vR{&b+xR*qmQ0Vyn%~H!#BnsyF@@w7%qjt zNWVlJaSFzt69;4SX?*!63?FSUCKe;AsXzN(x4o9RJ^f)5j}zYVwMzRXsNijm19-If zPW5DFQ9U=!+y|XcmU;qyEyFDICU>=%e=7Y4@^f@@-+gFn^mK>cpJ{xetChv^p^dfN zHIuh`43jB550D8!2MKeX~Md zS>Pq#Qzc344J2TQX%=J0#xU^OTAZ>rOT#hF%zf>O{Sr(3ItMq}FVV;Tx4CGjaq0gF*NPTzt{)Pgu&O+6J~T=;77O> zOW?t4&BVr0Q?APK!J*bAzby6J<-J%5?3!=)5>|Y(;l5mI*AgHACT_>bw%x3U+%jyq ztM;Bjwi)ujYne29jiGb7!&KWKGoGG^J#%PuEjrHzgkJplsX7De;>$|)`b;(H$mWgLwFpfQf z3wuJ8r&+Aa4rFZJd9Po%6^5YVfg8$YsArPSiJ3~U%^1gumn*Ga7pn)JS>8BPOt$rC ziYu5p9$vZ74d8ito`0?V5!FPrS2xp)alI-fQ+3bHD~;U70_9F6ze=n0lon$#)%`#W znC5RzRGu$#{m`0<)n}Kf+m5V9)8*~kc6(x6>-~@W-|usIvwH&-K5^-NsaNLVZGWis z^|m@92Yc72>o53FeoCpNWw*yts&>wG+Qnm1ot%f#N+kMzS(n*rNhE$xD+aHvg-CoOi90bmgS(gvWnOC z@j*Z=hN0}PLe(O$=#oqvF`0%Ha|JL)u~nK@_c^w+V14UjyBySVihFl zO3+V<{U=tVuiCEaonHDJ@EqsBbF(kKpIE=$+^LGSMYEM-@?JAunr2tn@g^Ukr*08Hne@|{w+h|f&b8!wFSC^v`&!-s&-a>E{=5-8!}%`h!TNs@VqdA;N%d6rn + + + + IBDocumentLocation + 188 142 356 240 0 0 1280 1002 + IBFramework Version + 439.0 + IBSystem Version + 8J133 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..552a5bdd373f32c150427e896ec6c6f8b1721bf6 GIT binary patch literal 6548 zcmai2349bq)_>JKNB5k40fK-dhk!ts$w9&)l7oZ*nS@LdKoY_*X_Ar2OqhcZ15%3M zg`$YAx-4QMAR@9XA6|IvuHvnTh!-lWuAlDedMzHX$iD8L3|a8oFY`-xSJ$h0@BQol zUcKr?ZIN&y>Gd840t~QV0y9{^3buK}g7HvGc$pfXI}9(0a4cFgEE#K?J1n;7ay67p zGzxBiV5ZukHWj7?B_M0Jya62W4dq2yhFDWD8Kh*lumSAg03YPRc$f^AKp{+nN@#!> zq~JDKiy5 zVhWie5@Cv&5@s4x%9JtFnQ~?pQ^{1<4vVHDk&grkoZtdC2q1z4GAPgo`a(ZA5BkFZ zI3EVWAQ%i6fCnywAutq%!Em?;M!-lI1sB6;7z1M=3&w$0U!zK6z3PIIl!~j?-ybLp zh15hMyeJ$ACp(H`(I~EGEN-l5aU_^Xs0l;*GJl{l+?2poPR#cQ{J~aLe{S#x(qdZA zxl?Lmj0x(E33_x3{y<$A6-U%L;b>E=JyAC-r0LTpG|WJnX)RrqF$!C04-94f&a%Ik zfu(V@uss%Ef@4Z!(PTw18f;eM^Kd?Oc@hQd{DJCNEJ>sEW_ktfq%qn-Z=oxwh2Baz z+D0REJvCDh`cdW(BAyL7kc*D%&T1x66J;BPzJc1pR5I2YOol_XZOCx7Frvnjhaevc zU;<2>YdEDQE;AmYII;^S!lVT_RVsla4Tt9Tc-ANgkr`77+DJb?NA2Op&VwwOqc}~l&2TaTzUze zMeAq-4ZRIjFdM2N05zzo7Q8SA=E6L<4CX^U0$8FZlHn-&7>go+h<#Ns*)qo;m=#>4 zMjC~I2x@py5iVmm+MMA~oslVUK)MHg48&6LkV+Xkh@LMnbRZo}ZSTSYXoQ6jghi-4 z1WlmAV*Is07%qn;5P?<*>+IE5u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Z+{ z?ji1B?h$UUd!l=?dzyQedx5*zz0AGJz1F?iz1zLVz1O|Z{fPUp`-uA;_j~U5-559Fl>RI| zC%q=UDIJx*mcEs~mySz6NZ$QQ~(<>B%Od6Ya_9xIQN3*>Tn zrd%Oc%CqHwTr1C!=gISBRgTN6W*PrA#STW-1j*r7~LyD7DHQWu7u$X;2!Kpb}D4 zrCA9pOO#e6rYuzwN=j*0I+RXjrLs!7N?EO}QLa_4S2ifODYq+|m3x$Xl?Rla$}Z($ WWj_|5_{V4;xU_q%aqqb*FZ~;Xd73Z) literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..0071ac077 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib @@ -0,0 +1,21 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + {CLASS = NSObject; LANGUAGE = ObjC; }, + { + ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; + CLASS = SUUpdateAlert; + LANGUAGE = ObjC; + OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; + SUPERCLASS = NSWindowController; + }, + { + ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; + CLASS = SUUpdateAlertController; + LANGUAGE = ObjC; + OUTLETS = {releaseNotesView = id; }; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/info.nib new file mode 100644 index 000000000..b0e7f7bd7 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/info.nib @@ -0,0 +1,16 @@ + + + + + IBDocumentLocation + 425 51 356 240 0 0 1280 1002 + IBFramework Version + 439.0 + IBOpenObjects + + 5 + + IBSystem Version + 8J133 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..0cd65e6c00e0d716af8aedf26ac4fa7190cd1295 GIT binary patch literal 10882 zcma)C349Y(w?FsZq)pN!ohE70q)ju4h=@?yQlNrhTXuo6w5$R(ZKpJlCN)Xfix)%$ z6&J*PV^c(&= zp2*MN0|Y2A(19LOAQenw+XQ1Z^`WUsY)l*c6%R!tm2DEy#xZT8)svN)M7&B$FRvJ+ z%us4elMQV^7A)Hd1~5(-SeB8 z4i>=mun-o(4R9me0}sMOunbngBk%;QhbQ4F*Z?oWHh3L&!EX2%4!~hJ3g5uD@FN_D z6Yx8ngj0mUdZHtGVj?*tK-!W#Qb>A{GBSt^Cd0`HG77K8;aNqhNer$hagukM9F&c40(>c zKsJ+?$!lagd6yg}N66>o3-UGjj{Hb|CclsqR&E4x=OK1Uiw{(MhzP&Y;b7E}ci`)9dI0dK0~s-a+rA_t5+4Lv#&&m_9?Fr5ovs z^d&sE&~5Zxx`XbeAJBdDL%N@SL=VzK^fUT7{hl79KhPiPZ}bHHo&HHrF<_}IjitkS zCb10WrpK6vWsCRB&)VVBi&=ZtiRH6W)|*wbYSu`Ov#ZHQ7GrUiU`=c)o5rTI8EiJY zhCRq$VlT5-*sE*{e95-5*Vs1pI(vh?$=+gbvv=5b+Qi;vJJ^5Nd+dF-lkH-=*&eo+ zeaJp$heo!EG=;;5B^y}43h5w02H3z34#)&2xF8GM;DKz&0Wai&4`lE|04{(wa3QpX zi=Z7`4DI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^?AvnYU&x$y}OwXXf_I!YVPJ z>74DH;=0YX#`V1GMc2!&S6#2Uj<`N`eeU|w z^_A-z*LSXCS*clhUYEM4$pg@ot_V}`)7~I9+y2nyDB@J9m#IYj%Clvo}Ybd_LA(S z*$-r|$ljQ}H+x_9{_Kyl4`d(C{v`Xe?7wqzbL5;rPMe&zIqh=V=XA>Hms6E9Ip_ME z`*T+3tj&2T=Z&0wIs0=y&N-NKIOj`msyD-H_hx!sUbi>f>-GA)J-lV!QQjJFowwdQ z#oOSGdKY@{^{(_j;@#xk?0w1mig%0meed_)AG|+#fA;?BJ>mT$m*!^XI&-sf{kiRO zd*=?zotk?`?sK^tb6?1PG56)%S97=KZp-~5_a9%H&+3zWc3-B?-W|S+>fOY?B?bQ_hk-a*muU%W^<&Be#`1$^GO3@)h!6xm+G5kB}?n zQSumhoIGBhC{L2-$XuQ$&zBd-3*{T+o8+72TjeG4Qu$7KrTnD)g8ZhuQ~u0P{gU6~ zzrf$d-`3yBpYJd9_wY~kPxsIC&-TypbN@X5eE$OfLjMi^oBTKXZ}l(nFZJK)zuSMW z|9=02{$>6Z{#E`p{zv?4{p_Pzm literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings new file mode 100644 index 0000000000000000000000000000000000000000..9cca1c37057f662eb7273cef65051dd0671b96f0 GIT binary patch literal 7344 zcmdU!-Etd65QXOj@(vpp!H@#;cS%vfmEntqQevxm=QVXJ==+Pj{d0Y5((Y`YPQ|ReG8x`aab6iT(y@oaVZprkO_GreW%9 ztgn%Sbf#~fA8T~1tAXb1Y3#mMx|4R&J>7ksM(HU1q0xzctJc_#?tjpSnct*OTC?l4 z&}z*8w)JEueXq6ebRg@Gu^Zp7Q!mx}JqVq~xz~DSrMsbUE={*&d}bIlyb>i8#G zckdZ!OKjkq;6QAQmX>}Ul4IjjeXwXHy}+>+78A_{`?n!Ix*deBdskR1uLSyU0wrSX z`gFBVZIZl7pPl0>XSiT$u~CI7b1U$0++AUGH^uq(EhhGZv!PVqsr z$Ejon>%u2;cmF{h`Jux;jh5@_vjJrkW`}#`=R@j`bYo zhxdO5RZ>FRYEE z#0~Z_3Y#r32yX0-q4q<1ICedXbA^G0x5?pm8{GS1i6I`i2rhG`U*E;nb>7BnF3P2# z$qwCQrEPJrhpgwF|F3)YpUv#srRHQ(B8`fac$>&WOHL+>^ur4?|Fo-|!fDj1&lP9X zYp&4nZK_&$sae6mI?lVfvdaEqIqdaF<-G6emG~YnBM@$(UL?L@X`=fwxn62M@og_8 z_Ga=l)~~h3nXb?ro_5_toX)gZN^+k=tO7S!Y$w z!(iaUI0@vczKJ=S`(#btB?HbS)3ntC`9%_%$upyqIgy*UGv-`3867*)(I{Pr;;G&B z8XifT=6N{BcvI&+<@n}_<~Mo8>Up%tnxl%`mUV4uT7BA?^&UsJYc-!-rpu!(IQ=Fx zc_Lr8hq=>7L{MkqTX+c70X|kbZ|yf+t+}@bHx#exE_T`yY~xAoH%e7jPP8|H{Zqw6 z!IislXCC`3{nXgYcio)d@SL0>+>yaT#mAcY;kkIN^kCcb>{;Eh|BF`D{#cUu)YX*F zqxlR(FV8vYO72kvU5Dh^_c^l{Px@JPkxzYX-nZ1A+l}on?~J;$V4rZ_`k4H;-cif{ zN1($)^#Ce#0EfEIeL$agn!9p3BhULkADoSk!UO2RaFHZm9>W> z+d11D^zj)x_rK`xjHAC*y2Esi-ShD|dv)*a>V=FH>`ryj&cUTy=d)JEhB{+YkFdLQ w{42>;H{#%#bRTxcsILOsUHJ?r0CIo+|5feA^-pY literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..3e65b1ff5 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/classes.nib @@ -0,0 +1,12 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = {relaunchLater = id; relaunchNow = id; }; + CLASS = SUAutomaticUpdateAlert; + LANGUAGE = ObjC; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/info.nib new file mode 100644 index 000000000..082030262 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/info.nib @@ -0,0 +1,12 @@ + + + + + IBDocumentLocation + 136 94 356 240 0 0 1024 746 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..e4c7ba07d43f7a4acc01c7f0ed63e9fa13806abf GIT binary patch literal 6498 zcmai2349bq_I}kpJ=1gd#eI$876_9I!YMgO2#_IUk^pjqVbYM1$xNJ?03ifQE=5HI zSr=VaF#!Y-S=VLN_1skuMOFzQ;ssu-qOL5fqA0SjyC)%k@V}e+rO&E*?|t=suU_@M z+HfeI@OqB}0R~tw0S9KVfNe&fKrC1tTBOFN_rXIv6pfViNknU>_leHCNew3Am4e&n zpQP5SRXNFq5|Fjqjsg$X*+sdjMzg9wB0$MLVH4QF0cns0!(cRwfgBhQQ(!hkp$?YA z3ZQTctb|pt8rHx)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FlSgBE>$`YksX;4-x>#z*PKSujprJc)-bL&yr@*hGbm~a39 literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..0071ac077 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/classes.nib @@ -0,0 +1,21 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + {CLASS = NSObject; LANGUAGE = ObjC; }, + { + ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; + CLASS = SUUpdateAlert; + LANGUAGE = ObjC; + OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; + SUPERCLASS = NSWindowController; + }, + { + ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; + CLASS = SUUpdateAlertController; + LANGUAGE = ObjC; + OUTLETS = {releaseNotesView = id; }; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/info.nib new file mode 100644 index 000000000..2b25ad033 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/info.nib @@ -0,0 +1,16 @@ + + + + + IBDocumentLocation + 425 40 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..af7bfbb258d69eb70caf7842c3617e1162668df1 GIT binary patch literal 10712 zcmaia34Bw<_Wzlgq*>eECTX^&$-OM1tZgX>6p^x5pe!x>QbL=yfi$T}3e;K|P!@d; zH=d%nu?mQY2)KcusJNn1K=w^h1b4*kA@V!--n1a_fB)W3l6&XQa^}qUobx?1om?FX z#^PC7dw~E21{%;p66nAmW7U$I~$T-+iasUF=TGI>g%G#)DvQVWX) z25JLk`H6}aAaj@O20a)i6!dDZRx9(z{hX{%BMeMnhHU5rouND20{PGvMnEalKporz zb6_sagZXeT+z0=H$Kh#s2A04ISPd`0dUz2wz-HJA@4&mz0DIst9D(C-2F}8_@DrSa z-{B9q0GDu#^+ZFo#7I1(8M%S9Cpn}C=|u*TL1Y*iPDbM0Sp1Zb$s`K%NQ}f`KB*zo z$aI)XW{_HP2dN`>l6rDCd73;!mXM`n8CgzNkd@?FvWl#RN62$zEqR`-g9uqqHjtqYrM&2eLk&nr7a)O*9Uy*OfcjPDX3pr1ICx1~5)zV~|LQ|SaI+2#p3R+2n^bUF#olWnibLd<;k1n7O(MRbbx|lvim(bO84c$mL(O2nK z`UZWIzE3}(yJ-X6L-*2s^mBTU9-_zT33`T}rQg!;=sEfeJx_n57wBJ%F(dS+(H zES;WZcIJ@ZvrN_kOIxxVSR2-s-NJ5VL)ka zud&zJ7PghW!M3sO@HKmry~TF0x7j=FT{?~JWbd)}*$3=H_7VG-?P8y>PuXW|H`~kh zvqK|Vglj^fN|Wc5r|bT;PTb@IWSb!3QEp&$D47L5$zz@fmX zV7M$YJvOpMsXU(Cp(+MilKi9$rMAMS#0=EI99PMIg@FB{DB<)-bSk##7YWA)`@{Z< zKy(cD7nl*piX#h)hDRcCzK37pU+^#aUVd^GA^a3innftr^L>2xECO81L72j611dcS zIzleaU74>e71wY!p=iX2YBb(Jekc%)H^9x%1-e4F(duLZv9an+7^^RXZjd(-+tD(^n%{Yp*Qq_Jk;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ka%wA+4VIO55V;^UqU@x)z?dA4L`xJY~KF|K7eWm>c`$qd_`!@S- z`yTr~`+oaD`(gW0`*Hh8`w|Q>Vt6zx~%8=ae-uQ*?GzV6)W+~$1G`JwY;=O@nn&O^>4&STDBoqxNu zE}!cLS8rEeSASQ5YoKeeYocqCYqG1%RqLvA)w^c8X1Nx*R=8HV*0^4Fz2n;H`qXv6 zb(FMt(-`j0qWcW$=vI8TVw&&6uBYU&aF&&t`1P z_#or!j0+x($KdgJT6#Krx_G*Ix_f$f`g+Pe)t;y)?wRJ9;kmN1^~?o3anH&e{)kU1!`Fmq_;@XX@Ok(r}2{h9I1n#}2$ zJab;=vds0F`!dga)4dL_%bVfN^!mJ#x4E~EcY=3{x5^vwM!j+GH19(1Bi=>c$GuN@ zpYlHAebxJ+_ptY<_qg|@_e<}O-amZlK8Mfc%kX9Td_Kw7+}G0A%6F5mjjx@rgD>0H z(bwIV@4L-c;S2hv`l@^p-|fDbuf{jsSL>_u)%#}pX8G>+&GFsuTj^WnTjN{nTjyKv z+u+;i+w6PA_nL2u?+xEh-%;Oj-$~z>zOQ_zeP?{%`o8!5==<6Ci|<#_CVIs-Vpp-Z zI8+=fhQwNNws^NVN4#HrKzvACEbbHciwDKS;!*LqcvAdQ{7O76o)NzlzZZWLe-?ic ze-(ch{}eBX7sX2wk(i{Fbdo_bNy$>G2@h5)kxE&TB%N|mu5<{q`Rd#(md&2>0ih2>X`%Fpv`BhfdO~_idPZ6*EtghG ztE4s3T4|lMUfLjSlr~GRNUup-q&K9U(tFYeQiHTd+9w^8j!P${v(k^agN%O^Q)>B- M9aVoDzoozb51-pti~s-t literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/he.lproj/Sparkle.strings new file mode 100644 index 0000000000000000000000000000000000000000..60da7d5eeae976b1da182f4bb2881b762a1075fb GIT binary patch literal 6212 zcmds*UvFA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eD~5~ao$lnwY`4;5_Id$ literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..3e65b1ff5 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/classes.nib @@ -0,0 +1,12 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = {relaunchLater = id; relaunchNow = id; }; + CLASS = SUAutomaticUpdateAlert; + LANGUAGE = ObjC; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/info.nib new file mode 100644 index 000000000..5a7568096 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/info.nib @@ -0,0 +1,12 @@ + + + + + IBDocumentLocation + 188 142 356 240 0 0 1280 1002 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..b619eb4ab4539674743cea9361ae86faa9c1ca4f GIT binary patch literal 6380 zcmai233wD$wmzq-_qDnzECH1Uf*^#D6~ZEBBajf9Kxc(O=yX>|OQ$>ZLWnWr1qBh@ zb=((B08w<1LC0-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JIOGOElz4To#mA*BlLl#V&WK zHF6>D5^gqW=04%R=8khGxSzRSxs%*!9(kVE^G4pxTX{S0-2;4Zv7~In*LngVXo^%eRS{T=$J z^zZ4vGdK)m45bE-p~m1dgbZ;5GhAi3#&DhCdc%!|TMc&^b{L*8{L}EX;aS68!x6)$ zhA#~#jRvFLm}(qloM@bCEH;)KYm5eoyMn)?;DRAj~PEQer){I_?by( zGMG#zi^*!To1CWeOy#DfrVCAR(^}JIruC)`rj4d6O;?+4Fx_Ih)pWmUm+3Ln9@9&v zy{3Jp*GwOozBGMf`q6APOXd;gbn`Ux4D(ELfw{Q) z>nxXBHdr=VuC#2mykyyH*=N~rIbb9u@p`P}lQ7*nYq_<; z>akW@Tdfi6N^8s-x3*h5tew^yt*=<$w|;FsX%lU3TefYEt=v{&^VlkF3vE@ldfQ^# z5?iA!V7uG4-S)8UAGXJAdu;n`uiHMgeQi5o*V*m%q4tsX@%HoWGwlWTGJBv+TQq2mk3w@#BY)j8aGwsVAYq;saTz**!han5qi zc9uDtoHsjfb>8m0(|Nb^9%qkptMl*9hn;(zz0O0ZxN2ODu4dO?TvxcZxpul9cD?L6;5zL3z;)bpN_2^mI7l2Kri#PG zv&9kONO80{M$8a%#2Mmzae?R+tHoNeUR*3L5gSFH=odp`mw1V|M!Zy9CtfaIA#M_{ z60Z?&5$_Xsh!2W8#a-fV@e%P+@p17<@kOy$JR*J}{wi^jQyMCzO2efzX^b>h%9N_5 zTB%-IEG>~5C7kEKtg&!jJ;@1*ag l + + + + IBDocumentLocation + 425 40 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..4fbd2d684eebafe14748acfd3d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j/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/hu.lproj/Sparkle.strings new file mode 100644 index 0000000000000000000000000000000000000000..08538d327d37fcaf8b4876aa849da42eaf407b6e GIT binary patch literal 6910 zcmeHM+iuf95S{0Kg&Tni6$-aUgdi$?sE`V(gis&d*hwwYIEs^o{5){ZOqN|YQR;?l zf&{7@d+)PnX3xw{fBcl^ax96QONrkuesA!X%TOjLk7SIRTPY+%U51(~nd6u3ebf%| zm7`A^b;p?LKw9z`r57@go_s@XiFZ<~YoYuW4|~3pM=N{3s@1pT4Q4)wAnALRjlb8D zN`?28?r4ZF?ydp~DfTizEq9-yj_(;-S!?|hAdsUiQ*0)R

9bv=gE4isb}jh%C|I ziZ=HcZIv9N{1xM-n3MC*^*ceS0E!%AvvQpQR+?hoE@bBXC8T)=H0!9^&WPjgclUa+ z>b7?n-wF!of~Q~#jS_2~g26(o*Qy8VbB2d|OK>u1{S~xSqA%^^77uMBg(cBy+V^NC z&WgK2%B*kIz7u)!+lqO%h?H6WQ)P=L)}ET-SvIA_#d@qsKv3|4m4mqy3C+1UTEsI4g-GO z_PqPuJvFq7SvT47y18QQlKzn1kr5*JS$^D+OFLO=&k5Oold;(9iyJT885}w!Y<|dJJ9E8mjojrJ^JD{{@9)XR0hVFtYYU^)x_2Y9|Jht|c6oyH%Nsc3OYd#!wXs%aRNK`E z+QqpcLPXl`qW<>H_Ao@(&pkN9t3}?A+z@ zbuu>}5l7-PU~G0_*(;aNx=>5@c_nYt%}4A);wE-cmw4TXI1-=3mOXw}inG!u`53HZ zr8q0mKI-{R;_59aWbGz><4F0X7TKP{r`X*ilx|(0*it!LWd7G%h?l6|9!Hw>c{j^U zTZV{n=w_Z~Ih*71*~}=>r*o&wJ{2gt9F%3B!c}=A8N&Zt2A(&*o@$i&9~Yyo&Q>Lw wY3JC`WBiMIk7Grbu#76OVONf|8viqLq%oq!gYN$!?j9SS@JsOT{k>JvUjc}EOaK4? literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..3e65b1ff5 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/classes.nib @@ -0,0 +1,12 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = {relaunchLater = id; relaunchNow = id; }; + CLASS = SUAutomaticUpdateAlert; + LANGUAGE = ObjC; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/info.nib new file mode 100644 index 000000000..5a7568096 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/info.nib @@ -0,0 +1,12 @@ + + + + + IBDocumentLocation + 188 142 356 240 0 0 1280 1002 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..b619eb4ab4539674743cea9361ae86faa9c1ca4f GIT binary patch literal 6380 zcmai233wD$wmzq-_qDnzECH1Uf*^#D6~ZEBBajf9Kxc(O=yX>|OQ$>ZLWnWr1qBh@ zb=((B08w<1LC0-ea79GKh~fgGqkb;qQ=f{s0q;~*C+3N7Uf1_^ZTH@D&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RSxs%*!9(kVE^G4pxTX{S0-2;4Zv7~In*LngVXo^%eRS{T=$J z^zZ4vGdK)m45bE-p~m1dgbZ;5GhAi3#&DhCdc%!|TMc&^b{L*8{L}EX;aS68!x6)$ zhA#~#jRvFLm}(qloM@bCEH;)KYm5eoyMn)?;DRAj~PEQer){I_?by( zGMG#zi^*!To1CWeOy#DfrVCAR(^}JIruC)`rj4d6O;?+4Fx_Ih)pWmUm+3Ln9@9&v zy{3Jp*GwOozBGMf`q6APOXd;gbn`Ux4D(ELfw{Q) z>nxXBHdr=VuC#2mykyyH*=N~rIbb9u@p`P}lQ7*nYq_<; z>akW@Tdfi6N^8s-x3*h5tew^yt*=<$w|;FsX%lU3TefYEt=v{&^VlkF3vE@ldfQ^# z5?iA!V7uG4-S)8UAGXJAdu;n`uiHMgeQi5o*V*m%q4tsX@%HoWGwlWTGJBv+TQq2mk3w@#BY)j8aGwsVAYq;saTz**!han5qi zc9uDtoHsjfb>8m0(|Nb^9%qkptMl*9hn;(zz0O0ZxN2ODu4dO?TvxcZxpul9cD?L6;5zL3z;)bpN_2^mI7l2Kri#PG zv&9kONO80{M$8a%#2Mmzae?R+tHoNeUR*3L5gSFH=odp`mw1V|M!Zy9CtfaIA#M_{ z60Z?&5$_Xsh!2W8#a-fV@e%P+@p17<@kOy$JR*J}{wi^jQyMCzO2efzX^b>h%9N_5 zTB%-IEG>~5C7kEKtg&!jJ;@1*ag l + + + + IBDocumentLocation + 425 40 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..c815112f63daa8433d72635d772f429a05988ce6 GIT binary patch literal 10634 zcmaia2YeJ&_x3Hj$@a|ll4N&=B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QSQ1zocr>squp+Q3usX0dur9D6@MK_P;Dx}Ofqj8b1K$UJ6Ln%6 zF-Pn!7K%N@zG6RdfH+*7FD?)t5EqGy#U%lj25klek5E zR@^GSAigAS6JHT`h_8!ph;NDShiEj+7^Lmbyyaq(Z5ObiGt0^^*EX{iFfXKxwcvL>eZQN+YCE(imx+G(jqtf>MPf zOVv_Hnk>~yQRx;bF4ar7OLs^!rF*1%rTNlB(h_N@)F`ckJzw}EP(1TLdQ|;w`j(#m EKL&p+B>(^b literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/id.lproj/Sparkle.strings new file mode 100644 index 0000000000000000000000000000000000000000..08538d327d37fcaf8b4876aa849da42eaf407b6e GIT binary patch literal 6910 zcmeHM+iuf95S{0Kg&Tni6$-aUgdi$?sE`V(gis&d*hwwYIEs^o{5){ZOqN|YQR;?l zf&{7@d+)PnX3xw{fBcl^ax96QONrkuesA!X%TOjLk7SIRTPY+%U51(~nd6u3ebf%| zm7`A^b;p?LKw9z`r57@go_s@XiFZ<~YoYuW4|~3pM=N{3s@1pT4Q4)wAnALRjlb8D zN`?28?r4ZF?ydp~DfTizEq9-yj_(;-S!?|hAdsUiQ*0)R

9bv=gE4isb}jh%C|I ziZ=HcZIv9N{1xM-n3MC*^*ceS0E!%AvvQpQR+?hoE@bBXC8T)=H0!9^&WPjgclUa+ z>b7?n-wF!of~Q~#jS_2~g26(o*Qy8VbB2d|OK>u1{S~xSqA%^^77uMBg(cBy+V^NC z&WgK2%B*kIz7u)!+lqO%h?H6WQ)P=L)}ET-SvIA_#d@qsKv3|4m4mqy3C+1UTEsI4g-GO z_PqPuJvFq7SvT47y18QQlKzn1kr5*JS$^D+OFLO=&k5Oold;(9iyJT885}w!Y<|dJJ9E8mjojrJ^JD{{@9)XR0hVFtYYU^)x_2Y9|Jht|c6oyH%Nsc3OYd#!wXs%aRNK`E z+QqpcLPXl`qW<>H_Ao@(&pkN9t3}?A+z@ zbuu>}5l7-PU~G0_*(;aNx=>5@c_nYt%}4A);wE-cmw4TXI1-=3mOXw}inG!u`53HZ zr8q0mKI-{R;_59aWbGz><4F0X7TKP{r`X*ilx|(0*it!LWd7G%h?l6|9!Hw>c{j^U zTZV{n=w_Z~Ih*71*~}=>r*o&wJ{2gt9F%3B!c}=A8N&Zt2A(&*o@$i&9~Yyo&Q>Lw wY3JC`WBiMIk7Grbu#76OVONf|8viqLq%oq!gYN$!?j9SS@JsOT{k>JvUjc}EOaK4? literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..3e65b1ff5 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/classes.nib @@ -0,0 +1,12 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = {relaunchLater = id; relaunchNow = id; }; + CLASS = SUAutomaticUpdateAlert; + LANGUAGE = ObjC; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/info.nib new file mode 100644 index 000000000..5a7568096 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/info.nib @@ -0,0 +1,12 @@ + + + + + IBDocumentLocation + 188 142 356 240 0 0 1280 1002 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..b619eb4ab4539674743cea9361ae86faa9c1ca4f GIT binary patch literal 6380 zcmai233wD$wmzq-_qDnzECH1Uf*^#D6~ZEBBajf9Kxc(O=yX>|OQ$>ZLWnWr1qBh@ zb=((B08w<1LC0-ea79GKh~fgGqkb;qQ=f{s0q;~*C+3N7Uf1_^ZTH@D&VT>^+;gj` zEfkE!GcykX0tYlVFsKJg)j@|!xD%<0{#M* z0E0EK7A}R$U>)25x4^A%8{7$-VH?~F+u=TV5FUmn;h*pd?1Nr-6W)do;UoALd5W^K70)i;2U@p zkKw=ZM-DlTzU?>>xD2{}~ zG@p^EHlxKMUo0lawAPC}-ub~mjAl8u*yHv1T4nWmiN~94ro1_GNTrW9K!Y|wpKZb8 ztqGFhkX#!K2O{mUnl!&+PZ>~igJ`DQsiw4EbeD`kGdAQ8{ts}lG)f+}N1`jJPiZ6^ zpXUqvmdnw48c$vwr-n5i@4`qV&cf_!b`k4j5!S)3WfwC8yN;Py8w;^(n4W}pYZQdCqT+}@;_Hu~7iN+J7eE0`K~hSw&CICTD1zc1D25W4 zPWaAC#C-&)SB_VEy!5a2ECtWKFdODT8I;3ZsDOFQ%to+Wc0Q|MHEap%VrU=$OXOHQ7^WB_VFHk_uk^)RYCYZxUy~ea6wV@0gH1&=jluBp zeh$@WnSweb-%yO+NFwT&8OP3M!v&6=#m-@tcVQ_s!ZPqd6B+kI0Ay&UqXmL+A*_H9 zv_ep2uQGEBR7?KtG#VS=-6exc8(lh(aJ}I4@**WR%DLGx~?#{`%>F&w7U0v_Mdbk`mz!k8O zK-vUX!c}x!4cE~BwQwC=Pjlh*`$*Mvj(3D)0+1*Xm&0)d_`-0Iv?9moZDA<5Jgg{+ zrbnGBB5?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EG>~5C7kEKtg&!jJ;@1*ag l + + + + IBDocumentLocation + 425 40 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..44b9da5f9eb0dc93032562a5294da0ab7e618ac3 GIT binary patch literal 10634 zcmaia2Ygdy_y2jGCuuX=+w7!maxX(R4`5G5R6sVhi1sJ@g49h9*RaPJ0zlw<2yvBT_sm1;#ER=dBsq9 zwp>$^Y-j_rV8tFVfN@G$X^z&cCYT6vvN3}&FoOm1peOW#OQ0W=z~wLos-X#*;YOGb z3*aVL2sgtma4Rf_2jL-D0jpshJPsRS6KsYpunk^?*I+N~gTwF8EES^ooql!!;F}R7uNdgvweq?ggb zbO;?mN76BLGMz$YT1)HbEP5^FbS}Mt-bm-uTj}leF1nQ7L+_&x(lzv9x`}S4Tj+E2 zdHMoBQr7+ zv(cl>&K$~f=3^4xZO7WPi&yOjpX0c`L zY4!|zmOaOwXIt4enqV)m7uk095__5LfUnsr>{a#}d!4<(cCt6wTkLK24%@}vWqa6u zc5qCGNK-iciC_aOq(M3ekO4NZg9Du40ylWT3qHt%EXW2w1V97{+Ch8h03G2X=mZx- zXXpZ5p&N9E9OwbLDhx+xkQ^HfH^~T0Z+S&Yb+sIiho*(Xp~UO~(MSX#8;xn89S{!2 z<8oYUJ+ZuEM5rc?K#or;uP6^T$m;o&@`_|L<;nR&Dt)v8CTjz<&MlNzj1A$$VR>9A zQWKpSAKRf?nNJx|69YX-xl*Undf`=a1=?ipbL2luz(FyTaAq_%9s3N5MiRq=kzk!1 zn}FlVvl7^FY25i z{x*M)mmGw#Fb>AU1ek~tOoCjP0#l(1u7n^=Lxm2MR1EN9>S%f@`mcHpQ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kle.framework/Versions/A/Resources/is.lproj/Sparkle.strings new file mode 100644 index 0000000000000000000000000000000000000000..85c1567de213c5d7f3da25097397e45d4fa60604 GIT binary patch literal 6942 zcmeI1OK)366vt=XPjM4bwNwyZON78Gk*JUYq5{N*mJ z|L+`6XRZ^4AUZY+WZC!5nb(>BdCu|b&+t)r5UOw#7WzHb?+bkQ|5Vhu-Xa$HK6UQ{e`}a{3N_L7+tSN ze>$M=htIY0odTSGWxVlw7V6OI`P5D{*Bhs6g+i^f%tYn%wP-w->V@j#D?BZ{#H_2 zXe|2iQeSkVmL{P!2Y(|O<|D;F!ZXcr#Hw(q)lb7KSpyn}u1usmmD;b2!pf&=`|OpT ztv

`Xhx;$kie`)><3*Tw5lsKWiXI*p})o7=(r;_!C5KQ>LD3)O{Iz)GejgPSbC zab$?6M^K zV1n%355RFk_gp=VPJm7)4Rt@VR1fGS&(dioty(_+To_Mf1+_-FX5X_t&?&6qSoDS7 zF2bH>jEt6iR%7}%*H~hNM*v~~xUfQNaRFagtA8TjRfR|9_mN~5KCrPq%Kab~(rP!X z!|ee1b24^;+8D3!giQU(d1gAx&;s#>|D$$0)XHe?ND^=_dewi%Y~i*sYcKPz?|R+c zo*oHZ=SlMuA1P`KV+Auj-vUARbVDD<{8A?)Qn4pFBbK<3r%16Bk3F`?8a)F~k9g!# z$=l$szZZp^%CjgeoV*i{L40K=pTT~)g^#RnS6u84S;qwL3|3P;$=clm_ws^c!xs+^ z)qNx$IC}WfnD2tW-AQAqXi63c-k$#xp@^GNCMn)FqBEMDsI(Ne$=81aefJy*b#A#= zGs!58leN^gDTnQGSW+UJKE|WhOui`HjNJ!#P2tpf$V~Hy=HC0?tySif4`sjHxydQh zUHcnl|D8VMw)opO#iHv&%g>K3ca9lujuUwM9n>Q#bp`tK%D_mpGf|15>2AZQb47&L zl1Qu5ardpl@A@{PadRMw^tMtNY`+%gOYIVGcF|h%^Bu@H=5hXUcJGR}=R6nci%H_p z>N%VK{3c#ULU(0%M34sitC*L{${q>Vlw*-Wc?IhS)8tf1N;>^mJ>B|7>wKbF+~iyz z;GZlL{c4J#JmmX!8Uf#)-;f_}4`Z+#R{!8Pp`LrVA2+NGG|38Psux|Ft#O0B5VG90 z<7vo(JFV$B^r2i9eJtN$*1o9*PSGCP5J%6|`qtKU#^xp+;7J4N*5*J)5W z+!K#c*QpXGN#uGn6_4Iq2Cthd(O$jwIue;H^&l$!|12t9t@*^7H+3iM7aXWjP1TN- zDz8!HyK;w_%htV0&mHl^q)W9lW_8Z7|EtjtqDWrJtF6-Kr|{|+@f@VRh7K1VJ;6U# z2KxUc?xfL&c2@N|6tB>q>%*Ebn}V)Qy=c>^xUmLKmIooEj+jCUkBK` Wj(}M%HLsdJQ)M00f78lut^6+q*qg@y literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..3e65b1ff5 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib @@ -0,0 +1,12 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = {relaunchLater = id; relaunchNow = id; }; + CLASS = SUAutomaticUpdateAlert; + LANGUAGE = ObjC; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib new file mode 100644 index 000000000..5a7568096 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib @@ -0,0 +1,12 @@ + + + + + IBDocumentLocation + 188 142 356 240 0 0 1280 1002 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..53fa5b31973f6c55c9bc07b504987781350fe54f GIT binary patch literal 6415 zcmai233wD`(yr>B`|Rl+P8CK7pb|n(NC-x95J-R_Fd+~Ogvq2yS|&4L4nhdg4^%|F zmBnLO#c+rxx~`9|x56qQAZEE%@mh7)MIUv&L4mFAp2V#9@1K4$eSJsOTkl(6ecjL+ zR^o}w%tL^{0S^W+f(guEt4#~WLe0uDIW{kie&R|rQk|BFw$4k7He4Zx67hP$?GH?o z+vUdMR6`MP&8D}&0@ei;B^i3N#$Y1IaEEX^*ueo=kO$*nB3uf^Fd1gT0*FEqu7sHh2KG!-McB{0W|e=V1@*g>LvO9DxtuL-;%V6aEEX zz?bkfd=Dq7?J4*PIkch;J=h-yzymlC2cZuy!i#YtUW&z7f|GG7PQ#fPptsdH2j^oD z8?Xf<7{esC;|lD=)p$Lw!`tx=T#vuQd+>350{?_h#@sJM%FkznVlpLS0Uqq;9 z7fgV{g)~$$PCa#p=Jj}1F9;PSrO{9{*y}+z6p;a!!6XVnN=orf%&gB*0;QXw6w08G z@STxN1PRc9oS5Se(68RJ9Q+T!6qpJXPzlpuI?P~JHk9SEOWAZ*!xpg6QK*7hFdG6; zO*74bOqdJvpcdxC5dx5~uL>rb=lTQFgAH=HUO1mXRT@etj7p@b zmqRsrrl1a~H{@d=nv8{H#<2_7c>>4IXG56nZ?F*RVG#tOfhG?@Bgn9rj%HBc3RnVR zXaPlIuNt}8a=bMfX_R9Wi$JnfjxAHs4eBIu*1&)@GFeA; z8BE#+ZLl2LVFh%+O6FuP=4Jx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dVz z3QNMW+H#F$jb*K6o#jT$&6YbXcUkVXJY;#o@{Hvb%WIb1mc5q!mJcl_EMHo_x7w|e zb*MGnI>9>8T4bGMEwPqar&;G&WowJI-P&R8w63w0|+P2zWv+cI+ zwe7PVupP8@+di^=YCB>3-1epIXL~>UD0`W`+&U3IR7t|ph_TH5wuKlh< zu79|`be(aV-7fb?_jq@KyU=~9`!aW(d!c)gyTKiD%kCyOb3f&N+WlwubM6=1FS%cF z?{pt_A9a81{?7e_`=t9P_h}(RC=sfKg+f?ZAzUY{7w#1v7M>Db5q1iH5ndPe2yY1c zg*Sym!V%$^@Qv`Z$LKM81W!ND0FTcz#xvHF<;n5ndB%GRJcXVz&os|`PlKo3v)XgL z=YG#4o;{v!&r#0_&%ZsVL=*>#7mB&!I5A(GAWjsE#7Sa_SSFT>Q^i?gjaV58PyAH;PCP3)q#@D>DO)O(CQ3!p6ltndDFvkE(h6y%bfv_k)zUT68fmSxPP$RL zS-MraU0N?~knWQ1kv2+OrM=QV>40=l>Xr^kN2FuY+tP9AJ?R7K@6yN8Kcr8k6Vm6> z7t&YK*V4Dr_tKBjDd}hFj2FC|*WfjIEnb_~;qB+`?;Ys9&^yeV<{jhB@Md}oyhT)j T(jTXOTT;)n^mEUzcgBAJl~#x8 literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..0071ac077 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/classes.nib @@ -0,0 +1,21 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + {CLASS = NSObject; LANGUAGE = ObjC; }, + { + ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; + CLASS = SUUpdateAlert; + LANGUAGE = ObjC; + OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; + SUPERCLASS = NSWindowController; + }, + { + ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; + CLASS = SUUpdateAlertController; + LANGUAGE = ObjC; + OUTLETS = {releaseNotesView = id; }; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/info.nib new file mode 100644 index 000000000..2b25ad033 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/info.nib @@ -0,0 +1,16 @@ + + + + + IBDocumentLocation + 425 40 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..0e8d6a6ae40560056863267417ab47cac563c677 GIT binary patch literal 10700 zcma)i2YgfI_x^d`H)%85o6)SM$-OKE8Eq-Ef))@#p^TP2O4{C*K$?^!1!}FnpdfAq zaSx_|h#-Qf-~il;C_@B9L_x%XiW3p}oqKO62>idFfA1&B9q%~rInO!gIqz+GZ6usX z=H~7K0u&hNKo4n<4yI8pLh*`;;i+D@of!pB@xDy_MC*dhr083ywJO`^`4LlF)VH3OwZ@~`O3H#x5I0(n!JNO=ch7<57 z`~|1r49>Bd=!l+}h@Uhgtw?*4PkNGGxO-JVREJXUQsvk=5h{@*;VK zY$UIdt>gppAvs9CB!|fn@-6v+{7il&zmY%5KU7Ec)JijGCKYHFZBIMUT$)D<=+*RE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it.lproj/Sparkle.strings new file mode 100644 index 0000000000000000000000000000000000000000..7a5a38459fa813dc813331b9d9272159f1e953ce GIT binary patch literal 7170 zcmdU!-HsbY5QY0XPvNXUh6pVLE)gQDWiM7pAGK!8CSe}dx?YBrMmAv@ z#u^)I=A3Hmkyd&TPQu5!`XbE2>+rKi7y2G_#!htojo!?B96svI zu0s=Nf7uy7314gF2L&{J5~cC^CRCx;_p4~pT)(ic77CSYnQ0X3D~<7eqq~fH{y+#! zbZ;E7Sw|!rJv-5T5c)M@xz;lv3mQoD+AH0w!$V#Fq~{u~$@;hP_dr)up~y2{6*)6W zYP9Z1IDpFpS4U2*)mPyU{j%?g10usH3?;d~yH0az zjbWSTZDPFed#q8c{c5WPR=&`zCXTQ4S!piOg-oP_;Y6z;1DneGeJWYReIpIf0efd# zKfZ}N;lZ1z6&bP7uT`{np}Afg~@wH@vYRWe3XO&$Uj4vhOuPE(0 z=G{U%%r%$jG|si=pwU!XppEtTQ203t`_LGKPwt|b90NaRz^9Ql4vG4)EW43yGkp^w zMUU2pktHwV?tTlY084Ep6Zj2$*0+u0#QLwg7 z1FeK^AOR~bcQOy&LynQcw?jSKY@eQn-}I{Vw%ta=KE}h&b4JO3xIS6c#f9wieO7NH znpXz9E6If?2GRhIrH-H*2o5z))deLiMXDo~dTi9-8vJDTWgMmg4YXw?>cLdcnst$7 zTfq?h(GMwoSSE?sZ=6BDiinoskTYp)X5Hnx+%w?8L+bLw7UN#XPOJcJvm^HU+FtZ1 zxZ}|-pMyi-rPjl|>Pf|vUEwvEN_n(;2?OZLwdC3JZGSU8rjxunI!HVj6u zNj@(W%ef-M_hV^EoSSFvd(=66s+rFe>GWdmzQ_>zRWgf=KoXe@yU?}fuIWm5-6uIB zrec@Gj44msS~?=oid;6ol4HBNWfnlY=enPI>ayAOeoT!9Q4UHl2c4J^ZlvXSi<3KH zb1j^ZD#h{9CT7um6uk*MW;Vt@Sd;Zmo^T~^6cN-u#|FGh?7<1CADhPhr0cQF4zS27 zW*1RZiVNQF#hb|b#5~c-PJ@V~ZYN*ndcV>*HG&8~zW0XGB31O{8)sFnr&(kCgU2z*lAB@rUqzOOmh3NcyqUk6#Eu@0Hrv=TUc2`zskw zmew^zJp0G&k+XNQhtCB|>9zl)(ffLzkkKXoyNY-Jd@G&gQv>Kqz=YZc@1#>XpU1VO zvd^MI_~eEi?Ca=pPQ+5bXpOyFX*v}rpICZLaOIyC&QtQqkt;D#lFznw&q)7U6$TA# z#&(}uapJ>H9Q!xQQ%(SvveW0QyZ;8bGu_pgF074D+OIk4L5%yH+vNX}o + + + + IBDocumentLocation + 136 94 356 240 0 0 1024 746 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..d31704664714e4cf26e714745c86b2a4fa1dddc8 GIT binary patch literal 6450 zcmai233wD$wm!G2m#SW?s~Q5b*oI9dgzhXP5Ja*N2qaBNXCaUfn@%NZ>2!zg4k3i# z6$MvB5fxk^VG$7-$H%zgGUEt{Ix2#=i;BC92s(}kGN-CKArE}>QeV2Zd+#~tzyE*k zxi!Bf6pY2)?t?&p0Ty(i2Ll+vR6X1u4KxK8$|n=f$gvp{sPaz^YALX1_$8~ybGVf=WrCh zf$!ir{0Kk6zu`2tJp;cJJ+Tlgagu@LBG^U-k-=mb8BJ2im1Ht0AXCURQcPwNAF0B( zvq?3XM`Y4K7Lq7gMA}IwSw^lUE6FNy8@Zd@L)MY?EE zI{62AiyR<_$fx9U@&h@==otfJWH^Q=UdF_j84F`)L}ny2frOYGW+HsTT)|9Yu4E=N zxlA6D&lE6Im_lYMGmR-?ikX>AS;g>hYbf-IAc7TaUE{J;bL&XC6ElmU^t9`kuVA_h0EY_7!4^f22x=xxYaq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ANZhgjyjYv zPT^@`kMO4Oq42SAMEFcNDtsw?Eqp8dAp9ttbl4n84woa@G1}pFq&adN(;U+s#SX8d z)KTUrcT_s+91V_EN2g=0;{nGe$8N`7$5F>I#|cp{TEu?hU@={sD9#jTi9WGHtP-om zxniwYC;G*J7!ntXOT<;;YVi*7PVp}B9&x>RpZI|IkhoENM0{3!PJBW9tN4=mvba}# zMSN9!U3^FUO8iFrPCO?5ApR(x6n_?f5r36HGD(A_ky5%eSt^k#r7EdfnlA+;Sqe*c zN_R>3Nb9Bhqz9yjq>WOyv{~9JZIiZ3JEWb`Md=IaE9o2QJL#D8gY=_x zQu + + + + IBDocumentLocation + 531 94 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..00b088deefe357bbd8b8ecb196628b870b2e1913 GIT binary patch literal 10724 zcmai4349Y(w?FsZq-oNmohE7aCK(ntproZBf))x`K%p!x`%=?3Z3Agila#GiFQ|wM z`iZzB0%cJaK}1CX1y@8CWsyZhL?zFTf z6pY1vzTH580s|GOAqg~~8_~)iEvpJn2tfukxE+Q-8Pvi( z@E}ZwhhPRg43EI0@EE)RFT*^T4~yVcSP84(byy8=!3OvkK7n1Z8xF!Za2QU)PjCu; zg>&#H`~?>Y5EZNO z@)miQtRwG{56S0bEBTfjCP&E+Xg1BI z-Dz*yhYp|v=@2@aj-dfsK`ZG*T1W4roKBlPJ@hNOm+qrq(}VOodW8N&Ptl+0Y5E&IPk*O>(!c3HOwF{+ z0IOIkOJi1girJW5de1!UI(&LPyMeW1S*#n&XM@>YEKJstvn;}D*xfA3Vl2*T*#tI` zO=0zH4qM08vkmM$_CDLlHn9)bhwLLb&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ADtZy?G9}>H?NIorA~E}ao2zI2%TBFU*BV;fH5|aU{xW9 zcfYovRRwod#?2mb60Jxw!^qf^WM1#bHo9Z2+g4px2d>S!pv~U{Z(jHPlp=1uRi}Sq z^~SFzUXgF)CwMmG?#USHfZ3Kmi_5Z%$+WzHwyho{G1A{osj + + + + IBDocumentLocation + 188 142 356 240 0 0 1280 1002 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..b619eb4ab4539674743cea9361ae86faa9c1ca4f GIT binary patch literal 6380 zcmai233wD$wmzq-_qDnzECH1Uf*^#D6~ZEBBajf9Kxc(O=yX>|OQ$>ZLWnWr1qBh@ zb=((B08w<1LC0-ea79GKh~fgGqkb;qQ=f{s0q;~*C+3N7Uf1_^ZTH@D&VT>^+;gj` zEfkE!GcykX0tYlVFsKJg)j@|!xD%<0{#M* z0E0EK7A}R$U>)25x4^A%8{7$-VH?~F+u=TV5FUmn;h*pd?1Nr-6W)do;UoALd5W^K70)i;2U@p zkKw=ZM-DlTzU?>>xD2{}~ zG@p^EHlxKMUo0lawAPC}-ub~mjAl8u*yHv1T4nWmiN~94ro1_GNTrW9K!Y|wpKZb8 ztqGFhkX#!K2O{mUnl!&+PZ>~igJ`DQsiw4EbeD`kGdAQ8{ts}lG)f+}N1`jJPiZ6^ zpXUqvmdnw48c$vwr-n5i@4`qV&cf_!b`k4j5!S)3WfwC8yN;Py8w;^(n4W}pYZQdCqT+}@;_Hu~7iN+J7eE0`K~hSw&CICTD1zc1D25W4 zPWaAC#C-&)SB_VEy!5a2ECtWKFdODT8I;3ZsDOFQ%to+Wc0Q|MHEap%VrU=$OXOHQ7^WB_VFHk_uk^)RYCYZxUy~ea6wV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han5qi zc9uDtoHsjfb>8m0(|Nb^9%qkptMl*9hn;(zz0O0ZxN2ODu4dO?TvxcZxpul9cD?L6;5zL3z;)bpN_2^mI7l2Kri#PG zv&9kONO80{M$8a%#2Mmzae?R+tHoNeUR*3L5gSFH=odp`mw1V|M!Zy9CtfaIA#M_{ z60Z?&5$_Xsh!2W8#a-fV@e%P+@p17<@kOy$JR*J}{wi^jQyMCzO2efzX^b>h%9N_5 zTB%-IEG>~5C7kEKtg&!jJ;@1*ag l + + + + IBDocumentLocation + 425 40 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..aeb4628f8848d1b5d132b2d8fb75b92706c1905c GIT binary patch literal 10634 zcmaia2Ygdy_y04JHc6B8W{;-Hy$q36x`09jZ9$*{Wwh*3)AqKFq)AOuh82B4LDUxq zh=_wxKtM%6!3B!q!hteHKvYCUa3ik^(cgLQO$!45_uup~ybDr-x=X=g=WkWa= zPh@BBM;H-Akp^i|3Q9$WaqWV!s=ClrIX1Q(e8of2NO`+Nv|((!XypxZRU%#?q?eWr zmS@P-MahO%gy$~bgLFtgsiZhdZB`vj1R367!4#z-Bg#SDQ4e$#>Vt~VwP+NoLXD^i z-HzsA$wxMn5m9!)6O|POu=>+@&K21aP20Dd?X+4e5C~crO z(im-|)9GUR9DSa?KwqRU(XDhFeVM*O5_CI#mA*!I(AUw|^bPtZeT%+LchYz0yYxN! zKHWt>pnK?kdT>;`NMktsnP5dGWJc*oKo(?0He^Q*x2h4v2w-)1t8{ z&}Tq2k{B9{1Z(BkI2cc!o`8mWKGIXjL@WD*0a27iPU0T?495dWraQma5KCjQXua z{ZM~Y2znjbm(M|o2$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o3Z3Y?4EANggRf%9H|RtiZ|qAC*{{f{gW literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ko.lproj/Sparkle.strings new file mode 100644 index 0000000000000000000000000000000000000000..08538d327d37fcaf8b4876aa849da42eaf407b6e GIT binary patch literal 6910 zcmeHM+iuf95S{0Kg&Tni6$-aUgdi$?sE`V(gis&d*hwwYIEs^o{5){ZOqN|YQR;?l zf&{7@d+)PnX3xw{fBcl^ax96QONrkuesA!X%TOjLk7SIRTPY+%U51(~nd6u3ebf%| zm7`A^b;p?LKw9z`r57@go_s@XiFZ<~YoYuW4|~3pM=N{3s@1pT4Q4)wAnALRjlb8D zN`?28?r4ZF?ydp~DfTizEq9-yj_(;-S!?|hAdsUiQ*0)R

9bv=gE4isb}jh%C|I ziZ=HcZIv9N{1xM-n3MC*^*ceS0E!%AvvQpQR+?hoE@bBXC8T)=H0!9^&WPjgclUa+ z>b7?n-wF!of~Q~#jS_2~g26(o*Qy8VbB2d|OK>u1{S~xSqA%^^77uMBg(cBy+V^NC z&WgK2%B*kIz7u)!+lqO%h?H6WQ)P=L)}ET-SvIA_#d@qsKv3|4m4mqy3C+1UTEsI4g-GO z_PqPuJvFq7SvT47y18QQlKzn1kr5*JS$^D+OFLO=&k5Oold;(9iyJT885}w!Y<|dJJ9E8mjojrJ^JD{{@9)XR0hVFtYYU^)x_2Y9|Jht|c6oyH%Nsc3OYd#!wXs%aRNK`E z+QqpcLPXl`qW<>H_Ao@(&pkN9t3}?A+z@ zbuu>}5l7-PU~G0_*(;aNx=>5@c_nYt%}4A);wE-cmw4TXI1-=3mOXw}inG!u`53HZ zr8q0mKI-{R;_59aWbGz><4F0X7TKP{r`X*ilx|(0*it!LWd7G%h?l6|9!Hw>c{j^U zTZV{n=w_Z~Ih*71*~}=>r*o&wJ{2gt9F%3B!c}=A8N&Zt2A(&*o@$i&9~Yyo&Q>Lw wY3JC`WBiMIk7Grbu#76OVONf|8viqLq%oq!gYN$!?j9SS@JsOT{k>JvUjc}EOaK4? literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..3e65b1ff5 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib @@ -0,0 +1,12 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = {relaunchLater = id; relaunchNow = id; }; + CLASS = SUAutomaticUpdateAlert; + LANGUAGE = ObjC; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib new file mode 100644 index 000000000..5a7568096 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib @@ -0,0 +1,12 @@ + + + + + IBDocumentLocation + 188 142 356 240 0 0 1280 1002 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..b619eb4ab4539674743cea9361ae86faa9c1ca4f GIT binary patch literal 6380 zcmai233wD$wmzq-_qDnzECH1Uf*^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b|t%twF-h@5(W!aVUXYw9D-3W3r;~VNP;M&2o^0e`Yfqsh-CU(g`LZJIOGOElz4To#mA*BlLl#V&WK zHF6>D5^gqW=04%R=8khGxSzRSxs%*!9(kVE^G4pxTX{S0-2;4Zv7~In*LngVXo^%eRS{T=$J z^zZ4vGdK)m45bE-p~m1dgbZ;5GhAi3#&DhCdc%!|TMc&^b{L*8{L}EX;aS68!x6)$ zhA#~#jRvFLm}(qloM@bCEH;)KYm5eoyMn)?;DRAj~PEQer){I_?by( zGMG#zi^*!To1CWeOy#DfrVCAR(^}JIruC)`rj4d6O;?+4Fx_Ih)pWmUm+3Ln9@9&v zy{3Jp*GwOozBGMf`q6APOXd;gbn`Ux4D(ELfw{Q) z>nxXBHdr=VuC#2mykyyH*=N~rIbb9u@p`P}lQ7*nYq_<; z>akW@Tdfi6N^8s-x3*h5tew^yt*=<$w|;FsX%lU3TefYEt=v{&^VlkF3vE@ldfQ^# z5?iA!V7uG4-S)8UAGXJAdu;n`uiHMgeQi5o*V*m%q4tsX@%HoWGwlWTGJBv+TQq2mk3w@#BY)j8aGwsVAYq;saTz**!han5qi zc9uDtoHsjfb>8m0(|Nb^9%qkptMl*9hn;(zz0O0ZxN2ODu4dO?TvxcZxpul9cD?L6;5zL3z;)bpN_2^mI7l2Kri#PG zv&9kONO80{M$8a%#2Mmzae?R+tHoNeUR*3L5gSFH=odp`mw1V|M!Zy9CtfaIA#M_{ z60Z?&5$_Xsh!2W8#a-fV@e%P+@p17<@kOy$JR*J}{wi^jQyMCzO2efzX^b>h%9N_5 zTB%-IEG>~5C7kEKtg&!jJ;@1*ag l + + + + IBDocumentLocation + 425 40 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..26b2e8affa01d31ba0c939981a08e61da60cc167 GIT binary patch literal 10634 zcmaia349aP_W!x}CT)@??KEk#wM}MNM7Gk6wSu-FP=T_v>`M*pw2h=mO;Q#sdO<<- zJzPLUT%mw~ihzn6D2f~UL|H{d+!b*bd2WdQ&YejM0{{2#e3Hy^mvhhgo^!tEPNz49 zg0XmB-T@#$fq?;xkOawKnb;u^t*#HwRHG9*;8!dd30HQAM;a$|h)lmqt&Yd4q_pyi zVd@;UrX+5*&CTNBm zVF4_Jn_v;#47b3)U9Gi%N7>R{slXm1Hl1mE608&bZk>O-C8AHb5*(Cf_k?AA~H<1{L!y?i| zW|CR3kjy4?$Tg&yTubJX8^{CXL9&vpA}wS!Swq&6hsZjz9+r`Z$s^=ZvJoO=6M2F> zMV=$u$P46U@*naR`G|Z>J||z0ugJILNAfc{Nq!}NQUf(o8%?EYRHB(Qm-e7}G@lmH z%jgg~l#ZmM=vX?1PNgcXrFC>Ry_Rx1kKRCUqzmZ3=xy{)x{TgU@1+mWwe%snnQoz5 z>9h1X`aFG=zDD1s@6bJTFWpD?(|741`T;#kzof_LSM)gjf&NH;qCeB$=anJva855Yz7Ol1{P)!*2u1AQP#v} zv*qk5_B4BjJ_6-+wwt}p z_Ob))(AW;)rcmf3$qqJ1g*1>L9qizM49Em0xWEk_@In@3Lk{@B4>Bmw4%$Np=m-}< zC%70oLl@`@-Jm<)y}7uS0tK=C+80-`sf2p(FbUqTPm*@7sQD} z>iA%|CNe8Fu0yq$PYkGwfu1C;w5jx7c$HXzKAGzr`Ogw?a10H*%1!;&dM> zy#NZK2-mKyS4hPToK3A5JGK#>S1k#t(fB^-4Sk?5^qZhBMvYCl@5$lM*?k!olRsy-1VVk>#FK1V4GTnz(Z5EP?cM>NF) zsK^R6KDN99zxAGjp>iV(fuT?aSHLhB4kMr(M#3l<4P&5!o4KDC@dkbkpT{5PPx9^j z1^x>E4}XW39D;E$9wxv1s(H5fu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Mkphd(Mp9fRvE8MR3c0XYt40*MD2Tm8bp>=ff*U literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings new file mode 100644 index 0000000000000000000000000000000000000000..08538d327d37fcaf8b4876aa849da42eaf407b6e GIT binary patch literal 6910 zcmeHM+iuf95S{0Kg&Tni6$-aUgdi$?sE`V(gis&d*hwwYIEs^o{5){ZOqN|YQR;?l zf&{7@d+)PnX3xw{fBcl^ax96QONrkuesA!X%TOjLk7SIRTPY+%U51(~nd6u3ebf%| zm7`A^b;p?LKw9z`r57@go_s@XiFZ<~YoYuW4|~3pM=N{3s@1pT4Q4)wAnALRjlb8D zN`?28?r4ZF?ydp~DfTizEq9-yj_(;-S!?|hAdsUiQ*0)R

9bv=gE4isb}jh%C|I ziZ=HcZIv9N{1xM-n3MC*^*ceS0E!%AvvQpQR+?hoE@bBXC8T)=H0!9^&WPjgclUa+ z>b7?n-wF!of~Q~#jS_2~g26(o*Qy8VbB2d|OK>u1{S~xSqA%^^77uMBg(cBy+V^NC z&WgK2%B*kIz7u)!+lqO%h?H6WQ)P=L)}ET-SvIA_#d@qsKv3|4m4mqy3C+1UTEsI4g-GO z_PqPuJvFq7SvT47y18QQlKzn1kr5*JS$^D+OFLO=&k5Oold;(9iyJT885}w!Y<|dJJ9E8mjojrJ^JD{{@9)XR0hVFtYYU^)x_2Y9|Jht|c6oyH%Nsc3OYd#!wXs%aRNK`E z+QqpcLPXl`qW<>H_Ao@(&pkN9t3}?A+z@ zbuu>}5l7-PU~G0_*(;aNx=>5@c_nYt%}4A);wE-cmw4TXI1-=3mOXw}inG!u`53HZ zr8q0mKI-{R;_59aWbGz><4F0X7TKP{r`X*ilx|(0*it!LWd7G%h?l6|9!Hw>c{j^U zTZV{n=w_Z~Ih*71*~}=>r*o&wJ{2gt9F%3B!c}=A8N&Zt2A(&*o@$i&9~Yyo&Q>Lw wY3JC`WBiMIk7Grbu#76OVONf|8viqLq%oq!gYN$!?j9SS@JsOT{k>JvUjc}EOaK4? literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..3e65b1ff5 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/classes.nib @@ -0,0 +1,12 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = {relaunchLater = id; relaunchNow = id; }; + CLASS = SUAutomaticUpdateAlert; + LANGUAGE = ObjC; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/info.nib new file mode 100644 index 000000000..5a7568096 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/info.nib @@ -0,0 +1,12 @@ + + + + + IBDocumentLocation + 188 142 356 240 0 0 1280 1002 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..b619eb4ab4539674743cea9361ae86faa9c1ca4f GIT binary patch literal 6380 zcmai233wD$wmzq-_qDnzECH1Uf*^#D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t%twF-h@5(W!aVUXYw9D-3W3r;~VNP;M&2o^0e`Yfqsh-CU(g`LZJIOGOElz4To#mA*BlLl#V&WK zHF6>D5^gqW=04%R=8khGxSzRSxs%*!9(kVE^G4pxTX{S0-2;4Zv7~In*LngVXo^%eRS{T=$J z^zZ4vGdK)m45bE-p~m1dgbZ;5GhAi3#&DhCdc%!|TMc&^b{L*8{L}EX;aS68!x6)$ zhA#~#jRvFLm}(qloM@bCEH;)KYm5eoyMn)?;DRAj~PEQer){I_?by( zGMG#zi^*!To1CWeOy#DfrVCAR(^}JIruC)`rj4d6O;?+4Fx_Ih)pWmUm+3Ln9@9&v zy{3Jp*GwOozBGMf`q6APOXd;gbn`Ux4D(ELfw{Q) z>nxXBHdr=VuC#2mykyyH*=N~rIbb9u@p`P}lQ7*nYq_<; z>akW@Tdfi6N^8s-x3*h5tew^yt*=<$w|;FsX%lU3TefYEt=v{&^VlkF3vE@ldfQ^# z5?iA!V7uG4-S)8UAGXJAdu;n`uiHMgeQi5o*V*m%q4tsX@%HoWGwlWTGJBv+TQq2mk3w@#BY)j8aGwsVAYq;saTz**!han5qi zc9uDtoHsjfb>8m0(|Nb^9%qkptMl*9hn;(zz0O0ZxN2ODu4dO?TvxcZxpul9cD?L6;5zL3z;)bpN_2^mI7l2Kri#PG zv&9kONO80{M$8a%#2Mmzae?R+tHoNeUR*3L5gSFH=odp`mw1V|M!Zy9CtfaIA#M_{ z60Z?&5$_Xsh!2W8#a-fV@e%P+@p17<@kOy$JR*J}{wi^jQyMCzO2efzX^b>h%9N_5 zTB%-IEG>~5C7kEKtg&!jJ;@1*ag l + + + + IBDocumentLocation + 528 61 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..36947a7baefd002f3c19113796b1c9bffc5eb7d3 GIT binary patch literal 10634 zcmaia349Y(_x4?qHhZVpleWnWi^x{G0fh?MfToHNQ5c!`wlNJQN_v`$U%$>Q*x#vFToafxziuzD6 z7SGB$j4&dIA`Q}_B$SK{W7-6wm9@dia&&YX_=*K1;j%XINd4$Gk&0X7%6P0?NGT~D zC{L5C3KJEr2+v-A0O^o^LUB>1TCFM&4=}tj6;otHCX|i3qHgFq)C(1&8_@_Z-i}|vuj6;|d-yZ_IsOWNjlab|;M4e5d=~$X|0WuuC1zqFDMTO+l1aLd zERs#~$PJ`F89;`Rp=1OZPbLtVRFfJqmE2AknL+L%cavGU@xSxufK zo5*IemApi@k(bGvWH))A>?8Zh0dkNWA|H^WZ^t)pRlhDK;Tev#fv zqqKoerHknE^aT>9FVdIjHoBeepf96u=qq$5eU-jOchT4B8}v=Oo4!T&(6{M3^j-QM z-Amu62k2pXbVQqQLn!o_U`1wRK`BT;smO|K$c`MyiCoByJjjdEP&&#$KIBItl29wu z8nr=f(KV@fRc2FC0wmNWwsrejCgff*Pv zEknXBj2r}|=b&7a2Xj~E%cWu(Mkkbx7*P+#D;I|3X#61Rj`C3t)N`~t896pqy$M70 zCe#xZOoa9gv3R6Toyh3s8I=n{aZ#U0WhBrd`9ahhM!g>00IE-TiP&a!deUs#A`>Dlnx41$f0r}9h4lbD1v1ThHF|dHBxns&>-;!=3W|Uh*rvsund+a z5SGq-%y0}c;MiEqxZbeZPLlFhdd?km=vHD23N{+(9ls44M z(aAx13W%a;5yrYP%r#R5V@>WC3e?14+55<$5Y+A)4b+rPtA{0mT2(jSa4ToDOGtHd}6P%dPb$fL`|8^e`>`dC8Kze=0N#+7B&JZgATzZ~F8P(SOif^Z=TN9t15tgyy3Ka6OC`!uKO+ z5qcCBqqH&rW)8pcX(1Uj2$+b=;W*cPVK`U^6OO^#!ced#%mT8Wy_N>l*$2cs#L+1wE{YkT=Kwb^R)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d)tTYU zb#`@jclK}=ID0v-cNRMPI0rayat?BqID^hc=iSb^&iT%VolBgXoXi0i29nCoNLao1FXIy99?cLqn1KefqiSCelvU{rg zHuvrBJKW4Y(|xylmir#}z3%z$h3-Y}#qK8eYWEuVI`^yYx83{Q-?@MBSUiHq>alyA z9=E5xr=zE{r;Derr=Mql=O)h}PlYGqiF)Fm8J>BbhdhsYR(jTXc6;`C-toNW+3VTo zIpF!u>-S3D*50<>cHZ{hOmCJq$J^Z-_1@*3<-NyypLcz0L z+D~bx)6S%wP5UkFe7Z0F+Vl?TozgSYv(j_Y^U}Me4^JPHUYCAb`ti( zpZNWL$=}-F*5A(G-rv#R+26&V?a%dh^>_F8@E7=d`TO}N_{;qPf2Cjc*Z70}N&Y&2 z#DA+l=5O%d;a})qqg#WbvAJHggi0#B| zv8Pxd_7eMv{l#K&xHwmwCq5)D5EqJz#Kq#{;u3M0xI$bht`^sb>%^zU4dO;|v-q62 zReV8wN!%{JEbbIv6JHnK6yFl}OGe2orAVogO>#&s$s?sn8IoU;q}Ebfsh!kb>L_)V zx=7hluGCfPF7=QKq+ZhXQlZpGx>4#c6-xu9!O{?Em{cl_kVZ*kq;b*&say(3m69yg zNI_|mR3}BGTcw!PAl)I|Db0}XlkS)1N{>j3q{UK`vU>|>TmP6^!)z; D8Fwp~ literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/no.lproj/Sparkle.strings new file mode 100644 index 0000000000000000000000000000000000000000..2c989294dd85e83ffb44c00a75fdc2ee2e8b05eb GIT binary patch literal 7056 zcmdUz-HsbY5QY0XPcc~$0TBv+mk5Pbb|pg4CIS(ZORw#99K2)8W5?u8c>&%bS0v}_ zvqg{X(e4syj3Ub(Pybe(sybEO|GZ0Iru(T%XKAkAp?)v*8K*j}^u9<-wY*N#G*a70 zE$8Wte(9g6wbs9}#yn8leXVpS9i@AE`zp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QZPed6 z=(kqYTBTD-vatP_dySaxhUb8Eiz1d^>vG4Ua-o7Qb-Kl=Li~8?b zZ2!I~?$){UqMiT^?#HHjCj;O??8aSi*_9JVEp~PNz=@RG8{eqJ`0o3(D&Gt-x1Dji zZW-A>ZZJ5-vX@VmoMLa6Z`)Pke$MT>Q{tZANR<5Uy?nx@kGnn2TjQK*>_4um0v9S9 zq@QM72Ku*uJLVhiI^)ofN4=1QP0Oc$l4gBnj2E*0TDPU}zU$YxUyZ!mj{6gh^&QE6 Jc3zdr^F0HfqH6#E literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..3e65b1ff5 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/classes.nib @@ -0,0 +1,12 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = {relaunchLater = id; relaunchNow = id; }; + CLASS = SUAutomaticUpdateAlert; + LANGUAGE = ObjC; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/info.nib new file mode 100644 index 000000000..082030262 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/info.nib @@ -0,0 +1,12 @@ + + + + + IBDocumentLocation + 136 94 356 240 0 0 1024 746 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..6da4ab11da41b3eba731161f1225a4d005b8e755 GIT binary patch literal 6565 zcmai2349b)(y!{Cqv!6KZcY(LE|DWlE(nK64gvu(#7q(bB!tOKhYU<+!pwva!tq38 z5f2pkTx8Y7ghN&lj}Jc&Wc@r46|abRE3WRk>xsJRimPmO_atP&Z@-z}Ouv5p>bI3RGqg8__S0y9|W4+|zjjgb{fqIwwpB_r`z#jsSoxq4WEVU&C8TznrFcoBYK->y8utO%~!g!bhmq9*Ehq+J- zacF_Hunrhp3G3l1*Z^0<&9EJAg&lAQbiiG(5B>mm!vS~*9*4v50vvNB*B2=&emtz7~U>mN%wRk0N#Ov_}yaj)Y+woSs1OFQj;=}kDK8;85IeY<+;fweZ zzKUJ=I(~>B;a7N?Gjb;Mb7oH9ES#0IadytddAJeWByKV{1*6<$+*IyzZW@;lA8-X+ zAy>pr=Zd)*+)S>7o5RiJ$}5M(TB6YpL=QN?2`&)94IYp{hCa|2`aypf00ZFy7z7u> zV7Lgpa4`&lp)d@F!w9$pM#7~q3P!^i7z-IN4t$!A=IZ{c3PxKL^4b7@AU_mRlF3MY zBpOMz6~<#R@@G7ud$cebOeU42K6-&aFgFrTl9!VU{Q-ZlNzvN1{y=(|`sDm6RT+JP z8hwK9wMBoRDnbiKm3fg^INqA98WvL5Qzz8bAeyOn+ETg{-K8zi7wdP9{=F0|PLPJJ z@x(HcDUQcdrNLNmiISL4^C>G+G_cAaD38ZeEXHnNt5`dWvo>}kTg^=DCMK|E7G+zQ zk%8Ecab1LX7Gy&X8LkBS8uM_(QD)U=X@upxZ5~^$_hAa6|C6Vfa36KX9VN$hj zl#*PaH)15&0h3_zBATitNs_uj)!mlWiDF4XVLTKM_E^vbQ%Ql#VH&w09ZJca%&f0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Alert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..0071ac077 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/classes.nib @@ -0,0 +1,21 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + {CLASS = NSObject; LANGUAGE = ObjC; }, + { + ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; + CLASS = SUUpdateAlert; + LANGUAGE = ObjC; + OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; + SUPERCLASS = NSWindowController; + }, + { + ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; + CLASS = SUUpdateAlertController; + LANGUAGE = ObjC; + OUTLETS = {releaseNotesView = id; }; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/info.nib new file mode 100644 index 000000000..2b25ad033 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/info.nib @@ -0,0 +1,16 @@ + + + + + IBDocumentLocation + 425 40 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..dc2fbf34b20611c7a4057cbb3e394fb0d5f4cd58 GIT binary patch literal 10720 zcmai42Ygf2_doaE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parkle.framework/Versions/A/Resources/pl.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/pl.lproj/Sparkle.strings new file mode 100644 index 0000000000000000000000000000000000000000..32c75670bc6277f736e5fb06aaa2d9c37458ce56 GIT binary patch literal 7076 zcmdU!+izP%5XSdBAfEaM0-jwbFyI8y>0kbr^+{aIW5ozB{$PUA2GEn~~py&uXKW zHul?E?{4^B>po~f&Yx^IKHr8i%=Fzgea8BQZZly}N|TX#(Y;h3-wQpZ*T;9H|3J_B zhRob>tTcC^=iu{~AvxC^a0Lr?^tGpYHVY5ceyw?x)@1#6_Pe9jP#7}DS7o1(cB-^) zPcpOqMAG~yEbExMX5h%LrAFC)#eucTns%&!W}NF#?{2XpDVF-p&ZnBo?hAX~*RM{f ziuY>uG@?}N()##xX;|rkQNpD%Ik72L8|$;ulSkn@lMKBNwG%s|PfufJYWuFYRwzEz zlYAeSaIRTXNwPE?+P9UVWJF%{<3#Y3k?Am(4)N3%rVBoFW%A9WI|yM#S9)VXrR)vc z+WWxyo!zW8)||5y&O)mAMC)-TI$fRGWf)rzdr#GOrWR{&3ll&8bsBcU6Cs3!yRU(X zd%_oz@P5{ho(t(d(l_3QwSw<$A9$7{VkeUjbk3>!#}nDkdY{0))7%?eH9A?bYjBqx zW3yds)GT;=_6lNnlw$-|@SJ0RX*Pmi&h(15={&QLtYFI-c~7+LQZ{y}6Bx?=OFi>> zk8O{>TKGfH=1he<{=IK~iPPYOv0m`&sh$%bh!7yk3NwouaAm3I1Nn3(ys#0R^E`ZM zV||oc)Kon)?FPdQjCrsQG-DTfVF&bJFL>Pb059JSzSvPqr@i_<*J`j=sTG{#-9p)CGlq_Fj(F4`y+C+)G)zG*(N^Jp?}%tbim`$YVQ8881SMDm;o_^ruFjaH#wXTuex_mKdDZ3;` z^Q;U;z@K0kKUH!qW_T`}vZ>c*#dDplJl(RVZgHR%yTj^zNdymoaK3-3{xkLX-gw!y zStOo#Z5bBxuZyL5$3SD-^oS25iR_-of(`sf&hNOwfc+IZuBCG*{J3q5J(40HoE(`2 zNs~;DJoW;6JGb#YvhkjUaz1ZAn$uZGR`Nxnir**Do;VxND8=WgX*RSdzb(thLzl7= zu=bmR-zc2-OPv*H59I-sqUy)u6FKV67zu4`i!7j?kH%9tS)JCl@L%s0o~Mx;{C^N{ za*0Q#kt`(Lpg}q2EM!Pzu-uUoD<5z0YW!m%mM)7oD_m$H{$? zj4x#!o`GTe+}hg80}i!5c_-DDnBC?$gE6w?H3y#ORfCw9&eZSOE)@XJ1~+r)?HJh1 zTqE1ES3BsFx#V6LeKbd4Pacrx`J7ExKI&1#YZdF`#GvzeYmz^=%21QZ?~?nK*8fS-kc z-&o1x{XU+Lj`??cx3A+`R{UJ7>Gzae%7dG`!X^)GGcF|wqh)g+O?IqW8hNX?2k2p-h8$WLRH%PY6}uH0|N#;q_Mc6MTC zOuUGh-uikNwId=QnODL)##r`|eKP_dtn6EU;1%95Dc)Eeag9wCRHw)W z^LuHXU5R>VU*1_Us!I`Ppw~ndCaTcxbzVX8JYg#NxD7jJd$lU!kmqxyR&iw7v9Uj- z;Vi@bcS(D$c3Znq)qX6?Ap0bG$C_!pGv|zOZ2z2)kNW={dF + + + + IBDocumentLocation + 188 142 356 240 0 0 1280 1002 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..b619eb4ab4539674743cea9361ae86faa9c1ca4f GIT binary patch literal 6380 zcmai233wD$wmzq-_qDnzECH1Uf*^#D6~ZEBBajf9Kxc(O=yX>|OQ$>ZLWnWr1qBh@ zb=((B08w<1LC0-ea79GKh~fgGqkb;qQ=f{s0q;~*C+3N7Uf1_^ZTH@D&VT>^+;gj` zEfk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G4pxTX{S0-2;4Zv7~In*LngVXo^%eRS{T=$J z^zZ4vGdK)m45bE-p~m1dgbZ;5GhAi3#&DhCdc%!|TMc&^b{L*8{L}EX;aS68!x6)$ zhA#~#jRvFLm}(qloM@bCEH;)KYm5eoyMn)?;DRAj~PEQer){I_?by( zGMG#zi^*!To1CWeOy#DfrVCAR(^}JIruC)`rj4d6O;?+4Fx_Ih)pWmUm+3Ln9@9&v zy{3Jp*GwOozBGMf`q6APOXd;gbn`Ux4D(ELfw{Q) z>nxXBHdr=VuC#2mykyyH*=N~rIbb9u@p`P}lQ7*nYq_<; z>akW@Tdfi6N^8s-x3*h5tew^yt*=<$w|;FsX%lU3TefYEt=v{&^VlkF3vE@ldfQ^# z5?iA!V7uG4-S)8UAGXJAdu;n`uiHMgeQi5o*V*m%q4tsX@%HoWGwlWTGJBv+TQq2mk3w@#BY)j8aGwsVAYq;saTz**!han5qi zc9uDtoHsjfb>8m0(|Nb^9%qkptMl*9hn;(zz0O0ZxN2ODu4dO?TvxcZxpul9cD?L6;5zL3z;)bpN_2^mI7l2Kri#PG zv&9kONO80{M$8a%#2Mmzae?R+tHoNeUR*3L5gSFH=odp`mw1V|M!Zy9CtfaIA#M_{ z60Z?&5$_Xsh!2W8#a-fV@e%P+@p17<@kOy$JR*J}{wi^jQyMCzO2efzX^b>h%9N_5 zTB%-IEG>~5C7kEKtg&!jJ;@1*ag l + + + + IBDocumentLocation + 425 40 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..b2f8b50abe452bdb19173eb17458f1da6d65a777 GIT binary patch literal 10634 zcmaia2Ygdy_y2jGCux&3NpG{0w#mH=kyW~w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^REfpvlPfsKJj0-FL)2i^^Q68JuFS~Q4Gv4fZ=_7RK3 zzT!Y}kXR~?6c>qihMV7Yx=DFb zfz(~6b>l}cAjL#1KT2&r5eC5@5BNfV?=Ql%7>sw7#el|s@~ zsa}do*GX}yQMysONt!L)D%~b6lJ1d~Nz0{XX+7@w;t$2*S@~h_YkymQOHchDQUNQ7 literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings new file mode 100644 index 0000000000000000000000000000000000000000..7c8b8eae513b3a25a6d325791888542e21555681 GIT binary patch literal 6922 zcmeI1T~k|C6o&W3zUpPw8)vKsP^%rqK#R?k(lkLv85A669H*Bl2{dDxFeEAR=hf$3 zD<}Je&<-8h;Dy7SbF#nJe%JTnufM~$;Xx?Eei-sT4qbaXmg)Fy+WW(pT1{|s@LZipwMNk zWB7~>%?WF}j0>ed4bL%agsu?LiN5zKW23M{`*+q&*i-wT+wX!_4b0r^dcqAKbBuP@Unm7|zkny{*7Mpyx<9BhxzRlR8Z!12F>v1z~@T*3DgLc!} zkLWpw2lTBo`kdanT2l?G@>yry6hI+HjVW@DWNiVlCzoOdwcx)IpRmI&d=RqV*i4sVr@4rq7`NaVJgM2-@*WwR6t@sn|XK`(gpLOO+Lv!**h)F8lB1kq9_9rH#ufcFskyW=SXUMOx zO*UrCO10W}fD<^-Lm%4Aa2daEXLM*uKMv_1^6T6zSkwBF^*S{>HDInhhWi6~gf@?M z7@3!lRctff1*0PDn$HlQ$Kh+6>$BV}=)6?_mYY=tHY> z-AkTOeo^tG^l*rsNIq58ykj1=vZXsoVOZ%Q1^V^{B_PB9|FI6-s+4Vd? z{z+c5+bhp4x6xna-ijz^-X`87@_$NJpxiB&U){F2{Lo_N zGP12AB&0nHO?kJ*E46|6Dfy%FOy!XWZ_QSeYc`mn+~zS^O@rJ>IZn*DF63RF`EAF2=uWxvem0KmSY_v;MSmB?1!y+Gvj*kj!yZp9?iXKV zqj48ZT^_t%RaUTmH3?3Yq$JBLP?#zb^{JFd78)iu8x@&oQHxN{n@i^BslSR$BU*e z{M%eayMr(BoTG~Qz4#+iuqImp;)}JJgN&Fb`bybV?RUln{KjIX$TPHDym@!^%`4Mh z8B#Q=3XdxJ@8@q8t2kvnTa_evcA=rFQ;&98d-AGN^;G301EK)0z$@=NGXARWQ$}h| zvH#a%GUpw!>PGtCJS4#XWZN|3pw{FrSyazq9*+h<0F&Br_i8^qSMx-*Q<+OMf`cX(*7$ljV|zP(CbzGeAV6; p@O_k|G?eW;I{X5=Gzs@D4)mC>{BK8@t5&sn#jw1d8v4xE{sT;BJ#hd4 literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..3e65b1ff5 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/classes.nib @@ -0,0 +1,12 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = {relaunchLater = id; relaunchNow = id; }; + CLASS = SUAutomaticUpdateAlert; + LANGUAGE = ObjC; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/info.nib new file mode 100644 index 000000000..082030262 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/info.nib @@ -0,0 +1,12 @@ + + + + + IBDocumentLocation + 136 94 356 240 0 0 1024 746 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..7a79f4dc117e0ee56e5dd32a6c98abab06f7ad6c GIT binary patch literal 6574 zcma)A33wD$wm!G2m#SW?x(XtzEt@PMbT$$QTNVNV(!_KUwm|4~DoLA8cjzS{gy0ng zS3rGmg(?#DzIk)d_jv^Lyzpwcc~jIsf_3 zxuBh-Y*nI*N8uqBjD#yj#Um|?M@4F{R08o> zjo|e9<}2+=U4C+)3&_UZuK@@A@{)oyeOR48?x*CCunnwWgLKG-$uJG3Lq5!gg|HkV zkbre?6;QYu*26V$Eo^{WVF&DlJK!$pf_vdU_ygPzhv3if1Uw1H;3YT-r{GQa5I%yB z;lJT?_zM0B-@w1%Cmj1T{6dVxM(ji;gUDdGj|?G0$w)GRq>`Cr7AYdL$y~C4EF?a% z2;VLyOUMeMkb1I;L`f@YC!J&+xteSwo5*Hz8@ZkAAUnxjE#F!b5;Ta2KC0@qHI2ji+hJ=`@Odc~0-e;yWGnkpo zEGC~RU<#QcW;RpI%wgs-CCmb5AyZyCDx3&~-WOb82M0Jo01;dufeZs+Af&)0FbD?2 z5Eu%>U^rX~Znz9az(^PcqhSnO4r5^)jE4!33KJm>CV@wb(Lz05RsK*y!Ke-L`tkz- zB^C?T21CJkdtoFT#&|}edPECD{#Z7$o=eG7wiF^qC-nb+s_H!Irpa<4BrOnr0l zl&XwALA5?XuWrHXs|upxkg_Nku8XwAszwD=ed>g|8AvnrPE(~z;a$=LU0KQn_V+We zIEogwMWRh8QydA$OZ{PggA!eW^C_$2IIzm=E009tG)yQp(dyX%?MM7tkuY zoCe;2GPnZD!3Pzns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K~* zzHp{E$2!M5Q=OBXxy}M-k+alU;jDK?oa>y|IX64^IUjaD>U_-kg!3uqJI?o7@VW4<$cmykT$~_g ziv{8Wak02mtQJ>@E5%x|POKN3#AY!f-YDKG?h@}3_lpO_2gHZPXT>ApQSn9bCGi#U zxY#4UEq*BeQ~bdtxCXi0u3T54Yo#mb3cId$UGLiJ+Tl9ndc<|i^|I?#*K4j5u2Zfz zT&G=cyWVxZ@A{kTOV@W2FIgqKDk&xo$^)k)$%p+2KhSq2Kgp=le|UVD&H#qPQG2poUcOu2BX`RO + + + + IBDocumentLocation + 425 40 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..13cdb318f106dbe76d578781b2ddfdc1451489ae GIT binary patch literal 10776 zcmai434Bx4(w}oq(q?UMlQc`yG`R&t_HIC-g0>)nLRnh&rKIg`8%dLzq(G_F11h5L zx$irxfQsOPil8Vef`AIbLsS%3#9iDTBJ$0-H!TQ!-`D#~a+kBrnfcGmf6i@nQ#ce) z1&}=0(sWX1XL(xcO=R~w=Qs-#(#a4b4JLw|tj!<{%wU0h=nMVe0vH6Pa50RB8fb=AxE8L1 zg>XGAf*asQ_!ry<55ps{7?#5-coNpaI(Q1!!zOqg-he&u9()KN!6$G8zJYJyCpZd! zz<=R5oWwcS5*^VK6UipI?EI%L*xtcCHb0sM}8u|kYC9k4Xdca{Mf4(i z2^~&H(=l{Bokpiqh1St}I+tEaIh{|hq1V#u=)dSK^iFygy_Y^fAEqnlqjVj8ims;{ z=!^6v`Uc%f-=^=-cj<1rhrUPuL-*5<=t24wJxsr*N9d3AC;Bt}h5nZwW59IG0Bf0% znV5|pW_IQf&si3e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My`4jy!<@sNmpVr}%bjDKCP(WJm*U1 zI_C!G%g$Gv+npadKXx8+e&+nb`IYl)=QqypoIf~!a#>yJt_+vm<#0J&ZdZY;!ZqGC z(KXpM)ivE!rJb=OwcHrIC74%aT%S8lJ{=k~j0cPDojcUN~e zcbR*ryT!fGeXo1D`$_jE_g42d_gn6r?zi3Vy7##Ey7#&FyAQZObARbR>^|Z?>i*6B zhx?dE@_0M}&p=P9XNG5{r`l8Nsq-{=T0E_uHqX_bJ3V)M?)BX7dC>E;XR~LE=XK9+ z&nKQwJ>PhK@f^!?X1TMnva+*$S^g|JYhYG1>x!&+R&&;ztd^{+vUt{ltn0nt&G6d2 znO?V7_V)7j@#cF6dWU$2duMoCy=~sBz4N^byw`cJ_uk-L=6&6})w|96mUpN3ZST9@ zectb~b=m3JJ+n)*FU=mEU7bBE`^xOAvU&D`>}#|CmHkBabJ;IsznHx#`{nFcvbSWv zo_#3$aQ1PZ!DseaeUi`SbNG7sF7yrejq=U#&Gc3KYJGLSX5a0;JAHTi?)Ba8d(ii= zZ>8@=-$vg{zOBApzOQ}1<#=-j=1k3*o>P?*%&Eyya_VzJIXC7k%UPH6OwRh87jjhI?7>mTf&>Ywhf@(2Aje#Kw!5BX>L z8~suL75=!t*+0kM;$Psu-hZoqjeo8GDgQJ6_5SDm8~hvnFZnn7U-iG{f5ZQ#f4hH& zf3N>r|M&hM{XhGE@&D%k!+*?w+<(GUEX$qbE^=47o7_Y0 zCHIl@&f-z fcFygR+ch^Yw=eEM;~&M+Tl}#PwBPpc+@b#i95Y4) literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sk.lproj/Sparkle.strings new file mode 100644 index 0000000000000000000000000000000000000000..fd3ec529c3273ad57b390d7ea50a2ad710d86c76 GIT binary patch literal 6902 zcmds+OLH4V6op&cZ1@Xf7a<`?li)`I`WPth`q z?6RVY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+v=A+1iS-`{AqFTz=P%dcvNl{eEVEUlPyi%I}pRDo+jAJOk8QYfpJ4ShlG7 z-!^LAyIPU&L+YzVoxQSuQ8mgwzAX=?6-J(O!khTBnMIrI_GjDi_{FDheh%$Spr-t1 z`EC28C!St&+C+r`Dt=xZcP_DttIx_FW+X-O^LFZ!Bl9$8L-G0DCs~~C!O*giiQq&! zXGZPVQzl*fySdlVA|f_3Fr3>wgWv=VzjLO6diXgx6#{iG=N(j$r{THIgyM-3JJu8R z=@i6NIwG>t)9g>#m-%TCw!Y}Rs=agJM_R+I#_M0SDs-|P?mp7kWw;@ + + + + IBDocumentLocation + 188 142 356 240 0 0 1280 1002 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..b619eb4ab4539674743cea9361ae86faa9c1ca4f GIT binary patch literal 6380 zcmai233wD$wmzq-_qDnzECH1Uf*^#D6~ZEBBajf9Kxc(O=yX>|OQ$>ZLWnWr1qBh@ zb=((B08w<1LC0-ea79GKh~fgGqkb;qQ=f{s0q;~*C+3N7Uf1_^ZTH@D&VT>^+;gj` zEfkE!GcykX0tYlVFsKJg)j@|!xD%<0{#M* z0E0EK7A}R$U>)25x4^A%8{7$-VH?~F+u=TV5FUmn;h*pd?1Nr-6W)do;UoALd5W^K70)i;2U@p zkKw=ZM-DlTzU?>>xD2{}~ zG@p^EHlxKMUo0lawAPC}-ub~mjAl8u*yHv1T4nWmiN~94ro1_GNTrW9K!Y|wpKZb8 ztqGFhkX#!K2O{mUnl!&+PZ>~igJ`DQsiw4EbeD`kGdAQ8{ts}lG)f+}N1`jJPiZ6^ zpXUqvmdnw48c$vwr-n5i@4`qV&cf_!b`k4j5!S)3WfwC8y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z>akW@Tdfi6N^8s-x3*h5tew^yt*=<$w|;FsX%lU3TefYEt=v{&^VlkF3vE@ldfQ^# z5?iA!V7uG4-S)8UAGXJAdu;n`uiHMgeQi5o*V*m%q4tsX@%HoWGwlWTGJBv+TQq2mk3w@#BY)j8aGwsVAYq;saTz**!han5qi zc9uDtoHsjfb>8m0(|Nb^9%qkptMl*9hn;(zz0O0ZxN2ODu4dO?TvxcZxpul9cD?L6;5zL3z;)bpN_2^mI7l2Kri#PG zv&9kONO80{M$8a%#2Mmzae?R+tHoNeUR*3L5gSFH=odp`mw1V|M!Zy9CtfaIA#M_{ z60Z?&5$_Xsh!2W8#a-fV@e%P+@p17<@kOy$JR*J}{wi^jQyMCzO2efzX^b>h%9N_5 zTB%-IEG>~5C7kEKtg&!jJ;@1*ag l + + + + IBDocumentLocation + 425 40 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..c4116cc628a85c11df80a6e1f76713d8f7dbe673 GIT binary patch literal 10634 zcmaia2Yi!N_y4)~CT)@??bD>0ZIkC=h^*4Zte`CjRH2NPJ!)v5wvmw3BxP993kr_+ z#Q`GXgaQI80xB+06c-L;i>SC2af`ez)a(quzBkcBJuf(gu1%FFWfX0^dYkduv>gh3iup#XY9FSrQ$Ln&MeW1t3_pc!s} z1+Wlqgqz@IxCQvkyuC$X-6&~d8CjGAZ6roGK`EOqsdsjnuy|)(@&b98yhYw7ACphW7vxLwHTjPGM1CPB$ZzB?YM@4Hqv=w`Zw zK1-jY&(l}wYxEtuo9>}|={~xjzDp0$59ty56+KG7rpM@y^e6f={e}Kc|6srj%mf>m znOT^f9%T-eCEhb1Q}Ag!)}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!F(_DS|B z_G)|3eyyF`=i6_vFRIOaGOIUaDVaI`qqI39Owb-e0$-Lc1U$Z^bZ+;K81CCibeWOd2vnKdA5RMy0- zVAhs@D>)8@=@W;z{Cr_=59I=ec% zJ1=q$caCt5a#lLWIB#)2;N0YV&bib1uJd!}PtHGGsjf^{uB*t^)79J6*Hz-`@4DDk z>Kf=8>blG|%vIqExtd)!xE8qr2;B*VnFZT;I7<+@0K=-CfFq^X2;reZ74#-}Sx)z8ihF_?Gw{^sV%*@;&O?;(N}w$M?PON8iuBUwkKgzxn>~ zoy>M-_sZ^*-7ov1>;c)AWS3>sj!%08ZbBKz0u zQ#t;e3v;^Ubj!)h$cHM_J8XC-2bKjsQ;M%TmK3F9|0N&1e8GgK*vC* zK<7Z$K=(k8KtZ4=&@<3G&^J&L=pPsym=dTC1OqhzHBcW21*QjP1fqef0`Wjo;M%~_ zz_P&dz`cR{0}lpP237^u1l9)D2ObG*2s|BlHLyGIL*S%rlc`9XQ5yh>gpua(!!kH{P3jq+ys33-eBwEV2RReoOH zF25wdEWawhF7Hv&6q}NvWGW8DskjxdlC9(_0Yy>TD;Hg$RHa@CDbtl1N>sT@ ui7QRYwaRtMJmnVUU&i+;#4l82- literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings new file mode 100644 index 0000000000000000000000000000000000000000..9d3a515bc5033a73cfa7831bdd08b6be42a04079 GIT binary patch literal 6912 zcmeI1T~8B16o%)TU$GF4N(_Eo8lwcbAP_JnYPc-jwp2>nbhlLgFa8bnedctS-O^wU zOzVYd+TER3Xj1&eb~5HLJC4==q(#^nB$W)p|Fy7QJ8B+Be)= z&AgUC(hq($e$QOP6}p~!jrzJnyFw^5q)Sh&Xx~s9*NNWJYW*`I(9*lyV^ex0#~Rzx zdl35Wu`D$PWYLcmZSIlY6>eS6Uo~#5Ihp^;-)DO23Pr})tgO@1N@LC2l+4UOkTmaw zW*t@23>=rQ-J9vE53ON(FX+k^?1Hf@3fAm`-qfmR-VWGvqA$8-@>aaRkd+4Ni+^0| zi*GdKNqEiHA1rgN@tOOk6>Y}8?lSoRYvUta@yt?pc!Bv{$6c$vqZPXPZRky15=OD| zvJf*boTq>0p5Ayfdki^k2RxI6i+O$SeY`Ji2bzKX(e>yr=KF@Q;W{5bWXwJ8NQgZi zJM&?a@yir-?1FW$Zmtiw;}47o7GoWDV@l+~0}r&_j~_;4hhClwNnGd?{LxsS4RQo`8SDvl5eOqLzk@W8C18a6PBfJmugAp?n zJ{rJ)4ZUv(qs;C59$2w-&wXF(W$Xv4g;q1)zwqyKjb{bsDikR6UiLenFBFLjHs|TED94DQ`GaU$Ua1ekJ`&*R+dY#{~tI_6Cr#)g*nJljE_)NX&v*?iPRuKYe zJA;xLbBZYyWrwxOz@g;k9cB7RaI5hPy)>Y!V%6C!`KLzM*&ydCfl@-t5P z^}eP@x=j8^R*crSr!>BJ><%g`*;AU8K3AA7b9>r-c1o$@PM_O+Scox=^;1h0Jen$T z#D7*QV-D++Mxwjx(N@E@x)PZy^&#s0e;1o>*MLIhn>rNdJJ6tJ)%Cl;Dpyvss;Nz8}y=AEyg{;mbw*NN9wKy_c-wXTA{-2;KK@M+G^**tan%A+I(X=A|QuQj_ z5B;7`^$iuq5UGP^_+HPm05KVkHBGKOO7@QllBTQro=D!J;*sGwjrX01ea5Olk~vz0 e4F7?IGi-Iw?y9d + + + + IBDocumentLocation + 188 142 356 240 0 0 1280 1002 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..b619eb4ab4539674743cea9361ae86faa9c1ca4f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`auY5$lB&D2BLU1 z^*_#SP z))j)3jBIorUl zU>n&cb|t%twF-h@5(W!aVUXYw9D-3W3r;~VNP;M&2o^0e`Yfqsh-CU(g`LZJIOGOElz4To#mA*BlLl#V&WK zHF6>D5^gqW=04%R=8khGxSzRSxs%*!9(kVE^G4pxTX{S0-2;4Zv7~In*LngVXo^%eRS{T=$J z^zZ4vGdK)m45bE-p~m1dgbZ;5GhAi3#&DhCdc%!|TMc&^b{L*8{L}EX;aS68!x6)$ zhA#~#jRvFLm}(qloM@bCEH;)KYm5eoyMn)?;DRAj~PEQer){I_?by( zGMG#zi^*!To1CWeOy#DfrVCAR(^}JIruC)`rj4d6O;?+4Fx_Ih)pWmUm+3Ln9@9&v zy{3Jp*GwOozBGMf`q6APOXd;gbn`Ux4D(ELfw{Q) z>nxXBHdr=VuC#2mykyyH*=N~rIbb9u@p`P}lQ7*nYq_<; z>akW@Tdfi6N^8s-x3*h5tew^yt*=<$w|;FsX%lU3TefYEt=v{&^VlkF3vE@ldfQ^# z5?iA!V7uG4-S)8UAGXJAdu;n`uiHMgeQi5o*V*m%q4tsX@%HoWGwlWTGJBv+TQq2mk3w@#BY)j8aGwsVAYq;saTz**!han5qi zc9uDtoHsjfb>8m0(|Nb^9%qkptMl*9hn;(zz0O0ZxN2ODu4dO?TvxcZxpul9cD?L6;5zL3z;)bpN_2^mI7l2Kri#PG zv&9kONO80{M$8a%#2Mmzae?R+tHoNeUR*3L5gSFH=odp`mw1V|M!Zy9CtfaIA#M_{ z60Z?&5$_Xsh!2W8#a-fV@e%P+@p17<@kOy$JR*J}{wi^jQyMCzO2efzX^b>h%9N_5 zTB%-IEG>~5C7kEKtg&!jJ;@1*ag l + + + + IBDocumentLocation + 425 40 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..2b1c6e30ed9cf1910d5be091ea41349cdbcd1db2 GIT binary patch literal 10691 zcmai434Bw<);}|ov`w0{w@I6=X>x<8s8~uVP(hX!WD#1HmQvQ5wzq8{BsEEaTEPJo zalr*tT#+3GL`6{$5dl#Vc|0}|S=|s9Q1L19Q2EZ>n-&DV@5}w&w|%4EGK6#5TL+72YN_=L@^LIfK7{>H3%+`uk`(u7iUP&W*NCp$MhmOz*Zia490Jp#}sDcJ) zf_vazm;v{}Ot>E&fCu4em(kr&|!vYf0SE6K|cCa;j! z$(!VDvYxz4wvg@Q6LORsBVUtm$O-Zz`I-Dm{zJ}?KdFxDshOtGR4UO7noZl$9NM1d z(Vny~?MDaE!E_iMO~+7$*3eoynchh`oks7b_t1OkgY*&lIDLXXMW3bf=n}e=uBNZk zx9EEM4xaDPEp$8mgzlyL=%;i){fr)cmT8A2f!K0D|%#Z@9AVC^fzzXS*0XDFM1DxQ3OmIUMc)$xX_@EVB1+C#~ zxCX9;HgFwW4>v$txDm3U9ptD`9Hhar%pYt}5S-59l7gx#B^nJ>27-ZDW3O;1gs=@q zG~o6M`lC@Ls+AsDTrwz79YrulM-`V8`zI*s^_b$4cro$j@+L(ct%1>61I>L)#U*6{ z>^P_l4}_}2lcHs5*dN*DU)MZu&lUbXgD0>`=$}XzvkcYPx)8V2;;|j!Zf1eNqj%wGmTKL=OB&a zbT?`}7dk*54qhFw5R2QV>)kvE9%a^5G`vQm&0giH_7RLRfqubb+p8 zv3^4|7M`Guq`Y}Z6_V7yuvfS$>~9f$H+08ddq7XrecV+<=kr9Zk3#6R2zo(p=!%Lh zYKZw!lO;-QSaAt{Yc=~o>C4a;`ayrV6$ZdSD1u@b1cPA+422SI;9j1`C-6J?H2wyE zlfTQ~;~(%Hd>1d+4`nbM%3%bILO@|PK?p+Ha(u#65?MG>mFAZ2miE7WOf%FSyl z=iZ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qO%h?H6WQ)P=L)}ET-SvIA_#d@qsKv3|4m4mqy3C+1UTEsI4g-GO z_PqPuJvFq7SvT47y18QQlKzn1kr5*JS$^D+OFLO=&k5Oold;(9iyJT885}w!Y<|dJJ9E8mjojrJ^JD{{@9)XR0hVFtYYU^)x_2Y9|Jht|c6oyH%Nsc3OYd#!wXs%aRNK`E z+QqpcLPXl`qW<>H_Ao@(&pkN9t3}?A+z@ zbuu>}5l7-PU~G0_*(;aNx=>5@c_nYt%}4A);wE-cmw4TXI1-=3mOXw}inG!u`53HZ zr8q0mKI-{R;_59aWbGz><4F0X7TKP{r`X*ilx|(0*it!LWd7G%h?l6|9!Hw>c{j^U zTZV{n=w_Z~Ih*71*~}=>r*o&wJ{2gt9F%3B!c}=A8N&Zt2A(&*o@$i&9~Yyo&Q>Lw wY3JC`WBiMIk7Grbu#76OVONf|8viqLq%oq!gYN$!?j9SS@JsOT{k>JvUjc}EOaK4? literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..3e65b1ff5 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/classes.nib @@ -0,0 +1,12 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = {relaunchLater = id; relaunchNow = id; }; + CLASS = SUAutomaticUpdateAlert; + LANGUAGE = ObjC; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/info.nib new file mode 100644 index 000000000..082030262 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/info.nib @@ -0,0 +1,12 @@ + + + + + IBDocumentLocation + 136 94 356 240 0 0 1024 746 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..6e20460839b0b2817dc5902712091986b034dac0 GIT binary patch literal 6568 zcmai2349b)(y!M&NB5lF)6FU1$e|)3%;X^9lpG`k$Pkz$TnTZQG|9+hCd^C-F+`py zcp{3fqOvX~00$OnGAnP2*>_p0h& z|EgF07B@#D$&}A`1PE}zg9*%F0V~+%4-X~6jgjSAV%~5(BqQ-y_5E({BkqmMrnL>)mR5FdsB(q46 z%*D6!$b7PhXk-alMiOK>X(JuvT5=s(OV*Lw$vxy=vXR_J9wh%oc9UnwbL17WkGxLa zAP2~s>t{tVn$lqnunA2nIq;ntojy2&To@ zn+vC8V~h!Ej0w7ROMzf@1QkcMxsh0Xyfs-pJk0d52@NxlX6#N^WsJhRvubbUigwkor;X5F(xh*^q;d>&`NhsEP7*Qr}=zK}#y$6iP+HRn5q7tstr;QimW9 z@?ji|pJzCwB^MYMF&x>BMpbxn6vG6>x4b14LO_FBswxn~qcO4s0^6Vzra>7@hZ!&v%Be^%ra5#H zok^={Ee#)o3YZOZAPAMHsS12B7v{lySO5#51_3PAlBq}xeT>HtK*YWxlxmzC2+j;G z)}nRNAOtnCxDdk_i8b_asM@F$I3WE7eGJB15@C&UbTGY0;^-hcgxZe7BB+C_AOwq1 zc^K+JgC+QDga}*>OCbtP5YgGoA~#1%HpgT2S^{GcY-!dK%OhGVnxdnHx~9e$0`;hC zc}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(HO8i>< z(PpyswGFdn*v8qW+UD3aTikY=?RMK8whgwsZTHwV+IHK1XM5K6ob7qr9@|T{K-D@9a_u0$r3+*fH*VtFuuf@u++J1xmA$ym7i+!8@5&I7N zPWvwVKKmJm+cDJPca%6P9ZMW59oIUjW3}T3$6Citj&+XpjyoN9IW{_p)8_2!?C%`t z9Ole$`kkfD3g<#+qjR})mGc(oUCvF;UCzgyPdcA-zU+M8`I$>{jd4wJ6}pODC9Y{M z&DG$FxR$!2u9&OYb+c=a>m}FAu2)=pUHe@7U58yqUB_G}+;;aM_Yk+&Jp`z zljWJ@S>OqK8a?fv)t*~D8$8=RPkLVUyykh`^M>b5&q2@Ip2MD_o@1Wlo{v0#^PEz6 z#jIErQL!sd#jVJSqV!SvDPF~|WGlH!o-$6EpiEM(R0@b{a zO-fv8Q`RaQl}=@s^0e|t<$&_0a!`3!Ij+2?e4>h~U3IE%RaOL_)zI#yk%)~a=CNDZr++Mq_%rD~HJSC^?twMA`J+thZoLtUj_r(UnF zQEyalR&Q0;sq57{)w|SRsrRb)sSl{XR=29#)a~k%>Qm}&b&vX@`UiEtdJx-H{NvcB O7duxO=kBBW!T$ovNR9ab literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..0071ac077 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/classes.nib @@ -0,0 +1,21 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + {CLASS = NSObject; LANGUAGE = ObjC; }, + { + ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; + CLASS = SUUpdateAlert; + LANGUAGE = ObjC; + OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; + SUPERCLASS = NSWindowController; + }, + { + ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; + CLASS = SUUpdateAlertController; + LANGUAGE = ObjC; + OUTLETS = {releaseNotesView = id; }; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/info.nib new file mode 100644 index 000000000..2b25ad033 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/info.nib @@ -0,0 +1,16 @@ + + + + + IBDocumentLocation + 425 40 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..4f31fd7587e850f6ce885835e89ceb52dc46cd3f GIT binary patch literal 10773 zcmb7q34BvU*Z!HAq)pPKy-m_AZMIt$5uvnYr-HQX3T0{8my))(G>|4WNm;DufQr1n zuPg2=`=X$Ts3<6kh^U}~Ad7+%*aVB0ql*5TL+72YN_>R4|Qg8H`ochNdgAF)i^c9*RcFTPC9QV_HTlrz%y6c!iWv zT6Uc>OQ|kSHnaknw{RC2z&LSGNuJiMI+zG@@?0iikOpQbfX>hbu7;ja4EGx!{i!*}pK zoP<;G8~hGu;2e(e9MKUyF%b{RC9O#wDI~o}3Av68Cd0`HG78Ve;irOBk{H}h;v@m{ zNduWqX23i$lguJFkVbMNnN4mXPm-s|Lb8Y~CQHatvWzSzE67TCfILl}A*;z6h?3{X z3*;s8D%nV0CvTDW$qw>4`GOoF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}cH=PD##qVz*4B5#zk=wJWazGB@`?{vU=^MK}(nMbzxllQx`R z>u;(4#4OQ0E?VzCm%dnI!832xt@8>`9LE^H@0znphNV?`Qf-sXy literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..3e65b1ff5 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/classes.nib @@ -0,0 +1,12 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = {relaunchLater = id; relaunchNow = id; }; + CLASS = SUAutomaticUpdateAlert; + LANGUAGE = ObjC; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/info.nib new file mode 100644 index 000000000..082030262 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/info.nib @@ -0,0 +1,12 @@ + + + + + IBDocumentLocation + 136 94 356 240 0 0 1024 746 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..f165c1a8092076ef5e6b3be3b675545aad2e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?gqY zbm#S`=k+>$Z@pVTSU*&Mg?@xSSwC4nRiCBL(dX)?>kIUS`g;BC`e*eY>3=jh48sh$ z29Kf4;4=gbF#|JfG;A_#Hf%9$Gi*29Y1m_U%J7WgIl~Kv1BPRUFAXOR=ZprU-Pq4K z*f`2K-k5DHFqRp^#wOz$C* zt~3>x7MQL!#Y`(qD^06SYfbA-*PCuIZ8hC$+HShv^swnk(~G88O$ST|O>de$Go3Vj zZ#r$ZnkDlfbAow-d7^o;d8#?foMWD0o@18H4dzyJo4MV*+PuNM!`xxsY2IzV*Zj2k zfcXvco96e;C(Qpc|86l_M9V-+vL(YZ$1>MaX<1-dXsNc;Se9F^v#heLv8=VMw_I=8 zWqH+dz;e)X$nuuuu;qy5bIVtjla_BS-&_7|?QI=y&9UZMr&|lGg;tNX*xFzXTNhiS z)|j=$+G=gHZnM5_{n+}Q^_)$#xos)7>9zt}q0M6}w#~Mc*eY!EZ1ZhZwi;WTZKdr- z+ZNk4+a0#uwmr5NZ3k^fZJ*k{ww~uWnc*gOH5)=3f~Do2tNv^gww)#m%-KB zb(t&8HOZCZs&v)4R=PI2wzzh=9&kPGdd79sb>tC*)TtBEfWCTX*@Rk}&KMcOXiCfy<3CEYD` zO1q?cr2C{j(u2}o>0#+n>2c`^>95k$(zDX@(u>l|(ks$y(qZWx>8Nx}Ixd}%zLLI{ azL8EzXQ|DkKTi29q?~7I=dRygrvCtr&v?85 literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/classes.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/classes.nib new file mode 100644 index 000000000..0071ac077 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/classes.nib @@ -0,0 +1,21 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + {CLASS = NSObject; LANGUAGE = ObjC; }, + { + ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; + CLASS = SUUpdateAlert; + LANGUAGE = ObjC; + OUTLETS = {description = NSTextField; releaseNotesView = WebView; }; + SUPERCLASS = NSWindowController; + }, + { + ACTIONS = {installUpdate = id; remindMeLater = id; skipThisVersion = id; }; + CLASS = SUUpdateAlertController; + LANGUAGE = ObjC; + OUTLETS = {releaseNotesView = id; }; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/info.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/info.nib new file mode 100644 index 000000000..2b25ad033 --- /dev/null +++ b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/info.nib @@ -0,0 +1,16 @@ + + + + + IBDocumentLocation + 425 40 356 240 0 0 1280 832 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..0d56dd12cae32325b6dd750255c05f48f7a7e3db GIT binary patch literal 10489 zcma)C349aP)<5^&q}kJHlBQYOWDo>dZA;k-A}wXLl%-`~YT8cQKxk@`f(YnE5I1nc zeL-jeS!5R!p8^jN*;F=3?zd{5$Q)p;60YyNvh#Nau+0ZLqtoeql+zjXLHa0tf<8%~rq9tA=|WmdU#BbSTDpO5 zq?_o!={CBX?xB0>hx8-*F+D&J(j)XU`VBonPttGc8G4rfNPnik(ev~#222AhnU*Cm zD?PyynIN|_CriV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H|Wmd}El*d!Hr|eHTk@9oOMVHQ%&kPDc9pp%xE^rLaV>MLaIJK$cCB@-cWrm=aP4&Mc75sk z+I7P9t?PT&Ww+67aVNS{-L2eh+#THA-FfbSyVNbYE8Lat@$QiO0r%VPcifxZTix5- z+ugg|d)yzo54eAD|LOkA{kMmBj2@@QEr^-|9iFoFC zR(e)@)_T@^HhA9jZ1QaOeB$}h^M^Ot+sfPC+u3`Ex5z7bE4)GP1n)#|%=?V@RqsM? zop-VKHSaR-3hzqqF7H0?N$)xDZ{FX%7rmFfms6dox1?sIc1-P)+AsBv)B&jjQ^%!F zO`V>4U+Rq1nW+z?KA8GMYF+B0)Fr8_Q#YpWPd%QdNo$&xm)1M2Z(9Gf{Ir6!L1{zM zqG@x|UPya6ZGPIqw7Rs#Y1`7ar|n4FnYKG^Z`wy`-=|&l8GUA-)hGCDKA*3JFVEN8 z*VotIm+vd^4e|}~75RqwM)*eg#`wnh?(~)TCitp-Q+&_*p7*`zd)YVNx4>8HTjX2f zTk2cxd)>Fnx5l^5_lECX-yz>&-x1$Y-!b2D-&ekGd?$V1`A+#x`_B5#`^|ot&n;yUpSaijQ_ z__p|txLMpPZWFhQJH(yhZgH>pk+@GhARZDAi$}zx;xX~K_?7sLcvAdMJSCnM&x+^8 o-^D+gkS4T=rirDAwTaNg-Nc85S^P&aA(sEK!|HGS-zIJU2VqzR(EtDd literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/Sparkle.strings new file mode 100644 index 0000000000000000000000000000000000000000..9f7b3901ee37b2fa9bd7afab6a45eb921282b350 GIT binary patch literal 5536 zcmd5=&ubiI82;>`LehxWdg&xsyOt)KC=^7*mRL-v&Srm+nAcqynvRB(Ns@6GJYc0&^h6U#C?GvDv;`JVTA z-*^7$sGvHj3}vbk{xkSr#LrSiRmJ;~Dx;*X@+yn6EK1U98UL)$p|pr63vI?wb`m2E zs1bD>Z{w<cJgbKhje^q8`V{13s+uj9wf6=T%Boa8K(U z74gK~Re(YYdnurlyHBBv_XcWND(wv*V4*Inv8ie#Yv^mCo(R39v8xh2dB*vT1GAj#*QkBgxI=Z!qc+0*|WOL zwb!z?%p%%SA4UDBe<@rXp`taBI*>xW1-muWv{p!-NL8KEZKaiHKp7IWWCz*u1GRqnwb<&7SN>l8@#Rme zhhxv>tY|25)kh0Di(QKS_glW>YslQa==rd#3u5{8CVFah?orHpeA9!y?nX4RU)grq zLFT*AN3=-u&5oaYpz2bC87q*5C0L28-&CEfR&&QHdOfRaX=7+PqZOOJSnQLQM$YGO zu^)XRdq~vL^?LMf8(*yqnxo;rD(x#rTerp!wfE3 zBPvmd8mu(Cy(5V^#D=L5jsooim&|9@>FCp|pND=*maMJ25Ss=pmA;y%Es+xSj4JCO z*puWYIbB09@6kdsejyVNY+PS^#vJug`zEm_M&k6gT`h|Ku(;-%$C%WyN=C;K zj<@$>M!X~rcJm9?dol$2a*6dX{}S1p{~~wO_lWH&tf>K{oH*36ZSTs*VAGy>h3Dr) zle&g={$wBLbcS}j?(DKQst9rOd2Q1`O-@qsO(z45XwJErV3&RLgfE_s-RIf0D-#ahDlh^}A)>oKuOfiM6kh z--Vvoqb^MC9^ii}AIsPmbB86HV-#3mf_i7W;aX zn%RHrD*EbO#sfS17Rei#HAcbDcz|B$jT_Mm<|w^%`n-4|A0zbyP_MYWu!BBYYXbUH iQzvw6V&G{>BP;QnoQ%gtLP`0qGCN@h + + + + IBDocumentLocation + 188 142 356 240 0 0 1280 1002 + IBFramework Version + 443.0 + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000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6sTY(+f$V(AK-pEQ_5P50<4x+OO(`auY5$lB&D2BLU1 z^*_#SP z))j)3jBIorUl zU>n&cb|t%twF-h@5(W!aVUXYw9D-3W3r;~VNP;M&2o^0e`Yfqsh-CU(g`LZJIOGOElz4To#mA*BlLl#V&WK zHF6>D5^gqW=04%R=8khGxSzRSxs%*!9(kVE^G4pxTX{S0-2;4Zv7~In*LngVXo^%eRS{T=$J z^zZ4vGdK)m45bE-p~m1dgbZ;5GhAi3#&DhCdc%!|TMc&^b{L*8{L}EX;aS68!x6)$ zhA#~#jRvFLm}(qloM@bCEH;)KYm5eoyMn)?;DRAj~PEQer){I_?by( zGMG#zi^*!To1CWeOy#DfrVCAR(^}JIruC)`rj4d6O;?+4Fx_Ih)pWmUm+3Ln9@9&v zy{3Jp*GwOozBGMf`q6APOXd;gbn`Ux4D(ELfw{Q) z>nxXBHdr=VuC#2mykyyH*=N~rIbb9u@p`P}lQ7*nYq_<; z>akW@Tdfi6N^8s-x3*h5tew^yt*=<$w|;FsX%lU3TefYEt=v{&^VlkF3vE@ldfQ^# z5?iA!V7uG4-S)8UAGXJAdu;n`uiHMgeQi5o*V*m%q4tsX@%HoWGwlWTGJBv+TQq2mk3w@#BY)j8aGwsVAYq;saTz**!han5qi zc9uDtoHsjfb>8m0(|Nb^9%qkptMl*9hn;(zz0O0ZxN2ODu4dO?TvxcZxpul9cD?L6;5zL3z;)bpN_2^mI7l2Kri#PG zv&9kONO80{M$8a%#2Mmzae?R+tHoNeUR*3L5gSFH=odp`mw1V|M!Zy9CtfaIA#M_{ z60Z?&5$_Xsh!2W8#a-fV@e%P+@p17<@kOy$JR*J}{wi^jQyMCzO2efzX^b>h%9N_5 zTB%-IEG>~5C7kEKtg&!jJ;@1*ag l + + + + IBDocumentLocation + 62 61 356 240 0 0 1280 832 + IBFramework Version + 443.0 + IBOpenObjects + + 5 + + IBSystem Version + 8I127 + + diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/keyedobjects.nib b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..9be94287a6b35dcddd1dda04137e023c11270056 GIT binary patch literal 10742 zcmai42VhfG_doaEbY#D@Nt3iq@*YD#ptPlI#I}@Cpk=g_O$qHQ4Wvy?QdTWoaG)Yi zRNRcBC<0DI6i`vY@hPJMA}SyX?ujA}{^z}y76ks^*Yq`S+;Q$XzjMy-p4aJh!9XOM znb`~kC@|1L9K=Hc7$&syhbyWBv*qykcK9a}2-TLhi-zjPw+l_5DOW@z<$|@iWVk#} zuFQ)yOagM_%Ds>X`YDC^8CtVSf7H*(CL1w=5loN;J)kG_hpQkD20g7i6imEOzgx#Jj6@dl6H8nJ-LE(CId(T8A?Wy5>ieoNRZT!Fo}>kc-DXi zC)bg?;U==2+ygh0d&zxd1uP-=lLyFy1aBIR#KS;X$`%GE~YoqTj)}{jNV3Xr}xl%>4Wqk`Y2sZ*V3ox2Kpl1 zLSLcV=&N)W-A(tuVlPn+q7^Z@;c9;V0W7xXK5hJH=Ip+C}}=x_9Q28=Mu7}GNY zGct4R+M!;jF_B5E6SlaLbyn|Wv3yp*#(J>ue``gT2Y#V!POG_BMNmz02N%lk7k2ef9y{Ll>~UY#-atn%Rf!06WMIv5(jh z_8B`qwq0#~F!-5}1ZJ>+6$G$B5+s8i9FPJ|aDf|AAq~>O177ff2okh`w$KjR!xhj0 zIzlJ75;{W{=n5Io4Kh_&j?^Gp<`34(2vm1*NnS;T9Ek*`2ZDjxA&5v}#a;*ybp$_N5GGO4(v*k2>7=TnMHV$GB%mkz1)(FT~T4bU>TP+U?Lz=?zM zxIk@XXilW8U4=5AGN2{~dX{pfPNnt2tJn&($($F-e}RC5!zkgLPQTSeao18~->As2NY3mcJ@JVBcy9|o?0flvVbP_aez zQ9o+3M2?OvF2TQA&%rQuBMgC|Pzb|dIE;WID29sk%ewYpwsMP{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Xl!H?HqoKe&E!{o*?9`ptF5b=J+? z@$N*o!JX_*al729?ksm-cbO-Ti@k zpS#(8%>9G=C->P@ma0#^BDG`cm8o4)yQX$a%}O1Xx-fN7>UF6%q%KLlIrX;GJ5ujT zy)SiN>c^=kQ@=|6CiU0Uztd=%E3HRbue3gC{nGlU4M@vPn~-)}+8t?kr7cgpH*H1Q z18EPXtxwyK_D0%~w3F$&baQ%Adi(T@^x^46=_Auers=sfYBM32E^^0+*mJe@sVJ>5K6p5C4bo(hlbnc)d|W_fBnA-lg7U-rK!*dhhn$egF`=0eZ@7wI#;@j%m={xK@;``Kh)OXx>!uO@` zl<#Zbx4!RvKl*<5ofBAyP^y*cq_7l~W=nIW`O>x00*OnDr5mK1q@~hr(w)+B=|1Ux z=|SmX=}~Ewv_@JhJuW>Vt(P`Po1|x?=cE^;7p0e^m!)me4(T;%r}U<@OL|*+S8A3% nlnzQqrDM|P(znug(ht%Z>2EBM;t$1*wDQBg(7s##wlV!5Rq0n7 literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/Sparkle.strings b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/Sparkle.strings new file mode 100644 index 0000000000000000000000000000000000000000..a5486800d7018ff468ed73ffb846e1b9e2249fbd GIT binary patch literal 8562 zcmdT~+iw(Q6#p!VxU>!OB0(M)KxEsn-K|C+ym1qx0<-P5rEUsryW5?ix81V0QbI#P zB&A?jl#3X{gYnJ8@K2~wBJctaMjuIxFDA%?fxvox-|6YhEG-w40ZFsBZ)UzZ*WdY_ zGp*bUt43ugQ)THrMeoD(msS~7px+}ZM=K@Ouli`Mk5-aujNWnFrqv96OVc?`wAQG? zs$MNnE7U6b9Z^HdQiHUfrBB1Nwt{}YOD~++tX`S*?AJW&E7aS1Z|v`fyz8`tc<)zv zdQYh$X_eD@7DyB5Tu^)Hx1n_&rEhs{p_0}=PuFGXh@pDPTD|mZh~AU*o+j<8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xY8OjmsJ`RkoV5mwb;kq zkr=M};Vh8X|17MItzohn>Mfmwd zFu;bujli4MPgf4lT=#J~b%yW`no-M>%%+%6LV zf2*}ux<|1dqu%$5zwb6k-XELc3&`>`b*|Fe7}Pms39}5< zLazae6IA{CXOP?t&4$HbB1yUqS1~id>?=(;?C=q%x5Atk7>v#pdoHJ|S~bIvnc0JT zI(Pn$$Eh+C2Iwx!Jbvt`Srb{5?AEg}#Lnq~y2|D#j*iE#v`!8;$B&xN>CTAeU%Dg0 zZhoQ$vJbthGc82yJG{z0-8!2&--@XBd#1&R;LIoy{ornSS5zJ-ZJT_#{9%Xx)*06I z7}2<$WH8h=vKOSuxujulT}^#3=g`VZ6LD1 zzGODU6B>U0IpSJpm_VCJ;+4bSX!Ye^Zn zxh2%YxyfJJyFj;D78&1a;ulgR~af!xH5xq7DJ+!ga) zOt9sdp}WtM?4JuMfo{0g%|d#jb-S0^V(DO)cdB%`b6EvZTyNG@dZK@|-!LyEkPrLH z-*tw}t;uUKnLqj6W5-E$ca0BQ{^kqMyJe;i{1?QQEOKW~PxR)lfQ={msHooj!T&G( E3ljf5aR2}S literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Sparkle.framework/Versions/A/Sparkle b/hw/xquartz/bundle/Sparkle.framework/Versions/A/Sparkle new file mode 100755 index 0000000000000000000000000000000000000000..9dbf9e7fa1ed6ebd9ed45e0025410c23453d15b3 GIT binary patch literal 197376 zcmeFadw5jU^*%m<2vMU6HdVCL4j2&>As||aQA1#&D7O*`T6tvJn}qY z&aA!ed+oK?S?4m(fA#05JswXF{Po6PPmd?pK` zc~A6s*5ES(e|hK(R8&m!&76iW?ti=V7krZbIQ;RG|0*gXfyEJZtiGqye~He*l2slL zKiPP2{$+ZWnd6Fz`e0>vN$uQFO+`2oo!eQ5=v@lad>XnekK%C#02LKA!APLNUo%pT zcIL4dJaRF_Pq!Xuf;j&wDk?*D;gm6*d8`BN9ANX4KIrbB@<(OJUsF*>PMvvpe(mu< zZx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jpf52$BY8#X#~fg?gDQjKQ9-Bw-4aT~Cm-9Xo(5p4pNX3F@=T>jIR!g|yVb+; z=1AM*6l4NA`KjP!KN+C$7Z&x@UsbHhE~b9UcWI{y!*h|`rtxUbAC9Caw&eT*<(yFm z6-fb4kfih1OJv;3A}$j;qKRqi>2zLY7TZ3KM2RrIX=2Wh+ z0zX~8#ZLP-C5M%xdYGinIdxhaGq#k^WE(?lLZJipv8uGrxaVMOHW$d4psyvNQ(ODkh-*jJk5&>NR()Qd1<<+U#^q zrbyXmRLeaf^{fhiM2I`{(A?UlSV!ta=2kFylaw7!bl{ERx$N<7-OT!te=sBO+tM<1 zq<`ammx$basmQwRQy*EU|7fGGDj7+lTx7lFPsr>AYe^m`&yNfLP=skrZuRSQ+eJNX z8Q$K&r)ae)4#=yp&sZlto36S*DD<&jLNjp~O2YfC;O> zNxs=C==c|`7$zQ3tgZ3Hl0l5Dd9zfRgHAj=t@~wt#6)NH4 Date: Tue, 6 May 2008 00:06:19 -0700 Subject: [PATCH 459/634] XQuartz: Move server bits into bundle and setup stub in /usr/X11/bin/Xquartz in prep for startup rewrite (cherry picked from commit 453a982e6382cff06ea27abba225440b07068f50) --- configure.ac | 15 +-- hw/xquartz/Makefile.am | 8 +- hw/xquartz/bundle/Makefile.am | 13 +-- .../Dutch.lproj/InfoPlist.strings | Bin .../Dutch.lproj/Localizable.strings | Bin .../Dutch.lproj/main.nib/keyedobjects.nib | Bin .../English.lproj/InfoPlist.strings | Bin .../English.lproj/Localizable.strings | Bin .../English.lproj/main.nib/designable.nib | 0 .../English.lproj/main.nib/keyedobjects.nib | Bin .../French.lproj/InfoPlist.strings | Bin .../French.lproj/Localizable.strings | Bin .../French.lproj/main.nib/keyedobjects.nib | Bin .../German.lproj/InfoPlist.strings | Bin .../German.lproj/Localizable.strings | Bin .../German.lproj/main.nib/keyedobjects.nib | Bin .../Italian.lproj/InfoPlist.strings | Bin .../Italian.lproj/Localizable.strings | Bin .../Italian.lproj/main.nib/keyedobjects.nib | Bin .../Japanese.lproj/InfoPlist.strings | Bin .../Japanese.lproj/Localizable.strings | Bin .../Japanese.lproj/main.nib/keyedobjects.nib | Bin .../Spanish.lproj/InfoPlist.strings | Bin .../Spanish.lproj/Localizable.strings | Bin .../Spanish.lproj/main.nib/keyedobjects.nib | Bin hw/xquartz/bundle/{ => Resources}/X11.icns | Bin .../da.lproj/InfoPlist.strings | Bin .../da.lproj/Localizable.strings | Bin .../da.lproj/main.nib/keyedobjects.nib | Bin .../fi.lproj/InfoPlist.strings | Bin .../fi.lproj/Localizable.strings | Bin .../fi.lproj/main.nib/keyedobjects.nib | Bin .../ko.lproj/InfoPlist.strings | Bin .../ko.lproj/Localizable.strings | Bin .../ko.lproj/main.nib/keyedobjects.nib | Bin .../no.lproj/InfoPlist.strings | Bin .../no.lproj/Localizable.strings | Bin .../no.lproj/main.nib/keyedobjects.nib | Bin .../pl.lproj/InfoPlist.strings | Bin .../pl.lproj/Localizable.strings | Bin .../pl.lproj/main.nib/keyedobjects.nib | Bin .../pt.lproj/InfoPlist.strings | Bin .../pt.lproj/Localizable.strings | Bin .../pt.lproj/main.nib/keyedobjects.nib | Bin .../pt_PT.lproj/InfoPlist.strings | Bin .../pt_PT.lproj/Localizable.strings | Bin .../pt_PT.lproj/main.nib/keyedobjects.nib | Bin .../ru.lproj/InfoPlist.strings | Bin .../ru.lproj/Localizable.strings | Bin .../ru.lproj/main.nib/keyedobjects.nib | Bin .../sv.lproj/InfoPlist.strings | Bin .../sv.lproj/Localizable.strings | Bin .../sv.lproj/main.nib/keyedobjects.nib | Bin .../zh_CN.lproj/InfoPlist.strings | Bin .../zh_CN.lproj/Localizable.strings | Bin .../zh_CN.lproj/main.nib/keyedobjects.nib | Bin .../zh_TW.lproj/InfoPlist.strings | Bin .../zh_TW.lproj/Localizable.strings | Bin .../zh_TW.lproj/main.nib/keyedobjects.nib | Bin hw/xquartz/bundle/bundle-main.c | 13 ++- hw/xquartz/quartzStartup.c | 2 +- hw/xquartz/stub/Makefile.am | 11 ++ hw/xquartz/stub/stub.c | 96 ++++++++++++++++++ hw/xquartz/xpr/Makefile.am | 11 +- 64 files changed, 129 insertions(+), 40 deletions(-) rename hw/xquartz/bundle/{ => Resources}/Dutch.lproj/InfoPlist.strings (100%) rename hw/xquartz/bundle/{ => Resources}/Dutch.lproj/Localizable.strings (100%) rename hw/xquartz/bundle/{ => Resources}/Dutch.lproj/main.nib/keyedobjects.nib (100%) rename hw/xquartz/bundle/{ => Resources}/English.lproj/InfoPlist.strings (100%) rename hw/xquartz/bundle/{ => Resources}/English.lproj/Localizable.strings (100%) rename hw/xquartz/bundle/{ => Resources}/English.lproj/main.nib/designable.nib (100%) rename hw/xquartz/bundle/{ => Resources}/English.lproj/main.nib/keyedobjects.nib (100%) rename hw/xquartz/bundle/{ => Resources}/French.lproj/InfoPlist.strings (100%) rename hw/xquartz/bundle/{ => Resources}/French.lproj/Localizable.strings (100%) rename hw/xquartz/bundle/{ => Resources}/French.lproj/main.nib/keyedobjects.nib (100%) rename hw/xquartz/bundle/{ => Resources}/German.lproj/InfoPlist.strings (100%) rename hw/xquartz/bundle/{ => Resources}/German.lproj/Localizable.strings (100%) rename hw/xquartz/bundle/{ => Resources}/German.lproj/main.nib/keyedobjects.nib (100%) rename hw/xquartz/bundle/{ => Resources}/Italian.lproj/InfoPlist.strings (100%) rename hw/xquartz/bundle/{ => Resources}/Italian.lproj/Localizable.strings (100%) rename hw/xquartz/bundle/{ => Resources}/Italian.lproj/main.nib/keyedobjects.nib (100%) rename hw/xquartz/bundle/{ => Resources}/Japanese.lproj/InfoPlist.strings (100%) rename hw/xquartz/bundle/{ => Resources}/Japanese.lproj/Localizable.strings (100%) rename hw/xquartz/bundle/{ => Resources}/Japanese.lproj/main.nib/keyedobjects.nib (100%) rename hw/xquartz/bundle/{ => Resources}/Spanish.lproj/InfoPlist.strings (100%) rename hw/xquartz/bundle/{ => Resources}/Spanish.lproj/Localizable.strings (100%) rename hw/xquartz/bundle/{ => Resources}/Spanish.lproj/main.nib/keyedobjects.nib (100%) rename hw/xquartz/bundle/{ => Resources}/X11.icns (100%) rename hw/xquartz/bundle/{ => Resources}/da.lproj/InfoPlist.strings (100%) rename hw/xquartz/bundle/{ => Resources}/da.lproj/Localizable.strings (100%) rename hw/xquartz/bundle/{ => Resources}/da.lproj/main.nib/keyedobjects.nib (100%) rename hw/xquartz/bundle/{ => Resources}/fi.lproj/InfoPlist.strings (100%) rename hw/xquartz/bundle/{ => Resources}/fi.lproj/Localizable.strings (100%) rename hw/xquartz/bundle/{ => Resources}/fi.lproj/main.nib/keyedobjects.nib (100%) rename hw/xquartz/bundle/{ => Resources}/ko.lproj/InfoPlist.strings (100%) rename hw/xquartz/bundle/{ => Resources}/ko.lproj/Localizable.strings (100%) rename hw/xquartz/bundle/{ => Resources}/ko.lproj/main.nib/keyedobjects.nib (100%) rename hw/xquartz/bundle/{ => Resources}/no.lproj/InfoPlist.strings (100%) rename hw/xquartz/bundle/{ => Resources}/no.lproj/Localizable.strings (100%) rename hw/xquartz/bundle/{ => Resources}/no.lproj/main.nib/keyedobjects.nib (100%) rename hw/xquartz/bundle/{ => Resources}/pl.lproj/InfoPlist.strings (100%) rename hw/xquartz/bundle/{ => Resources}/pl.lproj/Localizable.strings (100%) rename hw/xquartz/bundle/{ => Resources}/pl.lproj/main.nib/keyedobjects.nib (100%) rename hw/xquartz/bundle/{ => Resources}/pt.lproj/InfoPlist.strings (100%) rename hw/xquartz/bundle/{ => Resources}/pt.lproj/Localizable.strings (100%) rename hw/xquartz/bundle/{ => Resources}/pt.lproj/main.nib/keyedobjects.nib (100%) rename hw/xquartz/bundle/{ => Resources}/pt_PT.lproj/InfoPlist.strings (100%) rename hw/xquartz/bundle/{ => Resources}/pt_PT.lproj/Localizable.strings (100%) rename hw/xquartz/bundle/{ => Resources}/pt_PT.lproj/main.nib/keyedobjects.nib (100%) rename hw/xquartz/bundle/{ => Resources}/ru.lproj/InfoPlist.strings (100%) rename hw/xquartz/bundle/{ => Resources}/ru.lproj/Localizable.strings (100%) rename hw/xquartz/bundle/{ => Resources}/ru.lproj/main.nib/keyedobjects.nib (100%) rename hw/xquartz/bundle/{ => Resources}/sv.lproj/InfoPlist.strings (100%) rename hw/xquartz/bundle/{ => Resources}/sv.lproj/Localizable.strings (100%) rename hw/xquartz/bundle/{ => Resources}/sv.lproj/main.nib/keyedobjects.nib (100%) rename hw/xquartz/bundle/{ => Resources}/zh_CN.lproj/InfoPlist.strings (100%) rename hw/xquartz/bundle/{ => Resources}/zh_CN.lproj/Localizable.strings (100%) rename hw/xquartz/bundle/{ => Resources}/zh_CN.lproj/main.nib/keyedobjects.nib (100%) rename hw/xquartz/bundle/{ => Resources}/zh_TW.lproj/InfoPlist.strings (100%) rename hw/xquartz/bundle/{ => Resources}/zh_TW.lproj/Localizable.strings (100%) rename hw/xquartz/bundle/{ => Resources}/zh_TW.lproj/main.nib/keyedobjects.nib (100%) create mode 100644 hw/xquartz/stub/Makefile.am create mode 100644 hw/xquartz/stub/stub.c diff --git a/configure.ac b/configure.ac index f695551e4..9b7753492 100644 --- a/configure.ac +++ b/configure.ac @@ -562,9 +562,6 @@ AC_ARG_ENABLE(dmx, AS_HELP_STRING([--enable-dmx], [Build DMX server (d AC_ARG_ENABLE(xvfb, AS_HELP_STRING([--enable-xvfb], [Build Xvfb server (default: yes)]), [XVFB=$enableval], [XVFB=yes]) AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto]) AC_ARG_ENABLE(xquartz, AS_HELP_STRING([--enable-xquartz], [Build Xquartz server for OS-X (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto]) -AC_ARG_ENABLE(x11app, AS_HELP_STRING([--enable-x11app], [Build Apple's X11.app for Xquartz (default: auto)]), [X11APP=$enableval], [X11APP=auto]) -AC_ARG_WITH(x11app-archs, AS_HELP_STRING([--with-x11app-archs=ARCHS], [Architectures to build X11.app for, space delimeted (default: "ppc i386")]), [X11APP_ARCHS=$enableval], [X11APP_ARCHS="ppc i386"]) -AC_SUBST([X11APP_ARCHS]) AC_ARG_ENABLE(xwin, AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto]) AC_ARG_ENABLE(xprint, AS_HELP_STRING([--enable-xprint], [Build Xprint extension and server (default: no)]), [XPRINT=$enableval], [XPRINT=no]) AC_ARG_ENABLE(xgl, AS_HELP_STRING([--enable-xgl], [Build Xgl server (default: no)]), [XGL=$enableval], [XGL=no]) @@ -1756,17 +1753,6 @@ AM_CONDITIONAL(HAVE_XPLUGIN, [test "x$ac_cv_lib_Xplugin_xp_init" = xyes]) AM_CONDITIONAL(HAVE_AGL_FRAMEWORK, [test "x$xorg_cv_AGL_framework" = xyes]) AM_CONDITIONAL(XQUARTZ, [test "x$XQUARTZ" = xyes]) -if test "x$X11APP" = xauto; then - AC_MSG_CHECKING([whether to build X11.app]) - if test "x$XQUARTZ" = xyes ; then - X11APP=yes - else - X11APP=no - fi - AC_MSG_RESULT([$X11APP]) -fi -AM_CONDITIONAL(X11APP,[test "X$X11APP" = Xyes]) - if test "x$LAUNCHD" = "xauto"; then if test "x$XQUARTZ" = "xyes" ; then LAUNCHD=yes @@ -2165,6 +2151,7 @@ hw/xwin/Makefile hw/xquartz/Makefile hw/xquartz/GL/Makefile hw/xquartz/bundle/Makefile +hw/xquartz/stub/Makefile hw/xquartz/xpr/Makefile hw/kdrive/Makefile hw/kdrive/ati/Makefile diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am index b2674be4f..bbd21f816 100644 --- a/hw/xquartz/Makefile.am +++ b/hw/xquartz/Makefile.am @@ -9,16 +9,12 @@ AM_CPPFLAGS = \ -DXFree86Server \ -I$(top_srcdir)/miext/rootless -if X11APP -X11APP_SUBDIRS = bundle -endif - -SUBDIRS = . GL xpr $(X11APP_SUBDIRS) -DIST_SUBDIRS = GL xpr bundle +SUBDIRS = bundle . GL xpr stub libXquartz_la_SOURCES = \ $(top_srcdir)/fb/fbcmap_mi.c \ $(top_srcdir)/mi/miinitext.c \ + bundle/bundle-main.c \ X11Application.m \ X11Controller.m \ applewm.c \ diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am index 801fdc7d8..b7776967f 100644 --- a/hw/xquartz/bundle/Makefile.am +++ b/hw/xquartz/bundle/Makefile.am @@ -1,20 +1,11 @@ -bin_SCRIPTS = x11app - -.PHONY: x11app - -x11app: - xcodebuild CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ARCHS="$(X11APP_ARCHS)" - install-data-hook: - xcodebuild install DSTROOT="/$(DESTDIR)" INSTALL_PATH="$(APPLE_APPLICATIONS_DIR)" DEPLOYMENT_LOCATION=YES SKIP_INSTALL=NO ARCHS="$(X11APP_ARCHS)" - -clean-local: - rm -rf build + ./mk_bundke.sh $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/X11.app resourcedir=$(libdir)/X11/xserver resource_DATA = Xquartz.plist EXTRA_DIST = \ + mk_bundke.sh \ $(resource_DATA) \ Info.plist \ X11.icns \ diff --git a/hw/xquartz/bundle/Dutch.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/Dutch.lproj/InfoPlist.strings similarity index 100% rename from hw/xquartz/bundle/Dutch.lproj/InfoPlist.strings rename to hw/xquartz/bundle/Resources/Dutch.lproj/InfoPlist.strings diff --git a/hw/xquartz/bundle/Dutch.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/Dutch.lproj/Localizable.strings similarity index 100% rename from hw/xquartz/bundle/Dutch.lproj/Localizable.strings rename to hw/xquartz/bundle/Resources/Dutch.lproj/Localizable.strings diff --git a/hw/xquartz/bundle/Dutch.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/Dutch.lproj/main.nib/keyedobjects.nib similarity index 100% rename from hw/xquartz/bundle/Dutch.lproj/main.nib/keyedobjects.nib rename to hw/xquartz/bundle/Resources/Dutch.lproj/main.nib/keyedobjects.nib diff --git a/hw/xquartz/bundle/English.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/English.lproj/InfoPlist.strings similarity index 100% rename from hw/xquartz/bundle/English.lproj/InfoPlist.strings rename to hw/xquartz/bundle/Resources/English.lproj/InfoPlist.strings diff --git a/hw/xquartz/bundle/English.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/English.lproj/Localizable.strings similarity index 100% rename from hw/xquartz/bundle/English.lproj/Localizable.strings rename to hw/xquartz/bundle/Resources/English.lproj/Localizable.strings diff --git a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib similarity index 100% rename from hw/xquartz/bundle/English.lproj/main.nib/designable.nib rename to hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib diff --git a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib similarity index 100% rename from hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib rename to hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib diff --git a/hw/xquartz/bundle/French.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/French.lproj/InfoPlist.strings similarity index 100% rename from hw/xquartz/bundle/French.lproj/InfoPlist.strings rename to hw/xquartz/bundle/Resources/French.lproj/InfoPlist.strings diff --git a/hw/xquartz/bundle/French.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/French.lproj/Localizable.strings similarity index 100% rename from hw/xquartz/bundle/French.lproj/Localizable.strings rename to hw/xquartz/bundle/Resources/French.lproj/Localizable.strings diff --git a/hw/xquartz/bundle/French.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/French.lproj/main.nib/keyedobjects.nib similarity index 100% rename from hw/xquartz/bundle/French.lproj/main.nib/keyedobjects.nib rename to hw/xquartz/bundle/Resources/French.lproj/main.nib/keyedobjects.nib diff --git a/hw/xquartz/bundle/German.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/German.lproj/InfoPlist.strings similarity index 100% rename from hw/xquartz/bundle/German.lproj/InfoPlist.strings rename to hw/xquartz/bundle/Resources/German.lproj/InfoPlist.strings diff --git a/hw/xquartz/bundle/German.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/German.lproj/Localizable.strings similarity index 100% rename from hw/xquartz/bundle/German.lproj/Localizable.strings rename to hw/xquartz/bundle/Resources/German.lproj/Localizable.strings diff --git a/hw/xquartz/bundle/German.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/German.lproj/main.nib/keyedobjects.nib similarity index 100% rename from hw/xquartz/bundle/German.lproj/main.nib/keyedobjects.nib rename to hw/xquartz/bundle/Resources/German.lproj/main.nib/keyedobjects.nib diff --git a/hw/xquartz/bundle/Italian.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/Italian.lproj/InfoPlist.strings similarity index 100% rename from hw/xquartz/bundle/Italian.lproj/InfoPlist.strings rename to hw/xquartz/bundle/Resources/Italian.lproj/InfoPlist.strings diff --git a/hw/xquartz/bundle/Italian.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/Italian.lproj/Localizable.strings similarity index 100% rename from hw/xquartz/bundle/Italian.lproj/Localizable.strings rename to hw/xquartz/bundle/Resources/Italian.lproj/Localizable.strings diff --git a/hw/xquartz/bundle/Italian.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/Italian.lproj/main.nib/keyedobjects.nib similarity index 100% rename from hw/xquartz/bundle/Italian.lproj/main.nib/keyedobjects.nib rename to hw/xquartz/bundle/Resources/Italian.lproj/main.nib/keyedobjects.nib diff --git a/hw/xquartz/bundle/Japanese.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/Japanese.lproj/InfoPlist.strings similarity index 100% rename from hw/xquartz/bundle/Japanese.lproj/InfoPlist.strings rename to hw/xquartz/bundle/Resources/Japanese.lproj/InfoPlist.strings diff --git a/hw/xquartz/bundle/Japanese.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/Japanese.lproj/Localizable.strings similarity index 100% rename from hw/xquartz/bundle/Japanese.lproj/Localizable.strings rename to hw/xquartz/bundle/Resources/Japanese.lproj/Localizable.strings diff --git a/hw/xquartz/bundle/Japanese.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/keyedobjects.nib similarity index 100% rename from hw/xquartz/bundle/Japanese.lproj/main.nib/keyedobjects.nib rename to hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/keyedobjects.nib diff --git a/hw/xquartz/bundle/Spanish.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/Spanish.lproj/InfoPlist.strings similarity index 100% rename from hw/xquartz/bundle/Spanish.lproj/InfoPlist.strings rename to hw/xquartz/bundle/Resources/Spanish.lproj/InfoPlist.strings diff --git a/hw/xquartz/bundle/Spanish.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/Spanish.lproj/Localizable.strings similarity index 100% rename from hw/xquartz/bundle/Spanish.lproj/Localizable.strings rename to hw/xquartz/bundle/Resources/Spanish.lproj/Localizable.strings diff --git a/hw/xquartz/bundle/Spanish.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/keyedobjects.nib similarity index 100% rename from hw/xquartz/bundle/Spanish.lproj/main.nib/keyedobjects.nib rename to hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/keyedobjects.nib diff --git a/hw/xquartz/bundle/X11.icns b/hw/xquartz/bundle/Resources/X11.icns similarity index 100% rename from hw/xquartz/bundle/X11.icns rename to hw/xquartz/bundle/Resources/X11.icns diff --git a/hw/xquartz/bundle/da.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/da.lproj/InfoPlist.strings similarity index 100% rename from hw/xquartz/bundle/da.lproj/InfoPlist.strings rename to hw/xquartz/bundle/Resources/da.lproj/InfoPlist.strings diff --git a/hw/xquartz/bundle/da.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/da.lproj/Localizable.strings similarity index 100% rename from hw/xquartz/bundle/da.lproj/Localizable.strings rename to hw/xquartz/bundle/Resources/da.lproj/Localizable.strings diff --git a/hw/xquartz/bundle/da.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/da.lproj/main.nib/keyedobjects.nib similarity index 100% rename from hw/xquartz/bundle/da.lproj/main.nib/keyedobjects.nib rename to hw/xquartz/bundle/Resources/da.lproj/main.nib/keyedobjects.nib diff --git a/hw/xquartz/bundle/fi.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/fi.lproj/InfoPlist.strings similarity index 100% rename from hw/xquartz/bundle/fi.lproj/InfoPlist.strings rename to hw/xquartz/bundle/Resources/fi.lproj/InfoPlist.strings diff --git a/hw/xquartz/bundle/fi.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/fi.lproj/Localizable.strings similarity index 100% rename from hw/xquartz/bundle/fi.lproj/Localizable.strings rename to hw/xquartz/bundle/Resources/fi.lproj/Localizable.strings diff --git a/hw/xquartz/bundle/fi.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/fi.lproj/main.nib/keyedobjects.nib similarity index 100% rename from hw/xquartz/bundle/fi.lproj/main.nib/keyedobjects.nib rename to hw/xquartz/bundle/Resources/fi.lproj/main.nib/keyedobjects.nib diff --git a/hw/xquartz/bundle/ko.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/ko.lproj/InfoPlist.strings similarity index 100% rename from hw/xquartz/bundle/ko.lproj/InfoPlist.strings rename to hw/xquartz/bundle/Resources/ko.lproj/InfoPlist.strings diff --git a/hw/xquartz/bundle/ko.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/ko.lproj/Localizable.strings similarity index 100% rename from hw/xquartz/bundle/ko.lproj/Localizable.strings rename to hw/xquartz/bundle/Resources/ko.lproj/Localizable.strings diff --git a/hw/xquartz/bundle/ko.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/ko.lproj/main.nib/keyedobjects.nib similarity index 100% rename from hw/xquartz/bundle/ko.lproj/main.nib/keyedobjects.nib rename to hw/xquartz/bundle/Resources/ko.lproj/main.nib/keyedobjects.nib diff --git a/hw/xquartz/bundle/no.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/no.lproj/InfoPlist.strings similarity index 100% rename from hw/xquartz/bundle/no.lproj/InfoPlist.strings rename to hw/xquartz/bundle/Resources/no.lproj/InfoPlist.strings diff --git a/hw/xquartz/bundle/no.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/no.lproj/Localizable.strings similarity index 100% rename from hw/xquartz/bundle/no.lproj/Localizable.strings rename to hw/xquartz/bundle/Resources/no.lproj/Localizable.strings diff --git a/hw/xquartz/bundle/no.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/no.lproj/main.nib/keyedobjects.nib similarity index 100% rename from hw/xquartz/bundle/no.lproj/main.nib/keyedobjects.nib rename to hw/xquartz/bundle/Resources/no.lproj/main.nib/keyedobjects.nib diff --git a/hw/xquartz/bundle/pl.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/pl.lproj/InfoPlist.strings similarity index 100% rename from hw/xquartz/bundle/pl.lproj/InfoPlist.strings rename to hw/xquartz/bundle/Resources/pl.lproj/InfoPlist.strings diff --git a/hw/xquartz/bundle/pl.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/pl.lproj/Localizable.strings similarity index 100% rename from hw/xquartz/bundle/pl.lproj/Localizable.strings rename to hw/xquartz/bundle/Resources/pl.lproj/Localizable.strings diff --git a/hw/xquartz/bundle/pl.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/pl.lproj/main.nib/keyedobjects.nib similarity index 100% rename from hw/xquartz/bundle/pl.lproj/main.nib/keyedobjects.nib rename to hw/xquartz/bundle/Resources/pl.lproj/main.nib/keyedobjects.nib diff --git a/hw/xquartz/bundle/pt.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/pt.lproj/InfoPlist.strings similarity index 100% rename from hw/xquartz/bundle/pt.lproj/InfoPlist.strings rename to hw/xquartz/bundle/Resources/pt.lproj/InfoPlist.strings diff --git a/hw/xquartz/bundle/pt.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/pt.lproj/Localizable.strings similarity index 100% rename from hw/xquartz/bundle/pt.lproj/Localizable.strings rename to hw/xquartz/bundle/Resources/pt.lproj/Localizable.strings diff --git a/hw/xquartz/bundle/pt.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/pt.lproj/main.nib/keyedobjects.nib similarity index 100% rename from hw/xquartz/bundle/pt.lproj/main.nib/keyedobjects.nib rename to hw/xquartz/bundle/Resources/pt.lproj/main.nib/keyedobjects.nib diff --git a/hw/xquartz/bundle/pt_PT.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/pt_PT.lproj/InfoPlist.strings similarity index 100% rename from hw/xquartz/bundle/pt_PT.lproj/InfoPlist.strings rename to hw/xquartz/bundle/Resources/pt_PT.lproj/InfoPlist.strings diff --git a/hw/xquartz/bundle/pt_PT.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/pt_PT.lproj/Localizable.strings similarity index 100% rename from hw/xquartz/bundle/pt_PT.lproj/Localizable.strings rename to hw/xquartz/bundle/Resources/pt_PT.lproj/Localizable.strings diff --git a/hw/xquartz/bundle/pt_PT.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/pt_PT.lproj/main.nib/keyedobjects.nib similarity index 100% rename from hw/xquartz/bundle/pt_PT.lproj/main.nib/keyedobjects.nib rename to hw/xquartz/bundle/Resources/pt_PT.lproj/main.nib/keyedobjects.nib diff --git a/hw/xquartz/bundle/ru.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/ru.lproj/InfoPlist.strings similarity index 100% rename from hw/xquartz/bundle/ru.lproj/InfoPlist.strings rename to hw/xquartz/bundle/Resources/ru.lproj/InfoPlist.strings diff --git a/hw/xquartz/bundle/ru.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/ru.lproj/Localizable.strings similarity index 100% rename from hw/xquartz/bundle/ru.lproj/Localizable.strings rename to hw/xquartz/bundle/Resources/ru.lproj/Localizable.strings diff --git a/hw/xquartz/bundle/ru.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/ru.lproj/main.nib/keyedobjects.nib similarity index 100% rename from hw/xquartz/bundle/ru.lproj/main.nib/keyedobjects.nib rename to hw/xquartz/bundle/Resources/ru.lproj/main.nib/keyedobjects.nib diff --git a/hw/xquartz/bundle/sv.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/sv.lproj/InfoPlist.strings similarity index 100% rename from hw/xquartz/bundle/sv.lproj/InfoPlist.strings rename to hw/xquartz/bundle/Resources/sv.lproj/InfoPlist.strings diff --git a/hw/xquartz/bundle/sv.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/sv.lproj/Localizable.strings similarity index 100% rename from hw/xquartz/bundle/sv.lproj/Localizable.strings rename to hw/xquartz/bundle/Resources/sv.lproj/Localizable.strings diff --git a/hw/xquartz/bundle/sv.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/sv.lproj/main.nib/keyedobjects.nib similarity index 100% rename from hw/xquartz/bundle/sv.lproj/main.nib/keyedobjects.nib rename to hw/xquartz/bundle/Resources/sv.lproj/main.nib/keyedobjects.nib diff --git a/hw/xquartz/bundle/zh_CN.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/zh_CN.lproj/InfoPlist.strings similarity index 100% rename from hw/xquartz/bundle/zh_CN.lproj/InfoPlist.strings rename to hw/xquartz/bundle/Resources/zh_CN.lproj/InfoPlist.strings diff --git a/hw/xquartz/bundle/zh_CN.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/zh_CN.lproj/Localizable.strings similarity index 100% rename from hw/xquartz/bundle/zh_CN.lproj/Localizable.strings rename to hw/xquartz/bundle/Resources/zh_CN.lproj/Localizable.strings diff --git a/hw/xquartz/bundle/zh_CN.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/keyedobjects.nib similarity index 100% rename from hw/xquartz/bundle/zh_CN.lproj/main.nib/keyedobjects.nib rename to hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/keyedobjects.nib diff --git a/hw/xquartz/bundle/zh_TW.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/zh_TW.lproj/InfoPlist.strings similarity index 100% rename from hw/xquartz/bundle/zh_TW.lproj/InfoPlist.strings rename to hw/xquartz/bundle/Resources/zh_TW.lproj/InfoPlist.strings diff --git a/hw/xquartz/bundle/zh_TW.lproj/Localizable.strings b/hw/xquartz/bundle/Resources/zh_TW.lproj/Localizable.strings similarity index 100% rename from hw/xquartz/bundle/zh_TW.lproj/Localizable.strings rename to hw/xquartz/bundle/Resources/zh_TW.lproj/Localizable.strings diff --git a/hw/xquartz/bundle/zh_TW.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/keyedobjects.nib similarity index 100% rename from hw/xquartz/bundle/zh_TW.lproj/main.nib/keyedobjects.nib rename to hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/keyedobjects.nib diff --git a/hw/xquartz/bundle/bundle-main.c b/hw/xquartz/bundle/bundle-main.c index e97770a55..042fa3ab8 100644 --- a/hw/xquartz/bundle/bundle-main.c +++ b/hw/xquartz/bundle/bundle-main.c @@ -43,7 +43,9 @@ static int execute(const char *command); static char *command_from_prefs(const char *key, const char *default_value); -int main(int argc, char **argv) { +int server_main(int argc, char **argv, char **envp); + +int main(int argc, char **argv, char **envp) { Display *display; const char *s; @@ -52,7 +54,12 @@ int main(int argc, char **argv) { for(i=0; i < argc; i++) { fprintf(stderr, "\targv[%u] = %s\n", (unsigned)i, argv[i]); } - + + /* Take care of the case where we're called like a normal DDX */ + if(argc > 1 && argv[1][0] == ':') { + exit(server_main(argc, argv, envp)); + } + /* If we have a process serial number and it's our only arg, act as if * the user double clicked the app bundle: launch app_to_run if possible */ @@ -73,7 +80,7 @@ int main(int argc, char **argv) { } /* Start the server */ - if(s = getenv("DISPLAY")) { + if((s = getenv("DISPLAY"))) { fprintf(stderr, "X11.app: Could not connect to server (DISPLAY=\"%s\", unsetting). Starting X server.\n", s); unsetenv("DISPLAY"); } else { diff --git a/hw/xquartz/quartzStartup.c b/hw/xquartz/quartzStartup.c index a4472e659..43f1502a1 100644 --- a/hw/xquartz/quartzStartup.c +++ b/hw/xquartz/quartzStartup.c @@ -94,7 +94,7 @@ void QuartzInitServer(int argc, char **argv, char **envp) { } } -int main(int argc, char **argv, char **envp) { +int server_main(int argc, char **argv, char **envp) { int i; int fd[2]; diff --git a/hw/xquartz/stub/Makefile.am b/hw/xquartz/stub/Makefile.am new file mode 100644 index 000000000..3752dc111 --- /dev/null +++ b/hw/xquartz/stub/Makefile.am @@ -0,0 +1,11 @@ +AM_CPPFLAGS = \ + -DBUILD_DATE=\"$(BUILD_DATE)\" \ + -DXSERVER_VERSION=\"$(VERSION)\" + +bin_PROGRAMS = Xquartz + +Xquartz_SOURCES = \ + stub.c + +Xquartz_LDFLAGS = \ + -framework CoreServices diff --git a/hw/xquartz/stub/stub.c b/hw/xquartz/stub/stub.c new file mode 100644 index 000000000..70f222c27 --- /dev/null +++ b/hw/xquartz/stub/stub.c @@ -0,0 +1,96 @@ +/* Copyright (c) 2008 Apple Inc. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation files + * (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + * HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name(s) of the above + * copyright holders shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization. + */ + +#include + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include + +#define kX11AppBundleId "org.x.X11" +#define kX11AppBundlePath "/Contents/MacOS/X11" + +static char x11_path[PATH_MAX + 1]; + +static void set_x11_path() { + CFURLRef appURL = NULL; + OSStatus osstatus = LSFindApplicationForInfo(kLSUnknownCreator, CFSTR(kX11AppBundleId), nil, nil, &appURL); + + switch (osstatus) { + case noErr: + if (appURL == NULL) { + fprintf(stderr, "xinit: Invalid response from LSFindApplicationForInfo(%s)\n", + kX11AppBundleId); + exit(1); + } + + if (!CFURLGetFileSystemRepresentation(appURL, true, (unsigned char *)x11_path, sizeof(x11_path))) { + fprintf(stderr, "xinit: Error resolving URL for %s\n", kX11AppBundleId); + exit(2); + } + + strlcat(x11_path, kX11AppBundlePath, sizeof(x11_path)); +#ifdef DEBUG + fprintf(stderr, "XQuartz: X11.app = %s\n", x11_path); +#endif + break; + case kLSApplicationNotFoundErr: + fprintf(stderr, "XQuartz: Unable to find application for %s\n", kX11AppBundleId); + exit(4); + default: + fprintf(stderr, "XQuartz: Unable to find application for %s, error code = %d\n", + kX11AppBundleId, (int)osstatus); + exit(5); + } +} + +#ifndef BUILD_DATE +#define BUILD_DATE "?" +#endif +#ifndef XSERVER_VERSION +#define XSERVER_VERSION "?" +#endif + +int main(int argc, char **argv) { + + if(argc == 2 && !strcmp(argv[1], "-version")) { + fprintf(stderr, "X.org Release 7.3\n"); + fprintf(stderr, "X.Org X Server %s\n", XSERVER_VERSION); + fprintf(stderr, "Build Date: %s\n", BUILD_DATE); + return 0; + } + + set_x11_path(); + + argv[0] = x11_path; + return execvp(x11_path, argv); +} diff --git a/hw/xquartz/xpr/Makefile.am b/hw/xquartz/xpr/Makefile.am index 41f2b8655..6bf99a402 100644 --- a/hw/xquartz/xpr/Makefile.am +++ b/hw/xquartz/xpr/Makefile.am @@ -1,4 +1,5 @@ -bin_PROGRAMS = Xquartz +x11appdir = $(APPLE_APPLICATIONS_DIR)/X11.app/Contents/MacOS +x11app_PROGRAMS = X11 AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = \ @@ -6,7 +7,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/miext \ -I$(top_srcdir)/miext/rootless -Xquartz_SOURCES = \ +X11_SOURCES = \ appledri.c \ dri.c \ xprAppleWM.c \ @@ -18,13 +19,13 @@ Xquartz_SOURCES = \ x-hook.c \ x-list.c -Xquartz_LDADD = \ +X11_LDADD = \ $(top_builddir)/hw/xquartz/libXquartz.la \ $(top_builddir)/dix/dixfonts.lo \ $(top_builddir)/miext/rootless/librootless.la \ - $(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin + $(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin -lX11 -Xquartz_LDFLAGS = \ +X11_LDFLAGS = \ -XCClinker -Objc \ -Wl,-u,_miDCInitialize \ -Wl,-framework,Carbon \ From 80e502c5d1f7e9221c6ae40716d6402fd28d8806 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Tue, 6 May 2008 02:28:36 -0700 Subject: [PATCH 460/634] Fixed up dist (cherry picked from commit f225222ba2bf4f03425107f258d60b73c88efaec) --- hw/xquartz/bundle/Makefile.am | 318 +++++++++--- .../bundle/X11.xcodeproj/project.pbxproj | 487 ------------------ 2 files changed, 260 insertions(+), 545 deletions(-) delete mode 100644 hw/xquartz/bundle/X11.xcodeproj/project.pbxproj diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am index b7776967f..c61b0490c 100644 --- a/hw/xquartz/bundle/Makefile.am +++ b/hw/xquartz/bundle/Makefile.am @@ -7,62 +7,264 @@ resource_DATA = Xquartz.plist EXTRA_DIST = \ mk_bundke.sh \ $(resource_DATA) \ - Info.plist \ - X11.icns \ bundle-main.c \ - X11.xcodeproj/project.pbxproj \ - Dutch.lproj/InfoPlist.strings \ - Dutch.lproj/Localizable.strings \ - Dutch.lproj/main.nib/keyedobjects.nib \ - English.lproj/InfoPlist.strings \ - English.lproj/Localizable.strings \ - English.lproj/main.nib/designable.nib \ - English.lproj/main.nib/keyedobjects.nib \ - French.lproj/InfoPlist.strings \ - French.lproj/Localizable.strings \ - French.lproj/main.nib/keyedobjects.nib \ - German.lproj/InfoPlist.strings \ - German.lproj/Localizable.strings \ - German.lproj/main.nib/keyedobjects.nib \ - Italian.lproj/InfoPlist.strings \ - Italian.lproj/Localizable.strings \ - Italian.lproj/main.nib/keyedobjects.nib \ - Japanese.lproj/InfoPlist.strings \ - Japanese.lproj/Localizable.strings \ - Japanese.lproj/main.nib/keyedobjects.nib \ - Spanish.lproj/InfoPlist.strings \ - Spanish.lproj/Localizable.strings \ - Spanish.lproj/main.nib/keyedobjects.nib \ - da.lproj/InfoPlist.strings \ - da.lproj/Localizable.strings \ - da.lproj/main.nib/keyedobjects.nib \ - fi.lproj/InfoPlist.strings \ - fi.lproj/Localizable.strings \ - fi.lproj/main.nib/keyedobjects.nib \ - ko.lproj/InfoPlist.strings \ - ko.lproj/Localizable.strings \ - ko.lproj/main.nib/keyedobjects.nib \ - no.lproj/InfoPlist.strings \ - no.lproj/Localizable.strings \ - no.lproj/main.nib/keyedobjects.nib \ - pl.lproj/InfoPlist.strings \ - pl.lproj/Localizable.strings \ - pl.lproj/main.nib/keyedobjects.nib \ - pt.lproj/InfoPlist.strings \ - pt.lproj/Localizable.strings \ - pt.lproj/main.nib/keyedobjects.nib \ - pt_PT.lproj/InfoPlist.strings \ - pt_PT.lproj/Localizable.strings \ - pt_PT.lproj/main.nib/keyedobjects.nib \ - ru.lproj/InfoPlist.strings \ - ru.lproj/Localizable.strings \ - ru.lproj/main.nib/keyedobjects.nib \ - sv.lproj/InfoPlist.strings \ - sv.lproj/Localizable.strings \ - sv.lproj/main.nib/keyedobjects.nib \ - zh_CN.lproj/InfoPlist.strings \ - zh_CN.lproj/Localizable.strings \ - zh_CN.lproj/main.nib/keyedobjects.nib \ - zh_TW.lproj/InfoPlist.strings \ - zh_TW.lproj/Localizable.strings \ - zh_TW.lproj/main.nib/keyedobjects.nib + Resources/da.lproj/InfoPlist.strings \ + Resources/da.lproj/Localizable.strings \ + Resources/da.lproj/main.nib/keyedobjects.nib \ + Resources/Dutch.lproj/InfoPlist.strings \ + Resources/Dutch.lproj/Localizable.strings \ + Resources/Dutch.lproj/main.nib/keyedobjects.nib \ + Resources/English.lproj/InfoPlist.strings \ + Resources/English.lproj/Localizable.strings \ + Resources/English.lproj/main.nib/designable.nib \ + Resources/English.lproj/main.nib/keyedobjects.nib \ + Resources/fi.lproj/InfoPlist.strings \ + Resources/fi.lproj/Localizable.strings \ + Resources/fi.lproj/main.nib/keyedobjects.nib \ + Resources/French.lproj/InfoPlist.strings \ + Resources/French.lproj/Localizable.strings \ + Resources/French.lproj/main.nib/keyedobjects.nib \ + Resources/German.lproj/InfoPlist.strings \ + Resources/German.lproj/Localizable.strings \ + Resources/German.lproj/main.nib/keyedobjects.nib \ + Resources/Italian.lproj/InfoPlist.strings \ + Resources/Italian.lproj/Localizable.strings \ + Resources/Italian.lproj/main.nib/keyedobjects.nib \ + Resources/Japanese.lproj/InfoPlist.strings \ + Resources/Japanese.lproj/Localizable.strings \ + Resources/Japanese.lproj/main.nib/keyedobjects.nib \ + Resources/ko.lproj/InfoPlist.strings \ + Resources/ko.lproj/Localizable.strings \ + Resources/ko.lproj/main.nib/keyedobjects.nib \ + Resources/no.lproj/InfoPlist.strings \ + Resources/no.lproj/Localizable.strings \ + Resources/no.lproj/main.nib/keyedobjects.nib \ + Resources/pl.lproj/InfoPlist.strings \ + Resources/pl.lproj/Localizable.strings \ + Resources/pl.lproj/main.nib/keyedobjects.nib \ + Resources/pt.lproj/InfoPlist.strings \ + Resources/pt.lproj/Localizable.strings \ + Resources/pt.lproj/main.nib/keyedobjects.nib \ + Resources/pt_PT.lproj/InfoPlist.strings \ + Resources/pt_PT.lproj/Localizable.strings \ + Resources/pt_PT.lproj/main.nib/keyedobjects.nib \ + Resources/ru.lproj/InfoPlist.strings \ + Resources/ru.lproj/Localizable.strings \ + Resources/ru.lproj/main.nib/keyedobjects.nib \ + Resources/Spanish.lproj/InfoPlist.strings \ + Resources/Spanish.lproj/Localizable.strings \ + Resources/Spanish.lproj/main.nib/keyedobjects.nib \ + Resources/sv.lproj/InfoPlist.strings \ + Resources/sv.lproj/Localizable.strings \ + Resources/sv.lproj/main.nib/keyedobjects.nib \ + Resources/X11.icns \ + Resources/zh_CN.lproj/InfoPlist.strings \ + Resources/zh_CN.lproj/Localizable.strings \ + Resources/zh_CN.lproj/main.nib/keyedobjects.nib \ + Resources/zh_TW.lproj/InfoPlist.strings \ + Resources/zh_TW.lproj/Localizable.strings \ + Resources/zh_TW.lproj/main.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Headers/NSApplication+AppCopies.h \ + Sparkle.framework/Versions/A/Headers/NSFileManager+Authentication.h \ + Sparkle.framework/Versions/A/Headers/NSFileManager+Verification.h \ + Sparkle.framework/Versions/A/Headers/NSString+extras.h \ + Sparkle.framework/Versions/A/Headers/RSS.h \ + Sparkle.framework/Versions/A/Headers/Sparkle.h \ + Sparkle.framework/Versions/A/Headers/SUAppcast.h \ + Sparkle.framework/Versions/A/Headers/SUAppcastItem.h \ + Sparkle.framework/Versions/A/Headers/SUAutomaticUpdateAlert.h \ + Sparkle.framework/Versions/A/Headers/SUConstants.h \ + Sparkle.framework/Versions/A/Headers/SUStatusChecker.h \ + Sparkle.framework/Versions/A/Headers/SUStatusController.h \ + Sparkle.framework/Versions/A/Headers/SUUnarchiver.h \ + Sparkle.framework/Versions/A/Headers/SUUpdateAlert.h \ + Sparkle.framework/Versions/A/Headers/SUUpdater.h \ + Sparkle.framework/Versions/A/Headers/SUUtilities.h \ + Sparkle.framework/Versions/A/Resources/ca.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/ca.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/ca.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/cy.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/cy.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/cy.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/da.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/fi.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/fi.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/fi.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/he.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/he.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/he.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/hu.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/hu.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/hu.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/id.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/id.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/id.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/Info.plist \ + Sparkle.framework/Versions/A/Resources/is.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/ja.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/ko.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/no.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/no.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/no.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/pl.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/sk.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/th.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/tr.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/zh_CN.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/zh_TW.lproj/Sparkle.strings \ + Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/classes.nib \ + Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/info.nib \ + Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib/keyedobjects.nib \ + Sparkle.framework/Versions/A/Sparkle + diff --git a/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj b/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj deleted file mode 100644 index 711408dd5..000000000 --- a/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj +++ /dev/null @@ -1,487 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 42; - objects = { - -/* Begin PBXBuildFile section */ - 527F24190B5D938C007840A7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */; }; - 527F241A0B5D938C007840A7 /* main.nib in Resources */ = {isa = PBXBuildFile; fileRef = 02345980000FD03B11CA0E72 /* main.nib */; }; - 527F241B0B5D938C007840A7 /* X11.icns in Resources */ = {isa = PBXBuildFile; fileRef = 50459C5F038587C60ECA21EC /* X11.icns */; }; - 527F241D0B5D938C007840A7 /* bundle-main.c in Sources */ = {isa = PBXBuildFile; fileRef = 50EE2AB703849F0B0ECA21EC /* bundle-main.c */; }; - 527F241F0B5D938C007840A7 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */; }; - 527F24200B5D938C007840A7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 570C5748047186C400ACF82F /* SystemConfiguration.framework */; }; - 527F24370B5D9D89007840A7 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 527F24260B5D938C007840A7 /* Info.plist */; }; - 52880C6F0DCFF906003407EC /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 52880C6E0DCFF906003407EC /* Sparkle.framework */; }; - 52D9C0ED0BCDDF6B00CD2AFC /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 52D9C0EB0BCDDF6B00CD2AFC /* Localizable.strings */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 52880C8C0DCFF9FC003407EC /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 52880C6F0DCFF906003407EC /* Sparkle.framework in CopyFiles */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 0867D6ABFE840B52C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; - 1870340FFE93FCAF11CA0CD7 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/main.nib; sourceTree = ""; }; - 3FB03E460D1B6C05005958A5 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Localizable.strings; sourceTree = ""; }; - 3FB03E470D1B6C05005958A5 /* Dutch */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Dutch; path = Dutch.lproj/Localizable.strings; sourceTree = ""; }; - 3FB03E480D1B6C05005958A5 /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/Localizable.strings; sourceTree = ""; }; - 3FB03E490D1B6C05005958A5 /* French */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = French; path = French.lproj/Localizable.strings; sourceTree = ""; }; - 3FB03E4A0D1B6C05005958A5 /* German */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = German; path = German.lproj/Localizable.strings; sourceTree = ""; }; - 3FB03E4B0D1B6C05005958A5 /* Italian */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Italian; path = Italian.lproj/Localizable.strings; sourceTree = ""; }; - 3FB03E4C0D1B6C05005958A5 /* Japanese */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Japanese; path = Japanese.lproj/Localizable.strings; sourceTree = ""; }; - 3FB03E4D0D1B6C05005958A5 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/Localizable.strings; sourceTree = ""; }; - 3FB03E4E0D1B6C05005958A5 /* no */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = no; path = no.lproj/Localizable.strings; sourceTree = ""; }; - 3FB03E4F0D1B6C05005958A5 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Localizable.strings; sourceTree = ""; }; - 3FB03E500D1B6C05005958A5 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/Localizable.strings; sourceTree = ""; }; - 3FB03E510D1B6C05005958A5 /* pt_PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt_PT; path = pt_PT.lproj/Localizable.strings; sourceTree = ""; }; - 3FB03E520D1B6C05005958A5 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = ""; }; - 3FB03E530D1B6C05005958A5 /* Spanish */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Spanish; path = Spanish.lproj/Localizable.strings; sourceTree = ""; }; - 3FB03E540D1B6C05005958A5 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Localizable.strings; sourceTree = ""; }; - 3FB03E550D1B6C05005958A5 /* zh_CN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_CN; path = zh_CN.lproj/Localizable.strings; sourceTree = ""; }; - 3FB03E560D1B6C05005958A5 /* zh_TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_TW; path = zh_TW.lproj/Localizable.strings; sourceTree = ""; }; - 3FB03E570D1B6C17005958A5 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/InfoPlist.strings; sourceTree = ""; }; - 3FB03E580D1B6C17005958A5 /* Dutch */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Dutch; path = Dutch.lproj/InfoPlist.strings; sourceTree = ""; }; - 3FB03E590D1B6C17005958A5 /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/InfoPlist.strings; sourceTree = ""; }; - 3FB03E5A0D1B6C17005958A5 /* French */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = French; path = French.lproj/InfoPlist.strings; sourceTree = ""; }; - 3FB03E5B0D1B6C17005958A5 /* German */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = German; path = German.lproj/InfoPlist.strings; sourceTree = ""; }; - 3FB03E5C0D1B6C17005958A5 /* Italian */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Italian; path = Italian.lproj/InfoPlist.strings; sourceTree = ""; }; - 3FB03E5D0D1B6C17005958A5 /* Japanese */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Japanese; path = Japanese.lproj/InfoPlist.strings; sourceTree = ""; }; - 3FB03E5E0D1B6C17005958A5 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/InfoPlist.strings; sourceTree = ""; }; - 3FB03E5F0D1B6C17005958A5 /* no */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = no; path = no.lproj/InfoPlist.strings; sourceTree = ""; }; - 3FB03E600D1B6C17005958A5 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; - 3FB03E610D1B6C17005958A5 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; - 3FB03E620D1B6C17005958A5 /* pt_PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt_PT; path = pt_PT.lproj/InfoPlist.strings; sourceTree = ""; }; - 3FB03E630D1B6C17005958A5 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/InfoPlist.strings; sourceTree = ""; }; - 3FB03E640D1B6C17005958A5 /* Spanish */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Spanish; path = Spanish.lproj/InfoPlist.strings; sourceTree = ""; }; - 3FB03E650D1B6C17005958A5 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/InfoPlist.strings; sourceTree = ""; }; - 3FB03E660D1B6C17005958A5 /* zh_CN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_CN; path = zh_CN.lproj/InfoPlist.strings; sourceTree = ""; }; - 3FB03E670D1B6C17005958A5 /* zh_TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_TW; path = zh_TW.lproj/InfoPlist.strings; sourceTree = ""; }; - 3FB03E680D1B6C34005958A5 /* da */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = da; path = da.lproj/main.nib; sourceTree = ""; }; - 3FB03E690D1B6C34005958A5 /* Dutch */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Dutch; path = Dutch.lproj/main.nib; sourceTree = ""; }; - 3FB03E6A0D1B6C34005958A5 /* fi */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = fi; path = fi.lproj/main.nib; sourceTree = ""; }; - 3FB03E6B0D1B6C34005958A5 /* French */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = French; path = French.lproj/main.nib; sourceTree = ""; }; - 3FB03E6C0D1B6C34005958A5 /* German */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = German; path = German.lproj/main.nib; sourceTree = ""; }; - 3FB03E6D0D1B6C34005958A5 /* Italian */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Italian; path = Italian.lproj/main.nib; sourceTree = ""; }; - 3FB03E6E0D1B6C34005958A5 /* Japanese */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Japanese; path = Japanese.lproj/main.nib; sourceTree = ""; }; - 3FB03E6F0D1B6C34005958A5 /* ko */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = ko; path = ko.lproj/main.nib; sourceTree = ""; }; - 3FB03E700D1B6C34005958A5 /* no */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = no; path = no.lproj/main.nib; sourceTree = ""; }; - 3FB03E710D1B6C34005958A5 /* pl */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = pl; path = pl.lproj/main.nib; sourceTree = ""; }; - 3FB03E720D1B6C34005958A5 /* pt */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = pt; path = pt.lproj/main.nib; sourceTree = ""; }; - 3FB03E730D1B6C34005958A5 /* pt_PT */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = pt_PT; path = pt_PT.lproj/main.nib; sourceTree = ""; }; - 3FB03E740D1B6C34005958A5 /* ru */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = ru; path = ru.lproj/main.nib; sourceTree = ""; }; - 3FB03E750D1B6C34005958A5 /* Spanish */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Spanish; path = Spanish.lproj/main.nib; sourceTree = ""; }; - 3FB03E760D1B6C34005958A5 /* sv */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = sv; path = sv.lproj/main.nib; sourceTree = ""; }; - 3FB03E770D1B6C34005958A5 /* zh_CN */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = zh_CN; path = zh_CN.lproj/main.nib; sourceTree = ""; }; - 3FB03E780D1B6C34005958A5 /* zh_TW */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = zh_TW; path = zh_TW.lproj/main.nib; sourceTree = ""; }; - 50459C5F038587C60ECA21EC /* X11.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = X11.icns; sourceTree = ""; }; - 50EE2AB703849F0B0ECA21EC /* bundle-main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = "bundle-main.c"; sourceTree = ""; }; - 50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; - 527F24260B5D938C007840A7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Info.plist; sourceTree = ""; }; - 527F24270B5D938C007840A7 /* X11.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = X11.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 52880C6E0DCFF906003407EC /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = ""; }; - 52D9C0EC0BCDDF6B00CD2AFC /* English */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = ""; }; - 570C5748047186C400ACF82F /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = /System/Library/Frameworks/SystemConfiguration.framework; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 527F241E0B5D938C007840A7 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 527F241F0B5D938C007840A7 /* CoreFoundation.framework in Frameworks */, - 527F24200B5D938C007840A7 /* SystemConfiguration.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 195DF8CFFE9D517E11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 527F24270B5D938C007840A7 /* X11.app */, - ); - name = Products; - sourceTree = ""; - }; - 20286C29FDCF999611CA2CEA /* X11 */ = { - isa = PBXGroup; - children = ( - 20286C2AFDCF999611CA2CEA /* Sources */, - 20286C2CFDCF999611CA2CEA /* Resources */, - 20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */, - 195DF8CFFE9D517E11CA2CBB /* Products */, - 527F24260B5D938C007840A7 /* Info.plist */, - ); - name = X11; - sourceTree = ""; - }; - 20286C2AFDCF999611CA2CEA /* Sources */ = { - isa = PBXGroup; - children = ( - 50EE2AB703849F0B0ECA21EC /* bundle-main.c */, - ); - name = Sources; - sourceTree = ""; - }; - 20286C2CFDCF999611CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 52D9C0EB0BCDDF6B00CD2AFC /* Localizable.strings */, - 50459C5F038587C60ECA21EC /* X11.icns */, - 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */, - 02345980000FD03B11CA0E72 /* main.nib */, - ); - name = Resources; - sourceTree = ""; - }; - 20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */ = { - isa = PBXGroup; - children = ( - 52880C6E0DCFF906003407EC /* Sparkle.framework */, - 50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */, - 570C5748047186C400ACF82F /* SystemConfiguration.framework */, - ); - name = "External Frameworks and Libraries"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 527F24170B5D938C007840A7 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 527F24160B5D938C007840A7 /* X11 */ = { - isa = PBXNativeTarget; - buildConfigurationList = 527F24220B5D938C007840A7 /* Build configuration list for PBXNativeTarget "X11" */; - buildPhases = ( - 527F24170B5D938C007840A7 /* Headers */, - 52880C8C0DCFF9FC003407EC /* CopyFiles */, - 527F24180B5D938C007840A7 /* Resources */, - 527F241C0B5D938C007840A7 /* Sources */, - 527F241E0B5D938C007840A7 /* Frameworks */, - 527F24210B5D938C007840A7 /* Rez */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = X11; - productName = X11; - productReference = 527F24270B5D938C007840A7 /* X11.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 20286C28FDCF999611CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 527F24080B5D8FFC007840A7 /* Build configuration list for PBXProject "X11" */; - compatibilityVersion = "Xcode 2.4"; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - da, - Dutch, - fi, - Italian, - ko, - no, - pl, - pt, - pt_PT, - ru, - Spanish, - sv, - zh_CN, - zh_TW, - ); - mainGroup = 20286C29FDCF999611CA2CEA /* X11 */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 527F24160B5D938C007840A7 /* X11 */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 527F24180B5D938C007840A7 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 527F24370B5D9D89007840A7 /* Info.plist in Resources */, - 527F24190B5D938C007840A7 /* InfoPlist.strings in Resources */, - 527F241A0B5D938C007840A7 /* main.nib in Resources */, - 527F241B0B5D938C007840A7 /* X11.icns in Resources */, - 52D9C0ED0BCDDF6B00CD2AFC /* Localizable.strings in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXRezBuildPhase section */ - 527F24210B5D938C007840A7 /* Rez */ = { - isa = PBXRezBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXRezBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 527F241C0B5D938C007840A7 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 527F241D0B5D938C007840A7 /* bundle-main.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 02345980000FD03B11CA0E72 /* main.nib */ = { - isa = PBXVariantGroup; - children = ( - 1870340FFE93FCAF11CA0CD7 /* English */, - 3FB03E680D1B6C34005958A5 /* da */, - 3FB03E690D1B6C34005958A5 /* Dutch */, - 3FB03E6A0D1B6C34005958A5 /* fi */, - 3FB03E6B0D1B6C34005958A5 /* French */, - 3FB03E6C0D1B6C34005958A5 /* German */, - 3FB03E6D0D1B6C34005958A5 /* Italian */, - 3FB03E6E0D1B6C34005958A5 /* Japanese */, - 3FB03E6F0D1B6C34005958A5 /* ko */, - 3FB03E700D1B6C34005958A5 /* no */, - 3FB03E710D1B6C34005958A5 /* pl */, - 3FB03E720D1B6C34005958A5 /* pt */, - 3FB03E730D1B6C34005958A5 /* pt_PT */, - 3FB03E740D1B6C34005958A5 /* ru */, - 3FB03E750D1B6C34005958A5 /* Spanish */, - 3FB03E760D1B6C34005958A5 /* sv */, - 3FB03E770D1B6C34005958A5 /* zh_CN */, - 3FB03E780D1B6C34005958A5 /* zh_TW */, - ); - name = main.nib; - sourceTree = ""; - }; - 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 0867D6ABFE840B52C02AAC07 /* English */, - 3FB03E570D1B6C17005958A5 /* da */, - 3FB03E580D1B6C17005958A5 /* Dutch */, - 3FB03E590D1B6C17005958A5 /* fi */, - 3FB03E5A0D1B6C17005958A5 /* French */, - 3FB03E5B0D1B6C17005958A5 /* German */, - 3FB03E5C0D1B6C17005958A5 /* Italian */, - 3FB03E5D0D1B6C17005958A5 /* Japanese */, - 3FB03E5E0D1B6C17005958A5 /* ko */, - 3FB03E5F0D1B6C17005958A5 /* no */, - 3FB03E600D1B6C17005958A5 /* pl */, - 3FB03E610D1B6C17005958A5 /* pt */, - 3FB03E620D1B6C17005958A5 /* pt_PT */, - 3FB03E630D1B6C17005958A5 /* ru */, - 3FB03E640D1B6C17005958A5 /* Spanish */, - 3FB03E650D1B6C17005958A5 /* sv */, - 3FB03E660D1B6C17005958A5 /* zh_CN */, - 3FB03E670D1B6C17005958A5 /* zh_TW */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 52D9C0EB0BCDDF6B00CD2AFC /* Localizable.strings */ = { - isa = PBXVariantGroup; - children = ( - 52D9C0EC0BCDDF6B00CD2AFC /* English */, - 3FB03E460D1B6C05005958A5 /* da */, - 3FB03E470D1B6C05005958A5 /* Dutch */, - 3FB03E480D1B6C05005958A5 /* fi */, - 3FB03E490D1B6C05005958A5 /* French */, - 3FB03E4A0D1B6C05005958A5 /* German */, - 3FB03E4B0D1B6C05005958A5 /* Italian */, - 3FB03E4C0D1B6C05005958A5 /* Japanese */, - 3FB03E4D0D1B6C05005958A5 /* ko */, - 3FB03E4E0D1B6C05005958A5 /* no */, - 3FB03E4F0D1B6C05005958A5 /* pl */, - 3FB03E500D1B6C05005958A5 /* pt */, - 3FB03E510D1B6C05005958A5 /* pt_PT */, - 3FB03E520D1B6C05005958A5 /* ru */, - 3FB03E530D1B6C05005958A5 /* Spanish */, - 3FB03E540D1B6C05005958A5 /* sv */, - 3FB03E550D1B6C05005958A5 /* zh_CN */, - 3FB03E560D1B6C05005958A5 /* zh_TW */, - ); - name = Localizable.strings; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 527F24090B5D8FFC007840A7 /* Development */ = { - isa = XCBuildConfiguration; - buildSettings = { - INSTALL_MODE_FLAG = "a+rX"; - }; - name = Development; - }; - 527F240A0B5D8FFC007840A7 /* Deployment */ = { - isa = XCBuildConfiguration; - buildSettings = { - INSTALL_MODE_FLAG = "a+rX"; - }; - name = Deployment; - }; - 527F240B0B5D8FFC007840A7 /* Default */ = { - isa = XCBuildConfiguration; - buildSettings = { - INSTALL_MODE_FLAG = "a+rX"; - }; - name = Default; - }; - 527F24230B5D938C007840A7 /* Development */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", - ); - FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\""; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = /usr/X11/include; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = /usr/X11; - LIBRARY_SEARCH_PATHS = /usr/X11/lib; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ( - "-lXau", - "-lxcb", - "-lX11", - ); - OTHER_REZFLAGS = ""; - PRODUCT_NAME = X11; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - WRAPPER_EXTENSION = app; - }; - name = Development; - }; - 527F24240B5D938C007840A7 /* Deployment */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", - ); - FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\""; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = /usr/X11/include; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = /usr/X11; - LIBRARY_SEARCH_PATHS = /usr/X11/lib; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ( - "-lXau", - "-lxcb", - "-lX11", - ); - OTHER_REZFLAGS = ""; - PRODUCT_NAME = X11; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - WRAPPER_EXTENSION = app; - }; - name = Deployment; - }; - 527F24250B5D938C007840A7 /* Default */ = { - isa = XCBuildConfiguration; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", - ); - FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\""; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = /usr/X11/include; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = /usr/X11; - LIBRARY_SEARCH_PATHS = /usr/X11/lib; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ( - "-lXau", - "-lxcb", - "-lX11", - ); - OTHER_REZFLAGS = ""; - PRODUCT_NAME = X11; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - WRAPPER_EXTENSION = app; - }; - name = Default; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 527F24080B5D8FFC007840A7 /* Build configuration list for PBXProject "X11" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 527F24090B5D8FFC007840A7 /* Development */, - 527F240A0B5D8FFC007840A7 /* Deployment */, - 527F240B0B5D8FFC007840A7 /* Default */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Default; - }; - 527F24220B5D938C007840A7 /* Build configuration list for PBXNativeTarget "X11" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 527F24230B5D938C007840A7 /* Development */, - 527F24240B5D938C007840A7 /* Deployment */, - 527F24250B5D938C007840A7 /* Default */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Default; - }; -/* End XCConfigurationList section */ - }; - rootObject = 20286C28FDCF999611CA2CEA /* Project object */; -} From 077ced6384abad78253e857091e78f3685965b9d Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Tue, 6 May 2008 02:47:03 -0700 Subject: [PATCH 461/634] XQuartz: Added uncommitted files (cherry picked from commit e414ec462cfc63f8eb7f504f526f5a2c73f51e69) --- hw/xquartz/bundle/PkgInfo | 1 + hw/xquartz/bundle/mk_bundke.sh | 35 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 hw/xquartz/bundle/PkgInfo create mode 100755 hw/xquartz/bundle/mk_bundke.sh diff --git a/hw/xquartz/bundle/PkgInfo b/hw/xquartz/bundle/PkgInfo new file mode 100644 index 000000000..b8e0aec42 --- /dev/null +++ b/hw/xquartz/bundle/PkgInfo @@ -0,0 +1 @@ +APPLx11a \ No newline at end of file diff --git a/hw/xquartz/bundle/mk_bundke.sh b/hw/xquartz/bundle/mk_bundke.sh new file mode 100755 index 000000000..4b79771dc --- /dev/null +++ b/hw/xquartz/bundle/mk_bundke.sh @@ -0,0 +1,35 @@ +#!/bin/sh +# +# 'Cause xcodebuild is hard to deal with + +BUNDLE_ROOT=$1 + +mkdir -p ${BUNDLE_ROOT}/Contents/MacOS +[ -d ${BUNDLE_ROOT}/Contents/MacOS ] || exit 1 + +mkdir -p ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib +[ -d ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib ] || exit 1 + +if [[ $(id -u) == 0 ]] ; then + OWNERSHIP="-o root -g admin" +else + OWNERSHIP="" +fi + +localities="Dutch English French German Italian Japanese Spanish da fi ko no pl pt pt_PT ru sv zh_CN zh_TW" +for lang in ${localities} ; do + for f in InfoPlist.strings Localizable.strings main.nib/keyedobjects.nib ; do + if [[ $(id -u) == 0 ]] ; then + install $(OWNERSHIP) -m 644 Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f} + else + install $(OWNERSHIP) -m 644 Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f} + fi + done +done + +install $(OWNERSHIP) -m 644 Resources/English.lproj/main.nib//designable.nib ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib +install $(OWNERSHIP) -m 644 Resources/X11.icns ${BUNDLE_ROOT}/Contents/Resources + +install $(OWNERSHIP) -m 644 Info.plist ${BUNDLE_ROOT}/Contents +install $(OWNERSHIP) -m 644 PkgInfo ${BUNDLE_ROOT}/Contents + From a85d3ac87cc354093bb1e88697c44254e7721bb9 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Tue, 6 May 2008 02:59:13 -0700 Subject: [PATCH 462/634] XQuartz: Fixed typo (cherry picked from commit 56b7988d2662caa4d31094695b414080e4470ed4) --- hw/xquartz/bundle/mk_bundke.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/xquartz/bundle/mk_bundke.sh b/hw/xquartz/bundle/mk_bundke.sh index 4b79771dc..750af9cea 100755 --- a/hw/xquartz/bundle/mk_bundke.sh +++ b/hw/xquartz/bundle/mk_bundke.sh @@ -20,16 +20,15 @@ localities="Dutch English French German Italian Japanese Spanish da fi ko no pl for lang in ${localities} ; do for f in InfoPlist.strings Localizable.strings main.nib/keyedobjects.nib ; do if [[ $(id -u) == 0 ]] ; then - install $(OWNERSHIP) -m 644 Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f} + install ${OWNERSHIP} -m 644 Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f} else - install $(OWNERSHIP) -m 644 Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f} + install ${OWNERSHIP} -m 644 Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f} fi done done -install $(OWNERSHIP) -m 644 Resources/English.lproj/main.nib//designable.nib ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib -install $(OWNERSHIP) -m 644 Resources/X11.icns ${BUNDLE_ROOT}/Contents/Resources - -install $(OWNERSHIP) -m 644 Info.plist ${BUNDLE_ROOT}/Contents -install $(OWNERSHIP) -m 644 PkgInfo ${BUNDLE_ROOT}/Contents +install ${OWNERSHIP} -m 644 Resources/English.lproj/main.nib//designable.nib ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib +install ${OWNERSHIP} -m 644 Resources/X11.icns ${BUNDLE_ROOT}/Contents/Resources +install ${OWNERSHIP} -m 644 Info.plist ${BUNDLE_ROOT}/Contents +install ${OWNERSHIP} -m 644 PkgInfo ${BUNDLE_ROOT}/Contents From 718652eaf9221e0eeec2c971dd7baa97f827451b Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 6 May 2008 17:52:37 -0400 Subject: [PATCH 463/634] Bug #13104: Don't let XAA glyph pixmaps anywhere near video memory. Since glyphs are stored in pixmaps now, they can make their way into VRAM, which invalidates a bunch of fast-path assumptions in the XAA code. Thus you end up doing color-expands or WriteBitmap from la-la land and your aliased glyphs go all funny. Since XAA isn't ever growing the ability to do sane glyph accel, just force glyph pixmaps into host memory by catching them at CreatePixmap time. --- hw/xfree86/xaa/xaaInit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/xaa/xaaInit.c b/hw/xfree86/xaa/xaaInit.c index 892cbcfc3..22a35a0a0 100644 --- a/hw/xfree86/xaa/xaaInit.c +++ b/hw/xfree86/xaa/xaaInit.c @@ -342,7 +342,9 @@ XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint) if (!infoRec->offscreenDepthsInitialized) XAAInitializeOffscreenDepths (pScreen); - if(pScrn->vtSema && (infoRec->offscreenDepths & (1 << (depth - 1))) && + if(pScrn->vtSema && + (usage_hint != CREATE_PIXMAP_USAGE_GLYPH_PICTURE) && + (infoRec->offscreenDepths & (1 << (depth - 1))) && (size >= MIN_OFFPIX_SIZE) && !SwitchedOut && (!infoRec->maxOffPixWidth || (w <= infoRec->maxOffPixWidth)) && (!infoRec->maxOffPixHeight || (h <= infoRec->maxOffPixHeight)) ) From b6a0c6d4864f73a18beb841b16e9be56f2fcd77e Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 6 May 2008 17:06:34 -0700 Subject: [PATCH 464/634] Allow using libmd instead of libcrypto for SHA1 hashing in render/glyph.c Builders can force one or the other by passing SHA1_LIB & SHA1_CFLAGS to configure --- configure.ac | 22 ++++++++++++++++------ include/dix-config.h.in | 3 +++ render/glyph.c | 17 +++++++++++++++-- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 9b7753492..beef3a21e 100644 --- a/configure.ac +++ b/configure.ac @@ -1137,15 +1137,25 @@ PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS]) # OpenSSL used for SHA1 hashing in render/glyph.c, but we don't need all of # the OpenSSL libraries, just libcrypto -PKG_CHECK_EXISTS([openssl], - [PKG_CHECK_MODULES([OPENSSL], [openssl], +# Some systems have matching functionality in the smaller/simpler libmd +# Builders who want to force a choice can set SHA1_LIB and SHA1_CFLAGS +if test "x$SHA1_LIB" = "x" ; then + AC_CHECK_LIB([md], [SHA1Init], [SHA1_LIB="-lmd" + AC_DEFINE([HAVE_SHA1_IN_LIBMD], [1], + [Define to use libmd SHA1 functions instead of OpenSSL libcrypto])]) +fi +if test "x$SHA1_LIB" = "x" ; then + PKG_CHECK_EXISTS([openssl], + [PKG_CHECK_MODULES([OPENSSL], [openssl], [OPENSSL_LIB_FLAGS=`$PKG_CONFIG --libs-only-L --libs-only-other openssl`])]) -LIBCRYPTO="$OPENSSL_LIB_FLAGS -lcrypto" + SHA1_LIB="$OPENSSL_LIB_FLAGS -lcrypto" + SHA1_CFLAGS="$OPENSSL_CFLAGS" +fi # Autotools has some unfortunate issues with library handling. In order to # get a server to rebuild when a dependency in the tree is changed, it must # be listed in SERVERNAME_DEPENDENCIES. However, no system libraries may be -# listed there, or some versions of autotols will break (especially if a -L +# listed there, or some versions of autotools will break (especially if a -L # is required to find the library). So, we keep two sets of libraries # detected: NAMESPACE_LIBS for in-tree libraries to be linked against, which # will go into the _DEPENDENCIES and _LDADD of the server, and @@ -1157,9 +1167,9 @@ LIBCRYPTO="$OPENSSL_LIB_FLAGS -lcrypto" # XSERVER_SYS_LIBS is the set of out-of-tree libraries which all servers # require. # -XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS} ${OPENSSL_CFLAGS}" +XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS} ${SHA1_CFLAGS}" XSERVER_LIBS="$DIX_LIB $CONFIG_LIB $MI_LIB $OS_LIB" -XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS} ${LIBCRYPTO}" +XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS} ${SHA1_LIB}" AC_SUBST([XSERVER_LIBS]) AC_SUBST([XSERVER_SYS_LIBS]) diff --git a/include/dix-config.h.in b/include/dix-config.h.in index fc1caa31a..387f65aa1 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -193,6 +193,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_RPCSVC_DBM_H +/* Define to use libmd SHA1 functions instead of OpenSSL libcrypto */ +#undef HAVE_SHA1_IN_LIBMD + /* Define to 1 if you have the `shmctl64' function. */ #undef HAVE_SHMCTL64 diff --git a/render/glyph.c b/render/glyph.c index 286e39d63..de0197083 100644 --- a/render/glyph.c +++ b/render/glyph.c @@ -26,8 +26,12 @@ #include #endif -#include /* buggy openssl/sha.h wants size_t */ -#include +#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */ +# include +#else /* Use OpenSSL's libcrypto */ +# include /* buggy openssl/sha.h wants size_t */ +# include +#endif #include "misc.h" #include "scrnintstr.h" @@ -202,6 +206,14 @@ HashGlyph (xGlyphInfo *gi, unsigned long size, unsigned char sha1[20]) { +#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */ + SHA1_CTX ctx; + + SHA1Init (&ctx); + SHA1Update (&ctx, gi, sizeof (xGlyphInfo)); + SHA1Update (&ctx, bits, size); + SHA1Final (sha1, &ctx); +#else /* Use OpenSSL's libcrypto */ SHA_CTX ctx; int success; @@ -220,6 +232,7 @@ HashGlyph (xGlyphInfo *gi, success = SHA1_Final (sha1, &ctx); if (! success) return BadAlloc; +#endif return Success; } From 26188875de1ccc84ac60bfb251e3ec43de2b9e22 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 7 May 2008 13:13:57 +0930 Subject: [PATCH 465/634] config: deprecate (and ignore) the use of input.xkb.whatever options. These options are still sent by some HAL implementations (e.g. HAL on FC8), and may overwrite the options set in the x11-input.fdi file. For a more detailed description of why see Bug #13037, comment 42. X.Org Bug 13037 --- config/hal.c | 27 +++++---------------------- config/x11-input.fdi | 16 +++++++++------- 2 files changed, 14 insertions(+), 29 deletions(-) diff --git a/config/hal.c b/config/hal.c index f15064646..05a02ccbf 100644 --- a/config/hal.c +++ b/config/hal.c @@ -167,7 +167,7 @@ device_added(LibHalContext *hal_ctx, const char *udi) LibHalPropertySet *set = NULL; LibHalPropertySetIterator set_iter; - char *psi_key = NULL, *tmp_val, *tmp_key; + char *psi_key = NULL, *tmp_val; dbus_error_init(&error); @@ -244,27 +244,10 @@ device_added(LibHalContext *hal_ctx, const char *udi) add_option(&options, psi_key + sizeof(LIBHAL_PROP_KEY)-1, tmp_val); xfree(tmp_val); } - - /* evdev's XKB options... we should probably depreciate this usage */ - } else if (!strncasecmp(psi_key, LIBHAL_XKB_PROP_KEY, sizeof(LIBHAL_XKB_PROP_KEY)-1)){ - - /* only support strings for all values */ - tmp_val = get_prop_string(hal_ctx, udi, psi_key); - - if (tmp_val){ - /* add "xkb_" + NULL */ - tmp_key = xalloc(strlen(psi_key) - ( sizeof(LIBHAL_XKB_PROP_KEY) - 1) + 5); - - if (!tmp_key){ - LogMessage(X_ERROR, "config/hal: couldn't allocate memory for option %s\n", psi_key); - } else { - sprintf(tmp_key, "xkb_%s", psi_key + sizeof(LIBHAL_XKB_PROP_KEY)-1); - add_option(&options, tmp_key, tmp_val); - - xfree(tmp_key); - } - xfree(tmp_val); - } + } /* don't accept input.xkb.whatever options anymore */ + else if (!strncasecmp(psi_key, LIBHAL_XKB_PROP_KEY, sizeof(LIBHAL_XKB_PROP_KEY)-1)){ + LogMessage(X_ERROR, "config/hal: Option '%s' is " + "deprecated (ignoring).\n", psi_key); } } diff --git a/config/x11-input.fdi b/config/x11-input.fdi index f2e2d50ab..85d7a1fe1 100644 --- a/config/x11-input.fdi +++ b/config/x11-input.fdi @@ -26,19 +26,21 @@ Do not specify "input.x11_options.Device" since "input.device" will be used automatically. - Legacy Keys + + XKB configuration: + "input.x11_options.XkbRules" + "input.x11_options.XkbModel" + "input.x11_options.XkbLayout" + "input.x11_options.XkbVariant" + "input.x11_options.XkbOptions" + + Legacy Keys (deprecated and ignored by the server): "input.xkb.rules" "input.xkb.model" "input.xkb.layout" "input.xkb.variant" "input.xkb.options" - These keys are deprecated. Use these instead: - "input.x11_options.XkbRules" - "input.x11_options.XkbModel" - "input.x11_options.XkbLayout" - "input.x11_options.XkbVariant" - "input.x11_options.XkbOptions" See the evdev documentation for more information. From 9c2e0871cfbe54e73eec1f790a7e383d08555055 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 7 May 2008 13:21:26 -0400 Subject: [PATCH 466/634] Bug #13104: XAA: Adapt to glyph storage changes. Glyph bits are now stored in a proper pixmap, not just hanging off the end of a GlyphRec. --- hw/xfree86/xaa/xaaPict.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/xaa/xaaPict.c b/hw/xfree86/xaa/xaaPict.c index 74e90e3b6..76fcf09ce 100644 --- a/hw/xfree86/xaa/xaaPict.c +++ b/hw/xfree86/xaa/xaaPict.c @@ -660,7 +660,7 @@ XAADoGlyphs (CARD8 op, pnt = pntr + (row * pitch) + (column >> 5); column &= 31; dwords = ((w + 31) >> 5) - 1; - bits = (CARD32*)(glyph + 1); + bits = (CARD32 *)GlyphPixmap(glyph)[pScreen->myNum]->devPrivate.ptr; if(dwords) { while(h--) { for(i = 0; i <= dwords; i++) { From 268d61e00cf4bc52c05f19eda7ab4f6accce12c8 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 7 May 2008 22:28:45 +0300 Subject: [PATCH 467/634] GL: Make errors non-fatal GLX, there's more to the world than just you. If you fail to load the software renderer, don't bring the entire server down. The error path probably needs better testing on this one, but it seems mostly okay to me. --- GL/glx/glxext.c | 2 +- GL/glx/glxglcore.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GL/glx/glxext.c b/GL/glx/glxext.c index 85d8debd4..1cbc27953 100644 --- a/GL/glx/glxext.c +++ b/GL/glx/glxext.c @@ -288,7 +288,7 @@ void GlxExtensionInit(void) __glXDispatch, ResetExtension, StandardMinorOpcode); if (!extEntry) { - FatalError("__glXExtensionInit: AddExtensions failed\n"); + ErrorF("__glXExtensionInit: AddExtensions failed\n"); return; } if (!AddExtensionAlias(GLX_EXTENSION_ALIAS, extEntry)) { diff --git a/GL/glx/glxglcore.c b/GL/glx/glxglcore.c index dafa9bca7..00279b73a 100644 --- a/GL/glx/glxglcore.c +++ b/GL/glx/glxglcore.c @@ -510,7 +510,7 @@ handle_error: xfree(screen); - FatalError("GLX: could not load software renderer\n"); + ErrorF("GLX: could not load software renderer\n"); return NULL; } From 641a5f955b7b3ae04eeb6bc45fb30b0b531898e4 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 7 May 2008 22:29:04 +0300 Subject: [PATCH 468/634] Build: Ensure xf86DefModeSet.c ends in an empty line This shuts up a warning. --- hw/xfree86/common/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am index 0f44075ba..c4be599f1 100644 --- a/hw/xfree86/common/Makefile.am +++ b/hw/xfree86/common/Makefile.am @@ -25,6 +25,7 @@ MODEDEFSOURCES = $(srcdir)/vesamodes $(srcdir)/extramodes xf86DefModeSet.c: $(srcdir)/modeline2c.awk $(MODEDEFSOURCES) cat $(MODEDEFSOURCES) | $(AWK) -f $(srcdir)/modeline2c.awk > $@ + echo >> $@ BUILT_SOURCES = xf86DefModeSet.c From cf20df39cc78203d17b99223908af388ecbf7d0e Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 7 May 2008 22:24:19 +0300 Subject: [PATCH 469/634] XKB: Actually explain keymap failures When something went wrong building a keymap, try to explain to the user what it actually was, instead of the dreaded 'Failed to load XKB keymap' catch-all. --- xkb/ddxLoad.c | 54 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c index d80ce62b8..1fb097987 100644 --- a/xkb/ddxLoad.c +++ b/xkb/ddxLoad.c @@ -274,7 +274,7 @@ char tmpname[PATH_MAX]; return True; } else - DebugF("Error compiling keymap (%s)\n",keymap); + LogMessage(X_ERROR, "Error compiling keymap (%s)\n", keymap); #ifdef WIN32 /* remove the temporary file */ unlink(tmpname); @@ -282,9 +282,9 @@ char tmpname[PATH_MAX]; } else { #ifndef WIN32 - DebugF("Could not invoke keymap compiler\n"); + LogMessage(X_ERROR, "XKB: Could not invoke xkbcomp\n"); #else - DebugF("Could not open file %s\n", tmpname); + LogMessage(X_ERROR, "Could not open file %s\n", tmpname); #endif } if (nameRtrn) @@ -350,11 +350,13 @@ unsigned missing; if ((names->keycodes==NULL)&&(names->types==NULL)&& (names->compat==NULL)&&(names->symbols==NULL)&& (names->geometry==NULL)) { + LogMessage(X_ERROR, "XKB: No components provided for device %s\n", + keybd->name); return 0; } else if (!XkbDDXCompileKeymapByNames(xkb,names,want,need, nameRtrn,nameRtrnLen)){ - DebugF("Couldn't compile keymap file\n"); + LogMessage(X_ERROR, "XKB: Couldn't compile keymap\n"); return 0; } file= XkbDDXOpenConfigFile(nameRtrn,fileName,PATH_MAX); @@ -369,7 +371,7 @@ unsigned missing; (void) unlink (fileName); return 0; } - else if (xkbDebugFlags) { + else { DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,(*xkbRtrn)->defined); } fclose(file); @@ -390,32 +392,40 @@ XkbRF_RulesPtr rules; if (!rules_name) return False; - if (XkbBaseDirectory==NULL) { - if (strlen(rules_name)+7 > PATH_MAX) - return False; - sprintf(buf,"rules/%s",rules_name); + + if (strlen(XkbBaseDirectory) + strlen(rules_name) + 8 > PATH_MAX) { + LogMessage(X_ERROR, "XKB: Rules name is too long\n"); + return False; } - else { - if (strlen(XkbBaseDirectory)+strlen(rules_name)+8 > PATH_MAX) - return False; - sprintf(buf,"%s/rules/%s",XkbBaseDirectory,rules_name); - } - if ((file= fopen(buf,"r"))==NULL) + sprintf(buf,"%s/rules/%s", XkbBaseDirectory, rules_name); + + file = fopen(buf, "r"); + if (!file) { + LogMessage(X_ERROR, "XKB: Couldn't open rules file %s\n", file); return False; - if ((rules= XkbRF_Create(0,0))==NULL) { + } + + rules = XkbRF_Create(0, 0); + if (!rules) { + LogMessage(X_ERROR, "XKB: Couldn't create rules struct\n"); fclose(file); return False; } - if (!XkbRF_LoadRules(file,rules)) { + + if (!XkbRF_LoadRules(file, rules)) { + LogMessage(X_ERROR, "XKB: Couldn't parse rules file %s\n", rules_name); fclose(file); XkbRF_Free(rules,True); return False; } - bzero((char *)names,sizeof(XkbComponentNamesRec)); - complete= XkbRF_GetComponents(rules,defs,names); + + memset(names, 0, sizeof(*names)); + complete = XkbRF_GetComponents(rules,defs,names); fclose(file); - XkbRF_Free(rules,True); + XkbRF_Free(rules, True); + + if (!complete) + LogMessage(X_ERROR, "XKB: Rules returned no components\n"); + return complete; } - - From 1a314a1ef06222977e7ccb94331ce31c17534b2a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 8 May 2008 13:16:48 +0930 Subject: [PATCH 470/634] Revert "config: deprecate (and ignore) the use of input.xkb.whatever options." daniels: "Hrm, I'd prefer to have input.xkb.{m,l,v,o} be the primary keys, and have input.x11_options be a backup for that, rather than the former being deprecated, for the reasons I listed earlier ..." see http://bugs.freedesktop.org/show_bug.cgi?id=13037#c51 This reverts commit 26188875de1ccc84ac60bfb251e3ec43de2b9e22. --- config/hal.c | 27 ++++++++++++++++++++++----- config/x11-input.fdi | 16 +++++++--------- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/config/hal.c b/config/hal.c index 05a02ccbf..f15064646 100644 --- a/config/hal.c +++ b/config/hal.c @@ -167,7 +167,7 @@ device_added(LibHalContext *hal_ctx, const char *udi) LibHalPropertySet *set = NULL; LibHalPropertySetIterator set_iter; - char *psi_key = NULL, *tmp_val; + char *psi_key = NULL, *tmp_val, *tmp_key; dbus_error_init(&error); @@ -244,10 +244,27 @@ device_added(LibHalContext *hal_ctx, const char *udi) add_option(&options, psi_key + sizeof(LIBHAL_PROP_KEY)-1, tmp_val); xfree(tmp_val); } - } /* don't accept input.xkb.whatever options anymore */ - else if (!strncasecmp(psi_key, LIBHAL_XKB_PROP_KEY, sizeof(LIBHAL_XKB_PROP_KEY)-1)){ - LogMessage(X_ERROR, "config/hal: Option '%s' is " - "deprecated (ignoring).\n", psi_key); + + /* evdev's XKB options... we should probably depreciate this usage */ + } else if (!strncasecmp(psi_key, LIBHAL_XKB_PROP_KEY, sizeof(LIBHAL_XKB_PROP_KEY)-1)){ + + /* only support strings for all values */ + tmp_val = get_prop_string(hal_ctx, udi, psi_key); + + if (tmp_val){ + /* add "xkb_" + NULL */ + tmp_key = xalloc(strlen(psi_key) - ( sizeof(LIBHAL_XKB_PROP_KEY) - 1) + 5); + + if (!tmp_key){ + LogMessage(X_ERROR, "config/hal: couldn't allocate memory for option %s\n", psi_key); + } else { + sprintf(tmp_key, "xkb_%s", psi_key + sizeof(LIBHAL_XKB_PROP_KEY)-1); + add_option(&options, tmp_key, tmp_val); + + xfree(tmp_key); + } + xfree(tmp_val); + } } } diff --git a/config/x11-input.fdi b/config/x11-input.fdi index 85d7a1fe1..f2e2d50ab 100644 --- a/config/x11-input.fdi +++ b/config/x11-input.fdi @@ -26,21 +26,19 @@ Do not specify "input.x11_options.Device" since "input.device" will be used automatically. - - XKB configuration: - "input.x11_options.XkbRules" - "input.x11_options.XkbModel" - "input.x11_options.XkbLayout" - "input.x11_options.XkbVariant" - "input.x11_options.XkbOptions" - - Legacy Keys (deprecated and ignored by the server): + Legacy Keys "input.xkb.rules" "input.xkb.model" "input.xkb.layout" "input.xkb.variant" "input.xkb.options" + These keys are deprecated. Use these instead: + "input.x11_options.XkbRules" + "input.x11_options.XkbModel" + "input.x11_options.XkbLayout" + "input.x11_options.XkbVariant" + "input.x11_options.XkbOptions" See the evdev documentation for more information. From 1f54c05cf8a6b82e5fc6362f7f8e8fdc2444b9e8 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 8 May 2008 14:05:56 +0930 Subject: [PATCH 471/634] config: remove trailing whitespaces. It makes my vim look ugly. Put "let c_space_errors=1" into your .vimrc. --- config/hal.c | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/config/hal.c b/config/hal.c index f15064646..7794d8e8a 100644 --- a/config/hal.c +++ b/config/hal.c @@ -119,7 +119,7 @@ get_prop_string(LibHalContext *hal_ctx, const char *udi, const char *name) return ret; } -/* this function is no longer used... keep it here in case its needed in +/* this function is no longer used... keep it here in case its needed in * the future. */ #if 0 static char * @@ -155,7 +155,7 @@ get_prop_string_array(LibHalContext *hal_ctx, const char *udi, const char *prop) return ret; } -#endif +#endif static void device_added(LibHalContext *hal_ctx, const char *udi) @@ -164,12 +164,12 @@ device_added(LibHalContext *hal_ctx, const char *udi) InputOption *options = NULL, *tmpo = NULL; DeviceIntPtr dev; DBusError error; - + LibHalPropertySet *set = NULL; LibHalPropertySetIterator set_iter; char *psi_key = NULL, *tmp_val, *tmp_key; - - + + dbus_error_init(&error); driver = get_prop_string(hal_ctx, udi, "input.x11_driver"); @@ -178,13 +178,13 @@ device_added(LibHalContext *hal_ctx, const char *udi) LogMessageVerb(X_INFO,7,"config/hal: no driver specified for device %s\n", udi); goto unwind; } - + path = get_prop_string(hal_ctx, udi, "input.device"); if (!path) { LogMessage(X_WARNING,"config/hal: no driver or path specified for %s\n", udi); goto unwind; } - + name = get_prop_string(hal_ctx, udi, "info.product"); if (!name) name = xstrdup("(unnamed)"); @@ -194,7 +194,7 @@ device_added(LibHalContext *hal_ctx, const char *udi) LogMessage(X_ERROR, "config/hal: couldn't allocate space for input options!\n"); goto unwind; } - + options->key = xstrdup("_source"); options->value = xstrdup("server/hal"); if (!options->key || !options->value) { @@ -202,14 +202,14 @@ device_added(LibHalContext *hal_ctx, const char *udi) goto unwind; } - /* most drivers use device.. not path. evdev uses both however, but the + /* most drivers use device.. not path. evdev uses both however, but the * path version isn't documented apparently. support both for now. */ add_option(&options, "path", path); add_option(&options, "device", path); - + add_option(&options, "driver", driver); add_option(&options, "name", name); - + config_info = xalloc(strlen(udi) + 5); /* "hal:" and NULL */ if (!config_info) { LogMessage(X_ERROR, "config/hal: couldn't allocate name\n"); @@ -220,58 +220,58 @@ device_added(LibHalContext *hal_ctx, const char *udi) /* ok, grab options from hal.. iterate through all properties * and lets see if any of them are options that we can add */ set = libhal_device_get_all_properties(hal_ctx, udi, &error); - + if (!set) { LogMessage(X_ERROR, "config/hal: couldn't get property list for %s: %s (%s)\n", udi, error.name, error.message); goto unwind; } - + libhal_psi_init(&set_iter,set); while (libhal_psi_has_more(&set_iter)) { /* we are looking for supported keys.. extract and add to options */ - psi_key = libhal_psi_get_key(&set_iter); - + psi_key = libhal_psi_get_key(&set_iter); + if (psi_key){ /* normal options first (input.x11_options.) */ if (!strncasecmp(psi_key, LIBHAL_PROP_KEY, sizeof(LIBHAL_PROP_KEY)-1)){ - + /* only support strings for all values */ tmp_val = get_prop_string(hal_ctx, udi, psi_key); - + if (tmp_val){ add_option(&options, psi_key + sizeof(LIBHAL_PROP_KEY)-1, tmp_val); xfree(tmp_val); } - + /* evdev's XKB options... we should probably depreciate this usage */ } else if (!strncasecmp(psi_key, LIBHAL_XKB_PROP_KEY, sizeof(LIBHAL_XKB_PROP_KEY)-1)){ - + /* only support strings for all values */ tmp_val = get_prop_string(hal_ctx, udi, psi_key); - + if (tmp_val){ /* add "xkb_" + NULL */ tmp_key = xalloc(strlen(psi_key) - ( sizeof(LIBHAL_XKB_PROP_KEY) - 1) + 5); - + if (!tmp_key){ LogMessage(X_ERROR, "config/hal: couldn't allocate memory for option %s\n", psi_key); } else { sprintf(tmp_key, "xkb_%s", psi_key + sizeof(LIBHAL_XKB_PROP_KEY)-1); add_option(&options, tmp_key, tmp_val); - + xfree(tmp_key); } xfree(tmp_val); - } + } } } - + /* psi_key doesn't need to be freed */ libhal_psi_next(&set_iter); } - + /* this isn't an error, but how else do you output something that the user can see? */ LogMessage(X_INFO, "config/hal: Adding input device %s\n", name); if (NewInputDeviceRequest(options, &dev) != Success) { @@ -413,7 +413,7 @@ config_hal_init(void) /* verbose message */ LogMessageVerb(X_INFO,7,"config/hal: initialized"); - + return 1; } From fc35d1e3be201e3821413bb2eeb8d43e1e56ba17 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 8 May 2008 16:58:31 +0930 Subject: [PATCH 472/634] config: override xkb_{r,m,l,v} with Xkb{r,m,l,v} if the latter is set. The HAL spec says that input.xkb.{rmlv}* can be sent, but if the user specifies a X-specific {rmlv}, then this is overridden through the use of input.x11_options.Xkb{RMLV}. However, the way how the server parses options--by ignoring capitalisation, underscores and spaces--the HAL and the x11_options would override each other. So we simply filter the options, letting Xkb{RMLV} override xkb_{rmlv} and only actually add them to the device after parsing _all_ options. * rmlv ... rules, model, layout, variant See Bug 13037 --- config/hal.c | 100 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 87 insertions(+), 13 deletions(-) diff --git a/config/hal.c b/config/hal.c index 7794d8e8a..67ffa0304 100644 --- a/config/hal.c +++ b/config/hal.c @@ -48,6 +48,15 @@ struct config_hal_info { LibHalContext *hal_ctx; }; +/* Used for special handling of xkb options. */ +struct xkb_options { + char* layout; + char* model; + char* rules; + char* variant; +}; + + static void remove_device(DeviceIntPtr dev) { @@ -164,10 +173,11 @@ device_added(LibHalContext *hal_ctx, const char *udi) InputOption *options = NULL, *tmpo = NULL; DeviceIntPtr dev; DBusError error; + struct xkb_options xkb_opts = {0}; LibHalPropertySet *set = NULL; LibHalPropertySetIterator set_iter; - char *psi_key = NULL, *tmp_val, *tmp_key; + char *psi_key = NULL, *tmp_val; dbus_error_init(&error); @@ -241,27 +251,71 @@ device_added(LibHalContext *hal_ctx, const char *udi) tmp_val = get_prop_string(hal_ctx, udi, psi_key); if (tmp_val){ - add_option(&options, psi_key + sizeof(LIBHAL_PROP_KEY)-1, tmp_val); - xfree(tmp_val); - } + char* tmp; - /* evdev's XKB options... we should probably depreciate this usage */ + /* xkb needs special handling. HAL specs include + * input.xkb.xyz options, but the x11-input.fdi specifies + * input.x11_options.Xkbxyz options. By default, we use + * the former, unless the specific X11 ones are specified. + * Since we can't predict the order in which the keys + * arrive, we need to store them. + */ + if ((tmp = strcasestr(psi_key, "xkb"))) + { + if (!strcasecmp(&tmp[3], "layout")) + { + if (xkb_opts.layout) + xfree(xkb_opts.layout); + xkb_opts.layout = strdup(tmp_val); + } else if (!strcasecmp(&tmp[3], "model")) + { + if (xkb_opts.model) + xfree(xkb_opts.model); + xkb_opts.model = strdup(tmp_val); + } else if (!strcasecmp(&tmp[3], "rules")) + { + if (xkb_opts.rules) + xfree(xkb_opts.rules); + xkb_opts.rules = strdup(tmp_val); + } else if (!strcasecmp(&tmp[3], "variant")) + { + if (xkb_opts.variant) + xfree(xkb_opts.variant); + xkb_opts.variant = strdup(tmp_val); + } + } else + { + /* all others */ + add_option(&options, psi_key + sizeof(LIBHAL_PROP_KEY)-1, tmp_val); + xfree(tmp_val); + } + } } else if (!strncasecmp(psi_key, LIBHAL_XKB_PROP_KEY, sizeof(LIBHAL_XKB_PROP_KEY)-1)){ /* only support strings for all values */ tmp_val = get_prop_string(hal_ctx, udi, psi_key); if (tmp_val){ - /* add "xkb_" + NULL */ - tmp_key = xalloc(strlen(psi_key) - ( sizeof(LIBHAL_XKB_PROP_KEY) - 1) + 5); + char* tmp; - if (!tmp_key){ - LogMessage(X_ERROR, "config/hal: couldn't allocate memory for option %s\n", psi_key); - } else { - sprintf(tmp_key, "xkb_%s", psi_key + sizeof(LIBHAL_XKB_PROP_KEY)-1); - add_option(&options, tmp_key, tmp_val); + tmp = &psi_key[sizeof(LIBHAL_XKB_PROP_KEY) - 1]; - xfree(tmp_key); + if (!strcasecmp(tmp, "layout")) + { + if (!xkb_opts.layout) + xkb_opts.layout = strdup(tmp_val); + } else if (!strcasecmp(tmp, "rules")) + { + if (!xkb_opts.rules) + xkb_opts.rules = strdup(tmp_val); + } else if (!strcasecmp(tmp, "variant")) + { + if (!xkb_opts.variant) + xkb_opts.variant = strdup(tmp_val); + } else if (!strcasecmp(tmp, "model")) + { + if (!xkb_opts.model) + xkb_opts.model = strdup(tmp_val); } xfree(tmp_val); } @@ -272,6 +326,17 @@ device_added(LibHalContext *hal_ctx, const char *udi) libhal_psi_next(&set_iter); } + + /* Now add xkb options */ + if (xkb_opts.layout) + add_option(&options, "xkb_layout", xkb_opts.layout); + if (xkb_opts.rules) + add_option(&options, "xkb_rules", xkb_opts.rules); + if (xkb_opts.variant) + add_option(&options, "xkb_variant", xkb_opts.variant); + if (xkb_opts.model) + add_option(&options, "xkb_model", xkb_opts.model); + /* this isn't an error, but how else do you output something that the user can see? */ LogMessage(X_INFO, "config/hal: Adding input device %s\n", name); if (NewInputDeviceRequest(options, &dev) != Success) { @@ -304,6 +369,15 @@ unwind: xfree(tmpo); } + if (xkb_opts.layout) + xfree(xkb_opts.layout); + if (xkb_opts.rules) + xfree(xkb_opts.rules); + if (xkb_opts.model) + xfree(xkb_opts.model); + if (xkb_opts.variant) + xfree(xkb_opts.variant); + dbus_error_free(&error); return; From f17ba5d5849c92603f453195aca384844ca76d74 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 8 May 2008 16:04:24 -0400 Subject: [PATCH 473/634] Bug #13104: Remove broken XAA a1 glyph fast path. --- hw/xfree86/xaa/xaaPict.c | 144 --------------------------------------- 1 file changed, 144 deletions(-) diff --git a/hw/xfree86/xaa/xaaPict.c b/hw/xfree86/xaa/xaaPict.c index 76fcf09ce..784c649a4 100644 --- a/hw/xfree86/xaa/xaaPict.c +++ b/hw/xfree86/xaa/xaaPict.c @@ -588,150 +588,6 @@ XAADoGlyphs (CARD8 op, IS_OFFSCREEN_PIXMAP(pSrc->pDrawable)) return FALSE; - if(maskFormat && (maskFormat->depth == 1) && - (pSrc->pDrawable->width == 1) && (pSrc->pDrawable->height == 1) && - (op == PictOpOver) && infoRec->WriteBitmap && - !(infoRec->WriteBitmapFlags & NO_TRANSPARENCY)) - { - CARD16 red, green, blue, alpha; - CARD32 pixel = - *((CARD32*)(((PixmapPtr)(pSrc->pDrawable))->devPrivate.ptr)); - CARD32 *bits, *pntr, *pnt; - int x, y, i, n, left, top, right, bottom, width, height, pitch; - int L, T, R, B, X, Y, h, w, dwords, row, column, nbox; - int leftEdge, rightEdge, topLine, botLine; - BoxPtr pbox; - GlyphPtr glyph; - - if(!XAAGetRGBAFromPixel(pixel,&red,&green,&blue,&alpha,pSrc->format)) - return FALSE; - - if(alpha != 0xffff) return FALSE; - - XAAGetPixelFromRGBA(&pixel, red, green, blue, 0, pDst->format); - - if((infoRec->WriteBitmapFlags & RGB_EQUAL) && !((red == green) && (green == blue))) - return FALSE; - - x = pDst->pDrawable->x; - y = pDst->pDrawable->y; - - while(nlist--) { - x += list->xOff; - y += list->yOff; - left = right = X = x; - top = bottom = Y = y; - for(i = 0; i < list->len; i++) { - glyph = glyphs[i]; - - L = X - glyph->info.x; - if(L < left) left = L; - R = L + glyph->info.width; - if(R > right) right = R; - - T = Y - glyph->info.y; - if(T < top) top = T; - B = T + glyph->info.height; - if(B > bottom) bottom = B; - - X += glyph->info.xOff; - Y += glyph->info.yOff; - } - - width = right - left; - height = bottom - top; - - if(width && height) { - pitch = (((width + 31) & ~31) >> 5) + 1; - pntr = (CARD32*)xalloc(sizeof(CARD32) * pitch * height); - if(!pntr) - return TRUE; - bzero(pntr, sizeof(CARD32) * pitch * height); - n = list->len; - - X = x; Y = y; - while(n--) { - glyph = *glyphs++; - h = glyph->info.height; - w = glyph->info.width; - if(h && w) { - row = y - top - glyph->info.y; - column = x - left - glyph->info.x; - pnt = pntr + (row * pitch) + (column >> 5); - column &= 31; - dwords = ((w + 31) >> 5) - 1; - bits = (CARD32 *)GlyphPixmap(glyph)[pScreen->myNum]->devPrivate.ptr; - if(dwords) { - while(h--) { - for(i = 0; i <= dwords; i++) { - if(column) { - pnt[i] |= SHIFT_L(*bits, column); - pnt[i + 1] |= SHIFT_R(*bits, 32 - column); - } else - pnt[i] |= *bits; - - if(i != dwords) bits++; - } - bits++; - pnt += pitch; - } - } else { - if(column) { - while(h--) { - pnt[0] |= SHIFT_L(*bits, column); - pnt[0 + 1] |= SHIFT_R(*bits, 32 - column); - bits++; - pnt += pitch; - } - } else { - while(h--) { - *pnt |= *bits++; - pnt += pitch; - } - } - } - } - x += glyph->info.xOff; - y += glyph->info.yOff; - } - - nbox = REGION_NUM_RECTS(pDst->pCompositeClip); - pbox = REGION_RECTS(pDst->pCompositeClip); - - while(nbox && (top >= pbox->y2)) { - pbox++; nbox--; - } - - while(nbox && (bottom > pbox->y1)) { - leftEdge = max(left, pbox->x1); - rightEdge = min(right, pbox->x2); - - if(rightEdge > leftEdge) { - column = leftEdge - left; - topLine = max(top, pbox->y1); - botLine = min(bottom, pbox->y2); - h = botLine - topLine; - - if(h > 0) { - (*infoRec->WriteBitmap)(infoRec->pScrn, - leftEdge, topLine, rightEdge - leftEdge, h, - (unsigned char*)(pntr + - ((topLine - top) * pitch) + (column >> 5)), - pitch << 2, column & 31, pixel, -1, GXcopy, ~0); - } - } - nbox--; pbox++; - } - xfree(pntr); - } else { - x = X; y = Y; - } - list++; - } - - return TRUE; - } - /* * If it looks like we have a chance of being able to draw these * glyphs with an accelerated Composite, do that now to avoid From 1c54c148895225e4ab3c781fe57d09e5f64353aa Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 9 May 2008 00:26:16 +0300 Subject: [PATCH 474/634] Revert "GL: Make errors non-fatal" Turns out this just caused segfaults further down the line. Oops. This reverts commit 268d61e00cf4bc52c05f19eda7ab4f6accce12c8. --- GL/glx/glxext.c | 2 +- GL/glx/glxglcore.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GL/glx/glxext.c b/GL/glx/glxext.c index 1cbc27953..85d8debd4 100644 --- a/GL/glx/glxext.c +++ b/GL/glx/glxext.c @@ -288,7 +288,7 @@ void GlxExtensionInit(void) __glXDispatch, ResetExtension, StandardMinorOpcode); if (!extEntry) { - ErrorF("__glXExtensionInit: AddExtensions failed\n"); + FatalError("__glXExtensionInit: AddExtensions failed\n"); return; } if (!AddExtensionAlias(GLX_EXTENSION_ALIAS, extEntry)) { diff --git a/GL/glx/glxglcore.c b/GL/glx/glxglcore.c index 00279b73a..dafa9bca7 100644 --- a/GL/glx/glxglcore.c +++ b/GL/glx/glxglcore.c @@ -510,7 +510,7 @@ handle_error: xfree(screen); - ErrorF("GLX: could not load software renderer\n"); + FatalError("GLX: could not load software renderer\n"); return NULL; } From 901978ebe0f446532255701cd536e246e805a55b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 8 May 2008 14:05:56 +0930 Subject: [PATCH 475/634] config: remove trailing whitespaces. It makes my vim look ugly. Put "let c_space_errors=1" into your .vimrc. (cherry picked from commit 1f54c05cf8a6b82e5fc6362f7f8e8fdc2444b9e8) --- config/hal.c | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/config/hal.c b/config/hal.c index f15064646..7794d8e8a 100644 --- a/config/hal.c +++ b/config/hal.c @@ -119,7 +119,7 @@ get_prop_string(LibHalContext *hal_ctx, const char *udi, const char *name) return ret; } -/* this function is no longer used... keep it here in case its needed in +/* this function is no longer used... keep it here in case its needed in * the future. */ #if 0 static char * @@ -155,7 +155,7 @@ get_prop_string_array(LibHalContext *hal_ctx, const char *udi, const char *prop) return ret; } -#endif +#endif static void device_added(LibHalContext *hal_ctx, const char *udi) @@ -164,12 +164,12 @@ device_added(LibHalContext *hal_ctx, const char *udi) InputOption *options = NULL, *tmpo = NULL; DeviceIntPtr dev; DBusError error; - + LibHalPropertySet *set = NULL; LibHalPropertySetIterator set_iter; char *psi_key = NULL, *tmp_val, *tmp_key; - - + + dbus_error_init(&error); driver = get_prop_string(hal_ctx, udi, "input.x11_driver"); @@ -178,13 +178,13 @@ device_added(LibHalContext *hal_ctx, const char *udi) LogMessageVerb(X_INFO,7,"config/hal: no driver specified for device %s\n", udi); goto unwind; } - + path = get_prop_string(hal_ctx, udi, "input.device"); if (!path) { LogMessage(X_WARNING,"config/hal: no driver or path specified for %s\n", udi); goto unwind; } - + name = get_prop_string(hal_ctx, udi, "info.product"); if (!name) name = xstrdup("(unnamed)"); @@ -194,7 +194,7 @@ device_added(LibHalContext *hal_ctx, const char *udi) LogMessage(X_ERROR, "config/hal: couldn't allocate space for input options!\n"); goto unwind; } - + options->key = xstrdup("_source"); options->value = xstrdup("server/hal"); if (!options->key || !options->value) { @@ -202,14 +202,14 @@ device_added(LibHalContext *hal_ctx, const char *udi) goto unwind; } - /* most drivers use device.. not path. evdev uses both however, but the + /* most drivers use device.. not path. evdev uses both however, but the * path version isn't documented apparently. support both for now. */ add_option(&options, "path", path); add_option(&options, "device", path); - + add_option(&options, "driver", driver); add_option(&options, "name", name); - + config_info = xalloc(strlen(udi) + 5); /* "hal:" and NULL */ if (!config_info) { LogMessage(X_ERROR, "config/hal: couldn't allocate name\n"); @@ -220,58 +220,58 @@ device_added(LibHalContext *hal_ctx, const char *udi) /* ok, grab options from hal.. iterate through all properties * and lets see if any of them are options that we can add */ set = libhal_device_get_all_properties(hal_ctx, udi, &error); - + if (!set) { LogMessage(X_ERROR, "config/hal: couldn't get property list for %s: %s (%s)\n", udi, error.name, error.message); goto unwind; } - + libhal_psi_init(&set_iter,set); while (libhal_psi_has_more(&set_iter)) { /* we are looking for supported keys.. extract and add to options */ - psi_key = libhal_psi_get_key(&set_iter); - + psi_key = libhal_psi_get_key(&set_iter); + if (psi_key){ /* normal options first (input.x11_options.) */ if (!strncasecmp(psi_key, LIBHAL_PROP_KEY, sizeof(LIBHAL_PROP_KEY)-1)){ - + /* only support strings for all values */ tmp_val = get_prop_string(hal_ctx, udi, psi_key); - + if (tmp_val){ add_option(&options, psi_key + sizeof(LIBHAL_PROP_KEY)-1, tmp_val); xfree(tmp_val); } - + /* evdev's XKB options... we should probably depreciate this usage */ } else if (!strncasecmp(psi_key, LIBHAL_XKB_PROP_KEY, sizeof(LIBHAL_XKB_PROP_KEY)-1)){ - + /* only support strings for all values */ tmp_val = get_prop_string(hal_ctx, udi, psi_key); - + if (tmp_val){ /* add "xkb_" + NULL */ tmp_key = xalloc(strlen(psi_key) - ( sizeof(LIBHAL_XKB_PROP_KEY) - 1) + 5); - + if (!tmp_key){ LogMessage(X_ERROR, "config/hal: couldn't allocate memory for option %s\n", psi_key); } else { sprintf(tmp_key, "xkb_%s", psi_key + sizeof(LIBHAL_XKB_PROP_KEY)-1); add_option(&options, tmp_key, tmp_val); - + xfree(tmp_key); } xfree(tmp_val); - } + } } } - + /* psi_key doesn't need to be freed */ libhal_psi_next(&set_iter); } - + /* this isn't an error, but how else do you output something that the user can see? */ LogMessage(X_INFO, "config/hal: Adding input device %s\n", name); if (NewInputDeviceRequest(options, &dev) != Success) { @@ -413,7 +413,7 @@ config_hal_init(void) /* verbose message */ LogMessageVerb(X_INFO,7,"config/hal: initialized"); - + return 1; } From ff013b0da4e6d33b2b69ce1212e9bd62050574e1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 8 May 2008 16:58:31 +0930 Subject: [PATCH 476/634] config: override xkb_{r,m,l,v} with Xkb{r,m,l,v} if the latter is set. The HAL spec says that input.xkb.{rmlv}* can be sent, but if the user specifies a X-specific {rmlv}, then this is overridden through the use of input.x11_options.Xkb{RMLV}. However, the way how the server parses options--by ignoring capitalisation, underscores and spaces--the HAL and the x11_options would override each other. So we simply filter the options, letting Xkb{RMLV} override xkb_{rmlv} and only actually add them to the device after parsing _all_ options. * rmlv ... rules, model, layout, variant See Bug 13037 (cherry picked from commit fc35d1e3be201e3821413bb2eeb8d43e1e56ba17) --- config/hal.c | 100 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 87 insertions(+), 13 deletions(-) diff --git a/config/hal.c b/config/hal.c index 7794d8e8a..67ffa0304 100644 --- a/config/hal.c +++ b/config/hal.c @@ -48,6 +48,15 @@ struct config_hal_info { LibHalContext *hal_ctx; }; +/* Used for special handling of xkb options. */ +struct xkb_options { + char* layout; + char* model; + char* rules; + char* variant; +}; + + static void remove_device(DeviceIntPtr dev) { @@ -164,10 +173,11 @@ device_added(LibHalContext *hal_ctx, const char *udi) InputOption *options = NULL, *tmpo = NULL; DeviceIntPtr dev; DBusError error; + struct xkb_options xkb_opts = {0}; LibHalPropertySet *set = NULL; LibHalPropertySetIterator set_iter; - char *psi_key = NULL, *tmp_val, *tmp_key; + char *psi_key = NULL, *tmp_val; dbus_error_init(&error); @@ -241,27 +251,71 @@ device_added(LibHalContext *hal_ctx, const char *udi) tmp_val = get_prop_string(hal_ctx, udi, psi_key); if (tmp_val){ - add_option(&options, psi_key + sizeof(LIBHAL_PROP_KEY)-1, tmp_val); - xfree(tmp_val); - } + char* tmp; - /* evdev's XKB options... we should probably depreciate this usage */ + /* xkb needs special handling. HAL specs include + * input.xkb.xyz options, but the x11-input.fdi specifies + * input.x11_options.Xkbxyz options. By default, we use + * the former, unless the specific X11 ones are specified. + * Since we can't predict the order in which the keys + * arrive, we need to store them. + */ + if ((tmp = strcasestr(psi_key, "xkb"))) + { + if (!strcasecmp(&tmp[3], "layout")) + { + if (xkb_opts.layout) + xfree(xkb_opts.layout); + xkb_opts.layout = strdup(tmp_val); + } else if (!strcasecmp(&tmp[3], "model")) + { + if (xkb_opts.model) + xfree(xkb_opts.model); + xkb_opts.model = strdup(tmp_val); + } else if (!strcasecmp(&tmp[3], "rules")) + { + if (xkb_opts.rules) + xfree(xkb_opts.rules); + xkb_opts.rules = strdup(tmp_val); + } else if (!strcasecmp(&tmp[3], "variant")) + { + if (xkb_opts.variant) + xfree(xkb_opts.variant); + xkb_opts.variant = strdup(tmp_val); + } + } else + { + /* all others */ + add_option(&options, psi_key + sizeof(LIBHAL_PROP_KEY)-1, tmp_val); + xfree(tmp_val); + } + } } else if (!strncasecmp(psi_key, LIBHAL_XKB_PROP_KEY, sizeof(LIBHAL_XKB_PROP_KEY)-1)){ /* only support strings for all values */ tmp_val = get_prop_string(hal_ctx, udi, psi_key); if (tmp_val){ - /* add "xkb_" + NULL */ - tmp_key = xalloc(strlen(psi_key) - ( sizeof(LIBHAL_XKB_PROP_KEY) - 1) + 5); + char* tmp; - if (!tmp_key){ - LogMessage(X_ERROR, "config/hal: couldn't allocate memory for option %s\n", psi_key); - } else { - sprintf(tmp_key, "xkb_%s", psi_key + sizeof(LIBHAL_XKB_PROP_KEY)-1); - add_option(&options, tmp_key, tmp_val); + tmp = &psi_key[sizeof(LIBHAL_XKB_PROP_KEY) - 1]; - xfree(tmp_key); + if (!strcasecmp(tmp, "layout")) + { + if (!xkb_opts.layout) + xkb_opts.layout = strdup(tmp_val); + } else if (!strcasecmp(tmp, "rules")) + { + if (!xkb_opts.rules) + xkb_opts.rules = strdup(tmp_val); + } else if (!strcasecmp(tmp, "variant")) + { + if (!xkb_opts.variant) + xkb_opts.variant = strdup(tmp_val); + } else if (!strcasecmp(tmp, "model")) + { + if (!xkb_opts.model) + xkb_opts.model = strdup(tmp_val); } xfree(tmp_val); } @@ -272,6 +326,17 @@ device_added(LibHalContext *hal_ctx, const char *udi) libhal_psi_next(&set_iter); } + + /* Now add xkb options */ + if (xkb_opts.layout) + add_option(&options, "xkb_layout", xkb_opts.layout); + if (xkb_opts.rules) + add_option(&options, "xkb_rules", xkb_opts.rules); + if (xkb_opts.variant) + add_option(&options, "xkb_variant", xkb_opts.variant); + if (xkb_opts.model) + add_option(&options, "xkb_model", xkb_opts.model); + /* this isn't an error, but how else do you output something that the user can see? */ LogMessage(X_INFO, "config/hal: Adding input device %s\n", name); if (NewInputDeviceRequest(options, &dev) != Success) { @@ -304,6 +369,15 @@ unwind: xfree(tmpo); } + if (xkb_opts.layout) + xfree(xkb_opts.layout); + if (xkb_opts.rules) + xfree(xkb_opts.rules); + if (xkb_opts.model) + xfree(xkb_opts.model); + if (xkb_opts.variant) + xfree(xkb_opts.variant); + dbus_error_free(&error); return; From 90b963c0da2b33bdc21483f1a089b95c7e717333 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Tue, 6 May 2008 16:07:33 -0700 Subject: [PATCH 477/634] Set CSRG_BASED on OSX (cherry picked from commit ff085deba18682caa2f93d61a75b38db87d747b1) --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index beef3a21e..9671adaa9 100644 --- a/configure.ac +++ b/configure.ac @@ -402,6 +402,9 @@ case $host_os in *solaris*) PKG_CHECK_EXISTS(libdrm, DRI=yes, DRI=no) ;; + darwin*) + AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) + ;; esac AM_CONDITIONAL(KDRIVE_HW, test "x$KDRIVE_HW" = xyes) From 05f23ed3ea6ee0f052aee41b6573325fe0063fd8 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Tue, 6 May 2008 16:12:41 -0700 Subject: [PATCH 478/634] XQuartz: Fixed some issue in our bundle creation (cherry picked from commit 330ffad5477e32c5ab9ed338bc628bd5ae9f4c98) --- hw/xquartz/bundle/mk_bundke.sh | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/hw/xquartz/bundle/mk_bundke.sh b/hw/xquartz/bundle/mk_bundke.sh index 750af9cea..0b2a14433 100755 --- a/hw/xquartz/bundle/mk_bundke.sh +++ b/hw/xquartz/bundle/mk_bundke.sh @@ -4,31 +4,22 @@ BUNDLE_ROOT=$1 -mkdir -p ${BUNDLE_ROOT}/Contents/MacOS -[ -d ${BUNDLE_ROOT}/Contents/MacOS ] || exit 1 - -mkdir -p ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib -[ -d ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib ] || exit 1 - -if [[ $(id -u) == 0 ]] ; then - OWNERSHIP="-o root -g admin" -else - OWNERSHIP="" -fi - localities="Dutch English French German Italian Japanese Spanish da fi ko no pl pt pt_PT ru sv zh_CN zh_TW" for lang in ${localities} ; do + mkdir -p ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/main.nib + [ -d ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/main.nib ] || exit 1 + for f in InfoPlist.strings Localizable.strings main.nib/keyedobjects.nib ; do - if [[ $(id -u) == 0 ]] ; then - install ${OWNERSHIP} -m 644 Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f} - else - install ${OWNERSHIP} -m 644 Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f} - fi + install -m 644 Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f} done done -install ${OWNERSHIP} -m 644 Resources/English.lproj/main.nib//designable.nib ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib -install ${OWNERSHIP} -m 644 Resources/X11.icns ${BUNDLE_ROOT}/Contents/Resources +install -m 644 Resources/English.lproj/main.nib//designable.nib ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib +install -m 644 Resources/X11.icns ${BUNDLE_ROOT}/Contents/Resources -install ${OWNERSHIP} -m 644 Info.plist ${BUNDLE_ROOT}/Contents -install ${OWNERSHIP} -m 644 PkgInfo ${BUNDLE_ROOT}/Contents +install -m 644 Info.plist ${BUNDLE_ROOT}/Contents +install -m 644 PkgInfo ${BUNDLE_ROOT}/Contents + +if [[ $(id -u) == 0 ]] ; then + chown -R root:admin ${BUNDLE_ROOT} +fi From a07c5ad172b343ef26d2b41ff25f143950441c23 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 8 May 2008 16:57:42 -0700 Subject: [PATCH 479/634] XQuartz: Set bundle version to 2.3.0 (cherry picked from commit 8a0524b30e1e860f3ae35741c116fc8da28aef79) --- hw/xquartz/bundle/Info.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xquartz/bundle/Info.plist b/hw/xquartz/bundle/Info.plist index 6ba02dda2..4b0830f0e 100644 --- a/hw/xquartz/bundle/Info.plist +++ b/hw/xquartz/bundle/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.2.0 + 2.3.0 CFBundleSignature x11a CSResourcesFileMapped From 28ac79450c69219dc501e072c6e5028e7136380d Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 8 May 2008 19:47:40 -0700 Subject: [PATCH 480/634] Updated .gitignore for new Xquartz layout (cherry picked from commit cd4d2355e227549a3410485a130549dd91ccdcfe) --- .gitignore | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a6925d98f..d6d7adfd1 100644 --- a/.gitignore +++ b/.gitignore @@ -278,8 +278,9 @@ hw/xprint/doc/Xprt.1x hw/xprint/doc/Xprt.man hw/xprint/dpmsstubs-wrapper.c hw/xprint/miinitext-wrapper.c -hw/xquartz/xpr/Xquartz -hw/xquartz/xpr/Xquartz.1 +hw/xquartz/mach-startup/X11 +hw/xquartz/mach-startup/Xquartz +hw/xquartz/doc/Xquartz.1 include/dix-config.h include/kdrive-config.h include/xgl-config.h From 315f089056da67d4c463ed002eb2b74e38493b49 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 8 May 2008 19:46:03 -0700 Subject: [PATCH 481/634] XQuartz: Reorganized some of the build system in prep for the Mach IPC startup work. (cherry picked from commit 2232c91d5c277673929eab2abb5e0495c00877cb) --- configure.ac | 3 +- hw/xquartz/Makefile.am | 3 +- hw/xquartz/bundle/Makefile.am | 1 - hw/xquartz/doc/Makefile.am | 14 ++++++++ hw/xquartz/{xpr => doc}/Xquartz.man.pre | 0 hw/xquartz/mach-startup/Makefile.am | 34 +++++++++++++++++++ .../{bundle => mach-startup}/bundle-main.c | 0 hw/xquartz/{stub => mach-startup}/stub.c | 0 hw/xquartz/stub/Makefile.am | 11 ------ hw/xquartz/xpr/Makefile.am | 34 ++----------------- 10 files changed, 53 insertions(+), 47 deletions(-) create mode 100644 hw/xquartz/doc/Makefile.am rename hw/xquartz/{xpr => doc}/Xquartz.man.pre (100%) create mode 100644 hw/xquartz/mach-startup/Makefile.am rename hw/xquartz/{bundle => mach-startup}/bundle-main.c (100%) rename hw/xquartz/{stub => mach-startup}/stub.c (100%) delete mode 100644 hw/xquartz/stub/Makefile.am diff --git a/configure.ac b/configure.ac index 9671adaa9..99b10e36d 100644 --- a/configure.ac +++ b/configure.ac @@ -2164,7 +2164,8 @@ hw/xwin/Makefile hw/xquartz/Makefile hw/xquartz/GL/Makefile hw/xquartz/bundle/Makefile -hw/xquartz/stub/Makefile +hw/xquartz/doc/Makefile +hw/xquartz/mach-startup/Makefile hw/xquartz/xpr/Makefile hw/kdrive/Makefile hw/kdrive/ati/Makefile diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am index bbd21f816..77d662f97 100644 --- a/hw/xquartz/Makefile.am +++ b/hw/xquartz/Makefile.am @@ -9,12 +9,11 @@ AM_CPPFLAGS = \ -DXFree86Server \ -I$(top_srcdir)/miext/rootless -SUBDIRS = bundle . GL xpr stub +SUBDIRS = bundle . GL xpr mach-startup doc libXquartz_la_SOURCES = \ $(top_srcdir)/fb/fbcmap_mi.c \ $(top_srcdir)/mi/miinitext.c \ - bundle/bundle-main.c \ X11Application.m \ X11Controller.m \ applewm.c \ diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am index c61b0490c..a8f45f8d5 100644 --- a/hw/xquartz/bundle/Makefile.am +++ b/hw/xquartz/bundle/Makefile.am @@ -7,7 +7,6 @@ resource_DATA = Xquartz.plist EXTRA_DIST = \ mk_bundke.sh \ $(resource_DATA) \ - bundle-main.c \ Resources/da.lproj/InfoPlist.strings \ Resources/da.lproj/Localizable.strings \ Resources/da.lproj/main.nib/keyedobjects.nib \ diff --git a/hw/xquartz/doc/Makefile.am b/hw/xquartz/doc/Makefile.am new file mode 100644 index 000000000..b812af1cb --- /dev/null +++ b/hw/xquartz/doc/Makefile.am @@ -0,0 +1,14 @@ +appmandir = $(APP_MAN_DIR) +appman_PRE = Xquartz.man.pre +appman_PROCESSED = $(appman_PRE:man.pre=man) +appman_DATA = $(appman_PRE:man.pre=@APP_MAN_SUFFIX@) + +CLEANFILES = $(appman_PROCESSED) $(appman_DATA) + +include $(top_srcdir)/cpprules.in + +.man.$(APP_MAN_SUFFIX): + cp $< $@ + +EXTRA_DIST = \ + Xquartz.man.pre diff --git a/hw/xquartz/xpr/Xquartz.man.pre b/hw/xquartz/doc/Xquartz.man.pre similarity index 100% rename from hw/xquartz/xpr/Xquartz.man.pre rename to hw/xquartz/doc/Xquartz.man.pre diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am new file mode 100644 index 000000000..966871126 --- /dev/null +++ b/hw/xquartz/mach-startup/Makefile.am @@ -0,0 +1,34 @@ +AM_CPPFLAGS = \ + -DBUILD_DATE=\"$(BUILD_DATE)\" \ + -DXSERVER_VERSION=\"$(VERSION)\" + +x11appdir = $(APPLE_APPLICATIONS_DIR)/X11.app/Contents/MacOS +x11app_PROGRAMS = X11 + +X11_SOURCES = \ + bundle-main.c + +X11_LDADD = \ + $(top_builddir)/hw/xquartz/libXquartz.la \ + $(top_builddir)/hw/xquartz/xpr/libXquartzXpr.la \ + $(top_builddir)/dix/dixfonts.lo \ + $(top_builddir)/miext/rootless/librootless.la \ + $(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin -lX11 + +X11_LDFLAGS = \ + -XCClinker -Objc \ + -Wl,-u,_miDCInitialize \ + -Wl,-framework,Carbon \ + -L/System/Library/Frameworks/OpenGL.framework/Libraries -lGL \ + -Wl,-framework,OpenGL \ + -Wl,-framework,Cocoa \ + -Wl,-framework,CoreAudio \ + -Wl,-framework,IOKit + +bin_PROGRAMS = Xquartz + +Xquartz_SOURCES = \ + stub.c + +Xquartz_LDFLAGS = \ + -Wl,-framework,CoreServices diff --git a/hw/xquartz/bundle/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c similarity index 100% rename from hw/xquartz/bundle/bundle-main.c rename to hw/xquartz/mach-startup/bundle-main.c diff --git a/hw/xquartz/stub/stub.c b/hw/xquartz/mach-startup/stub.c similarity index 100% rename from hw/xquartz/stub/stub.c rename to hw/xquartz/mach-startup/stub.c diff --git a/hw/xquartz/stub/Makefile.am b/hw/xquartz/stub/Makefile.am deleted file mode 100644 index 3752dc111..000000000 --- a/hw/xquartz/stub/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -AM_CPPFLAGS = \ - -DBUILD_DATE=\"$(BUILD_DATE)\" \ - -DXSERVER_VERSION=\"$(VERSION)\" - -bin_PROGRAMS = Xquartz - -Xquartz_SOURCES = \ - stub.c - -Xquartz_LDFLAGS = \ - -framework CoreServices diff --git a/hw/xquartz/xpr/Makefile.am b/hw/xquartz/xpr/Makefile.am index 6bf99a402..e74580f73 100644 --- a/hw/xquartz/xpr/Makefile.am +++ b/hw/xquartz/xpr/Makefile.am @@ -1,5 +1,4 @@ -x11appdir = $(APPLE_APPLICATIONS_DIR)/X11.app/Contents/MacOS -x11app_PROGRAMS = X11 +noinst_LTLIBRARIES = libXquartzXpr.la AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = \ @@ -7,7 +6,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/miext \ -I$(top_srcdir)/miext/rootless -X11_SOURCES = \ +libXquartzXpr_la_SOURCES = \ appledri.c \ dri.c \ xprAppleWM.c \ @@ -19,36 +18,7 @@ X11_SOURCES = \ x-hook.c \ x-list.c -X11_LDADD = \ - $(top_builddir)/hw/xquartz/libXquartz.la \ - $(top_builddir)/dix/dixfonts.lo \ - $(top_builddir)/miext/rootless/librootless.la \ - $(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin -lX11 - -X11_LDFLAGS = \ - -XCClinker -Objc \ - -Wl,-u,_miDCInitialize \ - -Wl,-framework,Carbon \ - -L/System/Library/Frameworks/OpenGL.framework/Libraries -lGL \ - -Wl,-framework,OpenGL \ - -Wl,-framework,Cocoa \ - -Wl,-framework,CoreAudio \ - -Wl,-framework,IOKit - -appmandir = $(APP_MAN_DIR) -appman_PRE = Xquartz.man.pre -appman_PROCESSED = $(appman_PRE:man.pre=man) -appman_DATA = $(appman_PRE:man.pre=@APP_MAN_SUFFIX@) - -CLEANFILES = $(appman_PROCESSED) $(appman_DATA) - -include $(top_srcdir)/cpprules.in - -.man.$(APP_MAN_SUFFIX): - cp $< $@ - EXTRA_DIST = \ - Xquartz.man.pre \ dri.h \ dristruct.h \ appledri.h \ From 2a3d1421e0cc18822ae8f478fcc272e16a9e9340 Mon Sep 17 00:00:00 2001 From: Drew Parsons Date: Fri, 9 May 2008 23:20:11 +1000 Subject: [PATCH 482/634] Disable D-BUS from Xprint. Use dummy config functions to replace those from config/config.c, and therefore do not link Xprt with $CONFIG_LIB. Works around an endlessly spinning loop in dix/dispatch.c::Dispatch() (WaitForSomething() not waiting) when built with dbus, which was causing Xprt to use 95% cpu. --- configure.ac | 2 +- hw/xprint/ddxInit.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f695551e4..64fd94601 100644 --- a/configure.ac +++ b/configure.ac @@ -1610,7 +1610,7 @@ AC_MSG_RESULT([$XPRINT]) if test "x$XPRINT" = xyes; then PKG_CHECK_MODULES([XPRINTMODULES], [printproto x11 xfont $XDMCP_MODULES xau]) XPRINT_CFLAGS="$XPRINTMODULES_CFLAGS -DXPRINT" - XPRINT_LIBS="$XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS $MIEXT_DAMAGE_LIB $XKB_LIB $XKB_STUB_LIB" + XPRINT_LIBS="$XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS $MIEXT_DAMAGE_LIB $XKB_LIB $XKB_STUB_LIB" XPRINT_SYS_LIBS="$XPRINTMODULES_LIBS" xpconfigdir=$libdir/X11/xserver diff --git a/hw/xprint/ddxInit.c b/hw/xprint/ddxInit.c index d744121aa..795052120 100644 --- a/hw/xprint/ddxInit.c +++ b/hw/xprint/ddxInit.c @@ -291,6 +291,12 @@ ddxProcessArgument ( #include "XIstubs.h" #include "exglobals.h" +/* Place dummy config functions here instead of config/config.c, + since Xprint does not use D-BUS */ +void config_init() { } +void config_fini() { } + + int ChangePointerDevice ( DeviceIntPtr old_dev, From 1a01e96c6d15ef17a8b5ab1afa361fb12476a25e Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 9 May 2008 15:38:44 -0700 Subject: [PATCH 483/634] Return a valid X error when stuck in font alias loop Part of fix for Sun bug 4258475 --- dix/dixfonts.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dix/dixfonts.c b/dix/dixfonts.c index e9a3f3963..6fb29de3a 100644 --- a/dix/dixfonts.c +++ b/dix/dixfonts.c @@ -302,8 +302,14 @@ doOpenFont(ClientPtr client, OFclosurePtr c) c->fontname = newname; c->fnamelen = newlen; c->current_fpe = 0; - if (--aliascount <= 0) + if (--aliascount <= 0) { + /* We've tried resolving this alias 20 times, we're + * probably stuck in an infinite loop of aliases pointing + * to each other - time to take emergency exit! + */ + err = BadImplementation; break; + } continue; } if (err == BadFontName) { From 9dfb525f6c91acab5d1a65765a046bf9ee2aa082 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Sun, 11 May 2008 23:17:27 +0200 Subject: [PATCH 484/634] kdrive: allow disabling Composite KdInitOutput() used to enable Composite when it was disabled by default, but now this hack prevents ``-extension Composite'' from working. Remove it, as Composite is enabled by default anyway. --- hw/kdrive/src/kdrive.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c index 50148c49c..e2ee4adea 100644 --- a/hw/kdrive/src/kdrive.c +++ b/hw/kdrive/src/kdrive.c @@ -1353,12 +1353,6 @@ KdInitOutput (ScreenInfo *pScreenInfo, KdCardInfo *card; KdScreenInfo *screen; -#ifdef COMPOSITE - /* kind of a hack: we want Composite enabled, but it's disabled per - * default. */ - noCompositeExtension = FALSE; -#endif - if (!kdCardInfo) { InitCard (0); From 3b6735528efc6d69ab7a7cd63dd09c87db7ef115 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 12 May 2008 16:36:42 +1000 Subject: [PATCH 485/634] pci: don't do this pci stuff when we don't have hw access --- hw/xfree86/common/xf86Init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 68dc38772..851f4dc49 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -632,10 +632,10 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) /* * Locate bus slot that had register IO enabled at server startup */ - - xf86AccessInit(); - xf86FindPrimaryDevice(); - + if (xorgHWAccess) { + xf86AccessInit(); + xf86FindPrimaryDevice(); + } /* * Now call each of the Probe functions. Each successful probe will * result in an extra entry added to the xf86Screens[] list for each From 7e768c08f7809b8dba4db1931e63314e2b6e1cfa Mon Sep 17 00:00:00 2001 From: James Cloos Date: Mon, 12 May 2008 02:53:59 -0400 Subject: [PATCH 486/634] Clean up whitespace --- composite/compwindow.c | 70 +++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/composite/compwindow.c b/composite/compwindow.c index c022027db..9c999173c 100644 --- a/composite/compwindow.c +++ b/composite/compwindow.c @@ -54,7 +54,7 @@ compCheckWindow (WindowPtr pWin, pointer data) PixmapPtr pWinPixmap = (*pScreen->GetWindowPixmap) (pWin); PixmapPtr pParentPixmap = pWin->parent ? (*pScreen->GetWindowPixmap) (pWin->parent) : 0; PixmapPtr pScreenPixmap = (*pScreen->GetScreenPixmap) (pScreen); - + if (!pWin->parent) { assert (pWin->redirectDraw == RedirectDrawNone); @@ -122,7 +122,7 @@ compSetPixmapVisitWindow (WindowPtr pWindow, pointer data) SetWinSize (pWindow); SetBorderSize (pWindow); if (HasBorder (pWindow)) - QueueWorkProc (compRepaintBorder, serverClient, + QueueWorkProc (compRepaintBorder, serverClient, (pointer) pWindow->drawable.id); return WT_WALKCHILDREN; } @@ -147,14 +147,14 @@ compCheckRedirect (WindowPtr pWin) should = pWin->realized && (pWin->drawable.class != InputOnly) && (cw != NULL); - + /* Never redirect the overlay window */ if (cs->pOverlayWin != NULL) { if (pWin == cs->pOverlayWin) { should = FALSE; } - } - + } + if (should != (pWin->redirectDraw != RedirectDrawNone)) { if (should) @@ -276,10 +276,10 @@ compClipNotify (WindowPtr pWin, int dx, int dy) ScreenPtr pScreen = pWin->drawable.pScreen; CompScreenPtr cs = GetCompScreen (pScreen); CompWindowPtr cw = GetCompWindow (pWin); - + if (cw) { - if (cw->borderClipX != pWin->drawable.x || + if (cw->borderClipX != pWin->drawable.x || cw->borderClipY != pWin->drawable.y) { REGION_TRANSLATE (pScreen, &cw->borderClip, @@ -324,7 +324,7 @@ compImplicitRedirect (WindowPtr pWin, WindowPtr pParent) ScreenPtr pScreen = pWin->drawable.pScreen; XID winVisual = wVisual (pWin); XID parentVisual = wVisual (pParent); - + if (winVisual != parentVisual && (compIsAlternateVisual (pScreen, winVisual) || compIsAlternateVisual (pScreen, parentVisual))) @@ -345,11 +345,11 @@ compMoveWindow (WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind) WindowPtr pParent; int draw_x, draw_y; unsigned int w, h, bw; - + /* if this is a root window, can't be moved */ if (!(pParent = pWin->parent)) return; - + bw = wBorderWidth (pWin); draw_x = pParent->drawable.x + x + (int)bw; draw_y = pParent->drawable.y + y + (int)bw; @@ -390,18 +390,18 @@ compResizeWindow (WindowPtr pWin, int x, int y, WindowPtr pParent; int draw_x, draw_y; unsigned int bw; - + /* if this is a root window, can't be moved */ if (!(pParent = pWin->parent)) return; - + bw = wBorderWidth (pWin); draw_x = pParent->drawable.x + x + (int)bw; draw_y = pParent->drawable.y + y + (int)bw; compReallocPixmap (pWin, draw_x, draw_y, w, h, bw); } compCheckTree (pScreen); - + pScreen->ResizeWindow = cs->ResizeWindow; (*pScreen->ResizeWindow) (pWin, x, y, w, h, pSib); cs->ResizeWindow = pScreen->ResizeWindow; @@ -430,11 +430,11 @@ compChangeBorderWidth (WindowPtr pWin, unsigned int bw) WindowPtr pParent; int draw_x, draw_y; unsigned int w, h; - + /* if this is a root window, can't be moved */ if (!(pParent = pWin->parent)) return; - + draw_x = pWin->drawable.x; draw_y = pWin->drawable.y; w = pWin->drawable.width; @@ -481,13 +481,13 @@ compReparentWindow (WindowPtr pWin, WindowPtr pPriorParent) */ if (compImplicitRedirect (pWin, pWin->parent)) compRedirectWindow (serverClient, pWin, CompositeRedirectAutomatic); - + /* * Allocate any necessary redirect pixmap * (this actually should never be true; pWin is always unmapped) */ compCheckRedirect (pWin); - + /* * Reset pixmap pointers as appropriate */ @@ -514,7 +514,7 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); CompWindowPtr cw = GetCompWindow (pWin); - + assert (cw->oldx != COMP_ORIGIN_INVALID); assert (cw->oldy != COMP_ORIGIN_INVALID); if (cw->pOldPixmap) @@ -526,7 +526,7 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) RegionRec rgnDst; PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); GCPtr pGC; - + dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); @@ -535,10 +535,10 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst, &pWin->borderClip, prgnSrc); - - REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst, + + REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst, -pPixmap->screen_x, -pPixmap->screen_y); - + dx = dx + pPixmap->screen_x - cw->oldx; dy = dy + pPixmap->screen_y - cw->oldy; pGC = GetScratchGC (pPixmap->drawable.depth, pScreen); @@ -546,7 +546,7 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { BoxPtr pBox = REGION_RECTS (&rgnDst); int nBox = REGION_NUM_RECTS (&rgnDst); - + ValidateGC(&pPixmap->drawable, pGC); while (nBox--) { @@ -568,7 +568,7 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) ptOldOrg.x += dx; ptOldOrg.y += dy; } - + pScreen->CopyWindow = cs->CopyWindow; if (ptOldOrg.x != pWin->drawable.x || ptOldOrg.y != pWin->drawable.y) { @@ -634,7 +634,7 @@ compDestroyWindow (WindowPtr pWin) FreeResource (cw->clients->id, RT_NONE); while ((csw = GetCompSubwindows (pWin))) FreeResource (csw->clients->id, RT_NONE); - + if (pWin->redirectDraw != RedirectDrawNone) compFreePixmap (pWin); ret = (*pScreen->DestroyWindow) (pWin); @@ -699,7 +699,7 @@ PictFormatPtr compWindowFormat (WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; - + return PictureMatchVisual (pScreen, pWin->drawable.depth, compGetWindowVisual (pWin)); } @@ -716,24 +716,24 @@ compWindowUpdateAutomatic (WindowPtr pWin) int error; RegionPtr pRegion = DamageRegion (cw->damage); PicturePtr pSrcPicture = CreatePicture (0, &pSrcPixmap->drawable, - pSrcFormat, + pSrcFormat, 0, 0, serverClient, &error); XID subwindowMode = IncludeInferiors; PicturePtr pDstPicture = CreatePicture (0, &pParent->drawable, pDstFormat, - CPSubwindowMode, + CPSubwindowMode, &subwindowMode, serverClient, &error); - + /* * First move the region from window to screen coordinates */ - REGION_TRANSLATE (pScreen, pRegion, + REGION_TRANSLATE (pScreen, pRegion, pWin->drawable.x, pWin->drawable.y); - + /* * Clip against the "real" border clip */ @@ -742,14 +742,14 @@ compWindowUpdateAutomatic (WindowPtr pWin) /* * Now translate from screen to dest coordinates */ - REGION_TRANSLATE (pScreen, pRegion, + REGION_TRANSLATE (pScreen, pRegion, -pParent->drawable.x, -pParent->drawable.y); - + /* * Clip the picture */ SetPictureClipRegion (pDstPicture, 0, 0, pRegion); - + /* * And paint */ @@ -813,7 +813,7 @@ CompositeRealChildHead (WindowPtr pWin) if (!pChild) { return NullWindow; } - + cs = GetCompScreen(pWin->drawable.pScreen); if (pChild == cs->pOverlayWin) { return pChild; From 04211c3532ca078420e3745a5eac3d9de120bc32 Mon Sep 17 00:00:00 2001 From: James Cloos Date: Mon, 12 May 2008 03:03:13 -0400 Subject: [PATCH 487/634] Prevent the -wm command line option from causing a SEGV MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The -wm (when mapped) option for the BackingStore support has been causing the server to dereference a NULL pointer. This has probably been the case since backing store has been implemented on top of Composite. It looks like (some of?) Composite didn’t expect its WIndowPtr argument to be the root window. In Composite’s compCheckRedirect() function we now avoid calling compAllocPixmap() and compFreePixmap() when the pWin pointer’s parent member is NULL, as is it the case with a server’s root window. This addresses: https://bugs.freedesktop.org/show_bug.cgi?id=15878 --- composite/compwindow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composite/compwindow.c b/composite/compwindow.c index 9c999173c..c1657bdcd 100644 --- a/composite/compwindow.c +++ b/composite/compwindow.c @@ -146,7 +146,7 @@ compCheckRedirect (WindowPtr pWin) Bool should; should = pWin->realized && (pWin->drawable.class != InputOnly) && - (cw != NULL); + (cw != NULL) && (pWin->parent != NULL); /* Never redirect the overlay window */ if (cs->pOverlayWin != NULL) { From a7800d9355377ac02833613c2ffc2423beec9970 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Fri, 9 May 2008 16:44:31 -0700 Subject: [PATCH 488/634] XQuartz: Starting to work on the new Mach IPC startup stuff for better launchd, ApplicationServices, and Dock support (cherry picked from commit 9b67fca9b7d3050d3d5582a5210270db7eb2ed05) --- .gitignore | 4 + hw/xquartz/mach-startup/Makefile.am | 28 +++- hw/xquartz/mach-startup/bundle-main.c | 157 ++++++++++++++++++- hw/xquartz/mach-startup/mach_startup.defs | 41 +++++ hw/xquartz/mach-startup/mach_startup_types.h | 8 + 5 files changed, 232 insertions(+), 6 deletions(-) create mode 100644 hw/xquartz/mach-startup/mach_startup.defs create mode 100644 hw/xquartz/mach-startup/mach_startup_types.h diff --git a/.gitignore b/.gitignore index d6d7adfd1..13d5de4fd 100644 --- a/.gitignore +++ b/.gitignore @@ -278,6 +278,10 @@ hw/xprint/doc/Xprt.1x hw/xprint/doc/Xprt.man hw/xprint/dpmsstubs-wrapper.c hw/xprint/miinitext-wrapper.c +hw/xquartz/mach-startup/mach_startup.h +hw/xquartz/mach-startup/mach_startupServer.c +hw/xquartz/mach-startup/mach_startupServer.h +hw/xquartz/mach-startup/mach_startupUser.c hw/xquartz/mach-startup/X11 hw/xquartz/mach-startup/Xquartz hw/xquartz/doc/Xquartz.1 diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am index 966871126..ee2cbfe9e 100644 --- a/hw/xquartz/mach-startup/Makefile.am +++ b/hw/xquartz/mach-startup/Makefile.am @@ -5,9 +5,13 @@ AM_CPPFLAGS = \ x11appdir = $(APPLE_APPLICATIONS_DIR)/X11.app/Contents/MacOS x11app_PROGRAMS = X11 -X11_SOURCES = \ +dist_X11_SOURCES = \ bundle-main.c +nodist_X11_SOURCES = \ + mach_startupServer.c \ + mach_startupUser.c + X11_LDADD = \ $(top_builddir)/hw/xquartz/libXquartz.la \ $(top_builddir)/hw/xquartz/xpr/libXquartzXpr.la \ @@ -27,8 +31,28 @@ X11_LDFLAGS = \ bin_PROGRAMS = Xquartz -Xquartz_SOURCES = \ +dist_Xquartz_SOURCES = \ stub.c +nodist_Xquartz_SOURCES = \ + mach_startupUser.c + Xquartz_LDFLAGS = \ -Wl,-framework,CoreServices + +BUILT_SOURCES = \ + mach_startupServer.c \ + mach_startupUser.c \ + mach_startupServer.h \ + mach_startup.h + +CLEANFILES = \ + $(BUILT_SOURCES) + +$(BUILT_SOURCES): mach_startup.defs + mig -sheader mach_startupServer.h mach_startup.defs + +EXTRA_DIST = \ + mach_startup.defs \ + mach_startup_types.h + diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c index 042fa3ab8..24b67d871 100644 --- a/hw/xquartz/mach-startup/bundle-main.c +++ b/hw/xquartz/mach-startup/bundle-main.c @@ -33,9 +33,16 @@ #include #include #include +#include #include +#include +#include +#include +#include "mach_startup.h" +#include "mach_startupServer.h" + #define DEFAULT_CLIENT "/usr/X11/bin/xterm" #define DEFAULT_STARTX "/usr/X11/bin/startx" #define DEFAULT_SHELL "/bin/sh" @@ -43,12 +50,146 @@ static int execute(const char *command); static char *command_from_prefs(const char *key, const char *default_value); +/* This is in quartzStartup.c */ int server_main(int argc, char **argv, char **envp); +struct arg { + int argc; + char **argv; + char **envp; +}; + +/*** Mach-O IPC Stuffs ***/ + +union MaxMsgSize { + union __RequestUnion__mach_startup_subsystem req; + union __ReplyUnion__mach_startup_subsystem rep; +}; + +kern_return_t do_start_x11_server(mach_port_t port, string_array_t argv, + mach_msg_type_number_t argvCnt, + string_array_t envp, + mach_msg_type_number_t envpCnt) { + if(server_main(argvCnt, argv, envp) == 0) + return KERN_SUCCESS; + else + return KERN_FAILURE; +} + +kern_return_t do_exit(mach_port_t port, int value) { + exit(value); +} + +static mach_port_t checkin_or_register(char *bname) { + kern_return_t kr; + mach_port_t mp; + + /* If we're started by launchd or the old mach_init */ + kr = bootstrap_check_in(bootstrap_port, bname, &mp); + if (kr == KERN_SUCCESS) + return mp; + + /* We probably were not started by launchd or the old mach_init */ + kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &mp); + if (kr != KERN_SUCCESS) { + fprintf(stderr, "mach_port_allocate(): %s\n", mach_error_string(kr)); + exit(EXIT_FAILURE); + } + + kr = mach_port_insert_right(mach_task_self(), mp, mp, MACH_MSG_TYPE_MAKE_SEND); + if (kr != KERN_SUCCESS) { + fprintf(stderr, "mach_port_insert_right(): %s\n", mach_error_string(kr)); + exit(EXIT_FAILURE); + } + + kr = bootstrap_register(bootstrap_port, bname, mp); + if (kr != KERN_SUCCESS) { + fprintf(stderr, "bootstrap_register(): %s\n", mach_error_string(kr)); + exit(EXIT_FAILURE); + } + + return mp; +} + +/*** Pthread Magics ***/ +static pthread_t create_thread(void *func, void *arg) { + pthread_attr_t attr; + pthread_t tid; + + pthread_attr_init (&attr); + pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM); + pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED); + pthread_create (&tid, &attr, func, arg); + pthread_attr_destroy (&attr); + + return tid; +} + +/*** Main ***/ +static int execute(const char *command); +static char *command_from_prefs(const char *key, const char *default_value); + +#ifdef NEW_LAUNCH_METHOD +static void startup_trigger_thread(void *arg) { + struct arg args = *((struct arg *)arg); + free(arg); + startup_trigger(args.argc, args.argv, args.envp); +} + int main(int argc, char **argv, char **envp) { + BOOL listenOnly = FALSE; + int i; + + for(i=1; i < argc; i++) { + if(!strcmp(argv[i], "--listenonly")) { + listenOnly = TRUE; + break; + } + } + + /* Check if we need to do something other than listen, and make another + * thread handle it. + */ + if(!listenOnly) { + struct arg *args = (struct arg*)malloc(sizeof(struct arg)); + if(!args) + FatalError("Could not allocate memory.\n"); + + args->argc = argc; + args->argv = argv; + args->envp = envp; + + create_thread(startup_trigger_thread, args); + } else { + /* TODO: This should actually fall through rather than be the else + * case once we figure out how to get the stub to pass the + * file descriptor. For now, we only listen if we are explicitly + * told to. + */ + + mach_msg_size_t mxmsgsz = sizeof(union MaxMsgSize) + MAX_TRAILER_SIZE; + mach_port_t mp = checkin_or_register(SERVER_BOOTSTRAP_NAME); + kern_return_t kr; + + /* Main event loop */ + kr = mach_msg_server(mach_startup_server, mxmsgsz, mp, 0); + if (kr != KERN_SUCCESS) { + asl_log(NULL, NULL, ASL_LEVEL_ERR, + "org.x.X11(mp): %s\n", mach_error_string(kr)); + exit(EXIT_FAILURE); + } + } + + return EXIT_SUCCESS; +} + +int startup_trigger(int argc, char **argv, char **envp) { +#else +int main(int argc, char **argv, char **envp) { +#endif Display *display; const char *s; - + size_t i; fprintf(stderr, "X11.app: main(): argc=%d\n", argc); for(i=0; i < argc; i++) { @@ -57,7 +198,15 @@ int main(int argc, char **argv, char **envp) { /* Take care of the case where we're called like a normal DDX */ if(argc > 1 && argv[1][0] == ':') { - exit(server_main(argc, argv, envp)); +#ifdef NEW_LAUNCH_METHOD + /* We need to count envp */ + int envpc; + for(envpc=0; envp[envpc]; envpc++); + + return start_x11_server(argc, argv, envp, envpc); +#else + return server_main(argc, argv, envp); +#endif } /* If we have a process serial number and it's our only arg, act as if @@ -70,7 +219,7 @@ int main(int argc, char **argv, char **envp) { fprintf(stderr, "X11.app: Closing the display and sleeping for 2s to allow the X server to start up.\n"); /* Could open the display, start the launcher */ XCloseDisplay(display); - + /* Give 2 seconds for the server to start... * TODO: *Really* fix this race condition */ @@ -78,7 +227,7 @@ int main(int argc, char **argv, char **envp) { return execute(command_from_prefs("app_to_run", DEFAULT_CLIENT)); } } - + /* Start the server */ if((s = getenv("DISPLAY"))) { fprintf(stderr, "X11.app: Could not connect to server (DISPLAY=\"%s\", unsetting). Starting X server.\n", s); diff --git a/hw/xquartz/mach-startup/mach_startup.defs b/hw/xquartz/mach-startup/mach_startup.defs new file mode 100644 index 000000000..83b31b7c0 --- /dev/null +++ b/hw/xquartz/mach-startup/mach_startup.defs @@ -0,0 +1,41 @@ +/* Copyright (c) 2008 Apple Inc. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation files + * (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + * HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name(s) of the above + * copyright holders shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization. + */ + +#include +#include +import "mach_startup_types.h"; + +subsystem mach_startup 1000; +serverprefix do_; + +type string_array_t = array[] of c_string[1024]; + +routine start_x11_server( + port : mach_port_t; + argv : string_array_t; + envp : string_array_t); diff --git a/hw/xquartz/mach-startup/mach_startup_types.h b/hw/xquartz/mach-startup/mach_startup_types.h new file mode 100644 index 000000000..03939af97 --- /dev/null +++ b/hw/xquartz/mach-startup/mach_startup_types.h @@ -0,0 +1,8 @@ +#ifndef _MACH_STARTUP_TYPES_H_ +#define _MACH_STARTUP_TYPES_H_ + +#define SERVER_BOOTSTRAP_NAME "org.x.X11" + +typedef char ** string_array_t; + +#endif From ac4e33a9cd0ca2f0ec76181d11d5b90b82690c05 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Mon, 12 May 2008 09:27:27 -0700 Subject: [PATCH 489/634] XQuartz: More startup work... listen if we're the actual server (cherry picked from commit 3b0afb47c3d8ad922cb2315ed8034f4d77d4a249) --- hw/xquartz/mach-startup/bundle-main.c | 33 +++++++++++++++------------ 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c index 24b67d871..b0ff9df5b 100644 --- a/hw/xquartz/mach-startup/bundle-main.c +++ b/hw/xquartz/mach-startup/bundle-main.c @@ -139,6 +139,9 @@ static void startup_trigger_thread(void *arg) { int main(int argc, char **argv, char **envp) { BOOL listenOnly = FALSE; int i; + mach_msg_size_t mxmsgsz = sizeof(union MaxMsgSize) + MAX_TRAILER_SIZE; + mach_port_t mp; + kern_return_t kr; for(i=1; i < argc; i++) { if(!strcmp(argv[i], "--listenonly")) { @@ -147,6 +150,11 @@ int main(int argc, char **argv, char **envp) { } } + /* TODO: This should be unconditional once we figure out fd passing */ + if((argc > 1 && argv[1][0] == ':') || listenOnly) { + mp = checkin_or_register(SERVER_BOOTSTRAP_NAME); + } + /* Check if we need to do something other than listen, and make another * thread handle it. */ @@ -154,23 +162,20 @@ int main(int argc, char **argv, char **envp) { struct arg *args = (struct arg*)malloc(sizeof(struct arg)); if(!args) FatalError("Could not allocate memory.\n"); - + args->argc = argc; args->argv = argv; args->envp = envp; create_thread(startup_trigger_thread, args); - } else { - /* TODO: This should actually fall through rather than be the else - * case once we figure out how to get the stub to pass the - * file descriptor. For now, we only listen if we are explicitly - * told to. - */ + } - mach_msg_size_t mxmsgsz = sizeof(union MaxMsgSize) + MAX_TRAILER_SIZE; - mach_port_t mp = checkin_or_register(SERVER_BOOTSTRAP_NAME); - kern_return_t kr; - + /* TODO: This should actually fall through rather than be the else + * case once we figure out how to get the stub to pass the + * file descriptor. For now, we only listen if we are explicitly + * told to. + */ + if((argc > 1 && argv[1][0] == ':') || listenOnly) { /* Main event loop */ kr = mach_msg_server(mach_startup_server, mxmsgsz, mp, 0); if (kr != KERN_SUCCESS) { @@ -179,7 +184,7 @@ int main(int argc, char **argv, char **envp) { exit(EXIT_FAILURE); } } - + return EXIT_SUCCESS; } @@ -208,7 +213,7 @@ int main(int argc, char **argv, char **envp) { return server_main(argc, argv, envp); #endif } - + /* If we have a process serial number and it's our only arg, act as if * the user double clicked the app bundle: launch app_to_run if possible */ @@ -227,7 +232,7 @@ int main(int argc, char **argv, char **envp) { return execute(command_from_prefs("app_to_run", DEFAULT_CLIENT)); } } - + /* Start the server */ if((s = getenv("DISPLAY"))) { fprintf(stderr, "X11.app: Could not connect to server (DISPLAY=\"%s\", unsetting). Starting X server.\n", s); From f9fae16456c30479b0cb9317e57200af36795785 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Mon, 12 May 2008 10:36:44 -0700 Subject: [PATCH 490/634] XQuartz: Added some version checking protection so we don't trigger an infinite exec loop with new /usr/X11/bin/Xquartz and older X11.app (cherry picked from commit 78032815aeb10c22ff45b49702e9c9df82ab471c) --- hw/xquartz/bundle/Info.plist | 4 +++ hw/xquartz/mach-startup/stub.c | 46 +++++++++++++++++++++++++--------- 2 files changed, 38 insertions(+), 12 deletions(-) diff --git a/hw/xquartz/bundle/Info.plist b/hw/xquartz/bundle/Info.plist index 4b0830f0e..30bb3c891 100644 --- a/hw/xquartz/bundle/Info.plist +++ b/hw/xquartz/bundle/Info.plist @@ -20,6 +20,10 @@ APPL CFBundleShortVersionString 2.3.0 + CFBundleVersion + 2.3.0 + CFBundleVersionString + 2.3.0 CFBundleSignature x11a CSResourcesFileMapped diff --git a/hw/xquartz/mach-startup/stub.c b/hw/xquartz/mach-startup/stub.c index 70f222c27..3be5f6568 100644 --- a/hw/xquartz/mach-startup/stub.c +++ b/hw/xquartz/mach-startup/stub.c @@ -43,33 +43,55 @@ static char x11_path[PATH_MAX + 1]; static void set_x11_path() { CFURLRef appURL = NULL; + CFBundleRef bundle = NULL; OSStatus osstatus = LSFindApplicationForInfo(kLSUnknownCreator, CFSTR(kX11AppBundleId), nil, nil, &appURL); - + UInt32 ver; + switch (osstatus) { case noErr: if (appURL == NULL) { - fprintf(stderr, "xinit: Invalid response from LSFindApplicationForInfo(%s)\n", + fprintf(stderr, "Xquartz: Invalid response from LSFindApplicationForInfo(%s)\n", kX11AppBundleId); exit(1); } - - if (!CFURLGetFileSystemRepresentation(appURL, true, (unsigned char *)x11_path, sizeof(x11_path))) { - fprintf(stderr, "xinit: Error resolving URL for %s\n", kX11AppBundleId); - exit(2); + + bundle = CFBundleCreate(NULL, appURL); + if(!bundle) { + fprintf(stderr, "Xquartz: Null value returned from CFBundleCreate().\n"); + exit(2); } - + + if (!CFURLGetFileSystemRepresentation(appURL, true, (unsigned char *)x11_path, sizeof(x11_path))) { + fprintf(stderr, "Xquartz: Error resolving URL for %s\n", kX11AppBundleId); + exit(3); + } + + ver = CFBundleGetVersionNumber(bundle); + if(ver < 0x02308000) { + CFStringRef versionStr = CFBundleGetValueForInfoDictionaryKey(bundle, kCFBundleVersionKey); + const char * versionCStr = "Unknown"; + + if(versionStr) + versionCStr = CFStringGetCStringPtr(versionStr, kCFStringEncodingMacRoman); + + fprintf(stderr, "Xquartz: Could not find a new enough X11.app LSFindApplicationForInfo() returned\n"); + fprintf(stderr, " X11.app = %s\n", x11_path); + fprintf(stderr, " Version = %s (%x), Expected Version > 2.3.0\n", versionCStr, (unsigned)ver); + exit(9); + } + strlcat(x11_path, kX11AppBundlePath, sizeof(x11_path)); #ifdef DEBUG - fprintf(stderr, "XQuartz: X11.app = %s\n", x11_path); + fprintf(stderr, "Xquartz: X11.app = %s\n", x11_path); #endif break; case kLSApplicationNotFoundErr: - fprintf(stderr, "XQuartz: Unable to find application for %s\n", kX11AppBundleId); - exit(4); + fprintf(stderr, "Xquartz: Unable to find application for %s\n", kX11AppBundleId); + exit(10); default: - fprintf(stderr, "XQuartz: Unable to find application for %s, error code = %d\n", + fprintf(stderr, "Xquartz: Unable to find application for %s, error code = %d\n", kX11AppBundleId, (int)osstatus); - exit(5); + exit(11); } } From 1c8bd318fbaf65890ef16fe26c76dd5e6f14dfde Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 12 May 2008 14:15:11 -0400 Subject: [PATCH 491/634] X n'est pas une print API. --- Xext/Makefile.am | 7 - Xext/xprint.c | 2617 -------------- configure.ac | 102 - dix/Makefile.am | 10 - dix/dispatch.c | 6 - dix/dixfonts.c | 50 +- dix/globals.c | 3 - dix/main.c | 9 - dix/xpstubs.c | 28 - hw/Makefile.am | 9 +- hw/xnest/Font.c | 5 - hw/xprint/AttrValid.c | 701 ---- hw/xprint/AttrValid.h | 219 -- hw/xprint/DiPrint.h | 85 - hw/xprint/Init.c | 1920 ---------- hw/xprint/Makefile.am | 58 - hw/xprint/Oid.c | 3181 ----------------- hw/xprint/Oid.h | 293 -- hw/xprint/OidDefs.h | 170 - hw/xprint/OidStrs.h | 172 - hw/xprint/Util.c | 370 -- hw/xprint/ValTree.c | 191 - hw/xprint/attributes.c | 1740 --------- hw/xprint/attributes.h | 130 - hw/xprint/config/C/Makefile.am | 1 - hw/xprint/config/C/print/Makefile.am | 14 - hw/xprint/config/C/print/Xprinters | 49 - .../config/C/print/attributes/Makefile.am | 3 - hw/xprint/config/C/print/attributes/document | 49 - hw/xprint/config/C/print/attributes/job | 25 - hw/xprint/config/C/print/attributes/printer | 96 - .../config/C/print/ddx-config/Makefile.am | 1 - .../C/print/ddx-config/raster/Makefile.am | 3 - .../config/C/print/ddx-config/raster/pcl | 39 - .../C/print/ddx-config/raster/postscript | 0 .../C/print/models/CANONBJ10E-GS/Makefile.am | 3 - .../C/print/models/CANONBJ10E-GS/model-config | 23 - .../C/print/models/CANONC3200-PS/Makefile.am | 5 - .../models/CANONC3200-PS/fonts/Makefile.am | 54 - .../C/print/models/CANONC3200-PS/model-config | 40 - .../C/print/models/GSdefault/Makefile.am | 3 - .../C/print/models/GSdefault/model-config | 137 - .../C/print/models/HPDJ1600C/Makefile.am | 5 - .../print/models/HPDJ1600C/fonts/9nb00051.pmf | Bin 5740 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00052.pmf | Bin 5736 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00053.pmf | Bin 5740 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00054.pmf | Bin 5744 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00055.pmf | Bin 5740 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00056.pmf | Bin 5724 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00057.pmf | Bin 5632 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00058.pmf | Bin 5740 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00059.pmf | Bin 5720 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00060.pmf | Bin 5740 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00061.pmf | Bin 5720 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00062.pmf | Bin 5728 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00063.pmf | Bin 5728 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00064.pmf | Bin 5720 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00065.pmf | Bin 5728 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00066.pmf | Bin 5732 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00067.pmf | Bin 5736 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00068.pmf | Bin 5732 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00069.pmf | Bin 5740 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00070.pmf | Bin 5744 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00071.pmf | Bin 5740 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00072.pmf | Bin 5724 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00073.pmf | Bin 5720 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00074.pmf | Bin 5724 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00075.pmf | Bin 5724 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00076.pmf | Bin 5716 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00077.pmf | Bin 5720 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00079.pmf | Bin 5656 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00080.pmf | Bin 5664 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00081.pmf | Bin 5672 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00082.pmf | Bin 5660 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00083.pmf | Bin 5720 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00084.pmf | Bin 5724 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00085.pmf | Bin 5724 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00086.pmf | Bin 5716 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00087.pmf | Bin 5752 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00088.pmf | Bin 5720 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00089.pmf | Bin 5744 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00090.pmf | Bin 5736 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00091.pmf | Bin 5744 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00092.pmf | Bin 5736 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00093.pmf | Bin 5728 -> 0 bytes .../print/models/HPDJ1600C/fonts/9nb00094.pmf | Bin 5728 -> 0 bytes .../print/models/HPDJ1600C/fonts/Makefile.am | 50 - .../C/print/models/HPDJ1600C/fonts/README | 197 - .../print/models/HPDJ1600C/fonts/fonts.alias | 0 .../C/print/models/HPDJ1600C/fonts/fonts.dir | 45 - .../print/models/HPDJ1600C/fonts/lpr0ye1a.pmf | Bin 4296 -> 0 bytes .../C/print/models/HPDJ1600C/model-config | 40 - .../C/print/models/HPLJ4050-PS/Makefile.am | 5 - .../models/HPLJ4050-PS/fonts/Makefile.am | 54 - .../C/print/models/HPLJ4050-PS/model-config | 36 - .../C/print/models/HPLJ4family/Makefile.am | 5 - .../models/HPLJ4family/fonts/9nb00051.pmf | Bin 5740 -> 0 bytes .../models/HPLJ4family/fonts/9nb00052.pmf | Bin 5736 -> 0 bytes .../models/HPLJ4family/fonts/9nb00053.pmf | Bin 5740 -> 0 bytes .../models/HPLJ4family/fonts/9nb00054.pmf | Bin 5744 -> 0 bytes .../models/HPLJ4family/fonts/9nb00055.pmf | Bin 5740 -> 0 bytes .../models/HPLJ4family/fonts/9nb00056.pmf | Bin 5724 -> 0 bytes .../models/HPLJ4family/fonts/9nb00057.pmf | Bin 5632 -> 0 bytes .../models/HPLJ4family/fonts/9nb00058.pmf | Bin 5740 -> 0 bytes .../models/HPLJ4family/fonts/9nb00059.pmf | Bin 5720 -> 0 bytes .../models/HPLJ4family/fonts/9nb00060.pmf | Bin 5740 -> 0 bytes .../models/HPLJ4family/fonts/9nb00061.pmf | Bin 5720 -> 0 bytes .../models/HPLJ4family/fonts/9nb00062.pmf | Bin 5728 -> 0 bytes .../models/HPLJ4family/fonts/9nb00063.pmf | Bin 5728 -> 0 bytes .../models/HPLJ4family/fonts/9nb00064.pmf | Bin 5720 -> 0 bytes .../models/HPLJ4family/fonts/9nb00065.pmf | Bin 5728 -> 0 bytes .../models/HPLJ4family/fonts/9nb00066.pmf | Bin 5732 -> 0 bytes .../models/HPLJ4family/fonts/9nb00067.pmf | Bin 5736 -> 0 bytes .../models/HPLJ4family/fonts/9nb00068.pmf | Bin 5732 -> 0 bytes .../models/HPLJ4family/fonts/9nb00069.pmf | Bin 5740 -> 0 bytes .../models/HPLJ4family/fonts/9nb00070.pmf | Bin 5744 -> 0 bytes .../models/HPLJ4family/fonts/9nb00071.pmf | Bin 5740 -> 0 bytes .../models/HPLJ4family/fonts/9nb00072.pmf | Bin 5724 -> 0 bytes .../models/HPLJ4family/fonts/9nb00073.pmf | Bin 5720 -> 0 bytes .../models/HPLJ4family/fonts/9nb00074.pmf | Bin 5724 -> 0 bytes .../models/HPLJ4family/fonts/9nb00075.pmf | Bin 5724 -> 0 bytes .../models/HPLJ4family/fonts/9nb00076.pmf | Bin 5716 -> 0 bytes .../models/HPLJ4family/fonts/9nb00077.pmf | Bin 5720 -> 0 bytes .../models/HPLJ4family/fonts/9nb00079.pmf | Bin 5656 -> 0 bytes .../models/HPLJ4family/fonts/9nb00080.pmf | Bin 5664 -> 0 bytes .../models/HPLJ4family/fonts/9nb00081.pmf | Bin 5672 -> 0 bytes .../models/HPLJ4family/fonts/9nb00082.pmf | Bin 5660 -> 0 bytes .../models/HPLJ4family/fonts/9nb00083.pmf | Bin 5720 -> 0 bytes .../models/HPLJ4family/fonts/9nb00084.pmf | Bin 5724 -> 0 bytes .../models/HPLJ4family/fonts/9nb00085.pmf | Bin 5724 -> 0 bytes .../models/HPLJ4family/fonts/9nb00086.pmf | Bin 5716 -> 0 bytes .../models/HPLJ4family/fonts/9nb00087.pmf | Bin 5752 -> 0 bytes .../models/HPLJ4family/fonts/9nb00088.pmf | Bin 5720 -> 0 bytes .../models/HPLJ4family/fonts/9nb00089.pmf | Bin 5744 -> 0 bytes .../models/HPLJ4family/fonts/9nb00090.pmf | Bin 5736 -> 0 bytes .../models/HPLJ4family/fonts/9nb00091.pmf | Bin 5744 -> 0 bytes .../models/HPLJ4family/fonts/9nb00092.pmf | Bin 5736 -> 0 bytes .../models/HPLJ4family/fonts/9nb00093.pmf | Bin 5728 -> 0 bytes .../models/HPLJ4family/fonts/9nb00094.pmf | Bin 5728 -> 0 bytes .../models/HPLJ4family/fonts/Makefile.am | 50 - .../C/print/models/HPLJ4family/fonts/README | 203 -- .../models/HPLJ4family/fonts/fonts.alias | 0 .../print/models/HPLJ4family/fonts/fonts.dir | 45 - .../models/HPLJ4family/fonts/lpr0ye1a.pmf | Bin 4296 -> 0 bytes .../C/print/models/HPLJ4family/model-config | 39 - hw/xprint/config/C/print/models/Makefile.am | 11 - .../models/PS2PDFspooldir-GS/Makefile.am | 4 - .../models/PS2PDFspooldir-GS/model-config | 72 - .../PS2PDFspooldir-GS/ps2pdf_spooltodir.sh | 130 - .../C/print/models/PSdefault/Makefile.am | 5 - .../PSdefault/fonts/AvantGarde-Book.pmf | Bin 6716 -> 0 bytes .../fonts/AvantGarde-BookOblique.pmf | Bin 6728 -> 0 bytes .../PSdefault/fonts/AvantGarde-Demi.pmf | Bin 6712 -> 0 bytes .../fonts/AvantGarde-DemiOblique.pmf | Bin 6724 -> 0 bytes .../models/PSdefault/fonts/Courier-Bold.pmf | Bin 6612 -> 0 bytes .../PSdefault/fonts/Courier-BoldOblique.pmf | Bin 6636 -> 0 bytes .../PSdefault/fonts/Courier-Oblique.pmf | Bin 6608 -> 0 bytes .../print/models/PSdefault/fonts/Courier.pmf | Bin 6592 -> 0 bytes .../models/PSdefault/fonts/Helvetica-Bold.pmf | Bin 6680 -> 0 bytes .../PSdefault/fonts/Helvetica-BoldOblique.pmf | Bin 6692 -> 0 bytes .../PSdefault/fonts/Helvetica-Oblique.pmf | Bin 6688 -> 0 bytes .../models/PSdefault/fonts/Helvetica.pmf | Bin 6672 -> 0 bytes .../PSdefault/fonts/LubalinGraph-Book.pmf | Bin 6628 -> 0 bytes .../fonts/LubalinGraph-BookOblique.pmf | Bin 6640 -> 0 bytes .../PSdefault/fonts/LubalinGraph-Demi.pmf | Bin 6624 -> 0 bytes .../fonts/LubalinGraph-DemiOblique.pmf | Bin 6636 -> 0 bytes .../print/models/PSdefault/fonts/Makefile.am | 44 - .../PSdefault/fonts/NewCentSchlbk-Bold.pmf | Bin 6644 -> 0 bytes .../fonts/NewCentSchlbk-BoldItal.pmf | Bin 6656 -> 0 bytes .../PSdefault/fonts/NewCentSchlbk-Ital.pmf | Bin 6652 -> 0 bytes .../PSdefault/fonts/NewCentSchlbk-Roman.pmf | Bin 6648 -> 0 bytes .../models/PSdefault/fonts/Souvenir-Demi.pmf | Bin 6680 -> 0 bytes .../PSdefault/fonts/Souvenir-DemiItalic.pmf | Bin 6692 -> 0 bytes .../models/PSdefault/fonts/Souvenir-Light.pmf | Bin 6684 -> 0 bytes .../PSdefault/fonts/Souvenir-LightItalic.pmf | Bin 6696 -> 0 bytes .../C/print/models/PSdefault/fonts/Symbol.pmf | Bin 6556 -> 0 bytes .../models/PSdefault/fonts/Times-Bold.pmf | Bin 6660 -> 0 bytes .../PSdefault/fonts/Times-BoldItalic.pmf | Bin 6672 -> 0 bytes .../models/PSdefault/fonts/Times-Italic.pmf | Bin 6668 -> 0 bytes .../models/PSdefault/fonts/Times-Roman.pmf | Bin 6664 -> 0 bytes .../models/PSdefault/fonts/ZapfDingbats.pmf | Bin 6676 -> 0 bytes .../C/print/models/PSdefault/model-config | 136 - .../C/print/models/PSspooldir/Makefile.am | 4 - .../C/print/models/PSspooldir/model-config | 71 - .../C/print/models/PSspooldir/spooltodir.sh | 127 - .../C/print/models/SPSPARC2/Makefile.am | 5 - .../C/print/models/SPSPARC2/fonts/Makefile.am | 37 - .../C/print/models/SPSPARC2/model-config | 18 - hw/xprint/config/Makefile.am | 712 ---- hw/xprint/config/README | 318 -- hw/xprint/config/en_US/Makefile.am | 1 - hw/xprint/config/en_US/print/Makefile.am | 1 - .../config/en_US/print/attributes/Makefile.am | 3 - .../config/en_US/print/attributes/document | 13 - hw/xprint/ddxInit.c | 390 -- hw/xprint/doc/Makefile.am | 19 - hw/xprint/doc/Xprt.html | 115 - hw/xprint/doc/Xprt.man.pre | 196 - hw/xprint/doc/Xprt.sgml | 371 -- hw/xprint/etc/Makefile.am | 1 - .../etc/Xsession.d/92xprint-xpserverlist | 30 - hw/xprint/etc/Xsession.d/Makefile.am | 2 - hw/xprint/etc/init.d/Makefile.am | 12 - hw/xprint/etc/init.d/xprint.cpp | 1277 ------- hw/xprint/etc/profile.d/Makefile.am | 1 - hw/xprint/etc/profile.d/xprint.csh | 16 - hw/xprint/etc/profile.d/xprint.sh | 16 - hw/xprint/mediaSizes.c | 782 ---- hw/xprint/pcl-mono/Makefile.am | 5 - hw/xprint/pcl/Makefile.am | 6 - hw/xprint/pcl/Makefile.am.inc | 27 - hw/xprint/pcl/Pcl.h | 619 ---- hw/xprint/pcl/PclArc.c | 268 -- hw/xprint/pcl/PclArea.c | 436 --- hw/xprint/pcl/PclAttVal.c | 206 -- hw/xprint/pcl/PclAttr.c | 86 - hw/xprint/pcl/PclColor.c | 851 ----- hw/xprint/pcl/PclCursor.c | 113 - hw/xprint/pcl/PclDef.h | 67 - hw/xprint/pcl/PclFonts.c | 72 - hw/xprint/pcl/PclGC.c | 971 ----- hw/xprint/pcl/PclInit.c | 575 --- hw/xprint/pcl/PclLine.c | 314 -- hw/xprint/pcl/PclMisc.c | 301 -- hw/xprint/pcl/PclPixel.c | 159 - hw/xprint/pcl/PclPolygon.c | 351 -- hw/xprint/pcl/PclPrint.c | 709 ---- hw/xprint/pcl/PclSFonts.c | 427 --- hw/xprint/pcl/PclSFonts.h | 115 - hw/xprint/pcl/PclSpans.c | 137 - hw/xprint/pcl/PclText.c | 934 ----- hw/xprint/pcl/PclWindow.c | 209 -- hw/xprint/pcl/Pclmap.h | 210 -- hw/xprint/ps/Makefile.am | 42 - hw/xprint/ps/Ps.h | 600 ---- hw/xprint/ps/PsArc.c | 181 - hw/xprint/ps/PsArea.c | 390 -- hw/xprint/ps/PsAttVal.c | 289 -- hw/xprint/ps/PsAttr.c | 116 - hw/xprint/ps/PsCache.c | 328 -- hw/xprint/ps/PsColor.c | 257 -- hw/xprint/ps/PsDef.h | 96 - hw/xprint/ps/PsFTFonts.c | 85 - hw/xprint/ps/PsFonts.c | 873 ----- hw/xprint/ps/PsGC.c | 418 --- hw/xprint/ps/PsImageUtil.c | 329 -- hw/xprint/ps/PsInit.c | 648 ---- hw/xprint/ps/PsLine.c | 191 - hw/xprint/ps/PsMisc.c | 320 -- hw/xprint/ps/PsPixel.c | 156 - hw/xprint/ps/PsPixmap.c | 623 ---- hw/xprint/ps/PsPolygon.c | 259 -- hw/xprint/ps/PsPrint.c | 459 --- hw/xprint/ps/PsSpans.c | 164 - hw/xprint/ps/PsText.c | 581 --- hw/xprint/ps/PsWindow.c | 222 -- hw/xprint/ps/psout.c | 1789 --------- hw/xprint/ps/psout.h | 335 -- hw/xprint/ps/psout_ft.c | 337 -- hw/xprint/ps/psout_ftpstype1.c | 185 - hw/xprint/ps/psout_ftpstype3.c | 439 --- hw/xprint/ps/ttf2pt1wrap.c | 14 - hw/xprint/raster/Makefile.am | 10 - hw/xprint/raster/Raster.c | 1563 -------- hw/xprint/raster/Raster.h | 117 - hw/xprint/raster/RasterAttVal.c | 267 -- hw/xprint/spooler.c | 202 -- hw/xprint/spooler.h | 75 - include/dix.h | 3 - mi/miinitext.c | 48 +- os/utils.c | 13 - 271 files changed, 26 insertions(+), 39501 deletions(-) delete mode 100644 Xext/xprint.c delete mode 100644 hw/xprint/AttrValid.c delete mode 100644 hw/xprint/AttrValid.h delete mode 100644 hw/xprint/DiPrint.h delete mode 100644 hw/xprint/Init.c delete mode 100644 hw/xprint/Makefile.am delete mode 100644 hw/xprint/Oid.c delete mode 100644 hw/xprint/Oid.h delete mode 100644 hw/xprint/OidDefs.h delete mode 100644 hw/xprint/OidStrs.h delete mode 100644 hw/xprint/Util.c delete mode 100644 hw/xprint/ValTree.c delete mode 100644 hw/xprint/attributes.c delete mode 100644 hw/xprint/attributes.h delete mode 100644 hw/xprint/config/C/Makefile.am delete mode 100644 hw/xprint/config/C/print/Makefile.am delete mode 100644 hw/xprint/config/C/print/Xprinters delete mode 100644 hw/xprint/config/C/print/attributes/Makefile.am delete mode 100644 hw/xprint/config/C/print/attributes/document delete mode 100644 hw/xprint/config/C/print/attributes/job delete mode 100644 hw/xprint/config/C/print/attributes/printer delete mode 100644 hw/xprint/config/C/print/ddx-config/Makefile.am delete mode 100644 hw/xprint/config/C/print/ddx-config/raster/Makefile.am delete mode 100644 hw/xprint/config/C/print/ddx-config/raster/pcl delete mode 100644 hw/xprint/config/C/print/ddx-config/raster/postscript delete mode 100644 hw/xprint/config/C/print/models/CANONBJ10E-GS/Makefile.am delete mode 100644 hw/xprint/config/C/print/models/CANONBJ10E-GS/model-config delete mode 100644 hw/xprint/config/C/print/models/CANONC3200-PS/Makefile.am delete mode 100644 hw/xprint/config/C/print/models/CANONC3200-PS/fonts/Makefile.am delete mode 100644 hw/xprint/config/C/print/models/CANONC3200-PS/model-config delete mode 100644 hw/xprint/config/C/print/models/GSdefault/Makefile.am delete mode 100644 hw/xprint/config/C/print/models/GSdefault/model-config delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/Makefile.am delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00051.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00052.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00053.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00054.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00055.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00056.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00057.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00058.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00059.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00060.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00061.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00062.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00063.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00064.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00065.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00066.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00067.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00068.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00069.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00070.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00071.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00072.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00073.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00074.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00075.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00076.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00077.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00079.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00080.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00081.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00082.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00083.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00084.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00085.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00086.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00087.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00088.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00089.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00090.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00091.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00092.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00093.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00094.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/Makefile.am delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/README delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/fonts.alias delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/fonts.dir delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/fonts/lpr0ye1a.pmf delete mode 100644 hw/xprint/config/C/print/models/HPDJ1600C/model-config delete mode 100644 hw/xprint/config/C/print/models/HPLJ4050-PS/Makefile.am delete mode 100644 hw/xprint/config/C/print/models/HPLJ4050-PS/fonts/Makefile.am delete mode 100644 hw/xprint/config/C/print/models/HPLJ4050-PS/model-config delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/Makefile.am delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00051.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00052.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00053.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00054.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00055.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00056.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00057.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00058.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00059.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00060.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00061.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00062.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00063.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00064.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00065.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00066.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00067.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00068.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00069.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00070.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00071.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00072.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00073.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00074.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00075.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00076.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00077.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00079.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00080.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00081.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00082.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00083.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00084.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00085.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00086.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00087.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00088.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00089.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00090.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00091.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00092.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00093.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00094.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/Makefile.am delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/README delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/fonts.alias delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/fonts.dir delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/fonts/lpr0ye1a.pmf delete mode 100644 hw/xprint/config/C/print/models/HPLJ4family/model-config delete mode 100644 hw/xprint/config/C/print/models/Makefile.am delete mode 100644 hw/xprint/config/C/print/models/PS2PDFspooldir-GS/Makefile.am delete mode 100644 hw/xprint/config/C/print/models/PS2PDFspooldir-GS/model-config delete mode 100755 hw/xprint/config/C/print/models/PS2PDFspooldir-GS/ps2pdf_spooltodir.sh delete mode 100644 hw/xprint/config/C/print/models/PSdefault/Makefile.am delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-Book.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-BookOblique.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-Demi.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-DemiOblique.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/Courier-Bold.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/Courier-BoldOblique.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/Courier-Oblique.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/Courier.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-Bold.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-BoldOblique.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-Oblique.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-Book.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-BookOblique.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-Demi.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-DemiOblique.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/Makefile.am delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Bold.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-BoldItal.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Ital.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Roman.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-Demi.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-DemiItalic.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-Light.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-LightItalic.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/Symbol.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/Times-Bold.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/Times-BoldItalic.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/Times-Italic.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/Times-Roman.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/fonts/ZapfDingbats.pmf delete mode 100644 hw/xprint/config/C/print/models/PSdefault/model-config delete mode 100644 hw/xprint/config/C/print/models/PSspooldir/Makefile.am delete mode 100644 hw/xprint/config/C/print/models/PSspooldir/model-config delete mode 100755 hw/xprint/config/C/print/models/PSspooldir/spooltodir.sh delete mode 100644 hw/xprint/config/C/print/models/SPSPARC2/Makefile.am delete mode 100644 hw/xprint/config/C/print/models/SPSPARC2/fonts/Makefile.am delete mode 100644 hw/xprint/config/C/print/models/SPSPARC2/model-config delete mode 100644 hw/xprint/config/Makefile.am delete mode 100644 hw/xprint/config/README delete mode 100644 hw/xprint/config/en_US/Makefile.am delete mode 100644 hw/xprint/config/en_US/print/Makefile.am delete mode 100644 hw/xprint/config/en_US/print/attributes/Makefile.am delete mode 100644 hw/xprint/config/en_US/print/attributes/document delete mode 100644 hw/xprint/ddxInit.c delete mode 100644 hw/xprint/doc/Makefile.am delete mode 100644 hw/xprint/doc/Xprt.html delete mode 100644 hw/xprint/doc/Xprt.man.pre delete mode 100644 hw/xprint/doc/Xprt.sgml delete mode 100644 hw/xprint/etc/Makefile.am delete mode 100644 hw/xprint/etc/Xsession.d/92xprint-xpserverlist delete mode 100644 hw/xprint/etc/Xsession.d/Makefile.am delete mode 100644 hw/xprint/etc/init.d/Makefile.am delete mode 100644 hw/xprint/etc/init.d/xprint.cpp delete mode 100644 hw/xprint/etc/profile.d/Makefile.am delete mode 100644 hw/xprint/etc/profile.d/xprint.csh delete mode 100644 hw/xprint/etc/profile.d/xprint.sh delete mode 100644 hw/xprint/mediaSizes.c delete mode 100644 hw/xprint/pcl-mono/Makefile.am delete mode 100644 hw/xprint/pcl/Makefile.am delete mode 100644 hw/xprint/pcl/Makefile.am.inc delete mode 100644 hw/xprint/pcl/Pcl.h delete mode 100644 hw/xprint/pcl/PclArc.c delete mode 100644 hw/xprint/pcl/PclArea.c delete mode 100644 hw/xprint/pcl/PclAttVal.c delete mode 100644 hw/xprint/pcl/PclAttr.c delete mode 100644 hw/xprint/pcl/PclColor.c delete mode 100644 hw/xprint/pcl/PclCursor.c delete mode 100644 hw/xprint/pcl/PclDef.h delete mode 100644 hw/xprint/pcl/PclFonts.c delete mode 100644 hw/xprint/pcl/PclGC.c delete mode 100644 hw/xprint/pcl/PclInit.c delete mode 100644 hw/xprint/pcl/PclLine.c delete mode 100644 hw/xprint/pcl/PclMisc.c delete mode 100644 hw/xprint/pcl/PclPixel.c delete mode 100644 hw/xprint/pcl/PclPolygon.c delete mode 100644 hw/xprint/pcl/PclPrint.c delete mode 100644 hw/xprint/pcl/PclSFonts.c delete mode 100644 hw/xprint/pcl/PclSFonts.h delete mode 100644 hw/xprint/pcl/PclSpans.c delete mode 100644 hw/xprint/pcl/PclText.c delete mode 100644 hw/xprint/pcl/PclWindow.c delete mode 100644 hw/xprint/pcl/Pclmap.h delete mode 100644 hw/xprint/ps/Makefile.am delete mode 100644 hw/xprint/ps/Ps.h delete mode 100644 hw/xprint/ps/PsArc.c delete mode 100644 hw/xprint/ps/PsArea.c delete mode 100644 hw/xprint/ps/PsAttVal.c delete mode 100644 hw/xprint/ps/PsAttr.c delete mode 100644 hw/xprint/ps/PsCache.c delete mode 100644 hw/xprint/ps/PsColor.c delete mode 100644 hw/xprint/ps/PsDef.h delete mode 100644 hw/xprint/ps/PsFTFonts.c delete mode 100644 hw/xprint/ps/PsFonts.c delete mode 100644 hw/xprint/ps/PsGC.c delete mode 100644 hw/xprint/ps/PsImageUtil.c delete mode 100644 hw/xprint/ps/PsInit.c delete mode 100644 hw/xprint/ps/PsLine.c delete mode 100644 hw/xprint/ps/PsMisc.c delete mode 100644 hw/xprint/ps/PsPixel.c delete mode 100644 hw/xprint/ps/PsPixmap.c delete mode 100644 hw/xprint/ps/PsPolygon.c delete mode 100644 hw/xprint/ps/PsPrint.c delete mode 100644 hw/xprint/ps/PsSpans.c delete mode 100644 hw/xprint/ps/PsText.c delete mode 100644 hw/xprint/ps/PsWindow.c delete mode 100644 hw/xprint/ps/psout.c delete mode 100644 hw/xprint/ps/psout.h delete mode 100644 hw/xprint/ps/psout_ft.c delete mode 100644 hw/xprint/ps/psout_ftpstype1.c delete mode 100644 hw/xprint/ps/psout_ftpstype3.c delete mode 100644 hw/xprint/ps/ttf2pt1wrap.c delete mode 100644 hw/xprint/raster/Makefile.am delete mode 100644 hw/xprint/raster/Raster.c delete mode 100644 hw/xprint/raster/Raster.h delete mode 100644 hw/xprint/raster/RasterAttVal.c delete mode 100644 hw/xprint/spooler.c delete mode 100644 hw/xprint/spooler.h diff --git a/Xext/Makefile.am b/Xext/Makefile.am index b03fedaa3..c5c5d2ee6 100644 --- a/Xext/Makefile.am +++ b/Xext/Makefile.am @@ -98,12 +98,6 @@ if XEVIE BUILTIN_SRCS += $(XEVIE_SRCS) endif -# XPrint: Printing via X Protocol -XPRINT_SRCS = xprint.c -if XPRINT -BUILTIN_SRCS += $(XPRINT_SRCS) -endif - # Multi-buffering extension MULTIBUFFER_SRCS = mbuf.c EXTRA_MULTIBUFFER_SRCS = mbufbf.c mbufpx.c @@ -149,7 +143,6 @@ EXTRA_DIST = \ $(XCALIBRATE_SRCS) \ $(XINERAMA_SRCS) \ $(XEVIE_SRCS) \ - $(XPRINT_SRCS) \ $(MULTIBUFFER_SRCS) \ $(EXTRA_MULTIBUFFER_SRCS) \ $(FONTCACHE_SRCS) \ diff --git a/Xext/xprint.c b/Xext/xprint.c deleted file mode 100644 index a5d8fcc33..000000000 --- a/Xext/xprint.c +++ /dev/null @@ -1,2617 +0,0 @@ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ -/******************************************************************* -** -** ********************************************************* -** * -** * File: xprint.c -** * -** * Copyright: Copyright 1993, 1995 Hewlett-Packard Company -** * -** * Copyright 1989 by The Massachusetts Institute of Technology -** * -** * Permission to use, copy, modify, and distribute this -** * software and its documentation for any purpose and without -** * fee is hereby granted, provided that the above copyright -** * notice appear in all copies and that both that copyright -** * notice and this permission notice appear in supporting -** * documentation, and that the name of MIT not be used in -** * advertising or publicity pertaining to distribution of the -** * software without specific prior written permission. -** * M.I.T. makes no representation about the suitability of -** * this software for any purpose. It is provided "as is" -** * without any express or implied warranty. -** * -** * MIT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -** * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- -** * NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MIT BE LI- -** * ABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -** * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -** * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -** * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH -** * THE USE OR PERFORMANCE OF THIS SOFTWARE. -** * -** ********************************************************* -** -********************************************************************/ - -#define _XP_PRINT_SERVER_ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#define NEED_EVENTS -#include -#undef NEED_EVENTS -#include "misc.h" -#include "windowstr.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "extnsionst.h" -#include "dixstruct.h" -#include -#include -#include -#include "../hw/xprint/DiPrint.h" -#include "../hw/xprint/attributes.h" -#include "modinit.h" - -static void XpResetProc(ExtensionEntry *); - -static int ProcXpDispatch(ClientPtr); -static int ProcXpSwappedDispatch(ClientPtr); - -static int ProcXpQueryVersion(ClientPtr); -static int ProcXpGetPrinterList(ClientPtr); -static int ProcXpCreateContext(ClientPtr); -static int ProcXpSetContext(ClientPtr); -static int ProcXpGetContext(ClientPtr); -static int ProcXpDestroyContext(ClientPtr); -static int ProcXpGetContextScreen(ClientPtr); -static int ProcXpStartJob(ClientPtr); -static int ProcXpEndJob(ClientPtr); -static int ProcXpStartDoc(ClientPtr); -static int ProcXpEndDoc(ClientPtr); -static int ProcXpStartPage(ClientPtr); -static int ProcXpEndPage(ClientPtr); -static int ProcXpSelectInput(ClientPtr); -static int ProcXpInputSelected(ClientPtr); -static int ProcXpPutDocumentData(ClientPtr); -static int ProcXpGetDocumentData(ClientPtr); -static int ProcXpGetAttributes(ClientPtr); -static int ProcXpGetOneAttribute(ClientPtr); -static int ProcXpSetAttributes(ClientPtr); -static int ProcXpRehashPrinterList(ClientPtr); -static int ProcXpQueryScreens(ClientPtr); -static int ProcXpGetPageDimensions(ClientPtr); -static int ProcXpSetImageResolution(ClientPtr); -static int ProcXpGetImageResolution(ClientPtr); - -static void SwapXpNotifyEvent(xPrintPrintEvent *, xPrintPrintEvent *); -static void SwapXpAttributeEvent(xPrintAttributeEvent *, xPrintAttributeEvent *); - -static int SProcXpGetPrinterList(ClientPtr); -static int SProcXpCreateContext(ClientPtr); -static int SProcXpSetContext(ClientPtr); -static int SProcXpGetContext(ClientPtr); -static int SProcXpDestroyContext(ClientPtr); -static int SProcXpGetContextScreen(ClientPtr); -static int SProcXpStartJob(ClientPtr); -static int SProcXpEndJob(ClientPtr); -static int SProcXpStartDoc(ClientPtr); -static int SProcXpEndDoc(ClientPtr); -static int SProcXpStartPage(ClientPtr); -static int SProcXpEndPage(ClientPtr); -static int SProcXpSelectInput(ClientPtr); -static int SProcXpInputSelected(ClientPtr); -static int SProcXpPutDocumentData(ClientPtr); -static int SProcXpGetDocumentData(ClientPtr); -static int SProcXpGetAttributes(ClientPtr); -static int SProcXpGetOneAttribute(ClientPtr); -static int SProcXpSetAttributes(ClientPtr); -static int SProcXpRehashPrinterList(ClientPtr); -static int SProcXpGetPageDimensions(ClientPtr); -static int SProcXpSetImageResolution(ClientPtr); -static int SProcXpGetImageResolution(ClientPtr); - -static void SendXpNotify(XpContextPtr, int, int); -static void SendAttributeNotify(XpContextPtr, int); -static int XpFreeClient(pointer, XID); -static int XpFreeContext(pointer, XID); -static int XpFreePage(pointer, XID); -static Bool XpCloseScreen(int, ScreenPtr); -static CARD32 GetAllEventMasks(XpContextPtr); -static struct _XpClient *CreateXpClient(ClientPtr); -static struct _XpClient *FindClient(XpContextPtr, ClientPtr); -static struct _XpClient *AcquireClient(XpContextPtr, ClientPtr); - -typedef struct _driver { - struct _driver *next; - char *name; - int (* CreateContext)(XpContextPtr); -} XpDriverRec, *XpDriverPtr; - -typedef struct _xpScreen { - Bool (* CloseScreen)(int, ScreenPtr); - struct _driver *drivers; -} XpScreenRec, *XpScreenPtr; - -/* - * Each context has a list of XpClients indicating which clients have - * associated this context with their connection. - * Each such client has a RTclient resource allocated for it, - * and this per-client - * resource is used to delete the XpClientRec if/when the client closes - * its connection. - * The list of XpClients is also walked if/when the context is destroyed - * so that the ContextPtr can be removed from the client's devPrivates. - */ -typedef struct _XpClient { - struct _XpClient *pNext; - ClientPtr client; - XpContextPtr context; - CARD32 eventMask; - XID contextClientID; /* unneeded sanity check? */ -} XpClientRec, *XpClientPtr; - -static void FreeXpClient(XpClientPtr, Bool); - -/* - * Each StartPage request specifies a window which forms the top level - * window of the page. One of the following structs is created as a - * RTpage resource with the same ID as the window itself. This enables - * us to clean up when/if the window is destroyed, and to prevent the - * same window from being simultaneously referenced in multiple contexts. - * The page resource is created at the first StartPage on a given window, - * and is only destroyed when/if the window is destroyed. When the - * EndPage is recieved (or an EndDoc or EndJob) the context field is - * set to NULL, but the resource remains alive. - */ -typedef struct _XpPage { - XpContextPtr context; -} XpPageRec, *XpPagePtr; - -typedef struct _XpStPageRec { - XpContextPtr pContext; - Bool slept; - XpPagePtr pPage; - WindowPtr pWin; -} XpStPageRec, *XpStPagePtr; - -typedef struct _XpStDocRec { - XpContextPtr pContext; - Bool slept; - CARD8 type; -} XpStDocRec, *XpStDocPtr; - -#define QUADPAD(x) ((((x)+3)>>2)<<2) - -/* - * Possible bit-mask values in the "state" field of a XpContextRec. - */ -#define JOB_STARTED (1 << 0) -#define DOC_RAW_STARTED (1 << 1) -#define DOC_COOKED_STARTED (1 << 2) -#define PAGE_STARTED (1 << 3) -#define GET_DOC_DATA_STARTED (1 << 4) -#define JOB_GET_DATA (1 << 5) - -static XpScreenPtr XpScreens[MAXSCREENS]; -static unsigned char XpReqCode; -static int XpEventBase; -static int XpErrorBase; -static DevPrivateKey XpClientPrivateKey = &XpClientPrivateKey; - -#define XP_GETPRIV(pClient) ((XpContextPtr) \ - dixLookupPrivate(&(pClient)->devPrivates, XpClientPrivateKey)) -#define XP_SETPRIV(pClient, p) \ - dixSetPrivate(&(pClient)->devPrivates, XpClientPrivateKey, p) - -/* - * There are three types of resources involved. One is the resource associated - * with the context itself, with an ID specified by a printing client. The - * next is a resource created by us on the client's behalf (and unknown to - * the client) when a client inits or sets a context which allows us to - * track each client's interest in events - * on a particular context, and also allows us to clean up this interest - * record when/if the client's connection is closed. Finally, there is - * a resource created for each window that's specified in a StartPage. This - * resource carries the same ID as the window itself, and enables us to - * easily prevent the same window being referenced in multiple contexts - * simultaneously, and enables us to clean up if the window is destroyed - * before the EndPage. - */ -static RESTYPE RTclient, RTcontext, RTpage; - -/* - * allEvents is the OR of all the legal event mask bits. - */ -static CARD32 allEvents = XPPrintMask | XPAttributeMask; - - -/******************************************************************************* - * - * ExtensionInit, Driver Init functions, QueryVersion, and Dispatch procs - * - ******************************************************************************/ - -/* - * XpExtensionInit - * - * Called from InitExtensions in main() usually through miinitextension - * - */ - -void -XpExtensionInit(INITARGS) -{ - ExtensionEntry *extEntry; - int i; - - RTclient = CreateNewResourceType(XpFreeClient); - RTcontext = CreateNewResourceType(XpFreeContext); - RTpage = CreateNewResourceType(XpFreePage); - if (RTclient && RTcontext && RTpage && - (extEntry = AddExtension(XP_PRINTNAME, XP_EVENTS, XP_ERRORS, - ProcXpDispatch, ProcXpSwappedDispatch, - XpResetProc, StandardMinorOpcode))) - { - XpReqCode = (unsigned char)extEntry->base; - XpEventBase = extEntry->eventBase; - XpErrorBase = extEntry->errorBase; - EventSwapVector[XpEventBase] = (EventSwapPtr) SwapXpNotifyEvent; - EventSwapVector[XpEventBase+1] = (EventSwapPtr) SwapXpAttributeEvent; - } - - for(i = 0; i < MAXSCREENS; i++) - { - /* - * If a screen has registered with our extension, then we - * wrap the screen's CloseScreen function to allow us to - * reset our ContextPrivate stuff. Note that this - * requires a printing DDX to call XpRegisterInitFunc - * _before_ this extension is initialized - i.e. at screen init - * time, _not_ at root window creation time. - */ - if(XpScreens[i] != (XpScreenPtr)NULL) - { - XpScreens[i]->CloseScreen = screenInfo.screens[i]->CloseScreen; - screenInfo.screens[i]->CloseScreen = XpCloseScreen; - } - } -} - -static void -XpResetProc(ExtensionEntry *extEntry) -{ - /* - * We can't free up the XpScreens recs here, because extensions are - * closed before screens, and our CloseScreen function uses the XpScreens - * recs. - - int i; - - for(i = 0; i < MAXSCREENS; i++) - { - if(XpScreens[i] != (XpScreenPtr)NULL) - Xfree(XpScreens[i]); - XpScreens[i] = (XpScreenPtr)NULL; - } - */ -} - -static Bool -XpCloseScreen(int index, ScreenPtr pScreen) -{ - Bool (* CloseScreen)(int, ScreenPtr); - - CloseScreen = XpScreens[index]->CloseScreen; - if(XpScreens[index] != (XpScreenPtr)NULL) - { - XpDriverPtr pDriv, nextDriv; - - pDriv = XpScreens[index]->drivers; - while(pDriv != (XpDriverPtr)NULL) - { - nextDriv = pDriv->next; - Xfree(pDriv); - pDriv = nextDriv; - } - Xfree(XpScreens[index]); - } - XpScreens[index] = (XpScreenPtr)NULL; - - return (*CloseScreen)(index, pScreen); -} - -/* - * XpRegisterInitFunc tells the print extension which screens - * are printers as opposed to displays, and what drivers are - * supported on each screen. This eliminates the need of - * allocating print-related private structures on windows on _all_ screens. - * It also hands the extension a pointer to the routine to be called - * whenever a context gets created for a particular driver on this screen. - */ -void -XpRegisterInitFunc(ScreenPtr pScreen, char *driverName, int (*initContext)(struct _XpContext *)) -{ - XpDriverPtr pDriver; - - if(XpScreens[pScreen->myNum] == 0) - { - if((XpScreens[pScreen->myNum] = - (XpScreenPtr) Xalloc(sizeof(XpScreenRec))) == 0) - return; - XpScreens[pScreen->myNum]->CloseScreen = 0; - XpScreens[pScreen->myNum]->drivers = 0; - } - - if((pDriver = (XpDriverPtr)Xalloc(sizeof(XpDriverRec))) == 0) - return; - pDriver->next = XpScreens[pScreen->myNum]->drivers; - pDriver->name = driverName; - pDriver->CreateContext = initContext; - XpScreens[pScreen->myNum]->drivers = pDriver; -} - -static int -ProcXpDispatch(ClientPtr client) -{ - REQUEST(xReq); - - switch(stuff->data) - { - case X_PrintQueryVersion: - return ProcXpQueryVersion(client); - case X_PrintGetPrinterList: - return ProcXpGetPrinterList(client); - case X_PrintCreateContext: - return ProcXpCreateContext(client); - case X_PrintSetContext: - return ProcXpSetContext(client); - case X_PrintGetContext: - return ProcXpGetContext(client); - case X_PrintDestroyContext: - return ProcXpDestroyContext(client); - case X_PrintGetContextScreen: - return ProcXpGetContextScreen(client); - case X_PrintStartJob: - return ProcXpStartJob(client); - case X_PrintEndJob: - return ProcXpEndJob(client); - case X_PrintStartDoc: - return ProcXpStartDoc(client); - case X_PrintEndDoc: - return ProcXpEndDoc(client); - case X_PrintStartPage: - return ProcXpStartPage(client); - case X_PrintEndPage: - return ProcXpEndPage(client); - case X_PrintSelectInput: - return ProcXpSelectInput(client); - case X_PrintInputSelected: - return ProcXpInputSelected(client); - case X_PrintPutDocumentData: - return ProcXpPutDocumentData(client); - case X_PrintGetDocumentData: - return ProcXpGetDocumentData(client); - case X_PrintSetAttributes: - return ProcXpSetAttributes(client); - case X_PrintGetAttributes: - return ProcXpGetAttributes(client); - case X_PrintGetOneAttribute: - return ProcXpGetOneAttribute(client); - case X_PrintRehashPrinterList: - return ProcXpRehashPrinterList(client); - case X_PrintQueryScreens: - return ProcXpQueryScreens(client); - case X_PrintGetPageDimensions: - return ProcXpGetPageDimensions(client); - case X_PrintSetImageResolution: - return ProcXpSetImageResolution(client); - case X_PrintGetImageResolution: - return ProcXpGetImageResolution(client); - default: - return BadRequest; - } -} - -static int -ProcXpSwappedDispatch(ClientPtr client) -{ - int temp; - REQUEST(xReq); - - switch(stuff->data) - { - case X_PrintQueryVersion: - swaps(&stuff->length, temp); - return ProcXpQueryVersion(client); - case X_PrintGetPrinterList: - return SProcXpGetPrinterList(client); - case X_PrintCreateContext: - return SProcXpCreateContext(client); - case X_PrintSetContext: - return SProcXpSetContext(client); - case X_PrintGetContext: - return SProcXpGetContext(client); - case X_PrintDestroyContext: - return SProcXpDestroyContext(client); - case X_PrintGetContextScreen: - return SProcXpGetContextScreen(client); - case X_PrintStartJob: - return SProcXpStartJob(client); - case X_PrintEndJob: - return SProcXpEndJob(client); - case X_PrintStartDoc: - return SProcXpStartDoc(client); - case X_PrintEndDoc: - return SProcXpEndDoc(client); - case X_PrintStartPage: - return SProcXpStartPage(client); - case X_PrintEndPage: - return SProcXpEndPage(client); - case X_PrintSelectInput: - return SProcXpSelectInput(client); - case X_PrintInputSelected: - return SProcXpInputSelected(client); - case X_PrintPutDocumentData: - return SProcXpPutDocumentData(client); - case X_PrintGetDocumentData: - return SProcXpGetDocumentData(client); - case X_PrintSetAttributes: - return SProcXpSetAttributes(client); - case X_PrintGetAttributes: - return SProcXpGetAttributes(client); - case X_PrintGetOneAttribute: - return SProcXpGetOneAttribute(client); - case X_PrintRehashPrinterList: - return SProcXpRehashPrinterList(client); - case X_PrintQueryScreens: - swaps(&stuff->length, temp); - return ProcXpQueryScreens(client); - case X_PrintGetPageDimensions: - return SProcXpGetPageDimensions(client); - case X_PrintSetImageResolution: - return SProcXpSetImageResolution(client); - case X_PrintGetImageResolution: - return SProcXpGetImageResolution(client); - default: - return BadRequest; - } -} - -static int -ProcXpQueryVersion(ClientPtr client) -{ - /* REQUEST(xPrintQueryVersionReq); */ - xPrintQueryVersionReply rep; - register int n; - long l; - - REQUEST_SIZE_MATCH(xPrintQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.majorVersion = XP_MAJOR_VERSION; - rep.minorVersion = XP_MINOR_VERSION; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, l); - swaps(&rep.majorVersion, n); - swaps(&rep.minorVersion, n); - } - WriteToClient(client, sz_xPrintQueryVersionReply, (char *)&rep); - return client->noClientException; -} - -/******************************************************************************* - * - * GetPrinterList : Return a list of all printers associated with this - * server. Calls XpDiGetPrinterList, which is defined in - * the device-independent code in Xserver/Xprint. - * - ******************************************************************************/ - -static int -ProcXpGetPrinterList(ClientPtr client) -{ - REQUEST(xPrintGetPrinterListReq); - int totalSize; - int numEntries; - XpDiListEntry **pList; - xPrintGetPrinterListReply *rep; - int n, i, totalBytes; - long l; - char *curByte; - - REQUEST_AT_LEAST_SIZE(xPrintGetPrinterListReq); - - totalSize = ((sz_xPrintGetPrinterListReq) >> 2) + - ((stuff->printerNameLen + 3) >> 2) + - ((stuff->localeLen + 3) >> 2); - if(totalSize != client->req_len) - return BadLength; - - pList = XpDiGetPrinterList(stuff->printerNameLen, (char *)(stuff + 1), - stuff->localeLen, (char *)((stuff + 1) + - QUADPAD(stuff->printerNameLen))); - - for(numEntries = 0, totalBytes = sz_xPrintGetPrinterListReply; - pList[numEntries] != (XpDiListEntry *)NULL; - numEntries++) - { - totalBytes += 2 * sizeof(CARD32); - totalBytes += QUADPAD(strlen(pList[numEntries]->name)); - totalBytes += QUADPAD(strlen(pList[numEntries]->description)); - } - - if((rep = (xPrintGetPrinterListReply *)xalloc(totalBytes)) == - (xPrintGetPrinterListReply *)NULL) - return BadAlloc; - - rep->type = X_Reply; - rep->length = (totalBytes - sz_xPrintGetPrinterListReply) >> 2; - rep->sequenceNumber = client->sequence; - rep->listCount = numEntries; - if (client->swapped) { - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, l); - swapl(&rep->listCount, l); - } - - for(i = 0, curByte = (char *)(rep + 1); i < numEntries; i++) - { - CARD32 *pCrd; - int len; - - pCrd = (CARD32 *)curByte; - len = strlen(pList[i]->name); - *pCrd = len; - if (client->swapped) - swapl((long *)curByte, l); - curByte += sizeof(CARD32); - strncpy(curByte, pList[i]->name, len); - curByte += QUADPAD(len); - - pCrd = (CARD32 *)curByte; - len = strlen(pList[i]->description); - *pCrd = len; - if (client->swapped) - swapl((long *)curByte, l); - curByte += sizeof(CARD32); - strncpy(curByte, pList[i]->description, len); - curByte += QUADPAD(len); - } - - XpDiFreePrinterList(pList); - - WriteToClient(client, totalBytes, (char *)rep); - xfree(rep); - return client->noClientException; -} - -/******************************************************************************* - * - * QueryScreens: Returns the list of screens which are associated with - * print drivers. - * - ******************************************************************************/ - -static int -ProcXpQueryScreens(ClientPtr client) -{ - /* REQUEST(xPrintQueryScreensReq); */ - int i, numPrintScreens, totalSize; - WINDOW *pWinId; - xPrintQueryScreensReply *rep; - long l; - - REQUEST_SIZE_MATCH(xPrintQueryScreensReq); - - rep = (xPrintQueryScreensReply *)xalloc(sz_xPrintQueryScreensReply); - pWinId = (WINDOW *)(rep + 1); - - for(i = 0, numPrintScreens = 0, totalSize = sz_xPrintQueryScreensReply; - i < MAXSCREENS; i++) - { - /* - * If a screen has registered with our extension, then it's - * a printer screen. - */ - if(XpScreens[i] != (XpScreenPtr)NULL) - { - numPrintScreens++; - totalSize += sizeof(WINDOW); - rep = (xPrintQueryScreensReply *)xrealloc(rep, totalSize); - /* fix of bug: pWinId should be set again after reallocate rep */ - pWinId = (WINDOW *)(rep + 1); - *pWinId = WindowTable[i]->drawable.id; - if (client->swapped) - swapl((long *)pWinId, l); - } - } - - rep->type = X_Reply; - rep->sequenceNumber = client->sequence; - rep->length = (totalSize - sz_xPrintQueryScreensReply) >> 2; - rep->listCount = numPrintScreens; - if (client->swapped) - { - int n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, l); - swapl(&rep->listCount, l); - } - - WriteToClient(client, totalSize, (char *)rep); - xfree(rep); - return client->noClientException; -} - -static int -ProcXpGetPageDimensions(ClientPtr client) -{ - REQUEST(xPrintGetPageDimensionsReq); - CARD16 width, height; - xRectangle rect; - xPrintGetPageDimensionsReply rep; - XpContextPtr pContext; - int result; - - REQUEST_SIZE_MATCH(xPrintGetPageDimensionsReq); - - if((pContext =(XpContextPtr)SecurityLookupIDByType(client, - stuff->printContext, - RTcontext, - DixReadAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - if((pContext->funcs.GetMediumDimensions == 0) || - (pContext->funcs.GetReproducibleArea == 0)) - return BadImplementation; - - result = pContext->funcs.GetMediumDimensions(pContext, &width, &height); - if(result != Success) - return result; - - result = pContext->funcs.GetReproducibleArea(pContext, &rect); - if(result != Success) - return result; - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.width = width; - rep.height = height; - rep.rx = rect.x; - rep.ry = rect.y; - rep.rwidth = rect.width; - rep.rheight = rect.height; - - if(client->swapped) - { - int n; - long l; - - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, l); - swaps(&rep.width, n); - swaps(&rep.height, n); - swaps(&rep.rx, n); - swaps(&rep.ry, n); - swaps(&rep.rwidth, n); - swaps(&rep.rheight, n); - } - - WriteToClient(client, sz_xPrintGetPageDimensionsReply, (char *)&rep); - return client->noClientException; -} - -static int -ProcXpSetImageResolution(ClientPtr client) -{ - REQUEST(xPrintSetImageResolutionReq); - xPrintSetImageResolutionReply rep; - XpContextPtr pContext; - Bool status; - int result; - - REQUEST_SIZE_MATCH(xPrintSetImageResolutionReq); - - if((pContext =(XpContextPtr)SecurityLookupIDByType(client, - stuff->printContext, - RTcontext, - DixWriteAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - rep.prevRes = pContext->imageRes; - if(pContext->funcs.SetImageResolution != 0) { - result = pContext->funcs.SetImageResolution(pContext, - (int)stuff->imageRes, - &status); - if(result != Success) - status = FALSE; - } else - status = FALSE; - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.status = status; - - if(client->swapped) - { - int n; - long l; - - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, l); - swaps(&rep.prevRes, n); - } - - WriteToClient(client, sz_xPrintSetImageResolutionReply, (char *)&rep); - return client->noClientException; -} - -static int -ProcXpGetImageResolution(ClientPtr client) -{ - REQUEST(xPrintGetImageResolutionReq); - xPrintGetImageResolutionReply rep; - XpContextPtr pContext; - - REQUEST_SIZE_MATCH(xPrintGetImageResolutionReq); - - if((pContext =(XpContextPtr)SecurityLookupIDByType(client, - stuff->printContext, - RTcontext, - DixReadAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.imageRes = pContext->imageRes; - - if(client->swapped) - { - int n; - long l; - - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, l); - swaps(&rep.imageRes, n); - } - - WriteToClient(client, sz_xPrintGetImageResolutionReply, (char *)&rep); - return client->noClientException; -} - -/******************************************************************************* - * - * RehashPrinterList : Cause the server's list of printers to be rebuilt. - * This allows new printers to be added, or old ones - * deleted without needing to restart the server. - * - ******************************************************************************/ - -static int -ProcXpRehashPrinterList(ClientPtr client) -{ - /* REQUEST(xPrintRehashPrinterListReq); */ - - REQUEST_SIZE_MATCH(xPrintRehashPrinterListReq); - - return XpRehashPrinterList(); -} - -/****************************************************************************** - * - * Context functions: Init, Set, Destroy, FreeContext - * AllocateContextPrivateIndex, AllocateContextPrivate - * and supporting functions. - * - * Init creates a context, creates a XpClientRec for the calling - * client, and stores the contextPtr in the client's devPrivates. - * - * Set creates a XpClientRec for the calling client, and stores the - * contextPtr in the client's devPrivates unless the context is None. - * If the context is None, then the client's connection association - * with any context is removed. - * - * Destroy frees any and all XpClientRecs associated with the context, - * frees the context itself, and removes the contextPtr from any - * relevant client devPrivates. - * - * FreeContext is called by FreeResource to free up a context. - * - ******************************************************************************/ - -/* - * CreateContext creates and initializes the memory for the context itself. - * The driver's CreateContext function - * is then called. - */ -static int -ProcXpCreateContext(ClientPtr client) -{ - REQUEST(xPrintCreateContextReq); - XpScreenPtr pPrintScreen; - WindowPtr pRoot; - char *driverName; - XpContextPtr pContext; - int result = Success; - XpDriverPtr pDriver; - - REQUEST_AT_LEAST_SIZE(xPrintCreateContextReq); - - LEGAL_NEW_RESOURCE(stuff->contextID, client); - - /* - * Check to see if the printer name is valid. - */ - if((pRoot = XpDiValidatePrinter((char *)(stuff + 1), stuff->printerNameLen)) == - (WindowPtr)NULL) - return BadMatch; - - pPrintScreen = XpScreens[pRoot->drawable.pScreen->myNum]; - - /* - * Allocate and add the context resource. - */ - if((pContext = (XpContextPtr) xalloc(sizeof(XpContextRec))) == - (XpContextPtr) NULL) - return BadAlloc; - - if(AddResource(stuff->contextID, RTcontext, (pointer) pContext) - != TRUE) - { - xfree(pContext); - return BadAlloc; - } - - pContext->contextID = stuff->contextID; - pContext->clientHead = (XpClientPtr)NULL; - pContext->screenNum = pRoot->drawable.pScreen->myNum; - pContext->state = 0; - pContext->clientSlept = (ClientPtr)NULL; - pContext->imageRes = 0; - pContext->devPrivates = NULL; - - pContext->funcs.DestroyContext = 0; - pContext->funcs.StartJob = 0; - pContext->funcs.EndJob = 0; - pContext->funcs.StartDoc = 0; - pContext->funcs.EndDoc = 0; - pContext->funcs.StartPage = 0; - pContext->funcs.EndPage = 0; - pContext->funcs.PutDocumentData = 0; - pContext->funcs.GetDocumentData = 0; - pContext->funcs.GetAttributes = 0; - pContext->funcs.GetOneAttribute = 0; - pContext->funcs.SetAttributes = 0; - pContext->funcs.AugmentAttributes = 0; - pContext->funcs.GetMediumDimensions = 0; - pContext->funcs.GetReproducibleArea = 0; - pContext->funcs.SetImageResolution = 0; - - if((pContext->printerName = (char *)xalloc(stuff->printerNameLen + 1)) == - (char *)NULL) - { - /* Freeing the context also causes the XpClients to be freed. */ - FreeResource(stuff->contextID, RT_NONE); - return BadAlloc; - } - strncpy(pContext->printerName, (char *)(stuff + 1), stuff->printerNameLen); - pContext->printerName[stuff->printerNameLen] = (char)'\0'; - - driverName = XpDiGetDriverName(pRoot->drawable.pScreen->myNum, - pContext->printerName); - - for(pDriver = pPrintScreen->drivers; - pDriver != (XpDriverPtr)NULL; - pDriver = pDriver->next) - { - if(!strcmp(driverName, pDriver->name)) - { - if(pDriver->CreateContext != 0) - pDriver->CreateContext(pContext); - else - return BadImplementation; - break; - } - } - - if (client->noClientException != Success) - return client->noClientException; - else - return result; -} - -/* - * SetContext creates the calling client's contextClient resource, - * and stashes the contextID in the client's devPrivate. - */ -static int -ProcXpSetContext(ClientPtr client) -{ - REQUEST(xPrintSetContextReq); - - XpContextPtr pContext; - XpClientPtr pPrintClient; - int result = Success; - - REQUEST_AT_LEAST_SIZE(xPrintSetContextReq); - - if((pContext = XP_GETPRIV(client)) != (pointer)NULL) - { - /* - * Erase this client's knowledge of its old context, if any. - */ - if((pPrintClient = FindClient(pContext, client)) != (XpClientPtr)NULL) - { - XpUnsetFontResFunc(client); - - if(pPrintClient->eventMask == 0) - FreeXpClient(pPrintClient, TRUE); - } - - XP_SETPRIV(client, NULL); - } - if(stuff->printContext == None) - return Success; - - /* - * Check to see that the supplied XID is really a valid print context - * in this server. - */ - if((pContext =(XpContextPtr)SecurityLookupIDByType(client, - stuff->printContext, - RTcontext, - DixWriteAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - if((pPrintClient = AcquireClient(pContext, client)) == (XpClientPtr)NULL) - return BadAlloc; - - XP_SETPRIV(client, pContext); - - XpSetFontResFunc(client); - - if (client->noClientException != Success) - return client->noClientException; - else - return result; -} - -XpContextPtr -XpGetPrintContext(ClientPtr client) -{ - return XP_GETPRIV(client); -} - -static int -ProcXpGetContext(ClientPtr client) -{ - /* REQUEST(xPrintGetContextReq); */ - xPrintGetContextReply rep; - - XpContextPtr pContext; - register int n; - register long l; - - REQUEST_SIZE_MATCH(xPrintGetContextReq); - - if((pContext = XP_GETPRIV(client)) == (pointer)NULL) - rep.printContext = None; - else - rep.printContext = pContext->contextID; - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, l); - swapl(&rep.printContext, l); - } - WriteToClient(client, sz_xPrintGetContextReply, (char *)&rep); - return client->noClientException; -} - - -/* - * DestroyContext frees the context associated with the calling client. - * It operates by freeing the context resource ID, thus causing XpFreeContext - * to be called. - */ -static int -ProcXpDestroyContext(ClientPtr client) -{ - REQUEST(xPrintDestroyContextReq); - - XpContextPtr pContext; - - REQUEST_SIZE_MATCH(xPrintDestroyContextReq); - - if((pContext =(XpContextPtr)SecurityLookupIDByType(client, - stuff->printContext, - RTcontext, - DixDestroyAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - XpUnsetFontResFunc(client); - - FreeResource(pContext->contextID, RT_NONE); - - return Success; -} - -static int -ProcXpGetContextScreen(ClientPtr client) -{ - REQUEST(xPrintGetContextScreenReq); - xPrintGetContextScreenReply rep; - XpContextPtr pContext; - int n; - long l; - - if((pContext =(XpContextPtr)SecurityLookupIDByType(client, - stuff->printContext, - RTcontext, - DixReadAccess)) - == (XpContextPtr)NULL) - return XpErrorBase+XPBadContext; - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.rootWindow = WindowTable[pContext->screenNum]->drawable.id; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, l); - swapl(&rep.rootWindow, l); - } - - WriteToClient(client, sz_xPrintGetContextScreenReply, (char *)&rep); - return client->noClientException; -} - -/* - * XpFreeContext is the routine called by dix:FreeResource when a context - * resource ID is freed. - * It checks to see if there's a partial job pending on the context, and - * if so it calls the appropriate End procs with the cancel flag set. - * It calls the driver's DestroyContext routine to allow the driver to clean - * up any context-related memory or state. - * It calls FreeXpClient to free all the - * associated XpClientRecs and to set all the client->devPrivates to NULL. - * It frees the printer name string, and frees the context - * itself. - */ -static int -XpFreeContext(pointer data, XID id) -{ - XpContextPtr pContext = (XpContextPtr)data; - - /* Clean up any pending job on this context */ - if(pContext->state != 0) - { - if(pContext->state & PAGE_STARTED) - { - WindowPtr pWin = (WindowPtr )LookupIDByType( - pContext->pageWin, RT_WINDOW); - XpPagePtr pPage = (XpPagePtr)LookupIDByType( - pContext->pageWin, RTpage); - - pContext->funcs.EndPage(pContext, pWin); - SendXpNotify(pContext, XPEndPageNotify, TRUE); - pContext->state &= ~PAGE_STARTED; - if(pPage) - pPage->context = (XpContextPtr)NULL; - } - if((pContext->state & DOC_RAW_STARTED) || - (pContext->state & DOC_COOKED_STARTED)) - { - pContext->funcs.EndDoc(pContext, TRUE); - SendXpNotify(pContext, XPEndDocNotify, TRUE); - pContext->state &= ~DOC_RAW_STARTED; - pContext->state &= ~DOC_COOKED_STARTED; - } - if(pContext->funcs.EndJob != 0) - { - pContext->funcs.EndJob(pContext, TRUE); - SendXpNotify(pContext, XPEndJobNotify, TRUE); - pContext->state &= ~JOB_STARTED; - pContext->state &= ~GET_DOC_DATA_STARTED; - } - } - - /* - * Tell the driver we're destroying the context - * This allows the driver to free and ContextPrivate data - */ - if(pContext->funcs.DestroyContext != 0) - pContext->funcs.DestroyContext(pContext); - - /* Free up all the XpClientRecs */ - while(pContext->clientHead != (XpClientPtr)NULL) - { - FreeXpClient(pContext->clientHead, TRUE); - } - - xfree(pContext->printerName); - dixFreePrivates(pContext->devPrivates); - xfree(pContext); - return Success; /* ??? */ -} - -/* - * XpFreeClient is the routine called by dix:FreeResource when a RTclient - * is freed. It simply calls the FreeXpClient routine to do the work. - */ -static int -XpFreeClient(pointer data, XID id) -{ - FreeXpClient((XpClientPtr)data, TRUE); - return Success; -} - -/* - * FreeXpClient - * frees the ClientRec passed in, and sets the client->devPrivates to NULL - * if the client->devPrivates points to the same context as the XpClient. - * Called from XpFreeContext(from FreeResource), and - * XpFreeClient. The boolean freeResource specifies whether or not to call - * FreeResource for the XpClientRec's XID. We should free it except if we're - * called from XpFreeClient (which is itself called from FreeResource for the - * XpClientRec's XID). - */ -static void -FreeXpClient(XpClientPtr pXpClient, Bool freeResource) -{ - XpClientPtr pCurrent, pPrev; - XpContextPtr pContext = pXpClient->context; - - /* - * If we're freeing the clientRec associated with the context tied - * to the client's devPrivates, then we need to clear the devPrivates. - */ - if(XP_GETPRIV(pXpClient->client) == pXpClient->context) - { - XP_SETPRIV(pXpClient->client, NULL); - } - - for(pPrev = (XpClientPtr)NULL, pCurrent = pContext->clientHead; - pCurrent != (XpClientPtr)NULL; - pCurrent = pCurrent->pNext) - { - if(pCurrent == pXpClient) - { - if(freeResource == TRUE) - FreeResource (pCurrent->contextClientID, RTclient); - - if (pPrev != (XpClientPtr)NULL) - pPrev->pNext = pCurrent->pNext; - else - pContext->clientHead = pCurrent->pNext; - - xfree (pCurrent); - break; - } - pPrev = pCurrent; - } -} - -/* - * CreateXpClient takes a ClientPtr and returns a pointer to a - * XpClientRec which it allocates. It also initializes the Rec, - * including adding a resource on behalf of the client to enable the - * freeing of the Rec when the client's connection is closed. - */ -static XpClientPtr -CreateXpClient(ClientPtr client) -{ - XpClientPtr pNewPrintClient; - XID clientResource; - - if((pNewPrintClient = (XpClientPtr)xalloc(sizeof(XpClientRec))) == - (XpClientPtr)NULL) - return (XpClientPtr)NULL; - - clientResource = FakeClientID(client->index); - if(!AddResource(clientResource, RTclient, (pointer)pNewPrintClient)) - { - xfree (pNewPrintClient); - return (XpClientPtr)NULL; - } - - pNewPrintClient->pNext = (XpClientPtr)NULL; - pNewPrintClient->client = client; - pNewPrintClient->context = (XpContextPtr)NULL; - pNewPrintClient->eventMask = 0; - pNewPrintClient->contextClientID = clientResource; - - return pNewPrintClient; -} - -/* - * XpFreePage is the routine called by dix:FreeResource to free the page - * resource built with the same ID as a page window. It checks to see - * if we're in the middle of a page, and if so calls the driver's EndPage - * function with 'cancel' set TRUE. It frees the memory associated with - * the page resource. - */ -static int -XpFreePage(pointer data, XID id) -{ - XpPagePtr page = (XpPagePtr)data; - int result = Success; - WindowPtr pWin = (WindowPtr )LookupIDByType(id, RT_WINDOW); - - /* Check to see if the window's being deleted in the middle of a page */ - if(page->context != (XpContextPtr)NULL && - page->context->state & PAGE_STARTED) - { - if(page->context->funcs.EndPage != 0) - result = page->context->funcs.EndPage(page->context, pWin); - SendXpNotify(page->context, XPEndPageNotify, (int)TRUE); - page->context->pageWin = 0; /* None, NULL??? XXX */ - } - - xfree(page); - return result; -} - -static XpClientPtr -AcquireClient(XpContextPtr pContext, ClientPtr client) -{ - XpClientPtr pXpClient; - - if((pXpClient = FindClient(pContext, client)) != (XpClientPtr)NULL) - return pXpClient; - - if((pXpClient = CreateXpClient(client)) == (XpClientPtr)NULL) - return (XpClientPtr)NULL; - - pXpClient->context = pContext; - pXpClient->pNext = pContext->clientHead; - pContext->clientHead = pXpClient; - - return pXpClient; -} - -static XpClientPtr -FindClient(XpContextPtr pContext, ClientPtr client) -{ - XpClientPtr pXpClient; - - for(pXpClient = pContext->clientHead; pXpClient != (XpClientPtr)NULL; - pXpClient = pXpClient->pNext) - { - if(pXpClient->client == client) return pXpClient; - } - return (XpClientPtr)NULL; -} - - -/****************************************************************************** - * - * Start/End Functions: StartJob, EndJob, StartDoc, EndDoc, StartPage, EndPage - * - ******************************************************************************/ - -static int -ProcXpStartJob(ClientPtr client) -{ - REQUEST(xPrintStartJobReq); - XpContextPtr pContext; - int result = Success; - - REQUEST_SIZE_MATCH(xPrintStartJobReq); - - /* Check to see that a context has been established by this client. */ - if((pContext = XP_GETPRIV(client)) == (XpContextPtr)NULL) - return XpErrorBase+XPBadContext; - - if(pContext->state != 0) - return XpErrorBase+XPBadSequence; - - if(stuff->saveData != XPSpool && stuff->saveData != XPGetData) - { - client->errorValue = stuff->saveData; - return BadValue; - } - - if(pContext->funcs.StartJob != 0) - result = pContext->funcs.StartJob(pContext, - (stuff->saveData == XPGetData)? TRUE:FALSE, - client); - else - return BadImplementation; - - pContext->state = JOB_STARTED; - if(stuff->saveData == XPGetData) - pContext->state |= JOB_GET_DATA; - - SendXpNotify(pContext, XPStartJobNotify, FALSE); - - if (client->noClientException != Success) - return client->noClientException; - else - return result; -} - -static int -ProcXpEndJob(ClientPtr client) -{ - REQUEST(xPrintEndJobReq); - int result = Success; - XpContextPtr pContext; - - REQUEST_SIZE_MATCH(xPrintEndJobReq); - - if((pContext = XP_GETPRIV(client)) == (XpContextPtr)NULL) - return XpErrorBase+XPBadSequence; - - if(!(pContext->state & JOB_STARTED)) - return XpErrorBase+XPBadSequence; - - /* Check for missing EndDoc */ - if((pContext->state & DOC_RAW_STARTED) || - (pContext->state & DOC_COOKED_STARTED)) - { - if(pContext->state & PAGE_STARTED) - { - WindowPtr pWin = (WindowPtr )LookupIDByType( - pContext->pageWin, RT_WINDOW); - XpPagePtr pPage = (XpPagePtr)LookupIDByType( - pContext->pageWin, RTpage); - - if(stuff->cancel != TRUE) - return XpErrorBase+XPBadSequence; - - if(pContext->funcs.EndPage != 0) - result = pContext->funcs.EndPage(pContext, pWin); - else - return BadImplementation; - - SendXpNotify(pContext, XPEndPageNotify, TRUE); - - pContext->state &= ~PAGE_STARTED; - - if(pPage) - pPage->context = (XpContextPtr)NULL; - - if(result != Success) return result; - } - - if(pContext->funcs.EndDoc != 0) - result = pContext->funcs.EndDoc(pContext, stuff->cancel); - else - return BadImplementation; - - SendXpNotify(pContext, XPEndDocNotify, stuff->cancel); - } - - if(pContext->funcs.EndJob != 0) - result = pContext->funcs.EndJob(pContext, stuff->cancel); - else - return BadImplementation; - - pContext->state = 0; - - SendXpNotify(pContext, XPEndJobNotify, stuff->cancel); - - if (client->noClientException != Success) - return client->noClientException; - else - return result; -} - -static Bool -DoStartDoc(ClientPtr client, XpStDocPtr c) -{ - XpContextPtr pContext = c->pContext; - - if(c->pContext->state & JOB_GET_DATA && - !(c->pContext->state & GET_DOC_DATA_STARTED)) - { - if(!c->slept) - { - c->slept = TRUE; - ClientSleep(client, (ClientSleepProcPtr)DoStartDoc, (pointer) c); - c->pContext->clientSlept = client; - } - return TRUE; - } - - if(pContext->funcs.StartDoc != 0) - (void) pContext->funcs.StartDoc(pContext, c->type); - else - { - SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0, - BadImplementation); - return TRUE; - } - - if(c->type == XPDocNormal) - pContext->state |= DOC_COOKED_STARTED; - else - pContext->state |= DOC_RAW_STARTED; - - SendXpNotify(pContext, XPStartDocNotify, (int)FALSE); - - xfree(c); - return TRUE; -} - -static int -ProcXpStartDoc(ClientPtr client) -{ - REQUEST(xPrintStartDocReq); - int result = Success; - XpContextPtr pContext; - XpStDocPtr c; - - REQUEST_SIZE_MATCH(xPrintStartDocReq); - - if((pContext = XP_GETPRIV(client)) == (XpContextPtr)NULL) - return XpErrorBase+XPBadSequence; - - if(!(pContext->state & JOB_STARTED) || - pContext->state & DOC_RAW_STARTED || - pContext->state & DOC_COOKED_STARTED) - return XpErrorBase+XPBadSequence; - - if(stuff->type != XPDocNormal && stuff->type != XPDocRaw) - { - client->errorValue = stuff->type; - return BadValue; - } - - c = (XpStDocPtr)xalloc(sizeof(XpStDocRec)); - c->pContext = pContext; - c->type = stuff->type; - c->slept = FALSE; - (void)DoStartDoc(client, c); - - if (client->noClientException != Success) - return client->noClientException; - else - return result; -} - -static int -ProcXpEndDoc(ClientPtr client) -{ - REQUEST(xPrintEndDocReq); - XpContextPtr pContext; - int result = Success; - - REQUEST_SIZE_MATCH(xPrintEndDocReq); - - if((pContext = XP_GETPRIV(client)) == (XpContextPtr)NULL) - return XpErrorBase+XPBadSequence; - - if(!(pContext->state & DOC_RAW_STARTED) && - !(pContext->state & DOC_COOKED_STARTED)) - return XpErrorBase+XPBadSequence; - - if(pContext->state & PAGE_STARTED) - { - if(stuff->cancel == TRUE) - { - WindowPtr pWin = (WindowPtr )LookupIDByType( - pContext->pageWin, RT_WINDOW); - XpPagePtr pPage = (XpPagePtr)LookupIDByType( - pContext->pageWin, RTpage); - - if(pContext->funcs.EndPage != 0) - result = pContext->funcs.EndPage(pContext, pWin); - else - return BadImplementation; - - SendXpNotify(pContext, XPEndPageNotify, TRUE); - - if(pPage) - pPage->context = (XpContextPtr)NULL; - } - else - return XpErrorBase+XPBadSequence; - if(result != Success) - return result; - } - - if(pContext->funcs.EndDoc != 0) - result = pContext->funcs.EndDoc(pContext, stuff->cancel); - else - return BadImplementation; - - pContext->state &= ~DOC_RAW_STARTED; - pContext->state &= ~DOC_COOKED_STARTED; - - SendXpNotify(pContext, XPEndDocNotify, stuff->cancel); - - if (client->noClientException != Success) - return client->noClientException; - else - return result; -} - -static Bool -DoStartPage( - ClientPtr client, - XpStPagePtr c) -{ - WindowPtr pWin = c->pWin; - int result = Success; - XpContextPtr pContext = c->pContext; - XpPagePtr pPage; - - if(c->pContext->state & JOB_GET_DATA && - !(c->pContext->state & GET_DOC_DATA_STARTED)) - { - if(!c->slept) - { - c->slept = TRUE; - ClientSleep(client, (ClientSleepProcPtr)DoStartPage, (pointer) c); - c->pContext->clientSlept = client; - } - return TRUE; - } - - if(!(pContext->state & DOC_COOKED_STARTED)) - { - /* Implied StartDoc if it was omitted */ - if(pContext->funcs.StartDoc != 0) - result = pContext->funcs.StartDoc(pContext, XPDocNormal); - else - { - SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0, - BadImplementation); - return TRUE; - } - - if(result != Success) - { - SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0, result); - return TRUE; - } - - pContext->state |= DOC_COOKED_STARTED; - SendXpNotify(pContext, XPStartDocNotify, (int)FALSE); - } - - /* ensure the window's not already being used as a page */ - if((pPage = (XpPagePtr)LookupIDByType(c->pWin->drawable.id, RTpage)) != - (XpPagePtr)NULL) - { - if(pPage->context != (XpContextPtr)NULL) - { - SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0, - BadWindow); - return TRUE; - } - } - else - { - if((pPage = (XpPagePtr)xalloc(sizeof(XpPageRec))) == (XpPagePtr)NULL) - { - SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0, - BadAlloc); - return TRUE; - } - if(AddResource(c->pWin->drawable.id, RTpage, pPage) == FALSE) - { - xfree(pPage); - SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0, - BadAlloc); - return TRUE; - } - } - - pPage->context = pContext; - pContext->pageWin = c->pWin->drawable.id; - - if(pContext->funcs.StartPage != 0) - result = pContext->funcs.StartPage(pContext, pWin); - else - { - SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0, - BadImplementation); - return TRUE; - } - - pContext->state |= PAGE_STARTED; - - (void)MapWindow(pWin, client); - - SendXpNotify(pContext, XPStartPageNotify, (int)FALSE); - - return TRUE; -} - -static int -ProcXpStartPage(ClientPtr client) -{ - REQUEST(xPrintStartPageReq); - WindowPtr pWin; - int result = Success; - XpContextPtr pContext; - XpStPagePtr c; - - REQUEST_SIZE_MATCH(xPrintStartPageReq); - - if((pContext = XP_GETPRIV(client)) == (XpContextPtr)NULL) - return XpErrorBase+XPBadSequence; - - if(!(pContext->state & JOB_STARTED)) - return XpErrorBase+XPBadSequence; - - /* can't have pages in a raw documented */ - if(pContext->state & DOC_RAW_STARTED) - return XpErrorBase+XPBadSequence; - - if(pContext->state & PAGE_STARTED) - return XpErrorBase+XPBadSequence; - - result = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); - if (result != Success) - return result; - if (pWin->drawable.pScreen->myNum != pContext->screenNum) - return BadWindow; - - if((c = (XpStPagePtr)xalloc(sizeof(XpStPageRec))) == (XpStPagePtr)NULL) - return BadAlloc; - c->pContext = pContext; - c->slept = FALSE; - c->pWin = pWin; - - (void)DoStartPage(client, c); - - if (client->noClientException != Success) - return client->noClientException; - else - return result; -} - -static int -ProcXpEndPage(ClientPtr client) -{ - REQUEST(xPrintEndPageReq); - int result = Success; - XpContextPtr pContext; - XpPagePtr page; - WindowPtr pWin; - - REQUEST_SIZE_MATCH(xPrintEndPageReq); - - if((pContext = XP_GETPRIV(client)) == (XpContextPtr)NULL) - return XpErrorBase+XPBadSequence; - - if(!(pContext->state & PAGE_STARTED)) - return XpErrorBase+XPBadSequence; - - pWin = (WindowPtr )LookupIDByType(pContext->pageWin, RT_WINDOW); - - /* Call the ddx's EndPage proc. */ - if(pContext->funcs.EndPage != 0) - result = pContext->funcs.EndPage(pContext, pWin); - else - return BadImplementation; - - if((page = (XpPagePtr)LookupIDByType(pContext->pageWin, RTpage)) != - (XpPagePtr)NULL) - page->context = (XpContextPtr)NULL; - - pContext->state &= ~PAGE_STARTED; - pContext->pageWin = 0; /* None, NULL??? XXX */ - - (void)UnmapWindow(pWin, FALSE); - - SendXpNotify(pContext, XPEndPageNotify, stuff->cancel); - - if (client->noClientException != Success) - return client->noClientException; - else - return result; -} - -/******************************************************************************* - * - * Document Data Functions: PutDocumentData, GetDocumentData - * - ******************************************************************************/ - -static int -ProcXpPutDocumentData(ClientPtr client) -{ - REQUEST(xPrintPutDocumentDataReq); - XpContextPtr pContext; - DrawablePtr pDraw; - int result = Success; - unsigned totalSize; - char *pData, *pDoc_fmt, *pOptions; - - REQUEST_AT_LEAST_SIZE(xPrintPutDocumentDataReq); - - if((pContext = XP_GETPRIV(client)) == (XpContextPtr)NULL) - return XpErrorBase+XPBadSequence; - - if(!(pContext->state & DOC_RAW_STARTED) && - !(pContext->state & DOC_COOKED_STARTED)) - return XpErrorBase+XPBadSequence; - - if (stuff->drawable) { - if (pContext->state & DOC_RAW_STARTED) - return BadDrawable; - result = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, - DixWriteAccess); - if (result != Success) - return result; - if (pDraw->pScreen->myNum != pContext->screenNum) - return BadDrawable; - } else { - if (pContext->state & DOC_COOKED_STARTED) - return BadDrawable; - pDraw = NULL; - } - - pData = (char *)(&stuff[1]); - - totalSize = (stuff->len_data + 3) >> 2; - pDoc_fmt = pData + (totalSize << 2); - - totalSize += (stuff->len_fmt + 3) >> 2; - pOptions = pData + (totalSize << 2); - - totalSize += (stuff->len_options + 3) >> 2; - if((totalSize + (sz_xPrintPutDocumentDataReq >> 2)) != client->req_len) - return BadLength; - - if(pContext->funcs.PutDocumentData != 0) - { - result = (*pContext->funcs.PutDocumentData)(pContext, pDraw, - pData, stuff->len_data, - pDoc_fmt, stuff->len_fmt, - pOptions, stuff->len_options, - client); - } - else - return BadImplementation; - - if (client->noClientException != Success) - return client->noClientException; - else - return result; -} - -static int -ProcXpGetDocumentData(ClientPtr client) -{ - REQUEST(xPrintGetDocumentDataReq); - xPrintGetDocumentDataReply rep; - XpContextPtr pContext; - int result = Success; - - REQUEST_SIZE_MATCH(xPrintGetDocumentDataReq); - - if((pContext = (XpContextPtr)SecurityLookupIDByType(client, - stuff->printContext, - RTcontext, - DixWriteAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - if(pContext->funcs.GetDocumentData == 0) - return BadImplementation; - - if(!(pContext->state & JOB_GET_DATA) || - pContext->state & GET_DOC_DATA_STARTED) - return XpErrorBase+XPBadSequence; - - if(stuff->maxBufferSize <= 0) - { - client->errorValue = stuff->maxBufferSize; - return BadValue; /* gotta have a positive buffer size */ - } - - result = (*pContext->funcs.GetDocumentData)(pContext, client, - stuff->maxBufferSize); - if(result != Success) - { - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.dataLen = 0; - rep.statusCode = 1; - rep.finishedFlag = TRUE; - if (client->swapped) { - int n; - long l; - - swaps(&rep.sequenceNumber, n); - swapl(&rep.statusCode, l); /* XXX Why are these longs??? */ - swapl(&rep.finishedFlag, l); /* XXX Why are these longs??? */ - } - (void)WriteToClient(client,sz_xPrintGetDocumentDataReply,(char *)&rep); - } - else - pContext->state |= GET_DOC_DATA_STARTED; - - if(pContext->clientSlept != (ClientPtr)NULL) - { - ClientSignal(pContext->clientSlept); - ClientWakeup(pContext->clientSlept); - pContext->clientSlept = (ClientPtr)NULL; - } - - return result; -} - -/******************************************************************************* - * - * Attribute requests: GetAttributes, SetAttributes, GetOneAttribute - * - ******************************************************************************/ - -static int -ProcXpGetAttributes(ClientPtr client) -{ - REQUEST(xPrintGetAttributesReq); - XpContextPtr pContext; - char *attrs; - xPrintGetAttributesReply *pRep; - int totalSize, n; - unsigned long l; - - REQUEST_SIZE_MATCH(xPrintGetAttributesReq); - - if(stuff->type < XPJobAttr || stuff->type > XPServerAttr) - { - client->errorValue = stuff->type; - return BadValue; - } - - if(stuff->type != XPServerAttr) - { - if((pContext = (XpContextPtr)SecurityLookupIDByType( - client, - stuff->printContext, - RTcontext, - DixReadAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - if(pContext->funcs.GetAttributes == 0) - return BadImplementation; - if((attrs = (*pContext->funcs.GetAttributes)(pContext, stuff->type)) == - (char *)NULL) - return BadAlloc; - } - else - { - if((attrs = XpGetAttributes((XpContextPtr)NULL, XPServerAttr)) == - (char *)NULL) - return BadAlloc; - } - - totalSize = sz_xPrintGetAttributesReply + QUADPAD(strlen(attrs)); - if((pRep = (xPrintGetAttributesReply *)malloc(totalSize)) == - (xPrintGetAttributesReply *)NULL) - return BadAlloc; - - pRep->type = X_Reply; - pRep->length = (totalSize - sz_xPrintGetAttributesReply) >> 2; - pRep->sequenceNumber = client->sequence; - pRep->stringLen = strlen(attrs); - - if (client->swapped) { - swaps(&pRep->sequenceNumber, n); - swapl(&pRep->length, l); - swapl(&pRep->stringLen, l); - } - - strncpy((char*)(pRep + 1), attrs, strlen(attrs)); - xfree(attrs); - - WriteToClient(client, totalSize, (char *)pRep); - - xfree(pRep); - - return client->noClientException; -} - -static int -ProcXpSetAttributes(ClientPtr client) -{ - REQUEST(xPrintSetAttributesReq); - int result = Success; - XpContextPtr pContext; - char *attr; - - REQUEST_AT_LEAST_SIZE(xPrintSetAttributesReq); - - if(stuff->type < XPJobAttr || stuff->type > XPServerAttr) - { - client->errorValue = stuff->type; - return BadValue; - } - - /* - * Disallow changing of read-only attribute pools - */ - if(stuff->type == XPPrinterAttr || stuff->type == XPServerAttr) - return BadMatch; - - if((pContext = (XpContextPtr)SecurityLookupIDByType( - client, - stuff->printContext, - RTcontext, - DixWriteAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - if(pContext->funcs.SetAttributes == 0) - return BadImplementation; - - /* - * Check for attributes being set after their relevant phase - * has already begun (e.g. Job attributes set after StartJob). - */ - if((pContext->state & JOB_STARTED) && stuff->type == XPJobAttr) - return XpErrorBase+XPBadSequence; - if(((pContext->state & DOC_RAW_STARTED) || - (pContext->state & DOC_COOKED_STARTED)) && stuff->type == XPDocAttr) - return XpErrorBase+XPBadSequence; - if((pContext->state & PAGE_STARTED) && stuff->type == XPPageAttr) - return XpErrorBase+XPBadSequence; - - if((attr = (char *)malloc(stuff->stringLen + 1)) == (char *)NULL) - return BadAlloc; - - strncpy(attr, (char *)(stuff + 1), stuff->stringLen); - attr[stuff->stringLen] = (char)'\0'; - - if(stuff->rule == XPAttrReplace) - (*pContext->funcs.SetAttributes)(pContext, stuff->type, attr); - else if(stuff->rule == XPAttrMerge) - (*pContext->funcs.AugmentAttributes)(pContext, stuff->type, attr); - else - { - client->errorValue = stuff->rule; - result = BadValue; - } - - xfree(attr); - - SendAttributeNotify(pContext, stuff->type); - - return result; -} - -static int -ProcXpGetOneAttribute(ClientPtr client) -{ - REQUEST(xPrintGetOneAttributeReq); - XpContextPtr pContext; - char *value, *attrName; - xPrintGetOneAttributeReply *pRep; - int totalSize; - int n; - unsigned long l; - - REQUEST_AT_LEAST_SIZE(xPrintGetOneAttributeReq); - - totalSize = ((sz_xPrintGetOneAttributeReq) >> 2) + - ((stuff->nameLen + 3) >> 2); - if(totalSize != client->req_len) - return BadLength; - - if(stuff->type < XPJobAttr || stuff->type > XPServerAttr) - { - client->errorValue = stuff->type; - return BadValue; - } - - if((attrName = (char *)malloc(stuff->nameLen + 1)) == (char *)NULL) - return BadAlloc; - strncpy(attrName, (char *)(stuff+1), stuff->nameLen); - attrName[stuff->nameLen] = (char)'\0'; - - if(stuff->type != XPServerAttr) - { - if((pContext = (XpContextPtr)SecurityLookupIDByType( - client, - stuff->printContext, - RTcontext, - DixReadAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - if(pContext->funcs.GetOneAttribute == 0) - return BadImplementation; - if((value = (*pContext->funcs.GetOneAttribute)(pContext, stuff->type, - attrName)) == (char *)NULL) - return BadAlloc; - } - else - { - if((value = XpGetOneAttribute((XpContextPtr)NULL, XPServerAttr, - attrName)) == (char *)NULL) - return BadAlloc; - } - - free(attrName); - - totalSize = sz_xPrintGetOneAttributeReply + QUADPAD(strlen(value)); - if((pRep = (xPrintGetOneAttributeReply *)malloc(totalSize)) == - (xPrintGetOneAttributeReply *)NULL) - return BadAlloc; - - pRep->type = X_Reply; - pRep->length = (totalSize - sz_xPrintGetOneAttributeReply) >> 2; - pRep->sequenceNumber = client->sequence; - pRep->valueLen = strlen(value); - - if (client->swapped) { - swaps(&pRep->sequenceNumber, n); - swapl(&pRep->length, l); - swapl(&pRep->valueLen, l); - } - - strncpy((char*)(pRep + 1), value, strlen(value)); - - WriteToClient(client, totalSize, (char *)pRep); - - xfree(pRep); - - return client->noClientException; -} - -/******************************************************************************* - * - * Print Event requests: SelectInput InputSelected, SendXpNotify - * - ******************************************************************************/ - - -static int -ProcXpSelectInput(ClientPtr client) -{ - REQUEST(xPrintSelectInputReq); - int result = Success; - XpContextPtr pContext; - XpClientPtr pPrintClient; - - REQUEST_SIZE_MATCH(xPrintSelectInputReq); - - /* - * Check to see that the supplied XID is really a valid print context - * in this server. - */ - if((pContext=(XpContextPtr)SecurityLookupIDByType(client, - stuff->printContext, - RTcontext, - DixWriteAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - if(stuff->eventMask & ~allEvents) - { - client->errorValue = stuff->eventMask; - return BadValue; /* bogus event mask bits */ - } - - if((pPrintClient = AcquireClient(pContext, client)) == (XpClientPtr)NULL) - return BadAlloc; - - pPrintClient->eventMask = stuff->eventMask; - - return result; -} - -static int -ProcXpInputSelected(ClientPtr client) -{ - REQUEST(xPrintInputSelectedReq); - xPrintInputSelectedReply rep; - register int n; - long l; - XpClientPtr pXpClient; - XpContextPtr pContext; - - REQUEST_SIZE_MATCH(xPrintInputSelectedReq); - - if((pContext=(XpContextPtr)SecurityLookupIDByType(client, - stuff->printContext, - RTcontext, - DixReadAccess)) - == (XpContextPtr)NULL) - { - client->errorValue = stuff->printContext; - return XpErrorBase+XPBadContext; - } - - pXpClient = FindClient(pContext, client); - - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.eventMask = (pXpClient != (XpClientPtr)NULL)? pXpClient->eventMask : 0; - rep.allEventsMask = GetAllEventMasks(pContext); - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, l); - swapl(&rep.eventMask, l); - swapl(&rep.allEventsMask, l); - } - - WriteToClient(client, sz_xPrintInputSelectedReply, (char *)&rep); - return client->noClientException; -} - -static void -SendAttributeNotify(XpContextPtr pContext, int which) -{ - XpClientPtr pXpClient; - xPrintAttributeEvent ae; - ClientPtr client; - - pXpClient = pContext->clientHead; - if(pXpClient == (XpClientPtr)NULL) - return; /* Nobody's interested in the events (or this context). */ - - for (pXpClient = pContext->clientHead; - pXpClient != (XpClientPtr)NULL; - pXpClient = pXpClient->pNext) - { - client = pXpClient->client; - if (client == serverClient || client->clientGone || - !(pXpClient->eventMask & XPAttributeMask)) - continue; - ae.type = XPAttributeNotify + XpEventBase; - ae.detail = which; - ae.printContext = pContext->contextID; - ae.sequenceNumber = client->sequence; - WriteEventsToClient (client, 1, (xEvent *) &ae); - } -} - -static void -SendXpNotify(XpContextPtr pContext, int which, int val) -{ - XpClientPtr pXpClient; - xPrintPrintEvent pe; - ClientPtr client; - - pXpClient = pContext->clientHead; - if(pXpClient == (XpClientPtr)NULL) - return; /* Nobody's interested in the events (or this context). */ - - for (pXpClient = pContext->clientHead; - pXpClient != (XpClientPtr)NULL; - pXpClient = pXpClient->pNext) - { - client = pXpClient->client; - if (client == serverClient || client->clientGone || - !(pXpClient->eventMask & XPPrintMask)) - continue; - pe.type = XPPrintNotify + XpEventBase; - pe.detail = which; - pe.printContext = pContext->contextID; - pe.cancel = (Bool)val; - pe.sequenceNumber = client->sequence; - WriteEventsToClient (client, 1, (xEvent *) &pe); - } -} - -static CARD32 -GetAllEventMasks(XpContextPtr pContext) -{ - XpClientPtr pPrintClient; - CARD32 totalMask = (CARD32)0; - - for (pPrintClient = pContext->clientHead; - pPrintClient != (XpClientPtr)NULL; - pPrintClient = pPrintClient->pNext) - { - totalMask |= pPrintClient->eventMask; - } - return totalMask; -} - -/* - * XpContextOfClient - returns the XpContextPtr to the context - * associated with the specified client, or NULL if the client - * does not currently have a context set. - */ -XpContextPtr -XpContextOfClient(ClientPtr client) -{ - return XP_GETPRIV(client); -} - - -/******************************************************************************* - * - * Swap-request functions - * - ******************************************************************************/ - -static int -SProcXpCreateContext(ClientPtr client) -{ - int i; - long n; - - REQUEST(xPrintCreateContextReq); - - swaps(&stuff->length, i); - swapl(&stuff->contextID, n); - swapl(&stuff->printerNameLen, n); - swapl(&stuff->localeLen, n); - return ProcXpCreateContext(client); -} - -static int -SProcXpGetPrinterList(ClientPtr client) -{ - int i; - long n; - - REQUEST(xPrintGetPrinterListReq); - - swaps(&stuff->length, i); - swapl(&stuff->printerNameLen, n); - swapl(&stuff->localeLen, n); - return ProcXpGetPrinterList(client); -} - -static int -SProcXpRehashPrinterList(ClientPtr client) -{ - int i; - - REQUEST(xPrintRehashPrinterListReq); - swaps(&stuff->length, i); - return ProcXpRehashPrinterList(client); -} - -static int -SProcXpSetContext(ClientPtr client) -{ - int i; - - REQUEST(xPrintSetContextReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, i); - return ProcXpSetContext(client); -} - -static int -SProcXpGetContext(ClientPtr client) -{ - int i; - - REQUEST(xPrintGetContextReq); - swaps(&stuff->length, i); - return ProcXpGetContext(client); -} - -static int -SProcXpDestroyContext(ClientPtr client) -{ - int i; - long n; - - REQUEST(xPrintDestroyContextReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, n); - return ProcXpDestroyContext(client); -} - -static int -SProcXpGetContextScreen(ClientPtr client) -{ - int i; - long n; - - REQUEST(xPrintGetContextScreenReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, n); - return ProcXpGetContextScreen(client); -} - -static int -SProcXpInputSelected(ClientPtr client) -{ - int i; - long n; - - REQUEST(xPrintInputSelectedReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, n); - return ProcXpInputSelected(client); -} - -static int -SProcXpStartJob(ClientPtr client) -{ - int i; - - REQUEST(xPrintStartJobReq); - swaps(&stuff->length, i); - return ProcXpStartJob(client); -} - -static int -SProcXpEndJob(ClientPtr client) -{ - int i; - - REQUEST(xPrintEndJobReq); - swaps(&stuff->length, i); - return ProcXpEndJob(client); -} - -static int -SProcXpStartDoc(ClientPtr client) -{ - int i; - - REQUEST(xPrintStartDocReq); - swaps(&stuff->length, i); - return ProcXpStartDoc(client); -} - -static int -SProcXpEndDoc(ClientPtr client) -{ - int i; - - REQUEST(xPrintEndDocReq); - swaps(&stuff->length, i); - return ProcXpEndDoc(client); -} - -static int -SProcXpStartPage(ClientPtr client) -{ - int i; - long n; - - REQUEST(xPrintStartPageReq); - swaps(&stuff->length, i); - swapl(&stuff->window, n); - return ProcXpStartPage(client); -} - -static int -SProcXpEndPage(ClientPtr client) -{ - int i; - - REQUEST(xPrintEndPageReq); - swaps(&stuff->length, i); - return ProcXpEndPage(client); -} - -static int -SProcXpPutDocumentData(ClientPtr client) -{ - long n; - int i; - - REQUEST(xPrintPutDocumentDataReq); - swaps(&stuff->length, i); - swapl(&stuff->drawable, n); - swapl(&stuff->len_data, n); - swaps(&stuff->len_fmt, i); - swaps(&stuff->len_options, i); - return ProcXpPutDocumentData(client); -} - -static int -SProcXpGetDocumentData(ClientPtr client) -{ - long n; - int i; - - REQUEST(xPrintGetDocumentDataReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, n); - swapl(&stuff->maxBufferSize, n); - return ProcXpGetDocumentData(client); -} - -static int -SProcXpGetAttributes(ClientPtr client) -{ - long n; - int i; - - REQUEST(xPrintGetAttributesReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, n); - return ProcXpGetAttributes(client); -} - -static int -SProcXpSetAttributes(ClientPtr client) -{ - long n; - int i; - - REQUEST(xPrintSetAttributesReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, n); - swapl(&stuff->stringLen, n); - return ProcXpSetAttributes(client); -} - -static int -SProcXpGetOneAttribute(ClientPtr client) -{ - long n; - int i; - - REQUEST(xPrintGetOneAttributeReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, n); - swapl(&stuff->nameLen, n); - return ProcXpGetOneAttribute(client); -} - -static int -SProcXpSelectInput(ClientPtr client) -{ - long n; - int i; - - REQUEST(xPrintSelectInputReq); - swaps(&stuff->length, i); - swapl(&stuff->eventMask, n); - swapl(&stuff->printContext, n); - return ProcXpSelectInput(client); -} - -static int -SProcXpGetPageDimensions(ClientPtr client) -{ - long n; - int i; - - REQUEST(xPrintGetPageDimensionsReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, n); - return ProcXpGetPageDimensions(client); -} - -static int -SProcXpSetImageResolution(ClientPtr client) -{ - long n; - int i; - - REQUEST(xPrintSetImageResolutionReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, n); - swaps(&stuff->imageRes, i); - return ProcXpSetImageResolution(client); -} - -static int -SProcXpGetImageResolution(ClientPtr client) -{ - long n; - int i; - - REQUEST(xPrintGetImageResolutionReq); - swaps(&stuff->length, i); - swapl(&stuff->printContext, n); - return ProcXpGetImageResolution(client); -} - -static void -SwapXpNotifyEvent(xPrintPrintEvent *src, xPrintPrintEvent *dst) -{ - /* - * Swap the sequence number and context fields. - */ - cpswaps(src->sequenceNumber, dst->sequenceNumber); - cpswapl(src->printContext, dst->printContext); - - /* - * Copy the byte-long fields. - */ - dst->type = src->type; - dst->detail = src->detail; - dst->cancel = src->cancel; -} - -static void -SwapXpAttributeEvent(xPrintAttributeEvent *src, xPrintAttributeEvent *dst) -{ - /* - * Swap the sequence number and context fields. - */ - cpswaps(src->sequenceNumber, dst->sequenceNumber); - cpswapl(src->printContext, dst->printContext); - - /* - * Copy the byte-long fields. - */ - dst->type = src->type; - dst->detail = src->detail; -} diff --git a/configure.ac b/configure.ac index 9da8a94d5..d78f12292 100644 --- a/configure.ac +++ b/configure.ac @@ -566,7 +566,6 @@ AC_ARG_ENABLE(xvfb, AS_HELP_STRING([--enable-xvfb], [Build Xvfb server AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto]) AC_ARG_ENABLE(xquartz, AS_HELP_STRING([--enable-xquartz], [Build Xquartz server for OS-X (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto]) AC_ARG_ENABLE(xwin, AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto]) -AC_ARG_ENABLE(xprint, AS_HELP_STRING([--enable-xprint], [Build Xprint extension and server (default: no)]), [XPRINT=$enableval], [XPRINT=no]) AC_ARG_ENABLE(xgl, AS_HELP_STRING([--enable-xgl], [Build Xgl server (default: no)]), [XGL=$enableval], [XGL=no]) AC_ARG_ENABLE(xglx, AS_HELP_STRING([--enable-xglx], [Build Xglx xgl module (default: no)]), [XGLX=$enableval], [XGLX=no]) AC_ARG_ENABLE(xegl, AS_HELP_STRING([--enable-xegl], [Build Xegl xgl module (default: no)]), [XEGL=$enableval], [XEGL=no]) @@ -979,15 +978,6 @@ if test "x$DPMSExtension" = xyes; then AC_DEFINE(DPMSExtension, 1, [Support DPMS extension]) fi -if test "x$XPRINT" = xauto; then - PKG_CHECK_MODULES([XPRINTPROTO], [printproto], [XPRINT=yes], [XPRINT=no]) -fi -AM_CONDITIONAL(XPRINT, [test "x$XPRINT" = xyes]) -if test "x$XPRINT" = xyes; then - AC_DEFINE(XPRINT, 1, [Build Print extension]) - REQUIRED_MODULES="$REQUIRED_MODULES printproto" -fi - if test "x$BUILTIN_FONTS" = xyes; then AC_DEFINE(BUILTIN_FONTS, 1, [Use only built-in fonts]) AC_DEFINE(NOFONTSERVERACCESS, 1, [Avoid using a font server]) @@ -1612,62 +1602,6 @@ if test "x$MFB" = xyes -o "x$AFB" = xyes; then fi fi -dnl Xprint DDX - -AC_MSG_CHECKING([whether to build Xprint DDX]) -AC_MSG_RESULT([$XPRINT]) - -if test "x$XPRINT" = xyes; then - PKG_CHECK_MODULES([XPRINTMODULES], [printproto x11 xfont $XDMCP_MODULES xau]) - XPRINT_CFLAGS="$XPRINTMODULES_CFLAGS -DXPRINT" - XPRINT_LIBS="$XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS $MIEXT_DAMAGE_LIB $XKB_LIB $XKB_STUB_LIB" - XPRINT_SYS_LIBS="$XPRINTMODULES_LIBS" - - xpconfigdir=$libdir/X11/xserver - AC_SUBST([xpconfigdir]) - - AC_PATH_PROG(MKFONTSCALE, mkfontscale) - AC_PATH_PROG(MKFONTDIR, mkfontdir) - - # freetype support code borrowed from lib/XFont - if test x$XP_USE_FREETYPE = xyes; then - AC_DEFINE(XP_USE_FREETYPE,1,[Support FreeType rasterizer in Xprint for nearly all font file formats]) - - if test "$freetype_config" = "auto" ; then - PKG_CHECK_MODULES(FREETYPE, freetype2, - freetype_config=no, freetype_config=yes) - fi - - if test "$freetype_config" = "yes"; then - AC_PATH_PROG(ft_config,freetype-config,no) - if test "$ft_config" = "no"; then - AC_MSG_ERROR([You must have freetype installed; see http://www.freetype.org/]) - fi - else - ft_config="$freetype_config" - fi - - if test "$freetype_config" != "no"; then - FREETYPE_CFLAGS="`$ft_config --cflags`" - FREETYPE_LIBS="`$ft_config --libs`" - fi - FREETYPE_REQUIRES="freetype2" - else - FREETYPE_CFLAGS="" - FREETYPE_LIBS="" - FREETYPE_REQUIRES="" - fi - XPRINT_CFLAGS="$XPRINT_CFLAGS $FREETYPE_CFLAGS" - XPRINT_SYS_LIBS="$XPRINT_SYS_LIBS $FREETYPE_LIBS" - # end freetype support - - AC_SUBST([XPRINT_CFLAGS]) - AC_SUBST([XPRINT_LIBS]) - AC_SUBST([XPRINT_SYS_LIBS]) -fi -AM_CONDITIONAL(XP_USE_FREETYPE, [test "x$XPRINT" = xyes && test "x$XP_USE_FREETYPE" = xyes]) - - dnl XWin DDX AC_MSG_CHECKING([whether to build XWin DDX]) @@ -2188,41 +2122,5 @@ hw/kdrive/smi/Makefile hw/kdrive/src/Makefile hw/kdrive/vesa/Makefile hw/kdrive/via/Makefile -hw/xprint/Makefile -hw/xprint/doc/Makefile -hw/xprint/pcl/Makefile -hw/xprint/pcl-mono/Makefile -hw/xprint/raster/Makefile -hw/xprint/ps/Makefile -hw/xprint/etc/Makefile -hw/xprint/etc/Xsession.d/Makefile -hw/xprint/etc/init.d/Makefile -hw/xprint/etc/profile.d/Makefile -hw/xprint/config/Makefile -hw/xprint/config/C/print/attributes/Makefile -hw/xprint/config/C/print/ddx-config/Makefile -hw/xprint/config/C/print/ddx-config/raster/Makefile -hw/xprint/config/C/print/models/CANONBJ10E-GS/Makefile -hw/xprint/config/C/print/models/PSdefault/fonts/Makefile -hw/xprint/config/C/print/models/PSdefault/Makefile -hw/xprint/config/C/print/models/PSspooldir/Makefile -hw/xprint/config/C/print/models/SPSPARC2/Makefile -hw/xprint/config/C/print/models/SPSPARC2/fonts/Makefile -hw/xprint/config/C/print/models/GSdefault/Makefile -hw/xprint/config/C/print/models/HPLJ4050-PS/Makefile -hw/xprint/config/C/print/models/HPLJ4050-PS/fonts/Makefile -hw/xprint/config/C/print/models/Makefile -hw/xprint/config/C/print/models/PS2PDFspooldir-GS/Makefile -hw/xprint/config/C/print/models/CANONC3200-PS/Makefile -hw/xprint/config/C/print/models/CANONC3200-PS/fonts/Makefile -hw/xprint/config/C/print/models/HPLJ4family/fonts/Makefile -hw/xprint/config/C/print/models/HPLJ4family/Makefile -hw/xprint/config/C/print/models/HPDJ1600C/Makefile -hw/xprint/config/C/print/models/HPDJ1600C/fonts/Makefile -hw/xprint/config/C/print/Makefile -hw/xprint/config/C/Makefile -hw/xprint/config/en_US/print/attributes/Makefile -hw/xprint/config/en_US/print/Makefile -hw/xprint/config/en_US/Makefile xorg-server.pc ]) diff --git a/dix/Makefile.am b/dix/Makefile.am index e44b51081..ac5d344e9 100644 --- a/dix/Makefile.am +++ b/dix/Makefile.am @@ -1,10 +1,6 @@ standard_dix_libs = libdix.la libxpstubs.la -if XPRINT -noinst_LTLIBRARIES = $(standard_dix_libs) libXpdix.la -else noinst_LTLIBRARIES = $(standard_dix_libs) -endif AM_CFLAGS = $(DIX_CFLAGS) \ -DVENDOR_NAME=\""@VENDOR_NAME@"\" \ @@ -45,12 +41,6 @@ libdix_la_SOURCES = \ libxpstubs_la_SOURCES = \ xpstubs.c -if XPRINT -libXpdix_la_SOURCES = $(libdix_la_SOURCES) -libXpdix_la_CPPFLAGS = -I$(top_srcdir)/hw/xprint -libXpdix_la_CFLAGS = $(AM_CFLAGS) $(XPRINT_CFLAGS) -endif - EXTRA_DIST = buildatoms BuiltInAtoms CHANGES Xserver.d Xserver-dtrace.h.in # Install list of protocol names diff --git a/dix/dispatch.c b/dix/dispatch.c index 50259537b..1b81b816a 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -399,9 +399,6 @@ Dispatch(void) } isItTimeToYield = FALSE; -#ifdef XPRINT - requestingClient = client; -#endif #ifdef SMART_SCHEDULE start_tick = SmartScheduleTime; #endif @@ -472,9 +469,6 @@ Dispatch(void) client = clients[clientReady[nready]]; if (client) client->smart_stop_tick = SmartScheduleTime; -#endif -#ifdef XPRINT - requestingClient = NULL; #endif } dispatchException &= ~DE_PRIORITYCHANGE; diff --git a/dix/dixfonts.c b/dix/dixfonts.c index 6fb29de3a..0b08e9e53 100644 --- a/dix/dixfonts.c +++ b/dix/dixfonts.c @@ -1937,37 +1937,27 @@ GetDefaultPointSize () FontResolutionPtr GetClientResolutions (int *num) { -#ifdef XPRINT - if (requestingClient && requestingClient->fontResFunc != NULL && - !requestingClient->clientGone) - { - return (*requestingClient->fontResFunc)(requestingClient, num); - } - else -#endif - { - static struct _FontResolution res; - ScreenPtr pScreen; + static struct _FontResolution res; + ScreenPtr pScreen; - pScreen = screenInfo.screens[0]; - res.x_resolution = (pScreen->width * 25.4) / pScreen->mmWidth; - /* - * XXX - we'll want this as long as bitmap instances are prevalent - so that we can match them from scalable fonts - */ - if (res.x_resolution < 88) - res.x_resolution = 75; - else - res.x_resolution = 100; - res.y_resolution = (pScreen->height * 25.4) / pScreen->mmHeight; - if (res.y_resolution < 88) - res.y_resolution = 75; - else - res.y_resolution = 100; - res.point_size = 120; - *num = 1; - return &res; - } + pScreen = screenInfo.screens[0]; + res.x_resolution = (pScreen->width * 25.4) / pScreen->mmWidth; + /* + * XXX - we'll want this as long as bitmap instances are prevalent + so that we can match them from scalable fonts + */ + if (res.x_resolution < 88) + res.x_resolution = 75; + else + res.x_resolution = 100; + res.y_resolution = (pScreen->height * 25.4) / pScreen->mmHeight; + if (res.y_resolution < 88) + res.y_resolution = 75; + else + res.y_resolution = 100; + res.point_size = 120; + *num = 1; + return &res; } /* diff --git a/dix/globals.c b/dix/globals.c index 7f95eabd5..2fb7ba0b3 100644 --- a/dix/globals.c +++ b/dix/globals.c @@ -143,9 +143,6 @@ Bool loadableFonts = FALSE; CursorPtr rootCursor; Bool blackRoot=FALSE; Bool whiteRoot=FALSE; -#ifdef XPRINT -ClientPtr requestingClient; /* XXX this should be obsolete now, remove? */ -#endif _X_EXPORT TimeStamp currentTime; _X_EXPORT TimeStamp lastDeviceEventTime; diff --git a/dix/main.c b/dix/main.c index fbd64138e..8bdfb5b7d 100644 --- a/dix/main.c +++ b/dix/main.c @@ -103,9 +103,6 @@ Equipment Corporation. #include "extnsionst.h" #include "privates.h" #include "registry.h" -#ifdef XPRINT -#include "DiPrint.h" -#endif #ifdef PANORAMIX #include "panoramiXsrv.h" #else @@ -251,9 +248,6 @@ int main(int argc, char *argv[], char *envp[]) InitGlobals(); InitRegions(); -#ifdef XPRINT - PrinterInitGlobals(); -#endif CheckUserParameters(argc, argv, envp); @@ -348,9 +342,6 @@ int main(int argc, char *argv[], char *envp[]) InitCallbackManager(); InitVisualWrap(); InitOutput(&screenInfo, argc, argv); -#ifdef XPRINT - PrinterInitOutput(&screenInfo, argc, argv); -#endif if (screenInfo.numScreens < 1) FatalError("no screens found"); diff --git a/dix/xpstubs.c b/dix/xpstubs.c index 59340ad21..f8cd207eb 100644 --- a/dix/xpstubs.c +++ b/dix/xpstubs.c @@ -31,12 +31,8 @@ from The Open Group. #include "misc.h" #include -#ifdef XPRINT -#include "DiPrint.h" -#else extern Bool XpClientIsBitmapClient(ClientPtr client); extern Bool XpClientIsPrintClient(ClientPtr client, FontPathElementPtr fpe); -#endif Bool XpClientIsBitmapClient( @@ -52,27 +48,3 @@ XpClientIsPrintClient( { return FALSE; } -#ifdef XPRINT -int -PrinterOptions( - int argc, - char **argv, - int i) -{ - return i; -} -void -PrinterInitOutput( - ScreenInfo *pScreenInfo, - int argc, - char **argv) -{ -} -void PrinterUseMsg(void) -{ -} -void PrinterInitGlobals(void) -{ -} -#endif /* XPRINT */ - diff --git a/hw/Makefile.am b/hw/Makefile.am index c2b9571b9..4589b7eef 100644 --- a/hw/Makefile.am +++ b/hw/Makefile.am @@ -26,10 +26,6 @@ if KDRIVE KDRIVE_SUBDIRS = kdrive endif -if XPRINT -XPRINT_SUBDIRS = xprint -endif - if XQUARTZ XQUARTZ_SUBDIRS = xquartz endif @@ -42,10 +38,9 @@ SUBDIRS = \ $(XNEST_SUBDIRS) \ $(DMX_SUBDIRS) \ $(KDRIVE_SUBDIRS) \ - $(XQUARTZ_SUBDIRS) \ - $(XPRINT_SUBDIRS) + $(XQUARTZ_SUBDIRS) -DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xgl xprint +DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xgl relink: for i in $(SUBDIRS) ; do $(MAKE) -C $$i relink ; done diff --git a/hw/xnest/Font.c b/hw/xnest/Font.c index 9f30085b1..26faf1633 100644 --- a/hw/xnest/Font.c +++ b/hw/xnest/Font.c @@ -44,11 +44,6 @@ xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont) FontSetPrivate(pFont, xnestFontPrivateIndex, NULL); -#ifdef XPRINT - if (requestingClient && XpClientIsPrintClient(requestingClient, NULL)) - return True; -#endif - name_atom = MakeAtom("FONT", 4, True); value_atom = 0L; diff --git a/hw/xprint/AttrValid.c b/hw/xprint/AttrValid.c deleted file mode 100644 index f8c292faa..000000000 --- a/hw/xprint/AttrValid.c +++ /dev/null @@ -1,701 +0,0 @@ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include - -#include "attributes.h" - -/* - * default medium-source-sizes supported = na-letter w/.25" margins - */ -static XpOidMediumDiscreteSize DefaultMediumSize = { - xpoid_val_medium_size_na_letter, xFalse, {6.35, 209.55, 6.35, 273.05} -}; -static XpOidMediumDiscreteSizeList DefaultMediumSizeList = { - &DefaultMediumSize, 1 -}; -static XpOidMediumSourceSize DefaultMediumSourceSize = { - xpoid_unspecified, XpOidMediumSS_DISCRETE, { &DefaultMediumSizeList } -}; -static XpOidMediumSS DefaultMediumSS = { - &DefaultMediumSourceSize, 1 -}; - -/* - * if 'valid_oid_list' is NULL any oid found is considered valid - */ -XpOid -XpGetOidAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidList* valid_oid_list) -{ - XpOid value_oid; - - value_oid = XpOidFromString(XpGetStringAttr(pContext, pool, oid)); - if((const XpOidList*)NULL == valid_oid_list - || - XpOidListHasOid(valid_oid_list, value_oid)) - { - return value_oid; - } - else - { - return xpoid_none; - } -} - -void -XpPutOidAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - XpOid value_oid) -{ - XpPutStringAttr(pContext, pool, oid, XpOidString(value_oid)); -} - -void -XpValidateOidAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidList* valid_oids, - XpOid default_oid) -{ - XpOid value_oid; - value_oid = XpGetOidAttr(pContext, pool, oid, valid_oids); - XpPutOidAttr(pContext, pool, oid, - value_oid == xpoid_none ? default_oid : value_oid); -} - -/* - * if 'valid_card_list' is NULL any cardinal found is considered valid - */ -unsigned long -XpGetCardAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidCardList* valid_card_list) -{ - unsigned long value_card; - - if(XpOidParseUnsignedValue(XpGetStringAttr(pContext, pool, oid), - (const char**)NULL, - &value_card)) - { - if((const XpOidCardList*)NULL == valid_card_list - || - XpOidCardListHasCard(valid_card_list, value_card)) - { - return value_card; - } - } - return 0; -} - -void -XpPutCardAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - unsigned long value_card) -{ - if(value_card > 0) - { - char value_out[16]; - sprintf(value_out, "%lu", value_card); - XpPutStringAttr(pContext, pool, oid, value_out); - } - else - XpPutStringAttr(pContext, pool, oid, (const char*)NULL); -} - -void -XpValidateCardAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidCardList* valid_cards, - unsigned long default_card) -{ - unsigned long value_card; - value_card = XpGetCardAttr(pContext, pool, oid, valid_cards); - XpPutCardAttr(pContext, pool, oid, - value_card == 0 ? default_card : value_card); -} - -XpOidList* -XpGetListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidList* valid_oid_list) -{ - return XpOidListNew(XpGetStringAttr(pContext, pool, oid), valid_oid_list); -} - -void -XpPutListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidList* list) -{ - char* value_out; - - value_out = XpOidListString(list); - XpPutStringAttr(pContext, pool, oid, value_out); - XpOidFree(value_out); -} - -void -XpValidateListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidList* valid_oids, - const XpOidList* default_oids) -{ - XpOidList* list = XpGetListAttr(pContext, pool, oid, valid_oids); - if(XpOidListCount(list) == 0) - XpPutListAttr(pContext, pool, oid, default_oids); - else - XpPutListAttr(pContext, pool, oid, list); - XpOidListDelete(list); -} - -XpOidCardList* -XpGetCardListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidCardList* valid_card_list) -{ - return XpOidCardListNew(XpGetStringAttr(pContext, pool, oid), - valid_card_list); -} - -void -XpPutCardListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidCardList* list) -{ - char* value_out; - - value_out = XpOidCardListString(list); - XpPutStringAttr(pContext, pool, oid, value_out); - XpOidFree(value_out); -} - -void -XpValidateCardListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidCardList* valid_cards, - const XpOidCardList* default_cards) -{ - XpOidCardList* list = XpGetCardListAttr(pContext, pool, oid, valid_cards); - if(XpOidCardListCount(list) == 0 && (XpOidCardList*)NULL != default_cards) - XpPutCardListAttr(pContext, pool, oid, default_cards); - else - XpPutCardListAttr(pContext, pool, oid, list); - XpOidCardListDelete(list); -} - -XpOidDocFmtList* -XpGetDocFmtListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidDocFmtList* valid_fmt_list) -{ - return XpOidDocFmtListNew(XpGetStringAttr(pContext, pool, oid), - valid_fmt_list); -} - -void -XpPutDocFmtListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidDocFmtList* list) -{ - char* value_out; - - value_out = XpOidDocFmtListString(list); - XpPutStringAttr(pContext, pool, oid, value_out); - XpOidFree(value_out); -} - -void -XpValidateDocFmtListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidDocFmtList* valid_fmts, - const XpOidDocFmtList* default_fmts) -{ - XpOidDocFmtList* list; - - list = XpGetDocFmtListAttr(pContext, pool, oid, valid_fmts); - if(XpOidDocFmtListCount(list) == 0 - && - (XpOidDocFmtList*)NULL != default_fmts) - { - XpPutDocFmtListAttr(pContext, pool, oid, default_fmts); - } - else - { - XpPutDocFmtListAttr(pContext, pool, oid, list); - } - XpOidDocFmtListDelete(list); -} - -XpOidMediumSS* -XpGetMediumSSAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidList* valid_trays, - const XpOidList* valid_sizes) -{ - return XpOidMediumSSNew(XpGetStringAttr(pContext, pool, oid), - valid_trays, valid_sizes); -} - -void -XpPutMediumSSAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidMediumSS* msss) -{ - char* value_out; - - value_out = XpOidMediumSSString(msss); - XpPutStringAttr(pContext, pool, oid, value_out); - XpOidFree(value_out); -} - -const XpOidMediumSS* -XpGetDefaultMediumSS() -{ - return &DefaultMediumSS; -} - -XpOidTrayMediumList* -XpGetTrayMediumListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidList* valid_trays, - const XpOidMediumSS* msss) -{ - return XpOidTrayMediumListNew(XpGetStringAttr(pContext, pool, oid), - valid_trays, msss); -} - -void -XpPutTrayMediumListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidTrayMediumList* tm) -{ - char* value_out; - - value_out = XpOidTrayMediumListString(tm); - XpPutStringAttr(pContext, pool, oid, value_out); - XpOidFree(value_out); -} - -void -XpValidatePrinterMediaAttrs(XpContextPtr pContext, - const XpOidList* valid_trays, - const XpOidList* valid_sizes) -{ - const XpOidMediumSS* msss; - XpOidMediumSS* pool_msss; - XpOidTrayMediumList* tm; - - pool_msss = XpGetMediumSSAttr(pContext, XPPrinterAttr, - xpoid_att_medium_source_sizes_supported, - valid_trays, valid_sizes); - if(0 == XpOidMediumSSCount(pool_msss)) - msss = XpGetDefaultMediumSS(); - else - msss = pool_msss; - XpPutMediumSSAttr(pContext, XPPrinterAttr, - xpoid_att_medium_source_sizes_supported, msss); - - tm = XpGetTrayMediumListAttr(pContext, XPPrinterAttr, - xpoid_att_input_trays_medium, - valid_trays, msss); - XpPutTrayMediumListAttr(pContext, XPPrinterAttr, - xpoid_att_input_trays_medium, tm); - - XpOidMediumSSDelete(pool_msss); - XpOidTrayMediumListDelete(tm); -} - - -void -XpValidatePrinterPool(XpContextPtr pContext, - const XpValidatePoolsRec* vpr) -{ - /* - * content-orientations-supported - */ - XpValidateListAttr(pContext, XPPrinterAttr, - xpoid_att_content_orientations_supported, - vpr->valid_content_orientations_supported, - vpr->default_content_orientations_supported); - /* - * document-formats-supported - */ - XpValidateDocFmtListAttr(pContext, XPPrinterAttr, - xpoid_att_document_formats_supported, - vpr->valid_document_formats_supported, - vpr->default_document_formats_supported); - /* - * plexes-supported - */ - XpValidateListAttr(pContext, XPPrinterAttr, xpoid_att_plexes_supported, - vpr->valid_plexes_supported, - vpr->default_plexes_supported); - /* - * printer-resolutions-supported - */ - XpValidateCardListAttr(pContext, XPPrinterAttr, - xpoid_att_printer_resolutions_supported, - vpr->valid_printer_resolutions_supported, - vpr->default_printer_resolutions_supported); - /* - * xp-embedded-formats-supported - */ - XpValidateDocFmtListAttr(pContext, XPPrinterAttr, - xpoid_att_xp_embedded_formats_supported, - vpr->valid_xp_embedded_formats_supported, - vpr->default_xp_embedded_formats_supported); - /* - * xp-listfonts-modes-supported - */ - XpValidateListAttr(pContext, XPPrinterAttr, - xpoid_att_xp_listfonts_modes_supported, - vpr->valid_xp_listfonts_modes_supported, - vpr->default_xp_listfonts_modes_supported); - /* - * xp-raw-formats-supported - */ - XpValidateDocFmtListAttr(pContext, XPPrinterAttr, - xpoid_att_xp_raw_formats_supported, - vpr->valid_xp_raw_formats_supported, - vpr->default_xp_raw_formats_supported); - /* - * xp-setup-proviso - */ - XpValidateOidAttr(pContext, XPPrinterAttr, xpoid_att_xp_setup_proviso, - vpr->valid_xp_setup_proviso, xpoid_none); - /* - * medium-source-sizes-supported - * input-trays-mdeium - */ - XpValidatePrinterMediaAttrs(pContext, - vpr->valid_input_trays, - vpr->valid_medium_sizes); - /* - * available-compressions-supported - */ - XpValidateListAttr(pContext, XPPrinterAttr, - xpoid_att_available_compressions_supported, - vpr->valid_available_compressions_supported, - vpr->default_available_compressions_supported); -} - - -void -XpValidateNotificationProfile(XpContextPtr pContext) -{ - const char* value_in; - const char* value_out; - - value_in = XpGetStringAttr(pContext, XPJobAttr, - xpoid_att_notification_profile); - value_out = XpOidNotifyString(XpOidNotifyParse(value_in)); - XpPutStringAttr(pContext, XPJobAttr, - xpoid_att_notification_profile, value_out); -} - -void -XpValidateJobPool(XpContextPtr pContext, - const XpValidatePoolsRec* vpr) -{ - /* - * Note: the 'vpr' argument is unused in this - * implementation; it is reserved for future use - */ - XpOidList* job_attrs_supported; - /* - * only validate attributes found in job-attributes-supported - */ - job_attrs_supported = XpGetListAttr(pContext, XPPrinterAttr, - xpoid_att_job_attributes_supported, - (const XpOidList*)NULL); - /* - * notification-profile - */ - if(XpOidListHasOid(job_attrs_supported, xpoid_att_notification_profile)) - { - XpValidateNotificationProfile(pContext); - } - /* - * clean up - */ - XpOidListDelete(job_attrs_supported); -} - - -static void -XpValidateDocOrPagePool(XpContextPtr pContext, - XPAttributes pool, /* XPDocAttr or XPPageAttr */ - const XpOidList* attrs_supported, - const XpValidatePoolsRec* vpr) -{ - /* - * content-orientation - */ - if(XpOidListHasOid(attrs_supported, xpoid_att_content_orientation)) - { - XpOidList* content_orientations_supported; - content_orientations_supported = - XpGetListAttr(pContext, XPPrinterAttr, - xpoid_att_content_orientations_supported, - vpr->valid_content_orientations_supported); - XpValidateOidAttr(pContext, pool, xpoid_att_content_orientation, - content_orientations_supported, xpoid_none); - XpOidListDelete(content_orientations_supported); - } - /* - * copy-count - */ - if(XpOidListHasOid(attrs_supported, xpoid_att_copy_count)) - XpValidateCardAttr(pContext, pool, xpoid_att_copy_count, - (const XpOidCardList*)NULL, 0); - /* - * default-printer-resolution - */ - if(XpOidListHasOid(attrs_supported, xpoid_att_default_printer_resolution)) - { - XpOidCardList* printer_resolutions_supported; - printer_resolutions_supported = - XpGetCardListAttr(pContext, XPPrinterAttr, - xpoid_att_printer_resolutions_supported, - vpr->valid_printer_resolutions_supported); - XpValidateCardAttr(pContext, pool, - xpoid_att_default_printer_resolution, - printer_resolutions_supported, 0); - XpOidCardListDelete(printer_resolutions_supported); - } - /* - * default-input-tray - */ - if(XpOidListHasOid(attrs_supported, xpoid_att_default_input_tray)) - { - XpOidTrayMediumList* input_trays_medium; - const char* value_in; - XpOid value_tray; - - input_trays_medium = - XpGetTrayMediumListAttr(pContext, XPPrinterAttr, - xpoid_att_input_trays_medium, - (const XpOidList*)NULL, - (const XpOidMediumSS*)NULL); - value_in = - XpGetStringAttr(pContext, pool, xpoid_att_default_input_tray); - value_tray = XpOidFromString(value_in); - if(!XpOidTrayMediumListHasTray(input_trays_medium, value_tray)) - value_tray = xpoid_none; - XpPutOidAttr(pContext, pool, xpoid_att_default_input_tray, value_tray); - XpOidTrayMediumListDelete(input_trays_medium); - } - /* - * default-medium - */ - if(XpOidListHasOid(attrs_supported, xpoid_att_default_medium)) - { - XpOidMediumSS* msss; - const char* value_in; - XpOid value_size; - - msss = XpGetMediumSSAttr(pContext, XPPrinterAttr, - xpoid_att_medium_source_sizes_supported, - (const XpOidList*)NULL, - (const XpOidList*)NULL); - value_in = XpGetStringAttr(pContext, pool, xpoid_att_default_medium); - value_size = XpOidFromString(value_in); - if(!XpOidMediumSSHasSize(msss, value_size)) - value_size = xpoid_none; - XpPutOidAttr(pContext, pool, xpoid_att_default_medium, value_size); - XpOidMediumSSDelete(msss); - } - /* - * document-format - */ - if(XpOidListHasOid(attrs_supported, xpoid_att_document_format)) - { - XpOidDocFmtList* document_formats_supported; - const char* value_in; - XpOidDocFmt* document_format; - const char* value_out; - - document_formats_supported = - XpGetDocFmtListAttr(pContext, XPPrinterAttr, - xpoid_att_document_formats_supported, - vpr->valid_document_formats_supported); - value_in = XpGetStringAttr(pContext, pool, xpoid_att_document_format); - document_format = XpOidDocFmtNew(value_in); - if(XpOidDocFmtListHasFmt(document_formats_supported, document_format)) - value_out = XpOidDocFmtString(document_format); - else - value_out = XpOidDocFmtString(vpr->default_document_format); - XpOidDocFmtListDelete(document_formats_supported); - XpOidDocFmtDelete(document_format); - XpPutStringAttr(pContext, pool, xpoid_att_document_format, value_out); - XpOidFree(value_out); - } - /* - * plex - */ - if(XpOidListHasOid(attrs_supported, xpoid_att_plex)) - { - XpOidList* plexes_supported; - plexes_supported = - XpGetListAttr(pContext, XPPrinterAttr, xpoid_att_plexes_supported, - vpr->valid_plexes_supported); - XpValidateOidAttr(pContext, pool, xpoid_att_plex, - plexes_supported, xpoid_none); - XpOidListDelete(plexes_supported); - } - /* - * xp-listfonts-modes - */ - if(XpOidListHasOid(attrs_supported, xpoid_att_xp_listfonts_modes)) - { - XpOidList* xp_listfonts_modes_supported; - xp_listfonts_modes_supported = - XpGetListAttr(pContext, XPPrinterAttr, - xpoid_att_xp_listfonts_modes_supported, - vpr->valid_xp_listfonts_modes_supported); - XpValidateListAttr(pContext, pool, xpoid_att_xp_listfonts_modes, - xp_listfonts_modes_supported, - (const XpOidList*)NULL); - XpOidListDelete(xp_listfonts_modes_supported); - } - /* - * available-compressions - */ - if(XpOidListHasOid(attrs_supported, xpoid_att_available_compression)) - { - XpOidList* available_compressions_supported; - available_compressions_supported = - XpGetListAttr(pContext, XPPrinterAttr, - xpoid_att_available_compressions_supported, - vpr->valid_available_compressions_supported); - XpValidateOidAttr(pContext, pool, xpoid_att_available_compression, - available_compressions_supported, xpoid_none); - XpOidListDelete(available_compressions_supported); - } -} - -void -XpValidateDocumentPool(XpContextPtr pContext, - const XpValidatePoolsRec* vpr) -{ - XpOidList* document_attrs_supported; - /* - * only validate attributes found in document-attributes-supported - */ - document_attrs_supported = - XpGetListAttr(pContext, XPPrinterAttr, - xpoid_att_document_attributes_supported, - (const XpOidList*)NULL); - /* - * validate - */ - XpValidateDocOrPagePool(pContext, XPDocAttr, - document_attrs_supported, vpr); - /* - * clean up - */ - XpOidListDelete(document_attrs_supported); -} - -void -XpValidatePagePool(XpContextPtr pContext, - const XpValidatePoolsRec* vpr) -{ - XpOidList* page_attrs_supported; - /* - * only validate attributes found in xp-page-attributes-supported - */ - page_attrs_supported = - XpGetListAttr(pContext, XPPrinterAttr, - xpoid_att_xp_page_attributes_supported, - (const XpOidList*)NULL); - /* - * validate - */ - XpValidateDocOrPagePool(pContext, XPPageAttr, - page_attrs_supported, vpr); - /* - * clean up - */ - XpOidListDelete(page_attrs_supported); -} - -void -XpValidateAttributePool(XpContextPtr pContext, - XPAttributes pool, - const XpValidatePoolsRec* vpr) -{ - switch(pool) - { - case XPPrinterAttr: - XpValidatePrinterPool(pContext, vpr); - break; - - case XPDocAttr: - XpValidateDocumentPool(pContext, vpr); - break; - - case XPJobAttr: - XpValidateJobPool(pContext, vpr); - break; - - case XPPageAttr: - XpValidatePagePool(pContext, vpr); - break; - - default: - break; - } -} diff --git a/hw/xprint/AttrValid.h b/hw/xprint/AttrValid.h deleted file mode 100644 index 7bb7ce1c8..000000000 --- a/hw/xprint/AttrValid.h +++ /dev/null @@ -1,219 +0,0 @@ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _Xp_AttrValid_h -#define _Xp_AttrValid_h - -#include -#include "Oid.h" - -#define XpNumber(a) (sizeof(a) / sizeof(*(a))) - -/* - * Attribute pool validation valid values and defaults - */ -typedef struct -{ - XpOidList* valid_content_orientations_supported; - XpOidList* default_content_orientations_supported; - - XpOidDocFmtList* valid_document_formats_supported; - XpOidDocFmtList* default_document_formats_supported; - - XpOidList* valid_input_trays; - XpOidList* valid_medium_sizes; - - XpOidList* valid_plexes_supported; - XpOidList* default_plexes_supported; - - XpOidCardList* valid_printer_resolutions_supported; - XpOidCardList* default_printer_resolutions_supported; - - XpOidDocFmtList* valid_xp_embedded_formats_supported; - XpOidDocFmtList* default_xp_embedded_formats_supported; - - XpOidList* valid_xp_listfonts_modes_supported; - XpOidList* default_xp_listfonts_modes_supported; - - XpOidDocFmtList* valid_xp_raw_formats_supported; - XpOidDocFmtList* default_xp_raw_formats_supported; - - XpOidList* valid_xp_setup_proviso; - - XpOidDocFmt* default_document_format; - XpOidList* valid_available_compressions_supported; - XpOidList* default_available_compressions_supported; - -} XpValidatePoolsRec; - -/* - * XpOid resource access - */ -#define XpGetStringAttr(pContext, pool, oid) \ - (const char*)XpGetOneAttribute(pContext, pool, (char*)XpOidString(oid)) -#define XpPutStringAttr(pContext, pool, oid, value) \ - XpPutOneAttribute(pContext, pool, XpOidString(oid), value) - -#ifdef _XP_PRINT_SERVER_ /* needed for XpContextPtr in Printstr.h */ - -/* - * XpOid-valued attribute access - */ -XpOid XpGetOidAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidList* valid_oid_list); -void XpPutOidAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - XpOid value_oid); -void XpValidateOidAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidList* valid_oids, - XpOid default_oid); -/* - * cardinal-valued attribute access - */ -unsigned long XpGetCardAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidCardList* valid_card_list); -void XpPutCardAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - unsigned long value_card); -void XpValidateCardAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidCardList* valid_cards, - unsigned long default_card); -/* - * XpOidList-valued attribute access - */ -XpOidList* XpGetListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidList* valid_oid_list); -void XpPutListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidList* list); -void XpValidateListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidList* valid_oids, - const XpOidList* default_oids); -/* - * XpOidCardList-valued attribute access - */ -XpOidCardList* XpGetCardListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidCardList* valid_card_list); -void XpPutCardListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidCardList* list); -void XpValidateCardListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidCardList* valid_cards, - const XpOidCardList* default_cards); -/* - * XpOidDocFmtList-valued attribute access - */ -XpOidDocFmtList* XpGetDocFmtListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidDocFmtList* valid_fmt_list); -void XpPutDocFmtListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidDocFmtList* list); -void XpValidateDocFmtListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidDocFmtList* valid_fmts, - const XpOidDocFmtList* default_fmts); -/* - * XpOidMediumSS-valued attribute access - */ -XpOidMediumSS* XpGetMediumSSAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidList* valid_trays, - const XpOidList* valid_sizes); -void XpPutMediumSSAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidMediumSS* msss); -const XpOidMediumSS* XpGetDefaultMediumSS(void); - -/* - * XpOidTrayMediumList-valued attribute access - */ -XpOidTrayMediumList* XpGetTrayMediumListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidList* valid_trays, - const XpOidMediumSS* msss); -void XpPutTrayMediumListAttr(XpContextPtr pContext, - XPAttributes pool, - XpOid oid, - const XpOidTrayMediumList* tm); -void XpValidatePrinterMediaAttrs(XpContextPtr pContext, - const XpOidList* valid_trays, - const XpOidList* valid_sizes); -/* - * Attribute pool validation - */ -void XpValidateAttributePool(XpContextPtr pContext, - XPAttributes pool, - const XpValidatePoolsRec* vpr); -void XpValidatePrinterPool(XpContextPtr pContext, - const XpValidatePoolsRec* vpr); -void XpValidateNotificationProfile(XpContextPtr pContext); -void XpValidateJobPool(XpContextPtr pContext, - const XpValidatePoolsRec* vpr); -void XpValidateDocumentPool(XpContextPtr pContext, - const XpValidatePoolsRec* vpr); -void XpValidatePagePool(XpContextPtr pContext, - const XpValidatePoolsRec* vpr); - -#endif /* _XP_PRINT_SERVER_ */ - -#endif /* _Xp_AttrValid_h - don't add anything after this line */ diff --git a/hw/xprint/DiPrint.h b/hw/xprint/DiPrint.h deleted file mode 100644 index 22cbf0d43..000000000 --- a/hw/xprint/DiPrint.h +++ /dev/null @@ -1,85 +0,0 @@ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ -/* - * The XpDiListEntry struct is the type of each element of the array - * handed back to the extension code to handle a GetPrinterList request. - * We don't use the printerDb directly because of the desire to handle - * multiple locales. Creating this new array for each GetPrinterList - * request will allow us to build it with the description in the locale of - * the requesting client. - */ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif -#include - -#ifndef _XpDiPrint_H_ -#define _XpDiPrint_H_ 1 - -#include "scrnintstr.h" - -typedef struct _diListEntry { - char *name; - char *description; - char *localeName; - unsigned long rootWinId; -} XpDiListEntry; - -extern void XpDiFreePrinterList(XpDiListEntry **list); - -extern XpDiListEntry **XpDiGetPrinterList( - int nameLen, - char *name, - int localeLen, - char *locale); - -extern char * XpDiGetDriverName(int index, char *printerName); - -extern WindowPtr XpDiValidatePrinter(char *printerName, int printerNameLen); - -extern int PrinterOptions(int argc, char **argv, int i); - -extern void PrinterUseMsg(void); - -extern void PrinterInitGlobals(void); - -extern void PrinterInitOutput(ScreenInfo *pScreenInfo, int argc, char **argv); - -extern Bool XpClientIsPrintClient(ClientPtr client, FontPathElementPtr fpe); - -extern Bool XpClientIsBitmapClient(ClientPtr client); - -extern void _XpVoidNoop(void); - -extern Bool _XpBoolNoop(void); - -#endif /* _XpDiPrint_H_ */ diff --git a/hw/xprint/Init.c b/hw/xprint/Init.c deleted file mode 100644 index 69100d390..000000000 --- a/hw/xprint/Init.c +++ /dev/null @@ -1,1920 +0,0 @@ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996-2004 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. -(c) Copyright 2003-2004 Roland Mainz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ -/******************************************************************* -** -** ********************************************************* -** * -** * File: printer/Init.c -** * -** * Contents: -** * The InitOutput routine here would presumably -** * be called from the normal server's InitOutput -** * after all display screens have been added. -** * There is are ifdef'd routines suitable for -** * use in building a printer-only server. Turn -** * on the "PRINTER_ONLY_SERVER" define if this is -** * to be the only ddx-level driver. -** * -** * Copyright: Copyright 1993,1995 Hewlett-Packard Company -** * -** ********************************************************* -** -********************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef __hpux -#include -#endif - -#include -#define NEED_EVENTS 1 -#include -#include - -#include "screenint.h" -#include "input.h" -#include "cursor.h" -#include "misc.h" -#include "windowstr.h" -#include "inputstr.h" - -#include "gcstruct.h" -#include -#include "errno.h" - -typedef char *XPointer; -#define HAVE_XPointer 1 - -#define Status int -#include - -#include "DiPrint.h" -#include "attributes.h" - -#include "os.h" -#include "spooler.h" - -static void GenericScreenInit( - int index, - ScreenPtr pScreen, - int argc, - char **argv); -static Bool InitPrintDrivers( - int index, - ScreenPtr pScreen, - int argc, - char **argv); - -/* - * The following two defines are used to build the name "X*printers", where - * the "*" is replaced by the display number. This is used to construct - * the name of the default printers configuration file if the -XpFile - * command line option was not specified. - */ -#define XNPRINTERSFILEPREFIX "/X" -#define XNPRINTERSFILESUFFIX "printers" -#define XPRINTERSFILENAME "Xprinters" - -#define MODELDIRNAME "/models" -#define FONTDIRNAME "/fonts" - -#ifdef XPRASTERDDX - -static -PixmapFormatRec RasterPixmapFormats[] = { - { 1, 1, BITMAP_SCANLINE_PAD } -}; -#define NUMRASTFORMATS (sizeof RasterPixmapFormats)/(sizeof RasterPixmapFormats[0]) - -#include "raster/Raster.h" - -#endif - -#ifdef XPPCLDDX - -static -PixmapFormatRec ColorPclPixmapFormats[] = { - { 1, 1, BITMAP_SCANLINE_PAD }, - { 8, 8, BITMAP_SCANLINE_PAD }, - { 24, 32, BITMAP_SCANLINE_PAD } -}; - -#define NUMCPCLFORMATS (sizeof ColorPclPixmapFormats)/(sizeof ColorPclPixmapFormats[0]) - -#endif - -#ifdef XPMONOPCLDDX - -static -PixmapFormatRec MonoPclPixmapFormats[] = { - { 1, 1, BITMAP_SCANLINE_PAD } -}; - -#define NUMMPCLFORMATS (sizeof MonoPclPixmapFormats)/(sizeof MonoPclPixmapFormats[0]) - -#endif - -#if defined(XPPCLDDX) || defined(XPMONOPCLDDX) -#include "pcl/Pcl.h" -#endif - -#ifdef XPPSDDX - -static -PixmapFormatRec PSPixmapFormats[] = { - { 1, 1, BITMAP_SCANLINE_PAD }, - { 8, 8, BITMAP_SCANLINE_PAD }, - { 12, 16, BITMAP_SCANLINE_PAD }, - { 14, 16, BITMAP_SCANLINE_PAD }, - { 16, 16, BITMAP_SCANLINE_PAD }, - { 24, 32, BITMAP_SCANLINE_PAD } -}; - -#define NUMPSFORMATS (sizeof PSPixmapFormats)/(sizeof PSPixmapFormats[0]) - -#include "ps/Ps.h" - -#endif - -/* - * The driverInitArray contains an entry for each driver the - * server knows about. Each element contains pointers to pixmap formats, the - * driver's initialization routine, and pointers to the driver's - * attribute validation rec, and/or a driver function which - * returns the maximum medium width&height, and maximum resolution - * given a printer name. Either the validation rec OR the dimension - * function can be NULL. If the function is non-NULL then it - * will be called, and will be passed the (possibly NULL) validation rec. - * If the function is NULL, then XpGetMaxWidthHeightRes() is called. - */ -typedef struct _driverInitRec { - char *driverName; - pBFunc initFunc; - XpValidatePoolsRec *pValRec; - pVFunc dimensionsFunc; - PixmapFormatRec *pFmts; - int numFmts; -} driverInitRec; - -static driverInitRec driverInits[] = { -#ifdef XPRASTERDDX - { - "XP-RASTER", - InitializeRasterDriver, - &RasterValidatePoolsRec, - (pVFunc) NULL, - RasterPixmapFormats, - NUMRASTFORMATS - }, -#endif -#ifdef XPPCLDDX - { - "XP-PCL-COLOR", - InitializeColorPclDriver, - &PclValidatePoolsRec, - (pVFunc) NULL, - ColorPclPixmapFormats, - NUMCPCLFORMATS - }, -#endif -#ifdef XPMONOPCLDDX - { - "XP-PCL-MONO", - InitializeMonoPclDriver, - &PclValidatePoolsRec, - (pVFunc) NULL, - MonoPclPixmapFormats, - NUMMPCLFORMATS - }, -#endif -#ifdef XPPSDDX - { - "XP-POSTSCRIPT", - InitializePsDriver, - &PsValidatePoolsRec, - (pVFunc) NULL, - PSPixmapFormats, - NUMPSFORMATS - }, -#endif -}; - - -/* - * The printerDb variable points to a list of PrinterDbEntry structs - * which map printer names with screen numbers and driver names. - */ -typedef struct _printerDbEntry { - struct _printerDbEntry *next; - char *name; - char *qualifier; - int screenNum; - char *driverName; - char *desc; -} PrinterDbEntry, *PrinterDbPtr; - -static PrinterDbPtr printerDb = (PrinterDbPtr)NULL; - -/* - * The nameMap is a list used in initializing the attribute store - * for each printer. The list is freed once the printerDb is built - * and the attribute stores for all printers have been initialized. - */ -typedef struct _nameMapEntry { - struct _nameMapEntry *next; - char *name; - char *qualifier; -} NameMapEntry, *NameMapPtr; - -static NameMapPtr nameMap = (NameMapPtr)NULL; - -/* - * The driverMap is a list which provides the mapping between driver names - * and screen numbers. It is built and used - * by RehashPrinterList to correctly fill in the screenNum field in the - * printerDb entries. The list is freed before RehashPrinterList terminates. - */ -typedef struct _driverMapping { - struct _driverMapping *next; - char *driverName; - int screenNum; -} DriverMapEntry, *DriverMapPtr; - -static const char configFilePath[] = -"/etc/dt/config/print:/usr/dt/config/print"; - -static const char printServerConfigDir[] = "XPSERVERCONFIGDIR"; - -static char *configFileName = (char *)NULL; -static Bool freeDefaultFontPath = FALSE; -static char *origFontPath = (char *)NULL; - -static Bool xprintInitGlobalsCalled = FALSE; -/* - * This function is responsible for doing initalisation of any global - * variables at an very early point of server startup (even before - * |ProcessCommandLine()|. - */ -void PrinterInitGlobals(void) -{ - xprintInitGlobalsCalled = TRUE; - -#ifdef DAMAGE - /* Disable DAMAGE extension for now as it does not work with - * the Postscript DDX yet (see - * https://bugs.freedesktop.org/show_bug.cgi?id=1660) ... - * (you can enable the DAMAGE extension explicitly via - * % X +extension DAMAGE ... #) ;-( */ - noDamageExtension = TRUE; -#endif /* DAMAGE */ - -#ifdef SMART_SCHEDULE - /* Somehow the XF86 "smart scheduler" completely kills the Xprint DDX - * (see http://xprint.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=467 - * ("Xfree86's "smart scheduler" breaks Xprt") */ - SmartScheduleDisable = TRUE; -#endif /* SMART_SCHEDULE */ - - /* Disable internal screensaver for Xprint (workaround for - * http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=567 ("Xorg - * Xprt starts to consume 100% CPU when being idle for some time")) */ - defaultScreenSaverTime = 0; - - /* Ensure that the maximum request size for the BIGREQUESTS extension - * is at least 8MB (see - * http://xprint.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=622 - "RFE: - * Xprt's default BIGREQUESTS extension buffer size should be 8MB") - */ - maxBigRequestSize = (8*1048576)-1; - - /* Xprt should not reset by default when the last client exists - * (default for Xprt is |0|, video Xservers use |DE_RESET|) */ - dispatchExceptionAtReset = 0; -} - -/* - * PrinterUseMsg() prints usage for the Xprint-specific options - */ -void PrinterUseMsg(void) -{ - XpSpoolerTypePtr curr = xpstm; - - /* Option '-XpFile' */ - ErrorF("-XpFile file specifies an alternate `Xprinters' file, rather\n"); - ErrorF(" than the default one (e.g.\n"); - ErrorF(" `${XPCONFIGDIR}/${LANG}/print/Xprinters') or\n"); - ErrorF(" `${XPCONFIGDIR}/C/print/Xprinters'.\n"); - - /* Option '-XpSpoolerType' */ - ErrorF("-XpSpoolerType string specifies a spooler type.\n"); - ErrorF(" Supported values are:\n"); - - while( curr->name != NULL ) - { - ErrorF(" - '%s'\n", curr->name); - curr++; - } - ErrorF(" (multiple values can be specified, seperated by ':',\n"); - ErrorF(" the first active spooler will be chosen).\n"); - ErrorF(" default is '%s'.\n", XPDEFAULTSPOOLERNAMELIST); -} - -/* - * PrinterOptions checks argv[i] to see if it is our command line - * option specifying a configuration file name. It returns the index - * of the next option to process. - */ -int -PrinterOptions( - int argc, - char **argv, - int i) -{ - if(strcmp(argv[i], "-XpFile") == 0) - { - if ((i + 1) >= argc) { - ddxUseMsg (); - return i + 2; - } - configFileName = argv[i + 1]; - return i + 2; - } - else if(strcmp(argv[i], "-XpSpoolerType") == 0) - { - if ((i + 1) >= argc) { - ddxUseMsg (); - return i + 2; - } - XpSetSpoolerTypeNameList(argv[i + 1]); - return i + 2; - } - else - { - return i; - } -} - -/************************************************************ - * GetInitFunc -- - * - * This routine is called from the InitPrintDrivers function. - * Given the name of a driver, return a pointer to the driver's - * initialization function. - * - * Results: - * Returns a pointer to the initialization function for the driver. - * - * - ************************************************************/ - -/* -typedef Bool (*pIFunc)(); -static pIFunc -GetInitFunc(driverName) -*/ - -static pBFunc GetInitFunc(char *driverName) -{ - driverInitRec *pInitRec; - int numDrivers = sizeof(driverInits)/sizeof(driverInitRec); - int i; - - for(pInitRec = driverInits, i = 0; i < numDrivers; pInitRec++, i++) - { - if( !strcmp( driverName, pInitRec->driverName ) ) - return pInitRec->initFunc; - } - - return 0; -} - -static void -GetDimFuncAndRec( - char *driverName, - XpValidatePoolsRec **pValRec, - pVFunc *dimensionsFunc) -{ - driverInitRec *pInitRec; - int numDrivers = sizeof(driverInits)/sizeof(driverInitRec); - int i; - - for(pInitRec = driverInits, i = 0; i < numDrivers; pInitRec++, i++) - { - if( !strcmp( driverName, pInitRec->driverName ) ) - { - *dimensionsFunc = pInitRec->dimensionsFunc; - *pValRec = pInitRec->pValRec; - return ; - } - } - - *dimensionsFunc = 0; - *pValRec = 0; - return; -} - -static void -FreePrinterDb(void) -{ - PrinterDbPtr pCurEntry, pNextEntry; - - for(pCurEntry = printerDb, pNextEntry = (PrinterDbPtr)NULL; - pCurEntry != (PrinterDbPtr)NULL; pCurEntry = pNextEntry) - { - pNextEntry = pCurEntry->next; - if(pCurEntry->name != (char *)NULL) - xfree(pCurEntry->name); - if(pCurEntry->desc != (char *)NULL) - xfree(pCurEntry->desc); - /* - * We don't free the driver name, because it's expected to simply - * be a pointer into the xrm database. - */ - xfree(pCurEntry); - } - printerDb = (PrinterDbPtr)NULL; -} - -/* - * AddPrinterDbName allocates an entry in the printerDb list, and - * initializes the "name". It returns TRUE if the element was - * successfully added, and FALSE if an allocation error ocurred. - * XXX AddPrinterDbName needs to check for (and not add) duplicate names. - */ -static Bool -AddPrinterDbName(char *name, char *desc) -{ - PrinterDbPtr pEntry = (PrinterDbPtr)xalloc(sizeof(PrinterDbEntry)); - - if(pEntry == (PrinterDbPtr)NULL) return FALSE; - pEntry->name = (name != NULL) ? strdup(name) : NULL; - pEntry->desc = (desc != NULL) ? strdup(desc) : NULL; - pEntry->qualifier = (char *)NULL; - - if(printerDb == (PrinterDbPtr)NULL) - { - pEntry->next = (PrinterDbPtr)NULL; - printerDb = pEntry; - } - else - { - pEntry->next = printerDb; - printerDb = pEntry; - } - return TRUE; -} - -static int -AugmentPrinterDb(const char *command) -{ - FILE *fp; - char name[256]; - int num_printers = 0; /* Number of printers we found */ - size_t namelen; - char *desc = NULL; - - fp = popen(command, "r"); - /* XXX is a 256 character limit overly restrictive for printer names? */ - while(fgets(name, 256, fp) != (char *)NULL && (namelen=strlen(name))) - { - char *option = name; - - name[namelen-1] = (char)'\0'; /* strip the \n */ - -#define XP_DESCRIPTOR "xp-printerattr.descriptor=" -#define XP_DESCRIPTOR_LEN (sizeof(XP_DESCRIPTOR)-1) - while ((option = strchr(option, '\t'))) { - option++; /* Skip the '\t' */ - if (!strncmp(option, XP_DESCRIPTOR, XP_DESCRIPTOR_LEN)) { - *(option-1) = '\0'; /* Kill the '\t' (only if we found a valid option) */ - option += XP_DESCRIPTOR_LEN; - if (*option != '\0') { - desc = option; - } - } - else - { - /* Unknown option */ - ErrorF("AugmentPrinterDb: Unknown option '%s'\n", option); - } - } - AddPrinterDbName(name, desc); - num_printers++; - } - pclose(fp); - return num_printers; -} - -/* - * FreeNameMap frees all remaining memory associated with the nameMap. - */ -static void -FreeNameMap(void) -{ - NameMapPtr pEntry, pTmp; - - for(pEntry = nameMap, pTmp = (NameMapPtr)NULL; - pEntry != (NameMapPtr)NULL; - pEntry = pTmp) - { - if(pEntry->name != (char *)NULL) - xfree(pEntry->name); - if(pEntry->qualifier != (char *)NULL) - xfree(pEntry->qualifier); - pTmp = pEntry->next; - xfree(pEntry); - } - nameMap = (NameMapPtr)NULL; -} - -/* - * AddNameMap adds an element to the nameMap linked list. - */ -static Bool -AddNameMap(char *name, char *qualifier) -{ - NameMapPtr pEntry; - - if((pEntry = (NameMapPtr)xalloc(sizeof(NameMapEntry))) == (NameMapPtr)NULL) - return FALSE; - pEntry->name = name; - pEntry->qualifier = qualifier; - pEntry->next = nameMap; - nameMap = pEntry; - return TRUE; -} - -/* - * MergeNameMap - puts the "map" names (aka qualifiers, aliases) into - * the printerDb. This should be called once, after both the printerDb - * and nameMap lists are complete. When/if MergeNameMap finds a map for - * an entry in the printerDb, the qualifier is _moved_ (not copied) to - * the printerDb. This means that the qualifier pointer in the nameMap - * is NULLed out. - */ -static void -MergeNameMap(void) -{ - NameMapPtr pMap; - PrinterDbPtr pDb; - - for(pMap = nameMap; pMap != (NameMapPtr)NULL; pMap = pMap->next) - { - for(pDb = printerDb; pDb != (PrinterDbPtr)NULL; pDb = pDb->next) - { - if(!strcmp(pMap->name, pDb->name)) - { - pDb->qualifier = pMap->qualifier; - pMap->qualifier = (char *)NULL; - } - } - } -} - -/* - * CreatePrinterAttrs causes the attribute stores to be built for - * each printer in the printerDb. - */ -static void -CreatePrinterAttrs(void) -{ - PrinterDbPtr pDb; - - for(pDb = printerDb; pDb != (PrinterDbPtr)NULL; pDb = pDb->next) - { - XpBuildAttributeStore(pDb->name, (pDb->qualifier)? - pDb->qualifier : pDb->name); - } -} - -#ifdef XPPSDDX -#define defaultDriver "XP-POSTSCRIPT" -#else -#ifdef XPPCLDDX -#define defaultDriver "XP-PCL-COLOR" -#else -#ifdef XPMONOPCLDDX -#define defaultDriver "XP-PCL-MONO" -#else -#define defaultDriver "XP-RASTER" -#endif -#endif -#endif - -/* - * StoreDriverNames - queries the attribute store for the ddx-identifier. - * if the ddx-identifier is not in the attribute database, then a default - * ddx-identifier is store in both the attribute store for the printer, - * and in the printerDb. - * The ddx-identifier is stored in the printerDb for use in initializing - * the screens. - */ -static void -StoreDriverNames(void) -{ - PrinterDbPtr pEntry; - - for(pEntry = printerDb; pEntry != (PrinterDbPtr)NULL; - pEntry = pEntry->next) - { - pEntry->driverName = (char*)XpGetPrinterAttribute(pEntry->name, - "xp-ddx-identifier"); - if(pEntry->driverName == (char *)NULL || - strlen(pEntry->driverName) == 0 || - GetInitFunc(pEntry->driverName) == (Bool(*)())NULL) - { - if (pEntry->driverName && (strlen(pEntry->driverName) != 0)) { - ErrorF("Xp Extension: Can't load driver %s\n", - pEntry->driverName); - ErrorF(" init function missing\n"); - } - - pEntry->driverName = defaultDriver; - XpAddPrinterAttribute(pEntry->name, - (pEntry->qualifier != (char *)NULL)? - pEntry->qualifier : pEntry->name, - "*xp-ddx-identifier", pEntry->driverName); - } - } -} - -/* - * StoreDescriptors - queries the attribute store for the descriptor. - * if the descriptor is not in the attribute database, then the descriptor - * from the printerDb is store in the attribute store for the printer. - */ -static void -StoreDescriptors(void) -{ - PrinterDbPtr pEntry; - - for(pEntry = printerDb; pEntry != (PrinterDbPtr)NULL; - pEntry = pEntry->next) - { - if (pEntry->desc != NULL) - { - XpAddPrinterAttribute(pEntry->name, - (pEntry->qualifier != (char *)NULL)? - pEntry->qualifier : pEntry->name, - "*descriptor", pEntry->desc); - } - } -} - -static char * -MbStrchr( - char *str, - int ch) -{ - size_t mbCurMax = MB_CUR_MAX; - wchar_t targetChar, curChar; - char tmpChar; - int i, numBytes, byteLen; - - if(mbCurMax <= 1) return strchr(str, ch); - - tmpChar = (char)ch; - mbtowc(&targetChar, &tmpChar, mbCurMax); - for(i = 0, numBytes = 0, byteLen = strlen(str); i < byteLen; i += numBytes) - { - numBytes = mbtowc(&curChar, &str[i], mbCurMax); - if(curChar == targetChar) return &str[i]; - } - return (char *)NULL; -} - -/* - * GetConfigFileName - Looks for a "Xprinters" file in - * $(XPRINTDIR)/$LANG/print, and then in $(XPRINTDIR)/C/print. If it - * finds such a file, it returns the path to the file. The returned - * string must be freed by the caller. - */ -static char * -GetConfigFileName(void) -{ - /* - * We need to find the system-wide file, if one exists. This - * file can be in either $(XPRINTDIR)/$LANG/print, or in - * $(PRINTDIR)/C/print, and the file itself is named "Xprinters". - */ - char *dirName, *filePath; - - /* - * Check for a LANG-specific file. - */ - if((dirName = XpGetConfigDir(TRUE))) - { - filePath = (char *)xalloc(strlen(dirName) + - strlen(XPRINTERSFILENAME) + 2); - - if(filePath == (char *)NULL) - { - xfree(dirName); - return (char *)NULL; - } - - sprintf(filePath, "%s/%s", dirName, XPRINTERSFILENAME); - xfree(dirName); - if(access(filePath, R_OK) == 0) - return filePath; - - xfree(filePath); - } - - if((dirName = XpGetConfigDir(FALSE))) - { - filePath = (char *)xalloc(strlen(dirName) + - strlen(XPRINTERSFILENAME) + 2); - if(filePath == (char *)NULL) - { - xfree(dirName); - return (char *)NULL; - } - sprintf(filePath, "%s/%s", dirName, XPRINTERSFILENAME); - xfree(dirName); - if(access(filePath, R_OK) == 0) - return filePath; - xfree(filePath); - } - return (char *)NULL; -} - -/* - * BuildPrinterDb - reads the config file if it exists, and if necessary - * executes a command such as lpstat to generate a list of printers. - * XXX - * XXX BuildPrinterDb must be rewritten to allow 16-bit characters in - * XXX printer names. The will involve replacing the use of strtok() and its - * XXX related functions. - * XXX At the same time, BuildPrinterDb and it's support routines should have - * XXX allocation error checking added. - * XXX - */ -static PrinterDbPtr -BuildPrinterDb(void) -{ - Bool defaultAugment = TRUE, freeConfigFileName; - - if(configFileName && access(configFileName, R_OK) != 0) - { - ErrorF("Xp Extension: Can't open file %s\n", configFileName); - } - if(!configFileName && (configFileName = GetConfigFileName())) - freeConfigFileName = TRUE; - else - freeConfigFileName = FALSE; - - if(configFileName != (char *)NULL && access(configFileName, R_OK) == 0) - { - char line[256]; - FILE *fp = fopen(configFileName, "r"); - - while(fgets(line, 256, fp) != (char *)NULL) - { - char *tok, *ptr; - if((tok = strtok(line, " \t\012")) != (char *)NULL) - { - if(tok[0] == (char)'#') continue; - if(strcmp(tok, "Printer") == 0) - { - while((tok = strtok((char *)NULL, " \t")) != (char *)NULL) - { - if((ptr = MbStrchr(tok, '\012'))) - *ptr = (char)'\0'; - AddPrinterDbName(tok, NULL); - } - } - else if(strcmp(tok, "Map") == 0) - { - char *name, *qualifier; - - if((tok = strtok((char *)NULL, " \t\012")) == (char *)NULL) - continue; - name = strdup(tok); - if((tok = strtok((char *)NULL, " \t\012")) == (char *)NULL) - { - xfree(name); - continue; - } - qualifier = strdup(tok); - AddNameMap(name, qualifier); - } - else if(strcmp(tok, "Augment_Printer_List") == 0) - { - if((tok = strtok((char *)NULL, " \t\012")) == (char *)NULL) - continue; - - if(strcmp(tok, "%default%") == 0) - continue; - defaultAugment = FALSE; - if(strcmp(tok, "%none%") == 0) - continue; - AugmentPrinterDb(tok); - } - else - break; /* XXX Generate an error? */ - } - } - fclose(fp); - } - - if(defaultAugment == TRUE) - { - XpSpoolerTypePtr curr_spooler_type; /* spooler we are currently probing for queues */ - int num_printers_found; /* number of printers found by |AugmentPrinterDb()| */ - char *tok_lasts; /* strtok_r() position token */ - char *spnamelist; /* list of spooler names, seperated by ":" */ - char *spname; /* spooler name */ - - spnamelist = strdup(XpGetSpoolerTypeNameList()); /* strtok_r() modifies string so dup' it first */ - - for( spname = strtok_r(spnamelist, ":", &tok_lasts) ; - spname != NULL ; - spname = strtok_r(NULL, ":", &tok_lasts) ) - { - curr_spooler_type = XpSpoolerNameToXpSpoolerType(spname); - if(!curr_spooler_type) - { - FatalError("BuildPrinterDb: No spooler type entry found for '%s'.\n", spname); - } - - if(curr_spooler_type->list_queues_command == NULL || - strlen(curr_spooler_type->list_queues_command) == 0) - { - continue; - } - - num_printers_found = AugmentPrinterDb(curr_spooler_type->list_queues_command); - /* Did we found a spooler which works ? */ - if(num_printers_found > 0) - { - spooler_type = curr_spooler_type; -#ifdef DEBUG_gisburn - fprintf(stderr, "BuildPrinterDb: using '%s'.\n", spooler_type->name); -#endif /* DEBUG_gisburn */ - break; - } - } - - free(spnamelist); - } - - MergeNameMap(); - FreeNameMap(); - - /* Create the attribute stores for all printers */ - CreatePrinterAttrs(); - - /* - * Find the drivers for each printers, and store the driver names - * in the printerDb - */ - StoreDriverNames(); - StoreDescriptors(); - - if(freeConfigFileName) - { - xfree(configFileName); - configFileName = (char *)NULL; - } - - return printerDb; -} - -static void -FreeDriverMap(DriverMapPtr driverMap) -{ - DriverMapPtr pCurEntry, pNextEntry; - - for(pCurEntry = driverMap, pNextEntry = (DriverMapPtr)NULL; - pCurEntry != (DriverMapPtr)NULL; pCurEntry = pNextEntry) - { - pNextEntry = pCurEntry->next; - if(pCurEntry->driverName != (char *)NULL) - xfree(pCurEntry->driverName); - xfree(pCurEntry); - } -} - -/* - * XpRehashPrinterList rebuilds the list of printers known to the - * server. It first walks the printerDb to build a table mapping - * driver names and screen numbers, since this is not an easy mapping - * to change in the sample server. The normal configuration files are - * then read & parsed to create the new list of printers. Printers - * which require drivers other than those already initialized are - * deleted from the printerDb. This leaves attribute stores in place - * for inaccessible printers, but those stores will be cleaned up in - * the next rehash or server recycle. - */ -int -XpRehashPrinterList(void) -{ - PrinterDbPtr pEntry, pPrev; - DriverMapPtr driverMap = (DriverMapPtr)NULL, pDrvEnt; - int result; - - /* Build driverMap */ - for(pEntry = printerDb; pEntry != (PrinterDbPtr)NULL; pEntry = pEntry->next) - { - for(pDrvEnt = driverMap; pDrvEnt != (DriverMapPtr)NULL; - pDrvEnt = pDrvEnt->next) - { - if(!strcmp(pEntry->driverName, pDrvEnt->driverName)) - break; - } - - if(pDrvEnt != (DriverMapPtr)NULL) - continue; - - if((pDrvEnt = (DriverMapPtr)xalloc(sizeof(DriverMapEntry))) == - (DriverMapPtr)NULL) - { - FreeDriverMap(driverMap); - return BadAlloc; - } - pDrvEnt->driverName = strdup(pEntry->driverName); - pDrvEnt->screenNum = pEntry->screenNum; - pDrvEnt->next = driverMap; - driverMap = pDrvEnt; - } - - /* Free the old printerDb */ - FreePrinterDb(); - - /* Free/Rehash attribute stores */ - if((result = XpRehashAttributes()) != Success) - return result; - - /* Build a new printerDb */ - if(BuildPrinterDb() == (PrinterDbPtr)NULL) - return BadAlloc; - - /* Walk PrinterDb & either store screenNum, or delete printerDb entry */ - for(pEntry = printerDb, pPrev = (PrinterDbPtr)NULL; - pEntry != (PrinterDbPtr)NULL; pEntry = pEntry->next) - { - for(pDrvEnt = driverMap; pDrvEnt != (DriverMapPtr)NULL; - pDrvEnt = pDrvEnt->next) - { - if(!strcmp(printerDb->driverName, pDrvEnt->driverName)) - break; - } - - /* - * Either store the screen number, or delete the printerDb entry. - * Deleting the entry leaves orphaned attribute stores, but they'll - * get cleaned up at the next rehash or server recycle. - */ - if(pDrvEnt != (DriverMapPtr)NULL) - { - pEntry->screenNum = pDrvEnt->screenNum; - pPrev = pEntry; - } - else { - if(pPrev) - pPrev->next = pEntry->next; - else - pPrev = pEntry->next; - if(pEntry->name != (char *)NULL) - xfree(pEntry->name); - xfree(pEntry); - pEntry = pPrev; - } - } - - FreeDriverMap(driverMap); - - return Success; -} - -/* - * ValidateFontDir looks for a valid font directory for the specified - * printer model within the specified configuration directory. It returns - * the directory name, or NULL if no valid font directory was found. - * It is the caller's responsibility to free the returned font directory - * name. - */ -static char * -ValidateFontDir( - char *configDir, - char *modelName) -{ - char *pathName; - - if(!configDir || !modelName) - return (char *)NULL; - - pathName = (char *)xalloc(strlen(configDir) + strlen(MODELDIRNAME) + - strlen(modelName) + strlen(FONTDIRNAME) + - strlen("fonts.dir") + 5); - if(!pathName) - return (char *)NULL; - sprintf(pathName, "%s/%s/%s/%s/%s", configDir, MODELDIRNAME, modelName, - FONTDIRNAME, "fonts.dir"); - if(access(pathName, R_OK) != 0) - { - xfree(pathName); - return (char *)NULL; - } - pathName[strlen(pathName) - 9] = (char)'\0'; /* erase fonts.dir */ - return pathName; -} - -/* - * FindFontDir returns a pointer to the path name of the font directory - * for the specified printer model name, if such a directory exists. - * The directory contents are superficially checked for validity. - * The caller must free the returned char *. - * - * We first look in the locale-specific model-config directory, and - * then fall back to the C language model-config directory. - */ -static char * -FindFontDir( - char *modelName) -{ - char *configDir, *fontDir; - - if(!modelName || !strlen(modelName)) - return (char *)NULL; - - configDir = XpGetConfigDir(TRUE); - if((fontDir = ValidateFontDir(configDir, modelName))) - { - xfree(configDir); - return fontDir; - } - - if(configDir) - xfree(configDir); - configDir = XpGetConfigDir(FALSE); - fontDir = ValidateFontDir(configDir, modelName); - - xfree(configDir); - - return fontDir; -} - -/* - * AddToFontPath adds the specified font path element to the global - * defaultFontPath string. It adds the keyword "PRINTER:" to the front - * of the path to denote that this is a printer-specific font path - * element. - */ -static char PATH_PREFIX[] = "PRINTER:"; -static int PATH_PREFIX_LEN = sizeof(PATH_PREFIX) - 1; /* same as strlen() */ - -static void -AddToFontPath( - char *pathName) -{ - char *newPath; - Bool freeOldPath; - - if(defaultFontPath == origFontPath) - freeOldPath = FALSE; - else - freeOldPath = TRUE; - - newPath = (char *)xalloc(strlen(defaultFontPath) + strlen(pathName) + - PATH_PREFIX_LEN + 2); - - sprintf(newPath, "%s%s,%s", PATH_PREFIX, pathName, defaultFontPath); - - if(freeOldPath) - xfree(defaultFontPath); - - defaultFontPath = newPath; - return; -} - -/* - * AugmentFontPath adds printer-model-specific font path elements to - * the front of the font path global variable "defaultFontPath" (dix/globals.c). - * We can't call SetFontPath() because the font code has not yet been - * initialized when InitOutput is called (from whence this routine is called). - * - * This utilizes the static variables origFontPath and - * freeDefaultFontPath to track the original contents of defaultFontPath, - * and to properly free the modified version upon server recycle. - */ -static void -AugmentFontPath(void) -{ - char *modelID, **allIDs = (char **)NULL; - PrinterDbPtr pDbEntry; - int numModels, i; - - if(!origFontPath) - origFontPath = defaultFontPath; - - if(freeDefaultFontPath) - { - xfree(defaultFontPath); - defaultFontPath = origFontPath; - freeDefaultFontPath = FALSE; - } - - /* - * Build a list of printer models to check for internal fonts. - */ - for(pDbEntry = printerDb, numModels = 0; - pDbEntry != (PrinterDbPtr)NULL; - pDbEntry = pDbEntry->next) - { - modelID = - (char*)XpGetPrinterAttribute(pDbEntry->name, - "xp-model-identifier"); - - if(modelID && strlen(modelID) != 0) - { - /* look for current model in the list of allIDs */ - for(i = 0; i < numModels; i++) - { - if(!strcmp(modelID, allIDs[i])) - { - modelID = (char *)NULL; - break; - } - } - } - - /* - * If this printer's model-identifier isn't in the allIDs list, - * then add it to allIDs. - */ - if(modelID && strlen(modelID) != 0) - { - allIDs = (char **)xrealloc(allIDs, (numModels+2) * sizeof(char *)); - if(allIDs == (char **)NULL) - return; - allIDs[numModels] = modelID; - allIDs[numModels + 1] = (char *)NULL; - numModels++; - } - } - - /* for each model, check for a valid font directory, and add it to - * the front of defaultFontPath. - */ - for(i = 0; allIDs != (char **)NULL && allIDs[i] != (char *)NULL; i ++) - { - char *fontDir; - if((fontDir = FindFontDir(allIDs[i]))) - { - AddToFontPath(fontDir); - xfree(fontDir); - freeDefaultFontPath = TRUE; - } - } - - if(allIDs) - xfree(allIDs); - - return; -} - -/* - * XpClientIsBitmapClient is called by the font code to find out if - * a particular client should be granted access to bitmap fonts. - * This function works by - * calling XpContextOfClient (in Xserver/Xext/xprint.c) to determine - * the context associated with the client, and then queries the context's - * attributes to determine whether the bitmap fonts should be visible. - * It looks at the value of the xp-listfonts-modes document/page attribute to - * see if xp-list-glyph-fonts has been left out of the mode list. Only - * if the xp-listfonts-modes attribute exists, and it does not contain - * xp-list-glyph-fonts does this function return FALSE. In any other - * case the funtion returns TRUE, indicating that the bitmap fonts - * should be visible to the client. - */ -Bool -XpClientIsBitmapClient( - ClientPtr client) -{ - XpContextPtr pContext; - char *mode; - - if(!(pContext = XpContextOfClient(client))) - return TRUE; - - /* - * Check the page attributes, and if it's not defined there, then - * check the document attributes. - */ - mode = XpGetOneAttribute(pContext, XPPageAttr, "xp-listfonts-modes"); - if(!mode || !strlen(mode)) - { - mode = XpGetOneAttribute(pContext, XPDocAttr, "xp-listfonts-modes"); - if(!mode || !strlen(mode)) - return TRUE; - } - - if(!strstr(mode, "xp-list-glyph-fonts")) - return FALSE; - - return TRUE; -} - -/* - * XpClientIsPrintClient is called by the font code to find out if - * a particular client has set a context which references a printer - * which utilizes a particular font path. - * This function works by calling XpContextOfClient - * (in Xserver/Xext/xprint.c) to determine the context associated with - * the client and then looks at the value of the xp-listfonts-modes - * document/page attribute to see if xp-list-internal-printer-fonts has - * been left out of the mode list. - * If the xp-listfonts-modes attribute exists, and it does not contain - * xp-list-internal-printer-fonts this function returns FALSE. - * Otherwise it looks up the font directory for the context. The font - * directory is then compared with the directory specified in the - * FontPathElement which is passed in. - */ -Bool -XpClientIsPrintClient( - ClientPtr client, - FontPathElementPtr fpe) -{ - XpContextPtr pContext; - char *mode; - char *modelID, *fontDir; - - if(!(pContext = XpContextOfClient(client))) - return FALSE; - - /* - * Check the page attributes, and if it's not defined there, then - * check the document attributes. - */ - mode = XpGetOneAttribute(pContext, XPPageAttr, "xp-listfonts-modes"); - if(!mode || !strlen(mode)) - { - mode = XpGetOneAttribute(pContext, XPDocAttr, "xp-listfonts-modes"); - } - - if(mode && strlen(mode)) - { - if(!strstr(mode, "xp-list-internal-printer-fonts")) - return FALSE; - } - - if (!fpe) - return TRUE; - - modelID = XpGetOneAttribute(pContext, XPPrinterAttr, "xp-model-identifier"); - if(!modelID || !strlen(modelID)) - return FALSE; - - if(!(fontDir = FindFontDir(modelID))) - return FALSE; - - /* - * The grunge here is to ignore the PATH_PREFIX at the front of the - * fpe->name. - */ - if(fpe->name_length < PATH_PREFIX_LEN || - (strlen(fontDir) != (fpe->name_length - PATH_PREFIX_LEN)) || - strncmp(fontDir, fpe->name + PATH_PREFIX_LEN, - fpe->name_length - PATH_PREFIX_LEN)) - { - xfree(fontDir); - return FALSE; - } - xfree(fontDir); - return TRUE; -} - -static void -AddFormats(ScreenInfo *pScreenInfo, char *driverName) -{ - int i, j; - driverInitRec *pInitRec; - int numDrivers = sizeof(driverInits)/sizeof(driverInitRec); - PixmapFormatRec *formats; - int numfmts; - - for (pInitRec = driverInits, i = 0; i < numDrivers; pInitRec++, i++) - { - if ( !strcmp( driverName, pInitRec->driverName ) ) - break; - } - if (i >= numDrivers) - return; - formats = pInitRec->pFmts; - numfmts = pInitRec->numFmts; - for (i = 0; i < numfmts && pScreenInfo->numPixmapFormats < MAXFORMATS; i++) - { - for (j = 0; j < pScreenInfo->numPixmapFormats; j++) { - if (pScreenInfo->formats[j].depth == formats[i].depth && - pScreenInfo->formats[j].bitsPerPixel == formats[i].bitsPerPixel && - pScreenInfo->formats[j].scanlinePad == formats[i].scanlinePad) - break; - } - if (j == pScreenInfo->numPixmapFormats) { - pScreenInfo->formats[j] = formats[i]; - pScreenInfo->numPixmapFormats++; - } - } -} - -/************************************************************ - * PrinterInitOutput -- - * This routine is to be called from a ddx's InitOutput - * during the server startup initialization, and when - * the server is to be reset. The routine creates the - * screens associated with configured printers by calling - * dix:AddScreen. The configuration information comes from a - * database read from the X*printers file. - * - * Results: - * The array of ScreenRec pointers referenced by - * pScreenInfo->screen is increased by the addition - * of the printer screen(s), as is the value of - * pScreenInfo->numScreens. This is done via calls - * to AddScreen() in dix. - * - ************************************************************/ - -void -PrinterInitOutput( - ScreenInfo *pScreenInfo, - int argc, - char **argv) -{ - PrinterDbPtr pDb, pDbEntry; - int driverCount = 0, i; - char **driverNames; - char *configDir; - - /* This should NEVER happen, but... */ - if( !xprintInitGlobalsCalled ) - { - FatalError("Internal error: PrinterInitGlobals() not called."); - } -#ifdef SMART_SCHEDULE - /* |PrinterInitGlobals| should have set |SmartScheduleDisable| to - * |TRUE| - if not we will trigger this safeguard. */ - if( SmartScheduleDisable != TRUE ) - { - FatalError("Internal error: XF86 smart scheduler incompatible to Xprint DDX."); - } -#endif /* SMART_SCHEDULE */ - /* Safeguard for - * http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=567 ("Xorg - * Xprt starts to consume 100% CPU when being idle for some time") - * |PrinterInitGlobals| should have set |defaultScreenSaverTime| to - * |0| - if not we will trigger this trap. */ - if( defaultScreenSaverTime != 0 ) - { - FatalError("Internal screen saver must be OFF for printing."); - } - - /* Print a warnung when the maximum request size of the BIGREQUESTS - * extension is smaller than 8MB (see - * http://xprint.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=622) - */ - if (maxBigRequestSize < (8*1048576)-1) { - ErrorF("Xp Extension: BIGREQUESTS max. request is currently %ld bytes " - ", recommemded minimum for Xprint is 8MB.\n", (long)maxBigRequestSize); - } - - /* - * this little test is just a warning at startup to make sure - * that the config directory exists. - * - * what this ugly looking if says is that if both ways of - * calling configDir works and both directories don't exist, - * then print an error saying we can't find the non-lang one. - */ - if (((configDir = XpGetConfigDir(TRUE)) != NULL) && - (access(configDir, F_OK) == 0)) - { - xfree(configDir); - } - else if (((configDir = XpGetConfigDir(FALSE)) != NULL) && - (access(configDir, F_OK) == 0)) - { - xfree(configDir); - } - else { - /* Refuse to start when we do not have our config dir... */ - FatalError("Xp Extension: could not find config dir %s\n", - configDir ? configDir : XPRINTDIR); - } - - if(printerDb != (PrinterDbPtr)NULL) - FreePrinterDb(); - - /* - * Calling BuildPrinterDb serves to build the printer database, - * and to initialize the attribute store for each printer. - * The driver can, if it so desires, modify the attribute - * store at a later time. - */ - if((pDb = BuildPrinterDb()) == (PrinterDbPtr)NULL) return; - - /* - * We now have to decide how many screens to initialize, and call - * AddScreen for each one. The printerDb must be properly initialized - * for at least one screen's worth of printers prior to calling AddScreen - * because InitPrintDrivers reads the printerDb to determine which - * driver(s) to init on a particular screen. - * We put each driver's printers on a different - * screen, and call AddScreen for each screen/driver pair. - */ - /* count the number of printers */ - for(pDbEntry = pDb, driverCount = 0; pDbEntry != (PrinterDbPtr)NULL; - pDbEntry = pDbEntry->next, driverCount++) - ; - /* - * Allocate memory for the worst case - a driver per printer - */ - driverNames = (char **)xalloc(sizeof(char *) * driverCount); - - /* - * Assign the driver for the first printer to the first screen - */ - pDb->screenNum = screenInfo.numScreens; - driverNames[0] = pDb->driverName; - driverCount = 1; - AddFormats(pScreenInfo, pDb->driverName); - - /* - * For each printer, look to see if its driver is already assigned - * to a screen, and if so copy that screen number into the printerDb. - * Otherwise, assign a new screen number to the driver for this - * printer. - */ - for(pDbEntry = pDb; pDbEntry != (PrinterDbPtr)NULL; - pDbEntry = pDbEntry->next) - { - Bool foundMatch; - - for(i = 0, foundMatch = FALSE; i < driverCount; i++) - { - if(!strcmp(driverNames[i], pDbEntry->driverName)) - { - foundMatch = TRUE; - pDbEntry->screenNum = screenInfo.numScreens + i; - break; - } - } - if(foundMatch == FALSE) - { - driverNames[driverCount] = pDbEntry->driverName; - pDbEntry->screenNum = screenInfo.numScreens + driverCount; - AddFormats(pScreenInfo, pDbEntry->driverName); - driverCount++; - } - } - - for(i = 0; i < driverCount; i++) - { - int curScreen = screenInfo.numScreens; - if(AddScreen(InitPrintDrivers, argc, argv) < 0) - { - PrinterDbPtr pPrev; - /* - * AddScreen failed, so we pull the associated printers - * from the list. - */ - ErrorF("Xp Extension: Could not add screen for driver %s\n", - driverNames[i]); - for(pPrev = pDbEntry = printerDb; pDbEntry != (PrinterDbPtr)NULL; - pDbEntry = pDbEntry->next) - { - if(pDbEntry->screenNum == curScreen) - { - if(pPrev == printerDb) - { - printerDb = pDbEntry->next; - pPrev = printerDb; - } - else - pPrev->next = pDbEntry->next; - - xfree(pDbEntry->name); - xfree(pDbEntry); - pDbEntry = pPrev; - } - else - { - if(pDbEntry->screenNum > curScreen) - pDbEntry->screenNum--; - pPrev = pDbEntry; - } - } - } - } - - xfree(driverNames); - - AugmentFontPath(); - - if(pScreenInfo->numScreens > MAXSCREENS) - { - ErrorF("The number of printer screens requested "); - ErrorF("exceeds the allowable limit of %d screens.\n", MAXSCREENS); - ErrorF("Please reduce the number of requested printers in your "); - ErrorF("\nX%sprinters file.", display); - ErrorF("Server exiting...\n"); - exit(-1); - } -} - -/* - * InitPrintDrivers is called from dix:AddScreen. It in turn calls the - * driver initialization routine for any and all drivers which are - * implicated in supporting printers on the particular screen number - * specified by the "index" parameter. The printerDb variable is used - * to determine which printers are to be associated with a particular - * screen. - */ -static Bool -InitPrintDrivers( - int index, - ScreenPtr pScreen, - int argc, - char **argv) -{ - PrinterDbPtr pDb, pDb2; - - GenericScreenInit(index, pScreen, argc, argv); - - for(pDb = printerDb; pDb != (PrinterDbPtr)NULL; pDb = pDb->next) - { - if(pDb->screenNum == index) - { - Bool callInit = TRUE; - for(pDb2 = printerDb; pDb2 != pDb; pDb2 = pDb2->next) - { - if(!strcmp(pDb->driverName, pDb2->driverName)) - { - callInit = FALSE; - break; - } - } - if(callInit == TRUE) - { - Bool (*initFunc)(BFuncArgs); - initFunc = GetInitFunc(pDb->driverName); - if(initFunc(index, pScreen, argc, argv) == FALSE) - { - /* XXX - What do I do if the driver's init fails? */ - } - } - } - } - return TRUE; -} - -void -_XpVoidNoop(void) -{ - return; -} - -Bool -_XpBoolNoop(void) -{ - return TRUE; -} - -/* - * GenericScreenInit - The common initializations required by all - * printer screens and drivers. It sets the screen's cursor functions - * to Noops, and computes the maximum screen (i.e. medium) dimensions. - */ - -static void -GenericScreenInit( - int index, - ScreenPtr pScreen, - int argc, - char **argv) -{ - float fWidth, fHeight, maxWidth, maxHeight; - unsigned short width, height; - PrinterDbPtr pDb; - int res, maxRes; - - /* - * Set the cursor ops to no-op functions. - */ - pScreen->DisplayCursor = (DisplayCursorProcPtr)_XpBoolNoop; - pScreen->RealizeCursor = (RealizeCursorProcPtr)_XpBoolNoop; - pScreen->UnrealizeCursor = (UnrealizeCursorProcPtr)_XpBoolNoop; - pScreen->SetCursorPosition = (SetCursorPositionProcPtr)_XpBoolNoop; - pScreen->ConstrainCursor = (ConstrainCursorProcPtr)_XpVoidNoop; - pScreen->CursorLimits = (CursorLimitsProcPtr)_XpVoidNoop; - pScreen->RecolorCursor = (RecolorCursorProcPtr)_XpVoidNoop; - - /* - * Find the largest paper size for all the printers on the given - * screen. - */ - maxRes = 0; - maxWidth = maxHeight = 0.0; - for( pDb = printerDb; pDb != (PrinterDbPtr)NULL; pDb = pDb->next) - { - if(pDb->screenNum == index) - { - - XpValidatePoolsRec *pValRec; - pVFunc dimensionsFunc; - - GetDimFuncAndRec(pDb->driverName, &pValRec, &dimensionsFunc); - if(dimensionsFunc != (pVFunc)NULL) - dimensionsFunc(pDb->name, pValRec, &fWidth, &fHeight, &res); - else - XpGetMaxWidthHeightRes(pDb->name, pValRec, &fWidth, - &fHeight, &res); - if( res > maxRes ) - maxRes = res; - if( fWidth > maxWidth ) - maxWidth = fWidth; - if( fHeight > maxHeight ) - maxHeight = fHeight; - } - } - - width = (unsigned short) (maxWidth * maxRes / 25.4); - height = (unsigned short) (maxHeight * maxRes / 25.4); - pScreen->width = pScreen->height = ( width > height ) ? width : - height; - - pScreen->mmWidth = pScreen->mmHeight = ( maxWidth > maxHeight ) ? - (unsigned short)(maxWidth + 0.5) : - (unsigned short)(maxHeight + 0.5); -} - -#if 0 /* No one uses this anymore... */ -/* - * QualifyName - takes an unqualified file name such as X6printers and - * a colon-separated list of directory path names such as - * /etc/opt/dt:/opt/dt/config. - * - * Returns a fully qualified file path name such as /etc/opt/dt/X6printers. - * The returned value is malloc'd, and the caller is responsible for - * freeing the associated memory. - */ -static char * -QualifyName(char *fileName, char *searchPath) -{ - char * curPath = searchPath; - char * nextPath; - char * chance; - FILE *pFile; - - if (fileName == NULL || searchPath == NULL) - return NULL; - - while (1) { - if ((nextPath = strchr(curPath, ':')) != NULL) - *nextPath = 0; - - chance = (char *)xalloc(strlen(curPath) + strlen(fileName) + 2); - sprintf(chance,"%s/%s",curPath,fileName); - - /* see if we can read from the file */ - if((pFile = fopen(chance, "r")) != (FILE *)NULL) - { - fclose(pFile); - /* ... restore the colon, .... */ - if (nextPath) - *nextPath = ':'; - - return chance; - } - - xfree(chance); - - if (nextPath == NULL) /* End of path list? */ - break; - - /* try the next path */ - curPath = nextPath + 1; - } - return NULL; -} -#endif - -/* - * FillPrinterListEntry fills in a single XpDiListEntry element with data - * derived from the supplied PrinterDbPtr element. - * - * XXX A smarter (i.e. future) version of this routine might inspect the - * XXX "locale" parameter and attempt to match the "description" and - * XXX "localeName" elements of the XpDiListEntry to the specified locale. - */ -static void -FillPrinterListEntry( - XpDiListEntry *pEntry, - PrinterDbPtr pDb, - int localeLen, - char *locale) -{ - static char *localeStr = (char *)NULL; - - if(localeStr == (char *)NULL) - localeStr = strdup(setlocale(LC_ALL, (const char *)NULL)); - - pEntry->name = pDb->name; - pEntry->description = - (char*)XpGetPrinterAttribute(pDb->name, "descriptor"); - pEntry->localeName = localeStr; - pEntry->rootWinId = WindowTable[pDb->screenNum]->drawable.id; -} - -/* - * GetPrinterListInfo fills in the XpDiListEntry struct pointed to by the - * parameter pEntry with the information regarding the printer specified - * by the name and nameLen parameters. The pointers placed in the - * XpDiListEntry structure MUST NOT be freed by the caller. They are - * pointers into existing long-lived databases. - * - */ -static Bool -GetPrinterListInfo( - XpDiListEntry *pEntry, - int nameLen, - char *name, - int localeLen, - char *locale) -{ - PrinterDbPtr pDb; - - for(pDb = printerDb; pDb != (PrinterDbPtr)NULL; pDb = pDb->next) - { - if(strlen(pDb->name) == nameLen && !strncmp(pDb->name, name, nameLen)) - { - FillPrinterListEntry(pEntry, pDb, localeLen, locale); - return TRUE; - } - } - return FALSE; -} - -/* - * XpDiFreePrinterList is the approved method of releasing memory used - * for a printer list. - */ -void -XpDiFreePrinterList(XpDiListEntry **list) -{ - int i; - - for(i = 0; list[i] != (XpDiListEntry *)NULL; i++) - xfree(list[i]); - xfree(list); -} - -/* - * XpDiGetPrinterList returns a pointer to a NULL-terminated array of - * XpDiListEntry pointers. Each entry structure contains the name, - * description, root window, and locale of a printer. The call returns - * either a list of all printers configured on the server, or it returns - * the information for one specific printer depending on the values passed - * in. Non-NULL values passed in indicate that only the information for - * the one specific printer is desired, while NULL values indicate that - * the information for all printers is desired. - */ -XpDiListEntry ** -XpDiGetPrinterList( - int nameLen, - char *name, - int localeLen, - char *locale) -{ - XpDiListEntry **pList; - - if(!nameLen || name == (char *)NULL) - { - int i; - PrinterDbPtr pDb; - - for(pDb = printerDb, i = 0; pDb != (PrinterDbPtr)NULL; - pDb = pDb->next, i++) - ; - - if((pList = (XpDiListEntry **)xalloc((i+1) * sizeof(XpDiListEntry *))) - == (XpDiListEntry **)NULL) - return pList; - - pList[i] = (XpDiListEntry *)NULL; - for(pDb = printerDb, i = 0; pDb != (PrinterDbPtr)NULL; - pDb = pDb->next, i++) - { - if((pList[i] = (XpDiListEntry *)xalloc(sizeof(XpDiListEntry)))== - (XpDiListEntry *)NULL) - { - XpDiFreePrinterList(pList); - return (XpDiListEntry **)NULL; - } - FillPrinterListEntry(pList[i], pDb, localeLen, locale); - } - } - else - { - if((pList = (XpDiListEntry **)xalloc(2 * sizeof(XpDiListEntry *))) == - (XpDiListEntry **)NULL) - return pList; - - if((pList[0] = (XpDiListEntry *)xalloc(sizeof(XpDiListEntry))) == - (XpDiListEntry *)NULL) - { - xfree(pList); - return (XpDiListEntry **)NULL; - } - pList[1] = (XpDiListEntry *)NULL; - if(GetPrinterListInfo(pList[0], nameLen, name, localeLen, locale) == - FALSE) - { - xfree(pList[0]); - pList[0] = (XpDiListEntry *)NULL; - } - } - return pList; -} - -WindowPtr -XpDiValidatePrinter(char *printerName, int printerNameLen) -{ - PrinterDbPtr pCurEntry; - - for(pCurEntry = printerDb; - pCurEntry != (PrinterDbPtr)NULL; pCurEntry = pCurEntry->next) - { - if(strlen(pCurEntry->name) == printerNameLen && - !strncmp(pCurEntry->name, printerName, printerNameLen)) - return WindowTable[pCurEntry->screenNum]; - } - return (WindowPtr)NULL; -} - -/* - * XpDiGetDriverName takes a screen index and a printer name, and returns - * a pointer to the name of the driver to be used for the specified printer - * on the specified screen. - */ -char * -XpDiGetDriverName(int index, char *printerName) -{ - - PrinterDbPtr pCurEntry; - - for(pCurEntry = printerDb; - pCurEntry != (PrinterDbPtr)NULL; pCurEntry = pCurEntry->next) - { - if(pCurEntry->screenNum == index && - !strcmp(pCurEntry->name, printerName)) - return pCurEntry->driverName; - } - - return (char *)NULL; /* XXX Should we supply a default driverName? */ -} - diff --git a/hw/xprint/Makefile.am b/hw/xprint/Makefile.am deleted file mode 100644 index 2ed7aaf57..000000000 --- a/hw/xprint/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ -SUBDIRS = doc pcl pcl-mono raster ps etc config - -bin_PROGRAMS = Xprt - -Xprt_CFLAGS = @DIX_CFLAGS@ @XPRINT_CFLAGS@ \ - -DPRINT_ONLY_SERVER -D_XP_PRINT_SERVER_ \ - -DXPRINTDIR=\"$(libdir)/X11/xserver\" \ - -DXPRASTERDDX -DXPPCLDDX -DXPMONOPCLDDX -DXPPSDDX \ - -DXFree86Server - -Xprt_LDFLAGS = -L$(top_srcdir) -XPRINT_LIBS = \ - @XPRINT_LIBS@ \ - ps/libps.la \ - raster/libraster.la \ - pcl/libpcl.la \ - pcl-mono/libpcl.la \ - $(top_builddir)/fb/libfb.la \ - $(top_builddir)/render/librender.la \ - $(top_builddir)/dix/libXpdix.la \ - $(XSERVER_LIBS) \ - $(top_builddir)/Xext/libXext.la \ - $(top_builddir)/xkb/libxkb.la \ - $(top_builddir)/xkb/libxkbstubs.la \ - $(top_builddir)/os/libos.la # for Xprintf - -Xprt_DEPENDENCIES = $(XPRINT_LIBS) -Xprt_LDADD = $(XPRINT_LIBS) $(XPRINT_SYS_LIBS) $(XSERVER_SYS_LIBS) - -miinitext-wrapper.c: - echo "#include \"$(top_srcdir)/mi/miinitext.c\"" >> $@ - -dpmsstubs-wrapper.c: - echo "#include \"$(top_srcdir)/Xext/dpmsstubs.c\"" >> $@ - -Xprt_SOURCES = \ - attributes.c \ - attributes.h \ - AttrValid.c \ - AttrValid.h \ - ddxInit.c \ - DiPrint.h \ - Init.c \ - mediaSizes.c \ - Oid.c \ - OidDefs.h \ - Oid.h \ - OidStrs.h \ - spooler.c \ - spooler.h \ - Util.c \ - miinitext-wrapper.c \ - dpmsstubs-wrapper.c \ - $(top_srcdir)/fb/fbcmap_mi.c - -EXTRA_DIST = ValTree.c - -CLEANFILES = miinitext-wrapper.c dpmsstubs-wrapper.c diff --git a/hw/xprint/Oid.c b/hw/xprint/Oid.c deleted file mode 100644 index a2af00108..000000000 --- a/hw/xprint/Oid.c +++ /dev/null @@ -1,3181 +0,0 @@ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "attributes.h" - -/* - * XpOidNotify value strings - */ -#define NOTIFY_EMAIL_STR "{{event-report-job-completed} electronic-mail}" -#define NOTIFY_NONE_STR "{}" - -#define SafeStrLen(s) ((s) ? strlen((s)) : 0) - -/* - * entry type for the object identifier string map - */ -typedef struct _XpOidStringMapEntry -{ - const char* string; - int length; - int msg_set; - int msg_number; - const char* default_message; - -} XpOidStringMapEntry; - -/* - * include the auto-generated static XpOidStringMap - */ -#include "OidStrs.h" - -/* - * XpOid static function declarations - */ -static XpOid XpOidParse(const char* value_string, - const char** ptr_return); -/* - * XpOidList static function declarations - */ -static XpOidList* XpOidListParse(const char* value_string, - const XpOidList* valid_oids, - const char** ptr_return, int i); - -/* - * XpOidList static function declarations - */ -static XpOidCardList* XpOidCardListParse(const char* value_string, - const XpOidCardList* valid_cards, - const char** ptr_return, int i); - -/* - * XpOidMediumSourceSize static function declarations - */ -static XpOidMediumSS* MediumSSParse(const char* value_string, - const XpOidList* valid_trays, - const XpOidList* valid_medium_sizes, - const char** ptr_return, int i); -static XpOidMediumContinuousSize* MediumContinuousSizeParse(const char*, - const char**); -static void MediumContinuousSizeDelete(XpOidMediumContinuousSize* me); -static XpOidMediumDiscreteSizeList* MediumDiscreteSizeListParse(const char*, - const XpOidList*, - const char**, - int i); -static void MediumDiscreteSizeListDelete(XpOidMediumDiscreteSizeList* list); - -static BOOL ParseArea(const char* value_string, - const char** ptr_return, - XpOidArea* area_return); -static BOOL ParseRealRange(const char* value_string, - const char** ptr_return, - XpOidRealRange* range_return); - -/* - * XpOidTrayMediumList static function declarations - */ -static XpOidTrayMediumList* TrayMediumListParse(const char* value_string, - const XpOidList* valid_trays, - const char** ptr_return, - int i); -static void TrayMediumListValidate(XpOidTrayMediumList* me, - const XpOidMediumSS* msss); - -/* - * XpOidDocFmt - */ -static BOOL XpOidDocFmtNext(XpOidDocFmt* doc_fmt, - const char* value_string, - const char** ptr_return); - -/* - * XpOidDocFmtListParse - */ -static XpOidDocFmtList* XpOidDocFmtListParse(const char* value_string, - const XpOidDocFmtList* valid_fmts, - const char** ptr_return, int i); - -/* - * misc. parsing static function declarations - */ -static BOOL ParseBoolValue(const char* value_string, - const char** ptr_return, - BOOL* bool_return); -static BOOL ParseRealValue(const char* value_string, - const char** ptr_return, - float* real_return); -static BOOL ParseSeqEnd( - const char* value_string, - const char** ptr_return); -static BOOL ParseSeqStart( - const char* value_string, - const char** ptr_return); -static BOOL ParseUnspecifiedValue( - const char* value_string, - const char** ptr_return); -static int SpanToken( - const char* string); -static int SpanWhitespace( - const char* string); - -/* - * String comparison function. - */ -#ifdef HAVE_STRCASECMP -# define StrnCaseCmp(s1, s2, len) strncasecmp(s1, s2, len) -#else -static int StrnCaseCmp(const char *s1, const char *s2, size_t len); -#endif - -/* - * ------------------------------------------------------------------------ - * Name: XpOidString - * - * Description: - * - * Obtain the string representation of an XpOid. - * - * Example: XpOidString(xpoid_copy_count) returns "copy-count". - * - * Return value: - * - * A const pointer to the string. - */ -const char* -XpOidString(XpOid xp_oid) -{ - /* - * XpOid enum values are index values into the string map - */ - return XpOidStringMap[xp_oid].string; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidStringLength - * - * Description: - * - * Obtain the length of the string representation for a given - * XpOid. - * - * Return value: - * - * The string length in bytes. - * - */ -int -XpOidStringLength(XpOid xp_oid) -{ - /* - * XpOid enum values are index values into the string map - */ - return XpOidStringMap[xp_oid].length; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidFromString - * - * Description: - * - * Obtains the XpOid given a string representation of an XpOid. - * - * Example: XpOidFromString("copy-count") returns 'xpoid_copy_count'. - * - * Return value: - * - * The XpOid if successful. 'xpoid_none' if the string pointed to by - * 'value is not recognized or if 'value' is NULL. - */ -XpOid -XpOidFromString(const char* value) -{ - if(value == (const char*)NULL) - return xpoid_none; - else - return XpOidParse(value, (const char**)NULL); -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidParse - * - * Description: - * - * Parse the next whitespace-delimited string from 'value_string' - * updating 'ptr_return' to point to the next unparsed location in - * 'value_string'. 'ptr_return' can be NULL. - * - * Return value: - * - * The corresponding XpOid for the parsed name string. - * A return value of xpoid_none is returned if the parsed name - * was not a valid oid or if no name was found. - * - */ -static XpOid -XpOidParse(const char* value_string, - const char** ptr_return) -{ - const char* ptr; - int length; - int i; - /* - * skip leading whitespace - */ - ptr = value_string + SpanWhitespace(value_string); - /* - * get the whitespace-delimited token length - */ - length = SpanToken(ptr); - /* - * match the oid string in the map - */ - for(i = 0; i < XpOidStringMapCount; i++) - if(length == XpOidStringMap[i].length) - if(strncmp(ptr, XpOidStringMap[i].string, length) == 0) - break; - if(i == XpOidStringMapCount) - i = xpoid_none; - /* - * update the return pointer and return - */ - if(ptr_return != (const char**)NULL) - *ptr_return = ptr+length; - return i; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidListNew - * - * Description: - * - * Creates a new XpOidList initialized from a whitespace-delimited - * list of recognized string representations of oids. The returned - * list will contain only oids found within the passed 'valid_oids' - * XpOidList. - * - * Note: One may notice that in order to create an XpOidList with - * this function, an XpOidList is needed; the 'valid_oids' list - * is often an statically initialized structure. XpOidListInit - * can also be used. - * - * Return value: - * - * NULL if the passed 'value_string' is NULL. - * - * If the list indicated by 'value_string' is empty or contains only - * unrecognized oid string representations, a new XpOidList - * containing zero elements is returned. - * - * If 'valid_oids' is NULL all oids are considered valid. - * - */ -XpOidList* -XpOidListNew(const char* value_string, - const XpOidList* valid_oids) -{ - if(value_string == (const char*)NULL) - return (XpOidList*)NULL; - else - { - const char* ptr; - return XpOidListParse(value_string, valid_oids, &ptr, 0); - } -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidListDelete - * - * Description: - * - * Frees the memory allocated for 'list'. - * - * Return value: - * - * None. - * - */ -void -XpOidListDelete(XpOidList* list) -{ - if(list != (XpOidList*)NULL) - { - XpOidFree((char*)list->list); - XpOidFree((char*)list); - } -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidListParse - * - * Description: - * - * This function recursively parses the whitespace-delimited list of - * oid string representations passed via 'value_string'. Oids are - * only added to the resulting list if they are found within the - * passed 'valid_oids' XpOidList. - * - * 'ptr_return' points to a char* variable allocated by the - * caller, and is really only of use during recursion (upon return to - * the original caller, it will point to the end of value_string). - * - * 'value_string' and 'ptr_return' *cannot* be NULL. - * - * Return value: - * - * A newly allocated and initialized XpOidList. - * - * If the list indicated by 'value_string' is empty or contains only - * unrecognized oid string representations, a new XpOidList - * containing zero elements is returned. - * - * If 'valid_oids' is NULL all oids are considered valid. - * - */ -static XpOidList* -XpOidListParse(const char* value_string, - const XpOidList* valid_oids, - const char** ptr_return, - int i) -{ - XpOid oid; - XpOidList* list; - /* - * parse the next valid oid out of the value string - */ - ptr_return = &value_string; - while(1) - { - if(**ptr_return == '\0') - { - /* - * end of value string; stop parsing - */ - oid = xpoid_none; - break; - } - /* - * parse the next oid from the value - */ - oid = XpOidParse(*ptr_return, ptr_return); - if(xpoid_none == oid) - { - /* - * unrecognized oid; keep parsing - */ - continue; - } - if((const XpOidList*)NULL == valid_oids - || - XpOidListHasOid(valid_oids, oid)) - { - /* - * valid oid found; stop parsing - */ - break; - } - } - - if(oid == xpoid_none) - { - /* - * end of value string; allocate the list structure - */ - list = (XpOidList*)XpOidCalloc(1, sizeof(XpOidList)); - list->count = i; - list->list = (XpOid*)XpOidCalloc(i, sizeof(XpOid)); - } - else - { - /* - * recurse - */ - list = XpOidListParse(*ptr_return, valid_oids, ptr_return, i+1); - /* - * set the oid in the list - */ - list->list[i] = oid; - } - /* - * return - */ - return list; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidListHasOid - * - * Description: - * - * Determines if 'oid' is an element of 'list'. - * - * Return value: - * - * xTrue if the oid is found in the list. - * - * xFalse if the oid is not in the list, or if 'list' is NULL. - * - */ -BOOL -XpOidListHasOid(const XpOidList* list, XpOid oid) -{ - int i; - if(list != (XpOidList*)NULL) - for(i = 0; i < list->count; i++) - if(list->list[i] == oid) - return xTrue; - return xFalse; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidListGetIndex - * - * Description: - * - * Returns the array index of 'oid' in 'list' - * - * Return value: - * - * The index of 'oid' in list. - * - * -1 if the oid is not in the list, or if 'list' is NULL. - * - */ -int -XpOidListGetIndex(const XpOidList* list, XpOid oid) -{ - int i; - if(list != (XpOidList*)NULL) - for(i = 0; i < list->count; i++) - if(list->list[i] == oid) - return i; - return -1; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidListString - * - * Description: - * - * Creates a string representation of an XpOidList structure. - * - * Return value: - * - * A newly allocated - * - */ -char* -XpOidListString(const XpOidList* me) -{ - int i; - int length; - char* str; - char* ptr; - /* - * allocate enough memory for the oid string representations, - * including intervening whitespace - */ - for(i = 0, length = 0; i < XpOidListCount(me); i++) - length += XpOidStringLength(XpOidListGetOid(me, i)) + 1; - str = XpOidMalloc(length+1); - /* - * format the list - */ - for(i = 0, ptr = str; i < XpOidListCount(me); i++) -#if defined(sun) && !defined(SVR4) - { - sprintf(ptr, "%s ", XpOidString(XpOidListGetOid(me, i))); - ptr += strlen(ptr); - } -#else - ptr += sprintf(ptr, "%s ", XpOidString(XpOidListGetOid(me, i))); -#endif - /* - * chop trailing whitespace or terminate empty string - */ - str[length] = '\0'; - /* - * return - */ - return str; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidLinkedListNew - * - * Description: - * - * Creates a new instance of an empty XpOidLinkedList. - * - * Return value: - * - * The new XpOidLinkedList. - * - */ -XpOidLinkedList* -XpOidLinkedListNew() -{ - return (XpOidLinkedList*)XpOidCalloc(1, sizeof(XpOidLinkedList)); -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidLinkedListDelete - * - * Description: - * - * Frees the memory allocated for a XpOidLinkedList. - * - * Return value: - * - * None. - * - */ -void -XpOidLinkedListDelete(XpOidLinkedList* me) -{ - if(me != (XpOidLinkedList*)NULL) - { - while(me->head) - { - me->current = me->head; - me->head = me->current->next; - XpOidFree((char*)me->current); - } - XpOidFree((char*)me); - } -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidLinkedListGetOid - * - * Description: - * - * Retrieves the oid at position 'i' (zero-based) in the - * XpOidLinkedList 'me'. - * - * Return value: - * - * The oid at position 'i'. - * - * xpoid_none if the oid was not found, or the list is empty (or if - * the list contains xpoid_none at position 'i'). - */ -XpOid -XpOidLinkedListGetOid(XpOidLinkedList* me, int i) -{ - if(me == (XpOidLinkedList*)NULL || i < 0 || i >= me->count) - { - return xpoid_none; - } - else - { - me->current = me->head; - while(i--) me->current = me->current->next; - return me->current->oid; - } -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidLinkedListAddOid - * - * Description: - * - * Adds an oid to the end of an XpOidLinkedList. - * - * Return value: - * - * None. - * - */ -void -XpOidLinkedListAddOid(XpOidLinkedList* me, XpOid oid) -{ - me->current = (XpOidNode)XpOidCalloc(1, sizeof(struct XpOidNodeStruct)); - me->current->oid = oid; - ++me->count; - if(me->tail) - { - me->tail->next = me->current; - me->tail = me->current; - } - else - me->head = me->tail = me->current; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidLinkedListGetIndex - * - * Description: - * - * Returns the position of an oid in a XpOidLinkedList. - * - * Return value: - * - * The zero-based position of 'oid' in the list. - * - * -1 if the oid is not in the list, or if 'me' is NULL. - * - */ -int -XpOidLinkedListGetIndex(XpOidLinkedList* me, XpOid oid) -{ - if((XpOidLinkedList*)NULL != me) - { - int i = 0; - me->current = me->head; - while(me->current) - if(me->current->oid == oid) - { - return i; - } - else - { - ++i; - me->current = me->current->next; - } - } - return -1; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidLinkedListHasOid - * - * Description: - * - * Determines if an oid is an element of a XpOidLinkedList. - * - * Return value: - * - * xTrue if the oid is found in the list. - * - * xFalse if the oid is not in the list, or if 'me' is NULL. - */ -BOOL -XpOidLinkedListHasOid(XpOidLinkedList* me, - XpOid oid) -{ - if((XpOidLinkedList*)NULL != me) - { - me->current = me->head; - while(me->current) - if(me->current->oid == oid) - return xTrue; - else - me->current = me->current->next; - } - return xFalse; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidLinkedListFirstOid - * - * Description: - * - * Positions the XpOidLinkedList 'current' pointer to the first entry - * in the list. - * - * Return value: - * - * The first oid in the list, or xpoid_none if the list NULL or - * empty. - */ -XpOid -XpOidLinkedListFirstOid(XpOidLinkedList* me) -{ - if((XpOidLinkedList*)NULL != me && (me->current = me->head)) - return me->current->oid; - else - return xpoid_none; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidLinkedListNextOid - * - * Description: - * - * Positions the XpOidLinkedList 'current' pointer to the next entry - * in the list. - * - * Return value: - * - * The next oid, or xpoid_none if the end of the list has been - * reached. - */ -XpOid -XpOidLinkedListNextOid(XpOidLinkedList* me) -{ - if(me->current ? (me->current = me->current->next) : xFalse) - return me->current->oid; - else - return xpoid_none; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidMediumSSNew - * - * Description: - * - * Creates a new XpOidMediumSS initialized from a string value - * specified using the medium-source-sizes syntax. See - * MediumSSParse() below for parsing details. - * - * Return value: - * - * NULL if the passed 'value_string' is NULL, or if a syntax error is - * encountered while parsing the medium-source-sizes value. - * - */ -XpOidMediumSS* -XpOidMediumSSNew(const char* value_string, - const XpOidList* valid_trays, - const XpOidList* valid_medium_sizes) -{ - if(value_string == (const char*)NULL) - return (XpOidMediumSS*)NULL; - else - { - const char* ptr = value_string + SpanWhitespace(value_string); - if(*ptr == '\0') - return (XpOidMediumSS*)NULL; - else - return MediumSSParse(ptr, valid_trays, valid_medium_sizes, - &ptr, 0); - } -} - -/* - * ------------------------------------------------------------------------ - * Name: MediumSSParse - * - * Description: - * - * 'ptr_return' *cannot* be NULL. - * - * - * Return value: - * - * - * - */ -static XpOidMediumSS* -MediumSSParse(const char* value_string, - const XpOidList* valid_trays, - const XpOidList* valid_medium_sizes, - const char** ptr_return, - int i) -{ - XpOidMediumSS* medium_ss; - XpOidMediumSourceSize mss; - /* - * check for the start of a new MediumSourceSize sequence - */ - if(ParseSeqStart(value_string, ptr_return)) - { - /* - * check for an unspecified tray value - */ - if(ParseUnspecifiedValue(*ptr_return, ptr_return)) - mss.input_tray = xpoid_unspecified; - else - { - const char* tray_str; - *ptr_return += SpanWhitespace(*ptr_return); - tray_str = *ptr_return; - /* - * parse out the input tray - */ - mss.input_tray = XpOidParse(*ptr_return, ptr_return); - if((const XpOidList*)NULL != valid_trays - && - !XpOidListHasOid(valid_trays, mss.input_tray) - ) - mss.input_tray = xpoid_none; - if(xpoid_none == mss.input_tray) - { - char* invalid_tray_str; - int len = *ptr_return - tray_str; - if(len > 0) - { - invalid_tray_str = XpOidMalloc(len+1); - strncpy(invalid_tray_str, tray_str, len); - invalid_tray_str[len] = '\0'; - ErrorF("%s\nInvalid tray (%s) found. Will attempt to continue parsing.\n", - XPMSG_WARN_MSS, invalid_tray_str); - XpOidFree(invalid_tray_str); - } - } - } - /* - * attempt to parse a Continuous MediumSize sequence - */ - mss.ms.continuous_size = - MediumContinuousSizeParse(*ptr_return, ptr_return); - if(mss.ms.continuous_size != (XpOidMediumContinuousSize*)NULL) - { - mss.mstag = XpOidMediumSS_CONTINUOUS; - } - else - { - /* - * not continuous, try Discrete MediumSize - */ - mss.ms.discrete = - MediumDiscreteSizeListParse(*ptr_return, valid_medium_sizes, - ptr_return, 0); - if(mss.ms.discrete == (XpOidMediumDiscreteSizeList*)NULL) - { - const char* tray_str; - /* - * syntax error (MediumDiscreteSizeListParse reports error) - */ - switch(mss.input_tray) - { - case xpoid_none: - tray_str = "an invalid"; - break; - case xpoid_unspecified: - tray_str = "default (tray specifier omitted)"; - break; - default: - tray_str = XpOidString(mss.input_tray); - break; - } - ErrorF("%s\nError occurred while parsing medium sizes for %s tray.\n", - XPMSG_WARN_MSS, tray_str); - return NULL; - } - mss.mstag = XpOidMediumSS_DISCRETE; - } - /* - * parse out the MediumSourceSize sequence end - */ - if(!ParseSeqEnd(*ptr_return, ptr_return)) - { - /* - * syntax error - */ - ErrorF("%s\nSequence End expected. Unparsed data: %s\n", - XPMSG_WARN_MSS, *ptr_return); - return NULL; - } - /* - * recurse to parse the next MediumSourceSize sequence - */ - medium_ss = MediumSSParse(*ptr_return, - valid_trays, valid_medium_sizes, - ptr_return, - xpoid_none == mss.input_tray ? i : i+1); - if(medium_ss == (XpOidMediumSS*)NULL - || - xpoid_none == mss.input_tray) - { - /* - * syntax error or invalid tray - clean up - */ - switch(mss.mstag) - { - case XpOidMediumSS_CONTINUOUS: - MediumContinuousSizeDelete(mss.ms.continuous_size); - break; - case XpOidMediumSS_DISCRETE: - MediumDiscreteSizeListDelete(mss.ms.discrete); - break; - } - if(medium_ss == (XpOidMediumSS*)NULL) - /* - * syntax error - return - */ - return NULL; - } - if(xpoid_none != mss.input_tray) - { - /* - * copy the current MediumSourceSize into the array - */ - memmove((medium_ss->mss)+i, &mss, sizeof(XpOidMediumSourceSize)); - } - } - else - { - /* - * MediumSourceSize sequence start not found - */ - if(**ptr_return == '\0') - { - if(0 == i) - { - ErrorF("%s\nNo valid trays found.\n", XPMSG_WARN_MSS); - return NULL; - } - /* - * end of value string; allocate the MediumSS structure - */ - medium_ss = (XpOidMediumSS*)XpOidCalloc(1, sizeof(XpOidMediumSS)); - medium_ss->count = i; - medium_ss->mss = (XpOidMediumSourceSize*) - XpOidCalloc(i, sizeof(XpOidMediumSourceSize)); - } - else - { - /* - * syntax error - */ - ErrorF("%s\nSequence Start expected.\nunparsed data: %s\n", - XPMSG_WARN_MSS, *ptr_return); - return NULL; - } - } - return medium_ss; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidMediumSSDelete - * - * Description: - * - * - * - * Return value: - * - * - * - */ -void -XpOidMediumSSDelete(XpOidMediumSS* me) -{ - if(me != (XpOidMediumSS*)NULL) - { - int i; - for(i = 0; i < me->count; i++) - { - switch((me->mss)[i].mstag) - { - case XpOidMediumSS_CONTINUOUS: - MediumContinuousSizeDelete((me->mss)[i].ms.continuous_size); - break; - case XpOidMediumSS_DISCRETE: - MediumDiscreteSizeListDelete((me->mss)[i].ms.discrete); - break; - } - } - XpOidFree((char*)me); - } -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidMediumSSHasSize - * - * Description: - * - * - * - * Return value: - * - * - * - */ -BOOL -XpOidMediumSSHasSize(XpOidMediumSS* me, XpOid page_size) -{ - int i_mss, i_ds; - XpOidMediumDiscreteSizeList* ds_list; - - if(me != (XpOidMediumSS*)NULL && page_size != xpoid_none) - for(i_mss = 0; i_mss < me->count; i_mss++) - { - switch((me->mss)[i_mss].mstag) - { - case XpOidMediumSS_DISCRETE: - ds_list = (me->mss)[i_mss].ms.discrete; - for(i_ds = 0; i_ds < ds_list->count; i_ds++) - if(page_size == (ds_list->list)[i_ds].page_size) - return xTrue; - break; - - case XpOidMediumSS_CONTINUOUS: - /* - * unsupported - */ - break; - } - } - /* - * return - */ - return xFalse; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidMediumSSString - * - * Description: - * - * Creates a string representation of an XpOidMediumSS structure. - * - * Return value: - * - * A newly allocated - * - */ -char* XpOidMediumSSString(const XpOidMediumSS* me) -{ - int itray, isize; - int valid_size_count; - int length; - char* str; - char* ptr; - XpOidMediumDiscreteSize* ds; - char buf[128]; - /* - * determine the size of the string representation - */ - for(itray = 0, length = 0; itray < XpOidMediumSSCount(me); itray++) - { - if(xpoid_none == me->mss[itray].input_tray - || - XpOidMediumSS_CONTINUOUS == me->mss[itray].mstag) - { - /* - * skip invalid tray or unsupported continuous size spec - */ - continue; - } - for(isize = 0, valid_size_count = 0; - isize < me->mss[itray].ms.discrete->count; - isize++) - { - ds = me->mss[itray].ms.discrete->list+isize; - if(ds->page_size == xpoid_none) - continue; - ++valid_size_count; - length += XpOidStringLength(ds->page_size); - length += ds->long_edge_feeds ? 4 : 5; /* "True" or "False" */ -#if defined(sun) && !defined(SVR4) - sprintf(buf, "{%.4f %.4f %.4f %.4f}", - ds->assured_reproduction_area.minimum_x, - ds->assured_reproduction_area.maximum_x, - ds->assured_reproduction_area.minimum_y, - ds->assured_reproduction_area.maximum_y); - length += strlen(buf); -#else - length += sprintf(buf, "{%.4f %.4f %.4f %.4f}", - ds->assured_reproduction_area.minimum_x, - ds->assured_reproduction_area.maximum_x, - ds->assured_reproduction_area.minimum_y, - ds->assured_reproduction_area.maximum_y); -#endif - length += 5; /* "{ } " */ - } - if(valid_size_count == 0) - { - /* - * no valid sizes, skip - */ - continue; - } - if(xpoid_unspecified == me->mss[itray].input_tray) - length += 2; /* "''" */ - else - length += XpOidStringLength(me->mss[itray].input_tray); - length += 4; /* "{ } " */ - } - /* - * allocate - */ - str = XpOidMalloc(length+1); - /* - * format - */ - for(itray = 0, ptr = str; itray < XpOidMediumSSCount(me); itray++) - { - if(xpoid_none == me->mss[itray].input_tray - || - XpOidMediumSS_CONTINUOUS == me->mss[itray].mstag) - { - /* - * skip invalid tray or unsupported continuous size spec - */ - continue; - } - /* - * check to ensure all of the specified sizes are valid - */ - for(isize = 0, valid_size_count = 0; - isize < me->mss[itray].ms.discrete->count; - isize++) - { - ds = me->mss[itray].ms.discrete->list+isize; - if(ds->page_size != xpoid_none) - ++valid_size_count; - } - if(valid_size_count == 0) - { - /* - * no valid sizes, skip - */ - continue; - } - - if(xpoid_unspecified == me->mss[itray].input_tray) - { -#if defined(sun) && !defined(SVR4) - sprintf(ptr, "{'' "); - ptr += strlen(ptr); -#else - ptr += sprintf(ptr, "{'' "); -#endif - } - else - { -#if defined(sun) && !defined(SVR4) - sprintf(ptr, "{%s ", XpOidString(me->mss[itray].input_tray)); - ptr += strlen(ptr); -#else - ptr += sprintf(ptr, "{%s ", - XpOidString(me->mss[itray].input_tray)); -#endif - } - for(isize = 0; isize < me->mss[itray].ms.discrete->count; isize++) - { - ds = me->mss[itray].ms.discrete->list+isize; - if(ds->page_size != xpoid_none) -#if defined(sun) && !defined(SVR4) - { - sprintf(ptr, "{%s %s {%.4f %.4f %.4f %.4f}} ", - XpOidString(ds->page_size), - ds->long_edge_feeds ? "True" : "False", - ds->assured_reproduction_area.minimum_x, - ds->assured_reproduction_area.maximum_x, - ds->assured_reproduction_area.minimum_y, - ds->assured_reproduction_area.maximum_y); - ptr += strlen(ptr); - } -#else - ptr += sprintf(ptr, "{%s %s {%.4f %.4f %.4f %.4f}} ", - XpOidString(ds->page_size), - ds->long_edge_feeds ? "True" : "False", - ds->assured_reproduction_area.minimum_x, - ds->assured_reproduction_area.maximum_x, - ds->assured_reproduction_area.minimum_y, - ds->assured_reproduction_area.maximum_y); -#endif - } -#if defined(sun) && !defined(SVR4) - sprintf(ptr, "} "); - ptr += strlen(ptr); -#else - ptr += sprintf(ptr, "} "); -#endif - } - /* - * chop trailing whitespace or terminate empty string - */ - str[length] = '\0'; - /* - * return - */ - return str; -} - -/* - * ------------------------------------------------------------------------ - * Name: MediumContinuousSizeParse - * - * Description: - * - * 'ptr_return' *cannot* be NULL. - * - * - * Return value: - * - * - * - */ -static XpOidMediumContinuousSize* -MediumContinuousSizeParse(const char* value_string, - const char** ptr_return) -{ - const char* first_nonws_ptr; - XpOidMediumContinuousSize* mcs = NULL; - /* - * skip leading whitespace - */ - first_nonws_ptr = value_string + SpanWhitespace(value_string); - /* - * parse out the MediumSize sequence start char - */ - if(!ParseSeqStart(first_nonws_ptr, ptr_return)) - goto MediumContinuousSizeParse_error; - /* - * peek ahead to see if it looks like we actually have a continuous - * size spec (looking for the sequence start char on the 1st range spec) - */ - if(!ParseSeqStart(*ptr_return, (const char**)NULL)) - goto MediumContinuousSizeParse_error; - /* - * Ok, let's go for it - */ - mcs = (XpOidMediumContinuousSize*) - XpOidCalloc(1, sizeof(XpOidMediumContinuousSize)); - /* - * "range across the feed direction" - */ - if(!ParseRealRange(*ptr_return, ptr_return, &mcs->range_across_feed)) - goto MediumContinuousSizeParse_error; - /* - * "increment across the feed direction" (optional, default 0) - */ - if(!ParseUnspecifiedValue(*ptr_return, ptr_return)) - if(!ParseRealValue(*ptr_return, ptr_return, - &mcs->increment_across_feed)) - goto MediumContinuousSizeParse_error; - /* - * "range in the feed direction" - */ - if(!ParseRealRange(*ptr_return, ptr_return, &mcs->range_in_feed)) - goto MediumContinuousSizeParse_error; - /* - * "increment in the feed direction" (optional, default 0) - */ - if(!ParseUnspecifiedValue(*ptr_return, ptr_return)) - if(!ParseRealValue(*ptr_return, ptr_return, - &mcs->increment_in_feed)) - goto MediumContinuousSizeParse_error; - /* - * "long edge feeds" flag (default TRUE) - */ - if(ParseUnspecifiedValue(*ptr_return, ptr_return)) - mcs->long_edge_feeds = xTrue; - else - if(!ParseBoolValue(*ptr_return, ptr_return, &mcs->long_edge_feeds)) - goto MediumContinuousSizeParse_error; - /* - * "generic assured reproduction area" - */ - if(!ParseArea(*ptr_return, ptr_return, &mcs->assured_reproduction_area)) - goto MediumContinuousSizeParse_error; - /* - * parse out the MediumSize sequence end character - */ - if(!ParseSeqEnd(*ptr_return, ptr_return)) - goto MediumContinuousSizeParse_error; - /* - * return - */ - return mcs; - - - MediumContinuousSizeParse_error: - /* - * syntax error - don't log since this function may be called - * as a lookahead - */ - *ptr_return = first_nonws_ptr; - XpOidFree((char*)mcs); - return NULL; -} - -/* - * ------------------------------------------------------------------------ - * Name: MediumContinuousSizeDelete - * - * Description: - * - * 'ptr_return' *cannot* be NULL. - * - * - * Return value: - * - * - * - */ -static void -MediumContinuousSizeDelete(XpOidMediumContinuousSize* me) -{ - XpOidFree((char*)me); -} - -/* - * ------------------------------------------------------------------------ - * Name: MediumDiscreteSizeListParse - * - * Description: - * - * 'ptr_return' *cannot* be NULL. - * - * Return value: - * - * - * - */ -static XpOidMediumDiscreteSizeList* -MediumDiscreteSizeListParse(const char* value_string, - const XpOidList* valid_medium_sizes, - const char** ptr_return, - int i) -{ - XpOidMediumDiscreteSizeList* list; - XpOidMediumDiscreteSize mds; - /* - * check for the start of a new MediumSize sequence - */ - if(ParseSeqStart(value_string, ptr_return)) - { - /* - * "page size" - */ - mds.page_size = XpOidParse(*ptr_return, ptr_return); - if((const XpOidList*)NULL != valid_medium_sizes - && - !XpOidListHasOid(valid_medium_sizes, mds.page_size) - ) - mds.page_size = xpoid_none; - /* - * "long edge feeds" flag (default TRUE) - */ - if(ParseUnspecifiedValue(*ptr_return, ptr_return)) - mds.long_edge_feeds = xTrue; - else - if(!ParseBoolValue(*ptr_return, ptr_return, - &mds.long_edge_feeds)) - { - /* - * syntax error - */ - ErrorF("%s\nBoolean expected.\nunparsed data: %s\n", - XPMSG_WARN_MSS, *ptr_return); - return (XpOidMediumDiscreteSizeList*)NULL; - } - /* - * "assured reproduction area" - */ - if(!ParseArea(*ptr_return, ptr_return, - &mds.assured_reproduction_area)) - { - /* - * syntax error - */ - ErrorF("%s\nArea specification error.\nunparsed data: %s\n", - XPMSG_WARN_MSS, *ptr_return); - return (XpOidMediumDiscreteSizeList*)NULL; - } - /* - * parse out the MediumSize sequence end character - */ - if(!ParseSeqEnd(*ptr_return, ptr_return)) - { - ErrorF("%s\nSequence End expected. Unparsed data: %s\n", - XPMSG_WARN_MSS, *ptr_return); - return (XpOidMediumDiscreteSizeList*)NULL; - } - /* - * recurse to parse the next Discrete MediumSize sequence - */ - if(mds.page_size == xpoid_none) - { - list = MediumDiscreteSizeListParse(*ptr_return, valid_medium_sizes, - ptr_return, i); - } - else - { - list = MediumDiscreteSizeListParse(*ptr_return, valid_medium_sizes, - ptr_return, i+1); - if(list != (XpOidMediumDiscreteSizeList*)NULL) - { - /* - * copy the current discrete MediumSize into the list - */ - memmove((list->list)+i, &mds, sizeof(XpOidMediumDiscreteSize)); - } - } - } - else - { - /* - * MediumSize sequence start not found; end of the discrete sizes - * list - */ - if(0 == i) - { - ErrorF("%s\nNo valid medium sizes found for tray.\n", - XPMSG_WARN_MSS); - return (XpOidMediumDiscreteSizeList*)NULL; - } - list = (XpOidMediumDiscreteSizeList*) - XpOidCalloc(1, sizeof(XpOidMediumDiscreteSizeList)); - list->count = i; - list->list = (XpOidMediumDiscreteSize*) - XpOidCalloc(i, sizeof(XpOidMediumDiscreteSize)); - } - return list; -} - -/* - * ------------------------------------------------------------------------ - * Name: MediumDiscreteSizeListDelete - * - * Description: - * - * - * - * Return value: - * - * - * - */ -static void -MediumDiscreteSizeListDelete(XpOidMediumDiscreteSizeList* list) -{ - if(list != (XpOidMediumDiscreteSizeList*)NULL) - { - XpOidFree((char*)list->list); - XpOidFree((char*)list); - } -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidTrayMediumListNew - * - * Description: - * - * Only need the valid trays; validation requires bumping up against - * msss using TrayMediumListValidate; this needs valid trays - * because of unspecified trays ion msss, but - * TrayMediumListValidate will take care of invalid sizes... - * - * Return value: - * - * - * - */ -XpOidTrayMediumList* -XpOidTrayMediumListNew(const char* value_string, - const XpOidList* valid_trays, - const XpOidMediumSS* msss) -{ - if(value_string == (const char*)NULL) - return (XpOidTrayMediumList*)NULL; - else - { - const char* ptr; - XpOidTrayMediumList* me; - me = TrayMediumListParse(value_string, valid_trays, &ptr, 0); - if((XpOidTrayMediumList*)NULL != me) - TrayMediumListValidate(me, msss); - return me; - } -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidTrayMediumListDelete - * - * Description: - * - * - * - * Return value: - * - * - * - */ -void -XpOidTrayMediumListDelete(XpOidTrayMediumList* list) -{ - if(list != (XpOidTrayMediumList*)NULL) - { - XpOidFree((char*)list->list); - XpOidFree((char*)list); - } -} - -/* - * ------------------------------------------------------------------------ - * Name: TrayMediumListParse - * - * Description: - * - * 'ptr_return' *cannot* be NULL. - * - * Return value: - * - * - * - */ -static XpOidTrayMediumList* -TrayMediumListParse(const char* value_string, - const XpOidList* valid_trays, - const char** ptr_return, int i) -{ - XpOidTrayMedium tm; - XpOidTrayMediumList* list; - /* - * check for the start of a new InputTrayMedium sequence - */ - if(ParseSeqStart(value_string, ptr_return)) - { - /* - * "input tray" - */ - tm.input_tray = XpOidParse(*ptr_return, ptr_return); - if((XpOidList*)NULL != valid_trays - && - !XpOidListHasOid(valid_trays, tm.input_tray) - ) - tm.input_tray = xpoid_none; - /* - * "medium" - */ - tm.medium = XpOidParse(*ptr_return, ptr_return); - /* - * parse out the InputTrayMedium sequence end character - */ - if(!ParseSeqEnd(*ptr_return, ptr_return)) - { - ErrorF("%s\n", XPMSG_WARN_ITM); - return NULL; - } - /* - * recurse to parse the next InputTrayMedium sequence - */ - list = TrayMediumListParse(*ptr_return, valid_trays, ptr_return, i+1); - if(list != (XpOidTrayMediumList*)NULL) - { - /* - * copy the current InputTrayMedium into the list - */ - memmove((list->list)+i, &tm, sizeof(XpOidTrayMedium)); - } - } - else - { - /* - * InputTrayMedium sequence start not found - */ - if(**ptr_return == '\0') - { - /* - * end of the list - */ - list = (XpOidTrayMediumList*) - XpOidCalloc(1, sizeof(XpOidTrayMediumList)); - list->count = i; - list->list = (XpOidTrayMedium*) - XpOidCalloc(i, sizeof(XpOidTrayMedium)); - } - else - { - /* - * syntax error - */ - ErrorF("%s\n", XPMSG_WARN_ITM); - return NULL; - } - } - /* - * return - */ - return list; -} - -/* - * ------------------------------------------------------------------------ - * Name: TrayMediumListValidate - * - * Description: - * - * Validate the input-trays-medium list based on a passed - * medium-source-sizes-supported structure. The validated - * input-trays-medium list will have the same number of entries upon - * return from this function. Invalid entries are indicated by - * setting the tray specification to xpoid_none. - * - * Return value: - * - * None. - * - */ -static void -TrayMediumListValidate(XpOidTrayMediumList* me, - const XpOidMediumSS* msss) -{ - int i_mss, i_ds, i_itm; - XpOid current_tray, current_medium; - XpOidMediumDiscreteSizeList* unspecified_tray_ds; - XpOidMediumDiscreteSizeList* tray_ds; - - if(msss == (XpOidMediumSS*)NULL - || - me == (XpOidTrayMediumList*)NULL) - { - return; - } - /* - * loop through the input trays medium list - */ - for(i_itm = 0; i_itm < XpOidTrayMediumListCount(me); i_itm++) - { - current_tray = XpOidTrayMediumListTray(me, i_itm); - if(current_tray == xpoid_none) - continue; - current_medium = XpOidTrayMediumListMedium(me, i_itm); - if(current_medium == xpoid_none) - { - /* - * no medium; invalidate this entry - */ - me->list[i_itm].input_tray = xpoid_none; - continue; - } - /* - * loop through the MediumSourceSizes, looking for an appropriate - * discrete sizes spec for the current tray - */ - unspecified_tray_ds = (XpOidMediumDiscreteSizeList*)NULL; - tray_ds = (XpOidMediumDiscreteSizeList*)NULL; - for(i_mss = 0; - i_mss < msss->count && - tray_ds == (XpOidMediumDiscreteSizeList*)NULL; - i_mss++) - { - switch((msss->mss)[i_mss].mstag) - { - case XpOidMediumSS_DISCRETE: - if((msss->mss)[i_mss].input_tray == current_tray) - tray_ds = (msss->mss)[i_mss].ms.discrete; - else if((msss->mss)[i_mss].input_tray == xpoid_unspecified) - unspecified_tray_ds = (msss->mss)[i_mss].ms.discrete; - break; - - case XpOidMediumSS_CONTINUOUS: - /* - * unsupported - */ - break; - } - } - /* - * if the tray was not matched, use the unspecified tray size - * list - */ - if(tray_ds == (XpOidMediumDiscreteSizeList*)NULL) - { - if(unspecified_tray_ds == (XpOidMediumDiscreteSizeList*)NULL) - { - /* - * not even an unspecified tray, invalidate this - * input-trays-medium entry. - */ - me->list[i_itm].input_tray = xpoid_none; - continue; - } - else - tray_ds = unspecified_tray_ds; - } - /* - * loop through the discrete sizes list, looking for a size that - * matches the medium for the current input tray - */ - for(i_ds = 0; i_ds < tray_ds->count; i_ds++) - { - /* - * check to see if the current input tray's medium size - * matches the current discrete size - * - * Note: in the CDEnext SI, medium identifiers coincide with - * medium-size identifiers. If the DP-Medium object is - * ever implemented, this check would need to be - * changed so that the input tray's medium size is - * obtained from the indicated Medium object, and not - * inferred from the medium identifier itself. - */ - if((tray_ds->list)[i_ds].page_size == current_medium) - { - /* - * The current input tray's medium size matches the - * current discrete medium size. - */ - break; - } - } - if(i_ds == tray_ds->count) - { - /* - * The current input tray's medium size was not found in the - * discrete size list; mark the input tray medium entry - * invalid - */ - me->list[i_itm].input_tray = xpoid_none; - } - - } -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidTrayMediumListString - * - * Description: - * - * Creates a string representation of an XpOidTrayMediumList structure. - * - * Return value: - * - * A newly allocated - * - */ -char* XpOidTrayMediumListString(const XpOidTrayMediumList* me) -{ - int i; - int length; - char* str; - char* ptr; - XpOid tray; - /* - * allocate enough memory for the string representation, - * including intervening delimiters and whitespace - */ - for(i = 0, length = 0; i < XpOidTrayMediumListCount(me); i++) - { - tray = XpOidTrayMediumListTray(me, i); - if(xpoid_none != tray) - { - length += XpOidStringLength(tray); - length += XpOidStringLength(XpOidTrayMediumListMedium(me, i)); - length += 4; - } - } - str = XpOidMalloc(length+1); - /* - * format the list - */ - for(i = 0, ptr = str; i < XpOidTrayMediumListCount(me); i++) - { - tray = XpOidTrayMediumListTray(me, i); - if(xpoid_none != tray) - { -#if defined(sun) && !defined(SVR4) - sprintf(ptr, "{%s %s} ", - XpOidString(tray), - XpOidString(XpOidTrayMediumListMedium(me, i))); - ptr += strlen(ptr); -#else - ptr += sprintf(ptr, "{%s %s} ", - XpOidString(tray), - XpOidString(XpOidTrayMediumListMedium(me, i))); -#endif - } - } - /* - * chop trailing whitespace or terminate empty string - */ - str[length] = '\0'; - /* - * return - */ - return str; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidTrayMediumListHasTray - * - * Description: - * - * Determines if 'tray' is found in 'list'. - * - * Return value: - * - * xTrue if the tray is found in the list. - * - * xFalse if the tray is not in the list, or if 'list' is NULL. - * - */ -BOOL -XpOidTrayMediumListHasTray(const XpOidTrayMediumList* list, XpOid tray) -{ - int i; - if(list != (XpOidTrayMediumList*)NULL && tray != xpoid_none) - for(i = 0; i < list->count; i++) - if(XpOidTrayMediumListTray(list, i) == tray) - return xTrue; - return xFalse; -} - -/* - * ------------------------------------------------------------------------ - * Name: ParseArea - * - * Description: - * - * Skips leading whitespace and parses out and returns a XpOidArea. - * - * Return value: - * - * xTrue if the XpOidArea was successfully parsed. ptr_return is - * updated to point to location where the parsing ended. - * - * xFalse if a XpOidArea was not found; ptr_return is updated - * to point to the first non-whitespace char in value_string. - * - */ -static BOOL -ParseArea(const char* value_string, - const char** ptr_return, - XpOidArea* area_return) -{ - const char* first_nonws_ptr; - const char* ptr; - /* - * skip leading whitespace - */ - first_nonws_ptr = value_string + SpanWhitespace(value_string); - /* - * parse out the area sequence start - */ - if(!ParseSeqStart(first_nonws_ptr, &ptr)) - goto ParseArea_error; - /* - * parse the minimum x value - */ - if(!ParseRealValue(ptr, &ptr, - area_return ? &area_return->minimum_x : NULL)) - goto ParseArea_error; - /* - * parse the maximum x value - */ - if(!ParseRealValue(ptr, &ptr, - area_return ? &area_return->maximum_x : NULL)) - goto ParseArea_error; - /* - * parse the minimum y value - */ - if(!ParseRealValue(ptr, &ptr, - area_return ? &area_return->minimum_y : NULL)) - goto ParseArea_error; - /* - * parse the maximum y value - */ - if(!ParseRealValue(ptr, &ptr, - area_return ? &area_return->maximum_y : NULL)) - goto ParseArea_error; - /* - * parse out the area sequence end - */ - if(!ParseSeqEnd(ptr, &ptr)) - goto ParseArea_error; - /* - * update the return pointer - */ - if(ptr_return != (const char**)NULL) - *ptr_return = ptr; - /* - * return - */ - return xTrue; - - - ParseArea_error: - /* - * syntax error - */ - if(ptr_return != (const char**)NULL) - *ptr_return = first_nonws_ptr; - return xFalse; -} - -/* - * ------------------------------------------------------------------------ - * Name: ParseRealRange - * - * Description: - * - * Skips leading whitespace and parses out and returns a - * XpOidRealRange. - * - * Return value: - * - * xTrue if the XpOidRealRange was successfully - * parsed. ptr_return is updated to point to location where the - * parsing ended. - * - * xFalse if a XpOidRealRange was not found; ptr_return is - * updated to point to the first non-whitespace char in value_string. - * - */ -static BOOL -ParseRealRange(const char* value_string, - const char** ptr_return, - XpOidRealRange* range_return) -{ - const char* first_nonws_ptr; - const char* ptr; - /* - * skip leading whitespace - */ - first_nonws_ptr = value_string + SpanWhitespace(value_string); - /* - * parse out the range sequence start - */ - if(!ParseSeqStart(first_nonws_ptr, &ptr)) - goto ParseRealRange_error; - /* - * parse the lower bound - */ - if(!ParseRealValue(ptr, &ptr, - range_return ? &range_return->lower_bound : NULL)) - goto ParseRealRange_error; - /* - * parse the upper bound - */ - if(!ParseRealValue(ptr, &ptr, - range_return ? &range_return->upper_bound : NULL)) - goto ParseRealRange_error; - /* - * parse out the range sequence end - */ - if(!ParseSeqEnd(ptr, &ptr)) - goto ParseRealRange_error; - /* - * update the return pointer - */ - if(ptr_return != (const char**)NULL) - *ptr_return = ptr; - /* - * return - */ - return xTrue; - - - ParseRealRange_error: - /* - * syntax error - */ - if(ptr_return != (const char**)NULL) - *ptr_return = first_nonws_ptr; - return xFalse; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidNotifyParse - * - * Description: - * - * - * Return value: - * - * - */ -XpOidNotify XpOidNotifyParse(const char* value_string) -{ - const char* ptr = value_string; - - if(value_string == (const char*)NULL) - return XPOID_NOTIFY_NONE; - /* - * look for an event handling profile sequence start - */ - if(!ParseSeqStart(value_string, &ptr)) - { - if('\0' == *ptr) - /* - * empty value is valid - */ - return XPOID_NOTIFY_NONE; - else - return XPOID_NOTIFY_UNSUPPORTED; - } - /* - * look for an event set sequence start - */ - if(!ParseSeqStart(ptr, &ptr)) - { - /* - * check for an empty event handling profile - */ - if(ParseSeqEnd(ptr, &ptr)) - { - ptr += SpanWhitespace(ptr); - if(*ptr == '\0') - /* - * valid empty event handling profile sequence - */ - return XPOID_NOTIFY_NONE; - } - return XPOID_NOTIFY_UNSUPPORTED; - } - /* - * the only event in the set should be report job completed - */ - if(xpoid_val_event_report_job_completed != XpOidParse(ptr, &ptr)) - return XPOID_NOTIFY_UNSUPPORTED; - /* - * event set sequence end - */ - if(!ParseSeqEnd(ptr, &ptr)) - return XPOID_NOTIFY_UNSUPPORTED; - /* - * delivery method of electronic mail - */ - if(xpoid_val_delivery_method_electronic_mail != XpOidParse(ptr, &ptr)) - return XPOID_NOTIFY_UNSUPPORTED; - /* - * event handling profile sequence end - */ - if(!ParseSeqEnd(ptr, &ptr)) - return XPOID_NOTIFY_UNSUPPORTED; - /* - * end of value - */ - ptr += SpanWhitespace(ptr); - if('\0' == *ptr) - /* - * valid supported notification profile - */ - return XPOID_NOTIFY_EMAIL; - else - return XPOID_NOTIFY_UNSUPPORTED; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidNotifyString - * - * Description: - * - * - * Return value: - * - * - */ -const char* XpOidNotifyString(XpOidNotify notify) -{ - switch(notify) - { - case XPOID_NOTIFY_NONE: - return NOTIFY_NONE_STR; - case XPOID_NOTIFY_EMAIL: - return NOTIFY_EMAIL_STR; - case XPOID_NOTIFY_UNSUPPORTED: - return (const char *)NULL; - } - - ErrorF("XpOidNotifyString: Unsupported notify=%ld\n", (long)notify); - return (const char *)NULL; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidDocFmtNew - * - * Description: - * - * - * Return value: - * - * - */ -XpOidDocFmt* -XpOidDocFmtNew(const char* value_string) -{ - XpOidDocFmt* doc_fmt; - const char* ptr; - - if((const char*)NULL == value_string) - return (XpOidDocFmt*)NULL; - ptr = value_string + SpanWhitespace(value_string); - if('\0' == *ptr) - return (XpOidDocFmt*)NULL; - /* - * get the document format from the value string - */ - doc_fmt = (XpOidDocFmt*)XpOidCalloc(1, sizeof(XpOidDocFmt)); - if(xTrue == XpOidDocFmtNext(doc_fmt, ptr, &ptr)) - { - /* - * verify that the document format is the only value specified - */ - ptr += SpanWhitespace(ptr); - if('\0' == *ptr) - /* - * valid document-format value - */ - return doc_fmt; - } - /* - * invalid - */ - XpOidDocFmtDelete(doc_fmt); - ErrorF("%s\n", XPMSG_WARN_DOC_FMT); - return (XpOidDocFmt*)NULL; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidDocFmtDelete - * - * Description: - * - * - * Return value: - * - * - */ -void -XpOidDocFmtDelete(XpOidDocFmt* doc_fmt) -{ - if((XpOidDocFmt*)NULL != doc_fmt) - { - XpOidFree(doc_fmt->format); - XpOidFree(doc_fmt->variant); - XpOidFree(doc_fmt->version); - XpOidFree(doc_fmt); - } -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidDocFmtString - * - * Description: - * - * - * Return value: - * - * - */ -char* -XpOidDocFmtString(XpOidDocFmt* doc_fmt) -{ - if((XpOidDocFmt*)NULL != doc_fmt) - { - if((char*)NULL != doc_fmt->format) - { - char* str = XpOidMalloc(1+SafeStrLen(doc_fmt->format)+ - 1+SafeStrLen(doc_fmt->variant)+ - 1+SafeStrLen(doc_fmt->version)+ - 1+1); - sprintf(str, "{%s %s %s}", doc_fmt->format, - (char*)NULL != doc_fmt->variant ? doc_fmt->variant : "", - (char*)NULL != doc_fmt->version ? doc_fmt->version : ""); - return str; - } - } - return (char*)NULL; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidDocFmtNext - * - * Description: - * - * Assumes non-NULL value string. - * - * Return value: - * - * - */ -static BOOL -XpOidDocFmtNext(XpOidDocFmt* doc_fmt, - const char* value_string, - const char** ptr_return) -{ - const char* ptr; - const char* first_nonws_ptr; - const char* format; - const char* variant; - const char* version; - int format_len; - int variant_len; - int version_len; - /* - * skip leading whitespace - */ - ptr = value_string + SpanWhitespace(value_string); - first_nonws_ptr = ptr; - /* - * sequence start - */ - if(!ParseSeqStart(ptr, &ptr)) - goto XpOidDocFmtNext_error; - /* - * skip whitepace to the start of the document format, and save the - * location - */ - ptr += SpanWhitespace(ptr); - format = ptr; - /* - * document format - */ - if(0 == (format_len = SpanToken(ptr))) - goto XpOidDocFmtNext_error; - ptr += format_len; - /* - * optional variant - */ - ptr += SpanWhitespace(ptr); - variant = ptr; - if(0 != (variant_len = SpanToken(ptr))) - { - ptr += variant_len; - /* - * optional version - */ - ptr += SpanWhitespace(ptr); - version = ptr; - version_len = SpanToken(ptr); - ptr += version_len; - } - else - version_len = 0; - /* - * sequence end - */ - if(!ParseSeqEnd(ptr, &ptr)) - goto XpOidDocFmtNext_error; - /* - * update return pointer - */ - if((const char**)NULL != ptr_return) - *ptr_return = ptr; - /* - * update the passed document format struct - */ - memset(doc_fmt, 0, sizeof(XpOidDocFmt)); - doc_fmt->format = XpOidMalloc(format_len+1); - strncpy(doc_fmt->format, format, format_len); - doc_fmt->format[format_len] = '\0'; - if(0 < variant_len) - { - doc_fmt->variant = XpOidMalloc(variant_len+1); - strncpy(doc_fmt->variant, variant, variant_len); - doc_fmt->variant[variant_len] = '\0'; - if(0 < version_len) - { - doc_fmt->version = XpOidMalloc(version_len+1); - strncpy(doc_fmt->version, version, version_len); - doc_fmt->version[version_len] = '\0'; - } - } - return xTrue; - - XpOidDocFmtNext_error: - if((const char**)NULL != ptr_return) - *ptr_return = first_nonws_ptr; - return xFalse; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidDocFmtListNew - * - * Description: - * - * - * Return value: - * - * - */ -XpOidDocFmtList* -XpOidDocFmtListNew(const char* value_string, - const XpOidDocFmtList* valid_fmts) -{ - if((char*)NULL != value_string) - { - const char* ptr; - return XpOidDocFmtListParse(value_string, valid_fmts, &ptr, 0); - } - return (XpOidDocFmtList*)NULL; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidDocFmtListDelete - * - * Description: - * - * - * Return value: - * - * - */ -void -XpOidDocFmtListDelete(XpOidDocFmtList* list) -{ - if((XpOidDocFmtList*)NULL != list) - { - int i; - for(i = 0; i < list->count; i++) - { - XpOidFree(list->list[i].format); - XpOidFree(list->list[i].variant); - XpOidFree(list->list[i].version); - } - XpOidFree(list->list); - XpOidFree(list); - } -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidDocFmtListString - * - * Description: - * - * Assumes the passed structure is valid. - * - * Return value: - * - * - */ -char* -XpOidDocFmtListString(const XpOidDocFmtList* list) -{ - if((XpOidDocFmtList*)NULL != list) - { - if(0 < list->count) - { - int i; - int str_len; - char* str; - char* ptr; - /* - * allocate the return string - */ - for(i = 0, str_len = 0; i < list->count; i++) - { - str_len += - 1 + SafeStrLen(list->list[i].format) + - 1 + SafeStrLen(list->list[i].variant) + - 1 + SafeStrLen(list->list[i].version) + 2; - } - str = XpOidMalloc(str_len+1); - /* - * print the list into the string and return it - */ - ptr = str; - for(i = 0; i < list->count; i++) - { - XpOidDocFmt* df = &list->list[i]; - -#if defined(sun) && !defined(SVR4) - sprintf(ptr, "{%s %s %s} ", - df->format, - (char*)NULL != df->variant ? df->variant : "", - (char*)NULL != df->version ? df->version : ""); - ptr += strlen(ptr); -#else - ptr += - sprintf(ptr, "{%s %s %s} ", - df->format, - (char*)NULL != df->variant ? df->variant : "", - (char*)NULL != df->version ? df->version : ""); -#endif - } - return str; - } - } - return (char*)NULL; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidDocFmtListParse - * - * Description: - * - * Assumes the passed value_string and ptr_return are non-NULL. - * - * Return value: - * - * - */ -static XpOidDocFmtList* -XpOidDocFmtListParse(const char* value_string, - const XpOidDocFmtList* valid_fmts, - const char** ptr_return, - int i) -{ - XpOidDocFmt doc_fmt; - XpOidDocFmtList* list; - BOOL status; - /* - * get the next document-format from the value string, skipping - * values not found in the passed list of valid formats - */ - *ptr_return = value_string; - while((status = XpOidDocFmtNext(&doc_fmt, *ptr_return, ptr_return)) - && - (const XpOidDocFmtList*)NULL != valid_fmts - && - !XpOidDocFmtListHasFmt(valid_fmts, &doc_fmt) - ); - - if(xFalse == status) - { - if('\0' == **ptr_return) - { - if(0 == i) - { - /* - * empty value string - */ - return (XpOidDocFmtList*)NULL; - } - else - { - /* - * done parsing; allocate the list and return - */ - list = - (XpOidDocFmtList*)XpOidCalloc(1, sizeof(XpOidDocFmtList)); - list->count = i; - list->list = (XpOidDocFmt*)XpOidCalloc(i, sizeof(XpOidDocFmt)); - return list; - } - } - else - { - /* - * invalid document format - */ - ErrorF("%s\n", XPMSG_WARN_DOCFMT_LIST); - return (XpOidDocFmtList*)NULL; - } - } - else - { - /* - * recurse to parse remaining document formats - */ - list = XpOidDocFmtListParse(*ptr_return, valid_fmts, ptr_return, i+1); - if((XpOidDocFmtList*)NULL != list) - { - /* - * add this doc fmt to the list - */ - list->list[i].format = doc_fmt.format; - list->list[i].variant = doc_fmt.variant; - list->list[i].version = doc_fmt.version; - } - return list; - } -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidDocFmtListHasFmt - * - * Description: - * - * Assumes the passed structure is valid. - * - * Return value: - * - * - */ -BOOL -XpOidDocFmtListHasFmt(const XpOidDocFmtList* list, - const XpOidDocFmt* fmt) -{ - int i; - if(list != (XpOidDocFmtList*)NULL - && - fmt != (XpOidDocFmt*)NULL - && - fmt->format != (char*)NULL - ) - { - for(i = 0; i < list->count; i++) - { - /* - * formats must match - */ - if(strcmp(fmt->format, list->list[i].format) != 0) - continue; - /* - * variants must both be NULL or match - */ - if(fmt->variant == (char*)NULL) - { - if(list->list[i].variant == (char*)NULL) - return xTrue; - else - continue; - } - if(list->list[i].variant == (char*)NULL) - continue; - if(strcmp(fmt->variant, list->list[i].variant) != 0) - continue; - /* - * versions must both be NULL or match - */ - if(fmt->version == (char*)NULL) - { - if(list->list[i].version == (char*)NULL) - return xTrue; - else - continue; - } - if(list->list[i].version == (char*)NULL) - continue; - if(strcmp(fmt->version, list->list[i].version) == 0) - return xTrue; - } - } - return xFalse; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidCardListNew - * - * Description: - * - * - * Return value: - * - * - */ -XpOidCardList* -XpOidCardListNew(const char* value_string, const XpOidCardList* valid_cards) -{ - if((const char*)NULL != value_string) - { - const char* ptr; - - return XpOidCardListParse(value_string, valid_cards, &ptr, 0); - } - else - return (XpOidCardList*)NULL; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidCardListDelete - * - * Description: - * - * - * Return value: - * - * - */ -void -XpOidCardListDelete(XpOidCardList* list) -{ - if((XpOidCardList*)NULL != list) - { - XpOidFree(list->list); - XpOidFree(list); - } -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidCardListString - * - * Description: - * - * - * Return value: - * - * - */ -char* -XpOidCardListString(const XpOidCardList* list) -{ - if((XpOidCardList*)NULL != list) - { - char buf[48]; - int str_len; - char* str; - int i; - char* ptr; - /* - * allocate the output string - */ - for(i = 0, str_len = 0; i < list->count; i++) -#if defined(sun) && !defined(SVR4) - { - sprintf(buf, "%lu", list->list[i]) + 1; - str_len += strlen(buf); - } -#else - str_len += sprintf(buf, "%lu", list->list[i]) + 1; -#endif - str = XpOidMalloc(str_len+1); - /* - * write the list to the string - */ - for(i = 0, ptr = str; i < list->count; i++) -#if defined(sun) && !defined(SVR4) - { - sprintf(ptr, "%lu ", list->list[i]); - ptr += strlen(ptr); - } -#else - ptr += sprintf(ptr, "%lu ", list->list[i]); -#endif - return str; - } - else - return (char*)NULL; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidCardListHasCard - * - * Description: - * - * Determines if 'card' is an element of 'list'. - * - * Return value: - * - * xTrue if the card is found in the list. - * - * xFalse if the card is not in the list, or if 'list' is NULL. - * - */ -BOOL -XpOidCardListHasCard(const XpOidCardList* list, unsigned long card) -{ - int i; - if(list != (XpOidCardList*)NULL) - for(i = 0; i < list->count; i++) - if(list->list[i] == card) - return xTrue; - return xFalse; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidCardListParse - * - * Description: - * - * Assumes the passed value_string and ptr_return are non-NULL. - * - * Return value: - * - * - */ -static XpOidCardList* -XpOidCardListParse(const char* value_string, - const XpOidCardList* valid_cards, - const char** ptr_return, - int i) -{ - unsigned long card; - XpOidCardList* list; - BOOL status; - - /* - * get the next card from the value string, skipping values not - * found in the passed list of valid cards - */ - *ptr_return = value_string; - while((status = XpOidParseUnsignedValue(*ptr_return, ptr_return, &card)) - && - (const XpOidCardList*)NULL != valid_cards - && - !XpOidCardListHasCard(valid_cards, card) - ); - - if(xFalse == status) - { - if('\0' == **ptr_return) - { - if(0 == i) - { - /* - * empty value string - */ - return (XpOidCardList*)NULL; - } - else - { - /* - * done parsing; allocate the list and return - */ - list = (XpOidCardList*)XpOidCalloc(1, sizeof(XpOidCardList)); - list->count = i; - list->list = - (unsigned long*)XpOidCalloc(i, sizeof(unsigned long)); - return list; - } - } - else - { - /* - * parsing error - */ - ErrorF("%s\n", XPMSG_WARN_CARD_LIST); - return (XpOidCardList*)NULL; - } - } - else - { - /* - * recurse to parse remaining cardinal values - */ - list = XpOidCardListParse(*ptr_return, valid_cards, ptr_return, i+1); - if((XpOidCardList*)NULL != list) - { - /* - * add this value to the list - */ - list->list[i] = card; - } - return list; - } -} - -/* - * ------------------------------------------------------------------------ - * Name: ParseBoolValue - * - * Description: - * - * - * Return value: - * - * - */ -static BOOL -ParseBoolValue(const char* value_string, - const char** ptr_return, - BOOL* bool_return) -{ - const char* ptr; - int length; - BOOL status; - /* - * skip leading whitespace - */ - ptr = value_string + SpanWhitespace(value_string); - /* - * get the whitespace-delimited token length - */ - length = SpanToken(ptr); - /* - * determine if true or false or bad - */ - if(StrnCaseCmp(ptr, "TRUE", length) == 0) - { - if(bool_return != (BOOL*)NULL) - *bool_return = xTrue; - status = xTrue; - } - else if(StrnCaseCmp(ptr, "FALSE", length) == 0) - { - if(bool_return != (BOOL*)NULL) - *bool_return = xFalse; - status = xTrue; - } - else - { - /* - * syntax error - */ - status = xFalse; - } - /* - * update the return pointer and return - */ - if(ptr_return != (const char**)NULL) - *ptr_return = status ? ptr+length : ptr; - return status; -} - -/* - * ------------------------------------------------------------------------ - * Name: XpOidParseUnsignedValue - * - * Description: - * - * Skips leading whitespace and parses out and returns a unsigned number. - * - * Return value: - * - * xTrue if a unsigned number was successfully parsed. ptr_return is - * updated to point to location where the unsigned number parsing - * ended. - * - * xFalse if a unsigned number was not found; ptr_return is updated - * to point to the first non-whitespace char in value_string. - * - */ -BOOL -XpOidParseUnsignedValue(const char* value_string, - const char** ptr_return, - unsigned long* unsigned_return) -{ - long value; - BOOL status; - const char* first_nonws_ptr; - const char* ptr; - /* - * skip leading whitespace - */ - first_nonws_ptr = value_string + SpanWhitespace(value_string); - value = strtol(first_nonws_ptr, (char**)(&ptr), 0); - if(ptr == first_nonws_ptr || value < 0) - status = xFalse; - else - status = xTrue; - /* - * update return parms - */ - if(ptr_return != (const char**)NULL) - *ptr_return = ptr; - if(unsigned_return != (unsigned long*)NULL) - *unsigned_return = (unsigned long)value; - /* - * return - */ - return status; -} - -/* - * ------------------------------------------------------------------------ - * Name: ParseRealValue - * - * Description: - * - * Skips leading whitespace and parses out and returns a real number. - * - * Return value: - * - * xTrue if a real number was successfully parsed. ptr_return is - * updated to point to location where the real number parsing - * ended. - * - * xFalse if a real number was not found; ptr_return is updated - * to point to the first non-whitespace char in value_string. - * - */ -static BOOL -ParseRealValue(const char* value_string, - const char** ptr_return, - float* real_return) -{ - float real_value; - BOOL status; - const char* first_nonws_ptr; - const char* ptr; - /* - * skip leading whitespace - */ - first_nonws_ptr = value_string + SpanWhitespace(value_string); - real_value = (float)strtod(first_nonws_ptr, (char**)(&ptr)); - if(ptr == first_nonws_ptr) - status = xFalse; - else - status = xTrue; - /* - * update return parms - */ - if(ptr_return != (const char**)NULL) - *ptr_return = ptr; - if(real_return != (float*)NULL) - *real_return = real_value; - /* - * return - */ - return status; -} - -/* - * ------------------------------------------------------------------------ - * Name: ParseSeqEnd - * - * Description: - * - * Description: - * - * Skips leading whitespace and parses out the sequence end - * character '}'. - * - * Return value: - * - * xTrue if the sequence end character was parsed; ptr_return is - * updated to point to the first char following the sequence end - * character. - * - * xFalse if the sequence end character was not found; ptr_return is - * updated to point to the first non-whitespace char in value_string. - * - */ -static BOOL -ParseSeqEnd(const char* value_string, - const char** ptr_return) -{ - const char* ptr; - BOOL status; - /* - * skip leading whitespace - */ - ptr = value_string + SpanWhitespace(value_string); - /* - * parse out the sequence end character - */ - if(*ptr == '}') - { - status = xTrue; - ++ptr; - } - else - status = xFalse; - /* - * update the return pointer - */ - if(ptr_return != (const char**)NULL) - *ptr_return = ptr; - /* - * return - */ - return status; -} - -/* - * ------------------------------------------------------------------------ - * Name: ParseSeqStart - * - * Description: - * - * Skips leading whitespace and parses out the sequence start - * character '{'. - * - * Return value: - * - * xTrue if the sequence start character was parsed; ptr_return is - * updated to point to the first char following the sequence start - * character. - * - * xFalse if the sequence start character was not found; ptr_return is - * updated to point to the first non-whitespace char in value_string. - * - */ -static BOOL -ParseSeqStart(const char* value_string, - const char** ptr_return) -{ - const char* ptr; - BOOL status; - /* - * skip leading whitespace - */ - ptr = value_string + SpanWhitespace(value_string); - /* - * parse out the sequence start character - */ - if(*ptr == '{') - { - status = xTrue; - ++ptr; - } - else - status = xFalse; - /* - * update the return pointer - */ - if(ptr_return != (const char**)NULL) - *ptr_return = ptr; - /* - * return - */ - return status; -} - -/* - * ------------------------------------------------------------------------ - * Name: ParseUnspecifiedValue - * - * Description: - * - * Skips leading whitespace and parses out an unspecified optional - * value (i.e. matching '' or "" - skips all data between the set of - * quotes). - * - * Return value: - * - * xTrue if an unspecified value was parsed; ptr_return is updated to - * point to the first char following the trailing quote. - * - * xFalse if an unspecified value was not found; ptr_return is updated - * to point to the first non-whitespace char in value_string. - * - */ -static BOOL -ParseUnspecifiedValue(const char* value_string, - const char** ptr_return) -{ - BOOL status; - const char* ptr; - /* - * skip leading whitespace - */ - ptr = value_string + SpanWhitespace(value_string); - /* - * parse out an unspecified optional value ('' or "") - */ - if(*ptr == '\'' || *ptr == '"') - { - char delim[2]; - - if(ptr_return != (const char**)NULL) - { - delim[0] = *ptr; - delim[1] = '\0'; - /* - * skip over the matching delimiter - */ - ++ptr; - ptr += strcspn(ptr, delim); - if(*ptr != '\0') - ++ptr; - } - status = xTrue; - } - else - status = xFalse; - /* - * update the return pointer - */ - if(ptr_return != (const char**)NULL) - *ptr_return = ptr; - /* - * return - */ - return status; -} - -/* - * ------------------------------------------------------------------------ - * Name: SpanToken - * - * Description: - * - * Returns the length of the initial segment of the passed string - * that consists entirely of non-whitespace and non-sequence - * delimiter characters. - * - * - */ -static int -SpanToken(const char* string) -{ - const char* ptr; - for(ptr = string; - *ptr != '\0' && !isspace(*ptr) && *ptr != '{' && *ptr != '}'; - ++ptr); - return ptr - string; -} - -/* - * ------------------------------------------------------------------------ - * Name: SpanWhitespace - * - * Description: - * - * Returns the length of the initial segment of the passed string - * that consists entirely of whitespace characters. - * - * - */ -static int -SpanWhitespace(const char* string) -{ - const char* ptr; - for(ptr = string; *ptr != '\0' && isspace(*ptr); ++ptr); - return ptr - string; -} - -#ifndef HAVE_STRCASECMP -/* - * ------------------------------------------------------------------------ - * Name: StrnCaseCmp - * - * Description: - * - * Implements strncasecmp() for those platforms that need it. - * - * - */ -static int -StrnCaseCmp(const char *s1, const char *s2, size_t len) -{ - char c1, c2; - int result; - - while (len--) - { - c1 = *s1++; - c2 = *s2++; - result = tolower(c1) - tolower(c2); - - if (result != 0) - return result; - } - - return 0; -} -#endif diff --git a/hw/xprint/Oid.h b/hw/xprint/Oid.h deleted file mode 100644 index 79e85ec64..000000000 --- a/hw/xprint/Oid.h +++ /dev/null @@ -1,293 +0,0 @@ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _Xp_Oid_h -#define _Xp_Oid_h - -#include - -/* - * include the auto-generated XpOid enum definition - */ -#include "OidDefs.h" - -/* - * messages - */ -#define XPMSG_WARN_MSS "Syntax error parsing medium-source-sizes" -#define XPMSG_WARN_ITM "Syntax error parsing input-trays-medium" -#define XPMSG_WARN_DOC_FMT "Syntax error parsing document format" -#define XPMSG_WARN_DOCFMT_LIST "Syntax error parsing document format list" -#define XPMSG_WARN_CARD_LIST "Syntax error parsing cardinal list" - -/* - * macros for memory allocation - */ -#define XpOidMalloc(size) ((char*)Xalloc((unsigned long)(size))) -#define XpOidCalloc(count, size) \ - ((char*)Xcalloc((unsigned long)((count)*(size)))) -#define XpOidFree(mem) (Xfree((unsigned long*)(mem))) - -/* - * list of object identifiers - */ -typedef struct _XpOidList -{ - XpOid* list; - int count; -} XpOidList; - -/* - * linked list of object identifiers - */ -typedef struct XpOidNodeStruct -{ - XpOid oid; - struct XpOidNodeStruct* next; -} *XpOidNode; - -typedef struct _XpOidLinkedList -{ - XpOidNode head; - XpOidNode tail; - XpOidNode current; - int count; -} XpOidLinkedList; - -/* - * XpOidMediumSourceSize and related definitions - */ -typedef struct -{ - float minimum_x; - float maximum_x; - float minimum_y; - float maximum_y; -} XpOidArea; - -typedef struct -{ - float lower_bound; - float upper_bound; -} XpOidRealRange; - -typedef struct -{ - XpOidRealRange range_across_feed; - float increment_across_feed; - XpOidRealRange range_in_feed; - float increment_in_feed; - BOOL long_edge_feeds; - XpOidArea assured_reproduction_area; -} XpOidMediumContinuousSize; - -typedef struct -{ - XpOid page_size; - BOOL long_edge_feeds; - XpOidArea assured_reproduction_area; -} XpOidMediumDiscreteSize; - -typedef struct -{ - XpOidMediumDiscreteSize* list; - int count; -} XpOidMediumDiscreteSizeList; - -typedef struct -{ - XpOid input_tray; /* may be set to xpoid_none or xpoid_unspecified */ - enum { XpOidMediumSS_DISCRETE, XpOidMediumSS_CONTINUOUS } mstag; - union - { - XpOidMediumDiscreteSizeList* discrete; - XpOidMediumContinuousSize* continuous_size; - } ms; /* "ms" is short for medium-size */ - -} XpOidMediumSourceSize; - -typedef struct -{ - XpOidMediumSourceSize* mss; - int count; -} XpOidMediumSS; - - -typedef struct -{ - XpOid input_tray; /* may be set to xpoid_none */ - XpOid medium; -} XpOidTrayMedium; - -typedef struct -{ - XpOidTrayMedium* list; - int count; -} XpOidTrayMediumList; - -typedef enum { - XPOID_NOTIFY_UNSUPPORTED, - XPOID_NOTIFY_NONE, - XPOID_NOTIFY_EMAIL -} XpOidNotify; - -typedef struct -{ - unsigned long *list; - int count; -} XpOidCardList; - -typedef struct -{ - char* format; - char* variant; - char* version; -} XpOidDocFmt; - -typedef struct -{ - XpOidDocFmt* list; - int count; -} XpOidDocFmtList; - - -/* - * XpOid public methods - */ -const char* XpOidString(XpOid); -int XpOidStringLength(XpOid); -XpOid XpOidFromString(const char* value); -BOOL XpOidTrayMediumListHasTray(const XpOidTrayMediumList* list, XpOid tray); - -/* - * XpOidList public methods - */ -XpOidList* XpOidListNew(const char* value_string, - const XpOidList* valid_oids); -#define XpOidListInit(l, a, c) { (l)->list = (a); (l)->count = (c); } -void XpOidListDelete(XpOidList*); -#define XpOidListCount(l) ((l) ? (l)->count : 0) -#define XpOidListGetOid(l, i) ((l) ? (l)->list[(i)] : xpoid_none) -int XpOidListGetIndex(const XpOidList* list, XpOid oid); -BOOL XpOidListHasOid(const XpOidList* list, XpOid oid); -char* XpOidListString(const XpOidList*); - - -/* - * XpOidLinkedList public methods - */ -XpOidLinkedList* XpOidLinkedListNew(void); -void XpOidLinkedListDelete(XpOidLinkedList*); -#define XpOidLinkedListCount(l) ((l) ? (l)->count : 0) -XpOid XpOidLinkedListGetOid(XpOidLinkedList* list, int i); -void XpOidLinkedListAddOid(XpOidLinkedList* list, XpOid oid); -int XpOidLinkedListGetIndex(XpOidLinkedList* list, XpOid oid); -BOOL XpOidLinkedListHasOid(XpOidLinkedList* list, - XpOid oid); -XpOid XpOidLinkedListFirstOid(XpOidLinkedList* list); -XpOid XpOidLinkedListNextOid(XpOidLinkedList* list); - -/* - * XpOidMediumSourceSize public methods - */ -XpOidMediumSS* XpOidMediumSSNew(const char* value_string, - const XpOidList* valid_trays, - const XpOidList* valid_medium_sizes); -void XpOidMediumSSDelete(XpOidMediumSS*); -#define XpOidMediumSSCount(me) ((me) ? (me)->count : 0) -BOOL XpOidMediumSSHasSize(XpOidMediumSS*, XpOid medium_size); -char* XpOidMediumSSString(const XpOidMediumSS*); - -/* - * XpOidTrayMediumList public methods - */ -XpOidTrayMediumList* XpOidTrayMediumListNew(const char* value_string, - const XpOidList* valid_trays, - const XpOidMediumSS* msss); -void XpOidTrayMediumListDelete(XpOidTrayMediumList* me); -#define XpOidTrayMediumListCount(me) ((me) ? (me)->count : 0) -#define XpOidTrayMediumListTray(me, i) \ - ((me) ? (me)->list[(i)].input_tray : xpoid_none) -#define XpOidTrayMediumListMedium(me, i) \ - ((me) ? (me)->list[(i)].medium : xpoid_none) -char* XpOidTrayMediumListString(const XpOidTrayMediumList*); - -/* - * XpOidNotify public methods - */ -XpOidNotify XpOidNotifyParse(const char* value_string); -const char* XpOidNotifyString(XpOidNotify notify); - -/* - * XpOidDocFmt public methods - */ -XpOidDocFmt* XpOidDocFmtNew(const char* value_string); -void XpOidDocFmtDelete(XpOidDocFmt*); -char* XpOidDocFmtString(XpOidDocFmt*); - -/* - * XpOidDocFmtList public methods - */ -XpOidDocFmtList* XpOidDocFmtListNew(const char* value_string, - const XpOidDocFmtList* valid_fmts); -void XpOidDocFmtListDelete(XpOidDocFmtList*); -char* XpOidDocFmtListString(const XpOidDocFmtList*); -#define XpOidDocFmtListCount(me) ((me) ? (me)->count : 0) -#define XpOidDocFmtListGetDocFmt(me, i) \ - ((me) ? &(me)->list[(i)] : (XpDocFmt*)NULL) -BOOL XpOidDocFmtListHasFmt(const XpOidDocFmtList* list, - const XpOidDocFmt* fmt); -/* - * XpOidCardList public methods - */ -XpOidCardList* XpOidCardListNew(const char* value_string, - const XpOidCardList* valid_cards); -#define XpOidCardListInit(l, a, c) { (l)->list = (a); (l)->count = (c); } -void XpOidCardListDelete(XpOidCardList*); -char* XpOidCardListString(const XpOidCardList*); -#define XpOidCardListCount(me) ((me) ? (me)->count : 0) -#define XpOidCardListGetCard(me, i) ((me) ? (me)->list[(i)] : 0) -BOOL XpOidCardListHasCard(const XpOidCardList*, unsigned long); - -/* - * misc parsing functions - */ -BOOL XpOidParseUnsignedValue(const char* value_string, - const char** ptr_return, - unsigned long* unsigned_return); - - -#endif /* _Xp_Oid_h - don't add anything after this line */ diff --git a/hw/xprint/OidDefs.h b/hw/xprint/OidDefs.h deleted file mode 100644 index a3b37eaaf..000000000 --- a/hw/xprint/OidDefs.h +++ /dev/null @@ -1,170 +0,0 @@ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ -/* This is an automatically-generated file. Do not edit. */ - -typedef enum { - xpoid_none, - xpoid_unspecified, - xpoid_att_descriptor, - xpoid_att_content_orientation, - xpoid_att_copy_count, - xpoid_att_default_printer_resolution, - xpoid_att_default_input_tray, - xpoid_att_default_medium, - xpoid_att_document_format, - xpoid_att_plex, - xpoid_att_xp_listfonts_modes, - xpoid_att_job_name, - xpoid_att_job_owner, - xpoid_att_notification_profile, - xpoid_att_xp_setup_state, - xpoid_att_xp_spooler_command_options, - xpoid_att_content_orientations_supported, - xpoid_att_document_formats_supported, - xpoid_att_dt_pdm_command, - xpoid_att_input_trays_medium, - xpoid_att_medium_source_sizes_supported, - xpoid_att_plexes_supported, - xpoid_att_printer_model, - xpoid_att_printer_name, - xpoid_att_printer_resolutions_supported, - xpoid_att_xp_embedded_formats_supported, - xpoid_att_xp_listfonts_modes_supported, - xpoid_att_xp_page_attributes_supported, - xpoid_att_xp_raw_formats_supported, - xpoid_att_xp_setup_proviso, - xpoid_att_document_attributes_supported, - xpoid_att_job_attributes_supported, - xpoid_att_locale, - xpoid_att_multiple_documents_supported, - xpoid_att_available_compression, - xpoid_att_available_compressions_supported, - xpoid_val_content_orientation_portrait, - xpoid_val_content_orientation_landscape, - xpoid_val_content_orientation_reverse_portrait, - xpoid_val_content_orientation_reverse_landscape, - xpoid_val_medium_size_iso_a0, - xpoid_val_medium_size_iso_a1, - xpoid_val_medium_size_iso_a2, - xpoid_val_medium_size_iso_a3, - xpoid_val_medium_size_iso_a4, - xpoid_val_medium_size_iso_a5, - xpoid_val_medium_size_iso_a6, - xpoid_val_medium_size_iso_a7, - xpoid_val_medium_size_iso_a8, - xpoid_val_medium_size_iso_a9, - xpoid_val_medium_size_iso_a10, - xpoid_val_medium_size_iso_b0, - xpoid_val_medium_size_iso_b1, - xpoid_val_medium_size_iso_b2, - xpoid_val_medium_size_iso_b3, - xpoid_val_medium_size_iso_b4, - xpoid_val_medium_size_iso_b5, - xpoid_val_medium_size_iso_b6, - xpoid_val_medium_size_iso_b7, - xpoid_val_medium_size_iso_b8, - xpoid_val_medium_size_iso_b9, - xpoid_val_medium_size_iso_b10, - xpoid_val_medium_size_na_letter, - xpoid_val_medium_size_na_legal, - xpoid_val_medium_size_executive, - xpoid_val_medium_size_folio, - xpoid_val_medium_size_invoice, - xpoid_val_medium_size_ledger, - xpoid_val_medium_size_quarto, - xpoid_val_medium_size_iso_c3, - xpoid_val_medium_size_iso_c4, - xpoid_val_medium_size_iso_c5, - xpoid_val_medium_size_iso_c6, - xpoid_val_medium_size_iso_designated_long, - xpoid_val_medium_size_na_10x13_envelope, - xpoid_val_medium_size_na_9x12_envelope, - xpoid_val_medium_size_na_number_10_envelope, - xpoid_val_medium_size_na_7x9_envelope, - xpoid_val_medium_size_na_9x11_envelope, - xpoid_val_medium_size_na_10x14_envelope, - xpoid_val_medium_size_na_number_9_envelope, - xpoid_val_medium_size_na_6x9_envelope, - xpoid_val_medium_size_na_10x15_envelope, - xpoid_val_medium_size_monarch_envelope, - xpoid_val_medium_size_a, - xpoid_val_medium_size_b, - xpoid_val_medium_size_c, - xpoid_val_medium_size_d, - xpoid_val_medium_size_e, - xpoid_val_medium_size_jis_b0, - xpoid_val_medium_size_jis_b1, - xpoid_val_medium_size_jis_b2, - xpoid_val_medium_size_jis_b3, - xpoid_val_medium_size_jis_b4, - xpoid_val_medium_size_jis_b5, - xpoid_val_medium_size_jis_b6, - xpoid_val_medium_size_jis_b7, - xpoid_val_medium_size_jis_b8, - xpoid_val_medium_size_jis_b9, - xpoid_val_medium_size_jis_b10, - xpoid_val_medium_size_hp_2x_postcard, - xpoid_val_medium_size_hp_european_edp, - xpoid_val_medium_size_hp_mini, - xpoid_val_medium_size_hp_postcard, - xpoid_val_medium_size_hp_tabloid, - xpoid_val_medium_size_hp_us_edp, - xpoid_val_medium_size_hp_us_government_legal, - xpoid_val_medium_size_hp_us_government_letter, - xpoid_val_plex_simplex, - xpoid_val_plex_duplex, - xpoid_val_plex_tumble, - xpoid_val_input_tray_top, - xpoid_val_input_tray_middle, - xpoid_val_input_tray_bottom, - xpoid_val_input_tray_envelope, - xpoid_val_input_tray_manual, - xpoid_val_input_tray_large_capacity, - xpoid_val_input_tray_main, - xpoid_val_input_tray_side, - xpoid_val_event_report_job_completed, - xpoid_val_delivery_method_electronic_mail, - xpoid_val_xp_setup_mandatory, - xpoid_val_xp_setup_optional, - xpoid_val_xp_setup_ok, - xpoid_val_xp_setup_incomplete, - xpoid_val_xp_list_glyph_fonts, - xpoid_val_xp_list_internal_printer_fonts, - xpoid_val_available_compressions_0, - xpoid_val_available_compressions_01, - xpoid_val_available_compressions_02, - xpoid_val_available_compressions_03, - xpoid_val_available_compressions_012, - xpoid_val_available_compressions_013, - xpoid_val_available_compressions_023, - xpoid_val_available_compressions_0123 -} XpOid; diff --git a/hw/xprint/OidStrs.h b/hw/xprint/OidStrs.h deleted file mode 100644 index 5ed2089e0..000000000 --- a/hw/xprint/OidStrs.h +++ /dev/null @@ -1,172 +0,0 @@ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ -/* This is an automatically-generated file. Do not edit. */ - -static int XpOidStringMapCount = 127; - -static const XpOidStringMapEntry XpOidStringMap[] = { - { "", 0 }, - { "", 0 }, - { "descriptor", 10 }, - { "content-orientation", 19 }, - { "copy-count", 10 }, - { "default-printer-resolution", 26 }, - { "default-input-tray", 18 }, - { "default-medium", 14 }, - { "document-format", 15 }, - { "plex", 4 }, - { "xp-listfonts-modes", 18 }, - { "job-name", 8 }, - { "job-owner", 9 }, - { "notification-profile", 20 }, - { "xp-setup-state", 14 }, - { "xp-spooler-command-options", 26 }, - { "content-orientations-supported", 30 }, - { "document-formats-supported", 26 }, - { "dt-pdm-command", 14 }, - { "input-trays-medium", 18 }, - { "medium-source-sizes-supported", 29 }, - { "plexes-supported", 16 }, - { "printer-model", 13 }, - { "printer-name", 12 }, - { "printer-resolutions-supported", 29 }, - { "xp-embedded-formats-supported", 29 }, - { "xp-listfonts-modes-supported", 28 }, - { "xp-page-attributes-supported", 28 }, - { "xp-raw-formats-supported", 24 }, - { "xp-setup-proviso", 16 }, - { "document-attributes-supported", 29 }, - { "job-attributes-supported", 24 }, - { "locale", 6 }, - { "multiple-documents-supported", 28 }, - { "available-compression", 21 }, - { "available-compressions-supported", 32 }, - { "portrait", 8 }, - { "landscape", 9 }, - { "reverse-portrait", 16 }, - { "reverse-landscape", 17 }, - { "iso-a0", 6 }, - { "iso-a1", 6 }, - { "iso-a2", 6 }, - { "iso-a3", 6 }, - { "iso-a4", 6 }, - { "iso-a5", 6 }, - { "iso-a6", 6 }, - { "iso-a7", 6 }, - { "iso-a8", 6 }, - { "iso-a9", 6 }, - { "iso-a10", 7 }, - { "iso-b0", 6 }, - { "iso-b1", 6 }, - { "iso-b2", 6 }, - { "iso-b3", 6 }, - { "iso-b4", 6 }, - { "iso-b5", 6 }, - { "iso-b6", 6 }, - { "iso-b7", 6 }, - { "iso-b8", 6 }, - { "iso-b9", 6 }, - { "iso-b10", 7 }, - { "na-letter", 9 }, - { "na-legal", 8 }, - { "executive", 9 }, - { "folio", 5 }, - { "invoice", 7 }, - { "ledger", 6 }, - { "quarto", 6 }, - { "iso-c3", 6 }, - { "iso-c4", 6 }, - { "iso-c5", 6 }, - { "iso-c6", 6 }, - { "iso-designated-long", 19 }, - { "na-10x13-envelope", 17 }, - { "na-9x12-envelope", 16 }, - { "na-number-10-envelope", 21 }, - { "na-7x9-envelope", 15 }, - { "na-9x11-envelope", 16 }, - { "na-10x14-envelope", 17 }, - { "na-number-9-envelope", 20 }, - { "na-6x9-envelope", 15 }, - { "na-10x15-envelope", 17 }, - { "monarch-envelope", 16 }, - { "a", 1 }, - { "b", 1 }, - { "c", 1 }, - { "d", 1 }, - { "e", 1 }, - { "jis-b0", 6 }, - { "jis-b1", 6 }, - { "jis-b2", 6 }, - { "jis-b3", 6 }, - { "jis-b4", 6 }, - { "jis-b5", 6 }, - { "jis-b6", 6 }, - { "jis-b7", 6 }, - { "jis-b8", 6 }, - { "jis-b9", 6 }, - { "jis-b10", 7 }, - { "hp-2x-postcard", 14 }, - { "hp-european-edp", 15 }, - { "hp-mini", 7 }, - { "hp-postcard", 11 }, - { "hp-tabloid", 10 }, - { "hp-us-edp", 9 }, - { "hp-us-government-legal", 22 }, - { "hp-us-government-letter", 23 }, - { "simplex", 7 }, - { "duplex", 6 }, - { "tumble", 6 }, - { "top", 3 }, - { "middle", 6 }, - { "bottom", 6 }, - { "envelope", 8 }, - { "manual", 6 }, - { "large-capacity", 14 }, - { "main", 4 }, - { "side", 4 }, - { "event-report-job-completed", 26 }, - { "electronic-mail", 15 }, - { "xp-setup-mandatory", 18 }, - { "xp-setup-optional", 17 }, - { "xp-setup-ok", 11 }, - { "xp-setup-incomplete", 19 }, - { "xp-list-glyph-fonts", 19 }, - { "xp-list-internal-printer-fonts", 30 }, - { "0", 1 }, - { "01", 2 }, - { "02", 2 }, - { "03", 2 }, - { "012", 3 }, - { "013", 3 }, - { "023", 3 }, - { "0123", 4 } -}; diff --git a/hw/xprint/Util.c b/hw/xprint/Util.c deleted file mode 100644 index eb7f839c9..000000000 --- a/hw/xprint/Util.c +++ /dev/null @@ -1,370 +0,0 @@ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -/* To get the tempnam() prototype in */ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#if defined(linux) && defined(__STRICT_ANSI__) -#undef __STRICT_ANSI__ -#endif - -#include /* for unistd.h and string.h */ -#include -#include -#include -#include "misc.h" -#include "dixstruct.h" - -#include - -#include "attributes.h" - -#define IN_FILE_STRING "%(InFile)%" -#define OUT_FILE_STRING "%(OutFile)%" - -/* - * ReplaceAnyString returns a string combining the input strings. - * It replaces all occurances of 'target' with the supplied - * 'replacement'. - * The original input string will generally be freed, - * and the caller is responsible for freeing whatever string is returned. - */ -char * -ReplaceAnyString( - char *string, - char *target, - char *replacement) -{ - char *pKeyString; - - if(replacement != (char *)NULL) - { - while((pKeyString = strstr(string, target)) != (char *)NULL) - { - char *newString; - - newString = (char *)xalloc(strlen(string) + strlen(replacement) - - strlen(target) + 1); - strncpy(newString, string, pKeyString - string); - newString[pKeyString - string] = '\0'; - strcat(newString, replacement); - strcat(newString, pKeyString + strlen(target)); - xfree(string); - string = newString; - } - } - - return string; -} - -/* - * ReplaceFileString returns a string combining the input strings. - * It replaces all occurances of IN_FILE_STRING with the supplied - * inFileName, and all occurances of OUT_FILE_STRING with the - * supplied outFileName. The original input string will generally be freed, - * and the caller is responsible for freeing whatever string is returned. - */ -char * -ReplaceFileString( - char *string, - char *inFileName, - char *outFileName) -{ - char *pKeyString, - *pInFileString = IN_FILE_STRING, - *pOutFileString = OUT_FILE_STRING; - - if(inFileName != (char *)NULL) - { - while((pKeyString = strstr(string, pInFileString)) != - (char *)NULL) - { - char *newString; - - newString = (char *)xalloc(strlen(string) + - strlen(inFileName) + 1); - strncpy(newString, string, pKeyString - string); - newString[pKeyString - string] = '\0'; - strcat(newString, inFileName); - strcat(newString, pKeyString + strlen(pInFileString)); - xfree(string); - string = newString; - } - } - - if(outFileName != (char *)NULL) - { - while((pKeyString = strstr(string, pOutFileString)) != - (char *)NULL) - { - char *newString; - - newString = (char *)xalloc(strlen(string) + - strlen(outFileName) + 1); - strncpy(newString, string, pKeyString - string); - newString[pKeyString - string] = '\0'; - strcat(newString, outFileName); - strcat(newString, pKeyString + strlen(pOutFileString)); - xfree(string); - string = newString; - } - } - return string; -} - - -/* - * TransferBytes reads numBytes of data from pSrcFile and writes them - * to pDstFile. It returns the number of bytes actually transfered, - * which will be numBytes if it's successful. Neither pSrcFile nor - * pDstFile are rewound or their pointers otherwise modified prior to - * beginning the transfer. - */ -int -TransferBytes( - FILE *pSrcFile, - FILE *pDstFile, - int numBytes) -{ - char buf[10240]; -#define BUF_SIZE (sizeof(buf)*sizeof(char)) - int bytesWritten = 0; - unsigned bytesToXfer; - - for(bytesToXfer = min(BUF_SIZE, (unsigned)numBytes); - bytesToXfer > 0; - bytesToXfer = min(BUF_SIZE, (unsigned)(numBytes - bytesWritten))) - { - if(fread((void *)buf, (size_t) 1, bytesToXfer, pSrcFile) < bytesToXfer) - return bytesWritten; - if(fwrite((void *)buf, (size_t) 1, bytesToXfer, pDstFile) < bytesToXfer) - return bytesWritten; - bytesWritten += bytesToXfer; - } - return bytesWritten; -} - -/* - * CopyContentsAndDelete - does the work of copying and deleting the - * pre, no, and post raster files as well as the raster file itself. - */ -Bool -CopyContentsAndDelete( - FILE **ppSrcFile, - char **pSrcFileName, - FILE *pDstFile) -{ - struct stat statBuf; - - if(stat(*pSrcFileName, &statBuf) < 0) - return FALSE; - rewind(*ppSrcFile); - if(TransferBytes(*ppSrcFile, pDstFile, - (int)statBuf.st_size) != (int)statBuf.st_size) - return FALSE; - fclose(*ppSrcFile); - *ppSrcFile = (FILE *)NULL; - unlink(*pSrcFileName); - xfree(*pSrcFileName); - *pSrcFileName = (char *)NULL; - - return TRUE; -} - - -#define QUADPAD(x) ((((x)+3)>>2)<<2) - -int -XpSendDocumentData( - ClientPtr client, - FILE *fp, - int fileLen, - int maxBufSize) -{ - xPrintGetDocumentDataReply *pRep; - int bytesWritten; - unsigned bytesToWrite; - int result = Success; - - if(client->clientGone) - return Success; - - pRep = (xPrintGetDocumentDataReply *)xalloc(sz_xPrintGetDocumentDataReply+ - QUADPAD(maxBufSize)); - - for(bytesToWrite = min(maxBufSize, fileLen), - bytesWritten = 0; - bytesToWrite > 0; - bytesToWrite = min(maxBufSize, fileLen - bytesWritten)) - { - pRep->type = X_Reply; - pRep->sequenceNumber = client->sequence; - pRep->length = (QUADPAD(bytesToWrite)) >> 2; - pRep->dataLen = bytesToWrite; - - if(fread((void *)(pRep + 1), 1, bytesToWrite, fp) < bytesToWrite) - { - result = BadAlloc; /* XXX poor error choice? */ - pRep->statusCode = 2; /* XXX Is this the right value??? */ - } - else - pRep->statusCode = 0; /* XXX Ignored??? */ - - pRep->finishedFlag = FALSE; - - if (client->swapped) { - int n; - long l; - - swaps(&pRep->sequenceNumber, n); - swapl(&pRep->length, l); - swapl(&pRep->statusCode, l); /* XXX Why are these longs??? */ - swapl(&pRep->finishedFlag, l); /* XXX Why are these longs??? */ - swapl(&pRep->dataLen, l); - } - - (void)WriteToClient(client, - sz_xPrintGetDocumentDataReply + bytesToWrite, - (char *)pRep); - bytesWritten += bytesToWrite; - } - - xfree(pRep); - return result; -} - -/* - * XpFinishDocData - send a DocumentData reply with the "finishedFlag" - * field set to TRUE. This routine should be called from the EndJob - * function of a driver after the driver has sent all required - * document data (presumably via XpSendDocumentData). - */ -int -XpFinishDocData( - ClientPtr client) -{ - xPrintGetDocumentDataReply rep; - - if(client->clientGone) - return Success; - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.dataLen = 0; - rep.finishedFlag = TRUE; - rep.statusCode = 0; - - if (client->swapped) { - int n; - long l; - - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, l); - swapl(&rep.statusCode, l); /* XXX Why are these longs??? */ - swapl(&rep.finishedFlag, l); /* XXX Why are these longs??? */ - swapl(&rep.dataLen, l); - } - - (void)WriteToClient(client, sz_xPrintGetDocumentDataReply, (char *)&rep); - return Success; -} - -#ifndef HAVE_MKSTEMP -static -char *XpDirName(char *fname) -{ - char *fn, *ptr; - - fn = (char *)xalloc(strlen(fname) + 1); - if (fn) { - strcpy(fn, fname); - ptr = strrchr(fn, '/'); - if (!ptr) { - ptr = fn; - *ptr++ = '.'; - } else if (ptr == fn) - ptr++; - *ptr = '\0'; - } - return fn; -} -#endif - -Bool -XpOpenTmpFile( - char *mode, - char **fname, - FILE **stream) -{ -#ifndef HAVE_MKSTEMP - char *fn = NULL; - - /* note that there is a small race condition here... */ - if (!(*fname = tempnam(NULL, NULL)) || - !(fn = XpDirName(*fname)) || - access(fn, W_OK) || - !(*stream = fopen(*fname, mode))) - - { - xfree(fn); - xfree(*fname); - *fname = NULL; - *stream = NULL; - return FALSE; - } - xfree(fn); -#else - int fd; - - *stream = NULL; - *fname = (char *)xalloc(14); - if (*fname == NULL) - return FALSE; - strcpy(*fname, "/tmp/xpXXXXXX"); - fd = mkstemp(*fname); - if (fd < 0) { - xfree(*fname); - *fname = NULL; - return FALSE; - } - *stream = fdopen(fd, mode); - if (stream == NULL) { - xfree(*fname); - *fname = NULL; - return FALSE; - } -#endif - return TRUE; -} diff --git a/hw/xprint/ValTree.c b/hw/xprint/ValTree.c deleted file mode 100644 index 5f58de7ec..000000000 --- a/hw/xprint/ValTree.c +++ /dev/null @@ -1,191 +0,0 @@ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include "scrnintstr.h" -#include "validate.h" -#include "windowstr.h" -#include "mi.h" -#include "regionstr.h" -#include "mivalidate.h" - -/* - * XpValidateTree - a validateTree routine which ignores overlapping - * top-level windows when computing the clip lists for such windows. - * This can be used by any driver which maintains a separate memory - * store for each top-level window (with its respective children). - * If the pParent is not the root window, then miValidateTree - * is used unmodified. - * - * The strategy if pParent is the root is to save off the - * current values of pParent->firstChild and pParent->lastChild, - * replacing both with the single child of interest. We save off - * pChild->prevSib and pChild->nextSib, and replace them with NullWindow. - * We save off pParent->clipList, and replace it with - * pParent->winSize - pChild->winSize. We then call miValidateTree - * to do the needed ComputeClips on the pChild's heirarchy. - * pParent's clipList is then recomputed based on the sizes - * of its children, and the saved pointers are restored. - * The trees associated with the siblings of pChild must be descended - * and cleaned of any marks (i.e. the valdata pointer freed, and set to NULL), - * and pParent' AfterValidate structure's exposed field must be updated. - */ -/*ARGSUSED*/ -int -XpValidateTree (pParent, pChild, kind) - WindowPtr pParent; /* Parent to validate */ - WindowPtr pChild; /* First child of pParent that was - * affected */ - VTKind kind; /* What kind of configuration caused call */ -{ - RegionRec origPrntClip; /* orig clipList for parent */ - RegionRec childClip; /* The new borderClip for the current - * child */ - RegionRec tmpPrntClip; /* parent clipList - child borderClip */ - RegionRec exposed; /* For intermediate calculations */ - register ScreenPtr pScreen; - register WindowPtr pWin; - Bool overlap; - int viewvals; - Bool forward; - - WindowPtr origFirstChild, origLastChild, origPrevSib, origNextSib; - - /* - * If we're validating something other than a top-level window, - * then just invoke miValidateTree. - */ - if(pParent->parent != NullWindow) - return miValidateTree(pParent, pChild, kind); - - /* - * If it's a stack change of top levels then it's a no-op for - * this scheme, so we just clean up any marks on windows and return. - */ - if(kind == VTStack) - { - CleanMarks(pParent); - return 1; - } - - pScreen = pParent->drawable.pScreen; - if (pChild == NullWindow) - pChild = pParent->firstChild; - - /* Save off the existing window heirarchy */ - origFirstChild = pParent->firstChild; - origLastChild = pParent->lastChild; - origPrevSib = pChild->prevSib; - origNextSib = pChild->nextSib; - pParent->firstChild = pChild; - pParent->lastChild = pChild; - pChild->prevSib = NullWindow; - pChild->nextSib = NullWindow; - - /* - * Set pParent's clipList to be its winSize minus the pChild's - * borderSize. - */ - origPrntClip = pParent->clipList; - REGION_NULL(pScreen, &tmpPrntClip); - REGION_SUBRACT(pScreen, &tmpPrntClip, &pParent->winSize, - &pChild->borderSize); - pParent->clipList = tmpPrntClip; - - /* - * Call miValidateTree on the pruned tree. - */ - (void) miValidateTree(pParent, pChild, kind); - - /* Restore the saved heirarchy */ - pChild->prevSib = origPrevSib; - pChild->nextSib = origNextSib; - pParent->firstChild = origFirstChild; - pParent->lastChild = origLastChild; - - /* - * Compute pParent's clipList by taking its winSize and subracting - * the borderSize of each of its children. - */ - for(pWin = pParent->firstChild, - REGION_COPY(pScreen, &pParent->clipList, &pParent->winSize); - pWin != NullWindow; - pWin = pWin->nextSib) - { - REGION_SUBTRACT(pScreen, &pParent->clipList, &pParent->clipList, - &pWin->borderSize); - } - - /* - * Compute pParent's AfterValidate structure by subracting the original - * clipList from the newly computed clipList. - */ - REGION_NULL(pScreen, &pParent->valdata->after.exposed); - REGION_SUBTRACT(pScreen, &pParent->valdata->after.exposed, - &pParent->clipList, &origPrntClip); - - /* - * Remove the marks from all but pParent and pChild's heirarchy. - * i.e. from all of pChild's siblings and their children. - */ - for(pWin = pParent->firstChild; pWin != NullWindow; pWin = pWin->nextSib) - { - WindowPtr pCurChild = pWin; - - if(pCurChild == pChild) - continue; - - while (1) - { - if(pCurChild->valdata) - { - xfree(pCurChild->valdata); - pCurChild->valdata = (ValidatePtr)NULL; - } - - if (pCurChild->firstChild) - { - pCurChild = pCurChild->firstChild; - continue; - } - while (!pCurChild->nextSib && (pCurChild != pWin)) - pCurChild = pCurChild->parent; - if (pCurChild == pWin) - break; - pCurChild = pCurChild->nextSib; - } - } -} diff --git a/hw/xprint/attributes.c b/hw/xprint/attributes.c deleted file mode 100644 index e79360496..000000000 --- a/hw/xprint/attributes.c +++ /dev/null @@ -1,1740 +0,0 @@ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ -/******************************************************************* -** -** ********************************************************* -** * -** * File: attributes.c -** * -** * Contents: -** * Implementation of the attribute store for Xp. -** * -** * Copyright: Copyright 1995 Hewlett-Packard Company -** * -** ********************************************************* -** -********************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if (defined(sun) && defined(SVR4)) || defined(__SCO__) || defined(__UNIXWARE__) -#include -#endif -#include "scrnintstr.h" - -#include - -#include "attributes.h" - -#include -#include - -#include "spooler.h" - -#ifndef MIN -#define MIN(a,b) (((a)<(b))?(a):(b)) -#endif -#ifndef MAX -#define MAX(a,b) (((a)>(b))?(a):(b)) -#endif - - -static XrmDatabase CopyDb(XrmDatabase inDb); - -extern XrmDatabase XpSpoolerGetServerAttributes(void); - -static int attrGeneration = 0; - -typedef struct { - XrmDatabase *pDb; - char *qualifier; - char *modelId; -} DbEnumStruct; - -typedef struct { - char *stringDb; - int nextPos; - int space; -} StringDbStruct; - -typedef struct _printerAttrs { - struct _printerAttrs *next; - char *name; - char *qualifier; - XrmDatabase printerAttrs; - XrmDatabase docAttrs; - XrmDatabase jobAttrs; -} PrAttrs, *PrAttrPtr; - -static PrAttrPtr attrList = (PrAttrPtr)NULL; - -typedef struct _systemAttrs { - XrmDatabase doc; - XrmDatabase job; - XrmDatabase printers; - XrmDatabase server; -} SysAttrs, *SysAttrsPtr; - -SysAttrs systemAttributes; - -/* - * attrCtxtPrivIndex hold the attribute store's context private index. - * This index is allocated at the time the attribute store is initialized. - */ -static DevPrivateKey attrCtxtPrivKey = &attrCtxtPrivKey; - -/* - * The ContextAttrs structure descibes the context private space reserved - * by the attribute store. - */ -typedef struct _contextAttrs { - XrmDatabase printerAttrs; - XrmDatabase docAttrs; - XrmDatabase jobAttrs; - XrmDatabase pageAttrs; -} ContextAttrs, *ContextAttrPtr; - -/* - * XPDIR is relative to (i.e. is a subdir of) XPRINTDIR/$LANG. - */ -static const char XPDIR[] = "/print"; -/* - * The following files/directories define or are within subdirectories of the - * above-defined XPDIR. - */ -static const char XPPRINTERATTRFILE[] = "/attributes/printer"; -static const char XPJOBATTRFILE[] = "/attributes/job"; -static const char XPDOCATTRFILE[] = "/attributes/document"; -static const char XPMODELDIR[] = "/models"; - -static char NULL_STRING[] = "\0"; - -/* - * XpGetConfigDirBase returns a string containing the path name of the base - * where the print server configuration directory is localed. - */ -static -char *XpGetConfigDirBase(void) -{ - char *configDir; - - /* - * If the XPCONFIGDIR environment variable is not set, then use the - * compile-time constant XPRINTDIR. XPRINTDIR is passed in on the - * compile command line, and is defined in $(TOP)/config/cf/Project.tmpl. - */ - if((configDir = getenv("XPCONFIGDIR")) == (char *)NULL) - configDir = XPRINTDIR; - - return configDir; -} - -/* - * XpGetConfigDir returns a string containing the path name of the print - * server configuration directory. If the useLocale parameter is False - * the it returns the path to the "/C" directory. If the useLocale - * parameter is True it returns the path to the directory associated with - * $LANG. It makes no attempt to ensure that the directory actually exists. - */ -char * -XpGetConfigDir(Bool useLocale) -{ - char *dirName, *langName, *langDir, *configDir; - Bool freeLangDir = False; - - if(useLocale == False) langDir = "/C"; - else - { - langName = getenv("LC_ALL"); - if (langName == NULL) { - langName = getenv("LANG"); - } - - if(langName == (char *)NULL) - return (char *)NULL; - else - { - if(strcmp(langName, "C") == 0) - return (char *)NULL; - langDir = (char *)xalloc(strlen(langName) + 2); - sprintf(langDir, "/%s", langName); - freeLangDir = True; - } - } - - configDir = XpGetConfigDirBase(); - - dirName = (char *)xalloc(strlen(configDir) + strlen(XPDIR) + - strlen(langDir) + 1); - sprintf(dirName, "%s%s%s", configDir, langDir, XPDIR); - - if(freeLangDir == True) - xfree(langDir); - - return dirName; -} - -/* - * GetMergedDatabase reads and merges xrmdb files from the top-level printer - * config directory, and from the directory associated with the current - * locale (if other than the top-level). - */ -static XrmDatabase -GetMergedDatabase(const char *attrName) -{ - char *dirName, *fileName; - XrmDatabase db; - - if((dirName = XpGetConfigDir(False)) == (char *)NULL) - return (XrmDatabase)NULL; - if((fileName = (char *)xalloc(strlen(dirName) + strlen(attrName) + 1)) == - (char *)NULL) - return (XrmDatabase)NULL; - sprintf(fileName, "%s%s", dirName, attrName); - db = XrmGetFileDatabase(fileName); - xfree(fileName); - xfree(dirName); - - if((dirName = XpGetConfigDir(True)) == (char *)NULL) - return db; - if((fileName = (char *)xalloc(strlen(dirName) + strlen(attrName) + 1)) == - (char *)NULL) - return db; - sprintf(fileName, "%s%s", dirName, attrName); - (void)XrmCombineFileDatabase(fileName, &db, True); - xfree(fileName); - xfree(dirName); - - return db; -} - -/* - * BuildSystemAttributes reads the on-disk configuration files for printers, - * initial job, and initial document attributes. The resulting xrm - * databases are then dissected as needed for each printer. - * It also allocates a contextPrivate space for the attributes, - * reserving space to store pointers to the attribute stores for - * the context. - */ -static void -BuildSystemAttributes(void) -{ - if(systemAttributes.printers != (XrmDatabase)NULL) - XrmDestroyDatabase(systemAttributes.printers); - systemAttributes.printers = GetMergedDatabase(XPPRINTERATTRFILE); - if(systemAttributes.job != (XrmDatabase)NULL) - XrmDestroyDatabase(systemAttributes.job); - systemAttributes.job = GetMergedDatabase(XPJOBATTRFILE); - if(systemAttributes.doc != (XrmDatabase)NULL) - XrmDestroyDatabase(systemAttributes.doc); - systemAttributes.doc = GetMergedDatabase(XPDOCATTRFILE); - if(systemAttributes.server != (XrmDatabase)NULL) - XrmDestroyDatabase(systemAttributes.server); - systemAttributes.server = XpSpoolerGetServerAttributes(); - return; -} - -/* - * AddDbEntry is called by XrmEnumerateDatabase, and adds the supplied - * database entry to the database pointed to within the "DbEnumStruct" - * passed as the client_data (aka "closure"). - */ -static Bool -AddDbEntry( - XrmDatabase *sourceDB, - XrmBindingList bindings, - XrmQuarkList quarks, - XrmRepresentation *type, - XrmValue *value, - XPointer client_data) -{ - DbEnumStruct *pEnumStruct = (DbEnumStruct *)client_data; - XrmName xrm_name[5]; - XrmClass xrm_class[5]; - XrmBinding xrm_bind[3]; - XrmValue realVal; - XrmRepresentation rep_type; - - xrm_name[0] = XrmStringToQuark (pEnumStruct->qualifier); - xrm_class[0] = XrmStringToQuark (pEnumStruct->modelId); - - for(;*quarks; quarks++) - xrm_name[1] = xrm_class[1] = *quarks; - - xrm_name[2] = (XrmQuark)NULL; - xrm_class[2] = (XrmQuark)NULL; - - if(XrmQGetResource (*sourceDB, xrm_name, xrm_class, &rep_type, &realVal)) - { - xrm_bind[0] = XrmBindLoosely; - - xrm_name[0] = xrm_name[1]; - xrm_name[1] = NULLQUARK; - - XrmQPutStringResource(pEnumStruct->pDb, xrm_bind, xrm_name, - (char *)realVal.addr); - } - - return FALSE; -} - -/* - * BuildPrinterAttrs - builds and returns an XrmDatabase for the printer - * of the specified name/qualifier, if we have enough information. - * If we don't have a model-config - * file, then just enumerate the systemAttributes->printers database, - * otherwise read in the model-config database and merge into it the - * systemAttributes->printers database. This database is then enumerated - * with the printer qualifier (and the model name as class if we have it), and - * the resulting elements are stored into the database for this particular - * printer. - */ -static XrmDatabase -BuildPrinterAttrs( - char *printerName, - char *qualifierName) -{ - XrmDatabase printerDB = (XrmDatabase)NULL; - - if(systemAttributes.printers != (XrmDatabase)NULL) - { - char *fileName; - XrmDatabase modelDB = (XrmDatabase)NULL; - XrmName xrm_name[5], xrm_class[2]; - XrmRepresentation rep_type; - XrmValue value; - DbEnumStruct enumStruct; - Bool freeModelDB = False; - /* - * Build the initial db based on the model-config files - */ - xrm_name[0] = XrmStringToQuark (qualifierName); - xrm_name[1] = XrmStringToQuark ("xp-model-identifier"); - xrm_name[2] = (XrmQuark)NULL; - XrmQGetResource (systemAttributes.printers, xrm_name, xrm_name, - &rep_type, &value); - - if(value.addr != (XPointer)NULL) - { - fileName = (char *)xalloc(strlen(XPMODELDIR) + - strlen((char *)value.addr) + - strlen("model-config") + 3); - sprintf(fileName, "%s/%s/%s", XPMODELDIR, value.addr, - "model-config"); - modelDB = GetMergedDatabase(fileName); - xfree(fileName); - if(modelDB != (XrmDatabase)NULL) - { - XrmDatabase tempDB = (XrmDatabase)NULL; - /* - * have to make a temp copy because MergeDatabase destroys - * the "source" database. Merge in the printers DB - */ - tempDB = CopyDb(systemAttributes.printers); - XrmMergeDatabases(tempDB, &modelDB); - freeModelDB = True; - } - } - - /* - * Check to see if we knew the name AND found a database file - */ - if(modelDB == (XrmDatabase)NULL) - modelDB = systemAttributes.printers; - - xrm_name[0] = XrmStringToQuark (qualifierName); - xrm_name[1] = (XrmQuark)NULL; - xrm_class[0] = XrmStringToQuark((char *)value.addr); - xrm_class[1] = (XrmQuark)NULL; - enumStruct.pDb = &printerDB; - enumStruct.qualifier = (char *)qualifierName; - enumStruct.modelId = (char *)value.addr; - XrmEnumerateDatabase(modelDB, xrm_name, xrm_class, XrmEnumAllLevels, - AddDbEntry, (XPointer) &enumStruct); - - if(freeModelDB == True) XrmDestroyDatabase(modelDB); - } - XrmPutStringResource(&printerDB, "*printer-name", printerName); - XrmPutStringResource(&printerDB, "*qualifier", qualifierName); - return printerDB; -} - -/* - * BuildABase - builds an XrmDatabase by enumerating the supplied sourceBase - * database for elements relevant for the printer named by printerName, - * and deriving a class for printerName from the model declared in the - * systemAttributes.printers database. If no model is defined for this - * printer then the printerName is used as the class as well. - * - * This is used to build the initial value document and initial value - * job attribute databases for each printer by searching the system - * level doc and job databases. - */ -static XrmDatabase -BuildABase( - char *printerName, - char *qualifierName, - XrmDatabase sourceBase) -{ - XrmDatabase builtDB = (XrmDatabase)NULL; - - if(sourceBase != (XrmDatabase)NULL) - { - XrmName xrm_name[5], xrm_class[2]; - XrmRepresentation rep_type; - XrmValue value; - DbEnumStruct enumStruct; - - /* - * Retrieve the model name for use as the class. - */ - xrm_name[0] = XrmStringToQuark (printerName); - xrm_name[1] = XrmStringToQuark ("xp-model-identifier"); - xrm_name[2] = (XrmQuark)NULL; - XrmQGetResource (systemAttributes.printers, xrm_name, xrm_name, - &rep_type, &value); - /* - * if we have a model name then use it as the class, otherwise - * just use the printer name as the class as well as the name. - */ - if(value.addr != (XPointer)NULL) - xrm_class[0] = XrmStringToQuark((char *)value.addr); - else - xrm_class[0] = xrm_name[0]; - xrm_class[1] = (XrmQuark)NULL; - - xrm_name[1] = (XrmQuark)NULL; - - enumStruct.pDb = &builtDB; - enumStruct.qualifier = (char *)qualifierName; - enumStruct.modelId = (char *)value.addr; - XrmEnumerateDatabase(sourceBase, xrm_name, xrm_class, XrmEnumAllLevels, - AddDbEntry, (XPointer) &enumStruct); - } - - XrmPutStringResource(&builtDB, "*qualifier", qualifierName); - - return builtDB; -} - -/* - * FreeAttrList is called upon server recycle, and frees the printer - * databases stored in the global attrList. - */ -static void -FreeAttrList(void) -{ - PrAttrPtr pAttr, pNext; - - for(pAttr = attrList, pNext = attrList; - pAttr != (PrAttrPtr)NULL; - pAttr = pNext) - { - pNext = pAttr->next; - if(pAttr->printerAttrs != (XrmDatabase)NULL) - XrmDestroyDatabase(pAttr->printerAttrs); - if(pAttr->docAttrs != (XrmDatabase)NULL) - XrmDestroyDatabase(pAttr->docAttrs); - if(pAttr->jobAttrs != (XrmDatabase)NULL) - XrmDestroyDatabase(pAttr->jobAttrs); - xfree(pAttr->name); - xfree(pAttr->qualifier); - xfree(pAttr); - } - attrList = (PrAttrPtr)NULL; -} - -/* - * XpRehashAttributes - frees the per-printer attribute list and - * calls BuildSystemAttributes to rebuild the overall attribute - * store. It is expected that a caller of this will follow it - * by calling XpBuildAttributeStore for a new list of printers. - */ -int -XpRehashAttributes(void) -{ - if(attrList != (PrAttrPtr)NULL) - FreeAttrList(); - BuildSystemAttributes(); - return Success; -} - -/* - * XpBuildAttributeStore - creates the attribute database associated - * with the specified printer. The first time this is called it - * calls BuildSystemAttributes to create the system-level databases. - */ -void -XpBuildAttributeStore( - char *printerName, - char *qualifierName) -{ - PrAttrPtr pAttr; - - if((pAttr = (PrAttrPtr)xalloc(sizeof(PrAttrs))) == (PrAttrPtr)NULL) - return; - - if(attrGeneration != serverGeneration) - { - if(attrList != (PrAttrPtr)NULL) - FreeAttrList(); - dixRequestPrivate(attrCtxtPrivKey, sizeof(ContextAttrs)); - BuildSystemAttributes(); - - attrGeneration = serverGeneration; - } - - if(attrList == (PrAttrPtr)NULL) - { - pAttr->next = (PrAttrPtr)NULL; - attrList = pAttr; - } - else - { - pAttr->next = attrList; - attrList = pAttr; - } - - pAttr->name = strdup(printerName); - pAttr->qualifier = strdup(qualifierName); - pAttr->printerAttrs = BuildPrinterAttrs(printerName, qualifierName); - pAttr->docAttrs = BuildABase(printerName, qualifierName, - systemAttributes.doc); - pAttr->jobAttrs = BuildABase(printerName, qualifierName, - systemAttributes.job); -} - - -static Bool -StoreEntry( - XrmDatabase *sourceDB, - XrmBindingList bindings, - XrmQuarkList quarks, - XrmRepresentation *type, - XrmValue *value, - XPointer client_data) -{ - XrmDatabase *outDb = (XrmDatabase *)client_data; - - XrmQPutStringResource(outDb, bindings, quarks, (char *)value->addr); - - return FALSE; -} - -/* - * XpCopyDb - makes a copy of the specified XrmDatabase and returns - * the copy. - */ -static XrmDatabase -CopyDb(XrmDatabase inDb) -{ - XrmDatabase outDb = (XrmDatabase)NULL; - XrmQuark empty = NULLQUARK; - - (void)XrmEnumerateDatabase(inDb, &empty, &empty, XrmEnumAllLevels, - StoreEntry, (XPointer) &outDb); - return outDb; -} - -/* - * XpInitAttributes - initializes the attribute store for the specified - * context. It does this by making copies of the printer, doc, and job - * attributes databases for the printer associated with the context. - */ -void -XpInitAttributes(XpContextPtr pContext) -{ - ContextAttrPtr pCtxtAttrs; - PrAttrPtr pPrAttr = attrList; - - /* Initialize all the pointers to NULL */ - pCtxtAttrs = (ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates, - attrCtxtPrivKey); - (void)memset((void *)pCtxtAttrs, 0, (size_t) sizeof(ContextAttrs)); - - for(pPrAttr = attrList; pPrAttr != (PrAttrPtr)NULL; pPrAttr = pPrAttr->next) - if(!strcmp(pPrAttr->name, pContext->printerName)) break; - - if(pPrAttr != (PrAttrPtr)NULL) - { - pCtxtAttrs->printerAttrs = CopyDb(pPrAttr->printerAttrs); - pCtxtAttrs->docAttrs = CopyDb(pPrAttr->docAttrs); - pCtxtAttrs->jobAttrs = CopyDb(pPrAttr->jobAttrs); - } -} - -void -XpDestroyAttributes( - XpContextPtr pContext) -{ - ContextAttrPtr pCtxtAttrs; - - pCtxtAttrs = (ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates, - attrCtxtPrivKey); - if(pCtxtAttrs->printerAttrs != (XrmDatabase)NULL) - XrmDestroyDatabase(pCtxtAttrs->printerAttrs); - if(pCtxtAttrs->docAttrs != (XrmDatabase)NULL) - XrmDestroyDatabase(pCtxtAttrs->docAttrs); - if(pCtxtAttrs->jobAttrs != (XrmDatabase)NULL) - XrmDestroyDatabase(pCtxtAttrs->jobAttrs); - if(pCtxtAttrs->pageAttrs != (XrmDatabase)NULL) - XrmDestroyDatabase(pCtxtAttrs->pageAttrs); -} - -/* - * XpGetOneAttribute returns the string value of the specified attribute - * in the specified class for the specified print context. If the attribute - * doesn't exist in the database for this context, or if the class database - * doesn't exist for this context, then NULL is returned. The caller must - * not free the returned string, as the returned pointer points into the - * database. This function can also return a value from the server attributes, - * in which case the pContext parameter is ignored. - */ -char * -XpGetOneAttribute( - XpContextPtr pContext, - XPAttributes class, - char *attributeName) -{ - ContextAttrPtr pCtxtAttrs; - XrmDatabase db = (XrmDatabase)NULL; - XrmName xrm_name[3]; - XrmRepresentation rep_type; - XrmValue value; - - if(class == XPServerAttr) - { - if(systemAttributes.server == (XrmDatabase)NULL) - return NULL_STRING; - - xrm_name[0] = XrmStringToQuark (attributeName); - xrm_name[1] = (XrmQuark)NULL; - XrmQGetResource(systemAttributes.server, xrm_name, xrm_name, - &rep_type, &value); - - if(value.addr == (char *)NULL) - return NULL_STRING; - return (char *)value.addr; - } - else - { - pCtxtAttrs=(ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates, - attrCtxtPrivKey); - switch(class) - { - case XPPrinterAttr: - db = pCtxtAttrs->printerAttrs; - break; - case XPDocAttr: - db = pCtxtAttrs->docAttrs; - break; - case XPJobAttr: - db = pCtxtAttrs->jobAttrs; - break; - case XPPageAttr: - db = pCtxtAttrs->pageAttrs; - break; - default: - break; - } - } - if(db == (XrmDatabase)NULL) - return NULL_STRING; - - xrm_name[0] = XrmStringToQuark ("qualifier"); - xrm_name[1] = (XrmQuark)NULL; - XrmQGetResource(db, xrm_name, xrm_name, &rep_type, &value); - - xrm_name[0] = XrmStringToQuark (value.addr); - xrm_name[1] = XrmStringToQuark (attributeName); - xrm_name[2] = (XrmQuark)NULL; - if(XrmQGetResource(db, xrm_name, xrm_name, &rep_type, &value)) - return (char *)value.addr; - else - return NULL_STRING; -} - -/* - * XpPutOneAttribute updates one attribute for the specified - * context and class. This function is intended for use by the attribute - * validation module which updates the XrmDatabases directly. This - * function does not recognize XPServerAttr. - */ -void -XpPutOneAttribute( - XpContextPtr pContext, - XPAttributes class, - const char* attributeName, - const char* value) -{ - ContextAttrPtr pCtxtAttrs; - XrmDatabase db; - XrmBinding bindings[1]; - XrmQuark quarks[2]; - - pCtxtAttrs = (ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates, - attrCtxtPrivKey); - switch(class) - { - case XPPrinterAttr: - db = pCtxtAttrs->printerAttrs; - break; - case XPDocAttr: - db = pCtxtAttrs->docAttrs; - break; - case XPJobAttr: - db = pCtxtAttrs->jobAttrs; - break; - case XPPageAttr: - db = pCtxtAttrs->pageAttrs; - break; - default: - return; - } - bindings[0] = XrmBindLoosely; - quarks[0] = XrmStringToQuark(attributeName); - quarks[1] = (XrmQuark)NULL; - XrmQPutStringResource(&db, bindings, quarks, value ? value : ""); -} - - - -/******************************************************************************* - * - * The following routines: ExpandSpace, PutString, PutByte, and AppendEntry - * form the functional core of the GetAttributes routine. Xrm does not - * supply a routine to form a string database from an XrmDatabase, except - * by writing the database to a file. This code avoids the file system - * overhead, but is a bit clunky in its memory management. - * - ******************************************************************************/ - -/* - * ExpandSpace expands the memory allocated for the string database in - * the StringDbStruct passed in, and updates the "space" field of the - * struct to indicate the new amount of space available. - */ -static Bool -ExpandSpace( - StringDbStruct *pStr) -{ - char *newSpace; - - if((newSpace = (char *)xrealloc(pStr->stringDb, pStr->nextPos + pStr->space - + 1024)) == (char *)NULL) - return False; - pStr->space += 1024; - pStr->stringDb = newSpace; - return True; -} - -/* - * PutString puts the contents of a null-terminated string into the string - * database in the StringDbStruct passed in. If there is insufficient room - * for the string, ExpandSpace is called, and the nextPos and space fields - * are updated. - */ -static void -PutString( - StringDbStruct *pStr, - char *pString) -{ - int len = strlen(pString); - - if(len >= pStr->space) - if(!ExpandSpace(pStr)) - return; - strcpy(&pStr->stringDb[pStr->nextPos], pString); - pStr->nextPos += len; - pStr->space -= len; -} - -/* - * PutByte puts a single byte value in to the string database in the passed-in - * StringDbStruct. ExpandSpace is called if there is insufficient room for - * the byte, and the nextPos and space fields are updated. - */ -static void -PutByte( - StringDbStruct *pStr, - char byte) -{ - if(pStr->space <= 1) - if(!ExpandSpace(pStr)) - return; - pStr->stringDb[pStr->nextPos] = byte; - pStr->nextPos++; - pStr->space--; -} - -#define XrmQString XrmPermStringToQuark("String") - -/* - * AppendEntry is called by XrmEnumerateDatabase, and serves to append - * a database entry onto a string database. The passed-in "closure" - * struct contains a pointer to the string, and a count of the remaining - * bytes. If there are insufficient remaining bytes then the struct - * is realloced, and the count of the space remaining is updated. - * Database elements of types other than String are ignored! - * This code is based directly on that in "DumpEntry" in Xrm.c. - */ -static Bool -AppendEntry( - XrmDatabase *db, - XrmBindingList bindings, - XrmQuarkList quarks, - XrmRepresentation *type, - XrmValuePtr value, - XPointer data) -{ - StringDbStruct *pEnumStr = (StringDbStruct *)data; - Bool firstNameSeen; - unsigned int i; - char *s, c; - - if (*type != XrmQString) - return False; - - for (firstNameSeen = False; *quarks; bindings++, quarks++) { - if (*bindings == XrmBindLoosely) { - PutString(pEnumStr, "*"); - } else if (firstNameSeen) { - PutString(pEnumStr, "."); - } - firstNameSeen = True; - PutString(pEnumStr, XrmQuarkToString(*quarks)); - } - s = value->addr; - i = value->size; - PutString(pEnumStr, ":\t"); - if(i) i--; - - if (i && (*s == ' ' || *s == '\t')) - PutByte(pEnumStr, '\\'); /* preserve leading whitespace */ - - while (i--) { - c = *s++; - if (c == '\n') { - if (i) - PutString(pEnumStr, "\\n\\\n"); - else - PutString(pEnumStr, "\\n"); - } else if (c == '\\') - PutString(pEnumStr, "\\\\"); - else if ((c < ' ' && c != '\t') || - ((unsigned char)c >= 0x7f && (unsigned char)c < 0xa0)) - { - char temp[4]; - (void) sprintf(temp, "\\%03o", (unsigned char)c); - PutString(pEnumStr, temp); - } - else - PutByte(pEnumStr, c); - } - PutByte(pEnumStr, '\n'); - pEnumStr->stringDb[pEnumStr->nextPos] = (char)'\0'; - return False; -} - -/* - * XpGetAttributes returns a string database version of the Xrm database - * for the specified context and class. This function can also return the - * contents of the server attributes, in which case the pContext parameter - * is ignored. - * - * The caller is responsible for freeing the returned string, - * unlike XpGetOneAttribute, where the caller must not free the string. - */ -char * -XpGetAttributes( - XpContextPtr pContext, - XPAttributes class) -{ - ContextAttrPtr pCtxtAttrs; - XrmDatabase db = (XrmDatabase)NULL; - StringDbStruct enumStruct; - XrmQuark empty = NULLQUARK; - - if(class == XPServerAttr) - db = systemAttributes.server; - else - { - pCtxtAttrs=(ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates, - attrCtxtPrivKey); - switch(class) - { - case XPServerAttr: - db = systemAttributes.server; - break; - case XPPrinterAttr: - db = pCtxtAttrs->printerAttrs; - break; - case XPDocAttr: - db = pCtxtAttrs->docAttrs; - break; - case XPJobAttr: - db = pCtxtAttrs->jobAttrs; - break; - case XPPageAttr: - db = pCtxtAttrs->pageAttrs; - break; - default: - break; - } - } - if(db == (XrmDatabase)NULL) - { - char *retval = (char *)xalloc(1); - retval[0] = (char)'\0'; - return retval; - } - - if((enumStruct.stringDb = (char *)xalloc(1024)) == (char *)NULL) - return (char *)NULL; - enumStruct.stringDb[0] = (char)'\0'; - enumStruct.nextPos = 0; - enumStruct.space = 1024; - (void)XrmEnumerateDatabase(db, &empty, &empty, XrmEnumAllLevels, - AppendEntry, (XPointer) &enumStruct); - - return enumStruct.stringDb; -} - -int -XpAugmentAttributes( - XpContextPtr pContext, - XPAttributes class, - char *attributes) -{ - XrmDatabase db; - ContextAttrPtr pCtxtAttrs; - - db = XrmGetStringDatabase(attributes); - if(db == (XrmDatabase)NULL) return BadAlloc; - - pCtxtAttrs = (ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates, - attrCtxtPrivKey); - switch(class) - { - case XPPrinterAttr: - XrmMergeDatabases(db, &pCtxtAttrs->printerAttrs); - break; - case XPDocAttr: - XrmMergeDatabases(db, &pCtxtAttrs->docAttrs); - break; - case XPJobAttr: - XrmMergeDatabases(db, &pCtxtAttrs->jobAttrs); - break; - case XPPageAttr: - XrmMergeDatabases(db, &pCtxtAttrs->pageAttrs); - break; - default: - break; - } - return Success; -} - -/* - * XpSetAttributes - sets the attribute stores for a specified context. - */ -int -XpSetAttributes( - XpContextPtr pContext, - XPAttributes class, - char *attributes) -{ - XrmDatabase db; - ContextAttrPtr pCtxtAttrs; - - db = XrmGetStringDatabase(attributes); - if(db == (XrmDatabase)NULL) return BadAlloc; - - pCtxtAttrs=(ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates, - attrCtxtPrivKey); - switch(class) - { - case XPPrinterAttr: - if(pCtxtAttrs->printerAttrs != (XrmDatabase)NULL) - XrmDestroyDatabase(pCtxtAttrs->printerAttrs); - pCtxtAttrs->printerAttrs = db; - break; - case XPDocAttr: - if(pCtxtAttrs->docAttrs != (XrmDatabase)NULL) - XrmDestroyDatabase(pCtxtAttrs->docAttrs); - pCtxtAttrs->docAttrs = db; - break; - case XPJobAttr: - if(pCtxtAttrs->jobAttrs != (XrmDatabase)NULL) - XrmDestroyDatabase(pCtxtAttrs->jobAttrs); - pCtxtAttrs->jobAttrs = db; - break; - case XPPageAttr: - if(pCtxtAttrs->pageAttrs != (XrmDatabase)NULL) - XrmDestroyDatabase(pCtxtAttrs->pageAttrs); - pCtxtAttrs->pageAttrs = db; - break; - default: - break; - } - return Success; -} - -void -XpAddPrinterAttribute( - char *printerName, - char *printerQualifier, - char *attributeName, - char *attributeValue) -{ - PrAttrPtr pAttr; - - for(pAttr = attrList; pAttr != (PrAttrPtr)NULL; pAttr = pAttr->next) - { - if(!strcmp(printerQualifier, pAttr->qualifier)) - { - XrmPutStringResource(&pAttr->printerAttrs, attributeName, - attributeValue); - break; - } - } -} - -const char * -XpGetPrinterAttribute(const char *printerName, - const char *attribute) -{ - PrAttrPtr pAttr; - XrmValue value; - char *type; - - for(pAttr = attrList; pAttr != (PrAttrPtr)NULL; pAttr = pAttr->next) - { - if(!strcmp(printerName, pAttr->qualifier)) - { - char *attrStr; - - attrStr = (char *)xalloc(strlen(printerName) + strlen(attribute) + - 2); - sprintf(attrStr, "%s.%s", printerName, attribute); - XrmGetResource(pAttr->printerAttrs, attrStr, attrStr, - &type, &value); - xfree(attrStr); - break; - } - } - if(value.addr != (XPointer)NULL && strlen(value.addr) != 0) - return value.addr; - else - return ""; -} - -/******************************************************************************* - * - * The following routines are not attribute routines, but are rather - * spooler interface functions. They should presumably move to - * a SpoolerIf.c of some similarly named file. - * - ******************************************************************************/ -#include - -static char serverAttrStr[] = "*document-attributes-supported: copy-count\n\ -*job-attributes-supported: job-name job-owner\ - notification-profile xp-spooler-command-options\n\ -*multiple-documents-supported: False"; - -XrmDatabase -XpSpoolerGetServerAttributes(void) -{ - char *totalAttrs, *localeName; - XrmDatabase db; - - localeName = setlocale(LC_CTYPE, (char *)NULL); - if(!localeName || strlen(localeName) == 0) - localeName = "C"; - - if((totalAttrs = (char *)xalloc(strlen(serverAttrStr) + strlen(localeName) - + 11)) == (char *)NULL) - return (XrmDatabase)NULL; - sprintf(totalAttrs, "%s\n%s\t%s", serverAttrStr, "*locale:", localeName); - - db = XrmGetStringDatabase(totalAttrs); - xfree(totalAttrs); - return db; -} - -/* - * Tailf() works similar to "/bin/tail -f fd_in >fd_out" until - * the process |child| terminates (the child status is - * returned in |child_status|). - * This function is used to copy the stdout/stderr output of a - * child to fd_out until the child terminates. - */ -static -void Tailf(int fd_in, int fd_out, pid_t child, int *child_status) -{ - char b[256]; - ssize_t sz; - Bool childDone = FALSE; - struct timeval timeout; - long fpos = 0; /* XXX: this is not correct for largefile support */ - - timeout.tv_sec = 0; - timeout.tv_usec = 100000; - - for(;;) - { - /* Check whether the child is still alive or not */ - if (waitpid(child, child_status, WNOHANG) == child) - childDone = TRUE; - - /* Copy traffic from |fd_in| to |fd_out| - * (Note we have to use |pread()| here to avoid race conditions - * between a child process writing to the same file using the - * same file pointer (|dup(2)| and |fork(2)| just duplicate the - * file handle but not the pointer)). - */ - while ((sz = pread(fd_in, b, sizeof(b), fpos)) > 0) - { - fpos += sz; - write(fd_out, b, sz); - } - - if (childDone) - break; - - (void)select(0, NULL, NULL, NULL, &timeout); - } -} - -/* - * SendFileToCommand takes three character pointers - the file name, - * the command to execute, - * and the "argv" style NULL-terminated vector of arguments for the command. - * The command is exec'd, and the file contents are sent to the command - * via stdin. - * - * WARNING: This function will try to adopt the userId of the supplied - * user name prior to exec'ing the supplied command. - */ -static void -SendFileToCommand( - XpContextPtr pContext, - char *fileName, - char *pCommand, - char **argVector, - char *userName) -{ - pid_t childPid; - int pipefd[2]; - int status; - struct stat statBuf; - FILE *fp, *outPipe; - FILE *resFp; /* output from launched command */ - int resfd; - - resFp = tmpfile(); - if (resFp == NULL) - { - ErrorF("SendFileToCommand: Cannot open temporary file for command output\n"); - return; - } - resfd = fileno(resFp); - - if(pipe(pipefd)) - { - ErrorF("SendFileToCommand: Cannot open pipe\n"); - fclose(resFp); - return; - } - - if(stat(fileName, &statBuf) < 0 || (int)statBuf.st_size == 0) - { - close(pipefd[0]); - close(pipefd[1]); - fclose(resFp); - return; - } - - fp = fopen(fileName, "r"); - if(fp == (FILE *)NULL) - { - ErrorF("SendFileToCommand: Cannot open scratch spool file '%s'\n", fileName); - close(pipefd[0]); - close(pipefd[1]); - fclose(resFp); - return; - } - - if((childPid = fork()) == 0) - { - close(pipefd[1]); - - /* Replace current stdin with input from the pipe */ - close(STDIN_FILENO); - dup(pipefd[0]); - close(pipefd[0]); - - /* Close current stdout and redirect it to resfd */ - close(STDOUT_FILENO); - dup(resfd); - - /* Close current stderr and redirect it to resfd - * (valgrind may not like that, in this case simply start it using - * % valgrind 50>/dev/tty --logfile-fd=50 ./Xprt ... #) - */ - close(STDERR_FILENO); - dup(resfd); - - fclose(resFp); - - /* - * If a user name is specified, try to set our uid to match that - * user name. This is to allow e.g. a banner page to show the - * name of the printing user rather than the user who started - * the print server. - */ - if(userName) - { - uid_t myUid; - - if((myUid = geteuid()) == (uid_t)0) - { - struct passwd *pPasswd; - - if((pPasswd = getpwnam(userName))) - { - if (setgid((gid_t)pPasswd->pw_gid) != 0) - perror("SendFileToCommand: setgid() failure."); - - if (initgroups(userName, (gid_t)pPasswd->pw_gid) != 0) - perror("SendFileToCommand: initgroups() failure."); - - if (setuid((uid_t)pPasswd->pw_uid) != 0) - perror("SendFileToCommand: setuid() failure."); - } - } - } - /* return BadAlloc? */ - if (execv(pCommand, argVector) == -1) { - FatalError("unable to exec '%s'", pCommand); - } - } - else - { - (void) close(pipefd[0]); - - outPipe = fdopen(pipefd[1], "w"); - (void) TransferBytes(fp, outPipe, (int)statBuf.st_size); - - (void) fclose(outPipe); - (void) fclose(fp); - - /* Wait for spooler child (and send all it's output to stderr) */ - Tailf(resfd, STDERR_FILENO, childPid, &status); - - if (status != EXIT_SUCCESS) - { - ErrorF("SendFileToCommand: spooler command returned non-zero status %d.\n", status); - } - - /* Store "xp-spooler-command-results" XPJobAttr that the - * client can fetch it on demand */ - if ((fstat(resfd, &statBuf) >= 0) && (statBuf.st_size >= 0)) - { - long bufSize; - char *buf; - - bufSize = statBuf.st_size; - - /* Clamp buffer size to 4MB to prevent that we allocate giant - * buffers if the spooler goes mad and spams it's stdout/stderr - * channel. */ - bufSize = MIN(bufSize, 4*1024*1024); - - buf = xalloc(bufSize+1); - if (buf != NULL) - { - bufSize = pread(resfd, buf, bufSize, 0); - buf[bufSize]='\0'; - - /* XXX: This should be converted from local multibyte encoding to - * Compound Text encoding first */ - XpPutOneAttribute(pContext, XPJobAttr, "xp-spooler-command-results", buf); - - xfree(buf); - } - } - else - { - ErrorF("SendFileToCommand: fstat() failed.\n"); - } - - fclose(resFp); - } - return; -} - -/* - * ReplaceAllKeywords causes all the predefined keywords (e.g. %options%) - * to be replaced with the appropriate values derived from the attribute - * store for the supplied print context. The ReplaceAnyString utility - * routine is used to perform the actual replacements. - */ - -static char * -ReplaceAllKeywords( - XpContextPtr pContext, - char *command) -{ - char *cmdOpt; - - cmdOpt = XpGetOneAttribute(pContext, XPPrinterAttr, - "xp-spooler-printer-name"); - if(cmdOpt != (char *)NULL && strlen(cmdOpt) != 0) - command = ReplaceAnyString(command, "%printer-name%", cmdOpt); - else - command = ReplaceAnyString(command, "%printer-name%", - pContext->printerName); - - cmdOpt = XpGetOneAttribute(pContext, XPDocAttr, "copy-count"); - if(cmdOpt != (char *)NULL && strlen(cmdOpt) != 0) - command = ReplaceAnyString(command, "%copy-count%", cmdOpt); - else - command = ReplaceAnyString(command, "%copy-count%", "1"); - - cmdOpt = XpGetOneAttribute(pContext, XPJobAttr, "job-name"); - if(cmdOpt != (char *)NULL && strlen(cmdOpt) != 0) - command = ReplaceAnyString(command, "%job-name%", cmdOpt); - else - command = ReplaceAnyString(command, "%job-name%", ""); - - cmdOpt = XpGetOneAttribute(pContext, XPJobAttr, "job-owner"); - if(cmdOpt != (char *)NULL && strlen(cmdOpt) != 0) - command = ReplaceAnyString(command, "%job-owner%", cmdOpt); - else - command = ReplaceAnyString(command, "%job-owner%", ""); - - cmdOpt = XpGetOneAttribute(pContext, XPJobAttr, - "xp-spooler-command-options"); - if(cmdOpt != (char *)NULL && strlen(cmdOpt) != 0) - command = ReplaceAnyString(command, "%options%", cmdOpt); - else - command = ReplaceAnyString(command, "%options%", ""); - - /* New in xprint.mozdev.org release 007 - replace "%xpconfigdir%" with - * location of $XPCONFIGDIR */ - command = ReplaceAnyString(command, "%xpconfigdir%", XpGetConfigDirBase()); - - return command; -} - -#ifdef __QNX__ -#define toascii( c ) ((unsigned)(c) & 0x007f) -#endif - -#if defined(CSRG_BASED) || \ - defined(linux) || \ - defined(__CYGWIN__) || \ - (defined(sun) && !defined(SVR4)) || \ - (defined(SVR4) && !defined(sun) && !defined(__UNIXWARE__)) || \ - defined(ISC) || \ - defined(Lynx) || \ - defined(__QNX__) || \ - defined(__APPLE__) -#define iswspace(c) (isascii(c) && isspace(toascii(c))) -#endif - -/* - * GetToken - takes in a string and returns a malloc'd copy of the - * first non-white-space sequence of characters in the string. - * It returns the number of _bytes_ (NOT characters) parsed through - * the inStr to get to the end of the returned token. - */ -static int -GetToken( - char *inStr, - char **outStr) -{ - size_t mbCurMax = MB_CUR_MAX; - wchar_t curChar; - int i, numBytes, byteLen = strlen(inStr); - char *tok; - - /* - * read through any leading white space. - */ - for(i = 0, numBytes = 0; i < byteLen; i += numBytes) - { - numBytes = mbtowc(&curChar, &inStr[i], mbCurMax); - if(!iswspace(curChar)) - break; - } - tok = inStr + i; - - /* - * find the end of the token. - */ - byteLen = strlen(tok); - for(i = 0, numBytes = 0; i < byteLen; i += numBytes) - { - numBytes = mbtowc(&curChar, &tok[i], mbCurMax); - if(iswspace(curChar)) - break; - } - - if((*outStr = (char *)xalloc(i + 1)) == (char *)NULL) - return 0; - strncpy(*outStr, tok, i); - (*outStr)[i] = (char)'\0'; - return (tok + i) - inStr; -} - -static void -FreeVector( - char **vector) -{ - int i; - - if(vector == (char **)NULL) return; - - for(i = 0; vector[i] != (char *)NULL; i++) - xfree(vector[i]); - xfree(vector); -} - - -/* - * AddVector appends the pAddition arg vector to the pTarget arg vector. - * If the pTarget cannot be realloc'd, then pTarget is set to NULL. - */ -static void -AddVector( - char ***pTarget, - char **pAddition) -{ - int numTarget, numAdd, i; - - for(numTarget = 0; (*pTarget)[numTarget] != (char *)NULL; numTarget++) - ; - for(numAdd = 0; pAddition[numAdd] != (char *)NULL; numAdd++) - ; - - *pTarget = (char **)xrealloc((void *)*pTarget, (numTarget + numAdd + 1) * - sizeof(char *)); - if(*pTarget == (char **)NULL) - return; - for(i = 0; i < numAdd; i++) - (*pTarget)[numTarget + i] = pAddition[i]; - - (*pTarget)[numTarget + numAdd] = (char *)NULL; -} - -static char ** -BuildArgVector( - char *argString, - XpContextPtr pContext) -{ - char **pVector; - char *curTok; - int numChars, i; - static int beenHere = 0; /* prevent recursion on embedded %options% - */ - - pVector = (char **)xalloc(sizeof(char *)); - pVector[0] = (char *)NULL; - for(i = 0; (numChars = GetToken(argString, &curTok)) != 0; - i++, argString += numChars) - { - if(beenHere || strcmp(curTok, "%options%")) - { - if(curTok[0] == (char)'\0') - { - xfree(curTok); - } - else - { - pVector = (char **)xrealloc((void *)pVector, - (i + 2)*sizeof(char *)); - if(pVector == (char **)NULL) - return (char **)NULL; - pVector[i] = curTok; - pVector[i + 1] = (char *)NULL; - } - } - else if(!beenHere) - { - char **optionsVec; - - curTok = ReplaceAllKeywords(pContext, curTok); - beenHere = 1; - optionsVec = BuildArgVector(curTok, pContext); - xfree(curTok); - beenHere = 0; - AddVector(&pVector, optionsVec); - xfree(optionsVec); - } - } - if(numChars == 0 && curTok != (char *)NULL) - xfree(curTok); - return pVector; -} - -/* - * VectorizeCommand takes a string and breaks it into a command name and - * an array of character pointers suitable for handing to execv. The - * array is NULL-terminated. - * The returned char * is the command name, and should be freed when no - * longer needed. The array elements returned in the pVector parameter - * should be individually freed, and the array itself should also be - * freed when no longer needed. - */ -static char * -VectorizeCommand( - char *command, - char ***pVector, - XpContextPtr pContext) -{ - char *cmdName; - int numChars; - - if(command == (char *)NULL) - return (char *)NULL; - - numChars = GetToken(command, &cmdName); - - if(cmdName == (char *)NULL) - return (char *)NULL; - - /* Mangle the command name, too... */ - cmdName = ReplaceAllKeywords(pContext, cmdName); - - if(cmdName == (char *)NULL) - return (char *)NULL; - - *pVector = BuildArgVector(command, pContext); - - return cmdName; -} - -int -XpSubmitJob(fileName, pContext) - char *fileName; - XpContextPtr pContext; -{ - char **vector, *cmdNam, *command, *userName; - int i; - - command = XpGetOneAttribute(pContext, XPPrinterAttr, "xp-spooler-command"); - if(command == (char *)NULL || strlen(command) == 0) - { - if( spooler_type ) - { - command = strdup(spooler_type->spool_command); - } - else - { - ErrorF("XpSubmitJob: No default spool command defined.\n"); - } - } - else - { - command = strdup(command); - } - if(command == (char *)NULL) - { - ErrorF("XpSubmitJob: No spooler command found, cannot submit job.\n"); - return BadAlloc; - } - - cmdNam = VectorizeCommand(command, &vector, pContext); - xfree(command); - - if(cmdNam == (char *)NULL) - return BadAlloc; - - for(i = 0; vector[i] != (char *)NULL; i++) - { - vector[i] = ReplaceAllKeywords(pContext, vector[i]); - if(vector[i] == (char *)NULL) - { - xfree(cmdNam); - for(i = 0; vector[i] != (char *)NULL; i++) - xfree(vector[i]); - xfree(vector); - return BadAlloc; - } - } - - userName = XpGetOneAttribute(pContext, XPJobAttr, "job-owner"); - if(userName != (char *)NULL && strlen(userName) == 0) - userName = (char *)NULL; - - SendFileToCommand(pContext, fileName, cmdNam, vector, userName); - - FreeVector(vector); - xfree(cmdNam); - - return Success; -} - -/* - * SearchInputTrays() - * - * Given a tray, return the medium in the tray. Conversely, given a - * medium, return a tray in which it can be found. In either case, - * return NULL if the given tray or medium cannot be found. - */ -#define TRAY 0 -#define MEDIUM 1 - -static char * -SearchInputTrays(XpContextPtr pCon, - int which, - char *val) -{ - char *inputTraysMedium, tray[80], medium[80], *copy; - char *pS, *pE, *pLast; - - inputTraysMedium = XpGetOneAttribute( pCon, XPPrinterAttr, - "input-trays-medium" ); - - copy = strdup( inputTraysMedium ); - pS = copy; - pLast = copy + strlen( copy ); - - while( pS < pLast ) - { - while( *pS && *pS != '{' ) - pS++; - - pE = ++pS; - while( *pE && *pE != '}' ) - pE++; - *pE = '\0'; - - sscanf( pS, "%s %s", tray, medium ); - - if( which == MEDIUM && !strcmp( val, medium ) ) - { - xfree( copy ); - return strdup( tray ); - } - - if( which == TRAY && !strcmp( val, tray ) ) - { - xfree( copy ); - return strdup( medium ); - } - - pS = pE + 1; - } - - xfree( copy ); - return strdup( NULL_STRING ); -} - -/* - * XpGetTrayMediumFromContext() - * - * Given a print context, hit the input-trays-medium, - * default-input-tray and default-medium attributes to find the - * appropriate tray to use, and the medium in that tray. - */ -void -XpGetTrayMediumFromContext(XpContextPtr pCon, - char **medium, - char **tray) -{ - char *defMedium, *defTray; - char *t, *m; - - defMedium = XpGetOneAttribute( pCon, XPPageAttr, - "default-medium" ); - if( *defMedium == '\0' ) - defMedium = XpGetOneAttribute( pCon, XPDocAttr, - "default-medium" ); - - defTray = XpGetOneAttribute( pCon, XPPageAttr, - "default-input-tray" ); - if( *defTray == '\0' ) - defTray = XpGetOneAttribute( pCon, XPDocAttr, - "default-input-tray" ); - - /* - * First, check to see if the default tray has the default medium - * installed. This is the ideal case. - */ - m = SearchInputTrays( pCon, TRAY, defTray ); - if( !strcmp( m, defMedium ) ) - { - xfree( m ); - *tray = strdup( defTray ); - *medium = strdup( defMedium ); - return; - } - - /* - * If the default tray doesn't have the default medium, search for - * a tray which has the default medium. - */ - t = SearchInputTrays( pCon, MEDIUM, defMedium ); - if( t ) - { - *tray = t; - *medium = strdup( defMedium ); - return; - } - - /* - * If all else fails, just return the default tray, and whatever - * medium happens to be there. Note that we simply return - * whatever is in the attribute store. Any further correction is - * left up to the DDX driver. - */ - *tray = strdup( defTray ); - *medium = m; - xfree( t ); -} diff --git a/hw/xprint/attributes.h b/hw/xprint/attributes.h deleted file mode 100644 index 26864a2f0..000000000 --- a/hw/xprint/attributes.h +++ /dev/null @@ -1,130 +0,0 @@ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _Xp_attributes_h -#define _Xp_attributes_h 1 - -#include "scrnintstr.h" -#include "AttrValid.h" - -#define BFuncArgs int ndx, ScreenPtr pScreen, int argc, char **argv -typedef Bool (*pBFunc)(BFuncArgs); - -#define VFuncArgs char *name, XpValidatePoolsRec *pValRec, float *width, float *height, int *res -typedef void (*pVFunc)(VFuncArgs); - -/* - * attributes.c - */ -void XpInitAttributes(XpContextPtr pContext); -void XpBuildAttributeStore(char *printerName, - char *qualifierName); -void XpAddPrinterAttribute(char *printerName, - char *printerQualifier, - char *attributeName, - char *attributeValue); -void XpDestroyAttributes(XpContextPtr pContext); -char *XpGetConfigDir(Bool useLocale); -char *XpGetOneAttribute(XpContextPtr pContext, - XPAttributes class, - char *attributeName); -void XpPutOneAttribute(XpContextPtr pContext, - XPAttributes class, - const char* attributeName, - const char* value); -int XpRehashAttributes(void); -char *XpGetAttributes(XpContextPtr pContext, - XPAttributes class); -int XpAugmentAttributes(XpContextPtr pContext, - XPAttributes class, - char *attributes); -int XpSetAttributes(XpContextPtr pContext, - XPAttributes class, - char *attributes); -const char *XpGetPrinterAttribute(const char *printerName, - const char *attribute); -void XpGetTrayMediumFromContext(XpContextPtr pCon, - char **medium, - char **tray); -int XpSubmitJob(char *fileName, XpContextPtr pContext); - -/* - * mediaSizes.c - */ -int XpGetResolution(XpContextPtr pContext); -XpOid XpGetContentOrientation(XpContextPtr pContext); -XpOid XpGetAvailableCompression(XpContextPtr pContext); -XpOid XpGetPlex(XpContextPtr pContext); -XpOid XpGetPageSize(XpContextPtr pContext, - XpOid* pTray, - const XpOidMediumSS* msss); -void XpGetMediumMillimeters(XpOid page_size, - float *width, - float *height); -void XpGetMediumDimensions(XpContextPtr pContext, - unsigned short *width, - unsigned short *height); -void XpGetReproductionArea(XpContextPtr pContext, - xRectangle *pRect); -void XpGetMaxWidthHeightRes(const char *printer_name, - const XpValidatePoolsRec* vpr, - float *width, - float *height, - int* resolution); - -/* Util.c */ -char *ReplaceAnyString(char *string, - char *target, - char *replacement); -char *ReplaceFileString(char *string, - char *inFileName, - char *outFileName); -int TransferBytes(FILE *pSrcFile, - FILE *pDstFile, - int numBytes); -Bool CopyContentsAndDelete(FILE **ppSrcFile, - char **pSrcFileName, - FILE *pDstFile); -int XpSendDocumentData(ClientPtr client, - FILE *fp, - int fileLen, - int maxBufSize); -int XpFinishDocData(ClientPtr client); -Bool XpOpenTmpFile(char *mode, - char **fname, - FILE **stream); - -#endif /* _Xp_attributes_h */ diff --git a/hw/xprint/config/C/Makefile.am b/hw/xprint/config/C/Makefile.am deleted file mode 100644 index 0390ed2d4..000000000 --- a/hw/xprint/config/C/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = print diff --git a/hw/xprint/config/C/print/Makefile.am b/hw/xprint/config/C/print/Makefile.am deleted file mode 100644 index e3c01da60..000000000 --- a/hw/xprint/config/C/print/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -SUBDIRS = attributes ddx-config models - -xpcdir = @xpconfigdir@/C/print - - -Xprinters.ghostscript: $(srcdir)/Xprinters - sed < $(srcdir)/Xprinters "s/#Printer xp_pdf_spooldir_tmp_Xprintjobs/Printer xp_pdf_spooldir_tmp_Xprintjobs/" > Xprinters.ghostscript - - - -dist_xpc_DATA = Xprinters -xpc_DATA = Xprinters.ghostscript - -CLEANFILES = Xprinters.ghostscript diff --git a/hw/xprint/config/C/print/Xprinters b/hw/xprint/config/C/print/Xprinters deleted file mode 100644 index a32c02dc2..000000000 --- a/hw/xprint/config/C/print/Xprinters +++ /dev/null @@ -1,49 +0,0 @@ -######################################################################## -# -# $Xorg: Xprinters,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ -# -# X*printers sample configuration file -# -# -# This file belongs in /usr/lib/X11/X*printers, where the "*" is the -# display number of the server. For example, if the server is -# invoked using the command X :0, then the X0printers file is used. -######################################################################## - -######################################################################## -# Use lpstat to augment the list of printers managed by the -# server. (This is the default behavior if the X*printers file does -# not exist, or if an "Augment_Printer_List" line is not specified.) -######################################################################## -#Augment_Printer_List %(default)% - -######################################################################## -# Use the specified command pipeline to augment the list of printers -# managed by the server. -######################################################################## -#Augment_Printer_List lpstat -a | cut -d " " -f 1 # equivalent to default - -######################################################################## -# Do not augment the list of printers managed by the server. -######################################################################## -#Augment_Printer_List %none% - -######################################################################## -# Preconfigured entry for the PSspooldir model -# (which sends jobs to /tmp/Xprintjobs instead to a physical printer) -######################################################################## -#Printer xp_pdf_spooldir_tmp_Xprintjobs -Printer xp_ps_spooldir_tmp_Xprintjobs - -######################################################################## -# Add individual printers to the list of printers managed by the -# server. These are aliases, determined by driver name. -######################################################################## - - -# EXAMPLES -# -# Printer xppspr -# Printer xppclpr -# Printer xppclmonopr -# Printer xprasterpr diff --git a/hw/xprint/config/C/print/attributes/Makefile.am b/hw/xprint/config/C/print/attributes/Makefile.am deleted file mode 100644 index 0d2cceaff..000000000 --- a/hw/xprint/config/C/print/attributes/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -xpcdir = @xpconfigdir@/C/print/attributes - -dist_xpc_DATA = document job printer diff --git a/hw/xprint/config/C/print/attributes/document b/hw/xprint/config/C/print/attributes/document deleted file mode 100644 index b1651bd94..000000000 --- a/hw/xprint/config/C/print/attributes/document +++ /dev/null @@ -1,49 +0,0 @@ -# $Xorg: document,v 1.3 2000/08/17 19:48:03 cpqbld Exp $ -# Document DPA-Object initial attribute values - -# Attribute IDs must be qualified by using one of the following -# (listed in order of precedence): -# -# printer-name -# Set this attribute for a specific printer. -# Example: "dj_1.plex: duplex" -# -# printer-model -# Set this attribute for all printers of a specific model. -# Example: "HPDJ1600C.plex: duplex" -# -# '*' -# Set this attribute for all printers. -# Example: "*.plex: duplex" - - -*content-orientation: portrait -*copy-count: 1 -*default-medium: iso-a4 -*default-printer-resolution: 600 - -# "PSspooldir" jobs should always be 300 DPI -# (to be compatible to DPS-based PostScript viewers such as sdtimage) -PSspooldir.default-printer-resolution: 300 - -# "PS2PDFspooldir-GS" jobs should always be 600 DPI -PS2PDFspooldir-GS.default-printer-resolution: 600 - -# Some resolution defaults to make applications happy which are too lazy -# to pick an own default in absence of "default-printer-resolution" -HPLJ4050-PS.default-printer-resolution: 600 -SPSPARC2.default-printer-resolution: 300 -CANONBJ10E-GS.default-printer-resolution: 360 -CANONC3200-PS.default-printer-resolution: 600 - -# EXAMPLES -# -# *content-orientation: landscape -# *copy-count: 3 -# *default-input-tray: main -# *default-medium: iso-a4 -# *default-printer-resolution: 600 -# *document-format: {PCL 5} -# *plex: simplex -# *xp-listfonts-modes: xp-list-internal-printer-fonts - diff --git a/hw/xprint/config/C/print/attributes/job b/hw/xprint/config/C/print/attributes/job deleted file mode 100644 index aa1911dcd..000000000 --- a/hw/xprint/config/C/print/attributes/job +++ /dev/null @@ -1,25 +0,0 @@ -# $Xorg: job,v 1.3 2000/08/17 19:48:03 cpqbld Exp $ -# Job DPA-Object initial attribute values - -# Attribute IDs must be qualified by using one of the following -# (listed in order of precedence): -# -# printer-name -# Set this attribute for a specific printer. -# Example: "laser_1.job-priority: 1" -# -# printer-model -# Set this attribute for all printers of a specific model. -# Example: "HPDJ1600C.job-priority: 1" -# -# '*' -# Set this attribute for all printers. -# Example: "*.job-priority: 1" - -*notification-profile: {} - -# EXAMPLES -# -# *job-name: Example Job Name -# *notification-profile: {{event-report-job-completed} electronic-mail} -# *xp-spooler-command-options: -onb diff --git a/hw/xprint/config/C/print/attributes/printer b/hw/xprint/config/C/print/attributes/printer deleted file mode 100644 index 41e13b44b..000000000 --- a/hw/xprint/config/C/print/attributes/printer +++ /dev/null @@ -1,96 +0,0 @@ -# $Xorg: printer,v 1.3 2000/08/17 19:48:03 cpqbld Exp $ -# Printer DPA-Object initial attribute values - -# Attribute IDs must be qualified by using one of the following -# (listed in order of precedence): -# -# printer-name -# Set this attribute for a specific printer. -# Example: "dj_1.document-formats-ready: {pcl 5}" -# -# printer-model -# Set this attribute for all printers of a specific model. -# Example: "HPDJ1600C.document-formats-ready: {pcl 5}" -# -# '*' -# Set this attribute for all printers. -# Example: "*.document-formats-ready: {pcl 5}" - -# Remove this line and replace them with per printer settings -# if you want to use more than one DDX!! -*xp-model-identifier: PSdefault - - -# Sample entry for the "PSspooldir" model -# Just add a printer called "xp_ps_spooldir_tmp_Xprintjobs" to "Xprinters" -# and you will get an extra printer which files the PostScript jobs -# in the "/tmp/Xprintjobs/" directory. -xp_ps_spooldir_tmp_Xprintjobs.xp-model-identifier: PSspooldir - -# Sample entry for the "PS2PDFspooldir-GS" model -# Just add a printer called "xp_pdf_spooldir_tmp_Xprintjobs" to "Xprinters" -# and you will get an extra printer which convertes the PostScript jobs -# to PDF using "ps2pdf" and files them into the "/tmp/Xprintjobs/" directory. -# NOTE: Future versions of Xprint will use the PDF DDX instead directly -# instead of relying on GhostScript/ps2pdf... -xp_pdf_spooldir_tmp_Xprintjobs.xp-model-identifier: PS2PDFspooldir-GS - - -# IMPORTANT EXAMPLES -# -# The following are examples of how a printer name is bound -# to a model-config file and ddx driver. -# -# Warning: most X-Servers have a hard limit on the number of ddx -# drivers (ie, screens) they can support at runtime (usually 3 or -# 4). Whatever the number of printers, they cannot create a -# dependency for more than the limit on ddx drivers. Assuming -# "Xprinters" listed all four xp*pr printers below, X-Servers -# with a limit of 3 would not work. -# -# xppspr.xp-model-identifier: HPDJ1600C -# xppspr.xp-ddx-identifier: XP-POSTSCRIPT -# xppspr.document-formats-ready: { PostScript 2 } -# -# xppclpr.xp-model-identifier: HPDJ1600C -# xppclpr.xp-ddx-identifier: XP-PCL-COLOR -# xppclpr.document-formats-ready: { PCL 5 } -# -# xppclmonopr.xp-model-identifier: HPDJ1600C -# xppclmonopr.xp-ddx-identifier: XP-PCL-MONO -# xppclmonopr.document-formats-ready: { PCL 5 } -# -# xprasterpr.xp-model-identifier: HPDJ1600C -# xprasterpr.xp-ddx-identifier: XP-RASTER - - -# MORE EXAMPLES of items often configured in this file -# -# *descriptor: This printer has not been given a name -# *dt-pdm-command: dtpdm -# *input-trays-medium: {top na-letter} {bottom iso-a4} -# *xp-model-identifier: HPDJ1600C -# *xp-spooler-command: /opt/mystuff/bin/mylp -p %printer-name% -c %copy-count% \ -# -j %job-name% -o %options% - - -# USUALLY SET BY THE ddx driver -# -# *content-orientations-supported: portrait landscape reverse-portrait reverse-landscape - - -# USUALLY SET BY THE model-config FILE -# -# *document-formats-supported: {PCL 5} -# *medium-source-sizes-supported: \ -# { top {iso-a4 FALSE {10 200 10 287}} {iso-a5 FALSE {10 138 10 200}} } \ -# { bottom {iso-a4 FALSE {10 200 10 287}} {iso-a5 FALSE {10 138 10 200}} } -# *plexes-supported: simplex duplex tumble -# *printer-model: Hewlett-Packard LaserJet IV -# *printer-resolutions-supported: 300 -# *xp-ddx-identifier: XP-PCL-COLOR -# *xp-embedded-formats-supported: {PCL 5} {HPGL 2} -# *xp-listfonts-modes-supported: xp-list-internal-printer-fonts -# *xp-raw-formats-supported: {PCL 5} -# *xp-setup-proviso: xp-setup-optional - diff --git a/hw/xprint/config/C/print/ddx-config/Makefile.am b/hw/xprint/config/C/print/ddx-config/Makefile.am deleted file mode 100644 index 907edca75..000000000 --- a/hw/xprint/config/C/print/ddx-config/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = raster diff --git a/hw/xprint/config/C/print/ddx-config/raster/Makefile.am b/hw/xprint/config/C/print/ddx-config/raster/Makefile.am deleted file mode 100644 index 79bfb59df..000000000 --- a/hw/xprint/config/C/print/ddx-config/raster/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -xpcdir = @xpconfigdir@/C/print/ddx-config/raster - -dist_xpc_DATA = pcl postscript diff --git a/hw/xprint/config/C/print/ddx-config/raster/pcl b/hw/xprint/config/C/print/ddx-config/raster/pcl deleted file mode 100644 index 15d33e7b3..000000000 --- a/hw/xprint/config/C/print/ddx-config/raster/pcl +++ /dev/null @@ -1,39 +0,0 @@ -# $Xorg: pcl,v 1.3 2000/08/17 19:48:03 cpqbld Exp $ -# This is the file which you should customize to include the printers that -# will print through the raster driver. The early part of this file -# specifies some commn useful defaults. You can override them when -# you list your printers in the second part of this file. This file is -# an X Resource file. To learn more about this file format, consult -# the functional specification. - -# Note that the reference printer for CDEnext is the HP DeskJet 1600C. -# This driver may work for other printers, but the reference printer -# is the only officially supported printer. - - -# DEFAULTS -# ======== - -# The attributes below apply to all printers unless the section below -# specifies something different for the printer. - -# Default printer attributes -# -------------------------- -# Printer attributes control the choices that users will see in the -# setup dialog for those printers. - -# The attributes below apply to all printes unless the section below -# specifies something different for the printer. - -*.media-ready: na-letter-white -*.descriptor: Printer supported by CDEnext DtPrint System. -*.printer-model: HPDJ1600C - -# Printer Specifics - -# Use this section to override the defaults listed above or to override the -# printer attributes described in the model file. -# The lines describing "laser" are just a sample to help you get started. - -# laser.printer-name: laser -# laser.spooler-name: laser diff --git a/hw/xprint/config/C/print/ddx-config/raster/postscript b/hw/xprint/config/C/print/ddx-config/raster/postscript deleted file mode 100644 index e69de29bb..000000000 diff --git a/hw/xprint/config/C/print/models/CANONBJ10E-GS/Makefile.am b/hw/xprint/config/C/print/models/CANONBJ10E-GS/Makefile.am deleted file mode 100644 index 951b9af97..000000000 --- a/hw/xprint/config/C/print/models/CANONBJ10E-GS/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -xpcdir = @xpconfigdir@/C/print/models/CANONBJ10E-GS - -dist_xpc_DATA = model-config diff --git a/hw/xprint/config/C/print/models/CANONBJ10E-GS/model-config b/hw/xprint/config/C/print/models/CANONBJ10E-GS/model-config deleted file mode 100644 index 97bfd8196..000000000 --- a/hw/xprint/config/C/print/models/CANONBJ10E-GS/model-config +++ /dev/null @@ -1,23 +0,0 @@ -# $Xprint.org: CANONBJ10E-GS model-config,v 1.4 2003/02/10 14:48:04 gisburn Exp $ - -*content-orientations-supported: portrait landscape -*descriptor: Canon BJ-10e (GhostScript) -*document-formats-supported: {POSTSCRIPT 2} -*input-trays-supported: -*medium-source-sizes-supported: \ -{ '' \ - {iso-b5 FALSE {6.35 169.65 6.35 243.65}}\ - {iso-a4 FALSE {6.35 203.65 6.35 290.65}}\ - {na-letter FALSE {6.35 209.55 6.35 273.05}}\ - {na-legal FALSE {6.35 209.55 6.35 349.25}}\ -} - -*plexes-supported: simplex -*printer-model: "Canon BJ-10e (GhostScript)" -*printer-resolutions-supported: 360 -*xp-ddx-identifier: XP-POSTSCRIPT -*xp-listfonts-modes-supported: xp-list-internal-printer-fonts xp-list-glyph-fonts -*xp-embedded-formats-supported: {POSTSCRIPT 2} -*xp-raw-formats-supported: {POSTSCRIPT 2} -*xp-setup-proviso: setup-optional -# EOF. diff --git a/hw/xprint/config/C/print/models/CANONC3200-PS/Makefile.am b/hw/xprint/config/C/print/models/CANONC3200-PS/Makefile.am deleted file mode 100644 index 771b40864..000000000 --- a/hw/xprint/config/C/print/models/CANONC3200-PS/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -SUBDIRS = fonts - -xpcdir = @xpconfigdir@/C/print/models/CANONC3200-PS - -dist_xpc_DATA = model-config diff --git a/hw/xprint/config/C/print/models/CANONC3200-PS/fonts/Makefile.am b/hw/xprint/config/C/print/models/CANONC3200-PS/fonts/Makefile.am deleted file mode 100644 index 7a7ecc31a..000000000 --- a/hw/xprint/config/C/print/models/CANONC3200-PS/fonts/Makefile.am +++ /dev/null @@ -1,54 +0,0 @@ -xpcdir = @xpconfigdir@/C/print/models/CANONC3200-PS/fonts - -parentdir = ../../PSdefault/fonts - -XPFONTS = \ - AvantGarde-Book.pmf \ - AvantGarde-BookOblique.pmf \ - AvantGarde-Demi.pmf \ - AvantGarde-DemiOblique.pmf \ - Courier-Bold.pmf \ - Courier-BoldOblique.pmf \ - Courier-Oblique.pmf \ - Courier.pmf \ - Helvetica-Bold.pmf \ - Helvetica-BoldOblique.pmf \ - Helvetica-Oblique.pmf \ - Helvetica.pmf \ - LubalinGraph-Book.pmf \ - LubalinGraph-BookOblique.pmf \ - LubalinGraph-Demi.pmf \ - LubalinGraph-DemiOblique.pmf \ - NewCentSchlbk-Bold.pmf \ - NewCentSchlbk-BoldItal.pmf \ - NewCentSchlbk-Ital.pmf \ - NewCentSchlbk-Roman.pmf \ - Souvenir-Demi.pmf \ - Souvenir-DemiItalic.pmf \ - Souvenir-Light.pmf \ - Souvenir-LightItalic.pmf \ - Symbol.pmf \ - Times-Bold.pmf \ - Times-BoldItalic.pmf \ - Times-Italic.pmf \ - Times-Roman.pmf \ - ZapfDingbats.pmf - -dest = $(DESTDIR)$(xpcdir) - -remove-stuff: - for x in $(XPFONTS) ; do \ - rm -f $(dest)/$$x ; \ - done - - @rm -f $(dest)/fonts.dir - -install-data-hook: remove-stuff - mkdir -p $(dest) ; \ - for x in $(XPFONTS) ; do \ - ln -s $(parentdir)/$$x $(dest)/$$x ; \ - done - - $(MKFONTSCALE) -b -s -l $(dest) - -uninstall-hook: remove-stuff diff --git a/hw/xprint/config/C/print/models/CANONC3200-PS/model-config b/hw/xprint/config/C/print/models/CANONC3200-PS/model-config deleted file mode 100644 index cdb3f4958..000000000 --- a/hw/xprint/config/C/print/models/CANONC3200-PS/model-config +++ /dev/null @@ -1,40 +0,0 @@ -# $Xprint.org: CANONC3200-PS model-config,v 1.1 2004/06/24 09:18:04 gisburn Exp $ -# model-config for the PostScript DDX -# -# automatically generated by xpppdtomodelconfig V0.1 -# -# DO NOT MODIFY THIS FILE!! -# -# Attributes supported for this printer model -*content-orientations-supported: portrait landscape reverse-portrait reverse-landscape -*descriptor: Canon iR C3200 -*document-formats-supported: {POSTSCRIPT 2} -*input-trays-supported: -*medium-source-sizes-supported: \ -{ '' \ - {iso-a4 FALSE {4.002 206 4.002 293}}\ - {na-letter FALSE {4.002 211.9 4.002 275.4}}\ - {na-legal FALSE {4.002 211.9 4.002 351.6}}\ - {iso-a3 FALSE {4.002 293 4.002 416}}\ - {iso-a5 FALSE {4.002 144 4.002 206}}\ - {iso-b4 FALSE {4.002 246 4.002 349}}\ - {iso-b5 FALSE {4.002 172 4.002 246}}\ - {executive FALSE {4.002 180.1 4.002 262.7}}\ - {invoice FALSE {4.002 135.7 4.002 211.9}}\ - {monarch-envelope FALSE {4.002 94.3 4.002 186.5}}\ - {na-number-10-envelop FALSE {4.002 100.8 4.002 237.3}}\ - {iso-c5 FALSE {4.002 158 4.002 225}}\ -} - -*plexes-supported: simplex duplex tumble -*printer-model: "Canon iR C3200" -*printer-resolutions-supported: 600 -*xp-ddx-identifier: XP-POSTSCRIPT -*xp-listfonts-modes-supported: xp-list-internal-printer-fonts xp-list-glyph-fonts -*xp-embedded-formats-supported: {POSTSCRIPT 2} -*xp-raw-formats-supported: {POSTSCRIPT 2} -*xp-setup-proviso: setup-optional -# NOTE: xp-psddx-* attributes are EXPERIMENTAL for now. -*xp-psddx-download-fonts: pfa pfb ttf ttc otf otc -*xp-psddx-download-font-type: pstype1 -# EOF. diff --git a/hw/xprint/config/C/print/models/GSdefault/Makefile.am b/hw/xprint/config/C/print/models/GSdefault/Makefile.am deleted file mode 100644 index be0426c76..000000000 --- a/hw/xprint/config/C/print/models/GSdefault/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -xpcdir = @xpconfigdir@/C/print/models/GSdefault - -dist_xpc_DATA = model-config diff --git a/hw/xprint/config/C/print/models/GSdefault/model-config b/hw/xprint/config/C/print/models/GSdefault/model-config deleted file mode 100644 index 61dac18b8..000000000 --- a/hw/xprint/config/C/print/models/GSdefault/model-config +++ /dev/null @@ -1,137 +0,0 @@ -# $Xprint.org: GSdefault model-config,v 1.1 2003/02/10 14:48:04 gisburn Exp $ -# Generic default model-config for the PostScript DDX when using GhostScript -# as printer driver -# -# DO NOT MODIFY THIS FILE!! -# -# If you want to make customisations for your printer create a copy -# of this printer model. -# Example (for creating a model config "MYCOMPANYlaserxx"): -# 1. Create model config dir: -# % mkdir MYCOMPANYlaserxx -# 2. Link (or copy) the PMF (printer font metrics) for the -# printer buildin fonts: -# % ln -s GSdefault/fonts MYCOMPANYlaserxx/. -# 3. Copy the model config file: -# % cp GSdefault/model-config MYCOMPANYlaserxx/. -# 4. Customize MYCOMPANYlaserxx/model-config to match your needs. -# - -# Attributes supported for this printer model -# You may want to cut the lists here down to the attributes supported -# by your printer. -*content-orientations-supported: portrait landscape reverse-portrait reverse-landscape -*descriptor: GhostScript default model -*document-formats-supported: {POSTSCRIPT 2} -*input-trays-supported: -*medium-source-sizes-supported: \ -{ '' \ - {na-letter FALSE {6.35 209.55 6.35 273.05}}\ - {na-legal FALSE {6.35 209.55 6.35 349.25}}\ - {executive FALSE {6.35 177.80 6.35 260.35}}\ - {folio FALSE {6.35 204.47 6.35 323.85}}\ - {invoice FALSE {6.35 133.35 6.35 209.55}}\ - {ledger FALSE {6.35 273.05 6.35 425.45}}\ - {quarto FALSE {6.35 209.55 6.35 268.732}}\ - {a FALSE {6.35 209.55 6.35 273.05}}\ - {b FALSE {6.35 273.05 6.35 425.45}}\ - {c FALSE {6.35 425.45 6.35 552.45}}\ - {d FALSE {6.35 552.45 6.35 857.25}}\ - {e FALSE {6.35 857.25 6.35 1111.25}}\ - {na-6x9-envelope FALSE {6.35 146.05 6.35 222.25}}\ - {na-10x15-envelope FALSE {6.35 247.65 6.35 374.65}}\ - {monarch-envelope FALSE {6.35 91.948 6.35 184.15}}\ - {na-10x13-envelope FALSE {6.35 247.65 6.35 323.85}}\ - {na-9x12-envelope FALSE {6.35 222.25 6.35 298.45}}\ - {na-number-10-envelope FALSE {6.35 98.425 6.35 234.95}}\ - {na-7x9-envelope FALSE {6.35 171.45 6.35 222.25}}\ - {na-9x11-envelope FALSE {6.35 222.25 6.35 273.05}}\ - {na-10x14-envelope FALSE {6.35 247.65 6.35 349.25}}\ - {na-number-9-envelope FALSE {6.35 92.075 6.35 219.075}}\ - {iso-a0 FALSE {6.35 834.65 6.35 1182.65}}\ - {iso-a1 FALSE {6.35 587.65 6.35 834.65}}\ - {iso-a2 FALSE {6.35 413.65 6.35 587.65}}\ - {iso-a3 FALSE {6.35 290.65 6.35 413.65}}\ - {iso-a4 FALSE {6.35 203.65 6.35 290.65}}\ - {iso-a5 FALSE {6.35 141.65 6.35 203.65}}\ - {iso-a6 FALSE {6.35 98.65 6.35 141.65}}\ - {iso-a7 FALSE {6.35 67.65 6.35 98.65}}\ - {iso-a8 FALSE {6.35 45.65 6.35 67.65}}\ - {iso-a9 FALSE {6.35 30.65 6.35 45.65}}\ - {iso-a10 FALSE {6.35 19.65 6.35 30.65}}\ - {iso-b1 FALSE {6.35 700.65 6.35 993.65}}\ - {iso-b2 FALSE {6.35 493.65 6.35 700.65}}\ - {iso-b3 FALSE {6.35 346.65 6.35 493.65}}\ - {iso-b4 FALSE {6.35 243.65 6.35 346.65}}\ - {iso-b5 FALSE {6.35 169.65 6.35 243.65}}\ - {iso-b6 FALSE {6.35 118.65 6.35 169.65}}\ - {iso-b7 FALSE {6.35 81.65 6.35 118.65}}\ - {iso-b8 FALSE {6.35 55.65 6.35 81.65}}\ - {iso-b9 FALSE {6.35 37.65 6.35 55.65}}\ - {iso-b10 FALSE {6.35 24.65 6.35 37.65}}\ - {jis-b1 FALSE {6.35 721.65 6.35 1023.65}}\ - {jis-b2 FALSE {6.35 508.65 6.35 721.65}}\ - {jis-b3 FALSE {6.35 357.65 6.35 508.65}}\ - {jis-b4 FALSE {6.35 250.65 6.35 357.65}}\ - {jis-b5 FALSE {6.35 175.65 6.35 250.65}}\ - {jis-b6 FALSE {6.35 121.65 6.35 175.65}}\ - {jis-b7 FALSE {6.35 84.65 6.35 121.65}}\ - {jis-b8 FALSE {6.35 57.65 6.35 84.65}}\ - {jis-b9 FALSE {6.35 38.65 6.35 57.65}}\ - {jis-b10 FALSE {6.35 25.65 6.35 38.65}}\ - {iso-c3 FALSE {6.35 317.65 6.35 451.65}}\ - {iso-c4 FALSE {6.35 222.65 6.35 317.65}}\ - {iso-c5 FALSE {6.35 155.65 6.35 222.65}}\ - {iso-c6 FALSE {6.35 107.65 6.35 155.65}}\ - {iso-designated-long FALSE {6.35 103.65 6.35 213.65}}\ - {hp-2x-postcard FALSE {6.35 141.65 6.35 193.65}}\ - {hp-european-edp FALSE {6.35 298.45 6.35 349.25}}\ - {hp-mini FALSE {6.35 133.35 6.35 209.55}}\ - {hp-postcard FALSE {6.35 93.65 6.35 141.65}}\ - {hp-tabloid FALSE {6.35 273.05 6.35 425.45}}\ - {hp-us-edp FALSE {6.35 273.05 6.35 349.25}}\ - {hp-us-government-legal FALSE {6.35 196.85 6.35 323.85}}\ - {hp-us-government-letter FALSE {6.35 196.85 6.35 247.65}}\ -} -# If you have more than one tray use the following example: -# 1. List the supported trays -#*input-trays-supported: main manual -# 2. Define each tray and it's paper sizes -#*medium-source-sizes-supported: \ -#{ main \ -# {na-letter FALSE {6.35 209.55 6.35 273.05}} \ -# {na-legal FALSE {6.35 209.55 6.35 349.25}} \ -# {iso-a4 FALSE {6.35 203.65 6.35 290.65}} \ -#} \ -#{ manual \ -# {iso-a5 FALSE {6.35 141.65 6.35 203.65}} \ -# {iso-c5 FALSE {6.35 155.65 6.35 222.65}} \ -# {iso-designated-long FALSE {6.35 103.65 6.35 213.65}} \ -# {jis-b5 FALSE {6.35 175.65 6.35 250.65}} \ -# {monarch-envelope FALSE {6.35 91.948 6.35 184.15}} \ -# {na-legal FALSE {6.35 209.55 6.35 349.25}} \ -# {na-number-10-envelope FALSE {6.35 98.425 6.35 234.95}} \ -# {executive FALSE {6.35 177.8 6.35 260.35}} \ -# {iso-a3 FALSE {6.35 290.65 6.35 413.65}} \ -# {iso-a0 FALSE {6.35 834.65 6.35 1182.65}} \ -#} -*plexes-supported: simplex duplex tumble -*printer-model: "GhostScript default model" -# 75, 100, 120, 150, 180, 200, 240, 300, 360, 400, 600, 720, -# 940, 1200 and 2440 are supported DPI values, we limit it here -# to some common values: -*printer-resolutions-supported: 300 360 400 600 -*xp-ddx-identifier: XP-POSTSCRIPT -*xp-listfonts-modes-supported: xp-list-internal-printer-fonts xp-list-glyph-fonts -*xp-embedded-formats-supported: {POSTSCRIPT 2} -*xp-raw-formats-supported: {POSTSCRIPT 2} -*xp-setup-proviso: setup-optional - -# NOTE: xp-psddx-* attributes are EXPERIMENTAL for now. -# xp-psddx-download-fonts defines which fonts should be downloaded as outlines -# (valid types are "pfa", "pfb", "ttf", "ttc", "otf", "otc") -*xp-psddx-download-fonts: pfa pfb ttf ttc otf otc -# xp-psddx-download-font-type defines which font type is used to download outlines -# (valid values are "bitmap", "pstype1" and "pstype3") -*xp-psddx-download-font-type: pstype1 -# EOF. diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/Makefile.am b/hw/xprint/config/C/print/models/HPDJ1600C/Makefile.am deleted file mode 100644 index 1c8b3b5c6..000000000 --- a/hw/xprint/config/C/print/models/HPDJ1600C/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -SUBDIRS = fonts - -xpcdir = @xpconfigdir@/C/print/models/HPDJ1600C - -dist_xpc_DATA = model-config diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00051.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00051.pmf deleted file mode 100644 index 09cc489a5e153c8c3e5fcf2fbbb021ecc2f1ba59..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5740 zcmdUzd2kd}9>>2uxkDzC%tbOGFbStD6Os^O0<17(1~M2XVP--SL?WjkM<9TR3Lc<{ z2y%#WqaX-IM1*juC>G_e$GYlPt)3@Lg6mjtknuaqPqq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Kk=)bJ*@rtWWc{LSyls{}qG`Nq&$s`ewW~O6heW!l z2m5W+hE}YpucvO(^M7rANoq09e>1;t{@Ll1@weE9G5-y64QE*Y!I*ClZK++e24{`X z^-jlUj`f;ueZ$r)^2oMe*=aecrJD{}tYZ8V{s|=PPnwh7J@cp-Thnuv1S386jPpaFI*WsnF?DOoAw8nUrjs3;ejs0B}$A?1AThbFR z@YySIl7;J>FllkK$Vm+p0c!JX`j^ee5- zt81+uRr;0QmuR2Nb?lU$$+jRp$2CT@dv%@hW>lVGQTlVK@63F_m7;lq;a6hKXdb24 zFa7FQwX9RM2#;bOeiS7o+t96h+AV0)eNs%+!$cmr+@O#{Vfjr)MF&Jg=!H*$4 zk(DEWVYm?$7>*z+`Q$$WA%wxlUyS5Itrm3{g_|%MH)9Oy)&KE>TQC;mFrF)FA|~Nh zOvV)4hN+mwv)~LgU?yhqoHHA9Fc-ID9*?l|xijv<-B^HyxCi&*KHQH*JR?4U2eAYX zVJRNQGCYFiSb;~el846CScAu~7LVfztiyV2z(#DsW^BP$Jc*~U4cqZFc3>x-!7l8^ zvuMI|*n{V>7ccO1`65r32hfazIE2GEf}?l|FXI&)!>jsy0P}fk6=fIvRhAK2nYX}b+h|ve!L@C}HcrYxh+y(;@D=40Lh4XzeNT$xGyA@(MXdUL~)Q|Lc$Wis*m)ebB!E@$?Fi diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00052.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00052.pmf deleted file mode 100644 index b21a9a2a821b34c6a9e3a364dda834c8150391dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5736 zcmdUzd2|$27RJBsCP`=QCEZD<6R?SBSWL(QfhZ!Kq#-RyCv+!-xX=P25=jUoxG;c# zAc!EcLl9IJ(SRVbh@hYj%5lSSbVg;yGslB7Ix32CMi^yG&G%kaHSrJSsDD}T>$>&o zzWeT5>Px*cG)$Np1HeEM$sQAM7tcoRx}N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ZnoP|p&Ko3R(=>{4^3pWQs8{IKf3o#E-+i8>(LA9aJ^elob&=EbN}?>ORPhsE8SMBJofV$75J8 zBp?w8(QCAbuq;c`Tx|Ko)#a3!un3y+Tz(TYi!j48Mp*YG6R zj;ZLtG)(6~rxPRJ&j7P8m8?gzGVl%ejF+7eZuoc^| zooCCZc(&}q4m^Wr@f>zi=XT?Hynq++686OQ&U=6RAWUbo7P7g+8S?KLghg!ZVm2wl zqo%kLnxoNOb&#%|2We|S5RHDgiT|{`kX(;x?-QDhbmLjvxdGZ_}d3@+0j$2{UL=8N2A_@W}V>I+1iYPoEy(J#^HH`$^-1LJ)@C*<#6jxTdLzQma@{ddiT>p4ZWwu$lA z#@@J}?i;P2qHLSiKVrN%XJUP)&ljm60V*s<9S6O?)p83G&de{$5OZw(oSx@9Rn;iZ zyvLDv!qXe|joS+%J_+$_llb03r31B2TSk3&Pb2BXOfratSV<<~xKaW6eTHO{9Fj}K z9$1{ggwl%dPIl6l@N`6F1ho-VM^GO@g#B|G@5uxBjJvY ziVJEksJfu;g31eOFQ~rSXR>j;k0)HS)L~GGK`rLzGjchJkSoZQRy4|81C)L~GGK`jO+Kd8r`B5R)r z7w~=)Sx9asw~$3-F}ao8Ms6o}kR@a(Sw`+8cai1fZnA=`B=?Ye$$jL0@&H*y9we*D z8nTwGBM*`FYJ$^Z40dPekT{~q*j3tkB2 diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00054.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00054.pmf deleted file mode 100644 index 524934c71aacdb42ee6e1d669595f83249fcbe20..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5744 zcmdUzd2~}%9>>3Fo3<&?HpxrU5(*)LXf>rREwq9Iu?;lPCZS1zf*Q+GtP~1msfwso z5L~e=O0lvCD2u3o3n0jPWMmW-&N#=F;{wGqjvhQh1%_t6_bpxKoH?Fh{+f6C$@{+F zyZ64ke*5mzRZf~22S7);4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UQ={Br=&yA(dn*xtmmxd&o3WO{S9>q=xWqn9~sSUC^NTsgKMh^GF@x z8zWs<`A8@B77q}vY5Fnf$jWEJdY&I4kCKIC5qXR(CQHcU&SZY64^jDl1=1g@(S5Zwver48+ny%C$Ev$ u$s1$`*-3VhH_2P%ZSoG;P4?iM$1LPq2zdpKks{J2-5Be9_@&q~n diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00055.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00055.pmf deleted file mode 100644 index 2ef9bc52ce15236fa7c95142da663926ef95a08a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5740 zcmdT|X>e3k8a>^eq?16>d$tbHY4!{qldza53Qf{U8k6qO-GKzfD0?tK2%8Sd7!-ma z%D#z$5@i=n00G$)lp0HB2DD~M9g6}>P{*ZkSO&!Oocoqe_~B5){F+xe{m%Q|cfb4H z?d0C489$~@4?sgC5PNjM>>8{;m`ZR@(J;UAfnWdMC#l8xlY&)GcC~v&Z{Je z2#2rLlGtfMJc*O{l$j(h7T4qwqINh)mJ7=!V!t3C5}ye2CHpj;MB9z<(la88c3wx*DfjYSNIA8RVeV6l~)u8+~pb#djjraPqkDX z3QF7o)?FR&6nldqHl=3z)V#d@`H>eMUxB|+l*~bayS%zYY62=%QsieE?qGq3t&n)3 zM}CmoieVM*LZvG48m{(T<+`PNTymGV>Rod4U9P;l^KxCe{j;^Rlx!l;u?cF-&dDk&~aFljUfiIUfS${(xKbdX~doTI!I> z1Rd;uPhhyGFpI^@%0#c+(ng2Nk)M;3lYg&c__+G%HB+ZJaa>2p$1V;D+h3YtQ zUU>qgUZ1DB+#mFcYM8WY3UQh};PV87Y4-5I(5U zf2i`P>BbDk9DHdY+cLy{-g(LLC5|&@_n2?vGj$(DZ{j-5kLw$snNV`Ih<1@%rtZ%o zPWWv65Amn$>4Ix|TLL0C!L|Ox2J%j<37Tu>iISaMJI*{*vJ3wli&gc}{$!pPv7a}8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+PoO8b5te| z=-kL0E4i_qU9WwDaOQK6=L~KJeB6Fn@FTz-&!yadbU;ULraIvYT#2i2HLgKtT#M^) zJx9JP-(=lzBll6=xw{IY2W~-6W|&@F{oIB=xE+0Q2l^p|{@h}PxeSjW8#x%jCv*^U zk;nbkU<|=f48w44>!P>^`6xgPBT$GU_Io5op%^7dpp?u1(VU4%a7m0xRG}I*7=y7G zhkJ1!()N%3!+7rWCSW2rj`iFh-H*wbf~k0b+rH_Tfd(|Pscn;5FJ6_=KaR+u{7k1+%v|$hS;$`f^E7*@$@fu#o0la}X@fP03K^($iyn`cn z*W2eF{jme_W2XU7#J5RRKj1O$uv^wUoMJ{l(h(Ro+&L%b>wg1mB(A@df?MbNN@+uo zHe9xyWJbQnxt3hdW#1-1&VBr>V{@+~=f(cnm5yD`i?8eF))PO`Uw3v&*Dlw0;}oJCQ30 z=L0hycYWj&@*-l;{FOnT(C)q`Ilb1*v*+ce{m&rcz3fWIyC9jd! m$pP{Pd6T?F-X;ghA##|!LynMl$x-ru{df6yqW}JHKmP{OSCjt$ diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00057.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00057.pmf deleted file mode 100644 index 3833d4f54e3d235a53e6b04bcf88144f6132c889..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5632 zcmdUzdvH|M9ml`-?zuNX!6zaQfglLfy0}?FNI;@Xc0(4DO~@uB;o%BNfXE|A2#7ok zsDPk6xEtDE`k z{oZqb=XZYR+;e_8XN{>fbJ749q!XFw1McS4Ox@S=`Yy{<>i*kwAcr>@sr$ECF^d&% zOWiB6y&Pyx-T#jF=~wZFcH&?By?u?NDSH#$Hr?V%38E+IE8=F7E#elEC!&bNMNAF{fQEhJ_!zgDY|8KiqdFRq$m-Oj*p z&hYCS8**}nSk?{wMk4+gSw{J|lCfPY9%uBOzV8^{XyQ-S$25snmuDvHVz5<5!s zixRqFJ4n z^AG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q6^2Tq-_jyAe=an$?hOUGsXfnS(|03tkxw%%0v8dNT zYz!7Y2P8bYgxwBlnW~NQB%^CXxrpBr=)QlPTmu@(^htQ^~_*8ktV`mP*IvXFW2L zG!yZpe}p_rW|7(CG4eQ>L&SwQm++pXAA^ppej=RD?K5NnX(i8+g=7&~OqP(P&@ zSw@zV7sv{-lB^;xlGS7lSxeTDm&kgufovq3$jf9i*+SaLR`LqjMqVYak=Mx^WINeG zc9J*AF0z~KA$!SN?a4vJLDjFm%K*~k;CK&IZBR^DOfcpT7tF E8&*!g{r~^~ diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00061.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00061.pmf deleted file mode 100644 index fb2b5a433f16e5c49d6dfe4377230cde59a44654..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5720 zcmeI0d2kcg9ml_tY>W-EEbYqJKvHof5RhXT8|**=LR#AbTQZVtW8%czM}XMa+>k&x z3<(hK`v~C%5$tw{i2AZD_~1We)87`-3HYg!z@pZb5(L|_JQ9MSuqGvQn&?5+RL z^kEAyD|&x{_mwu@&`;z)jC4%ZH06(o`s}8>+C?GSkWND6kf(&`P5KB?Ldu00K}M3c zex7Pc;`=e6|98Z( zkmYNFhK8FHC?r~tMA4F0IYQBa$qi4CiQ+E@#cW|&N_GozjGPzZBHOe%g;6HrF(SFq z$DF?{rl_RF@E%1Ch1&YY8To-yzc*L`PoTJ@v>@m%DfD@e?=JQgRaE)i#R@#t6Kh8g zuSL1yD<}+Wwm#Kkhaptt_J`RrAthYy^M(txzx>s;;|7m~+v}|gg)52_&59D=0HvrZ zUhEIW?+JKCN*6rtlBzFr&evJGq-zgmNP3SGn1$6=&9J5la=SnbVkePbiu3SyGx70 zRiX+g@f205&sUqfRmV(!tB!SpCPmGcPZUQopZ%sp1ZW0v?|id0jKJ zvs|v6tjz3Oc3nwDP;|~+<#6TYxiTD$OU#>KNg(JJt)1a;7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_=6d`;j72O#DQ=Ik+MdyE(>PF!J&f8xd>r zGEzI5|O1l2ha~d5649&XBX@9QmI<%v$LU+U3FDgZ>49 CSC+B> diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00062.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00062.pmf deleted file mode 100644 index f0e58c43548dfc2d2a7b436c9050ec4d22b2fbfe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5728 zcmeI0dvH|M9ml`Bcb5%>kjLJ;yAWts6a;i*vLuk8BJ1vwtR%Z(cM}MpE3Zft3?w2V zJ`fR*H_Ag4MFAhUz7U@X2%}T`hqOLwwRKuMQ|p7Vb*xTA#irkL&pk`pnc6A+!|6=# zD@oKm3XYuNH0Q@t5&+82==Z)XGe}fs< zGUGV)JM&K~1eRL&uk(IZ32&HAls}70L}h>J-?h$Lwd zVh(8|gX271Lwdi;)6GJB#?x9Qwo?=w;AxM@^%!}A{6d@#ipVkYju0P_Pl&skr!Psr zk9j&t{H3g49=f}`_#B(T2>MVARRh-@a03Bjk^UK8R?_GuA? z-ABe++3g9Ie4>Go8I0JDQd~=6_P%}D_(W4Yl59aZ(a_jbn+!G9#ljdLYKYahWa6QQ zD8lUvJKAPH5GZ{T@T6)|d)ffuL;}YDH=+p z65&_`H6zO_gB2B36*X1We0_~AN%4YCDSt&xO|Z=0v(CIpHYSoG(cfkMP<_4M%#-r7 z=cCEyXrzqU8yZA^SgrHNu9-f!ZKglquNhfWRdK$*d3Hx}iin3r?5PXl(<`FO?I)k?1ZG z6X2V`pQi))8-3sE*@0v8IOAp*m0Qtv|69fcv_@)RO;XB*^*A7`@CFesJ!_b^_!V~j5dvFnhT;z zJHK_aO!tm&XnKz2?m9i&@9pj{0O!sEo1S$HcW~* zzem%vzI+D_!+C{!v7XiYh`6@5#AVi>ZLuG6-(tq8wGkzkFFjJ*D&N3S0DS-|xk9oxd$SA+)HoR$cU^o-O#Dczd#4 z`L>g^9!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rHz3&<8;$1icV+L(mW9UX!2KGss|aCOL}?Aw$X8WEdGv zMv!v|cXsHOpkIQH$*n6=L4sr?;TM~^Q8kL!(M0SY)sQjdd~yM~kcjUR@wGXQgviAt zOd^E;8R@T}!-5_Qx-96k{GuWCq=Cdqg7Axst}C~~QoN>#_^xgylgMP!LZ*0rC<#NDh(1g#Qt6g#1q*1+w-wdHMJIL4OBAXu3oI diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00063.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00063.pmf deleted file mode 100644 index 8821ff155cf19791437784565ff2557b740a8121..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5728 zcmeI0dvH@#9>>2)Q(7p^{Nua?t2}ueR3*im5XbS~VQ9zyw zC=WqJ6aht%0HQp^f`BVKj-#tPtIm$&Kkn$R>yvR;@v+-vzvrIZQ1%aYbpLR6W;^}d zeD5#koclZHp7YH;*EDllYaRd-DI|MxfIIkU&YVx@r^^EHU;jS8E3kqmuFU!GS#cdJ z-e`Q!`i(YVY3BSbo=;bJ!g8Yh>7=YkYRb!re(ijIIz=L#1l6~au13a{g$eZL{AwD60A!-#5-w>PV z|4+oVmicu-I(=?Fg~|xJQS{=cmZTWK>ZYs60`ZlLVws3+AbW&3N?sGjLn# zEST3cV;;r@f}?8UGB%=R&UD0Ty`eao5DUb|1^w|F`BkW8-mO#S!0Y!XV)2IBfQ%v% z93QAn#DWt7h=hZoxRlXAEL>Y34~9dD@#u8Y(CGxRh}RbkjY1u~V*^p|s6ax$9DFt2 zD6gG}21W&Aadx4pt);4}vO4=kAmj`CMNJQU-bkWG?*PUdVq}TMUJ}$t}C>c2^ClDtDJxmX+~PkvY`4E6b}rW$sLVZV&u{ zk>2{+ctUgm5npXWzrH@)y$6I2?bEbI&V zQ9Y=vqTJ)DEcaBD^VUTgqT=S9S1wO=wWrk8Ib)tgBjKo5jCQHZTU+bW>%?3f_ds-P zz+cMhb#-DiG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6=qmqg$*(kq#+$m&=k$k94*iit?&cxsO;QBwM9EThW6-yj_8EW=z^~31_v_m zIGlXt&O&!&bBomjJ&_9+dZ9P^;0g3aKW^pR+;io@126g`9|iE?DLjorzU2E6Krsez zD;5G@dQpmjC__00VK9bZD2Ab;{=Ymh93wCiqqtQZgRvOL-CiZ0!30diB#v+ureG>J zHZ|P%)#6!9=XSLYGcgOZ@gvOPE^sd9VLso97UFpo_HU1RvDm>dn;z&GcM8xNxM8a}k@lnm z=}0<}&ZGq zt&g4x4xIKaE00$X;V&co6?9n8V?mb%eHL_D&}%`r1^pIuT+nkt*VR6Og?J4U@lIY! z29h#TP6m;|WC$5bhLH*~oQxnN$tW_Kj3HymI5M78l4r;SGLcLo;#a+jOd(TAHK`%f zNG*AmOeZr)9hph^)<-V}r#tA!+IP9Ryv`%@$pW&FJWm#p#bgOtN|ur3WCeMFtRydz zRb(|;L)MaYWIfqHULqUG%VZOIg={9TlGn%x|}7XjzU|MbyVi{7AJ9{xS(pC913 Av;Y7A diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00065.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00065.pmf deleted file mode 100644 index d9a151d7f9d87d1b05f698dcec0b50051d8e9798..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5728 zcmdUzd2m!k9>>3LAjgEcb4+HE;3OP@z~mwrvK}xbLo$*~hM5T=3WOuvfnb6hx`+rG zK}10aA|OH(2#SCl3PD80wN`PpN>__2c6D{VYSnUA1yRZDxBJZuU={4@{4 zW)bs?Lnw6iLmEl+Ac002&&eBU^ks2n09hbzIcO{wp0#ARFrFu`3ga#Isey)ujn@oi zthSYgk2U{LMPo8O%1bn4J)-wD%SKe!c+32CD6OvY)s*{Pz6wt%M!2dxm38%ASCt#( z6PqW_Zkp48TDPaXBB(ltH#IgOQ0ejp(TspQSnDYZR;ahUP0h0>Ho{d_Rv!q~Rk~F# ze4a7x%KCukW;cA*9&b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ZtwtD4>o`v@E~{yYy=O3M?f#w1U7>$;8E}x*b26R$H8{+1b7lW z1$Ka);AyZ6>;`+lGhi=x7VHE2!2xg(90G^IbKrS!1RMn~fEU3r@Dex<{;z-fAJqQ8 He-HX6nYKK4 diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00068.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00068.pmf deleted file mode 100644 index c20e39a219ac264dd9cbf72e7a44fc089d1b9f30..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5732 zcmdUzdvFv*9>>4CdF>|IXF`(A23R1-LpLNL0iq}@$%ZT@n zBLNh7qaY6vkhh>16+}P}>q_7}ORun~JC(zOD^H=gGN5=x_P*USlR)Wlr~Y-Rd}e<0 z+h6zmx~Ka)-J_d0Zh9O59WjwTQNV9`)~na!dCrUm_%DAq7=eYnaH-cHvEVWm9IXA$ z@?$N)KUUnJa#B(O4)vYsf3YI7~he#wYAkI}Lq08Nyh@ zc^X01{CydXiS+2+rSUKg+57qh#pRX$qKeTdEH4XG4z2J6N_>SV_LTWbM~D5MGB1W! zH&oZvPaBVsUf7W4#jNlK%S$UmzH)zf6mGZ}eZvKU0Z*aNKNJCYMtCbcL%m^n zI~109DtPa3g?Feg7-B1?%&Z?UAitpP2d}@dyhxPHL7^uQE|E>ZD9tD?XBwVhp_i?Y zc9B=PP}+*&m7XH?R^n&4Z|o(v)-!IUH{1j?(S3w=c>=$oCFo0F55&Aadc21ZwiC)94aataD^vRpSN&5Mdad4)%Gc$UjkTI!Nz zf-ZKww_=31D2v6*%0!1~&2xFC&6+Y}cD2jxD#*#t%fHJtVnV~rDfQD_Ia#?`x!|Mp zR*WpKDAJx12b8y>)aUnx1LZ-VxD)f%Tp^CHd;Q*Ekj)Q(hE& z7Ss8-Wr?*hwU6-YPMG&w8`Cc63uu?8FLt)1?3MoA&NCTnQnxE*V}r&frL6u){FV6L z>0=CU1Cji=TFusvw{&AYy{=e+7+BU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f}OzY82N*)t?iTah;s$5aGv~_y}T07d$i%u!+ zW!obI@8AZ4eemTF<-E5Zx(DY)BCEHEeh~S$+u8kuEy_q_8GD~dB>a(*EB&pkTijco zSvTu~u2ZbIR?eb75A3{ga^~~%!MtBFIp5{vJi?JM<7bQn?YaE;87h6F_}lwQ85`o+ zxBss6w|GWGj3LoCVjO8>MD>e)Rh~V^mwZMCi>0n{r^E*@{&a-Toyw+sT8iO0mWWSL z;!}{3@H-2Y4nlRMESh=dmnCW*7tF*?l1MV?KsaWofS?9~DhTQzsDz*vf@%orq4K@S z#j{wacO~6OCh1OYBRxn@!m%Y*dQ?hKD?zmc^%7J}P%}Z*gnT1$B~0xE)l>Ok)t~19 zgey1dD5#{MmhwXuxrgu#j={u3IR50fts0YA!hRK;7jojLagl$sF<^;fj$e4C*kb#Gn>)f|EzdW8`r%pFBaH zB#q=LvVb&^g=7&~Or9pskR{|&OdaJ=s7ul1=1A zvYEU@wver48+n;*Cp*YavWx5{d&pk$3fV{YlUK=WTo8&EWkQ^d!lf&d4 Va)cZu$H@QnpXsLT|NHl#e*+9n`xyWL diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00069.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00069.pmf deleted file mode 100644 index 4a4a352811b4f7f9e7516a20771eccd0ea5aaa46..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5740 zcmeI0d2kd}9>>4k69|x_y8~)40s{(0Vd5kNVHAZS(!m+s1LSzE={s_U*6DweL62rDbu?|W~05=*wWbpNonYP<63 zeET==_`U1b@3l5{(ws~H8p$DzE?^=5>#66-{NE=7;Gg`xU3*|XAKaD?l2@bL zf}3?|*=TM)J&&R@e?kWeH~(8cir&nwdC78GK(n@1ShkZ!AzmkM3vq&dnoprKjXsQN zMRt7*OFmmkaSJWlF^W4WWbf;1heoQxfmk)lB9+mq@|Ztb5iG+{e`PRKoecXcZG@)G zn>VG-U0yqH`iw~!We3Y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config/C/print/models/HPDJ1600C/fonts/9nb00072.pmf deleted file mode 100644 index 5415c3f446e8210461d25880ffdc71b4231294b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5724 zcmdUzdvp_39>;%4n`CB^boxpW5Di73R8rcsK&xU2P1zObMz z^0W#lA{3<{kAk#R1qES`dPG}Kck!^o?m2o~y1I%-SK%nwHv7GICZW5y>#qCP_VhFP z&Yj==-QRu8FZV_>d&Xh|5ov%K?2aIM0H0d*ekML|jwHfAe=dkbD{*60?>kVj4i(3S zo}>O`88+&D8}6sZ;s$oi|4cAELD7)60^YWOPYVlTAV_9n6d1!q4sbEy2c=BR1M@+m z2bX0)d>faQOkBcceMoGBFdxUIk=1Gfhe2@-E+<&Yhu|C&pM$>w`5Z2nK}<6)-N3pQ z@re`+UfBbIz=Qz9;dH_a=e8_#d$tQQNBBeavg>4f|4?iqtHc#(<E z9X_;O=5yt_{Q>l1UR6bA=E$t@1D7Yq>tr?4D92G$me0FDlS3lci!dDi92a`QwbP~C zD1D^~#SW+16njjz-lJp-jf}03kA|(%ru5uq%N(6)x7kOgrs9&JUW#n?w9Kqjn;N1m zjhwDrM{z-*jP-(watg|L2z=1{C#8D&Csm~_9-LyIeSd0I>huhI*608gd)yO>T@JtB zo8xv;R(fiNJuNLGb+mmHCa|c)$7bldvZiHarKMPV2aOwFk=N&71D;}a6cku_9lsSr z@A6G_Ia5%*u#gQ%sC!nMH49Co-)WsVtFmfd#Ug83iao_nm_nCtlGo=9%?=il%U9s` zxXOyWem83Y@rH^5SXbjcF25h$_6OV^9syRNnJvZepLMPB5=g^;dY?#VxoZ2S4XgM< zq9@VQ_qbFVHvF%I+QunXiMDK)$)5v-N-bZMX9TuBGe0=mUCM6n)~&2A+5Db zKfvd@t8UaiY~CbiOF@+pVddI3v5o6^l%F>q;~E)(GK@n)Hq_s=jA_kWwAEq!5&9^PIm`HgsWti` z?*FvuJLs`2<4~lL^VgX2fO`S&4 zRBfz)W-)At`yu`Z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zqMjgJq*dnGjBjdNT$XBTWiF{PN-MY4d>idbyQEsPms)9;RIB-m z`qx?p(5|#AHaer4Yw*%9|6rW?&eEpGI{GkP>G}Md*7FoTNobAMU_dl%foN1i1Ad$D>&Y+?b*Y)fkT&+=)NpE=<7P2+RNDg<8~M zA|~=OvN-bVmfA^2{SPZv(e0h;C+~jd7OFku>cG4Cp>^fJQXg+51+91#%kUVM^O(2-PvA*Bg_U?3tFRht@C?>s9on!S?bv{gcoxrL6E3L0K*uD0f_%t@^z; z7buAU`h+2cPAiCflsuS@WhuI&egKd7^YuE2r&^xcW+hLhOy=GBJUm*}-#hp_z#xI} zQ=T2gX8l{&Gki*BAIh?xj`dgkL_37et%TGoTKI^k-k)7dbFkEtlk>)x<_Rv%kpK=cTX1)OCTU12?=k%9#cphi6>%@l}JSLWFr3GrVtY`6AKaXUHmx1dB6w=#y~I%f^iUx zgkUTLqahd%)!&?)d}fj?aueZ>i_sB`k6?u4PhN!ch;b5(l-w~B7s(-PJ7XpoHNm(E zMo#`mCWFZkGL#gOVPrVru7|M{95OJTg2M*fPTXV^DJCA`C8G&i;tRkz)8uAQTOV*J#vYxb)4P+yEmOMu`k?W^}J>*rgm+T|^$pLbZ93rog!{i8gog5{{$Z_%p Rd6WEKUrE2J{eS*F=wIh*{{;X5 diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00093.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00093.pmf deleted file mode 100644 index c85f3b4de9d69ff0d63e97fffd961a57fdb543df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5728 zcmdUzdvH|M9ml`BNj8tol4ReTgs`lE0J1R&K@yC}CRvh|WD|BbgitjgF9U%cbJTOSxrZolWAz1cX^>S+IJhR?m< zd-iwU=X|;6>ZVVbn+QNhOk{T)a2xOX=<`(G-SGhbslO*B11tI9jy|7b#`VlNTKk>( zZ%6~~j6R>`^Heh*7$?e~N($^!Q}!cj-ATOLL?il>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0pJh_m*B!`G^O>WYkc*qqbmkb~SNgm;w7F`nb zNxm%*t_8X!=$D{l^3xS5Bt?Ylh2AMYR9(&c2vR~y$w+by5$`hBl2Jr_^chWjq?}Zc zO5!JDNEP8HCAuu=v!K(0UJJS{=(nKb%1>Z?6Ql2f&I@`k=)R!;^3xcZK)CMd!=MxM zQyjUG+(eqmBr=)YOs0^jWEz=HW{_J*3zC$|BX^KH$#QZRSwU8kRpf56n%qOykhNqTSx@dI_mTSvzpK%;LEi?Q z8}x3_y+Qv59USy<(8WO?2b~=Ba?s5|KL;Hhc!F#r+sO{{B-u%xBD=_LvWGlP_L2^= zk32)3CC`!P$$oNx93+Rx3*<#|m>eNT$xGxIIZjTHm&q&S|N77Lt=514_n?0R9J~n* diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00094.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00094.pmf deleted file mode 100644 index 875bf1df8f3dc2320416710123261876b146d890..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5728 zcmdUzX?Rmr8pq$8kR~Bra5|Xr~Zh=y8DuqJJE+|l- z(?OI~EQ)|2h#)GPf+*Hmm~k6NXFf2)qaT>@QAY>VL1k;^f6l$PE$Zkq%%|zo-@X5P z?t9*|zd7d$Qzp&O5|IE>z|(4?dAO_O=SJKe1Bmd?-|O^5%kbckpWj8s2a$1%@*er` zOe0z>Kfi_NMiU-j$NV<}ce z0sXIWd4P$}aCuM>T@WcpaoNFg?FIY5wlTOIV<~TgKQr+W_!!vs>uw7 z#H0S(eH0G)gE2`)e9=&#Cgu+X-p>+=>M zdv!JI54m*?sdWyQqqNvvR5;2}i@DI$GTl*FP*hMv7)M{EE)?-9LxjoXiv;{ZUpyR& z`dK-swUQLW+`293i$>A-Xv`nv^}tMIYqsytu~J?L6E9=Q=*FIReHO=}OLYdF;oNQ= zX8qOt$z{C8^0HOI{sw5Z4;fl)yO>rVPH7SIZO6}+V`a2i7FxS(>$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P5I4oru`PX6+J^M*)@^c~L~Iv0w)|(r&-t`a z+F~soAKK>IBTQ$^IG659e@jbO-!*?D_m0T_jcta_V%-*>%DG6k&6W9?tSCtxl6z+P zM3&Zjl4^w(`$EZbe91A<+PajKk=)bJ*@rtWWc{LSyls{}qG`Nq&$s`ewW~O6heW!l z2m5W+hE}YpucvO(^M7rANoq09e>1;t{@Ll1@weE9G5-y64QE*Y!I*ClZK++e24{`X z^-jlUj`f;ueZ$r)^2oMe*=aecrJD{}tYZ8V{s|=PPnwh7J@cp-Thnuv1S386jPpaFI*WsnF?DOoAw8nUrjs3;ejs0B}$A?1AThbFR z@YySIl7;J>FllkK$Vm+p0c!JX`j^ee5- zt81+uRr;0QmuR2Nb?lU$$+jRp$2CT@dv%@hW>lVGQTlVK@63F_m7;lq;a6hKXdb24 zFa7FQwX9RM2#;bOeiS7o+t96h+AV0)eNs%+!$cmr+@O#{Vfjr)MF&Jg=!H*$4 zk(DEWVYm?$7>*z+`Q$$WA%wxlUyS5Itrm3{g_|%MH)9Oy)&KE>TQC;mFrF)FA|~Nh zOvV)4hN+mwv)~LgU?yhqoHHA9Fc-ID9*?l|xijv<-B^HyxCi&*KHQH*JR?4U2eAYX zVJRNQGCYFiSb;~el846CScAu~7LVfztiyV2z(#DsW^BP$Jc*~U4cqZFc3>x-!7l8^ zvuMI|*n{V>7ccO1`65r32hfazIE2GEf}?l|FXI&)!>jsy0P}fk6=fIvRhAK2nYX}b+h|ve!L@C}HcrYxh+y(;@D=40Lh4XzeNT$xGyA@(MXdUL~)Q|Lc$Wis*m)ebB!E@$?Fi diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00052.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00052.pmf deleted file mode 100644 index b21a9a2a821b34c6a9e3a364dda834c8150391dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5736 zcmdUzd2|$27RJBsCP`=QCEZD<6R?SBSWL(QfhZ!Kq#-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-IRsIXJtr}yb*f%zWy=5ER?C5^S9)8V z%IAho%5#-BY{gvTA~scX@(!Ne&JX>vk6lYIEgV&}LR;g8Ua9@BYLs67udq+Gsk(Gf z45>UK^=oRBYDd2}%`$9QOv4RZnoP|p&Ko3R(=>{4^3pWQs8{IKf3o#E-+i8>(LA9aJ^elob&=EbN}?>ORPhsE8SMBJofV$75J8 zBp?w8(QCAbuq;c`Tx|Ko)#a3!un3y+Tz(TYi!j48Mp*YG6R zj;ZLtG)(6~rxPRJ&j7P8m8?gzGVl%ejF+7eZuoc^| zooCCZc(&}q4m^Wr@f>zi=XT?Hynq++686OQ&U=6RAWUbo7P7g+8S?KLghg!ZVm2wl zqo%kLnxoNOb&#%|2We|S5RHDgiT|{`kX(;x?-QDhbmLjvxdGZ_}d3@+0j$2{UL=8N2A_@W}V>I+1iYPoEy(J#^HH`$^-1LJ)@C*<#6jxTdLzQma@{ddiT>p4ZWwu$lA z#@@J}?i;P2qHLSiKVrN%XJUP)&ljm60V*s<9S6O?)p83G&de{$5OZw(oSx@9Rn;iZ zyvLDv!qXe|joS+%J_+$_llb03r31B2TSk3&Pb2BXOfratSV<<~xKaW6eTHO{9Fj}K z9$1{ggwl%dPIl6l@N`6F1ho-VM^GO@g#B|G@5uxBjJvY ziVJEksJfu;g31eOFQ~rSXR>j;k0)HS)L~GGK`rLzGjchJkSoZQRy4|81C)L~GGK`jO+Kd8r`B5R)r z7w~=)Sx9asw~$3-F}ao8Ms6o}kR@a(Sw`+8cai1fZnA=`B=?Ye$$jL0@&H*y9we*D z8nTwGBM*`FYJ$^Z40dPekT{~q*j3tkB2 diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00054.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00054.pmf deleted file mode 100644 index 524934c71aacdb42ee6e1d669595f83249fcbe20..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5744 zcmdUzd2~}%9>>3Fo3<&?HpxrU5(*)LXf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<}*i_a;tq9pPIL-4XOh&>=yO z1YHvJNzf@luLRu^^hI=| z_A#9m^j6SaL4O4umK{mFWF!$gmts;ve8f-0hosS@lmtnL@XeC`3p%j!$*i2`@nizI zo!mk0Bw=zFsUQ={Br=&yA(dn*xtmmxd&o3WO{S9>q=xWqn9~sSUC^NTsgKMh^GF@x z8zWs<`A8@B77q}vY5Fnf$jWEJdY&I4kCKIC5qXR(CQHcU&SZY64^jDl1=1g@(S5Zwver48+ny%C$Ev$ u$s1$`*-3VhH_2P%ZSoG;P4?iM$1LPq2zdpKks{J2-5Be9_@&q~n diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00055.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00055.pmf deleted file mode 100644 index 2ef9bc52ce15236fa7c95142da663926ef95a08a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5740 zcmdT|X>e3k8a>^eq?16>d$tbHY4!{qldza53Qf{U8k6qO-GKzfD0?tK2%8Sd7!-ma z%D#z$5@i=n00G$)lp0HB2DD~M9g6}>P{*ZkSO&!Oocoqe_~B5){F+xe{m%Q|cfb4H z?d0C489$~@4?sgC5PNjM>>8{;m`ZR@(J;UAfnWdMC#l8xlY&)GcC~v&Z{Je z2#2rLlGtfMJc*O{l$j(h7T4qwqINh)mJ7=!V!t3C5}ye2CHpj;MB9z<(la88c3wx*DfjYSNIA8RVeV6l~)u8+~pb#djjraPqkDX z3QF7o)?FR&6nldqHl=3z)V#d@`H>eMUxB|+l*~bayS%zYY62=%QsieE?qGq3t&n)3 zM}CmoieVM*LZvG48m{(T<+`PNTymGV>Rod4U9P;l^KxCe{j;^Rlx!l;u?cF-&dDk&~aFljUfiIUfS${(xKbdX~doTI!I> z1Rd;uPhhyGFpI^@%0#c+(ng2Nk)M;3lYg&c__+G%HB+ZJaa>2p$1V;D+h3YtQ zUU>qgUZ1DB+#mFcYM8WY3UQh};PV87Y4-5I(5U zf2i`P>BbDk9DHdY+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rnXnh`!|!Xs#H{-aXtPzFJ;=l2yOq-*r(s8>@L=rRj#&=nN6Pl)NFJ$ z--*mQnRkcIOV$CY3Z0iS*Ztqx=~sK7EEQ38>aVuE_p8)4&eb&H)H+9H+PoO8b5te| z=-kL0E4i_qU9WwDaOQK6=L~KJeB6Fn@FTz-&!yadbU;ULraIvYT#2i2HLgKtT#M^) zJx9JP-(=lzBll6=xw{IY2W~-6W|&@F{oIB=xE+0Q2l^p|{@h}PxeSjW8#x%jCv*^U zk;nbkU<|=f48w44>!P>^`6xgPBT$GU_Io5op%^7dpp?u1(VU4%a7m0xRG}I*7=y7G zhkJ1!()N%3!+7rWCSW2rj`iFh-H*wbf~k0b+rH_Tfd(|Pscn;5FJ6_=KaR+u{7k1+%v|$hS;$`f^E7*@$@fu#o0la}X@fP03K^($iyn`cn z*W2eF{jme_W2XU7#J5RRKj1O$uv^wUoMJ{l(h(Ro+&L%b>wg1mB(A@df?MbNN@+uo zHe9xyWJbQnxt3hdW#1-1&VBr>V{@+~=f(cnm5yD`i?8eF))PO`Uw3v&*Dlw0;}oJCQ30 z=L0hycYWj&@*-l;{FOnT(C)q`Ilb1*v*+ce{m&rcz3fWIyC9jd! m$pP{Pd6T?F-X;ghA##|!LynMl$x-ru{df6yqW}JHKmP{OSCjt$ diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00057.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00057.pmf deleted file mode 100644 index 3833d4f54e3d235a53e6b04bcf88144f6132c889..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5632 zcmdUzdvH|M9ml`-?zuNX!6zaQfglLfy0}?FNI;@Xc0(4DO~@uB;o%BNfXE|A2#7ok zsDPk6xEtDE`k z{oZqb=XZYR+;e_8XN{>fbJ749q!XFw1McS4Ox@S=`Yy{<>i*kwAcr>@sr$ECF^d&% zOWiB6y&Pyx-T#jF=~wZFcH&?By?u?NDSH#$Hr?V%38E+IE8=F7E#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y7cCxz`_~#_`m^e=4aS_+{_3btF;@kL@*2`o64j4o`V#_kz zMmzp8Or@xgeBdq8*_tz^N6{=$dUX%ziT3F{PK#YFU*d7w zIZn~9?AzW~<|T5|`W0gzVCcq6^2Tq-_jyAe=an$?hOUGsXfnS(|03tkxw%%0v8dNT zYz!7Y2P8bYgxwBlnW~NQB%^CXxrpBr=)QlPTmu@(^htQ^~_*8ktV`mP*IvXFW2L zG!yZpe}p_rW|7(CG4eQ>L&SwQm++pXAA^ppej=RD?K5NnX(i8+g=7&~OqP(P&@ zSw@zV7sv{-lB^;xlGS7lSxeTDm&kgufovq3$jf9i*+SaLR`LqjMqVYak=Mx^WINeG zc9J*AF0z~KA$!SN?a4vJLDjFm%K*~k;CK&IZBR^DOfcpT7tF E8&*!g{r~^~ diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00061.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00061.pmf deleted file mode 100644 index fb2b5a433f16e5c49d6dfe4377230cde59a44654..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5720 zcmeI0d2kcg9ml_tY>W-EEbYqJKvHof5RhXT8|**=LR#AbTQZVtW8%czM}XMa+>k&x z3<(hK`v~C%5$tw{i2AZD_~1We)87`-3HYg!z@pZb5(L|_JQ9MSuqGvQn&?5+RL z^kEAyD|&x{_mwu@&`;z)jC4%ZH06(o`s}8>+C?GSkWND6kf(&`P5KB?Ldu00K}M3c zex7Pc;`=e6|98Z( zkmYNFhK8FHC?r~tMA4F0IYQBa$qi4CiQ+E@#cW|&N_GozjGPzZBHOe%g;6HrF(SFq z$DF?{rl_RF@E%1Ch1&YY8To-yzc*L`PoTJ@v>@m%DfD@e?=JQgRaE)i#R@#t6Kh8g zuSL1yD<}+Wwm#Kkhaptt_J`RrAthYy^M(txzx>s;;|7m~+v}|gg)52_&59D=0HvrZ zUhEIW?+JKCN*6rtlBzFr&evJGq-zgmNP3SGn1$6=&9J5la=SnbVk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W7zx2x2u4FN9%|p19K5z6 zZAm-Qo^W--_y|Twev%@c2*2boQgW3^oFs!hNivCxWRb3ft2*@q6<1S?pkNFIqbNUE zkshQcd73;!dXe75P5KZI@e+mPlLAsmd_=6d`;j72O#DQ=Ik+MdyE(>PF!J&f8xd>r zGEzI5|O1l2ha~d5649&XBX@9QmI<%v$LU+U3FDgZ>49 CSC+B> diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00062.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00062.pmf deleted file mode 100644 index f0e58c43548dfc2d2a7b436c9050ec4d22b2fbfe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5728 zcmeI0dvH|M9ml`Bcb5%>kjLJ;yAWts6a;i*vLuk8BJ1vwtR%Z(cM}MpE3Zft3?w2V zJ`fR*H_Ag4MFAhUz7U@X2%}T`hqOLwwRKuMQ|p7Vb*xTA#irkL&pk`pnc6A+!|6=# zD@oKm3XYuNH0Q@t5&+82==Z)XGe}fs< zGUGV)JM&K~1eRL&uk(IZ32&HAls}70L}h>J-?h$Lwd zVh(8|gX271Lwdi;)6GJB#?x9Qwo?=w;AxM@^%!}A{6d@#ipVkYju0P_Pl&skr!Psr zk9j&t{H3g49=f}`_#B(T2>MVARRh-@a03Bjk^UK8R?_GuA? z-ABe++3g9Ie4>Go8I0JDQd~=6_P%}D_(W4Yl59aZ(a_jbn+!G9#ljdLYKYahWa6QQ zD8lUvJKAPH5GZ{T@T6)|d)ffuL;}YDH=+p z65&_`H6zO_gB2B36*X1We0_~AN%4YCDSt&xO|Z=0v(CIpHYSoG(cfkMP<_4M%#-r7 z=cCEyXrzqU8yZA^SgrHNu9-f!ZKglquNhfWRdK$*d3Hx}iin3r?5PXl(<`FO?I)k?1ZG z6X2V`pQi))8-3sE*@0v8IOAp*m0Qtv|69fcv_@)RO;XB*^*A7`@CFesJ!_b^_!V~j5dvFnhT;z zJHK_aO!tm&XnKz2?m9i&@9pj{0O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?j#lBK|pUo>M9CZh#Y zFcs5qDK0~%`@cMJIi_OT+HSEH5k%AFx|Tgl05FXAF%8;CnhVvmJR2YQ{HM*Vo@t`a>D zbUo1bxLHGVA~t2XqeKS;JrHz3&<8;$1icV+L(mW9UX!2KGss|aCOL}?Aw$X8WEdGv zMv!v|cXsHOpkIQH$*n6=L4sr?;TM~^Q8kL!(M0SY)sQjdd~yM~kcjUR@wGXQgviAt zOd^E;8R@T}!-5_Qx-96k{GuWCq=Cdqg7Axst}C~~QoN>#_^xgylgMP!LZ*0rC<#NDh(1g#Qt6g#1q*1+w-wdHMJIL4OBAXu3oI diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00063.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00063.pmf deleted file mode 100644 index 8821ff155cf19791437784565ff2557b740a8121..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5728 zcmeI0dvH@#9>>2)Q(7p^{Nua?t2}ueR3*im5XbS~VQ9zyw zC=WqJ6aht%0HQp^f`BVKj-#tPtIm$&Kkn$R>yvR;@v+-vzvrIZQ1%aYbpLR6W;^}d zeD5#koclZHp7YH;*EDllYaRd-DI|MxfIIkU&YVx@r^^EHU;jS8E3kqmuFU!GS#cdJ z-e`Q!`i(YVY3BSbo=;bJ!g8Yh>7=YkYRb!re(ijIIz=L#1l6~au13a{g$eZL{AwD60A!-#5-w>PV z|4+oVmicu-I(=?Fg~|xJQS{=cmZTWK>ZYs60`ZlLVws3+AbW&3N?sGjLn# zEST3cV;;r@f}?8UGB%=R&UD0Ty`eao5DUb|1^w|F`BkW8-mO#S!0Y!XV)2IBfQ%v% z93QAn#DWt7h=hZoxRlXAEL>Y34~9dD@#u8Y(CGxRh}RbkjY1u~V*^p|s6ax$9DFt2 zD6gG}21W&Aadx4pt);4}vO4=kAmj`CMNJQU-bkWG?*PUdVq}TMUJ}$t}C>c2^ClDtDJxmX+~PkvY`4E6b}rW$sLVZV&u{ zk>2{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I`&g}UXj>krqwUi2XfecFf6m{^qyP97%Q-L856x2` z_7kdKX=Oe{tL12Zm403LmFAOavsJD7Sh`VY^*zXrdJ!}1#J~-Jkz1}f#G?@skjOnp zGE$f^6=qmqg$*(kq#+$m&=k$k94*iit?&cxsO;QBwM9EThW6-yj_8EW=z^~31_v_m zIGlXt&O&!&bBomjJ&_9+dZ9P^;0g3aKW^pR+;io@126g`9|iE?DLjorzU2E6Krsez zD;5G@dQpmjC__00VK9bZD2Ab;{=Ymh93wCiqqtQZgRvOL-CiZ0!30diB#v+ureG>J zHZ|P%)#6!9=XSLYGcgOZ@gvOPE^sd9VLso97UFpo_HU1RvDm>dn;z&GcM8xNxM8a}k@lnm z=}0<}&ZGq zt&g4x4xIKaE00$X;V&co6?9n8V?mb%eHL_D&}%`r1^pIuT+nkt*VR6Og?J4U@lIY! z29h#TP6m;|WC$5bhLH*~oQxnN$tW_Kj3HymI5M78l4r;SGLcLo;#a+jOd(TAHK`%f zNG*AmOeZr)9hph^)<-V}r#tA!+IP9Ryv`%@$pW&FJWm#p#bgOtN|ur3WCeMFtRydz zRb(|;L)MaYWIfqHULqUG%VZOIg={9TlGn%x|}7XjzU|MbyVi{7AJ9{xS(pC913 Av;Y7A diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00065.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00065.pmf deleted file mode 100644 index d9a151d7f9d87d1b05f698dcec0b50051d8e9798..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5728 zcmdUzd2m!k9>>3LAjgEcb4+HE;3OP@z~mwrvK}xbLo$*~hM5T=3WOuvfnb6hx`+rG zK}10aA|OH(2#SCl3PD80wN`PpN>__2c6D{VYSnUA1yRZDxBJZuU={4@{4 zW)bs?Lnw6iLmEl+Ac002&&eBU^ks2n09hbzIcO{wp0#ARFrFu`3ga#Isey)ujn@oi zthSYgk2U{LMPo8O%1bn4J)-wD%SKe!c+32CD6OvY)s*{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lk^8x$1)&SUNshdC}SP1Zzii}Ih zxrC`l$h-0fxK^B(fHuIsgxw03f@NSi_%&DoR)X8W?O+wS1FQz^paZM{cY?dXTF?pZ z2KRt_!8&js=mPhHZtwtD4>o`v@E~{yYy=O3M?f#w1U7>$;8E}x*b26R$H8{+1b7lW z1$Ka);AyZ6>;`+lGhi=x7VHE2!2xg(90G^IbKrS!1RMn~fEU3r@Dex<{;z-fAJqQ8 He-HX6nYKK4 diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00068.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00068.pmf deleted file mode 100644 index c20e39a219ac264dd9cbf72e7a44fc089d1b9f30..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5732 zcmdUzdvFv*9>>4CdF>|IXF`(A23R1-LpLNL0iq}@$%ZT@n zBLNh7qaY6vkhh>16+}P}>q_7}ORun~JC(zOD^H=gGN5=x_P*USlR)Wlr~Y-Rd}e<0 z+h6zmx~Ka)-J_d0Zh9O59WjwTQNV9`)~na!dCrUm_%DAq7=eYnaH-cHvEVWm9IXA$ z@?$N)KUUnJa#B(O4)vYsf3YI7~he#wYAkI}Lq08Nyh@ zc^X01{CydXiS+2+rSUKg+57qh#pRX$qKeTdEH4XG4z2J6N_>SV_LTWbM~D5MGB1W! zH&oZvPaBVsUf7W4#jNlK%S$UmzH)zf6mGZ}eZvKU0Z*aNKNJCYMtCbcL%m^n zI~109DtPa3g?Feg7-B1?%&Z?UAitpP2d}@dyhxPHL7^uQE|E>ZD9tD?XBwVhp_i?Y zc9B=PP}+*&m7XH?R^n&4Z|o(v)-!IUH{1j?(S3w=c>=$oCFo0F55&Aadc21ZwiC)94aataD^vRpSN&5Mdad4)%Gc$UjkTI!Nz zf-ZKww_=31D2v6*%0!1~&2xFC&6+Y}cD2jxD#*#t%fHJtVnV~rDfQD_Ia#?`x!|Mp zR*WpKDAJx12b8y>)aUnx1LZ-VxD)f%Tp^CHd;Q*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ek-oTr93kPus zZ{slD!4Vv7TRR_Xeu0`=fF-`KMw4SL=F}Mmqte-C+7g0ABsd8II!pOZTJIMNF{n{ z>lW>eL}D3pus9NN@XgJ*)+-I5Un1f}OzY82N*)t?iTah;s$5aGv~_y}T07d$i%u!+ zW!obI@8AZ4eemTF<-E5Zx(DY)BCEHEeh~S$+u8kuEy_q_8GD~dB>a(*EB&pkTijco zSvTu~u2ZbIR?eb75A3{ga^~~%!MtBFIp5{vJi?JM<7bQn?YaE;87h6F_}lwQ85`o+ zxBss6w|GWGj3LoCVjO8>MD>e)Rh~V^mwZMCi>0n{r^E*@{&a-Toyw+sT8iO0mWWSL z;!}{3@H-2Y4nlRMESh=dmnCW*7tF*?l1MV?KsaWofS?9~DhTQzsDz*vf@%orq4K@S z#j{wacO~6OCh1OYBRxn@!m%Y*dQ?hKD?zmc^%7J}P%}Z*gnT1$B~0xE)l>Ok)t~19 zgey1dD5#{MmhwXuxrgu#j={u3IR50fts0YA!hRK;7jojLagl$sF<^;fj$e4C*kb#Gn>)f|EzdW8`r%pFBaH zB#q=LvVb&^g=7&~Or9pskR{|&OdaJ=s7ul1=1A zvYEU@wver48+n;*Cp*YavWx5{d&pk$3fV{YlUK=WTo8&EWkQ^d!lf&d4 Va)cZu$H@QnpXsLT|NHl#e*+9n`xyWL diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00069.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00069.pmf deleted file mode 100644 index 4a4a352811b4f7f9e7516a20771eccd0ea5aaa46..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5740 zcmeI0d2kd}9>>4k69|x_y8~)40s{(0Vd5kNVHAZS(!m+s1LSzE={s_U*6DweL62rDbu?|W~05=*wWbpNonYP<63 zeET==_`U1b@3l5{(ws~H8p$DzE?^=5>#66-{NE=7;Gg`xU3*|XAKaD?l2@bL zf}3?|*=TM)J&&R@e?kWeH~(8cir&nwdC78GK(n@1ShkZ!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Ks^FOrwYKJqfzPhKGh$gAWad5yeI{-=*36}_e||NeW>KLB9| BO49%U diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00072.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00072.pmf deleted file mode 100644 index 5415c3f446e8210461d25880ffdc71b4231294b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5724 zcmdUzdvp_39>;%4n`CB^boxpW5Di73R8rcsK&xU2P1zObMz z^0W#lA{3<{kAk#R1qES`dPG}Kck!^o?m2o~y1I%-SK%nwHv7GICZW5y>#qCP_VhFP z&Yj==-QRu8FZV_>d&Xh|5ov%K?2aIM0H0d*ekML|jwHfAe=dkbD{*60?>kVj4i(3S zo}>O`88+&D8}6sZ;s$oi|4cAELD7)60^YWOPYVlTAV_9n6d1!q4sbEy2c=BR1M@+m z2bX0)d>faQOkBcceMoGBFdxUIk=1Gfhe2@-E+<&Yhu|C&pM$>w`5Z2nK}<6)-N3pQ z@re`+UfBbIz=Qz9;dH_a=e8_#d$tQQNBBeavg>4f|4?iqtHc#(<E z9X_;O=5yt_{Q>l1UR6bA=E$t@1D7Yq>tr?4D92G$me0FDlS3lci!dDi92a`QwbP~C zD1D^~#SW+16njjz-lJp-jf}03kA|(%ru5uq%N(6)x7kOgrs9&JUW#n?w9Kqjn;N1m zjhwDrM{z-*jP-(watg|L2z=1{C#8D&Csm~_9-LyIeSd0I>huhI*608gd)yO>T@JtB zo8xv;R(fiNJuNLGb+mmHCa|c)$7bldvZiHarKMPV2aOwFk=N&71D;}a6cku_9lsSr z@A6G_Ia5%*u#gQ%sC!nMH49Co-)WsVtFmfd#Ug83iao_nm_nCtlGo=9%?=il%U9s` zxXOyWem83Y@rH^5SXbjcF25h$_6OV^9syRNnJvZepLMPB5=g^;dY?#VxoZ2S4XgM< zq9@VQ_qbFVHvF%I+QunXiMDK)$)5v-N-bZMX9TuBGe0=mUCM6n)~&2A+5Db zKfvd@t8UaiY~CbiOF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A)OuB$+8GCQy@h&}YB%qv zR@#D-<`(J+U1`&I3oQ-JINWoXy2kZ*CHh}dVw9REb!Yz6o%u^kyX83~_Cv;>de#gW zlGxHsub@`e8ipjzqMjgJq*dnGjBjdNT$XBTWiF{PN-MY4d>idbyQEsPms)9;RIB-m z`qx?p(5|#AHaer4Yw*%9|6rW?&eEpGI{GkP>G}Md*7FoTNobAMU_dl%foN1i1Ad$D>&Y+?b*Y)fkT&+=)NpE=<7P2+RNDg<8~M zA|~=OvN-bVmfA^2{SPZv(e0h;C+~jd7OFku>cG4Cp>^fJQXg+51+91#%kUVM^O(2-PvA*Bg_U?3tFRht@C?>s9on!S?bv{gcoxrL6E3L0K*uD0f_%t@^z; z7buAU`h+2cPAiCflsuS@WhuI&egKd7^YuE2r&^xcW+hLhOy=GBJUm*}-#hp_z#xI} zQ=T2gX8l{&Gki*BAIh?xj`dgkL_37et%TGoTKI^k-k)7dbFkEtlk>)x<_Rv%kpK=cTX1)OCTU12?=k%9#cphi6>%@l}JSLWFr3GrVtY`6AKaXUHmx1dB6w=#y~I%f^iUx zgkUTLqahd%)!&?)d}fj?aueZ>i_sB`k6?u4PhN!ch;b5(l-w~B7s(-PJ7XpoHNm(E zMo#`mCWFZkGL#gOVPrVru7|M{95OJTg2M*fPTXV^DJCA`C8G&i;tRkz)8uAQTOV*J#vYxb)4P+yEmOMu`k?W^}J>*rgm+T|^$pLbZ93rog!{i8gog5{{$Z_%p Rd6WEKUrE2J{eS*F=wIh*{{;X5 diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00093.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00093.pmf deleted file mode 100644 index c85f3b4de9d69ff0d63e97fffd961a57fdb543df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5728 zcmdUzdvH|M9ml`BNj8tol4ReTgs`lE0J1R&K@yC}CRvh|WD|BbgitjgF9U%cbJTOSxrZolWAz1cX^>S+IJhR?m< zd-iwU=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PP?+2~~ZA@f)VsjU3qnH=b-dRtnbD)kX=f0;8a=id% zo}2{YS#4k+Z8w;Hd^g6kX_+~`M z<98X7LCnNLti(pR4(NcO2ZAmL`XK0pJh_m*B!`G^O>WYkc*qqbmkb~SNgm;w7F`nb zNxm%*t_8X!=$D{l^3xS5Bt?Ylh2AMYR9(&c2vR~y$w+by5$`hBl2Jr_^chWjq?}Zc zO5!JDNEP8HCAuu=v!K(0UJJS{=(nKb%1>Z?6Ql2f&I@`k=)R!;^3xcZK)CMd!=MxM zQyjUG+(eqmBr=)YOs0^jWEz=HW{_J*3zC$|BX^KH$#QZRSwU8kRpf56n%qOykhNqTSx@dI_mTSvzpK%;LEi?Q z8}x3_y+Qv59USy<(8WO?2b~=Ba?s5|KL;Hhc!F#r+sO{{B-u%xBD=_LvWGlP_L2^= zk32)3CC`!P$$oNx93+Rx3*<#|m>eNT$xGxIIZjTHm&q&S|N77Lt=514_n?0R9J~n* diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00094.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00094.pmf deleted file mode 100644 index 875bf1df8f3dc2320416710123261876b146d890..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5728 zcmdUzX?Rmr8pq$8kR~Bra5|Xr~Zh=y8DuqJJE+|l- z(?OI~EQ)|2h#)GPf+*Hmm~k6NXFf2)qaT>@QAY>VL1k;^f6l$PE$Zkq%%|zo-@X5P z?t9*|zd7d$Qzp&O5|IE>z|(4?dAO_O=SJKe1Bmd?-|O^5%kbckpWj8s2a$1%@*er` zOe0z>Kfi_NMiU-j$NV<}ce z0sXIWd4P$}aCuM>T@WcpaoNFg?FIY5wlTOIV<~TgKQr+W_!!vs>uw7 z#H0S(eH0G)gE2`)e9=&#Cgu+X-p>+=>M zdv!JI54m*?sdWyQqqNvvR5;2}i@DI$GTl*FP*hMv7)M{EE)?-9LxjoXiv;{ZUpyR& z`dK-swUQLW+`293i$>A-Xv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Q$>YE=!XF)LJ0=p7#xQo7={rz0i!SmC*gT`0Zze-@DjWXufVHt8eW6f;SG2b-h#K` x9e5YsgZJSB_z=#(NANLx0-wTJ_zXUWFW^f!2VcS0a321rf7jyuw149b^AC|6{VM&2 - exit 1 -fi -if [ ! -w "$spooldir" ] ; then - echo "$0: Cannot write to spooldir \"$spooldir\"." >&2 - exit 1 -fi - -# Create first part of the output file name (prefix and an "unique" -# id(=date and time))... -filename="Xpjob_`date +%Y%m%d%H%M%S`" - -# ... then add options ... -if [ "${printername}" != "" ] ; then - filename="${filename}_${printername}" -fi -if [ "${num_job_copies}" != "" -a "${num_job_copies}" != "1" ] ; then - filename="${filename}_copies_${num_job_copies}" -fi -if [ "${job_title}" != "" ] ; then - filename="${filename}_title_${job_title}" -fi - -# ... mangle output file name and filter chars (like whitespaces) -# which may screw-up further processing by other shell scripts ... -filename="`echo \"${filename}\" | tr '[:blank:]' '_' | tr -c -d '[:alnum:]_.-'`" - -# ... add path and suffix ... -filename="${spooldir}/${filename}${filename_suffix}" - -verbose "# File name is \"$filename\"." - -# ... and finally capture stdin to the file (we are using "gs" directly to -# avoid the problem that "ps2pdf" is not available in all Linux -# distributions by default). -#ps2pdf - - | cat >"${filename}" -gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite "-sOutputFile=-" -dCompatibilityLevel=1.2 -c .setpdfwrite -f - | cat >"${filename}" - -if ${verbose_msgs} ; then - printf "# File is " ; ls -l "${filename}" -fi - -verbose "# Done." - -exit 0 -# EOF. diff --git a/hw/xprint/config/C/print/models/PSdefault/Makefile.am b/hw/xprint/config/C/print/models/PSdefault/Makefile.am deleted file mode 100644 index 040f26077..000000000 --- a/hw/xprint/config/C/print/models/PSdefault/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -SUBDIRS = fonts - -xpcdir = @xpconfigdir@/C/print/models/PSdefault - -dist_xpc_DATA = model-config diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-Book.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-Book.pmf deleted file mode 100644 index 331178985b79d55487cd9c0c1c3172c5023157a1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6716 zcmb_gdzcf|7608NfYcXkK`S5xYZWT1%S(1a(2xzgfn~GoW*3$s%WN{c8%Z)T4`fvk zMTAybQL)&HXe;8YRjc@@sI}r}srUq+)hfkmskIdRq@R|rq`!ObOfuTXAAX%LzszsW zoO|!N=bU@)%!sa7rXK)797nA80!w-J*w=BMkMRNgsrv_x0y4bt+t)9%;i6-K^XzM| zebw>63j6vUc3xG%3+l=KEhXDXCXnD=lJj^zp^l`Ptvoc|-R$rQ}Z}t0nn}@LbmssEtey zbu>jSGV2P2=*BRNkSvlRZ7Gp-FwXwFj9Y);hG%+JEJKWIT zp)?Jt*)26OHx#a`k7{wsj3){yv@`@7qsXEq6rCHcjn?a%X)BvDk_gn+cC8$w!& zrtrK_Lq|(^eh5vGaAQ={=1@zdp*0$gG!KYkO@Uyzu?`so+Ct5Nx=@E21Ht-0 zGY9Nw4%LNQqO>}Zv#P5n)|7698iSEq*>Wr=M*Aw&v?|L}snq6IW-GO+m6a35jjJ3x zuBvj}#0mCargGebs!5f0-<4w#j5M`3OAjDuWqPxT?w-7VRBW_=Y)$pVG4g+s`md4y zHC5_=tUn+f>Tl`I<;_&iA5O=tY{tqOc{6^d-ycXO{mrtUoWI%3nb{?jhND5hijH4} z$6sgVdlE5!BIh^!S+hIAjif^OJUl`C#@j(o_oU+fn9cu(H>3Wux#Jf2kl1@$lgM&MFWZC}N4 zg{UsdYlVw&bG8td7X^@Yb3*eK4$To-R67g&i0 zsZ*=uuW{ABt{6~@0w#jXyjaAml=l`lt2-lf#mJ*e}lFmE-?s@rlF5crmx+=cB}AM~-{2x5PK$1&52-BIERlJ;LwE zX>&)3-+`UvdhTz~9%tNJvEAXKR$S?Dd{(wi%oJ9s{}=HOM@KZd#@#L8$eCxmO8WO= zYf1j97(}k~XQUYA$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VmzuNf zH|2L1_pRW483)F|4HbiDp<}_b>Q~O!-M_;*e(Ao{aUka;#~Q5ane+a}O2>ZXXOa_$ zk;EvXieL_?4>%E?nKxYRKo5~7^28;?h&{w#2-ZCh{pI;5bJ#~5O>ivlDa2@^ilCpobp*%q(hpvKX7es0IG#60EGJeI zoS&CZ#okTC-NZx0H ztTR5&)3<2AadSvon^i(WI$w$@@Z-O0G*%$RaR zJYn#AT`nO#ZGSX`m5q1Nhv`I`Ru>YlPmZewYCLPVd zGITm-`HQSvK?N?0d=KxHu8deAZz5HYu{Y?POphI4X}|o2$ce-`xB)9&Zj~}}u>vRN zvP}DeN(^*X#+bCnNOtM*Y+yU08aIf+Z)OghKZQt35Hv? zHg#*$)ta$$GAp5#5?aY#8p_#;vXYtaL0XS!X?;uUTdqzmTcO-6o>-E|$@OgMl~~Yi m3%YH=)wWP>)T{62d#r34y=6H{&$eXpQ19IfN&f5i-+uuFm`tt! diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-BookOblique.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-BookOblique.pmf deleted file mode 100644 index 61bcb22b9f98b12c3453dc01d077702d55ff5277..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6728 zcmb`LeVklXdB>kKGm&6S2piD2q;Vu@0?Ec?NnjI_z+`5!J8ZJE*_}2%DdW9M5}^Us~@aV5b>q4Scp(CAEaprFCUOL)9*Rw&fU@0 z{=uh{{PzCtbD#5^=RD6j&pG$1v26J$5m8_kxFalb5!aA^pW`|=BEo<3{LplfOSp;p z_fOKWFjM3#|6XXn<`|JH{QF;Fd`%lS=xO^oFt^=u=n25|tx2bLVl_BRlZ{}jCRuR4 zCS_33$Czzs&XMm-+L}Ci#I@{xSH8mW=b~SuHsP-h`;5!3<4i zgDsluAOy$pID7zdB1GmvmTAeukTbO88AvzR_wpw+Osf#ChA!5R-VM2u>r7k-?a`9o zKyK0GB@nt}B$i08Pmc7b2Q!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-r zos%&p9kkN@raf1fFOR&AQN)Z!#5fT#qt&0bmmp%|8L0#&l9M<_qG{rm5~0Yb`K(f|Me diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-DemiOblique.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/AvantGarde-DemiOblique.pmf deleted file mode 100644 index 45cc8857bb72604b00a693866baf9364e8a889c7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6724 zcmb`L4U}9(mB(*QH?R@%#RLKYV}r0sOgbh5kqLx^rl&L0kW7y=JtPBJhBw`BW;*HV z?)1mNfGGGCSUwe9a?nUYYSs=`ay7U=G+561jx3BY4hIE(nY8-@bqGFL=*GBzS%d z#mU(sX9drKe)n9FD}v{rV7&WC9;m1GvtYp@$Dzjo+qRM}b>ehzmXb|ii;@hOR8jyX zB_9MIQ}QYBX<+W)&#l1vemCW;{rve_gM3RXKMKC5k_-6rQm z8zGp->(KL%#Sl3jvO*;XAg8J1El8a5Xv7`EXmyN&X?^t$$mNu?AB0?`l6{a*C{f2c z_Ke1QQfDVd2U0`nq4;2OAU(P<)t~Nix%_V`n|)L1^Zv*ydj)Np^# z;D~tH;uue{&B;w8qgKIFg$Y%VEs11rU)qVYD9g~MSbth56X`9j{QW*J56`SMfvb~%Zs<>q{|!)%a4wT@YC-WBkZ#M-H^L*6O( z$gO6*oGns+Rc>r>iOT)*pjltvpt|yFIUrBKr2e|ZWm>vLb)Ed9b&Y@oa!CD6`JL>= z&-d^!k2J79Xm^Qx7Vi8HS)bLq$b5OBS!b4&yE^ma6^9^m@c^W ztzMUB<+Y$Mi_C>4>H1i&n?+_xAQ$=%(VP`O&$;IyhA=CyWAXO|9ZgMWNt9uu58K|%hPgz z`8;OF>rr{U{*0`l-IHXe#>CB4bD~*Df7oLgi@9bY_LVPy&k5w6W>r((X^uetimM}c zW5>-6V@|eq*pB$^*LE!v)`jnQ{bjjY3h;jW=EY{L+UnrL<>ortbwBI`e1VzY@TdN= znQh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(Z2=-O5UxM+AZ5*d#h#d*;x1q_z zRAMHIo?Sy!e4l(DU$B5^MEyU}@y9DzU;%PD* zA-H3Q*;aU8;y|L6V4lLA1ltNT58(mgM1t*wUE&PlJc9iTUrt;@+(O(#tRprOj}n`S zXNZ>x)-Al1_!q%`M#d7XQ)E|yV=^+0;ORWVIz?EM$O59DIF8`Bj4;0u<~DLVv65ha zBUcbSSx0Up*yjjW{>VebCgLf#Y-CNCE3yTnh-FoqA9#ieC{>F?rsG;mO32xTg5jWS zI$5(+fl(xLjZzLq*>)?AUCx^*8;)5jn8Ov#)VCoR{B-14?oyNsRTo*iSTsQ|FQ?$$qh4yC9A}!t5%_4 z7H!?*l3h{7&5y8rB{=31OEzTYP&Bd*vzjxRXcm^G(>1G{Y`axeI0uzHpVjY-Y_(#d zSe3Omn4EInFR+YX`OKO*Hg3Q!HLQw;o2{~Afyi_&sKi1$vc{x&qcE)7^M!7`@+wDh zU5&U7BCe}7TrgK4uJajhBqr|2JjVI4xE4@CTPL)2B4C|pm?gDRQY$3`O38*&BGZK) z-C|1Xr?h@5pr7&;8fL|6p<PJSv(9q2q4SPdn!Z4AoWrF3F)~2>L1J>i@7-J* Jzxey_zX6G0lF9%8 diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Courier-BoldOblique.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Courier-BoldOblique.pmf deleted file mode 100644 index 8db974018eb4769e3b86d98f0bd9120117f7a8b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6636 zcmeHLX_OpQ75-j#hwLGX*$4@pNH&sAGLtYT6pt6TTo zci+A5-S?{0rewY^07VQT>Vv>`{s+AK6#sWp7V_@j=?8>)6ZY<(WW%9@f#u#ksJokn zzT(}#MB}@M@rHV0U)vjNIB&-hx^E$~#fgQ)G9htdt&n4gP9a^yaYDqwQ-pkz*g>e9 z_;UrJAKl3R{(t4qofYzsDF2*zOeC-H=Q)wQLA*nv1VQ=X=u})t3vn+W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ko-dr{fHK6<@=dI16Xv>o^DBz`1;Z+kx|NJ}$t8xCj^H5}uGQ z<8FKfuH>F@HLk(6tjpiR^{kjT;6~iUDt9w(!L6*C-(%If9pA?t_yOPa?!pgoH}1iY zxX0Xw`|)G!WJNRi1kb1lw0(}xWAOhr2R`xsCT~alCPB#Aaw0K}m_x`(JVqplqlhHY zMdXMQaUyXlaXRr;;!NUf;vC{!Vh3?PaUpRraV2phA#Y@N5b`PIC&VMfqr@+W$BADN z^49Yt@f0B+Se_-GCtf68BK|<^Cge2s8u2>u2Jt2#UwPgl_(sTcK6ow!_h#T9Jb#1; z4xeXZsHsFPv54SU<*cB1s^r-K++)Fg5Il20H4sM-tBFRUiQsugwG!)y4Fuz(jwX&J zHWHmgir7RjX6iU1Lu?~XAQ&%o9>JKX>xf&3JBfRUT?AvHo+3C_#c?V6uRi8H?L!PD zxc3Go5Yvcx1pN&(5IjTa^~}Bl>@TpLIE`Q)0#^|?5bP(wlXQSF4?ID zNyJ$M#~Zqg;3+tC6TvZuSouSb5RVhj6!TWnhP^$Rv9j1&cKF4oGlN_?+i4ey>CHK$ zoJ__lAa56vcCG{~OIEaUDOh=@SSmRAE*p8PVCORSrjlX$V-YNVODd#`TaeF`i%2@z ztc7ekM@|cACxv3hDt3M9E}wKVP7Xyon>H+C7mKjBmicjRbHV0UsRCWKi={NRtkP#X z26PszBvqYYb6VeYRYDynOLUIssCL2-XMAT$!Q^wwosEKE^H!#tH#4*Z`$Q6fTrghA;j#age^)`ze zrMOXwS1HANm13<8Xf!=0jDEuCC#v)lo>6-@92G|MU0Xe*-G1qg4O^ diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Courier-Oblique.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Courier-Oblique.pmf deleted file mode 100644 index 87aee16cce34df1dc92957cadd6a5ecd31893099..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6608 zcmeHLeV9~L8ULM~0bCVwmE9EuTp(o;24PtUOp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x>7vVjb7biQtKzR zelnn+^cCu6`Essg7jt7sI>R}eV;Y0ndQe*r2CN6`W<&aEsyo@=3(p%h-6ACQGA{Ka zGhk@yX3e_2sWM?&$W$}Ia*MU4t*wAHYgZjvwpOyWl0P+6vhBK(RT@P>x9DhnN9#KQ zr;e{sH_O_~ZBOR2qi14S+m^L$Ibd6^8;$9wrBTN%V5}}j?QCn1@{&DDeNFkq@4x>7 DTFZjv diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-Bold.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-Bold.pmf deleted file mode 100644 index 30d462d9557c088ccf1b2b97199aa6908745efaf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6680 zcmb_g36K=k8UEhRC?JQo200v$2r3IKhr1XF47K1*O;t&9W7)2B#zzRNVy!R}h+bN5B?;i{WTKN+5-Z!%1X(NHT-aDu} z;y~as@BM8WA8`m@s3+|!d!sey>li|{Ey+pJiD^WGBuzw{B#Vh2Nlap?BxT}aNvCi&Uy|L@2@4@u)s}9HFG!%p%ng_&D`V8ovvXO@Pj$65b#%kX+Px;`#}_19yL*&k zzpsdeiDYw2T1$InrOwuPTN(~J6X}J?rgV!gD%eim$RXa;)YF;nZcS(@+LMbCtv#K| z#R;^hl5J^CI})9#)~<9i)z-5Jp_guSw#OTjZOtemepaF*-kj)BZJ@Cw-oXZYIugyv z&NN-NT)UxR=B%I~(bkx1k~QntEBaTf`cxbAqgMJ}>(pvLYinmrn^s#lZEEebnKQgw zv3A<@hPqnMaBUqLQ|;Xyvh!%Pi-V4}w7(Ram^m?4H>+XhBzdn__gV5jYicYmgBa@^ zbW3L5jU@{i+bPESG~l|&jma@F6x?8~-J_Vnjq4PFm?mR$S1 zg+9L_*H&KA|3@lsDPENe{87}1=}HPwFK*X;VGLs`hPvQWpI0hk6uIgzb%Zac+BPxT z%NOuEZK~W+|0u4Eo<2Sb=`)6b{xj^0moG6Qq_f4h!?sQkO9K6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3btH=}alYt6?@4Nx#DZrcrcmob_oPje5&dUJf z8(?e$=M$F_9B<$z;tpav!7&H8^9PiL8+`GbyvPpqctK1%n@+a#p?v*;Fx) zgq=0(YXC!*ef^xcpR6FC;x&ug9R>I09ifI%xNe-Kz&`f$@^qSx4*q7E#r^g&rsjR1h zl}fsqNZK1RQ1O;QOj(&OB#Jo(InjqcGecdw$INsvFL^Ve!oZJkX3or8GSbe+LD;!u zCu5kgGW5D=rBY_v)+6S}JeAz;KBg~&oY`f`j?5&|Mk2?kCQSyKiDl|^&I%jsd{HGX zhe9{oypoY97EGjzGWQ09lkIjAEd5tD6K0Z~8?ZC|T4^JnC~{zBp6OUnh>6b09Fuk% zsZQOWQDRU#jI-cSFz=U%$j^PMuT!$iBJEFBCW!jN`wWt<~ zYN2SEP_$nt60b+2?lGq2V_H5|CLePI`qk3KRKd!o`Vh07PvEUuyH#tqmT9;4tF`IY zczvw75&3+#k;_7cUd~J1WRxiyx?7`PpWka43ByFfjReyzwN0&UmT5D0?#!~Zkfnv3 zrJ;f?zX3bb&n$E!qkFWqyshQ!GNZO5(65%Xdab-%&$eEPMXg)Zy2UcxV!u+KZY^}% TxeWUH>*3vP$>i_bzyJOZ0>4$+ diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-Oblique.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica-Oblique.pmf deleted file mode 100644 index 2a0de8afc048917610bdbe10f50df24285645692..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6688 zcmb_g36NCP6+N$~RYVEOj)G}$8^8vJWdK*2nTBZ`rpK8cnQ>wG)BRyS^hPhh7&R_Y z(ZoG2QCt!QgE5h4T%sgV%d%Wz%3w5VsYTRESz;+_T!JN?bKm>_cT2QVWu>c5|MTy^ z@4ox)eeb^azgm&Z?*~8;-y_!75xfT6`xLLcC=0sxy9NOX-h|xy7uc|Q2r%Eh2X#jb z1;CWa?{^+~T$G<7o+Ac*#lKfY@*eR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ej9nKU}w|zijraaqY^BBbSgN-)ySvIMI>{XjD?JoC8q@^mqIaZ z75l$&mrv%>xh#ry#xX2y7mKjhl=(StWx?j>s{&oMizSCzR_Qw(1NsV9a;mJ1AWasUH%mThyZ?Q9?OQnZsg4Ez9R^DCYsk#;`}B3DSQU<|WPmR^^gblT43 z%!v6RPbas3fa%MkV6SwfBRhqRl`Jr-DVu?2VwpOVv(ma;v8)qUK&hY4{5vaIF4@SG zCHEGClkayEEdFboNq(l~BtkA*ZI!W#$ub94zZ2A7{PCvWU zkF4o2XY_MMKUZTk=PFd2rJS`+QPy+Lti-ZuTQ+UWHEqk)Mg!()sXtf9VxTIAf3_u) OpMLM|CHdCxzyAUHXlJJY diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Helvetica.pmf deleted file mode 100644 index b1fd475bba133f24cd5c0b65f60625f9f2cdefed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6672 zcmb_g3y>7m6+LffK+qtd;um!wpu5P(?($hMDvrCu?%=Ys?#=>BkfnE~ceiC`dgz`3 z)?fU_jeirP#uznGNi-%g#vjIf{FI4AErh6vr52G?%1FwHCdAUfqLf}s%((g%2NTO_2(?rDNqXS9WcpdiyNw<`|NwQLsokY!GU#um0 zX1uR6*`4Zc?n-o~`W7WSQXR1+akQD)b!O2@8(5U=>1gTdg^{uQO)QEnNwoL&DV?E; z&a!x-wJoKkIWuFGa_DZ4b)*=i?s#fhq9xU)ALeZ*XJip;Y3b`u^|r^g6rG9X@%Fy% z#ELjNlZlR$rd{#wWP494k?iPOj=)VXx;tadiH=qj5L+7WinYf3R3B(=i*>QXzOHy{ zqB}*WE!Unuf9`_HgLp@CvPHIR;JD~tRE;WH8A()oA9bSI(`a-~V`H?Tu|C>3caC=| zL>p(QV;PQRx+kM6wyaNuSVdUf$tYLuV%^Pg217n*iC6i) zv0W5v_R>}H2RiS8++cZMo0G-WkuDToOS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file mode 100644 index aff4b494946697f5d1e21f580382898bfeefbd1a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6628 zcmb_gYm`&f75+|=8D4@?s^ANvt%9vl7zafJG0X%eGERn>3@}I;?j(0+;v~5-4`37> zd=;uvY?W$-qNPd;t+qa~76e^r(Y7wDfYwr%4^-Ns)%vKbRd2s@&b`T1+Wv4gYkj%j z-FNSO_SyS9?zy5XksAO&5W|QmeqbrDKIcBk>;04kocnhM0;6~nbnc&_;lQE5dConk z`vM&;ckcJm`3u8&Lp|wV`8!&3-X2S+wj~M4ASM#$NHUX%OR|XQmLx-1l3YeyEy<0< zO@!FUzuO2E`(|DT9pv8@m+X|vza^fQl56?5PfFe*J|Gd*#6U^d6VWC~2XQYS`wx)p zAi;4Y(%iq7T!gzxN*aD8lg zq@y|38gH#@i8jYOX2hD}P2me7Xe@Oa=~Q-R-pKWYrdw7oX2jZ>>RZ}jB&|*pGr|`{ z8{0dSZd&VhOI^&3L}xa{^@EI=OqDWdZ45WXkwo(Rq=^j@Ib>2%2Njrnsgpk=9saTRa+T>X--5O*>kf!*$W7naCkLC(;t08R<}M zpspd@!Uj89A~U0{amJl0Sd%7AJiGiL(o`3#mzERQHO3cG9SeCo6Ve?BfTzjFImRT3x|tmcp!2Oj%hY9gO$o%q}Bg2J5VR&dMwCX=n-0?NAv~2~u}5N#(n6 zYh8qWkq_!475>@O%m~*x**>(&x_q7#V_rvtDk)~Sh3lQ8Qkw-|{# z?8S;7Pq}K9ch9MKT9o`*a<|=nPn?e`xl+O79-WswI(rq@G4J;9Egqd6pX%lczH`n~8c>+fO=Azd#qLX0iTpHOlYvREb7yK*s&wRYNN%q^~e z?DxbuU-VMWJ%qnc#4uMM+wfdje=qjCa*i3XhYg za=CZ(xlH!6kLo9AOZftMBdR@l=tj02e?3g{xH354iMdD4J0*pWV++h)ZdVBe3k|EBo6z1FORnkxJOL1mnlCftiX2rHKikKz0=+m&{uXgwbr7y?%V6l~al^*lh#xd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&l9f^tegJ>;$H;&85lsY zPJtr{j>*8O#2EzZ6ktsPvxzoh0l{$@V15J4ZGdAwu##YZ1Gf;j5gQ5iIk1h`NjydD zDdhMO2jtL?8Oh zEN!h`Guz3!6wHK5Lo#LXlU*StGo9i#g1uvW&WvN~g_?rF)#UimJFheJo!V zl}~=i7>PWynlzbc7M7*cH7hQ$3MEyzJc>PhR=zV5rJ{*UN!H%bA6a#QW&H9pB0G{~ z;|8p3#VTVI5+!!b6PXiqRu(!hYfSwfBi*IjbA*L*wr=xSw^hvA_0xDmtfdKsLXVNpL8e}gOZ~|381mb!99c%i z-cXq^OeEY)u-wwx)YhiQnzeIBR!S?Sw30J5RI*bQC9~LrtZvcL`j*zWJWee~p<&VOBJI&{j}I)<+JFk$WeZ`C6hmO?&jL~-@pI<8>}`HhyVZp diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-BookOblique.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-BookOblique.pmf deleted file mode 100644 index b5b77f353374d2e4de6f476992d60668b18de509..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6640 zcmb`Ld3;<|701t=naWaHXp0R6ETM%KkU*QJSZG+;`>N3A_ul(v5!65UIG@jN-tV1v z&bjBFbGP@@P^z$-h$t`~bcIFMaSa9cX|8u7iv;&C>@IQ$H_gHQy%_F0PUNKEUeMiv zqw|9M$8o-60ypSs|Hj`G%eg%On6@=((?Ki%3pMEhr)jbp17|dqQthll$(cjb2yHcFAH^^Od zNxXaIfHBEhlhxWpPKm`kyOQ=n&P``3IqB<;_9P`EeX-;z@s4DdeVF%(IVUU8j*fx8 zZ43SiEv;>Btu2A~mf6ytSh})T=Ro4g_U0g+%_g7CnNqXUTy$4w zN@cg`rkl$}C++5(;+ke}s5zcTn0Lw5ZN;U@~M9 zWbSm5YIo7T_85K94?1FX{_m+-6m1W({a=f1tJsifSuxOMDl5zSqa8tx&79Js%Kp@5 zu4jNN{J-!&-+y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Sdefault/fonts/LubalinGraph-Demi.pmf deleted file mode 100644 index 100339854962d18d2fc7f9db79477970a0dd47e7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6624 zcmb_gd303O8UNjx2@ovq;;sR$pmh`?!KhRnk|7xlnUG9`pe4M_yd)zt^WrRMM8zF9 zifFC2Risv_6tV7D>q>2p+T~b9>vk+EE>-J6E!MW;^!MHS-ps?&{^9AI^PBg3-}}Dr ze#^c0Evi2`G!lR!b|e~uz*#&7-18KVcTpB{&o_?(cIQc*d;Tm9Lt}sw-E&ZP109|3 zp1(%t8+PFd^~AsSx3}Ru-Ivf~3kgdQ4a9LmT8M;@`GhTG0g)B5h`3P5a^f07t>WKJ zgpU1o9&113-~Aq0FUrplzZ1zC{=FiS4~S1m6cbV-gzP}f5^^eWCoc!zBYBtv`;mx? z;6F%SAW?e}Z;*`r3yJo#m4(}h5{xDp%j1}bNXChTih;v~Y#{;-y^-el^k{EKyerYw z)EVnY^v;O4C)y)3qi8GjS($XMC2tK4hMVnd8Z+YE?aiG%uu@K+jTw=dv9_LGt(!5r z1EP!B(O64s!dys+T~}MAJ%K#BqKVnD=0vNxlymY~D}zXLb8lCor!8uv=!ngUw)J+! z=0?#GkF_TZ?TmKC+qx66czf?0_)dDz)e&imwYOjhkyE0bk(Ow$9s^CSkxmZS+Zk<% zbtM>ey5KZ6HXKvA5N&UYH;d(DCdT-}I<2rjm9T^#&WBB?;qa9D`taoXN#Xj2Dem7; zxPHpf4Pn=Jcru#e9X*|rKVpfdI=6;(x`=h@LY-BYw+GUNqMf%>b;Z2J0j&IjI;X!b zmZLCd71K`6%G4!>hwOeUY1cJ5`5`B-#YdnsGP_sTN0&#RNr@_Fk*=mFGm#6;(JJ4z zFf$@eZms{b!=`n<0%J~Zt8OP|bw`@r(sJg=8mj)(TJnX&g7RDZPn6&O@>3p1tNYYC zUXv?dfx;EV&Yea7USf`4lwZ+&OLcC;@BbF8=eX=U_kjzA zm(AQePR;e^KW@R@s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3@g(sK@j_vUA8}xxmCRUKoKbR$cB(IfTq)aU=L_k9 z98yjuW92bq=aY7>2rElguyQF_Lr$TXcZLRS3|Vd)9`A!6zosTL-ZmpVqGXz~Jz8tbUBj{2;lRkN5;iW#Mt zPbpSaiY8joZbpn7{kYMO`}E_kLe(r=$`sQ>nPJ48zD$~P8r{aa+gNw|th=jbJ?3hn zHQw2dLSfL#4?#*V^U_?he1`lsD>KWg+FQC3mW`xW3AS6TZDVcwtl2wnW~Gf%+96{=>b^ulyO*0W<)V#(N+jBUwhTdEojo2$h^C!fP` VRgTKDEt&k(TK;ig{O{j?{|)0|C}02p diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-DemiOblique.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/LubalinGraph-DemiOblique.pmf deleted file mode 100644 index a8550e70d0c1bed34d67fcbf8f7baeeda1279d43..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6636 zcmb`Lf0SHBmB(*&cYqKkK!TY-BxxcTL>iLGgbc)0Iy0S2lgacj(*v0h9NzT2$u#Nd zZu&=HM2z5%gjI})X#7D$1vF;S^#`IDR$*PvD(Ycz-BsXt5&@T0j)xz{b%oITxmB;< zv>x;i&h|Oqe&2WBty{P5t-4k3nTcHaXb~}BF6fDhT*EaI+>diTfGif=KX;5soSS%X z{|F6FXcM_GxEFK}V(8t${Sz2Jcp^9GseNnjWXHK(1Z>|*I@O7{fVE2c!DULef`XC? zs42Mt+^A#^_yjO_@plKXzJG=5>}UBq&?G-l<$nV|Rmpz-4yoh?@F$3w1KO0#1DlkL zfqQryeFpN+5P3aBO+^0}@&v>z1U!}n{|!+)5dsrA6^R@RIh||UeUNiiatP9;YI zk0yIEYg3~GnW5}Z_h5P;JGw5@pY2a>Oi5pT%q!%J>nmP)GSTBtd)@6qK zdj?0u8!wG>He&vgQ=lR-*7ga=^x!BEjJ@FG?460_pg_- zBriz~CfBD%Z6DIzn;fLW(ZSUE^iUSB^VL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/PSdefault/fonts/Makefile.am deleted file mode 100644 index 40f1e3da5..000000000 --- a/hw/xprint/config/C/print/models/PSdefault/fonts/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -xpcdir = @xpconfigdir@/C/print/models/PSdefault/fonts - -dist_xpc_DATA = \ - AvantGarde-BookOblique.pmf \ - AvantGarde-Book.pmf \ - AvantGarde-DemiOblique.pmf \ - AvantGarde-Demi.pmf \ - Courier-BoldOblique.pmf \ - Courier-Bold.pmf \ - Courier-Oblique.pmf \ - Courier.pmf \ - Helvetica-BoldOblique.pmf \ - Helvetica-Bold.pmf \ - Helvetica-Oblique.pmf \ - Helvetica.pmf \ - LubalinGraph-BookOblique.pmf \ - LubalinGraph-Book.pmf \ - LubalinGraph-DemiOblique.pmf \ - LubalinGraph-Demi.pmf \ - NewCentSchlbk-Bold.pmf \ - NewCentSchlbk-BoldItal.pmf \ - NewCentSchlbk-Ital.pmf \ - NewCentSchlbk-Roman.pmf \ - Souvenir-DemiItalic.pmf \ - Souvenir-Demi.pmf \ - Souvenir-LightItalic.pmf \ - Souvenir-Light.pmf \ - Symbol.pmf \ - Times-BoldItalic.pmf \ - Times-Bold.pmf \ - Times-Italic.pmf \ - Times-Roman.pmf \ - ZapfDingbats.pmf - - -dest = $(DESTDIR)$(xpcdir) - -remove-stuff: - @rm -f $(dest)/fonts.dir - -install-data-hook: remove-stuff - $(MKFONTSCALE) -b -s -l $(dest) - -uninstall-hook: remove-stuff diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Bold.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-Bold.pmf deleted file mode 100644 index ab22aabf5ba537eb6ba21e711af104927415cda4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6644 zcmb_gYjjlA75>gl02Pvwss*ahAX0%63K2>W6^3L;MnWbe6CjF)o0%IjGBY>K1Bli) z)<^4$R`D$=VnN%g^--1jsID%wXi=2gcKYpe?wz?({N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c%FDQ*Kfsb*lXh{D~(kJhaY%) zQpgn2J$5#iT#-S-Nu{hT`t7WIP=l2w%UPKOtbQk#&pQ2mHu|lsok`ifdBgO_C0P7) zluhPVqCZv0A?~Ep7ShQKIV~ie1ac`W*LTpneB4Pn8RYDA(y)}B%fVh%;Fq}-S(_iB zvUJtX<&)I1@?YyQpeJj^SK4{)bPuU<#+7;th$oZrWHw$%qmW5(+58A*(*tX@{k3lU zV%>IU%tE((Gv$-1gqMkgvnB%_ZwX>5nOT8&Av2%dc^A1)aDo@_pZ)YWqQqm~7M?(iYSyr<1eaM&@9i#6UeaC0iaTUtL63NxcoSbLJoWz0|TQFk_ izOjY!paIjH?{l&l43y<4J=>DWPrrAwHh%T@-~R$YwK63D diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-BoldItal.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/NewCentSchlbk-BoldItal.pmf deleted file mode 100644 index e68811eb72786d818a63d0e0ae05849a24160868..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6656 zcmb_gdz=&175;7#R1g$Ui>T-#qM|Ia2(pMGVK?jsVYBXLVV6>u*<@fNNhan2tZ&iQ zS5>qXX?;-{H^09uY6`4Dp;uKIG3EBKept6^R;7>@S3#sf3UWv6(8tH%Oi&!6795 zBH2Omwn+X#BDO}{#CQ#4tH6H5aq?;q$qBpwPI zy`e4I8t_=Z0J2NTEFvUl47KH@oeee8x&6+}PON z9`BkPF;cWfJ0o+u+oKC3XpKc%;)b?G+GBG&;?Y=3cPD%gU1)C&H$+>SkVANWq%GVO z>DGOqp*h^f4!heTP0{u^Jx>*!`uZu;DlZ}}4Y5XPS;xWAzgj)C+RqNBR)$cUs?BP5 zYilP@np9giX=3f9DU;ow9Ql;GTGxJU9U5Y-U2PHrG&s4wd}?WLvF7N+xSG0Y^;5>n z?^OLeO@61<)r2LaHSK+cqMa$!M6(GepL6n7(N0dNsR^gkHEm*{P}61??EG>{(H36N zt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default/fonts/Souvenir-Demi.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-Demi.pmf deleted file mode 100644 index 5e786ec4208042ce71f6ae59604209a6d7bc2623..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6680 zcmb_g3y>7m6+LfuP*FgmQR0`;Xn?>PKvtGtVAvhlk#%R?nH3g4Ywt`iJ2Epp_RJvb z|A*iQ@vjk7{E=vkzeG)l#7|kNgs8DJYND2f-&l&4NklY?lXKtep6Q@gs;umF|y9RZK z?GBvdUB61>!}jC_^~Aomx3A&6+@H{W3mGd;OeCfVX(8H$EF?}4k|t~+CE_$87ZDc| zYCZq1A++!7cpkcif4}g_22p;3c#_yv+<8tUZxZhd`GWY8MA3T{6Otf4ptRv#lFvzS z0E04AB(IQsmqgL$P=sXUYb2A{Dl~&QiW2NfatzPIH;^1Jl0T8yJgZUs3l)2#t%*6Y z-p)iam2ByXccyyhCOT3b(W7HXI+dk%A?r4_+W9QzCb~OXyLw<{oIV?KqesWvdwR8A z$IYe7qdy}c2_Lz~PGrlm^-kXds zilH+R??@Ti6-y@CyHoK*NAE%eE_#scjJCu(=Anq_v9Ye`yjZX911)XQE_T@46`L1N zrs#3DsWlNu*Zn$S3@X|nfM zB%jjU=-F+Yh?YcWPnV1xElzRJ%`P4&N5-VbMkY>eZW=HDQ{;c@#waYNpXw zi&S5&Z4xWg>?)TSk1|$M-t!fHA?{R@tG!zOiW-T(SGQ`O#A^JQKRI5Yd{uRg=ABw@ ze0vN}s3uRRN`Gc}K5x`qtK)+J|1hBQc|iU?`82QXXXJV;jPtAHP1=mY7g}HXRrs{V z0rBTiudVp}sOQgn^m!YG=+-i>d#jIV9+YpwTWYo!x0z~*A2;=5)vTJeHq>F{#s{d; zDq7Q-#Yp?|UDQaQ<72gx&(&lVuj#ke^>G?=;kCuv*g~%3sb*5&mv6&%pQ|&}1vP#o zeQ1(BgMml{eBP@TE2s`FpQd#t2K?WZI^MjZ$9`;~#%r6#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MFr_Lk0sWh3Qfg2OG=wz0N-)*L%;W@U_0#wfW73yZ`%<@c0*0W<)V#U~2jBUkdTd5ljn5X4FrmP~&C`}^;I E0WU%+%m4rY diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-Light.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Souvenir-Light.pmf deleted file mode 100644 index 0bb62bde6dc6f4d13b8b774e3c7aa7716b945332..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6684 zcmb_g3y>7m6+Lff6pbQ8qQnm}5kE*6gq6ibKp1w1-O*)dnVsbqbm^Vx-5r^kUgoo~ zir=94BbxXliBU94f-xU88e@ntmLV#^Lh&1|NK8x&VoFU+SxK46x$kw)w3|>#S?Q|N zefsvj@7;Ird-rv>>P-!d0HBD&h*AJp%WIu`pXPNRWkL7;-GhJ*-h|xyT{N6Gl5p=q z-O;0fOWga{*!bwfc|$#EU$=LZ;k-SD(0vP;Bu>;5jY67Nha`m#O)*vw5pp+w9BJUk#zAo@)44iB6*S|Bjh8ZuGAfAj?a&F zcf>oBolS{YN3wfCygk_-Sr|p9Qy#SQnL@ZN)7M|Zf_PVZb7C2+w9{i_L1ba9ZCSTg zEV_zV5{I}vS( zbtdU@rsy;_Hq5L(h_*Myo5gY(M@9d_dQ4$&9AWKyxDYmehQrhA>%-IPr-thrrn{$s zaQ$hg%?P^@2~C^X*f3enr^|Wf^iV{?7wQ};mh4~yG9u+nzU zDy#}Qy=;uayj99Lc`F-A4h`77R>}@Fxjj%k1&PR#ZXIVGW_>52uHHpDo1%<}JZO&A z_{RghAkyUK%yZ10BW42lvV^7Gt$I>mQCFnd&5x|V+M#YFKaV)6QsMcW%AN|>Hk7(q z-Na||nQUaj}{!wSj%D#wInZGD$ys4E)l?7V+hL8)SNUVuL9X+qj-?l#j^x_wcd=Sk<)&Yw zKh>A(zo-MNIz~QA98#ld{^L(<)ARpeby!t@BK`DyI8pncW3H}J8z~pA)Co1;$ZCG> z!3S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i@E?5Vd1)`#ye1mmT8Ai%mjijciAoH&)JBp4_E zG=g*a83%tWF_++ceuuc6SV3@o{u_u}i46qz1pgDn(*&P){5`}Dg8P=AdGm7*@c*6Q zIs-=#%v0caf;AZ!O|Vx3%u|3l3Gi({z_1ZyvF9l_WJ))4m-j}u#o zXPm4NH(_?gQ$`w><}H4uX-^@OPq&-4lbn}9!b+tK8(Gtio0%MpG%3f(Bw%DMCudvP zP7_(fHZv)+Bd00#eFp}=|JX@q0kWyQgSeGW8%QTJq-h~(CE%nCr?b}+J#M9}3>-6^ z)KtoJ9GI8p`Jru|ZSqT!O;=4Pm!y=D`%*`KyKTf5m^tNiJ4x+~%PlS-o=nD*cAOvo z@|gse%`aIdJunuUU+RdL)=hUt8|uz8Q!bfG6f=>q7G~XZ!kF7PB+2Qe`Pby z52!36Sedd`+Hm4|F3jVZjs=C7Xj|r(WT%np(DS)Wr<8dWqma%tx z&Zlz8Y^obkt38!uO`}C?w`lDak9JF0tyPc4>Y_~zaGXxV&O(M>)}%)+p;6 zDiVf?crg-8x70SZHoqgws#kGj?uwO_)Iv!u<{ diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/Times-Bold.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/Times-Bold.pmf deleted file mode 100644 index cf46ca03fcfc117be4d0cce279ec6f9ca0b83222..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6660 zcmb_gd303O8UNjxfkY6OR6NqahQLi4ZG>mzftbGE00jgGP%e zqEdHjUFw3iB1LP}T6b_Ma$5D+>H(K3wujaYm(yxb@zD0@^!MHS-pr$||9JXxetEz5 zz3+baTkiHo^`{2w04QQV;`AVJ4(|c?InDbkl!e^qPwIh2K7`%pm)UUgC}6Jp4C?No zp$pvSw`hFNfqbBz*w^;P7|zGT2;H}kqr{16#7rS`i54N9#3CU}h+ZK%q9o)ZVhy1- z@ZZ&h_Wfqw_xYIre(I5jM0qpu6jA>H|Gg-ZKM?N<`Ha{jCt>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12Y&*dA0_%vg2<9PhIdKiab^`n- z7GTT+PZ2K@yNP#+4++LAz*9{yM2sZZR`5__Ix&Y}oPrGm+X^xc!49H}V0%G_*g$L| z*uNmhbMQ*yM&eH5equZEIPom;BJo#(c?LSSXD#~E1qVqxlQEF7vgEX2*(o?_!|B`WE}yj1b{3AAu{2AYjsx?Q0)OE3=1l&y z%F$KR$y?Mi^55tf(48}qYt6iJx|>ux<4U~_BrPjx<&ylVSjeW>ZT>Vf>47m|exq$) zS~uMmb5JE;OL;4u@-mUK2eVM|mO)Hg*STLzuwH8 z=~yz-?(aa@xl|8hn6x?rW#X2#Y%<}W;z+`b{EFN>VnYsrSp6f#CK$Ec=E2AYXw z>U7TXgSJypiOV71$9JWYku2m*WC}9(27}Yz=O$SCuWTmyW0r#mcD7tAV>rnIJLdCD z$AU^sbWY}&w9iQQ==NNpQ_8%GQAB4WqMeB7Z1tqgb%^MAM#_PSQ4_LZg;0Gj%l>( z+U>e_yRUY8xmt&Qn`n%;Hp6lHj9fot=;gT7uMA&BLpN)b>+>%yBVm|GdXZqdWo=W} zHhs03J8xuJTFKH%?$l7hmVbWT;b-Rikku{PTHn_Cw$G^TDwM0GtO3iB^V!xjv7qY~ lblrllZlPRhNWabZ*|{u+%5s#>wq){B-`!jzzxx00{{RG-Pon?; diff --git a/hw/xprint/config/C/print/models/PSdefault/fonts/ZapfDingbats.pmf b/hw/xprint/config/C/print/models/PSdefault/fonts/ZapfDingbats.pmf deleted file mode 100644 index 1ae9a7688e64e62b3e65be398c18a96eb3d3e286..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6676 zcmd6s36K=k8OQ(M%yOt89vD1v1e8OTV*v$}W7r+o(Pd}dofQ_*rFW)xx7oRv16YiT zqJl?)_k|kci6-7kyi(pq<59#iYEp@XXD}*?nv{u0=l@>!^fYQx#!4lb;*x~PUl6)y?%}b7Y_txyVsww;HW{s zYWMmHRvy}e7qnCLC&^p;IGS=lqHbw1N{I>NFeT=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-j%zFRD0Kb|GpH8bv2d^f#kbB8P5Nf^0op_tF+x=rMayqQUvokd6KuShV| z7b2_BgIuaqKq8w?8%SFjYSv(7lPIK&Lie{m(G%HJHiLqhwj7l*3k8_VN=6D@d6VC( z^6aWvP~Vwg6u;LazawuXdd#BkbO)u=88^2)fP`fwtbBqW8cUfZht2P0CVOBkH^0{- zUe#{8E#{%Gd@U8NRI(h2WOhXc+TY5FDSiP(qLinT6TRp)Gc23!F*6;EOTkQNHzX~C z-{T6F^0fOU5ZQdPlRnH?8TPtlrBY@(>x?*)E$ZNQ_cDALRKDjSZ6xyaYSN^m8CZtS ziCJ+)wouZ6%cI!Md)}3iC>2elODgsTos;W!1FZV5z7cXDNj7dEo2isa8-+xP1M~IF z@db?-=)8(CWw(*)blP(>3tr^4kHStg!cHf`PP95x=1PPee}*fL3Fnm`!x7Y$I}~wB zN1W0TU+GAtSky6!Iz~~SQM6(diPxjiX))&5#~k~Z&pzfFREnibsiKuj^&*z-NLifI zXmv`rI;C5ErCTe-+MK)b`dD)#3WaVXpM!F}nwQQk!&i{sW7W(uD&-CB3ByF9>dgew3c;jvyN@nS7FvQs1!+B%dLW1%UNd? kmYlLBr))b7NXY(0&|JOpLe(L%2ufO5`17yVpVE_OC diff --git a/hw/xprint/config/C/print/models/PSdefault/model-config b/hw/xprint/config/C/print/models/PSdefault/model-config deleted file mode 100644 index 05a19d859..000000000 --- a/hw/xprint/config/C/print/models/PSdefault/model-config +++ /dev/null @@ -1,136 +0,0 @@ -# $Xprint.org: PSdefault model-config,v 1.2 2002/11/07 19:48:04 gisburn Exp $ -# Generic default model-config for the PostScript DDX -# -# DO NOT MODIFY THIS FILE!! -# -# If you want to make customisations for your printer create a copy -# of this printer model. -# Example (for creating a model config "MYCOMPANYlaserxx"): -# 1. Create model config dir: -# % mkdir MYCOMPANYlaserxx -# 2. Link (or copy) the PMF (printer font metrics) for the -# printer buildin fonts: -# % ln -s PSdefault/fonts MYCOMPANYlaserxx/. -# 3. Copy the model config file: -# % cp PSdefault/model-config MYCOMPANYlaserxx/. -# 4. Customize MYCOMPANYlaserxx/model-config to match your needs. -# - -# Attributes supported for this printer model -# You may want to cut the lists here down to the attributes supported -# by your printer. -*content-orientations-supported: portrait landscape reverse-portrait reverse-landscape -*descriptor: PostScript default model -*document-formats-supported: {POSTSCRIPT 2} -*input-trays-supported: -*medium-source-sizes-supported: \ -{ '' \ - {na-letter FALSE {6.35 209.55 6.35 273.05}}\ - {na-legal FALSE {6.35 209.55 6.35 349.25}}\ - {executive FALSE {6.35 177.80 6.35 260.35}}\ - {folio FALSE {6.35 204.47 6.35 323.85}}\ - {invoice FALSE {6.35 133.35 6.35 209.55}}\ - {ledger FALSE {6.35 273.05 6.35 425.45}}\ - {quarto FALSE {6.35 209.55 6.35 268.732}}\ - {a FALSE {6.35 209.55 6.35 273.05}}\ - {b FALSE {6.35 273.05 6.35 425.45}}\ - {c FALSE {6.35 425.45 6.35 552.45}}\ - {d FALSE {6.35 552.45 6.35 857.25}}\ - {e FALSE {6.35 857.25 6.35 1111.25}}\ - {na-6x9-envelope FALSE {6.35 146.05 6.35 222.25}}\ - {na-10x15-envelope FALSE {6.35 247.65 6.35 374.65}}\ - {monarch-envelope FALSE {6.35 91.948 6.35 184.15}}\ - {na-10x13-envelope FALSE {6.35 247.65 6.35 323.85}}\ - {na-9x12-envelope FALSE {6.35 222.25 6.35 298.45}}\ - {na-number-10-envelope FALSE {6.35 98.425 6.35 234.95}}\ - {na-7x9-envelope FALSE {6.35 171.45 6.35 222.25}}\ - {na-9x11-envelope FALSE {6.35 222.25 6.35 273.05}}\ - {na-10x14-envelope FALSE {6.35 247.65 6.35 349.25}}\ - {na-number-9-envelope FALSE {6.35 92.075 6.35 219.075}}\ - {iso-a0 FALSE {6.35 834.65 6.35 1182.65}}\ - {iso-a1 FALSE {6.35 587.65 6.35 834.65}}\ - {iso-a2 FALSE {6.35 413.65 6.35 587.65}}\ - {iso-a3 FALSE {6.35 290.65 6.35 413.65}}\ - {iso-a4 FALSE {6.35 203.65 6.35 290.65}}\ - {iso-a5 FALSE {6.35 141.65 6.35 203.65}}\ - {iso-a6 FALSE {6.35 98.65 6.35 141.65}}\ - {iso-a7 FALSE {6.35 67.65 6.35 98.65}}\ - {iso-a8 FALSE {6.35 45.65 6.35 67.65}}\ - {iso-a9 FALSE {6.35 30.65 6.35 45.65}}\ - {iso-a10 FALSE {6.35 19.65 6.35 30.65}}\ - {iso-b1 FALSE {6.35 700.65 6.35 993.65}}\ - {iso-b2 FALSE {6.35 493.65 6.35 700.65}}\ - {iso-b3 FALSE {6.35 346.65 6.35 493.65}}\ - {iso-b4 FALSE {6.35 243.65 6.35 346.65}}\ - {iso-b5 FALSE {6.35 169.65 6.35 243.65}}\ - {iso-b6 FALSE {6.35 118.65 6.35 169.65}}\ - {iso-b7 FALSE {6.35 81.65 6.35 118.65}}\ - {iso-b8 FALSE {6.35 55.65 6.35 81.65}}\ - {iso-b9 FALSE {6.35 37.65 6.35 55.65}}\ - {iso-b10 FALSE {6.35 24.65 6.35 37.65}}\ - {jis-b1 FALSE {6.35 721.65 6.35 1023.65}}\ - {jis-b2 FALSE {6.35 508.65 6.35 721.65}}\ - {jis-b3 FALSE {6.35 357.65 6.35 508.65}}\ - {jis-b4 FALSE {6.35 250.65 6.35 357.65}}\ - {jis-b5 FALSE {6.35 175.65 6.35 250.65}}\ - {jis-b6 FALSE {6.35 121.65 6.35 175.65}}\ - {jis-b7 FALSE {6.35 84.65 6.35 121.65}}\ - {jis-b8 FALSE {6.35 57.65 6.35 84.65}}\ - {jis-b9 FALSE {6.35 38.65 6.35 57.65}}\ - {jis-b10 FALSE {6.35 25.65 6.35 38.65}}\ - {iso-c3 FALSE {6.35 317.65 6.35 451.65}}\ - {iso-c4 FALSE {6.35 222.65 6.35 317.65}}\ - {iso-c5 FALSE {6.35 155.65 6.35 222.65}}\ - {iso-c6 FALSE {6.35 107.65 6.35 155.65}}\ - {iso-designated-long FALSE {6.35 103.65 6.35 213.65}}\ - {hp-2x-postcard FALSE {6.35 141.65 6.35 193.65}}\ - {hp-european-edp FALSE {6.35 298.45 6.35 349.25}}\ - {hp-mini FALSE {6.35 133.35 6.35 209.55}}\ - {hp-postcard FALSE {6.35 93.65 6.35 141.65}}\ - {hp-tabloid FALSE {6.35 273.05 6.35 425.45}}\ - {hp-us-edp FALSE {6.35 273.05 6.35 349.25}}\ - {hp-us-government-legal FALSE {6.35 196.85 6.35 323.85}}\ - {hp-us-government-letter FALSE {6.35 196.85 6.35 247.65}}\ -} -# If you have more than one tray use the following example: -# 1. List the supported trays -#*input-trays-supported: main manual -# 2. Define each tray and it's paper sizes -#*medium-source-sizes-supported: \ -#{ main \ -# {na-letter FALSE {6.35 209.55 6.35 273.05}} \ -# {na-legal FALSE {6.35 209.55 6.35 349.25}} \ -# {iso-a4 FALSE {6.35 203.65 6.35 290.65}} \ -#} \ -#{ manual \ -# {iso-a5 FALSE {6.35 141.65 6.35 203.65}} \ -# {iso-c5 FALSE {6.35 155.65 6.35 222.65}} \ -# {iso-designated-long FALSE {6.35 103.65 6.35 213.65}} \ -# {jis-b5 FALSE {6.35 175.65 6.35 250.65}} \ -# {monarch-envelope FALSE {6.35 91.948 6.35 184.15}} \ -# {na-legal FALSE {6.35 209.55 6.35 349.25}} \ -# {na-number-10-envelope FALSE {6.35 98.425 6.35 234.95}} \ -# {executive FALSE {6.35 177.8 6.35 260.35}} \ -# {iso-a3 FALSE {6.35 290.65 6.35 413.65}} \ -# {iso-a0 FALSE {6.35 834.65 6.35 1182.65}} \ -#} -*plexes-supported: simplex duplex tumble -*printer-model: "PostScript default model" -# 75, 100, 120, 150, 180, 200, 240, 300, 360, 400, 600, 720, -# 940, 1200 and 2440 are supported DPI values, we limit it here -# to some common values: -*printer-resolutions-supported: 300 360 400 600 -*xp-ddx-identifier: XP-POSTSCRIPT -*xp-listfonts-modes-supported: xp-list-internal-printer-fonts xp-list-glyph-fonts -*xp-embedded-formats-supported: {POSTSCRIPT 2} -*xp-raw-formats-supported: {POSTSCRIPT 2} -*xp-setup-proviso: setup-optional - -# NOTE: xp-psddx-* attributes are EXPERIMENTAL for now. -# xp-psddx-download-fonts defines which fonts should be downloaded as outlines -# (valid types are "pfa", "pfb", "ttf", "ttc", "otf", "otc") -*xp-psddx-download-fonts: pfa pfb ttf ttc otf otc -# xp-psddx-download-font-type defines which font type is used to download outlines -# (valid values are "bitmap", "pstype1" and "pstype3") -*xp-psddx-download-font-type: pstype1 -# EOF. diff --git a/hw/xprint/config/C/print/models/PSspooldir/Makefile.am b/hw/xprint/config/C/print/models/PSspooldir/Makefile.am deleted file mode 100644 index 717cd2c36..000000000 --- a/hw/xprint/config/C/print/models/PSspooldir/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -xpcdir = @xpconfigdir@/C/print/models/PSspooldir - -dist_xpc_DATA = model-config -dist_xpc_SCRIPTS = spooltodir.sh diff --git a/hw/xprint/config/C/print/models/PSspooldir/model-config b/hw/xprint/config/C/print/models/PSspooldir/model-config deleted file mode 100644 index 6bb477767..000000000 --- a/hw/xprint/config/C/print/models/PSspooldir/model-config +++ /dev/null @@ -1,71 +0,0 @@ -# $Xprint.org: PSspooldir model-config,v 1.1 2002/11/25 19:48:04 gisburn Exp $ -# PostScript DDX model-config which sends jobs to a spool dir instead to a print queue -# -# This model is basically a cut-down PSdefault model with a custom *xp-spooler-command -# -# DO NOT MODIFY THIS FILE!! -# -# If you want to make customisations for your printer create a copy -# of this printer model. -# Example (for creating a model config "MYCOMPANYlaserxx"): -# 1. Create model config dir: -# % mkdir MYCOMPANYlaserxx -# 2. Link (or copy) the PMF (printer font metrics) for the -# printer buildin fonts: -# % ln -s PSspooldir/fonts MYCOMPANYlaserxx/. -# 3. Copy the model config file: -# % cp PSspooldir/model-config MYCOMPANYlaserxx/. -# 4. Customize MYCOMPANYlaserxx/model-config to match your needs. -# -# Attributes supported for this printer model -*content-orientations-supported: portrait landscape reverse-portrait reverse-landscape -*descriptor: PostScript job spool dir /tmp/Xprintjobs -*document-formats-supported: {POSTSCRIPT 2} -*input-trays-supported: -*medium-source-sizes-supported: \ -{ '' \ - {na-letter FALSE {6.35 209.55 6.35 273.05}}\ - {na-legal FALSE {6.35 209.55 6.35 349.25}}\ - {executive FALSE {6.35 177.80 6.35 260.35}}\ - {ledger FALSE {6.35 273.05 6.35 425.45}}\ - {quarto FALSE {6.35 209.55 6.35 268.732}}\ - {iso-a3 FALSE {6.35 290.65 6.35 413.65}}\ - {iso-a4 FALSE {6.35 203.65 6.35 290.65}}\ - {iso-a5 FALSE {6.35 141.65 6.35 203.65}}\ - {iso-b3 FALSE {6.35 346.65 6.35 493.65}}\ - {iso-b4 FALSE {6.35 243.65 6.35 346.65}}\ - {iso-b5 FALSE {6.35 169.65 6.35 243.65}}\ - {jis-b3 FALSE {6.35 357.65 6.35 508.65}}\ - {jis-b4 FALSE {6.35 250.65 6.35 357.65}}\ - {jis-b5 FALSE {6.35 175.65 6.35 250.65}}\ - {iso-c3 FALSE {6.35 317.65 6.35 451.65}}\ - {iso-c4 FALSE {6.35 222.65 6.35 317.65}}\ - {iso-c5 FALSE {6.35 155.65 6.35 222.65}}\ -} - -*plexes-supported: simplex duplex tumble -*printer-model: "PostScript job spool dir /tmp/Xprintjobs" -# 75, 100, 120, 150, 180, 200, 240, 300, 360, 400, 600, 720, -# 940, 1200 and 2440 are supported DPI values, we limit it here -# to some common values: -*printer-resolutions-supported: 300 360 400 600 -*xp-ddx-identifier: XP-POSTSCRIPT -*xp-listfonts-modes-supported: xp-list-internal-printer-fonts xp-list-glyph-fonts -*xp-embedded-formats-supported: {POSTSCRIPT 2} -*xp-raw-formats-supported: {POSTSCRIPT 2} -*xp-setup-proviso: setup-optional - -# Use custom spooler script which sends the output to a dir instead to a printer queue -# Note that "%xpconfigdir%" is currently only supported in Xprt servers build -# from xprint.mozdev.org sources, other platforms have replace it with the -# absolute path name to the script -*xp-spooler-command: %xpconfigdir%/C/print/models/PSspooldir/spooltodir.sh -d /tmp/Xprintjobs -s .ps -u 077 -p %printer-name% -c %copy-count% -t %job-name% -o "%options%" - -# NOTE: xp-psddx-* attributes are EXPERIMENTAL for now. -# xp-psddx-download-fonts defines which fonts should be downloaded as outlines -# (valid types are "pfa", "pfb", "ttf", "ttc", "otf", "otc") -*xp-psddx-download-fonts: pfa pfb ttf ttc otf otc -# xp-psddx-download-font-type defines which font type is used to download outlines -# (valid values are "bitmap", "pstype1" and "pstype3") -*xp-psddx-download-font-type: pstype1 -# EOF. diff --git a/hw/xprint/config/C/print/models/PSspooldir/spooltodir.sh b/hw/xprint/config/C/print/models/PSspooldir/spooltodir.sh deleted file mode 100755 index aba14e1b3..000000000 --- a/hw/xprint/config/C/print/models/PSspooldir/spooltodir.sh +++ /dev/null @@ -1,127 +0,0 @@ -#!/bin/sh -PATH=/usr/bin:/usr/sbin:/bin:/sbin -export PATH - -verbose_msgs="false" -DEFAULT_SPOOLDIR=/tmp/Xprintjobs - -usage() -{ - printf "Usage: ${0}: [options]\n" - printf "-v\tbe verbose\n" - printf "-d dirname\tdefine spool dir\n" - printf "-p string\tname of printer selected by user\n" - printf "-c integer\tnumber of copies\n" - printf "-t string\tjob title\n" - printf "-s string\tfile name suffix\n" - printf "-o string\tspooler options\n" - printf "-u mask\tpermission mask for new files (see umask)\n" - exit 2 -} - -verbose() -{ - if ${verbose_msgs} ; then - echo "$1" - fi -} - -spooldir="${DEFAULT_SPOOLDIR}" -printername= -num_job_copies= -job_title= -filename_suffix= -spooler_options= -permmask= -while getopts va:b:d:p:c:t:s:o:u: i -do - case $i in - v) - verbose_msgs="true" - ;; - d) - spooldir="$OPTARG" - ;; - p) - printername="$OPTARG" - ;; - c) - num_job_copies="$OPTARG" - ;; - t) - job_title="$OPTARG" - ;; - s) - filename_suffix="$OPTARG" - ;; - o) - spooler_options="$OPTARG" - ;; - u) - permmask="$OPTARG" - ;; - ?) usage - ;; - esac -done - -verbose "# spooldir=\"$spooldir\"" -verbose "# printername=\"$printername\"" -verbose "# num_job_copies=\"$num_job_copies\"" -verbose "# job_title=\"$job_title\"" -verbose "# spooler_options=\"$spooler_options\"" -verbose "# umask=\"$permmask\"" - -if [ ! -d "${DEFAULT_SPOOLDIR}" ] ; then - mkdir "${DEFAULT_SPOOLDIR}" - chmod a+rwxt "${DEFAULT_SPOOLDIR}" -fi - -if [ "${permmask}" != "" ] ; then - umask ${permmask} -fi - -if [ ! -d "$spooldir" ] ; then - echo "$0: spooldir \"$spooldir\" does not exits." >&2 - exit 1 -fi -if [ ! -w "$spooldir" ] ; then - echo "$0: Cannot write to spooldir \"$spooldir\"." >&2 - exit 1 -fi - -# Create first part of the output file name (prefix and an "unique" -# id(=date and time))... -filename="Xpjob_`date +%Y%m%d%H%M%S`" - -# ... then add options ... -if [ "${printername}" != "" ] ; then - filename="${filename}_${printername}" -fi -if [ "${num_job_copies}" != "" -a "${num_job_copies}" != "1" ] ; then - filename="${filename}_copies_${num_job_copies}" -fi -if [ "${job_title}" != "" ] ; then - filename="${filename}_title_${job_title}" -fi - -# ... mangle output file name and filter chars (like whitespaces) -# which may screw-up further processing by other shell scripts ... -filename="`echo \"${filename}\" | tr '[:blank:]' '_' | tr -c -d '[:alnum:]_.-'`" - -# ... add path and suffix ... -filename="${spooldir}/${filename}${filename_suffix}" - -verbose "# File name is \"$filename\"." - -# ... and finally capture stdin to the file. -cat >"${filename}" - -if ${verbose_msgs} ; then - printf "# File is " ; ls -l "${filename}" -fi - -verbose "# Done." - -exit 0 -# EOF. diff --git a/hw/xprint/config/C/print/models/SPSPARC2/Makefile.am b/hw/xprint/config/C/print/models/SPSPARC2/Makefile.am deleted file mode 100644 index 5a56f90fb..000000000 --- a/hw/xprint/config/C/print/models/SPSPARC2/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -SUBDIRS = fonts - -xpcdir = @xpconfigdir@/C/print/models/SPSPARC2 - -dist_xpc_DATA = model-config diff --git a/hw/xprint/config/C/print/models/SPSPARC2/fonts/Makefile.am b/hw/xprint/config/C/print/models/SPSPARC2/fonts/Makefile.am deleted file mode 100644 index d1ee6cf42..000000000 --- a/hw/xprint/config/C/print/models/SPSPARC2/fonts/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -xpcdir = @xpconfigdir@/C/print/models/SPSPARC2/fonts - -parentdir = ../../PSdefault/fonts - -XPFONTS = \ - Courier-Bold.pmf \ - Courier-BoldOblique.pmf \ - Courier-Oblique.pmf \ - Courier.pmf \ - Helvetica-Bold.pmf \ - Helvetica-BoldOblique.pmf \ - Helvetica-Oblique.pmf \ - Helvetica.pmf \ - Symbol.pmf \ - Times-Bold.pmf \ - Times-BoldItalic.pmf \ - Times-Italic.pmf \ - Times-Roman.pmf - -dest = $(DESTDIR)$(xpcdir) - -remove-stuff: - for x in $(XPFONTS) ; do \ - rm -f $(dest)/$$x ; \ - done - - rm -f $(dest)/fonts.dir - -install-data-hook: remove-stuff - mkdir -p $(dest) ; \ - for x in $(XPFONTS) ; do \ - ln -s $(parentdir)/$$x $(dest)/$$x ; \ - done - - $(MKFONTSCALE) -b -s -l $(dest) - -uninstall-hook: remove-stuff diff --git a/hw/xprint/config/C/print/models/SPSPARC2/model-config b/hw/xprint/config/C/print/models/SPSPARC2/model-config deleted file mode 100644 index 9f29b9992..000000000 --- a/hw/xprint/config/C/print/models/SPSPARC2/model-config +++ /dev/null @@ -1,18 +0,0 @@ -# $Xprint.org: SPSPARC2 model-config,v 1.4 2002/11/07 19:48:04 gisburn Exp $ -*content-orientations-supported: portrait landscape -*descriptor: SunPics SPARCprinter II -*document-formats-supported: {POSTSCRIPT 2} -*input-trays-supported: -*medium-source-sizes-supported: \ - { '' {na-letter FALSE {6.35 209.55 6.35 273.05}} \ - {na-legal FALSE {6.35 209.55 6.35 349.25}} \ - {iso-a4 FALSE {6.35 203.65 6.35 290.65}}} -*plexes-supported: simplex -*printer-model: "SunPics SPARCprinter II" -*printer-resolutions-supported: 300 -*xp-ddx-identifier: XP-POSTSCRIPT -*xp-listfonts-modes-supported: xp-list-internal-printer-fonts xp-list-glyph-fonts -*xp-embedded-formats-supported: {POSTSCRIPT 2} -*xp-raw-formats-supported: {POSTSCRIPT 2} -*xp-setup-proviso: setup-optional -# EOF. diff --git a/hw/xprint/config/Makefile.am b/hw/xprint/config/Makefile.am deleted file mode 100644 index 197d19de0..000000000 --- a/hw/xprint/config/Makefile.am +++ /dev/null @@ -1,712 +0,0 @@ -## Locale mappings -## Notes: -## - only ASCII chars are allowed -## - "C" and "en_US" should not be used, they are real directories - -# List of locales which should be linked to the "C" locale - -SUBDIRS = C en_US - -xpconfigdir = @xpconfigdir@ - -C_LOCALES= \ - POSIX \ - af_ZA \ - af_ZA.iso88591 \ - ar \ - ar_AE \ - ar_AE.iso88596 \ - ar_AE.utf8 \ - ar_BH \ - ar_BH.iso88596 \ - ar_BH.utf8 \ - ar_DZ \ - ar_DZ.iso88596 \ - ar_DZ.utf8 \ - ar_EG \ - ar_EG.ISO8859-6 \ - ar_EG.UTF-8 \ - ar_EG.iso88596 \ - ar_EG.utf8 \ - ar_IN.utf8 \ - ar_IQ \ - ar_IQ.iso88596 \ - ar_IQ.utf8 \ - ar_JO \ - ar_JO.iso88596 \ - ar_JO.utf8 \ - ar_KW \ - ar_KW.iso88596 \ - ar_KW.utf8 \ - ar_LB \ - ar_LB.iso88596 \ - ar_LB.utf8 \ - ar_LY \ - ar_LY.iso88596 \ - ar_LY.utf8 \ - ar_MA \ - ar_MA.iso88596 \ - ar_MA.utf8 \ - ar_OM \ - ar_OM.iso88596 \ - ar_OM.utf8 \ - ar_QA \ - ar_QA.iso88596 \ - ar_QA.utf8 \ - ar_SA \ - ar_SA.iso88596 \ - ar_SA.utf8 \ - ar_SD \ - ar_SD.iso88596 \ - ar_SD.utf8 \ - ar_SY \ - ar_SY.iso88596 \ - ar_SY.utf8 \ - ar_TN \ - ar_TN.iso88596 \ - ar_TN.utf8 \ - ar_YE \ - ar_YE.iso88596 \ - ar_YE.utf8 \ - be_BY \ - be_BY.cp1251 \ - be_BY.utf8 \ - bg_BG \ - bg_BG.ISO8859-5 \ - bg_BG.cp1251 \ - bg_BG.utf8 \ - bn_IN.UTF-8 \ - bn_IN.utf8 \ - br_FR \ - br_FR.iso88591 \ - bs \ - bs_BA \ - bs_BA.iso88592 \ - bs_BA.ISO8859-2 \ - bs_BA.ISO-8859-2 \ - bs_BA.ISO_8859-2 \ - bs_BA.UTF-8 \ - bokmal \ - ca \ - ca.ISO8859-1 \ - ca.ISO8859-15 \ - ca_ES \ - ca_ES.ISO8859-1 \ - ca_ES.ISO8859-15 \ - ca_ES.iso88591 \ - ca_ES.iso885915@euro \ - ca_ES.utf8 \ - ca_ES@euro \ - catalan \ - croatian \ - cs_CZ \ - cs_CZ.ISO8859-2 \ - cs_CZ.iso88592 \ - cs_CZ.utf8 \ - cy_GB \ - cy_GB.iso885914 \ - cz \ - cz.ISO8859-2 \ - czech \ - da \ - da.ISO8859-1 \ - da.ISO8859-15 \ - danish \ - dansk \ - da_DK \ - da_DK.ISO8859-1 \ - da_DK.ISO8859-15 \ - da_DK.iso88591 \ - da_DK.iso885915 \ - da_DK.utf8 \ - de \ - de.ISO8859-1 \ - de.ISO8859-15 \ - de.UTF-8 \ - deutsch \ - de_AT \ - de_AT.ISO8859-1 \ - de_AT.ISO8859-15 \ - de_AT.iso88591 \ - de_AT.iso885915@euro \ - de_AT.utf8 \ - de_AT@euro \ - de_BE \ - de_BE.iso88591 \ - de_BE.iso885915@euro \ - de_BE@euro \ - de_CH \ - de_CH.ISO8859-1 \ - de_CH.iso88591 \ - de_CH.utf8 \ - de_DE \ - de_DE.ISO8859-1 \ - de_DE.ISO8859-15 \ - de_DE.UTF-8 \ - de_DE.iso88591 \ - de_DE.iso885915@euro \ - de_DE.utf8 \ - de_DE@euro \ - de_LU \ - de_LU.iso88591 \ - de_LU.iso885915@euro \ - de_LU.utf8 \ - de_LU@euro \ - el_GR \ - el_GR.ISO8859-7 \ - el_GR.ISO8859-7@euro \ - el_GR.iso88597 \ - el_GR.utf8 \ - en_AU \ - en_AU.ISO8859-1 \ - en_AU.iso88591 \ - en_AU.utf8 \ - en_BW \ - en_BW.iso88591 \ - en_DK \ - en_DK.iso88591 \ - en_GB \ - en_GB.ISO8859-1 \ - en_GB.ISO8859-15 \ - en_GB.iso88591 \ - en_GB.iso885915 \ - en_GB.utf8 \ - en_HK \ - en_HK.iso88591 \ - en_IE \ - en_IE.ISO8859-1 \ - en_IE.ISO8859-15 \ - en_IE.iso88591 \ - en_IE.iso885915@euro \ - en_IE.utf8 \ - en_IE@euro \ - en_IN \ - en_IN.utf8 \ - en_NZ \ - en_NZ.ISO8859-1 \ - en_NZ.iso88591 \ - en_NZ.utf8 \ - en_PH \ - en_PH.iso88591 \ - en_SG \ - en_SG.iso88591 \ - en_ZA \ - en_ZA.iso88591 \ - en_ZA.utf8 \ - en_ZW \ - en_ZW.iso88591 \ - es_AR \ - es_AR.ISO8859-1 \ - es_AR.iso88591 \ - es_AR.utf8 \ - es_BO \ - es_BO.ISO8859-1 \ - es_BO.iso88591 \ - es_BO.utf8 \ - es_CL \ - es_CL.ISO8859-1 \ - es_CL.iso88591 \ - es_CL.utf8 \ - es_CO \ - es_CO.ISO8859-1 \ - es_CO.iso88591 \ - es_CO.utf8 \ - es_CR \ - es_CR.ISO8859-1 \ - es_CR.iso88591 \ - es_CR.utf8 \ - es_DO \ - es_DO.iso88591 \ - es_DO.utf8 \ - es_EC \ - es_EC.ISO8859-1 \ - es_EC.iso88591 \ - es_EC.utf8 \ - es_ES \ - es_ES.ISO8859-1 \ - es_ES.ISO8859-15 \ - es_ES.UTF-8 \ - es_ES.iso88591 \ - es_ES.iso885915@euro \ - es_ES.utf8 \ - es_ES@euro \ - es_GT \ - es_GT.ISO8859-1 \ - es_GT.iso88591 \ - es_GT.utf8 \ - es_HN \ - es_HN.iso88591 \ - es_HN.utf8 \ - es_MX \ - es_MX.ISO8859-1 \ - es_MX.iso88591 \ - es_MX.utf8 \ - es_NI \ - es_NI.ISO8859-1 \ - es_NI.iso88591 \ - es_NI.utf8 \ - es_PA \ - es_PA.ISO8859-1 \ - es_PA.iso88591 \ - es_PA.utf8 \ - es_PE \ - es_PE.ISO8859-1 \ - es_PE.iso88591 \ - es_PE.utf8 \ - es_PY \ - es_PY.ISO8859-1 \ - es_PY.iso88591 \ - es_PY.utf8 \ - es_SV \ - es_SV.ISO8859-1 \ - es_SV.iso88591 \ - es_SV.utf8 \ - es_UY \ - es_UY.ISO8859-1 \ - es_UY.iso88591 \ - es_UY.utf8 \ - es_VE \ - es_VE.ISO8859-1 \ - es_VE.iso88591 \ - es_VE.utf8 \ - et_EE \ - et_EE.ISO8859-15 \ - et_EE.iso88591 \ - et_EE.utf8 \ - eu_ES \ - eu_ES.iso88591 \ - eu_ES.iso885915@euro \ - eu_ES@euro \ - fa_IR.utf8 \ - fi_FI \ - fi_FI.ISO8859-1 \ - fi_FI.ISO8859-15 \ - fi_FI.UTF-8 \ - fi_FI.iso88591 \ - fi_FI.iso885915@euro \ - fi_FI.utf8 \ - fi_FI@euro \ - fo_FO \ - fo_FO.iso88591 \ - fo_FO.utf8 \ - fr_BE \ - fr_BE.ISO8859-1 \ - fr_BE.ISO8859-15 \ - fr_BE.UTF-8 \ - fr_BE.iso88591 \ - fr_BE.iso885915@euro \ - fr_BE.utf8 \ - fr_BE@euro \ - fr_CH \ - fr_CH.ISO8859-1 \ - fr_CH.iso88591 \ - fr_CH.utf8 \ - fr_FR \ - fr_FR.ISO8859-1 \ - fr_FR.ISO8859-15 \ - fr_FR.UTF-8 \ - fr_FR.iso88591 \ - fr_FR.iso885915@euro \ - fr_FR.utf8 \ - fr_FR@euro \ - fr_LU \ - fr_LU.iso88591 \ - fr_LU.iso885915@euro \ - fr_LU.utf8 \ - fr_LU@euro \ - ga_IE \ - ga_IE.iso88591 \ - ga_IE.iso885915@euro \ - ga_IE.utf8 \ - ga_IE@euro \ - gl_ES \ - gl_ES.iso88591 \ - gl_ES.iso885915@euro \ - gl_ES.utf8 \ - gl_ES@euro \ - gu_IN.UTF-8 \ - gu_IN.utf8 \ - gv_GB \ - gv_GB.iso88591 \ - hebrew \ - he \ - he_IL \ - he_IL.ISO8859-8 \ - he_IL.UTF-8 \ - he_IL.iso88598 \ - he_IL.utf8 \ - hi_IN.UTF-8 \ - hi_IN.utf8 \ - hr_HR \ - hr_HR.ISO8859-2 \ - hr_HR.iso88592 \ - hr_HR.utf8 \ - hu_HU \ - hu_HU.ISO8859-2 \ - hu_HU.iso88592 \ - hu_HU.utf8 \ - id_ID \ - id_ID.iso88591 \ - id_ID.utf8 \ - is_IS \ - is_IS.ISO8859-1 \ - is_IS.iso88591 \ - is_IS.utf8 \ - it \ - it.ISO8859-1 \ - it.ISO8859-15 \ - it.UTF-8 \ - italian \ - it_CH \ - it_CH.iso88591 \ - it_CH.utf8 \ - it_IT \ - it_IT.ISO8859-1 \ - it_IT.ISO8859-15 \ - it_IT.UTF-8 \ - it_IT.iso88591 \ - it_IT.iso885915@euro \ - it_IT.utf8 \ - it_IT@euro \ - iw_IL \ - iw_IL.iso88598 \ - ja \ - japan \ - japanese \ - japanese.euc \ - japanese.sjis \ - ja_JP \ - ja_JP.EUC \ - ja_JP.PCK \ - ja_JP.UTF-8 \ - ja_JP.eucJP \ - ja_JP.eucjp \ - ja_JP.sjis \ - ja_JP.ujis \ - ja_JP.utf8 \ - ka_GE \ - ka_GE.georgianps \ - kl_GL \ - kl_GL.iso88591 \ - kl_GL.utf8 \ - ko \ - ko.UTF-8 \ - korean \ - korean.euc \ - ko_KR \ - ko_KR.EUC \ - ko_KR.EUC@dict \ - ko_KR.UTF-8 \ - ko_KR.UTF-8@dict \ - ko_KR.euckr \ - ko_KR.utf8 \ - kw_GB \ - kw_GB.iso88591 \ - lt_LT \ - lt_LT.ISO8859-13 \ - lt_LT.iso885913 \ - lt_LT.utf8 \ - lithuanian \ - lt \ - lt.ISO8859-13 \ - lv \ - lv.ISO8859-13 \ - lv_LV \ - lv_LV.ISO8859-13 \ - lv_LV.iso885913 \ - lv_LV.utf8 \ - mi_NZ \ - mi_NZ.iso885913 \ - mk_MK \ - mk_MK.ISO8859-5 \ - mk_MK.iso88595 \ - mk_MK.utf8 \ - mr_IN.utf8 \ - ms_MY \ - ms_MY.iso88591 \ - mt_MT \ - mt_MT.iso88593 \ - nb_NO \ - nb_NO.ISO-8859-1 \ - nl \ - nl.ISO8859-1 \ - nl.ISO8859-15 \ - nl_BE \ - nl_BE.ISO8859-1 \ - nl_BE.ISO8859-15 \ - nl_BE.iso88591 \ - nl_BE.iso885915@euro \ - nl_BE.utf8 \ - nl_BE@euro \ - nl_NL \ - nl_NL.ISO8859-1 \ - nl_NL.ISO8859-15 \ - nl_NL.iso88591 \ - nl_NL.iso885915@euro \ - nl_NL.utf8 \ - nl_NL@euro \ - nn_NO \ - nn_NO.iso88591 \ - no \ - no.ISO8859-1 \ - no_NO \ - no_NO.ISO8859-1@bokmal \ - no_NO.ISO8859-1@nynorsk \ - no_NO.iso88591 \ - no_NO.utf8 \ - norwegian \ - oc_FR \ - oc_FR.iso88591 \ - pa_IN.UTF-8 \ - pa_IN.utf8 \ - polish \ - pl_PL \ - pl_PL.ISO8859-2 \ - pl_PL.UTF-8 \ - pl_PL.iso88592 \ - pl_PL.utf8 \ - portuguese \ - pt \ - pt.ISO8859-1 \ - pt.ISO8859-15 \ - pt_BR \ - pt_BR.ISO8859-1 \ - pt_BR.ISO-8859-1 \ - pt_BR.ISO_8859-1 \ - pt_BR.iso88591 \ - pt_BR.iso885915 \ - pt_BR.88591 \ - pt_BR.88591.en \ - pt_BR.utf8 \ - pt_BR.UTF-8 \ - pt_PT \ - pt_PT.ISO8859-1 \ - pt_PT.ISO8859-15 \ - pt_PT.iso88591 \ - pt_PT.iso885915@euro \ - pt_PT.utf8 \ - pt_PT@euro \ - ro_RO \ - ro_RO.ISO8859-2 \ - ro_RO.iso88592 \ - ro_RO.utf8 \ - ru \ - ru.ISO8859-5 \ - ru.UTF-8 \ - ru.ansi1251 \ - ru.koi8-r \ - ru_SU \ - russian \ - ru_RU \ - ru_RU.ANSI1251 \ - ru_RU.ISO8859-5 \ - ru_RU.KOI8-R \ - ru_RU.UTF-8 \ - ru_RU.iso88595 \ - ru_RU.koi8r \ - ru_RU.utf8 \ - ru_UA \ - ru_UA.koi8u \ - romanian \ - se_NO \ - se_NO.utf8 \ - si \ - sinhala \ - si_LK \ - si_LK.UTF8 \ - sk \ - sk.ISO8859-2 \ - slovak \ - slovene \ - slovenian \ - spanish \ - sk_SK \ - sk_SK.ISO8859-2 \ - sk_SK.iso88592 \ - sk_SK.utf8 \ - sh \ - sh.ISO8859-2 \ - sh_BA.ISO8859-2@bosnia \ - sh_YU \ - sh_YU.iso88592 \ - sh_YU.utf8 \ - sl_SI \ - sl_SI.ISO8859-2 \ - sl_SI.iso88592 \ - sl_SI.utf8 \ - su \ - su.ISO8859-1 \ - sq_AL \ - sq_AL.ISO8859-2 \ - sq_AL.iso88591 \ - sq_AL.utf8 \ - sr_SP \ - sr_SP.ISO8859-5 \ - sr_YU \ - sr_YU.ISO8859-5 \ - sr_YU.iso88592 \ - sr_YU.iso88595@cyrillic \ - sr_YU.utf8 \ - sr_YU@cyrillic \ - sv \ - sv.ISO8859-1 \ - sv.ISO8859-15 \ - sv.UTF-8 \ - sv_FI \ - sv_FI.iso88591 \ - sv_FI.iso885915@euro \ - sv_FI.utf8 \ - sv_FI@euro \ - sv_SE \ - sv_SE.ISO8859-1 \ - sv_SE.ISO8859-15 \ - sv_SE.UTF-8 \ - sv_SE.iso88591 \ - sv_SE.iso885915 \ - sv_SE.utf8 \ - swedish \ - ta_IN \ - ta_IN.utf8 \ - te_IN \ - te_IN.utf8 \ - tg_TJ \ - tg_TJ.koi8t \ - th \ - thai \ - th_TH \ - th_TH.ISO8859-11 \ - th_TH.TIS620 \ - th_TH.UTF-8 \ - th_TH.tis620 \ - th_TH.utf8 \ - tl_PH \ - tl_PH.iso88591 \ - tr \ - tr.ISO8859-9 \ - turkish \ - tr_TR \ - tr_TR.ISO8859-9 \ - tr_TR.UTF-8 \ - tr_TR.iso88599 \ - tr_TR.utf8 \ - uk_UA \ - uk_UA.koi8u \ - uk_UA.utf8 \ - ur_PK \ - ur_PK.utf8 \ - uz_UZ \ - uz_UZ.iso88591 \ - vi_VN \ - vi_VN.tcvn \ - vi_VN.utf8 \ - wa_BE \ - wa_BE.iso88591 \ - wa_BE.iso885915@euro \ - wa_BE@euro \ - zh \ - zh.GBK \ - zh.UTF-8 \ - zh_CN \ - zh_CN.EUC \ - zh_CN.EUC@pinyin \ - zh_CN.EUC@radical \ - zh_CN.EUC@stroke \ - zh_CN.GB18030 \ - zh_CN.GB18030@pinyin \ - zh_CN.GB18030@radical \ - zh_CN.GB18030@stroke \ - zh_CN.GBK \ - zh_CN.GBK@pinyin \ - zh_CN.GBK@radical \ - zh_CN.GBK@stroke \ - zh_CN.UTF-8 \ - zh_CN.UTF-8@pinyin \ - zh_CN.UTF-8@radical \ - zh_CN.UTF-8@stroke \ - zh_CN.gb18030 \ - zh_CN.gb2312 \ - zh_CN.gbk \ - zh_CN.utf8 \ - zh_HK \ - zh_HK.BIG5HK \ - zh_HK.BIG5HK@radical \ - zh_HK.BIG5HK@stroke \ - zh_HK.UTF-8 \ - zh_HK.UTF-8@radical \ - zh_HK.UTF-8@stroke \ - zh_HK.big5hkscs \ - zh_HK.utf8 \ - zh_TW \ - zh_TW.BIG5 \ - zh_TW.BIG5@pinyin \ - zh_TW.BIG5@radical \ - zh_TW.BIG5@stroke \ - zh_TW.BIG5@zhuyin \ - zh_TW.EUC \ - zh_TW.EUC@pinyin \ - zh_TW.EUC@radical \ - zh_TW.EUC@stroke \ - zh_TW.EUC@zhuyin \ - zh_TW.UTF-8 \ - zh_TW.UTF-8@pinyin \ - zh_TW.UTF-8@radical \ - zh_TW.UTF-8@stroke \ - zh_TW.UTF-8@zhuyin \ - zh_TW.big5 \ - zh_TW.euctw \ - zh_TW.utf8 - - -# List of locales which should be linked to the "en_US" locale, -# e.g. these locales should get the defaults (for example that -# US-Letter is used as default papersize) mainly used in the USA -US_LOCALES= \ - en_CA \ - en_CA.ISO8859-1 \ - en_CA.iso88591 \ - en_CA.utf8 \ - en_US.ISO8859-1 \ - en_US.ISO8859-15 \ - en_US.UTF-8 \ - en_US.iso88591 \ - en_US.iso885915 \ - en_US.utf8 \ - es_PR \ - es_PR.iso88591 \ - es_PR.utf8 \ - es_US \ - es_US.iso88591 \ - fr_CA \ - fr_CA.ISO8859-1 \ - fr_CA.iso88591 \ - fr_CA.utf8 \ - yi_US \ - yi_US.cp1255 - -dest = $(DESTDIR)$(xpconfigdir) - -remove-links: - for dir in $(US_LOCALES) ; do \ - rm -f $(dest)/$${dir} ; \ - done ; \ - \ - for dir in $(C_LOCALES) ; do \ - rm -f $(dest)/$${dir} ; \ - done ; - -install-data-local: remove-links - mkdir -p $(dest) ; \ - mkdir -p $(dest)/C; \ - mkdir -p $(dest)/en_US; \ - \ - for dir in $(US_LOCALES) ; do \ - ln -s en_US $(dest)/$${dir} ; \ - done ; \ - \ - for dir in $(C_LOCALES) ; do \ - ln -s C $(dest)/$${dir} ; \ - done ; - -uninstall-hook: remove-links - -dist_xpconfig_DATA = README diff --git a/hw/xprint/config/README b/hw/xprint/config/README deleted file mode 100644 index d7447815d..000000000 --- a/hw/xprint/config/README +++ /dev/null @@ -1,318 +0,0 @@ - - -------------------------------------- - The X Print Service - The Basics - -------------------------------------- - -Index - - 1.0 X Print Service Overview - - - 2.0 How the X Print Service Works - - - 3.0 Using the X Print Service - - 3.1 X Print Server Configuration - - 3.2 Starting the X Print Service - - 3.3 Configuring the environment - - 3.4 General End-User Sequence - - -1.0 X Print Service Overview -============================= - -The "X Print Service" technology allows X rendering to devices such as -printers and fax. Most of the service is available in the X11 -technology stack as Xp, with the remainder in the CDE technology stack -as DtPrint. Modifications have also been made to the Motif technology -stack to support Xp and DtPrint. - -The Xp portion consists of: - * Xp Extension for the X-Server (included in the X-Server Xprt) - * Xp Extension API for the client side (libXp) - * PCL ddx driver that converts core X to native PCL - * Postscript ddx driver that converts core X to native Postscript - * Raster ddx driver that generates xwd rasters which can be - converted to PCL or Postscript rasters - -The DtPrint portion consists of: - * A collection of print GUIs (libDtPrint) - * A Print Dialog Manager that can assist a client in - setting printing options (dtpdm, dtpdmd) - -From an X clients perspective, it can attach to one of two nearly -identical X-Servers, a "Video" X-Server, and a "Print" X-Server -which has the additional Xp capability but otherwise looks and -behaves the same. - - - -2.0 How the X Print Service Works -================================== - -The X Print Service expands on the traditional X-Server and Xlib world -in four ways. - -1. Most obvious is the use of "print ddx drivers" instead of - "video ddx drivers". While a video ddx driver modifies pixels - in a video frame buffer, a print ddx driver generates "page - description language (PDL)" output such as PCL or Postscript. - - Once a print ddx driver generates PDL output, it can be sent to - a spooler such as lp(1) or retrieved by the client. - - Though not currently done, a single X-Server can support both - print and video ddx drivers. - -2. Since printers support "paged" output, unlike video, a portion - of the Xp Extension supports APIs to delineate printed output. - For example, XpStartPage and XpEndPage tell the X-Server where - a physical page starts and ends in an otherwise continuous - stream of X rendering primitives. Likewise, XpStartJob and - XpEndJob determine when a collection of pages starts and ends. - XpEndJob typically causes the generated PDL to be submitted to - a spooler, such as lp(1). - -3. Since printers have extensive capabilities, another portion of - the Xp Extension supports APIs to manipulate "print contexts". - - Once a printer is selected using the Xp Extension API, a print - context to represent it can be created. A print context - embodies the printer selected - it contains the printer's - default capabilities, selectable range of capabilities, - printer state, and generated output. Some "attributes" within - the print context can be modified by the user, and the - X-Server and print ddx driver will react accordingly. For - example, the attribute "content-orientation" can be set to - "landscape" or "portrait". - -4. Since printers can have "built in" fonts, the Xp Extension in - the X-Server works with the print ddx drivers to make - available (for printing only) additional fonts on a per print - context basis. - - When a print context is created and set for a given printer, - the X font calls may be able to access additional printer - fonts. To do this (typically), the X-Server must have access - to "printer metric files" (.pmf) that describe at minimum the - metrics of the built in fonts. - - - -3.0 Using the X Print Service -============================== - -There are three tasks to start the X Print Service: 1) configuring the -X Print Server, 2) starting the X Print Service, 3) configuring the user -session so that clients can find the running X Print Service. - -The tasks are described in detail below. - - -3.1 X Print Server Configuration ---------------------------------- - -The X Print Server (Xprt) can read a number of configuration files which -control its behavior and support for printers. Each vendor platform has -a default location for this information. Xprt can also read the -environment variable XPCONFIGDIR to locate alternate configuration -directories. Common settings include: - - * export XPCONFIGDIR=/X11/lib/X11/XpConfig/ - - * export XPCONFIGDIR=/proj/x11/xc/programs/Xserver/XpConfig/ - -Xprt has many built-in defaults, and lacking any configuration files, -will immediately try to support all printers visible via lpstat(1). - -In order of importance for configuration by a system administrator, the -configuration files for a "C" locale are as follows. - - ${XPCONFIGDIR}/C/print/Xprinters - - `Xprinters' is the top most configuration file. It tells - Xprt which specific printer names (e.g. mylaser) should - be supported, and whether lpstat(1) or other commands - should be used to automatically supplement the list of - printers. - - ${XPCONFIGDIR}/C/print/attributes/printer - - The `printer' file maps printer names to model - configurations (see `model-config' below). For example, - "mylaser" could be mapped to a "HPDJ1600C", and all other - arbitrary printers could be mapped to a default, such as - "HPLJ4SI". When depending on lpstat(1) in the Xprinters - file, setting up defaults in `printer' becomes all the - more important. - - ${XPCONFIGDIR}/C/print/attributes/document - - The `document' file specifies the initial document values - for any print jobs. For example, which paper tray to - use, what default resolution, etc. - - ${XPCONFIGDIR}/C/print/attributes/job - - The `job' file specifies the initial job values for any - print jobs. For example, "notification-profile" can be - set so that when a print job is successfully sent to a - printer, e-mail is sent to the user. - - ${XPCONFIGDIR}/C/print/models/HPDJ1600C/model-config - ${XPCONFIGDIR}/C/print/models/HPDJ1600C/fonts/fonts.dir - ${XPCONFIGDIR}/C/print/models/HPDJ1600C/fonts/9nb00051.pmf - ${XPCONFIGDIR}/C/print/models/HPDJ1600C/fonts/9nb00093.pmf - - The `model-config' file has attributes that describe the - printer model's capabilities and default settings. - Printer model fonts may also be present. The model-config - file also identifies the print ddx driver to be used. - - For each printer model supported, a complete hierarchy of - files should exist. In most cases, these files do not - need to be modified. - - ${XPCONFIGDIR}/C/print/ddx-config/raster/pcl - ${XPCONFIGDIR}/C/print/ddx-config/raster/postscript - - The print ddx drivers can have highly specific - configuration files to control their behavior. In most - cases, these files do not need to be modified. - - -3.2 Starting the X Print Service ---------------------------------- - -The summary checklist for starting the X Print Service is as follows: - -1. Choose an execution model for the X Print Service. The X - Print Service can be run on a per-user session basis, per - machine basis, or can be run on a few machines globally - available to a number of users. - -2. If print jobs are to be submitted to a spooler (almost always - the case), make sure all needed printers are available to the - spooler subsystem (most often lp(1)) on the same machine - running the X Print Service. - -3. Configure the X Print Server. See ``X Print Server - Configuration''. - -4. Depending on #1, start the X Print Server process "Xprt", and - then the Print Dialog Manager Daemon process "dtpdmd" at the - appropriate times. - -The details are described below. - -Because the X Print Service is based on X, it can be easily distributed. -The most significant factors in which execution model to choose will be -driven by: - - * how many printers will be accessable through the printer - subsystem on any given machine. A system administrator may - choose to cluster printers on a few given machines, or - scatter them across an organization and possibly make - extensive use of remote spoolers to make them globally - available. - - * how many machines will need a copy of the X Print Server - configuration files. The files have been architected so - that one super-set version of them can be maintained and - distributed (e.g. via NFS), and a per-machine or per-user - version of the `Xprinters' is all that is needed to have the - appropriate information in them utilized or ignored. - - * how many users can demand services from a given X Print - Service. - -With the above in mind, some obvious execution models include: - - * Global - in this model, the system administrator is choosing - to run the X Print Service on a *few* select machines with - appropriate printers configured, and allow clients access to - the global resource. This can centralize the administration - of printers and configuration files, but may have to be - monitored for performance loading. - - Startup would likely be done by boot-up scripts. - - * Per-machine - every machine with potential X Print Service - users would run the service. Printer and configuration file - administration is decentralized, and usage would be limited - to the users on the machine. - - Startup would likely be done by boot-up scripts. - - * Per-user session - every user would run an entire X Print - Service for themselves. In the future, the Video X Server - normally started may contain Print X Server capability, so - this model becomes very natural. - - Startup would likely be done at session login or by - launching actions or processes manually once the user - logs in. Note: the dtpdmd must be started after Xprt. - -Starting of the processes is straight forward. In strict order: - - [machineA] % Xprt [-XpFile ] [:dispNum] & - - Note that Xprt will look for configuration files in either - a default location or where XPCONFIGDIR points. - - -XpFile specifies an alternate `Xprinters' file, rather - than the default one or `${XPCONFIGDIR}/C/print/Xprinters'. - - [machineA] % dtpdmd -d machineA[:dispNum] [-l /tmp/dtpdmd.log] & - - The dtpdmd will maintain an X-Selection on the X-Server, - and will start dtpdm's as required to service requests. - -In all but the per-user session model, the machine running the dtpdmd -(thus dtpdm's) will need display authorization to the users video -display. - - - -3.3 Configuring the environment --------------------------------- - -Once a X Print Server and dtpdmd have been started -- many of them -in some cases -- clients will need to find and use them. There are -two mechanisms that allow clients to discover X Print Servers and -printers. - - * "X Print Specifier" - assuming usage of the DtPrint print - dialogs, the following notation is understood: - - printer_name@machine[:dispNum] - - For example: - - colorlj7@printhub:2 - - In the above example, the X Print Server running at `printhub:2' - is assumed to support the printer named `colorlj7'. - - * "XPSERVERLIST" - assuming usage of the DtPrint print dialogs, - the environment variable "XPSERVERLIST" can contain a list - of X Print Servers. For example: - - XPSERVERLIST="printhub:2 printhub:3 otherdept:0" - - Then in the dialogs, only a printer name needs to be entered. - The dialog will then search the X Print Servers in XPSERVERLIST - for a server than supports the printer, and then establish - contact. - -3.4 General End-User Sequence ------------------------------- - -From most CDEnext applications, printing is accomplished by bringing -down the menu and selecting . This will result in -the DtPrintSetupBox dialog, which will request the name of a printer, -and offer limited capability to configure print options (e.g. number -of copies). If the user wishes, they can select , which -will start a dtpdm capable of modifying additional print options. -Finally, the user should select . - - - -$Xorg: README,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ diff --git a/hw/xprint/config/en_US/Makefile.am b/hw/xprint/config/en_US/Makefile.am deleted file mode 100644 index 0390ed2d4..000000000 --- a/hw/xprint/config/en_US/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = print diff --git a/hw/xprint/config/en_US/print/Makefile.am b/hw/xprint/config/en_US/print/Makefile.am deleted file mode 100644 index 025003339..000000000 --- a/hw/xprint/config/en_US/print/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = attributes diff --git a/hw/xprint/config/en_US/print/attributes/Makefile.am b/hw/xprint/config/en_US/print/attributes/Makefile.am deleted file mode 100644 index 8a05004d1..000000000 --- a/hw/xprint/config/en_US/print/attributes/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -xpcdir = @xpconfigdir@/en_US/print/attributes - -dist_xpc_DATA = document diff --git a/hw/xprint/config/en_US/print/attributes/document b/hw/xprint/config/en_US/print/attributes/document deleted file mode 100644 index 253c46bce..000000000 --- a/hw/xprint/config/en_US/print/attributes/document +++ /dev/null @@ -1,13 +0,0 @@ -# $Xorg: document,v 1.2 2002/11/30 22:10:03 gisburn Exp $ -# Document DPA-Object initial attribute values for en_US(-like) locales -# -# Note that the defaults (for all locales) are set in -# ${XPCONFIGDIR}/C/print/attributes/document -# Values in ${XPCONFIGDIR}/${LANG}/print/attributes/document are used to -# set/override these defaults for a specific locale on demand - -# US and some other countries use US-Letter as default paper size -# ("C"-locale default is "ISO-A4") -*default-medium: na-letter - -# EOF. diff --git a/hw/xprint/ddxInit.c b/hw/xprint/ddxInit.c deleted file mode 100644 index 795052120..000000000 --- a/hw/xprint/ddxInit.c +++ /dev/null @@ -1,390 +0,0 @@ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include "windowstr.h" -#include "servermd.h" -#include "DiPrint.h" - -/*- - *----------------------------------------------------------------------- - * InitOutput -- - * If this is built as a print-only server, then we must supply - * an InitOutput routine. If a normal server's real ddx InitOutput - * is used, then it should call PrinterInitOutput if it so desires. - * The ddx-level hook is needed to allow the printer stuff to - * create additional screens. An extension can't reliably do - * this for two reasons: - * - * 1) If InitOutput doesn't create any screens, then main() - * exits before calling InitExtensions(). - * - * 2) Other extensions may rely on knowing about all screens - * when they initialize, and we can't guarantee the order - * of extension initialization. - * - * Results: - * ScreenInfo filled in, and PrinterInitOutput is called to create - * the screens associated with printers. - * - * Side Effects: - * None - * - *----------------------------------------------------------------------- - */ - -void -InitOutput( - ScreenInfo *pScreenInfo, - int argc, - char **argv) - -{ - pScreenInfo->imageByteOrder = IMAGE_BYTE_ORDER; - pScreenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; - pScreenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD; - pScreenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; - - pScreenInfo->numPixmapFormats = 0; /* get them in PrinterInitOutput */ - screenInfo.numVideoScreens = 0; - -#ifdef PRINT_ONLY_SERVER - PrinterInitOutput(pScreenInfo, argc, argv); -#endif - -} - -void -DDXRingBell(int volume, int pitch, int duration) -{ - /* dummy func; link fails without */ -} - -static void -BellProc( - int volume, - DeviceIntPtr pDev) -{ - return; -} - -static void -KeyControlProc( - DeviceIntPtr pDev, - KeybdCtrl *ctrl) -{ - return; -} - -static KeySym printKeyMap[256]; -static CARD8 printModMap[256]; - -static int -KeyboardProc( - DevicePtr pKbd, - int what, - int argc, - char *argv[]) -{ - KeySymsRec keySyms; - - keySyms.minKeyCode = 8; - keySyms.maxKeyCode = 8; - keySyms.mapWidth = 1; - keySyms.map = printKeyMap; - - switch(what) - { - case DEVICE_INIT: - InitKeyboardDeviceStruct(pKbd, &keySyms, printModMap, - (BellProcPtr)BellProc, - KeyControlProc); - break; - case DEVICE_ON: - break; - case DEVICE_OFF: - break; - case DEVICE_CLOSE: - break; - } - return Success; -} - -#include "../mi/mipointer.h" -static int -PointerProc( - DevicePtr pPtr, - int what, - int argc, - char *argv[]) -{ -#define NUM_BUTTONS 1 - CARD8 map[NUM_BUTTONS]; - - switch(what) - { - case DEVICE_INIT: - { - map[0] = 0; - InitPointerDeviceStruct(pPtr, map, NUM_BUTTONS, - GetMotionHistory, - (PtrCtrlProcPtr)_XpVoidNoop, - GetMotionHistorySize(), 2); - break; - } - case DEVICE_ON: - break; - case DEVICE_OFF: - break; - case DEVICE_CLOSE: - break; - } - return Success; -} - -void -InitInput( - int argc, - char **argv) -{ - DeviceIntPtr ptr, kbd; - - ptr = AddInputDevice((DeviceProc)PointerProc, TRUE); - kbd = AddInputDevice((DeviceProc)KeyboardProc, TRUE); - RegisterPointerDevice(ptr); - RegisterKeyboardDevice(kbd); - return; -} - - -Bool -LegalModifier( - unsigned int key, - DeviceIntPtr dev) -{ - return TRUE; -} - -void -ProcessInputEvents(void) -{ -} - -#ifdef __APPLE__ -#include "micmap.h" - -void GlxExtensionInit(void); -void GlxWrapInitVisuals(miInitVisualsProcPtr *procPtr); - -void -DarwinHandleGUI(int argc, char *argv[]) -{ -} - -void DarwinGlxExtensionInit(void) -{ - GlxExtensionInit(); -} - -void DarwinGlxWrapInitVisuals( - miInitVisualsProcPtr *procPtr) -{ - GlxWrapInitVisuals(procPtr); -} -#endif - -#ifdef DDXOSINIT -void -OsVendorInit(void) -{ -} -#endif - -#ifdef DDXOSFATALERROR -void -OsVendorFatalError(void) -{ -} -#endif - -#ifdef DDXBEFORERESET -void -ddxBeforeReset(void) -{ - return; -} -#endif - -/* ddxInitGlobals - called by |InitGlobals| from os/util.c */ -void ddxInitGlobals(void) -{ - PrinterInitGlobals(); -} - -/**************************************** -* ddxUseMsg() -* -* Called my usemsg from os/utils/c -* -*****************************************/ - -void ddxUseMsg(void) -{ -} - -void AbortDDX (void) -{ -} - -void ddxGiveUp(void) /* Called by GiveUp() */ -{ -} - -int -ddxProcessArgument ( - int argc, - char *argv[], - int i) -{ - return(0); -} - -#ifdef XINPUT - -#include -#include -#include "XIstubs.h" -#include "exglobals.h" - -/* Place dummy config functions here instead of config/config.c, - since Xprint does not use D-BUS */ -void config_init() { } -void config_fini() { } - - -int -ChangePointerDevice ( - DeviceIntPtr old_dev, - DeviceIntPtr new_dev, - unsigned char x, - unsigned char y) -{ - return (BadDevice); -} - -int -ChangeDeviceControl ( - register ClientPtr client, - DeviceIntPtr dev, - xDeviceCtl *control) -{ - return BadMatch; -} - -int -NewInputDeviceRequest(InputOption *options, DeviceIntPtr *pdev) -{ - return BadValue; -} - -void -DeleteInputDeviceRequest(DeviceIntPtr dev) -{ -} - -void -OpenInputDevice ( - DeviceIntPtr dev, - ClientPtr client, - int *status) -{ - return; -} - -void -AddOtherInputDevices (void) -{ - return; -} - -void -CloseInputDevice ( - DeviceIntPtr dev, - ClientPtr client) -{ - return; -} - -int -ChangeKeyboardDevice ( - DeviceIntPtr old_dev, - DeviceIntPtr new_dev) -{ - return (Success); -} - -int -SetDeviceMode ( - register ClientPtr client, - DeviceIntPtr dev, - int mode) -{ - return BadMatch; -} - -int -SetDeviceValuators ( - register ClientPtr client, - DeviceIntPtr dev, - int *valuators, - int first_valuator, - int num_valuators) -{ - return BadMatch; -} - - -#endif /* XINPUT */ - -#ifdef AIXV3 -/* - * This is just to get the server to link on AIX, where some bits - * that should be in os/ are instead in hw/ibm. - */ -int SelectWaitTime = 10000; /* usec */ -#endif diff --git a/hw/xprint/doc/Makefile.am b/hw/xprint/doc/Makefile.am deleted file mode 100644 index c0cb9d3d9..000000000 --- a/hw/xprint/doc/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -MAN_SRCS = Xprt.man.pre - -appmandir = $(APP_MAN_DIR) - -appman_PRE = Xprt.man -appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) - -include $(top_srcdir)/cpprules.in - -BUILT_SOURCES = $(appman_PRE) -CLEANFILES = $(appman_PRE) $(appman_DATA) - -SUFFIXES += .$(APP_MAN_SUFFIX) .man - -.man.$(APP_MAN_SUFFIX): - -rm -f $@ - $(LN_S) $< $@ - -EXTRA_DIST = $(MAN_SRCS) Xprt.html Xprt.sgml diff --git a/hw/xprint/doc/Xprt.html b/hw/xprint/doc/Xprt.html deleted file mode 100644 index 2aa0c9e3c..000000000 --- a/hw/xprint/doc/Xprt.html +++ /dev/null @@ -1,115 +0,0 @@ -Xprt diff --git a/hw/xprint/doc/Xprt.man.pre b/hw/xprint/doc/Xprt.man.pre deleted file mode 100644 index 837619cb2..000000000 --- a/hw/xprint/doc/Xprt.man.pre +++ /dev/null @@ -1,196 +0,0 @@ -.\" -*- coding: us-ascii -*- -.TH Xprt __appmansuffix__ "25 November 2004" -.SH NAME -Xprt \- Print server for X Version 11 -.SH SYNOPSIS -.ad l -\fBXprt\fR \kx -.if (\nxu > (\n(.lu / 2)) .nr x (\n(.lu / 5) -'in \n(.iu+\nxu -[\fB\-ac\fR] [\fB\-audit \fBlevel\fR\fR] [\fB\-pn\fR] [\fB\-fp \fBfontpath\fR\fR] [\fB\-XpFile \fBfile\fR\fR] [\fB\-XpSpoolerType \fBspoolername\fR\fR] [\fB:\fBdisplay\fR\fR] -'in \n(.iu-\nxu -.ad b -.SH DESCRIPTION -Xprt is the Xprint print server -for version 11 of the X Window system for non display devices -such as printers and fax machines. -.PP -Xprint is an advanced printing system which enables X11 -applications to use devices like printers, FAX or create -documents in formats like PostScript, PCL or PDF. It may be used by -clients such as mozilla. -.PP -Xprint is a very flexible, extensible, scalable, client/server -print system based on ISO 10175 (and some other specs) and the X11 -rendering protocol. -Using Xprint an application can search, query and use devices like -printers, FAX machines or create documents in formats like PDF. -In particular, an application can seek a printer, query supported -attributes (like paper size, trays, fonts etc.), configure the printer -device to match it's needs and print on it like on any other X device -reusing parts of the code which is used for the video card Xserver. -.SH USAGE -Although Xprt may be invoked from the command line, it is -preferable to run it as a daemon via the init script -\fB/etc/init.d/xprint\fR (where this script exists). -.PP -Client programs such as mozilla will require environment -variable \fB${XPSERVERLIST}\fR to be set, identifying the -"display" on which Xprt is running. This variable may be set -for all users via \fB/etc/profile\fR (or similar), using -\fB/etc/init.d/xprint get_xpserverlist\fR: - -.nf -export XPSERVERLIST=`/etc/init.d/xprint get_xpserverlist` -.fi - -.SH OPTIONS -Many of Xprt's command line options are shared in common -with the usual X servers (see \fBXserver\fR(__appmansuffix__)). -Commonly used options include: -.TP -\fB:\fIdisplay\fB\fR -The X server runs on the given display. If multiple X -servers are to run simultaneously on a host, each must -have a unique display number. Note that the standard X -server (for video displays) typically runs on display -:0. If \fB/etc/init.d/xprint\fR is used -to invoke Xprt, it may be configured to automatically assign an available -display number. -.TP -\fB\-ac\fR -disables host-based access control mechanisms. Enables access -by any host, and permits any host to modify the access control -list. Use with extreme caution. This option exists primarily -for running test suites remotely. -.TP -\fB\-audit \fIlevel\fB\fR -sets the audit trail level. The default level is 1, meaning -only connection rejections are reported. Level 2 additionally -reports all successful connections and disconnects. Level 4 -enables messages from the SECURITY extension, if present, -including generation and revocation of authorizations and -violations of the security policy. Level 0 turns off the audit -trail. Audit lines are sent as standard error output. -.TP -\fB\-fp \fIfontpath\fB\fR -sets the search path for fonts. This path is a comma -separated list of directories which Xprt searches for -font databases. -.TP -\fB\-pn\fR -permits the server to continue running if it fails to -establish all of its well-known sockets (connection -points for clients), but establishes at least -one. -.TP -\fB\-XpFile \fIfile\fB\fR -Sets an alternate Xprinters file (see section FILES). -.TP -\fB\-XpSpoolerType \fIspoolername\fB\fR -Defines the spooler system to be used for print job spooling. -Supported values in xprint.mozdev.org release 009 are: - -aix - -aix4 - -bsd - -osf - -solaris - -sysv - -uxp - -cups - -lprng - -other - -none - -(multiple values can be specified, separated by ':', the first active spooler will be chosen). -The default value is platform-specific and can be obtained via - -.nf -Xprt \-h -.fi - -\&. -.SH ENVIRONMENT -The following environment variables are recognized by the X print server -(environment variables recognized by Xprint clients are described in -\fBXprint\fR(__miscmansuffix__)): -.TP -\fB${XPCONFIGDIR}\fR -This environment variable points to the root -of the Xprint server configuration directory hierarchy. -If the variable is not defined, the default -path is be assumed. The default path may be -\fB/usr/X11R6/lib/X11/xserver/\fR, -\fB/usr/lib/X11/xserver/\fR, -\fB/usr/share/Xprint/xserver/\fR or -\fB/usr/openwin/server/etc/XpConfig\fR, depending on the -system, and may be configured in \fB/etc/init.d/xprint\fR. -.TP -\fB${LANG}\fR -This environment variable selects the locale settings used by the Xprint server. -Xprt allows language-specific settings (stored in \fB${XPCONFIGDIR}/${LANG}/print/\fR) -which will override the default settings (stored in \fB${XPCONFIGDIR}/C/print/\fR). -If \fB${LANG}\fR is not set "C" is assumed. -.PP -.SH FILES -.TP -\fB${XPCONFIGDIR}/${LANG}/print/Xprinters\fR, \fB${XPCONFIGDIR}/C/print/Xprinters\fR -`Xprinters' is the top most configuration file. It tells -Xprt which specific printer names (e.g. mylaser) should -be supported, and whether \fBlpstat\fR(1) or other commands -should be used to automatically supplement the list of -printers. -.TP -\fB${XPCONFIGDIR}/${LANG}/print/attributes/printer\fR, \fB${XPCONFIGDIR}/C/print/attributes/printer\fR -The `printer' file maps printer names to model -configurations (see `model-config' below). For example, -"mylaser" could be mapped to a "HPDJ1600C", and all other -arbitrary printers could be mapped to a default, such as -"HPLJ4SI". When depending on \fBlpstat\fR(1) in the Xprinters -file, setting up defaults in `printer' becomes all the -more important. -.TP -\fB${XPCONFIGDIR}/${LANG}/print/attributes/document\fR, \fB${XPCONFIGDIR}/C/print/attributes/document\fR -The `document' file specifies the initial document values -for any print jobs. For example, which paper tray to -use, what default resolution, etc. -.TP -\fB${XPCONFIGDIR}/${LANG}/print/attributes/job\fR, \fB${XPCONFIGDIR}/C/print/attributes/job\fR -The `job' file specifies the initial job values for any -print jobs. For example, "notification-profile" can be -set so that when a print job is successfully sent to a -printer, e-mail is sent to the user. -.TP -\fB${XPCONFIGDIR}/C/print/models/PSdefault/model\-config\fR, \fB${XPCONFIGDIR}/C/print/models/PSdefault/fonts/fonts.dir\fR, \fB${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00051.pmf\fR, \fB${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00093.pmf\fR -The `model-config' file has attributes that describe the -printer model's capabilities and default settings. -Printer model fonts may also be present. The model-config -file also identifies the print ddx driver to be used. -For each printer model supported, a complete hierarchy of -files should exist. In most cases, these files do not -need to be modified. -.TP -\fB${XPCONFIGDIR}/C/print/ddx\-config/raster/pdf\fR, \fB${XPCONFIGDIR}/C/print/ddx\-config/raster/pcl\fR, \fB${XPCONFIGDIR}/C/print/ddx\-config/raster/postscript\fR -The print ddx drivers can have highly specific -configuration files to control their behavior. In most -cases, these files do not need to be modified. -.SH "SEE ALSO" -\fBXprint\fR(__miscmansuffix__), \fBX11\fR(__miscmansuffix__), \fBxplsprinters\fR(__appmansuffix__), \fBxprehashprinterlist\fR(__appmansuffix__), \fBxphelloworld\fR(__appmansuffix__), \fBxpxmhelloworld\fR(__appmansuffix__), \fBxpawhelloworld\fR(__appmansuffix__), \fBxpxthelloworld\fR(__appmansuffix__), \fBxpsimplehelloworld\fR(__appmansuffix__), \fBXserver\fR(__appmansuffix__), \fBlibXp\fR(__libmansuffix__), \fBlibXprintUtils\fR(__libmansuffix__), \fBlibXprintAppUtils\fR(__libmansuffix__), \fBXmPrintShell\fR(__libmansuffix__), \fBXawPrintShell\fR(__libmansuffix__), Xprint FAQ (http://xprint.mozdev.org/docs/Xprint_FAQ.html), Xprint main site (http://xprint.mozdev.org/) -.SH AUTHORS -This manual page was written by -Drew Parsons and -Roland Mainz , -with some help from the man page at -http://www.sins.com.au/unix/manpages/Xprt.html and the XFree86 -man page for \fBXserver\fR(1). diff --git a/hw/xprint/doc/Xprt.sgml b/hw/xprint/doc/Xprt.sgml deleted file mode 100644 index a62499263..000000000 --- a/hw/xprint/doc/Xprt.sgml +++ /dev/null @@ -1,371 +0,0 @@ - - - - - - - Xprt - __appmansuffix__ - - - Xprt - - Print server for X Version 11 - - - - Xprt - - - - - - - - - - - - - - - - - - - DESCRIPTION - - Xprt is the Xprint print server - for version 11 of the X Window system for non display devices - such as printers and fax machines. - - Xprint is an advanced printing system which enables X11 - applications to use devices like printers, FAX or create - documents in formats like PostScript, PCL or PDF. It may be used by - clients such as mozilla. - - - Xprint is a very flexible, extensible, scalable, client/server - print system based on ISO 10175 (and some other specs) and the X11 - rendering protocol. - Using Xprint an application can search, query and use devices like - printers, FAX machines or create documents in formats like PDF. - In particular, an application can seek a printer, query supported - attributes (like paper size, trays, fonts etc.), configure the printer - device to match it's needs and print on it like on any other X device - reusing parts of the code which is used for the video card Xserver. - - - - - USAGE - - - Although Xprt may be invoked from the command line, it is - preferable to run it as a daemon via the init script - /etc/init.d/xprint (where this script exists). - - - Client programs such as mozilla will require environment - variable ${XPSERVERLIST} to be set, identifying the - "display" on which Xprt is running. This variable may be set - for all users via /etc/profile (or similar), using - /etc/init.d/xprint get_xpserverlist: - - export XPSERVERLIST=`/etc/init.d/xprint get_xpserverlist` - - - - - - OPTIONS - - Many of Xprt's command line options are shared in common - with the usual X servers (see Xserver__appmansuffix__). - Commonly used options include: - - - - - - - The X server runs on the given display. If multiple X - servers are to run simultaneously on a host, each must - have a unique display number. Note that the standard X - server (for video displays) typically runs on display - :0. If /etc/init.d/xprint is used - to invoke Xprt, it may be configured to automatically assign an available - display number. - - - - - - - disables host-based access control mechanisms. Enables access - by any host, and permits any host to modify the access control - list. Use with extreme caution. This option exists primarily - for running test suites remotely. - - - - - - - sets the audit trail level. The default level is 1, meaning - only connection rejections are reported. Level 2 additionally - reports all successful connections and disconnects. Level 4 - enables messages from the SECURITY extension, if present, - including generation and revocation of authorizations and - violations of the security policy. Level 0 turns off the audit - trail. Audit lines are sent as standard error output. - - - - - - - sets the search path for fonts. This path is a comma - separated list of directories which Xprt searches for - font databases. - - - - - - - permits the server to continue running if it fails to - establish all of its well-known sockets (connection - points for clients), but establishes at least - one. - - - - - - - - Sets an alternate Xprinters file (see section FILES). - - - - - - - - Defines the spooler system to be used for print job spooling. - Supported values in xprint.mozdev.org release 009 are: - - aix - aix4 - bsd - osf - solaris - sysv - uxp - cups - lprng - other - none - - (multiple values can be specified, separated by ':', the first active spooler will be chosen). - The default value is platform-specific and can be obtained via - Xprt -h. - - - - - - - - ENVIRONMENT - - The following environment variables are recognized by the X print server - (environment variables recognized by Xprint clients are described in - Xprint__miscmansuffix__): - - - - ${XPCONFIGDIR} - - This environment variable points to the root - of the Xprint server configuration directory hierarchy. - If the variable is not defined, the default - path is be assumed. The default path may be - /usr/X11R6/lib/X11/xserver/, - /usr/lib/X11/xserver/, - /usr/share/Xprint/xserver/ or - /usr/openwin/server/etc/XpConfig, depending on the - system, and may be configured in /etc/init.d/xprint. - - - - - ${LANG} - - - This environment variable selects the locale settings used by the Xprint server. - Xprt allows language-specific settings (stored in ${XPCONFIGDIR}/${LANG}/print/) - which will override the default settings (stored in ${XPCONFIGDIR}/C/print/). - If ${LANG} is not set "C" is assumed. - - - - - - - - - FILES - - - - ${XPCONFIGDIR}/${LANG}/print/Xprinters - ${XPCONFIGDIR}/C/print/Xprinters - - - `Xprinters' is the top most configuration file. It tells - Xprt which specific printer names (e.g. mylaser) should - be supported, and whether lpstat1 or other commands - should be used to automatically supplement the list of - printers. - - - - - - ${XPCONFIGDIR}/${LANG}/print/attributes/printer - ${XPCONFIGDIR}/C/print/attributes/printer - - - The `printer' file maps printer names to model - configurations (see `model-config' below). For example, - "mylaser" could be mapped to a "HPDJ1600C", and all other - arbitrary printers could be mapped to a default, such as - "HPLJ4SI". When depending on lpstat1 in the Xprinters - file, setting up defaults in `printer' becomes all the - more important. - - - - - - ${XPCONFIGDIR}/${LANG}/print/attributes/document - ${XPCONFIGDIR}/C/print/attributes/document - - - The `document' file specifies the initial document values - for any print jobs. For example, which paper tray to - use, what default resolution, etc. - - - - - - ${XPCONFIGDIR}/${LANG}/print/attributes/job - ${XPCONFIGDIR}/C/print/attributes/job - - - The `job' file specifies the initial job values for any - print jobs. For example, "notification-profile" can be - set so that when a print job is successfully sent to a - printer, e-mail is sent to the user. - - - - - - ${XPCONFIGDIR}/C/print/models/PSdefault/model-config - ${XPCONFIGDIR}/C/print/models/PSdefault/fonts/fonts.dir - ${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00051.pmf - ${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00093.pmf - - - - The `model-config' file has attributes that describe the - printer model's capabilities and default settings. - Printer model fonts may also be present. The model-config - file also identifies the print ddx driver to be used. - - For each printer model supported, a complete hierarchy of - files should exist. In most cases, these files do not - need to be modified. - - - - - - ${XPCONFIGDIR}/C/print/ddx-config/raster/pdf - ${XPCONFIGDIR}/C/print/ddx-config/raster/pcl - ${XPCONFIGDIR}/C/print/ddx-config/raster/postscript - - - - The print ddx drivers can have highly specific - configuration files to control their behavior. In most - cases, these files do not need to be modified. - - - - - - - - - SEE ALSO - - - - - - - Xprint__miscmansuffix__ - X11__miscmansuffix__ - xplsprinters__appmansuffix__ - xprehashprinterlist__appmansuffix__ - xphelloworld__appmansuffix__ - xpxmhelloworld__appmansuffix__ - xpawhelloworld__appmansuffix__ - xpxthelloworld__appmansuffix__ - xpsimplehelloworld__appmansuffix__ - Xserver__appmansuffix__ - - - libXp__libmansuffix__ - libXprintUtils__libmansuffix__ - libXprintAppUtils__libmansuffix__ - XmPrintShell__libmansuffix__ - XawPrintShell__libmansuffix__ - Xprint FAQ (http://xprint.mozdev.org/docs/Xprint_FAQ.html) - Xprint main site (http://xprint.mozdev.org/) - - - - - - AUTHORS - - This manual page was written by - Drew Parsons dparsons@debian.org and - Roland Mainz roland.mainz@nrubsig.org, - with some help from the man page at - http://www.sins.com.au/unix/manpages/Xprt.html and the XFree86 - man page for Xserver1. - - - - - - diff --git a/hw/xprint/etc/Makefile.am b/hw/xprint/etc/Makefile.am deleted file mode 100644 index 0a960cd1b..000000000 --- a/hw/xprint/etc/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = init.d profile.d Xsession.d diff --git a/hw/xprint/etc/Xsession.d/92xprint-xpserverlist b/hw/xprint/etc/Xsession.d/92xprint-xpserverlist deleted file mode 100644 index 60d964a34..000000000 --- a/hw/xprint/etc/Xsession.d/92xprint-xpserverlist +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -##################################################################### -### File: 92xprint-xpserverlist -### -### Default Location: /etc/X11/Xsession.d/ -### -### Purpose: Setup Xprint env vars -### -### Description: This script is invoked by means of the Xsession file -### at user login. -### -### Invoked by: /etc/X11/Xsession -### -### (c) Copyright 2003-2004 Roland Mainz -### -### please send bugfixes or comments to https://bugs.freedesktop.org -### -##################################################################### - - -# -# Obtain list of Xprint servers -# - -if [ -x "/etc/init.d/xprint" ] ; then - XPSERVERLIST="`/etc/init.d/xprint get_xpserverlist`" - export XPSERVERLIST -fi - -########################## eof ##################### diff --git a/hw/xprint/etc/Xsession.d/Makefile.am b/hw/xprint/etc/Xsession.d/Makefile.am deleted file mode 100644 index 96a5ee73b..000000000 --- a/hw/xprint/etc/Xsession.d/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -xpcdir = $(sysconfdir)/X11/Xsession.d -dist_xpc_DATA = 92xprint-xpserverlist diff --git a/hw/xprint/etc/init.d/Makefile.am b/hw/xprint/etc/init.d/Makefile.am deleted file mode 100644 index 0cf1adc92..000000000 --- a/hw/xprint/etc/init.d/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -include $(top_srcdir)/cpprules.in - -noinst_PRE = xprint -BUILT_SOURCES = $(noinst_PRE) -CLEANFILES = $(noinst_PRE) xprint.pre - -CPP_FILES_FLAGS = -DProjectRoot='"$(PROJECTROOT)"' -DOS_LINUX - -xprint.pre: xprint.cpp - $(SED) -e 's/^\(\s\+\)#/\1XCOMM/' ${srcdir}/xprint.cpp > $@ - -EXTRA_DIST = xprint.cpp diff --git a/hw/xprint/etc/init.d/xprint.cpp b/hw/xprint/etc/init.d/xprint.cpp deleted file mode 100644 index dbfd1e139..000000000 --- a/hw/xprint/etc/init.d/xprint.cpp +++ /dev/null @@ -1,1277 +0,0 @@ -XCOMM!/bin/sh -XCOMM -XCOMM Copyright 2002-2004 by Roland Mainz . -XCOMM -XCOMM This script manages the Xprint server side - -XCOMM Basic support for IRIX-style "chkconfig" -XCOMM chkconfig: 2345 61 61 -XCOMM description: Startup/shutdown script for Xprint server(s) - -XCOMM Basic support for the Linux Standard Base Specification 1.0.0 -XCOMM (Note: The Should-Start/Stop lines are there so that this works in the -XCOMM future, when the LSB adopts these. The X-UnitedLinux lines are there -XCOMM so that it works right now.) -XCOMM## BEGIN INIT INFO -XCOMM Provides: xprint -XCOMM Required-Start: $local_fs $remote_fs $syslog $network -XCOMM Required-Stop: $local_fs $remote_fs $syslog -XCOMM Should-Start: cups lpd xfs -XCOMM Should-Stop: cups lpd xfs -XCOMM X-UnitedLinux-Should-Start: cups lpd xfs -XCOMM X-UnitedLinux-Should-Stop: cups lpd xfs -XCOMM Default-Start: 3 5 -XCOMM Default-Stop: 0 1 2 6 -XCOMM Description: Startup/shutdown script for Xprint server(s) -XCOMM## END INIT INFO - -#undef sun -#undef unix - -XCOMM########################################################################### -XCOMM -XCOMM This script has three main tasks: -XCOMM 1. Start Xprint servers ("Xprt") at boot time. -XCOMM 2. Shutdown Xprint servers when the machine is being shut down. -XCOMM 3. Query the list of available printers. -XCOMM -XCOMM Additional tasks are: -XCOMM 4. Restart ('restart'|'force-reload') and conditional restart -XCOMM ('condrestart'/'try-restart') for Linux support -XCOMM 5. Wrapping of application call with setting XPSERVERLIST ('wrapper') -XCOMM -XCOMM Usage: -XCOMM - Start Xprint server(s) manually: -XCOMM % /etc/init.d/xprint start -XCOMM -XCOMM - Stop Xprint server(s) manually: -XCOMM % /etc/init.d/xprint stop -XCOMM -XCOMM - Populate $XPSERVERLIST env var (for example as part of a global -XCOMM login script like /etc/profile or per-user login scripts like -XCOMM $HOME/.profile (sh/ksh/bash)) -XCOMM % XPSERVERLIST="`/etc/init.d/xprint get_xpserverlist`" -XCOMM % export XPSERVERLIST -XCOMM -XCOMM Installation: -XCOMM Copy this script to /etc/init.d/xprint and make sure that it is -XCOMM executable. If your installation is LSB-compliant, then run -XCOMM % /usr/lib/lsb/install_initd /etc/init.d/xprint -XCOMM to start the service on startup. Otherwise, manually create links -XCOMM to the matching run levels. -XCOMM Examples: -XCOMM - Solaris 2.7/2.8/2.9: -XCOMM % cp xprint /etc/init.d/xprint -XCOMM % chmod a+rx /etc/init.d/xprint -XCOMM % ln /etc/init.d/xprint /etc/rc0.d/K38xprint -XCOMM % ln /etc/init.d/xprint /etc/rc1.d/K38xprint -XCOMM % ln /etc/init.d/xprint /etc/rc2.d/S81xprint -XCOMM % ln /etc/init.d/xprint /etc/rcS.d/K38xprint -XCOMM -XCOMM - SuSE Linux 7.3 -XCOMM % cp xprint /etc/init.d/xprint -XCOMM % chmod a+rx /etc/init.d/xprint -XCOMM % ln -s ../xprint /etc/init.d/rc3.d/K13xprint -XCOMM % ln -s ../xprint /etc/init.d/rc3.d/S12xprint -XCOMM % ln -s ../xprint /etc/init.d/rc5.d/K13xprint -XCOMM % ln -s ../xprint /etc/init.d/rc5.d/S12xprint -XCOMM % ln -s ../xprint /etc/init.d/rc2.d/K13xprint -XCOMM % ln -s ../xprint /etc/init.d/rc2.d/S12xprint -XCOMM -XCOMM - SuSE Linux 6.4: -XCOMM % cp xprint /sbin/init.d/xprint -XCOMM % chmod a+rx /sbin/init.d/xprint -XCOMM % ln -s ../xprint /sbin/init.d/rc2.d/K20xprint -XCOMM % ln -s ../xprint /sbin/init.d/rc2.d/S20xprint -XCOMM % ln -s ../xprint /sbin/init.d/rc3.d/K20xprint -XCOMM % ln -s ../xprint /sbin/init.d/rc3.d/S20xprint -XCOMM -XCOMM Notes: -XCOMM - The Xprint servers must be started _after_ the print -XCOMM spooler or the server(s) may refuse to start -XCOMM - The script should be readable by all users to ensure that they -XCOMM can use the "get_xpserverlist"-option -XCOMM -XCOMM Custom configuration: -XCOMM - Edit the function setup_config() in this script to match your needs -XCOMM -XCOMM Known bugs/ToDo/Notes: -XCOMM - The shell script assumes that a Xserver can be reached via -XCOMM "hostname:displaynum" where "hostname" is obtained from -XCOMM "/usr/bin/hostname". It may happen that a kernel firewall -XCOMM blocks an X connection on the same host (e.g. client && Xserver -XCOMM are running on the same host). -XCOMM Suggested fix: Fix the firewall config. -XCOMM Suggested workaround: Edit this script and replace the use of -XCOMM /usr/bin/hostname with "echo 'localhost'". -XCOMM -XCOMM########################################################################### -XCOMM - - -XCOMM########################################################################### - -fatal_error() -{ - echo "${0}: ## FATAL ERROR: ${1}" 1>&2 - exit 1 -} - -error_echo() -{ - echo "${0}: ## ERROR: ${1}" 1>&2 -} - -warning_echo() -{ - echo "${0}: ## WARNING: ${1}" 1>&2 -} - -verbose_echo() -{ - echo "${0}: ${1}" -} - -msg() -{ - echo "${1}" -} - -XCOMM########################################################################### - -#ifndef OS_LINUX -XCOMM Force use of a POSIX conformant sh -XCOMM (Solaris /sbin/sh is plain Bourne shell) -[ "$1" != "posix_sh_forced" -a -x /bin/ksh ] && exec /bin/ksh "$0" posix_sh_forced "$@" -[ "$1" != "posix_sh_forced" -a -x /bin/bash ] && exec /bin/bash --norc --noprofile "$0" posix_sh_forced "$@" -[ "$1" != "posix_sh_forced" -a -x /usr/local/bin/ksh ] && exec /usr/local/bin/ksh "$0" posix_sh_forced "$@" -[ "$1" != "posix_sh_forced" -a -x /usr/local/bin/bash ] && exec /usr/local/bin/bash --norc --noprofile "$0" posix_sh_forced "$@" -if [ "$1" != "posix_sh_forced" ] ; then - echo "${0}: ## FATAL ERROR: No POSIX-shell found." 1>&2 - exit 1 -fi - -shift # Drop "posix_sh_forced" -#endif /* !OS_LINUX */ - -XCOMM#debug -XCOMM set -x - -XCOMM Change current dir to a location which is writeable by everyone -cd /tmp - -XCOMM Clear some environment variables -unset TEMP TMPDIR SCREENDIR - -XCOMM Set search path for commands -export PATH=/usr/bin:/bin:/usr/sbin:/sbin -#ifdef OS_SOLARIS -export PATH=/usr/xpg4/bin:${PATH} -#endif - -XCOMM# Try to figure-out where X11 was installed -#if defined(OS_SOLARIS) -XPROJECTROOT=/usr/openwin -export OPENWINHOME=/usr/openwin -#elif defined(OS_AIX) -XPROJECTROOT=/usr/lpp/X11 -#else -#if defined(ProjectRoot) -[ -d ProjectRoot/bin ] && XPROJECTROOT=ProjectRoot -#endif -[ -d /usr/X11/bin ] && XPROJECTROOT=/usr/X11 -[ -d /usr/X11R6/bin ] && XPROJECTROOT=/usr/X11R6 -#endif -XPCUSTOMGLUE=DEF_XPCUSTOMGLUE # This is used for customizing this script -export XPROJECTROOT XPCUSTOMGLUE - -if [ -z "${XPROJECTROOT}" ] ; then - fatal_error "Unknown XProjectRoot." -fi - -XCOMM Set the location of the Xprt binary we want to use. -XPRT_BIN="${XPROJECTROOT}/bin/Xprt" - -XCOMM Set the location of the global file where we store the locations -XCOMM of the system-wide servers -if [ -d /var/run ] ; then - XP_GLOBAL_SERVERS=/var/run/Xprint_servers -else - XP_GLOBAL_SERVERS=/tmp/.Xprint_servers -fi - -XCOMM ${LOGNAME} will not work if user su'ed into another account -export CURRLOGNAME="$(id -u -n)" - -XCOMM Set location where we want to store the list of Xprint servers managed -XCOMM by this user -XCOMM - If we start as "root" use the global file -XCOMM - If we start as normal user use a per-user file - -if [ "${CURRLOGNAME}" != "root" -a "${CURRLOGNAME}" != "" ] ; then - XP_PER_USER_SERVERS="/tmp/.Xprint_servers_${CURRLOGNAME}" - XP_SERVERS="${XP_PER_USER_SERVERS}" -else - XP_SERVERS="${XP_GLOBAL_SERVERS}" -fi - -XCOMM Set umask that owner can r/w all files and everyone else can read them -umask 022 - -XCOMM Bump limit for per-process open files to ensure that Xprt can open many many fonts -ulimit -n 1024 - -XCOMM########################################################################### - -XCOMM Get list of fonts for a given display -get_fontlist_from_display() -{ - ${XPROJECTROOT}/bin/xset -display "${1}" q | - awk "/Font Path:/ { i=1 ; next } i==1 { print \$0 ; i=0 }" | - fontpath2fontlist -} - -XCOMM Get list from a fontserver config -get_fontlist_from_xfs_config() -{ - if [ ! -r "${1}" ] ; then - return 0 - fi - - ( - cat "${1}" | - while read -r i ; do - for val in $i; do - case $val in - \#*) break ;; - ?*=*) key="${val%%=*}" ;; - =*) key="${tok}" ;; - *) [ "${key}" = "catalogue" -a "${tok}" != "" ] && echo "${tok}" ;; - esac - tok="${val#*=}" - done - done - ) | tr "," "\n" | fontpath2fontlist -} - -get_fontlist_from_all_xfs_configs() -{ - get_fontlist_from_xfs_config "/etc/openwin/fs/fontserver.cfg" - get_fontlist_from_xfs_config "/usr/openwin/lib/X11/fontserver.cfg" - get_fontlist_from_xfs_config "/etc/X11/fs-xtt/config" - get_fontlist_from_xfs_config "/etc/X11/fs/config" - get_fontlist_from_xfs_config "/etc/X11/xfs/config" - get_fontlist_from_xfs_config "${XPROJECTROOT}/lib/X11/fs/config" -} - -get_fontlist_from_xf86config() -{ - srcxconf="" - - XCOMM see xorg.conf(5x) manual page for the list of locations used here - [ "${srcxconf}" = "" -a -f "/etc/X11/xorg.conf" ] && srcxconf="/etc/X11/xorg.conf" - [ "${srcxconf}" = "" -a -f "/usr/X11R6/etc/X11/xorg.conf" ] && srcxconf="/usr/X11R6/etc/X11/xorg.conf" - [ "${srcxconf}" = "" -a -f "/etc/X11/xorg.conf-4" ] && srcxconf="/etc/X11/xorg.conf-4" - [ "${srcxconf}" = "" -a -f "/etc/X11/xorg.conf" ] && srcxconf="/etc/X11/xorg.conf" - [ "${srcxconf}" = "" -a -f "/etc/xorg.conf" ] && srcxconf="/etc/xorg.conf" - [ "${srcxconf}" = "" -a -f "/usr/X11R6/etc/X11/xorg.conf.${hostname}" ] && srcxconf="/usr/X11R6/etc/X11/xorg.conf.${hostname}" - [ "${srcxconf}" = "" -a -f "/usr/X11R6/etc/X11/xorg.conf-4" ] && srcxconf="/usr/X11R6/etc/X11/xorg.conf-4" - [ "${srcxconf}" = "" -a -f "/usr/X11R6/etc/X11/xorg.conf" ] && srcxconf="/usr/X11R6/etc/X11/xorg.conf" - [ "${srcxconf}" = "" -a -f "/usr/X11R6/lib/X11/xorg.conf.${hostname}" ] && srcxconf="/usr/X11R6/lib/X11/xorg.conf.${hostname}" - [ "${srcxconf}" = "" -a -f "/usr/X11R6/lib/X11/xorg.conf-4" ] && srcxconf="/usr/X11R6/lib/X11/xorg.conf-4" - [ "${srcxconf}" = "" -a -f "/usr/X11R6/lib/X11/xorg.conf" ] && srcxconf="/usr/X11R6/lib/X11/xorg.conf" - - XCOMM Xfree86 locations - [ "${srcxconf}" = "" -a -f "/etc/X11/XF86Config-4" ] && srcxconf="/etc/X11/XF86Config-4" - [ "${srcxconf}" = "" -a -f "/etc/X11/XF86Config" ] && srcxconf="/etc/X11/XF86Config" - - - if [ "${srcxconf}" = "" ] ; then - return 0 - fi - - currsection="" - cat "${srcxconf}" | - while read i1 i2 i3 i4 ; do - # Strip "\"" from I2 - i2="${i2#\"}" ; i2="${i2%\"}" - - case "${i1}" in - \#*) - continue - ;; - 'Section') - currsection="${i2}" - ;; - 'EndSection') - currsection="" - ;; - 'FontPath') - [ "$currsection" = "Files" ] && echo "${i2%:unscaled}" - ;; - esac - done | egrep -v -i "tcp/|tcp4/|tcp6/|unix/" - - return 0 -} - -get_fontlist_from_defoma() -{ - # Include Debian defoma font directory where relevant - if [ -d "/var/lib/defoma/x-ttcidfont-conf.d/dirs" ] ; then - find "/var/lib/defoma/x-ttcidfont-conf.d/dirs" -name fonts.dir | - while read i ; do echo "${i%/fonts.dir}" ; done - fi -} - -XCOMM Get list of system fonts -get_system_fontlist() -{ -#if defined(OS_SOLARIS) - ## List the standard X11 fonts - # echo "${XPROJECTROOT}/lib/X11/fonts/F3/" - # echo "${XPROJECTROOT}/lib/X11/fonts/F3bitmaps/" - echo "${XPROJECTROOT}/lib/X11/fonts/Type1/" - echo "${XPROJECTROOT}/lib/X11/fonts/Type1/outline/" - # We cannot use /usr/openwin/lib/X11/fonts/Type1/sun/ - see - # http://xprint.mozdev.org/bugs/show_bug.cgi?id=5726 - # ("Xprint doesn't start under Solaris 2.9 due *.ps files in /usr/openwin/lib/X11/fonts/Type1/sun/fonts.dir") - #echo "${XPROJECTROOT}/lib/X11/fonts/Type1/sun/" - echo "${XPROJECTROOT}/lib/X11/fonts/TrueType/" - echo "${XPROJECTROOT}/lib/X11/fonts/Speedo/" - echo "${XPROJECTROOT}/lib/X11/fonts/misc/" - echo "${XPROJECTROOT}/lib/X11/fonts/75dpi/" - echo "${XPROJECTROOT}/lib/X11/fonts/100dpi/" - - ## List all fonts in all locales installed on this machine - cat /usr/openwin/lib/locale/''*/OWfontpath | tr "," "\n" | sort -u -#elif defined(OS_LINUX) - ( - get_fontlist_from_defoma - - get_fontlist_from_xf86config - - # Getting font paths from XFS is mainly required for compatibilty to RedHat - get_fontlist_from_all_xfs_configs - - ## List all fonts in all locales installed on this machine - ( - [ -d "/usr/share/fonts" ] && find /usr/share/fonts -name fonts.dir - find "${XPROJECTROOT}/lib/X11/fonts" -name fonts.dir - ) | - while read i ; do echo "${i%/fonts.dir}" ; done - ) | sort -u -#else - ## List the standard X11 fonts - # (AIX should be handled like Solaris but I did not found a way to - # enumerate all fonts in all installed locales without scanning the - # dirs manually) - echo "${XPROJECTROOT}/lib/X11/fonts/Type1/" - echo "${XPROJECTROOT}/lib/X11/fonts/TrueType/" - echo "${XPROJECTROOT}/lib/X11/fonts/TTF/" - echo "${XPROJECTROOT}/lib/X11/fonts/Speedo/" - echo "${XPROJECTROOT}/lib/X11/fonts/misc/" - echo "${XPROJECTROOT}/lib/X11/fonts/75dpi/" - echo "${XPROJECTROOT}/lib/X11/fonts/100dpi/" - echo "${XPROJECTROOT}/lib/X11/fonts/" -#endif -} - -XCOMM Filter fonts per given extended regular expressions -XCOMM (and make sure we filter any model-config fonts - they are managed by Xprt internally) -filter_fontlist() -{ - egrep -- "${1}" | fgrep -v "/models/" | egrep -v -- "${2}" -} - -XCOMM Filter font paths with unsupported font types -XCOMM (such as CID fonts) -filter_unsupported_fonts() -{ - egrep -v -i "/cid(/$|$)|/csl(/$|$)" -} - -XCOMM Validate fontpath -XCOMM Only return valid font path entries (note that these entries may -XCOMM include non-file stuff like font server references) -validate_fontlist() -{ - while read i ; do - case "${i}" in - # Check if font path entry is a font server... - tcp/''*|tcp4/''*|tcp6/''*|unix/''*) - echo "${i}" - ;; - # ... if not check if the path is accessible - # and has a valid "fonts.dir" index - *) - [ -f "${i}/fonts.dir" ] && echo "${i}" - ;; - esac - done -} - -XCOMM Build a comma-seperated list of fonts (font path) from a list of fonts -fontlist2fontpath() -{ - fp="" - read fp; - while read i ; do - fp="${fp},${i}" - done - - echo "$fp" -} - -XCOMM Build a list (one item per line) of fonts from a font path -fontpath2fontlist() -{ - while read i ; do - echo "${i}" | tr "," "\n" - done -} - -XCOMM Sort scaleable fonts (PS Type1 and TrueType) first in a font list -sort_scaleable_fonts_first() -{ - i="$(fontlist2fontpath)" - # First list PS Type1 fonts... - echo "${i}" | fontpath2fontlist | fgrep "/Type1" - # ... then TrueType fonts ... - echo "${i}" | fontpath2fontlist | egrep -i "/TrueType|/TT(/$|$)|/TTF(/$|$)" - # ... then all others - echo "${i}" | fontpath2fontlist | egrep -v -i "/Type1|/TrueType|/TT(/$|$)|/TTF(/$|$)" -} - -XCOMM Check if a X display is used by a Xserver or not -XCOMM Known bugs: -XCOMM - there is no way in plain bourne shell or bash (see comment about ksh93 -XCOMM below) to test if a Xserver sits only on a socket and not on a pipe -XCOMM - some Xserver's don't cleanup their stuff in /tmp on exit which may end -XCOMM in the problem that we don't detect possible free display numbers -XCOMM (one problem is that only ksh93 can do stuff like -XCOMM "cat "${lastdisplaynumreturned_store}" - return 0 - fi - done - - # Using "magic" value of 189 here due lack of a better solution - echo "189" - echo "189" >"${lastdisplaynumreturned_store}" - return 0 -} - -XCOMM Check if a process exists or not -pexists() -{ - [ "$1" = "" ] && return 1; - - # Use of /proc would be better but not all platforms (like AIX) have procfs - [ "$(ps -p $1 | fgrep $1)" != "" ] && return 0; - return 1 -} - -XCOMM Check if there is a spooler running... -is_spooler_running() -{ - # This covers Linux lpd, CUPS, Solaris and AIX 4.x - but what about - # AIX 5.x, HP-UX and IRIX ? - - [ "$(ps -A | egrep 'lpd|lpsched|cupsd|qdaemon' | fgrep -v 'grep')" != "" ] && return 0; - return 1 -} - -XCOMM Wait until the spooler system has been started (but not more than 30secs) -wait_for_print_spooler() -{ - for i in 1 2 3 4 5 6 7 8 9 10 ; do - is_spooler_running && return 0; - sleep 3 - done - - return 0 -} - -lock_server_registry() -{ - lock_counter=0 # counts in 1/100s - waiting_for_lock_msg_send="false" - while ! mkdir "${XP_SERVERS}.lock" 2>/dev/null ; do - # print notice after 2 seconds - if [ ${lock_counter} -gt 200 -a "${waiting_for_lock_msg_send}" != "true" ] ; then - echo "${0}: waiting for lock(=${XP_SERVERS}.lock)..." - waiting_for_lock_msg_send="true" - fi - - # tread the lock as "broken" after 20 seconds - if [ ${lock_counter} -gt 2000 ] ; then - echo "${0}: WARNING: lock timeout for lock(=${XP_SERVERS}.lock)." - return 0 - fi - - if [ -x /bin/usleep ] ; then - /bin/usleep 200000 - lock_counter=$((${lock_counter} + 20)) # 20/100s - else - sleep 1 - lock_counter=$((${lock_counter} + 100)) # 100/100s - fi - done -} - -unlock_server_registry() -{ - rmdir "${XP_SERVERS}.lock" -} - -XCOMM Kill dead registry locks (silently!) -kill_dead_registry_locks() -{ - rm -Rf "${XP_SERVERS}.lock" -} - -XCOMM Start Xprint servers -start_servers() -{ - # Write registry "intro" ... - lock_server_registry - echo "# Xprint server list" >>"${XP_SERVERS}" - echo "# File is for private use for ${0}." >>"${XP_SERVERS}" - echo "# Do not edit, rely on the content or file format." >>"${XP_SERVERS}" - unlock_server_registry - - hostname="$(hostname)" - - default_fontpath="$(get_system_fontlist | fontlist2fontpath)" - default_fontpath_acceptpattern=".*"; - default_fontpath_rejectpattern="_No_Match_"; # Match nothing - - curr=0 - while [ $curr -lt $num_xpstart ] ; do - if [ "${xpstart_remote_server[$curr]}" != "" ] ; then - # Remote Xprt, just put the entry into the registry - lock_server_registry - echo "display=${xpstart_remote_server[$curr]}" >>"${XP_SERVERS}" - unlock_server_registry - else - # Run block in seperate process to avoid that changes to the - # xpstart_* variables affect the next cycle - ( - # Use defaults if there are no special options - [ "${xpstart_fontpath[$curr]}" = "" ] && xpstart_fontpath[$curr]="${default_fontpath}"; - [ "${xpstart_fontpath_acceptpattern[$curr]}" = "" ] && xpstart_fontpath_acceptpattern[$curr]="$default_fontpath_acceptpattern"; - [ "${xpstart_fontpath_rejectpattern[$curr]}" = "" ] && xpstart_fontpath_rejectpattern[$curr]="$default_fontpath_rejectpattern"; - [ "${xpstart_displayid[$curr]}" = "" ] && xpstart_displayid[$curr]="$(FindFreeXDisplayNum)" - [ "${xpstart_logger[$curr]}" = "" ] && xpstart_logger[$curr]="logger -p lpr.notice -t Xprt_${xpstart_displayid[$curr]}"; - [ "${xpstart_logfile[$curr]}" = "" ] && xpstart_logfile[$curr]="/dev/null"; - [ "${xpstart_xprt_binary[$curr]}" = "" ] && xpstart_xprt_binary[$curr]="${XPRT_BIN}"; - if [ "${xpstart_xprt_binary[$curr]}" = "/usr/openwin/bin/Xprt" -o "$(uname -s)" = "SunOS" ] ; then - # Solaris /usr/openwin/bin/Xprt does not support "-nolisten tcp" - # yet nor is it possible to run a Xserver on a unix socket only - # in Solaris since access to the unix domain sockets in - # /tmp/.X11-pipe and /tmp/.X11-unix is restricted to applications - # with group-id "root" (e.g. the Xprt server would need to be - # setgid "root" that plain users can start it listening on a unix - # socket only) - [ "${xpstart_options[$curr]}" = "" ] && xpstart_options[$curr]="-ac -pn" - else - [ "${xpstart_options[$curr]}" = "" ] && xpstart_options[$curr]="-ac -pn -nolisten tcp" - fi - - # Check if the Xprt binary is available - if [ ! -x "${xpstart_xprt_binary[$curr]}" ] ; then - error_echo "Can't find \"${xpstart_xprt_binary[$curr]}\"." - exit 1 # exit block - fi - - # Verify and set location of font encodings directory file - if [ "${xpstart_font_encodings_dir[$curr]}" = "" ] ; then - if [ -f "${XPROJECTROOT}/lib/X11/fonts/xf86encodings/encodings.dir" ] ; then - xpstart_font_encodings_dir[$curr]="${XPROJECTROOT}/lib/X11/fonts/xf86encodings/encodings.dir" - else - xpstart_font_encodings_dir[$curr]="${XPROJECTROOT}/lib/X11/fonts/encodings/encodings.dir"; - fi - fi - - unset FONT_ENCODINGS_DIRECTORY - if [ ! -f "${xpstart_font_encodings_dir[$curr]}" ] ; then - warning_echo "Can't find \"${xpstart_font_encodings_dir[$curr]}\", TrueType font support may not work." - fi - - export FONT_ENCODINGS_DIRECTORY="${xpstart_font_encodings_dir[$curr]}" - - # Generate font path (containing only valid font path elements) - # from input font path and filter expressions - curr_fp=$(echo "${xpstart_fontpath[$curr]}" | - fontpath2fontlist | - filter_fontlist "${xpstart_fontpath_acceptpattern[$curr]}" "${xpstart_fontpath_rejectpattern[$curr]}" | - filter_unsupported_fonts | - sort_scaleable_fonts_first | - validate_fontlist | - fontlist2fontpath) - - # Set Xserver auditing level option - unset curr_audit - if [ "${xpstart_auditlevel[$curr]}" != "" ] ; then - curr_audit="-audit ${xpstart_auditlevel[$curr]}" - fi - - # Set Xprt -XpFile option - unset curr_xpfile - if [ "${xpstart_xpfile[$curr]}" != "" ] ; then - curr_xpfile="-XpFile ${xpstart_xpfile[$curr]}" - fi - - # Set custom XPCONFIGDIR (if there is one) - unset XPCONFIGDIR - if [ "${xpstart_xpconfigdir[$curr]}" != "" ] ; then - export XPCONFIGDIR="${xpstart_xpconfigdir[$curr]}" - fi - - # If someone uses "-nolisten tcp" make sure we do not add a hostname to force local transport - if [ "$(echo "${xpstart_options[$curr]}" | egrep "nolisten.*tcp")" != "" ] ; then - xp_display=":${xpstart_displayid[$curr]}" - else - xp_display="${hostname}:${xpstart_displayid[$curr]}" - fi - - ( - ( - "${xpstart_xprt_binary[$curr]}" \ - ${xpstart_options[$curr]} \ - ${curr_xpfile} ${curr_audit} \ - -fp ${curr_fp} \ - :${xpstart_displayid[$curr]} & - server_pid="$!" - - # Append the new server to the registry - lock_server_registry - echo "display=${xp_display} display_id=${xpstart_displayid[$curr]} pid=${server_pid}" >>"${XP_SERVERS}" - unlock_server_registry - - wait - echo "Xprint server pid=${server_pid} done, exitcode=$?." - - # Remove the dead server from the registry - # (only if the registry still exists - if /etc/init.d/xprint stop" gets called the registry - # will be removed - and we should not re-create it afterwards...) - lock_server_registry - if [ -f "${XP_SERVERS}" ] ; then - x="$(cat "${XP_SERVERS}")" # Store content of file "${XP_SERVERS}" in var "x" - echo "${x}" | fgrep -v "display_id=${xpstart_displayid[$curr]} pid=${server_pid}" >"${XP_SERVERS}" - fi - unlock_server_registry - ) 2>&1 | while read i ; do echo "$i" | tee -a "${xpstart_logfile[$curr]}" | ${xpstart_logger[$curr]} ; done - ) & - ) - fi - - curr=$(($curr + 1)) - done - - # Remove tmp. file created by |FindFreeXDisplayNum()| - rm -f "${lastdisplaynumreturned_store}" - - # Done. - lock_server_registry - echo "# EOF." >>"${XP_SERVERS}" - unlock_server_registry - return 0 -} - - -XCOMM Convenience function to check setup and start Xprt server(s) -do_start() -{ - if [ -f "${XP_SERVERS}" ] ; then - numservers="$(do_get_xpserverlist | wc -l)" - if [ ${numservers} -gt 0 ] ; then - verbose_echo "Xprint servers are already running." - return 0 - else - verbose_echo "Old server registry found, cleaning-up..." - do_stop - fi - fi - - # Check if we can write the registry file - touch "${XP_SERVERS}" 2>/dev/null - if [ ! -f "${XP_SERVERS}" ] ; then - error_echo "Cannot create \"${XP_SERVERS}\"." - # exit code 4 = user had insufficient privilege (LSB) - exit 4 - fi - - if ! setup_config ; then - error_echo "setup_config failed." - exit 1 - fi - - # Provide two paths here - one which simply starts the Xprt servers, - # assuming that there is a print spooler already running (or that - # ${XPCONFIG}/C/print/Xprinters provides static print queue entries - # (like for the PSspooldir print model)) and a 2nd path which - # explicitly checks if the print queue daemons are running - if true ; then - msg "Starting Xprint servers: Xprt." - start_servers - else - # Continue in the background if there is no spooler running yet (that - # we don't hold off the boot process nor run in a possible race-condition - # when /etc/init.d/lpd was not called yet but the runlevel script waits - # for us to finish first ... - if is_spooler_running ; then - msg "Starting Xprint servers: Xprt." - start_servers - else - msg "Starting Xprint servers (in the background): Xprt." - (wait_for_print_spooler ; start_servers) & - sleep 5 - fi - fi - - if [ "${CURRLOGNAME}" = "root" -a -d /var/lock/subsys/ ] ; then - touch /var/lock/subsys/xprint - fi -} - -XCOMM Convenience function to stop Xprt server(s) -do_stop() -{ - msg "Stopping Xprint servers: Xprt." - - lock_server_registry - if [ -f "${XP_SERVERS}" ] ; then - reglist="$(cat "${XP_SERVERS}")" - rm -f "${XP_SERVERS}" - fi - unlock_server_registry - - if [ "${reglist}" != "" ] ; then - echo "${reglist}" | - grep "^display=.*:.* pid=[0-9]*$" | - while read i ; do - ( - eval ${i} - if pexists ${pid} ; then - kill ${pid} - fi - - # Remove the X sockets/pipes which are not in use anymore - # (It would be better if the Xservers would cleanup this - # automatically, but most Xservers do not do that... ;-( - # Note that this will not work on Solaris where applications - # must run with groupid="root" if they want to write into - # /tmp/.X11-unix/ and/or /tmp/.X11-pipe/) - if [ "${display_id}" != "" ] ; then - rm -f "/tmp/.X${display_id}-lock" 2>/dev/null - rm -f "/tmp/.X11-unix/X${display_id}" 2>/dev/null - rm -f "/tmp/.X11-pipe/X${display_id}" 2>/dev/null - fi - ) - done - fi - - if [ "${CURRLOGNAME}" = "root" -a -d /var/lock/subsys/ ] ; then - rm -f /var/lock/subsys/xprint - fi - - # Remove any outstanding (dead) locks and cleanup - rm -f "${XP_SERVERS}" - kill_dead_registry_locks -} - -XCOMM Convenience function to obtain a list of available Xprint servers -do_get_xpserverlist() -{ - if [ -f "${XP_PER_USER_SERVERS}" -o -f "${XP_GLOBAL_SERVERS}" ] ; then - xpserverlist=$( - # Enumerate both per-user and global servers (in that order) - ( - [ -f "${XP_PER_USER_SERVERS}" ] && cat "${XP_PER_USER_SERVERS}" - [ -f "${XP_GLOBAL_SERVERS}" ] && cat "${XP_GLOBAL_SERVERS}" - ) | - egrep "^display=.*:.* pid=[0-9]*$|^display=.*:[0-9]*$" | - while read i ; do - ( - pid="none" - eval ${i} - # Check if the Xprt process exists (if possible) - if [ "$pid" != "none" ] ; then - if pexists ${pid} ; then - echo ${display} - fi - else - echo ${display} - fi - ) - done | tr "\n" " " - ) - # Only produce output if we have some entries... - [ "${xpserverlist}" != "" ] && echo "${xpserverlist}" - fi -} - -do_restart() -{ - msg "Restarting Xprint server(s): Xprt." - do_stop - sleep 1 - do_start -} - -do_diag() -{ - echo "##### Diag start $(date)." - - # General info - echo "## General info start." - ( - echo "PATH=\"${PATH}\"" - echo "TZ=\"${TZ}\"" - echo "LANG=\"${LANG}\"" - echo "uname -a=\"$(uname -a)\"" - echo "uname -s=\"$(uname -s)\"" - echo "uname -p=\"$(uname -p)\"" - echo "uname -i=\"$(uname -i)\"" - echo "uname -m=\"$(uname -m)\"" - echo "has /etc/SuSE-release ... $([ -f "/etc/SuSE-release" ] && echo "yes" || echo "no")" - echo "has /etc/redhat-release ... $([ -f "/etc/redhat-release" ] && echo "yes" || echo "no")" - echo "has /etc/debian_version ... $([ -f "/etc/debian_version" ] && echo "yes" || echo "no")" - echo "how many Xprt servers are running ...$(ps -ef | fgrep Xprt | fgrep -v "grep" | wc -l)" - ) 2>&1 | while read i ; do echo " $i" ; done - echo "## General info end." - - # Testing font paths - echo "## Testing font paths start." - ( - get_system_fontlist | - filter_unsupported_fonts | - sort_scaleable_fonts_first | - validate_fontlist | while read d ; do - echo "#### Testing \"${d}\" ..." - if [ ! -d "$d" ] ; then - echo "# Error: $d does not exists." - continue - fi - if [ ! -r "$d" ] ; then - echo "# Error: $d not readable." - continue - fi - if [ ! -f "${d}/fonts.dir" ] ; then - echo "# Error: ${d}/fonts.dir not found." - continue - else - if [ ! -r "${d}/fonts.dir" ] ; then - echo "# Error: ${d}/fonts.dir not readable." - continue - fi - fi - if [ -f "${d}/fonts.alias" ] ; then - if [ ! -r "${d}/fonts.alias" ] ; then - echo "# Error: ${d}/fonts.alias not readable." - fi - fi - - if [ "$(cat "${d}/fonts.dir" | fgrep 'cursor')" != "" ] ; then - echo "${d}/fonts.dir has cursor font." - fi - if [ "$(cat "${d}/fonts.dir" | fgrep 'fixed')" != "" ] ; then - echo "${d}/fonts.dir has fixed font." - fi - - if [ -r "${d}/fonts.alias" ] ; then - if [ "$(cat "${d}/fonts.alias" | fgrep 'cursor')" != "" ] ; then - echo "${d}/fonts.alias has cursor font." - fi - if [ "$(cat "${d}/fonts.alias" | fgrep 'fixed')" != "" ] ; then - echo "${d}/fonts.alias has fixed font." - fi - fi - - linenum=0 - cat "${d}/fonts.dir" | while read i1 i2 i3 i4 ; do - linenum=$((${linenum} + 1)) - [ ${linenum} -eq 1 ] && continue - - if [ ! -f "${d}/${i1}" ] ; then - echo "ERROR: ${d}/fonts.dir line ${linenum} has non-exististant font \"${i1}\" (=\"${i1} ${i2} ${i3} ${i4}\")" - fi - done - done - ) 2>&1 | while read i ; do echo " $i" ; done - echo "## Testing font paths end." - - echo "##### Diag End $(date)." -} - -XCOMM Set platform-defaults for setup_config() -setup_config_defaults() -{ - curr_num_xpstart="${1}" - - #### Defaults for Linux/Solaris - # Start Xprt using builtin XPCONFIGDIR at a free display numer - # (Solaris(=SunOS5.x)'s /usr/openwin/bin/Xprt supports TrueType fonts, - # therefore we don't need to filter them) - xpstart_fontpath[${curr_num_xpstart}]=""; - xpstart_fontpath_acceptpattern[${curr_num_xpstart}]=".*"; - xpstart_fontpath_rejectpattern[${curr_num_xpstart}]="/Speedo|/F3bitmaps|/F3"; - xpstart_displayid[${curr_num_xpstart}]=""; - xpstart_xpconfigdir[${curr_num_xpstart}]=""; - xpstart_xpfile[${curr_num_xpstart}]=""; - xpstart_auditlevel[${curr_num_xpstart}]="4"; - xpstart_options[${curr_num_xpstart}]=""; - xpstart_logger[${curr_num_xpstart}]=""; - # Check whether we have /dev/stderr (needed for old AIX + old Debian) - if [ -w "/dev/stderr" ] ; then - xpstart_logfile[${curr_num_xpstart}]="/dev/stderr"; - else - xpstart_logfile[${curr_num_xpstart}]="/dev/tty"; - fi - xpstart_xprt_binary[${curr_num_xpstart}]=""; - - # Custom rules for the GISWxprintglue package on Solaris - # (which uses Solaris's /usr/openwin/bin/Xprt but a custom config) - if [ "${XPCUSTOMGLUE}" = "GISWxprintglue" ] ; then - xpstart_xpconfigdir[${curr_num_xpstart}]="/opt/GISWxprintglue/server/etc/XpConfig" - xpstart_xprt_binary[${curr_num_xpstart}]="/usr/openwin/bin/Xprt" - fi - # Custom rules for the GISWxprint package on Solaris - # (which uses both it's own Xprt and a custom config) - if [ "${XPCUSTOMGLUE}" = "GISWxprint" ] ; then - xpstart_xpconfigdir[${curr_num_xpstart}]="/opt/GISWxprint/server/etc/XpConfig" - xpstart_xprt_binary[${curr_num_xpstart}]="/opt/GISWxprint/bin/Xprt" - xpstart_font_encodings_dir[${curr_num_xpstart}]="/opt/GISWxprint/lib/X11/fonts/encodings/encodings.dir" - fi - - ####################################################### - ### - ### Debian Xprint package default configuration - ### - if [ "${XPCUSTOMGLUE}" = "DebianGlue" ] ; then - # Set XPCONFIGDIR=/usr/share/Xprint/xserver - xpstart_xpconfigdir[${curr_num_xpstart}]="/usr/share/Xprint/xserver"; - - # Use fixed display ID (":64"), or else all client programs will have to be - # restarted simply to update XPSERVERLIST to the latest ID when upgrading, - # which would be a nightmare. - xpstart_displayid[${curr_num_xpstart}]=64; - - # Do not send any messages to console - xpstart_logfile[${curr_num_xpstart}]="/dev/null"; - - # By default use binary provided by Debian's "xprt-xprintorg" package - # (=/usr/bin/Xprt), otherwise leave blank (e.g. use script's default - # (=/usr/X11R6/bin/Xprt)) - if [ -x "/usr/bin/Xprt" ] ; then - xpstart_xprt_binary[${curr_num_xpstart}]="/usr/bin/Xprt"; - fi - fi - ### - ### End Debian default configuration - ### - ####################################################### -} - -fetch_etc_initd_xprint_envvars() -{ - curr_num_xpstart="${1}" - - ## Process some $ETC_INITD_XPRINT_* vars after all which may be used by - # a user to override the hardcoded values here when starting Xprt per-user - # (a more flexible way is to provide an own setup config script in - # "~./Xprint_per_user_startup" - see above) - if [ "${ETC_INITD_XPRINT_XPRT_PATH}" != "" ] ; then - xpstart_xprt_binary[${curr_num_xpstart}]="${ETC_INITD_XPRINT_XPRT_PATH}" - fi - if [ "${ETC_INITD_XPRINT_XPCONFIGDIR}" != "" ] ; then - xpstart_xpconfigdir[${curr_num_xpstart}]="${ETC_INITD_XPRINT_XPCONFIGDIR}" - fi - if [ "${ETC_INITD_XPRINT_XPFILE}" != "" ] ; then - xpstart_xpfile[${curr_num_xpstart}]="${ETC_INITD_XPRINT_XPFILE}" - fi - if [ "${ETC_INITD_XPRINT_LOGFILE}" != "" ] ; then - xpstart_logfile[${curr_num_xpstart}]="${ETC_INITD_XPRINT_LOGFILE}" - fi - if [ "${ETC_INITD_XPRINT_DISPLAYID}" != "" ] ; then - xpstart_displayid[${curr_num_xpstart}]="${ETC_INITD_XPRINT_DISPLAYID}" - fi - if [ "${ETC_INITD_XPRINT_FONTPATH}" != "" ] ; then - xpstart_fontpath[${curr_num_xpstart}]="${ETC_INITD_XPRINT_FONTPATH}" - fi - if [ "${ETC_INITD_XPRINT_XPRT_OPTIONS}" != "" ] ; then - xpstart_options[${curr_num_xpstart}]="${ETC_INITD_XPRINT_XPRT_OPTIONS}" - fi - if [ "${ETC_INITD_XPRINT_AUDITLEVEL}" != "" ] ; then - xpstart_auditlevel[${curr_num_xpstart}]="${ETC_INITD_XPRINT_AUDITLEVEL}" - fi - if [ "${ETC_INITD_XPRINT_XF86ENCODINGSDIR}" != "" ] ; then - xpstart_font_encodings_dir[${curr_num_xpstart}]="${ETC_INITD_XPRINT_XF86ENCODINGSDIR}" - fi -} - -XCOMM########################################################################### -XCOMM setup_config() sets the configuration parameters used to start one -XCOMM or more Xprint servers ("Xprt"). -XCOMM The following variables are used: -XCOMM - "num_xpstart" - number of servers to start -XCOMM - "xpstart_fontpath[index]" - custom font path. Leave blank if you want -XCOMM the platform-specific default -XCOMM - "xpstart_fontpath_acceptpattern[index]" - extended regular expression -XCOMM (see egrep(1)) used to filter the font path - items only pass this -XCOMM filter if they match the pattern (leave blank if you want to filter -XCOMM nothing) -XCOMM - "xpstart_fontpath_rejectpattern[index]" - extended regular expression -XCOMM (see egrep(1)) used to filter the font path - items only pass this -XCOMM filter if they do not match the pattern (leave blank if you want to -XCOMM filter nothing) -XCOMM - "xpstart_font_encodings_dir[index]" - location of "encodings.dir". -XCOMM Leave blank to use the default. -XCOMM - "xpstart_displayid[index]" - display id to use for the Xprint server -XCOMM (leave blank to choose the next available free display id) -XCOMM - "xpstart_xpconfigdir[index]" - value for custom XPCONFIGDIR (leave blank -XCOMM if you don not want that that XPCONFIGDIR is set at Xprt startup) -XCOMM - "xpstart_xpfile[index]" - value used for Xprt's "-XpFile" option (leave -XCOMM blank if you do not want to set this option) -XCOMM - "xpstart_auditlevel[index]" - set Xserver auditing level (leave blank to -XCOMM use no auditing) -XCOMM - "xpstart_options[index]" - set further Xprt options (leave blank to set -XCOMM no further options) -XCOMM - "xpstart_logger[index]" - utility which gets stderr/stdout messages from -XCOMM Xprt and sends them to a logging daemon. Leave blank to use /usr/bin/logger -XCOMM to send such messages to the lpr.notice syslog) -XCOMM - "xpstart_logfile[index]" - log file to append stderr/stdout messages from -XCOMM Xprt to. Leave blank to send messages to /dev/null -XCOMM - "xpstart_xprt_binary[index]" - set custom Xprt binary (leave blank to use -XCOMM the platform-specifc default) -setup_config() -{ - num_xpstart=0; - - if [ "${ETC_INITD_XPRINT_CUSTOM_SETUP_CONFIG}" != "" ] ; then - user_cfg="${ETC_INITD_XPRINT_CUSTOM_SETUP_CONFIG}" - else - user_cfg="${HOME}/.Xprint_per_user_startup" - fi - - # Source per-user ~/.Xprint_per_user_startup file if there is one - # (and do not use the script's defaults below) - if [ -r "${user_cfg}" ] ; then - # Define API version which should be checked by ${HOME}/.Xprint_per_user_startup - # ${HOME}/.Xprint_per_user_startup should bail-out if the version differ - etc_initd_xprint_api_version=2 - - # Source per-user settings script - . "${user_cfg}" - - # done with setting the config for per-user Xprt instances - return 0; - else - # Use /etc/init.d/xprint's builtin config - # Each entry should start with |setup_config_defaults| to pull the - # platform defaults and finish with |num_xpstart=$(($num_xpstart + 1))| - # to end the entry - - # Set platform-defaults - setup_config_defaults "${num_xpstart}" - - ## -- snip -- - - # Admins can put their stuff "in" here... - - ## -- snip -- - - # Override script's builtin values with those a user may set via the - # $ETC_INIITD_XPRINT_* env vars - fetch_etc_initd_xprint_envvars "${num_xpstart}" - - num_xpstart=$((${num_xpstart} + 1)) - - return 0; - fi - - #### Sample 1: - # # Start Xprt on a free display ID with custom XPCONFIGDIR and without - # # Speedo and TrueType fonts - # xpstart_fontpath_rejectpattern[$num_xpstart]="/Speedo|/TrueType|/TT(/$|$)|/TTF(/$|$)"; - # xpstart_xpconfigdir[$num_xpstart]="/home/gisburn/cwork/Xprint/Xprt_config/XpConfig"; - # xpstart_auditlevel[$num_xpstart]="4"; - # xpstart_options[$num_xpstart]="-ac -pn"; - #num_xpstart=$(($num_xpstart + 1)) - - - #### Sample 2: - # # Start Xprt without TrueType fonts on a display 55 with custom - # # XPCONFIGDIR - # xpstart_fontpath_rejectpattern[$num_xpstart]="/TrueType|/TT(/$|$)|/TTF(/$|$)"; - # xpstart_displayid[$num_xpstart]=55; - # xpstart_xpconfigdir[$num_xpstart]="/home/gisburn/cwork/Xprint/Xprt_config/XpConfig"; - # xpstart_auditlevel[$num_xpstart]=4; - # xpstart_options[$num_xpstart]="-ac -pn"; - #num_xpstart=$(($num_xpstart + 1)) - - #### Sample 3: - # # Start Xprt without TrueType fonts on a display 56 with custom - # # XPCONFIGDIR and alternate "Xprinters" file - # xpstart_fontpath_rejectpattern[$num_xpstart]="/TrueType|/TT(/$|$)|/TTF(/$|$)"; - # xpstart_displayid[$num_xpstart]=56; - # xpstart_xpconfigdir[$num_xpstart]="/etc/XpConfig/default"; - # xpstart_xpfile[$num_xpstart]="/etc/XpConfig/default/Xprinters_test2" - # xpstart_auditlevel[$num_xpstart]="4"; - # xpstart_options[$num_xpstart]="-ac -pn"; - # xpstart_xprt_binary[$num_xpstart]=""; - #num_xpstart=$(($num_xpstart + 1)) - - #### Sample 4: - # # Start Xprt with Solaris ISO-8859-7 (greek(="el") locale) fonts on - # # display 57 - # xpstart_fontpath[$num_xpstart]="/usr/openwin/lib/locale/iso_8859_7/X11/fonts/75dpi,/usr/openwin/lib/locale/iso_8859_7/X11/fonts/Type1,/usr/openwin/lib/X11/fonts/misc/"; - # xpstart_fontpath_acceptpattern[$num_xpstart]=""; - # xpstart_fontpath_rejectpattern[$num_xpstart]="_No_Match_"; - # xpstart_displayid[$num_xpstart]="57"; - # xpstart_auditlevel[$num_xpstart]="4"; - # xpstart_options[$num_xpstart]="-ac -pn"; - #num_xpstart=$(($num_xpstart + 1)) - - #### Sample 5: - # # Start Xprt with the font list of an existing Xserver (excluding Speedo fonts) on - # # display 58 - # # Note that this only works within a X session. At system boot time - # # there will be no $DISPLAY to fetch the information from!! - # xpstart_fontpath[$num_xpstart]="$(get_fontlist_from_display ${DISPLAY} | fontlist2fontpath)"; - # xpstart_fontpath_acceptpattern[$num_xpstart]=""; - # xpstart_fontpath_rejectpattern[$num_xpstart]=""; - # xpstart_displayid[$num_xpstart]="58"; - # xpstart_xpconfigdir[$num_xpstart]=""; - # xpstart_auditlevel[$num_xpstart]="4"; - # xpstart_options[$num_xpstart]="-ac -pn"; - # xpstart_xprt_binary[$num_xpstart]=""; - #num_xpstart=$(($num_xpstart + 1)) - - #### Sample 6: - # # List remote Xprt's here - # # (note that there is no test to check whether these DISPLAYs are valid!) - # xpstart_remote_server[$num_xpstart]="sera:12" ; num_xpstart=$(($num_xpstart + 1)) - # xpstart_remote_server[$num_xpstart]="gandalf:19" ; num_xpstart=$(($num_xpstart + 1)) -} - -XCOMM########################################################################### - -XCOMM Main -case "$1" in - ## Start Xprint servers - 'start') - do_start - ;; - - ## Stop Xprint servers - # Note that this does _not_ kill Xprt instances started using this script - # by non-root users - 'stop') - do_stop - ;; - - ## Restart Xprint servers - 'restart'|'force-reload') - do_restart - ;; - - ## Reload configuration without stopping and restarting - 'reload') - # not supported - msg "reload not supported, use 'restart' or 'force-reload'" - exit 3 - ;; - - ## Restart Xprint only if it is already running - 'condrestart'|'try-restart') - # only restart if it is already running - [ -f /var/lock/subsys/xprint ] && do_restart || : - ;; - - ## Get list of all Xprint servers for this user - # (incl. per-user and system-wide instances) - 'get_xpserverlist') - do_get_xpserverlist - ;; - - ## Get status of Xprint servers, RedHat-style - 'status') - x="$(do_get_xpserverlist)" - if [ "${x}" != "" ] ; then - msg "Xprint (${x}) is running..." - exit 0 - else - msg "Xprint is stopped" - exit 3 - fi - ;; - - ## Wrapper - 'wrapper') - cmd="${2}" - [ "${cmd}" = "" ] && fatal_error "No command given." - shift ; shift - export XPSERVERLIST="$(do_get_xpserverlist)" - [ "${XPSERVERLIST}" = "" ] && fatal_error "No Xprint servers found." - exec "${cmd}" "$@" - ;; - - ## Wrapper for "xplsprinters" - 'lsprinters') - [ "${ETC_INITD_XPRINT_XPLSPRINTERS_PATH}" != "" ] && cmd="${ETC_INITD_XPRINT_XPLSPRINTERS_PATH}" - [ "${cmd}" = "" -a "${XPCUSTOMGLUE}" = "GISWxprintglue" ] && cmd="/opt/GISWxprintglue/bin/xplsprinters" - [ "${cmd}" = "" -a "${XPCUSTOMGLUE}" = "GISWxprint" ] && cmd="/opt/GISWxprint/bin/xplsprinters" - [ "${cmd}" = "" -a "${XPROJECTROOT}" != "" ] && cmd="${XPROJECTROOT}/bin/xplsprinters" - [ "${cmd}" = "" ] && cmd="xplsprinters" - - shift - export XPSERVERLIST="$(do_get_xpserverlist)" - [ "${XPSERVERLIST}" = "" ] && fatal_error "No Xprint servers found." - exec "${cmd}" "$@" - ;; - - ## Diagnostics - 'diag') - do_diag - ;; - - ## Print usage - *) - msg "Usage: $0 { start | stop | restart | reload | force-reload | status | condrestart | try-restart | wrapper | lsprinters | get_xpserverlist | diag }" - exit 2 -esac -exit 0 - -XCOMM EOF. diff --git a/hw/xprint/etc/profile.d/Makefile.am b/hw/xprint/etc/profile.d/Makefile.am deleted file mode 100644 index b91a9115a..000000000 --- a/hw/xprint/etc/profile.d/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = xprint.csh xprint.sh diff --git a/hw/xprint/etc/profile.d/xprint.csh b/hw/xprint/etc/profile.d/xprint.csh deleted file mode 100644 index 7cc675840..000000000 --- a/hw/xprint/etc/profile.d/xprint.csh +++ /dev/null @@ -1,16 +0,0 @@ -# -# /etc/profile.d/xprint.csh -# -# Copyright (c) 2002-2004 by Roland Mainz -# please send bugfixes or comments to http://xprint.mozdev.org/ - - -# -# Obtain list of Xprint servers -# - -if ( -f /etc/init.d/xprint ) then - setenv XPSERVERLIST "`/bin/sh /etc/init.d/xprint get_xpserverlist`" -endif - -# /etc/profile.d/xprint.csh ends here. diff --git a/hw/xprint/etc/profile.d/xprint.sh b/hw/xprint/etc/profile.d/xprint.sh deleted file mode 100644 index b5b46c1e7..000000000 --- a/hw/xprint/etc/profile.d/xprint.sh +++ /dev/null @@ -1,16 +0,0 @@ -# -# /etc/profile.d/xprint.sh -# -# Copyright (c) 2002-2004 by Roland Mainz -# please send bugfixes or comments to http://xprint.mozdev.org/ - -# -# Obtain list of Xprint servers -# - -if [ -f "/etc/init.d/xprint" ] ; then - XPSERVERLIST="`/bin/sh /etc/init.d/xprint get_xpserverlist`" - export XPSERVERLIST -fi - -# /etc/profile.d/xprint.sh ends here. diff --git a/hw/xprint/mediaSizes.c b/hw/xprint/mediaSizes.c deleted file mode 100644 index 7acc70679..000000000 --- a/hw/xprint/mediaSizes.c +++ /dev/null @@ -1,782 +0,0 @@ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ -/******************************************************************* -** -** ********************************************************* -** * -** * File: mediaSizes.c -** * -** * Contents: -** * Routines to return the sizes associated -** * with particular media and particular printers. -** * -** * Created: 2/19/96 -** * -** * Copyright: Copyright 1993,1995 Hewlett-Packard Company -** * -** ********************************************************* -** -********************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include -#include - -#include -#include "dixstruct.h" -#include "screenint.h" -#include "misc.h" -#include "scrnintstr.h" -#include - -#include "DiPrint.h" -#include "attributes.h" - -typedef struct { - XpOid page_size; - float width; - float height; -} PageDimensionsRec; - -static PageDimensionsRec PageDimensions[] = -{ - {xpoid_val_medium_size_na_letter, 215.9, 279.4}, - {xpoid_val_medium_size_na_legal, 215.9, 355.6}, - {xpoid_val_medium_size_executive, 184.15, 266.7}, - {xpoid_val_medium_size_folio, 210.82, 330.2}, - {xpoid_val_medium_size_invoice, 139.7, 215.9}, - {xpoid_val_medium_size_ledger, 279.4, 431.8}, - {xpoid_val_medium_size_quarto, 215.9, 275.082}, - {xpoid_val_medium_size_a, 215.9, 279.4}, - {xpoid_val_medium_size_b, 279.4, 431.8}, - {xpoid_val_medium_size_c, 431.8, 558.8}, - {xpoid_val_medium_size_d, 558.8, 863.6}, - {xpoid_val_medium_size_e, 863.6, 1117.6}, - {xpoid_val_medium_size_na_6x9_envelope, 152.4, 228.6}, - {xpoid_val_medium_size_na_10x15_envelope, 254, 381}, - {xpoid_val_medium_size_monarch_envelope, 98.298, 190.5}, - {xpoid_val_medium_size_na_10x13_envelope, 254, 330.2}, - {xpoid_val_medium_size_na_9x12_envelope, 228.6, 304.8}, - {xpoid_val_medium_size_na_number_10_envelope, 104.775, 241.3}, - {xpoid_val_medium_size_na_7x9_envelope, 177.8, 228.6}, - {xpoid_val_medium_size_na_9x11_envelope, 228.6, 279.4}, - {xpoid_val_medium_size_na_10x14_envelope, 254, 355.6}, - {xpoid_val_medium_size_na_number_9_envelope, 98.425, 225.425}, - {xpoid_val_medium_size_iso_a0, 841, 1189}, - {xpoid_val_medium_size_iso_a1, 594, 841}, - {xpoid_val_medium_size_iso_a2, 420, 594}, - {xpoid_val_medium_size_iso_a3, 297, 420}, - {xpoid_val_medium_size_iso_a4, 210, 297}, - {xpoid_val_medium_size_iso_a5, 148, 210}, - {xpoid_val_medium_size_iso_a6, 105, 148}, - {xpoid_val_medium_size_iso_a7, 74, 105}, - {xpoid_val_medium_size_iso_a8, 52, 74}, - {xpoid_val_medium_size_iso_a9, 37, 52}, - {xpoid_val_medium_size_iso_a10, 26, 37}, - {xpoid_val_medium_size_iso_b0, 1000, 1414}, - {xpoid_val_medium_size_iso_b1, 707, 1000}, - {xpoid_val_medium_size_iso_b2, 500, 707}, - {xpoid_val_medium_size_iso_b3, 353, 500}, - {xpoid_val_medium_size_iso_b4, 250, 353}, - {xpoid_val_medium_size_iso_b5, 176, 250}, - {xpoid_val_medium_size_iso_b6, 125, 176}, - {xpoid_val_medium_size_iso_b7, 88, 125}, - {xpoid_val_medium_size_iso_b8, 62, 88}, - {xpoid_val_medium_size_iso_b9, 44, 62}, - {xpoid_val_medium_size_iso_b10, 31, 44}, - {xpoid_val_medium_size_jis_b0, 1030, 1456}, - {xpoid_val_medium_size_jis_b1, 728, 1030}, - {xpoid_val_medium_size_jis_b2, 515, 728}, - {xpoid_val_medium_size_jis_b3, 364, 515}, - {xpoid_val_medium_size_jis_b4, 257, 364}, - {xpoid_val_medium_size_jis_b5, 182, 257}, - {xpoid_val_medium_size_jis_b6, 128, 182}, - {xpoid_val_medium_size_jis_b7, 91, 128}, - {xpoid_val_medium_size_jis_b8, 64, 91}, - {xpoid_val_medium_size_jis_b9, 45, 64}, - {xpoid_val_medium_size_jis_b10, 32, 45}, - {xpoid_val_medium_size_hp_2x_postcard, 148, 200}, - {xpoid_val_medium_size_hp_european_edp, 304.8, 355.6}, - {xpoid_val_medium_size_hp_mini, 139.7, 215.9}, - {xpoid_val_medium_size_hp_postcard, 100, 148}, - {xpoid_val_medium_size_hp_tabloid, 279.4, 431.8}, - {xpoid_val_medium_size_hp_us_edp, 279.4, 355.6}, - {xpoid_val_medium_size_hp_us_government_legal, 203.2, 330.2}, - {xpoid_val_medium_size_hp_us_government_letter, 203.2, 254}, - {xpoid_val_medium_size_iso_c3, 324, 458}, - {xpoid_val_medium_size_iso_c4, 229, 324}, - {xpoid_val_medium_size_iso_c5, 162, 229}, - {xpoid_val_medium_size_iso_c6, 114, 162}, - {xpoid_val_medium_size_iso_designated_long, 110, 220} -}; - -/* - * XpGetResolution returns an integer representing the printer resolution - * in dots-per-inch for the specified print context. - * - * Note: This routine assumes the values found in the passed context's - * attributes pools have been validated. - */ -int -XpGetResolution( - XpContextPtr pContext) -{ - unsigned long resolution; - - resolution = XpGetCardAttr(pContext, XPPageAttr, - xpoid_att_default_printer_resolution, - (XpOidCardList*)NULL); - if(0 == resolution) - resolution = XpGetCardAttr(pContext, XPDocAttr, - xpoid_att_default_printer_resolution, - (XpOidCardList*)NULL); - if(0 == resolution) - { - XpOidCardList* resolutions_supported; - /* - * default-printer-resolution not specified; default to 1st entry - * in printer-resolutions-supported. - */ - resolutions_supported = - XpGetCardListAttr(pContext, XPPrinterAttr, - xpoid_att_printer_resolutions_supported, - (XpOidCardList*)NULL); - resolution = XpOidCardListGetCard(resolutions_supported, 0); - XpOidCardListDelete(resolutions_supported); - } - return (int)resolution; -} - -/* - * XpGetContentOrientation determines the content-orientation as - * determined by the passed context. The page and document pools are - * queried in turn for a specified content-orientation attribute. If none - * is found the first content-orientation in the - * content-orientations-supported printer attribute is taken as the - * default. - * - * Note: This routine assumes the values found in the passed context's - * attributes pools have been validated. - */ -XpOid -XpGetContentOrientation( - XpContextPtr pContext) -{ - XpOid orientation; - - orientation = XpGetOidAttr(pContext, XPPageAttr, - xpoid_att_content_orientation, - (XpOidList*)NULL); - if(xpoid_none == orientation) - orientation = XpGetOidAttr(pContext, XPDocAttr, - xpoid_att_content_orientation, - (XpOidList*)NULL); - if(xpoid_none == orientation) - { - XpOidList* content_orientations_supported; - - content_orientations_supported = - XpGetListAttr(pContext, XPPrinterAttr, - xpoid_att_content_orientations_supported, - (XpOidList*)NULL); - orientation = XpOidListGetOid(content_orientations_supported, 0); - XpOidListDelete(content_orientations_supported); - } - return orientation; -} - -/* - * XpGetAvailableCompression determines the available-compression as - * determined by the passed context. The page and document pools are - * queried in turn for a specified content-orientation attribute. If none - * is found the first available-compression in the - * avaiable-compressions-supported printer attribute is taken as the - * default. - * - * Note: This routine assumes the values found in the passed context's - * attributes pools have been validated. - */ -XpOid -XpGetAvailableCompression( - XpContextPtr pContext) -{ - XpOid compression; - - compression = XpGetOidAttr(pContext, XPPageAttr, - xpoid_att_available_compression, - (XpOidList*)NULL); - if(xpoid_none == compression) - compression = XpGetOidAttr(pContext, XPDocAttr, - xpoid_att_available_compression, - (XpOidList*)NULL); - if(xpoid_none == compression) - { - XpOidList* available_compressions_supported; - - available_compressions_supported = - XpGetListAttr(pContext, XPPrinterAttr, - xpoid_att_available_compressions_supported, - (XpOidList*)NULL); - compression = XpOidListGetOid(available_compressions_supported, 0); - XpOidListDelete(available_compressions_supported); - } - return compression; -} - -/* - * XpGetPlex determines the plex as determined by the passed context. The page - * and document pools are queried in turn for a specified plex attribute. If - * none is found the first plex in the plexes-supported printer attribute is - * taken as the default. - * - * Note: This routine assumes the values found in the passed context's - * attributes pools have been validated. - */ -XpOid -XpGetPlex( - XpContextPtr pContext) -{ - XpOid plex; - - plex = XpGetOidAttr(pContext, XPPageAttr, xpoid_att_plex, - (XpOidList*)NULL); - if(xpoid_none == plex) - plex = XpGetOidAttr(pContext, XPDocAttr, xpoid_att_plex, - (XpOidList*)NULL); - if(xpoid_none == plex) - { - XpOidList* plexes_supported; - - plexes_supported = - XpGetListAttr(pContext, XPPrinterAttr, - xpoid_att_plexes_supported, - (XpOidList*)NULL); - plex = XpOidListGetOid(plexes_supported, 0); - XpOidListDelete(plexes_supported); - } - return plex; -} - -/* - * XpGetPageSize returns the XpOid of the current page size (medium names - * are page sizes in this implementation) as indicated by the passed - * context. - * - * The relevant input-tray is returned in pTray. This parm must not be - * NULL. If the input-tray is not indicated or irrelevant, xpoid_none - * will be returned. - * - * This function optionally takes a XpOidMediumSS representation of the - * medium-source-sizes-supported attribute in order to avoid parsing the - * string value twice for calling functions that need to parse m-s-s-s - * anyway (e.g. XpGetReproductionArea). If the caller has no other reason - * to parse medium-source-sizes-supported, it is recommended that NULL be - * passed. This function will obtain medium-source-sizes-supported if it - * needs to. - * - * Note: This routine assumes the values found in the passed context's - * attributes pools have been validated. - */ -XpOid -XpGetPageSize(XpContextPtr pContext, - XpOid* pTray, - const XpOidMediumSS* msss) -{ - XpOid medium; - /* - * check to see if default-medium is specified - */ - medium = XpGetOidAttr(pContext, XPPageAttr, xpoid_att_default_medium, - (const XpOidList*)NULL); - if(medium == xpoid_none) - { - /* - * default-medium not in page pool; try the document pool - */ - medium = XpGetOidAttr(pContext, XPDocAttr, xpoid_att_default_medium, - (const XpOidList*)NULL); - } - if(medium == xpoid_none) - { - /* - * default-medium not specified; try default-input-tray - */ - *pTray = XpGetOidAttr(pContext, XPPageAttr, - xpoid_att_default_input_tray, - (const XpOidList*)NULL); - if(*pTray == xpoid_none) - { - /* - * default-input-tray not in page pool; try the document pool - */ - *pTray = XpGetOidAttr(pContext, XPDocAttr, - xpoid_att_default_input_tray, - (const XpOidList*)NULL); - } - if(*pTray != xpoid_none) - { - /* - * default-input-tray found; get corresponding medium from - * input-trays-medium - */ - XpOidTrayMediumList* input_trays_medium; - int i; - - input_trays_medium = - XpGetTrayMediumListAttr(pContext, XPPrinterAttr, - xpoid_att_input_trays_medium, - (const XpOidList*)NULL, - (const XpOidMediumSS*)NULL); - for(i = 0; i < XpOidTrayMediumListCount(input_trays_medium); i++) - { - if(*pTray == XpOidTrayMediumListTray(input_trays_medium, i)) - { - medium = XpOidTrayMediumListMedium(input_trays_medium, i); - break; - } - } - XpOidTrayMediumListDelete(input_trays_medium); - } - } - else - *pTray = xpoid_none; - - if(medium == xpoid_none) - { - XpOidMediumSS* local_msss = (XpOidMediumSS*)NULL; - int i_mss, i_ds; - XpOidMediumDiscreteSizeList* ds_list; - /* - * no medium specified; use 1st page size found in - * medium-source-sizes-supported - */ - if((XpOidMediumSS*)NULL == msss) - msss = local_msss = - XpGetMediumSSAttr(pContext, XPPrinterAttr, - xpoid_att_medium_source_sizes_supported, - (const XpOidList*)NULL, - (const XpOidList*)NULL); - for(i_mss = 0; - i_mss < XpOidMediumSSCount(msss) && xpoid_none == medium; - i_mss++) - { - if(XpOidMediumSS_DISCRETE == (msss->mss)[i_mss].mstag - && - xpoid_none != (msss->mss)[i_mss].input_tray) - { - ds_list = (msss->mss)[i_mss].ms.discrete; - for(i_ds = 0; i_ds < ds_list->count; i_ds++) - { - if(xpoid_none != (ds_list->list)[i_ds].page_size) - { - medium = (ds_list->list)[i_ds].page_size; - break; - } - } - } - } - XpOidMediumSSDelete(local_msss); - } - return medium; -} - -/* - * XpGetMediumMillimeters returns into the supplied float pointers the - * width and height in millimeters of the passed page size identifier. - */ -void -XpGetMediumMillimeters( - XpOid page_size, - float *width, /* return */ - float *height) /* return */ -{ - int i; - - *width = *height = 0; - for(i = 0; i < XpNumber(PageDimensions); i++) - { - if(page_size == PageDimensions[i].page_size) - { - *width = PageDimensions[i].width; - *height = PageDimensions[i].height; - return; - } - } -} - -/* - * Converts a millimeter specification into pixels given a resolution in - * DPI. - */ -static float -MmToPixels(float mm, int resolution) -{ - float f; - - f = mm * resolution; - f /= 25.4; - return f; -} - -/* - * XpGetMediumDimensions returns into the supplied short pointers the - * width and height in pixels of the medium associated with the specified - * print context. It obtains the page size associated with the current - * medium by calling XpGetPageSize. It passes XpGetMediumMillimeters the - * page size, and converts the returned millimeter dimensions into pixels - * using the resolution returned by XpGetResolution. - * - * Note: This routine assumes the values found in the passed context's - * attributes pools have been validated. - */ -void -XpGetMediumDimensions( - XpContextPtr pContext, - unsigned short *width, /* return */ - unsigned short *height) /* return */ -{ - XpOid page_size; - XpOid tray; - XpOid orientation; - - int resolution; - float w_mm, h_mm; - - page_size = XpGetPageSize(pContext, &tray, (XpOidMediumSS*)NULL); - if(page_size == xpoid_none) - { - /* - * fail-safe: if the pools have been validated, this defaulting logic - * isn't needed. - */ - page_size = xpoid_val_medium_size_na_letter; - } - XpGetMediumMillimeters(page_size, &w_mm, &h_mm); - resolution = XpGetResolution(pContext); - orientation = XpGetContentOrientation(pContext); - switch(orientation) - { - case xpoid_val_content_orientation_landscape: - case xpoid_val_content_orientation_reverse_landscape: - /* - * transpose width and height - */ - *height = MmToPixels(w_mm, resolution); - *width = MmToPixels(h_mm, resolution); - break; - - default: - *width = MmToPixels(w_mm, resolution); - *height = MmToPixels(h_mm, resolution); - break; - } -} - -/* - * XRectangleFromXpOidArea converts an XpOidArea area specification - * into an XRectangle. The passed resolution is used to convert from - * millimeters (XpOidArea) into pixels (XRectangle). - */ -static void -XRectangleFromXpOidArea( - xRectangle *pRect, - const XpOidArea* repro, - int resolution, - XpOid orientation) -{ - switch(orientation) - { - case xpoid_val_content_orientation_landscape: - case xpoid_val_content_orientation_reverse_landscape: - /* - * transpose x and y, width and height - */ - pRect->y = MmToPixels(repro->minimum_x, resolution); - pRect->x = MmToPixels(repro->minimum_y, resolution); - pRect->height = - MmToPixels(repro->maximum_x - repro->minimum_x, resolution); - pRect->width = - MmToPixels(repro->maximum_y - repro->minimum_y, resolution); - break; - - default: - pRect->x = MmToPixels(repro->minimum_x, resolution); - pRect->y = MmToPixels(repro->minimum_y, resolution); - pRect->width = - MmToPixels(repro->maximum_x - repro->minimum_x, resolution); - pRect->height = - MmToPixels(repro->maximum_y - repro->minimum_y, resolution); - break; - } -} - -/* - * XpGetReproductionArea queries the current pool attribute values in - * order to determine the reproduction area for the currently selected - * medium. - * - * First the current page size (equivalent to current medium) and tray - * (if specified) is retrieved via XpGetPageSize. The value of the - * medium-source-sizes-supported attribute is interrogated until a matching - * entry for the current page size and tray is found. The reproduction - * area defined for the current entry is converted into an XRectangle - * using XRectangleFromXpOidArea and returned to the caller. - * - * Note: This routine assumes the values found in the passed context's - * attributes pools have been validated. - */ -void -XpGetReproductionArea(XpContextPtr pContext, - xRectangle *pRect) -{ - XpOid page_size; - XpOid tray; - XpOidMediumSS* msss; - int i_mss, i_ds; - XpOidMediumDiscreteSizeList* ds_list; - XpOidArea* repro; - BOOL done; - int resolution; - XpOid orientation; - /* - * find the appropriate assured reproduction area for the current - * tray and page size in the medium-source-sizes-supported attribute. - */ - msss = XpGetMediumSSAttr(pContext, XPPrinterAttr, - xpoid_att_medium_source_sizes_supported, - (const XpOidList*)NULL, - (const XpOidList*)NULL); - page_size = XpGetPageSize(pContext, &tray, msss); - resolution = XpGetResolution(pContext); - orientation = XpGetContentOrientation(pContext); - - memset(pRect, 0, sizeof(xRectangle)); - - if(xpoid_none == tray) - { - /* - * no tray specified; use 1st matching page size - */ - for(i_mss = 0, done = xFalse; - i_mss < XpOidMediumSSCount(msss) && !done; - i_mss++) - { - if(XpOidMediumSS_DISCRETE == (msss->mss)[i_mss].mstag - && - xpoid_none != (msss->mss)[i_mss].input_tray) - { - ds_list = (msss->mss)[i_mss].ms.discrete; - for(i_ds = 0; i_ds < ds_list->count; i_ds++) - { - if(page_size == (ds_list->list)[i_ds].page_size) - { - repro = - &(ds_list->list)[i_ds].assured_reproduction_area; - XRectangleFromXpOidArea(pRect, repro, - resolution, orientation); - done = xTrue; - break; - } - } - } - } - } - else - { - /* - * tray && page size specified; find matching entry - */ - for(i_mss = 0, done = xFalse; - i_mss < XpOidMediumSSCount(msss) && !done; - i_mss++) - { - if(XpOidMediumSS_DISCRETE == (msss->mss)[i_mss].mstag - && - xpoid_none != (msss->mss)[i_mss].input_tray - && - (tray == (msss->mss)[i_mss].input_tray - || - xpoid_unspecified == (msss->mss)[i_mss].input_tray) - ) - { - ds_list = (msss->mss)[i_mss].ms.discrete; - for(i_ds = 0; i_ds < ds_list->count; i_ds++) - { - if(page_size == (ds_list->list)[i_ds].page_size) - { - repro = - &(ds_list->list)[i_ds].assured_reproduction_area; - XRectangleFromXpOidArea(pRect, repro, - resolution, orientation); - if(xpoid_unspecified != (msss->mss)[i_mss].input_tray) - { - /* - * exact match on tray takes precendence over - * unspecified tray entry in m-s-s-s - */ - done = xTrue; - } - break; - } - } - } - } - } - XpOidMediumSSDelete(msss); -} - -/* - * XpGetMaxWidthHeightRes returns into the supplied width and height - * unsigned short pointers the dimensions in millimeters of the largest - * supported media for a specific printer. It looks at the - * medium-source-sizes-supported attribute (if it exists) to determine - * the list of possible media, and calls XpGetMediumMillimeters to get the - * dimensions for each medium. If the m-s-s-s attribute is not defined, - * then the dimensions for the na-letter medium is returned. - * - * This function also returns the largest resolution in DPI defined in - * printer-resolutions-supported. If printer-resolutions-supported is not - * specified, the default is obtained from the passed XpValidatePoolsRec. - * - * The passed XpValidatePoolsRec is also used to determine valid values - * when parsing attribute values. - */ -void -XpGetMaxWidthHeightRes( - const char *printer_name, - const XpValidatePoolsRec* vpr, - float *width, - float *height, - int* resolution) -{ - const char* value; - const char* attr_str; - XpOidMediumSS* pool_msss; - const XpOidMediumSS* msss; - int i_mss, i_ds; - XpOidMediumDiscreteSizeList* ds_list; - float w, h; - XpOidCardList* pool_resolutions_supported; - const XpOidCardList* resolutions_supported; - int i; - int res; - /* - * get the max medium width and height - */ - attr_str = XpOidString(xpoid_att_medium_source_sizes_supported); - value = XpGetPrinterAttribute(printer_name, attr_str); - pool_msss = XpOidMediumSSNew(value, - vpr->valid_input_trays, - vpr->valid_medium_sizes); - if(0 == XpOidMediumSSCount(pool_msss)) - msss = XpGetDefaultMediumSS(); - else - msss = pool_msss; - *width = *height = 0; - for(i_mss = 0; i_mss < XpOidMediumSSCount(msss); i_mss++) - { - if(XpOidMediumSS_DISCRETE == (msss->mss)[i_mss].mstag - && - xpoid_none != (msss->mss)[i_mss].input_tray) - { - ds_list = (msss->mss)[i_mss].ms.discrete; - for(i_ds = 0; i_ds < ds_list->count; i_ds++) - { - if(xpoid_none != (ds_list->list)[i_ds].page_size) - { - XpGetMediumMillimeters((ds_list->list)[i_ds].page_size, - &w, &h); - if(w > *width) *width = w; - if(h > *height) *height = h; - } - } - } - } - XpOidMediumSSDelete(pool_msss); - /* - * get the maximum resolution - */ - attr_str = XpOidString(xpoid_att_printer_resolutions_supported); - value = XpGetPrinterAttribute(printer_name, attr_str); - pool_resolutions_supported = - XpOidCardListNew(value, vpr->valid_printer_resolutions_supported); - if(0 == XpOidCardListCount(pool_resolutions_supported)) - resolutions_supported = vpr->default_printer_resolutions_supported; - else - resolutions_supported = pool_resolutions_supported; - *resolution = 0; - for(i = 0; i < XpOidCardListCount(resolutions_supported); i++) - { - res = XpOidCardListGetCard(resolutions_supported, i); - if(res > *resolution) *resolution = res; - } - XpOidCardListDelete(pool_resolutions_supported); -} - -FontResolutionPtr -XpGetClientResolutions(client, num) - ClientPtr client; - int *num; -{ - static struct _FontResolution res; - int resolution = XpGetResolution(XpContextOfClient(client)); - - res.x_resolution = resolution; - res.y_resolution = resolution; - - res.point_size = 120; - - *num = 1; - - return &res; -} - - -void XpSetFontResFunc(client) - ClientPtr client; -{ - client->fontResFunc = XpGetClientResolutions; -} - - -void XpUnsetFontResFunc(client) - ClientPtr client; -{ - client->fontResFunc = NULL; -} diff --git a/hw/xprint/pcl-mono/Makefile.am b/hw/xprint/pcl-mono/Makefile.am deleted file mode 100644 index 4d8dfc682..000000000 --- a/hw/xprint/pcl-mono/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -noinst_LTLIBRARIES = libpcl.la - -PCL_DRIVER = -DXP_PCL_MONO - -include ../pcl/Makefile.am.inc diff --git a/hw/xprint/pcl/Makefile.am b/hw/xprint/pcl/Makefile.am deleted file mode 100644 index 90133e8e2..000000000 --- a/hw/xprint/pcl/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -noinst_LTLIBRARIES = libpcl.la - -PCL_DRIVER = -DXP_PCL_COLOR - -include ../pcl/Makefile.am.inc - diff --git a/hw/xprint/pcl/Makefile.am.inc b/hw/xprint/pcl/Makefile.am.inc deleted file mode 100644 index c3af606ee..000000000 --- a/hw/xprint/pcl/Makefile.am.inc +++ /dev/null @@ -1,27 +0,0 @@ -INCLUDES = -I$(top_srcdir)/hw/xprint - -AM_CFLAGS = @DIX_CFLAGS@ @XPRINT_CFLAGS@ -D_XP_PRINT_SERVER_ $(PCL_DRIVER) - -libpcl_la_SOURCES = \ - $(srcdir)/../pcl/PclArc.c \ - $(srcdir)/../pcl/PclArea.c \ - $(srcdir)/../pcl/PclAttr.c \ - $(srcdir)/../pcl/PclAttVal.c \ - $(srcdir)/../pcl/PclColor.c \ - $(srcdir)/../pcl/PclCursor.c \ - $(srcdir)/../pcl/PclDef.h \ - $(srcdir)/../pcl/PclFonts.c \ - $(srcdir)/../pcl/PclGC.c \ - $(srcdir)/../pcl/Pcl.h \ - $(srcdir)/../pcl/PclInit.c \ - $(srcdir)/../pcl/PclLine.c \ - $(srcdir)/../pcl/Pclmap.h \ - $(srcdir)/../pcl/PclMisc.c \ - $(srcdir)/../pcl/PclPixel.c \ - $(srcdir)/../pcl/PclPolygon.c \ - $(srcdir)/../pcl/PclPrint.c \ - $(srcdir)/../pcl/PclSFonts.c \ - $(srcdir)/../pcl/PclSFonts.h \ - $(srcdir)/../pcl/PclSpans.c \ - $(srcdir)/../pcl/PclText.c \ - $(srcdir)/../pcl/PclWindow.c diff --git a/hw/xprint/pcl/Pcl.h b/hw/xprint/pcl/Pcl.h deleted file mode 100644 index d46a03401..000000000 --- a/hw/xprint/pcl/Pcl.h +++ /dev/null @@ -1,619 +0,0 @@ -/******************************************************************* -** -** ********************************************************* -** * -** * File: Pcl.h -** * -** * Contents: defines and includes for the Pcl driver -** * for a printing X server. -** * -** * Created: 1/30/95 -** * -** ********************************************************* -** -********************************************************************/ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _PCL_H_ -#define _PCL_H_ - -#include -#include "scrnintstr.h" - -#include "PclDef.h" -#include "Pclmap.h" -#include "PclSFonts.h" - -#include -#include - -#include "regionstr.h" -#include -#include "dixfontstr.h" -#include "gcstruct.h" - -/* - * Some sleazes to force the XrmDB stuff into the server - */ -#ifndef HAVE_XPointer -typedef char *XPointer; -#endif -#define Status int -#define True 1 -#define False 0 -#include "misc.h" -#include -#include -#include "attributes.h" - -/****** - * externally visible variables from PclInit.c - ******/ -extern DevPrivateKey PclScreenPrivateKey, PclWindowPrivateKey; -extern DevPrivateKey PclContextPrivateKey; -extern DevPrivateKey PclPixmapPrivateKey; -extern DevPrivateKey PclGCPrivateKey; - -/****** - * externally visible variables from PclAttVal.c - ******/ -extern XpValidatePoolsRec PclValidatePoolsRec; - -/* - * This structure defines a mapping from an X colormap ID to a list of - * print contexts which use the colormap. - */ -typedef struct _pclcontextlist { - XpContextPtr context; - struct _pclcontextlist *next; -} PclContextList, *PclContextListPtr; - -typedef struct _pclcmaptocontexts { - long colormapId; - PclContextListPtr contexts; - struct _pclcmaptocontexts *next; -} PclCmapToContexts; - -typedef struct { - PclCmapToContexts *colormaps; - CloseScreenProcPtr CloseScreen; -} PclScreenPrivRec, *PclScreenPrivPtr; - -/* - * This structure defines a mapping from an X colormap ID to a PCL - * palette ID. - */ -typedef struct _palettemap { - long colormapId; - int paletteId; - int downloaded; - struct _palettemap *next; -} PclPaletteMap, *PclPaletteMapPtr; - -typedef struct { - char *jobFileName; - FILE *pJobFile; - char *pageFileName; - FILE *pPageFile; - GC lastGC; - unsigned char *dash; - int validGC; - ClientPtr getDocClient; - int getDocBufSize; - PclSoftFontInfoPtr pSoftFontInfo; - PclPaletteMapPtr palettes; - int currentPalette; - int nextPaletteId; - PclPaletteMap staticGrayPalette; - PclPaletteMap trueColorPalette; - PclPaletteMap specialTrueColorPalette; - unsigned char *ctbl; - int ctbldim; - int isRaw; -#ifdef XP_PCL_LJ3 - unsigned int fcount; - unsigned int fcount_max; - char *figures; -#endif /* XP_PCL_LJ3 */ -} PclContextPrivRec, *PclContextPrivPtr; - -typedef struct { - int validContext; - XpContextPtr context; -} PclWindowPrivRec, *PclWindowPrivPtr; - -typedef struct { - unsigned long stippleFg, stippleBg; -} PclGCPrivRec, *PclGCPrivPtr; - -typedef struct { - XpContextPtr context; - char *tempFileName; - FILE *tempFile; - GC lastGC; - int validGC; -} PclPixmapPrivRec, *PclPixmapPrivPtr; - -/****** - * Defined functions - ******/ -#define SEND_PCL(f,c) fwrite( c, sizeof( char ), strlen( c ), f ) -#define SEND_PCL_COUNT(f,c,n) fwrite( c, sizeof( char ), n, f ) - -#ifndef XP_PCL_LJ3 -#define SAVE_PCL(f,p,c) SEND_PCL(f,c) -#define SAVE_PCL_COUNT(f,p,c,n) SEND_PCL_COUNT(f,c,n) -#define MACRO_START(f,p) SEND_PCL(f, "\033&f1Y\033&f0X") -#define MACRO_END(f) SEND_PCL(f, "\033&f1X") -#else -#define SAVE_PCL(f,p,c) PclSpoolFigs(p, c, strlen(c)) -#define SAVE_PCL_COUNT(f,p,c,n) PclSpoolFigs(p, c, n) -#define MACRO_START(f,p) p->fcount = 0 -#define MACRO_END(f) /* do nothing */ -#endif /* XP_PCL_LJ3 */ - -#define MIN(a,b) (((a)<(b))?(a):(b)) -#ifndef MAX -#define MAX(a,b) (((a)>(b))?(a):(b)) -#endif - -/****** - * Functions in PclArc.c - ******/ -extern void PclPolyArc( - DrawablePtr pDrawable, - GCPtr pGC, - int nArcs, - xArc *pArcs); -extern void PclPolyFillArc( - DrawablePtr pDrawable, - GCPtr pGC, - int nArcs, - xArc *pArcs); - -/****** - * Functions in PclArea.c - ******/ -extern void PclPutImage( - DrawablePtr pDrawable, - GCPtr pGC, - int depth, - int x, - int y, - int w, - int h, - int leftPad, - int format, - char *pImage); -extern RegionPtr PclCopyArea( - DrawablePtr pSrc, - DrawablePtr pDst, - GCPtr pGC, - int srcx, - int srcy, - int width, - int height, - int dstx, - int dsty); -RegionPtr PclCopyPlane( - DrawablePtr pSrc, - DrawablePtr pDst, - GCPtr pGC, - int srcx, - int srcy, - int width, - int height, - int dstx, - int dsty, - unsigned long plane); - - -/****** - * Functions in PclAttr.c - ******/ -extern char *PclGetAttributes( - XpContextPtr pCon, - XPAttributes pool ); -extern char *PclGetOneAttribute( - XpContextPtr pCon, - XPAttributes pool, - char *attr ); -extern int PclAugmentAttributes( - XpContextPtr pCon, - XPAttributes pool, - char *attrs ); -extern int PclSetAttributes( - XpContextPtr pCon, - XPAttributes pool, - char *attrs ); - -/****** - * Functions in PclColor.c - ******/ -extern Bool PclCreateDefColormap(ScreenPtr pScreen); -extern Bool PclCreateColormap(ColormapPtr pColor); -extern void PclDestroyColormap(ColormapPtr pColor); -extern void PclInstallColormap(ColormapPtr pColor); -extern void PclUninstallColormap(ColormapPtr pColor); -extern int PclListInstalledColormaps(ScreenPtr pScreen, - XID *pCmapList); -extern void PclStoreColors(ColormapPtr pColor, - int ndef, - xColorItem *pdefs); -extern void PclResolveColor(unsigned short *pRed, - unsigned short *pGreen, - unsigned short *pBlue, - VisualPtr pVisual); -extern int PclUpdateColormap(DrawablePtr pDrawable, - XpContextPtr pCon, - GCPtr gc, - FILE *outFile); -extern void PclLookUp(ColormapPtr cmap, - PclContextPrivPtr cPriv, - unsigned short *r, - unsigned short *g, - unsigned short *b); -extern PclPaletteMapPtr PclFindPaletteMap(PclContextPrivPtr cPriv, - ColormapPtr cmap, - GCPtr gc); -extern unsigned char *PclReadMap(char *, int *); - - -/****** - * Functions in PclCursor.c - ******/ -extern void PclConstrainCursor( - ScreenPtr pScreen, - BoxPtr pBox); -extern void PclCursorLimits( - ScreenPtr pScreen, - CursorPtr pCursor, - BoxPtr pHotBox, - BoxPtr pTopLeftbox); -extern Bool PclDisplayCursor( - ScreenPtr pScreen, - CursorPtr pCursor); -extern Bool PclRealizeCursor( - ScreenPtr pScreen, - CursorPtr pCursor); -extern Bool PclUnrealizeCursor( - ScreenPtr pScreen, - CursorPtr pCursor); -extern void PclRecolorCursor( - ScreenPtr pScreen, - CursorPtr pCursor, - Bool displayed); -extern Bool PclSetCursorPosition( - ScreenPtr pScreen, - int x, - int y, - Bool generateEvent); - -/****** - * Functions in PclSFonts.c - ******/ -extern void -PclDownloadSoftFont8( - FILE *fp, - PclSoftFontInfoPtr pSoftFontInfo, - PclFontHead8Ptr pfh, - PclCharDataPtr pcd, - unsigned char *code); -extern void PclDownloadSoftFont16( - FILE *fp, - PclSoftFontInfoPtr pSoftFontInfo, - PclFontHead16Ptr pfh, - PclCharDataPtr pcd, - unsigned char row, - unsigned char col); -extern PclSoftFontInfoPtr PclCreateSoftFontInfo(void); -extern void PclDestroySoftFontInfo( - PclSoftFontInfoPtr pSoftFontInfo ); - -/****** - * Functions in PclGC.c - ******/ -extern Bool PclCreateGC(GCPtr pGC); -extern void PclDestroyGC(GCPtr pGC); -extern int PclUpdateDrawableGC( - GCPtr pGC, - DrawablePtr pDrawable, - FILE **outFile); -extern void PclValidateGC( - GCPtr pGC, - unsigned long changes, - DrawablePtr pDrawable); -extern void PclSetDrawablePrivateStuff( - DrawablePtr pDrawable, - GC gc ); -extern int PclGetDrawablePrivateStuff( - DrawablePtr pDrawable, - GC *gc, - unsigned long *valid, - FILE **file ); -extern void PclSetDrawablePrivateGC( - DrawablePtr pDrawable, - GC gc); -extern void PclComputeCompositeClip( - GCPtr pGC, - DrawablePtr pDrawable); - -/****** - * Functions in PclInit.c - ******/ -extern Bool PclCloseScreen( - int index, - ScreenPtr pScreen); -extern Bool InitializeColorPclDriver( - int ndx, - ScreenPtr pScreen, - int argc, - char **argv); -extern Bool InitializeMonoPclDriver( - int ndx, - ScreenPtr pScreen, - int argc, - char **argv); -extern Bool InitializeLj3PclDriver( - int ndx, - ScreenPtr pScreen, - int argc, - char **argv); -extern XpContextPtr PclGetContextFromWindow( WindowPtr win ); - -/****** - * Functions in PclLine.c - ******/ -extern void PclPolyLine( - DrawablePtr pDrawable, - GCPtr pGC, - int mode, - int nPoints, - xPoint *pPoints); -extern void PclPolySegment( - DrawablePtr pDrawable, - GCPtr pGC, - int nSegments, - xSegment *pSegments); - -/****** - * Functions in PclMisc.c - ******/ -extern void PclQueryBestSize( - int class, - short *pwidth, - short *pheight, - ScreenPtr pScreen); -extern char *GetPropString(WindowPtr pWin, char *propName); -extern int SystemCmd(char *cmdStr); -extern int PclGetMediumDimensions( - XpContextPtr pCon, - CARD16 *pWidth, - CARD16 *pHeight); -extern int PclGetReproducibleArea( - XpContextPtr pCon, - xRectangle *pRect); -extern void PclSendData( - FILE *outFile, - PclContextPrivPtr pConPriv, - BoxPtr pbox, - int nbox, - double ratio); - -/****** - * Functions in PclPixel.c - ******/ -extern void PclPolyPoint( - DrawablePtr pDrawable, - GCPtr pGC, - int mode, - int nPoints, - xPoint *pPoints); -extern void PclPushPixels( - GCPtr pGC, - PixmapPtr pBitmap, - DrawablePtr pDrawable, - int width, - int height, - int x, - int y); - -/****** - * Functions in PclPixmap.c - ******/ -extern PixmapPtr PclCreatePixmap( - ScreenPtr pScreen, - int width, - int height, - int depth); -extern Bool PclDestroyPixmap(PixmapPtr pPixmap); - -/****** - * Functions in PclPolygon.c - ******/ -extern void PclPolyRectangle( - DrawablePtr pDrawable, - GCPtr pGC, - int nRects, - xRectangle *pRects); -extern void PclFillPolygon( - DrawablePtr pDrawable, - GCPtr pGC, - int shape, - int mode, - int nPoints, - DDXPointPtr pPoints); -extern void PclPolyFillRect( - DrawablePtr pDrawable, - GCPtr pGC, - int nRects, - xRectangle *pRects); - -/****** - * Functions in PclSpans.c - ******/ -extern void PclFillSpans( - DrawablePtr pDrawable, - GCPtr pGC, - int nSpans, - DDXPointPtr pPoints, - int *pWidths, - int fSorted); -extern void PclSetSpans( - DrawablePtr pDrawable, - GCPtr pGC, - char *pSrc, - DDXPointPtr pPoints, - int *pWidths, - int nSpans, - int fSorted); - -/****** - * Functions in PclText.c - ******/ -extern int PclPolyText8( - DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - int count, - char *string); -extern int PclPolyText16( - DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - int count, - unsigned short *string); -extern void PclImageText8( - DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - int count, - char *string); -extern void PclImageText16( - DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - int count, - unsigned short *string); -extern void PclImageGlyphBlt( - DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - unsigned int nGlyphs, - CharInfoPtr *pCharInfo, - pointer pGlyphBase); -extern void PclPolyGlyphBlt( - DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - unsigned int nGlyphs, - CharInfoPtr *pCharInfo, - pointer pGlyphBase); - -/****** - * Functions in PclWindow.c - ******/ -extern Bool PclCreateWindow(register WindowPtr pWin); -extern Bool PclDestroyWindow(WindowPtr pWin); -extern Bool PclMapWindow(WindowPtr pWindow); -extern Bool PclPositionWindow( - register WindowPtr pWin, - int x, - int y); -extern Bool PclUnmapWindow(WindowPtr pWindow); -extern void PclCopyWindow( - WindowPtr pWin, - DDXPointRec ptOldOrg, - RegionPtr prgnSrc); -extern Bool PclChangeWindowAttributes( - register WindowPtr pWin, - register unsigned long mask); - -/****** - * Functions in PclFonts.c - ******/ -extern Bool PclRealizeFont( - ScreenPtr pscr, - FontPtr pFont); -extern Bool PclUnrealizeFont( - ScreenPtr pscr, - FontPtr pFont); - -/****** - * Functions in PclPrint.c - ******/ -extern int PclStartJob( - XpContextPtr pCon, - Bool sendClientData, - ClientPtr client); -extern int PclEndJob( - XpContextPtr pCon, - Bool cancel); -extern int PclStartPage( - XpContextPtr pCon, - WindowPtr pWin); -extern int PclEndPage( - XpContextPtr pCon, - WindowPtr pWin); -extern int PclStartDoc(XpContextPtr pCon, - XPDocumentType type); -extern int PclEndDoc( - XpContextPtr pCon, - Bool cancel); -extern int PclDocumentData( - XpContextPtr pCon, - DrawablePtr pDraw, - char *pData, - int len_data, - char *pFmt, - int len_fmt, - char *pOpt, - int len_opt, - ClientPtr client); -extern int PclGetDocumentData( - XpContextPtr pCon, - ClientPtr client, - int maxBufferSize); - - -#endif /* _PCL_H_ */ diff --git a/hw/xprint/pcl/PclArc.c b/hw/xprint/pcl/PclArc.c deleted file mode 100644 index 20d3f723d..000000000 --- a/hw/xprint/pcl/PclArc.c +++ /dev/null @@ -1,268 +0,0 @@ -/******************************************************************* -** -** ********************************************************* -** * -** * File: PclArc.c -** * -** * Contents: -** * Arc-drawing code for the PCL DDX driver -** * -** * Created: 10/23/95 -** * -** ********************************************************* -** -********************************************************************/ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include - -#include "Pcl.h" -#include "gcstruct.h" -#include "windowstr.h" -#include "attributes.h" - -static void -PclDoArc( - DrawablePtr pDrawable, - GCPtr pGC, - int nArcs, - xArc *pArcs, - void (*DoIt)(FILE *, PclContextPrivPtr, double, double, xArc)) -{ - char t[80]; - FILE *outFile; - int nbox, i; - BoxPtr pbox; - BoxRec r; - RegionPtr drawRegion, region, transClip; - short fudge; - int xoffset, yoffset; - XpContextPtr pCon; - PclContextPrivPtr pConPriv; - xRectangle repro; - - if( PclUpdateDrawableGC( pGC, pDrawable, &outFile ) == FALSE ) - return; - - fudge = 3 * pGC->lineWidth; - - pCon = PclGetContextFromWindow( (WindowPtr) pDrawable ); - pConPriv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - XpGetReproductionArea( pCon, &repro ); - - /* - * Generate the PCL code to draw the collection of arcs, by - * defining it as a macro which uses the HP-GL/2 arc drawing - * function. - */ - - xoffset = pDrawable->x; - yoffset = pDrawable->y; - - for( i = 0; i < nArcs; i++ ) - { - xArc Arc = pArcs[i]; - double b, X, Y, ratio; - double angle1; - - MACRO_START( outFile, pConPriv ); - SAVE_PCL( outFile, pConPriv, "\033%0B" ); - - /* Calculate the start of the arc */ - if( ( Arc.angle1 / 64 ) % 360 == 90 ) - { - X = 0; - Y = -Arc.height / 2.0; - } - else if( ( Arc.angle1 / 64 ) % 360 == 270 ) - { - X = 0; - Y = Arc.height / 2.0; - } - else - { - /* Convert the angle to radians */ - angle1 = ( Arc.angle1 / 64.0 ) * 3.141592654 / 180.0; - - b = (Arc.height / 2.0); - X = b * cos( angle1 ); - Y = -b * sin( angle1 ); - } - - /* Change the coordinate system to scale the ellipse */ - ratio = (double)Arc.height / (double)Arc.width; - - sprintf( t, "SC%.2f,%.2f,%d,%d;", - (repro.x - Arc.width / 2 - xoffset - Arc.x) * ratio, - (repro.x - Arc.width / 2 - xoffset - Arc.x + - repro.width) * ratio, - repro.y - Arc.height / 2 - yoffset - Arc.y + repro.height, - repro.y - Arc.height / 2 - yoffset - Arc.y); - SAVE_PCL( outFile, pConPriv, t ); - - DoIt( outFile, pConPriv, X, Y, Arc ); - - /* Build the bounding box */ - r.x1 = -Arc.width / 2 - fudge; - r.y1 = -Arc.height / 2 - fudge; - r.x2 = Arc.width / 2 + fudge; - r.y2 = Arc.height / 2 + fudge; - drawRegion = REGION_CREATE( pGC->pScreen, &r, 0 ); - - SAVE_PCL( outFile, pConPriv, "\033%0A" ); - MACRO_END( outFile ); - - /* - * Intersect the bounding box with the clip region. - */ - region = REGION_CREATE( pGC->pScreen, NULL, 0 ); - transClip = REGION_CREATE( pGC->pScreen, NULL, 0 ); - REGION_COPY( pGC->pScreen, transClip, pGC->pCompositeClip ); - REGION_TRANSLATE( pGC->pScreen, transClip, - -(xoffset + Arc.x + Arc.width / 2), - -(yoffset + Arc.y + Arc.height / 2) ); - REGION_INTERSECT( pGC->pScreen, region, drawRegion, transClip ); - - /* - * For each rectangle in the clip region, set the HP-GL/2 "input - * window" and render the collection of arcs to it. - */ - pbox = REGION_RECTS( region ); - nbox = REGION_NUM_RECTS( region ); - - PclSendData(outFile, pConPriv, pbox, nbox, ratio); - - /* - * Restore the coordinate system - */ - sprintf( t, "\033%%0BSC%d,%d,%d,%d;\033%%0A", repro.x, - repro.x + repro.width, repro.y + repro.height, - repro.y ); - SEND_PCL( outFile, t ); - - /* - * Clean up the temporary regions - */ - REGION_DESTROY( pGC->pScreen, drawRegion ); - REGION_DESTROY( pGC->pScreen, region ); - REGION_DESTROY( pGC->pScreen, transClip ); - } -} - -/* - * Draw a simple non-filled arc, centered on the origin and starting - * at the given point. - */ -static void -DrawArc(FILE *outFile, - PclContextPrivPtr pConPriv, - double X, - double Y, - xArc A) -{ - char t[80]; - - sprintf( t, "PU%d,%d;PD;AA0,0,%.2f;", (int)X, (int)Y, - (float)A.angle2 / -64.0 ); - SAVE_PCL(outFile, pConPriv, t); -} - -void -PclPolyArc( - DrawablePtr pDrawable, - GCPtr pGC, - int nArcs, - xArc *pArcs) -{ - PclDoArc( pDrawable, pGC, nArcs, pArcs, DrawArc ); -} - -/* - * Draw a filled wedge, from the origin, to the given point, through - * the appropriate angle, and back to the origin. - */ -static void -DoWedge(FILE *outFile, - PclContextPrivPtr pConPriv, - double X, - double Y, - xArc A) -{ - char t[80]; - - sprintf( t, "PU0,0;WG%.2f,%.2f,%.2f;", sqrt( X * X + Y * Y ), - (float)A.angle1 / -64.0, - (float)A.angle2 / -64.0 ); - SAVE_PCL(outFile, pConPriv, t); -} - -static void -DoChord(FILE *outFile, - PclContextPrivPtr pConPriv, - double X, - double Y, - xArc A) -{ - char t[80]; - - sprintf( t, "PU%d,%d;PM0;AA0,0,%.2f;PA%d,%d;PM2;FP;", (int)X, (int)Y, - (float)A.angle2 / -64.0 , (int)X, (int)Y ); - SAVE_PCL(outFile, pConPriv, t); -} - - -void -PclPolyFillArc( - DrawablePtr pDrawable, - GCPtr pGC, - int nArcs, - xArc *pArcs) -{ - switch( pGC->arcMode ) - { - case ArcChord: - PclDoArc( pDrawable, pGC, nArcs, pArcs, DoChord ); - break; - case ArcPieSlice: - PclDoArc( pDrawable, pGC, nArcs, pArcs, DoWedge ); - break; - } -} diff --git a/hw/xprint/pcl/PclArea.c b/hw/xprint/pcl/PclArea.c deleted file mode 100644 index a4e53dad6..000000000 --- a/hw/xprint/pcl/PclArea.c +++ /dev/null @@ -1,436 +0,0 @@ -/******************************************************************* -** -** ********************************************************* -** * -** * File: PclArea.c -** * -** * Contents: -** * Image and Area functions for the PCL DDX driver -** * -** * Created: 10/23/95 -** * -** ********************************************************* -** -********************************************************************/ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include "Pcl.h" -#include "pixmapstr.h" -#include "region.h" - -#include "fb.h" - -void -PclPutImage(DrawablePtr pDrawable, - GCPtr pGC, - int depth, - int x, - int y, - int w, - int h, - int leftPad, - int format, - char *pImage) -{ - PixmapPtr pPixmap; - unsigned long oldFg, oldBg; - XID gcv[3]; - unsigned long oldPlanemask; - unsigned long i; - long bytesPer; - - if( ( w == 0 ) || ( h == 0 ) ) - return; - - if( format != XYPixmap ) - { - pPixmap = GetScratchPixmapHeader( pDrawable->pScreen, - w+leftPad, h, depth, - BitsPerPixel( depth ), - PixmapBytePad( w + leftPad, - depth ), (pointer)pImage ); - if( !pPixmap ) - return; - - if( format == ZPixmap ) - (void)(*pGC->ops->CopyArea)( (DrawablePtr)pPixmap, pDrawable, pGC, - leftPad, 0, w, h, x, y ); - else - (void)(*pGC->ops->CopyPlane)( (DrawablePtr)pPixmap, pDrawable, pGC, - leftPad, 0, w, h, x, y, 1 ); - FreeScratchPixmapHeader( pPixmap ); - } - else - { - pPixmap = GetScratchPixmapHeader( pDrawable->pScreen, - w+leftPad, h, depth, - BitsPerPixel( depth ), - PixmapBytePad( w + leftPad, - depth ), (pointer)pImage ); - - if( !pPixmap ) - return; - - depth = pGC->depth; - oldPlanemask = pGC->planemask; - oldFg = pGC->fgPixel; - oldBg = pGC->bgPixel; - gcv[0] = ~0L; - gcv[1] = 0; - DoChangeGC( pGC, GCForeground | GCBackground, gcv, 0 ); - bytesPer = (long)h * BitmapBytePad( w + leftPad ); - - for( i = 1 << (depth-1); i != 0; i >>= 1, pImage += bytesPer ) - { - if( i & oldPlanemask ) - { - gcv[0] = i; - DoChangeGC( pGC, GCPlaneMask, gcv, 0 ); - ValidateGC( pDrawable, pGC ); - fbPutImage( (DrawablePtr)pPixmap, pGC, 1, x, y, w, h, - leftPad, XYBitmap, pImage ); - } - } - gcv[0] = oldPlanemask; - gcv[1] = oldFg; - gcv[2] = oldBg; - DoChangeGC( pGC, GCPlaneMask | GCForeground | GCBackground, - gcv, 0 ); - - PclCopyArea( (DrawablePtr)pPixmap, pDrawable, pGC, leftPad, - 0, w, h, x, y ); - FreeScratchPixmapHeader( pPixmap ); - } -} - -/* - * PclMonoPixmapFragment() - * - * Given a 1-bit-deep pixmap, send the appropriate part of it to the - * output file as a PCL raster graphics command. - */ -static void -PclMonoPixmapFragment(FILE *outFile, - PixmapPtr pix, - short x1, - short y1, - short x2, - short y2, - short dstx, - short dsty) -{ - char *bits, t[80], *row; - int h, w, i; - - /* - * Create a storage area large enough to hold the entire pixmap, - * then use fbGetImage to get the appropriate bits. - */ - h = y2 - y1; - w = BitmapBytePad( x2 - x1 ); - - bits = (char *)xalloc( h * w ); - fbGetImage( (DrawablePtr)pix, x1, y1, x2 - x1, h, - XYPixmap, ~0, bits ); - - /* - * Move the cursor to the appropriate place on the page. We have - * to jump into HP-GL/2 to do this correctly, then go back to PCL - * for the actual drawing. - */ - sprintf( t, "\033%%0BPU%d,%d;\033%%1A", dstx, dsty ); - SEND_PCL( outFile, t ); - - /* - * Now, wrap the raster in the appropriate PCL code. Right now, - * it's going to go down the wire without any compression. That - * will have to be good enough for the sample implementation. - */ - sprintf( t, "\033*t300R\033*r%dT\033*r%dS\033*r1A\033*b0M", - h, x2 - x1 ); - SEND_PCL( outFile, t ); - - sprintf( t, "\033*b%dW", w ); - for( row = bits, i = 0; i <= h; i++, row += w ) - { - SEND_PCL( outFile, t ); - SEND_PCL_COUNT( outFile, row, w ); - } - - SEND_PCL( outFile, "\033*rC" ); - - /* - * Clean things up a bit - */ - xfree( bits ); -} - -static void -PclColorPixmapFragment(FILE *outFile, - PixmapPtr pix, - short x1, - short y1, - short x2, - short y2, - short dstx, - short dsty) -{ - char *bits, t[80], *row; - int h, w, i; - - /* - * Create a storage area large enough to hold the entire pixmap, - * then use fbGetImage to get the appropriate bits. - */ - h = y2 - y1; - w = PixmapBytePad( x2 - x1, pix->drawable.depth ); - - bits = (char *)xalloc( h * w ); - fbGetImage( (DrawablePtr)pix, x1, y1, x2 - x1, h, ZPixmap, ~0, bits ); - - /* - * Move the cursor to the appropriate place on the page. We have - * to jump into HP-GL/2 to do this correctly, then go back to PCL - * for the actual drawing. - */ - sprintf( t, "\033%%0BPU%d,%d;\033%%1A", dstx, dsty ); - SEND_PCL( outFile, t ); - - /* - * Now, wrap the raster in the appropriate PCL code. Right now, - * it's going to go down the wire without any compression. That - * will have to be good enough for the sample implementation. - */ - sprintf( t, "\033*t300R\033*r%dt%ds1A\033*b0M", - h, x2 - x1 ); - SEND_PCL( outFile, t ); - - sprintf( t, "\033*b%dW", w ); - for( row = bits, i = 0; i < h; i++, row += w ) - { - SEND_PCL( outFile, t ); - SEND_PCL_COUNT( outFile, row, w ); - } - - SEND_PCL( outFile, "\033*rC" ); - - /* - * Clean things up a bit - */ - xfree( bits ); -} - -RegionPtr -PclCopyArea(DrawablePtr pSrc, - DrawablePtr pDst, - GCPtr pGC, - int srcx, - int srcy, - int width, - int height, - int dstx, - int dsty) -{ - PixmapPtr pixSrc = (PixmapPtr)pSrc; -/* - FILE *srcFile; - GC srcGC; -*/ - FILE *dstFile; - GC dstGC; - unsigned long valid; - RegionPtr drawRegion, region, whole, ret; - BoxRec box; - BoxPtr prect; - int nrect; - void (*doFragment)(FILE *, PixmapPtr, short, short, short, short, - short, short ); - - /* - * Since we don't store any information on a per-window basis, we - * can't copy from a window. - */ - if( pSrc->type == DRAWABLE_WINDOW ) - return NULL; - - /* - * If we're copying from a pixmap to a pixmap, we just use the - * fb code to do the work. - */ - if( pDst->type == DRAWABLE_PIXMAP ) - fbCopyArea( pSrc, pDst, pGC, srcx, srcy, width, height, dstx, dsty ); - -/* - PclGetDrawablePrivateStuff( pSrc, &srcGC, &valid, &srcFile ); -*/ - PclGetDrawablePrivateStuff( pDst, &dstGC, &valid, &dstFile ); - - /* - * If we're copying to a window, we have to do some actual - * drawing, instead of just handing it off to fb. Start - * by determining the region that will be drawn. - */ - box.x1 = srcx; - box.y1 = srcy; - box.x2 = srcx + width; - box.y2 = srcy + height; - drawRegion = REGION_CREATE( pGC->pScreen, &box, 0 ); - REGION_TRANSLATE( pGC->pScreen, drawRegion, dstx, dsty ); - - region = REGION_CREATE( pGC->pScreen, NULL, 0 ); - REGION_INTERSECT( pGC->pScreen, region, drawRegion, pGC->pCompositeClip ); - - /* - * Now select the operation to be performed on each box in the - * region. - */ - if( pSrc->depth == 1 ) - doFragment = PclMonoPixmapFragment; - else - doFragment = PclColorPixmapFragment; - - /* - * Actually draw each section of the bitmap. - */ - nrect = REGION_NUM_RECTS( region ); - prect = REGION_RECTS( region ); - - while( nrect ) - { - (*doFragment)( dstFile, (PixmapPtr)pSrc, prect->x1 - dstx, - prect->y1 - dsty, prect->x2 - dstx, - prect->y2 - dsty, prect->x1, prect->y1 ); - - nrect--; - prect++; - } - - /* - * Update the destination's GC to the source's GC. - */ -/* - PclSetDrawablePrivateGC( pDst, srcGC ); -*/ - - /* - * Determine the region that needs to be returned. This is the - * region of the source that falls outside the boundary of the - * pixmap. - */ - box.x1 = 0; - box.y1 = 0; - box.x2 = pixSrc->drawable.width; - box.y2 = pixSrc->drawable.height; - whole = REGION_CREATE( pGC->pScreen, &box, 0 ); - ret = REGION_CREATE( pGC->pScreen, NULL, 0 ); - - REGION_TRANSLATE( pGC->pScreen, drawRegion, -dstx, -dsty ); - REGION_SUBTRACT( pGC->pScreen, ret, drawRegion, whole ); - - /* - * Clean up the regions - */ - REGION_DESTROY( pGC->pScreen, drawRegion ); - REGION_DESTROY( pGC->pScreen, region ); - REGION_DESTROY( pGC->pScreen, whole ); - - if( REGION_NOTEMPTY( pGC->pScreen, ret ) ) - return ret; - else - { - REGION_DESTROY( pGC->pScreen, ret ); - return NULL; - } -} - -RegionPtr -PclCopyPlane(DrawablePtr pSrc, - DrawablePtr pDst, - GCPtr pGC, - int srcx, - int srcy, - int width, - int height, - int dstx, - int dsty, - unsigned long plane) -{ - RegionPtr reg; - GCPtr scratchGC; - PixmapPtr scratchPix; - - /* - * Since we don't store PCL on a per-window basis, there's no good - * way to copy from a window. - */ - if( pSrc->type == DRAWABLE_WINDOW ) - return NULL; - - /* Copying from a pixmap to a pixmap is already implemented by fb. */ - if( pSrc->type == DRAWABLE_PIXMAP && - pDst->type == DRAWABLE_PIXMAP ) - fbCopyPlane( pSrc, pDst, pGC, srcx, srcy, width, height, - dstx, dsty, plane ); - - /* - * We can use fbCopyPlane to do the work of grabbing the plane and - * converting it to the desired visual. Once that's done, we already - * know how to do a CopyArea. - */ - scratchPix = (*pDst->pScreen->CreatePixmap)( pDst->pScreen, width, - height, pDst->depth, - CREATE_PIXMAP_USAGE_SCRATCH ); - - scratchGC = GetScratchGC( pDst->depth, pDst->pScreen ); - CopyGC( pGC, scratchGC, ~0L ); - - fbValidateGC( scratchGC, ~0L, (DrawablePtr)scratchPix ); - fbCopyPlane( pSrc, (DrawablePtr)scratchPix, scratchGC, - srcx, srcy, width, height, 0, 0, plane ); - - reg = PclCopyArea( (DrawablePtr)scratchPix, pDst, pGC, 0, 0, width, - height, dstx, dsty ); - - FreeScratchGC( scratchGC ); - - (*pDst->pScreen->DestroyPixmap)( scratchPix ); - - return reg; -} diff --git a/hw/xprint/pcl/PclAttVal.c b/hw/xprint/pcl/PclAttVal.c deleted file mode 100644 index f0f204764..000000000 --- a/hw/xprint/pcl/PclAttVal.c +++ /dev/null @@ -1,206 +0,0 @@ -/* - */ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "Pcl.h" -#include "AttrValid.h" - -/* - * define valid values and defaults for Printer pool - */ -static XpOid ValidContentOrientationsOids[] = { - xpoid_val_content_orientation_portrait, - xpoid_val_content_orientation_landscape, - xpoid_val_content_orientation_reverse_portrait, - xpoid_val_content_orientation_reverse_landscape -}; -static XpOidList ValidContentOrientations = { - ValidContentOrientationsOids, XpNumber(ValidContentOrientationsOids) -}; - -static XpOid DefaultContentOrientationsOids[] = { - xpoid_val_content_orientation_portrait, - xpoid_val_content_orientation_landscape -}; -static XpOidList DefaultContentOrientations = { - DefaultContentOrientationsOids, XpNumber(DefaultContentOrientationsOids) -}; - -static XpOid ValidPlexesOids[] = { - xpoid_val_plex_simplex, xpoid_val_plex_duplex, xpoid_val_plex_tumble -}; -static XpOidList ValidPlexes = { - ValidPlexesOids, XpNumber(ValidPlexesOids) -}; - -static XpOid DefaultPlexesOids[] = { - xpoid_val_plex_simplex -}; -static XpOidList DefaultPlexes = { - DefaultPlexesOids, XpNumber(DefaultPlexesOids) -}; - -static unsigned long ValidPrinterResolutionsCards[] = { - 300 -}; -static XpOidCardList ValidPrinterResolutions = { - ValidPrinterResolutionsCards, XpNumber(ValidPrinterResolutionsCards) -}; - -static unsigned long DefaultPrinterResolutionsCards[] = { - 300 -}; -static XpOidCardList DefaultPrinterResolutions = { - DefaultPrinterResolutionsCards, XpNumber(DefaultPrinterResolutionsCards) -}; - -static XpOid ValidListfontsModesOids[] = { - xpoid_val_xp_list_internal_printer_fonts, xpoid_val_xp_list_glyph_fonts -}; -static XpOidList ValidListfontsModes = { - ValidListfontsModesOids, XpNumber(ValidListfontsModesOids) -}; - -static XpOid DefaultListfontsModesOids[] = { - xpoid_val_xp_list_glyph_fonts -}; -static XpOidList DefaultListfontsModes = { - DefaultListfontsModesOids, XpNumber(DefaultListfontsModesOids) -}; - -static XpOid ValidSetupProvisoOids[] = { - xpoid_val_xp_setup_mandatory, xpoid_val_xp_setup_optional -}; -static XpOidList ValidSetupProviso = { - - - ValidSetupProvisoOids, XpNumber(ValidSetupProvisoOids) -}; - -static XpOidDocFmt ValidDocFormatsSupportedFmts[] = { - { "PCL", "5", NULL }, -}; -static XpOidDocFmtList ValidDocFormatsSupported = { - ValidDocFormatsSupportedFmts, XpNumber(ValidDocFormatsSupportedFmts) -}; - -static XpOidDocFmt DefaultDocFormatsSupportedFmts[] = { - { "PCL", "5", NULL } -}; -static XpOidDocFmtList DefaultDocFormatsSupported = { - DefaultDocFormatsSupportedFmts, XpNumber(DefaultDocFormatsSupportedFmts) -}; - -static XpOidDocFmt ValidEmbeddedFormatsSupportedFmts[] = { - { "HPGL", "2", NULL }, -}; -static XpOidDocFmtList ValidEmbeddedFormatsSupported = { - ValidEmbeddedFormatsSupportedFmts, XpNumber(ValidEmbeddedFormatsSupportedFmts) -}; - -static XpOidDocFmt DefaultEmbeddedFormatsSupportedFmts[] = { - { "HPGL", "2", NULL } -}; -static XpOidDocFmtList DefaultEmbeddedFormatsSupported = { - DefaultEmbeddedFormatsSupportedFmts, XpNumber(DefaultEmbeddedFormatsSupportedFmts) -}; - -static XpOidDocFmt ValidRawFormatsSupportedFmts[] = { - { "PCL", "5", NULL }, - { "Postscript", "2", NULL }, - { "ASCII", NULL, NULL } - -}; -static XpOidDocFmtList ValidRawFormatsSupported = { - ValidRawFormatsSupportedFmts, XpNumber(ValidRawFormatsSupportedFmts) -}; - -static XpOidDocFmt DefaultRawFormatsSupportedFmts[] = { - { "PCL", "5", NULL } -}; -static XpOidDocFmtList DefaultRawFormatsSupported = { - DefaultRawFormatsSupportedFmts, XpNumber(DefaultRawFormatsSupportedFmts) -}; - -static XpOid ValidInputTraysOids[] = { - xpoid_val_input_tray_manual, - xpoid_val_input_tray_main, - xpoid_val_input_tray_envelope, - xpoid_val_input_tray_large_capacity, - xpoid_val_input_tray_bottom -}; -static XpOidList ValidInputTrays = { - ValidInputTraysOids, XpNumber(ValidInputTraysOids) -}; - -static XpOid ValidMediumSizesOids[] = { - xpoid_val_medium_size_iso_a3, - xpoid_val_medium_size_iso_a4, - xpoid_val_medium_size_na_letter, - xpoid_val_medium_size_na_legal, - xpoid_val_medium_size_executive, - xpoid_val_medium_size_ledger, - xpoid_val_medium_size_iso_c5, - xpoid_val_medium_size_iso_designated_long, - xpoid_val_medium_size_na_number_10_envelope, - xpoid_val_medium_size_monarch_envelope, - xpoid_val_medium_size_jis_b5, -}; -static XpOidList ValidMediumSizes = { - ValidMediumSizesOids, XpNumber(ValidMediumSizesOids) -}; - -static XpOidDocFmt DefaultDocumentFormat = { - "PCL", "5", NULL -}; - - -/* - * init struct for XpValidate*Pool - */ -XpValidatePoolsRec PclValidatePoolsRec = { - &ValidContentOrientations, &DefaultContentOrientations, - &ValidDocFormatsSupported, &DefaultDocFormatsSupported, - &ValidInputTrays, &ValidMediumSizes, - &ValidPlexes, &DefaultPlexes, - &ValidPrinterResolutions, &DefaultPrinterResolutions, - &ValidEmbeddedFormatsSupported, &DefaultEmbeddedFormatsSupported, - &ValidListfontsModes, &DefaultListfontsModes, - &ValidRawFormatsSupported, &DefaultRawFormatsSupported, - &ValidSetupProviso, - &DefaultDocumentFormat -}; diff --git a/hw/xprint/pcl/PclAttr.c b/hw/xprint/pcl/PclAttr.c deleted file mode 100644 index b27bf4fce..000000000 --- a/hw/xprint/pcl/PclAttr.c +++ /dev/null @@ -1,86 +0,0 @@ -/******************************************************************* -** -** ********************************************************* -** * -** * File: PclAttr.c -** * -** * Contents: -** * Attribute-handling functions for the PCL driver -** * -** * Created: 2/2/96 -** * -** ********************************************************* -** -********************************************************************/ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "Pcl.h" -#include "attributes.h" - -char * -PclGetAttributes( - XpContextPtr pCon, - XPAttributes pool ) -{ - return XpGetAttributes( pCon, pool ); -} - -char * -PclGetOneAttribute( - XpContextPtr pCon, - XPAttributes pool, - char *attr ) -{ - return XpGetOneAttribute( pCon, pool, attr ); -} -int -PclAugmentAttributes( - XpContextPtr pCon, - XPAttributes pool, - char *attrs ) -{ - return XpAugmentAttributes( pCon, pool, attrs ); -} - -int -PclSetAttributes( - XpContextPtr pCon, - XPAttributes pool, - char *attrs ) -{ - return XpSetAttributes( pCon, pool, attrs ); -} diff --git a/hw/xprint/pcl/PclColor.c b/hw/xprint/pcl/PclColor.c deleted file mode 100644 index 5e8ffa63c..000000000 --- a/hw/xprint/pcl/PclColor.c +++ /dev/null @@ -1,851 +0,0 @@ -/******************************************************************* -** -** ********************************************************* -** * -** * File: PclColorInit.c -** * -** * Contents: -** * Colormap handing code of Pcl driver for the -** * print server. -** * -** * Created: 4/8/96 -** * -** ********************************************************* -** -********************************************************************/ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include -#include -#include - -#include "colormapst.h" -#include "windowstr.h" -#include "resource.h" - -#include "Pcl.h" -#include "fb.h" - -static void lookup(unsigned char *src, - unsigned char *dst, - int num, - unsigned char *map, - int dim); -static void trilinear(unsigned char *p, - unsigned char *out, - unsigned char *d, - int dim, - unsigned char def); - - -/* - * This seems to be (and is) a duplication of effort; one would think - * that fbCreateDefColormap would be sufficient. It almost is. The - * only change made in this function is that the black and white pixels - * are allocated with three separate variables for red, green and blue - * values, instead of the single variable in fbCreateDefColormap. The - * single variable leads to the one value being corrected by - * ResolveColor three times, which leads to incorrect colors. - */ - -Bool -PclCreateDefColormap(ScreenPtr pScreen) -{ - unsigned short wp_red = ~0, wp_green = ~0, wp_blue = ~0; - unsigned short bp_red = 0, bp_green = 0, bp_blue = 0; - VisualPtr pVisual; - ColormapPtr cmap; - Pixel wp, bp; - - for (pVisual = pScreen->visuals; - pVisual->vid != pScreen->rootVisual; - pVisual++) - ; - - if (CreateColormap(pScreen->defColormap, pScreen, pVisual, &cmap, - (pVisual->class & DynamicClass) ? AllocNone : AllocAll, - 0) - != Success) - return FALSE; - wp = pScreen->whitePixel; - bp = pScreen->blackPixel; - if ((AllocColor(cmap, &wp_red, &wp_green, &wp_blue, &wp, 0) != - Success) || - (AllocColor(cmap, &bp_red, &bp_green, &bp_blue, &bp, 0) != - Success)) - return FALSE; - - pScreen->whitePixel = wp; - pScreen->blackPixel = bp; - - (*pScreen->InstallColormap)(cmap); - return TRUE; -} - -/* - * Add colormap to list of colormaps on screen - */ -Bool -PclCreateColormap(ColormapPtr pColor) -{ - PclCmapToContexts *new; - PclScreenPrivPtr sPriv; - - sPriv = (PclScreenPrivPtr) - dixLookupPrivate(&pColor->pScreen->devPrivates, PclScreenPrivateKey); - - /* - * Use existing code to initialize the values in the colormap - */ - fbInitializeColormap( pColor ); - - /* - * Set up the mapping between the color map and the context - */ - new = (PclCmapToContexts *)xalloc( sizeof( PclCmapToContexts ) ); - - if( new ) - { - new->colormapId = pColor->mid; - new->contexts = NULL; - new->next = sPriv->colormaps; - sPriv->colormaps = new; - - return TRUE; - } - else - return FALSE; -} - -void -PclDestroyColormap(ColormapPtr pColor) -{ - PclScreenPrivPtr sPriv; - PclCmapToContexts *pCmap, *tCmap = 0; - PclContextListPtr con, tCon; - PclContextPrivPtr cPriv; - PclPaletteMapPtr pPal; - char t[80]; - - /* - * At DestroyContext time, colormaps may be destroyed twice, so if the - * pointer is NULL, just crash out. - */ - if( !pColor ) - return; - - /* - * Find the colormap <-> contexts mapping - */ - sPriv = (PclScreenPrivPtr) - dixLookupPrivate(&pColor->pScreen->devPrivates, PclScreenPrivateKey); - pCmap = sPriv->colormaps; - while( pCmap ) - { - if( pCmap->colormapId == pColor->mid ) - break; - tCmap = pCmap; - pCmap = pCmap->next; - } - - /* - * For each context, delete the palette in the printer and - * free the mapping. - */ - if( pCmap ) - { - con = pCmap->contexts; - while( con ) - { - cPriv = dixLookupPrivate(&con->context->devPrivates, - PclContextPrivateKey); - pPal = cPriv->palettes; - while( pPal ) - { - if( pPal->colormapId == pColor->mid ) - break; - pPal = pPal->next; - } - - if( cPriv->pPageFile ) - { - sprintf( t, "\033&p%dI\033*p2C", pPal->paletteId ); - SEND_PCL( cPriv->pPageFile, t ); - } - - tCon = con; - con = con->next; - xfree( tCon ); - } - - /* - * Delete the colormap<->contexts mapping - */ - if( sPriv->colormaps == pCmap ) - /* Delete from the front */ - sPriv->colormaps = pCmap->next; - else - /* Delete from the middle */ - tCmap->next = pCmap->next; - free( pCmap ); - } -} - -void -PclInstallColormap(ColormapPtr pColor) -{ -} - -void -PclUninstallColormap(ColormapPtr pColor) -{ -} - -int -PclListInstalledColormaps(ScreenPtr pScreen, - XID *pCmapList) -{ - return 0; -} - -void -PclStoreColors(ColormapPtr pColor, - int ndef, - xColorItem *pdefs) -{ - PclCmapToContexts *p; - PclScreenPrivPtr sPriv; - PclContextListPtr con; - PclContextPrivPtr cPriv; - PclPaletteMapPtr pMap; - char t[80]; - int i; - - sPriv = (PclScreenPrivPtr) - dixLookupPrivate(&pColor->pScreen->devPrivates, PclScreenPrivateKey); - p = sPriv->colormaps; - while( p ) - { - if( p->colormapId == pColor->mid ) - break; - p = p->next; - } - - if( p ) - { - con = p->contexts; - while( con ) - { - /* - * For each context, get the palette ID and update the - * appropriate palette. - */ - cPriv = dixLookupPrivate(&con->context->devPrivates, - PclContextPrivateKey); - pMap = PclFindPaletteMap( cPriv, pColor, NULL ); - - /* - * Update the palette - */ - sprintf( t, "\033&p%dS", pMap->paletteId ); - SEND_PCL( cPriv->pPageFile, t ); - - if( pColor->class == PseudoColor ) - { - unsigned short r, g, b; - unsigned int pID; - for( i = 0; i < ndef; i++ ) - { - pID = pdefs[i].pixel; - if ( pColor->red[i].fShared ) - { - r = pColor->red[pID].co.shco.red->color; - g = pColor->red[pID].co.shco.green->color; - b = pColor->red[pID].co.shco.blue->color; - } - else - { - r = pColor->red[pID].co.local.red; - g = pColor->red[pID].co.local.green; - b = pColor->red[pID].co.local.blue; - } - - if( pdefs[i].flags & DoRed ) - r = pdefs[i].red; - if( pdefs[i].flags & DoGreen ) - g = pdefs[i].green; - if( pdefs[i].flags & DoBlue ) - b = pdefs[i].blue; - PclLookUp(pColor, cPriv, &r, &g, &b); - sprintf( t, "\033*v%ua%ub%uc%dI", r, g, b, pID); - SEND_PCL( cPriv->pPageFile, t ); - } - } - - sprintf( t, "\033&p%dS", cPriv->currentPalette ); - SEND_PCL( cPriv->pPageFile, t ); - - con = con->next; - } - } -} - -void -PclResolveColor(unsigned short *pRed, - unsigned short *pGreen, - unsigned short *pBlue, - VisualPtr pVisual) -{ - /* - * We need to map the X color range of [0,65535] to the PCL color - * range of [0,32767]. - */ - *pRed >>= 1; - *pGreen >>= 1; - *pBlue >>= 1; -} - -PclPaletteMapPtr -PclFindPaletteMap(PclContextPrivPtr cPriv, - ColormapPtr cmap, - GCPtr gc) -{ - PclPaletteMapPtr p = cPriv->palettes, new; - - /* - * If the colormap is static, grab one of the special palettes. If we come - * into this from StoreColors, there will be no GC, but by definition we're - * looking at a dynamic color map, so the special colors will not be - * needed. - */ - if( gc ) - { - if( cmap->pVisual->class == StaticGray ) - return &( cPriv->staticGrayPalette ); - else if( cmap->pVisual->class == TrueColor ) - { - if( gc->fillStyle == FillTiled && !( gc->tileIsPixel ) ) - return &( cPriv->specialTrueColorPalette ); - else - return &( cPriv->trueColorPalette ); - } - } - - - /* Look for the colormap ID <-> palette ID mapping */ - while( p ) - { - if( p->colormapId == cmap->mid ) - return p; - p = p->next; - } - - /* If the colormap isn't already there, make an entry for it */ - new = (PclPaletteMapPtr)xalloc( sizeof( PclPaletteMap ) ); - new->colormapId = cmap->mid; - new->paletteId = cPriv->nextPaletteId++; - new->downloaded = 0; - new->next = cPriv->palettes; - cPriv->palettes = new; - return new; -} - -int -PclUpdateColormap(DrawablePtr pDrawable, - XpContextPtr pCon, - GCPtr gc, - FILE *outFile) -{ - PclScreenPrivPtr sPriv; - - PclContextPrivPtr cPriv; - PclPaletteMapPtr pMap; - PclCmapToContexts *pCmap; - PclContextListPtr new; - char t[80]; - Colormap c; - ColormapPtr cmap; - WindowPtr win = (WindowPtr)pDrawable; - unsigned short r, g, b, rr, gg, bb; - int i; - - cPriv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - - c = wColormap( win ); - cmap = (ColormapPtr)LookupIDByType( c, RT_COLORMAP ); - pMap = PclFindPaletteMap( cPriv, cmap, gc ); - - if( cPriv->currentPalette == pMap->paletteId ) - /* - * If the requested colormap is already active, nothing needs to - * be done. - */ - return FALSE; - - /* - * Now we activate the palette in the printer - */ - sprintf( t, "\033&p%dS", pMap->paletteId ); - SEND_PCL( outFile, t ); - cPriv->currentPalette = pMap->paletteId; - - if( pMap->downloaded == 0 ) - /* - * If the requested colormap has not been downloaded to the - * printer, we need to do that before activating it. - */ - { - /* - * Add the colormap to the screen-level colormap<->context mapping. - */ - sPriv = (PclScreenPrivPtr) - dixLookupPrivate(&cmap->pScreen->devPrivates, - PclScreenPrivateKey); - pCmap = sPriv->colormaps; - while( pCmap && ( pCmap->colormapId != cmap->mid ) ) - pCmap = pCmap->next; - new = (PclContextListPtr)xalloc( sizeof( PclContextList ) ); - new->context = pCon; - new->next = pCmap->contexts; - pCmap->contexts = new; - - /* - * XXX Download the colormap - */ - if( cmap->class == StaticGray ) - { -#ifdef XP_PCL_COLOR - sprintf( t, "\033*v18W%c%c%c%c%c%c", 0, 1, 1, 1, 1, 1 ); - SEND_PCL_COUNT( cPriv->pPageFile, t, 12 ); - - /* Send the white reference point... */ - sprintf( t, "%c%c%c%c%c%c", 0x7f, 0xff, 0x7f, 0xff, - 0x7f, 0xff ); - SEND_PCL_COUNT( cPriv->pPageFile, t, 6 ); - - /* ... and the black reference point */ - sprintf( t, "%c%c%c%c%c%c", 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00 ); - SEND_PCL_COUNT( cPriv->pPageFile, t, 6 ); - - /* Now program the two colors */ - sprintf( t, "\033*v0a0b0c%ldI", (long) cmap->pScreen->blackPixel ); - SEND_PCL( cPriv->pPageFile, t ); - sprintf( t, "\033*v32767a32767b32767c%ldI", - (long) cmap->pScreen->whitePixel ); - SEND_PCL( cPriv->pPageFile, t ); -#endif /* XP_PCL_COLOR */ - } - else if( cmap->class == PseudoColor ) - { - sprintf( t, - "\033*v18W%c%c%c%c%c%c", - 0, 1, cmap->pVisual->nplanes, 16, 16, 16 ); - SEND_PCL_COUNT( cPriv->pPageFile, t, 12 ); - - /* Send the white reference point... */ - if ( cPriv->ctbl != NULL ) - sprintf( t, "%c%c%c%c%c%c", 0x00, 0xff, 0x00, 0xff, - 0x00, 0xff ); - else - sprintf( t, "%c%c%c%c%c%c", 0x7f, 0xff, 0x7f, 0xff, - 0x7f, 0xff ); - SEND_PCL_COUNT( cPriv->pPageFile, t, 6 ); - - /* ... and the black reference point */ - sprintf( t, "%c%c%c%c%c%c", 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00 ); - SEND_PCL_COUNT( cPriv->pPageFile, t, 6 ); - - for(i = 0; i < cmap->pVisual->ColormapEntries; i++ ) - { - if( cmap->red[i].fShared ) - { - r = cmap->red[i].co.shco.red->color; - g = cmap->red[i].co.shco.green->color; - b = cmap->red[i].co.shco.blue->color; - } - else - { - r = cmap->red[i].co.local.red; - g = cmap->red[i].co.local.green; - b = cmap->red[i].co.local.blue; - } - PclLookUp(cmap, cPriv, &r, &g, &b); - sprintf( t, "\033*v%ua%ub%uc%dI", r, g, b, i ); - SEND_PCL( outFile, t ); - } - } - else if( cmap->class == TrueColor ) - { - unsigned short lim; - - if( gc->fillStyle == FillTiled && !( gc->tileIsPixel ) ) - { - if( cPriv->ctbl != NULL ) - { - /* Send the "special" colormap for 24-bit fills */ - sprintf( t, "\033*v18W%c%c%c%c%c%c", 0, 1, - 8, - cmap->pVisual->bitsPerRGBValue, - cmap->pVisual->bitsPerRGBValue, - cmap->pVisual->bitsPerRGBValue ); - SEND_PCL_COUNT( cPriv->pPageFile, t, 12 ); - - /* Send the white reference point... */ - sprintf( t, "%c%c%c%c%c%c", - 0x00, 0xff, - 0x00, 0xff, - 0x00, 0xff ); - SEND_PCL_COUNT( cPriv->pPageFile, t, 6 ); - - /* ... and the black reference point */ - sprintf( t, "%c%c%c%c%c%c", - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00 ); - SEND_PCL_COUNT( cPriv->pPageFile, t, 6 ); - - /* Now send the color entries, RRRGGGBB */ - i=0; - for( r = 0; r < 8; r++ ) - for( g = 0; g < 8; g ++ ) - for( b = 0; b < 4; b++ ) - { - rr = (r * 0xff)/7; - gg = (g * 0xff)/7; - bb = (b * 0xff)/3; - PclLookUp(cmap, cPriv, &rr, &gg, &bb); - sprintf( t, "\033*v%ua%ub%uc%dI", - rr, gg, bb, i ); - SEND_PCL( outFile, t ); - i++; - } - } - else - { - /* Send the "special" colormap for 24-bit fills */ - sprintf( t, "\033*v18W%c%c%c%c%c%c", 0, 1, - 8, - cmap->pVisual->bitsPerRGBValue, - cmap->pVisual->bitsPerRGBValue, - cmap->pVisual->bitsPerRGBValue ); - SEND_PCL_COUNT( cPriv->pPageFile, t, 12 ); - - /* Send the white reference point... */ - sprintf( t, "%c%c%c%c%c%c", - 0x00, 0x07, - 0x00, 0x07, - 0x00, 0x03 ); - SEND_PCL_COUNT( cPriv->pPageFile, t, 6 ); - - /* ... and the black reference point */ - sprintf( t, "%c%c%c%c%c%c", - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00 ); - SEND_PCL_COUNT( cPriv->pPageFile, t, 6 ); - - /* Now send the color entries, RRRGGGBB */ - i=0; - for( r = 0; r < 8; r++ ) - for( g = 0; g < 8; g ++ ) - for( b = 0; b < 4; b++ ) - { - sprintf( t, "\033*v%ua%ub%uc%dI", - r, g, b, i ); - SEND_PCL( outFile, t ); - i++; - } - } - - } - else - { - lim = (1 << cmap->pVisual->bitsPerRGBValue) - 1; - - /* Send the "special" colormap for 24-bit fills */ - sprintf( t, "\033*v18W%c%c%c%c%c%c", 0, 3, - cmap->pVisual->nplanes, - cmap->pVisual->bitsPerRGBValue, - cmap->pVisual->bitsPerRGBValue, - cmap->pVisual->bitsPerRGBValue ); - SEND_PCL_COUNT( cPriv->pPageFile, t, 12 ); - - /* Send the white reference point... */ - sprintf( t, "%c%c%c%c%c%c", - (lim >> 8) & 0xff, lim & 0xff, - (lim >> 8) & 0xff, lim & 0xff, - (lim >> 8) & 0xff, lim & 0xff); - SEND_PCL_COUNT( cPriv->pPageFile, t, 6 ); - - /* ... and the black reference point */ - sprintf( t, "%c%c%c%c%c%c", 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00 ); - SEND_PCL_COUNT( cPriv->pPageFile, t, 6 ); - } - - } - pMap->downloaded = 1; - } - return TRUE; - -} - -void PclLookUp( - ColormapPtr cmap, - PclContextPrivPtr cPriv, - unsigned short *r, - unsigned short *g, - unsigned short *b -) -{ - unsigned char cdata[3]; - - if( cmap->class == PseudoColor ) - { - if( cPriv->ctbl != NULL ) - { - cdata[0] = *r >> 8; - cdata[1] = *g >> 8; - cdata[2] = *b >> 8; - lookup(cdata, cdata, 1, cPriv->ctbl, cPriv->ctbldim); - *r = cdata[0]; - *g = cdata[1]; - *b = cdata[2]; - } - else - { - *r >>= 1; - *g >>= 1; - *b >>= 1; - } - } - else if( cmap->class == TrueColor ) - { - if( cPriv->ctbl != NULL ) - { - cdata[0] = *r; - cdata[1] = *g; - cdata[2] = *b; - lookup(cdata, cdata, 1, cPriv->ctbl, cPriv->ctbldim); - *r = cdata[0]; - *g = cdata[1]; - *b = cdata[2]; - } - } - return; -} - -unsigned char *PclReadMap(char *name, int *dim) -{ - FILE *fp; - unsigned char *data; - long size; - - if ((fp=fopen(name, "r")) == NULL) { - return(NULL); - } - - fseek(fp, 0, SEEK_END); - size = ftell(fp); - - /* Could do this with a lookup table, if the constraint is that the - 3 map dimensions must be equal. */ - switch (size) { - case 8*8*8*3: - *dim = 8; - break; - case 16*16*16*3: - *dim = 16; - break; - case 17*17*17*3: - *dim = 17; - break; - case 65*65*65*3: - *dim = 65; - break; - default: - fclose(fp); - return(NULL); - } - - if ((data = (unsigned char *) xalloc(sizeof(char) * size)) == NULL) { - fclose(fp); - return(NULL); - } - - fseek(fp, 0, SEEK_SET); - - if (fread(data, sizeof(char), size, fp) != (unsigned) size) { - fclose(fp); - free(data); - return(NULL); - } - - fclose(fp); - return(data); -} - -/************************************************************************ - * - * Here is the mapper. - * - ************************************************************************/ - -#define SCL(x) ((x)*(dim-1)/255) -/* Interleaved-map lookup */ -static void lookup(unsigned char *src, unsigned char *dst, int num, unsigned char *map, int dim) -{ - int i; - -#define _INTERPOLATE -#ifndef _INTERPOLATE - unsigned char *p1, *p2, *p3; - - for (i=0; i>8)) - -static void trilinear(unsigned char *p, unsigned char *out, unsigned char *d, int dim, unsigned char def) -{ -#define DENS(X, Y, Z, ch) d[((X*dim+Y)*dim+Z)*3+ch] - - int x0, y0, z0, - x1, y1, z1, - i; - unsigned char *dp, - fx, fy, fz, - d000, d001, d010, d011, - d100, d101, d110, d111, - dx00, dx01, dx10, dx11, - dxy0, dxy1; - float scale; - - scale = 255.0 / (dim-1); - - x0 = p[0] / scale; - y0 = p[1] / scale; - z0 = p[2] / scale; - - /* Fractions should range from 0-1.0 (fixed point 8-256) */ - fx = (((int) (p[0] - x0 * scale)) << 8) / 255; - fy = (((int) (p[1] - y0 * scale)) << 8) / 255; - fz = (((int) (p[2] - z0 * scale)) << 8) / 255; - - x1 = x0 + 1; - y1 = y0 + 1; - z1 = z0 + 1; - - for (i=0; i<3; i++) { - - if (x0 >= 0 && x1 < dim && - y0 >= 0 && y1 < dim && - z0 >= 0 && z1 < dim) { - dp = &DENS(x0, y0, z0, i); - d000 = dp[0]; - d100 = dp[3]; - dp += dim*3; - d010 = dp[0]; - d110 = dp[3]; - dp += dim*dim*3; - d011 = dp[0]; - d111 = dp[3]; - dp -= dim*3; - d001 = dp[0]; - d101 = dp[3]; - } else { -# define INRANGE(X, Y, Z) \ - ((X) >= 0 && (X) < dim && \ - (Y) >= 0 && (Y) < dim && \ - (Z) >= 0 && (Z) < dim) - - d000 = INRANGE(x0, y0, z0) ? DENS(x0, y0, z0, i) : def; - d001 = INRANGE(x0, y0, z1) ? DENS(x0, y0, z1, i) : def; - d010 = INRANGE(x0, y1, z0) ? DENS(x0, y1, z0, i) : def; - d011 = INRANGE(x0, y1, z1) ? DENS(x0, y1, z1, i) : def; - - d100 = INRANGE(x1, y0, z0) ? DENS(x1, y0, z0, i) : def; - d101 = INRANGE(x1, y0, z1) ? DENS(x1, y0, z1, i) : def; - d110 = INRANGE(x1, y1, z0) ? DENS(x1, y1, z0, i) : def; - d111 = INRANGE(x1, y1, z1) ? DENS(x1, y1, z1, i) : def; - } - - dx00 = LERP(fx, d000, d100); - dx01 = LERP(fx, d001, d101); - dx10 = LERP(fx, d010, d110); - dx11 = LERP(fx, d011, d111); - - dxy0 = LERP(fy, dx00, dx10); - dxy1 = LERP(fy, dx01, dx11); - - out[i] = LERP(fz, dxy0, dxy1); - } -} - diff --git a/hw/xprint/pcl/PclCursor.c b/hw/xprint/pcl/PclCursor.c deleted file mode 100644 index a3eeb1610..000000000 --- a/hw/xprint/pcl/PclCursor.c +++ /dev/null @@ -1,113 +0,0 @@ -/******************************************************************* -** -** ********************************************************* -** * -** * File: PclCursor.c -** * -** * Contents: -** * Cursor-handling code for the PCL DDX driver -** * -** * Created: 1/18/96 -** * -** ********************************************************* -** -********************************************************************/ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include - -#include "Pcl.h" -#include "gcstruct.h" -#include "windowstr.h" - -void -PclConstrainCursor( - ScreenPtr pScreen, - BoxPtr pBox) -{ -} - -void -PclCursorLimits( - ScreenPtr pScreen, - CursorPtr pCursor, - BoxPtr pHotBox, - BoxPtr pTopLeftBox) -{ -} - -Bool -PclDisplayCursor( - ScreenPtr pScreen, - CursorPtr pCursor) -{ - return True; -} - -Bool -PclRealizeCursor( - ScreenPtr pScreen, - CursorPtr pCursor) -{ - return True; -} - -Bool -PclUnrealizeCursor( - ScreenPtr pScreen, - CursorPtr pCursor) -{ - return True; -} - -void -PclRecolorCursor( - ScreenPtr pScreen, - CursorPtr pCursor, - Bool displayed) -{ -} - -Bool -PclSetCursorPosition( - ScreenPtr pScreen, - int x, - int y, - Bool generateEvent) -{ - return True; -} diff --git a/hw/xprint/pcl/PclDef.h b/hw/xprint/pcl/PclDef.h deleted file mode 100644 index dcd54c4fe..000000000 --- a/hw/xprint/pcl/PclDef.h +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************* -** -** ********************************************************* -** * -** * File: PclDef.h -** * -** * Contents: extran defines and includes for the Pcl driver -** * for a printing X server. -** * -** * Created: 7/31/95 -** * -** ********************************************************* -** -********************************************************************/ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _PCLDEF_H_ -#define _PCLDEF_H_ - -#define DT_PRINT_JOB_HEADER "DT_PRINT_JOB_HEADER" -#define DT_PRINT_JOB_TRAILER "DT_PRINT_JOB_TRAILER" -#define DT_PRINT_JOB_COMMAND "DT_PRINT_JOB_COMMAND" -#define DT_PRINT_JOB_EXEC_COMMAND "DT_PRINT_JOB_EXEC_COMMAND" -#define DT_PRINT_JOB_EXEC_OPTIONS "DT_PRINT_JOB_EXEC_OPTION" -#define DT_PRINT_PAGE_HEADER "DT_PRINT_PAGE_HEADER" -#define DT_PRINT_PAGE_TRAILER "DT_PRINT_PAGE_TRAILER" -#define DT_PRINT_PAGE_COMMAND "DT_PRINT_PAGE_COMMAND" - -#define DT_IN_FILE_STRING "%(InFile)%" -#define DT_OUT_FILE_STRING "%(OutFile)%" -#define DT_ALLOWED_COMMANDS_FILE "printCommands" - -#endif /* _PCLDEF_H_ */ diff --git a/hw/xprint/pcl/PclFonts.c b/hw/xprint/pcl/PclFonts.c deleted file mode 100644 index 9e993f79c..000000000 --- a/hw/xprint/pcl/PclFonts.c +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************* -** -** ********************************************************* -** * -** * File: PclFonts.c -** * -** * Contents: -** * Font code for Pcl driver. -** * -** * Created: 2/03/95 -** * -** ********************************************************* -** -********************************************************************/ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "regionstr.h" -#include -#include "dixfontstr.h" -#include "scrnintstr.h" - -#include "Pcl.h" - -Bool -PclRealizeFont( - ScreenPtr pscr, - FontPtr pFont) -{ - return TRUE; -} - -Bool -PclUnrealizeFont( - ScreenPtr pscr, - FontPtr pFont) -{ - return TRUE; -} diff --git a/hw/xprint/pcl/PclGC.c b/hw/xprint/pcl/PclGC.c deleted file mode 100644 index fbadf5d5d..000000000 --- a/hw/xprint/pcl/PclGC.c +++ /dev/null @@ -1,971 +0,0 @@ -/******************************************************************* -** -** ********************************************************* -** * -** * File: PclGC.c -** * -** * Contents: -** * Graphics Context handling for the PCL driver -** * -** * Created: 10/11/95 -** * -** ********************************************************* -** -********************************************************************/ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "gcstruct.h" - -#include "Pcl.h" -#include "pixmapstr.h" -#include "colormapst.h" -#include "windowstr.h" -#include "fb.h" -#include "scrnintstr.h" -#include "resource.h" - -static GCOps PclGCOps = -{ - PclFillSpans, - PclSetSpans, - PclPutImage, - PclCopyArea, - PclCopyPlane, - PclPolyPoint, - PclPolyLine, - PclPolySegment, - PclPolyRectangle, - PclPolyArc, - PclFillPolygon, - PclPolyFillRect, - PclPolyFillArc, - PclPolyText8, - PclPolyText16, - PclImageText8, - PclImageText16, - PclImageGlyphBlt, - PclPolyGlyphBlt, - PclPushPixels -} -; - - -static GCFuncs PclGCFuncs = -{ - PclValidateGC, - miChangeGC, - miCopyGC, - PclDestroyGC, - miChangeClip, - miDestroyClip, - miCopyClip, -} -; - -Bool -PclCreateGC(GCPtr pGC) -{ - if (fbCreateGC(pGC) == FALSE) - return FALSE; - - pGC->clientClip = NULL; - pGC->clientClipType = CT_NONE; - - pGC->ops = &PclGCOps; - pGC->funcs = &PclGCFuncs; - - return TRUE; -} - -void -PclDestroyGC(GCPtr pGC) -{ - /* fb doesn't specialize DestroyGC */ - miDestroyGC( pGC ); -} - - -int -PclGetDrawablePrivateStuff( - DrawablePtr pDrawable, - GC *gc, - unsigned long *valid, - FILE **file) -{ - XpContextPtr pCon; - PclContextPrivPtr cPriv; - - switch( pDrawable->type ) - { - case DRAWABLE_PIXMAP: - /* - * If we ever get here, something is wrong. - */ - return FALSE; - - case DRAWABLE_WINDOW: - pCon = PclGetContextFromWindow( (WindowPtr)pDrawable ); - - if( pCon == NULL ) - return FALSE; - else - { - cPriv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - *gc = cPriv->lastGC; - *valid = cPriv->validGC; - *file = cPriv->pPageFile; - return TRUE; - } - - default: - return FALSE; - } -} - -void -PclSetDrawablePrivateGC( - DrawablePtr pDrawable, - GC gc) -{ - PixmapPtr pix; - XpContextPtr pCon; - PclPixmapPrivPtr pixPriv; - PclContextPrivPtr pPriv; - int i; - - switch( pDrawable->type ) - { - case DRAWABLE_PIXMAP: - pix = (PixmapPtr)pDrawable; - pixPriv = (PclPixmapPrivPtr) - dixLookupPrivate(&pix->devPrivates, PclPixmapPrivateKey); - - pixPriv->lastGC = gc; - pixPriv->validGC = 1; - break; - - case DRAWABLE_WINDOW: - pCon = PclGetContextFromWindow( (WindowPtr)pDrawable ); - pPriv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - - pPriv->validGC = 1; - pPriv->lastGC = gc; - - /* - * Store the dash list separately, to avoid having it freed - * out from under us. - */ - if( pPriv->dash != NULL ) - xfree( pPriv->dash ); - if( gc.numInDashList != 0 ) - { - pPriv->dash = (unsigned char *)xalloc( sizeof( unsigned char ) - * gc.numInDashList ); - for( i = 0; i < gc.numInDashList; i++ ) - pPriv->dash[i] = gc.dash[i]; - } - else - pPriv->dash = NULL; - - - /* - * Store the dash list separately, to avoid having it freed - * out from under us. - */ - if( pPriv->dash != NULL ) - xfree( pPriv->dash ); - if( gc.numInDashList != 0 ) - { - pPriv->dash = (unsigned char *)xalloc( sizeof( unsigned char ) - * gc.numInDashList ); - for( i = 0; i < gc.numInDashList; i++ ) - pPriv->dash[i] = gc.dash[i]; - } - else - pPriv->dash = NULL; - - break; - } -} - -static void -PclSendPattern(char *bits, - int sz, - int depth, - int h, - int w, - int patNum, - FILE *outFile) -{ - char t[80], *row, *mod; - int w2; - int i, j; - - SEND_PCL( outFile, "\033%0A" ); - - if( depth == 1 ) - { - /* Each row must be word-aligned */ - w2 = ( w / 8 ) + ( ( w%8 ) ? 1 : 0 ); -/* - if( w2 % 2 ) - w2++; -*/ - - sprintf( t, "\033*c%dg%dW", patNum, h * w2 + 8 ); - SEND_PCL( outFile, t ); - - sprintf( t, "%c%c%c%c%c%c%c%c", 0, 0, 1, 0, h>>8, h&0xff, w>>8, - w&0xff ); - SEND_PCL_COUNT( outFile, t, 8 ); - - for( row = bits, i = 0; i < h; i++, row += BitmapBytePad( w ) ) - SEND_PCL_COUNT( outFile, row, w2 ); - } - else if( depth == 8 ) - { - w2 = ( w % 2 ) ? w + 1 : w; - - sprintf( t, "\033*c%dg%dW", patNum, h * w2 + 8 ); - SEND_PCL( outFile, t ); - - sprintf( t, "%c%c%c%c%c%c%c%c", 1, 0, 8, 0, h>>8, h&0xff, - w>>8, w&0xff ); - SEND_PCL_COUNT( outFile, t, 8 ); - - for( row = bits, i = 0; i < h; i++, - row += PixmapBytePad( w, 8 ) ) - SEND_PCL_COUNT( outFile, row, w2 ); - } - else - { - w2 = ( w % 2 ) ? w + 1 : w; - - sprintf( t, "\033*c%dg%dW", patNum, h * w2 + 8 ); - SEND_PCL( outFile, t ); - - sprintf( t, "%c%c%c%c%c%c%c%c", 1, 0, 8, 0, h>>8, h&0xff, - w>>8, w&0xff ); - SEND_PCL_COUNT( outFile, t, 8 ); - - mod = (char *)xalloc( w2 ); - - for( row = bits, i = 0; i < h; i++, - row += PixmapBytePad( w, 24 ) ) - { - char r, g, b; - for( j = 0; j < w2; j++ ) { - r = ((row[j*4+1] >> 5) & 0x7) << 5; - g = ((row[j*4+2] >> 5) & 0x7) << 2; - b = ((row[j*4+3] >> 6) & 0x3); - mod[j] = r | g | b; - } - SEND_PCL_COUNT( outFile, mod, w2 ); - } - - xfree( mod ); - } - - SEND_PCL( outFile, "\033%0B" ); -} - -int -PclUpdateDrawableGC( - GCPtr pGC, - DrawablePtr pDrawable, - FILE **outFile) -{ - Mask changeMask = 0; - GC dGC; - unsigned long valid; - int i; - XpContextPtr pCon; - PclContextPrivPtr cPriv; - PclGCPrivPtr gcPriv = (PclGCPrivPtr) - dixLookupPrivate(&pGC->devPrivates, PclGCPrivateKey); - - if( !PclGetDrawablePrivateStuff( pDrawable, &dGC, &valid, outFile ) ) - return FALSE; - - pCon = PclGetContextFromWindow( (WindowPtr)pDrawable ); - cPriv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - - /* - * Here's where we update the colormap. Since there can be - * different colormaps installed on each window, we need to check - * before each drawing request that the correct palette is active in - * the printer. This is as good a place as any. - */ - if( !PclUpdateColormap( pDrawable, pCon, pGC, *outFile ) ) - return FALSE; - - /* - * If the drawable's last GC is NULL, this means that this is - * the first time the drawable is being used. Therefore, we need - * to emit PCL for all the GC fields. - */ - if( valid == 0 ) - changeMask = ~0; - - /* - * If we have two different GC structures, there is no alternative - * but to scan through them both to determine the changeMask. - */ - else - { - if( dGC.alu != pGC->alu ) - changeMask |= GCFunction; - if( dGC.fgPixel != pGC->fgPixel ) - changeMask |= GCForeground; - if( dGC.bgPixel != pGC->bgPixel ) - changeMask |= GCBackground; - if( dGC.lineWidth != pGC->lineWidth ) - changeMask |= GCLineWidth; - if( dGC.lineStyle != pGC->lineStyle ) - changeMask |= GCLineStyle; - if( dGC.capStyle != pGC->capStyle ) - changeMask |= GCCapStyle; - if( dGC.joinStyle != pGC->joinStyle ) - changeMask |= GCJoinStyle; - if( dGC.fillStyle != pGC->fillStyle ) - changeMask |= GCFillStyle; - if( dGC.tile.pixmap != pGC->tile.pixmap ) - changeMask |= GCTile; - if( dGC.stipple != pGC->stipple ) - changeMask |= GCStipple; - if( dGC.patOrg.x != pGC->patOrg.x ) - changeMask |= GCTileStipXOrigin; - if( dGC.patOrg.y != pGC->patOrg.y ) - changeMask |= GCTileStipYOrigin; - - if( dGC.numInDashList == pGC->numInDashList ) - { - for( i = 0; i < dGC.numInDashList; i++ ) - if( cPriv->dash[i] != pGC->dash[i] ) - { - changeMask |= GCDashList; - break; - } - } - else - changeMask |= GCDashList; - } - - /* - * Once the changeMask has been determined, we scan it and emit - * the appropriate PCL code to set the drawing attributes. - */ - - /* Must be in HP-GL/2 mode to set attributes */ - SEND_PCL( *outFile, "\033%0B" ); - - if( changeMask & GCFunction ) - { -#ifdef XP_PCL_COLOR - - if( pGC->alu == GXclear ) - SEND_PCL( *outFile, "SP0;" ); - else - SEND_PCL( *outFile, "SP1;" ); -#else - if( pGC->alu == GXclear ) - SEND_PCL( *outFile, "SP0;" ); - else - SEND_PCL( *outFile, "SP1;" ); -#endif /* XP_PCL_COLOR */ - } - -#if 0 - if( changeMask & GCFunction ) - { - int rop = -1; - char t[10]; - - switch( pGC->alu ) - { - case GXclear: - rop = 1; - break; - case GXand: - rop = 136; - break; - case GXandReverse: - rop = 68; - break; - case GXcopy: - rop = 204; - break; - case GXandInverted: - rop = 34; - break; - case GXnoop: - rop = 170; - break; - case GXxor: - rop = 238; - break; - case GXor: - rop = 238; - break; - case GXnor: - rop = 17; - break; - case GXequiv: - rop = 153; - break; - case GXinvert: - rop = 85; - break; - case GXorReverse: - rop = 221; - break; - case GXcopyInverted: - rop = 51; - break; - case GXorInverted: - rop = 187; - break; - case GXnand: - rop = 119; - break; - case GXset: - rop = 0; - break; - } - if( rop != -1 ) - { - sprintf( t, "MC1,%d;", rop ); - SEND_PCL( *outFile, t ); -#endif - - if( changeMask & GCForeground ) - switch( pGC->fgPixel ) - { - case 1: - SEND_PCL( *outFile, "SP1;" ); - break; - default: - SEND_PCL( *outFile, "SP0;" ); - break; - } - - if( changeMask & GCForeground ) - { -#ifdef XP_PCL_COLOR - ColormapPtr cmap; - Colormap c; - char t[40]; - - c = wColormap( ((WindowPtr)pDrawable) ); - cmap = (ColormapPtr)LookupIDByType( c, RT_COLORMAP ); - - if( cmap->class == TrueColor ) - { - if( pGC->fillStyle != FillTiled || pGC->tileIsPixel ) { - unsigned short r, g, b; - - r = (pGC->fgPixel & cmap->pVisual->redMask) - >> (cmap->pVisual->offsetRed ); - g = (pGC->fgPixel & cmap->pVisual->greenMask) - >> (cmap->pVisual->offsetGreen); - b = (pGC->fgPixel & cmap->pVisual->blueMask) - >> (cmap->pVisual->offsetBlue); - - PclLookUp(cmap, cPriv, &r, &g, &b); - sprintf( t, "\033%%0A\033*v%ua%ub%uc0I\033%%0B", r, g, b); - SEND_PCL( *outFile, t ); - } - } - else /* PseudoColor or StaticGray */ - { - sprintf( t, "SP%ld;", (long) pGC->fgPixel ); - SEND_PCL( *outFile, t ); - } -#else - ScreenPtr screen; - screen = pDrawable->pScreen; - if ( pGC->fgPixel == screen->whitePixel ) - SEND_PCL( *outFile, "SP0;"); - else - SEND_PCL( *outFile, "SP1;"); -#endif /* XP_PCL_COLOR */ - } - - if( changeMask & GCJoinStyle ) - switch( pGC->joinStyle ) - { - case JoinMiter: - SEND_PCL( *outFile, "LA2,1;" ); - break; - case JoinRound: - SEND_PCL( *outFile, "LA2,4;" ); - break; - case JoinBevel: - SEND_PCL( *outFile, "LA2,5;" ); - break; - } - - if( changeMask & GCCapStyle ) - switch( pGC->capStyle ) - { - case CapNotLast: - case CapButt: - SEND_PCL( *outFile, "LA1,1;" ); - break; - case CapRound: - SEND_PCL( *outFile, "LA1,4;" ); - break; - case CapProjecting: - SEND_PCL( *outFile, "LA1,2;" ); - break; - } - - if( changeMask & GCLineWidth ) - { - float penWidth, pixelsPerMM; - ScreenPtr screen; - char temp[30]; - - if( pGC->lineWidth == 0 || pGC->lineWidth == 1 ) - /* A pen width of 0.0 mm gives a one-pixel-wide line */ - penWidth = 0.0; - else - { - screen = pDrawable->pScreen; - pixelsPerMM = (float)screen->width / (float)screen->mmWidth; - - penWidth = pGC->lineWidth / pixelsPerMM; - } - sprintf( temp, "PW%g;", penWidth ); - SEND_PCL( *outFile, temp ); - } - - if( changeMask & GCLineStyle ) - { - int i, num = pGC->numInDashList; - double total; - char t[30]; - - switch( pGC->lineStyle ) - { - case LineSolid: - SEND_PCL( *outFile, "LT;" ); - break; - case LineOnOffDash: - /* - * Calculate the pattern length of the dashes, in pixels, - * then convert to mm - */ - for( i = 0, total = 0.0; i < 20 && i < num; i++ ) - total += pGC->dash[i]; - if( num % 2 ) - for( i = num; i < 20 && i < num + num; i++ ) - total += pGC->dash[i-num]; - - total *= ( (double)pDrawable->pScreen->mmWidth / - (double)pDrawable->pScreen->width ); - - sprintf( t, "LT8,%f,1;", total ); - SEND_PCL( *outFile, t ); - break; - } - } - - - if( changeMask & GCFillStyle ) - switch( pGC->fillStyle ) - { - case FillSolid: - SEND_PCL( *outFile, "FT1;TR0;CF;" ); - break; - case FillTiled: - SEND_PCL( *outFile, "FT22,100;TR0;CF2,0;" ); - break; - case FillOpaqueStippled: - SEND_PCL( *outFile, "FT22,101;TR0;CF2,0;" ); - if( pGC->fgPixel != gcPriv->stippleFg || - pGC->bgPixel != gcPriv->stippleBg ) - changeMask |= GCStipple; - break; - case FillStippled: - SEND_PCL( *outFile, "FT22,102;TR1;CF2,0;" ); - break; - } - - if( changeMask & GCTile && !pGC->tileIsPixel ) - { - char *bits; - int h, w, sz; - - h = pGC->tile.pixmap->drawable.height; - w = pGC->tile.pixmap->drawable.width; - - sz = h * PixmapBytePad(w, pGC->tile.pixmap->drawable.depth); - bits = (char *)xalloc(sz); - fbGetImage(&(pGC->tile.pixmap->drawable), 0, 0, w, h, XYPixmap, ~0, - bits); - PclSendPattern( bits, sz, 1, h, w, 100, *outFile ); - xfree( bits ); - } - - if( changeMask & ( GCTileStipXOrigin | GCTileStipYOrigin ) ) - { - char t[30]; - - sprintf( t, "AC%d,%d;", pGC->patOrg.x, pGC->patOrg.y ); - SEND_PCL( *outFile, t ); - } - - /* - * We have to resend the stipple pattern either when the stipple itself - * changes, or if we're in FillOpaqueStippled mode and either the - * foreground or the background color changes. - */ - if( changeMask & GCStipple || - ( pGC->fillStyle == FillOpaqueStippled && - ( pGC->fgPixel != gcPriv->stippleFg || - pGC->bgPixel != gcPriv->stippleBg ) ) ) - { - int h, w, i, sz, w2; - char *bits, *row, t[30]; - PixmapPtr scratchPix; - GCPtr scratchGC; - - if( pGC->stipple != NULL ) - { - SEND_PCL( *outFile, "\033%0A" ); - - h = pGC->stipple->drawable.height; - w = pGC->stipple->drawable.width; - sz = h * BitmapBytePad( w ); - - bits = (char *)xalloc( sz ); - fbGetImage( &(pGC->stipple->drawable), 0, 0, w, h, XYPixmap, ~0, bits ); - - w2 = ( w / 8 ) + ( ( w%8 ) ? 1 : 0 ); - /* - * XXX The PCL docs say that I need to word-align each - * XXX row, but I get garbage when I do... - */ - /* - if( w2 % 2 ) - w2++; - */ - - sprintf( t, "\033*c102g%dW", h * w2 + 8 ); - SEND_PCL( *outFile, t ); - - sprintf( t, "%c%c%c%c%c%c%c%c", 0, 0, 1, 0, h>>8, h&0xff, w>>8, - w&0xff ); - SEND_PCL_COUNT( *outFile, t, 8 ); - - for( row = bits, i = 0; i < h; i++, row += BitmapBytePad( w ) ) - SEND_PCL_COUNT( *outFile, row, w2 ); - - SEND_PCL( *outFile, "\033%0B" ); - - xfree( bits ); - - /* - * Also do the opaque stipple, as a tile - */ - if( pGC->depth != 1 ) - sz = h * PixmapBytePad( w, pGC->depth ); - bits = (char *)xalloc( sz ); - - scratchPix = - (*pGC->pScreen->CreatePixmap)( pGC->pScreen, - w, h, pGC->depth, - CREATE_PIXMAP_USAGE_SCRATCH ); - scratchGC = GetScratchGC( pGC->depth, pGC->pScreen ); - CopyGC( pGC, scratchGC, ~0L ); - - fbValidateGC(scratchGC, ~0L, (DrawablePtr)scratchPix); - fbCopyPlane(&(pGC->stipple->drawable), (DrawablePtr)scratchPix, - scratchGC, 0, 0, w, h, 0, 0, 1); - fbGetImage(&(scratchPix->drawable), 0, 0, w, h, XYPixmap, ~0, - bits); - PclSendPattern( bits, sz, pGC->depth, h, w, 101, *outFile ); - FreeScratchGC( scratchGC ); - (*pGC->pScreen->DestroyPixmap)( scratchPix ); - xfree( bits ); - } - } - - if( changeMask & ( GCTileStipXOrigin | GCTileStipYOrigin ) ) - { - char t[30]; - - sprintf( t, "AC%d,%d;", pGC->patOrg.x, pGC->patOrg.y ); - SEND_PCL( *outFile, t ); - } - - if( changeMask & GCDashList ) - { - int num = pGC->numInDashList; - double total; - char dashes[20]; - char t[100], t2[20]; - - /* Make up the doubled dash list, if necessary */ - for( i = 0; i < 20 && i < num; i++ ) - dashes[i] = pGC->dash[i]; - - if( num % 2 ) - { - for( i = num; i < 20 && i < num + num; i++ ) - dashes[i] = dashes[i-num]; - if( ( num *= 2 ) > 20 ) - num = 20; - } - - /* Add up dash lengths to get percentage */ - for( i = 0, total = 0; i < num; i++ ) - total += dashes[i]; - - /* Build up the HP-GL/2 for the dash list */ - strcpy( t, "UL8" ); - for( i = 0; i < num; i++ ) - { - sprintf( t2, ",%d", - (int)( ( (double)dashes[i] / total * 100.0 ) + 0.5 ) ); - strcat( t, t2 ); - } - strcat( t, ";" ); - SEND_PCL( *outFile, t ); - } - - - /* Go back to PCL mode */ - SEND_PCL( *outFile, "\033%0A" ); - - /* - * Update the drawable's private information, which includes - * erasing the drawable's private changeMask, since all the - * changes have been made. - */ - if( changeMask ) - PclSetDrawablePrivateGC( pDrawable, *pGC ); - - return TRUE; -} - -/* - * PclComputeCompositeClip() - * - * I'd like to use the miComputeCompositeClip function, but it sticks - * things into the mi GC privates, where the PCL driver can't get at - * it. So, rather than mess around with the mi code, I ripped it out - * and made the appropriate changes here. - */ - - -void -PclComputeCompositeClip( - GCPtr pGC, - DrawablePtr pDrawable) -{ - if (pDrawable->type == DRAWABLE_WINDOW) - { - WindowPtr pWin = (WindowPtr) pDrawable; - RegionPtr pregWin; - Bool freeTmpClip, freeCompClip; - - if (pGC->subWindowMode == IncludeInferiors) - { - pregWin = NotClippedByChildren(pWin); - freeTmpClip = TRUE; - } - else - { - pregWin = &pWin->clipList; - freeTmpClip = FALSE; - } - freeCompClip = pGC->freeCompClip; - - /* - * if there is no client clip, we can get by with just keeping the - * pointer we got, and remembering whether or not should destroy (or - * maybe re-use) it later. this way, we avoid unnecessary copying of - * regions. (this wins especially if many clients clip by children - * and have no client clip.) - */ - if (pGC->clientClipType == CT_NONE) - { - if (freeCompClip) - REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip); - pGC->pCompositeClip = pregWin; - pGC->freeCompClip = freeTmpClip; - } - else - { - /* - * we need one 'real' region to put into the composite clip. if - * pregWin the current composite clip are real, we can get rid of - * one. if pregWin is real and the current composite clip isn't, - * use pregWin for the composite clip. if the current composite - * clip is real and pregWin isn't, use the current composite - * clip. if neither is real, create a new region. - */ - - REGION_TRANSLATE(pGC->pScreen, pGC->clientClip, - pDrawable->x + pGC->clipOrg.x, - pDrawable->y + pGC->clipOrg.y); - - if (freeCompClip) - { - REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, - pregWin, pGC->clientClip); - if (freeTmpClip) - REGION_DESTROY(pGC->pScreen, pregWin); - } - else if (freeTmpClip) - { - REGION_INTERSECT(pGC->pScreen, pregWin, pregWin, - pGC->clientClip); - pGC->pCompositeClip = pregWin; - } - else - { - pGC->pCompositeClip = REGION_CREATE(pGC->pScreen, NullBox, 0); - REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, - pregWin, pGC->clientClip); - } - pGC->freeCompClip = TRUE; - REGION_TRANSLATE(pGC->pScreen, pGC->clientClip, - -(pDrawable->x + pGC->clipOrg.x), - -(pDrawable->y + pGC->clipOrg.y)); - } - } /* end of composite clip for a window */ - else - { - BoxRec pixbounds; - - /* XXX should we translate by drawable.x/y here ? */ - pixbounds.x1 = 0; - pixbounds.y1 = 0; - pixbounds.x2 = pDrawable->width; - pixbounds.y2 = pDrawable->height; - - if (pGC->freeCompClip) - { - REGION_RESET(pGC->pScreen, pGC->pCompositeClip, &pixbounds); - } - else - { - pGC->freeCompClip = TRUE; - pGC->pCompositeClip = REGION_CREATE(pGC->pScreen, &pixbounds, 1); - } - - if (pGC->clientClipType == CT_REGION) - { - REGION_TRANSLATE(pGC->pScreen, pGC->pCompositeClip, - -pGC->clipOrg.x, -pGC->clipOrg.y); - REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, - pGC->pCompositeClip, pGC->clientClip); - REGION_TRANSLATE(pGC->pScreen, pGC->pCompositeClip, - pGC->clipOrg.x, pGC->clipOrg.y); - } - } /* end of composite clip for pixmap */ -} - -/* - * PclValidateGC() - * - * Unlike many screen GCValidate routines, this function should not need - * to mess with setting the drawing functions. Different drawing - * functions are usually needed to optimize such things as drawing - * wide or dashed lines; this functionality will be handled primarily - * by the printer itself, while the necessary PCL code to set the - * attributes will be done in PclUpdateDrawableGC(). - */ - -/*ARGSUSED*/ -void -PclValidateGC( - GCPtr pGC, - unsigned long changes, - DrawablePtr pDrawable) -{ - /* - * Pixmaps should be handled by their respective validation - * functions. - */ - if( pDrawable->type == DRAWABLE_PIXMAP ) - { - fbValidateGC(pGC, ~0, pDrawable); - return; - } - - /* - * Reset the drawing operations - */ - pGC->ops = &PclGCOps; - - /* - * Validate the information, and correct it if necessary. - */ - - /* - * If necessary, compute the composite clip region. (Code ripped - * from migc.c) - */ - if ((changes & (GCClipXOrigin|GCClipYOrigin|GCClipMask|GCSubwindowMode)) || - (pDrawable->serialNumber != (pGC->serialNumber & DRAWABLE_SERIAL_BITS)) - ) - { - PclComputeCompositeClip(pGC, pDrawable); - } - - /* - * PCL does not directly support the DoubleDash line style, nor is - * there an easy way to simulate it, so we'll just change it to a - * LineOnOffDash, which is supported by PCL. - */ - if( ( changes & GCLineStyle ) && ( pGC->lineStyle == LineDoubleDash ) ) - pGC->lineStyle = LineOnOffDash; - - /* - * Update the drawable's changeMask to reflect the changes made to the GC. - */ -/* - PclSetDrawablePrivateGC( pDrawable, *pGC, changes ); -*/ -} diff --git a/hw/xprint/pcl/PclInit.c b/hw/xprint/pcl/PclInit.c deleted file mode 100644 index e738e3e54..000000000 --- a/hw/xprint/pcl/PclInit.c +++ /dev/null @@ -1,575 +0,0 @@ -/******************************************************************* -** -** ********************************************************* -** * -** * File: PclInit.c -** * -** * Contents: -** * Initialization code of Pcl driver for the print server. -** * -** * Created: 1/30/95 -** * -** ********************************************************* -** -********************************************************************/ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include - -#include "Pcl.h" - -#include "fb.h" -#include /* for unlink() */ - -#include "attributes.h" -#include "DiPrint.h" - -#define MODELDIRNAME "/models" - -static void AllocatePclPrivates(ScreenPtr pScreen); -static int PclInitContext(XpContextPtr pCon); -static Bool PclDestroyContext(XpContextPtr pCon); - -DevPrivateKey PclScreenPrivateKey = &PclScreenPrivateKey; -DevPrivateKey PclContextPrivateKey = &PclContextPrivateKey; -DevPrivateKey PclPixmapPrivateKey = &PclPixmapPrivateKey; -DevPrivateKey PclWindowPrivateKey = &PclWindowPrivateKey; -DevPrivateKey PclGCPrivateKey = &PclGCPrivateKey; - -#ifdef XP_PCL_COLOR -/* - * The supported visuals on this screen - */ -static VisualRec Visuals[] = -{ - { 1, StaticGray, 1, 2, 1, 0, 0, 0, 0, 0, 0 }, - { 2, PseudoColor, 8, 256, 8, 0, 0, 0, 0, 0, 0 }, - { 3, TrueColor, 8, 256, 24, 0xFF0000, 0xFF00, 0xFF, 16, 8, 0 } -}; - -/* - * The supported depths on this screen - */ -static DepthRec Depths[] = -{ - { 1, 1, NULL }, - { 8, 1, NULL }, - { 24, 1, NULL } -}; -#else -/* - * The supported visuals on this screen - */ -static VisualRec Visuals[] = -{ - { 1, StaticGray, 1, 2, 1, 0, 0, 0, 0, 0, 0} -}; - -/* - * The supported depths on this screen - */ -static DepthRec Depths[] = -{ - { 1, 1, NULL } -}; -#endif /* XP_PCL_COLOR */ - - -#define NUM_VISUALS(visuals) (sizeof(visuals) / sizeof(VisualRec)) -#define NUM_DEPTHS(depths) (sizeof(depths) / sizeof(DepthRec)) - -Bool -PclCloseScreen(int index, - ScreenPtr pScreen) -{ - PclScreenPrivPtr pPriv = (PclScreenPrivPtr) - dixLookupPrivate(&pScreen->devPrivates, PclScreenPrivateKey); - - pScreen->CloseScreen = pPriv->CloseScreen; - xfree( pPriv ); - - return (*pScreen->CloseScreen)(index, pScreen); -} - -Bool -InitializePclDriver( - int ndx, - ScreenPtr pScreen, - int argc, - char **argv) -{ - int maxRes, xRes, yRes, maxDim; - unsigned i; - PclScreenPrivPtr pPriv; - - /* - * Register this driver's InitContext function with the print - * extension. This is a bit sleazy, as the extension hasn't yet - * been initialized, but the extensionneeds to know this, and this - * seems the best time to provide the information. - */ -#ifdef XP_PCL_COLOR - XpRegisterInitFunc( pScreen, "XP-PCL-COLOR", PclInitContext ); -#elif XP_PCL_MONO - XpRegisterInitFunc( pScreen, "XP-PCL-MONO", PclInitContext ); -#else - XpRegisterInitFunc( pScreen, "XP-PCL-LJ3", PclInitContext ); -#endif /* XP_PCL_MONO */ - - /* - * Create and fill in the devPrivate for the PCL driver. - */ - AllocatePclPrivates(pScreen); - - pPriv = (PclScreenPrivPtr) - dixLookupPrivate(&pScreen->devPrivates, PclScreenPrivateKey); - - maxDim = MAX( pScreen->height, pScreen->width ); - xRes = pScreen->width / ( pScreen->mmWidth / 25.4 ); - yRes = pScreen->height / ( pScreen->mmHeight / 25.4 ); - maxRes = MAX( xRes, yRes ); - -#ifdef XP_PCL_COLOR - fbScreenInit( pScreen, NULL, maxDim, maxDim, maxRes, maxRes, - maxRes, 8 ); /* XXX what's the depth here? */ - /* Clean up the fields that we stomp (code taken from fbCloseScreen) */ - for( i = 0; (int) i < pScreen->numDepths; i++ ) - xfree( pScreen->allowedDepths[i].vids ); - xfree( pScreen->allowedDepths ); - xfree( pScreen->visuals ); -#else - fbScreenInit( pScreen, NULL, maxDim, maxDim, maxRes, maxRes, - maxRes, 1 ); -#endif /* XP_PCL_COLOR */ - - miInitializeBackingStore ( pScreen ); - - pScreen->defColormap = FakeClientID(0); - pScreen->blackPixel = 1; - pScreen->whitePixel = 0; - - pPriv->CloseScreen = pScreen->CloseScreen; - pScreen->CloseScreen = PclCloseScreen; - - pScreen->QueryBestSize = (QueryBestSizeProcPtr)PclQueryBestSize; - pScreen->SaveScreen = (SaveScreenProcPtr)_XpBoolNoop; - pScreen->GetImage = (GetImageProcPtr)_XpVoidNoop; - pScreen->GetSpans = (GetSpansProcPtr)_XpVoidNoop; - pScreen->CreateWindow = PclCreateWindow; - pScreen->DestroyWindow = PclDestroyWindow; -/* - pScreen->PositionWindow = PclPositionWindow; -*/ - pScreen->ChangeWindowAttributes = PclChangeWindowAttributes; -/* - pScreen->RealizeWindow = PclMapWindow; - pScreen->UnrealizeWindow = PclUnmapWindow; -*/ - pScreen->CopyWindow = PclCopyWindow; /* XXX Hard routine to write! */ - - pScreen->CreatePixmap = fbCreatePixmap; - pScreen->DestroyPixmap = fbDestroyPixmap; - pScreen->RealizeFont = PclRealizeFont; - pScreen->UnrealizeFont = PclUnrealizeFont; - pScreen->CreateGC = PclCreateGC; - - pScreen->CreateColormap = PclCreateColormap; - pScreen->DestroyColormap = PclDestroyColormap; - pScreen->InstallColormap = (InstallColormapProcPtr)NoopDDA; - pScreen->UninstallColormap = (UninstallColormapProcPtr)NoopDDA; - pScreen->ListInstalledColormaps = PclListInstalledColormaps; - pScreen->StoreColors = PclStoreColors; -/* - pScreen->ResolveColor = PclResolveColor; -*/ - - pScreen->BitmapToRegion = fbPixmapToRegion; - - pScreen->ConstrainCursor = PclConstrainCursor; - pScreen->CursorLimits = PclCursorLimits; - pScreen->DisplayCursor = PclDisplayCursor; - pScreen->RealizeCursor = PclRealizeCursor; - pScreen->UnrealizeCursor = PclUnrealizeCursor; - pScreen->RecolorCursor = PclRecolorCursor; - pScreen->SetCursorPosition = PclSetCursorPosition; - - pScreen->visuals = Visuals; - pScreen->numVisuals = NUM_VISUALS( Visuals ); - pScreen->allowedDepths = Depths; - pScreen->numDepths = NUM_DEPTHS( Depths ); - - for( i = 0; i < NUM_DEPTHS( Depths ); i++ ) - { - pScreen->allowedDepths[i].vids = - (VisualID *)xalloc( sizeof(VisualID ) ); - pScreen->allowedDepths[i].vids[0] = i + 1; - } - -#ifdef XP_PCL_COLOR - pScreen->rootVisual = 2; - pScreen->rootDepth = 8; -#else - pScreen->rootVisual = 1; - pScreen->rootDepth = 1; -#endif /* XP_PCL_COLOR */ - - pPriv->colormaps = NULL; - PclCreateDefColormap( pScreen ); - - return TRUE; -} - -static void -AllocatePclPrivates(ScreenPtr pScreen) -{ - dixRequestPrivate(PclWindowPrivateKey, sizeof( PclWindowPrivRec ) ); - dixRequestPrivate(PclContextPrivateKey, sizeof( PclContextPrivRec ) ); - dixRequestPrivate(PclGCPrivateKey, sizeof( PclGCPrivRec ) ); - dixRequestPrivate(PclPixmapPrivateKey, sizeof( PclPixmapPrivRec ) ); - - dixSetPrivate(&pScreen->devPrivates, PclScreenPrivateKey, - xalloc(sizeof(PclScreenPrivRec))); -} - -/* - * PclInitContext - * - * Establish the appropriate values for a PrintContext used with the PCL - * driver. - */ - -static char DOC_ATT_SUPP[]="document-attributes-supported"; -static char DOC_ATT_VAL[]="document-format xp-listfonts-modes"; -static char JOB_ATT_SUPP[]="job-attributes-supported"; -static char JOB_ATT_VAL[]=""; -static char PAGE_ATT_SUPP[]="xp-page-attributes-supported"; -static char PAGE_ATT_VAL[]="content-orientation default-printer-resolution \ -default-input-tray default-medium plex xp-listfonts-modes"; - -static int -PclInitContext(XpContextPtr pCon) -{ - XpDriverFuncsPtr pFuncs; - PclContextPrivPtr pConPriv; - char *server, *attrStr; - char *modelID; - char *configDir; - char *pathName; - int i, j; - float width, height; - XpOidMediumDiscreteSizeList* ds_list; - XpOidArea* repro; - XpOid page_size; - XpOidMediumSS* m; - - /* - * Initialize the attribute store for this printer. - */ - XpInitAttributes( pCon ); - - /* - * Initialize the function pointers - */ - pFuncs = &( pCon->funcs ); - pFuncs->StartJob = PclStartJob; - pFuncs->EndJob = PclEndJob; - pFuncs->StartDoc = PclStartDoc; - pFuncs->EndDoc = PclEndDoc; - pFuncs->StartPage = PclStartPage; - pFuncs->EndPage = PclEndPage; - pFuncs->PutDocumentData = PclDocumentData; - pFuncs->GetDocumentData = PclGetDocumentData; - pFuncs->GetAttributes = PclGetAttributes; - pFuncs->SetAttributes = PclSetAttributes; - pFuncs->AugmentAttributes = PclAugmentAttributes; - pFuncs->GetOneAttribute = PclGetOneAttribute; - pFuncs->DestroyContext = PclDestroyContext; - pFuncs->GetMediumDimensions = PclGetMediumDimensions; - pFuncs->GetReproducibleArea = PclGetReproducibleArea; - - - /* - * Set up the context privates - */ - pConPriv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - - pConPriv->jobFileName = (char *)NULL; - pConPriv->pageFileName = (char *)NULL; - pConPriv->pJobFile = (FILE *)NULL; - pConPriv->pPageFile = (FILE *)NULL; - pConPriv->dash = NULL; - pConPriv->validGC = 0; - - pConPriv->getDocClient = (ClientPtr)NULL; - pConPriv->getDocBufSize = 0; - modelID = XpGetOneAttribute(pCon, XPPrinterAttr, "xp-model-identifier"); - if ( (configDir = XpGetConfigDir(False)) != (char *) NULL ) { - pathName = (char *)xalloc(strlen(configDir) + strlen(MODELDIRNAME) + - strlen(modelID) + strlen("color.map") + 4); - if (pathName) { - sprintf(pathName, "%s/%s/%s/%s", configDir, MODELDIRNAME, modelID, - "color.map"); - pConPriv->ctbl = PclReadMap(pathName, &pConPriv->ctbldim); - xfree(pathName); - - } else - pConPriv->ctbl = NULL; - } else - pConPriv->ctbl = NULL; - -#ifdef XP_PCL_LJ3 - /* - * Initialize the spooling buffer for saving the figures temporary - * (LaserJet IIIs printers don't support the macro function which - * includes some HP-GL/2 commands.) - */ - pConPriv->fcount = 0; - if ( !(pConPriv->figures = (char *)xalloc(1024)) ) - pConPriv->fcount_max = 0; - else - pConPriv->fcount_max = 1024; -#endif /* XP_PCL_LJ3 */ - - /* - * document-attributes-supported - */ - server = XpGetOneAttribute( pCon, XPServerAttr, DOC_ATT_SUPP ); - if( ( attrStr = (char *)xalloc(strlen(server) + strlen(DOC_ATT_SUPP) - + strlen(DOC_ATT_VAL) + - strlen(PAGE_ATT_VAL) + 8 ) ) - == (char *)NULL ) - return BadAlloc; - sprintf( attrStr, "*%s:\t%s %s %s", DOC_ATT_SUPP, server, - DOC_ATT_VAL, PAGE_ATT_VAL ); - XpAugmentAttributes( pCon, XPPrinterAttr, attrStr ); - xfree( attrStr ); - - /* - * job-attributes-supported - */ - server = XpGetOneAttribute( pCon, XPServerAttr, JOB_ATT_SUPP ); - if( ( attrStr = (char *)xalloc(strlen(server) + strlen(JOB_ATT_SUPP) - + strlen(JOB_ATT_VAL) + 8 ) ) - == (char *)NULL ) - return BadAlloc; - sprintf( attrStr, "*%s:\t%s %s", JOB_ATT_SUPP, server, JOB_ATT_VAL ); - XpAugmentAttributes( pCon, XPPrinterAttr, attrStr ); - xfree( attrStr ); - - /* - * xp-page-attributes-supported - */ - server = XpGetOneAttribute( pCon, XPServerAttr, PAGE_ATT_SUPP ); - if( ( attrStr = (char *)xalloc(strlen(server) + strlen(PAGE_ATT_SUPP) - + strlen(PAGE_ATT_VAL) + 8 ) ) - == (char *)NULL ) - return BadAlloc; - sprintf( attrStr, "*%s:\t%s %s", PAGE_ATT_SUPP, server, PAGE_ATT_VAL ); - XpAugmentAttributes( pCon, XPPrinterAttr, attrStr ); - xfree( attrStr ); - - /* - * Validate the attribute pools - */ - XpValidateAttributePool( pCon, XPPrinterAttr, &PclValidatePoolsRec ); - - /* - * Munge the reproducible areas to reflect the fact that PCL will not let - * me move the right or left margins closer than .25" to the edge of the - * paper. - */ - m = XpGetMediumSSAttr( pCon, XPPrinterAttr, - xpoid_att_medium_source_sizes_supported, - (const XpOidList*) NULL, - (const XpOidList*) NULL ); - for( i = 0; i < XpOidMediumSSCount( m ); i++ ) - { - if( XpOidMediumSS_DISCRETE == (m->mss)[i].mstag ) - { - ds_list = (m->mss)[i].ms.discrete; - for( j = 0; j < ds_list->count; j++ ) - { - repro = &(ds_list->list)[j].assured_reproduction_area; - page_size = (ds_list->list)[j].page_size; - XpGetMediumMillimeters( page_size, &width, &height ); - - if( repro->minimum_x < 6.35 ) - repro->minimum_x = 6.35; - if( width - repro->maximum_x < 6.35 ) - repro->maximum_x = width - 6.35; - } - } - } - XpPutMediumSSAttr( pCon, XPPrinterAttr, - xpoid_att_medium_source_sizes_supported, m ); - XpOidMediumSSDelete( m ); - - /* - * Finish validating the attribute pools - */ - - XpValidateAttributePool( pCon, XPDocAttr, &PclValidatePoolsRec ); - XpValidateAttributePool( pCon, XPJobAttr, &PclValidatePoolsRec ); - XpValidateAttributePool( pCon, XPPageAttr, &PclValidatePoolsRec ); - - /* - * Clear out the colormap storage - */ - pConPriv->palettes = NULL; - - return Success; -} - -static Bool -PclDestroyContext(XpContextPtr pCon) -{ - PclContextPrivPtr pConPriv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - PclPaletteMapPtr p, t; - PclCmapToContexts *pCmap; - ScreenPtr screen; - PclScreenPrivPtr sPriv; - PclContextListPtr con, prevCon, temp; - - - /* - * Clean up the temporary files - */ - if( pConPriv->pPageFile != (FILE *)NULL ) - { - fclose( pConPriv->pPageFile ); - pConPriv->pPageFile = (FILE *)NULL; - } - if( pConPriv->pageFileName != (char *)NULL ) - { - unlink( pConPriv->pageFileName ); - xfree( pConPriv->pageFileName ); - pConPriv->pageFileName = (char *)NULL; - } - - if( pConPriv->pJobFile != (FILE *)NULL ) - { - fclose( pConPriv->pJobFile ); - pConPriv->pJobFile = NULL; - } - if( pConPriv->jobFileName != (char *)NULL ) - { - unlink( pConPriv->jobFileName ); - xfree( pConPriv->jobFileName ); - pConPriv->jobFileName = (char *)NULL; - } - - xfree( pConPriv->dash ); - xfree(pConPriv->ctbl); - pConPriv->ctbl = NULL; -#ifdef XP_PCL_LJ3 - xfree( pConPriv->figures ); -#endif /* XP_PCL_LJ3 */ - - /* - * Destroy the colormap<->palette mappings - */ - p = pConPriv->palettes; - while( p ) - { - t = p; - p = p->next; - xfree( t ); - } - pConPriv->palettes = NULL; - - /* - * Remove the context from the screen-level colormap<->contexts mappings - */ - screen = screenInfo.screens[pCon->screenNum]; - sPriv = (PclScreenPrivPtr) - dixLookupPrivate(&screen->devPrivates, PclScreenPrivateKey); - pCmap = sPriv->colormaps; - while( pCmap ) - { - con = pCmap->contexts; - prevCon = NULL; - - while( con ) - { - if( con->context->contextID == pCon->contextID ) - { - if( prevCon ) - { - temp = con; - prevCon->next = con = con->next; - } - else - { - temp = pCmap->contexts; - pCmap->contexts = con = con->next; - } - xfree( temp ); - } - else - con = con->next; - } - - pCmap = pCmap->next; - } - - XpDestroyAttributes(pCon); - - return Success; -} - -XpContextPtr -PclGetContextFromWindow(WindowPtr win) -{ - PclWindowPrivPtr pPriv; - - while( win ) - { - pPriv = (PclWindowPrivPtr) - dixLookupPrivate(&win->devPrivates, PclWindowPrivateKey); - if( pPriv->validContext ) - return pPriv->context; - - win = win->parent; - } - - return NULL; -} diff --git a/hw/xprint/pcl/PclLine.c b/hw/xprint/pcl/PclLine.c deleted file mode 100644 index 68d55a525..000000000 --- a/hw/xprint/pcl/PclLine.c +++ /dev/null @@ -1,314 +0,0 @@ -/******************************************************************* -** -** ********************************************************* -** * -** * File: PclLine.c -** * -** * Contents: -** * Line drawing routines for the PCL driver -** * -** * Created: 10/11/95 -** * -** ********************************************************* -** -********************************************************************/ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "Pcl.h" -#include "gcstruct.h" -#include "windowstr.h" - -/* - * PclPolyLine() - * PclPolySegment() - * - * Generates PCL code to draw a polyline, or a collection of distinct - * line segments, clipped by the current clip region. Since PCL - * supports clipping to a rectangle, and the clip region is - * represented as a collection of visible rectangles, we can draw and - * clip the line by repeatedly drawing the complete line, clipped to - * each rectangle in the clip region. - * - * Since each box in the clipping region generates approximately 30 - * bytes of PCL code, we have to have a way to avoid having a large - * number of boxes. The worst problem the case where the clipping - * region is a collection of one-pixel-high boxes, perhaps arising - * from a bitmap clip mask, or a region defined by a non-rectangular - * polygon. - * - * To alleviate this problem, we create a second clipping region, - * which consists of the union of the bounding boxes of each line - * segment. (Each bounding box is also increased by some amount - * related to the current line width to allow for non-zero-width - * lines, and for the various end and join styles.) This region is - * intersected with the "real" clipping region to get the region used - * to actually clip the polyline. This should result in a significant - * reduction in the number of clip rectangles, as the region-handling - * code should consolidate many of the fragments of one-pixel-high - * rectangles into larger rectangles. - */ - -void -PclPolyLine( - DrawablePtr pDrawable, - GCPtr pGC, - int mode, - int nPoints, - xPoint *pPoints) -{ - char t[80]; - FILE *outFile; - int xoffset = 0, yoffset = 0; - int nbox; - BoxPtr pbox; - xRectangle *drawRects, *r; - RegionPtr drawRegion, region; - short fudge; - int i; - XpContextPtr pCon; - PclContextPrivPtr pConPriv; - - if( PclUpdateDrawableGC( pGC, pDrawable, &outFile ) == FALSE ) - return; - - pCon = PclGetContextFromWindow( (WindowPtr) pDrawable ); - pConPriv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - - /* - * Allocate the storage required to deal with the clipping - * regions. - */ - region = REGION_CREATE( pGC->pScreen, NULL, 0 ); - drawRects = (xRectangle *) - xalloc( ( nPoints - 1 ) * sizeof( xRectangle ) ); - - /* - * Calculate the "fudge factor" based on the line width. - * Multiplying by three seems to be a good first guess. - * XXX I need to think of a way to test this. - */ - fudge = 3 * pGC->lineWidth + 1; - - /* - * Generate the PCL code to draw the polyline, by defining it as a - * macro which uses the HP-GL/2 line drawing function. - */ - - MACRO_START( outFile, pConPriv ); - SAVE_PCL( outFile, pConPriv, "\033%0B" ); - - sprintf( t, "PU%d,%dPD\n", pPoints[0].x + pDrawable->x, - pPoints[0].y + pDrawable->y ); - SAVE_PCL( outFile, pConPriv, t ); /* Move to the start of the polyline */ - - switch( mode ) - { - case CoordModeOrigin: - xoffset = pDrawable->x; - yoffset = pDrawable->y; - SAVE_PCL( outFile, pConPriv, "PA" ); - break; - case CoordModePrevious: - xoffset = yoffset = 0; - SAVE_PCL( outFile, pConPriv, "PR" ); - break; - } - - /* - * Build the "drawing region" as we build the PCL to draw the - * line. - */ - for(i = 1, r = drawRects; i < nPoints; i++, r++ ) - { - if( i != 1 ) - SAVE_PCL( outFile, pConPriv, "," ); - - sprintf( t, "%d,%d", pPoints[i].x + xoffset, - pPoints[i].y + yoffset ); - SAVE_PCL( outFile, pConPriv, t ); - - r->x = MIN( pPoints[i-1].x, pPoints[i].x ) + xoffset - fudge; - r->y = MIN( pPoints[i-1].y, pPoints[i].y ) + yoffset - fudge; - r->width = abs( pPoints[i-1].x - pPoints[i].x ) + 2 * fudge; - r->height = abs( pPoints[i-1].y - pPoints[i].y ) + 2 * fudge; - } - SAVE_PCL( outFile, pConPriv, ";\033%0A" ); /* End the macro */ - MACRO_END( outFile ); - - /* - * Convert the collection of rectangles into a proper region, then - * intersect it with the clip region. - */ - drawRegion = RECTS_TO_REGION( pGC->pScreen, nPoints - 1, - drawRects, CT_UNSORTED ); - if( mode == CoordModePrevious ) - REGION_TRANSLATE( pGC->pScreen, drawRegion, pPoints[0].x, pPoints[0].y ); - REGION_INTERSECT( pGC->pScreen, region, drawRegion, pGC->pCompositeClip ); - - /* - * For each rectangle in the clip region, set the HP-GL/2 "input - * window" and render the entire polyline to it. - */ - pbox = REGION_RECTS( region ); - nbox = REGION_NUM_RECTS( region ); - - PclSendData(outFile, pConPriv, pbox, nbox, 1.0); - - /* - * Clean up the temporary regions - */ - REGION_DESTROY( pGC->pScreen, drawRegion ); - REGION_DESTROY( pGC->pScreen, region ); - xfree( drawRects ); -} - -void -PclPolySegment( - DrawablePtr pDrawable, - GCPtr pGC, - int nSegments, - xSegment *pSegments) -{ - FILE *outFile, *dummy; - char t[80]; - int xoffset, yoffset; - int nbox, i; - unsigned long valid; - BoxPtr pbox; - xRectangle *drawRects, *r; - RegionPtr drawRegion, region; - short fudge; - XpContextPtr pCon; - PclContextPrivPtr pConPriv; - GC cacheGC; - - - if( PclUpdateDrawableGC( pGC, pDrawable, &outFile ) == FALSE ) - return; - - pCon = PclGetContextFromWindow( (WindowPtr) pDrawable ); - pConPriv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - - /* - * Allocate the storage for the temporary regions. - */ - region = REGION_CREATE( pGC->pScreen, NULL, 0 ); - drawRects = (xRectangle *) - xalloc( nSegments * sizeof( xRectangle ) ); - - /* - * Calculate the fudge factor, based on the line width - */ - fudge = pGC->lineWidth * 3 + 1; - - /* - * Turn off line joining. - */ - SEND_PCL( outFile, "\033%0BLA2,6;\033%0A" ); - - /* - * Generate the PCL code to draw the segments, by defining them as - * a macro which uses the HP-GL/2 line drawing function. - * - * XXX I wonder if this should be implemented using the Encoded - * XXX Polyline function. Since I'm only sending it once, it's not - * XXX necessarily too important. - */ - - MACRO_START( outFile, pConPriv ); - SAVE_PCL( outFile, pConPriv, "\033%0B" ); - - xoffset = pDrawable->x; - yoffset = pDrawable->y; - - for( i = 0, r = drawRects; i < nSegments; i++, r++ ) - { - r->x = MIN( pSegments[i].x1, pSegments[i].x2 ) + xoffset; - r->y = MIN( pSegments[i].y1, pSegments[i].y2 ) + yoffset; - r->width = abs( pSegments[i].x1 - pSegments[i].x2 ); - r->height = abs( pSegments[i].y1 - pSegments[i].y2 ); - - sprintf( t, "PU%d,%d;PD%d,%d;", pSegments[i].x1 + xoffset, - pSegments[i].y1 + yoffset, pSegments[i].x2 + - xoffset, pSegments[i].y2 + yoffset ); - SAVE_PCL( outFile, pConPriv, t ); - - r->x -= fudge; - r->y -= fudge; - r->width += 2 * fudge; - r->height += 2 * fudge; - } - SAVE_PCL( outFile, pConPriv, "\033%0A" ); - MACRO_END ( outFile ); - - /* - * Convert the collection of rectangles into a proper region, then - * intersect it with the clip region. - */ - drawRegion = RECTS_TO_REGION( pGC->pScreen, nSegments, - drawRects, CT_UNSORTED ); - REGION_INTERSECT( pGC->pScreen, region, drawRegion, pGC->pCompositeClip ); - - /* - * For each rectangle in the clip region, set the HP-GL/2 "input - * window" and render the entire set of segments to it. - */ - pbox = REGION_RECTS( region ); - nbox = REGION_NUM_RECTS( region ); - - PclSendData(outFile, pConPriv, pbox, nbox, 1.0); - - /* - * Now we need to reset the line join mode to whatever it was at before. - * The easiest way is to force the cached GC's joinstyle to be different - * from the current GC's joinstyle, then re-update the GC. This way, we - * don't have to duplicate code unnecessarily. - */ - PclGetDrawablePrivateStuff( pDrawable, &cacheGC, &valid, &dummy ); - cacheGC.joinStyle = !cacheGC.joinStyle; - PclSetDrawablePrivateGC( pDrawable, cacheGC ); - PclUpdateDrawableGC( pGC, pDrawable, &outFile ); - - /* - * Clean up - */ - REGION_DESTROY( pGC->pScreen, drawRegion ); - REGION_DESTROY( pGC->pScreen, region ); - xfree( drawRects ); -} diff --git a/hw/xprint/pcl/PclMisc.c b/hw/xprint/pcl/PclMisc.c deleted file mode 100644 index 0b37836e9..000000000 --- a/hw/xprint/pcl/PclMisc.c +++ /dev/null @@ -1,301 +0,0 @@ -/******************************************************************* -** -** ********************************************************* -** * -** * File: PclMisc.c -** * -** * Contents: -** * Miscellaneous code for Pcl driver. -** * -** * Created: 2/01/95 -** * -** ********************************************************* -** -********************************************************************/ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include /* for SIGCLD on pre-POSIX systems */ -#include "Pcl.h" - -#include "cursor.h" -#include "resource.h" - -#include "windowstr.h" -#include "propertyst.h" -#include "attributes.h" - - -/*ARGSUSED*/ -void -PclQueryBestSize( - int type, - short *pwidth, - short *pheight, - ScreenPtr pScreen) -{ - unsigned width, highBit; - - switch(type) - { - case CursorShape: - *pwidth = 0; - *pheight = 0; - break; - case TileShape: - case StippleShape: - width = *pwidth; - if (!width) break; - /* Return the nearest power of two >= what they gave us */ - highBit = 0x80000000; - /* Find the highest 1 bit in the given width */ - while(!(highBit & width)) - highBit >>= 1; - /* If greater than that then return the next power of two */ - if((highBit - 1) & width) - highBit <<= 1; - *pwidth = highBit; - /* height is a don't-care */ - break; - } -} - -/* - * GetPropString searches the window heirarchy from pWin up looking for - * a property by the name of propName. If found, returns the property's - * value. If not, it returns NULL. - */ -char * -GetPropString( - WindowPtr pWin, - char *propName) -{ - Atom atom; - PropertyPtr pProp = (PropertyPtr)NULL; - char *retVal; - - atom = MakeAtom(propName, strlen(propName), FALSE); - if(atom != BAD_RESOURCE) - { - WindowPtr pPropWin; - int rc, n; - - /* - * The atom has been defined, but it might only exist as a - * property on an unrelated window. - */ - for(pPropWin = pWin; pPropWin != (WindowPtr)NULL; - pPropWin = pPropWin->parent) - { - rc = dixLookupProperty(&pProp, pPropWin, atom, - serverClient, DixReadAccess); - if (rc == Success) - break; - else - pProp = NULL; - } - if(pProp == (PropertyPtr)NULL) - return (char *)NULL; - - n = (pProp->format/8) * pProp->size; /* size (bytes) of prop */ - retVal = (char *)xalloc(n + 1); - (void)memcpy((void *)retVal, (void *)pProp->data, n); - retVal[n] = '\0'; - - return retVal; - } - - return (char *)NULL; -} - -#include -#include - -/* ARGSUSED */ -static void SigchldHndlr ( - int dummy) -{ - int status; - int olderrno = errno; - struct sigaction act; - sigfillset(&act.sa_mask); - act.sa_flags = 0; - act.sa_handler = SigchldHndlr; - - (void) wait (&status); - - /* - * Is this really necessary? - */ - sigaction(SIGCHLD, &act, (struct sigaction *)NULL); - errno = olderrno; -} - -/* - * SystemCmd provides a wrapper for the 'system' library call. The call - * appears to be sensitive to the handling of SIGCHLD, so this wrapper - * sets the status to SIG_DFL, and then resets the established handler - * after system returns. - */ -int -SystemCmd(char *cmdStr) -{ - int status; - struct sigaction newAct, oldAct; - sigfillset(&newAct.sa_mask); - newAct.sa_flags = 0; - newAct.sa_handler = SIG_DFL; - sigfillset(&oldAct.sa_mask); - oldAct.sa_flags = 0; - oldAct.sa_handler = SigchldHndlr; - - /* - * get the old handler, and set the action to IGN - */ - sigaction(SIGCHLD, &newAct, &oldAct); - - status = system (cmdStr); - - sigaction(SIGCHLD, &oldAct, (struct sigaction *)NULL); - return status; -} - - -/* - * PclGetMediumDimensions is installed in the GetMediumDimensions field - * of each Pcl-initialized context. - */ -int -PclGetMediumDimensions(XpContextPtr pCon, - CARD16 *width, - CARD16 *height) -{ - XpGetMediumDimensions(pCon, width, height); - return Success; -} - -/* - * PclGetReproducibleArea is installed in the GetReproducibleArea field - * of each Pcl-initialized context. - */ -int -PclGetReproducibleArea(XpContextPtr pCon, - xRectangle *pRect) -{ - XpGetReproductionArea(pCon, pRect); - return Success; -} - -#ifdef XP_PCL_LJ3 -/* - * PclSpoolFigs spooled the rendering PCL/HP-GL2 commands into the - * temporary buffer pointed by figures pointer in pcl private context. - * LaserJet IIIs printers don't support the macro function which - * includes some HP-GL/2 commands. - */ -void -PclSpoolFigs(PclContextPrivPtr pConPriv, char *t, int n) -{ -char *ptr; - - ptr = pConPriv->figures; - while ( ( pConPriv->fcount + n) > pConPriv->fcount_max ) { - ptr = (char *)xrealloc(ptr, 1024 + pConPriv->fcount_max); - if ( !ptr ) - return; - pConPriv->figures = ptr; - pConPriv->fcount_max += 1024; - } - ptr += pConPriv->fcount; - pConPriv->fcount += n; - memcpy(ptr, t, n); -} -#endif /* XP_PCL_LJ3 */ - -/* - * PclSendData: - * For XP-PCL-COLOR/XP-PCL-MONO, it executes the macro stored before - * in the clipped area. - * For XP-PCL-LJ3, it draws the spooled figures in the clipped area. - */ -void -PclSendData( - FILE *outFile, - PclContextPrivPtr pConPriv, - BoxPtr pbox, - int nbox, - double ratio -) -{ -char *ptr; -int n; -char t[80]; - -#ifdef XP_PCL_LJ3 - ptr = pConPriv->figures; - n = pConPriv->fcount; -#else - ptr = "\033&f3X"; - n = 5; -#endif /* XP_PCL_LJ3 */ - - while( nbox ) - { - /* - * Set the HP-GL/2 input window to the current - * rectangle in the clip region, then send the code to - * execute the macro defined above. - */ - if (ratio == 1.0) - sprintf( t, "\033%%0BIW%d,%d,%d,%d;\033%%0A", - pbox->x1, pbox->y1, - pbox->x2, pbox->y2 ); - else - sprintf( t, "\033%%0BIW%g,%d,%g,%d;\033%%0A", - ratio * pbox->x1, pbox->y1, - ratio * pbox->x2, pbox->y2 ); - - SEND_PCL( outFile, t ); - SEND_PCL_COUNT( outFile, ptr, n); - - nbox--; - pbox++; - } -} diff --git a/hw/xprint/pcl/PclPixel.c b/hw/xprint/pcl/PclPixel.c deleted file mode 100644 index d219838f0..000000000 --- a/hw/xprint/pcl/PclPixel.c +++ /dev/null @@ -1,159 +0,0 @@ -/******************************************************************* -** -** ********************************************************* -** * -** * File: PclPixel.c -** * -** * Contents: -** * Pixel-drawing code for the PCL DDX driver -** * -** * Created: 10/23/95 -** * -** ********************************************************* -** -********************************************************************/ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include - -#include "windowstr.h" -#include "gcstruct.h" - -#include "Pcl.h" - -void -PclPolyPoint( pDrawable, pGC, mode, nPoints, pPoints ) - DrawablePtr pDrawable; - GCPtr pGC; - int mode; - int nPoints; - xPoint *pPoints; -{ - char t[80]; - FILE *outFile; - int xoffset, yoffset; - BoxRec box; - int xloc, yloc, i; -#if 0 - XpContextPtr pCon; - PclContextPrivPtr cPriv; - PclPixmapPrivPtr pPriv; -#endif - - if( PclUpdateDrawableGC( pGC, pDrawable, &outFile ) == FALSE ) - return; - - xoffset = pDrawable->x; - yoffset = pDrawable->y; - - /* - * Enter HP-GL/2 and change the line style to one in which only - * the vertices of the specified polyline are drawn. We must also - * temporarily change the line width so that only a single pixel - * is drawn. Then move to the first possible location. - */ - xloc = pPoints[0].x + pDrawable->x; - yloc = pPoints[0].y + pDrawable->y; - - sprintf( t, "\27%%0BPW0,0;LT0;PU;PA%d,%d", xloc, yloc ); - SEND_PCL( outFile, t ); - - /* - * Check each point against the clip region. If it is outside the - * region, don't send the PCL to the printer. - */ - - for( i = 0; i < nPoints; i++ ) - { - if( POINT_IN_REGION( pGC->pScreen, pGC->clientClip, xloc, yloc, &box ) ) - { - sprintf( t, ",%d,%d", xloc, yloc ); - SEND_PCL( outFile, t ); - } - - if( mode == CoordModeOrigin ) - { - xloc = pPoints[i+1].x + xoffset; - yloc = pPoints[i+1].y + yoffset; - } - else - { - xloc += pPoints[i+1].x; - yloc += pPoints[i+1].y; - } - } - -#if 0 - /* - * Change the line style and width back to what they were before - * this routine was called. No, this isn't pretty... - */ - if( pDrawable->type == DRAWABLE_WINDOW ) - { - pCon = PclGetContextFromWindow( (WindowPtr)pDrawable ); - cPriv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - cPriv->changeMask = GCLineWidth | GCLineStyle; - } - else - { - pPriv = (PclPixmapPrivPtr) - dixLookupPrivate(&((PixmapPtr)pDrawable)->devPrivates, - PclPixmapPrivateKey); - pPriv->changeMask = GCLineWidth | GCLineStyle; - } -#endif - - PclUpdateDrawableGC( pGC, pDrawable, &outFile ); - - /* - * Go back to PCL - */ - SEND_PCL( outFile, "\27%0A" ); -} - -void -PclPushPixels( pGC, pBitmap, pDrawable, width, height, x, y ) - GCPtr pGC; - PixmapPtr pBitmap; - DrawablePtr pDrawable; - int width; - int height; - int x; - int y; -{ -} diff --git a/hw/xprint/pcl/PclPolygon.c b/hw/xprint/pcl/PclPolygon.c deleted file mode 100644 index 7d95d6484..000000000 --- a/hw/xprint/pcl/PclPolygon.c +++ /dev/null @@ -1,351 +0,0 @@ -/******************************************************************* -** -** ********************************************************* -** * -** * File: PclPolygon.c -** * -** * Contents: -** * Draws Polygons and Rectangles for the PCL DDX -** * -** * Created: 10/23/95 -** * -** ********************************************************* -** -********************************************************************/ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "Pcl.h" -#include "gcstruct.h" -#include "windowstr.h" - -void -PclPolyRectangle( - DrawablePtr pDrawable, - GCPtr pGC, - int nRects, - xRectangle *pRects) -{ - char t[80]; - FILE *outFile; - int nbox, i; - BoxPtr pbox; - xRectangle *drawRects, *r; - RegionPtr drawRegion, region; - short fudge; - int xoffset, yoffset; - XpContextPtr pCon; - PclContextPrivPtr pConPriv; - - if( PclUpdateDrawableGC( pGC, pDrawable, &outFile ) == FALSE ) - return; - - pCon = PclGetContextFromWindow( (WindowPtr) pDrawable ); - pConPriv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - - /* - * Allocate the storage required to deal with the clipping - * regions. - */ - region = REGION_CREATE( pGC->pScreen, NULL, 0 ); - drawRects = (xRectangle *)xalloc( nRects * sizeof( xRectangle ) ); - - fudge = 3 * pGC->lineWidth + 1; - - /* - * Generate the PCL code to draw the rectangles, by defining them - * as a macro which uses the HP-GL/2 rectangle drawing function. - */ - MACRO_START( outFile, pConPriv ); - SAVE_PCL( outFile, pConPriv, "\033%0B" ); - - xoffset = pDrawable->x; - yoffset = pDrawable->y; - - for( i = 0, r = drawRects; i < nRects; i++, r++ ) - { - xRectangle rect = pRects[i]; - - /* Draw the rectangle */ - sprintf( t, "PU%d,%d;ER%d,%d;", rect.x + xoffset, - rect.y + yoffset, rect.width, rect.height ); - SAVE_PCL( outFile, pConPriv, t ); - - /* Build the bounding box */ - r->x = MIN( rect.x, rect.x + rect.width ) + xoffset - - fudge; - r->y = MIN( rect.y, rect.y + rect.height ) + yoffset - - fudge; - r->width = rect.width + 2 * fudge; - r->height = rect.height + 2 * fudge; - } - SAVE_PCL( outFile, pConPriv, ";\033%0A" ); /* End the macro */ - MACRO_END( outFile ); - - /* - * Convert the collection of rectangles to a proper region, then - * intersect it with the clip region. - */ - drawRegion = RECTS_TO_REGION( pGC->pScreen, nRects, - drawRects, CT_UNSORTED ); - - REGION_INTERSECT( pGC->pScreen, region, drawRegion, pGC->pCompositeClip ); - - /* - * For each rectangle in the clip region, set the HP-GL/2 "input - * window" and render the set of rectangles to it. - */ - pbox = REGION_RECTS( region ); - nbox = REGION_NUM_RECTS( region ); - - PclSendData(outFile, pConPriv, pbox, nbox, 1.0); - - /* - * Clean up the temporary regions - */ - REGION_DESTROY( pGC->pScreen, drawRegion ); - REGION_DESTROY( pGC->pScreen, region ); - xfree( drawRects ); -} - -void -PclFillPolygon( - DrawablePtr pDrawable, - GCPtr pGC, - int shape, - int mode, - int nPoints, - DDXPointPtr pPoints) -{ - char t[80]; - FILE *outFile; - int nbox, i; - BoxPtr pbox; - BoxRec box; - RegionPtr drawRegion, region; - int xoffset, yoffset; - int xtop, xbottom, yleft, yright; - int fillRule; - XpContextPtr pCon; - PclContextPrivPtr pConPriv; - char *command; - - if( PclUpdateDrawableGC( pGC, pDrawable, &outFile ) == FALSE ) - return; - - pCon = PclGetContextFromWindow( (WindowPtr) pDrawable ); - pConPriv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - - /* - * Generate the PCL code to draw the filled polygon, by defining - * it as a macro which uses the HP-GL/2 polygon drawing function. - */ - MACRO_START( outFile, pConPriv ); - SAVE_PCL( outFile, pConPriv, "\033%0B" ); - - if( mode == CoordModeOrigin ) - { - xoffset = pDrawable->x; - yoffset = pDrawable->y; - command = "PA"; - } - else - { - xoffset = yoffset = 0; - command = "PR"; - } - - /* Begin the polygon */ - sprintf( t, "PU%d,%d;PM0;%s", pPoints[0].x + xoffset, pPoints[0].y - + yoffset, command ); - SAVE_PCL( outFile, pConPriv, t ); - - /* Seed the bounding box */ - xtop = xbottom = pPoints[0].x + xoffset; - yleft = yright = pPoints[0].y + yoffset; - - /* Add the rest of the points to the polygon */ - for( i = 1; i < nPoints; i++ ) - { - if( i != 1 ) - SAVE_PCL( outFile, pConPriv, "," ); - - sprintf( t, "%d,%d", pPoints[i].x + xoffset, pPoints[i].y + - yoffset ); - SAVE_PCL( outFile, pConPriv, t ); - - /* Update the bounding box */ - xtop = MIN( xtop, pPoints[i].x + xoffset ); - xbottom = MAX( xbottom, pPoints[i].x + xoffset ); - yleft = MIN( yleft, pPoints[i].y + yoffset ); - yright = MAX( yright, pPoints[i].y + yoffset ); - } - - /* Close the polygon and the macro */ - - if( pGC->fillRule == EvenOddRule ) - fillRule = 0; - else - fillRule = 1; - - sprintf( t, ";PM2;FP%d;\033%%0A", fillRule ); - SAVE_PCL( outFile, pConPriv, t ); - MACRO_END ( outFile ); - - /* - * Build the bounding region from the bounding box of the polygon - */ - box.x1 = xtop; - box.y1 = yleft; - box.x2 = xbottom; - box.y2 = yright; - drawRegion = REGION_CREATE( pGC->pScreen, &box, 0 ); - - if( mode == CoordModePrevious ) - REGION_TRANSLATE( pGC->pScreen, drawRegion, pPoints[0].x, pPoints[0].y ); - - region = REGION_CREATE( pGC->pScreen, NULL, 0 ); - - REGION_INTERSECT( pGC->pScreen, region, drawRegion, pGC->pCompositeClip ); - - /* - * For each rectangle in the clip region, set the HP-GL/2 "input - * window" and render the polygon to it. - */ - pbox = REGION_RECTS( region ); - nbox = REGION_NUM_RECTS( region ); - - PclSendData(outFile, pConPriv, pbox, nbox, 1.0); - - /* - * Clean up the temporary regions - */ - REGION_DESTROY( pGC->pScreen, drawRegion ); - REGION_DESTROY( pGC->pScreen, region ); -} - -void -PclPolyFillRect( - DrawablePtr pDrawable, - GCPtr pGC, - int nRects, - xRectangle *pRects) -{ - char t[80]; - FILE *outFile; - int nbox, i; - BoxPtr pbox; - xRectangle *drawRects, *r; - RegionPtr drawRegion, region; - int xoffset, yoffset; - short fudge; - XpContextPtr pCon; - PclContextPrivPtr pConPriv; - - if( PclUpdateDrawableGC( pGC, pDrawable, &outFile ) == FALSE ) - return; - - pCon = PclGetContextFromWindow( (WindowPtr) pDrawable ); - pConPriv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - - /* - * Allocate the storage required to deal with the clipping - * regions. - */ - region = REGION_CREATE( pGC->pScreen, NULL, 0 ); - drawRects = (xRectangle *)xalloc( nRects * sizeof( xRectangle ) ); - - - fudge = 3 * pGC->lineWidth + 1; - - /* - * Generate the PCL code to draw the filled rectangles, by - * defining them as a macro which uses the HP-GL/2 rectangle - * drawing function. - */ - MACRO_START( outFile, pConPriv ); - SAVE_PCL( outFile, pConPriv, "\033%0B" ); - - xoffset = pDrawable->x; - yoffset = pDrawable->y; - - for( i = 0, r = drawRects; i < nRects; i++, r++ ) - { - xRectangle rect = pRects[i]; - - /* Draw the rectangle */ - sprintf( t, "PU%d,%d;RR%d,%d;", rect.x + xoffset, rect.y + - yoffset, rect.width, rect.height ); - SAVE_PCL( outFile, pConPriv, t ); - - /* Build the bounding box */ - r->x = MIN( rect.x, rect.x + rect.width ) + xoffset - fudge; - r->y = MIN( rect.y, rect.y + rect.height ) + yoffset - - fudge; - r->width = rect.width + 2 * fudge; - r->height = rect.height + 2 * fudge; - } - SAVE_PCL( outFile, pConPriv, ";\033%0A" ); /* End the macro */ - MACRO_END( outFile ); - - /* - * Convert the collection of rectangles to a proper region, then - * intersect it with the clip region. - */ - drawRegion = RECTS_TO_REGION( pGC->pScreen, nRects, - drawRects, CT_UNSORTED ); - REGION_INTERSECT( pGC->pScreen, region, drawRegion, pGC->pCompositeClip ); - - /* - * For each rectangle in the clip region, set the HP-GL/2 "input - * window" and render the set of rectangles to it. - */ - pbox = REGION_RECTS( region ); - nbox = REGION_NUM_RECTS( region ); - - PclSendData(outFile, pConPriv, pbox, nbox, 1.0); - - /* - * Clean up the temporary regions - */ - REGION_DESTROY( pGC->pScreen, drawRegion ); - REGION_DESTROY( pGC->pScreen, region ); - xfree( drawRects ); -} diff --git a/hw/xprint/pcl/PclPrint.c b/hw/xprint/pcl/PclPrint.c deleted file mode 100644 index ac8ea1537..000000000 --- a/hw/xprint/pcl/PclPrint.c +++ /dev/null @@ -1,709 +0,0 @@ -/******************************************************************* -** -** ********************************************************* -** * -** * File: PclPrint.c -** * -** * Contents: Print extension code of Pcl driver -** * -** * Created: 2/03/95 -** * -** ********************************************************* -** -********************************************************************/ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include -#include -#include - -#define NEED_EVENTS -#include -#undef NEED_EVENTS - -#include "Pcl.h" - -#include "windowstr.h" -#include "attributes.h" -#include "AttrValid.h" -#include "Oid.h" - -int -PclStartJob( - XpContextPtr pCon, - Bool sendClientData, - ClientPtr client) -{ - PclContextPrivPtr pConPriv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - PclPaletteMap *pal; - - /* - * Check for existing page file, and delete it if it exists. - */ - if(pConPriv->pageFileName != (char *)NULL) - { - if(pConPriv->pPageFile != (FILE *)NULL) - { - fclose(pConPriv->pPageFile); - pConPriv->pPageFile = (FILE *)NULL; - } - unlink(pConPriv->pageFileName); - xfree(pConPriv->pageFileName); - pConPriv->pageFileName = (char *)NULL; - } - - /* - * Create a temporary file to store the printer output. - */ - if (!XpOpenTmpFile("w+", &pConPriv->jobFileName, &pConPriv->pJobFile)) - return BadAlloc; - - /* - * Create/Initialize the SoftFontInfo structure - */ - pConPriv->pSoftFontInfo = PclCreateSoftFontInfo(); - - /* - * Set up the colormap handling - */ - pConPriv->palettes = NULL; - pConPriv->nextPaletteId = 4; - pConPriv->currentPalette = 0; - - pal = &( pConPriv->staticGrayPalette ); - pal->paletteId = 1; - pal->downloaded = 0; - - pal = &( pConPriv->trueColorPalette ); - pal->paletteId = 2; - pal->downloaded = 0; - - pal = &( pConPriv->specialTrueColorPalette ); - pal->paletteId = 3; - pal->downloaded = 0; - - return Success; -} - -int -PclEndJob( - XpContextPtr pCon, - Bool cancel) -{ - PclContextPrivPtr priv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - -#ifdef CCP_DEBUG - FILE *xpoutput; -#endif - FILE *fp; - int retVal; - char *fileName, *trailer; - struct stat statBuf; - PclPaletteMapPtr p; - - trailer = "\033%-12345X@PJL RESET\n"; - - if( cancel == True ) - { - if( priv->getDocClient != (ClientPtr)NULL ) { - XpFinishDocData( priv->getDocClient ); - - priv->getDocClient = NULL; - priv->getDocBufSize = 0; - } - - return Success; - } - - if( priv->getDocClient != (ClientPtr)NULL && priv->getDocBufSize > 0 ) - { - /* - * We need to stash the trailer information somewhere... - */ - if (!XpOpenTmpFile("w+", &fileName, &fp)) - return BadAlloc; - -#ifndef XP_PCL_LJ3 - SEND_PCL( fp, trailer ); - rewind( fp ); - - retVal = XpSendDocumentData( priv->getDocClient, fp, - strlen( trailer ), - priv->getDocBufSize ); -#endif /* XP_PCL_LJ3 */ - - fclose( fp ); - unlink( fileName ); - xfree( fileName ); - - if( priv->getDocClient != (ClientPtr)NULL ) { - XpFinishDocData( priv->getDocClient ); - - priv->getDocClient = NULL; - priv->getDocBufSize = 0; - } - - return retVal; - } - -#ifndef XP_PCL_LJ3 - SEND_PCL( priv->pJobFile, trailer ); -#endif /* XP_PCL_LJ3 */ - - /* - * Submit the job to the spooler - */ - fflush( priv->pJobFile ); - - /* - * Dump the job file to another output file, for testing - * purposes. - */ - rewind( priv->pJobFile ); - stat( priv->jobFileName, &statBuf ); - -#ifdef CCP_DEBUG - unlink( "/users/prince/XpOutput" ); - xpoutput = fopen( "/users/prince/XpOutput", "w" ); - - rewind( priv->pJobFile ); - TransferBytes( priv->pJobFile, xpoutput, - (int)statBuf.st_size ); - fclose( xpoutput ); -#endif - - XpSubmitJob( priv->jobFileName, pCon ); - fclose( priv->pJobFile ); - unlink( priv->jobFileName ); - xfree( priv->jobFileName ); - priv->jobFileName = NULL; - - PclDestroySoftFontInfo(priv->pSoftFontInfo); - priv->pSoftFontInfo = (PclSoftFontInfoPtr) NULL; - - /* - * Clear out the colormap cache - */ - p = priv->palettes; - while( p ) - { - p->downloaded = 0; - p = p->next; - } - - return Success; -} - -/* StartPage - * - * If page file exists - * close page file - * set page file pointer = NULL - * unlink page file - * Create a new page file - * Send the page header information to the page file - * ClearArea the window and all descendant windows - */ -int -PclStartPage( - XpContextPtr pCon, - WindowPtr pWin) -{ - PclContextPrivPtr pConPriv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - PclWindowPrivPtr pWinPriv = (PclWindowPrivPtr) - dixLookupPrivate(&pWin->devPrivates, PclWindowPrivateKey); - xRectangle repro; - char t[80]; - XpOid orient, plex, tray, medium; - int dir, plexNum, num; - - /* - * Put a pointer to the context in the window private structure - */ - pWinPriv->validContext = 1; - pWinPriv->context = pCon; - - /* - * Clear out the old page file, if necessary - */ - if(pConPriv->pPageFile != (FILE *)NULL) - { - fclose(pConPriv->pPageFile); - pConPriv->pPageFile = (FILE *)NULL; - } - if(pConPriv->pageFileName != (char *)NULL) - { - unlink(pConPriv->pageFileName); - pConPriv->pageFileName = (char *)NULL; - } - - /* - * Make up a new page file. - */ - if (!XpOpenTmpFile("w+", &pConPriv->pageFileName, &pConPriv->pPageFile)) - return BadAlloc; - - /* - * Reset the GC cached in the context private struct. - */ - pConPriv->validGC = 0; - - /* - * Set the page orientation - */ - orient = XpGetContentOrientation( pCon ); - switch( orient ) - { - case xpoid_val_content_orientation_landscape: - dir = 1; - break; - case xpoid_val_content_orientation_reverse_portrait: - dir = 2; - break; - case xpoid_val_content_orientation_reverse_landscape: - dir = 3; - break; - case xpoid_val_content_orientation_portrait: - default: - dir = 0; - break; - } - sprintf( t, "\033&l%dO", dir ); - SEND_PCL( pConPriv->pPageFile, t ); - - /* - * Set the duplexing method. Since PCL wants to think of it in - * terms of the "binding edge," and the attribute store thinks in - * "duplex/tumble," this is a little complicated. - * - * Actually, this has no bearing on the output, since the HP1600C - * will only print on one side of the paper, and ignore all - * requests to enable duplexing. But, in an attempt to keep this - * driver somewhat generic, we'll enable it anyway. - */ - plex = XpGetPlex( pCon ); - - if( plex == xpoid_val_plex_duplex ) - { - if( dir == 0 || dir == 2 ) - plexNum = 1; - else - plexNum = 2; - } - else if( plex == xpoid_val_plex_tumble ) - { - if( dir == 0 || dir == 2 ) - plexNum = 2; - else - plexNum = 1; - } - else - plexNum = 0; - sprintf( t, "\033&l%dS", plexNum ); - SEND_PCL( pConPriv->pPageFile, t ); - - /* - * Set the input tray or medium. If XpGetPageSize gives us a valid medium, - * we can just send that to the printer, and let the printer handle the - * details. Otherwise, we select the tray returned from XpGetPageSize, - * which will be either a tray that should contain the correct medium - * (possibly with operator intervention), or the default tray from the - * config files. - */ - medium = XpGetPageSize( pCon, &tray, NULL ); - if( medium != xpoid_none ) - { - switch( medium ) - { - case xpoid_val_medium_size_na_legal: - num = 3; - break; - case xpoid_val_medium_size_iso_a3: - num = 27; - break; - case xpoid_val_medium_size_iso_a4: - num = 26; - break; - case xpoid_val_medium_size_executive: - num = 1; - break; - case xpoid_val_medium_size_ledger: - num = 6; - break; - case xpoid_val_medium_size_monarch_envelope: - num = 80; - break; - case xpoid_val_medium_size_na_number_10_envelope: - num = 81; - break; - case xpoid_val_medium_size_iso_designated_long: - num = 90; - break; - case xpoid_val_medium_size_iso_c5: - num = 91; - break; - case xpoid_val_medium_size_iso_b5: - num = 100; - break; - case xpoid_val_medium_size_jis_b5: - num = 45; - break; - case xpoid_val_medium_size_na_letter: - default: - num = 2; - break; - } - sprintf( t, "\033&l%dA", num ); - SEND_PCL( pConPriv->pPageFile, t ); - } - else - { - switch( tray ) - { - case xpoid_val_input_tray_manual: - num = 2; - break; - case xpoid_val_input_tray_envelope: - num = 3; - break; - case xpoid_val_input_tray_large_capacity: - num = 5; - break; - case xpoid_val_input_tray_bottom: - num = 4; - break; - case xpoid_val_input_tray_main: - default: - num = 1; - break; - } - sprintf( t, "\033&l%dH", num ); - SEND_PCL( pConPriv->pPageFile, t ); - } - - /* - * Set the scaling factors so that the HP-GL/2 coordinate system - * matches the X coordinate system, both in axis orientation and - * in unit<->pixel conversion. - */ - XpGetReproductionArea( pCon, &repro ); - - sprintf( t, "\033&l0E\033*p%dx%dY", repro.x - 75, repro.y ); - SEND_PCL( pConPriv->pPageFile, t ); - - sprintf( t, "\033*c%dx%dY\033*c0T", (int)(repro.width / 300.0 * 720.0), - (int)(repro.height / 300.0 * 720.0) ); - SEND_PCL( pConPriv->pPageFile, t ); - - sprintf( t, "\033%%0BSC%d,%d,%d,%d;\033%%0A", repro.x, repro.x + - repro.width, repro.y + repro.height, repro.y ); - SEND_PCL( pConPriv->pPageFile, t ); - - return Success; -} - -/* - * When sending the generated PCL code back to the client, we send everything - * that we have generated so far for the job. After sending the data, we clean - * out the job file, to avoid repeatedly sending the same data. - */ - -static int -SendDocData( PclContextPrivPtr pPriv ) -{ - struct stat statBuf; - int ret; - - rewind( pPriv->pJobFile ); - if( stat( pPriv->jobFileName, &statBuf ) < 0 ) - return BadAlloc; - - ret = XpSendDocumentData( pPriv->getDocClient, pPriv->pJobFile, - (int)statBuf.st_size, pPriv->getDocBufSize ); - - /* - * Clean out the job file - */ - fclose( pPriv->pJobFile ); - unlink( pPriv->jobFileName ); - - xfree(pPriv->jobFileName); - - if (!XpOpenTmpFile("w+", &pPriv->jobFileName, &pPriv->pJobFile)) - return BadAlloc; - - return ret; -} - -/* - * EndPage: - * - * Write page trailer to page file - * Write page file to job file - */ -int -PclEndPage( - XpContextPtr pCon, - WindowPtr pWin) -{ - PclContextPrivPtr pConPriv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - - struct stat statBuf; - - /* - * Send the page trailer to the page file. - */ - SEND_PCL( pConPriv->pPageFile, "\014" ); - fflush( pConPriv->pPageFile ); - - /* - * Write the page file contents to the job file, or to the - * whatever client has called GetDocumentData. - * - * pWinPriv->pPageFile must first be set to the start of the page file. - */ - rewind(pConPriv->pPageFile); - if(stat(pConPriv->pageFileName, &statBuf) < 0) - return BadAlloc; - - if(TransferBytes(pConPriv->pPageFile, pConPriv->pJobFile, - (int)statBuf.st_size) != (int)statBuf.st_size) - return BadAlloc; - - if( pConPriv->getDocClient != (ClientPtr)NULL && - pConPriv->getDocBufSize > 0 ) - { - return SendDocData( pConPriv ); - } - - return Success; -} - -/* - * The PclStartDoc() and PclEndDoc() functions serve basically as NOOP - * placeholders. This driver doesn't deal with the notion of multiple - * documents per page. - */ - -int -PclStartDoc(XpContextPtr pCon, - XPDocumentType type) -{ - PclContextPrivPtr pConPriv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - -#ifndef XP_PCL_LJ3 - /* - * Set the printer resolution for the page. Since we can only - * render color at 300dpi, we just hard-code this. - */ - SEND_PCL( pConPriv->pJobFile, - "\033%-12345X@PJL SET RESOLUTION = 300\r\n" ); -#endif /* XP_PCL_LJ3 */ - - /* - * Initialize HP-GL/2 - */ - SEND_PCL( pConPriv->pJobFile, "\033E\033%0BIN,SP1,TR0;\033%0A" ); - - /* - * Stash the type of the document (used by PutDocumentData operation) - */ - pConPriv->isRaw = (type == XPDocRaw); - - return Success; -} - -int -PclEndDoc( - XpContextPtr pCon, - Bool cancel) -{ - /* - * XXX What should I do if I get cancel == TRUE? - */ - return Success; -} - -/* - * PclDocumentData() - * - * Hand any pre-generated PDL down to the spool files, formatting it - * as necessary to fit the given window. - * - */ - -#define DOC_PCL 1 -#define DOC_HPGL 2 - -int -PclDocumentData( - XpContextPtr pCon, - DrawablePtr pDraw, - char *pData, - int len_data, - char *pFmt, - int len_fmt, - char *pOpt, - int len_opt, - ClientPtr client) -{ - int type = 0; - PclContextPrivPtr pPriv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - XpOidDocFmtList *formats; - XpOidDocFmt *f; - char t[80]; - xRectangle repro; - - /* - * Verify the input format - */ - formats = XpGetDocFmtListAttr( pCon, XPPrinterAttr, - (pPriv->isRaw) ? - xpoid_att_xp_raw_formats_supported : - xpoid_att_xp_embedded_formats_supported, - NULL ); - f = XpOidDocFmtNew( pFmt ); - if( !XpOidDocFmtListHasFmt( formats, f ) ) - { - XpOidDocFmtListDelete( formats ); - XpOidDocFmtDelete( f ); - return BadMatch; - } - XpOidDocFmtListDelete( formats ); - - if( !(pPriv->isRaw) ) - { - if( !strcmp( f->format, "PCL" ) ) - type = DOC_PCL; - else if( !strcmp( f->format, "HPGL" ) ) - type = DOC_HPGL; - else - { - XpOidDocFmtDelete( f ); - return BadMatch; - } - - switch( type ) - { - case DOC_HPGL: - /* - * Move the picture frame to the appropriate place on the page, - * then assume that the embedded code will scale it properly. - */ - sprintf( t, "\033&l0E\033*p%dx%dY", - pDraw->x - 75, - pDraw->y ); - SEND_PCL( pPriv->pPageFile, t ); - - sprintf( t, "\033*c%dx%dY\033*coT", - (int)( pDraw->width / 300.0 * 720.0 ), - (int)( pDraw->height / 300.0 * 720.0 ) ); - SEND_PCL( pPriv->pPageFile, t ); - break; - } - } - - - /* - * Send the data down the pipe - */ - SEND_PCL_COUNT( pPriv->pPageFile, pData, len_data ); - - /* - * If it's not a raw document, clean up the embedding - */ - if( !(pPriv->isRaw) ) - switch( type ) - { - case DOC_HPGL: - /* - * Reset the picture frame - */ - XpGetReproductionArea( pCon, &repro ); - - sprintf( t, "\033&l0E\033*p%dx%dY", repro.x - 75, repro.y ); - SEND_PCL( pPriv->pPageFile, t ); - - sprintf( t, "\033*c%dx%dY\033*c0T", - (int)(repro.width / 300.0 * 720.0), - (int)(repro.height / 300.0 * 720.0) ); - SEND_PCL( pPriv->pPageFile, t ); - - sprintf( t, "\033%%0BSC%d,%d,%d,%d;\033%%0A", repro.x, repro.x + - repro.width, repro.y + repro.height, repro.y ); - SEND_PCL( pPriv->pPageFile, t ); - break; - } - - XpOidDocFmtDelete( f ); - return Success; -} - -/* - * - * PclGetDocumentData() - * - * This function allows the driver to send the generated PCL back to - * the client. - * - * XXX This function is barely spec'ed, much less implemented! - */ - -int -PclGetDocumentData( - XpContextPtr pCon, - ClientPtr client, - int maxBufferSize) -{ - PclContextPrivPtr pPriv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - - pPriv->getDocClient = client; - pPriv->getDocBufSize = maxBufferSize; - - return Success; -} diff --git a/hw/xprint/pcl/PclSFonts.c b/hw/xprint/pcl/PclSFonts.c deleted file mode 100644 index 2474d90d7..000000000 --- a/hw/xprint/pcl/PclSFonts.c +++ /dev/null @@ -1,427 +0,0 @@ -/******************************************************************* -** -** ********************************************************* -** * -** * File: PclSFonts.c -** * -** * Contents: -** * Send Soft Font Download data to the specified -** * file pointer. -** * -** * Created: 3/4/96 -** * -** ********************************************************* -** -********************************************************************/ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include "Pcl.h" - -static char tmp1; -static short tmp2; -#define Put1byte(fp, x) tmp1=x; fwrite((char *)&tmp1, 1, 1, fp) -#define Put2bytes(fp, x) tmp2=x; fwrite((char *)&tmp2, 2, 1, fp) - -#define ESC 0x1b -#define SYMBOL_SET 277 - -static unsigned int PclDownloadChar(FILE *,PclCharDataPtr,unsigned short,unsigned char); -static unsigned int PclDownloadHeader(FILE *, PclFontDescPtr, unsigned short); - -#ifdef PCL_FONT_COMPRESS -static unsigned char *compress_bitmap_data(PclCharDataPtr, unsigned int *); -#endif /* PCL_FONT_COMPRESS */ - -/* -*- PclDownloadSoftFont8 -*- - * Send the Character Definition Command for 8-bit font - * **************************************************************************/ -void -PclDownloadSoftFont8( - FILE *fp, - PclSoftFontInfoPtr pSoftFontInfo, - PclFontHead8Ptr pfh, - PclCharDataPtr pcd, - unsigned char *code -) -{ - /* - * Check whether the font header has already been downloaded. - * If not, download it. - */ - - if ( !pfh->fid ) { - pfh->fid = pSoftFontInfo->cur_max_fid++; - PclDownloadHeader(fp, &(pfh->fd), pfh->fid); - } - pfh->index[*code] = *code; - PclDownloadChar(fp, pcd, pfh->fid, pfh->index[*code]); - -} - -/* -*- PclDownloadSoftFont16 -*- - * Send the Character Definition Command for 16 bit font - * **************************************************************************/ -void -PclDownloadSoftFont16( - FILE *fp, - PclSoftFontInfoPtr pSoftFontInfo, - PclFontHead16Ptr pfh, - PclCharDataPtr pcd, - unsigned char row, - unsigned char col -) -{ - /* - * Check whether the font header is already downloaded. - * If not, download it. - */ - - if ( !pfh->cur_cindex ) { - pfh->cur_fid = pSoftFontInfo->cur_max_fid++; - PclDownloadHeader(fp, &(pfh->fd), pfh->cur_fid); - } - pfh->index[row][col].fid = pfh->cur_fid; - pfh->index[row][col].cindex = pfh->cur_cindex++; - - PclDownloadChar(fp, pcd, pfh->index[row][col].fid, pfh->index[row][col].cindex); -} - -/* -*- PclCreateSoftFontInfo -*- - * Create and Initialize the structure for storing the information - * of the downloaded soft font. - * **************************************************************************/ -PclSoftFontInfoPtr -PclCreateSoftFontInfo(void) -{ -PclSoftFontInfoPtr pSoftFontInfo; - - pSoftFontInfo = (PclSoftFontInfoPtr)xalloc(sizeof(PclSoftFontInfoRec)); - if ( pSoftFontInfo == (PclSoftFontInfoPtr) NULL) - return (PclSoftFontInfoPtr) NULL; - pSoftFontInfo->phead8 = (PclFontHead8Ptr)NULL; - pSoftFontInfo->phead16 = (PclFontHead16Ptr)NULL; - pSoftFontInfo->pinfont = (PclInternalFontPtr)NULL; - pSoftFontInfo->cur_max_fid = 1; - return pSoftFontInfo; -} - -/* -*- PclDestroySoftFontInfo -*- - * Destroy the soft font information structure - * **************************************************************************/ -void -PclDestroySoftFontInfo( PclSoftFontInfoPtr pSoftFontInfo ) -{ -PclFontHead8Ptr pfh8, pfh8_next; -PclFontHead16Ptr pfh16, pfh16_next; -PclInternalFontPtr pin, pin_next; -unsigned char nindex_row; -int i; - - if ( pSoftFontInfo == (PclSoftFontInfoPtr) NULL ) - return; - - pfh8 = pSoftFontInfo->phead8; - while (pfh8 != (PclFontHead8Ptr) NULL) { - xfree(pfh8->fontname); - xfree(pfh8->index); - pfh8_next = pfh8->next; - xfree(pfh8); - pfh8 = pfh8_next; - } - - pfh16 = pSoftFontInfo->phead16; - while (pfh16 != (PclFontHead16Ptr) NULL) { - xfree(pfh16->fontname); - nindex_row = pfh16->lastRow - pfh16->firstRow + 1; - for (i=0; iindex[i]); - xfree(pfh16->index); - pfh16_next = pfh16->next; - xfree(pfh16); - pfh16 = pfh16_next; - } - - pin = pSoftFontInfo->pinfont; - while (pin != (PclInternalFontPtr) NULL) { - xfree(pin->fontname); - pin_next = pin->next; - xfree(pin); - pin = pin_next; - } - - xfree(pSoftFontInfo); -} - -/* -*- PclDownloadHeader -*- - * Send the Font Header Commnad. - * Format 0 : Font Header for Pcl Bitmapped Fonts - * Format 20 : Font Header for Resolution Specified Bitmapped Fonts - * **************************************************************************/ -static unsigned int -PclDownloadHeader( - FILE *fp, - PclFontDescPtr fd, - unsigned short fid -) -{ -int nbytes; - -#ifdef XP_PCL_LJ3 - nbytes = 64; -#else - nbytes = 68; -#endif /* XP_PCL_LJ3 */ - /* - * Font ID Command : Esc *c#D - * (Default = 0, Range = 0 - 32767) - */ - fprintf(fp, "%c*c%dD", ESC, fid); - - /* - * Font Header Commnad : Esc )s#W[font header data] - * (Default = 0, Range = 0 - 32767) - */ - fprintf(fp, "%c)s%dW", ESC, nbytes); - - Put2bytes(fp, nbytes); /* Font Description Size */ -#ifdef XP_PCL_LJ3 - Put1byte(fp, 0); /* Header Format */ -#else - Put1byte(fp, 20); /* Header Format */ -#endif /* XP_PCL_LJ3 */ - Put1byte(fp, 2); /* Font Type */ - Put2bytes(fp, 0); /* Style MSB */ - Put2bytes(fp, fd->ascent); /* BaseLine Position */ - Put2bytes(fp, fd->cellwidth); /* Cell Width */ - Put2bytes(fp, fd->cellheight); /* Cell Height */ - Put1byte(fp, 0); /* Orienation */ - Put1byte(fp, fd->spacing); /* Spacing */ - Put2bytes(fp, SYMBOL_SET); /* Symbol Set */ - Put2bytes(fp, fd->pitch*4); /* font pitch */ - Put2bytes(fp, fd->cellheight * 4); /* Height */ - Put2bytes(fp, 0); /* x-Height */ - Put1byte(fp, 0); /* width type (normal) */ - Put1byte(fp, 0); /* Style LSB */ - Put1byte(fp, 0); /* Stroke Weight */ - Put1byte(fp, 5); /* Typeface LSB */ - Put1byte(fp, 0); /* Typeface MSB */ - Put1byte(fp, 0); /* Serif Style */ - Put1byte(fp, 0); /* Quality */ - Put1byte(fp, 0); /* Placement */ - Put1byte(fp, 0); /* Underline Position */ - Put1byte(fp, 0); /* Underline Thickness */ - Put2bytes(fp, fd->cellheight*1.2); /* Text Height */ - Put2bytes(fp, fd->cellwidth * 4); /* Text Width */ - Put2bytes(fp, 0); /* First Code */ - Put2bytes(fp, 255); /* Last Code */ - Put1byte(fp, 0); /* Pitch Extend */ - Put1byte(fp, 0); /* Height Extend */ - Put2bytes(fp, 0); /* Cap Height */ - Put2bytes(fp, 0); /* Font Number 1 */ - Put2bytes(fp, 0); /* Font Number 2 */ - Put2bytes(fp, 0); /* Font Name */ - Put2bytes(fp, 0); /* Font Name */ - Put2bytes(fp, 0); /* Font Name */ - Put2bytes(fp, 0); /* Font Name */ - Put2bytes(fp, 0); /* Font Name */ - Put2bytes(fp, 0); /* Font Name */ - Put2bytes(fp, 0); /* Font Name */ - Put2bytes(fp, 0); /* Font Name */ - -#ifdef XP_PCL_LJ3 - return 64; -#else - Put2bytes(fp, 300); /* X Resolution */ - Put2bytes(fp, 300); /* Y Resolution */ - return 68; -#endif /* XP_PCL_LJ3 */ - -} - -/* -*- PclDownloadCharacter -*- - * Send the Character Definition Command. - * **************************************************************************/ -static unsigned int -PclDownloadChar( - FILE *fp, - PclCharDataPtr cd, - unsigned short fid, - unsigned char code -) -{ -unsigned int nbytes, n; -unsigned char *raster; - - /* - * Font ID Command : Esc *c#D - * (Default = 0, Range = 0 - 32767) - * Character Code Command : Esc *c#E - * (Default = 0, Range = 0 - 65535) - */ - fprintf(fp, "%c*c%dd%dE", ESC, fid, code); - - /* - * Character Definition Command : Esc (s#W[character descriptor and data] - * (Default = N/A, Range = 0 - 32767) - */ - - nbytes = n = cd->height * ((cd->width + 7) / 8); -#ifdef PCL_FONT_COMPRESS - raster = compress_bitmap_data(cd, &nbytes); -#else - raster = (unsigned char *)NULL; -#endif /* PCL_FONT_COMPRESS */ - fprintf(fp, "%c(s%dW", ESC, nbytes + 16); - - Put1byte(fp, 4); /* Format */ - Put1byte(fp, 0); /* Continuation */ - Put1byte(fp, 14); /* Descriptor Size */ - if (raster) { /* Class */ - Put1byte(fp, 2); - } else { - Put1byte(fp, 1); /* Class */ - } - Put2bytes(fp, 0); /* Orientation */ - Put2bytes(fp, cd->h_offset); /* left offset */ - Put2bytes(fp, cd->v_offset); /* top offset */ - Put2bytes(fp, cd->width); /* character width */ - Put2bytes(fp, cd->height); /* character height */ - Put2bytes(fp, cd->font_pitch*4); /* delta X */ - - /* - * Raster Character Data - */ - if (raster) { - fwrite(raster, nbytes, 1, fp); - xfree(raster); - } else - fwrite(cd->raster_top, nbytes, 1, fp); - - return n + 16; -} - - -#ifdef PCL_FONT_COMPRESS -/* -*- compress_bitmap_data -*- - * Compress Bitmap data - * **************************************************************************/ -static unsigned char * -compress_bitmap_data( - PclCharDataPtr cd, - unsigned int *nbytes -) -{ -unsigned int byte_width; -unsigned char *raster, *rptr_s, *rptr_e, *rptr_end; -unsigned char *tmp_s, *tmp_ptr; -unsigned char *p; -unsigned char cur, pixel; -unsigned int num; - -int i, j, k, w; - - byte_width = (cd->width + 7) / 8; - *nbytes = cd->height * byte_width; - - /* Create buffer for storing compress bitmap glyph */ - raster = (unsigned char *)xalloc(*nbytes); - rptr_s = raster; - rptr_e = raster; - rptr_end = raster + *nbytes; - - tmp_s = (unsigned char *)xalloc(cd->width * 8 + 2); - - p = cd->raster_top; - for (i=0; iheight; i++) { - tmp_ptr = tmp_s; - *tmp_ptr++ = 0; - if ( (*p>>7)&0x1 == 1 ) { - *tmp_ptr++ = 0; - cur = 1; - } else { - cur = 0; - } - num = 0; - for (j=0, w=0; jwidth; k++, w++) { - pixel = (*p>>(7-k))&0x1; - if ( pixel == cur ) { - num++; - } else { - cur = pixel; - while (num > 255) { - *tmp_ptr++ = 255; - *tmp_ptr++ = 0; - num -= 255; - } - *tmp_ptr++ = num; - num = 1; - } - } - } - if ( pixel == cur ) { - while (num > 255) { - *tmp_ptr++ = 255; - *tmp_ptr++ = 0; - num -= 255; - } - *tmp_ptr++ = num&0xff; - } else - *tmp_ptr++ = num; - - if ( ((rptr_e - rptr_s) == (tmp_ptr - tmp_s)) && - !memcmp(rptr_s+1, tmp_s+1, (tmp_ptr - tmp_s) - 1) ) - *rptr_s += 1; - else { - if ( rptr_e + (tmp_ptr - tmp_s) > rptr_end ) { - xfree(raster); - xfree(tmp_s); - return (unsigned char *)NULL; - } - memcpy (rptr_e, tmp_s, tmp_ptr - tmp_s); - rptr_s = rptr_e; - rptr_e = rptr_s + (tmp_ptr - tmp_s); - } - } - xfree(tmp_s); - *nbytes = rptr_e - raster; - - return raster; -} -#endif /* PCL_FONT_COMPRESS */ diff --git a/hw/xprint/pcl/PclSFonts.h b/hw/xprint/pcl/PclSFonts.h deleted file mode 100644 index c991263df..000000000 --- a/hw/xprint/pcl/PclSFonts.h +++ /dev/null @@ -1,115 +0,0 @@ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _PCLFONTS_H -#define _PCLFONTS_H - -/* -*-H-*- -****************************************************************************** -****************************************************************************** -* -* File: PclFonts.h -* Description: Send Soft Font Download data to the specified file pointer. -* -* -****************************************************************************** -****************************************************************************** -*/ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - - -typedef struct { - unsigned char fid; /* sfont font ID */ - unsigned char cindex; /* character indext */ -} PclFontMapRec, PclFontMapPtr; - -typedef struct { - int h_offset; - int v_offset; - unsigned int width; - unsigned int height; - int font_pitch; - unsigned char *raster_top; -} PclCharDataRec, *PclCharDataPtr; - -typedef struct { - unsigned char spacing; - unsigned int pitch; - unsigned int cellheight; - unsigned int cellwidth; - int ascent; - int descent; -} PclFontDescRec, *PclFontDescPtr; - -typedef struct _PclFontHead8Rec { - char *fontname; - PclFontDescRec fd; - unsigned short fid; - unsigned char *index; - struct _PclFontHead8Rec *next; -} PclFontHead8Rec, *PclFontHead8Ptr; - -typedef struct _PclFontHead16Rec { - char *fontname; - PclFontDescRec fd; - unsigned short cur_fid; - unsigned char cur_cindex; - PclFontMapRec **index; - unsigned short firstCol; - unsigned short lastCol; - unsigned short firstRow; - unsigned short lastRow; - struct _PclFontHead16Rec *next; -} PclFontHead16Rec, *PclFontHead16Ptr; - -typedef struct _PclInternalFontRec { - char *fontname; - float pitch; - float height; - char *pcl_font_name; - char *spacing; - struct _PclInternalFontRec *next; -} PclInternalFontRec, *PclInternalFontPtr; - -typedef struct { - PclFontHead8Ptr phead8; - PclFontHead16Ptr phead16; - PclInternalFontPtr pinfont; - unsigned char cur_max_fid; -} PclSoftFontInfoRec, *PclSoftFontInfoPtr; - -#define MONOSPACE 0 -#define PROPSPACE 1 - -#endif /* _PCLFONTS_H */ diff --git a/hw/xprint/pcl/PclSpans.c b/hw/xprint/pcl/PclSpans.c deleted file mode 100644 index 4951899ab..000000000 --- a/hw/xprint/pcl/PclSpans.c +++ /dev/null @@ -1,137 +0,0 @@ -/******************************************************************* -** -** ********************************************************* -** * -** * File: PclSpans.c -** * -** * Contents: -** * Code to set and fill spans in the PCL DDX -** * -** * Created: 10/23/95 -** * -** ********************************************************* -** -********************************************************************/ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "Pcl.h" -#include "gcstruct.h" -#include "windowstr.h" - -void -PclFillSpans( - DrawablePtr pDrawable, - GCPtr pGC, - int nSpans, - DDXPointPtr pPoints, - int *pWidths, - int fSorted) -{ - char t[80]; - FILE *outFile; - int xoffset, yoffset; - xRectangle *rects, *r; - RegionPtr fillRegion, region = 0; - int i; - int nbox; - BoxPtr pbox; - - if( PclUpdateDrawableGC( pGC, pDrawable, &outFile ) == FALSE ) - return; - - /* - * Build a region out of the spans - */ - rects = (xRectangle *)xalloc( nSpans * sizeof( xRectangle ) ); - xoffset = pDrawable->x; - yoffset = pDrawable->y; - - for( i = 0, r = rects; i < nSpans; i++, r++ ) - { - r->x = pPoints[i].x + xoffset; - r->y = pPoints[i].y + yoffset; - r->width = pWidths[i]; - r->height = 1; - } - fillRegion = RECTS_TO_REGION( pGC->pScreen, nSpans, rects, ( fSorted ) ? - CT_YSORTED : CT_UNSORTED ); - - /* - * Intersect this region with the clip region. Whatever's left, - * should be filled. - */ - REGION_INTERSECT( pGC->pScreen, region, fillRegion, pGC->clientClip ); - - pbox = REGION_RECTS( region ); - nbox = REGION_NUM_RECTS( region ); - - /* Enter HP-GL/2 */ - SEND_PCL( outFile, "\27%0B" ); - - while( nbox ) - { - sprintf( t, "PU%d,%d;RR%d,%d;", pbox->x1, pbox->y1, - pbox->x2, pbox->y2 ); - SEND_PCL( outFile, t ); - - nbox--; - pbox++; - } - - /* Go back to PCL */ - SEND_PCL( outFile, "\27%0A" ); - - /* - * Clean up the temporary regions - */ - REGION_DESTROY( pGC->pScreen, fillRegion ); - REGION_DESTROY( pGC->pScreen, region ); - xfree( rects ); -} - -void -PclSetSpans( - DrawablePtr pDrawable, - GCPtr pGC, - char *pSrc, - DDXPointPtr pPoints, - int *pWidths, - int nSpans, - int fSorted) -{ -} diff --git a/hw/xprint/pcl/PclText.c b/hw/xprint/pcl/PclText.c deleted file mode 100644 index 324de3014..000000000 --- a/hw/xprint/pcl/PclText.c +++ /dev/null @@ -1,934 +0,0 @@ -/******************************************************************* -** -** ********************************************************* -** * -** * File: PclText.c -** * -** * Contents: -** * Character-drawing routines for the PCL DDX -** * -** * Created: 10/23/95 -** * -** ********************************************************* -** -********************************************************************/ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifdef DO_TWO_BYTE_PCL -#include "iconv.h" -#endif /* DO_TWO_BYTE_PCL */ -#include "gcstruct.h" -#include "windowstr.h" - -#include "Pcl.h" -#include "migc.h" -#include - -#include "PclSFonts.h" - -static PclFontHead8Ptr makeFontHeader8 (FontPtr, PclSoftFontInfoPtr); -static PclFontHead16Ptr makeFontHeader16(FontPtr, PclSoftFontInfoPtr); -static PclInternalFontPtr makeInternalFont(FontPtr, PclSoftFontInfoPtr); -static void fillFontDescData(FontPtr, PclFontDescPtr, unsigned int); -static PclCharDataPtr fillCharDescData(PclCharDataPtr, CharInfoPtr); -static void output_text(FILE *, PclContextPrivPtr, unsigned char); -static char * getFontName(FontPtr); -static char isInternal(FontPtr); -static void selectInternalFont(FILE *, PclInternalFontPtr, int); -static void selectSize(FILE *, PclContextPrivPtr, PclInternalFontPtr); -static char t[80]; - -#ifdef DO_TWO_BYTE_PCL -static void code_conv(PclSoftFontInfoPtr, FontPtr, char *, char *); -#endif /* DO_TWO_BYTE_PCL */ - -#define ESC 0x1b -#define PER 0x25 -#define ETX 0x3 -#define ETX_ALT 0x2a -#define DOWNLOAD_FONT 0 -#define INTERNAL_FONT 1 - -int -PclPolyText8( - DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - int count, - char *string) -{ -XpContextPtr pCon; -PclContextPrivPtr pConPriv; -unsigned long n, i; -int w; -CharInfoPtr charinfo[255], *chinfo; - -FILE *outFile; -PclSoftFontInfoPtr pSoftFontInfo; -PclFontHead8Ptr pfh8 = (PclFontHead8Ptr)NULL; -PclInternalFontPtr pin = (PclInternalFontPtr)NULL; -PclCharDataRec cd; -unsigned char *p; -unsigned char last_fid; -int max_ascent, max_descent; - -int nbox; -BoxPtr pbox; -BoxRec box; -RegionPtr drawRegion, region; -char font_type; - - if( PclUpdateDrawableGC( pGC, pDrawable, &outFile ) == FALSE ) - return x; - - GetGlyphs(pGC->font, (unsigned long)count, (unsigned char *)string, - Linear8Bit, &n, charinfo); - if ( n == 0 ) - return x; - - pCon = PclGetContextFromWindow( (WindowPtr)pDrawable ); - pConPriv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - pSoftFontInfo = pConPriv->pSoftFontInfo; - font_type = isInternal(pGC->font); - if ( font_type == DOWNLOAD_FONT ) { - /* - * Create Soft Font Header Information - */ - pfh8 = makeFontHeader8(pGC->font, pSoftFontInfo); - if (!pfh8) - return x; - - /* - * exec Soft Font Downloading - */ - p = (unsigned char *)string; - for (i=0, chinfo=charinfo; iindex[*p] ) { - fillCharDescData(&cd, *chinfo); - PclDownloadSoftFont8(pConPriv->pJobFile, pSoftFontInfo, - pfh8, &cd, p); - xfree(cd.raster_top); - } - } - - /* - * print characters - */ - MACRO_START( outFile, pConPriv ); - sprintf(t, "\033%%0B;PU%d,%dPD;TD1;DT%c,1;", - x + pDrawable->x, y + pDrawable->y + pGC->font->info.fontAscent, - ETX); - SAVE_PCL( outFile, pConPriv, t ); - SAVE_PCL_COUNT( outFile, pConPriv, "FI0;SS;LB", 9 ); - - last_fid = 0; - w = 0; - max_ascent = charinfo[0]->metrics.ascent; - max_descent = charinfo[0]->metrics.descent; - p = (unsigned char *)string; - for (i=0, chinfo=charinfo; ifid ) { - sprintf(t, "%c;FI%d;SS;LB", ETX, pfh8->fid); - SAVE_PCL( outFile, pConPriv, t ); - - last_fid = pfh8->fid; - } - - output_text(outFile, pConPriv, pfh8->index[*p]); - - w += (*chinfo)->metrics.characterWidth; - max_ascent = MAX(max_ascent, (*chinfo)->metrics.ascent); - max_descent = MAX(max_descent, (*chinfo)->metrics.descent); - } - - sprintf(t, "%c", ETX); - SAVE_PCL_COUNT( outFile, pConPriv, t, 1 ); - sprintf(t, "TD0;\033%%1A"); - SAVE_PCL( outFile, pConPriv, t ); - MACRO_END( outFile ); - - } else { - int fid = 0; - - pin = makeInternalFont(pGC->font, pSoftFontInfo); - if (!pin) - return x; - - selectInternalFont(outFile, pin, fid); - - /* - * print characters - */ - MACRO_START( outFile, pConPriv ); - sprintf(t, "\033%%0B;PU%d,%dPD;TD1;DT%c,1;", - x + pDrawable->x, y + pDrawable->y + pGC->font->info.fontAscent, - ETX); - SAVE_PCL( outFile, pConPriv, t ); - selectSize(outFile, pConPriv, pin); - SAVE_PCL_COUNT( outFile, pConPriv, "FI0;SS;LB", 9 ); - - w = 0; - max_ascent = charinfo[0]->metrics.ascent; - max_descent = charinfo[0]->metrics.descent; - p = (unsigned char *)string; - for (i=0, chinfo=charinfo; imetrics.characterWidth; - max_ascent = MAX(max_ascent, (*chinfo)->metrics.ascent); - max_descent = MAX(max_descent, (*chinfo)->metrics.descent); - } - sprintf(t, "%c", ETX); - SAVE_PCL_COUNT( outFile, pConPriv, t, 1 ); - sprintf(t, "TD0;\033%%1A"); - SAVE_PCL( outFile, pConPriv, t ); - MACRO_END( outFile ); - } - - /* - * Convert the collection of rectangles into a proper region, then - * intersect it with the clip region. - */ - box.x1 = x + pDrawable->x; - box.y1 = y - max_ascent + pDrawable->y + pGC->font->info.fontAscent; - box.x2 = x + w + pDrawable->x; - box.y2 = y + max_descent + pDrawable->y + pGC->font->info.fontAscent; - - drawRegion = miRegionCreate( &box, 0 ); - region = miRegionCreate( NULL, 0 ); - miIntersect( region, drawRegion, pGC->pCompositeClip ); - - /* - * For each rectangle in the clip region, set the HP-GL/2 "input - * window" and render the entire polyline to it. - */ - pbox = REGION_RECTS( region ); - nbox = REGION_NUM_RECTS( region ); - - PclSendData(outFile, pConPriv, pbox, nbox, 1.0); - - /* - * Clean up the temporary regions - */ - REGION_DESTROY( pGC->pScreen, drawRegion ); - REGION_DESTROY( pGC->pScreen, region ); - - return x+w; -} - -int -PclPolyText16( - DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - int count, - unsigned short *string) -{ -XpContextPtr pCon; -PclContextPrivPtr pConPriv; -unsigned long n, i; -int w; -CharInfoPtr charinfo[255], *chinfo; - -FILE *outFile; -PclSoftFontInfoPtr pSoftFontInfo; -PclFontHead16Ptr pfh16 = (PclFontHead16Ptr)NULL; -PclCharDataRec cd; -FontInfoPtr pfi; -unsigned char row, col; -char *p; -unsigned char last_fid; -int max_ascent, max_descent; -unsigned short def; - -int nbox; -BoxPtr pbox; -BoxRec box; -RegionPtr drawRegion, region; -char font_type; - - if( PclUpdateDrawableGC( pGC, pDrawable, &outFile ) == FALSE ) - return x; - - GetGlyphs(pGC->font, (unsigned long)count, (unsigned char *)string, - (FONTLASTROW(pGC->font) == 0) ? Linear16Bit : TwoD16Bit, - &n, charinfo); - - pCon = PclGetContextFromWindow( (WindowPtr)pDrawable ); - pConPriv = (PclContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); - pSoftFontInfo = pConPriv->pSoftFontInfo; - - font_type = isInternal(pGC->font); - if ( font_type == DOWNLOAD_FONT ) { - /* - * Create Soft Font Header Information - */ - pfh16 = makeFontHeader16(pGC->font, pSoftFontInfo); - if (!pfh16) - return x; - - /* - * exec Soft Font Downloading - */ - pfi = (FontInfoRec *)&pGC->font->info; - p = (char *)string; - for (i=0, p=(char *)string, chinfo=charinfo; ifirstRow <= row) && (row <= pfi->lastRow) - && (pfi->firstCol <= col) && (col <= pfi->lastCol) ) { - row = row - pfi->firstRow; - col = col - pfi->firstCol; - } else { - def = pfi->defaultCh; - row = ((def>>8)&0xff) - pfi->firstRow; - col = (def&0xff) - pfi->firstCol; - } - if ( !pfh16->index[row][col].fid ) { - fillCharDescData(&cd, *chinfo); - PclDownloadSoftFont16(pConPriv->pJobFile, pSoftFontInfo, - pfh16, &cd, row, col); - xfree(cd.raster_top); - } - } - - /* - * print characters - */ - MACRO_START( outFile, pConPriv ); - sprintf(t, "\033%%0B;PU%d,%dPD;TD1;DT%c,1;", - x + pDrawable->x, y + pDrawable->y + pGC->font->info.fontAscent, - ETX); - SAVE_PCL( outFile, pConPriv, t ); - SAVE_PCL_COUNT( outFile, pConPriv, "FI0;SS;LB", 9 ); - - last_fid = 0; - - w = 0; - max_ascent = charinfo[0]->metrics.ascent; - max_descent = charinfo[0]->metrics.descent; - for (i=0, p=(char *)string, chinfo=charinfo; ifirstRow <= row) && (row <= pfi->lastRow) - && (pfi->firstCol <= col) && (col <= pfi->lastCol) ) { - row = row - pfi->firstRow; - col = col - pfi->firstCol; - } else { - def = pfi->defaultCh; - row = ((def>>8)&0xff) - pfi->firstRow; - col = (def&0xff) - pfi->firstCol; - } - if ( last_fid != pfh16->index[row][col].fid ) { - sprintf(t, "%cFI%d;SS;LB", - ETX, pfh16->index[row][col].fid); - SAVE_PCL( outFile, pConPriv, t ); - last_fid = pfh16->index[row][col].fid; - } - - output_text(outFile, pConPriv, pfh16->index[row][col].cindex); - - w += (*chinfo)->metrics.characterWidth; - max_ascent = MAX(max_ascent, (*chinfo)->metrics.ascent); - max_descent = MAX(max_descent, (*chinfo)->metrics.descent); - } - sprintf(t, "%c", ETX); - SAVE_PCL_COUNT( outFile, pConPriv, t, 1 ); - sprintf(t, "TD0;\033%%1A"); - SAVE_PCL( outFile, pConPriv, t ); - MACRO_END( outFile ); - - } else { -#ifdef DO_TWO_BYTE_PCL - PclInternalFontPtr pin; - int fid = 0; - - pin = makeInternalFont(pGC->font, pSoftFontInfo); - if (!pin) - return x; - - selectInternalFont(outFile, pin, fid); - fprintf(outFile, "%c&t31P", ESC); - - /* - * print characters - */ - MACRO_START( outFile, pConPriv ); - sprintf(t, "\033%%0B;PU%d,%dPD;TD1;DT%c,1;", - x + pDrawable->x, y + pDrawable->y + pGC->font->info.fontAscent, - ETX); - SAVE_PCL( outFile, pConPriv, t ); - sprintf(t, "TD0;\033%%1A"); - SAVE_PCL( outFile, pConPriv, t ); - - w = 0; - last_fid = 0; - max_ascent = charinfo[0]->metrics.ascent; - max_descent = charinfo[0]->metrics.descent; - for (i=0, p=(char *)string, chinfo=charinfo; ifont, (char *)p, tobuf); - fprintf(outFile, "%c%c", tobuf[0], tobuf[1]); - - w += (*chinfo)->metrics.characterWidth; - max_ascent = MAX(max_ascent, (*chinfo)->metrics.ascent); - max_descent = MAX(max_descent, (*chinfo)->metrics.descent); - } - MACRO_END( outFile ); -#else - return x; -#endif /* DO_TWO_BYTE_PCL */ - } - - /* - * Convert the collection of rectangles into a proper region, then - * intersect it with the clip region. - */ - box.x1 = x + pDrawable->x; - box.y1 = y - max_ascent + pDrawable->y + pGC->font->info.fontAscent; - box.x2 = x + w + pDrawable->x; - box.y2 = y + max_descent + pDrawable->y + pGC->font->info.fontAscent; - - drawRegion = miRegionCreate( &box, 0 ); - region = miRegionCreate( NULL, 0 ); - miIntersect( region, drawRegion, pGC->pCompositeClip ); - - /* - * For each rectangle in the clip region, set the HP-GL/2 "input - * window" and render the entire polyline to it. - */ - pbox = REGION_RECTS( region ); - nbox = REGION_NUM_RECTS( region ); - - PclSendData(outFile, pConPriv, pbox, nbox, 1.0); - - /* - * Clean up the temporary regions - */ - REGION_DESTROY( pGC->pScreen, drawRegion ); - REGION_DESTROY( pGC->pScreen, region ); - - return x+w; -} - -void -PclImageText8( - DrawablePtr pDrawable, - GCPtr pGC, - int x, int y, - int count, - char *string) -{ -} - -void -PclImageText16( - DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - int count, - unsigned short *string) -{ -} - -void -PclImageGlyphBlt( - DrawablePtr pDrawable, - GCPtr pGC, - int x, int y, - unsigned int nGlyphs, - CharInfoPtr *pCharInfo, - pointer pGlyphBase) -{ -} - -void -PclPolyGlyphBlt( - DrawablePtr pDrawable, - GCPtr pGC, - int x, int y, - unsigned int nGlyphs, - CharInfoPtr *pCharInfo, - pointer pGlyphBase) -{ -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -static PclFontHead8Ptr -makeFontHeader8(FontPtr pfont, PclSoftFontInfoPtr pSoftFontInfo) -{ -PclFontHead8Ptr phead8 = pSoftFontInfo->phead8; -PclFontHead8Ptr pfh8 = phead8; -PclFontHead8Ptr prev = (PclFontHead8Ptr)NULL; -FontInfoPtr pfi; -char *fontname; -unsigned char nindex; -int i; -unsigned long n; -CharInfoPtr charinfo[1]; -unsigned int space_width; - - if (pSoftFontInfo == (PclSoftFontInfoPtr) NULL) - return (PclFontHead8Ptr)NULL; - - /* - * Verify it has already been created, if so, return it. - */ - if ( (fontname = getFontName(pfont)) == (char *)NULL) - return (PclFontHead8Ptr)NULL; - - while (pfh8 != (PclFontHead8Ptr) NULL) { - if (!strcmp(pfh8->fontname, fontname)) - return pfh8; - prev = pfh8; - pfh8 = pfh8->next; - } - - /* - * Create Font Header Information - */ - pfh8 = (PclFontHead8Ptr)xalloc(sizeof(PclFontHead8Rec)); - if (pfh8 == (PclFontHead8Ptr)NULL) - return (PclFontHead8Ptr)NULL; - - pfi = (FontInfoRec *)&pfont->info; - GetGlyphs(pfont, 1, (unsigned char *)&pfi->defaultCh, - Linear8Bit, &n, charinfo); - if ( n ) - space_width = charinfo[0]->metrics.characterWidth; - else - space_width = FONTMAXBOUNDS(pfont,characterWidth); - - fillFontDescData(pfont, &(pfh8->fd), space_width); - pfh8->fid = 0; - pfh8->fontname = (char *)xalloc(strlen(fontname) + 1); - if (pfh8->fontname == (char *)NULL) { - xfree(pfh8); - return (PclFontHead8Ptr) NULL; - } - strcpy(pfh8->fontname, fontname); - - nindex = 0xff; - pfh8->index = (unsigned char *)xalloc(nindex); - if ( pfh8->index == (unsigned char *) NULL ) { - xfree(pfh8->fontname); - xfree(pfh8); - return (PclFontHead8Ptr) NULL; - } - - for (i=0; i<=nindex; i++) - pfh8->index[i] = 0x0; - - pfh8->next = (PclFontHead8Ptr)NULL; - - if ( prev == (PclFontHead8Ptr) NULL) - pSoftFontInfo->phead8 = pfh8; - else - prev->next = pfh8; - - return pfh8; -} - -static PclFontHead16Ptr -makeFontHeader16(FontPtr pfont, PclSoftFontInfoPtr pSoftFontInfo) -{ -PclFontHead16Ptr phead16 = pSoftFontInfo->phead16; -PclFontHead16Ptr pfh16 = phead16; -PclFontHead16Ptr prev = (PclFontHead16Ptr)NULL; -PclFontMapRec ** index; -FontInfoPtr pfi; -char *fontname; -unsigned char nindex_row, nindex_col; -int i, j; -unsigned long n; -CharInfoPtr charinfo[1]; -unsigned int space_width; - - if (pSoftFontInfo == (PclSoftFontInfoPtr) NULL) - return (PclFontHead16Ptr)NULL; - - /* - * Verify it has already been created, if so, return it. - */ - if ( (fontname = getFontName(pfont)) == (char *)NULL) - return (PclFontHead16Ptr)NULL; - - while (pfh16 != (PclFontHead16Ptr) NULL) { - if (!strcmp(pfh16->fontname, fontname)) - return pfh16; - prev = pfh16; - pfh16 = pfh16->next; - } - - /* - * Create Font Header Information - */ - pfh16 = (PclFontHead16Ptr)xalloc(sizeof(PclFontHead16Rec)); - if (pfh16 == (PclFontHead16Ptr)NULL) - return (PclFontHead16Ptr)NULL; - - pfi = (FontInfoRec *)&pfont->info; - GetGlyphs(pfont, 1, (unsigned char *)&pfi->defaultCh, - (FONTLASTROW(pfont) == 0) ? Linear16Bit : TwoD16Bit, - &n, charinfo); - - if ( n ) - space_width = charinfo[0]->metrics.characterWidth; - else - space_width = FONTMAXBOUNDS(pfont,characterWidth); - - fillFontDescData(pfont, &(pfh16->fd), space_width); - pfh16->cur_fid = 0; - pfh16->cur_cindex = 0; - pfh16->fontname = (char *)xalloc(strlen(fontname) + 1); - if (pfh16->fontname == (char *)NULL) { - xfree(pfh16); - return (PclFontHead16Ptr) NULL; - } - strcpy(pfh16->fontname, fontname); - - pfi = (FontInfoRec *)&pfont->info; - nindex_col = pfi->lastCol - pfi->firstCol + 1; - nindex_row = pfi->lastRow - pfi->firstRow + 1; - index = (PclFontMapRec **)xalloc(sizeof(PclFontMapRec *)*nindex_row); - if (index == (PclFontMapRec **)NULL) { - xfree(pfh16->fontname); - xfree(pfh16); - return (PclFontHead16Ptr) NULL; - } - for (i=0; ifontname); - xfree(pfh16); - return (PclFontHead16Ptr) NULL; - } - for (j=0; j<=nindex_col; j++) - index[i][j].fid = 0x0; - } - - pfh16->index = index; - pfh16->firstCol = pfi->firstCol; - pfh16->lastCol = pfi->lastCol; - pfh16->firstRow = pfi->firstRow; - pfh16->lastRow = pfi->lastRow; - pfh16->next = (PclFontHead16Ptr)NULL; - - if ( prev == (PclFontHead16Ptr) NULL) - pSoftFontInfo->phead16 = pfh16; - else - prev->next = pfh16; - - return pfh16; -} - -static PclInternalFontPtr -makeInternalFont(FontPtr pfont, PclSoftFontInfoPtr pSoftFontInfo) -{ -PclInternalFontPtr pinfont = pSoftFontInfo->pinfont; -PclInternalFontPtr pin = pinfont; -PclInternalFontPtr prev = (PclInternalFontPtr)NULL; -FontPropPtr props; -FontInfoPtr pfi; -char *fontname; -Atom xa_pcl_font_name, xa_res, xa_ave_width, xa_spacing; -int width = 1; -int mask; -int i; - - if (pSoftFontInfo == (PclSoftFontInfoPtr) NULL) - return (PclInternalFontPtr)NULL; - - /* - * Verify it has already been created, if so, return it. - */ - if ( (fontname = getFontName(pfont)) == (char *)NULL) - return (PclInternalFontPtr)NULL; - - while (pin != (PclInternalFontPtr) NULL) { - if (!strcmp(pin->fontname, fontname)) - return pin; - prev = pin; - pin = pin->next; - } - - /* - * Create Internal Font Information - */ - pin = (PclInternalFontPtr)xalloc(sizeof(PclInternalFontRec)); - if (pin == (PclInternalFontPtr)NULL) - return (PclInternalFontPtr)NULL; - - pin->fontname = (char *)xalloc(strlen(fontname) + 1); - if (pin->fontname == (char *)NULL) { - xfree(pin); - return (PclInternalFontPtr) NULL; - } - strcpy(pin->fontname, fontname); - - xa_pcl_font_name = MakeAtom("PCL_FONT_NAME", strlen("PCL_FONT_NAME"), TRUE); - xa_res = MakeAtom("RESOLUTION_X", strlen("RESOLUTION_X"), TRUE); - xa_ave_width = MakeAtom("AVERAGE_WIDTH", strlen("AVERAGE_WIDTH"), TRUE); - xa_spacing = MakeAtom("SPACING", strlen("SPACING"), TRUE); - pfi = (FontInfoRec *)&pfont->info; - props = pfi->props; - - mask = 0; - for (i=0; inprops; i++, props++) { - if ( (Atom) props->name == xa_pcl_font_name ) { - pin->pcl_font_name = NameForAtom(props->value); - mask |= 0x1; - } else if ( props->name == XA_POINT_SIZE ) { - pin->height = (float) props->value / 10.0; - mask |= 0x2; - } else if ( (Atom) props->name == xa_res ) { - mask |= 0x4; - } else if ( (Atom) props->name == xa_ave_width ) { - width = (int) props->value / 10; - mask |= 0x8; - } else if ( (Atom) props->name == xa_spacing ) { - pin->spacing = NameForAtom(props->value); - mask |= 0x10; - } - } - if ( mask != 0x1f ) { - xfree(pin->fontname); - xfree(pin); - return (PclInternalFontPtr) NULL; - } - - if ( *pin->spacing != 'P' || *pin->spacing != 'p' ) { - if (width == 0) - width = 1; - pin->pitch = (float) 300.0 / width; /* Hard-Code: Resolution is 300 */ - } - - pin->next = (PclInternalFontPtr)NULL; - if ( prev == (PclInternalFontPtr) NULL) - pSoftFontInfo->pinfont = pin; - else - prev->next = pin; - - return pin; -} - -static void -fillFontDescData(FontPtr pfont, PclFontDescPtr pfd, unsigned int space) -{ -FontInfoPtr pfi; - - pfi = (FontInfoRec *)&pfont->info; - - if ( (pfi->maxbounds.leftSideBearing == pfi->minbounds.leftSideBearing) - && (pfi->maxbounds.rightSideBearing == pfi->minbounds.rightSideBearing) - && (pfi->maxbounds.characterWidth == pfi->minbounds.characterWidth) - && (pfi->maxbounds.ascent == pfi->minbounds.ascent) - && (pfi->maxbounds.descent == pfi->minbounds.descent) - ) - pfd->spacing = MONOSPACE; - else - pfd->spacing = PROPSPACE; - - pfd->pitch = space; - pfd->cellheight = FONTMAXBOUNDS(pfont,ascent) - + FONTMAXBOUNDS(pfont,descent); - pfd->cellwidth = FONTMAXBOUNDS(pfont,rightSideBearing) - - FONTMINBOUNDS(pfont,leftSideBearing); - pfd->ascent = FONTMAXBOUNDS(pfont,ascent); /*FONTASCENT(pfont);*/ - pfd->descent = FONTMAXBOUNDS(pfont,descent); /*FONTDESCENT(pfont);*/ -} - -static PclCharDataPtr -fillCharDescData(PclCharDataPtr pcd, CharInfoPtr pci) -{ -unsigned int byte_width; -unsigned char *p; -register int nbyGlyphWidth; -unsigned char *pglyph, *pg; -unsigned int i, j; - - pcd->h_offset = pci->metrics.leftSideBearing; - pcd->v_offset = pci->metrics.ascent; - pcd->width = pci->metrics.rightSideBearing - - pci->metrics.leftSideBearing; - pcd->height = pci->metrics.ascent + pci->metrics.descent; - pcd->font_pitch = pci->metrics.characterWidth; - - byte_width = (pcd->width + 7)/8; - pcd->raster_top = (unsigned char *)xalloc(byte_width * pcd->height); - if (pcd->raster_top == (unsigned char *)NULL) - return (PclCharDataPtr)NULL; - - p = pcd->raster_top; - nbyGlyphWidth = GLYPHWIDTHBYTESPADDED(pci); - pglyph = FONTGLYPHBITS(pglyphBase, pci); - for (i=0; iheight; i++) { - pg = pglyph + nbyGlyphWidth * i; - for (j=0; jinfo; - props = pfi->props; - fontname = (char *) NULL; - for (i=0; inprops; i++, props++) { - if ( props->name == XA_FONT ) { - fontname = (char *)NameForAtom(props->value); - break; - } - } - return fontname; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* Internal Font Selection */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -static char -isInternal(FontPtr pfont) -{ -int i; -FontInfoPtr pfi; -FontPropPtr props; -Atom dest; - - dest = MakeAtom("PRINTER_RESIDENT_FONT", strlen("PRINTER_RESIDENT_FONT"), TRUE); - - pfi = (FontInfoRec *)&pfont->info; - props = pfi->props; - for (i=0; inprops; i++, props++) { - if ( (Atom) props->name == dest && props->value == 2 ) - return INTERNAL_FONT; - } - return DOWNLOAD_FONT; -} - -static void -selectInternalFont(FILE *outFile, PclInternalFontPtr pin, int fid) -{ - fprintf(outFile, "%c*c%dD", ESC, fid); - if ( *pin->spacing == 'P' || *pin->spacing == 'p' ) - fprintf(outFile, pin->pcl_font_name, pin->height); - else - fprintf(outFile, pin->pcl_font_name, pin->pitch); - fprintf(outFile, "%c*c6F", ESC); -} - -static void -selectSize(FILE *outFile, - PclContextPrivPtr pConPriv, - PclInternalFontPtr pin) -{ - if ( *pin->spacing == 'P' || *pin->spacing == 'p' ) { - sprintf(t, "SD4,%f;", pin->height); - SAVE_PCL( outFile, pConPriv, t ); - } else { - sprintf(t, "SD3,%f;", pin->pitch); - SAVE_PCL( outFile, pConPriv, t ); - } - return; -} - -#ifdef DO_TWO_BYTE_PCL -static void -code_conv( - PclSoftFontInfoPtr pSoftFontInfo, - FontPtr pfont, - char *from, - char *to -) -{ -iconv_t cd; -char frombuf[9], *fromptr; -size_t inbyte = 5, outbyte=2; - - fromptr = frombuf; - frombuf[0] = 0x1b; /* Esc */ - frombuf[1] = 0x24; /* $ */ - frombuf[2] = 0x42; /* B */ - frombuf[3] = *from; - frombuf[4] = *(from+1); - frombuf[5] = 0x1b; /* Esc */ - frombuf[6] = 0x28; /* ( */ - frombuf[7] = 0x4a; /* J */ - frombuf[8] = 0x0; - if ((cd = iconv_open("sjis", "jis")) == (iconv_t)(-1)) { - *to = (unsigned char)NULL; - return; - } - - if ( iconv(cd, &fromptr, &inbyte, &to, &outbyte) == -1 ) - *to = (unsigned char)NULL; - - iconv_close(cd); - return; -} -#endif /* DO_TWO_BYTE_PCL */ diff --git a/hw/xprint/pcl/PclWindow.c b/hw/xprint/pcl/PclWindow.c deleted file mode 100644 index 950933e49..000000000 --- a/hw/xprint/pcl/PclWindow.c +++ /dev/null @@ -1,209 +0,0 @@ -/******************************************************************* -** -** ********************************************************* -** * -** * File: PclWindow.c -** * -** * Contents: -** * Window code for Pcl driver. -** * -** * Created: 2/02/95 -** * -** ********************************************************* -** -********************************************************************/ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include - -#include "mistruct.h" -#include "regionstr.h" -#include "windowstr.h" -#include "gcstruct.h" - -#include "Pcl.h" - -#if 0 -/* - * The following list of strings defines the properties which will be - * placed on the screen's root window if the property was defined in - * the start-up configuration resource database. - */ -static /* const */ char *propStrings[] = { - DT_PRINT_JOB_HEADER, - DT_PRINT_JOB_TRAILER, - DT_PRINT_JOB_COMMAND, /* old-obsolete */ - DT_PRINT_JOB_EXEC_COMMAND, - DT_PRINT_JOB_EXEC_OPTIONS, - DT_PRINT_PAGE_HEADER, - DT_PRINT_PAGE_TRAILER, - DT_PRINT_PAGE_COMMAND, - (char *)NULL -}; -#endif - -/* - * PclCreateWindow - watch for the creation of the root window. - * When it's created, register the screen with the print extension, - * and put the default command/header properties on it. - */ -/*ARGSUSED*/ - -Bool -PclCreateWindow( - register WindowPtr pWin) -{ - PclWindowPrivPtr pPriv; - -#if 0 - Bool status = Success; - ScreenPtr pScreen = pWin->drawable.pScreen; - PclScreenPrivPtr pScreenPriv = (PclScreenPrivPtr) - dixLookupPrivate(&pScreen->devPrivates, PclScreenPrivateKey); - PclWindowPrivPtr pWinPriv = (PclWindowPrivPtr) - dixLookupPrivate(&pWin->devPrivates, PclWindowPrivateKey); - - /* - * Initialize this window's private struct. - */ - pWinPriv->jobFileName = (char *)NULL; - pWinPriv->pJobFile = (FILE *)NULL; - pWinPriv->pageFileName = (char *)NULL; - pWinPriv->pPageFile = (FILE *)NULL; - - if(pWin->parent == (WindowPtr)NULL) /* root window? */ - { - Atom propName; /* type = XA_STRING */ - char *propVal; - int i; - XrmDatabase rmdb = pScreenPriv->resDB; - - /* - * Put the defaults spec'd in the config files in properties on this - * screen's root window. - */ - for(i = 0; propStrings[i] != (char *)NULL; i++) - { - if((propVal = _DtPrintGetPrinterResource(pWin, rmdb, - propStrings[i])) != - (char *)NULL) - { - propName = MakeAtom(propStrings[i], strlen(propStrings[i]), - TRUE); - dixChangeWindowProperty(serverClient, pWin, propName, XA_STRING, - 8, PropModeReplace, strlen(propVal), - (pointer)propVal, FALSE); - xfree(propVal); - } - } - } - - return status; -#endif - - /* - * Invalidate the window's private print context. - */ - pPriv = (PclWindowPrivPtr) - dixLookupPrivate(&pWin->devPrivates, PclWindowPrivateKey); - pPriv->validContext = 0; - - return TRUE; -} - - -/*ARGSUSED*/ -Bool PclMapWindow( - WindowPtr pWindow) -{ - return TRUE; -} - -/*ARGSUSED*/ -Bool -PclPositionWindow( - register WindowPtr pWin, - int x, - int y) -{ - return TRUE; -} - -/*ARGSUSED*/ -Bool -PclUnmapWindow( - WindowPtr pWindow) -{ - return TRUE; -} - -/*ARGSUSED*/ -void -PclCopyWindow( - WindowPtr pWin, - DDXPointRec ptOldOrg, - RegionPtr prgnSrc) -{ -} - -/*ARGSUSED*/ -Bool -PclChangeWindowAttributes( - register WindowPtr pWin, - register unsigned long mask) -{ - if( pWin->backingStore != NotUseful ) - { - pWin->backingStore = NotUseful; - mask |= CWBackingStore; - } - - return TRUE; -} - -/*ARGSUSED*/ -Bool -PclDestroyWindow( - WindowPtr pWin) -{ - return TRUE; -} - diff --git a/hw/xprint/pcl/Pclmap.h b/hw/xprint/pcl/Pclmap.h deleted file mode 100644 index 18ac31d90..000000000 --- a/hw/xprint/pcl/Pclmap.h +++ /dev/null @@ -1,210 +0,0 @@ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _PCLMAP_H_ -#define _PCLMAP_H_ - -#ifdef XP_PCL_COLOR -#ifdef CATNAME -#undef CATNAME -#endif -#if !defined(UNIXCPP) || defined(ANSICPP) -#define PCLNAME(subname) PclCr##subname -#define CATNAME(prefix,subname) prefix##Color##subname -#else -#define PCLNAME(subname) PclCr/**/subname -#define CATNAME(prefix,subname) prefix/**/Color/**/subname -#endif -#endif /* XP_PCL_COLOR */ - -#ifdef XP_PCL_MONO -#ifdef CATNAME -#undef CATNAME -#endif -#if !defined(UNIXCPP) || defined(ANSICPP) -#define PCLNAME(subname) PclMn##subname -#define CATNAME(prefix,subname) prefix##Mono##subname -#else -#define PCLNAME(subname) PclMn/**/subname -#define CATNAME(prefix,subname) prefix/**/Mono/**/subname -#endif -#endif /* XP_PCL_MONO */ - -#ifdef XP_PCL_LJ3 -#ifdef CATNAME -#undef CATNAME -#endif -#if !defined(UNIXCPP) || defined(ANSICPP) -#define PCLNAME(subname) PclLj3##subname -#define CATNAME(prefix,subname) prefix##Lj3##subname -#else -#define PCLNAME(subname) PclLj3/**/subname -#define CATNAME(prefix,subname) prefix/**/Lj3/**/subname -#endif -#endif /* XP_PCL_LJ3 */ - -#ifdef PCLNAME - -/* PclInit.c */ -#define InitializePclDriver CATNAME(Initialize, PclDriver) -#define PclCloseScreen PCLNAME(CloseScreen) -#define PclGetContextFromWindow PCLNAME(GetContextFromWindow) -#define PclScreenPrivateKey PCLNAME(ScreenPrivateKey) -#define PclWindowPrivateKey PCLNAME(WindowPrivateKey) -#define PclContextPrivateKey PCLNAME(ContextPrivateKey) -#define PclPixmapPrivateKey PCLNAME(PixmapPrivateKey) -#define PclGCPrivateKey PCLNAME(GCPrivateKey) - -/* PclPrint.c */ -#define PclStartJob PCLNAME(StartJob) -#define PclEndJob PCLNAME(EndJob) -#define PclStartPage PCLNAME(StartPage) -#define PclEndPage PCLNAME(EndPage) -#define PclStartDoc PCLNAME(StartDoc) -#define PclEndDoc PCLNAME(EndDoc) -#define PclDocumentData PCLNAME(DocumentData) -#define PclGetDocumentData PCLNAME(GetDocumentData) - -/* PclWindow.c */ -#define PclCreateWindow PCLNAME(CreateWindow) -#define PclMapWindow PCLNAME(MapWindow) -#define PclPositionWindow PCLNAME(PositionWindow) -#define PclUnmapWindow PCLNAME(UnmapWindow) -#define PclCopyWindow PCLNAME(CopyWindow) -#define PclChangeWindowAttributes PCLNAME(ChangeWindowAttributes) -#define PclDestroyWindow PCLNAME(DestroyWindow) - -/* PclGC.c */ -#define PclCreateGC PCLNAME(CreateGC) -#define PclDestroyGC PCLNAME(DestroyGC) -#define PclGetDrawablePrivateStuff PCLNAME(GetDrawablePrivateStuff) -#define PclSetDrawablePrivateGC PCLNAME(SetDrawablePrivateGC) -#define PclSendPattern PCLNAME(SendPattern) -#define PclUpdateDrawableGC PCLNAME(UpdateDrawableGC) -#define PclComputeCompositeClip PCLNAME(ComputeCompositeClip) -#define PclValidateGC PCLNAME(ValidateGC) - -/* PclAttr.c */ -#define PclGetAttributes PCLNAME(GetAttributes) -#define PclGetOneAttribute PCLNAME(GetOneAttribute) -#define PclAugmentAttributes PCLNAME(AugmentAttributes) -#define PclSetAttributes PCLNAME(SetAttributes) - -/* PclColor.c */ -#define PclLookUp PCLNAME(LookUp) -#define PclCreateDefColormap PCLNAME(CreateDefColormap) -#define PclCreateColormap PCLNAME(CreateColormap) -#define PclDestroyColormap PCLNAME(DestroyColormap) -#define PclInstallColormap PCLNAME(InstallColormap) -#define PclUninstallColormap PCLNAME(UninstallColormap) -#define PclListInstalledColormaps PCLNAME(ListInstalledColormaps) -#define PclStoreColors PCLNAME(StoreColors) -#define PclResolveColor PCLNAME(ResolveColor) -#define PclFindPaletteMap PCLNAME(FindPaletteMap) -#define PclUpdateColormap PCLNAME(UpdateColormap) -#define PclReadMap PCLNAME(ReadMap) - -/* PclPixmap.c */ -#define PclCreatePixmap PCLNAME(CreatePixmap) -#define PclDestroyPixmap PCLNAME(DestroyPixmap) - -/* PclArc.c */ -#define PclDoArc PCLNAME(DoArc) -#define PclPolyArc PCLNAME(PolyArc) -#define PclPolyFillArc PCLNAME(PolyFillArc) - -/* PclArea.c */ -#define PclPutImage PCLNAME(PutImage) -#define PclCopyArea PCLNAME(CopyArea) -#define PclCopyPlane PCLNAME(CopyPlane) - -/* PclLine */ -#define PclPolyLine PCLNAME(PolyLine) -#define PclPolySegment PCLNAME(PolySegment) - -/* PclPixel.c */ -#define PclPolyPoint PCLNAME(PolyPoint) -#define PclPushPixels PCLNAME(PushPixels) - -/* PclPolygon.c */ -#define PclPolyRectangle PCLNAME(PolyRectangle) -#define PclFillPolygon PCLNAME(FillPolygon) -#define PclPolyFillRect PCLNAME(PolyFillRect) - -/* PclSpans.c */ -#define PclFillSpans PCLNAME(FillSpans) -#define PclSetSpans PCLNAME(SetSpans) - -/* PclText.c */ -#define PclPolyText8 PCLNAME(PolyText8) -#define PclPolyText16 PCLNAME(PolyText16) -#define PclImageText8 PCLNAME(ImageText8) -#define PclImageText16 PCLNAME(ImageText16) -#define PclImageGlyphBlt PCLNAME(ImageGlyphBlt) -#define PclPolyGlyphBlt PCLNAME(PolyGlyphBlt) -#define PclPolyGlyphBlt PCLNAME(PolyGlyphBlt) - -/* PclFonts.c */ -#define PclRealizeFont PCLNAME(RealizeFont) -#define PclUnrealizeFont PCLNAME(UnrealizeFont) - -/* PclSFonts.c */ -#define PclDownloadSoftFont8 PCLNAME(DownloadSoftFont8) -#define PclDownloadSoftFont16 PCLNAME(DownloadSoftFont16) -#define PclCreateSoftFontInfo PCLNAME(CreateSoftFontInfo) -#define PclDestroySoftFontInfo PCLNAME(DestroySoftFontInfo) - -/* PclMisc.c */ -#define PclQueryBestSize PCLNAME(QueryBestSize) -#define GetPropString PCLNAME(GetPropString) -#define SystemCmd PCLNAME(SystemCmd) -#define PclGetMediumDimensions PCLNAME(GetMediumDimensions) -#define PclGetReproducibleArea PCLNAME(GetReproducibleArea) -#define PclSpoolFigs PCLNAME(SpoolFigs) -#define PclSendData PCLNAME(SendData) - -/* PclCursor.c */ -#define PclConstrainCursor PCLNAME(ConstrainCursor) -#define PclCursorLimits PCLNAME(CursorLimits) -#define PclDisplayCursor PCLNAME(DisplayCursor) -#define PclRealizeCursor PCLNAME(RealizeCursor) -#define PclUnrealizeCursor PCLNAME(UnrealizeCursor) -#define PclRecolorCursor PCLNAME(RecolorCursor) -#define PclSetCursorPosition PCLNAME(SetCursorPosition) - -#endif - -#endif /* _PCLMAP_H_ */ diff --git a/hw/xprint/ps/Makefile.am b/hw/xprint/ps/Makefile.am deleted file mode 100644 index 08638b19d..000000000 --- a/hw/xprint/ps/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -noinst_LTLIBRARIES = libps.la - -INCLUDES = -I$(top_srcdir)/hw/xprint - -AM_CFLAGS = @DIX_CFLAGS@ @XPRINT_CFLAGS@ @FREETYPE_CFLAGS@ \ - -D_XP_PRINT_SERVER_ -DXP_PSTEXT - -libps_la_SOURCES = \ - PsArc.c \ - PsArea.c \ - PsAttr.c \ - PsAttVal.c \ - PsCache.c \ - PsColor.c \ - PsDef.h \ - PsFonts.c \ - PsGC.c \ - Ps.h \ - PsImageUtil.c \ - PsInit.c \ - PsLine.c \ - PsMisc.c \ - psout.c \ - psout.h \ - PsPixel.c \ - PsPixmap.c \ - PsPolygon.c \ - PsPrint.c \ - PsSpans.c \ - PsText.c \ - PsWindow.c - -EXTRA_DIST = PsFTFonts.c \ - psout_ft.c \ - psout_ftpstype1.c \ - psout_ftpstype3.c \ - ttf2pt1wrap.c - -if XP_USE_FREETYPE - AM_CFLAGS += -DXP_USE_FREETYPE - libps_la_SOURCES += $(EXTRA_DIST) -endif diff --git a/hw/xprint/ps/Ps.h b/hw/xprint/ps/Ps.h deleted file mode 100644 index a25e9891a..000000000 --- a/hw/xprint/ps/Ps.h +++ /dev/null @@ -1,600 +0,0 @@ -/* - -Copyright 1996, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* - * (c) Copyright 1996 Hewlett-Packard Company - * (c) Copyright 1996 International Business Machines Corp. - * (c) Copyright 1996 Sun Microsystems, Inc. - * (c) Copyright 1996 Novell, Inc. - * (c) Copyright 1996 Digital Equipment Corp. - * (c) Copyright 1996 Fujitsu Limited - * (c) Copyright 1996 Hitachi, Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the names of the copyright holders - * shall not be used in advertising or otherwise to promote the sale, use - * or other dealings in this Software without prior written authorization - * from said copyright holders. - */ - -/******************************************************************* -** -** ********************************************************* -** * -** * File: Ps.h -** * -** * Contents: defines and includes for the Ps driver -** * for a printing X server. -** * -** * Created By: Roger Helmendach (Liberty Systems) -** * -** * Copyright: Copyright 1996 The Open Group, Inc. -** * -** ********************************************************* -** -********************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _PS_H_ -#define _PS_H_ - -#include - -#ifdef abs -#undef abs /* this is because of a non-Spec1170ness in misc.h */ -#endif -#include -#include "scrnintstr.h" -#include "dix.h" - -#include "PsDef.h" -#include "psout.h" - -#include -#include - -#include "regionstr.h" -#include -#include "dixfontstr.h" -#include "gcstruct.h" - -/* - * Some sleazes to force the XrmDB stuff into the server - */ -#ifndef HAVE_XPointer -typedef char *XPointer; -#define Status int -#define True 1 -#define False 0 -#endif - -#include "misc.h" -#include -#include -#include "attributes.h" - - -/* - * Public index variables from PsInit.c - */ - -extern DevPrivateKey PsScreenPrivateKey; -extern DevPrivateKey PsWindowPrivateKey; -extern DevPrivateKey PsContextPrivateKey; -extern DevPrivateKey PsPixmapPrivateKey; -extern XpValidatePoolsRec PsValidatePoolsRec; - -/* - * Display list structures - */ - -#define DPY_BLOCKSIZE 4096 - -typedef struct -{ - int mode; - int nPoints; - xPoint *pPoints; -} PsPolyPointsRec; - -typedef struct -{ - int nSegments; - xSegment *pSegments; -} PsSegmentsRec; - -typedef struct -{ - int nRects; - xRectangle *pRects; -} PsRectanglesRec; - -typedef struct -{ - int nArcs; - xArc *pArcs; -} PsArcsRec; - -typedef struct -{ - int x; - int y; - int count; - char *string; -} PsText8Rec; - -typedef struct -{ - int x; - int y; - int count; - unsigned short *string; -} PsText16Rec; - -typedef struct -{ - int depth; - int x; - int y; - int w; - int h; - int leftPad; - int format; - int res; /* image resolution */ - char *pData; -} PsImageRec; - -typedef struct -{ - int x; - int y; - int w; - int h; -} PsFrameRec; - -typedef enum -{ - PolyPointCmd, - PolyLineCmd, - PolySegmentCmd, - PolyRectangleCmd, - FillPolygonCmd, - PolyFillRectCmd, - PolyArcCmd, - PolyFillArcCmd, - Text8Cmd, - Text16Cmd, - TextI8Cmd, - TextI16Cmd, - PutImageCmd, - BeginFrameCmd, - EndFrameCmd -} DisplayElmType; - -typedef struct _DisplayElmRec -{ - DisplayElmType type; - GCPtr gc; - union - { - PsPolyPointsRec polyPts; - PsSegmentsRec segments; - PsRectanglesRec rects; - PsArcsRec arcs; - PsText8Rec text8; - PsText16Rec text16; - PsImageRec image; - PsFrameRec frame; - } c; -} DisplayElmRec; - -typedef DisplayElmRec *DisplayElmPtr; - -typedef struct _DisplayListRec -{ - struct _DisplayListRec *next; - int nelms; - DisplayElmRec elms[DPY_BLOCKSIZE]; -} DisplayListRec; - -typedef DisplayListRec *DisplayListPtr; - -/* - * Private structures - */ - -typedef struct -{ - XrmDatabase resDB; - Bool (*DestroyWindow)(WindowPtr); -} PsScreenPrivRec, *PsScreenPrivPtr; - -typedef struct PsFontTypeInfoRec PsFontTypeInfoRec; - -/* Structure to hold information about one font on disk - * Notes: - * - multiple XLFD names can refer to the same |PsFontTypeInfoRec| (if - * they all use the same font on the disk) - * - the FreeType font download code uses multiple |PsFontTypeInfoRec| - * records for one font on disk if they differ in the encoding being - * used (this is an exception from the - * 'one-|PsFontTypeInfoRec|-per-font-on-disk'-design; maybe it it is better - * to rework that in a later step and add a new per-encoding structure). - */ -struct PsFontTypeInfoRec -{ - PsFontTypeInfoRec *next; /* Next record in list... */ - char *adobe_ps_name; /* PostScript font name (from the - * "_ADOBE_POSTSCRIPT_FONTNAME" atom) */ - char *download_ps_name; /* PostScript font name used for font download */ - char *filename; /* File name of font */ -#ifdef XP_USE_FREETYPE - char *ft_download_encoding; /* encoding used for download */ - PsFTDownloadFontType ft_download_font_type; /* PS font type used for download (e.g. Type1/Type3/CID/etc.) */ -#endif /* XP_USE_FREETYPE */ - int is_iso_encoding; /* Is this font encoded in ISO Latin 1 ? */ - int font_type; /* See PSFTI_FONT_TYPE_* below... */ - Bool downloadableFont; /* Font can be downloaded */ - Bool alreadyDownloaded[256]; /* Font has been downloaded (for 256 8bit "sub"-font) */ -}; - -#define PSFTI_FONT_TYPE_OTHER (0) -#define PSFTI_FONT_TYPE_PMF (1) -#define PSFTI_FONT_TYPE_PS_TYPE1_PFA (2) -#define PSFTI_FONT_TYPE_PS_TYPE1_PFB (3) -#define PSFTI_FONT_TYPE_TRUETYPE (4) -/* PSFTI_FONT_TYPE_FREETYPE is means the font is handled by the freetype engine */ -#define PSFTI_FONT_TYPE_FREETYPE (5) - -typedef struct PsFontInfoRec PsFontInfoRec; - -/* Structure which represents our context info for a single XLFD font - * Note that multiple |PsFontInfoRec| records can share the same - * |PsFontTypeInfoRec| record - the |PsFontInfoRec| records represent - * different appearances of the same font on disk(=|PsFontTypeInfoRec|)). - */ -struct PsFontInfoRec -{ - PsFontInfoRec *next; /* Next record in list... */ - /* |font| and |font_fontPrivate| are used by |PsFindFontInfoRec()| to - * identify a font */ - FontPtr font; /* The font this record is for */ - pointer font_fontPrivate; - PsFontTypeInfoRec *ftir; /* Record about the font file on disk */ - const char *dfl_name; /* XLFD for this font */ - int size; /* Font size. Use |mtx| if |size==0| */ - float mtx[4]; /* Transformation matrix (see |size|) */ -}; - -typedef struct -{ - char *jobFileName; - FILE *pJobFile; - GC lastGC; - unsigned char *dash; - int validGC; - ClientPtr getDocClient; - int getDocBufSize; - PsOutPtr pPsOut; - PsFontTypeInfoRec *fontTypeInfoRecords; - PsFontInfoRec *fontInfoRecords; -} PsContextPrivRec, *PsContextPrivPtr; - -typedef struct -{ - int validContext; - XpContextPtr context; -} PsWindowPrivRec, *PsWindowPrivPtr; - -typedef struct -{ - XpContextPtr context; - GC lastGC; - int validGC; - DisplayListPtr dispList; -} PsPixmapPrivRec, *PsPixmapPrivPtr; - -/* - * Macro functions - */ - -#define SEND_PS(f,c) fwrite( c, sizeof( char ), strlen( c ), f ) -#define MIN(a,b) (((a)<(b))?(a):(b)) -#ifndef MAX -#define MAX(a,b) (((a)>(b))?(a):(b)) -#endif - -/* - * Functions in PsInit.c - */ - -extern Bool InitializePsDriver(int ndx, ScreenPtr pScreen, int argc, - char **argv); -extern XpContextPtr PsGetContextFromWindow(WindowPtr win); - -/* - * Functions in PsCache.c - */ - -extern int PsBmIsImageCached(int gWidth, int gHeight, char *pBuffer); -extern int PsBmPutImageInCache(int gWidth, int gHeight, char *pBuffer); -extern void PsBmClearImageCache(void); - -/* - * Functions in PsPrint.c - */ - -extern int PsStartJob(XpContextPtr pCon, Bool sendClientData, ClientPtr client); -extern int PsEndJob(XpContextPtr pCon, Bool cancel); -extern int PsStartPage(XpContextPtr pCon, WindowPtr pWin); -extern int PsEndPage(XpContextPtr pCon, WindowPtr pWin); -extern int PsStartDoc(XpContextPtr pCon, XPDocumentType type); -extern int PsEndDoc(XpContextPtr pCon, Bool cancel); -extern int PsDocumentData(XpContextPtr pCon, DrawablePtr pDraw, char *pData, - int len_data, char *pFmt, int len_fmt, char *pOpt, int len_opt, - ClientPtr client); -extern int PsGetDocumentData(XpContextPtr pCon, ClientPtr client, - int maxBufferSize); - -/* - * Functions in PsGC.c - */ - -extern Bool PsCreateGC(GCPtr pGC); -extern PsContextPrivPtr PsGetPsContextPriv( DrawablePtr pDrawable ); -extern int PsUpdateDrawableGC(GCPtr pGC, DrawablePtr pDrawable, - PsOutPtr *psOut, ColormapPtr *cMap); -extern void PsValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable); -extern void PsChangeGC(GCPtr pGC, unsigned long changes); -extern void PsCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst); -extern void PsDestroyGC(GCPtr pGC); -extern void PsChangeClip(GCPtr pGC, int type, pointer pValue, int nrects); -extern void PsDestroyClip(GCPtr pGC); -extern void PsCopyClip(GCPtr pgcDst, GCPtr pgcSrc); - -extern GCPtr PsCreateAndCopyGC(DrawablePtr pDrawable, GCPtr pSrc); - -/* - * Functions in PsMisc.c - */ - -extern void PsQueryBestSize(int type, short *pwidth, short *pheight, - ScreenPtr pScreen); -extern Bool PsCloseScreen(int index, ScreenPtr pScreen); -extern void PsLineAttrs(PsOutPtr psOut, GCPtr pGC, ColormapPtr cMap); -extern int PsGetMediumDimensions( - XpContextPtr pCon, - CARD16 *pWidth, - CARD16 *pHeight); -extern int PsGetReproducibleArea( - XpContextPtr pCon, - xRectangle *pRect); -extern int PsSetImageResolution( - XpContextPtr pCon, - int imageRes, - Bool *status); - -/* - * Functions in PsSpans.c - */ - -extern void PsFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nSpans, - DDXPointPtr pPoints, int *pWidths, int fSorted); -extern void PsSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *pSrc, - DDXPointPtr pPoints, int *pWidths, int nSpans, - int fSorted); - -/* - * Functions in PsArea.c - */ - -extern void PsPutScaledImage(DrawablePtr pDrawable, GCPtr pGC, int depth, - int x, int y, int w, int h, int leftPad, int format, - int imageRes, char *pImage); -extern void PsPutScaledImageIM(DrawablePtr pDrawable, GCPtr pGC, int depth, - int x, int y, int w, int h, int leftPad, - int format, int imageRes, char *pImage); -extern void PsPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, - int x, int y, int w, int h, int leftPad, int format, - char *pImage); -extern void PsPutImageMask(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, - int w, int h, int leftPad, int format, char *pImage); -extern RegionPtr PsCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, - int srcx, int srcy, int width, int height, - int dstx, int dsty); -extern RegionPtr PsCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, - int srcx, int srcy, int width, int height, - int dstx, int dsty, unsigned long plane); - -/* - * Functions in PsPixel.c - */ - -extern void PsPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, - int nPoints, xPoint *pPoints); -extern void PsPushPixels(GCPtr pGC, PixmapPtr pBitmap, DrawablePtr pDrawable, - int width, int height, int x, int y); - -/* - * Functions in PsLine.c - */ - -extern void PsPolyLine(DrawablePtr pDrawable, GCPtr pGC, int mode, - int nPoints, xPoint *pPoints); -extern void PsPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nSegments, - xSegment *pSegments); - -/* - * Functions in PsPolygon.c - */ - -extern void PsPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nRects, - xRectangle *pRects); -extern void PsFillPolygon(DrawablePtr pDrawable, GCPtr pGC, int shape, - int mode, int nPoints, DDXPointPtr pPoints); -extern void PsPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nRects, - xRectangle *pRects); - -/* - * Functions in PsPolygon.c - */ - -extern void PsPolyArc(DrawablePtr pDrawable, GCPtr pGC, int nArcs, - xArc *pArcs); -extern void PsPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int nArcs, - xArc *pArcs); - -/* - * Functions in PsText.c - */ - -extern int PsPolyText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y, - int count, char *string); -extern int PsPolyText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y, - int count, unsigned short *string); -extern void PsImageText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y, - int count, char *string); -extern void PsImageText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y, - int count, unsigned short *string); -extern void PsImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, - unsigned int nGlyphs, CharInfoPtr *pCharInfo, - pointer pGlyphBase); -extern void PsPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, - unsigned int nGlyphs, CharInfoPtr *pCharInfo, - pointer pGlyphBase); - -/* - * Functions in PsWindow.c - */ - -extern Bool PsCreateWindow(WindowPtr pWin); -extern Bool PsMapWindow(WindowPtr pWin); -extern Bool PsPositionWindow(WindowPtr pWin, int x, int y); -extern Bool PsUnmapWindow(WindowPtr pWin); -extern void PsCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, - RegionPtr prgnSrc); -extern Bool PsChangeWindowAttributes(WindowPtr pWin, unsigned long mask); -extern Bool PsDestroyWindow(WindowPtr pWin); - -/* - * Functions in PsFonts.c - */ - -extern Bool PsRealizeFont(ScreenPtr pscr, FontPtr pFont); -extern Bool PsUnrealizeFont(ScreenPtr pscr, FontPtr pFont); -extern char *PsGetFontName(FontPtr pFont); -extern int PsGetFontSize(FontPtr pFont, float *mtx); -extern char *PsGetPSFontName(FontPtr pFont); -extern char *PsGetPSFaceOrFontName(FontPtr pFont); -extern int PsIsISOLatin1Encoding(FontPtr pFont); -extern char *PsGetEncodingName(FontPtr pFont); -extern PsFontInfoRec *PsGetFontInfoRec(DrawablePtr pDrawable, FontPtr pFont); -extern void PsFreeFontInfoRecords(PsContextPrivPtr priv); -extern PsFTDownloadFontType PsGetFTDownloadFontType(void); - -/* - * Functions in PsFTFonts.c - */ - -extern char *PsGetFTFontFileName(FontPtr pFont); -extern Bool PsIsFreeTypeFont(FontPtr pFont); - -/* - * Functions in PsAttr.c - */ - -extern char *PsGetAttributes(XpContextPtr pCon, XPAttributes pool); -extern char *PsGetOneAttribute(XpContextPtr pCon, XPAttributes pool, - char *attr); -extern int PsAugmentAttributes(XpContextPtr pCon, XPAttributes pool, - char *attrs); -extern int PsSetAttributes(XpContextPtr pCon, XPAttributes pool, char *attrs); - -/* - * Functions in PsColor.c - */ - -extern Bool PsCreateColormap(ColormapPtr pColor); -extern void PsDestroyColormap(ColormapPtr pColor); -extern void PsInstallColormap(ColormapPtr pColor); -extern void PsUninstallColormap(ColormapPtr pColor); -extern int PsListInstalledColormaps(ScreenPtr pScreen, XID *pCmapList); -extern void PsStoreColors(ColormapPtr pColor, int ndef, xColorItem *pdefs); -extern void PsResolveColor(unsigned short *pRed, unsigned short *pGreen, - unsigned short *pBlue, VisualPtr pVisual); -extern PsOutColor PsGetPixelColor(ColormapPtr cMap, int pixval); -extern void PsSetFillColor(DrawablePtr pDrawable, GCPtr pGC, PsOutPtr psOut, - ColormapPtr cMap); - -/* - * Functions in PsPixmap.c - */ - -extern PixmapPtr PsCreatePixmap(ScreenPtr pScreen, int width, int height, - int depth, unsigned usage_hint); -extern void PsScrubPixmap(PixmapPtr pPixmap); -extern Bool PsDestroyPixmap(PixmapPtr pPixmap); -extern DisplayListPtr PsGetFreeDisplayBlock(PsPixmapPrivPtr priv); -extern void PsReplay(DisplayElmPtr elm, DrawablePtr pDrawable); -extern void PsReplayPixmap(PixmapPtr pix, DrawablePtr pDrawable); -extern int PsCloneDisplayElm(PixmapPtr dst, - DisplayElmPtr elm, DisplayElmPtr newElm, - int xoff, int yoff); -extern void PsCopyDisplayList(PixmapPtr src, PixmapPtr dst, int xoff, - int yoff, int x, int y, int w, int h); -extern PsElmPtr PsCreateFillElementList(PixmapPtr pix, int *nElms); -extern PsElmPtr PsCloneFillElementList(int nElms, PsElmPtr elms); -extern void PsDestroyFillElementList(int nElms, PsElmPtr elms); - -/* - * Functions in PsImageUtil.c - */ - -extern unsigned long -PsGetImagePixel(char *pImage, int depth, int w, int h, int leftPad, int format, - int px, int py); - -#endif /* _PS_H_ */ diff --git a/hw/xprint/ps/PsArc.c b/hw/xprint/ps/PsArc.c deleted file mode 100644 index 0684307dd..000000000 --- a/hw/xprint/ps/PsArc.c +++ /dev/null @@ -1,181 +0,0 @@ -/* - -Copyright 1996, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* - * (c) Copyright 1996 Hewlett-Packard Company - * (c) Copyright 1996 International Business Machines Corp. - * (c) Copyright 1996 Sun Microsystems, Inc. - * (c) Copyright 1996 Novell, Inc. - * (c) Copyright 1996 Digital Equipment Corp. - * (c) Copyright 1996 Fujitsu Limited - * (c) Copyright 1996 Hitachi, Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the names of the copyright holders - * shall not be used in advertising or otherwise to promote the sale, use - * or other dealings in this Software without prior written authorization - * from said copyright holders. - */ - -/******************************************************************* -** -** ********************************************************* -** * -** * File: PsArc.c -** * -** * Contents: Arc-drawing code for the PS DDX driver -** * -** * Created By: Roger Helmendach (Liberty Systems) -** * -** * Copyright: Copyright 1996 The Open Group, Inc. -** * -** ********************************************************* -** -********************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include - -#include "Ps.h" -#include "gcstruct.h" -#include "windowstr.h" - -void -PsPolyArc( - DrawablePtr pDrawable, - GCPtr pGC, - int nArcs, - xArc *pArcs) -{ - if( pDrawable->type==DRAWABLE_PIXMAP ) - { - DisplayElmPtr elm; - PixmapPtr pix = (PixmapPtr)pDrawable; - PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr; - DisplayListPtr disp; - GCPtr gc; - - if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return; - - disp = PsGetFreeDisplayBlock(priv); - - elm = &disp->elms[disp->nelms]; - elm->type = PolyArcCmd; - elm->gc = gc; - elm->c.arcs.nArcs = nArcs; - elm->c.arcs.pArcs = (xArc *)xalloc(nArcs*sizeof(xArc)); - memcpy(elm->c.arcs.pArcs, pArcs, nArcs*sizeof(xArc)); - disp->nelms += 1; - } - else - { - int i; - PsOutPtr psOut; - ColormapPtr cMap; - - if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return; - PsOut_Offset(psOut, pDrawable->x, pDrawable->y); - PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel)); - PsLineAttrs(psOut, pGC, cMap); - for( i=0 ; itype==DRAWABLE_PIXMAP ) - { - DisplayElmPtr elm; - PixmapPtr pix = (PixmapPtr)pDrawable; - PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr; - DisplayListPtr disp; - GCPtr gc; - - if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return; - - disp = PsGetFreeDisplayBlock(priv); - - elm = &disp->elms[disp->nelms]; - elm->type = PolyFillArcCmd; - elm->gc = gc; - elm->c.arcs.nArcs = nArcs; - elm->c.arcs.pArcs = (xArc *)xalloc(nArcs*sizeof(xArc)); - memcpy(elm->c.arcs.pArcs, pArcs, nArcs*sizeof(xArc)); - disp->nelms += 1; - } - else - { - int i; - PsOutPtr psOut; - PsArcEnum styl; - ColormapPtr cMap; - - if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return; - PsOut_Offset(psOut, pDrawable->x, pDrawable->y); - PsSetFillColor(pDrawable, pGC, psOut, cMap); - PsLineAttrs(psOut, pGC, cMap); - if( pGC->arcMode==ArcChord ) styl = PsChord; - else styl = PsPieSlice; - for( i=0 ; i -#endif - -#include "Ps.h" -#include "gcstruct.h" -#include "windowstr.h" - - -void -PsPutScaledImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, - int w, int h, int leftPad, int format, int imageRes, char *pImage) -{ - if( pDrawable->type==DRAWABLE_PIXMAP ) - { - int size = PixmapBytePad(w, depth)*h; - DisplayElmPtr elm; - PixmapPtr pix = (PixmapPtr)pDrawable; - PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr; - DisplayListPtr disp; - GCPtr gc; - - if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return; - - disp = PsGetFreeDisplayBlock(priv); - elm = &disp->elms[disp->nelms]; - elm->type = PutImageCmd; - elm->gc = gc; - elm->c.image.depth = depth; - elm->c.image.x = x; - elm->c.image.y = y; - elm->c.image.w = w; - elm->c.image.h = h; - elm->c.image.leftPad = leftPad; - elm->c.image.format = format; - elm->c.image.res = imageRes; - elm->c.image.pData = (char *)xalloc(size); - memcpy(elm->c.image.pData, pImage, size); - disp->nelms += 1; - } - else - { - int i, j; - int r, c; - PsOutPtr psOut; - ColormapPtr cMap; - int pageRes, sw, sh; - - if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return; - if (!imageRes) { - sw = w; - sh = h; - } else { - pageRes = XpGetResolution(XpGetPrintContext(requestingClient)); - sw = (float)w * (float)pageRes / (float)imageRes + 0.5; - sh = (float)h * (float)pageRes / (float)imageRes + 0.5; - } - PsOut_Offset(psOut, pDrawable->x, pDrawable->y); - - if( depth!=1 ) - { - PsOut_BeginImage(psOut, 0, 0, x, y, w, h, sw, sh, 3); - - for( r=0 ; rbgPixel), - PsGetPixelColor(cMap, pGC->fgPixel), - x, y, w, h, sw, sh, 1); - for( r=0 ; r>j)&1)<<(7-j)); } -#elif IMAGE_BYTE_ORDER == MSBFirst - iv_ = iv; -#else -#error Unsupported byte order -#endif - c = iv_; - PsOut_OutImageBytes(psOut, 1, &c); - } - } - PsOut_EndImage(psOut); - } - } -} - -void -PsPutScaledImageIM(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, - int w, int h, int leftPad, int format, int imageRes, char *pImage) -{ - if( pDrawable->type==DRAWABLE_PIXMAP ) - { - int size = PixmapBytePad(w, depth)*h; - DisplayElmPtr elm; - PixmapPtr pix = (PixmapPtr)pDrawable; - PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr; - DisplayListPtr disp; - GCPtr gc; - - if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return; - - disp = PsGetFreeDisplayBlock(priv); - elm = &disp->elms[disp->nelms]; - elm->type = PutImageCmd; - elm->gc = gc; - elm->c.image.depth = depth; - elm->c.image.x = x; - elm->c.image.y = y; - elm->c.image.w = w; - elm->c.image.h = h; - elm->c.image.leftPad = leftPad; - elm->c.image.format = format; - elm->c.image.res = imageRes; - elm->c.image.pData = (char *)xalloc(size); - memcpy(elm->c.image.pData, pImage, size); - disp->nelms += 1; - } - else - { - int i, j; - int r, c; - PsOutPtr psOut; - ColormapPtr cMap; - int pageRes, sw, sh; -#ifdef BM_CACHE - long cache_id = 0; -#endif - - if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return; - if (!imageRes) { - sw = w; - sh = h; - } else { - pageRes = XpGetResolution(XpGetPrintContext(requestingClient)); - sw = (float)w * (float)pageRes / (float)imageRes + 0.5; - sh = (float)h * (float)pageRes / (float)imageRes + 0.5; - } - PsOut_Offset(psOut, pDrawable->x, pDrawable->y); - -#ifdef BM_CACHE - cache_id = PsBmIsImageCached(w, h, pImage); - - if(!cache_id) - { - cache_id = PsBmPutImageInCache(w, h, pImage); - - if(!cache_id) - return; - - PsOut_BeginImageCache(psOut, cache_id); -#endif - if( depth!=1 ) - { - PsOut_BeginImageIM(psOut, 0, 0, x, y, w, h, sw, sh, 3); - - for( r=0 ; rbgPixel), - PsGetPixelColor(cMap, pGC->fgPixel), - x, y, w, h, sw, sh, 1); - for( r=0 ; r>j)&1)<<(7-j)); } -#elif IMAGE_BYTE_ORDER == MSBFirst - iv_ = iv; -#else -#error Unsupported byte order -#endif - c = iv_; - PsOut_OutImageBytes(psOut, 1, &c); - } - } - PsOut_EndImage(psOut); - } -#ifdef BM_CACHE - PsOut_EndImageCache(psOut); - } - PsOut_ImageCache(psOut, x, y, cache_id, PsGetPixelColor(cMap, pGC->bgPixel), - PsGetPixelColor(cMap, pGC->fgPixel)); -#endif - } -} -void -PsPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, - int w, int h, int leftPad, int format, char *pImage) -{ - XpContextPtr pcon; - if (requestingClient && (pcon = XpGetPrintContext(requestingClient))) - PsPutScaledImage(pDrawable, pGC, depth, x, y, w, h, leftPad, format, - pcon->imageRes, pImage); -} -void -PsPutImageMask(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, - int w, int h, int leftPad, int format, char *pImage) -{ - XpContextPtr pcon; - if (requestingClient && (pcon = XpGetPrintContext(requestingClient))) - PsPutScaledImageIM(pDrawable, pGC, depth, x, y, w, h, leftPad, format, - pcon->imageRes, pImage); -} - -RegionPtr -PsCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy, - int width, int height, int dstx, int dsty) -{ - PixmapPtr src = (PixmapPtr)pSrc; - PixmapPtr dst = (PixmapPtr)pDst; - - if( pSrc->type!=DRAWABLE_PIXMAP ) return NULL; - if( pDst->type!=DRAWABLE_PIXMAP ) - { - PsOutPtr psOut; - ColormapPtr cMap; - if( PsUpdateDrawableGC(pGC, pDst, &psOut, &cMap)==FALSE ) return NULL; - PsOut_Offset(psOut, pDst->x, pDst->y); - PsOut_BeginFrame(psOut, dstx-srcx, dsty-srcy, dstx, dsty, width, height); - PsReplayPixmap(src, pDst); - PsOut_EndFrame(psOut); - } - else PsCopyDisplayList(src, dst, dstx-srcx, dsty-srcy, dstx, dsty, - width, height); - return NULL; -} - -RegionPtr -PsCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy, - int width, int height, int dstx, int dsty, unsigned long plane) -{ - PixmapPtr src = (PixmapPtr)pSrc; - PixmapPtr dst = (PixmapPtr)pDst; - - if( pSrc->type!=DRAWABLE_PIXMAP ) return NULL; - if( pDst->type!=DRAWABLE_PIXMAP ) - { - PsOutPtr psOut; - ColormapPtr cMap; - if( PsUpdateDrawableGC(pGC, pDst, &psOut, &cMap)==FALSE ) return NULL; - PsOut_Offset(psOut, pDst->x, pDst->y); - PsOut_BeginFrame(psOut, dstx-srcx, dsty-srcy, dstx, dsty, width, height); - PsReplayPixmap(src, pDst); - PsOut_EndFrame(psOut); - } - else PsCopyDisplayList(src, dst, dstx-srcx, dsty-srcy, dstx, dsty, - width, height); - return NULL; -} diff --git a/hw/xprint/ps/PsAttVal.c b/hw/xprint/ps/PsAttVal.c deleted file mode 100644 index de2e6c8e4..000000000 --- a/hw/xprint/ps/PsAttVal.c +++ /dev/null @@ -1,289 +0,0 @@ -/* - */ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "Ps.h" -#include "AttrValid.h" - -/* - * define valid values and defaults for Printer pool - */ -static XpOid ValidContentOrientationsOids[] = { - xpoid_val_content_orientation_portrait, - xpoid_val_content_orientation_landscape, - xpoid_val_content_orientation_reverse_portrait, - xpoid_val_content_orientation_reverse_landscape -}; -static XpOidList ValidContentOrientations = { - ValidContentOrientationsOids, XpNumber(ValidContentOrientationsOids) -}; - -static XpOid DefaultContentOrientationsOids[] = { - xpoid_val_content_orientation_portrait, - xpoid_val_content_orientation_landscape -}; -static XpOidList DefaultContentOrientations = { - DefaultContentOrientationsOids, XpNumber(DefaultContentOrientationsOids) -}; - -static XpOid ValidPlexesOids[] = { - xpoid_val_plex_simplex, xpoid_val_plex_duplex, xpoid_val_plex_tumble -}; -static XpOidList ValidPlexes = { - ValidPlexesOids, XpNumber(ValidPlexesOids) -}; - -static XpOid DefaultPlexesOids[] = { - xpoid_val_plex_simplex -}; -static XpOidList DefaultPlexes = { - DefaultPlexesOids, XpNumber(DefaultPlexesOids) -}; - -static unsigned long ValidPrinterResolutionsCards[] = { - 75, - 100, - 120, - 150, - 180, - 200, - 240, - 300, - 360, - 400, - 600, - 720, - 940, - 1200, - 1440, - 2400 -}; -static XpOidCardList ValidPrinterResolutions = { - ValidPrinterResolutionsCards, XpNumber(ValidPrinterResolutionsCards) -}; - -static unsigned long DefaultPrinterResolutionsCards[] = { - 75, - 100, - 120, - 150, - 180, - 200, - 240, - 300, - 360, - 400, - 600, - 720, - 940, - 1200 -}; -static XpOidCardList DefaultPrinterResolutions = { - DefaultPrinterResolutionsCards, XpNumber(DefaultPrinterResolutionsCards) -}; - -static XpOid ValidListfontsModesOids[] = { - xpoid_val_xp_list_internal_printer_fonts, xpoid_val_xp_list_glyph_fonts -}; -static XpOidList ValidListfontsModes = { - ValidListfontsModesOids, XpNumber(ValidListfontsModesOids) -}; - -static XpOid DefaultListfontsModesOids[] = { - xpoid_val_xp_list_glyph_fonts -}; -static XpOidList DefaultListfontsModes = { - DefaultListfontsModesOids, XpNumber(DefaultListfontsModesOids) -}; - -static XpOid ValidSetupProvisoOids[] = { - xpoid_val_xp_setup_mandatory, xpoid_val_xp_setup_optional -}; -static XpOidList ValidSetupProviso = { - - - ValidSetupProvisoOids, XpNumber(ValidSetupProvisoOids) -}; - -static XpOidDocFmt ValidDocFormatsSupportedFmts[] = { - { "Postscript", "2", NULL } -}; -static XpOidDocFmtList ValidDocFormatsSupported = { - ValidDocFormatsSupportedFmts, XpNumber(ValidDocFormatsSupportedFmts) -}; - -static XpOidDocFmt DefaultDocFormatsSupportedFmts[] = { - { "Postscript", "2", NULL } -}; -static XpOidDocFmtList DefaultDocFormatsSupported = { - DefaultDocFormatsSupportedFmts, XpNumber(DefaultDocFormatsSupportedFmts) -}; - -static XpOidDocFmt ValidEmbeddedFormatsSupportedFmts[] = { - { "Postscript", "2", NULL } -}; -static XpOidDocFmtList ValidEmbeddedFormatsSupported = { - ValidEmbeddedFormatsSupportedFmts, XpNumber(ValidEmbeddedFormatsSupportedFmts) -}; - -static XpOidDocFmt DefaultEmbeddedFormatsSupportedFmts[] = { - { "Postscript", "2", NULL } -}; -static XpOidDocFmtList DefaultEmbeddedFormatsSupported = { - DefaultEmbeddedFormatsSupportedFmts, XpNumber(DefaultEmbeddedFormatsSupportedFmts) -}; - -static XpOidDocFmt ValidRawFormatsSupportedFmts[] = { - { "Postscript", "2", NULL } - -}; -static XpOidDocFmtList ValidRawFormatsSupported = { - ValidRawFormatsSupportedFmts, XpNumber(ValidRawFormatsSupportedFmts) -}; - -static XpOidDocFmt DefaultRawFormatsSupportedFmts[] = { - { "Postscript", "2", NULL } -}; -static XpOidDocFmtList DefaultRawFormatsSupported = { - DefaultRawFormatsSupportedFmts, XpNumber(DefaultRawFormatsSupportedFmts) -}; - -static XpOid ValidInputTraysOids[] = { - xpoid_val_input_tray_manual, - xpoid_val_input_tray_main, - xpoid_val_input_tray_envelope, - xpoid_val_input_tray_large_capacity, - xpoid_val_input_tray_bottom -}; -static XpOidList ValidInputTrays = { - ValidInputTraysOids, XpNumber(ValidInputTraysOids) -}; - -static XpOid ValidMediumSizesOids[] = { - xpoid_val_medium_size_iso_a0, - xpoid_val_medium_size_iso_a1, - xpoid_val_medium_size_iso_a2, - xpoid_val_medium_size_iso_a3, - xpoid_val_medium_size_iso_a4, - xpoid_val_medium_size_iso_a5, - xpoid_val_medium_size_iso_a6, - xpoid_val_medium_size_iso_a7, - xpoid_val_medium_size_iso_a8, - xpoid_val_medium_size_iso_a9, - xpoid_val_medium_size_iso_a10, - xpoid_val_medium_size_iso_b0, - xpoid_val_medium_size_iso_b1, - xpoid_val_medium_size_iso_b2, - xpoid_val_medium_size_iso_b3, - xpoid_val_medium_size_iso_b4, - xpoid_val_medium_size_iso_b5, - xpoid_val_medium_size_iso_b6, - xpoid_val_medium_size_iso_b7, - xpoid_val_medium_size_iso_b8, - xpoid_val_medium_size_iso_b9, - xpoid_val_medium_size_iso_b10, - xpoid_val_medium_size_na_letter, - xpoid_val_medium_size_na_legal, - xpoid_val_medium_size_executive, - xpoid_val_medium_size_folio, - xpoid_val_medium_size_invoice, - xpoid_val_medium_size_ledger, - xpoid_val_medium_size_quarto, - xpoid_val_medium_size_iso_c3, - xpoid_val_medium_size_iso_c4, - xpoid_val_medium_size_iso_c5, - xpoid_val_medium_size_iso_c6, - xpoid_val_medium_size_iso_designated_long, - xpoid_val_medium_size_na_10x13_envelope, - xpoid_val_medium_size_na_9x12_envelope, - xpoid_val_medium_size_na_number_10_envelope, - xpoid_val_medium_size_na_7x9_envelope, - xpoid_val_medium_size_na_9x11_envelope, - xpoid_val_medium_size_na_10x14_envelope, - xpoid_val_medium_size_na_number_9_envelope, - xpoid_val_medium_size_na_6x9_envelope, - xpoid_val_medium_size_na_10x15_envelope, - xpoid_val_medium_size_monarch_envelope, - xpoid_val_medium_size_a, - xpoid_val_medium_size_b, - xpoid_val_medium_size_c, - xpoid_val_medium_size_d, - xpoid_val_medium_size_e, - xpoid_val_medium_size_jis_b0, - xpoid_val_medium_size_jis_b1, - xpoid_val_medium_size_jis_b2, - xpoid_val_medium_size_jis_b3, - xpoid_val_medium_size_jis_b4, - xpoid_val_medium_size_jis_b5, - xpoid_val_medium_size_jis_b6, - xpoid_val_medium_size_jis_b7, - xpoid_val_medium_size_jis_b8, - xpoid_val_medium_size_jis_b9, - xpoid_val_medium_size_jis_b10, - xpoid_val_medium_size_hp_2x_postcard, - xpoid_val_medium_size_hp_european_edp, - xpoid_val_medium_size_hp_mini, - xpoid_val_medium_size_hp_postcard, - xpoid_val_medium_size_hp_tabloid, - xpoid_val_medium_size_hp_us_edp, - xpoid_val_medium_size_hp_us_government_legal, - xpoid_val_medium_size_hp_us_government_letter, -}; -static XpOidList ValidMediumSizes = { - ValidMediumSizesOids, XpNumber(ValidMediumSizesOids) -}; - -static XpOidDocFmt DefaultDocumentFormat = { - "Postscript", "2", NULL -}; - - -/* - * init struct for XpValidate*Pool - */ -XpValidatePoolsRec PsValidatePoolsRec = { - &ValidContentOrientations, &DefaultContentOrientations, - &ValidDocFormatsSupported, &DefaultDocFormatsSupported, - &ValidInputTrays, &ValidMediumSizes, - &ValidPlexes, &DefaultPlexes, - &ValidPrinterResolutions, &DefaultPrinterResolutions, - &ValidEmbeddedFormatsSupported, &DefaultEmbeddedFormatsSupported, - &ValidListfontsModes, &DefaultListfontsModes, - &ValidRawFormatsSupported, &DefaultRawFormatsSupported, - &ValidSetupProviso, - &DefaultDocumentFormat -}; diff --git a/hw/xprint/ps/PsAttr.c b/hw/xprint/ps/PsAttr.c deleted file mode 100644 index 0925716f5..000000000 --- a/hw/xprint/ps/PsAttr.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - -Copyright 1996, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* - * (c) Copyright 1996 Hewlett-Packard Company - * (c) Copyright 1996 International Business Machines Corp. - * (c) Copyright 1996 Sun Microsystems, Inc. - * (c) Copyright 1996 Novell, Inc. - * (c) Copyright 1996 Digital Equipment Corp. - * (c) Copyright 1996 Fujitsu Limited - * (c) Copyright 1996 Hitachi, Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the names of the copyright holders - * shall not be used in advertising or otherwise to promote the sale, use - * or other dealings in this Software without prior written authorization - * from said copyright holders. - */ - -/******************************************************************* -** -** ********************************************************* -** * -** * File: PsAttr.c -** * -** * Contents: Attribute-handling functions for the PS driver -** * -** * Created By: Roger Helmendach (Liberty Systems) -** * -** * Copyright: Copyright 1996 The Open Group, Inc. -** * -** ********************************************************* -** -********************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "Ps.h" -#include "attributes.h" - -char * -PsGetAttributes( - XpContextPtr pCon, - XPAttributes pool) -{ - return XpGetAttributes(pCon, pool); -} - -char * -PsGetOneAttribute( - XpContextPtr pCon, - XPAttributes pool, - char *attr) -{ - return XpGetOneAttribute(pCon, pool, attr); -} - -int -PsAugmentAttributes( - XpContextPtr pCon, - XPAttributes pool, - char *attrs) -{ - return XpAugmentAttributes(pCon, pool, attrs); -} - -int -PsSetAttributes( - XpContextPtr pCon, - XPAttributes pool, - char *attrs) -{ - return XpSetAttributes(pCon, pool, attrs); -} diff --git a/hw/xprint/ps/PsCache.c b/hw/xprint/ps/PsCache.c deleted file mode 100644 index 5c823a13e..000000000 --- a/hw/xprint/ps/PsCache.c +++ /dev/null @@ -1,328 +0,0 @@ -/* - -Copyright 1996, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* - * (c) Copyright 1996 Hewlett-Packard Company - * (c) Copyright 1996 International Business Machines Corp. - * (c) Copyright 1996, 2000 Sun Microsystems, Inc. All Rights Reserved. - * (c) Copyright 1996 Novell, Inc. - * (c) Copyright 1996 Digital Equipment Corp. - * (c) Copyright 1996 Fujitsu Limited - * (c) Copyright 1996 Hitachi, Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the names of the copyright holders - * shall not be used in advertising or otherwise to promote the sale, use - * or other dealings in this Software without prior written authorization - * from said copyright holders. - */ - -/******************************************************************* -** -** ********************************************************* -** * -** * File: PsCache.c -** * -** * Contents: Character-caching routines -** * -** * Created By: Jay Hobson (Sun MicroSystems) -** * -** * Copyright: Copyright 1996 The Open Group, Inc. -** * -** ********************************************************* -** -********************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "Ps.h" -#include "gcstruct.h" -#include "windowstr.h" -#include -#include - -#define GET 0 -#define RESET 1 - -struct bm_cache_list { - struct bm_cache_list *next; - struct bm_cache_list *prev; - int height; - long id; - char *pBuffer; -}; - -struct bm_cache_head { - struct bm_cache_list *head; - int width; - struct bm_cache_head *next; - struct bm_cache_head *prev; -}; - -static struct bm_cache_head *bm_cache = NULL; - -static long -PsBmUniqueId(int func) -{ - static long unique_id = 0; - - if(func == RESET) - { - unique_id = 0; - return 0; - } - else - return ++unique_id; -} - -int -PsBmIsImageCached( - int gWidth, - int gHeight, - char *pBuffer) -{ - int return_val = 0; - struct bm_cache_head *pList = bm_cache; - - while(pList != NULL && !return_val) - { - if(pList->width == gWidth) - { - struct bm_cache_list *pItem = pList->head; - - while(pItem != NULL) - { - if(pItem->height == gHeight) - { - int length = 4*(gWidth/32+(gWidth%32!=0))*gHeight; - - if(!memcmp(pItem->pBuffer, pBuffer, sizeof(char)*length)) - { - return_val = pItem->id; - break; - } - } - else if(pItem->height > gHeight) - break; - - pItem = pItem->next; - } - } - else if(pList->width > gWidth) - break; - - pList = pList->next; - } - return return_val; -} - -int -PsBmPutImageInCache( - int gWidth, - int gHeight, - char *pBuffer) -{ - int return_val = 0; - struct bm_cache_head *pList = bm_cache; - struct bm_cache_list *pNew; - int length = 4*(gWidth/32+(gWidth%32!=0))*gHeight; - - if(gWidth == 1 && gHeight == 1 && pBuffer[0] == 0) - return return_val; - - pNew = (struct bm_cache_list *)malloc(sizeof(struct bm_cache_list)); - pNew->next = NULL; - pNew->prev = NULL; - pNew->height = gHeight; - pNew->id = PsBmUniqueId(GET); - pNew->pBuffer = (char *)malloc(sizeof(char)*length); - - memcpy(pNew->pBuffer, pBuffer, length); - - while(pList != NULL) - { - if(pList->width == gWidth) - { - struct bm_cache_list *pItem = pList->head; - - while(pItem != NULL) - { - if(pItem->height >= gHeight) - { - pNew->next = pItem; - pNew->prev = pItem->prev; - if(pItem->prev != NULL) - pItem->prev->next = pNew; - else - pList->head = pNew; - pItem->prev = pNew; - - return_val = pNew->id; - - break; - } - else if(pItem->next == NULL) - { - pNew->prev = pItem; - pItem->next = pNew; - - return_val = pNew->id; - - break; - } - - pItem = pItem->next; - } - - break; - } - - pList = pList->next; - } - - if(pList == NULL) - { - struct bm_cache_head *pNewList; - - pNewList = (struct bm_cache_head *)malloc(sizeof(struct bm_cache_head)); - - pNewList->next = NULL; - pNewList->prev = NULL; - pNewList->width = gWidth; - pNewList->head = pNew; - - if(bm_cache == NULL) - { - bm_cache = pNewList; - return_val = pNew->id; - } - else - { - pList = bm_cache; - - while(pList != NULL) - { - if(pList->width > gWidth) - { - pNewList->next = pList; - pNewList->prev = pList->prev; - - if(pList->prev != NULL) - pList->prev->next = pNewList; - else - bm_cache = pNewList; - pList->prev = pNewList; - - return_val = pNew->id; - - break; - } - else if(pList->next == NULL) - { - pNewList->prev = pList; - pList->next = pNewList; - - return_val = pNew->id; - - break; - } - - pList = pList->next; - } - } - } - - return return_val; -} - - -static void -PsBmClearImageCacheItem( - struct bm_cache_list *pItem) -{ - if(pItem != NULL) - { - if(pItem->pBuffer != NULL) - free(pItem->pBuffer); - pItem->pBuffer = NULL; - - if(pItem->next) - PsBmClearImageCacheItem(pItem->next); - pItem->next = NULL; - - free(pItem); - pItem = NULL; - } -} - -static void -PsBmClearImageCacheList( - struct bm_cache_head *pList) -{ - if(pList != NULL) - { - if(pList->head) - PsBmClearImageCacheItem(pList->head); - pList->head = NULL; - - if(pList->next) - PsBmClearImageCacheList(pList->next); - pList->next = NULL; - - free(pList); - pList = NULL; - } -} - -void -PsBmClearImageCache(void) -{ - PsBmClearImageCacheList(bm_cache); - - bm_cache = NULL; - - PsBmUniqueId(RESET); -} - diff --git a/hw/xprint/ps/PsColor.c b/hw/xprint/ps/PsColor.c deleted file mode 100644 index a91272db0..000000000 --- a/hw/xprint/ps/PsColor.c +++ /dev/null @@ -1,257 +0,0 @@ -/* - -Copyright 1996, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* - * (c) Copyright 1996 Hewlett-Packard Company - * (c) Copyright 1996 International Business Machines Corp. - * (c) Copyright 1996 Sun Microsystems, Inc. - * (c) Copyright 1996 Novell, Inc. - * (c) Copyright 1996 Digital Equipment Corp. - * (c) Copyright 1996 Fujitsu Limited - * (c) Copyright 1996 Hitachi, Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the names of the copyright holders - * shall not be used in advertising or otherwise to promote the sale, use - * or other dealings in this Software without prior written authorization - * from said copyright holders. - */ - -/******************************************************************* -** -** ********************************************************* -** * -** * File: PsColor.c -** * -** * Contents: Color routines for the PS driver -** * -** * Created By: Roger Helmendach (Liberty Systems) -** * -** * Copyright: Copyright 1996 The Open Group, Inc. -** * -** ********************************************************* -** -********************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "Ps.h" -#include "mi.h" -#include "micmap.h" -#include "gcstruct.h" -#include "windowstr.h" -#include "colormapst.h" - -Bool -PsCreateColormap(ColormapPtr pColor) -{ - return miInitializeColormap(pColor); -} - -void -PsDestroyColormap(ColormapPtr pColor) -{ - /* NO-OP */ -} - -void -PsInstallColormap(ColormapPtr pColor) -{ - miInstallColormap(pColor); -} - -void -PsUninstallColormap(ColormapPtr pColor) -{ - miUninstallColormap(pColor); -} - -int -PsListInstalledColormaps( - ScreenPtr pScreen, - XID *pCmapList) -{ - return miListInstalledColormaps(pScreen, pCmapList); -} - -void -PsStoreColors( - ColormapPtr pColor, - int ndef, - xColorItem *pdefs) -{ - int i; - for( i=0 ; ired[pdefs[i].pixel].co.local.red = pdefs[i].red; - if( pdefs[i].flags&DoGreen ) - pColor->red[pdefs[i].pixel].co.local.green = pdefs[i].green; - if( pdefs[i].flags&DoBlue ) - pColor->red[pdefs[i].pixel].co.local.blue = pdefs[i].blue; - } -} - -void -PsResolveColor( - unsigned short *pRed, - unsigned short *pGreen, - unsigned short *pBlue, - VisualPtr pVisual) -{ - miResolveColor(pRed, pGreen, pBlue, pVisual); -} - -PsOutColor -PsGetPixelColor(ColormapPtr cMap, int pixval) -{ - VisualPtr v = cMap->pVisual; - switch( v->class ) - { - case TrueColor: - { - PsOutColor p = pixval; - PsOutColor r, g, b; - - r = (p & v->redMask) >> v->offsetRed; - g = (p & v->greenMask) >> v->offsetGreen; - b = (p & v->blueMask) >> v->offsetBlue; - - r = cMap->red[r].co.local.red; - g = cMap->green[g].co.local.green; - b = cMap->blue[b].co.local.blue; - -#ifdef PSOUT_USE_DEEPCOLOR - return((r<<32)|(g<<16)|b); -#else - r >>= 8; - g >>= 8; - b >>= 8; - - return((r<<16)|(g<<8)|b); -#endif /* PSOUT_USE_DEEPCOLOR */ - } - case PseudoColor: - case GrayScale: - case StaticGray: - { - PsOutColor r, g, b; - - if( pixval < 0 || pixval > v->ColormapEntries) - return(0); - - r = cMap->red[pixval].co.local.red; - g = cMap->red[pixval].co.local.green; - b = cMap->red[pixval].co.local.blue; - - if ((v->class | DynamicClass) == GrayScale) - { - /* rescale to gray (see |miResolveColor()|) */ - r = g = b = (30L*r + 59L*g + 11L*b) / 100L; - } - -#ifdef PSOUT_USE_DEEPCOLOR - return((r<<32)|(g<<16)|b); -#else - r >>= 8; - g >>= 8; - b >>= 8; - - return((r<<16)|(g<<8)|b); -#endif /* PSOUT_USE_DEEPCOLOR */ - } - default: - FatalError("PsGetPixelColor: Unsupported visual %x\n", - (int)cMap->pVisual->class); - break; - } - - return 0; /* NO-OP*/ -} - -void -PsSetFillColor(DrawablePtr pDrawable, GCPtr pGC, PsOutPtr psOut, - ColormapPtr cMap) -{ - switch(pGC->fillStyle) - { - case FillSolid: - PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel)); - break; - case FillTiled: - if( !PsOut_BeginPattern(psOut, pGC->tile.pixmap, - pGC->tile.pixmap->drawable.width, - pGC->tile.pixmap->drawable.height, PsTile, 0, 0) ) - { - PsReplayPixmap(pGC->tile.pixmap, pDrawable); - PsOut_EndPattern(psOut); - } - PsOut_SetPattern(psOut, pGC->tile.pixmap, PsTile); - break; - case FillStippled: - if( !PsOut_BeginPattern(psOut, pGC->stipple, - pGC->stipple->drawable.width, - pGC->stipple->drawable.height, PsStip, 0, - PsGetPixelColor(cMap, pGC->fgPixel)) ) - { - PsReplayPixmap(pGC->stipple, pDrawable); - PsOut_EndPattern(psOut); - } - PsOut_SetPattern(psOut, pGC->stipple, PsStip); - break; - case FillOpaqueStippled: - if( !PsOut_BeginPattern(psOut, pGC->stipple, - pGC->stipple->drawable.width, - pGC->stipple->drawable.height, PsOpStip, - PsGetPixelColor(cMap, pGC->bgPixel), - PsGetPixelColor(cMap, pGC->fgPixel)) ) - { - PsReplayPixmap(pGC->stipple, pDrawable); - PsOut_EndPattern(psOut); - } - PsOut_SetPattern(psOut, pGC->stipple, PsOpStip); - break; - } -} diff --git a/hw/xprint/ps/PsDef.h b/hw/xprint/ps/PsDef.h deleted file mode 100644 index 5af274dec..000000000 --- a/hw/xprint/ps/PsDef.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - -Copyright 1996, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* - * (c) Copyright 1996 Hewlett-Packard Company - * (c) Copyright 1996 International Business Machines Corp. - * (c) Copyright 1996 Sun Microsystems, Inc. - * (c) Copyright 1996 Novell, Inc. - * (c) Copyright 1996 Digital Equipment Corp. - * (c) Copyright 1996 Fujitsu Limited - * (c) Copyright 1996 Hitachi, Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the names of the copyright holders - * shall not be used in advertising or otherwise to promote the sale, use - * or other dealings in this Software without prior written authorization - * from said copyright holders. - */ - -/******************************************************************* -** -** ********************************************************* -** * -** * File: PsDef.h -** * -** * Contents: extran defines and includes for the Ps driver -** * for a printing X server. -** * -** * Created By: Roger Helmendach (Liberty Systems) -** * -** * Copyright: Copyright 1996 The Open Group, Inc. -** * -** ********************************************************* -** -********************************************************************/ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _PSDEF_H_ -#define _PSDEF_H_ - -#define DT_PRINT_JOB_HEADER "DT_PRINT_JOB_HEADER" -#define DT_PRINT_JOB_TRAILER "DT_PRINT_JOB_TRAILER" -#define DT_PRINT_JOB_COMMAND "DT_PRINT_JOB_COMMAND" -#define DT_PRINT_JOB_EXEC_COMMAND "DT_PRINT_JOB_EXEC_COMMAND" -#define DT_PRINT_JOB_EXEC_OPTIONS "DT_PRINT_JOB_EXEC_OPTION" -#define DT_PRINT_PAGE_HEADER "DT_PRINT_PAGE_HEADER" -#define DT_PRINT_PAGE_TRAILER "DT_PRINT_PAGE_TRAILER" -#define DT_PRINT_PAGE_COMMAND "DT_PRINT_PAGE_COMMAND" - -#define DT_IN_FILE_STRING "%(InFile)%" -#define DT_OUT_FILE_STRING "%(OutFile)%" -#define DT_ALLOWED_COMMANDS_FILE "printCommands" - -#endif /* _PSDEF_H_ */ diff --git a/hw/xprint/ps/PsFTFonts.c b/hw/xprint/ps/PsFTFonts.c deleted file mode 100644 index 8857ae43e..000000000 --- a/hw/xprint/ps/PsFTFonts.c +++ /dev/null @@ -1,85 +0,0 @@ - -/* -Copyright (c) 2003-2004 Roland Mainz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include - -#include "regionstr.h" -#include -#include "dixfontstr.h" -#include "scrnintstr.h" -#include -#include -#include - -#include "Ps.h" - -#include -#include FT_FREETYPE_H - -#include -#define NOT_IN_FTFUNCS -#include - -char * -PsGetFTFontFileName(FontPtr pFont) -{ - FTFontPtr tf = (FTFontPtr)pFont->fontPrivate; - return tf->instance->face->filename; -} - -Bool -PsIsFreeTypeFont(FontPtr pFont) -{ - int i; - int nprops = pFont->info.nprops; - FontPropPtr props = pFont->info.props; - /* "RASTERIZER_NAME" must match the rasterizer name set in - * xc/lib/font/FreeType/ftfuncs.c */ - Atom name = MakeAtom("RASTERIZER_NAME", 15, True); - Atom value = (Atom)0; - char *rv; - - for( i=0 ; i -#endif - -#include "regionstr.h" -#include -#include "dixfontstr.h" -#include "scrnintstr.h" -#include -#include -#include - -#include "Ps.h" - -#include -#include -#include - -Bool -PsRealizeFont( - ScreenPtr pscr, - FontPtr pFont) -{ - return TRUE; -} - -Bool -PsUnrealizeFont( - ScreenPtr pscr, - FontPtr pFont) -{ - return TRUE; -} - -char * -PsGetFontName(FontPtr pFont) -{ - int i; - int nprops = pFont->info.nprops; - FontPropPtr props = pFont->info.props; - Atom name = MakeAtom("FONT", 4, True); - Atom value = (Atom)0; - - for( i=0 ; iinfo.nprops; - FontPropPtr props = pFont->info.props; - /* "_ADOBE_POSTSCRIPT_FONTNAME" maps directly to a PMF OBJ_NAME attribute - * name - changing the name will break printer-builtin fonts. */ - Atom name = MakeAtom("_ADOBE_POSTSCRIPT_FONTNAME", 26, True); - Atom value = (Atom)0; - - for( i=0 ; iinfo.nprops; - FontPropPtr props = pFont->info.props; - Atom reg = MakeAtom("CHARSET_REGISTRY", 16, True); - Atom enc = MakeAtom("CHARSET_ENCODING", 16, True); - Atom rv = 0, ev = 0; - char *rp = 0; - char *ep = 0; - - for( i=0 ; iinfo.nprops; - FontPropPtr props = pFont->info.props; - Atom fnt = MakeAtom("FONT", 4, True); - Atom reg = MakeAtom("CHARSET_REGISTRY", 16, True); - Atom enc = MakeAtom("CHARSET_ENCODING", 16, True); - Atom fv = 0, rv = 0, ev = 0; - char *fp = 0; - char *rp = 0; - char *ep = 0; - char *encname; - - for( i=0 ; ifpe->name == "tcp/:7100")) - */ -static -Bool IsFPEaReadableDir(FontPtr pFont) -{ - const char *fpe_name = pFont->fpe->name; - if (!fpe_name) - return False; - -#define MODEL_FONTPATH_PREFIX "PRINTER:" -#define MODEL_FONTPATH_PREFIX_LEN 8 - /* Strip model-specific font path prefix if there is one... */ - if (!strncmp(fpe_name, MODEL_FONTPATH_PREFIX, MODEL_FONTPATH_PREFIX_LEN)) - fpe_name += MODEL_FONTPATH_PREFIX_LEN; - - if (access(fpe_name, F_OK) == 0) - { - return True; - } - - return False; -} - -static -char *getFontFilename(FontPtr pFont) -{ - FontDirectoryPtr dir; - const char *dlfnam; - FILE *file; - struct stat statb; - char buf[512]; - char *front, *fn; - char font_dir_fname[PATH_MAX], /* Full path of fonts.dir */ - font_file_fname[PATH_MAX]; /* Name of font file (excluding path) */ - -#ifdef XP_USE_FREETYPE - if( PsIsFreeTypeFont(pFont) ) - { - const char *fontname = PsGetFTFontFileName(pFont); - -#ifdef DEBUG_gisburn - fprintf(stderr, "getFontFilename: freetype font, file='%s'\n", fontname?fontname:""); -#endif /* DEBUG_gisburn */ - - if( !fontname ) - return NULL; - - return strdup(fontname); - } -#endif /* XP_USE_FREETYPE */ - - if (!IsFPEaReadableDir(pFont)) - { -#ifdef DEBUG_gisburn - fprintf(stderr, "getFontFilename: '%s' no valid font path on disk\n", pFont->fpe->name); -#endif /* DEBUG_gisburn */ - return NULL; - } - - dir = pFont->fpe->private; - sprintf(font_dir_fname, "%s%s", dir->directory, "fonts.dir"); - - if (!(dlfnam = PsGetFontName(pFont))) - return NULL; - - file = fopen(font_dir_fname, "r"); - if (file) - { - if (fstat (fileno(file), &statb) == -1) - return NULL; - - while( fgets(buf, sizeof(buf)-1, file) ) - { - if ((fn = strstr(buf, " -"))) - { - strcpy(font_file_fname, buf); - font_file_fname[fn - buf] = '\0'; - fn++; - if ((front = str_case_str(fn, "normal-"))) - { - fn[front - fn] = '\0'; - if (str_case_str(dlfnam, fn)) - { - char full_font_file_path[PATH_MAX]; - - fclose(file); - - sprintf(full_font_file_path, "%s%s", dir->directory, font_file_fname); - -#ifdef xDEBUG_gisburn - fprintf(stderr, "getFontFilename: returning '%s'\n", full_font_file_path); -#endif /* DEBUG_gisburn */ - return strdup(full_font_file_path); - } - } - } - } - } - font_file_fname[0] = '\0'; - fclose(file); - -#ifdef DEBUG_gisburn - fprintf(stderr, "getFontFilename: returning NULL\n"); -#endif /* DEBUG_gisburn */ - - return NULL; -} - -static -PsFontTypeInfoRec *PsFindFontTypeInfoRec(DrawablePtr pDrawable, FontPtr pFont) -{ - PsContextPrivRec *cPriv = PsGetPsContextPriv(pDrawable); - PsFontTypeInfoRec *rec; - const char *psname; - char *font_filename; - char *encname; -#ifdef XP_USE_FREETYPE - Bool is_freetypefont; -#endif /* XP_USE_FREETYPE */ - -#ifdef XP_USE_FREETYPE - is_freetypefont = PsIsFreeTypeFont(pFont); -#endif /* XP_USE_FREETYPE */ - encname = PsGetEncodingName(pFont); - - /* First try: Search by PostScript font name */ - psname = PsGetPSFontName(pFont); - if (psname) - { - for( rec = cPriv->fontTypeInfoRecords ; rec != NULL ; rec = rec->next ) - { -#ifdef XP_USE_FREETYPE - if (is_freetypefont) - { - if (rec->adobe_ps_name) - { - if ((rec->font_type == PSFTI_FONT_TYPE_FREETYPE) && - (!strcmp(rec->adobe_ps_name, psname)) && - (!strcmp(rec->ft_download_encoding, encname))) - { - return rec; - } - } - } - else -#endif /* XP_USE_FREETYPE */ - { - if (rec->adobe_ps_name) - { - if ((rec->font_type != PSFTI_FONT_TYPE_FREETYPE) && - (!strcmp(rec->adobe_ps_name, psname))) - { - return rec; - } - } - } - } - } - - /* Last attempt: Search by filename */ - font_filename = getFontFilename(pFont); - if (font_filename) - { - for( rec = cPriv->fontTypeInfoRecords ; rec != NULL ; rec = rec->next ) - { - if (rec->filename) - { -#ifdef XP_USE_FREETYPE - if (is_freetypefont) - { - if ( (rec->font_type == PSFTI_FONT_TYPE_FREETYPE) && - (!strcasecmp(rec->filename, font_filename)) && - (!strcasecmp(rec->ft_download_encoding, encname)) ) - { - free(font_filename); - return rec; - } - } - else -#endif /* XP_USE_FREETYPE */ - { - if ( (rec->font_type != PSFTI_FONT_TYPE_FREETYPE) && - (!strcasecmp(rec->filename, font_filename)) ) - { - free(font_filename); - return rec; - } - } - } - } - - free(font_filename); - } - - return NULL; -} - -static -void PsAddFontTypeInfoRec(DrawablePtr pDrawable, PsFontTypeInfoRec *add_rec) -{ - PsContextPrivRec *cPriv = PsGetPsContextPriv(pDrawable); - - /* ToDO: Always move the last used entry to the top that the list get's - * sorted in an efficient order... :-) */ - add_rec->next = cPriv->fontTypeInfoRecords; - cPriv->fontTypeInfoRecords = add_rec; -} - -static -Bool strcaseendswith(const char *str, const char *suffix) -{ - const char *s; - - s = str + strlen(str) - strlen(suffix); - - if (!strcasecmp(s, suffix)) - return True; - - return False; -} - - -static -int getFontFileType( const char *filename ) -{ - int type; - - /* Is this a Adobe PostScript Type 1 binary font (PFB) ? */ - if( strcaseendswith(filename, ".pfb") ) - { - type = PSFTI_FONT_TYPE_PS_TYPE1_PFB; - } - /* Is this a Adobe PostScript ASCII font (PFA) ? */ - else if( strcaseendswith(filename, ".pfa") ) - { - type = PSFTI_FONT_TYPE_PS_TYPE1_PFA; - } - /* Is this a PMF(=Printer Metrics File) ? */ - else if( strcaseendswith(filename, ".pmf") ) - { - type = PSFTI_FONT_TYPE_PMF; - } - /* Is this a TrueType font file ? */ - else if( strcaseendswith(filename, ".ttf") || - strcaseendswith(filename, ".ttc") || - strcaseendswith(filename, ".otf") || - strcaseendswith(filename, ".otc") ) - { - type = PSFTI_FONT_TYPE_TRUETYPE; - } - else - { - type = PSFTI_FONT_TYPE_OTHER; - } - -#ifdef XP_USE_FREETYPE - { - XpContextPtr pCon; - char *downloadfonts; - pCon = XpGetPrintContext(requestingClient); - downloadfonts = XpGetOneAttribute(pCon, XPPrinterAttr, "xp-psddx-download-fonts"); - if( downloadfonts ) - { - /* Should we download PS Type1 fonts as PS Type1||Type3 ? */ - if( (type == PSFTI_FONT_TYPE_PS_TYPE1_PFA) && - (strstr(downloadfonts, "pfa") != NULL) ) - { - type = PSFTI_FONT_TYPE_FREETYPE; - } - - if( (type == PSFTI_FONT_TYPE_PS_TYPE1_PFB) && - (strstr(downloadfonts, "pfb") != NULL) ) - { - type = PSFTI_FONT_TYPE_FREETYPE; - } - - /* Should we download TrueType fonts as PS Type1||Type3 ? */ - if( (type == PSFTI_FONT_TYPE_TRUETYPE) && - ((strstr(downloadfonts, "ttf") != NULL) || - (strstr(downloadfonts, "ttc") != NULL) || - (strstr(downloadfonts, "otf") != NULL) || - (strstr(downloadfonts, "otc") != NULL)) ) - { - type = PSFTI_FONT_TYPE_FREETYPE; - } - } - } -#endif /* XP_USE_FREETYPE */ - -#ifdef DEBUG_gisburn - fprintf(stderr, "getFontFileType: '%s' is %d\n", filename, (int)type); -#endif /* DEBUG_gisburn */ - return type; -} - -PsFTDownloadFontType PsGetFTDownloadFontType(void) -{ - PsFTDownloadFontType downloadfonttype; - XpContextPtr pCon; - char *psfonttype; - - pCon = XpGetPrintContext(requestingClient); - psfonttype = XpGetOneAttribute(pCon, XPPrinterAttr, "xp-psddx-download-font-type"); - - if( !psfonttype || !strlen(psfonttype) ) - { - return PsFontType1; /* Default download font type is PS Type1 */ - } - - if( !strcmp(psfonttype, "bitmap") ) - { - downloadfonttype = PsFontBitmap; - } - else if( !strcmp(psfonttype, "pstype3") ) - { - downloadfonttype = PsFontType3; - } - else if( !strcmp(psfonttype, "pstype1") ) - { - downloadfonttype = PsFontType1; - } - else - { - FatalError("PS DDX: XPPrinterAttr/xp-psddx-download-freetype-font-type='%s' not implemented\n", psfonttype); - return 0; /* NO-OP, FatalError() will call |exit()| */ - } - - return downloadfonttype; -} - -static -PsFontTypeInfoRec *PsCreateFontTypeInfoRec(DrawablePtr pDrawable, FontPtr pFont) -{ - char *dlfnam; - PsFontTypeInfoRec *rec; - - if (!(dlfnam = PsGetFontName(pFont))) - return NULL; - - if (!(rec = (PsFontTypeInfoRec *)xalloc(sizeof(PsFontTypeInfoRec)))) - return NULL; - memset(rec, 0, sizeof(PsFontTypeInfoRec)); - - rec->next = NULL; - - if ((rec->filename = getFontFilename(pFont))) - { - rec->font_type = getFontFileType(rec->filename); - } - else - { - rec->filename = NULL; - rec->font_type = PSFTI_FONT_TYPE_OTHER; - } - - rec->adobe_ps_name = PsGetPSFontName(pFont); -#ifdef XP_USE_FREETYPE - rec->ft_download_encoding = PsGetEncodingName(pFont); - rec->ft_download_font_type = PsGetFTDownloadFontType(); -#endif /* XP_USE_FREETYPE */ - rec->download_ps_name = NULL; - -#define SET_FONT_DOWNLOAD_STATUS(rec, downloaded) { int i; for (i = 0 ; i < 256 ; i++) { (rec)->alreadyDownloaded[i]=(downloaded); } } - - /* Set some flags based on the font type */ - switch( rec->font_type ) - { - case PSFTI_FONT_TYPE_PS_TYPE1_PFA: - case PSFTI_FONT_TYPE_PS_TYPE1_PFB: - rec->downloadableFont = True; - SET_FONT_DOWNLOAD_STATUS(rec, False); - rec->is_iso_encoding = PsIsISOLatin1Encoding(pFont); - break; - - case PSFTI_FONT_TYPE_PMF: - rec->downloadableFont = True; /* This font is in printer's ROM */ - SET_FONT_DOWNLOAD_STATUS(rec, True); - rec->is_iso_encoding = PsIsISOLatin1Encoding(pFont); - break; - - case PSFTI_FONT_TYPE_TRUETYPE: - /* Note: TrueType font download not implemented */ - rec->downloadableFont = False; - SET_FONT_DOWNLOAD_STATUS(rec, False); - rec->is_iso_encoding = PsIsISOLatin1Encoding(pFont); - break; - -#ifdef XP_USE_FREETYPE - case PSFTI_FONT_TYPE_FREETYPE: - if( rec->ft_download_font_type == PsFontType1 || - rec->ft_download_font_type == PsFontType3 ) - { - rec->downloadableFont = True; - } - else - { - rec->downloadableFont = False; - } - - SET_FONT_DOWNLOAD_STATUS(rec, False); - rec->is_iso_encoding = False; /* Freetype--->PS Type1/Type3 uses always non-iso PS encoding for now */ - break; -#endif /* XP_USE_FREETYPE */ - - case PSFTI_FONT_TYPE_OTHER: - default: - rec->downloadableFont = False; - SET_FONT_DOWNLOAD_STATUS(rec, False); - rec->is_iso_encoding = PsIsISOLatin1Encoding(pFont); - break; - } - -#ifdef XP_USE_FREETYPE - if( (rec->font_type == PSFTI_FONT_TYPE_FREETYPE) ) - { - char *s; - register int c; - - if( rec->adobe_ps_name ) - { - rec->download_ps_name = malloc(strlen(rec->adobe_ps_name) + strlen(rec->ft_download_encoding) + 2); - sprintf(rec->download_ps_name, "%s_%s", rec->adobe_ps_name, rec->ft_download_encoding); - } - else - { - /* Unfortunately not all TTF fonts have a PostScript font name (like - * Solaris TTF fonts in /usr/openwin/lib/locale/ko.UTF-8/X11/fonts/TrueType, - * /usr/openwin/lib/locale/ko/X11/fonts/TrueType) - in this case we - * have to generate a font name - */ - char ftfontname[64]; - static long myfontindex = 0L; - sprintf(ftfontname, "psfont_%lx", myfontindex++); - - rec->download_ps_name = malloc(strlen(ftfontname) + strlen(rec->ft_download_encoding) + 2); - sprintf(rec->download_ps_name, "%s_%s", ftfontname, rec->ft_download_encoding); - - fprintf(stderr, "PsCreateFontTypeInfoRec: Note: '%s' has no PS font name, using '%s' for now.\n", dlfnam, rec->download_ps_name); - } - - /* Make sure the font name we use for download is a valid PS font name */ - for( s = rec->download_ps_name ; *s != '\0'; s++ ) - { - c = *s; - - /* Check for allowed chars, invalid ones are replaced with a '_' - * (and check that the first char is not a digit) */ - if( !(isalnum(c) || c == '.' || c == '_' || c == '-') || (s==rec->download_ps_name && isdigit(c)) ) - { - *s = '_'; - } - } - } - else -#endif /* XP_USE_FREETYPE */ - { - if( rec->adobe_ps_name ) - { - rec->download_ps_name = strdup(rec->adobe_ps_name); - } - else - { - rec->download_ps_name = NULL; - } - } - - /* Safeguard - only treat font as downloadable when we have a PS font name!! */ - if (!rec->download_ps_name && rec->downloadableFont) - { - /* XXX: Log this message to the log when the logging service has been hook'ed up */ - fprintf(stderr, "PsCreateFontTypeInfoRec: Safeguard: No PS font name for '%s'!\n", dlfnam); - rec->downloadableFont = False; - } - -#ifdef DEBUG_gisburn - fprintf(stderr, "PsCreateFontTypeInfoRec: Created PsFontTypeInfoRec '%s' ('%s'/'%s')\n", - ((rec->filename) ?(rec->filename) :("")), - ((rec->adobe_ps_name) ?(rec->adobe_ps_name):("")), - ((rec->download_ps_name)?(rec->download_ps_name):(""))); -#endif /* DEBUG_gisburn */ - - return rec; -} - -static -PsFontTypeInfoRec *PsGetFontTypeInfoRec(DrawablePtr pDrawable, FontPtr pFont) -{ - PsFontTypeInfoRec *rec; - char *dlfnam; - - if(!(dlfnam = PsGetFontName(pFont))) - return NULL; - - rec = PsFindFontTypeInfoRec(pDrawable, pFont); - if (rec) - return rec; - - rec = PsCreateFontTypeInfoRec(pDrawable, pFont); - if (!rec) - return NULL; - - PsAddFontTypeInfoRec(pDrawable, rec); - - return rec; -} - -static -void PsFreeFontTypeInfoRecords( PsContextPrivPtr priv ) -{ - PsFontTypeInfoRec *curr, *next; - curr = priv->fontTypeInfoRecords; - while( curr != NULL ) - { - if (curr->filename) - free(curr->filename); /* Free memory allocated by |strdup()| */ - - if (curr->download_ps_name) - free(curr->download_ps_name); - - next = curr->next; - xfree(curr); - curr = next; - } -} - -static -PsFontInfoRec *PsFindFontInfoRec(DrawablePtr pDrawable, FontPtr pFont) -{ - PsContextPrivRec *cPriv = PsGetPsContextPriv(pDrawable); - PsFontInfoRec *rec; - - if (!pFont) - return NULL; - - for( rec = cPriv->fontInfoRecords ; rec != NULL ; rec = rec->next ) - { - if ((rec->font == pFont) && - (rec->font_fontPrivate == pFont->fontPrivate)) - return rec; - } - - return NULL; -} - -static -void PsAddFontInfoRec(DrawablePtr pDrawable, PsFontInfoRec *add_rec) -{ - PsContextPrivRec *cPriv = PsGetPsContextPriv(pDrawable); - - /* ToDO: Always move the last used entry to the top that the list get's - * sorted in an efficient order... :-) */ - add_rec->next = cPriv->fontInfoRecords; - cPriv->fontInfoRecords = add_rec; -} - -static -PsFontInfoRec *PsCreateFontInfoRec(DrawablePtr pDrawable, FontPtr pFont) -{ - PsFontInfoRec *rec; - PsFontTypeInfoRec *ftir; - - if (!(ftir = PsGetFontTypeInfoRec(pDrawable, pFont))) - return NULL; - - if (!(rec = (PsFontInfoRec *)xalloc(sizeof(PsFontInfoRec)))) - return NULL; - memset(rec, 0, sizeof(PsFontInfoRec)); - - rec->font = pFont; - rec->font_fontPrivate = pFont->fontPrivate; - rec->ftir = ftir; - rec->next = NULL; - rec->dfl_name = PsGetFontName(pFont); - rec->size = PsGetFontSize(pFont, rec->mtx); - -#ifdef DEBUG_gisburn - fprintf(stderr, "PsCreateFontInfoRec: Created PsFontInfoRec '%s'\n", - ((rec->dfl_name)?(rec->dfl_name):(""))); -#endif /* DEBUG_gisburn */ - - return rec; -} - -PsFontInfoRec *PsGetFontInfoRec(DrawablePtr pDrawable, FontPtr pFont) -{ - PsFontInfoRec *rec; - - rec = PsFindFontInfoRec(pDrawable, pFont); - if (rec) - return rec; - - rec = PsCreateFontInfoRec(pDrawable, pFont); - if (!rec) - return NULL; - - PsAddFontInfoRec(pDrawable, rec); - - return rec; -} - -void PsFreeFontInfoRecords( PsContextPrivPtr priv ) -{ - PsFontInfoRec *curr, *next; - curr = priv->fontInfoRecords; - while( curr != NULL ) - { - next = curr->next; - xfree(curr); - curr = next; - } - - PsFreeFontTypeInfoRecords(priv); - - priv->fontTypeInfoRecords = NULL; - priv->fontInfoRecords = NULL; -} diff --git a/hw/xprint/ps/PsGC.c b/hw/xprint/ps/PsGC.c deleted file mode 100644 index 19898c90e..000000000 --- a/hw/xprint/ps/PsGC.c +++ /dev/null @@ -1,418 +0,0 @@ -/* - -Copyright 1996, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* - * (c) Copyright 1996 Hewlett-Packard Company - * (c) Copyright 1996 International Business Machines Corp. - * (c) Copyright 1996 Sun Microsystems, Inc. - * (c) Copyright 1996 Novell, Inc. - * (c) Copyright 1996 Digital Equipment Corp. - * (c) Copyright 1996 Fujitsu Limited - * (c) Copyright 1996 Hitachi, Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the names of the copyright holders - * shall not be used in advertising or otherwise to promote the sale, use - * or other dealings in this Software without prior written authorization - * from said copyright holders. - */ - -/******************************************************************* -** -** ********************************************************* -** * -** * File: PsGC.c -** * -** * Contents: Graphics Context handling for the PS driver -** * -** * Created By: Roger Helmendach (Liberty Systems) -** * -** * Copyright: Copyright 1996 The Open Group, Inc. -** * -** ********************************************************* -** -********************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "Ps.h" -#include "gcstruct.h" -#include "pixmapstr.h" -#include "windowstr.h" -#include "migc.h" -#include "scrnintstr.h" - -static GCOps PsGCOps = -{ - PsFillSpans, - PsSetSpans, - PsPutImage, - PsCopyArea, - PsCopyPlane, - PsPolyPoint, - PsPolyLine, - PsPolySegment, - PsPolyRectangle, - PsPolyArc, - PsFillPolygon, - PsPolyFillRect, - PsPolyFillArc, - PsPolyText8, - PsPolyText16, - PsImageText8, - PsImageText16, - PsImageGlyphBlt, - PsPolyGlyphBlt, - PsPushPixels -}; - - -static GCFuncs PsGCFuncs = -{ - PsValidateGC, - PsChangeGC, - PsCopyGC, - PsDestroyGC, - PsChangeClip, - PsDestroyClip, - PsCopyClip -}; - -Bool -PsCreateGC(pGC) - GCPtr pGC; -{ - pGC->clientClip = NULL; - pGC->clientClipType = CT_NONE; - - pGC->ops = &PsGCOps; - pGC->funcs = &PsGCFuncs; - - pGC->clientClip = (pointer)xalloc(sizeof(PsClipRec)); - memset(pGC->clientClip, 0, sizeof(PsClipRec)); - return TRUE; -} - -static int -PsGetDrawablePrivateStuff( - DrawablePtr pDrawable, - GC *gc, - unsigned long *valid, - PsOutPtr *psOut, - ColormapPtr *cMap) -{ - XpContextPtr pCon; - PsContextPrivPtr cPriv; - PsScreenPrivPtr sPriv; - - switch(pDrawable->type) - { - case DRAWABLE_PIXMAP: - return FALSE; - case DRAWABLE_WINDOW: - pCon = PsGetContextFromWindow((WindowPtr)pDrawable); - if( pCon==NULL ) return FALSE; - else - { - Colormap c; - ColormapPtr cmap; - - c = wColormap((WindowPtr)pDrawable); - cmap = (ColormapPtr)LookupIDByType(c, RT_COLORMAP); - - cPriv = (PsContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); - sPriv = (PsScreenPrivPtr) - dixLookupPrivate(&pDrawable->pScreen->devPrivates, - PsScreenPrivateKey); - *gc = cPriv->lastGC; - *valid = cPriv->validGC; - *psOut = cPriv->pPsOut; - *cMap = cmap; - return TRUE; - } - default: - return FALSE; - } -} - -PsContextPrivPtr -PsGetPsContextPriv( DrawablePtr pDrawable ) -{ - XpContextPtr pCon; - - switch(pDrawable->type) - { - case DRAWABLE_PIXMAP: - return FALSE; - case DRAWABLE_WINDOW: - pCon = PsGetContextFromWindow((WindowPtr)pDrawable); - if (pCon != NULL) - { - return (PsContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); - } - } - return NULL; -} - -int -PsUpdateDrawableGC( - GCPtr pGC, - DrawablePtr pDrawable, - PsOutPtr *psOut, - ColormapPtr *cMap) -{ - GC dGC; - unsigned long valid; - int i; - PsContextPrivPtr cPriv; - BoxPtr boxes; - - if (!PsGetDrawablePrivateStuff(pDrawable, &dGC, &valid, psOut, cMap)) - return FALSE; - - switch (pDrawable->type) { - - case DRAWABLE_PIXMAP: - /* we don't support pixmaps yet! */ - return FALSE; - break; - case DRAWABLE_WINDOW: - if( pGC ) - { - RegionPtr pReg; - WindowPtr pWin = (WindowPtr)pDrawable; - Bool freeClip; - PsClipPtr clp = (PsClipPtr)pGC->clientClip; - if( clp->outterClips ) - { xfree(clp->outterClips); clp->outterClips = 0; } - clp->nOutterClips = 0; - if( pGC->subWindowMode==IncludeInferiors ) - { - pReg = NotClippedByChildren(pWin); - freeClip = TRUE; - } - else - { - pReg = &pWin->clipList; - freeClip = FALSE; - } - - if( pReg->data ) - { - boxes = (BoxPtr)((char *)pReg->data+sizeof(long)*2); - clp->nOutterClips = pReg->data->numRects; - clp->outterClips = - (PsRectPtr)xalloc(clp->nOutterClips*sizeof(PsRectRec)); - for( i=0 ; inOutterClips ; i++ ) - { - clp->outterClips[i].x = boxes[i].x1; - clp->outterClips[i].y = boxes[i].y1; - clp->outterClips[i].w = (boxes[i].x2-boxes[i].x1)+1; - clp->outterClips[i].h = (boxes[i].y2-boxes[i].y1)+1; - } - } - - if( freeClip ) REGION_DESTROY(pGC->pScreen, pReg); - PsOut_Offset(*psOut, pDrawable->x, pDrawable->y); - PsOut_Clip(*psOut, pGC->clientClipType, (PsClipPtr)pGC->clientClip); - } - cPriv = (PsContextPrivPtr)dixLookupPrivate( - &PsGetContextFromWindow((WindowPtr)pDrawable)->devPrivates, - PsContextPrivateKey); - break; - } - return TRUE; -} - -void -PsValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) -{ - pGC->ops = &PsGCOps; -} - -void -PsChangeGC(GCPtr pGC, unsigned long changes) -{ -} - -void -PsCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) -{ -} - -void -PsDestroyGC(GCPtr pGC) -{ - PsDestroyClip(pGC); - xfree(pGC->clientClip); -} - -void -PsChangeClip(GCPtr pGC, int type, pointer pValue, int nrects) -{ - int i; - PsClipPtr clp = (PsClipPtr)pGC->clientClip; - RegionPtr rgn; - BoxPtr boxes; - xRectangle *rects; - - PsDestroyClip(pGC); - pGC->clientClipType = type; - switch(type) - { - case CT_NONE: break; - case CT_PIXMAP: - clp->elms = PsCreateFillElementList((PixmapPtr)pValue, &clp->nElms); - (*pGC->pScreen->DestroyPixmap)((PixmapPtr)pValue); - break; - case CT_REGION: - rgn = (RegionPtr)pValue; - boxes = (BoxPtr)((char *)rgn->data+sizeof(long)*2); - clp->nRects = rgn->data->numRects; - clp->rects = (PsRectPtr)xalloc(clp->nRects*sizeof(PsRectRec)); - for( i=0 ; inRects ; i++ ) - { - clp->rects[i].x = boxes[i].x1; - clp->rects[i].y = boxes[i].y1; - clp->rects[i].w = (boxes[i].x2-boxes[i].x1)+1; - clp->rects[i].h = (boxes[i].y2-boxes[i].y1)+1; - } - REGION_DESTROY(pGC->pScreen, (RegionPtr)pValue); - break; - case CT_UNSORTED: - case CT_YSORTED: - case CT_YXSORTED: - case CT_YXBANDED: - rects = (xRectangle *)pValue; - clp->nRects = nrects; - clp->rects = (PsRectPtr)xalloc(clp->nRects*sizeof(PsRectRec)); - for( i=0 ; inRects ; i++ ) - { - clp->rects[i].x = rects[i].x; - clp->rects[i].y = rects[i].y; - clp->rects[i].w = rects[i].width; - clp->rects[i].h = rects[i].height; - } - xfree(pValue); - break; - } -} - -void -PsDestroyClip(GCPtr pGC) -{ - PsClipPtr clp = (PsClipPtr)pGC->clientClip; - - if( clp->rects ) xfree(clp->rects); - if( clp->outterClips ) xfree(clp->outterClips); - clp->rects = (PsRectPtr)0; - clp->outterClips = (PsRectPtr)0; - clp->nRects = 0; - clp->nOutterClips = 0; - if( clp->elms ) PsDestroyFillElementList(clp->nElms, clp->elms); - clp->elms = (PsElmPtr)0; - clp->nElms = 0; - pGC->clientClipType = CT_NONE; -} - -void -PsCopyClip(GCPtr pDst, GCPtr pSrc) -{ - PsClipPtr src = (PsClipPtr)pSrc->clientClip; - PsClipPtr dst = (PsClipPtr)pDst->clientClip; - - PsDestroyClip(pDst); - pDst->clientClipType = pSrc->clientClipType; - *dst = *src; - if( src->rects ) - { - dst->rects = (PsRectPtr)xalloc(src->nRects*sizeof(PsRectRec)); - memcpy(dst->rects, src->rects, src->nRects*sizeof(PsRectRec)); - } - if( src->elms ) - dst->elms = PsCloneFillElementList(src->nElms, src->elms); -} - - -GCPtr -PsCreateAndCopyGC(DrawablePtr pDrawable, GCPtr pSrc) -{ - GCPtr pDst; - - if (pSrc == NULL) { - /* https://freedesktop.org/bugzilla/show_bug.cgi?id=1416 ("'x11perf - * -copypixpix500' crashes Xprt's PostScript DDX [PsCreateAndCopyGC"): - * I have no clue whether this is the real fix or just wallpapering - * over the crash (that's why we warn here loudly when this - * happens) ... */ - fprintf(stderr, "PsCreateAndCopyGC: pSrc == NULL\n"); - return NULL; - } - - if ((pDst = - CreateScratchGC(pDrawable->pScreen, pDrawable->depth)) == NULL) - { - return NULL; - } - - if (CopyGC(pSrc, pDst, - GCFunction | GCPlaneMask | GCForeground | GCBackground | - GCLineWidth | GCLineStyle | GCCapStyle | GCJoinStyle | - GCFillStyle | GCFillRule | GCTile | GCStipple | - GCTileStipXOrigin | GCTileStipYOrigin | GCFont | - GCSubwindowMode | GCGraphicsExposures | GCClipXOrigin | - GCClipYOrigin | GCClipMask | GCDashOffset | GCDashList | - GCArcMode) != Success) - { - (void)FreeGC(pDst, (GContext)0); - - return NULL; - } - - return pDst; -} - diff --git a/hw/xprint/ps/PsImageUtil.c b/hw/xprint/ps/PsImageUtil.c deleted file mode 100644 index 668a23f65..000000000 --- a/hw/xprint/ps/PsImageUtil.c +++ /dev/null @@ -1,329 +0,0 @@ - -/* -Copyright (c) 2005 Roland Mainz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -/* Please do not beat me for this ugly code - most of it has been stolen from - * xc/lib/X11/ImUtil.c */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "Ps.h" -#include "gcstruct.h" -#include "windowstr.h" -#include "servermd.h" -#include "attributes.h" - -static unsigned char const _reverse_byte[0x100] = { - 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, - 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, - 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, - 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, - 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, - 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, - 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, - 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, - 0x02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0xaf, 0x6f, 0xef, - 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff -}; - -static -int XReverse_Bytes( - register unsigned char *bpt, - register int nb) -{ - do { - *bpt = _reverse_byte[*bpt]; - bpt++; - } while (--nb > 0); - return 0; -} - -/* - * Data structure for "image" data, used by image manipulation routines. - */ -typedef struct { - int width, height; /* size of image */ - int xoffset; /* number of pixels offset in X direction */ - int format; /* XYBitmap, XYPixmap, ZPixmap */ - char *data; /* pointer to image data */ - int byte_order; /* data byte order, LSBFirst, MSBFirst */ - int bitmap_unit; /* quant. of scanline 8, 16, 32 */ - int bitmap_bit_order; /* LSBFirst, MSBFirst */ - int depth; /* depth of image */ - int bytes_per_line; /* accelarator to next line */ - int bits_per_pixel; /* bits per pixel (ZPixmap) */ -} TmpImage; - - -static void xynormalizeimagebits ( - register unsigned char *bp, - register TmpImage *img) -{ - register unsigned char c; - - if (img->byte_order != img->bitmap_bit_order) { - switch (img->bitmap_unit) { - - case 16: - c = *bp; - *bp = *(bp + 1); - *(bp + 1) = c; - break; - - case 32: - c = *(bp + 3); - *(bp + 3) = *bp; - *bp = c; - c = *(bp + 2); - *(bp + 2) = *(bp + 1); - *(bp + 1) = c; - break; - } - } - if (img->bitmap_bit_order == MSBFirst) - XReverse_Bytes (bp, img->bitmap_unit >> 3); -} - -static void znormalizeimagebits ( - register unsigned char *bp, - register TmpImage *img) -{ - register unsigned char c; - switch (img->bits_per_pixel) { - - case 4: - *bp = ((*bp >> 4) & 0xF) | ((*bp << 4) & ~0xF); - break; - - case 16: - c = *bp; - *bp = *(bp + 1); - *(bp + 1) = c; - break; - - case 24: - c = *(bp + 2); - *(bp + 2) = *bp; - *bp = c; - break; - - case 32: - c = *(bp + 3); - *(bp + 3) = *bp; - *bp = c; - c = *(bp + 2); - *(bp + 2) = *(bp + 1); - *(bp + 1) = c; - break; - } -} - -/* - * Macros - * - * The ROUNDUP macro rounds up a quantity to the specified boundary, - * then truncates to bytes. - * - * The XYNORMALIZE macro determines whether XY format data requires - * normalization and calls a routine to do so if needed. The logic in - * this module is designed for LSBFirst byte and bit order, so - * normalization is done as required to present the data in this order. - * - * The ZNORMALIZE macro performs byte and nibble order normalization if - * required for Z format data. - * - * The XYINDEX macro computes the index to the starting byte (char) boundary - * for a bitmap_unit containing a pixel with coordinates x and y for image - * data in XY format. - * - * The ZINDEX macro computes the index to the starting byte (char) boundary - * for a pixel with coordinates x and y for image data in ZPixmap format. - * - */ - -#if defined(Lynx) && defined(ROUNDUP) -#undef ROUNDUP -#endif - -#define ROUNDUP(nbytes, pad) ((((nbytes) + ((pad)-1)) / (pad)) * ((pad)>>3)) - -#define XYNORMALIZE(bp, img) \ - if ((img->byte_order == MSBFirst) || (img->bitmap_bit_order == MSBFirst)) \ - xynormalizeimagebits((unsigned char *)(bp), img) - -#define ZNORMALIZE(bp, img) \ - if (img->byte_order == MSBFirst) \ - znormalizeimagebits((unsigned char *)(bp), img) - -#define XYINDEX(x, y, img) \ - ((y) * img->bytes_per_line) + \ - (((x) + img->xoffset) / img->bitmap_unit) * (img->bitmap_unit >> 3) - -#define ZINDEX(x, y, img) ((y) * img->bytes_per_line) + \ - (((x) * img->bits_per_pixel) >> 3) - -/* - * GetPixel - * - * Returns the specified pixel. The X and Y coordinates are relative to - * the origin (upper left [0,0]) of the image. The pixel value is returned - * in normalized format, i.e. the LSB of the long is the LSB of the pixel. - * The algorithm used is: - * - * copy the source bitmap_unit or Zpixel into temp - * normalize temp if needed - * extract the pixel bits into return value - * - */ - -static unsigned long const low_bits_table[] = { - 0x00000000, 0x00000001, 0x00000003, 0x00000007, - 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, - 0x000000ff, 0x000001ff, 0x000003ff, 0x000007ff, - 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, - 0x0000ffff, 0x0001ffff, 0x0003ffff, 0x0007ffff, - 0x000fffff, 0x001fffff, 0x003fffff, 0x007fffff, - 0x00ffffff, 0x01ffffff, 0x03ffffff, 0x07ffffff, - 0x0fffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff, - 0xffffffff -}; - -static unsigned long XGetPixel (TmpImage *ximage, int x, int y) -{ - unsigned long pixel, px; - register char *src; - register char *dst; - register int i, j; - int bits, nbytes; - long plane; - - if ((ximage->bits_per_pixel | ximage->depth) == 1) { - src = &ximage->data[XYINDEX(x, y, ximage)]; - dst = (char *)&pixel; - pixel = 0; - for (i = ximage->bitmap_unit >> 3; --i >= 0; ) *dst++ = *src++; - XYNORMALIZE(&pixel, ximage); - bits = (x + ximage->xoffset) % ximage->bitmap_unit; - pixel = ((((char *)&pixel)[bits>>3])>>(bits&7)) & 1; - } else if (ximage->format == XYPixmap) { - pixel = 0; - plane = 0; - nbytes = ximage->bitmap_unit >> 3; - for (i = ximage->depth; --i >= 0; ) { - src = &ximage->data[XYINDEX(x, y, ximage)+ plane]; - dst = (char *)&px; - px = 0; - for (j = nbytes; --j >= 0; ) *dst++ = *src++; - XYNORMALIZE(&px, ximage); - bits = (x + ximage->xoffset) % ximage->bitmap_unit; - pixel = (pixel << 1) | - (((((char *)&px)[bits>>3])>>(bits&7)) & 1); - plane = plane + (ximage->bytes_per_line * ximage->height); - } - } else if (ximage->format == ZPixmap) { - src = &ximage->data[ZINDEX(x, y, ximage)]; - dst = (char *)&px; - px = 0; - for (i = (ximage->bits_per_pixel + 7) >> 3; --i >= 0; ) - *dst++ = *src++; - ZNORMALIZE(&px, ximage); - pixel = 0; - for (i=sizeof(unsigned long); --i >= 0; ) - pixel = (pixel << 8) | ((unsigned char *)&px)[i]; - if (ximage->bits_per_pixel == 4) { - if (x & 1) - pixel >>= 4; - else - pixel &= 0xf; - } - } else { - return 0; /* bad image */ - } - if (ximage->bits_per_pixel == ximage->depth) - return pixel; - else - return (pixel & low_bits_table[ximage->depth]); -} - -unsigned long -PsGetImagePixel(char *pImage, int depth, int w, int h, int leftPad, int format, - int px, int py) -{ - TmpImage xi = {0}; - - xi.width = w; - xi.height = h; - xi.xoffset = 0/*leftPad*/; - xi.format = format; - xi.data = pImage; - xi.byte_order = IMAGE_BYTE_ORDER; - xi.bitmap_bit_order = BITMAP_BIT_ORDER; - xi.bitmap_unit = ((depth > 16)?(32): - ((depth > 8)?(16): - ((depth > 1)? (8): - (1)))); - xi.depth = depth; - xi.bits_per_pixel = xi.bitmap_unit; - - /* - * compute per line accelerator. - */ - if (format == ZPixmap) - xi.bytes_per_line = - ROUNDUP((xi.bits_per_pixel * xi.width), 32); - else - xi.bytes_per_line = - ROUNDUP((xi.width + xi.xoffset), 32); - - return XGetPixel(&xi, px, py); -} - - - diff --git a/hw/xprint/ps/PsInit.c b/hw/xprint/ps/PsInit.c deleted file mode 100644 index 72bd7bd7c..000000000 --- a/hw/xprint/ps/PsInit.c +++ /dev/null @@ -1,648 +0,0 @@ -/* - -Copyright 1996, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* - * (c) Copyright 1996 Hewlett-Packard Company - * (c) Copyright 1996 International Business Machines Corp. - * (c) Copyright 1996 Sun Microsystems, Inc. - * (c) Copyright 1996 Novell, Inc. - * (c) Copyright 1996 Digital Equipment Corp. - * (c) Copyright 1996 Fujitsu Limited - * (c) Copyright 1996 Hitachi, Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the names of the copyright holders - * shall not be used in advertising or otherwise to promote the sale, use - * or other dealings in this Software without prior written authorization - * from said copyright holders. - */ - -/******************************************************************* -** -** ********************************************************* -** * -** * File: PsInit.c -** * -** * Contents: Initialization code of Ps driver for the print server. -** * -** * Created By: Roger Helmendach (Liberty Systems) -** * -** * Copyright: Copyright 1996 The Open Group, Inc. -** * -** ********************************************************* -** -********************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include -#include - -#include "Ps.h" -#include "mi.h" -#include "micmap.h" -#include "AttrValid.h" -#include "fb.h" - -#include "windowstr.h" -#include "DiPrint.h" - -static void AllocatePsPrivates(ScreenPtr pScreen); -static int PsInitContext(XpContextPtr pCon); -static int PsDestroyContext(XpContextPtr pCon); - -DevPrivateKey PsScreenPrivateKey = &PsScreenPrivateKey; -DevPrivateKey PsContextPrivateKey = &PsContextPrivateKey; -DevPrivateKey PsPixmapPrivateKey = &PsPixmapPrivateKey; -DevPrivateKey PsWindowPrivateKey = &PsWindowPrivateKey; - -#ifdef GLXEXT -extern void GlxWrapInitVisuals(miInitVisualsProcPtr *); -#endif /* GLXEXT */ - -Bool -InitializePsDriver(ndx, pScreen, argc, argv) - int ndx; - ScreenPtr pScreen; - int argc; - char **argv; -{ -#if 0 - int maxXres, maxYres, maxWidth, maxHeight; - int maxRes, maxDim, numBytes; - PsScreenPrivPtr pPriv; -#endif - int nv, /* total number of visuals */ - nv_1bit, /* number of 8bit visuals */ - nv_8bit, /* number of 8bit visuals */ - nv_12bit, /* number of 12bit visuals */ - nv_14bit, /* number of 14bit visuals */ - nv_16bit, /* number of 16bit visuals */ - nv_24bit, /* number of 24bit visuals*/ - nv_30bit; /* number of 30bit visuals*/ - int nd; /* number of depths */ - int defaultVisualIndex = -1; - VisualID *vids_1bit, - *vids_8bit, - *vids_12bit, - *vids_14bit, - *vids_16bit, - *vids_24bit, - *vids_30bit; - VisualPtr visuals; - DepthPtr depths; - VisualID defaultVisual; - int rootDepth; - -/* - * Register this driver's InitContext function with the print - * extension. - */ - XpRegisterInitFunc(pScreen, "XP-POSTSCRIPT", PsInitContext); - -/* - * Create and fill in the devPrivate for the PS driver. - */ - AllocatePsPrivates(pScreen); - -#if 0 - pPriv = (PsScreenPrivPtr) - dixLookupPrivate(&pScreen->devPrivates, PsScreenPrivateKey); - pPriv->resDB = rmdb; -#endif - - pScreen->defColormap = (Colormap) FakeClientID(0); - pScreen->blackPixel = 1; - pScreen->whitePixel = 0; - pScreen->QueryBestSize = (QueryBestSizeProcPtr)PsQueryBestSize; - pScreen->SaveScreen = (SaveScreenProcPtr)_XpBoolNoop; - pScreen->GetImage = (GetImageProcPtr)_XpVoidNoop; - pScreen->GetSpans = (GetSpansProcPtr)_XpVoidNoop; - pScreen->CreateWindow = PsCreateWindow; - pScreen->DestroyWindow = PsDestroyWindow; - pScreen->PositionWindow = PsPositionWindow; - pScreen->ChangeWindowAttributes = PsChangeWindowAttributes; - pScreen->RealizeWindow = PsMapWindow; - pScreen->UnrealizeWindow = PsUnmapWindow; - pScreen->CloseScreen = PsCloseScreen; - pScreen->CopyWindow = PsCopyWindow; - /* XXX Hard routine to write! */ - -/* - * These two are going to be VERY different... - */ - pScreen->CreatePixmap = PsCreatePixmap; - pScreen->DestroyPixmap = PsDestroyPixmap; - pScreen->RealizeFont = PsRealizeFont; - pScreen->UnrealizeFont = PsUnrealizeFont; - pScreen->CreateGC = PsCreateGC; - pScreen->CreateColormap = PsCreateColormap; - pScreen->DestroyColormap = PsDestroyColormap; - pScreen->InstallColormap = PsInstallColormap; - pScreen->UninstallColormap = PsUninstallColormap; - pScreen->ListInstalledColormaps = PsListInstalledColormaps; - pScreen->StoreColors = PsStoreColors; - pScreen->ResolveColor = PsResolveColor; - /* Will BitmapToRegion make any difference at all? */ - pScreen->BitmapToRegion = fbPixmapToRegion; - - visuals = (VisualPtr) xalloc(16*sizeof(VisualRec)); - depths = (DepthPtr) xalloc(16*sizeof(DepthRec)); - vids_1bit = (VisualID *)xalloc(16*sizeof(VisualID)); - vids_8bit = (VisualID *)xalloc(16*sizeof(VisualID)); - vids_12bit = (VisualID *)xalloc(16*sizeof(VisualID)); - vids_14bit = (VisualID *)xalloc(16*sizeof(VisualID)); - vids_16bit = (VisualID *)xalloc(16*sizeof(VisualID)); - vids_24bit = (VisualID *)xalloc(16*sizeof(VisualID)); - vids_30bit = (VisualID *)xalloc(16*sizeof(VisualID)); - - nv = nv_1bit = nv_8bit = nv_12bit = nv_14bit = nv_16bit = nv_24bit = nv_30bit = nd = 0; - -#ifdef PSOUT_USE_DEEPCOLOR -/* gisburn: 30bit TrueColor has been disabled for now since it causes problems - * with GLX - see https://bugs.freedesktop.org/show_bug.cgi?id=2868 ("Mesa - * seems to be unable to handle 30bit TrueColor visuals") for details... - */ -#ifdef DISABLED_FOR_NOW - /* TrueColor, 30bit, 10bit per R-,G-,B-gun */ - visuals[nv].vid = FakeClientID(0); - visuals[nv].class = TrueColor; - visuals[nv].bitsPerRGBValue = 10; - visuals[nv].ColormapEntries = 1024; - visuals[nv].nplanes = 30; - visuals[nv].redMask = 0X3FF00000; - visuals[nv].greenMask = 0X000FFC00; - visuals[nv].blueMask = 0X000003FF; - visuals[nv].offsetRed = 20; - visuals[nv].offsetGreen = 10; - visuals[nv].offsetBlue = 0; - vids_30bit[nv_30bit] = visuals[nv].vid; - nv++; nv_30bit++; -#endif /* DISABLED_FOR_NOW */ -#endif /* PSOUT_USE_DEEPCOLOR */ - - /* TrueColor, 24bit */ - visuals[nv].vid = FakeClientID(0); - visuals[nv].class = TrueColor; - visuals[nv].bitsPerRGBValue = 8; - visuals[nv].ColormapEntries = 256; - visuals[nv].nplanes = 24; - visuals[nv].redMask = 0X00FF0000; - visuals[nv].greenMask = 0X0000FF00; - visuals[nv].blueMask = 0X000000FF; - visuals[nv].offsetRed = 16; - visuals[nv].offsetGreen = 8; - visuals[nv].offsetBlue = 0; - vids_24bit[nv_24bit] = visuals[nv].vid; - nv++; nv_24bit++; - - /* TrueColor, 16bit */ - visuals[nv].vid = FakeClientID(0); - visuals[nv].class = TrueColor; - visuals[nv].bitsPerRGBValue = 6; - visuals[nv].ColormapEntries = 64; - visuals[nv].nplanes = 16; - visuals[nv].redMask = 0x0000f800; - visuals[nv].greenMask = 0x000007e0; - visuals[nv].blueMask = 0x0000001f; - visuals[nv].offsetRed = 11; - visuals[nv].offsetGreen = 5; - visuals[nv].offsetBlue = 0; - vids_16bit[nv_16bit] = visuals[nv].vid; - nv++; nv_16bit++; - -#ifdef PSOUT_USE_DEEPCOLOR - /* PostScript Level 2 and above, colors can have 12 bits per component - * (36 bit for RGB) */ - - /* PseudoColor, 14bit (15bit won't work as |ColormapEntries==32768| - * is too large for a |signed short|... xx@@!!!... ;-( ) */ - visuals[nv].vid = FakeClientID(0); - visuals[nv].class = PseudoColor; - visuals[nv].bitsPerRGBValue = 12; - visuals[nv].ColormapEntries = 16384; - visuals[nv].nplanes = 14; - visuals[nv].redMask = 0x0; - visuals[nv].greenMask = 0x0; - visuals[nv].blueMask = 0x0; - visuals[nv].offsetRed = 0x0; - visuals[nv].offsetGreen = 0x0; - visuals[nv].offsetBlue = 0x0; - vids_14bit[nv_14bit] = visuals[nv].vid; - nv++; nv_14bit++; - - /* PseudoColor, 12bit */ - visuals[nv].vid = FakeClientID(0); - visuals[nv].class = PseudoColor; - visuals[nv].bitsPerRGBValue = 12; - visuals[nv].ColormapEntries = 4096; - visuals[nv].nplanes = 12; - visuals[nv].redMask = 0x0; - visuals[nv].greenMask = 0x0; - visuals[nv].blueMask = 0x0; - visuals[nv].offsetRed = 0x0; - visuals[nv].offsetGreen = 0x0; - visuals[nv].offsetBlue = 0x0; - vids_12bit[nv_12bit] = visuals[nv].vid; - defaultVisualIndex = nv; - nv++; nv_12bit++; - - /* GrayScale, 12bit, 12bit per R-,G-,B-gun */ - visuals[nv].vid = FakeClientID(0); - visuals[nv].class = GrayScale; - visuals[nv].bitsPerRGBValue = 12; - visuals[nv].ColormapEntries = 4096; - visuals[nv].nplanes = 12; - visuals[nv].redMask = 0x0; - visuals[nv].greenMask = 0x0; - visuals[nv].blueMask = 0x0; - visuals[nv].offsetRed = 0x0; - visuals[nv].offsetGreen = 0x0; - visuals[nv].offsetBlue = 0x0; - vids_12bit[nv_12bit] = visuals[nv].vid; - nv++; nv_12bit++; - - /* StaticGray, 12bit, 12bit per R-,G-,B-gun */ - visuals[nv].vid = FakeClientID(0); - visuals[nv].class = StaticGray; - visuals[nv].bitsPerRGBValue = 12; - visuals[nv].ColormapEntries = 4096; - visuals[nv].nplanes = 12; - visuals[nv].redMask = 0x0; - visuals[nv].greenMask = 0x0; - visuals[nv].blueMask = 0x0; - visuals[nv].offsetRed = 0x0; - visuals[nv].offsetGreen = 0x0; - visuals[nv].offsetBlue = 0x0; - vids_12bit[nv_12bit] = visuals[nv].vid; - nv++; nv_12bit++; -#endif /* PSOUT_USE_DEEPCOLOR */ - - /* PseudoColor, 8bit */ - visuals[nv].vid = FakeClientID(0); - visuals[nv].class = PseudoColor; - visuals[nv].bitsPerRGBValue = 8; - visuals[nv].ColormapEntries = 256; - visuals[nv].nplanes = 8; - visuals[nv].redMask = 0x0; - visuals[nv].greenMask = 0x0; - visuals[nv].blueMask = 0x0; - visuals[nv].offsetRed = 0x0; - visuals[nv].offsetGreen = 0x0; - visuals[nv].offsetBlue = 0x0; - vids_8bit[nv_8bit] = visuals[nv].vid; -#ifndef PSOUT_USE_DEEPCOLOR - defaultVisualIndex = nv; -#endif /* !PSOUT_USE_DEEPCOLOR */ - nv++; nv_8bit++; - - /* GrayScale, 8bit */ - visuals[nv].vid = FakeClientID(0); - visuals[nv].class = GrayScale; - visuals[nv].bitsPerRGBValue = 8; - visuals[nv].ColormapEntries = 256; - visuals[nv].nplanes = 8; - visuals[nv].redMask = 0x0; - visuals[nv].greenMask = 0x0; - visuals[nv].blueMask = 0x0; - visuals[nv].offsetRed = 0x0; - visuals[nv].offsetGreen = 0x0; - visuals[nv].offsetBlue = 0x0; - vids_8bit[nv_8bit] = visuals[nv].vid; - nv++; nv_8bit++; - - /* StaticGray, 8bit */ - visuals[nv].vid = FakeClientID(0); - visuals[nv].class = StaticGray; - visuals[nv].bitsPerRGBValue = 8; - visuals[nv].ColormapEntries = 256; - visuals[nv].nplanes = 8; - visuals[nv].redMask = 0x0; - visuals[nv].greenMask = 0x0; - visuals[nv].blueMask = 0x0; - visuals[nv].offsetRed = 0x0; - visuals[nv].offsetGreen = 0x0; - visuals[nv].offsetBlue = 0x0; - vids_8bit[nv_8bit] = visuals[nv].vid; - nv++; nv_8bit++; - - /* StaticGray, 1bit */ - visuals[nv].vid = FakeClientID(0); - visuals[nv].class = StaticGray; - visuals[nv].bitsPerRGBValue = 1; - visuals[nv].ColormapEntries = 2; - visuals[nv].nplanes = 1; - visuals[nv].redMask = 0x0; - visuals[nv].greenMask = 0x0; - visuals[nv].blueMask = 0x0; - visuals[nv].offsetRed = 0x0; - visuals[nv].offsetGreen = 0x0; - visuals[nv].offsetBlue = 0x0; - vids_1bit[nv_1bit] = visuals[nv].vid; - nv++; nv_1bit++; - - if( nv_30bit > 0 ) - { - depths[nd].depth = 30; - depths[nd].numVids = nv_30bit; - depths[nd].vids = vids_30bit; - nd++; - } - - if( nv_24bit > 0 ) - { - depths[nd].depth = 24; - depths[nd].numVids = nv_24bit; - depths[nd].vids = vids_24bit; - nd++; - } - - if( nv_16bit > 0 ) - { - depths[nd].depth = 16; - depths[nd].numVids = nv_16bit; - depths[nd].vids = vids_16bit; - nd++; - } - - if( nv_14bit > 0 ) - { - depths[nd].depth = 14; - depths[nd].numVids = nv_14bit; - depths[nd].vids = vids_14bit; - nd++; - } - - if( nv_12bit > 0 ) - { - depths[nd].depth = 12; - depths[nd].numVids = nv_12bit; - depths[nd].vids = vids_12bit; - nd++; - } - - if( nv_8bit > 0 ) - { - depths[nd].depth = 8; - depths[nd].numVids = nv_8bit; - depths[nd].vids = vids_8bit; - nd++; - } - - if( nv_1bit > 0 ) - { - depths[nd].depth = 1; - depths[nd].numVids = nv_1bit; - depths[nd].vids = vids_1bit; - nd++; - } - - /* Defaul visual is 12bit PseudoColor */ - defaultVisual = visuals[defaultVisualIndex].vid; - rootDepth = visuals[defaultVisualIndex].nplanes; - -#ifdef GLXEXT - { - miInitVisualsProcPtr proc = NULL; - - GlxWrapInitVisuals(&proc); - /* GlxInitVisuals ignores the last three arguments. */ - proc(&visuals, &depths, &nv, &nd, - &rootDepth, &defaultVisual, 0, 0, 0); - } -#endif /* GLXEXT */ - - miScreenInit(pScreen, (pointer)0, - pScreen->width, pScreen->height, - (int) (pScreen->width / (pScreen->mmWidth / 25.40)), - (int) (pScreen->height / (pScreen->mmHeight / 25.40)), - 0, rootDepth, nd, - depths, defaultVisual, nv, visuals); - - if( miCreateDefColormap(pScreen)==FALSE ) return FALSE; - -/*scalingScreenInit(pScreen);*/ - - return TRUE; -} - -static void -AllocatePsPrivates(ScreenPtr pScreen) -{ - dixRequestPrivate(PsWindowPrivateKey, sizeof(PsWindowPrivRec)); - dixRequestPrivate(PsContextPrivateKey, sizeof(PsContextPrivRec)); - dixRequestPrivate(PsPixmapPrivateKey, sizeof(PsPixmapPrivRec)); - - dixSetPrivate(&pScreen->devPrivates, PsScreenPrivateKey, - xalloc(sizeof(PsScreenPrivRec))); -} - -/* - * PsInitContext - * - * Establish the appropriate values for a PrintContext used with the PS - * driver. - */ - -static char DOC_ATT_SUPP[]="document-attributes-supported"; -static char DOC_ATT_VAL[]="document-format xp-listfonts-modes"; -static char JOB_ATT_SUPP[]="job-attributes-supported"; -static char JOB_ATT_VAL[]=""; -static char PAGE_ATT_SUPP[]="xp-page-attributes-supported"; -static char PAGE_ATT_VAL[]="content-orientation default-printer-resolution \ -default-input-tray default-medium plex xp-listfonts-modes"; - -static int -PsInitContext(pCon) - XpContextPtr pCon; -{ - XpDriverFuncsPtr pFuncs; - PsContextPrivPtr pConPriv; - char *server, *attrStr; - - /* - * Initialize the attribute store for this printer. - */ - XpInitAttributes(pCon); - - /* - * Initialize the function pointers - */ - pFuncs = &(pCon->funcs); - pFuncs->StartJob = PsStartJob; - pFuncs->EndJob = PsEndJob; - pFuncs->StartDoc = PsStartDoc; - pFuncs->EndDoc = PsEndDoc; - pFuncs->StartPage = PsStartPage; - pFuncs->EndPage = PsEndPage; - pFuncs->PutDocumentData = PsDocumentData; - pFuncs->GetDocumentData = PsGetDocumentData; - pFuncs->GetAttributes = PsGetAttributes; - pFuncs->SetAttributes = PsSetAttributes; - pFuncs->AugmentAttributes = PsAugmentAttributes; - pFuncs->GetOneAttribute = PsGetOneAttribute; - pFuncs->DestroyContext = PsDestroyContext; - pFuncs->GetMediumDimensions = PsGetMediumDimensions; - pFuncs->GetReproducibleArea = PsGetReproducibleArea; - pFuncs->SetImageResolution = PsSetImageResolution; - - /* - * Set up the context privates - */ - pConPriv = (PsContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); - - memset(pConPriv, 0, sizeof(PsContextPrivRec)); - pConPriv->jobFileName = (char *)NULL; - pConPriv->pJobFile = (FILE *)NULL; - pConPriv->dash = (unsigned char *)NULL; - pConPriv->validGC = 0; - pConPriv->getDocClient = (ClientPtr)NULL; - pConPriv->getDocBufSize = 0; - pConPriv->pPsOut = NULL; - pConPriv->fontInfoRecords = NULL; - pConPriv->fontTypeInfoRecords = NULL; - - /* - * document-attributes-supported - */ - server = XpGetOneAttribute( pCon, XPServerAttr, DOC_ATT_SUPP ); - if ((attrStr = (char *) xalloc(strlen(server) + - strlen(DOC_ATT_SUPP) + strlen(DOC_ATT_VAL) - + strlen(PAGE_ATT_VAL) + 8)) == NULL) - { - return BadAlloc; - } - sprintf(attrStr, "*%s:\t%s %s %s", - DOC_ATT_SUPP, server, DOC_ATT_VAL, PAGE_ATT_VAL); - XpAugmentAttributes( pCon, XPPrinterAttr, attrStr); - xfree(attrStr); - - /* - * job-attributes-supported - */ - server = XpGetOneAttribute( pCon, XPServerAttr, JOB_ATT_SUPP ); - if ((attrStr = (char *) xalloc(strlen(server) + strlen(JOB_ATT_SUPP) + - strlen(JOB_ATT_VAL) + 8)) == NULL) - { - return BadAlloc; - } - sprintf(attrStr, "*%s:\t%s %s", JOB_ATT_SUPP, server, JOB_ATT_VAL); - XpAugmentAttributes(pCon, XPPrinterAttr, attrStr); - xfree(attrStr); - - /* - * xp-page-attributes-supported - */ - server = XpGetOneAttribute( pCon, XPServerAttr, PAGE_ATT_SUPP ); - if ((attrStr = (char *) xalloc(strlen(server) + strlen(PAGE_ATT_SUPP) + - strlen(PAGE_ATT_VAL) + 8)) == NULL) - { - return BadAlloc; - } - sprintf(attrStr, "*%s:\t%s %s", PAGE_ATT_SUPP, server, PAGE_ATT_VAL); - XpAugmentAttributes(pCon, XPPrinterAttr, attrStr); - xfree(attrStr); - - /* - * Validate the attribute pools - */ - XpValidateAttributePool(pCon, XPPrinterAttr, &PsValidatePoolsRec); - XpValidateAttributePool(pCon, XPDocAttr, &PsValidatePoolsRec); - XpValidateAttributePool(pCon, XPJobAttr, &PsValidatePoolsRec); - XpValidateAttributePool(pCon, XPPageAttr, &PsValidatePoolsRec); - - return Success; -} - -static Bool -PsDestroyContext(pCon) - XpContextPtr pCon; -{ - PsContextPrivPtr pConPriv = (PsContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); - - if( pConPriv->pJobFile!=(FILE *)NULL ) - { - fclose(pConPriv->pJobFile); - pConPriv->pJobFile = NULL; - } - if( pConPriv->jobFileName!=(char *)NULL ) - { - unlink(pConPriv->jobFileName); - xfree(pConPriv->jobFileName); - pConPriv->jobFileName = (char *)NULL; - } - - PsFreeFontInfoRecords(pConPriv); - - /* Reset context to make sure we do not use any stale/invalid/obsolete data */ - memset(pConPriv, 0, sizeof(PsContextPrivRec)); - -/*### free up visuals/depths ###*/ - - return Success; -} - -XpContextPtr -PsGetContextFromWindow(win) - WindowPtr win; -{ - PsWindowPrivPtr pPriv; - - while( win ) - { - pPriv = (PsWindowPrivPtr) - dixLookupPrivate(&win->devPrivates, PsWindowPrivateKey); - if( pPriv->validContext ) return pPriv->context; - win = win->parent; - } - - return NULL; -} diff --git a/hw/xprint/ps/PsLine.c b/hw/xprint/ps/PsLine.c deleted file mode 100644 index aca186642..000000000 --- a/hw/xprint/ps/PsLine.c +++ /dev/null @@ -1,191 +0,0 @@ -/* - -Copyright 1996, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* - * (c) Copyright 1996 Hewlett-Packard Company - * (c) Copyright 1996 International Business Machines Corp. - * (c) Copyright 1996 Sun Microsystems, Inc. - * (c) Copyright 1996 Novell, Inc. - * (c) Copyright 1996 Digital Equipment Corp. - * (c) Copyright 1996 Fujitsu Limited - * (c) Copyright 1996 Hitachi, Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the names of the copyright holders - * shall not be used in advertising or otherwise to promote the sale, use - * or other dealings in this Software without prior written authorization - * from said copyright holders. - */ - -/******************************************************************* -** -** ********************************************************* -** * -** * File: PsLine.c -** * -** * Contents: Line drawing routines for the PS driver -** * -** * Created By: Roger Helmendach (Liberty Systems) -** * -** * Copyright: Copyright 1996 The Open Group, Inc. -** * -** ********************************************************* -** -********************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "Ps.h" -#include "gcstruct.h" -#include "windowstr.h" - -void -PsPolyLine( - DrawablePtr pDrawable, - GCPtr pGC, - int mode, - int nPoints, - xPoint *pPoints) -{ - if( pDrawable->type==DRAWABLE_PIXMAP ) - { - DisplayElmPtr elm; - PixmapPtr pix = (PixmapPtr)pDrawable; - PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr; - DisplayListPtr disp; - GCPtr gc; - - if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return; - - disp = PsGetFreeDisplayBlock(priv); - - elm = &disp->elms[disp->nelms]; - elm->type = PolyLineCmd; - elm->gc = gc; - elm->c.polyPts.mode = mode; - elm->c.polyPts.nPoints = nPoints; - elm->c.polyPts.pPoints = (xPoint *)xalloc(nPoints*sizeof(xPoint)); - memcpy(elm->c.polyPts.pPoints, pPoints, nPoints*sizeof(xPoint)); - disp->nelms += 1; - } - else - { - int i; - PsOutPtr psOut; - PsPointPtr pts; - ColormapPtr cMap; - - if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return; - PsOut_Offset(psOut, pDrawable->x, pDrawable->y); - PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel)); - PsLineAttrs(psOut, pGC, cMap); - pts = (PsPointPtr)xalloc(sizeof(PsPointRec)*nPoints); - if( mode==CoordModeOrigin ) - { - for( i=0 ; itype==DRAWABLE_PIXMAP ) - { - DisplayElmPtr elm; - PixmapPtr pix = (PixmapPtr)pDrawable; - PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr; - DisplayListPtr disp; - GCPtr gc; - - if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return; - - disp = PsGetFreeDisplayBlock(priv); - - elm = &disp->elms[disp->nelms]; - elm->type = PolySegmentCmd; - elm->gc = gc; - elm->c.segments.nSegments = nSegments; - elm->c.segments.pSegments = (xSegment *)xalloc(nSegments*sizeof(xSegment)); - memcpy(elm->c.segments.pSegments, pSegments, nSegments*sizeof(xSegment)); - disp->nelms += 1; - } - else - { - int i; - PsOutPtr psOut; - PsPointRec pts[2]; - ColormapPtr cMap; - - if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return; - PsOut_Offset(psOut, pDrawable->x, pDrawable->y); - PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel)); - PsLineAttrs(psOut, pGC, cMap); - for( i=0 ; i -#endif - -#include /* for SIGCLD on pre-POSIX systems */ -#include -#include "Ps.h" - -#include "cursor.h" -#include "resource.h" - -#include "windowstr.h" -#include "propertyst.h" - - -/*ARGSUSED*/ -void -PsQueryBestSize( - int type, - short *pwidth, - short *pheight, - ScreenPtr pScreen) -{ - unsigned width, highBit; - - switch(type) - { - case CursorShape: - *pwidth = 0; - *pheight = 0; - break; - case TileShape: - case StippleShape: - width = *pwidth; - if (!width) break; - /* Return the nearest power of two >= what they gave us */ - highBit = 0x80000000; - /* Find the highest 1 bit in the given width */ - while(!(highBit & width)) - highBit >>= 1; - /* If greater than that then return the next power of two */ - if((highBit - 1) & width) - highBit <<= 1; - *pwidth = highBit; - /* height is a don't-care */ - break; - } -} - -/* - * PsGetMediumDimensions is installed in the GetMediumDimensions field - * of each Ps-initialized context. - */ -int -PsGetMediumDimensions(XpContextPtr pCon, CARD16 *width, CARD16 *height) -{ - XpGetMediumDimensions(pCon, width, height); - return Success; -} - -/* - * PsGetReproducibleArea is installed in the GetReproducibleArea field - * of each Ps-initialized context. - */ -int -PsGetReproducibleArea(XpContextPtr pCon, xRectangle *pRect) -{ - XpGetReproductionArea(pCon, pRect); - return Success; -} - -/* - * PsSetImageResolution is installed in the SetImageResolution field - * of each Ps-initialized context. - */ -int -PsSetImageResolution(XpContextPtr pCon, int imageRes, Bool *status) -{ - pCon->imageRes = imageRes; - *status = True; - return Success; -} - -/* - * GetPropString searches the window heirarchy from pWin up looking for - * a property by the name of propName. If found, returns the property's - * value. If not, it returns NULL. - */ -/* -char * -GetPropString( - WindowPtr pWin, - char *propName) -{ - Atom atom; - PropertyPtr pProp = (PropertyPtr)NULL; - char *retVal; - - atom = MakeAtom(propName, strlen(propName), FALSE); - if(atom != BAD_RESOURCE) - { - WindowPtr pPropWin; - int rc, n; -*/ - - /* - * The atom has been defined, but it might only exist as a - * property on an unrelated window. - */ -/* - for(pPropWin = pWin; pPropWin != (WindowPtr)NULL; - pPropWin = pPropWin->parent) - { - rc = dixLookupProperty(&pProp, pPropWin, atom, - serverClient, DixReadAccess); - if (rc == Success) - break; - else - pProp = NULL; - } - if(pProp == (PropertyPtr)NULL) - return (char *)NULL; - - n = (pProp->format/8) * pProp->size; *//* size (bytes) of prop */ -/* - retVal = (char *)xalloc(n + 1); - (void)memcpy((void *)retVal, (void *)pProp->data, n); - retVal[n] = '\0'; - - return retVal; - } - - return (char *)NULL; -} - -#include - -*/ -/* ARGSUSED */ -/* -static void SigchldHndlr (int dummy) -{ - int status, w; - struct sigaction act; - sigfillset(&act.sa_mask); - act.sa_flags = 0; - act.sa_handler = SigchldHndlr; - - w = wait (&status); - -*/ - /* - * Is this really necessary? - */ -/* - sigaction(SIGCHLD, &act, (struct sigaction *)NULL); -} -*/ - -/* - * SystemCmd provides a wrapper for the 'system' library call. The call - * appears to be sensitive to the handling of SIGCHLD, so this wrapper - * sets the status to SIG_DFL, and then resets the established handler - * after system returns. - */ -/* -int -SystemCmd(char *cmdStr) -{ - int status; - struct sigaction newAct, oldAct; - sigfillset(&newAct.sa_mask); - newAct.sa_flags = 0; - newAct.sa_handler = SIG_DFL; - sigfillset(&oldAct.sa_mask); - oldAct.sa_flags = 0; - oldAct.sa_handler = SigchldHndlr; - -*/ - /* - * get the old handler, and set the action to IGN - */ -/* - sigaction(SIGCHLD, &newAct, &oldAct); - - status = system (cmdStr); - - sigaction(SIGCHLD, &oldAct, (struct sigaction *)NULL); - return status; -} -*/ - -Bool -PsCloseScreen( - int index, - ScreenPtr pScreen) -{ - return TRUE; -} - -void -PsLineAttrs( - PsOutPtr psOut, - GCPtr pGC, - ColormapPtr cMap) -{ - int i; - int nDsh; - int dshOff; - int *dsh; - PsCapEnum cap; - PsJoinEnum join; - - switch(pGC->capStyle) { - case CapButt: cap = PsCButt; break; - case CapRound: cap = PsCRound; break; - case CapProjecting: cap = PsCSquare; break; - default: cap = PsCButt; break; } - switch(pGC->joinStyle) { - case JoinMiter: join = PsJMiter; break; - case JoinRound: join = PsJRound; break; - case JoinBevel: join = PsJBevel; break; - default: join = PsJBevel; break; } - if( pGC->lineStyle==LineSolid ) { nDsh = dshOff = 0; dsh = (int *)0; } - else - { - nDsh = pGC->numInDashList; - dshOff = pGC->dashOffset; - if( !nDsh ) dsh = (int *)0; - else - { - dsh = (int *)xalloc(sizeof(int)*nDsh); - for( i=0 ; idash[i]&0xFF; - } - } - - if( pGC->lineStyle!=LineDoubleDash ) - PsOut_LineAttrs(psOut, (int)pGC->lineWidth, - cap, join, nDsh, dsh, dshOff, -1); - else - PsOut_LineAttrs(psOut, (int)pGC->lineWidth, - cap, join, nDsh, dsh, dshOff, - PsGetPixelColor(cMap, pGC->bgPixel)); - if( nDsh && dsh ) xfree(dsh); -} diff --git a/hw/xprint/ps/PsPixel.c b/hw/xprint/ps/PsPixel.c deleted file mode 100644 index d51cb6ecf..000000000 --- a/hw/xprint/ps/PsPixel.c +++ /dev/null @@ -1,156 +0,0 @@ -/* - -Copyright 1996, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* - * (c) Copyright 1996 Hewlett-Packard Company - * (c) Copyright 1996 International Business Machines Corp. - * (c) Copyright 1996 Sun Microsystems, Inc. - * (c) Copyright 1996 Novell, Inc. - * (c) Copyright 1996 Digital Equipment Corp. - * (c) Copyright 1996 Fujitsu Limited - * (c) Copyright 1996 Hitachi, Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the names of the copyright holders - * shall not be used in advertising or otherwise to promote the sale, use - * or other dealings in this Software without prior written authorization - * from said copyright holders. - */ - -/******************************************************************* -** -** ********************************************************* -** * -** * File: PsPixel.c -** * -** * Contents: Pixel-drawing code for the PS DDX driver -** * -** * Created By: Roger Helmendach (Liberty Systems) -** * -** * Copyright: Copyright 1995 The Open Group, Inc. -** * -** ********************************************************* -** -********************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include - -#include "windowstr.h" -#include "gcstruct.h" - -#include "Ps.h" - -void -PsPolyPoint( - DrawablePtr pDrawable, - GCPtr pGC, - int mode, - int nPoints, - xPoint *pPoints) -{ - if( pDrawable->type==DRAWABLE_PIXMAP ) - { - DisplayElmPtr elm; - PixmapPtr pix = (PixmapPtr)pDrawable; - PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr; - DisplayListPtr disp; - GCPtr gc; - - if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return; - - disp = PsGetFreeDisplayBlock(priv); - - elm = &disp->elms[disp->nelms]; - elm->type = PolyPointCmd; - elm->gc = gc; - elm->c.polyPts.mode = mode; - elm->c.polyPts.nPoints = nPoints; - elm->c.polyPts.pPoints = (xPoint *)xalloc(nPoints*sizeof(xPoint)); - memcpy(elm->c.polyPts.pPoints, pPoints, nPoints*sizeof(xPoint)); - disp->nelms += 1; - } - else - { - int i; - PsOutPtr psOut; - PsPointPtr pts; - ColormapPtr cMap; - - if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return; - PsOut_Offset(psOut, pDrawable->x, pDrawable->y); - PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel)); - pts = (PsPointPtr)xalloc(sizeof(PsPointRec)*nPoints); - if( mode==CoordModeOrigin ) - { - for( i=0 ; i -#endif - -#include "windowstr.h" -#include "gcstruct.h" -#include "privates.h" - -#include "Ps.h" - -#define _BitsPerPixel(d) (\ - (1 << PixmapWidthPaddingInfo[d].padBytesLog2) * 8 / \ - (PixmapWidthPaddingInfo[d].padRoundUp+1)) - -PixmapPtr -PsCreatePixmap( - ScreenPtr pScreen, - int width, - int height, - int depth, - unsigned usage_hint) -{ - PixmapPtr pPixmap; - - pPixmap = (PixmapPtr)xcalloc(1, sizeof(PixmapRec)); - if( !pPixmap) return NullPixmap; - pPixmap->drawable.type = DRAWABLE_PIXMAP; - pPixmap->drawable.class = 0; - pPixmap->drawable.pScreen = pScreen; - pPixmap->drawable.depth = depth; - pPixmap->drawable.bitsPerPixel = _BitsPerPixel(depth); - pPixmap->drawable.id = 0; - pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; - pPixmap->drawable.x = 0; - pPixmap->drawable.y = 0; - pPixmap->drawable.width = width; - pPixmap->drawable.height = height; - pPixmap->devKind = 0; - pPixmap->refcnt = 1; - pPixmap->devPrivates = NULL; - - pPixmap->devPrivate.ptr = (PsPixmapPrivPtr)xcalloc(1, sizeof(PsPixmapPrivRec)); - if( !pPixmap->devPrivate.ptr ) - { xfree(pPixmap); return NullPixmap; } - return pPixmap; -} - -/* PsScrubPixmap: Remove all content from a pixmap (used by - * |PsPolyFillRect()| when the "solid fill" operation covers - * the whole pixmap) */ -void -PsScrubPixmap(PixmapPtr pPixmap) -{ - PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pPixmap->devPrivate.ptr; - DisplayListPtr disp = priv->dispList; - - while( disp ) - { - int i; - DisplayListPtr oldDisp = disp; - disp = disp->next; - for( i=0 ; inelms ; i++ ) - { - DisplayElmPtr elm = &oldDisp->elms[i]; - - switch(elm->type) - { - case PolyPointCmd: - case PolyLineCmd: - if( elm->c.polyPts.pPoints ) xfree(elm->c.polyPts.pPoints); - break; - case PolySegmentCmd: - if( elm->c.segments.pSegments ) xfree(elm->c.segments.pSegments); - break; - case PolyRectangleCmd: - if( elm->c.rects.pRects ) xfree(elm->c.rects.pRects); - break; - case FillPolygonCmd: - if( elm->c.polyPts.pPoints ) xfree(elm->c.polyPts.pPoints); - break; - case PolyFillRectCmd: - if( elm->c.rects.pRects ) xfree(elm->c.rects.pRects); - break; - case PolyArcCmd: - if( elm->c.arcs.pArcs ) xfree(elm->c.arcs.pArcs); - break; - case PolyFillArcCmd: - if( elm->c.arcs.pArcs ) xfree(elm->c.arcs.pArcs); - break; - case Text8Cmd: - case TextI8Cmd: - if( elm->c.text8.string ) xfree(elm->c.text8.string); - break; - case Text16Cmd: - case TextI16Cmd: - if( elm->c.text16.string ) xfree(elm->c.text16.string); - break; - case PutImageCmd: - if( elm->c.image.pData ) xfree(elm->c.image.pData); - break; - case BeginFrameCmd: - break; - case EndFrameCmd: - break; - } - - if (elm->type != BeginFrameCmd && elm->type != EndFrameCmd) { - (void) FreeGC(elm->gc, (GContext) 0); - } - } - xfree(oldDisp); - } - - priv->dispList = NULL; -} - -Bool -PsDestroyPixmap(PixmapPtr pPixmap) -{ - PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pPixmap->devPrivate.ptr; - - if( --pPixmap->refcnt ) return TRUE; - - PsScrubPixmap(pPixmap); - - xfree(priv); - dixFreePrivates(pPixmap->devPrivates); - xfree(pPixmap); - return TRUE; -} - -DisplayListPtr -PsGetFreeDisplayBlock(PsPixmapPrivPtr priv) -{ - DisplayListPtr disp = priv->dispList; - - for(; disp ; disp=disp->next ) - { - if( disp->nelms>=DPY_BLOCKSIZE && disp->next ) continue; - if( disp->nelmsnext = (DisplayListPtr)xcalloc(1, sizeof(DisplayListRec)); - disp->next->next = (DisplayListPtr)0; - disp->next->nelms = 0; - } - disp = (DisplayListPtr)xcalloc(1, sizeof(DisplayListRec)); - disp->next = (DisplayListPtr)0; - disp->nelms = 0; - priv->dispList = disp; - return(disp); -} - -void -PsReplay(DisplayElmPtr elm, DrawablePtr pDrawable) -{ - switch(elm->type) - { - case PolyPointCmd: - PsPolyPoint(pDrawable, elm->gc, elm->c.polyPts.mode, - elm->c.polyPts.nPoints, elm->c.polyPts.pPoints); - break; - case PolyLineCmd: - PsPolyLine(pDrawable, elm->gc, elm->c.polyPts.mode, - elm->c.polyPts.nPoints, elm->c.polyPts.pPoints); - break; - case PolySegmentCmd: - PsPolySegment(pDrawable, elm->gc, elm->c.segments.nSegments, - elm->c.segments.pSegments); - break; - case PolyRectangleCmd: - PsPolyRectangle(pDrawable, elm->gc, elm->c.rects.nRects, - elm->c.rects.pRects); - break; - case FillPolygonCmd: - PsFillPolygon(pDrawable, elm->gc, 0, elm->c.polyPts.mode, - elm->c.polyPts.nPoints, elm->c.polyPts.pPoints); - break; - case PolyFillRectCmd: - PsPolyFillRect(pDrawable, elm->gc, elm->c.rects.nRects, - elm->c.rects.pRects); - break; - case PolyArcCmd: - PsPolyArc(pDrawable, elm->gc, elm->c.arcs.nArcs, elm->c.arcs.pArcs); - break; - case PolyFillArcCmd: - PsPolyFillArc(pDrawable, elm->gc, elm->c.arcs.nArcs, elm->c.arcs.pArcs); - break; - case Text8Cmd: - PsPolyText8(pDrawable, elm->gc, elm->c.text8.x, elm->c.text8.y, - elm->c.text8.count, elm->c.text8.string); - break; - case Text16Cmd: - PsPolyText16(pDrawable, elm->gc, elm->c.text16.x, elm->c.text16.y, - elm->c.text16.count, elm->c.text16.string); - break; - case TextI8Cmd: - PsImageText8(pDrawable, elm->gc, elm->c.text8.x, elm->c.text8.y, - elm->c.text8.count, elm->c.text8.string); - break; - case TextI16Cmd: - PsImageText16(pDrawable, elm->gc, elm->c.text16.x, elm->c.text16.y, - elm->c.text16.count, elm->c.text16.string); - break; - case PutImageCmd: - PsPutScaledImage(pDrawable, elm->gc, elm->c.image.depth, - elm->c.image.x, elm->c.image.y, - elm->c.image.w, elm->c.image.h, elm->c.image.leftPad, - elm->c.image.format, elm->c.image.res, - elm->c.image.pData); - break; - case BeginFrameCmd: - { - PsOutPtr psOut; - ColormapPtr cMap; - if( PsUpdateDrawableGC(NULL, pDrawable, &psOut, &cMap)==FALSE ) return; - PsOut_BeginFrame(psOut, 0, 0, elm->c.frame.x, elm->c.frame.y, - elm->c.frame.w, elm->c.frame.h); - } - break; - case EndFrameCmd: - { - PsOutPtr psOut; - ColormapPtr cMap; - if( PsUpdateDrawableGC(NULL, pDrawable, &psOut, &cMap)==FALSE ) return; - PsOut_EndFrame(psOut); - } - break; - } -} - -void -PsReplayPixmap(PixmapPtr pix, DrawablePtr pDrawable) -{ - PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr; - DisplayListPtr disp = priv->dispList; - DisplayElmPtr elm; - - for(; disp ; disp=disp->next ) - { - int i; - for( i=0,elm=disp->elms ; inelms ; i++,elm++ ) - PsReplay(elm, pDrawable); - } -} - -int -PsCloneDisplayElm(PixmapPtr dst, DisplayElmPtr elm, DisplayElmPtr newElm, - int xoff, int yoff) -{ - int i; - int size; - int status = 0; - - *newElm = *elm; - - /* I think this is the correct return value */ - if ((newElm->gc = PsCreateAndCopyGC(&dst->drawable, elm->gc)) == NULL) { - return 1; - } - - switch(elm->type) - { - case PolyPointCmd: - case PolyLineCmd: - newElm->c.polyPts.pPoints = - (xPoint *)xalloc(elm->c.polyPts.nPoints*sizeof(xPoint)); - for( i=0 ; ic.polyPts.nPoints ; i++ ) - { - newElm->c.polyPts.pPoints[i].x = elm->c.polyPts.pPoints[i].x+xoff; - newElm->c.polyPts.pPoints[i].y = elm->c.polyPts.pPoints[i].y+yoff; - } - break; - case PolySegmentCmd: - newElm->c.segments.pSegments = - (xSegment *)xalloc(elm->c.segments.nSegments*sizeof(xSegment)); - for( i=0 ; ic.segments.nSegments ; i++ ) - { - newElm->c.segments.pSegments[i].x1 = - elm->c.segments.pSegments[i].x1+xoff; - newElm->c.segments.pSegments[i].y1 = - elm->c.segments.pSegments[i].y1+yoff; - newElm->c.segments.pSegments[i].x2 = - elm->c.segments.pSegments[i].x2+xoff; - newElm->c.segments.pSegments[i].y2 = - elm->c.segments.pSegments[i].y2+yoff; - } - break; - case PolyRectangleCmd: - newElm->c.rects.pRects = - (xRectangle *)xalloc(elm->c.rects.nRects*sizeof(xRectangle)); - for( i=0 ; ic.rects.nRects ; i++ ) - { - newElm->c.rects.pRects[i].x = elm->c.rects.pRects[i].x+xoff; - newElm->c.rects.pRects[i].y = elm->c.rects.pRects[i].y+yoff; - newElm->c.rects.pRects[i].width = elm->c.rects.pRects[i].width; - newElm->c.rects.pRects[i].height = elm->c.rects.pRects[i].height; - } - break; - case FillPolygonCmd: - newElm->c.polyPts.pPoints = - (xPoint *)xalloc(elm->c.polyPts.nPoints*sizeof(xPoint)); - for( i=0 ; ic.polyPts.nPoints ; i++ ) - { - newElm->c.polyPts.pPoints[i].x = elm->c.polyPts.pPoints[i].x+xoff; - newElm->c.polyPts.pPoints[i].y = elm->c.polyPts.pPoints[i].y+yoff; - } - break; - case PolyFillRectCmd: - newElm->c.rects.pRects = - (xRectangle *)xalloc(elm->c.rects.nRects*sizeof(xRectangle)); - for( i=0 ; ic.rects.nRects ; i++ ) - { - newElm->c.rects.pRects[i].x = elm->c.rects.pRects[i].x+xoff; - newElm->c.rects.pRects[i].y = elm->c.rects.pRects[i].y+yoff; - newElm->c.rects.pRects[i].width = elm->c.rects.pRects[i].width; - newElm->c.rects.pRects[i].height = elm->c.rects.pRects[i].height; - } - break; - case PolyArcCmd: - newElm->c.arcs.pArcs = - (xArc *)xalloc(elm->c.arcs.nArcs*sizeof(xArc)); - for( i=0 ; ic.arcs.nArcs ; i++ ) - { - newElm->c.arcs.pArcs[i].x = elm->c.arcs.pArcs[i].x+xoff; - newElm->c.arcs.pArcs[i].y = elm->c.arcs.pArcs[i].y+yoff; - newElm->c.arcs.pArcs[i].width = elm->c.arcs.pArcs[i].width; - newElm->c.arcs.pArcs[i].height = elm->c.arcs.pArcs[i].height; - newElm->c.arcs.pArcs[i].angle1 = elm->c.arcs.pArcs[i].angle1; - newElm->c.arcs.pArcs[i].angle2 = elm->c.arcs.pArcs[i].angle2; - } - break; - case PolyFillArcCmd: - newElm->c.arcs.pArcs = - (xArc *)xalloc(elm->c.arcs.nArcs*sizeof(xArc)); - for( i=0 ; ic.arcs.nArcs ; i++ ) - { - newElm->c.arcs.pArcs[i].x = elm->c.arcs.pArcs[i].x+xoff; - newElm->c.arcs.pArcs[i].y = elm->c.arcs.pArcs[i].y+yoff; - newElm->c.arcs.pArcs[i].width = elm->c.arcs.pArcs[i].width; - newElm->c.arcs.pArcs[i].height = elm->c.arcs.pArcs[i].height; - newElm->c.arcs.pArcs[i].angle1 = elm->c.arcs.pArcs[i].angle1; - newElm->c.arcs.pArcs[i].angle2 = elm->c.arcs.pArcs[i].angle2; - } - break; - case Text8Cmd: - case TextI8Cmd: - newElm->c.text8.string = (char *)xalloc(elm->c.text8.count); - memcpy(newElm->c.text8.string, elm->c.text8.string, elm->c.text8.count); - newElm->c.text8.x += xoff; - newElm->c.text8.y += yoff; - break; - case Text16Cmd: - case TextI16Cmd: - newElm->c.text16.string = - (unsigned short *)xalloc(elm->c.text16.count*sizeof(unsigned short)); - memcpy(newElm->c.text16.string, elm->c.text16.string, - elm->c.text16.count*sizeof(unsigned short)); - newElm->c.text16.x += xoff; - newElm->c.text16.y += yoff; - break; - case PutImageCmd: - size = PixmapBytePad(elm->c.image.w, elm->c.image.depth)*elm->c.image.h; - newElm->c.image.pData = (char *)xalloc(size); - memcpy(newElm->c.image.pData, elm->c.image.pData, size); - newElm->c.image.x += xoff; - newElm->c.image.y += yoff; - break; - case BeginFrameCmd: - case EndFrameCmd: - status = 1; - break; - } - return(status); -} - -void -PsCopyDisplayList(PixmapPtr src, PixmapPtr dst, int xoff, int yoff, - int x, int y, int w, int h) -{ - PsPixmapPrivPtr sPriv = (PsPixmapPrivPtr)src->devPrivate.ptr; - PsPixmapPrivPtr dPriv = (PsPixmapPrivPtr)dst->devPrivate.ptr; - DisplayListPtr sDisp; - DisplayListPtr dDisp = PsGetFreeDisplayBlock(dPriv); - DisplayElmPtr elm = &dDisp->elms[dDisp->nelms]; - - elm->type = BeginFrameCmd; - elm->c.frame.x = x; - elm->c.frame.y = y; - elm->c.frame.w = w; - elm->c.frame.h = h; - dDisp->nelms += 1; - - sDisp = sPriv->dispList; - for(; sDisp ; sDisp=sDisp->next ) - { - int i; - for( i=0,elm=sDisp->elms ; inelms ; i++,elm++ ) - { - dDisp = PsGetFreeDisplayBlock(dPriv); - if (PsCloneDisplayElm(dst, elm, &dDisp->elms[dDisp->nelms], - xoff, yoff)==0) - { - dDisp->nelms += 1; - } - } - } - - dDisp = PsGetFreeDisplayBlock(dPriv); - elm = &dDisp->elms[dDisp->nelms]; - elm->type = EndFrameCmd; - dDisp->nelms += 1; -} - -PsElmPtr -PsCreateFillElementList(PixmapPtr pix, int *nElms) -{ - PsElmPtr elms = (PsElmPtr)0; - PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr; - DisplayListPtr disp = priv->dispList; - PsArcEnum styl; - - *nElms = 0; - for(; disp ; disp=disp->next ) - { - int i; - DisplayElmPtr elm = disp->elms; - - for( i=0 ; inelms ; i++,elm++ ) - { - if( !elm->gc ) continue; /* workaround for https://freedesktop.org/bugzilla/show_bug.cgi?id=1416 */ - if( !elm->gc->fgPixel ) continue; - switch(elm->type) - { - case FillPolygonCmd: - *nElms += 1; - break; - case PolyFillRectCmd: - *nElms += elm->c.rects.nRects; - break; - case PolyFillArcCmd: - *nElms += elm->c.arcs.nArcs; - break; - default: /* keep the compiler happy with unhandled enums */ - break; - } - } - } - - if( (*nElms) ) - { - elms = (PsElmPtr)xcalloc(1, (*nElms)*sizeof(PsElmRec)); - if( elms ) - { - disp = priv->dispList; - *nElms = 0; - for(; disp ; disp=disp->next ) - { - int i, k; - DisplayElmPtr elm = disp->elms; - - for( i=0 ; inelms ; i++,elm++ ) - { - if( !elm->gc->fgPixel ) continue; - switch(elm->type) - { - case FillPolygonCmd: - elms[*nElms].type = PSOUT_POINTS; - elms[*nElms].nPoints = elm->c.polyPts.nPoints; - elms[*nElms].c.points = - (PsPointPtr)xalloc(elms[*nElms].nPoints*sizeof(PsPointRec)); - for( k=0 ; kc.polyPts.pPoints[k].x; - elms[*nElms].c.points[k].y = elm->c.polyPts.pPoints[k].y; - } - *nElms += 1; - break; - case PolyFillRectCmd: - for( k=0 ; kc.rects.nRects ; k++ ) - { - elms[*nElms].type = PSOUT_RECT; - elms[*nElms].nPoints = 0; - elms[*nElms].c.rect.x = elm->c.rects.pRects[k].x; - elms[*nElms].c.rect.y = elm->c.rects.pRects[k].y; - elms[*nElms].c.rect.w = elm->c.rects.pRects[k].width; - elms[*nElms].c.rect.h = elm->c.rects.pRects[k].height; - *nElms += 1; - } - break; - case PolyFillArcCmd: - if( elm->gc->arcMode==ArcChord ) styl = PsChord; - else styl = PsPieSlice; - for( k=0 ; kc.rects.nRects ; k++ ) - { - elms[*nElms].type = PSOUT_ARC; - elms[*nElms].nPoints = 0; - elms[*nElms].c.arc.x = elm->c.arcs.pArcs[k].x; - elms[*nElms].c.arc.y = elm->c.arcs.pArcs[k].y; - elms[*nElms].c.arc.w = elm->c.arcs.pArcs[k].width; - elms[*nElms].c.arc.h = elm->c.arcs.pArcs[k].height; - elms[*nElms].c.arc.a1 = elm->c.arcs.pArcs[k].angle1; - elms[*nElms].c.arc.a2 = elm->c.arcs.pArcs[k].angle2; - elms[*nElms].c.arc.style = styl; - *nElms += 1; - } - break; - default: /* keep the compiler happy with unhandled enums */ - break; - } - } - } - } - } - return(elms); -} - -PsElmPtr -PsCloneFillElementList(int nElms, PsElmPtr elms) -{ - int i; - PsElmPtr newElms; - - newElms = (PsElmPtr)xcalloc(1, nElms*sizeof(PsElmRec)); - if( !newElms ) return(newElms); - for( i=0 ; i -#endif - -#include "Ps.h" -#include "gcstruct.h" -#include "windowstr.h" - -void -PsPolyRectangle( - DrawablePtr pDrawable, - GCPtr pGC, - int nRects, - xRectangle *pRects) -{ - if( pDrawable->type==DRAWABLE_PIXMAP ) - { - DisplayElmPtr elm; - PixmapPtr pix = (PixmapPtr)pDrawable; - PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr; - DisplayListPtr disp; - GCPtr gc; - - if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return; - - disp = PsGetFreeDisplayBlock(priv); - - elm = &disp->elms[disp->nelms]; - elm->type = PolyRectangleCmd; - elm->gc = gc; - elm->c.rects.nRects = nRects; - elm->c.rects.pRects = (xRectangle *)xalloc(nRects*sizeof(xRectangle)); - memcpy(elm->c.rects.pRects, pRects, nRects*sizeof(xRectangle)); - disp->nelms += 1; - } - else - { - int i; - PsOutPtr psOut; - ColormapPtr cMap; - - if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return; - PsOut_Offset(psOut, pDrawable->x, pDrawable->y); - PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel)); - PsLineAttrs(psOut, pGC, cMap); - for( i=0 ; itype==DRAWABLE_PIXMAP ) - { - DisplayElmPtr elm; - PixmapPtr pix = (PixmapPtr)pDrawable; - PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr; - DisplayListPtr disp; - GCPtr gc; - - if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return; - - disp = PsGetFreeDisplayBlock(priv); - - elm = &disp->elms[disp->nelms]; - elm->type = FillPolygonCmd; - elm->gc = gc; - elm->c.polyPts.mode = mode; - elm->c.polyPts.nPoints = nPoints; - elm->c.polyPts.pPoints = (xPoint *)xalloc(nPoints*sizeof(xPoint)); - memcpy(elm->c.polyPts.pPoints, pPoints, nPoints*sizeof(xPoint)); - disp->nelms += 1; - } - else - { - int i; - PsOutPtr psOut; - PsPointPtr pts; - PsRuleEnum rule; - ColormapPtr cMap; - - if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return; - PsOut_Offset(psOut, pDrawable->x, pDrawable->y); - PsSetFillColor(pDrawable, pGC, psOut, cMap); - if( pGC->fillRule==EvenOddRule ) rule = PsEvenOdd; - else rule = PsNZWinding; - PsOut_FillRule(psOut, rule); - pts = (PsPointPtr)xalloc(sizeof(PsPointRec)*nPoints); - if( mode==CoordModeOrigin ) - { - for( i=0 ; itype==DRAWABLE_PIXMAP ) - { - DisplayElmPtr elm; - PixmapPtr pix = (PixmapPtr)pDrawable; - PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr; - DisplayListPtr disp; - GCPtr gc; - -#ifdef DBE - /* Remove previous pixmap content if we render one single rect which - * covers the whole pixmap surface (this optimisation was added for - * the double-buffer extension ("DBE") which uses |PolyFillRect()| - * to clear the buffer - but it makes sense in other cases, too). - */ - if (nRects == 1) - { - if ( (pRects[0].x==0) && (pRects[0].y==0) && - (pRects[0].width==pDrawable->width) && (pRects[0].height==pDrawable->height) && - (pGC->fillStyle == FillSolid) && - (noDbeExtension == False)) - { -#ifdef DEBUG_gismobile - ErrorF("PsPolyFillRect: scrubbing pixmap...\n"); -#endif /* DEBUG_gismobile */ - /* Remove all content from the pixmap as it would be covered - * by the whole rect anyway */ - PsScrubPixmap((PixmapPtr)pDrawable); - } - } -#endif /* DBE */ - - if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return; - - disp = PsGetFreeDisplayBlock(priv); - - elm = &disp->elms[disp->nelms]; - elm->type = PolyFillRectCmd; - elm->gc = gc; - elm->c.rects.nRects = nRects; - elm->c.rects.pRects = (xRectangle *)xalloc(nRects*sizeof(xRectangle)); - memcpy(elm->c.rects.pRects, pRects, nRects*sizeof(xRectangle)); - disp->nelms += 1; - } - else - { - int i; - PsOutPtr psOut; - ColormapPtr cMap; - - if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return; - PsOut_Offset(psOut, pDrawable->x, pDrawable->y); - PsSetFillColor(pDrawable, pGC, psOut, cMap); - for( i=0 ; i -#endif - -#include -#include -#include -#include -#include -#include -#include -#include - -#define NEED_EVENTS -#include -#undef NEED_EVENTS - -#include "Ps.h" - -#include "windowstr.h" -#include "attributes.h" -#include "Oid.h" - -/* static utility function to get document/page attributes */ -static void -S_GetPageAttributes(XpContextPtr pCon,int *iorient,int *icount, int *iplex, - int *ires, unsigned short *iwd, unsigned short *iht) -{ - char *count; - XpOid orient, plex; - /* - * Get the orientation - */ - orient = XpGetContentOrientation(pCon); - switch (orient) { - case xpoid_val_content_orientation_landscape: - *iorient = 1; - break; - case xpoid_val_content_orientation_reverse_portrait: - *iorient = 2; - break; - case xpoid_val_content_orientation_reverse_landscape: - *iorient = 3; - break; - case xpoid_val_content_orientation_portrait: - default: - *iorient = 0; - break; - } - - /* - * Get the count - */ - count = XpGetOneAttribute(pCon, XPDocAttr, "copy-count"); - if( count ) - { - int ii = sscanf(count, "%d", icount); - if( ii!=1 ) *icount = 1; - } - else *icount = 1; - - /* - * Get the plex - */ - plex = XpGetPlex(pCon); - switch(plex) - { - case xpoid_val_plex_duplex: - *iplex = 1; - break; - case xpoid_val_plex_tumble: - *iplex = 2; - break; - default: - *iplex = 0; - break; - } - - /* - * Get the resolution and media size - */ - *ires = XpGetResolution(pCon); - XpGetMediumDimensions(pCon, iwd, iht); -} - - -int -PsStartJob( - XpContextPtr pCon, - Bool sendClientData, - ClientPtr client) -{ - PsContextPrivPtr pConPriv = (PsContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); - - /* - * Create a temporary file to store the printer output. - */ - if (!XpOpenTmpFile("w", &pConPriv->jobFileName, &pConPriv->pJobFile)) - return BadAlloc; - - return Success; -} - - - -/* I thought about making this following code into a set of routines - or using a goto, or something, but in the end decided not to, - because the plain old listing here makes the logic clearer. */ -int -PsEndJob( - XpContextPtr pCon, - Bool cancel) -{ - int r; - struct stat buffer; - int error; - - PsContextPrivPtr priv = (PsContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); - - if (cancel == True) { - if (priv->getDocClient != (ClientPtr) NULL) { - (void) XpFinishDocData( priv->getDocClient ); - - priv->getDocClient = NULL; - priv->getDocBufSize = 0; - } - - /* job is cancelled - do we really care if we're out of space? */ - (void) fclose(priv->pJobFile); - priv->pJobFile = NULL; - - unlink(priv->jobFileName); - xfree(priv->jobFileName); - priv->jobFileName = (char *)NULL; - - PsFreeFontInfoRecords(priv); - - return Success; - } - - /* - * Append any trailing information here - */ - PsOut_EndFile(priv->pPsOut, 0); - priv->pPsOut = NULL; - - /* this is where we find out if we're out of space */ - error = (fclose(priv->pJobFile) == EOF); - priv->pJobFile = NULL; - - /* status to the client if we have ran out of space on the disk or - some other resource problem with the temporary file... */ - if (error) { - if (priv->getDocClient != (ClientPtr) NULL) { - (void) XpFinishDocData( priv->getDocClient ); - - priv->getDocClient = NULL; - priv->getDocBufSize = 0; - } - - unlink(priv->jobFileName); - xfree(priv->jobFileName); - priv->jobFileName = (char *)NULL; - - PsFreeFontInfoRecords(priv); - - return BadAlloc; - } - - /* we have finished without incident & no cancel */ - - if (priv->getDocClient != NULL && priv->getDocBufSize > 0) { - FILE *file; - - file = fopen(priv->jobFileName, "r"); - if (!file || (fstat(fileno(file), &buffer) < 0)) - r = BadAlloc; - else - r = XpSendDocumentData(priv->getDocClient, file, buffer.st_size, - priv->getDocBufSize); - if (file) - fclose(file); - - (void) XpFinishDocData(priv->getDocClient); - - priv->getDocClient = NULL; - priv->getDocBufSize = 0; - } - else { - XpSubmitJob(priv->jobFileName, pCon); - - r = Success; - } - - unlink(priv->jobFileName); - xfree(priv->jobFileName); - priv->jobFileName = (char *)NULL; - - PsFreeFontInfoRecords(priv); - -#ifdef BM_CACHE - PsBmClearImageCache(); -#endif - - return r; -} - -/* StartPage - */ -int -PsStartPage( - XpContextPtr pCon, - WindowPtr pWin) -{ - int iorient, iplex, icount, ires; - unsigned short iwd, iht; - PsContextPrivPtr pConPriv = (PsContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); - PsWindowPrivPtr pWinPriv = (PsWindowPrivPtr) - dixLookupPrivate(&pWin->devPrivates, PsWindowPrivateKey); - -/* - * Put a pointer to the context in the window private structure - */ - pWinPriv->validContext = 1; - pWinPriv->context = pCon; - - /* get page level attributes */ - S_GetPageAttributes(pCon,&iorient,&icount,&iplex,&ires,&iwd,&iht); - /* - * Start the page - */ - if (pConPriv->pPsOut == NULL) { - char *title; - - /* get job level attributes */ - title = XpGetOneAttribute(pCon, XPJobAttr, "job-name"); - - pConPriv->pPsOut = PsOut_BeginFile(pConPriv->pJobFile, - title, iorient, icount, iplex, ires, - (int)iwd, (int)iht, False); - pConPriv->fontInfoRecords = NULL; - pConPriv->fontTypeInfoRecords = NULL; - } - PsOut_BeginPage(pConPriv->pPsOut, iorient, icount, iplex, ires, - (int)iwd, (int)iht); - - return Success; -} - - -/* - * EndPage: - * - * Write page trailer to page file - * Write page file to job file - */ -int -PsEndPage( - XpContextPtr pCon, - WindowPtr pWin) -{ - PsWindowPrivPtr pWinPriv = (PsWindowPrivPtr) - dixLookupPrivate(&pWin->devPrivates, PsWindowPrivateKey); - PsContextPrivPtr pConPriv = (PsContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); - - PsOut_EndPage(pConPriv->pPsOut); - - pWinPriv->validContext = 0; - pWinPriv->context = NULL; - - /* status to the client if we have ran out of space on the disk or - some other resource problem with the temporary file... */ -/* if (ferror(pConPriv->pJobFile)) return BadAlloc; */ - - return Success; -} - -/* - * The PsStartDoc() and PsEndDoc() functions serve basically as NOOP - * placeholders. This driver doesn't deal with the notion of multiple - * documents per page. - */ - -int -PsStartDoc(XpContextPtr pCon, XPDocumentType type) -{ - int iorient, iplex, icount, ires; - unsigned short iwd, iht; - char *title; - PsContextPrivPtr pConPriv = (PsContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); - - /* get job level attributes */ - title = XpGetOneAttribute(pCon, XPJobAttr, "job-name"); - - /* get document level attributes */ - S_GetPageAttributes(pCon,&iorient,&icount,&iplex,&ires,&iwd,&iht); - - pConPriv->pPsOut = PsOut_BeginFile(pConPriv->pJobFile, - title, iorient, icount, iplex, ires, - (int)iwd, (int)iht, (Bool)(type == XPDocRaw)); - - pConPriv->fontInfoRecords = NULL; - pConPriv->fontTypeInfoRecords = NULL; - - return Success; -} - -int -PsEndDoc( - XpContextPtr pCon, - Bool cancel) -{ - return Success; -} - -/* - * PsDocumentData() - * - * Hand any pre-generated PDL down to the spool files, formatting it - * as necessary to fit the given window. - */ - -int -PsDocumentData( - XpContextPtr pCon, - DrawablePtr pDraw, - char *pData, - int len_data, - char *pFmt, - int len_fmt, - char *pOpt, - int len_opt, - ClientPtr client) -{ - PsContextPrivPtr cPriv; - PsOutPtr psOut; - - if (len_fmt != 12 || - strncasecmp(pFmt, "PostScript 2", len_fmt) != 0 || - len_opt) - return BadValue; - - cPriv = (PsContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); - psOut = cPriv->pPsOut; - - if (pDraw) - PsOut_BeginFrame(psOut, 0, 0, pDraw->x, pDraw->y, - pDraw->width, pDraw->height); - PsOut_RawData(psOut, pData, len_data); - if (pDraw) - PsOut_EndFrame(psOut); - - return Success; -} - -/* - * - * PsGetDocumentData() - * - * This function allows the driver to send the generated PS back to - * the client. - */ - -int -PsGetDocumentData( - XpContextPtr pCon, - ClientPtr client, - int maxBufferSize) -{ - PsContextPrivPtr pPriv = (PsContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); - - pPriv->getDocClient = client; - pPriv->getDocBufSize = maxBufferSize; - - return Success; -} - diff --git a/hw/xprint/ps/PsSpans.c b/hw/xprint/ps/PsSpans.c deleted file mode 100644 index c0e66ee7a..000000000 --- a/hw/xprint/ps/PsSpans.c +++ /dev/null @@ -1,164 +0,0 @@ -/* - -Copyright 1996, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* - * (c) Copyright 1996 Hewlett-Packard Company - * (c) Copyright 1996 International Business Machines Corp. - * (c) Copyright 1996 Sun Microsystems, Inc. - * (c) Copyright 1996 Novell, Inc. - * (c) Copyright 1996 Digital Equipment Corp. - * (c) Copyright 1996 Fujitsu Limited - * (c) Copyright 1996 Hitachi, Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the names of the copyright holders - * shall not be used in advertising or otherwise to promote the sale, use - * or other dealings in this Software without prior written authorization - * from said copyright holders. - */ - -/******************************************************************* -** -** ********************************************************* -** * -** * File: PsSpans.c -** * -** * Contents: Code to set and fill spans in the PS DDX -** * -** * Created By: Roger Helmendach (Liberty Systems) -** * -** * Copyright: Copyright 1996 The Open Group, Inc. -** * -** ********************************************************* -** -********************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "Ps.h" -#include "gcstruct.h" -#include "windowstr.h" - -void -PsFillSpans( - DrawablePtr pDrawable, - GCPtr pGC, - int nSpans, - DDXPointPtr pPoints, - int *pWidths, - int fSorted) -{ - PsOutPtr psOut; - int xoffset, yoffset; - xRectangle *rects, *r; - RegionPtr fillRegion, region = 0; - int i; - int nbox; - BoxPtr pbox; - ColormapPtr cMap; - - if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return; - - /* - * Build a region out of the spans - */ - rects = (xRectangle *)xalloc(nSpans*sizeof(xRectangle)); - xoffset = pDrawable->x; - yoffset = pDrawable->y; - - for( i = 0, r = rects; i < nSpans; i++, r++ ) - { - r->x = pPoints[i].x + xoffset; - r->y = pPoints[i].y + yoffset; - r->width = pWidths[i]; - r->height = 1; - } - fillRegion = RECTS_TO_REGION(pGC->pScreen, nSpans, rects, - (fSorted)?CT_YSORTED:CT_UNSORTED); - - /* - * Intersect this region with the clip region. Whatever's left, - * should be filled. - */ -/*REGION_INTERSECT(pGC->pScreen, region, fillRegion, pGC->clientClip);*/ - - pbox = REGION_RECTS(region); - nbox = REGION_NUM_RECTS(region); - - /* Enter HP-GL/2 */ - /*###SEND_PCL( outFile, "\27%0B" );*/ - - while( nbox ) - { -/*### - sprintf( t, "PU%d,%d;RR%d,%d;", pbox->x1, pbox->y1, pbox->x2, pbox->y2); - SEND_PCL( outFile, t ); -*/ - nbox--; - pbox++; - } - - /* Go back to PCL */ - /*###SEND_PCL( outFile, "\27%0A" );*/ - - /* - * Clean up the temporary regions - */ - REGION_DESTROY(pGC->pScreen, fillRegion); - REGION_DESTROY(pGC->pScreen, region); - xfree(rects); -} - -void -PsSetSpans( - DrawablePtr pDrawable, - GCPtr pGC, - char *pSrc, - DDXPointPtr pPoints, - int *pWidths, - int nSpans, - int fSorted) -{ -} diff --git a/hw/xprint/ps/PsText.c b/hw/xprint/ps/PsText.c deleted file mode 100644 index 872c0f427..000000000 --- a/hw/xprint/ps/PsText.c +++ /dev/null @@ -1,581 +0,0 @@ -/* - -Copyright 1996, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* - * (c) Copyright 1996 Hewlett-Packard Company - * (c) Copyright 1996 International Business Machines Corp. - * (c) Copyright 1996 Sun Microsystems, Inc. - * (c) Copyright 1996 Novell, Inc. - * (c) Copyright 1996 Digital Equipment Corp. - * (c) Copyright 1996 Fujitsu Limited - * (c) Copyright 1996 Hitachi, Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the names of the copyright holders - * shall not be used in advertising or otherwise to promote the sale, use - * or other dealings in this Software without prior written authorization - * from said copyright holders. - */ - -/******************************************************************* -** -** ********************************************************* -** * -** * File: PsText.c -** * -** * Contents: Character-drawing routines for the PS DDX -** * -** * Created By: Roger Helmendach (Liberty Systems) -** * -** * Copyright: Copyright 1996 The Open Group, Inc. -** * -** ********************************************************* -** -********************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "Ps.h" -#include "gcstruct.h" -#include "windowstr.h" -#include -#include -#include - -int -PsPolyText8( - DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - int count, - char *string) -{ - if( pDrawable->type==DRAWABLE_PIXMAP ) - { - DisplayElmPtr elm; - PixmapPtr pix = (PixmapPtr)pDrawable; - PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr; - DisplayListPtr disp; - GCPtr gc; - - if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return x; - - disp = PsGetFreeDisplayBlock(priv); - - elm = &disp->elms[disp->nelms]; - elm->type = Text8Cmd; - elm->gc = gc; - elm->c.text8.x = x; - elm->c.text8.y = y; - elm->c.text8.count = count; - elm->c.text8.string = (char *)xalloc(count); - memcpy(elm->c.text8.string, string, count); - disp->nelms += 1; - - return x; - } - else - { - PsFontInfoRec *firec; - - /* We need a context for rendering... */ - if (PsGetPsContextPriv(pDrawable) == NULL) - return x; - - firec = PsGetFontInfoRec(pDrawable, pGC->font); - if (!firec) - return x; - -#ifdef XP_USE_FREETYPE - if (firec->ftir->downloadableFont && - (firec->ftir->font_type == PSFTI_FONT_TYPE_FREETYPE)) - { - PsOutPtr psOut; - ColormapPtr cMap; - - if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) - return x; - - if (firec->ftir->alreadyDownloaded[0] == False) - { - PsOut_DownloadFreeType(psOut, - firec->ftir->ft_download_font_type, - firec->ftir->download_ps_name, pGC->font, 0); - firec->ftir->alreadyDownloaded[0] = True; - } - - PsOut_Offset(psOut, pDrawable->x, pDrawable->y); - PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel)); - if (!firec->size) - PsOut_TextAttrsMtx(psOut, firec->ftir->download_ps_name, firec->mtx, firec->ftir->is_iso_encoding); - else - PsOut_TextAttrs(psOut, firec->ftir->download_ps_name, firec->size, firec->ftir->is_iso_encoding); - PsOut_FreeType_Text(pGC->font, psOut, x, y, string, count); - - return x; - } - else -#endif /* XP_USE_FREETYPE */ - if (firec->ftir->downloadableFont && - (firec->ftir->font_type != PSFTI_FONT_TYPE_FREETYPE)) - { - PsOutPtr psOut; - ColormapPtr cMap; - - if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) - return x; - - if (firec->ftir->alreadyDownloaded[0] == False) - { - PsOut_DownloadType1(psOut, "PsPolyText8", - firec->ftir->download_ps_name, firec->ftir->filename); - firec->ftir->alreadyDownloaded[0] = True; - } - - PsOut_Offset(psOut, pDrawable->x, pDrawable->y); - PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel)); - if (!firec->size) - PsOut_TextAttrsMtx(psOut, firec->ftir->download_ps_name, firec->mtx, firec->ftir->is_iso_encoding); - else - PsOut_TextAttrs(psOut, firec->ftir->download_ps_name, firec->size, firec->ftir->is_iso_encoding); - PsOut_Text(psOut, x, y, string, count, -1); - - return x; - } - - /* Render glyphs as bitmaps */ - { - unsigned long n, i; - int w; - CharInfoPtr charinfo[255]; - - GetGlyphs(pGC->font, (unsigned long)count, - (unsigned char *)string, Linear8Bit, &n, charinfo); - w = 0; - for (i=0; i < n; i++) - w += charinfo[i]->metrics.characterWidth; - - if (n != 0) - PsPolyGlyphBlt(pDrawable, pGC, x, y, n, - charinfo, FONTGLYPHS(pGC->font)); - x += w; - - return x; - } - } - return x; -} - -int -PsPolyText16( - DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - int count, - unsigned short *string) -{ - if( pDrawable->type==DRAWABLE_PIXMAP ) - { - DisplayElmPtr elm; - PixmapPtr pix = (PixmapPtr)pDrawable; - PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr; - DisplayListPtr disp; - GCPtr gc; - - if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return x; - - disp = PsGetFreeDisplayBlock(priv); - - elm = &disp->elms[disp->nelms]; - elm->type = Text16Cmd; - elm->gc = gc; - elm->c.text16.x = x; - elm->c.text16.y = y; - elm->c.text16.count = count; - elm->c.text16.string = - (unsigned short *)xalloc(count*sizeof(unsigned short)); - memcpy(elm->c.text16.string, string, count*sizeof(unsigned short)); - disp->nelms += 1; - - return x; - } - else - { - PsFontInfoRec *firec; - - /* We need a context for rendering... */ - if (PsGetPsContextPriv(pDrawable) == NULL) - return x; - - firec = PsGetFontInfoRec(pDrawable, pGC->font); - if (!firec) - return x; - -#ifdef XP_USE_FREETYPE - if (firec->ftir->downloadableFont && - (firec->ftir->font_type == PSFTI_FONT_TYPE_FREETYPE)) - { - PsOutPtr psOut; - ColormapPtr cMap; - unsigned short c, - c_hiByte, - c_lowByte, - fontPage; - int i; - - if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) - return x; - - /* Scan the string we want to render and download all neccesary parts - * of the font (one part(="font page") has 256 glyphs) - */ - for( i = 0 ; i < count ; i++ ) - { - c = string[i]; -#if IMAGE_BYTE_ORDER == LSBFirst - c_hiByte = c & 0x00FF; - c_lowByte = (c >> 8) & 0x00FF; -#elif IMAGE_BYTE_ORDER == MSBFirst - c_hiByte = (c >> 8) & 0x00FF; - c_lowByte = c & 0x00FF; -#else -#error Unsupported byte order -#endif - fontPage = c_hiByte; - - if (firec->ftir->alreadyDownloaded[fontPage] == False) - { - char buffer[256]; - const char *ps_name; - - if (fontPage > 0) - { - sprintf(buffer, "%s_%x", firec->ftir->download_ps_name, (int)fontPage); - ps_name = buffer; - } - else - { - ps_name = firec->ftir->download_ps_name; - } - - PsOut_DownloadFreeType(psOut, - firec->ftir->ft_download_font_type, - ps_name, pGC->font, (fontPage * 0x100)); /* same as (fontPage << 8) */ - - firec->ftir->alreadyDownloaded[fontPage] = True; - } - } - - - PsOut_Offset(psOut, pDrawable->x, pDrawable->y); - PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel)); - if (!firec->size) - PsOut_FreeType_TextAttrsMtx16(psOut, firec->ftir->download_ps_name, firec->mtx, firec->ftir->is_iso_encoding); - else - PsOut_FreeType_TextAttrs16(psOut, firec->ftir->download_ps_name, firec->size, firec->ftir->is_iso_encoding); - PsOut_FreeType_Text16(pGC->font, psOut, x, y, string, count); - - return x; - } - else -#endif /* XP_USE_FREETYPE */ - if (firec->ftir->downloadableFont && - (firec->ftir->font_type != PSFTI_FONT_TYPE_FREETYPE)) - { - PsOutPtr psOut; - ColormapPtr cMap; - unsigned short fontPage; - - if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) - return x; - - PsOut_DownloadType1(psOut, "PsPolyText16", - firec->ftir->download_ps_name, firec->ftir->filename); - firec->ftir->alreadyDownloaded[fontPage] = True; - - PsOut_Offset(psOut, pDrawable->x, pDrawable->y); - PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel)); - if (!firec->size) - PsOut_TextAttrsMtx(psOut, firec->ftir->download_ps_name, firec->mtx, firec->ftir->is_iso_encoding); - else - PsOut_TextAttrs(psOut, firec->ftir->download_ps_name, firec->size, firec->ftir->is_iso_encoding); - PsOut_Text16(psOut, x, y, string, count, -1); - - return x; - } - - /* Render glyphs as bitmaps */ - { - unsigned long n, i; - int w; - CharInfoPtr charinfo[255]; /* encoding only has 1 byte for count */ - - GetGlyphs(pGC->font, (unsigned long)count, (unsigned char *)string, - (FONTLASTROW(pGC->font) == 0) ? Linear16Bit : TwoD16Bit, - &n, charinfo); - w = 0; - for (i=0; i < n; i++) - w += charinfo[i]->metrics.characterWidth; - if (n != 0) - PsPolyGlyphBlt(pDrawable, pGC, x, y, n, charinfo, FONTGLYPHS(pGC->font)); - x += w; - - return x; - } - } - return x; -} - -void -PsImageText8( - DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - int count, - char *string) -{ - if( pDrawable->type==DRAWABLE_PIXMAP ) - { - DisplayElmPtr elm; - PixmapPtr pix = (PixmapPtr)pDrawable; - PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr; - DisplayListPtr disp; - GCPtr gc; - - if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return; - - disp = PsGetFreeDisplayBlock(priv); - - elm = &disp->elms[disp->nelms]; - elm->type = TextI8Cmd; - elm->gc = gc; - elm->c.text8.x = x; - elm->c.text8.y = y; - elm->c.text8.count = count; - elm->c.text8.string = (char *)xalloc(count); - memcpy(elm->c.text8.string, string, count); - disp->nelms += 1; - } - else - { - int iso; - int siz; - float mtx[4]; - char *fnam; - PsOutPtr psOut; - ColormapPtr cMap; - - if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return; - PsOut_Offset(psOut, pDrawable->x, pDrawable->y); - PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel)); - fnam = PsGetPSFontName(pGC->font); - if( !fnam ) fnam = "Times-Roman"; - siz = PsGetFontSize(pGC->font, mtx); - iso = PsIsISOLatin1Encoding(pGC->font); - if( !siz ) PsOut_TextAttrsMtx(psOut, fnam, mtx, iso); - else PsOut_TextAttrs(psOut, fnam, siz, iso); - PsOut_Text(psOut, x, y, string, count, PsGetPixelColor(cMap, pGC->bgPixel)); - } -} - -void -PsImageText16( - DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - int count, - unsigned short *string) -{ - if( pDrawable->type==DRAWABLE_PIXMAP ) - { - DisplayElmPtr elm; - PixmapPtr pix = (PixmapPtr)pDrawable; - PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr; - DisplayListPtr disp; - GCPtr gc; - - if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return; - - disp = PsGetFreeDisplayBlock(priv); - - elm = &disp->elms[disp->nelms]; - elm->type = TextI16Cmd; - elm->gc = gc; - elm->c.text16.x = x; - elm->c.text16.y = y; - elm->c.text16.count = count; - elm->c.text16.string = - (unsigned short *)xalloc(count*sizeof(unsigned short)); - memcpy(elm->c.text16.string, string, count*sizeof(unsigned short)); - disp->nelms += 1; - } - else - { - int i; - char *str; - if( !count ) return; - str = (char *)xalloc(count); - for( i=0 ; ifont; - width = FONTMAXBOUNDS(pfont,rightSideBearing) - - FONTMINBOUNDS(pfont,leftSideBearing); - height = FONTMAXBOUNDS(pfont,ascent) + - FONTMAXBOUNDS(pfont,descent); - - if ((width == 0) || (height == 0) ) - return; - { - int i; - w = 0; - for (i=0; i < nGlyphs; i++) w += pCharInfo[i]->metrics.characterWidth; - } - pGCtmp = GetScratchGC(1, pDrawable->pScreen); - if (!pGCtmp) - { - (*pDrawable->pScreen->DestroyPixmap)(pPixmap); - return; - } - - gcvals[0] = GXcopy; - gcvals[1] = pGC->fgPixel; - gcvals[2] = pGC->bgPixel; - - DoChangeGC(pGCtmp, GCFunction|GCForeground|GCBackground, gcvals, 0); - - - nbyLine = BitmapBytePad(width); - pbits = (unsigned char *)xalloc(height*nbyLine); - if (!pbits){ - PsDestroyPixmap(pPixmap); - return; - } - tmpx = 0; - while(nGlyphs--) - { - pci = *pCharInfo++; - pglyph = FONTGLYPHBITS(pGlyphBase, pci); - gWidth = GLYPHWIDTHPIXELS(pci); - gHeight = GLYPHHEIGHTPIXELS(pci); - if (gWidth && gHeight) - { - nbyGlyphWidth = GLYPHWIDTHBYTESPADDED(pci); - nbyPadGlyph = BitmapBytePad(gWidth); - - if (nbyGlyphWidth == nbyPadGlyph -#if GLYPHPADBYTES != 4 - && (((int) pglyph) & 3) == 0 -#endif - ) - { - pb = pglyph; - } - else - { - for (i=0, pb = pbits; imetrics.leftSideBearing, - y - pci->metrics.ascent, gWidth, gHeight, - 0, XYBitmap, (char *)pb); - } - - x += pci->metrics.characterWidth; - } - xfree(pbits); - FreeScratchGC(pGCtmp); -} diff --git a/hw/xprint/ps/PsWindow.c b/hw/xprint/ps/PsWindow.c deleted file mode 100644 index 8bfde4b0d..000000000 --- a/hw/xprint/ps/PsWindow.c +++ /dev/null @@ -1,222 +0,0 @@ -/* - -Copyright 1996, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* - * (c) Copyright 1996 Hewlett-Packard Company - * (c) Copyright 1996 International Business Machines Corp. - * (c) Copyright 1996 Sun Microsystems, Inc. - * (c) Copyright 1996 Novell, Inc. - * (c) Copyright 1996 Digital Equipment Corp. - * (c) Copyright 1996 Fujitsu Limited - * (c) Copyright 1996 Hitachi, Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the names of the copyright holders - * shall not be used in advertising or otherwise to promote the sale, use - * or other dealings in this Software without prior written authorization - * from said copyright holders. - */ - -/******************************************************************* -** -** ********************************************************* -** * -** * File: PsWindow.c -** * -** * Contents: Window code for PS driver. -** * -** * Created By: Roger Helmendach (Liberty Systems) -** * -** * Copyright: Copyright 1996 The Open Group, Inc. -** * -** ********************************************************* -** -********************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include - -#include "mistruct.h" -#include "regionstr.h" -#include "windowstr.h" -#include "gcstruct.h" - -#include "Ps.h" - -/* - * The following list of strings defines the properties which will be - * placed on the screen's root window if the property was defined in - * the start-up configuration resource database. - */ -#if 0 -static char *propStrings[] = { - DT_PRINT_JOB_HEADER, - DT_PRINT_JOB_TRAILER, - DT_PRINT_JOB_COMMAND, - DT_PRINT_JOB_EXEC_COMMAND, - DT_PRINT_JOB_EXEC_OPTIONS, - DT_PRINT_PAGE_HEADER, - DT_PRINT_PAGE_TRAILER, - DT_PRINT_PAGE_COMMAND, - (char *)NULL -}; -#endif - -/* - * PsCreateWindow - watch for the creation of the root window. - * When it's created, register the screen with the print extension, - * and put the default command/header properties on it. - */ -/*ARGSUSED*/ - -Bool -PsCreateWindow(WindowPtr pWin) -{ - PsWindowPrivPtr pPriv; - -#if 0 - Bool status = Success; - ScreenPtr pScreen = pWin->drawable.pScreen; - PsScreenPrivPtr pScreenPriv = (PsScreenPrivPtr) - dixLookupPrivate(&pScreen->devPrivates, PsScreenPrivateKey); - PsWindowPrivPtr pWinPriv = (PsWindowPrivPtr) - dixLookupPrivate(&pWin->devPrivates, PsWindowPrivateKey); - - /* - * Initialize this window's private struct. - */ - pWinPriv->jobFileName = (char *)NULL; - pWinPriv->pJobFile = (FILE *)NULL; - pWinPriv->pageFileName = (char *)NULL; - pWinPriv->pPageFile = (FILE *)NULL; - - if(pWin->parent == (WindowPtr)NULL) /* root window? */ - { - Atom propName; /* type = XA_STRING */ - char *propVal; - int i; - XrmDatabase rmdb = pScreenPriv->resDB; - - /* - * Put the defaults spec'd in the config files in properties on this - * screen's root window. - */ - for(i = 0; propStrings[i] != (char *)NULL; i++) - { - if((propVal = _DtPrintGetPrinterResource(pWin, rmdb, - propStrings[i])) != - (char *)NULL) - { - propName = MakeAtom(propStrings[i], strlen(propStrings[i]), - TRUE); - dixChangeWindowProperty(serverClient, pWin, propName, XA_STRING, - 8, PropModeReplace, strlen(propVal), - (pointer)propVal, FALSE); - xfree(propVal); - } - } - } - - return status; -#endif - - pPriv = (PsWindowPrivPtr) - dixLookupPrivate(&pWin->devPrivates, PsWindowPrivateKey); - pPriv->validContext = 0; - - return TRUE; -} - - -/*ARGSUSED*/ -Bool PsMapWindow(WindowPtr pWindow) -{ - return TRUE; -} - -/*ARGSUSED*/ -Bool -PsPositionWindow( - WindowPtr pWin, - int x, - int y) -{ - return TRUE; -} - -/*ARGSUSED*/ -Bool -PsUnmapWindow(WindowPtr pWindow) -{ - return TRUE; -} - -/*ARGSUSED*/ -void -PsCopyWindow( - WindowPtr pWin, - DDXPointRec ptOldOrg, - RegionPtr prgnSrc) -{ -} - -/*ARGSUSED*/ -Bool -PsChangeWindowAttributes( - WindowPtr pWin, - unsigned long mask) -{ - return TRUE; -} - -/*ARGSUSED*/ -Bool -PsDestroyWindow(WindowPtr pWin) -{ - return TRUE; -} diff --git a/hw/xprint/ps/psout.c b/hw/xprint/ps/psout.c deleted file mode 100644 index c24f88b3d..000000000 --- a/hw/xprint/ps/psout.c +++ /dev/null @@ -1,1789 +0,0 @@ -/* - -Copyright 1996, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* - * (c) Copyright 1996 Hewlett-Packard Company - * (c) Copyright 1996 International Business Machines Corp. - * (c) Copyright 1996, 2000 Sun Microsystems, Inc. All Rights Reserved. - * (c) Copyright 1996 Novell, Inc. - * (c) Copyright 1996 Digital Equipment Corp. - * (c) Copyright 1996 Fujitsu Limited - * (c) Copyright 1996 Hitachi, Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the names of the copyright holders - * shall not be used in advertising or otherwise to promote the sale, use - * or other dealings in this Software without prior written authorization - * from said copyright holders. - */ - -/******************************************************************* -** -** ********************************************************* -** * -** * File: psout.c -** * -** * Contents: Code to output PostScript to file -** * -** * Created By: Roger Helmendach (Liberty Systems) -** * -** * Copyright: Copyright 1996 The Open Group, Inc. -** * -** ********************************************************* -** -********************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "os.h" -#define USE_PSOUT_PRIVATE 1 -#include "Ps.h" -#include "psout.h" -#ifdef XP_USE_FREETYPE -#include -#include FT_FREETYPE_H -#endif /* XP_USE_FREETYPE */ -/* For VENDOR_STRING and VENDOR_RELEASE */ -#include "site.h" - -/* - * Standard definitions - */ - -static char *S_StandardDefs = "\ -/d{def}bind def\ -/b{bind}bind d\ -/bd{b d}b d\ -/x{exch}bd\ -/xd{x d}bd\ -/dp{dup}bd\ -/t{true}bd\ -/f{false}bd\ -/p{pop}bd\ -/r{roll}bd\ -/c{copy}bd\ -/i{index}bd\ -/rp{repeat}bd\ -/n{newpath}bd\ -/w{setlinewidth}bd\ -/lc{setlinecap}bd\ -/lj{setlinejoin}bd\ -/sml{setmiterlimit}bd\ -/ds{setdash}bd\ -/ie{ifelse}bd\ -/len{length}bd\ -/m{moveto}bd\ -/rm{rmoveto}bd\ -/l{lineto}bd\ -/rl{rlineto}bd\ -/a{arc}bd\ -/an{arcn}bd\ -/st{stroke}bd\ -/fl{fill}bd\ -/ef{eofill}bd\ -/sp{showpage}bd\ -/cp{closepath}bd\ -/clp{clippath}bd\ -/cl{clip}bd\ -/pb{pathbbox}bd\ -/tr{translate}bd\ -/rt{rotate}bd\ -/dv{div}bd\ -/ml{mul}bd\ -/ad{add}bd\ -/ng{neg}bd\ -/scl{scale}bd\ -/sc{setrgbcolor}bd\ -/g{setgray}bd\ -/gs{gsave}bd\ -/gr{grestore}bd\ -/sv{save}bd\ -/rs{restore}bd\ -/mx{matrix}bd\ -/cm{currentmatrix}bd\ -/sm{setmatrix}bd\ -/ccm{concatmatrix}bd\ -/cc{concat}bd\ -/ff{findfont}bd\ -/mf{makefont}bd\ -/sf{setfont}bd\ -/cft{currentfont}bd\ -/fd{FontDirectory}bd\ -/sh{show}bd\ -/stw{stringwidth}bd\ -/ci{colorimage}bd\ -/ig{image}bd\ -/im{imagemask}bd\ -/cf{currentfile}bd\ -/rh{readhexstring}bd\ -/str{string}bd\ -/al{aload}bd\ -/wh{where}bd\ -/kn{known}bd\ -/stp{stopped}bd\ -/bg{begin}bd\ -/ed{end}bd\ -/fa{forall}bd\ -/pi{putinterval}bd\ -/mk{mark}bd\ -/ctm{cleartomark}bd\ -/df{definefont}bd\ -/cd{currentdict}bd\ -/db{20 dict dp bg}bd\ -/de{ed}bd\ -/languagelevel wh{p languagelevel}{1}ie\ - 1 eq{/makepattern{p}bd/setpattern{p}bd/setpagedevice{p}bd}if\ -/mp{makepattern}bd\ -/spt{setpattern}bd\ -/spd{setpagedevice}bd\ -" -#ifdef XP_USE_FREETYPE -"/trmoveto{currentfont /FontMatrix get transform rm}d" -#endif /* XP_USE_FREETYPE */ -; - -/* - * Composite definitions - * - * - * XYr - Return X/Y dpi for device - * - * XYr - * - * Cs - Coordinate setup (for origin upper left) - * - * Cs - * - * P - Draw a point - * - * P - * - * R - Add rectangle to path - * - * R - * - * Ac - Add arc to path - * - * Ac - * - * An - Add arc to path (counterclockwise) - * - * An - * - * Tf - Set font - * - * Tf - * - * Tfm - Set font with matrix - * - * Tfm - * - * T - Draw text - * - * T - * - * Tb - Draw text with background color - * - * Tb - * - * Im1 - Image 1 bit monochrome imagemask - * - * Im1 - * - * Im24 - Image 24 bit RGB color - * - * Im24 - * - * Im1t - Image 1 bit monochrome imagemask (in tile) - * - * Im1t - * - * Im24t - Image 24 bit RGB color (in tile) - * - * Im24t - */ - -static char *S_CompositeDefs = "\ -/XYr{/currentpagedevice wh\ - {p currentpagedevice dp /HWResolution kn\ - {/HWResolution get al p}{p 300 300}ie}{300 300}ie}bd\ -/Cs{dp 0 eq{0 pHt tr XYr -1 x dv 72 ml x 1 x dv 72 ml x scl}if\ - dp 1 eq{90 rt XYr -1 x dv 72 ml x 1 x dv 72 ml x scl}if\ - dp 2 eq{pWd 0 tr XYr 1 x dv 72 ml x -1 x dv 72 ml x scl}if\ - 3 eq{pHt pWd tr 90 rt XYr 1 x dv 72 ml x -1 x dv 72 ml x scl}if}bd\ -/P{gs 1 w [] 0 ds 2 c m .1 ad x .1 ad x l st gr}bd\ -/R{4 2 r m 1 i 0 rl 0 x rl ng 0 rl cp}bd\ -/Ac{mx_ cm p 6 -2 r tr 4 2 r ng scl 0 0 .5 5 3 r a mx_ sm}bd\ -/An{mx_ cm p 6 -2 r tr 4 2 r ng scl 0 0 .5 5 3 r an mx_ sm}bd\ -/ISO{dp len dict bg{1 i/FID ne{d}{p p}ie}fa\ - /Encoding ISOLatin1Encoding d cd ed df}bd\ -/iN{dp len str cvs dp len x 1 i 3 ad str 2 c c p x p dp 3 -1 r(ISO)pi}bd\ -/Tp{{x dp iN dp fd x kn{x p dp/f_ x d ff}{dp/f_ x d x ff ISO}ie x}\ - {x dp/f_ x d ff x}ie}bd\ -/Tf{Tp[x 0 0 2 i ng 0 0] dp/fm_ x d mf sf}bd\ -/Tfm{Tp 1 -1 tm1_ scl tm2_ ccm dp/fm_ x d mf sf}bd\ -/T{m sh}bd\ -/Tb{gs sc f_ ff sf cft/FontMatrix get 3 get\ - cft/FontBBox get dp 1 get x 3 get 2 i ml 3 1 r ml\ - 0 0 m 4 i stw p 4 i 4 i m fm_ cc\ - 0 2 i rl dp 0 rl 0 2 i ng rl 0 3 i rl ng 0 rl cp fl p p\ - gr T}bd\ -/Im1{6 4 r tr scl t [3 i 0 0 5 i 0 0]{cf str1 rh p} im}bd\ -/Im1rev{6 4 r tr scl f [3 i 0 0 5 i 0 0]{cf str1 rh p} im}bd\ -/Im24{gs 6 4 r tr scl 8 [3 i 0 0 5 i 0 0]{cf str3 rh p} f 3 ci}bd\ -/Im1t{6 4 r tr scl t [3 i 0 0 5 i 0 0]{} im}bd\ -/Im24t{gs 6 4 r tr scl 8 [3 i 0 0 5 i 0 0]{} f 3 ci}bd\ -/ck2{/currentpagedevice wh \ -{p dp currentpagedevice dp 3 -1 r kn \ -{x get al p 3 -1 r eq 3 1 r eq and } \ -{p p p p t}ie} \ -{p p p t}ie}bd \ -/ck1{/currentpagedevice wh \ -{p dp currentpagedevice dp 3 -1 r kn \ -{x get eq} {p p p t}ie} \ -{p p t}ie}bd \ -/mtx{scl t [3 i 0 0 5 i 0 0]}bd \ -"; - -char *pg_orient[] = {"Portrait","Landscape","Reverse Portrait","Reverse Landscape"}; -/* - * Setup definitions - */ - -static char *S_SetupDefs = "\ - /mx_ mx d\ - /im_ mx d\ - /tm1_ mx d\ - /tm2_ mx d\ - /str3 3 str d\ - /str1 1 str d\ -"; - -/******************************************************************* - * PRIVATE FUNCTIONS * - *******************************************************************/ - -void -S_Flush(PsOutPtr self) -{ - int len; - - if( self->Buf[0] == '\0' ) - return; - - len = strlen(self->Buf); - - /* Append a newline char ('\n') if there isn't one there already */ - if( self->Buf[len-1] != '\n' ) - { - self->Buf[len++] = '\n'; - self->Buf[len] = '\0'; - } - - (void)fwrite(self->Buf, len, 1, self->Fp); - - self->Buf[0] = '\0'; -} - -static void -S_Comment(PsOutPtr self, char *comment) -{ - S_Flush(self); - strcpy(self->Buf, comment); - S_Flush(self); -} - -static void -S_OutDefs(PsOutPtr self, char *defs) -{ - int i, k=0; - S_Flush(self); - memset(self->Buf, 0, sizeof(self->Buf)); - for( i=0 ; defs[i]!='\0' ;) - { - if( k>70 && (i==0 || (i && defs[i-1]!='/')) && - (defs[i]==' ' || defs[i]=='/' || defs[i]=='{') ) - { - S_Flush(self); - k = 0; - memset(self->Buf, 0, sizeof(self->Buf)); - } - if( k && self->Buf[k-1]==' ' && defs[i]==' ' ) { i++; continue; } - self->Buf[k] = defs[i]; - k++; i++; - } - S_Flush(self); -} - -void -S_OutNum(PsOutPtr self, float num) -{ - int i; - char buf[64]; - int len; - - sprintf(buf, "%.3f", num); - - /* Remove any zeros at the end */ - for( i=strlen(buf)-1 ; buf[i]=='0' ; i-- ); buf[i+1] = '\0'; - /* Remove '.' if it is the last character */ - i = strlen(buf)-1; if( buf[i]=='.' ) buf[i] = '\0'; - - len = strlen(self->Buf); - if( len > 0 ) - { - self->Buf[len++] = ' '; - self->Buf[len] = '\0'; - } - strcpy(&self->Buf[len], buf); - if( (len+i)>70 ) S_Flush(self); -} - -static void -S_OutStr(PsOutPtr self, char *txt, int txtl) -{ - int i, k; - char buf[1024]; - for( i=0,k=0 ; i=' ' && txt[i]<='~') && - txt[i]!='(' && txt[i]!=')' && txt[i]!='\\' ) - { buf[k] = txt[i]; k++; continue; } - buf[k] = '\\'; k++; - sprintf(&buf[k], "%03o", txt[i]&0xFF); - /* Skip to the end of the buffer */ - while( buf[k] != '\0' ) - k++; - } - strcat(self->Buf, "("); - i = strlen(self->Buf); - memcpy(&self->Buf[i], buf, k); - self->Buf[i+k] = '\0'; - strcat(self->Buf, ")"); - if( strlen(self->Buf)>70 ) S_Flush(self); -} - -/* Same as S_OutStr() but takes |short *| instead of |char *| */ -static void -S_OutStr16(PsOutPtr self, unsigned short *txt, int txtl) -{ - int i, k; - char buf[2048]; - for( i=0,k=0 ; i=' ' && txt[i]<='~') && - txt[i]!='(' && txt[i]!=')' && txt[i]!='\\' ) - { buf[k] = txt[i]; k++; continue; } - buf[k] = '\\'; k++; - sprintf(&buf[k], "%03o", txt[i]&0xFFFF); - /* Skip to the end of the buffer */ - while( buf[k] != '\0' ) - k++; - } - strcat(self->Buf, "("); - i = strlen(self->Buf); - memcpy(&self->Buf[i], buf, k); - self->Buf[i+k] = '\0'; - strcat(self->Buf, ")"); - if( strlen(self->Buf)>70 ) S_Flush(self); -} - -void -S_OutTok(PsOutPtr self, char *tok, int cr) -{ - int len = strlen(self->Buf); - if( len > 0 ) - { - self->Buf[len++] = ' '; - self->Buf[len] = '\0'; - } - strcpy(&self->Buf[len], tok); - if( cr ) S_Flush(self); -} - -static void -S_Color(PsOutPtr self, PsOutColor clr) -{ - int ir, ig, ib; - ir = PSOUTCOLOR_TO_REDBITS(clr); - ig = PSOUTCOLOR_TO_GREENBITS(clr); - ib = PSOUTCOLOR_TO_BLUEBITS(clr); - if( ir==ig && ig==ib ) - { S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir)); S_OutTok(self, "g", 1); } - else - { - S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir)); - S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ig)); - S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ib)); - S_OutTok(self, "sc", 1); - } -} - -static void -S_SetPageDevice(PsOutPtr self, int orient, int count, int plex, int res, - int wd, int ht, int isPage) -{ - float fwd = ((float)wd/(float)res)*72.; - float fht = ((float)ht/(float)res)*72.; - -#define USE_WORKAROUND_COPY_COUNT_BUG 1 - -#ifdef USE_WORKAROUND_COPY_COUNT_BUG - /* Workaround (see http://xprint.mozdev.org/bugs/show_bug.cgi?id=1861 - - * 'Need workaround for bug 1378 ...') to avoid that we print n^2 copies - * instead of n copies. - * The problem is that we use both /NumCopies here but pass the - * %copy-count% to the spooler, too. - * But we only have to use _one_ way... - * - * The final fix for bug 1378 (http://xprint.mozdev.org/bugs/show_bug.cgi?id=1378 - - * "PS DDX creates n^2 copies of a job instead of n copies") will back this - * workaround out and replace it with a better solution. - * (see mozilla.org bug 140030 - * (http://bugzilla.mozilla.org/show_bug.cgi?id=140030 - "Setting number - * of copies causes too many copies to print") for the initial report for - * this issue...) - */ - count = 1; -#endif /* USE_WORKAROUND_COPY_COUNT_BUG */ - - S_OutTok(self, "/pWd", 0); - S_OutNum(self, fwd); - S_OutTok(self, "d /pHt", 0); - S_OutNum(self, fht); - S_OutTok(self, "d", 1); - - /* - * if these are page attributes, have PostScript check to see if they - * have changed. If not, don't do setpagedevice, since it will cause - * a page flush and screw up duplex printing. Having PostScript check - * means we don't have to keep track ourselves. - */ - if(isPage) { - S_OutNum(self, (float) orient); - S_OutTok(self, "/Orientation ck1", 0); - S_OutTok(self, "pWd pHt /PageSize ck2 and not {", 1); - } - S_OutTok(self, "{db", 0); - - S_OutTok(self, "/Orientation", 0); - S_OutNum(self, (float) orient); - S_OutTok(self, " d ", 0); - S_OutTok(self, "/PageSize [pWd pHt] d", 0); - - S_OutTok(self, " de spd", 0); - /* - * save a flag to show if we failed to set orientation... determined - * by both/either Orientation and/or PageSize, use this - * later to set/not set orientation using Cs command. - */ - S_OutTok(self,"}stp /orientationFailed x d", 1); - /* - * if these are page attributes, have PostScript check to see if they - * have changed. If not, don't do setpagedevice, since it will cause - * a page flush and screw up duplex printing. Having PostScript check - * means we don't have to keep track ourselves. - */ - if(isPage) - { - S_OutTok(self,"}if",1); - - S_OutTok(self, (plex==0)?"f":"t", 0); - S_OutTok(self, "/Duplex ck1 ", 0); - - S_OutTok(self, (plex==2)?"t":"f", 0); - S_OutTok(self, "/Tumble ck1 and ", 0); - - - S_OutNum(self, (float)res); - S_OutNum(self, (float)res); - S_OutTok(self, " /HWResolution ck2 and", 0); - - if( count>1 ) - { - S_OutNum(self, (float)count); - S_OutTok(self, " /NumCopies", 0); - S_OutTok(self, " ck1 and ", 0); - } - S_OutTok(self," not {",1); - } - S_OutTok(self, "{db", 0); - - S_OutTok(self, "/Duplex ", 0); - S_OutTok(self, (plex==0)?"f":"t", 0); - S_OutTok(self, " d ", 0); - - S_OutTok(self, "/Tumble ", 0); - S_OutTok(self, (plex==2)?"t":"f", 0); - S_OutTok(self, " d ", 0); - - S_OutTok(self, " /HWResolution [", 0); - S_OutNum(self, (float)res); - S_OutNum(self, (float)res); - S_OutTok(self, "] d ", 0); - - if( count>1 ) - { - S_OutTok(self, " /NumCopies", 0); - S_OutNum(self, (float)count); - S_OutTok(self, " d ", 0); - } - S_OutTok(self, " de spd}stp p", 1); - - if(isPage) - { - S_OutTok(self, "}if", 1); - } -} - -/******************************************************************* - * PUBLIC FUNCTIONS * - *******************************************************************/ - -FILE * -PsOut_ChangeFile(PsOutPtr self, FILE *fp) -{ - FILE *nfp; - - nfp = self->Fp; - - self->Fp = fp; - - return nfp; -} - -PsOutPtr -PsOut_BeginFile(FILE *fp, char *title, int orient, int count, int plex, int res, - int wd, int ht, Bool raw) -{ - int i; - char buffer[256+32]; /* enougth space for a title with 256 chars... */ -/* - * Get ready to output PostScript header - */ - PsOutPtr psout; - psout = (PsOutPtr)xalloc(sizeof(PsOutRec)); - memset(psout, 0, sizeof(PsOutRec)); - psout->Fp = fp; - psout->isRaw = raw; - psout->pagenum = 0; - - if (!raw) { -/* - * Output PostScript header - */ - /* GhostScript will rant about the missing BoundingBox if we use - * "%!PS-Adobe-3.0 EPSF-3.0" here... */ - S_Comment(psout, "%!PS-Adobe-3.0"); -#ifdef XP_USE_FREETYPE - { - FT_Int ftmajor = 0, - ftminor = 0, - ftpatch = 0; - extern FT_Library ftypeLibrary; /* defined in xc/lib/font/FreeType/ftfuncs.c */ - - FT_Library_Version(ftypeLibrary, &ftmajor, &ftminor, &ftpatch); - sprintf(buffer, - "%%%%Creator: The X Print Server's PostScript DDX " - "(%s, release %d, FreeType version %d.%d.%d)", - VENDOR_STRING, VENDOR_RELEASE, - (int)ftmajor, (int)ftminor, (int)ftpatch); - } -#else - sprintf(buffer, - "%%%%Creator: The X Print Server's PostScript DDX (%s, release %d)", - VENDOR_STRING, VENDOR_RELEASE); -#endif /* XP_USE_FREETYPE */ - S_Comment(psout, buffer); - - if (title) - { - sprintf(buffer, "%%%%Title: %.256s", title); - S_Comment(psout, buffer); - } - S_Comment(psout, "%%EndComments"); - S_Comment(psout, "%%BeginProlog"); - S_Comment(psout, "%%BeginProcSet: XServer_PS_Functions"); - S_OutDefs(psout, S_StandardDefs); - S_OutDefs(psout, S_CompositeDefs); - S_Comment(psout, "%%EndProcSet"); - S_Comment(psout, "%%EndProlog"); - S_Comment(psout, "%%BeginSetup"); - /* set document level page attributes */ - S_SetPageDevice(psout, orient, count, plex, res, wd, ht, 0); - S_Comment(psout, "%%Pages: atend"); - S_OutDefs(psout, S_SetupDefs); - S_Comment(psout, "%%EndSetup"); - } -/* - * Initialize the structure - */ - psout->CurColor = PSOUTCOLOR_NOCOLOR; - psout->LineWidth = 1; - psout->LineCap = PsCButt; - psout->LineJoin = PsJMiter; - psout->NDashes = 0; - psout->Dashes = (int *)0; - psout->FontName = (char *)0; - psout->FontSize = 0; - psout->start_image = 0; - for( i=0 ; i<4 ; i++ ) psout->FontMtx[i] = 0.; - psout->ImageFormat = 0; - return(psout); -} - -void -PsOut_EndFile(PsOutPtr self, int closeFile) -{ - char coms[50]; - - if (!self) - return; - - if (!self->isRaw) { - S_Comment(self,"%%Trailer"); - sprintf(coms,"%%%%Pages: %d", self->pagenum); - S_Comment(self, coms); - S_Comment(self, "%%EOF"); - } - if( self->NDashes && self->Dashes ) xfree(self->Dashes); - if( self->FontName ) xfree(self->FontName); - if( self->Patterns ) xfree(self->Patterns); - if( self->Clip.rects ) xfree(self->Clip.rects); - if( closeFile ) fclose(self->Fp); - xfree(self); -} - -void -PsOut_BeginPage(PsOutPtr self, int orient, int count, int plex, int res, - int wd, int ht) -{ - char coms[50]; - -/*** comment for pagenumbers *****/ - - S_Comment(self,"%%PageHeader"); - self->pagenum++; - sprintf(coms,"%%%%Page: %d %d", self->pagenum, self->pagenum); - S_Comment(self, coms); - sprintf(coms,"%%%%PageOrientation: %s",pg_orient[orient]); - S_Comment(self, coms); - -/*** end comment *****************/ - - /* set page level page attributes */ - S_SetPageDevice(self, orient, count, plex, res, wd, ht, 1); - - S_OutTok(self, "gs ", 0); - /* - * check to see if we set orientation already; if it wasn't set, - * use Cs to set orientation here. - */ - S_OutNum(self, (float)orient); - S_OutTok(self, "orientationFailed { ", 0); - S_OutNum(self, (float)orient); - S_OutTok(self, " } { 0 }ie Cs 100 sml gs", 1); -} - -void -PsOut_EndPage(PsOutPtr self) -{ - S_OutTok(self, "gr gr sp", 1); - - /* did grestore: mark attributes 'dirty' so they will be re-sent */ - PsOut_DirtyAttributes(self); - -/*** comment for pagenumbers *****/ - - S_Comment(self,"%%PageTrailer"); - -/*** end comment *****************/ -} - -void -PsOut_DirtyAttributes(PsOutPtr self) -{ - int i; - self->CurColor = PSOUTCOLOR_NOCOLOR; - self->LineWidth = -1; - self->LineCap = (PsCapEnum)-1; - self->LineJoin = (PsJoinEnum)-1; - self->NDashes = -1; - self->FontSize = -1; - for( i=0 ; i<4 ; i++ ) self->FontMtx[i] = -1.; - if( self->Dashes ) { xfree(self->Dashes); self->Dashes = (int *)0; } - if( self->FontName ) { xfree(self->FontName); self->FontName = (char *)0; } -} - -void -PsOut_Comment(PsOutPtr self, char *comment) -{ - S_Comment(self, comment); -} - -void -PsOut_Offset(PsOutPtr self, int x, int y) -{ - self->XOff = x; - self->YOff = y; -} - -void -PsOut_Clip(PsOutPtr self, int clpTyp, PsClipPtr clpinf) -{ - int i, k; - int changed = 0; - int xo = self->XOff; - int yo = self->YOff; - - if( self->InTile ) return; - if( self->InFrame ) xo = yo = 0; - if( clpTyp!=self->ClipType ) changed = 1; - else - { - if( clpinf->nRects!=self->Clip.nRects ) changed = 1; - else - { - if( clpinf->nOutterClips!=self->Clip.nOutterClips ) changed = 1; - else - { - for( i=0 ; inOutterClips ; i++ ) - { - if( memcmp(&clpinf->outterClips[i], &self->Clip.outterClips[i], - sizeof(PsRectRec))!=0 ) break; - } - if( inOutterClips ) changed = 1; - else - { - for( i=0 ; inRects ; i++ ) - { - if( memcmp(&clpinf->rects[i], &self->Clip.rects[i], - sizeof(PsRectRec))!=0 ) { changed = 1; break; } - } - } - } - } - if( clpinf->nElms!=self->Clip.nElms ) changed = 1; - else - { - for( i=0 ; inElms ; i++ ) - { - if( clpinf->elms[i].type!=PSOUT_POINTS ) - { - if( memcmp(&clpinf->elms[i], &self->Clip.elms[i], - sizeof(PsElmRec))!=0 ) { changed = 1; break; } - } - else - { - if( clpinf->elms[i].type!=self->Clip.elms[i].type || - clpinf->elms[i].nPoints!=self->Clip.elms[i].nPoints ) - { changed = 1; break; } - else - { - for( k=0 ; kelms[i].nPoints ; k++ ) - { - if( memcmp(&clpinf->elms[i].c.points[k], - &self->Clip.elms[i].c.points[k], sizeof(PsPointRec)) ) - { changed = 1; break; } - } - if( changed ) break; - } - } - } - } - } - - if( self->Clip.rects ) xfree(self->Clip.rects); - if( self->Clip.outterClips ) xfree(self->Clip.outterClips); - if( self->Clip.elms ) - PsDestroyFillElementList(self->Clip.nElms, self->Clip.elms); - self->ClipType = clpTyp; - self->Clip.nRects = clpinf->nRects; - self->Clip.nElms = clpinf->nElms; - self->Clip.nOutterClips = clpinf->nOutterClips; - if( clpinf->nRects ) - { - self->Clip.rects = (PsRectPtr)xalloc(clpinf->nRects*sizeof(PsRectRec)); - memcpy(self->Clip.rects, clpinf->rects, clpinf->nRects*sizeof(PsRectRec)); - } - else self->Clip.rects = 0; - if( clpinf->nOutterClips ) - { - self->Clip.outterClips = (PsRectPtr)xalloc(clpinf->nOutterClips* - sizeof(PsRectRec)); - memcpy(self->Clip.outterClips, clpinf->outterClips, - clpinf->nOutterClips*sizeof(PsRectRec)); - } - else self->Clip.outterClips = 0; - if( clpinf->nElms ) - self->Clip.elms = PsCloneFillElementList(clpinf->nElms, clpinf->elms); - else self->Clip.elms = 0; - - PsOut_DirtyAttributes(self); - S_OutTok(self, "gr gs", 1); - if( self->Clip.nOutterClips ) - { - for( i=0 ; iClip.nOutterClips ; i++ ) - { - S_OutNum(self, (float)(self->Clip.outterClips[i].x)); - S_OutNum(self, (float)(self->Clip.outterClips[i].y)); - S_OutNum(self, (float)self->Clip.outterClips[i].w); - S_OutNum(self, (float)self->Clip.outterClips[i].h); - S_OutTok(self, "R", 1); - } - S_OutTok(self, "cl n", 1); - } - if( self->Clip.nRects ) - { - for( i=0 ; iClip.nRects ; i++ ) - { - S_OutNum(self, (float)(self->Clip.rects[i].x+xo)); - S_OutNum(self, (float)(self->Clip.rects[i].y+yo)); - S_OutNum(self, (float)self->Clip.rects[i].w); - S_OutNum(self, (float)self->Clip.rects[i].h); - S_OutTok(self, "R", 1); - } - S_OutTok(self, "cl n", 1); - } - if( self->Clip.nElms ) - { - PsElmPtr elm = self->Clip.elms; - for( i=0 ; iClip.nElms ; i++,elm++ ) - { - switch(elm->type) - { - case PSOUT_POINTS: - for( k=0 ; knPoints ; k++ ) - { - S_OutNum(self, (float)elm->c.points[k].x+xo); - S_OutNum(self, (float)elm->c.points[k].y+yo); - if( k==0 ) S_OutTok(self, "m", 0); - else S_OutTok(self, "l", 0); - } - S_OutTok(self, "cp", 1); - break; - case PSOUT_RECT: - S_OutNum(self, (float)elm->c.rect.x+xo); - S_OutNum(self, (float)elm->c.rect.y+yo); - S_OutNum(self, (float)elm->c.rect.w); - S_OutNum(self, (float)elm->c.rect.h); - S_OutTok(self, "R", 1); - break; - case PSOUT_ARC: - if( elm->c.arc.style==PsPieSlice ) - { - S_OutNum(self, (float)elm->c.arc.x+xo+(float)elm->c.arc.w/2.); - S_OutNum(self, (float)elm->c.arc.y+yo+(float)elm->c.arc.h/2.); - S_OutTok(self, "m", 0); - } - S_OutNum(self, (float)elm->c.arc.x+xo+(float)elm->c.arc.w/2.); - S_OutNum(self, (float)elm->c.arc.y+yo+(float)elm->c.arc.h/2.); - S_OutNum(self, (float)elm->c.arc.w); - S_OutNum(self, (float)elm->c.arc.h); - S_OutNum(self, (float)elm->c.arc.a1/64.); - S_OutNum(self, (float)elm->c.arc.a1/64.+(float)elm->c.arc.a2/64.); - if( elm->c.arc.a2<0 ) S_OutTok(self, "An cp", 1); - else S_OutTok(self, "Ac cp", 1); - break; - } - } - S_OutTok(self, "cl n", 1); - } -} - -void -PsOut_Color(PsOutPtr self, PsOutColor clr) -{ - if( clr==self->CurColor || self->InTile>=PsStip ) return; - self->CurColor = clr; - S_Color(self, clr); -} - -void -PsOut_FillRule(PsOutPtr self, PsRuleEnum rule) -{ - self->FillRule = rule; -} - -void -PsOut_LineAttrs(PsOutPtr self, int wd, PsCapEnum cap, PsJoinEnum join, - int nDsh, int *dsh, int dshOff, PsOutColor bclr) -{ - int i; - int same = 1; - - if( wd!=self->LineWidth && wd>=0 ) - { - if( wd==0 ) wd = 1; - self->LineWidth = wd; - S_OutNum(self, (float)wd); S_OutTok(self, "w", 1); - } - if( cap!=self->LineCap ) - { - self->LineCap = cap; - S_OutNum(self, (float)cap); S_OutTok(self, "lc", 1); - } - if( join!=self->LineJoin ) - { - self->LineJoin = join; - S_OutNum(self, (float)join); S_OutTok(self, "lj", 1); - } - if( nDsh!=self->NDashes ) same = 0; - else if( dshOff!=self->DashOffset ) same = 0; - else if( nDsh ) - { - for( i=0 ; iDashes[i] ) break; } - if( iNDashes && self->Dashes ) - { xfree(self->Dashes); self->Dashes = (int *)0; } - self->NDashes = nDsh; - self->DashOffset = dshOff; - if( nDsh ) self->Dashes = (int *)xalloc(sizeof(int)*nDsh); - S_OutTok(self, "[", 0); - for( i=0 ; iDashes[i] = dsh[i]; - S_OutNum(self, (float)dsh[i]); - } - S_OutTok(self, "]", 0); - S_OutNum(self, (float)dshOff); - S_OutTok(self, "ds", 1); - } - - if( nDsh ) - self->LineBClr = bclr; - else - bclr = PSOUTCOLOR_NOCOLOR; -} - -void -PsOut_TextAttrs(PsOutPtr self, char *fnam, int siz, int iso) -{ - int i; - char buf[256]; - if( self->FontName && strcmp(fnam, self->FontName)==0 && - siz==self->FontSize ) return; - if( self->FontName ) xfree(self->FontName); - self->FontName = (char *)xalloc(strlen(fnam)+1); - strcpy(self->FontName, fnam); - self->FontSize = siz; - for( i=0 ; i<4 ; i++ ) self->FontMtx[i] = -1.; - strcpy(buf, "/"); strcat(buf, fnam); - S_OutTok(self, buf, 0); - S_OutNum(self, (float)siz); - if( iso ) S_OutTok(self, "t", 0); - else S_OutTok(self, "f", 0); - S_OutTok(self, "Tf", 1); -} - -void -PsOut_TextAttrsMtx(PsOutPtr self, char *fnam, float *mtx, int iso) -{ - int i; - char buf[256]; - if( self->FontName && strcmp(fnam, self->FontName)==0 && - mtx[0]==self->FontMtx[0] && mtx[1]==self->FontMtx[1] && - mtx[2]==self->FontMtx[2] && mtx[3]==self->FontMtx[3] ) return; - if( self->FontName ) xfree(self->FontName); - self->FontName = (char *)xalloc(strlen(fnam)+1); - strcpy(self->FontName, fnam); - for( i=0 ; i<4 ; i++ ) self->FontMtx[i] = mtx[i]; - self->FontSize = -1; - strcpy(buf, "/"); strcat(buf, fnam); strcat(buf, " ["); - S_OutTok(self, buf, 0); - for( i=0 ; i<4 ; i++ ) S_OutNum(self, mtx[i]); - S_OutTok(self, "0 0]", 0); - if( iso ) S_OutTok(self, "t", 0); - else S_OutTok(self, "f", 0); - S_OutTok(self, "Tfm", 1); -} - -void -PsOut_Polygon(PsOutPtr self, int nPts, PsPointPtr pts) -{ - int i; - int xo = self->XOff; - int yo = self->YOff; - - if( self->InFrame || self->InTile ) xo = yo = 0; - if( nPts<=2 ) return; - for( i=0 ; iFillRule==PsEvenOdd ) S_OutTok(self, "cp ef", 1); - else S_OutTok(self, "cp fl", 1); -} - -void -PsOut_FillRect(PsOutPtr self, int x, int y, int w, int h) -{ - int xo = self->XOff; - int yo = self->YOff; - - if( self->InFrame || self->InTile ) xo = yo = 0; - x += xo; y += yo; - S_OutNum(self, (float)x); - S_OutNum(self, (float)y); - S_OutNum(self, (float)w); - S_OutNum(self, (float)h); - S_OutTok(self, "R fl", 1); -} - -void -PsOut_FillArc(PsOutPtr self, int x, int y, int w, int h, - float ang1, float ang2, PsArcEnum style) -{ - int xo = self->XOff; - int yo = self->YOff; - - if( self->InFrame || self->InTile ) xo = yo = 0; - x += xo; y += yo; - if( style==PsPieSlice ) - { - S_OutNum(self, (float)x+(float)w/2.); - S_OutNum(self, (float)y+(float)h/2.); - S_OutTok(self, "m", 0); - } - S_OutNum(self, (float)x+(float)w/2.); - S_OutNum(self, (float)y+(float)h/2.); - S_OutNum(self, (float)w); - S_OutNum(self, (float)h); - S_OutNum(self, ang1); - S_OutNum(self, ang1+ang2); - if( ang2<0 ) S_OutTok(self, "An cp fl", 1); - else S_OutTok(self, "Ac cp fl", 1); -} - -void -PsOut_Lines(PsOutPtr self, int nPts, PsPointPtr pts) -{ - int i; - int xo = self->XOff; - int yo = self->YOff; - - if( self->InFrame || self->InTile ) xo = yo = 0; - if( nPts<1 ) return; - for( i=0 ; iLineBClr != PSOUTCOLOR_NOCOLOR ) - { - S_OutTok(self, "gs", 0); - S_Color(self, self->LineBClr); - S_OutTok(self, "[] 0 ds st gr", 0); - } - S_OutTok(self, "st", 1); -} - -void -PsOut_Points(PsOutPtr self, int nPts, PsPointPtr pts) -{ - int i; - int xo = self->XOff; - int yo = self->YOff; - - if( self->InFrame || self->InTile ) xo = yo = 0; - if( nPts<1 ) return; - for( i=0 ; iXOff; - int yo = self->YOff; - - if( self->InFrame || self->InTile ) xo = yo = 0; - x += xo; y += yo; - S_OutNum(self, (float)x); - S_OutNum(self, (float)y); - S_OutNum(self, (float)w); - S_OutNum(self, (float)h); - S_OutTok(self, "R", 0); - if( self->LineBClr != PSOUTCOLOR_NOCOLOR ) - { - S_OutTok(self, "gs", 0); - S_Color(self, self->LineBClr); - S_OutTok(self, "[] 0 ds st gr", 0); - } - S_OutTok(self, "st", 1); -} - -void -PsOut_DrawArc(PsOutPtr self, int x, int y, int w, int h, - float ang1, float ang2) -{ - int xo = self->XOff; - int yo = self->YOff; - - if( self->InFrame || self->InTile ) xo = yo = 0; - x += xo; y += yo; - S_OutNum(self, (float)x+(float)w/2.); - S_OutNum(self, (float)y+(float)h/2.); - S_OutNum(self, (float)w); - S_OutNum(self, (float)h); - S_OutNum(self, ang1); - S_OutNum(self, ang1+ang2); - if( ang2<0 ) S_OutTok(self, "An", 0); - else S_OutTok(self, "Ac", 0); - if( self->LineBClr != PSOUTCOLOR_NOCOLOR ) - { - S_OutTok(self, "gs", 0); - S_Color(self, self->LineBClr); - S_OutTok(self, "[] 0 ds st gr", 0); - } - S_OutTok(self, "st", 1); -} - -void -PsOut_Text(PsOutPtr self, int x, int y, char *text, int textl, PsOutColor bclr) -{ - int xo = self->XOff; - int yo = self->YOff; - - if( self->InFrame || self->InTile ) xo = yo = 0; - x += xo; y += yo; - S_OutStr(self, text, textl); - S_OutNum(self, (float)x); - S_OutNum(self, (float)y); - if( bclr == PSOUTCOLOR_NOCOLOR ) - S_OutTok(self, "T", 1); - else - { - int ir = PSOUTCOLOR_TO_REDBITS(bclr); - int ig = PSOUTCOLOR_TO_GREENBITS(bclr); - int ib = PSOUTCOLOR_TO_BLUEBITS(bclr); - - S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir)); - S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ig)); - S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ib)); - S_OutTok(self, "Tb", 1); - } -} - -void -PsOut_Text16(PsOutPtr self, int x, int y, unsigned short *text, int textl, PsOutColor bclr) -{ - int xo = self->XOff; - int yo = self->YOff; - - if( self->InFrame || self->InTile ) xo = yo = 0; - x += xo; y += yo; - S_OutStr16(self, text, textl); - S_OutNum(self, (float)x); - S_OutNum(self, (float)y); - if( bclr == PSOUTCOLOR_NOCOLOR ) - S_OutTok(self, "T", 1); - else - { - int ir = PSOUTCOLOR_TO_REDBITS(bclr); - int ig = PSOUTCOLOR_TO_GREENBITS(bclr); - int ib = PSOUTCOLOR_TO_BLUEBITS(bclr); - S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir)); - S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ig)); - S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ib)); - S_OutTok(self, "Tb", 1); - } -} - -#ifdef BM_CACHE -void /* new */ -PsOut_ImageCache(PsOutPtr self, int x, int y, long cache_id, PsOutColor bclr, PsOutColor fclr) -{ - char cacheID[10]; - int xo = self->XOff; - int yo = self->YOff; - - if( self->InFrame || self->InTile ) xo = yo = 0; - x += xo; y += yo; - sprintf(cacheID, "c%di", cache_id); - - S_OutNum(self, (float)x); - S_OutNum(self, (float)y); - - if( fclr==PSOUTCOLOR_WHITE ) - { - int ir = PSOUTCOLOR_TO_REDBITS(bclr); - int ig = PSOUTCOLOR_TO_GREENBITS(bclr); - int ib = PSOUTCOLOR_TO_BLUEBITS(bclr); - - if( ir==ig && ig==ib ) - S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir)); - else - S_OutNum(self, (float)0); - self->RevImage = 1; - } - else - { - int ir = PSOUTCOLOR_TO_REDBITS(fclr); - int ig = PSOUTCOLOR_TO_GREENBITS(fclr); - int ib = PSOUTCOLOR_TO_BLUEBITS(fclr); - - if( ir==ig && ig==ib ) - S_OutNum(self, PSOUTCOLOR_BITS_TO_PSFLOAT(ir)); - else - S_OutNum(self, (float)0); - } - - S_OutTok(self, cacheID, 1); -} /* new */ - -void /* new */ -PsOut_BeginImageCache(PsOutPtr self, long cache_id) -{ - char cacheID[10]; - - sprintf(cacheID, "/c%di {", cache_id); - - S_OutTok(self, cacheID, 0); -} /* new */ - -void /* new */ -PsOut_EndImageCache(PsOutPtr self) -{ - S_OutTok(self, "}bd", 1); -} /* new */ -#endif - -void -PsOut_BeginImage(PsOutPtr self, PsOutColor bclr, PsOutColor fclr, int x, int y, - int w, int h, int sw, int sh, int format) -{ - PsOutColor savClr = self->CurColor; - int xo = self->XOff; - int yo = self->YOff; - - if( self->InFrame || self->InTile ) xo = yo = 0; - x += xo; y += yo; - if( self->InTile ) - { - if( self->InTile>=PsStip && format!=1 ) { self->ImgSkip = 1; return; } - self->ImgBClr = bclr; self->ImgFClr = fclr; - self->ImgX = x; self->ImgY = y; - self->ImgW = w; self->ImgH = h; - self->SclW = sw; self->SclH = sh; - S_OutTok(self, "<", 0); - self->ImageFormat = format; - self->RevImage = 0; - if( self->InTile==PsTile && format==1 && fclr==PSOUTCOLOR_WHITE ) - self->RevImage = 1; - return; - } - - self->RevImage = 0; - if( format==1 ) - { - S_OutTok(self, "gs", 0); - if( fclr==PSOUTCOLOR_WHITE ) - { - PsOut_Color(self, fclr); - PsOut_FillRect(self, x, y, sw, sh); - PsOut_Color(self, bclr); - self->RevImage = 1; - } - else - { - PsOut_Color(self, bclr); - PsOut_FillRect(self, x, y, sw, sh); - PsOut_Color(self, fclr); - } - } - S_OutNum(self, (float)x); - S_OutNum(self, (float)y); - S_OutNum(self, (float)w); - S_OutNum(self, (float)h); - S_OutNum(self, (float)sw); - S_OutNum(self, (float)sh); - if( format==1 ) { - if(self->RevImage) - S_OutTok(self, "Im1rev", 1); - else - S_OutTok(self, "Im1", 1); - } - else S_OutTok(self, "Im24", 1); - self->ImageFormat = format; - self->CurColor = savClr; -} - -void -PsOut_BeginImageIM(PsOutPtr self, PsOutColor bclr, PsOutColor fclr, int x, int y, - int w, int h, int sw, int sh, int format) -{ - PsOutColor savClr = self->CurColor; - int xo = self->XOff; - int yo = self->YOff; - - if( self->InFrame || self->InTile ) xo = yo = 0; - x += xo; y += yo; - if( self->InTile ) - { - if( self->InTile>=PsStip && format!=1 ) { self->ImgSkip = 1; return; } - self->ImgBClr = bclr; self->ImgFClr = fclr; - self->ImgX = x; self->ImgY = y; - self->ImgW = w; self->ImgH = h; - self->SclW = sw; self->SclH = sh; - S_OutTok(self, "<", 0); - self->ImageFormat = format; - self->RevImage = 0; - if( self->InTile==PsTile && format==1 && fclr==PSOUTCOLOR_WHITE ) - self->RevImage = 1; - return; - } - - self->RevImage = 0; - if( format==1 ) - { - S_OutTok(self, "gs", 0); -#ifdef BM_CACHE - S_OutTok(self, "g", 1); -#else - if( fclr==PSOUTCOLOR_WHITE ) - { - PsOut_Color(self, bclr); - self->RevImage = 1; - } - else - { - PsOut_Color(self, fclr); - } -#endif - } - -#ifdef BM_CACHE - S_OutTok(self, "tr", 0); /* new */ -#else - S_OutNum(self, (float)x); - S_OutNum(self, (float)y); -#endif - S_OutNum(self, (float)w); - S_OutNum(self, (float)h); - S_OutNum(self, (float)sw); - S_OutNum(self, (float)sh); -#ifdef BM_CACHE - S_OutTok(self, "mtx", 1); /* new */ - S_OutTok(self, "<", 0); /* new */ - self->start_image = 1; -#else - if( format==1 ){ - if(self->RevImage) - S_OutTok(self, "Im1rev", 1); - else - S_OutTok(self, "Im1", 1); - } - else S_OutTok(self, "Im24", 1); -#endif - self->ImageFormat = format; - self->CurColor = savClr; -} - -void -PsOut_EndImage(PsOutPtr self) -{ - if( self->ImgSkip ) { self->ImgSkip = 0; return; } - if( self->InTile ) - { - S_OutTok(self, ">", 1); - if( self->ImageFormat==1 && self->InTile==PsTile ) - { - if( self->ImgFClr==PSOUTCOLOR_WHITE ) - { - PsOut_Color(self, self->ImgFClr); - PsOut_FillRect(self, self->ImgX, self->ImgY, self->SclW, self->SclH); - PsOut_Color(self, self->ImgBClr); - } - else - { - PsOut_Color(self, self->ImgBClr); - PsOut_FillRect(self, self->ImgX, self->ImgY, self->SclW, self->SclH); - PsOut_Color(self, self->ImgFClr); - } - } - S_OutNum(self, (float)self->ImgX); - S_OutNum(self, (float)self->ImgY); - S_OutNum(self, (float)self->ImgW); - S_OutNum(self, (float)self->ImgH); - S_OutNum(self, (float)self->SclW); - S_OutNum(self, (float)self->SclH); - if( self->ImageFormat==1 ) S_OutTok(self, "Im1t", 1); - else S_OutTok(self, "Im24t", 1); - self->ImageFormat = 0; - self->RevImage = 0; - return; - } - /* - * Bug 4639307: Move flush before "> im" to get all of bitmap into ps file. - */ - S_Flush(self); -#ifdef BM_CACHE - if(self->start_image) - S_OutTok(self, "> im", 1); /* new */ -#endif - self->ImageFormat = 0; - self->RevImage = 0; -#ifdef BM_CACHE - if(self->start_image) - { - self->start_image = 0; - S_OutTok(self, "gr", 0); - } - else - S_OutTok(self, "gr", 1); -#else - S_OutTok(self, "gr", 1); -#endif -} - -void -PsOut_OutImageBytes(PsOutPtr self, int nBytes, char *bytes) -{ - int i; - int b; - int len; - const char hex[] = { '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; - - if( (!self->ImageFormat) || self->ImgSkip ) return; - - len = strlen(self->Buf); - - for( i=0 ; iRevImage ) b = (int)((bytes[i]^0xFF)&0xFF); - else b = (int)(bytes[i]&0xFF); - - self->Buf[len++] = hex[(b&0xF0) >> 4]; - self->Buf[len++] = hex[(b&0x0F)]; - self->Buf[len] = '\0'; - - if( len>70 ) - { - S_Flush(self); - len = 0; - } - } -} - -void -PsOut_BeginFrame(PsOutPtr self, int xoff, int yoff, int x, int y, - int w, int h) -{ - int xo = self->XOff; - int yo = self->YOff; - - if( self->InFrame ) xo = yo = 0; - S_OutTok(self, "gs", 0); - S_OutNum(self, (float)(x+xo)); - S_OutNum(self, (float)(y+yo)); - S_OutNum(self, (float)w); - S_OutNum(self, (float)h); - S_OutTok(self, "R cl n", 0); - xoff += xo; yoff += yo; - if( xoff || yoff ) - { - S_OutNum(self, (float)xoff); - S_OutNum(self, (float)yoff); - S_OutTok(self, "tr", 0); - } - S_OutTok(self, "gs", 1); - self->InFrame += 1; -} - -void -PsOut_EndFrame(PsOutPtr self) -{ - self->InFrame -= 1; - if( self->InFrame<0 ) self->InFrame = 0; - S_OutTok(self, "gr gr", 1); - PsOut_DirtyAttributes(self); -} - -int -PsOut_BeginPattern(PsOutPtr self, void *tag, int w, int h, PsFillEnum type, - PsOutColor bclr, PsOutColor fclr) -{ - int i; - char key[64]; - - for( i=0 ; iNPatterns ; i++ ) - { if( self->Patterns[i].tag==tag && self->Patterns[i].type==type ) break; } - if( iNPatterns ) return(1); - if( (self->NPatterns+1)>self->MxPatterns ) - { - if( self->Patterns ) - { - self->MxPatterns *= 2; - self->Patterns = - (PsPatPtr)xrealloc(self->Patterns, sizeof(PsPatRec)*self->MxPatterns); - } - else - { - self->MxPatterns = 64; - self->Patterns = (PsPatPtr)xalloc(sizeof(PsPatRec)*self->MxPatterns); - } - } - self->Patterns[self->NPatterns].tag = tag; - self->Patterns[self->NPatterns].type = type; - sprintf(key, "/ %d", (int)tag); - switch(type) { - case PsTile: key[1] = 't'; break; - case PsStip: key[1] = 's'; break; - case PsOpStip: key[1] = 'o'; break; - default: break; } - S_OutTok(self, key, 0); - S_OutTok(self, "db/PatternType 1 d/PaintType 1 d", 0); - S_OutTok(self, "/TilingType 1 d/BBox[0 0", 0); - S_OutNum(self, (float)w); - S_OutNum(self, (float)h); - S_OutTok(self, "]d/XStep", 0); - S_OutNum(self, (float)w); - S_OutTok(self, "d/YStep", 0); - S_OutNum(self, (float)h); - S_OutTok(self, "d/PaintProc{bg sv", 1); - if( type==PsOpStip ) - { - S_Color(self, bclr); - S_OutTok(self, "0 0", 0); - S_OutNum(self, (float)w); - S_OutNum(self, (float)h); - S_OutTok(self, "R fl", 1); - } - if( type!=PsTile ) S_Color(self, fclr); - self->NPatterns += 1; - self->InTile = type; - return(0); -} - -void -PsOut_EndPattern(PsOutPtr self) -{ - self->InTile = PsSolid; - S_OutTok(self, "rs ed}d de im_ mp d", 1); -} - -void -PsOut_SetPattern(PsOutPtr self, void *tag, PsFillEnum type) -{ - int i; - char key[64]; - - for( i=0 ; iNPatterns ; i++ ) - { if( tag==self->Patterns[i].tag && type==self->Patterns[i].type ) break; } - if( i>=self->NPatterns ) return; - sprintf(key, " %d", (int)tag); - switch(type) { - case PsTile: key[0] = 't'; break; - case PsStip: key[0] = 's'; break; - case PsOpStip: key[0] = 'o'; break; - default: break; } - S_OutTok(self, key, 0); - S_OutTok(self, "spt", 1); - self->CurColor = PSOUTCOLOR_NOCOLOR; -} - -void -PsOut_RawData(PsOutPtr self, char *data, int len) -{ - S_Flush(self); - if (!ferror(self->Fp)) { - (void) fwrite(data, 1, len, self->Fp); - } -} - -typedef enum PsDownfontFontType_ -{ - PsDFT_Type1PFA=0, - PsDFT_Type1PFB, - PsDFT_TrueType /* not implemented yet */ -} PsDownfontFontType; - -/* Download a PS Type1 font */ -int -PsOut_DownloadType1(PsOutPtr self, const char *auditmsg, const char *name, const char *fname) -{ - int stt; - char buf[256]; - FILE *fp; - PsDownfontFontType type; - - fp = fopen(fname, "r"); - if( !fp ) - return 0; - -#ifdef DEBUG_gisburn - /* This should be log-able! */ - fprintf(stderr, "PsOut_DownloadType1: %s: Downloading '%s' from '%s'\n", auditmsg, name, fname); -#endif /* DEBUG_gisburn */ - - fread(buf, 32, 1, fp); - fseek(fp, (long)0, 0); - - /* Is this a Adobe PostScript Type 1 binary font (PFB) ? */ - if( (buf[0]&0xFF)==0x80 && (buf[1]&0xFF)==0x01 ) - { - type = PsDFT_Type1PFB; - } - /* Is this a Adobe PostScript ASCII font (PFA) ? */ - else if (!strncmp(buf, "%!PS-AdobeFont", 14)) - { - type = PsDFT_Type1PFA; - } - else - { - /* This should be log-able! */ - fprintf(stderr, "PsOut_DownloadType1: Unknown font type for '%s'\n", fname); - return 0; - } - - S_Flush(self); - sprintf(buf, "%%%%BeginFont: %s", name); - S_Comment(self, buf); - - if( type == PsDFT_Type1PFB ) - { - char *buf, - *pt; - int len, - ch, - stype; - - ch = fgetc(fp); - /* Strip out the binary headers and de-binary it */ - while( (ch&0xFF) == 0x80 ) - { - stype = fgetc(fp); - if( stype==3 ) /* eof mark */ - break; - len = fgetc(fp); - len |= fgetc(fp)<<8; - len |= fgetc(fp)<<16; - len |= fgetc(fp)<<24; - buf = (char *)xalloc(len+1); - if( stype==1 ) - { - /* Process ASCII section */ - len = fread(buf, 1, len, fp); - /* convert any lone CRs (ie Mac eol) to LFs */ - for( pt = buf ; (pt = memchr(pt, '\r', len-(pt-buf))) != NULL ; pt++ ) - { - if ( pt[1]!='\n' ) - *pt = '\n'; - } - fwrite(buf, 1, len, self->Fp); - } - else if( stype==2 ) - { - int i; - - /* Process binary section */ - len = fread(buf, 1, len, fp); - for( i=0 ; i>4)&0xf) <= 9 ) - fputc('0'+((ch>>4)&0xf), self->Fp); - else - fputc('A'-10+((ch>>4)&0xf), self->Fp); - - if( (ch&0xf) <= 9 ) - fputc('0'+(ch&0xf), self->Fp); - else - fputc('A'-10+(ch&0xf), self->Fp); - - if( (i&0x1f)==0x1f ) - fputc('\n', self->Fp); - } - } - xfree(buf); - - /* Next block... */ - ch = fgetc(fp); - } - } - /* Is this a Adobe PostScript ASCII font (PFA) ? */ - else if (type == PsDFT_Type1PFA) - { - for(;;) - { - stt = fread(buf, 1, 256, fp); - if( stt<=0 ) break; - if (!ferror(self->Fp)) { - (void) fwrite(buf, 1, stt, self->Fp); - } - if( stt<256 ) - break; - } - } - fclose(fp); - S_Flush(self); - S_Comment(self, "%%EndFont"); - - /* Success... */ - return 1; -} - - - - - - diff --git a/hw/xprint/ps/psout.h b/hw/xprint/ps/psout.h deleted file mode 100644 index 1138e4afe..000000000 --- a/hw/xprint/ps/psout.h +++ /dev/null @@ -1,335 +0,0 @@ -/* - -Copyright 1996, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* - * (c) Copyright 1996 Hewlett-Packard Company - * (c) Copyright 1996 International Business Machines Corp. - * (c) Copyright 1996 Sun Microsystems, Inc. - * (c) Copyright 1996 Novell, Inc. - * (c) Copyright 1996 Digital Equipment Corp. - * (c) Copyright 1996 Fujitsu Limited - * (c) Copyright 1996 Hitachi, Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the names of the copyright holders - * shall not be used in advertising or otherwise to promote the sale, use - * or other dealings in this Software without prior written authorization - * from said copyright holders. - */ - -/******************************************************************* -** -** ********************************************************* -** * -** * File: psout.h -** * -** * Contents: Include file for psout.c -** * -** * Created By: Roger Helmendach (Liberty Systems) -** * -** * Copyright: Copyright 1996 The Open Group, Inc. -** * -** ********************************************************* -** -********************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _psout_ -#define _psout_ - -#include - -typedef enum PsCapEnum_ { PsCButt=0, PsCRound, PsCSquare } PsCapEnum; -typedef enum PsJoinEnum_ { PsJMiter=0, PsJRound, PsJBevel } PsJoinEnum; -typedef enum PsArcEnum_ { PsChord, PsPieSlice } PsArcEnum; -typedef enum PsRuleEnum_ { PsEvenOdd, PsNZWinding } PsRuleEnum; -typedef enum PsFillEnum_ { PsSolid=0, PsTile, PsStip, PsOpStip } PsFillEnum; - -typedef struct PsPointRec_ -{ - int x; - int y; -} PsPointRec; - -typedef PsPointRec *PsPointPtr; - -typedef struct PsRectRec_ -{ - int x; - int y; - int w; - int h; -} PsRectRec; - -typedef PsRectRec *PsRectPtr; - -typedef struct PsArcRec_ -{ - int x; - int y; - int w; - int h; - int a1; - int a2; - PsArcEnum style; -} PsArcRec; - -typedef PsArcRec *PsArcPtr; - -#define PSOUT_RECT 0 -#define PSOUT_ARC 1 -#define PSOUT_POINTS 2 - -typedef struct PsElmRec_ -{ - int type; - int nPoints; - union - { - PsRectRec rect; - PsArcRec arc; - PsPointPtr points; - } c; -} PsElmRec; - -typedef PsElmRec *PsElmPtr; - -typedef struct PsClipRec_ -{ - int nRects; - PsRectPtr rects; - int nElms; - PsElmPtr elms; - int nOutterClips; - PsRectPtr outterClips; -} PsClipRec; - -typedef PsClipRec *PsClipPtr; - -typedef enum PsFTDownloadFontType_ -{ - PsFontBitmap=0, - PsFontType1, - PsFontType3 -} PsFTDownloadFontType; - -/* Define |PsOutColor| color type which can hold one RGB value - * (note: this needs to be |signed| long/long long to represent - * special values such as |PSOUTCOLOR_NOCOLOR|) - */ -#ifdef PSOUT_USE_DEEPCOLOR -/* 64bit |PsOutColor| which can hold 16bit R-,G-,B-values */ -#ifdef WIN32 -typedef signed __int64 PsOutColor; -#else -# if defined(__alpha__) || defined(__alpha) || \ - defined(ia64) || defined(__ia64__) || \ - defined(__sparc64__) || defined(_LP64) || \ - defined(__s390x__) || \ - defined(amd64) || defined (__amd64__) || defined(__x86_64__) || \ - defined (__powerpc64__) || \ - (defined(sgi) && (_MIPS_SZLONG == 64)) -typedef signed long PsOutColor; -# else -typedef signed long long PsOutColor; -# endif /* native 64bit platform */ -#endif /* WIN32 */ - -#define PSOUTCOLOR_TO_REDBITS(clr) ((clr) >> 32) -#define PSOUTCOLOR_TO_GREENBITS(clr) (((clr) >> 16) & 0xFFFF) -#define PSOUTCOLOR_TO_BLUEBITS(clr) ((clr) & 0xFFFF) -#define PSOUTCOLOR_BITS_TO_PSFLOAT(b) ((float)(b) / 65535.) -#define PSOUTCOLOR_WHITE (0xFFFFFFFFFFFFLL) -#define PSOUTCOLOR_NOCOLOR (-1LL) -#define PSOUTCOLOR_TO_RGB24BIT(clr) (((PSOUTCOLOR_TO_REDBITS(clr) >> 8) << 16) | \ - ((PSOUTCOLOR_TO_GREENBITS(clr) >> 8) << 8) | \ - ((PSOUTCOLOR_TO_BLUEBITS(clr) >> 8) << 0)) -#else -/* 32bit |PsOutColor| which can hold 8bit R-,G-,B-values */ -typedef signed long PsOutColor; -#define PSOUTCOLOR_TO_REDBITS(clr) ((clr) >> 16) -#define PSOUTCOLOR_TO_GREENBITS(clr) (((clr) >> 8) & 0xFF) -#define PSOUTCOLOR_TO_BLUEBITS(clr) ((clr) & 0xFF) -#define PSOUTCOLOR_BITS_TO_PSFLOAT(b) ((float)(b) / 255.) -#define PSOUTCOLOR_WHITE (0xFFFFFF) -#define PSOUTCOLOR_NOCOLOR (-1) -#define PSOUTCOLOR_TO_RGB24BIT(clr) ((PSOUTCOLOR_TO_REDBITS(clr) << 16) | \ - (PSOUTCOLOR_TO_GREENBITS(clr) << 8) | \ - (PSOUTCOLOR_TO_BLUEBITS(clr) << 0)) -#endif /* PSOUT_USE_DEEPCOLOR */ - -#ifdef USE_PSOUT_PRIVATE -typedef void *voidPtr; - -typedef struct PsPatRec_ -{ - PsFillEnum type; - voidPtr tag; -} PsPatRec; - -typedef PsPatRec *PsPatPtr; - -typedef struct PsOutRec_ -{ - FILE *Fp; - char Buf[16384]; - PsOutColor CurColor; - int LineWidth; - PsCapEnum LineCap; - PsJoinEnum LineJoin; - int NDashes; - int *Dashes; - int DashOffset; - PsOutColor LineBClr; - PsRuleEnum FillRule; - char *FontName; - int FontSize; - float FontMtx[4]; - int ImageFormat; - int RevImage; - int NPatterns; - int MxPatterns; - PsPatPtr Patterns; - int ClipType; - PsClipRec Clip; - int InFrame; - int XOff; - int YOff; - - PsFillEnum InTile; - int ImgSkip; - PsOutColor ImgBClr; - PsOutColor ImgFClr; - int ImgX; - int ImgY; - int ImgW; - int ImgH; - int SclW; - int SclH; - - Bool isRaw; - - int pagenum; - - int start_image; -} PsOutRec; - -typedef struct PsOutRec_ *PsOutPtr; - -extern void S_Flush(PsOutPtr self); -extern void S_OutNum(PsOutPtr self, float num); -extern void S_OutTok(PsOutPtr self, char *tok, int cr); -#else -typedef struct PsOutRec_ *PsOutPtr; -#endif /* USE_PSOUT_PRIVATE */ - -extern FILE * PsOut_ChangeFile(PsOutPtr self, FILE *fp); -extern PsOutPtr PsOut_BeginFile(FILE *fp, char *title, int orient, int count, int plex, - int res, int wd, int ht, Bool raw); -extern void PsOut_EndFile(PsOutPtr self, int closeFile); -extern void PsOut_BeginPage(PsOutPtr self, int orient, int count, int plex, - int res, int wd, int ht); -extern void PsOut_EndPage(PsOutPtr self); -extern void PsOut_DirtyAttributes(PsOutPtr self); -extern void PsOut_Comment(PsOutPtr self, char *comment); -extern void PsOut_Offset(PsOutPtr self, int x, int y); - -extern void PsOut_Clip(PsOutPtr self, int clpTyp, PsClipPtr clpinf); - -extern void PsOut_Color(PsOutPtr self, PsOutColor clr); -extern void PsOut_FillRule(PsOutPtr self, PsRuleEnum rule); -extern void PsOut_LineAttrs(PsOutPtr self, int wd, PsCapEnum cap, - PsJoinEnum join, int nDsh, int *dsh, int dshOff, - PsOutColor bclr); -extern void PsOut_TextAttrs(PsOutPtr self, char *fnam, int siz, int iso); -extern void PsOut_TextAttrsMtx(PsOutPtr self, char *fnam, float *mtx, int iso); - -extern void PsOut_Polygon(PsOutPtr self, int nPts, PsPointPtr pts); -extern void PsOut_FillRect(PsOutPtr self, int x, int y, int w, int h); -extern void PsOut_FillArc(PsOutPtr self, int x, int y, int w, int h, - float ang1, float ang2, PsArcEnum style); - -extern void PsOut_Lines(PsOutPtr self, int nPts, PsPointPtr pts); -extern void PsOut_Points(PsOutPtr self, int nPts, PsPointPtr pts); -extern void PsOut_DrawRect(PsOutPtr self, int x, int y, int w, int h); -extern void PsOut_DrawArc(PsOutPtr self, int x, int y, int w, int h, - float ang1, float ang2); - -extern void PsOut_Text(PsOutPtr self, int x, int y, char *text, int textl, - PsOutColor bclr); -extern void PsOut_Text16(PsOutPtr self, int x, int y, unsigned short *text, int textl, PsOutColor bclr); - -extern void PsOut_BeginImage(PsOutPtr self, PsOutColor bclr, PsOutColor fclr, int x, int y, - int w, int h, int sw, int sh, int format); -extern void PsOut_BeginImageIM(PsOutPtr self, PsOutColor bclr, PsOutColor fclr, int x, int y, - int w, int h, int sw, int sh, int format); -extern void PsOut_EndImage(PsOutPtr self); -extern void PsOut_OutImageBytes(PsOutPtr self, int nBytes, char *bytes); - -extern void PsOut_BeginFrame(PsOutPtr self, int xoff, int yoff, int x, int y, - int w, int h); -extern void PsOut_EndFrame(PsOutPtr self); - -extern int PsOut_BeginPattern(PsOutPtr self, void *tag, int w, int h, - PsFillEnum type, PsOutColor bclr, PsOutColor fclr); -extern void PsOut_EndPattern(PsOutPtr self); -extern void PsOut_SetPattern(PsOutPtr self, void *tag, PsFillEnum type); - -extern void PsOut_RawData(PsOutPtr self, char *data, int len); - -extern int PsOut_DownloadType1(PsOutPtr self, const char *auditmsg, const char *name, const char *fname); - -extern int PsOut_DownloadFreeType1(PsOutPtr self, const char *psfontname, FontPtr pFont, long block_offset); -extern int PsOut_DownloadFreeType3(PsOutPtr self, const char *psfontname, FontPtr pFont, long block_offset); - -extern int PsOut_DownloadFreeType(PsOutPtr self, PsFTDownloadFontType downloadfonttype, const char *psfontname, FontPtr pFont, long block_offset); -extern void PsOut_Get_FreeType_Glyph_Name( char *destbuf, FontPtr pFont, unsigned long x11fontindex); -extern void PsOut_FreeType_Text(FontPtr pFont, PsOutPtr self, int x, int y, char *text, int textl); -extern void PsOut_FreeType_Text16(FontPtr pFont, PsOutPtr self, int x, int y, unsigned short *text, int textl); - -extern void PsOut_FreeType_TextAttrs16(PsOutPtr self, char *fnam, int siz, int iso); -extern void PsOut_FreeType_TextAttrsMtx16(PsOutPtr self, char *fnam, float *mtx, int iso); -#endif diff --git a/hw/xprint/ps/psout_ft.c b/hw/xprint/ps/psout_ft.c deleted file mode 100644 index 30939f972..000000000 --- a/hw/xprint/ps/psout_ft.c +++ /dev/null @@ -1,337 +0,0 @@ - -/* -Copyright (c) 2003-2004 Roland Mainz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "os.h" -#define USE_PSOUT_PRIVATE 1 -#include "psout.h" - -#include -#include FT_FREETYPE_H -#include FT_TYPE1_TABLES_H - -#include -#include -#include -#include -#include -#include -#include -#define NOT_IN_FTFUNCS -#include -#include "servermd.h" /* needed for endian test (IMAGE_BYTE_ORDER) */ - -#define USE_FT_PS_NAMES 1 - -#ifdef USE_FT_PS_NAMES -void PsOut_Get_FreeType_Glyph_Name( char *destbuf, FontPtr pFont, unsigned long x11fontindex) -{ - FTFontPtr tf = (FTFontPtr)pFont->fontPrivate; - FT_Face ttface = tf->instance->face->face; - FT_Error error; - char buf[256]; - unsigned long ftindex; - - /* Remap X11 font index to FreeType font index */ - ftindex = FTRemap(ttface, &tf->mapping, x11fontindex); - - if( FT_Has_PS_Glyph_Names(ttface) ) - { - error = FT_Get_Glyph_Name(ttface, ftindex, buf, 64); - } - else - { - error = 1; - } - - if( error ) - { - /* Check for unicode mapping - * See Adobe document "Unicode and Glyph Names" - * (http://partners.adobe.com/asn/tech/type/unicodegn.jsp) - */ - if( (tf->mapping.mapping->type == FONT_ENCODING_UNICODE) && - (ftindex < 0xFFFE) ) - { - sprintf(buf, "uni%04lx", ftindex); - } - else - { - sprintf(buf, "ch%02lx", ftindex); - } - } - - strcpy(destbuf, buf); -} -#endif /* USE_FT_PS_NAMES */ - -int PsOut_DownloadFreeType(PsOutPtr self, PsFTDownloadFontType downloadfonttype, const char *psfontname, FontPtr pFont, long block_offset) -{ - switch(downloadfonttype) - { - case PsFontType3: - return PsOut_DownloadFreeType3(self, psfontname, pFont, block_offset); - case PsFontType1: - return PsOut_DownloadFreeType1(self, psfontname, pFont, block_offset); - default: - FatalError("PS DDX: PsOut_DownloadFreeType(downloadfonttype='%d' not implemented\n", - (int)downloadfonttype); - return 0; /* NO-OP, FatalError() will call |exit()| */ - } -} - -/* cloned from |PsOut_TextAttrs16| */ -void -PsOut_FreeType_TextAttrs16(PsOutPtr self, char *fnam, int siz, int iso) -{ - int i; - if( self->FontName && strcmp(fnam, self->FontName)==0 && - siz==self->FontSize ) return; - if( self->FontName ) xfree(self->FontName); - self->FontName = (char *)xalloc(strlen(fnam)+1); - strcpy(self->FontName, fnam); - self->FontSize = siz; - for( i=0 ; i<4 ; i++ ) self->FontMtx[i] = -1.; -} - -/* cloned from |PsOut_TextAttrsMtx16| */ -void -PsOut_FreeType_TextAttrsMtx16(PsOutPtr self, char *fnam, float *mtx, int iso) -{ - int i; - if( self->FontName && strcmp(fnam, self->FontName)==0 && - mtx[0]==self->FontMtx[0] && mtx[1]==self->FontMtx[1] && - mtx[2]==self->FontMtx[2] && mtx[3]==self->FontMtx[3] ) return; - if( self->FontName ) xfree(self->FontName); - self->FontName = (char *)xalloc(strlen(fnam)+1); - strcpy(self->FontName, fnam); - for( i=0 ; i<4 ; i++ ) self->FontMtx[i] = mtx[i]; - self->FontSize = -1; -} - -static -int FT_Get_CharcellMetricsCharacterHeight(FontPtr pFont) -{ - FTFontPtr ftfont = (FTFontPtr)pFont->fontPrivate; - - return ftfont->instance->charcellMetrics->ascent + - ftfont->instance->charcellMetrics->descent; -} - -static -int FT_Get_CharcellMetricsCharacterWidth(FontPtr pFont) -{ - FTFontPtr ftfont = (FTFontPtr)pFont->fontPrivate; - - if( ftfont->instance->spacing != FT_PROPORTIONAL ) - { - int width = ftfont->instance->charcellMetrics->characterWidth; - - /* If the font uses a matrix make sure we transform the |characterWidth| - * back to it's original value since we download the untransformed font - * and use a PostScript transformation matrix to transform the font when - * rendering the text - */ - if( ftfont->instance->transformation.nonIdentity ) - { - FT_Vector v; - - FT_Matrix m = ftfont->instance->transformation.matrix; - (void)FT_Matrix_Invert(&m); /* FixMe: We should check the return code */ - v.x = width; - v.y = FT_Get_CharcellMetricsCharacterHeight(pFont); - FT_Vector_Transform(&v, &m); - width = v.x; - } - - return width; - } - - return 0; -} - -void -PsOut_FreeType_Text(FontPtr pFont, PsOutPtr self, int x, int y, char *text, int textl) -{ - int i; - int xo = self->XOff, - yo = self->YOff; - char buf[256]; - int cwidth = FT_Get_CharcellMetricsCharacterWidth(pFont); - - if( self->InFrame || self->InTile ) xo = yo = 0; - x += xo; y += yo; - - S_OutNum(self, (float)x); - S_OutNum(self, (float)y); - S_OutTok(self, "moveto", 1); - - S_OutTok(self, "[ ", 0); - - for( i = 0 ; i < textl ; i++ ) - { -#ifdef USE_FT_PS_NAMES - char namebuf[256]; - unsigned int ch = text[i]&0xFF; - unsigned long block_offset = 0; - PsOut_Get_FreeType_Glyph_Name(namebuf, pFont, ch+block_offset); - - sprintf(buf, "/%s ", namebuf); -#else - sprintf(buf, "/ch%02x ", text[i]&0xFF); -#endif /* USE_FT_PS_NAMES */ - S_OutTok(self, buf, 0); - } - - /* Check whether we have any special spacing requirements (e.g. non-proportional fonts) ... */ - if( cwidth != 0 ) - { - /* If the we use a matrix to render the font (instead of using |self->FontSize|) - * we must apply the matrix to the "rmoveto" which is used to force the exact - * character width. The "trmoveto" macro will do that for us... - */ - if( self->FontSize == -1 ) - { - sprintf(buf, "]{gs glyphshow gr %d 0 trmoveto}fa", cwidth); - } - else - { - sprintf(buf, "]{gs glyphshow gr %d 0 rm}fa", cwidth); - } - } - else - { - sprintf(buf, "]{glyphshow}fa"); - } - S_OutTok(self, buf, 0); -} - -/* XXX: |PsOut_FreeType_Text16| should be rewritten - currently it uses lame, - * slow hacks and makes some risky assumtions about how |PsOut_Text16| - * allocates memory */ -void -PsOut_FreeType_Text16(FontPtr pFont, PsOutPtr self, int x, int y, unsigned short *text, int textl) -{ - int i; - int xo = self->XOff, - yo = self->YOff; - unsigned short c, - c_hiByte, - c_lowByte, - fontPage; - long lastFontPage = -1; - char baseFontName[256]; - char buf[256]; - - if( self->InFrame || self->InTile ) xo = yo = 0; - x += xo; y += yo; - - strcpy(baseFontName, self->FontName); - - S_OutNum(self, (float)x); - S_OutNum(self, (float)y); - S_OutTok(self, "moveto", 1); - - for( i = 0 ; i < textl ; i++ ) - { - c = text[i]; -#if IMAGE_BYTE_ORDER == LSBFirst - c_hiByte = c & 0x00FF; - c_lowByte = (c >> 8) & 0x00FF; -#elif IMAGE_BYTE_ORDER == MSBFirst - c_hiByte = (c >> 8) & 0x00FF; - c_lowByte = c & 0x00FF; -#else -#error Unsupported byte order -#endif - fontPage = c_hiByte; - - if( fontPage != lastFontPage ) - { - if( fontPage > 0 ) - { - sprintf(buf, "%s_%x", baseFontName, fontPage); - } - else - { - sprintf(buf, "%s", baseFontName); - xfree(self->FontName); - self->FontName = NULL; - } - - if( self->FontSize == -1 ) - { - PsOut_TextAttrsMtx(self, buf, self->FontMtx, FALSE); - } - else - { - PsOut_TextAttrs(self, buf, self->FontSize, FALSE); - } - lastFontPage = fontPage; - } - -#ifdef USE_FT_PS_NAMES - { - char namebuf[256]; - unsigned int ch = c_lowByte; - unsigned long block_offset = c_hiByte * 0x100 /* same as c_hiByte << 8 */; - int cwidth = FT_Get_CharcellMetricsCharacterWidth(pFont); - PsOut_Get_FreeType_Glyph_Name(namebuf, pFont, ch+block_offset); - - /* Check whether we have any special spacing requirements (e.g. non-proportional fonts) ... */ - if( cwidth != 0 ) - { - /* If the we use a matrix to render the font (instead of using |self->FontSize|) - * we must apply the matrix to the "rmoveto" which is used to force the exact - * character width. The "trmoveto" macro will do that for us... - */ - if( self->FontSize == -1 ) - { - sprintf(buf, "gs /%s glyphshow gr %d 0 trmoveto", namebuf, cwidth); - } - else - { - sprintf(buf, "gs /%s glyphshow gr %d 0 rm", namebuf, cwidth); - } - } - else - { - sprintf(buf, "/%s glyphshow", namebuf); - } - } -#else - sprintf(buf, "/ch%02x glyphshow", c_lowByte); -#endif /* USE_FT_PS_NAMES */ - S_OutTok(self, buf, 1); - } - - if( self->FontName ) xfree(self->FontName); - self->FontName = (char *)xalloc(strlen(baseFontName)+1); - strcpy(self->FontName, baseFontName); -} - diff --git a/hw/xprint/ps/psout_ftpstype1.c b/hw/xprint/ps/psout_ftpstype1.c deleted file mode 100644 index 572e13601..000000000 --- a/hw/xprint/ps/psout_ftpstype1.c +++ /dev/null @@ -1,185 +0,0 @@ - -/* -Copyright (c) 2003-2004 Roland Mainz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include - -#include "os.h" -#define USE_PSOUT_PRIVATE 1 -#include "psout.h" - -#include -#include FT_FREETYPE_H - -#include -#include -#include -#include -#include -#include -#include -#define NOT_IN_FTFUNCS -#include - -int do_debug_ft2pt1 = FALSE; -int do_enable_ft2pt1_optimizer = FALSE; - -/* Defined in ttf2pt1.c */ -int ft2pt1_main(int argc, char **argv, - FTFontPtr tf, const char *download_psfontname, unsigned long download_font_block_offset); - -/* Download FreeType outlines as PS Type1 font */ -int PsOut_DownloadFreeType1(PsOutPtr self, const char *psfontname, FontPtr pFont, long block_offset) -{ - FTFontPtr tf; - FT_Face face; - int ft2pt1_numargs = 0; - char *ft2pt1_args[40]; - char *pstype1filename_prefix; - char pstype1filename[PATH_MAX+1]; - int ft2pt1_main_retval; - pid_t childpid; - - tf = (FTFontPtr)pFont->fontPrivate; - face = tf->instance->face->face; - - /* Set debugging flags */ - do_debug_ft2pt1 = (getenv("XPRT_PSDDX_DO_DEBUG_FT2PT1") != NULL); - do_enable_ft2pt1_optimizer = (getenv("XPRT_PSDDX_DO_ENABLE_FT2PT1_OPTIMIZER") != NULL); - - if( do_debug_ft2pt1 ) - { - fprintf(stderr, "# Converting FT2 font to PS Type1 filename='%s', ttface=%lx\n", tf->instance->face->filename, (long)face); - } - - pstype1filename_prefix = tempnam(NULL, "Xprt_"); - - ft2pt1_args[ft2pt1_numargs] = "ft2pt1"; ft2pt1_numargs++; - ft2pt1_args[ft2pt1_numargs] = "-Ob"; ft2pt1_numargs++; - ft2pt1_args[ft2pt1_numargs] = "-e"; ft2pt1_numargs++; - ft2pt1_args[ft2pt1_numargs] = "-a"; ft2pt1_numargs++; - ft2pt1_args[ft2pt1_numargs] = "-Ga"; ft2pt1_numargs++; - if( do_enable_ft2pt1_optimizer ) - { - /* Scale fonts to a 1000x1000 matrix */ - ft2pt1_args[ft2pt1_numargs] = "-Ot"; ft2pt1_numargs++; - } - else - { - /* Disable the ttf2pt1 optimisations */ - ft2pt1_args[ft2pt1_numargs] = "-Ou"; ft2pt1_numargs++; - ft2pt1_args[ft2pt1_numargs] = "-Oo"; ft2pt1_numargs++; - ft2pt1_args[ft2pt1_numargs] = "-Os"; ft2pt1_numargs++; - ft2pt1_args[ft2pt1_numargs] = "-Oh"; ft2pt1_numargs++; - } - - if( !do_debug_ft2pt1 ) - { - ft2pt1_args[ft2pt1_numargs] = "-W 0"; ft2pt1_numargs++; - } - ft2pt1_args[ft2pt1_numargs] = tf->instance->face->filename; ft2pt1_numargs++; - ft2pt1_args[ft2pt1_numargs] = pstype1filename_prefix; ft2pt1_numargs++; - ft2pt1_args[ft2pt1_numargs] = NULL; - -/* XXX: ttf2pt1 has lots of leaks and global vars which are not cleaned-up - * As long this problem exists we will simply fork() and call the converter - * from the child process (all resources are free'ed when the child process - * exists) as a workaround. - */ -#define FT2PT1_NEEDS_SEPERATE_PROCESS 1 - -#ifdef FT2PT1_NEEDS_SEPERATE_PROCESS - /* Flush internal buffer and then the stdio stream before fork()! */ - S_Flush(self); - fflush(self->Fp); - - childpid = fork(); - switch(childpid) - { - case -1: - FatalError("PS DDX internal error: Cannot fork() converter child process, %s\n", strerror(errno)); - break; - case 0: /* child */ - fclose(self->Fp); - self->Fp = NULL; - - ft2pt1_main_retval = ft2pt1_main(ft2pt1_numargs, ft2pt1_args, tf, psfontname, block_offset); - if( do_debug_ft2pt1 ) - { - fprintf(stderr, "## ft2pt1_main returned %d (child)\n", ft2pt1_main_retval); - } - exit(ft2pt1_main_retval); - break; - default: /* parent */ - waitpid(childpid, &ft2pt1_main_retval, 0); - break; - } - - if( do_debug_ft2pt1 ) - { - fprintf(stderr, "## ft2pt1_main returned %d (parent)\n", ft2pt1_main_retval); - } -#else - S_Flush(self); - - ft2pt1_main_retval = ft2pt1_main(ft2pt1_numargs, ft2pt1_args, tf, psfontname, block_offset); - if( do_debug_ft2pt1 ) - { - fprintf(stderr, "## ft2pt1_main returned %d (child)\n", ft2pt1_main_retval); - } -#endif /* FT2PT1_NEEDS_SEPERATE_PROCESS */ - - if( ft2pt1_main_retval != EXIT_SUCCESS ) - { - FatalError("PS DDX internal error while converting FreeType font '%s' to PS Type1, error=%d\n", - tf->instance->face->filename, ft2pt1_main_retval); - } - - sprintf(pstype1filename, "%s.pfa", pstype1filename_prefix); - if( do_debug_ft2pt1 ) - { - fprintf(stderr, "# Downloading converted FT2/PS Type1 filename='%s'\n", pstype1filename); - } - - PsOut_DownloadType1(self, "PsOut_DownloadFreeType1", psfontname, pstype1filename); - - if( !do_debug_ft2pt1 ) - { - unlink(pstype1filename); - } - - free(pstype1filename_prefix); - - S_Flush(self); - - return 0; -} - - diff --git a/hw/xprint/ps/psout_ftpstype3.c b/hw/xprint/ps/psout_ftpstype3.c deleted file mode 100644 index 733b5386b..000000000 --- a/hw/xprint/ps/psout_ftpstype3.c +++ /dev/null @@ -1,439 +0,0 @@ - -/* -Copyright (c) 2003-2004 Roland Mainz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "os.h" -#define USE_PSOUT_PRIVATE 1 -#include "psout.h" - -#include -#include FT_FREETYPE_H -#include FT_TRUETYPE_TABLES_H -#include FT_BBOX_H -#include FT_GLYPH_H - -#include FT_CONFIG_CONFIG_H -#include FT_CONFIG_OPTIONS_H -#include FT_ERRORS_H -#include FT_SYSTEM_H -#include FT_IMAGE_H -#include FT_TYPES_H -#include FT_OUTLINE_H -#include FT_MODULE_H -#include FT_RENDER_H -#include FT_TYPE1_TABLES_H -#include FT_TRUETYPE_IDS_H -#include FT_TRUETYPE_TAGS_H -#include FT_CACHE_H -#include FT_CACHE_IMAGE_H -#include FT_CACHE_SMALL_BITMAPS_H -#include FT_MULTIPLE_MASTERS_H -#include FT_SFNT_NAMES_H - -#include -#include -#include -#include -#include -#include -#include -#define NOT_IN_FTFUNCS -#include - -struct ft2info -{ - FontPtr pFont; - FTFontPtr tf; - FT_Face ttface; - struct - { - char *full_name; - char *copyright; - char *family; - char *subfamily; - char *version; - } nameid; - TT_Postscript *ttpostscript; - TT_Header *ttheader; -}; - -/* Local prototypes */ -static FT_Error PSType3_createOutlineGlyphs(FILE *out, struct ft2info *ti, unsigned long unicode, const char *psglyphname); -static int PSType3_generateOutlineFont(FILE *out, const char *psfontname, struct ft2info *ti, long block_offset); - -extern FT_Library ftypeLibrary; /* defined in xc/lib/font/FreeType/ftfuncs.c */ - -#define USE_FT_PS_NAMES 1 - -static -FT_Error PSType3_createOutlineGlyphs( FILE *out, struct ft2info *ti, unsigned long x11fontindex, const char *psglyphname ) -{ - unsigned long ftindex; - FT_BBox bbox; - FT_Error error; - FT_Outline outline; - - /* Remap X11 font index to FreeType font index */ - ftindex = FTRemap(ti->ttface, &ti->tf->mapping, x11fontindex); - - error = FT_Load_Glyph(ti->ttface, ftindex, (FT_LOAD_NO_BITMAP | FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING)); - if( error ) - { - fprintf(stderr, "PSType3_createOutlineGlyphs: FT_Load_Glyph() failure, error=%d\n", (int)error); - return error; - } - - outline = ti->ttface->glyph->outline; - - FT_Outline_Get_CBox(&outline, &bbox); - - fprintf(out, "/%s {\n", psglyphname); - fprintf(out, "%ld 0 %ld %ld %ld %ld setcachedevice\n", - (signed long)ti->ttface->glyph->metrics.horiAdvance, - (long)bbox.xMin, - (long)bbox.yMin, - (long)bbox.xMax, - (long)bbox.yMax); - - if( outline.n_contours > 0 ) - { - long i, - j, - k, k1, - cs, ce, - nguide, - contour_start, - contour_end, - last_point; - Bool first; - FT_Vector *vec; - - contour_start = ce = 0; - - vec = outline.points; - last_point = outline.n_points; - - i = j = k = 0; - first = TRUE; - - while( i <= outline.contours[outline.n_contours - 1] ) - { - contour_end = outline.contours[j]; - - if( first ) - { - fprintf(out, "%ld %ld moveto\n", vec[i].x, vec[i].y); - contour_start = i; - first = FALSE; - } - else if( outline.tags[i] & FT_CURVE_TAG_ON ) - { - fprintf(out, "%ld %ld lineto\n", vec[i].x, vec[i].y); - } - else - { - Bool finished = FALSE; - - cs = i-1; - nguide = 0; - while( !finished ) - { - if( i == contour_end+1 ) - { - ce = contour_start; - finished = TRUE; - } - else if( outline.tags[i] & FT_CURVE_TAG_ON ) - { - ce = i; - finished = TRUE; - } - else - { - i++; - nguide++; - } - } - - switch( nguide ) - { - case 0: - fprintf(out, "%ld %ld lineto\n", vec[ce].x, vec[ce].y); - break; - - case 1: - fprintf(out, "%ld %ld %ld %ld %ld %ld curveto\n", - (vec[cs].x+2*vec[cs+1].x)/3, - (vec[cs].y+2*vec[cs+1].y)/3, - (2*vec[cs+1].x+vec[ce].x)/3, - (2*vec[cs+1].y+vec[ce].y)/3, - vec[ce].x, vec[ce].y); - break; - - case 2: - fprintf(out, "%ld %ld %ld %ld %ld %ld curveto\n", - (-vec[cs].x+4*vec[cs+1].x)/3, - (-vec[cs].y+4*vec[cs+1].y)/3, - (4*vec[cs+2].x-vec[ce].x)/3, - (4*vec[cs+2].y-vec[ce].y)/3, - vec[ce].x, vec[ce].y); - break; - - case 3: - fprintf(out, "%ld %ld %ld %ld %ld %ld curveto\n", - (vec[cs].x+2*vec[cs+1].x)/3, - (vec[cs].y+2*vec[cs+1].y)/3, - (5*vec[cs+1].x+vec[cs+2].x)/6, - (5*vec[cs+1].y+vec[cs+2].y)/6, - (vec[cs+1].x+vec[cs+2].x)/2, - (vec[cs+1].y+vec[cs+2].y)/2); - - fprintf(out, "%ld %ld %ld %ld %ld %ld curveto\n", - (vec[cs+1].x+5*vec[cs+2].x)/6, - (vec[cs+1].y+5*vec[cs+2].y)/6, - (5*vec[cs+2].x+vec[cs+3].x)/6, - (5*vec[cs+2].y+vec[cs+3].y)/6, - (vec[cs+3].x+vec[cs+2].x)/2, - (vec[cs+3].y+vec[cs+2].y)/2); - - fprintf(out, "%ld %ld %ld %ld %ld %ld curveto\n", - (vec[cs+2].x+5*vec[cs+3].x)/6, - (vec[cs+2].y+5*vec[cs+3].y)/6, - (2*vec[cs+3].x+vec[ce].x)/3, - (2*vec[cs+3].y+vec[ce].y)/3, - vec[ce].x, vec[ce].y); - break; - - default: /* anything |nguide > 3| */ - k1 = cs + nguide; - - fprintf(out, "%ld %ld %ld %ld %ld %ld curveto\n", - (vec[cs].x+2*vec[cs+1].x)/3, - (vec[cs].y+2*vec[cs+1].y)/3, - (5*vec[cs+1].x+vec[cs+2].x)/6, - (5*vec[cs+1].y+vec[cs+2].y)/6, - (vec[cs+1].x+vec[cs+2].x)/2, - (vec[cs+1].y+vec[cs+2].y)/2); - - for( k = cs+2 ; k <= k1-1 ; k++ ) - { - fprintf(out, "%ld %ld %ld %ld %ld %ld curveto\n", - (vec[k-1].x+5*vec[k].x)/6, - (vec[k-1].y+5*vec[k].y)/6, - (5*vec[k].x+vec[k+1].x)/6, - (5*vec[k].y+vec[k+1].y)/6, - (vec[k].x+vec[k+1].x)/2, - (vec[k].y+vec[k+1].y)/2); - } - - fprintf(out, "%ld %ld %ld %ld %ld %ld curveto\n", - (vec[k1-1].x+5*vec[k1].x)/6, - (vec[k1-1].y+5*vec[k1].y)/6, - (2*vec[k1].x+vec[ce].x)/3, - (2*vec[k1].y+vec[ce].y)/3, - vec[ce].x, vec[ce].y); - break; - } - } - - if( i >= contour_end ) - { - fprintf(out, "closepath\n"); - first = TRUE; - i = contour_end + 1; - j++; - } - else - { - i++; - } - } - } - - fprintf(out, "fill } bind def\n"); - - return 0; -} - -static -int PSType3_generateOutlineFont(FILE *out, const char *psfontname, struct ft2info *ti, long block_offset) -{ - long i; - double scaler; - const int numchars = 256; -#ifdef USE_FT_PS_NAMES - int linewidth = 0; -#endif /* USE_FT_PS_NAMES */ - - fprintf(out, "%%%%BeginFont: %s\n", psfontname); - fprintf(out, "22 dict begin\n"); - fprintf(out, "/FontType 3 def\n"); - fprintf(out, "/StrokeWidth 0 def\n"); - fprintf(out, "/PaintType 0 def\n"); - fprintf(out, "/FontName (%s) def\n", psfontname); - fprintf(out, "/FontInfo 9 dict dup begin\n"); - fprintf(out, " /FullName (%s) def\n", ti->nameid.full_name?ti->nameid.full_name:psfontname); - fprintf(out, " /Notice (%s) def\n", ti->nameid.copyright?ti->nameid.copyright:"nothing here"); - fprintf(out, " /FamilyName (%s) def\n", ti->nameid.family?ti->nameid.family:psfontname); - fprintf(out, " /Weight (%s) def\n", ti->nameid.subfamily?ti->nameid.subfamily:"Regular"); - fprintf(out, " /version (%s) def\n", ti->nameid.version?ti->nameid.version:"0.1"); - - if( ti->ttpostscript ) - { - fprintf(out, " /italicAngle %.9g def\n", (double)ti->ttpostscript->italicAngle); - fprintf(out, " /underlineThickness %d def\n", (int)ti->ttpostscript->underlineThickness); - fprintf(out, " /underlinePosition %d def\n", (int)ti->ttpostscript->underlinePosition); - fprintf(out, " /isFixedPitch %s def\n", ((ti->ttpostscript->isFixedPitch)?("true"):("false"))); - } - else - { - fprintf(out, " /italicAngle %.9g def\n", 0.0); - fprintf(out, " /underlineThickness %d def\n", 100); - fprintf(out, " /underlinePosition %d def\n", 0); - fprintf(out, " /isFixedPitch false def\n"); - } - - fprintf(out, "end def\n"); - - scaler = (1000.0 / (double)ti->ttface->units_per_EM) / 1000.0; - fprintf(out, "/FontMatrix [%.9g 0 0 %.9g 0 0] def\n", scaler, scaler); - - if( ti->ttheader ) - { - fprintf(out, "/FontBBox [%d %d %d %d] def\n", - (int)ti->ttheader->xMin, - (int)ti->ttheader->yMin, - (int)ti->ttheader->xMax, - (int)ti->ttheader->yMax); - } - else - { - fprintf(out, "/FontBBox [%ld %ld %ld %ld] def\n", - ti->ttface->bbox.xMin, - ti->ttface->bbox.yMin, - ti->ttface->bbox.xMax, - ti->ttface->bbox.yMax); - - } - - fprintf(out, "/Encoding [\n"); - for( i = 0 ; i < 256 ; i++ ) - { -#ifdef USE_FT_PS_NAMES - char namebuf[256]; - PsOut_Get_FreeType_Glyph_Name(namebuf, ti->pFont, i+block_offset); - linewidth += strlen(namebuf) + 2; - fprintf(out, "/%s%s", namebuf, (linewidth > 70)?(linewidth = 0, "\n"):(" ")); -#else - fprintf(out, "/ch%02x%s", i, (((i % 10) == 9)?("\n"):(" "))); -#endif /* USE_FT_PS_NAMES */ - } - fprintf(out, "] def\n"); - - fprintf(out, "/CharProcs %d dict def CharProcs begin\n", (int)(numchars + 1)); - fprintf(out, "/.notdef {\n" - "1000 0 0 0 0 0 setcachedevice\n" - "fill } bind def\n"); - for( i = 0 ; i < numchars ; i++ ) - { - char buf[32]; -#ifdef USE_FT_PS_NAMES - char namebuf[256]; - PsOut_Get_FreeType_Glyph_Name(namebuf, ti->pFont, i+block_offset); - sprintf(buf, "%s ", namebuf); -#else - sprintf(buf, "ch%02lx ", i); -#endif /* USE_FT_PS_NAMES */ - PSType3_createOutlineGlyphs(out, ti, i+block_offset, buf); - } - fprintf(out, "end\n" - "/BuildGlyph {\n" - " exch /CharProcs get exch\n" - " 2 copy known not {pop /.notdef} if get exec } bind def\n" - "/BuildChar { 1 index /Encoding get exch get\n" - " 1 index /Encoding get exec } bind def\n"); - fprintf(out, "currentdict end /%s exch definefont pop\n", psfontname); - fprintf(out, "%%EndFont\n"); - - return 0; -} - -static -char *FT_Get_TT_NAME_ID(FT_Face ttface, int index) -{ - FT_SfntName name; - char *s; - - if( index >= FT_Get_Sfnt_Name_Count(ttface) ) - return NULL; - - FT_Get_Sfnt_Name(ttface, index, &name); - s = (char *)malloc(name.string_len+2); - if( !s ) - return NULL; - memcpy(s, (char *)name.string, name.string_len); - s[name.string_len] = '\0'; - return s; -} - -int PsOut_DownloadFreeType3(PsOutPtr self, const char *psfontname, FontPtr pFont, long block_offset) -{ - struct ft2info cft2info = { 0 }; - struct ft2info *ti = &cft2info; - - S_Flush(self); - - ti->tf = (FTFontPtr)pFont->fontPrivate; - ti->ttface = ti->tf->instance->face->face; - ti->pFont = pFont; -#ifdef DEBUG_gisburn - fprintf(stderr, "# Downloading FT2 font filename='%s', ttface=%lx\n", ti->tf->instance->face->filename, (long)ti->ttface); -#endif /* DEBUG_gisburn */ - - ti->nameid.full_name = FT_Get_TT_NAME_ID(ti->ttface, TT_NAME_ID_FULL_NAME); - ti->nameid.copyright = FT_Get_TT_NAME_ID(ti->ttface, TT_NAME_ID_COPYRIGHT); - ti->nameid.family = FT_Get_TT_NAME_ID(ti->ttface, TT_NAME_ID_FONT_FAMILY); - ti->nameid.subfamily = FT_Get_TT_NAME_ID(ti->ttface, TT_NAME_ID_FONT_SUBFAMILY); - ti->nameid.version = FT_Get_TT_NAME_ID(ti->ttface, TT_NAME_ID_VERSION_STRING); - - ti->ttheader = (TT_Header *)FT_Get_Sfnt_Table(ti->ttface, ft_sfnt_head); - ti->ttpostscript = (TT_Postscript *)FT_Get_Sfnt_Table(ti->ttface, ft_sfnt_post); - - PSType3_generateOutlineFont(self->Fp, psfontname, ti, block_offset); - - free(ti->nameid.full_name); - free(ti->nameid.copyright); - free(ti->nameid.family); - free(ti->nameid.subfamily); - free(ti->nameid.version); - - S_Flush(self); - - return 0; -} - diff --git a/hw/xprint/ps/ttf2pt1wrap.c b/hw/xprint/ps/ttf2pt1wrap.c deleted file mode 100644 index 57bb777d2..000000000 --- a/hw/xprint/ps/ttf2pt1wrap.c +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Wrapper to add missing symbol to externally supplied code - */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifdef Lynx -extern int optind; -extern char *optarg; -#endif - -#include "ttf2pt1.c" diff --git a/hw/xprint/raster/Makefile.am b/hw/xprint/raster/Makefile.am deleted file mode 100644 index 1ee1122f2..000000000 --- a/hw/xprint/raster/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -noinst_LTLIBRARIES = libraster.la - -INCLUDES = -I$(top_srcdir)/hw/xprint - -AM_CFLAGS = @DIX_CFLAGS@ @XPRINT_CFLAGS@ -D_XP_PRINT_SERVER_ - -libraster_la_SOURCES = \ - RasterAttVal.c \ - Raster.c \ - Raster.h diff --git a/hw/xprint/raster/Raster.c b/hw/xprint/raster/Raster.c deleted file mode 100644 index dccef613c..000000000 --- a/hw/xprint/raster/Raster.c +++ /dev/null @@ -1,1563 +0,0 @@ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - - -/******************************************************************* -** -** ********************************************************* -** * -** * File: printer/Raster.c -** * -** * Contents: -** * Raster driver for the print server. -** * -** * Copyright: Copyright 1993, 1995 Hewlett-Packard Company -** * -** ********************************************************* -** -********************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* for SIGCLD on pre-POSIX systems */ -#define NEED_EVENTS -#include -#undef NEED_EVENTS -#include -#include "misc.h" -#include "dixstruct.h" -#include "scrnintstr.h" -#include "screenint.h" -#include "colormapst.h" -#include "windowstr.h" -#include "propertyst.h" -#include "servermd.h" /* needed for IMAGE_BUFSIZE */ -#include "fb.h" -#include "mi.h" - -#include -#include "Raster.h" - -#include "attributes.h" -#include "AttrValid.h" -#include "DiPrint.h" - -static void AllocateRasterPrivates( - ScreenPtr pScreen); -static Bool RasterChangeWindowAttributes( - WindowPtr pWin, - unsigned long mask); -static int StartJob( - XpContextPtr pCon, - Bool sendClientData, - ClientPtr client); -static int StartPage( - XpContextPtr pCon, - WindowPtr pWin); -static int StartDoc( - XpContextPtr pCon, - XPDocumentType type); -static int EndDoc( - XpContextPtr pCon, - Bool cancel); -static int EndJob( - XpContextPtr pCon, - Bool cancel); -static int EndPage( - XpContextPtr pCon, - WindowPtr pWin); -static int DocumentData( - XpContextPtr pCon, - DrawablePtr pDraw, - char *pData, - int len_data, - char *pDoc_fmt, - int len_fmt, - char *pOptions, - int len_options, - ClientPtr client); -static int GetDocumentData( - XpContextPtr pContext, - ClientPtr client, - int maxBufferSize); -static void FreePageFiles( - RasterContextPrivPtr pWinPriv); -static int SystemCmd( - char *pCommand); -static Bool RasterCloseScreen( - int index, - ScreenPtr pScreen); -static int RasterInitContext(XpContextPtr pCon); -static Bool RasterDestroyContext(XpContextPtr pCon); -static char *RasterGetAttributes( - XpContextPtr pContext, - XPAttributes class); -static char *RasterGetOneAttribute(XpContextPtr pCon, - XPAttributes class, - char *attribute); -static int RasterSetAttributes(XpContextPtr pCon, - XPAttributes class, - char *attributes); -static int RasterAugmentAttributes(XpContextPtr pCon, - XPAttributes class, - char *attributes); -static int RasterMediumDimensions(XpContextPtr pCon, - CARD16 *width, - CARD16 *height); -static int RasterReproducibleArea(XpContextPtr pCon, - xRectangle *pRect); - -#define MAX(a,b) (((a) > (b)) ? (a) : (b)) -#define DOC_PCL 1 -#define DOC_RASTER 2 - -static DevPrivateKey RasterScreenPrivateKey = &RasterScreenPrivateKey; -static DevPrivateKey RasterContextPrivateKey = &RasterContextPrivateKey; -static char RASTER_DRIV_NAME[] = "XP-RASTER"; -static int doc_type = DOC_RASTER; - -#define ABSOLUTE_PCLCOMP_PATH1 "/usr/openwin/bin/pclcomp" -#define ABSOLUTE_PCLCOMP_PATH2 "/usr/X11/bin/pclcomp" - -static char *pcl3_output_cmds[] = { - "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -0 > %(OutFile)%", - "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -01 > %(OutFile)%", - "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -02 > %(OutFile)%", - "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -03 > %(OutFile)%", - "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -012 > %(OutFile)%", - "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -013 > %(OutFile)%", - "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -023 > %(OutFile)%", - "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -0123 > %(OutFile)%", - "xpr -device ljet -rv -landscape < %(InFile)% > %(OutFile)%", - "xpr -device ljet -rv < %(InFile)% | pclcomp -0 > %(OutFile)%", - "xpr -device ljet -rv < %(InFile)% | pclcomp -01 > %(OutFile)%", - "xpr -device ljet -rv < %(InFile)% | pclcomp -02 > %(OutFile)%", - "xpr -device ljet -rv < %(InFile)% | pclcomp -03 > %(OutFile)%", - "xpr -device ljet -rv < %(InFile)% | pclcomp -012 > %(OutFile)%", - "xpr -device ljet -rv < %(InFile)% | pclcomp -013 > %(OutFile)%", - "xpr -device ljet -rv < %(InFile)% | pclcomp -023 > %(OutFile)%", - "xpr -device ljet -rv < %(InFile)% | pclcomp -0123 > %(OutFile)%", - "xpr -device ljet -rv < %(InFile)% > %(OutFile)%"}; - -Bool -InitializeRasterDriver( - int ndx, - ScreenPtr pScreen, - int argc, - char **argv) -{ - int xRes, yRes; - int maxRes, maxDim, numBytes; - RasterScreenPrivPtr pPriv; - - /* - * Register this driver's InitContext function with the print extension. - * This is a bit - * sleazy, as the extension hasn't yet been initialized, but the - * extension needs to know this, and this seems the best time to - * provide the information. - */ - XpRegisterInitFunc( pScreen, RASTER_DRIV_NAME, RasterInitContext ); - - /* - * Create and load the devPrivate for the printer layer. - */ - AllocateRasterPrivates(pScreen); - - pPriv = (RasterScreenPrivPtr) - dixLookupPrivate(&pScreen->devPrivates, RasterScreenPrivateKey); - - maxDim = MAX( pScreen->height, pScreen->width ); - numBytes = maxDim + BITMAP_SCANLINE_PAD - 1; /* pixels per row */ - numBytes *= maxDim; - numBytes /= 8; /* bytes per row */ - xRes = pScreen->width / (pScreen->mmWidth / 25.4); - yRes = pScreen->height / (pScreen->mmHeight / 25.4); - maxRes = MAX( xRes, yRes ); - - pPriv->pBits = (char *)xalloc(numBytes); - - /* - * Have to allocate maxDim X maxDim to allow for landscape mode. - */ - fbScreenInit(pScreen, pPriv->pBits, maxDim, maxDim, maxRes, - maxRes, maxDim, 1); - miInitializeBackingStore(pScreen); - pScreen->blackPixel = 1; - pScreen->whitePixel = 0; - if(fbCreateDefColormap(pScreen) == FALSE) - ; /* XXX what do I do if it fails? */ - - pScreen->SaveScreen = (SaveScreenProcPtr)_XpBoolNoop; - pPriv->ChangeWindowAttributes = pScreen->ChangeWindowAttributes; - pScreen->ChangeWindowAttributes = RasterChangeWindowAttributes; - pPriv->CloseScreen = pScreen->CloseScreen; - pScreen->CloseScreen = RasterCloseScreen; - - return TRUE; -} - -/* - * GetPropString searches the context's config database for a property - * by the name of propName. If found, it returns the property's - * value, otherwise it returns NULL unless the requested attribute - * is RASTER_PRINT_PAGE_COMMAND, in which case it returns a hard-coded - * default string to invoke xpr to produce a PostScript(tm) formatted - * raster. - */ - -static char * -GetPropString( - XpContextPtr pCon, - char *propName) -{ - RasterContextPrivPtr pConPriv = (RasterContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey); - char *type; - XrmValue val; - struct stat status; - int pclcomp_exists = 0; - - if( XrmGetResource(pConPriv->config, propName, propName, &type, &val) == - True ) - return (char *)val.addr; - - if( !strcmp( propName, RASTER_PRINT_PAGE_COMMAND ) ) - if( doc_type == DOC_RASTER ) - return "xpr -device ps %(InFile)% > %(OutFile)%"; - else - { - XpOid orientation; - XpOid compression; - int pcl3_output_index = 0; - - orientation = XpGetContentOrientation(pCon); - compression = XpGetAvailableCompression(pCon); - - switch(orientation) { - case xpoid_val_content_orientation_landscape: - pcl3_output_index = 0; - break; - default: - pcl3_output_index += 9; - break; - } - - if(stat(ABSOLUTE_PCLCOMP_PATH1, &status) != -1) - pclcomp_exists = 1; - else if(stat(ABSOLUTE_PCLCOMP_PATH2, &status) != -1) - pclcomp_exists = 1; - - if(pclcomp_exists) - switch(compression) { - case xpoid_val_available_compressions_0: - pcl3_output_index += 0; - break; - case xpoid_val_available_compressions_01: - pcl3_output_index += 1; - break; - case xpoid_val_available_compressions_02: - pcl3_output_index += 2; - break; - case xpoid_val_available_compressions_03: - pcl3_output_index += 3; - break; - case xpoid_val_available_compressions_012: - pcl3_output_index += 4; - break; - case xpoid_val_available_compressions_013: - pcl3_output_index += 5; - break; - case xpoid_val_available_compressions_023: - pcl3_output_index += 6; - break; - default: - pcl3_output_index += 7; - break; - } - else - pcl3_output_index += 8; - - return pcl3_output_cmds[pcl3_output_index]; - } - else - return NULL; -} - -static void -SetDocumentType( - XpContextPtr pCon) -{ - XpOidList* attrs_supported; - - /* - * only validate attributes found in document-attributes-supported - */ - attrs_supported = - XpGetListAttr(pCon, XPPrinterAttr, - xpoid_att_document_attributes_supported, - (const XpOidList*)NULL); - - if(XpOidListHasOid(attrs_supported, xpoid_att_document_format)) - { - const char* value_in; - XpOidDocFmt *f; - - value_in = XpGetStringAttr(pCon, XPDocAttr, xpoid_att_document_format); - - f = XpOidDocFmtNew( value_in ); - - if( f != NULL ) - { - if( !strcmp( f->format, "PCL" ) ) - doc_type = DOC_PCL; - else - doc_type = DOC_RASTER; - - XpOidDocFmtDelete( f ); - } - } - - /* - * clean up - */ - XpOidListDelete(attrs_supported); -} - -static int -StartJob( - XpContextPtr pCon, - Bool sendClientData, - ClientPtr client) -{ - RasterContextPrivPtr pConPriv = (RasterContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey); - - SetDocumentType( pCon ); - - /* - * Check for existing page file, and delete it if it exists. - */ - if(pConPriv->pageFileName != (char *)NULL) - { - if(pConPriv->pPageFile != (FILE *)NULL) - { - fclose(pConPriv->pPageFile); - pConPriv->pPageFile = (FILE *)NULL; - } - unlink(pConPriv->pageFileName); - Xfree(pConPriv->pageFileName); - pConPriv->pageFileName = (char *)NULL; - } - - /* - * Create a temporary file to store the printer output. - */ - if(!sendClientData) - { - /* - * Create a temporary file to store the printer output. - */ - if (!XpOpenTmpFile("w", &pConPriv->jobFileName, &pConPriv->pJobFile)) - return BadAlloc; - } - - return Success; -} - -/* - * StartDoc and EndDoc are just no-ops in this implementation, since - * our view of the spooler really doesn't recognize documents. - */ - -static int -StartDoc( - XpContextPtr pCon, - XPDocumentType type) -{ - return Success; -} - -static int EndDoc( - XpContextPtr pCon, - Bool cancel) -{ - return Success; -} - -#if 0 - -/* XXX Not used. */ - -/* - * BuidArgVector takes a pointer to a comma-separated list of command - * options and splits it out into an array of argument pointers. The - * caller must not free the optionList after calling this function until - * the returned arg vector is no longer needed, at which time the arg - * vector should also be freed. - */ - -#define SEPARATOR_CHAR (char)',' - -static char ** -BuildArgVector( - char *optionList, - char **argVector, - int argCount) -{ - char *curArg, *lastChar, *endArg; - - curArg = optionList; - lastChar = optionList + strlen(optionList); /* includes final NULL */ - - while(curArg != (char *)NULL && curArg < lastChar) - { - /* strip leading white space */ - while(curArg < lastChar && isascii((int)*curArg) && - isspace((int)*curArg)) - curArg++; - - if(curArg < lastChar) - { - argVector = (char **)Xrealloc(argVector, - sizeof(char *) * (argCount + 2)); - argVector[argCount] = curArg; - argVector[++argCount] = (char *)NULL; - - endArg = strchr(curArg, SEPARATOR_CHAR); - - /* Should I strip trailing white space ??? */ - - if(endArg != (char *)NULL) - { - *endArg = (char)'\0'; - curArg = endArg + 1; - } - else - curArg = (char *)NULL; - } - } - - return argVector; -} -#endif - -static int -EndJob( - XpContextPtr pCon, - Bool cancel) -{ - RasterContextPrivPtr pConPriv = (RasterContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey); - - if( cancel == True ) - { - if(pConPriv->getDocClient != (ClientPtr)NULL) { - XpFinishDocData(pConPriv->getDocClient); - - pConPriv->getDocClient = (ClientPtr)NULL; - pConPriv->getDocBufSize = 0; - } - - if(pConPriv->jobFileName != (char *)NULL) - { - unlink(pConPriv->jobFileName); - Xfree(pConPriv->jobFileName); - pConPriv->jobFileName = (char *)NULL; - } - - return Success; - } - - if(pConPriv->getDocClient != (ClientPtr)NULL&&pConPriv->getDocBufSize > 0) - { - XpFinishDocData(pConPriv->getDocClient); - - pConPriv->getDocClient = (ClientPtr)NULL; - pConPriv->getDocBufSize = 0; - - return Success; - } - - if(pConPriv->pJobFile != (FILE *)NULL) - { - fclose(pConPriv->pJobFile); - pConPriv->pJobFile = (FILE *)NULL; - - if(pConPriv->jobFileName != (char *)NULL) - { - XpSubmitJob( pConPriv->jobFileName, pCon ); - unlink(pConPriv->jobFileName); - Xfree(pConPriv->jobFileName); - pConPriv->jobFileName = (char *)NULL; - } - } - - return Success; -} - -/* StartPage - * - * If page file exists - * close page file - * set page file pointer = NULL - * unlink page file - */ -static int -StartPage( - XpContextPtr pCon, - WindowPtr pWin) -{ - RasterContextPrivPtr pConPriv = (RasterContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey); - - if(pConPriv->pPageFile != (FILE *)NULL) - { - fclose(pConPriv->pPageFile); - pConPriv->pPageFile = (FILE *)NULL; - } - if(pConPriv->pageFileName != (char *)NULL) - { - unlink(pConPriv->pageFileName); - pConPriv->pageFileName = (char *)NULL; - } - - return Success; -} - -#include "X11/XWDFile.h" - - -#define lowbit(x) ((x) & (~(x) + 1)) - -/* - * Get the XWDColors of all pixels in colormap - returns # of colors - */ -static XWDColor * -Get_XWDColors( - ColormapPtr pCmap) -{ - int i, ncolors; - xrgb *prgbList; - Pixel *pPixels; - XWDColor *colors; - - ncolors = pCmap->pVisual->ColormapEntries; - if (!(colors = (XWDColor *) malloc (sizeof(XWDColor) * ncolors))) - return (XWDColor *) NULL; - if (!(prgbList = (xrgb*) malloc(sizeof(xrgb) * ncolors))) - { - Xfree(colors); - return (XWDColor *) NULL; - } - if (!(pPixels = (Pixel*) malloc(sizeof(Pixel) * ncolors))) - { - Xfree(colors); - Xfree(prgbList); - return (XWDColor *) NULL; - } - - if (pCmap->pVisual->class == DirectColor || - pCmap->pVisual->class == TrueColor) { - Pixel red, green, blue, red1, green1, blue1; - - red = green = blue = 0; - red1 = lowbit(pCmap->pVisual->redMask); - green1 = lowbit(pCmap->pVisual->greenMask); - blue1 = lowbit(pCmap->pVisual->blueMask); - for (i=0; i pCmap->pVisual->redMask) - red = 0; - green += green1; - if (green > pCmap->pVisual->greenMask) - green = 0; - blue += blue1; - if (blue > pCmap->pVisual->blueMask) - blue = 0; - } - } else { - for (i=0; idrawable; - XWDFileHeader header; - int win_name_size; - int header_size; - int ncolors, i; - char *win_name; - VisualPtr pVisual; - ColormapPtr pCmap; - XWDColor *pColors; - unsigned long swaptest = 1; - - widthBytesLine = PixmapBytePad(pWin->drawable.width, pWin->drawable.depth); - length = widthBytesLine * pWin->drawable.height; - height = pWin->drawable.height; - - if(length <= 0) - return Success; - - if (widthBytesLine >= IMAGE_BUFSIZE) - linesPerBuf = 1; - else - { - linesPerBuf = IMAGE_BUFSIZE / widthBytesLine; - if (linesPerBuf > height) - linesPerBuf = height; - } - length = linesPerBuf * widthBytesLine; - if (linesPerBuf < height) - { - /* we have to make sure intermediate buffers don't need padding */ - while ((linesPerBuf > 1) && (length & 3)) - { - linesPerBuf--; - length -= widthBytesLine; - } - while (length & 3) - { - linesPerBuf++; - length += widthBytesLine; - } - } - if(!(pBuf = (char *) Xalloc(length))) - return (BadAlloc); - - /* - * Start of Xwd header code. - */ - - /* - * XXX - Should we use the real window name??? - */ - win_name = "xwdump"; - /* sizeof(char) is included for the null string terminator. */ - win_name_size = strlen(win_name) + sizeof(char); - - pCmap = (ColormapPtr)LookupIDByType(wColormap (pWin), RT_COLORMAP); - pVisual = pCmap->pVisual; - if((pColors = Get_XWDColors(pCmap)) == (XWDColor *)NULL) - { - Xfree(pBuf); - return (BadAlloc); - } - - /* - * Write out header information. - */ - header_size = sizeof(header) + win_name_size; - header.header_size = (CARD32) header_size; - header.file_version = (CARD32) XWD_FILE_VERSION; - header.pixmap_format = (CARD32) ZPixmap; /* Must match GetImage below */ - header.pixmap_depth = (CARD32) pDraw->depth; - header.pixmap_width = (CARD32) pDraw->width; - header.pixmap_height = (CARD32) pDraw->height; - header.xoffset = (CARD32) 0; - header.byte_order = (CARD32) screenInfo.imageByteOrder; - header.bitmap_unit = (CARD32) screenInfo.bitmapScanlineUnit; - header.bitmap_bit_order = (CARD32) screenInfo.bitmapBitOrder; - header.bitmap_pad = (CARD32) screenInfo.bitmapScanlinePad; - header.bits_per_pixel = (CARD32) pDraw->bitsPerPixel; - header.bytes_per_line = (CARD32) widthBytesLine; - header.visual_class = (CARD32) pVisual->class; - header.red_mask = (CARD32) pVisual->redMask; - header.green_mask = (CARD32) pVisual->greenMask; - header.blue_mask = (CARD32) pVisual->blueMask; - header.bits_per_rgb = (CARD32) pVisual->bitsPerRGBValue; - header.colormap_entries = (CARD32) pVisual->ColormapEntries; - header.ncolors = ncolors = (CARD32) pVisual->ColormapEntries; - header.window_width = (CARD32) pDraw->width; - header.window_height = (CARD32) pDraw->height; - header.window_x = 0; - header.window_y = 0; - header.window_bdrwidth = (CARD32) 0; - - if (*(char *) &swaptest) { - _swaplong((char *) &header, sizeof(header)); - for (i = 0; i < ncolors; i++) { - _swaplong((char *) &pColors[i].pixel, sizeof(long)); - _swapshort((char *) &pColors[i].red, 3 * sizeof(short)); - } - } - - (void) fwrite((char *)&header, sizeof(header), 1, pRasterFile); - (void) fwrite(win_name, win_name_size, 1, pRasterFile); - (void) fwrite((char *) pColors, sizeof(XWDColor), ncolors, pRasterFile); - - Xfree(pColors); - - /* - * End of Xwd header code. - */ - - linesDone = 0; - while(height - linesDone > 0) - { - nlines = min(linesPerBuf, height - linesDone); - (*pDraw->pScreen->GetImage) (pDraw, - 0, - linesDone, - pWin->drawable.width, - nlines, - ZPixmap, - ~0, - pBuf); - - if(fwrite(pBuf, sizeof(char), (size_t)(nlines * widthBytesLine), - pRasterFile) != - (size_t)(nlines * widthBytesLine)) - { - Xfree(pBuf); - return BadAlloc; - } - linesDone += nlines; - } - Xfree(pBuf); - return Success; -} - - -static int -SendPage( XpContextPtr pCon ) -{ - struct stat statBuf; - RasterContextPrivPtr pConPriv = (RasterContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey); - - if(stat(pConPriv->pageFileName, &statBuf) < 0) - return BadAlloc; - - return XpSendDocumentData(pConPriv->getDocClient, - pConPriv->pPageFile, (int)statBuf.st_size, - pConPriv->getDocBufSize); -} - -/* - * EndPage: - * - * If page file doesn't exist: - * { - * Create page file - * Open page file - * Write page header to page file - * if(preRasterFile exists) - * copy preRasterFile contents to page file - * if(noRasterFile exists) - * write noRasterFile contents to page file - * else - * Create raster image file - * Open raster image file - * GetImage data - * Write Image data to raster image file - * invoke page_command on raster image file - * Write raster image file contents to page file - * Unlink tempPage file - * if(postRasterFile exists) - * write postRasterFile contents to page file - * Write page trailer to page file - * } - * Write page file to job file - */ -static int -EndPage( - XpContextPtr pCon, - WindowPtr pWin) -{ - RasterContextPrivPtr pConPriv = (RasterContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey); - struct stat statBuf; - char *rasterFileName = (char *)NULL, *pCommand = (char *)NULL; - FILE *pRasterFile = (FILE *)NULL; - - if(pConPriv->pageFileName == (char *)NULL) - { - /* - * Open the page file. - */ - if (!XpOpenTmpFile("w+", &pConPriv->pageFileName, - &pConPriv->pPageFile)) - goto BAD_PAGE_ALLOC; - - /* - * Copy any pre-raster document data to the page file. - */ - if(pConPriv->pPreRasterFile != (FILE *)NULL) - { - if(CopyContentsAndDelete(&pConPriv->pPreRasterFile, - &pConPriv->preRasterFileName, - pConPriv->pPageFile) == FALSE) - goto BAD_PAGE_ALLOC; - } - - /* - * Copy either the no-raster document data, or the raster - * data itself to the page file. - * If the no-raster file exists, then we don't process the - * actual window raster bits. - */ - if(pConPriv->pNoRasterFile != (FILE *)NULL) - { - if(CopyContentsAndDelete(&pConPriv->pNoRasterFile, - &pConPriv->noRasterFileName, - pConPriv->pPageFile) == FALSE) - goto BAD_PAGE_ALLOC; - } - else - { - /* - * Open the raster image file. - */ - if (!XpOpenTmpFile("w", &rasterFileName, &pRasterFile)) - goto BAD_PAGE_ALLOC; - - /* - * Write the page image data to the raster image file. - */ - if(WriteWindowRaster(pWin, pRasterFile) != Success) - goto BAD_PAGE_ALLOC; - - /* - * Invoke the page_command on the raster image file. - */ - if((pCommand = GetPropString(pCon, RASTER_PRINT_PAGE_COMMAND)) != - (char *)NULL) - { - char *outFileName; - FILE *pOutFile; - - if (!XpOpenTmpFile("w", &outFileName, &pOutFile)) - goto BAD_PAGE_ALLOC; - fclose(pOutFile); - - pCommand = ReplaceFileString(strdup(pCommand), rasterFileName, - outFileName); - fclose(pRasterFile); - SystemCmd(pCommand); - free(pCommand); - /* - * Delete the unprocessed raster file. - */ - unlink(rasterFileName); - Xfree(rasterFileName); - rasterFileName = outFileName; - if((pRasterFile = fopen(rasterFileName, "r")) == (FILE *)NULL) - goto BAD_PAGE_ALLOC; - } - else - { - fclose(pRasterFile); - if((pRasterFile = fopen(rasterFileName, "r")) == (FILE *)NULL) - goto BAD_PAGE_ALLOC; - } - - /* - * Copy the raster image file contents to the page file. - * Note that pRasterFile must be set to the start of the - * raster file. - */ - if(CopyContentsAndDelete(&pRasterFile, - &rasterFileName, - pConPriv->pPageFile) == FALSE) - goto BAD_PAGE_ALLOC; - } - - /* - * Copy any post-raster document data to the page file. - */ - if(pConPriv->pPostRasterFile != (FILE *)NULL) - { - if(CopyContentsAndDelete(&pConPriv->pPostRasterFile, - &pConPriv->postRasterFileName, - pConPriv->pPageFile) == FALSE) - goto BAD_PAGE_ALLOC; - } - - } - - /* - * Write the page file contents to the job file or to the client - * performing GetDocumentData. - * pConPriv->pPageFile must first be set to the start of the page file. - */ - rewind(pConPriv->pPageFile); - if(stat(pConPriv->pageFileName, &statBuf) < 0) - goto BAD_PAGE_ALLOC; - - /* - * Send the page data to whatever client has called GetDocumentData. - */ - if(pConPriv->getDocClient != (ClientPtr)NULL&&pConPriv->getDocBufSize > 0) - { - int retval; - /* - * We should do something like the following: suspend the - * caller until we can gracefully write all the data in small - * chunks to the receiver, but for now we'll just call WriteToClient - * on the huge chunk - */ - retval = SendPage(pCon); - fclose(pConPriv->pPageFile); - pConPriv->pPageFile = (FILE *)NULL; - unlink(pConPriv->pageFileName); - free(pConPriv->pageFileName); - pConPriv->pageFileName = (char *)NULL; - return retval; - } - - if(pConPriv->pJobFile == (FILE *)NULL) - { - /* - * This shouldn't be necessary. I believe we only get here if - * someone calls "EndPage" prior to "StartJob". This error - * condition should probably be trapped at a higher level. - */ - - if(pConPriv->jobFileName != (char *)NULL) - Xfree(pConPriv->jobFileName); - /* - * Create a temporary file to store the printer output. - */ - if (!XpOpenTmpFile("w", &pConPriv->jobFileName, &pConPriv->pJobFile)) - goto BAD_PAGE_ALLOC; - } - - if(TransferBytes(pConPriv->pPageFile, pConPriv->pJobFile, - (int)statBuf.st_size) != (int)statBuf.st_size) - goto BAD_PAGE_ALLOC; - - fclose(pConPriv->pPageFile); - pConPriv->pPageFile = (FILE *)NULL; - unlink(pConPriv->pageFileName); - free(pConPriv->pageFileName); - pConPriv->pageFileName = (char *)NULL; - - return Success; - - BAD_PAGE_ALLOC: - - FreePageFiles(pConPriv); - - if(pRasterFile != (FILE *)NULL) - fclose(pRasterFile); - if(rasterFileName != (char *)NULL) - { - unlink(rasterFileName); - Xfree(rasterFileName); - } - return BadAlloc; -} - -static int -DocumentData( - XpContextPtr pCon, - DrawablePtr pDraw, - char *pData, - int len_data, - char *pDoc_fmt, - int len_fmt, - char *pOptions, - int len_options, - ClientPtr client) -{ - RasterContextPrivPtr pConPriv = (RasterContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey); - char *preRasterStr = PRE_RASTER, *postRasterStr = POST_RASTER, - *noRasterStr = NO_RASTER; - - /* - * Check that options equals either PRE_RASTER or POST_RASTER. - */ - if(len_options == strlen(preRasterStr) && - strncmp(pOptions, preRasterStr, strlen(preRasterStr)) == 0) - { - if(pConPriv->pPreRasterFile == (FILE *)NULL) - { - if (!XpOpenTmpFile("w+", &pConPriv->preRasterFileName, - &pConPriv->pPreRasterFile)) - return BadAlloc; - } - if(fwrite(pData, sizeof(char), (size_t)len_data, - pConPriv->pPreRasterFile) != (size_t)len_data) - return BadAlloc; - fflush(pConPriv->pPreRasterFile); - } - else if(len_options == strlen(postRasterStr) && - strncmp(pOptions, postRasterStr, strlen(postRasterStr)) == 0) - { - if(pConPriv->pPostRasterFile == (FILE *)NULL) - { - if (!XpOpenTmpFile("w+", &pConPriv->postRasterFileName, - &pConPriv->pPostRasterFile)) - return BadAlloc; - } - if(fwrite(pData, sizeof(char), (size_t)len_data, - pConPriv->pPostRasterFile) != (size_t)len_data) - return BadAlloc; - fflush(pConPriv->pPostRasterFile); - } - else if(len_options == strlen(noRasterStr) && - strncmp(pOptions, noRasterStr, strlen(noRasterStr)) == 0) - { - if(pConPriv->pNoRasterFile == (FILE *)NULL) - { - if (!XpOpenTmpFile("w+", &pConPriv->noRasterFileName, - &pConPriv->pNoRasterFile)) - return BadAlloc; - } - if(fwrite(pData, sizeof(char), (size_t)len_data, - pConPriv->pNoRasterFile) != (size_t)len_data) - return BadAlloc; - fflush(pConPriv->pNoRasterFile); - } - else - return BadValue; - - return Success; -} - -/* - * GetDocumentData notes which client is requesting the document data for - * a particular context. The Raster driver's EndPage function causes the - * data to be written to the proper client. - */ -static int -GetDocumentData( - XpContextPtr pContext, - ClientPtr client, - int maxBufferSize) -{ - RasterContextPrivPtr pConPriv = (RasterContextPrivPtr) - dixLookupPrivate(&pContext->devPrivates, RasterContextPrivateKey); - - pConPriv->getDocClient = client; - pConPriv->getDocBufSize = maxBufferSize; - return Success; -} - -static void -AllocateRasterPrivates( - ScreenPtr pScreen) -{ - dixRequestPrivate(RasterContextPrivateKey, sizeof( RasterContextPrivRec ) ); - dixSetPrivate(&pScreen->devPrivates, RasterScreenPrivateKey, - Xalloc(sizeof(RasterScreenPrivRec))); -} - -/* - * RasterChangeWindowAttributes - Make sure that the window's backing - * store is turned on. - */ -static Bool -RasterChangeWindowAttributes( - WindowPtr pWin, - unsigned long mask) -{ - Bool status = Success; - ScreenPtr pScreen = pWin->drawable.pScreen; - RasterScreenPrivPtr pScreenPriv = (RasterScreenPrivPtr) - dixLookupPrivate(&pScreen->devPrivates, RasterScreenPrivateKey); - - if(pWin->backingStore == NotUseful) - { - pWin->backingStore = WhenMapped; - mask |= CWBackingStore; - } - - if(pScreenPriv->ChangeWindowAttributes != NULL) - { - pScreen->ChangeWindowAttributes = pScreenPriv->ChangeWindowAttributes; - status = pScreen->ChangeWindowAttributes(pWin, mask); - pScreen->ChangeWindowAttributes = RasterChangeWindowAttributes; - } - return status; -} - -/* - * RasterValidateDocFormats - Inspects the files available in the - * ddx-config/XP-RASTER directory to find the names of PDLs for which - * we have processing commands. These names are then intersected with - * the contents of the printer's document-formats-supported attribute, - * and the result is stored back into document-formats-supported. - * We have hard-coded knowledge of how to produce PS, so we always - * leave that in, if it's listed in document-formats-supported, - * even if we don't have a configuration file. If there is a - * configuration file for PS, then its contents will override our default. - */ -static void -RasterValidateDocFormats( - XpContextPtr pCon) -{ -} - -/* - * RasterValidateAttrs - Inspects and Corrects the attribute values - * in the specified context. - */ -static void -RasterValidateAttrs( - XpContextPtr pCon) -{ - RasterValidateDocFormats(pCon); - XpValidatePrinterPool(pCon, &RasterValidatePoolsRec); - XpValidateJobPool(pCon, &RasterValidatePoolsRec); - XpValidateDocumentPool(pCon, &RasterValidatePoolsRec); -} - -/* - * RasterInitContext - Establish the appropriate values for a - * PrintContext used with the Raster Driver. - */ -static char DOC_ATT_SUPP[]="document-attributes-supported:\tdefault-medium document-format"; -static char JOB_ATT_SUPP[]="job-attributes-supported:\t"; -static char DDX_DIR[]="ddx-config"; - -static int -RasterInitContext( - XpContextPtr pCon) -{ - char *configFileName, *val, *attrStr; - RasterContextPrivPtr pConPriv; - XpDriverFuncsPtr pFuncs; - - /* - * Initialize the attribute store for this printer. - */ - XpInitAttributes( pCon ); - - /* - * Validate the attributes - */ - RasterValidateAttrs( pCon ); - - - /* - * Initialize the function pointers - */ - pFuncs = &( pCon->funcs ); - pFuncs->StartJob = StartJob; - pFuncs->EndJob = EndJob; - pFuncs->StartDoc = StartDoc; - pFuncs->EndDoc = EndDoc; - pFuncs->StartPage = StartPage; - pFuncs->EndPage = EndPage; - pFuncs->PutDocumentData = DocumentData; - pFuncs->GetDocumentData = GetDocumentData; - pFuncs->DestroyContext = RasterDestroyContext; - pFuncs->GetAttributes = RasterGetAttributes; - pFuncs->GetOneAttribute = RasterGetOneAttribute; - pFuncs->SetAttributes = RasterSetAttributes; - pFuncs->AugmentAttributes = RasterAugmentAttributes; - pFuncs->GetMediumDimensions = RasterMediumDimensions; - pFuncs->GetReproducibleArea = RasterReproducibleArea; - - /* - * Set up the context privates - */ - pConPriv = (RasterContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey); - - pConPriv->jobFileName = (char *)NULL; - pConPriv->pageFileName = (char *)NULL; - pConPriv->preRasterFileName = (char *)NULL; - pConPriv->postRasterFileName = (char *)NULL; - pConPriv->noRasterFileName = (char *)NULL; - pConPriv->pJobFile = (FILE *)NULL; - pConPriv->pPageFile = (FILE *)NULL; - pConPriv->pPreRasterFile = (FILE *)NULL; - pConPriv->pPostRasterFile = (FILE *)NULL; - pConPriv->pNoRasterFile = (FILE *)NULL; - - pConPriv->getDocClient = (ClientPtr)NULL; - pConPriv->getDocBufSize = 0; - - /* - * Get the configuration information for the context's printer - */ - configFileName = XpGetOneAttribute( pCon, XPPrinterAttr, - "xp-ddx-config-file-name" ); - if(configFileName && strlen(configFileName)) - { - if( configFileName[0] == '/' ) - pConPriv->config = XrmGetFileDatabase( configFileName ); - else - { - char *configDir, *configFilePath; - - configDir = XpGetConfigDir(FALSE); - configFilePath = (char *)malloc((strlen(configDir) + - strlen(DDX_DIR) + - strlen(RASTER_DRIV_NAME) + - strlen(configFileName) + - 4)* sizeof(char)); - sprintf(configFilePath, "%s/%s/%s/%s", configDir, DDX_DIR, - RASTER_DRIV_NAME, configFileName); - pConPriv->config = XrmGetFileDatabase(configFilePath); - free(configDir); - free(configFilePath); - } - } - else - pConPriv->config = (XrmDatabase)NULL; - - /* - * Add our own attribute initialization - */ - /* - * document-attributes-supported - */ - val = XpGetOneAttribute(pCon, XPServerAttr, "document-attributes-supported"); - if((attrStr = (char *)xalloc(strlen(val) + strlen(DOC_ATT_SUPP) + 4)) == - (char *)NULL) - return BadAlloc; - sprintf(attrStr, "*%s %s", DOC_ATT_SUPP, val); - XpAugmentAttributes(pCon, XPPrinterAttr, attrStr); - xfree(attrStr); - - /* - * job-attributes-supported - */ - val = XpGetOneAttribute(pCon, XPServerAttr, "job-attributes-supported"); - if((attrStr = (char *)xalloc(strlen(val) + strlen(JOB_ATT_SUPP) + 4)) == - (char *)NULL) - return BadAlloc; - sprintf(attrStr, "*%s %s", JOB_ATT_SUPP, val); - XpAugmentAttributes(pCon, XPPrinterAttr, attrStr); - xfree(attrStr); - - /* - * PageAttributesSupported - */ - XpAugmentAttributes(pCon, XPPrinterAttr, "*xp-page-attributes-supported:"); - - return Success; -} - - - -static Bool -RasterDestroyContext( - XpContextPtr pCon) -{ - RasterContextPrivPtr pConPriv = (RasterContextPrivPtr) - dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey); - - /* - * Clean up the temporary files - */ - FreePageFiles( pConPriv ); - - if( pConPriv->pJobFile != (FILE *)NULL ) - { - fclose( pConPriv->pJobFile ); - pConPriv->pJobFile = (FILE *)NULL; - } - if( pConPriv->jobFileName != (char *)NULL ) - { - unlink( pConPriv->jobFileName ); - Xfree( pConPriv->jobFileName ); - } - if(pConPriv->config) - { - XrmDestroyDatabase(pConPriv->config); - pConPriv->config = (XrmDatabase)NULL; - } - - XpDestroyAttributes( pCon ); - return Success; -} - -static char * -RasterGetAttributes( - XpContextPtr pContext, - XPAttributes class) -{ - return XpGetAttributes( pContext, class ); -} - -static char * -RasterGetOneAttribute( - XpContextPtr pContext, - XPAttributes class, - char *attr) -{ - return XpGetOneAttribute( pContext, class, attr ); -} - -static int -RasterSetAttributes(XpContextPtr pCon, - XPAttributes class, - char *attributes) -{ - return XpSetAttributes( pCon, class, attributes ); -} - -static int -RasterAugmentAttributes( - XpContextPtr pCon, - XPAttributes class, - char *attributes) -{ - return XpAugmentAttributes( pCon, class, attributes ); -} - -static void -FreePageFiles( - RasterContextPrivPtr pConPriv) -{ - if(pConPriv->pPageFile != (FILE *)NULL) - { - fclose(pConPriv->pPageFile); - pConPriv->pPageFile = (FILE *)NULL; - } - if(pConPriv->pageFileName != (char *)NULL) - { - unlink(pConPriv->pageFileName); - Xfree(pConPriv->pageFileName); - pConPriv->pageFileName = (char *)NULL; - } - if(pConPriv->pPreRasterFile != (FILE *)NULL) - { - fclose(pConPriv->pPreRasterFile); - pConPriv->pPreRasterFile = (FILE *)NULL; - } - if(pConPriv->preRasterFileName != (char *)NULL) - { - unlink(pConPriv->preRasterFileName); - Xfree(pConPriv->preRasterFileName); - pConPriv->preRasterFileName = (char *)NULL; - } - if(pConPriv->pPostRasterFile != (FILE *)NULL) - { - fclose(pConPriv->pPostRasterFile); - pConPriv->pPostRasterFile = (FILE *)NULL; - } - if(pConPriv->postRasterFileName != (char *)NULL) - { - unlink(pConPriv->postRasterFileName); - Xfree(pConPriv->postRasterFileName); - pConPriv->postRasterFileName = (char *)NULL; - } - if(pConPriv->pNoRasterFile != (FILE *)NULL) - { - fclose(pConPriv->pNoRasterFile); - pConPriv->pNoRasterFile = (FILE *)NULL; - } - if(pConPriv->noRasterFileName != (char *)NULL) - { - unlink(pConPriv->noRasterFileName); - Xfree(pConPriv->noRasterFileName); - pConPriv->noRasterFileName = (char *)NULL; - } -} - -/* - * RasterCloseScreen - Call any wrapped CloseScreen function, - * and free the screen memory. - */ -static Bool -RasterCloseScreen( - int index, - ScreenPtr pScreen) -{ - Bool status = Success; - RasterScreenPrivPtr pScreenPriv = (RasterScreenPrivPtr) - dixLookupPrivate(&pScreen->devPrivates, RasterScreenPrivateKey); - - /* - * Call any wrapped CloseScreen proc. - */ - if(pScreenPriv->CloseScreen != NULL) - { - pScreen->CloseScreen = pScreenPriv->CloseScreen; - status = pScreen->CloseScreen(index, pScreen); - pScreen->CloseScreen = RasterCloseScreen; - } - - Xfree(pScreenPriv->pBits); - Xfree(pScreenPriv); - - return status; -} - -#include - -/* ARGSUSED */ -static void SigchldHndlr (int dummy) -{ - int status; - int olderrno = errno; - struct sigaction act; - sigfillset(&act.sa_mask); - act.sa_flags = 0; - act.sa_handler = SigchldHndlr; - - (void) wait (&status); - - /* - * Is this really necessary? - */ - sigaction(SIGCHLD, &act, (struct sigaction *)NULL); - errno = olderrno; -} - -/* - * SystemCmd provides a wrapper for the 'system' library call. The call - * appears to be sensitive to the handling of SIGCHLD, so this wrapper - * sets the status to SIG_DFL, and then resets the established handler - * after system returns. - */ -static int -SystemCmd(char *cmdStr) -{ - int status; - struct sigaction newAct, oldAct; - sigfillset(&newAct.sa_mask); - newAct.sa_flags = 0; - newAct.sa_handler = SIG_DFL; - sigfillset(&oldAct.sa_mask); - oldAct.sa_flags = 0; - oldAct.sa_handler = SigchldHndlr; - - /* - * get the old handler, and set the action to IGN - */ - sigaction(SIGCHLD, &newAct, &oldAct); - - status = system (cmdStr); - - sigaction(SIGCHLD, &oldAct, (struct sigaction *)NULL); - return status; -} - -/* - * RasterMediumDimensions is installed in the GetMediumDimensions field - * of each raster-initialized context. - */ -static int -RasterMediumDimensions(XpContextPtr pCon, - CARD16 *width, - CARD16 *height) -{ - XpGetMediumDimensions(pCon, width, height); - return Success; -} - -/* - * RasterReproducibleArea is installed in the GetReproducibleArea field - * of each raster-initialized context. - */ -static int -RasterReproducibleArea(XpContextPtr pCon, - xRectangle *pRect) -{ - XpGetReproductionArea(pCon, pRect); - return Success; -} diff --git a/hw/xprint/raster/Raster.h b/hw/xprint/raster/Raster.h deleted file mode 100644 index 7a613f0b0..000000000 --- a/hw/xprint/raster/Raster.h +++ /dev/null @@ -1,117 +0,0 @@ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ -/******************************************************************* -** -** ********************************************************* -** * -** * File: printer/Raster.h -** * -** * Contents: defines and includes for the raster layer -** * for a printing X server. -** * -** * Copyright: Copyright 1993 Hewlett-Packard Company -** * -** ********************************************************* -** -********************************************************************/ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _RASTER_H_ -#define _RASTER_H_ - -/* - * Some sleazes to force the XrmDB stuff into the server - */ -#ifndef HAVE_XPointer -#define HAVE_XPointer 1 -typedef char *XPointer; -#endif -#define Status int -#define True 1 -#define False 0 -#include "misc.h" -#include -#include -#include "attributes.h" - -#include - -#define MAX_TOKEN_LEN 512 - -#define RASTER_PRINT_PAGE_COMMAND "_XP_RASTER_PAGE_PROC_COMMAND" - -#define RASTER_IN_FILE_STRING "%(InFile)%" -#define RASTER_OUT_FILE_STRING "%(OutFile)%" - -#define RASTER_ALLOWED_COMMANDS_FILE "printCommands" - -/* - * Defines for the "options" in DtPrintDocumentData. - */ -#define PRE_RASTER "PRE-RASTER" -#define POST_RASTER "POST-RASTER" -#define NO_RASTER "NO-RASTER" - - -typedef struct { - char *pBits; - CreateWindowProcPtr CreateWindow; - ChangeWindowAttributesProcPtr ChangeWindowAttributes; - DestroyWindowProcPtr DestroyWindow; - CloseScreenProcPtr CloseScreen; -} RasterScreenPrivRec, *RasterScreenPrivPtr; - -typedef struct { - XrmDatabase config; - char *jobFileName; - FILE *pJobFile; - char *pageFileName; - FILE *pPageFile; - char *preRasterFileName; /* Pre-raster document data */ - FILE *pPreRasterFile; - char *noRasterFileName; /* Raster replacement document data */ - FILE *pNoRasterFile; - char *postRasterFileName; /* Post-raster document data */ - FILE *pPostRasterFile; - ClientPtr getDocClient; - int getDocBufSize; -} RasterContextPrivRec, *RasterContextPrivPtr; - - -extern XpValidatePoolsRec RasterValidatePoolsRec; - -extern Bool InitializeRasterDriver(int ndx, ScreenPtr pScreen, int argc, - char **argv); - -#endif /* _RASTER_H_ */ diff --git a/hw/xprint/raster/RasterAttVal.c b/hw/xprint/raster/RasterAttVal.c deleted file mode 100644 index 8189be47c..000000000 --- a/hw/xprint/raster/RasterAttVal.c +++ /dev/null @@ -1,267 +0,0 @@ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "misc.h" -#include "dixstruct.h" -#include "scrnintstr.h" -#include "screenint.h" -#include -#include "Raster.h" - -#include "attributes.h" -#include "AttrValid.h" - -/* - * define valid values and defaults for Printer pool - */ -static XpOid ValidContentOrientationsOids[] = { - xpoid_val_content_orientation_portrait, - xpoid_val_content_orientation_landscape -}; -static XpOidList ValidContentOrientations = { - ValidContentOrientationsOids, XpNumber(ValidContentOrientationsOids) -}; - -static XpOid DefaultContentOrientationsOids[] = { - xpoid_val_content_orientation_portrait, - xpoid_val_content_orientation_landscape -}; -static XpOidList DefaultContentOrientations = { - DefaultContentOrientationsOids, XpNumber(DefaultContentOrientationsOids) -}; - -static XpOid ValidPlexesOids[] = { - xpoid_val_plex_simplex -}; -static XpOidList ValidPlexes = { - ValidPlexesOids, XpNumber(ValidPlexesOids) -}; - -static XpOid DefaultPlexesOids[] = { - xpoid_val_plex_simplex -}; -static XpOidList DefaultPlexes = { - DefaultPlexesOids, XpNumber(DefaultPlexesOids) -}; - -static unsigned long ValidPrinterResolutionsCards[] = { - 150, 300, 600 -}; -static XpOidCardList ValidPrinterResolutions = { - ValidPrinterResolutionsCards, XpNumber(ValidPrinterResolutionsCards) -}; - -static unsigned long DefaultPrinterResolutionsCards[] = { - 300 -}; -static XpOidCardList DefaultPrinterResolutions = { - DefaultPrinterResolutionsCards, XpNumber(DefaultPrinterResolutionsCards) -}; - -static XpOid ValidListfontsModesOids[] = { - xpoid_val_xp_list_glyph_fonts -}; -static XpOidList ValidListfontsModes = { - ValidListfontsModesOids, XpNumber(ValidListfontsModesOids) -}; - -static XpOid DefaultListfontsModesOids[] = { - xpoid_val_xp_list_glyph_fonts -}; -static XpOidList DefaultListfontsModes = { - DefaultListfontsModesOids, XpNumber(DefaultListfontsModesOids) -}; - -static XpOid ValidSetupProvisoOids[] = { - xpoid_val_xp_setup_mandatory, xpoid_val_xp_setup_optional -}; -static XpOidList ValidSetupProviso = { - ValidSetupProvisoOids, XpNumber(ValidSetupProvisoOids) -}; - -static XpOidDocFmt ValidDocFormatsSupportedFmts[] = { - { "Postscript", "2", NULL }, - { "PCL", "3", NULL } -}; -static XpOidDocFmtList ValidDocFormatsSupported = { - ValidDocFormatsSupportedFmts, XpNumber(ValidDocFormatsSupportedFmts) -}; - -static XpOidDocFmt DefaultDocFormatsSupportedFmts[] = { - { "Postscript", "2", NULL } -}; -static XpOidDocFmtList DefaultDocFormatsSupported = { - DefaultDocFormatsSupportedFmts, XpNumber(DefaultDocFormatsSupportedFmts) -}; - -static XpOidDocFmtList ValidEmbeddedFormatsSupported = { - (XpOidDocFmt *)NULL, 0 -}; - -static XpOidDocFmtList DefaultEmbeddedFormatsSupported = { - (XpOidDocFmt *)NULL, 0 -}; - -static XpOidDocFmt ValidRawFormatsSupportedFmts[] = { - { "Postscript", "2", NULL }, - { "PCL", "3", NULL } -}; -static XpOidDocFmtList ValidRawFormatsSupported = { - ValidRawFormatsSupportedFmts, XpNumber(ValidRawFormatsSupportedFmts) -}; - -static XpOidDocFmt DefaultRawFormatsSupportedFmts[] = { - { "Postscript", "2", NULL } -}; -static XpOidDocFmtList DefaultRawFormatsSupported = { - DefaultRawFormatsSupportedFmts, XpNumber(DefaultRawFormatsSupportedFmts) -}; - -static XpOidList ValidInputTrays = { - (XpOid *)NULL, 0 -}; - -static XpOid ValidMediumSizesOids[] = { - xpoid_val_medium_size_iso_a0, - xpoid_val_medium_size_iso_a1, - xpoid_val_medium_size_iso_a2, - xpoid_val_medium_size_iso_a3, - xpoid_val_medium_size_iso_a4, - xpoid_val_medium_size_iso_a5, - xpoid_val_medium_size_iso_a6, - xpoid_val_medium_size_iso_a7, - xpoid_val_medium_size_iso_a8, - xpoid_val_medium_size_iso_a9, - xpoid_val_medium_size_iso_a10, - xpoid_val_medium_size_iso_b0, - xpoid_val_medium_size_iso_b1, - xpoid_val_medium_size_iso_b2, - xpoid_val_medium_size_iso_b3, - xpoid_val_medium_size_iso_b4, - xpoid_val_medium_size_iso_b5, - xpoid_val_medium_size_iso_b6, - xpoid_val_medium_size_iso_b7, - xpoid_val_medium_size_iso_b8, - xpoid_val_medium_size_iso_b9, - xpoid_val_medium_size_iso_b10, - xpoid_val_medium_size_na_letter, - xpoid_val_medium_size_na_legal, - xpoid_val_medium_size_executive, - xpoid_val_medium_size_folio, - xpoid_val_medium_size_invoice, - xpoid_val_medium_size_ledger, - xpoid_val_medium_size_quarto, - xpoid_val_medium_size_iso_c3, - xpoid_val_medium_size_iso_c4, - xpoid_val_medium_size_iso_c5, - xpoid_val_medium_size_iso_c6, - xpoid_val_medium_size_iso_designated_long, - xpoid_val_medium_size_na_10x13_envelope, - xpoid_val_medium_size_na_9x12_envelope, - xpoid_val_medium_size_na_number_10_envelope, - xpoid_val_medium_size_na_7x9_envelope, - xpoid_val_medium_size_na_9x11_envelope, - xpoid_val_medium_size_na_10x14_envelope, - xpoid_val_medium_size_na_number_9_envelope, - xpoid_val_medium_size_monarch_envelope, - xpoid_val_medium_size_a, - xpoid_val_medium_size_b, - xpoid_val_medium_size_c, - xpoid_val_medium_size_d, - xpoid_val_medium_size_e, - xpoid_val_medium_size_jis_b0, - xpoid_val_medium_size_jis_b1, - xpoid_val_medium_size_jis_b2, - xpoid_val_medium_size_jis_b3, - xpoid_val_medium_size_jis_b4, - xpoid_val_medium_size_jis_b5, - xpoid_val_medium_size_jis_b6, - xpoid_val_medium_size_jis_b7, - xpoid_val_medium_size_jis_b8, - xpoid_val_medium_size_jis_b9, - xpoid_val_medium_size_jis_b10 -}; -static XpOidList ValidMediumSizes = { - ValidMediumSizesOids, XpNumber(ValidMediumSizesOids) -}; - -static XpOidDocFmt DefaultDocumentFormat = { - "Postscript", "2", NULL -}; - -static XpOid ValidAvailableCompressionsOids[] = { - xpoid_val_available_compressions_0, - xpoid_val_available_compressions_01, - xpoid_val_available_compressions_02, - xpoid_val_available_compressions_03, - xpoid_val_available_compressions_012, - xpoid_val_available_compressions_013, - xpoid_val_available_compressions_023, - xpoid_val_available_compressions_0123 -}; - -static XpOidList ValidAvailableCompressions = { - ValidAvailableCompressionsOids, XpNumber(ValidAvailableCompressionsOids) -}; - -static XpOid DefaultAvailableCompressionsOids[] = { - xpoid_val_available_compressions_0123, - xpoid_val_available_compressions_0 -}; - -static XpOidList DefaultAvailableCompressions = { - DefaultAvailableCompressionsOids, XpNumber(DefaultAvailableCompressionsOids) -}; - - -/* - * init struct for XpValidate*Pool - */ -XpValidatePoolsRec RasterValidatePoolsRec = { - &ValidContentOrientations, &DefaultContentOrientations, - &ValidDocFormatsSupported, &DefaultDocFormatsSupported, - &ValidInputTrays, &ValidMediumSizes, - &ValidPlexes, &DefaultPlexes, - &ValidPrinterResolutions, &DefaultPrinterResolutions, - &ValidEmbeddedFormatsSupported, &DefaultEmbeddedFormatsSupported, - &ValidListfontsModes, &DefaultListfontsModes, - &ValidRawFormatsSupported, &DefaultRawFormatsSupported, - &ValidSetupProviso, - &DefaultDocumentFormat, - &ValidAvailableCompressions, &DefaultAvailableCompressions -}; diff --git a/hw/xprint/spooler.c b/hw/xprint/spooler.c deleted file mode 100644 index 69b5eed0e..000000000 --- a/hw/xprint/spooler.c +++ /dev/null @@ -1,202 +0,0 @@ -/* -Copyright (c) 2003-2004 Roland Mainz -Copyright (c) 2004 Sun Microsystems, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef __hpux -#include -#endif - -#include "spooler.h" - -/* - * The string LIST_QUEUES_* is fed to a shell to generate an ordered - * list of available printers on the system. These string definitions - * are taken from the file PrintSubSys.C within the code for the - * dtprintinfo program. - */ -#define LIST_QUEUES_AIX4 \ - "lsallq | grep -v '^bsh$' | sort | uniq" - -#define LIST_QUEUES_HPUX \ - "LANG=C lpstat -v | " \ - "awk '" \ - " $2 == \"for\" " \ - " { " \ - " x = match($3, /:/); " \ - " print substr($3, 1, x-1)" \ - " }' | sort | uniq" - -#define LIST_QUEUES_OSF \ - "LANG=C lpstat -v | " \ - "nawk '" \ - " $2 == \"for\" " \ - " { print $4 }' " \ - " | sort | uniq" - -#define LIST_QUEUES_UXP \ - "LANG=C lpstat -v |" \ - "nawk '" \ - " $4 == \"for\" " \ - " { " \ - " x = match($5, /:/); " \ - " print substr($5, 1, x-1)" \ - " }' | sort | uniq" - -/* Support both normal and LPRng output of "lpc status" */ -#define LIST_QUEUES_BSD \ - "PATH=\"${PATH}:/usr/bin:/usr/sbin:/bin:/sbin\"\n" \ - "export PATH\n" \ - \ - "which_tool()\n" \ - "{\n" \ - " echo \"${PATH}\" | tr \":\" \"\n\" | while read i ; do ls -1ad \"${i}/${1}\" 2>/dev/null ; done\n" \ - "}\n" \ - \ - "(\n" \ - "WHICH_LPC=\"`which_tool lpc`\"\n" \ - \ - "if [ \"`which_tool nawk`\" != \"\" ] ; then\n" \ - " NAWK=\"nawk\"\n" \ - "else\n" \ - " NAWK=\"awk\"\n" \ - "fi\n" \ - \ - "[ \"${WHICH_LPC}\" != \"\" ] && (LANG=C lpc status | ${NAWK} '/^[^ ]*:$/ && !/@/ && !/ / { print $1 }' | sed -e /:/s///)\n" \ - "[ \"${WHICH_LPC}\" != \"\" ] && (LANG=C lpc -a status | ${NAWK} '/^[^ ]*@[^ ]/ && !/:$/ { split( $1, name, \"@\" ); print name[1]; }')\n" \ - ") | egrep -v -i \" |^all$\" | sort | uniq" - -#define LIST_QUEUES_SYSV \ - "PATH=\"${PATH}:/usr/bin:/usr/sbin:/bin:/sbin\"\n" \ - "export PATH\n" \ - \ - "which_tool()\n" \ - "{\n" \ - " echo \"${PATH}\" | tr \":\" \"\n\" | while read i ; do ls -1ad \"${i}/${1}\" 2>/dev/null ; done\n" \ - "}\n" \ - \ - "(\n" \ - "WHICH_LPSTAT=\"`which_tool lpstat`\"\n" \ - \ - "if [ \"`which_tool nawk`\" != \"\" ] ; then\n" \ - " NAWK=\"nawk\"\n" \ - "else\n" \ - " NAWK=\"awk\"\n" \ - "fi\n" \ - \ - "[ \"${WHICH_LPSTAT}\" != \"\" ] && (LANG=C lpstat -v | ${NAWK} ' $2 == \"for\" { x = match($3, /:/); print substr($3, 1, x-1) }')\n" \ - ") | egrep -v -i \" |^all$\" | sort | uniq" - -#define LIST_QUEUES_SOLARIS "LANG=C lpget -k description " \ - "`lpstat -v " \ - "| nawk '$2 == \"for\" { x = match($3, /:/); print substr($3, 1,x-1) }' " \ - "| sort -u` " \ - "| nawk -F: ' NF == 2 { name=$1 } " \ - " NF == 1 { sub(\"^.*description\\( - undefined|=\\)\",\"\"); " \ - " printf \"%s\txp-printerattr.descriptor=%s\\n\", name, $1 } '" - -#define LIST_QUEUES_OTHER \ - "LANG=C lpstat -v | " \ - "nawk '" \ - " $2 == \"for\" " \ - " { " \ - " x = match($3, /:/); " \ - " print substr($3, 1, x-1)" \ - " }' | sort | uniq" - -#define DEFAULT_SPOOL_COMMAND_HPUX "/usr/bin/lp -d %printer-name% -o raw -n %copy-count% -t %job-name% %options%" -#define DEFAULT_SPOOL_COMMAND_BSD "/usr/bin/lpr -P %printer-name% -#%copy-count% -T %job-name% %options%" -#define DEFAULT_SPOOL_COMMAND_SYSV "/usr/bin/lp -d %printer-name% -n %copy-count% -t %job-name% %options%" -#define DEFAULT_SPOOL_COMMAND_SOLARIS "/usr/bin/lp -d %printer-name% -n %copy-count% -t %job-name% %options%" -#define DEFAULT_SPOOL_COMMAND_OTHER "/usr/bin/lp -d %printer-name% -n %copy-count% -t %job-name% %options%" - - -/* List of spooler types and the commands used to enumerate - * print queues and submit print jobs */ -XpSpoolerType xpstm[] = -{ - /* OS-specific spoolers */ - { "aix", LIST_QUEUES_AIX4, DEFAULT_SPOOL_COMMAND_OTHER }, - { "aix4", LIST_QUEUES_AIX4, DEFAULT_SPOOL_COMMAND_OTHER }, - { "bsd", LIST_QUEUES_BSD, DEFAULT_SPOOL_COMMAND_BSD }, - { "osf", LIST_QUEUES_OSF, DEFAULT_SPOOL_COMMAND_OTHER }, - { "solaris", LIST_QUEUES_SOLARIS, DEFAULT_SPOOL_COMMAND_SOLARIS }, - { "sysv", LIST_QUEUES_SYSV, DEFAULT_SPOOL_COMMAND_SYSV }, - { "uxp", LIST_QUEUES_UXP, DEFAULT_SPOOL_COMMAND_OTHER }, - /* crossplatform spoolers */ - { "cups", LIST_QUEUES_SYSV, DEFAULT_SPOOL_COMMAND_SYSV }, - { "lprng", LIST_QUEUES_BSD, DEFAULT_SPOOL_COMMAND_BSD }, - /* misc */ - { "other", LIST_QUEUES_OTHER, DEFAULT_SPOOL_COMMAND_OTHER }, - { "none", NULL, NULL }, - { NULL, NULL, NULL } -}; - -/* Used by Init.c and attributes.c */ -XpSpoolerTypePtr spooler_type = NULL; - -XpSpoolerTypePtr XpSpoolerNameToXpSpoolerType(char *name) -{ - XpSpoolerTypePtr curr = xpstm; - - while( curr->name != NULL ) - { - if( !strcasecmp(name, curr->name) ) - return curr; - - curr++; - } - - return NULL; -} - -static char *spooler_namelist = NULL; - -char *XpGetSpoolerTypeNameList(void) -{ - if( spooler_namelist ) - return spooler_namelist; - - return XPDEFAULTSPOOLERNAMELIST; -} - -void XpSetSpoolerTypeNameList(char *namelist) -{ - spooler_namelist = namelist; -} - - diff --git a/hw/xprint/spooler.h b/hw/xprint/spooler.h deleted file mode 100644 index 4e056ceeb..000000000 --- a/hw/xprint/spooler.h +++ /dev/null @@ -1,75 +0,0 @@ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef SPOOLER_H -#define SPOOLER_H 1 - -/* -Copyright (c) 2003-2004 Roland Mainz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -/* - * Define platform-specific default spooler type - */ -#if defined(sun) -#define XPDEFAULTSPOOLERNAMELIST "solaris" -#elif defined(AIXV4) -#define XPDEFAULTSPOOLERNAMELIST "aix4" -#elif defined(hpux) -#define XPDEFAULTSPOOLERNAMELIST "hpux" -#elif defined(__osf__) -#define XPDEFAULTSPOOLERNAMELIST "osf" -#elif defined(__uxp__) -#define XPDEFAULTSPOOLERNAMELIST "uxp" -#elif defined(CSRG_BASED) || defined(linux) -/* ToDo: This should be "cups:bsd" in the future, but for now - * the search order first-bsd-then-cups is better for backwards - * compatibility. - */ -#define XPDEFAULTSPOOLERNAMELIST "bsd:cups" -#else -#define XPDEFAULTSPOOLERNAMELIST "other" -#endif - -typedef struct -{ - const char *name; - const char *list_queues_command; - const char *spool_command; -} XpSpoolerType, *XpSpoolerTypePtr; - -/* prototypes */ -extern XpSpoolerTypePtr XpSpoolerNameToXpSpoolerType(char *name); -extern void XpSetSpoolerTypeNameList(char *namelist); -extern char *XpGetSpoolerTypeNameList(void); - -/* global vars */ -extern XpSpoolerTypePtr spooler_type; -extern XpSpoolerType xpstm[]; - -#endif /* !SPOOLER_H */ - diff --git a/include/dix.h b/include/dix.h index 0790f5847..8e79d4c07 100644 --- a/include/dix.h +++ b/include/dix.h @@ -116,9 +116,6 @@ typedef struct _Client *ClientPtr; /* also in misc.h */ typedef struct _WorkQueue *WorkQueuePtr; -#ifdef XPRINT -extern ClientPtr requestingClient; -#endif extern ClientPtr *clients; extern ClientPtr serverClient; extern int currentMaxClients; diff --git a/mi/miinitext.c b/mi/miinitext.c index 8689ee49b..9a8736061 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -88,34 +88,6 @@ SOFTWARE. #undef GLXEXT #endif -/* Make sure Xprt only announces extensions it supports */ -#ifdef PRINT_ONLY_SERVER -#undef MITSHM /* this is incompatible to the vector-based Xprint DDX */ -#undef XKB -#undef PANORAMIX -#undef RES -#undef XINPUT -#undef XV -#undef SCREENSAVER -#undef XIDLE -#undef XRECORD -#undef XF86VIDMODE -#undef XF86MISC -#undef XFreeXDGA -#undef XF86DRI -#undef DPMSExtension -#undef FONTCACHE -#undef COMPOSITE -#undef DAMAGE -#undef XFIXES -#undef XEVIE -#else -#ifndef LOADABLEPRINTDDX -#undef XPRINT -#endif /* LOADABLEPRINTDDX */ -#endif /* PRINT_ONLY_SERVER */ - - extern Bool noTestExtensions; #ifdef BIGREQS @@ -228,9 +200,6 @@ typedef void (*InitExtension)(INITARGS); #ifdef XKB #include #endif -#ifdef XPRINT -#include -#endif #ifdef XCSECURITY #include "securitysrv.h" #include @@ -304,9 +273,6 @@ extern void SecurityExtensionInit(INITARGS); #ifdef XSELINUX extern void SELinuxExtensionInit(INITARGS); #endif -#ifdef XPRINT -extern void XpExtensionInit(INITARGS); -#endif #ifdef XF86BIGFONT extern void XFree86BigfontExtensionInit(INITARGS); #endif @@ -495,7 +461,7 @@ InitExtensions(argc, argv) char *argv[]; { #ifdef PANORAMIX -# if !defined(PRINT_ONLY_SERVER) && !defined(NO_PANORAMIX) +# if !defined(NO_PANORAMIX) if (!noPanoramiXExtension) PanoramiXExtensionInit(); # endif #endif @@ -526,7 +492,7 @@ InitExtensions(argc, argv) #ifdef XTRAP if (!noTestExtensions) DEC_XTRAPInit(); #endif -#if defined(SCREENSAVER) && !defined(PRINT_ONLY_SERVER) +#if defined(SCREENSAVER) if (!noScreenSaverExtension) ScreenSaverExtensionInit (); #endif #ifdef XV @@ -538,7 +504,7 @@ InitExtensions(argc, argv) #ifdef XSYNC if (!noSyncExtension) SyncExtensionInit(); #endif -#if defined(XKB) && !defined(PRINT_ONLY_SERVER) +#if defined(XKB) if (!noXkbExtension) XkbExtensionInit(); #endif #ifdef XCMISC @@ -556,9 +522,6 @@ InitExtensions(argc, argv) #ifdef XSELINUX if (!noSELinuxExtension) SELinuxExtensionInit(); #endif -#ifdef XPRINT - XpExtensionInit(); /* server-specific extension, cannot be disabled */ -#endif #if defined(DPMSExtension) && !defined(NO_HW_ONLY_EXTS) if (!noDPMSExtension) DPMSExtensionInit(); #endif @@ -568,7 +531,7 @@ InitExtensions(argc, argv) #ifdef XF86BIGFONT if (!noXFree86BigfontExtension) XFree86BigfontExtensionInit(); #endif -#if !defined(PRINT_ONLY_SERVER) && !defined(NO_HW_ONLY_EXTS) +#if !defined(NO_HW_ONLY_EXTS) #if defined(XF86VIDMODE) if (!noXFree86VidModeExtension) XFree86VidModeExtensionInit(); #endif @@ -641,9 +604,6 @@ static ExtensionModule staticExtensions[] = { #ifdef XCSECURITY { SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, NULL, NULL }, #endif -#ifdef XPRINT - { XpExtensionInit, XP_PRINTNAME, NULL, NULL, NULL }, -#endif #ifdef PANORAMIX { PanoramiXExtensionInit, PANORAMIX_PROTOCOL_NAME, &noPanoramiXExtension, NULL, NULL }, #endif diff --git a/os/utils.c b/os/utils.c index 07296dfc5..9aa510b4e 100644 --- a/os/utils.c +++ b/os/utils.c @@ -128,10 +128,6 @@ OR PERFORMANCE OF THIS SOFTWARE. #include "picture.h" #endif -#ifdef XPRINT -#include "DiPrint.h" -#endif - _X_EXPORT Bool noTestExtensions; #ifdef BIGREQS _X_EXPORT Bool noBigReqExtension = FALSE; @@ -613,9 +609,6 @@ void UseMsg(void) ErrorF("-render [default|mono|gray|color] set render color alloc policy\n"); #endif ErrorF("-s # screen-saver timeout (minutes)\n"); -#ifdef XPRINT - PrinterUseMsg(); -#endif ErrorF("-su disable any save under support\n"); ErrorF("-t # mouse threshold (pixels)\n"); ErrorF("-terminate terminate at server reset\n"); @@ -1027,12 +1020,6 @@ ProcessCommandLine(int argc, char *argv[]) i = skip - 1; } #endif -#ifdef XPRINT - else if ((skip = PrinterOptions(argc, argv, i)) != i) - { - i = skip - 1; - } -#endif #ifdef AIXV3 else if ( strcmp( argv[i], "-timeout") == 0) { From 86678e7cc2b021851ff508433fa160170f500c51 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 12 May 2008 14:53:37 -0400 Subject: [PATCH 492/634] Fix fbdevhw initialization for PCI drivers. graphics/fb%d, not graphics:fb%d. Thanks sysfs. Thysfs. --- hw/xfree86/fbdevhw/fbdevhw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c index a1f67486f..4d514226e 100644 --- a/hw/xfree86/fbdevhw/fbdevhw.c +++ b/hw/xfree86/fbdevhw/fbdevhw.c @@ -310,12 +310,12 @@ fbdev_open_pci(struct pci_device * pPci, char **namep) /* There are two ways to that we can determine which fb device is * associated with this PCI device. The more modern way is to look in * the sysfs directory for the PCI device for a file named - * "graphics:fb*" + * "graphics/fb*" */ for (i = 0; i < 8; i++) { sprintf(filename, - "/sys/bus/pci/devices/%04x:%02x:%02x.%d/graphics:fb%d", + "/sys/bus/pci/devices/%04x:%02x:%02x.%d/graphics/fb%d", pPci->domain, pPci->bus, pPci->dev, pPci->func, i); fd = open(filename, O_RDONLY, 0); From c50b5d978981b13cdb22a9ad41c1b64f90cebe51 Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Sun, 4 May 2008 13:45:27 -0700 Subject: [PATCH 493/634] Bug #14692: Allow drivers to have a say in Xinerama visual consolidation. Create a new exported global variable, XineramaVisualsEqualPtr. Use this pointer to decide whether two visuals are equal during visual consolidation. This pointer can be wrapped, which allows drivers and extensions to control which visuals are consolidated. A wrapper can reject the visuals without calling down, but must call down and return that result if it deems the visuals equal. This ensures that all layers agree that the visuals are equal. Pass the screen of the other visual into the VisualsEqual callchain. Don't free PanoramiXVisuals since we need it for PanoramiXTranslateVisualID. Don't skip the first visual on the other screen in PanoramiXMaybeAddVisual. Skip the loop in PanoramiXTranslateVisualID if screen is 0. --- Xext/panoramiX.c | 33 +++++++++++++++++++++------------ Xext/panoramiXsrv.h | 10 ++++++++++ 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index f92414764..eb7068925 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -87,6 +87,9 @@ _X_EXPORT unsigned long XRT_PIXMAP; _X_EXPORT unsigned long XRT_GC; _X_EXPORT unsigned long XRT_COLORMAP; +static Bool VisualsEqual(VisualPtr, ScreenPtr, VisualPtr); +_X_EXPORT XineramaVisualsEqualProcPtr XineramaVisualsEqualPtr = &VisualsEqual; + /* * Function prototypes */ @@ -668,10 +671,10 @@ Bool PanoramiXCreateConnectionBlock(void) connSetupPrefix.length = length >> 2; - xfree(PanoramiXVisuals); for (i = 0; i < PanoramiXNumDepths; i++) xfree(PanoramiXDepths[i].vids); xfree(PanoramiXDepths); + PanoramiXDepths = NULL; /* * OK, change some dimensions so it looks as if it were one big screen @@ -709,7 +712,7 @@ Bool PanoramiXCreateConnectionBlock(void) * do their own back-mapping. */ static Bool -VisualsEqual(VisualPtr a, VisualPtr b) +VisualsEqual(VisualPtr a, ScreenPtr pScreenB, VisualPtr b) { return ((a->class == b->class) && (a->ColormapEntries == b->ColormapEntries) && @@ -759,7 +762,6 @@ static void PanoramiXMaybeAddVisual(VisualPtr pVisual) { ScreenPtr pScreen; - VisualPtr candidate = NULL; int j, k; Bool found = FALSE; @@ -767,10 +769,10 @@ PanoramiXMaybeAddVisual(VisualPtr pVisual) pScreen = screenInfo.screens[j]; found = FALSE; - candidate = pScreen->visuals; for (k = 0; k < pScreen->numVisuals; k++) { - candidate++; - if (VisualsEqual(pVisual, candidate) + VisualPtr candidate = &pScreen->visuals[k]; + + if ((*XineramaVisualsEqualPtr)(pVisual, pScreen, candidate) #ifdef GLXPROXY && glxMatchVisual(screenInfo.screens[0], pVisual, pScreen) #endif @@ -844,8 +846,13 @@ PanoramiXConsolidate(void) _X_EXPORT VisualID PanoramiXTranslateVisualID(int screen, VisualID orig) { + ScreenPtr pOtherScreen = screenInfo.screens[screen]; VisualPtr pVisual = NULL; - int i, j; + int i; + + /* if screen is 0, orig is already the correct visual ID */ + if (screen == 0) + return orig; for (i = 0; i < PanoramiXNumVisuals; i++) { if (orig == PanoramiXVisuals[i].vid) { @@ -858,11 +865,13 @@ PanoramiXTranslateVisualID(int screen, VisualID orig) return 0; /* found the original, now translate it relative to the backend screen */ - for (i = 0; i < PanoramiXNumScreens; i++) - for (j = 0; j < screenInfo.screens[i]->numVisuals; j++) - if (VisualsEqual(pVisual, &screenInfo.screens[i]->visuals[j])) - return screenInfo.screens[i]->visuals[j].vid; - + for (i = 0; i < pOtherScreen->numVisuals; i++) { + VisualPtr pOtherVisual = &pOtherScreen->visuals[i]; + + if ((*XineramaVisualsEqualPtr)(pVisual, pOtherScreen, pOtherVisual)) + return pOtherVisual->vid; + } + return 0; } diff --git a/Xext/panoramiXsrv.h b/Xext/panoramiXsrv.h index 6d556e963..d5c3d9827 100644 --- a/Xext/panoramiXsrv.h +++ b/Xext/panoramiXsrv.h @@ -30,6 +30,16 @@ extern unsigned long XRT_PIXMAP; extern unsigned long XRT_GC; extern unsigned long XRT_COLORMAP; +/* + * Drivers are allowed to wrap this function. Each wrapper can decide that the + * two visuals are unequal, but if they are deemed equal, the wrapper must call + * down and return FALSE if the wrapped function does. This ensures that all + * layers agree that the visuals are equal. The first visual is always from + * screen 0. + */ +typedef Bool (*XineramaVisualsEqualProcPtr)(VisualPtr, ScreenPtr, VisualPtr); +extern XineramaVisualsEqualProcPtr XineramaVisualsEqualPtr; + extern void XineramaGetImageData( DrawablePtr *pDrawables, int left, From 248a1df63430717550adb0e79068d8f9fcfacb0b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 12 May 2008 20:05:21 +0930 Subject: [PATCH 494/634] render: don't dereference cursor if cursor is NULL. --- render/animcur.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/render/animcur.c b/render/animcur.c index a87718d12..362607f7a 100644 --- a/render/animcur.c +++ b/render/animcur.c @@ -93,7 +93,7 @@ static CursorBits animCursorBits = { static int AnimCurGeneration; static DevPrivateKey AnimCurScreenPrivateKey = &AnimCurScreenPrivateKey; -#define IsAnimCur(c) ((c)->bits == &animCursorBits) +#define IsAnimCur(c) ((c) && ((c)->bits == &animCursorBits)) #define GetAnimCur(c) ((AnimCurPtr) ((c) + 1)) #define GetAnimCurScreen(s) ((AnimCurScreenPtr)dixLookupPrivate(&(s)->devPrivates, AnimCurScreenPrivateKey)) #define GetAnimCurScreenIfSet(s) GetAnimCurScreen(s) From 913989d643595030e67e7c0a758a16ae0da62ed9 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 12 May 2008 20:05:43 +0930 Subject: [PATCH 495/634] mi: don't try to display a cursor for devices w/o cursors. --- mi/mipointer.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mi/mipointer.c b/mi/mipointer.c index 8f8086cc9..572af1b88 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -199,6 +199,11 @@ miPointerDisplayCursor (pDev, pScreen, pCursor) if (!pDev->isMaster && !pDev->u.master) return FALSE; + /* return for keyboards */ + if ((pDev->isMaster && !DevHasCursor(pDev)) || + (!pDev->isMaster && pDev->u.master && !DevHasCursor(pDev->u.master))) + return; + pPointer = MIPOINTER(pDev); pPointer->pCursor = pCursor; @@ -449,7 +454,7 @@ miPointerUpdateSprite (DeviceIntPtr pDev) else if (pPointer->pCursor != pPointer->pSpriteCursor) { pCursor = pPointer->pCursor; - if (pCursor->bits->emptyMask && !pScreenPriv->showTransparent) + if (!pCursor || (pCursor->bits->emptyMask && !pScreenPriv->showTransparent)) pCursor = NullCursor; (*pScreenPriv->spriteFuncs->SetCursor) (pDev, pScreen, pCursor, x, y); @@ -461,7 +466,7 @@ miPointerUpdateSprite (DeviceIntPtr pDev) { pPointer->devx = x; pPointer->devy = y; - if(!pPointer->pCursor->bits->emptyMask) + if(pPointer->pCursor && !pPointer->pCursor->bits->emptyMask) (*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y); } } From 1fc1a2897e9185838c29d9ffff07c39d2fdf174f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 12 May 2008 20:14:05 +0930 Subject: [PATCH 496/634] Remove UndisplayCursor API. We can achieve the same thing by simply displaying a NullCursor, there's no need for a separate API. --- dix/devices.c | 6 ++---- hw/xfree86/ramdac/xf86Cursor.c | 16 +--------------- include/scrnintstr.h | 5 ----- mi/mipointer.c | 13 ------------- mi/mipointer.h | 4 ---- mi/misprite.c | 19 ------------------- 6 files changed, 3 insertions(+), 60 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 802bf79d0..82eece7e0 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -854,9 +854,7 @@ UndisplayDevices() ScreenPtr screen = screenInfo.screens[0]; for (dev = inputInfo.devices; dev; dev = dev->next) - { - screen->UndisplayCursor(dev, screen); - } + screen->DisplayCursor(dev, screen, NullCursor); } /** @@ -887,7 +885,7 @@ RemoveDevice(DeviceIntPtr dev) return BadImplementation; initialized = dev->inited; - screen->UndisplayCursor(dev, screen); + screen->DisplayCursor(dev, screen, NullCursor); deviceid = dev->id; DisableDevice(dev); diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c index 010575b2e..4d64f6218 100644 --- a/hw/xfree86/ramdac/xf86Cursor.c +++ b/hw/xfree86/ramdac/xf86Cursor.c @@ -38,8 +38,7 @@ static miPointerSpriteFuncRec xf86CursorSpriteFuncs = { xf86CursorSetCursor, xf86CursorMoveCursor, xf86DeviceCursorInitialize, - xf86DeviceCursorCleanup, - xf86DeviceCursorUndisplay + xf86DeviceCursorCleanup }; /* Screen functions */ @@ -504,16 +503,3 @@ xf86DeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) (*ScreenPriv->spriteFuncs->DeviceCursorCleanup)(pDev, pScreen); } -/** - * Called on server shutdown to remove all cursors from the screen before - * bringing the server down. - */ -static void -xf86DeviceCursorUndisplay(DeviceIntPtr pDev, ScreenPtr pScreen) -{ - xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( - &pScreen->devPrivates, xf86CursorScreenKey); - - /* Undisplay SW cursor */ - (*ScreenPriv->spriteFuncs->UndisplayCursor)(pDev, pScreen); -} diff --git a/include/scrnintstr.h b/include/scrnintstr.h index 8a1de4a2b..6cf933304 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -440,10 +440,6 @@ typedef void (* MarkUnrealizedWindowProcPtr)( WindowPtr /*pWin*/, Bool /*fromConfigure*/); -typedef void (* UndisplayCursorProcPtr)( - DeviceIntPtr /* pDev */, - ScreenPtr /* pScreen */); - typedef Bool (* DeviceCursorInitializeProcPtr)( DeviceIntPtr /* pDev */, ScreenPtr /* pScreen */); @@ -601,7 +597,6 @@ typedef struct _Screen { MarkUnrealizedWindowProcPtr MarkUnrealizedWindow; /* Device cursor procedures */ - UndisplayCursorProcPtr UndisplayCursor; DeviceCursorInitializeProcPtr DeviceCursorInitialize; DeviceCursorCleanupProcPtr DeviceCursorCleanup; } ScreenRec; diff --git a/mi/mipointer.c b/mi/mipointer.c index 572af1b88..82439474c 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -60,7 +60,6 @@ static Bool miPointerUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); static Bool miPointerDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); -static void miPointerUndisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen); static void miPointerConstrainCursor(DeviceIntPtr pDev, ScreenPtr pScreen, BoxPtr pBox); static void miPointerPointerNonInterestBox(DeviceIntPtr pDev, @@ -113,8 +112,6 @@ miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) pScreen->ConstrainCursor = miPointerConstrainCursor; pScreen->CursorLimits = miPointerCursorLimits; pScreen->DisplayCursor = miPointerDisplayCursor; - pScreen->UndisplayCursor = miPointerUndisplayCursor; - pScreen->UndisplayCursor = miPointerUndisplayCursor; pScreen->RealizeCursor = miPointerRealizeCursor; pScreen->UnrealizeCursor = miPointerUnrealizeCursor; pScreen->SetCursorPosition = miPointerSetCursorPosition; @@ -212,16 +209,6 @@ miPointerDisplayCursor (pDev, pScreen, pCursor) return TRUE; } -static void -miPointerUndisplayCursor(pDev, pScreen) - DeviceIntPtr pDev; - ScreenPtr pScreen; -{ - SetupScreen(pScreen); - if (pDev->isMaster && pDev->spriteInfo->spriteOwner) - (*pScreenPriv->spriteFuncs->UndisplayCursor)(pDev, pScreen); -} - static void miPointerConstrainCursor (pDev, pScreen, pBox) DeviceIntPtr pDev; diff --git a/mi/mipointer.h b/mi/mipointer.h index ed518d184..5cbf5270d 100644 --- a/mi/mipointer.h +++ b/mi/mipointer.h @@ -62,10 +62,6 @@ typedef struct _miPointerSpriteFuncRec { DeviceIntPtr /* pDev */, ScreenPtr /* pScr */ ); - void (*UndisplayCursor)( - DeviceIntPtr /* pDev */, - ScreenPtr /* pScr */ - ); } miPointerSpriteFuncRec, *miPointerSpriteFuncPtr; typedef struct _miPointerScreenFuncRec { diff --git a/mi/misprite.c b/mi/misprite.c index 9e4b6851e..12180235f 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -125,7 +125,6 @@ static void miSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y); static void miSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y); -static void miSpriteUndisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen); _X_EXPORT miPointerSpriteFuncRec miSpritePointerFuncs = { miSpriteRealizeCursor, @@ -134,7 +133,6 @@ _X_EXPORT miPointerSpriteFuncRec miSpritePointerFuncs = { miSpriteMoveCursor, miSpriteDeviceCursorInitialize, miSpriteDeviceCursorCleanup, - miSpriteUndisplayCursor }; /* @@ -911,23 +909,6 @@ miSpriteDeviceCursorCleanup(pDev, pScreen) } } -static void -miSpriteUndisplayCursor(pDev, pScreen) - DeviceIntPtr pDev; - ScreenPtr pScreen; -{ - miCursorInfoPtr pCursorInfo; - - if (!pDev->isMaster && !pDev->u.master) - { - ErrorF("[mi] miSpriteUndisplayCursor called for floating device.\n"); - return; - } - pCursorInfo = MISPRITE(pDev); - if (pCursorInfo && pCursorInfo->isUp) - miSpriteRemoveCursor(pDev, pScreen); -} - /* * undraw/draw cursor */ From 59b8d29b3a91c65787dfadb5610342a62e85c48c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 12 May 2008 21:22:54 +0930 Subject: [PATCH 497/634] Xi: Fix up ProcIVector, got out of sync with the protocol. When the opcode squash happened in the protocol, the processing vector got out of sync for a few requests. As a result, client and server would interpret requests differently, leading to a couple of BadLength problems. --- Xi/extinit.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Xi/extinit.c b/Xi/extinit.c index 1d68d1e27..613472ab6 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -212,11 +212,11 @@ static int (*ProcIVector[])(ClientPtr) = { ProcXWarpDevicePointer, /* 37 */ ProcXChangeDeviceCursor, /* 38 */ ProcXChangeDeviceHierarchy, /* 39 */ - ProcXiSelectEvent, /* 40 */ - ProcXChangeWindowAccess, /* 41 */ - ProcXQueryWindowAccess, /* 42 */ - ProcXSetClientPointer, /* 43 */ - ProcXGetClientPointer, /* 44 */ + ProcXChangeWindowAccess, /* 40 */ + ProcXQueryWindowAccess, /* 41 */ + ProcXSetClientPointer, /* 42 */ + ProcXGetClientPointer, /* 43 */ + ProcXiSelectEvent, /* 44 */ ProcXExtendedGrabDevice /* 45 */ }; @@ -262,11 +262,11 @@ static int (*SProcIVector[])(ClientPtr) = { SProcXWarpDevicePointer, /* 37 */ SProcXChangeDeviceCursor, /* 38 */ SProcXChangeDeviceHierarchy, /* 39 */ - SProcXiSelectEvent, /* 40 */ - SProcXChangeWindowAccess, /* 41 */ - SProcXQueryWindowAccess, /* 42 */ - SProcXSetClientPointer, /* 43 */ - SProcXGetClientPointer, /* 44 */ + SProcXChangeWindowAccess, /* 40 */ + SProcXQueryWindowAccess, /* 41 */ + SProcXSetClientPointer, /* 42 */ + SProcXGetClientPointer, /* 43 */ + SProcXiSelectEvent, /* 44 */ SProcXExtendedGrabDevice /* 45 */ }; From 8234af6c6a3ade13f7720743bde79957c7df3f6c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 13 May 2008 11:17:39 +0930 Subject: [PATCH 498/634] xfree86: remove Ubuntu-ism. Additional #include was required due to broken libc headers or something like that. Remove it, there's more to the world than ubuntu alone. --- hw/xfree86/os-support/linux/lnx_agp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/xfree86/os-support/linux/lnx_agp.c b/hw/xfree86/os-support/linux/lnx_agp.c index 300b08df6..ded9e0fae 100644 --- a/hw/xfree86/os-support/linux/lnx_agp.c +++ b/hw/xfree86/os-support/linux/lnx_agp.c @@ -10,7 +10,6 @@ #ifdef HAVE_XORG_CONFIG_H #include -#include #endif #include From ed65e8b4f02a6da7f1c5d85984a9ccf6a94d0181 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 12 May 2008 18:49:34 -0700 Subject: [PATCH 499/634] Check for strcasestr and workaround it on systems without it --- config/hal.c | 13 +++++++++++++ configure.ac | 2 +- include/dix-config.h.in | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/config/hal.c b/config/hal.c index 67ffa0304..e197cb1b4 100644 --- a/config/hal.c +++ b/config/hal.c @@ -260,7 +260,17 @@ device_added(LibHalContext *hal_ctx, const char *udi) * Since we can't predict the order in which the keys * arrive, we need to store them. */ +#ifndef HAVE_STRCASESTR + int psi_key_len = strlen(psi_key); + char *lower_psi_key = xalloc(psi_key_len + 1); + + CopyISOLatin1Lowered((unsigned char *) lower_psi_key, + (unsigned char *) psi_key, + psi_key_len); + if ((tmp = strstr(lower_psi_key, "xkb"))) +#else if ((tmp = strcasestr(psi_key, "xkb"))) +#endif { if (!strcasecmp(&tmp[3], "layout")) { @@ -289,6 +299,9 @@ device_added(LibHalContext *hal_ctx, const char *udi) add_option(&options, psi_key + sizeof(LIBHAL_PROP_KEY)-1, tmp_val); xfree(tmp_val); } +#ifndef HAVE_STRCASESTR + xfree(lower_psi_key); +#endif } } else if (!strncasecmp(psi_key, LIBHAL_XKB_PROP_KEY, sizeof(LIBHAL_XKB_PROP_KEY)-1)){ diff --git a/configure.ac b/configure.ac index d78f12292..8716ba51d 100644 --- a/configure.ac +++ b/configure.ac @@ -191,7 +191,7 @@ dnl Checks for library functions. AC_FUNC_VPRINTF AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr \ strtol getopt getopt_long vsnprintf walkcontext backtrace \ - getisax getzoneid shmctl64]) + getisax getzoneid shmctl64 strcasestr]) AC_FUNC_ALLOCA dnl Old HAS_* names used in os/*.c. AC_CHECK_FUNC([getdtablesize], diff --git a/include/dix-config.h.in b/include/dix-config.h.in index 387f65aa1..914ce4947 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -205,6 +205,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H +/* Define to 1 if you have the `strcasestr' function. */ +#undef HAVE_STRCASESTR + /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR From 8b3802d32041547fd6ed5393a56281c5c83d260e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 13 May 2008 13:47:52 +0930 Subject: [PATCH 500/634] Xext: core button events have rootX/Y unset too. --- Xext/xtest.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Xext/xtest.c b/Xext/xtest.c index e11f35876..e96375db7 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -455,12 +455,9 @@ ProcXTestFakeInput(client) case ButtonRelease: if (!extension) dev = PickPointer(client); - else - { - /* For XI events, the rootX/Y is unset. */ - ev->u.keyButtonPointer.rootX = dev->lastx; - ev->u.keyButtonPointer.rootY = dev->lasty; - } + + ev->u.keyButtonPointer.rootX = dev->lastx; + ev->u.keyButtonPointer.rootY = dev->lasty; if (!ev->u.u.detail || ev->u.u.detail > dev->button->numButtons) { client->errorValue = ev->u.u.detail; From dc3aba8a559d4304844ee1cc306c577a63b82762 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 13 May 2008 14:37:26 +0930 Subject: [PATCH 501/634] Xext: emulate XI events from core events when faking input. We need XI events for event processing, so lets get rid of the pure core events ASAP. --- Xext/xtest.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Xext/xtest.c b/Xext/xtest.c index e96375db7..791f6a24d 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -52,6 +52,7 @@ #include "modinit.h" extern int DeviceValuator; +extern int DeviceMotionNotify; #ifdef PANORAMIX #include "panoramiX.h" @@ -235,6 +236,26 @@ ProcXTestFakeInput(client) client->errorValue = ev->u.u.type; return BadValue; } + + ev->u.u.type += (DeviceValuator - 1); + if (ev->u.u.type == DeviceMotionNotify) + { + /* fake up valuator */ + xEvent *ne = xalloc(2 * sizeof(xEvent)); + if (ne) { + memcpy(ne, ev, sizeof(xEvent)); + memcpy(&ne[1], ev, sizeof(xEvent)); + ev = ne; + + dv = (deviceValuator*)(ne + 1); + dv->type = DeviceValuator; + dv->first_valuator = 0; + dv->num_valuators = 2; + dv->valuator0 = ev->u.keyButtonPointer.rootX; + dv->valuator1 = ev->u.keyButtonPointer.rootY; + nev = 2; + } + } } /* If the event has a time set, wait for it to pass */ @@ -338,6 +359,7 @@ ProcXTestFakeInput(client) values += 6; } } + /* For XI events, the actual event is mostly unset. Since we * want to update the sprite nontheless, we need to fake up * sane values for the event. */ @@ -468,6 +490,7 @@ ProcXTestFakeInput(client) if (screenIsSaved == SCREEN_SAVER_ON) dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); ev->u.keyButtonPointer.time = currentTime.milliseconds; + if (!dev->isMaster && dev->u.master) { /* duplicate and route through master */ xEvent *master_event = NULL; @@ -477,6 +500,8 @@ ProcXTestFakeInput(client) xfree(master_event); } else (*dev->public.processInputProc)(ev, dev, nev); + if (extension) + xfree(ev); return client->noClientException; } From 7cdc19b29d93bf15cecfd6b69e269fab2501bca0 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 13 May 2008 16:39:30 -0700 Subject: [PATCH 502/634] When XKB fails to open rules file, log the file name, not the NULL file pointer --- xkb/ddxLoad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c index 1fb097987..842c146f8 100644 --- a/xkb/ddxLoad.c +++ b/xkb/ddxLoad.c @@ -401,7 +401,7 @@ XkbRF_RulesPtr rules; file = fopen(buf, "r"); if (!file) { - LogMessage(X_ERROR, "XKB: Couldn't open rules file %s\n", file); + LogMessage(X_ERROR, "XKB: Couldn't open rules file %s\n", buf); return False; } From a6659291c798f417a76d9aa7944694ff27c01fa7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 14 May 2008 09:42:50 +0930 Subject: [PATCH 503/634] mi: protect against NULL-pointer dereference. Required by the recent patch to use a NullCursor instead of UndisplayCursor(). --- mi/mipointer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mi/mipointer.c b/mi/mipointer.c index 82439474c..2c226dc71 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -357,7 +357,7 @@ miPointerWarpCursor (pDev, pScreen, x, y) { pPointer->devx = x; pPointer->devy = y; - if(!pPointer->pCursor->bits->emptyMask) + if(pPointer->pCursor && !pPointer->pCursor->bits->emptyMask) (*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y); } pPointer->x = x; @@ -541,7 +541,7 @@ miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, { pPointer->devx = x; pPointer->devy = y; - if(!pPointer->pCursor->bits->emptyMask) + if(pPointer->pCursor && !pPointer->pCursor->bits->emptyMask) (*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y); } From da728f2127aaa5c1ed5d22bb9f3d0c8ff19e4933 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 14 May 2008 15:17:05 +0930 Subject: [PATCH 504/634] dix: don't use serverClient in AddInputDevice, use the one supplied instead. We pass in the client that wants to create the device anyway, lets use the parameter instead of hardcoding the serverClient. Wow. I hope this is merge detritus, otherwise it'd be a sign that I didn't have enough coffee that day. --- dix/devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index 82eece7e0..644ee29a0 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -169,7 +169,7 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) /* security creation/labeling check */ - if (XaceHook(XACE_DEVICE_ACCESS, serverClient, dev, DixCreateAccess)) { + if (XaceHook(XACE_DEVICE_ACCESS, client, dev, DixCreateAccess)) { xfree(dev); return NULL; } From 00db0f35acc00cb771ab1c23f35b0db1c25d81bb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 14 May 2008 15:29:28 +0930 Subject: [PATCH 505/634] dix: InitAndStartDevices doesn't need a window parameter. Leftover from the old pointer-keyboard pairing code, obsolete and gone now. --- dix/devices.c | 2 +- dix/main.c | 2 +- include/input.h | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 644ee29a0..05a6b51af 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -539,7 +539,7 @@ InitCoreDevices(void) * @return Success or error code on failure. */ int -InitAndStartDevices(WindowPtr root) +InitAndStartDevices() { DeviceIntPtr dev, next; diff --git a/dix/main.c b/dix/main.c index 5dce3dfd2..42d33091a 100644 --- a/dix/main.c +++ b/dix/main.c @@ -412,7 +412,7 @@ int main(int argc, char *argv[], char *envp[]) InitCoreDevices(); InitInput(argc, argv); - if (InitAndStartDevices(WindowTable[0]) != Success) + if (InitAndStartDevices() != Success) FatalError("failed to initialize core devices"); dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); diff --git a/include/input.h b/include/input.h index ec6ac90e1..13902d77e 100644 --- a/include/input.h +++ b/include/input.h @@ -231,9 +231,7 @@ extern Bool ActivateDevice( extern Bool DisableDevice( DeviceIntPtr /*device*/); -extern int InitAndStartDevices( - WindowPtr /*root*/); - +extern int InitAndStartDevices(void); extern void CloseDownDevices(void); From 68b4f250eef441a3d75e3b9b2665a51d3a1538d6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 14 May 2008 16:18:48 +0930 Subject: [PATCH 506/634] dmx: fix build. Just because it builds, doesn't mean it works. --- hw/dmx/dmxcursor.c | 18 +++++++++--------- hw/dmx/dmxcursor.h | 2 +- hw/dmx/dmxinput.h | 4 ++-- hw/dmx/input/dmxeq.c | 8 +++++--- hw/dmx/input/dmxevents.c | 27 ++++++++++++++------------- hw/dmx/input/dmxinputinit.c | 2 +- 6 files changed, 32 insertions(+), 29 deletions(-) diff --git a/hw/dmx/dmxcursor.c b/hw/dmx/dmxcursor.c index 8a801169c..3dcbc3364 100644 --- a/hw/dmx/dmxcursor.c +++ b/hw/dmx/dmxcursor.c @@ -178,14 +178,14 @@ static void dmxCrossScreen(ScreenPtr pScreen, Bool entering) { } -static void dmxWarpCursor(ScreenPtr pScreen, int x, int y) +static void dmxWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { DMXDBG3("dmxWarpCursor(%d,%d,%d)\n", pScreen->myNum, x, y); #if 11 /*BP*/ /* This call is depracated. Replace with???? */ - miPointerWarpCursor(pScreen, x, y); + miPointerWarpCursor(pDev, pScreen, x, y); #else - pScreen->SetCursorPosition(pScreen, x, y, FALSE); + pScreen->SetCursorPosition(pDev, pScreen, x, y, FALSE); #endif } @@ -753,7 +753,7 @@ static void _dmxSetCursor(ScreenPtr pScreen, CursorPtr pCursor, int x, int y) if (dmxScreen->beDisplay) dmxSync(dmxScreen, TRUE); } -static Bool dmxRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) +static Bool dmxRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { DMXScreenInfo *start = &dmxScreens[pScreen->myNum]; DMXScreenInfo *pt; @@ -771,7 +771,7 @@ static Bool dmxRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) return TRUE; } -static Bool dmxUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) +static Bool dmxUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { DMXScreenInfo *start = &dmxScreens[pScreen->myNum]; DMXScreenInfo *pt; @@ -794,14 +794,14 @@ static CursorPtr dmxFindCursor(DMXScreenInfo *start) DMXScreenInfo *pt; if (!start || !start->over) - return GetSpriteCursor(); + return GetSpriteCursor(inputInfo.pointer); for (pt = start->over; /* condition at end of loop */; pt = pt->over) { if (pt->cursor) return pt->cursor; if (pt == start) break; } - return GetSpriteCursor(); + return GetSpriteCursor(inputInfo.pointer); } /** Move the cursor to coordinates (\a x, \a y)on \a pScreen. This @@ -813,7 +813,7 @@ static CursorPtr dmxFindCursor(DMXScreenInfo *start) * back-end screens and see if they contain the global coord. If so, call * _dmxMoveCursor() (XWarpPointer) to position the pointer on that screen. */ -void dmxMoveCursor(ScreenPtr pScreen, int x, int y) +void dmxMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { DMXScreenInfo *start = &dmxScreens[pScreen->myNum]; DMXScreenInfo *pt; @@ -860,7 +860,7 @@ void dmxMoveCursor(ScreenPtr pScreen, int x, int y) } } -static void dmxSetCursor(ScreenPtr pScreen, CursorPtr pCursor, int x, int y) +static void dmxSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y) { DMXScreenInfo *start = &dmxScreens[pScreen->myNum]; DMXScreenInfo *pt; diff --git a/hw/dmx/dmxcursor.h b/hw/dmx/dmxcursor.h index d909bd01e..da8ea5e85 100644 --- a/hw/dmx/dmxcursor.h +++ b/hw/dmx/dmxcursor.h @@ -55,7 +55,7 @@ extern void dmxReInitOrigins(void); extern void dmxInitOrigins(void); extern void dmxInitOverlap(void); extern void dmxCursorNoMulti(void); -extern void dmxMoveCursor(ScreenPtr pScreen, int x, int y); +extern void dmxMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y); extern void dmxCheckCursor(void); extern int dmxOnScreen(int x, int y, DMXScreenInfo *dmxScreen); extern void dmxHideCursor(DMXScreenInfo *dmxScreen); diff --git a/hw/dmx/dmxinput.h b/hw/dmx/dmxinput.h index 8a3ccdcbd..7af7b1801 100644 --- a/hw/dmx/dmxinput.h +++ b/hw/dmx/dmxinput.h @@ -141,8 +141,8 @@ extern void dmxUpdateWindowInfo(DMXUpdateType type, WindowPtr pWindow); /* These functions are defined in input/dmxeq.c */ extern Bool dmxeqInitialized(void); -extern void dmxeqEnqueue(xEvent *e); -extern void dmxeqSwitchScreen(ScreenPtr pScreen, Bool fromDIX); +extern void dmxeqEnqueue(DeviceIntPtr pDev, xEvent *e); +extern void dmxeqSwitchScreen(DeviceIntPtr pDev, ScreenPtr pScreen, Bool fromDIX); /* This type is used in input/dmxevents.c. Also, these functions are * defined in input/dmxevents.c */ diff --git a/hw/dmx/input/dmxeq.c b/hw/dmx/input/dmxeq.c index afa2b2cd3..86ba960b8 100644 --- a/hw/dmx/input/dmxeq.c +++ b/hw/dmx/input/dmxeq.c @@ -99,6 +99,7 @@ typedef struct _Event { xEvent event; /**< Event. */ ScreenPtr pScreen; /**< Screen on which event occurred. */ deviceValuator valuator; /**< XInput device valuator information. */ + DeviceIntPtr pDev; } EventRec, *EventPtr; /** Event queue. */ @@ -154,7 +155,7 @@ Bool dmxeqInit(DevicePtr pKbd, DevicePtr pPtr) * called from regular code. */ -void dmxeqEnqueue(xEvent *e) +void dmxeqEnqueue(DeviceIntPtr pDev, xEvent *e) { HWEventQueueType oldtail, newtail; Bool isMotion; @@ -179,6 +180,7 @@ void dmxeqEnqueue(xEvent *e) /* Store the event in the queue */ dmxEventQueue.events[oldtail].event = *e; + dmxEventQueue.events[oldtail].pDev = pDev; /* If this is an XInput event, store the * valuator event, too */ deviceKeyButtonPointer *ev = (deviceKeyButtonPointer *)e; @@ -197,7 +199,7 @@ void dmxeqEnqueue(xEvent *e) /** Make \a pScreen the new screen for enqueueing events. If \a fromDIX * is TRUE, also make \a pScreen the new screen for dequeuing events. */ -void dmxeqSwitchScreen(ScreenPtr pScreen, Bool fromDIX) +void dmxeqSwitchScreen(DeviceIntPtr pDev, ScreenPtr pScreen, Bool fromDIX) { dmxEventQueue.pEnqueueScreen = pScreen; if (fromDIX) dmxEventQueue.pDequeueScreen = pScreen; @@ -258,7 +260,7 @@ void dmxeqProcessInputEvents(void) y = e->event.u.keyButtonPointer.rootY; if (dmxEventQueue.head == QUEUE_SIZE - 1) dmxEventQueue.head = 0; else ++dmxEventQueue.head; - NewCurrentScreen(dmxEventQueue.pDequeueScreen, x, y); + NewCurrentScreen(e->pDev, dmxEventQueue.pDequeueScreen, x, y); } else { xe[0] = e->event; if (dmxEventQueue.head == QUEUE_SIZE - 1) dmxEventQueue.head = 0; diff --git a/hw/dmx/input/dmxevents.c b/hw/dmx/input/dmxevents.c index 2e24ff42f..1d0e872a0 100644 --- a/hw/dmx/input/dmxevents.c +++ b/hw/dmx/input/dmxevents.c @@ -201,7 +201,7 @@ static void dmxEnqueueExtEvent(DMXLocalInputInfoPtr dmxLocal, xEvent *e, if (block) dmxSigioBlock(); - dmxeqEnqueue(xE); + dmxeqEnqueue(pDevice, xE); if (block) dmxSigioUnblock(); } @@ -227,14 +227,16 @@ static void enqueueMotion(DevicePtr pDev, int x, int y) GETDMXLOCALFROMPDEV; DeviceIntPtr p = dmxLocal->pDevice; int i, nevents, valuators[3]; - xEvent *events = Xcalloc(sizeof(xEvent), GetMaximumEventsNum()); + EventListPtr events; int detail = 0; /* XXX should this be mask of pressed buttons? */ valuators[0] = x; valuators[1] = y; + + GetEventList(&events); nevents = GetPointerEvents(events, p, MotionNotify, detail, POINTER_ABSOLUTE, 0, 2, valuators); for (i = 0; i < nevents; i++) - mieqEnqueue(p, events + i); + mieqEnqueue(p, (events + i)->event); xfree(events); return; } @@ -419,7 +421,7 @@ static void dmxExtMotion(DMXLocalInputInfoPtr dmxLocal, if (block) dmxSigioBlock(); dmxPointerPutMotionEvent(pDevice, firstAxis, axesCount, v, xev->time); - dmxeqEnqueue(xE); + dmxeqEnqueue(pDevice, xE); if (block) dmxSigioUnblock(); } @@ -434,6 +436,7 @@ static int dmxTranslateAndEnqueueExtEvent(DMXLocalInputInfoPtr dmxLocal, int event = -1; XDeviceKeyEvent *ke = (XDeviceKeyEvent *)e; XDeviceMotionEvent *me = (XDeviceMotionEvent *)e; + DeviceIntPtr pDevice = dmxLocal->pDevice; if (!e) return -1; /* No extended event passed, cannot handle */ @@ -499,7 +502,7 @@ static int dmxTranslateAndEnqueueExtEvent(DMXLocalInputInfoPtr dmxLocal, if (block) dmxSigioBlock(); - dmxeqEnqueue(xE); + dmxeqEnqueue(pDevice, xE); if (block) dmxSigioUnblock(); break; @@ -674,7 +677,7 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym, xEvent xE; DeviceIntPtr p = dmxLocal->pDevice; int i, nevents, valuators[3]; - xEvent *events; + EventListPtr events; DMXDBG2("dmxEnqueue: Enqueuing type=%d detail=0x%0x\n", type, detail); @@ -688,25 +691,24 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym, if (dmxLocal->sendsCore && dmxLocal != dmxLocalCoreKeyboard) xE.u.u.detail = dmxFixup(pDev, detail, keySym); - events = Xcalloc(sizeof(xEvent), GetMaximumEventsNum()); + GetEventList(&events); /*ErrorF("KEY %d sym %d\n", detail, (int) keySym);*/ nevents = GetKeyboardEvents(events, p, type, detail); for (i = 0; i < nevents; i++) - mieqEnqueue(p, events + i); - xfree(events); + mieqEnqueue(p, (events + i)->event); return; case ButtonPress: case ButtonRelease: detail = dmxGetButtonMapping(dmxLocal, detail); - events = Xcalloc(sizeof(xEvent), GetMaximumEventsNum()); + GetEventList(&events); nevents = GetPointerEvents(events, p, type, detail, POINTER_ABSOLUTE, 0, /* first_valuator = 0 */ 0, /* num_valuators = 0 */ valuators); for (i = 0; i < nevents; i++) - mieqEnqueue(p, events + i); + mieqEnqueue(p, (events + i)->event); xfree(events); return; @@ -718,8 +720,7 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym, nevents = GetPointerEvents(events, p, type, detail, POINTER_ABSOLUTE, 0, 3, valuators); for (i = 0; i < nevents; i++) - mieqEnqueue(p, events + i); - xfree(events); + mieqEnqueue(p, (events + i)->event); return; case EnterNotify: diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c index 7b5cc73a3..277e164a3 100644 --- a/hw/dmx/input/dmxinputinit.c +++ b/hw/dmx/input/dmxinputinit.c @@ -755,7 +755,7 @@ static DeviceIntPtr dmxAddDevice(DMXLocalInputInfoPtr dmxLocal) if (!name || !registerProcPtr) dmxLog(dmxFatal, "Cannot add device %s\n", dmxLocal->name); - pDevice = AddInputDevice(dmxDeviceOnOff, TRUE); + pDevice = AddInputDevice(serverClient, dmxDeviceOnOff, TRUE); if (!pDevice) { dmxLog(dmxError, "Too many devices -- cannot add device %s\n", dmxLocal->name); From b37e1f1f5ccc5a48df665449b0e31c4d25cc323c Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Mon, 12 May 2008 11:34:06 -0700 Subject: [PATCH 507/634] Don't need the fink-friendly printf in the DDX anymore. (cherry picked from commit fe2279440450c795d67ba5a2234b0797d0bfe39c) --- hw/xquartz/darwin.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index f20cce127..4f3553393 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -153,7 +153,6 @@ DarwinPrintBanner(void) { // this should change depending on which specific server we are building ErrorF("Xquartz starting:\n"); - ErrorF("X.org Release 7.2\n"); // This is here to help fink until they fix their packages. ErrorF("X.Org X Server %s\nBuild Date: %s\n", XSERVER_VERSION, BUILD_DATE ); } From f7d6d20ad64b235700185784d317417a94d1814b Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Mon, 12 May 2008 13:36:35 -0700 Subject: [PATCH 508/634] XQuartz: Cleaned up the about box. (cherry picked from commit 0279a5970694937e949ba533330ea48961c4edba) --- hw/xquartz/X11Application.m | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m index 691725df9..9367c9fa1 100644 --- a/hw/xquartz/X11Application.m +++ b/hw/xquartz/X11Application.m @@ -143,18 +143,21 @@ static void message_kit_thread (SEL selector, NSObject *arg) { NSMutableDictionary *dict; NSDictionary *infoDict; NSString *tem; - - dict = [NSMutableDictionary dictionaryWithCapacity:2]; + + dict = [NSMutableDictionary dictionaryWithCapacity:3]; infoDict = [[NSBundle mainBundle] infoDictionary]; - + [dict setObject: NSLocalizedString (@"The X Window System", @"About panel") - forKey:@"ApplicationName"]; - + forKey:@"ApplicationName"]; + tem = [infoDict objectForKey:@"CFBundleShortVersionString"]; - - [dict setObject:[NSString stringWithFormat:@"XQuartz %@ - (xorg-server %s)", tem, XSERVER_VERSION] - forKey:@"ApplicationVersion"]; - + + [dict setObject:[NSString stringWithFormat:@"XQuartz %@", tem] + forKey:@"ApplicationVersion"]; + + [dict setObject:[NSString stringWithFormat:@"xorg-server %s", XSERVER_VERSION] + forKey:@"Version"]; + [self orderFrontStandardAboutPanelWithOptions: dict]; } From e435acc84cb9477455ad005cee658630cbd363a2 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Mon, 12 May 2008 17:57:07 -0700 Subject: [PATCH 509/634] Added missing to EXTRA_DIST (cherry picked from commit e39613f4633ed992bc276b70833a703560e528f9) --- hw/xquartz/bundle/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am index a8f45f8d5..89d04c783 100644 --- a/hw/xquartz/bundle/Makefile.am +++ b/hw/xquartz/bundle/Makefile.am @@ -6,6 +6,8 @@ resource_DATA = Xquartz.plist EXTRA_DIST = \ mk_bundke.sh \ + Info.plist \ + PkgInfo \ $(resource_DATA) \ Resources/da.lproj/InfoPlist.strings \ Resources/da.lproj/Localizable.strings \ From 3b57c59bb08c9a3211f4ae57d9e2fb569d61bf2f Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Tue, 13 May 2008 10:40:20 -0700 Subject: [PATCH 510/634] Xquartz: More work on the new Mach startup (cherry picked from commit 6237acf75d3310d7d4f262556b677557c2907284) --- hw/xquartz/mach-startup/bundle-main.c | 38 ++++++++++++---- hw/xquartz/mach-startup/stub.c | 65 +++++++++++++++++++++++++-- 2 files changed, 91 insertions(+), 12 deletions(-) diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c index b0ff9df5b..a66afa805 100644 --- a/hw/xquartz/mach-startup/bundle-main.c +++ b/hw/xquartz/mach-startup/bundle-main.c @@ -34,9 +34,12 @@ #include #include #include +#include #include +#include + #include #include #include @@ -70,7 +73,7 @@ kern_return_t do_start_x11_server(mach_port_t port, string_array_t argv, mach_msg_type_number_t argvCnt, string_array_t envp, mach_msg_type_number_t envpCnt) { - if(server_main(argvCnt, argv, envp) == 0) + if(server_main(argvCnt - 1, argv, envp) == 0) return KERN_SUCCESS; else return KERN_FAILURE; @@ -137,7 +140,7 @@ static void startup_trigger_thread(void *arg) { } int main(int argc, char **argv, char **envp) { - BOOL listenOnly = FALSE; + Bool listen, listenOnly = FALSE; int i; mach_msg_size_t mxmsgsz = sizeof(union MaxMsgSize) + MAX_TRAILER_SIZE; mach_port_t mp; @@ -151,7 +154,8 @@ int main(int argc, char **argv, char **envp) { } /* TODO: This should be unconditional once we figure out fd passing */ - if((argc > 1 && argv[1][0] == ':') || listenOnly) { + listen = (argc > 1 && argv[1][0] == ':') || listenOnly; + if(listen) { mp = checkin_or_register(SERVER_BOOTSTRAP_NAME); } @@ -160,8 +164,10 @@ int main(int argc, char **argv, char **envp) { */ if(!listenOnly) { struct arg *args = (struct arg*)malloc(sizeof(struct arg)); - if(!args) - FatalError("Could not allocate memory.\n"); + if(!args) { + fprintf(stderr, "Memory allocation error.\n"); + return EXIT_FAILURE; + } args->argc = argc; args->argv = argv; @@ -175,13 +181,13 @@ int main(int argc, char **argv, char **envp) { * file descriptor. For now, we only listen if we are explicitly * told to. */ - if((argc > 1 && argv[1][0] == ':') || listenOnly) { + if(listen) { /* Main event loop */ kr = mach_msg_server(mach_startup_server, mxmsgsz, mp, 0); if (kr != KERN_SUCCESS) { asl_log(NULL, NULL, ASL_LEVEL_ERR, "org.x.X11(mp): %s\n", mach_error_string(kr)); - exit(EXIT_FAILURE); + return EXIT_FAILURE; } } @@ -204,11 +210,27 @@ int main(int argc, char **argv, char **envp) { /* Take care of the case where we're called like a normal DDX */ if(argc > 1 && argv[1][0] == ':') { #ifdef NEW_LAUNCH_METHOD + kern_return_t kr; + mach_port_t mp; + + sleep(2); + /* We need to count envp */ int envpc; for(envpc=0; envp[envpc]; envpc++); - return start_x11_server(argc, argv, envp, envpc); + kr = bootstrap_look_up(bootstrap_port, SERVER_BOOTSTRAP_NAME, &mp); + if (kr != KERN_SUCCESS) { + fprintf(stderr, "bootstrap_look_up(): %s\n", bootstrap_strerror(kr)); + exit(EXIT_FAILURE); + } + + kr = start_x11_server(mp, argv, argc + 1, envp, envpc + 1); + if (kr != KERN_SUCCESS) { + fprintf(stderr, "start_x11_server: %s\n", mach_error_string(kr)); + exit(EXIT_FAILURE); + } + exit(EXIT_SUCCESS); #else return server_main(argc, argv, envp); #endif diff --git a/hw/xquartz/mach-startup/stub.c b/hw/xquartz/mach-startup/stub.c index 3be5f6568..ed917cfcd 100644 --- a/hw/xquartz/mach-startup/stub.c +++ b/hw/xquartz/mach-startup/stub.c @@ -35,10 +35,16 @@ #include #include #include +#include #define kX11AppBundleId "org.x.X11" #define kX11AppBundlePath "/Contents/MacOS/X11" +#include +#include +#include +#include "mach_startup.h" + static char x11_path[PATH_MAX + 1]; static void set_x11_path() { @@ -102,17 +108,68 @@ static void set_x11_path() { #define XSERVER_VERSION "?" #endif -int main(int argc, char **argv) { - +int main(int argc, char **argv, char **envp) { +#ifdef NEW_LAUNCH_METHOD_2 + int envpc; + char *newargv[3]; + kern_return_t kr; + mach_port_t mp; +#endif + if(argc == 2 && !strcmp(argv[1], "-version")) { fprintf(stderr, "X.org Release 7.3\n"); fprintf(stderr, "X.Org X Server %s\n", XSERVER_VERSION); fprintf(stderr, "Build Date: %s\n", BUILD_DATE); - return 0; + return EXIT_SUCCESS; } + +#ifdef NEW_LAUNCH_METHOD_2 + kr = bootstrap_look_up(bootstrap_port, SERVER_BOOTSTRAP_NAME, &mp); + if(kr != KERN_SUCCESS) { + int i; + set_x11_path(); + + /* This forking is ugly and will be cleaned up later */ + pid_t child = fork(); + if(child == -1) { + fprintf(stderr, "Could not fork: %s\n", strerror(errno)); + return EXIT_FAILURE; + } + + if(child == 0) { + newargv[0] = x11_path; + newargv[1] = "--listenonly"; + newargv[2] = NULL; + return execvp(x11_path, newargv); + } + + /* Try connecting for 10 seconds */ + for(i=0; i < 20; i++) { + usleep(500); + kr = bootstrap_look_up(bootstrap_port, SERVER_BOOTSTRAP_NAME, &mp); + if(kr == KERN_SUCCESS) + break; + } + + if(kr != KERN_SUCCESS) { + fprintf(stderr, "bootstrap_look_up(): %s\n", bootstrap_strerror(kr)); + return EXIT_FAILURE; + } + } + + /* Count envp */ + for(envpc=0; envp[envpc]; envpc++); + kr = start_x11_server(mp, argv, argc + 1, envp, envpc + 1); + if (kr != KERN_SUCCESS) { + fprintf(stderr, "start_x11_server: %s\n", mach_error_string(kr)); + return EXIT_FAILURE; + } + return EXIT_SUCCESS; + +#else set_x11_path(); - argv[0] = x11_path; return execvp(x11_path, argv); +#endif } From cbb4e80eb7cc8dc2aff5e5268b49cdb7b3c3d5fa Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 14 May 2008 01:13:15 -0700 Subject: [PATCH 511/634] XQuartz: More work on the Mach-IPC startup path (cherry picked from commit 49cd0b185fd6c99b07357a74734b6a4023faca84) --- hw/xquartz/mach-startup/bundle-main.c | 45 ++++++++++++++++++-- hw/xquartz/mach-startup/mach_startup_types.h | 4 +- hw/xquartz/mach-startup/stub.c | 32 +++++++++++--- 3 files changed, 70 insertions(+), 11 deletions(-) diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c index a66afa805..cd64e425c 100644 --- a/hw/xquartz/mach-startup/bundle-main.c +++ b/hw/xquartz/mach-startup/bundle-main.c @@ -73,7 +73,26 @@ kern_return_t do_start_x11_server(mach_port_t port, string_array_t argv, mach_msg_type_number_t argvCnt, string_array_t envp, mach_msg_type_number_t envpCnt) { - if(server_main(argvCnt - 1, argv, envp) == 0) + /* And now back to char ** */ + char **_argv = alloca((argvCnt + 1) * sizeof(char *)); + char **_envp = alloca((envpCnt + 1) * sizeof(char *)); + size_t i; + + if(!_argv || !_envp) { + return KERN_FAILURE; + } + + for(i=0; i < argvCnt; i++) { + _argv[i] = argv[i]; + } + _argv[argvCnt] = NULL; + + for(i=0; i < envpCnt; i++) { + _envp[i] = envp[i]; + } + _envp[envpCnt] = NULL; + + if(server_main(argvCnt, _argv, _envp) == 0) return KERN_SUCCESS; else return KERN_FAILURE; @@ -212,20 +231,38 @@ int main(int argc, char **argv, char **envp) { #ifdef NEW_LAUNCH_METHOD kern_return_t kr; mach_port_t mp; - - sleep(2); + string_array_t newenvp; + string_array_t newargv; /* We need to count envp */ int envpc; for(envpc=0; envp[envpc]; envpc++); + /* We have fixed-size string lengths due to limitations in IPC, + * so we need to copy our argv and envp. + */ + newargv = (string_array_t)alloca(argc * sizeof(string_t)); + newenvp = (string_array_t)alloca(envpc * sizeof(string_t)); + + if(!newargv || !newenvp) { + fprintf(stderr, "Memory allocation failure\n"); + exit(EXIT_FAILURE); + } + + for(i=0; i < argc; i++) { + strlcpy(newargv[i], argv[i], STRING_T_SIZE); + } + for(i=0; i < envpc; i++) { + strlcpy(newenvp[i], envp[i], STRING_T_SIZE); + } + kr = bootstrap_look_up(bootstrap_port, SERVER_BOOTSTRAP_NAME, &mp); if (kr != KERN_SUCCESS) { fprintf(stderr, "bootstrap_look_up(): %s\n", bootstrap_strerror(kr)); exit(EXIT_FAILURE); } - kr = start_x11_server(mp, argv, argc + 1, envp, envpc + 1); + kr = start_x11_server(mp, newargv, argc, newenvp, envpc); if (kr != KERN_SUCCESS) { fprintf(stderr, "start_x11_server: %s\n", mach_error_string(kr)); exit(EXIT_FAILURE); diff --git a/hw/xquartz/mach-startup/mach_startup_types.h b/hw/xquartz/mach-startup/mach_startup_types.h index 03939af97..97ac147cd 100644 --- a/hw/xquartz/mach-startup/mach_startup_types.h +++ b/hw/xquartz/mach-startup/mach_startup_types.h @@ -2,7 +2,9 @@ #define _MACH_STARTUP_TYPES_H_ #define SERVER_BOOTSTRAP_NAME "org.x.X11" +#define STRING_T_SIZE 1024 -typedef char ** string_array_t; +typedef char string_t[STRING_T_SIZE]; +typedef string_t * string_array_t; #endif diff --git a/hw/xquartz/mach-startup/stub.c b/hw/xquartz/mach-startup/stub.c index ed917cfcd..fae97201f 100644 --- a/hw/xquartz/mach-startup/stub.c +++ b/hw/xquartz/mach-startup/stub.c @@ -111,9 +111,10 @@ static void set_x11_path() { int main(int argc, char **argv, char **envp) { #ifdef NEW_LAUNCH_METHOD_2 int envpc; - char *newargv[3]; kern_return_t kr; mach_port_t mp; + string_array_t newenvp; + string_array_t newargv; #endif if(argc == 2 && !strcmp(argv[1], "-version")) { @@ -137,10 +138,11 @@ int main(int argc, char **argv, char **envp) { } if(child == 0) { - newargv[0] = x11_path; - newargv[1] = "--listenonly"; - newargv[2] = NULL; - return execvp(x11_path, newargv); + char *_argv[3]; + _argv[0] = x11_path; + _argv[1] = "--listenonly"; + _argv[2] = NULL; + return execvp(x11_path, _argv); } /* Try connecting for 10 seconds */ @@ -160,7 +162,25 @@ int main(int argc, char **argv, char **envp) { /* Count envp */ for(envpc=0; envp[envpc]; envpc++); - kr = start_x11_server(mp, argv, argc + 1, envp, envpc + 1); + /* We have fixed-size string lengths due to limitations in IPC, + * so we need to copy our argv and envp. + */ + newargv = (string_array_t)alloca(argc * sizeof(string_t)); + newenvp = (string_array_t)alloca(envpc * sizeof(string_t)); + + if(!newargv || !newenvp) { + fprintf(stderr, "Memory allocation failure\n"); + exit(EXIT_FAILURE); + } + + for(i=0; i < argc; i++) { + strlcpy(newargv[i], argv[i], STRING_T_SIZE); + } + for(i=0; i < envpc; i++) { + strlcpy(newenvp[i], envp[i], STRING_T_SIZE); + } + + kr = start_x11_server(mp, newargv, argc, newenvp, envpc); if (kr != KERN_SUCCESS) { fprintf(stderr, "start_x11_server: %s\n", mach_error_string(kr)); return EXIT_FAILURE; From 937e5aae33d3b5112b5d10d605e25f57b48caa3f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 14 May 2008 22:30:15 +0930 Subject: [PATCH 512/634] dix: don't undisplay cursor if we don't own a sprite. Sometimes we didn't have a cursor when coming back from suspend. Reason was that the suspend caused the server to lose the device that was attached to the VCP, and a RemoveDevice() would then set the cursor to NULL. Solution: only set the cursor to NULL if we actually own the sprite. --- dix/devices.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index 05a6b51af..4dd1dc5f1 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -885,7 +885,8 @@ RemoveDevice(DeviceIntPtr dev) return BadImplementation; initialized = dev->inited; - screen->DisplayCursor(dev, screen, NullCursor); + if (DevHasCursor(dev)) + screen->DisplayCursor(dev, screen, NullCursor); deviceid = dev->id; DisableDevice(dev); From 6c27b911222cdee9a057de0be7e8b2eff8b1ff2a Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 14 May 2008 15:44:04 -0400 Subject: [PATCH 513/634] Restore compression of duplicate log file entries. This undoes the workaround for bug #964, which was an Xprintism. --- os/log.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/os/log.c b/os/log.c index 0860847ec..8c579fd0c 100644 --- a/os/log.c +++ b/os/log.c @@ -498,15 +498,6 @@ VAuditF(const char *f, va_list args) prefix = AuditPrefix(); len = vsnprintf(buf, sizeof(buf), f, args); -#if 1 - /* XXX Compressing duplicated messages is temporarily disabled to - * work around bugzilla 964: - * https://freedesktop.org/bugzilla/show_bug.cgi?id=964 - */ - ErrorF("%s%s", prefix != NULL ? prefix : "", buf); - oldlen = -1; - nrepeat = 0; -#else if (len == oldlen && strcmp(buf, oldbuf) == 0) { /* Message already seen */ nrepeat++; @@ -520,7 +511,6 @@ VAuditF(const char *f, va_list args) nrepeat = 0; auditTimer = TimerSet(auditTimer, 0, AUDIT_TIMEOUT, AuditFlush, NULL); } -#endif if (prefix != NULL) free(prefix); } From 2efe1abb6fc786a4f86464978ae0d23fc7347a98 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 14 May 2008 15:53:11 -0400 Subject: [PATCH 514/634] Remove global argc/argv variables. Was only used in the logging code anymore, and uselessly so there. --- dix/globals.c | 2 -- dix/main.c | 5 ----- include/opaque.h | 2 -- os/log.c | 12 +++--------- 4 files changed, 3 insertions(+), 18 deletions(-) diff --git a/dix/globals.c b/dix/globals.c index 2fb7ba0b3..3f12916e0 100644 --- a/dix/globals.c +++ b/dix/globals.c @@ -153,7 +153,5 @@ _X_EXPORT int monitorResolution = 0; _X_EXPORT char *display; CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND; -int argcGlobal; -char **argvGlobal; DDXPointRec dixScreenOrigins[MAXSCREENS]; diff --git a/dix/main.c b/dix/main.c index 8bdfb5b7d..855050950 100644 --- a/dix/main.c +++ b/dix/main.c @@ -259,11 +259,6 @@ int main(int argc, char *argv[], char *envp[]) InitConnectionLimits(); - /* These are needed by some routines which are called from interrupt - * handlers, thus have no direct calling path back to main and thus - * can't be passed argc, argv as parameters */ - argcGlobal = argc; - argvGlobal = argv; /* prep X authority file from environment; this can be overriden by a * command line option */ xauthfile = getenv("XAUTHORITY"); diff --git a/include/opaque.h b/include/opaque.h index 3d19d275f..d5abcbd50 100644 --- a/include/opaque.h +++ b/include/opaque.h @@ -49,8 +49,6 @@ extern int ScreenSaverBlanking; extern int ScreenSaverAllowExposures; extern int defaultScreenSaverBlanking; extern int defaultScreenSaverAllowExposures; -extern int argcGlobal; -extern char **argvGlobal; extern char *display; extern int defaultBackingStore; diff --git a/os/log.c b/os/log.c index 8c579fd0c..2a59a00b3 100644 --- a/os/log.c +++ b/os/log.c @@ -410,9 +410,7 @@ AbortServer(void) exit (1); } -#ifndef AUDIT_PREFIX -#define AUDIT_PREFIX "AUDIT: %s: %ld %s: " -#endif +#define AUDIT_PREFIX "AUDIT: %s: %ld: " #ifndef AUDIT_TIMEOUT #define AUDIT_TIMEOUT ((CARD32)(120 * 1000)) /* 2 mn */ #endif @@ -444,15 +442,11 @@ AuditPrefix(void) autime = ctime(&tm); if ((s = strchr(autime, '\n'))) *s = '\0'; - if ((s = strrchr(argvGlobal[0], '/'))) - s++; - else - s = argvGlobal[0]; - len = strlen(AUDIT_PREFIX) + strlen(autime) + 10 + strlen(s) + 1; + len = strlen(AUDIT_PREFIX) + strlen(autime) + 10 + 1; tmpBuf = malloc(len); if (!tmpBuf) return NULL; - snprintf(tmpBuf, len, AUDIT_PREFIX, autime, (unsigned long)getpid(), s); + snprintf(tmpBuf, len, AUDIT_PREFIX, autime, (unsigned long)getpid()); return tmpBuf; } From 166177e36bfc7bd1df03663ad89500cff056d563 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 14 May 2008 16:02:05 -0400 Subject: [PATCH 515/634] Simplify default font path setup. --- dix/globals.c | 1 - dix/main.c | 9 ++------- hw/xfree86/common/xf86Init.c | 3 --- include/globals.h | 1 - 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/dix/globals.c b/dix/globals.c index 3f12916e0..2eca277bd 100644 --- a/dix/globals.c +++ b/dix/globals.c @@ -139,7 +139,6 @@ char *defaultCursorFont = COMPILEDCURSORFONT; char *defaultDisplayClass = COMPILEDDISPLAYCLASS; FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in every compilation of dix code */ -Bool loadableFonts = FALSE; CursorPtr rootCursor; Bool blackRoot=FALSE; Bool whiteRoot=FALSE; diff --git a/dix/main.c b/dix/main.c index 855050950..2e12b709f 100644 --- a/dix/main.c +++ b/dix/main.c @@ -364,13 +364,8 @@ int main(int argc, char *argv[], char *envp[]) FatalError("failed to initialize core devices"); InitFonts(); - if (loadableFonts) - SetFontPath(serverClient, 0, (unsigned char *)defaultFontPath, - &error); - else { - if (SetDefaultFontPath(defaultFontPath) != Success) - ErrorF("failed to set default font path '%s'", - defaultFontPath); + if (SetDefaultFontPath(defaultFontPath) != Success) { + ErrorF("failed to set default font path '%s'", defaultFontPath); } if (!SetDefaultFont(defaultTextFont)) { FatalError("could not open default font '%s'", defaultTextFont); diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 851f4dc49..4e1f6d6b3 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -1184,9 +1184,6 @@ OsVendorInit() signal(SIGCHLD, SIG_DFL); /* Need to wait for child processes */ #endif OsDelayInitColors = TRUE; -#ifndef BUILTIN_FONTS - loadableFonts = TRUE; -#endif if (!beenHere) xf86LogInit(); diff --git a/include/globals.h b/include/globals.h index 9e5060d5f..6cceb0184 100644 --- a/include/globals.h +++ b/include/globals.h @@ -17,7 +17,6 @@ extern Bool screenSaverSuspended; extern char *defaultFontPath; extern int monitorResolution; -extern Bool loadableFonts; extern int defaultColorVisualClass; extern Bool Must_have_memory; From 07f69023b0e75d98a4be8f0d1c3dd9391b8149a0 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 14 May 2008 16:07:51 -0400 Subject: [PATCH 516/634] Move defaultDisplayClass to xdmcp-only visibility. --- dix/globals.c | 1 - os/xdmcp.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dix/globals.c b/dix/globals.c index 2eca277bd..210c7849c 100644 --- a/dix/globals.c +++ b/dix/globals.c @@ -136,7 +136,6 @@ Bool screenSaverSuspended = FALSE; char *defaultFontPath = COMPILEDDEFAULTFONTPATH; char *defaultTextFont = COMPILEDDEFAULTFONT; char *defaultCursorFont = COMPILEDCURSORFONT; -char *defaultDisplayClass = COMPILEDDISPLAYCLASS; FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in every compilation of dix code */ CursorPtr rootCursor; diff --git a/os/xdmcp.c b/os/xdmcp.c index 310f33bc0..40c50540e 100644 --- a/os/xdmcp.c +++ b/os/xdmcp.c @@ -68,7 +68,7 @@ #define X_INCLUDE_NETDB_H #include -extern char *defaultDisplayClass; +static char *defaultDisplayClass = COMPILEDDISPLAYCLASS; static int xdmcpSocket, sessionSocket; static xdmcp_states state; From 7cabf81c8638739a15a1be6baa3fc569f38e7589 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 15 May 2008 13:24:27 -0700 Subject: [PATCH 517/634] Add necessary include for COMPILEDDISPLAYCLASS. Fixes build after 07f69023b0e75d98a4be8f0d1c3dd9391b8149a0. --- os/xdmcp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/os/xdmcp.c b/os/xdmcp.c index 40c50540e..d896c8ba3 100644 --- a/os/xdmcp.c +++ b/os/xdmcp.c @@ -44,6 +44,7 @@ #include "input.h" #include "dixstruct.h" #include "opaque.h" +#include "site.h" #if defined(DGUX) #include From 28378d26b4bae377ef1212f6a51cda9b5529f1b5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 15 May 2008 11:09:15 +0930 Subject: [PATCH 518/634] Xi: assemble button/modifier state before updating the device. #15934 The state field of the event must specify the state of the devices before the event occured. With the code as it was, the state would also include the event (e.g. state from a button press event would show the button as pressed) Gathering the state before updating the device should fix this. X.Org Bug 15934 --- Xi/exevents.c | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index b2845473a..42b77c137 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -1021,6 +1021,26 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) ValuatorClassPtr v; deviceValuator *xV = (deviceValuator *) xE; int ret = 0; + int state; + DeviceIntPtr mouse = NULL, kbd = NULL; + + if (IsPointerDevice(device)) + { + kbd = GetPairedDevice(device); + mouse = device; + if (!kbd->key) /* can happen with floating SDs */ + kbd = NULL; + } else + { + mouse = GetPairedDevice(device); + kbd = device; + if (!mouse->valuator || !mouse->button) /* may be float. SDs */ + mouse = NULL; + } + + /* State needs to be assembled BEFORE the device is updated. */ + state = (kbd) ? kbd->key->state : 0; + state |= (mouse) ? (mouse->button->state) : 0; ret = UpdateDeviceState(device, xE, count); if (ret == DONT_PROCESS) @@ -1034,33 +1054,12 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count) CheckMotion(xE, device); if (xE->u.u.type != DeviceValuator && xE->u.u.type != GenericEvent) { - DeviceIntPtr mouse = NULL, kbd = NULL; GetSpritePosition(device, &rootX, &rootY); xE->u.keyButtonPointer.rootX = rootX; xE->u.keyButtonPointer.rootY = rootY; NoticeEventTime(xE); - /* If 'device' is a pointer device, we need to get the paired keyboard - * for the state. If there is none, the kbd bits of state are 0. - * If 'device' is a keyboard device, get the paired pointer and use the - * pointer's state for the button bits. - */ - if (IsPointerDevice(device)) - { - kbd = GetPairedDevice(device); - mouse = device; - if (!kbd->key) /* can happen with floating SDs */ - kbd = NULL; - } - else - { - mouse = GetPairedDevice(device); - kbd = device; - if (!mouse->valuator || !mouse->button) /* may be float. SDs */ - mouse = NULL; - } - xE->u.keyButtonPointer.state = (kbd) ? (kbd->key->state) : 0; - xE->u.keyButtonPointer.state |= (mouse) ? (mouse->button->state) : 0; + xE->u.keyButtonPointer.state = state; key = xE->u.u.detail; } From 5127942f80983b2e053dddd5c5747d0c3d2f9d6d Mon Sep 17 00:00:00 2001 From: Brian Rogers Date: Fri, 16 May 2008 10:08:04 +0930 Subject: [PATCH 519/634] DGA: pass nevents to UpdateDeviceState. #15936 Missing parameter caused event processing to go nuts when checking valuators. X.Org Bug 15936 Signed-off-by: Peter Hutterer --- hw/xfree86/common/xf86DGA.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index 9c79505f4..a7e24a65f 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c @@ -1043,7 +1043,7 @@ DGAProcessKeyboardEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr keybd) de->u.event.state = keyc->state | pointer->button->state; de->u.u.type = (IEventBase - 1) + coreEquiv; /* change to XI event */ - UpdateDeviceState(keybd, de); + UpdateDeviceState(keybd, de, 1); de->u.u.type = *XDGAEventBase + coreEquiv; /* change back */ /* @@ -1090,7 +1090,7 @@ DGAProcessPointerEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr mouse) de->u.event.state = butc->state | GetPairedDevice(mouse)->key->state; de->u.u.type = (IEventBase - 1) + coreEquiv; /* change to XI event */ - UpdateDeviceState(mouse, de); + UpdateDeviceState(mouse, de, 1); de->u.u.type = *XDGAEventBase + coreEquiv; /* change back */ /* From 9fc94edfe3df4c4a84ad70714c0a4ef8bbf57fc9 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 16 May 2008 16:59:34 +0930 Subject: [PATCH 520/634] Xext: fix typo in condition. Fall-out from dc3aba8a559d4304844ee1cc306c577a63b82762. We must free the event if it is NOT an extension event. --- Xext/xtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xext/xtest.c b/Xext/xtest.c index 791f6a24d..a42faa791 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -500,7 +500,7 @@ ProcXTestFakeInput(client) xfree(master_event); } else (*dev->public.processInputProc)(ev, dev, nev); - if (extension) + if (!extension) xfree(ev); return client->noClientException; } From 5af90025fee6a92e7d94642978feed21f902d0cb Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Wed, 14 May 2008 02:45:49 -0300 Subject: [PATCH 521/634] Remove redundancy. The only function that cat set SWCursor before xf86DeviceCursorInitialize() is xf86InitCursor() when VCP and is created. Signed-off-by: Tiago Vignatti Signed-off-by: Peter Hutterer --- hw/xfree86/ramdac/xf86Cursor.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c index 4d64f6218..2d69074c8 100644 --- a/hw/xfree86/ramdac/xf86Cursor.c +++ b/hw/xfree86/ramdac/xf86Cursor.c @@ -464,11 +464,8 @@ xf86DeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) if (pDev != inputInfo.pointer) { - if (!ScreenPriv->SWCursor) - { ScreenPriv->spriteFuncs->SetCursor(inputInfo.pointer, pScreen, ScreenPriv->CurrentCursor, ScreenPriv->x, ScreenPriv->y); - } ScreenPriv->SWCursor = TRUE | XF86_FORCE_SW_CURSOR; } From 622d7c1d899a6146773a2ebd1d632a805f24025e Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Wed, 14 May 2008 14:49:09 -0300 Subject: [PATCH 522/634] Restructure and organize the code. It was removed and simplified some conditionals. We don't need test for pDev->isMaster inside xf86CursorSetCursor() because only MD enters there. In the last chunk, ScreenPriv fields were being assigned without need, so that code was wrapped inside the conditional to avoid it. I also tried to make the identation more sane in some parts that I touched. Signed-off-by: Tiago Vignatti Minor modification, part of the original patch led to cursors not being updated properly when controlled through XTest. Signed-off-by: Peter Hutterer --- hw/xfree86/ramdac/xf86Cursor.c | 59 +++++++++++++++------------------- 1 file changed, 26 insertions(+), 33 deletions(-) diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c index 2d69074c8..50f8fb70d 100644 --- a/hw/xfree86/ramdac/xf86Cursor.c +++ b/hw/xfree86/ramdac/xf86Cursor.c @@ -299,43 +299,36 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( &pScreen->devPrivates, xf86CursorScreenKey); xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr; - miPointerScreenPtr PointPriv; + miPointerScreenPtr PointPriv = (miPointerScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, miPointerScreenKey); + + + if (pCurs == NullCursor) { /* means we're supposed to remove the cursor */ + if (ScreenPriv->SWCursor) + (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, + x, y); + else if (ScreenPriv->isUp) { + xf86SetCursor(pScreen, NullCursor, x, y); + ScreenPriv->isUp = FALSE; + } + return; + } /* only update for VCP, otherwise we get cursor jumps when removing a sprite. The second cursor is never HW rendered anyway. */ - if (pDev == inputInfo.pointer || - (!pDev->isMaster && pDev->u.master == inputInfo.pointer)) + if (pDev == inputInfo.pointer) { ScreenPriv->CurrentCursor = pCurs; ScreenPriv->x = x; ScreenPriv->y = y; ScreenPriv->CursorToRestore = NULL; + ScreenPriv->HotX = pCurs->bits->xhot; + ScreenPriv->HotY = pCurs->bits->yhot; } if (!infoPtr->pScrn->vtSema) ScreenPriv->SavedCursor = pCurs; - if (pCurs == NullCursor) { /* means we're supposed to remove the cursor */ - if (ScreenPriv->SWCursor) - (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, - x, y); - else if - (ScreenPriv->isUp) { - xf86SetCursor(pScreen, NullCursor, x, y); - ScreenPriv->isUp = FALSE; - } - return; - } - - if (pDev == inputInfo.pointer || - (!pDev->isMaster && pDev->u.master == inputInfo.pointer)) - { - ScreenPriv->HotX = pCurs->bits->xhot; - ScreenPriv->HotY = pCurs->bits->yhot; - } - - PointPriv = (miPointerScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miPointerScreenKey); if (!(ScreenPriv->SWCursor & XF86_FORCE_SW_CURSOR)) { if (infoPtr->pScrn->vtSema && (ScreenPriv->ForceHWCursorCount || (( @@ -346,18 +339,18 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, #endif (pCurs->bits->height <= infoPtr->MaxHeight) && (pCurs->bits->width <= infoPtr->MaxWidth) && - (!infoPtr->UseHWCursor || (*infoPtr->UseHWCursor)(pScreen, pCurs)))))) + (!infoPtr->UseHWCursor || (*infoPtr->UseHWCursor)(pScreen, pCurs)))))) { - if (ScreenPriv->SWCursor) /* remove the SW cursor */ - (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, x, y); + if (ScreenPriv->SWCursor) /* remove the SW cursor */ + (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, x, y); - xf86SetCursor(pScreen, pCurs, x, y); - ScreenPriv->SWCursor = FALSE; - ScreenPriv->isUp = TRUE; - PointPriv->waitForUpdate = !infoPtr->pScrn->silkenMouse; - return; - } + xf86SetCursor(pScreen, pCurs, x, y); + ScreenPriv->SWCursor = FALSE; + ScreenPriv->isUp = TRUE; + PointPriv->waitForUpdate = !infoPtr->pScrn->silkenMouse; + return; + } } From 48ba58feacedf9781db81c82adbb37197d9a5cd1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 16 May 2008 19:22:32 +0930 Subject: [PATCH 523/634] mi: remove miPointerUpdate() -> replaced by miPointerUpdateSprite(). In the xnest and vfb DDX we don't need the call anyway, it's performed by mieqProcessInputEvent. --- hw/vfb/InitInput.c | 1 - hw/xnest/Events.c | 1 - mi/mipointer.c | 8 +------- mi/mipointer.h | 5 ----- 4 files changed, 1 insertion(+), 14 deletions(-) diff --git a/hw/vfb/InitInput.c b/hw/vfb/InitInput.c index 393698f35..3b001eea7 100644 --- a/hw/vfb/InitInput.c +++ b/hw/vfb/InitInput.c @@ -52,7 +52,6 @@ void ProcessInputEvents() { mieqProcessInputEvents(); - miPointerUpdate(); } void DDXRingBell(int volume, int pitch, int duration) diff --git a/hw/xnest/Events.c b/hw/xnest/Events.c index 02ff27bdf..f7a551c17 100644 --- a/hw/xnest/Events.c +++ b/hw/xnest/Events.c @@ -49,7 +49,6 @@ void ProcessInputEvents() { mieqProcessInputEvents(); - miPointerUpdate(); } int diff --git a/mi/mipointer.c b/mi/mipointer.c index 2c226dc71..484947da9 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -374,17 +374,11 @@ miPointerWarpCursor (pDev, pScreen, x, y) */ /* - * miPointerUpdate + * miPointerUpdateSprite * * Syncronize the sprite with the cursor - called from ProcessInputEvents */ -void -miPointerUpdate () -{ - miPointerUpdateSprite(inputInfo.pointer); -} - void miPointerUpdateSprite (DeviceIntPtr pDev) { diff --git a/mi/mipointer.h b/mi/mipointer.h index 5cbf5270d..fccbfa04a 100644 --- a/mi/mipointer.h +++ b/mi/mipointer.h @@ -122,11 +122,6 @@ extern int miPointerGetMotionEvents( ScreenPtr /*pScreen*/ ); -/* Deprecated in favour of miPointerUpdateSprite. */ -extern void miPointerUpdate( - void -) _X_DEPRECATED; - /* Deprecated in favour of miSetPointerPosition. */ extern void miPointerDeltaCursor( int /*dx*/, From f611719edce2ae51dca8e53947a3938b53c20b00 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 16 May 2008 19:49:29 +0930 Subject: [PATCH 524/634] xfree86: always render first cursor in HW, all others in SW. --- hw/xfree86/ramdac/xf86Cursor.c | 85 ++++++++++++---------------------- 1 file changed, 30 insertions(+), 55 deletions(-) diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c index 50f8fb70d..7695962b6 100644 --- a/hw/xfree86/ramdac/xf86Cursor.c +++ b/hw/xfree86/ramdac/xf86Cursor.c @@ -20,8 +20,6 @@ extern InputInfo inputInfo; DevPrivateKey xf86CursorScreenKey = &xf86CursorScreenKey; -#define XF86_FORCE_SW_CURSOR (1 << 7) - /* sprite functions */ static Bool xf86CursorRealizeCursor(DeviceIntPtr, ScreenPtr, CursorPtr); @@ -304,14 +302,14 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, if (pCurs == NullCursor) { /* means we're supposed to remove the cursor */ - if (ScreenPriv->SWCursor) + if (ScreenPriv->SWCursor || pDev != inputInfo.pointer) (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, x, y); else if (ScreenPriv->isUp) { xf86SetCursor(pScreen, NullCursor, x, y); ScreenPriv->isUp = FALSE; - } - return; + } + return; } /* only update for VCP, otherwise we get cursor jumps when removing a @@ -324,13 +322,10 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, ScreenPriv->CursorToRestore = NULL; ScreenPriv->HotX = pCurs->bits->xhot; ScreenPriv->HotY = pCurs->bits->yhot; - } - if (!infoPtr->pScrn->vtSema) - ScreenPriv->SavedCursor = pCurs; + if (!infoPtr->pScrn->vtSema) + ScreenPriv->SavedCursor = pCurs; - if (!(ScreenPriv->SWCursor & XF86_FORCE_SW_CURSOR)) - { if (infoPtr->pScrn->vtSema && (ScreenPriv->ForceHWCursorCount || (( #ifdef ARGB_CURSOR pCurs->bits->argb && infoPtr->UseHWCursorARGB && @@ -352,23 +347,23 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, return; } + PointPriv->waitForUpdate = TRUE; + + if (ScreenPriv->isUp) { + /* Remove the HW cursor, or make it transparent */ + if (infoPtr->Flags & HARDWARE_CURSOR_SHOW_TRANSPARENT) { + xf86SetTransparentCursor(pScreen); + } else { + xf86SetCursor(pScreen, NullCursor, x, y); + ScreenPriv->isUp = FALSE; + } + } + + if (!ScreenPriv->SWCursor) + ScreenPriv->SWCursor = TRUE; + } - PointPriv->waitForUpdate = TRUE; - - if (ScreenPriv->isUp) { - /* Remove the HW cursor, or make it transparent */ - if (infoPtr->Flags & HARDWARE_CURSOR_SHOW_TRANSPARENT) { - xf86SetTransparentCursor(pScreen); - } else { - xf86SetCursor(pScreen, NullCursor, x, y); - ScreenPriv->isUp = FALSE; - } - } - - if (!ScreenPriv->SWCursor) - ScreenPriv->SWCursor = TRUE; - if (pCurs->bits->emptyMask && !ScreenPriv->showTransparent) pCurs = NullCursor; @@ -384,18 +379,19 @@ xf86CursorMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) /* only update coordinate state for first sprite, otherwise we get jumps when removing a sprite. The second sprite is never HW rendered anyway */ if (pDev == inputInfo.pointer || - (!pDev->isMaster && pDev->u.master == inputInfo.pointer)) + !pDev->isMaster && pDev->u.master == inputInfo.pointer) { ScreenPriv->x = x; ScreenPriv->y = y; - } - if (ScreenPriv->CursorToRestore) - xf86CursorSetCursor(pDev, pScreen, ScreenPriv->CursorToRestore, x, y); - else if (ScreenPriv->SWCursor) - (*ScreenPriv->spriteFuncs->MoveCursor)(pDev, pScreen, x, y); - else if (ScreenPriv->isUp) - xf86MoveCursor(pScreen, x, y); + if (ScreenPriv->CursorToRestore) + xf86CursorSetCursor(pDev, pScreen, ScreenPriv->CursorToRestore, x, y); + else if (ScreenPriv->SWCursor) + (*ScreenPriv->spriteFuncs->MoveCursor)(pDev, pScreen, x, y); + else if (ScreenPriv->isUp) + xf86MoveCursor(pScreen, x, y); + } else + (*ScreenPriv->spriteFuncs->MoveCursor)(pDev, pScreen, x, y); } void @@ -455,13 +451,6 @@ xf86DeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) /* Init SW cursor */ ret = (*ScreenPriv->spriteFuncs->DeviceCursorInitialize)(pDev, pScreen); - if (pDev != inputInfo.pointer) - { - ScreenPriv->spriteFuncs->SetCursor(inputInfo.pointer, pScreen, - ScreenPriv->CurrentCursor, ScreenPriv->x, ScreenPriv->y); - ScreenPriv->SWCursor = TRUE | XF86_FORCE_SW_CURSOR; - } - return ret; } @@ -475,21 +464,7 @@ xf86DeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( &pScreen->devPrivates, xf86CursorScreenKey); - for (it = inputInfo.devices; it; it = it->next) - { - if (it->isMaster && it != inputInfo.pointer && it != - inputInfo.keyboard) - break; - } - - if (!it) /* no other sprites except VCP. restore HW rendering */ - { - ScreenPriv->SWCursor = TRUE; - xf86CursorSetCursor(inputInfo.pointer, pScreen, - ScreenPriv->CurrentCursor, ScreenPriv->x, ScreenPriv->y); - } - - /* Clean up SW cursor */ + /* Clean up SW cursor */ (*ScreenPriv->spriteFuncs->DeviceCursorCleanup)(pDev, pScreen); } From dfb7de6571345061d1cd88ab915064fc376529fd Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 16 May 2008 20:56:04 +0930 Subject: [PATCH 525/634] mi: don't call from miPointerMoved into the spriteFuncs for anything but VCP. Calling ->MoveCursor for anything but the HW-rendered VCP causes the SW-rendered cursor routines to be started, including mallocs, etc. Since miPointerMoved is called during SIGIO, this is a bad idea. --- mi/mipointer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mi/mipointer.c b/mi/mipointer.c index 484947da9..6f39bcb5c 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -530,7 +530,11 @@ miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, pPointer = MIPOINTER(pDev); - if (pDev && pDev->coreEvents + /* Hack: We mustn't call into ->MoveCursor for anything but the + * VCP, as this may cause a non-HW rendered cursor to be rendered during + * SIGIO. This again leads to allocs during SIGIO which leads to SIGABRT. + */ + if ((pDev == inputInfo.pointer || (!pDev->isMaster && pDev->u.master == inputInfo.pointer)) && !pScreenPriv->waitForUpdate && pScreen == pPointer->pSpriteScreen) { pPointer->devx = x; From 6fb76acc4524d6af4bfb6bc6d862c1ee2bbb8baa Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 16 May 2008 19:22:32 +0930 Subject: [PATCH 526/634] mi: remove miPointerUpdate() -> replaced by miPointerUpdateSprite(). In the xnest and vfb DDX we don't need the call anyway, it's performed by mieqProcessInputEvent. --- hw/vfb/InitInput.c | 1 - hw/xnest/Events.c | 1 - mi/mipointer.c | 8 +------- mi/mipointer.h | 5 ----- 4 files changed, 1 insertion(+), 14 deletions(-) diff --git a/hw/vfb/InitInput.c b/hw/vfb/InitInput.c index 393698f35..3b001eea7 100644 --- a/hw/vfb/InitInput.c +++ b/hw/vfb/InitInput.c @@ -52,7 +52,6 @@ void ProcessInputEvents() { mieqProcessInputEvents(); - miPointerUpdate(); } void DDXRingBell(int volume, int pitch, int duration) diff --git a/hw/xnest/Events.c b/hw/xnest/Events.c index 02ff27bdf..f7a551c17 100644 --- a/hw/xnest/Events.c +++ b/hw/xnest/Events.c @@ -49,7 +49,6 @@ void ProcessInputEvents() { mieqProcessInputEvents(); - miPointerUpdate(); } int diff --git a/mi/mipointer.c b/mi/mipointer.c index 2c226dc71..484947da9 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -374,17 +374,11 @@ miPointerWarpCursor (pDev, pScreen, x, y) */ /* - * miPointerUpdate + * miPointerUpdateSprite * * Syncronize the sprite with the cursor - called from ProcessInputEvents */ -void -miPointerUpdate () -{ - miPointerUpdateSprite(inputInfo.pointer); -} - void miPointerUpdateSprite (DeviceIntPtr pDev) { diff --git a/mi/mipointer.h b/mi/mipointer.h index 5cbf5270d..fccbfa04a 100644 --- a/mi/mipointer.h +++ b/mi/mipointer.h @@ -122,11 +122,6 @@ extern int miPointerGetMotionEvents( ScreenPtr /*pScreen*/ ); -/* Deprecated in favour of miPointerUpdateSprite. */ -extern void miPointerUpdate( - void -) _X_DEPRECATED; - /* Deprecated in favour of miSetPointerPosition. */ extern void miPointerDeltaCursor( int /*dx*/, From fc7e2566cc076c0d979f74871bc436df43401058 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 16 May 2008 16:59:34 +0930 Subject: [PATCH 527/634] Xext: fix typo in condition. Fall-out from dc3aba8a559d4304844ee1cc306c577a63b82762. We must free the event if it is NOT an extension event. --- Xext/xtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xext/xtest.c b/Xext/xtest.c index 791f6a24d..a42faa791 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -500,7 +500,7 @@ ProcXTestFakeInput(client) xfree(master_event); } else (*dev->public.processInputProc)(ev, dev, nev); - if (extension) + if (!extension) xfree(ev); return client->noClientException; } From 99e4531f7c3fafce065dfd21f65bad1cf190c3f1 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 16 May 2008 08:16:01 -0400 Subject: [PATCH 528/634] The great kdrive purge. Most of these drivers didn't work. ati was the only one that even came close. The igs, ipaq, itsy, pcmcia, savage, sis530, trident, trio, ts300, and vxworks directories have never built since modularisation, so clearly no one can miss them. --- configure.ac | 13 - hw/kdrive/Makefile.am | 8 +- hw/kdrive/Xkdrive.man | 20 - hw/kdrive/ati/Makefile.am | 74 - hw/kdrive/ati/ati.c | 761 ------- hw/kdrive/ati/ati.h | 409 ---- hw/kdrive/ati/ati_cursor.c | 559 ------ hw/kdrive/ati/ati_dma.c | 1037 ---------- hw/kdrive/ati/ati_dma.h | 141 -- hw/kdrive/ati/ati_draw.c | 918 --------- hw/kdrive/ati/ati_draw.h | 93 - hw/kdrive/ati/ati_drawtmp.h | 237 --- hw/kdrive/ati/ati_dri.c | 1138 ----------- hw/kdrive/ati/ati_dri.h | 97 - hw/kdrive/ati/ati_dripriv.h | 57 - hw/kdrive/ati/ati_microcode.c | 857 -------- hw/kdrive/ati/ati_reg.h | 1927 ------------------ hw/kdrive/ati/ati_sarea.h | 38 - hw/kdrive/ati/ati_stub.c | 77 - hw/kdrive/ati/ati_video.c | 988 --------- hw/kdrive/ati/r128_blendtmp.h | 134 -- hw/kdrive/ati/r128_common.h | 170 -- hw/kdrive/ati/r128_composite.c | 564 ------ hw/kdrive/ati/r128_sarea.h | 185 -- hw/kdrive/ati/radeon_common.h | 460 ----- hw/kdrive/ati/radeon_composite.c | 875 -------- hw/kdrive/ati/radeon_sarea.h | 221 -- hw/kdrive/chips/Makefile.am | 36 - hw/kdrive/chips/chips.c | 334 ---- hw/kdrive/chips/chips.h | 117 -- hw/kdrive/chips/chipsdraw.c | 491 ----- hw/kdrive/chips/chipsstub.c | 67 - hw/kdrive/epson/Makefile.am | 36 - hw/kdrive/epson/Xepson.man | 26 - hw/kdrive/epson/epson13806.c | 604 ------ hw/kdrive/epson/epson13806.h | 132 -- hw/kdrive/epson/epson13806draw.c | 649 ------ hw/kdrive/epson/epson13806draw.h | 119 -- hw/kdrive/epson/epson13806reg.h | 183 -- hw/kdrive/epson/epson13806stub.c | 69 - hw/kdrive/i810/Makefile.am | 39 - hw/kdrive/i810/i810.c | 2112 ------------------- hw/kdrive/i810/i810.h | 511 ----- hw/kdrive/i810/i810_cursor.c | 435 ---- hw/kdrive/i810/i810_reg.h | 695 ------- hw/kdrive/i810/i810_video.c | 1136 ----------- hw/kdrive/i810/i810draw.c | 352 ---- hw/kdrive/i810/i810draw.h | 46 - hw/kdrive/i810/i810stub.c | 92 - hw/kdrive/igs/igs.c | 667 ------ hw/kdrive/igs/igs.h | 327 --- hw/kdrive/igs/igscmap.c | 62 - hw/kdrive/igs/igscurs.c | 345 ---- hw/kdrive/igs/igsdraw.c | 1463 -------------- hw/kdrive/igs/igsdraw.h | 258 --- hw/kdrive/igs/igsreg.c | 969 --------- hw/kdrive/igs/igsreg.h | 155 -- hw/kdrive/igs/igsstub.c | 71 - hw/kdrive/ipaq/ipaq.c | 70 - hw/kdrive/itsy/itsy.c | 325 --- hw/kdrive/itsy/itsy.h | 39 - hw/kdrive/itsy/kbd.c | 251 --- hw/kdrive/itsy/ts.c | 210 -- hw/kdrive/mach64/Makefile.am | 43 - hw/kdrive/mach64/mach64.c | 433 ---- hw/kdrive/mach64/mach64.h | 653 ------ hw/kdrive/mach64/mach64curs.c | 389 ---- hw/kdrive/mach64/mach64draw.c | 590 ------ hw/kdrive/mach64/mach64draw.h | 69 - hw/kdrive/mach64/mach64stub.c | 75 - hw/kdrive/mach64/mach64video.c | 994 --------- hw/kdrive/mga/Makefile.am | 38 - hw/kdrive/mga/g400_common.h | 185 -- hw/kdrive/mga/g400_composite.c | 510 ----- hw/kdrive/mga/mga.c | 240 --- hw/kdrive/mga/mga.h | 164 -- hw/kdrive/mga/mgadraw.c | 324 --- hw/kdrive/mga/mgastub.c | 64 - hw/kdrive/neomagic/Makefile.am | 49 - hw/kdrive/neomagic/README | 15 - hw/kdrive/neomagic/neo_draw.c | 210 -- hw/kdrive/neomagic/neomagic.c | 335 ---- hw/kdrive/neomagic/neomagic.h | 210 -- hw/kdrive/neomagic/neomagicstub.c | 73 - hw/kdrive/nvidia/Makefile.am | 39 - hw/kdrive/nvidia/nvidia.c | 361 ---- hw/kdrive/nvidia/nvidia.h | 247 --- hw/kdrive/nvidia/nvidiacurs.c | 389 ---- hw/kdrive/nvidia/nvidiadraw.c | 238 --- hw/kdrive/nvidia/nvidiadraw.h | 69 - hw/kdrive/nvidia/nvidiastub.c | 65 - hw/kdrive/nvidia/nvidiavideo.c | 1016 ---------- hw/kdrive/pcmcia/modes.h | 65 - hw/kdrive/pcmcia/pcmcia.c | 1199 ----------- hw/kdrive/pcmcia/pcmcia.h | 267 --- hw/kdrive/pcmcia/pcmciacurs.c | 451 ----- hw/kdrive/pcmcia/pcmciarotate.c | 333 --- hw/kdrive/pcmcia/pcmciashadow.c | 199 -- hw/kdrive/pcmcia/pcmciastub.c | 63 - hw/kdrive/pm2/Makefile.am | 37 - hw/kdrive/pm2/glint_regs.h | 1370 ------------- hw/kdrive/pm2/pm2.c | 295 --- hw/kdrive/pm2/pm2.h | 162 -- hw/kdrive/pm2/pm2_draw.c | 318 --- hw/kdrive/pm2/pm2stub.c | 54 - hw/kdrive/r128/Makefile.am | 36 - hw/kdrive/r128/r128.c | 250 --- hw/kdrive/r128/r128.h | 123 -- hw/kdrive/r128/r128draw.c | 296 --- hw/kdrive/r128/r128stub.c | 67 - hw/kdrive/savage/s3.c | 1835 ----------------- hw/kdrive/savage/s3.h | 533 ----- hw/kdrive/savage/s3.nick | 41 - hw/kdrive/savage/s3clock.c | 84 - hw/kdrive/savage/s3cmap.c | 122 -- hw/kdrive/savage/s3curs.c | 422 ---- hw/kdrive/savage/s3draw.c | 3114 ----------------------------- hw/kdrive/savage/s3draw.h | 468 ----- hw/kdrive/savage/s3gc.c | 299 --- hw/kdrive/savage/s3reg.c | 1301 ------------ hw/kdrive/savage/s3reg.h | 227 --- hw/kdrive/savage/s3rtst.c | 141 -- hw/kdrive/savage/s3stub.c | 93 - hw/kdrive/sis300/Makefile.am | 51 - hw/kdrive/sis300/sis.c | 311 --- hw/kdrive/sis300/sis.h | 160 -- hw/kdrive/sis300/sis_draw.c | 320 --- hw/kdrive/sis300/sis_reg.h | 902 --------- hw/kdrive/sis300/sis_stub.c | 77 - hw/kdrive/sis530/sis.c | 921 --------- hw/kdrive/sis530/sis.h | 1215 ----------- hw/kdrive/sis530/sisclock.c | 232 --- hw/kdrive/sis530/siscmap.c | 64 - hw/kdrive/sis530/siscurs.c | 364 ---- hw/kdrive/sis530/sisdraw.c | 1649 --------------- hw/kdrive/sis530/sisdraw.h | 180 -- hw/kdrive/sis530/sisio.c | 30 - hw/kdrive/sis530/sisstub.c | 67 - hw/kdrive/smi/Makefile.am | 41 - hw/kdrive/smi/smi.c | 343 ---- hw/kdrive/smi/smi.h | 257 --- hw/kdrive/smi/smidraw.c | 340 ---- hw/kdrive/smi/smidraw.h | 69 - hw/kdrive/smi/smistub.c | 67 - hw/kdrive/smi/smivideo.c | 1015 ---------- hw/kdrive/trident/trident.c | 612 ------ hw/kdrive/trident/trident.h | 269 --- hw/kdrive/trident/tridentcurs.c | 389 ---- hw/kdrive/trident/tridentdraw.c | 496 ----- hw/kdrive/trident/tridentdraw.h | 69 - hw/kdrive/trident/tridentstub.c | 94 - hw/kdrive/trio/s3.c | 1013 ---------- hw/kdrive/trio/s3.h | 1200 ----------- hw/kdrive/trio/s3clock.c | 85 - hw/kdrive/trio/s3cmap.c | 70 - hw/kdrive/trio/s3curs.c | 408 ---- hw/kdrive/trio/s3stub.c | 66 - hw/kdrive/ts300/ts300.c | 136 -- hw/kdrive/via/Makefile.am | 37 - hw/kdrive/via/via.c | 435 ---- hw/kdrive/via/via.h | 129 -- hw/kdrive/via/via_regs.h | 154 -- hw/kdrive/via/viadraw.c | 499 ----- hw/kdrive/via/viadraw.h | 45 - hw/kdrive/via/viastub.c | 135 -- hw/kdrive/vxworks/vxkbd.c | 263 --- hw/kdrive/vxworks/vxmouse.c | 122 -- hw/kdrive/vxworks/vxworks.c | 42 - 168 files changed, 3 insertions(+), 63343 deletions(-) delete mode 100644 hw/kdrive/ati/Makefile.am delete mode 100644 hw/kdrive/ati/ati.c delete mode 100644 hw/kdrive/ati/ati.h delete mode 100644 hw/kdrive/ati/ati_cursor.c delete mode 100644 hw/kdrive/ati/ati_dma.c delete mode 100644 hw/kdrive/ati/ati_dma.h delete mode 100644 hw/kdrive/ati/ati_draw.c delete mode 100644 hw/kdrive/ati/ati_draw.h delete mode 100644 hw/kdrive/ati/ati_drawtmp.h delete mode 100644 hw/kdrive/ati/ati_dri.c delete mode 100644 hw/kdrive/ati/ati_dri.h delete mode 100644 hw/kdrive/ati/ati_dripriv.h delete mode 100644 hw/kdrive/ati/ati_microcode.c delete mode 100644 hw/kdrive/ati/ati_reg.h delete mode 100644 hw/kdrive/ati/ati_sarea.h delete mode 100644 hw/kdrive/ati/ati_stub.c delete mode 100644 hw/kdrive/ati/ati_video.c delete mode 100644 hw/kdrive/ati/r128_blendtmp.h delete mode 100644 hw/kdrive/ati/r128_common.h delete mode 100644 hw/kdrive/ati/r128_composite.c delete mode 100644 hw/kdrive/ati/r128_sarea.h delete mode 100644 hw/kdrive/ati/radeon_common.h delete mode 100644 hw/kdrive/ati/radeon_composite.c delete mode 100644 hw/kdrive/ati/radeon_sarea.h delete mode 100644 hw/kdrive/chips/Makefile.am delete mode 100644 hw/kdrive/chips/chips.c delete mode 100644 hw/kdrive/chips/chips.h delete mode 100644 hw/kdrive/chips/chipsdraw.c delete mode 100644 hw/kdrive/chips/chipsstub.c delete mode 100644 hw/kdrive/epson/Makefile.am delete mode 100644 hw/kdrive/epson/Xepson.man delete mode 100644 hw/kdrive/epson/epson13806.c delete mode 100644 hw/kdrive/epson/epson13806.h delete mode 100644 hw/kdrive/epson/epson13806draw.c delete mode 100644 hw/kdrive/epson/epson13806draw.h delete mode 100644 hw/kdrive/epson/epson13806reg.h delete mode 100644 hw/kdrive/epson/epson13806stub.c delete mode 100644 hw/kdrive/i810/Makefile.am delete mode 100644 hw/kdrive/i810/i810.c delete mode 100644 hw/kdrive/i810/i810.h delete mode 100644 hw/kdrive/i810/i810_cursor.c delete mode 100644 hw/kdrive/i810/i810_reg.h delete mode 100644 hw/kdrive/i810/i810_video.c delete mode 100644 hw/kdrive/i810/i810draw.c delete mode 100644 hw/kdrive/i810/i810draw.h delete mode 100644 hw/kdrive/i810/i810stub.c delete mode 100644 hw/kdrive/igs/igs.c delete mode 100644 hw/kdrive/igs/igs.h delete mode 100644 hw/kdrive/igs/igscmap.c delete mode 100644 hw/kdrive/igs/igscurs.c delete mode 100644 hw/kdrive/igs/igsdraw.c delete mode 100644 hw/kdrive/igs/igsdraw.h delete mode 100644 hw/kdrive/igs/igsreg.c delete mode 100644 hw/kdrive/igs/igsreg.h delete mode 100644 hw/kdrive/igs/igsstub.c delete mode 100644 hw/kdrive/ipaq/ipaq.c delete mode 100644 hw/kdrive/itsy/itsy.c delete mode 100644 hw/kdrive/itsy/itsy.h delete mode 100644 hw/kdrive/itsy/kbd.c delete mode 100644 hw/kdrive/itsy/ts.c delete mode 100644 hw/kdrive/mach64/Makefile.am delete mode 100644 hw/kdrive/mach64/mach64.c delete mode 100644 hw/kdrive/mach64/mach64.h delete mode 100644 hw/kdrive/mach64/mach64curs.c delete mode 100644 hw/kdrive/mach64/mach64draw.c delete mode 100644 hw/kdrive/mach64/mach64draw.h delete mode 100644 hw/kdrive/mach64/mach64stub.c delete mode 100644 hw/kdrive/mach64/mach64video.c delete mode 100644 hw/kdrive/mga/Makefile.am delete mode 100644 hw/kdrive/mga/g400_common.h delete mode 100644 hw/kdrive/mga/g400_composite.c delete mode 100644 hw/kdrive/mga/mga.c delete mode 100644 hw/kdrive/mga/mga.h delete mode 100644 hw/kdrive/mga/mgadraw.c delete mode 100644 hw/kdrive/mga/mgastub.c delete mode 100644 hw/kdrive/neomagic/Makefile.am delete mode 100644 hw/kdrive/neomagic/README delete mode 100644 hw/kdrive/neomagic/neo_draw.c delete mode 100644 hw/kdrive/neomagic/neomagic.c delete mode 100644 hw/kdrive/neomagic/neomagic.h delete mode 100644 hw/kdrive/neomagic/neomagicstub.c delete mode 100644 hw/kdrive/nvidia/Makefile.am delete mode 100644 hw/kdrive/nvidia/nvidia.c delete mode 100644 hw/kdrive/nvidia/nvidia.h delete mode 100644 hw/kdrive/nvidia/nvidiacurs.c delete mode 100644 hw/kdrive/nvidia/nvidiadraw.c delete mode 100644 hw/kdrive/nvidia/nvidiadraw.h delete mode 100644 hw/kdrive/nvidia/nvidiastub.c delete mode 100644 hw/kdrive/nvidia/nvidiavideo.c delete mode 100644 hw/kdrive/pcmcia/modes.h delete mode 100644 hw/kdrive/pcmcia/pcmcia.c delete mode 100644 hw/kdrive/pcmcia/pcmcia.h delete mode 100644 hw/kdrive/pcmcia/pcmciacurs.c delete mode 100644 hw/kdrive/pcmcia/pcmciarotate.c delete mode 100644 hw/kdrive/pcmcia/pcmciashadow.c delete mode 100644 hw/kdrive/pcmcia/pcmciastub.c delete mode 100644 hw/kdrive/pm2/Makefile.am delete mode 100644 hw/kdrive/pm2/glint_regs.h delete mode 100644 hw/kdrive/pm2/pm2.c delete mode 100644 hw/kdrive/pm2/pm2.h delete mode 100644 hw/kdrive/pm2/pm2_draw.c delete mode 100644 hw/kdrive/pm2/pm2stub.c delete mode 100644 hw/kdrive/r128/Makefile.am delete mode 100644 hw/kdrive/r128/r128.c delete mode 100644 hw/kdrive/r128/r128.h delete mode 100644 hw/kdrive/r128/r128draw.c delete mode 100644 hw/kdrive/r128/r128stub.c delete mode 100644 hw/kdrive/savage/s3.c delete mode 100644 hw/kdrive/savage/s3.h delete mode 100644 hw/kdrive/savage/s3.nick delete mode 100644 hw/kdrive/savage/s3clock.c delete mode 100644 hw/kdrive/savage/s3cmap.c delete mode 100644 hw/kdrive/savage/s3curs.c delete mode 100644 hw/kdrive/savage/s3draw.c delete mode 100644 hw/kdrive/savage/s3draw.h delete mode 100644 hw/kdrive/savage/s3gc.c delete mode 100644 hw/kdrive/savage/s3reg.c delete mode 100644 hw/kdrive/savage/s3reg.h delete mode 100644 hw/kdrive/savage/s3rtst.c delete mode 100644 hw/kdrive/savage/s3stub.c delete mode 100644 hw/kdrive/sis300/Makefile.am delete mode 100644 hw/kdrive/sis300/sis.c delete mode 100644 hw/kdrive/sis300/sis.h delete mode 100644 hw/kdrive/sis300/sis_draw.c delete mode 100644 hw/kdrive/sis300/sis_reg.h delete mode 100644 hw/kdrive/sis300/sis_stub.c delete mode 100644 hw/kdrive/sis530/sis.c delete mode 100644 hw/kdrive/sis530/sis.h delete mode 100644 hw/kdrive/sis530/sisclock.c delete mode 100644 hw/kdrive/sis530/siscmap.c delete mode 100644 hw/kdrive/sis530/siscurs.c delete mode 100644 hw/kdrive/sis530/sisdraw.c delete mode 100644 hw/kdrive/sis530/sisdraw.h delete mode 100644 hw/kdrive/sis530/sisio.c delete mode 100644 hw/kdrive/sis530/sisstub.c delete mode 100644 hw/kdrive/smi/Makefile.am delete mode 100644 hw/kdrive/smi/smi.c delete mode 100644 hw/kdrive/smi/smi.h delete mode 100644 hw/kdrive/smi/smidraw.c delete mode 100644 hw/kdrive/smi/smidraw.h delete mode 100644 hw/kdrive/smi/smistub.c delete mode 100644 hw/kdrive/smi/smivideo.c delete mode 100644 hw/kdrive/trident/trident.c delete mode 100644 hw/kdrive/trident/trident.h delete mode 100644 hw/kdrive/trident/tridentcurs.c delete mode 100644 hw/kdrive/trident/tridentdraw.c delete mode 100644 hw/kdrive/trident/tridentdraw.h delete mode 100644 hw/kdrive/trident/tridentstub.c delete mode 100644 hw/kdrive/trio/s3.c delete mode 100644 hw/kdrive/trio/s3.h delete mode 100644 hw/kdrive/trio/s3clock.c delete mode 100644 hw/kdrive/trio/s3cmap.c delete mode 100644 hw/kdrive/trio/s3curs.c delete mode 100644 hw/kdrive/trio/s3stub.c delete mode 100644 hw/kdrive/ts300/ts300.c delete mode 100644 hw/kdrive/via/Makefile.am delete mode 100644 hw/kdrive/via/via.c delete mode 100644 hw/kdrive/via/via.h delete mode 100644 hw/kdrive/via/via_regs.h delete mode 100644 hw/kdrive/via/viadraw.c delete mode 100644 hw/kdrive/via/viadraw.h delete mode 100644 hw/kdrive/via/viastub.c delete mode 100644 hw/kdrive/vxworks/vxkbd.c delete mode 100644 hw/kdrive/vxworks/vxmouse.c delete mode 100644 hw/kdrive/vxworks/vxworks.c diff --git a/configure.ac b/configure.ac index 8716ba51d..403ce8c89 100644 --- a/configure.ac +++ b/configure.ac @@ -2102,25 +2102,12 @@ hw/xquartz/doc/Makefile hw/xquartz/mach-startup/Makefile hw/xquartz/xpr/Makefile hw/kdrive/Makefile -hw/kdrive/ati/Makefile -hw/kdrive/chips/Makefile hw/kdrive/ephyr/Makefile -hw/kdrive/epson/Makefile hw/kdrive/fake/Makefile hw/kdrive/fbdev/Makefile -hw/kdrive/i810/Makefile hw/kdrive/linux/Makefile -hw/kdrive/mach64/Makefile -hw/kdrive/mga/Makefile -hw/kdrive/neomagic/Makefile -hw/kdrive/nvidia/Makefile -hw/kdrive/pm2/Makefile -hw/kdrive/r128/Makefile hw/kdrive/sdl/Makefile -hw/kdrive/sis300/Makefile -hw/kdrive/smi/Makefile hw/kdrive/src/Makefile hw/kdrive/vesa/Makefile -hw/kdrive/via/Makefile xorg-server.pc ]) diff --git a/hw/kdrive/Makefile.am b/hw/kdrive/Makefile.am index 767e1c40d..c30a157c7 100644 --- a/hw/kdrive/Makefile.am +++ b/hw/kdrive/Makefile.am @@ -1,10 +1,9 @@ if KDRIVEVESA -VESA_SUBDIRS = vesa ati chips i810 mach64 mga nvidia pm2 r128 \ - smi via +VESA_SUBDIRS = vesa endif if BUILD_KDRIVEFBDEVLIB -FBDEV_SUBDIRS = fbdev epson +FBDEV_SUBDIRS = fbdev endif if XFAKESERVER @@ -35,8 +34,7 @@ SUBDIRS = \ $(LINUX_SUBDIRS) \ $(SERVER_SUBDIRS) -DIST_SUBDIRS = vesa ati chips epson i810 mach64 mga neomagic nvidia pm2 r128 \ - smi via fbdev sdl ephyr src linux fake sis300 +DIST_SUBDIRS = vesa fbdev sdl ephyr src linux fake relink: @for i in $(SERVER_SUBDIRS) ; do make -C $$i relink ; done diff --git a/hw/kdrive/Xkdrive.man b/hw/kdrive/Xkdrive.man index b4f1a977d..b37f9f10a 100644 --- a/hw/kdrive/Xkdrive.man +++ b/hw/kdrive/Xkdrive.man @@ -11,26 +11,6 @@ Xkdrive \- tiny X server .B Xfbdev .RI [ :display ] .RI [ option ...] - -.B Xigs -.RI [ :display ] -.RI [ option ...] - -.B Xtrident -.RI [ :display ] -.RI [ option ...] - -.B Xsis530 -.RI [ :display ] -.RI [ option ...] - -.B Xtrio -.RI [ :display ] -.RI [ option ...] - -.B Xitsy -.RI [ :display ] -.RI [ option ...] .SH DESCRIPTION .B Xkdrive is a family of X servers designed to be particularly small. This diff --git a/hw/kdrive/ati/Makefile.am b/hw/kdrive/ati/Makefile.am deleted file mode 100644 index 31462bb04..000000000 --- a/hw/kdrive/ati/Makefile.am +++ /dev/null @@ -1,74 +0,0 @@ -#if DRI -#DRI_INCLUDES = -I$(top_srcdir)/dri \ -# -I$(top_srcdir)/drm -#DRI_LIBS = $(top_builddir)/dri/libdri.a \ -# $(top_builddir)/drm/libdrm.a -#DRI_SOURCES = ati_dri.c \ -# ati_dri.h \ -# ati_dripriv.h \ -# r128_common.h \ -# r128_sarea.h \ -# radeon_common.h \ -# radeon_sarea.h -#endif - -if KDRIVEFBDEV -FBDEV_INCLUDES =-I$(top_srcdir)/hw/kdrive/fbdev -FBDEV_LIBS = $(top_builddir)/hw/kdrive/fbdev/libfbdev.a -endif - -if KDRIVEVESA -VESA_INCLUDES = -I$(top_srcdir)/hw/kdrive/vesa -VESA_LIBS = $(top_builddir)/hw/kdrive/vesa/libvesa.a -endif - -INCLUDES = \ - @KDRIVE_INCS@ \ - $(DRI_INCLUDES) \ - $(FBDEV_INCLUDES) \ - $(VESA_INCLUDES) \ - @KDRIVE_CFLAGS@ - -bin_PROGRAMS = Xati - -noinst_LIBRARIES = libati.a - -libati_a_SOURCES = \ - ati_cursor.c \ - ati_dma.c \ - ati_dma.h \ - ati_draw.c \ - ati_draw.h \ - ati_microcode.c \ - ati.c \ - ati.h \ - ati_reg.h \ - r128_composite.c \ - ati_video.c \ - radeon_composite.c \ - $(DRI_SOURCES) - -Xati_SOURCES = \ - ati_stub.c - -ATI_LIBS = \ - libati.a \ - $(FBDEV_LIBS) \ - $(VESA_LIBS) \ - $(DRI_LIBS) \ - @KDRIVE_LIBS@ - -if GLX -Xati_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -endif - -Xati_LDADD = \ - $(ATI_LIBS) \ - @KDRIVE_LIBS@ - -Xati_DEPENDENCIES = \ - libati.a \ - @KDRIVE_LOCAL_LIBS@ - -relink: - rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS) diff --git a/hw/kdrive/ati/ati.c b/hw/kdrive/ati/ati.c deleted file mode 100644 index c4f67e171..000000000 --- a/hw/kdrive/ati/ati.c +++ /dev/null @@ -1,761 +0,0 @@ -/* - * Copyright © 2003 Eric Anholt - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Eric Anholt not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Eric Anholt makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "ati.h" -#include "ati_reg.h" -#if defined(USE_DRI) && defined(GLXEXT) -#include "ati_sarea.h" -#endif - -static Bool ATIIsAGP(ATICardInfo *atic); - -#define CAP_SERIESMASK 0xf -#define CAP_R128 0x1 /* If it's a Rage 128 */ -#define CAP_R100 0x2 /* If it's an r100 series radeon. */ -#define CAP_R200 0x3 /* If it's an r200 series radeon. */ -#define CAP_R300 0x4 /* If it's an r300 series radeon. */ - -#define CAP_FEATURESMASK 0xf0 -#define CAP_NOAGP 0x10 /* If it's a PCI-only card. */ - -struct pci_id_entry ati_pci_ids[] = { - {0x1002, 0x4136, 0x2, "ATI Radeon RS100"}, - {0x1002, 0x4137, 0x2, "ATI Radeon RS200"}, - {0x1002, 0x4237, 0x2, "ATI Radeon RS250"}, - {0x1002, 0x4144, 0x4, "ATI Radeon R300 AD"}, - {0x1002, 0x4145, 0x4, "ATI Radeon R300 AE"}, - {0x1002, 0x4146, 0x4, "ATI Radeon R300 AF"}, - {0x1002, 0x4147, 0x4, "ATI Radeon R300 AG"}, - {0x1002, 0x4148, 0x4, "ATI Radeon R350 AH"}, - {0x1002, 0x4149, 0x4, "ATI Radeon R350 AI"}, - {0x1002, 0x414a, 0x4, "ATI Radeon R350 AJ"}, - {0x1002, 0x414b, 0x4, "ATI Radeon R350 AK"}, - {0x1002, 0x4150, 0x4, "ATI Radeon RV350 AP"}, - {0x1002, 0x4151, 0x4, "ATI Radeon RV350 AQ"}, - {0x1002, 0x4152, 0x4, "ATI Radeon RV350 AR"}, - {0x1002, 0x4153, 0x4, "ATI Radeon RV350 AS"}, - {0x1002, 0x4154, 0x4, "ATI Radeon RV350 AT"}, - {0x1002, 0x4156, 0x4, "ATI Radeon RV350 AV"}, - {0x1002, 0x4242, 0x3, "ATI Radeon R200 BB"}, - {0x1002, 0x4243, 0x3, "ATI Radeon R200 BC"}, - {0x1002, 0x4336, 0x2, "ATI Radeon RS100"}, - {0x1002, 0x4337, 0x2, "ATI Radeon RS200"}, - {0x1002, 0x4437, 0x2, "ATI Radeon RS250"}, - {0x1002, 0x4964, 0x2, "ATI Radeon RV250 Id"}, - {0x1002, 0x4965, 0x2, "ATI Radeon RV250 Ie"}, - {0x1002, 0x4966, 0x2, "ATI Radeon RV250 If"}, - {0x1002, 0x4967, 0x2, "ATI Radeon R250 Ig"}, - {0x1002, 0x4c45, 0x11, "ATI Rage 128 LE"}, - {0x1002, 0x4c46, 0x1, "ATI Rage 128 LF"}, - {0x1002, 0x4c57, 0x2, "ATI Radeon Mobiliy M7 RV200 LW (7500)"}, - {0x1002, 0x4c58, 0x2, "ATI Radeon Mobiliy M7 RV200 LX (7500)"}, - {0x1002, 0x4c59, 0x2, "ATI Radeon Mobility M6 LY"}, - {0x1002, 0x4c5a, 0x2, "ATI Radeon Mobility M6 LZ"}, - {0x1002, 0x4c64, 0x3, "ATI Radeon RV250 Ld"}, - {0x1002, 0x4c65, 0x3, "ATI Radeon RV250 Le"}, - {0x1002, 0x4c66, 0x3, "ATI Radeon Mobility M9 RV250 Lf"}, - {0x1002, 0x4c67, 0x3, "ATI Radeon RV250 Lg"}, - {0x1002, 0x4d46, 0x1, "ATI Rage 128 MF"}, - {0x1002, 0x4d46, 0x1, "ATI Rage 128 ML"}, - {0x1002, 0x4e44, 0x4, "ATI Radeon R300 ND"}, - {0x1002, 0x4e45, 0x4, "ATI Radeon R300 NE"}, - {0x1002, 0x4e46, 0x4, "ATI Radeon R300 NF"}, - {0x1002, 0x4e47, 0x4, "ATI Radeon R300 NG"}, - {0x1002, 0x4e48, 0x4, "ATI Radeon R350 NH"}, - {0x1002, 0x4e49, 0x4, "ATI Radeon R350 NI"}, - {0x1002, 0x4e4a, 0x4, "ATI Radeon R350 NJ"}, - {0x1002, 0x4e4b, 0x4, "ATI Radeon R350 NK"}, - {0x1002, 0x4e50, 0x4, "ATI Radeon Mobility RV350 NP"}, - {0x1002, 0x4e51, 0x4, "ATI Radeon Mobility RV350 NQ"}, - {0x1002, 0x4e52, 0x4, "ATI Radeon Mobility RV350 NR"}, - {0x1002, 0x4e53, 0x4, "ATI Radeon Mobility RV350 NS"}, - {0x1002, 0x4e54, 0x4, "ATI Radeon Mobility RV350 NT"}, - {0x1002, 0x4e56, 0x4, "ATI Radeon Mobility RV350 NV"}, - {0x1002, 0x5041, 0x1, "ATI Rage 128 PA"}, - {0x1002, 0x5042, 0x1, "ATI Rage 128 PB"}, - {0x1002, 0x5043, 0x1, "ATI Rage 128 PC"}, - {0x1002, 0x5044, 0x11, "ATI Rage 128 PD"}, - {0x1002, 0x5045, 0x1, "ATI Rage 128 PE"}, - {0x1002, 0x5046, 0x1, "ATI Rage 128 PF"}, - {0x1002, 0x5047, 0x1, "ATI Rage 128 PG"}, - {0x1002, 0x5048, 0x1, "ATI Rage 128 PH"}, - {0x1002, 0x5049, 0x1, "ATI Rage 128 PI"}, - {0x1002, 0x504a, 0x1, "ATI Rage 128 PJ"}, - {0x1002, 0x504b, 0x1, "ATI Rage 128 PK"}, - {0x1002, 0x504c, 0x1, "ATI Rage 128 PL"}, - {0x1002, 0x504d, 0x1, "ATI Rage 128 PM"}, - {0x1002, 0x504e, 0x1, "ATI Rage 128 PN"}, - {0x1002, 0x504f, 0x1, "ATI Rage 128 PO"}, - {0x1002, 0x5050, 0x11, "ATI Rage 128 PP"}, - {0x1002, 0x5051, 0x1, "ATI Rage 128 PQ"}, - {0x1002, 0x5052, 0x11, "ATI Rage 128 PR"}, - {0x1002, 0x5053, 0x1, "ATI Rage 128 PS"}, - {0x1002, 0x5054, 0x1, "ATI Rage 128 PT"}, - {0x1002, 0x5055, 0x1, "ATI Rage 128 PU"}, - {0x1002, 0x5056, 0x1, "ATI Rage 128 PV"}, - {0x1002, 0x5057, 0x1, "ATI Rage 128 PW"}, - {0x1002, 0x5058, 0x1, "ATI Rage 128 PX"}, - {0x1002, 0x5144, 0x2, "ATI Radeon R100 QD"}, - {0x1002, 0x5145, 0x2, "ATI Radeon R100 QE"}, - {0x1002, 0x5146, 0x2, "ATI Radeon R100 QF"}, - {0x1002, 0x5147, 0x2, "ATI Radeon R100 QG"}, - {0x1002, 0x5148, 0x3, "ATI Radeon R200 QH"}, - {0x1002, 0x514c, 0x3, "ATI Radeon R200 QL"}, - {0x1002, 0x514d, 0x3, "ATI Radeon R200 QM"}, - {0x1002, 0x5157, 0x2, "ATI Radeon RV200 QW (7500)"}, - {0x1002, 0x5158, 0x2, "ATI Radeon RV200 QX (7500)"}, - {0x1002, 0x5159, 0x2, "ATI Radeon RV100 QY"}, - {0x1002, 0x515a, 0x2, "ATI Radeon RV100 QZ"}, - {0x1002, 0x5245, 0x11, "ATI Rage 128 RE"}, - {0x1002, 0x5246, 0x1, "ATI Rage 128 RF"}, - {0x1002, 0x5247, 0x1, "ATI Rage 128 RG"}, - {0x1002, 0x524b, 0x11, "ATI Rage 128 RK"}, - {0x1002, 0x524c, 0x1, "ATI Rage 128 RL"}, - {0x1002, 0x5345, 0x1, "ATI Rage 128 SE"}, - {0x1002, 0x5346, 0x1, "ATI Rage 128 SF"}, - {0x1002, 0x5347, 0x1, "ATI Rage 128 SG"}, - {0x1002, 0x5348, 0x1, "ATI Rage 128 SH"}, - {0x1002, 0x534b, 0x1, "ATI Rage 128 SK"}, - {0x1002, 0x534c, 0x1, "ATI Rage 128 SL"}, - {0x1002, 0x534d, 0x1, "ATI Rage 128 SM"}, - {0x1002, 0x534e, 0x1, "ATI Rage 128 SN"}, - {0x1002, 0x5446, 0x1, "ATI Rage 128 TF"}, - {0x1002, 0x544c, 0x1, "ATI Rage 128 TL"}, - {0x1002, 0x5452, 0x1, "ATI Rage 128 TR"}, - {0x1002, 0x5453, 0x1, "ATI Rage 128 TS"}, - {0x1002, 0x5454, 0x1, "ATI Rage 128 TT"}, - {0x1002, 0x5455, 0x1, "ATI Rage 128 TU"}, - {0x1002, 0x5834, 0x3, "ATI Radeon RS300"}, - {0x1002, 0x5835, 0x3, "ATI Radeon RS300 Mobility"}, - {0x1002, 0x5941, 0x3, "ATI Radeon RV280 (9200)"}, - {0x1002, 0x5961, 0x3, "ATI Radeon RV280 (9200 SE)"}, - {0x1002, 0x5964, 0x3, "ATI Radeon RV280 (9200 SE)"}, - {0x1002, 0x5c60, 0x3, "ATI Radeon RV280"}, - {0x1002, 0x5c61, 0x3, "ATI Radeon RV280 Mobility"}, - {0x1002, 0x5c62, 0x3, "ATI Radeon RV280"}, - {0x1002, 0x5c63, 0x3, "ATI Radeon RV280 Mobility"}, - {0x1002, 0x5c64, 0x3, "ATI Radeon RV280"}, - {0, 0, 0, NULL} -}; - -static char * -make_busid(KdCardAttr *attr) -{ - char *busid; - - busid = xalloc(20); - if (busid == NULL) - return NULL; - snprintf(busid, 20, "pci:%04x:%02x:%02x.%d", attr->domain, attr->bus, - attr->slot, attr->func); - return busid; -} - -static Bool -ATICardInit(KdCardInfo *card) -{ - ATICardInfo *atic; - int i; - Bool initialized = FALSE; - - atic = xcalloc(sizeof(ATICardInfo), 1); - if (atic == NULL) - return FALSE; - -#ifdef KDRIVEFBDEV - if (!initialized && fbdevInitialize(card, &atic->backend_priv.fbdev)) { - atic->use_fbdev = TRUE; - initialized = TRUE; - atic->backend_funcs.cardfini = fbdevCardFini; - atic->backend_funcs.scrfini = fbdevScreenFini; - atic->backend_funcs.initScreen = fbdevInitScreen; - atic->backend_funcs.finishInitScreen = fbdevFinishInitScreen; - atic->backend_funcs.createRes = fbdevCreateResources; - atic->backend_funcs.preserve = fbdevPreserve; - atic->backend_funcs.restore = fbdevRestore; - atic->backend_funcs.dpms = fbdevDPMS; - atic->backend_funcs.enable = fbdevEnable; - atic->backend_funcs.disable = fbdevDisable; - atic->backend_funcs.getColors = fbdevGetColors; - atic->backend_funcs.putColors = fbdevPutColors; -#ifdef RANDR - atic->backend_funcs.randrSetConfig = fbdevRandRSetConfig; -#endif - } -#endif -#ifdef KDRIVEVESA - if (!initialized && vesaInitialize(card, &atic->backend_priv.vesa)) { - atic->use_vesa = TRUE; - initialized = TRUE; - atic->backend_funcs.cardfini = vesaCardFini; - atic->backend_funcs.scrfini = vesaScreenFini; - atic->backend_funcs.initScreen = vesaInitScreen; - atic->backend_funcs.finishInitScreen = vesaFinishInitScreen; - atic->backend_funcs.createRes = vesaCreateResources; - atic->backend_funcs.preserve = vesaPreserve; - atic->backend_funcs.restore = vesaRestore; - atic->backend_funcs.dpms = vesaDPMS; - atic->backend_funcs.enable = vesaEnable; - atic->backend_funcs.disable = vesaDisable; - atic->backend_funcs.getColors = vesaGetColors; - atic->backend_funcs.putColors = vesaPutColors; -#ifdef RANDR - atic->backend_funcs.randrSetConfig = vesaRandRSetConfig; -#endif - } -#endif - - if (!initialized || !ATIMapReg(card, atic)) { - xfree(atic); - return FALSE; - } - - atic->busid = make_busid(&card->attr); - if (atic->busid == NULL) { - xfree(atic); - return FALSE; - } - -#ifdef USE_DRI - /* We demand identification by busid, not driver name */ - atic->drmFd = drmOpen(NULL, atic->busid); - if (atic->drmFd < 0) - ErrorF("Failed to open DRM, DRI disabled.\n"); -#endif /* USE_DRI */ - - card->driver = atic; - - for (i = 0; ati_pci_ids[i].name != NULL; i++) { - if (ati_pci_ids[i].device == card->attr.deviceID) { - atic->pci_id = &ati_pci_ids[i]; - break; - } - } - - if ((atic->pci_id->caps & CAP_SERIESMASK) != CAP_R128) - atic->is_radeon = TRUE; - if ((atic->pci_id->caps & CAP_SERIESMASK) == CAP_R100) - atic->is_r100 = TRUE; - if ((atic->pci_id->caps & CAP_SERIESMASK) == CAP_R200) - atic->is_r200 = TRUE; - if ((atic->pci_id->caps & CAP_SERIESMASK) == CAP_R300) - atic->is_r300 = TRUE; - - atic->is_agp = ATIIsAGP(atic); - - ErrorF("Using ATI card: %s (%s) at %s\n", atic->pci_id->name, - atic->is_agp ? "AGP" : "PCI", atic->busid); - - return TRUE; -} - -static void -ATICardFini(KdCardInfo *card) -{ - ATICardInfo *atic = (ATICardInfo *)card->driver; - - ATIUnmapReg(card, atic); - atic->backend_funcs.cardfini(card); -} - -/* - * Once screen->off_screen_base is set, this function - * allocates the remaining memory appropriately - */ - -static void -ATISetOffscreen (KdScreenInfo *screen) -{ - ATICardInfo(screen); -#if defined(USE_DRI) && defined(GLXEXT) - ATIScreenInfo *atis = (ATIScreenInfo *)screen->driver; - int l; -#endif - int screen_size; - char *mmio = atic->reg_base; - - /* check (and adjust) pitch */ - if (mmio) - { - int byteStride = screen->fb[0].byteStride; - int bitStride; - int pixelStride; - int bpp = screen->fb[0].bitsPerPixel; - - /* - * Ensure frame buffer is correctly aligned - */ - if (byteStride & 0x3f) - { - byteStride = (byteStride + 0x3f) & ~0x3f; - bitStride = byteStride * 8; - pixelStride = bitStride / bpp; - - screen->fb[0].byteStride = byteStride; - screen->fb[0].pixelStride = pixelStride; - } - } - - screen_size = screen->fb[0].byteStride * screen->height; - - screen->off_screen_base = screen_size; - -#if defined(USE_DRI) && defined(GLXEXT) - /* Reserve a static area for the back buffer the same size as the - * visible screen. XXX: This would be better initialized in ati_dri.c - * when GLX is set up, but the offscreen memory manager's allocations - * don't last through VT switches, while the kernel's understanding of - * offscreen locations does. - */ - atis->frontOffset = 0; - atis->frontPitch = screen->fb[0].byteStride; - - if (screen->off_screen_base + screen_size <= screen->memory_size) { - atis->backOffset = screen->off_screen_base; - atis->backPitch = screen->fb[0].byteStride; - screen->off_screen_base += screen_size; - } - - /* Reserve the depth span for Rage 128 */ - if (!atic->is_radeon && screen->off_screen_base + - screen->fb[0].byteStride <= screen->memory_size) { - atis->spanOffset = screen->off_screen_base; - screen->off_screen_base += screen->fb[0].byteStride; - } - - /* Reserve the static depth buffer, which happens to be the same - * bitsPerPixel as the screen. - */ - if (screen->off_screen_base + screen_size <= screen->memory_size) { - atis->depthOffset = screen->off_screen_base; - atis->depthPitch = screen->fb[0].byteStride; - screen->off_screen_base += screen_size; - } - - /* Reserve approx. half of remaining offscreen memory for local - * textures. Round down to a whole number of texture regions. - */ - atis->textureSize = (screen->memory_size - screen->off_screen_base) / 2; - l = ATILog2(atis->textureSize / ATI_NR_TEX_REGIONS); - if (l < ATI_LOG_TEX_GRANULARITY) - l = ATI_LOG_TEX_GRANULARITY; - atis->textureSize = (atis->textureSize >> l) << l; - if (atis->textureSize >= 512 * 1024) { - atis->textureOffset = screen->off_screen_base; - screen->off_screen_base += atis->textureSize; - } else { - /* Minimum texture size is for 2 256x256x32bpp textures */ - atis->textureSize = 0; - } -#endif /* USE_DRI && GLXEXT */ -} - -static void -ATISetPitch (KdScreenInfo *screen) -{ - ATICardInfo(screen); -#if defined(USE_DRI) && defined(GLXEXT) - ATIScreenInfo *atis = (ATIScreenInfo *)screen->driver; - int l; -#endif - char *mmio = atic->reg_base; - - /* check (and adjust) pitch for radeon */ - if (mmio) - { - int byteStride = screen->fb[0].byteStride; - int bitStride; - int pixelStride; - int bpp = screen->fb[0].bitsPerPixel; - CARD32 crtc_pitch; - CARD32 crtc2_pitch; -#if 0 - CARD32 crtc_ext_cntl; - CARD32 dac_cntl; -#endif - bitStride = byteStride * 8; - pixelStride = bitStride / bpp; - - crtc_pitch = (pixelStride >> 3); - crtc_pitch |= crtc_pitch << 16; - crtc2_pitch = (pixelStride >> 3); - crtc2_pitch |= crtc2_pitch << 16; -#if 0 - crtc_ext_cntl = MMIO_IN32 (mmio, ATI_REG_CRTC_EXT_CNTL); - dac_cntl = MMIO_IN32 (mmio, ATI_REG_DAC_CNTL); - /* Turn off the screen */ - MMIO_OUT32 (mmio, ATI_REG_CRTC_EXT_CNTL, - crtc_ext_cntl | - ATI_CRTC_VSYNC_DIS | - ATI_CRTC_HSYNC_DIS | - ATI_CRTC_DISPLAY_DIS); - MMIO_OUT32 (mmio, ATI_REG_DAC_CNTL, - dac_cntl | - ATI_DAC_RANGE_CNTL | - ATI_DAC_BLANKING); -#endif - MMIO_OUT32 (mmio, ATI_REG_CRTC_PITCH, crtc_pitch); - MMIO_OUT32 (mmio, ATI_REG_CRTC2_PITCH, crtc2_pitch); -#if 0 - /* Turn the screen back on */ - MMIO_OUT32 (mmio, ATI_REG_CRTC_EXT_CNTL, - crtc_ext_cntl); - MMIO_OUT32 (mmio, ATI_REG_DAC_CNTL, - dac_cntl); -#endif - } -} - -static Bool -ATIScreenInit(KdScreenInfo *screen) -{ - ATIScreenInfo *atis; - ATICardInfo(screen); - Bool success = FALSE; - - atis = xcalloc(sizeof(ATIScreenInfo), 1); - if (atis == NULL) - return FALSE; - - atis->atic = atic; - atis->screen = screen; - screen->driver = atis; - - if (screen->fb[0].depth == 0) - screen->fb[0].depth = 16; -#ifdef KDRIVEFBDEV - if (atic->use_fbdev) { - success = fbdevScreenInitialize(screen, - &atis->backend_priv.fbdev); - } -#endif -#ifdef KDRIVEVESA - if (atic->use_vesa) { - success = vesaScreenInitialize(screen, - &atis->backend_priv.vesa); - } -#endif - - if (!success) { - screen->driver = NULL; - xfree(atis); - return FALSE; - } - - ATISetOffscreen (screen); - - return TRUE; -} - -#ifdef RANDR -static Bool -ATIRandRSetConfig (ScreenPtr pScreen, - Rotation randr, - int rate, - RRScreenSizePtr pSize) -{ - KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - ATICardInfo *atic = screen->card->driver; - Bool ret; - - ATIDrawDisable (pScreen); - ret = atic->backend_funcs.randrSetConfig(pScreen, randr, rate, pSize); - ATISetOffscreen (screen); - ATISetPitch (screen); - /* - * Set frame buffer mapping - */ - (*pScreen->ModifyPixmapHeader) (fbGetScreenPixmap (pScreen), - pScreen->width, - pScreen->height, - screen->fb[0].depth, - screen->fb[0].bitsPerPixel, - screen->fb[0].byteStride, - screen->fb[0].frameBuffer); - - ATIDrawEnable (pScreen); - return ret; -} - -static Bool -ATIRandRInit (ScreenPtr pScreen) -{ - rrScrPrivPtr pScrPriv; - - pScrPriv = rrGetScrPriv(pScreen); - pScrPriv->rrSetConfig = ATIRandRSetConfig; - return TRUE; -} -#endif - -static void -ATIScreenFini(KdScreenInfo *screen) -{ - ATIScreenInfo *atis = (ATIScreenInfo *)screen->driver; - ATICardInfo *atic = screen->card->driver; - -#ifdef XV - ATIFiniVideo(screen->pScreen); -#endif - - atic->backend_funcs.scrfini(screen); - xfree(atis); - screen->driver = 0; -} - -Bool -ATIMapReg(KdCardInfo *card, ATICardInfo *atic) -{ - atic->reg_base = (char *)KdMapDevice(ATI_REG_BASE(card), - ATI_REG_SIZE(card)); - - if (atic->reg_base == NULL) - return FALSE; - - KdSetMappedMode(ATI_REG_BASE(card), ATI_REG_SIZE(card), - KD_MAPPED_MODE_REGISTERS); - - return TRUE; -} - -void -ATIUnmapReg(KdCardInfo *card, ATICardInfo *atic) -{ - if (atic->reg_base) { - KdResetMappedMode(ATI_REG_BASE(card), ATI_REG_SIZE(card), - KD_MAPPED_MODE_REGISTERS); - KdUnmapDevice((void *)atic->reg_base, ATI_REG_SIZE(card)); - atic->reg_base = 0; - } -} - -static Bool -ATIInitScreen(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATICardInfo(pScreenPriv); - -#ifdef XV - ATIInitVideo(pScreen); -#endif - return atic->backend_funcs.initScreen(pScreen); -} - -static Bool -ATIFinishInitScreen(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATICardInfo(pScreenPriv); - - if (!atic->backend_funcs.finishInitScreen(pScreen)) - return FALSE; -#ifdef RANDR - if (!ATIRandRInit (pScreen)) - return FALSE; -#endif - return TRUE; -} - -static Bool -ATICreateResources(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATICardInfo(pScreenPriv); - - return atic->backend_funcs.createRes(pScreen); -} - -static void -ATIPreserve(KdCardInfo *card) -{ - ATICardInfo *atic = card->driver; - char *mmio = atic->reg_base; - - atic->backend_funcs.preserve(card); - if (atic->is_radeon && mmio) - { - atic->crtc_pitch = MMIO_IN32(mmio, ATI_REG_CRTC_PITCH); - atic->crtc2_pitch = MMIO_IN32(mmio, ATI_REG_CRTC2_PITCH); - - } -} - -static void -ATIRestore(KdCardInfo *card) -{ - ATICardInfo *atic = card->driver; - char *mmio = atic->reg_base; - - if (mmio) - { - MMIO_OUT32(mmio, ATI_REG_CRTC_PITCH, atic->crtc_pitch); - MMIO_OUT32(mmio, ATI_REG_CRTC2_PITCH, atic->crtc2_pitch); - } - ATIUnmapReg(card, atic); - - atic->backend_funcs.restore(card); -} - -static Bool -ATIDPMS(ScreenPtr pScreen, int mode) -{ - KdScreenPriv(pScreen); - ATICardInfo(pScreenPriv); - - return atic->backend_funcs.dpms(pScreen, mode); -} - -static Bool -ATIEnable(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATICardInfo(pScreenPriv); - - if (!atic->backend_funcs.enable(pScreen)) - return FALSE; - - if ((atic->reg_base == NULL) && !ATIMapReg(pScreenPriv->screen->card, - atic)) - return FALSE; - - ATISetOffscreen (pScreenPriv->screen); - - ATISetPitch (pScreenPriv->screen); - - return TRUE; -} - -static void -ATIDisable(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); -#if defined(USE_DRI) && defined(GLXEXT) - ATIScreenInfo(pScreenPriv); -#endif /* USE_DRI && GLXEXT */ - ATICardInfo(pScreenPriv); - - ATIUnmapReg(pScreenPriv->card, atic); - - atic->backend_funcs.disable(pScreen); -} - -static void -ATIGetColors(ScreenPtr pScreen, int fb, int n, xColorItem *pdefs) -{ - KdScreenPriv(pScreen); - ATICardInfo(pScreenPriv); - - atic->backend_funcs.getColors(pScreen, fb, n, pdefs); -} - -static void -ATIPutColors(ScreenPtr pScreen, int fb, int n, xColorItem *pdefs) -{ - KdScreenPriv(pScreen); - ATICardInfo(pScreenPriv); - - atic->backend_funcs.putColors(pScreen, fb, n, pdefs); -} - -/* Compute log base 2 of val. */ -int -ATILog2(int val) -{ - int bits; - - for (bits = 0; val != 0; val >>= 1, ++bits) - ; - return bits - 1; -} - -static Bool -ATIIsAGP(ATICardInfo *atic) -{ - char *mmio = atic->reg_base; - CARD32 cap_ptr, cap_id; - - if (mmio == NULL) - return FALSE; - - if (MMIO_IN32(mmio, ATI_REG_PCI_CFG_STATUS) & ATI_CAP_LIST) { - cap_ptr = MMIO_IN32(mmio, ATI_REG_PCI_CFG_CAPABILITIES_PTR) & - ATI_CAP_PTR_MASK; - while (cap_ptr != ATI_CAP_ID_NULL) { - cap_id = MMIO_IN32(mmio, ATI_PCI_CFG_OFFSET + cap_ptr); - if ((cap_id & 0xff) == ATI_CAP_ID_AGP) - return TRUE; - cap_ptr = (cap_id >> 8) & ATI_CAP_PTR_MASK; - } - } - - return FALSE; -} - -/* This function is required to work around a hardware bug in some (all?) - * revisions of the R300. This workaround should be called after every - * CLOCK_CNTL_INDEX register access. If not, register reads afterward - * may not be correct. - */ -void R300CGWorkaround(ATIScreenInfo *atis) { - ATICardInfo *atic = atis->atic; - char *mmio = atic->reg_base; - CARD32 save; - - save = MMIO_IN32(mmio, ATI_REG_CLOCK_CNTL_INDEX); - MMIO_OUT32(mmio, ATI_REG_CLOCK_CNTL_INDEX, save & ~(0x3f | - ATI_PLL_WR_EN)); - MMIO_IN32(mmio, ATI_REG_CLOCK_CNTL_INDEX); - MMIO_OUT32(mmio, ATI_REG_CLOCK_CNTL_INDEX, save); -} - -KdCardFuncs ATIFuncs = { - ATICardInit, /* cardinit */ - ATIScreenInit, /* scrinit */ - ATIInitScreen, /* initScreen */ - ATIFinishInitScreen, /* finishInitScreen */ - ATICreateResources, /* createRes */ - ATIPreserve, /* preserve */ - ATIEnable, /* enable */ - ATIDPMS, /* dpms */ - ATIDisable, /* disable */ - ATIRestore, /* restore */ - ATIScreenFini, /* scrfini */ - ATICardFini, /* cardfini */ - - ATICursorInit, /* initCursor */ - ATICursorEnable, /* enableCursor */ - ATICursorDisable, /* disableCursor */ - ATICursorFini, /* finiCursor */ - ATIRecolorCursor, /* recolorCursor */ - - ATIDrawInit, /* initAccel */ - ATIDrawEnable, /* enableAccel */ - ATIDrawDisable, /* disableAccel */ - ATIDrawFini, /* finiAccel */ - - ATIGetColors, /* getColors */ - ATIPutColors, /* putColors */ -}; diff --git a/hw/kdrive/ati/ati.h b/hw/kdrive/ati/ati.h deleted file mode 100644 index 3ff3e3ff3..000000000 --- a/hw/kdrive/ati/ati.h +++ /dev/null @@ -1,409 +0,0 @@ -/* - * Copyright © 2003 Eric Anholt - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Eric Anholt not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Eric Anholt makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _ATI_H_ -#define _ATI_H_ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef KDRIVEFBDEV -#include -#endif -#ifdef KDRIVEVESA -#include -#endif - -#include "kxv.h" - -#undef XF86DRI -#ifdef XF86DRI -#define USE_DRI -#include "xf86drm.h" -#include "dri.h" -#ifdef GLXEXT -#include "GL/glxint.h" -#include "GL/glxtokens.h" -#include "ati_dripriv.h" -#endif -#endif - -#define ATI_REG_BASE(c) ((c)->attr.address[1]) -#define ATI_REG_SIZE(c) (0x4000) - -#ifdef __powerpc__ - -static __inline__ void -MMIO_OUT32(__volatile__ void *base, const unsigned long offset, - const unsigned int val) -{ - __asm__ __volatile__( - "stwbrx %1,%2,%3\n\t" - "eieio" - : "=m" (*((volatile unsigned char *)base+offset)) - : "r" (val), "b" (base), "r" (offset)); -} - -static __inline__ CARD32 -MMIO_IN32(__volatile__ void *base, const unsigned long offset) -{ - register unsigned int val; - __asm__ __volatile__( - "lwbrx %0,%1,%2\n\t" - "eieio" - : "=r" (val) - : "b" (base), "r" (offset), - "m" (*((volatile unsigned char *)base+offset))); - return val; -} - -#else - -#define MMIO_OUT32(mmio, a, v) (*(VOL32 *)((mmio) + (a)) = (v)) -#define MMIO_IN32(mmio, a) (*(VOL32 *)((mmio) + (a))) - -#endif - -#define MMIO_OUT8(mmio, a, v) (*(VOL8 *)((mmio) + (a)) = (v)) -#define MMIO_IN8(mmio, a, v) (*(VOL8 *)((mmio) + (a))) - -#define INPLL(mmio, addr) \ - (MMIO_OUT8(mmio, ATI_REG_CLOCK_CNTL_INDEX, addr), \ - MMIO_IN32(mmio, ATI_REG_CLOCK_CNTL_DATA)) - -#define OUTPLL(mmio, addr, val) do { \ - MMIO_OUT8(mmio, ATI_REG_CLOCK_CNTL_INDEX, (addr) | ATI_PLL_WR_EN); \ - MMIO_OUT32(mmio, ATI_REG_CLOCK_CNTL_DATA, val); \ -} while (0) - -typedef volatile CARD8 VOL8; -typedef volatile CARD16 VOL16; -typedef volatile CARD32 VOL32; - -struct pci_id_entry { - CARD16 vendor; - CARD16 device; - CARD8 caps; - char *name; -}; - -struct backend_funcs { - void (*cardfini)(KdCardInfo *); - void (*scrfini)(KdScreenInfo *); - Bool (*initScreen)(ScreenPtr); - Bool (*finishInitScreen)(ScreenPtr pScreen); - Bool (*createRes)(ScreenPtr); - void (*preserve)(KdCardInfo *); - void (*restore)(KdCardInfo *); - Bool (*dpms)(ScreenPtr, int); - Bool (*enable)(ScreenPtr); - void (*disable)(ScreenPtr); - void (*getColors)(ScreenPtr, int, int, xColorItem *); - void (*putColors)(ScreenPtr, int, int, xColorItem *); -#ifdef RANDR - Bool (*randrSetConfig) (ScreenPtr, Rotation, int, RRScreenSizePtr); -#endif -}; - -typedef struct _ATICardInfo { - union { -#ifdef KDRIVEFBDEV - FbdevPriv fbdev; -#endif -#ifdef KDRIVEVESA - VesaCardPrivRec vesa; -#endif - } backend_priv; - struct backend_funcs backend_funcs; - - struct pci_id_entry *pci_id; - char *reg_base; - Bool is_radeon; - Bool is_r100; - Bool is_r200; - Bool is_r300; - Bool is_agp; - char *busid; - CARD32 crtc_pitch; - CARD32 crtc2_pitch; -#ifdef USE_DRI - int drmFd; -#endif /* USE_DRI */ - Bool use_fbdev, use_vesa; -} ATICardInfo; - -#define getATICardInfo(kd) ((ATICardInfo *) ((kd)->card->driver)) -#define ATICardInfo(kd) ATICardInfo *atic = getATICardInfo(kd) - -typedef struct _ATICursor { - int width, height; - int xhot, yhot; - - Bool has_cursor; - CursorPtr pCursor; - Pixel source, mask; - KdOffscreenArea *area; -} ATICursor; - -typedef struct _ATIPortPriv { - int brightness; - int saturation; - RegionRec clip; - CARD32 size; - KdOffscreenArea *off_screen; - DrawablePtr pDraw; - PixmapPtr pPixmap; - - CARD32 src_offset; - CARD32 src_pitch; - CARD8 *src_addr; - - int id; - int src_x1, src_y1, src_x2, src_y2; - int dst_x1, dst_y1, dst_x2, dst_y2; - int src_w, src_h, dst_w, dst_h; -} ATIPortPrivRec, *ATIPortPrivPtr; - -typedef struct _dmaBuf { - int size; - int used; - void *address; -#ifdef USE_DRI - drmBufPtr drmBuf; -#endif -} dmaBuf; - -typedef struct _ATIScreenInfo { - union { -#ifdef KDRIVEFBDEV - FbdevScrPriv fbdev; -#endif -#ifdef KDRIVEVESA - VesaScreenPrivRec vesa; -#endif - } backend_priv; - KaaScreenInfoRec kaa; - - ATICardInfo *atic; - KdScreenInfo *screen; - - int scratch_offset; - int scratch_next; - KdOffscreenArea *scratch_area; - - ATICursor cursor; - - KdVideoAdaptorPtr pAdaptor; - int num_texture_ports; - - Bool using_pio; /* If we use decode DMA packets to MMIO. */ - Bool using_pseudo; /* If we use MMIO to submit DMA packets. */ - Bool using_dma; /* If we use non-DRI DMA to submit packets. */ - Bool using_dri; /* If we use the DRM for DMA. */ - Bool using_agp; /* If we are using AGP or not for DMA. */ - - KdOffscreenArea *dma_space; /* For "DMA" from framebuffer. */ - void *agp_addr; /* Mapped AGP aperture */ - int agp_size; - int agp_key; /* Key of AGP memory for DMA */ - CARD32 *ring_addr; /* Beginning of ring buffer. */ - int ring_write; /* Index of write ptr in ring. */ - int ring_read; /* Index of read ptr in ring. */ - int ring_len; - - - dmaBuf *indirectBuffer; - int indirectStart; - - int mmio_avail; - int cce_pri_size; - int cce_pri_avail; - -#ifdef USE_DRI - Bool dma_started; - - drmSize registerSize; - drmHandle registerHandle; - drmHandle fbHandle; - - drmSize gartSize; - drmHandle agpMemHandle; /* Handle from drmAgpAlloc */ - unsigned long gartOffset; - unsigned char *AGP; /* Map */ - int agpMode; - drmSize pciSize; - drmHandle pciMemHandle; - - /* ring buffer data */ - unsigned long ringStart; /* Offset into AGP space */ - drmHandle ringHandle; /* Handle from drmAddMap */ - drmSize ringMapSize; /* Size of map */ - int ringSize; /* Size of ring (MB) */ - unsigned char *ring; /* Map */ - - unsigned long ringReadOffset; /* Offset into AGP space */ - drmHandle ringReadPtrHandle; /* Handle from drmAddMap */ - drmSize ringReadMapSize; /* Size of map */ - unsigned char *ringReadPtr; /* Map */ - - /* vertex/indirect buffer data */ - unsigned long bufStart; /* Offset into AGP space */ - drmHandle bufHandle; /* Handle from drmAddMap */ - drmSize bufMapSize; /* Size of map */ - int bufSize; /* Size of buffers (MB) */ - unsigned char *buf; /* Map */ - int bufNumBufs; /* Number of buffers */ - drmBufMapPtr buffers; /* Buffer map */ - - /* AGP Texture data */ - unsigned long gartTexStart; /* Offset into AGP space */ - drmHandle gartTexHandle; /* Handle from drmAddMap */ - drmSize gartTexMapSize; /* Size of map */ - int gartTexSize; /* Size of AGP tex space (MB) */ - unsigned char *gartTex; /* Map */ - int log2GARTTexGran; - - int DMAusecTimeout; /* CCE timeout in usecs */ - - /* DRI screen private data */ - int frontOffset; - int frontPitch; - int backOffset; - int backPitch; - int depthOffset; - int depthPitch; - int spanOffset; - int textureOffset; - int textureSize; - int log2TexGran; - - int irqEnabled; - - int serverContext; - - DRIInfoPtr pDRIInfo; -#ifdef GLXEXT - int numVisualConfigs; - __GLXvisualConfig *pVisualConfigs; - ATIConfigPrivPtr pVisualConfigsPriv; -#endif /* GLXEXT */ -#endif /* USE_DRI */ -} ATIScreenInfo; - -#define getATIScreenInfo(kd) ((ATIScreenInfo *) ((kd)->screen->driver)) -#define ATIScreenInfo(kd) ATIScreenInfo *atis = getATIScreenInfo(kd) - -typedef union { float f; CARD32 i; } fi_type; - -/* Surely there's a better way to go about this */ -static inline CARD32 -ATIFloatAsInt(float val) -{ - fi_type fi; - - fi.f = val; - return fi.i; -} - -#define GET_FLOAT_BITS(x) ATIFloatAsInt(x) - -/* ati.c */ -Bool -ATIMapReg(KdCardInfo *card, ATICardInfo *atic); - -void -ATIUnmapReg(KdCardInfo *card, ATICardInfo *atic); - -void -R300CGWorkaround(ATIScreenInfo *atis); - -/* ati_draw.c */ -void -ATIDrawSetup(ScreenPtr pScreen); - -Bool -ATIDrawInit(ScreenPtr pScreen); - -void -ATIDrawEnable(ScreenPtr pScreen); - -void -ATIDrawDisable(ScreenPtr pScreen); - -void -ATIDrawFini(ScreenPtr pScreen); - -/* ati_dri.c */ -#ifdef USE_DRI -Bool -ATIDRIScreenInit(ScreenPtr pScreen); - -void -ATIDRICloseScreen(ScreenPtr pScreen); - -void -ATIDRIDMAStart(ATIScreenInfo *atis); - -void -ATIDRIDMAStop(ATIScreenInfo *atis); - -void -ATIDRIDMAReset(ATIScreenInfo *atis); - -void -ATIDRIDispatchIndirect(ATIScreenInfo *atis, Bool discard); - -drmBufPtr -ATIDRIGetBuffer(ATIScreenInfo *atis); - -#endif /* USE_DRI */ - -/* ati_cursor.c */ -Bool -ATICursorInit(ScreenPtr pScreen); - -void -ATICursorEnable(ScreenPtr pScreen); - -void -ATICursorDisable(ScreenPtr pScreen); - -void -ATICursorFini(ScreenPtr pScreen); - -void -ATIRecolorCursor(ScreenPtr pScreen, int ndef, xColorItem *pdef); - -int -ATILog2(int val); - -/* ati_video.c */ -Bool -ATIInitVideo(ScreenPtr pScreen); - -void -ATIFiniVideo(ScreenPtr pScreen); - -extern KdCardFuncs ATIFuncs; - -#endif /* _ATI_H_ */ diff --git a/hw/kdrive/ati/ati_cursor.c b/hw/kdrive/ati/ati_cursor.c deleted file mode 100644 index d2ce686df..000000000 --- a/hw/kdrive/ati/ati_cursor.c +++ /dev/null @@ -1,559 +0,0 @@ -/* - * Copyright © 2004 Eric Anholt - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Eric Anholt not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Eric Anholt makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "ati.h" -#include "ati_reg.h" -#include "cursorstr.h" -#include "ati_draw.h" - -static void -ATIMoveCursor(ScreenPtr pScreen, int x, int y) -{ - KdScreenPriv(pScreen); - ATICardInfo(pScreenPriv); - ATIScreenInfo(pScreenPriv); - ATICursor *pCurPriv = &atis->cursor; - CARD16 xoff, yoff; - char *mmio = atic->reg_base; - int stride = atic->is_radeon ? 256 : 16; - - if (!pCurPriv->has_cursor) - return; - - if (!pScreenPriv->enabled) - return; - - x -= pCurPriv->xhot; - xoff = 0; - if (x < 0) { - xoff = -x; - x = 0; - } - y -= pCurPriv->yhot; - yoff = 0; - if (y < 0) { - yoff = -y; - y = 0; - } - - MMIO_OUT32(mmio, ATI_REG_CUR_HORZ_VERT_OFF, ATI_CUR_LOCK | - (xoff << 16) | yoff); - MMIO_OUT32(mmio, ATI_REG_CUR_HORZ_VERT_POSN, ATI_CUR_LOCK | - (x << 16) | y); - MMIO_OUT32(mmio, ATI_REG_CUR_OFFSET, (pCurPriv->area->offset + yoff * - stride)); -} - -static void -ClassicAllocCursorColors(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICursor *pCurPriv = &atis->cursor; - CursorPtr pCursor = pCurPriv->pCursor; - - KdAllocateCursorPixels(pScreen, 0, pCursor, &pCurPriv->source, - &pCurPriv->mask); - switch (pScreenPriv->screen->fb[0].bitsPerPixel) { - case 4: - pCurPriv->source |= pCurPriv->source << 4; - pCurPriv->mask |= pCurPriv->mask << 4; - /* FALLTHROUGH */ - case 8: - pCurPriv->source |= pCurPriv->source << 8; - pCurPriv->mask |= pCurPriv->mask << 8; - /* FALLTHROUGH */ - case 16: - pCurPriv->source |= pCurPriv->source << 16; - pCurPriv->mask |= pCurPriv->mask << 16; - } -} - -static void -ClassicSetCursorColors(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATICardInfo(pScreenPriv); - ATIScreenInfo(pScreenPriv); - ATICursor *pCurPriv = &atis->cursor; - char *mmio = atic->reg_base; - - MMIO_OUT32(mmio, ATI_REG_CUR_CLR0, pCurPriv->mask); - MMIO_OUT32(mmio, ATI_REG_CUR_CLR1, pCurPriv->source); -} - -static void -ClassicRecolorCursor(ScreenPtr pScreen, int ndef, xColorItem *pdef) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICursor *pCurPriv = &atis->cursor; - CursorPtr pCursor = pCurPriv->pCursor; - - if (!pCurPriv->has_cursor || !pCursor) - return; - - if (!pScreenPriv->enabled) - return; - - if (pdef) { - while (ndef != 0) { - if (pdef->pixel == pCurPriv->source || - pdef->pixel == pCurPriv->mask) - break; - ndef--; - } - - if (ndef == 0) - return; - } - ClassicAllocCursorColors(pScreen); - ClassicSetCursorColors(pScreen); -} - -#define InvertBits32(v) do { \ - v = ((v & 0x55555555) << 1) | ((v >> 1) & 0x55555555); \ - v = ((v & 0x33333333) << 2) | ((v >> 2) & 0x33333333); \ - v = ((v & 0x0f0f0f0f) << 4) | ((v >> 4) & 0x0f0f0f0f); \ -} while (0) - -static void -ClassicLoadCursor(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATICardInfo(pScreenPriv); - ATIScreenInfo(pScreenPriv); - ATICursor *pCurPriv = &atis->cursor; - CursorPtr pCursor = pCurPriv->pCursor; - CursorBitsPtr bits = pCursor->bits; - int h; - CARD32 *ram, *msk, *mskLine, *src, *srcLine; - int i; - int lwsrc; - CARD32 tmp; - char *mmio = atic->reg_base; - - ClassicAllocCursorColors(pScreen); - - pCurPriv->pCursor = pCursor; - pCurPriv->xhot = pCursor->bits->xhot; - pCurPriv->yhot = pCursor->bits->yhot; - - /* Stick new image into cursor memory */ - ram = (CARD32 *)(pScreenPriv->screen->memory_base + - pCurPriv->area->offset); - mskLine = (CARD32 *)bits->mask; - srcLine = (CARD32 *)bits->source; - - h = bits->height; - if (h > ATI_CURSOR_HEIGHT) - h = ATI_CURSOR_HEIGHT; - - lwsrc = BitmapBytePad(bits->width) / 4; /* words per line */ - - tmp = MMIO_IN32(mmio, ATI_REG_GEN_CNTL); - MMIO_OUT32(mmio, ATI_REG_GEN_CNTL, tmp & ~ATI_CRTC_CUR_EN); - - for (i = 0; i < ATI_CURSOR_HEIGHT; i++) { - CARD32 m1, m2, s1, s2; - - msk = mskLine; - src = srcLine; - mskLine += lwsrc; - srcLine += lwsrc; - - if (i < h && 0 < lwsrc) { - m1 = ~*msk++; - s1 = *src++; - InvertBits32(m1); - InvertBits32(s1); - } else { - m1 = 0xffffffff; - s1 = 0x0; - } - if (i < h && 1 < lwsrc) { - m2 = ~*msk++; - s2 = *src++; - InvertBits32(m2); - InvertBits32(s2); - } else { - m2 = 0xffffffff; - s2 = 0x0; - } - - *ram++ = m1; - *ram++ = m2; - *ram++ = s1; - *ram++ = s2; - } - - /* Not sure why this is necessary, but it prevents some cursor - * corruption. Not even all of it. - */ - for (i = 0; i < ATI_CURSOR_HEIGHT; i++) { - *ram++ = 0xffffffff; - *ram++ = 0xffffffff; - *ram++ = 0x0; - *ram++ = 0x0; - } - - /* Enable the cursor */ - tmp = MMIO_IN32(mmio, ATI_REG_GEN_CNTL); - MMIO_OUT32(mmio, ATI_REG_GEN_CNTL, tmp | ATI_CRTC_CUR_EN); - - /* Set new color */ - ClassicSetCursorColors(pScreen); - -} - -static void -RadeonLoadCursor(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATICardInfo(pScreenPriv); - ATIScreenInfo(pScreenPriv); - ATICursor *pCurPriv = &atis->cursor; - CursorPtr pCursor = pCurPriv->pCursor; - CursorBitsPtr bits = pCursor->bits; - int h, w; - int x, y; - CARD32 *ram, *msk, *mskLine, *src, *srcLine; - int lwsrc; - CARD32 tmp; - char *mmio = atic->reg_base; - - pCurPriv->pCursor = pCursor; - pCurPriv->xhot = pCursor->bits->xhot; - pCurPriv->yhot = pCursor->bits->yhot; - - w = bits->width; - if (w > ATI_CURSOR_WIDTH) - w = ATI_CURSOR_WIDTH; - - h = bits->height; - if (h > ATI_CURSOR_HEIGHT) - h = ATI_CURSOR_HEIGHT; - - tmp = MMIO_IN32(mmio, 0x7c); - tmp = 0x00010f80; - MMIO_OUT32 (mmio, 0x7c, tmp); - - tmp = MMIO_IN32(mmio, ATI_REG_GEN_CNTL); - tmp &= ~(ATI_CRTC_CUR_EN | ATI_CRTC_ICON_EN | ATI_CRTC_ARGB_EN); - MMIO_OUT32(mmio, ATI_REG_GEN_CNTL, tmp); - - /* Stick new image into cursor memory */ - ram = (CARD32 *)(pScreenPriv->screen->memory_base + - pCurPriv->area->offset); - if (pCursor->bits->argb) - { - srcLine = pCursor->bits->argb; - for (y = 0; y < h; y++) - { - src = srcLine; - srcLine += pCursor->bits->width; - for (x = 0; x < w; x++) - *ram++ = *src++; - for (; x < ATI_CURSOR_WIDTH; x++) - *ram++ = 0; - } - for (; y < ATI_CURSOR_HEIGHT; y++) - for (x = 0; x < ATI_CURSOR_WIDTH; x++) - *ram++ = 0; - } - else - { - CARD32 colors[4]; - - colors[0] = 0; - colors[1] = 0; - colors[2] = (((pCursor->backRed >> 8) << 16) | - ((pCursor->backGreen >> 8) << 8) | - ((pCursor->backBlue >> 8) << 0) | - 0xff000000); - colors[3] = (((pCursor->foreRed >> 8) << 16) | - ((pCursor->foreGreen >> 8) << 8) | - ((pCursor->foreBlue >> 8) << 0) | - 0xff000000); - - mskLine = (CARD32 *)bits->mask; - srcLine = (CARD32 *)bits->source; - - /* words per line */ - lwsrc = BitmapBytePad(bits->width) / 4; - - for (y = 0; y < ATI_CURSOR_HEIGHT; y++) - { - CARD32 m, s; - - msk = mskLine; - src = srcLine; - mskLine += lwsrc; - srcLine += lwsrc; - - for (x = 0; x < ATI_CURSOR_WIDTH / 32; x++) - { - int k; - if (y < h && x < lwsrc) - { - m = *msk++; - s = *src++; - } - else - { - m = 0x0; - s = 0x0; - } - - for (k = 0; k < 32; k++) - { - CARD32 bits = (s & 1) | ((m & 1) << 1); - *ram++ = colors[bits]; - s >>= 1; - m >>= 1; - } - } - } - } - - /* Enable the cursor */ - tmp &= ~(ATI_CRTC_ICON_EN); - tmp |= ATI_CRTC_ARGB_EN; - tmp |= ATI_CRTC_CUR_EN; - MMIO_OUT32(mmio, ATI_REG_GEN_CNTL, tmp); -} - -static void -ATIUnloadCursor(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATICardInfo(pScreenPriv); - char *mmio = atic->reg_base; - CARD32 tmp; - - tmp = MMIO_IN32(mmio, ATI_REG_GEN_CNTL); - tmp &= ~(ATI_CRTC_CUR_EN | ATI_CRTC_ICON_EN | ATI_CRTC_ARGB_EN); - MMIO_OUT32(mmio, ATI_REG_GEN_CNTL, tmp); -} - -static Bool -ATIRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) -{ - KdScreenPriv(pScreen); - ATICardInfo(pScreenPriv); - ATIScreenInfo(pScreenPriv); - ATICursor *pCurPriv = &atis->cursor; - - if (!pScreenPriv->enabled) - return TRUE; - - /* miRecolorCursor does this */ - if (pCursor && pCurPriv->pCursor == pCursor) - { - int x, y; - - miPointerPosition(&x, &y); - if (atic->is_radeon) - RadeonLoadCursor (pScreen); - else - ClassicLoadCursor(pScreen); - /* Move to new position */ - ATIMoveCursor(pScreen, x, y); - } - - return TRUE; -} - -static Bool -ATIUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) -{ - return TRUE; -} - -static void -ATISetCursor(ScreenPtr pScreen, CursorPtr pCursor, int x, int y) -{ - KdScreenPriv(pScreen); - ATICardInfo(pScreenPriv); - ATIScreenInfo(pScreenPriv); - ATICursor *pCurPriv = &atis->cursor; - - pCurPriv->pCursor = pCursor; - - if (!pScreenPriv->enabled) - return; - - if (pCursor) - { - if (atic->is_radeon) - RadeonLoadCursor (pScreen); - else - ClassicLoadCursor(pScreen); - /* Move to new position */ - ATIMoveCursor(pScreen, x, y); - } - else - ATIUnloadCursor(pScreen); -} - -miPointerSpriteFuncRec ATIPointerSpriteFuncs = { - ATIRealizeCursor, - ATIUnrealizeCursor, - ATISetCursor, - ATIMoveCursor, -}; - -static void -ATIQueryBestSize(int class, unsigned short *pwidth, unsigned short *pheight, - ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICursor *pCurPriv = &atis->cursor; - - switch (class) - { - case CursorShape: - if (*pwidth > pCurPriv->width) - *pwidth = pCurPriv->width; - if (*pheight > pCurPriv->height) - *pheight = pCurPriv->height; - if (*pwidth > pScreen->width) - *pwidth = pScreen->width; - if (*pheight > pScreen->height) - *pheight = pScreen->height; - break; - default: - fbQueryBestSize(class, pwidth, pheight, pScreen); - break; - } -} - -static void -ATICursorSave(ScreenPtr pScreen, KdOffscreenArea *area) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICursor *pCurPriv = &atis->cursor; - - pCurPriv->area = NULL; -} - -void -ATICursorEnable(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATICardInfo(pScreenPriv); - ATIScreenInfo(pScreenPriv); - ATICursor *pCurPriv = &atis->cursor; - - if (!pCurPriv->has_cursor) - return; - - if (pCurPriv->area == NULL) { - if (atic->is_radeon) - pCurPriv->area = KdOffscreenAlloc(pScreen, - ATI_CURSOR_HEIGHT * ATI_CURSOR_WIDTH * 4, - 128, TRUE, ATICursorSave, atis); - else - pCurPriv->area = KdOffscreenAlloc(pScreen, - ATI_CURSOR_HEIGHT * ATI_CURSOR_PITCH * 2, - 32, TRUE, ATICursorSave, atis); - } - if (pCurPriv->area == NULL) - FatalError("Couldn't allocate offscreen memory for cursor.\n"); - - if (pCurPriv->pCursor) { - int x, y; - - miPointerPosition(&x, &y); - if (atic->is_radeon) - RadeonLoadCursor(pScreen); - else - ClassicLoadCursor(pScreen); - /* Move to new position */ - ATIMoveCursor(pScreen, x, y); - } - else - ATIUnloadCursor(pScreen); -} - -void -ATICursorDisable(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICursor *pCurPriv = &atis->cursor; - - if (!pScreenPriv->enabled || !pCurPriv->has_cursor) - return; - - if (pCurPriv->pCursor) - ATIUnloadCursor(pScreen); -} - -Bool -ATICursorInit(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATICardInfo(pScreenPriv); - ATIScreenInfo(pScreenPriv); - ATICursor *pCurPriv = &atis->cursor; - - pCurPriv->has_cursor = FALSE; - - if (atic->reg_base == NULL) - return FALSE; - - pCurPriv->width = ATI_CURSOR_WIDTH; - pCurPriv->height= ATI_CURSOR_HEIGHT; - pScreen->QueryBestSize = ATIQueryBestSize; - miPointerInitialize(pScreen, &ATIPointerSpriteFuncs, - &kdPointerScreenFuncs, FALSE); - pCurPriv->has_cursor = TRUE; - pCurPriv->pCursor = NULL; - return TRUE; -} - -void -ATIRecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdef) -{ - KdScreenPriv(pScreen); - ATICardInfo(pScreenPriv); - - if (!atic->is_radeon) - ClassicRecolorCursor (pScreen, ndef, pdef); -} - -void -ATICursorFini(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICursor *pCurPriv = &atis->cursor; - - pCurPriv->has_cursor = FALSE; - pCurPriv->pCursor = NULL; -} diff --git a/hw/kdrive/ati/ati_dma.c b/hw/kdrive/ati/ati_dma.c deleted file mode 100644 index b97d79b25..000000000 --- a/hw/kdrive/ati/ati_dma.c +++ /dev/null @@ -1,1037 +0,0 @@ -/* - * Copyright © 2004 Eric Anholt - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Eric Anholt not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Eric Anholt makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#include - -#include "ati.h" -#include "ati_reg.h" -#include "ati_dma.h" -#include "ati_draw.h" - -#ifdef USE_DRI -#include "radeon_common.h" -#include "r128_common.h" -#include "ati_sarea.h" -#endif /* USE_DRI */ - -#include "agp.h" - -#define DEBUG_FIFO 0 - -extern CARD32 r128_cce_microcode[]; -extern CARD32 radeon_cp_microcode[][2]; -extern CARD32 r200_cp_microcode[][2]; -extern CARD32 r300_cp_microcode[][2]; - -#if DEBUG_FIFO -static void -ATIDebugFifo(ATIScreenInfo *atis) -{ - ATICardInfo *atic = atis->atic; - char *mmio = atic->reg_base; - - if (atic->is_radeon) { - ErrorF("RADEON_REG_CP_CSQ_CNTL: 0x%08x\n", - MMIO_IN32(mmio, RADEON_REG_CP_CSQ_CNTL)); - ErrorF("RADEON_REG_CP_CSQ_STAT: 0x%08x\n", - MMIO_IN32(mmio, RADEON_REG_CP_CSQ_STAT)); - ErrorF("RADEON_REG_RBBM_STATUS: 0x%08x\n", - MMIO_IN32(mmio, RADEON_REG_RBBM_STATUS)); - ErrorF("RADEON_REG_RB3D_DSTCACHE_CTLSTAT: 0x%08x\n", - MMIO_IN32(mmio, RADEON_REG_RB3D_DSTCACHE_CTLSTAT)); - } else { - ErrorF("R128_REG_PM4_BUFFER_CNTL: 0x%08x\n", - MMIO_IN32(mmio, R128_REG_PM4_BUFFER_CNTL)); - ErrorF("R128_REG_PM4_STAT: 0x%08x\n", - MMIO_IN32(mmio, R128_REG_PM4_STAT)); - ErrorF("R128_REG_GUI_STAT: 0x%08x\n", - MMIO_IN32(mmio, R128_REG_GUI_STAT)); - ErrorF("R128_REG_PC_NGUI_CTLSTAT: 0x%08x\n", - MMIO_IN32(mmio, R128_REG_PC_NGUI_CTLSTAT)); - } -} -#endif - -static void -ATIUploadMicrocode(ATIScreenInfo *atis) -{ - ATICardInfo *atic = atis->atic; - char *mmio = atic->reg_base; - int i; - - MMIO_OUT32(mmio, ATI_REG_MICROCODE_RAM_ADDR, 0); - if (atic->is_radeon && atic->is_r300) { - for (i = 0; i < 256; i++) { - MMIO_OUT32(mmio, ATI_REG_MICROCODE_RAM_DATAH, - r300_cp_microcode[i][1]); - MMIO_OUT32(mmio, ATI_REG_MICROCODE_RAM_DATAL, - r300_cp_microcode[i][0]); - } - } else if (atic->is_radeon && atic->is_r200) { - for (i = 0; i < 256; i++) { - MMIO_OUT32(mmio, ATI_REG_MICROCODE_RAM_DATAH, - r200_cp_microcode[i][1]); - MMIO_OUT32(mmio, ATI_REG_MICROCODE_RAM_DATAL, - r200_cp_microcode[i][0]); - } - } else if (atic->is_radeon && atic->is_r100) { - for (i = 0; i < 256; i++) { - MMIO_OUT32(mmio, ATI_REG_MICROCODE_RAM_DATAH, - radeon_cp_microcode[i][1]); - MMIO_OUT32(mmio, ATI_REG_MICROCODE_RAM_DATAL, - radeon_cp_microcode[i][0]); - } - } else { - for (i = 0; i < 256; i++) { - MMIO_OUT32(mmio, ATI_REG_MICROCODE_RAM_DATAH, - r128_cce_microcode[i * 2]); - MMIO_OUT32(mmio, ATI_REG_MICROCODE_RAM_DATAL, - r128_cce_microcode[i * 2 + 1]); - } - } -} - -/* Required when reading from video memory after acceleration to make sure all - * data has been flushed to video memory from the pixel cache. - */ -static void -ATIFlushPixelCache(ATIScreenInfo *atis) -{ - ATICardInfo *atic = atis->atic; - char *mmio = atic->reg_base; - CARD32 temp; - TIMEOUT_LOCALS; - - if (atic->is_radeon) { - temp = MMIO_IN32(mmio, RADEON_REG_RB3D_DSTCACHE_CTLSTAT); - temp |= RADEON_RB3D_DC_FLUSH_ALL; - MMIO_OUT32(mmio, RADEON_REG_RB3D_DSTCACHE_CTLSTAT, temp); - - WHILE_NOT_TIMEOUT(.2) { - if ((MMIO_IN32(mmio, RADEON_REG_RB3D_DSTCACHE_CTLSTAT) & - RADEON_RB3D_DC_BUSY) == 0) - break; - } - } else { - temp = MMIO_IN32(mmio, R128_REG_PC_NGUI_CTLSTAT); - temp |= R128_PC_FLUSH_ALL; - MMIO_OUT32(mmio, R128_REG_PC_NGUI_CTLSTAT, temp); - - WHILE_NOT_TIMEOUT(.2) { - if ((MMIO_IN32(mmio, R128_REG_PC_NGUI_CTLSTAT) & - R128_PC_BUSY) != R128_PC_BUSY) - break; - } - } - if (TIMEDOUT()) - ErrorF("Timeout flushing pixel cache.\n"); -} - -static void -ATIEngineReset(ATIScreenInfo *atis) -{ - ATICardInfo *atic = atis->atic; - char *mmio = atic->reg_base; - CARD32 clockcntlindex, mclkcntl; - -#if DEBUG_FIFO - ErrorF("Engine Reset!\n"); - ATIDebugFifo(atis); -#endif - - ATIFlushPixelCache(atis); - - clockcntlindex = MMIO_IN32(mmio, ATI_REG_CLOCK_CNTL_INDEX); - if (atic->is_r300) - R300CGWorkaround(atis); - - if (atic->is_radeon) { - CARD32 host_path_cntl; - - mclkcntl = INPLL(mmio, RADEON_REG_MCLK_CNTL); - - OUTPLL(mmio, RADEON_REG_MCLK_CNTL, mclkcntl | - RADEON_FORCEON_MCLKA | - RADEON_FORCEON_MCLKB | - RADEON_FORCEON_YCLKA | - RADEON_FORCEON_YCLKB | - RADEON_FORCEON_MC | - RADEON_FORCEON_AIC); - - host_path_cntl = MMIO_IN32(mmio, RADEON_REG_HOST_PATH_CNTL); - - if (atic->is_r300) { - MMIO_OUT32(mmio, RADEON_REG_RBBM_SOFT_RESET, - RADEON_SOFT_RESET_CP | - RADEON_SOFT_RESET_HI | - RADEON_SOFT_RESET_E2); - } else { - MMIO_OUT32(mmio, RADEON_REG_RBBM_SOFT_RESET, - RADEON_SOFT_RESET_CP | - RADEON_SOFT_RESET_SE | - RADEON_SOFT_RESET_RE | - RADEON_SOFT_RESET_PP | - RADEON_SOFT_RESET_E2 | - RADEON_SOFT_RESET_RB); - } - MMIO_IN32(mmio, RADEON_REG_RBBM_SOFT_RESET); - MMIO_OUT32(mmio, RADEON_REG_RBBM_SOFT_RESET, 0); - - MMIO_OUT32(mmio, RADEON_REG_HOST_PATH_CNTL, host_path_cntl | - RADEON_HDP_SOFT_RESET); - MMIO_IN32(mmio, RADEON_REG_HOST_PATH_CNTL); - MMIO_OUT32(mmio, RADEON_REG_HOST_PATH_CNTL, host_path_cntl); - - MMIO_OUT32(mmio, ATI_REG_CLOCK_CNTL_INDEX, clockcntlindex); - OUTPLL(mmio, RADEON_REG_MCLK_CNTL, mclkcntl); - if (atic->is_r300) - R300CGWorkaround(atis); - } else { - CARD32 temp; - - mclkcntl = INPLL(mmio, R128_REG_MCLK_CNTL); - - OUTPLL(mmio, R128_REG_MCLK_CNTL, - mclkcntl | R128_FORCE_GCP | R128_FORCE_PIPE3D_CP); - - temp = MMIO_IN32(mmio, R128_REG_GEN_RESET_CNTL); - MMIO_OUT32(mmio, R128_REG_GEN_RESET_CNTL, - temp | R128_SOFT_RESET_GUI); - temp = MMIO_IN32(mmio, R128_REG_GEN_RESET_CNTL); - MMIO_OUT32(mmio, R128_REG_GEN_RESET_CNTL, - temp & ~R128_SOFT_RESET_GUI); - temp = MMIO_IN32(mmio, R128_REG_GEN_RESET_CNTL); - - OUTPLL(mmio, R128_REG_MCLK_CNTL, mclkcntl); - MMIO_OUT32(mmio, ATI_REG_CLOCK_CNTL_INDEX, clockcntlindex); - } -#ifdef USE_DRI - if (atis->using_dri) { - ATIDRIDMAReset(atis); - ATIDRIDMAStart(atis); - } -#endif -} - -static void -ATIWaitAvailMMIO(ATIScreenInfo *atis, int n) -{ - ATICardInfo *atic = atis->atic; - char *mmio = atic->reg_base; - TIMEOUT_LOCALS; - - if (atis->mmio_avail >= n) { - atis->mmio_avail -= n; - return; - } - if (atic->is_radeon) { - WHILE_NOT_TIMEOUT(.2) { - atis->mmio_avail = MMIO_IN32(mmio, - RADEON_REG_RBBM_STATUS) & RADEON_RBBM_FIFOCNT_MASK; - if (atis->mmio_avail >= n) - break; - } - } else { - WHILE_NOT_TIMEOUT(.2) { - atis->mmio_avail = MMIO_IN32(mmio, R128_REG_GUI_STAT) & - 0xfff; - if (atis->mmio_avail >= n) - break; - } - } - if (TIMEDOUT()) { - ErrorF("Timeout waiting for %d MMIO slots.\n", n); - ATIEngineReset(atis); - ATIDrawSetup(atis->screen->pScreen); - } - atis->mmio_avail -= n; -} - -static int -ATIGetAvailPrimary(ATIScreenInfo *atis) -{ - ATICardInfo *atic = atis->atic; - char *mmio = atic->reg_base; - - if (atic->is_radeon) { - int csq_stat, diff; - - csq_stat = MMIO_IN32(mmio, RADEON_REG_CP_CSQ_STAT); - if (atic->is_r200) - diff = ((csq_stat & R200_CSQ_WPTR_PRIMARY_MASK) >> 9) - - (csq_stat & R200_CSQ_RPTR_PRIMARY_MASK); - else - diff = ((csq_stat & RADEON_CSQ_WPTR_PRIMARY_MASK) >> 8) - - (csq_stat & RADEON_CSQ_RPTR_PRIMARY_MASK); - - if (diff < 0) - return -diff; - else - return atis->cce_pri_size - diff; - } else { - return MMIO_IN32(mmio, R128_REG_PM4_STAT) & - R128_PM4_FIFOCNT_MASK; - } -} - -static void -ATIWaitAvailPrimary(ATIScreenInfo *atis, int n) -{ - TIMEOUT_LOCALS; - - if (atis->cce_pri_avail >= n) { - atis->cce_pri_avail -= n; - return; - } - - WHILE_NOT_TIMEOUT(.2) { - if (atis->cce_pri_avail >= n) - break; - atis->cce_pri_avail = ATIGetAvailPrimary(atis); - if (atis->cce_pri_avail >= n) - break; - } - if (TIMEDOUT()) { - ErrorF("Timeout waiting for %d CCE slots (%d avail).\n", n, - atis->cce_pri_avail); - ATIEngineReset(atis); - ATIDrawSetup(atis->screen->pScreen); - } - atis->cce_pri_avail -= n; -} - -void -ATIWaitIdle(ATIScreenInfo *atis) -{ - ATICardInfo *atic = atis->atic; - char *mmio = atic->reg_base; - TIMEOUT_LOCALS; - - if (atis->indirectBuffer != NULL) - ATIFlushIndirect(atis, 0); - -#ifdef USE_DRI - if (atis->using_dri) { - int ret = 0; - int cmd = (atic->is_radeon ? DRM_RADEON_CP_IDLE : - DRM_R128_CCE_IDLE); - WHILE_NOT_TIMEOUT(2) { - ret = drmCommandNone(atic->drmFd, cmd); - if (ret != -EBUSY) - break; - } - if (TIMEDOUT()) { - ATIDebugFifo(atis); - FatalError("Timed out idling CCE (card hung)\n"); - } - if (ret != 0) - ErrorF("Failed to idle DMA, returned %d\n", ret); - return; - } -#endif - - if (!atic->is_radeon && (atis->using_pseudo || atis->using_dma)) { - ATIWaitAvailPrimary(atis, atis->cce_pri_size); - - WHILE_NOT_TIMEOUT(.2) { - if ((MMIO_IN32(mmio, R128_REG_PM4_STAT) & - (R128_PM4_BUSY | R128_PM4_GUI_ACTIVE)) == 0) - break; - } - if (TIMEDOUT()) { - ErrorF("Timeout idling CCE, resetting...\n"); - ATIEngineReset(atis); - ATIDrawSetup(atis->screen->pScreen); - } - } - - /* Radeon CP idle is the same as MMIO idle. */ - if (atis->using_pio || atic->is_radeon) { - /* Empty the fifo */ - ATIWaitAvailMMIO(atis, 64); - - if (atic->is_radeon) { - WHILE_NOT_TIMEOUT(.2) { - if ((MMIO_IN32(mmio, RADEON_REG_RBBM_STATUS) & - RADEON_RBBM_ACTIVE) == 0) - break; - } - } else { - WHILE_NOT_TIMEOUT(.2) { - if ((MMIO_IN32(mmio, R128_REG_GUI_STAT) & - R128_GUI_ACTIVE) == 0) - break; - } - } - if (TIMEDOUT()) { - ErrorF("Timeout idling accelerator, resetting...\n"); - ATIEngineReset(atis); - ATIDrawSetup(atis->screen->pScreen); - } - } - - ATIFlushPixelCache(atis); - -#if DEBUG_FIFO - ErrorF("Idle?\n"); - ATIDebugFifo(atis); -#endif -} - -dmaBuf * -ATIGetDMABuffer(ATIScreenInfo *atis) -{ - dmaBuf *buf; - - buf = (dmaBuf *)xalloc(sizeof(dmaBuf)); - if (buf == NULL) - return NULL; - -#ifdef USE_DRI - if (atis->using_dri) { - buf->drmBuf = ATIDRIGetBuffer(atis); - if (buf->drmBuf == NULL) { - xfree(buf); - return NULL; - } - buf->size = buf->drmBuf->total; - buf->used = buf->drmBuf->used; - buf->address = buf->drmBuf->address; - return buf; - } -#endif /* USE_DRI */ - - if (atis->using_dma) - buf->size = atis->ring_len / 2; - else - buf->size = 512 * 1024; - buf->address = xalloc(buf->size); - if (buf->address == NULL) { - xfree(buf); - return NULL; - } - buf->used = 0; - - return buf; -} - -/* Decode a type-3 packet into MMIO register writes. Only some type-3 packets - * supported, and only partially. - */ -static void -ATIDispatchPacket3MMIO(ATIScreenInfo *atis, CARD32 header, CARD32 *addr, - int count) -{ - ATICardInfo *atic = atis->atic; - char *mmio = atic->reg_base; - CARD32 settings; - int i = 0; - - settings = addr[i++]; - - if ((settings & ATI_GMC_SRC_PITCH_OFFSET_CNTL) != 0) - MMIO_OUT32(mmio, ATI_REG_SRC_PITCH_OFFSET, addr[i++]); - if ((settings & ATI_GMC_DST_PITCH_OFFSET_CNTL) != 0) - MMIO_OUT32(mmio, ATI_REG_DST_PITCH_OFFSET, addr[i++]); - if ((settings & ATI_GMC_BRUSH_MASK) == ATI_GMC_BRUSH_SOLID_COLOR) - MMIO_OUT32(mmio, ATI_REG_DP_BRUSH_FRGD_CLR, addr[i++]); - - switch (header & (ATI_CCE_PACKETTYPE_MASK | - ATI_CCE_PACKET3_IT_OPCODE_MASK)) - { - case ATI_CCE_PACKET3_PAINT_MULTI: - while (i < count) { - MMIO_OUT32(mmio, ATI_REG_DST_Y_X, - (addr[i] >> 16) | (addr[i] << 16)); - i++; - MMIO_OUT32(mmio, ATI_REG_DST_HEIGHT_WIDTH, - (addr[i] >> 16) | (addr[i] << 16)); - i++; - } - break; - case ATI_CCE_PACKET3_BITBLT_MULTI: - while (i < count) { - MMIO_OUT32(mmio, ATI_REG_SRC_Y_X, - (addr[i] >> 16) | (addr[i] << 16)); - i++; - MMIO_OUT32(mmio, ATI_REG_DST_Y_X, - (addr[i] >> 16) | (addr[i] << 16)); - i++; - MMIO_OUT32(mmio, ATI_REG_DST_HEIGHT_WIDTH, - (addr[i] >> 16) | (addr[i] << 16)); - i++; - } - break; - default: - ErrorF("Unsupported packet: 0x%x\n", header); - } -} - -/* Dispatch packets by decoding them and writing to registers. Doesn't support - * the type 3 packets. - */ -static void -ATIDispatchIndirectMMIO(ATIScreenInfo *atis) -{ - ATICardInfo *atic = atis->atic; - dmaBuf *buf = atis->indirectBuffer; - char *mmio = atic->reg_base; - CARD32 *addr; - CARD32 reg; - int i, n, count; - - addr = (CARD32 *)((char *)buf->address + atis->indirectStart); - count = (buf->used - atis->indirectStart) / 4; - - for (i = 0; i < count; i++) { - CARD32 header = addr[i]; - - switch (header & ATI_CCE_PACKETTYPE_MASK) - { - case ATI_CCE_PACKET0: - n = ((header & ATI_CCE_PACKET0_COUNT_MASK) >> 16) + 1; - reg = (header & ATI_CCE_PACKET0_REG_MASK) << 2; - ATIWaitAvailMMIO(atis, n); - while (n > 0) { - i++; - MMIO_OUT32(mmio, reg, addr[i]); - if ((header & ATI_CCE_PACKET0_ONE_REG_WR) == 0) - reg += 4; - n--; - } - break; - case ATI_CCE_PACKET1: - reg = (header & ATI_CCE_PACKET1_REG_1) << 2; - MMIO_OUT32(mmio, reg, addr[++i]); - reg = ((header & ATI_CCE_PACKET1_REG_2) >> - ATI_CCE_PACKET1_REG_2_SHIFT) << 2; - MMIO_OUT32(mmio, reg, addr[++i]); - break; - case ATI_CCE_PACKET2: - /* PACKET2 is a no-op packet. */ - break; - case ATI_CCE_PACKET3: - n = ((header & ATI_CCE_PACKET3_COUNT_MASK) >> 16) + 1; - ATIDispatchPacket3MMIO(atis, header, &addr[i], n); - i += n; - break; - default: - ErrorF("Unsupported packet: 0x%x\n", addr[i]); - } - } -} - -/* Dispatch packets by sending them through the MMIO aperture. */ -static void -R128DispatchIndirectPDMA(ATIScreenInfo *atis) -{ - ATICardInfo *atic = atis->atic; - dmaBuf *buf = atis->indirectBuffer; - char *mmio = atic->reg_base; - CARD32 *addr; - int count; - - addr = (CARD32 *)((char *)buf->address + atis->indirectStart); - count = (buf->used - atis->indirectStart) / 4; - - while (count > 1) { - ATIWaitAvailPrimary(atis, 2); - MMIO_OUT32(mmio, R128_REG_PM4_FIFO_DATA_EVEN, *addr++); - MMIO_OUT32(mmio, R128_REG_PM4_FIFO_DATA_ODD, *addr++); - count -= 2; - } - - /* Submit last DWORD if necessary. */ - if (count != 0) { - ATIWaitAvailPrimary(atis, 2); - MMIO_OUT32(mmio, R128_REG_PM4_FIFO_DATA_EVEN, *addr++); - MMIO_OUT32(mmio, R128_REG_PM4_FIFO_DATA_ODD, ATI_CCE_PACKET2); - } -} - -/* Dispatch packets by sending them through the MMIO aperture, using the - * primary CCE ring. */ -static void -RadeonDispatchIndirectPDMA(ATIScreenInfo *atis) -{ - ATICardInfo *atic = atis->atic; - dmaBuf *buf = atis->indirectBuffer; - char *mmio = atic->reg_base; - CARD32 *addr; - int count, avail, reg, i; - TIMEOUT_LOCALS; - - addr = (CARD32 *)((char *)buf->address + atis->indirectStart); - count = (buf->used - atis->indirectStart) / 4; - - reg = RADEON_REG_CSQ_APER_PRIMARY; - WHILE_NOT_TIMEOUT(3) { - /* 3 seconds is empirical, using render_bench on an r100. */ - if (count <= 0) - break; - avail = ATIGetAvailPrimary(atis); - for (i = 0; i < min(count, avail); i++) { - MMIO_OUT32(mmio, reg, *addr++); - if (reg == RADEON_REG_CSQ_APER_PRIMARY_END) - reg = RADEON_REG_CSQ_APER_PRIMARY; - else - reg += 4; - } - count -= i; - } - if (TIMEDOUT()) { - ErrorF("Timeout submitting packets, resetting...\n"); - ATIEngineReset(atis); - ATIDrawSetup(atis->screen->pScreen); - } -} - - -/* Dispatch packets by writing them to the (primary) ring buffer, which happens - * to be in framebuffer memory. - */ -static void -R128DispatchIndirectDMA(ATIScreenInfo *atis) -{ - ATICardInfo *atic = atis->atic; - dmaBuf *buf = atis->indirectBuffer; - char *mmio = atic->reg_base; - CARD32 *addr; - int count, ring_count; - TIMEOUT_LOCALS; - - addr = (CARD32 *)((char *)buf->address + atis->indirectStart); - count = (buf->used - atis->indirectStart) / 4; - ring_count = atis->ring_len / 4; - - WHILE_NOT_TIMEOUT(.2) { - if (count <= 0) - break; - - atis->ring_addr[atis->ring_write++] = *addr++; - if (atis->ring_write >= ring_count) - atis->ring_write = 0; - while (atis->ring_write == atis->ring_read) { - atis->ring_read = MMIO_IN32(mmio, ATI_REG_CCE_RPTR); - } - count--; - } - if (TIMEDOUT()) { - ErrorF("Timeout submitting packets, resetting...\n"); - ATIEngineReset(atis); - ATIDrawSetup(atis->screen->pScreen); - } - - /* Workaround for some early Rage 128 ASIC spins where the CCE parser - * may read up to 32 DWORDS beyond the end of the ring buffer memory - * before wrapping around, if the ring buffer was empty and a <32 DWORD - * packet that wraps around the end of the ring buffer is submitted. - * To work around that, copy the beginning of the ring buffer past the - * end if that may happen. - */ - if (atis->ring_write < 32) - memcpy(atis->ring_addr + ring_count, atis->ring_addr, 32 * 4); - - /* Update write pointer */ - MMIO_OUT32(mmio, ATI_REG_CCE_WPTR, atis->ring_write); -} - -void -ATIFlushIndirect(ATIScreenInfo *atis, Bool discard) -{ - ATICardInfo *atic = atis->atic; - dmaBuf *buf = atis->indirectBuffer; - - if ((atis->indirectStart == buf->used) && !discard) - return; - -#if DEBUG_FIFO - ErrorF("Dispatching %d DWORDS\n", (buf->used - atis->indirectStart) / - 4); -#endif - -#ifdef USE_DRI - if (atis->using_dri) { - buf->drmBuf->used = buf->used; - ATIDRIDispatchIndirect(atis, discard); - if (discard) { - buf->drmBuf = ATIDRIGetBuffer(atis); - buf->size = buf->drmBuf->total; - buf->used = buf->drmBuf->used; - buf->address = buf->drmBuf->address; - atis->indirectStart = 0; - } else { - /* Start on a double word boundary */ - atis->indirectStart = buf->used = (buf->used + 7) & ~7; - } - return; - } -#endif /* USE_DRI */ - - if (atis->using_dma && !atic->is_radeon) - R128DispatchIndirectDMA(atis); - else if (atis->using_pseudo) { - if (atic->is_radeon) - RadeonDispatchIndirectPDMA(atis); - else - R128DispatchIndirectPDMA(atis); - } else - ATIDispatchIndirectMMIO(atis); - - buf->used = 0; - atis->indirectStart = 0; -} - -static Bool -ATIInitAGP(ScreenPtr pScreen, int size) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - AgpInfoPtr agp_info; - int screennum = atis->screen->mynum; - - if (atic->is_radeon) - return FALSE; - - if (!KdAgpGARTSupported()) - return FALSE; - - if (!KdAcquireGART(screennum)) - return FALSE; - - atis->agp_key = KdAllocateGARTMemory(screennum, size, 0, NULL); - if (atis->agp_key == -1) { - ErrorF("Failed to allocate %dKB GART memory\n", size/1024); - KdReleaseGART(screennum); - return FALSE; - } - - if (!KdBindGARTMemory(screennum, atis->agp_key, 0)) { - ErrorF("Failed to bind GART memory\n"); - KdReleaseGART(screennum); - return FALSE; - } - - agp_info = KdGetAGPInfo(screennum); - if (agp_info == NULL) { - KdUnbindGARTMemory(screennum, atis->agp_key); - KdReleaseGART(screennum); - return FALSE; - } - - atis->agp_addr = KdMapDevice(agp_info->base, agp_info->size); - if (atis->agp_addr == NULL) { - ErrorF("Failed to map GART memory\n"); - KdUnbindGARTMemory(screennum, atis->agp_key); - KdReleaseGART(screennum); - free(agp_info); - return FALSE; - } - KdSetMappedMode(agp_info->base, agp_info->size, - KD_MAPPED_MODE_FRAMEBUFFER); - - atis->agp_size = size; - free(agp_info); - - return TRUE; -} - -static void -ATIFiniAGP(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - int screennum = atis->screen->mynum; - - KdUnbindGARTMemory(screennum, atis->agp_key); - KdReleaseGART(screennum); - atis->agp_addr = NULL; - atis->agp_size = 0; -} - -static Bool -ATIPseudoDMAInit(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - char *mmio = atic->reg_base; - - if (atic->is_r300) - return FALSE; - - ATIUploadMicrocode(atis); - ATIEngineReset(atis); - - if (atic->is_r200) { - MMIO_OUT32(mmio, RADEON_REG_CP_CSQ_CNTL, - RADEON_CSQ_PRIPIO_INDDIS); - atis->cce_pri_size = MMIO_IN32(mmio, RADEON_REG_CP_CSQ_CNTL) & - R200_CSQ_CNT_PRIMARY_MASK; - MMIO_OUT32(mmio, RADEON_REG_ME_CNTL, RADEON_ME_MODE_FREE_RUN); - } else if (atic->is_radeon) { - MMIO_OUT32(mmio, RADEON_REG_CP_CSQ_CNTL, - RADEON_CSQ_PRIPIO_INDDIS); - atis->cce_pri_size = MMIO_IN32(mmio, RADEON_REG_CP_CSQ_CNTL) & - RADEON_CSQ_CNT_PRIMARY_MASK; - MMIO_OUT32(mmio, RADEON_REG_ME_CNTL, RADEON_ME_MODE_FREE_RUN); - } else { - MMIO_OUT32(mmio, R128_REG_PM4_BUFFER_CNTL, R128_PM4_192PIO | - R128_PM4_BUFFER_CNTL_NOUPDATE); - atis->cce_pri_size = 192; - MMIO_OUT32(mmio, R128_REG_PM4_MICRO_CNTL, - R128_PM4_MICRO_FREERUN); - } - - return TRUE; -} - -static Bool -ATIPseudoDMAFini(ScreenPtr pScreen) -{ KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - char *mmio = atic->reg_base; - - if (atic->is_radeon) { - MMIO_OUT32(mmio, RADEON_REG_ME_CNTL, 0); - MMIO_OUT32(mmio, RADEON_REG_CP_CSQ_CNTL, - RADEON_CSQ_PRIDIS_INDDIS); - } else { - MMIO_OUT32(mmio, R128_REG_PM4_MICRO_CNTL, 0); - MMIO_OUT32(mmio, R128_REG_PM4_BUFFER_CNTL, - R128_PM4_NONPM4 | R128_PM4_BUFFER_CNTL_NOUPDATE); - } - atis->cce_pri_size = 0; - - ATIEngineReset(atis); - - return TRUE; -} - -static Bool -ATIDMAInit(ScreenPtr pScreen, Bool use_agp) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - char *mmio = atic->reg_base; - int dma_offset; - CARD32 tmp; - - /* XXX: Not for radeons. Yet? */ - if (atic->is_radeon) - return FALSE; - - if (use_agp) { - if (1) - return FALSE; /* XXX */ - /* Allocate a 1MB AGP space, but only use 128k + 128 for DMA. - * XXX: Should use the rest for things like scratch space. - */ - if (!ATIInitAGP(pScreen, 1024 * 1024)) - return FALSE; - atis->ring_addr = atis->agp_addr; - atis->ring_len = 128 * 1024; - dma_offset = R128_AGP_OFFSET; - } else { - if (1) - return FALSE; /* XXX */ - /* Allocate a 128K buffer, plus 32 DWORDS to give space for the - * R128 ASIC bug workaround. - */ - atis->dma_space = KdOffscreenAlloc(pScreen, 128 * 1024 + 128, - 128, TRUE, NULL, NULL); - if (atis->dma_space == NULL) - return FALSE; - atis->ring_addr = (CARD32 *)(atis->dma_space->offset + - pScreenPriv->screen->memory_base); - atis->ring_len = 128 * 1024; - dma_offset = atis->dma_space->offset; - } - - ATIUploadMicrocode(atis); - ATIEngineReset(atis); - - atis->ring_read = 0; - atis->ring_write = 0; - - tmp = MMIO_IN32(mmio, ATI_REG_BUS_CNTL); - MMIO_OUT32(mmio, ATI_REG_BUS_CNTL, tmp & ~ATI_BUS_MASTER_DIS); - - MMIO_OUT32(mmio, ATI_REG_CCE_RB_BASE, dma_offset); - MMIO_OUT32(mmio, ATI_REG_CCE_WPTR, atis->ring_write); - MMIO_OUT32(mmio, ATI_REG_CCE_RPTR, atis->ring_read); - MMIO_OUT32(mmio, ATI_REG_CCE_RPTR_ADDR, 0 /* XXX? */); - - if (atic->is_r200) { - MMIO_OUT32(mmio, RADEON_REG_CP_CSQ_CNTL, - RADEON_CSQ_PRIBM_INDBM); - atis->cce_pri_size = MMIO_IN32(mmio, RADEON_REG_CP_CSQ_CNTL) & - R200_CSQ_CNT_PRIMARY_MASK; - MMIO_OUT32(mmio, RADEON_REG_ME_CNTL, RADEON_ME_MODE_FREE_RUN); - } else if (atic->is_radeon) { - MMIO_OUT32(mmio, RADEON_REG_CP_CSQ_CNTL, - RADEON_CSQ_PRIBM_INDBM); - atis->cce_pri_size = MMIO_IN32(mmio, RADEON_REG_CP_CSQ_CNTL) & - RADEON_CSQ_CNT_PRIMARY_MASK; - MMIO_OUT32(mmio, RADEON_REG_ME_CNTL, RADEON_ME_MODE_FREE_RUN); - } else { - MMIO_OUT32(mmio, R128_REG_PM4_BUFFER_WM_CNTL, - ((R128_WATERMARK_L/4) << R128_WMA_SHIFT) | - ((R128_WATERMARK_M/4) << R128_WMB_SHIFT) | - ((R128_WATERMARK_N/4) << R128_WMC_SHIFT) | - ((R128_WATERMARK_K/64) << R128_WB_WM_SHIFT)); - /* The sample code reads from an undocumneted register - * (PM4_BUFFER_ADDR). Perhaps it's a write posting thing? Do - * a read in case that's it. - */ - MMIO_IN32(mmio, R128_REG_PM4_BUFFER_CNTL); - if (use_agp) { - /* XXX Magic num */ - MMIO_OUT32(mmio, R128_REG_PCI_GART_PAGE, 1); - MMIO_OUT32(mmio, R128_REG_PM4_BUFFER_CNTL, - ATILog2(atis->ring_len) | - R128_PM4_192BM | - R128_PM4_BUFFER_CNTL_NOUPDATE); - } else { - MMIO_OUT32(mmio, R128_REG_PM4_BUFFER_CNTL, - ATILog2(atis->ring_len) | - R128_PM4_192BM | - R128_PM4_BUFFER_CNTL_NOUPDATE | - R128_PM4_IN_FRAME_BUFFER); - } - atis->cce_pri_size = 192; - MMIO_IN32(mmio, R128_REG_PM4_BUFFER_CNTL); - MMIO_OUT32(mmio, R128_REG_PM4_MICRO_CNTL, - R128_PM4_MICRO_FREERUN); - } - - return TRUE; -} - -static Bool -ATIDMAFini(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - char *mmio = atic->reg_base; - - if (atic->is_radeon) { - MMIO_OUT32(mmio, RADEON_REG_ME_CNTL, 0); - MMIO_OUT32(mmio, RADEON_REG_CP_CSQ_CNTL, - RADEON_CSQ_PRIDIS_INDDIS); - } else { - MMIO_OUT32(mmio, ATI_REG_CCE_WPTR, - atis->ring_write | R128_PM4_BUFFER_DL_DONE); - MMIO_OUT32(mmio, R128_REG_PM4_MICRO_CNTL, 0); - MMIO_OUT32(mmio, R128_REG_PM4_BUFFER_CNTL, - R128_PM4_NONPM4 | R128_PM4_BUFFER_CNTL_NOUPDATE); - } - atis->cce_pri_size = 0; - - ATIEngineReset(atis); - - if (atis->using_agp) - ATIFiniAGP(pScreen); - else - KdOffscreenFree(pScreen, atis->dma_space); - - return TRUE; -} - -void -ATIDMASetup(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATICardInfo(pScreenPriv); - ATIScreenInfo(pScreenPriv); - -#ifdef USE_DRI - if (atis->using_dri) - ATIDRIDMAStart(atis); -#endif /* USE_DRI */ - - if (!atis->using_dri) { - atis->using_agp = FALSE; - if (atic->is_agp && ATIDMAInit(pScreen, TRUE)) { - atis->using_agp = TRUE; - atis->using_dma = TRUE; - } else if (ATIDMAInit(pScreen, FALSE)) { - atis->using_agp = FALSE; - atis->using_dma = TRUE; - } else if (ATIPseudoDMAInit(pScreen)) - atis->using_pseudo = TRUE; - else - atis->using_pio = TRUE; - } - - atis->indirectBuffer = ATIGetDMABuffer(atis); - if (atis->indirectBuffer == FALSE) - FatalError("Failed to allocate DMA buffer.\n"); - - if (atis->using_dri) - ErrorF("Initialized %s DRI DMA\n", - atis->using_agp ? "AGP" : "PCI"); - else if (atis->using_dma && atis->using_agp) - ErrorF("Initialized AGP DMA\n"); - else if (atis->using_dma) - ErrorF("Initialized framebuffer pseudo-DMA\n"); - else if (atis->using_pseudo) - ErrorF("Initialized pseudo-DMA\n"); - else if (atis->using_pio) - ErrorF("Initialized PIO\n"); -} - -void -ATIDMATeardown(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - - ATIWaitIdle(atis); - -#ifdef USE_DRI - if (atis->using_dri) - ATIDRIDMAStop(atis); -#endif /* USE_DRI */ - - if (atis->using_dma) - ATIDMAFini(pScreen); - - if (atis->using_pseudo) - ATIPseudoDMAFini(pScreen); - - if (atis->using_pio || atis->using_pseudo || atis->using_dma) { - xfree(atis->indirectBuffer->address); - xfree(atis->indirectBuffer); - } - atis->indirectBuffer = NULL; - - atis->using_pio = FALSE; - atis->using_pseudo = FALSE; - atis->using_dma = FALSE; - atis->using_agp = FALSE; -} - diff --git a/hw/kdrive/ati/ati_dma.h b/hw/kdrive/ati/ati_dma.h deleted file mode 100644 index 4c2092b2c..000000000 --- a/hw/kdrive/ati/ati_dma.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright © 2004 Eric Anholt - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Eric Anholt not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Eric Anholt makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _ATI_DMA_H_ -#define _ATI_DMA_H_ - -#define CCE_DEBUG 1 - -#if !CCE_DEBUG -#define DMA_PACKET0(reg, count) \ - (ATI_CCE_PACKET0 | (((count) - 1) << 16) | ((reg) >> 2)) -#else -#define DMA_PACKET0(reg, count) \ - (__packet0count = (count), __reg = (reg), \ - ATI_CCE_PACKET0 | (((count) - 1) << 16) | ((reg) >> 2)) -#endif -#define DMA_PACKET1(reg1, reg2) \ - (ATI_CCE_PACKET1 | \ - (((reg2) >> 2) << ATI_CCE_PACKET1_REG_2_SHIFT) | ((reg1) >> 2)) -#define DMA_PACKET3(type, count) \ - ((type) | (((count) - 1) << 16)) - -#if !CCE_DEBUG - -#define RING_LOCALS CARD32 *__head; int __count -#define BEGIN_DMA(n) \ -do { \ - if ((atis->indirectBuffer->used + 4*(n)) > \ - atis->indirectBuffer->size) { \ - ATIFlushIndirect(atis, 1); \ - } \ - __head = (CARD32 *)((char *)atis->indirectBuffer->address + \ - atis->indirectBuffer->used); \ - __count = 0; \ -} while (0) -#define END_DMA() do { \ - atis->indirectBuffer->used += __count * 4; \ -} while (0) - -#else - -#define RING_LOCALS \ - CARD32 *__head; int __count, __total, __reg, __packet0count -#define BEGIN_DMA(n) \ -do { \ - if ((atis->indirectBuffer->used + 4*(n)) > \ - atis->indirectBuffer->size) { \ - ATIFlushIndirect(atis, 1); \ - } \ - __head = (CARD32 *)((char *)atis->indirectBuffer->address + \ - atis->indirectBuffer->used); \ - __count = 0; \ - __total = n; \ - __reg = 0; \ - __packet0count = 0; \ -} while (0) -#define END_DMA() do { \ - if (__count != __total) \ - FatalError("count != total (%d vs %d) at %s:%d\n", \ - __count, __total, __FILE__, __LINE__); \ - atis->indirectBuffer->used += __count * 4; \ -} while (0) - -#endif - -#define OUT_RING(val) do { \ - __head[__count++] = (val); \ -} while (0) - -#define OUT_RING_REG(reg, val) do { \ - if (__reg != reg) \ - FatalError("unexpected reg (0x%x vs 0x%x) at %s:%d\n", \ - reg, __reg, __FILE__, __LINE__); \ - if (__packet0count-- <= 0) \ - FatalError("overrun of packet0 at %s:%d\n", \ - __FILE__, __LINE__); \ - __head[__count++] = (val); \ - __reg += 4; \ -} while (0) - -#define OUT_RING_F(x) OUT_RING(GET_FLOAT_BITS(x)) - -#define OUT_REG(reg, val) \ -do { \ - OUT_RING(DMA_PACKET0(reg, 1)); \ - OUT_RING(val); \ -} while (0) - -#define TIMEOUT_LOCALS struct timeval _target, _curtime - -static inline Bool -tv_le(struct timeval *tv1, struct timeval *tv2) -{ - if (tv1->tv_sec < tv2->tv_sec || - (tv1->tv_sec == tv2->tv_sec && tv1->tv_usec < tv2->tv_usec)) - return TRUE; - else - return FALSE; -} - -#define WHILE_NOT_TIMEOUT(_timeout) \ - gettimeofday(&_target, NULL); \ - _target.tv_usec += ((_timeout) * 1000000); \ - _target.tv_sec += _target.tv_usec / 1000000; \ - _target.tv_usec = _target.tv_usec % 1000000; \ - while (gettimeofday(&_curtime, NULL), tv_le(&_curtime, &_target)) - -#define TIMEDOUT() (!tv_le(&_curtime, &_target)) - -dmaBuf * -ATIGetDMABuffer(ATIScreenInfo *atis); - -void -ATIFlushIndirect(ATIScreenInfo *atis, Bool discard); - -void -ATIDMASetup(ScreenPtr pScreen); - -void -ATIDMATeardown(ScreenPtr pScreen); - -#endif /* _ATI_DMA_H_ */ diff --git a/hw/kdrive/ati/ati_draw.c b/hw/kdrive/ati/ati_draw.c deleted file mode 100644 index c10fea471..000000000 --- a/hw/kdrive/ati/ati_draw.c +++ /dev/null @@ -1,918 +0,0 @@ -/* - * Copyright © 2003 Eric Anholt - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Eric Anholt not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Eric Anholt makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "ati.h" -#include "ati_reg.h" -#include "ati_dma.h" -#include "ati_draw.h" -#include "kaa.h" - -CARD8 ATISolidRop[16] = { - /* GXclear */ 0x00, /* 0 */ - /* GXand */ 0xa0, /* src AND dst */ - /* GXandReverse */ 0x50, /* src AND NOT dst */ - /* GXcopy */ 0xf0, /* src */ - /* GXandInverted*/ 0x0a, /* NOT src AND dst */ - /* GXnoop */ 0xaa, /* dst */ - /* GXxor */ 0x5a, /* src XOR dst */ - /* GXor */ 0xfa, /* src OR dst */ - /* GXnor */ 0x05, /* NOT src AND NOT dst */ - /* GXequiv */ 0xa5, /* NOT src XOR dst */ - /* GXinvert */ 0x55, /* NOT dst */ - /* GXorReverse */ 0xf5, /* src OR NOT dst */ - /* GXcopyInverted*/ 0x0f, /* NOT src */ - /* GXorInverted */ 0xaf, /* NOT src OR dst */ - /* GXnand */ 0x5f, /* NOT src OR NOT dst */ - /* GXset */ 0xff, /* 1 */ -}; - -CARD8 ATIBltRop[16] = { - /* GXclear */ 0x00, /* 0 */ - /* GXand */ 0x88, /* src AND dst */ - /* GXandReverse */ 0x44, /* src AND NOT dst */ - /* GXcopy */ 0xcc, /* src */ - /* GXandInverted*/ 0x22, /* NOT src AND dst */ - /* GXnoop */ 0xaa, /* dst */ - /* GXxor */ 0x66, /* src XOR dst */ - /* GXor */ 0xee, /* src OR dst */ - /* GXnor */ 0x11, /* NOT src AND NOT dst */ - /* GXequiv */ 0x99, /* NOT src XOR dst */ - /* GXinvert */ 0x55, /* NOT dst */ - /* GXorReverse */ 0xdd, /* src OR NOT dst */ - /* GXcopyInverted*/ 0x33, /* NOT src */ - /* GXorInverted */ 0xbb, /* NOT src OR dst */ - /* GXnand */ 0x77, /* NOT src OR NOT dst */ - /* GXset */ 0xff, /* 1 */ -}; - -int copydx, copydy; -ATIScreenInfo *accel_atis; -/* If is_24bpp is set, then we are using the accelerator in 8-bit mode due - * to it being broken for 24bpp, so coordinates have to be multiplied by 3. - */ -Bool is_24bpp; -CARD32 settings, color, src_pitch_offset, dst_pitch_offset; - -int sample_count; -float sample_offsets_x[255]; -float sample_offsets_y[255]; - -#define DRAW_USING_PACKET3 0 - -void -ATIDrawSetup(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - RING_LOCALS; - - /* XXX: this shouldn't be necessary, but fixes some R128 composite - * issues. - */ - /*if (!atic->is_radeon) { - char *mmio = atic->reg_base; - ATIWaitIdle(atis); - MMIO_OUT32(mmio, R128_REG_PC_GUI_MODE, - R128_PC_BYPASS_EN); - }*/ - - BEGIN_DMA(2); - OUT_REG(ATI_REG_DEFAULT_SC_BOTTOM_RIGHT, - ATI_DEFAULT_SC_RIGHT_MAX | ATI_DEFAULT_SC_BOTTOM_MAX); - END_DMA(); - - if (!atic->is_radeon) { - /* Setup for R128 Composite */ - BEGIN_DMA(12); - OUT_REG(R128_REG_SCALE_3D_CNTL, - R128_SCALE_3D_TEXMAP_SHADE | - R128_SCALE_PIX_REPLICATE | - R128_TEX_CACHE_SPLIT | - R128_TEX_MAP_ALPHA_IN_TEXTURE | - R128_TEX_CACHE_LINE_SIZE_4QW); - OUT_REG(R128_REG_SETUP_CNTL, - R128_COLOR_SOLID_COLOR | - R128_PRIM_TYPE_TRI | - R128_TEXTURE_ST_MULT_W | - R128_STARTING_VERTEX_1 | - R128_ENDING_VERTEX_3 | - R128_SUB_PIX_4BITS); - OUT_REG(R128_REG_PM4_VC_FPU_SETUP, - R128_FRONT_DIR_CCW | - R128_BACKFACE_CULL | - R128_FRONTFACE_SOLID | - R128_FPU_COLOR_SOLID | - R128_FPU_SUB_PIX_4BITS | - R128_FPU_MODE_3D | - R128_TRAP_BITS_DISABLE | - R128_XFACTOR_2 | - R128_YFACTOR_2 | - R128_FLAT_SHADE_VERTEX_OGL | - R128_FPU_ROUND_TRUNCATE | - R128_WM_SEL_8DW); - OUT_REG(R128_REG_PLANE_3D_MASK_C, 0xffffffff); - OUT_REG(R128_REG_CONSTANT_COLOR_C, 0xff000000); - OUT_REG(R128_REG_WINDOW_XY_OFFSET, 0x00000000); - END_DMA(); - } else if (!atic->is_r300) { - /* Setup for R100/R200 Composite */ - BEGIN_DMA(8); - OUT_REG(RADEON_REG_RE_TOP_LEFT, 0); - OUT_REG(RADEON_REG_RE_WIDTH_HEIGHT, 0xffffffff); - OUT_REG(RADEON_REG_RB3D_PLANEMASK, 0xffffffff); - OUT_REG(RADEON_REG_SE_CNTL, - RADEON_FFACE_CULL_CCW | - RADEON_FFACE_SOLID | - RADEON_VTX_PIX_CENTER_OGL); - END_DMA(); - - if (atic->is_r100) { - BEGIN_DMA(6); - OUT_REG(RADEON_REG_SE_CNTL_STATUS, RADEON_TCL_BYPASS); - OUT_REG(RADEON_REG_SE_COORD_FMT, - RADEON_VTX_XY_PRE_MULT_1_OVER_W0 | - RADEON_VTX_ST0_NONPARAMETRIC | - RADEON_VTX_ST1_NONPARAMETRIC | - RADEON_TEX1_W_ROUTING_USE_W0); - OUT_REG(RADEON_REG_RB3D_DSTCACHE_MODE, - RADEON_RB3D_DC_2D_CACHE_AUTOFLUSH | - RADEON_RB3D_DC_3D_CACHE_AUTOFLUSH); - END_DMA(); - } else { - BEGIN_DMA(18); - /* XXX: The 0 below should be RADEON_TCL_BYPASS on - * RS300s. - */ - OUT_REG(R200_REG_SE_VAP_CNTL_STATUS, 0); - OUT_REG(R200_REG_PP_CNTL_X, 0); - OUT_REG(R200_REG_PP_TXMULTI_CTL_0, 0); - OUT_REG(R200_REG_SE_VTX_STATE_CNTL, 0); - OUT_REG(R200_REG_RE_CNTL, 0); - /* XXX: VTX_ST_DENORMALIZED is illegal for the case of - * repeating textures. - */ - OUT_REG(R200_REG_SE_VTE_CNTL, R200_VTX_ST_DENORMALIZED); - OUT_REG(R200_REG_SE_VAP_CNTL, - R200_VAP_FORCE_W_TO_ONE | - R200_VAP_VF_MAX_VTX_NUM); - OUT_REG(R200_REG_RE_AUX_SCISSOR_CNTL, 0); - OUT_REG(RADEON_REG_RB3D_DSTCACHE_MODE, - RADEON_RB3D_DC_2D_CACHE_AUTOFLUSH | - RADEON_RB3D_DC_3D_CACHE_AUTOFLUSH | - R200_RB3D_DC_2D_CACHE_AUTOFREE | - R200_RB3D_DC_3D_CACHE_AUTOFREE); - END_DMA(); - } - } -} - -static void -ATIWaitMarker(ScreenPtr pScreen, int marker) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - - ENTER_DRAW(0); - ATIWaitIdle(atis); - LEAVE_DRAW(0); -} - -void -RadeonSwitchTo2D(ATIScreenInfo *atis) -{ - RING_LOCALS; - - ENTER_DRAW(0); - BEGIN_DMA(4); - OUT_REG(RADEON_REG_RB3D_DSTCACHE_CTLSTAT, RADEON_RB3D_DC_FLUSH); - OUT_REG(ATI_REG_WAIT_UNTIL, - RADEON_WAIT_HOST_IDLECLEAN | RADEON_WAIT_3D_IDLECLEAN); - END_DMA(); - LEAVE_DRAW(0); -} - -void -RadeonSwitchTo3D(ATIScreenInfo *atis) -{ - RING_LOCALS; - - ENTER_DRAW(0); - BEGIN_DMA(4); - OUT_REG(RADEON_REG_RB3D_DSTCACHE_CTLSTAT, RADEON_RB3D_DC_FLUSH); - /* We must wait for 3d to idle, in case source was just written as a dest. */ - OUT_REG(ATI_REG_WAIT_UNTIL, - RADEON_WAIT_HOST_IDLECLEAN | RADEON_WAIT_2D_IDLECLEAN | RADEON_WAIT_3D_IDLECLEAN); - END_DMA(); - LEAVE_DRAW(0); -} - -#if ATI_TRACE_DRAW -void -ATIEnterDraw (PixmapPtr pPix, char *function) -{ - if (pPix != NULL) { - KdScreenPriv(pPix->drawable.pScreen); - CARD32 offset; - - offset = ((CARD8 *)pPix->devPrivate.ptr - - pScreenPriv->screen->memory_base); - - ErrorF ("Enter %s 0x%x (%dx%dx%d/%d)\n", function, offset, - pPix->drawable.width, pPix->drawable.height, pPix->drawable.depth, - pPix->drawable.bitsPerPixel); - } else - ErrorF ("Enter %s\n", function); -} - -void -ATILeaveDraw (PixmapPtr pPix, char *function) -{ - if (pPix != NULL) { - KdScreenPriv(pPix->drawable.pScreen); - CARD32 offset; - - offset = ((CARD8 *)pPix->devPrivate.ptr - - pScreenPriv->screen->memory_base); - - ErrorF ("Leave %s 0x%x\n", function, offset); - } else - ErrorF ("Leave %s\n", function); -} -#endif - -/* Assumes that depth 15 and 16 can be used as depth 16, which is okay since we - * require src and dest datatypes to be equal. - */ -static Bool -ATIGetDatatypeBpp(int bpp, CARD32 *type) -{ - switch (bpp) { - case 8: - *type = R128_DATATYPE_CI8; - return TRUE; - case 16: - *type = R128_DATATYPE_RGB565; - return TRUE; - case 24: - *type = R128_DATATYPE_CI8; - return TRUE; - case 32: - *type = R128_DATATYPE_ARGB8888; - return TRUE; - default: - ATI_FALLBACK(("Unsupported bpp: %d\n", bpp)); - return FALSE; - } -} - -Bool -ATIGetOffsetPitch(ATIScreenInfo *atis, int bpp, CARD32 *pitch_offset, - int offset, int pitch) -{ - ATICardInfo *atic = atis->atic; - - /* On the R128, depending on the bpp the screen can be set up so that it - * doesn't meet the pitchAlign requirement but can still be - * accelerated, so we check the specific pitch requirement of alignment - * to 8 pixels. - */ - if (atic->is_radeon) { - if (pitch % atis->kaa.pitchAlign != 0) - ATI_FALLBACK(("Bad pitch 0x%08x\n", pitch)); - *pitch_offset = ((pitch >> 6) << 22) | (offset >> 10); - - } else { - if (pitch % bpp != 0) - ATI_FALLBACK(("Bad pitch 0x%08x\n", pitch)); - *pitch_offset = ((pitch / bpp) << 21) | (offset >> 5); - } - - if (offset % atis->kaa.offsetAlign != 0) - ATI_FALLBACK(("Bad offset 0x%08x\n", offset)); - - return TRUE; -} - -Bool -ATIGetPixmapOffsetPitch(PixmapPtr pPix, CARD32 *pitch_offset) -{ - KdScreenPriv(pPix->drawable.pScreen); - ATIScreenInfo(pScreenPriv); - CARD32 pitch, offset; - int bpp; - - bpp = pPix->drawable.bitsPerPixel; - if (bpp == 24) - bpp = 8; - - offset = ((CARD8 *)pPix->devPrivate.ptr - - pScreenPriv->screen->memory_base); - pitch = pPix->devKind; - - return ATIGetOffsetPitch(atis, bpp, pitch_offset, offset, pitch); -} - -static Bool -ATIPrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg) -{ - KdScreenPriv(pPix->drawable.pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - CARD32 datatype; - RING_LOCALS; - - is_24bpp = (pPix->drawable.bitsPerPixel == 24); - accel_atis = atis; - - if (is_24bpp) { - /* Solid fills in fake-24bpp mode only work if the pixel color - * and planemask are all the same byte. - */ - if ((fg & 0xffffff) != (((fg & 0xff) << 16) | ((fg >> 8) & - 0xffff))) - ATI_FALLBACK(("Can't do solid color 0x%08x in 24bpp\n", - fg)); - if ((pm & 0xffffff) != (((pm & 0xff) << 16) | ((pm >> 8) & - 0xffff))) - ATI_FALLBACK(("Can't do planemask 0x%08x in 24bpp\n", - pm)); - } - - if (!ATIGetDatatypeBpp(pPix->drawable.bitsPerPixel, &datatype)) - return FALSE; - if (!ATIGetPixmapOffsetPitch(pPix, &dst_pitch_offset)) - return FALSE; - - ENTER_DRAW(pPix); - - if (atic->is_radeon) - RadeonSwitchTo2D(atis); - - settings = - ATI_GMC_DST_PITCH_OFFSET_CNTL | - ATI_GMC_BRUSH_SOLID_COLOR | - (datatype << 8) | - ATI_GMC_SRC_DATATYPE_COLOR | - (ATISolidRop[alu] << 16) | - ATI_GMC_CLR_CMP_CNTL_DIS | - R128_GMC_AUX_CLIP_DIS; - color = fg; - -#if DRAW_USING_PACKET3 - BEGIN_DMA(6); - OUT_REG(ATI_REG_DEFAULT_SC_BOTTOM_RIGHT, - ATI_DEFAULT_SC_RIGHT_MAX | ATI_DEFAULT_SC_BOTTOM_MAX); - OUT_REG(ATI_REG_DP_WRITE_MASK, pm); - OUT_REG(ATI_REG_DP_CNTL, ATI_DST_X_LEFT_TO_RIGHT | - ATI_DST_Y_TOP_TO_BOTTOM); - END_DMA(); -#else - BEGIN_DMA(12); - OUT_REG(ATI_REG_DEFAULT_SC_BOTTOM_RIGHT, - ATI_DEFAULT_SC_RIGHT_MAX | ATI_DEFAULT_SC_BOTTOM_MAX); - OUT_REG(ATI_REG_DST_PITCH_OFFSET, dst_pitch_offset); - OUT_REG(ATI_REG_DP_GUI_MASTER_CNTL, settings); - OUT_REG(ATI_REG_DP_BRUSH_FRGD_CLR, fg); - OUT_REG(ATI_REG_DP_WRITE_MASK, pm); - OUT_REG(ATI_REG_DP_CNTL, ATI_DST_X_LEFT_TO_RIGHT | - ATI_DST_Y_TOP_TO_BOTTOM); - END_DMA(); -#endif - - LEAVE_DRAW(pPix); - return TRUE; -} - -static void -ATISolid(int x1, int y1, int x2, int y2) -{ - ENTER_DRAW(0); - ATIScreenInfo *atis = accel_atis; - RING_LOCALS; - - if (is_24bpp) { - x1 *= 3; - x2 *= 3; - } -#if DRAW_USING_PACKET3 - BEGIN_DMA(6); - OUT_RING(DMA_PACKET3(ATI_CCE_PACKET3_PAINT_MULTI, 5)); - OUT_RING(settings); - OUT_RING(dst_pitch_offset); - OUT_RING(color); - OUT_RING((x1 << 16) | y1); - OUT_RING(((x2 - x1) << 16) | (y2 - y1)); - END_DMA(); -#else - BEGIN_DMA(3); - OUT_RING(DMA_PACKET0(ATI_REG_DST_Y_X, 2)); - OUT_RING_REG(ATI_REG_DST_Y_X, (y1 << 16) | x1); - OUT_RING_REG(ATI_REG_DST_HEIGHT_WIDTH, ((y2 - y1) << 16) | (x2 - x1)); - END_DMA(); -#endif - LEAVE_DRAW(0); -} - -static void -ATIDoneSolid(void) -{ - ENTER_DRAW(0); - LEAVE_DRAW(0); -} - -static Bool -ATIPrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, int dx, int dy, int alu, Pixel pm) -{ - KdScreenPriv(pDst->drawable.pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - CARD32 datatype; - RING_LOCALS; - - copydx = dx; - copydy = dy; - is_24bpp = pDst->drawable.bitsPerPixel == 24; - accel_atis = atis; - - if (is_24bpp && ((pm & 0xffffff) != (((pm & 0xff) << 16) | ((pm >> 8) & - 0xffff)))) - ATI_FALLBACK(("Can't do planemask 0x%08x in 24bpp\n", pm)); - - if (!ATIGetDatatypeBpp(pDst->drawable.bitsPerPixel, &datatype)) - return FALSE; - if (!ATIGetPixmapOffsetPitch(pSrc, &src_pitch_offset)) - return FALSE; - if (!ATIGetPixmapOffsetPitch(pDst, &dst_pitch_offset)) - return FALSE; - - ENTER_DRAW (pDst); - if (atic->is_radeon) - RadeonSwitchTo2D(atis); - - settings = - ATI_GMC_SRC_PITCH_OFFSET_CNTL | - ATI_GMC_DST_PITCH_OFFSET_CNTL | - ATI_GMC_BRUSH_NONE | - (datatype << 8) | - ATI_GMC_SRC_DATATYPE_COLOR | - (ATIBltRop[alu] << 16) | - ATI_DP_SRC_SOURCE_MEMORY | - ATI_GMC_CLR_CMP_CNTL_DIS | - R128_GMC_AUX_CLIP_DIS; - -#if DRAW_USING_PACKET3 - BEGIN_DMA(6); - OUT_REG(ATI_REG_DEFAULT_SC_BOTTOM_RIGHT, - ATI_DEFAULT_SC_RIGHT_MAX | ATI_DEFAULT_SC_BOTTOM_MAX); - OUT_REG(ATI_REG_DP_WRITE_MASK, pm); - OUT_REG(ATI_REG_DP_CNTL, - (dx >= 0 ? ATI_DST_X_LEFT_TO_RIGHT : 0) | - (dy >= 0 ? ATI_DST_Y_TOP_TO_BOTTOM : 0)); - END_DMA(); - -#else - BEGIN_DMA(12); - OUT_REG(ATI_REG_DEFAULT_SC_BOTTOM_RIGHT, - ATI_DEFAULT_SC_RIGHT_MAX | ATI_DEFAULT_SC_BOTTOM_MAX); - OUT_REG(ATI_REG_SRC_PITCH_OFFSET, src_pitch_offset); - OUT_REG(ATI_REG_DST_PITCH_OFFSET, dst_pitch_offset); - OUT_REG(ATI_REG_DP_GUI_MASTER_CNTL, settings); - OUT_REG(ATI_REG_DP_WRITE_MASK, pm); - OUT_REG(ATI_REG_DP_CNTL, - (dx >= 0 ? ATI_DST_X_LEFT_TO_RIGHT : 0) | - (dy >= 0 ? ATI_DST_Y_TOP_TO_BOTTOM : 0)); - END_DMA(); -#endif - LEAVE_DRAW(pDst); - - return TRUE; -} - -static void -ATICopy(int srcX, int srcY, int dstX, int dstY, int w, int h) -{ - ATIScreenInfo *atis = accel_atis; - RING_LOCALS; - - if (is_24bpp) { - srcX *= 3; - dstX *= 3; - w *= 3; - } - -#if !DRAW_USING_PACKET3 - if (copydx < 0) { - srcX += w - 1; - dstX += w - 1; - } - - if (copydy < 0) { - srcY += h - 1; - dstY += h - 1; - } -#endif - -#if DRAW_USING_PACKET3 - BEGIN_DMA(7); - OUT_RING(DMA_PACKET3(ATI_CCE_PACKET3_BITBLT_MULTI, 6)); - OUT_RING(settings); - OUT_RING(src_pitch_offset); - OUT_RING(dst_pitch_offset); - OUT_RING((srcX << 16) | srcY); - OUT_RING((dstX << 16) | dstY); - OUT_RING((w << 16) | h); - END_DMA(); -#else - BEGIN_DMA(4); - OUT_RING(DMA_PACKET0(ATI_REG_SRC_Y_X, 3)); - OUT_RING_REG(ATI_REG_SRC_Y_X, (srcY << 16) | srcX); - OUT_RING_REG(ATI_REG_DST_Y_X, (dstY << 16) | dstX); - OUT_RING_REG(ATI_REG_DST_HEIGHT_WIDTH, (h << 16) | w); - END_DMA(); -#endif -} - -static void -ATIDoneCopy(void) -{ -} - -static Bool -ATIUploadToScreen(PixmapPtr pDst, char *src, int src_pitch) -{ - ScreenPtr pScreen = pDst->drawable.pScreen; - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - int width, height, bpp, i, dwords; - int dst_pitch, dst_offset; - CARD32 dst_pitch_offset, datatype; - Bool success; - RING_LOCALS; - - ENTER_DRAW (pDst); - - LEAVE_DRAW (pDst); - /* XXX: Hostdata uploads aren't working yet. */ - return FALSE; - - dst_offset = ((CARD8 *)pDst->devPrivate.ptr - - pScreenPriv->screen->memory_base); - dst_pitch = pDst->devKind; - width = pDst->drawable.width; - height = pDst->drawable.height; - bpp = pDst->drawable.bitsPerPixel; - - success = ATIGetDatatypeBpp(bpp, &datatype); - - if (bpp == 24) { - is_24bpp = TRUE; - bpp = 8; - } else - is_24bpp = FALSE; - - if (!ATIGetOffsetPitch(atis, bpp, &dst_pitch_offset, dst_offset, - dst_pitch)) - return FALSE; - - if (src_pitch != (width * bpp / 8)) - return FALSE; - - /* No PACKET3 packets when in PIO mode. */ - if (atis->using_pio) - return FALSE; - - dwords = (width * height * (bpp / 8) + 3) / 4; - - /* Flush pixel cache so nothing being written to the destination - * previously gets mixed up with the hostdata blit. - */ - if (atic->is_radeon) { - BEGIN_DMA(4); - OUT_REG(RADEON_REG_RB3D_DSTCACHE_CTLSTAT, RADEON_RB3D_DC_FLUSH); - OUT_REG(ATI_REG_WAIT_UNTIL, - RADEON_WAIT_2D_IDLECLEAN | - RADEON_WAIT_3D_IDLECLEAN | - RADEON_WAIT_HOST_IDLECLEAN); - END_DMA(); - } else { - BEGIN_DMA(2); - OUT_REG(R128_REG_PC_GUI_CTLSTAT, - R128_PC_FLUSH_GUI | R128_PC_RI_GUI); - END_DMA(); - } - - BEGIN_DMA(8); - OUT_RING(DMA_PACKET3(ATI_CCE_PACKET3_HOSTDATA_BLT, 7 + dwords)); - OUT_RING(ATI_GMC_DST_PITCH_OFFSET_CNTL | - ATI_GMC_BRUSH_NONE | - (datatype << 8) | - ATI_GMC_SRC_DATATYPE_COLOR | - (ATISolidRop[GXcopy] << 16) | - ATI_DP_SRC_SOURCE_HOST_DATA | - ATI_GMC_CLR_CMP_CNTL_DIS | - R128_GMC_AUX_CLIP_DIS | - ATI_GMC_WR_MSK_DIS); - OUT_RING(dst_pitch_offset); - OUT_RING(0xffffffff); - OUT_RING(0xffffffff); - OUT_RING((0 << 16) | 0); - OUT_RING((height << 16) | width); - OUT_RING(dwords); - END_DMA(); - - for (i = 0; i < dwords; i++) { - BEGIN_DMA(1); - OUT_RING(((CARD32 *)src)[i]); - END_DMA(); - } - - if (atic->is_radeon) { - BEGIN_DMA(4); - OUT_REG(RADEON_REG_RB3D_DSTCACHE_CTLSTAT, - RADEON_RB3D_DC_FLUSH_ALL); - OUT_REG(ATI_REG_WAIT_UNTIL, - RADEON_WAIT_2D_IDLECLEAN | - RADEON_WAIT_HOST_IDLECLEAN); - END_DMA(); - } else { - BEGIN_DMA(2); - OUT_REG(R128_REG_PC_GUI_CTLSTAT, R128_PC_FLUSH_GUI); - END_DMA(); - } - - kaaMarkSync(pScreen); - - ErrorF("hostdata upload %d,%d %dbpp\n", width, height, bpp); - - return TRUE; -} - - -static Bool -ATIUploadToScratch(PixmapPtr pSrc, PixmapPtr pDst) -{ - KdScreenPriv(pSrc->drawable.pScreen); - ATICardInfo(pScreenPriv); - ATIScreenInfo(pScreenPriv); - int dst_pitch, src_pitch, w, i, size, bytes; - unsigned char *dst, *src; - RING_LOCALS; - - ENTER_DRAW(pSrc); - /* Align width to log 2, useful for R128 composite. This should be a - * KAA flag we check for (and supported in kaa.c in general) since many - * older bits of hardware are going to want POT pitches. - */ - w = pSrc->drawable.width; - if (atis->kaa.flags & KAA_OFFSCREEN_ALIGN_POT) - w = 1 << (ATILog2(w - 1) + 1); - dst_pitch = (w * pSrc->drawable.bitsPerPixel / 8 + - atis->kaa.pitchAlign - 1) & ~(atis->kaa.pitchAlign - 1); - - size = dst_pitch * pSrc->drawable.height; - if (size > atis->scratch_area->size) - ATI_FALLBACK(("Pixmap too large for scratch (%d,%d)\n", - pSrc->drawable.width, pSrc->drawable.height)); - - atis->scratch_next = (atis->scratch_next + atis->kaa.offsetAlign - 1) & - ~(atis->kaa.offsetAlign - 1); - if (atis->scratch_next + size > atis->scratch_area->offset + - atis->scratch_area->size) { - /* Only sync when we've used all of the scratch area. */ - kaaWaitSync(pSrc->drawable.pScreen); - atis->scratch_next = atis->scratch_area->offset; - } - memcpy(pDst, pSrc, sizeof(*pDst)); - pDst->devKind = dst_pitch; - pDst->devPrivate.ptr = pScreenPriv->screen->memory_base + - atis->scratch_next; - atis->scratch_next += size; - - src = pSrc->devPrivate.ptr; - src_pitch = pSrc->devKind; - dst = pDst->devPrivate.ptr; - bytes = src_pitch < dst_pitch ? src_pitch : dst_pitch; - - i = pSrc->drawable.height; - while (i--) { - memcpy(dst, src, bytes); - dst += dst_pitch; - src += src_pitch; - } - - /* Flush the pixel cache */ - if (atic->is_radeon) { - BEGIN_DMA(4); - OUT_REG(RADEON_REG_RB3D_DSTCACHE_CTLSTAT, - RADEON_RB3D_DC_FLUSH_ALL); - OUT_REG(ATI_REG_WAIT_UNTIL, RADEON_WAIT_HOST_IDLECLEAN); - END_DMA(); - } else { - BEGIN_DMA(2); - OUT_REG(R128_REG_PC_GUI_CTLSTAT, R128_PC_FLUSH_ALL); - END_DMA(); - } - - LEAVE_DRAW(pSrc); - return TRUE; -} - -static void -ATIBlockHandler(pointer blockData, OSTimePtr timeout, pointer readmask) -{ - ScreenPtr pScreen = (ScreenPtr) blockData; - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - - /* When the server is going to sleep, make sure that all DMA data has - * been flushed. - */ - if (atis->indirectBuffer) - ATIFlushIndirect(atis, 1); -} - -static void -ATIWakeupHandler(pointer blockData, int result, pointer readmask) -{ -} - -Bool -ATIDrawInit(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - - ErrorF("Screen: %d/%d depth/bpp\n", pScreenPriv->screen->fb[0].depth, - pScreenPriv->screen->fb[0].bitsPerPixel); - - RegisterBlockAndWakeupHandlers(ATIBlockHandler, ATIWakeupHandler, - pScreen); - -#ifdef USE_DRI - atis->using_dri = ATIDRIScreenInit(pScreen); -#endif /* USE_DRI */ - - memset(&atis->kaa, 0, sizeof(KaaScreenInfoRec)); - atis->kaa.waitMarker = ATIWaitMarker; - atis->kaa.PrepareSolid = ATIPrepareSolid; - atis->kaa.Solid = ATISolid; - atis->kaa.DoneSolid = ATIDoneSolid; - atis->kaa.PrepareCopy = ATIPrepareCopy; - atis->kaa.Copy = ATICopy; - atis->kaa.DoneCopy = ATIDoneCopy; - /* Other acceleration will be hooked in in DrawEnable depending on - * what type of DMA gets initialized. - */ - - atis->kaa.flags = KAA_OFFSCREEN_PIXMAPS; - if (atic->is_radeon) { - atis->kaa.offsetAlign = 1024; - atis->kaa.pitchAlign = 64; - } else { - /* Rage 128 compositing wants power-of-two pitches. */ - atis->kaa.flags |= KAA_OFFSCREEN_ALIGN_POT; - atis->kaa.offsetAlign = 32; - /* Pitch alignment is in sets of 8 pixels, and we need to cover - * 32bpp, so 32 bytes. - */ - atis->kaa.pitchAlign = 32; - } - - kaaInitTrapOffsets(8, sample_offsets_x, sample_offsets_y, 0.0, 0.0); - sample_count = (1 << 8) - 1; - - if (!kaaDrawInit(pScreen, &atis->kaa)) - return FALSE; - - return TRUE; -} - -static void -ATIScratchSave(ScreenPtr pScreen, KdOffscreenArea *area) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - - atis->scratch_area = NULL; -} - -void -ATIDrawEnable(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - - ATIDMASetup(pScreen); - ATIDrawSetup(pScreen); - - atis->scratch_area = NULL; - atis->kaa.PrepareBlend = NULL; - atis->kaa.Blend = NULL; - atis->kaa.DoneBlend = NULL; - atis->kaa.CheckComposite = NULL; - atis->kaa.PrepareComposite = NULL; - atis->kaa.Composite = NULL; - atis->kaa.DoneComposite = NULL; - atis->kaa.UploadToScreen = NULL; - atis->kaa.UploadToScratch = NULL; - - /* We can't dispatch 3d commands in PIO mode. */ - if (!atis->using_pio) { - if (!atic->is_radeon) { - atis->kaa.CheckComposite = R128CheckComposite; - atis->kaa.PrepareComposite = R128PrepareComposite; - atis->kaa.Composite = R128Composite; - atis->kaa.DoneComposite = R128DoneComposite; - } else if (atic->is_r100) { - atis->kaa.CheckComposite = R100CheckComposite; - atis->kaa.PrepareComposite = R100PrepareComposite; - atis->kaa.Composite = RadeonComposite; - atis->kaa.DoneComposite = RadeonDoneComposite; - } else if (atic->is_r200) { - atis->kaa.CheckComposite = R200CheckComposite; - atis->kaa.PrepareComposite = R200PrepareComposite; - atis->kaa.Composite = RadeonComposite; - atis->kaa.DoneComposite = RadeonDoneComposite; - } - } -#ifdef USE_DRI - if (atis->using_dri) { - if (!atic->is_radeon) { - /*atis->kaa.PrepareTrapezoids = R128PrepareTrapezoids; - atis->kaa.Trapezoids = R128Trapezoids; - atis->kaa.DoneTrapezoids = R128DoneTrapezoids;*/ - } else if (atic->is_r100 || atic->is_r200) { - atis->kaa.PrepareTrapezoids = RadeonPrepareTrapezoids; - atis->kaa.Trapezoids = RadeonTrapezoids; - atis->kaa.DoneTrapezoids = RadeonDoneTrapezoids; - } - } -#endif /* USE_DRI */ - - atis->kaa.UploadToScreen = ATIUploadToScreen; - - /* Reserve a scratch area. It'll be used for storing glyph data during - * Composite operations, because glyphs aren't in real pixmaps and thus - * can't be migrated. - */ - atis->scratch_area = KdOffscreenAlloc(pScreen, 131072, - atis->kaa.offsetAlign, TRUE, ATIScratchSave, atis); - if (atis->scratch_area != NULL) { - atis->scratch_next = atis->scratch_area->offset; - atis->kaa.UploadToScratch = ATIUploadToScratch; - } - - kaaMarkSync(pScreen); -} - -void -ATIDrawDisable(ScreenPtr pScreen) -{ - kaaWaitSync(pScreen); - ATIDMATeardown(pScreen); -} - -void -ATIDrawFini(ScreenPtr pScreen) -{ -#ifdef USE_DRI - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - if (atis->using_dri) { - ATIDRICloseScreen(pScreen); - atis->using_dri = FALSE; - } -#endif /* USE_DRI */ - - RemoveBlockAndWakeupHandlers(ATIBlockHandler, ATIWakeupHandler, - pScreen); - - kaaDrawFini(pScreen); -} - diff --git a/hw/kdrive/ati/ati_draw.h b/hw/kdrive/ati/ati_draw.h deleted file mode 100644 index 98a130a7b..000000000 --- a/hw/kdrive/ati/ati_draw.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright © 2004 Eric Anholt - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Eric Anholt not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Eric Anholt makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _ATI_DRAW_H_ -#define _ATI_DRAW_H_ - -Bool ATIGetOffsetPitch(ATIScreenInfo *atis, int bpp, CARD32 *pitch_offset, - int offset, int pitch); -Bool ATIGetPixmapOffsetPitch(PixmapPtr pPix, CARD32 *pitch_offset); - -Bool R128CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, - PicturePtr pDstPicture); -Bool R128PrepareComposite(int op, PicturePtr pSrcPicture, - PicturePtr pMaskPicture, PicturePtr pDstPicture, PixmapPtr pSrc, - PixmapPtr pMask, PixmapPtr pDst); -void R128Composite(int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, - int w, int h); -void R128DoneComposite(void); - -Bool R128PrepareTrapezoids(PicturePtr pDstPicture, PixmapPtr pDst); -void R128Trapezoids(KaaTrapezoid *traps, int ntraps); -void R128DoneTrapezoids(void); - -Bool R100CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, - PicturePtr pDstPicture); -Bool R100PrepareComposite(int op, PicturePtr pSrcPicture, - PicturePtr pMaskPicture, PicturePtr pDstPicture, PixmapPtr pSrc, - PixmapPtr pMask, PixmapPtr pDst); -Bool R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, - PicturePtr pDstPicture); -Bool R200PrepareComposite(int op, PicturePtr pSrcPicture, - PicturePtr pMaskPicture, PicturePtr pDstPicture, PixmapPtr pSrc, - PixmapPtr pMask, PixmapPtr pDst); -void RadeonComposite(int srcX, int srcY, int maskX, int maskY, int dstX, - int dstY, int w, int h); -void RadeonDoneComposite(void); - -Bool RadeonPrepareTrapezoids(PicturePtr pDstPicture, PixmapPtr pDst); -void RadeonTrapezoids(KaaTrapezoid *traps, int ntraps); -void RadeonDoneTrapezoids(void); - -void RadeonSwitchTo2D(ATIScreenInfo *atis); -void RadeonSwitchTo3D(ATIScreenInfo *atis); -void ATIWaitIdle(ATIScreenInfo *atis); - -#define ATI_TRACE_FALL 0 -#define ATI_TRACE_DRAW 0 - -#if ATI_TRACE_FALL -#define ATI_FALLBACK(x) \ -do { \ - ErrorF("%s: ", __FUNCTION__); \ - ErrorF x; \ - return FALSE; \ -} while (0) -#else -#define ATI_FALLBACK(x) return FALSE -#endif - -#if ATI_TRACE_DRAW -#define ENTER_DRAW(pix) ATIEnterDraw(pix, __FUNCTION__) -#define LEAVE_DRAW(pix) ATILeaveDraw(pix, __FUNCTION__) - -void -ATIEnterDraw (PixmapPtr pPixmap, char *function); - -void -ATILeaveDraw (PixmapPtr pPixmap, char *function); -#else /* ATI_TRACE */ -#define ENTER_DRAW(pix) -#define LEAVE_DRAW(pix) -#endif /* !ATI_TRACE */ - -#endif /* _ATI_DRAW_H_ */ diff --git a/hw/kdrive/ati/ati_drawtmp.h b/hw/kdrive/ati/ati_drawtmp.h deleted file mode 100644 index 82c99ac4d..000000000 --- a/hw/kdrive/ati/ati_drawtmp.h +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright © 2003 Eric Anholt - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Eric Anholt not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Eric Anholt makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef USE_DMA -#define TAG(x) x##DMA -#define LOCALS RING_LOCALS; \ - (void)atic -#define BEGIN(x) BEGIN_RING(x * 2) -#define OUT_REG(reg, val) OUT_RING_REG(reg, val) -#define END() ADVANCE_RING() -#else -#define TAG(x) x##MMIO -#define LOCALS char *mmio = atic->reg_base; \ - (void)atis -#define BEGIN(x) ATIWaitAvailMMIO(x) -#define OUT_REG(reg, val) MMIO_OUT32((mmio), (reg), (val)) -#define END() -#endif - -static Bool -TAG(ATISetup)(PixmapPtr pDst, PixmapPtr pSrc) -{ - KdScreenPriv(pDst->drawable.pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - int dst_offset, dst_pitch; - int bpp = pDst->drawable.bitsPerPixel; - LOCALS; - - accel_atis = atis; - - dst_pitch = pDst->devKind; - dst_offset = ((CARD8 *)pDst->devPrivate.ptr - - pScreenPriv->screen->memory_base); - if ((dst_pitch & (atis->kaa.offscreenPitch - 1)) != 0) - ATI_FALLBACK(("Bad dst pitch 0x%x\n", dst_pitch)); - if ((dst_offset & (atis->kaa.offscreenByteAlign - 1)) != 0) - ATI_FALLBACK(("Bad dst offset 0x%x\n", dst_offset)); - - if (pSrc != NULL) { - src_pitch = pSrc->devKind; - src_offset = ((CARD8 *)pSrc->devPrivate.ptr - - pScreenPriv->screen->memory_base); - if ((src_pitch & (atis->kaa.offscreenPitch - 1)) != 0) - ATI_FALLBACK(("Bad src pitch 0x%x\n", src_pitch)); - if ((src_offset & (atis->kaa.offscreenByteAlign - 1)) != 0) - ATI_FALLBACK(("Bad src offset 0x%x\n", src_offset)); - } - -#ifdef USE_DMA - if (atic->is_radeon && !atic->is_r200) - RadeonSwitchTo2D(); -#endif - BEGIN((pSrc != NULL) ? 3 : 2); - if (atic->is_radeon) { - OUT_REG(RADEON_REG_DST_PITCH_OFFSET, - ((dst_pitch >> 6) << 22) | (dst_offset >> 10)); - if (pSrc != NULL) { - OUT_REG(RADEON_REG_SRC_PITCH_OFFSET, - ((src_pitch >> 6) << 22) | (src_offset >> 10)); - } - } else { - if (is_24bpp) { - dst_pitch *= 3; - src_pitch *= 3; - } - /* R128 pitch is in units of 8 pixels, offset in 32 bytes */ - OUT_REG(RADEON_REG_DST_PITCH_OFFSET, - ((dst_pitch/bpp) << 21) | (dst_offset >> 5)); - if (pSrc != NULL) { - OUT_REG(RADEON_REG_SRC_PITCH_OFFSET, - ((src_pitch/bpp) << 21) | (src_offset >> 5)); - } - } - OUT_REG(RADEON_REG_DEFAULT_SC_BOTTOM_RIGHT, - (RADEON_DEFAULT_SC_RIGHT_MAX | RADEON_DEFAULT_SC_BOTTOM_MAX)); - END(); - - return TRUE; -} - -static Bool -TAG(ATIPrepareSolid)(PixmapPtr pPixmap, int alu, Pixel pm, Pixel fg) -{ - KdScreenPriv(pPixmap->drawable.pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - CARD32 datatype; - LOCALS; - - if (is_24bpp) { - /* Solid fills in fake-24bpp mode only work if the pixel color - * and planemask are all the same byte. - */ - if ((fg & 0xffffff) != (((fg & 0xff) << 16) | ((fg >> 8) & - 0xffff))) - ATI_FALLBACK(("Can't do solid color %d in 24bpp\n")); - if ((pm & 0xffffff) != (((pm & 0xff) << 16) | ((pm >> 8) & - 0xffff))) - ATI_FALLBACK(("Can't do planemask %d in 24bpp\n")); - } - - if (!ATIGetDatatypeBpp(pPixmap->drawable.bitsPerPixel, &datatype)) - return FALSE; - if (!TAG(ATISetup)(pPixmap, NULL)) - return FALSE; - - BEGIN(4); - OUT_REG(RADEON_REG_DP_GUI_MASTER_CNTL, - (datatype << 8) | - RADEON_GMC_CLR_CMP_CNTL_DIS | - RADEON_GMC_AUX_CLIP_DIS | - RADEON_GMC_BRUSH_SOLID_COLOR | - RADEON_GMC_DST_PITCH_OFFSET_CNTL | - RADEON_GMC_SRC_DATATYPE_COLOR | - (ATISolidRop[alu] << 16)); - OUT_REG(RADEON_REG_DP_BRUSH_FRGD_CLR, fg); - OUT_REG(RADEON_REG_DP_WRITE_MASK, pm); - OUT_REG(RADEON_REG_DP_CNTL, RADEON_DST_X_LEFT_TO_RIGHT | - RADEON_DST_Y_TOP_TO_BOTTOM); - END(); - - return TRUE; -} - -static void -TAG(ATISolid)(int x1, int y1, int x2, int y2) -{ - ATIScreenInfo *atis = accel_atis; - ATICardInfo *atic = atis->atic; - LOCALS; - - if (is_24bpp) { - x1 *= 3; - x2 *= 3; - } - BEGIN(2); - OUT_REG(RADEON_REG_DST_Y_X, (y1 << 16) | x1); - OUT_REG(RADEON_REG_DST_WIDTH_HEIGHT, ((x2 - x1) << 16) | (y2 - y1)); - END(); -} - -static Bool -TAG(ATIPrepareCopy)(PixmapPtr pSrc, PixmapPtr pDst, int dx, int dy, int alu, Pixel pm) -{ - KdScreenPriv(pDst->drawable.pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - CARD32 datatype; - LOCALS; - - copydx = dx; - copydy = dy; - - if (is_24bpp && ((pm & 0xffffff) != (((pm & 0xff) << 16) | ((pm >> 8) & - 0xffff)))) - ATI_FALLBACK(("Can't do planemask %d in 24bpp\n")); - - if (!ATIGetDatatypeBpp(pDst->drawable.bitsPerPixel, &datatype)) - return FALSE; - if (!TAG(ATISetup)(pDst, pSrc)) - return FALSE; - - BEGIN(3); - OUT_REG(RADEON_REG_DP_GUI_MASTER_CNTL, - (datatype << 8) | - RADEON_GMC_CLR_CMP_CNTL_DIS | - RADEON_GMC_AUX_CLIP_DIS | - RADEON_GMC_BRUSH_SOLID_COLOR | - RADEON_GMC_SRC_DATATYPE_COLOR | - (ATIBltRop[alu] << 16) | - RADEON_GMC_SRC_PITCH_OFFSET_CNTL | - RADEON_GMC_DST_PITCH_OFFSET_CNTL | - RADEON_DP_SRC_SOURCE_MEMORY); - OUT_REG(RADEON_REG_DP_WRITE_MASK, pm); - OUT_REG(RADEON_REG_DP_CNTL, - (dx >= 0 ? RADEON_DST_X_LEFT_TO_RIGHT : 0) | - (dy >= 0 ? RADEON_DST_Y_TOP_TO_BOTTOM : 0)); - END(); - - return TRUE; -} - -static void -TAG(ATICopy)(int srcX, int srcY, int dstX, int dstY, int w, int h) -{ - ATIScreenInfo *atis = accel_atis; - ATICardInfo *atic = atis->atic; - LOCALS; - - if (is_24bpp) { - srcX *= 3; - dstX *= 3; - w *= 3; - } - - if (copydx < 0) { - srcX += w - 1; - dstX += w - 1; - } - - if (copydy < 0) { - srcY += h - 1; - dstY += h - 1; - } - - BEGIN(3); - OUT_REG(RADEON_REG_SRC_Y_X, (srcY << 16) | srcX); - OUT_REG(RADEON_REG_DST_Y_X, (dstY << 16) | dstX); - OUT_REG(RADEON_REG_DST_HEIGHT_WIDTH, (h << 16) | w); - END(); -} - -#undef TAG -#undef LOCALS -#undef BEGIN -#undef OUT_REG -#undef END diff --git a/hw/kdrive/ati/ati_dri.c b/hw/kdrive/ati/ati_dri.c deleted file mode 100644 index edef72030..000000000 --- a/hw/kdrive/ati/ati_dri.c +++ /dev/null @@ -1,1138 +0,0 @@ -/* - * Copyright © 2003 Eric Anholt - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Eric Anholt not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Eric Anholt makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#include - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "ati.h" -#include "ati_reg.h" -#include "ati_dma.h" -#include "ati_dri.h" -#include "ati_dripriv.h" -#include "sarea.h" -#include "ati_sarea.h" -#include "ati_draw.h" -#include "r128_common.h" -#include "radeon_common.h" -#include "kaa.h" - -/* ?? HACK - for now, put this here... */ -/* ?? Alpha - this may need to be a variable to handle UP1x00 vs TITAN */ -#if defined(__alpha__) -# define DRM_PAGE_SIZE 8192 -#elif defined(__ia64__) -# define DRM_PAGE_SIZE getpagesize() -#else -# define DRM_PAGE_SIZE 4096 -#endif - -#ifdef GLXEXT -/* Initialize the visual configs that are supported by the hardware. - * These are combined with the visual configs that the indirect - * rendering core supports, and the intersection is exported to the - * client. - */ -static Bool ATIInitVisualConfigs(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - int numConfigs = 0; - __GLXvisualConfig *pConfigs = NULL; - ATIConfigPrivPtr pATIConfigs = NULL; - ATIConfigPrivPtr *pATIConfigPtrs = NULL; - int i, accum, stencil, db, use_db; - int depth = pScreenPriv->screen->fb[0].depth; - int bpp = pScreenPriv->screen->fb[0].bitsPerPixel; - - if (depth != 16 && (depth != 24 || bpp != 32)) - ErrorF("DRI GLX unsupported at %d/%d depth/bpp\n", depth, bpp); - - if (atis->depthOffset != 0) - use_db = 1; - else - use_db = 0; - - numConfigs = 4; - if (use_db) - numConfigs *= 2; - - pConfigs = xcalloc(sizeof(__GLXvisualConfig), numConfigs); - pATIConfigs = xcalloc(sizeof(ATIConfigPrivRec), numConfigs); - pATIConfigPtrs = xcalloc(sizeof(ATIConfigPrivPtr), numConfigs); - if (pConfigs == NULL || pATIConfigs == NULL || pATIConfigPtrs == NULL) { - xfree(pConfigs); - xfree(pATIConfigs); - xfree(pATIConfigPtrs); - return FALSE; - } - - i = 0; - for (db = 0; db <= use_db; db++) { - for (accum = 0; accum <= 1; accum++) { - for (stencil = 0; stencil <= 1; stencil++) { - pATIConfigPtrs[i] = &pATIConfigs[i]; - - pConfigs[i].vid = (VisualID)(-1); - pConfigs[i].class = -1; - pConfigs[i].rgba = TRUE; - if (depth == 16) { - pConfigs[i].redSize = 5; - pConfigs[i].greenSize = 6; - pConfigs[i].blueSize = 5; - pConfigs[i].alphaSize = 0; - pConfigs[i].redMask = 0x0000F800; - pConfigs[i].greenMask = 0x000007E0; - pConfigs[i].blueMask = 0x0000001F; - pConfigs[i].alphaMask = 0x00000000; - } else { - pConfigs[i].redSize = 8; - pConfigs[i].greenSize = 8; - pConfigs[i].blueSize = 8; - pConfigs[i].alphaSize = 8; - pConfigs[i].redMask = 0x00FF0000; - pConfigs[i].greenMask = 0x0000FF00; - pConfigs[i].blueMask = 0x000000FF; - pConfigs[i].alphaMask = 0xFF000000; - } - if (accum) { /* Simulated in software */ - pConfigs[i].accumRedSize = 16; - pConfigs[i].accumGreenSize = 16; - pConfigs[i].accumBlueSize = 16; - if (depth == 16) - pConfigs[i].accumAlphaSize = 0; - else - pConfigs[i].accumAlphaSize = 16; - } else { - pConfigs[i].accumRedSize = 0; - pConfigs[i].accumGreenSize = 0; - pConfigs[i].accumBlueSize = 0; - pConfigs[i].accumAlphaSize = 0; - } - if (db) - pConfigs[i].doubleBuffer = TRUE; - else - pConfigs[i].doubleBuffer = FALSE; - pConfigs[i].stereo = FALSE; - if (depth == 16) { - pConfigs[i].bufferSize = 16; - pConfigs[i].depthSize = 16; - if (stencil) - pConfigs[i].stencilSize = 8; - else - pConfigs[i].stencilSize = 0; - } else { - pConfigs[i].bufferSize = 32; - if (stencil) { - pConfigs[i].depthSize = 24; - pConfigs[i].stencilSize = 8; - } else { - pConfigs[i].depthSize = 24; - pConfigs[i].stencilSize = 0; - } - } - pConfigs[i].auxBuffers = 0; - pConfigs[i].level = 0; - if (accum) { - pConfigs[i].visualRating = GLX_SLOW_CONFIG; - } else { - pConfigs[i].visualRating = GLX_NONE; - } - pConfigs[i].transparentPixel = GLX_NONE; - pConfigs[i].transparentRed = 0; - pConfigs[i].transparentGreen = 0; - pConfigs[i].transparentBlue = 0; - pConfigs[i].transparentAlpha = 0; - pConfigs[i].transparentIndex = 0; - i++; - } - } - } - - atis->numVisualConfigs = numConfigs; - atis->pVisualConfigs = pConfigs; - atis->pVisualConfigsPriv = pATIConfigs; - GlxSetVisualConfigs(numConfigs, pConfigs, (void**)pATIConfigPtrs); - return TRUE; -} -#endif /* GLXEXT */ - -static void -ATIDRIInitGARTValues(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - int s, l; - - atis->gartOffset = 0; - - /* Initialize the ring buffer data */ - atis->ringStart = atis->gartOffset; - atis->ringMapSize = atis->ringSize * 1024 * 1024 + DRM_PAGE_SIZE; - - atis->ringReadOffset = atis->ringStart + atis->ringMapSize; - atis->ringReadMapSize = DRM_PAGE_SIZE; - - /* Reserve space for vertex/indirect buffers */ - atis->bufStart = atis->ringReadOffset + atis->ringReadMapSize; - atis->bufMapSize = atis->bufSize * 1024 * 1024; - - /* Reserve the rest for GART textures */ - atis->gartTexStart = atis->bufStart + atis->bufMapSize; - s = (atis->gartSize * 1024 * 1024 - atis->gartTexStart); - l = ATILog2((s-1) / ATI_NR_TEX_REGIONS); - if (l < ATI_LOG_TEX_GRANULARITY) l = ATI_LOG_TEX_GRANULARITY; - atis->gartTexMapSize = (s >> l) << l; - atis->log2GARTTexGran = l; -} - -static int -ATIDRIAddAndMap(int fd, drmHandle offset, drmSize size, - drmMapType type, drmMapFlags flags, drmHandlePtr handle, - drmAddressPtr address, char *desc) -{ - char *name; - - name = (type == DRM_AGP) ? "agp" : "pci"; - - if (drmAddMap(fd, offset, size, type, flags, handle) < 0) { - ErrorF("[%s] Could not add %s mapping\n", name, desc); - return FALSE; - } - ErrorF("[%s] %s handle = 0x%08lx\n", name, desc, *handle); - - if (drmMap(fd, *handle, size, address) < 0) { - ErrorF("[%s] Could not map %s\n", name, desc); - return FALSE; - } - ErrorF("[%s] %s mapped at 0x%08lx\n", name, desc, *address); - - return TRUE; -} - -/* Initialize the AGP state. Request memory for use in AGP space, and - initialize the Rage 128 registers to point to that memory. */ -static Bool -ATIDRIAgpInit(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - unsigned char *mmio = atic->reg_base; - unsigned long mode; - int ret; - CARD32 cntl, chunk; - - if (drmAgpAcquire(atic->drmFd) < 0) { - ErrorF("[agp] AGP not available\n"); - return FALSE; - } - - ATIDRIInitGARTValues(pScreen); - - mode = drmAgpGetMode(atic->drmFd); - if (atic->is_radeon) { - mode &= ~RADEON_AGP_MODE_MASK; - mode |= RADEON_AGP_1X_MODE; - } else { - mode &= ~R128_AGP_MODE_MASK; - mode |= R128_AGP_1X_MODE; - } - - if (drmAgpEnable(atic->drmFd, mode) < 0) { - ErrorF("[agp] AGP not enabled\n"); - drmAgpRelease(atic->drmFd); - return FALSE; - } - ErrorF("[agp] Mode 0x%08x selected\n", drmAgpGetMode(atic->drmFd)); - - if ((ret = drmAgpAlloc(atic->drmFd, atis->gartSize * 1024 * 1024, 0, - NULL, &atis->agpMemHandle)) < 0) { - ErrorF("[agp] Out of memory (%d)\n", ret); - drmAgpRelease(atic->drmFd); - return FALSE; - } - ErrorF("[agp] %d kB allocated with handle 0x%08lx\n", - atis->gartSize * 1024, (long)atis->agpMemHandle); - - if (drmAgpBind(atic->drmFd, atis->agpMemHandle, atis->gartOffset) < 0) { - ErrorF("[agp] Could not bind\n"); - drmAgpFree(atic->drmFd, atis->agpMemHandle); - drmAgpRelease(atic->drmFd); - return FALSE; - } - - if (!ATIDRIAddAndMap(atic->drmFd, atis->ringStart, atis->ringMapSize, - DRM_AGP, DRM_READ_ONLY, &atis->ringHandle, - (drmAddressPtr)&atis->ring, "ring")) - return FALSE; - - if (!ATIDRIAddAndMap(atic->drmFd, atis->ringReadOffset, - atis->ringReadMapSize, DRM_AGP, DRM_READ_ONLY, - &atis->ringReadPtrHandle, (drmAddressPtr)&atis->ringReadPtr, - "ring read ptr")) - return FALSE; - - if (!ATIDRIAddAndMap(atic->drmFd, atis->bufStart, atis->bufMapSize, - DRM_AGP, 0, &atis->bufHandle, (drmAddressPtr)&atis->buf, - "vertex/indirect buffers")) - return FALSE; - - if (!ATIDRIAddAndMap(atic->drmFd, atis->gartTexStart, - atis->gartTexMapSize, DRM_AGP, 0, &atis->gartTexHandle, - (drmAddressPtr)&atis->gartTex, "AGP texture map")) - return FALSE; - - if (atic->is_r100) { - /* Workaround for some hardware bugs */ - cntl = MMIO_IN32(mmio, ATI_REG_AGP_CNTL); - MMIO_OUT32(mmio, ATI_REG_AGP_CNTL, cntl | - RADEON_PENDING_SLOTS_VAL | RADEON_PENDING_SLOTS_SEL); - } else if (!atic->is_radeon) { - cntl = MMIO_IN32(mmio, ATI_REG_AGP_CNTL); - cntl &= ~R128_AGP_APER_SIZE_MASK; - switch (atis->gartSize) { - case 256: cntl |= R128_AGP_APER_SIZE_256MB; break; - case 128: cntl |= R128_AGP_APER_SIZE_128MB; break; - case 64: cntl |= R128_AGP_APER_SIZE_64MB; break; - case 32: cntl |= R128_AGP_APER_SIZE_32MB; break; - case 16: cntl |= R128_AGP_APER_SIZE_16MB; break; - case 8: cntl |= R128_AGP_APER_SIZE_8MB; break; - case 4: cntl |= R128_AGP_APER_SIZE_4MB; break; - default: - ErrorF("[agp] Illegal aperture size %d kB\n", atis->gartSize * - 1024); - return FALSE; - } - MMIO_OUT32(mmio, ATI_REG_AGP_CNTL, cntl); - - /* Disable Rage 128 PCIGART registers */ - chunk = MMIO_IN32(mmio, R128_REG_BM_CHUNK_0_VAL); - chunk &= ~(R128_BM_PTR_FORCE_TO_PCI | - R128_BM_PM4_RD_FORCE_TO_PCI | - R128_BM_GLOBAL_FORCE_TO_PCI); - MMIO_OUT32(mmio, R128_REG_BM_CHUNK_0_VAL, chunk); - - /* Ensure AGP GART is used (for now) */ - MMIO_OUT32(mmio, R128_REG_PCI_GART_PAGE, 1); - } - - MMIO_OUT32(mmio, ATI_REG_AGP_BASE, drmAgpBase(atic->drmFd)); - - return TRUE; -} - -static Bool -ATIDRIPciInit(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - unsigned char *mmio = atic->reg_base; - CARD32 chunk; - int ret; - - ATIDRIInitGARTValues(pScreen); - - ret = drmScatterGatherAlloc(atic->drmFd, atis->gartSize * 1024 * 1024, - &atis->pciMemHandle); - if (ret < 0) { - ErrorF("[pci] Out of memory (%d)\n", ret); - return FALSE; - } - ErrorF("[pci] %d kB allocated with handle 0x%08lx\n", - atis->gartSize * 1024, (long)atis->pciMemHandle); - - if (!ATIDRIAddAndMap(atic->drmFd, atis->ringStart, atis->ringMapSize, - DRM_SCATTER_GATHER, DRM_READ_ONLY | DRM_LOCKED | DRM_KERNEL, - &atis->ringHandle, (drmAddressPtr)&atis->ring, "ring")) - return FALSE; - - if (!ATIDRIAddAndMap(atic->drmFd, atis->ringReadOffset, - atis->ringReadMapSize, DRM_SCATTER_GATHER, - DRM_READ_ONLY | DRM_LOCKED | DRM_KERNEL, - &atis->ringReadPtrHandle, (drmAddressPtr)&atis->ringReadPtr, - "ring read ptr")) - return FALSE; - - if (!ATIDRIAddAndMap(atic->drmFd, atis->bufStart, atis->bufMapSize, - DRM_SCATTER_GATHER, 0, &atis->bufHandle, (drmAddressPtr)&atis->buf, - "vertex/indirect buffers")) - return FALSE; - - if (!ATIDRIAddAndMap(atic->drmFd, atis->gartTexStart, - atis->gartTexMapSize, DRM_SCATTER_GATHER, 0, &atis->gartTexHandle, - (drmAddressPtr)&atis->gartTex, "PCI texture map")) - return FALSE; - - if (!atic->is_radeon) { - /* Force PCI GART mode */ - chunk = MMIO_IN32(mmio, R128_REG_BM_CHUNK_0_VAL); - chunk |= (R128_BM_PTR_FORCE_TO_PCI | - R128_BM_PM4_RD_FORCE_TO_PCI | R128_BM_GLOBAL_FORCE_TO_PCI); - MMIO_OUT32(mmio, R128_REG_BM_CHUNK_0_VAL, chunk); - /* Ensure PCI GART is used */ - MMIO_OUT32(mmio, R128_REG_PCI_GART_PAGE, 0); - } - return TRUE; -} - - -/* Initialize the kernel data structures. */ -static int -R128DRIKernelInit(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - drmR128Init drmInfo; - int bpp = pScreenPriv->screen->fb[0].bitsPerPixel; - - memset(&drmInfo, 0, sizeof(drmR128Init) ); - - drmInfo.func = DRM_R128_INIT_CCE; - drmInfo.sarea_priv_offset = sizeof(XF86DRISAREARec); - drmInfo.is_pci = !atis->using_agp; - drmInfo.cce_mode = R128_PM4_64BM_64VCBM_64INDBM; - drmInfo.cce_secure = TRUE; - drmInfo.ring_size = atis->ringSize * 1024 * 1024; - drmInfo.usec_timeout = atis->DMAusecTimeout; - - drmInfo.front_offset = atis->frontOffset; - drmInfo.front_pitch = atis->frontPitch / (bpp / 8); - drmInfo.back_offset = atis->backOffset; - drmInfo.back_pitch = atis->backPitch / (bpp / 8); - drmInfo.fb_bpp = bpp; - - drmInfo.depth_offset = atis->depthOffset; - drmInfo.depth_pitch = atis->depthPitch / (bpp / 8); - drmInfo.depth_bpp = bpp; - - drmInfo.span_offset = atis->spanOffset; - - drmInfo.fb_offset = atis->fbHandle; - drmInfo.mmio_offset = atis->registerHandle; - drmInfo.ring_offset = atis->ringHandle; - drmInfo.ring_rptr_offset = atis->ringReadPtrHandle; - drmInfo.buffers_offset = atis->bufHandle; - drmInfo.agp_textures_offset = atis->gartTexHandle; - - if (drmCommandWrite(atic->drmFd, DRM_R128_INIT, &drmInfo, - sizeof(drmR128Init)) < 0) - return FALSE; - - return TRUE; -} - -/* Initialize the kernel data structures */ -static int -RadeonDRIKernelInit(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - drmRadeonInit drmInfo; - - memset(&drmInfo, 0, sizeof(drmRadeonInit)); - - if (atic->is_r200) - drmInfo.func = DRM_RADEON_INIT_R200_CP; - else - drmInfo.func = DRM_RADEON_INIT_CP; - - drmInfo.sarea_priv_offset = sizeof(XF86DRISAREARec); - drmInfo.is_pci = !atis->using_agp; - drmInfo.cp_mode = RADEON_CSQ_PRIBM_INDBM; - drmInfo.gart_size = atis->gartSize * 1024 * 1024; - drmInfo.ring_size = atis->ringSize * 1024 * 1024; - drmInfo.usec_timeout = atis->DMAusecTimeout; - - drmInfo.front_offset = atis->frontOffset; - drmInfo.front_pitch = atis->frontPitch; - drmInfo.back_offset = atis->backOffset; - drmInfo.back_pitch = atis->backPitch; - drmInfo.fb_bpp = pScreenPriv->screen->fb[0].bitsPerPixel; - drmInfo.depth_offset = atis->depthOffset; - drmInfo.depth_pitch = atis->depthPitch; - drmInfo.depth_bpp = pScreenPriv->screen->fb[0].bitsPerPixel; - - drmInfo.fb_offset = atis->fbHandle; - drmInfo.mmio_offset = atis->registerHandle; - drmInfo.ring_offset = atis->ringHandle; - drmInfo.ring_rptr_offset = atis->ringReadPtrHandle; - drmInfo.buffers_offset = atis->bufHandle; - drmInfo.gart_textures_offset = atis->gartTexHandle; - - if (drmCommandWrite(atic->drmFd, DRM_RADEON_CP_INIT, - &drmInfo, sizeof(drmRadeonInit)) < 0) - return FALSE; - - return TRUE; -} - -/* Add a map for the vertex buffers that will be accessed by any - DRI-based clients. */ -static Bool -ATIDRIBufInit(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - int type, size; - - if (atic->is_radeon) - size = RADEON_BUFFER_SIZE; - else - size = R128_BUFFER_SIZE; - - if (atis->using_agp) - type = DRM_AGP_BUFFER; - else - type = DRM_SG_BUFFER; - - /* Initialize vertex buffers */ - atis->bufNumBufs = drmAddBufs(atic->drmFd, atis->bufMapSize / size, - size, type, atis->bufStart); - - if (atis->bufNumBufs <= 0) { - ErrorF("[drm] Could not create vertex/indirect buffers list\n"); - return FALSE; - } - ErrorF("[drm] Added %d %d byte vertex/indirect buffers\n", - atis->bufNumBufs, size); - - atis->buffers = drmMapBufs(atic->drmFd); - if (atis->buffers == NULL) { - ErrorF("[drm] Failed to map vertex/indirect buffers list\n"); - return FALSE; - } - ErrorF("[drm] Mapped %d vertex/indirect buffers\n", - atis->buffers->count); - - return TRUE; -} - -static int -ATIDRIIrqInit(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - - if (atis->irqEnabled) - return FALSE; - - atis->irqEnabled = drmCtlInstHandler(atic->drmFd, 0); - - if (!atis->irqEnabled) - return FALSE; - - return TRUE; -} - -static void ATIDRISwapContext(ScreenPtr pScreen, DRISyncType syncType, - DRIContextType oldContextType, void *oldContext, - DRIContextType newContextType, void *newContext) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - - if ((syncType==DRI_3D_SYNC) && (oldContextType==DRI_2D_CONTEXT) && - (newContextType==DRI_2D_CONTEXT)) { - /* Entering from Wakeup */ - kaaMarkSync(pScreen); - } - if ((syncType==DRI_2D_SYNC) && (oldContextType==DRI_NO_CONTEXT) && - (newContextType==DRI_2D_CONTEXT)) { - /* Exiting from Block Handler */ - if (atis->dma_started) - ATIFlushIndirect(atis, 1); - } -} - -static Bool ATIDRIFinishScreenInit(ScreenPtr pScreen); - -/* Initialize the screen-specific data structures for the Radeon or - Rage 128. This is the main entry point to the device-specific - initialization code. It calls device-independent DRI functions to - create the DRI data structures and initialize the DRI state. */ -Bool -ATIDRIScreenInit(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - void *scratch_ptr; - int scratch_int; - DRIInfoPtr pDRIInfo; - int devSareaSize; - drmSetVersion sv; - - if (pScreenPriv->screen->fb[0].depth < 16 || - pScreenPriv->screen->fb[0].bitsPerPixel == 24) { - ErrorF("DRI unsupported at this depth/bpp, disabling.\n"); - return FALSE; - } - - atis->agpMode = 1; - atis->gartSize = 8; - atis->ringSize = 1; - atis->bufSize = 2; - atis->gartTexSize = 1; - atis->DMAusecTimeout = 10000; - - if (atic->drmFd < 0) - return FALSE; - - sv.drm_di_major = -1; - sv.drm_dd_major = -1; - drmSetInterfaceVersion(atic->drmFd, &sv); - if (atic->is_radeon) { - if (sv.drm_dd_major != 1 || sv.drm_dd_minor < 6) { - ErrorF("[dri] radeon kernel module version is %d.%d " - "but version 1.6 or greater is needed.\n", - sv.drm_dd_major, sv.drm_dd_minor); - return FALSE; - } - } else { - if (sv.drm_dd_major != 2 || sv.drm_dd_minor < 2) { - ErrorF("[dri] r128 kernel module version is %d.%d " - "but version 2.2 or greater is needed.\n", - sv.drm_dd_major, sv.drm_dd_minor); - return FALSE; - } - } - - /* Create the DRI data structure, and fill it in before calling the - * DRIScreenInit(). - */ - pDRIInfo = DRICreateInfoRec(); - if (pDRIInfo == NULL) - return FALSE; - - atis->pDRIInfo = pDRIInfo; - pDRIInfo->busIdString = atic->busid; - if (atic->is_radeon) { - pDRIInfo->drmDriverName = "radeon"; - if (atic->is_r100) - pDRIInfo->clientDriverName = "radeon"; - else - pDRIInfo->clientDriverName = "r200"; - } else { - pDRIInfo->drmDriverName = "r128"; - pDRIInfo->clientDriverName = "r128"; - } - pDRIInfo->ddxDriverMajorVersion = 4; - pDRIInfo->ddxDriverMinorVersion = 0; - pDRIInfo->ddxDriverPatchVersion = 0; - pDRIInfo->frameBufferPhysicalAddress = - pScreenPriv->card->attr.address[0] & 0xfc000000; - pDRIInfo->frameBufferSize = pScreenPriv->screen->memory_size; - pDRIInfo->frameBufferStride = pScreenPriv->screen->fb[0].byteStride; - pDRIInfo->ddxDrawableTableEntry = SAREA_MAX_DRAWABLES; - pDRIInfo->maxDrawableTableEntry = SAREA_MAX_DRAWABLES; - - /* For now the mapping works by using a fixed size defined - * in the SAREA header - */ - pDRIInfo->SAREASize = SAREA_MAX; - - if (atic->is_radeon) { - pDRIInfo->devPrivateSize = sizeof(RADEONDRIRec); - devSareaSize = sizeof(RADEONSAREAPriv); - } else { - pDRIInfo->devPrivateSize = sizeof(R128DRIRec); - devSareaSize = sizeof(R128SAREAPriv); - } - - if (sizeof(XF86DRISAREARec) + devSareaSize > SAREA_MAX) { - ErrorF("[dri] Data does not fit in SAREA. Disabling DRI.\n"); - return FALSE; - } - - pDRIInfo->devPrivate = xcalloc(pDRIInfo->devPrivateSize, 1); - if (pDRIInfo->devPrivate == NULL) { - DRIDestroyInfoRec(atis->pDRIInfo); - atis->pDRIInfo = NULL; - return FALSE; - } - - pDRIInfo->contextSize = sizeof(ATIDRIContextRec); - - pDRIInfo->SwapContext = ATIDRISwapContext; - /*pDRIInfo->InitBuffers = R128DRIInitBuffers;*/ /* XXX Appears unnecessary */ - /*pDRIInfo->MoveBuffers = R128DRIMoveBuffers;*/ /* XXX Badness */ - pDRIInfo->bufferRequests = DRI_ALL_WINDOWS; - /*pDRIInfo->TransitionTo2d = R128DRITransitionTo2d; - pDRIInfo->TransitionTo3d = R128DRITransitionTo3d; - pDRIInfo->TransitionSingleToMulti3D = R128DRITransitionSingleToMulti3d; - pDRIInfo->TransitionMultiToSingle3D = R128DRITransitionMultiToSingle3d;*/ - - pDRIInfo->createDummyCtx = TRUE; - pDRIInfo->createDummyCtxPriv = FALSE; - - if (!DRIScreenInit(pScreen, pDRIInfo, &atic->drmFd)) { - ErrorF("[dri] DRIScreenInit failed. Disabling DRI.\n"); - xfree(pDRIInfo->devPrivate); - pDRIInfo->devPrivate = NULL; - DRIDestroyInfoRec(pDRIInfo); - pDRIInfo = NULL; - return FALSE; - } - - /* Add a map for the MMIO registers that will be accessed by any - * DRI-based clients. - */ - atis->registerSize = ATI_REG_SIZE(pScreenPriv->screen->card); - if (drmAddMap(atic->drmFd, ATI_REG_BASE(pScreenPriv->screen->card), - atis->registerSize, DRM_REGISTERS, DRM_READ_ONLY, - &atis->registerHandle) < 0) { - ATIDRICloseScreen(pScreen); - return FALSE; - } - ErrorF("[drm] register handle = 0x%08lx\n", atis->registerHandle); - - /* DRIScreenInit adds the frame buffer map, but we need it as well */ - DRIGetDeviceInfo(pScreen, &atis->fbHandle, &scratch_int, &scratch_int, - &scratch_int, &scratch_int, &scratch_ptr); - - /* Initialize AGP */ - atis->using_agp = atic->is_agp; - if (atic->is_agp && !ATIDRIAgpInit(pScreen)) { - atis->using_agp = FALSE; - ErrorF("[agp] AGP failed to initialize; falling back to PCI mode.\n"); - ErrorF("[agp] Make sure your kernel's AGP support is loaded and functioning.\n"); - } - - /* Initialize PCIGART */ - if (!atis->using_agp && !ATIDRIPciInit(pScreen)) { - ATIDRICloseScreen(pScreen); - return FALSE; - } - -#ifdef GLXEXT - if (!ATIInitVisualConfigs(pScreen)) { - ATIDRICloseScreen(pScreen); - return FALSE; - } - ErrorF("[dri] Visual configs initialized\n"); -#endif - - atis->serverContext = DRIGetContext(pScreen); - - return ATIDRIFinishScreenInit(pScreen); -} - -/* Finish initializing the device-dependent DRI state, and call - DRIFinishScreenInit() to complete the device-independent DRI - initialization. */ -static Bool -R128DRIFinishScreenInit(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - R128SAREAPrivPtr pSAREAPriv; - R128DRIPtr pR128DRI; - int bpp = pScreenPriv->screen->fb[0].bitsPerPixel; - - /* Initialize the kernel data structures */ - if (!R128DRIKernelInit(pScreen)) { - ATIDRICloseScreen(pScreen); - return FALSE; - } - - /* Initialize the vertex buffers list */ - if (!ATIDRIBufInit(pScreen)) { - ATIDRICloseScreen(pScreen); - return FALSE; - } - - /* Initialize IRQ */ - ATIDRIIrqInit(pScreen); - - pSAREAPriv = (R128SAREAPrivPtr)DRIGetSAREAPrivate(pScreen); - memset(pSAREAPriv, 0, sizeof(*pSAREAPriv)); - - pR128DRI = (R128DRIPtr)atis->pDRIInfo->devPrivate; - - pR128DRI->deviceID = pScreenPriv->screen->card->attr.deviceID; - pR128DRI->width = pScreenPriv->screen->width; - pR128DRI->height = pScreenPriv->screen->height; - pR128DRI->depth = pScreenPriv->screen->fb[0].depth; - pR128DRI->bpp = pScreenPriv->screen->fb[0].bitsPerPixel; - - pR128DRI->IsPCI = !atis->using_agp; - pR128DRI->AGPMode = atis->agpMode; - - pR128DRI->frontOffset = atis->frontOffset; - pR128DRI->frontPitch = atis->frontPitch / (bpp / 8); - pR128DRI->backOffset = atis->backOffset; - pR128DRI->backPitch = atis->backPitch / (bpp / 8); - pR128DRI->depthOffset = atis->depthOffset; - pR128DRI->depthPitch = atis->depthPitch / (bpp / 8); - pR128DRI->spanOffset = atis->spanOffset; - pR128DRI->textureOffset = atis->textureOffset; - pR128DRI->textureSize = atis->textureSize; - pR128DRI->log2TexGran = atis->log2TexGran; - - pR128DRI->registerHandle = atis->registerHandle; - pR128DRI->registerSize = atis->registerSize; - - pR128DRI->gartTexHandle = atis->gartTexHandle; - pR128DRI->gartTexMapSize = atis->gartTexMapSize; - pR128DRI->log2AGPTexGran = atis->log2GARTTexGran; - pR128DRI->gartTexOffset = atis->gartTexStart; - pR128DRI->sarea_priv_offset = sizeof(XF86DRISAREARec); - - return TRUE; -} - -/* Finish initializing the device-dependent DRI state, and call - * DRIFinishScreenInit() to complete the device-independent DRI - * initialization. - */ -static Bool -RadeonDRIFinishScreenInit(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - RADEONSAREAPrivPtr pSAREAPriv; - RADEONDRIPtr pRADEONDRI; - drmRadeonMemInitHeap drmHeap; - - /* Initialize the kernel data structures */ - if (!RadeonDRIKernelInit(pScreen)) { - ATIDRICloseScreen(pScreen); - return FALSE; - } - - /* Initialize the vertex buffers list */ - if (!ATIDRIBufInit(pScreen)) { - ATIDRICloseScreen(pScreen); - return FALSE; - } - - /* Initialize IRQ */ - ATIDRIIrqInit(pScreen); - - drmHeap.region = RADEON_MEM_REGION_GART; - drmHeap.start = 0; - drmHeap.size = atis->gartTexMapSize; - - if (drmCommandWrite(atic->drmFd, DRM_RADEON_INIT_HEAP, &drmHeap, - sizeof(drmHeap))) { - ErrorF("[drm] Failed to initialize GART heap manager\n"); - } - - /* Initialize the SAREA private data structure */ - pSAREAPriv = (RADEONSAREAPrivPtr)DRIGetSAREAPrivate(pScreen); - memset(pSAREAPriv, 0, sizeof(*pSAREAPriv)); - - pRADEONDRI = (RADEONDRIPtr)atis->pDRIInfo->devPrivate; - - pRADEONDRI->deviceID = pScreenPriv->screen->card->attr.deviceID; - pRADEONDRI->width = pScreenPriv->screen->width; - pRADEONDRI->height = pScreenPriv->screen->height; - pRADEONDRI->depth = pScreenPriv->screen->fb[0].depth; - pRADEONDRI->bpp = pScreenPriv->screen->fb[0].bitsPerPixel; - - pRADEONDRI->IsPCI = !atis->using_agp; - pRADEONDRI->AGPMode = atis->agpMode; - - pRADEONDRI->frontOffset = atis->frontOffset; - pRADEONDRI->frontPitch = atis->frontPitch; - pRADEONDRI->backOffset = atis->backOffset; - pRADEONDRI->backPitch = atis->backPitch; - pRADEONDRI->depthOffset = atis->depthOffset; - pRADEONDRI->depthPitch = atis->depthPitch; - pRADEONDRI->textureOffset = atis->textureOffset; - pRADEONDRI->textureSize = atis->textureSize; - pRADEONDRI->log2TexGran = atis->log2TexGran; - - pRADEONDRI->registerHandle = atis->registerHandle; - pRADEONDRI->registerSize = atis->registerSize; - - pRADEONDRI->statusHandle = atis->ringReadPtrHandle; - pRADEONDRI->statusSize = atis->ringReadMapSize; - - pRADEONDRI->gartTexHandle = atis->gartTexHandle; - pRADEONDRI->gartTexMapSize = atis->gartTexMapSize; - pRADEONDRI->log2GARTTexGran = atis->log2GARTTexGran; - pRADEONDRI->gartTexOffset = atis->gartTexStart; - - pRADEONDRI->sarea_priv_offset = sizeof(XF86DRISAREARec); - - return TRUE; -} - -static Bool -ATIDRIFinishScreenInit(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo (pScreenPriv); - - atis->pDRIInfo->driverSwapMethod = DRI_HIDE_X_CONTEXT; - - /* NOTE: DRIFinishScreenInit must be called before *DRIKernelInit - * because *DRIKernelInit requires that the hardware lock is held by - * the X server, and the first time the hardware lock is grabbed is - * in DRIFinishScreenInit. - */ - if (!DRIFinishScreenInit(pScreen)) { - ATIDRICloseScreen(pScreen); - return FALSE; - } - - if (atic->is_radeon) { - if (!RadeonDRIFinishScreenInit(pScreen)) { - ATIDRICloseScreen(pScreen); - return FALSE; - } - } else { - if (!R128DRIFinishScreenInit(pScreen)) { - ATIDRICloseScreen(pScreen); - return FALSE; - } - } - - return TRUE; -} - -/* The screen is being closed, so clean up any state and free any - resources used by the DRI. */ -void -ATIDRICloseScreen(ScreenPtr pScreen) -{ - KdScreenPriv (pScreen); - ATIScreenInfo (pScreenPriv); - ATICardInfo (pScreenPriv); - drmR128Init drmR128Info; - drmRadeonInit drmRadeonInfo; - - if (atis->indirectBuffer != NULL) { - /* Flush any remaining commands and free indirect buffers. - * Two steps are used because ATIFlushIndirect gets a - * new buffer after discarding. - */ - ATIFlushIndirect(atis, 1); - ATIDRIDispatchIndirect(atis, 1); - xfree(atis->indirectBuffer); - atis->indirectBuffer = NULL; - atis->indirectStart = 0; - } - ATIDRIDMAStop(atis); - - if (atis->irqEnabled) { - drmCtlUninstHandler(atic->drmFd); - atis->irqEnabled = FALSE; - } - - /* De-allocate vertex buffers */ - if (atis->buffers) { - drmUnmapBufs(atis->buffers); - atis->buffers = NULL; - } - - /* De-allocate all kernel resources */ - if (!atic->is_radeon) { - memset(&drmR128Info, 0, sizeof(drmR128Init)); - drmR128Info.func = DRM_R128_CLEANUP_CCE; - drmCommandWrite(atic->drmFd, DRM_R128_INIT, &drmR128Info, - sizeof(drmR128Init)); - } else { - memset(&drmRadeonInfo, 0, sizeof(drmRadeonInfo)); - drmRadeonInfo.func = DRM_RADEON_CLEANUP_CP; - drmCommandWrite(atic->drmFd, DRM_RADEON_CP_INIT, &drmRadeonInfo, - sizeof(drmR128Init)); - } - - /* De-allocate all AGP resources */ - if (atis->gartTex) { - drmUnmap(atis->gartTex, atis->gartTexMapSize); - atis->gartTex = NULL; - } - if (atis->buf) { - drmUnmap(atis->buf, atis->bufMapSize); - atis->buf = NULL; - } - if (atis->ringReadPtr) { - drmUnmap(atis->ringReadPtr, atis->ringReadMapSize); - atis->ringReadPtr = NULL; - } - if (atis->ring) { - drmUnmap(atis->ring, atis->ringMapSize); - atis->ring = NULL; - } - if (atis->agpMemHandle != DRM_AGP_NO_HANDLE) { - drmAgpUnbind(atic->drmFd, atis->agpMemHandle); - drmAgpFree(atic->drmFd, atis->agpMemHandle); - atis->agpMemHandle = DRM_AGP_NO_HANDLE; - drmAgpRelease(atic->drmFd); - } - if (atis->pciMemHandle) { - drmScatterGatherFree(atic->drmFd, atis->pciMemHandle); - atis->pciMemHandle = 0; - } - - /* De-allocate all DRI resources */ - DRICloseScreen(pScreen); - - /* De-allocate all DRI data structures */ - if (atis->pDRIInfo) { - if (atis->pDRIInfo->devPrivate) { - xfree(atis->pDRIInfo->devPrivate); - atis->pDRIInfo->devPrivate = NULL; - } - DRIDestroyInfoRec(atis->pDRIInfo); - atis->pDRIInfo = NULL; - } - -#ifdef GLXEXT - if (atis->pVisualConfigs) { - xfree(atis->pVisualConfigs); - atis->pVisualConfigs = NULL; - } - if (atis->pVisualConfigsPriv) { - xfree(atis->pVisualConfigsPriv); - atis->pVisualConfigsPriv = NULL; - } -#endif /* GLXEXT */ - atic->drmFd = -1; -} - -void -ATIDRIDMAStart(ATIScreenInfo *atis) -{ - ATICardInfo *atic = atis->atic; - int ret; - - if (atic->is_radeon) - ret = drmCommandNone(atic->drmFd, DRM_RADEON_CP_START); - else - ret = drmCommandNone(atic->drmFd, DRM_R128_CCE_START); - - if (ret == 0) - atis->dma_started = TRUE; - else - FatalError("%s: DMA start returned %d\n", __FUNCTION__, ret); -} - -/* Attempts to idle the DMA engine and stops it. Note that the ioctl is the - * same for both R128 and Radeon, so we can just use the name of one of them. - */ -void -ATIDRIDMAStop(ATIScreenInfo *atis) -{ - ATICardInfo *atic = atis->atic; - drmRadeonCPStop stop; - int ret; - - stop.flush = 1; - stop.idle = 1; - ret = drmCommandWrite(atic->drmFd, DRM_RADEON_CP_STOP, &stop, - sizeof(drmRadeonCPStop)); - - if (ret != 0 && errno == EBUSY) { - ErrorF("Failed to idle the DMA engine\n"); - - stop.idle = 0; - ret = drmCommandWrite(atic->drmFd, DRM_RADEON_CP_STOP, &stop, - sizeof(drmRadeonCPStop)); - } - atis->dma_started = FALSE; -} - -void -ATIDRIDMAReset(ATIScreenInfo *atis) -{ - ATICardInfo *atic = atis->atic; - int ret; - - ret = drmCommandNone(atic->drmFd, atic->is_radeon ? - DRM_RADEON_CP_RESET : DRM_R128_CCE_RESET); - - if (ret != 0) - FatalError("Failed to reset CCE/CP\n"); - - atis->dma_started = FALSE; -} - -/* The R128 and Radeon Indirect ioctls differ only in the ioctl number */ -void -ATIDRIDispatchIndirect(ATIScreenInfo *atis, Bool discard) -{ - ATICardInfo *atic = atis->atic; - drmBufPtr buffer = atis->indirectBuffer->drmBuf; - drmR128Indirect indirect; - int cmd; - - indirect.idx = buffer->idx; - indirect.start = atis->indirectStart; - indirect.end = buffer->used; - indirect.discard = discard; - cmd = atic->is_radeon ? DRM_RADEON_INDIRECT : DRM_R128_INDIRECT; - drmCommandWriteRead(atic->drmFd, cmd, &indirect, - sizeof(drmR128Indirect)); -} - -/* Get an indirect buffer for the DMA 2D acceleration commands */ -drmBufPtr -ATIDRIGetBuffer(ATIScreenInfo *atis) -{ - ATICardInfo *atic = atis->atic; - drmDMAReq dma; - drmBufPtr buf = NULL; - int indx = 0, size = 0, ret = 0; - TIMEOUT_LOCALS; - - dma.context = atis->serverContext; - dma.send_count = 0; - dma.send_list = NULL; - dma.send_sizes = NULL; - dma.flags = 0; - dma.request_count = 1; - if (atic->is_radeon) - dma.request_size = RADEON_BUFFER_SIZE; - else - dma.request_size = R128_BUFFER_SIZE; - dma.request_list = &indx; - dma.request_sizes = &size; - dma.granted_count = 0; - - WHILE_NOT_TIMEOUT(.2) { - ret = drmDMA(atic->drmFd, &dma); - if (ret != -EBUSY) - break; - } - if (TIMEDOUT()) - FatalError("Timeout fetching DMA buffer (card hung)\n"); - if (ret != 0) - FatalError("Error fetching DMA buffer: %d\n", ret); - - buf = &atis->buffers->list[indx]; - buf->used = 0; - return buf; -} diff --git a/hw/kdrive/ati/ati_dri.h b/hw/kdrive/ati/ati_dri.h deleted file mode 100644 index 985f7eb43..000000000 --- a/hw/kdrive/ati/ati_dri.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright © 2003 Eric Anholt - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Eric Anholt not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Eric Anholt makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _ATI_DRI_H_ -#define _ATI_DRI_H_ - -typedef struct { - /* DRI screen private data */ - int deviceID; /* PCI device ID */ - int width; /* Width in pixels of display */ - int height; /* Height in scanlines of display */ - int depth; /* Depth of display (8, 15, 16, 24) */ - int bpp; /* Bit depth of display (8, 16, 24, 32) */ - - int IsPCI; /* Current card is a PCI card */ - int AGPMode; - - int frontOffset; /* Start of front buffer */ - int frontPitch; - int backOffset; /* Start of shared back buffer */ - int backPitch; - int depthOffset; /* Start of shared depth buffer */ - int depthPitch; - int spanOffset; /* Start of scratch spanline */ - int textureOffset; /* Start of texture data in frame buffer */ - int textureSize; - int log2TexGran; - - /* MMIO register data */ - drmHandle registerHandle; - drmSize registerSize; - - /* CCE AGP Texture data */ - drmHandle gartTexHandle; - drmSize gartTexMapSize; - int log2AGPTexGran; - int gartTexOffset; - unsigned int sarea_priv_offset; -} R128DRIRec, *R128DRIPtr; - -typedef struct { - /* DRI screen private data */ - int deviceID; /* PCI device ID */ - int width; /* Width in pixels of display */ - int height; /* Height in scanlines of display */ - int depth; /* Depth of display (8, 15, 16, 24) */ - int bpp; /* Bit depth of display (8, 16, 24, 32) */ - - int IsPCI; /* Current card is a PCI card */ - int AGPMode; - - int frontOffset; /* Start of front buffer */ - int frontPitch; - int backOffset; /* Start of shared back buffer */ - int backPitch; - int depthOffset; /* Start of shared depth buffer */ - int depthPitch; - int textureOffset; /* Start of texture data in frame buffer */ - int textureSize; - int log2TexGran; - - /* MMIO register data */ - drmHandle registerHandle; - drmSize registerSize; - - /* CP in-memory status information */ - drmHandle statusHandle; - drmSize statusSize; - - /* CP GART Texture data */ - drmHandle gartTexHandle; - drmSize gartTexMapSize; - int log2GARTTexGran; - int gartTexOffset; - unsigned int sarea_priv_offset; -} RADEONDRIRec, *RADEONDRIPtr; - -#endif /* _ATI_DRI_H_ */ diff --git a/hw/kdrive/ati/ati_dripriv.h b/hw/kdrive/ati/ati_dripriv.h deleted file mode 100644 index f0e139383..000000000 --- a/hw/kdrive/ati/ati_dripriv.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario, - * Precision Insight, Inc., Cedar Park, Texas, and - * VA Linux Systems Inc., Fremont, California. - * - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation on the rights to use, copy, modify, merge, - * publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, PRECISION INSIGHT, VA LINUX - * SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * Authors: - * Rickard E. Faith - * Kevin E. Martin - * - */ - -#ifndef _ATI_DRIPRIV_H_ -#define _ATI_DRIPRIV_H_ - -#ifdef GLXEXT -#include "GL/glxint.h" - -extern void GlxSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs, - void **configprivs); -#endif - -typedef struct { - /* Nothing here yet */ - int dummy; -} ATIConfigPrivRec, *ATIConfigPrivPtr; - -typedef struct { - /* Nothing here yet */ - int dummy; -} ATIDRIContextRec, *ATIDRIContextPtr; - -#endif diff --git a/hw/kdrive/ati/ati_microcode.c b/hw/kdrive/ati/ati_microcode.c deleted file mode 100644 index f8829e823..000000000 --- a/hw/kdrive/ati/ati_microcode.c +++ /dev/null @@ -1,857 +0,0 @@ -/* r128_cce.c -- ATI Rage 128 driver -*- linux-c -*- - * radeon_cp.c -- CP support for Radeon -*- linux-c -*- - * - * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas. - * Copyright 2000 VA Linux Systems, Inc., Fremont, California. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Kevin E. Martin - * Gareth Hughes - */ - -/* CCE microcode (from ATI) */ - -#include "ati.h" - -CARD32 r128_cce_microcode[] = { - 0, 276838400, 0, 268449792, 2, 142, 2, 145, 0, 1076765731, 0, - 1617039951, 0, 774592877, 0, 1987540286, 0, 2307490946U, 0, - 599558925, 0, 589505315, 0, 596487092, 0, 589505315, 1, - 11544576, 1, 206848, 1, 311296, 1, 198656, 2, 912273422, 11, - 262144, 0, 0, 1, 33559837, 1, 7438, 1, 14809, 1, 6615, 12, 28, - 1, 6614, 12, 28, 2, 23, 11, 18874368, 0, 16790922, 1, 409600, 9, - 30, 1, 147854772, 16, 420483072, 3, 8192, 0, 10240, 1, 198656, - 1, 15630, 1, 51200, 10, 34858, 9, 42, 1, 33559823, 2, 10276, 1, - 15717, 1, 15718, 2, 43, 1, 15936948, 1, 570480831, 1, 14715071, - 12, 322123831, 1, 33953125, 12, 55, 1, 33559908, 1, 15718, 2, - 46, 4, 2099258, 1, 526336, 1, 442623, 4, 4194365, 1, 509952, 1, - 459007, 3, 0, 12, 92, 2, 46, 12, 176, 1, 15734, 1, 206848, 1, - 18432, 1, 133120, 1, 100670734, 1, 149504, 1, 165888, 1, - 15975928, 1, 1048576, 6, 3145806, 1, 15715, 16, 2150645232U, 2, - 268449859, 2, 10307, 12, 176, 1, 15734, 1, 15735, 1, 15630, 1, - 15631, 1, 5253120, 6, 3145810, 16, 2150645232U, 1, 15864, 2, 82, - 1, 343310, 1, 1064207, 2, 3145813, 1, 15728, 1, 7817, 1, 15729, - 3, 15730, 12, 92, 2, 98, 1, 16168, 1, 16167, 1, 16002, 1, 16008, - 1, 15974, 1, 15975, 1, 15990, 1, 15976, 1, 15977, 1, 15980, 0, - 15981, 1, 10240, 1, 5253120, 1, 15720, 1, 198656, 6, 110, 1, - 180224, 1, 103824738, 2, 112, 2, 3145839, 0, 536885440, 1, - 114880, 14, 125, 12, 206975, 1, 33559995, 12, 198784, 0, - 33570236, 1, 15803, 0, 15804, 3, 294912, 1, 294912, 3, 442370, - 1, 11544576, 0, 811612160, 1, 12593152, 1, 11536384, 1, - 14024704, 7, 310382726, 0, 10240, 1, 14796, 1, 14797, 1, 14793, - 1, 14794, 0, 14795, 1, 268679168, 1, 9437184, 1, 268449792, 1, - 198656, 1, 9452827, 1, 1075854602, 1, 1075854603, 1, 557056, 1, - 114880, 14, 159, 12, 198784, 1, 1109409213, 12, 198783, 1, - 1107312059, 12, 198784, 1, 1109409212, 2, 162, 1, 1075854781, 1, - 1073757627, 1, 1075854780, 1, 540672, 1, 10485760, 6, 3145894, - 16, 274741248, 9, 168, 3, 4194304, 3, 4209949, 0, 0, 0, 256, 14, - 174, 1, 114857, 1, 33560007, 12, 176, 0, 10240, 1, 114858, 1, - 33560018, 1, 114857, 3, 33560007, 1, 16008, 1, 114874, 1, - 33560360, 1, 114875, 1, 33560154, 0, 15963, 0, 256, 0, 4096, 1, - 409611, 9, 188, 0, 10240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -CARD32 radeon_cp_microcode[][2] = { - { 0x21007000, 0000000000 }, - { 0x20007000, 0000000000 }, - { 0x000000b4, 0x00000004 }, - { 0x000000b8, 0x00000004 }, - { 0x6f5b4d4c, 0000000000 }, - { 0x4c4c427f, 0000000000 }, - { 0x5b568a92, 0000000000 }, - { 0x4ca09c6d, 0000000000 }, - { 0xad4c4c4c, 0000000000 }, - { 0x4ce1af3d, 0000000000 }, - { 0xd8afafaf, 0000000000 }, - { 0xd64c4cdc, 0000000000 }, - { 0x4cd10d10, 0000000000 }, - { 0x000f0000, 0x00000016 }, - { 0x362f242d, 0000000000 }, - { 0x00000012, 0x00000004 }, - { 0x000f0000, 0x00000016 }, - { 0x362f282d, 0000000000 }, - { 0x000380e7, 0x00000002 }, - { 0x04002c97, 0x00000002 }, - { 0x000f0001, 0x00000016 }, - { 0x333a3730, 0000000000 }, - { 0x000077ef, 0x00000002 }, - { 0x00061000, 0x00000002 }, - { 0x00000021, 0x0000001a }, - { 0x00004000, 0x0000001e }, - { 0x00061000, 0x00000002 }, - { 0x00000021, 0x0000001a }, - { 0x00004000, 0x0000001e }, - { 0x00061000, 0x00000002 }, - { 0x00000021, 0x0000001a }, - { 0x00004000, 0x0000001e }, - { 0x00000017, 0x00000004 }, - { 0x0003802b, 0x00000002 }, - { 0x040067e0, 0x00000002 }, - { 0x00000017, 0x00000004 }, - { 0x000077e0, 0x00000002 }, - { 0x00065000, 0x00000002 }, - { 0x000037e1, 0x00000002 }, - { 0x040067e1, 0x00000006 }, - { 0x000077e0, 0x00000002 }, - { 0x000077e1, 0x00000002 }, - { 0x000077e1, 0x00000006 }, - { 0xffffffff, 0000000000 }, - { 0x10000000, 0000000000 }, - { 0x0003802b, 0x00000002 }, - { 0x040067e0, 0x00000006 }, - { 0x00007675, 0x00000002 }, - { 0x00007676, 0x00000002 }, - { 0x00007677, 0x00000002 }, - { 0x00007678, 0x00000006 }, - { 0x0003802c, 0x00000002 }, - { 0x04002676, 0x00000002 }, - { 0x00007677, 0x00000002 }, - { 0x00007678, 0x00000006 }, - { 0x0000002f, 0x00000018 }, - { 0x0000002f, 0x00000018 }, - { 0000000000, 0x00000006 }, - { 0x00000030, 0x00000018 }, - { 0x00000030, 0x00000018 }, - { 0000000000, 0x00000006 }, - { 0x01605000, 0x00000002 }, - { 0x00065000, 0x00000002 }, - { 0x00098000, 0x00000002 }, - { 0x00061000, 0x00000002 }, - { 0x64c0603e, 0x00000004 }, - { 0x000380e6, 0x00000002 }, - { 0x040025c5, 0x00000002 }, - { 0x00080000, 0x00000016 }, - { 0000000000, 0000000000 }, - { 0x0400251d, 0x00000002 }, - { 0x00007580, 0x00000002 }, - { 0x00067581, 0x00000002 }, - { 0x04002580, 0x00000002 }, - { 0x00067581, 0x00000002 }, - { 0x00000049, 0x00000004 }, - { 0x00005000, 0000000000 }, - { 0x000380e6, 0x00000002 }, - { 0x040025c5, 0x00000002 }, - { 0x00061000, 0x00000002 }, - { 0x0000750e, 0x00000002 }, - { 0x00019000, 0x00000002 }, - { 0x00011055, 0x00000014 }, - { 0x00000055, 0x00000012 }, - { 0x0400250f, 0x00000002 }, - { 0x0000504f, 0x00000004 }, - { 0x000380e6, 0x00000002 }, - { 0x040025c5, 0x00000002 }, - { 0x00007565, 0x00000002 }, - { 0x00007566, 0x00000002 }, - { 0x00000058, 0x00000004 }, - { 0x000380e6, 0x00000002 }, - { 0x040025c5, 0x00000002 }, - { 0x01e655b4, 0x00000002 }, - { 0x4401b0e4, 0x00000002 }, - { 0x01c110e4, 0x00000002 }, - { 0x26667066, 0x00000018 }, - { 0x040c2565, 0x00000002 }, - { 0x00000066, 0x00000018 }, - { 0x04002564, 0x00000002 }, - { 0x00007566, 0x00000002 }, - { 0x0000005d, 0x00000004 }, - { 0x00401069, 0x00000008 }, - { 0x00101000, 0x00000002 }, - { 0x000d80ff, 0x00000002 }, - { 0x0080006c, 0x00000008 }, - { 0x000f9000, 0x00000002 }, - { 0x000e00ff, 0x00000002 }, - { 0000000000, 0x00000006 }, - { 0x0000008f, 0x00000018 }, - { 0x0000005b, 0x00000004 }, - { 0x000380e6, 0x00000002 }, - { 0x040025c5, 0x00000002 }, - { 0x00007576, 0x00000002 }, - { 0x00065000, 0x00000002 }, - { 0x00009000, 0x00000002 }, - { 0x00041000, 0x00000002 }, - { 0x0c00350e, 0x00000002 }, - { 0x00049000, 0x00000002 }, - { 0x00051000, 0x00000002 }, - { 0x01e785f8, 0x00000002 }, - { 0x00200000, 0x00000002 }, - { 0x0060007e, 0x0000000c }, - { 0x00007563, 0x00000002 }, - { 0x006075f0, 0x00000021 }, - { 0x20007073, 0x00000004 }, - { 0x00005073, 0x00000004 }, - { 0x000380e6, 0x00000002 }, - { 0x040025c5, 0x00000002 }, - { 0x00007576, 0x00000002 }, - { 0x00007577, 0x00000002 }, - { 0x0000750e, 0x00000002 }, - { 0x0000750f, 0x00000002 }, - { 0x00a05000, 0x00000002 }, - { 0x00600083, 0x0000000c }, - { 0x006075f0, 0x00000021 }, - { 0x000075f8, 0x00000002 }, - { 0x00000083, 0x00000004 }, - { 0x000a750e, 0x00000002 }, - { 0x000380e6, 0x00000002 }, - { 0x040025c5, 0x00000002 }, - { 0x0020750f, 0x00000002 }, - { 0x00600086, 0x00000004 }, - { 0x00007570, 0x00000002 }, - { 0x00007571, 0x00000002 }, - { 0x00007572, 0x00000006 }, - { 0x000380e6, 0x00000002 }, - { 0x040025c5, 0x00000002 }, - { 0x00005000, 0x00000002 }, - { 0x00a05000, 0x00000002 }, - { 0x00007568, 0x00000002 }, - { 0x00061000, 0x00000002 }, - { 0x00000095, 0x0000000c }, - { 0x00058000, 0x00000002 }, - { 0x0c607562, 0x00000002 }, - { 0x00000097, 0x00000004 }, - { 0x000380e6, 0x00000002 }, - { 0x040025c5, 0x00000002 }, - { 0x00600096, 0x00000004 }, - { 0x400070e5, 0000000000 }, - { 0x000380e6, 0x00000002 }, - { 0x040025c5, 0x00000002 }, - { 0x000380e5, 0x00000002 }, - { 0x000000a8, 0x0000001c }, - { 0x000650aa, 0x00000018 }, - { 0x040025bb, 0x00000002 }, - { 0x000610ab, 0x00000018 }, - { 0x040075bc, 0000000000 }, - { 0x000075bb, 0x00000002 }, - { 0x000075bc, 0000000000 }, - { 0x00090000, 0x00000006 }, - { 0x00090000, 0x00000002 }, - { 0x000d8002, 0x00000006 }, - { 0x00007832, 0x00000002 }, - { 0x00005000, 0x00000002 }, - { 0x000380e7, 0x00000002 }, - { 0x04002c97, 0x00000002 }, - { 0x00007820, 0x00000002 }, - { 0x00007821, 0x00000002 }, - { 0x00007800, 0000000000 }, - { 0x01200000, 0x00000002 }, - { 0x20077000, 0x00000002 }, - { 0x01200000, 0x00000002 }, - { 0x20007000, 0x00000002 }, - { 0x00061000, 0x00000002 }, - { 0x0120751b, 0x00000002 }, - { 0x8040750a, 0x00000002 }, - { 0x8040750b, 0x00000002 }, - { 0x00110000, 0x00000002 }, - { 0x000380e5, 0x00000002 }, - { 0x000000c6, 0x0000001c }, - { 0x000610ab, 0x00000018 }, - { 0x844075bd, 0x00000002 }, - { 0x000610aa, 0x00000018 }, - { 0x840075bb, 0x00000002 }, - { 0x000610ab, 0x00000018 }, - { 0x844075bc, 0x00000002 }, - { 0x000000c9, 0x00000004 }, - { 0x804075bd, 0x00000002 }, - { 0x800075bb, 0x00000002 }, - { 0x804075bc, 0x00000002 }, - { 0x00108000, 0x00000002 }, - { 0x01400000, 0x00000002 }, - { 0x006000cd, 0x0000000c }, - { 0x20c07000, 0x00000020 }, - { 0x000000cf, 0x00000012 }, - { 0x00800000, 0x00000006 }, - { 0x0080751d, 0x00000006 }, - { 0000000000, 0000000000 }, - { 0x0000775c, 0x00000002 }, - { 0x00a05000, 0x00000002 }, - { 0x00661000, 0x00000002 }, - { 0x0460275d, 0x00000020 }, - { 0x00004000, 0000000000 }, - { 0x01e00830, 0x00000002 }, - { 0x21007000, 0000000000 }, - { 0x6464614d, 0000000000 }, - { 0x69687420, 0000000000 }, - { 0x00000073, 0000000000 }, - { 0000000000, 0000000000 }, - { 0x00005000, 0x00000002 }, - { 0x000380d0, 0x00000002 }, - { 0x040025e0, 0x00000002 }, - { 0x000075e1, 0000000000 }, - { 0x00000001, 0000000000 }, - { 0x000380e0, 0x00000002 }, - { 0x04002394, 0x00000002 }, - { 0x00005000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0x00000008, 0000000000 }, - { 0x00000004, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, -}; - -CARD32 r200_cp_microcode[][2] = { - { 0x21007000, 0000000000 }, - { 0x20007000, 0000000000 }, - { 0x000000ab, 0x00000004 }, - { 0x000000af, 0x00000004 }, - { 0x66544a49, 0000000000 }, - { 0x49494174, 0000000000 }, - { 0x54517d83, 0000000000 }, - { 0x498d8b64, 0000000000 }, - { 0x49494949, 0000000000 }, - { 0x49da493c, 0000000000 }, - { 0x49989898, 0000000000 }, - { 0xd34949d5, 0000000000 }, - { 0x9dc90e11, 0000000000 }, - { 0xce9b9b9b, 0000000000 }, - { 0x000f0000, 0x00000016 }, - { 0x352e232c, 0000000000 }, - { 0x00000013, 0x00000004 }, - { 0x000f0000, 0x00000016 }, - { 0x352e272c, 0000000000 }, - { 0x000f0001, 0x00000016 }, - { 0x3239362f, 0000000000 }, - { 0x000077ef, 0x00000002 }, - { 0x00061000, 0x00000002 }, - { 0x00000020, 0x0000001a }, - { 0x00004000, 0x0000001e }, - { 0x00061000, 0x00000002 }, - { 0x00000020, 0x0000001a }, - { 0x00004000, 0x0000001e }, - { 0x00061000, 0x00000002 }, - { 0x00000020, 0x0000001a }, - { 0x00004000, 0x0000001e }, - { 0x00000016, 0x00000004 }, - { 0x0003802a, 0x00000002 }, - { 0x040067e0, 0x00000002 }, - { 0x00000016, 0x00000004 }, - { 0x000077e0, 0x00000002 }, - { 0x00065000, 0x00000002 }, - { 0x000037e1, 0x00000002 }, - { 0x040067e1, 0x00000006 }, - { 0x000077e0, 0x00000002 }, - { 0x000077e1, 0x00000002 }, - { 0x000077e1, 0x00000006 }, - { 0xffffffff, 0000000000 }, - { 0x10000000, 0000000000 }, - { 0x0003802a, 0x00000002 }, - { 0x040067e0, 0x00000006 }, - { 0x00007675, 0x00000002 }, - { 0x00007676, 0x00000002 }, - { 0x00007677, 0x00000002 }, - { 0x00007678, 0x00000006 }, - { 0x0003802b, 0x00000002 }, - { 0x04002676, 0x00000002 }, - { 0x00007677, 0x00000002 }, - { 0x00007678, 0x00000006 }, - { 0x0000002e, 0x00000018 }, - { 0x0000002e, 0x00000018 }, - { 0000000000, 0x00000006 }, - { 0x0000002f, 0x00000018 }, - { 0x0000002f, 0x00000018 }, - { 0000000000, 0x00000006 }, - { 0x01605000, 0x00000002 }, - { 0x00065000, 0x00000002 }, - { 0x00098000, 0x00000002 }, - { 0x00061000, 0x00000002 }, - { 0x64c0603d, 0x00000004 }, - { 0x00080000, 0x00000016 }, - { 0000000000, 0000000000 }, - { 0x0400251d, 0x00000002 }, - { 0x00007580, 0x00000002 }, - { 0x00067581, 0x00000002 }, - { 0x04002580, 0x00000002 }, - { 0x00067581, 0x00000002 }, - { 0x00000046, 0x00000004 }, - { 0x00005000, 0000000000 }, - { 0x00061000, 0x00000002 }, - { 0x0000750e, 0x00000002 }, - { 0x00019000, 0x00000002 }, - { 0x00011055, 0x00000014 }, - { 0x00000055, 0x00000012 }, - { 0x0400250f, 0x00000002 }, - { 0x0000504a, 0x00000004 }, - { 0x00007565, 0x00000002 }, - { 0x00007566, 0x00000002 }, - { 0x00000051, 0x00000004 }, - { 0x01e655b4, 0x00000002 }, - { 0x4401b0dc, 0x00000002 }, - { 0x01c110dc, 0x00000002 }, - { 0x2666705d, 0x00000018 }, - { 0x040c2565, 0x00000002 }, - { 0x0000005d, 0x00000018 }, - { 0x04002564, 0x00000002 }, - { 0x00007566, 0x00000002 }, - { 0x00000054, 0x00000004 }, - { 0x00401060, 0x00000008 }, - { 0x00101000, 0x00000002 }, - { 0x000d80ff, 0x00000002 }, - { 0x00800063, 0x00000008 }, - { 0x000f9000, 0x00000002 }, - { 0x000e00ff, 0x00000002 }, - { 0000000000, 0x00000006 }, - { 0x00000080, 0x00000018 }, - { 0x00000054, 0x00000004 }, - { 0x00007576, 0x00000002 }, - { 0x00065000, 0x00000002 }, - { 0x00009000, 0x00000002 }, - { 0x00041000, 0x00000002 }, - { 0x0c00350e, 0x00000002 }, - { 0x00049000, 0x00000002 }, - { 0x00051000, 0x00000002 }, - { 0x01e785f8, 0x00000002 }, - { 0x00200000, 0x00000002 }, - { 0x00600073, 0x0000000c }, - { 0x00007563, 0x00000002 }, - { 0x006075f0, 0x00000021 }, - { 0x20007068, 0x00000004 }, - { 0x00005068, 0x00000004 }, - { 0x00007576, 0x00000002 }, - { 0x00007577, 0x00000002 }, - { 0x0000750e, 0x00000002 }, - { 0x0000750f, 0x00000002 }, - { 0x00a05000, 0x00000002 }, - { 0x00600076, 0x0000000c }, - { 0x006075f0, 0x00000021 }, - { 0x000075f8, 0x00000002 }, - { 0x00000076, 0x00000004 }, - { 0x000a750e, 0x00000002 }, - { 0x0020750f, 0x00000002 }, - { 0x00600079, 0x00000004 }, - { 0x00007570, 0x00000002 }, - { 0x00007571, 0x00000002 }, - { 0x00007572, 0x00000006 }, - { 0x00005000, 0x00000002 }, - { 0x00a05000, 0x00000002 }, - { 0x00007568, 0x00000002 }, - { 0x00061000, 0x00000002 }, - { 0x00000084, 0x0000000c }, - { 0x00058000, 0x00000002 }, - { 0x0c607562, 0x00000002 }, - { 0x00000086, 0x00000004 }, - { 0x00600085, 0x00000004 }, - { 0x400070dd, 0000000000 }, - { 0x000380dd, 0x00000002 }, - { 0x00000093, 0x0000001c }, - { 0x00065095, 0x00000018 }, - { 0x040025bb, 0x00000002 }, - { 0x00061096, 0x00000018 }, - { 0x040075bc, 0000000000 }, - { 0x000075bb, 0x00000002 }, - { 0x000075bc, 0000000000 }, - { 0x00090000, 0x00000006 }, - { 0x00090000, 0x00000002 }, - { 0x000d8002, 0x00000006 }, - { 0x00005000, 0x00000002 }, - { 0x00007821, 0x00000002 }, - { 0x00007800, 0000000000 }, - { 0x00007821, 0x00000002 }, - { 0x00007800, 0000000000 }, - { 0x01665000, 0x00000002 }, - { 0x000a0000, 0x00000002 }, - { 0x000671cc, 0x00000002 }, - { 0x0286f1cd, 0x00000002 }, - { 0x000000a3, 0x00000010 }, - { 0x21007000, 0000000000 }, - { 0x000000aa, 0x0000001c }, - { 0x00065000, 0x00000002 }, - { 0x000a0000, 0x00000002 }, - { 0x00061000, 0x00000002 }, - { 0x000b0000, 0x00000002 }, - { 0x38067000, 0x00000002 }, - { 0x000a00a6, 0x00000004 }, - { 0x20007000, 0000000000 }, - { 0x01200000, 0x00000002 }, - { 0x20077000, 0x00000002 }, - { 0x01200000, 0x00000002 }, - { 0x20007000, 0000000000 }, - { 0x00061000, 0x00000002 }, - { 0x0120751b, 0x00000002 }, - { 0x8040750a, 0x00000002 }, - { 0x8040750b, 0x00000002 }, - { 0x00110000, 0x00000002 }, - { 0x000380dd, 0x00000002 }, - { 0x000000bd, 0x0000001c }, - { 0x00061096, 0x00000018 }, - { 0x844075bd, 0x00000002 }, - { 0x00061095, 0x00000018 }, - { 0x840075bb, 0x00000002 }, - { 0x00061096, 0x00000018 }, - { 0x844075bc, 0x00000002 }, - { 0x000000c0, 0x00000004 }, - { 0x804075bd, 0x00000002 }, - { 0x800075bb, 0x00000002 }, - { 0x804075bc, 0x00000002 }, - { 0x00108000, 0x00000002 }, - { 0x01400000, 0x00000002 }, - { 0x006000c4, 0x0000000c }, - { 0x20c07000, 0x00000020 }, - { 0x000000c6, 0x00000012 }, - { 0x00800000, 0x00000006 }, - { 0x0080751d, 0x00000006 }, - { 0x000025bb, 0x00000002 }, - { 0x000040c0, 0x00000004 }, - { 0x0000775c, 0x00000002 }, - { 0x00a05000, 0x00000002 }, - { 0x00661000, 0x00000002 }, - { 0x0460275d, 0x00000020 }, - { 0x00004000, 0000000000 }, - { 0x00007999, 0x00000002 }, - { 0x00a05000, 0x00000002 }, - { 0x00661000, 0x00000002 }, - { 0x0460299b, 0x00000020 }, - { 0x00004000, 0000000000 }, - { 0x01e00830, 0x00000002 }, - { 0x21007000, 0000000000 }, - { 0x00005000, 0x00000002 }, - { 0x00038042, 0x00000002 }, - { 0x040025e0, 0x00000002 }, - { 0x000075e1, 0000000000 }, - { 0x00000001, 0000000000 }, - { 0x000380d9, 0x00000002 }, - { 0x04007394, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, -}; - -/* Microcode from http://volodya-project.sourceforge.net/ */ - -CARD32 r300_cp_microcode[][2] = { - { 0x4200e000, 0000000000 }, - { 0x4000e000, 0000000000 }, - { 0x000000af, 0x00000008 }, - { 0x000000b3, 0x00000008 }, - { 0x6c5a504f, 0000000000 }, - { 0x4f4f497a, 0000000000 }, - { 0x5a578288, 0000000000 }, - { 0x4f91906a, 0000000000 }, - { 0x4f4f4f4f, 0000000000 }, - { 0x4fe24f44, 0000000000 }, - { 0x4f9c9c9c, 0000000000 }, - { 0xdc4f4fde, 0000000000 }, - { 0xa1cd4f4f, 0000000000 }, - { 0xd29d9d9d, 0000000000 }, - { 0x4f0f9fd7, 0000000000 }, - { 0x000ca000, 0x00000004 }, - { 0x000d0012, 0x00000038 }, - { 0x0000e8b4, 0x00000004 }, - { 0x000d0014, 0x00000038 }, - { 0x0000e8b6, 0x00000004 }, - { 0x000d0016, 0x00000038 }, - { 0x0000e854, 0x00000004 }, - { 0x000d0018, 0x00000038 }, - { 0x0000e855, 0x00000004 }, - { 0x000d001a, 0x00000038 }, - { 0x0000e856, 0x00000004 }, - { 0x000d001c, 0x00000038 }, - { 0x0000e857, 0x00000004 }, - { 0x000d001e, 0x00000038 }, - { 0x0000e824, 0x00000004 }, - { 0x000d0020, 0x00000038 }, - { 0x0000e825, 0x00000004 }, - { 0x000d0022, 0x00000038 }, - { 0x0000e830, 0x00000004 }, - { 0x000d0024, 0x00000038 }, - { 0x0000f0c0, 0x00000004 }, - { 0x000d0026, 0x00000038 }, - { 0x0000f0c1, 0x00000004 }, - { 0x000d0028, 0x00000038 }, - { 0x0000f041, 0x00000004 }, - { 0x000d002a, 0x00000038 }, - { 0x0000f184, 0x00000004 }, - { 0x000d002c, 0x00000038 }, - { 0x0000f185, 0x00000004 }, - { 0x000d002e, 0x00000038 }, - { 0x0000f186, 0x00000004 }, - { 0x000d0030, 0x00000038 }, - { 0x0000f187, 0x00000004 }, - { 0x000d0032, 0x00000038 }, - { 0x0000f180, 0x00000004 }, - { 0x000d0034, 0x00000038 }, - { 0x0000f393, 0x00000004 }, - { 0x000d0036, 0x00000038 }, - { 0x0000f38a, 0x00000004 }, - { 0x000d0038, 0x00000038 }, - { 0x0000f38e, 0x00000004 }, - { 0x0000e821, 0x00000004 }, - { 0x0140a000, 0x00000004 }, - { 0x00000043, 0x00000018 }, - { 0x00cce800, 0x00000004 }, - { 0x001b0001, 0x00000004 }, - { 0x08004800, 0x00000004 }, - { 0x001b0001, 0x00000004 }, - { 0x08004800, 0x00000004 }, - { 0x001b0001, 0x00000004 }, - { 0x08004800, 0x00000004 }, - { 0x0000003a, 0x00000008 }, - { 0x0000a000, 0000000000 }, - { 0x02c0a000, 0x00000004 }, - { 0x000ca000, 0x00000004 }, - { 0x00130000, 0x00000004 }, - { 0x000c2000, 0x00000004 }, - { 0xc980c045, 0x00000008 }, - { 0x2000451d, 0x00000004 }, - { 0x0000e580, 0x00000004 }, - { 0x000ce581, 0x00000004 }, - { 0x08004580, 0x00000004 }, - { 0x000ce581, 0x00000004 }, - { 0x0000004c, 0x00000008 }, - { 0x0000a000, 0000000000 }, - { 0x000c2000, 0x00000004 }, - { 0x0000e50e, 0x00000004 }, - { 0x00032000, 0x00000004 }, - { 0x00022056, 0x00000028 }, - { 0x00000056, 0x00000024 }, - { 0x0800450f, 0x00000004 }, - { 0x0000a050, 0x00000008 }, - { 0x0000e565, 0x00000004 }, - { 0x0000e566, 0x00000004 }, - { 0x00000057, 0x00000008 }, - { 0x03cca5b4, 0x00000004 }, - { 0x05432000, 0x00000004 }, - { 0x00022000, 0x00000004 }, - { 0x4ccce063, 0x00000030 }, - { 0x08274565, 0x00000004 }, - { 0x00000063, 0x00000030 }, - { 0x08004564, 0x00000004 }, - { 0x0000e566, 0x00000004 }, - { 0x0000005a, 0x00000008 }, - { 0x00802066, 0x00000010 }, - { 0x00202000, 0x00000004 }, - { 0x001b00ff, 0x00000004 }, - { 0x01000069, 0x00000010 }, - { 0x001f2000, 0x00000004 }, - { 0x001c00ff, 0x00000004 }, - { 0000000000, 0x0000000c }, - { 0x00000085, 0x00000030 }, - { 0x0000005a, 0x00000008 }, - { 0x0000e576, 0x00000004 }, - { 0x000ca000, 0x00000004 }, - { 0x00012000, 0x00000004 }, - { 0x00082000, 0x00000004 }, - { 0x1800650e, 0x00000004 }, - { 0x00092000, 0x00000004 }, - { 0x000a2000, 0x00000004 }, - { 0x000f0000, 0x00000004 }, - { 0x00400000, 0x00000004 }, - { 0x00000079, 0x00000018 }, - { 0x0000e563, 0x00000004 }, - { 0x00c0e5f9, 0x000000c2 }, - { 0x0000006e, 0x00000008 }, - { 0x0000a06e, 0x00000008 }, - { 0x0000e576, 0x00000004 }, - { 0x0000e577, 0x00000004 }, - { 0x0000e50e, 0x00000004 }, - { 0x0000e50f, 0x00000004 }, - { 0x0140a000, 0x00000004 }, - { 0x0000007c, 0x00000018 }, - { 0x00c0e5f9, 0x000000c2 }, - { 0x0000007c, 0x00000008 }, - { 0x0014e50e, 0x00000004 }, - { 0x0040e50f, 0x00000004 }, - { 0x00c0007f, 0x00000008 }, - { 0x0000e570, 0x00000004 }, - { 0x0000e571, 0x00000004 }, - { 0x0000e572, 0x0000000c }, - { 0x0000a000, 0x00000004 }, - { 0x0140a000, 0x00000004 }, - { 0x0000e568, 0x00000004 }, - { 0x000c2000, 0x00000004 }, - { 0x00000089, 0x00000018 }, - { 0x000b0000, 0x00000004 }, - { 0x18c0e562, 0x00000004 }, - { 0x0000008b, 0x00000008 }, - { 0x00c0008a, 0x00000008 }, - { 0x000700e4, 0x00000004 }, - { 0x00000097, 0x00000038 }, - { 0x000ca099, 0x00000030 }, - { 0x080045bb, 0x00000004 }, - { 0x000c209a, 0x00000030 }, - { 0x0800e5bc, 0000000000 }, - { 0x0000e5bb, 0x00000004 }, - { 0x0000e5bc, 0000000000 }, - { 0x00120000, 0x0000000c }, - { 0x00120000, 0x00000004 }, - { 0x001b0002, 0x0000000c }, - { 0x0000a000, 0x00000004 }, - { 0x0000e821, 0x00000004 }, - { 0x0000e800, 0000000000 }, - { 0x0000e821, 0x00000004 }, - { 0x0000e82e, 0000000000 }, - { 0x02cca000, 0x00000004 }, - { 0x00140000, 0x00000004 }, - { 0x000ce1cc, 0x00000004 }, - { 0x050de1cd, 0x00000004 }, - { 0x000000a7, 0x00000020 }, - { 0x4200e000, 0000000000 }, - { 0x000000ae, 0x00000038 }, - { 0x000ca000, 0x00000004 }, - { 0x00140000, 0x00000004 }, - { 0x000c2000, 0x00000004 }, - { 0x00160000, 0x00000004 }, - { 0x700ce000, 0x00000004 }, - { 0x001400aa, 0x00000008 }, - { 0x4000e000, 0000000000 }, - { 0x02400000, 0x00000004 }, - { 0x400ee000, 0x00000004 }, - { 0x02400000, 0x00000004 }, - { 0x4000e000, 0000000000 }, - { 0x000c2000, 0x00000004 }, - { 0x0240e51b, 0x00000004 }, - { 0x0080e50a, 0x00000005 }, - { 0x0080e50b, 0x00000005 }, - { 0x00220000, 0x00000004 }, - { 0x000700e4, 0x00000004 }, - { 0x000000c1, 0x00000038 }, - { 0x000c209a, 0x00000030 }, - { 0x0880e5bd, 0x00000005 }, - { 0x000c2099, 0x00000030 }, - { 0x0800e5bb, 0x00000005 }, - { 0x000c209a, 0x00000030 }, - { 0x0880e5bc, 0x00000005 }, - { 0x000000c4, 0x00000008 }, - { 0x0080e5bd, 0x00000005 }, - { 0x0000e5bb, 0x00000005 }, - { 0x0080e5bc, 0x00000005 }, - { 0x00210000, 0x00000004 }, - { 0x02800000, 0x00000004 }, - { 0x00c000c8, 0x00000018 }, - { 0x4180e000, 0x00000040 }, - { 0x000000ca, 0x00000024 }, - { 0x01000000, 0x0000000c }, - { 0x0100e51d, 0x0000000c }, - { 0x000045bb, 0x00000004 }, - { 0x000080c4, 0x00000008 }, - { 0x0000f3ce, 0x00000004 }, - { 0x0140a000, 0x00000004 }, - { 0x00cc2000, 0x00000004 }, - { 0x08c053cf, 0x00000040 }, - { 0x00008000, 0000000000 }, - { 0x0000f3d2, 0x00000004 }, - { 0x0140a000, 0x00000004 }, - { 0x00cc2000, 0x00000004 }, - { 0x08c053d3, 0x00000040 }, - { 0x00008000, 0000000000 }, - { 0x0000f39d, 0x00000004 }, - { 0x0140a000, 0x00000004 }, - { 0x00cc2000, 0x00000004 }, - { 0x08c0539e, 0x00000040 }, - { 0x00008000, 0000000000 }, - { 0x03c00830, 0x00000004 }, - { 0x4200e000, 0000000000 }, - { 0x0000a000, 0x00000004 }, - { 0x200045e0, 0x00000004 }, - { 0x0000e5e1, 0000000000 }, - { 0x00000001, 0000000000 }, - { 0x000700e1, 0x00000004 }, - { 0x0800e394, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, - { 0000000000, 0000000000 }, -}; diff --git a/hw/kdrive/ati/ati_reg.h b/hw/kdrive/ati/ati_reg.h deleted file mode 100644 index 3089cba04..000000000 --- a/hw/kdrive/ati/ati_reg.h +++ /dev/null @@ -1,1927 +0,0 @@ -/* - * Copyright © 2003 Eric Anholt - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Eric Anholt not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Eric Anholt makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -/* Many of the Radeon and Rage 128 registers are the same. - * ATI_ should denote registers and values that are common for R128 and Radeon. - * - * The information in this file comes from many sources, including the Rage 128 - * DDK, Rage 128 register reference, the XFree86 and kernel Rage 128 and Radeon - * register definition headers, and bits from the Radeon DDK and RV200 register - * specs supplied by others. - */ - -#define ATI_REG_CLOCK_CNTL_INDEX 0x0008 -# define ATI_PLL_WR_EN (1 << 7) -# define ATI_PLL_DIV_SEL (3 << 8) - -#define ATI_REG_CLOCK_CNTL_DATA 0x000c - -#define ATI_REG_BUS_CNTL 0x0030 -# define ATI_BUS_MASTER_DIS (1 << 6) - -#define ATI_REG_GEN_INT_CNTL 0x0040 - -#define ATI_REG_GEN_CNTL 0x0050 -# define ATI_CRTC_DBL_SCAN_EN (1 << 0) /* 0x00000001 */ -# define ATI_CRTC_INTERLACE_EN (1 << 1) /* 0x00000002 */ -# define ATI_CRTC_CSYNC_EN (1 << 4) /* 0x00000010 */ -# define ATI_CRTC_PIX_WIDTH_MASK (7 << 8) /* 0x00000700 */ -# define ATI_CRTC_CUR_EN (1 << 16) /* 0x00010000 */ -# define ATI_CRTC_CUR_MODE_MASK (7 << 17) /* 0x000e0000 */ -# define ATI_CRTC_ICON_EN (1 << 20) /* 0x00100000 */ -# define ATI_CRTC_ARGB_EN (2 << 20) /* 0x00200000 */ -# define ATI_CRTC_EXT_DISP_EN (1 << 24) /* 0x01000000 */ -# define ATI_CRTC_EN (1 << 25) /* 0x02000000 */ -# define ATI_CRTC_DISP_REQ_EN_B (1 << 26) /* 0x04000000 */ - -#define ATI_REG_CRTC_EXT_CNTL 0x0054 -# define ATI_CRTC_EN (1 << 25) -# define ATI_CRTC_VGA_XOVERSCAN (1 << 0) -# define ATI_VGA_ATI_LINEAR (1 << 3) -# define ATI_XCRT_CNT_EN (1 << 6) -# define ATI_CRTC_HSYNC_DIS (1 << 8) -# define ATI_CRTC_VSYNC_DIS (1 << 9) -# define ATI_CRTC_DISPLAY_DIS (1 << 10) -# define RADEON_CRTC_SYNC_TRISTAT (1 << 11) -# define ATI_CRTC_CRT_ON (1 << 15) -# define R128_FP_OUT_EN (1 << 22) -# define R128_FP_ACTIVE (1 << 23) - -#define ATI_REG_DAC_CNTL 0x0058 -# define ATI_DAC_RANGE_CNTL (3 << 0) -# define ATI_DAC_BLANKING (1 << 2) -# define R128_DAC_CRT_SEL_CRTC2 (1 << 4) -# define ATI_DAC_CMP_EN (1 << 3) -# define R128_DAC_PALETTE_ACC_CTL (1 << 5) -# define ATI_DAC_CMP_OUTPUT (1 << 7) -# define ATI_DAC_8BIT_EN (1 << 8) -# define ATI_DAC_VGA_ADR_EN (1 << 13) -# define ATI_DAC_PDWN (1 << 15) -# define ATI_DAC_MASK_ALL (0xff << 24) - -#define ATI_REG_I2C_CNTL_1 0x0094 - -#define R128_REG_GEN_RESET_CNTL 0x00f0 -# define R128_SOFT_RESET_GUI (1 << 0) -# define R128_SOFT_RESET_VCLK (1 << 8) -# define R128_SOFT_RESET_PCLK (1 << 9) -# define R128_SOFT_RESET_DISPENG_XCLK (1 << 11) -# define R128_SOFT_RESET_MEMCTLR_XCLK (1 << 12) - -#define RADEON_REG_RBBM_SOFT_RESET 0x00f0 -# define RADEON_SOFT_RESET_CP (1 << 0) -# define RADEON_SOFT_RESET_HI (1 << 1) -# define RADEON_SOFT_RESET_SE (1 << 2) -# define RADEON_SOFT_RESET_RE (1 << 3) -# define RADEON_SOFT_RESET_PP (1 << 4) -# define RADEON_SOFT_RESET_E2 (1 << 5) -# define RADEON_SOFT_RESET_RB (1 << 6) -# define RADEON_SOFT_RESET_HDP (1 << 7) - -#define RADEON_REG_HOST_PATH_CNTL 0x0130 -# define RADEON_HDP_SOFT_RESET (1 << 26) - -#define ATI_REG_AGP_BASE 0x0170 - -#define ATI_REG_AGP_CNTL 0x0174 -# define R128_AGP_APER_SIZE_256MB (0x00 << 0) -# define R128_AGP_APER_SIZE_128MB (0x20 << 0) -# define R128_AGP_APER_SIZE_64MB (0x30 << 0) -# define R128_AGP_APER_SIZE_32MB (0x38 << 0) -# define R128_AGP_APER_SIZE_16MB (0x3c << 0) -# define R128_AGP_APER_SIZE_8MB (0x3e << 0) -# define R128_AGP_APER_SIZE_4MB (0x3f << 0) -# define R128_AGP_APER_SIZE_MASK (0x3f << 0) -# define RADEON_PENDING_SLOTS_VAL 0x00060000 -# define RADEON_PENDING_SLOTS_SEL 0x00080000 - -#define R128_REG_PCI_GART_PAGE 0x017c - -#define R128_REG_PC_NGUI_CTLSTAT 0x0184 -# define R128_PC_FLUSH_GUI (3 << 0) -# define R128_PC_RI_GUI (1 << 2) -# define R128_PC_FLUSH_ALL 0x00ff -# define R128_PC_BUSY (1 << 31) - -#define R128_REG_VIPH_CONTROL 0x01d0 - -#define ATI_REG_CRTC_H_TOTAL_DISP 0x0200 -#define ATI_REG_CRTC2_H_TOTAL_DISP 0x0300 -# define ATI_CRTC_H_TOTAL (0x01ff << 0) -# define ATI_CRTC_H_TOTAL_SHIFT 0 -# define ATI_CRTC_H_DISP (0x00ff << 16) -# define ATI_CRTC_H_DISP_SHIFT 16 - -#define ATI_REG_CRTC_H_SYNC_STRT_WID 0x0204 -#define ATI_REG_CRTC2_H_SYNC_STRT_WID 0x0304 -# define RADEON_CRTC_H_SYNC_STRT_PIX (0x07 << 0) -# define RADEON_CRTC_H_SYNC_STRT_CHAR (0x3ff << 3) -# define RADEON_CRTC_H_SYNC_STRT_CHAR_SHIFT 3 -# define RADEON_CRTC_H_SYNC_WID (0x3f << 16) -# define RADEON_CRTC_H_SYNC_WID_SHIFT 16 -# define RADEON_CRTC_H_SYNC_POL (1 << 23) - -#define ATI_REG_CRTC_OFFSET 0x0224 -#define ATI_REG_CRTC2_OFFSET 0x0324 -#define ATI_REG_CRTC_OFFSET_CNTL 0x0228 -#define ATI_REG_CRTC2_OFFSET_CNTL 0x0328 -#define ATI_REG_CRTC_PITCH 0x022c -#define ATI_REG_CRTC2_PITCH 0x032c - -#define ATI_REG_OVR_CLR 0x0230 -#define ATI_REG_OVR_WID_LEFT_RIGHT 0x0234 -#define ATI_REG_OVR_WID_TOP_BOTTOM 0x0238 - -#define ATI_REG_CUR_OFFSET 0x0260 -#define ATI_REG_CUR_HORZ_VERT_POSN 0x0264 -#define ATI_REG_CUR_HORZ_VERT_OFF 0x0268 -# define ATI_CUR_LOCK (1 << 31) -# define ATI_CURSOR_WIDTH 64 -# define ATI_CURSOR_HEIGHT 64 -# define ATI_CURSOR_PITCH 16 - -#define ATI_REG_CUR_CLR0 0x026c -#define ATI_REG_CUR_CLR1 0x0270 -#define ATI_REG_OV0_SCALE_CNTL 0x0420 -#define ATI_REG_SUBPIC_CNTL 0x0540 -#define ATI_REG_CAP0_TRIG_CNTL 0x0950 -#define RADEON_REG_VIPH_CONTROL 0x0c50 - -#define RADEON_REG_RBBM_STATUS 0x0e40 -# define RADEON_RBBM_FIFOCNT_MASK 0x007f -# define RADEON_RBBM_ACTIVE (1 << 31) - -#define ATI_REG_CCE_RB_BASE 0x0700 - -#define R128_REG_PM4_BUFFER_CNTL 0x0704 -# define R128_PM4_IN_FRAME_BUFFER (1 << 26) -# define R128_PM4_BUFFER_CNTL_NOUPDATE (1 << 27) -# define R128_PM4_NONPM4 (0 << 28) -# define R128_PM4_192PIO (1 << 28) -# define R128_PM4_192BM (2 << 28) -# define R128_PM4_128PIO_64INDBM (3 << 28) -# define R128_PM4_128BM_64INDBM (4 << 28) -# define R128_PM4_64PIO_128INDBM (5 << 28) -# define R128_PM4_64BM_128INDBM (6 << 28) -# define R128_PM4_64PIO_64VCBM_64INDBM (7 << 28) -# define R128_PM4_64BM_64VCBM_64INDBM (8 << 28) -# define R128_PM4_64PIO_64VCPIO_64INDPIO (15 << 28) - -#define RADEON_REG_CP_RB_CNTL 0x0704 - -#define R128_REG_PM4_BUFFER_WM_CNTL 0x0708 -# define R128_WMA_SHIFT 0 -# define R128_WMB_SHIFT 8 -# define R128_WMC_SHIFT 16 -# define R128_WB_WM_SHIFT 24 - -#define ATI_REG_CCE_RPTR_ADDR 0x070c -#define ATI_REG_CCE_RPTR 0x0710 -#define ATI_REG_CCE_WPTR 0x0714 -# define R128_PM4_BUFFER_DL_DONE (1 << 31) - -#define R128_REG_PM4_VC_FPU_SETUP 0x071c -# define R128_FRONT_DIR_CW (0 << 0) -# define R128_FRONT_DIR_CCW (1 << 0) -# define R128_FRONT_DIR_MASK (1 << 0) -# define R128_BACKFACE_CULL (0 << 1) -# define R128_BACKFACE_POINTS (1 << 1) -# define R128_BACKFACE_LINES (2 << 1) -# define R128_BACKFACE_SOLID (3 << 1) -# define R128_BACKFACE_MASK (3 << 1) -# define R128_FRONTFACE_CULL (0 << 3) -# define R128_FRONTFACE_POINTS (1 << 3) -# define R128_FRONTFACE_LINES (2 << 3) -# define R128_FRONTFACE_SOLID (3 << 3) -# define R128_FRONTFACE_MASK (3 << 3) -# define R128_FPU_COLOR_SOLID (0 << 5) -# define R128_FPU_COLOR_FLAT (1 << 5) -# define R128_FPU_COLOR_GOURAUD (2 << 5) -# define R128_FPU_COLOR_GOURAUD2 (3 << 5) -# define R128_FPU_COLOR_MASK (3 << 5) -# define R128_FPU_SUB_PIX_2BITS (0 << 7) -# define R128_FPU_SUB_PIX_4BITS (1 << 7) -# define R128_FPU_MODE_2D (0 << 8) -# define R128_FPU_MODE_3D (1 << 8) -# define R128_TRAP_BITS_DISABLE (1 << 9) -# define R128_EDGE_ANTIALIAS (1 << 10) -# define R128_SUPERSAMPLE (1 << 11) -# define R128_XFACTOR_2 (0 << 12) -# define R128_XFACTOR_4 (1 << 12) -# define R128_YFACTOR_2 (0 << 13) -# define R128_YFACTOR_4 (1 << 13) -# define R128_FLAT_SHADE_VERTEX_D3D (0 << 14) -# define R128_FLAT_SHADE_VERTEX_OGL (1 << 14) -# define R128_FPU_ROUND_TRUNCATE (0 << 15) -# define R128_FPU_ROUND_NEAREST (1 << 15) -# define R128_WM_SEL_8DW (0 << 16) -# define R128_WM_SEL_16DW (1 << 16) -# define R128_WM_SEL_32DW (2 << 16) - -#define R128_REG_PM4_IW_INDOFF 0x0738 -#define R128_REG_PM4_IW_INDSIZE 0x073c - -#define RADEON_REG_CP_CSQ_CNTL 0x0740 -# define RADEON_CSQ_CNT_PRIMARY_MASK 0x000000ff -# define RADEON_CSQ_CNT_INDIRECT_MASK 0x0000ff00 -# define R200_CSQ_CNT_PRIMARY_MASK 0x000001ff -# define R200_CSQ_CNT_INDIRECT_MASK 0x0003fe00 -# define RADEON_CSQ_PRIDIS_INDDIS (0 << 28) -# define RADEON_CSQ_PRIPIO_INDDIS (1 << 28) -# define RADEON_CSQ_PRIBM_INDDIS (2 << 28) -# define RADEON_CSQ_PRIPIO_INDBM (3 << 28) -# define RADEON_CSQ_PRIBM_INDBM (4 << 28) -# define RADEON_CSQ_PRIPIO_INDPIO (15 << 28) - -#define R128_REG_PM4_STAT 0x07b8 -# define R128_PM4_FIFOCNT_MASK 0x00000fff -# define R128_PM4_BUSY (1 << 16) -# define R128_PM4_GUI_ACTIVE (1 << 31) - -#define RADEON_REG_CP_STAT 0x07c0 -# define RADEON_CSQ_PRIMARY_BUSY (1 << 10) -# define RADEON_CSQ_INDIRECT_BUSY (1 << 11) - -#define RADEON_REG_ME_CNTL 0x07d0 -# define RADEON_ME_MODE_FREE_RUN (1 << 30) - -#define ATI_REG_MICROCODE_RAM_ADDR 0x07d4 -#define ATI_REG_MICROCODE_RAM_RADDR 0x07d8 -#define ATI_REG_MICROCODE_RAM_DATAH 0x07dc -#define ATI_REG_MICROCODE_RAM_DATAL 0x07e0 -#define R128_REG_PM4_BUFFER_ADDR 0x07f0 - -#define RADEON_REG_CP_CSQ_STAT 0x07f8 -# define RADEON_CSQ_RPTR_PRIMARY_MASK (0xff << 0) -# define RADEON_CSQ_WPTR_PRIMARY_MASK (0xff << 8) -# define RADEON_CSQ_RPTR_INDIRECT_MASK (0xff << 16) -# define RADEON_CSQ_WPTR_INDIRECT_MASK (0xff << 24) -# define R200_CSQ_RPTR_PRIMARY_MASK (0x1ff << 0) -# define R200_CSQ_WPTR_PRIMARY_MASK (0x1ff << 9) - -#define R128_REG_PM4_MICRO_CNTL 0x07fc -# define R128_PM4_MICRO_FREERUN (1 << 30) - -#define RADEON_TV_MASTER_CNTL 0x0800 -# define RADEON_TV_MACROVISION (1 << 5) -# define RADEON_TVCLK_ALWAYS_ON (1 << 30) - -#define R128_REG_BM_CHUNK_0_VAL 0x0a18 -# define R128_BM_PTR_FORCE_TO_PCI (1 << 21) -# define R128_BM_PM4_RD_FORCE_TO_PCI (1 << 22) -# define R128_BM_GLOBAL_FORCE_TO_PCI (1 << 23) - -/* Offset of the PCI config space mirror */ -#define ATI_PCI_CFG_OFFSET 0x0f00 - -#define ATI_REG_PCI_CFG_STATUS 0x0f06 -# define ATI_CAP_LIST 0x0010 - -#define ATI_REG_PCI_CFG_CAPABILITIES_PTR 0x0f34 -# define ATI_CAP_PTR_MASK 0x00fc -# define ATI_CAP_ID_NULL 0x0000 /* End of capability list */ -# define ATI_CAP_ID_AGP 0x0002 /* AGP capability ID */ - -#define R128_REG_AGP_STATUS 0x0f54 /* PCI */ -# define R128_AGP_1X_MODE 0x01 -# define R128_AGP_2X_MODE 0x02 -# define R128_AGP_4X_MODE 0x04 -# define R128_AGP_MODE_MASK 0x07 - -#define R128_REG_AGP_COMMAND 0x0f58 -# define R128_AGP_ENABLE (1 << 8) - -#define RADEON_REG_AGP_STATUS 0x0f5c /* PCI */ -# define RADEON_AGP_1X_MODE 0x01 -# define RADEON_AGP_2X_MODE 0x02 -# define RADEON_AGP_4X_MODE 0x04 -# define RADEON_AGP_FW_MODE 0x10 -# define RADEON_AGP_MODE_MASK 0x17 - -#define RADEON_REG_AGP_COMMAND 0x0f60 -# define RADEON_AGP_ENABLE (1 << 8) - -#define R128_REG_PM4_FIFO_DATA_EVEN 0x1000 -#define R128_REG_PM4_FIFO_DATA_ODD 0x1004 - -#define RADEON_REG_CSQ_APER_PRIMARY 0x1000 -#define RADEON_REG_CSQ_APER_PRIMARY_END 0x11fc -#define RADEON_REG_CSQ_APER_INDIRECT 0x1300 -#define RADEON_REG_CSQ_APER_INDIRECT_END 0x13fc -#define ATI_REG_SRC_PITCH_OFFSET 0x1428 -#define ATI_REG_DST_PITCH_OFFSET 0x142c -#define ATI_REG_SRC_Y_X 0x1434 -#define ATI_REG_DST_Y_X 0x1438 -#define ATI_REG_DST_HEIGHT_WIDTH 0x143c - -#define ATI_REG_DP_GUI_MASTER_CNTL 0x146c -# define ATI_GMC_SRC_PITCH_OFFSET_CNTL (1 << 0) -# define ATI_GMC_DST_PITCH_OFFSET_CNTL (1 << 1) -# define ATI_GMC_SRC_CLIPPING (1 << 2) -# define ATI_GMC_DST_CLIPPING (1 << 3) -# define ATI_GMC_BRUSH_SOLID_COLOR (13 << 4) -# define ATI_GMC_BRUSH_NONE (15 << 4) -# define ATI_GMC_BRUSH_MASK (15 << 4) -# define ATI_GMC_DST_DATATYPE_MASK (0xf << 8) -# define ATI_GMC_SRC_DATATYPE_COLOR (3 << 12) -# define R128_GMC_CONVERSION_TEMP (1 << 15) -# define R128_GMC_CONVERSION_TEMP_6500 (0 << 15) -# define R128_GMC_CONVERSION_TEMP_9300 (1 << 15) -# define ATI_GMC_ROP3_MASK (0xff << 16) -# define ATI_DP_SRC_SOURCE_MEMORY (2 << 24) -# define ATI_DP_SRC_SOURCE_HOST_DATA (3 << 24) -# define R128_GMC_3D_FCN_EN (1 << 27) -# define ATI_GMC_CLR_CMP_CNTL_DIS (1 << 28) -# define R128_GMC_AUX_CLIP_DIS (1 << 29) -# define ATI_GMC_WR_MSK_DIS (1 << 30) -# define R128_GMC_LD_BRUSH_Y_X (1 << 31) - -#define ATI_REG_DP_BRUSH_FRGD_CLR 0x147c -#define ATI_REG_DST_WIDTH_HEIGHT 0x1598 -#define ATI_REG_CLR_CMP_CNTL 0x15c0 - -#define R128_REG_AUX_SC_CNTL 0x1660 -# define R128_AUX1_SC_ENB (1 << 0) -# define R128_AUX1_SC_MODE_SUB (1 << 1) -# define R128_AUX2_SC_ENB (1 << 0) -# define R128_AUX2_SC_MODE_SUB (1 << 1) -# define R128_AUX3_SC_ENB (1 << 0) -# define R128_AUX3_SC_MODE_SUB (1 << 1) - -#define R128_REG_AUX1_SC_LEFT 0x1664 -#define R128_REG_AUX1_SC_RIGHT 0x1668 -#define R128_REG_AUX1_SC_TOP 0x166c -#define R128_REG_AUX1_SC_BOTTOM 0x1670 -#define R128_REG_AUX2_SC_LEFT 0x1674 -#define R128_REG_AUX2_SC_RIGHT 0x1678 -#define R128_REG_AUX2_SC_TOP 0x167c -#define R128_REG_AUX2_SC_BOTTOM 0x1680 -#define R128_REG_AUX3_SC_LEFT 0x1684 -#define R128_REG_AUX3_SC_RIGHT 0x1688 -#define R128_REG_AUX3_SC_TOP 0x168c -#define R128_REG_AUX3_SC_BOTTOM 0x1690 - -#define ATI_REG_DP_CNTL 0x16c0 -# define ATI_DST_X_LEFT_TO_RIGHT (1 << 0) -# define ATI_DST_Y_TOP_TO_BOTTOM (1 << 1) - -#define ATI_REG_DP_MIX 0x16c8 -#define ATI_REG_DP_WRITE_MASK 0x16cc -#define ATI_REG_DEFAULT_OFFSET 0x16e0 -#define ATI_REG_DEFAULT_PITCH 0x16e4 - -#define ATI_REG_DEFAULT_SC_BOTTOM_RIGHT 0x16e8 -# define ATI_DEFAULT_SC_RIGHT_MAX 0x00001fff -# define ATI_DEFAULT_SC_BOTTOM_MAX 0x1fff0000 - -#define ATI_REG_SC_TOP_LEFT 0x16ec -#define ATI_REG_SC_BOTTOM_RIGHT 0x16f0 - -#define ATI_REG_WAIT_UNTIL 0x1720 -# define ATI_WAIT_CRTC_PFLIP (1 << 0) -# define ATI_WAIT_RE_CRTC_VLINE (1 << 1) -# define ATI_WAIT_FE_CRTC_VLINE (1 << 2) -# define ATI_WAIT_CRTC_VLINE (1 << 3) -# define ATI_WAIT_DMA_VIPH0_IDLE (1 << 4) -# define ATI_WAIT_DMA_VIPH1_IDLE (1 << 5) -# define ATI_WAIT_DMA_VIPH2_IDLE (1 << 6) -# define ATI_WAIT_DMA_VIPH3_IDLE (1 << 7) -# define ATI_WAIT_DMA_VID_IDLE (1 << 8) -# define ATI_WAIT_DMA_GUI_IDLE (1 << 9) -# define ATI_WAIT_CMDFIFO (1 << 10) -# define ATI_WAIT_OV0_FLIP (1 << 11) -# define RADEON_WAIT_OV0_SLICEDONE (1 << 12) -# define RADEON_WAIT_2D_IDLE (1 << 14) -# define RADEON_WAIT_3D_IDLE (1 << 15) -# define RADEON_WAIT_2D_IDLECLEAN (1 << 16) -# define RADEON_WAIT_3D_IDLECLEAN (1 << 17) -# define RADEON_WAIT_HOST_IDLECLEAN (1 << 18) -# define ATI_WAIT_CMDFIFO_ENTRIES (0x07f00000) -# define RADEON_WAIT_BOTH_CRTC_PFLIP (1 << 30) -# define RADEON_ENG_DISPLAY_SELECT (1 << 31) - -#define RADEON_REG_ISYNC_CNTL 0x1724 -#define ISYNC_ANY2D_IDLE3D 0x1 -#define ISYNC_ANY3D_IDLE2D 0x2 - -#define R128_REG_GUI_STAT 0x1740 -# define R128_GUI_ACTIVE (1 << 31) - -#define R128_REG_PC_GUI_MODE 0x1744 -#define R128_PC_GUI_PRIORITY (1 << 0) -#define R128_PC_RISE_DF_EN (1 << 1) -#define R128_PC_FALL_DF_EN (1 << 2) -#define R128_PC_BYPASS_EN (1 << 3) -#define R128_PC_CACHE_SIZE (1 << 4) -#define R128_PC_IGNORE_UNIFY (1 << 5) -#define R128_PC_IGNORE_WRHINT (1 << 6) -#define R128_PC_IGNORE_RDHINT (1 << 7) -#define R128_PC_RISE_DP_EN (1 << 8) - -#define R128_REG_PC_GUI_CTLSTAT 0x1748 -/* bits match R128_REG_PC_NGUI_CTLSTAT */ - -#define R128_REG_TEX_CNTL 0x1800 -#define R128_REG_SECONDARY_SCALE_OFFSET 0x1980 -#define R128_REG_SECONDARY_SCALE_PITCH 0x1980 -#define R128_REG_SECONDARY_SCALE_X_INC 0x1984 -#define R128_REG_SECONDARY_SCALE_Y_INC 0x1988 -#define R128_REG_SECONDARY_SCALE_HACC 0x198c -#define R128_REG_SECONDARY_SCALE_VACC 0x1990 -#define R128_REG_SCALE_SRC_HEIGHT_WIDTH 0x1994 -#define R128_REG_SCALE_OFFSET_0 0x1998 -#define R128_REG_SCALE_PITCH 0x199c -#define R128_REG_SCALE_X_INC 0x19a0 -#define R128_REG_SCALE_Y_INC 0x19a4 -#define R128_REG_SCALE_HACC 0x19a8 -#define R128_REG_SCALE_VACC 0x19ac -#define R128_REG_SCALE_DST_X_Y 0x19b0 -#define R128_REG_SCALE_DST_HEIGHT_WIDTH 0x19b4 - -#define R128_REG_SCALE_3D_CNTL 0x1a00 -# define R128_SCALE_DITHER_ERR_DIFF (0 << 1) -# define R128_SCALE_DITHER_TABLE (1 << 1) -# define R128_TEX_CACHE_SIZE_FULL (0 << 2) -# define R128_TEX_CACHE_SIZE_HALF (1 << 2) -# define R128_DITHER_INIT_CURR (0 << 3) -# define R128_DITHER_INIT_RESET (1 << 3) -# define R128_ROUND_24BIT (1 << 4) -# define R128_TEX_CACHE_DISABLE (1 << 5) -# define R128_SCALE_3D_NOOP (0 << 6) -# define R128_SCALE_3D_SCALE (1 << 6) -# define R128_SCALE_3D_TEXMAP_SHADE (2 << 6) -# define R128_SCALE_PIX_BLEND (0 << 8) -# define R128_SCALE_PIX_REPLICATE (1 << 8) -# define R128_TEX_CACHE_SPLIT (1 << 9) -# define R128_APPLE_YUV_MODE (1 << 10) -# define R128_TEX_CACHE_PALLETE_MODE (1 << 11) -# define R128_ALPHA_COMB_ADD_CLAMP (0 << 12) -# define R128_ALPHA_COMB_ADD_NCLAMP (1 << 12) -# define R128_ALPHA_COMB_SUB_DST_SRC_CLAMP (2 << 12) -# define R128_ALPHA_COMB_SUB_DST_SRC_NCLAMP (3 << 12) -# define R128_FOG_TABLE (1 << 14) -# define R128_SIGNED_DST_CLAMP (1 << 15) -/* Alpha bits from R128_REG_MISC_3D_CNTL */ -# define R128_COMPOSITE_SHADOW_CMP_EQUAL (0 << 28) -# define R128_COMPOSITE_SHADOW_CMP_NEQUAL (1 << 28) -# define R128_COMPOSITE_SHADOW (1 << 29) -# define R128_TEX_MAP_ALPHA_IN_TEXTURE (1 << 30) -# define R128_TEX_CACHE_LINE_SIZE_8QW (0 << 31) -# define R128_TEX_CACHE_LINE_SIZE_4QW (1 << 31) - -#define R128_REG_SCALE_3D_DATATYPE 0x1a20 - -#define R128_REG_SETUP_CNTL 0x1bc4 -# define R128_DONT_START_TRIANGLE (1 << 0) -# define R128_Z_BIAS (0 << 1) -# define R128_DONT_START_ANY_ON (1 << 2) -# define R128_COLOR_SOLID_COLOR (0 << 3) -# define R128_COLOR_FLAT_VERT_1 (1 << 3) -# define R128_COLOR_FLAT_VERT_2 (2 << 3) -# define R128_COLOR_FLAT_VERT_3 (3 << 3) -# define R128_COLOR_GOURAUD (4 << 3) -# define R128_PRIM_TYPE_TRI (0 << 7) -# define R128_PRIM_TYPE_LINE (1 << 7) -# define R128_PRIM_TYPE_POINT (2 << 7) -# define R128_PRIM_TYPE_POLY_EDGE (3 << 7) -# define R128_TEXTURE_ST_MULT_W (0 << 9) -# define R128_TEXTURE_ST_DIRECT (1 << 9) -# define R128_STARTING_VERTEX_1 (1 << 14) -# define R128_STARTING_VERTEX_2 (2 << 14) -# define R128_STARTING_VERTEX_3 (3 << 14) -# define R128_ENDING_VERTEX_1 (1 << 16) -# define R128_ENDING_VERTEX_2 (2 << 16) -# define R128_ENDING_VERTEX_3 (3 << 16) -# define R128_SU_POLY_LINE_LAST (0 << 18) -# define R128_SU_POLY_LINE_NOT_LAST (1 << 18) -# define R128_SUB_PIX_2BITS (0 << 19) -# define R128_SUB_PIX_4BITS (1 << 19) -# define R128_SET_UP_CONTINUE (1 << 31) - -#define R128_REG_WINDOW_XY_OFFSET 0x1bcc - -#define RADEON_REG_RB3D_BLENDCNTL 0x1c20 -# define RADEON_COMB_FCN_MASK (3 << 12) -# define RADEON_COMB_FCN_ADD_CLAMP (0 << 12) -# define RADEON_COMB_FCN_ADD_NOCLAMP (1 << 12) -# define RADEON_COMB_FCN_SUB_CLAMP (2 << 12) -# define RADEON_COMB_FCN_SUB_NOCLAMP (3 << 12) -# define R200_COMB_FCN_MIN (4 << 12) -# define R200_COMB_FCN_MAX (5 << 12) -# define R200_COMB_FCN_RSUB_CLAMP (6 << 12) -# define R200_COMB_FCN_RSUB_NOCLAMP (7 << 12) -# define RADEON_SBLEND_GL_ZERO (32 << 16) -# define RADEON_SBLEND_GL_ONE (33 << 16) -# define RADEON_SBLEND_GL_SRC_COLOR (34 << 16) -# define RADEON_SBLEND_GL_INV_SRC_COLOR (35 << 16) -# define RADEON_SBLEND_GL_DST_COLOR (36 << 16) -# define RADEON_SBLEND_GL_INV_DST_COLOR (37 << 16) -# define RADEON_SBLEND_GL_SRC_ALPHA (38 << 16) -# define RADEON_SBLEND_GL_INV_SRC_ALPHA (39 << 16) -# define RADEON_SBLEND_GL_DST_ALPHA (40 << 16) -# define RADEON_SBLEND_GL_INV_DST_ALPHA (41 << 16) -# define RADEON_SBLEND_GL_SRC_ALPHA_SATURATE (42 << 16) -# define R200_SBLEND_GL_CONST_COLOR (43 << 16) -# define R200_SBLEND_GL_ONE_MINUS_CONST_COLOR (44 << 16) -# define R200_SBLEND_GL_CONST_ALPHA (45 << 16) -# define R200_SBLEND_GL_ONE_MINUS_CONST_ALPHA (46 << 16) -# define RADEON_SBLEND_MASK (63 << 16) -# define RADEON_DBLEND_GL_ZERO (32 << 24) -# define RADEON_DBLEND_GL_ONE (33 << 24) -# define RADEON_DBLEND_GL_SRC_COLOR (34 << 24) -# define RADEON_DBLEND_GL_INV_SRC_COLOR (35 << 24) -# define RADEON_DBLEND_GL_DST_COLOR (36 << 24) -# define RADEON_DBLEND_GL_INV_DST_COLOR (37 << 24) -# define RADEON_DBLEND_GL_SRC_ALPHA (38 << 24) -# define RADEON_DBLEND_GL_INV_SRC_ALPHA (39 << 24) -# define RADEON_DBLEND_GL_DST_ALPHA (40 << 24) -# define RADEON_DBLEND_GL_INV_DST_ALPHA (41 << 24) -# define R200_DBLEND_GL_CONST_COLOR (43 << 24) -# define R200_DBLEND_GL_ONE_MINUS_CONST_COLOR (44 << 24) -# define R200_DBLEND_GL_CONST_ALPHA (45 << 24) -# define R200_DBLEND_GL_ONE_MINUS_CONST_ALPHA (46 << 24) -# define RADEON_DBLEND_MASK (63 << 24) - -#define RADEON_REG_PP_CNTL 0x1c38 -# define RADEON_STIPPLE_ENABLE (1 << 0) -# define RADEON_SCISSOR_ENABLE (1 << 1) -# define RADEON_PATTERN_ENABLE (1 << 2) -# define RADEON_SHADOW_ENABLE (1 << 3) -# define RADEON_TEX_ENABLE_MASK (0xf << 4) -# define RADEON_TEX_0_ENABLE (1 << 4) -# define RADEON_TEX_1_ENABLE (1 << 5) -# define RADEON_TEX_2_ENABLE (1 << 6) -# define RADEON_TEX_3_ENABLE (1 << 7) -# define R200_TEX_4_ENABLE (1 << 8) -# define R200_TEX_5_ENABLE (1 << 9) -# define RADEON_TEX_BLEND_ENABLE_MASK (0xf << 12) -# define RADEON_TEX_BLEND_0_ENABLE (1 << 12) -# define RADEON_TEX_BLEND_1_ENABLE (1 << 13) -# define RADEON_TEX_BLEND_2_ENABLE (1 << 14) -# define RADEON_TEX_BLEND_3_ENABLE (1 << 15) -# define R200_TEX_BLEND_4_ENABLE (1 << 16) -# define R200_TEX_BLEND_5_ENABLE (1 << 17) -# define R200_TEX_BLEND_6_ENABLE (1 << 18) -# define RADEON_PLANAR_YUV_ENABLE (1 << 20) -# define RADEON_SPECULAR_ENABLE (1 << 21) -# define RADEON_FOG_ENABLE (1 << 22) -# define RADEON_ALPHA_TEST_ENABLE (1 << 23) -# define RADEON_ANTI_ALIAS_NONE (0 << 24) -# define RADEON_ANTI_ALIAS_LINE (1 << 24) -# define RADEON_ANTI_ALIAS_POLY (2 << 24) -# define RADEON_ANTI_ALIAS_LINE_POLY (3 << 24) -# define RADEON_BUMP_MAP_ENABLE (1 << 26) -# define RADEON_BUMPED_MAP_T0 (0 << 27) -# define RADEON_BUMPED_MAP_T1 (1 << 27) -# define RADEON_BUMPED_MAP_T2 (2 << 27) -# define RADEON_TEX_3D_ENABLE_0 (1 << 29) -# define RADEON_TEX_3D_ENABLE_1 (1 << 30) -# define RADEON_MC_ENABLE (1 << 31) - -#define RADEON_REG_RB3D_CNTL 0x1c3c -# define RADEON_ALPHA_BLEND_ENABLE (1 << 0) -# define RADEON_PLANE_MASK_ENABLE (1 << 1) -# define RADEON_DITHER_ENABLE (1 << 2) -# define RADEON_ROUND_ENABLE (1 << 3) -# define RADEON_SCALE_DITHER_ENABLE (1 << 4) -# define RADEON_DITHER_INIT (1 << 5) -# define RADEON_ROP_ENABLE (1 << 6) -# define RADEON_STENCIL_ENABLE (1 << 7) -# define RADEON_Z_ENABLE (1 << 8) -# define RADEON_DEPTH_XZ_OFFEST_ENABLE (1 << 9) -# define RADEON_COLOR_FORMAT_ARGB1555 (3 << 10) -# define RADEON_COLOR_FORMAT_RGB565 (4 << 10) -# define RADEON_COLOR_FORMAT_ARGB8888 (6 << 10) -# define RADEON_COLOR_FORMAT_RGB332 (7 << 10) -# define RADEON_COLOR_FORMAT_Y8 (8 << 10) -# define RADEON_COLOR_FORMAT_RGB8 (9 << 10) -# define RADEON_COLOR_FORMAT_YUV422_VYUY (11 << 10) -# define RADEON_COLOR_FORMAT_YUV422_YVYU (12 << 10) -# define RADEON_COLOR_FORMAT_aYUV444 (14 << 10) -# define RADEON_COLOR_FORMAT_ARGB4444 (15 << 10) -# define RADEON_CLRCMP_FLIP_ENABLE (1 << 14) - -#define RADEON_REG_RB3D_COLOROFFSET 0x1c40 -# define RADEON_COLOROFFSET_MASK 0xfffffff0 - -#define RADEON_REG_RE_WIDTH_HEIGHT 0x1c44 - -#define RADEON_REG_RB3D_COLORPITCH 0x1c48 -# define RADEON_COLORPITCH_MASK 0x000001ff8 -# define RADEON_COLOR_TILE_ENABLE (1 << 16) -# define RADEON_COLOR_MICROTILE_ENABLE (1 << 17) -# define RADEON_COLOR_ENDIAN_NO_SWAP (0 << 18) -# define RADEON_COLOR_ENDIAN_WORD_SWAP (1 << 18) -# define RADEON_COLOR_ENDIAN_DWORD_SWAP (2 << 18) - -#define RADEON_REG_SE_CNTL 0x1c4c -# define RADEON_FFACE_CULL_CW (0 << 0) -# define RADEON_FFACE_CULL_CCW (1 << 0) -# define RADEON_FFACE_CULL_DIR_MASK (1 << 0) -# define RADEON_BFACE_CULL (0 << 1) -# define RADEON_BFACE_SOLID (3 << 1) -# define RADEON_FFACE_CULL (0 << 3) -# define RADEON_FFACE_SOLID (3 << 3) -# define RADEON_FFACE_CULL_MASK (3 << 3) -# define RADEON_BADVTX_CULL_DISABLE (1 << 5) -# define RADEON_FLAT_SHADE_VTX_0 (0 << 6) -# define RADEON_FLAT_SHADE_VTX_1 (1 << 6) -# define RADEON_FLAT_SHADE_VTX_2 (2 << 6) -# define RADEON_FLAT_SHADE_VTX_LAST (3 << 6) -# define RADEON_DIFFUSE_SHADE_SOLID (0 << 8) -# define RADEON_DIFFUSE_SHADE_FLAT (1 << 8) -# define RADEON_DIFFUSE_SHADE_GOURAUD (2 << 8) -# define RADEON_DIFFUSE_SHADE_MASK (3 << 8) -# define RADEON_ALPHA_SHADE_SOLID (0 << 10) -# define RADEON_ALPHA_SHADE_FLAT (1 << 10) -# define RADEON_ALPHA_SHADE_GOURAUD (2 << 10) -# define RADEON_ALPHA_SHADE_MASK (3 << 10) -# define RADEON_SPECULAR_SHADE_SOLID (0 << 12) -# define RADEON_SPECULAR_SHADE_FLAT (1 << 12) -# define RADEON_SPECULAR_SHADE_GOURAUD (2 << 12) -# define RADEON_SPECULAR_SHADE_MASK (3 << 12) -# define RADEON_FOG_SHADE_SOLID (0 << 14) -# define RADEON_FOG_SHADE_FLAT (1 << 14) -# define RADEON_FOG_SHADE_GOURAUD (2 << 14) -# define RADEON_FOG_SHADE_MASK (3 << 14) -# define RADEON_ZBIAS_ENABLE_POINT (1 << 16) -# define RADEON_ZBIAS_ENABLE_LINE (1 << 17) -# define RADEON_ZBIAS_ENABLE_TRI (1 << 18) -# define RADEON_WIDELINE_ENABLE (1 << 20) -# define RADEON_VPORT_XY_XFORM_ENABLE (1 << 24) -# define RADEON_VPORT_Z_XFORM_ENABLE (1 << 25) -# define RADEON_VTX_PIX_CENTER_D3D (0 << 27) -# define RADEON_VTX_PIX_CENTER_OGL (1 << 27) -# define RADEON_ROUND_MODE_TRUNC (0 << 28) -# define RADEON_ROUND_MODE_ROUND (1 << 28) -# define RADEON_ROUND_MODE_ROUND_EVEN (2 << 28) -# define RADEON_ROUND_MODE_ROUND_ODD (3 << 28) -# define RADEON_ROUND_PREC_16TH_PIX (0 << 30) -# define RADEON_ROUND_PREC_8TH_PIX (1 << 30) -# define RADEON_ROUND_PREC_4TH_PIX (2 << 30) -# define RADEON_ROUND_PREC_HALF_PIX (3 << 30) - -#define R200_REG_RE_CNTL 0x1c50 - -#define RADEON_REG_SE_COORD_FMT 0x1c50 -# define RADEON_VTX_XY_PRE_MULT_1_OVER_W0 (1 << 0) -# define RADEON_VTX_Z_PRE_MULT_1_OVER_W0 (1 << 1) -# define RADEON_VTX_ST0_NONPARAMETRIC (1 << 8) -# define RADEON_VTX_ST1_NONPARAMETRIC (1 << 9) -# define RADEON_VTX_ST2_NONPARAMETRIC (1 << 10) -# define RADEON_VTX_ST3_NONPARAMETRIC (1 << 11) -# define RADEON_VTX_W0_NORMALIZE (1 << 12) -# define RADEON_VTX_W0_IS_NOT_1_OVER_W0 (1 << 16) -# define RADEON_VTX_ST0_PRE_MULT_1_OVER_W0 (1 << 17) -# define RADEON_VTX_ST1_PRE_MULT_1_OVER_W0 (1 << 19) -# define RADEON_VTX_ST2_PRE_MULT_1_OVER_W0 (1 << 21) -# define RADEON_VTX_ST3_PRE_MULT_1_OVER_W0 (1 << 23) -# define RADEON_TEX1_W_ROUTING_USE_W0 (0 << 26) -# define RADEON_TEX1_W_ROUTING_USE_Q1 (1 << 26) - -#define RADEON_REG_PP_TXFILTER_0 0x1c54 -#define RADEON_REG_PP_TXFILTER_1 0x1c6c -#define RADEON_REG_PP_TXFILTER_2 0x1c84 -# define RADEON_MAG_FILTER_NEAREST (0 << 0) -# define RADEON_MAG_FILTER_LINEAR (1 << 0) -# define RADEON_MAG_FILTER_MASK (1 << 0) -# define RADEON_MIN_FILTER_NEAREST (0 << 1) -# define RADEON_MIN_FILTER_LINEAR (1 << 1) -# define RADEON_MIN_FILTER_NEAREST_MIP_NEAREST (2 << 1) -# define RADEON_MIN_FILTER_NEAREST_MIP_LINEAR (3 << 1) -# define RADEON_MIN_FILTER_LINEAR_MIP_NEAREST (6 << 1) -# define RADEON_MIN_FILTER_LINEAR_MIP_LINEAR (7 << 1) -# define RADEON_MIN_FILTER_ANISO_NEAREST (8 << 1) -# define RADEON_MIN_FILTER_ANISO_LINEAR (9 << 1) -# define RADEON_MIN_FILTER_ANISO_NEAREST_MIP_NEAREST (10 << 1) -# define RADEON_MIN_FILTER_ANISO_NEAREST_MIP_LINEAR (11 << 1) -# define RADEON_MIN_FILTER_MASK (15 << 1) -# define RADEON_MAX_ANISO_1_TO_1 (0 << 5) -# define RADEON_MAX_ANISO_2_TO_1 (1 << 5) -# define RADEON_MAX_ANISO_4_TO_1 (2 << 5) -# define RADEON_MAX_ANISO_8_TO_1 (3 << 5) -# define RADEON_MAX_ANISO_16_TO_1 (4 << 5) -# define RADEON_MAX_ANISO_MASK (7 << 5) -# define RADEON_LOD_BIAS_MASK (0xff << 8) -# define RADEON_LOD_BIAS_SHIFT 8 -# define RADEON_MAX_MIP_LEVEL_MASK (0x0f << 16) -# define RADEON_MAX_MIP_LEVEL_SHIFT 16 -# define RADEON_YUV_TO_RGB (1 << 20) -# define RADEON_YUV_TEMPERATURE_COOL (0 << 21) -# define RADEON_YUV_TEMPERATURE_HOT (1 << 21) -# define RADEON_YUV_TEMPERATURE_MASK (1 << 21) -# define RADEON_WRAPEN_S (1 << 22) -# define RADEON_CLAMP_S_WRAP (0 << 23) -# define RADEON_CLAMP_S_MIRROR (1 << 23) -# define RADEON_CLAMP_S_CLAMP_LAST (2 << 23) -# define RADEON_CLAMP_S_MIRROR_CLAMP_LAST (3 << 23) -# define RADEON_CLAMP_S_CLAMP_BORDER (4 << 23) -# define RADEON_CLAMP_S_MIRROR_CLAMP_BORDER (5 << 23) -# define RADEON_CLAMP_S_CLAMP_GL (6 << 23) -# define RADEON_CLAMP_S_MIRROR_CLAMP_GL (7 << 23) -# define RADEON_CLAMP_S_MASK (7 << 23) -# define RADEON_WRAPEN_T (1 << 26) -# define RADEON_CLAMP_T_WRAP (0 << 27) -# define RADEON_CLAMP_T_MIRROR (1 << 27) -# define RADEON_CLAMP_T_CLAMP_LAST (2 << 27) -# define RADEON_CLAMP_T_MIRROR_CLAMP_LAST (3 << 27) -# define RADEON_CLAMP_T_CLAMP_BORDER (4 << 27) -# define RADEON_CLAMP_T_MIRROR_CLAMP_BORDER (5 << 27) -# define RADEON_CLAMP_T_CLAMP_GL (6 << 27) -# define RADEON_CLAMP_T_MIRROR_CLAMP_GL (7 << 27) -# define RADEON_CLAMP_T_MASK (7 << 27) -# define RADEON_BORDER_MODE_OGL (0 << 31) -# define RADEON_BORDER_MODE_D3D (1 << 31) - -#define RADEON_REG_PP_TXFORMAT_0 0x1c58 -#define RADEON_REG_PP_TXFORMAT_1 0x1c70 -#define RADEON_REG_PP_TXFORMAT_2 0x1c88 -# define RADEON_TXFORMAT_I8 (0 << 0) -# define RADEON_TXFORMAT_AI88 (1 << 0) -# define RADEON_TXFORMAT_RGB332 (2 << 0) -# define RADEON_TXFORMAT_ARGB1555 (3 << 0) -# define RADEON_TXFORMAT_RGB565 (4 << 0) -# define RADEON_TXFORMAT_ARGB4444 (5 << 0) -# define RADEON_TXFORMAT_ARGB8888 (6 << 0) -# define RADEON_TXFORMAT_RGBA8888 (7 << 0) -# define RADEON_TXFORMAT_Y8 (8 << 0) -# define RADEON_TXFORMAT_AYUV444 (9 << 0) -# define RADEON_TXFORMAT_VYUY422 (10 << 0) -# define RADEON_TXFORMAT_YVYU422 (11 << 0) -# define RADEON_TXFORMAT_DXT1 (12 << 0) -# define RADEON_TXFORMAT_DXT23 (14 << 0) -# define RADEON_TXFORMAT_DXT45 (15 << 0) -# define RADEON_TXFORMAT_FORMAT_MASK (31 << 0) -# define RADEON_TXFORMAT_FORMAT_SHIFT 0 -# define RADEON_TXFORMAT_APPLE_YUV_MODE (1 << 5) -# define RADEON_TXFORMAT_ALPHA_IN_MAP (1 << 6) -# define RADEON_TXFORMAT_NON_POWER2 (1 << 7) -# define RADEON_TXFORMAT_WIDTH_MASK (15 << 8) -# define RADEON_TXFORMAT_WIDTH_SHIFT 8 -# define RADEON_TXFORMAT_HEIGHT_MASK (15 << 12) -# define RADEON_TXFORMAT_HEIGHT_SHIFT 12 -# define RADEON_TXFORMAT_F5_WIDTH_MASK (15 << 16) -# define RADEON_TXFORMAT_F5_WIDTH_SHIFT 16 -# define RADEON_TXFORMAT_F5_HEIGHT_MASK (15 << 20) -# define RADEON_TXFORMAT_F5_HEIGHT_SHIFT 20 -# define RADEON_TXFORMAT_ST_ROUTE_STQ0 (0 << 24) -# define RADEON_TXFORMAT_ST_ROUTE_STQ1 (1 << 24) -# define RADEON_TXFORMAT_ST_ROUTE_STQ2 (2 << 24) -# define RADEON_TXFORMAT_ST_ROUTE_MASK (3 << 24) -# define RADEON_TXFORMAT_ENDIAN_NO_SWAP (0 << 26) -# define RADEON_TXFORMAT_ENDIAN_16BPP_SWAP (1 << 26) -# define RADEON_TXFORMAT_ENDIAN_32BPP_SWAP (2 << 26) -# define RADEON_TXFORMAT_ENDIAN_HALFDW_SWAP (3 << 26) -# define RADEON_TXFORMAT_ALPHA_MASK_ENABLE (1 << 28) -# define RADEON_TXFORMAT_CHROMA_KEY_ENABLE (1 << 29) -# define RADEON_TXFORMAT_CUBIC_MAP_ENABLE (1 << 30) -# define RADEON_TXFORMAT_PERSPECTIVE_ENABLE (1 << 31) - -#define RADEON_REG_PP_TXOFFSET_0 0x1c5c -#define RADEON_REG_PP_TXOFFSET_1 0x1c74 -#define RADEON_REG_PP_TXOFFSET_2 0x1c8c -# define RADEON_TXO_ENDIAN_NO_SWAP (0 << 0) -# define RADEON_TXO_ENDIAN_BYTE_SWAP (1 << 0) -# define RADEON_TXO_ENDIAN_WORD_SWAP (2 << 0) -# define RADEON_TXO_ENDIAN_HALFDW_SWAP (3 << 0) -# define RADEON_TXO_MACRO_LINEAR (0 << 2) -# define RADEON_TXO_MACRO_TILE (1 << 2) -# define RADEON_TXO_MICRO_LINEAR (0 << 3) -# define RADEON_TXO_MICRO_TILE_X2 (1 << 3) -# define RADEON_TXO_MICRO_TILE_OPT (2 << 3) -# define RADEON_TXO_OFFSET_MASK 0xffffffe0 -# define RADEON_TXO_OFFSET_SHIFT 5 - -#define RADEON_REG_PP_TXCBLEND_0 0x1c60 -#define RADEON_REG_PP_TXCBLEND_1 0x1c78 -#define RADEON_REG_PP_TXCBLEND_2 0x1c90 -# define RADEON_COLOR_ARG_A_SHIFT 0 -# define RADEON_COLOR_ARG_A_MASK (0x1f << 0) -# define RADEON_COLOR_ARG_A_ZERO (0 << 0) -# define RADEON_COLOR_ARG_A_CURRENT_COLOR (2 << 0) -# define RADEON_COLOR_ARG_A_CURRENT_ALPHA (3 << 0) -# define RADEON_COLOR_ARG_A_DIFFUSE_COLOR (4 << 0) -# define RADEON_COLOR_ARG_A_DIFFUSE_ALPHA (5 << 0) -# define RADEON_COLOR_ARG_A_SPECULAR_COLOR (6 << 0) -# define RADEON_COLOR_ARG_A_SPECULAR_ALPHA (7 << 0) -# define RADEON_COLOR_ARG_A_TFACTOR_COLOR (8 << 0) -# define RADEON_COLOR_ARG_A_TFACTOR_ALPHA (9 << 0) -# define RADEON_COLOR_ARG_A_T0_COLOR (10 << 0) -# define RADEON_COLOR_ARG_A_T0_ALPHA (11 << 0) -# define RADEON_COLOR_ARG_A_T1_COLOR (12 << 0) -# define RADEON_COLOR_ARG_A_T1_ALPHA (13 << 0) -# define RADEON_COLOR_ARG_A_T2_COLOR (14 << 0) -# define RADEON_COLOR_ARG_A_T2_ALPHA (15 << 0) -# define RADEON_COLOR_ARG_A_T3_COLOR (16 << 0) -# define RADEON_COLOR_ARG_A_T3_ALPHA (17 << 0) -# define RADEON_COLOR_ARG_B_SHIFT 5 -# define RADEON_COLOR_ARG_B_MASK (0x1f << 5) -# define RADEON_COLOR_ARG_B_ZERO (0 << 5) -# define RADEON_COLOR_ARG_B_CURRENT_COLOR (2 << 5) -# define RADEON_COLOR_ARG_B_CURRENT_ALPHA (3 << 5) -# define RADEON_COLOR_ARG_B_DIFFUSE_COLOR (4 << 5) -# define RADEON_COLOR_ARG_B_DIFFUSE_ALPHA (5 << 5) -# define RADEON_COLOR_ARG_B_SPECULAR_COLOR (6 << 5) -# define RADEON_COLOR_ARG_B_SPECULAR_ALPHA (7 << 5) -# define RADEON_COLOR_ARG_B_TFACTOR_COLOR (8 << 5) -# define RADEON_COLOR_ARG_B_TFACTOR_ALPHA (9 << 5) -# define RADEON_COLOR_ARG_B_T0_COLOR (10 << 5) -# define RADEON_COLOR_ARG_B_T0_ALPHA (11 << 5) -# define RADEON_COLOR_ARG_B_T1_COLOR (12 << 5) -# define RADEON_COLOR_ARG_B_T1_ALPHA (13 << 5) -# define RADEON_COLOR_ARG_B_T2_COLOR (14 << 5) -# define RADEON_COLOR_ARG_B_T2_ALPHA (15 << 5) -# define RADEON_COLOR_ARG_B_T3_COLOR (16 << 5) -# define RADEON_COLOR_ARG_B_T3_ALPHA (17 << 5) -# define RADEON_COLOR_ARG_C_SHIFT 10 -# define RADEON_COLOR_ARG_C_MASK (0x1f << 10) -# define RADEON_COLOR_ARG_C_ZERO (0 << 10) -# define RADEON_COLOR_ARG_C_CURRENT_COLOR (2 << 10) -# define RADEON_COLOR_ARG_C_CURRENT_ALPHA (3 << 10) -# define RADEON_COLOR_ARG_C_DIFFUSE_COLOR (4 << 10) -# define RADEON_COLOR_ARG_C_DIFFUSE_ALPHA (5 << 10) -# define RADEON_COLOR_ARG_C_SPECULAR_COLOR (6 << 10) -# define RADEON_COLOR_ARG_C_SPECULAR_ALPHA (7 << 10) -# define RADEON_COLOR_ARG_C_TFACTOR_COLOR (8 << 10) -# define RADEON_COLOR_ARG_C_TFACTOR_ALPHA (9 << 10) -# define RADEON_COLOR_ARG_C_T0_COLOR (10 << 10) -# define RADEON_COLOR_ARG_C_T0_ALPHA (11 << 10) -# define RADEON_COLOR_ARG_C_T1_COLOR (12 << 10) -# define RADEON_COLOR_ARG_C_T1_ALPHA (13 << 10) -# define RADEON_COLOR_ARG_C_T2_COLOR (14 << 10) -# define RADEON_COLOR_ARG_C_T2_ALPHA (15 << 10) -# define RADEON_COLOR_ARG_C_T3_COLOR (16 << 10) -# define RADEON_COLOR_ARG_C_T3_ALPHA (17 << 10) -# define RADEON_COMP_ARG_A (1 << 15) -# define RADEON_COMP_ARG_A_SHIFT 15 -# define RADEON_COMP_ARG_B (1 << 16) -# define RADEON_COMP_ARG_B_SHIFT 16 -# define RADEON_COMP_ARG_C (1 << 17) -# define RADEON_COMP_ARG_C_SHIFT 17 -# define RADEON_BLEND_CTL_MASK (7 << 18) -# define RADEON_BLEND_CTL_ADD (0 << 18) -# define RADEON_BLEND_CTL_SUBTRACT (1 << 18) -# define RADEON_BLEND_CTL_ADDSIGNED (2 << 18) -# define RADEON_BLEND_CTL_BLEND (3 << 18) -# define RADEON_BLEND_CTL_DOT3 (4 << 18) -# define RADEON_SCALE_SHIFT 21 -# define RADEON_SCALE_MASK (3 << 21) -# define RADEON_SCALE_1X (0 << 21) -# define RADEON_SCALE_2X (1 << 21) -# define RADEON_SCALE_4X (2 << 21) -# define RADEON_CLAMP_TX (1 << 23) -# define RADEON_T0_EQ_TCUR (1 << 24) -# define RADEON_T1_EQ_TCUR (1 << 25) -# define RADEON_T2_EQ_TCUR (1 << 26) -# define RADEON_T3_EQ_TCUR (1 << 27) -# define RADEON_COLOR_ARG_MASK 0x1f -# define RADEON_COMP_ARG_SHIFT 15 - -#define RADEON_REG_PP_TXABLEND_0 0x1c64 -#define RADEON_REG_PP_TXABLEND_1 0x1c7c -#define RADEON_REG_PP_TXABLEND_2 0x1c94 -# define RADEON_ALPHA_ARG_A_SHIFT 0 -# define RADEON_ALPHA_ARG_A_MASK (0xf << 0) -# define RADEON_ALPHA_ARG_A_ZERO (0 << 0) -# define RADEON_ALPHA_ARG_A_CURRENT_ALPHA (1 << 0) -# define RADEON_ALPHA_ARG_A_DIFFUSE_ALPHA (2 << 0) -# define RADEON_ALPHA_ARG_A_SPECULAR_ALPHA (3 << 0) -# define RADEON_ALPHA_ARG_A_TFACTOR_ALPHA (4 << 0) -# define RADEON_ALPHA_ARG_A_T0_ALPHA (5 << 0) -# define RADEON_ALPHA_ARG_A_T1_ALPHA (6 << 0) -# define RADEON_ALPHA_ARG_A_T2_ALPHA (7 << 0) -# define RADEON_ALPHA_ARG_A_T3_ALPHA (8 << 0) -# define RADEON_ALPHA_ARG_B_SHIFT 4 -# define RADEON_ALPHA_ARG_B_MASK (0xf << 4) -# define RADEON_ALPHA_ARG_B_ZERO (0 << 4) -# define RADEON_ALPHA_ARG_B_CURRENT_ALPHA (1 << 4) -# define RADEON_ALPHA_ARG_B_DIFFUSE_ALPHA (2 << 4) -# define RADEON_ALPHA_ARG_B_SPECULAR_ALPHA (3 << 4) -# define RADEON_ALPHA_ARG_B_TFACTOR_ALPHA (4 << 4) -# define RADEON_ALPHA_ARG_B_T0_ALPHA (5 << 4) -# define RADEON_ALPHA_ARG_B_T1_ALPHA (6 << 4) -# define RADEON_ALPHA_ARG_B_T2_ALPHA (7 << 4) -# define RADEON_ALPHA_ARG_B_T3_ALPHA (8 << 4) -# define RADEON_ALPHA_ARG_C_SHIFT 8 -# define RADEON_ALPHA_ARG_C_MASK (0xf << 8) -# define RADEON_ALPHA_ARG_C_ZERO (0 << 8) -# define RADEON_ALPHA_ARG_C_CURRENT_ALPHA (1 << 8) -# define RADEON_ALPHA_ARG_C_DIFFUSE_ALPHA (2 << 8) -# define RADEON_ALPHA_ARG_C_SPECULAR_ALPHA (3 << 8) -# define RADEON_ALPHA_ARG_C_TFACTOR_ALPHA (4 << 8) -# define RADEON_ALPHA_ARG_C_T0_ALPHA (5 << 8) -# define RADEON_ALPHA_ARG_C_T1_ALPHA (6 << 8) -# define RADEON_ALPHA_ARG_C_T2_ALPHA (7 << 8) -# define RADEON_ALPHA_ARG_C_T3_ALPHA (8 << 8) -# define RADEON_DOT_ALPHA_DONT_REPLICATE (1 << 9) -/* COMP_ARG, BLEND_CNTL, CLAMP_TX same as for CBLEND, T*_EQ_TCUR */ -# define RADEON_ALPHA_ARG_MASK 0xf - -#define RADEON_REG_PP_TFACTOR_0 0x1c68 -#define RADEON_REG_PP_TFACTOR_1 0x1c80 -#define RADEON_REG_PP_TFACTOR_2 0x1c98 - -#define R128_REG_TEX_CNTL_C 0x1c9c -# define R128_Z_ENABLE (1 << 0) -# define R128_Z_WRITE_ENABLE (1 << 1) -# define R128_STENCIL_ENABLE (1 << 3) -# define R128_SHADE_ENABLE (0 << 4) -# define R128_TEXMAP_ENABLE (1 << 4) -# define R128_SEC_TEXMAP_ENABLE (1 << 5) -# define R128_FOG_ENABLE (1 << 7) -# define R128_DITHER_ENABLE (1 << 8) -# define R128_ALPHA_ENABLE (1 << 9) -# define R128_ALPHA_TEST_ENABLE (1 << 10) -# define R128_SPEC_LIGHT_ENABLE (1 << 11) -# define R128_TEX_CHROMA_KEY_ENABLE (1 << 12) -# define R128_ALPHA_IN_TEX_COMPLETE_A (0 << 13) -# define R128_ALPHA_IN_TEX_LSB_A (1 << 13) -# define R128_LIGHT_DIS (0 << 14) -# define R128_LIGHT_COPY (1 << 14) -# define R128_LIGHT_MODULATE (2 << 14) -# define R128_LIGHT_ADD (3 << 14) -# define R128_LIGHT_BLEND_CONSTANT (4 << 14) -# define R128_LIGHT_BLEND_TEXTURE (5 << 14) -# define R128_LIGHT_BLEND_VERTEX (6 << 14) -# define R128_LIGHT_BLEND_CONST_COLOR (7 << 14) -# define R128_ALPHA_LIGHT_DIS (0 << 18) -# define R128_ALPHA_LIGHT_COPY (1 << 18) -# define R128_ALPHA_LIGHT_MODULATE (2 << 18) -# define R128_ALPHA_LIGHT_ADD (3 << 18) -# define R128_ANTI_ALIAS (1 << 21) -# define R128_TEX_CACHE_FLUSH (1 << 23) -# define R128_LOD_BIAS_SHIFT 24 -# define R128_LOD_BIAS_MASK (0xff << 24) - -#define R128_REG_MISC_3D_STATE_CNTL 0x1ca0 -# define R128_REF_ALPHA_MASK 0xff -# define R128_MISC_SCALE_3D_NOOP (0 << 8) -# define R128_MISC_SCALE_3D_SCALE (1 << 8) -# define R128_MISC_SCALE_3D_TEXMAP_SHADE (2 << 8) -# define R128_MISC_SCALE_PIX_BLEND (0 << 10) -# define R128_MISC_SCALE_PIX_REPLICATE (1 << 10) -# define R128_ALPHA_COMB_ADD_CLAMP (0 << 12) -# define R128_ALPHA_COMB_ADD_NO_CLAMP (1 << 12) -# define R128_ALPHA_COMB_SUB_SRC_DST_CLAMP (2 << 12) -# define R128_ALPHA_COMB_SUB_SRC_DST_NO_CLAMP (3 << 12) -# define R128_FOG_VERTEX (0 << 14) -# define R128_FOG_TABLE (1 << 14) -# define R128_SBLEND_ZERO (0 << 16) -# define R128_SBLEND_ONE (1 << 16) -# define R128_SBLEND_SRCCOLOR (2 << 16) -# define R128_SBLEND_INVSRCCOLOR (3 << 16) -# define R128_SBLEND_SRC_ALPHA (4 << 16) -# define R128_SBLEND_INV_SRC_ALPHA (5 << 16) -# define R128_SBLEND_DST_ALPHA (6 << 16) -# define R128_SBLEND_INV_DST_ALPHA (7 << 16) -# define R128_SBLEND_DSTCOLOR (8 << 16) -# define R128_SBLEND_INVDSTCOLOR (9 << 16) -# define R128_SBLEND_SRC_ALPHASAT (10 << 16) -# define R128_SBLEND_BOTHSRC_ALPHA (11 << 16) -# define R128_SBLEND_BOTHINV_SRC_ALPHA (12 << 16) -# define R128_SBLEND_MASK (15 << 16) -# define R128_DBLEND_ZERO (0 << 20) -# define R128_DBLEND_ONE (1 << 20) -# define R128_DBLEND_SRCCOLOR (2 << 20) -# define R128_DBLEND_INVSRCCOLOR (3 << 20) -# define R128_DBLEND_SRC_ALPHA (4 << 20) -# define R128_DBLEND_INV_SRC_ALPHA (5 << 20) -# define R128_DBLEND_DST_ALPHA (6 << 20) -# define R128_DBLEND_INV_DST_ALPHA (7 << 20) -# define R128_DBLEND_DSTCOLOR (8 << 20) -# define R128_DBLEND_INVDSTCOLOR (9 << 20) -# define R128_DBLEND_SRC_ALPHASAT (10 << 20) -# define R128_DBLEND_MASK (15 << 20) -# define R128_ALPHA_TEST_NEVER (0 << 24) -# define R128_ALPHA_TEST_LESS (1 << 24) -# define R128_ALPHA_TEST_LESSEQUAL (2 << 24) -# define R128_ALPHA_TEST_EQUAL (3 << 24) -# define R128_ALPHA_TEST_GREATEREQUAL (4 << 24) -# define R128_ALPHA_TEST_GREATER (5 << 24) -# define R128_ALPHA_TEST_NEQUAL (6 << 24) -# define R128_ALPHA_TEST_ALWAYS (7 << 24) -# define R128_ALPHA_TEST_MASK (7 << 24) - -#define R128_REG_PRIM_TEX_CNTL_C 0x1cb0 -#define R128_REG_SEC_TEX_CNTL_C 0x1d00 -# define R128_SEC_SELECT_PRIM_ST (0 << 0) -# define R128_SEC_SELECT_SEC_ST (1 << 0) -# define R128_MIN_BLEND_NEAREST (0 << 1) -# define R128_MIN_BLEND_LINEAR (1 << 1) -# define R128_MIN_BLEND_MIPNEAREST (2 << 1) -# define R128_MIN_BLEND_MIPLINEAR (3 << 1) -# define R128_MIN_BLEND_LINEARMIPNEAREST (4 << 1) -# define R128_MIN_BLEND_LINEARMIPLINEAR (5 << 1) -# define R128_MIN_BLEND_MASK (7 << 1) -# define R128_MAG_BLEND_NEAREST (0 << 4) -# define R128_MAG_BLEND_LINEAR (1 << 4) -# define R128_MAG_BLEND_MASK (7 << 4) -# define R128_MIP_MAP_DISABLE (1 << 7) -# define R128_TEX_CLAMP_S_WRAP (0 << 8) -# define R128_TEX_CLAMP_S_MIRROR (1 << 8) -# define R128_TEX_CLAMP_S_CLAMP (2 << 8) -# define R128_TEX_CLAMP_S_BORDER_COLOR (3 << 8) -# define R128_TEX_CLAMP_S_MASK (3 << 8) -# define R128_TEX_WRAP_S (1 << 10) -# define R128_TEX_CLAMP_T_WRAP (0 << 11) -# define R128_TEX_CLAMP_T_MIRROR (1 << 11) -# define R128_TEX_CLAMP_T_CLAMP (2 << 11) -# define R128_TEX_CLAMP_T_BORDER_COLOR (3 << 11) -# define R128_TEX_CLAMP_T_MASK (3 << 11) -# define R128_TEX_WRAP_T (1 << 13) -# define R128_TEX_PERSPECTIVE_DISABLE (1 << 14) -# define R128_TEX_DATATYPE_SHIFT 16 -# define R128_PALLETE_EITHER (0 << 20) -# define R128_PALLETE_1 (1 << 20) -# define R128_PALLETE_2 (2 << 20) -# define R128_PSEUDOCOLOR_DT_RGB565 (0 << 24) -# define R128_PSEUDOCOLOR_DT_ARGB1555 (1 << 24) -# define R128_PSEUDOCOLOR_DT_ARGB4444 (2 << 24) - -#define R128_REG_PRIM_TEXTURE_COMBINE_CNTL_C 0x1cb4 -#define R128_REG_SEC_TEXTURE_COMBINE_CNTL_C 0x1d04 -# define R128_COMB_DIS (0 << 0) -# define R128_COMB_COPY (1 << 0) -# define R128_COMB_COPY_INP (2 << 0) -# define R128_COMB_MODULATE (3 << 0) -# define R128_COMB_MODULATE2X (4 << 0) -# define R128_COMB_MODULATE4X (5 << 0) -# define R128_COMB_ADD (6 << 0) -# define R128_COMB_ADD_SIGNED (7 << 0) -# define R128_COMB_BLEND_VERTEX (8 << 0) -# define R128_COMB_BLEND_TEXTURE (9 << 0) -# define R128_COMB_BLEND_CONST (10 << 0) -# define R128_COMB_BLEND_PREMULT (11 << 0) -# define R128_COMB_BLEND_PREV (12 << 0) -# define R128_COMB_BLEND_PREMULT_INV (13 << 0) -# define R128_COMB_ADD_SIGNED2X (14 << 0) -# define R128_COMB_BLEND_CONST_COLOR (15 << 0) -# define R128_COMB_MASK (15 << 0) -# define R128_COLOR_FACTOR_CONST_COLOR (0 << 4) -# define R128_COLOR_FACTOR_NCONST_COLOR (1 << 4) -# define R128_COLOR_FACTOR_TEX (4 << 4) -# define R128_COLOR_FACTOR_NTEX (5 << 4) -# define R128_COLOR_FACTOR_ALPHA (6 << 4) -# define R128_COLOR_FACTOR_NALPHA (7 << 4) -# define R128_COLOR_FACTOR_PREV_COLOR (8 << 4) -# define R128_COLOR_FACTOR_MASK (15 << 4) -# define R128_COMB_FCN_MSB (1 << 8) -# define R128_INPUT_FACTOR_CONST_COLOR (2 << 10) -# define R128_INPUT_FACTOR_CONST_ALPHA (3 << 10) -# define R128_INPUT_FACTOR_INT_COLOR (4 << 10) -# define R128_INPUT_FACTOR_INT_ALPHA (5 << 10) -# define R128_INPUT_FACTOR_PREV_COLOR (8 << 10) /* SEC only */ -# define R128_INPUT_FACTOR_PREV_ALPHA (9 << 10) /* SEC only */ -# define R128_INPUT_FACTOR_MASK (15 << 10) -# define R128_COMB_ALPHA_DIS (0 << 14) -# define R128_COMB_ALPHA_COPY (1 << 14) -# define R128_COMB_ALPHA_COPY_INP (2 << 14) -# define R128_COMB_ALPHA_MODULATE (3 << 14) -# define R128_COMB_ALPHA_MODULATE2X (4 << 14) -# define R128_COMB_ALPHA_MODULATE4X (5 << 14) -# define R128_COMB_ALPHA_ADD (6 << 14) -# define R128_COMB_ALPHA_ADD_SIGNED (7 << 14) -# define R128_COMB_ALPHA_ADD_SIGNED2X (14 << 14) -# define R128_COMB_ALPHA_MASK (15 << 14) -# define R128_ALPHA_FACTOR_TEX_ALPHA (6 << 18) -# define R128_ALPHA_FACTOR_NTEX_ALPHA (7 << 18) -# define R128_ALPHA_FACTOR_MASK (15 << 18) -# define R128_INP_FACTOR_A_CONST_ALPHA (1 << 25) -# define R128_INP_FACTOR_A_INT_ALPHA (2 << 25) -# define R128_INP_FACTOR_A_PREV_ALPHA (4 << 25) /* SEC only */ -# define R128_INP_FACTOR_A_MASK (7 << 25) - -#define R128_REG_TEX_SIZE_PITCH_C 0x1cb8 -# define R128_TEX_PITCH_SHIFT 0 -# define R128_TEX_SIZE_SHIFT 4 -# define R128_TEX_HEIGHT_SHIFT 8 -# define R128_TEX_MIN_SIZE_SHIFT 12 -# define R128_SEC_TEX_PITCH_SHIFT 16 -# define R128_SEC_TEX_SIZE_SHIFT 20 -# define R128_SEC_TEX_HEIGHT_SHIFT 24 -# define R128_SEC_TEX_MIN_SIZE_SHIFT 28 -# define R128_TEX_PITCH_MASK (0x0f << 0) -# define R128_TEX_SIZE_MASK (0x0f << 4) -# define R128_TEX_HEIGHT_MASK (0x0f << 8) -# define R128_TEX_MIN_SIZE_MASK (0x0f << 12) -# define R128_SEC_TEX_PITCH_MASK (0x0f << 16) -# define R128_SEC_TEX_SIZE_MASK (0x0f << 20) -# define R128_SEC_TEX_HEIGHT_MASK (0x0f << 24) -# define R128_SEC_TEX_MIN_SIZE_MASK (0x0f << 28) -# define R128_TEX_SIZE_PITCH_SHIFT 0 -# define R128_SEC_TEX_SIZE_PITCH_SHIFT 16 -# define R128_TEX_SIZE_PITCH_MASK (0xffff << 0) -# define R128_SEC_TEX_SIZE_PITCH_MASK (0xffff << 16) - -#define R128_REG_PRIM_TEX_0_OFFSET_C 0x1cbc -#define R128_REG_PRIM_TEX_1_OFFSET_C 0x1cc0 -#define R128_REG_PRIM_TEX_2_OFFSET_C 0x1cc4 -#define R128_REG_PRIM_TEX_3_OFFSET_C 0x1cc8 -#define R128_REG_PRIM_TEX_4_OFFSET_C 0x1ccc -#define R128_REG_PRIM_TEX_5_OFFSET_C 0x1cd0 -#define R128_REG_PRIM_TEX_6_OFFSET_C 0x1cd4 -#define R128_REG_PRIM_TEX_7_OFFSET_C 0x1cd8 -#define R128_REG_PRIM_TEX_8_OFFSET_C 0x1cdc -#define R128_REG_PRIM_TEX_9_OFFSET_C 0x1ce0 -#define R128_REG_PRIM_TEX_10_OFFSET_C 0x1ce4 -#define R128_REG_SEC_TEX_0_OFFSET_C 0x1d08 -#define R128_REG_SEC_TEX_1_OFFSET_C 0x1d0c -#define R128_REG_SEC_TEX_2_OFFSET_C 0x1d10 -#define R128_REG_SEC_TEX_3_OFFSET_C 0x1d14 -#define R128_REG_SEC_TEX_4_OFFSET_C 0x1d18 -#define R128_REG_SEC_TEX_5_OFFSET_C 0x1d1c -#define R128_REG_SEC_TEX_6_OFFSET_C 0x1d20 -#define R128_REG_SEC_TEX_7_OFFSET_C 0x1d24 -#define R128_REG_SEC_TEX_8_OFFSET_C 0x1d28 -#define R128_REG_SEC_TEX_9_OFFSET_C 0x1d2c -#define R128_REG_SEC_TEX_10_OFFSET_C 0x1d30 -# define R128_TEX_NO_TILE (0 << 30) -# define R128_TEX_TILED_BY_HOST (1 << 30) -# define R128_TEX_TILED_BY_STORAGE (2 << 30) -# define R128_TEX_TILED_BY_STORAGE2 (3 << 30) -#define R128_REG_CONSTANT_COLOR_C 0x1d34 -# define R128_CONSTANT_BLUE_SHIFT 0 -# define R128_CONSTANT_GREEN_SHIFT 8 -# define R128_CONSTANT_RED_SHIFT 16 -# define R128_CONSTANT_ALPHA_SHIFT 24 - -#define RADEON_REG_PP_TEX_SIZE_0 0x1d04 /* NPOT */ -#define RADEON_REG_PP_TEX_SIZE_1 0x1d0c /* NPOT */ -#define RADEON_REG_PP_TEX_SIZE_2 0x1d14 /* NPOT */ -# define RADEON_TEX_USIZE_MASK (0x7ff << 0) -# define RADEON_TEX_USIZE_SHIFT 0 -# define RADEON_TEX_VSIZE_MASK (0x7ff << 16) -# define RADEON_TEX_VSIZE_SHIFT 16 -# define RADEON_SIGNED_RGB_MASK (1 << 30) -# define RADEON_SIGNED_RGB_SHIFT 30 -# define RADEON_SIGNED_ALPHA_MASK (1 << 31) -# define RADEON_SIGNED_ALPHA_SHIFT 31 - -#define RADEON_REG_PP_TEX_PITCH_0 0x1d08 /* NPOT */ -#define RADEON_REG_PP_TEX_PITCH_1 0x1d10 /* NPOT */ -#define RADEON_REG_PP_TEX_PITCH_2 0x1d18 /* NPOT */ -/* note: bits 13-5: 32 byte aligned stride of texture map */ - -#define R128_REG_PLANE_3D_MASK_C 0x1d44 - -#define RADEON_REG_RB3D_PLANEMASK 0x1d84 - -#define R200_REG_SE_VAP_CNTL 0x2080 -# define R200_VAP_TCL_ENABLE 0x00000001 -# define R200_VAP_SINGLE_BUF_STATE_ENABLE 0x00000010 -# define R200_VAP_FORCE_W_TO_ONE 0x00010000 -# define R200_VAP_D3D_TEX_DEFAULT 0x00020000 -# define R200_VAP_VF_MAX_VTX_NUM__SHIFT 18 -# define R200_VAP_VF_MAX_VTX_NUM (9 << 18) -# define R200_VAP_DX_CLIP_SPACE_DEF 0x00400000 - -#define R200_REG_SE_VTX_FMT_0 0x2088 -# define R200_VTX_XY 0 /* always have xy */ -# define R200_VTX_Z0 (1 << 0) -# define R200_VTX_W0 (1 << 1) -# define R200_VTX_WEIGHT_COUNT_SHIFT (2) -# define R200_VTX_PV_MATRIX_SEL (1 << 5) -# define R200_VTX_N0 (1 << 6) -# define R200_VTX_POINT_SIZE (1 << 7) -# define R200_VTX_DISCRETE_FOG (1 << 8) -# define R200_VTX_SHININESS_0 (1 << 9) -# define R200_VTX_SHININESS_1 (1 << 10) -# define R200_VTX_COLOR_NOT_PRESENT 0 -# define R200_VTX_PK_RGBA 1 -# define R200_VTX_FP_RGB 2 -# define R200_VTX_FP_RGBA 3 -# define R200_VTX_COLOR_MASK 3 -# define R200_VTX_COLOR_0_SHIFT 11 -# define R200_VTX_COLOR_1_SHIFT 13 -# define R200_VTX_COLOR_2_SHIFT 15 -# define R200_VTX_COLOR_3_SHIFT 17 -# define R200_VTX_COLOR_4_SHIFT 19 -# define R200_VTX_COLOR_5_SHIFT 21 -# define R200_VTX_COLOR_6_SHIFT 23 -# define R200_VTX_COLOR_7_SHIFT 25 -# define R200_VTX_XY1 (1 << 28) -# define R200_VTX_Z1 (1 << 29) -# define R200_VTX_W1 (1 << 30) -# define R200_VTX_N1 (1 << 31) - -#define R200_REG_SE_VTX_FMT_1 0x208c -# define R200_VTX_TEX0_COMP_CNT_SHIFT 0 -# define R200_VTX_TEX1_COMP_CNT_SHIFT 3 -# define R200_VTX_TEX2_COMP_CNT_SHIFT 6 -# define R200_VTX_TEX3_COMP_CNT_SHIFT 9 -# define R200_VTX_TEX4_COMP_CNT_SHIFT 12 -# define R200_VTX_TEX5_COMP_CNT_SHIFT 15 - -#define R200_REG_SE_VTE_CNTL 0x20b0 -# define R200_VPORT_X_SCALE_ENA 0x00000001 -# define R200_VPORT_X_OFFSET_ENA 0x00000002 -# define R200_VPORT_Y_SCALE_ENA 0x00000004 -# define R200_VPORT_Y_OFFSET_ENA 0x00000008 -# define R200_VPORT_Z_SCALE_ENA 0x00000010 -# define R200_VPORT_Z_OFFSET_ENA 0x00000020 -# define R200_VTX_XY_FMT 0x00000100 -# define R200_VTX_Z_FMT 0x00000200 -# define R200_VTX_W0_FMT 0x00000400 -# define R200_VTX_W0_NORMALIZE 0x00000800 -# define R200_VTX_ST_DENORMALIZED 0x00001000 - -#define R200_REG_SE_VAP_CNTL_STATUS 0x2140 -#define RADEON_REG_SE_CNTL_STATUS 0x2140 -# define RADEON_VC_NO_SWAP (0 << 0) -# define RADEON_VC_16BIT_SWAP (1 << 0) -# define RADEON_VC_32BIT_SWAP (2 << 0) -# define RADEON_VC_HALF_DWORD_SWAP (3 << 0) -# define RADEON_TCL_BYPASS (1 << 8) - -#define R200_REG_SE_VTX_STATE_CNTL 0x2180 - -#define RADEON_REG_RE_TOP_LEFT 0x26c0 - -#define R200_REG_RE_AUX_SCISSOR_CNTL 0x26f0 - -#define R200_REG_PP_TXFILTER_0 0x2c00 -#define R200_REG_PP_TXFILTER_1 0x2c20 -#define R200_REG_PP_TXFILTER_2 0x2c40 -#define R200_REG_PP_TXFILTER_3 0x2c60 -#define R200_REG_PP_TXFILTER_4 0x2c80 -#define R200_REG_PP_TXFILTER_5 0x2ca0 -# define R200_MAG_FILTER_NEAREST (0 << 0) -# define R200_MAG_FILTER_LINEAR (1 << 0) -# define R200_MAG_FILTER_MASK (1 << 0) -# define R200_MIN_FILTER_NEAREST (0 << 1) -# define R200_MIN_FILTER_LINEAR (1 << 1) -# define R200_MIN_FILTER_NEAREST_MIP_NEAREST (2 << 1) -# define R200_MIN_FILTER_NEAREST_MIP_LINEAR (3 << 1) -# define R200_MIN_FILTER_LINEAR_MIP_NEAREST (6 << 1) -# define R200_MIN_FILTER_LINEAR_MIP_LINEAR (7 << 1) -# define R200_MIN_FILTER_ANISO_NEAREST (8 << 1) -# define R200_MIN_FILTER_ANISO_LINEAR (9 << 1) -# define R200_MIN_FILTER_ANISO_NEAREST_MIP_NEAREST (10 << 1) -# define R200_MIN_FILTER_ANISO_NEAREST_MIP_LINEAR (11 << 1) -# define R200_MIN_FILTER_MASK (15 << 1) -# define R200_MAX_ANISO_1_TO_1 (0 << 5) -# define R200_MAX_ANISO_2_TO_1 (1 << 5) -# define R200_MAX_ANISO_4_TO_1 (2 << 5) -# define R200_MAX_ANISO_8_TO_1 (3 << 5) -# define R200_MAX_ANISO_16_TO_1 (4 << 5) -# define R200_MAX_ANISO_MASK (7 << 5) -# define R200_MAX_MIP_LEVEL_MASK (0x0f << 16) -# define R200_MAX_MIP_LEVEL_SHIFT 16 -# define R200_YUV_TO_RGB (1 << 20) -# define R200_YUV_TEMPERATURE_COOL (0 << 21) -# define R200_YUV_TEMPERATURE_HOT (1 << 21) -# define R200_YUV_TEMPERATURE_MASK (1 << 21) -# define R200_WRAPEN_S (1 << 22) -# define R200_CLAMP_S_WRAP (0 << 23) -# define R200_CLAMP_S_MIRROR (1 << 23) -# define R200_CLAMP_S_CLAMP_LAST (2 << 23) -# define R200_CLAMP_S_MIRROR_CLAMP_LAST (3 << 23) -# define R200_CLAMP_S_CLAMP_BORDER (4 << 23) -# define R200_CLAMP_S_MIRROR_CLAMP_BORDER (5 << 23) -# define R200_CLAMP_S_CLAMP_GL (6 << 23) -# define R200_CLAMP_S_MIRROR_CLAMP_GL (7 << 23) -# define R200_CLAMP_S_MASK (7 << 23) -# define R200_WRAPEN_T (1 << 26) -# define R200_CLAMP_T_WRAP (0 << 27) -# define R200_CLAMP_T_MIRROR (1 << 27) -# define R200_CLAMP_T_CLAMP_LAST (2 << 27) -# define R200_CLAMP_T_MIRROR_CLAMP_LAST (3 << 27) -# define R200_CLAMP_T_CLAMP_BORDER (4 << 27) -# define R200_CLAMP_T_MIRROR_CLAMP_BORDER (5 << 27) -# define R200_CLAMP_T_CLAMP_GL (6 << 27) -# define R200_CLAMP_T_MIRROR_CLAMP_GL (7 << 27) -# define R200_CLAMP_T_MASK (7 << 27) -# define R200_KILL_LT_ZERO (1 << 30) -# define R200_BORDER_MODE_OGL (0 << 31) -# define R200_BORDER_MODE_D3D (1 << 31) - -#define R200_REG_PP_TXFORMAT_0 0x2c04 -#define R200_REG_PP_TXFORMAT_1 0x2c24 -#define R200_REG_PP_TXFORMAT_2 0x2c44 -#define R200_REG_PP_TXFORMAT_3 0x2c64 -#define R200_REG_PP_TXFORMAT_4 0x2c84 -#define R200_REG_PP_TXFORMAT_5 0x2ca4 -# define R200_TXFORMAT_I8 (0 << 0) -# define R200_TXFORMAT_AI88 (1 << 0) -# define R200_TXFORMAT_RGB332 (2 << 0) -# define R200_TXFORMAT_ARGB1555 (3 << 0) -# define R200_TXFORMAT_RGB565 (4 << 0) -# define R200_TXFORMAT_ARGB4444 (5 << 0) -# define R200_TXFORMAT_ARGB8888 (6 << 0) -# define R200_TXFORMAT_RGBA8888 (7 << 0) -# define R200_TXFORMAT_Y8 (8 << 0) -# define R200_TXFORMAT_AVYU4444 (9 << 0) -# define R200_TXFORMAT_VYUY422 (10 << 0) -# define R200_TXFORMAT_YVYU422 (11 << 0) -# define R200_TXFORMAT_DXT1 (12 << 0) -# define R200_TXFORMAT_DXT23 (14 << 0) -# define R200_TXFORMAT_DXT45 (15 << 0) -# define R200_TXFORMAT_FORMAT_MASK (31 << 0) -# define R200_TXFORMAT_FORMAT_SHIFT 0 -# define R200_TXFORMAT_ALPHA_IN_MAP (1 << 6) -# define R200_TXFORMAT_NON_POWER2 (1 << 7) -# define R200_TXFORMAT_WIDTH_MASK (15 << 8) -# define R200_TXFORMAT_WIDTH_SHIFT 8 -# define R200_TXFORMAT_HEIGHT_MASK (15 << 12) -# define R200_TXFORMAT_HEIGHT_SHIFT 12 -# define R200_TXFORMAT_F5_WIDTH_MASK (15 << 16) /* cube face 5 */ -# define R200_TXFORMAT_F5_WIDTH_SHIFT 16 -# define R200_TXFORMAT_F5_HEIGHT_MASK (15 << 20) -# define R200_TXFORMAT_F5_HEIGHT_SHIFT 20 -# define R200_TXFORMAT_ST_ROUTE_STQ0 (0 << 24) -# define R200_TXFORMAT_ST_ROUTE_STQ1 (1 << 24) -# define R200_TXFORMAT_ST_ROUTE_STQ2 (2 << 24) -# define R200_TXFORMAT_ST_ROUTE_STQ3 (3 << 24) -# define R200_TXFORMAT_ST_ROUTE_STQ4 (4 << 24) -# define R200_TXFORMAT_ST_ROUTE_STQ5 (5 << 24) -# define R200_TXFORMAT_ST_ROUTE_MASK (7 << 24) -# define R200_TXFORMAT_ST_ROUTE_SHIFT 24 -# define R200_TXFORMAT_ALPHA_MASK_ENABLE (1 << 28) -# define R200_TXFORMAT_CHROMA_KEY_ENABLE (1 << 29) -# define R200_TXFORMAT_CUBIC_MAP_ENABLE (1 << 30) - -#define R200_REG_PP_TXFORMAT_X_0 0x2c08 -#define R200_REG_PP_TXFORMAT_X_1 0x2c28 -#define R200_REG_PP_TXFORMAT_X_2 0x2c48 -#define R200_REG_PP_TXFORMAT_X_3 0x2c68 -#define R200_REG_PP_TXFORMAT_X_4 0x2c88 -#define R200_REG_PP_TXFORMAT_X_5 0x2ca8 -# define R200_DEPTH_LOG2_MASK (0xf << 0) -# define R200_DEPTH_LOG2_SHIFT 0 -# define R200_VOLUME_FILTER_SHIFT 4 -# define R200_VOLUME_FILTER_MASK (1 << 4) -# define R200_VOLUME_FILTER_NEAREST (0 << 4) -# define R200_VOLUME_FILTER_LINEAR (1 << 4) -# define R200_WRAPEN_Q (1 << 8) -# define R200_CLAMP_Q_WRAP (0 << 9) -# define R200_CLAMP_Q_MIRROR (1 << 9) -# define R200_CLAMP_Q_CLAMP_LAST (2 << 9) -# define R200_CLAMP_Q_MIRROR_CLAMP_LAST (3 << 9) -# define R200_CLAMP_Q_CLAMP_BORDER (4 << 9) -# define R200_CLAMP_Q_MIRROR_CLAMP_BORDER (5 << 9) -# define R200_CLAMP_Q_CLAMP_GL (6 << 9) -# define R200_CLAMP_Q_MIRROR_CLAMP_GL (7 << 9) -# define R200_CLAMP_Q_MASK (7 << 9) -# define R200_MIN_MIP_LEVEL_MASK (0xff << 12) -# define R200_MIN_MIP_LEVEL_SHIFT 12 -# define R200_TEXCOORD_NONPROJ (0 << 16) -# define R200_TEXCOORD_CUBIC_ENV (1 << 16) -# define R200_TEXCOORD_VOLUME (2 << 16) -# define R200_TEXCOORD_PROJ (3 << 16) -# define R200_TEXCOORD_DEPTH (4 << 16) -# define R200_TEXCOORD_1D_PROJ (5 << 16) -# define R200_TEXCOORD_1D (6 << 16) -# define R200_TEXCOORD_ZERO (7 << 16) -# define R200_TEXCOORD_MASK (7 << 16) -# define R200_LOD_BIAS_MASK (0xfff80000) -# define R200_LOD_BIAS_SHIFT 19 - -#define R200_REG_PP_TXSIZE_0 0x2c0c /* NPOT only */ -#define R200_REG_PP_TXSIZE_1 0x2c2c /* NPOT only */ -#define R200_REG_PP_TXSIZE_2 0x2c4c /* NPOT only */ -#define R200_REG_PP_TXSIZE_3 0x2c6c /* NPOT only */ -#define R200_REG_PP_TXSIZE_4 0x2c8c /* NPOT only */ -#define R200_REG_PP_TXSIZE_5 0x2cac /* NPOT only */ - -#define R200_REG_PP_TXPITCH_0 0x2c10 /* NPOT only */ -#define R200_REG_PP_TXPITCH_1 0x2c30 /* NPOT only */ -#define R200_REG_PP_TXPITCH_2 0x2c50 /* NPOT only */ -#define R200_REG_PP_TXPITCH_3 0x2c70 /* NPOT only */ -#define R200_REG_PP_TXPITCH_4 0x2c90 /* NPOT only */ -#define R200_REG_PP_TXPITCH_5 0x2cb0 /* NPOT only */ - -#define R200_REG_PP_BORDER_COLOR_0 0x2c14 -#define R200_REG_PP_TXMULTI_CTL_0 0x2c1c - -#define R200_REG_PP_CNTL_X 0x2cc4 - -#define R200_PP_TXOFFSET_0 0x2d00 -#define R200_PP_TXOFFSET_1 0x2d18 -#define R200_PP_TXOFFSET_2 0x2d30 -#define R200_PP_TXOFFSET_3 0x2d48 -#define R200_PP_TXOFFSET_4 0x2d60 -#define R200_PP_TXOFFSET_5 0x2d78 -# define R200_TXO_ENDIAN_NO_SWAP (0 << 0) -# define R200_TXO_ENDIAN_BYTE_SWAP (1 << 0) -# define R200_TXO_ENDIAN_WORD_SWAP (2 << 0) -# define R200_TXO_ENDIAN_HALFDW_SWAP (3 << 0) -# define R200_TXO_OFFSET_MASK 0xffffffe0 -# define R200_TXO_OFFSET_SHIFT 5 - -#define R200_PP_CUBIC_OFFSET_F1_0 0x2d04 -#define R200_PP_CUBIC_OFFSET_F2_0 0x2d08 -#define R200_PP_CUBIC_OFFSET_F3_0 0x2d0c -#define R200_PP_CUBIC_OFFSET_F4_0 0x2d10 -#define R200_PP_CUBIC_OFFSET_F5_0 0x2d14 -#define R200_PP_CUBIC_OFFSET_F1_1 0x2d1c -#define R200_PP_CUBIC_OFFSET_F2_1 0x2d20 -#define R200_PP_CUBIC_OFFSET_F3_1 0x2d24 -#define R200_PP_CUBIC_OFFSET_F4_1 0x2d28 -#define R200_PP_CUBIC_OFFSET_F5_1 0x2d2c -#define R200_PP_CUBIC_OFFSET_F1_2 0x2d34 -#define R200_PP_CUBIC_OFFSET_F2_2 0x2d38 -#define R200_PP_CUBIC_OFFSET_F3_2 0x2d3c -#define R200_PP_CUBIC_OFFSET_F4_2 0x2d40 -#define R200_PP_CUBIC_OFFSET_F5_2 0x2d44 -#define R200_PP_CUBIC_OFFSET_F1_3 0x2d4c -#define R200_PP_CUBIC_OFFSET_F2_3 0x2d50 -#define R200_PP_CUBIC_OFFSET_F3_3 0x2d54 -#define R200_PP_CUBIC_OFFSET_F4_3 0x2d58 -#define R200_PP_CUBIC_OFFSET_F5_3 0x2d5c -#define R200_PP_CUBIC_OFFSET_F1_4 0x2d64 -#define R200_PP_CUBIC_OFFSET_F2_4 0x2d68 -#define R200_PP_CUBIC_OFFSET_F3_4 0x2d6c -#define R200_PP_CUBIC_OFFSET_F4_4 0x2d70 -#define R200_PP_CUBIC_OFFSET_F5_4 0x2d74 -#define R200_PP_CUBIC_OFFSET_F1_5 0x2d7c -#define R200_PP_CUBIC_OFFSET_F2_5 0x2d80 -#define R200_PP_CUBIC_OFFSET_F3_5 0x2d84 -#define R200_PP_CUBIC_OFFSET_F4_5 0x2d88 -#define R200_PP_CUBIC_OFFSET_F5_5 0x2d8c - -/* AKA PIXSHADER_I0_C0 */ -#define R200_REG_PP_TXCBLEND_0 0x2f00 -# define R200_TXC_ARG_A_ZERO (0) -# define R200_TXC_ARG_A_CURRENT_COLOR (2) -# define R200_TXC_ARG_A_CURRENT_ALPHA (3) -# define R200_TXC_ARG_A_DIFFUSE_COLOR (4) -# define R200_TXC_ARG_A_DIFFUSE_ALPHA (5) -# define R200_TXC_ARG_A_SPECULAR_COLOR (6) -# define R200_TXC_ARG_A_SPECULAR_ALPHA (7) -# define R200_TXC_ARG_A_TFACTOR_COLOR (8) -# define R200_TXC_ARG_A_TFACTOR_ALPHA (9) -# define R200_TXC_ARG_A_R0_COLOR (10) -# define R200_TXC_ARG_A_R0_ALPHA (11) -# define R200_TXC_ARG_A_R1_COLOR (12) -# define R200_TXC_ARG_A_R1_ALPHA (13) -# define R200_TXC_ARG_A_R2_COLOR (14) -# define R200_TXC_ARG_A_R2_ALPHA (15) -# define R200_TXC_ARG_A_R3_COLOR (16) -# define R200_TXC_ARG_A_R3_ALPHA (17) -# define R200_TXC_ARG_A_R4_COLOR (18) -# define R200_TXC_ARG_A_R4_ALPHA (19) -# define R200_TXC_ARG_A_R5_COLOR (20) -# define R200_TXC_ARG_A_R5_ALPHA (21) -# define R200_TXC_ARG_A_TFACTOR1_COLOR (26) -# define R200_TXC_ARG_A_TFACTOR1_ALPHA (27) -# define R200_TXC_ARG_A_MASK (31 << 0) -# define R200_TXC_ARG_A_SHIFT 0 -# define R200_TXC_ARG_B_ZERO (0 << 5) -# define R200_TXC_ARG_B_CURRENT_COLOR (2 << 5) -# define R200_TXC_ARG_B_CURRENT_ALPHA (3 << 5) -# define R200_TXC_ARG_B_DIFFUSE_COLOR (4 << 5) -# define R200_TXC_ARG_B_DIFFUSE_ALPHA (5 << 5) -# define R200_TXC_ARG_B_SPECULAR_COLOR (6 << 5) -# define R200_TXC_ARG_B_SPECULAR_ALPHA (7 << 5) -# define R200_TXC_ARG_B_TFACTOR_COLOR (8 << 5) -# define R200_TXC_ARG_B_TFACTOR_ALPHA (9 << 5) -# define R200_TXC_ARG_B_R0_COLOR (10 << 5) -# define R200_TXC_ARG_B_R0_ALPHA (11 << 5) -# define R200_TXC_ARG_B_R1_COLOR (12 << 5) -# define R200_TXC_ARG_B_R1_ALPHA (13 << 5) -# define R200_TXC_ARG_B_R2_COLOR (14 << 5) -# define R200_TXC_ARG_B_R2_ALPHA (15 << 5) -# define R200_TXC_ARG_B_R3_COLOR (16 << 5) -# define R200_TXC_ARG_B_R3_ALPHA (17 << 5) -# define R200_TXC_ARG_B_R4_COLOR (18 << 5) -# define R200_TXC_ARG_B_R4_ALPHA (19 << 5) -# define R200_TXC_ARG_B_R5_COLOR (20 << 5) -# define R200_TXC_ARG_B_R5_ALPHA (21 << 5) -# define R200_TXC_ARG_B_TFACTOR1_COLOR (26 << 5) -# define R200_TXC_ARG_B_TFACTOR1_ALPHA (27 << 5) -# define R200_TXC_ARG_B_MASK (31 << 5) -# define R200_TXC_ARG_B_SHIFT 5 -# define R200_TXC_ARG_C_ZERO (0 << 10) -# define R200_TXC_ARG_C_CURRENT_COLOR (2 << 10) -# define R200_TXC_ARG_C_CURRENT_ALPHA (3 << 10) -# define R200_TXC_ARG_C_DIFFUSE_COLOR (4 << 10) -# define R200_TXC_ARG_C_DIFFUSE_ALPHA (5 << 10) -# define R200_TXC_ARG_C_SPECULAR_COLOR (6 << 10) -# define R200_TXC_ARG_C_SPECULAR_ALPHA (7 << 10) -# define R200_TXC_ARG_C_TFACTOR_COLOR (8 << 10) -# define R200_TXC_ARG_C_TFACTOR_ALPHA (9 << 10) -# define R200_TXC_ARG_C_R0_COLOR (10 << 10) -# define R200_TXC_ARG_C_R0_ALPHA (11 << 10) -# define R200_TXC_ARG_C_R1_COLOR (12 << 10) -# define R200_TXC_ARG_C_R1_ALPHA (13 << 10) -# define R200_TXC_ARG_C_R2_COLOR (14 << 10) -# define R200_TXC_ARG_C_R2_ALPHA (15 << 10) -# define R200_TXC_ARG_C_R3_COLOR (16 << 10) -# define R200_TXC_ARG_C_R3_ALPHA (17 << 10) -# define R200_TXC_ARG_C_R4_COLOR (18 << 10) -# define R200_TXC_ARG_C_R4_ALPHA (19 << 10) -# define R200_TXC_ARG_C_R5_COLOR (20 << 10) -# define R200_TXC_ARG_C_R5_ALPHA (21 << 10) -# define R200_TXC_ARG_C_TFACTOR1_COLOR (26 << 10) -# define R200_TXC_ARG_C_TFACTOR1_ALPHA (27 << 10) -# define R200_TXC_ARG_C_MASK (31 << 10) -# define R200_TXC_ARG_C_SHIFT 10 -# define R200_TXC_COMP_ARG_A (1 << 16) -# define R200_TXC_COMP_ARG_A_SHIFT (16) -# define R200_TXC_BIAS_ARG_A (1 << 17) -# define R200_TXC_SCALE_ARG_A (1 << 18) -# define R200_TXC_NEG_ARG_A (1 << 19) -# define R200_TXC_COMP_ARG_B (1 << 20) -# define R200_TXC_COMP_ARG_B_SHIFT (20) -# define R200_TXC_BIAS_ARG_B (1 << 21) -# define R200_TXC_SCALE_ARG_B (1 << 22) -# define R200_TXC_NEG_ARG_B (1 << 23) -# define R200_TXC_COMP_ARG_C (1 << 24) -# define R200_TXC_COMP_ARG_C_SHIFT (24) -# define R200_TXC_BIAS_ARG_C (1 << 25) -# define R200_TXC_SCALE_ARG_C (1 << 26) -# define R200_TXC_NEG_ARG_C (1 << 27) -# define R200_TXC_OP_MADD (0 << 28) -# define R200_TXC_OP_CND0 (2 << 28) -# define R200_TXC_OP_LERP (3 << 28) -# define R200_TXC_OP_DOT3 (4 << 28) -# define R200_TXC_OP_DOT4 (5 << 28) -# define R200_TXC_OP_CONDITIONAL (6 << 28) -# define R200_TXC_OP_DOT2_ADD (7 << 28) -# define R200_TXC_OP_MASK (7 << 28) - -/* AKA PIXSHADER_I0_C1 */ -#define R200_REG_PP_TXCBLEND2_0 0x2f04 -# define R200_TXC_TFACTOR_SEL_SHIFT 0 -# define R200_TXC_TFACTOR_SEL_MASK 0x7 -# define R200_TXC_TFACTOR1_SEL_SHIFT 4 -# define R200_TXC_TFACTOR1_SEL_MASK (0x7 << 4) -# define R200_TXC_SCALE_SHIFT 8 -# define R200_TXC_SCALE_MASK (7 << 8) -# define R200_TXC_SCALE_1X (0 << 8) -# define R200_TXC_SCALE_2X (1 << 8) -# define R200_TXC_SCALE_4X (2 << 8) -# define R200_TXC_SCALE_8X (3 << 8) -# define R200_TXC_SCALE_INV2 (5 << 8) -# define R200_TXC_SCALE_INV4 (6 << 8) -# define R200_TXC_SCALE_INV8 (7 << 8) -# define R200_TXC_CLAMP_SHIFT 12 -# define R200_TXC_CLAMP_MASK (3 << 12) -# define R200_TXC_CLAMP_WRAP (0 << 12) -# define R200_TXC_CLAMP_0_1 (1 << 12) -# define R200_TXC_CLAMP_8_8 (2 << 12) -# define R200_TXC_OUTPUT_REG_MASK (7 << 16) -# define R200_TXC_OUTPUT_REG_NONE (0 << 16) -# define R200_TXC_OUTPUT_REG_R0 (1 << 16) -# define R200_TXC_OUTPUT_REG_R1 (2 << 16) -# define R200_TXC_OUTPUT_REG_R2 (3 << 16) -# define R200_TXC_OUTPUT_REG_R3 (4 << 16) -# define R200_TXC_OUTPUT_REG_R4 (5 << 16) -# define R200_TXC_OUTPUT_REG_R5 (6 << 16) -# define R200_TXC_OUTPUT_MASK_MASK (7 << 20) -# define R200_TXC_OUTPUT_MASK_RGB (0 << 20) -# define R200_TXC_OUTPUT_MASK_RG (1 << 20) -# define R200_TXC_OUTPUT_MASK_RB (2 << 20) -# define R200_TXC_OUTPUT_MASK_R (3 << 20) -# define R200_TXC_OUTPUT_MASK_GB (4 << 20) -# define R200_TXC_OUTPUT_MASK_G (5 << 20) -# define R200_TXC_OUTPUT_MASK_B (6 << 20) -# define R200_TXC_OUTPUT_MASK_NONE (7 << 20) -# define R200_TXC_REPL_NORMAL 0 -# define R200_TXC_REPL_RED 1 -# define R200_TXC_REPL_GREEN 2 -# define R200_TXC_REPL_BLUE 3 -# define R200_TXC_REPL_ARG_A_SHIFT 26 -# define R200_TXC_REPL_ARG_A_MASK (3 << 26) -# define R200_TXC_REPL_ARG_B_SHIFT 28 -# define R200_TXC_REPL_ARG_B_MASK (3 << 28) -# define R200_TXC_REPL_ARG_C_SHIFT 30 -# define R200_TXC_REPL_ARG_C_MASK (3 << 30) - -/* AKA PIXSHADER_I0_A0 */ -#define R200_REG_PP_TXABLEND_0 0x2f08 -# define R200_TXA_ARG_A_ZERO (0) -# define R200_TXA_ARG_A_CURRENT_ALPHA (2) /* guess */ -# define R200_TXA_ARG_A_CURRENT_BLUE (3) /* guess */ -# define R200_TXA_ARG_A_DIFFUSE_ALPHA (4) -# define R200_TXA_ARG_A_DIFFUSE_BLUE (5) -# define R200_TXA_ARG_A_SPECULAR_ALPHA (6) -# define R200_TXA_ARG_A_SPECULAR_BLUE (7) -# define R200_TXA_ARG_A_TFACTOR_ALPHA (8) -# define R200_TXA_ARG_A_TFACTOR_BLUE (9) -# define R200_TXA_ARG_A_R0_ALPHA (10) -# define R200_TXA_ARG_A_R0_BLUE (11) -# define R200_TXA_ARG_A_R1_ALPHA (12) -# define R200_TXA_ARG_A_R1_BLUE (13) -# define R200_TXA_ARG_A_R2_ALPHA (14) -# define R200_TXA_ARG_A_R2_BLUE (15) -# define R200_TXA_ARG_A_R3_ALPHA (16) -# define R200_TXA_ARG_A_R3_BLUE (17) -# define R200_TXA_ARG_A_R4_ALPHA (18) -# define R200_TXA_ARG_A_R4_BLUE (19) -# define R200_TXA_ARG_A_R5_ALPHA (20) -# define R200_TXA_ARG_A_R5_BLUE (21) -# define R200_TXA_ARG_A_TFACTOR1_ALPHA (26) -# define R200_TXA_ARG_A_TFACTOR1_BLUE (27) -# define R200_TXA_ARG_A_MASK (31 << 0) -# define R200_TXA_ARG_A_SHIFT 0 -# define R200_TXA_ARG_B_ZERO (0 << 5) -# define R200_TXA_ARG_B_CURRENT_ALPHA (2 << 5) /* guess */ -# define R200_TXA_ARG_B_CURRENT_BLUE (3 << 5) /* guess */ -# define R200_TXA_ARG_B_DIFFUSE_ALPHA (4 << 5) -# define R200_TXA_ARG_B_DIFFUSE_BLUE (5 << 5) -# define R200_TXA_ARG_B_SPECULAR_ALPHA (6 << 5) -# define R200_TXA_ARG_B_SPECULAR_BLUE (7 << 5) -# define R200_TXA_ARG_B_TFACTOR_ALPHA (8 << 5) -# define R200_TXA_ARG_B_TFACTOR_BLUE (9 << 5) -# define R200_TXA_ARG_B_R0_ALPHA (10 << 5) -# define R200_TXA_ARG_B_R0_BLUE (11 << 5) -# define R200_TXA_ARG_B_R1_ALPHA (12 << 5) -# define R200_TXA_ARG_B_R1_BLUE (13 << 5) -# define R200_TXA_ARG_B_R2_ALPHA (14 << 5) -# define R200_TXA_ARG_B_R2_BLUE (15 << 5) -# define R200_TXA_ARG_B_R3_ALPHA (16 << 5) -# define R200_TXA_ARG_B_R3_BLUE (17 << 5) -# define R200_TXA_ARG_B_R4_ALPHA (18 << 5) -# define R200_TXA_ARG_B_R4_BLUE (19 << 5) -# define R200_TXA_ARG_B_R5_ALPHA (20 << 5) -# define R200_TXA_ARG_B_R5_BLUE (21 << 5) -# define R200_TXA_ARG_B_TFACTOR1_ALPHA (26 << 5) -# define R200_TXA_ARG_B_TFACTOR1_BLUE (27 << 5) -# define R200_TXA_ARG_B_MASK (31 << 5) -# define R200_TXA_ARG_B_SHIFT 5 -# define R200_TXA_ARG_C_ZERO (0 << 10) -# define R200_TXA_ARG_C_CURRENT_ALPHA (2 << 10) /* guess */ -# define R200_TXA_ARG_C_CURRENT_BLUE (3 << 10) /* guess */ -# define R200_TXA_ARG_C_DIFFUSE_ALPHA (4 << 10) -# define R200_TXA_ARG_C_DIFFUSE_BLUE (5 << 10) -# define R200_TXA_ARG_C_SPECULAR_ALPHA (6 << 10) -# define R200_TXA_ARG_C_SPECULAR_BLUE (7 << 10) -# define R200_TXA_ARG_C_TFACTOR_ALPHA (8 << 10) -# define R200_TXA_ARG_C_TFACTOR_BLUE (9 << 10) -# define R200_TXA_ARG_C_R0_ALPHA (10 << 10) -# define R200_TXA_ARG_C_R0_BLUE (11 << 10) -# define R200_TXA_ARG_C_R1_ALPHA (12 << 10) -# define R200_TXA_ARG_C_R1_BLUE (13 << 10) -# define R200_TXA_ARG_C_R2_ALPHA (14 << 10) -# define R200_TXA_ARG_C_R2_BLUE (15 << 10) -# define R200_TXA_ARG_C_R3_ALPHA (16 << 10) -# define R200_TXA_ARG_C_R3_BLUE (17 << 10) -# define R200_TXA_ARG_C_R4_ALPHA (18 << 10) -# define R200_TXA_ARG_C_R4_BLUE (19 << 10) -# define R200_TXA_ARG_C_R5_ALPHA (20 << 10) -# define R200_TXA_ARG_C_R5_BLUE (21 << 10) -# define R200_TXA_ARG_C_TFACTOR1_ALPHA (26 << 10) -# define R200_TXA_ARG_C_TFACTOR1_BLUE (27 << 10) -# define R200_TXA_ARG_C_MASK (31 << 10) -# define R200_TXA_ARG_C_SHIFT 10 -# define R200_TXA_COMP_ARG_A (1 << 16) -# define R200_TXA_COMP_ARG_A_SHIFT (16) -# define R200_TXA_BIAS_ARG_A (1 << 17) -# define R200_TXA_SCALE_ARG_A (1 << 18) -# define R200_TXA_NEG_ARG_A (1 << 19) -# define R200_TXA_COMP_ARG_B (1 << 20) -# define R200_TXA_COMP_ARG_B_SHIFT (20) -# define R200_TXA_BIAS_ARG_B (1 << 21) -# define R200_TXA_SCALE_ARG_B (1 << 22) -# define R200_TXA_NEG_ARG_B (1 << 23) -# define R200_TXA_COMP_ARG_C (1 << 24) -# define R200_TXA_COMP_ARG_C_SHIFT (24) -# define R200_TXA_BIAS_ARG_C (1 << 25) -# define R200_TXA_SCALE_ARG_C (1 << 26) -# define R200_TXA_NEG_ARG_C (1 << 27) -# define R200_TXA_OP_MADD (0 << 28) -# define R200_TXA_OP_CND0 (2 << 28) -# define R200_TXA_OP_LERP (3 << 28) -# define R200_TXA_OP_CONDITIONAL (6 << 28) -# define R200_TXA_OP_MASK (7 << 28) - -/* AKA PIXSHADER_I0_A1 */ -#define R200_REG_PP_TXABLEND2_0 0x2f0c -# define R200_TXA_TFACTOR_SEL_SHIFT 0 -# define R200_TXA_TFACTOR_SEL_MASK 0x7 -# define R200_TXA_TFACTOR1_SEL_SHIFT 4 -# define R200_TXA_TFACTOR1_SEL_MASK (0x7 << 4) -# define R200_TXA_SCALE_SHIFT 8 -# define R200_TXA_SCALE_MASK (7 << 8) -# define R200_TXA_SCALE_1X (0 << 8) -# define R200_TXA_SCALE_2X (1 << 8) -# define R200_TXA_SCALE_4X (2 << 8) -# define R200_TXA_SCALE_8X (3 << 8) -# define R200_TXA_SCALE_INV2 (5 << 8) -# define R200_TXA_SCALE_INV4 (6 << 8) -# define R200_TXA_SCALE_INV8 (7 << 8) -# define R200_TXA_CLAMP_SHIFT 12 -# define R200_TXA_CLAMP_MASK (3 << 12) -# define R200_TXA_CLAMP_WRAP (0 << 12) -# define R200_TXA_CLAMP_0_1 (1 << 12) -# define R200_TXA_CLAMP_8_8 (2 << 12) -# define R200_TXA_OUTPUT_REG_MASK (7 << 16) -# define R200_TXA_OUTPUT_REG_NONE (0 << 16) -# define R200_TXA_OUTPUT_REG_R0 (1 << 16) -# define R200_TXA_OUTPUT_REG_R1 (2 << 16) -# define R200_TXA_OUTPUT_REG_R2 (3 << 16) -# define R200_TXA_OUTPUT_REG_R3 (4 << 16) -# define R200_TXA_OUTPUT_REG_R4 (5 << 16) -# define R200_TXA_OUTPUT_REG_R5 (6 << 16) -# define R200_TXA_DOT_ALPHA (1 << 20) -# define R200_TXA_REPL_NORMAL 0 -# define R200_TXA_REPL_RED 1 -# define R200_TXA_REPL_GREEN 2 -# define R200_TXA_REPL_ARG_A_SHIFT 26 -# define R200_TXA_REPL_ARG_A_MASK (3 << 26) -# define R200_TXA_REPL_ARG_B_SHIFT 28 -# define R200_TXA_REPL_ARG_B_MASK (3 << 28) -# define R200_TXA_REPL_ARG_C_SHIFT 30 -# define R200_TXA_REPL_ARG_C_MASK (3 << 30) - -#define RADEON_REG_RB2D_DSTCACHE_MODE 0x3428 -/* This is a read-only mirror of RADEON_REG_RB3D_DSTCACHE_MODE */ - -#define RADEON_REG_RB2D_DSTCACHE_CTLSTAT 0x342C -/* This is a read-only mirror of RADEON_REG_RB3D_DSTCACHE_CTLSTAT */ - -#define RADEON_REG_RB3D_DSTCACHE_MODE 0x3258 -# define RADEON_RB3D_DC_CACHE_ENABLE (0) -# define RADEON_RB3D_DC_2D_CACHE_DISABLE (1) -# define RADEON_RB3D_DC_3D_CACHE_DISABLE (2) -# define RADEON_RB3D_DC_CACHE_DISABLE (3) -# define RADEON_RB3D_DC_2D_CACHE_LINESIZE_128 (1 << 2) -# define RADEON_RB3D_DC_3D_CACHE_LINESIZE_128 (2 << 2) -# define RADEON_RB3D_DC_2D_CACHE_AUTOFLUSH (1 << 8) -# define RADEON_RB3D_DC_3D_CACHE_AUTOFLUSH (2 << 8) -# define R200_RB3D_DC_2D_CACHE_AUTOFREE (1 << 10) -# define R200_RB3D_DC_3D_CACHE_AUTOFREE (2 << 10) -# define RADEON_RB3D_DC_FORCE_RMW (1 << 16) -# define RADEON_RB3D_DC_DISABLE_RI_FILL (1 << 24) -# define RADEON_RB3D_DC_DISABLE_RI_READ (1 << 25) -# define RADEON_RB3D_DC_DISABLE_MASK_CHK (1 << 26) - -#define RADEON_REG_RB3D_DSTCACHE_CTLSTAT 0x325C -# define RADEON_RB3D_DC_FLUSH (3 << 0) -# define RADEON_RB3D_DC_FREE (3 << 2) -# define RADEON_RB3D_DC_FLUSH_ALL 0xf -# define RADEON_RB3D_DC_BUSY (1 << 31) - -/* PLL register defines */ -#define R128_REG_MCLK_CNTL 0x000f -# define R128_FORCE_GCP (1 << 16) -# define R128_FORCE_PIPE3D_CP (1 << 17) -# define R128_FORCE_RCP (1 << 18) -#define RADEON_REG_MCLK_CNTL 0x0012 -# define RADEON_FORCEON_MCLKA (1 << 16) -# define RADEON_FORCEON_MCLKB (1 << 17) -# define RADEON_FORCEON_YCLKA (1 << 18) -# define RADEON_FORCEON_YCLKB (1 << 19) -# define RADEON_FORCEON_MC (1 << 20) -# define RADEON_FORCEON_AIC (1 << 21) - -/* CCE packet defines */ - -#define ATI_CCE_PACKETTYPE_MASK 0xc0000000 -#define ATI_CCE_PACKET0 0x00000000 -#define ATI_CCE_PACKET0_COUNT_MASK 0x3fff0000 -#define ATI_CCE_PACKET0_ONE_REG_WR 0x00008000 -#define ATI_CCE_PACKET0_REG_MASK 0x000007ff -#define ATI_CCE_PACKET1 0x40000000 -#define ATI_CCE_PACKET1_REG_1 0x000007ff -#define ATI_CCE_PACKET1_REG_2 0x003ff800 -#define ATI_CCE_PACKET1_REG_2_SHIFT 10 -#define ATI_CCE_PACKET2 0x80000000 -#define ATI_CCE_PACKET3 0xc0000000 -#define ATI_CCE_PACKET3_COUNT_MASK 0x3fff0000 -#define ATI_CCE_PACKET3_IT_OPCODE_MASK 0x0000ff00 -#define ATI_CCE_PACKET3_NOP 0xc0001000 -#define ATI_CCE_PACKET3_NEXT_CHAR 0xc0001900 -#define ATI_CCE_PACKET3_PLY_NEXTSCAN 0xc0001d00 -#define ATI_CCE_PACKET3_SET_SCISSORS 0xc0001e00 -#define R128_CCE_PACKET3_SET_MODE_24BPP 0xc0001f00 -#define R128_CCE_PACKET3_3D_SAVE_CONTEXT 0xc0002000 -#define R128_CCE_PACKET3_3D_PLAY_CONTEXT 0xc0002100 -#define ATI_CCE_PACKET3_3D_RNDR_GEN_INDX_PRIM 0xc0002300 -#define RADEON_CP_PACKET3_LOAD_MICROCODE 0xc0002400 -#define ATI_CCE_PACKET3_3D_RNDR_GEN_PRIM 0xc0002500 -#define RADEON_CP_PACKET3_WAIT_FOR_IDLE 0xc0002600 -#define RADEON_CP_PACKET3_3D_DRAW_VBUF 0xc0002800 -#define RADEON_CP_PACKET3_3D_DRAW_IMMD 0xc0002900 -#define RADEON_CP_PACKET3_3D_DRAW_INDX 0xc0002a00 -#define ATI_CCE_PACKET3_LOAD_PALETTE 0xc0002c00 -#define R128_CCE_PACKET3_PURGE 0xc0002d00 -#define R128_CCE_PACKET3_NEXT_VERTEX_BUNDLE 0xc0002e00 -#define RADEON_CP_PACKET3_3D_LOAD_VBPNTR 0xc0002f00 -#define RADEON_CP_PACKET3_3D_CLEAR_ZMASK 0xc0003200 -#define R200_CP_PACKET3_3D_DRAW_IMMD_2 0xc0003500 -#define ATI_CCE_PACKET3_CNTL_PAINT 0xc0009100 -#define ATI_CCE_PACKET3_CNTL_BITBLT 0xc0009200 -#define ATI_CCE_PACKET3_CNTL_SMALLTEXT 0xc0009300 -#define ATI_CCE_PACKET3_HOSTDATA_BLT 0xc0009400 -#define ATI_CCE_PACKET3_CNTL_POLYLINE 0xc0009500 -#define R128_CCE_PACKET3_SCALE 0xc0009600 -#define R128_CCE_PACKET3_TRANS_SCALE 0xc0009700 -#define ATI_CCE_PACKET3_CNTL_POLYSCANLINES 0xc0009800 -#define ATI_CCE_PACKET3_PAINT_MULTI 0xc0009a00 -#define ATI_CCE_PACKET3_BITBLT_MULTI 0xc0009b00 -#define ATI_CCE_PACKET3_CNTL_TRANS_BITBLT 0xc0009c00 - -#define RADEON_CP_VC_FRMT_XY 0x00000000 -#define RADEON_CP_VC_FRMT_W0 0x00000001 -#define RADEON_CP_VC_FRMT_FPCOLOR 0x00000002 -#define RADEON_CP_VC_FRMT_FPALPHA 0x00000004 -#define RADEON_CP_VC_FRMT_PKCOLOR 0x00000008 -#define RADEON_CP_VC_FRMT_FPSPEC 0x00000010 -#define RADEON_CP_VC_FRMT_FPFOG 0x00000020 -#define RADEON_CP_VC_FRMT_PKSPEC 0x00000040 -#define RADEON_CP_VC_FRMT_ST0 0x00000080 -#define RADEON_CP_VC_FRMT_ST1 0x00000100 -#define RADEON_CP_VC_FRMT_Q1 0x00000200 -#define RADEON_CP_VC_FRMT_ST2 0x00000400 -#define RADEON_CP_VC_FRMT_Q2 0x00000800 -#define RADEON_CP_VC_FRMT_ST3 0x00001000 -#define RADEON_CP_VC_FRMT_Q3 0x00002000 -#define RADEON_CP_VC_FRMT_Q0 0x00004000 -#define RADEON_CP_VC_FRMT_BLND_WEIGHT_CNT_MASK 0x00038000 -#define RADEON_CP_VC_FRMT_N0 0x00040000 -#define RADEON_CP_VC_FRMT_XY1 0x08000000 -#define RADEON_CP_VC_FRMT_Z1 0x10000000 -#define RADEON_CP_VC_FRMT_W1 0x20000000 -#define RADEON_CP_VC_FRMT_N1 0x40000000 -#define RADEON_CP_VC_FRMT_Z 0x80000000 - -#define RADEON_CP_VC_CNTL_PRIM_TYPE_NONE 0x00000000 -#define RADEON_CP_VC_CNTL_PRIM_TYPE_POINT 0x00000001 -#define RADEON_CP_VC_CNTL_PRIM_TYPE_LINE 0x00000002 -#define RADEON_CP_VC_CNTL_PRIM_TYPE_LINE_STRIP 0x00000003 -#define RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_LIST 0x00000004 -#define RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_FAN 0x00000005 -#define RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_STRIP 0x00000006 -#define RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_TYPE_2 0x00000007 -#define RADEON_CP_VC_CNTL_PRIM_TYPE_RECT_LIST 0x00000008 -#define RADEON_CP_VC_CNTL_PRIM_TYPE_3VRT_POINT_LIST 0x00000009 -#define RADEON_CP_VC_CNTL_PRIM_TYPE_3VRT_LINE_LIST 0x0000000a -#define RADEON_CP_VC_CNTL_PRIM_WALK_IND 0x00000010 -#define RADEON_CP_VC_CNTL_PRIM_WALK_LIST 0x00000020 -#define RADEON_CP_VC_CNTL_PRIM_WALK_RING 0x00000030 -#define RADEON_CP_VC_CNTL_COLOR_ORDER_BGRA 0x00000000 -#define RADEON_CP_VC_CNTL_COLOR_ORDER_RGBA 0x00000040 -#define RADEON_CP_VC_CNTL_MAOS_ENABLE 0x00000080 -#define RADEON_CP_VC_CNTL_VTX_FMT_NON_RADEON_MODE 0x00000000 -#define RADEON_CP_VC_CNTL_VTX_FMT_RADEON_MODE 0x00000100 -#define RADEON_CP_VC_CNTL_TCL_DISABLE 0x00000000 -#define RADEON_CP_VC_CNTL_TCL_ENABLE 0x00000200 -#define RADEON_CP_VC_CNTL_NUM_SHIFT 16 - -#define R128_CCE_VC_FRMT_RHW 0x00000001 -#define R128_CCE_VC_FRMT_DIFFUSE_BGR 0x00000002 -#define R128_CCE_VC_FRMT_DIFFUSE_A 0x00000004 -#define R128_CCE_VC_FRMT_DIFFUSE_ARGB 0x00000008 -#define R128_CCE_VC_FRMT_SPEC_BGR 0x00000010 -#define R128_CCE_VC_FRMT_SPEC_F 0x00000020 -#define R128_CCE_VC_FRMT_SPEC_FRGB 0x00000040 -#define R128_CCE_VC_FRMT_S_T 0x00000080 -#define R128_CCE_VC_FRMT_S2_T2 0x00000100 -#define R128_CCE_VC_FRMT_RHW2 0x00000200 - -#define R128_CCE_VC_CNTL_PRIM_TYPE_NONE 0x00000000 -#define R128_CCE_VC_CNTL_PRIM_TYPE_POINT 0x00000001 -#define R128_CCE_VC_CNTL_PRIM_TYPE_LINE 0x00000002 -#define R128_CCE_VC_CNTL_PRIM_TYPE_POLY_LINE 0x00000003 -#define R128_CCE_VC_CNTL_PRIM_TYPE_TRI_LIST 0x00000004 -#define R128_CCE_VC_CNTL_PRIM_TYPE_TRI_FAN 0x00000005 -#define R128_CCE_VC_CNTL_PRIM_TYPE_TRI_STRIP 0x00000006 -#define R128_CCE_VC_CNTL_PRIM_TYPE_TRI_TYPE2 0x00000007 -#define R128_CCE_VC_CNTL_PRIM_WALK_IND 0x00000010 -#define R128_CCE_VC_CNTL_PRIM_WALK_LIST 0x00000020 -#define R128_CCE_VC_CNTL_PRIM_WALK_RING 0x00000030 -#define R128_CCE_VC_CNTL_NUM_SHIFT 16 - -#define R128_DATATYPE_VQ 0 -#define R128_DATATYPE_CI4 1 -#define R128_DATATYPE_CI8 2 -#define R128_DATATYPE_ARGB1555 3 -#define R128_DATATYPE_RGB565 4 -#define R128_DATATYPE_RGB888 5 -#define R128_DATATYPE_ARGB8888 6 -#define R128_DATATYPE_RGB332 7 -#define R128_DATATYPE_Y8 8 -#define R128_DATATYPE_RGB8 9 -#define R128_DATATYPE_CI16 10 -#define R128_DATATYPE_VYUY_422 11 -#define R128_DATATYPE_YVYU_422 12 -#define R128_DATATYPE_AYUV_444 14 -#define R128_DATATYPE_ARGB4444 15 - -#define R128_AGP_OFFSET 0x02000000 - -#define R128_WATERMARK_L 16 -#define R128_WATERMARK_M 8 -#define R128_WATERMARK_N 8 -#define R128_WATERMARK_K 128 diff --git a/hw/kdrive/ati/ati_sarea.h b/hw/kdrive/ati/ati_sarea.h deleted file mode 100644 index 2f04c7be0..000000000 --- a/hw/kdrive/ati/ati_sarea.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright © 2003 Eric Anholt - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Eric Anholt not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Eric Anholt makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _ATI_SAREA_H_ -#define _ATI_SAREA_H_ - -/* There are 2 heaps (local/AGP). Each region within a heap is a - * minimum of 64k, and there are at most 64 of them per heap. - */ -#define ATI_CARD_HEAP 0 -#define ATI_GART_HEAP 1 -#define ATI_NR_TEX_HEAPS 2 -#define ATI_NR_TEX_REGIONS 64 -#define ATI_LOG_TEX_GRANULARITY 16 - -#include "r128_sarea.h" -#include "radeon_sarea.h" - -#endif /* _ATI_SAREA_H_ */ diff --git a/hw/kdrive/ati/ati_stub.c b/hw/kdrive/ati/ati_stub.c deleted file mode 100644 index f881b7f7b..000000000 --- a/hw/kdrive/ati/ati_stub.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright © 2003 Eric Anholt - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Eric Anholt not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Eric Anholt makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "ati.h" -#include "klinux.h" - -extern struct pci_id_entry ati_pci_ids[]; - -void -InitCard(char *name) -{ - struct pci_id_entry *id; - KdCardAttr attr; - - for (id = ati_pci_ids; id->name != NULL; id++) { - int j = 0; - while (LinuxFindPci(id->vendor, id->device, j++, &attr)) - KdCardInfoAdd(&ATIFuncs, &attr, 0); - } -} - -void -InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) -{ - KdInitOutput(pScreenInfo, argc, argv); -} - -void -InitInput(int argc, char **argv) -{ - KdOsAddInputDrivers(); - KdInitInput(); -} - -void -ddxUseMsg (void) -{ - KdUseMsg(); -#ifdef KDRIVEVESA - vesaUseMsg(); -#endif -} - -int -ddxProcessArgument(int argc, char **argv, int i) -{ - int ret; - -#ifdef KDRIVEVESA - if (!(ret = vesaProcessArgument (argc, argv, i))) -#endif - ret = KdProcessArgument(argc, argv, i); - - return ret; -} diff --git a/hw/kdrive/ati/ati_video.c b/hw/kdrive/ati/ati_video.c deleted file mode 100644 index ca0ab464a..000000000 --- a/hw/kdrive/ati/ati_video.c +++ /dev/null @@ -1,988 +0,0 @@ -/* - * Copyright © 2004 Keith Packard - * Copyright © 2005 Eric Anholt - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Eric Anholt not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Eric Anholt makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - * - * Based on mach64video.c by Keith Packard. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "ati.h" -#include "ati_dma.h" -#include "ati_draw.h" -#include "ati_reg.h" -#include "kaa.h" - -#include -#include "fourcc.h" - -#define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE) - -static Atom xvBrightness, xvSaturation; - -extern CARD8 ATIBltRop[16]; - -#define IMAGE_MAX_WIDTH 2048 -#define IMAGE_MAX_HEIGHT 2048 - -static void -ATIStopVideo(KdScreenInfo *screen, pointer data, Bool exit) -{ - ScreenPtr pScreen = screen->pScreen; - ATIPortPrivPtr pPortPriv = (ATIPortPrivPtr)data; - - REGION_EMPTY(screen->pScreen, &pPortPriv->clip); - - if (pPortPriv->off_screen) { - KdOffscreenFree (pScreen, pPortPriv->off_screen); - pPortPriv->off_screen = 0; - } -} - -static int -ATISetPortAttribute(KdScreenInfo *screen, Atom attribute, int value, - pointer data) -{ - return BadMatch; -} - -static int -ATIGetPortAttribute(KdScreenInfo *screen, Atom attribute, int *value, - pointer data) -{ - return BadMatch; -} - -static void -ATIQueryBestSize(KdScreenInfo *screen, Bool motion, short vid_w, short vid_h, - short drw_w, short drw_h, unsigned int *p_w, unsigned int *p_h, - pointer data) -{ - *p_w = drw_w; - *p_h = drw_h; -} - -/* ATIClipVideo - - - Takes the dst box in standard X BoxRec form (top and left - edges inclusive, bottom and right exclusive). The new dst - box is returned. The source boundaries are given (x1, y1 - inclusive, x2, y2 exclusive) and returned are the new source - boundaries in 16.16 fixed point. -*/ - -static void -ATIClipVideo(BoxPtr dst, INT32 *x1, INT32 *x2, INT32 *y1, INT32 *y2, - BoxPtr extents, INT32 width, INT32 height) -{ - INT32 vscale, hscale, delta; - int diff; - - hscale = ((*x2 - *x1) << 16) / (dst->x2 - dst->x1); - vscale = ((*y2 - *y1) << 16) / (dst->y2 - dst->y1); - - *x1 <<= 16; *x2 <<= 16; - *y1 <<= 16; *y2 <<= 16; - - diff = extents->x1 - dst->x1; - if (diff > 0) { - dst->x1 = extents->x1; - *x1 += diff * hscale; - } - diff = dst->x2 - extents->x2; - if (diff > 0) { - dst->x2 = extents->x2; - *x2 -= diff * hscale; - } - diff = extents->y1 - dst->y1; - if (diff > 0) { - dst->y1 = extents->y1; - *y1 += diff * vscale; - } - diff = dst->y2 - extents->y2; - if (diff > 0) { - dst->y2 = extents->y2; - *y2 -= diff * vscale; - } - - if (*x1 < 0) { - diff = (- *x1 + hscale - 1)/ hscale; - dst->x1 += diff; - *x1 += diff * hscale; - } - delta = *x2 - (width << 16); - if (delta > 0) { - diff = (delta + hscale - 1)/ hscale; - dst->x2 -= diff; - *x2 -= diff * hscale; - } - if (*y1 < 0) { - diff = (- *y1 + vscale - 1)/ vscale; - dst->y1 += diff; - *y1 += diff * vscale; - } - delta = *y2 - (height << 16); - if (delta > 0) { - diff = (delta + vscale - 1)/ vscale; - dst->y2 -= diff; - *y2 -= diff * vscale; - } -} - -static void -R128DisplayVideo(KdScreenInfo *screen, ATIPortPrivPtr pPortPriv) -{ - ScreenPtr pScreen = screen->pScreen; - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - CARD32 dstDatatype, srcDatatype; - CARD32 dst_offset, dst_pitch; - int dstxoff, dstyoff; - PixmapPtr pPixmap = pPortPriv->pPixmap; - int bpp = pPixmap->drawable.bitsPerPixel; - RING_LOCALS; - - BoxPtr pBox = REGION_RECTS(&pPortPriv->clip); - int nBox = REGION_NUM_RECTS(&pPortPriv->clip); - - if (pPortPriv->id == FOURCC_UYVY) - srcDatatype = R128_DATATYPE_YVYU_422; - else - srcDatatype = R128_DATATYPE_VYUY_422; - - switch (bpp) - { - case 16: - if (pPixmap->drawable.depth == 15) - dstDatatype = R128_DATATYPE_ARGB1555; - else - dstDatatype = R128_DATATYPE_RGB565; - break; - case 32: - dstDatatype = R128_DATATYPE_ARGB8888; - break; - default: - return; - } - - dst_offset = ((CARD8 *)pPixmap->devPrivate.ptr - - pScreenPriv->screen->memory_base); - dst_pitch = pPixmap->devKind; -#ifdef COMPOSITE - dstxoff = -pPixmap->screen_x + pPixmap->drawable.x; - dstyoff = -pPixmap->screen_y + pPixmap->drawable.y; -#else - dstxoff = 0; - dstyoff = 0; -#endif - - BEGIN_DMA(18); - OUT_REG(ATI_REG_DST_PITCH_OFFSET, - ((dst_pitch / bpp) << 21) | (dst_offset >> 5)); - OUT_REG(ATI_REG_DP_GUI_MASTER_CNTL, - ATI_GMC_DST_PITCH_OFFSET_CNTL | - ATI_GMC_BRUSH_NONE | - (dstDatatype << 8) | - ATI_GMC_SRC_DATATYPE_COLOR | - (ATIBltRop[GXcopy] << 16) | - R128_GMC_3D_FCN_EN | - ATI_GMC_CLR_CMP_CNTL_DIS | - R128_GMC_AUX_CLIP_DIS); - OUT_REG(ATI_REG_DP_CNTL, - ATI_DST_X_LEFT_TO_RIGHT | ATI_DST_Y_TOP_TO_BOTTOM ); - OUT_REG(R128_REG_SCALE_3D_CNTL, - R128_SCALE_3D_SCALE | - R128_SBLEND_ONE | - R128_DBLEND_ZERO); - OUT_REG(R128_REG_TEX_CNTL_C, R128_TEX_CACHE_FLUSH); - OUT_REG(R128_REG_SCALE_3D_DATATYPE, srcDatatype); - - OUT_RING(DMA_PACKET0(R128_REG_SCALE_PITCH, 5)); - OUT_RING_REG(R128_REG_SCALE_PITCH, pPortPriv->src_pitch / 16); - OUT_RING_REG(R128_REG_SCALE_X_INC, - (pPortPriv->src_w << 16) / pPortPriv->dst_w); - OUT_RING_REG(R128_REG_SCALE_Y_INC, - (pPortPriv->src_h << 16) / pPortPriv->dst_h); - OUT_RING_REG(R128_REG_SCALE_HACC, 0x0); - OUT_RING_REG(R128_REG_SCALE_VACC, 0x0); - - END_DMA(); - - while (nBox--) { - int srcX, srcY, dstX, dstY, srcw, srch, dstw, dsth; - - dstX = pBox->x1 + dstxoff; - dstY = pBox->y1 + dstyoff; - dstw = pBox->x2 - pBox->x1; - dsth = pBox->y2 - pBox->y1; - srcX = (pBox->x1 - pPortPriv->dst_x1) * - pPortPriv->src_w / pPortPriv->dst_w; - srcY = (pBox->y1 - pPortPriv->dst_y1) * - pPortPriv->src_h / pPortPriv->dst_h; - srcw = pPortPriv->src_w - srcX; - srch = pPortPriv->src_h - srcY; - - BEGIN_DMA(6); - OUT_RING(DMA_PACKET0(R128_REG_SCALE_SRC_HEIGHT_WIDTH, 2)); - OUT_RING_REG(R128_REG_SCALE_SRC_HEIGHT_WIDTH, - (srch << 16) | srcw); - OUT_RING_REG(R128_REG_SCALE_OFFSET_0, pPortPriv->src_offset + - srcY * pPortPriv->src_pitch + srcX * 2); - - OUT_RING(DMA_PACKET0(R128_REG_SCALE_DST_X_Y, 2)); - OUT_RING_REG(R128_REG_SCALE_DST_X_Y, (dstX << 16) | dstY); - OUT_RING_REG(R128_REG_SCALE_DST_HEIGHT_WIDTH, - (dsth << 16) | dstw); - END_DMA(); - pBox++; - } -#ifdef DAMAGEEXT - /* XXX: Shouldn't this be in kxv.c instead? */ - DamageDamageRegion(pPortPriv->pDraw, &pPortPriv->clip); -#endif - kaaMarkSync(pScreen); -} - -union intfloat { - float f; - CARD32 i; -}; - -struct blend_vertex { - union intfloat x, y; - union intfloat s0, t0; -}; - -#define VTX_DWORD_COUNT 4 - -#define VTX_OUT(vtx) \ -do { \ - OUT_RING(vtx.x.i); \ - OUT_RING(vtx.y.i); \ - OUT_RING(vtx.s0.i); \ - OUT_RING(vtx.t0.i); \ -} while (0) - -static void -RadeonDisplayVideo(KdScreenInfo *screen, ATIPortPrivPtr pPortPriv) -{ - ScreenPtr pScreen = screen->pScreen; - KdScreenPriv(pScreen); - ATICardInfo(pScreenPriv); - ATIScreenInfo(pScreenPriv); - struct blend_vertex vtx[4]; - PixmapPtr pPixmap = pPortPriv->pPixmap; - CARD32 txformat; - CARD32 dst_offset, dst_pitch, dst_format; - int dstxoff, dstyoff, pixel_shift; - RING_LOCALS; - - BoxPtr pBox = REGION_RECTS(&pPortPriv->clip); - int nBox = REGION_NUM_RECTS(&pPortPriv->clip); - - switch (pPixmap->drawable.bitsPerPixel) { - case 16: - if (pPixmap->drawable.depth == 15) - dst_format = RADEON_COLOR_FORMAT_ARGB1555; - else - dst_format = RADEON_COLOR_FORMAT_RGB565; - pixel_shift = 1; - break; - case 32: - dst_format = RADEON_COLOR_FORMAT_ARGB8888; - pixel_shift = 2; - break; - default: - return; - } - - dst_offset = ((CARD8 *)pPixmap->devPrivate.ptr - - pScreenPriv->screen->memory_base); - dst_pitch = pPixmap->devKind; - -#ifdef COMPOSITE - dstxoff = -pPixmap->screen_x + pPixmap->drawable.x; - dstyoff = -pPixmap->screen_y + pPixmap->drawable.y; -#else - dstxoff = 0; - dstyoff = 0; -#endif - - /* Same for R100/R200 */ - if (pPortPriv->id == FOURCC_UYVY) - txformat = RADEON_TXFORMAT_YVYU422; - else - txformat = RADEON_TXFORMAT_VYUY422; - - txformat |= RADEON_TXFORMAT_NON_POWER2; - - RadeonSwitchTo3D(atis); - - BEGIN_DMA(8); - - OUT_RING(DMA_PACKET0(RADEON_REG_PP_CNTL, 3)); - OUT_RING_REG(RADEON_REG_PP_CNTL, - RADEON_TEX_0_ENABLE | RADEON_TEX_BLEND_0_ENABLE); - OUT_RING_REG(RADEON_REG_RB3D_CNTL, - dst_format | RADEON_ALPHA_BLEND_ENABLE); - OUT_RING_REG(RADEON_REG_RB3D_COLOROFFSET, dst_offset); - - OUT_REG(RADEON_REG_RB3D_COLORPITCH, dst_pitch >> pixel_shift); - - OUT_REG(RADEON_REG_RB3D_BLENDCNTL, - RADEON_SBLEND_GL_ONE | RADEON_DBLEND_GL_ZERO); - - END_DMA(); - - if (atic->is_r200) { - BEGIN_DMA(17); - - OUT_REG(R200_REG_SE_VTX_FMT_0, R200_VTX_XY); - OUT_REG(R200_REG_SE_VTX_FMT_1, - (2 << R200_VTX_TEX0_COMP_CNT_SHIFT)); - - OUT_RING(DMA_PACKET0(R200_REG_PP_TXFILTER_0, 5)); - OUT_RING_REG(R200_REG_PP_TXFILTER_0, - R200_MAG_FILTER_LINEAR | - R200_MIN_FILTER_LINEAR | - R200_YUV_TO_RGB); - OUT_RING_REG(R200_REG_PP_TXFORMAT_0, txformat); - OUT_RING_REG(R200_REG_PP_TXFORMAT_X_0, 0); - OUT_RING_REG(R200_REG_PP_TXSIZE_0, - (pPixmap->drawable.width - 1) | - ((pPixmap->drawable.height - 1) << RADEON_TEX_VSIZE_SHIFT)); - OUT_RING_REG(R200_REG_PP_TXPITCH_0, pPortPriv->src_pitch - 32); - - OUT_REG(R200_PP_TXOFFSET_0, pPortPriv->src_offset); - - OUT_RING(DMA_PACKET0(R200_REG_PP_TXCBLEND_0, 4)); - OUT_RING_REG(R200_REG_PP_TXCBLEND_0, - R200_TXC_ARG_A_ZERO | - R200_TXC_ARG_B_ZERO | - R200_TXC_ARG_C_R0_COLOR | - R200_TXC_OP_MADD); - OUT_RING_REG(R200_REG_PP_TXCBLEND2_0, - R200_TXC_CLAMP_0_1 | R200_TXC_OUTPUT_REG_R0); - OUT_RING_REG(R200_REG_PP_TXABLEND_0, - R200_TXA_ARG_A_ZERO | - R200_TXA_ARG_B_ZERO | - R200_TXA_ARG_C_R0_ALPHA | - R200_TXA_OP_MADD); - OUT_RING_REG(R200_REG_PP_TXABLEND2_0, - R200_TXA_CLAMP_0_1 | R200_TXA_OUTPUT_REG_R0); - - END_DMA(); - } else { -// BEGIN_DMA(11); - BEGIN_DMA(9); - - OUT_RING(DMA_PACKET0(RADEON_REG_PP_TXFILTER_0, 5)); - OUT_RING_REG(RADEON_REG_PP_TXFILTER_0, RADEON_MAG_FILTER_LINEAR | - RADEON_MIN_FILTER_LINEAR | - RADEON_YUV_TO_RGB); - OUT_RING_REG(RADEON_REG_PP_TXFORMAT_0, txformat); - OUT_RING_REG(RADEON_REG_PP_TXOFFSET_0, pPortPriv->src_offset); - OUT_RING_REG(RADEON_REG_PP_TXCBLEND_0, - RADEON_COLOR_ARG_A_ZERO | - RADEON_COLOR_ARG_B_ZERO | - RADEON_COLOR_ARG_C_T0_COLOR | - RADEON_BLEND_CTL_ADD | - RADEON_CLAMP_TX); - OUT_RING_REG(RADEON_REG_PP_TXABLEND_0, - RADEON_ALPHA_ARG_A_ZERO | - RADEON_ALPHA_ARG_B_ZERO | - RADEON_ALPHA_ARG_C_T0_ALPHA | - RADEON_BLEND_CTL_ADD | - RADEON_CLAMP_TX); - - OUT_RING(DMA_PACKET0(RADEON_REG_PP_TEX_SIZE_0, 2)); - OUT_RING_REG(RADEON_REG_PP_TEX_SIZE_0, - (pPixmap->drawable.width - 1) | - ((pPixmap->drawable.height - 1) << RADEON_TEX_VSIZE_SHIFT)); - OUT_RING_REG(RADEON_REG_PP_TEX_PITCH_0, - pPortPriv->src_pitch - 32); - -// OUT_RING_REG(ATI_REG_WAIT_UNTIL, ATI_WAIT_CRTC_VLINE); - - END_DMA(); - } - - while (nBox--) { - float srcX, srcY, dstX, dstY, srcw, srch, dstw, dsth; - - dstX = pBox->x1 + dstxoff; - dstY = pBox->y1 + dstyoff; - dstw = pBox->x2 - pBox->x1; - dsth = pBox->y2 - pBox->y1; - srcX = (pBox->x1 - pPortPriv->dst_x1) * - pPortPriv->src_w / pPortPriv->dst_w; - srcY = (pBox->y1 - pPortPriv->dst_y1) * - pPortPriv->src_h / pPortPriv->dst_h; - srcw = pPortPriv->src_w * (dstw / pPortPriv->dst_w); - srch = pPortPriv->src_h * (dsth / pPortPriv->dst_h); - - /* - * rectangle: - * - * +---------2 - * | | - * | | - * 0---------1 - */ - - vtx[0].x.f = dstX; - vtx[0].y.f = dstY + dsth; - vtx[0].s0.f = srcX; - vtx[0].t0.f = srcY + srch; - - vtx[1].x.f = dstX + dstw; - vtx[1].y.f = dstY + dsth; - vtx[1].s0.f = srcX + srcw; - vtx[1].t0.f = srcY + srch; - - vtx[2].x.f = dstX + dstw; - vtx[2].y.f = dstY; - vtx[2].s0.f = srcX + srcw; - vtx[2].t0.f = srcY; - - if (atic->is_r100) { - BEGIN_DMA(3 * VTX_DWORD_COUNT + 3); - OUT_RING(DMA_PACKET3(RADEON_CP_PACKET3_3D_DRAW_IMMD, - 3 * VTX_DWORD_COUNT + 2)); - OUT_RING(RADEON_CP_VC_FRMT_XY | - RADEON_CP_VC_FRMT_ST0); - OUT_RING(RADEON_CP_VC_CNTL_PRIM_TYPE_RECT_LIST | - RADEON_CP_VC_CNTL_PRIM_WALK_RING | - RADEON_CP_VC_CNTL_MAOS_ENABLE | - RADEON_CP_VC_CNTL_VTX_FMT_RADEON_MODE | - (3 << RADEON_CP_VC_CNTL_NUM_SHIFT)); - } else { - BEGIN_DMA(3 * VTX_DWORD_COUNT + 2); - OUT_RING(DMA_PACKET3(R200_CP_PACKET3_3D_DRAW_IMMD_2, - 3 * VTX_DWORD_COUNT + 1)); - OUT_RING(RADEON_CP_VC_CNTL_PRIM_TYPE_RECT_LIST | - RADEON_CP_VC_CNTL_PRIM_WALK_RING | - (3 << RADEON_CP_VC_CNTL_NUM_SHIFT)); - } - - VTX_OUT(vtx[0]); - VTX_OUT(vtx[1]); - VTX_OUT(vtx[2]); - END_DMA(); - - pBox++; - } -#ifdef DAMAGEEXT - /* XXX: Shouldn't this be in kxv.c instead? */ - DamageDamageRegion(pPortPriv->pDraw, &pPortPriv->clip); -#endif - kaaMarkSync(pScreen); -} - -static void -ATIVideoSave(ScreenPtr pScreen, KdOffscreenArea *area) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATIPortPrivPtr pPortPriv = atis->pAdaptor->pPortPrivates[0].ptr; - - if (pPortPriv->off_screen == area) - pPortPriv->off_screen = 0; -} - -static int -ATIPutImage(KdScreenInfo *screen, DrawablePtr pDraw, - short src_x, short src_y, - short drw_x, short drw_y, - short src_w, short src_h, - short drw_w, short drw_h, - int id, - unsigned char *buf, - short width, - short height, - Bool sync, - RegionPtr clipBoxes, - pointer data) -{ - ScreenPtr pScreen = screen->pScreen; - KdScreenPriv(pScreen); - ATICardInfo(pScreenPriv); - ATIScreenInfo(pScreenPriv); - ATIPortPrivPtr pPortPriv = (ATIPortPrivPtr)data; - char *mmio = atic->reg_base; - INT32 x1, x2, y1, y2; - int randr = RR_Rotate_0 /* XXX */; - int srcPitch, srcPitch2, dstPitch; - int top, left, npixels, nlines, size; - BoxRec dstBox; - int dst_width = width, dst_height = height; - int rot_x1, rot_y1, rot_x2, rot_y2; - int dst_x1, dst_y1, dst_x2, dst_y2; - int rot_src_w, rot_src_h, rot_drw_w, rot_drw_h; - - /* Clip */ - x1 = src_x; - x2 = src_x + src_w; - y1 = src_y; - y2 = src_y + src_h; - - dstBox.x1 = drw_x; - dstBox.x2 = drw_x + drw_w; - dstBox.y1 = drw_y; - dstBox.y2 = drw_y + drw_h; - - ATIClipVideo(&dstBox, &x1, &x2, &y1, &y2, - REGION_EXTENTS(pScreen, clipBoxes), width, height); - - src_w = (x2 - x1) >> 16; - src_h = (y2 - y1) >> 16; - drw_w = dstBox.x2 - dstBox.x1; - drw_h = dstBox.y2 - dstBox.y1; - - if ((x1 >= x2) || (y1 >= y2)) - return Success; - - if (mmio == NULL) - return BadAlloc; - - if (randr & (RR_Rotate_0|RR_Rotate_180)) { - dst_width = width; - dst_height = height; - rot_src_w = src_w; - rot_src_h = src_h; - rot_drw_w = drw_w; - rot_drw_h = drw_h; - } else { - dst_width = height; - dst_height = width; - rot_src_w = src_h; - rot_src_h = src_w; - rot_drw_w = drw_h; - rot_drw_h = drw_w; - } - - switch (randr & RR_Rotate_All) { - case RR_Rotate_0: - default: - dst_x1 = dstBox.x1; - dst_y1 = dstBox.y1; - dst_x2 = dstBox.x2; - dst_y2 = dstBox.y2; - rot_x1 = x1; - rot_y1 = y1; - rot_x2 = x2; - rot_y2 = y2; - break; - case RR_Rotate_90: - dst_x1 = dstBox.y1; - dst_y1 = screen->height - dstBox.x2; - dst_x2 = dstBox.y2; - dst_y2 = screen->height - dstBox.x1; - rot_x1 = y1; - rot_y1 = (src_w << 16) - x2; - rot_x2 = y2; - rot_y2 = (src_w << 16) - x1; - break; - case RR_Rotate_180: - dst_x1 = screen->width - dstBox.x2; - dst_y1 = screen->height - dstBox.y2; - dst_x2 = screen->width - dstBox.x1; - dst_y2 = screen->height - dstBox.y1; - rot_x1 = (src_w << 16) - x2; - rot_y1 = (src_h << 16) - y2; - rot_x2 = (src_w << 16) - x1; - rot_y2 = (src_h << 16) - y1; - break; - case RR_Rotate_270: - dst_x1 = screen->width - dstBox.y2; - dst_y1 = dstBox.x1; - dst_x2 = screen->width - dstBox.y1; - dst_y2 = dstBox.x2; - rot_x1 = (src_h << 16) - y2; - rot_y1 = x1; - rot_x2 = (src_h << 16) - y1; - rot_y2 = x2; - break; - } - - switch(id) { - case FOURCC_YV12: - case FOURCC_I420: - dstPitch = ((dst_width << 1) + 15) & ~15; - srcPitch = (width + 3) & ~3; - srcPitch2 = ((width >> 1) + 3) & ~3; - size = dstPitch * dst_height; - break; - case FOURCC_UYVY: - case FOURCC_YUY2: - default: - dstPitch = ((dst_width << 1) + 15) & ~15; - srcPitch = (width << 1); - srcPitch2 = 0; - size = dstPitch * dst_height; - break; - } - - if (pPortPriv->off_screen != NULL && size != pPortPriv->size) { - KdOffscreenFree(screen->pScreen, pPortPriv->off_screen); - pPortPriv->off_screen = 0; - } - - if (pPortPriv->off_screen == NULL) { - pPortPriv->off_screen = KdOffscreenAlloc(screen->pScreen, - size * 2, 64, TRUE, ATIVideoSave, pPortPriv); - if (pPortPriv->off_screen == NULL) - return BadAlloc; - } - - - if (pDraw->type == DRAWABLE_WINDOW) - pPortPriv->pPixmap = - (*pScreen->GetWindowPixmap)((WindowPtr)pDraw); - else - pPortPriv->pPixmap = (PixmapPtr)pDraw; - - /* Migrate the pixmap to offscreen if necessary. */ - if (!kaaPixmapIsOffscreen(pPortPriv->pPixmap)) - kaaMoveInPixmap(pPortPriv->pPixmap); - - if (!kaaPixmapIsOffscreen(pPortPriv->pPixmap)) { - return BadAlloc; - } - - pPortPriv->src_offset = pPortPriv->off_screen->offset; - pPortPriv->src_addr = (CARD8 *)(pScreenPriv->screen->memory_base + - pPortPriv->src_offset); - pPortPriv->src_pitch = dstPitch; - pPortPriv->size = size; - pPortPriv->pDraw = pDraw; - - /* copy data */ - top = rot_y1 >> 16; - left = (rot_x1 >> 16) & ~1; - npixels = ((((rot_x2 + 0xffff) >> 16) + 1) & ~1) - left; - - /* Since we're probably overwriting the area that might still be used - * for the last PutImage request, wait for idle. - */ - ATIWaitIdle(atis); - - switch(id) { - case FOURCC_YV12: - case FOURCC_I420: - top &= ~1; - nlines = ((((rot_y2 + 0xffff) >> 16) + 1) & ~1) - top; - KdXVCopyPlanarData(screen, buf, pPortPriv->src_addr, randr, - srcPitch, srcPitch2, dstPitch, rot_src_w, rot_src_h, - height, top, left, nlines, npixels, id); - break; - case FOURCC_UYVY: - case FOURCC_YUY2: - default: - nlines = ((rot_y2 + 0xffff) >> 16) - top; - KdXVCopyPackedData(screen, buf, pPortPriv->src_addr, randr, - srcPitch, dstPitch, rot_src_w, rot_src_h, top, left, - nlines, npixels); - break; - } - - /* update cliplist */ - if (!REGION_EQUAL(screen->pScreen, &pPortPriv->clip, clipBoxes)) { - REGION_COPY(screen->pScreen, &pPortPriv->clip, clipBoxes); - } - - pPortPriv->id = id; - pPortPriv->src_x1 = rot_x1; - pPortPriv->src_y1 = rot_y1; - pPortPriv->src_x2 = rot_x2; - pPortPriv->src_y2 = rot_y2; - pPortPriv->src_w = rot_src_w; - pPortPriv->src_h = rot_src_h; - pPortPriv->dst_x1 = dst_x1; - pPortPriv->dst_y1 = dst_y1; - pPortPriv->dst_x2 = dst_x2; - pPortPriv->dst_y2 = dst_y2; - pPortPriv->dst_w = rot_drw_w; - pPortPriv->dst_h = rot_drw_h; - - if (atic->is_radeon) - RadeonDisplayVideo(screen, pPortPriv); - else - R128DisplayVideo(screen, pPortPriv); - - return Success; -} - -static int -ATIReputImage(KdScreenInfo *screen, DrawablePtr pDraw, short drw_x, short drw_y, - RegionPtr clipBoxes, pointer data) -{ - ScreenPtr pScreen = screen->pScreen; - KdScreenPriv(pScreen); - ATICardInfo(pScreenPriv); - ATIPortPrivPtr pPortPriv = (ATIPortPrivPtr)data; - BoxPtr pOldExtents = REGION_EXTENTS(screen->pScreen, &pPortPriv->clip); - BoxPtr pNewExtents = REGION_EXTENTS(screen->pScreen, clipBoxes); - - if (pOldExtents->x1 != pNewExtents->x1 || - pOldExtents->x2 != pNewExtents->x2 || - pOldExtents->y1 != pNewExtents->y1 || - pOldExtents->y2 != pNewExtents->y2) - return BadMatch; - - if (pDraw->type == DRAWABLE_WINDOW) - pPortPriv->pPixmap = - (*pScreen->GetWindowPixmap)((WindowPtr)pDraw); - else - pPortPriv->pPixmap = (PixmapPtr)pDraw; - - if (!kaaPixmapIsOffscreen(pPortPriv->pPixmap)) - kaaMoveInPixmap(pPortPriv->pPixmap); - - if (!kaaPixmapIsOffscreen(pPortPriv->pPixmap)) { - ErrorF("err\n"); - return BadAlloc; - } - - - /* update cliplist */ - if (!REGION_EQUAL(screen->pScreen, &pPortPriv->clip, clipBoxes)) - REGION_COPY(screen->pScreen, &pPortPriv->clip, clipBoxes); - - /* XXX: What do the drw_x and drw_y here mean for us? */ - - if (atic->is_radeon) - RadeonDisplayVideo(screen, pPortPriv); - else - R128DisplayVideo(screen, pPortPriv); - - return Success; -} - -static int -ATIQueryImageAttributes(KdScreenInfo *screen, int id, unsigned short *w, - unsigned short *h, int *pitches, int *offsets) -{ - int size, tmp; - - if (*w > IMAGE_MAX_WIDTH) - *w = IMAGE_MAX_WIDTH; - if (*h > IMAGE_MAX_HEIGHT) - *h = IMAGE_MAX_HEIGHT; - - *w = (*w + 1) & ~1; - if (offsets) - offsets[0] = 0; - - switch (id) - { - case FOURCC_YV12: - case FOURCC_I420: - *h = (*h + 1) & ~1; - size = (*w + 3) & ~3; - if (pitches) - pitches[0] = size; - size *= *h; - if (offsets) - offsets[1] = size; - tmp = ((*w >> 1) + 3) & ~3; - if (pitches) - pitches[1] = pitches[2] = tmp; - tmp *= (*h >> 1); - size += tmp; - if (offsets) - offsets[2] = size; - size += tmp; - break; - case FOURCC_UYVY: - case FOURCC_YUY2: - default: - size = *w << 1; - if (pitches) - pitches[0] = size; - size *= *h; - break; - } - - return size; -} - - -/* client libraries expect an encoding */ -static KdVideoEncodingRec DummyEncoding[1] = -{ - { - 0, - "XV_IMAGE", - IMAGE_MAX_WIDTH, IMAGE_MAX_HEIGHT, - {1, 1} - } -}; - -#define NUM_FORMATS 3 - -static KdVideoFormatRec Formats[NUM_FORMATS] = -{ - {15, TrueColor}, {16, TrueColor}, {24, TrueColor} -}; - -#define NUM_ATTRIBUTES 0 - -static KdAttributeRec Attributes[NUM_ATTRIBUTES] = -{ -}; - -#define NUM_IMAGES 4 - -static KdImageRec Images[NUM_IMAGES] = -{ - XVIMAGE_YUY2, - XVIMAGE_YV12, - XVIMAGE_I420, - XVIMAGE_UYVY -}; - -static KdVideoAdaptorPtr -ATISetupImageVideo(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - KdVideoAdaptorPtr adapt; - ATIPortPrivPtr pPortPriv; - int i; - - atis->num_texture_ports = 16; - - adapt = xcalloc(1, sizeof(KdVideoAdaptorRec) + atis->num_texture_ports * - (sizeof(ATIPortPrivRec) + sizeof(DevUnion))); - if (adapt == NULL) - return NULL; - - adapt->type = XvWindowMask | XvInputMask | XvImageMask; - adapt->flags = VIDEO_CLIP_TO_VIEWPORT; - adapt->name = "ATI Texture Video"; - adapt->nEncodings = 1; - adapt->pEncodings = DummyEncoding; - adapt->nFormats = NUM_FORMATS; - adapt->pFormats = Formats; - adapt->nPorts = atis->num_texture_ports; - adapt->pPortPrivates = (DevUnion*)(&adapt[1]); - - pPortPriv = - (ATIPortPrivPtr)(&adapt->pPortPrivates[atis->num_texture_ports]); - - for (i = 0; i < atis->num_texture_ports; i++) - adapt->pPortPrivates[i].ptr = &pPortPriv[i]; - - adapt->nAttributes = NUM_ATTRIBUTES; - adapt->pAttributes = Attributes; - adapt->pImages = Images; - adapt->nImages = NUM_IMAGES; - adapt->PutVideo = NULL; - adapt->PutStill = NULL; - adapt->GetVideo = NULL; - adapt->GetStill = NULL; - adapt->StopVideo = ATIStopVideo; - adapt->SetPortAttribute = ATISetPortAttribute; - adapt->GetPortAttribute = ATIGetPortAttribute; - adapt->QueryBestSize = ATIQueryBestSize; - adapt->PutImage = ATIPutImage; - adapt->ReputImage = ATIReputImage; - adapt->QueryImageAttributes = ATIQueryImageAttributes; - - /* gotta uninit this someplace */ - REGION_INIT(pScreen, &pPortPriv->clip, NullBox, 0); - - atis->pAdaptor = adapt; - - xvBrightness = MAKE_ATOM("XV_BRIGHTNESS"); - xvSaturation = MAKE_ATOM("XV_SATURATION"); - - return adapt; -} - -Bool ATIInitVideo(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - KdScreenInfo *screen = pScreenPriv->screen; - KdVideoAdaptorPtr *adaptors, *newAdaptors = NULL; - KdVideoAdaptorPtr newAdaptor = NULL; - int num_adaptors; - - atis->pAdaptor = NULL; - - if (atic->reg_base == NULL) - return FALSE; - if (atic->is_r300) - return FALSE; - - num_adaptors = KdXVListGenericAdaptors(screen, &adaptors); - - newAdaptor = ATISetupImageVideo(pScreen); - - if (newAdaptor) { - if (!num_adaptors) { - num_adaptors = 1; - adaptors = &newAdaptor; - } else { - newAdaptors = xalloc((num_adaptors + 1) * - sizeof(KdVideoAdaptorPtr *)); - if (newAdaptors) { - memcpy(newAdaptors, adaptors, num_adaptors * - sizeof(KdVideoAdaptorPtr)); - newAdaptors[num_adaptors] = newAdaptor; - adaptors = newAdaptors; - num_adaptors++; - } - } - } - - if (num_adaptors) - KdXVScreenInit(pScreen, adaptors, num_adaptors); - - if (newAdaptors) - xfree(newAdaptors); - - return TRUE; -} - -void -ATIFiniVideo(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ATIScreenInfo(pScreenPriv); - KdVideoAdaptorPtr adapt = atis->pAdaptor; - ATIPortPrivPtr pPortPriv; - int i; - - if (!adapt) - return; - - for (i = 0; i < atis->num_texture_ports; i++) { - pPortPriv = (ATIPortPrivPtr)(&adapt->pPortPrivates[i].ptr); - REGION_UNINIT(pScreen, &pPortPriv->clip); - } - xfree(adapt); - atis->pAdaptor = NULL; -} diff --git a/hw/kdrive/ati/r128_blendtmp.h b/hw/kdrive/ati/r128_blendtmp.h deleted file mode 100644 index b663eac95..000000000 --- a/hw/kdrive/ati/r128_blendtmp.h +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright © 2003 Eric Anholt, Anders Carlsson - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Eric Anholt not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Eric Anholt makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef USE_DMA -#define TAG(x) x##DMA -#define LOCALS RING_LOCALS; \ - (void)atic -#define BEGIN(x) BEGIN_RING(x * 2) -#define OUT_REG(reg, val) OUT_RING_REG(reg, val) -#define END() ADVANCE_RING() -#else -#define TAG(x) x##MMIO -#define LOCALS char *mmio = atic->reg_base -#define BEGIN(x) ATIWaitAvailMMIO(x) -#define OUT_REG(reg, val) MMIO_OUT32(mmio, (reg), (val)) -#define END() -#endif - -static Bool -TAG(R128PrepareBlend)(int op, PicturePtr pSrcPicture, PicturePtr pDstPicture, - PixmapPtr pSrc, PixmapPtr pDst) -{ - KdScreenPriv(pDst->drawable.pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - CARD32 dstDatatype, srcDatatype; - LOCALS; - - accel_atis = atis; - - if (!TAG(ATISetup)(pDst, pSrc)) - return FALSE; - - src_bpp = pSrc->drawable.bitsPerPixel; - is_repeat = pSrcPicture->repeat; - - if (op >= sizeof(R128BlendOp)/sizeof(R128BlendOp[0])) - ATI_FALLBACK(("Unsupported op 0x%x\n", op)); - if (pSrcPicture->repeat && (pSrc->drawable.width != 1 || - pSrc->drawable.height != 1)) - ATI_FALLBACK(("repeat unsupported\n")); - if (pSrcPicture->transform != NULL) - ATI_FALLBACK(("transform unsupported\n")); - if (!R128GetDatatypePict(pDstPicture->format, &dstDatatype)) - ATI_FALLBACK(("Unsupported dest format 0x%x\n", - pDstPicture->format)); - if (!R128GetDatatypePict(pSrcPicture->format, &srcDatatype)) - ATI_FALLBACK(("Unsupported src format 0x%x\n", - pSrcPicture->format)); - - BEGIN(11); - OUT_REG(RADEON_REG_DP_GUI_MASTER_CNTL, - (dstDatatype << 8) | - RADEON_GMC_SRC_DATATYPE_COLOR | - RADEON_GMC_DST_PITCH_OFFSET_CNTL | - RADEON_GMC_CLR_CMP_CNTL_DIS | - RADEON_GMC_AUX_CLIP_DIS | - (ATIBltRop[3] << 16) | - RADEON_GMC_3D_FCN_EN); - OUT_REG(R128_REG_TEX_CNTL_C, R128_TEX_ALPHA_EN | R128_TEX_CACHE_FLUSH); - OUT_REG(R128_REG_PRIM_TEXTURE_COMBINE_CNTL_C, 0); - OUT_REG(R128_REG_SCALE_3D_CNTL, - R128_SCALE_3D_SCALE | - R128BlendOp[op] | - R128_TEX_MAP_ALPHA_IN_TEXTURE); - OUT_REG(R128_REG_SCALE_3D_DATATYPE, srcDatatype); - OUT_REG(R128_REG_SCALE_PITCH, src_pitch / src_bpp); - /* 4.16 fixed point scaling factor? */ - if (is_repeat) { - OUT_REG(R128_REG_SCALE_X_INC, 0); - OUT_REG(R128_REG_SCALE_Y_INC, 0); - } else { - OUT_REG(R128_REG_SCALE_X_INC, 65536); - OUT_REG(R128_REG_SCALE_Y_INC, 65536); - } - OUT_REG(R128_REG_SCALE_HACC, 0x00000000); - OUT_REG(R128_REG_SCALE_VACC, 0x00000000); - OUT_REG(RADEON_REG_DP_CNTL, - RADEON_DST_X_LEFT_TO_RIGHT | RADEON_DST_Y_TOP_TO_BOTTOM ); - END(); - - return TRUE; -} - -static void -TAG(R128Blend)(int srcX, int srcY, int dstX, int dstY, int width, int height) -{ - ATIScreenInfo *atis = accel_atis; - ATICardInfo *atic = atis->atic; - LOCALS; - - if (is_repeat) { - srcX = 0; - srcY = 0; - } - - BEGIN(4); - OUT_REG(R128_REG_SCALE_OFFSET_0, src_offset + srcY * src_pitch + srcX * - (src_bpp >> 3)); - OUT_REG(R128_REG_SCALE_SRC_HEIGHT_WIDTH, (height << 16) | width); - OUT_REG(R128_REG_SCALE_DST_X_Y, (dstX << 16) | dstY); - OUT_REG(R128_REG_SCALE_DST_HEIGHT_WIDTH, (height << 16) | width); - END(); -} - -static void -TAG(R128DoneBlend)(void) -{ -} - -#undef TAG -#undef LOCALS -#undef BEGIN -#undef OUT_REG -#undef END diff --git a/hw/kdrive/ati/r128_common.h b/hw/kdrive/ati/r128_common.h deleted file mode 100644 index 862fea599..000000000 --- a/hw/kdrive/ati/r128_common.h +++ /dev/null @@ -1,170 +0,0 @@ -/* r128_common.h -- common header definitions for R128 2D/3D/DRM suite - * Created: Sun Apr 9 18:16:28 2000 by kevin@precisioninsight.com - * - * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas. - * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Author: - * Gareth Hughes - * Kevin E. Martin - * - * Converted to common header format: - * Jens Owen - * - * - */ - -#ifndef _R128_COMMON_H_ -#define _R128_COMMON_H_ - -#include "X11/Xmd.h" - -/* - * WARNING: If you change any of these defines, make sure to change - * the kernel include file as well (r128_drm.h) - */ - -/* Driver specific DRM command indices - * NOTE: these are not OS specific, but they are driver specific - */ -#define DRM_R128_INIT 0x00 -#define DRM_R128_CCE_START 0x01 -#define DRM_R128_CCE_STOP 0x02 -#define DRM_R128_CCE_RESET 0x03 -#define DRM_R128_CCE_IDLE 0x04 -#define DRM_R128_UNDEFINED1 0x05 -#define DRM_R128_RESET 0x06 -#define DRM_R128_SWAP 0x07 -#define DRM_R128_CLEAR 0x08 -#define DRM_R128_VERTEX 0x09 -#define DRM_R128_INDICES 0x0a -#define DRM_R128_BLIT 0x0b -#define DRM_R128_DEPTH 0x0c -#define DRM_R128_STIPPLE 0x0d -#define DRM_R128_UNDEFINED2 0x0e -#define DRM_R128_INDIRECT 0x0f -#define DRM_R128_FULLSCREEN 0x10 -#define DRM_R128_CLEAR2 0x11 -#define DRM_R128_GETPARAM 0x12 -#define DRM_R128_FLIP 0x13 - -#define DRM_R128_FRONT_BUFFER 0x1 -#define DRM_R128_BACK_BUFFER 0x2 -#define DRM_R128_DEPTH_BUFFER 0x4 - -typedef struct { - enum { - DRM_R128_INIT_CCE = 0x01, - DRM_R128_CLEANUP_CCE = 0x02 - } func; - unsigned long sarea_priv_offset; - int is_pci; - int cce_mode; - int cce_secure; /* FIXME: Deprecated, we should remove this */ - int ring_size; - int usec_timeout; - - unsigned int fb_bpp; - unsigned int front_offset, front_pitch; - unsigned int back_offset, back_pitch; - unsigned int depth_bpp; - unsigned int depth_offset, depth_pitch; - unsigned int span_offset; - - unsigned long fb_offset; - unsigned long mmio_offset; - unsigned long ring_offset; - unsigned long ring_rptr_offset; - unsigned long buffers_offset; - unsigned long agp_textures_offset; -} drmR128Init; - -typedef struct { - int flush; - int idle; -} drmR128CCEStop; - -typedef struct { - int idx; - int start; - int end; - int discard; -} drmR128Indirect; - -typedef struct { - int idx; - int pitch; - int offset; - int format; - unsigned short x, y; - unsigned short width, height; -} drmR128Blit; - -typedef struct { - enum { - DRM_R128_WRITE_SPAN = 0x01, - DRM_R128_WRITE_PIXELS = 0x02, - DRM_R128_READ_SPAN = 0x03, - DRM_R128_READ_PIXELS = 0x04 - } func; - int n; - int *x; - int *y; - unsigned int *buffer; - unsigned char *mask; -} drmR128Depth; - -typedef struct { - int prim; - int idx; /* Index of vertex buffer */ - int count; /* Number of vertices in buffer */ - int discard; /* Client finished with buffer? */ -} drmR128Vertex; - -typedef struct { - unsigned int *mask; -} drmR128Stipple; - -typedef struct { - unsigned int flags; - unsigned int clear_color; - unsigned int clear_depth; - unsigned int color_mask; - unsigned int depth_mask; -} drmR128Clear; - -typedef struct { - enum { - DRM_R128_INIT_FULLSCREEN = 0x01, - DRM_R128_CLEANUP_FULLSCREEN = 0x02 - } func; -} drmR128Fullscreen; - -typedef struct drm_r128_getparam { - int param; - int *value; -} drmR128GetParam; - -#define R128_PARAM_IRQ_NR 1 - -#endif diff --git a/hw/kdrive/ati/r128_composite.c b/hw/kdrive/ati/r128_composite.c deleted file mode 100644 index 0d18ebff7..000000000 --- a/hw/kdrive/ati/r128_composite.c +++ /dev/null @@ -1,564 +0,0 @@ -/* - * Copyright © 2003 Eric Anholt, Anders Carlsson - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Eric Anholt not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Eric Anholt makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#include "ati.h" -#include "ati_reg.h" -#include "ati_dma.h" -#include "ati_draw.h" - -extern ATIScreenInfo *accel_atis; -extern int sample_count; -extern float sample_offsets_x[255]; -extern float sample_offsets_y[255]; -extern CARD8 ATIBltRop[16]; - -static int widths[2] = {1,1}; -static int heights[2] = {1,1}; -static Bool is_transform[2]; -static PictTransform *transform[2]; - -struct blendinfo { - Bool dst_alpha; - Bool src_alpha; - CARD32 blendctl; -}; - -static struct blendinfo R128BlendOp[] = { - /* Clear */ - {0, 0, R128_SBLEND_ZERO | R128_DBLEND_ZERO}, - /* Src */ - {0, 0, R128_SBLEND_ONE | R128_DBLEND_ZERO}, - /* Dst */ - {0, 0, R128_SBLEND_ZERO | R128_DBLEND_ONE}, - /* Over */ - {0, 1, R128_SBLEND_ONE | R128_DBLEND_INV_SRC_ALPHA}, - /* OverReverse */ - {1, 0, R128_SBLEND_INV_DST_ALPHA | R128_DBLEND_ONE}, - /* In */ - {1, 0, R128_SBLEND_DST_ALPHA | R128_DBLEND_ZERO}, - /* InReverse */ - {0, 1, R128_SBLEND_ZERO | R128_DBLEND_SRC_ALPHA}, - /* Out */ - {1, 0, R128_SBLEND_INV_DST_ALPHA | R128_DBLEND_ZERO}, - /* OutReverse */ - {0, 1, R128_SBLEND_ZERO | R128_DBLEND_INV_SRC_ALPHA}, - /* Atop */ - {1, 1, R128_SBLEND_DST_ALPHA | R128_DBLEND_INV_SRC_ALPHA}, - /* AtopReverse */ - {1, 1, R128_SBLEND_INV_DST_ALPHA | R128_DBLEND_SRC_ALPHA}, - /* Xor */ - {1, 1, R128_SBLEND_INV_DST_ALPHA | R128_DBLEND_INV_SRC_ALPHA}, - /* Add */ - {0, 0, R128_SBLEND_ONE | R128_DBLEND_ONE}, -}; - -static Bool -R128GetDatatypePict(CARD32 format, CARD32 *type) -{ - switch (format) { - case PICT_a1r5g5b5: - case PICT_x1r5g5b5: - *type = R128_DATATYPE_ARGB1555; - return TRUE; - case PICT_r5g6b5: - *type = R128_DATATYPE_RGB565; - return TRUE; - case PICT_a8r8g8b8: - case PICT_x8r8g8b8: - *type = R128_DATATYPE_ARGB8888; - return TRUE; - default: - return FALSE; - } - -} - -static Bool -R128CheckCompositeTexture(PicturePtr pPict) -{ - int w = pPict->pDrawable->width; - int h = pPict->pDrawable->height; - - if (w > (1 << 10) || h > (1 << 10)) - ATI_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h)); - if (pPict->repeat && ((w & (w - 1)) != 0 || (h & (h - 1)) != 0)) - ATI_FALLBACK(("NPOT repeat unsupported (%dx%d)\n", w, h)); - - switch (pPict->format) { - case PICT_a8: - case PICT_a1r5g5b5: - case PICT_a4r4g4b4: - case PICT_r5g6b5: - case PICT_a8r8g8b8: - break; - default: - ATI_FALLBACK(("Unsupported picture format 0x%x\n", - pPict->format)); - } - - return TRUE; -} - -Bool -R128CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, - PicturePtr pDstPicture) -{ - CARD32 dstDatatype; - - if (op >= sizeof(R128BlendOp)/sizeof(R128BlendOp[0])) - ATI_FALLBACK(("Unsupported op 0x%x\n", op)); - if (pDstPicture->format == PICT_a8) { - if (R128BlendOp[op].src_alpha || R128BlendOp[op].dst_alpha || - pMaskPicture != NULL) - ATI_FALLBACK(("alpha blending unsupported with " - "A8 dst?\n")); - } else if (!R128GetDatatypePict(pDstPicture->format, &dstDatatype)) { - ATI_FALLBACK(("Unsupported dest format 0x%x\n", - pDstPicture->format)); - } - if (pMaskPicture != NULL && pMaskPicture->componentAlpha && - R128BlendOp[op].src_alpha) - ATI_FALLBACK(("Component alpha not supported with source alpha " - "blending.\n")); - - if (!R128CheckCompositeTexture(pSrcPicture)) - return FALSE; - if (pMaskPicture != NULL && !R128CheckCompositeTexture(pMaskPicture)) - return FALSE; - - return TRUE; -} - -static Bool -R128TextureSetup(PicturePtr pPict, PixmapPtr pPix, int unit, CARD32 *txsize, - CARD32 *tex_cntl_c) -{ - int w = pPict->pDrawable->width; - int h = pPict->pDrawable->height; - int bytepp, shift, l2w, l2h, l2p; - int pitch; - - pitch = pPix->devKind; - if ((pitch & (pitch - 1)) != 0) - ATI_FALLBACK(("NPOT pitch 0x%x unsupported\n", pitch)); - - switch (pPict->format) { - case PICT_a8: - /* DATATYPE_RGB8 appears to expand the value into the alpha - * channel like we want. We then blank out the R,G,B channels - * as necessary using the combiners. - */ - *tex_cntl_c = R128_DATATYPE_RGB8 << R128_TEX_DATATYPE_SHIFT; - break; - case PICT_a1r5g5b5: - *tex_cntl_c = R128_DATATYPE_ARGB1555 << R128_TEX_DATATYPE_SHIFT; - break; - case PICT_a4r4g4b4: - *tex_cntl_c = R128_DATATYPE_ARGB4444 << R128_TEX_DATATYPE_SHIFT; - break; - case PICT_r5g6b5: - *tex_cntl_c = R128_DATATYPE_RGB565 << R128_TEX_DATATYPE_SHIFT; - break; - case PICT_a8r8g8b8: - *tex_cntl_c = R128_DATATYPE_ARGB8888 << R128_TEX_DATATYPE_SHIFT; - break; - default: - return FALSE; - } - bytepp = PICT_FORMAT_BPP(pPict->format) / 8; - - *tex_cntl_c |= R128_MIP_MAP_DISABLE; - - if (pPict->filter == PictFilterBilinear) - *tex_cntl_c |= R128_MIN_BLEND_LINEAR | R128_MAG_BLEND_LINEAR; - - if (unit == 0) - shift = 0; - else { - shift = 16; - *tex_cntl_c |= R128_SEC_SELECT_SEC_ST; - } - - /* ATILog2 returns -1 for value of 0 */ - l2w = ATILog2(w - 1) + 1; - l2h = ATILog2(h - 1) + 1; - l2p = ATILog2(pPix->devKind / bytepp); - - if (pPict->repeat && w == 1 && h == 1) - l2p = 0; - else if (pPict->repeat && l2p != l2w) - ATI_FALLBACK(("Repeat not supported for pitch != width\n")); - l2w = l2p; - - widths[unit] = 1 << l2w; - heights[unit] = 1 << l2h; - *txsize |= l2p << (R128_TEX_PITCH_SHIFT + shift); - *txsize |= ((l2w > l2h) ? l2w : l2h) << (R128_TEX_SIZE_SHIFT + shift); - *txsize |= l2h << (R128_TEX_HEIGHT_SHIFT + shift); - - if (pPict->transform != 0) { - is_transform[unit] = TRUE; - transform[unit] = pPict->transform; - } else { - is_transform[unit] = FALSE; - } - - return TRUE; -} - -Bool -R128PrepareComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, - PicturePtr pDstPicture, PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) -{ - KdScreenPriv(pDst->drawable.pScreen); - ATIScreenInfo(pScreenPriv); - CARD32 txsize = 0, prim_tex_cntl_c, sec_tex_cntl_c = 0, dstDatatype; - CARD32 dst_pitch_offset, color_factor, in_color_factor, alpha_comb; - CARD32 blend_cntl; - int i; - RING_LOCALS; - - accel_atis = atis; - - if (pDstPicture->format == PICT_a8) - dstDatatype = R128_DATATYPE_Y8; - else - R128GetDatatypePict(pDstPicture->format, &dstDatatype); - - if (!R128TextureSetup(pSrcPicture, pSrc, 0, &txsize, &prim_tex_cntl_c)) - return FALSE; - if (pMask != NULL && !R128TextureSetup(pMaskPicture, pMask, 1, &txsize, - &sec_tex_cntl_c)) - return FALSE; - else if (pMask == NULL) - is_transform[1] = FALSE; - - if (!ATIGetPixmapOffsetPitch(pDst, &dst_pitch_offset)) - return FALSE; - - blend_cntl = R128BlendOp[op].blendctl; - if (PICT_FORMAT_A(pDstPicture->format) == 0 && - R128BlendOp[op].dst_alpha) { - if ((blend_cntl & R128_SBLEND_MASK) == - R128_SBLEND_DST_ALPHA) - blend_cntl = (blend_cntl & ~R128_SBLEND_MASK) | - R128_SBLEND_ONE; - else if ((blend_cntl & R128_SBLEND_MASK) == - R128_SBLEND_INV_DST_ALPHA) - blend_cntl = (blend_cntl & ~R128_SBLEND_MASK) | - R128_SBLEND_ZERO; - } - - BEGIN_DMA(12); - OUT_REG(R128_REG_SCALE_3D_CNTL, - R128_SCALE_3D_TEXMAP_SHADE | - R128_SCALE_PIX_REPLICATE | - R128_TEX_CACHE_SPLIT | - R128_TEX_MAP_ALPHA_IN_TEXTURE | - R128_TEX_CACHE_LINE_SIZE_4QW); - OUT_REG(ATI_REG_DST_PITCH_OFFSET, dst_pitch_offset); - OUT_REG(ATI_REG_DP_GUI_MASTER_CNTL, - ATI_GMC_DST_PITCH_OFFSET_CNTL | - ATI_GMC_BRUSH_SOLID_COLOR | - (dstDatatype << 8) | - ATI_GMC_SRC_DATATYPE_COLOR | - (ATIBltRop[GXcopy] << 16) | - ATI_DP_SRC_SOURCE_MEMORY | - R128_GMC_3D_FCN_EN | - ATI_GMC_CLR_CMP_CNTL_DIS | - R128_GMC_AUX_CLIP_DIS | - ATI_GMC_WR_MSK_DIS); - OUT_REG(R128_REG_MISC_3D_STATE_CNTL, - R128_MISC_SCALE_3D_TEXMAP_SHADE | - R128_MISC_SCALE_PIX_REPLICATE | - R128_ALPHA_COMB_ADD_CLAMP | - blend_cntl); - OUT_REG(R128_REG_TEX_CNTL_C, - R128_TEXMAP_ENABLE | - ((pMask != NULL) ? R128_SEC_TEXMAP_ENABLE : 0) | - R128_ALPHA_ENABLE | - R128_TEX_CACHE_FLUSH); - OUT_REG(R128_REG_PC_GUI_CTLSTAT, R128_PC_FLUSH_GUI); - END_DMA(); - - /* IN operator: Without a mask, only the first texture unit is enabled. - * With a mask, we put the source in the first unit and have it pass - * through as input to the 2nd. The 2nd unit takes the incoming source - * pixel and modulates it with either the alpha or each of the channels - * in the mask, depending on componentAlpha. - */ - BEGIN_DMA(15); - OUT_RING(DMA_PACKET0(R128_REG_PRIM_TEX_CNTL_C, 14)); - OUT_RING_REG(R128_REG_PRIM_TEX_CNTL_C, prim_tex_cntl_c); - - /* If this is the only stage and the dest is a8, route the alpha result - * to the color (red channel, in particular), too. Otherwise, be sure - * to zero out color channels of an a8 source. - */ - if (pMaskPicture == NULL && pDstPicture->format == PICT_a8) - color_factor = R128_COLOR_FACTOR_ALPHA; - else if (pSrcPicture->format == PICT_a8) - color_factor = R128_COLOR_FACTOR_CONST_COLOR; - else - color_factor = R128_COLOR_FACTOR_TEX; - - if (PICT_FORMAT_A(pSrcPicture->format) == 0) - alpha_comb = R128_COMB_ALPHA_COPY_INP; - else - alpha_comb = R128_COMB_ALPHA_DIS; - - OUT_RING_REG(R128_REG_PRIM_TEXTURE_COMBINE_CNTL_C, - R128_COMB_COPY | - color_factor | - R128_INPUT_FACTOR_INT_COLOR | - alpha_comb | - R128_ALPHA_FACTOR_TEX_ALPHA | - R128_INP_FACTOR_A_CONST_ALPHA); - OUT_RING_REG(R128_REG_TEX_SIZE_PITCH_C, txsize); - /* We could save some output by only writing the offset register that - * will actually be used. On the other hand, this is easy. - */ - for (i = 0; i <= 10; i++) { - OUT_RING_REG(R128_REG_PRIM_TEX_0_OFFSET_C + 4 * i, - ((CARD8 *)pSrc->devPrivate.ptr - - pScreenPriv->screen->memory_base)); - } - END_DMA(); - - if (pMask != NULL) { - BEGIN_DMA(14); - OUT_RING(DMA_PACKET0(R128_REG_SEC_TEX_CNTL_C, 13)); - OUT_RING_REG(R128_REG_SEC_TEX_CNTL_C, sec_tex_cntl_c); - - if (pDstPicture->format == PICT_a8) { - color_factor = R128_COLOR_FACTOR_ALPHA; - in_color_factor = R128_INPUT_FACTOR_PREV_ALPHA; - } else if (pMaskPicture->componentAlpha) { - color_factor = R128_COLOR_FACTOR_TEX; - in_color_factor = R128_INPUT_FACTOR_PREV_COLOR; - } else { - color_factor = R128_COLOR_FACTOR_ALPHA; - in_color_factor = R128_INPUT_FACTOR_PREV_COLOR; - } - - OUT_RING_REG(R128_REG_SEC_TEXTURE_COMBINE_CNTL_C, - R128_COMB_MODULATE | - color_factor | - in_color_factor | - R128_COMB_ALPHA_MODULATE | - R128_ALPHA_FACTOR_TEX_ALPHA | - R128_INP_FACTOR_A_PREV_ALPHA); - for (i = 0; i <= 10; i++) { - OUT_RING_REG(R128_REG_SEC_TEX_0_OFFSET_C + 4 * i, - ((CARD8 *)pMask->devPrivate.ptr - - pScreenPriv->screen->memory_base)); - } - END_DMA(); - } - - return TRUE; -} -#define VTX_RING_COUNT 8 - -#define VTX_OUT(_dstX, _dstY, _srcX, _srcY, _maskX, _maskY) \ -do { \ - OUT_RING_F((_dstX)); \ - OUT_RING_F(((float)(_dstY)) + .125); \ - OUT_RING_F(0.0); \ - OUT_RING_F(1.0); \ - OUT_RING_F((((float)(_srcX)) + 0.5) / (widths[0])); \ - OUT_RING_F((((float)(_srcY)) + 0.5) / (heights[0])); \ - OUT_RING_F((((float)(_maskX)) + 0.5) / (widths[1])); \ - OUT_RING_F((((float)(_maskY)) + 0.5) / (heights[1])); \ -} while (0) - -void -R128Composite(int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, - int w, int h) -{ - ATIScreenInfo *atis = accel_atis; - int srcXend, srcYend, maskXend, maskYend; - PictVector v; - RING_LOCALS; - - /*ErrorF("R128Composite (%d,%d) (%d,%d) (%d,%d) (%d,%d)\n", - srcX, srcY, maskX, maskY,dstX, dstY, w, h);*/ - - srcXend = srcX + w; - srcYend = srcY + h; - maskXend = maskX + w; - maskYend = maskY + h; - if (is_transform[0]) { - v.vector[0] = IntToxFixed(srcX); - v.vector[1] = IntToxFixed(srcY); - v.vector[2] = xFixed1; - PictureTransformPoint(transform[0], &v); - srcX = xFixedToInt(v.vector[0]); - srcY = xFixedToInt(v.vector[1]); - v.vector[0] = IntToxFixed(srcXend); - v.vector[1] = IntToxFixed(srcYend); - v.vector[2] = xFixed1; - PictureTransformPoint(transform[0], &v); - srcXend = xFixedToInt(v.vector[0]); - srcYend = xFixedToInt(v.vector[1]); - } - if (is_transform[1]) { - v.vector[0] = IntToxFixed(maskX); - v.vector[1] = IntToxFixed(maskY); - v.vector[2] = xFixed1; - PictureTransformPoint(transform[1], &v); - maskX = xFixedToInt(v.vector[0]); - maskY = xFixedToInt(v.vector[1]); - v.vector[0] = IntToxFixed(maskXend); - v.vector[1] = IntToxFixed(maskYend); - v.vector[2] = xFixed1; - PictureTransformPoint(transform[1], &v); - maskXend = xFixedToInt(v.vector[0]); - maskYend = xFixedToInt(v.vector[1]); - } - - BEGIN_DMA(3 + 4 * VTX_RING_COUNT); - OUT_RING(DMA_PACKET3(ATI_CCE_PACKET3_3D_RNDR_GEN_PRIM, - 2 + 4 * VTX_RING_COUNT)); - OUT_RING(R128_CCE_VC_FRMT_RHW | - R128_CCE_VC_FRMT_S_T | - R128_CCE_VC_FRMT_S2_T2); - OUT_RING(R128_CCE_VC_CNTL_PRIM_TYPE_TRI_FAN | - R128_CCE_VC_CNTL_PRIM_WALK_RING | - (4 << R128_CCE_VC_CNTL_NUM_SHIFT)); - - VTX_OUT(dstX, dstY, srcX, srcY, maskX, maskY); - VTX_OUT(dstX, dstY + h, srcX, srcYend, maskX, maskYend); - VTX_OUT(dstX + w, dstY + h, srcXend, srcYend, maskXend, maskYend); - VTX_OUT(dstX + w, dstY, srcXend, srcY, maskXend, maskY); - - END_DMA(); -} - -void -R128DoneComposite(void) -{ -} - -Bool -R128PrepareTrapezoids(PicturePtr pDstPicture, PixmapPtr pDst) -{ - KdScreenPriv(pDst->drawable.pScreen); - ATIScreenInfo(pScreenPriv); - CARD32 dst_pitch_offset; - RING_LOCALS; - - accel_atis = atis; - - if (!ATIGetPixmapOffsetPitch(pDst, &dst_pitch_offset)) - return FALSE; - - BEGIN_DMA(18); - OUT_REG(R128_REG_SCALE_3D_CNTL, - R128_SCALE_3D_TEXMAP_SHADE | - R128_SCALE_PIX_REPLICATE | - R128_TEX_CACHE_SPLIT | - R128_TEX_CACHE_LINE_SIZE_4QW); - OUT_REG(ATI_REG_DST_PITCH_OFFSET, dst_pitch_offset); - OUT_REG(ATI_REG_DP_GUI_MASTER_CNTL, - ATI_GMC_DST_PITCH_OFFSET_CNTL | - ATI_GMC_BRUSH_SOLID_COLOR | - (R128_DATATYPE_RGB8 << 8) | - ATI_GMC_SRC_DATATYPE_COLOR | - (ATIBltRop[GXcopy] << 16) | - ATI_DP_SRC_SOURCE_MEMORY | - R128_GMC_3D_FCN_EN | - ATI_GMC_CLR_CMP_CNTL_DIS | - ATI_GMC_WR_MSK_DIS); - OUT_REG(R128_REG_MISC_3D_STATE_CNTL, - R128_MISC_SCALE_3D_TEXMAP_SHADE | - R128_MISC_SCALE_PIX_REPLICATE | - R128_ALPHA_COMB_ADD_CLAMP | - R128BlendOp[PictOpAdd].blendctl); - OUT_REG(R128_REG_TEX_CNTL_C, - R128_ALPHA_ENABLE); - OUT_REG(R128_REG_PC_GUI_CTLSTAT, R128_PC_FLUSH_GUI); - - OUT_RING(DMA_PACKET0(R128_REG_AUX_SC_CNTL, 5)); - OUT_RING_REG(R128_REG_AUX_SC_CNTL, R128_AUX1_SC_ENB); - OUT_RING_REG(R128_REG_AUX1_SC_LEFT, 0); - OUT_RING_REG(R128_REG_AUX1_SC_RIGHT, pDst->drawable.width); - OUT_RING_REG(R128_REG_AUX1_SC_TOP, 0); - OUT_RING_REG(R128_REG_AUX1_SC_BOTTOM, pDst->drawable.height); - END_DMA(); - - return TRUE; -} - -#define TRAP_VERT_RING_COUNT 4 - -#define TRAP_VERT(_x, _y) \ -do { \ - OUT_RING_F((_x) + sample_x); \ - OUT_RING_F((_y) + 0.125 + sample_y); \ - OUT_RING_F(0.0); \ - OUT_RING(0x01010101); \ -} while (0) - -void -R128Trapezoids(KaaTrapezoid *traps, int ntraps) -{ - ATIScreenInfo *atis = accel_atis; - RING_LOCALS; - - while (ntraps > 0) { - int i, sample, count, vertcount; - - count = 0xffff / 4 / sample_count; - if (count > ntraps) - count = ntraps; - vertcount = count * sample_count * 4; - - BEGIN_DMA(3 + vertcount * TRAP_VERT_RING_COUNT); - OUT_RING(DMA_PACKET3(ATI_CCE_PACKET3_3D_RNDR_GEN_PRIM, - 2 + vertcount * TRAP_VERT_RING_COUNT)); - OUT_RING(R128_CCE_VC_FRMT_DIFFUSE_ARGB); - OUT_RING(R128_CCE_VC_CNTL_PRIM_TYPE_TRI_FAN | - R128_CCE_VC_CNTL_PRIM_WALK_RING | - (vertcount << R128_CCE_VC_CNTL_NUM_SHIFT)); - - for (i = 0; i < count; i++) { - for (sample = 0; sample < sample_count; sample++) { - float sample_x = sample_offsets_x[sample]; - float sample_y = sample_offsets_y[sample]; - TRAP_VERT(traps[i].tl, traps[i].ty); - TRAP_VERT(traps[i].bl, traps[i].by); - TRAP_VERT(traps[i].br, traps[i].by); - TRAP_VERT(traps[i].tr, traps[i].ty); - } - } - END_DMA(); - - ntraps -= count; - traps += count; - } -} - -void -R128DoneTrapezoids(void) -{ -} diff --git a/hw/kdrive/ati/r128_sarea.h b/hw/kdrive/ati/r128_sarea.h deleted file mode 100644 index 6fbd05ecb..000000000 --- a/hw/kdrive/ati/r128_sarea.h +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario, - * Precision Insight, Inc., Cedar Park, Texas, and - * VA Linux Systems Inc., Fremont, California. - * - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation on the rights to use, copy, modify, merge, - * publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, PRECISION INSIGHT, VA LINUX - * SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * Authors: - * Kevin E. Martin - * Gareth Hughes - * - */ - -#ifndef _R128_SAREA_H_ -#define _R128_SAREA_H_ - -/* WARNING: If you change any of these defines, make sure to change the - * defines in the kernel file (r128_drm.h) - */ -#ifndef __R128_SAREA_DEFINES__ -#define __R128_SAREA_DEFINES__ - -/* What needs to be changed for the current vertex buffer? - */ -#define R128_UPLOAD_CONTEXT 0x001 -#define R128_UPLOAD_SETUP 0x002 -#define R128_UPLOAD_TEX0 0x004 -#define R128_UPLOAD_TEX1 0x008 -#define R128_UPLOAD_TEX0IMAGES 0x010 -#define R128_UPLOAD_TEX1IMAGES 0x020 -#define R128_UPLOAD_CORE 0x040 -#define R128_UPLOAD_MASKS 0x080 -#define R128_UPLOAD_WINDOW 0x100 -#define R128_UPLOAD_CLIPRECTS 0x200 /* handled client-side */ -#define R128_REQUIRE_QUIESCENCE 0x400 -#define R128_UPLOAD_ALL 0x7ff - -#define R128_FRONT 0x1 -#define R128_BACK 0x2 -#define R128_DEPTH 0x4 - -/* Primitive types - */ -#define R128_POINTS 0x1 -#define R128_LINES 0x2 -#define R128_LINE_STRIP 0x3 -#define R128_TRIANGLES 0x4 -#define R128_TRIANGLE_FAN 0x5 -#define R128_TRIANGLE_STRIP 0x6 - -/* Vertex/indirect buffer size - */ -#define R128_BUFFER_SIZE 16384 - -/* Byte offsets for indirect buffer data - */ -#define R128_INDEX_PRIM_OFFSET 20 -#define R128_HOSTDATA_BLIT_OFFSET 32 - -/* Keep these small for testing - */ -#define R128_NR_SAREA_CLIPRECTS 12 - -#define R128_NR_CONTEXT_REGS 12 - -#define R128_MAX_TEXTURE_LEVELS 11 -#define R128_MAX_TEXTURE_UNITS 2 - -#endif /* __R128_SAREA_DEFINES__ */ - -typedef struct { - /* Context state - can be written in one large chunk */ - unsigned int dst_pitch_offset_c; - unsigned int dp_gui_master_cntl_c; - unsigned int sc_top_left_c; - unsigned int sc_bottom_right_c; - unsigned int z_offset_c; - unsigned int z_pitch_c; - unsigned int z_sten_cntl_c; - unsigned int tex_cntl_c; - unsigned int misc_3d_state_cntl_reg; - unsigned int texture_clr_cmp_clr_c; - unsigned int texture_clr_cmp_msk_c; - unsigned int fog_color_c; - - /* Texture state */ - unsigned int tex_size_pitch_c; - unsigned int constant_color_c; - - /* Setup state */ - unsigned int pm4_vc_fpu_setup; - unsigned int setup_cntl; - - /* Mask state */ - unsigned int dp_write_mask; - unsigned int sten_ref_mask_c; - unsigned int plane_3d_mask_c; - - /* Window state */ - unsigned int window_xy_offset; - - /* Core state */ - unsigned int scale_3d_cntl; -} r128_context_regs_t; - -/* Setup registers for each texture unit - */ -typedef struct { - unsigned int tex_cntl; - unsigned int tex_combine_cntl; - unsigned int tex_size_pitch; - unsigned int tex_offset[R128_MAX_TEXTURE_LEVELS]; - unsigned int tex_border_color; -} r128_texture_regs_t; - -typedef struct { - /* The channel for communication of state information to the kernel - * on firing a vertex buffer. - */ - r128_context_regs_t ContextState; - r128_texture_regs_t TexState[R128_MAX_TEXTURE_UNITS]; - unsigned int dirty; - unsigned int vertsize; - unsigned int vc_format; - -#ifdef XF86DRI - /* The current cliprects, or a subset thereof. - */ - XF86DRIClipRectRec boxes[R128_NR_SAREA_CLIPRECTS]; - unsigned int nbox; -#endif - - /* Counters for throttling of rendering clients. - */ - unsigned int last_frame; - unsigned int last_dispatch; - - /* Maintain an LRU of contiguous regions of texture space. If you - * think you own a region of texture memory, and it has an age - * different to the one you set, then you are mistaken and it has - * been stolen by another client. If global texAge hasn't changed, - * there is no need to walk the list. - * - * These regions can be used as a proxy for the fine-grained texture - * information of other clients - by maintaining them in the same - * lru which is used to age their own textures, clients have an - * approximate lru for the whole of global texture space, and can - * make informed decisions as to which areas to kick out. There is - * no need to choose whether to kick out your own texture or someone - * else's - simply eject them all in LRU order. - */ - /* Last elt is sentinal */ - drmTextureRegion texList[ATI_NR_TEX_HEAPS][ATI_NR_TEX_REGIONS+1]; - /* last time texture was uploaded */ - unsigned int texAge[ATI_NR_TEX_HEAPS]; - - int ctxOwner; /* last context to upload state */ - int pfAllowPageFlip; /* set by the 2d driver, read by the client */ - int pfCurrentPage; /* set by kernel, read by others */ -} R128SAREAPriv, *R128SAREAPrivPtr; - -#endif diff --git a/hw/kdrive/ati/radeon_common.h b/hw/kdrive/ati/radeon_common.h deleted file mode 100644 index 6c416c6b1..000000000 --- a/hw/kdrive/ati/radeon_common.h +++ /dev/null @@ -1,460 +0,0 @@ -/* radeon_common.h -- common header definitions for Radeon 2D/3D/DRM suite - * - * Copyright 2000 VA Linux Systems, Inc., Fremont, California. - * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Author: - * Gareth Hughes - * Kevin E. Martin - * Keith Whitwell - * - * Converted to common header format: - * Jens Owen - * - * - */ - -#ifndef _RADEON_COMMON_H_ -#define _RADEON_COMMON_H_ - -#include - -/* WARNING: If you change any of these defines, make sure to change - * the kernel include file as well (radeon_drm.h) - */ - -/* Driver specific DRM command indices - * NOTE: these are not OS specific, but they are driver specific - */ -#define DRM_RADEON_CP_INIT 0x00 -#define DRM_RADEON_CP_START 0x01 -#define DRM_RADEON_CP_STOP 0x02 -#define DRM_RADEON_CP_RESET 0x03 -#define DRM_RADEON_CP_IDLE 0x04 -#define DRM_RADEON_RESET 0x05 -#define DRM_RADEON_FULLSCREEN 0x06 -#define DRM_RADEON_SWAP 0x07 -#define DRM_RADEON_CLEAR 0x08 -#define DRM_RADEON_VERTEX 0x09 -#define DRM_RADEON_INDICES 0x0a -#define DRM_RADEON_STIPPLE 0x0c -#define DRM_RADEON_INDIRECT 0x0d -#define DRM_RADEON_TEXTURE 0x0e -#define DRM_RADEON_VERTEX2 0x0f -#define DRM_RADEON_CMDBUF 0x10 -#define DRM_RADEON_GETPARAM 0x11 -#define DRM_RADEON_FLIP 0x12 -#define DRM_RADEON_ALLOC 0x13 -#define DRM_RADEON_FREE 0x14 -#define DRM_RADEON_INIT_HEAP 0x15 -#define DRM_RADEON_IRQ_EMIT 0x16 -#define DRM_RADEON_IRQ_WAIT 0x17 -#define DRM_RADEON_CP_RESUME 0x18 -#define DRM_RADEON_SETPARAM 0x19 -#define DRM_RADEON_MAX_DRM_COMMAND_INDEX 0x39 - - -#define RADEON_FRONT 0x1 -#define RADEON_BACK 0x2 -#define RADEON_DEPTH 0x4 -#define RADEON_STENCIL 0x8 - -#define RADEON_CLEAR_X1 0 -#define RADEON_CLEAR_Y1 1 -#define RADEON_CLEAR_X2 2 -#define RADEON_CLEAR_Y2 3 -#define RADEON_CLEAR_DEPTH 4 - - -typedef struct { - enum { - DRM_RADEON_INIT_CP = 0x01, - DRM_RADEON_CLEANUP_CP = 0x02, - DRM_RADEON_INIT_R200_CP = 0x03 - } func; - unsigned long sarea_priv_offset; - int is_pci; - int cp_mode; - int gart_size; - int ring_size; - int usec_timeout; - - unsigned int fb_bpp; - unsigned int front_offset, front_pitch; - unsigned int back_offset, back_pitch; - unsigned int depth_bpp; - unsigned int depth_offset, depth_pitch; - - unsigned long fb_offset; - unsigned long mmio_offset; - unsigned long ring_offset; - unsigned long ring_rptr_offset; - unsigned long buffers_offset; - unsigned long gart_textures_offset; -} drmRadeonInit; - -typedef struct { - int flush; - int idle; -} drmRadeonCPStop; - -typedef struct { - int idx; - int start; - int end; - int discard; -} drmRadeonIndirect; - -typedef union drmRadeonClearR { - float f[5]; - unsigned int ui[5]; -} drmRadeonClearRect; - -typedef struct drmRadeonClearT { - unsigned int flags; - unsigned int clear_color; - unsigned int clear_depth; - unsigned int color_mask; - unsigned int depth_mask; /* misnamed field: should be stencil */ - drmRadeonClearRect *depth_boxes; -} drmRadeonClearType; - -typedef struct drmRadeonFullscreenT { - enum { - RADEON_INIT_FULLSCREEN = 0x01, - RADEON_CLEANUP_FULLSCREEN = 0x02 - } func; -} drmRadeonFullscreenType; - -typedef struct { - unsigned int *mask; -} drmRadeonStipple; - -typedef struct { - unsigned int x; - unsigned int y; - unsigned int width; - unsigned int height; - const void *data; -} drmRadeonTexImage; - -typedef struct { - unsigned int offset; - int pitch; - int format; - int width; /* Texture image coordinates */ - int height; - drmRadeonTexImage *image; -} drmRadeonTexture; - - -#define RADEON_MAX_TEXTURE_UNITS 3 - -/* Layout matches drm_radeon_state_t in linux drm_radeon.h. - */ -typedef struct { - struct { - unsigned int pp_misc; /* 0x1c14 */ - unsigned int pp_fog_color; - unsigned int re_solid_color; - unsigned int rb3d_blendcntl; - unsigned int rb3d_depthoffset; - unsigned int rb3d_depthpitch; - unsigned int rb3d_zstencilcntl; - unsigned int pp_cntl; /* 0x1c38 */ - unsigned int rb3d_cntl; - unsigned int rb3d_coloroffset; - unsigned int re_width_height; - unsigned int rb3d_colorpitch; - } context; - struct { - unsigned int se_cntl; - } setup1; - struct { - unsigned int se_coord_fmt; /* 0x1c50 */ - } vertex; - struct { - unsigned int re_line_pattern; /* 0x1cd0 */ - unsigned int re_line_state; - unsigned int se_line_width; /* 0x1db8 */ - } line; - struct { - unsigned int pp_lum_matrix; /* 0x1d00 */ - unsigned int pp_rot_matrix_0; /* 0x1d58 */ - unsigned int pp_rot_matrix_1; - } bumpmap; - struct { - unsigned int rb3d_stencilrefmask; /* 0x1d7c */ - unsigned int rb3d_ropcntl; - unsigned int rb3d_planemask; - } mask; - struct { - unsigned int se_vport_xscale; /* 0x1d98 */ - unsigned int se_vport_xoffset; - unsigned int se_vport_yscale; - unsigned int se_vport_yoffset; - unsigned int se_vport_zscale; - unsigned int se_vport_zoffset; - } viewport; - struct { - unsigned int se_cntl_status; /* 0x2140 */ - } setup2; - struct { - unsigned int re_top_left; /*ignored*/ /* 0x26c0 */ - unsigned int re_misc; - } misc; - struct { - unsigned int pp_txfilter; - unsigned int pp_txformat; - unsigned int pp_txoffset; - unsigned int pp_txcblend; - unsigned int pp_txablend; - unsigned int pp_tfactor; - unsigned int pp_border_color; - } texture[RADEON_MAX_TEXTURE_UNITS]; - struct { - unsigned int se_zbias_factor; - unsigned int se_zbias_constant; - } zbias; - unsigned int dirty; -} drmRadeonState; - -/* 1.1 vertex ioctl. Used in compatibility modes. - */ -typedef struct { - int prim; - int idx; /* Index of vertex buffer */ - int count; /* Number of vertices in buffer */ - int discard; /* Client finished with buffer? */ -} drmRadeonVertex; - -typedef struct { - unsigned int start; - unsigned int finish; - unsigned int prim:8; - unsigned int stateidx:8; - unsigned int numverts:16; /* overloaded as offset/64 for elt prims */ - unsigned int vc_format; -} drmRadeonPrim; - -typedef struct { - int idx; /* Index of vertex buffer */ - int discard; /* Client finished with buffer? */ - int nr_states; - drmRadeonState *state; - int nr_prims; - drmRadeonPrim *prim; -} drmRadeonVertex2; - -#define RADEON_MAX_STATES 16 -#define RADEON_MAX_PRIMS 64 - -/* Command buffer. Replace with true dma stream? - */ -typedef struct { - int bufsz; - char *buf; - int nbox; - drmClipRect *boxes; -} drmRadeonCmdBuffer; - -/* New style per-packet identifiers for use in cmd_buffer ioctl with - * the RADEON_EMIT_PACKET command. Comments relate new packets to old - * state bits and the packet size: - */ -#define RADEON_EMIT_PP_MISC 0 /* context/7 */ -#define RADEON_EMIT_PP_CNTL 1 /* context/3 */ -#define RADEON_EMIT_RB3D_COLORPITCH 2 /* context/1 */ -#define RADEON_EMIT_RE_LINE_PATTERN 3 /* line/2 */ -#define RADEON_EMIT_SE_LINE_WIDTH 4 /* line/1 */ -#define RADEON_EMIT_PP_LUM_MATRIX 5 /* bumpmap/1 */ -#define RADEON_EMIT_PP_ROT_MATRIX_0 6 /* bumpmap/2 */ -#define RADEON_EMIT_RB3D_STENCILREFMASK 7 /* masks/3 */ -#define RADEON_EMIT_SE_VPORT_XSCALE 8 /* viewport/6 */ -#define RADEON_EMIT_SE_CNTL 9 /* setup/2 */ -#define RADEON_EMIT_SE_CNTL_STATUS 10 /* setup/1 */ -#define RADEON_EMIT_RE_MISC 11 /* misc/1 */ -#define RADEON_EMIT_PP_TXFILTER_0 12 /* tex0/6 */ -#define RADEON_EMIT_PP_BORDER_COLOR_0 13 /* tex0/1 */ -#define RADEON_EMIT_PP_TXFILTER_1 14 /* tex1/6 */ -#define RADEON_EMIT_PP_BORDER_COLOR_1 15 /* tex1/1 */ -#define RADEON_EMIT_PP_TXFILTER_2 16 /* tex2/6 */ -#define RADEON_EMIT_PP_BORDER_COLOR_2 17 /* tex2/1 */ -#define RADEON_EMIT_SE_ZBIAS_FACTOR 18 /* zbias/2 */ -#define RADEON_EMIT_SE_TCL_OUTPUT_VTX_FMT 19 /* tcl/11 */ -#define RADEON_EMIT_SE_TCL_MATERIAL_EMMISSIVE_RED 20 /* material/17 */ -#define R200_EMIT_PP_TXCBLEND_0 21 /* tex0/4 */ -#define R200_EMIT_PP_TXCBLEND_1 22 /* tex1/4 */ -#define R200_EMIT_PP_TXCBLEND_2 23 /* tex2/4 */ -#define R200_EMIT_PP_TXCBLEND_3 24 /* tex3/4 */ -#define R200_EMIT_PP_TXCBLEND_4 25 /* tex4/4 */ -#define R200_EMIT_PP_TXCBLEND_5 26 /* tex5/4 */ -#define R200_EMIT_PP_TXCBLEND_6 27 /* /4 */ -#define R200_EMIT_PP_TXCBLEND_7 28 /* /4 */ -#define R200_EMIT_TCL_LIGHT_MODEL_CTL_0 29 /* tcl/6 */ -#define R200_EMIT_TFACTOR_0 30 /* tf/6 */ -#define R200_EMIT_VTX_FMT_0 31 /* vtx/4 */ -#define R200_EMIT_VAP_CTL 32 /* vap/1 */ -#define R200_EMIT_MATRIX_SELECT_0 33 /* msl/5 */ -#define R200_EMIT_TEX_PROC_CTL_2 34 /* tcg/5 */ -#define R200_EMIT_TCL_UCP_VERT_BLEND_CTL 35 /* tcl/1 */ -#define R200_EMIT_PP_TXFILTER_0 36 /* tex0/6 */ -#define R200_EMIT_PP_TXFILTER_1 37 /* tex1/6 */ -#define R200_EMIT_PP_TXFILTER_2 38 /* tex2/6 */ -#define R200_EMIT_PP_TXFILTER_3 39 /* tex3/6 */ -#define R200_EMIT_PP_TXFILTER_4 40 /* tex4/6 */ -#define R200_EMIT_PP_TXFILTER_5 41 /* tex5/6 */ -#define R200_EMIT_PP_TXOFFSET_0 42 /* tex0/1 */ -#define R200_EMIT_PP_TXOFFSET_1 43 /* tex1/1 */ -#define R200_EMIT_PP_TXOFFSET_2 44 /* tex2/1 */ -#define R200_EMIT_PP_TXOFFSET_3 45 /* tex3/1 */ -#define R200_EMIT_PP_TXOFFSET_4 46 /* tex4/1 */ -#define R200_EMIT_PP_TXOFFSET_5 47 /* tex5/1 */ -#define R200_EMIT_VTE_CNTL 48 /* vte/1 */ -#define R200_EMIT_OUTPUT_VTX_COMP_SEL 49 /* vtx/1 */ -#define R200_EMIT_PP_TAM_DEBUG3 50 /* tam/1 */ -#define R200_EMIT_PP_CNTL_X 51 /* cst/1 */ -#define R200_EMIT_RB3D_DEPTHXY_OFFSET 52 /* cst/1 */ -#define R200_EMIT_RE_AUX_SCISSOR_CNTL 53 /* cst/1 */ -#define R200_EMIT_RE_SCISSOR_TL_0 54 /* cst/2 */ -#define R200_EMIT_RE_SCISSOR_TL_1 55 /* cst/2 */ -#define R200_EMIT_RE_SCISSOR_TL_2 56 /* cst/2 */ -#define R200_EMIT_SE_VAP_CNTL_STATUS 57 /* cst/1 */ -#define R200_EMIT_SE_VTX_STATE_CNTL 58 /* cst/1 */ -#define R200_EMIT_RE_POINTSIZE 59 /* cst/1 */ -#define R200_EMIT_TCL_INPUT_VTX_VECTOR_ADDR_0 60 /* cst/4 */ -#define R200_EMIT_PP_CUBIC_FACES_0 61 -#define R200_EMIT_PP_CUBIC_OFFSETS_0 62 -#define R200_EMIT_PP_CUBIC_FACES_1 63 -#define R200_EMIT_PP_CUBIC_OFFSETS_1 64 -#define R200_EMIT_PP_CUBIC_FACES_2 65 -#define R200_EMIT_PP_CUBIC_OFFSETS_2 66 -#define R200_EMIT_PP_CUBIC_FACES_3 67 -#define R200_EMIT_PP_CUBIC_OFFSETS_3 68 -#define R200_EMIT_PP_CUBIC_FACES_4 69 -#define R200_EMIT_PP_CUBIC_OFFSETS_4 70 -#define R200_EMIT_PP_CUBIC_FACES_5 71 -#define R200_EMIT_PP_CUBIC_OFFSETS_5 72 -#define RADEON_EMIT_PP_TEX_SIZE_0 73 -#define RADEON_EMIT_PP_TEX_SIZE_1 74 -#define RADEON_EMIT_PP_TEX_SIZE_2 75 -#define RADEON_MAX_STATE_PACKETS 76 - - -/* Commands understood by cmd_buffer ioctl. More can be added but - * obviously these can't be removed or changed: - */ -#define RADEON_CMD_PACKET 1 /* emit one of the register packets above */ -#define RADEON_CMD_SCALARS 2 /* emit scalar data */ -#define RADEON_CMD_VECTORS 3 /* emit vector data */ -#define RADEON_CMD_DMA_DISCARD 4 /* discard current dma buf */ -#define RADEON_CMD_PACKET3 5 /* emit hw packet */ -#define RADEON_CMD_PACKET3_CLIP 6 /* emit hw packet wrapped in cliprects */ -#define RADEON_CMD_SCALARS2 7 /* R200 stopgap */ -#define RADEON_CMD_WAIT 8 /* synchronization */ - -typedef union { - int i; - struct { - unsigned char cmd_type, pad0, pad1, pad2; - } header; - struct { - unsigned char cmd_type, packet_id, pad0, pad1; - } packet; - struct { - unsigned char cmd_type, offset, stride, count; - } scalars; - struct { - unsigned char cmd_type, offset, stride, count; - } vectors; - struct { - unsigned char cmd_type, buf_idx, pad0, pad1; - } dma; - struct { - unsigned char cmd_type, flags, pad0, pad1; - } wait; -} drmRadeonCmdHeader; - - -#define RADEON_WAIT_2D 0x1 -#define RADEON_WAIT_3D 0x2 - - -typedef struct drm_radeon_getparam { - int param; - int *value; -} drmRadeonGetParam; - -#define RADEON_PARAM_GART_BUFFER_OFFSET 1 -#define RADEON_PARAM_LAST_FRAME 2 -#define RADEON_PARAM_LAST_DISPATCH 3 -#define RADEON_PARAM_LAST_CLEAR 4 -#define RADEON_PARAM_IRQ_NR 5 -#define RADEON_PARAM_GART_BASE 6 - - -#define RADEON_MEM_REGION_GART 1 -#define RADEON_MEM_REGION_FB 2 - -typedef struct drm_radeon_mem_alloc { - int region; - int alignment; - int size; - int *region_offset; /* offset from start of fb or GART */ -} drmRadeonMemAlloc; - -typedef struct drm_radeon_mem_free { - int region; - int region_offset; -} drmRadeonMemFree; - -typedef struct drm_radeon_mem_init_heap { - int region; - int size; - int start; -} drmRadeonMemInitHeap; - -/* 1.6: Userspace can request & wait on irq's: - */ -typedef struct drm_radeon_irq_emit { - int *irq_seq; -} drmRadeonIrqEmit; - -typedef struct drm_radeon_irq_wait { - int irq_seq; -} drmRadeonIrqWait; - - -/* 1.10: Clients tell the DRM where they think the framebuffer is located in - * the card's address space, via a new generic ioctl to set parameters - */ - -typedef struct drm_radeon_set_param { - unsigned int param; - int64_t value; -} drmRadeonSetParam; - -#define RADEON_SETPARAM_FB_LOCATION 1 - - -#endif diff --git a/hw/kdrive/ati/radeon_composite.c b/hw/kdrive/ati/radeon_composite.c deleted file mode 100644 index ddad343e3..000000000 --- a/hw/kdrive/ati/radeon_composite.c +++ /dev/null @@ -1,875 +0,0 @@ -/* - * Copyright © 2003 Eric Anholt - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Eric Anholt not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Eric Anholt makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "ati.h" -#include "ati_reg.h" -#include "ati_dma.h" -#include "ati_draw.h" - -extern ATIScreenInfo *accel_atis; -extern int sample_count; -extern float sample_offsets_x[255]; -extern float sample_offsets_y[255]; -static Bool is_transform[2]; -static PictTransform *transform[2]; - -struct blendinfo { - Bool dst_alpha; - Bool src_alpha; - CARD32 blend_cntl; -}; - -static struct blendinfo RadeonBlendOp[] = { - /* Clear */ - {0, 0, RADEON_SBLEND_GL_ZERO | RADEON_DBLEND_GL_ZERO}, - /* Src */ - {0, 0, RADEON_SBLEND_GL_ONE | RADEON_DBLEND_GL_ZERO}, - /* Dst */ - {0, 0, RADEON_SBLEND_GL_ZERO | RADEON_DBLEND_GL_ONE}, - /* Over */ - {0, 1, RADEON_SBLEND_GL_ONE | RADEON_DBLEND_GL_INV_SRC_ALPHA}, - /* OverReverse */ - {1, 0, RADEON_SBLEND_GL_INV_DST_ALPHA | RADEON_DBLEND_GL_ONE}, - /* In */ - {1, 0, RADEON_SBLEND_GL_DST_ALPHA | RADEON_DBLEND_GL_ZERO}, - /* InReverse */ - {0, 1, RADEON_SBLEND_GL_ZERO | RADEON_DBLEND_GL_SRC_ALPHA}, - /* Out */ - {1, 0, RADEON_SBLEND_GL_INV_DST_ALPHA | RADEON_DBLEND_GL_ZERO}, - /* OutReverse */ - {0, 1, RADEON_SBLEND_GL_ZERO | RADEON_DBLEND_GL_INV_SRC_ALPHA}, - /* Atop */ - {1, 1, RADEON_SBLEND_GL_DST_ALPHA | RADEON_DBLEND_GL_INV_SRC_ALPHA}, - /* AtopReverse */ - {1, 1, RADEON_SBLEND_GL_INV_DST_ALPHA | RADEON_DBLEND_GL_SRC_ALPHA}, - /* Xor */ - {1, 1, RADEON_SBLEND_GL_INV_DST_ALPHA | RADEON_DBLEND_GL_INV_SRC_ALPHA}, - /* Add */ - {0, 0, RADEON_SBLEND_GL_ONE | RADEON_DBLEND_GL_ONE}, -}; - -struct formatinfo { - int fmt; - Bool byte_swap; - CARD32 card_fmt; -}; - -/* Note on texture formats: - * TXFORMAT_Y8 expands to (Y,Y,Y,1). TXFORMAT_I8 expands to (I,I,I,I) - */ -static struct formatinfo R100TexFormats[] = { - {PICT_a8r8g8b8, 0, RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP}, - {PICT_x8r8g8b8, 0, RADEON_TXFORMAT_ARGB8888}, - {PICT_a8b8g8r8, 1, RADEON_TXFORMAT_RGBA8888 | RADEON_TXFORMAT_ALPHA_IN_MAP}, - {PICT_x8b8g8r8, 1, RADEON_TXFORMAT_RGBA8888}, - {PICT_r5g6b5, 0, RADEON_TXFORMAT_RGB565}, - {PICT_a1r5g5b5, 0, RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP}, - {PICT_x1r5g5b5, 0, RADEON_TXFORMAT_ARGB1555}, - {PICT_a8, 0, RADEON_TXFORMAT_I8 | RADEON_TXFORMAT_ALPHA_IN_MAP}, -}; - -static struct formatinfo R200TexFormats[] = { - {PICT_a8r8g8b8, 0, R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP}, - {PICT_x8r8g8b8, 0, R200_TXFORMAT_ARGB8888}, - {PICT_a8r8g8b8, 1, R200_TXFORMAT_RGBA8888 | R200_TXFORMAT_ALPHA_IN_MAP}, - {PICT_x8r8g8b8, 1, R200_TXFORMAT_RGBA8888}, - {PICT_r5g6b5, 0, R200_TXFORMAT_RGB565}, - {PICT_a1r5g5b5, 0, R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP}, - {PICT_x1r5g5b5, 0, R200_TXFORMAT_ARGB1555}, - {PICT_a8, 0, R200_TXFORMAT_I8 | R200_TXFORMAT_ALPHA_IN_MAP}, -}; - -/* Common Radeon setup code */ - -static Bool -RadeonGetDestFormat(PicturePtr pDstPicture, CARD32 *dst_format) -{ - switch (pDstPicture->format) { - case PICT_a8r8g8b8: - case PICT_x8r8g8b8: - *dst_format = RADEON_COLOR_FORMAT_ARGB8888; - break; - case PICT_r5g6b5: - *dst_format = RADEON_COLOR_FORMAT_RGB565; - break; - case PICT_a1r5g5b5: - case PICT_x1r5g5b5: - *dst_format = RADEON_COLOR_FORMAT_ARGB1555; - break; - case PICT_a8: - *dst_format = RADEON_COLOR_FORMAT_RGB8; - break; - default: - ATI_FALLBACK(("Unsupported dest format 0x%x\n", - pDstPicture->format)); - } - - return TRUE; -} - -/* R100-specific code */ - -static Bool -R100CheckCompositeTexture(PicturePtr pPict, int unit) -{ - int w = pPict->pDrawable->width; - int h = pPict->pDrawable->height; - int i; - - if ((w > 0x7ff) || (h > 0x7ff)) - ATI_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h)); - - for (i = 0; i < sizeof(R100TexFormats) / sizeof(R100TexFormats[0]); i++) - { - if (R100TexFormats[i].fmt == pPict->format) - break; - } - if (i == sizeof(R100TexFormats) / sizeof(R100TexFormats[0])) - ATI_FALLBACK(("Unsupported picture format 0x%x\n", - pPict->format)); - - if (pPict->repeat && ((w & (w - 1)) != 0 || (h & (h - 1)) != 0)) - ATI_FALLBACK(("NPOT repeat unsupported (%dx%d)\n", w, h)); - - if (pPict->filter != PictFilterNearest && - pPict->filter != PictFilterBilinear) - ATI_FALLBACK(("Unsupported filter 0x%x\n", pPict->filter)); - - return TRUE; -} - -static Bool -R100TextureSetup(PicturePtr pPict, PixmapPtr pPix, int unit) -{ - ATIScreenInfo *atis = accel_atis; - KdScreenPriv(pPix->drawable.pScreen); - CARD32 txfilter, txformat, txoffset, txpitch; - int w = pPict->pDrawable->width; - int h = pPict->pDrawable->height; - int i; - RING_LOCALS; - - txpitch = pPix->devKind; - txoffset = ((CARD8 *)pPix->devPrivate.ptr - - pScreenPriv->screen->memory_base); - - for (i = 0; i < sizeof(R100TexFormats) / sizeof(R100TexFormats[0]); i++) - { - if (R100TexFormats[i].fmt == pPict->format) - break; - } - txformat = R100TexFormats[i].card_fmt; - if (R100TexFormats[i].byte_swap) - txoffset |= RADEON_TXO_ENDIAN_BYTE_SWAP; - - if (pPict->repeat) { - txformat |= ATILog2(w) << RADEON_TXFORMAT_WIDTH_SHIFT; - txformat |= ATILog2(h) << RADEON_TXFORMAT_HEIGHT_SHIFT; - } else - txformat |= RADEON_TXFORMAT_NON_POWER2; - txformat |= unit << 24; /* RADEON_TXFORMAT_ST_ROUTE_STQX */ - - - if ((txoffset & 0x1f) != 0) - ATI_FALLBACK(("Bad texture offset 0x%x\n", txoffset)); - if ((txpitch & 0x1f) != 0) - ATI_FALLBACK(("Bad texture pitch 0x%x\n", txpitch)); - - switch (pPict->filter) { - case PictFilterNearest: - txfilter = (RADEON_MAG_FILTER_NEAREST | - RADEON_MIN_FILTER_NEAREST); - break; - case PictFilterBilinear: - txfilter = (RADEON_MAG_FILTER_LINEAR | - RADEON_MIN_FILTER_LINEAR); - break; - default: - ATI_FALLBACK(("Bad filter 0x%x\n", pPict->filter)); - } - - BEGIN_DMA(7); - if (unit == 0) { - OUT_RING(DMA_PACKET0(RADEON_REG_PP_TXFILTER_0, 3)); - OUT_RING_REG(RADEON_REG_PP_TXFILTER_0, txfilter); - OUT_RING_REG(RADEON_REG_PP_TXFORMAT_0, txformat); - OUT_RING_REG(RADEON_REG_PP_TXOFFSET_0, txoffset); - OUT_RING(DMA_PACKET0(RADEON_REG_PP_TEX_SIZE_0, 2)); - OUT_RING_REG(RADEON_REG_PP_TEX_SIZE_0, - (pPix->drawable.width - 1) | - ((pPix->drawable.height - 1) << RADEON_TEX_VSIZE_SHIFT)); - OUT_RING_REG(RADEON_REG_PP_TEX_PITCH_0, txpitch - 32); - } else { - OUT_RING(DMA_PACKET0(RADEON_REG_PP_TXFILTER_1, 3)); - OUT_RING_REG(RADEON_REG_PP_TXFILTER_1, txfilter); - OUT_RING_REG(RADEON_REG_PP_TXFORMAT_1, txformat); - OUT_RING_REG(RADEON_REG_PP_TXOFFSET_1, txoffset); - OUT_RING(DMA_PACKET0(RADEON_REG_PP_TEX_SIZE_1, 2)); - OUT_RING_REG(RADEON_REG_PP_TEX_SIZE_1, - (pPix->drawable.width - 1) | - ((pPix->drawable.height - 1) << RADEON_TEX_VSIZE_SHIFT)); - OUT_RING_REG(RADEON_REG_PP_TEX_PITCH_1, txpitch - 32); - } - END_DMA(); - - if (pPict->transform != 0) { - is_transform[unit] = TRUE; - transform[unit] = pPict->transform; - } else { - is_transform[unit] = FALSE; - } - - return TRUE; -} - -Bool -R100CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, - PicturePtr pDstPicture) -{ - CARD32 tmp1; - - /* Check for unsupported compositing operations. */ - if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0])) - ATI_FALLBACK(("Unsupported Composite op 0x%x\n", op)); - if (pMaskPicture != NULL && pMaskPicture->componentAlpha && - RadeonBlendOp[op].src_alpha) - ATI_FALLBACK(("Component alpha not supported with source " - "alpha blending.\n")); - if (pDstPicture->pDrawable->width >= (1 << 11) || - pDstPicture->pDrawable->height >= (1 << 11)) - ATI_FALLBACK(("Dest w/h too large (%d,%d).\n", - pDstPicture->pDrawable->width, - pDstPicture->pDrawable->height)); - - if (!R100CheckCompositeTexture(pSrcPicture, 0)) - return FALSE; - if (pMaskPicture != NULL && !R100CheckCompositeTexture(pMaskPicture, 1)) - return FALSE; - - if (pDstPicture->componentAlpha) - return FALSE; - - if (!RadeonGetDestFormat(pDstPicture, &tmp1)) - return FALSE; - - return TRUE; -} - -Bool -R100PrepareComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, - PicturePtr pDstPicture, PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) -{ - KdScreenPriv(pDst->drawable.pScreen); - ATIScreenInfo(pScreenPriv); - CARD32 dst_format, dst_offset, dst_pitch; - CARD32 pp_cntl, blendcntl, cblend, ablend; - int pixel_shift; - RING_LOCALS; - - accel_atis = atis; - - RadeonGetDestFormat(pDstPicture, &dst_format); - pixel_shift = pDst->drawable.bitsPerPixel >> 4; - - dst_offset = ((CARD8 *)pDst->devPrivate.ptr - - pScreenPriv->screen->memory_base); - dst_pitch = pDst->devKind; - if ((dst_offset & 0x0f) != 0) - ATI_FALLBACK(("Bad destination offset 0x%x\n", dst_offset)); - if (((dst_pitch >> pixel_shift) & 0x7) != 0) - ATI_FALLBACK(("Bad destination pitch 0x%x\n", dst_pitch)); - - if (!R100TextureSetup(pSrcPicture, pSrc, 0)) - return FALSE; - pp_cntl = RADEON_TEX_0_ENABLE | RADEON_TEX_BLEND_0_ENABLE; - - if (pMask != NULL) { - if (!R100TextureSetup(pMaskPicture, pMask, 1)) - return FALSE; - pp_cntl |= RADEON_TEX_1_ENABLE; - } else { - is_transform[1] = FALSE; - } - - ENTER_DRAW(pDst); - - RadeonSwitchTo3D(atis); - - BEGIN_DMA(12); - - OUT_RING(DMA_PACKET0(RADEON_REG_PP_CNTL, 3)); - OUT_RING_REG(RADEON_REG_PP_CNTL, pp_cntl); - OUT_RING_REG(RADEON_REG_RB3D_CNTL, - dst_format | RADEON_ALPHA_BLEND_ENABLE); - OUT_RING_REG(RADEON_REG_RB3D_COLOROFFSET, dst_offset); - - OUT_REG(RADEON_REG_RB3D_COLORPITCH, dst_pitch >> pixel_shift); - - /* IN operator: Multiply src by mask components or mask alpha. - * BLEND_CTL_ADD is A * B + C. - * If a picture is a8, we have to explicitly zero its color values. - * If the destination is a8, we have to route the alpha to red, I think. - */ - cblend = RADEON_BLEND_CTL_ADD | RADEON_CLAMP_TX | - RADEON_COLOR_ARG_C_ZERO; - ablend = RADEON_BLEND_CTL_ADD | RADEON_CLAMP_TX | - RADEON_ALPHA_ARG_C_ZERO; - - if (pDstPicture->format == PICT_a8) - cblend |= RADEON_COLOR_ARG_A_T0_ALPHA; - else if (pSrcPicture->format == PICT_a8) - cblend |= RADEON_COLOR_ARG_A_ZERO; - else - cblend |= RADEON_COLOR_ARG_A_T0_COLOR; - ablend |= RADEON_ALPHA_ARG_A_T0_ALPHA; - - if (pMask) { - if (pMaskPicture->componentAlpha && - pDstPicture->format != PICT_a8) - cblend |= RADEON_COLOR_ARG_B_T1_COLOR; - else - cblend |= RADEON_COLOR_ARG_B_T1_ALPHA; - ablend |= RADEON_ALPHA_ARG_B_T1_ALPHA; - } else { - cblend |= RADEON_COLOR_ARG_B_ZERO | RADEON_COMP_ARG_B; - ablend |= RADEON_ALPHA_ARG_B_ZERO | RADEON_COMP_ARG_B; - } - - OUT_REG(RADEON_REG_PP_TXCBLEND_0, cblend); - OUT_REG(RADEON_REG_PP_TXABLEND_0, ablend); - - /* Op operator. */ - blendcntl = RadeonBlendOp[op].blend_cntl; - if (PICT_FORMAT_A(pDstPicture->format) == 0 && - RadeonBlendOp[op].dst_alpha) { - if ((blendcntl & RADEON_SBLEND_MASK) == - RADEON_SBLEND_GL_DST_ALPHA) - blendcntl = (blendcntl & ~RADEON_SBLEND_MASK) | - RADEON_SBLEND_GL_ONE; - else if ((blendcntl & RADEON_SBLEND_MASK) == - RADEON_SBLEND_GL_INV_DST_ALPHA) - blendcntl = (blendcntl & ~RADEON_SBLEND_MASK) | - RADEON_SBLEND_GL_ZERO; - } - OUT_REG(RADEON_REG_RB3D_BLENDCNTL, blendcntl); - END_DMA(); - - LEAVE_DRAW(pDst); - - return TRUE; -} - -static Bool -R200CheckCompositeTexture(PicturePtr pPict, int unit) -{ - int w = pPict->pDrawable->width; - int h = pPict->pDrawable->height; - int i; - - if ((w > 0x7ff) || (h > 0x7ff)) - ATI_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h)); - - for (i = 0; i < sizeof(R200TexFormats) / sizeof(R200TexFormats[0]); i++) - { - if (R200TexFormats[i].fmt == pPict->format) - break; - } - if (i == sizeof(R200TexFormats) / sizeof(R200TexFormats[0])) - ATI_FALLBACK(("Unsupported picture format 0x%x\n", - pPict->format)); - - if (pPict->repeat && ((w & (w - 1)) != 0 || (h & (h - 1)) != 0)) - ATI_FALLBACK(("NPOT repeat unsupported (%dx%d)\n", w, h)); - - if (pPict->filter != PictFilterNearest && - pPict->filter != PictFilterBilinear) - ATI_FALLBACK(("Unsupported filter 0x%x\n", pPict->filter)); - - return TRUE; -} - -static Bool -R200TextureSetup(PicturePtr pPict, PixmapPtr pPix, int unit) -{ - ATIScreenInfo *atis = accel_atis; - KdScreenPriv(pPix->drawable.pScreen); - CARD32 txfilter, txformat, txoffset, txpitch; - int w = pPict->pDrawable->width; - int h = pPict->pDrawable->height; - int i; - RING_LOCALS; - - txpitch = pPix->devKind; - txoffset = ((CARD8 *)pPix->devPrivate.ptr - - pScreenPriv->screen->memory_base); - - for (i = 0; i < sizeof(R200TexFormats) / sizeof(R200TexFormats[0]); i++) - { - if (R200TexFormats[i].fmt == pPict->format) - break; - } - txformat = R200TexFormats[i].card_fmt; - if (R200TexFormats[i].byte_swap) - txoffset |= R200_TXO_ENDIAN_BYTE_SWAP; - - if (pPict->repeat) { - txformat |= ATILog2(w) << R200_TXFORMAT_WIDTH_SHIFT; - txformat |= ATILog2(h) << R200_TXFORMAT_HEIGHT_SHIFT; - } else - txformat |= R200_TXFORMAT_NON_POWER2; - txformat |= unit << R200_TXFORMAT_ST_ROUTE_SHIFT; - - if ((txoffset & 0x1f) != 0) - ATI_FALLBACK(("Bad texture offset 0x%x\n", txoffset)); - if ((txpitch & 0x1f) != 0) - ATI_FALLBACK(("Bad texture pitch 0x%x\n", txpitch)); - - switch (pPict->filter) { - case PictFilterNearest: - txfilter = (R200_MAG_FILTER_NEAREST | - R200_MIN_FILTER_NEAREST); - break; - case PictFilterBilinear: - txfilter = (R200_MAG_FILTER_LINEAR | - R200_MIN_FILTER_LINEAR); - break; - default: - ATI_FALLBACK(("Bad filter 0x%x\n", pPict->filter)); - } - - if (unit == 0) { - BEGIN_DMA(6); - OUT_RING(DMA_PACKET0(R200_REG_PP_TXFILTER_0 + 0x20 * unit, 5)); - OUT_RING_REG(R200_REG_PP_TXFILTER_0, txfilter); - OUT_RING_REG(R200_REG_PP_TXFORMAT_0, txformat); - OUT_RING_REG(R200_REG_PP_TXFORMAT_X_0, 0); - OUT_RING_REG(R200_REG_PP_TXSIZE_0, - (pPix->drawable.width - 1) | - ((pPix->drawable.height - 1) << RADEON_TEX_VSIZE_SHIFT)); - OUT_RING_REG(R200_REG_PP_TXPITCH_0, txpitch - 32); - END_DMA(); - } else { - BEGIN_DMA(6); - OUT_RING(DMA_PACKET0(R200_REG_PP_TXFILTER_1, 5)); - OUT_RING_REG(R200_REG_PP_TXFILTER_1, txfilter); - OUT_RING_REG(R200_REG_PP_TXFORMAT_1, txformat); - OUT_RING_REG(R200_REG_PP_TXFORMAT_X_1, 0); - OUT_RING_REG(R200_REG_PP_TXSIZE_1, - (pPix->drawable.width - 1) | - ((pPix->drawable.height - 1) << RADEON_TEX_VSIZE_SHIFT)); - OUT_RING_REG(R200_REG_PP_TXPITCH_1, txpitch - 32); - END_DMA(); - } - - BEGIN_DMA(2); - OUT_REG(R200_PP_TXOFFSET_0 + 0x18 * unit, txoffset); - END_DMA(); - - if (pPict->transform != 0) { - is_transform[unit] = TRUE; - transform[unit] = pPict->transform; - } else { - is_transform[unit] = FALSE; - } - - return TRUE; -} - -Bool -R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, - PicturePtr pDstPicture) -{ - CARD32 tmp1; - - /* Check for unsupported compositing operations. */ - if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0])) - ATI_FALLBACK(("Unsupported Composite op 0x%x\n", op)); - if (pMaskPicture != NULL && pMaskPicture->componentAlpha && - RadeonBlendOp[op].src_alpha) - ATI_FALLBACK(("Component alpha not supported with source " - "alpha blending.\n")); - - if (!R200CheckCompositeTexture(pSrcPicture, 0)) - return FALSE; - if (pMaskPicture != NULL && !R200CheckCompositeTexture(pMaskPicture, 1)) - return FALSE; - - if (!RadeonGetDestFormat(pDstPicture, &tmp1)) - return FALSE; - - return TRUE; -} - -Bool -R200PrepareComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, - PicturePtr pDstPicture, PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) -{ - KdScreenPriv(pDst->drawable.pScreen); - ATIScreenInfo(pScreenPriv); - CARD32 dst_format, dst_offset, dst_pitch; - CARD32 pp_cntl, blendcntl, cblend, ablend; - int pixel_shift; - RING_LOCALS; - - RadeonGetDestFormat(pDstPicture, &dst_format); - pixel_shift = pDst->drawable.bitsPerPixel >> 4; - - accel_atis = atis; - - dst_offset = ((CARD8 *)pDst->devPrivate.ptr - - pScreenPriv->screen->memory_base); - dst_pitch = pDst->devKind; - if ((dst_offset & 0x0f) != 0) - ATI_FALLBACK(("Bad destination offset 0x%x\n", dst_offset)); - if (((dst_pitch >> pixel_shift) & 0x7) != 0) - ATI_FALLBACK(("Bad destination pitch 0x%x\n", dst_pitch)); - - if (!R200TextureSetup(pSrcPicture, pSrc, 0)) - return FALSE; - pp_cntl = RADEON_TEX_0_ENABLE | RADEON_TEX_BLEND_0_ENABLE; - - if (pMask != NULL) { - if (!R200TextureSetup(pMaskPicture, pMask, 1)) - return FALSE; - pp_cntl |= RADEON_TEX_1_ENABLE; - } else { - is_transform[1] = FALSE; - } - - RadeonSwitchTo3D(atis); - - BEGIN_DMA(17); - - OUT_RING(DMA_PACKET0(RADEON_REG_PP_CNTL, 3)); - OUT_RING_REG(RADEON_REG_PP_CNTL, pp_cntl); - OUT_RING_REG(RADEON_REG_RB3D_CNTL, dst_format | RADEON_ALPHA_BLEND_ENABLE); - OUT_RING_REG(RADEON_REG_RB3D_COLOROFFSET, dst_offset); - - OUT_REG(R200_REG_SE_VTX_FMT_0, R200_VTX_XY); - OUT_REG(R200_REG_SE_VTX_FMT_1, - (2 << R200_VTX_TEX0_COMP_CNT_SHIFT) | - (2 << R200_VTX_TEX1_COMP_CNT_SHIFT)); - - OUT_REG(RADEON_REG_RB3D_COLORPITCH, dst_pitch >> pixel_shift); - - /* IN operator: Multiply src by mask components or mask alpha. - * BLEND_CTL_ADD is A * B + C. - * If a picture is a8, we have to explicitly zero its color values. - * If the destination is a8, we have to route the alpha to red, I think. - */ - cblend = R200_TXC_OP_MADD | R200_TXC_ARG_C_ZERO; - ablend = R200_TXA_OP_MADD | R200_TXA_ARG_C_ZERO; - - if (pDstPicture->format == PICT_a8) - cblend |= R200_TXC_ARG_A_R0_ALPHA; - else if (pSrcPicture->format == PICT_a8) - cblend |= R200_TXC_ARG_A_ZERO; - else - cblend |= R200_TXC_ARG_A_R0_COLOR; - ablend |= R200_TXA_ARG_A_R0_ALPHA; - - if (pMask) { - if (pMaskPicture->componentAlpha && - pDstPicture->format != PICT_a8) - cblend |= R200_TXC_ARG_B_R1_COLOR; - else - cblend |= R200_TXC_ARG_B_R1_ALPHA; - ablend |= R200_TXA_ARG_B_R1_ALPHA; - } else { - cblend |= R200_TXC_ARG_B_ZERO | R200_TXC_COMP_ARG_B; - ablend |= R200_TXA_ARG_B_ZERO | R200_TXA_COMP_ARG_B; - } - - OUT_RING(DMA_PACKET0(R200_REG_PP_TXCBLEND_0, 4)); - OUT_RING_REG(R200_REG_PP_TXCBLEND_0, cblend); - OUT_RING_REG(R200_REG_PP_TXCBLEND2_0, - R200_TXC_CLAMP_0_1 | R200_TXC_OUTPUT_REG_R0); - OUT_RING_REG(R200_REG_PP_TXABLEND_0, ablend); - OUT_RING_REG(R200_REG_PP_TXABLEND2_0, - R200_TXA_CLAMP_0_1 | R200_TXA_OUTPUT_REG_R0); - - /* Op operator. */ - blendcntl = RadeonBlendOp[op].blend_cntl; - if (PICT_FORMAT_A(pDstPicture->format) == 0 && - RadeonBlendOp[op].dst_alpha) { - if ((blendcntl & RADEON_SBLEND_MASK) == - RADEON_SBLEND_GL_DST_ALPHA) - blendcntl = (blendcntl & ~RADEON_SBLEND_MASK) | - RADEON_SBLEND_GL_ONE; - else if ((blendcntl & RADEON_SBLEND_MASK) == - RADEON_SBLEND_GL_INV_DST_ALPHA) - blendcntl = (blendcntl & ~RADEON_SBLEND_MASK) | - RADEON_SBLEND_GL_ZERO; - } - OUT_REG(RADEON_REG_RB3D_BLENDCNTL, blendcntl); - END_DMA(); - - return TRUE; -} - -union intfloat { - float f; - CARD32 i; -}; - -struct blend_vertex { - union intfloat x, y; - union intfloat s0, t0; - union intfloat s1, t1; -}; - -#define VTX_DWORD_COUNT 6 - -#define VTX_OUT(_dstX, _dstY, _srcX, _srcY, _maskX, _maskY) \ -do { \ - OUT_RING_F(_dstX); \ - OUT_RING_F(_dstY); \ - OUT_RING_F(_srcX); \ - OUT_RING_F(_srcY); \ - OUT_RING_F(_maskX); \ - OUT_RING_F(_maskY); \ -} while (0) - -void -RadeonComposite(int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, - int w, int h) -{ - ATIScreenInfo *atis = accel_atis; - ATICardInfo *atic = atis->atic; - int srcXend, srcYend, maskXend, maskYend; - RING_LOCALS; - PictVector v; - - ENTER_DRAW(0); - - /*ErrorF("RadeonComposite (%d,%d) (%d,%d) (%d,%d) (%d,%d)\n", - srcX, srcY, maskX, maskY,dstX, dstY, w, h);*/ - - srcXend = srcX + w; - srcYend = srcY + h; - maskXend = maskX + w; - maskYend = maskY + h; - if (is_transform[0]) { - v.vector[0] = IntToxFixed(srcX); - v.vector[1] = IntToxFixed(srcY); - v.vector[2] = xFixed1; - PictureTransformPoint(transform[0], &v); - srcX = xFixedToInt(v.vector[0]); - srcY = xFixedToInt(v.vector[1]); - v.vector[0] = IntToxFixed(srcXend); - v.vector[1] = IntToxFixed(srcYend); - v.vector[2] = xFixed1; - PictureTransformPoint(transform[0], &v); - srcXend = xFixedToInt(v.vector[0]); - srcYend = xFixedToInt(v.vector[1]); - } - if (is_transform[1]) { - v.vector[0] = IntToxFixed(maskX); - v.vector[1] = IntToxFixed(maskY); - v.vector[2] = xFixed1; - PictureTransformPoint(transform[1], &v); - maskX = xFixedToInt(v.vector[0]); - maskY = xFixedToInt(v.vector[1]); - v.vector[0] = IntToxFixed(maskXend); - v.vector[1] = IntToxFixed(maskYend); - v.vector[2] = xFixed1; - PictureTransformPoint(transform[1], &v); - maskXend = xFixedToInt(v.vector[0]); - maskYend = xFixedToInt(v.vector[1]); - } - - if (atic->is_r100) { - BEGIN_DMA(4 * VTX_DWORD_COUNT + 3); - OUT_RING(DMA_PACKET3(RADEON_CP_PACKET3_3D_DRAW_IMMD, - 4 * VTX_DWORD_COUNT + 2)); - OUT_RING(RADEON_CP_VC_FRMT_XY | - RADEON_CP_VC_FRMT_ST0 | - RADEON_CP_VC_FRMT_ST1); - OUT_RING(RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_FAN | - RADEON_CP_VC_CNTL_PRIM_WALK_RING | - RADEON_CP_VC_CNTL_MAOS_ENABLE | - RADEON_CP_VC_CNTL_VTX_FMT_RADEON_MODE | - (4 << RADEON_CP_VC_CNTL_NUM_SHIFT)); - } else { - BEGIN_DMA(4 * VTX_DWORD_COUNT + 2); - OUT_RING(DMA_PACKET3(R200_CP_PACKET3_3D_DRAW_IMMD_2, - 4 * VTX_DWORD_COUNT + 1)); - OUT_RING(RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_FAN | - RADEON_CP_VC_CNTL_PRIM_WALK_RING | - (4 << RADEON_CP_VC_CNTL_NUM_SHIFT)); - } - - VTX_OUT(dstX, dstY, srcX, srcY, maskX, maskY); - VTX_OUT(dstX, dstY + h, srcX, srcYend, maskX, maskYend); - VTX_OUT(dstX + w, dstY + h, srcXend, srcYend, maskXend, maskYend); - VTX_OUT(dstX + w, dstY, srcXend, srcY, maskXend, maskY); - - LEAVE_DRAW(0); - - END_DMA(); -} - -void -RadeonDoneComposite(void) -{ - ENTER_DRAW(0); - LEAVE_DRAW(0); -} - -Bool -RadeonPrepareTrapezoids(PicturePtr pDstPicture, PixmapPtr pDst) -{ - KdScreenPriv(pDst->drawable.pScreen); - ATIScreenInfo(pScreenPriv); - ATICardInfo(pScreenPriv); - CARD32 dst_offset, dst_pitch; - int pixel_shift; - RING_LOCALS; - - pixel_shift = pDst->drawable.bitsPerPixel >> 4; - - accel_atis = atis; - - dst_offset = ((CARD8 *)pDst->devPrivate.ptr - - pScreenPriv->screen->memory_base); - dst_pitch = pDst->devKind; - if ((dst_offset & 0x0f) != 0) - ATI_FALLBACK(("Bad destination offset 0x%x\n", dst_offset)); - if (((dst_pitch >> pixel_shift) & 0x7) != 0) - ATI_FALLBACK(("Bad destination pitch 0x%x\n", dst_pitch)); - - RadeonSwitchTo3D(atis); - - BEGIN_DMA(8); - - OUT_RING(DMA_PACKET0(RADEON_REG_PP_CNTL, 5)); - OUT_RING_REG(RADEON_REG_PP_CNTL, RADEON_TEX_BLEND_0_ENABLE); - OUT_RING_REG(RADEON_REG_RB3D_CNTL, - RADEON_COLOR_FORMAT_RGB8 | RADEON_ALPHA_BLEND_ENABLE); - OUT_RING_REG(RADEON_REG_RB3D_COLOROFFSET, dst_offset); - OUT_RING_REG(RADEON_REG_RE_WIDTH_HEIGHT, - ((pDst->drawable.height - 1) << 16) | - (pDst->drawable.width - 1)); - OUT_RING_REG(RADEON_REG_RB3D_COLORPITCH, dst_pitch >> pixel_shift); - OUT_REG(RADEON_REG_RB3D_BLENDCNTL, RadeonBlendOp[PictOpAdd].blend_cntl); - END_DMA(); - - if (atic->is_r100) { - BEGIN_DMA(4); - OUT_RING(DMA_PACKET0(RADEON_REG_PP_TXCBLEND_0, 3)); - OUT_RING_REG(RADEON_REG_PP_TXCBLEND_0, - RADEON_BLEND_CTL_ADD | RADEON_CLAMP_TX | - RADEON_COLOR_ARG_C_TFACTOR_ALPHA); - OUT_RING_REG(RADEON_REG_PP_TXABLEND_0, - RADEON_BLEND_CTL_ADD | RADEON_CLAMP_TX | - RADEON_ALPHA_ARG_C_TFACTOR_ALPHA); - OUT_RING_REG(RADEON_REG_PP_TFACTOR_0, 0x01000000); - END_DMA(); - } else if (atic->is_r200) { - BEGIN_DMA(14); - OUT_REG(R200_REG_SE_VTX_FMT_0, R200_VTX_XY); - OUT_REG(R200_REG_SE_VTX_FMT_1, 0); - OUT_REG(R200_REG_PP_TXCBLEND_0, - R200_TXC_ARG_C_TFACTOR_COLOR); - OUT_REG(R200_REG_PP_TXABLEND_0, - R200_TXA_ARG_C_TFACTOR_ALPHA); - OUT_REG(R200_REG_PP_TXCBLEND2_0, R200_TXC_OUTPUT_REG_R0); - OUT_REG(R200_REG_PP_TXABLEND2_0, R200_TXA_OUTPUT_REG_R0); - OUT_REG(RADEON_REG_PP_TFACTOR_0, 0x01000000); - END_DMA(); - } - - return TRUE; -} - -#define TRAP_VERT_RING_COUNT 2 - -#define TRAP_VERT(_x, _y) \ -do { \ - OUT_RING_F((_x) + sample_x); \ - OUT_RING_F((_y) + sample_y); \ -} while (0) - -void -RadeonTrapezoids(KaaTrapezoid *traps, int ntraps) -{ - ATIScreenInfo *atis = accel_atis; - ATICardInfo *atic = atis->atic; - RING_LOCALS; - - while (ntraps > 0) { - int i, sample, count, vertcount; - - count = 0xffff / 4 / sample_count; - if (count > ntraps) - count = ntraps; - vertcount = count * sample_count * 4; - - if (atic->is_r100) { - BEGIN_DMA(3 + vertcount * TRAP_VERT_RING_COUNT); - OUT_RING(DMA_PACKET3(RADEON_CP_PACKET3_3D_DRAW_IMMD, - 2 + vertcount * TRAP_VERT_RING_COUNT)); - OUT_RING(RADEON_CP_VC_FRMT_XY); - OUT_RING(RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_FAN | - RADEON_CP_VC_CNTL_PRIM_WALK_RING | - RADEON_CP_VC_CNTL_MAOS_ENABLE | - RADEON_CP_VC_CNTL_VTX_FMT_RADEON_MODE | - (vertcount << RADEON_CP_VC_CNTL_NUM_SHIFT)); - } else { - BEGIN_DMA(2 + vertcount * TRAP_VERT_RING_COUNT); - OUT_RING(DMA_PACKET3(R200_CP_PACKET3_3D_DRAW_IMMD_2, - 1 + vertcount * TRAP_VERT_RING_COUNT)); - OUT_RING(RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_FAN | - RADEON_CP_VC_CNTL_PRIM_WALK_RING | - (vertcount << RADEON_CP_VC_CNTL_NUM_SHIFT)); - } - - for (i = 0; i < count; i++) { - for (sample = 0; sample < sample_count; sample++) { - float sample_x = sample_offsets_x[sample]; - float sample_y = sample_offsets_y[sample]; - TRAP_VERT(traps[i].tl, traps[i].ty); - TRAP_VERT(traps[i].bl, traps[i].by); - TRAP_VERT(traps[i].br, traps[i].by); - TRAP_VERT(traps[i].tr, traps[i].ty); - } - } - END_DMA(); - - ntraps -= count; - traps += count; - } -} - -void -RadeonDoneTrapezoids(void) -{ - ATIScreenInfo *atis = accel_atis; - RING_LOCALS; - - BEGIN_DMA(2); - OUT_REG(RADEON_REG_RE_WIDTH_HEIGHT, 0xffffffff); - END_DMA(); -} diff --git a/hw/kdrive/ati/radeon_sarea.h b/hw/kdrive/ati/radeon_sarea.h deleted file mode 100644 index 1d39bca52..000000000 --- a/hw/kdrive/ati/radeon_sarea.h +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright 2000 ATI Technologies Inc., Markham, Ontario, - * VA Linux Systems Inc., Fremont, California. - * - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation on the rights to use, copy, modify, merge, - * publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, VA LINUX SYSTEMS AND/OR - * THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/* - * Authors: - * Kevin E. Martin - * Gareth Hughes - * - */ - -#ifndef _RADEON_SAREA_H_ -#define _RADEON_SAREA_H_ - -/* WARNING: If you change any of these defines, make sure to change the - * defines in the kernel file (radeon_drm.h) - */ -#ifndef __RADEON_SAREA_DEFINES__ -#define __RADEON_SAREA_DEFINES__ - -/* What needs to be changed for the current vertex buffer? */ -#define RADEON_UPLOAD_CONTEXT 0x00000001 -#define RADEON_UPLOAD_VERTFMT 0x00000002 -#define RADEON_UPLOAD_LINE 0x00000004 -#define RADEON_UPLOAD_BUMPMAP 0x00000008 -#define RADEON_UPLOAD_MASKS 0x00000010 -#define RADEON_UPLOAD_VIEWPORT 0x00000020 -#define RADEON_UPLOAD_SETUP 0x00000040 -#define RADEON_UPLOAD_TCL 0x00000080 -#define RADEON_UPLOAD_MISC 0x00000100 -#define RADEON_UPLOAD_TEX0 0x00000200 -#define RADEON_UPLOAD_TEX1 0x00000400 -#define RADEON_UPLOAD_TEX2 0x00000800 -#define RADEON_UPLOAD_TEX0IMAGES 0x00001000 -#define RADEON_UPLOAD_TEX1IMAGES 0x00002000 -#define RADEON_UPLOAD_TEX2IMAGES 0x00004000 -#define RADEON_UPLOAD_CLIPRECTS 0x00008000 /* handled client-side */ -#define RADEON_REQUIRE_QUIESCENCE 0x00010000 -#define RADEON_UPLOAD_ZBIAS 0x00020000 -#define RADEON_UPLOAD_ALL 0x0002ffff -#define RADEON_UPLOAD_CONTEXT_ALL 0x000201ff - -#define RADEON_FRONT 0x1 -#define RADEON_BACK 0x2 -#define RADEON_DEPTH 0x4 -#define RADEON_STENCIL 0x8 - -/* Primitive types */ -#define RADEON_POINTS 0x1 -#define RADEON_LINES 0x2 -#define RADEON_LINE_STRIP 0x3 -#define RADEON_TRIANGLES 0x4 -#define RADEON_TRIANGLE_FAN 0x5 -#define RADEON_TRIANGLE_STRIP 0x6 -#define RADEON_3VTX_POINTS 0x9 -#define RADEON_3VTX_LINES 0xa - -/* Vertex/indirect buffer size */ -#define RADEON_BUFFER_SIZE 65536 - -/* Byte offsets for indirect buffer data */ -#define RADEON_INDEX_PRIM_OFFSET 20 -#define RADEON_HOSTDATA_BLIT_OFFSET 32 - -#define RADEON_SCRATCH_REG_OFFSET 32 - -/* Keep these small for testing */ -#define RADEON_NR_SAREA_CLIPRECTS 12 - -#define RADEON_MAX_TEXTURE_LEVELS 12 -#define RADEON_MAX_TEXTURE_UNITS 3 - -/* Blits have strict offset rules. All blit offset must be aligned on - * a 1K-byte boundary. - */ -#define RADEON_OFFSET_SHIFT 10 -#define RADEON_OFFSET_ALIGN (1 << RADEON_OFFSET_SHIFT) -#define RADEON_OFFSET_MASK (RADEON_OFFSET_ALIGN - 1) - -#endif /* __RADEON_SAREA_DEFINES__ */ - -typedef struct { - unsigned int red; - unsigned int green; - unsigned int blue; - unsigned int alpha; -} radeon_color_regs_t; - -typedef struct { - /* Context state */ - unsigned int pp_misc; - unsigned int pp_fog_color; - unsigned int re_solid_color; - unsigned int rb3d_blendcntl; - unsigned int rb3d_depthoffset; - unsigned int rb3d_depthpitch; - unsigned int rb3d_zstencilcntl; - - unsigned int pp_cntl; - unsigned int rb3d_cntl; - unsigned int rb3d_coloroffset; - unsigned int re_width_height; - unsigned int rb3d_colorpitch; - unsigned int se_cntl; - - /* Vertex format state */ - unsigned int se_coord_fmt; - - /* Line state */ - unsigned int re_line_pattern; - unsigned int re_line_state; - - unsigned int se_line_width; - - /* Bumpmap state */ - unsigned int pp_lum_matrix; - - unsigned int pp_rot_matrix_0; - unsigned int pp_rot_matrix_1; - - /* Mask state */ - unsigned int rb3d_stencilrefmask; - unsigned int rb3d_ropcntl; - unsigned int rb3d_planemask; - - /* Viewport state */ - unsigned int se_vport_xscale; - unsigned int se_vport_xoffset; - unsigned int se_vport_yscale; - unsigned int se_vport_yoffset; - unsigned int se_vport_zscale; - unsigned int se_vport_zoffset; - - /* Setup state */ - unsigned int se_cntl_status; - - /* Misc state */ - unsigned int re_top_left; - unsigned int re_misc; -} radeon_context_regs_t; - -/* Setup registers for each texture unit */ -typedef struct { - unsigned int pp_txfilter; - unsigned int pp_txformat; - unsigned int pp_txoffset; - unsigned int pp_txcblend; - unsigned int pp_txablend; - unsigned int pp_tfactor; - unsigned int pp_border_color; -} radeon_texture_regs_t; - -typedef struct { - /* The channel for communication of state information to the kernel - * on firing a vertex buffer. - */ - radeon_context_regs_t ContextState; - radeon_texture_regs_t TexState[RADEON_MAX_TEXTURE_UNITS]; - unsigned int dirty; - unsigned int vertsize; - unsigned int vc_format; - - /* The current cliprects, or a subset thereof */ - XF86DRIClipRectRec boxes[RADEON_NR_SAREA_CLIPRECTS]; - unsigned int nbox; - - /* Counters for throttling of rendering clients */ - unsigned int last_frame; - unsigned int last_dispatch; - unsigned int last_clear; - - /* Maintain an LRU of contiguous regions of texture space. If you - * think you own a region of texture memory, and it has an age - * different to the one you set, then you are mistaken and it has - * been stolen by another client. If global texAge hasn't changed, - * there is no need to walk the list. - * - * These regions can be used as a proxy for the fine-grained texture - * information of other clients - by maintaining them in the same - * lru which is used to age their own textures, clients have an - * approximate lru for the whole of global texture space, and can - * make informed decisions as to which areas to kick out. There is - * no need to choose whether to kick out your own texture or someone - * else's - simply eject them all in LRU order. - */ - /* Last elt is sentinal */ - drmTextureRegion texList[ATI_NR_TEX_HEAPS][ATI_NR_TEX_REGIONS+1]; - /* last time texture was uploaded */ - unsigned int texAge[ATI_NR_TEX_HEAPS]; - - int ctxOwner; /* last context to upload state */ - int pfAllowPageFlip; /* set by the 2d driver, read by the client */ - int pfCurrentPage; /* set by kernel, read by others */ - int crtc2_base; /* for pageflipping with CloneMode */ -} RADEONSAREAPriv, *RADEONSAREAPrivPtr; - -#endif diff --git a/hw/kdrive/chips/Makefile.am b/hw/kdrive/chips/Makefile.am deleted file mode 100644 index 46e176051..000000000 --- a/hw/kdrive/chips/Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -INCLUDES = \ - @KDRIVE_INCS@ \ - -I$(top_srcdir)/hw/kdrive/vesa \ - @KDRIVE_CFLAGS@ - -bin_PROGRAMS = Xchips - -noinst_LIBRARIES = libchips.a - -libchips_a_SOURCES = \ - chipsdraw.c \ - chips.c \ - chips.h - -Xchips_SOURCES = \ - chipsstub.c - -CHIPS_LIBS = \ - libchips.a \ - $(top_builddir)/hw/kdrive/vesa/libvesa.a \ - @KDRIVE_LIBS@ - -if GLX -Xchips_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -endif - -Xchips_LDADD = \ - $(CHIPS_LIBS) \ - @KDRIVE_LIBS@ - -Xchips_DEPENDENCIES = \ - libchips.a \ - @KDRIVE_LOCAL_LIBS@ - -relink: - rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS) diff --git a/hw/kdrive/chips/chips.c b/hw/kdrive/chips/chips.c deleted file mode 100644 index b419863eb..000000000 --- a/hw/kdrive/chips/chips.c +++ /dev/null @@ -1,334 +0,0 @@ -/* - * Copyright © 2001 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "chips.h" -#include "kaa.h" -#include - -#undef CHIPS_DEBUG - -static Bool -chipsCardInit (KdCardInfo *card) -{ - ChipsCardInfo *chipsc; - - chipsc = (ChipsCardInfo *) xalloc (sizeof (ChipsCardInfo)); - if (!chipsc) - return FALSE; - - iopl (3); - - if (!vesaInitialize (card, &chipsc->vesa)) - { - xfree (chipsc); - return FALSE; - } - -#ifdef USE_PCI - chipsc->window = (CARD32 *) (chipsc->cop_base + 0x10000); -#else - chipsc->window = 0; -#endif - card->driver = chipsc; - - return TRUE; -} - -static Bool -chipsScreenInit (KdScreenInfo *screen) -{ - ChipsScreenInfo *chipss; - int screen_size, memory; - - chipss = (ChipsScreenInfo *) xalloc (sizeof (ChipsScreenInfo)); - if (!chipss) - return FALSE; - memset (chipss, '\0', sizeof (ChipsScreenInfo)); - if (!vesaScreenInitialize (screen, &chipss->vesa)) - { - xfree (chipss); - return FALSE; - } - - if (chipss->vesa.mapping != VESA_LINEAR) - screen->dumb = TRUE; - if (!screen->dumb) - { - chipss->mmio_base = (CARD8 *) KdMapDevice (CHIPS_MMIO_BASE(chipss), - CHIPS_MMIO_SIZE(chipss)); - - if (chipss->mmio_base) - { - KdSetMappedMode (CHIPS_MMIO_BASE(chipss), - CHIPS_MMIO_SIZE(chipss), - KD_MAPPED_MODE_REGISTERS); - } - else - screen->dumb = TRUE; - } - else - chipss->mmio_base = 0; - - chipss->screen = chipss->vesa.fb; - memory = chipss->vesa.fb_size; - - screen_size = screen->fb[0].byteStride * screen->height; - - if (chipss->screen && memory >= screen_size + 2048) - { - memory -= 2048; - chipss->cursor_base = chipss->screen + memory - 2048; - } - else - chipss->cursor_base = 0; - memory -= screen_size; - if (memory > screen->fb[0].byteStride) - { - chipss->off_screen = chipss->screen + screen_size; - chipss->off_screen_size = memory; - } - else - { - chipss->off_screen = 0; - chipss->off_screen_size = 0; - } - screen->driver = chipss; - return TRUE; -} - -static Bool -chipsInitScreen (ScreenPtr pScreen) -{ - return vesaInitScreen (pScreen); -} - -#ifdef RANDR -static Bool -chipsRandRSetConfig (ScreenPtr pScreen, - Rotation rotation, - int rate, - RRScreenSizePtr pSize) -{ - kaaWaitSync (pScreen); - - if (!vesaRandRSetConfig (pScreen, rotation, rate, pSize)) - return FALSE; - - return TRUE; -} - -static void -chipsRandRInit (ScreenPtr pScreen) -{ - rrScrPriv(pScreen); - - pScrPriv->rrSetConfig = chipsRandRSetConfig; -} -#endif - -static Bool -chipsFinishInitScreen (ScreenPtr pScreen) -{ - Bool ret; - ret = vesaFinishInitScreen (pScreen); -#ifdef RANDR - chipsRandRInit (pScreen); -#endif - return ret; -} - -static Bool -chipsCreateResources (ScreenPtr pScreen) -{ - return vesaCreateResources (pScreen); -} - -CARD8 -chipsReadXR (ChipsScreenInfo *chipss, CARD8 index) -{ - CARD8 value; - outb (index, 0x3d6); - value = inb (0x3d7); - return value; -} - -void -chipsWriteXR (ChipsScreenInfo *chipss, CARD8 index, CARD8 value) -{ - outb (index, 0x3d6); - outb (value, 0x3d7); -} - -#if 0 -static CARD8 -chipsReadFR (ChipsScreenInfo *chipss, CARD8 index) -{ - CARD8 value; - outb (index, 0x3d0); - value = inb (0x3d1); - return value; -} - -static void -chipsWriteFR (ChipsScreenInfo *chipss, CARD8 index, CARD8 value) -{ - outb (index, 0x3d0); - outb (value, 0x3d1); -} - -static CARD8 -chipsReadSeq (ChipsScreenInfo *chipss, CARD8 index) -{ - CARD8 value; - outb (index, 0x3c4); - value = inb (0x3c5); - return value; -} - -static void -chipsWriteSeq (ChipsScreenInfo *chipss, CARD8 index, CARD8 value) -{ - outb (index, 0x3c4); - outb (value, 0x3c5); -} -#endif - -static void -chipsPreserve (KdCardInfo *card) -{ - vesaPreserve(card); -} - -static void -chipsSetMMIO (ChipsCardInfo *chipsc) -{ -} - -static void -chipsResetMMIO (ChipsCardInfo *chipsc) -{ -} - -static Bool -chipsEnable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - ChipsCardInfo *chipsc = pScreenPriv->card->driver; - - if (!vesaEnable (pScreen)) - return FALSE; - chipsSetMMIO (chipsc); - return TRUE; -} - -#if 0 -static Bool -chipsDPMS (ScreenPtr pScreen, int mode) -{ - KdScreenPriv(pScreen); - chipsScreenInfo(pScreenPriv); - - ErrorF ("seqreg 0x01 0x%x\n", chipsReadSeq (chipss, 0x1)); - ErrorF ("dpmsreg XR61 0x%x\n", chipsReadXR (chipss, 0x61)); - ErrorF ("dpmsreg XR73 0x%x\n", chipsReadXR (chipss, 0x73)); - - ErrorF ("flat panel FR05 0x%x\n", chipsReadFR (chipss, 0x5)); - ErrorF ("flat panel XR52 0x%x\n", chipsReadXR (chipss, 0x52)); - return TRUE; -} -#endif - -static void -chipsDisable (ScreenPtr pScreen) -{ - vesaDisable (pScreen); -} - -static void -chipsRestore (KdCardInfo *card) -{ - ChipsCardInfo *chipsc = card->driver; - - chipsResetMMIO (chipsc); - vesaRestore (card); -} - -static void -chipsScreenFini (KdScreenInfo *screen) -{ - ChipsScreenInfo *chipss = (ChipsScreenInfo *) screen->driver; - - if (chipss->mmio_base) - { - KdUnmapDevice ((void *) chipss->mmio_base, CHIPS_MMIO_SIZE(chipss)); - KdResetMappedMode (CHIPS_MMIO_BASE(chipss), - CHIPS_MMIO_SIZE(chipss), - KD_MAPPED_MODE_REGISTERS); - } - vesaScreenFini (screen); - xfree (chipss); - screen->driver = 0; -} - -static void -chipsCardFini (KdCardInfo *card) -{ - vesaCardFini (card); -} - -#define chipsCursorInit (void *) 0 -#define chipsCursorEnable (void *) 0 -#define chipsCursorDisable (void *) 0 -#define chipsCursorFini (void *) 0 -#define chipsRecolorCursor (void *) 0 - -KdCardFuncs chipsFuncs = { - chipsCardInit, /* cardinit */ - chipsScreenInit, /* scrinit */ - chipsInitScreen, /* initScreen */ - chipsFinishInitScreen, /* finishInitScreen */ - chipsCreateResources, /* createRes */ - chipsPreserve, /* preserve */ - chipsEnable, /* enable */ - vesaDPMS, /* dpms */ - chipsDisable, /* disable */ - chipsRestore, /* restore */ - chipsScreenFini, /* scrfini */ - chipsCardFini, /* cardfini */ - - chipsCursorInit, /* initCursor */ - chipsCursorEnable, /* enableCursor */ - chipsCursorDisable, /* disableCursor */ - chipsCursorFini, /* finiCursor */ - chipsRecolorCursor, /* recolorCursor */ - - chipsDrawInit, /* initAccel */ - chipsDrawEnable, /* enableAccel */ - chipsDrawDisable, /* disableAccel */ - chipsDrawFini, /* finiAccel */ - - vesaGetColors, /* getColors */ - vesaPutColors, /* putColors */ -}; diff --git a/hw/kdrive/chips/chips.h b/hw/kdrive/chips/chips.h deleted file mode 100644 index 6ad17fe25..000000000 --- a/hw/kdrive/chips/chips.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _CHIPS_H_ -#define _CHIPS_H_ -#include - -/* - * offset from ioport beginning - */ - -#define HIQV -#ifdef HIQV -#define CHIPS_MMIO_BASE(c) ((c)->vesa.fb_phys + 0x400000) -#else -#define CHIPS_MMIO_BASE(c) ((c)->vesa.fb_phys + 0x200000) -#endif -#define CHIPS_MMIO_SIZE(c) (0x20000) - -typedef volatile CARD8 VOL8; -typedef volatile CARD16 VOL16; -typedef volatile CARD32 VOL32; - -typedef struct _chipsSave { - int dummy; -} ChipsSave; - -typedef struct _chipsCardInfo { - VesaCardPrivRec vesa; - CARD32 *window; - Bool mmio; - ChipsSave save; -} ChipsCardInfo; - -#define getChipsCardInfo(kd) ((ChipsCardInfo *) ((kd)->card->driver)) -#define chipsCardInfo(kd) ChipsCardInfo *chipsc = getChipsCardInfo(kd) - -typedef struct _chipsCursor { - int width, height; - int xhot, yhot; - Bool has_cursor; - CursorPtr pCursor; - Pixel source, mask; -} ChipsCursor; - -#define CHIPS_CURSOR_WIDTH 64 -#define CHIPS_CURSOR_HEIGHT 64 - -typedef struct _chipsScreenInfo { - VesaScreenPrivRec vesa; - CARD8 *mmio_base; - CARD8 *cursor_base; - CARD8 *screen; - CARD8 *off_screen; - int off_screen_size; - ChipsCursor cursor; - KaaScreenInfoRec kaa; -} ChipsScreenInfo; - -#define getChipsScreenInfo(kd) ((ChipsScreenInfo *) ((kd)->screen->driver)) -#define chipsScreenInfo(kd) ChipsScreenInfo *chipss = getChipsScreenInfo(kd) - -Bool -chipsDrawInit (ScreenPtr pScreen); - -void -chipsDrawEnable (ScreenPtr pScreen); - -void -chipsDrawDisable (ScreenPtr pScreen); - -void -chipsDrawFini (ScreenPtr pScreen); - -CARD8 -chipsReadXR (ChipsScreenInfo *chipsc, CARD8 index); - -void -chipsWriteXR (ChipsScreenInfo *chipsc, CARD8 index, CARD8 value); - -Bool -chipsCursorInit (ScreenPtr pScreen); - -void -chipsCursorEnable (ScreenPtr pScreen); - -void -chipsCursorDisable (ScreenPtr pScreen); - -void -chipsCursorFini (ScreenPtr pScreen); - -void -chipsRecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdef); - -extern KdCardFuncs chipsFuncs; - -#endif /* _CHIPS_H_ */ diff --git a/hw/kdrive/chips/chipsdraw.c b/hw/kdrive/chips/chipsdraw.c deleted file mode 100644 index b1c35f901..000000000 --- a/hw/kdrive/chips/chipsdraw.c +++ /dev/null @@ -1,491 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "chips.h" - -#include -#include "gcstruct.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "regionstr.h" -#include "mistruct.h" -#include "dixfontstr.h" -#include "fb.h" -#include "migc.h" -#include "miline.h" -#include "kaa.h" - -CARD8 chipsBltRop[16] = { - /* GXclear */ 0x00, /* 0 */ - /* GXand */ 0x88, /* src AND dst */ - /* GXandReverse */ 0x44, /* src AND NOT dst */ - /* GXcopy */ 0xcc, /* src */ - /* GXandInverted*/ 0x22, /* NOT src AND dst */ - /* GXnoop */ 0xaa, /* dst */ - /* GXxor */ 0x66, /* src XOR dst */ - /* GXor */ 0xee, /* src OR dst */ - /* GXnor */ 0x11, /* NOT src AND NOT dst */ - /* GXequiv */ 0x99, /* NOT src XOR dst */ - /* GXinvert */ 0x55, /* NOT dst */ - /* GXorReverse */ 0xdd, /* src OR NOT dst */ - /* GXcopyInverted*/ 0x33, /* NOT src */ - /* GXorInverted */ 0xbb, /* NOT src OR dst */ - /* GXnand */ 0x77, /* NOT src OR NOT dst */ - /* GXset */ 0xff, /* 1 */ -}; - -CARD8 chipsSolidRop[16] = { - /* GXclear */ 0x00, /* 0 */ - /* GXand */ 0xa0, /* src AND dst */ - /* GXandReverse */ 0x50, /* src AND NOT dst */ - /* GXcopy */ 0xf0, /* src */ - /* GXandInverted*/ 0x0a, /* NOT src AND dst */ - /* GXnoop */ 0xaa, /* dst */ - /* GXxor */ 0x5a, /* src XOR dst */ - /* GXor */ 0xfa, /* src OR dst */ - /* GXnor */ 0x05, /* NOT src AND NOT dst */ - /* GXequiv */ 0xa5, /* NOT src XOR dst */ - /* GXinvert */ 0x55, /* NOT dst */ - /* GXorReverse */ 0xf5, /* src OR NOT dst */ - /* GXcopyInverted*/ 0x0f, /* NOT src */ - /* GXorInverted */ 0xaf, /* NOT src OR dst */ - /* GXnand */ 0x5f, /* NOT src OR NOT dst */ - /* GXset */ 0xff, /* 1 */ -}; - -/* Definitions for the Chips and Technology BitBLT engine communication. */ -/* These are done using Memory Mapped IO, of the registers */ -/* BitBLT modes for register 93D0. */ - -#ifdef HIQV -#define ctPATCOPY 0xF0 -#define ctLEFT2RIGHT 0x000 -#define ctRIGHT2LEFT 0x100 -#define ctTOP2BOTTOM 0x000 -#define ctBOTTOM2TOP 0x200 -#define ctSRCSYSTEM 0x400 -#define ctDSTSYSTEM 0x800 -#define ctSRCMONO 0x1000 -#define ctBGTRANSPARENT 0x22000 -#define ctCOLORTRANSENABLE 0x4000 -#define ctCOLORTRANSDISABLE 0x0 -#define ctCOLORTRANSDST 0x8000 -#define ctCOLORTRANSROP 0x0 -#define ctCOLORTRANSEQUAL 0x10000L -#define ctCOLORTRANSNEQUAL 0x0 -#define ctPATMONO 0x40000L -#define ctPATSOLID 0x80000L -#define ctPATSTART0 0x000000L -#define ctPATSTART1 0x100000L -#define ctPATSTART2 0x200000L -#define ctPATSTART3 0x300000L -#define ctPATSTART4 0x400000L -#define ctPATSTART5 0x500000L -#define ctPATSTART6 0x600000L -#define ctPATSTART7 0x700000L -#define ctSRCFG 0x000000L /* Where is this for the 65550?? */ -#else -#define ctPATCOPY 0xF0 -#define ctTOP2BOTTOM 0x100 -#define ctBOTTOM2TOP 0x000 -#define ctLEFT2RIGHT 0x200 -#define ctRIGHT2LEFT 0x000 -#define ctSRCFG 0x400 -#define ctSRCMONO 0x800 -#define ctPATMONO 0x1000 -#define ctBGTRANSPARENT 0x2000 -#define ctSRCSYSTEM 0x4000 -#define ctPATSOLID 0x80000L -#define ctPATSTART0 0x00000L -#define ctPATSTART1 0x10000L -#define ctPATSTART2 0x20000L -#define ctPATSTART3 0x30000L -#define ctPATSTART4 0x40000L -#define ctPATSTART5 0x50000L -#define ctPATSTART6 0x60000L -#define ctPATSTART7 0x70000L -#endif - -#define chipsFillPix(bpp,pixel) {\ - if (bpp == 8) \ - { \ - pixel = pixel & 0xff; \ - } \ - else if (bpp == 16) \ - { \ - pixel = pixel & 0xffff; \ - } \ -} - -static VOL8 *mmio; -static CARD32 byteStride; -static CARD32 bytesPerPixel; -static CARD32 pixelStride; - -static void -chipsSet (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - chipsScreenInfo(pScreenPriv); - - mmio = chipss->mmio_base; - byteStride = pScreenPriv->screen->fb[0].byteStride; - bytesPerPixel = pScreenPriv->screen->fb[0].bitsPerPixel >> 3; - pixelStride = pScreenPriv->screen->fb[0].pixelStride; -} - -#ifdef HIQV -#define CHIPS_BR0 0x00 /* offset */ -#define CHIPS_BR1 0x04 /* bg */ -#define CHIPS_BR2 0x08 /* fg */ -#define CHIPS_BR3 0x0c /* monochrome */ -#define CHIPS_BR4 0x10 /* bitblt */ -#define CHIPS_BR5 0x14 /* pattern addr */ -#define CHIPS_BR6 0x18 /* source addr */ -#define CHIPS_BR7 0x1c /* dst addr */ -#define CHIPS_BR8 0x20 /* dst w/h */ -#else -#define CHIPS_DR0 0x83d0 -#define CHIPS_DR1 0x87d0 -#define CHIPS_DR2 0x8bd0 -#define CHIPS_DR3 0x8fd0 -#define CHIPS_DR4 0x93d0 -#define CHIPS_DR5 0x97d0 -#define CHIPS_DR6 0x9bd0 -#define CHIPS_DR7 0x9fd0 -#endif - -#define DBG(x) - -static void -chipsPitch (int src, int dst) -{ - CARD32 p; - - p = ((dst & 0xffff) << 16) | (src & 0xffff); - DBG(ErrorF ("\tpitch 0x%x\n", p)); -#ifdef HIQV - *(VOL32 *) (mmio + CHIPS_BR0) = p; -#else - *(VOL32 *) (mmio + CHIPS_DR0) = p; -#endif -} - -static void -chipsBg (Pixel bg) -{ - DBG(ErrorF ("\tbg 0x%x\n", bg)); -#ifdef HIQV - *(VOL32 *) (mmio + CHIPS_BR1) = bg & 0xffff; -#else - *(VOL32 *) (mmio + CHIPS_DR2) = bg; -#endif -} - -static void -chipsFg (Pixel fg) -{ - DBG(ErrorF ("\tfg 0x%x\n", fg)); -#ifdef HIQV - *(VOL32 *) (mmio + CHIPS_BR2) = fg; -#else - *(VOL32 *) (mmio + CHIPS_DR3) = fg; -#endif -} - -static void -chipsOp (CARD32 op) -{ - DBG(ErrorF ("\top 0x%x\n", op)); -#ifdef HIQV - *(VOL32 *) (mmio + CHIPS_BR4) = op; -#else - *(VOL32 *) (mmio + CHIPS_DR4) = op; -#endif -} - -static void -chipsRopSolid (int rop) -{ - CARD32 op; - - op = chipsSolidRop[rop] | ctTOP2BOTTOM | ctLEFT2RIGHT | ctPATSOLID | ctPATMONO; - chipsOp (op); -} - -static void -chipsSrc (int addr) -{ - DBG(ErrorF ("\tsrc 0x%x\n", addr)); -#ifdef HIQV - *(VOL32 *) (mmio + CHIPS_BR6) = addr; -#else - *(VOL32 *) (mmio + CHIPS_DR5) = addr; -#endif -} - -static void -chipsDst (int addr) -{ - DBG(ErrorF ("\tdst 0x%x\n", addr)); -#ifdef HIQV - *(VOL32 *) (mmio + CHIPS_BR7) = addr; -#else - *(VOL32 *) (mmio + CHIPS_DR6) = addr; -#endif -} - -static void -chipsWidthHeightGo (int w, int h) -{ - DBG(ErrorF ("\twidth height %d/%d\n", w, h)); -#ifdef HIQV - *(VOL32 *) (mmio + CHIPS_BR8) = ((h & 0xffff) << 16) | (w & 0xffff); -#else - *(VOL32 *) (mmio + CHIPS_DR7) = ((h & 0xffff) << 16) | (w & 0xffff); -#endif -} - -static void -chipsWaitIdle (void) -{ -#ifdef HIQV - int timeout = 0; - CARD8 tmp; - VOL32 *br4 = (VOL32 *) (mmio + CHIPS_BR4); - - DBG(ErrorF ("\tBR4 0x%x 0x%x\n", mmio + CHIPS_BR4, *br4)); - DBG(ErrorF ("\tXR20 0x%x\n", chipsReadXR (0, 0x20))); - for (;;) - { - if ((*br4 & 0x80000000) == 0) - break; - tmp = chipsReadXR (0, 0x20); - if ((tmp & 1) == 0) - break; - if (++timeout > 1000000) - { - ErrorF ("timeout\n"); - tmp = chipsReadXR (0, 0x20); - chipsWriteXR (0, 0x20, tmp | 2); - sleep (1); - chipsWriteXR (0, 0x20, tmp); - sleep (1); - } - } -#else - while (*(VOL32 *) (mmio + CHIPS_DR4) & 0x00100000) - ; -#endif -} - -static void -chipsWaitMarker (ScreenPtr pScreen, int marker) -{ - chipsSet (pScreen); - chipsWaitIdle (); -} - -static Bool -chipsPrepareSolid (PixmapPtr pPixmap, - int alu, - Pixel pm, - Pixel fg) -{ - FbBits depthMask; - - DBG(ErrorF ("PrepareSolid %d 0x%x\n", alu, fg)); - depthMask = FbFullMask(pPixmap->drawable.depth); - if ((pm & depthMask) != depthMask) - return FALSE; - else - { - chipsSet (pPixmap->drawable.pScreen); - chipsWaitIdle (); - chipsFillPix(pPixmap->drawable.bitsPerPixel,fg); - chipsFg (fg); - chipsBg (fg); - chipsRopSolid (alu); - chipsPitch (byteStride, byteStride); - return TRUE; - } -} - -static void -chipsSolid (int x1, int y1, int x2, int y2) -{ - CARD32 dst; - int w, h; - - DBG(ErrorF (" Solid %dx%d %dx%d\n", x1, y1, x2, y2)); - dst = y1 * byteStride + x1 * bytesPerPixel; - w = (x2 - x1) * bytesPerPixel; - h = (y2 - y1); - chipsWaitIdle (); - chipsDst (dst); - chipsWidthHeightGo (w, h); -} - -static void -chipsDoneSolid (void) -{ -} - -static CARD32 copyOp; - -static Bool -chipsPrepareCopy (PixmapPtr pSrcPixmap, - PixmapPtr pDstPixmap, - int dx, - int dy, - int alu, - Pixel pm) -{ - FbBits depthMask; - - DBG(ErrorF ("PrepareSolid %d 0x%x\n", alu, fg)); - depthMask = FbFullMask(pDstPixmap->drawable.depth); - if ((pm & depthMask) != depthMask) - return FALSE; - else - { - copyOp = chipsBltRop[alu]; - if (dy >= 0) - copyOp |= ctTOP2BOTTOM; - else - copyOp |= ctBOTTOM2TOP; - if (dx >= 0) - copyOp |= ctLEFT2RIGHT; - else - copyOp |= ctRIGHT2LEFT; - chipsSet (pDstPixmap->drawable.pScreen); - chipsWaitIdle (); - chipsOp (copyOp); - chipsPitch (byteStride, byteStride); - return TRUE; - } -} - -static void -chipsCopy (int srcX, - int srcY, - int dstX, - int dstY, - int w, - int h) -{ - int src, dst; - if ((copyOp & (ctTOP2BOTTOM|ctBOTTOM2TOP)) == ctBOTTOM2TOP) - { - src = (srcY + h - 1) * byteStride; - dst = (dstY + h - 1) * byteStride; - } - else - { - src = srcY * byteStride; - dst = dstY * byteStride; - } - if ((copyOp & (ctLEFT2RIGHT|ctRIGHT2LEFT)) == ctRIGHT2LEFT) - { - src = src + (srcX + w) * bytesPerPixel - 1; - dst = dst + (dstX + w) * bytesPerPixel - 1; - } - else - { - src = src + srcX * bytesPerPixel; - dst = dst + dstX * bytesPerPixel; - } - chipsWaitIdle (); - chipsSrc (src); - chipsDst (dst); - chipsWidthHeightGo (w * bytesPerPixel, h); -} - -static void -chipsDoneCopy (void) -{ -} - -Bool -chipsDrawInit (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - chipsScreenInfo(pScreenPriv); - - switch (pScreenPriv->screen->fb[0].bitsPerPixel) { - case 8: - case 16: - break; - default: - return FALSE; - } - - memset(&chipss->kaa, 0, sizeof(KaaScreenInfoRec)); - chipss->kaa.waitMarker = chipsWaitMarker; - chipss->kaa.PrepareSolid = chipsPrepareSolid; - chipss->kaa.Solid = chipsSolid; - chipss->kaa.DoneSolid = chipsDoneSolid; - chipss->kaa.PrepareCopy = chipsPrepareCopy; - chipss->kaa.Copy = chipsCopy; - chipss->kaa.DoneCopy = chipsDoneCopy; - - if (!kaaDrawInit (pScreen, &chipss->kaa)) - return FALSE; - - return TRUE; -} - -void -chipsDrawEnable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - chipsScreenInfo(pScreenPriv); - CARD8 mode = 0x00; - - switch (pScreenPriv->screen->fb[0].bitsPerPixel) { - case 8: - mode = 0x00; - break; - case 16: - mode = 0x10; - break; - } - chipsSet (pScreen); - chipsWaitIdle (); - chipsWriteXR (chipss, 0x20, mode); - - kaaMarkSync (pScreen); -} - -void -chipsDrawDisable (ScreenPtr pScreen) -{ -} - -void -chipsDrawFini (ScreenPtr pScreen) -{ -} - diff --git a/hw/kdrive/chips/chipsstub.c b/hw/kdrive/chips/chipsstub.c deleted file mode 100644 index 9024a7d44..000000000 --- a/hw/kdrive/chips/chipsstub.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "chips.h" - -extern int chips_clk, chips_mclk; - -void -InitCard (char *name) -{ - KdCardAttr attr; - - KdCardInfoAdd (&chipsFuncs, &attr, 0); -} - -void -InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) -{ - KdInitOutput (pScreenInfo, argc, argv); -} - -void -InitInput (int argc, char **argv) -{ - KdOsAddInputDrivers (); - KdInitInput (); -} - -void -ddxUseMsg (void) -{ - KdUseMsg(); - vesaUseMsg(); -} - -int -ddxProcessArgument (int argc, char **argv, int i) -{ - int ret; - - if (!(ret = vesaProcessArgument (argc, argv, i))) - ret = KdProcessArgument(argc, argv, i); - return ret; -} diff --git a/hw/kdrive/epson/Makefile.am b/hw/kdrive/epson/Makefile.am deleted file mode 100644 index 14bb04996..000000000 --- a/hw/kdrive/epson/Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -INCLUDES = \ - @KDRIVE_INCS@ \ - @KDRIVE_CFLAGS@ - -bin_PROGRAMS = Xepson - -noinst_LIBRARIES = libepson.a - -libepson_a_SOURCES = \ - epson13806.c \ - epson13806.h \ - epson13806draw.c\ - epson13806draw.h\ - epson13806reg.h - -Xepson_SOURCES = \ - epson13806stub.c - -EPSON_LIBS = \ - libepson.a \ - @KDRIVE_LIBS@ - -if GLX -Xepson_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -endif - -Xepson_LDADD = \ - $(EPSON_LIBS) \ - @KDRIVE_LIBS@ - -Xepson_DEPENDENCIES = \ - libepson.a \ - @KDRIVE_LOCAL_LIBS@ - -relink: - rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS) diff --git a/hw/kdrive/epson/Xepson.man b/hw/kdrive/epson/Xepson.man deleted file mode 100644 index 96aab813e..000000000 --- a/hw/kdrive/epson/Xepson.man +++ /dev/null @@ -1,26 +0,0 @@ -.\" $XFree86: xc/programs/Xserver/hw/kdrive/epson/Xepson.man,v 1.5 2001/02/13 21:15:15 dawes Exp $ -.\" -.TH Xepson 1 __vendorversion__ -.SH NAME -Xepson \- Epson 13806 accelerated framebuffer device tiny X server -.SH SYNOPSIS -.B Xepson -.RI [ :display ] -.RI [ option ...] -.SH DESCRIPTION -.B Xepson -is a driver for the Epson LCD 13806 framebuffer. -.B Xepson -is heavily based upon the Kdrive Xfbdev driver, and behaves very similarly, except for accelerated operations targetted at the Epson chip. -.SH OPTIONS -.B Xepson -accepts the common options of the Xkdrive family of servers. Please -see Xkdrive(1). -.SH KEYBOARD -To be written. -.SH SEE ALSO -X(__miscmansuffix__), Xserver(1), Xkdrive(1), xdm(1), xinit(1). -.SH AUTHORS -The -.B Xepson -server was written by Costas Stylianou based on the Xfbdev sources with some contributions from Phil Blundell & Peter Naulls. diff --git a/hw/kdrive/epson/epson13806.c b/hw/kdrive/epson/epson13806.c deleted file mode 100644 index 6cf8c9ad9..000000000 --- a/hw/kdrive/epson/epson13806.c +++ /dev/null @@ -1,604 +0,0 @@ -/* - * Copyright 2004 by Costas Stylianou +44(0)7850 394095 - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Costas Sylianou not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Costas Stylianou makes no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * COSTAS STYLIANOU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL COSTAS STYLIANOU BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -/* - * epson13806.c - Implementation of hardware accelerated functions for - * Epson S1D13806 graphics controller. - * - * History: - * 28-Jan-04 C.Stylianou PRJ NBL: Created from fbdev.c. - * 30-Mar-04 Phil Blundell/Peter Naulls Integration with XFree 4.3 - * - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "epson13806.h" -#include "epson13806reg.h" - -extern int KdTsPhyScreen; - -Bool -epsonInitialize (KdCardInfo *card, EpsonPriv *priv) -{ - int k; - unsigned long off; - if ((priv->fd = open("/dev/fb0", O_RDWR)) < 0) { - perror("Error opening /dev/fb0\n"); - return FALSE; - } - - if ((k=ioctl(priv->fd, FBIOGET_FSCREENINFO, &priv->fix)) < 0) { - perror("Error with /dev/fb ioctl FIOGET_FSCREENINFO"); - close (priv->fd); - return FALSE; - } - - if ((k=ioctl(priv->fd, FBIOGET_VSCREENINFO, &priv->var)) < 0) { - perror("Error with /dev/fb ioctl FIOGET_VSCREENINFO"); - close (priv->fd); - return FALSE; - } - - priv->fb_base = KdMapDevice (EPSON13806_PHYSICAL_VMEM_ADDR, EPSON13806_VMEM_SIZE); - - - if (priv->fb_base == (char *)-1) { - perror("ERROR: mmap framebuffer fails!"); - close (priv->fd); - return FALSE; - } - - off = (unsigned long) priv->fix.smem_start % (unsigned long) getpagesize(); - priv->fb = priv->fb_base + off; - return TRUE; -} - -Bool -epsonCardInit (KdCardInfo *card) -{ - EpsonPriv *priv; - - priv = (EpsonPriv *) xalloc (sizeof (EpsonPriv)); - if (!priv) - return FALSE; - - if (!epsonInitialize (card, priv)) - { - xfree (priv); - return FALSE; - } - card->driver = priv; - - // Call InitEpson to map onto Epson registers - initEpson13806(); - - return TRUE; -} - -#define FBDEV_KLUDGE_FORMAT -#ifdef FBDEV_KLUDGE_FORMAT -static Pixel -epsonMakeContig (Pixel orig, Pixel others) -{ - Pixel low; - - low = lowbit (orig) >> 1; - while (low && (others & low) == 0) - { - orig |= low; - low >>= 1; - } - return orig; -} -#endif - -Bool -epsonScreenInitialize (KdScreenInfo *screen, EpsonScrPriv *scrpriv) -{ - EpsonPriv *priv = screen->card->driver; - Pixel allbits; - int depth; - Bool gray; - depth = priv->var.bits_per_pixel; - gray = priv->var.grayscale; - - - screen->fb[0].visuals = (1 << TrueColor); -#define Mask(o,l) (((1 << l) - 1) << o) - screen->fb[0].redMask = Mask (priv->var.red.offset, priv->var.red.length); - screen->fb[0].greenMask = Mask (priv->var.green.offset, priv->var.green.length); - screen->fb[0].blueMask = Mask (priv->var.blue.offset, priv->var.blue.length); -#ifdef FBDEV_KLUDGE_FORMAT - /* - * This is a kludge so that Render will work -- fill in the gaps - * in the pixel - */ - screen->fb[0].redMask = epsonMakeContig (screen->fb[0].redMask, - screen->fb[0].greenMask| - screen->fb[0].blueMask); - - screen->fb[0].greenMask = epsonMakeContig (screen->fb[0].greenMask, - screen->fb[0].redMask| - screen->fb[0].blueMask); - - screen->fb[0].blueMask = epsonMakeContig (screen->fb[0].blueMask, - screen->fb[0].redMask| - screen->fb[0].greenMask); - -#endif - allbits = screen->fb[0].redMask | screen->fb[0].greenMask | screen->fb[0].blueMask; - depth = 32; - while (depth && !(allbits & (1 << (depth - 1)))) - depth--; - - screen->rate = 60; - scrpriv->randr = screen->randr; - - { - screen->fb[0].depth = depth; - screen->fb[0].bitsPerPixel = priv->var.bits_per_pixel; - screen->width = priv->var.xres; - screen->height = priv->var.yres; - screen->fb[0].byteStride = priv->fix.line_length; - screen->fb[0].pixelStride = (priv->fix.line_length * 8 / - priv->var.bits_per_pixel); - screen->fb[0].frameBuffer = (CARD8 *) (priv->fb); - screen->off_screen_base = screen->fb[0].byteStride * screen->height; - screen->memory_base = priv->fb; - screen->memory_size = EPSON13806_VMEM_SIZE; - } - return TRUE; -} - -Bool -epsonScreenInit (KdScreenInfo *screen) -{ - EpsonScrPriv *scrpriv; - - scrpriv = xalloc (sizeof (EpsonScrPriv)); - if (!scrpriv) - return FALSE; - memset (scrpriv, '\0', sizeof (EpsonScrPriv)); - screen->driver = scrpriv; - if (!epsonScreenInitialize (screen, scrpriv)) { - screen->driver = 0; - xfree (scrpriv); - return FALSE; - } - return TRUE; -} - -static void * -epsonWindowLinear (ScreenPtr pScreen, - CARD32 row, - CARD32 offset, - int mode, - CARD32 *size, - void *closure) -{ - KdScreenPriv(pScreen); - EpsonPriv *priv = pScreenPriv->card->driver; - - if (!pScreenPriv->enabled) - return 0; - *size = priv->fix.line_length; - return (CARD8 *) priv->fb + row * priv->fix.line_length + offset; -} - - -#ifdef RANDR -static Bool -epsonRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) -{ - KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - EpsonScrPriv *scrpriv = screen->driver; -#if 0 - RRVisualGroupPtr pVisualGroup; - RRGroupOfVisualGroupPtr pGroupOfVisualGroup; -#endif - RRScreenSizePtr pSize; - Rotation randr; - int n; - - *rotations = RR_Rotate_0|RR_Rotate_90|RR_Rotate_180|RR_Rotate_270; - - for (n = 0; n < pScreen->numDepths; n++) - if (pScreen->allowedDepths[n].numVids) - break; - if (n == pScreen->numDepths) - return FALSE; - -#if 0 - pVisualGroup = RRCreateVisualGroup (pScreen); - if (!pVisualGroup) - return FALSE; - - if (!RRAddDepthToVisualGroup (pScreen, pVisualGroup, &pScreen->allowedDepths[n])) { - RRDestroyVisualGroup (pScreen, pVisualGroup); - return FALSE; - } - - pVisualGroup = RRRegisterVisualGroup (pScreen, pVisualGroup); - if (!pVisualGroup) - return FALSE; - - pGroupOfVisualGroup = RRCreateGroupOfVisualGroup (pScreen); - - if (!RRAddVisualGroupToGroupOfVisualGroup (pScreen, - pGroupOfVisualGroup, - pVisualGroup)) - { - RRDestroyGroupOfVisualGroup (pScreen, pGroupOfVisualGroup); - /* pVisualGroup left until screen closed */ - return FALSE; - } - - pGroupOfVisualGroup = RRRegisterGroupOfVisualGroup (pScreen, pGroupOfVisualGroup); - if (!pGroupOfVisualGroup) - return FALSE; -#endif - - pSize = RRRegisterSize (pScreen, - screen->width, - screen->height, - screen->width_mm, - screen->height_mm); - - randr = KdSubRotation (scrpriv->randr, screen->randr); - - RRSetCurrentConfig (pScreen, randr, RR_Rotate_0, pSize); - - return TRUE; -} - -static Bool -epsonRandRSetConfig (ScreenPtr pScreen, - Rotation randr, - int rate, - RRScreenSizePtr pSize) -{ - KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - EpsonScrPriv *scrpriv = screen->driver; - Bool wasEnabled = pScreenPriv->enabled; - - randr = KdAddRotation (randr, screen->randr); - - if (scrpriv->randr != randr) - { - if (wasEnabled) - KdDisableScreen (pScreen); - - scrpriv->randr = randr; - - if (wasEnabled) - KdEnableScreen (pScreen); - } - return TRUE; -} - -static Bool -epsonRandRInit (ScreenPtr pScreen) -{ - rrScrPrivPtr pScrPriv; - - if (!RRScreenInit (pScreen)) - return FALSE; - - pScrPriv = rrGetScrPriv(pScreen); - pScrPriv->rrGetInfo = epsonRandRGetInfo; - pScrPriv->rrSetConfig = epsonRandRSetConfig; - return TRUE; -} -#endif - -static Bool -epsonCreateColormap (ColormapPtr pmap) -{ - ScreenPtr pScreen = pmap->pScreen; - KdScreenPriv(pScreen); - EpsonPriv *priv = pScreenPriv->card->driver; - VisualPtr pVisual; - int i; - int nent; - xColorItem *pdefs; - - switch (priv->fix.visual) { - case FB_VISUAL_STATIC_PSEUDOCOLOR: - pVisual = pmap->pVisual; - nent = pVisual->ColormapEntries; - pdefs = xalloc (nent * sizeof (xColorItem)); - if (!pdefs) - return FALSE; - for (i = 0; i < nent; i++) - pdefs[i].pixel = i; - epsonGetColors (pScreen, 0, nent, pdefs); - for (i = 0; i < nent; i++) - { - pmap->red[i].co.local.red = pdefs[i].red; - pmap->red[i].co.local.green = pdefs[i].green; - pmap->red[i].co.local.blue = pdefs[i].blue; - } - xfree (pdefs); - return TRUE; - - default: - return fbInitializeColormap (pmap); - } -} - -Bool -epsonInitScreen (ScreenPtr pScreen) -{ -#ifdef TOUCHSCREEN - KdTsPhyScreen = pScreen->myNum; -#endif - - pScreen->CreateColormap = epsonCreateColormap; - - return TRUE; -} - -static Bool -epsonFinishInitScreen (ScreenPtr pScreen) -{ - if (!shadowSetup (pScreen)) - return FALSE; - -#ifdef RANDR - if (!epsonRandRInit (pScreen)) - return FALSE; -#endif - - return TRUE; -} - -static Bool -epsonSetShadow (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - EpsonScrPriv *scrpriv = screen->driver; - ShadowUpdateProc update; - ShadowWindowProc window; - - window = epsonWindowLinear; - update = shadowUpdatePacked; - - return KdShadowSet (pScreen, scrpriv->randr, update, window); -} - -static Bool -epsonCreateResources (ScreenPtr pScreen) -{ - return epsonSetShadow (pScreen); -} - -void -epsonPreserve (KdCardInfo *card) -{ -} - -Bool -epsonEnable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - EpsonPriv *priv = pScreenPriv->card->driver; - int k; - - priv->var.activate = FB_ACTIVATE_NOW|FB_CHANGE_CMAP_VBL; - - /* display it on the LCD */ - k = ioctl (priv->fd, FBIOPUT_VSCREENINFO, &priv->var); - if (k < 0) { - perror ("FBIOPUT_VSCREENINFO"); - return FALSE; - } - - k = ioctl (priv->fd, FBIOGET_FSCREENINFO, &priv->fix); - if (k < 0) { - perror ("FBIOGET_FSCREENINFO"); - return FALSE; - } - - if (priv->fix.visual == FB_VISUAL_DIRECTCOLOR) { - struct fb_cmap cmap; - int i; - - for (i = 0; - i < (1 << priv->var.red.length) || - i < (1 << priv->var.green.length) || - i < (1 << priv->var.blue.length); i++) { - priv->red[i] = i * 65535 / ((1 << priv->var.red.length) - 1); - priv->green[i] = i * 65535 / ((1 << priv->var.green.length) - 1); - priv->blue[i] = i * 65535 / ((1 << priv->var.blue.length) - 1); - } - cmap.start = 0; - cmap.len = i; - cmap.red = &priv->red[0]; - cmap.green = &priv->green[0]; - cmap.blue = &priv->blue[0]; - cmap.transp = 0; - ioctl (priv->fd, FBIOPUTCMAP, &cmap); - } - return TRUE; -} - -Bool -epsonDPMS (ScreenPtr pScreen, int mode) -{ - KdScreenPriv(pScreen); - EpsonPriv *priv = pScreenPriv->card->driver; - static int oldmode = -1; - - if (mode == oldmode) - return TRUE; -#ifdef FBIOPUT_POWERMODE - if (ioctl (priv->fd, FBIOPUT_POWERMODE, &mode) >= 0) { - oldmode = mode; - return TRUE; - } -#endif -#ifdef FBIOBLANK - if (ioctl (priv->fd, FBIOBLANK, mode ? mode + 1 : 0) >= 0) { - oldmode = mode; - return TRUE; - } -#endif - return FALSE; -} - -void -epsonDisable (ScreenPtr pScreen) -{ -} - -void -epsonRestore (KdCardInfo *card) -{ -} - -void -epsonScreenFini (KdScreenInfo *screen) -{ -} - -void -epsonCardFini (KdCardInfo *card) -{ - EpsonPriv *priv = card->driver; - - munmap (priv->fb_base, priv->fix.smem_len); - close (priv->fd); - xfree (priv); -} - -void -epsonGetColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs) -{ - KdScreenPriv(pScreen); - EpsonPriv *priv = pScreenPriv->card->driver; - struct fb_cmap cmap; - int p; - int k; - int min, max; - - min = 256; - max = 0; - for (k = 0; k < n; k++) { - if (pdefs[k].pixel < min) - min = pdefs[k].pixel; - if (pdefs[k].pixel > max) - max = pdefs[k].pixel; - } - cmap.start = min; - cmap.len = max - min + 1; - cmap.red = &priv->red[min]; - cmap.green = &priv->green[min];; - cmap.blue = &priv->blue[min]; - cmap.transp = 0; - k = ioctl (priv->fd, FBIOGETCMAP, &cmap); - if (k < 0) { - perror ("can't get colormap"); - return; - } - while (n--) { - p = pdefs->pixel; - pdefs->red = priv->red[p]; - pdefs->green = priv->green[p]; - pdefs->blue = priv->blue[p]; - pdefs++; - } -} - -void -epsonPutColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs) -{ - KdScreenPriv(pScreen); - EpsonPriv *priv = pScreenPriv->card->driver; - struct fb_cmap cmap; - int p; - int min, max; - - min = 256; - max = 0; - while (n--) { - p = pdefs->pixel; - priv->red[p] = pdefs->red; - priv->green[p] = pdefs->green; - priv->blue[p] = pdefs->blue; - if (p < min) - min = p; - if (p > max) - max = p; - pdefs++; - } - cmap.start = min; - cmap.len = max - min + 1; - cmap.red = &priv->red[min]; - cmap.green = &priv->green[min]; - cmap.blue = &priv->blue[min]; - cmap.transp = 0; - ioctl (priv->fd, FBIOPUTCMAP, &cmap); -} - - - -KdCardFuncs epsonFuncs = { - epsonCardInit, /* cardinit */ - epsonScreenInit, /* scrinit */ - epsonInitScreen, /* initScreen */ - epsonFinishInitScreen, - epsonCreateResources, - epsonPreserve, /* preserve */ - epsonEnable, /* enable */ - epsonDPMS, /* dpms */ - epsonDisable, /* disable */ - epsonRestore, /* restore */ - epsonScreenFini, /* scrfini */ - epsonCardFini, /* cardfini */ - - 0, /* initCursor */ - 0, /* enableCursor */ - 0, /* disableCursor */ - 0, /* finiCursor */ - 0, /* recolorCursor */ - - /* - * History: - * 28-Jan-04 C.Stylianou NBL: Added the following for h/w accel. - * - */ - - epsonDrawInit, /* initAccel */ - epsonDrawEnable, /* enableAccel */ - epsonDrawDisable, /* disableAccel */ - epsonDrawFini, /* finiAccel */ - - epsonGetColors, /* getColors */ - epsonPutColors, /* putColors */ -}; diff --git a/hw/kdrive/epson/epson13806.h b/hw/kdrive/epson/epson13806.h deleted file mode 100644 index b28d7c085..000000000 --- a/hw/kdrive/epson/epson13806.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright 2004 by Costas Stylianou +44(0)7850 394095 - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Costas Sylianou not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Costas Stylianou makes no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * COSTAS STYLIANOU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL COSTAS STYLIANOU BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -/* - * epson13806draw.h - Implementation of hard ware accelerated functions for epson S1D13806 - * Graphic controller. - * - * History: - * 28-Jan-04 C.Stylianou PRJ NBL: Created from fbdev.h - * - */ - -#ifndef _EPSON13806_H_ -#define _EPSON13806_H_ - -#include -#include -#include -#include - -#include "kdrive.h" - -#ifdef RANDR -#include "randrstr.h" -#endif - -typedef struct _epsonPriv { - struct fb_var_screeninfo var; - struct fb_fix_screeninfo fix; - __u16 red[256]; - __u16 green[256]; - __u16 blue[256]; - int fd; - char *fb; - char *fb_base; -} EpsonPriv; - -typedef struct _epsonScrPriv { - Rotation randr; - Bool shadow; - KaaScreenInfoRec kaa; -} EpsonScrPriv; - -extern KdCardFuncs epsonFuncs; - -Bool -epsonInitialize (KdCardInfo *card, EpsonPriv *priv); - -Bool -epsonCardInit (KdCardInfo *card); - -Bool -epsonScreenInit (KdScreenInfo *screen); - -Bool -epsonScreenInitialize (KdScreenInfo *screen, EpsonScrPriv *scrpriv); - -Bool -epsonInitScreen (ScreenPtr pScreen); - -void -epsonPreserve (KdCardInfo *card); - -Bool -epsonEnable (ScreenPtr pScreen); - -Bool -epsonDPMS (ScreenPtr pScreen, int mode); - -void -epsonDisable (ScreenPtr pScreen); - -void -epsonRestore (KdCardInfo *card); - -void -epsonScreenFini (KdScreenInfo *screen); - -void -epsonCardFini (KdCardInfo *card); - -void -epsonGetColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs); - -void -epsonPutColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs); - -/* - * History: - * 28-Jan-04 C.Stylianou NBL: Added the following prototypes for h/w accel. - * - */ -Bool -epsonDrawInit (ScreenPtr pScreen); - -void -epsonDrawEnable (ScreenPtr pScreen); - -void -epsonDrawDisable (ScreenPtr pScreen); - -void -epsonDrawFini (ScreenPtr pScreen); - -/* - * History: - * 28-Jan-04 C.Stylianou NBL: Maps to Epson registers - * - */ -void -initEpson13806(void); - - -#endif /* __EPSON13806_H_ */ diff --git a/hw/kdrive/epson/epson13806draw.c b/hw/kdrive/epson/epson13806draw.c deleted file mode 100644 index 3222353a3..000000000 --- a/hw/kdrive/epson/epson13806draw.c +++ /dev/null @@ -1,649 +0,0 @@ -/* - * Copyright 2004 by Costas Stylianou +44(0)7850 394095 - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Costas Sylianou not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Costas Stylianou makes no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * COSTAS STYLIANOU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL COSTAS STYLIANOU BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -/* - * epson13806draw.c - Implementation of hardware accelerated functions for epson S1D13806 - * Graphic controller. - * - * History: - * 28-Jan-04 C.Stylianou PRJ NBL: Created from chipsdraw.c - * - */ - -#include "epson13806.h" -#include "epson13806draw.h" -#include "epson13806reg.h" - -#include "kaa.h" - -#include "gcstruct.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "regionstr.h" -#include "mistruct.h" -#include "dixfontstr.h" -#include "fb.h" -#include "migc.h" -#include "miline.h" - - -// Functionality of BitBLT ROP register for Epson S1D13806 Graphics controller -CARD8 epson13806Rop[16] = { - /* GXclear */ 0x00, /* 0 */ - /* GXand */ 0x08, /* src AND dst */ - /* GXandReverse */ 0x04, /* src AND NOT dst */ - /* GXcopy */ 0x0C, /* src */ - /* GXandInverted*/ 0x02, /* NOT src AND dst */ - /* GXnoop */ 0x0A, /* dst */ - /* GXxor */ 0x06, /* src XOR dst */ - /* GXor */ 0x0E, /* src OR dst */ - /* GXnor */ 0x01, /* NOT src AND NOT dst */ - /* GXequiv */ 0x09, /* NOT src XOR dst */ - /* GXinvert */ 0x05, /* NOT dst */ - /* GXorReverse */ 0x0D, /* src OR NOT dst */ - /* GXcopyInverted*/ 0x03, /* NOT src */ - /* GXorInverted */ 0x0B, /* NOT src OR dst */ - /* GXnand */ 0x07, /* NOT src OR NOT dst */ - /* GXset */ 0x0F, /* 1 */ -}; - - - -#undef __DEBUG_EPSON__ -#undef __DEBUG_EPSON_FBSET__ -#undef __DEBUG_EPSON_SOLID__ -#undef __DEBUG_EPSON_COPY__ - - -#ifdef __DEBUG_EPSON__ - #define EPSON_DEBUG(a) a -#else - #define EPSON_DEBUG(a) -#endif - -#ifdef __DEBUG_EPSON_FBSET__ - #define EPSON_DEBUG_FBSET(a) a -#else - #define EPSON_DEBUG_FBSET(a) -#endif - -#ifdef __DEBUG_EPSON_SOLID__ - #define EPSON_DEBUG_SOLID(a) a -#else - #define EPSON_DEBUG_SOLID(a) -#endif - -#ifdef __DEBUG_EPSON_COPY__ - #define EPSON_DEBUG_COPY(a) a -#else - #define EPSON_DEBUG_COPY(a) -#endif - - -static unsigned int byteStride; // Distance between lines in the frame buffer (in bytes) -static unsigned int bytesPerPixel; -static unsigned int pixelStride; - -static unsigned char *regbase; - -/* - * epsonSet - * - * Description: Sets Epson variables - * - * History: - * 11-Feb-04 C.Stylianou NBL: Created. - * - */ - -static void -epsonSet (ScreenPtr pScreen) -{ - EPSON_DEBUG_FBSET (fprintf(stderr,"+epsonSet\n")); - - KdScreenPriv(pScreen); - - byteStride = pScreenPriv->screen->fb[0].byteStride; - bytesPerPixel = pScreenPriv->screen->fb[0].bitsPerPixel >> 3; - pixelStride = pScreenPriv->screen->fb[0].pixelStride; - - EPSON_DEBUG_FBSET (fprintf(stderr,"byteStride: [%x]\n", pScreenPriv->screen->fb[0].byteStride)); - EPSON_DEBUG_FBSET (fprintf(stderr,"bytesPerPixel: [%x]\n", pScreenPriv->screen->fb[0].bitsPerPixel >> 3)); - EPSON_DEBUG_FBSET (fprintf(stderr,"pixelStride: [%x]\n", pScreenPriv->screen->fb[0].pixelStride)); - - EPSON_DEBUG_FBSET (fprintf(stderr,"-epsonSet\n")); -} - - -/* - * epsonBg - * - * Description: Sets background colour - * - * History: - * 11-Feb-04 C.Stylianou NBL: Created. - * - */ - -static void -epsonBg (Pixel bg) -{ - EPSON13806_REG16(EPSON13806_BLTBGCOLOR) = bg; -} - - -/* - * epsonFg - * - * Description: Sets foreground colour - * - * History: - * 11-Feb-04 C.Stylianou NBL: Created. - * - */ - -static void -epsonFg (Pixel fg) -{ - EPSON13806_REG16(EPSON13806_BLTFGCOLOR) = fg; -} - - -/* - * epsonWaitForHwBltDone - * - * Description: Wait for previous blt to be done before programming any blt registers - * - * History: - * 11-Feb-04 C.Stylianou NBL: Created. - * - */ - -static void -epsonWaitForHwBltDone (void) -{ - while (EPSON13806_REG (EPSON13806_BLTCTRL0) & EPSON13806_BLTCTRL0_ACTIVE) {} -} - - -/* - * epsonDrawSync - * - * Description: Sync hardware acceleration - * - * History: - * 11-Feb-04 C.Stylianou NBL: Created. - * - */ - -static void -epsonWaitMarker (ScreenPtr pScreen, int marker) -{ - EPSON_DEBUG (fprintf(stderr,"+epsonDrawSync\n")); - - epsonWaitForHwBltDone (); - - EPSON_DEBUG (fprintf(stderr,"-epsonDrawSync\n")); -} - - -/* - * epsonPrepareSolid - * - * Description: Prepare Solid Fill i.e, can it be accelerated - * - * History: - * 11-Feb-04 C.Stylianou NBL: Created. - * - */ - -static Bool -epsonPrepareSolid (PixmapPtr pPixmap, - int alu, - Pixel pm, - Pixel fg) -{ - EPSON_DEBUG_SOLID (fprintf(stderr,"+epsonPrepareSolid\n")); - - FbBits depthMask; - - depthMask = FbFullMask(pPixmap->drawable.depth); - if ((pm & depthMask) != depthMask) - return FALSE; - - epsonSet (pPixmap->drawable.pScreen); - fg &= 0xffff; - epsonFg (fg); - epsonBg (fg); - - epsonWaitForHwBltDone (); - - EPSON_DEBUG_SOLID (fprintf(stderr,"Solid.alu [0x%x], [%d]\n", alu ,epson13806Rop[alu])); - EPSON13806_REG(EPSON13806_BLTROP) = epson13806Rop[alu]; - - if (epson13806Rop[alu] == GXnoop) - { - EPSON13806_REG(EPSON13806_BLTOPERATION) = EPSON13806_BLTOPERATION_PATFILLROP; - } - else - { - EPSON13806_REG(EPSON13806_BLTOPERATION) = EPSON13806_BLTOPERATION_SOLIDFILL; - } - - - EPSON_DEBUG_SOLID (fprintf(stderr,"-epsonPrepareSolid\n")); - return TRUE; - -} - - -/* - * epsonSolid - * - * Description: Executes Solid Fill - * - * History: - * 11-Feb-04 C.Stylianou NBL: Created. - * - */ - -static void -epsonSolid (int x1, int y1, int x2, int y2) -{ - - EPSON_DEBUG_SOLID (fprintf(stderr,"+epsonSolid\n")); - - CARD32 dst_addr; - int width, height; - - EPSON_DEBUG_SOLID (fprintf(stderr,"Solid X1 [%d] Y1 [%d] X2 [%d] Y2 [%d]\n", x1, y1, x2, y2)); - - dst_addr = y1 * byteStride + x1 * bytesPerPixel; - width = ((x2 - x1)-1); - height = ((y2 - y1)-1); - - // program dst address - EPSON13806_REG16(EPSON13806_BLTDSTSTART01) = dst_addr; - EPSON13806_REG(EPSON13806_BLTDSTSTART2) = dst_addr >> 16; - - // program width and height of blit - EPSON13806_REG16(EPSON13806_BLTWIDTH) = width; - EPSON13806_REG16(EPSON13806_BLTHEIGHT) = height; - - EPSON13806_REG(EPSON13806_BLTCTRL0) = EPSON13806_BLTCTRL0_ACTIVE; - - // Wait for operation to complete - while (EPSON13806_REG(EPSON13806_BLTCTRL0) & EPSON13806_BLTCTRL0_ACTIVE) {} - - EPSON_DEBUG_SOLID (fprintf(stderr,"-epsonSolid\n")); -} - - -/* - * epsonDoneSolid - * - * Description: Done Solid - * - * History: - * 11-Feb-04 C.Stylianou NBL: Created. - * - */ - -static void -epsonDoneSolid (void) -{ - EPSON_DEBUG_SOLID (fprintf(stderr,"+epsonDoneSolid\n")); - - // Read from BitBLT data offset 0 to shut it down - //(void)EPSON13806_REG(EPSON13806_BITBLTDATA); - - EPSON_DEBUG_SOLID (fprintf(stderr,"-epsonDoneSolid\n")); - -} - - -/* - * epsonPrepareCopy - * - * Description: Prepares BitBLT, i.e, can it be accelerated - * - * History: - * 11-Feb-04 C.Stylianou NBL: Created. - * - */ - -static Bool -epsonPrepareCopy (PixmapPtr pSrcPixmap, - PixmapPtr pDstPixmap, - int dx, - int dy, - int alu, - Pixel pm) -{ - EPSON_DEBUG_COPY (fprintf(stderr,"+epsonPrepareCopy dx [0x%x] dy [0x%x]\n", dx, dy)); - - FbBits depthMask; - - depthMask = FbFullMask(pDstPixmap->drawable.depth); - - if ((pm & depthMask) != depthMask) - return FALSE; - - epsonSet (pDstPixmap->drawable.pScreen); - epsonWaitForHwBltDone (); - EPSON13806_REG(EPSON13806_BLTROP) = epson13806Rop[alu]; - - EPSON_DEBUG_COPY (fprintf(stderr,"-epsonPrepareCopy\n")); - - return TRUE; -} - - -/* - * epsonCopy - * - * Description: Executes BitBLT - * - * History: - * 11-Feb-04 C.Stylianou NBL: Created. - * - */ - -static void -epsonCopy (int srcX, - int srcY, - int dstX, - int dstY, - int width, - int height) -{ - EPSON_DEBUG_COPY (fprintf(stderr,"+epsonCopy\n")); - int src_addr, dst_addr; - int neg_dir = FALSE; - - if (!width || !height) - return; - - src_addr = srcX * bytesPerPixel + srcY * byteStride; - dst_addr = dstX * bytesPerPixel + dstY * byteStride; - - /* - * See if regions overlap and dest region is beyond source region. - * If so, we need to do a move BLT in negative direction. Only applies - * if the BLT is not transparent. - */ - - if ((srcX + width > dstX) && (srcX < dstX + width) && - (srcY + height > dstY) && (srcY < dstY + height) && - (dst_addr > src_addr)) - { - neg_dir = TRUE; - - // negative direction : get the coords of lower right corner - src_addr += byteStride * (height-1) + bytesPerPixel * (width-1); - dst_addr += byteStride * (height-1) + bytesPerPixel * (width-1); - } - - // program BLIT memory offset - EPSON13806_REG16(EPSON13806_BLTSTRIDE) = byteStride/2; - - // program src and dst addresses - EPSON13806_REG16(EPSON13806_BLTSRCSTART01) = src_addr; - EPSON13806_REG(EPSON13806_BLTSRCSTART2) = src_addr >> 16; - EPSON13806_REG16(EPSON13806_BLTDSTSTART01) = dst_addr; - EPSON13806_REG(EPSON13806_BLTDSTSTART2) = dst_addr >> 16; - - // program width and height of blit - EPSON13806_REG16(EPSON13806_BLTWIDTH) = width-1; - EPSON13806_REG16(EPSON13806_BLTHEIGHT) = height-1; - - // select pos/neg move BLIT - EPSON13806_REG(EPSON13806_BLTOPERATION) = neg_dir ? - EPSON13806_BLTOPERATION_MOVENEGROP : EPSON13806_BLTOPERATION_MOVEPOSROP; - - EPSON13806_REG(EPSON13806_BLTCTRL0) = EPSON13806_BLTCTRL0_ACTIVE; - - // Wait for operation to complete - while (EPSON13806_REG(EPSON13806_BLTCTRL0) & EPSON13806_BLTCTRL0_ACTIVE) {} - - EPSON_DEBUG_COPY (fprintf(stderr,"-epsonCopy\n")); -} - - -/* - * epsonDoneCopy - * - * Description: Done Copy - * - * History: - * 11-Feb-04 C.Stylianou NBL: Created. - * - */ - -static void -epsonDoneCopy (void) -{ - EPSON_DEBUG_COPY (fprintf(stderr,"+epsonDoneCopy\n")); - - // Read from BitBLT data offset 0 to shut it down - //(void)EPSON13806_REG(EPSON13806_BITBLTDATA); - - EPSON_DEBUG_COPY (fprintf(stderr,"-epsonDoneCopy\n")); -} - - -/* - * epsonDrawInit - * - * Description: Configure the Epson S1D13806 for a 800x600 TFT colour display - * - * History: - * 11-Feb-04 C.Stylianou NBL: Created. - * - */ - -Bool -epsonDrawInit (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - EpsonScrPriv *epsons = screen->driver; - - EPSON_DEBUG (fprintf(stderr,"+epsonDrawInit\n")); - - epsonSet(pScreen); - -#if 0 - EPSON13806_REG(EPSON13806_MISC) = 0x00; - EPSON13806_REG(EPSON13806_DISPMODE) = 0x00; - EPSON13806_REG16(EPSON13806_GPIOCFG) = 0xffff; - EPSON13806_REG16(EPSON13806_GPIOCTRL) = 0x0001; - - EPSON13806_REG(EPSON13806_MEMCLKCFG) = 0x01; - EPSON13806_REG(EPSON13806_LCDPCLKCFG) = 0x00; - EPSON13806_REG(EPSON13806_CRTPCLKCFG) = 0x02; - EPSON13806_REG(EPSON13806_MPCLKCFG) = 0x02; - EPSON13806_REG(EPSON13806_CPUMEMWAITSEL) = 0x01; - EPSON13806_REG(EPSON13806_MEMCFG) = 0x80; - EPSON13806_REG(EPSON13806_DRAMREFRESH) = 0x03; - EPSON13806_REG16(EPSON13806_DRAMTIMINGCTRL) = 0x0100; - - // 5ms delay for internal LCD SDRAM to initialize - usleep(5000); - - EPSON13806_REG(EPSON13806_PANELTYPE) = 0x25; - EPSON13806_REG(EPSON13806_MODRATE) = 0x00; - EPSON13806_REG(EPSON13806_LCDHDP) = 0x63; - EPSON13806_REG(EPSON13806_LCDHNDP) = 0x1f; - EPSON13806_REG(EPSON13806_TFTFPLINESTART) = 0x01; - EPSON13806_REG(EPSON13806_TFTFPLINEPULSE) = 0x0b; - EPSON13806_REG16(EPSON13806_LCDVDP0) = 0x0257; - EPSON13806_REG(EPSON13806_LCDVNDP) = 0x1b; - EPSON13806_REG(EPSON13806_TFTFPFRAMESTART) = 0x0a; - EPSON13806_REG(EPSON13806_TFTFPFRAMEPULSE) = 0x01; - EPSON13806_REG(EPSON13806_LCDDISPMODE) = 0x85; - EPSON13806_REG(EPSON13806_LCDMISC) = 0x00; - EPSON13806_REG16(EPSON13806_LCDSTART01) = 0x0000; - EPSON13806_REG(EPSON13806_LCDSTART2) = 0x00; - EPSON13806_REG16(EPSON13806_LCDSTRIDE) = byteStride>>1; - EPSON13806_REG(EPSON13806_LCDPIXELPAN) = 0x00; - EPSON13806_REG(EPSON13806_LCDFIFOHIGH) = 0x00; - EPSON13806_REG(EPSON13806_LCDFIFOLOW) = 0x00; -#endif - - - EPSON13806_REG(EPSON13806_BLTCTRL0) = 0x00; - EPSON13806_REG(EPSON13806_BLTCTRL1) = 0x01; // We're using 16 bpp - EPSON13806_REG16(EPSON13806_BLTSTRIDE) = byteStride>>1; // program BLIT memory offset - -#if 0 - EPSON13806_REG(EPSON13806_LUTMODE) = 0x00; - EPSON13806_REG(EPSON13806_LUTADDR) = 0x00; - EPSON13806_REG(EPSON13806_PWRSAVECFG) = 0x10; - EPSON13806_REG(EPSON13806_PWRSAVESTATUS) = 0x00; - EPSON13806_REG(EPSON13806_CPUMEMWATCHDOG) = 0x00; - EPSON13806_REG(EPSON13806_DISPMODE) = 0x01; - - // Enable backlight voltage - EPSON13806_REG16(EPSON13806_GPIOCTRL) |= 1<<1; - // 10ms delay after turning on LCD. - usleep(10000); -#endif - - // Instruct the BitBLT unit to fill the screen with black, i.e clear fb. - static int addr = 0x00000000; - EPSON13806_REG16(EPSON13806_BLTDSTSTART01) = addr; - EPSON13806_REG(EPSON13806_BLTDSTSTART2) = addr >> 16; - EPSON13806_REG16(EPSON13806_BLTFGCOLOR) = 0x0000; - EPSON13806_REG(EPSON13806_BLTOPERATION) = EPSON13806_BLTOPERATION_SOLIDFILL; // solid fill blt - EPSON13806_REG16(EPSON13806_BLTWIDTH) = (0x0320-1); - EPSON13806_REG16(EPSON13806_BLTHEIGHT) = (0x0258-1); - EPSON13806_REG(EPSON13806_BLTCTRL0) = EPSON13806_BLTCTRL0_ACTIVE; - -#if 0 - // Enable LCD data - EPSON13806_REG(EPSON13806_LCDDISPMODE) &= ~(1<<7); - - // Turn on backlight full - EPSON13806_REG16(EPSON13806_GPIOCTRL) |= 0x00fc; -#endif - - memset(&epsons->kaa, 0, sizeof(KaaScreenInfoRec)); - epsons->kaa.waitMarker = epsonWaitMarker; - epsons->kaa.PrepareSolid = epsonPrepareSolid; - epsons->kaa.Solid = epsonSolid; - epsons->kaa.DoneSolid = epsonDoneSolid; - epsons->kaa.PrepareCopy = epsonPrepareCopy; - epsons->kaa.Copy = epsonCopy; - epsons->kaa.DoneCopy = epsonDoneCopy; - epsons->kaa.flags = KAA_OFFSCREEN_PIXMAPS; - - if (!kaaDrawInit (pScreen, &epsons->kaa)) - return FALSE; - - EPSON_DEBUG (fprintf(stderr,"-epsonDrawInit\n")); - return TRUE; -} - - -/* - * epsonDrawEnable - * - * Description: Enables hardware acceleration - * - * History: - * 11-Feb-04 C.Stylianou NBL: Created. - * - */ - -void -epsonDrawEnable (ScreenPtr pScreen) -{ - EPSON_DEBUG (fprintf(stderr,"+epsonDrawEnable\n")); - epsonWaitForHwBltDone (); - kaaMarkSync (pScreen); - EPSON_DEBUG (fprintf(stderr,"-epsonDrawEnable\n")); -} - - -/* - * epsonDrawDisable - * - * Description: Disables hardware acceleration - * - * History: - * 11-Feb-04 C.Stylianou NBL: Created. - * - */ - -void -epsonDrawDisable (ScreenPtr pScreen) -{ - EPSON_DEBUG (fprintf(stderr,"+epsonDrawDisable\n")); -} - - -/* - * epsonDrawFini - * - * Description: Finish hardware acceleration - * - * History: - * 11-Feb-04 C.Stylianou NBL: Created. - * - */ - -void -epsonDrawFini (ScreenPtr pScreen) -{ - EPSON_DEBUG (fprintf(stderr,"+epsonDrawFini\n")); -} - - -/* - * initEpson13806 - * - * Description: Maps Epson S1D13806 registers - * - * History: - * 11-Feb-04 C.Stylianou NBL: Created. - * - */ - -void -initEpson13806(void) -{ - EPSON_DEBUG (fprintf(stderr,"+initEpson\n")); - - // Map Epson S1D13806 registers - regbase = KdMapDevice (EPSON13806_PHYSICAL_REG_ADDR, EPSON13806_GPIO_REGSIZE); - if (!regbase) - perror("ERROR: regbase\n"); // Sets up register mappings in header files. - -#if 0 - CARD8 rev_code; - rev_code = EPSON13806_REG (EPSON13806_REVCODE); - if ((rev_code >> 2) != 0x07) - perror("ERROR: EPSON13806 Display Controller NOT FOUND!\n"); -#endif - - EPSON_DEBUG (fprintf(stderr,"-initEpson\n")); -} diff --git a/hw/kdrive/epson/epson13806draw.h b/hw/kdrive/epson/epson13806draw.h deleted file mode 100644 index b5f1bf5c2..000000000 --- a/hw/kdrive/epson/epson13806draw.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright 2004 by Costas Stylianou +44(0)7850 394095 - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Costas Sylianou not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Costas Stylianou makes no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * COSTAS STYLIANOU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL COSTAS STYLIANOU BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -/* - * epson13806draw.h - Implementation of hard ware accelerated functions for epson S1D13806 - * Graphic controller. - * - * History: - * 28-Jan-04 C.Stylianou PRJ NBL: Created from chipsdraw.h - * - */ - -#ifndef _EPSON13806DRAW_H_ -#define _EPSON13806DRAW_H_ - - -/* - * offset from ioport beginning - */ - - -#define SetupEpson(s) KdScreenPriv(s); \ - epsonCardInfo(pScreenPriv); \ - EpsonPtr epson = epsonc->epson - - -typedef volatile CARD8 VOL8; -typedef volatile CARD16 VOL16; -typedef volatile CARD32 VOL32; - -typedef struct _epsonSave { - int dummy; -} EpsonSave; - -typedef struct _epsonCardInfo { - EpsonPriv epson; - CARD32 *window; - Bool mmio; - EpsonSave save; -} epsonCardInfo; - -#define getEpsonCardInfo(kd) ((epsonCardInfo *) ((kd)->card->driver)) -#define epsonCardInfo(kd) epsonCardInfo *epsonc = getEpsonCardInfo(kd) - -typedef struct _epsonCursor { - int width, height; - int xhot, yhot; - Bool has_cursor; - CursorPtr pCursor; - Pixel source, mask; -} EpsonCursor; - -#define epson_CURSOR_WIDTH 64 -#define epson_CURSOR_HEIGHT 64 - -typedef struct _epsonScreenInfo { - EpsonScrPriv epson; - CARD8 *cursor_base; - CARD8 *screen; - CARD8 *off_screen; - int off_screen_size; - EpsonCursor cursor; - void *regbase_virt; -} EpsonScreenInfo; - -#define getEpsonScreenInfo(kd) ((EpsonScreenInfo *) ((kd)->screen->driver)) -#define epsonScreenInfo(kd) EpsonScreenInfo *epsons = getEpsonScreenInfo(kd) - -Bool -epsonDrawInit (ScreenPtr pScreen); - -void -epsonDrawEnable (ScreenPtr pScreen); - -void -epsonDrawSync (ScreenPtr pScreen); - -void -epsonDrawDisable (ScreenPtr pScreen); - -void -epsonDrawFini (ScreenPtr pScreen); - -Bool -epsonCursorInit (ScreenPtr pScreen); - -void -epsonCursorEnable (ScreenPtr pScreen); - -void -epsonCursorDisable (ScreenPtr pScreen); - -void -epsonCursorFini (ScreenPtr pScreen); - -void -epsonRecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdef); - -extern KdCardFuncs epsonFuncs; - -#endif diff --git a/hw/kdrive/epson/epson13806reg.h b/hw/kdrive/epson/epson13806reg.h deleted file mode 100644 index ee745a08f..000000000 --- a/hw/kdrive/epson/epson13806reg.h +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright 2004 by Costas Stylianou +44(0)7850 394095 - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Costas Sylianou not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Costas Stylianou makes no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * COSTAS STYLIANOU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL COSTAS STYLIANOU BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -/* - * epson13806reg.h Epson S1D13806 LCD controller header file. - * - * History: - * 15-Feb-04 C.Stylianou PRJ NBL: Created. - * - */ - - -#ifndef EPSON13806REG_H -#define EPSON13806REG_H - - -#define TT_UNUSED(x) ((void) (x)) - - -#define EPSON13806_PHYSICAL_REG_ADDR 0x14000000 -#define EPSON13806_GPIO_REGSIZE 0x001f0000 - -#define EPSON13806_PHYSICAL_VMEM_ADDR 0x14200000 -#define EPSON13806_VMEM_SIZE 0x140000 - -#define PLATFORM_EPSON13806_BASE (regbase) -#define EPSON13806_REG_BASE (PLATFORM_EPSON13806_BASE + 0x000000) // Register base address -#define EPSON13806_SDRAM_BASE (PLATFORM_EPSON13806_BASE + 0x200000) // SDRAM base address - -////////////////////////////////////////////////////////////////////////////////////////// -// Register Offsets -////////////////////////////////////////////////////////////////////////////////////////// -#define EPSON13806_REVCODE (EPSON13806_REG_BASE + 0x0000) // Revision Code Register -#define EPSON13806_MISC (EPSON13806_REG_BASE + 0x0001) // Miscellaneous Register -#define EPSON13806_GPIOCFG (EPSON13806_REG_BASE + 0x0004) // General IO Pins Configuration Register (16 bits) -#define EPSON13806_GPIOCFG0 (EPSON13806_REG_BASE + 0x0004) // General IO Pins Configuration Register 0 -#define EPSON13806_GPIOCFG1 (EPSON13806_REG_BASE + 0x0005) // General IO Pins Configuration Register 1 -#define EPSON13806_GPIOCTRL (EPSON13806_REG_BASE + 0x0008) // General IO Pins Control Register (16 bits) -#define EPSON13806_GPIOCTRL0 (EPSON13806_REG_BASE + 0x0008) // General IO Pins Control Register 0 -#define EPSON13806_GPIOCTRL1 (EPSON13806_REG_BASE + 0x0009) // General IO Pins Control Register 1 -#define EPSON13806_MDCFGSTATUS (EPSON13806_REG_BASE + 0x000C) // Configuration Status Register -#define EPSON13806_MEMCLKCFG (EPSON13806_REG_BASE + 0x0010) // Memory Clock Configuration Register -#define EPSON13806_LCDPCLKCFG (EPSON13806_REG_BASE + 0x0014) // LCD Pixel Clock Configuration Register -#define EPSON13806_CRTPCLKCFG (EPSON13806_REG_BASE + 0x0018) // CRT/TV Clock Configuration Register -#define EPSON13806_MPCLKCFG (EPSON13806_REG_BASE + 0x001C) // MediaPlug Clock Configuration Register -#define EPSON13806_CPUMEMWAITSEL (EPSON13806_REG_BASE + 0x001E) // CPU To Memory Wait State Select Register -#define EPSON13806_MEMCFG (EPSON13806_REG_BASE + 0x0020) // Memory Configuration Register -#define EPSON13806_DRAMREFRESH (EPSON13806_REG_BASE + 0x0021) // DRAM Refresh Rate Register -#define EPSON13806_DRAMTIMINGCTRL (EPSON13806_REG_BASE + 0x002A) // DRAM Timings Control Register (16 bits) -#define EPSON13806_DRAMTIMINGCTRL0 (EPSON13806_REG_BASE + 0x002A) // DRAM Timings Control Register 0 -#define EPSON13806_DRAMTIMINGCTRL1 (EPSON13806_REG_BASE + 0x002B) // DRAM Timings Control Register 1 -#define EPSON13806_PANELTYPE (EPSON13806_REG_BASE + 0x0030) // Panel Type Register -#define EPSON13806_MODRATE (EPSON13806_REG_BASE + 0x0031) // MOD Rate Register -#define EPSON13806_LCDHDP (EPSON13806_REG_BASE + 0x0032) // LCD Horizontal Display Width Register -#define EPSON13806_LCDHNDP (EPSON13806_REG_BASE + 0x0034) // LCD Horizontal Non-Display Period Register -#define EPSON13806_TFTFPLINESTART (EPSON13806_REG_BASE + 0x0035) // TFT FPLINE Start Position Register -#define EPSON13806_TFTFPLINEPULSE (EPSON13806_REG_BASE + 0x0036) // TFT FPLINE Pulse Width Register -#define EPSON13806_LCDVDP (EPSON13806_REG_BASE + 0x0038) // LCD Vertical Display Height Register (16 bits) -#define EPSON13806_LCDVDP0 (EPSON13806_REG_BASE + 0x0038) // LCD Vertical Display Height Register 0 -#define EPSON13806_LCDVDP1 (EPSON13806_REG_BASE + 0x0039) // LCD Vertical Display Height Register 1 -#define EPSON13806_LCDVNDP (EPSON13806_REG_BASE + 0x003A) // LCD Vertical Non-Display Period Register -#define EPSON13806_TFTFPFRAMESTART (EPSON13806_REG_BASE + 0x003B) // TFT FPFRAME Start Position Register -#define EPSON13806_TFTFPFRAMEPULSE (EPSON13806_REG_BASE + 0x003C) // TFT FPFRAME Pulse Width Register -#define EPSON13806_LCDLINECOUNT (EPSON13806_REG_BASE + 0x003E) // LCD Line Count Register (16 bits) -#define EPSON13806_LCDLINECOUNT0 (EPSON13806_REG_BASE + 0x003E) // LCD Line Count Register 0 -#define EPSON13806_LCDLINECOUNT1 (EPSON13806_REG_BASE + 0x003F) // LCD Line Count Register 1 -#define EPSON13806_LCDDISPMODE (EPSON13806_REG_BASE + 0x0040) // LCD Display Mode Register -#define EPSON13806_LCDMISC (EPSON13806_REG_BASE + 0x0041) // LCD Miscellaneous Register -#define EPSON13806_LCDSTART01 (EPSON13806_REG_BASE + 0x0042) // LCD Display Start Address Register 0 and 1 (16 bits) -#define EPSON13806_LCDSTART0 (EPSON13806_REG_BASE + 0x0042) // LCD Display Start Address Register 0 -#define EPSON13806_LCDSTART1 (EPSON13806_REG_BASE + 0x0043) // LCD Display Start Address Register 1 -#define EPSON13806_LCDSTART2 (EPSON13806_REG_BASE + 0x0044) // LCD Display Start Address Register 2 -#define EPSON13806_LCDSTRIDE (EPSON13806_REG_BASE + 0x0046) // LCD Memory Address Offset Register (16 bits) -#define EPSON13806_LCDSTRIDE0 (EPSON13806_REG_BASE + 0x0046) // LCD Memory Address Offset Register 0 -#define EPSON13806_LCDSTRIDE1 (EPSON13806_REG_BASE + 0x0047) // LCD Memory Address Offset Register 1 -#define EPSON13806_LCDPIXELPAN (EPSON13806_REG_BASE + 0x0048) // LCD Pixel Panning Register -#define EPSON13806_LCDFIFOHIGH (EPSON13806_REG_BASE + 0x004A) // LCD Display FIFO High Threshold Control Register -#define EPSON13806_LCDFIFOLOW (EPSON13806_REG_BASE + 0x004B) // LCD Display FIFO Low Threshold Control Register - -#define EPSON13806_LCDINKCURSCTRL (EPSON13806_REG_BASE + 0x0070) // LCD INK/Cursor Control Register -#define EPSON13806_LCDINKCURSSTART (EPSON13806_REG_BASE + 0x0071) // LCD INK/Cursor Start Address Register -#define EPSON13806_LCDCURSORXPOS (EPSON13806_REG_BASE + 0x0072) // LCD Cursor X Position Register (16 bits) -#define EPSON13806_LCDCURSORXPOS0 (EPSON13806_REG_BASE + 0x0072) // LCD Cursor X Position Register 0 -#define EPSON13806_LCDCURSORXPOS1 (EPSON13806_REG_BASE + 0x0073) // LCD Cursor X Position Register 1 -#define EPSON13806_LCDCURSORYPOS (EPSON13806_REG_BASE + 0x0074) // LCD Cursor Y Position Register (16 bits) -#define EPSON13806_LCDCURSORYPOS0 (EPSON13806_REG_BASE + 0x0074) // LCD Cursor Y Position Register 0 -#define EPSON13806_LCDCURSORYPOS1 (EPSON13806_REG_BASE + 0x0075) // LCD Cursor Y Position Register 1 -#define EPSON13806_LCDINKCURSBLUE0 (EPSON13806_REG_BASE + 0x0076) // LCD INK/Cursor Blue Color 0 Register -#define EPSON13806_LCDINKCURSGREEN0 (EPSON13806_REG_BASE + 0x0077) // LCD INK/Cursor Green Color 0 Register -#define EPSON13806_LCDINKCURSRED0 (EPSON13806_REG_BASE + 0x0078) // LCD INK/Cursor Red Color 0 Register -#define EPSON13806_LCDINKCURSBLUE1 (EPSON13806_REG_BASE + 0x007A) // LCD INK/Cursor Blue Color 1 Register -#define EPSON13806_LCDINKCURSGREEN1 (EPSON13806_REG_BASE + 0x007B) // LCD INK/Cursor Green Colour 1 Register -#define EPSON13806_LCDINKCURSRED1 (EPSON13806_REG_BASE + 0x007C) // LCD INK/Cursor Red Color 1 Register -#define EPSON13806_LCDINKCURSFIFO (EPSON13806_REG_BASE + 0x007E) // LCD INK/Cursor FIFO Threshold Register - -#define EPSON13806_BLTCTRL0 (EPSON13806_REG_BASE + 0x0100) // BitBlt Control Register 0 -#define EPSON13806_BLTCTRL1 (EPSON13806_REG_BASE + 0x0101) // BitBlt Control Register 1 -#define EPSON13806_BLTROP (EPSON13806_REG_BASE + 0x0102) // BitBlt ROP Code/Color Expansion Register -#define EPSON13806_BLTOPERATION (EPSON13806_REG_BASE + 0x0103) // BitBlt Operation Register -#define EPSON13806_BLTSRCSTART01 (EPSON13806_REG_BASE + 0x0104) // BitBlt Source Start Address Register 0 and 1 (16 bits) -#define EPSON13806_BLTSRCSTART0 (EPSON13806_REG_BASE + 0x0104) // BitBlt Source Start Address Register 0 -#define EPSON13806_BLTSRCSTART1 (EPSON13806_REG_BASE + 0x0105) // BitBlt Source Start Address Register 1 -#define EPSON13806_BLTSRCSTART2 (EPSON13806_REG_BASE + 0x0106) // BitBlt Source Start Address Register 2 -#define EPSON13806_BLTDSTSTART01 (EPSON13806_REG_BASE + 0x0108) // BitBlt Destination Start Address Register 0 and 1 (16 bits) -#define EPSON13806_BLTDSTSTART0 (EPSON13806_REG_BASE + 0x0108) // BitBlt Destination Start Address Register 0 -#define EPSON13806_BLTDSTSTART1 (EPSON13806_REG_BASE + 0x0109) // BitBlt Destination Start Address Register 1 -#define EPSON13806_BLTDSTSTART2 (EPSON13806_REG_BASE + 0x010A) // BitBlt Destination Start Address Register 2 -#define EPSON13806_BLTSTRIDE (EPSON13806_REG_BASE + 0x010C) // BitBlt Memory Address Offset Register (16 bits) -#define EPSON13806_BLTSTRIDE0 (EPSON13806_REG_BASE + 0x010C) // BitBlt Memory Address Offset Register 0 -#define EPSON13806_BLTSTRIDE1 (EPSON13806_REG_BASE + 0x010D) // BitBlt Memory Address Offset Register 1 -#define EPSON13806_BLTWIDTH (EPSON13806_REG_BASE + 0x0110) // BitBlt Width Register (16 bits) -#define EPSON13806_BLTWIDTH0 (EPSON13806_REG_BASE + 0x0110) // BitBlt Width Register 0 -#define EPSON13806_BLTWIDTH1 (EPSON13806_REG_BASE + 0x0111) // BitBlt Width Register 1 -#define EPSON13806_BLTHEIGHT (EPSON13806_REG_BASE + 0x0112) // BitBlt Height Register (16 bits) -#define EPSON13806_BLTHEIGHT0 (EPSON13806_REG_BASE + 0x0112) // BitBlt Height Register 0 -#define EPSON13806_BLTHEIGHT1 (EPSON13806_REG_BASE + 0x0113) // BitBlt Height Register 1 -#define EPSON13806_BLTBGCOLOR (EPSON13806_REG_BASE + 0x0114) // BitBlt Background Color Register (16 bits) -#define EPSON13806_BLTBGCOLOR0 (EPSON13806_REG_BASE + 0x0114) // BitBlt Background Color Register 0 -#define EPSON13806_BLTBGCOLOR1 (EPSON13806_REG_BASE + 0x0115) // BitBlt Background Color Register 1 -#define EPSON13806_BLTFGCOLOR (EPSON13806_REG_BASE + 0x0118) // BitBlt Foreground Color Register (16 bits) -#define EPSON13806_BLTFGCOLOR0 (EPSON13806_REG_BASE + 0x0118) // BitBlt Foreground Color Register 0 -#define EPSON13806_BLTFGCOLOR1 (EPSON13806_REG_BASE + 0x0119) // BitBlt Foreground Color Register 0 - -#define EPSON13806_LUTMODE (EPSON13806_REG_BASE + 0x01E0) // Look-Up Table Mode Register -#define EPSON13806_LUTADDR (EPSON13806_REG_BASE + 0x01E2) // Look-Up Table Address Register -#define EPSON13806_LUTDATA (EPSON13806_REG_BASE + 0x01E4) // Look-Up Table Data Register -#define EPSON13806_PWRSAVECFG (EPSON13806_REG_BASE + 0x01F0) // Power Save Configuration Register -#define EPSON13806_PWRSAVESTATUS (EPSON13806_REG_BASE + 0x01F1) // Power Save Status Register -#define EPSON13806_CPUMEMWATCHDOG (EPSON13806_REG_BASE + 0x01F4) // CPU-to-Memory Access Watchdog Timer Register -#define EPSON13806_DISPMODE (EPSON13806_REG_BASE + 0x01FC) // Display Mode Register - -#define EPSON13806_MEDIALCMD (EPSON13806_REG_BASE + 0x1000) // MediaPlug LCMD Register -#define EPSON13806_MEDIARESERVEDLCMD (EPSON13806_REG_BASE + 0x1002) // MediaPlug Reserved LCMD Register -#define EPSON13806_MEDIACMD (EPSON13806_REG_BASE + 0x1004) // MediaPlug CMD Register -#define EPSON13806_MEDIARESERVEDCMD (EPSON13806_REG_BASE + 0x1006) // MediaPlug Reserved CMD Register -#define EPSON13806_MEDIADATA (EPSON13806_REG_BASE + 0x1008) // MediaPlug Data Registers (base) - -#define EPSON13806_BITBLTDATA (EPSON13806_REG_BASE + 0x100000) // BitBLT Data Registers (base) - -// BLTCTRL0 register defines -#define EPSON13806_BLTCTRL0_ACTIVE (1<<7) // Read: 1=busy, 0=idle / Write: 1=start, 0=no change - -// BLTOPERATION register defines -#define EPSON13806_BLTOPERATION_WRITEROP (0x00) // Write BitBLT with ROP -#define EPSON13806_BLTOPERATION_READ (0x01) // Read BitBLT -#define EPSON13806_BLTOPERATION_MOVEPOSROP (0x02) // Move BitBLT in positive direction with ROP -#define EPSON13806_BLTOPERATION_MOVENEGROP (0x03) // Move BitBLT in negative direction with ROP -#define EPSON13806_BLTOPERATION_TRANSWRITE (0x04) // Transparent Write BitBLT -#define EPSON13806_BLTOPERATION_TRANSMOVEPOS (0x05) // Transparent Move BitBLT in positive direction -#define EPSON13806_BLTOPERATION_PATFILLROP (0x06) // Pattern fill with ROP -#define EPSON13806_BLTOPERATION_PATFILLTRANS (0x07) // Pattern fill with transparency -#define EPSON13806_BLTOPERATION_COLOREXP (0x08) // Color expansion -#define EPSON13806_BLTOPERATION_COLOREXPTRANS (0x09) // Color expansion with transparency -#define EPSON13806_BLTOPERATION_MOVECOLOREXP (0x0A) // Move BitBLT with color expansion -#define EPSON13806_BLTOPERATION_MOVECOLOREXPTRANS (0x0B) // Move BitBLT with color expansion and transparency -#define EPSON13806_BLTOPERATION_SOLIDFILL (0x0C) // Solid fill - -////////////////////////////////////////////////////////////////////////////////////////// -// Epson register access macros -////////////////////////////////////////////////////////////////////////////////////////// -#define EPSON13806_REG(address) *(VOL8 *)(address) -#define EPSON13806_REG16(address) *(VOL16 *)(address) - - -#endif // EPSON13806 diff --git a/hw/kdrive/epson/epson13806stub.c b/hw/kdrive/epson/epson13806stub.c deleted file mode 100644 index 087a30fc7..000000000 --- a/hw/kdrive/epson/epson13806stub.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2004 by Costas Stylianou +44(0)7850 394095 - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Costas Sylianou not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Costas Stylianou makes no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * COSTAS STYLIANOU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL COSTAS STYLIANOU BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -/* - * epson13806stub.c - * - * History: - * 28-Jan-04 C.Stylianou PRJ NBL: Created from fbdevinit.c - * - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -void -InitCard (char *name) -{ - KdCardAttr attr; - - fprintf(stderr, "Epson 13806 Tiny X Driver ver 1.01\n"); - - KdCardInfoAdd (&epsonFuncs, &attr, 0); -} - -void -InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) -{ - KdInitOutput (pScreenInfo, argc, argv); -} - -void -InitInput (int argc, char **argv) -{ - KdOsAddInputDrivers (); - KdInitInput (); -} - -int -ddxProcessArgument (int argc, char **argv, int i) -{ - return KdProcessArgument (argc, argv, i); -} - -void -ddxUseMsg (void) -{ - KdUseMsg(); -} diff --git a/hw/kdrive/i810/Makefile.am b/hw/kdrive/i810/Makefile.am deleted file mode 100644 index 30919fad9..000000000 --- a/hw/kdrive/i810/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -INCLUDES = \ - @KDRIVE_INCS@ \ - @KDRIVE_CFLAGS@ - -bin_PROGRAMS = Xi810 - -noinst_LIBRARIES = libi810.a - - -libi810_a_SOURCES = \ - i810_cursor.c \ - i810_video.c \ - i810draw.c \ - i810draw.h \ - i810_reg.h \ - i810.c \ - i810.h - -Xi810_SOURCES = \ - i810stub.c - -I810_LIBS = \ - libi810.a \ - @KDRIVE_LIBS@ - -if GLX -Xi810_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -endif - -Xi810_LDADD = \ - $(I810_LIBS) \ - @KDRIVE_LIBS@ - -Xi810_DEPENDENCIES = \ - libi810.a \ - @KDRIVE_LOCAL_LIBS@ - -relink: - rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS) diff --git a/hw/kdrive/i810/i810.c b/hw/kdrive/i810/i810.c deleted file mode 100644 index 49090f9eb..000000000 --- a/hw/kdrive/i810/i810.c +++ /dev/null @@ -1,2112 +0,0 @@ -/* COPYRIGHT AND PERMISSION NOTICE - -Copyright (c) 2000, 2001 Nokia Home Communications - -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, provided that the above -copyright notice(s) and this permission notice appear in all copies of -the Software and that both the above copyright notice(s) and this -permission notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY -SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER -RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF -CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -of the copyright holder. - -X Window System is a trademark of The Open Group */ - -/* - * i810.c - KDrive driver for the i810 chipset - * - * Authors: - * Pontus Lidman - * - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "kdrive.h" -#include "kxv.h" -#include "klinux.h" - -#include "i810.h" -#include "agp.h" - -#include "i810draw.h" - -#ifndef I810_DEBUG -int I810_DEBUG = (0 -/* | DEBUG_ALWAYS_SYNC */ -/* | DEBUG_VERBOSE_ACCEL */ -/* | DEBUG_VERBOSE_SYNC */ -/* | DEBUG_VERBOSE_VGA */ -/* | DEBUG_VERBOSE_RING */ -/* | DEBUG_VERBOSE_OUTREG */ -/* | DEBUG_VERBOSE_MEMORY */ -/* | DEBUG_VERBOSE_CURSOR */ - ); -#endif - - -static Bool -i810ModeInit(KdScreenInfo *screen, const KdMonitorTiming *t); - -static void -i810PrintMode( vgaRegPtr vgaReg, I810RegPtr mode ); - -Bool -i810CardInit (KdCardInfo *card) -{ - int i; - - I810CardInfo *i810c; - -/* fprintf(stderr,"i810CardInit\n"); */ - - i810c = (I810CardInfo *) xalloc (sizeof (I810CardInfo)); - - if (!i810c) - return FALSE; - - /* 2MB Video RAM */ - i810c->videoRam=2048; - - /* Find FB address */ - - if (card->attr.address[1] != 0) { - i810c->LinearAddr = card->attr.address[0] & 0xFF000000; - - if (!i810c->LinearAddr) { - fprintf(stderr,"No valid FB address in PCI config space(1)\n"); - xfree(i810c); - return FALSE; - } else { -/* fprintf(stderr,"Linear framebuffer at %lx\n",i810c->LinearAddr); */ - } - } else { - fprintf(stderr,"No valid FB address in PCI config space(2)\n"); - xfree(i810c); - return FALSE; - } - - if (card->attr.address[1]) { - - i810c->MMIOAddr = card->attr.address[1] & 0xFFF80000; - - i810c->MMIOBase = - KdMapDevice (i810c->MMIOAddr, I810_REG_SIZE); - if (!i810c->MMIOBase) { - fprintf(stderr,"No valid MMIO address in PCI config space(1)\n"); - xfree(i810c); - return FALSE; - } else { - - } - } else { - fprintf(stderr,"No valid MMIO address in PCI config space(2)\n"); - xfree(i810c); - return FALSE; - } - -/* fprintf(stderr,"Mapped 0x%x bytes of MMIO regs at phys 0x%lx virt %p\n", */ -/* I810_REG_SIZE,i810c->MMIOAddr,i810c->MMIOBase); */ - - /* Find out memory bus frequency. - */ - - { - unsigned long *p; - - if (!(p= (unsigned long *) LinuxGetPciCfg(&card->attr))) - return FALSE; - -/* fprintf(stderr,"Frequency long %lx\n",p[WHTCFG_PAMR_DRP]); */ - - if ( (p[WHTCFG_PAMR_DRP] & LM_FREQ_MASK) == LM_FREQ_133 ) - i810c->LmFreqSel = 133; - else - i810c->LmFreqSel = 100; - - xfree(p); - -/* fprintf(stderr,"Selected frequency %d\n",i810c->LmFreqSel); */ - } - -/* fprintf(stderr,"Will alloc AGP framebuffer: %d kByte\n",i810c->videoRam); */ - - /* Since we always want write combining on first 32 mb of framebuffer - * we pass a mapsize of 32 mb */ - i810c->FbMapSize = 32*1024*1024; - - for (i = 2 ; i < i810c->FbMapSize ; i <<= 1); - i810c->FbMapSize = i; - - i810c->FbBase = - KdMapDevice (i810c->LinearAddr, i810c->FbMapSize); - - if (!i810c->FbBase) return FALSE; -/* fprintf(stderr,"Mapped 0x%lx bytes of framebuffer at %p\n", */ -/* i810c->FbMapSize,i810c->FbBase); */ - - card->driver=i810c; - - return TRUE; -} - -static void -i810ScreenFini (KdScreenInfo *screen) -{ - I810ScreenInfo *i810s = (I810ScreenInfo *) screen->driver; - - xfree (i810s); - screen->driver = 0; -} - -static Bool -i810InitScreen (ScreenPtr pScreen) { - -#ifdef XV - i810InitVideo(pScreen); -#endif - return TRUE; -} - -static Bool -i810FinishInitScreen(ScreenPtr pScreen) -{ - /* XXX: RandR init */ - return TRUE; -} - -static void -i810CardFini (KdCardInfo *card) -{ - I810CardInfo *i810c = (I810CardInfo *) card->driver; - - KdUnmapDevice (i810c->FbBase, i810c->FbMapSize); - KdUnmapDevice (i810c->MMIOBase, I810_REG_SIZE); - xfree (i810c); - card->driver = 0; -} - -struct wm_info { - double freq; - unsigned int wm; -}; - -struct wm_info i810_wm_8_100[] = { - { 0, 0x22003000 }, - { 25.2, 0x22003000 }, - { 28.0, 0x22003000 }, - { 31.5, 0x22003000 }, - { 36.0, 0x22007000 }, - { 40.0, 0x22007000 }, - { 45.0, 0x22007000 }, - { 49.5, 0x22008000 }, - { 50.0, 0x22008000 }, - { 56.3, 0x22008000 }, - { 65.0, 0x22008000 }, - { 75.0, 0x22008000 }, - { 78.8, 0x22008000 }, - { 80.0, 0x22008000 }, - { 94.0, 0x22008000 }, - { 96.0, 0x22107000 }, - { 99.0, 0x22107000 }, - { 108.0, 0x22107000 }, - { 121.0, 0x22107000 }, - { 128.9, 0x22107000 }, - { 132.0, 0x22109000 }, - { 135.0, 0x22109000 }, - { 157.5, 0x2210b000 }, - { 162.0, 0x2210b000 }, - { 175.5, 0x2210b000 }, - { 189.0, 0x2220e000 }, - { 202.5, 0x2220e000 } -}; - -struct wm_info i810_wm_16_100[] = { - { 0, 0x22004000 }, - { 25.2, 0x22006000 }, - { 28.0, 0x22006000 }, - { 31.5, 0x22007000 }, - { 36.0, 0x22007000 }, - { 40.0, 0x22007000 }, - { 45.0, 0x22007000 }, - { 49.5, 0x22009000 }, - { 50.0, 0x22009000 }, - { 56.3, 0x22108000 }, - { 65.0, 0x2210e000 }, - { 75.0, 0x2210e000 }, - { 78.8, 0x2210e000 }, - { 80.0, 0x22210000 }, - { 94.5, 0x22210000 }, - { 96.0, 0x22210000 }, - { 99.0, 0x22210000 }, - { 108.0, 0x22210000 }, - { 121.0, 0x22210000 }, - { 128.9, 0x22210000 }, - { 132.0, 0x22314000 }, - { 135.0, 0x22314000 }, - { 157.5, 0x22415000 }, - { 162.0, 0x22416000 }, - { 175.5, 0x22416000 }, - { 189.0, 0x22416000 }, - { 195.0, 0x22416000 }, - { 202.5, 0x22416000 } -}; - - -struct wm_info i810_wm_24_100[] = { - { 0, 0x22006000 }, - { 25.2, 0x22009000 }, - { 28.0, 0x22009000 }, - { 31.5, 0x2200a000 }, - { 36.0, 0x2210c000 }, - { 40.0, 0x2210c000 }, - { 45.0, 0x2210c000 }, - { 49.5, 0x22111000 }, - { 50.0, 0x22111000 }, - { 56.3, 0x22111000 }, - { 65.0, 0x22214000 }, - { 75.0, 0x22214000 }, - { 78.8, 0x22215000 }, - { 80.0, 0x22216000 }, - { 94.5, 0x22218000 }, - { 96.0, 0x22418000 }, - { 99.0, 0x22418000 }, - { 108.0, 0x22418000 }, - { 121.0, 0x22418000 }, - { 128.9, 0x22419000 }, - { 132.0, 0x22519000 }, - { 135.0, 0x4441d000 }, - { 157.5, 0x44419000 }, - { 162.0, 0x44419000 }, - { 175.5, 0x44419000 }, - { 189.0, 0x44419000 }, - { 195.0, 0x44419000 }, - { 202.5, 0x44419000 } -}; - -struct wm_info i810_wm_32_100[] = { - { 0, 0x2210b000 }, - { 60, 0x22415000 }, /* 0x314000 works too */ - { 80, 0x22419000 } /* 0x518000 works too */ -}; - - -struct wm_info i810_wm_8_133[] = { - { 0, 0x22003000 }, - { 25.2, 0x22003000 }, - { 28.0, 0x22003000 }, - { 31.5, 0x22003000 }, - { 36.0, 0x22007000 }, - { 40.0, 0x22007000 }, - { 45.0, 0x22007000 }, - { 49.5, 0x22008000 }, - { 50.0, 0x22008000 }, - { 56.3, 0x22008000 }, - { 65.0, 0x22008000 }, - { 75.0, 0x22008000 }, - { 78.8, 0x22008000 }, - { 80.0, 0x22008000 }, - { 94.0, 0x22008000 }, - { 96.0, 0x22107000 }, - { 99.0, 0x22107000 }, - { 108.0, 0x22107000 }, - { 121.0, 0x22107000 }, - { 128.9, 0x22107000 }, - { 132.0, 0x22109000 }, - { 135.0, 0x22109000 }, - { 157.5, 0x2210b000 }, - { 162.0, 0x2210b000 }, - { 175.5, 0x2210b000 }, - { 189.0, 0x2220e000 }, - { 202.5, 0x2220e000 } -}; - - -struct wm_info i810_wm_16_133[] = { - { 0, 0x22004000 }, - { 25.2, 0x22006000 }, - { 28.0, 0x22006000 }, - { 31.5, 0x22007000 }, - { 36.0, 0x22007000 }, - { 40.0, 0x22007000 }, - { 45.0, 0x22007000 }, - { 49.5, 0x22009000 }, - { 50.0, 0x22009000 }, - { 56.3, 0x22108000 }, - { 65.0, 0x2210e000 }, - { 75.0, 0x2210e000 }, - { 78.8, 0x2210e000 }, - { 80.0, 0x22210000 }, - { 94.5, 0x22210000 }, - { 96.0, 0x22210000 }, - { 99.0, 0x22210000 }, - { 108.0, 0x22210000 }, - { 121.0, 0x22210000 }, - { 128.9, 0x22210000 }, - { 132.0, 0x22314000 }, - { 135.0, 0x22314000 }, - { 157.5, 0x22415000 }, - { 162.0, 0x22416000 }, - { 175.5, 0x22416000 }, - { 189.0, 0x22416000 }, - { 195.0, 0x22416000 }, - { 202.5, 0x22416000 } -}; - -struct wm_info i810_wm_24_133[] = { - { 0, 0x22006000 }, - { 25.2, 0x22009000 }, - { 28.0, 0x22009000 }, - { 31.5, 0x2200a000 }, - { 36.0, 0x2210c000 }, - { 40.0, 0x2210c000 }, - { 45.0, 0x2210c000 }, - { 49.5, 0x22111000 }, - { 50.0, 0x22111000 }, - { 56.3, 0x22111000 }, - { 65.0, 0x22214000 }, - { 75.0, 0x22214000 }, - { 78.8, 0x22215000 }, - { 80.0, 0x22216000 }, - { 94.5, 0x22218000 }, - { 96.0, 0x22418000 }, - { 99.0, 0x22418000 }, - { 108.0, 0x22418000 }, - { 121.0, 0x22418000 }, - { 128.9, 0x22419000 }, - { 132.0, 0x22519000 }, - { 135.0, 0x4441d000 }, - { 157.5, 0x44419000 }, - { 162.0, 0x44419000 }, - { 175.5, 0x44419000 }, - { 189.0, 0x44419000 }, - { 195.0, 0x44419000 }, - { 202.5, 0x44419000 } -}; - -static void -i810WriteControlMMIO(I810CardInfo *i810c, int addr, CARD8 index, CARD8 val) { - moutb(addr, index); - moutb(addr+1, val); -} - -static CARD8 -i810ReadControlMMIO(I810CardInfo *i810c, int addr, CARD8 index) { - moutb(addr, index); - return minb(addr+1); -} - -static Bool -i810ModeSupported (KdScreenInfo *screen, const KdMonitorTiming *t) -{ - /* This is just a guess. */ - if (t->horizontal > 1600 || t->horizontal < 640) return FALSE; - if (t->vertical > 1200 || t->horizontal < 350) return FALSE; - return TRUE; -} - -static Bool -i810ModeUsable (KdScreenInfo *screen) -{ - KdCardInfo *card = screen->card; - I810CardInfo *i810c = (I810CardInfo *) card->driver; - int byte_width, pixel_width, screen_size; - -/* fprintf(stderr,"i810ModeUsable\n"); */ - - if (screen->fb[0].depth >= 24) - { - screen->fb[0].depth = 24; - screen->fb[0].bitsPerPixel = 24; - screen->dumb = TRUE; - } - else if (screen->fb[0].depth >= 16) - { - screen->fb[0].depth = 16; - screen->fb[0].bitsPerPixel = 16; - } - else if (screen->fb[0].depth >= 15) - { - screen->fb[0].depth = 15; - screen->fb[0].bitsPerPixel = 16; - } - else - { - screen->fb[0].depth = 8; - screen->fb[0].bitsPerPixel = 8; - } - byte_width = screen->width * (screen->fb[0].bitsPerPixel >> 3); - pixel_width = screen->width; - - screen->fb[0].pixelStride = pixel_width; - screen->fb[0].byteStride = byte_width; - - screen_size = byte_width * screen->height; - - return screen_size <= (i810c->videoRam * 1024); -} - -static int i810AllocateGARTMemory( KdScreenInfo *screen ) -{ - KdCardInfo *card = screen->card; - I810CardInfo *i810c = (I810CardInfo *) card->driver; - unsigned long size = i810c->videoRam * 1024; - - int key; - long tom = 0; - unsigned long physical; - - if (!KdAgpGARTSupported()) - return FALSE; - - if (!KdAcquireGART(screen->mynum)) - return FALSE; - - /* This allows the 2d only Xserver to regen */ - i810c->agpAcquired2d = TRUE; - - /* Treat the gart like video memory - we assume we own all that is - * there, so ignore EBUSY errors. Don't try to remove it on - * failure, either, as other X server may be using it. - */ - - if ((key = KdAllocateGARTMemory(screen->mynum, size, 0, NULL)) == -1) - return FALSE; - - i810c->VramOffset = 0; - i810c->VramKey = key; - - if (!KdBindGARTMemory(screen->mynum, key, 0)) - return FALSE; - - - i810c->SysMem.Start = 0; - i810c->SysMem.Size = size; - i810c->SysMem.End = size; - i810c->SavedSysMem = i810c->SysMem; - - tom = i810c->SysMem.End; - - i810c->DcacheMem.Start = 0; - i810c->DcacheMem.End = 0; - i810c->DcacheMem.Size = 0; - i810c->CursorPhysical = 0; - - /* Dcache - half the speed of normal ram, so not really useful for - * a 2d server. Don't bother reporting its presence. This is - * mapped in addition to the requested amount of system ram. - */ - size = 1024 * 4096; - - /* Keep it 512K aligned for the sake of tiled regions. - */ - tom += 0x7ffff; - tom &= ~0x7ffff; - - if ((key = KdAllocateGARTMemory(screen->mynum, size, AGP_DCACHE_MEMORY, NULL)) != -1) { - i810c->DcacheOffset= tom; - i810c->DcacheKey = key; - if (!KdBindGARTMemory(screen->mynum, key, tom)) { - fprintf(stderr,"Allocation of %ld bytes for DCACHE failed\n", size); - i810c->DcacheKey = -1; - } else { - i810c->DcacheMem.Start = tom; - i810c->DcacheMem.Size = size; - i810c->DcacheMem.End = i810c->DcacheMem.Start + i810c->DcacheMem.Size; - tom = i810c->DcacheMem.End; - } - } else { - fprintf(stderr, - "No physical memory available for %ld bytes of DCACHE\n", - size); - i810c->DcacheKey = -1; - } - - /* Mouse cursor -- The i810 (crazy) needs a physical address in - * system memory from which to upload the cursor. We get this from - * the agpgart module using a special memory type. - */ - - /* 4k for the cursor is excessive, I'm going to steal 3k for - * overlay registers later - */ - - size = 4096; - - if ((key = KdAllocateGARTMemory(screen->mynum, size, AGP_PHYS_MEMORY, - &physical)) == -1) { - fprintf(stderr, - "No physical memory available for HW cursor\n"); - i810c->HwcursKey = -1; - } else { - i810c->HwcursOffset= tom; - i810c->HwcursKey = key; - if (!KdBindGARTMemory(screen->mynum, key, tom)) { - fprintf(stderr, - "Allocation of %ld bytes for HW cursor failed\n", - size); - i810c->HwcursKey = -1; - } else { - i810c->CursorPhysical = physical; - i810c->CursorStart = tom; - tom += size; - } - } - - /* Overlay register buffer -- Just like the cursor, the i810 needs a - * physical address in system memory from which to upload the overlay - * registers. - */ - if (i810c->CursorStart != 0) { - i810c->OverlayPhysical = i810c->CursorPhysical + 1024; - i810c->OverlayStart = i810c->CursorStart + 1024; - } - - - i810c->GttBound = 1; - - return TRUE; -} - -/* Allocate from a memrange, returns success */ - -static int i810AllocLow( I810MemRange *result, I810MemRange *pool, int size ) -{ - if (size > pool->Size) return FALSE; - - pool->Size -= size; - result->Size = size; - result->Start = pool->Start; - result->End = pool->Start += size; - return TRUE; -} - -static int i810AllocHigh( I810MemRange *result, I810MemRange *pool, int size ) -{ - if (size > pool->Size) return 0; - - pool->Size -= size; - result->Size = size; - result->End = pool->End; - result->Start = pool->End -= size; - return 1; -} - -static Bool -i810AllocateFront(KdScreenInfo *screen) { - - KdCardInfo *card = screen->card; - I810CardInfo *i810c = (I810CardInfo *) card->driver; - - int cache_lines = -1; - - if(i810c->DoneFrontAlloc) - return TRUE; - - memset(&(i810c->FbMemBox), 0, sizeof(BoxRec)); - /* Alloc FrontBuffer/Ring/Accel memory */ - i810c->FbMemBox.x1=0; - i810c->FbMemBox.x2=screen->width; - i810c->FbMemBox.y1=0; - i810c->FbMemBox.y2=screen->height; - - /* This could be made a command line option */ - cache_lines = 0; - - if(cache_lines >= 0) - i810c->FbMemBox.y2 += cache_lines; - else { - /* make sure there is enough for two DVD sized YUV buffers */ - i810c->FbMemBox.y2 += (screen->fb[0].depth == 24) ? 256 : 384; - if (screen->width <= 1024) - i810c->FbMemBox.y2 += (screen->fb[0].depth == 24) ? 256 : 384; - cache_lines = i810c->FbMemBox.y2 - screen->height; - } - - if (I810_DEBUG) - ErrorF("Adding %i scanlines for pixmap caching\n", cache_lines); - - /* Reserve room for the framebuffer and pixcache. Put at the top - * of memory so we can have nice alignment for the tiled regions at - * the start of memory. - */ - i810AllocLow( &(i810c->FrontBuffer), - &(i810c->SysMem), - ((i810c->FbMemBox.x2 * - i810c->FbMemBox.y2 * - i810c->cpp) + 4095) & ~4095); - - memset( &(i810c->LpRing), 0, sizeof( I810RingBuffer ) ); - if(i810AllocLow( &(i810c->LpRing.mem), &(i810c->SysMem), 16*4096 )) { - if (I810_DEBUG & DEBUG_VERBOSE_MEMORY) - ErrorF( "ring buffer at local %lx\n", - i810c->LpRing.mem.Start); - - i810c->LpRing.tail_mask = i810c->LpRing.mem.Size - 1; - i810c->LpRing.virtual_start = i810c->FbBase + i810c->LpRing.mem.Start; - i810c->LpRing.head = 0; - i810c->LpRing.tail = 0; - i810c->LpRing.space = 0; - } - - if ( i810AllocLow( &i810c->Scratch, &(i810c->SysMem), 64*1024 ) || - i810AllocLow( &i810c->Scratch, &(i810c->SysMem), 16*1024 ) ) { - if (I810_DEBUG & DEBUG_VERBOSE_MEMORY) - ErrorF("Allocated Scratch Memory\n"); - } - -#ifdef XV - /* 720x720 is just how much memory the mpeg player needs for overlays */ - - if ( i810AllocHigh( &i810c->XvMem, &(i810c->SysMem), 720*720*2 )) { - if (I810_DEBUG & DEBUG_VERBOSE_MEMORY) - ErrorF("Allocated overlay Memory\n"); - } -#endif - - i810c->DoneFrontAlloc = TRUE; - return TRUE; -} - -static Bool -i810MapMem(KdScreenInfo *screen) -{ - - KdCardInfo *card = screen->card; - I810CardInfo *i810c = (I810CardInfo *) card->driver; - - i810c->LpRing.virtual_start = i810c->FbBase + i810c->LpRing.mem.Start; - - return TRUE; -} - - -Bool -i810ScreenInit (KdScreenInfo *screen) -{ - KdCardInfo *card = screen->card; - I810CardInfo *i810c = (I810CardInfo *) card->driver; - I810ScreenInfo *i810s; - - int i; - - const KdMonitorTiming *t; - -/* fprintf(stderr,"i810ScreenInit\n"); */ - - i810s = (I810ScreenInfo *) xalloc (sizeof (I810ScreenInfo)); - if (!i810s) - return FALSE; - - memset (i810s, '\0', sizeof (I810ScreenInfo)); - - i810s->i810c = i810c; - - /* Default dimensions */ - if (!screen->width || !screen->height) - { - screen->width = 720; - screen->height = 576; - screen->rate = 52; -#if 0 - screen->width = 1024; - screen->height = 768; - screen->rate = 72; -#endif - } - - if (!screen->fb[0].depth) - screen->fb[0].depth = 16; - - t = KdFindMode (screen, i810ModeSupported); - - screen->rate = t->rate; - screen->width = t->horizontal; - screen->height = t->vertical; - - if (!KdTuneMode (screen, i810ModeUsable, i810ModeSupported)) - { - xfree (i810c); - return FALSE; - } - -/* fprintf(stderr,"Screen rate %d horiz %d vert %d\n",t->rate,t->horizontal,t->vertical); */ - - switch (screen->fb[0].depth) { - case 8: - screen->fb[0].visuals = ((1 << StaticGray) | - (1 << GrayScale) | - (1 << StaticColor) | - (1 << PseudoColor) | - (1 << TrueColor) | - (1 << DirectColor)); - screen->fb[0].blueMask = 0x00; - screen->fb[0].greenMask = 0x00; - screen->fb[0].redMask = 0x00; - break; - case 15: - screen->fb[0].visuals = (1 << TrueColor); - screen->fb[0].blueMask = 0x001f; - screen->fb[0].greenMask = 0x03e0; - screen->fb[0].redMask = 0x7c00; - - i810c->colorKey = 0x043f; - - break; - case 16: - screen->fb[0].visuals = (1 << TrueColor); - screen->fb[0].blueMask = 0x001f; - screen->fb[0].greenMask = 0x07e0; - screen->fb[0].redMask = 0xf800; - - i810c->colorKey = 0x083f; - - break; - case 24: - screen->fb[0].visuals = (1 << TrueColor); - screen->fb[0].blueMask = 0x0000ff; - screen->fb[0].greenMask = 0x00ff00; - screen->fb[0].redMask = 0xff0000; - - i810c->colorKey = 0x0101ff; - - break; - default: - fprintf(stderr,"Unsupported depth %d\n",screen->fb[0].depth); - return FALSE; - } - - - - /* Set all colours to black */ - for (i=0; i<768; i++) i810c->vga.ModeReg.DAC[i] = 0x00; - - /* ... and the overscan */ - if (screen->fb[0].depth >= 4) - i810c->vga.ModeReg.Attribute[OVERSCAN] = 0xFF; - - /* Could be made a command-line option */ - -#ifdef I810CFG_SHOW_OVERSCAN - i810c->vga.ModeReg.DAC[765] = 0x3F; - i810c->vga.ModeReg.DAC[766] = 0x00; - i810c->vga.ModeReg.DAC[767] = 0x3F; - i810c->vga.ModeReg.Attribute[OVERSCAN] = 0xFF; - i810c->vga.ShowOverscan = TRUE; -#else - i810c->vga.ShowOverscan = FALSE; -#endif - - i810c->vga.paletteEnabled = FALSE; - i810c->vga.cmapSaved = FALSE; - i810c->vga.MMIOBase = i810c->MMIOBase; - - i810c->cpp = screen->fb[0].bitsPerPixel/8; - - /* move to initscreen? */ - - switch (screen->fb[0].bitsPerPixel) { - case 8: - i810c->MaxClock = 203000; - break; - case 16: - i810c->MaxClock = 163000; - break; - case 24: - i810c->MaxClock = 136000; - break; - case 32: /* not supported */ - i810c->MaxClock = 86000; - default: - fprintf(stderr,"Unsupported bpp %d\n",screen->fb[0].bitsPerPixel); - return FALSE; - } - - if (!i810AllocateGARTMemory( screen )) { - return FALSE; - } - - i810AllocateFront(screen); - - /* Map LpRing memory */ - if (!i810MapMem(screen)) return FALSE; - - screen->fb[0].frameBuffer = i810c->FbBase; - - screen->driver = i810s; - - return TRUE; -} - -/* - * I810Save -- - * - * This function saves the video state. It reads all of the SVGA registers - * into the vgaI810Rec data structure. There is in general no need to - * mask out bits here - just read the registers. - */ -static void -DoSave(KdCardInfo *card, vgaRegPtr vgaReg, I810RegPtr i810Reg, Bool saveFonts) -{ - - I810CardInfo *i810c = card->driver; - i810VGAPtr vgap = &i810c->vga; - - int i; - - /* Save VGA registers */ - - vgaReg->MiscOutReg = mmioReadMiscOut(vgap); - if (vgaReg->MiscOutReg & 0x01) - vgap->IOBase = VGA_IOBASE_COLOR; - else - vgap->IOBase = VGA_IOBASE_MONO; - - for (i = 0; i < VGA_NUM_CRTC; i++) { - vgaReg->CRTC[i] = mmioReadCrtc(vgap, i); - } - - mmioEnablePalette(vgap); - for (i = 0; i < VGA_NUM_ATTR; i++) { - vgaReg->Attribute[i] = mmioReadAttr(vgap, i); - } - mmioDisablePalette(vgap); - - for (i = 0; i < VGA_NUM_GFX; i++) { - vgaReg->Graphics[i] = mmioReadGr(vgap, i); - } - - for (i = 1; i < VGA_NUM_SEQ; i++) { - vgaReg->Sequencer[i] = mmioReadSeq(vgap, i); - } - - /* - * The port I/O code necessary to read in the extended registers - * into the fields of the I810Rec structure goes here. - */ - i810Reg->IOControl = mmioReadCrtc(vgap, IO_CTNL); - i810Reg->AddressMapping = i810ReadControlMMIO(i810c, GRX, ADDRESS_MAPPING); - i810Reg->BitBLTControl = INREG8(BITBLT_CNTL); - i810Reg->VideoClk2_M = INREG16(VCLK2_VCO_M); - i810Reg->VideoClk2_N = INREG16(VCLK2_VCO_N); - i810Reg->VideoClk2_DivisorSel = INREG8(VCLK2_VCO_DIV_SEL); - - i810Reg->ExtVertTotal=mmioReadCrtc(vgap, EXT_VERT_TOTAL); - i810Reg->ExtVertDispEnd=mmioReadCrtc(vgap, EXT_VERT_DISPLAY); - i810Reg->ExtVertSyncStart=mmioReadCrtc(vgap, EXT_VERT_SYNC_START); - i810Reg->ExtVertBlankStart=mmioReadCrtc(vgap, EXT_VERT_BLANK_START); - i810Reg->ExtHorizTotal=mmioReadCrtc(vgap, EXT_HORIZ_TOTAL); - i810Reg->ExtHorizBlank=mmioReadCrtc(vgap, EXT_HORIZ_BLANK); - i810Reg->ExtOffset=mmioReadCrtc(vgap, EXT_OFFSET); - i810Reg->InterlaceControl=mmioReadCrtc(vgap, INTERLACE_CNTL); - - i810Reg->PixelPipeCfg0 = INREG8(PIXPIPE_CONFIG_0); - i810Reg->PixelPipeCfg1 = INREG8(PIXPIPE_CONFIG_1); - i810Reg->PixelPipeCfg2 = INREG8(PIXPIPE_CONFIG_2); - i810Reg->DisplayControl = INREG8(DISPLAY_CNTL); - i810Reg->LMI_FIFO_Watermark = INREG(FWATER_BLC); - - for (i = 0 ; i < 8 ; i++) - i810Reg->Fence[i] = INREG(FENCE+i*4); - - i810Reg->LprbTail = INREG(LP_RING + RING_TAIL); - i810Reg->LprbHead = INREG(LP_RING + RING_HEAD); - i810Reg->LprbStart = INREG(LP_RING + RING_START); - i810Reg->LprbLen = INREG(LP_RING + RING_LEN); - - if ((i810Reg->LprbTail & TAIL_ADDR) != (i810Reg->LprbHead & HEAD_ADDR) && - i810Reg->LprbLen & RING_VALID) { - i810PrintErrorState( i810c ); - FatalError( "Active ring not flushed\n"); - } - - if (I810_DEBUG) { - fprintf(stderr,"Got mode in I810Save:\n"); - i810PrintMode( vgaReg, i810Reg ); - } -} - -static void -i810Preserve(KdCardInfo *card) -{ - I810CardInfo *i810c = card->driver; - i810VGAPtr vgap = &i810c->vga; - -/* fprintf(stderr,"i810Preserve\n"); */ - DoSave(card, &vgap->SavedReg, &i810c->SavedReg, TRUE); -} - -/* Famous last words - */ -void -i810PrintErrorState(i810CardInfo *i810c) -{ - - fprintf(stderr, "pgetbl_ctl: 0x%lx pgetbl_err: 0x%lx\n", - INREG(PGETBL_CTL), - INREG(PGE_ERR)); - - fprintf(stderr, "ipeir: %lx iphdr: %lx\n", - INREG(IPEIR), - INREG(IPEHR)); - - fprintf(stderr, "LP ring tail: %lx head: %lx len: %lx start %lx\n", - INREG(LP_RING + RING_TAIL), - INREG(LP_RING + RING_HEAD) & HEAD_ADDR, - INREG(LP_RING + RING_LEN), - INREG(LP_RING + RING_START)); - - fprintf(stderr, "eir: %x esr: %x emr: %x\n", - INREG16(EIR), - INREG16(ESR), - INREG16(EMR)); - - fprintf(stderr, "instdone: %x instpm: %x\n", - INREG16(INST_DONE), - INREG8(INST_PM)); - - fprintf(stderr, "memmode: %lx instps: %lx\n", - INREG(MEMMODE), - INREG(INST_PS)); - - fprintf(stderr, "hwstam: %x ier: %x imr: %x iir: %x\n", - INREG16(HWSTAM), - INREG16(IER), - INREG16(IMR), - INREG16(IIR)); -} - -static Bool -i810BindGARTMemory( KdScreenInfo *screen ) -{ - - KdCardInfo *card = screen->card; - I810CardInfo *i810c = card->driver; - - if (!i810c->GttBound) { - if (!KdAcquireGART(screen->mynum)) - return FALSE; - if (!KdBindGARTMemory(screen->mynum, i810c->VramKey, - i810c->VramOffset)) - - return FALSE; - if (i810c->DcacheKey != -1) { - if (!KdBindGARTMemory(screen->mynum, i810c->DcacheKey, - i810c->DcacheOffset)) - return FALSE; - } - if (i810c->HwcursKey != -1) { - if (!KdBindGARTMemory(screen->mynum, i810c->HwcursKey, - i810c->HwcursOffset)) - return FALSE; - } - i810c->GttBound = 1; - } - return TRUE; -} - -static Bool -i810UnbindGARTMemory(KdScreenInfo *screen) -{ - KdCardInfo *card = screen->card; - I810CardInfo *i810c = card->driver; - - - if (KdAgpGARTSupported() && i810c->GttBound) { - if (!KdUnbindGARTMemory(screen->mynum, i810c->VramKey)) - return FALSE; - if (i810c->DcacheKey != -1) { - if (!KdUnbindGARTMemory(screen->mynum, i810c->DcacheKey)) - return FALSE; - } - if (i810c->HwcursKey != -1) { - if (!KdUnbindGARTMemory(screen->mynum, i810c->HwcursKey)) - return FALSE; - } - if (!KdReleaseGART(screen->mynum)) - return FALSE; - i810c->GttBound = 0; - } - return TRUE; -} - -/* - * I810CalcVCLK -- - * - * Determine the closest clock frequency to the one requested. - */ - -#define MAX_VCO_FREQ 600.0 -#define TARGET_MAX_N 30 -#define REF_FREQ 24.0 - -#define CALC_VCLK(m,n,p) \ - (double)m / ((double)n * (1 << p)) * 4 * REF_FREQ - -static void -i810CalcVCLK( KdScreenInfo *screen, double freq ) -{ - - KdCardInfo *card = screen->card; - I810CardInfo *i810c = card->driver; - I810RegPtr i810Reg = &i810c->ModeReg; - - int m, n, p; - double f_out, f_best; - double f_err; - double f_vco; - int m_best = 0, n_best = 0, p_best = 0; - double f_target = freq; - double err_max = 0.005; - double err_target = 0.001; - double err_best = 999999.0; - - p_best = p = log(MAX_VCO_FREQ/f_target)/log((double)2); - f_vco = f_target * (1 << p); - - n = 2; - do { - n++; - m = f_vco / (REF_FREQ / (double)n) / (double)4.0 + 0.5; - if (m < 3) m = 3; - f_out = CALC_VCLK(m,n,p); - f_err = 1.0 - (f_target/f_out); - if (fabs(f_err) < err_max) { - m_best = m; - n_best = n; - f_best = f_out; - err_best = f_err; - } - } while ((fabs(f_err) >= err_target) && - ((n <= TARGET_MAX_N) || (fabs(err_best) > err_max))); - - if (fabs(f_err) < err_target) { - m_best = m; - n_best = n; - } - - i810Reg->VideoClk2_M = (m_best-2) & 0x3FF; - i810Reg->VideoClk2_N = (n_best-2) & 0x3FF; - i810Reg->VideoClk2_DivisorSel = (p_best << 4); - -/* fprintf(stderr, "Setting dot clock to %.1f MHz " */ -/* "[ 0x%x 0x%x 0x%x ] " */ -/* "[ %d %d %d ]\n", */ -/* CALC_VCLK(m_best,n_best,p_best), */ -/* i810Reg->VideoClk2_M, */ -/* i810Reg->VideoClk2_N, */ -/* i810Reg->VideoClk2_DivisorSel, */ -/* m_best, n_best, p_best); */ -} - -/* - * I810CalcFIFO -- - * - * Calculate burst length and FIFO watermark. - */ - -#define Elements(x) (sizeof(x)/sizeof(*x)) - -static unsigned int -i810CalcWatermark( KdScreenInfo *screen, double freq, Bool dcache ) -{ - - KdCardInfo *card = screen->card; - I810CardInfo *i810c = card->driver; - - - struct wm_info *tab; - int nr; - int i; - - if (i810c->LmFreqSel == 100) { - switch(screen->fb[0].bitsPerPixel) { - case 8: - tab = i810_wm_8_100; - nr = Elements(i810_wm_8_100); - break; - case 16: - tab = i810_wm_16_100; - nr = Elements(i810_wm_16_100); - break; - case 24: - tab = i810_wm_24_100; - nr = Elements(i810_wm_24_100); - break; - default: - return 0; - } - } else { - switch(screen->fb[0].bitsPerPixel) { - case 8: - tab = i810_wm_8_133; - nr = Elements(i810_wm_8_133); - break; - case 16: - tab = i810_wm_16_133; - nr = Elements(i810_wm_16_133); - break; - case 24: - tab = i810_wm_24_133; - nr = Elements(i810_wm_24_133); - break; - default: - return 0; - } - } - - for (i = 0 ; i < nr && tab[i].freq < freq ; i++); - - if (i == nr) - i--; - -/* fprintf(stderr,"chose watermark 0x%x: (tab.freq %.1f)\n", */ -/* tab[i].wm, tab[i].freq); */ - - /* None of these values (sourced from intel) have watermarks for - * the dcache memory. Fake it for now by using the same watermark - * for both... - * - * Update: this is probably because dcache isn't real useful as - * framebuffer memory, so intel's drivers don't need watermarks - * for that memory because they never use it to feed the ramdacs. - * We do use it in the fallback mode, so keep the watermarks for - * now. - */ - if (dcache) - return (tab[i].wm & ~0xffffff) | ((tab[i].wm>>12) & 0xfff); - else - return tab[i].wm; -} - -static void i810PrintMode( vgaRegPtr vgaReg, I810RegPtr mode ) -{ - int i; - - fprintf(stderr," MiscOut: %x\n", vgaReg->MiscOutReg); - - - fprintf(stderr,"SEQ: "); - for (i = 0 ; i < VGA_NUM_SEQ ; i++) { - if ((i&7)==0) fprintf(stderr,"\n"); - fprintf(stderr," %d: %x", i, vgaReg->Sequencer[i]); - } - fprintf(stderr,"\n"); - - fprintf(stderr,"CRTC: "); - for (i = 0 ; i < VGA_NUM_CRTC ; i++) { - if ((i&3)==0) fprintf(stderr,"\n"); - fprintf(stderr," CR%02x: %2x", i, vgaReg->CRTC[i]); - } - fprintf(stderr,"\n"); - - fprintf(stderr,"GFX: "); - for (i = 0 ; i < VGA_NUM_GFX ; i++) { - if ((i&3)==0) fprintf(stderr,"\n"); - fprintf(stderr," GR%02x: %02x", i, vgaReg->Graphics[i]); - } - fprintf(stderr,"\n"); - - fprintf(stderr,"ATTR: "); - for (i = 0 ; i < VGA_NUM_ATTR ; i++) { - if ((i&7)==0) fprintf(stderr,"\n"); - fprintf(stderr," %d: %x", i, vgaReg->Attribute[i]); - } - fprintf(stderr,"\n"); - - - fprintf(stderr," DisplayControl: %x\n", mode->DisplayControl); - fprintf(stderr," PixelPipeCfg0: %x\n", mode->PixelPipeCfg0); - fprintf(stderr," PixelPipeCfg1: %x\n", mode->PixelPipeCfg1); - fprintf(stderr," PixelPipeCfg2: %x\n", mode->PixelPipeCfg2); - fprintf(stderr," VideoClk2_M: %x\n", mode->VideoClk2_M); - fprintf(stderr," VideoClk2_N: %x\n", mode->VideoClk2_N); - fprintf(stderr," VideoClk2_DivisorSel: %x\n", mode->VideoClk2_DivisorSel); - fprintf(stderr," AddressMapping: %x\n", mode->AddressMapping); - fprintf(stderr," IOControl: %x\n", mode->IOControl); - fprintf(stderr," BitBLTControl: %x\n", mode->BitBLTControl); - fprintf(stderr," ExtVertTotal: %x\n", mode->ExtVertTotal); - fprintf(stderr," ExtVertDispEnd: %x\n", mode->ExtVertDispEnd); - fprintf(stderr," ExtVertSyncStart: %x\n", mode->ExtVertSyncStart); - fprintf(stderr," ExtVertBlankStart: %x\n", mode->ExtVertBlankStart); - fprintf(stderr," ExtHorizTotal: %x\n", mode->ExtHorizTotal); - fprintf(stderr," ExtHorizBlank: %x\n", mode->ExtHorizBlank); - fprintf(stderr," ExtOffset: %x\n", mode->ExtOffset); - fprintf(stderr," InterlaceControl: %x\n", mode->InterlaceControl); - fprintf(stderr," LMI_FIFO_Watermark: %x\n", mode->LMI_FIFO_Watermark); - fprintf(stderr," LprbTail: %x\n", mode->LprbTail); - fprintf(stderr," LprbHead: %x\n", mode->LprbHead); - fprintf(stderr," LprbStart: %x\n", mode->LprbStart); - fprintf(stderr," LprbLen: %x\n", mode->LprbLen); - fprintf(stderr," OverlayActiveStart: %x\n", mode->OverlayActiveStart); - fprintf(stderr," OverlayActiveEnd: %x\n", mode->OverlayActiveEnd); -} - - -/* - * i810VGASeqReset - * perform a sequencer reset. - * - * The i815 documentation states that these bits are not used by the - * HW, but still warns about not programming them... - */ - -static void -i810VGASeqReset(i810VGAPtr vgap, Bool start) -{ - if (start) - { - mmioWriteSeq(vgap, 0x00, 0x01); /* Synchronous Reset */ - } - else - { - mmioWriteSeq(vgap, 0x00, 0x03); /* End Reset */ - } -} - -static void -i810VGAProtect(KdCardInfo *card, Bool on) -{ - - I810CardInfo *i810c = card->driver; - i810VGAPtr vgap = &i810c->vga; - - unsigned char tmp; - - if (on) { - /* - * Turn off screen and disable sequencer. - */ - tmp = mmioReadSeq(vgap, 0x01); - - i810VGASeqReset(vgap, TRUE); /* start synchronous reset */ - mmioWriteSeq(vgap, 0x01, tmp | 0x20); /* disable the display */ - - mmioEnablePalette(vgap); - } else { - /* - * Reenable sequencer, then turn on screen. - */ - - tmp = mmioReadSeq(vgap, 0x01); - - mmioWriteSeq(vgap, 0x01, tmp & ~0x20); /* reenable display */ - i810VGASeqReset(vgap, FALSE); /* clear synchronousreset */ - - mmioDisablePalette(vgap); - } -} - -/* - * i810VGABlankScreen -- blank the screen. - */ - -void -i810VGABlankScreen(KdCardInfo *card, Bool on) -{ - I810CardInfo *i810c = card->driver; - i810VGAPtr vgap = &i810c->vga; - - unsigned char scrn; - - scrn = mmioReadSeq(vgap, 0x01); - - if (on) { - scrn &= ~0x20; /* enable screen */ - } else { - scrn |= 0x20; /* blank screen */ - } - - mmioWriteSeq(vgap,0x00,0x01); - mmioWriteSeq(vgap, 0x01, scrn); /* change mode */ - mmioWriteSeq(vgap,0x00,0x03); -} - -/* Restore hardware state */ - -static void -DoRestore(KdCardInfo *card, vgaRegPtr vgaReg, I810RegPtr i810Reg, - Bool restoreFonts) { - - - I810CardInfo *i810c = card->driver; - - i810VGAPtr vgap = &i810c->vga; - - unsigned char temp; - unsigned int itemp; - int i; - - if (I810_DEBUG & DEBUG_VERBOSE_VGA) { - fprintf(stderr,"Setting mode in DoRestore:\n"); - i810PrintMode( vgaReg, i810Reg ); - } - - /* Blank screen (i810vgaprotect) */ - i810VGAProtect(card, TRUE); - - /* Should wait for at least two hsync and no more than two vsync - before writing PIXCONF and turning the display on (?) */ - usleep(50000); - - /* Turn off DRAM Refresh */ - temp = INREG8( DRAM_ROW_CNTL_HI ); - temp &= ~DRAM_REFRESH_RATE; - temp |= DRAM_REFRESH_DISABLE; - OUTREG8( DRAM_ROW_CNTL_HI, temp ); - - usleep(1000); /* Wait 1 ms */ - - /* Write the M, N and P values */ - OUTREG16( VCLK2_VCO_M, i810Reg->VideoClk2_M); - OUTREG16( VCLK2_VCO_N, i810Reg->VideoClk2_N); - OUTREG8( VCLK2_VCO_DIV_SEL, i810Reg->VideoClk2_DivisorSel); - - /* - * Turn on 8 bit dac mode, if requested. This is needed to make - * sure that vgaHWRestore writes the values into the DAC properly. - * The problem occurs if 8 bit dac mode is requested and the HW is - * in 6 bit dac mode. If this happens, all the values are - * automatically shifted left twice by the HW and incorrect colors - * will be displayed on the screen. The only time this can happen - * is at server startup time and when switching back from a VT. - */ - temp = INREG8(PIXPIPE_CONFIG_0); - temp &= 0x7F; /* Save all but the 8 bit dac mode bit */ - temp |= (i810Reg->PixelPipeCfg0 & DAC_8_BIT); - OUTREG8( PIXPIPE_CONFIG_0, temp ); - - /* - * Code to restore any SVGA registers that have been saved/modified - * goes here. Note that it is allowable, and often correct, to - * only modify certain bits in a register by a read/modify/write cycle. - * - * A special case - when using an external clock-setting program, - * this function must not change bits associated with the clock - * selection. This condition can be checked by the condition: - * - * if (i810Reg->std.NoClock >= 0) - * restore clock-select bits. - */ - - /* VGA restore */ - if (vgaReg->MiscOutReg & 0x01) - vgap->IOBase = VGA_IOBASE_COLOR; - else - vgap->IOBase = VGA_IOBASE_MONO; - - mmioWriteMiscOut(vgap, vgaReg->MiscOutReg); - - for (i = 1; i < VGA_NUM_SEQ; i++) - mmioWriteSeq(vgap, i, vgaReg->Sequencer[i]); - - /* Ensure CRTC registers 0-7 are unlocked by clearing bit 7 or CRTC[17] */ - /* = CR11 */ - mmioWriteCrtc(vgap, 17, vgaReg->CRTC[17] & ~0x80); - - for (i = 0; i < VGA_NUM_CRTC; i++) { - mmioWriteCrtc(vgap, i, vgaReg->CRTC[i]); - } - - for (i = 0; i < VGA_NUM_GFX; i++) - mmioWriteGr(vgap, i, vgaReg->Graphics[i]); - - mmioEnablePalette(vgap); - for (i = 0; i < VGA_NUM_ATTR; i++) - mmioWriteAttr(vgap, i, vgaReg->Attribute[i]); - mmioDisablePalette(vgap); - - - mmioWriteCrtc(vgap, EXT_VERT_TOTAL, i810Reg->ExtVertTotal); - mmioWriteCrtc(vgap, EXT_VERT_DISPLAY, i810Reg->ExtVertDispEnd); - mmioWriteCrtc(vgap, EXT_VERT_SYNC_START, i810Reg->ExtVertSyncStart); - mmioWriteCrtc(vgap, EXT_VERT_BLANK_START, i810Reg->ExtVertBlankStart); - mmioWriteCrtc(vgap, EXT_HORIZ_TOTAL, i810Reg->ExtHorizTotal); - mmioWriteCrtc(vgap, EXT_HORIZ_BLANK, i810Reg->ExtHorizBlank); - - /* write CR40, CR42 first etc to get CR13 written as described in PRM */ - - mmioWriteCrtc(vgap, EXT_START_ADDR_HI, 0); - mmioWriteCrtc(vgap, EXT_START_ADDR, EXT_START_ADDR_ENABLE); - - mmioWriteCrtc(vgap, EXT_OFFSET, i810Reg->ExtOffset); - mmioWriteCrtc(vgap, 0x13, vgaReg->CRTC[0x13]); - - temp=mmioReadCrtc(vgap, INTERLACE_CNTL); - temp &= ~INTERLACE_ENABLE; - temp |= i810Reg->InterlaceControl; - mmioWriteCrtc(vgap, INTERLACE_CNTL, temp); - - temp=i810ReadControlMMIO(i810c, GRX, ADDRESS_MAPPING); - temp &= 0xE0; /* Save reserved bits 7:5 */ - temp |= i810Reg->AddressMapping; - i810WriteControlMMIO(i810c, GRX, ADDRESS_MAPPING, temp); - - /* Setting the OVRACT Register for video overlay*/ - OUTREG(0x6001C, (i810Reg->OverlayActiveEnd << 16) | i810Reg->OverlayActiveStart); - - /* Turn on DRAM Refresh */ - temp = INREG8( DRAM_ROW_CNTL_HI ); - temp &= ~DRAM_REFRESH_RATE; - temp |= DRAM_REFRESH_60HZ; - OUTREG8( DRAM_ROW_CNTL_HI, temp ); - - temp = INREG8( BITBLT_CNTL ); - temp &= ~COLEXP_MODE; - temp |= i810Reg->BitBLTControl; - OUTREG8( BITBLT_CNTL, temp ); - - temp = INREG8( DISPLAY_CNTL ); - temp &= ~(VGA_WRAP_MODE | GUI_MODE); - temp |= i810Reg->DisplayControl; - OUTREG8( DISPLAY_CNTL, temp ); - - - temp = INREG8( PIXPIPE_CONFIG_0 ); - temp &= 0x64; /* Save reserved bits 6:5,2 */ - temp |= i810Reg->PixelPipeCfg0; - OUTREG8( PIXPIPE_CONFIG_0, temp ); - - temp = INREG8( PIXPIPE_CONFIG_2 ); - temp &= 0xF3; /* Save reserved bits 7:4,1:0 */ - temp |= i810Reg->PixelPipeCfg2; - OUTREG8( PIXPIPE_CONFIG_2, temp ); - - temp = INREG8( PIXPIPE_CONFIG_1 ); - temp &= ~DISPLAY_COLOR_MODE; - temp &= 0xEF; /* Restore the CRT control bit */ - temp |= i810Reg->PixelPipeCfg1; - OUTREG8( PIXPIPE_CONFIG_1, temp ); - - OUTREG16(EIR, 0); - - itemp = INREG(FWATER_BLC); - itemp &= ~(LM_BURST_LENGTH | LM_FIFO_WATERMARK | - MM_BURST_LENGTH | MM_FIFO_WATERMARK ); - itemp |= i810Reg->LMI_FIFO_Watermark; - OUTREG(FWATER_BLC, itemp); - - - for (i = 0 ; i < 8 ; i++) { - OUTREG( FENCE+i*4, i810Reg->Fence[i] ); - if (I810_DEBUG & DEBUG_VERBOSE_VGA) - fprintf(stderr,"Fence Register : %x\n", i810Reg->Fence[i]); - } - - /* First disable the ring buffer (Need to wait for empty first?, if so - * should probably do it before entering this section) - */ - itemp = INREG(LP_RING + RING_LEN); - itemp &= ~RING_VALID_MASK; - OUTREG(LP_RING + RING_LEN, itemp ); - - /* Set up the low priority ring buffer. - */ - OUTREG(LP_RING + RING_TAIL, 0 ); - OUTREG(LP_RING + RING_HEAD, 0 ); - - i810c->LpRing.head = 0; - i810c->LpRing.tail = 0; - - itemp = INREG(LP_RING + RING_START); - itemp &= ~(START_ADDR); - itemp |= i810Reg->LprbStart; - OUTREG(LP_RING + RING_START, itemp ); - - itemp = INREG(LP_RING + RING_LEN); - itemp &= ~(RING_NR_PAGES | RING_REPORT_MASK | RING_VALID_MASK); - itemp |= i810Reg->LprbLen; - OUTREG(LP_RING + RING_LEN, itemp ); - - i810VGAProtect(card, FALSE); - - temp=mmioReadCrtc(vgap, IO_CTNL); - temp &= ~(EXTENDED_ATTR_CNTL | EXTENDED_CRTC_CNTL); - temp |= i810Reg->IOControl; - mmioWriteCrtc(vgap, IO_CTNL, temp); - /* Protect CRTC[0-7] */ - mmioWriteCrtc(vgap, 0x11, mmioReadCrtc(vgap, 0x11) | 0x80); -} - - -static Bool -i810SetMode(KdScreenInfo *screen, const KdMonitorTiming *t) -{ - - KdCardInfo *card = screen->card; - I810CardInfo *i810c = card->driver; - i810VGAPtr vgap = &i810c->vga; - - I810RegPtr i810Reg = &i810c->ModeReg; - vgaRegPtr pVga = &vgap->ModeReg; - - double dclk = t->clock/1000.0; - - switch (screen->fb[0].bitsPerPixel) { - case 8: - pVga->CRTC[0x13] = screen->width >> 3; - i810Reg->ExtOffset = screen->width >> 11; - i810Reg->PixelPipeCfg1 = DISPLAY_8BPP_MODE; - i810Reg->BitBLTControl = COLEXP_8BPP; - break; - case 16: - i810Reg->PixelPipeCfg1 = DISPLAY_16BPP_MODE; - pVga->CRTC[0x13] = screen->width >> 2; - i810Reg->ExtOffset = screen->width >> 10; - i810Reg->BitBLTControl = COLEXP_16BPP; - break; - case 24: - pVga->CRTC[0x13] = (screen->width * 3) >> 3; - i810Reg->ExtOffset = (screen->width * 3) >> 11; - - i810Reg->PixelPipeCfg1 = DISPLAY_24BPP_MODE; - i810Reg->BitBLTControl = COLEXP_24BPP; - break; - default: - break; - } - - i810Reg->PixelPipeCfg0 = DAC_8_BIT; - - /* Do not delay CRT Blank: needed for video overlay */ - i810Reg->PixelPipeCfg1 |= 0x10; - - /* Turn on Extended VGA Interpretation */ - i810Reg->IOControl = EXTENDED_CRTC_CNTL; - - /* Turn on linear and page mapping */ - i810Reg->AddressMapping = (LINEAR_MODE_ENABLE | - GTT_MEM_MAP_ENABLE); - - /* Turn on GUI mode */ - i810Reg->DisplayControl = HIRES_MODE; - - i810Reg->OverlayActiveStart = t->horizontal + t->hblank - 32; - i810Reg->OverlayActiveEnd = t->horizontal - 32; - - /* Turn on interlaced mode if necessary (it's not) */ - i810Reg->InterlaceControl = INTERLACE_DISABLE; - - /* - * Set the overscan color to 0. - * NOTE: This only affects >8bpp mode. - */ - pVga->Attribute[0x11] = 0; - - /* - * Calculate the VCLK that most closely matches the requested dot - * clock. - */ - i810CalcVCLK(screen, dclk); - - /* Since we program the clocks ourselves, always use VCLK2. */ - pVga->MiscOutReg |= 0x0C; - - /* Calculate the FIFO Watermark and Burst Length. */ - i810Reg->LMI_FIFO_Watermark = i810CalcWatermark(screen, dclk, FALSE); - - /* Setup the ring buffer */ - i810Reg->LprbTail = 0; - i810Reg->LprbHead = 0; - i810Reg->LprbStart = i810c->LpRing.mem.Start; - - if (i810Reg->LprbStart) - i810Reg->LprbLen = ((i810c->LpRing.mem.Size-4096) | - RING_NO_REPORT | RING_VALID); - else - i810Reg->LprbLen = RING_INVALID; - - return TRUE; -} - -static Bool -i810ModeInit(KdScreenInfo *screen, const KdMonitorTiming *t) -{ - - KdCardInfo *card = screen->card; - I810CardInfo *i810c = card->driver; - i810VGAPtr vgap = &i810c->vga; - vgaRegPtr pVga; - -/* fprintf(stderr,"i810ModeInit\n"); */ - - i810VGAUnlock(vgap); - - if (!i810VGAInit(screen, t)) return FALSE; - pVga = &vgap->ModeReg; - - if (!i810SetMode(screen, t)) return FALSE; - - DoRestore(screen->card, &vgap->ModeReg, &i810c->ModeReg, FALSE); - - return TRUE; -} - -Bool -i810VGAInit(KdScreenInfo *screen, const KdMonitorTiming *t) -{ - unsigned int i; - - int hactive, hblank, hbp, hfp; - int vactive, vblank, vbp, vfp; - int h_screen_off = 0, h_adjust = 0, h_total, h_display_end, h_blank_start; - int h_blank_end, h_sync_start, h_sync_end, v_total, v_retrace_start; - int v_retrace_end, v_display_end, v_blank_start, v_blank_end; - - KdCardInfo *card = screen->card; - I810CardInfo *i810c = card->driver; - - i810VGAPtr vgap = &i810c->vga; - I810RegPtr ireg = &i810c->ModeReg; - - - vgaRegPtr regp; - int depth = screen->fb[0].depth; - - regp = &vgap->ModeReg; - - /* - * compute correct Hsync & Vsync polarity - */ - - regp->MiscOutReg = 0x23; - if (t->vpol == KdSyncNegative) regp->MiscOutReg |= 0x40; - if (t->hpol == KdSyncNegative) regp->MiscOutReg |= 0x80; - - /* - * Time Sequencer - */ - if (depth == 4) - regp->Sequencer[0] = 0x02; - else - regp->Sequencer[0] = 0x00; - /* No support for 320 or 360 x resolution */ - regp->Sequencer[1] = 0x01; - - if (depth == 1) - regp->Sequencer[2] = 1 << BIT_PLANE; - else - regp->Sequencer[2] = 0x0F; - - regp->Sequencer[3] = 0x00; /* Font select */ - - if (depth < 8) - regp->Sequencer[4] = 0x06; /* Misc */ - else - regp->Sequencer[4] = 0x0E; /* Misc */ - - hactive = t->horizontal; - hblank = t->hblank; - hbp = t->hbp; - hfp = t->hfp; - - vactive = t->vertical; - vblank = t->vblank; - vbp = t->vbp; - vfp = t->vfp; - - switch (screen->fb[0].bitsPerPixel) { - case 8: - hactive /= 8; - hblank /= 8; - hfp /= 8; - hbp /= 8; - h_screen_off = hactive; - h_adjust = 1; - break; - case 16: - hactive /= 8; - hblank /= 8; - hfp /= 8; - hbp /= 8; - - h_screen_off = hactive * 2; - h_adjust = 1; - break; - case 24: - hactive /= 8; - hblank /= 8; - hfp /= 8; - hbp /= 8; - - h_screen_off = hactive * 3; - h_adjust = 1; - break; - case 32: - hactive /= 8; - hblank /= 8; - hfp /= 8; - hbp /= 8; - - h_screen_off = hactive * 4; - h_adjust = 1; - break; - } - - /* - * Compute horizontal register values from timings - */ - h_total = hactive + hblank - 5; - h_display_end = hactive - 1; - h_blank_start = h_display_end; - h_blank_end = h_blank_start + hblank; - - h_sync_start = hactive + hfp + h_adjust; - h_sync_end = h_sync_start + hblank - hbp - hfp; - - /* Set CRTC regs for horizontal timings */ - regp->CRTC[0x0] = h_total; - ireg->ExtHorizTotal=(h_total & 0x100) >> 8; - - regp->CRTC[0x1] = h_display_end; - - regp->CRTC[0x2] = h_blank_start; - - regp->CRTC[0x3] = 0x80 | (h_blank_end & 0x1f); - regp->CRTC[0x5] = (h_blank_end & 0x20) << 2; - - regp->CRTC[0x4] = h_sync_start; - - regp->CRTC[0x5] |= h_sync_end & 0x1f; - - regp->CRTC[0x13] = h_screen_off; - ireg->ExtOffset = h_screen_off >> 8; - - /* Compute vertical timings */ - v_total = vactive + vblank - 2; - v_retrace_start = vactive + vfp - 1; - v_retrace_end = v_retrace_start + vblank - vbp - vfp; - v_display_end = vactive - 1; - v_blank_start = vactive - 1; - v_blank_end = v_blank_start + vblank /* - 1 */; - - regp->CRTC[0x6] = v_total; - ireg->ExtVertTotal = v_total >> 8; - - regp->CRTC[0x10] = v_retrace_start; - ireg->ExtVertSyncStart = v_retrace_start >> 8; - - regp->CRTC[0x11] = v_retrace_end; - - regp->CRTC[0x12] = v_display_end; - ireg->ExtVertDispEnd = v_display_end >> 8; - - regp->CRTC[0x15] = v_blank_start; - ireg->ExtVertBlankStart = v_blank_start >> 8; - - regp->CRTC[0x16] = v_blank_end; - - if (depth < 8) - regp->CRTC[23] = 0xE3; - else - regp->CRTC[23] = 0xC3; - regp->CRTC[24] = 0xFF; - - /* - * Graphics Display Controller - */ - regp->Graphics[0] = 0x00; - regp->Graphics[1] = 0x00; - regp->Graphics[2] = 0x00; - regp->Graphics[3] = 0x00; - if (depth == 1) { - regp->Graphics[4] = BIT_PLANE; - regp->Graphics[5] = 0x00; - } else { - regp->Graphics[4] = 0x00; - if (depth == 4) - regp->Graphics[5] = 0x02; - else - regp->Graphics[5] = 0x40; - } - regp->Graphics[6] = 0x05; - regp->Graphics[7] = 0x0F; - regp->Graphics[8] = 0xFF; - - if (depth == 1) { - /* Initialise the Mono map according to which bit-plane gets used */ - - Bool flipPixels = FALSE; /* maybe support this in the future? */ - - for (i=0; i<16; i++) - if (((i & (1 << BIT_PLANE)) != 0) != flipPixels) - regp->Attribute[i] = WHITE_VALUE; - else - regp->Attribute[i] = BLACK_VALUE; - - regp->Attribute[16] = 0x01; /* -VGA2- */ - if (!vgap->ShowOverscan) - regp->Attribute[OVERSCAN] = OVERSCAN_VALUE; /* -VGA2- */ - } else { - regp->Attribute[0] = 0x00; /* standard colormap translation */ - regp->Attribute[1] = 0x01; - regp->Attribute[2] = 0x02; - regp->Attribute[3] = 0x03; - regp->Attribute[4] = 0x04; - regp->Attribute[5] = 0x05; - regp->Attribute[6] = 0x06; - regp->Attribute[7] = 0x07; - regp->Attribute[8] = 0x08; - regp->Attribute[9] = 0x09; - regp->Attribute[10] = 0x0A; - regp->Attribute[11] = 0x0B; - regp->Attribute[12] = 0x0C; - regp->Attribute[13] = 0x0D; - regp->Attribute[14] = 0x0E; - regp->Attribute[15] = 0x0F; - if (depth == 4) - regp->Attribute[16] = 0x81; - else - regp->Attribute[16] = 0x41; - /* Attribute[17] (overscan) was initialised earlier */ - } - regp->Attribute[18] = 0x0F; - regp->Attribute[19] = 0x00; - regp->Attribute[20] = 0x00; - - return(TRUE); -} - -void -i810VGALock(i810VGAPtr vgap) -{ - /* Protect CRTC[0-7] */ - mmioWriteCrtc(vgap, 0x11, mmioReadCrtc(vgap, 0x11) & ~0x80); -} - -void -i810VGAUnlock(i810VGAPtr vgap) -{ - /* Unprotect CRTC[0-7] */ - mmioWriteCrtc(vgap, 0x11, mmioReadCrtc(vgap, 0x11) | 0x80); -} - -static void -i810Restore(KdCardInfo *card) { - - I810CardInfo *i810c = card->driver; - - i810VGAPtr vgap = &i810c->vga; - - if (I810_DEBUG) - fprintf(stderr,"i810Restore\n"); - - DoRestore(card, &vgap->SavedReg, &i810c->SavedReg, TRUE); -} - -static Bool -i810Enable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - KdCardInfo *card = pScreenPriv->card; - I810CardInfo *i810c = card->driver; - i810VGAPtr vgap = &i810c->vga; - const KdMonitorTiming *t; - - if (I810_DEBUG) - fprintf(stderr,"i810Enable\n"); - - vgap->IOBase = (mmioReadMiscOut(vgap) & 0x01) ? - VGA_IOBASE_COLOR : VGA_IOBASE_MONO; - - { - I810RegPtr i810Reg = &i810c->ModeReg; - int i; - - for (i = 0 ; i < 8 ; i++) - i810Reg->Fence[i] = 0; - } - - t = KdFindMode (screen, i810ModeSupported); - - if (!i810BindGARTMemory(screen)) - return FALSE; - - if (!i810ModeInit(screen, t)) return FALSE; - - { - /* DPMS power on state */ - - unsigned char SEQ01=0; - int DPMSSyncSelect=0; - - SEQ01 = 0x00; - DPMSSyncSelect = HSYNC_ON | VSYNC_ON; - - SEQ01 |= i810ReadControlMMIO(i810c, SRX, 0x01) & ~0x20; - i810WriteControlMMIO(i810c, SRX, 0x01, SEQ01); - - /* Set the DPMS mode */ - OUTREG8(DPMS_SYNC_SELECT, DPMSSyncSelect); - } -#ifdef XV - KdXVEnable (pScreen); -#endif - return TRUE; -} - - -static void -i810Disable(ScreenPtr pScreen) { - - KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - KdCardInfo *card = pScreenPriv->card; - I810CardInfo *i810c = card->driver; - - i810VGAPtr vgap = &i810c->vga; - - if (I810_DEBUG) - fprintf(stderr,"i810Disable\n"); - -#ifdef XV - KdXVDisable (pScreen); -#endif - i810Restore(screen->card); - - if (!i810UnbindGARTMemory(screen)) - return; - - i810VGALock(vgap); -} - - -static Bool -i810DPMS(ScreenPtr pScreen, int mode) -{ - KdScreenPriv(pScreen); - KdCardInfo *card = pScreenPriv->card; - I810CardInfo *i810c = card->driver; - - unsigned char SEQ01=0; - int DPMSSyncSelect=0; - - if (I810_DEBUG) - fprintf(stderr,"i810DPMS: %d\n",mode); - - switch (mode) { - case KD_DPMS_NORMAL: - /* Screen: On; HSync: On, VSync: On */ - SEQ01 = 0x00; - DPMSSyncSelect = HSYNC_ON | VSYNC_ON; - break; - case KD_DPMS_STANDBY: - /* Screen: Off; HSync: Off, VSync: On */ - SEQ01 = 0x20; - DPMSSyncSelect = HSYNC_OFF | VSYNC_ON; - break; - case KD_DPMS_SUSPEND: - /* Screen: Off; HSync: On, VSync: Off */ - SEQ01 = 0x20; - DPMSSyncSelect = HSYNC_ON | VSYNC_OFF; - break; - case KD_DPMS_POWERDOWN: - /* Screen: Off; HSync: Off, VSync: Off */ - SEQ01 = 0x20; - DPMSSyncSelect = HSYNC_OFF | VSYNC_OFF; - break; - } - - /* Turn the screen on/off */ - SEQ01 |= i810ReadControlMMIO(i810c, SRX, 0x01) & ~0x20; - i810WriteControlMMIO(i810c, SRX, 0x01, SEQ01); - - /* Set the DPMS mode */ - OUTREG8(DPMS_SYNC_SELECT, DPMSSyncSelect); - return TRUE; -} - - -static void -i810GetColors (ScreenPtr pScreen, int fb, int ndefs, xColorItem *c) -{ - - if (I810_DEBUG) - fprintf(stderr,"i810GetColors (NOT IMPLEMENTED)\n"); -} - -#define DACDelay(hw) \ - do { \ - unsigned char temp = Vminb((hw)->IOBase + VGA_IN_STAT_1_OFFSET); \ - temp = Vminb((hw)->IOBase + VGA_IN_STAT_1_OFFSET); \ - } while (0) - -static void -i810PutColors (ScreenPtr pScreen, int fb, int ndef, xColorItem *pdefs) -{ - - KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - KdCardInfo *card = screen->card; - I810CardInfo *i810c = (I810CardInfo *) card->driver; - - i810VGAPtr vgap = &i810c->vga; - - if (I810_DEBUG) - fprintf(stderr,"i810PutColors\n"); - - while (ndef--) - { - mmioWriteDacWriteAddr(vgap, pdefs->pixel); - DACDelay(vgap); - mmioWriteDacData(vgap, pdefs->red); - DACDelay(vgap); - mmioWriteDacData(vgap, pdefs->green); - DACDelay(vgap); - mmioWriteDacData(vgap, pdefs->blue); - DACDelay(vgap); - - pdefs++; - } -} - - -KdCardFuncs i810Funcs = { - i810CardInit, /* cardinit */ - i810ScreenInit, /* scrinit */ - i810InitScreen, /* initScreen */ - i810FinishInitScreen, /* finishInitScreen */ - NULL, /* createResources */ - i810Preserve, /* preserve */ - i810Enable, /* enable */ - i810DPMS, /* dpms */ - i810Disable, /* disable */ - i810Restore, /* restore */ - i810ScreenFini, /* scrfini */ - i810CardFini, /* cardfini */ - - i810CursorInit, /* initCursor */ - i810CursorEnable, /* enableCursor */ - i810CursorDisable, /* disableCursor */ - i810CursorFini, /* finiCursor */ - NULL, /* recolorCursor */ - - i810InitAccel, /* initAccel */ - i810EnableAccel, /* enableAccel */ - i810DisableAccel, /* disableAccel */ - i810FiniAccel, /* finiAccel */ - - i810GetColors, /* getColors */ - i810PutColors, /* putColors */ -}; diff --git a/hw/kdrive/i810/i810.h b/hw/kdrive/i810/i810.h deleted file mode 100644 index 8fc2d56be..000000000 --- a/hw/kdrive/i810/i810.h +++ /dev/null @@ -1,511 +0,0 @@ -/* COPYRIGHT AND PERMISSION NOTICE - -Copyright (c) 2000, 2001 Nokia Home Communications - -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, provided that the above -copyright notice(s) and this permission notice appear in all copies of -the Software and that both the above copyright notice(s) and this -permission notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY -SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER -RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF -CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -of the copyright holder. - -X Window System is a trademark of The Open Group */ - -/* - * Author: - * Pontus Lidman - */ - -#ifndef _I810_H_ -#define _I810_H_ - -#include "i810_reg.h" - -/* Globals */ - -typedef struct _I810Rec *I810Ptr; - -/* Linear region allocated in framebuffer. - */ -typedef struct { - unsigned long Start; - unsigned long End; - unsigned long Size; -} I810MemRange; - -typedef struct { - int tail_mask; - I810MemRange mem; - unsigned char *virtual_start; - int head; - int tail; - int space; -} I810RingBuffer; - -typedef struct { - unsigned char DisplayControl; - unsigned char PixelPipeCfg0; - unsigned char PixelPipeCfg1; - unsigned char PixelPipeCfg2; - unsigned short VideoClk2_M; - unsigned short VideoClk2_N; - unsigned char VideoClk2_DivisorSel; - unsigned char AddressMapping; - unsigned char IOControl; - unsigned char BitBLTControl; - unsigned char ExtVertTotal; - unsigned char ExtVertDispEnd; - unsigned char ExtVertSyncStart; - unsigned char ExtVertBlankStart; - unsigned char ExtHorizTotal; - unsigned char ExtHorizBlank; - unsigned char ExtOffset; - unsigned char InterlaceControl; - unsigned int LMI_FIFO_Watermark; - - unsigned int LprbTail; - unsigned int LprbHead; - unsigned int LprbStart; - unsigned int LprbLen; - - unsigned int Fence[8]; - - unsigned short OverlayActiveStart; - unsigned short OverlayActiveEnd; - - -} I810RegRec, *I810RegPtr; - -#define minb(p) *(volatile CARD8 *)(i810c->MMIOBase + (p)) -#define moutb(p,v) *(volatile CARD8 *)(i810c->MMIOBase + (p)) = (v) - -#define OUT_RING(n) { \ - if (I810_DEBUG & DEBUG_VERBOSE_RING) \ - ErrorF( "OUT_RING %x: %x\n", outring, n); \ - *(volatile unsigned int *)(virt + outring) = n; \ - outring += 4; \ - outring &= ringmask; \ -} - -#define ADVANCE_LP_RING() { \ - i810c->LpRing.tail = outring; \ - OUTREG(LP_RING + RING_TAIL, outring); \ -} - -#ifdef __GNUC__ -#define LP_RING_MESSAGE(n) \ - ErrorF("BEGIN_LP_RING %d in %s\n", n, __FUNCTION__) -#else -#define LP_RING_MESSAGE(n) \ - ErrorF("BEGIN_LP_RING %d in %s:%d\n", n, __FILE__, __LINE__) -#endif - -#define LP_RING_LOCALS \ - unsigned int outring, ringmask; \ - volatile unsigned char *virt - -#define BEGIN_LP_RING(n) \ - if (n>2 && (I810_DEBUG&DEBUG_ALWAYS_SYNC)) \ - i810Sync(i810s); \ - if (i810c->LpRing.space < n*4) i810WaitLpRing(i810s, n*4, 0); \ - i810c->LpRing.space -= n*4; \ - if (I810_DEBUG & DEBUG_VERBOSE_RING) \ - LP_RING_MESSAGE(n); \ - outring = i810c->LpRing.tail; \ - ringmask = i810c->LpRing.tail_mask; \ - virt = i810c->LpRing.virtual_start; - -/* Memory mapped register access macros */ -#define INREG8(addr) *(volatile CARD8 *)(i810c->MMIOBase + (addr)) -#define INREG16(addr) *(volatile CARD16 *)(i810c->MMIOBase + (addr)) -#define INREG(addr) *(volatile CARD32 *)(i810c->MMIOBase + (addr)) - -#define OUTREG8(addr, val) do { \ - *(volatile CARD8 *)(i810c->MMIOBase + (addr)) = (val); \ - if (I810_DEBUG&DEBUG_VERBOSE_OUTREG) \ - ErrorF( "OUTREG8(%x, %x)\n", addr, val); \ -} while (0) - -#define OUTREG16(addr, val) do { \ - *(volatile CARD16 *)(i810c->MMIOBase + (addr)) = (val); \ - if (I810_DEBUG&DEBUG_VERBOSE_OUTREG) \ - ErrorF( "OUTREG16(%x, %x)\n", addr, val); \ -} while (0) - -#define OUTREG(addr, val) do { \ - *(volatile CARD32 *)(i810c->MMIOBase + (addr)) = (val); \ - if (I810_DEBUG&DEBUG_VERBOSE_OUTREG) \ - ErrorF( "OUTREG(%x, %x)\n", addr, val); \ -} while (0) - -/* To remove all debugging, make sure I810_DEBUG is defined as a - * preprocessor symbol, and equal to zero. - */ - -#define I810_DEBUG 0 - -#ifndef I810_DEBUG -#warning "Debugging enabled - expect reduced performance" -extern int I810_DEBUG; -#endif - -#define DEBUG_VERBOSE_ACCEL 0x1 -#define DEBUG_VERBOSE_SYNC 0x2 -#define DEBUG_VERBOSE_VGA 0x4 -#define DEBUG_VERBOSE_RING 0x8 -#define DEBUG_VERBOSE_OUTREG 0x10 -#define DEBUG_VERBOSE_MEMORY 0x20 -#define DEBUG_VERBOSE_CURSOR 0x40 -#define DEBUG_ALWAYS_SYNC 0x80 -#define DEBUG_VERBOSE_DRI 0x100 - - -/* Size of the mmio region. - */ -#define I810_REG_SIZE 0x80000 - -/* PCI identifiers */ -#ifndef PCI_CHIP_I810 -#define PCI_CHIP_I810 0x7121 -#define PCI_CHIP_I810_DC100 0x7123 -#define PCI_CHIP_I810_E 0x7125 -#define PCI_CHIP_I815 0x1132 -#define PCI_CHIP_I810_BRIDGE 0x7120 -#define PCI_CHIP_I810_DC100_BRIDGE 0x7122 -#define PCI_CHIP_I810_E_BRIDGE 0x7124 -#define PCI_CHIP_I815_BRIDGE 0x1130 -#define PCI_CHIP_I845G 0x2562 -#endif - - -#define IS_I810(i810c) (i810c->PciInfo->chipType == PCI_CHIP_I810 || \ - i810c->PciInfo->chipType == PCI_CHIP_I810_DC100 || \ - i810c->PciInfo->chipType == PCI_CHIP_I810_E) -#define IS_I815(i810c) (i810c->PciInfo->chipType == PCI_CHIP_I815) - - -/* default number of VGA registers stored internally */ -#define VGA_NUM_CRTC 25 /* 0x19 */ -#define VGA_NUM_SEQ 5 -#define VGA_NUM_GFX 9 -#define VGA_NUM_ATTR 21 - -/* - * Settings of standard VGA registers. - */ -typedef struct { - unsigned char MiscOutReg; /* */ - unsigned char CRTC[VGA_NUM_CRTC]; /* Crtc Controller */ - unsigned char Sequencer[VGA_NUM_SEQ]; /* Video Sequencer */ - unsigned char Graphics[VGA_NUM_GFX]; /* Video Graphics */ - unsigned char Attribute[VGA_NUM_ATTR]; /* Video Atribute */ - unsigned char DAC[768]; /* Internal Colorlookuptable */ -} vgaRegRec, *vgaRegPtr; - - -typedef struct _i810VGARec *i810VGAPtr; - -/* VGA registers */ -typedef struct _i810VGARec { - int IOBase; /* I/O Base address */ - CARD8 * MMIOBase; /* Pointer to MMIO start */ - vgaRegRec SavedReg; /* saved registers */ - vgaRegRec ModeReg; /* register settings for - current mode */ - Bool ShowOverscan; - Bool paletteEnabled; - Bool cmapSaved; -} i810VGARec; - -typedef struct _i810CardInfo { - int videoRam; - int MaxClock; - long FbMapSize; - int cpp; /* chars per pixel */ - - unsigned long LinearAddr; - unsigned long MMIOAddr; - - unsigned char *MMIOBase; - unsigned char *FbBase; - - Bool GttBound; - Bool agpAcquired2d; - int VramKey; - unsigned long VramOffset; - int DcacheKey; - unsigned long DcacheOffset; - int HwcursKey; - unsigned long HwcursOffset; - - I810MemRange DcacheMem; - I810MemRange SysMem; - - I810MemRange SavedDcacheMem; - I810MemRange SavedSysMem; - - unsigned int bufferOffset; /* for I810SelectBuffer */ - Bool DoneFrontAlloc; - BoxRec FbMemBox; - I810MemRange FrontBuffer; - I810MemRange Scratch; - I810MemRange XvMem; - - int LmFreqSel; - - i810VGARec vga; - - I810RegRec SavedReg; - I810RegRec ModeReg; - I810RingBuffer LpRing; - - unsigned int BR[20]; - - int CursorOffset; - unsigned long CursorPhysical; - unsigned long CursorStart; - unsigned long OverlayPhysical; - unsigned long OverlayStart; - int colorKey; - - int nextColorExpandBuf; - - ScreenBlockHandlerProcPtr BlockHandler; - -#ifdef XV - KdVideoAdaptorPtr adaptor; -#endif - -} i810CardInfo; - -typedef struct _i810CardInfo I810CardInfo; /* compatibility */ - -#define getI810CardInfo(kd) ((I810CardInfo *) ((kd)->card->driver)) -#define i810CardInfo(kd) I810CardInfo *i810c = getI810CardInfo(kd) - -#define getI810ScreenInfo(kd) ((I810ScreenInfo *) ((kd)->screen->driver)) -#define i810ScreenInfo(kd) I810ScreenInfo *i810s = getI810ScreenInfo(kd) - -typedef struct _i810Cursor { - int width, height; - int xhot, yhot; - Bool has_cursor; - CursorPtr pCursor; -} i810Cursor, *i810CursorPtr; - -typedef struct _i810ScreenInfo { - i810CardInfo *i810c; - i810Cursor cursor; - - int pitch; - KaaScreenInfoRec kaa; -} i810ScreenInfo; - -typedef struct _i810ScreenInfo I810ScreenInfo; /* compatibility */ - -#define I810_CURSOR_HEIGHT 64 -#define I810_CURSOR_WIDTH 64 - -/* init functions (i810.c) */ - -Bool -i810CardInit (KdCardInfo *card); - -Bool -i810ScreenInit (KdScreenInfo *screen); - -/* The cursor functions (i810_cursor.c) */ - -Bool -i810CursorInit(ScreenPtr pScreen); - -void -i810CursorEnable (ScreenPtr pScreen); - -void -i810CursorDisable (ScreenPtr pScreen); - -void -i810CursorFini (ScreenPtr pScreen); - -/* Accel functions (i810draw.c) */ - -Bool -i810InitAccel(ScreenPtr); - -void -i810EnableAccel (ScreenPtr); - -void -i810DisableAccel (ScreenPtr); - -void -i810FiniAccel (ScreenPtr); - -void -i810FillBoxSolid (KdScreenInfo *screen, int nBox, BoxPtr pBox, - unsigned long pixel, int alu, unsigned long planemask); - - -extern KdCardFuncs i810Funcs; - -/* Standard VGA registers */ - -#define VGA_ATTR_INDEX 0x3C0 -#define VGA_ATTR_DATA_W 0x3C0 -#define VGA_ATTR_DATA_R 0x3C1 -#define VGA_IN_STAT_0 0x3C2 /* read */ -#define VGA_MISC_OUT_W 0x3C2 /* write */ -#define VGA_ENABLE 0x3C3 -#define VGA_SEQ_INDEX 0x3C4 -#define VGA_SEQ_DATA 0x3C5 -#define VGA_DAC_MASK 0x3C6 -#define VGA_DAC_READ_ADDR 0x3C7 -#define VGA_DAC_WRITE_ADDR 0x3C8 -#define VGA_DAC_DATA 0x3C9 -#define VGA_FEATURE_R 0x3CA /* read */ -#define VGA_MISC_OUT_R 0x3CC /* read */ -#define VGA_GRAPH_INDEX 0x3CE -#define VGA_GRAPH_DATA 0x3CF - -#define VGA_IOBASE_MONO 0x3B0 -#define VGA_IOBASE_COLOR 0x3D0 - -#define VGA_CRTC_INDEX_OFFSET 0x04 -#define VGA_CRTC_DATA_OFFSET 0x05 -#define VGA_IN_STAT_1_OFFSET 0x0A /* read */ -#define VGA_FEATURE_W_OFFSET 0x0A /* write */ - -/* VGA stuff */ -#define BIT_PLANE 3 /* Which plane we write to in mono mode */ - -/* DAC indices for white and black */ -#define WHITE_VALUE 0x3F -#define BLACK_VALUE 0x00 -#define OVERSCAN_VALUE 0x01 - -#define OVERSCAN 0x11 /* Index of OverScan register */ - -void -i810VGAUnlock(i810VGAPtr vgap); - -void -i810VGALock(i810VGAPtr vgap); - -Bool -i810VGAInit(KdScreenInfo *scrninfp, const KdMonitorTiming *t); - -void -i810VGABlankScreen(KdCardInfo *card, Bool on); - -void -i810AdjustFrame(KdScreenInfo *screen, int x, int y, int flags); - -Bool -i810VGAMapMem(KdCardInfo *card); - -void -i810VGASave(KdCardInfo *card, vgaRegPtr save, int flags); - -void -i810PrintErrorState(i810CardInfo *i810c); - -void -i810VGAGetIOBase(i810VGAPtr vgap); - -Bool -i810InitVideo(ScreenPtr pScreen); - -/* - * MMIO versions of the register access functions. These require - * hwp->MemBase to be set in such a way that when the standard VGA port - * address is added the correct memory address results. - */ - -#define Vminb(p) ( *(volatile CARD8 *)(vgap->MMIOBase + (p))) -#define Vmoutb(p,v) ( *(volatile CARD8 *)(vgap->MMIOBase + (p)) = (v)) - -#define mmioWriteCrtc(vgap, index, value) { \ - Vmoutb(vgap->IOBase + VGA_CRTC_INDEX_OFFSET, index); \ - Vmoutb(vgap->IOBase + VGA_CRTC_DATA_OFFSET, value); \ -} - -#define mmioReadCrtc(vgap, index) ( \ - Vmoutb(vgap->IOBase + VGA_CRTC_INDEX_OFFSET, index), \ - Vminb(vgap->IOBase + VGA_CRTC_DATA_OFFSET) \ -) - -#define mmioWriteGr(vgap, index, value) { \ - Vmoutb(VGA_GRAPH_INDEX, index); \ - Vmoutb(VGA_GRAPH_DATA, value); \ -} - -#define mmioReadGr(vgap, index) ( \ - Vmoutb(VGA_GRAPH_INDEX, index), \ - Vminb(VGA_GRAPH_DATA) \ -) - -#define mmioWriteSeq(vgap, index, value) {\ - Vmoutb(VGA_SEQ_INDEX, index); \ - Vmoutb(VGA_SEQ_DATA, value); \ -} - -#define mmioReadSeq(vgap, index) ( \ - Vmoutb(VGA_SEQ_INDEX, index), \ - Vminb(VGA_SEQ_DATA) \ -) - -#define mmioWriteAttr(vgap, index, value) { \ - (void) Vminb(vgap->IOBase + VGA_IN_STAT_1_OFFSET); \ - Vmoutb(VGA_ATTR_INDEX, index); \ - Vmoutb(VGA_ATTR_DATA_W, value); \ -} - -#define mmioReadAttr(vgap, index) ( \ - (void) Vminb(vgap->IOBase + VGA_IN_STAT_1_OFFSET), \ - Vmoutb(VGA_ATTR_INDEX, index), \ - Vminb(VGA_ATTR_DATA_R) \ -) - -#define mmioWriteMiscOut(vgap, value) Vmoutb(VGA_MISC_OUT_W, value) - - -#define mmioReadMiscOut(vgap) Vminb(VGA_MISC_OUT_R) - -#define mmioEnablePalette(vgap) { \ - (void) Vminb(vgap->IOBase + VGA_IN_STAT_1_OFFSET); \ - Vmoutb(VGA_ATTR_INDEX, 0x00); \ - vgap->paletteEnabled = TRUE; \ -} - -#define mmioDisablePalette(vgap) { \ - (void) Vminb(vgap->IOBase + VGA_IN_STAT_1_OFFSET); \ - Vmoutb(VGA_ATTR_INDEX, 0x20); \ - vgap->paletteEnabled = FALSE; \ -} - -#define mmioWriteDacWriteAddr(vgap, value) Vmoutb(VGA_DAC_WRITE_ADDR, value) - -#define mmioWriteDacData(vgap, value) Vmoutb(VGA_DAC_DATA, value) - -#endif /* _I810_H_ */ diff --git a/hw/kdrive/i810/i810_cursor.c b/hw/kdrive/i810/i810_cursor.c deleted file mode 100644 index 434fc4087..000000000 --- a/hw/kdrive/i810/i810_cursor.c +++ /dev/null @@ -1,435 +0,0 @@ -/* COPYRIGHT AND PERMISSION NOTICE - -Copyright (c) 2000, 2001 Nokia Home Communications - -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, provided that the above -copyright notice(s) and this permission notice appear in all copies of -the Software and that both the above copyright notice(s) and this -permission notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY -SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER -RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF -CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -of the copyright holder. - -X Window System is a trademark of The Open Group */ - -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* i810_cursor.c: KDrive hardware cursor routines for the i810 chipset */ - -/* - * Authors: - * Keith Whitwell - * Pontus Lidman - * - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "kdrive.h" -#include "kxv.h" -#include "i810.h" -#include "cursorstr.h" - -#define SetupCursor(s) KdScreenPriv(pScreen); \ - i810CardInfo(pScreenPriv); \ - i810ScreenInfo(pScreenPriv); \ - i810Cursor *pCurPriv = &i810s->cursor - - -static void -writeStandardMMIO(I810CardInfo *i810c, int addr, CARD8 val) -{ - moutb(addr, val); -} - -static void -_i810MoveCursor(ScreenPtr pScreen, int x, int y) -{ - KdScreenPriv(pScreen); - i810CardInfo(pScreenPriv); - int flag; - - if (I810_DEBUG & DEBUG_VERBOSE_CURSOR) - ErrorF( "I810SetCursorPosition %d %d\n", x, y); - - x += i810c->CursorOffset; - - if (x >= 0) flag = CURSOR_X_POS; - else { - flag = CURSOR_X_NEG; - x=-x; - } - - OUTREG8( CURSOR_X_LO, x&0xFF); - OUTREG8( CURSOR_X_HI, (((x >> 8) & 0x07) | flag)); - - if (y >= 0) flag = CURSOR_Y_POS; - else { - flag = CURSOR_Y_NEG; - y=-y; - } - OUTREG8( CURSOR_Y_LO, y&0xFF); - OUTREG8( CURSOR_Y_HI, (((y >> 8) & 0x07) | flag)); - - /* Enable cursor */ - OUTREG( CURSOR_BASEADDR, i810c->CursorPhysical); - OUTREG8( CURSOR_CONTROL, CURSOR_ORIGIN_DISPLAY | CURSOR_MODE_64_3C); - -} - -static void i810LoadCursor(ScreenPtr pScreen, int x, int y); - -static void -i810MoveCursor (ScreenPtr pScreen, int x, int y) -{ - KdScreenPriv(pScreen); - i810ScreenInfo(pScreenPriv); - i810Cursor *pCurPriv = &i810s->cursor; - - if (!pCurPriv->has_cursor) - return; - - if (!pScreenPriv->enabled) - return; - - _i810MoveCursor (pScreen, x, y); - - i810LoadCursor(pScreen, x, y); -} - -static void -_i810SetCursorColors(ScreenPtr pScreen) -{ - - KdScreenPriv(pScreen); - i810CardInfo(pScreenPriv); - int tmp; - - int bg = 0xffffff; - int fg = 0x000000; - - tmp=INREG8(PIXPIPE_CONFIG_0); - tmp |= EXTENDED_PALETTE; - OUTREG8( PIXPIPE_CONFIG_0, tmp); - - writeStandardMMIO(i810c, DACMASK, 0xFF); - writeStandardMMIO(i810c, DACWX, 0x04); - - writeStandardMMIO(i810c, DACDATA, (bg & 0x00FF0000) >> 16); - writeStandardMMIO(i810c, DACDATA, (bg & 0x0000FF00) >> 8); - writeStandardMMIO(i810c, DACDATA, (bg & 0x000000FF)); - - writeStandardMMIO(i810c, DACDATA, (fg & 0x00FF0000) >> 16); - writeStandardMMIO(i810c, DACDATA, (fg & 0x0000FF00) >> 8); - writeStandardMMIO(i810c, DACDATA, (fg & 0x000000FF)); - - tmp=INREG8( PIXPIPE_CONFIG_0 ); - tmp &= ~EXTENDED_PALETTE; - OUTREG8( PIXPIPE_CONFIG_0, tmp ); -} - -#define InvertBits32(v) { \ - v = ((v & 0x55555555) << 1) | ((v >> 1) & 0x55555555); \ - v = ((v & 0x33333333) << 2) | ((v >> 2) & 0x33333333); \ - v = ((v & 0x0f0f0f0f) << 4) | ((v >> 4) & 0x0f0f0f0f); \ -} - -static void i810LoadCursor(ScreenPtr pScreen, int x, int y) -{ - SetupCursor(pScreen); - - int h; - unsigned int *msk, *mskLine, *src, *srcLine; - - int i, j; - int src_stride, src_width; - - CursorPtr pCursor = pCurPriv->pCursor; - CursorBitsPtr bits = pCursor->bits; - CARD8 tmp; - unsigned int *ram, *ramLine; - - pCurPriv->pCursor = pCursor; - pCurPriv->xhot = pCursor->bits->xhot; - pCurPriv->yhot = pCursor->bits->yhot; - - ramLine = (unsigned int *) (i810c->FbBase + i810c->CursorStart); - mskLine = (unsigned int *) (bits->mask); - srcLine = (unsigned int *) (bits->source); - - h = bits->height; - if (h > I810_CURSOR_HEIGHT) - h = I810_CURSOR_HEIGHT; - - src_stride = BitmapBytePad(bits->width); /* bytes per line */ - src_stride = (src_stride +3) >> 2; - src_width = (bits->width + 31) >> 5; - - for (i = 0; i < I810_CURSOR_HEIGHT; i++) { - - msk = mskLine; - src = srcLine; - ram = ramLine; - mskLine += src_stride; - srcLine += src_stride; - ramLine += I810_CURSOR_WIDTH / 16; - - for (j = 0; j < I810_CURSOR_WIDTH / 32; j++) { - - unsigned long m, s; - - if (i < h && j < src_width) - { - m = *msk++; - s = *src++ & m; - m = ~m; - /* mask off right side */ - if (j == src_width - 1 && (bits->width & 31)) - { - m |= 0xffffffff << (bits->width & 31); - } - } - else - { - m = 0xffffffff; - s = 0x00000000; - } - - InvertBits32(s); - InvertBits32(m); - - ram[2+j]=s; - ram[0+j]=m; - } - } - /* Set new color */ - _i810SetCursorColors (pScreen); - - /* Move to new position */ - _i810MoveCursor (pScreen, x, y); - - /* Enable cursor */ - OUTREG( CURSOR_BASEADDR, i810c->CursorPhysical); - OUTREG8( CURSOR_CONTROL, CURSOR_ORIGIN_DISPLAY | CURSOR_MODE_64_3C); - - tmp = INREG8( PIXPIPE_CONFIG_0 ); - tmp |= HW_CURSOR_ENABLE; - OUTREG8( PIXPIPE_CONFIG_0, tmp); -} - -static void -i810UnloadCursor(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - i810CardInfo(pScreenPriv); - - unsigned char tmp; - - tmp=INREG8( PIXPIPE_CONFIG_0 ); - tmp &= ~HW_CURSOR_ENABLE; - OUTREG8( PIXPIPE_CONFIG_0, tmp); -} - - -static Bool -i810RealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) -{ - KdScreenPriv(pScreen); - i810ScreenInfo(pScreenPriv); - i810Cursor *pCurPriv = &i810s->cursor; - - if (!pScreenPriv->enabled) - return TRUE; - - /* miRecolorCursor does this */ - if (pCurPriv->pCursor == pCursor) - { - if (pCursor) - { - int x, y; - - miPointerPosition (&x, &y); - i810LoadCursor (pScreen, x, y); - } - } - return TRUE; -} - -static Bool -i810UnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) -{ - return TRUE; -} - -static void -i810SetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y) -{ - KdScreenPriv(pScreen); - i810ScreenInfo(pScreenPriv); - i810Cursor *pCurPriv = &i810s->cursor; - - pCurPriv->pCursor = pCursor; - - if (!pScreenPriv->enabled) - return; - - if (pCursor) - i810LoadCursor (pScreen, x, y); - else - i810UnloadCursor (pScreen); -} - -miPointerSpriteFuncRec i810PointerSpriteFuncs = { - i810RealizeCursor, - i810UnrealizeCursor, - i810SetCursor, - i810MoveCursor, -}; - -static void -i810QueryBestSize (int class, - unsigned short *pwidth, unsigned short *pheight, - ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - i810ScreenInfo(pScreenPriv); - i810Cursor *pCurPriv = &i810s->cursor; - - switch (class) - { - case CursorShape: - if (*pwidth > pCurPriv->width) - *pwidth = pCurPriv->width; - if (*pheight > pCurPriv->height) - *pheight = pCurPriv->height; - if (*pwidth > pScreen->width) - *pwidth = pScreen->width; - if (*pheight > pScreen->height) - *pheight = pScreen->height; - break; - default: - fbQueryBestSize (class, pwidth, pheight, pScreen); - break; - } -} - -Bool -i810CursorInit(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - i810ScreenInfo(pScreenPriv); - i810CardInfo(pScreenPriv); - i810Cursor *pCurPriv = &i810s->cursor; - - if (!i810c->CursorStart) { - pCurPriv->has_cursor = FALSE; - return FALSE; - } - - pCurPriv->width = I810_CURSOR_WIDTH; - pCurPriv->height= I810_CURSOR_HEIGHT; - pScreen->QueryBestSize = i810QueryBestSize; - miPointerInitialize (pScreen, - &i810PointerSpriteFuncs, - &kdPointerScreenFuncs, - FALSE); - pCurPriv->has_cursor = TRUE; - pCurPriv->pCursor = NULL; - return TRUE; -} - -void -i810CursorEnable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - i810ScreenInfo(pScreenPriv); - i810Cursor *pCurPriv = &i810s->cursor; - - if (pCurPriv->has_cursor) - { - if (pCurPriv->pCursor) - { - int x, y; - - miPointerPosition (&x, &y); - i810LoadCursor (pScreen, x, y); - } - else - i810UnloadCursor (pScreen); - } -} - -void -i810CursorDisable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - i810ScreenInfo(pScreenPriv); - i810Cursor *pCurPriv = &i810s->cursor; - - if (!pScreenPriv->enabled) - return; - - if (pCurPriv->has_cursor) - { - if (pCurPriv->pCursor) - { - i810UnloadCursor (pScreen); - } - } -} - -void -i810CursorFini (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - i810ScreenInfo(pScreenPriv); - i810Cursor *pCurPriv = &i810s->cursor; - - pCurPriv->pCursor = NULL; -} - diff --git a/hw/kdrive/i810/i810_reg.h b/hw/kdrive/i810/i810_reg.h deleted file mode 100644 index d9f4c8f48..000000000 --- a/hw/kdrive/i810/i810_reg.h +++ /dev/null @@ -1,695 +0,0 @@ -/* COPYRIGHT AND PERMISSION NOTICE - -Copyright (c) 2000, 2001 Nokia Home Communications - -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, provided that the above -copyright notice(s) and this permission notice appear in all copies of -the Software and that both the above copyright notice(s) and this -permission notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY -SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER -RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF -CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -of the copyright holder. - -X Window System is a trademark of The Open Group */ - -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Keith Whitwell - * Pontus Lidman - * - * based on the i740 driver by - * Kevin E. Martin - * - * - */ - -/* I/O register offsets - */ -#define SRX 0x3C4 /* p208 */ -#define GRX 0x3CE /* p213 */ -#define ARX 0x3C0 /* p224 */ - -/* VGA Color Palette Registers */ -#define DACMASK 0x3C6 /* p232 */ -#define DACSTATE 0x3C7 /* p232 */ -#define DACRX 0x3C7 /* p233 */ -#define DACWX 0x3C8 /* p233 */ -#define DACDATA 0x3C9 /* p233 */ - -/* CRT Controller Registers (CRX) */ -#define START_ADDR_HI 0x0C /* p246 */ -#define START_ADDR_LO 0x0D /* p247 */ -#define VERT_SYNC_END 0x11 /* p249 */ -#define EXT_VERT_TOTAL 0x30 /* p257 */ -#define EXT_VERT_DISPLAY 0x31 /* p258 */ -#define EXT_VERT_SYNC_START 0x32 /* p259 */ -#define EXT_VERT_BLANK_START 0x33 /* p260 */ -#define EXT_HORIZ_TOTAL 0x35 /* p261 */ -#define EXT_HORIZ_BLANK 0x39 /* p261 */ -#define EXT_START_ADDR 0x40 /* p262 */ -#define EXT_START_ADDR_ENABLE 0x80 -#define EXT_OFFSET 0x41 /* p263 */ -#define EXT_START_ADDR_HI 0x42 /* p263 */ -#define INTERLACE_CNTL 0x70 /* p264 */ -#define INTERLACE_ENABLE 0x80 -#define INTERLACE_DISABLE 0x00 - -/* Miscellaneous Output Register - */ -#define MSR_R 0x3CC /* p207 */ -#define MSR_W 0x3C2 /* p207 */ -#define IO_ADDR_SELECT 0x01 - -#define MDA_BASE 0x3B0 /* p207 */ -#define CGA_BASE 0x3D0 /* p207 */ - -/* CR80 - IO Control, p264 - */ -#define IO_CTNL 0x80 -#define EXTENDED_ATTR_CNTL 0x02 -#define EXTENDED_CRTC_CNTL 0x01 - -/* GR10 - Address mapping, p221 - */ -#define ADDRESS_MAPPING 0x10 -#define PAGE_TO_LOCAL_MEM_ENABLE 0x10 -#define GTT_MEM_MAP_ENABLE 0x08 -#define PACKED_MODE_ENABLE 0x04 -#define LINEAR_MODE_ENABLE 0x02 -#define PAGE_MAPPING_ENABLE 0x01 - -/* Blitter control, p378 - */ -#define BITBLT_CNTL 0x7000c -#define COLEXP_MODE 0x30 -#define COLEXP_8BPP 0x00 -#define COLEXP_16BPP 0x10 -#define COLEXP_24BPP 0x20 -#define COLEXP_RESERVED 0x30 -#define BITBLT_STATUS 0x01 - -/* p375. - */ -#define DISPLAY_CNTL 0x70008 -#define VGA_WRAP_MODE 0x02 -#define VGA_WRAP_AT_256KB 0x00 -#define VGA_NO_WRAP 0x02 -#define GUI_MODE 0x01 -#define STANDARD_VGA_MODE 0x00 -#define HIRES_MODE 0x01 - -/* p375 - */ -#define PIXPIPE_CONFIG_0 0x70009 -#define DAC_8_BIT 0x80 -#define DAC_6_BIT 0x00 -#define HW_CURSOR_ENABLE 0x10 -#define EXTENDED_PALETTE 0x01 - -/* p375 - */ -#define PIXPIPE_CONFIG_1 0x7000a -#define DISPLAY_COLOR_MODE 0x0F -#define DISPLAY_VGA_MODE 0x00 -#define DISPLAY_8BPP_MODE 0x02 -#define DISPLAY_15BPP_MODE 0x04 -#define DISPLAY_16BPP_MODE 0x05 -#define DISPLAY_24BPP_MODE 0x06 -#define DISPLAY_32BPP_MODE 0x07 - -/* p375 - */ -#define PIXPIPE_CONFIG_2 0x7000b -#define DISPLAY_GAMMA_ENABLE 0x08 -#define DISPLAY_GAMMA_DISABLE 0x00 -#define OVERLAY_GAMMA_ENABLE 0x04 -#define OVERLAY_GAMMA_DISABLE 0x00 - - -/* p380 - */ -#define DISPLAY_BASE 0x70020 -#define DISPLAY_BASE_MASK 0x03fffffc - - -/* Cursor control registers, pp383-384 - */ -#define CURSOR_CONTROL 0x70080 -#define CURSOR_ORIGIN_SCREEN 0x00 -#define CURSOR_ORIGIN_DISPLAY 0x10 -#define CURSOR_MODE 0x07 -#define CURSOR_MODE_DISABLE 0x00 -#define CURSOR_MODE_32_4C_AX 0x01 -#define CURSOR_MODE_64_3C 0x04 -#define CURSOR_MODE_64_4C_AX 0x05 -#define CURSOR_MODE_64_4C 0x06 -#define CURSOR_MODE_RESERVED 0x07 -#define CURSOR_BASEADDR 0x70084 -#define CURSOR_BASEADDR_MASK 0x1FFFFF00 -#define CURSOR_X_LO 0x70088 -#define CURSOR_X_HI 0x70089 -#define CURSOR_X_POS 0x00 -#define CURSOR_X_NEG 0x80 -#define CURSOR_Y_LO 0x7008A -#define CURSOR_Y_HI 0x7008B -#define CURSOR_Y_POS 0x00 -#define CURSOR_Y_NEG 0x80 - - - -/* Similar registers exist in Device 0 on the i810 (pp55-65), but I'm - * not sure they refer to local (graphics) memory. - * - * These details are for the local memory control registers, - * (pp301-310). The test machines are not equiped with local memory, - * so nothing is tested. Only a single row seems to be supported. - */ -#define DRAM_ROW_TYPE 0x3000 -#define DRAM_ROW_0 0x01 -#define DRAM_ROW_0_SDRAM 0x01 -#define DRAM_ROW_0_EMPTY 0x00 -#define DRAM_ROW_CNTL_LO 0x3001 -#define DRAM_PAGE_MODE_CTRL 0x10 -#define DRAM_RAS_TO_CAS_OVRIDE 0x08 -#define DRAM_CAS_LATENCY 0x04 -#define DRAM_RAS_TIMING 0x02 -#define DRAM_RAS_PRECHARGE 0x01 -#define DRAM_ROW_CNTL_HI 0x3002 -#define DRAM_REFRESH_RATE 0x18 -#define DRAM_REFRESH_DISABLE 0x00 -#define DRAM_REFRESH_60HZ 0x08 -#define DRAM_REFRESH_FAST_TEST 0x10 -#define DRAM_REFRESH_RESERVED 0x18 -#define DRAM_SMS 0x07 -#define DRAM_SMS_NORMAL 0x00 -#define DRAM_SMS_NOP_ENABLE 0x01 -#define DRAM_SMS_ABPCE 0x02 -#define DRAM_SMS_MRCE 0x03 -#define DRAM_SMS_CBRCE 0x04 - -/* p307 - */ -#define DPMS_SYNC_SELECT 0x5002 -#define VSYNC_CNTL 0x08 -#define VSYNC_ON 0x00 -#define VSYNC_OFF 0x08 -#define HSYNC_CNTL 0x02 -#define HSYNC_ON 0x00 -#define HSYNC_OFF 0x02 - - - -/* p317, 319 - */ -#define VCLK2_VCO_M 0x6008 /* treat as 16 bit? (includes msbs) */ -#define VCLK2_VCO_N 0x600a -#define VCLK2_VCO_DIV_SEL 0x6012 -#define POST_DIV_SELECT 0x70 -#define POST_DIV_1 0x00 -#define POST_DIV_2 0x10 -#define POST_DIV_4 0x20 -#define POST_DIV_8 0x30 -#define POST_DIV_16 0x40 -#define POST_DIV_32 0x50 -#define VCO_LOOP_DIV_BY_4M 0x00 -#define VCO_LOOP_DIV_BY_16M 0x04 - - -/* Instruction Parser Mode Register - * - p281 - * - 2 new bits. - */ -#define INST_PM 0x20c0 -#define AGP_SYNC_PACKET_FLUSH_ENABLE 0x20 /* reserved */ -#define SYNC_PACKET_FLUSH_ENABLE 0x10 -#define TWO_D_INST_DISABLE 0x08 -#define THREE_D_INST_DISABLE 0x04 -#define STATE_VAR_UPDATE_DISABLE 0x02 -#define PAL_STIP_DISABLE 0x01 - -#define INST_DONE 0x2090 -#define INST_PS 0x20c4 - -#define MEMMODE 0x20dc - - -/* Instruction parser error register. p279 - */ -#define IPEIR 0x2088 -#define IPEHR 0x208C - - -/* General error reporting regs, p296 - */ -#define EIR 0x20B0 -#define EMR 0x20B4 -#define ESR 0x20B8 -#define IP_ERR 0x0001 -#define ERROR_RESERVED 0xffc6 - - -/* Interrupt Control Registers - * - new bits for i810 - * - new register hwstam (mask) - */ -#define HWSTAM 0x2098 /* p290 */ -#define IER 0x20a0 /* p291 */ -#define IIR 0x20a4 /* p292 */ -#define IMR 0x20a8 /* p293 */ -#define ISR 0x20ac /* p294 */ -#define HW_ERROR 0x8000 -#define SYNC_STATUS_TOGGLE 0x1000 -#define DPY_0_FLIP_PENDING 0x0800 -#define DPY_1_FLIP_PENDING 0x0400 /* not implemented on i810 */ -#define OVL_0_FLIP_PENDING 0x0200 -#define OVL_1_FLIP_PENDING 0x0100 /* not implemented on i810 */ -#define DPY_0_VBLANK 0x0080 -#define DPY_0_EVENT 0x0040 -#define DPY_1_VBLANK 0x0020 /* not implemented on i810 */ -#define DPY_1_EVENT 0x0010 /* not implemented on i810 */ -#define HOST_PORT_EVENT 0x0008 /* */ -#define CAPTURE_EVENT 0x0004 /* */ -#define USER_DEFINED 0x0002 -#define BREAKPOINT 0x0001 - - -#define INTR_RESERVED (0x6000 | \ - DPY_1_FLIP_PENDING | \ - OVL_1_FLIP_PENDING | \ - DPY_1_VBLANK | \ - DPY_1_EVENT | \ - HOST_PORT_EVENT | \ - CAPTURE_EVENT ) - -/* FIFO Watermark and Burst Length Control Register - * - * - different offset and contents on i810 (p299) (fewer bits per field) - * - some overlay fields added - * - what does it all mean? - */ -#define FWATER_BLC 0x20d8 -#define MM_BURST_LENGTH 0x00700000 -#define MM_FIFO_WATERMARK 0x0001F000 -#define LM_BURST_LENGTH 0x00000700 -#define LM_FIFO_WATERMARK 0x0000001F - - -/* Fence/Tiling ranges [0..7] - */ -#define FENCE 0x2000 -#define FENCE_NR 8 - -#define FENCE_START_MASK 0x03F80000 -#define FENCE_X_MAJOR 0x00000000 -#define FENCE_Y_MAJOR 0x00001000 -#define FENCE_SIZE_MASK 0x00000700 -#define FENCE_SIZE_512K 0x00000000 -#define FENCE_SIZE_1M 0x00000100 -#define FENCE_SIZE_2M 0x00000200 -#define FENCE_SIZE_4M 0x00000300 -#define FENCE_SIZE_8M 0x00000400 -#define FENCE_SIZE_16M 0x00000500 -#define FENCE_SIZE_32M 0x00000600 -#define FENCE_PITCH_MASK 0x00000070 -#define FENCE_PITCH_1 0x00000000 -#define FENCE_PITCH_2 0x00000010 -#define FENCE_PITCH_4 0x00000020 -#define FENCE_PITCH_8 0x00000030 -#define FENCE_PITCH_16 0x00000040 -#define FENCE_PITCH_32 0x00000050 -#define FENCE_VALID 0x00000001 - - -/* Registers to control page table, p274 - */ -#define PGETBL_CTL 0x2020 -#define PGETBL_ADDR_MASK 0xFFFFF000 -#define PGETBL_ENABLE_MASK 0x00000001 -#define PGETBL_ENABLED 0x00000001 - -/* Register containing pge table error results, p276 - */ -#define PGE_ERR 0x2024 -#define PGE_ERR_ADDR_MASK 0xFFFFF000 -#define PGE_ERR_ID_MASK 0x00000038 -#define PGE_ERR_CAPTURE 0x00000000 -#define PGE_ERR_OVERLAY 0x00000008 -#define PGE_ERR_DISPLAY 0x00000010 -#define PGE_ERR_HOST 0x00000018 -#define PGE_ERR_RENDER 0x00000020 -#define PGE_ERR_BLITTER 0x00000028 -#define PGE_ERR_MAPPING 0x00000030 -#define PGE_ERR_CMD_PARSER 0x00000038 -#define PGE_ERR_TYPE_MASK 0x00000007 -#define PGE_ERR_INV_TABLE 0x00000000 -#define PGE_ERR_INV_PTE 0x00000001 -#define PGE_ERR_MIXED_TYPES 0x00000002 -#define PGE_ERR_PAGE_MISS 0x00000003 -#define PGE_ERR_ILLEGAL_TRX 0x00000004 -#define PGE_ERR_LOCAL_MEM 0x00000005 -#define PGE_ERR_TILED 0x00000006 - - - -/* Page table entries loaded via mmio region, p323 - */ -#define PTE_BASE 0x10000 -#define PTE_ADDR_MASK 0x3FFFF000 -#define PTE_TYPE_MASK 0x00000006 -#define PTE_LOCAL 0x00000002 -#define PTE_MAIN_UNCACHED 0x00000000 -#define PTE_MAIN_CACHED 0x00000006 -#define PTE_VALID_MASK 0x00000001 -#define PTE_VALID 0x00000001 - - -/* Ring buffer registers, p277, overview p19 - */ -#define LP_RING 0x2030 -#define HP_RING 0x2040 - -#define RING_TAIL 0x00 -#define TAIL_ADDR 0x000FFFF8 - -#define RING_HEAD 0x04 -#define HEAD_WRAP_COUNT 0xFFE00000 -#define HEAD_WRAP_ONE 0x00200000 -#define HEAD_ADDR 0x001FFFFC - -#define RING_START 0x08 -#define START_ADDR 0x00FFFFF8 - -#define RING_LEN 0x0C -#define RING_NR_PAGES 0x000FF000 -#define RING_REPORT_MASK 0x00000006 -#define RING_REPORT_64K 0x00000002 -#define RING_REPORT_128K 0x00000004 -#define RING_NO_REPORT 0x00000000 -#define RING_VALID_MASK 0x00000001 -#define RING_VALID 0x00000001 -#define RING_INVALID 0x00000000 - - - -/* BitBlt Instructions - * - * There are many more masks & ranges yet to add. - */ -#define BR00_BITBLT_CLIENT 0x40000000 -#define BR00_OP_COLOR_BLT 0x10000000 -#define BR00_OP_SRC_COPY_BLT 0x10C00000 -#define BR00_OP_FULL_BLT 0x11400000 -#define BR00_OP_MONO_SRC_BLT 0x11800000 -#define BR00_OP_MONO_SRC_COPY_BLT 0x11000000 -#define BR00_OP_MONO_PAT_BLT 0x11C00000 -#define BR00_OP_MONO_SRC_COPY_IMMEDIATE_BLT (0x61 << 22) -#define BR00_OP_TEXT_IMMEDIATE_BLT 0xc000000 - - -#define BR00_TPCY_DISABLE 0x00000000 -#define BR00_TPCY_ENABLE 0x00000010 - -#define BR00_TPCY_ROP 0x00000000 -#define BR00_TPCY_NO_ROP 0x00000020 -#define BR00_TPCY_EQ 0x00000000 -#define BR00_TPCY_NOT_EQ 0x00000040 - -#define BR00_PAT_MSB_FIRST 0x00000000 /* ? */ - -#define BR00_PAT_VERT_ALIGN 0x000000e0 - -#define BR00_LENGTH 0x0000000F - -#define BR09_DEST_ADDR 0x03FFFFFF - -#define BR11_SOURCE_PITCH 0x00003FFF - -#define BR12_SOURCE_ADDR 0x03FFFFFF - -#define BR13_SOLID_PATTERN 0x80000000 -#define BR13_RIGHT_TO_LEFT 0x40000000 -#define BR13_LEFT_TO_RIGHT 0x00000000 -#define BR13_MONO_TRANSPCY 0x20000000 -#define BR13_USE_DYN_DEPTH 0x04000000 -#define BR13_DYN_8BPP 0x00000000 -#define BR13_DYN_16BPP 0x01000000 -#define BR13_DYN_24BPP 0x02000000 -#define BR13_ROP_MASK 0x00FF0000 -#define BR13_DEST_PITCH 0x0000FFFF -#define BR13_PITCH_SIGN_BIT 0x00008000 - -#define BR14_DEST_HEIGHT 0xFFFF0000 -#define BR14_DEST_WIDTH 0x0000FFFF - -#define BR15_PATTERN_ADDR 0x03FFFFFF - -#define BR16_SOLID_PAT_COLOR 0x00FFFFFF -#define BR16_BACKGND_PAT_CLR 0x00FFFFFF - -#define BR17_FGND_PAT_CLR 0x00FFFFFF - -#define BR18_SRC_BGND_CLR 0x00FFFFFF -#define BR19_SRC_FGND_CLR 0x00FFFFFF - - -/* Instruction parser instructions - */ - -#define INST_PARSER_CLIENT 0x00000000 -#define INST_OP_FLUSH 0x02000000 -#define INST_FLUSH_MAP_CACHE 0x00000001 - -#define INST_DEST_BUFFER_INFO 0x06800000 - -#define INST_FRONT_BUFFER_INFO 0x06000000 -#define FRONT_INFO_ASYNC_FLIP 1<<6 -#define FRONT_INFO_PITCH_B 8 - -#define GFX_OP_USER_INTERRUPT ((0<<29)|(2<<23)) - - -/* Registers in the i810 host-pci bridge pci config space which affect - * the i810 graphics operations. - */ -#define SMRAM_MISCC 0x70 -#define GMS 0x000000c0 -#define GMS_DISABLE 0x00000000 -#define GMS_ENABLE_BARE 0x00000040 -#define GMS_ENABLE_512K 0x00000080 -#define GMS_ENABLE_1M 0x000000c0 -#define USMM 0x00000030 -#define USMM_DISABLE 0x00000000 -#define USMM_TSEG_ZERO 0x00000010 -#define USMM_TSEG_512K 0x00000020 -#define USMM_TSEG_1M 0x00000030 -#define GFX_MEM_WIN_SIZE 0x00010000 -#define GFX_MEM_WIN_32M 0x00010000 -#define GFX_MEM_WIN_64M 0x00000000 - -/* Overkill? I don't know. Need to figure out top of mem to make the - * SMRAM calculations come out. Linux seems to have problems - * detecting it all on its own, so this seems a reasonable double - * check to any user supplied 'mem=...' boot param. - * - * ... unfortunately this reg doesn't work according to spec on the - * test hardware. - */ -#define WHTCFG_PAMR_DRP 0x50 -#define SYS_DRAM_ROW_0_SHIFT 16 -#define SYS_DRAM_ROW_1_SHIFT 20 -#define DRAM_MASK 0x0f -#define DRAM_VALUE_0 0 -#define DRAM_VALUE_1 8 -/* No 2 value defined */ -#define DRAM_VALUE_3 16 -#define DRAM_VALUE_4 16 -#define DRAM_VALUE_5 24 -#define DRAM_VALUE_6 32 -#define DRAM_VALUE_7 32 -#define DRAM_VALUE_8 48 -#define DRAM_VALUE_9 64 -#define DRAM_VALUE_A 64 -#define DRAM_VALUE_B 96 -#define DRAM_VALUE_C 128 -#define DRAM_VALUE_D 128 -#define DRAM_VALUE_E 192 -#define DRAM_VALUE_F 256 /* nice one, geezer */ -#define LM_FREQ_MASK 0x10 -#define LM_FREQ_133 0x10 -#define LM_FREQ_100 0x00 - - - - -/* These are 3d state registers, but the state is invarient, so we let - * the X server handle it: - */ - - - -/* GFXRENDERSTATE_COLOR_CHROMA_KEY, p135 - */ -#define GFX_OP_COLOR_CHROMA_KEY ((0x3<<29)|(0x1d<<24)|(0x2<<16)|0x1) -#define CC1_UPDATE_KILL_WRITE (1<<28) -#define CC1_ENABLE_KILL_WRITE (1<<27) -#define CC1_DISABLE_KILL_WRITE 0 -#define CC1_UPDATE_COLOR_IDX (1<<26) -#define CC1_UPDATE_CHROMA_LOW (1<<25) -#define CC1_UPDATE_CHROMA_HI (1<<24) -#define CC1_CHROMA_LOW_MASK ((1<<24)-1) -#define CC2_COLOR_IDX_SHIFT 24 -#define CC2_COLOR_IDX_MASK (0xff<<24) -#define CC2_CHROMA_HI_MASK ((1<<24)-1) - - -#define GFX_CMD_CONTEXT_SEL ((0<<29)|(0x5<<23)) -#define CS_UPDATE_LOAD (1<<17) -#define CS_UPDATE_USE (1<<16) -#define CS_UPDATE_LOAD (1<<17) -#define CS_LOAD_CTX0 0 -#define CS_LOAD_CTX1 (1<<8) -#define CS_USE_CTX0 0 -#define CS_USE_CTX1 (1<<0) - -/* 3D Rendering Engine */ - -#define RENDER_CLIENT 0x60000000 - -/* Primitive rendering instruction */ - -#define GFX_PRIMITIVE 0x1f000000 -#define PRIMITIVE_TRIANGLE 0 << 18 -#define PRIMITIVE_TRI_STRIP 1 << 18 -#define PRIMITIVE_TRI_REV_STRIP 2 << 18 -#define PRIMITIVE_TRI_FAN 3 << 18 -#define PRIMITIVE_POLYGON 4 << 18 -#define PRIMITIVE_LINE 5 << 18 -#define PRIMITIVE_LINE_STRIP 6 << 18 -#define PRIMITIVE_RECTANGLE 7 << 18 - -/* Vertex format instruction */ -#define GFX_VERTEX_FORMAT 0x05000000 -#define VERTEX_0_TEXCOORDS 0 << 8 -#define VERTEX_1_TEXCOORDS 1 << 8 -#define VERTEX_2_TEXCOORDS 2 << 8 -#define VERTEX_SPECULAR_FOG 1 << 7 -#define VERTEX_DIFFUSE_ALPHA 1 << 6 -#define VERTEX_Z_OFFSET 1 << 5 -#define VERTEX_POS_XYZ 1 << 1 -#define VERTEX_POS_XYZ_RHW 2 << 1 -#define VERTEX_POS_XY 3 << 1 -#define VERTEX_POS_XY_RHW 4 << 1 - -/* Drawing Rectangle Info instruction */ - -#define GFX_DRAWING_RECTANGLE_INFO 0x1d800003 -#define GFX_DRAWING_CLIP_DISABLE 1<<31 - -/* Boolean enable 1 */ -#define GFX_BOOLEAN_ENA_1 0x03000000 -#define BOOL1_ALPHA_SETUP_MASK 1<<17 -#define BOOL1_ALPHA_SETUP_BIT 1<<16 -#define BOOL1_FOG_ENABLE_MASK 1<<7 -#define BOOL1_FOG_ENABLE_BIT 1<<6 -#define BOOL1_ALPHA_TEST_MASK 1<<5 -#define BOOL1_ALPHA_TEST_BIT 1<<4 -#define BOOL1_BLEND_ENABLE_MASK 1<<3 -#define BOOL1_BLEND_ENABLE_BIT 1<<2 -#define BOOL1_Z_ENABLE_MASK 1<<1 -#define BOOL1_Z_ENABLE_BIT 1<<0 - -/* Boolean enable 2 */ -#define GFX_BOOLEAN_ENA_2 0x04000000 -#define BOOL2_MAPPING_CACHE_MASK 1<<17 -#define BOOL2_MAPPING_CACHE_BIT 1<<16 -#define BOOL2_ALPHA_DITHER_MASK 1<<15 -#define BOOL2_ALPHA_DITHER_BIT 1<<14 -#define BOOL2_FOG_DITHER_MASK 1<<13 -#define BOOL2_FOG_DITHER_BIT 1<<12 -#define BOOL2_SPECULAR_DITHER_MASK 1<<11 -#define BOOL2_SPECULAR_DITHER_BIT 1<<10 -#define BOOL2_COLOR_DITHER_MASK 1<<9 -#define BOOL2_COLOR_DITHER_BIT 1<<8 -#define BOOL2_FB_WRITE_MASK 1<<3 -#define BOOL2_FB_WRITE_BIT 1<<2 -#define BOOL2_Z_WRITE_MASK 1<<1 -#define BOOL2_Z_WRITE_BIT 1<<0 - -/* Dest buffer variables */ - -#define GFX_DEST_BUFFER_VARIABLES 0x1d850000 - -#define DEST_BUF_VAR_8BIT 0 << 8 -#define DEST_BUF_VAR_555 1 << 8 -#define DEST_BUF_VAR_565 2 << 8 - -/* map color blend stages */ - -#define GFX_MAP_COLOR_BLEND_STAGES 0 - -#define MAP_BLEND_STAGE_B 20 -#define MAP_BLEND_ACC_SEL_MASK 1<<19 -#define MAP_BLEND_ACC_SEL_BIT 1<<18 -#define MAP_BLEND_ARG1_MASK 1<<17 -#define MAP_BLEND_ARG1_B 14 -#define MAP_BLEND_REPLICATE_ARG1 1<<13 -#define MAP_BLEND_INVERT_ARG1 1<<12 - -#define MAP_BLEND_ARG2_MASK 1<<11 -#define MAP_BLEND_ARG2_B 8 -#define MAP_BLEND_REPLICATE_ARG2 1<<7 -#define MAP_BLEND_INVERT_ARG2 1<<6 - -#define MAP_BLEND_COLOR_OP_MASK 1<<5 -#define MAP_BLEND_COLOR_OP_B 0 - -#define GFX_SCISSOR_ENABLE 0x1c800000 - -#define SCISSOR_ENABLE_MASK 1<<1 -#define SCISSOR_ENABLE_BIT 1<<0 diff --git a/hw/kdrive/i810/i810_video.c b/hw/kdrive/i810/i810_video.c deleted file mode 100644 index ac881d51d..000000000 --- a/hw/kdrive/i810/i810_video.c +++ /dev/null @@ -1,1136 +0,0 @@ -/* COPYRIGHT AND PERMISSION NOTICE - -Copyright (c) 2000, 2001 Nokia Home Communications - -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, provided that the above -copyright notice(s) and this permission notice appear in all copies of -the Software and that both the above copyright notice(s) and this -permission notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY -SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER -RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF -CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -of the copyright holder. - -X Window System is a trademark of The Open Group */ - -/*************************************************************************** - -Copyright 2000 Intel Corporation. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL INTEL, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - - -/* - * i810_video.c: i810 KDrive Xv driver. - * Based on the XFree86 i810 Xv driver by Jonathan Bian. - * - * Authors: - * Jonathan Bian - * Pontus Lidman - * - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "kdrive.h" -#include "kxv.h" -#include "i810.h" - -#include - -#include "fourcc.h" - -typedef struct { - CARD32 size; - CARD32 offset; -} FBLinearRec, *FBLinearPtr; - -#define OFF_DELAY 250 /* milliseconds */ -#define FREE_DELAY 15000 - -#define OFF_TIMER 0x01 -#define FREE_TIMER 0x02 -#define CLIENT_VIDEO_ON 0x04 - -#define TIMER_MASK (OFF_TIMER | FREE_TIMER) - -static KdVideoAdaptorPtr i810SetupImageVideo(ScreenPtr); -static void i810StopVideo(KdScreenInfo *, pointer, Bool); -static int i810SetPortAttribute(KdScreenInfo *, Atom, int, pointer); -static int i810GetPortAttribute(KdScreenInfo *, Atom, int *, pointer); -static void i810QueryBestSize(KdScreenInfo *, Bool, - short, short, short, short, unsigned int *, unsigned int *, pointer); -static int i810PutImage( KdScreenInfo *, DrawablePtr, - short, short, short, short, short, short, short, short, - int, unsigned char*, short, short, Bool, RegionPtr, pointer); -static int i810QueryImageAttributes(KdScreenInfo *, - int, unsigned short *, unsigned short *, int *, int *); - -static void i810BlockHandler(int, pointer, pointer, pointer); - -#define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE) - -static Atom xvBrightness, xvContrast, xvColorKey; - -#define IMAGE_MAX_WIDTH 720 -#define IMAGE_MAX_HEIGHT 576 -#define Y_BUF_SIZE (IMAGE_MAX_WIDTH * IMAGE_MAX_HEIGHT) - -#define OVERLAY_UPDATE(p) OUTREG(0x30000, p | 0x80000000); - -/* - * OV0CMD - Overlay Command Register - */ -#define VERTICAL_CHROMINANCE_FILTER 0x70000000 -#define VC_SCALING_OFF 0x00000000 -#define VC_LINE_REPLICATION 0x10000000 -#define VC_UP_INTERPOLATION 0x20000000 -#define VC_PIXEL_DROPPING 0x50000000 -#define VC_DOWN_INTERPOLATION 0x60000000 -#define VERTICAL_LUMINANCE_FILTER 0x0E000000 -#define VL_SCALING_OFF 0x00000000 -#define VL_LINE_REPLICATION 0x02000000 -#define VL_UP_INTERPOLATION 0x04000000 -#define VL_PIXEL_DROPPING 0x0A000000 -#define VL_DOWN_INTERPOLATION 0x0C000000 -#define HORIZONTAL_CHROMINANCE_FILTER 0x01C00000 -#define HC_SCALING_OFF 0x00000000 -#define HC_LINE_REPLICATION 0x00400000 -#define HC_UP_INTERPOLATION 0x00800000 -#define HC_PIXEL_DROPPING 0x01400000 -#define HC_DOWN_INTERPOLATION 0x01800000 -#define HORIZONTAL_LUMINANCE_FILTER 0x00380000 -#define HL_SCALING_OFF 0x00000000 -#define HL_LINE_REPLICATION 0x00080000 -#define HL_UP_INTERPOLATION 0x00100000 -#define HL_PIXEL_DROPPING 0x00280000 -#define HL_DOWN_INTERPOLATION 0x00300000 - -#define Y_ADJUST 0x00010000 -#define OV_BYTE_ORDER 0x0000C000 -#define UV_SWAP 0x00004000 -#define Y_SWAP 0x00008000 -#define Y_AND_UV_SWAP 0x0000C000 -#define SOURCE_FORMAT 0x00003C00 -#define RGB_555 0x00000800 -#define RGB_565 0x00000C00 -#define YUV_422 0x00002000 -#define YUV_411 0x00002400 -#define YUV_420 0x00003000 -#define YUV_410 0x00003800 -#define BUFFER_AND_FIELD 0x00000006 -#define BUFFER0_FIELD0 0x00000000 -#define BUFFER1_FIELD0 0x00000004 -#define OVERLAY_ENABLE 0x00000001 - -/* - * DOV0STA - Display/Overlay 0 Status Register - */ -#define DOV0STA 0x30008 - -#define MINUV_SCALE 0x1 - -#define RGB16ToColorKey(c) \ - (((c & 0xF800) << 8) | ((c & 0x07E0) << 5) | ((c & 0x001F) << 3)) - -#define RGB15ToColorKey(c) \ - (((c & 0x7c00) << 9) | ((c & 0x03E0) << 6) | ((c & 0x001F) << 3)) - -Bool i810InitVideo(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - KdVideoAdaptorPtr *adaptors, *newAdaptors = NULL; - KdVideoAdaptorPtr newAdaptor = NULL; - int num_adaptors; - -/* fprintf(stderr,"i810InitVideo\n"); */ - - if (screen->fb[0].bitsPerPixel != 8) - { - newAdaptor = i810SetupImageVideo(pScreen); - } - - num_adaptors = KdXVListGenericAdaptors(screen, &adaptors); - - if(newAdaptor) { - if(!num_adaptors) { - num_adaptors = 1; - adaptors = &newAdaptor; - } else { - newAdaptors = /* need to free this someplace */ - xalloc((num_adaptors + 1) * sizeof(KdVideoAdaptorPtr*)); - if(newAdaptors) { - memcpy(newAdaptors, adaptors, num_adaptors * - sizeof(KdVideoAdaptorPtr)); - newAdaptors[num_adaptors] = newAdaptor; - adaptors = newAdaptors; - num_adaptors++; - } - } - } - - if(num_adaptors) - KdXVScreenInit(pScreen, adaptors, num_adaptors); - - if(newAdaptors) - xfree(newAdaptors); - return TRUE; -} - -/* client libraries expect an encoding */ -static KdVideoEncodingRec DummyEncoding[1] = -{ - { - 0, - "XV_IMAGE", - IMAGE_MAX_WIDTH, IMAGE_MAX_HEIGHT, - {1, 1} - } -}; - -#define NUM_FORMATS 3 - -static KdVideoFormatRec Formats[NUM_FORMATS] = -{ - {15, TrueColor}, {16, TrueColor}, {24, TrueColor} -}; - -#define NUM_ATTRIBUTES 3 - -static KdAttributeRec Attributes[NUM_ATTRIBUTES] = -{ - {XvSettable | XvGettable, 0, (1 << 24) - 1, "XV_COLORKEY"}, - {XvSettable | XvGettable, -128, 127, "XV_BRIGHTNESS"}, - {XvSettable | XvGettable, 0, 255, "XV_CONTRAST"} -}; - -#define NUM_IMAGES 4 - -static KdImageRec Images[NUM_IMAGES] = -{ - XVIMAGE_YUY2, - XVIMAGE_YV12, - XVIMAGE_I420, - XVIMAGE_UYVY -}; - -typedef struct { - CARD32 OBUF_0Y; - CARD32 OBUF_1Y; - CARD32 OBUF_0U; - CARD32 OBUF_0V; - CARD32 OBUF_1U; - CARD32 OBUF_1V; - CARD32 OV0STRIDE; - CARD32 YRGB_VPH; - CARD32 UV_VPH; - CARD32 HORZ_PH; - CARD32 INIT_PH; - CARD32 DWINPOS; - CARD32 DWINSZ; - CARD32 SWID; - CARD32 SWIDQW; - CARD32 SHEIGHT; - CARD32 YRGBSCALE; - CARD32 UVSCALE; - CARD32 OV0CLRC0; - CARD32 OV0CLRC1; - CARD32 DCLRKV; - CARD32 DCLRKM; - CARD32 SCLRKVH; - CARD32 SCLRKVL; - CARD32 SCLRKM; - CARD32 OV0CONF; - CARD32 OV0CMD; -} I810OverlayRegRec, *I810OverlayRegPtr; - -typedef struct { - CARD32 YBuf0offset; - CARD32 UBuf0offset; - CARD32 VBuf0offset; - - CARD32 YBuf1offset; - CARD32 UBuf1offset; - CARD32 VBuf1offset; - - unsigned char currentBuf; - - unsigned char brightness; - unsigned char contrast; - - RegionRec clip; - CARD32 colorKey; - - CARD32 videoStatus; - Time offTime; - Time freeTime; - FBLinearPtr linear; -} I810PortPrivRec, *I810PortPrivPtr; - -#define GET_PORT_PRIVATE(screen) \ - (I810PortPrivPtr)(((I810CardInfo *) (screen->card->driver))->adaptor->pPortPrivates[0].ptr) - -static void i810ResetVideo(KdScreenInfo *screen) -{ - ScreenPtr pScreen = screen->pScreen; - KdScreenPriv(pScreen); - KdCardInfo *card = pScreenPriv->card; - I810CardInfo *i810c = (I810CardInfo *) card->driver; - - I810PortPrivPtr pPriv = i810c->adaptor->pPortPrivates[0].ptr; - I810OverlayRegPtr overlay = (I810OverlayRegPtr) (i810c->FbBase + i810c->OverlayStart); - - /* - * Default to maximum image size in YV12 - */ - - overlay->YRGB_VPH = 0; - overlay->UV_VPH = 0; - overlay->HORZ_PH = 0; - overlay->INIT_PH = 0; - overlay->DWINPOS = 0; - overlay->DWINSZ = (IMAGE_MAX_HEIGHT << 16) | IMAGE_MAX_WIDTH; - overlay->SWID = IMAGE_MAX_WIDTH | (IMAGE_MAX_WIDTH << 15); - overlay->SWIDQW = (IMAGE_MAX_WIDTH >> 3) | (IMAGE_MAX_WIDTH << 12); - overlay->SHEIGHT = IMAGE_MAX_HEIGHT | (IMAGE_MAX_HEIGHT << 15); - overlay->YRGBSCALE = 0x80004000; /* scale factor 1 */ - overlay->UVSCALE = 0x80004000; /* scale factor 1 */ - overlay->OV0CLRC0 = 0x4000; /* brightness: 0 contrast: 1.0 */ - overlay->OV0CLRC1 = 0x80; /* saturation: bypass */ - - /* - * Enable destination color keying - */ - switch(screen->fb[0].depth) { - case 16: overlay->DCLRKV = RGB16ToColorKey(pPriv->colorKey); - overlay->DCLRKM = 0x80070307; - break; - case 15: overlay->DCLRKV = RGB15ToColorKey(pPriv->colorKey); - overlay->DCLRKM = 0x80070707; - break; - default: overlay->DCLRKV = pPriv->colorKey; - overlay->DCLRKM = 0x80000000; - break; - } - - overlay->SCLRKVH = 0; - overlay->SCLRKVL = 0; - overlay->SCLRKM = 0; /* source color key disable */ - overlay->OV0CONF = 0; /* two 720 pixel line buffers */ - - overlay->OV0CMD = VC_UP_INTERPOLATION | HC_UP_INTERPOLATION | Y_ADJUST | - YUV_420; - - OVERLAY_UPDATE(i810c->OverlayPhysical); -} - - -static KdVideoAdaptorPtr -i810SetupImageVideo(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - KdCardInfo *card = pScreenPriv->card; - I810CardInfo *i810c = (I810CardInfo *) card->driver; - - - KdVideoAdaptorPtr adapt; - I810PortPrivPtr pPriv; - -/* fprintf(stderr,"i810SetupImageVideo\n"); */ - - if(!(adapt = xcalloc(1, sizeof(KdVideoAdaptorRec) + - sizeof(I810PortPrivRec) + - sizeof(DevUnion)))) - return NULL; - - adapt->type = XvWindowMask | XvInputMask | XvImageMask; - adapt->flags = VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT; - adapt->name = "I810 Video Overlay"; - adapt->nEncodings = 1; - adapt->pEncodings = DummyEncoding; - adapt->nFormats = NUM_FORMATS; - adapt->pFormats = Formats; - adapt->nPorts = 1; - adapt->pPortPrivates = (DevUnion*)(&adapt[1]); - - pPriv = (I810PortPrivPtr)(&adapt->pPortPrivates[1]); - - adapt->pPortPrivates[0].ptr = (pointer)(pPriv); - adapt->pAttributes = Attributes; - adapt->nImages = NUM_IMAGES; - adapt->nAttributes = NUM_ATTRIBUTES; - adapt->pImages = Images; - adapt->PutVideo = NULL; - adapt->PutStill = NULL; - adapt->GetVideo = NULL; - adapt->GetStill = NULL; - adapt->StopVideo = i810StopVideo; - adapt->SetPortAttribute = i810SetPortAttribute; - adapt->GetPortAttribute = i810GetPortAttribute; - adapt->QueryBestSize = i810QueryBestSize; - adapt->PutImage = i810PutImage; - adapt->QueryImageAttributes = i810QueryImageAttributes; - - pPriv->colorKey = i810c->colorKey & ((1 << screen->fb[0].depth) - 1); - pPriv->videoStatus = 0; - pPriv->brightness = 0; - pPriv->contrast = 128; - pPriv->linear = NULL; - pPriv->currentBuf = 0; - - /* gotta uninit this someplace */ - REGION_INIT(pScreen, &pPriv->clip, NullBox, 0); - - i810c->adaptor = adapt; - - i810c->BlockHandler = pScreen->BlockHandler; - pScreen->BlockHandler = i810BlockHandler; - - xvBrightness = MAKE_ATOM("XV_BRIGHTNESS"); - xvContrast = MAKE_ATOM("XV_CONTRAST"); - xvColorKey = MAKE_ATOM("XV_COLORKEY"); - - i810ResetVideo(screen); - - return adapt; -} - - -/* I810ClipVideo - - - Takes the dst box in standard X BoxRec form (top and left - edges inclusive, bottom and right exclusive). The new dst - box is returned. The source boundaries are given (x1, y1 - inclusive, x2, y2 exclusive) and returned are the new source - boundaries in 16.16 fixed point. -*/ - -static void -I810ClipVideo( - BoxPtr dst, - INT32 *x1, - INT32 *x2, - INT32 *y1, - INT32 *y2, - BoxPtr extents, /* extents of the clip region */ - INT32 width, - INT32 height -){ - INT32 vscale, hscale, delta; - int diff; - - hscale = ((*x2 - *x1) << 16) / (dst->x2 - dst->x1); - vscale = ((*y2 - *y1) << 16) / (dst->y2 - dst->y1); - - *x1 <<= 16; *x2 <<= 16; - *y1 <<= 16; *y2 <<= 16; - - diff = extents->x1 - dst->x1; - if(diff > 0) { - dst->x1 = extents->x1; - *x1 += diff * hscale; - } - diff = dst->x2 - extents->x2; - if(diff > 0) { - dst->x2 = extents->x2; - *x2 -= diff * hscale; - } - diff = extents->y1 - dst->y1; - if(diff > 0) { - dst->y1 = extents->y1; - *y1 += diff * vscale; - } - diff = dst->y2 - extents->y2; - if(diff > 0) { - dst->y2 = extents->y2; - *y2 -= diff * vscale; - } - - if(*x1 < 0) { - diff = (- *x1 + hscale - 1)/ hscale; - dst->x1 += diff; - *x1 += diff * hscale; - } - delta = *x2 - (width << 16); - if(delta > 0) { - diff = (delta + hscale - 1)/ hscale; - dst->x2 -= diff; - *x2 -= diff * hscale; - } - if(*y1 < 0) { - diff = (- *y1 + vscale - 1)/ vscale; - dst->y1 += diff; - *y1 += diff * vscale; - } - delta = *y2 - (height << 16); - if(delta > 0) { - diff = (delta + vscale - 1)/ vscale; - dst->y2 -= diff; - *y2 -= diff * vscale; - } -} - -static void -i810StopVideo(KdScreenInfo *screen, pointer data, Bool exit) -{ - I810PortPrivPtr pPriv = (I810PortPrivPtr)data; - KdCardInfo *card = screen->card; - I810CardInfo *i810c = (I810CardInfo *) card->driver; - - I810OverlayRegPtr overlay = (I810OverlayRegPtr) (i810c->FbBase + i810c->OverlayStart); - - REGION_EMPTY(screen->pScreen, &pPriv->clip); - - if(exit) { - if(pPriv->videoStatus & CLIENT_VIDEO_ON) { - overlay->OV0CMD &= 0xFFFFFFFE; - OVERLAY_UPDATE(i810c->OverlayPhysical); - } - if(pPriv->linear) { - xfree(pPriv->linear); - pPriv->linear = NULL; - } - pPriv->videoStatus = 0; - } else { - if(pPriv->videoStatus & CLIENT_VIDEO_ON) { - pPriv->videoStatus |= OFF_TIMER; - pPriv->offTime = currentTime.milliseconds + OFF_DELAY; - } - } - -} - -static int -i810SetPortAttribute( - KdScreenInfo *screen, - Atom attribute, - int value, - pointer data -){ - I810PortPrivPtr pPriv = (I810PortPrivPtr)data; - KdCardInfo *card = screen->card; - I810CardInfo *i810c = (I810CardInfo *) card->driver; - - I810OverlayRegPtr overlay = (I810OverlayRegPtr) (i810c->FbBase + i810c->OverlayStart); - - if(attribute == xvBrightness) { - if((value < -128) || (value > 127)) - return BadValue; - pPriv->brightness = value; - overlay->OV0CLRC0 &= 0xFFFFFF00; - overlay->OV0CLRC0 |= value; - OVERLAY_UPDATE(i810c->OverlayPhysical); - } else - if(attribute == xvContrast) { - if((value < 0) || (value > 255)) - return BadValue; - pPriv->contrast = value; - overlay->OV0CLRC0 &= 0xFFFE00FF; - overlay->OV0CLRC0 |= value << 9; - OVERLAY_UPDATE(i810c->OverlayPhysical); - } else - if(attribute == xvColorKey) { - pPriv->colorKey = value; - switch(screen->fb[0].depth) { - case 16: overlay->DCLRKV = RGB16ToColorKey(pPriv->colorKey); - break; - case 15: overlay->DCLRKV = RGB15ToColorKey(pPriv->colorKey); - break; - default: overlay->DCLRKV = pPriv->colorKey; - break; - } - OVERLAY_UPDATE(i810c->OverlayPhysical); - REGION_EMPTY(screen->pScreen, &pPriv->clip); - } else return BadMatch; - - return Success; -} - -static int -i810GetPortAttribute( - KdScreenInfo *screen, - Atom attribute, - int *value, - pointer data -){ - I810PortPrivPtr pPriv = (I810PortPrivPtr)data; - - if(attribute == xvBrightness) { - *value = pPriv->brightness; - } else - if(attribute == xvContrast) { - *value = pPriv->contrast; - } else - if(attribute == xvColorKey) { - *value = pPriv->colorKey; - } else return BadMatch; - - return Success; -} - -static void -i810QueryBestSize( - KdScreenInfo *screen, - Bool motion, - short vid_w, short vid_h, - short drw_w, short drw_h, - unsigned int *p_w, unsigned int *p_h, - pointer data -){ - *p_w = drw_w; - *p_h = drw_h; -} - - -static void -I810CopyPackedData( - KdScreenInfo *screen, - unsigned char *buf, - int srcPitch, - int dstPitch, - int top, - int left, - int h, - int w - ) -{ - KdCardInfo *card = screen->card; - I810CardInfo *i810c = (I810CardInfo *) card->driver; - I810PortPrivPtr pPriv = i810c->adaptor->pPortPrivates[0].ptr; - unsigned char *src, *dst; - - src = buf + (top*srcPitch) + (left<<1); - - if (pPriv->currentBuf == 0) - dst = i810c->FbBase + pPriv->YBuf0offset; - else - dst = i810c->FbBase + pPriv->YBuf1offset; - - w <<= 1; - while(h--) { - memcpy(dst, src, w); - src += srcPitch; - dst += dstPitch; - } -} - -static void -i810CopyPlanarData( - KdScreenInfo *screen, - unsigned char *buf, - int srcPitch, - int dstPitch, /* of chroma */ - int srcH, - int top, - int left, - int h, - int w, - int id - ) -{ - KdCardInfo *card = screen->card; - I810CardInfo *i810c = (I810CardInfo *) card->driver; - I810PortPrivPtr pPriv = i810c->adaptor->pPortPrivates[0].ptr; - int i; - unsigned char *src1, *src2, *src3, *dst1, *dst2, *dst3; - - /* Copy Y data */ - src1 = buf + (top*srcPitch) + left; - if (pPriv->currentBuf == 0) - dst1 = i810c->FbBase + pPriv->YBuf0offset; - else - dst1 = i810c->FbBase + pPriv->YBuf1offset; - - for (i = 0; i < h; i++) { - memcpy(dst1, src1, w); - src1 += srcPitch; - dst1 += dstPitch << 1; - } - - /* Copy V data for YV12, or U data for I420 */ - src2 = buf + (srcH*srcPitch) + ((top*srcPitch)>>2) + (left>>1); - if (pPriv->currentBuf == 0) { - if (id == FOURCC_I420) - dst2 = i810c->FbBase + pPriv->UBuf0offset; - else - dst2 = i810c->FbBase + pPriv->VBuf0offset; - } else { - if (id == FOURCC_I420) - dst2 = i810c->FbBase + pPriv->UBuf1offset; - else - dst2 = i810c->FbBase + pPriv->VBuf1offset; - } - - for (i = 0; i < h/2; i++) { - memcpy(dst2, src2, w/2); - src2 += srcPitch>>1; - dst2 += dstPitch; - } - - /* Copy U data for YV12, or V data for I420 */ - src3 = buf + (srcH*srcPitch) + ((srcH*srcPitch)>>2) + ((top*srcPitch)>>2) + (left>>1); - if (pPriv->currentBuf == 0) { - if (id == FOURCC_I420) - dst3 = i810c->FbBase + pPriv->VBuf0offset; - else - dst3 = i810c->FbBase + pPriv->UBuf0offset; - } else { - if (id == FOURCC_I420) - dst3 = i810c->FbBase + pPriv->VBuf1offset; - else - dst3 = i810c->FbBase + pPriv->UBuf1offset; - } - - for (i = 0; i < h/2; i++) { - memcpy(dst3, src3, w/2); - src3 += srcPitch>>1; - dst3 += dstPitch; - } -} - -static void -i810DisplayVideo( - KdScreenInfo *screen, - int id, - short width, short height, - int dstPitch, /* of chroma for 4:2:0 */ - int x1, int y1, int x2, int y2, - BoxPtr dstBox, - short src_w, short src_h, - short drw_w, short drw_h -){ - KdCardInfo *card = screen->card; - I810CardInfo *i810c = (I810CardInfo *) card->driver; - I810PortPrivPtr pPriv = i810c->adaptor->pPortPrivates[0].ptr; - I810OverlayRegPtr overlay = (I810OverlayRegPtr) (i810c->FbBase + i810c->OverlayStart); - int xscaleInt, xscaleFract, yscaleInt, yscaleFract; - int xscaleIntUV = 0, xscaleFractUV = 0, yscaleIntUV = 0, yscaleFractUV = 0; - unsigned int swidth; - - switch(id) { - case FOURCC_YV12: - case FOURCC_I420: - swidth = (width + 7) & ~7; - overlay->SWID = (swidth << 15) | swidth; - overlay->SWIDQW = (swidth << 12) | (swidth >> 3); - break; - case FOURCC_UYVY: - case FOURCC_YUY2: - default: - swidth = ((width + 3) & ~3) << 1; - overlay->SWID = swidth; - overlay->SWIDQW = swidth >> 3; - break; - } - - overlay->SHEIGHT = height | (height << 15); - overlay->DWINPOS = (dstBox->y1 << 16) | dstBox->x1; - overlay->DWINSZ = ((dstBox->y2 - dstBox->y1) << 16) | - (dstBox->x2 - dstBox->x1); - - /* buffer locations */ - overlay->OBUF_0Y = pPriv->YBuf0offset; - overlay->OBUF_1Y = pPriv->YBuf1offset; - overlay->OBUF_0U = pPriv->UBuf0offset; - overlay->OBUF_0V = pPriv->VBuf0offset; - overlay->OBUF_1U = pPriv->UBuf1offset; - overlay->OBUF_1V = pPriv->VBuf1offset; - - /* - * Calculate horizontal and vertical scaling factors, default to 1:1 - */ - overlay->YRGBSCALE = 0x80004000; - overlay->UVSCALE = 0x80004000; - - /* - * Initially, YCbCr and Overlay Enable and - * vertical chrominance up interpolation and horozontal chrominance - * up interpolation - */ - overlay->OV0CMD = VC_UP_INTERPOLATION | HC_UP_INTERPOLATION | Y_ADJUST | - OVERLAY_ENABLE; - - if ((drw_w != src_w) || (drw_h != src_h)) - { - xscaleInt = (src_w / drw_w) & 0x3; - xscaleFract = (src_w << 12) / drw_w; - yscaleInt = (src_h / drw_h) & 0x3; - yscaleFract = (src_h << 12) / drw_h; - - overlay->YRGBSCALE = (xscaleInt << 15) | - ((xscaleFract & 0xFFF) << 3) | - (yscaleInt) | - ((yscaleFract & 0xFFF) << 20); - - if (drw_w > src_w) - { - /* horizontal up-scaling */ - overlay->OV0CMD &= ~HORIZONTAL_CHROMINANCE_FILTER; - overlay->OV0CMD &= ~HORIZONTAL_LUMINANCE_FILTER; - overlay->OV0CMD |= (HC_UP_INTERPOLATION | HL_UP_INTERPOLATION); - } - - if (drw_h > src_h) - { - /* vertical up-scaling */ - overlay->OV0CMD &= ~VERTICAL_CHROMINANCE_FILTER; - overlay->OV0CMD &= ~VERTICAL_LUMINANCE_FILTER; - overlay->OV0CMD |= (VC_UP_INTERPOLATION | VL_UP_INTERPOLATION); - } - - if (drw_w < src_w) - { - /* horizontal down-scaling */ - overlay->OV0CMD &= ~HORIZONTAL_CHROMINANCE_FILTER; - overlay->OV0CMD &= ~HORIZONTAL_LUMINANCE_FILTER; - overlay->OV0CMD |= (HC_DOWN_INTERPOLATION | HL_DOWN_INTERPOLATION); - } - - if (drw_h < src_h) - { - /* vertical down-scaling */ - overlay->OV0CMD &= ~VERTICAL_CHROMINANCE_FILTER; - overlay->OV0CMD &= ~VERTICAL_LUMINANCE_FILTER; - overlay->OV0CMD |= (VC_DOWN_INTERPOLATION | VL_DOWN_INTERPOLATION); - } - - /* now calculate the UV scaling factor */ - - if (xscaleFract) - { - xscaleFractUV = xscaleFract >> MINUV_SCALE; - overlay->OV0CMD &= ~HC_DOWN_INTERPOLATION; - overlay->OV0CMD |= HC_UP_INTERPOLATION; - } - - if (xscaleInt) - { - xscaleIntUV = xscaleInt >> MINUV_SCALE; - if (xscaleIntUV) - { - overlay->OV0CMD &= ~HC_UP_INTERPOLATION; - } - } - - if (yscaleFract) - { - yscaleFractUV = yscaleFract >> MINUV_SCALE; - overlay->OV0CMD &= ~VC_DOWN_INTERPOLATION; - overlay->OV0CMD |= VC_UP_INTERPOLATION; - } - - if (yscaleInt) - { - yscaleIntUV = yscaleInt >> MINUV_SCALE; - if (yscaleIntUV) - { - overlay->OV0CMD &= ~VC_UP_INTERPOLATION; - overlay->OV0CMD |= VC_DOWN_INTERPOLATION; - } - } - - overlay->UVSCALE = yscaleIntUV | ((xscaleFractUV & 0xFFF) << 3) | - ((yscaleFractUV & 0xFFF) << 20); - } - - switch(id) { - case FOURCC_YV12: - case FOURCC_I420: - overlay->OV0STRIDE = (dstPitch << 1) | (dstPitch << 16); - overlay->OV0CMD &= ~SOURCE_FORMAT; - overlay->OV0CMD |= YUV_420; - break; - case FOURCC_UYVY: - case FOURCC_YUY2: - default: - overlay->OV0STRIDE = dstPitch; - overlay->OV0CMD &= ~SOURCE_FORMAT; - overlay->OV0CMD |= YUV_422; - overlay->OV0CMD &= ~OV_BYTE_ORDER; - if (id == FOURCC_UYVY) - overlay->OV0CMD |= Y_SWAP; - break; - } - - overlay->OV0CMD &= ~BUFFER_AND_FIELD; - if (pPriv->currentBuf == 0) - overlay->OV0CMD |= BUFFER0_FIELD0; - else - overlay->OV0CMD |= BUFFER1_FIELD0; - - OVERLAY_UPDATE(i810c->OverlayPhysical); - -} - -static FBLinearPtr -i810AllocateMemory( - KdScreenInfo *screen, - FBLinearPtr linear, - int size -){ - KdCardInfo *card=screen->card; - I810CardInfo *i810c = (I810CardInfo *) card->driver; - FBLinearPtr new_linear; - - if(linear) { - if(linear->size >= size) - return linear; - else - ErrorF("Ran out of memory for overlay buffer, requested size = %d\n",size); - } - - new_linear = xalloc(sizeof(FBLinearRec)); - new_linear->size = i810c->XvMem.Size; - new_linear->offset = i810c->XvMem.Start; - -/* fprintf(stderr,"Overlay mem offset %lx\n",new_linear->offset); */ - - return new_linear; -} - -static int -i810PutImage(KdScreenInfo *screen, - DrawablePtr pDraw, - short src_x, - short src_y, - short drw_x, - short drw_y, - short src_w, - short src_h, - short drw_w, - short drw_h, - int id, - unsigned char *buf, - short width, - short height, - Bool sync, - RegionPtr clipBoxes, - pointer data) -{ - KdCardInfo *card = screen->card; - I810CardInfo *i810c = (I810CardInfo *) card->driver; - I810PortPrivPtr pPriv = (I810PortPrivPtr)data; - INT32 x1, x2, y1, y2; - int srcPitch, dstPitch; - int top, left, npixels, nlines, size; - BoxRec dstBox; - - /* Clip */ - x1 = src_x; - x2 = src_x + src_w; - y1 = src_y; - y2 = src_y + src_h; - - dstBox.x1 = drw_x; - dstBox.x2 = drw_x + drw_w; - dstBox.y1 = drw_y; - dstBox.y2 = drw_y + drw_h; - - I810ClipVideo(&dstBox, &x1, &x2, &y1, &y2, - REGION_EXTENTS(pScreen, clipBoxes), width, height); - - if((x1 >= x2) || (y1 >= y2)) - return Success; - - switch(id) { - case FOURCC_YV12: - case FOURCC_I420: - srcPitch = (width + 3) & ~3; - dstPitch = ((width >> 1) + 7) & ~7; /* of chroma */ - size = dstPitch * height * 3; - break; - case FOURCC_UYVY: - case FOURCC_YUY2: - default: - srcPitch = (width << 1); - dstPitch = (srcPitch + 7) & ~7; - size = dstPitch * height; - break; - } - - if(!(pPriv->linear = i810AllocateMemory(screen, pPriv->linear, - (screen->fb[0].bitsPerPixel == 16) ? size : (size >> 1)))) - return BadAlloc; - - /* fixup pointers */ - pPriv->YBuf0offset = pPriv->linear->offset; - pPriv->UBuf0offset = pPriv->YBuf0offset + (dstPitch * 2 * height); - pPriv->VBuf0offset = pPriv->UBuf0offset + (dstPitch * height >> 1); - - pPriv->YBuf1offset = pPriv->linear->offset + size; - pPriv->UBuf1offset = pPriv->YBuf1offset + (dstPitch * 2 * height); - pPriv->VBuf1offset = pPriv->UBuf1offset + (dstPitch * height >> 1); - - /* wait for the last rendered buffer to be flipped in */ - while (((INREG(DOV0STA)&0x00100000)>>20) != pPriv->currentBuf); - - /* buffer swap */ - if (pPriv->currentBuf == 0) - pPriv->currentBuf = 1; - else - pPriv->currentBuf = 0; - - /* copy data */ - top = y1 >> 16; - left = (x1 >> 16) & ~1; - npixels = ((((x2 + 0xffff) >> 16) + 1) & ~1) - left; - - switch(id) { - case FOURCC_YV12: - case FOURCC_I420: - top &= ~1; - nlines = ((((y2 + 0xffff) >> 16) + 1) & ~1) - top; - i810CopyPlanarData(screen, buf, srcPitch, dstPitch, height, top, left, - nlines, npixels, id); - break; - case FOURCC_UYVY: - case FOURCC_YUY2: - default: - nlines = ((y2 + 0xffff) >> 16) - top; - I810CopyPackedData(screen, buf, srcPitch, dstPitch, top, left, nlines, - npixels); - break; - } - - /* update cliplist */ - if(!REGION_EQUAL(screen->pScreen, &pPriv->clip, clipBoxes)) { - REGION_COPY(screen->pScreen, &pPriv->clip, clipBoxes); - KXVPaintRegion (pDraw, &pPriv->clip, pPriv->colorKey); - } - - - i810DisplayVideo(screen, id, width, height, dstPitch, - x1, y1, x2, y2, &dstBox, src_w, src_h, drw_w, drw_h); - - pPriv->videoStatus = CLIENT_VIDEO_ON; - - return Success; -} - - -static int -i810QueryImageAttributes( - KdScreenInfo *screen, - int id, - unsigned short *w, unsigned short *h, - int *pitches, int *offsets -){ - int size, tmp; - - if(*w > 720) *w = 720; - if(*h > 576) *h = 576; - - *w = (*w + 1) & ~1; - if(offsets) offsets[0] = 0; - - switch(id) { - case FOURCC_YV12: - case FOURCC_I420: - *h = (*h + 1) & ~1; - size = (*w + 3) & ~3; - if(pitches) pitches[0] = size; - size *= *h; - if(offsets) offsets[1] = size; - tmp = ((*w >> 1) + 3) & ~3; - if(pitches) pitches[1] = pitches[2] = tmp; - tmp *= (*h >> 1); - size += tmp; - if(offsets) offsets[2] = size; - size += tmp; - break; - case FOURCC_UYVY: - case FOURCC_YUY2: - default: - size = *w << 1; - if(pitches) pitches[0] = size; - size *= *h; - break; - } - - return size; -} - -static void -i810BlockHandler ( - int i, - pointer blockData, - pointer pTimeout, - pointer pReadmask -){ - ScreenPtr pScreen = screenInfo.screens[i]; - KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - KdCardInfo *card = screen->card; - I810CardInfo *i810c = (I810CardInfo *) card->driver; - I810PortPrivPtr pPriv = GET_PORT_PRIVATE(screen); - I810OverlayRegPtr overlay = (I810OverlayRegPtr) (i810c->FbBase + i810c->OverlayStart); - - pScreen->BlockHandler = i810c->BlockHandler; - - (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask); - - pScreen->BlockHandler = i810BlockHandler; - - if(pPriv->videoStatus & TIMER_MASK) { - UpdateCurrentTime(); - if(pPriv->videoStatus & OFF_TIMER) { - if(pPriv->offTime < currentTime.milliseconds) { - /* Turn off the overlay */ - overlay->OV0CMD &= 0xFFFFFFFE; - OVERLAY_UPDATE(i810c->OverlayPhysical); - - pPriv->videoStatus = FREE_TIMER; - pPriv->freeTime = currentTime.milliseconds + FREE_DELAY; - } - } else { /* FREE_TIMER */ - if(pPriv->freeTime < currentTime.milliseconds) { - if(pPriv->linear) { - xfree(pPriv->linear); - pPriv->linear = NULL; - } - pPriv->videoStatus = 0; - } - } - } -} diff --git a/hw/kdrive/i810/i810draw.c b/hw/kdrive/i810/i810draw.c deleted file mode 100644 index b571efbe0..000000000 --- a/hw/kdrive/i810/i810draw.c +++ /dev/null @@ -1,352 +0,0 @@ -/* COPYRIGHT AND PERMISSION NOTICE - -Copyright (c) 2000, 2001 Nokia Home Communications - -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, provided that the above -copyright notice(s) and this permission notice appear in all copies of -the Software and that both the above copyright notice(s) and this -permission notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY -SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER -RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF -CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -of the copyright holder. - -X Window System is a trademark of The Open Group */ - -/* Hardware accelerated drawing for KDrive i810 driver. - Author: Pontus Lidman -*/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "kdrive.h" -#include "kaa.h" -#ifdef XV -#include "kxv.h" -#endif -#include "i810.h" -#include "i810_reg.h" - -//#include "Xmd.h" -#include "gcstruct.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "regionstr.h" -#include "mistruct.h" -#include "dixfontstr.h" -#include "fb.h" -#include "migc.h" -#include "miline.h" -#include "picturestr.h" - -#define NUM_STACK_RECTS 1024 - -i810ScreenInfo *accel_i810s; - -static int -i810WaitLpRing(i810ScreenInfo *i810s, int n, int timeout_millis) -{ - i810CardInfo *i810c = i810s->i810c; - I810RingBuffer *ring = &(i810c->LpRing); - int iters = 0; - int start = 0; - int now = 0; - int last_head = 0; - int first = 0; - - /* If your system hasn't moved the head pointer in 2 seconds, I'm going to - * call it crashed. - */ - if (timeout_millis == 0) - timeout_millis = 2000; - - if (I810_DEBUG) { - fprintf(stderr, "i810WaitLpRing %d\n", n); - first = GetTimeInMillis(); - } - - while (ring->space < n) - { - int i; - - ring->head = INREG(LP_RING + RING_HEAD) & HEAD_ADDR; - ring->space = ring->head - (ring->tail+8); - - if (ring->space < 0) - ring->space += ring->mem.Size; - - iters++; - now = GetTimeInMillis(); - if ( start == 0 || now < start || ring->head != last_head) { - if (I810_DEBUG) - if (now > start) - fprintf(stderr, "space: %d wanted %d\n", ring->space, n ); - start = now; - last_head = ring->head; - } else if ( now - start > timeout_millis ) { - - i810PrintErrorState(i810c); - fprintf(stderr, "space: %d wanted %d\n", ring->space, n ); - FatalError("lockup\n"); - } - - for (i = 0 ; i < 2000 ; i++) - ; - } - - if (I810_DEBUG) - { - now = GetTimeInMillis(); - if (now - first) { - fprintf(stderr,"Elapsed %d ms\n", now - first); - fprintf(stderr, "space: %d wanted %d\n", ring->space, n ); - } - } - - return iters; -} - -static void -i810Sync(i810ScreenInfo *i810s) -{ - i810CardInfo *i810c = i810s->i810c; - LP_RING_LOCALS; - - if (I810_DEBUG) - fprintf(stderr, "i810Sync\n"); - - /* Send a flush instruction and then wait till the ring is empty. - * This is stronger than waiting for the blitter to finish as it also - * flushes the internal graphics caches. - */ - BEGIN_LP_RING(2); - OUT_RING( INST_PARSER_CLIENT | INST_OP_FLUSH | INST_FLUSH_MAP_CACHE ); - OUT_RING( 0 ); /* pad to quadword */ - ADVANCE_LP_RING(); - - i810WaitLpRing(i810s, i810c->LpRing.mem.Size - 8, 0); - - i810c->LpRing.space = i810c->LpRing.mem.Size - 8; - i810c->nextColorExpandBuf = 0; -} - -static void -i810WaitMarker(ScreenPtr pScreen, int marker) -{ - KdScreenPriv(pScreen); - i810ScreenInfo(pScreenPriv); - - i810Sync(i810s); -} - -#if 0 -static void -i810EmitInvarientState(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - i810CardInfo(pScreenPriv); - i810ScreenInfo(pScreenPriv); - LP_RING_LOCALS; - - BEGIN_LP_RING( 10 ); - - OUT_RING( INST_PARSER_CLIENT | INST_OP_FLUSH | INST_FLUSH_MAP_CACHE ); - OUT_RING( GFX_CMD_CONTEXT_SEL | CS_UPDATE_USE | CS_USE_CTX0 ); - OUT_RING( INST_PARSER_CLIENT | INST_OP_FLUSH | INST_FLUSH_MAP_CACHE); - OUT_RING( 0 ); - - - OUT_RING( GFX_OP_COLOR_CHROMA_KEY ); - OUT_RING( CC1_UPDATE_KILL_WRITE | - CC1_DISABLE_KILL_WRITE | - CC1_UPDATE_COLOR_IDX | - CC1_UPDATE_CHROMA_LOW | - CC1_UPDATE_CHROMA_HI | - 0); - OUT_RING( 0 ); - OUT_RING( 0 ); - - /* No depth buffer in KDrive yet */ - /* OUT_RING( CMD_OP_Z_BUFFER_INFO ); */ - /* OUT_RING( pI810->DepthBuffer.Start | pI810->auxPitchBits); */ - - ADVANCE_LP_RING(); -} -#endif - -static unsigned int i810PatternRop[16] = { - 0x00, /* GXclear */ - 0xA0, /* GXand */ - 0x50, /* GXandReverse */ - 0xF0, /* GXcopy */ - 0x0A, /* GXandInvert */ - 0xAA, /* GXnoop */ - 0x5A, /* GXxor */ - 0xFA, /* GXor */ - 0x05, /* GXnor */ - 0xA5, /* GXequiv */ - 0x55, /* GXinvert */ - 0xF5, /* GXorReverse */ - 0x0F, /* GXcopyInvert */ - 0xAF, /* GXorInverted */ - 0x5F, /* GXnand */ - 0xFF /* GXset */ -}; - -static Bool -i810PrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg) -{ - KdScreenPriv(pPix->drawable.pScreen); - i810ScreenInfo(pScreenPriv); - i810CardInfo(pScreenPriv); - - if (I810_DEBUG & DEBUG_VERBOSE_ACCEL) - ErrorF( "i810PrepareSolid color: %x rop: %x mask: %x\n", - fg, alu, pm); - - /* Color blit, p166 */ - i810c->BR[13] = BR13_SOLID_PATTERN | - (i810PatternRop[alu] << 16) | - (pPix->drawable.pScreen->width * i810c->cpp); - i810c->BR[16] = fg; - - accel_i810s = i810s; - - return TRUE; -} - -static void -i810Solid(int x1, int y1, int x2, int y2) -{ - I810ScreenInfo *i810s = accel_i810s; - I810CardInfo *i810c = i810s->i810c; - LP_RING_LOCALS; - - if (I810_DEBUG & DEBUG_VERBOSE_ACCEL) - ErrorF( "i810SubsequentFillRectSolid %d,%d %d,%d\n", x1, y1, x2, y2); - - BEGIN_LP_RING(6); - - OUT_RING( BR00_BITBLT_CLIENT | BR00_OP_COLOR_BLT | 0x3 ); - OUT_RING( i810c->BR[13] ); - OUT_RING( ((y2 - y1) << 16) | ((x2 - x1) * i810c->cpp)); - OUT_RING( i810c->bufferOffset + y1 * i810s->pitch + x1 * i810c->cpp ); - - OUT_RING( i810c->BR[16]); - OUT_RING( 0 ); /* pad to quadword */ - - ADVANCE_LP_RING(); -} - -static void -i810DoneSolid(void) -{ -} - -static Bool -i810PrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, int dx, int dy, int alu, Pixel pm) -{ - return FALSE; -} - -static void -i810RefreshRing(i810CardInfo *i810c) -{ - i810c->LpRing.head = INREG(LP_RING + RING_HEAD) & HEAD_ADDR; - i810c->LpRing.tail = INREG(LP_RING + RING_TAIL); - i810c->LpRing.space = i810c->LpRing.head - (i810c->LpRing.tail+8); - if (i810c->LpRing.space < 0) - i810c->LpRing.space += i810c->LpRing.mem.Size; -} - - -static void -i810SetRingRegs(i810CardInfo *i810c) -{ - unsigned int itemp; - - OUTREG(LP_RING + RING_TAIL, 0 ); - OUTREG(LP_RING + RING_HEAD, 0 ); - - itemp = INREG(LP_RING + RING_START); - itemp &= ~(START_ADDR); - itemp |= i810c->LpRing.mem.Start; - OUTREG(LP_RING + RING_START, itemp ); - - itemp = INREG(LP_RING + RING_LEN); - itemp &= ~(RING_NR_PAGES | RING_REPORT_MASK | RING_VALID_MASK); - itemp |= ((i810c->LpRing.mem.Size-4096) | RING_NO_REPORT | RING_VALID); - OUTREG(LP_RING + RING_LEN, itemp ); -} - -Bool -i810InitAccel(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - i810ScreenInfo(pScreenPriv); - i810CardInfo(pScreenPriv); - - memset(&i810s->kaa, 0, sizeof(KaaScreenInfoRec)); - i810s->kaa.waitMarker = i810WaitMarker; - i810s->kaa.PrepareSolid = i810PrepareSolid; - i810s->kaa.Solid = i810Solid; - i810s->kaa.DoneSolid = i810DoneSolid; - i810s->kaa.PrepareCopy = i810PrepareCopy; - i810s->kaa.Copy = NULL; - i810s->kaa.DoneCopy = NULL; - - i810s->pitch = pScreen->width * i810c->cpp; - - return FALSE; -} - -void -i810EnableAccel(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - i810CardInfo(pScreenPriv); - - if (i810c->LpRing.mem.Size == 0) { - ErrorF("No memory for LpRing!! Acceleration not functional!!\n"); - } - - i810SetRingRegs(i810c); - - kaaMarkSync (pScreen); -} - - -void -i810DisableAccel(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - i810CardInfo(pScreenPriv); - i810ScreenInfo(pScreenPriv); - - i810RefreshRing(i810c); - i810Sync(i810s); -} - -void -i810FiniAccel(ScreenPtr pScreen) -{ -} diff --git a/hw/kdrive/i810/i810draw.h b/hw/kdrive/i810/i810draw.h deleted file mode 100644 index 7c8c04489..000000000 --- a/hw/kdrive/i810/i810draw.h +++ /dev/null @@ -1,46 +0,0 @@ -/* COPYRIGHT AND PERMISSION NOTICE - -Copyright (c) 2000, 2001 Nokia Home Communications - -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, provided that the above -copyright notice(s) and this permission notice appear in all copies of -the Software and that both the above copyright notice(s) and this -permission notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY -SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER -RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF -CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -of the copyright holder. - -X Window System is a trademark of The Open Group */ - -/* Hardware accelerated drawing for KDrive i810 driver, header file. - Author: Pontus Lidman -*/ - - -#ifndef _I810DRAW_H_ -#define _I810DRAW_H_ - -void i810RefreshRing(KdScreenInfo *screen); -int i810WaitLpRing( KdScreenInfo *screen, int n, int timeout_millis ); -void i810Sync( KdScreenInfo *screen ); - -#endif /* _I810DRAW_H_ */ diff --git a/hw/kdrive/i810/i810stub.c b/hw/kdrive/i810/i810stub.c deleted file mode 100644 index 3109984e0..000000000 --- a/hw/kdrive/i810/i810stub.c +++ /dev/null @@ -1,92 +0,0 @@ -/* COPYRIGHT AND PERMISSION NOTICE - -Copyright (c) 2000, 2001 Nokia Home Communications - -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, provided that the above -copyright notice(s) and this permission notice appear in all copies of -the Software and that both the above copyright notice(s) and this -permission notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY -SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER -RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF -CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -of the copyright holder. - -X Window System is a trademark of The Open Group */ - -/* Stub functions for the i810 KDrive driver - Author: Pontus Lidman -*/ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "kdrive.h" -#include "kxv.h" -#include "i810.h" -#include "klinux.h" - -static const int i810Cards[]={ - PCI_CHIP_I810, - PCI_CHIP_I810_DC100, - PCI_CHIP_I810_E -}; - -#define numI810Cards (sizeof(i810Cards) / sizeof(i810Cards[0])) - -void -InitCard (char *name) -{ - KdCardAttr attr; - int i; - - for (i = 0; i < numI810Cards; i++) - if (LinuxFindPci (0x8086, i810Cards[i], 0, &attr)) - KdCardInfoAdd (&i810Funcs, &attr, (void *) i810Cards[i]); -} - - -void -InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) -{ - KdInitOutput (pScreenInfo, argc, argv); -} - -void -InitInput (int argc, char **argv) -{ - KdOsAddInputDrivers (); - KdInitInput (); -} - -void -ddxUseMsg (void) -{ - KdUseMsg(); -} - -int -ddxProcessArgument (int argc, char **argv, int i) -{ - int ret; - - ret = KdProcessArgument(argc, argv, i); - return ret; -} diff --git a/hw/kdrive/igs/igs.c b/hw/kdrive/igs/igs.c deleted file mode 100644 index 1c446f782..000000000 --- a/hw/kdrive/igs/igs.c +++ /dev/null @@ -1,667 +0,0 @@ -/* - * Copyright © 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "igs.h" - -Bool -igsCardInit (KdCardInfo *card) -{ - int k; - char *pixels; - IgsCardInfo *igsc; - - igsc = (IgsCardInfo *) xalloc (sizeof (IgsCardInfo)); - if (!igsc) - return FALSE; - - memset (igsc, '\0', sizeof (IgsCardInfo)); - - igsc->frameBuffer = (CARD8 *) KdMapDevice (card->attr.address[0] + - IGS_FB, - IGS_MEM); - - igsc->vga = (VOL8 *) KdMapDevice (card->attr.address[0] + - IGS_VGA, - 64 * 1024); - - igsc->cop = (Cop5xxx *) KdMapDevice (card->attr.address[0] + - IGS_COP_OFFSET, - sizeof (Cop5xxx)); - - igsc->copData = (VOL32 *) KdMapDevice (card->attr.address[0] + - IGS_COP_DATA, - IGS_COP_DATA_LEN); - - igsRegInit (&igsc->igsvga, igsc->vga); - - card->driver = igsc; - - return TRUE; -} - -Bool -igsModeSupported (KdScreenInfo *screen, - const KdMonitorTiming *t) -{ - /* make sure the clock isn't too fast */ - if (t->clock > IGS_MAX_CLOCK) - return FALSE; - /* width must be a multiple of 16 */ - if (t->horizontal & 0xf) - return FALSE; - return TRUE; -} - -Bool -igsModeUsable (KdScreenInfo *screen) -{ - KdCardInfo *card = screen->card; - int screen_size; - int pixel_width; - int byte_width; - int fb = 0; - - screen_size = 0; - if (screen->fb[fb].depth >= 24) - { - screen->fb[fb].depth = 24; - if (screen->fb[fb].bitsPerPixel != 24) - screen->fb[fb].bitsPerPixel = 32; - } - else if (screen->fb[fb].depth >= 16) - { - screen->fb[fb].depth = 16; - screen->fb[fb].bitsPerPixel = 16; - } - else if (screen->fb[fb].depth >= 15) - { - screen->fb[fb].depth = 15; - screen->fb[fb].bitsPerPixel = 16; - } - else if (screen->fb[fb].depth >= 12) - { - screen->fb[fb].depth = 12; - screen->fb[fb].bitsPerPixel = 16; - } - else - { - screen->fb[fb].depth = 8; - screen->fb[fb].bitsPerPixel = 8; - } - - byte_width = screen->width * (screen->fb[fb].bitsPerPixel >> 3); - pixel_width = screen->width; - screen->fb[fb].pixelStride = pixel_width; - screen->fb[fb].byteStride = byte_width; - screen_size += byte_width * screen->height; - - return TRUE; -} - -Bool -igsScreenInit (KdScreenInfo *screen) -{ - IgsCardInfo *igsc = screen->card->driver; - int fb = 0; - IgsScreenInfo *igss; - int screen_size, memory; - int pattern_size; - int tile_size; - int stipple_size; - int poffset, boffset; - const KdMonitorTiming *t; - - if (!screen->width || !screen->height) - { - screen->width = 800; - screen->height = 600; - screen->rate = 72; - } - if (!screen->fb[0].depth) - screen->fb[0].depth = 8; - - t = KdFindMode (screen, igsModeSupported); - - screen->rate = t->rate; - screen->width = t->horizontal; - screen->height = t->vertical; - - if (!KdTuneMode (screen, igsModeUsable, igsModeSupported)) - { - return FALSE; - } - - igss = (IgsScreenInfo *) xalloc (sizeof (IgsScreenInfo)); - if (!igss) - return FALSE; - - memset (igss, '\0', sizeof (IgsScreenInfo)); - - screen_size = screen->fb[fb].byteStride * screen->height; - memory = IGS_MEM; - memory -= screen_size; - if (memory >= 1024) - { - igss->cursor_offset = memory - 1024; -#if BITMAP_BIT_ORDER == MSBFirst - igss->cursor_base = (CARD8 *) KdMapDevice (card->attr.address[0] + - igss->cursor_offset, - 1024); -#else - igss->cursor_base = igsc->frameBuffer + igss->cursor_offset; -#endif - memory -= 1024; - } - else - igss->cursor_base = 0; - - tile_size = IgsTileSize(screen->fb[fb].bitsPerPixel) * IGS_NUM_PATTERN; - stipple_size = IgsStippleSize(screen->fb[fb].bitsPerPixel) * IGS_NUM_PATTERN; - pattern_size = tile_size + stipple_size; - if (memory >= pattern_size) - { - boffset = screen_size; - poffset = boffset * 8 / screen->fb[fb].bitsPerPixel; - igss->tile.offset = poffset; - igss->tile.base = igsc->frameBuffer + boffset; - - boffset = screen_size + tile_size; - poffset = boffset * 8 / screen->fb[fb].bitsPerPixel; - igss->stipple.offset = poffset; - igss->stipple.base = igsc->frameBuffer + boffset; - - memory -= pattern_size; - } - else - { - igss->tile.base = 0; - igss->stipple.base = 0; - } - - switch (screen->fb[fb].depth) { - case 8: - screen->fb[fb].visuals = ((1 << StaticGray) | - (1 << GrayScale) | - (1 << StaticColor) | - (1 << PseudoColor) | - (1 << TrueColor) | - (1 << DirectColor)); - screen->fb[fb].blueMask = 0x00; - screen->fb[fb].greenMask = 0x00; - screen->fb[fb].redMask = 0x00; - break; - case 15: - screen->fb[fb].visuals = (1 << TrueColor); - screen->fb[fb].blueMask = 0x001f; - screen->fb[fb].greenMask = 0x03e0; - screen->fb[fb].redMask = 0x7c00; - break; - case 16: - screen->fb[fb].visuals = (1 << TrueColor); - screen->fb[fb].blueMask = 0x001f; - screen->fb[fb].greenMask = 0x07e0; - screen->fb[fb].redMask = 0xf800; - break; - case 24: - screen->fb[fb].visuals = (1 << TrueColor); - screen->fb[fb].blueMask = 0x0000ff; - screen->fb[fb].greenMask = 0x00ff00; - screen->fb[fb].redMask = 0xff0000; - break; - } - - screen->fb[fb].pixelStride = screen->width; - screen->fb[fb].byteStride = screen->width * (screen->fb[fb].bitsPerPixel >> 3); - screen->fb[fb].frameBuffer = igsc->frameBuffer; - if (!igsc->cop) - screen->dumb = TRUE; - screen->driver = igss; - return TRUE; -} - -Bool -igsInitScreen(ScreenPtr pScreen) -{ - return TRUE; -} - -void -igsPreserve (KdCardInfo *card) -{ - IgsCardInfo *igsc = card->driver; - IgsVga *igsvga = &igsc->igsvga; - - igsSave (igsvga); -} - -void -igsSetBlank (IgsVga *igsvga, Bool blank) -{ - igsSetImm(igsvga, igs_screen_off, blank ? 1 : 0); -} - -void -igsSetSync (IgsCardInfo *igsc, int hsync, int vsync) -{ - IgsVga *igsvga = &igsc->igsvga; - - igsSet (igsvga, igs_mexhsyn, hsync); - igsSet (igsvga, igs_mexvsyn, vsync); - VgaFlush (&igsvga->card); -} - - -/* - * Clock synthesis: - * - * scale = p ? (2 * p) : 1 - * f_out = f_ref * ((M + 1) / ((N + 1) * scale)) - * - * Constraints: - * - * 1. 115MHz <= f_ref * ((M + 1) / (N + 1)) <= 260 MHz - * 2. N >= 1 - * - * Vertical refresh rate = clock / ((hsize + hblank) * (vsize + vblank)) - * Horizontal refresh rate = clock / (hsize + hblank) - */ - -/* all in kHz */ - -void -igsGetClock (int target, int *Mp, int *Np, int *Pp, int maxM, int maxN, int maxP, int minVco) -{ - int M, N, P, bestM, bestN; - int f_vco, f_out; - int err, abserr, besterr; - - /* - * Compute correct P value to keep VCO in range - */ - for (P = 0; P <= maxP; P++) - { - f_vco = target * IGS_SCALE(P); - if (f_vco >= minVco) - break; - } - - /* M = f_out / f_ref * ((N + 1) * IGS_SCALE(P)); */ - besterr = target; - for (N = 1; N <= maxN; N++) - { - M = ((target * (N + 1) * IGS_SCALE(P) + (IGS_CLOCK_REF/2)) + IGS_CLOCK_REF/2) / IGS_CLOCK_REF - 1; - if (0 <= M && M <= maxM) - { - f_out = IGS_CLOCK(M,N,P); - err = target - f_out; - if (err < 0) - err = -err; - if (err < besterr) - { - besterr = err; - bestM = M; - bestN = N; - } - } - } - *Mp = bestM; - *Np = bestN; - *Pp = P; -} - -Bool -igsEnable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - KdCardInfo *card = pScreenPriv->card; - KdScreenInfo *screen = pScreenPriv->screen; - IgsCardInfo *igsc = card->driver; - IgsVga *igsvga = &igsc->igsvga; - const KdMonitorTiming *t; - int hactive, hblank, hfp, hbp; - int vactive, vblank, vfp, vbp; - int hsize; - int fb = 0; - int m, n, r; - int h_total; - int h_display_end; - int h_blank_start; - int h_blank_end; - int h_sync_start; - int h_sync_end; - int h_screen_off; - int v_total; - int v_retrace_start; - int v_retrace_end; - int v_display_end; - int v_blank_start; - int v_blank_end; - int offset; - int num_fetch; - int m_m, m_n, m_r; - - - igsSetBlank (igsvga, TRUE); - - t = KdFindMode (screen, igsModeSupported); - - igsGetClock (t->clock, &m, &n, &r, 2047, 255, 7, IGS_MIN_VCO); - - /* - * Set the chip so that 0x400000 is a big-endian frame buffer - * with the correct byte swapping enabled - */ - igsSet (igsvga, igs_biga22force, 0); - igsSet (igsvga, igs_biga22en, 1); - igsSet (igsvga, igs_biga24en, 1); - /* - * Enable 8-bit DACs - */ - igsSet (igsvga, igs_rampwdn, 0); - igsSet (igsvga, igs_dac6_8, 1); - igsSet (igsvga, igs_dacpwdn, 0); - /* - * Set overscan to black - */ - igsSet (igsvga, igs_overscan_red, 0x00); - igsSet (igsvga, igs_overscan_green, 0x00); - igsSet (igsvga, igs_overscan_blue, 0x00); - /* - * Enable PCI retries - */ - igsSet (igsvga, igs_iow_retry, 1); - igsSet (igsvga, igs_mw_retry, 1); - igsSet (igsvga, igs_mr_retry, 1); - igsSet (igsvga, igs_pci_burst_write, 1); - igsSet (igsvga, igs_pci_burst_read, 1); - /* - * Set FIFO - */ - igsSet (igsvga, igs_memgopg, 1); - igsSet (igsvga, igs_memr2wpg, 0); - igsSet (igsvga, igs_crtff16, 0); - igsSet (igsvga, igs_fifomust, 0xff); - igsSet (igsvga, igs_fifogen, 0xff); - /* - * Enable CRT reg access - */ - igsSetImm (igsvga, igs_ena_vr_access, 1); - igsSetImm (igsvga, igs_crt_protect, 0); - - hfp = t->hfp; - hbp = t->hbp; - hblank = t->hblank; - hactive = t->horizontal; - offset = screen->fb[0].byteStride; - - vfp = t->vfp; - vbp = t->vbp; - vblank = t->vblank; - vactive = t->vertical; - - /* - * Compute character lengths for horizontal timing values - */ - hactive = screen->width / 8; - hblank /= 8; - hfp /= 8; - hbp /= 8; - offset /= 8; - - switch (screen->fb[fb].bitsPerPixel) { - case 8: - igsSet (igsvga, igs_overscan_red, pScreen->blackPixel); - igsSet (igsvga, igs_overscan_green, pScreen->blackPixel); - igsSet (igsvga, igs_overscan_blue, pScreen->blackPixel); - igsSet (igsvga, igs_bigswap, IGS_BIGSWAP_8); - igsSet (igsvga, igs_mode_sel, IGS_MODE_8); - igsSet (igsvga, igs_ramdacbypass, 0); - break; - case 16: - igsSet (igsvga, igs_bigswap, IGS_BIGSWAP_16); - igsSet (igsvga, igs_ramdacbypass, 1); - switch (screen->fb[fb].depth) { - case 12: - igsSet (igsvga, igs_mode_sel, IGS_MODE_4444); - break; - case 15: - igsSet (igsvga, igs_mode_sel, IGS_MODE_5551); - break; - case 16: - igsSet (igsvga, igs_mode_sel, IGS_MODE_565); - break; - } - break; - case 24: - igsSet (igsvga, igs_ramdacbypass, 1); - igsSet (igsvga, igs_bigswap, IGS_BIGSWAP_8); - igsSet (igsvga, igs_mode_sel, IGS_MODE_888); - break; - case 32: - igsSet (igsvga, igs_ramdacbypass, 1); - igsSet (igsvga, igs_bigswap, IGS_BIGSWAP_32); - igsSet (igsvga, igs_mode_sel, IGS_MODE_8888); - break; - } - - /* - * Compute horizontal register values from timings - */ - h_total = hactive + hblank - 5; - h_display_end = hactive - 1; - - h_sync_start = hactive + hfp; - h_sync_end = hactive + hblank - hbp; - /* - * pad the blank values narrow a bit and use the border_select to - * eliminate the remaining border; don't know why, but it doesn't - * work in the documented fashion - */ - h_blank_start = hactive - 1; - h_blank_end = hactive + hblank - 1 - 1; - - num_fetch = (t->horizontal * screen->fb[fb].bitsPerPixel / 64) + 1; - - v_total = vactive + vblank - 2; - v_display_end = vactive - 1; - - v_blank_start = vactive - 1; - v_blank_end = v_blank_start + vblank - 1; - - v_retrace_start = vactive + vfp; - v_retrace_end = vactive + vblank - vbp; - -#if 0 -#define chk(a,b,c) fprintf (stderr, "%20.20s: BIOS %6d X %6d\n", a, igsGet(igsvga, b), c); - - chk("h_total", igs_h_total, h_total); - chk("h_display_end", igs_h_de_end, h_display_end); - chk("h_sync_start", igs_h_rstart, h_sync_start); - chk("h_sync_end", igs_h_rend, h_sync_end&0x1f); - chk("h_blank_start", igs_h_bstart, h_blank_start); - chk("h_blank_end", igs_h_bend, h_blank_end&0x3f); - chk("offset", igs_offset, offset); - chk("num_fetch", igs_num_fetch, num_fetch); - - chk("v_total", igs_v_total, v_total); - chk("v_display_end", igs_v_de_end, v_display_end); - chk("v_blank_start", igs_v_bstart, v_blank_start); - chk("v_blank_end", igs_v_bend, v_blank_end&0xf); - chk("v_retrace_start", igs_v_rstart, v_retrace_start); - chk("v_retrace_end", igs_v_rend, v_retrace_end&0xf); - chk("vclk_m", igs_vclk_m, m); - chk("vclk_n", igs_vclk_n, n); - chk("vclk_p", igs_vclk_p, r); - - fprintf (stderr, "%20.20s: BIOS %6d X %6d\n", "vclk", - IGS_CLOCK(igsGet(igsvga,igs_vclk_m), - igsGet(igsvga,igs_vclk_n), - igsGet(igsvga,igs_vclk_p)), - IGS_CLOCK(m,n,r)); -#endif - igsSet (igsvga, igs_h_total, h_total); - igsSet (igsvga, igs_h_de_end, h_display_end); - igsSet (igsvga, igs_h_rstart, h_sync_start); - igsSet (igsvga, igs_h_rend, h_sync_end); - igsSet (igsvga, igs_h_bstart, h_blank_start); - igsSet (igsvga, igs_h_bend, h_blank_end); - igsSet (igsvga, igs_offset, offset); - igsSet (igsvga, igs_num_fetch, num_fetch); - - igsSet (igsvga, igs_v_total, v_total); - igsSet (igsvga, igs_v_de_end, v_display_end); - igsSet (igsvga, igs_v_bstart, v_blank_start); - igsSet (igsvga, igs_v_bend, v_blank_end&0xf); - igsSet (igsvga, igs_v_rstart, v_retrace_start); - igsSet (igsvga, igs_v_rend, v_retrace_end&0xf); - - igsSet (igsvga, igs_vclk_m, m); - igsSet (igsvga, igs_vclk_n, n); - igsSet (igsvga, igs_vclk_p, r); - igsSet (igsvga, igs_vfsel, IGS_CLOCK(m, n, 0) >= 180000); - VgaFlush (&igsvga->card); - - igsSetImm (igsvga, igs_frqlat, 0); - igsSetImm (igsvga, igs_frqlat, 1); - igsSetImm (igsvga, igs_frqlat, 0); - - igsSetBlank (igsvga, FALSE); -#if 0 -#define dbg(a,b) fprintf(stderr, "%20.20s = 0x%x\n", a, igsGet(igsvga,b)) - -#include "reg.dbg" - - { - VGA16 reg; - char buf[128]; - - for (reg = 0; reg < IGS_NREG; reg++) - fprintf(stderr, "%20.20s = 0x%02x\n", igsRegName(buf, reg), - VgaFetch (&igsvga->card, reg)); - } -#endif - return TRUE; -} - -Bool -igsDPMS (ScreenPtr pScreen, int mode) -{ - KdScreenPriv(pScreen); - IgsCardInfo *igsc = pScreenPriv->card->driver; - IgsVga *igsvga = &igsc->igsvga; - - switch (mode) { - case KD_DPMS_NORMAL: - igsSetSync (igsc, 0, 0); - igsSetBlank (igsvga, FALSE); - break; - case KD_DPMS_STANDBY: - igsSetBlank (igsvga, TRUE); - igsSetSync (igsc, 1, 0); - break; - case KD_DPMS_SUSPEND: - igsSetBlank (igsvga, TRUE); - igsSetSync (igsc, 0, 1); - break; - case KD_DPMS_POWERDOWN: - igsSetBlank (igsvga, TRUE); - igsSetSync (igsc, 1, 1); - break; - } - return TRUE; -} - -void -igsDisable (ScreenPtr pScreen) -{ -} - -void -igsRestore (KdCardInfo *card) -{ - IgsCardInfo *igsc = card->driver; - IgsVga *igsvga = &igsc->igsvga; - - igsReset (igsvga); -} - -void -igsScreenFini (KdScreenInfo *screen) -{ - IgsScreenInfo *igss = (IgsScreenInfo *) screen->driver; - -#if BITMAP_BIT_ORDER == MSBFirst - if (igss->cursor_base) - KdUnmapDevice ((void *) igss->cursor_base, 1024); -#endif - xfree (igss); - screen->driver = 0; -} - -void -igsCardFini (KdCardInfo *card) -{ - IgsCardInfo *igsc = card->driver; - - if (igsc->copData) - KdUnmapDevice ((void *) igsc->copData, IGS_COP_DATA_LEN); - if (igsc->cop) - KdUnmapDevice ((void *) igsc->cop, sizeof (Cop5xxx)); - if (igsc->vga) - KdUnmapDevice ((void *) igsc->vga, 64 * 1024); - if (igsc->frameBuffer) - KdUnmapDevice (igsc->frameBuffer, IGS_MEM); - xfree (igsc); - card->driver = 0; -} - -KdCardFuncs igsFuncs = { - igsCardInit, /* cardinit */ - igsScreenInit, /* scrinit */ - igsInitScreen, - igsPreserve, /* preserve */ - igsEnable, /* enable */ - igsDPMS, /* dpms */ - igsDisable, /* disable */ - igsRestore, /* restore */ - igsScreenFini, /* scrfini */ - igsCardFini, /* cardfini */ - - igsCursorInit, /* initCursor */ - igsCursorEnable, /* enableCursor */ - igsCursorDisable, /* disableCursor */ - igsCursorFini, /* finiCursor */ - 0, /* recolorCursor */ - - igsDrawInit, /* initAccel */ - igsDrawEnable, /* enableAccel */ - igsDrawSync, /* drawSync */ - igsDrawDisable, /* disableAccel */ - igsDrawFini, /* finiAccel */ - - igsGetColors, /* getColors */ - igsPutColors, /* putColors */ -}; diff --git a/hw/kdrive/igs/igs.h b/hw/kdrive/igs/igs.h deleted file mode 100644 index 9f0336b7d..000000000 --- a/hw/kdrive/igs/igs.h +++ /dev/null @@ -1,327 +0,0 @@ -/* - * Copyright © 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifndef _IGS_H_ -#define _IGS_H_ - -#include "kdrive.h" -#include "igsreg.h" - -extern KdCardFuncs igsFuncs; - -/* - * FB 0x00000000 - * VGA 0x00800000 - * Blt window 0x008a0000 - * Coprocessor 0x008bf000 - */ - -#if BITMAP_BIT_ORDER == MSBFirst -#define IGS_FB 0x00400000 -#else -#define IGS_FB 0x00000000 -#endif -#define IGS_VGA 0x00800000 -#define IGS_COP_DATA 0x008a0000 -#define IGS_COP_DATA_LEN 0x00010000 -#define IGS_COP_OFFSET 0x008bf000 -/* give audio 1/2 meg at end */ -#if 1 -#define IGS_MEM ((4096-512)*1024) -#else -#define IGS_MEM ((4096)*1024) -#endif - -#define IGS_CLOCK_REF 24576 /* KHz */ - -#define IGS_SCALE(p) ((p) ? (2 * (p)) : 1) - -#define IGS_CLOCK(m,n,p) ((IGS_CLOCK_REF * ((m) + 1)) / (((n) + 1) * IGS_SCALE(p))) - -#define IGS_MAX_CLOCK 260000 - -#define IGS_MIN_VCO 115000 - -typedef volatile CARD8 VOL8; -typedef volatile CARD16 VOL16; -typedef volatile CARD32 VOL32; - -typedef struct _Cop5xxx { - VOL8 pad000[0x10]; /* 0x000 */ - - VOL32 control; /* 0x010 */ -#define IGS_CONTROL_HBLTW_RDYZ 0x0100 -#define IGS_CONTROL_MALLWBEPTZ 0x0200 -#define IGS_CONTROL_CMDFF 0x0400 -#define IGS_CONTROL_SOP 0x0800 -#define IGS_CONTROL_OPS 0x1000 -#define IGS_CONTROL_TER 0x2000 -#define IGS_CONTROL_HBACKZ 0x4000 -#define IGS_CONTROL_BUSY 0x8000 - - VOL8 pad014[0x04]; /* 0x014 */ - - VOL32 src1_stride; /* 0x018 */ - - VOL32 format; /* 0x01c */ - -#define IGS_FORMAT_8BPP 0 -#define IGS_FORMAT_16BPP 1 -#define IGS_FORMAT_24BPP 2 -#define IGS_FORMAT_32BPP 3 - - VOL32 bres_error; /* 0x020 */ - VOL32 bres_k1; /* 0x024 */ - VOL32 bres_k2; /* 0x028 */ - VOL8 pad02c[0x1c]; /* 0x02c */ - - VOL32 mix; /* 0x048 */ -#define IGS_MIX_FG 0x00ff -#define IGS_MIX_BG 0xff00 -#define IGS_MAKE_MIX(fg,bg) ((fg) | ((bg) << 8)) - -#define IGS_MIX_ZERO 0x0 -#define IGS_MIX_SRC_AND_DST 0x1 -#define IGS_MIX_SRC_AND_NOT_DST 0x2 -#define IGS_MIX_SRC 0x3 -#define IGS_MIX_NOT_SRC_AND_DST 0x4 -#define IGS_MIX_DST 0x5 -#define IGS_MIX_SRC_XOR_DST 0x6 -#define IGS_MIX_SRC_OR_DST 0x7 -#define IGS_MIX_NOT_SRC_AND_NOT_DST 0x8 -#define IGS_MIX_SRC_XOR_NOT_DST 0x9 -#define IGS_MIX_NOT_DST 0xa -#define IGS_MIX_SRC_OR_NOT_DST 0xb -#define IGS_MIX_NOT_SRC 0xc -#define IGS_MIX_NOT_SRC_OR_DST 0xd -#define IGS_MIX_NOT_SRC_OR_NOT_DST 0xe -#define IGS_MIX_ONE 0xf - - VOL32 colorComp; /* 0x04c */ - VOL32 planemask; /* 0x050 */ - - VOL8 pad054[0x4]; /* 0x054 */ - - VOL32 fg; /* 0x058 */ - VOL32 bg; /* 0x05c */ - VOL32 dim; /* 0x060 */ -#define IGS_MAKE_DIM(w,h) ((w) | ((h) << 16)) - VOL8 pad5[0x0c]; /* 0x064 */ - - VOL32 src1_base_address; /* 0x070 */ - VOL8 pad074[0x04]; /* 0x074 */ - - VOL32 rotate; /* 0x078 */ -#define IGS_MAKE_ROTATE(x,y) ((x) | ((y) << 16)) - VOL32 operation; /* 0x07c */ - -/* OCT[2:0] */ -#define IGS_DRAW_X_MAJOR 0x00000000 -#define IGS_DRAW_Y_MAJOR 0x00000001 -#define IGS_DRAW_T_B 0x00000000 -#define IGS_DRAW_B_T 0x00000002 -#define IGS_DRAW_L_R 0x00000000 -#define IGS_DRAW_R_L 0x00000004 - -/* Draw_Mode[1:0] */ -#define IGS_DRAW_ALL 0x00000000 -#define IGS_DRAW_NOT_FIRST 0x00000010 -#define IGS_DRAW_NOT_LAST 0x00000020 -#define IGS_DRAW_NOT_FIRST_LAST 0x00000030 - -/* TRPS[1:0] */ -#define IGS_TRANS_SRC1 0x00000000 -#define IGS_TRANS_SRC2 0x00000100 -#define IGS_TRANS_DST 0x00000200 -/* TRPS2 Transparent Invert */ -#define IGS_TRANS_INVERT 0x00000400 -/* TRPS3, Transparent Enable */ -#define IGS_TRANS_ENABLE 0x00000800 - -/* PPS[3:0], Pattern Pixel Select */ -#define IGS_PIXEL_TEXT_OPAQUE 0x00001000 -#define IGS_PIXEL_STIP_OPAQUE 0x00002000 -#define IGS_PIXEL_LINE_OPAQUE 0x00003000 -#define IGS_PIXEL_TEXT_TRANS 0x00005000 -#define IGS_PIXEL_STIP_TRANS 0x00006000 -#define IGS_PIXEL_LINE_TRANS 0x00007000 -#define IGS_PIXEL_FG 0x00008000 -#define IGS_PIXEL_TILE 0x00009000 -#define IGS_PIXEL_TILE_OPAQUE 0x0000d000 - -/* HostBltEnable[1:0] */ -#define IGS_HBLT_DISABLE 0x00000000 -#define IGS_HBLT_READ 0x00010000 -#define IGS_HBLT_WRITE_1 0x00020000 -#define IGS_HBLT_WRITE_2 0x00030000 - -/* Src2MapSelect[2:0], Src2 map select mode */ -#define IGS_SRC2_NORMAL 0x00000000 -#define IGS_SRC2_MONO_OPAQUE 0x00100000 -#define IGS_SRC2_FG 0x00200000 -#define IGS_SRC2_MONO_TRANS 0x00500000 - -/* StepFunction[3:0], Step function select */ -#define IGS_STEP_DRAW_AND_STEP 0x04000000 -#define IGS_STEP_LINE_DRAW 0x05000000 -#define IGS_STEP_PXBLT 0x08000000 -#define IGS_STEP_INVERT_PXBLT 0x09000000 -#define IGS_STEP_TERNARY_PXBLT 0x0b000000 - -/* FGS */ -#define IGS_FGS_FG 0x00000000 -#define IGS_FGS_SRC 0x20000000 - -/* BGS */ -#define IGS_BGS_BG 0x00000000 -#define IGS_BGS_SRC 0x80000000 - VOL8 pad080[0x90]; /* 0x080 */ - - VOL32 debug_control; /* 0x110 */ - VOL8 pad114[0x04]; /* 0x114 */ - - VOL32 src2_stride; /* 0x118 */ - VOL8 pad11c[0x14]; /* 0x11c */ - - VOL32 extension; /* 0x130 */ - -#define IGS_BURST_ENABLE 0x01 -#define IGS_STYLE_LINE 0x02 -#define IGS_ADDITIONAL_WAIT 0x04 -#define IGS_BLOCK_COP_REG 0x08 -#define IGS_TURBO_MONO 0x10 -#define IGS_SELECT_SAMPLE 0x40 -#define IGS_MDSBL_RD_B_WR 0x80 -#define IGS_WRMRSTZ 0x100 -#define IGS_TEST_MTST 0x200 - - VOL32 style_line; /* 0x134 */ -#define IGS_MAKE_STILE_LINE(roll_over,inc,pattern,accumulator) \ - ((roll_over) | \ - ((style_line_inc) << 8) | \ - ((style_line_patern) << 16) | \ - ((style_line_accumullator) << 24)) - VOL32 style_line_pattern_index; /* 0x138 */ - - VOL32 mono_burst_total; /* 0x13c */ - VOL8 pad140[0x10]; /* 0x140 */ - - VOL32 pat_x_rotate; /* 0x150 */ - VOL8 pad154[0x1c]; /* 0x154 */ - - VOL32 src1_start; /* 0x170 */ - VOL32 src2_start; /* 0x174 */ - VOL32 dst_start; /* 0x178 */ - VOL8 pad17c[0x9c]; /* 0x17c */ - - VOL32 dst_stride; /* 0x218 */ -} Cop5xxx; - -typedef struct _igsCardInfo { - Cop5xxx *cop; - VOL8 *vga; - VOL32 *copData; - CARD8 *frameBuffer; - IgsVga igsvga; -} IgsCardInfo; - -#define getIgsCardInfo(kd) ((IgsCardInfo *) ((kd)->card->driver)) -#define igsCardInfo(kd) IgsCardInfo *igsc = getIgsCardInfo(kd) - -typedef struct _igsCursor { - int width, height; - int xhot, yhot; - Bool has_cursor; - CursorPtr pCursor; - Pixel source, mask; -} IgsCursor; - -#define IGS_CURSOR_WIDTH 64 -#define IGS_CURSOR_HEIGHT 64 - -typedef struct _igsPattern { - INT32 xrot, yrot; - CARD32 serial_number; - CARD8 *base; - CARD32 offset; -} IgsPattern; - -#define IGS_NUM_PATTERN 8 -#define IGS_PATTERN_WIDTH 8 -#define IGS_PATTERN_HEIGHT 8 - -typedef struct _igsPatternCache { - CARD8 *base; - CARD32 offset; - IgsPattern pattern[IGS_NUM_PATTERN]; - int next; -} IgsPatternCache; - -typedef struct _igsScreenInfo { - CARD8 *cursor_base; - CARD32 cursor_offset; - IgsCursor cursor; - IgsPatternCache tile; - IgsPatternCache stipple; -} IgsScreenInfo; - -#define IgsTileSize(bpp) (IGS_PATTERN_WIDTH*(bpp)/8*IGS_PATTERN_HEIGHT) -#define IgsStippleSize(bpp) (IGS_PATTERN_WIDTH/8*IGS_PATTERN_HEIGHT) - -#define getIgsScreenInfo(kd) ((IgsScreenInfo *) ((kd)->screen->driver)) -#define igsScreenInfo(kd) IgsScreenInfo *igss = getIgsScreenInfo(kd) - -Bool -igsDrawInit (ScreenPtr pScreen); - -void -igsDrawEnable (ScreenPtr pScreen); - -void -igsDrawDisable (ScreenPtr pScreen); - -void -igsDrawSync (ScreenPtr pScreen); - -void -igsDrawFini (ScreenPtr pScreen); - -void -igsGetColors (ScreenPtr pScreen, int fb, int ndef, xColorItem *pdefs); - -void -igsPutColors (ScreenPtr pScreen, int fb, int ndef, xColorItem *pdefs); - -Bool -igsCursorInit (ScreenPtr pScreen); - -void -igsCursorEnable (ScreenPtr pScreen); - -void -igsCursorDisable (ScreenPtr pScreen); - -void -igsCursorFini (ScreenPtr pScreen); - -#endif /* _IGS_H_ */ diff --git a/hw/kdrive/igs/igscmap.c b/hw/kdrive/igs/igscmap.c deleted file mode 100644 index dff028e7d..000000000 --- a/hw/kdrive/igs/igscmap.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright © 2000 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "igs.h" - -#define IGS_DAC_SHIFT 8 -void -igsGetColors (ScreenPtr pScreen, int fb, int ndef, xColorItem *pdefs) -{ - KdScreenPriv(pScreen); - igsCardInfo(pScreenPriv); - IgsVga *igsvga = &igsc->igsvga; - - while (ndef--) - { - igsSetImm (igsvga, igs_dac_read_index, pdefs->pixel); - pdefs->red = igsGetImm (igsvga, igs_dac_data) << IGS_DAC_SHIFT; - pdefs->green = igsGetImm (igsvga, igs_dac_data) << IGS_DAC_SHIFT; - pdefs->blue = igsGetImm (igsvga, igs_dac_data) << IGS_DAC_SHIFT; - pdefs++; - } -} - -void -igsPutColors (ScreenPtr pScreen, int fb, int ndef, xColorItem *pdefs) -{ - KdScreenPriv(pScreen); - igsCardInfo(pScreenPriv); - IgsVga *igsvga = &igsc->igsvga; - - while (ndef--) - { - igsSetImm (igsvga, igs_dac_write_index, pdefs->pixel); - igsSetImm (igsvga, igs_dac_data, pdefs->red >> IGS_DAC_SHIFT); - igsSetImm (igsvga, igs_dac_data, pdefs->green >> IGS_DAC_SHIFT); - igsSetImm (igsvga, igs_dac_data, pdefs->blue >> IGS_DAC_SHIFT); - pdefs++; - } -} - diff --git a/hw/kdrive/igs/igscurs.c b/hw/kdrive/igs/igscurs.c deleted file mode 100644 index b8bd50956..000000000 --- a/hw/kdrive/igs/igscurs.c +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Copyright © 2000 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "igs.h" -#include "cursorstr.h" - -#define SetupCursor(s) KdScreenPriv(s); \ - igsCardInfo(pScreenPriv); \ - igsScreenInfo(pScreenPriv); \ - IgsCursor *pCurPriv = &igss->cursor; \ - IgsVga *igsvga = &igsc->igsvga - -static void -_igsMoveCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor(pScreen); - CARD8 xoff, yoff; - - x -= pCurPriv->xhot; - xoff = 0; - if (x < 0) - { - xoff = -x; - x = 0; - } - y -= pCurPriv->yhot; - yoff = 0; - if (y < 0) - { - yoff = -y; - y = 0; - } - - igsSet (igsvga, igs_sprite_x, x); - igsSet (igsvga, igs_sprite_preset_x, xoff); - igsSet (igsvga, igs_sprite_y, y); - igsSet (igsvga, igs_sprite_preset_y, yoff); -} - -static void -igsMoveCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor (pScreen); - - if (!pCurPriv->has_cursor) - return; - - if (!pScreenPriv->enabled) - return; - - _igsMoveCursor (pScreen, x, y); - VgaFlush (&igsvga->card); -} - - -static void -igsSetCursorColors (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - - igsSetImm (igsvga, igs_cursor_write_index, 0); - igsSetImm (igsvga, igs_cursor_data, pCursor->backRed >> 8); - igsSetImm (igsvga, igs_cursor_data, pCursor->backGreen >> 8); - igsSetImm (igsvga, igs_cursor_data, pCursor->backBlue >> 8); - igsSetImm (igsvga, igs_cursor_write_index, 1); - igsSetImm (igsvga, igs_cursor_data, pCursor->foreRed >> 8); - igsSetImm (igsvga, igs_cursor_data, pCursor->foreGreen >> 8); - igsSetImm (igsvga, igs_cursor_data, pCursor->foreBlue >> 8); -} - -#if BITMAP_BIT_ORDER == MSBFirst -#define IgsAdjustCursor(v) { \ - v = ((v & 0x55555555) << 1) | ((v >> 1) & 0x55555555); \ - v = ((v & 0x33333333) << 2) | ((v >> 2) & 0x33333333); \ - v = ((v & 0x0f0f0f0f) << 4) | ((v >> 4) & 0x0f0f0f0f); \ - v = ((v & 0x00ff00ff) << 8) | ((v >> 8) & 0x00ff00ff); \ - v = ((v & 0x0000ffff) <<16) | ((v >>16) & 0x0000ffff); \ -} -#else -#define IgsAdjustCursor(v) -#endif - -#define ExplodeBits2(v) (((v) & 1) | (((v) & 2) << 1)) -#define ExplodeBits4(v) ((ExplodeBits2((v) >> 2) << 4) | \ - (ExplodeBits2((v) & 0x3))) -#define ExplodeBits8(v) ((ExplodeBits4((v) >> 4) << 8) | \ - (ExplodeBits4((v) & 0xf))) -#define ExplodeBits16(v) ((ExplodeBits8((v) >> 8) << 16) | \ - (ExplodeBits8((v) & 0xff))) -static void -igsLoadCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor(pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - CursorBitsPtr bits = pCursor->bits; - int w, h; - CARD32 *ram, *msk, *mskLine, *src, *srcLine; - int i, j; - int cursor_address; - int lwsrc; - unsigned char ramdac_control_; - CARD32 offset; - CARD32 b0, b1; - - pCurPriv->pCursor = pCursor; - pCurPriv->xhot = pCursor->bits->xhot; - pCurPriv->yhot = pCursor->bits->yhot; - - /* - * Stick new image into cursor memory - */ - ram = (CARD32 *) igss->cursor_base; - mskLine = (CARD32 *) bits->mask; - srcLine = (CARD32 *) bits->source; - - h = bits->height; - if (h > IGS_CURSOR_HEIGHT) - h = IGS_CURSOR_HEIGHT; - - lwsrc = BitmapBytePad(bits->width) / 4; /* words per line */ - - for (i = 0; i < IGS_CURSOR_HEIGHT; i++) { - msk = mskLine; - src = srcLine; - mskLine += lwsrc; - srcLine += lwsrc; - for (j = 0; j < IGS_CURSOR_WIDTH / 32; j++) { - - CARD32 m, s; - - if (i < h && j < lwsrc) - { - m = *msk++; - s = *src++; - IgsAdjustCursor(m); - IgsAdjustCursor(s); - } - else - { - m = 0; - s = 0; - } - s &= m; - m = ~m; - b0 = ExplodeBits16(s&0xffff) | (ExplodeBits16(m&0xffff)<<1); - b1 = ExplodeBits16(s>>16) | (ExplodeBits16(m>>16)<<1); - *ram++ = b0; - *ram++ = b1; - } - } - - /* Set new color */ - igsSetCursorColors (pScreen); - - /* Set address for cursor bits */ - offset = igss->cursor_offset; - offset >>= 10; - igsSet (igsvga, igs_sprite_addr, offset); - - /* Assume TV interpolation off */ - igsSet (igsvga, igs_hcshf, 3); - /* Enable the cursor */ - igsSet (igsvga, igs_sprite_visible, 1); - igsSet (igsvga, igs_sprite_64x64, 1); - /* Move to new position */ - _igsMoveCursor (pScreen, x, y); - - VgaFlush (&igsvga->card); -} - -static void -igsUnloadCursor (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - /* Disable cursor */ - igsSet (igsvga, igs_sprite_visible, 0); - VgaFlush (&igsvga->card); -} - -static Bool -igsRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) -{ - SetupCursor(pScreen); - - if (!pScreenPriv->enabled) - return TRUE; - - /* miRecolorCursor does this */ - if (pCurPriv->pCursor == pCursor) - { - if (pCursor) - { - int x, y; - - miPointerPosition (&x, &y); - igsLoadCursor (pScreen, x, y); - } - } - return TRUE; -} - -static Bool -igsUnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) -{ - return TRUE; -} - -static void -igsSetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y) -{ - SetupCursor(pScreen); - - pCurPriv->pCursor = pCursor; - - if (!pScreenPriv->enabled) - return; - - if (pCursor) - igsLoadCursor (pScreen, x, y); - else - igsUnloadCursor (pScreen); -} - -miPointerSpriteFuncRec igsPointerSpriteFuncs = { - igsRealizeCursor, - igsUnrealizeCursor, - igsSetCursor, - igsMoveCursor, -}; - -static void -igsQueryBestSize (int class, - unsigned short *pwidth, unsigned short *pheight, - ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - switch (class) - { - case CursorShape: - if (*pwidth > pCurPriv->width) - *pwidth = pCurPriv->width; - if (*pheight > pCurPriv->height) - *pheight = pCurPriv->height; - if (*pwidth > pScreen->width) - *pwidth = pScreen->width; - if (*pheight > pScreen->height) - *pheight = pScreen->height; - break; - default: - fbQueryBestSize (class, pwidth, pheight, pScreen); - break; - } -} - -Bool -igsCursorInit (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (!igss->cursor_base) - { - pCurPriv->has_cursor = FALSE; - return FALSE; - } - - pCurPriv->width = IGS_CURSOR_WIDTH; - pCurPriv->height= IGS_CURSOR_HEIGHT; - pScreen->QueryBestSize = igsQueryBestSize; - miPointerInitialize (pScreen, - &igsPointerSpriteFuncs, - &kdPointerScreenFuncs, - FALSE); - pCurPriv->has_cursor = TRUE; - pCurPriv->pCursor = NULL; - return TRUE; -} - -void -igsCursorEnable (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (pCurPriv->has_cursor) - { - if (pCurPriv->pCursor) - { - int x, y; - - miPointerPosition (&x, &y); - igsLoadCursor (pScreen, x, y); - } - else - igsUnloadCursor (pScreen); - } -} - -void -igsCursorDisable (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (!pScreenPriv->enabled) - return; - - if (pCurPriv->has_cursor) - { - if (pCurPriv->pCursor) - { - igsUnloadCursor (pScreen); - } - } -} - -void -igsCursorFini (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - pCurPriv->pCursor = NULL; -} diff --git a/hw/kdrive/igs/igsdraw.c b/hw/kdrive/igs/igsdraw.c deleted file mode 100644 index 677436be5..000000000 --- a/hw/kdrive/igs/igsdraw.c +++ /dev/null @@ -1,1463 +0,0 @@ -/* - * Copyright © 2000 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "igs.h" -#include "igsdraw.h" - -#include "Xmd.h" -#include "gcstruct.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "regionstr.h" -#include "mistruct.h" -#include "fontstruct.h" -#include "dixfontstr.h" -#include "fb.h" -#include "migc.h" -#include "miline.h" - -CARD8 igsPatRop[16] = { - /* GXclear */ 0x00, /* 0 */ - /* GXand */ 0xa0, /* src AND dst */ - /* GXandReverse */ 0x50, /* src AND NOT dst */ - /* GXcopy */ 0xf0, /* src */ - /* GXandInverted*/ 0x0a, /* NOT src AND dst */ - /* GXnoop */ 0xaa, /* dst */ - /* GXxor */ 0x5a, /* src XOR dst */ - /* GXor */ 0xfa, /* src OR dst */ - /* GXnor */ 0x05, /* NOT src AND NOT dst */ - /* GXequiv */ 0xa5, /* NOT src XOR dst */ - /* GXinvert */ 0x55, /* NOT dst */ - /* GXorReverse */ 0xf5, /* src OR NOT dst */ - /* GXcopyInverted*/ 0x0f, /* NOT src */ - /* GXorInverted */ 0xaf, /* NOT src OR dst */ - /* GXnand */ 0x5f, /* NOT src OR NOT dst */ - /* GXset */ 0xff, /* 1 */ -}; - -/* - * Handle pixel transfers - */ - -#define BURST -#ifdef BURST -#define PixTransDeclare VOL32 *pix_trans_base = igsc->copData,\ - *pix_trans = pix_trans_base -#define PixTransStart(n) if (pix_trans + (n) > pix_trans_base + 16384) pix_trans = pix_trans_base -#define PixTransStore(t) *pix_trans++ = (t) -#else -#define PixTransDeclare VOL32 *pix_trans = igsc->copData -#define PixTransStart(n) -#define PixTransStore(t) *pix_trans = (t) -#endif - -static IgsPattern * -igsSetPattern (ScreenPtr pScreen, - PixmapPtr pPixmap, - CARD8 fillStyle, - INT32 xrot, - INT32 yrot) -{ - KdScreenPriv(pScreen); - igsCardInfo(pScreenPriv); - igsScreenInfo(pScreenPriv); - int i; - IgsPatternCache *c; - IgsPattern *p; - - if (fillStyle == FillTiled) - c = &igss->tile; - else - c = &igss->stipple; - for (i = 0; i < IGS_NUM_PATTERN; i++) - { - p = &c->pattern[i]; - if (p->serial_number == pPixmap->drawable.serialNumber && - p->xrot == xrot && - p->yrot == yrot) - { - return p; - } - } - p = &c->pattern[c->next]; - if (++c->next == IGS_NUM_PATTERN) - c->next = 0; - p->serial_number = pPixmap->drawable.serialNumber; - p->xrot = xrot; - p->yrot = yrot; - - if (fillStyle != FillTiled) - { - FbStip *pix; - FbStride pixStride; - int pixBpp; - int pixXoff, pixYoff; - CARD8 tmp[8]; - CARD32 *pat; - int stipX, stipY; - int y; - FbStip bits; - - fbGetStipDrawable (&pPixmap->drawable, pix, pixStride, pixBpp, pixXoff, pixYoff); - - modulus (-yrot - pixYoff, pPixmap->drawable.height, stipY); - modulus (-xrot - pixXoff, FB_UNIT, stipX); - - pat = (CARD32 *) p->base; - - for (y = 0; y < 8; y++) - { - bits = pix[stipY * pixStride]; - FbRotLeft (bits, stipX); - tmp[y] = (CARD8) bits; - stipY++; - if (stipY == pPixmap->drawable.height) - stipY = 0; - } - for (i = 0; i < 2; i++) - { - bits = (tmp[i*4+0] | - (tmp[i*4+1] << 8) | - (tmp[i*4+2] << 16) | - (tmp[i*4+3] << 24)); - IgsAdjustBits32 (bits); - *pat++ = bits; - } - } - else - { - FbBits *pix; - FbStride pixStride; - int pixBpp; - FbBits *pat; - FbStride patStride; - int patBpp; - int patXoff, patYoff; - - fbGetDrawable (&pPixmap->drawable, pix, pixStride, pixBpp, patXoff, patYoff); - - pat = (FbBits *) p->base; - patBpp = pixBpp; - patStride = (patBpp * IGS_PATTERN_WIDTH) / (8 * sizeof (FbBits)); - - fbTile (pat, patStride, 0, - patBpp * IGS_PATTERN_WIDTH, IGS_PATTERN_HEIGHT, - - pix, pixStride, - pPixmap->drawable.width * pixBpp, - pPixmap->drawable.height, - GXcopy, FB_ALLONES, pixBpp, - (xrot - patXoff) * pixBpp, yrot - patYoff); - } - return p; -} - -void -igsFillBoxSolid (DrawablePtr pDrawable, int nBox, BoxPtr pBox, - unsigned long pixel, int alu, unsigned long planemask) -{ - SetupIgs(pDrawable->pScreen); - CARD32 cmd; - - _igsSetSolidRect(cop,alu,planemask,pixel,cmd); - while (nBox--) - { - _igsRect(cop,pBox->x1,pBox->y1,pBox->x2-pBox->x1,pBox->y2-pBox->y1,cmd); - pBox++; - } - KdMarkSync (pDrawable->pScreen); -} - -void -igsFillBoxTiled (DrawablePtr pDrawable, int nBox, BoxPtr pBox, - PixmapPtr pPixmap, int xrot, int yrot, int alu) -{ - SetupIgs(pDrawable->pScreen); - CARD32 cmd; - IgsPattern *p = igsSetPattern (pDrawable->pScreen, - pPixmap, - FillTiled, - xrot, yrot); - - _igsSetTiledRect(cop,alu,planemask,p->offset,cmd); - while (nBox--) - { - _igsPatRect(cop,pBox->x1,pBox->y1,pBox->x2-pBox->x1,pBox->y2-pBox->y1,cmd); - pBox++; - } - KdMarkSync (pDrawable->pScreen); -} - -void -igsFillBoxStippled (DrawablePtr pDrawable, GCPtr pGC, - int nBox, BoxPtr pBox) -{ - SetupIgs(pDrawable->pScreen); - CARD32 cmd; - int xrot = pGC->patOrg.x + pDrawable->x; - int yrot = pGC->patOrg.y + pDrawable->y; - IgsPattern *p = igsSetPattern (pDrawable->pScreen, - pGC->stipple, - pGC->fillStyle, - xrot, yrot); - if (pGC->fillStyle == FillStippled) - { - _igsSetStippledRect (cop,pGC->alu,planemask,pGC->fgPixel,p->offset,cmd); - } - else - { - _igsSetOpaqueStippledRect (cop,pGC->alu,planemask, - pGC->fgPixel,pGC->bgPixel,p->offset,cmd); - } - while (nBox--) - { - _igsPatRect(cop,pBox->x1,pBox->y1,pBox->x2-pBox->x1,pBox->y2-pBox->y1,cmd); - pBox++; - } - KdMarkSync (pDrawable->pScreen); -} - - -void -igsStipple (ScreenPtr pScreen, - CARD32 cmd, - FbStip *psrcBase, - FbStride widthSrc, - int srcx, - int srcy, - int dstx, - int dsty, - int width, - int height) -{ - SetupIgs(pScreen); - FbStip *psrcLine, *psrc; - FbStride widthRest; - FbStip bits, tmp, lastTmp; - int leftShift, rightShift; - int nl, nlMiddle; - int r; - PixTransDeclare; - - /* Compute blt address and parameters */ - psrc = psrcBase + srcy * widthSrc + (srcx >> 5); - nlMiddle = (width + 31) >> 5; - leftShift = srcx & 0x1f; - rightShift = 32 - leftShift; - widthRest = widthSrc - nlMiddle; - - _igsPlaneBlt(cop,dstx,dsty,width,height,cmd); - - if (leftShift == 0) - { - while (height--) - { - nl = nlMiddle; - PixTransStart(nl); - while (nl--) - { - tmp = *psrc++; - IgsAdjustBits32 (tmp); - PixTransStore (tmp); - } - psrc += widthRest; - } - } - else - { - widthRest--; - while (height--) - { - bits = *psrc++; - nl = nlMiddle; - PixTransStart(nl); - while (nl--) - { - tmp = FbStipLeft(bits, leftShift); - bits = *psrc++; - tmp |= FbStipRight(bits, rightShift); - IgsAdjustBits32(tmp); - PixTransStore (tmp); - } - psrc += widthRest; - } - } -} - -void -igsCopyNtoN (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - BoxPtr pbox, - int nbox, - int dx, - int dy, - Bool reverse, - Bool upsidedown, - Pixel bitplane, - void *closure) -{ - SetupIgs(pDstDrawable->pScreen); - int srcX, srcY, dstX, dstY; - int w, h; - CARD32 flags; - CARD32 cmd; - CARD8 alu; - - if (pGC) - { - alu = pGC->alu; - if (sourceInvarient (pGC->alu)) - { - igsFillBoxSolid (pDstDrawable, nbox, pbox, 0, pGC->alu, pGC->planemask); - return; - } - } - else - alu = GXcopy; - - _igsSetBlt(cop,alu,pGC->planemask,reverse,upsidedown,cmd); - while (nbox--) - { - w = pbox->x2 - pbox->x1; - h = pbox->y2 - pbox->y1; - if (reverse) - dstX = pbox->x2 - 1; - else - dstX = pbox->x1; - srcX = dstX + dx; - - if (upsidedown) - dstY = pbox->y2 - 1; - else - dstY = pbox->y1; - - srcY = dstY + dy; - - _igsBlt (cop, srcX, srcY, dstX, dstY, w, h, cmd); - pbox++; - } - KdMarkSync (pDstDrawable->pScreen); -} - -RegionPtr -igsCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, - int srcx, int srcy, int width, int height, int dstx, int dsty) -{ - KdScreenPriv(pDstDrawable->pScreen); - FbBits depthMask; - - depthMask = FbFullMask (pDstDrawable->depth); - if ((pGC->planemask & depthMask) == depthMask && - pSrcDrawable->type == DRAWABLE_WINDOW && - pDstDrawable->type == DRAWABLE_WINDOW) - { - return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, - srcx, srcy, width, height, - dstx, dsty, igsCopyNtoN, 0, 0); - } - return KdCheckCopyArea (pSrcDrawable, pDstDrawable, pGC, - srcx, srcy, width, height, dstx, dsty); -} - -typedef struct _igs1toNargs { - unsigned long copyPlaneFG, copyPlaneBG; - Bool opaque; -} igs1toNargs; - -void -igsCopy1toN (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - BoxPtr pbox, - int nbox, - int dx, - int dy, - Bool reverse, - Bool upsidedown, - Pixel bitplane, - void *closure) -{ - SetupIgs(pDstDrawable->pScreen); - - igs1toNargs *args = closure; - int dstx, dsty; - FbStip *psrcBase; - FbStride widthSrc; - int srcBpp; - int srcXoff, srcYoff; - CARD32 cmd; - - if (args->opaque && sourceInvarient (pGC->alu)) - { - igsFillBoxSolid (pDstDrawable, nbox, pbox, - pGC->bgPixel, pGC->alu, pGC->planemask); - return; - } - - fbGetStipDrawable (pSrcDrawable, psrcBase, widthSrc, srcBpp, srcXoff, srcYoff); - - if (args->opaque) - { - _igsSetOpaquePlaneBlt (cop, pGC->alu, pGC->planemask, args->copyPlaneFG, - args->copyPlaneBG, cmd); - } - else - { - _igsSetTransparentPlaneBlt (cop, pGC->alu, pGC->planemask, - args->copyPlaneFG, cmd); - } - - while (nbox--) - { - dstx = pbox->x1; - dsty = pbox->y1; - - igsStipple (pDstDrawable->pScreen, cmd, - psrcBase, widthSrc, - dstx + dx - srcXoff, dsty + dy - srcYoff, - dstx, dsty, - pbox->x2 - dstx, pbox->y2 - dsty); - pbox++; - } - KdMarkSync (pDstDrawable->pScreen); -} - -RegionPtr -igsCopyPlane (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - int srcx, - int srcy, - int width, - int height, - int dstx, - int dsty, - unsigned long bitPlane) -{ - RegionPtr ret; - igs1toNargs args; - FbBits depthMask; - - depthMask = FbFullMask (pDstDrawable->depth); - if ((pGC->planemask & depthMask) == depthMask && - pDstDrawable->type == DRAWABLE_WINDOW && - pSrcDrawable->depth == 1) - { - args.copyPlaneFG = pGC->fgPixel; - args.copyPlaneBG = pGC->bgPixel; - args.opaque = TRUE; - return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, - srcx, srcy, width, height, - dstx, dsty, igsCopy1toN, bitPlane, &args); - } - return KdCheckCopyPlane(pSrcDrawable, pDstDrawable, pGC, - srcx, srcy, width, height, - dstx, dsty, bitPlane); -} - -#if 0 -/* would you believe this is slower than fb? */ -void -igsPushPixels (GCPtr pGC, - PixmapPtr pBitmap, - DrawablePtr pDrawable, - int w, - int h, - int x, - int y) -{ - igs1toNargs args; - FbBits depthMask; - - depthMask = FbFullMask (pDstDrawable->depth); - if ((pGC->planemask & depthMask) == depthMask && - pDrawable->type == DRAWABLE_WINDOW && - pGC->fillStyle == FillSolid) - { - args.opaque = FALSE; - args.copyPlaneFG = pGC->fgPixel; - (void) fbDoCopy ((DrawablePtr) pBitmap, pDrawable, pGC, - 0, 0, w, h, x, y, igsCopy1toN, 1, &args); - } - else - { - KdCheckPushPixels (pGC, pBitmap, pDrawable, w, h, x, y); - } -} -#else -#define igsPushPixels KdCheckPushPixels -#endif - -BOOL -igsFillOk (GCPtr pGC) -{ - FbBits depthMask; - - depthMask = FbFullMask(pGC->depth); - if ((pGC->planemask & depthMask) != depthMask) - return FALSE; - switch (pGC->fillStyle) { - case FillSolid: - return TRUE; - case FillTiled: - return (igsPatternDimOk (pGC->tile.pixmap->drawable.width) && - igsPatternDimOk (pGC->tile.pixmap->drawable.height)); - case FillStippled: - case FillOpaqueStippled: - return (igsPatternDimOk (pGC->stipple->drawable.width) && - igsPatternDimOk (pGC->stipple->drawable.height)); - } - return FALSE; -} - -void -igsFillSpans (DrawablePtr pDrawable, GCPtr pGC, int n, - DDXPointPtr ppt, int *pwidth, int fSorted) -{ - SetupIgs(pDrawable->pScreen); - DDXPointPtr pptFree; - FbGCPrivPtr fbPriv = fbGetGCPrivate(pGC); - int *pwidthFree;/* copies of the pointers to free */ - CARD32 cmd; - int nTmp; - INT16 x, y; - int width; - IgsPattern *p; - - if (!igsFillOk (pGC)) - { - KdCheckFillSpans (pDrawable, pGC, n, ppt, pwidth, fSorted); - return; - } - nTmp = n * miFindMaxBand(fbGetCompositeClip(pGC)); - pwidthFree = (int *)xalloc(nTmp * sizeof(int)); - pptFree = (DDXPointRec *)xalloc(nTmp * sizeof(DDXPointRec)); - if(!pptFree || !pwidthFree) - { - if (pptFree) xfree(pptFree); - if (pwidthFree) xfree(pwidthFree); - return; - } - n = miClipSpans(fbGetCompositeClip(pGC), - ppt, pwidth, n, - pptFree, pwidthFree, fSorted); - pwidth = pwidthFree; - ppt = pptFree; - switch (pGC->fillStyle) { - case FillSolid: - _igsSetSolidRect(cop,pGC->alu,pGC->planemask,pGC->fgPixel,cmd); - break; - case FillTiled: - p = igsSetPattern (pDrawable->pScreen, - pGC->tile.pixmap, - FillTiled, - pGC->patOrg.x + pDrawable->x, - pGC->patOrg.y + pDrawable->y); - _igsSetTiledRect (cop,pGC->alu,pGC->planemask,p->offset,cmd); - break; - default: - p = igsSetPattern (pDrawable->pScreen, - pGC->stipple, - pGC->fillStyle, - pGC->patOrg.x + pDrawable->x, - pGC->patOrg.y + pDrawable->y); - if (pGC->fillStyle == FillStippled) - { - _igsSetStippledRect (cop,pGC->alu,pGC->planemask, - pGC->fgPixel,p->offset,cmd); - } - else - { - _igsSetOpaqueStippledRect (cop,pGC->alu,pGC->planemask, - pGC->fgPixel,pGC->bgPixel,p->offset,cmd); - } - break; - } - while (n--) - { - x = ppt->x; - y = ppt->y; - ppt++; - width = *pwidth++; - if (width) - { - _igsPatRect(cop,x,y,width,1,cmd); - } - } - xfree(pptFree); - xfree(pwidthFree); - KdMarkSync (pDrawable->pScreen); -} - -#define NUM_STACK_RECTS 1024 - -void -igsPolyFillRect (DrawablePtr pDrawable, GCPtr pGC, - int nrectFill, xRectangle *prectInit) -{ - SetupIgs(pDrawable->pScreen); - xRectangle *prect; - RegionPtr prgnClip; - register BoxPtr pbox; - register BoxPtr pboxClipped; - BoxPtr pboxClippedBase; - BoxPtr pextent; - BoxRec stackRects[NUM_STACK_RECTS]; - FbGCPrivPtr fbPriv = fbGetGCPrivate (pGC); - int numRects; - int n; - int xorg, yorg; - int x, y; - - if (!igsFillOk (pGC)) - { - KdCheckPolyFillRect (pDrawable, pGC, nrectFill, prectInit); - return; - } - prgnClip = fbGetCompositeClip (pGC); - xorg = pDrawable->x; - yorg = pDrawable->y; - - if (xorg || yorg) - { - prect = prectInit; - n = nrectFill; - while(n--) - { - prect->x += xorg; - prect->y += yorg; - prect++; - } - } - - prect = prectInit; - - numRects = REGION_NUM_RECTS(prgnClip) * nrectFill; - if (numRects > NUM_STACK_RECTS) - { - pboxClippedBase = (BoxPtr)xalloc(numRects * sizeof(BoxRec)); - if (!pboxClippedBase) - return; - } - else - pboxClippedBase = stackRects; - - pboxClipped = pboxClippedBase; - - if (REGION_NUM_RECTS(prgnClip) == 1) - { - int x1, y1, x2, y2, bx2, by2; - - pextent = REGION_RECTS(prgnClip); - x1 = pextent->x1; - y1 = pextent->y1; - x2 = pextent->x2; - y2 = pextent->y2; - while (nrectFill--) - { - if ((pboxClipped->x1 = prect->x) < x1) - pboxClipped->x1 = x1; - - if ((pboxClipped->y1 = prect->y) < y1) - pboxClipped->y1 = y1; - - bx2 = (int) prect->x + (int) prect->width; - if (bx2 > x2) - bx2 = x2; - pboxClipped->x2 = bx2; - - by2 = (int) prect->y + (int) prect->height; - if (by2 > y2) - by2 = y2; - pboxClipped->y2 = by2; - - prect++; - if ((pboxClipped->x1 < pboxClipped->x2) && - (pboxClipped->y1 < pboxClipped->y2)) - { - pboxClipped++; - } - } - } - else - { - int x1, y1, x2, y2, bx2, by2; - - pextent = REGION_EXTENTS(pGC->pScreen, prgnClip); - x1 = pextent->x1; - y1 = pextent->y1; - x2 = pextent->x2; - y2 = pextent->y2; - while (nrectFill--) - { - BoxRec box; - - if ((box.x1 = prect->x) < x1) - box.x1 = x1; - - if ((box.y1 = prect->y) < y1) - box.y1 = y1; - - bx2 = (int) prect->x + (int) prect->width; - if (bx2 > x2) - bx2 = x2; - box.x2 = bx2; - - by2 = (int) prect->y + (int) prect->height; - if (by2 > y2) - by2 = y2; - box.y2 = by2; - - prect++; - - if ((box.x1 >= box.x2) || (box.y1 >= box.y2)) - continue; - - n = REGION_NUM_RECTS (prgnClip); - pbox = REGION_RECTS(prgnClip); - - /* clip the rectangle to each box in the clip region - this is logically equivalent to calling Intersect() - */ - while(n--) - { - pboxClipped->x1 = max(box.x1, pbox->x1); - pboxClipped->y1 = max(box.y1, pbox->y1); - pboxClipped->x2 = min(box.x2, pbox->x2); - pboxClipped->y2 = min(box.y2, pbox->y2); - pbox++; - - /* see if clipping left anything */ - if(pboxClipped->x1 < pboxClipped->x2 && - pboxClipped->y1 < pboxClipped->y2) - { - pboxClipped++; - } - } - } - } - if (pboxClipped != pboxClippedBase) - { - switch (pGC->fillStyle) { - case FillSolid: - igsFillBoxSolid(pDrawable, - pboxClipped-pboxClippedBase, pboxClippedBase, - pGC->fgPixel, pGC->alu, pGC->planemask); - break; - case FillTiled: - igsFillBoxTiled(pDrawable, - pboxClipped-pboxClippedBase, pboxClippedBase, - pGC->tile.pixmap, - pGC->patOrg.x + pDrawable->x, - pGC->patOrg.y + pDrawable->y, - pGC->alu); - break; - case FillStippled: - case FillOpaqueStippled: - igsFillBoxStippled (pDrawable, pGC, - pboxClipped-pboxClippedBase, pboxClippedBase); - break; - } - } - if (pboxClippedBase != stackRects) - xfree(pboxClippedBase); -} - -int -igsTextInRegion (GCPtr pGC, - int x, - int y, - unsigned int nglyph, - CharInfoPtr *ppci) -{ - int w; - FontPtr pfont = pGC->font; - BoxRec bbox; - - if (FONTCONSTMETRICS(pfont)) - w = FONTMAXBOUNDS(pfont,characterWidth) * nglyph; - else - { - w = 0; - while (nglyph--) - w += (*ppci++)->metrics.characterWidth; - } - if (w < 0) - { - bbox.x1 = x + w; - bbox.x2 = x; - } - else - { - bbox.x1 = x; - bbox.x2 = x + w; - } - w = FONTMINBOUNDS(pfont,leftSideBearing); - if (w < 0) - bbox.x1 += w; - w = FONTMAXBOUNDS(pfont, rightSideBearing) - FONTMINBOUNDS(pfont, characterWidth); - if (w > 0) - bbox.x2 += w; - bbox.y1 = y - FONTMAXBOUNDS(pfont,ascent); - bbox.y2 = y + FONTMAXBOUNDS(pfont,descent); - - return RECT_IN_REGION(pGC->pScreen, fbGetCompositeClip(pGC), &bbox); -} - -void -igsGlyphBltClipped (DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - unsigned int nglyph, - CharInfoPtr *ppciInit, - Bool image) -{ - SetupIgs(pDrawable->pScreen); - CARD32 cmd; - int h; - int w; - int xBack, yBack; - int hBack, wBack; - int lw; - FontPtr pfont = pGC->font; - CharInfoPtr pci; - unsigned long *bits; - BoxPtr extents; - BoxRec bbox; - CARD32 b; - CharInfoPtr *ppci; - FbGCPrivPtr fbPriv = fbGetGCPrivate(pGC); - RegionPtr pClip = fbGetCompositeClip(pGC); - BoxPtr pBox; - int nbox; - int x1, y1, x2, y2; - unsigned char alu; - Bool set; - PixTransDeclare; - - if (image) - { - xBack = x; - yBack = y - FONTASCENT(pGC->font); - wBack = 0; - hBack = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font); - if (hBack) - { - h = nglyph; - ppci = ppciInit; - while (h--) - wBack += (*ppci++)->metrics.characterWidth; - } - if (wBack < 0) - { - xBack = xBack + wBack; - wBack = -wBack; - } - if (hBack < 0) - { - yBack = yBack + hBack; - hBack = -hBack; - } - alu = GXcopy; - if (wBack) - { - _igsSetSolidRect (cop, GXcopy, pGC->planemask, pGC->bgPixel, cmd); - for (nbox = REGION_NUM_RECTS (pClip), - pBox = REGION_RECTS (pClip); - nbox--; - pBox++) - { - x1 = xBack; - x2 = xBack + wBack; - y1 = yBack; - y2 = yBack + hBack; - if (x1 < pBox->x1) x1 = pBox->x1; - if (x2 > pBox->x2) x2 = pBox->x2; - if (y1 < pBox->y1) y1 = pBox->y1; - if (y2 > pBox->y2) y2 = pBox->y2; - if (x1 < x2 && y1 < y2) - { - _igsRect (cop, x1, y1, x2 - x1, y2 - y1, cmd); - } - } - KdMarkSync (pDrawable->pScreen); - } - } - else - { - wBack = 0; - alu = pGC->alu; - } - - ppci = ppciInit; - set = FALSE; - while (nglyph--) - { - pci = *ppci++; - h = pci->metrics.ascent + pci->metrics.descent; - w = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing; - x1 = x + pci->metrics.leftSideBearing; - y1 = y - pci->metrics.ascent; - bbox.x1 = x1; - bbox.y1 = y1; - bbox.x2 = x1 + w; - bbox.y2 = y1 + h; - switch (RECT_IN_REGION(pGC->pScreen, pClip, &bbox)) - { - case rgnIN: - lw = h * ((w + 31) >> 5); - if (lw) - { - if (!set) - { - _igsSetTransparentPlaneBlt (cop, alu, pGC->planemask, pGC->fgPixel, cmd); - set = TRUE; - } - _igsPlaneBlt(cop, - x + pci->metrics.leftSideBearing, - y - pci->metrics.ascent, - w, h, cmd); - bits = (unsigned long *) pci->bits; - PixTransStart (lw); - while (lw--) - { - b = *bits++; - IgsAdjustBits32 (b); - PixTransStore(b); - } - KdMarkSync (pDrawable->pScreen); - } - break; - case rgnPART: - set = FALSE; - KdCheckSync (pDrawable->pScreen); - fbPutXYImage (pDrawable, - pClip, - fbPriv->fg, - fbPriv->bg, - fbPriv->pm, - alu, - FALSE, - x1, y1, - w, h, - (FbStip *) pci->bits, - (w + 31) >> 5, - 0); - break; - case rgnOUT: - break; - } - x += pci->metrics.characterWidth; - } -} - -void -igsGlyphBlt (DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - unsigned int nglyph, - CharInfoPtr *ppciInit, - Bool image) -{ - SetupIgs(pDrawable->pScreen); - CARD32 cmd; - int h; - int w; - int xBack, yBack; - int hBack, wBack; - int lw; - FontPtr pfont = pGC->font; - CharInfoPtr pci; - unsigned long *bits; - BoxPtr extents; - BoxRec bbox; - CARD32 b; - CharInfoPtr *ppci; - unsigned char alu; - PixTransDeclare; - - /* - * Paint background for image text - */ - if (image) - { - xBack = x; - yBack = y - FONTASCENT(pGC->font); - wBack = 0; - hBack = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font); - if (hBack) - { - h = nglyph; - ppci = ppciInit; - while (h--) - wBack += (*ppci++)->metrics.characterWidth; - } - if (wBack < 0) - { - xBack = xBack + wBack; - wBack = -wBack; - } - if (hBack < 0) - { - yBack = yBack + hBack; - hBack = -hBack; - } - alu = GXcopy; - if (wBack) - { - _igsSetSolidRect (cop, GXcopy, pGC->planemask, pGC->bgPixel, cmd); - _igsRect (cop, xBack, yBack, wBack, hBack, cmd); - } - } - else - { - wBack = 0; - alu = pGC->alu; - } - - _igsSetTransparentPlaneBlt (cop, alu, pGC->planemask, pGC->fgPixel, cmd); - ppci = ppciInit; - while (nglyph--) - { - pci = *ppci++; - h = pci->metrics.ascent + pci->metrics.descent; - w = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing; - lw = h * ((w + 31) >> 5); - if (lw) - { - _igsPlaneBlt(cop, - x + pci->metrics.leftSideBearing, - y - pci->metrics.ascent, - w, h, cmd); - bits = (unsigned long *) pci->bits; - PixTransStart(lw); - while (lw--) - { - b = *bits++; - IgsAdjustBits32 (b); - PixTransStore(b); - } - } - x += pci->metrics.characterWidth; - } - KdMarkSync (pDrawable->pScreen); -} - -void -igsTEGlyphBlt (DrawablePtr pDrawable, - GCPtr pGC, - int xInit, - int yInit, - unsigned int nglyph, - CharInfoPtr *ppci, - Bool image) -{ - SetupIgs(pDrawable->pScreen); - CARD32 cmd; - int x, y; - int h, lw, lwTmp; - int w; - FontPtr pfont = pGC->font; - unsigned long *char1, *char2, *char3, *char4; - int widthGlyphs, widthGlyph; - BoxRec bbox; - CARD32 tmp; - PixTransDeclare; - - widthGlyph = FONTMAXBOUNDS(pfont,characterWidth); - if (!widthGlyph) - return; - - h = FONTASCENT(pfont) + FONTDESCENT(pfont); - if (!h) - return; - - x = xInit + FONTMAXBOUNDS(pfont,leftSideBearing); - y = yInit - FONTASCENT(pfont); - - if (image) - { - _igsSetOpaquePlaneBlt (cop, GXcopy, pGC->planemask, pGC->fgPixel, pGC->bgPixel, cmd); - } - else - { - _igsSetTransparentPlaneBlt (cop, pGC->alu, pGC->planemask, pGC->fgPixel, cmd); - } - -#if BITMAP_BIT_ORDER == LSBFirst -#define SHIFT << -#else -#define SHIFT >> -#endif - -#define LoopIt(count, w, loadup, fetch) \ - while (nglyph >= count) \ - { \ - nglyph -= count; \ - _igsPlaneBlt (cop, x, y, w, h, cmd); \ - x += w; \ - loadup \ - lwTmp = h; \ - PixTransStart(h); \ - while (lwTmp--) { \ - tmp = fetch; \ - IgsAdjustBits32(tmp); \ - PixTransStore(tmp); \ - } \ - } - - if (widthGlyph <= 8) - { - widthGlyphs = widthGlyph << 2; - LoopIt(4, widthGlyphs, - char1 = (unsigned long *) (*ppci++)->bits; - char2 = (unsigned long *) (*ppci++)->bits; - char3 = (unsigned long *) (*ppci++)->bits; - char4 = (unsigned long *) (*ppci++)->bits;, - (*char1++ | ((*char2++ | ((*char3++ | (*char4++ - SHIFT widthGlyph)) - SHIFT widthGlyph)) - SHIFT widthGlyph))) - } - else if (widthGlyph <= 10) - { - widthGlyphs = (widthGlyph << 1) + widthGlyph; - LoopIt(3, widthGlyphs, - char1 = (unsigned long *) (*ppci++)->bits; - char2 = (unsigned long *) (*ppci++)->bits; - char3 = (unsigned long *) (*ppci++)->bits;, - (*char1++ | ((*char2++ | (*char3++ SHIFT widthGlyph)) SHIFT widthGlyph))) - } - else if (widthGlyph <= 16) - { - widthGlyphs = widthGlyph << 1; - LoopIt(2, widthGlyphs, - char1 = (unsigned long *) (*ppci++)->bits; - char2 = (unsigned long *) (*ppci++)->bits;, - (*char1++ | (*char2++ SHIFT widthGlyph))) - } - lw = h * ((widthGlyph + 31) >> 5); - while (nglyph--) - { - _igsPlaneBlt (cop, x, y, widthGlyph, h, cmd); - x += widthGlyph; - char1 = (unsigned long *) (*ppci++)->bits; - lwTmp = lw; - PixTransStart(lw); - while (lwTmp--) - { - tmp = *char1++; - IgsAdjustBits32(tmp); - PixTransStore(tmp); - } - } - KdMarkSync (pDrawable->pScreen); -} - -/* - * Blt glyphs using image transfer window - */ - -void -igsPolyGlyphBlt (DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - unsigned int nglyph, - CharInfoPtr *ppci, - pointer pglyphBase) -{ - if (pGC->fillStyle != FillSolid || - fbGetGCPrivate(pGC)->pm != FB_ALLONES) - { - KdCheckPolyGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); - return; - } - x += pDrawable->x; - y += pDrawable->y; - - switch (igsTextInRegion (pGC, x, y, nglyph, ppci)) { - case rgnIN: - if (TERMINALFONT(pGC->font)) - igsTEGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, FALSE); - else - igsGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, FALSE); - break; - case rgnPART: - igsGlyphBltClipped (pDrawable, pGC, x, y, nglyph, ppci, FALSE); - break; - case rgnOUT: - break; - } -} - -void -igsImageGlyphBlt (DrawablePtr pDrawable, - GCPtr pGC, - int x, int y, - unsigned int nglyph, - CharInfoPtr *ppci, - pointer pglyphBase) -{ - if (fbGetGCPrivate(pGC)->pm != FB_ALLONES) - { - KdCheckImageGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); - return; - } - x += pDrawable->x; - y += pDrawable->y; - - switch (igsTextInRegion (pGC, x, y, nglyph, ppci)) { - case rgnIN: - if (TERMINALFONT(pGC->font)) - igsTEGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, TRUE); - else - igsGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, TRUE); - break; - case rgnPART: - igsGlyphBltClipped (pDrawable, pGC, x, y, nglyph, ppci, TRUE); - break; - case rgnOUT: - break; - } -} - -static void -igsInvalidatePattern (IgsPatternCache *c, - PixmapPtr pPixmap) -{ - int i; - - if (c->base) - { - for (i = 0; i < IGS_NUM_PATTERN; i++) - { - if (c->pattern[i].serial_number == pPixmap->drawable.serialNumber) - c->pattern[i].serial_number = ~0; - } - } -} - -static void -igsInitPattern (IgsPatternCache *c, int bsize, int psize) -{ - int i; - int boffset; - int poffset; - - for (i = 0; i < IGS_NUM_PATTERN; i++) - { - boffset = i * bsize; - poffset = i * psize; - c->pattern[i].xrot = -1; - c->pattern[i].yrot = -1; - c->pattern[i].serial_number = ~0; - c->pattern[i].offset = c->offset + poffset; - c->pattern[i].base = c->base + boffset; - } - c->next = 0; -} - -static const GCOps igsOps = { - igsFillSpans, - KdCheckSetSpans, - KdCheckPutImage, - igsCopyArea, - igsCopyPlane, - KdCheckPolyPoint, - KdCheckPolylines, - KdCheckPolySegment, - miPolyRectangle, - KdCheckPolyArc, - miFillPolygon, - igsPolyFillRect, - KdCheckPolyFillArc, - miPolyText8, - miPolyText16, - miImageText8, - miImageText16, - igsImageGlyphBlt, - igsPolyGlyphBlt, - igsPushPixels, -}; - -void -igsValidateGC (GCPtr pGC, Mask changes, DrawablePtr pDrawable) -{ - FbGCPrivPtr fbPriv = fbGetGCPrivate(pGC); - - fbValidateGC (pGC, changes, pDrawable); - - if (pDrawable->type == DRAWABLE_WINDOW) - pGC->ops = (GCOps *) &igsOps; - else - pGC->ops = (GCOps *) &fbGCOps; -} - -GCFuncs igsGCFuncs = { - igsValidateGC, - miChangeGC, - miCopyGC, - miDestroyGC, - miChangeClip, - miDestroyClip, - miCopyClip -}; - -int -igsCreateGC (GCPtr pGC) -{ - if (!fbCreateGC (pGC)) - return FALSE; - - if (pGC->depth != 1) - pGC->funcs = &igsGCFuncs; - - return TRUE; -} - -void -igsCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - KdScreenPriv(pScreen); - RegionRec rgnDst; - int dx, dy; - WindowPtr pwinRoot; - - pwinRoot = WindowTable[pWin->drawable.pScreen->myNum]; - - dx = ptOldOrg.x - pWin->drawable.x; - dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); - - REGION_INIT (pWin->drawable.pScreen, &rgnDst, NullBox, 0); - - REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst, &pWin->borderClip, prgnSrc); - - fbCopyRegion ((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot, - 0, - &rgnDst, dx, dy, igsCopyNtoN, 0, 0); - - REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); -} - - -Bool -igsDrawInit (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - igsCardInfo(pScreenPriv); - igsScreenInfo(pScreenPriv); - int i; - int pattern_size; - int boffset, poffset; - - KdScreenInitAsync (pScreen); - - /* - * Replace various fb screen functions - */ - pScreen->CreateGC = igsCreateGC; - pScreen->CopyWindow = igsCopyWindow; - - /* - * Initialize patterns - */ - if (igss->tile.base) - { - pattern_size = IgsTileSize(pScreenPriv->screen->fb[0].bitsPerPixel); - igsInitPattern (&igss->tile, - pattern_size, - pattern_size * 8 / pScreenPriv->screen->fb[0].bitsPerPixel); - pattern_size = IgsStippleSize(pScreenPriv->screen->fb[0].bitsPerPixel); - igsInitPattern (&igss->stipple, - pattern_size, - pattern_size * 8 / pScreenPriv->screen->fb[0].bitsPerPixel); - } - return TRUE; -} - -void -igsDrawEnable (ScreenPtr pScreen) -{ - SetupIgs(pScreen); - CARD32 cmd; - CARD32 base; - CARD16 stride; - CARD32 format; - - stride = pScreenPriv->screen->fb[0].pixelStride; - _igsWaitIdleEmpty(cop); - _igsReset(cop); - switch (pScreenPriv->screen->fb[0].bitsPerPixel) { - case 8: - format = IGS_FORMAT_8BPP; - break; - case 16: - format = IGS_FORMAT_16BPP; - break; - case 24: - format = IGS_FORMAT_24BPP; - break; - case 32: - format = IGS_FORMAT_32BPP; - break; - } - cop->format = format; - cop->dst_stride = stride - 1; - cop->src1_stride = stride - 1; - cop->src2_stride = stride - 1; - cop->src1_start = 0; - cop->src2_start = 0; - cop->extension |= IGS_BLOCK_COP_REG | IGS_BURST_ENABLE; - - _igsSetSolidRect(cop, GXcopy, ~0, pScreen->blackPixel, cmd); - _igsRect (cop, 0, 0, - pScreenPriv->screen->width, pScreenPriv->screen->height, - cmd); - _igsWaitIdleEmpty (cop); -} - -void -igsDrawDisable (ScreenPtr pScreen) -{ -} - -void -igsDrawFini (ScreenPtr pScreen) -{ -} - -void -igsDrawSync (ScreenPtr pScreen) -{ - SetupIgs(pScreen); - - _igsWaitIdleEmpty(cop); -} diff --git a/hw/kdrive/igs/igsdraw.h b/hw/kdrive/igs/igsdraw.h deleted file mode 100644 index ab80f9acd..000000000 --- a/hw/kdrive/igs/igsdraw.h +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Copyright © 2000 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _IGSDRAW_H_ -#define _IGSDRAW_H_ - -extern CARD8 igsPatRop[]; - -#define SetupIgs(s) KdScreenPriv(s); \ - igsCardInfo(pScreenPriv); \ - Cop5xxx *cop = igsc->cop; \ - int cop_stride = pScreenPriv->screen->fb[0].pixelStride - -#define _igsWaitLoop(cop,mask,value) { \ - int __loop = 1000000; \ - while (((cop)->control & (mask)) != (value)) { \ - if (--__loop <= 0) { \ - FatalError("Warning: igsWaitLoop 0x%x 0x%x failed\n", mask, value); \ - } \ - } \ -} - -#define _igsWaitDone(cop) _igsWaitLoop(cop, \ - (IGS_CONTROL_BUSY| \ - IGS_CONTROL_MALLWBEPTZ), \ - 0) - -#if 1 -#define _igsWaitFull(cop) _igsWaitLoop(cop, \ - IGS_CONTROL_CMDFF, \ - 0) -#else -#define _igsWaitFull(cop) _igsWaitDone(cop) -#endif - -#define _igsWaitIdleEmpty(cop) _igsWaitDone(cop) -#define _igsWaitHostBltAck(cop) _igsWaitLoop(cop, \ - (IGS_CONTROL_HBACKZ| \ - IGS_CONTROL_CMDFF), \ - 0) - -#define _igsReset(cop) ((cop)->control = 0) - -#define IgsInvertBits32(v) { \ - v = ((v & 0x55555555) << 1) | ((v >> 1) & 0x55555555); \ - v = ((v & 0x33333333) << 2) | ((v >> 2) & 0x33333333); \ - v = ((v & 0x0f0f0f0f) << 4) | ((v >> 4) & 0x0f0f0f0f); \ -} - -#define IgsInvertBits16(v) { \ - v = ((v & 0x5555) << 1) | ((v >> 1) & 0x5555); \ - v = ((v & 0x3333) << 2) | ((v >> 2) & 0x3333); \ - v = ((v & 0x0f0f) << 4) | ((v >> 4) & 0x0f0f); \ -} - -#define IgsInvertBits8(v) { \ - v = ((v & 0x55) << 1) | ((v >> 1) & 0x55); \ - v = ((v & 0x33) << 2) | ((v >> 2) & 0x33); \ - v = ((v & 0x0f) << 4) | ((v >> 4) & 0x0f); \ -} - -#define IgsByteSwap32(x) ((x) = (((x) >> 24) | \ - (((x) >> 8) & 0xff00) | \ - (((x) << 8) & 0xff0000) | \ - ((x) << 24))) - -#define IgsByteSwap16(x) ((x) = ((x) << 8) | ((x) >> 8)) - -#define igsPatternDimOk(d) ((d) <= IGS_PATTERN_WIDTH && (((d) & ((d) - 1)) == 0)) - -#if BITMAP_BIT_ORDER == LSBFirst -#define IgsAdjustBits32(b) IgsInvertBits32(b) -#define IgsAdjustBits16(x) IgsInvertBits16(x) -#else -#define IgsAdjustBits32(x) IgsByteSwap32(x) -#define IgsAdjustBits16(x) IgsByteSwap16(x) -#endif - -#define _igsSetSolidRect(cop,alu,pm,pix,cmd) {\ - _igsWaitFull(cop); \ - (cop)->mix = IGS_MAKE_MIX(alu,alu); \ - (cop)->fg = (pix); \ - (cmd) = (IGS_DRAW_T_B | \ - IGS_DRAW_L_R | \ - IGS_DRAW_ALL | \ - IGS_PIXEL_FG | \ - IGS_HBLT_DISABLE | \ - IGS_SRC2_NORMAL | \ - IGS_STEP_PXBLT | \ - IGS_FGS_FG | \ - IGS_BGS_BG); \ -} - -#define _igsSetTiledRect(cop,alu,pm,base,cmd) {\ - _igsWaitFull(cop); \ - (cop)->mix = IGS_MAKE_MIX(alu,alu); \ - (cop)->src1_stride = IGS_PATTERN_WIDTH - 1; \ - (cop)->src1_start = (base); \ - (cmd) = (IGS_DRAW_T_B | \ - IGS_DRAW_L_R | \ - IGS_DRAW_ALL | \ - IGS_PIXEL_TILE | \ - IGS_HBLT_DISABLE | \ - IGS_SRC2_NORMAL | \ - IGS_STEP_PXBLT | \ - IGS_FGS_SRC | \ - IGS_BGS_BG); \ -} - -#define _igsSetStippledRect(cop,alu,pm,pix,base,cmd) {\ - _igsWaitFull(cop); \ - (cop)->mix = IGS_MAKE_MIX(alu,alu); \ - (cop)->src1_start = (base); \ - (cop)->fg = (pix); \ - (cmd) = (IGS_DRAW_T_B | \ - IGS_DRAW_L_R | \ - IGS_DRAW_ALL | \ - IGS_PIXEL_STIP_TRANS | \ - IGS_HBLT_DISABLE | \ - IGS_SRC2_NORMAL | \ - IGS_STEP_PXBLT | \ - IGS_FGS_FG | \ - IGS_BGS_BG); \ -} - -#define _igsSetOpaqueStippledRect(cop,alu,pm,_fg,_bg,base,cmd) {\ - _igsWaitFull(cop); \ - (cop)->mix = IGS_MAKE_MIX(alu,alu); \ - (cop)->src1_start = (base); \ - (cop)->fg = (_fg); \ - (cop)->bg = (_bg); \ - (cmd) = (IGS_DRAW_T_B | \ - IGS_DRAW_L_R | \ - IGS_DRAW_ALL | \ - IGS_PIXEL_STIP_OPAQUE | \ - IGS_HBLT_DISABLE | \ - IGS_SRC2_NORMAL | \ - IGS_STEP_PXBLT | \ - IGS_FGS_FG | \ - IGS_BGS_BG); \ -} - -#define _igsRect(cop,x,y,w,h,cmd) { \ - _igsWaitFull(cop); \ - (cop)->dst_start = (x) + (y) * (cop_stride); \ - (cop)->dim = IGS_MAKE_DIM(w-1,h-1); \ - (cop)->operation = (cmd); \ -} - -#define _igsPatRect(cop,x,y,w,h,cmd) { \ - _igsWaitFull(cop); \ - (cop)->dst_start = (x) + (y) * (cop_stride); \ - (cop)->rotate = IGS_MAKE_ROTATE(x&7,y&7); \ - (cop)->dim = IGS_MAKE_DIM(w-1,h-1); \ - (cop)->operation = (cmd); \ -} - -#define _igsSetBlt(cop,alu,pm,backwards,upsidedown,cmd) { \ - _igsWaitFull(cop); \ - (cop)->mix = IGS_MAKE_MIX(alu,alu); \ - (cop)->src1_stride = cop_stride - 1; \ - (cmd) = (IGS_DRAW_ALL | \ - IGS_PIXEL_FG | \ - IGS_HBLT_DISABLE | \ - IGS_SRC2_NORMAL | \ - IGS_STEP_PXBLT | \ - IGS_FGS_SRC | \ - IGS_BGS_BG); \ - if (backwards) (cmd) |= IGS_DRAW_R_L; \ - if (upsidedown) (cmd) |= IGS_DRAW_B_T; \ -} - -#if 0 -#define _igsPreparePlaneBlt(cop) { \ - _igsReset(cop); \ - (cop)->dst_stride = cop_stride - 1; \ - (cop)->src1_stride = cop_stride - 1; \ - (cop)->src2_stride = cop_stride - 1; \ - (cop)->format = IGS_FORMAT_16BPP; \ - (cop)->src1_start = 0; \ - (cop)->src2_start = 0; \ -} -#else -#define _igsPreparePlaneBlt(cop) -#endif - -#define _igsSetTransparentPlaneBlt(cop,alu,pm,fg_pix,cmd) { \ - _igsWaitIdleEmpty(cop); \ - _igsPreparePlaneBlt(cop); \ - (cop)->mix = IGS_MAKE_MIX(igsPatRop[alu],igsPatRop[alu]); \ - (cop)->fg = (fg_pix); \ - (cmd) = (IGS_DRAW_T_B | \ - IGS_DRAW_L_R | \ - IGS_DRAW_ALL | \ - IGS_PIXEL_FG | \ - IGS_HBLT_WRITE_2 | \ - IGS_SRC2_MONO_TRANS | \ - IGS_STEP_TERNARY_PXBLT | \ - IGS_FGS_FG | \ - IGS_BGS_BG); \ -} - -#define _igsSetOpaquePlaneBlt(cop,alu,pm,fg_pix,bg_pix,cmd) { \ - _igsWaitIdleEmpty(cop); \ - _igsPreparePlaneBlt(cop); \ - (cop)->mix = IGS_MAKE_MIX(igsPatRop[alu],igsPatRop[alu]); \ - (cop)->fg = (fg_pix); \ - (cop)->bg = (bg_pix); \ - (cmd) = (IGS_DRAW_T_B | \ - IGS_DRAW_L_R | \ - IGS_DRAW_ALL | \ - IGS_PIXEL_FG | \ - IGS_HBLT_WRITE_2 | \ - IGS_SRC2_MONO_OPAQUE | \ - IGS_STEP_TERNARY_PXBLT | \ - IGS_FGS_FG | \ - IGS_BGS_BG); \ -} - -#define _igsPlaneBlt(cop,x,y,w,h,cmd) { \ -/* _igsWaitFull(cop); */ \ - (cop)->dst_start = (x) + (y) * (cop_stride); \ - (cop)->dim = IGS_MAKE_DIM((w)-1,(h)-1); \ - (cop)->operation = (cmd); \ -/* _igsWaitHostBltAck(cop); */ \ -} - -#define _igsBlt(cop,sx,sy,dx,dy,w,h,cmd) { \ - _igsWaitFull(cop); \ - (cop)->dst_start = (dx) + (dy) * cop_stride; \ - (cop)->src1_start = (sx) + (sy) * cop_stride; \ - (cop)->src1_stride = cop_stride - 1; \ - (cop)->dim = IGS_MAKE_DIM(w-1,h-1); \ - (cop)->operation = (cmd); \ -} - -#define sourceInvarient(alu) (((alu) & 3) == (((alu) >> 2) & 3)) - -#endif diff --git a/hw/kdrive/igs/igsreg.c b/hw/kdrive/igs/igsreg.c deleted file mode 100644 index 6d6f28b73..000000000 --- a/hw/kdrive/igs/igsreg.c +++ /dev/null @@ -1,969 +0,0 @@ -/* - * Copyright © 2000 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "igsreg.h" -#include - -#define CR00 IGS_CR+0x00 -#define CR01 IGS_CR+0x01 -#define CR02 IGS_CR+0x02 -#define CR03 IGS_CR+0x03 -#define CR04 IGS_CR+0x04 -#define CR05 IGS_CR+0x05 -#define CR06 IGS_CR+0x06 -#define CR07 IGS_CR+0x07 -#define CR08 IGS_CR+0x08 -#define CR09 IGS_CR+0x09 -#define CR0A IGS_CR+0x0A -#define CR0B IGS_CR+0x0B -#define CR0C IGS_CR+0x0C -#define CR0D IGS_CR+0x0D -#define CR0E IGS_CR+0x0E -#define CR0F IGS_CR+0x0F -#define CR10 IGS_CR+0x10 -#define CR11 IGS_CR+0x11 -#define CR12 IGS_CR+0x12 -#define CR13 IGS_CR+0x13 -#define CR14 IGS_CR+0x14 -#define CR15 IGS_CR+0x15 -#define CR16 IGS_CR+0x16 -#define CR17 IGS_CR+0x17 -#define CR18 IGS_CR+0x18 -#define CR19 IGS_CR+0x19 -#define CR1A IGS_CR+0x1A -#define CR1B IGS_CR+0x1B -#define CR1C IGS_CR+0x1C -#define CR1D IGS_CR+0x1D -#define CR1E IGS_CR+0x1E -#define CR1F IGS_CR+0x1F -#define CR20 IGS_CR+0x20 -#define CR21 IGS_CR+0x21 -#define CR22 IGS_CR+0x22 -#define CR23 IGS_CR+0x23 -#define CR24 IGS_CR+0x24 -#define CR25 IGS_CR+0x25 -#define CR26 IGS_CR+0x26 -#define CR27 IGS_CR+0x27 -#define CR28 IGS_CR+0x28 -#define CR29 IGS_CR+0x29 -#define CR2A IGS_CR+0x2A -#define CR2B IGS_CR+0x2B -#define CR2C IGS_CR+0x2C -#define CR2D IGS_CR+0x2D -#define CR2E IGS_CR+0x2E -#define CR2F IGS_CR+0x2F -#define CR30 IGS_CR+0x30 -#define CR31 IGS_CR+0x31 -#define CR32 IGS_CR+0x32 -#define CR33 IGS_CR+0x33 -#define CR34 IGS_CR+0x34 -#define CR35 IGS_CR+0x35 -#define CR36 IGS_CR+0x36 -#define CR37 IGS_CR+0x37 -#define CR38 IGS_CR+0x38 -#define CR39 IGS_CR+0x39 -#define CR3A IGS_CR+0x3A -#define CR3B IGS_CR+0x3B -#define CR3C IGS_CR+0x3C -#define CR3D IGS_CR+0x3D -#define CR3E IGS_CR+0x3E -#define CR3F IGS_CR+0x3F -#define CR40 IGS_CR+0x40 -#define CR41 IGS_CR+0x41 -#define CR42 IGS_CR+0x42 -#define CR43 IGS_CR+0x43 -#define CR44 IGS_CR+0x44 -#define CR45 IGS_CR+0x45 -#define CR46 IGS_CR+0x46 -#define CR47 IGS_CR+0x47 -#define CR48 IGS_CR+0x48 - -#define CR_FIRST CR00 -#define CR_LAST CR48 - -#define SR00 IGS_SR+0x00 -#define SR01 IGS_SR+0x01 -#define SR02 IGS_SR+0x02 -#define SR03 IGS_SR+0x03 -#define SR04 IGS_SR+0x04 - -#define SR_FIRST SR00 -#define SR_LAST SR04 - -#define AR00 IGS_AR+0x00 -#define AR01 IGS_AR+0x01 -#define AR02 IGS_AR+0x02 -#define AR03 IGS_AR+0x03 -#define AR04 IGS_AR+0x04 -#define AR05 IGS_AR+0x05 -#define AR06 IGS_AR+0x06 -#define AR07 IGS_AR+0x07 -#define AR08 IGS_AR+0x08 -#define AR09 IGS_AR+0x09 -#define AR0A IGS_AR+0x0A -#define AR0B IGS_AR+0x0B -#define AR0C IGS_AR+0x0C -#define AR0D IGS_AR+0x0D -#define AR0E IGS_AR+0x0E -#define AR0F IGS_AR+0x0F -#define AR10 IGS_AR+0x10 -#define AR11 IGS_AR+0x11 -#define AR12 IGS_AR+0x12 -#define AR13 IGS_AR+0x13 -#define AR14 IGS_AR+0x14 - -#define AR_FIRST AR00 -#define AR_LAST AR14 - -#define GR00 IGS_GR+0x00 -#define GR01 IGS_GR+0x01 -#define GR02 IGS_GR+0x02 -#define GR03 IGS_GR+0x03 -#define GR04 IGS_GR+0x04 -#define GR05 IGS_GR+0x05 -#define GR06 IGS_GR+0x06 -#define GR07 IGS_GR+0x07 -#define GR08 IGS_GR+0x08 -#define GR09 IGS_GR+0x09 -#define GR0A IGS_GR+0x0A -#define GR0B IGS_GR+0x0B -#define GR0C IGS_GR+0x0C -#define GR0D IGS_GR+0x0D -#define GR0E IGS_GR+0x0E -#define GR0F IGS_GR+0x0F -#define GR10 IGS_GR+0x10 -#define GR11 IGS_GR+0x11 -#define GR12 IGS_GR+0x12 -#define GR13 IGS_GR+0x13 -#define GR14 IGS_GR+0x14 -#define GR15 IGS_GR+0x15 -#define GR16 IGS_GR+0x16 -#define GR17 IGS_GR+0x17 -#define GR18 IGS_GR+0x18 -#define GR19 IGS_GR+0x19 -#define GR1A IGS_GR+0x1A -#define GR1B IGS_GR+0x1B -#define GR1C IGS_GR+0x1C -#define GR1D IGS_GR+0x1D -#define GR1E IGS_GR+0x1E -#define GR1F IGS_GR+0x1F -#define GR20 IGS_GR+0x20 -#define GR21 IGS_GR+0x21 -#define GR22 IGS_GR+0x22 -#define GR23 IGS_GR+0x23 -#define GR24 IGS_GR+0x24 -#define GR25 IGS_GR+0x25 -#define GR26 IGS_GR+0x26 -#define GR27 IGS_GR+0x27 -#define GR28 IGS_GR+0x28 -#define GR29 IGS_GR+0x29 -#define GR2A IGS_GR+0x2A -#define GR2B IGS_GR+0x2B -#define GR2C IGS_GR+0x2C -#define GR2D IGS_GR+0x2D -#define GR2E IGS_GR+0x2E -#define GR2F IGS_GR+0x2F -#define GR30 IGS_GR+0x30 -#define GR31 IGS_GR+0x31 -#define GR32 IGS_GR+0x32 -#define GR33 IGS_GR+0x33 -#define GR34 IGS_GR+0x34 -#define GR35 IGS_GR+0x35 -#define GR36 IGS_GR+0x36 -#define GR37 IGS_GR+0x37 -#define GR38 IGS_GR+0x38 -#define GR39 IGS_GR+0x39 -#define GR3A IGS_GR+0x3A -#define GR3B IGS_GR+0x3B -#define GR3C IGS_GR+0x3C -#define GR3D IGS_GR+0x3D -#define GR3E IGS_GR+0x3E -#define GR3F IGS_GR+0x3F -#define GR40 IGS_GR+0x40 -#define GR41 IGS_GR+0x41 -#define GR42 IGS_GR+0x42 -#define GR43 IGS_GR+0x43 -#define GR44 IGS_GR+0x44 -#define GR45 IGS_GR+0x45 -#define GR46 IGS_GR+0x46 -#define GR47 IGS_GR+0x47 -#define GR48 IGS_GR+0x48 -#define GR49 IGS_GR+0x49 -#define GR4A IGS_GR+0x4A -#define GR4B IGS_GR+0x4B -#define GR4C IGS_GR+0x4C -#define GR4D IGS_GR+0x4D -#define GR4E IGS_GR+0x4E -#define GR4F IGS_GR+0x4F -#define GR50 IGS_GR+0x50 -#define GR51 IGS_GR+0x51 -#define GR52 IGS_GR+0x52 -#define GR53 IGS_GR+0x53 -#define GR54 IGS_GR+0x54 -#define GR55 IGS_GR+0x55 -#define GR56 IGS_GR+0x56 -#define GR57 IGS_GR+0x57 -#define GR58 IGS_GR+0x58 -#define GR59 IGS_GR+0x59 -#define GR5A IGS_GR+0x5A -#define GR5B IGS_GR+0x5B -#define GR5C IGS_GR+0x5C -#define GR5D IGS_GR+0x5D -#define GR5E IGS_GR+0x5E -#define GR5F IGS_GR+0x5F -#define GR60 IGS_GR+0x60 -#define GR61 IGS_GR+0x61 -#define GR62 IGS_GR+0x62 -#define GR63 IGS_GR+0x63 -#define GR64 IGS_GR+0x64 -#define GR65 IGS_GR+0x65 -#define GR66 IGS_GR+0x66 -#define GR67 IGS_GR+0x67 -#define GR68 IGS_GR+0x68 -#define GR69 IGS_GR+0x69 -#define GR6A IGS_GR+0x6A -#define GR6B IGS_GR+0x6B -#define GR6C IGS_GR+0x6C -#define GR6D IGS_GR+0x6D -#define GR6E IGS_GR+0x6E -#define GR6F IGS_GR+0x6F -#define GR70 IGS_GR+0x70 -#define GR71 IGS_GR+0x71 -#define GR72 IGS_GR+0x72 -#define GR73 IGS_GR+0x73 -#define GR74 IGS_GR+0x74 -#define GR75 IGS_GR+0x75 -#define GR76 IGS_GR+0x76 -#define GR77 IGS_GR+0x77 -#define GR78 IGS_GR+0x78 -#define GR79 IGS_GR+0x79 -#define GR7A IGS_GR+0x7A -#define GR7B IGS_GR+0x7B -#define GR7C IGS_GR+0x7C -#define GR7D IGS_GR+0x7D -#define GR7E IGS_GR+0x7E -#define GR7F IGS_GR+0x7F -#define GR80 IGS_GR+0x80 -#define GR81 IGS_GR+0x81 -#define GR82 IGS_GR+0x82 -#define GR83 IGS_GR+0x83 -#define GR84 IGS_GR+0x84 -#define GR85 IGS_GR+0x85 -#define GR86 IGS_GR+0x86 -#define GR87 IGS_GR+0x87 -#define GR88 IGS_GR+0x88 -#define GR89 IGS_GR+0x89 -#define GR8A IGS_GR+0x8A -#define GR8B IGS_GR+0x8B -#define GR8C IGS_GR+0x8C -#define GR8D IGS_GR+0x8D -#define GR8E IGS_GR+0x8E -#define GR8F IGS_GR+0x8F -#define GR90 IGS_GR+0x90 -#define GR91 IGS_GR+0x91 -#define GR92 IGS_GR+0x92 -#define GR93 IGS_GR+0x93 -#define GR94 IGS_GR+0x94 -#define GR95 IGS_GR+0x95 -#define GR96 IGS_GR+0x96 -#define GR97 IGS_GR+0x97 -#define GR98 IGS_GR+0x98 -#define GR99 IGS_GR+0x99 -#define GR9A IGS_GR+0x9A -#define GR9B IGS_GR+0x9B -#define GR9C IGS_GR+0x9C -#define GR9D IGS_GR+0x9D -#define GR9E IGS_GR+0x9E -#define GR9F IGS_GR+0x9F -#define GRA0 IGS_GR+0xA0 -#define GRA1 IGS_GR+0xA1 -#define GRA2 IGS_GR+0xA2 -#define GRA3 IGS_GR+0xA3 -#define GRA4 IGS_GR+0xA4 -#define GRA5 IGS_GR+0xA5 -#define GRA6 IGS_GR+0xA6 -#define GRA7 IGS_GR+0xA7 -#define GRA8 IGS_GR+0xA8 -#define GRA9 IGS_GR+0xA9 -#define GRAA IGS_GR+0xAA -#define GRAB IGS_GR+0xAB -#define GRAC IGS_GR+0xAC -#define GRAD IGS_GR+0xAD -#define GRAE IGS_GR+0xAE -#define GRAF IGS_GR+0xAF -#define GRB0 IGS_GR+0xB0 -#define GRB1 IGS_GR+0xB1 -#define GRB2 IGS_GR+0xB2 -#define GRB3 IGS_GR+0xB3 -#define GRB4 IGS_GR+0xB4 -#define GRB5 IGS_GR+0xB5 -#define GRB6 IGS_GR+0xB6 -#define GRB7 IGS_GR+0xB7 -#define GRB8 IGS_GR+0xB8 -#define GRB9 IGS_GR+0xB9 -#define GRBA IGS_GR+0xBA -#define GRBB IGS_GR+0xBB -#define GRBC IGS_GR+0xBC -#define GRBD IGS_GR+0xBD -#define GRBE IGS_GR+0xBE -#define GRBF IGS_GR+0xBF - -#define GR_FIRST GR00 -#define GR_LAST GRBF - -#define GREX3C IGS_GREX+(0x3c-IGS_GREXBASE) - -VgaReg igs_h_total[] = { - CR00, 0, 8, - VGA_REG_END -}; - -VgaReg igs_h_de_end[] = { - CR01, 0, 8, - VGA_REG_END -}; - -VgaReg igs_h_bstart[] = { - CR02, 0, 8, - VGA_REG_END -}; - -VgaReg igs_h_bend[] = { - CR03, 0, 5, - CR05, 7, 1, - VGA_REG_END -}; - -VgaReg igs_de_skew[] = { - CR03, 5, 2, - VGA_REG_END -}; - -VgaReg igs_ena_vr_access[] = { - CR03, 7, 1, - VGA_REG_END -}; - -VgaReg igs_h_rstart[] = { - CR04, 0, 8, - VGA_REG_END -}; - -VgaReg igs_h_rend[] = { - CR05, 0, 5, - VGA_REG_END -}; - -VgaReg igs_h_rdelay[] = { - CR05, 5, 2, - VGA_REG_END -}; - -VgaReg igs_v_total[] = { - CR06, 0, 8, - CR07, 0, 1, - CR07, 5, 1, - GR11, 0, 1, - VGA_REG_END -}; - -VgaReg igs_v_rstart[] = { - CR10, 0, 8, - CR07, 2, 1, - CR07, 7, 1, - GR11, 2, 1, - VGA_REG_END -}; - -VgaReg igs_v_rend[] = { - CR11, 0, 4, - VGA_REG_END -}; - -VgaReg igs_clear_v_int[] = { - CR11, 4, 1, - VGA_REG_END -}; - -VgaReg igs_disable_v_int[] = { - CR11, 5, 1, - VGA_REG_END -}; - -VgaReg igs_bandwidth[] = { - CR11, 6, 1, - VGA_REG_END -}; - -VgaReg igs_crt_protect[] = { - CR11, 7, 1, - VGA_REG_END -}; - -VgaReg igs_v_de_end[] = { - CR12, 0, 8, - CR07, 1, 1, - CR07, 6, 1, - GR11, 1, 1, - VGA_REG_END -}; - -VgaReg igs_offset[] = { - CR13, 0, 8, - GR15, 4, 2, - VGA_REG_END -}; - -VgaReg igs_v_bstart[] = { - CR15, 0, 8, - CR07, 3, 1, - CR09, 5, 1, - GR11, 3, 1, - VGA_REG_END -}; - -VgaReg igs_v_bend[] = { - CR16, 0, 7, - VGA_REG_END -}; - -VgaReg igs_linecomp[] = { - CR18, 0, 8, - CR07, 4, 1, - CR09, 6, 1, - GR11, 4, 1, - VGA_REG_END -}; - -VgaReg igs_ivideo[] = { - GR11, 5, 1, - VGA_REG_END -}; - -VgaReg igs_num_fetch[] = { - GR14, 0, 8, - GR15, 0, 2, - VGA_REG_END -}; - -VgaReg igs_wcrt0[] = { - CR1F, 0, 1, - VGA_REG_END -}; - -VgaReg igs_wcrt1[] = { - CR1F, 1, 1, - VGA_REG_END -}; - -VgaReg igs_rcrts1[] = { - CR1F, 4, 1, - VGA_REG_END -}; - -VgaReg igs_selwk[] = { - CR1F, 6, 1, - VGA_REG_END -}; - -VgaReg igs_dot_clock_8[] = { - SR01, 0, 1, - VGA_REG_END -}; - -VgaReg igs_screen_off[] = { - SR01, 5, 1, - VGA_REG_END -}; - -VgaReg igs_enable_write_plane[] = { - SR02, 0, 4, - VGA_REG_END -}; - -VgaReg igs_mexhsyn[] = { - GR16, 0, 2, - VGA_REG_END -}; - -VgaReg igs_mexvsyn[] = { - GR16, 2, 2, - VGA_REG_END -}; - -VgaReg igs_pci_burst_write[] = { - GR30, 5, 1, - VGA_REG_END -}; - -VgaReg igs_pci_burst_read[] = { - GR30, 7, 1, - VGA_REG_END -}; - -VgaReg igs_iow_retry[] = { - GREX3C, 0, 1, - VGA_REG_END -}; - -VgaReg igs_mw_retry[] = { - GREX3C, 1, 1, - VGA_REG_END -}; - -VgaReg igs_mr_retry[] = { - GREX3C, 2, 1, - VGA_REG_END -}; - - - -VgaReg igs_biga22en[] = { - GR3D, 4, 1, - VGA_REG_END -}; - -VgaReg igs_biga24en[] = { - GR3D, 5, 1, - VGA_REG_END -}; - -VgaReg igs_biga22force[] = { - GR3D, 6, 1, - VGA_REG_END -}; - -VgaReg igs_bigswap[] = { - GR3F, 0, 6, - VGA_REG_END -}; - -/* #define IGS_BIGSWAP_8 0x3f */ -/* #define IGS_BIGSWAP_16 0x2a */ -/* #define IGS_BIGSWAP_32 0x00 */ - -VgaReg igs_sprite_x[] = { - GR50, 0, 8, - GR51, 0, 3, - VGA_REG_END -}; - -VgaReg igs_sprite_preset_x[] = { - GR52, 0, 6, - VGA_REG_END -}; - -VgaReg igs_sprite_y[] = { - GR53, 0, 8, - GR54, 0, 3, - VGA_REG_END -}; - -VgaReg igs_sprite_preset_y[] = { - GR55, 0, 6, - VGA_REG_END -}; - -VgaReg igs_sprite_visible[] = { - GR56, 0, 1, - VGA_REG_END -}; - -VgaReg igs_sprite_64x64[] = { - GR56, 1, 1, - VGA_REG_END -}; - -VgaReg igs_mgrext[] = { - GR57, 0, 1, - VGA_REG_END -}; - -VgaReg igs_hcshf[] = { - GR57, 4, 2, - VGA_REG_END -}; - -VgaReg igs_mbpfix[] = { - GR57, 6, 2, - VGA_REG_END -}; - -VgaReg igs_overscan_red[] = { - GR58, 0, 8, - VGA_REG_END -}; - -VgaReg igs_overscan_green[] = { - GR59, 0, 8, - VGA_REG_END -}; - -VgaReg igs_overscan_blue[] = { - GR5A, 0, 8, - VGA_REG_END -}; - -VgaReg igs_memgopg[] = { - GR73, 2, 1, - VGA_REG_END -}; - -VgaReg igs_memr2wpg[] = { - GR73, 1, 1, - VGA_REG_END -}; - -VgaReg igs_crtff16[] = { - GR73, 3, 1, - VGA_REG_END -}; - -VgaReg igs_fifomust[] = { - GR74, 0, 5, - VGA_REG_END -}; - -VgaReg igs_fifogen[] = { - GR75, 0, 5, - VGA_REG_END -}; - -VgaReg igs_mode_sel[] = { - GR77, 0, 4, - VGA_REG_END -}; - -/* #define IGS_MODE_TEXT 0 */ -/* #define IGS_MODE_8 1 */ -/* #define IGS_MODE_565 2 */ -/* #define IGS_MODE_5551 6 */ -/* #define IGS_MODE_8888 3 */ -/* #define IGS_MODE_888 4 */ -/* #define IGS_MODE_332 9 */ -/* #define IGS_MODE_4444 10 */ - -VgaReg igs_sprite_addr[] = { - GR7E, 0, 8, - GR7F, 0, 4, - VGA_REG_END -}; - -VgaReg igs_fastmpie[] = { - GR9E, 0, 1, - VGA_REG_END -}; - -VgaReg igs_vclk_m[] = { - GRB0, 0, 8, - GRBA, 0, 3, - VGA_REG_END -}; - -VgaReg igs_vclk_n[] = { - GRB1, 0, 5, - GRBA, 3, 3, - VGA_REG_END -}; - -VgaReg igs_vfsel[] = { - GRB1, 5, 1, - VGA_REG_END -}; - -VgaReg igs_vclk_p[] = { - GRB1, 6, 2, - GRBA, 6, 1, - VGA_REG_END -}; - -VgaReg igs_frqlat[] = { - GRB9, 7, 1, - VGA_REG_END -}; - - -VgaReg igs_dac_mask[] = { - IGS_DAC + 0, 0, 8, - VGA_REG_END -}; - -VgaReg igs_dac_read_index[] = { - IGS_DAC + 1, 0, 8, - VGA_REG_END -}; - -VgaReg igs_dac_write_index[] = { - IGS_DAC + 2, 0, 8, - VGA_REG_END -}; - -VgaReg igs_dac_data[] = { - IGS_DAC + 3, 0, 8, - VGA_REG_END -}; - -VgaReg igs_rampwdn[] = { - IGS_DACEX + 0, 0, 1, - VGA_REG_END -}; - -VgaReg igs_dac6_8[] = { - IGS_DACEX + 0, 1, 1, - VGA_REG_END -}; - -VgaReg igs_ramdacbypass[] = { - IGS_DACEX + 0, 4, 1, - VGA_REG_END -}; - -VgaReg igs_dacpwdn[] = { - IGS_DACEX + 0, 6, 1, - VGA_REG_END -}; - -VgaReg igs_cursor_read_index[] = { - IGS_DACEX + 1, 0, 8, - VGA_REG_END -}; - -VgaReg igs_cursor_write_index[] = { - IGS_DACEX + 2, 0, 8, - VGA_REG_END -}; - -VgaReg igs_cursor_data[] = { - IGS_DACEX + 3, 0, 8, - VGA_REG_END -}; - -VGA8 -_igsInb (VgaCard *card, VGA16 port) -{ - VGAVOL8 *reg; - - if (card->closure) - return VgaReadMemb ((VGA32) card->closure + port); - else - return VgaInb (port); -} - -void -_igsOutb (VgaCard *card, VGA8 value, VGA16 port) -{ - if (card->closure) - VgaWriteMemb (value, (VGA32) card->closure + port); - else - VgaOutb (value, port); -} - -void -_igsRegMap (VgaCard *card, VGA16 reg, VgaMap *map, VGABOOL write) -{ - if (reg < IGS_SR + IGS_NSR) - { - map->access = VgaAccessIndIo; - map->port = 0x3c4; - map->addr = 0; - map->value = 1; - map->index = reg - IGS_SR; - } - else if (reg < IGS_GR + IGS_NGR) - { - map->access = VgaAccessIndIo; - map->port = 0x3ce; - map->addr = 0; - map->value = 1; - map->index = reg - IGS_GR; - } - else if (reg < IGS_GREX + IGS_NGREX) - { - VGA8 gr33; - - map->access = VgaAccessDone; - _igsOutb (card, 0x33, 0x3ce); - gr33 = _igsInb (card, 0x3cf); - _igsOutb (card, gr33 | 0x40, 0x3cf); - _igsOutb (card, IGS_GREXBASE + reg - IGS_GREX, 0x3ce); - if (write) - _igsOutb (card, map->value, 0x3cf); - else - map->value = _igsInb (card, 0x3cf); - _igsOutb (card, 0x33, 0x3ce); - _igsOutb (card, gr33, 0x3cf); - return; - } - else if (reg < IGS_AR + IGS_NAR) - { - reg -= IGS_AR; - map->access = VgaAccessDone; - /* reset AFF to index */ - (void) _igsInb (card, 0x3da); - if (reg >= 16) - reg |= 0x20; - _igsOutb (card, reg, 0x3c0); - if (write) - _igsOutb (card, map->value, 0x3c0); - else - map->value = _igsInb (card, 0x3c1); - if (!(reg & 0x20)) - { - /* enable video display again */ - (void) _igsInb (card, 0x3da); - _igsOutb (card, 0x20, 0x3c0); - } - return; - } - else if (reg < IGS_CR + IGS_NCR) - { - map->access = VgaAccessIndIo; - map->port = 0x3d4; - map->addr = 0; - map->value = 1; - map->index = reg - IGS_CR; - } - else if (reg < IGS_DAC + IGS_NDAC) - { - map->access = VgaAccessIo; - map->port = 0x3c6 + reg - IGS_DAC; - } - else if (reg < IGS_DACEX + IGS_NDACEX) - { - VGA8 gr56; - reg = 0x3c6 + reg - IGS_DACEX; - map->access = VgaAccessDone; - _igsOutb (card, 0x56, 0x3ce); - gr56 = _igsInb (card, 0x3cf); - _igsOutb (card, gr56 | 4, 0x3cf); - if (write) - _igsOutb (card, map->value, reg); - else - map->value = _igsInb (card, reg); - _igsOutb (card, gr56, 0x3cf); - return; - } - else switch (reg) { - case IGS_MISC_OUT: - map->access = VgaAccessIo; - if (write) - map->port = 0x3c2; - else - map->port = 0x3cc; - break; - case IGS_INPUT_STATUS_1: - map->access = VgaAccessIo; - map->port = 0x3da; - break; - } - if (card->closure) - { - map->port = map->port + (VGA32) card->closure; - if (map->access == VgaAccessIo) - map->access = VgaAccessMem; - if (map->access == VgaAccessIndIo) - map->access = VgaAccessIndMem; - } -} - -VgaSave igsSaves[] = { - CR00, CR18, - SR01, SR02, - GR11, GRBA, - IGS_MISC_OUT, IGS_MISC_OUT, - VGA_SAVE_END -}; - -void -igsRegInit (IgsVga *igsvga, VGAVOL8 *mmio) -{ - igsvga->card.map = _igsRegMap; - igsvga->card.closure = (void *) mmio; - igsvga->card.max = IGS_NREG; - igsvga->card.values = igsvga->values; - igsvga->card.saves = igsSaves; -} - -void -igsSave (IgsVga *igsvga) -{ - igsSetImm (igsvga, igs_wcrt0, 1); - igsSetImm (igsvga, igs_wcrt1, 1); - igsSetImm (igsvga, igs_rcrts1, 1); - igsSetImm (igsvga, igs_selwk, 1); - VgaPreserve (&igsvga->card); -} - -void -igsReset (IgsVga *igsvga) -{ - VgaRestore (&igsvga->card); - igsSetImm (igsvga, igs_frqlat, 0); - igsSetImm (igsvga, igs_frqlat, 1); - igsSetImm (igsvga, igs_frqlat, 0); - VgaFinish (&igsvga->card); -} - -char * -igsRegName(char *buf, VGA16 reg) -{ - if (reg < IGS_SR + IGS_NSR) - { - sprintf (buf, " SR%02X", reg - IGS_SR); - } - else if (reg < IGS_GR + IGS_NGR) - { - sprintf (buf, " GR%02X", reg - IGS_GR); - } - else if (reg < IGS_GREX + IGS_NGREX) - { - sprintf (buf, " GRX%02X", reg - IGS_GREX + IGS_GREXBASE); - } - else if (reg < IGS_AR + IGS_NAR) - { - sprintf (buf, " AR%02X", reg - IGS_AR); - } - else if (reg < IGS_CR + IGS_NCR) - { - sprintf (buf, " CR%02X", reg - IGS_CR); - } - else if (reg < IGS_DAC + IGS_NDAC) - { - sprintf (buf, " DAC%02X", reg - IGS_DAC); - } - else if (reg < IGS_DACEX + IGS_NDACEX) - { - sprintf (buf, "DACX%02X", reg - IGS_DACEX); - } - else switch (reg) { - case IGS_MISC_OUT: - sprintf (buf, "MISC_O"); - break; - case IGS_INPUT_STATUS_1: - sprintf (buf, "IN_S_1"); - break; - } - return buf; -} diff --git a/hw/kdrive/igs/igsreg.h b/hw/kdrive/igs/igsreg.h deleted file mode 100644 index 2230ff01b..000000000 --- a/hw/kdrive/igs/igsreg.h +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright © 2000 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _IGSREG_H_ -#define _IGSREG_H_ - -#include "vga.h" - -#define IGS_SR 0 -#define IGS_NSR 5 -#define IGS_GR (IGS_SR+IGS_NSR) -#define IGS_NGR 0xC0 -#define IGS_GREX (IGS_GR+IGS_NGR) -#define IGS_GREXBASE 0x3c -#define IGS_NGREX 1 -#define IGS_AR (IGS_GREX+IGS_NGREX) -#define IGS_NAR 0x15 -#define IGS_CR (IGS_AR+IGS_NAR) -#define IGS_NCR 0x48 -#define IGS_DAC (IGS_CR+IGS_NCR) -#define IGS_NDAC 4 -#define IGS_DACEX (IGS_DAC+IGS_NDAC) -#define IGS_NDACEX 4 -#define IGS_MISC_OUT (IGS_DACEX + IGS_NDACEX) -#define IGS_INPUT_STATUS_1 (IGS_MISC_OUT+1) -#define IGS_NREG (IGS_INPUT_STATUS_1+1) - -extern VgaReg igs_h_total[]; -extern VgaReg igs_h_de_end[]; -extern VgaReg igs_h_bstart[]; -extern VgaReg igs_h_bend[]; -extern VgaReg igs_de_skew[]; -extern VgaReg igs_ena_vr_access[]; -extern VgaReg igs_h_rstart[]; -extern VgaReg igs_h_rend[]; -extern VgaReg igs_h_rdelay[]; -extern VgaReg igs_v_total[]; -extern VgaReg igs_v_rstart[]; -extern VgaReg igs_v_rend[]; -extern VgaReg igs_clear_v_int[]; -extern VgaReg igs_disable_v_int[]; -extern VgaReg igs_bandwidth[]; -extern VgaReg igs_crt_protect[]; -extern VgaReg igs_v_de_end[]; -extern VgaReg igs_offset[]; -extern VgaReg igs_v_bstart[]; -extern VgaReg igs_v_bend[]; -extern VgaReg igs_linecomp[]; -extern VgaReg igs_ivideo[]; -extern VgaReg igs_num_fetch[]; -extern VgaReg igs_wcrt0[]; -extern VgaReg igs_wcrt1[]; -extern VgaReg igs_rcrts1[]; -extern VgaReg igs_selwk[]; -extern VgaReg igs_dot_clock_8[]; -extern VgaReg igs_screen_off[]; -extern VgaReg igs_enable_write_plane[]; -extern VgaReg igs_mexhsyn[]; -extern VgaReg igs_mexvsyn[]; -extern VgaReg igs_pci_burst_write[]; -extern VgaReg igs_pci_burst_read[]; -extern VgaReg igs_iow_retry[]; -extern VgaReg igs_mw_retry[]; -extern VgaReg igs_mr_retry[]; -extern VgaReg igs_biga22en[]; -extern VgaReg igs_biga24en[]; -extern VgaReg igs_biga22force[]; -extern VgaReg igs_bigswap[]; -#define IGS_BIGSWAP_8 0x3f -#define IGS_BIGSWAP_16 0x2a -#define IGS_BIGSWAP_32 0x00 -extern VgaReg igs_sprite_x[]; -extern VgaReg igs_sprite_preset_x[]; -extern VgaReg igs_sprite_y[]; -extern VgaReg igs_sprite_preset_y[]; -extern VgaReg igs_sprite_visible[]; -extern VgaReg igs_sprite_64x64[]; -extern VgaReg igs_mgrext[]; -extern VgaReg igs_hcshf[]; -extern VgaReg igs_mbpfix[]; -extern VgaReg igs_overscan_red[]; -extern VgaReg igs_overscan_green[]; -extern VgaReg igs_overscan_blue[]; -extern VgaReg igs_memgopg[]; -extern VgaReg igs_memr2wpg[]; -extern VgaReg igs_crtff16[]; -extern VgaReg igs_fifomust[]; -extern VgaReg igs_fifogen[]; -extern VgaReg igs_mode_sel[]; -#define IGS_MODE_TEXT 0 -#define IGS_MODE_8 1 -#define IGS_MODE_565 2 -#define IGS_MODE_5551 6 -#define IGS_MODE_8888 3 -#define IGS_MODE_888 4 -#define IGS_MODE_332 9 -#define IGS_MODE_4444 10 -extern VgaReg igs_sprite_addr[]; -extern VgaReg igs_fastmpie[]; -extern VgaReg igs_vclk_m[]; -extern VgaReg igs_vclk_n[]; -extern VgaReg igs_vfsel[]; -extern VgaReg igs_vclk_p[]; -extern VgaReg igs_frqlat[]; -extern VgaReg igs_dac_mask[]; -extern VgaReg igs_dac_read_index[]; -extern VgaReg igs_dac_write_index[]; -extern VgaReg igs_dac_data[]; -extern VgaReg igs_rampwdn[]; -extern VgaReg igs_dac6_8[]; -extern VgaReg igs_ramdacbypass[]; -extern VgaReg igs_dacpwdn[]; -extern VgaReg igs_cursor_read_index[]; -extern VgaReg igs_cursor_write_index[]; -extern VgaReg igs_cursor_data[]; - -#define igsGet(sv,r) VgaGet(&(sv)->card, (r)) -#define igsGetImm(sv,r) VgaGetImm(&(sv)->card, (r)) -#define igsSet(sv,r,v) VgaSet(&(sv)->card, (r), (v)) -#define igsSetImm(sv,r,v) VgaSetImm(&(sv)->card, (r), (v)) - -typedef struct _igsVga { - VgaCard card; - VgaValue values[IGS_NREG]; -} IgsVga; - -void -igsRegInit (IgsVga *igsvga, VGAVOL8 *mmio); - -void -igsSave (IgsVga *igsvga); - -void -igsReset (IgsVga *igsvga); - -#endif /* _IGSREG_H_ */ diff --git a/hw/kdrive/igs/igsstub.c b/hw/kdrive/igs/igsstub.c deleted file mode 100644 index 1c588271c..000000000 --- a/hw/kdrive/igs/igsstub.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright © 2000 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "igs.h" - -void -InitCard (char *name) -{ - KdCardAttr attr; - CARD32 count; - - count = 0; -#ifdef EMBED - attr.address[0] = 0x10000000; /* Adomo Wing video base address */ - attr.io = 0; - attr.naddr = 1; -#else - while (LinuxFindPci (0x10ea, 0x5000, count, &attr)) -#endif - { - KdCardInfoAdd (&igsFuncs, &attr, 0); - count++; - } -} - -void -InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) -{ - KdInitOutput (pScreenInfo, argc, argv); -} - -void -InitInput (int argc, char **argv) -{ - KdOsAddInputDrivers (); - KdInitInput (); -} - -void -ddxUseMsg (void) -{ - KdUseMsg (); -} - -int -ddxProcessArgument (int argc, char **argv, int i) -{ - return KdProcessArgument (argc, argv, i); -} diff --git a/hw/kdrive/ipaq/ipaq.c b/hw/kdrive/ipaq/ipaq.c deleted file mode 100644 index 057b799f4..000000000 --- a/hw/kdrive/ipaq/ipaq.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - * - * Adapted from ts300.c by Alan Hourihane - * For the Compaq IPAQ handheld, with the HP VGA Out Card (F1252A). - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "pcmcia.h" - -extern KdCardFuncs pcmciaFuncs; - -void -InitCard (char *name) -{ - KdCardAttr attr; - if (name && !strcmp(name, "pcmcia")) - KdCardInfoAdd (&pcmciaFuncs, &attr, 0); - else - KdCardInfoAdd (&fbdevFuncs, &attr, 0); -} - -void -InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) -{ - KdInitOutput (pScreenInfo, argc, argv); -} - -void -InitInput (int argc, char **argv) -{ - KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs); -#ifdef TOUCHSCREEN - KdAddMouseDriver (&TsFuncs); -#endif -} - -extern pcmciaDisplayModeRec pcmciaDefaultModes[]; - -void -ddxUseMsg (void) -{ - KdUseMsg(); -} - -int -ddxProcessArgument (int argc, char **argv, int i) -{ - return KdProcessArgument (argc, argv, i); -} diff --git a/hw/kdrive/itsy/itsy.c b/hw/kdrive/itsy/itsy.c deleted file mode 100644 index 47cc05041..000000000 --- a/hw/kdrive/itsy/itsy.c +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "itsy.h" - -/* struct with LCD characteristics defined in fb_brutus.h */ -static struct FbLcdParamsStruct fbLcdParams; -static int fb_d; -static int fbn; -Bool -itsyCardInit (KdCardInfo *card) -{ - int k; - char *fb; - char *pixels; - - if ((fb_d = open("/dev/fbclone", O_RDWR)) < 0) { - perror("Error opening /dev/fb\n"); - return FALSE; - } - if ((k=ioctl(fb_d, FB_LCD_PARAMS, &fbLcdParams)) != 0) { - perror("Error with /dev/fb ioctl FB_LCD_PARAMS call"); - return FALSE; - } - - fb = (char *) mmap ((caddr_t) NULL, fbLcdParams.frameBufferSize, - PROT_READ|PROT_WRITE, MAP_FILE|MAP_SHARED, fb_d, 0); - - fprintf (stderr, "fb mapped at 0x%x\n", fb); - if (fb == (char *)-1) { - perror("ERROR: mmap framebuffer fails!"); - return FALSE; - } - - card->driver = fb; - - return TRUE; -} - -Bool -itsyScreenInit (KdScreenInfo *screen) -{ - CARD8 *fb = screen->card->driver; - - screen->width = fbLcdParams.screenSizeH; - screen->height = fbLcdParams.screenSizeV; - screen->depth = fbLcdParams.bitsPerPixel; - screen->bitsPerPixel = fbLcdParams.bitsPerPixel; - screen->byteStride = fbLcdParams.frameBufferSizeH; - screen->pixelStride = (fbLcdParams.frameBufferSizeH * 8 / - fbLcdParams.bitsPerPixel); - fprintf (stderr, "width %d height %d depth %d pstride %d bstride %d\n", - screen->width, screen->height, screen->depth, - screen->pixelStride, screen->byteStride); - screen->dumb = FALSE; - screen->softCursor = TRUE; - screen->blueMask = 0; - screen->greenMask = 0; - screen->redMask = 0; - screen->visuals = 1 << StaticGray; - screen->rate = 72; - screen->frameBuffer = (CARD8 *) (fb + - fbLcdParams.pixelDataOffset + - (fbLcdParams.reserveTopRows * - screen->byteStride)); - fprintf (stderr, "Frame buffer 0x%x\n", screen->frameBuffer); - return TRUE; -} - -static unsigned short itsyIntensity[16] = { - 0xffff, - 0xffff, - 0xedb6, - 0xdb6d, - 0xc924, - 0xb6db, - 0xa492, - 0x9249, - 0x8000, - 0x6db6, - 0x5b6d, - 0x4924, - 0x36db, - 0x2492, - 0x1249, - 0x0000, -}; - -Bool -itsyCreateColormap (ColormapPtr pmap) -{ - int i; - - for (i = 0; i < 16; i++) - { - pmap->red[i].co.local.red = itsyIntensity[i]; - pmap->red[i].co.local.green = itsyIntensity[i]; - pmap->red[i].co.local.blue = itsyIntensity[i]; - } - return TRUE; -} - -Bool -itsyInitScreen (ScreenPtr pScreen) -{ - pScreen->CreateColormap = itsyCreateColormap; - return TRUE; -} - -void -itsyPreserve (KdCardInfo *card) -{ -} - -void -itsyEnable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - - fprintf (stderr, "Enabling LCD display\n"); - /* display it on the LCD */ - ioctl(fb_d, FB_LCD_SHOW, 0); -} - -Bool -itsyDPMS (ScreenPtr pScreen, int mode) -{ - if (mode) - ioctl (fb_d, FB_LCD_OFF, 0); - else - ioctl (fb_d, FB_LCD_ON, 0); - return TRUE; -} - -void -itsyDisable (ScreenPtr pScreen) -{ -/* ioctl (fb_d, FB_LCD_SWITCH, 0); */ -/* fprintf (stderr, "Disabling LCD display\n");*/ -} - -void -itsyRestore (KdCardInfo *card) -{ -} - -void -itsyScreenFini (KdScreenInfo *screen) -{ -} - -void -itsyCardFini (KdCardInfo *card) -{ - int k; - - fprintf (stderr, "Unmapping driver at 0x%x\n", card->driver); - munmap (card->driver, fbLcdParams.frameBufferSize); - fprintf (stderr, "Releasing fbn %d\n", fbn); - /* release it */ - if (ioctl(fb_d, FB_LCD_FREE, fbn) != 0) { - printf("FB_LCD_FREE of %d fails!\n", fbn); - } - close (fb_d); - fprintf (stderr, "itsyFini done\n"); -} - -KdCardFuncs itsyFuncs = { - itsyCardInit, /* cardinit */ - itsyScreenInit, /* scrinit */ - itsyInitScreen, /* initScreen */ - itsyPreserve, /* preserve */ - itsyEnable, /* enable */ - itsyDPMS, /* dpms */ - itsyDisable, /* disable */ - itsyRestore, /* restore */ - itsyScreenFini, /* scrfini */ - itsyCardFini, /* cardfini */ - - 0, /* initCursor */ - 0, /* enableCursor */ - 0, /* disableCursor */ - 0, /* finiCursor */ - 0, /* recolorCursor */ - - 0, /* initAccel */ - 0, /* enableAccel */ - 0, /* disableAccel */ - 0, /* finiAccel */ - - 0, /* getColors */ - 0, /* putColors */ -}; - -void -InitCard (void) -{ - KdCardAttr attr; - - KdCardInfoAdd (&itsyFuncs, &attr, 0); -} - -void -InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) -{ - KdInitOutput (pScreenInfo, argc, argv); -} - -void -InitInput (int argc, char **argv) -{ - KdInitInput (&itsyTsMouseFuncs, &itsyKeyboardFuncs); -} - -int itsySessionFd = -1; - -int -ItsyOsInit (void) -{ - pid_t sid; - int i; - itsy_session_info info; - - if (itsySessionFd < 0) - { - itsySessionFd = open ("/dev/session", 0); - ErrorF("itsySessionFD %d\n", itsySessionFd); - } - - (void) setsid (); - sid = getsid (0); - ErrorF ("Session ID %d PID %d\n", sid, getpid ()); - info.sid = sid; - strcpy (info.name, "X"); - if (itsySessionFd >= 0) - { - i = ioctl (itsySessionFd, SESSION_SET_INFO, &info); - if (i < 0) - perror ("SESSION_SET_INFO"); - } - return 1; -} - -void -ItsyOsEnable (void) -{ - itsy_session_request req; - int i; - -#define MANAGER_SID_TO_FOREGROUND 2 - - req.operation = MANAGER_SID_TO_FOREGROUND; - req.data = 0; - if (itsySessionFd >= 0) - { - i = ioctl (itsySessionFd, SESSION_MANAGER_REQUEST, &req); - if (i < 0) - perror ("SESSION_MANAGER_REQUEST"); - } -} - -Bool -ItsyOsSpecialKey (KeySym sym) -{ - return FALSE; -} - -void -ItsyOsDisable (void) -{ -} - -void -ItsyOsFini (void) -{ -} - -KdOsFuncs ItsyOsFuncs = { - ItsyOsInit, - ItsyOsEnable, - ItsyOsSpecialKey, - ItsyOsDisable, - ItsyOsFini, - 0 -}; - -void -OsVendorInit (void) -{ - KdOsInit (&ItsyOsFuncs); -} - -void -ddxUseMsg (void) -{ - KdUseMsg(); -} - -int -ddxProcessArgument (int argc, char **argv, int i) -{ - return KdProcessArgument (argc, argv, i); -} diff --git a/hw/kdrive/itsy/itsy.h b/hw/kdrive/itsy/itsy.h deleted file mode 100644 index fc8fb8f4f..000000000 --- a/hw/kdrive/itsy/itsy.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#include "kdrive.h" -#include -#include -#include -#include -#include -#include -#include -#include - -#define FB_HEIGHT 200 -#define FB_WIDTH 320 -#define FB_DEPTH 4 -#define FB_PALETTE_SIZE 16 - -extern KdMouseFuncs itsyTsMouseFuncs; -extern KdKeyboardFuncs itsyKeyboardFuncs; diff --git a/hw/kdrive/itsy/kbd.c b/hw/kdrive/itsy/kbd.c deleted file mode 100644 index 83ed49e72..000000000 --- a/hw/kdrive/itsy/kbd.c +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "itsy.h" -#include -#include - -#define ITSY_WIDTH 2 - -KeySym ItsyKeymap[] = { -/* 1 8 */ XK_Escape, NoSymbol, -/* 2 9 */ XK_1, XK_exclam, -/* 3 10 */ XK_2, XK_at, -/* 4 11 */ XK_3, XK_numbersign, -/* 5 12 */ XK_4, XK_dollar, -/* 6 13 */ XK_5, XK_percent, -/* 7 14 */ XK_6, XK_asciicircum, -/* 8 15 */ XK_7, XK_ampersand, -/* 9 16 */ XK_8, XK_asterisk, -/* 10 17 */ XK_9, XK_parenleft, -/* 11 18 */ XK_0, XK_parenright, -/* 12 19 */ XK_minus, XK_underscore, -/* 13 20 */ XK_equal, XK_plus, -/* 14 21 */ XK_BackSpace, NoSymbol, -/* 15 22 */ XK_Tab, NoSymbol, -/* 16 23 */ XK_Q, NoSymbol, -/* 17 24 */ XK_W, NoSymbol, -/* 18 25 */ XK_E, NoSymbol, -/* 19 26 */ XK_R, NoSymbol, -/* 20 27 */ XK_T, NoSymbol, -/* 21 28 */ XK_Y, NoSymbol, -/* 22 29 */ XK_U, NoSymbol, -/* 23 30 */ XK_I, NoSymbol, -/* 24 31 */ XK_O, NoSymbol, -/* 25 32 */ XK_P, NoSymbol, -/* 26 33 */ XK_bracketleft, XK_braceleft, -/* 27 34 */ XK_bracketright, XK_braceright, -/* 28 35 */ XK_Return, NoSymbol, -/* 29 36 */ XK_Control_L, NoSymbol, -/* 30 37 */ XK_A, NoSymbol, -/* 31 38 */ XK_S, NoSymbol, -/* 32 39 */ XK_D, NoSymbol, -/* 33 40 */ XK_F, NoSymbol, -/* 34 41 */ XK_G, NoSymbol, -/* 35 42 */ XK_H, NoSymbol, -/* 36 43 */ XK_J, NoSymbol, -/* 37 44 */ XK_K, NoSymbol, -/* 38 45 */ XK_L, NoSymbol, -/* 39 46 */ XK_semicolon, XK_colon, -/* 40 47 */ XK_apostrophe, XK_quotedbl, -/* 41 48 */ XK_grave, XK_asciitilde, -/* 42 49 */ XK_Shift_L, NoSymbol, -/* 43 50 */ XK_backslash, XK_bar, -/* 44 51 */ XK_Z, NoSymbol, -/* 45 52 */ XK_X, NoSymbol, -/* 46 53 */ XK_C, NoSymbol, -/* 47 54 */ XK_V, NoSymbol, -/* 48 55 */ XK_B, NoSymbol, -/* 49 56 */ XK_N, NoSymbol, -/* 50 57 */ XK_M, NoSymbol, -/* 51 58 */ XK_comma, XK_less, -/* 52 59 */ XK_period, XK_greater, -/* 53 60 */ XK_slash, XK_question, -/* 54 61 */ XK_Shift_R, NoSymbol, -/* 55 62 */ XK_KP_Multiply, NoSymbol, -/* 56 63 */ XK_Alt_L, XK_Meta_L, -/* 57 64 */ XK_space, NoSymbol, -/* 58 65 */ XK_Caps_Lock, NoSymbol, -/* 59 66 */ XK_F1, NoSymbol, -/* 60 67 */ XK_F2, NoSymbol, -/* 61 68 */ XK_F3, NoSymbol, -/* 62 69 */ XK_F4, NoSymbol, -/* 63 70 */ XK_F5, NoSymbol, -/* 64 71 */ XK_F6, NoSymbol, -/* 65 72 */ XK_F7, NoSymbol, -/* 66 73 */ XK_F8, NoSymbol, -/* 67 74 */ XK_F9, NoSymbol, -/* 68 75 */ XK_F10, NoSymbol, -/* 69 76 */ XK_Break, XK_Pause, -/* 70 77 */ XK_Scroll_Lock, NoSymbol, -/* 71 78 */ XK_KP_Home, XK_KP_7, -/* 72 79 */ XK_KP_Up, XK_KP_8, -/* 73 80 */ XK_KP_Page_Up, XK_KP_9, -/* 74 81 */ XK_KP_Subtract, NoSymbol, -/* 75 82 */ XK_KP_Left, XK_KP_4, -/* 76 83 */ XK_KP_5, NoSymbol, -/* 77 84 */ XK_KP_Right, XK_KP_6, -/* 78 85 */ XK_KP_Add, NoSymbol, -/* 79 86 */ XK_KP_End, XK_KP_1, -/* 80 87 */ XK_KP_Down, XK_KP_2, -/* 81 88 */ XK_KP_Page_Down, XK_KP_3, -/* 82 89 */ XK_KP_Insert, XK_KP_0, -/* 83 90 */ XK_KP_Delete, XK_KP_Decimal, -/* 84 91 */ NoSymbol, NoSymbol, -/* 85 92 */ NoSymbol, NoSymbol, -/* 86 93 */ NoSymbol, NoSymbol, -/* 87 94 */ XK_F11, NoSymbol, -/* 88 95 */ XK_F12, NoSymbol, - -/* These are remapped from the extended set (using ExtendMap) */ - -/* 89 96 */ XK_Control_R, NoSymbol, -/* 90 97 */ XK_KP_Enter, NoSymbol, -/* 91 98 */ XK_KP_Divide, NoSymbol, -/* 92 99 */ XK_Sys_Req, XK_Print, -/* 93 100 */ XK_Alt_R, XK_Meta_R, -/* 94 101 */ XK_Num_Lock, NoSymbol, -/* 95 102 */ XK_Home, NoSymbol, -/* 96 103 */ XK_Up, NoSymbol, -/* 97 104 */ XK_Page_Up, NoSymbol, -/* 98 105 */ XK_Left, NoSymbol, -/* 99 106 */ XK_Right, NoSymbol, -/* 100 107 */ XK_End, NoSymbol, -/* 101 108 */ XK_Down, NoSymbol, -/* 102 109 */ XK_Page_Down, NoSymbol, -/* 103 110 */ XK_Insert, NoSymbol, -/* 104 111 */ XK_Delete, NoSymbol, -/* 105 112 */ XK_Super_L, NoSymbol, -/* 106 113 */ XK_Super_R, NoSymbol, -/* 107 114 */ XK_Menu, NoSymbol, - -/* Itsy hardware buttons */ -#define ITSY_BUTTON_FIRST 108 -#define ITSY_BUTTON_LAST 116 - -/* 108 115 */ XK_Next, NoSymbol, /* right button on side */ -/* 109 116 */ XK_Prior, NoSymbol, /* left button on side */ -/* 110 117 */ XK_Up, NoSymbol, /* joypad */ -/* 111 118 */ XK_Down, NoSymbol, -/* 112 119 */ XK_Left, NoSymbol, -/* 113 120 */ XK_Right, NoSymbol, -/* 114 121 */ NoSymbol, NoSymbol, /* left near speaker */ -/* 115 122 */ NoSymbol, NoSymbol, /* right near speaker */ -/* 116 123 */ NoSymbol, NoSymbol, /* tiny button */ -}; - -static unsigned long itsyButtonState; - -void -ItsyKeyboardLoad (void) -{ - KeySym *k; - -} - -static Status -ItsyKeyboardInit (KdKeyboardInfo *ki) -{ - if (!ki) - return BadImplementation; - - ki->driverPrivate = open ("/dev/buttons", 0); - - itsyButtonState = 0; - ki->keySyms.minKeyCode = 1; - ki->keySyms.maxKeyCode = (sizeof (ItsyKeymap) / sizeof (ItsyKeymap[0])) / ITSY_WIDTH; - ki->minScanCode = ki->keySyms.minKeyCode; - ki->maxScanCode = ki->keySyms.maxKeyCode; - ki->keySyms.mapWidth = ITSY_WIDTH; - - if (ki->keySyms.map) - xfree(ki->keySyms.map); - ki->keySyms.map = xalloc(sizeof(ItsyKeymap)); - if (!ki->keySyms.map) - return BadAlloc; - memcpy (kdKeymap, ItsyKeymap, sizeof (ItsyKeymap)); - - return Success; -} - -static void -ItsyKeyboardDisable (KdKeybdInfo *ki) -{ - if (fd >= 0) - close ((int)ki->driverPrivate); -} - -static void -ItsyKeyboardFini (KdKeybdInfo *ki) -{ - return; -} - -void -ItsyKeyboardRead (int fd) -{ - itsy_buttons_event event; - int b; - unsigned long bit; - unsigned long change; - unsigned long buttons; - - if (read (fd, &event, sizeof (event)) == sizeof (event)) - { - buttons = event.state; - change = buttons ^ itsyButtonState; - if (!change) - return; - for (b = ITSY_BUTTON_FIRST; b <= ITSY_BUTTON_LAST; b++) - { - bit = (1 << (b - ITSY_BUTTON_FIRST)); - if (change & bit) - KdEnqueueKeyboardEvent (b, (buttons & bit) == 0); - } - itsyButtonState = buttons; - } -} - -void -ItsyKeyboardLeds (int leds) -{ -} - -void -ItsyKeyboardBell (int volume, int frequency, int duration) -{ -} - -KdKeyboardFuncs itsyKeyboardFuncs = { - "itsy", - ItsyKeyboardInit, - ItsyKeyboardEnable, - ItsyKeyboardRead, - ItsyKeyboardLeds, - ItsyKeyboardBell, - ItsyKeyboardDisable - ItsyKeyboardFini, - NULL, -}; diff --git a/hw/kdrive/itsy/ts.c b/hw/kdrive/itsy/ts.c deleted file mode 100644 index 34ff6a880..000000000 --- a/hw/kdrive/itsy/ts.c +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#define NEED_EVENTS -#include "itsy.h" -#include -#include "inputstr.h" -#include "Xpoll.h" - -int -itsyTsReadBytes (int fd, char *buf, int len, int min) -{ - int n, tot; - fd_set set; - struct timeval tv; - - tot = 0; - while (len) - { - n = read (fd, buf, len); - if (n > 0) - { - tot += n; - buf += n; - len -= n; - } - if (tot % min == 0) - break; - FD_ZERO (&set); - FD_SET (fd, &set); - tv.tv_sec = 0; - tv.tv_usec = 100 * 1000; - n = select (fd + 1, &set, 0, 0, &tv); - if (n <= 0) - break; - } - return tot; -} - -void -itsyTsRead (KdPointerInfo *pi, int tsPort) -{ - ts_event event; - long buf[3]; - int n; - long pressure; - long x, y; - unsigned long flags; - unsigned long buttons; - - n = itsyTsReadBytes (tsPort, (char *) &event, - sizeof (event), sizeof (event)); - if (n == sizeof (event)) - { - if (event.pressure) - { - flags = KD_BUTTON_1; - x = event.point.x; - y = event.point.y; - } - else - { - flags = KD_MOUSE_DELTA; - x = 0; - y = 0; - } - KdEnqueuePointerEvent (pi, flags, x, y, 0); - } -} - -#if 0 -#define ITSY_DEBUG_LOW 1 - -// -// Touch screen parameters are stored -// in the flash. This code is taken from 'wm1'. -// -void itsySetTouchCalibration (int mou_filedsc, - int xs, int xt, int ys, int yt, int xys) -{ - int k, ibuf[10]; - - ibuf[0] = xs; - ibuf[1] = xt; - ibuf[2] = ys; - ibuf[3] = yt; - ibuf[4] = xys; - if ((k=ioctl(mou_filedsc, TS_SET_CALM, ibuf)) != 0) { - fprintf(stderr, "ERROR: ioctl TS_SET_CALM returns %d\n", k); - } -} - - -int itsyReadFlashBlock(int location, signed char *data, int dbytes) -{ - int offset, bytes; - int flashfd; - - flashfd = open("/dev/flash1", O_RDONLY); - if (flashfd < 0) return(0); - - offset = lseek(flashfd, location, SEEK_SET); - if (offset != location) { - close(flashfd); - return(0); - } - - bytes = read(flashfd, data, dbytes); - if (bytes != dbytes) { - close(flashfd); - return(0); - } - - close(flashfd); - return(1); -} - -/**********************************************************************/ -#define RAMSIZE (0x400000) -#define MONITOR_BLOCKSIZE (32) -/**********************************************************************/ - -/* code for storing calibration into flash */ - -#define CALIBRATE_BLOCKSIZE (32) -#define CALIBRATE_OFFSET (RAMSIZE-MONITOR_BLOCKSIZE-CALIBRATE_BLOCKSIZE) -#define CALIBRATE_MAGIC_NUM (0x0babedee) - - -static int check_if_calibrated_and_set(int mou_filedsc) -{ - signed char cal_data[CALIBRATE_BLOCKSIZE]; - int *iptr; - - if (itsyReadFlashBlock(CALIBRATE_OFFSET, - cal_data, CALIBRATE_BLOCKSIZE) == 0) { - if ( ITSY_DEBUG_LOW ) { - fprintf(stderr,"unable to read calibration data for touch screen\n"); - } - return(0); - } - - iptr = (int *) cal_data; - if (iptr[0] == CALIBRATE_MAGIC_NUM) { - if ( ITSY_DEBUG_LOW ) { - fprintf(stderr,"Calibrating touch screen using %d, %d, %d, %d, %d\n", - iptr[1], iptr[2], iptr[3], iptr[4], iptr[5]); - } - itsySetTouchCalibration(mou_filedsc, iptr[1], iptr[2], iptr[3], iptr[4], iptr[5]); - return(1); - } - else { - if ( ITSY_DEBUG_LOW ) { - fprintf(stderr,"Couldn't calibrate screen\n"); - } - return(0); - } -} -#endif - -int -itsyTsInit (void) -{ - int tsPort; - - tsPort = open ("/dev/ts", 0); - fprintf (stderr, "tsPort %d\n", tsPort); -#if 0 - if (tsPort >= 0) - check_if_calibrated_and_set (tsPort); -#endif - return tsPort; -} - -void -itsyTsFini (int tsPort) -{ - if (tsPort >= 0) - close (tsPort); -} - -KdPointerDriver itsyTsMouseDriver = { - "itsyts", - itsyTsInit, - itsyTsRead, - itsyTsFini -}; - diff --git a/hw/kdrive/mach64/Makefile.am b/hw/kdrive/mach64/Makefile.am deleted file mode 100644 index 6ca376ab2..000000000 --- a/hw/kdrive/mach64/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -INCLUDES = \ - @KDRIVE_INCS@ \ - -I$(top_srcdir)/hw/kdrive/vesa \ - @KDRIVE_CFLAGS@ - -bin_PROGRAMS = Xmach64 - -if TSLIB -TSLIB_FLAG = -lts -endif - - -noinst_LIBRARIES = libmach64.a - -libmach64_a_SOURCES = \ - mach64.c \ - mach64draw.c \ - mach64video.c \ - mach64.h \ - mach64draw.h - -Xmach64_SOURCES = \ - mach64stub.c - -MACH64_LIBS = \ - libmach64.a \ - $(top_builddir)/hw/kdrive/vesa/libvesa.a - - -if GLX -Xmach64_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -endif - -Xmach64_LDADD = \ - $(MACH64_LIBS) \ - @KDRIVE_LIBS@ - -Xmach64_DEPENDENCIES = \ - libmach64.a \ - @KDRIVE_LOCAL_LIBS@ - -relink: - rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS) diff --git a/hw/kdrive/mach64/mach64.c b/hw/kdrive/mach64/mach64.c deleted file mode 100644 index 3c513ba17..000000000 --- a/hw/kdrive/mach64/mach64.c +++ /dev/null @@ -1,433 +0,0 @@ -/* - * Copyright © 2001 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "mach64.h" -#include "kaa.h" - -static Bool -mach64CardInit (KdCardInfo *card) -{ - Mach64CardInfo *mach64c; - - mach64c = (Mach64CardInfo *) xalloc (sizeof (Mach64CardInfo)); - if (!mach64c) - return FALSE; - - (void) mach64MapReg (card, mach64c); - mach64c->lcdEnabled = FALSE; - - if (!vesaInitialize (card, &mach64c->vesa)) - { - xfree (mach64c); - return FALSE; - } - - card->driver = mach64c; - - return TRUE; -} - -static Bool -mach64ScreenInit (KdScreenInfo *screen) -{ - Mach64CardInfo *mach64c = screen->card->driver; - Mach64ScreenInfo *mach64s; - - mach64s = (Mach64ScreenInfo *) xalloc (sizeof (Mach64ScreenInfo)); - if (!mach64s) - return FALSE; - memset (mach64s, '\0', sizeof (Mach64ScreenInfo)); - if (!vesaScreenInitialize (screen, &mach64s->vesa)) - { - xfree (mach64s); - return FALSE; - } - if (!mach64c->reg) - screen->dumb = TRUE; - if (mach64s->vesa.mapping != VESA_LINEAR) - screen->dumb = TRUE; - switch (screen->fb[0].depth) { - case 8: - mach64s->colorKey = 0xff; - break; - case 15: - case 16: - mach64s->colorKey = 0x001e; - break; - case 24: - mach64s->colorKey = 0x0000fe; - break; - default: - mach64s->colorKey = 1; - break; - } - screen->driver = mach64s; - return TRUE; -} - -static Bool -mach64InitScreen (ScreenPtr pScreen) -{ -#ifdef XV - mach64InitVideo(pScreen); -#endif - return vesaInitScreen (pScreen); -} - -#ifdef RANDR -static Bool -mach64RandRSetConfig (ScreenPtr pScreen, - Rotation rotation, - int rate, - RRScreenSizePtr pSize) -{ - kaaWaitSync (pScreen); - - if (!vesaRandRSetConfig (pScreen, rotation, rate, pSize)) - return FALSE; - - return TRUE; -} - -static void -mach64RandRInit (ScreenPtr pScreen) -{ - rrScrPriv(pScreen); - - pScrPriv->rrSetConfig = mach64RandRSetConfig; -} -#endif - -static Bool -mach64FinishInitScreen (ScreenPtr pScreen) -{ - Bool ret; - ret = vesaFinishInitScreen (pScreen); -#ifdef RANDR - mach64RandRInit (pScreen); -#endif - return ret; -} - -static Bool -mach64CreateResources (ScreenPtr pScreen) -{ - return vesaCreateResources (pScreen); -} - -CARD32 -mach64ReadLCD (Reg *reg, int id) -{ - CARD32 LCD_INDEX; - - LCD_INDEX = reg->LCD_INDEX & ~(0x3f); - reg->LCD_INDEX = (LCD_INDEX | id); - return reg->LCD_DATA; -} - -void -mach64WriteLCD (Reg *reg, int id, CARD32 data) -{ - CARD32 LCD_INDEX; - - LCD_INDEX = reg->LCD_INDEX & ~(0x3f); - reg->LCD_INDEX = (LCD_INDEX | id); - reg->LCD_DATA = data; -} - -void -mach64Preserve (KdCardInfo *card) -{ - Mach64CardInfo *mach64c = card->driver; - Reg *reg = mach64c->reg; - - vesaPreserve(card); - if (reg) - { - mach64c->save.LCD_GEN_CTRL = mach64ReadLCD (reg, 1); - } -} - -Bool -mach64MapReg (KdCardInfo *card, Mach64CardInfo *mach64c) -{ - mach64c->reg_base = (CARD8 *) KdMapDevice (MACH64_REG_BASE(card), - MACH64_REG_SIZE(card)); - - if (!mach64c->reg_base) - { - mach64c->reg = 0; - mach64c->media_reg = 0; - return FALSE; - } - - KdSetMappedMode (MACH64_REG_BASE(card), - MACH64_REG_SIZE(card), - KD_MAPPED_MODE_REGISTERS); - mach64c->reg = (Reg *) (mach64c->reg_base + MACH64_REG_OFF(card)); - mach64c->media_reg = (MediaReg *) (mach64c->reg_base + MACH64_MEDIA_REG_OFF(card)); - return TRUE; -} - -void -mach64UnmapReg (KdCardInfo *card, Mach64CardInfo *mach64c) -{ - if (mach64c->reg_base) - { - KdResetMappedMode (MACH64_REG_BASE(card), - MACH64_REG_SIZE(card), - KD_MAPPED_MODE_REGISTERS); - KdUnmapDevice ((void *) mach64c->reg_base, MACH64_REG_SIZE(card)); - mach64c->reg_base = 0; - mach64c->reg = 0; - mach64c->media_reg = 0; - } -} - -void -mach64SetMMIO (KdCardInfo *card, Mach64CardInfo *mach64c) -{ - if (!mach64c->reg_base) - mach64MapReg (card, mach64c); - if (mach64c->reg) - { - if (mach64c->reg->GUI_STAT == 0xffffffff) - FatalError ("Mach64 REG not visible\n"); - } -} - -void -mach64ResetMMIO (KdCardInfo *card, Mach64CardInfo *mach64c) -{ - mach64UnmapReg (card, mach64c); -} - -Bool -mach64Enable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - Mach64CardInfo *mach64c = pScreenPriv->card->driver; - - if (!vesaEnable (pScreen)) - return FALSE; - - mach64SetMMIO (pScreenPriv->card, mach64c); - mach64DPMS (pScreen, KD_DPMS_NORMAL); -#ifdef XV - KdXVEnable (pScreen); -#endif - return TRUE; -} - -void -mach64Disable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - Mach64CardInfo *mach64c = pScreenPriv->card->driver; - -#ifdef XV - KdXVDisable (pScreen); -#endif - mach64ResetMMIO (pScreenPriv->card, mach64c); - vesaDisable (pScreen); -} - -const CARD8 mach64DPMSModes[4] = { - 0x80, /* KD_DPMS_NORMAL */ - 0x8c, /* KD_DPMS_STANDBY */ - 0x8c, /* KD_DPMS_STANDBY */ - 0x8c, /* KD_DPMS_STANDBY */ -/* 0xb0, KD_DPMS_SUSPEND */ -/* 0xbc, KD_DPMS_POWERDOWN */ -}; - -#define PWR_MGT_ON (1 << 0) -#define PWR_MGT_MODE (3 << 1) -#define PWR_MGT_MODE_PIN (0 << 1) -#define PWR_MGT_MODE_REG (1 << 1) -#define PWR_MGT_MODE_TIMER (2 << 1) -#define PWR_MGR_MODE_PCI (3 << 1) -#define AUTO_PWRUP_EN (1 << 3) -#define ACTIVITY_PIN_ON (1 << 4) -#define STANDBY_POL (1 << 5) -#define SUSPEND_POL (1 << 6) -#define SELF_REFRESH (1 << 7) -#define ACTIVITY_PIN_EN (1 << 8) -#define KEYBD_SNOOP (1 << 9) -#define DONT_USE_F32KHZ (1 << 10) -#define TRISTATE_MEM_EN (1 << 11) -#define LCDENG_TEST_MODE (0xf << 12) -#define STANDBY_COUNT (0xf << 16) -#define SUSPEND_COUNT (0xf << 20) -#define BIASON (1 << 24) -#define BLON (1 << 25) -#define DIGON (1 << 26) -#define PM_D3_RST_ENB (1 << 27) -#define STANDBY_NOW (1 << 28) -#define SUSPEND_NOW (1 << 29) -#define PWR_MGT_STATUS (3 << 30) -#define PWR_MGT_STATUS_ON (0 << 30) -#define PWR_MGT_STATUS_STANDBY (1 << 30) -#define PWR_MGT_STATUS_SUSPEND (2 << 30) -#define PWR_MGT_STATUS_TRANSITION (3 << 30) - -Bool -mach64DPMS (ScreenPtr pScreen, int mode) -{ - KdScreenPriv(pScreen); - Mach64CardInfo *mach64c = pScreenPriv->card->driver; - int hsync_off = 0, vsync_off = 0, blank = 0; - CARD32 CRTC_GEN_CNTL; - CARD32 LCD_GEN_CTRL; - Reg *reg = mach64c->reg; - - if (!reg) - return FALSE; - - CRTC_GEN_CNTL = reg->CRTC_GEN_CNTL; - LCD_GEN_CTRL = mach64ReadLCD (reg, 1); - - switch (mode) { - case KD_DPMS_NORMAL: - hsync_off = 0; - vsync_off = 0; - blank = 0; - break; - case KD_DPMS_STANDBY: - hsync_off = 1; - vsync_off = 0; - blank = 1; - break; - case KD_DPMS_SUSPEND: - hsync_off = 0; - vsync_off = 1; - blank = 1; - break; - case KD_DPMS_POWERDOWN: - hsync_off = 1; - vsync_off = 1; - blank = 1; - } - - if (hsync_off) - CRTC_GEN_CNTL |= (1 << 2); - else - CRTC_GEN_CNTL &= ~(1 << 2); - if (vsync_off) - CRTC_GEN_CNTL |= (1 << 3); - else - CRTC_GEN_CNTL &= ~(1 << 3); - if (blank) - { - mach64c->lcdEnabled = (LCD_GEN_CTRL & (1 << 1)) != 0; - LCD_GEN_CTRL &= ~(1 << 1); - CRTC_GEN_CNTL |= (1 << 6); - - } - else - { - if (!(LCD_GEN_CTRL & 3) || mach64c->lcdEnabled) - LCD_GEN_CTRL |= (1 << 1); - CRTC_GEN_CNTL &= ~(1 << 6); - } - - kaaWaitSync (pScreen); - - mach64WriteLCD (reg, 1, LCD_GEN_CTRL); - - reg->CRTC_GEN_CNTL = CRTC_GEN_CNTL; - return TRUE; -} - -static void -mach64Restore (KdCardInfo *card) -{ - Mach64CardInfo *mach64c = card->driver; - Reg *reg = mach64c->reg; - - if (reg) - { - mach64WriteLCD (reg, 1, mach64c->save.LCD_GEN_CTRL); - } - mach64ResetMMIO (card, mach64c); - vesaRestore (card); -} - -static void -mach64ScreenFini (KdScreenInfo *screen) -{ - Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver; -#ifdef XV - mach64FiniVideo(screen->pScreen); -#endif - vesaScreenFini (screen); - xfree (mach64s); - screen->driver = 0; -} - -static void -mach64CardFini (KdCardInfo *card) -{ - Mach64CardInfo *mach64c = card->driver; - - mach64UnmapReg (card, mach64c); - vesaCardFini (card); - xfree (mach64c); -} - -#define mach64CursorInit 0 /* initCursor */ -#define mach64CursorEnable 0 /* enableCursor */ -#define mach64CursorDisable 0 /* disableCursor */ -#define mach64CursorFini 0 /* finiCursor */ -#define mach64RecolorCursor 0 /* recolorCursor */ - -KdCardFuncs mach64Funcs = { - mach64CardInit, /* cardinit */ - mach64ScreenInit, /* scrinit */ - mach64InitScreen, /* initScreen */ - mach64FinishInitScreen, /* finishInitScreen */ - mach64CreateResources, /* createRes */ - mach64Preserve, /* preserve */ - mach64Enable, /* enable */ - mach64DPMS, /* dpms */ - mach64Disable, /* disable */ - mach64Restore, /* restore */ - mach64ScreenFini, /* scrfini */ - mach64CardFini, /* cardfini */ - - mach64CursorInit, /* initCursor */ - mach64CursorEnable, /* enableCursor */ - mach64CursorDisable, /* disableCursor */ - mach64CursorFini, /* finiCursor */ - mach64RecolorCursor, /* recolorCursor */ - - mach64DrawInit, /* initAccel */ - mach64DrawEnable, /* enableAccel */ - mach64DrawDisable, /* disableAccel */ - mach64DrawFini, /* finiAccel */ - - vesaGetColors, /* getColors */ - vesaPutColors, /* putColors */ -}; diff --git a/hw/kdrive/mach64/mach64.h b/hw/kdrive/mach64/mach64.h deleted file mode 100644 index fbb10b2ba..000000000 --- a/hw/kdrive/mach64/mach64.h +++ /dev/null @@ -1,653 +0,0 @@ -/* - * Copyright © 2001 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _MACH64_H_ -#define _MACH64_H_ -#include -#include "kxv.h" - -/* - * offset from ioport beginning - */ - -#define MACH64_REG_BASE(c) ((c)->attr.address[1]) -#define MACH64_REG_SIZE(c) (4096) - -#define MACH64_REG_OFF(c) (1024) -#define MACH64_MEDIA_REG_OFF(c) (0) - -typedef volatile CARD8 VOL8; -typedef volatile CARD16 VOL16; -typedef volatile CARD32 VOL32; - -typedef struct _Reg { - VOL32 CRTC_H_TOTAL_DISP; /* 0x00 */ - VOL32 CRTC_H_SYNC_STRT_WID; /* 0x01 */ - VOL32 CRTC_V_TOTAL_DISP; /* 0x02 */ - VOL32 CRTC_V_SYNC_STRT_WID; /* 0x03 */ - VOL32 CRTC_VLINE_CRNT_VLINE; /* 0x04 */ - VOL32 CRTC_OFF_PITCH; /* 0x05 */ - VOL32 CRTC_INT_CNTL; /* 0x06 */ - VOL32 CRTC_GEN_CNTL; /* 0x07 */ - VOL32 DSP_CONFIG; /* 0x08 */ - VOL32 DSP_ON_OFF; /* 0x09 */ - VOL32 TIMER_CONFIG; /* 0x0a */ - VOL32 MEM_BUF_CNTL; /* 0x0b */ - VOL32 unused0; /* 0x0c */ - VOL32 MEM_ADDR_CONFIG; /* 0x0d */ - VOL32 CRT_TRAP; /* 0x0e */ - VOL32 I2C_CNTL_0; /* 0x0f */ - VOL32 OVR_CLR; /* 0x10 */ - VOL32 OVR_WID_LEFT_RIGHT; /* 0x11 */ - VOL32 OVR_WID_TOP_BOTTOM; /* 0x12 */ - VOL32 VGA_DSP_CONFIG; /* 0x13 */ - VOL32 VGA_DSP_ON_OFF; /* 0x14 */ - VOL32 DSP2_CONFIG; /* 0x15 */ - VOL32 DSP2_ON_OFF; /* 0x16 */ - VOL32 CRTC2_OFF_PITCH; /* 0x17 */ - VOL32 CUR_CLR0; /* 0x18 */ - VOL32 CUR_CLR1; /* 0x19 */ - VOL32 CUR_OFFSET; /* 0x1a */ - VOL32 CUR_HORZ_VERT_POSN; /* 0x1b */ - VOL32 CUR_HORZ_VERT_OFF; /* 0x1c */ - VOL32 TV_OUT_INDEX; /* 0x1d */ - VOL32 GP_IO; /* 0x1e */ - VOL32 HW_DEBUG; /* 0x1f */ - VOL32 SCRATCH_REG0; /* 0x20 */ - VOL32 SCRATCH_REG1; - VOL32 SCRATCH_REG2; - VOL32 SCRATCH_REG3; - VOL32 CLOCK_CNTL; - VOL32 CONFIG_STAT1; - VOL32 CONFIG_STAT2; - VOL32 TV_OUT_DATA; - VOL32 BUS_CNTL; /* 0x28 */ - VOL32 LCD_INDEX; /* 0x29 */ - VOL32 LCD_DATA; /* 0x2a */ - VOL32 EXT_MEM_CNTL; - VOL32 MEM_CNTL; - VOL32 MEM_VGA_WP_SEL; - VOL32 MEM_VGA_RP_SEL; - VOL32 I2C_CNTL_1; - VOL32 DAC_REGS; /* 0x30 */ - VOL32 DAC_CNTL; /* 0x31 */ - VOL32 unused_32; - VOL32 unused_33; - VOL32 GEN_TEST_CNTL; /* 0x34 */ - VOL32 CUSTOM_MACRO_CNTL; - VOL32 unused36; - VOL32 CONFIG_CNTL; - VOL32 CONFIG_CHIP_ID; - VOL32 CONFIG_STAT0; - VOL32 CRC_SIG; - VOL32 unused_3b; - VOL32 unused_3c; - VOL32 unused_3d; - VOL32 unused_3e; - VOL32 unused_3f; - VOL32 DST_OFF_PITCH; /* 0x40 */ - VOL32 DST_X; - VOL32 DST_Y; - VOL32 DST_Y_X; - VOL32 DST_WIDTH; - VOL32 DST_HEIGHT; - VOL32 DST_HEIGHT_WIDTH; - VOL32 DST_X_WIDTH; - VOL32 DST_BRES_LNTH; - VOL32 DST_BRES_ERR; - VOL32 DST_BRES_INC; - VOL32 DST_BRES_DEC; - VOL32 DST_CNTL; - VOL32 DST_Y_X_ALIAS; - VOL32 TRAIL_BRES_ERR; - VOL32 TRAIL_BRES_INC; - VOL32 TRAIL_BRES_DEC; - VOL32 LEAD_BRES_LNTH; - VOL32 Z_OFF_PITCH; - VOL32 Z_CNTL; - VOL32 ALPHA_TST_CNTL; - VOL32 unused55; - VOL32 SECONDARY_STW_EXP; - VOL32 SECONDARY_S_X_INC; - VOL32 SECONDARY_S_Y_INC; - VOL32 SECONDARY_S_START; - VOL32 SECONDARY_W_X_INC; - VOL32 SECONDARY_W_Y_INC; - VOL32 SECONDARY_W_START; - VOL32 SECONDARY_T_X_INC; - VOL32 SECONDARY_T_Y_INC; - VOL32 SECONDARY_T_START; - VOL32 SRC_OFF_PITCH; - VOL32 SRC_X; - VOL32 SRC_Y; - VOL32 SRC_Y_X; - VOL32 SRC_WIDTH1; - VOL32 SRC_HEIGHT1; - VOL32 SRC_HEIGHT1_WIDTH1; - VOL32 SRC_X_START; - VOL32 SRC_Y_START; - VOL32 SRC_Y_X_START; - VOL32 SRC_WIDTH2; - VOL32 SRC_HEIGHT2; - VOL32 SRC_HEIGHT2_WIDTH2; - VOL32 SRC_CNTL; - VOL32 unused6e; - VOL32 unused6f; - union { - struct { - VOL32 SCALE_OFF; /* 0x70 */ - VOL32 unused71; - VOL32 unused72; - VOL32 unused73; - VOL32 unused74; - VOL32 unused75; - VOL32 unused76; - VOL32 SCALE_WIDTH; - VOL32 SCALE_HEIGHT; - VOL32 unused79; - VOL32 unused7a; - VOL32 SCALE_PITCH; - VOL32 SCALE_X_INC; - VOL32 SCALE_Y_INC; - VOL32 SCALE_VACC; - VOL32 SCALE_3D_CNTL; /* 0x7f */ - } scaler; - struct { - VOL32 TEX_0_OFF; /* 0x70 */ - VOL32 TEX_1_OFF; - VOL32 TEX_2_OFF; - VOL32 TEX_3_OFF; - VOL32 TEX_4_OFF; - VOL32 TEX_5_OFF; - VOL32 TEX_6_OFF; - VOL32 TEX_7_OFF; - VOL32 TEX_8_OFF; - VOL32 TEX_9_OFF; - VOL32 TEX_10_OFF; - VOL32 S_Y_INC; - VOL32 RED_X_INC; - VOL32 GREEN_X_INC; /* 0x7d */ - VOL32 unused7e; - VOL32 unused7f; - } texture; - } u; - VOL32 HOST_DATA[16]; /* 0x80 */ - VOL32 HOST_CNTL; /* 0x90 */ - VOL32 BM_HOSTDATA; /* 0x91 */ - VOL32 BM_ADDR; /* 0x92 */ - VOL32 BM_GUI_TABLE_CMD; /* 0x93 */ - VOL32 unused94; /* 0x94 */ - VOL32 unused95; /* 0x95 */ - VOL32 unused96; /* 0x96 */ - VOL32 FOG_TABLE_INDEX; /* 0x97 */ - VOL32 FOG_TABLE_DATA[8]; /* 0x98 */ - VOL32 PAT_REG0; /* 0xa0 */ - VOL32 PAT_REG1; - VOL32 PAT_CNTL; - VOL32 unused_0a3; - VOL32 unused_0a4; - VOL32 unused_0a5; - VOL32 unused_0a6; - VOL32 unused_0a7; - VOL32 SC_LEFT; - VOL32 SC_RIGHT; - VOL32 SC_LEFT_RIGHT; - VOL32 SC_TOP; - VOL32 SC_BOTTOM; - VOL32 SC_TOP_BOTTOM; - VOL32 USR1_DST_OFF_PITCH; - VOL32 USR2_DST_OFF_PITCH; - VOL32 DP_BKGD_CLR; /* 0xb0 */ - VOL32 DP_FRGD_CLR; - VOL32 DP_WRITE_MSK; - VOL32 unused_0b3; - VOL32 DP_PIX_WIDTH; - VOL32 DP_MIX; - VOL32 DP_SRC; - VOL32 DP_FRGD_CLR_MIX; - VOL32 DP_FRGD_BKGD_CLR; - VOL32 unused_0b9; - VOL32 DST_X_Y; - VOL32 DST_WIDTH_HEIGHT; - VOL32 USR_DST_PITCH; - VOL32 unused_0bd; - VOL32 DP_SET_GUI_ENGINE2; - VOL32 DP_SET_GUI_ENGINE; - VOL32 CLR_CMP_CLR; /* 0xc0 */ - VOL32 CLR_CMP_MSK; - VOL32 CLR_CMP_CNTL; - VOL32 unused_0c3; - VOL32 FIFO_STAT; - VOL32 unused_0c5; - VOL32 unused_0c6; - VOL32 unused_0c7; - VOL32 unused_0c8; - VOL32 unused_0c9; - VOL32 unused_0ca; - VOL32 unused_0cb; - VOL32 GUI_TRAJ_CNTL; - VOL32 unused_0cd; - VOL32 GUI_STAT; - VOL32 unused_0cf; - VOL32 TEX_PALETTE_INDEX; - VOL32 STW_EXP; - VOL32 LOG_MAX_INC; - VOL32 S_X_INC; - VOL32 S_Y_INC_2_SCALE_PITCH; - VOL32 S_START; - VOL32 W_X_INC; - VOL32 W_Y_INC; - VOL32 W_START; - VOL32 T_X_INC; - VOL32 T_Y_INC_SECONDARY_SCALE_PITCH; - VOL32 T_START; - VOL32 TEX_SIZE_PITCH; - VOL32 TEX_CNTL; - VOL32 SECONDARY_TEX_OFFSET_SECONDARY_SCALE_OFF; - VOL32 TEX_PALETTE; - VOL32 SCALE_PITCH_BOTH; /* 0xe0 */ - VOL32 SECONDARY_SCALE_OFF_ACC; - VOL32 SCALE_OFF_ACC; - VOL32 SCALE_DST_Y_X; - VOL32 unused_0e4; - VOL32 unused_0e5; - VOL32 COMPOSITE_SHADOW_ID; - VOL32 SECONDARY_SCALE_X_INC_SPECULAR_RED_X_INC; - VOL32 SPECULAR_RED_Y_INC; - VOL32 SPECULAR_RED_START_SECONDARY_SCALE_HACC;; - VOL32 SPECULAR_GREEN_X_INC; - VOL32 SPECULAR_GREEN_Y_INC; - VOL32 SPECULAR_GREEN_START; - VOL32 SPECULAR_BLUE_X_INC; - VOL32 SPECULAR_BLUE_Y_INC; - VOL32 SPECULAR_BLUE_START; - VOL32 RED_X_INC_SCALE_X_INC; - VOL32 RED_Y_INC; - VOL32 RED_START_SCALE_HACC; - VOL32 GREEN_X_INC_SCALE_Y_INC; - VOL32 GREEN_Y_INC_SECONDARY_SCALE_Y_INC; - VOL32 GREEN_START_SECONDARY_SCALE_VACC; - VOL32 BLUE_X_INC; - VOL32 BLUE_Y_INC; - VOL32 BLUE_START; - VOL32 Z_X_INC; - VOL32 Z_Y_INC; - VOL32 Z_START; - VOL32 ALPHA_X_INC; - VOL32 FOG_X_INC; - VOL32 ALPHA_Y_INC; - VOL32 FOG_Y_INC; - VOL32 ALPHA_START; - VOL32 FOG_START; - VOL32 unused_0ff; -} Reg; /* 0x100 */ - -#define DST_X_DIR (1 << 0) -#define DST_Y_DIR (1 << 1) -#define DST_Y_MAJOR (1 << 2) -#define DST_X_TILE (1 << 3) -#define DST_Y_TILE (1 << 4) -#define DST_LAST_PEL (1 << 5) -#define DST_POLYGON_EN (1 << 6) -#define DST_24_ROT_EN (1 << 7) -#define DST_24_ROT(n) ((n) << 8) -#define DST_BRES_ZERO (1 << 11) -#define DST_POLYGON_RTEDGE_DIS (1 << 12) -#define TRAIL_X_DIR (1 << 13) -#define TRAP_FILL_DIR (1 << 14) -#define TRAIL_BRES_SIGN (1 << 15) -#define SRC_PATT_EN (1 << 16) -#define SRC_PATT_ROT_EN (1 << 17) -#define SRC_LINEAR_EN (1 << 18) -#define SRC_BYTE_ALIGN (1 << 19) -#define SRC_LINE_X_DIR (1 << 20) -#define SRC_8x8x8_BRUSH (1 << 21) -#define FAST_FILL_EN (1 << 22) -#define SRC_TRACK_DST (1 << 23) -#define PAT_MONO_EN (1 << 24) -#define PAT_CLR_4x2_EN (1 << 25) -#define PAT_CLR_8x1_EN (1 << 26) -#define HOST_BYTE_ALIGN (1 << 28) -#define HOST_BIG_ENDIAN_EN (1 << 29) - -/* BUS_CNTL bits */ -#define BUS_DBL_RESYNC (1 << 0) -#define BUS_MSTR_RESET (1 << 1) -#define BUS_FLUSH_BUF (1 << 2) -#define BUS_STOP_REQ_DIS (1 << 3) -#define BUS_APER_REG_DIS (1 << 4) -#define BUS_EXTRA_PIPE_DIS (1 << 5) -#define BUS_MASTER_DIS (1 << 6) -#define ROM_WRT_EN (1 << 7) -#define CHIP_HIDDEN_REV (3 << 8) -#define BUS_PCI_READ_RETRY_EN (1 << 13) -#define BUS_PCI_WRT_RETRY_EN (1 << 15) -#define BUS_RETRY_WS (0xf << 16) -#define BUS_MSTR_RD_MULT (1 << 20) -#define BUS_MSTR_RD_LINE (1 << 21) -#define BUS_SUSPEND (1 << 22) -#define LAT16X (1 << 23) -#define BUS_RD_DISCARD_EN (1 << 24) -#define BUS_RD_ABORT_EN (1 << 25) -#define BUS_MSTR_WS (1 << 26) -#define BUS_EXT_REG_EN (1 << 27) -#define BUS_MSTR_DISCONNECT_EN (1 << 28) -#define BUS_WRT_BURST (1 << 29) -#define BUS_READ_BURST (1 << 30) -#define BUS_RDY_READ_DLY (1 << 31) - -#define SCALE_PIX_EXPAND (1 << 0) -#define SCALE_Y2R_TEMP (1 << 1) -#define SCALE_HORZ_MODE (1 << 2) -#define SCALE_VERT_MODE (1 << 3) -#define SCALE_SIGNED_UV (1 << 4) -#define SCALE_GAMMA_SEL (3 << 5) -#define SCALE_GAMMA_BRIGHT (0 << 5) -#define SCALE_GAMMA_22 (1 << 5) -#define SCALE_GAMMA_18 (2 << 5) -#define SCALE_GAMMA_14 (3 << 5) -#define SCALE_DISP_SEL (1 << 7) -#define SCALE_BANDWIDTH (1 << 26) -#define SCALE_DIS_LIMIT (1 << 27) -#define SCALE_CLK_FORCE_ON (1 << 29) -#define SCALE_OVERLAY_EN (1 << 30) -#define SCALE_EN (1 << 31) - -#define VIDEO_IN_VYUY422 (0xb) -#define VIDEO_IN_YVYU422 (0xc) -#define SCALER_IN_15bpp (0x3 << 16) -#define SCALER_IN_16bpp (0x4 << 16) -#define SCALER_IN_32bpp (0x6 << 16) -#define SCALER_IN_YUV_9 (0x9 << 16) -#define SCALER_IN_YUV_12 (0xa << 16) -#define SCALER_IN_VYUY422 (0xb << 16) -#define SCALER_IN_YVYU422 (0xc << 16) - -#define CAP_INPUT_MODE (1 << 0) -#define CAP_BUF_MODE (1 << 2) -#define CAP_START_BUF (1 << 3) -#define CAP_BUF_TYPE_FIELD (0 << 4) -#define CAP_BUF_TYPE_ALTERNATING (1 << 4) -#define CAP_BUF_TYPE_FRAME (2 << 4) - -#define OVL_BUF_MODE (1 << 28) -#define OVL_BUF_NEXT (1 << 29) - -#define CAP_TRIGGER (3 << 0) -#define OVL_CUR_BUF (1 << 5) -#define OVL_BUF_STATUS (1 << 6) -#define CAP_BUF_STATUS (1 << 7) -#define CAPTURE_EN (1 << 31) - -typedef struct _MediaReg { - VOL32 OVERLAY_Y_X_START; /* 0x100 */ - VOL32 OVERLAY_Y_X_END; - VOL32 OVERLAY_VIDEO_KEY_CLR; - VOL32 OVERLAY_VIDEO_KEY_MSK; - VOL32 OVERLAY_GRAPHICS_KEY_CLR; - VOL32 OVERLAY_GRAPHICS_KEY_MSK; - VOL32 OVERLAY_KEY_CNTL; - VOL32 unused_107; - VOL32 OVERLAY_SCALE_INC; - VOL32 OVERLAY_SCALE_CNTL; - VOL32 SCALER_HEIGHT_WIDTH; - VOL32 SCALER_TEST; - VOL32 unused_10c; - VOL32 SCALER_BUF0_OFFSET; - VOL32 SCALER_BUF1_OFFSET; - VOL32 SCALER_BUF_PITCH; - VOL32 CAPTURE_START_END; /* 0x110 */ - VOL32 CAPTURE_X_WIDTH; - VOL32 VIDEO_FORMAT; - VOL32 VBI_START_END; - VOL32 CAPTURE_CONFIG; - VOL32 TRIG_CNTL; - VOL32 OVERLAY_EXCLUSIVE_HORZ; - VOL32 OVERLAY_EXCLUSIVE_VERT; - VOL32 VBI_WIDTH; - VOL32 CAPTURE_DEBUG; - VOL32 VIDEO_SYNC_TEST; - VOL32 unused_11b; - VOL32 SNAPSHOT_VH_COUNTS; - VOL32 SNAPSHOT_F_COUNT; - VOL32 N_VIF_COUNT; - VOL32 SNAPSHOT_VIF_COUNT; - VOL32 CAPTURE_BUF0_OFFSET; /* 0x120 */ - VOL32 CAPTURE_BUF1_OFFSET; - VOL32 ONESHOT_BUF_OFFSET; - VOL32 unused_123; - VOL32 unused_124; - VOL32 unused_125; - VOL32 unused_126; - VOL32 unused_127; - VOL32 unused_128; - VOL32 unused_129; - VOL32 unused_12a; - VOL32 unused_12b; - VOL32 SNAPSHOT2_VH_COUNTS; - VOL32 SNAPSHOT2_F_COUNT; - VOL32 N_VIF2_COUNT; - VOL32 SNAPSHOT2_VIF_COUNT; - VOL32 MPP_CONFIG; /* 0x130 */ - VOL32 MPP_STROBE_SEQ; - VOL32 MPP_ADDR; - VOL32 MPP_DATA; - VOL32 unused_134; - VOL32 unused_135; - VOL32 unused_136; - VOL32 unused_137; - VOL32 unused_138; - VOL32 unused_139; - VOL32 unused_13a; - VOL32 unused_13b; - VOL32 unused_13c; - VOL32 unused_13d; - VOL32 unused_13e; - VOL32 unused_13f; - VOL32 TVO_CNTL; /* 0x140 */ - VOL32 unused_141[15]; - VOL32 unused_150; /* 0x150 */ - VOL32 CRT_HORZ_VERT_LOAD; /* 0x151 */ - VOL32 AGP_BASE; /* 0x152 */ - VOL32 AGP_CNTL; /* 0x153 */ - VOL32 SCALER_COLOUR_CNTL; /* 0x154 */ - VOL32 SCALER_H_COEFF0; /* 0x155 */ - VOL32 SCALER_H_COEFF1; /* 0x156 */ - VOL32 SCALER_H_COEFF2; /* 0x157 */ - VOL32 SCALER_H_COEFF3; /* 0x158 */ - VOL32 SCALER_H_COEFF4; /* 0x159 */ - VOL32 unused_15a; - VOL32 unused_15b; - VOL32 GUI_CMDFIFO_DEBUG; - VOL32 GUI_CMDFIFO_DATA; - VOL32 GUI_CNTL; - VOL32 unused_15f; - VOL32 BM_FRAME_BUF_OFFSET; /* 0x160 */ - VOL32 BM_SYSTEM_MEM_ADDR; - VOL32 BM_COMMAND; - VOL32 BM_STATUS; - VOL32 unused_164[10]; - VOL32 BM_GUI_TABLE; - VOL32 BM_SYSTEM_TABLE; - VOL32 unused_170[5]; /* 0x170 */ - VOL32 SCALER_BUF0_OFFSET_U; - VOL32 SCALER_BUF0_OFFSET_V; - VOL32 SCALER_BUF1_OFFSET_U; - VOL32 SCALER_BUF1_OFFSET_V; - VOL32 unused_179[7]; - VOL32 unused_180[16]; /* 0x180 */ - VOL32 setup_engine[0x40]; /* 0x190 */ - VOL32 dvd_subpicture[0x30]; /* 0x1d0 */ -} MediaReg; - -#define MACH64_XY(x,y) (((x) & 0x7fff) | (((y) & 0x7fff) << 16)) -#define MACH64_YX(x,y) (((y) & 0x7fff) | (((x) & 0x7fff) << 16)) - -typedef struct _mach64Save { - CARD32 LCD_GEN_CTRL; -} Mach64Save; - -typedef struct _mach64CardInfo { - VesaCardPrivRec vesa; - CARD8 *reg_base; - Reg *reg; - MediaReg *media_reg; - Mach64Save save; - Bool lcdEnabled; -} Mach64CardInfo; - -#define getMach64CardInfo(kd) ((Mach64CardInfo *) ((kd)->card->driver)) -#define mach64CardInfo(kd) Mach64CardInfo *mach64c = getMach64CardInfo(kd) - -typedef struct _mach64Cursor { - int width, height; - int xhot, yhot; - Bool has_cursor; - CursorPtr pCursor; - Pixel source, mask; -} Mach64Cursor; - -#define MACH64_CURSOR_WIDTH 64 -#define MACH64_CURSOR_HEIGHT 64 - -/* - * Xv information, optional - */ -typedef struct _mach64PortPriv { - CARD32 YBuf0Offset; - - CARD32 YBuf1Offset; - - CARD8 currentBuf; - - int brightness; - int saturation; - - RegionRec clip; - CARD32 colorKey; - - Bool videoOn; - Time offTime; - Time freeTime; - CARD32 size; - CARD32 offset; - KdOffscreenArea *off_screen; -} Mach64PortPrivRec, *Mach64PortPrivPtr; - -Bool mach64InitVideo(ScreenPtr pScreen); -void mach64FiniVideo(ScreenPtr pScreen); - -/* - * These values are per-format, which is essentially per-depth/per-bpp. - * Because bpp is fixed for the screen by depth, they're computed - * per-screen per-depth. - */ - -typedef struct _mach64ScreenInfo { - VesaScreenPrivRec vesa; - Mach64Cursor cursor; - CARD32 colorKey; - KdVideoAdaptorPtr pAdaptor; - KaaScreenInfoRec kaa; -} Mach64ScreenInfo; - -#define getMach64ScreenInfo(kd) ((Mach64ScreenInfo *) ((kd)->screen->driver)) -#define mach64ScreenInfo(kd) Mach64ScreenInfo *mach64s = getMach64ScreenInfo(kd) - -CARD32 -mach64ReadLCD (Reg *reg, int id); - -void -mach64WriteLCD (Reg *reg, int id, CARD32 data); - -void -mach64Preserve (KdCardInfo *card); - -Bool -mach64MapReg (KdCardInfo *card, Mach64CardInfo *mach64c); - -void -mach64UnmapReg (KdCardInfo *card, Mach64CardInfo *mach64c); - -void -mach64SetMMIO (KdCardInfo *card, Mach64CardInfo *mach64c); - -void -mach64ResetMMIO (KdCardInfo *card, Mach64CardInfo *mach64c); - -Bool -mach64Enable (ScreenPtr pScreen); - -void -mach64Disable (ScreenPtr pScreen); - -Bool -mach64DPMS (ScreenPtr pScreen, int mode); - -void -mach64WaitAvail(Reg *reg, int n); - -void -mach64WaitIdle (Reg *reg); - -Bool -mach64DrawSetup (ScreenPtr pScreen); - -Bool -mach64DrawInit (ScreenPtr pScreen); - -void -mach64DrawReinit (ScreenPtr pScreen); - -void -mach64DrawEnable (ScreenPtr pScreen); - -void -mach64DrawDisable (ScreenPtr pScreen); - -void -mach64DrawFini (ScreenPtr pScreen); - -CARD8 -mach64ReadIndex (Mach64CardInfo *mach64c, CARD16 port, CARD8 index); - -void -mach64WriteIndex (Mach64CardInfo *mach64c, CARD16 port, CARD8 index, CARD8 value); - -Bool -mach64CursorInit (ScreenPtr pScreen); - -void -mach64CursorEnable (ScreenPtr pScreen); - -void -mach64CursorDisable (ScreenPtr pScreen); - -void -mach64CursorFini (ScreenPtr pScreen); - -void -mach64RecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdef); - -extern KdCardFuncs mach64Funcs; - -#endif /* _MACH64_H_ */ diff --git a/hw/kdrive/mach64/mach64curs.c b/hw/kdrive/mach64/mach64curs.c deleted file mode 100644 index 4a5938162..000000000 --- a/hw/kdrive/mach64/mach64curs.c +++ /dev/null @@ -1,389 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "trident.h" -#include "cursorstr.h" - -#define SetupCursor(s) KdScreenPriv(s); \ - tridentCardInfo(pScreenPriv); \ - tridentScreenInfo(pScreenPriv); \ - TridentCursor *pCurPriv = &tridents->cursor - -static void -_tridentMoveCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor(pScreen); - CARD8 xlow, xhigh, ylow, yhigh; - CARD8 xoff, yoff; - - x -= pCurPriv->xhot; - xoff = 0; - if (x < 0) - { - xoff = -x; - x = 0; - } - y -= pCurPriv->yhot; - yoff = 0; - if (y < 0) - { - yoff = -y; - y = 0; - } - xlow = (CARD8) x; - xhigh = (CARD8) (x >> 8); - ylow = (CARD8) y; - yhigh = (CARD8) (y >> 8); - - - /* This is the recommended order to move the cursor */ - - tridentWriteIndex (tridentc, 0x3d4, 0x41, xhigh); - tridentWriteIndex (tridentc, 0x3d4, 0x40, xlow); - tridentWriteIndex (tridentc, 0x3d4, 0x42, ylow); - tridentWriteIndex (tridentc, 0x3d4, 0x46, xoff); - tridentWriteIndex (tridentc, 0x3d4, 0x47, yoff); - tridentWriteIndex (tridentc, 0x3d4, 0x43, yhigh); -} - -static void -tridentMoveCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor (pScreen); - - if (!pCurPriv->has_cursor) - return; - - if (!pScreenPriv->enabled) - return; - - _tridentMoveCursor (pScreen, x, y); -} - -static void -tridentAllocCursorColors (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - - KdAllocateCursorPixels (pScreen, 0, pCursor, - &pCurPriv->source, &pCurPriv->mask); - switch (pScreenPriv->screen->fb[0].bitsPerPixel) { - case 4: - pCurPriv->source |= pCurPriv->source << 4; - pCurPriv->mask |= pCurPriv->mask << 4; - case 8: - pCurPriv->source |= pCurPriv->source << 8; - pCurPriv->mask |= pCurPriv->mask << 8; - case 16: - pCurPriv->source |= pCurPriv->source << 16; - pCurPriv->mask |= pCurPriv->mask << 16; - } -} - -static void -tridentSetCursorColors (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - CARD32 fg, bg; - - fg = pCurPriv->source; - bg = pCurPriv->mask; - tridentWriteIndex (tridentc, 0x3d4, 0x48, fg); - tridentWriteIndex (tridentc, 0x3d4, 0x49, fg >> 8); - tridentWriteIndex (tridentc, 0x3d4, 0x4a, fg >> 16); - - tridentWriteIndex (tridentc, 0x3d4, 0x4c, bg); - tridentWriteIndex (tridentc, 0x3d4, 0x4d, bg >> 8); - tridentWriteIndex (tridentc, 0x3d4, 0x4e, bg >> 16); -} - -void -tridentRecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdef) -{ - SetupCursor (pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - xColorItem sourceColor, maskColor; - - if (!pCurPriv->has_cursor || !pCursor) - return; - - if (!pScreenPriv->enabled) - return; - - if (pdef) - { - while (ndef) - { - if (pdef->pixel == pCurPriv->source || - pdef->pixel == pCurPriv->mask) - break; - ndef--; - } - if (!ndef) - return; - } - tridentAllocCursorColors (pScreen); - tridentSetCursorColors (pScreen); -} - -#define InvertBits32(v) { \ - v = ((v & 0x55555555) << 1) | ((v >> 1) & 0x55555555); \ - v = ((v & 0x33333333) << 2) | ((v >> 2) & 0x33333333); \ - v = ((v & 0x0f0f0f0f) << 4) | ((v >> 4) & 0x0f0f0f0f); \ -} - -static void -tridentLoadCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor(pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - CursorBitsPtr bits = pCursor->bits; - int w, h; - CARD32 *ram, *msk, *mskLine, *src, *srcLine; - int i, j; - int cursor_address; - int lwsrc; - unsigned char ramdac_control_; - CARD32 offset; - - /* - * Allocate new colors - */ - tridentAllocCursorColors (pScreen); - - pCurPriv->pCursor = pCursor; - pCurPriv->xhot = pCursor->bits->xhot; - pCurPriv->yhot = pCursor->bits->yhot; - - /* - * Stick new image into cursor memory - */ - ram = (CARD32 *) tridents->cursor_base; - mskLine = (CARD32 *) bits->mask; - srcLine = (CARD32 *) bits->source; - - h = bits->height; - if (h > TRIDENT_CURSOR_HEIGHT) - h = TRIDENT_CURSOR_HEIGHT; - - lwsrc = BitmapBytePad(bits->width) / 4; /* words per line */ - - for (i = 0; i < TRIDENT_CURSOR_HEIGHT; i++) { - msk = mskLine; - src = srcLine; - mskLine += lwsrc; - srcLine += lwsrc; - for (j = 0; j < TRIDENT_CURSOR_WIDTH / 32; j++) { - - CARD32 m, s; - -#if 1 - if (i < h && j < lwsrc) - { - m = *msk++; - s = *src++; - InvertBits32(m); - InvertBits32(s); - } - else - { - m = 0; - s = 0; - } -#endif - *ram++ = m; - *ram++ = s; - } - } - - /* Set address for cursor bits */ - offset = tridents->cursor_base - (CARD8 *) tridents->screen; - offset >>= 10; - tridentWriteIndex (tridentc, 0x3d4, 0x44, (CARD8) (offset & 0xff)); - tridentWriteIndex (tridentc, 0x3d4, 0x45, (CARD8) (offset >> 8)); - - /* Set new color */ - tridentSetCursorColors (pScreen); - - /* Enable the cursor */ - tridentWriteIndex (tridentc, 0x3d4, 0x50, 0xc1); - - /* Move to new position */ - tridentMoveCursor (pScreen, x, y); -} - -static void -tridentUnloadCursor (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - /* Disable cursor */ - tridentWriteIndex (tridentc, 0x3d4, 0x50, 0); -} - -static Bool -tridentRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) -{ - SetupCursor(pScreen); - - if (!pScreenPriv->enabled) - return TRUE; - - /* miRecolorCursor does this */ - if (pCurPriv->pCursor == pCursor) - { - if (pCursor) - { - int x, y; - - miPointerPosition (&x, &y); - tridentLoadCursor (pScreen, x, y); - } - } - return TRUE; -} - -static Bool -tridentUnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) -{ - return TRUE; -} - -static void -tridentSetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y) -{ - SetupCursor(pScreen); - - pCurPriv->pCursor = pCursor; - - if (!pScreenPriv->enabled) - return; - - if (pCursor) - tridentLoadCursor (pScreen, x, y); - else - tridentUnloadCursor (pScreen); -} - -miPointerSpriteFuncRec tridentPointerSpriteFuncs = { - tridentRealizeCursor, - tridentUnrealizeCursor, - tridentSetCursor, - tridentMoveCursor, -}; - -static void -tridentQueryBestSize (int class, - unsigned short *pwidth, unsigned short *pheight, - ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - switch (class) - { - case CursorShape: - if (*pwidth > pCurPriv->width) - *pwidth = pCurPriv->width; - if (*pheight > pCurPriv->height) - *pheight = pCurPriv->height; - if (*pwidth > pScreen->width) - *pwidth = pScreen->width; - if (*pheight > pScreen->height) - *pheight = pScreen->height; - break; - default: - fbQueryBestSize (class, pwidth, pheight, pScreen); - break; - } -} - -Bool -tridentCursorInit (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (!tridents->cursor_base) - { - pCurPriv->has_cursor = FALSE; - return FALSE; - } - - pCurPriv->width = TRIDENT_CURSOR_WIDTH; - pCurPriv->height= TRIDENT_CURSOR_HEIGHT; - pScreen->QueryBestSize = tridentQueryBestSize; - miPointerInitialize (pScreen, - &tridentPointerSpriteFuncs, - &kdPointerScreenFuncs, - FALSE); - pCurPriv->has_cursor = TRUE; - pCurPriv->pCursor = NULL; - return TRUE; -} - -void -tridentCursorEnable (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (pCurPriv->has_cursor) - { - if (pCurPriv->pCursor) - { - int x, y; - - miPointerPosition (&x, &y); - tridentLoadCursor (pScreen, x, y); - } - else - tridentUnloadCursor (pScreen); - } -} - -void -tridentCursorDisable (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (!pScreenPriv->enabled) - return; - - if (pCurPriv->has_cursor) - { - if (pCurPriv->pCursor) - { - tridentUnloadCursor (pScreen); - } - } -} - -void -tridentCursorFini (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - pCurPriv->pCursor = NULL; -} diff --git a/hw/kdrive/mach64/mach64draw.c b/hw/kdrive/mach64/mach64draw.c deleted file mode 100644 index 15d4d417a..000000000 --- a/hw/kdrive/mach64/mach64draw.c +++ /dev/null @@ -1,590 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "mach64.h" -#include "mach64draw.h" - -#include -#include "gcstruct.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "regionstr.h" -#include "mistruct.h" -#include "dixfontstr.h" -#include "fb.h" -#include "migc.h" -#include "miline.h" -#include "picturestr.h" -#include "kaa.h" - -CARD8 mach64Rop[16] = { - /* GXclear */ 0x01, /* 0 */ - /* GXand */ 0x0c, /* src AND dst */ - /* GXandReverse */ 0x0d, /* src AND NOT dst */ - /* GXcopy */ 0x07, /* src */ - /* GXandInverted*/ 0x0e, /* NOT src AND dst */ - /* GXnoop */ 0x03, /* dst */ - /* GXxor */ 0x05, /* src XOR dst */ - /* GXor */ 0x0b, /* src OR dst */ - /* GXnor */ 0x0f, /* NOT src AND NOT dst */ - /* GXequiv */ 0x06, /* NOT src XOR dst */ - /* GXinvert */ 0x00, /* NOT dst */ - /* GXorReverse */ 0x0a, /* src OR NOT dst */ - /* GXcopyInverted*/ 0x04, /* NOT src */ - /* GXorInverted */ 0x09, /* NOT src OR dst */ - /* GXnand */ 0x08, /* NOT src OR NOT dst */ - /* GXset */ 0x02, /* 1 */ -}; - -#define MACH64_DRAW_COMBO_SOLID 0x1 -#define MACH64_DRAW_COMBO_COPY 0x8 - -#define SYNC_ALWAYS 0 -static Reg *reg; -static CARD32 avail; -static CARD32 triple; - -#define IDX(reg,n) (&(reg)->n - &(reg)->CRTC_H_TOTAL_DISP) - -void -mach64WaitAvail(Reg *reg, int n) -{ - if (avail < n) - { - while ((avail = ((reg->GUI_STAT) >> 16) & 0x3ff) < n) - ; - } - avail -= n; -} - -void -mach64WaitIdle (Reg *reg) -{ - while (reg->GUI_STAT & 1) - ; -} - -#define PIX_FORMAT_MONO 0 -#define PIX_FORMAT_PSEUDO_8 2 -#define PIX_FORMAT_TRUE_1555 3 -#define PIX_FORMAT_TRUE_565 4 -#define PIX_FORMAT_TRUE_8888 6 -#define PIX_FORMAT_TRUE_332 7 -#define PIX_FORMAT_GRAY_8 8 -#define PIX_FORMAT_YUV_422 0xb -#define PIX_FORMAT_YUV_444 0xe -#define PIX_FORMAT_TRUE_4444 0xf - -typedef struct _mach64AccelReg { - int depth; - int bitsPerPixel; - CARD32 DP_PIX_WIDTH; - CARD32 DP_SET_GUI_ENGINE; -} Mach64AccelReg; - -static const Mach64AccelReg mach64AccelReg[] = { - { 1, 1, - /* DP_PIX_WIDTH */ - ((PIX_FORMAT_MONO << 0) | /* DP_DST_PIX_WIDTH */ - (PIX_FORMAT_MONO << 4) | /* COMPOSITE_PIX_WIDTH */ - (PIX_FORMAT_MONO << 8) | /* DP_SRC_PIX_WIDTH */ - (0 << 13) | /* DP_HOST_TRIPLE_EN */ - (0 << 14) | /* DP_PALETTE_TYPE */ - (PIX_FORMAT_MONO << 16) | /* DP_HOST_PIX_WIDTH */ - (0 << 20) | /* DP_C14_RGB_INDEX */ - (0 << 24) | /* DP_BYTE_PIX_ORDER */ - (0 << 25) | /* DP_CONVERSION_TEMP */ - (0 << 26) | /* DP_C14_RGB_LOW_NIBBLE */ - (0 << 27) | /* DP_C14_RGB_HIGH_NIBBLE */ - (PIX_FORMAT_MONO << 28) | /* DP_SCALE_PIX_WIDTH */ - 0), - /* DP_SET_GUI_ENGINE */ - ((PIX_FORMAT_MONO << 3) | - (1 << 6) | /* SET_DP_SRC_PIX_WIDTH */ - (6 << 7) | /* SET_DST_OFFSET */ - (0 << 10) | /* SET_DST_PITCH */ - (0 << 14) | /* SET_DST_PITCH_BY_2 */ - (0 << 15) | /* SET_SRC_OFFPITCH_COPY */ - (0 << 16) | /* SET_SRC_HGTWID1_2 */ - (0 << 20) | /* SET_DRAWING_COMBO */ - (1 << 24) | /* SET_BUS_MASTER_OP */ - (0 << 26) | /* SET_BUS_MASTER_EN */ - (0 << 27) | /* SET_BUS_MASTER_SYNC */ - (0 << 28) | /* DP_HOST_TRIPLE_EN */ - (0 << 29) | /* FAST_FILL_EN */ - (0 << 30) | /* BLOCK_WRITE_EN */ - 0) - }, - { 8, 8, - /* DP_PIX_WIDTH */ - ((PIX_FORMAT_PSEUDO_8 << 0) | /* DP_DST_PIX_WIDTH */ - (PIX_FORMAT_PSEUDO_8 << 4) | /* COMPOSITE_PIX_WIDTH */ - (PIX_FORMAT_PSEUDO_8 << 8) | /* DP_SRC_PIX_WIDTH */ - (0 << 13) | /* DP_HOST_TRIPLE_EN */ - (0 << 14) | /* DP_PALETTE_TYPE */ - (PIX_FORMAT_PSEUDO_8 << 16) | /* DP_HOST_PIX_WIDTH */ - (0 << 20) | /* DP_C14_RGB_INDEX */ - (0 << 24) | /* DP_BYTE_PIX_ORDER */ - (0 << 25) | /* DP_CONVERSION_TEMP */ - (0 << 26) | /* DP_C14_RGB_LOW_NIBBLE */ - (0 << 27) | /* DP_C14_RGB_HIGH_NIBBLE */ - (PIX_FORMAT_PSEUDO_8 << 28) | /* DP_SCALE_PIX_WIDTH */ - 0), - /* DP_SET_GUI_ENGINE */ - ((PIX_FORMAT_PSEUDO_8 << 3) | - (1 << 6) | /* SET_DP_SRC_PIX_WIDTH */ - (6 << 7) | /* SET_DST_OFFSET */ - (0 << 10) | /* SET_DST_PITCH */ - (0 << 14) | /* SET_DST_PITCH_BY_2 */ - (0 << 15) | /* SET_SRC_OFFPITCH_COPY */ - (0 << 16) | /* SET_SRC_HGTWID1_2 */ - (0 << 20) | /* SET_DRAWING_COMBO */ - (1 << 24) | /* SET_BUS_MASTER_OP */ - (0 << 26) | /* SET_BUS_MASTER_EN */ - (0 << 27) | /* SET_BUS_MASTER_SYNC */ - (0 << 28) | /* DP_HOST_TRIPLE_EN */ - (0 << 29) | /* FAST_FILL_EN */ - (0 << 30) | /* BLOCK_WRITE_EN */ - 0) - }, - { 15, 16, - /* DP_PIX_WIDTH */ - ((PIX_FORMAT_TRUE_1555 << 0) | /* DP_DST_PIX_WIDTH */ - (PIX_FORMAT_TRUE_1555 << 4) | /* COMPOSITE_PIX_WIDTH */ - (PIX_FORMAT_TRUE_1555 << 8) | /* DP_SRC_PIX_WIDTH */ - (0 << 13) | /* DP_HOST_TRIPLE_EN */ - (0 << 14) | /* DP_PALETTE_TYPE */ - (PIX_FORMAT_TRUE_1555 << 16) | /* DP_HOST_PIX_WIDTH */ - (0 << 20) | /* DP_C14_RGB_INDEX */ - (0 << 24) | /* DP_BYTE_PIX_ORDER */ - (0 << 25) | /* DP_CONVERSION_TEMP */ - (0 << 26) | /* DP_C14_RGB_LOW_NIBBLE */ - (0 << 27) | /* DP_C14_RGB_HIGH_NIBBLE */ - (PIX_FORMAT_TRUE_1555 << 28) | /* DP_SCALE_PIX_WIDTH */ - 0), - /* DP_SET_GUI_ENGINE */ - ((PIX_FORMAT_TRUE_1555 << 3) | - (1 << 6) | /* SET_DP_SRC_PIX_WIDTH */ - (6 << 7) | /* SET_DST_OFFSET */ - (0 << 10) | /* SET_DST_PITCH */ - (0 << 14) | /* SET_DST_PITCH_BY_2 */ - (0 << 15) | /* SET_SRC_OFFPITCH_COPY */ - (0 << 16) | /* SET_SRC_HGTWID1_2 */ - (0 << 20) | /* SET_DRAWING_COMBO */ - (1 << 24) | /* SET_BUS_MASTER_OP */ - (0 << 26) | /* SET_BUS_MASTER_EN */ - (0 << 27) | /* SET_BUS_MASTER_SYNC */ - (0 << 28) | /* DP_HOST_TRIPLE_EN */ - (0 << 29) | /* FAST_FILL_EN */ - (0 << 30) | /* BLOCK_WRITE_EN */ - 0) - }, - { 16, 16, - /* DP_PIX_WIDTH */ - ((PIX_FORMAT_TRUE_565 << 0) | /* DP_DST_PIX_WIDTH */ - (PIX_FORMAT_TRUE_565 << 4) | /* COMPOSITE_PIX_WIDTH */ - (PIX_FORMAT_TRUE_565 << 8) | /* DP_SRC_PIX_WIDTH */ - (0 << 13) | /* DP_HOST_TRIPLE_EN */ - (0 << 14) | /* DP_PALETTE_TYPE */ - (PIX_FORMAT_TRUE_565 << 16) | /* DP_HOST_PIX_WIDTH */ - (0 << 20) | /* DP_C14_RGB_INDEX */ - (0 << 24) | /* DP_BYTE_PIX_ORDER */ - (0 << 25) | /* DP_CONVERSION_TEMP */ - (0 << 26) | /* DP_C14_RGB_LOW_NIBBLE */ - (0 << 27) | /* DP_C14_RGB_HIGH_NIBBLE */ - (PIX_FORMAT_TRUE_565 << 28) | /* DP_SCALE_PIX_WIDTH */ - 0), - /* DP_SET_GUI_ENGINE */ - ((PIX_FORMAT_TRUE_565 << 3) | - (1 << 6) | /* SET_DP_SRC_PIX_WIDTH */ - (6 << 7) | /* SET_DST_OFFSET */ - (0 << 10) | /* SET_DST_PITCH */ - (0 << 14) | /* SET_DST_PITCH_BY_2 */ - (0 << 15) | /* SET_SRC_OFFPITCH_COPY */ - (0 << 16) | /* SET_SRC_HGTWID1_2 */ - (0 << 20) | /* SET_DRAWING_COMBO */ - (1 << 24) | /* SET_BUS_MASTER_OP */ - (0 << 26) | /* SET_BUS_MASTER_EN */ - (0 << 27) | /* SET_BUS_MASTER_SYNC */ - (0 << 28) | /* DP_HOST_TRIPLE_EN */ - (0 << 29) | /* FAST_FILL_EN */ - (0 << 30) | /* BLOCK_WRITE_EN */ - 0) - }, - { 24, 24, - /* DP_PIX_WIDTH */ - ((PIX_FORMAT_PSEUDO_8 << 0) | /* DP_DST_PIX_WIDTH */ - (PIX_FORMAT_PSEUDO_8 << 4) | /* COMPOSITE_PIX_WIDTH */ - (PIX_FORMAT_PSEUDO_8 << 8) | /* DP_SRC_PIX_WIDTH */ - (0 << 13) | /* DP_HOST_TRIPLE_EN */ - (0 << 14) | /* DP_PALETTE_TYPE */ - (PIX_FORMAT_PSEUDO_8 << 16) | /* DP_HOST_PIX_WIDTH */ - (0 << 20) | /* DP_C14_RGB_INDEX */ - (0 << 24) | /* DP_BYTE_PIX_ORDER */ - (0 << 25) | /* DP_CONVERSION_TEMP */ - (0 << 26) | /* DP_C14_RGB_LOW_NIBBLE */ - (0 << 27) | /* DP_C14_RGB_HIGH_NIBBLE */ - (PIX_FORMAT_PSEUDO_8 << 28) | /* DP_SCALE_PIX_WIDTH */ - 0), - /* DP_SET_GUI_ENGINE */ - ((PIX_FORMAT_PSEUDO_8 << 3) | - (1 << 6) | /* SET_DP_SRC_PIX_WIDTH */ - (6 << 7) | /* SET_DST_OFFSET */ - (0 << 10) | /* SET_DST_PITCH */ - (0 << 14) | /* SET_DST_PITCH_BY_2 */ - (0 << 15) | /* SET_SRC_OFFPITCH_COPY */ - (0 << 16) | /* SET_SRC_HGTWID1_2 */ - (0 << 20) | /* SET_DRAWING_COMBO */ - (1 << 24) | /* SET_BUS_MASTER_OP */ - (0 << 26) | /* SET_BUS_MASTER_EN */ - (0 << 27) | /* SET_BUS_MASTER_SYNC */ - (0 << 28) | /* DP_HOST_TRIPLE_EN */ - (0 << 29) | /* FAST_FILL_EN */ - (0 << 30) | /* BLOCK_WRITE_EN */ - 0) - }, - { 24, 32, - /* DP_PIX_WIDTH */ - ((PIX_FORMAT_TRUE_8888 << 0) | /* DP_DST_PIX_WIDTH */ - (PIX_FORMAT_TRUE_8888 << 4) | /* COMPOSITE_PIX_WIDTH */ - (PIX_FORMAT_TRUE_8888 << 8) | /* DP_SRC_PIX_WIDTH */ - (0 << 13) | /* DP_HOST_TRIPLE_EN */ - (0 << 14) | /* DP_PALETTE_TYPE */ - (PIX_FORMAT_TRUE_8888 << 16) | /* DP_HOST_PIX_WIDTH */ - (0 << 20) | /* DP_C14_RGB_INDEX */ - (0 << 24) | /* DP_BYTE_PIX_ORDER */ - (0 << 25) | /* DP_CONVERSION_TEMP */ - (0 << 26) | /* DP_C14_RGB_LOW_NIBBLE */ - (0 << 27) | /* DP_C14_RGB_HIGH_NIBBLE */ - (PIX_FORMAT_TRUE_8888 << 28) | /* DP_SCALE_PIX_WIDTH */ - 0), - /* DP_SET_GUI_ENGINE */ - ((PIX_FORMAT_TRUE_8888 << 3) | - (1 << 6) | /* SET_DP_SRC_PIX_WIDTH */ - (6 << 7) | /* SET_DST_OFFSET */ - (0 << 10) | /* SET_DST_PITCH */ - (0 << 14) | /* SET_DST_PITCH_BY_2 */ - (0 << 15) | /* SET_SRC_OFFPITCH_COPY */ - (0 << 16) | /* SET_SRC_HGTWID1_2 */ - (0 << 20) | /* SET_DRAWING_COMBO */ - (1 << 24) | /* SET_BUS_MASTER_OP */ - (0 << 26) | /* SET_BUS_MASTER_EN */ - (0 << 27) | /* SET_BUS_MASTER_SYNC */ - (0 << 28) | /* DP_HOST_TRIPLE_EN */ - (0 << 29) | /* FAST_FILL_EN */ - (0 << 30) | /* BLOCK_WRITE_EN */ - 0) - }, - { 32, 32, - /* DP_PIX_WIDTH */ - ((PIX_FORMAT_TRUE_8888 << 0) | /* DP_DST_PIX_WIDTH */ - (PIX_FORMAT_TRUE_8888 << 4) | /* COMPOSITE_PIX_WIDTH */ - (PIX_FORMAT_TRUE_8888 << 8) | /* DP_SRC_PIX_WIDTH */ - (0 << 13) | /* DP_HOST_TRIPLE_EN */ - (0 << 14) | /* DP_PALETTE_TYPE */ - (PIX_FORMAT_TRUE_8888 << 16) | /* DP_HOST_PIX_WIDTH */ - (0 << 20) | /* DP_C14_RGB_INDEX */ - (0 << 24) | /* DP_BYTE_PIX_ORDER */ - (0 << 25) | /* DP_CONVERSION_TEMP */ - (0 << 26) | /* DP_C14_RGB_LOW_NIBBLE */ - (0 << 27) | /* DP_C14_RGB_HIGH_NIBBLE */ - (PIX_FORMAT_TRUE_8888 << 28) | /* DP_SCALE_PIX_WIDTH */ - 0), - /* DP_SET_GUI_ENGINE */ - ((PIX_FORMAT_TRUE_8888 << 3) | - (1 << 6) | /* SET_DP_SRC_PIX_WIDTH */ - (6 << 7) | /* SET_DST_OFFSET */ - (0 << 10) | /* SET_DST_PITCH */ - (0 << 14) | /* SET_DST_PITCH_BY_2 */ - (0 << 15) | /* SET_SRC_OFFPITCH_COPY */ - (0 << 16) | /* SET_SRC_HGTWID1_2 */ - (0 << 20) | /* SET_DRAWING_COMBO */ - (1 << 24) | /* SET_BUS_MASTER_OP */ - (0 << 26) | /* SET_BUS_MASTER_EN */ - (0 << 27) | /* SET_BUS_MASTER_SYNC */ - (0 << 28) | /* DP_HOST_TRIPLE_EN */ - (0 << 29) | /* FAST_FILL_EN */ - (0 << 30) | /* BLOCK_WRITE_EN */ - 0) - } -}; - -#define NACCELREG (sizeof mach64AccelReg / sizeof mach64AccelReg[0]) - -static void -mach64WaitMarker (ScreenPtr pScreen, int marker) -{ - KdScreenPriv(pScreen); - mach64CardInfo(pScreenPriv); - reg = mach64c->reg; - - mach64WaitIdle (reg); -} - -static Bool -mach64Setup (PixmapPtr pDst, PixmapPtr pSrc, CARD32 combo, int wait) -{ - ScreenPtr pScreen = pDst->drawable.pScreen; - KdScreenPriv(pScreen); - mach64CardInfo(pScreenPriv); - CARD32 DST_PITCH; - CARD32 DST_OFFSET; - CARD32 SRC_PITCH; - CARD32 SRC_OFFSET; - CARD32 DP_PIX_WIDTH; - CARD32 DP_SET_GUI_ENGINE; - int i; - - for (i = 0; i < NACCELREG; i++) - if (mach64AccelReg[i].depth == pDst->drawable.depth && - mach64AccelReg[i].bitsPerPixel == pDst->drawable.bitsPerPixel) - break; - if (i == NACCELREG) - return FALSE; - DP_PIX_WIDTH = mach64AccelReg[i].DP_PIX_WIDTH; - DP_SET_GUI_ENGINE = mach64AccelReg[i].DP_SET_GUI_ENGINE; - - reg = mach64c->reg; - if (!reg) - return FALSE; - - triple = (pDst->drawable.bitsPerPixel == 24); - - if (triple) - { - /* bytes / 8 = bytes >> 3 */ - DST_PITCH = pDst->devKind >> 3; - } - else - { - /* pixels / 8 = ((bytes * 8) / bpp) / 8 = bytes / bpp */ - DST_PITCH = pDst->devKind / pDst->drawable.bitsPerPixel; - } - - /* bytes / 8 */ - DST_OFFSET = ((CARD8 *) pDst->devPrivate.ptr - pScreenPriv->screen->memory_base) >> 3; - - mach64WaitAvail(reg, wait + (pSrc ? 5 : 4)); - reg->DP_SET_GUI_ENGINE = DP_SET_GUI_ENGINE | (combo << 20); - reg->DP_PIX_WIDTH = DP_PIX_WIDTH; - reg->DST_OFF_PITCH = ((DST_OFFSET << 0) | /* USR1_DST_OFFSET */ - (DST_PITCH << 22) | /* USR1_DST_PITCH */ - 0); - if (pSrc) - { - if (triple) - { - SRC_PITCH = pSrc->devKind >> 3; - } - else - { - /* pixels / 8 = ((bytes * 8) / bpp) / 8 = bytes / bpp */ - SRC_PITCH = pSrc->devKind / pSrc->drawable.bitsPerPixel; - } - /* bytes / 8 */ - SRC_OFFSET = ((CARD8 *) pSrc->devPrivate.ptr - pScreenPriv->screen->memory_base) >> 3; - - reg->SRC_OFF_PITCH = ((SRC_OFFSET << 0) | - (SRC_PITCH << 22) | - 0); - } - return TRUE; -} - -static Bool -mach64PrepareSolid (PixmapPtr pPixmap, - int alu, - Pixel pm, - Pixel fg) -{ - if (!mach64Setup (pPixmap, 0, 1, 3)) - return FALSE; - reg->DP_MIX = (mach64Rop[alu] << 16) | 0; - reg->DP_WRITE_MSK = pm; - reg->DP_FRGD_CLR = fg; - return TRUE; -} - -static void -mach64Solid (int x1, int y1, int x2, int y2) -{ - if (triple) - { - CARD32 traj; - - x1 *= 3; - x2 *= 3; - - traj = (DST_X_DIR | - DST_Y_DIR | - DST_24_ROT_EN | - DST_24_ROT((x1 / 4) % 6)); - mach64WaitAvail (reg, 1); - reg->GUI_TRAJ_CNTL = traj; - } - mach64WaitAvail(reg,2); - reg->DST_X_Y = MACH64_XY(x1,y1); - reg->DST_WIDTH_HEIGHT = MACH64_XY(x2-x1,y2-y1); -} - -static void -mach64DoneSolid (void) -{ -#if SYNC_ALWAYS - mach64WaitIdle (reg); -#endif -} - -static int copyDx; -static int copyDy; -static CARD32 copyCombo; - -static Bool -mach64PrepareCopy (PixmapPtr pSrcPixmap, - PixmapPtr pDstPixmap, - int dx, - int dy, - int alu, - Pixel pm) -{ - copyCombo = 8 | 2 | 1; - copyDx = dx; - copyDy = dy; - - /* - * Avoid going backwards when copying pixmaps to the screen. - * This should reduce tearing somewhat - */ - if (pSrcPixmap == pDstPixmap) - { - if (dx <= 0) - copyCombo &= ~1; - if (dy <= 0) - copyCombo &= ~2; - } - - if (!mach64Setup (pDstPixmap, pSrcPixmap, copyCombo, 2)) - return FALSE; - - reg->DP_MIX = (mach64Rop[alu] << 16) | 0; - reg->DP_WRITE_MSK = pm; - return TRUE; -} - -static void -mach64Copy (int srcX, - int srcY, - int dstX, - int dstY, - int w, - int h) -{ - if (triple) - { - CARD32 traj; - - srcX *= 3; - dstX *= 3; - w *= 3; - - traj = DST_24_ROT_EN | DST_24_ROT((dstX / 4) % 6); - - if (copyCombo & 1) - traj |= 1; - if (copyCombo & 2) - traj |= 2; - - mach64WaitAvail (reg, 1); - reg->GUI_TRAJ_CNTL = traj; - } - if ((copyCombo & 1) == 0) - { - srcX += w - 1; - dstX += w - 1; - } - if ((copyCombo & 2) == 0) - { - srcY += h - 1; - dstY += h - 1; - } - mach64WaitAvail (reg, 4); - reg->SRC_Y_X = MACH64_YX(srcX, srcY); - reg->SRC_WIDTH1 = w; - reg->DST_Y_X = MACH64_YX(dstX, dstY); - reg->DST_HEIGHT_WIDTH = MACH64_YX(w,h); -} - -static void -mach64DoneCopy (void) -{ -#if SYNC_ALWAYS - mach64WaitIdle (reg); -#endif -} - - -Bool -mach64DrawInit (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - mach64ScreenInfo(pScreenPriv); - - memset(&mach64s->kaa, 0, sizeof(KaaScreenInfoRec)); - mach64s->kaa.waitMarker = mach64WaitMarker; - mach64s->kaa.PrepareSolid = mach64PrepareSolid; - mach64s->kaa.Solid = mach64Solid; - mach64s->kaa.DoneSolid = mach64DoneSolid; - mach64s->kaa.PrepareCopy = mach64PrepareCopy; - mach64s->kaa.Copy = mach64Copy; - mach64s->kaa.DoneCopy = mach64DoneCopy; - mach64s->kaa.offsetAlign = 64; - mach64s->kaa.pitchAlign = 64; - mach64s->kaa.flags = KAA_OFFSCREEN_PIXMAPS; - - if (pScreenPriv->screen->fb[0].depth == 4) - return FALSE; - - if (!kaaDrawInit (pScreen, &mach64s->kaa)) - return FALSE; - - return TRUE; -} - -void -mach64DrawEnable (ScreenPtr pScreen) -{ - kaaMarkSync (pScreen); -} - -void -mach64DrawDisable (ScreenPtr pScreen) -{ -} - -void -mach64DrawFini (ScreenPtr pScreen) -{ - kaaDrawFini (pScreen); -} diff --git a/hw/kdrive/mach64/mach64draw.h b/hw/kdrive/mach64/mach64draw.h deleted file mode 100644 index bac11c2a6..000000000 --- a/hw/kdrive/mach64/mach64draw.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _TRIDENTDRAW_H_ -#define _TRIDENTDRAW_H_ - -#define SetupTrident(s) KdScreenPriv(s); \ - tridentCardInfo(pScreenPriv); \ - Cop *cop = tridentc->cop - -#define TridentAlpha (COP_MULTI_ALPHA|COP_ALPHA_WRITE_ENABLE) - -#define _tridentInit(cop,tridentc) { \ - if ((cop)->status == 0xffffffff) tridentSetMMIO(tridentc); \ - (cop)->multi = (tridentc)->cop_depth; \ - (cop)->multi = (tridentc)->cop_stride; \ - (cop)->multi = TridentAlpha; \ -} \ - -#define _tridentSetSolidRect(cop,pix,alu,cmd) {\ - cop->multi = COP_MULTI_PATTERN; \ - cop->multi = COP_MULTI_ROP | tridentRop[alu]; \ - cop->fg = (pix); \ - cmd = COP_OP_BLT | COP_SCL_OPAQUE | COP_OP_ROP | COP_OP_FG; \ -} - -#define _tridentRect(cop,x1,y1,x2,y2,cmd) { \ - (cop)->dst_start_xy = TRI_XY (x1,y1); \ - (cop)->dst_end_xy = TRI_XY(x2,y2); \ - _tridentWaitDone(cop); \ - (cop)->command = (cmd); \ -} - -#define COP_STATUS_BUSY (COP_STATUS_BE_BUSY | \ - COP_STATUS_DPE_BUSY | \ - COP_STATUS_MI_BUSY) - -#define _tridentWaitDone(cop) { \ - int __q__ = 500000; \ - while (__q__-- && (cop)->status & COP_STATUS_BUSY) \ - ; \ - if (!__q__) \ - (cop)->status = 0; \ -} - -#define _tridentWaitIdleEmpty(cop) _tridentWaitDone(cop) - -#define sourceInvarient(alu) (((alu) & 3) == (((alu) >> 2) & 3)) - -#endif diff --git a/hw/kdrive/mach64/mach64stub.c b/hw/kdrive/mach64/mach64stub.c deleted file mode 100644 index 5895a3cb7..000000000 --- a/hw/kdrive/mach64/mach64stub.c +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "mach64.h" -#include - -void -InitCard (char *name) -{ - KdCardAttr attr; - - if (LinuxFindPci (0x1002, 0x4750, 0, &attr)) - KdCardInfoAdd (&mach64Funcs, &attr, 0); - else if (LinuxFindPci (0x1002, 0x4c42, 0, &attr)) - KdCardInfoAdd (&mach64Funcs, &attr, 0); - else if (LinuxFindPci (0x1002, 0x4c46, 0, &attr)) - KdCardInfoAdd (&mach64Funcs, &attr, 0); - else if (LinuxFindPci (0x1002, 0x4c49, 0, &attr)) - KdCardInfoAdd (&mach64Funcs, &attr, 0); - else if (LinuxFindPci (0x1002, 0x4c4d, 0, &attr)) - KdCardInfoAdd (&mach64Funcs, &attr, 0); -} - -void -InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) -{ - KdInitOutput (pScreenInfo, argc, argv); -} - -void -InitInput (int argc, char **argv) -{ - KdOsAddInputDrivers (); - KdInitInput (); -} - -void -ddxUseMsg (void) -{ - KdUseMsg(); - vesaUseMsg(); -} - -int -ddxProcessArgument (int argc, char **argv, int i) -{ - int ret; - - if (!(ret = vesaProcessArgument (argc, argv, i))) - ret = KdProcessArgument(argc, argv, i); - return ret; -} diff --git a/hw/kdrive/mach64/mach64video.c b/hw/kdrive/mach64/mach64video.c deleted file mode 100644 index 38fcef7eb..000000000 --- a/hw/kdrive/mach64/mach64video.c +++ /dev/null @@ -1,994 +0,0 @@ -/* - * Copyright © 2001 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -#ifdef HAVE_CONFIG_H -#include -#endif -#include "mach64.h" - -#include -#include "fourcc.h" - -#define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE) - -static Atom xvBrightness, xvSaturation, xvColorKey; - -#define IMAGE_MAX_WIDTH 720 -#define IMAGE_MAX_HEIGHT 576 - -static void -mach64StopVideo(KdScreenInfo *screen, pointer data, Bool exit) -{ - ScreenPtr pScreen = screen->pScreen; - KdScreenPriv(pScreen); - KdCardInfo *card = pScreenPriv->card; - Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver; - Mach64CardInfo *mach64c = (Mach64CardInfo *) card->driver; - Mach64PortPrivPtr pPortPriv = mach64s->pAdaptor->pPortPrivates[0].ptr; - Reg *reg = mach64c->reg; - MediaReg *media = mach64c->media_reg; - - REGION_EMPTY(screen->pScreen, &pPortPriv->clip); - - if (!media) - return; - - if(pPortPriv->videoOn) - { - mach64WaitIdle (reg); - /* wait for buffer to be displayed */ - while (((media->TRIG_CNTL >> 5) & 1) != pPortPriv->currentBuf) - ; - /* wait for buffer to be finished */ - while (((media->TRIG_CNTL >> 6) & 1) != 0) - ; - mach64WaitAvail (reg, 1); - media->OVERLAY_SCALE_CNTL = 0; - pPortPriv->videoOn = FALSE; - mach64WaitIdle (reg); - } - if (pPortPriv->off_screen) - { - KdOffscreenFree (pScreen, pPortPriv->off_screen); - pPortPriv->off_screen = 0; - } -} - -static int -mach64SetPortAttribute(KdScreenInfo *screen, - Atom attribute, - int value, - pointer data) -{ - Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver; - Mach64PortPrivPtr pPortPriv = mach64s->pAdaptor->pPortPrivates[0].ptr; - - if(attribute == xvBrightness) - { - if(value < -1000) - value = -1000; - if (value > 1000) - value = 1000; - pPortPriv->brightness = value; - } - else if(attribute == xvSaturation) - { - if (value < -1000) - value = -1000; - if (value > 1000) - value = 1000; - pPortPriv->saturation = value; - } - else if(attribute == xvColorKey) - { - if (pPortPriv->colorKey != value) - { - pPortPriv->colorKey = value; - REGION_EMPTY(screen->pScreen, &pPortPriv->clip); - } - } - else - return BadMatch; - - return Success; -} - -static int -mach64GetPortAttribute(KdScreenInfo *screen, - Atom attribute, - int *value, - pointer data) -{ - Mach64PortPrivPtr pPortPriv = (Mach64PortPrivPtr)data; - - if(attribute == xvBrightness) - *value = pPortPriv->brightness; - else if(attribute == xvSaturation) - *value = pPortPriv->saturation; - else if(attribute == xvColorKey) - *value = pPortPriv->colorKey; - else - return BadMatch; - - return Success; -} - -static void -mach64QueryBestSize(KdScreenInfo *screen, - Bool motion, - short vid_w, - short vid_h, - short drw_w, - short drw_h, - unsigned int *p_w, - unsigned int *p_h, - pointer data) -{ - *p_w = drw_w; - *p_h = drw_h; -} - - -static void -mach64CopyPackedData(KdScreenInfo *screen, - unsigned char *buf, - int randr, - int srcPitch, - int dstPitch, - int srcW, - int srcH, - int top, - int left, - int h, - int w) -{ - Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver; - Mach64PortPrivPtr pPortPriv = mach64s->pAdaptor->pPortPrivates[0].ptr; - CARD8 *src = buf, *dst; - int srcDown = srcPitch, srcRight = 2, srcNext; - int p; - - switch (randr & RR_Rotate_All) { - case RR_Rotate_0: - src = buf; - srcDown = srcPitch; - srcRight = 2; - break; - case RR_Rotate_90: - src = buf + (srcH - 1) * 2; - srcDown = -2; - srcRight = srcPitch; - break; - case RR_Rotate_180: - src = buf + srcPitch * (srcH - 1) + (srcW - 1) * 2; - srcDown = -srcPitch; - srcRight = -2; - break; - case RR_Rotate_270: - src = buf + srcPitch * (srcW - 1); - srcDown = 2; - srcRight = -srcPitch; - break; - } - - src = src + top*srcDown + left*srcRight; - - if (pPortPriv->currentBuf == 0) - dst = (CARD8 *) mach64s->vesa.fb + pPortPriv->YBuf0Offset; - else - dst = (CARD8 *) mach64s->vesa.fb + pPortPriv->YBuf1Offset; - - w >>= 1; - srcRight >>= 1; - srcNext = srcRight >> 1; - while(h--) - { - CARD16 *s = (CARD16 *) src; - CARD32 *d = (CARD32 *) dst; - p = w; - while (p--) - { - *d++ = s[0] | (s[srcNext] << 16); - s += srcRight; - } - src += srcPitch; - dst += dstPitch; - } -} - -static void -mach64CopyPlanarData(KdScreenInfo *screen, - unsigned char *buf, - int randr, - int srcPitch, - int srcPitch2, - int dstPitch, /* of chroma */ - int srcW, - int srcH, - int height, - int top, - int left, - int h, - int w, - int id) -{ - Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver; - Mach64PortPrivPtr pPortPriv = mach64s->pAdaptor->pPortPrivates[0].ptr; - int i, j; - CARD8 *src1, *src2, *src3, *dst1; - int srcDown = srcPitch, srcDown2 = srcPitch2; - int srcRight = 2, srcRight2 = 1, srcNext = 1; - - /* compute source data pointers */ - src1 = buf; - src2 = src1 + height * srcPitch; - src3 = src2 + (height >> 1) * srcPitch2; - switch (randr & RR_Rotate_All) { - case RR_Rotate_0: - srcDown = srcPitch; - srcDown2 = srcPitch2; - srcRight = 2; - srcRight2 = 1; - srcNext = 1; - break; - case RR_Rotate_90: - src1 = src1 + srcH - 1; - src2 = src2 + (srcH >> 1) - 1; - src3 = src3 + (srcH >> 1) - 1; - srcDown = -1; - srcDown2 = -1; - srcRight = srcPitch * 2; - srcRight2 = srcPitch2; - srcNext = srcPitch; - break; - case RR_Rotate_180: - src1 = src1 + srcPitch * (srcH - 1) + (srcW - 1); - src2 = src2 + srcPitch2 * ((srcH >> 1) - 1) + ((srcW >> 1) - 1); - src3 = src3 + srcPitch2 * ((srcH >> 1) - 1) + ((srcW >> 1) - 1); - srcDown = -srcPitch; - srcDown2 = -srcPitch2; - srcRight = -2; - srcRight2 = -1; - srcNext = -1; - break; - case RR_Rotate_270: - src1 = src1 + srcPitch * (srcW - 1); - src2 = src2 + srcPitch2 * ((srcW >> 1) - 1); - src3 = src3 + srcPitch2 * ((srcW >> 1) - 1); - srcDown = 1; - srcDown2 = 1; - srcRight = -srcPitch * 2; - srcRight2 = -srcPitch2; - srcNext = -srcPitch; - break; - } - - /* adjust for origin */ - src1 += top * srcDown + left * srcNext; - src2 += (top >> 1) * srcDown2 + (left >> 1) * srcRight2; - src3 += (top >> 1) * srcDown2 + (left >> 1) * srcRight2; - - if (id == FOURCC_I420) - { - CARD8 *srct = src2; - src2 = src3; - src3 = srct; - } - - if (pPortPriv->currentBuf == 0) - dst1 = (CARD8 *) mach64s->vesa.fb + pPortPriv->YBuf0Offset; - else - dst1 = (CARD8 *) mach64s->vesa.fb + pPortPriv->YBuf1Offset; - - w >>= 1; - for (j = 0; j < h; j++) - { - CARD32 *dst = (CARD32 *) dst1; - CARD8 *s1l = src1; - CARD8 *s1r = src1 + srcNext; - CARD8 *s2 = src2; - CARD8 *s3 = src3; - - for (i = 0; i < w; i++) - { - *dst++ = *s1l | (*s1r << 16) | (*s3 << 8) | (*s2 << 24); - s1l += srcRight; - s1r += srcRight; - s2 += srcRight2; - s3 += srcRight2; - } - src1 += srcDown; - dst1 += dstPitch; - if (j & 1) - { - src2 += srcDown2; - src3 += srcDown2; - } - } -} - - -/* Mach64ClipVideo - - - Takes the dst box in standard X BoxRec form (top and left - edges inclusive, bottom and right exclusive). The new dst - box is returned. The source boundaries are given (x1, y1 - inclusive, x2, y2 exclusive) and returned are the new source - boundaries in 16.16 fixed point. -*/ - -static void -Mach64ClipVideo(BoxPtr dst, - INT32 *x1, - INT32 *x2, - INT32 *y1, - INT32 *y2, - BoxPtr extents, /* extents of the clip region */ - INT32 width, - INT32 height) -{ - INT32 vscale, hscale, delta; - int diff; - - hscale = ((*x2 - *x1) << 16) / (dst->x2 - dst->x1); - vscale = ((*y2 - *y1) << 16) / (dst->y2 - dst->y1); - - *x1 <<= 16; *x2 <<= 16; - *y1 <<= 16; *y2 <<= 16; - - diff = extents->x1 - dst->x1; - if(diff > 0) { - dst->x1 = extents->x1; - *x1 += diff * hscale; - } - diff = dst->x2 - extents->x2; - if(diff > 0) { - dst->x2 = extents->x2; - *x2 -= diff * hscale; - } - diff = extents->y1 - dst->y1; - if(diff > 0) { - dst->y1 = extents->y1; - *y1 += diff * vscale; - } - diff = dst->y2 - extents->y2; - if(diff > 0) { - dst->y2 = extents->y2; - *y2 -= diff * vscale; - } - - if(*x1 < 0) { - diff = (- *x1 + hscale - 1)/ hscale; - dst->x1 += diff; - *x1 += diff * hscale; - } - delta = *x2 - (width << 16); - if(delta > 0) { - diff = (delta + hscale - 1)/ hscale; - dst->x2 -= diff; - *x2 -= diff * hscale; - } - if(*y1 < 0) { - diff = (- *y1 + vscale - 1)/ vscale; - dst->y1 += diff; - *y1 += diff * vscale; - } - delta = *y2 - (height << 16); - if(delta > 0) { - diff = (delta + vscale - 1)/ vscale; - dst->y2 -= diff; - *y2 -= diff * vscale; - } -} - -static void -mach64DisplayVideo(KdScreenInfo *screen, - int id, - int dstPitch, /* of chroma for 4:2:0 */ - int x1, - int y1, - int x2, - int y2, - int dst_x1, - int dst_y1, - int dst_x2, - int dst_y2, - short src_w, - short src_h, - short drw_w, - short drw_h) -{ - ScreenPtr pScreen = screen->pScreen; - KdScreenPriv(pScreen); - KdCardInfo *card = pScreenPriv->card; - Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver; - Mach64CardInfo *mach64c = (Mach64CardInfo *) card->driver; - Mach64PortPrivPtr pPortPriv = mach64s->pAdaptor->pPortPrivates[0].ptr; - Reg *reg = mach64c->reg; - MediaReg *media = mach64c->media_reg; - int HORZ_INC, VERT_INC; - CARD32 SCALER_IN; - int bright; - int sat; - - if (id == FOURCC_UYVY) - SCALER_IN = SCALER_IN_YVYU422; - else - SCALER_IN = SCALER_IN_VYUY422; - - mach64WaitAvail (reg, 4); - - media->VIDEO_FORMAT = SCALER_IN | VIDEO_IN_VYUY422; - - /* color key */ - media->OVERLAY_GRAPHICS_KEY_MSK = (1 << screen->fb[0].depth) - 1; - media->OVERLAY_GRAPHICS_KEY_CLR = pPortPriv->colorKey; - /* set key control to obey only graphics color key */ - media->OVERLAY_KEY_CNTL = 0x50; - - mach64WaitAvail (reg, 9); - media->CAPTURE_DEBUG = 0; - /* no exclusive video region */ - media->OVERLAY_EXCLUSIVE_HORZ = 0; - media->OVERLAY_EXCLUSIVE_VERT = 0; - /* scaling coefficients */ - media->SCALER_H_COEFF0 = 0x00002000; - media->SCALER_H_COEFF1 = 0x0D06200D; - media->SCALER_H_COEFF2 = 0x0D0A1C0D; - media->SCALER_H_COEFF3 = 0x0C0E1A0C; - media->SCALER_H_COEFF4 = 0x0C14140C; - media->SCALER_TEST = 0; - - mach64WaitAvail (reg, 2); - media->OVERLAY_SCALE_CNTL = (SCALE_PIX_EXPAND | - SCALE_GAMMA_BRIGHT | - SCALE_BANDWIDTH | - SCALE_OVERLAY_EN | - SCALE_EN); - - bright = (pPortPriv->brightness * 64 / 1000); - if (bright < -0x40) - bright = -0x40; - if (bright > 0x3f) - bright = 0x3f; - bright = bright & 0x7f; - sat = ((pPortPriv->saturation * 31 + 31000) / 2000); - if (sat > 0x1f) - sat = 0x1f; - if (sat < 0) - sat = 0; - - media->SCALER_COLOUR_CNTL = ((bright << 0) | /* BRIGHTNESS */ - (sat << 8) | /* SATURATION_U */ - (sat << 16) | /* SATURATION_V */ - (0 << 21) | /* SCALER_VERT_ADJ_UV */ - (0 << 28)); /* SCALER_HORZ_ADJ_UV */ - - VERT_INC = (src_h << 12) / drw_h; - HORZ_INC = (src_w << 12) / drw_w; - - mach64WaitAvail (reg, 13); - - /* lock registers to prevent non-atomic update */ - media->OVERLAY_Y_X_START = 0x80000000 | MACH64_YX (dst_x1, dst_y1); - /* ending screen coordinate */ - media->OVERLAY_Y_X_END = 0x80000000 | MACH64_YX (dst_x2, dst_y2); - - media->OVERLAY_SCALE_INC = MACH64_YX(HORZ_INC, VERT_INC); - - media->SCALER_BUF0_OFFSET = pPortPriv->YBuf0Offset; - media->SCALER_BUF1_OFFSET = pPortPriv->YBuf1Offset; - - media->SCALER_BUF0_OFFSET_U = pPortPriv->YBuf0Offset; - media->SCALER_BUF1_OFFSET_U = pPortPriv->YBuf1Offset; - - media->SCALER_BUF0_OFFSET_V = pPortPriv->YBuf0Offset; - media->SCALER_BUF1_OFFSET_V = pPortPriv->YBuf1Offset; - - media->SCALER_BUF_PITCH = dstPitch >> 1; - media->SCALER_HEIGHT_WIDTH = MACH64_YX(src_w - (x1 >> 16), src_h - (y1 >> 16)); - - media->CAPTURE_CONFIG = pPortPriv->currentBuf << 28; - - /* set XY location and unlock */ - media->OVERLAY_Y_X_START = MACH64_YX (dst_x1, dst_y1); -} - -static void -mach64VideoSave (ScreenPtr pScreen, KdOffscreenArea *area) -{ - KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver; - Mach64PortPrivPtr pPortPriv = mach64s->pAdaptor->pPortPrivates[0].ptr; - - if (pPortPriv->off_screen == area) - pPortPriv->off_screen = 0; -} - -static int -mach64PutImage(KdScreenInfo *screen, - DrawablePtr pDraw, - short src_x, - short src_y, - short drw_x, - short drw_y, - short src_w, - short src_h, - short drw_w, - short drw_h, - int id, - unsigned char *buf, - short width, - short height, - Bool sync, - RegionPtr clipBoxes, - pointer data) -{ - KdCardInfo *card = screen->card; - Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver; - Mach64CardInfo *mach64c = (Mach64CardInfo *) card->driver; - Mach64PortPrivPtr pPortPriv = (Mach64PortPrivPtr)data; - MediaReg *media = mach64c->media_reg; - INT32 x1, x2, y1, y2; - int randr = mach64s->vesa.randr; - int srcPitch, srcPitch2, dstPitch; - int top, left, npixels, nlines, size; - BoxRec dstBox; - int dst_width = width, dst_height = height; - int rot_x1, rot_y1, rot_x2, rot_y2; - int dst_x1, dst_y1, dst_x2, dst_y2; - int rot_src_w, rot_src_h, rot_drw_w, rot_drw_h; - - /* Clip */ - x1 = src_x; - x2 = src_x + src_w; - y1 = src_y; - y2 = src_y + src_h; - - dstBox.x1 = drw_x; - dstBox.x2 = drw_x + drw_w; - dstBox.y1 = drw_y; - dstBox.y2 = drw_y + drw_h; - - Mach64ClipVideo(&dstBox, &x1, &x2, &y1, &y2, - REGION_EXTENTS(pScreen, clipBoxes), width, height); - - if((x1 >= x2) || (y1 >= y2)) - return Success; - - if (!media) - return BadAlloc; - - if (randr & (RR_Rotate_0|RR_Rotate_180)) - { - dst_width = width; - dst_height = height; - rot_src_w = src_w; - rot_src_h = src_h; - rot_drw_w = drw_w; - rot_drw_h = drw_h; - } - else - { - dst_width = height; - dst_height = width; - rot_src_w = src_h; - rot_src_h = src_w; - rot_drw_w = drw_h; - rot_drw_h = drw_w; - } - - switch (randr & RR_Rotate_All) { - case RR_Rotate_0: - default: - dst_x1 = dstBox.x1; - dst_y1 = dstBox.y1; - dst_x2 = dstBox.x2; - dst_y2 = dstBox.y2; - rot_x1 = x1; - rot_y1 = y1; - rot_x2 = x2; - rot_y2 = y2; - break; - case RR_Rotate_90: - dst_x1 = dstBox.y1; - dst_y1 = screen->height - dstBox.x2; - dst_x2 = dstBox.y2; - dst_y2 = screen->height - dstBox.x1; - - rot_x1 = y1; - rot_y1 = (src_w << 16) - x2; - rot_x2 = y2; - rot_y2 = (src_w << 16) - x1; - break; - case RR_Rotate_180: - dst_x1 = screen->width - dstBox.x2; - dst_y1 = screen->height - dstBox.y2; - dst_x2 = screen->width - dstBox.x1; - dst_y2 = screen->height - dstBox.y1; - rot_x1 = (src_w << 16) - x2; - rot_y1 = (src_h << 16) - y2; - rot_x2 = (src_w << 16) - x1; - rot_y2 = (src_h << 16) - y1; - break; - case RR_Rotate_270: - dst_x1 = screen->width - dstBox.y2; - dst_y1 = dstBox.x1; - dst_x2 = screen->width - dstBox.y1; - dst_y2 = dstBox.x2; - rot_x1 = (src_h << 16) - y2; - rot_y1 = x1; - rot_x2 = (src_h << 16) - y1; - rot_y2 = x2; - break; - } - - switch(id) { - case FOURCC_YV12: - case FOURCC_I420: - dstPitch = ((dst_width << 1) + 15) & ~15; - srcPitch = (width + 3) & ~3; - srcPitch2 = ((width >> 1) + 3) & ~3; - size = dstPitch * (int) dst_height; - break; - case FOURCC_UYVY: - case FOURCC_YUY2: - default: - dstPitch = ((dst_width << 1) + 15) & ~15; - srcPitch = (width << 1); - srcPitch2 = 0; - size = dstPitch * (int) dst_height; - break; - } - - if (pPortPriv->off_screen && size != pPortPriv->size) - { - KdOffscreenFree (screen->pScreen, pPortPriv->off_screen); - pPortPriv->off_screen = 0; - } - - if (!pPortPriv->off_screen) - { - pPortPriv->off_screen = KdOffscreenAlloc (screen->pScreen, size * 2, 64, - TRUE, mach64VideoSave, - pPortPriv); - if (!pPortPriv->off_screen) - return BadAlloc; - } - - pPortPriv->offset = pPortPriv->off_screen->offset; - pPortPriv->size = size; - /* fixup pointers */ - - pPortPriv->YBuf0Offset = pPortPriv->offset; - pPortPriv->YBuf1Offset = pPortPriv->offset + size; - -#if 0 - mach64WaitIdle (reg); - - if (pPortPriv->videoOn) - { - /* wait for buffer to be displayed */ - while (((media->TRIG_CNTL >> 5) & 1) != pPortPriv->currentBuf) - ; - } -#endif - /* - * Use the other buffer - */ - pPortPriv->currentBuf = 1 - pPortPriv->currentBuf; - - /* copy data */ - top = rot_y1 >> 16; - left = (rot_x1 >> 16) & ~1; - npixels = ((((rot_x2 + 0xffff) >> 16) + 1) & ~1) - left; - - switch(id) { - case FOURCC_YV12: - case FOURCC_I420: - top &= ~1; - nlines = ((((rot_y2 + 0xffff) >> 16) + 1) & ~1) - top; - mach64CopyPlanarData(screen, buf, randr, - srcPitch, srcPitch2, dstPitch, - rot_src_w, rot_src_h, height, - top, left, nlines, npixels, id); - break; - case FOURCC_UYVY: - case FOURCC_YUY2: - default: - nlines = ((rot_y2 + 0xffff) >> 16) - top; - mach64CopyPackedData(screen, buf, randr, - srcPitch, dstPitch, - rot_src_w, rot_src_h, - top, left, nlines, - npixels); - break; - } - - mach64DisplayVideo(screen, id, dstPitch, - rot_x1, rot_y1, rot_x2, rot_y2, - dst_x1, dst_y1, - dst_x2, dst_y2, - rot_src_w, rot_src_h, rot_drw_w, rot_drw_h); - - /* update cliplist */ - if (!REGION_EQUAL (screen->pScreen, &pPortPriv->clip, clipBoxes)) - { - REGION_COPY (screen->pScreen, &pPortPriv->clip, clipBoxes); - KXVPaintRegion (pDraw, &pPortPriv->clip, pPortPriv->colorKey); - } - - pPortPriv->videoOn = TRUE; - - return Success; -} - -static int -mach64QueryImageAttributes(KdScreenInfo *screen, - int id, - unsigned short *w, - unsigned short *h, - int *pitches, - int *offsets) -{ - int size, tmp; - - if(*w > IMAGE_MAX_WIDTH) - *w = IMAGE_MAX_WIDTH; - if(*h > IMAGE_MAX_HEIGHT) - *h = IMAGE_MAX_HEIGHT; - - *w = (*w + 1) & ~1; - if(offsets) offsets[0] = 0; - - switch(id) { - case FOURCC_YV12: - case FOURCC_I420: - *h = (*h + 1) & ~1; - size = (*w + 3) & ~3; - if(pitches) - pitches[0] = size; - size *= *h; - if(offsets) - offsets[1] = size; - tmp = ((*w >> 1) + 3) & ~3; - if(pitches) - pitches[1] = pitches[2] = tmp; - tmp *= (*h >> 1); - size += tmp; - if(offsets) - offsets[2] = size; - size += tmp; - break; - case FOURCC_UYVY: - case FOURCC_YUY2: - default: - size = *w << 1; - if(pitches) - pitches[0] = size; - size *= *h; - break; - } - - return size; -} - - -/* client libraries expect an encoding */ -static KdVideoEncodingRec DummyEncoding[1] = -{ - { - 0, - "XV_IMAGE", - IMAGE_MAX_WIDTH, IMAGE_MAX_HEIGHT, - {1, 1} - } -}; - -#define NUM_FORMATS 3 - -static KdVideoFormatRec Formats[NUM_FORMATS] = -{ - {15, TrueColor}, {16, TrueColor}, {24, TrueColor} -}; - -#define NUM_ATTRIBUTES 3 - -static KdAttributeRec Attributes[NUM_ATTRIBUTES] = -{ - {XvSettable | XvGettable, 0, ~0, "XV_COLORKEY"}, - {XvSettable | XvGettable, -1000, 1000, "XV_BRIGHTNESS"}, - {XvSettable | XvGettable, -1000, 1000, "XV_SATURATION"} -}; - -#define NUM_IMAGES 4 - -static KdImageRec Images[NUM_IMAGES] = -{ - XVIMAGE_YUY2, - XVIMAGE_YV12, - XVIMAGE_I420, - XVIMAGE_UYVY -}; - -static void mach64ResetVideo(KdScreenInfo *screen) -{ -} - -static int -mach64ReputImage (KdScreenInfo *screen, - DrawablePtr pDraw, - short drw_x, - short drw_y, - RegionPtr clipBoxes, - pointer data) -{ - Mach64PortPrivPtr pPortPriv = (Mach64PortPrivPtr)data; - BoxPtr pOldExtents = REGION_EXTENTS (screen->pScreen, &pPortPriv->clip); - BoxPtr pNewExtents = REGION_EXTENTS (screen->pScreen, clipBoxes); - - if (pOldExtents->x1 == pNewExtents->x1 && - pOldExtents->x2 == pNewExtents->x2 && - pOldExtents->y1 == pNewExtents->y1 && - pOldExtents->y2 == pNewExtents->y2) - { - /* update cliplist */ - if (!REGION_EQUAL (screen->pScreen, &pPortPriv->clip, clipBoxes)) - { - REGION_COPY (screen->pScreen, &pPortPriv->clip, clipBoxes); - KXVPaintRegion (pDraw, &pPortPriv->clip, pPortPriv->colorKey); - } - return Success; - } - return BadMatch; -} - -static KdVideoAdaptorPtr -mach64SetupImageVideo(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - mach64ScreenInfo(pScreenPriv); - KdScreenInfo *screen = pScreenPriv->screen; - KdVideoAdaptorPtr adapt; - Mach64PortPrivPtr pPortPriv; - - if(!(adapt = xcalloc(1, sizeof(KdVideoAdaptorRec) + - sizeof(Mach64PortPrivRec) + - sizeof(DevUnion)))) - return NULL; - - adapt->type = XvWindowMask | XvInputMask | XvImageMask; - adapt->flags = VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT; - adapt->name = "Mach64 Video Overlay"; - adapt->nEncodings = 1; - adapt->pEncodings = DummyEncoding; - adapt->nFormats = NUM_FORMATS; - adapt->pFormats = Formats; - adapt->nPorts = 1; - adapt->pPortPrivates = (DevUnion*)(&adapt[1]); - - pPortPriv = (Mach64PortPrivPtr)(&adapt->pPortPrivates[1]); - - adapt->pPortPrivates[0].ptr = (pointer)(pPortPriv); - adapt->pAttributes = Attributes; - adapt->nImages = NUM_IMAGES; - adapt->nAttributes = NUM_ATTRIBUTES; - adapt->pImages = Images; - adapt->PutVideo = NULL; - adapt->PutStill = NULL; - adapt->GetVideo = NULL; - adapt->GetStill = NULL; - adapt->StopVideo = mach64StopVideo; - adapt->SetPortAttribute = mach64SetPortAttribute; - adapt->GetPortAttribute = mach64GetPortAttribute; - adapt->QueryBestSize = mach64QueryBestSize; - adapt->PutImage = mach64PutImage; - adapt->ReputImage = mach64ReputImage; - adapt->QueryImageAttributes = mach64QueryImageAttributes; - - pPortPriv->colorKey = mach64s->colorKey; - pPortPriv->videoOn = FALSE; - pPortPriv->brightness = 0; - pPortPriv->saturation = 0; - pPortPriv->currentBuf = 0; - pPortPriv->off_screen = 0; - pPortPriv->size = 0; - pPortPriv->offset = 0; - - /* gotta uninit this someplace */ - REGION_INIT(pScreen, &pPortPriv->clip, NullBox, 0); - - mach64s->pAdaptor = adapt; - - xvBrightness = MAKE_ATOM("XV_BRIGHTNESS"); - xvSaturation = MAKE_ATOM("XV_SATURATION"); - xvColorKey = MAKE_ATOM("XV_COLORKEY"); - - mach64ResetVideo(screen); - - return adapt; -} - -Bool mach64InitVideo(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - KdVideoAdaptorPtr *adaptors, *newAdaptors = NULL; - KdVideoAdaptorPtr newAdaptor = NULL; - int num_adaptors; - KdCardInfo *card = pScreenPriv->card; - Mach64CardInfo *mach64c = (Mach64CardInfo *) card->driver; - Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver; - - mach64s->pAdaptor = NULL; - - if (!mach64c->media_reg) - return FALSE; - - newAdaptor = mach64SetupImageVideo(pScreen); - - num_adaptors = KdXVListGenericAdaptors(screen, &adaptors); - - if(newAdaptor) - { - if(!num_adaptors) - { - num_adaptors = 1; - adaptors = &newAdaptor; - } - else - { - newAdaptors = xalloc((num_adaptors + 1) * - sizeof(KdVideoAdaptorPtr*)); - if(newAdaptors) - { - memcpy(newAdaptors, adaptors, - num_adaptors * sizeof(KdVideoAdaptorPtr)); - newAdaptors[num_adaptors] = newAdaptor; - adaptors = newAdaptors; - num_adaptors++; - } - } - } - - if(num_adaptors) - KdXVScreenInit(pScreen, adaptors, num_adaptors); - - if(newAdaptors) - xfree(newAdaptors); - return TRUE; -} - -void -mach64FiniVideo (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - mach64ScreenInfo(pScreenPriv); - KdVideoAdaptorPtr adapt = mach64s->pAdaptor; - - if (adapt) - { - Mach64PortPrivPtr pPortPriv = (Mach64PortPrivPtr)(&adapt->pPortPrivates[1]); - REGION_UNINIT (pScreen, &pPortPriv->clip); - xfree (adapt); - } -} diff --git a/hw/kdrive/mga/Makefile.am b/hw/kdrive/mga/Makefile.am deleted file mode 100644 index a7dd2cbf6..000000000 --- a/hw/kdrive/mga/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -INCLUDES = \ - @KDRIVE_INCS@ \ - -I$(top_srcdir)/hw/kdrive/vesa \ - @KDRIVE_CFLAGS@ - -bin_PROGRAMS = Xmga - -noinst_LIBRARIES = libmga.a - -libmga_a_SOURCES = \ - mgadraw.c \ - g400_composite.c \ - g400_common.h \ - mga.c \ - mga.h - -Xmga_SOURCES = \ - mgastub.c - -MGA_LIBS = \ - libmga.a \ - $(top_builddir)/hw/kdrive/vesa/libvesa.a \ - @KDRIVE_LIBS@ - -if GLX -Xmga_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -endif - -Xmga_LDADD = \ - $(MGA_LIBS) \ - @KDRIVE_LIBS@ - -Xmga_DEPENDENCIES = \ - libmga.a \ - @KDRIVE_LOCAL_LIBS@ - -relink: - rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS) diff --git a/hw/kdrive/mga/g400_common.h b/hw/kdrive/mga/g400_common.h deleted file mode 100644 index 9f16d2431..000000000 --- a/hw/kdrive/mga/g400_common.h +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright © 2004 Damien Ciabrini - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Anders Carlsson not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Anders Carlsson makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * DAMIEN CIABRINI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ANDERS CARLSSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef __G400_COMMON_H__ -#define __G400_COMMON_H__ - -/* Color registers */ -#define MGA_REG_DR4 (0x1CD0) -#define MGA_REG_DR6 (0x1CD8) -#define MGA_REG_DR7 (0x1CDC) -#define MGA_REG_DR8 (0x1CE0) -#define MGA_REG_DR10 (0x1CE8) -#define MGA_REG_DR11 (0x1CEC) -#define MGA_REG_DR12 (0x1CF0) -#define MGA_REG_DR14 (0x1CF8) -#define MGA_REG_DR15 (0x1CFC) - -/* Alpha registers */ -#define MGA_REG_ALPHASTART (0x2C70) -#define MGA_REG_ALPHAXINC (0x2C74) -#define MGA_REG_ALPHAYINC (0x2C78) -#define MGA_REG_ALPHACTRL (0x2C7C) -# define MGA_SRC_ZERO (0x00000000) -# define MGA_SRC_ONE (0x00000001) -# define MGA_SRC_DST_COLOR (0x00000002) -# define MGA_SRC_ONE_MINUS_DST_COLOR (0x00000003) -# define MGA_SRC_ALPHA (0x00000004) -# define MGA_SRC_ONE_MINUS_SRC_ALPHA (0x00000005) -# define MGA_SRC_DST_ALPHA (0x00000006) -# define MGA_SRC_ONE_MINUS_DST_ALPHA (0x00000007) -# define MGA_SRC_SRC_ALPHA_SATURATE (0x00000008) -# define MGA_SRC_BLEND_MASK (0x0000000f) - -# define MGA_DST_ZERO (0x00000000) -# define MGA_DST_ONE (0x00000010) -# define MGA_DST_SRC_COLOR (0x00000020) -# define MGA_DST_ONE_MINUS_SRC_COLOR (0x00000030) -# define MGA_DST_SRC_ALPHA (0x00000040) -# define MGA_DST_ONE_MINUS_SRC_ALPHA (0x00000050) -# define MGA_DST_DST_ALPHA (0x00000060) -# define MGA_DST_ONE_MINUS_DST_ALPHA (0x00000070) -# define MGA_DST_BLEND_MASK (0x00000070) - -# define MGA_ALPHACHANNEL (0x00000100) -# define MGA_VIDEOALPHA (0x00000200) -# define MGA_DIFFUSEDALPHA (0x01000000) -# define MGA_MODULATEDALPHA (0x02000000) - -/* Textures registers */ -#define MGA_REG_TEXORG (0x2c24) -#define MGA_REG_TEXORG1 (0x2ca4) -#define MGA_REG_TEXWIDTH (0x2C28) -#define MGA_REG_TEXHEIGHT (0x2C2C) -#define MGA_REG_TMR0 (0x2C00) -#define MGA_REG_TMR1 (0x2C04) -#define MGA_REG_TMR2 (0x2C08) -#define MGA_REG_TMR3 (0x2C0C) -#define MGA_REG_TMR4 (0x2C10) -#define MGA_REG_TMR5 (0x2C14) -#define MGA_REG_TMR6 (0x2C18) -#define MGA_REG_TMR7 (0x2C1C) -#define MGA_REG_TMR8 (0x2C20) - -/* Texture Control Registers */ -#define MGA_REG_TEXCTL (0x2C30) -# define MGA_TW4 (0x00000000) -# define MGA_TW8 (0x00000001) -# define MGA_TW15 (0x00000002) -# define MGA_TW16 (0x00000003) -# define MGA_TW12 (0x00000004) -# define MGA_TW32 (0x00000006) -# define MGA_TW8A (0x00000007) -# define MGA_TW8AL (0x00000008) -# define MGA_TW422 (0x0000000A) -# define MGA_TW422UYVY (0x0000000B) -# define MGA_PITCHLIN (0x00000100) -# define MGA_NOPERSPECTIVE (0x00200000) -# define MGA_TAKEY (0x02000000) -# define MGA_TAMASK (0x04000000) -# define MGA_CLAMPUV (0x18000000) -#define MGA_REG_TEXCTL2 (0x2C3C) -# define MGA_G400_TC2_MAGIC (0x00008000) -# define MGA_TC2_DECALBLEND (0x00000001) -# define MGA_TC2_IDECAL (0x00000002) -# define MGA_TC2_DECALDIS (0x00000004) -# define MGA_TC2_CKSTRANSDIS (0x00000010) -# define MGA_TC2_BORDEREN (0x00000020) -# define MGA_TC2_SPECEN (0x00000040) -# define MGA_TC2_DUALTEX (0x00000080) -# define MGA_TC2_TABLEFOG (0x00000100) -# define MGA_TC2_BUMPMAP (0x00000200) -# define MGA_TC2_SELECT_TMU1 (0x80000000) -#define MGA_REG_TEXFILTER (0x2C58) -# define MGA_MIN_NRST (0x00000000) -# define MGA_MIN_BILIN (0x00000002) -# define MGA_MIN_ANISO (0x0000000D) -# define MGA_MAG_NRST (0x00000000) -# define MGA_MAG_BILIN (0x00000020) - -/* Multi-Textures Control Registers */ -#define MGA_REG_TDUALSTAGE0 (0x2CF8) -#define MGA_REG_TDUALSTAGE1 (0x2CFC) -# define MGA_TDS_COLOR_ARG2_DIFFUSE (0x00000000) -# define MGA_TDS_COLOR_ARG2_SPECULAR (0x00000001) -# define MGA_TDS_COLOR_ARG2_FCOL (0x00000002) -# define MGA_TDS_COLOR_ARG2_PREVSTAGE (0x00000003) -# define MGA_TDS_COLOR_ALPHA_DIFFUSE (0x00000000) -# define MGA_TDS_COLOR_ALPHA_FCOL (0x00000004) -# define MGA_TDS_COLOR_ALPHA_CURRTEX (0x00000008) -# define MGA_TDS_COLOR_ALPHA_PREVTEX (0x0000000c) -# define MGA_TDS_COLOR_ALPHA_PREVSTAGE (0x00000010) -# define MGA_TDS_COLOR_ARG1_REPLICATEALPHA (0x00000020) -# define MGA_TDS_COLOR_ARG1_INV (0x00000040) -# define MGA_TDS_COLOR_ARG2_REPLICATEALPHA (0x00000080) -# define MGA_TDS_COLOR_ARG2_INV (0x00000100) -# define MGA_TDS_COLOR_ALPHA1INV (0x00000200) -# define MGA_TDS_COLOR_ALPHA2INV (0x00000400) -# define MGA_TDS_COLOR_ARG1MUL_ALPHA1 (0x00000800) -# define MGA_TDS_COLOR_ARG2MUL_ALPHA2 (0x00001000) -# define MGA_TDS_COLOR_ARG1ADD_MULOUT (0x00002000) -# define MGA_TDS_COLOR_ARG2ADD_MULOUT (0x00004000) -# define MGA_TDS_COLOR_MODBRIGHT_2X (0x00008000) -# define MGA_TDS_COLOR_MODBRIGHT_4X (0x00010000) -# define MGA_TDS_COLOR_ADD_SUB (0x00000000) -# define MGA_TDS_COLOR_ADD_ADD (0x00020000) -# define MGA_TDS_COLOR_ADD2X (0x00040000) -# define MGA_TDS_COLOR_ADDBIAS (0x00080000) -# define MGA_TDS_COLOR_BLEND (0x00100000) -# define MGA_TDS_COLOR_SEL_ARG1 (0x00000000) -# define MGA_TDS_COLOR_SEL_ARG2 (0x00200000) -# define MGA_TDS_COLOR_SEL_ADD (0x00400000) -# define MGA_TDS_COLOR_SEL_MUL (0x00600000) -# define MGA_TDS_ALPHA_ARG1_INV (0x00800000) -# define MGA_TDS_ALPHA_ARG2_DIFFUSE (0x00000000) -# define MGA_TDS_ALPHA_ARG2_FCOL (0x01000000) -# define MGA_TDS_ALPHA_ARG2_PREVTEX (0x02000000) -# define MGA_TDS_ALPHA_ARG2_PREVSTAGE (0x03000000) -# define MGA_TDS_ALPHA_ARG2_INV (0x04000000) -# define MGA_TDS_ALPHA_ADD (0x08000000) -# define MGA_TDS_ALPHA_ADDBIAS (0x10000000) -# define MGA_TDS_ALPHA_ADD2X (0x20000000) -# define MGA_TDS_ALPHA_SEL_ARG1 (0x00000000) -# define MGA_TDS_ALPHA_SEL_ARG2 (0x40000000) -# define MGA_TDS_ALPHA_SEL_ADD (0x80000000) -# define MGA_TDS_ALPHA_SEL_MUL (0xc0000000) - - - -/* Composition Prototypes. MMIO Access */ -Bool -mgaCheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, - PicturePtr pDstPicture); - -Bool -mgaPrepareComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, - PicturePtr pDstPicture, PixmapPtr pSrc, - PixmapPtr pMask, PixmapPtr pDst); - -void -mgaComposite(int srcX, int srcY, int maskX, int maskY, - int dstX, int dstY, int w, int h); - -void -mgaDoneComposite(void); - -#endif diff --git a/hw/kdrive/mga/g400_composite.c b/hw/kdrive/mga/g400_composite.c deleted file mode 100644 index dda9d9347..000000000 --- a/hw/kdrive/mga/g400_composite.c +++ /dev/null @@ -1,510 +0,0 @@ -/* - * Copyright © 2004 Damien Ciabrini - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Anders Carlsson not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Anders Carlsson makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * DAMIEN CIABRINI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ANDERS CARLSSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "mga.h" -#include "g400_common.h" - - -static PicturePtr currentSrcPicture; -static PicturePtr currentMaskPicture; -static PixmapPtr currentSrc; -static PixmapPtr currentMask; -static int src_w2; -static int src_h2; -static int mask_w2; -static int mask_h2; - -struct blendinfo { - Bool dst_alpha; - Bool src_alpha; - CARD32 blend_cntl; -}; - -static struct blendinfo mgaBlendOP[] = { - /* Clear */ - {0, 0, MGA_SRC_ZERO | MGA_DST_ZERO}, - /* Src */ - {0, 0, MGA_SRC_ONE | MGA_DST_ZERO}, - /* Dst */ - {0, 0, MGA_SRC_ZERO | MGA_DST_ONE}, - /* Over */ - {0, 1, MGA_SRC_ONE | MGA_DST_ONE_MINUS_SRC_ALPHA}, - /* OverReverse */ - {1, 0, MGA_SRC_ONE_MINUS_DST_ALPHA | MGA_DST_ONE}, - /* In */ - {1, 0, MGA_SRC_DST_ALPHA | MGA_DST_ZERO}, - /* InReverse */ - {0, 1, MGA_SRC_ZERO | MGA_DST_SRC_ALPHA}, - /* Out */ - {1, 0, MGA_SRC_ONE_MINUS_DST_ALPHA | MGA_DST_ZERO}, - /* OutReverse */ - {0, 1, MGA_SRC_ZERO | MGA_DST_ONE_MINUS_SRC_ALPHA}, - /* Atop */ - {1, 1, MGA_SRC_DST_ALPHA | MGA_DST_ONE_MINUS_SRC_ALPHA}, - /* AtopReverse */ - {1, 1, MGA_SRC_ONE_MINUS_DST_ALPHA | MGA_DST_SRC_ALPHA}, - /* Xor */ - {1, 1, MGA_SRC_ONE_MINUS_DST_ALPHA | MGA_DST_ONE_MINUS_SRC_ALPHA}, - /* Add */ - {0, 0, MGA_SRC_ONE | MGA_DST_ONE}, -}; - -struct formatinfo { - int fmt; - CARD32 card_fmt; -}; - -static struct formatinfo texformats[] = { - {PICT_a8r8g8b8, MGA_TW32}, - {PICT_x8r8g8b8, MGA_TW32}, - {PICT_r5g6b5, MGA_TW16}, - {PICT_a1r5g5b5, MGA_TW15}, - {PICT_x1r5g5b5, MGA_TW15}, - {PICT_a4r4g4b4, MGA_TW12}, - {PICT_x4r4g4b4, MGA_TW12}, - {PICT_a8, MGA_TW8A}, -}; - -static int -MGA_LOG2( int val ) -{ - int ret = 0; - if (val==1) return 0; - while (val >> ret) - ret++; - - return ((1 << (ret-1)) == val) ? (ret-1) : ret; -} - - -static Bool -mgaCheckSourceTexture (int tmu, - PicturePtr pPict) -{ - int w = pPict->pDrawable->width; - int h = pPict->pDrawable->height; - int i; - CARD32 texctl = 0; - - if ((w > 2047) || (h > 2047)) - MGA_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h)); - - for (i = 0; i < sizeof(texformats) / sizeof(texformats[0]); i++) { - if (texformats[i].fmt == pPict->format) { - texctl = texformats[i].card_fmt; - break; - } - } - if (texctl == 0) { - MGA_FALLBACK(("Unsupported picture format 0x%x\n", pPict->format)); - } - - if (pPict->repeat && ((w & (w - 1)) != 0 || (h & (h - 1)) != 0)) - MGA_FALLBACK(("NPOT repeat unsupported (%dx%d)\n", w, h)); - - if (pPict->filter != PictFilterNearest && - pPict->filter != PictFilterBilinear) - MGA_FALLBACK(("Unsupported filter 0x%x\n", pPict->filter)); - - return TRUE; -} - -static Bool -PrepareSourceTexture (int tmu, - PicturePtr pSrcPicture, - PixmapPtr pSrc) -{ - KdScreenPriv (pSrc->drawable.pScreen); - int mem_base=(int)pScreenPriv->screen->memory_base; - int pitch = pSrc->devKind / (pSrc->drawable.bitsPerPixel >> 3); - int i; - - int w = pSrc->drawable.width; - int h = pSrc->drawable.height; - int w_log2 = MGA_LOG2(w); - int h_log2 = MGA_LOG2(h); - - int texctl = MGA_PITCHLIN | ((pitch & (2048 - 1)) << 9) | - MGA_CLAMPUV | MGA_NOPERSPECTIVE; - int flags = 0; - int texctl2 = MGA_G400_TC2_MAGIC | flags; - - for (i = 0; i < sizeof(texformats) / sizeof(texformats[0]); i++) { - if (texformats[i].fmt == pSrcPicture->format) { - texctl |= texformats[i].card_fmt; - break; - } - } - - if (PICT_FORMAT_A(pSrcPicture->format) != 0) { - texctl |= MGA_TAKEY; - } else { - texctl |= MGA_TAMASK | MGA_TAKEY; - } - - if (pSrcPicture->repeat) { - texctl &= ~MGA_CLAMPUV; - } - - if (tmu == 1) - texctl2 |= MGA_TC2_DUALTEX | MGA_TC2_SELECT_TMU1 | flags; - - mgaWaitAvail (6); - MGA_OUT32 (mmio, MGA_REG_TEXCTL2, texctl2); - MGA_OUT32 (mmio, MGA_REG_TEXCTL, texctl); - /* Source (texture) address + pitch */ - MGA_OUT32 (mmio, MGA_REG_TEXORG, ((int)pSrc->devPrivate.ptr - mem_base)); - MGA_OUT32 (mmio, MGA_REG_TEXWIDTH, (w-1)<<18 | ((8-w_log2)&63)<<9 | w_log2); - MGA_OUT32 (mmio, MGA_REG_TEXHEIGHT, (h-1)<<18 | ((8-h_log2)&63)<<9 | h_log2); - /* Set blit filtering flags */ - if (pSrcPicture->filter == PictFilterBilinear) { - MGA_OUT32 (mmio, MGA_REG_TEXFILTER, - (0x10<<21) | MGA_MAG_BILIN | MGA_MIN_BILIN); - } else { - MGA_OUT32 (mmio, MGA_REG_TEXFILTER, - (0x10<<21) | MGA_MAG_NRST | MGA_MIN_NRST); - } - - if (tmu == 1) { - mgaWaitAvail (1); - MGA_OUT32 (mmio, MGA_REG_TEXCTL2, MGA_G400_TC2_MAGIC | MGA_TC2_DUALTEX | flags); - } - - return TRUE; -} - - -/* - * The formals params are the elements of the following matrix: - * - * Dest Transform Src - * coords coords - * / Xdst \ / X_incx X_incy X_init \ / Xsrc \ - * | Ydst | = | Y_incx Y_incy Y_init | x | Ysrc | - * \ 1 / \ H_incx H_incy H_init / \ 1 / - * - * matrix elements are 32bits fixed points (16.16) - * mga_fx_* is the size of the fixed point for the TMU - */ -static void -setTMIncrementsRegs(int X_incx, - int X_incy, - int X_init, - int Y_incx, - int Y_incy, - int Y_init, - int H_incx, - int H_incy, - int H_init, - int mga_fx_width_size, - int mga_fx_height_size) { - int decalw = mga_fx_width_size - 16; - int decalh = mga_fx_height_size - 16; - - /* Convert 16 bits fixpoint -> MGA variable size fixpoint */ - if (decalw >= 0) { - X_incx = X_incx << decalw; - X_incy = X_incy << decalw; - X_init = X_init << decalw; - } else { - decalw =- decalw; - X_incx = X_incx >> decalw; - X_incy = X_incy >> decalw; - X_init = X_init >> decalw; - } - - /* Convert 16 bits fixpoint -> MGA variable size fixpoint */ - if (decalh >= 0) { - Y_incx = Y_incx << decalh; - Y_incy = Y_incy << decalh; - Y_init = Y_init << decalh; - } else { - decalh =- decalh; - Y_incx = Y_incx >> decalh; - Y_incy = Y_incy >> decalh; - Y_init = Y_init >> decalh; - } - - /* Set TM registers */ - mgaWaitAvail (9); - MGA_OUT32 (mmio, MGA_REG_TMR0, X_incx); - MGA_OUT32 (mmio, MGA_REG_TMR1, Y_incx); - MGA_OUT32 (mmio, MGA_REG_TMR2, X_incy); - MGA_OUT32 (mmio, MGA_REG_TMR3, Y_incy); - MGA_OUT32 (mmio, MGA_REG_TMR4, H_incx); - MGA_OUT32 (mmio, MGA_REG_TMR5, H_incy); - MGA_OUT32 (mmio, MGA_REG_TMR6, X_init); - MGA_OUT32 (mmio, MGA_REG_TMR7, Y_init); - MGA_OUT32 (mmio, MGA_REG_TMR8, H_init); -} - - - - -Bool -mgaCheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, - PicturePtr pDstPicture) -{ - if (op >= sizeof(mgaBlendOP) / sizeof(mgaBlendOP[0])) - MGA_FALLBACK(("unsupported op %x", op)); - if (!mgaCheckSourceTexture (0, pSrcPicture)) - return FALSE; - - if (pMaskPicture != NULL) { - if (PICT_FORMAT_A(pMaskPicture->format) == 0) - MGA_FALLBACK(("Mask without alpha unsupported")); - if (!mgaCheckSourceTexture (1, pMaskPicture)) - return FALSE; - } - - if (pMaskPicture->componentAlpha) - MGA_FALLBACK(("Component alpha unsupported")); - - if (pDstPicture->format == PICT_a8) - MGA_FALLBACK(("render to A8 unsupported")); - - return TRUE; -} - -#define C_ARG1_CUR 0x0 -#define C_ARG1_ALPHA MGA_TDS_COLOR_ARG1_REPLICATEALPHA -#define C_ARG2_DIFFUSE MGA_TDS_COLOR_ARG2_DIFFUSE -#define C_ARG2_FCOL MGA_TDS_COLOR_ARG2_FCOL -#define C_ARG2_PREV MGA_TDS_COLOR_ARG2_PREVSTAGE -#define C_ARG1_INV MGA_TDS_COLOR_ARG1_INV -#define C_ARG2_INV MGA_TDS_COLOR_ARG2_INV -#define COLOR_MUL MGA_TDS_COLOR_SEL_MUL -#define COLOR_ARG1 MGA_TDS_COLOR_SEL_ARG1 -#define COLOR_ARG2 MGA_TDS_COLOR_SEL_ARG2 -#define A_ARG1_CUR 0x0 -#define A_ARG2_IGN A_ARG2_DIFFUSE -#define A_ARG2_FCOL MGA_TDS_ALPHA_ARG2_FCOL -#define A_ARG2_DIFFUSE MGA_TDS_ALPHA_ARG2_DIFFUSE -#define A_ARG2_PREV MGA_TDS_ALPHA_ARG2_PREVSTAGE -#define ALPHA_MUL MGA_TDS_ALPHA_SEL_MUL -#define ALPHA_ARG1 MGA_TDS_ALPHA_SEL_ARG1 -#define ALPHA_ARG2 MGA_TDS_ALPHA_SEL_ARG2 - - -Bool -mgaPrepareComposite (int op, - PicturePtr pSrcPicture, - PicturePtr pMaskPicture, - PicturePtr pDstPicture, - PixmapPtr pSrc, - PixmapPtr pMask, - PixmapPtr pDst) -{ - KdScreenPriv (pSrc->drawable.pScreen); - int mem_base=(int)pScreenPriv->screen->memory_base; - int cmd, blendcntl; - int ds0, ds1; - - /* Init MGA (clipping) */ - mgaSetup (pSrc->drawable.pScreen, pDst->drawable.bitsPerPixel, 1); - - /* Initialize fg color to 0, used in the src = A8 case */ - MGA_OUT32 (mmio, MGA_REG_FCOL, 0xff000000); - - /* Destination flags */ - mgaWaitAvail (2); - MGA_OUT32 (mmio, MGA_REG_DSTORG, ((int)pDst->devPrivate.ptr - mem_base)); - MGA_OUT32 (mmio, MGA_REG_PITCH, - pDst->devKind / (pDst->drawable.bitsPerPixel >> 3)); - - - /* Source(s) flags */ - if (!PrepareSourceTexture (0, pSrcPicture, pSrc)) return FALSE; - if (pMask != NULL) { - if (!PrepareSourceTexture (1, pMaskPicture, pMask)) return FALSE; - } - - /* Prepare multi-texture registers */ - ds0=ds1=0; - - if (pSrcPicture->format == PICT_a8) { - /* C = 0 A = As */ - /* MGA HW: A8 format makes RGB white. We use FCOL for the black - * If FCOL was not 0, it would have been be premultiplied (RENDER) - * color component would have been: - * C_ARG1_ALPHA | C_ARG2_FCOL | COLOR_MUL - */ - ds0=C_ARG2_FCOL | COLOR_ARG2 | - A_ARG1_CUR | ALPHA_ARG1; - /* MGA HW: TMU1 must be enabled when DUALSTAGE0 contains something */ - if (pMask == NULL) { - if (!PrepareSourceTexture (1, pSrcPicture, pSrc)) return FALSE; - ds1=C_ARG2_PREV | COLOR_ARG2 | - A_ARG2_PREV | ALPHA_ARG2; - } - } else { - /* C = Cs A = As */ - ds0=C_ARG1_CUR | COLOR_ARG1 | - A_ARG1_CUR | ALPHA_ARG1; - } - - if (pMask != NULL) { - /* As or Am might be NULL. in this case we don't multiply because, - * the alpha component holds garbage. - */ - int color,alpha; - if (PICT_FORMAT_A (pMaskPicture->format) == 0) { - /* C = Cs */ - color = C_ARG2_PREV | COLOR_ARG2; - } else { - /* C = Am * Cs */ - color = C_ARG1_ALPHA | C_ARG2_PREV | COLOR_MUL; - } - - if (PICT_FORMAT_A (pMaskPicture->format) == 0) { - /* A = As */ - alpha = A_ARG2_PREV | ALPHA_ARG2; - } else if (PICT_FORMAT_A (pSrcPicture->format) == 0) { - /* A = Am */ - alpha = A_ARG1_CUR | ALPHA_ARG1; - } else { - /* A = Am * As */ - alpha = A_ARG1_CUR | A_ARG2_PREV | ALPHA_MUL; - } - - ds1 = color | alpha; - } - - /* MultiTexture modulation */ - mgaWaitAvail (2); - MGA_OUT32 (mmio, MGA_REG_TDUALSTAGE0, ds0); - MGA_OUT32 (mmio, MGA_REG_TDUALSTAGE1, ds1); - - - cmd = MGA_OPCOD_TEXTURE_TRAP | MGA_ATYPE_RSTR | 0x000c0000 | - MGA_DWGCTL_SHIFTZERO | MGA_DWGCTL_SGNZERO | MGA_DWGCTL_ARZERO | - MGA_ATYPE_I; - - blendcntl = mgaBlendOP[op].blend_cntl; - if (PICT_FORMAT_A(pDstPicture->format) == 0 && mgaBlendOP[op].dst_alpha) { - if ((blendcntl & MGA_SRC_BLEND_MASK) == MGA_SRC_DST_ALPHA) - blendcntl = (blendcntl & ~MGA_SRC_BLEND_MASK) | MGA_SRC_ONE; - else if ((blendcntl & MGA_SRC_BLEND_MASK) == MGA_SRC_ONE_MINUS_DST_ALPHA) - blendcntl = (blendcntl & ~MGA_SRC_BLEND_MASK) | MGA_SRC_ZERO; - } - - mgaWaitAvail (2); - MGA_OUT32 (mmio, MGA_REG_DWGCTL, cmd); - MGA_OUT32 (mmio, MGA_REG_ALPHACTRL, MGA_ALPHACHANNEL | blendcntl); - - currentSrcPicture = pSrcPicture; - currentMaskPicture = pMaskPicture; - currentSrc = pSrc; - currentMask = pMask; - src_w2 = MGA_LOG2 (currentSrc->drawable.width); - src_h2 = MGA_LOG2 (currentSrc->drawable.height); - mask_w2 = MGA_LOG2 (currentMask->drawable.width); - mask_h2 = MGA_LOG2 (currentMask->drawable.height); - - return TRUE; -} - - -void -mgaComposite (int srcX, - int srcY, - int maskX, - int maskY, - int dstX, - int dstY, - int width, - int height) -{ - /* Source positions can be outside source textures' boundaries. - * We clamp the values here to avoid rendering glitches. - */ - srcX=srcX % currentSrc->drawable.width; - srcY=srcY % currentSrc->drawable.height; - maskX=maskX % currentMask->drawable.width; - maskY=maskY % currentMask->drawable.height; - - if (currentSrcPicture->transform) { - setTMIncrementsRegs (currentSrcPicture->transform->matrix[0][0], - currentSrcPicture->transform->matrix[0][1], - currentSrcPicture->transform->matrix[0][2] + - (srcX << 16), - currentSrcPicture->transform->matrix[1][0], - currentSrcPicture->transform->matrix[1][1], - currentSrcPicture->transform->matrix[1][2] + - (srcY << 16), - currentSrcPicture->transform->matrix[2][0], - currentSrcPicture->transform->matrix[2][1], - currentSrcPicture->transform->matrix[2][2], - 20-src_w2, 20-src_h2); - } else { - setTMIncrementsRegs (1 << 16, 0, srcX << 16, - 0, 1 << 16, srcY << 16, - 0, 0, 0x10000, - 20-src_w2, 20-src_h2); - } - - if (currentMask != NULL) { - mgaWaitAvail (1); - MGA_OUT32 (mmio, MGA_REG_TEXCTL2, - MGA_G400_TC2_MAGIC | MGA_TC2_DUALTEX | MGA_TC2_SELECT_TMU1); - if (currentMaskPicture->transform) { - setTMIncrementsRegs (currentMaskPicture->transform->matrix[0][0], - currentMaskPicture->transform->matrix[0][1], - currentMaskPicture->transform->matrix[0][2] + - (maskX << 16), - currentMaskPicture->transform->matrix[1][0], - currentMaskPicture->transform->matrix[1][1], - currentMaskPicture->transform->matrix[1][2] + - (maskY << 16), - currentMaskPicture->transform->matrix[2][0], - currentMaskPicture->transform->matrix[2][1], - currentMaskPicture->transform->matrix[2][2], - 20-mask_w2, 20-mask_h2); - } else { - setTMIncrementsRegs (1 << 16, 0, maskX << 16, - 0, 1 << 16, maskY << 16, - 0, 0, 0x10000, - 20-mask_w2, 20-mask_h2); - } - - mgaWaitAvail (1); - MGA_OUT32 (mmio, MGA_REG_TEXCTL2, MGA_G400_TC2_MAGIC | MGA_TC2_DUALTEX); - } - - /* Destination Bounding Box - * (Boundary Right | Boundary Left, Y dest | Height) - */ - mgaWaitAvail (2); - MGA_OUT32 (mmio, MGA_REG_FXBNDRY, - ((dstX + width) << 16) | (dstX & 0xffff)); - MGA_OUT32 (mmio, MGA_REG_YDSTLEN | MGA_REG_EXEC, - (dstY << 16) | (height & 0xffff)); -} - -void -mgaDoneComposite (void) -{ -} diff --git a/hw/kdrive/mga/mga.c b/hw/kdrive/mga/mga.c deleted file mode 100644 index 2ae35d143..000000000 --- a/hw/kdrive/mga/mga.c +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Copyright © 2003 Anders Carlsson - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Anders Carlsson not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Anders Carlsson makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ANDERS CARLSSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ANDERS CARLSSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -#ifdef HAVE_CONFIG_H -#include -#endif -#include "mga.h" - -static Bool -mgaCardInit (KdCardInfo *card) -{ - MgaCardInfo *mgac; - - mgac = (MgaCardInfo *) xalloc (sizeof (MgaCardInfo)); - if (!mgac) - return FALSE; - - mgaMapReg (card, mgac); - - if (!vesaInitialize (card, &mgac->vesa)) - { - xfree (mgac); - return FALSE; - } - - mgac->fifo_size = 0; - - card->driver = mgac; - - return TRUE; -} - -static Bool -mgaScreenInit (KdScreenInfo *screen) -{ - MgaScreenInfo *mgas; - - mgas = (MgaScreenInfo *) xalloc (sizeof (MgaScreenInfo)); - if (!mgas) - return FALSE; - memset (mgas, '\0', sizeof (MgaScreenInfo)); - if (!vesaScreenInitialize (screen, &mgas->vesa)) - { - xfree (mgas); - return FALSE; - } -#if 0 - /* if (!mgac->reg) - screen->dumb = TRUE; */ - - if (mgas->vesa.mapping != VESA_LINEAR) - screen->dumb = TRUE; - - fprintf (stderr, "vesa mapping is %d\n", mgas->vesa.mapping); -#endif - screen->driver = mgas; - return TRUE; -} - -static Bool -mgaInitScreen (ScreenPtr pScreen) -{ - return vesaInitScreen (pScreen); -} - -static Bool -mgaFinishInitScreen (ScreenPtr pScreen) -{ - Bool ret; - - ret = vesaFinishInitScreen (pScreen); - - return ret; -} - -static Bool -mgaCreateResources (ScreenPtr pScreen) -{ - return vesaCreateResources (pScreen); -} - -static void -mgaPreserve (KdCardInfo *card) -{ - vesaPreserve (card); -} - -Bool -mgaMapReg (KdCardInfo *card, MgaCardInfo *mgac) -{ - mgac->reg_base = (CARD8 *) KdMapDevice (MGA_REG_BASE (card), - MGA_REG_SIZE (card)); - - if (!mgac->reg_base) - { - return FALSE; - } - - KdSetMappedMode (MGA_REG_BASE (card), - MGA_REG_SIZE (card), - KD_MAPPED_MODE_REGISTERS); - - return TRUE; -} - -void -mgaUnmapReg (KdCardInfo *card, MgaCardInfo *mgac) -{ - if (mgac->reg_base) - { - KdResetMappedMode (MGA_REG_BASE (card), - MGA_REG_SIZE (card), - KD_MAPPED_MODE_REGISTERS); - KdUnmapDevice ((void *) mgac->reg_base, MGA_REG_SIZE (card)); - mgac->reg_base = 0; - /* mgac->reg = 0; */ - } -} - -void -mgaSetMMIO (KdCardInfo *card, MgaCardInfo *mgac) -{ - if (!mgac->reg_base) - mgaMapReg (card, mgac); -} - -void -mgaResetMMIO (KdCardInfo *card, MgaCardInfo *mgac) -{ - mgaUnmapReg (card, mgac); -} - -static Bool -mgaDPMS (ScreenPtr pScreen, int mode) -{ - /* XXX */ - return TRUE; -} - -static Bool -mgaEnable (ScreenPtr pScreen) -{ - KdScreenPriv (pScreen); - MgaCardInfo *mgac = pScreenPriv->card->driver; - - if (!vesaEnable (pScreen)) - return FALSE; - - mgaSetMMIO (pScreenPriv->card, mgac); - mgaDPMS (pScreen, KD_DPMS_NORMAL); - - return TRUE; -} - -static void -mgaDisable (ScreenPtr pScreen) -{ - KdScreenPriv (pScreen); - MgaCardInfo *mgac = pScreenPriv->card->driver; - - mgaResetMMIO (pScreenPriv->card, mgac); - - vesaDisable (pScreen); -} - -static void -mgaRestore (KdCardInfo *card) -{ - MgaCardInfo *mgac = card->driver; - - mgaResetMMIO (card, mgac); - vesaRestore (card); -} - -static void -mgaScreenFini (KdScreenInfo *screen) -{ - MgaScreenInfo *mgas = (MgaScreenInfo *) screen->driver; - - vesaScreenFini (screen); - xfree (mgas); - screen->driver = 0; -} - -static void -mgaCardFini (KdCardInfo *card) -{ - MgaCardInfo *mgac = (MgaCardInfo *)card->driver; - - mgaUnmapReg (card, mgac); - vesaCardFini (card); -} - -KdCardFuncs mgaFuncs = { - mgaCardInit, /* cardinit */ - mgaScreenInit, /* scrinit */ - mgaInitScreen, /* initScreen */ - mgaFinishInitScreen, /* finishInitScreen */ - mgaCreateResources, /* createRes */ - mgaPreserve, /* preserve */ - mgaEnable, /* enable */ - mgaDPMS, /* dpms */ - mgaDisable, /* disable */ - mgaRestore, /* restore */ - mgaScreenFini, /* scrfini */ - mgaCardFini, /* cardfini */ - - 0, /* initCursor */ - 0, /* enableCursor */ - 0, /* disableCursor */ - 0, /* finiCursor */ - 0, /* recolorCursor */ - - mgaDrawInit, /* initAccel */ - mgaDrawEnable, /* enableAccel */ - mgaDrawDisable, /* disableAccel */ - mgaDrawFini, /* finiAccel */ - - vesaGetColors, /* getColors */ - vesaPutColors, /* putColors */ -}; - diff --git a/hw/kdrive/mga/mga.h b/hw/kdrive/mga/mga.h deleted file mode 100644 index 8fa956096..000000000 --- a/hw/kdrive/mga/mga.h +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright © 2003-2004 Anders Carlsson - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Anders Carlsson not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Anders Carlsson makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ANDERS CARLSSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ANDERS CARLSSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _MGA_H_ -#define _MGA_H_ -#include -#include - -#define MGA_REG_BASE(c) ((c)->attr.address[1]) -#define MGA_REG_SIZE(c) (0x4000) - -#define MGA_OUT32(mmio, a, v) (*(VOL32 *) ((mmio) + (a)) = (v)) -#define MGA_IN32(mmio, a) (*(VOL32 *) ((mmio) + (a))) - -#define MGA_REG_EXEC (0x0100) -#define MGA_REG_DWGCTL (0x1c00) -#define MGA_REG_PLNWT (0x1c1c) -#define MGA_REG_FCOL (0x1c24) -#define MGA_REG_MACCESS (0x1c04) -#define MGA_REG_SGN (0x1c58) -#define MGA_REG_AR0 (0x1c60) -#define MGA_REG_AR1 (0x1c64) -#define MGA_REG_AR2 (0x1c68) -#define MGA_REG_AR3 (0x1c6C) -#define MGA_REG_AR4 (0x1c70) -#define MGA_REG_AR5 (0x1c74) -#define MGA_REG_AR6 (0x1c78) - -#define MGA_REG_CXBNDRY (0x1c80) -#define MGA_REG_FXBNDRY (0x1c84) -#define MGA_REG_YDSTLEN (0x1c88) -#define MGA_REG_PITCH (0x1c8c) -#define MGA_REG_YTOP (0x1c98) -#define MGA_REG_YBOT (0x1c9c) -#define MGA_REG_FIFOSTATUS (0x1e10) -#define MGA_REG_STATUS (0x1e14) -#define MGA_REG_CACHEFLUSH (0x1fff) -#define MGA_REG_SRCORG (0x2cb4) -#define MGA_REG_DSTORG (0x2cb8) - -#define MGA_G4XX_DEVICE_ID (0x0525) - -#define MGA_PW8 (0) -#define MGA_PW16 (1) -#define MGA_PW24 (2) -#define MGA_PW32 (3) - -/* Drawing opcodes */ -#define MGA_OPCOD_TRAP (4) -#define MGA_OPCOD_TEXTURE_TRAP (6) -#define MGA_OPCOD_BITBLT (8) - -#define MGA_DWGCTL_SOLID (1 << 11) -#define MGA_DWGCTL_ARZERO (1 << 12) -#define MGA_DWGCTL_SGNZERO (1 << 13) -#define MGA_DWGCTL_SHIFTZERO (1 << 14) - -#define MGA_DWGCTL_BFCOL (2 << 25) - -#define MGA_ATYPE_RPL (0 << 4) -#define MGA_ATYPE_RSTR (1 << 4) -#define MGA_ATYPE_ZI (3 << 4) -#define MGA_ATYPE_BLK (4 << 4) -#define MGA_ATYPE_I (7 << 4) - -typedef volatile CARD8 VOL8; -typedef volatile CARD16 VOL16; -typedef volatile CARD32 VOL32; - -typedef struct _mgaCardInfo { - VesaCardPrivRec vesa; - CARD8 *reg_base; - int fifo_size; -} MgaCardInfo; - -#define getMgaCardInfo(kd) ((MgaCardInfo *) ((kd)->card->driver)) -#define mgaCardInfo(kd) MgaCardInfo *mgac = getMgaCardInfo(kd) - -typedef struct _mgaScreenInfo { - VesaScreenPrivRec vesa; - - KaaScreenInfoRec kaa; - - int pitch; - int pw; -} MgaScreenInfo; - -#define getMgaScreenInfo(kd) ((MgaScreenInfo *) ((kd)->screen->driver)) -#define mgaScreenInfo(kd) MgaScreenInfo *mgas = getMgaScreenInfo(kd) - - -VOL8 *mmio; - - -Bool -mgaMapReg (KdCardInfo *card, MgaCardInfo *mgac); - -void -mgaUnmapReg (KdCardInfo *card, MgaCardInfo *mgac); - -void -mgaSetMMIO (KdCardInfo *card, MgaCardInfo *mgac); - -void -mgaResetMMIO (KdCardInfo *card, MgaCardInfo *mgac); - -Bool -mgaDrawSetup (ScreenPtr pScreen); - -Bool -mgaDrawInit (ScreenPtr pScreen); - -void -mgaDrawEnable (ScreenPtr pScreen); - -void -mgaDrawDisable (ScreenPtr pScreen); - -void -mgaDrawFini (ScreenPtr pScreen); - -extern KdCardFuncs mgaFuncs; - - -void -mgaWaitAvail (int n); - -void -mgaWaitIdle (void); - -Bool -mgaSetup (ScreenPtr pScreen, int dest_bpp, int wait); - - -#if 0 -#define MGA_FALLBACK(x) \ -do { \ - ErrorF x; \ - return FALSE; \ -} while (0); -#else -#define MGA_FALLBACK(x) return FALSE; -#endif - -#endif /* _MGA_H_ */ diff --git a/hw/kdrive/mga/mgadraw.c b/hw/kdrive/mga/mgadraw.c deleted file mode 100644 index d27e8c9cc..000000000 --- a/hw/kdrive/mga/mgadraw.c +++ /dev/null @@ -1,324 +0,0 @@ -/* - * Copyright © 2003-2004 Anders Carlsson - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Anders Carlsson not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Anders Carlsson makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ANDERS CARLSSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ANDERS CARLSSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -#ifdef HAVE_CONFIG_H -#include -#endif -#include "mga.h" -#include "g400_common.h" -#include "kaa.h" -#include - -CARD32 mgaRop[16] = { - /* GXclear */ MGA_ATYPE_RPL | 0x00000000, /* 0 */ - /* GXand */ MGA_ATYPE_RSTR | 0x00080000, /* src AND dst */ - /* GXandReverse */ MGA_ATYPE_RSTR | 0x00040000, /* src AND NOT dst */ - /* GXcopy */ MGA_ATYPE_RSTR | 0x000c0000, /* src */ - /* GXandInverted */ MGA_ATYPE_RSTR | 0x00020000, /* NOT src AND dst */ - /* GXnoop */ MGA_ATYPE_RSTR | 0x000a0000, /* dst */ - /* GXxor */ MGA_ATYPE_RSTR | 0x00060000, /* src XOR dst */ - /* GXor */ MGA_ATYPE_RSTR | 0x000e0000, /* src OR dst */ - /* GXnor */ MGA_ATYPE_RSTR | 0x00010000, /* NOT src AND NOT dst */ - /* GXequiv */ MGA_ATYPE_RSTR | 0x00090000, /* NOT src XOR dst */ - /* GXinvert */ MGA_ATYPE_RSTR | 0x00050000, /* NOT dst */ - /* GXorReverse */ MGA_ATYPE_RSTR | 0x000d0000, /* src OR NOT dst */ - /* GXcopyInverted */ MGA_ATYPE_RPL | 0x00030000, /* NOT src */ - /* GXorInverted */ MGA_ATYPE_RSTR | 0x000b0000, /* NOT src OR dst */ - /* GXnand */ MGA_ATYPE_RSTR | 0x00070000, /* NOT src OR NOT dst */ - /* GXset */ MGA_ATYPE_RPL | 0x000f0000 /* 1 */ -}; - -VOL8 *mmio; -int fifo_size; -int pitch, src_pitch; -int dir; - -void -mgaWaitAvail (int n) -{ - if (fifo_size < n) { - while ((fifo_size = MGA_IN32 (mmio, MGA_REG_FIFOSTATUS) & 0xff) < n) - ; - } - - fifo_size -= n; -} - -#define MGA_OUT8(mmio, a, v) (*(VOL8 *) ((mmio) + (a)) = (v)) -#define MGA_REG_CRTC_INDEX (0x1fd4) - -void -mgaWaitIdle (void) -{ - - mgaWaitAvail (2); - MGA_OUT32(mmio, MGA_REG_CACHEFLUSH, 0); - /* MGA_OUT8 (mmio, MGA_REG_CRTC_INDEX, 0); */ - while (MGA_IN32 (mmio, MGA_REG_STATUS) & 0x10000) - ; -} - -static void -mgaWaitMarker (ScreenPtr pScreen, int marker) -{ - KdScreenPriv (pScreen); - mgaCardInfo (pScreenPriv); - - mmio = mgac->reg_base; - - mgaWaitIdle (); -} - -Bool -mgaSetup (ScreenPtr pScreen, int dest_bpp, int wait) -{ - KdScreenPriv (pScreen); - mgaScreenInfo (pScreenPriv); - mgaCardInfo (pScreenPriv); - - fifo_size = 0; - mmio = mgac->reg_base; - pitch = mgas->pitch; - - if (!mmio) - return FALSE; - - mgaWaitAvail (wait + 4); - /* Set the format of the destination pixmap */ - switch (dest_bpp) { - case 8: - MGA_OUT32 (mmio, MGA_REG_MACCESS, MGA_PW8); - break; - case 16: - MGA_OUT32 (mmio, MGA_REG_MACCESS, MGA_PW16); - break; - case 24: - case 32: - MGA_OUT32 (mmio, MGA_REG_MACCESS, MGA_PW24); - break; - } - MGA_OUT32 (mmio, MGA_REG_CXBNDRY, 0xffff0000); - MGA_OUT32 (mmio, MGA_REG_YTOP, 0x00000000); - MGA_OUT32 (mmio, MGA_REG_YBOT, 0x007fffff); - - return TRUE; -} - -static Bool -mgaPrepareSolid (PixmapPtr pPixmap, int alu, Pixel pm, Pixel fg) -{ - - KdScreenPriv(pPixmap->drawable.pScreen); - int cmd; - int dst_org; - /* We must pad pm and fg depending on the format of the - * destination pixmap - */ - switch (pPixmap->drawable.bitsPerPixel) { - case 16: - fg |= fg << 16; - pm |= pm << 16; - break; - case 8: - fg |= (fg << 8) | (fg << 16) | (fg << 24); - pm |= (pm << 8) | (pm << 16) | (pm << 24); - break; - } - - cmd = MGA_OPCOD_TRAP | MGA_DWGCTL_SOLID | MGA_DWGCTL_ARZERO | MGA_DWGCTL_SGNZERO | - MGA_DWGCTL_SHIFTZERO | mgaRop[alu]; - - dst_org = (int)pPixmap->devPrivate.ptr - (int)pScreenPriv->screen->memory_base; - - mgaSetup (pPixmap->drawable.pScreen, pPixmap->drawable.bitsPerPixel, 5); - MGA_OUT32 (mmio, MGA_REG_DSTORG, dst_org); - MGA_OUT32 (mmio, MGA_REG_PITCH, pPixmap->devKind / (pPixmap->drawable.bitsPerPixel >> 3)); - MGA_OUT32 (mmio, MGA_REG_DWGCTL, cmd); - MGA_OUT32 (mmio, MGA_REG_FCOL, fg); - MGA_OUT32 (mmio, MGA_REG_PLNWT, pm); - - return TRUE; -} - -static void -mgaSolid (int x1, int y1, int x2, int y2) -{ - mgaWaitAvail (2); - MGA_OUT32 (mmio, MGA_REG_FXBNDRY, (x2 << 16) | (x1 & 0xffff)); - MGA_OUT32 (mmio, MGA_REG_YDSTLEN | MGA_REG_EXEC, (y1 << 16) | (y2 - y1)); -} - -static void -mgaDoneSolid (void) -{ -} - -#define BLIT_LEFT 1 -#define BLIT_UP 4 - -static Bool -mgaPrepareCopy (PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, - int dx, int dy, int alu, Pixel pm) -{ - KdScreenPriv(pSrcPixmap->drawable.pScreen); - int cmd; - - cmd = MGA_OPCOD_BITBLT | MGA_DWGCTL_BFCOL | MGA_DWGCTL_SHIFTZERO | mgaRop[alu]; - - dir = 0; - - if (dy < 0) - dir |= BLIT_UP; - if (dx < 0) - dir |= BLIT_LEFT; - - mgaSetup (pSrcPixmap->drawable.pScreen, - pDstPixmap->drawable.bitsPerPixel, 7); - - MGA_OUT32 (mmio, MGA_REG_SRCORG, ((int)pSrcPixmap->devPrivate.ptr - - (int)pScreenPriv->screen->memory_base)); - MGA_OUT32 (mmio, MGA_REG_DSTORG, ((int)pDstPixmap->devPrivate.ptr - - (int)pScreenPriv->screen->memory_base)); - MGA_OUT32 (mmio, MGA_REG_PITCH, (pDstPixmap->devKind / - (pDstPixmap->drawable.bitsPerPixel >> 3))); - src_pitch = pSrcPixmap->devKind / (pSrcPixmap->drawable.bitsPerPixel >> 3); - - MGA_OUT32 (mmio, MGA_REG_DWGCTL, cmd); - MGA_OUT32 (mmio, MGA_REG_SGN, dir); - MGA_OUT32 (mmio, MGA_REG_PLNWT, pm); - MGA_OUT32 (mmio, MGA_REG_AR5, src_pitch * (dy < 0 ? -1 : 1) ); - - return TRUE; -} - -static void -mgaCopy (int srcX, int srcY, int dstX, int dstY, int w, int h) -{ - int start, end; - if (dir & BLIT_UP) - { - srcY += h - 1; - dstY += h - 1; - } - - w--; - start = end = srcY * src_pitch + srcX; - - if (dir & BLIT_LEFT) - start += w; - else - end += w; - - mgaWaitAvail (4); - MGA_OUT32 (mmio, MGA_REG_AR0, end); - MGA_OUT32 (mmio, MGA_REG_AR3, start); - MGA_OUT32 (mmio, MGA_REG_FXBNDRY, ((dstX + w) << 16) | (dstX & 0xffff)); - MGA_OUT32 (mmio, MGA_REG_YDSTLEN | MGA_REG_EXEC, (dstY << 16) | h); -} - -static void -mgaDoneCopy (void) -{ -} - -#if 0 -static Bool -mgaUploadToScreen(PixmapPtr pDst, char *src, int src_pitch) { - /*fprintf(stderr,"Upload to Screen %p [%d]\n",src,src_pitch);*/ - return TRUE; -} -#endif - -Bool -mgaDrawInit (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - mgaScreenInfo (pScreenPriv); - KdCardInfo *card = pScreenPriv->card; - - memset(&mgas->kaa, 0, sizeof(KaaScreenInfoRec)); - mgas->kaa.waitMarker = mgaWaitMarker; - mgas->kaa.PrepareSolid = mgaPrepareSolid; - mgas->kaa.Solid = mgaSolid; - mgas->kaa.DoneSolid = mgaDoneSolid; - mgas->kaa.PrepareCopy = mgaPrepareCopy; - mgas->kaa.Copy = mgaCopy; - mgas->kaa.DoneCopy = mgaDoneCopy; - /* In PW24 mode, we need to align to "3 64-bytes" */ - mgas->kaa.offsetAlign = 192; - /* Pitch alignment is in sets of 32 pixels, and we need to cover 32bpp, so - * 128 bytes - */ - mgas->kaa.pitchAlign = 128; - mgas->kaa.flags = KAA_OFFSCREEN_PIXMAPS; - - if (card->attr.deviceID == MGA_G4XX_DEVICE_ID) { - mgas->kaa.CheckComposite = mgaCheckComposite; - mgas->kaa.PrepareComposite = mgaPrepareComposite; - mgas->kaa.Composite = mgaComposite; - mgas->kaa.DoneComposite = mgaDoneComposite; - } - - /*mgas->kaa.UploadToScreen=mgaUploadToScreen;*/ - - if (!kaaDrawInit (pScreen, &mgas->kaa)) - return FALSE; - - return TRUE; -} - -void -mgaDrawEnable (ScreenPtr pScreen) -{ - KdScreenPriv (pScreen); - mgaScreenInfo (pScreenPriv); - - mgas->pitch = pScreenPriv->screen->width; - - switch (pScreenPriv->screen->fb[0].depth) { - case 8: - mgas->pw = MGA_PW8; - break; - case 16: - mgas->pw = MGA_PW16; - break; - case 24: - case 32: - mgas->pw = MGA_PW24; - break; - default: - FatalError ("unsupported pixel format"); - } - - kaaMarkSync (pScreen); -} - -void -mgaDrawDisable (ScreenPtr pScreen) -{ - kaaWaitSync(pScreen); -} - -void -mgaDrawFini (ScreenPtr pScreen) -{ -} - diff --git a/hw/kdrive/mga/mgastub.c b/hw/kdrive/mga/mgastub.c deleted file mode 100644 index 61e6963b8..000000000 --- a/hw/kdrive/mga/mgastub.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright © 2003 Anders Carlsson - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Anders Carlsson not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Anders Carlsson makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ANDERS CARLSSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ANDERS CARLSSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -#ifdef HAVE_CONFIG_H -#include -#endif -#include "mga.h" - -void -InitCard (char *name) -{ - KdCardAttr attr; - - if (LinuxFindPci (0x102b, 0x0525, 0, &attr)) - KdCardInfoAdd (&mgaFuncs, &attr, 0); -} - -void -InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) -{ - KdInitOutput (pScreenInfo, argc, argv); -} - -void -InitInput (int argc, char **argv) -{ - KdOsAddInputDrivers (); - KdInitInput (); -} - -void -ddxUseMsg (void) -{ - KdUseMsg(); - vesaUseMsg(); -} - -int -ddxProcessArgument (int argc, char **argv, int i) -{ - int ret; - - if (!(ret = vesaProcessArgument (argc, argv, i))) - ret = KdProcessArgument(argc, argv, i); - return ret; -} diff --git a/hw/kdrive/neomagic/Makefile.am b/hw/kdrive/neomagic/Makefile.am deleted file mode 100644 index b449c37c5..000000000 --- a/hw/kdrive/neomagic/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -if KDRIVEFBDEV -FBDEV_INCLUDES =-I$(top_srcdir)/hw/kdrive/fbdev -FBDEV_LIBS = $(top_builddir)/hw/kdrive/fbdev/libfbdev.a -endif - -if KDRIVEVESA -VESA_INCLUDES = -I$(top_srcdir)/hw/kdrive/vesa -VESA_LIBS = $(top_builddir)/hw/kdrive/vesa/libvesa.a -endif - -INCLUDES = \ - @KDRIVE_INCS@ \ - $(FBDEV_INCLUDES) \ - $(VESA_INCLUDES) \ - @KDRIVE_CFLAGS@ - -bin_PROGRAMS = Xneomagic - -noinst_LIBRARIES = libneomagic.a - -libneomagic_a_SOURCES = \ - neomagic.c \ - neomagic.h \ - neo_draw.c - -Xneomagic_SOURCES = \ - neomagicstub.c - -NEOMAGIC_LIBS = \ - libneomagic.a \ - ${FBDEV_LIBS} \ - ${VESA_LIBS} \ - @KDRIVE_LIBS@ - -if GLX -Xneomagic_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -endif - -Xneomagic_LDADD = \ - $(NEOMAGIC_LIBS) \ - @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ - -Xneomagic_DEPENDENCIES = \ - libneomagic.a \ - @KDRIVE_LOCAL_LIBS@ - -relink: - rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS) diff --git a/hw/kdrive/neomagic/README b/hw/kdrive/neomagic/README deleted file mode 100644 index 2b086d75c..000000000 --- a/hw/kdrive/neomagic/README +++ /dev/null @@ -1,15 +0,0 @@ -Neomagic KDrive driver for xserver - -This is a very simple implementation for Neomagic based cards. -Almost all functions are handled by the VESA driver, and -only solid drawing and bitblt are done with acceleration, - -This driver has been tested in MagicGraph 256AV+(NM2230) card -but it should work on other cards as well. - -The only warning is to choose a working mode. You can ask -for supported modes using -listmodes. I use -mode 0x117. - --- -Franco Catrin L. -fcatrin@tuxpan.com diff --git a/hw/kdrive/neomagic/neo_draw.c b/hw/kdrive/neomagic/neo_draw.c deleted file mode 100644 index 89452b3d8..000000000 --- a/hw/kdrive/neomagic/neo_draw.c +++ /dev/null @@ -1,210 +0,0 @@ -/* - * - * Copyright © 2004 Franco Catrin - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Franco Catrin not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Franco Catrin makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * FRANCO CATRIN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL FRANCO CATRIN BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "neomagic.h" - -#include -#include "gcstruct.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "regionstr.h" -#include "mistruct.h" -#include "dixfontstr.h" -#include "fb.h" -#include "migc.h" -#include "miline.h" -#include "picturestr.h" - -NeoMMIO *mmio; -NeoScreenInfo *screen; -NeoCardInfo *card; -CARD32 fgColor; -CARD32 rop; - -CARD32 neoRop[16] = { - 0x000000, /* GXclear */ - 0x080000, /* GXand */ - 0x040000, /* GXandReverse */ - 0x0c0000, /* GXcopy */ - 0x020000, /* GXandInvert */ - 0x0a0000, /* GXnoop */ - 0x060000, /* GXxor */ - 0x0e0000, /* GXor */ - 0x010000, /* GXnor */ - 0x090000, /* GXequiv */ - 0x050000, /* GXinvert */ - 0x0d0000, /* GXorReverse */ - 0x030000, /* GXcopyInvert */ - 0x0b0000, /* GXorInverted */ - 0x070000, /* GXnand */ - 0x0f0000 /* GXset */ -}; - -static void neoWaitIdle(NeoCardInfo *neoc) -{ - // if MMIO is not working it may halt the machine - unsigned int i = 0; - while ((mmio->bltStat & 1) && ++i<100000); -} - -static void neoWaitMarker (ScreenPtr pScreen, int marker) -{ - KdScreenPriv(pScreen); - neoCardInfo(pScreenPriv); - - neoWaitIdle(neoc); -} - - -static Bool neoPrepareSolid(PixmapPtr pPixmap, - int alu, - Pixel pm, - Pixel fg) -{ - FbBits depthMask = FbFullMask(pPixmap->drawable.depth); - if ((pm & depthMask) != depthMask) { - return FALSE; - } else { - fgColor = fg; - if (alu!=3) DBGOUT("used ROP %i\n", alu); - rop = neoRop[alu]; - return TRUE; - } -} - -static void neoSolid (int x1, int y1, int x2, int y2) -{ - int x, y, w, h; - x = x1; - y = y1; - w = x2-x1; - h = y2-y1; - neoWaitIdle(card); - mmio->fgColor = fgColor; - mmio->bltCntl = - NEO_BC3_FIFO_EN | - NEO_BC0_SRC_IS_FG | - NEO_BC3_SKIP_MAPPING | rop; - mmio->dstStart = y * screen->pitch + x * screen->depth; - - mmio->xyExt = (unsigned long)(h << 16) | (w & 0xffff); - -} - - -static void neoDoneSolid(void) -{ -} - -static Bool neoPrepareCopy (PixmapPtr pSrcPixpam, PixmapPtr pDstPixmap, - int dx, int dy, int alu, Pixel pm) -{ - rop = neoRop[alu]; - return TRUE; -} - -static void neoCopy (int srcX, int srcY, int dstX, int dstY, int w, int h) -{ - neoWaitIdle(card); - - if ((dstY < srcY) || ((dstY == srcY) && (dstX < srcX))) { - mmio->bltCntl = - NEO_BC3_FIFO_EN | - NEO_BC3_SKIP_MAPPING | rop; - mmio->srcStart = srcY * screen->pitch + srcX * screen->depth; - mmio->dstStart = dstY * screen->pitch + dstX * screen->depth; - - mmio->xyExt = (unsigned long)(h << 16) | (w & 0xffff); - } else { - mmio->bltCntl = NEO_BC0_X_DEC | - NEO_BC0_DST_Y_DEC | - NEO_BC0_SRC_Y_DEC | - NEO_BC3_FIFO_EN | - NEO_BC3_SKIP_MAPPING | rop; - srcX+=w-1; - dstX+=w-1; - srcY+=h-1; - dstY+=h-1; - mmio->srcStart = srcY * screen->pitch + srcX * screen->depth; - mmio->dstStart = dstY * screen->pitch + dstX * screen->depth; - mmio->xyExt = (unsigned long)(h << 16) | (w & 0xffff); - } - -} - -static void neoDoneCopy (void) -{ -} - - -Bool neoDrawInit (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - neoScreenInfo(pScreenPriv); - - ENTER(); - - memset(&neos->kaa, 0, sizeof(KaaScreenInfoRec)); - neos->kaa.waitMarker = neoWaitMarker; - neos->kaa.PrepareSolid = neoPrepareSolid; - neos->kaa.Solid = neoSolid; - neos->kaa.DoneSolid = neoDoneSolid; - neos->kaa.PrepareCopy = neoPrepareCopy; - neos->kaa.Copy = neoCopy; - neos->kaa.DoneCopy = neoDoneCopy; - - if (!kaaDrawInit (pScreen, &neos->kaa)) { - return FALSE; - } - LEAVE(); - return TRUE; -} - -void neoDrawEnable (ScreenPtr pScreen) -{ - ENTER(); - SetupNeo(pScreen); - screen = neos; - card = neoc; - mmio = neoc->mmio; - screen->depth = (screen->backendScreen.mode.BitsPerPixel+7)/8; - screen->pitch = screen->backendScreen.mode.BytesPerScanLine; - DBGOUT("NEO depth=%x, pitch=%x\n", screen->depth, screen->pitch); - LEAVE(); -} - -void neoDrawDisable (ScreenPtr pScreen) -{ - ENTER(); - LEAVE(); -} - -void neoDrawFini (ScreenPtr pScreen) -{ - ENTER(); - LEAVE(); -} - diff --git a/hw/kdrive/neomagic/neomagic.c b/hw/kdrive/neomagic/neomagic.c deleted file mode 100644 index ac0c7569a..000000000 --- a/hw/kdrive/neomagic/neomagic.c +++ /dev/null @@ -1,335 +0,0 @@ -/* - * - * Copyright © 2004 Franco Catrin - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Franco Catrin not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Franco Catrin makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * FRANCO CATRIN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL FRANCO CATRIN BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "neomagic.h" -#include - -struct NeoChipInfo neoChips[] = { - {NEO_VENDOR, 0x0001, CAP_NM2070, "MagicGraph 128(NM2070)", - 896, 65000, 2048, 0x100, 1024, 1024, 1024}, - {NEO_VENDOR, 0x0002, CAP_NM2090, "MagicGraph 128V(NM2090)", - 1152, 80000, 2048, 0x100, 2048, 1024, 1024}, - {NEO_VENDOR, 0x0003, CAP_NM2090, "MagicGraph 128ZV(NM2093)", - 1152, 80000, 2048, 0x100, 2048, 1024, 1024}, - {NEO_VENDOR, 0x0083, CAP_NM2097, "MagicGraph 128ZV+(NM2097)", - 1152, 80000, 1024, 0x100, 2048, 1024, 1024}, - {NEO_VENDOR, 0x0004, CAP_NM2097, "MagicGraph 128XD(NM2160)", - 2048, 90000, 1024, 0x100, 2048, 1024, 1024}, - {NEO_VENDOR, 0x0005, CAP_NM2200, "MagicGraph 256AV(NM2200)", - 2560, 110000, 1024, 0x1000, 4096, 1280, 1024}, - {NEO_VENDOR, 0x0025, CAP_NM2200, "MagicGraph 256AV+(NM2230)", - 3008, 110000, 1024, 0x1000, 4096, 1280, 1024}, - {NEO_VENDOR, 0x0006, CAP_NM2200, "MagicGraph 256ZX(NM2360)", - 4096, 110000, 1024, 0x1000, 4096, 1280, 1024}, - {NEO_VENDOR, 0x0016, CAP_NM2200, "MagicGraph 256XL+(NM2380)", - 6144, 110000, 1024, 0x1000, 8192, 1280, 1024}, - {0, 0, 0, NULL}, -}; - -static Bool -neoCardInit(KdCardInfo *card) -{ - NeoCardInfo *neoc; - struct NeoChipInfo *chip; - - neoc =(NeoCardInfo *) xalloc(sizeof(NeoCardInfo)); - if(!neoc) { - return FALSE; - } - - if(!vesaInitialize(card, &neoc->backendCard)) { - xfree(neoc); - return FALSE; - } - - for(chip = neoChips; chip->name != NULL; ++chip) { - if(chip->device == card->attr.deviceID) { - neoc->chip = chip; - break; - } - } - - ErrorF("Using Neomagic card: %s\n", neoc->chip->name); - - neoMapReg(card, neoc); - - card->driver = neoc; - - return TRUE; -} - -static Bool -neoScreenInit(KdScreenInfo *screen) -{ - NeoScreenInfo *neos; - int screen_size, memory; - - neos = xcalloc(sizeof(NeoScreenInfo), 1); - if(neos == NULL) { - return FALSE; - } - - memset (neos, '\0', sizeof (NeoScreenInfo)); - - - if(!vesaScreenInitialize(screen, &neos->backendScreen)) { - xfree(neos); - return FALSE; - } - - screen->softCursor = TRUE; // no hardware color cursor available - - neos->screen = neos->backendScreen.fb; - - memory = neos->backendScreen.fb_size; - screen_size = screen->fb[0].byteStride * screen->height; - memory -= screen_size; - - if(memory > screen->fb[0].byteStride) { - neos->off_screen = neos->screen + screen_size; - neos->off_screen_size = memory; - } else { - neos->off_screen = 0; - neos->off_screen_size = 0; - } - - screen->driver = neos; - - return TRUE; -} - -static Bool -neoInitScreen(ScreenPtr pScreen) -{ - return vesaInitScreen(pScreen); -} - -static Bool -neoFinishInitScreen(ScreenPtr pScreen) -{ - return vesaFinishInitScreen(pScreen); -} - -static Bool -neoCreateResources(ScreenPtr pScreen) -{ - return vesaCreateResources(pScreen); -} - -void -neoPreserve(KdCardInfo *card) -{ - vesaPreserve(card); -} - -CARD8 -neoGetIndex(NeoCardInfo *nvidiac, CARD16 addr, CARD8 index) -{ - outb(index, addr); - - return inb(addr+1); -} - -void -neoSetIndex(NeoCardInfo *nvidiac, CARD16 addr, CARD8 index, CARD8 val) -{ - outb(index, addr); - outb(val, addr+1); -} - -static void neoLock(NeoCardInfo *neoc){ - CARD8 cr11; - neoSetIndex(neoc, 0x3ce, 0x09, 0x00); - neoSetIndex(neoc, 0x3ce, 0x11, 0x0); // disable MMIO and linear mode - cr11 = neoGetIndex(neoc, 0x3d4, 0x11); - neoSetIndex(neoc, 0x3d4, 0x11, cr11 | 0x80); -} - -static void neoUnlock(NeoCardInfo *neoc){ - CARD8 cr11; - cr11 = neoGetIndex(neoc, 0x3d4, 0x11); - neoSetIndex(neoc, 0x3d4, 0x11, cr11 & 0x7F); - neoSetIndex(neoc, 0x3ce, 0x09, 0x26); - neoSetIndex(neoc, 0x3ce, 0x11, 0xc0); // enable MMIO and linear mode -} - - -Bool -neoMapReg(KdCardInfo *card, NeoCardInfo *neoc) -{ - neoc->reg_base = card->attr.address[1] & 0xFFF80000; - if(!neoc->reg_base) { - return FALSE; - } - - neoc->mmio = KdMapDevice(neoc->reg_base, NEO_REG_SIZE(card)); - if(!neoc->mmio) { - return FALSE; - } - - KdSetMappedMode(neoc->reg_base, NEO_REG_SIZE(card), KD_MAPPED_MODE_REGISTERS); - - return TRUE; -} - -void -neoUnmapReg(KdCardInfo *card, NeoCardInfo *neoc) -{ - if(neoc->reg_base) - { - neoSetIndex(neoc, 0x3ce, 0x82,0); - KdResetMappedMode(neoc->reg_base, NEO_REG_SIZE(card), KD_MAPPED_MODE_REGISTERS); - KdUnmapDevice((void *)neoc->mmio, NEO_REG_SIZE(card)); - neoc->reg_base = 0; - } -} - -static void -neoSetMMIO(KdCardInfo *card, NeoCardInfo *neoc) -{ - if(!neoc->reg_base) - neoMapReg(card, neoc); - neoUnlock(neoc); -} - -static void -neoResetMMIO(KdCardInfo *card, NeoCardInfo *neoc) -{ - neoUnmapReg(card, neoc); - neoLock(neoc); -} - - -Bool -neoEnable(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - neoCardInfo(pScreenPriv); - - if(!vesaEnable(pScreen)) { - return FALSE; - } - - neoSetMMIO(pScreenPriv->card, neoc); - return TRUE; -} - -void -neoDisable(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - neoCardInfo(pScreenPriv); - - neoResetMMIO(pScreenPriv->card, neoc); - - vesaDisable(pScreen); -} - -static void -neoGetColors(ScreenPtr pScreen, int fb, int n, xColorItem *pdefs) -{ - vesaGetColors(pScreen, fb, n, pdefs); -} - -static void -neoPutColors(ScreenPtr pScreen, int fb, int n, xColorItem *pdefs) -{ - vesaPutColors(pScreen, fb, n, pdefs); -} - -static Bool -neoDPMS(ScreenPtr pScreen, int mode) -{ - return vesaDPMS(pScreen, mode); -} - -static void -neoRestore(KdCardInfo *card) -{ - NeoCardInfo *neoc = card->driver; - - neoResetMMIO(card, neoc); - vesaRestore(card); -} - -static void -neoScreenFini(KdScreenInfo *screen) -{ - NeoScreenInfo *neos =(NeoScreenInfo *) screen->driver; - - vesaScreenFini(screen); - xfree(neos); - screen->driver = 0; -} - -static void -neoCardFini(KdCardInfo *card) -{ - NeoCardInfo *neoc = card->driver; - - neoUnmapReg(card, neoc); - vesaCardFini(card); -} - -#define neoCursorInit 0 // initCursor -#define neoCursorEnable 0 // enableCursor -#define neoCursorDisable 0 // disableCursor -#define neoCursorFini 0 // finiCursor */ -#define neoRecolorCursor 0 // recolorCursor */ -//#define neoDrawInit 0 // initAccel -//#define neoDrawEnable 0 // enableAccel -//#define neoDrawSync 0 // syncAccel -//#define neoDrawDisable 0 // disableAccel -//#define neoDrawFini 0 // finiAccel - -KdCardFuncs neoFuncs = { - neoCardInit, // cardinit - neoScreenInit, // scrinit - neoInitScreen, // initScreen - neoFinishInitScreen, // finishInitScreen - neoCreateResources, // createRes - neoPreserve, // preserve - neoEnable, // enable - neoDPMS, // dpms - neoDisable, // disable - neoRestore, // restore - neoScreenFini, // scrfini - neoCardFini, // cardfini - - neoCursorInit, // initCursor - neoCursorEnable, // enableCursor - neoCursorDisable, // disableCursor - neoCursorFini, // finiCursor - neoRecolorCursor, // recolorCursor - - neoDrawInit, // initAccel - neoDrawEnable, // enableAccel - neoDrawDisable, // disableAccel - neoDrawFini, // finiAccel - - neoGetColors, // getColors - neoPutColors, // putColors -}; diff --git a/hw/kdrive/neomagic/neomagic.h b/hw/kdrive/neomagic/neomagic.h deleted file mode 100644 index 9b100051b..000000000 --- a/hw/kdrive/neomagic/neomagic.h +++ /dev/null @@ -1,210 +0,0 @@ -/* - * - * Copyright © 2004 Franco Catrin - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Franco Catrin not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Franco Catrin makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * FRANCO CATRIN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL FRANCO CATRIN BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _NEOMAGIC_H_ -#define _NEOMAGIC_H_ -#include -#include "kxv.h" -#include "klinux.h" -#include "vesa.h" - - -#define DBGOUT DebugF - -#define ENTER() DBGOUT("Enter %s\n", __FUNCTION__) -#define LEAVE() DBGOUT("Leave %s\n", __FUNCTION__) - -#define NEO_VENDOR 0x10c8 -#define CAP_NM2070 0x01 /* If it's a NM2070 series */ -#define CAP_NM2090 0x02 /* If it's a NM2090 series */ -#define CAP_NM2097 0x03 /* If it's a NM2097 series */ -#define CAP_NM2200 0x04 /* If it's a NM2200 series */ - -#define NEO_BS0_BLT_BUSY 0x00000001 -#define NEO_BS0_FIFO_AVAIL 0x00000002 -#define NEO_BS0_FIFO_PEND 0x00000004 - -#define NEO_BC0_DST_Y_DEC 0x00000001 -#define NEO_BC0_X_DEC 0x00000002 -#define NEO_BC0_SRC_TRANS 0x00000004 -#define NEO_BC0_SRC_IS_FG 0x00000008 -#define NEO_BC0_SRC_Y_DEC 0x00000010 -#define NEO_BC0_FILL_PAT 0x00000020 -#define NEO_BC0_SRC_MONO 0x00000040 -#define NEO_BC0_SYS_TO_VID 0x00000080 - -#define NEO_BC1_DEPTH8 0x00000100 -#define NEO_BC1_DEPTH16 0x00000200 -#define NEO_BC1_X_320 0x00000400 -#define NEO_BC1_X_640 0x00000800 -#define NEO_BC1_X_800 0x00000c00 -#define NEO_BC1_X_1024 0x00001000 -#define NEO_BC1_X_1152 0x00001400 -#define NEO_BC1_X_1280 0x00001800 -#define NEO_BC1_X_1600 0x00001c00 -#define NEO_BC1_DST_TRANS 0x00002000 -#define NEO_BC1_MSTR_BLT 0x00004000 -#define NEO_BC1_FILTER_Z 0x00008000 - -#define NEO_BC2_WR_TR_DST 0x00800000 - -#define NEO_BC3_SRC_XY_ADDR 0x01000000 -#define NEO_BC3_DST_XY_ADDR 0x02000000 -#define NEO_BC3_CLIP_ON 0x04000000 -#define NEO_BC3_FIFO_EN 0x08000000 -#define NEO_BC3_BLT_ON_ADDR 0x10000000 -#define NEO_BC3_SKIP_MAPPING 0x80000000 - -#define NEO_MODE1_DEPTH8 0x0100 -#define NEO_MODE1_DEPTH16 0x0200 -#define NEO_MODE1_DEPTH24 0x0300 -#define NEO_MODE1_X_320 0x0400 -#define NEO_MODE1_X_640 0x0800 -#define NEO_MODE1_X_800 0x0c00 -#define NEO_MODE1_X_1024 0x1000 -#define NEO_MODE1_X_1152 0x1400 -#define NEO_MODE1_X_1280 0x1800 -#define NEO_MODE1_X_1600 0x1c00 -#define NEO_MODE1_BLT_ON_ADDR 0x2000 - -typedef volatile CARD8 VOL8; -typedef volatile CARD16 VOL16; -typedef volatile CARD32 VOL32; - -#define NEO_REG_SIZE(c) (0x200000L) - -typedef volatile struct { - CARD32 bltStat; - CARD32 bltCntl; - CARD32 xpColor; - CARD32 fgColor; - CARD32 bgColor; - CARD32 pitch; - CARD32 clipLT; - CARD32 clipRB; - CARD32 srcBitOffset; - CARD32 srcStart; - CARD32 reserved0; - CARD32 dstStart; - CARD32 xyExt; - - CARD32 reserved1[19]; - - CARD32 pageCntl; - CARD32 pageBase; - CARD32 postBase; - CARD32 postPtr; - CARD32 dataPtr; -} NeoMMIO; - -typedef struct _neoCardInfo { - VesaCardPrivRec backendCard; - - CARD32 reg_base; - NeoMMIO *mmio; - int dstOrg; - int dstPitch; - int dstPixelWidth; - - int srcOrg; - int srcPitch; - int srcPixelWidth; - - struct NeoChipInfo *chip; - - CARD32 bltCntl; - -} NeoCardInfo; - -struct NeoChipInfo { - CARD16 vendor; - CARD16 device; - CARD8 caps; - char *name; - int videoRam; - int maxClock; - int cursorMem; - int cursorOff; - int linearSize; - int maxWidth; - int maxHeight; -}; - -#define getNeoCardInfo(kd) ((NeoCardInfo *) ((kd)->card->driver)) -#define neoCardInfo(kd) NeoCardInfo *neoc = getNeoCardInfo(kd) - -typedef struct _neoScreenInfo { - VesaScreenPrivRec backendScreen; - - CARD8 *screen; - CARD8 *off_screen; - int off_screen_size; - int pitch; - int depth; - KdVideoAdaptorPtr pAdaptor; - KaaScreenInfoRec kaa; -} NeoScreenInfo; - -#define getNeoScreenInfo(kd) ((NeoScreenInfo *) ((kd)->screen->driver)) -#define neoScreenInfo(kd) NeoScreenInfo *neos = getNeoScreenInfo(kd) - -#define SetupNeo(s) KdScreenPriv(s); \ - neoCardInfo(pScreenPriv); \ - neoScreenInfo(pScreenPriv); - -void -neoPreserve (KdCardInfo *card); - -Bool -neoEnable (ScreenPtr pScreen); - -void -neoDisable (ScreenPtr pScreen); - -Bool -neoMapReg (KdCardInfo *card, NeoCardInfo *nvidiac); - -void -neoUnmapReg (KdCardInfo *card, NeoCardInfo *nvidiac); - -CARD8 -neoGetIndex (NeoCardInfo *nvidiac, CARD16 addr, CARD8 id); - -void -neoSetIndex (NeoCardInfo *nvidiac, CARD16 addr, CARD8 id, CARD8 val); - -Bool -neoDrawInit (ScreenPtr pScreen); - -void -neoDrawEnable (ScreenPtr pScreen); - -void -neoDrawDisable (ScreenPtr pScreen); - -void -neoDrawFini (ScreenPtr pScreen); - -extern KdCardFuncs neoFuncs; - -#endif /* _NEOMAGIC_H_ */ diff --git a/hw/kdrive/neomagic/neomagicstub.c b/hw/kdrive/neomagic/neomagicstub.c deleted file mode 100644 index c7ec83b44..000000000 --- a/hw/kdrive/neomagic/neomagicstub.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - * - * Copyright © 2004 Franco Catrin - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Franco Catrin not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Franco Catrin makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * FRANCO CATRIN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL FRANCO CATRIN BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "neomagic.h" - -extern struct NeoChipInfo neoChips[]; - -void -InitCard (char *name) -{ - KdCardAttr attr; - struct NeoChipInfo *chip; - - for (chip = neoChips; chip->name != NULL; ++chip) { - int j = 0; - while (LinuxFindPci(chip->vendor, chip->device, j++, &attr)) { - KdCardInfoAdd(&neoFuncs, &attr, 0); - } - } -} - -void -InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) -{ - KdInitOutput (pScreenInfo, argc, argv); -} - -void -InitInput (int argc, char **argv) -{ - KdOsAddInputDrivers (); - KdInitInput (); -} - -void -ddxUseMsg (void) -{ - KdUseMsg(); - vesaUseMsg(); -} - -int -ddxProcessArgument (int argc, char **argv, int i) -{ - int ret; - - if (!(ret = vesaProcessArgument (argc, argv, i))) - ret = KdProcessArgument(argc, argv, i); - return ret; -} diff --git a/hw/kdrive/nvidia/Makefile.am b/hw/kdrive/nvidia/Makefile.am deleted file mode 100644 index 81736c311..000000000 --- a/hw/kdrive/nvidia/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -INCLUDES = \ - @KDRIVE_INCS@ \ - -I$(top_srcdir)/hw/kdrive/vesa \ - @KDRIVE_CFLAGS@ - -bin_PROGRAMS = Xnvidia - -noinst_LIBRARIES = libnvidia.a - -# nvidiavideo.c - -libnvidia_a_SOURCES = \ - nvidia.c \ - nvidiadraw.c \ - nvidia.h \ - nvidiadraw.h - -Xnvidia_SOURCES = \ - nvidiastub.c - -NVIDIA_LIBS = \ - libnvidia.a \ - $(top_builddir)/hw/kdrive/vesa/libvesa.a \ - @KDRIVE_LIBS@ - -if GLX -Xnvidia_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -endif - -Xnvidia_LDADD = \ - $(NVIDIA_LIBS) \ - @KDRIVE_LIBS@ - -Xnvidia_DEPENDENCIES = \ - libnvidia.a \ - @KDRIVE_LOCAL_LIBS@ - -relink: - rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS) diff --git a/hw/kdrive/nvidia/nvidia.c b/hw/kdrive/nvidia/nvidia.c deleted file mode 100644 index be42e561a..000000000 --- a/hw/kdrive/nvidia/nvidia.c +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Copyright © 2003 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "nvidia.h" -#include "kaa.h" -#include - -static Bool -nvidiaCardInit (KdCardInfo *card) -{ - NvidiaCardInfo *nvidiac; - - nvidiac = (NvidiaCardInfo *) xalloc (sizeof (NvidiaCardInfo)); - if (!nvidiac) - return FALSE; - - (void) nvidiaMapReg (card, nvidiac); - - if (!vesaInitialize (card, &nvidiac->vesa)) - { - xfree (nvidiac); - return FALSE; - } - - card->driver = nvidiac; - - return TRUE; -} - -static Bool -nvidiaScreenInit (KdScreenInfo *screen) -{ - NvidiaCardInfo *nvidiac = screen->card->driver; - NvidiaScreenInfo *nvidias; - int screen_size, memory; - - nvidias = (NvidiaScreenInfo *) xalloc (sizeof (NvidiaScreenInfo)); - if (!nvidias) - return FALSE; - memset (nvidias, '\0', sizeof (NvidiaScreenInfo)); - if (!vesaScreenInitialize (screen, &nvidias->vesa)) - { - xfree (nvidias); - return FALSE; - } - if (!nvidiac->reg_base) - screen->dumb = TRUE; - if (nvidias->vesa.mapping != VESA_LINEAR) - screen->dumb = TRUE; - nvidias->screen = nvidias->vesa.fb; - memory = nvidias->vesa.fb_size; - screen_size = screen->fb[0].byteStride * screen->height; - if (nvidias->screen && memory >= screen_size + 2048) - { - memory -= 2048; - nvidias->cursor_base = nvidias->screen + memory - 2048; - } - else - nvidias->cursor_base = 0; - screen->softCursor = TRUE; /* XXX for now */ - memory -= screen_size; - if (memory > screen->fb[0].byteStride) - { - nvidias->off_screen = nvidias->screen + screen_size; - nvidias->off_screen_size = memory; - } - else - { - nvidias->off_screen = 0; - nvidias->off_screen_size = 0; - } - screen->driver = nvidias; - return TRUE; -} - -static Bool -nvidiaInitScreen (ScreenPtr pScreen) -{ -#if 0 -#ifdef XV - KdScreenPriv(pScreen); - NvidiaCardInfo *nvidiac = pScreenPriv->screen->card->driver; - if (nvidiac->media_reg && nvidiac->reg) - nvidiaInitVideo(pScreen); -#endif -#endif - return vesaInitScreen (pScreen); -} - -#ifdef RANDR -static Bool -nvidiaRandRSetConfig (ScreenPtr pScreen, - Rotation rotation, - int rate, - RRScreenSizePtr pSize) -{ - kaaWaitSync (pScreen); - - if (!vesaRandRSetConfig (pScreen, rotation, rate, pSize)) - return FALSE; - - return TRUE; -} - -static void -nvidiaRandRInit (ScreenPtr pScreen) -{ - rrScrPriv(pScreen); - - pScrPriv->rrSetConfig = nvidiaRandRSetConfig; -} -#endif - -static Bool -nvidiaFinishInitScreen (ScreenPtr pScreen) -{ - Bool ret; - ret = vesaFinishInitScreen (pScreen); -#ifdef RANDR - nvidiaRandRInit (pScreen); -#endif - return ret; -} - -void -nvidiaPreserve (KdCardInfo *card) -{ - vesaPreserve(card); -} - -void -nvidiaOutb (NvidiaCardInfo *nvidiac, CARD16 port, CARD8 val) -{ - asm volatile ("outb %b0,%w1" : : "a" (val), "d" (port)); -} - -CARD8 -nvidiaInb (NvidiaCardInfo *nvidiac, CARD16 port) -{ - CARD8 v; - asm volatile ("inb %w1,%b0" : "=a" (v) : "d" (port)); - return v; -} - -CARD8 -nvidiaGetIndex (NvidiaCardInfo *nvidiac, CARD16 addr, CARD16 data, CARD8 id) -{ - CARD8 ret; - DBGOUT ("nvidiaGetIndex(0x%x,0x%x)\n", addr, id); - nvidiaOutb (nvidiac, addr, id); - ret = nvidiaInb (nvidiac, data); - DBGOUT (" -> 0x%x\n", ret); - return ret; -} - -void -nvidiaSetIndex (NvidiaCardInfo *nvidiac, CARD16 addr, CARD16 data, CARD8 id, CARD8 val) -{ - DBGOUT ("nvidiaSetIndex(0x%x,0x%x) = 0x%x\n", addr, id, val); - nvidiaOutb (nvidiac, addr, id); - nvidiaOutb (nvidiac, data, val); -} - -static void vgaLockUnlock (NvidiaCardInfo *nvidiac, Bool lock) -{ - CARD8 cr11; - ENTER (); - cr11 = nvidiaGetIndex (nvidiac, 0x3d4, 0x3d5, 0x11); - if (lock) cr11 |= 0x80; - else cr11 &= ~0x80; - nvidiaSetIndex (nvidiac, 0x3d4, 0x3d5, 0x11, cr11); - LEAVE (); -} - -static void nvidiaLockUnlock (NvidiaCardInfo *nvidiac, Bool lock) -{ - if (NVIDIA_IS_3(nvidiac)) - nvidiaSetIndex (nvidiac, 0x3c4, 0x3c5, 0x06, lock ? 0x99 : 0x57); - else - nvidiaSetIndex (nvidiac, 0x3c4, 0x3c5, 0x1f, lock ? 0x99 : 0x57); - vgaLockUnlock(nvidiac, lock); -} - -Bool -nvidiaMapReg (KdCardInfo *card, NvidiaCardInfo *nvidiac) -{ - nvidiac->reg_base = (CARD8 *) KdMapDevice (NVIDIA_REG_BASE(card), - NVIDIA_REG_SIZE(card)); - - if (!nvidiac->reg_base) - { - nvidiac->mmio = 0; - nvidiac->rop = 0; - nvidiac->blt = 0; - nvidiac->rect = 0; - return FALSE; - } - - nvidiac->mmio = (CARD8 *) (nvidiac->reg_base + NVIDIA_MMIO_OFF(card)); - nvidiac->rop = (NvidiaRop *) (nvidiac->reg_base + NVIDIA_ROP_OFF(card)); - nvidiac->rect = (NvidiaRectangle *) (nvidiac->reg_base + NVIDIA_RECTANGLE_OFF(card)); - nvidiac->blt = (NvidiaScreenBlt *) (nvidiac->reg_base + NVIDIA_BLT_OFF(card)); - nvidiac->busy = (NvidiaBusy *) (nvidiac->reg_base + NVIDIA_BUSY_OFF(card)); - KdSetMappedMode (NVIDIA_REG_BASE(card), - NVIDIA_REG_SIZE(card), - KD_MAPPED_MODE_REGISTERS); - return TRUE; -} - -void -nvidiaUnmapReg (KdCardInfo *card, NvidiaCardInfo *nvidiac) -{ - if (nvidiac->reg_base) - { - KdResetMappedMode (NVIDIA_REG_BASE(card), - NVIDIA_REG_SIZE(card), - KD_MAPPED_MODE_REGISTERS); - KdUnmapDevice ((void *) nvidiac->reg_base, NVIDIA_REG_SIZE(card)); - nvidiac->reg_base = 0; - nvidiac->rop = 0; - nvidiac->blt = 0; - nvidiac->rect = 0; - } -} - -void -nvidiaSetMMIO (KdCardInfo *card, NvidiaCardInfo *nvidiac) -{ - if (!nvidiac->reg_base) - nvidiaMapReg (card, nvidiac); - nvidiaLockUnlock (nvidiac, FALSE); - nvidiac->fifo_free = 0; - nvidiac->fifo_size = nvidiac->rop->FifoFree.FifoFree; -} - -void -nvidiaResetMMIO (KdCardInfo *card, NvidiaCardInfo *nvidiac) -{ - nvidiaUnmapReg (card, nvidiac); - nvidiaLockUnlock (nvidiac, TRUE); -} - -Bool -nvidiaEnable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - NvidiaCardInfo *nvidiac = pScreenPriv->card->driver; - - if (!vesaEnable (pScreen)) - return FALSE; - - nvidiaSetMMIO (pScreenPriv->card, nvidiac); -#ifdef XV - KdXVEnable (pScreen); -#endif - return TRUE; -} - -void -nvidiaDisable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - NvidiaCardInfo *nvidiac = pScreenPriv->card->driver; - -#ifdef XV - KdXVDisable (pScreen); -#endif - nvidiaResetMMIO (pScreenPriv->card, nvidiac); - vesaDisable (pScreen); -} - -static Bool -nvidiaDPMS (ScreenPtr pScreen, int mode) -{ - return vesaDPMS (pScreen, mode); -} - -static void -nvidiaRestore (KdCardInfo *card) -{ - NvidiaCardInfo *nvidiac = card->driver; - - nvidiaResetMMIO (card, nvidiac); - vesaRestore (card); -} - -static void -nvidiaScreenFini (KdScreenInfo *screen) -{ - NvidiaScreenInfo *nvidias = (NvidiaScreenInfo *) screen->driver; - - vesaScreenFini (screen); - xfree (nvidias); - screen->driver = 0; -} - -static void -nvidiaCardFini (KdCardInfo *card) -{ - NvidiaCardInfo *nvidiac = card->driver; - - nvidiaUnmapReg (card, nvidiac); - vesaCardFini (card); -} - -#define nvidiaCursorInit 0 /* initCursor */ -#define nvidiaCursorEnable 0 /* enableCursor */ -#define nvidiaCursorDisable 0 /* disableCursor */ -#define nvidiaCursorFini 0 /* finiCursor */ -#define nvidiaRecolorCursor 0 /* recolorCursor */ - -KdCardFuncs nvidiaFuncs = { - nvidiaCardInit, /* cardinit */ - nvidiaScreenInit, /* scrinit */ - nvidiaInitScreen, /* initScreen */ - nvidiaFinishInitScreen, /* finishInitScreen */ - vesaCreateResources, /* createRes */ - nvidiaPreserve, /* preserve */ - nvidiaEnable, /* enable */ - nvidiaDPMS, /* dpms */ - nvidiaDisable, /* disable */ - nvidiaRestore, /* restore */ - nvidiaScreenFini, /* scrfini */ - nvidiaCardFini, /* cardfini */ - - nvidiaCursorInit, /* initCursor */ - nvidiaCursorEnable, /* enableCursor */ - nvidiaCursorDisable, /* disableCursor */ - nvidiaCursorFini, /* finiCursor */ - nvidiaRecolorCursor, /* recolorCursor */ - - nvidiaDrawInit, /* initAccel */ - nvidiaDrawEnable, /* enableAccel */ - nvidiaDrawDisable, /* disableAccel */ - nvidiaDrawFini, /* finiAccel */ - - vesaGetColors, /* getColors */ - vesaPutColors, /* putColors */ -}; diff --git a/hw/kdrive/nvidia/nvidia.h b/hw/kdrive/nvidia/nvidia.h deleted file mode 100644 index 026233cc1..000000000 --- a/hw/kdrive/nvidia/nvidia.h +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Copyright © 2003 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _NVIDIA_H_ -#define _NVIDIA_H_ -#include -#include "kxv.h" -#include "klinux.h" - -/* - * offset from ioport beginning - */ - -#define DEBUG -#ifdef DEBUG -#define DBGOUT(fmt,a...) fprintf (stderr, fmt, ##a) -#else -#define DBGOUT(fmt,a...) -#endif - -#define ENTER() DBGOUT("Enter %s\n", __FUNCTION__) -#define LEAVE() DBGOUT("Leave %s\n", __FUNCTION__) - -#define NVIDIA_REG_BASE(c) ((c)->attr.address[0]) -#define NVIDIA_REG_SIZE(c) (16 * 1024 * 1024) - -#define NVIDIA_PCIO_OFF(c) (0x601000) -#define NVIDIA_MMIO_OFF(c) (NVIDIA_PCIO_OFF(c) + 0) -#define NVIDIA_FIFO_OFF(c) (0x800000) -#define NVIDIA_ROP_OFF(c) (NVIDIA_FIFO_OFF(c) + 0) -#define NVIDIA_CLIP_OFF(c) (NVIDIA_FIFO_OFF(c) + 0x2000) -#define NVIDIA_PATT_OFF(c) (NVIDIA_FIFO_OFF(c) + 0x4000) -#define NVIDIA_PIXMAP_OFF(c) (NVIDIA_FIFO_OFF(c) + 0x6000) -#define NVIDIA_BLT_OFF(c) (NVIDIA_FIFO_OFF(c) + 0x8000) -#define NVIDIA_RECTANGLE_OFF(c) (NVIDIA_FIFO_OFF(c) + 0xa000) -#define NVIDIA_LINE_OFF(c) (NVIDIA_FIFO_OFF(c) + 0xc000) -#define NVIDIA_IS_3(c) (0) -#define NVIDIA_BUSY(c) (NVIDIA_IS_3(c) ? 0x6b0 : 0x700) -#define NVIDIA_BUSY_OFF(c) (0x400000 + NVIDIA_BUSY(c)) - -typedef volatile CARD8 VOL8; -typedef volatile CARD16 VOL16; -typedef volatile CARD32 VOL32; - -#define NVIDIA_XY(x,y) ((x) | ((y) << 16)) - -typedef struct { -#if X_BYTE_ORDER == X_BIG_ENDIAN - VOL32 FifoFree; -#else - VOL16 FifoFree; - VOL16 Nop; -#endif -} NvidiaFifoFree; - -/* - * Raster OPeration. Windows style ROP3. - */ -typedef struct { - VOL32 reserved00[4]; - NvidiaFifoFree FifoFree; - VOL32 reserved01[0x0BB]; - VOL32 Rop3; -} NvidiaRop; - -/* - * 2D filled rectangle. - */ -typedef struct { - VOL32 reserved00[4]; - NvidiaFifoFree FifoFree; - VOL32 reserved01[0x0BB]; - VOL32 reserved03[(0x040)-1]; - VOL32 Color1A; - VOL32 TopLeft; - VOL32 WidthHeight; -} NvidiaRectangle; - -/* - * 2D screen-screen BLT. - */ -typedef struct { - VOL32 reserved00[4]; - NvidiaFifoFree FifoFree; - VOL32 reserved01[0x0BB]; - VOL32 TopLeftSrc; - VOL32 TopLeftDst; - VOL32 WidthHeight; -} NvidiaScreenBlt; - -typedef struct { - VOL32 busy; -} NvidiaBusy; - -typedef struct _nvidiaCardInfo { - VesaCardPrivRec vesa; - CARD8 *reg_base; - int fifo_free; - int fifo_size; - CARD8 *mmio; - NvidiaRop *rop; - NvidiaRectangle *rect; - NvidiaScreenBlt *blt; - NvidiaBusy *busy; -} NvidiaCardInfo; - -#define getNvidiaCardInfo(kd) ((NvidiaCardInfo *) ((kd)->card->driver)) -#define nvidiaCardInfo(kd) NvidiaCardInfo *nvidiac = getNvidiaCardInfo(kd) - -/* - * Xv information, optional - */ -typedef struct _nvidiaPortPriv { - CARD32 YBuf0Offset; - - CARD32 YBuf1Offset; - - CARD8 currentBuf; - - int brightness; - int saturation; - - RegionRec clip; - CARD32 colorKey; - - Bool videoOn; - Time offTime; - Time freeTime; - CARD32 size; - CARD32 offset; -} NvidiaPortPrivRec, *NvidiaPortPrivPtr; - -Bool nvidiaInitVideo(ScreenPtr pScreen); - -typedef struct _nvidiaScreenInfo { - VesaScreenPrivRec vesa; - CARD8 *cursor_base; - CARD8 *screen; - CARD8 *off_screen; - int off_screen_size; - KdVideoAdaptorPtr pAdaptor; - KaaScreenInfoRec kaa; -} NvidiaScreenInfo; - -#define getNvidiaScreenInfo(kd) ((NvidiaScreenInfo *) ((kd)->screen->driver)) -#define nvidiaScreenInfo(kd) NvidiaScreenInfo *nvidias = getNvidiaScreenInfo(kd) - -void -nvidiaPreserve (KdCardInfo *card); - -void -nvidiaOutb (NvidiaCardInfo *nvidiac, CARD16 port, CARD8 val); - -CARD8 -nvidiaInb (NvidiaCardInfo *nvidiac, CARD16 port); - -CARD8 -nvidiaGetIndex (NvidiaCardInfo *nvidiac, CARD16 addr, CARD16 data, CARD8 id); - -void -nvidiaSetIndex (NvidiaCardInfo *nvidiac, CARD16 addr, CARD16 data, CARD8 id, CARD8 val); - -Bool -nvidiaMapReg (KdCardInfo *card, NvidiaCardInfo *nvidiac); - -void -nvidiaUnmapReg (KdCardInfo *card, NvidiaCardInfo *nvidiac); - -void -nvidiaSetMMIO (KdCardInfo *card, NvidiaCardInfo *nvidiac); - -void -nvidiaResetMMIO (KdCardInfo *card, NvidiaCardInfo *nvidiac); - -Bool -nvidiaEnable (ScreenPtr pScreen); - -void -nvidiaDisable (ScreenPtr pScreen); - -void -nvidiaWait (NvidiaCardInfo *card, NvidiaFifoFree *free, int n); - -void -nvidiaWaitIdle (NvidiaCardInfo *card); - -Bool -nvidiaDrawSetup (ScreenPtr pScreen); - -Bool -nvidiaDrawInit (ScreenPtr pScreen); - -void -nvidiaDrawReinit (ScreenPtr pScreen); - -void -nvidiaDrawEnable (ScreenPtr pScreen); - -void -nvidiaDrawDisable (ScreenPtr pScreen); - -void -nvidiaDrawFini (ScreenPtr pScreen); - -CARD8 -nvidiaReadIndex (NvidiaCardInfo *nvidiac, CARD16 port, CARD8 index); - -void -nvidiaWriteIndex (NvidiaCardInfo *nvidiac, CARD16 port, CARD8 index, CARD8 value); - -Bool -nvidiaCursorInit (ScreenPtr pScreen); - -void -nvidiaCursorEnable (ScreenPtr pScreen); - -void -nvidiaCursorDisable (ScreenPtr pScreen); - -void -nvidiaCursorFini (ScreenPtr pScreen); - -void -nvidiaRecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdef); - -extern KdCardFuncs nvidiaFuncs; - -#endif /* _NVIDIA_H_ */ diff --git a/hw/kdrive/nvidia/nvidiacurs.c b/hw/kdrive/nvidia/nvidiacurs.c deleted file mode 100644 index 4a5938162..000000000 --- a/hw/kdrive/nvidia/nvidiacurs.c +++ /dev/null @@ -1,389 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "trident.h" -#include "cursorstr.h" - -#define SetupCursor(s) KdScreenPriv(s); \ - tridentCardInfo(pScreenPriv); \ - tridentScreenInfo(pScreenPriv); \ - TridentCursor *pCurPriv = &tridents->cursor - -static void -_tridentMoveCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor(pScreen); - CARD8 xlow, xhigh, ylow, yhigh; - CARD8 xoff, yoff; - - x -= pCurPriv->xhot; - xoff = 0; - if (x < 0) - { - xoff = -x; - x = 0; - } - y -= pCurPriv->yhot; - yoff = 0; - if (y < 0) - { - yoff = -y; - y = 0; - } - xlow = (CARD8) x; - xhigh = (CARD8) (x >> 8); - ylow = (CARD8) y; - yhigh = (CARD8) (y >> 8); - - - /* This is the recommended order to move the cursor */ - - tridentWriteIndex (tridentc, 0x3d4, 0x41, xhigh); - tridentWriteIndex (tridentc, 0x3d4, 0x40, xlow); - tridentWriteIndex (tridentc, 0x3d4, 0x42, ylow); - tridentWriteIndex (tridentc, 0x3d4, 0x46, xoff); - tridentWriteIndex (tridentc, 0x3d4, 0x47, yoff); - tridentWriteIndex (tridentc, 0x3d4, 0x43, yhigh); -} - -static void -tridentMoveCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor (pScreen); - - if (!pCurPriv->has_cursor) - return; - - if (!pScreenPriv->enabled) - return; - - _tridentMoveCursor (pScreen, x, y); -} - -static void -tridentAllocCursorColors (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - - KdAllocateCursorPixels (pScreen, 0, pCursor, - &pCurPriv->source, &pCurPriv->mask); - switch (pScreenPriv->screen->fb[0].bitsPerPixel) { - case 4: - pCurPriv->source |= pCurPriv->source << 4; - pCurPriv->mask |= pCurPriv->mask << 4; - case 8: - pCurPriv->source |= pCurPriv->source << 8; - pCurPriv->mask |= pCurPriv->mask << 8; - case 16: - pCurPriv->source |= pCurPriv->source << 16; - pCurPriv->mask |= pCurPriv->mask << 16; - } -} - -static void -tridentSetCursorColors (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - CARD32 fg, bg; - - fg = pCurPriv->source; - bg = pCurPriv->mask; - tridentWriteIndex (tridentc, 0x3d4, 0x48, fg); - tridentWriteIndex (tridentc, 0x3d4, 0x49, fg >> 8); - tridentWriteIndex (tridentc, 0x3d4, 0x4a, fg >> 16); - - tridentWriteIndex (tridentc, 0x3d4, 0x4c, bg); - tridentWriteIndex (tridentc, 0x3d4, 0x4d, bg >> 8); - tridentWriteIndex (tridentc, 0x3d4, 0x4e, bg >> 16); -} - -void -tridentRecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdef) -{ - SetupCursor (pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - xColorItem sourceColor, maskColor; - - if (!pCurPriv->has_cursor || !pCursor) - return; - - if (!pScreenPriv->enabled) - return; - - if (pdef) - { - while (ndef) - { - if (pdef->pixel == pCurPriv->source || - pdef->pixel == pCurPriv->mask) - break; - ndef--; - } - if (!ndef) - return; - } - tridentAllocCursorColors (pScreen); - tridentSetCursorColors (pScreen); -} - -#define InvertBits32(v) { \ - v = ((v & 0x55555555) << 1) | ((v >> 1) & 0x55555555); \ - v = ((v & 0x33333333) << 2) | ((v >> 2) & 0x33333333); \ - v = ((v & 0x0f0f0f0f) << 4) | ((v >> 4) & 0x0f0f0f0f); \ -} - -static void -tridentLoadCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor(pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - CursorBitsPtr bits = pCursor->bits; - int w, h; - CARD32 *ram, *msk, *mskLine, *src, *srcLine; - int i, j; - int cursor_address; - int lwsrc; - unsigned char ramdac_control_; - CARD32 offset; - - /* - * Allocate new colors - */ - tridentAllocCursorColors (pScreen); - - pCurPriv->pCursor = pCursor; - pCurPriv->xhot = pCursor->bits->xhot; - pCurPriv->yhot = pCursor->bits->yhot; - - /* - * Stick new image into cursor memory - */ - ram = (CARD32 *) tridents->cursor_base; - mskLine = (CARD32 *) bits->mask; - srcLine = (CARD32 *) bits->source; - - h = bits->height; - if (h > TRIDENT_CURSOR_HEIGHT) - h = TRIDENT_CURSOR_HEIGHT; - - lwsrc = BitmapBytePad(bits->width) / 4; /* words per line */ - - for (i = 0; i < TRIDENT_CURSOR_HEIGHT; i++) { - msk = mskLine; - src = srcLine; - mskLine += lwsrc; - srcLine += lwsrc; - for (j = 0; j < TRIDENT_CURSOR_WIDTH / 32; j++) { - - CARD32 m, s; - -#if 1 - if (i < h && j < lwsrc) - { - m = *msk++; - s = *src++; - InvertBits32(m); - InvertBits32(s); - } - else - { - m = 0; - s = 0; - } -#endif - *ram++ = m; - *ram++ = s; - } - } - - /* Set address for cursor bits */ - offset = tridents->cursor_base - (CARD8 *) tridents->screen; - offset >>= 10; - tridentWriteIndex (tridentc, 0x3d4, 0x44, (CARD8) (offset & 0xff)); - tridentWriteIndex (tridentc, 0x3d4, 0x45, (CARD8) (offset >> 8)); - - /* Set new color */ - tridentSetCursorColors (pScreen); - - /* Enable the cursor */ - tridentWriteIndex (tridentc, 0x3d4, 0x50, 0xc1); - - /* Move to new position */ - tridentMoveCursor (pScreen, x, y); -} - -static void -tridentUnloadCursor (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - /* Disable cursor */ - tridentWriteIndex (tridentc, 0x3d4, 0x50, 0); -} - -static Bool -tridentRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) -{ - SetupCursor(pScreen); - - if (!pScreenPriv->enabled) - return TRUE; - - /* miRecolorCursor does this */ - if (pCurPriv->pCursor == pCursor) - { - if (pCursor) - { - int x, y; - - miPointerPosition (&x, &y); - tridentLoadCursor (pScreen, x, y); - } - } - return TRUE; -} - -static Bool -tridentUnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) -{ - return TRUE; -} - -static void -tridentSetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y) -{ - SetupCursor(pScreen); - - pCurPriv->pCursor = pCursor; - - if (!pScreenPriv->enabled) - return; - - if (pCursor) - tridentLoadCursor (pScreen, x, y); - else - tridentUnloadCursor (pScreen); -} - -miPointerSpriteFuncRec tridentPointerSpriteFuncs = { - tridentRealizeCursor, - tridentUnrealizeCursor, - tridentSetCursor, - tridentMoveCursor, -}; - -static void -tridentQueryBestSize (int class, - unsigned short *pwidth, unsigned short *pheight, - ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - switch (class) - { - case CursorShape: - if (*pwidth > pCurPriv->width) - *pwidth = pCurPriv->width; - if (*pheight > pCurPriv->height) - *pheight = pCurPriv->height; - if (*pwidth > pScreen->width) - *pwidth = pScreen->width; - if (*pheight > pScreen->height) - *pheight = pScreen->height; - break; - default: - fbQueryBestSize (class, pwidth, pheight, pScreen); - break; - } -} - -Bool -tridentCursorInit (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (!tridents->cursor_base) - { - pCurPriv->has_cursor = FALSE; - return FALSE; - } - - pCurPriv->width = TRIDENT_CURSOR_WIDTH; - pCurPriv->height= TRIDENT_CURSOR_HEIGHT; - pScreen->QueryBestSize = tridentQueryBestSize; - miPointerInitialize (pScreen, - &tridentPointerSpriteFuncs, - &kdPointerScreenFuncs, - FALSE); - pCurPriv->has_cursor = TRUE; - pCurPriv->pCursor = NULL; - return TRUE; -} - -void -tridentCursorEnable (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (pCurPriv->has_cursor) - { - if (pCurPriv->pCursor) - { - int x, y; - - miPointerPosition (&x, &y); - tridentLoadCursor (pScreen, x, y); - } - else - tridentUnloadCursor (pScreen); - } -} - -void -tridentCursorDisable (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (!pScreenPriv->enabled) - return; - - if (pCurPriv->has_cursor) - { - if (pCurPriv->pCursor) - { - tridentUnloadCursor (pScreen); - } - } -} - -void -tridentCursorFini (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - pCurPriv->pCursor = NULL; -} diff --git a/hw/kdrive/nvidia/nvidiadraw.c b/hw/kdrive/nvidia/nvidiadraw.c deleted file mode 100644 index a39f79888..000000000 --- a/hw/kdrive/nvidia/nvidiadraw.c +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Copyright © 2003 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "nvidia.h" -#include "nvidiadraw.h" - -#include -#include "gcstruct.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "regionstr.h" -#include "mistruct.h" -#include "dixfontstr.h" -#include "fb.h" -#include "migc.h" -#include "miline.h" -#include "picturestr.h" -#include "kaa.h" - -CARD8 nvidiaRop[16] = { - /* GXclear */ 0x01, /* 0 */ - /* GXand */ 0x0c, /* src AND dst */ - /* GXandReverse */ 0x0d, /* src AND NOT dst */ - /* GXcopy */ 0x07, /* src */ - /* GXandInverted*/ 0x0e, /* NOT src AND dst */ - /* GXnoop */ 0x03, /* dst */ - /* GXxor */ 0x05, /* src XOR dst */ - /* GXor */ 0x0b, /* src OR dst */ - /* GXnor */ 0x0f, /* NOT src AND NOT dst */ - /* GXequiv */ 0x06, /* NOT src XOR dst */ - /* GXinvert */ 0x00, /* NOT dst */ - /* GXorReverse */ 0x0a, /* src OR NOT dst */ - /* GXcopyInverted*/ 0x04, /* NOT src */ - /* GXorInverted */ 0x09, /* NOT src OR dst */ - /* GXnand */ 0x08, /* NOT src OR NOT dst */ - /* GXset */ 0x02, /* 1 */ -}; - -static NvidiaCardInfo *card; - -void -nvidiaWait (NvidiaCardInfo *card, NvidiaFifoFree *free, int n) -{ - while (card->fifo_free < n) - { - card->fifo_free = free->FifoFree >> 2; - } - card->fifo_free -= n; -} - -void -nvidiaWaitIdle (NvidiaCardInfo *card) -{ - while (card->fifo_free < card->fifo_size || (card->busy->busy & 1)) - { - card->fifo_free = card->rop->FifoFree.FifoFree >> 2; - } -} - -static void -nvidiaWaitMarker (ScreenPtr pScreen, int marker) -{ - KdScreenPriv(pScreen); - nvidiaCardInfo(pScreenPriv); - - nvidiaWaitIdle (nvidiac); -} - -static Bool -nvidiaPrepareSolid (PixmapPtr pPixmap, - int alu, - Pixel pm, - Pixel fg) -{ - ScreenPtr pScreen = pPixmap->drawable.pScreen; - KdScreenPriv(pScreen); - nvidiaCardInfo(pScreenPriv); - - card = nvidiac; - if (~pm & FbFullMask(pPixmap->drawable.depth)) - return FALSE; - nvidiaWait (nvidiac, &nvidiac->rop->FifoFree, 1); - nvidiac->rop->Rop3 = nvidiaRop[alu]; - nvidiaWait (nvidiac, &nvidiac->rect->FifoFree, 1); - nvidiac->rect->Color1A = fg; - return TRUE; -} - -static void -nvidiaSolid (int x1, int y1, int x2, int y2) -{ - nvidiaWait (card, &card->rect->FifoFree, 2); - card->rect->TopLeft = NVIDIA_XY(x1,y1); - card->rect->WidthHeight = NVIDIA_XY(x2-x1,y2-y1); -} - -static void -nvidiaDoneSolid (void) -{ -} - - -static Bool -nvidiaPrepareCopy (PixmapPtr pSrcPixmap, - PixmapPtr pDstPixmap, - int dx, - int dy, - int alu, - Pixel pm) -{ - ScreenPtr pScreen = pDstPixmap->drawable.pScreen; - KdScreenPriv(pScreen); - nvidiaCardInfo(pScreenPriv); - - card = nvidiac; - if (~pm & FbFullMask(pDstPixmap->drawable.depth)) - return FALSE; - nvidiaWait (nvidiac, &card->rop->FifoFree, 1); - nvidiac->rop->Rop3 = nvidiaRop[alu]; - return TRUE; -} - -static void -nvidiaCopy (int srcX, - int srcY, - int dstX, - int dstY, - int w, - int h) -{ - nvidiaWait (card, &card->blt->FifoFree, 3); - card->blt->TopLeftSrc = NVIDIA_XY(srcX, srcY); - card->blt->TopLeftDst = NVIDIA_XY(dstX, dstY); - card->blt->WidthHeight = NVIDIA_XY(w, h); -} - -static void -nvidiaDoneCopy (void) -{ -} - -Bool -nvidiaDrawInit (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - nvidiaCardInfo(pScreenPriv); - nvidiaScreenInfo(pScreenPriv); - Bool ret = TRUE; - - ENTER (); - if (pScreenPriv->screen->fb[0].depth == 4) - ret = FALSE; - - memset(&nvidias->kaa, 0, sizeof(KaaScreenInfoRec)); - nvidias->kaa.waitMarker = nvidiaWaitMarker; - nvidias->kaa.PrepareSolid = nvidiaPrepareSolid; - nvidias->kaa.Solid = nvidiaSolid; - nvidias->kaa.DoneSolid = nvidiaDoneSolid; - nvidias->kaa.PrepareCopy = nvidiaPrepareCopy; - nvidias->kaa.Copy = nvidiaCopy; - nvidias->kaa.DoneCopy = nvidiaDoneCopy; - - if (ret && !nvidiac->rop) - { - ErrorF ("Failed to map fifo registers\n"); - ret = FALSE; - } - if (ret && !nvidiac->rop->FifoFree.FifoFree) - { - ErrorF ("Fifo appears broken\n"); - ret = FALSE; - } - if (ret && !kaaDrawInit (pScreen, &nvidias->kaa)) - { - ErrorF ("kaaDrawInit failed\n"); - ret = FALSE; - } - - LEAVE (); - return ret; -} - -#define PIX_FORMAT_MONO 0 -#define PIX_FORMAT_PSEUDO_8 2 -#define PIX_FORMAT_TRUE_1555 3 -#define PIX_FORMAT_TRUE_565 4 -#define PIX_FORMAT_TRUE_8888 6 -#define PIX_FORMAT_TRUE_332 7 -#define PIX_FORMAT_GRAY_8 8 -#define PIX_FORMAT_YUV_422 0xb -#define PIX_FORMAT_YUV_444 0xe -#define PIX_FORMAT_TRUE_4444 0xf - -void -nvidiaDrawEnable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - nvidiaCardInfo(pScreenPriv); - - ENTER (); - nvidiac->fifo_size = nvidiac->rop->FifoFree.FifoFree; - nvidiac->fifo_free = 0; - kaaMarkSync (pScreen); - LEAVE (); -} - -void -nvidiaDrawDisable (ScreenPtr pScreen) -{ -} - -void -nvidiaDrawFini (ScreenPtr pScreen) -{ -} - diff --git a/hw/kdrive/nvidia/nvidiadraw.h b/hw/kdrive/nvidia/nvidiadraw.h deleted file mode 100644 index bac11c2a6..000000000 --- a/hw/kdrive/nvidia/nvidiadraw.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _TRIDENTDRAW_H_ -#define _TRIDENTDRAW_H_ - -#define SetupTrident(s) KdScreenPriv(s); \ - tridentCardInfo(pScreenPriv); \ - Cop *cop = tridentc->cop - -#define TridentAlpha (COP_MULTI_ALPHA|COP_ALPHA_WRITE_ENABLE) - -#define _tridentInit(cop,tridentc) { \ - if ((cop)->status == 0xffffffff) tridentSetMMIO(tridentc); \ - (cop)->multi = (tridentc)->cop_depth; \ - (cop)->multi = (tridentc)->cop_stride; \ - (cop)->multi = TridentAlpha; \ -} \ - -#define _tridentSetSolidRect(cop,pix,alu,cmd) {\ - cop->multi = COP_MULTI_PATTERN; \ - cop->multi = COP_MULTI_ROP | tridentRop[alu]; \ - cop->fg = (pix); \ - cmd = COP_OP_BLT | COP_SCL_OPAQUE | COP_OP_ROP | COP_OP_FG; \ -} - -#define _tridentRect(cop,x1,y1,x2,y2,cmd) { \ - (cop)->dst_start_xy = TRI_XY (x1,y1); \ - (cop)->dst_end_xy = TRI_XY(x2,y2); \ - _tridentWaitDone(cop); \ - (cop)->command = (cmd); \ -} - -#define COP_STATUS_BUSY (COP_STATUS_BE_BUSY | \ - COP_STATUS_DPE_BUSY | \ - COP_STATUS_MI_BUSY) - -#define _tridentWaitDone(cop) { \ - int __q__ = 500000; \ - while (__q__-- && (cop)->status & COP_STATUS_BUSY) \ - ; \ - if (!__q__) \ - (cop)->status = 0; \ -} - -#define _tridentWaitIdleEmpty(cop) _tridentWaitDone(cop) - -#define sourceInvarient(alu) (((alu) & 3) == (((alu) >> 2) & 3)) - -#endif diff --git a/hw/kdrive/nvidia/nvidiastub.c b/hw/kdrive/nvidia/nvidiastub.c deleted file mode 100644 index 0e8250e31..000000000 --- a/hw/kdrive/nvidia/nvidiastub.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright © 2003 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "nvidia.h" - -void -InitCard (char *name) -{ - KdCardAttr attr; - - if (LinuxFindPci (0x10de, 0x0112, 0, &attr)) - KdCardInfoAdd (&nvidiaFuncs, &attr, 0); -} - -void -InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) -{ - KdInitOutput (pScreenInfo, argc, argv); -} - -void -InitInput (int argc, char **argv) -{ - KdOsAddInputDrivers (); - KdInitInput (); -} - -void -ddxUseMsg (void) -{ - KdUseMsg(); - vesaUseMsg(); -} - -int -ddxProcessArgument (int argc, char **argv, int i) -{ - int ret; - - if (!(ret = vesaProcessArgument (argc, argv, i))) - ret = KdProcessArgument(argc, argv, i); - return ret; -} diff --git a/hw/kdrive/nvidia/nvidiavideo.c b/hw/kdrive/nvidia/nvidiavideo.c deleted file mode 100644 index 2ab41edfd..000000000 --- a/hw/kdrive/nvidia/nvidiavideo.c +++ /dev/null @@ -1,1016 +0,0 @@ -/* - * Copyright © 2003 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "nvidia.h" - -#include -#include "fourcc.h" - -#define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE) - -static Atom xvBrightness, xvSaturation, xvColorKey; - -#define IMAGE_MAX_WIDTH 720 -#define IMAGE_MAX_HEIGHT 576 - -static void -nvidiaStopVideo(KdScreenInfo *screen, pointer data, Bool exit) -{ - ScreenPtr pScreen = screen->pScreen; - KdScreenPriv(pScreen); - KdCardInfo *card = pScreenPriv->card; - NvidiaScreenInfo *nvidias = (NvidiaScreenInfo *) screen->driver; - NvidiaCardInfo *nvidiac = (NvidiaCardInfo *) card->driver; - NvidiaPortPrivPtr pPortPriv = nvidias->pAdaptor->pPortPrivates[0].ptr; - Reg *reg = nvidiac->reg; - MediaReg *media = nvidiac->media_reg; - - REGION_EMPTY(screen->pScreen, &pPortPriv->clip); - - if (!media) - return; - - if(pPortPriv->videoOn) - { - nvidiaWaitIdle (reg); - /* wait for buffer to be displayed */ - while (((media->TRIG_CNTL >> 5) & 1) != pPortPriv->currentBuf) - ; - /* wait for buffer to be finished */ - while (((media->TRIG_CNTL >> 6) & 1) != 0) - ; - nvidiaWaitAvail (reg, 1); - media->OVERLAY_SCALE_CNTL = 0; - pPortPriv->videoOn = FALSE; - nvidiaWaitIdle (reg); - } -} - -static int -nvidiaSetPortAttribute(KdScreenInfo *screen, - Atom attribute, - int value, - pointer data) -{ - ScreenPtr pScreen = screen->pScreen; - KdScreenPriv(pScreen); - KdCardInfo *card = pScreenPriv->card; - NvidiaScreenInfo *nvidias = (NvidiaScreenInfo *) screen->driver; - NvidiaCardInfo *nvidiac = (NvidiaCardInfo *) card->driver; - NvidiaPortPrivPtr pPortPriv = nvidias->pAdaptor->pPortPrivates[0].ptr; - MediaReg *media = nvidiac->media_reg; - - if(attribute == xvBrightness) - { - if(value < -1000) - value = -1000; - if (value > 1000) - value = 1000; - pPortPriv->brightness = value; - } - else if(attribute == xvSaturation) - { - if (value < -1000) - value = -1000; - if (value > 1000) - value = 1000; - pPortPriv->saturation = value; - } - else if(attribute == xvColorKey) - { - if (pPortPriv->colorKey != value) - { - pPortPriv->colorKey = value; - REGION_EMPTY(screen->pScreen, &pPortPriv->clip); - } - } - else - return BadMatch; - - return Success; -} - -static int -nvidiaGetPortAttribute(KdScreenInfo *screen, - Atom attribute, - int *value, - pointer data) -{ - NvidiaPortPrivPtr pPortPriv = (NvidiaPortPrivPtr)data; - - if(attribute == xvBrightness) - *value = pPortPriv->brightness; - else if(attribute == xvSaturation) - *value = pPortPriv->saturation; - else if(attribute == xvColorKey) - *value = pPortPriv->colorKey; - else - return BadMatch; - - return Success; -} - -static void -nvidiaQueryBestSize(KdScreenInfo *screen, - Bool motion, - short vid_w, - short vid_h, - short drw_w, - short drw_h, - unsigned int *p_w, - unsigned int *p_h, - pointer data) -{ - *p_w = drw_w; - *p_h = drw_h; -} - - -static void -nvidiaCopyPackedData(KdScreenInfo *screen, - unsigned char *buf, - int randr, - int srcPitch, - int dstPitch, - int srcW, - int srcH, - int top, - int left, - int h, - int w) -{ - ScreenPtr pScreen = screen->pScreen; - KdScreenPriv(pScreen); - KdCardInfo *card = pScreenPriv->card; - NvidiaScreenInfo *nvidias = (NvidiaScreenInfo *) screen->driver; - NvidiaCardInfo *nvidiac = (NvidiaCardInfo *) card->driver; - NvidiaPortPrivPtr pPortPriv = nvidias->pAdaptor->pPortPrivates[0].ptr; - CARD8 *src, *dst; - int srcDown, srcRight, srcNext; - int p; - - switch (randr & RR_Rotate_All) { - case RR_Rotate_0: - src = buf; - srcDown = srcPitch; - srcRight = 2; - break; - case RR_Rotate_90: - src = buf + (srcH - 1) * 2; - srcDown = -2; - srcRight = srcPitch; - break; - case RR_Rotate_180: - src = buf + srcPitch * (srcH - 1) + (srcW - 1) * 2; - srcDown = -srcPitch; - srcRight = -2; - break; - case RR_Rotate_270: - src = buf + srcPitch * (srcW - 1); - srcDown = 2; - srcRight = -srcPitch; - break; - } - - src = src + top*srcDown + left*srcRight; - - if (pPortPriv->currentBuf == 0) - dst = (CARD8 *) nvidias->vesa.fb + pPortPriv->YBuf0Offset; - else - dst = (CARD8 *) nvidias->vesa.fb + pPortPriv->YBuf1Offset; - - w >>= 1; - srcRight >>= 1; - srcNext = srcRight >> 1; - while(h--) - { - CARD16 *s = (CARD16 *) src; - CARD32 *d = (CARD32 *) dst; - p = w; - while (p--) - { - *d++ = s[0] | (s[srcNext] << 16); - s += srcRight; - } - src += srcPitch; - dst += dstPitch; - } -} - -static void -nvidiaCopyPlanarData(KdScreenInfo *screen, - unsigned char *buf, - int randr, - int srcPitch, - int srcPitch2, - int dstPitch, /* of chroma */ - int srcW, - int srcH, - int height, - int top, - int left, - int h, - int w, - int id) -{ - ScreenPtr pScreen = screen->pScreen; - KdScreenPriv(pScreen); - KdCardInfo *card = pScreenPriv->card; - NvidiaScreenInfo *nvidias = (NvidiaScreenInfo *) screen->driver; - NvidiaCardInfo *nvidiac = (NvidiaCardInfo *) card->driver; - NvidiaPortPrivPtr pPortPriv = nvidias->pAdaptor->pPortPrivates[0].ptr; - int i, j; - CARD8 *src1, *src2, *src3, *dst1; - int srcDown, srcDown2, srcRight, srcRight2, srcNext; - - /* compute source data pointers */ - src1 = buf; - src2 = src1 + height * srcPitch; - src3 = src2 + (height >> 1) * srcPitch2; - switch (randr & RR_Rotate_All) { - case RR_Rotate_0: - srcDown = srcPitch; - srcDown2 = srcPitch2; - srcRight = 2; - srcRight2 = 1; - srcNext = 1; - break; - case RR_Rotate_90: - src1 = src1 + srcH - 1; - src2 = src2 + (srcH >> 1) - 1; - src3 = src3 + (srcH >> 1) - 1; - srcDown = -1; - srcDown2 = -1; - srcRight = srcPitch * 2; - srcRight2 = srcPitch2; - srcNext = srcPitch; - break; - case RR_Rotate_180: - src1 = src1 + srcPitch * (srcH - 1) + (srcW - 1); - src2 = src2 + srcPitch2 * ((srcH >> 1) - 1) + ((srcW >> 1) - 1); - src3 = src3 + srcPitch2 * ((srcH >> 1) - 1) + ((srcW >> 1) - 1); - srcDown = -srcPitch; - srcDown2 = -srcPitch2; - srcRight = -2; - srcRight2 = -1; - srcNext = -1; - break; - case RR_Rotate_270: - src1 = src1 + srcPitch * (srcW - 1); - src2 = src2 + srcPitch2 * ((srcW >> 1) - 1); - src3 = src3 + srcPitch2 * ((srcW >> 1) - 1); - srcDown = 1; - srcDown2 = 1; - srcRight = -srcPitch * 2; - srcRight2 = -srcPitch2; - srcNext = -srcPitch; - break; - } - - /* adjust for origin */ - src1 += top * srcDown + left * srcNext; - src2 += (top >> 1) * srcDown2 + (left >> 1) * srcRight2; - src3 += (top >> 1) * srcDown2 + (left >> 1) * srcRight2; - - if (id == FOURCC_I420) - { - CARD8 *srct = src2; - src2 = src3; - src3 = srct; - } - - if (pPortPriv->currentBuf == 0) - dst1 = (CARD8 *) nvidias->vesa.fb + pPortPriv->YBuf0Offset; - else - dst1 = (CARD8 *) nvidias->vesa.fb + pPortPriv->YBuf1Offset; - - w >>= 1; - for (j = 0; j < h; j++) - { - CARD32 *dst = (CARD32 *) dst1; - CARD8 *s1l = src1; - CARD8 *s1r = src1 + srcNext; - CARD8 *s2 = src2; - CARD8 *s3 = src3; - - for (i = 0; i < w; i++) - { - *dst++ = *s1l | (*s1r << 16) | (*s3 << 8) | (*s2 << 24); - s1l += srcRight; - s1r += srcRight; - s2 += srcRight2; - s3 += srcRight2; - } - src1 += srcDown; - dst1 += dstPitch; - if (j & 1) - { - src2 += srcDown2; - src3 += srcDown2; - } - } -} - -static void -nvidiaPaintRegion (ScreenPtr pScreen, RegionPtr pRgn, Pixel fg) -{ - WindowPtr pRoot = WindowTable[pScreen->myNum]; - GCPtr pGC; - CARD32 val[2]; - xRectangle *rects, *r; - BoxPtr pBox = REGION_RECTS (pRgn); - int nBox = REGION_NUM_RECTS (pRgn); - - rects = xalloc (nBox * sizeof (xRectangle)); - if (!rects) - goto bail0; - r = rects; - while (nBox--) - { - r->x = pBox->x1; - r->y = pBox->y1; - r->width = pBox->x2 - pBox->x1; - r->height = pBox->y2 - pBox->y1; - r++; - pBox++; - } - - pGC = GetScratchGC (pRoot->drawable.depth, pScreen); - if (!pGC) - goto bail1; - - val[0] = fg; - val[1] = IncludeInferiors; - ChangeGC (pGC, GCForeground|GCSubwindowMode, val); - - ValidateGC (&pRoot->drawable, pGC); - - (*pGC->ops->PolyFillRect) (&pRoot->drawable, pGC, - REGION_NUM_RECTS (pRgn), rects); - - FreeScratchGC (pGC); -bail1: - xfree (rects); -bail0: - ; -} - -/* NvidiaClipVideo - - - Takes the dst box in standard X BoxRec form (top and left - edges inclusive, bottom and right exclusive). The new dst - box is returned. The source boundaries are given (x1, y1 - inclusive, x2, y2 exclusive) and returned are the new source - boundaries in 16.16 fixed point. -*/ - -static void -NvidiaClipVideo(BoxPtr dst, - INT32 *x1, - INT32 *x2, - INT32 *y1, - INT32 *y2, - BoxPtr extents, /* extents of the clip region */ - INT32 width, - INT32 height) -{ - INT32 vscale, hscale, delta; - int diff; - - hscale = ((*x2 - *x1) << 16) / (dst->x2 - dst->x1); - vscale = ((*y2 - *y1) << 16) / (dst->y2 - dst->y1); - - *x1 <<= 16; *x2 <<= 16; - *y1 <<= 16; *y2 <<= 16; - - diff = extents->x1 - dst->x1; - if(diff > 0) { - dst->x1 = extents->x1; - *x1 += diff * hscale; - } - diff = dst->x2 - extents->x2; - if(diff > 0) { - dst->x2 = extents->x2; - *x2 -= diff * hscale; - } - diff = extents->y1 - dst->y1; - if(diff > 0) { - dst->y1 = extents->y1; - *y1 += diff * vscale; - } - diff = dst->y2 - extents->y2; - if(diff > 0) { - dst->y2 = extents->y2; - *y2 -= diff * vscale; - } - - if(*x1 < 0) { - diff = (- *x1 + hscale - 1)/ hscale; - dst->x1 += diff; - *x1 += diff * hscale; - } - delta = *x2 - (width << 16); - if(delta > 0) { - diff = (delta + hscale - 1)/ hscale; - dst->x2 -= diff; - *x2 -= diff * hscale; - } - if(*y1 < 0) { - diff = (- *y1 + vscale - 1)/ vscale; - dst->y1 += diff; - *y1 += diff * vscale; - } - delta = *y2 - (height << 16); - if(delta > 0) { - diff = (delta + vscale - 1)/ vscale; - dst->y2 -= diff; - *y2 -= diff * vscale; - } -} - -static void -nvidiaDisplayVideo(KdScreenInfo *screen, - int id, - int dstPitch, /* of chroma for 4:2:0 */ - int x1, - int y1, - int x2, - int y2, - int dst_x1, - int dst_y1, - int dst_x2, - int dst_y2, - short src_w, - short src_h, - short drw_w, - short drw_h) -{ - ScreenPtr pScreen = screen->pScreen; - KdScreenPriv(pScreen); - KdCardInfo *card = pScreenPriv->card; - NvidiaScreenInfo *nvidias = (NvidiaScreenInfo *) screen->driver; - NvidiaCardInfo *nvidiac = (NvidiaCardInfo *) card->driver; - NvidiaPortPrivPtr pPortPriv = nvidias->pAdaptor->pPortPrivates[0].ptr; - Reg *reg = nvidiac->reg; - MediaReg *media = nvidiac->media_reg; - int xscaleInt, xscaleFract, yscaleInt, yscaleFract; - int xscaleIntUV = 0, xscaleFractUV = 0; - int yscaleIntUV = 0, yscaleFractUV = 0; - int randr = nvidias->vesa.randr; - int HORZ_INC, VERT_INC; - CARD32 SCALER_IN; - CARD32 OVERLAY_SCALE_CNTL; - int tmp; - int left; - int bright; - int sat; - - if (id == FOURCC_UYVY) - SCALER_IN = SCALER_IN_YVYU422; - else - SCALER_IN = SCALER_IN_VYUY422; - - nvidiaWaitAvail (reg, 4); - - media->VIDEO_FORMAT = SCALER_IN | VIDEO_IN_VYUY422; - - /* color key */ - media->OVERLAY_GRAPHICS_KEY_MSK = (1 << screen->fb[0].depth) - 1; - media->OVERLAY_GRAPHICS_KEY_CLR = pPortPriv->colorKey; - /* set key control to obey only graphics color key */ - media->OVERLAY_KEY_CNTL = 0x50; - - nvidiaWaitAvail (reg, 9); - media->CAPTURE_DEBUG = 0; - /* no exclusive video region */ - media->OVERLAY_EXCLUSIVE_HORZ = 0; - media->OVERLAY_EXCLUSIVE_VERT = 0; - /* scaling coefficients */ - media->SCALER_H_COEFF0 = 0x00002000; - media->SCALER_H_COEFF1 = 0x0D06200D; - media->SCALER_H_COEFF2 = 0x0D0A1C0D; - media->SCALER_H_COEFF3 = 0x0C0E1A0C; - media->SCALER_H_COEFF4 = 0x0C14140C; - media->SCALER_TEST = 0; - - nvidiaWaitAvail (reg, 2); - media->OVERLAY_SCALE_CNTL = (SCALE_PIX_EXPAND | - SCALE_GAMMA_BRIGHT | - SCALE_BANDWIDTH | - SCALE_OVERLAY_EN | - SCALE_EN); - - bright = (pPortPriv->brightness * 64 / 1000); - if (bright < -0x40) - bright = -0x40; - if (bright > 0x3f) - bright = 0x3f; - bright = bright & 0x7f; - sat = ((pPortPriv->saturation * 31 + 31000) / 2000); - if (sat > 0x1f) - sat = 0x1f; - if (sat < 0) - sat = 0; - - media->SCALER_COLOUR_CNTL = ((bright << 0) | /* BRIGHTNESS */ - (sat << 8) | /* SATURATION_U */ - (sat << 16) | /* SATURATION_V */ - (0 << 21) | /* SCALER_VERT_ADJ_UV */ - (0 << 28)); /* SCALER_HORZ_ADJ_UV */ - - VERT_INC = (src_h << 12) / drw_h; - HORZ_INC = (src_w << 12) / drw_w; - - nvidiaWaitAvail (reg, 13); - - /* lock registers to prevent non-atomic update */ - media->OVERLAY_Y_X_START = 0x80000000 | NVIDIA_YX (dst_x1, dst_y1); - /* ending screen coordinate */ - media->OVERLAY_Y_X_END = 0x80000000 | NVIDIA_YX (dst_x2, dst_y2); - - media->OVERLAY_SCALE_INC = NVIDIA_YX(HORZ_INC, VERT_INC); - - media->SCALER_BUF0_OFFSET = pPortPriv->YBuf0Offset; - media->SCALER_BUF1_OFFSET = pPortPriv->YBuf1Offset; - - media->SCALER_BUF0_OFFSET_U = pPortPriv->YBuf0Offset; - media->SCALER_BUF1_OFFSET_U = pPortPriv->YBuf1Offset; - - media->SCALER_BUF0_OFFSET_V = pPortPriv->YBuf0Offset; - media->SCALER_BUF1_OFFSET_V = pPortPriv->YBuf1Offset; - - media->SCALER_BUF_PITCH = dstPitch >> 1; - media->SCALER_HEIGHT_WIDTH = NVIDIA_YX(src_w - (x1 >> 16), src_h - (y1 >> 16)); - - media->CAPTURE_CONFIG = pPortPriv->currentBuf << 28; - - /* set XY location and unlock */ - media->OVERLAY_Y_X_START = NVIDIA_YX (dst_x1, dst_y1); -} - -static int -nvidiaPutImage(KdScreenInfo *screen, - short src_x, - short src_y, - short drw_x, - short drw_y, - short src_w, - short src_h, - short drw_w, - short drw_h, - int id, - unsigned char *buf, - short width, - short height, - Bool sync, - RegionPtr clipBoxes, - pointer data) -{ - KdCardInfo *card = screen->card; - NvidiaScreenInfo *nvidias = (NvidiaScreenInfo *) screen->driver; - NvidiaCardInfo *nvidiac = (NvidiaCardInfo *) card->driver; - NvidiaPortPrivPtr pPortPriv = (NvidiaPortPrivPtr)data; - Reg *reg = nvidiac->reg; - MediaReg *media = nvidiac->media_reg; - INT32 x1, x2, y1, y2; - int randr = nvidias->vesa.randr; - int srcPitch, srcPitch2, dstPitch; - int top, left, npixels, nlines, size; - BoxRec dstBox; - int dst_width = width, dst_height = height; - int rot_x1, rot_y1, rot_x2, rot_y2; - int dst_x1, dst_y1, dst_x2, dst_y2; - int rot_src_w, rot_src_h, rot_drw_w, rot_drw_h; - - /* Clip */ - x1 = src_x; - x2 = src_x + src_w; - y1 = src_y; - y2 = src_y + src_h; - - dstBox.x1 = drw_x; - dstBox.x2 = drw_x + drw_w; - dstBox.y1 = drw_y; - dstBox.y2 = drw_y + drw_h; - - NvidiaClipVideo(&dstBox, &x1, &x2, &y1, &y2, - REGION_EXTENTS(pScreen, clipBoxes), width, height); - - if((x1 >= x2) || (y1 >= y2)) - return Success; - - if (!media) - return BadAlloc; - - if (randr & (RR_Rotate_0|RR_Rotate_180)) - { - dst_width = width; - dst_height = height; - rot_src_w = src_w; - rot_src_h = src_h; - rot_drw_w = drw_w; - rot_drw_h = drw_h; - } - else - { - dst_width = height; - dst_height = width; - rot_src_w = src_h; - rot_src_h = src_w; - rot_drw_w = drw_h; - rot_drw_h = drw_w; - } - - switch (randr & RR_Rotate_All) { - case RR_Rotate_0: - dst_x1 = dstBox.x1; - dst_y1 = dstBox.y1; - dst_x2 = dstBox.x2; - dst_y2 = dstBox.y2; - rot_x1 = x1; - rot_y1 = y1; - rot_x2 = x2; - rot_y2 = y2; - break; - case RR_Rotate_90: - dst_x1 = dstBox.y1; - dst_y1 = screen->height - dstBox.x2; - dst_x2 = dstBox.y2; - dst_y2 = screen->height - dstBox.x1; - - rot_x1 = y1; - rot_y1 = (src_w << 16) - x2; - rot_x2 = y2; - rot_y2 = (src_w << 16) - x1; - break; - case RR_Rotate_180: - dst_x1 = screen->width - dstBox.x2; - dst_y1 = screen->height - dstBox.y2; - dst_x2 = screen->width - dstBox.x1; - dst_y2 = screen->height - dstBox.y1; - rot_x1 = (src_w << 16) - x2; - rot_y1 = (src_h << 16) - y2; - rot_x2 = (src_w << 16) - x1; - rot_y2 = (src_h << 16) - y1; - break; - case RR_Rotate_270: - dst_x1 = screen->width - dstBox.y2; - dst_y1 = dstBox.x1; - dst_x2 = screen->width - dstBox.y1; - dst_y2 = dstBox.x2; - rot_x1 = (src_h << 16) - y2; - rot_y1 = x1; - rot_x2 = (src_h << 16) - y1; - rot_y2 = x2; - break; - } - - switch(id) { - case FOURCC_YV12: - case FOURCC_I420: - dstPitch = ((dst_width << 1) + 15) & ~15; - srcPitch = (width + 3) & ~3; - srcPitch2 = ((width >> 1) + 3) & ~3; - size = dstPitch * (int) dst_height; - break; - case FOURCC_UYVY: - case FOURCC_YUY2: - default: - dstPitch = ((dst_width << 1) + 15) & ~15; - srcPitch = (width << 1); - size = dstPitch * (int) dst_height; - break; - } - - pPortPriv->offset = nvidias->off_screen - (CARD8 *) nvidias->vesa.fb; - /* fixup pointers */ - - pPortPriv->YBuf0Offset = pPortPriv->offset; - pPortPriv->YBuf1Offset = pPortPriv->offset + size; - -#if 0 - nvidiaWaitIdle (reg); - - if (pPortPriv->videoOn) - { - /* wait for buffer to be displayed */ - while (((media->TRIG_CNTL >> 5) & 1) != pPortPriv->currentBuf) - ; - } -#endif - /* - * Use the other buffer - */ - pPortPriv->currentBuf = 1 - pPortPriv->currentBuf; - - /* copy data */ - top = rot_y1 >> 16; - left = (rot_x1 >> 16) & ~1; - npixels = ((((rot_x2 + 0xffff) >> 16) + 1) & ~1) - left; - - switch(id) { - case FOURCC_YV12: - case FOURCC_I420: - top &= ~1; - nlines = ((((rot_y2 + 0xffff) >> 16) + 1) & ~1) - top; - nvidiaCopyPlanarData(screen, buf, randr, - srcPitch, srcPitch2, dstPitch, - rot_src_w, rot_src_h, height, - top, left, nlines, npixels, id); - break; - case FOURCC_UYVY: - case FOURCC_YUY2: - default: - nlines = ((rot_y2 + 0xffff) >> 16) - top; - nvidiaCopyPackedData(screen, buf, randr, - srcPitch, dstPitch, - rot_src_w, rot_src_h, - top, left, nlines, - npixels); - break; - } - - nvidiaDisplayVideo(screen, id, dstPitch, - rot_x1, rot_y1, rot_x2, rot_y2, - dst_x1, dst_y1, - dst_x2, dst_y2, - rot_src_w, rot_src_h, rot_drw_w, rot_drw_h); - - /* update cliplist */ - if (!REGION_EQUAL (screen->pScreen, &pPortPriv->clip, clipBoxes)) - { - REGION_COPY (screen->pScreen, &pPortPriv->clip, clipBoxes); - nvidiaPaintRegion (screen->pScreen, &pPortPriv->clip, pPortPriv->colorKey); - } - - pPortPriv->videoOn = TRUE; - - return Success; -} - -static int -nvidiaQueryImageAttributes(KdScreenInfo *screen, - int id, - unsigned short *w, - unsigned short *h, - int *pitches, - int *offsets) -{ - int size, tmp; - - if(*w > IMAGE_MAX_WIDTH) - *w = IMAGE_MAX_WIDTH; - if(*h > IMAGE_MAX_HEIGHT) - *h = IMAGE_MAX_HEIGHT; - - *w = (*w + 1) & ~1; - if(offsets) offsets[0] = 0; - - switch(id) { - case FOURCC_YV12: - case FOURCC_I420: - *h = (*h + 1) & ~1; - size = (*w + 3) & ~3; - if(pitches) - pitches[0] = size; - size *= *h; - if(offsets) - offsets[1] = size; - tmp = ((*w >> 1) + 3) & ~3; - if(pitches) - pitches[1] = pitches[2] = tmp; - tmp *= (*h >> 1); - size += tmp; - if(offsets) - offsets[2] = size; - size += tmp; - break; - case FOURCC_UYVY: - case FOURCC_YUY2: - default: - size = *w << 1; - if(pitches) - pitches[0] = size; - size *= *h; - break; - } - - return size; -} - - -/* client libraries expect an encoding */ -static KdVideoEncodingRec DummyEncoding[1] = -{ - { - 0, - "XV_IMAGE", - IMAGE_MAX_WIDTH, IMAGE_MAX_HEIGHT, - {1, 1} - } -}; - -#define NUM_FORMATS 3 - -static KdVideoFormatRec Formats[NUM_FORMATS] = -{ - {15, TrueColor}, {16, TrueColor}, {24, TrueColor} -}; - -#define NUM_ATTRIBUTES 3 - -static KdAttributeRec Attributes[NUM_ATTRIBUTES] = -{ - {XvSettable | XvGettable, 0, ~0, "XV_COLORKEY"}, - {XvSettable | XvGettable, -1000, 1000, "XV_BRIGHTNESS"}, - {XvSettable | XvGettable, -1000, 1000, "XV_SATURATION"} -}; - -#define NUM_IMAGES 4 - -static KdImageRec Images[NUM_IMAGES] = -{ - XVIMAGE_YUY2, - XVIMAGE_YV12, - XVIMAGE_I420, - XVIMAGE_UYVY -}; - -static void nvidiaResetVideo(KdScreenInfo *screen) -{ - ScreenPtr pScreen = screen->pScreen; - KdScreenPriv(pScreen); - KdCardInfo *card = pScreenPriv->card; - NvidiaScreenInfo *nvidias = (NvidiaScreenInfo *) screen->driver; - NvidiaCardInfo *nvidiac = (NvidiaCardInfo *) card->driver; - NvidiaPortPrivPtr pPortPriv = nvidias->pAdaptor->pPortPrivates[0].ptr; - MediaReg *media = nvidiac->media_reg; - - /* - * Default to maximum image size in YV12 - */ - -} - -static int -nvidiaReputImage (KdScreenInfo *screen, - short drw_x, - short drw_y, - RegionPtr clipBoxes, - pointer data) -{ - ScreenPtr pScreen = screen->pScreen; - NvidiaPortPrivPtr pPortPriv = (NvidiaPortPrivPtr)data; - BoxPtr pOldExtents = REGION_EXTENTS (pScreen, &pPortPriv->clip); - BoxPtr pNewExtents = REGION_EXTENTS (pScreen, clipBoxes); - - if (pOldExtents->x1 == pNewExtents->x1 && - pOldExtents->x2 == pNewExtents->x2 && - pOldExtents->y1 == pNewExtents->y1 && - pOldExtents->y2 == pNewExtents->y2) - { - /* update cliplist */ - if (!REGION_EQUAL (screen->pScreen, &pPortPriv->clip, clipBoxes)) - { - REGION_COPY (screen->pScreen, &pPortPriv->clip, clipBoxes); - nvidiaPaintRegion (screen->pScreen, &pPortPriv->clip, pPortPriv->colorKey); - } - return Success; - } - return BadMatch; -} - -static KdVideoAdaptorPtr -nvidiaSetupImageVideo(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - nvidiaCardInfo(pScreenPriv); - nvidiaScreenInfo(pScreenPriv); - KdScreenInfo *screen = pScreenPriv->screen; - KdCardInfo *card = pScreenPriv->card; - KdVideoAdaptorPtr adapt; - NvidiaPortPrivPtr pPortPriv; - - if(!(adapt = xcalloc(1, sizeof(KdVideoAdaptorRec) + - sizeof(NvidiaPortPrivRec) + - sizeof(DevUnion)))) - return NULL; - - adapt->type = XvWindowMask | XvInputMask | XvImageMask; - adapt->flags = VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT; - adapt->name = "Nvidia Video Overlay"; - adapt->nEncodings = 1; - adapt->pEncodings = DummyEncoding; - adapt->nFormats = NUM_FORMATS; - adapt->pFormats = Formats; - adapt->nPorts = 1; - adapt->pPortPrivates = (DevUnion*)(&adapt[1]); - - pPortPriv = (NvidiaPortPrivPtr)(&adapt->pPortPrivates[1]); - - adapt->pPortPrivates[0].ptr = (pointer)(pPortPriv); - adapt->pAttributes = Attributes; - adapt->nImages = NUM_IMAGES; - adapt->nAttributes = NUM_ATTRIBUTES; - adapt->pImages = Images; - adapt->PutVideo = NULL; - adapt->PutStill = NULL; - adapt->GetVideo = NULL; - adapt->GetStill = NULL; - adapt->StopVideo = nvidiaStopVideo; - adapt->SetPortAttribute = nvidiaSetPortAttribute; - adapt->GetPortAttribute = nvidiaGetPortAttribute; - adapt->QueryBestSize = nvidiaQueryBestSize; - adapt->PutImage = nvidiaPutImage; - adapt->ReputImage = nvidiaReputImage; - adapt->QueryImageAttributes = nvidiaQueryImageAttributes; - - pPortPriv->colorKey = nvidias->colorKey; - pPortPriv->videoOn = FALSE; - pPortPriv->brightness = 0; - pPortPriv->saturation = 0; - pPortPriv->currentBuf = 0; - - /* gotta uninit this someplace */ - REGION_INIT(pScreen, &pPortPriv->clip, NullBox, 0); - - nvidias->pAdaptor = adapt; - - xvBrightness = MAKE_ATOM("XV_BRIGHTNESS"); - xvSaturation = MAKE_ATOM("XV_SATURATION"); - xvColorKey = MAKE_ATOM("XV_COLORKEY"); - - nvidiaResetVideo(screen); - - return adapt; -} - -Bool nvidiaInitVideo(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - KdVideoAdaptorPtr *adaptors, *newAdaptors = NULL; - KdVideoAdaptorPtr newAdaptor = NULL; - int num_adaptors; - KdCardInfo *card = pScreenPriv->card; - NvidiaScreenInfo *nvidias = (NvidiaScreenInfo *) screen->driver; - NvidiaCardInfo *nvidiac = (NvidiaCardInfo *) card->driver; - - if (!nvidiac->media_reg) - return FALSE; - - newAdaptor = nvidiaSetupImageVideo(pScreen); - - num_adaptors = KdXVListGenericAdaptors(screen, &adaptors); - - if(newAdaptor) - { - if(!num_adaptors) - { - num_adaptors = 1; - adaptors = &newAdaptor; - } - else - { - newAdaptors = xalloc((num_adaptors + 1) * - sizeof(KdVideoAdaptorPtr*)); - if(newAdaptors) - { - memcpy(newAdaptors, adaptors, - num_adaptors * sizeof(KdVideoAdaptorPtr)); - newAdaptors[num_adaptors] = newAdaptor; - adaptors = newAdaptors; - num_adaptors++; - } - } - } - - if(num_adaptors) - KdXVScreenInit(pScreen, adaptors, num_adaptors); - - if(newAdaptors) - xfree(newAdaptors); - return TRUE; -} diff --git a/hw/kdrive/pcmcia/modes.h b/hw/kdrive/pcmcia/modes.h deleted file mode 100644 index 0a078736f..000000000 --- a/hw/kdrive/pcmcia/modes.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2001 by Alan Hourihane, Sychdyn, North Wales, UK. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Alan Hourihane not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Alan Hourihane makes no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - * - * Authors: Alan Hourihane, - */ - -#define V_NHSYNC 0x01 -#define V_NVSYNC 0x02 -#define V_PHSYNC 0x04 -#define V_PVSYNC 0x08 -#define V_INTERLACE 0x10 - -pcmciaDisplayModeRec pcmciaDefaultModes [] = { -/* 640x400 @ 70Hz (VGA) hsync: 37.9kHz */ - {640, 400, 70 ,31500, 640,672,736,832,0, 400,401,404,445,0, V_NHSYNC | V_PVSYNC}, -/* 640x480 @ 60Hz (Industry standard) hsync: 31.5kHz */ - {640, 480, 60 ,25200, 640,656,752,800,0, 480,490,492,525,0, V_NHSYNC | V_NVSYNC}, -/* 640x480 @ 72Hz (VESA) hsync: 37.9kHz */ - {640, 480, 72 ,31500, 640,664,704,832,0, 480,489,491,520,0, V_NHSYNC | V_NVSYNC}, -/* 640x480 @ 75Hz (VESA) hsync: 37.5kHz */ - {640, 480, 75 ,31500, 640,656,720,840,0, 480,481,484,500,0, V_NHSYNC | V_NVSYNC}, -/* 640x480 @ 85Hz (VESA) hsync: 43.3kHz */ - {640, 480, 85 ,36000, 640,696,752,832,0, 480,481,484,509,0, V_NHSYNC | V_NVSYNC}, -/* 800x600 @ 56Hz (VESA) hsync: 35.2kHz */ - {800, 600, 56 ,36000, 800,824,896,1024,0, 600,601,603,625,0, V_PHSYNC | V_PVSYNC}, -/* 800x600 @ 60Hz (VESA) hsync: 37.9kHz */ - {800, 600, 60 ,40000, 800,840,968,1056,0, 600,601,605,628,0, V_PHSYNC | V_PVSYNC}, -/* 800x600 @ 72Hz (VESA) hsync: 48.1kHz */ - {800, 600, 72 ,50000, 800,856,976,1040,0, 600,637,643,666,0, V_PHSYNC | V_PVSYNC}, -/* 800x600 @ 75Hz (VESA) hsync: 46.9kHz */ - {800, 600, 75 ,49500, 800,816,896,1056,0, 600,601,604,625,0, V_PHSYNC | V_PVSYNC}, -/* 800x600 @ 85Hz (VESA) hsync: 53.7kHz */ - {800, 600, 85 ,56300, 800,832,896,1048,0, 600,601,604,631,0, V_PHSYNC | V_PVSYNC}, -/* 1024x768i @ 43Hz (industry standard) hsync: 35.5kHz */ - {1024, 768, 43 ,44900, 1024,1032,1208,1264,0, 768,768,776,817,0, V_PHSYNC | V_PVSYNC | V_INTERLACE}, -/* 1024x768 @ 60Hz (VESA) hsync: 48.4kHz */ - {1024, 768, 60 ,65000, 1024,1048,1184,1344,0, 768,771,777,806,0, V_NHSYNC | V_NVSYNC}, -/* 1024x768 @ 70Hz (VESA) hsync: 56.5kHz */ - {1024, 768, 70 ,75000, 1024,1048,1184,1328,0, 768,771,777,806,0, V_NHSYNC | V_NVSYNC}, -/* 1024x768 @ 75Hz (VESA) hsync: 60.0kHz */ - {1024, 768, 75 ,78800, 1024,1040,1136,1312,0, 768,769,772,800,0, V_PHSYNC | V_PVSYNC}, -/* 1024x768 @ 85Hz (VESA) hsync: 68.7kHz */ - {1024, 768, 85 ,94500, 1024,1072,1168,1376,0, 768,769,772,808,0, V_PHSYNC | V_PVSYNC}, -/* 1152x864 @ 75Hz (VESA) hsync: 67.5kHz */ - {1152, 864, 75 ,108000, 1152,1216,1344,1600,0, 864,865,868,900,0, V_PHSYNC | V_PVSYNC}, - {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} -}; diff --git a/hw/kdrive/pcmcia/pcmcia.c b/hw/kdrive/pcmcia/pcmcia.c deleted file mode 100644 index a1728c783..000000000 --- a/hw/kdrive/pcmcia/pcmcia.c +++ /dev/null @@ -1,1199 +0,0 @@ -/* - * Copyright 2001 by Alan Hourihane, Sychdyn, North Wales, UK. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Alan Hourihane not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Alan Hourihane makes no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - * - * Authors: Alan Hourihane, - * - * A driver for the following PCMCIA cards... - * Hewlett Packards HP VGA Out (Model F1252A) - * Colorgraphics Voyager VGA - * - * Tested running under a Compaq IPAQ Pocket PC running Linux - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "pcmcia.h" -#define extern -#include -#undef extern - -#define CLOCK 14318 /* KHz */ -#define CLK_N(a,b) (a & 0xff) -#define CLK_M(a,b) ((b) & 0x3f) -#define CLK_K(a,b) (((b) >> 6) & 3) -#define CLK_FREQ(a,b) (((CLK_N(a,b) + 8) * CLOCK) / ((CLK_M(a,b)+2) << CLK_K(a,b))) - -extern void -tridentUpdatePacked (ScreenPtr pScreen, - shadowBufPtr pBuf); -extern void -cirrusUpdatePacked (ScreenPtr pScreen, - shadowBufPtr pBuf); - -static Bool -tridentSetCLK(int clock, CARD8 *a, CARD8 *b); - -static Bool -CirrusFindClock(int freq, int *num_out, int *den_out); - -Bool -pcmciaCardInit (KdCardInfo *card) -{ - pcmciaCardInfo *pcmciac; - CARD8 r9; - - pcmciac = (pcmciaCardInfo *) xalloc (sizeof (pcmciaCardInfo)); - if (!pcmciac) - return FALSE; - - pcmciac->cop_base = (CARD8 *) KdMapDevice (PCMCIA_COP_BASE(card), - PCMCIA_COP_SIZE(card)); - - r9 = pcmciaReadIndex (pcmciac, 0x3c4, 0x09); - /* - * Crude detection.... - * The trident chip has a read only register at 0x09, which returns 0x4. - * If it's not that, we assume the cirrus chip. - * BREAKAGE.! If we have an anonymous PCMCIA card inserted, we could - * potentially smash something here. FIXME ! - */ - if (r9 == 0x04) { - ErrorF("PCMCIA: Found HP VGA card\n"); - pcmciac->HP = TRUE; /* Select HP VGA Out Card */ - } else { - ErrorF("PCMCIA: Found Voyager VGA card\n"); - pcmciac->HP = FALSE; /* Select Voyager VGA Card */ - } - - if (pcmciac->HP) { - /* needed by the accelerator - later */ - pcmciac->cop = (Cop *) (pcmciac->cop_base + TRIDENT_COP_OFF(card)); - } - - /* - * Map frame buffer - */ - if (pcmciac->HP) - pcmciac->fb = KdMapDevice (0x2ce00000, 0x80000); - else - pcmciac->fb = KdMapDevice (0x2c0a0000, 0x10000); /*64K bank switched*/ - - if (!pcmciac->fb) - return FALSE; - - pcmciac->window = 0; - - card->driver = pcmciac; - - return TRUE; -} - -Bool -pcmciaModeSupported (KdScreenInfo *screen, - const KdMonitorTiming *t) -{ - KdCardInfo *card = screen->card; - pcmciaCardInfo *pcmciac = (pcmciaCardInfo *) card->driver; - - if (pcmciac->HP) - { - CARD8 a, b; - if (!tridentSetCLK (t->clock, &a, &b)) - return FALSE; - } - else - { - int a, b; - if (!CirrusFindClock (t->clock, &a, &b)) - return FALSE; - } - - /* width must be a multiple of 16 */ - if (t->horizontal & 0xf) - return FALSE; - return TRUE; -} - -Bool -pcmciaModeUsable (KdScreenInfo *screen) -{ - KdCardInfo *card = screen->card; - pcmciaCardInfo *pcmciac = (pcmciaCardInfo *) card->driver; - int screen_size; - int pixel_width; - int byte_width; - int fb; - - if (screen->fb[0].depth == 8) - screen->fb[0].bitsPerPixel = 8; - else if (screen->fb[0].depth == 15 || screen->fb[0].depth == 16) - screen->fb[0].bitsPerPixel = 16; - else - return FALSE; - - screen_size = 0; - screen->fb[0].pixelStride = screen->width; - screen->fb[0].byteStride = screen->width * (screen->fb[0].bitsPerPixel >>3); - screen->fb[0].frameBuffer = pcmciac->fb; - screen_size = screen->fb[0].byteStride * screen->height; - - return screen_size <= pcmciac->memory; -} - -Bool -pcmciaScreenInit (KdScreenInfo *screen) -{ - pcmciaCardInfo *pcmciac = screen->card->driver; - pcmciaScreenInfo *pcmcias; - int screen_size, memory; - int i; - const KdMonitorTiming *t; - - pcmcias = (pcmciaScreenInfo *) xalloc (sizeof (pcmciaScreenInfo)); - if (!pcmcias) - return FALSE; - memset (pcmcias, '\0', sizeof (pcmciaScreenInfo)); - - /* if (!pcmciac->cop) */ - screen->dumb = TRUE; - - if (screen->fb[0].depth < 8) - screen->fb[0].depth = 8; - - /* default to 16bpp */ - if (!screen->fb[0].depth) - screen->fb[0].depth = 16; - - /* default to 60Hz refresh */ - if (!screen->width || !screen->height) - { - screen->width = 640; - screen->height = 400; - screen->rate = 60; - } - - pcmciac->memory = 512 * 1024; - if (pcmciac->HP && !screen->softCursor && screen->fb[0].depth == 8) - { - /* ack, bail on the HW cursor for everything -- no ARGB falback */ - pcmcias->cursor_base = 0; -#if 0 - /* Let's do hw cursor for the HP card, only in 8bit mode though */ - pcmcias->cursor_base = pcmcias->screen + pcmciac->memory - 4096; - pcmciac->memory -= 4096; -#endif - } - - pcmcias->screen = pcmciac->fb; - screen->driver = pcmcias; - - t = KdFindMode (screen, pcmciaModeSupported); - - screen->rate = t->rate; - screen->width = t->horizontal; - screen->height = t->vertical; - - pcmcias->randr = screen->randr; - - if (!KdTuneMode (screen, pcmciaModeUsable, pcmciaModeSupported)) - { - xfree (pcmcias); - return FALSE; - } - - switch (screen->fb[0].depth) { - case 4: - screen->fb[0].visuals = ((1 << StaticGray) | - (1 << GrayScale) | - (1 << StaticColor)); - screen->fb[0].blueMask = 0x00; - screen->fb[0].greenMask = 0x00; - screen->fb[0].redMask = 0x00; - break; - case 8: - screen->fb[0].visuals = ((1 << StaticGray) | - (1 << GrayScale) | - (1 << StaticColor) | - (1 << PseudoColor) | - (1 << TrueColor) | - (1 << DirectColor)); - screen->fb[0].blueMask = 0x00; - screen->fb[0].greenMask = 0x00; - screen->fb[0].redMask = 0x00; - break; - case 15: - screen->fb[0].visuals = (1 << TrueColor); - screen->fb[0].blueMask = 0x001f; - screen->fb[0].greenMask = 0x03e0; - screen->fb[0].redMask = 0x7c00; - break; - case 16: - screen->fb[0].visuals = (1 << TrueColor); - screen->fb[0].blueMask = 0x001f; - screen->fb[0].greenMask = 0x07e0; - screen->fb[0].redMask = 0xf800; - break; - } - - return TRUE; -} - -void * -tridentWindowLinear (ScreenPtr pScreen, - CARD32 row, - CARD32 offset, - int mode, - CARD32 *size, - void *closure) -{ - KdScreenPriv(pScreen); - pcmciaCardInfo *pcmciac = pScreenPriv->card->driver; - - if (!pScreenPriv->enabled) - return 0; - - *size = pScreenPriv->screen->fb[0].byteStride; - return (CARD8 *) pcmciac->fb + row * pScreenPriv->screen->fb[0].byteStride + offset; -} - -void * -cirrusWindowWindowed (ScreenPtr pScreen, - CARD32 row, - CARD32 offset, - int mode, - CARD32 *size, - void *closure) -{ - KdScreenPriv(pScreen); - pcmciaCardInfo *pcmciac = pScreenPriv->card->driver; - int bank, boffset; - - if (!pScreenPriv->enabled) - return 0; - - bank = (row * pScreenPriv->screen->fb[0].byteStride) / 0x1000; - pcmciaWriteIndex(pcmciac, 0x3ce, 0x0B, 0x0c); - pcmciaWriteIndex(pcmciac, 0x3ce, 0x09, bank); - pcmciaWriteIndex(pcmciac, 0x3ce, 0x0A, bank); - *size = pScreenPriv->screen->fb[0].byteStride; - return (CARD8 *) pcmciac->fb + (row * pScreenPriv->screen->fb[0].byteStride) - (bank * 0x1000) + offset; -} - -LayerPtr -pcmciaLayerCreate (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - pcmciaCardInfo *pcmciac = pScreenPriv->card->driver; - pcmciaScreenInfo *pcmcias = (pcmciaScreenInfo *) pScreenPriv->screen->driver; - ShadowUpdateProc update; - ShadowWindowProc window; - PixmapPtr pPixmap; - int kind; - - if (pcmciac->HP) { - window = tridentWindowLinear; - if (pcmcias->randr == RR_Rotate_0) - update = tridentUpdatePacked; - else - update = pcmciaUpdateRotatePacked; - } else { - window = cirrusWindowWindowed; - if (pcmcias->randr == RR_Rotate_0) - update = cirrusUpdatePacked; - else - update = pcmciaUpdateRotatePacked; - } - - if (!update) - abort (); - - kind = LAYER_SHADOW; - pPixmap = 0; - - return LayerCreate (pScreen, kind, screen->fb[0].depth, - pPixmap, update, window, pcmcias->randr, 0); -} - -void -pcmciaConfigureScreen (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - FbdevPriv *priv = pScreenPriv->card->driver; - pcmciaScreenInfo *pcmcias = (pcmciaScreenInfo *) screen->driver; - KdMouseMatrix m; - - KdComputeMouseMatrix (&m, pcmcias->randr, - screen->width, screen->height); - - if (m.matrix[0][0]) - { - pScreen->width = screen->width; - pScreen->height = screen->height; - pScreen->mmWidth = screen->width_mm; - pScreen->mmHeight = screen->height_mm; - } - else - { - pScreen->width = screen->height; - pScreen->height = screen->width; - pScreen->mmWidth = screen->height_mm; - pScreen->mmHeight = screen->width_mm; - } - KdSetMouseMatrix (&m); -} - -#ifdef RANDR - -Bool -pcmciaRandRSupported (ScreenPtr pScreen, - const KdMonitorTiming *t) -{ - KdScreenPriv(pScreen); - pcmciaCardInfo *pcmciac = pScreenPriv->card->driver; - KdScreenInfo *screen = pScreenPriv->screen; - int screen_size; - int byteStride; - - /* Make sure the clock is supported */ - if (!pcmciaModeSupported (screen, t)) - return FALSE; - /* Check for sufficient memory */ - byteStride = screen->width * (screen->fb[0].bitsPerPixel >>3); - screen_size = byteStride * screen->height; - - return screen_size <= pcmciac->memory; -} - -Bool -pcmciaRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) -{ - KdScreenPriv(pScreen); - pcmciaScreenInfo *pcmcias = (pcmciaScreenInfo *) pScreenPriv->screen->driver; - - *rotations = (RR_Rotate_0|RR_Rotate_90|RR_Rotate_180|RR_Rotate_270| - RR_Reflect_X|RR_Reflect_Y); - - return KdRandRGetInfo (pScreen, pcmcias->randr, pcmciaRandRSupported); -} - -int -pcmciaLayerAdd (WindowPtr pWin, pointer value) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - LayerPtr pLayer = (LayerPtr) value; - - if (!LayerWindowAdd (pScreen, pLayer, pWin)) - return WT_STOPWALKING; - - return WT_WALKCHILDREN; -} - -int -pcmciaLayerRemove (WindowPtr pWin, pointer value) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - LayerPtr pLayer = (LayerPtr) value; - - LayerWindowRemove (pScreen, pLayer, pWin); - - return WT_WALKCHILDREN; -} - -pcmciaRandRSetConfig (ScreenPtr pScreen, - Rotation randr, - int rate, - RRScreenSizePtr pSize) -{ - KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - FbdevPriv *priv = pScreenPriv->card->driver; - pcmciaScreenInfo *pcmcias = (pcmciaScreenInfo *) pScreenPriv->screen->driver; - Bool wasEnabled = pScreenPriv->enabled; - int newwidth, newheight; - LayerPtr pNewLayer; - int kind; - int oldrandr = pcmcias->randr; - PixmapPtr pPixmap; - const KdMonitorTiming *t; - - randr = KdAddRotation (screen->randr, randr); - - t = KdRandRGetTiming (pScreen, pcmciaRandRSupported, rate, pSize); - - if (wasEnabled) - KdDisableScreen (pScreen); - - screen->rate = t->rate; - screen->width = t->horizontal; - screen->height = t->vertical; - - pcmcias->randr = randr; - pcmciaConfigureScreen (pScreen); - - pNewLayer = pcmciaLayerCreate (pScreen); - - if (!pNewLayer) - { - pcmcias->randr = oldrandr; - pcmciaConfigureScreen (pScreen); - if (wasEnabled) - KdEnableScreen (pScreen); - return FALSE; - } - - if (WalkTree (pScreen, pcmciaLayerAdd, (pointer) pNewLayer) == WT_STOPWALKING) - { - WalkTree (pScreen, pcmciaLayerRemove, (pointer) pNewLayer); - LayerDestroy (pScreen, pNewLayer); - pcmcias->randr = oldrandr; - pcmciaConfigureScreen (pScreen); - if (wasEnabled) - KdEnableScreen (pScreen); - return FALSE; - } - WalkTree (pScreen, pcmciaLayerRemove, (pointer) pcmcias->pLayer); - LayerDestroy (pScreen, pcmcias->pLayer); - pcmcias->pLayer = pNewLayer; - if (wasEnabled) - KdEnableScreen (pScreen); - return TRUE; -} - -Bool -pcmciaRandRInit (ScreenPtr pScreen) -{ - rrScrPrivPtr pScrPriv; - - if (!RRScreenInit (pScreen)) - return FALSE; - - pScrPriv = rrGetScrPriv(pScreen); - pScrPriv->rrGetInfo = pcmciaRandRGetInfo; - pScrPriv->rrSetConfig = pcmciaRandRSetConfig; - return TRUE; -} -#endif - -Bool -pcmciaInitScreen (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - FbdevPriv *priv = pScreenPriv->card->driver; - pcmciaScreenInfo *pcmcias = (pcmciaScreenInfo *) pScreenPriv->screen->driver; - - if (!LayerStartInit (pScreen)) - return FALSE; - if (!LayerFinishInit (pScreen)) - return FALSE; - - pcmciaConfigureScreen (pScreen); - - pcmcias->pLayer = pcmciaLayerCreate (pScreen); - if (!pcmcias->pLayer) - return FALSE; -#ifdef RANDR - if (!pcmciaRandRInit (pScreen)) - return FALSE; -#endif - return TRUE; -} - -CARD8 -pcmciaReadIndex (pcmciaCardInfo *pcmciac, CARD16 port, CARD8 index) -{ - CARD8 value; - - pcmciac->cop_base[port] = index; - value = pcmciac->cop_base[port+1]; - return value; -} - -void -pcmciaWriteIndex (pcmciaCardInfo *pcmciac, CARD16 port, CARD8 index, CARD8 value) -{ - pcmciac->cop_base[port] = index; - pcmciac->cop_base[port+1] = value; -} - -CARD8 -pcmciaReadReg (pcmciaCardInfo *pcmciac, CARD16 port) -{ - CARD8 value; - - value = pcmciac->cop_base[port]; - - return value; -} - -void -pcmciaWriteReg (pcmciaCardInfo *pcmciac, CARD16 port, CARD8 value) -{ - pcmciac->cop_base[port] = value; -} - - -void -pcmciaPause () -{ - struct timeval tv; - - tv.tv_sec = 0; - tv.tv_usec = 50 * 1000; - select (1, 0, 0, 0, &tv); -} - -void -pcmciaPreserve (KdCardInfo *card) -{ -} - -/* CLOCK_FACTOR is double the osc freq in kHz (osc = 14.31818 MHz) */ -#define CLOCK_FACTOR 28636 - -/* stability constraints for internal VCO -- MAX_VCO also determines the maximum Video pixel clock */ -#define MIN_VCO CLOCK_FACTOR -#define MAX_VCO 111000 - -/* clock in kHz is (numer * CLOCK_FACTOR / (denom & 0x3E)) >> (denom & 1) */ -#define VCOVAL(n, d) \ - ((((n) & 0x7F) * CLOCK_FACTOR / ((d) & 0x3E)) ) - -#define CLOCKVAL(n, d) \ - (VCOVAL(n, d) >> ((d) & 1)) - -static Bool -CirrusFindClock(int freq, int *num_out, int *den_out) -{ - int n; - int num = 0, den = 0; - int mindiff; - - /* - * If max_clock is greater than the MAX_VCO default, ignore - * MAX_VCO. On the other hand, if MAX_VCO is higher than max_clock, - * make use of the higher MAX_VCO value. - */ - - mindiff = freq; - for (n = 0x10; n < 0x7f; n++) { - int d; - for (d = 0x14; d < 0x3f; d++) { - int c, diff; - /* Avoid combinations that can be unstable. */ - if ((VCOVAL(n, d) < MIN_VCO) || (VCOVAL(n, d) > MAX_VCO)) - continue; - c = CLOCKVAL(n, d); - diff = abs(c - freq); - if (diff < mindiff) { - mindiff = diff; - num = n; - den = d; - } - } - } - if (n == 0x80) - return FALSE; - - *num_out = num; - *den_out = den; - - return TRUE; -} - - -static Bool -tridentSetCLK(int clock, CARD8 *a, CARD8 *b) -{ - int powerup[4] = { 1,2,4,8 }; - int clock_diff = 750; - int freq, ffreq; - int m, n, k; - int p, q, r, s; - int startn, endn; - int endm, endk; - - p = q = r = s = 0; - - startn = 0; - endn = 121; - endm = 31; - endk = 1; - - freq = clock; - - for (k=0;k<=endk;k++) - for (n=startn;n<=endn;n++) - for (m=1;m<=endm;m++) - { - ffreq = ( ( ((n + 8) * CLOCK) / ((m + 2) * powerup[k]) )); - if ((ffreq > freq - clock_diff) && (ffreq < freq + clock_diff)) - { - clock_diff = (freq > ffreq) ? freq - ffreq : ffreq - freq; - p = n; q = m; r = k; s = ffreq; - } - } - -#if 0 - ErrorF ("ffreq %d clock %d\n", s, clock); -#endif - if (s == 0) - return FALSE; - - /* N is first 7bits, first M bit is 8th bit */ - *a = ((1 & q) << 7) | p; - /* first 4bits are rest of M, 1bit for K value */ - *b = (((q & 0xFE) >> 1) | (r << 4)); - return TRUE; -} - -Bool -pcmciaEnable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - pcmciaCardInfo *pcmciac = pScreenPriv->card->driver; - pcmciaScreenInfo *pcmcias = (pcmciaScreenInfo *) screen->driver; - int i,j; - unsigned char Sequencer[6]; - unsigned char CRTC[31]; - unsigned char Graphics[9]; - unsigned char Attribute[21]; - unsigned char MiscOutReg; - const KdMonitorTiming *t; - int hactive, hblank, hfp, hbp; - int vactive, vblank, vfp, vbp; - - int h_active; - int h_total; - int h_display_end; - int h_sync_start; - int h_sync_end; - int h_skew = 0; - - int v_active; - int v_total; - int v_sync_start; - int v_sync_end; - int v_skew = 0; - - t = KdFindMode (screen, pcmciaModeSupported); - - hactive = t->horizontal; - hfp = t->hfp; - hbp = t->hbp; - hblank = t->hblank; - - h_active = hactive; - h_sync_start = hactive + hfp; - h_sync_end = hactive + hblank - hbp; - h_total = hactive + hblank; - - vactive = t->vertical; - vfp = t->vfp; - vbp = t->vbp; - vblank = t->vblank; - - v_active = vactive; - v_sync_start = vactive + vfp; - v_sync_end = vactive + vblank - vbp; - v_total = vactive + vblank; - - /* - * compute correct Hsync & Vsync polarity - */ - - MiscOutReg = 0x23; - if (t->hpol == KdSyncNegative) - MiscOutReg |= 0x40; - if (t->vpol == KdSyncNegative) - MiscOutReg |= 0x80; - - /* - * Time Sequencer - */ - if (pScreenPriv->screen->fb[0].depth == 4) - Sequencer[0] = 0x02; - else - Sequencer[0] = 0x00; - Sequencer[1] = 0x01; - Sequencer[2] = 0x0F; - Sequencer[3] = 0x00; /* Font select */ - if (pScreenPriv->screen->fb[0].depth < 8) - Sequencer[4] = 0x06; /* Misc */ - else - Sequencer[4] = 0x0E; /* Misc */ - Sequencer[5] = 0x00; - - /* - * CRTC Controller - */ - CRTC[0] = ((h_total) >> 3) - 5; - CRTC[1] = (hactive >> 3) - 1; - CRTC[2] = ((min(h_sync_start,h_active)) >> 3) - 1; - CRTC[3] = ((((min(h_sync_end,h_total)) >> 3) - 1) & 0x1F) | 0x80; - i = (((h_skew << 2) + 0x10) & ~0x1F); - if (i < 0x80) - CRTC[3] |= i; - CRTC[4] = (h_sync_start >> 3); - CRTC[5] = (((((min(h_sync_end,h_total)) >> 3) - 1) & 0x20) << 2) - | (((h_sync_end >> 3)) & 0x1F); - - CRTC[6] = (v_total - 2) & 0xFF; - CRTC[7] = (((v_total - 2) & 0x100) >> 8) - | (((v_active - 1) & 0x100) >> 7) - | ((v_sync_start & 0x100) >> 6) - | ((((min(v_sync_start,v_active)) - 1) & 0x100) >> 5) - | 0x10 - | (((v_total - 2) & 0x200) >> 4) - | (((v_active - 1) & 0x200) >> 3) - | ((v_sync_start & 0x200) >> 2); - CRTC[8] = 0x00; - CRTC[9] = ((((min(v_sync_start,v_active))-1) & 0x200) >> 4) | 0x40; - CRTC[10] = 0x00; - CRTC[11] = 0x00; - CRTC[12] = 0x00; - CRTC[13] = 0x00; - CRTC[14] = 0x00; - CRTC[15] = 0x00; - CRTC[16] = v_sync_start & 0xFF; - CRTC[17] = (v_sync_end & 0x0F) | 0x20; - CRTC[18] = (v_active - 1) & 0xFF; - if (pScreenPriv->screen->fb[0].depth == 4) - CRTC[19] = pScreenPriv->screen->fb[0].pixelStride >> 4; - else - if (pScreenPriv->screen->fb[0].depth == 8) - CRTC[19] = pScreenPriv->screen->fb[0].pixelStride >> 3; - else - if (pScreenPriv->screen->fb[0].depth == 16 || - pScreenPriv->screen->fb[0].depth == 15) - CRTC[19] = pScreenPriv->screen->fb[0].pixelStride >> 2; - CRTC[20] = 0x00; - CRTC[21] = ((min(v_sync_end,v_active)) - 1) & 0xFF; - CRTC[22] = ((min(v_sync_end,v_active)) - 1) & 0xFF; - if (pScreenPriv->screen->fb[0].depth < 8) - CRTC[23] = 0xE3; - else - CRTC[23] = 0xC3; - CRTC[24] = 0xFF; - CRTC[25] = 0x00; - CRTC[26] = 0x00; -#if 0 - if (!pcmciac->HP) - if (mode.Flags & V_INTERLACE) CRTC[26] |= 0x01; -#endif - if (pcmciac->HP) - CRTC[27] = 0x00; - else - CRTC[27] = 0x22; - CRTC[28] = 0x00; - CRTC[29] = 0x00; - CRTC[30] = 0x80; -#if 0 - if (pcmciac->HP) - if (mode.Flags & V_INTERLACE) CRTC[30] |= 0x04; -#endif - -{ - int nExtBits = 0; - CARD32 ExtBits; - CARD32 ExtBitMask = ((1 << nExtBits) - 1) << 6; - - CRTC[3] = (CRTC[3] & ~0x1F) - | ((((min(h_sync_end,h_total)) >> 3) - 1) & 0x1F); - CRTC[5] = (CRTC[5] & ~0x80) - | (((((min(h_sync_end,h_total)) >> 3) - 1) & 0x20) << 2); - ExtBits = (((min(h_sync_end,h_total)) >> 3) - 1) & ExtBitMask; - - /* First the horizontal case */ - if ((((min(h_sync_end,h_total)) >> 3) == (h_total >> 3))) - { - int i = (CRTC[3] & 0x1F) - | ((CRTC[5] & 0x80) >> 2) - | ExtBits; - if ((i-- > ((((min(h_sync_start,h_active)) >> 3) - 1) - & (0x3F | ExtBitMask))) - && ((min(h_sync_end,h_total)) == h_total)) - i = 0; - CRTC[3] = (CRTC[3] & ~0x1F) | (i & 0x1F); - CRTC[5] = (CRTC[5] & ~0x80) | ((i << 2) & 0x80); - ExtBits = i & ExtBitMask; - } -} -{ - CARD32 ExtBits; - CARD32 ExtBitMask = 0; - /* If width is not known nBits should be 0. In this - * case BitMask is set to 0 so we can check for it. */ - CARD32 BitMask = 0; - int VBlankStart = ((min(v_sync_start,v_active)) - 1) & 0xFF; - CRTC[22] = ((min(v_sync_end,v_total)) - 1) & 0xFF; - ExtBits = ((min(v_sync_end,v_total)) - 1) & ExtBitMask; - - if ((min(v_sync_end,v_total)) == v_total) - /* Null top overscan */ - { - int i = CRTC[22] | ExtBits; - if (((BitMask && ((i & BitMask) > (VBlankStart & BitMask))) - || ((i > VBlankStart) && /* 8-bit case */ - ((i & 0x7F) > (VBlankStart & 0x7F)))) && /* 7-bit case */ - !(CRTC[9] & 0x9F)) /* 1 scanline/row */ - i = 0; - else - i = (i - 1); - CRTC[22] = i & 0xFF; - ExtBits = i & 0xFF00; - } -} - - /* - * Graphics Display Controller - */ - Graphics[0] = 0x00; - Graphics[1] = 0x00; - Graphics[2] = 0x00; - Graphics[3] = 0x00; - Graphics[4] = 0x00; - if (pScreenPriv->screen->fb[0].depth == 4) - Graphics[5] = 0x02; - else - Graphics[5] = 0x40; - Graphics[6] = 0x05; /* only map 64k VGA memory !!!! */ - Graphics[7] = 0x0F; - Graphics[8] = 0xFF; - - Attribute[0] = 0x00; /* standard colormap translation */ - Attribute[1] = 0x01; - Attribute[2] = 0x02; - Attribute[3] = 0x03; - Attribute[4] = 0x04; - Attribute[5] = 0x05; - Attribute[6] = 0x06; - Attribute[7] = 0x07; - Attribute[8] = 0x08; - Attribute[9] = 0x09; - Attribute[10] = 0x0A; - Attribute[11] = 0x0B; - Attribute[12] = 0x0C; - Attribute[13] = 0x0D; - Attribute[14] = 0x0E; - Attribute[15] = 0x0F; - if (pScreenPriv->screen->fb[0].depth == 4) - Attribute[16] = 0x81; - else - Attribute[16] = 0x41; - if (pScreenPriv->screen->fb[0].bitsPerPixel == 16) - Attribute[17] = 0x00; - else - Attribute[17] = 0xFF; - Attribute[18] = 0x0F; - Attribute[19] = 0x00; - Attribute[20] = 0x00; - - /* Wake up the card */ - if (pcmciac->HP) { - pcmciaWriteReg(pcmciac, 0x3c3, 0x1); - pcmciaWriteReg(pcmciac, 0x46e8, 0x10); - } else { - pcmciaWriteReg(pcmciac, 0x105, 0x1); - pcmciaWriteReg(pcmciac, 0x46e8, 0x1f); - pcmciaWriteReg(pcmciac, 0x102, 0x1); - pcmciaWriteReg(pcmciac, 0x46e8, 0xf); - pcmciaWriteReg(pcmciac, 0x3c3, 0x1); - } - - if (pcmciac->HP) { - /* unlock */ - pcmciaWriteIndex(pcmciac, 0x3c4, 0x11, 0x92); - j = pcmciaReadIndex(pcmciac, 0x3c4, 0xb); - pcmciaWriteIndex(pcmciac, 0x3c4, 0xe, 0xc2); - - /* switch on dac */ - pcmciaWriteIndex(pcmciac, 0x3d4, 0x29, 0x24); - /* switch on the accelerator */ - pcmciaWriteIndex(pcmciac, 0x3d4, 0x36, 0x80); - - /* bump up memory clk */ - pcmciaWriteReg(pcmciac, 0x43c6, 0x65); - pcmciaWriteReg(pcmciac, 0x43c7, 0x00); - } else { - /* unlock */ - pcmciaWriteIndex(pcmciac, 0x3c4, 0x06, 0x12); - pcmciaWriteReg(pcmciac, 0x3c2, MiscOutReg); - } - - /* synchronous reset */ - pcmciaWriteIndex(pcmciac, 0x3c4, 0, 0); - - pcmciaWriteReg(pcmciac, 0x3da, 0x10); - - for (i=0;i<6;i++) - pcmciaWriteIndex(pcmciac, 0x3c4, i, Sequencer[i]); - - if (pcmciac->HP) { - /* Stick chip into color mode */ - pcmciaWriteIndex(pcmciac, 0x3ce, 0x2f, 0x06); - /* Switch on Linear addressing */ - pcmciaWriteIndex(pcmciac, 0x3d4, 0x21, 0x2e); - } else { - /* Stick chip into 8bit access mode - ugh! */ - pcmciaWriteIndex(pcmciac, 0x3c4, 0x0F, 0x20); /* 0x26 ? */ - /* reset mclk */ - pcmciaWriteIndex(pcmciac, 0x3c4, 0x1F, 0); - } - - pcmciaWriteIndex(pcmciac, 0x3c4, 0, 0x3); - - for (i=0;i<31;i++) - pcmciaWriteIndex(pcmciac, 0x3d4, i, CRTC[i]); - - for (i=0;i<9;i++) - pcmciaWriteIndex(pcmciac, 0x3ce, i, Graphics[i]); - - j = pcmciaReadReg(pcmciac, 0x3da); - - for (i=0;i<21;i++) { - pcmciaWriteReg(pcmciac, 0x3c0, i); - pcmciaWriteReg(pcmciac, 0x3c0, Attribute[i]); - } - - j = pcmciaReadReg(pcmciac, 0x3da); - pcmciaWriteReg(pcmciac, 0x3c0, 0x20); - - j = pcmciaReadReg(pcmciac, 0x3c8); - j = pcmciaReadReg(pcmciac, 0x3c6); - j = pcmciaReadReg(pcmciac, 0x3c6); - j = pcmciaReadReg(pcmciac, 0x3c6); - j = pcmciaReadReg(pcmciac, 0x3c6); - switch (pScreenPriv->screen->fb[0].depth) { - /* This is here for completeness, when/if we ever do 4bpp */ - case 4: - pcmciaWriteReg(pcmciac, 0x3c6, 0x0); - if (pcmciac->HP) { - pcmciaWriteIndex(pcmciac, 0x3ce, 0x0f, 0x90); - pcmciaWriteIndex(pcmciac, 0x3d4, 0x38, 0x00); - } else - pcmciaWriteIndex(pcmciac, 0x3c4, 0x07, 0x00); - break; - case 8: - pcmciaWriteReg(pcmciac, 0x3c6, 0x0); - if (pcmciac->HP) { - pcmciaWriteIndex(pcmciac, 0x3ce, 0x0f, 0x92); - pcmciaWriteIndex(pcmciac, 0x3d4, 0x38, 0x00); - } else - pcmciaWriteIndex(pcmciac, 0x3c4, 0x07, 0x01); - break; - case 15: - if (pcmciac->HP) { - pcmciaWriteReg(pcmciac, 0x3c6, 0x10); - pcmciaWriteIndex(pcmciac, 0x3ce, 0x0f, 0x9a); - pcmciaWriteIndex(pcmciac, 0x3d4, 0x38, 0x04); - } else { - pcmciaWriteReg(pcmciac, 0x3c6, 0xC0); - pcmciaWriteIndex(pcmciac, 0x3c4, 0x07, 0x03); - } - break; - case 16: - if (pcmciac->HP) { - pcmciaWriteReg(pcmciac, 0x3c6, 0x30); - pcmciaWriteIndex(pcmciac, 0x3ce, 0x0f, 0x9a); - pcmciaWriteIndex(pcmciac, 0x3d4, 0x38, 0x04); - } else { - pcmciaWriteReg(pcmciac, 0x3c6, 0xC1); - pcmciaWriteIndex(pcmciac, 0x3c4, 0x07, 0x03); - } - break; - } - j = pcmciaReadReg(pcmciac, 0x3c8); - - pcmciaWriteReg(pcmciac, 0x3c6, 0xff); - - for (i=0;i<256;i++) { - pcmciaWriteReg(pcmciac, 0x3c8, i); - pcmciaWriteReg(pcmciac, 0x3c9, i); - pcmciaWriteReg(pcmciac, 0x3c9, i); - pcmciaWriteReg(pcmciac, 0x3c9, i); - } - - /* Set the Clock */ - if (pcmciac->HP) { - CARD8 a,b; - int clock = t->clock; - if (pScreenPriv->screen->fb[0].bitsPerPixel == 16) - clock *= 2; - tridentSetCLK(clock, &a, &b); - pcmciaWriteReg(pcmciac, 0x43c8, a); - pcmciaWriteReg(pcmciac, 0x43c9, b); - } else { - int num, den; - unsigned char tmp; - int clock = t->clock; - if (pScreenPriv->screen->fb[0].bitsPerPixel == 16) - clock *= 2; - - CirrusFindClock(clock, &num, &den); - - tmp = pcmciaReadIndex(pcmciac, 0x3c4, 0x0d); - pcmciaWriteIndex(pcmciac, 0x3c4, 0x0d, (tmp & 0x80) | num); - tmp = pcmciaReadIndex(pcmciac, 0x3c4, 0x1d); - pcmciaWriteIndex(pcmciac, 0x3c4, 0x1d, (tmp & 0xc0) | den); - } - pcmciaWriteReg(pcmciac, 0x3c2, MiscOutReg | 0x08); - -#if 1 - for (i=1;i<0x3f;i++) - ErrorF("0x3c4:%02x: 0x%x\n",i,pcmciaReadIndex(pcmciac, 0x3c4, i)); - - ErrorF("\n"); - - for (i=0;i<0x3f;i++) - ErrorF("0x3ce:%02x: 0x%x\n",i,pcmciaReadIndex(pcmciac, 0x3ce, i)); - - ErrorF("\n"); - - for (i=0;i<0x3f;i++) - ErrorF("0x3d4:%02x: 0x%x\n",i,pcmciaReadIndex(pcmciac, 0x3d4, i)); -#endif - - return TRUE; -} - -void -pcmciaDisable (ScreenPtr pScreen) -{ -} - -const CARD8 tridentDPMSModes[4] = { - 0x00, /* KD_DPMS_NORMAL */ - 0x01, /* KD_DPMS_STANDBY */ - 0x02, /* KD_DPMS_SUSPEND */ - 0x03, /* KD_DPMS_POWERDOWN */ -}; - -Bool -pcmciaDPMS (ScreenPtr pScreen, int mode) -{ - KdScreenPriv(pScreen); - pcmciaCardInfo *pcmciac = pScreenPriv->card->driver; - - if (pcmciac->HP) { - pcmciaWriteIndex (pcmciac, 0x3ce, 0x23, tridentDPMSModes[mode]); - pcmciaPause (); - } else { - /* Voyager */ - } - - return TRUE; -} - -void -pcmciaRestore (KdCardInfo *card) -{ -} - -void -pcmciaScreenFini (KdScreenInfo *screen) -{ - pcmciaScreenInfo *pcmcias = (pcmciaScreenInfo *) screen->driver; - - xfree (pcmcias); - screen->driver = 0; -} - -void -pcmciaCardFini (KdCardInfo *card) -{ - pcmciaCardInfo *pcmciac = card->driver; - - if (pcmciac->cop_base) - KdUnmapDevice ((void *) pcmciac->cop_base, PCMCIA_COP_SIZE(card)); -} - -void -pcmciaGetColors (ScreenPtr pScreen, int fb, int ndef, xColorItem *pdefs) -{ - KdScreenPriv(pScreen); - pcmciaCardInfo *pcmciac = pScreenPriv->card->driver; - - while (ndef--) - { - pcmciaWriteReg (pcmciac, 0x3C7, pdefs->pixel); - pdefs->red = pcmciaReadReg (pcmciac, 0x3C9) << 10; - pdefs->green = pcmciaReadReg (pcmciac, 0x3C9) << 10; - pdefs->blue = pcmciaReadReg (pcmciac, 0x3C9) << 10; - pdefs++; - } -} - -void -pcmciaPutColors (ScreenPtr pScreen, int fb, int ndef, xColorItem *pdefs) -{ - KdScreenPriv(pScreen); - pcmciaCardInfo *pcmciac = pScreenPriv->card->driver; - - while (ndef--) - { - pcmciaWriteReg (pcmciac, 0x3C8, pdefs->pixel); - pcmciaWriteReg (pcmciac, 0x3C9, pdefs->red >> 10); - pcmciaWriteReg (pcmciac, 0x3C9, pdefs->green >> 10); - pcmciaWriteReg (pcmciac, 0x3C9, pdefs->blue >> 10); - pdefs++; - } -} - - -KdCardFuncs pcmciaFuncs = { - pcmciaCardInit, /* cardinit */ - pcmciaScreenInit, /* scrinit */ - pcmciaInitScreen, /* initScreen */ - pcmciaPreserve, /* preserve */ - pcmciaEnable, /* enable */ - pcmciaDPMS, /* dpms */ - pcmciaDisable, /* disable */ - pcmciaRestore, /* restore */ - pcmciaScreenFini, /* scrfini */ - pcmciaCardFini, /* cardfini */ - - pcmciaCursorInit, /* initCursor */ - pcmciaCursorEnable, /* enableCursor */ - pcmciaCursorDisable, /* disableCursor */ - pcmciaCursorFini, /* finiCursor */ - pcmciaRecolorCursor, /* recolorCursor */ - -#if 0 /* not yet */ - pcmciaDrawInit, /* initAccel */ - pcmciaDrawEnable, /* enableAccel */ - pcmciaDrawSync, /* syncAccel */ - pcmciaDrawDisable, /* disableAccel */ - pcmciaDrawFini, /* finiAccel */ -#else - 0, - 0, - 0, - 0, - 0, -#endif - - pcmciaGetColors, /* getColors */ - pcmciaPutColors, /* putColors */ -}; diff --git a/hw/kdrive/pcmcia/pcmcia.h b/hw/kdrive/pcmcia/pcmcia.h deleted file mode 100644 index 245e51b77..000000000 --- a/hw/kdrive/pcmcia/pcmcia.h +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Copyright 2001 by Alan Hourihane, Sychdyn, North Wales, UK. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Alan Hourihane not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Alan Hourihane makes no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - * - * Authors: Alan Hourihane, - */ - -#ifndef _PCMCIA_H_ -#define _PCMCIA_H_ - -#include - -/* - * offset from ioport beginning - */ - -#define PCMCIA_COP_BASE(c) 0x20000000 -#define PCMCIA_COP_SIZE(c) 0x10000 -#define TRIDENT_COP_OFF(c) 0x2100 - -typedef volatile CARD8 VOL8; -typedef volatile CARD16 VOL16; -typedef volatile CARD32 VOL32; - -typedef struct _cop { - VOL32 src_start_xy; /* 0x00 */ - VOL32 src_end_xy; /* 0x04 */ - VOL32 dst_start_xy; /* 0x08 */ - VOL32 dst_end_xy; /* 0x0c */ - VOL32 alpha; /* 0x10 */ - CARD8 pad14[0xc]; /* 0x14 */ - VOL32 multi; /* 0x20 */ - -#define COP_MULTI_CLIP_TOP_LEFT 0x10000000 -#define COP_MULTI_DEPTH 0x40000000 -#define COP_MULTI_COLOR_KEY 0x70000000 -#define COP_MULTI_STYLE 0x50000000 -#define COP_MULTI_PATTERN 0x80000000 -#define COP_MULTI_ROP 0x90000000 -#define COP_MULTI_STRIDE 0x60000000 -#define COP_MULTI_Z 0xa0000000 -#define COP_MULTI_ALPHA 0xb0000000 -#define COP_MULTI_TEXTURE 0xd0000000 -#define COP_MULTI_TEXTURE_BOUND 0xe0000000 -#define COP_MULTI_TEXTURE_ADVANCED 0x20000000 -#define COP_MULTI_MASK 0xf0000000 - -#define COP_DEPTH_8 0x00000000 -#define COP_DEPTH_16 0x00000001 -#define COP_DEPTH_24_32 0x00000002 -#define COP_DEPTH_15 0x00000005 -#define COP_DEPTH_DITHER_DISABLE 0x00000008 - - -#define COP_ALPHA_SRC_BLEND_0 0x00000000 -#define COP_ALPHA_SRC_BLEND_1 0x00000001 -#define COP_ALPHA_SRC_BLEND_SRC_C 0x00000002 -#define COP_ALPHA_SRC_BLEND_1_SRC_C 0x00000003 -#define COP_ALPHA_SRC_BLEND_SRC_A 0x00000004 -#define COP_ALPHA_SRC_BLEND_1_SRC_A 0x00000005 -#define COP_ALPHA_SRC_BLEND_DST_A 0x00000006 -#define COP_ALPHA_SRC_BLEND_1_DST_A 0x00000007 -#define COP_ALPHA_SRC_BLEND_DST_C 0x00000008 -#define COP_ALPHA_SRC_BLEND_1_DST_C 0x00000009 -#define COP_ALPHA_SRC_BLEND_SAT 0x0000000A -#define COP_ALPHA_SRC_BLEND_BG 0x0000000B - -#define COP_ALPHA_DST_BLEND_0 0x00000000 -#define COP_ALPHA_DST_BLEND_1 0x00000010 -#define COP_ALPHA_DST_BLEND_SRC_C 0x00000020 -#define COP_ALPHA_DST_BLEND_1_SRC_C 0x00000030 -#define COP_ALPHA_DST_BLEND_SRC_A 0x00000040 -#define COP_ALPHA_DST_BLEND_1_SRC_A 0x00000050 -#define COP_ALPHA_DST_BLEND_DST_A 0x00000060 -#define COP_ALPHA_DST_BLEND_1_DST_A 0x00000070 -#define COP_ALPHA_DST_BLEND_DST_C 0x00000080 -#define COP_ALPHA_DST_BLEND_1_DST_C 0x00000090 -#define COP_ALPHA_DST_BLEND_OTHER 0x000000A0 - -#define COP_ALPHA_RESULT_ALPHA 0x00100000 -#define COP_ALPHA_DEST_ALPHA 0x00200000 -#define COP_ALPHA_SOURCE_ALPHA 0x00400000 -#define COP_ALPHA_WRITE_ENABLE 0x00800000 -#define COP_ALPHA_TEST_ENABLE 0x01000000 -#define COP_ALPHA_BLEND_ENABLE 0x02000000 -#define COP_ALPHA_DEST_VALUE 0x04000000 -#define COP_ALPHA_SOURCE_VALUE 0x08000000 - - VOL32 command; /* 0x24 */ -#define COP_OP_NULL 0x00000000 -#define COP_OP_LINE 0x20000000 -#define COP_OP_BLT 0x80000000 -#define COP_OP_TEXT 0x90000000 -#define COP_OP_POLY 0xb0000000 -#define COP_OP_POLY2 0xe0000000 -#define COP_SCL_EXPAND 0x00800000 -#define COP_SCL_OPAQUE 0x00400000 -#define COP_SCL_REVERSE 0x00200000 -#define COP_SCL_MONO_OFF 0x001c0000 -#define COP_LIT_TEXTURE 0x00004000 -#define COP_BILINEAR 0x00002000 -#define COP_OP_ZBUF 0x00000800 -#define COP_OP_ROP 0x00000400 -#define COP_OP_FG 0x00000200 -#define COP_OP_FB 0x00000080 -#define COP_X_REVERSE 0x00000004 -#define COP_CLIP 0x00000001 - VOL32 texture_format; /* 0x28 */ - CARD8 pad2c[0x4]; /* 0x2c */ - - VOL32 clip_bottom_right; /* 0x30 */ - VOL32 dataIII; /* 0x34 */ - VOL32 dataIV; /* 0x38 */ - CARD8 pad3c[0x8]; /* 0x3c */ - - VOL32 fg; /* 0x44 */ - VOL32 bg; /* 0x48 */ - CARD8 pad4c[0x4]; /* 0x4c */ - - VOL32 pattern_fg; /* 0x50 */ - VOL32 pattern_bg; /* 0x54 */ - CARD8 pad58[0xc]; /* 0x58 */ - - VOL32 status; /* 0x64 */ -#define COP_STATUS_BE_BUSY 0x80000000 -#define COP_STATUS_DPE_BUSY 0x20000000 -#define COP_STATUS_MI_BUSY 0x10000000 -#define COP_STATUS_FIFO_BUSY 0x08000000 -#define COP_STATUS_WB_BUSY 0x00800000 -#define COP_STATUS_Z_FAILED 0x00400000 -#define COP_STATUS_EFFECTIVE 0x00200000 -#define COP_STATUS_LEFT_VIEW 0x00080000 - - CARD8 pad68[0x4]; /* 0x68 */ - - VOL32 src_offset; /* 0x6c */ - VOL32 z_offset; /* 0x70 */ - CARD8 pad74[0x4]; /* 0x74 */ - - VOL32 display_offset; /* 0x78 */ - VOL32 dst_offset; /* 0x7c */ - CARD8 pad80[0x34]; /* 0x80 */ - - VOL32 semaphore; /* 0xb4 */ -} Cop; - -#define TRI_XY(x,y) ((y) << 16 | (x)) - -typedef struct _pcmciaCardInfo { - CARD8 *fb; - Bool HP; - CARD32 memory; - CARD8 *cop_base; - Cop *cop; - CARD32 *window; - CARD32 cop_depth; - CARD32 cop_stride; -} pcmciaCardInfo; - -#define getpcmciaCardInfo(kd) ((pcmciaCardInfo *) ((kd)->card->driver)) -#define pcmciaCardInfo(kd) pcmciaCardInfo *pcmciac = getpcmciaCardInfo(kd) - -typedef struct _pcmciaCursor { - int width, height; - int xhot, yhot; - Bool has_cursor; - CursorPtr pCursor; - Pixel source, mask; -} pcmciaCursor; - -#define PCMCIA_CURSOR_WIDTH 64 -#define PCMCIA_CURSOR_HEIGHT 64 - -typedef struct _pcmciaScreenInfo { - CARD8 *cursor_base; - CARD8 *screen; - CARD8 *off_screen; - int off_screen_size; - int randr; - LayerPtr pLayer; - pcmciaCursor cursor; -} pcmciaScreenInfo; - -#define getpcmciaScreenInfo(kd) ((pcmciaScreenInfo *) ((kd)->screen->driver)) -#define pcmciaScreenInfo(kd) pcmciaScreenInfo *pcmcias = getpcmciaScreenInfo(kd) - -Bool -pcmciaDrawInit (ScreenPtr pScreen); - -void -pcmciaDrawEnable (ScreenPtr pScreen); - -void -pcmciaDrawSync (ScreenPtr pScreen); - -void -pcmciaDrawDisable (ScreenPtr pScreen); - -void -pcmciaDrawFini (ScreenPtr pScreen); - -CARD8 -pcmciaReadIndex (pcmciaCardInfo *pcmciac, CARD16 port, CARD8 index); - -void -pcmciaWriteIndex (pcmciaCardInfo *pcmciac, CARD16 port, CARD8 index, CARD8 value); - -void -pcmciaWriteReg (pcmciaCardInfo *pcmciac, CARD16 port, CARD8 value); - -Bool -pcmciaCursorInit (ScreenPtr pScreen); - -void -pcmciaCursorEnable (ScreenPtr pScreen); - -void -pcmciaCursorDisable (ScreenPtr pScreen); - -void -pcmciaCursorFini (ScreenPtr pScreen); - -void -pcmciaRecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdef); - -void -pcmciaUpdateRotatePacked (ScreenPtr pScreen, - shadowBufPtr pBuf); - -typedef struct _pcmciaDisplayModeRec { - int Width; - int Height; - int Refresh; - int Clock; /* pixel clock freq */ - int HDisplay; /* horizontal timing */ - int HSyncStart; - int HSyncEnd; - int HTotal; - int HSkew; - int VDisplay; /* vertical timing */ - int VSyncStart; - int VSyncEnd; - int VTotal; - int VScan; - int Flags; -} pcmciaDisplayModeRec, *pcmciaDisplayModePtr; - -extern KdCardFuncs pcmciaFuncs; - -#endif /* _PCMCIA_H_ */ diff --git a/hw/kdrive/pcmcia/pcmciacurs.c b/hw/kdrive/pcmcia/pcmciacurs.c deleted file mode 100644 index 21d2d4adb..000000000 --- a/hw/kdrive/pcmcia/pcmciacurs.c +++ /dev/null @@ -1,451 +0,0 @@ -/* - * Copyright 2001 by Alan Hourihane, Sychdyn, North Wales, UK. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Alan Hourihane not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Alan Hourihane makes no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - * - * Authors: Alan Hourihane, - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "pcmcia.h" -#include "cursorstr.h" - -#define SetupCursor(s) KdScreenPriv(s); \ - pcmciaCardInfo(pScreenPriv); \ - pcmciaScreenInfo(pScreenPriv); \ - pcmciaCursor *pCurPriv = &pcmcias->cursor - -static void -_pcmciaMoveCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor(pScreen); - CARD8 xlow, xhigh, ylow, yhigh; - CARD8 xoff, yoff; - - x -= pCurPriv->xhot; - xoff = 0; - if (x < 0) - { - xoff = -x; - x = 0; - } - y -= pCurPriv->yhot; - yoff = 0; - if (y < 0) - { - yoff = -y; - y = 0; - } - - /* This is the recommended order to move the cursor */ - if (pcmciac->HP) { - xlow = (CARD8) x; - xhigh = (CARD8) (x >> 8); - ylow = (CARD8) y; - yhigh = (CARD8) (y >> 8); - pcmciaWriteIndex (pcmciac, 0x3d4, 0x40, xlow); - pcmciaWriteIndex (pcmciac, 0x3d4, 0x41, xhigh); - pcmciaWriteIndex (pcmciac, 0x3d4, 0x42, ylow); - pcmciaWriteIndex (pcmciac, 0x3d4, 0x43, yhigh); - pcmciaWriteIndex (pcmciac, 0x3d4, 0x46, xoff); - pcmciaWriteIndex (pcmciac, 0x3d4, 0x47, yoff); - } else { - x >>= 3; - y >>= 3; - xlow = (CARD8) x; - xhigh = (CARD8) (x >> 8); - ylow = (CARD8) y; - yhigh = (CARD8) (y >> 8); - /* Don't be alarmed, yes the upper 3bits of the index are correct */ - pcmciaWriteIndex (pcmciac, 0x3c4, 0x10 | xhigh << 5, xlow); - pcmciaWriteIndex (pcmciac, 0x3c4, 0x11 | yhigh << 5, ylow); - } -} - -static void -pcmciaMoveCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor (pScreen); - - if (!pCurPriv->has_cursor) - return; - - if (!pScreenPriv->enabled) - return; - - _pcmciaMoveCursor (pScreen, x, y); -} - -static void -pcmciaAllocCursorColors (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - - KdAllocateCursorPixels (pScreen, 0, pCursor, - &pCurPriv->source, &pCurPriv->mask); - switch (pScreenPriv->screen->fb[0].bitsPerPixel) { - case 4: - pCurPriv->source |= pCurPriv->source << 4; - pCurPriv->mask |= pCurPriv->mask << 4; - case 8: - pCurPriv->source |= pCurPriv->source << 8; - pCurPriv->mask |= pCurPriv->mask << 8; - case 16: - pCurPriv->source |= pCurPriv->source << 16; - pCurPriv->mask |= pCurPriv->mask << 16; - } -} - -static void -pcmciaSetCursorColors (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - CARD32 fg, bg; - - fg = pCurPriv->source; - bg = pCurPriv->mask; - - if (pcmciac->HP) { - /* - * This trident chip uses the palette for it's cursor colors - ouch! - * We enforce it to always stay the black/white colors as we don't - * want it to muck with the overscan color. Tough. Use softCursor - * if you want to change cursor colors. - */ - pcmciaWriteReg (pcmciac, 0x3c8, 0xff); /* DAC 0 */ - pcmciaWriteReg (pcmciac, 0x3c9, 0x00); - pcmciaWriteReg (pcmciac, 0x3c9, 0x00); - pcmciaWriteReg (pcmciac, 0x3c9, 0x00); - pcmciaWriteReg (pcmciac, 0x3c8, 0x00); /* DAC 255 */ - pcmciaWriteReg (pcmciac, 0x3c9, 0x3f); - pcmciaWriteReg (pcmciac, 0x3c9, 0x3f); - pcmciaWriteReg (pcmciac, 0x3c9, 0x3f); - } else { - CARD8 temp; - temp = pcmciaReadIndex(pcmciac, 0x3c4, 0x12); - pcmciaWriteIndex (pcmciac, 0x3c4, 0x12, (temp & 0xFE) | 0x02); - - pcmciaWriteReg (pcmciac, 0x3c8, 0x00); /* DAC 256 */ - pcmciaWriteReg (pcmciac, 0x3c9, fg); - pcmciaWriteReg (pcmciac, 0x3c9, fg >> 8); - pcmciaWriteReg (pcmciac, 0x3c9, fg >> 16); - pcmciaWriteReg (pcmciac, 0x3c8, 0x00); /* DAC 257 */ - pcmciaWriteReg (pcmciac, 0x3c9, bg); - pcmciaWriteReg (pcmciac, 0x3c9, bg >> 8); - pcmciaWriteReg (pcmciac, 0x3c9, bg >> 16); - - pcmciaWriteIndex (pcmciac, 0x3c4, 0x12, temp); - } -} - -void -pcmciaRecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdef) -{ - SetupCursor (pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - xColorItem sourceColor, maskColor; - - if (!pCurPriv->has_cursor || !pCursor) - return; - - if (!pScreenPriv->enabled) - return; - - if (pdef) - { - while (ndef) - { - if (pdef->pixel == pCurPriv->source || - pdef->pixel == pCurPriv->mask) - break; - ndef--; - } - if (!ndef) - return; - } - pcmciaAllocCursorColors (pScreen); - pcmciaSetCursorColors (pScreen); -} - -#define InvertBits32(v) { \ - v = ((v & 0x55555555) << 1) | ((v >> 1) & 0x55555555); \ - v = ((v & 0x33333333) << 2) | ((v >> 2) & 0x33333333); \ - v = ((v & 0x0f0f0f0f) << 4) | ((v >> 4) & 0x0f0f0f0f); \ -} - -static void -pcmciaLoadCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor(pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - CursorBitsPtr bits = pCursor->bits; - int w, h; - CARD8 *ram; - CARD32 *msk, *mskLine, *src, *srcLine; - int i, j; - int cursor_address; - int lwsrc; - unsigned char ramdac_control_; - CARD32 offset; - - /* - * Allocate new colors - */ - pcmciaAllocCursorColors (pScreen); - - pCurPriv->pCursor = pCursor; - pCurPriv->xhot = pCursor->bits->xhot; - pCurPriv->yhot = pCursor->bits->yhot; - - /* - * Stick new image into cursor memory - */ - if (pcmciac->HP) { - ram = (CARD8 *) pcmcias->cursor_base; - } else { - /* The last bank */ - ram = (CARD8 *) pcmciac->fb; - pcmciaWriteIndex (pcmciac, 0x3ce, 0x09, 0x7f); - pcmciaWriteIndex (pcmciac, 0x3ce, 0x0A, 0x7f); - } - - mskLine = (CARD32 *) bits->mask; - srcLine = (CARD32 *) bits->source; - - h = bits->height; - if (h > PCMCIA_CURSOR_HEIGHT) - h = PCMCIA_CURSOR_HEIGHT; - - lwsrc = BitmapBytePad(bits->width) / 4; - - for (i = 0; i < PCMCIA_CURSOR_HEIGHT; i++) { - msk = mskLine; - src = srcLine; - mskLine += lwsrc; - srcLine += lwsrc; - for (j = 0; j < PCMCIA_CURSOR_WIDTH / 32; j++) { - - CARD32 m, s; - - if (i < h && j < lwsrc) - { - m = *msk++; - s = *src++; - InvertBits32(m); - InvertBits32(s); - } - else - { - m = 0; - s = 0; - } - - /* Do 8bit access */ - *ram++ = (m & 0xff); - *ram++ = (m & 0xff00) >> 8; - *ram++ = (m & 0xff0000) >> 16; - *ram++ = (m & 0xff000000) >> 24; - *ram++ = (s & 0xff); - *ram++ = (s & 0xff00) >> 8; - *ram++ = (s & 0xff0000) >> 16; - *ram++ = (s & 0xff000000) >> 24; - } - } - - /* Set address for cursor bits */ - if (pcmciac->HP) { - offset = pcmcias->cursor_base - (CARD8 *) pcmcias->screen; - offset >>= 10; - pcmciaWriteIndex (pcmciac, 0x3d4, 0x44, (CARD8) (offset & 0xff)); - pcmciaWriteIndex (pcmciac, 0x3d4, 0x45, (CARD8) (offset >> 8)); - } else { - pcmciaWriteIndex (pcmciac, 0x3c4, 0x13, 15); /* ?? */ - } - - /* Set new color */ - pcmciaSetCursorColors (pScreen); - - /* Enable the cursor */ - if (pcmciac->HP) - pcmciaWriteIndex (pcmciac, 0x3d4, 0x50, 0xc1); - else - pcmciaWriteIndex (pcmciac, 0x3c4, 0x12, 0x05); - - /* Move to new position */ - pcmciaMoveCursor (pScreen, x, y); -} - -static void -pcmciaUnloadCursor (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - /* Disable cursor */ - if (pcmciac->HP) - pcmciaWriteIndex (pcmciac, 0x3d4, 0x50, 0); - else - pcmciaWriteIndex (pcmciac, 0x3c4, 0x12, 0); -} - -static Bool -pcmciaRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) -{ - SetupCursor(pScreen); - - if (!pScreenPriv->enabled) - return TRUE; - - /* miRecolorCursor does this */ - if (pCurPriv->pCursor == pCursor) - { - if (pCursor) - { - int x, y; - - miPointerPosition (&x, &y); - pcmciaLoadCursor (pScreen, x, y); - } - } - return TRUE; -} - -static Bool -pcmciaUnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) -{ - return TRUE; -} - -static void -pcmciaSetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y) -{ - SetupCursor(pScreen); - - pCurPriv->pCursor = pCursor; - - if (!pScreenPriv->enabled) - return; - - if (pCursor) - pcmciaLoadCursor (pScreen, x, y); - else - pcmciaUnloadCursor (pScreen); -} - -miPointerSpriteFuncRec pcmciaPointerSpriteFuncs = { - pcmciaRealizeCursor, - pcmciaUnrealizeCursor, - pcmciaSetCursor, - pcmciaMoveCursor, -}; - -static void -pcmciaQueryBestSize (int class, - unsigned short *pwidth, unsigned short *pheight, - ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - switch (class) - { - case CursorShape: - if (*pwidth > pCurPriv->width) - *pwidth = pCurPriv->width; - if (*pheight > pCurPriv->height) - *pheight = pCurPriv->height; - if (*pwidth > pScreen->width) - *pwidth = pScreen->width; - if (*pheight > pScreen->height) - *pheight = pScreen->height; - break; - default: - fbQueryBestSize (class, pwidth, pheight, pScreen); - break; - } -} - -Bool -pcmciaCursorInit (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (!pcmcias->cursor_base) - { - pCurPriv->has_cursor = FALSE; - return FALSE; - } - - pCurPriv->width = PCMCIA_CURSOR_WIDTH; - pCurPriv->height= PCMCIA_CURSOR_HEIGHT; - pScreen->QueryBestSize = pcmciaQueryBestSize; - miPointerInitialize (pScreen, - &pcmciaPointerSpriteFuncs, - &kdPointerScreenFuncs, - FALSE); - pCurPriv->has_cursor = TRUE; - pCurPriv->pCursor = NULL; - return TRUE; -} - -void -pcmciaCursorEnable (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (pCurPriv->has_cursor) - { - if (pCurPriv->pCursor) - { - int x, y; - - miPointerPosition (&x, &y); - pcmciaLoadCursor (pScreen, x, y); - } - else - pcmciaUnloadCursor (pScreen); - } -} - -void -pcmciaCursorDisable (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (!pScreenPriv->enabled) - return; - - if (pCurPriv->has_cursor) - { - if (pCurPriv->pCursor) - { - pcmciaUnloadCursor (pScreen); - } - } -} - -void -pcmciaCursorFini (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - pCurPriv->pCursor = NULL; -} diff --git a/hw/kdrive/pcmcia/pcmciarotate.c b/hw/kdrive/pcmcia/pcmciarotate.c deleted file mode 100644 index e5dc1cb41..000000000 --- a/hw/kdrive/pcmcia/pcmciarotate.c +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Copyright © 2001 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include "scrnintstr.h" -#include "windowstr.h" -#include "font.h" -#include "dixfontstr.h" -#include "fontstruct.h" -#include "mi.h" -#include "regionstr.h" -#include "globals.h" -#include "gcstruct.h" -#include "shadow.h" -#include "fb.h" - -/* - * These indicate which way the source (shadow) is scanned when - * walking the screen in a particular direction - */ - -#define LEFT_TO_RIGHT 1 -#define RIGHT_TO_LEFT -1 -#define TOP_TO_BOTTOM 2 -#define BOTTOM_TO_TOP -2 - -typedef CARD16 PcBits; -typedef INT32 PcStride; - -#define PC_SHIFT 4 -#define PC_UNIT (1 << PC_SHIFT) -#define PC_HALFUNIT (1 << (PC_SHIFT-1)) -#define PC_MASK (PC_UNIT - 1) -#define PC_ALLONES ((PcBits) -1) - -#define PcScrRight(x,b) FbScrRight(x,b) -#define PcScrLeft(x,b) FbScrLeft(x,b) -#define PcBitsMask(x,w) (PcScrRight(PC_ALLONES,(x) & PC_MASK) & \ - PcScrLeft(PC_ALLONES,(PC_UNIT - ((x) + (w))) & PC_MASK)) - -#define pcGetDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \ - PixmapPtr _pPix; \ - if ((pDrawable)->type != DRAWABLE_PIXMAP) \ - _pPix = fbGetWindowPixmap(pDrawable); \ - else \ - _pPix = (PixmapPtr) (pDrawable); \ - (pointer) = (PcBits *) _pPix->devPrivate.ptr; \ - (stride) = ((int) _pPix->devKind) / sizeof (PcBits); \ - (bpp) = _pPix->drawable.bitsPerPixel; \ - (xoff) = 0; \ - (yoff) = 0; \ -} - -void -pcmciaUpdateRotatePacked (ScreenPtr pScreen, - shadowBufPtr pBuf) -{ - RegionPtr damage = &pBuf->damage; - PixmapPtr pShadow = pBuf->pPixmap; - int nbox = REGION_NUM_RECTS (damage); - BoxPtr pbox = REGION_RECTS (damage); - PcBits *shaBits; - PcStride shaStride; - int shaBpp; - int shaXoff, shaYoff; - int box_x1, box_x2, box_y1, box_y2; - int sha_x1, sha_y1; - int scr_x1, scr_x2, scr_y1, scr_y2, scr_w, scr_h; - int scr_x, scr_y; - int w; - int pixelsPerBits; - int pixelsMask; - PcStride shaStepOverY, shaStepDownY, shaStepOverX, shaStepDownX; - PcBits *shaLine, *sha; - int shaHeight = pShadow->drawable.height; - int shaWidth = pShadow->drawable.width; - PcBits shaMask; - int shaFirstShift, shaShift; - int o_x_dir; - int o_y_dir; - int x_dir; - int y_dir; - - pcGetDrawable (&pShadow->drawable, shaBits, shaStride, shaBpp, shaXoff, shaYoff); - pixelsPerBits = (sizeof (PcBits) * 8) / shaBpp; - pixelsMask = ~(pixelsPerBits - 1); - shaMask = PcBitsMask (PC_UNIT-shaBpp, shaBpp); - /* - * Compute rotation related constants to walk the shadow - */ - o_x_dir = LEFT_TO_RIGHT; - o_y_dir = TOP_TO_BOTTOM; - if (pBuf->randr & SHADOW_REFLECT_X) - o_x_dir = -o_x_dir; - if (pBuf->randr & SHADOW_REFLECT_Y) - o_y_dir = -o_y_dir; - switch (pBuf->randr & (SHADOW_ROTATE_ALL)) { - case SHADOW_ROTATE_0: /* upper left shadow -> upper left screen */ - default: - x_dir = o_x_dir; - y_dir = o_y_dir; - break; - case SHADOW_ROTATE_90: /* upper right shadow -> upper left screen */ - x_dir = o_y_dir; - y_dir = -o_x_dir; - break; - case SHADOW_ROTATE_180: /* lower right shadow -> upper left screen */ - x_dir = -o_x_dir; - y_dir = -o_y_dir; - break; - case SHADOW_ROTATE_270: /* lower left shadow -> upper left screen */ - x_dir = -o_y_dir; - y_dir = o_x_dir; - break; - } - switch (x_dir) { - case LEFT_TO_RIGHT: - shaStepOverX = shaBpp; - shaStepOverY = 0; - break; - case TOP_TO_BOTTOM: - shaStepOverX = 0; - shaStepOverY = shaStride; - break; - case RIGHT_TO_LEFT: - shaStepOverX = -shaBpp; - shaStepOverY = 0; - break; - case BOTTOM_TO_TOP: - shaStepOverX = 0; - shaStepOverY = -shaStride; - break; - } - switch (y_dir) { - case TOP_TO_BOTTOM: - shaStepDownX = 0; - shaStepDownY = shaStride; - break; - case RIGHT_TO_LEFT: - shaStepDownX = -shaBpp; - shaStepDownY = 0; - break; - case BOTTOM_TO_TOP: - shaStepDownX = 0; - shaStepDownY = -shaStride; - break; - case LEFT_TO_RIGHT: - shaStepDownX = shaBpp; - shaStepDownY = 0; - break; - } - - while (nbox--) - { - box_x1 = pbox->x1; - box_y1 = pbox->y1; - box_x2 = pbox->x2; - box_y2 = pbox->y2; - pbox++; - - /* - * Compute screen and shadow locations for this box - */ - switch (x_dir) { - case LEFT_TO_RIGHT: - scr_x1 = box_x1 & pixelsMask; - scr_x2 = (box_x2 + pixelsPerBits - 1) & pixelsMask; - - sha_x1 = scr_x1; - break; - case TOP_TO_BOTTOM: - scr_x1 = box_y1 & pixelsMask; - scr_x2 = (box_y2 + pixelsPerBits - 1) & pixelsMask; - - sha_y1 = scr_x1; - break; - case RIGHT_TO_LEFT: - scr_x1 = (shaWidth - box_x2) & pixelsMask; - scr_x2 = (shaWidth - box_x1 + pixelsPerBits - 1) & pixelsMask; - - sha_x1 = (shaWidth - scr_x1 - 1); - break; - case BOTTOM_TO_TOP: - scr_x1 = (shaHeight - box_y2) & pixelsMask; - scr_x2 = (shaHeight - box_y1 + pixelsPerBits - 1) & pixelsMask; - - sha_y1 = (shaHeight - scr_x1 - 1); - break; - } - switch (y_dir) { - case TOP_TO_BOTTOM: - scr_y1 = box_y1; - scr_y2 = box_y2; - - sha_y1 = scr_y1; - break; - case RIGHT_TO_LEFT: - scr_y1 = (shaWidth - box_x2); - scr_y2 = (shaWidth - box_x1); - - sha_x1 = box_x2 - 1; - break; - case BOTTOM_TO_TOP: - scr_y1 = shaHeight - box_y2; - scr_y2 = shaHeight - box_y1; - - sha_y1 = box_y2 - 1; - break; - case LEFT_TO_RIGHT: - scr_y1 = box_x1; - scr_y2 = box_x2; - - sha_x1 = box_x1; - break; - } - scr_w = ((scr_x2 - scr_x1) * shaBpp) >> PC_SHIFT; - scr_h = scr_y2 - scr_y1; - scr_y = scr_y1; - - /* shift amount for first pixel on screen */ - shaFirstShift = PC_UNIT - ((sha_x1 * shaBpp) & PC_MASK) - shaBpp; - - /* pointer to shadow data first placed on screen */ - shaLine = (shaBits + - sha_y1 * shaStride + - ((sha_x1 * shaBpp) >> PC_SHIFT)); - - /* - * Copy the bits, always write across the physical frame buffer - * to take advantage of write combining. - */ - while (scr_h--) - { - int p; - PcBits bits; - PcBits *win; - int i; - CARD32 winSize; - - sha = shaLine; - shaShift = shaFirstShift; - w = scr_w; - scr_x = scr_x1 * shaBpp >> PC_SHIFT; - - while (w) - { - /* - * Map some of this line - */ - win = (PcBits *) (*pBuf->window) (pScreen, - scr_y, - scr_x << 1, - SHADOW_WINDOW_WRITE, - &winSize, - pBuf->closure); - i = (winSize >> 1); - if (i > w) - i = w; - w -= i; - scr_x += i; - /* - * Copy the portion of the line mapped - */ - while (i--) - { - bits = 0; - p = pixelsPerBits; - /* - * Build one word of output from multiple inputs - * - * Note that for 90/270 rotations, this will walk - * down the shadow hitting each scanline once. - * This is probably not very efficient. - */ - while (p--) - { - bits = PcScrLeft(bits, shaBpp); - bits |= PcScrRight (*sha, shaShift) & shaMask; - - shaShift -= shaStepOverX; - if (shaShift >= PC_UNIT) - { - shaShift -= PC_UNIT; - sha--; - } - else if (shaShift < 0) - { - shaShift += PC_UNIT; - sha++; - } - sha += shaStepOverY; - } - *win++ = bits; - } - } - scr_y++; - shaFirstShift -= shaStepDownX; - if (shaFirstShift >= PC_UNIT) - { - shaFirstShift -= PC_UNIT; - shaLine--; - } - else if (shaFirstShift < 0) - { - shaFirstShift += PC_UNIT; - shaLine++; - } - shaLine += shaStepDownY; - } - } -} diff --git a/hw/kdrive/pcmcia/pcmciashadow.c b/hw/kdrive/pcmcia/pcmciashadow.c deleted file mode 100644 index f578f1bff..000000000 --- a/hw/kdrive/pcmcia/pcmciashadow.c +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright 2001 by Alan Hourihane, Sychdyn, North Wales, UK. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Alan Hourihane not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Alan Hourihane makes no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - * - * Authors: Alan Hourihane, - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include "scrnintstr.h" -#include "windowstr.h" -#include "font.h" -#include "dixfontstr.h" -#include "fontstruct.h" -#include "mi.h" -#include "regionstr.h" -#include "globals.h" -#include "gcstruct.h" -#include "shadow.h" -#include "fb.h" - -void -tridentUpdatePacked (ScreenPtr pScreen, - shadowBufPtr pBuf) -{ - RegionPtr damage = &pBuf->damage; - PixmapPtr pShadow = pBuf->pPixmap; - shadowScrPriv(pScreen); - int nbox = REGION_NUM_RECTS (damage); - BoxPtr pbox = REGION_RECTS (damage); - FbBits *shaBase, *shaLine, *sha; - FbStride shaStride; - int scrBase, scrLine, scr; - int shaBpp; - int shaXoff, shaYoff; /* XXX assumed to be zero */ - int x, y, w, h, width; - int i; - FbBits *winBase, *win; - CARD32 winSize; - - fbGetDrawable (&pShadow->drawable, shaBase, shaStride, shaBpp, shaXoff, shaYoff); - while (nbox--) - { - x = pbox->x1 * shaBpp; - y = pbox->y1; - w = (pbox->x2 - pbox->x1) * shaBpp; - h = pbox->y2 - pbox->y1; - - scrLine = (x >> FB_SHIFT); - shaLine = shaBase + y * shaStride + (x >> FB_SHIFT); - - x &= FB_MASK; - w = (w + x + FB_MASK) >> FB_SHIFT; - - while (h--) - { - winSize = 0; - scrBase = 0; - width = w; - scr = scrLine; - sha = shaLine; - while (width) { - /* how much remains in this window */ - i = scrBase + winSize - scr; - if (i <= 0 || scr < scrBase) - { - winBase = (FbBits *) (*pBuf->window) (pScreen, - y, - scr * sizeof (FbBits), - SHADOW_WINDOW_WRITE, - &winSize, - pBuf->closure); - if(!winBase) - return; - scrBase = scr; - winSize /= sizeof (FbBits); - i = winSize; - } - win = winBase + (scr - scrBase); - if (i > width) - i = width; - width -= i; - scr += i; - { - CARD16 *sha16 = (CARD16*)sha; - CARD16 *win16 = (CARD16*)win; - while (i--) - { - *win16++ = *sha16++; - *win16++ = *sha16++; - } - } - } - shaLine += shaStride; - y++; - } - pbox++; - } -} - -void -cirrusUpdatePacked (ScreenPtr pScreen, - shadowBufPtr pBuf) -{ - RegionPtr damage = &pBuf->damage; - PixmapPtr pShadow = pBuf->pPixmap; - shadowScrPriv(pScreen); - int nbox = REGION_NUM_RECTS (damage); - BoxPtr pbox = REGION_RECTS (damage); - FbBits *shaBase, *shaLine, *sha; - FbStride shaStride; - int scrBase, scrLine, scr; - int shaBpp; - int shaXoff, shaYoff; /* XXX assumed to be zero */ - int x, y, w, h, width; - int i; - FbBits *winBase, *win; - CARD32 winSize; - - fbGetDrawable (&pShadow->drawable, shaBase, shaStride, shaBpp, shaXoff, shaYoff); - while (nbox--) - { - x = pbox->x1 * shaBpp; - y = pbox->y1; - w = (pbox->x2 - pbox->x1) * shaBpp; - h = pbox->y2 - pbox->y1; - - scrLine = (x >> FB_SHIFT); - shaLine = shaBase + y * shaStride + (x >> FB_SHIFT); - - x &= FB_MASK; - w = (w + x + FB_MASK) >> FB_SHIFT; - - while (h--) - { - winSize = 0; - scrBase = 0; - width = w; - scr = scrLine; - sha = shaLine; - while (width) { - /* how much remains in this window */ - i = scrBase + winSize - scr; - if (i <= 0 || scr < scrBase) - { - winBase = (FbBits *) (*pBuf->window) (pScreen, - y, - scr * sizeof (FbBits), - SHADOW_WINDOW_WRITE, - &winSize, - pBuf->closure); - if(!winBase) - return; - scrBase = scr; - winSize /= sizeof (FbBits); - i = winSize; - } - win = winBase + (scr - scrBase); - if (i > width) - i = width; - width -= i; - scr += i; - { - CARD8 *sha8 = (CARD8*)sha; - CARD8 *win8 = (CARD8*)win; - while (i--) - { - *win8++ = *sha8++; - *win8++ = *sha8++; - *win8++ = *sha8++; - *win8++ = *sha8++; - } - } - } - shaLine += shaStride; - y++; - } - pbox++; - } -} diff --git a/hw/kdrive/pcmcia/pcmciastub.c b/hw/kdrive/pcmcia/pcmciastub.c deleted file mode 100644 index 779ad7f1b..000000000 --- a/hw/kdrive/pcmcia/pcmciastub.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2001 by Alan Hourihane, Sychdyn, North Wales, UK. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Alan Hourihane not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Alan Hourihane makes no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - * - * Authors: Alan Hourihane, - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "pcmcia.h" - -void -InitCard (char *name) -{ - KdCardAttr attr; - - KdCardInfoAdd (&pcmciaFuncs, &attr, 0); -} - -void -InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) -{ - KdInitOutput (pScreenInfo, argc, argv); -} - -void -InitInput (int argc, char **argv) -{ - KdOsAddInputDrivers (); - KdInitInput (); -} - -extern pcmciaDisplayModeRec pcmciaDefaultModes[]; - -void -ddxUseMsg (void) -{ - KdUseMsg(); -} - -int -ddxProcessArgument (int argc, char **argv, int i) -{ - return KdProcessArgument (argc, argv, i); -} diff --git a/hw/kdrive/pm2/Makefile.am b/hw/kdrive/pm2/Makefile.am deleted file mode 100644 index cb28de6cb..000000000 --- a/hw/kdrive/pm2/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -INCLUDES = \ - @KDRIVE_INCS@ \ - -I$(top_srcdir)/hw/kdrive/vesa \ - @KDRIVE_CFLAGS@ - -bin_PROGRAMS = Xpm2 - -noinst_LIBRARIES = libpm2.a - -libpm2_a_SOURCES = \ - glint_regs.h \ - pm2.c \ - pm2_draw.c \ - pm2.h - -Xpm2_SOURCES = \ - pm2stub.c - -PM2_LIBS = \ - libpm2.a \ - $(top_builddir)/hw/kdrive/vesa/libvesa.a \ - @KDRIVE_LIBS@ - -if GLX -Xpm2_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -endif - -Xpm2_LDADD = \ - $(PM2_LIBS) \ - @KDRIVE_LIBS@ - -Xpm2_DEPENDENCIES = \ - libpm2.a \ - @KDRIVE_LOCAL_LIBS@ - -relink: - rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS) diff --git a/hw/kdrive/pm2/glint_regs.h b/hw/kdrive/pm2/glint_regs.h deleted file mode 100644 index 84f220298..000000000 --- a/hw/kdrive/pm2/glint_regs.h +++ /dev/null @@ -1,1370 +0,0 @@ - -/* - * glint register file - * - * Copyright by Stefan Dirsch, Dirk Hohndel, Alan Hourihane - * Authors: Alan Hourihane, - * Dirk Hohndel, - * Stefan Dirsch, - * Simon P., - * - * this work is sponsored by S.u.S.E. GmbH, Fuerth, Elsa GmbH, Aachen and - * Siemens Nixdorf Informationssysteme - * - */ - -#ifndef _GLINTREG_H_ -#define _GLINTREG_H_ - -/* The chips we know */ -#define PCI_CHIP_3DLABS_300SX 0x01 -#define PCI_CHIP_3DLABS_500TX 0x02 -#define PCI_CHIP_3DLABS_DELTA 0x03 -#define PCI_CHIP_3DLABS_PERMEDIA 0x04 -#define PCI_CHIP_3DLABS_MX 0x06 -#define PCI_CHIP_3DLABS_PERMEDIA2 0x07 -#define PCI_CHIP_3DLABS_GAMMA 0x08 -#define PCI_CHIP_3DLABS_PERMEDIA2V 0x09 -#define PCI_CHIP_3DLABS_PERMEDIA3 0x0A -#define PCI_CHIP_3DLABS_PERMEDIA4 0x0C -#define PCI_CHIP_3DLABS_R4 0x0D -#define PCI_CHIP_3DLABS_GAMMA2 0x0E - -/* The boards we know */ -#define IS_GLORIAXXL ((pGlint->PciInfo->subsysVendor == 0x1048) && \ - (pGlint->PciInfo->subsysCard == 0x0a42)) - -#define IS_GLORIASYNERGY ((pGlint->PciInfo->subsysVendor == 0x1048) && \ - (pGlint->PciInfo->subsysCard == 0x0a32)) - -#define IS_GMX2000 ((pGlint->PciInfo->subsysVendor == 0x3d3d) && \ - (pGlint->PciInfo->subsysCard == 0x0106)) - -#define IS_J2000 ((pGlint->PciInfo->subsysVendor == 0x1097) && \ - (pGlint->PciInfo->subsysCard == 0x3d32)) - -#define IS_JPRO ((pGlint->PciInfo->subsysVendor == 0x1097) && \ - (pGlint->PciInfo->subsysCard == 0x3db3)) - -/* COMPAQ OEM VX1 PCI - * subsys == 0x0121 if VGA is enabled - * subsys == 0x000a if VGA has never been enabled - */ -#define IS_PCI_QVX1 (pGlint->PciInfo->subsysVendor == 0x3d3d && \ - ((pGlint->PciInfo->subsysCard == 0x0121) || \ - (pGlint->PciInfo->subsysCard == 0x000a))) - -/* COMPAQ OEM VX1 AGP - * subsys == 0x0144 if VGA is enabled - * subsys == 0x000c if VGA has never been enabled - */ -#define IS_AGP_QVX1 (pGlint->PciInfo->subsysVendor == 0x3d3d && \ - ((pGlint->PciInfo->subsysCard == 0x0144) || \ - (pGlint->PciInfo->subsysCard == 0x000c))) - -#define IS_QVX1 (IS_PCI_QVX1 || IS_AGP_QVX1) - -#define IS_ELSA_SYNERGY ((pGlint->PciInfo->subsysVendor == 0x1048) && \ - (pGlint->PciInfo->subsysCard == 0x0a32)) - -/* COMPAQ OEM Permedia 2V with VGA disable jumper - 0x13e9 ? */ -#define IS_QPM2V ((pGlint->PciInfo->subsysVendor == 0x13e9) && \ - ((pGlint->PciInfo->subsysCard == 0x0100) || \ - (pGlint->PciInfo->subsysCard == 0x0002))) - -/********************************************** -* GLINT 500TX Configuration Region Registers * -***********************************************/ - -/* Device Identification */ -#define CFGVendorId 0x0000 -#define PCI_VENDOR_3DLABS 0x3D3D -#define PCI_VENDOR_TI 0x104C -#define CFGDeviceId 0x0002 - -#define CFGRevisionId 0x08 -#define CFGClassCode 0x09 -#define CFGHeaderType 0x0E - -/* Device Control/Status */ -#define CFGCommand 0x04 -#define CFGStatus 0x06 - -/* Miscellaneous Functions */ -#define CFGBist 0x0f -#define CFGLatTimer 0x0d -#define CFGCacheLine 0x0c -#define CFGMaxLat 0x3f -#define CFGMinGrant 0x3e -#define CFGIntPin 0x3d -#define CFGIntLine 0x3c - -/* Base Adresses */ -#define CFGBaseAddr0 0x10 -#define CFGBaseAddr1 0x14 -#define CFGBaseAddr2 0x18 -#define CFGBaseAddr3 0x1C -#define CFGBaseAddr4 0x20 -#define CFGRomAddr 0x30 - - - -/********************************** - * GLINT 500TX Region 0 Registers * - **********************************/ - -/* Control Status Registers */ -#define ResetStatus 0x0000 -#define IntEnable 0x0008 -#define IntFlags 0x0010 -#define InFIFOSpace 0x0018 -#define OutFIFOWords 0x0020 -#define DMAAddress 0x0028 -#define DMACount 0x0030 -#define ErrorFlags 0x0038 -#define VClkCtl 0x0040 -#define TestRegister 0x0048 -#define Aperture0 0x0050 -#define Aperture1 0x0058 -#define DMAControl 0x0060 -#define FIFODis 0x0068 - -/* GLINT PerMedia Region 0 additional Registers */ -#define ChipConfig 0x0070 -# define SCLK_SEL_MASK (3 << 10) -# define SCLK_SEL_MCLK_HALF (3 << 10) - -#define ByDMAControl 0x00D8 - -/* GLINT 500TX LocalBuffer Registers */ -#define LBMemoryCtl 0x1000 -# define LBNumBanksMask 0x00000001 -# define LBNumBanks1 (0) -# define LBNumBanks2 (1) -# define LBPageSizeMask 0x00000006 -# define LBPageSize256 (0<<1) -# define LBPageSize512 (1<<1) -# define LBPageSize1024 (2<<1) -# define LBPageSize2048 (3<<1) -# define LBRASCASLowMask 0x00000018 -# define LBRASCASLow2 (0<<3) -# define LBRASCASLow3 (1<<3) -# define LBRASCASLow4 (2<<3) -# define LBRASCASLow5 (3<<3) -# define LBRASPrechargeMask 0x00000060 -# define LBRASPrecharge2 (0<<5) -# define LBRASPrecharge3 (1<<5) -# define LBRASPrecharge4 (2<<5) -# define LBRASPrecharge5 (3<<5) -# define LBCASLowMask 0x00000180 -# define LBCASLow1 (0<<7) -# define LBCASLow2 (1<<7) -# define LBCASLow3 (2<<7) -# define LBCASLow4 (3<<7) -# define LBPageModeMask 0x00000200 -# define LBPageModeEnabled (0<<9) -# define LBPageModeDisabled (1<<9) -# define LBRefreshCountMask 0x0003fc00 -# define LBRefreshCountShift 10 - -#define LBMemoryEDO 0x1008 -# define LBEDOMask 0x00000001 -# define LBEDODisabled (0) -# define LBEDOEnabled (1) -# define LBEDOBankSizeMask 0x0000000e -# define LBEDOBankSizeDiabled (0<<1) -# define LBEDOBankSize256K (1<<1) -# define LBEDOBankSize512K (2<<1) -# define LBEDOBankSize1M (3<<1) -# define LBEDOBankSize2M (4<<1) -# define LBEDOBankSize4M (5<<1) -# define LBEDOBankSize8M (6<<1) -# define LBEDOBankSize16M (7<<1) -# define LBTwoPageDetectorMask 0x00000010 -# define LBSinglePageDetector (0<<4) -# define LBTwoPageDetector (1<<4) - -/* GLINT PerMedia Memory Control Registers */ -#define PMReboot 0x1000 -#define PMRomControl 0x1040 -#define PMBootAddress 0x1080 -#define PMMemConfig 0x10C0 -# define RowCharge8 1 << 10 -# define TimeRCD8 1 << 7 -# define TimeRC8 0x6 << 3 -# define TimeRP8 1 -# define CAS3Latency8 0 << 16 -# define BootAdress8 0x10 -# define NumberBanks8 0x3 << 29 -# define RefreshCount8 0x41 << 21 -# define TimeRASMin8 1 << 13 -# define DeadCycle8 1 << 17 -# define BankDelay8 0 << 18 -# define Burst1Cycle8 1 << 31 -# define SDRAM8 0 << 4 - -# define RowCharge6 1 << 10 -# define TimeRCD6 1 << 7 -# define TimeRC6 0x6 << 3 -# define TimeRP6 0x2 -# define CAS3Latency6 1 << 16 -# define BootAdress6 0x60 -# define NumberBanks6 0x2 << 29 -# define RefreshCount6 0x41 << 21 -# define TimeRASMin6 1 << 13 -# define DeadCycle6 1 << 17 -# define BankDelay6 0 << 18 -# define Burst1Cycle6 1 << 31 -# define SDRAM6 0 << 4 - -# define RowCharge4 0 << 10 -# define TimeRCD4 0 << 7 -# define TimeRC4 0x4 << 3 -# define TimeRP4 1 -# define CAS3Latency4 0 << 16 -# define BootAdress4 0x10 -# define NumberBanks4 1 << 29 -# define RefreshCount4 0x30 << 21 -# define TimeRASMin4 1 << 13 -# define DeadCycle4 0 << 17 -# define BankDelay4 0 << 18 -# define Burst1Cycle4 1 << 31 -# define SDRAM4 0 << 4 - -/* Permedia 2 Control */ -#define MemControl 0x1040 - -#define PMBypassWriteMask 0x1100 -#define PMFramebufferWriteMask 0x1140 -#define PMCount 0x1180 - -/* Framebuffer Registers */ -#define FBMemoryCtl 0x1800 -#define FBModeSel 0x1808 -#define FBGCWrMask 0x1810 -#define FBGCColorLower 0x1818 -#define FBTXMemCtl 0x1820 -#define FBWrMaskk 0x1830 -#define FBGCColorUpper 0x1838 - -/* Core FIFO */ -#define OutputFIFO 0x2000 - -/* 500TX Internal Video Registers */ -#define VTGHLimit 0x3000 -#define VTGHSyncStart 0x3008 -#define VTGHSyncEnd 0x3010 -#define VTGHBlankEnd 0x3018 -#define VTGVLimit 0x3020 -#define VTGVSyncStart 0x3028 -#define VTGVSyncEnd 0x3030 -#define VTGVBlankEnd 0x3038 -#define VTGHGateStart 0x3040 -#define VTGHGateEnd 0x3048 -#define VTGVGateStart 0x3050 -#define VTGVGateEnd 0x3058 -#define VTGPolarity 0x3060 -#define VTGFrameRowAddr 0x3068 -#define VTGVLineNumber 0x3070 -#define VTGSerialClk 0x3078 -#define VTGModeCtl 0x3080 - -/* Permedia Video Control Registers */ -#define PMScreenBase 0x3000 -#define PMScreenStride 0x3008 -#define PMHTotal 0x3010 -#define PMHgEnd 0x3018 -#define PMHbEnd 0x3020 -#define PMHsStart 0x3028 -#define PMHsEnd 0x3030 -#define PMVTotal 0x3038 -#define PMVbEnd 0x3040 -#define PMVsStart 0x3048 -#define PMVsEnd 0x3050 -#define PMVideoControl 0x3058 -#define PMInterruptLine 0x3060 -#define PMDDCData 0x3068 -# define DataIn (1<<0) -# define ClkIn (1<<1) -# define DataOut (1<<2) -# define ClkOut (1<<3) -#define PMLineCount 0x3070 -#define PMFifoControl 0x3078 - -/* Permedia 2 RAMDAC Registers */ -#define PM2DACWriteAddress 0x4000 -#define PM2DACIndexReg 0x4000 -#define PM2DACData 0x4008 -#define PM2DACReadMask 0x4010 -#define PM2DACReadAddress 0x4018 -#define PM2DACCursorColorAddress 0x4020 -#define PM2DACCursorColorData 0x4028 -#define PM2DACIndexData 0x4050 -#define PM2DACCursorData 0x4058 -#define PM2DACCursorXLsb 0x4060 -#define PM2DACCursorXMsb 0x4068 -#define PM2DACCursorYLsb 0x4070 -#define PM2DACCursorYMsb 0x4078 -#define PM2DACCursorControl 0x06 - -#define PM2DACIndexCMR 0x18 -# define PM2DAC_TRUECOLOR 0x80 -# define PM2DAC_RGB 0x20 -# define PM2DAC_GRAPHICS 0x10 -# define PM2DAC_PACKED 0x09 -# define PM2DAC_8888 0x08 -# define PM2DAC_565 0x06 -# define PM2DAC_4444 0x05 -# define PM2DAC_5551 0x04 -# define PM2DAC_2321 0x03 -# define PM2DAC_2320 0x02 -# define PM2DAC_332 0x01 -# define PM2DAC_CI8 0x00 - -#define PM2DACIndexMDCR 0x19 -#define PM2DACIndexPalettePage 0x1c -#define PM2DACIndexMCR 0x1e -#define PM2DACIndexClockAM 0x20 -#define PM2DACIndexClockAN 0x21 -#define PM2DACIndexClockAP 0x22 -#define PM2DACIndexClockBM 0x23 -#define PM2DACIndexClockBN 0x24 -#define PM2DACIndexClockBP 0x25 -#define PM2DACIndexClockCM 0x26 -#define PM2DACIndexClockCN 0x27 -#define PM2DACIndexClockCP 0x28 -#define PM2DACIndexClockStatus 0x29 -#define PM2DACIndexMemClockM 0x30 -#define PM2DACIndexMemClockN 0x31 -#define PM2DACIndexMemClockP 0x32 -#define PM2DACIndexMemClockStatus 0x33 -#define PM2DACIndexColorKeyControl 0x40 -#define PM2DACIndexColorKeyOverlay 0x41 -#define PM2DACIndexColorKeyRed 0x42 -#define PM2DACIndexColorKeyGreen 0x43 -#define PM2DACIndexColorKeyBlue 0x44 - -/* Permedia 2V extensions */ -#define PM2VDACRDMiscControl 0x000 -#define PM2VDACRDSyncControl 0x001 -#define PM2VDACRDDACControl 0x002 -#define PM2VDACRDPixelSize 0x003 -#define PM2VDACRDColorFormat 0x004 -#define PM2VDACRDCursorMode 0x005 -#define PM2VDACRDCursorXLow 0x007 -#define PM2VDACRDCursorXHigh 0x008 -#define PM2VDACRDCursorYLow 0x009 -#define PM2VDACRDCursorYHigh 0x00A -#define PM2VDACRDCursorHotSpotX 0x00B -#define PM2VDACRDCursorHotSpotY 0x00C -#define PM2VDACRDOverlayKey 0x00D -#define PM2VDACRDPan 0x00E -#define PM2VDACRDSense 0x00F -#define PM2VDACRDCheckControl 0x018 -#define PM2VDACIndexClockControl 0x200 -#define PM2VDACRDDClk0PreScale 0x201 -#define PM2VDACRDDClk0FeedbackScale 0x202 -#define PM2VDACRDDClk0PostScale 0x203 -#define PM2VDACRDDClk1PreScale 0x204 -#define PM2VDACRDDClk1FeedbackScale 0x205 -#define PM2VDACRDDClk1PostScale 0x206 -#define PM2VDACRDMClkControl 0x20D -#define PM2VDACRDMClkPreScale 0x20E -#define PM2VDACRDMClkFeedbackScale 0x20F -#define PM2VDACRDMClkPostScale 0x210 -#define PM2VDACRDCursorPalette 0x303 -#define PM2VDACRDCursorPattern 0x400 -#define PM2VDACIndexRegLow 0x4020 -#define PM2VDACIndexRegHigh 0x4028 -#define PM2VDACIndexData 0x4030 - -#define PM2VDACRDIndexControl 0x4038 -/* Permedia 2 Video Streams Unit Registers */ -# define VSBIntFlag (1<<8) -# define VSAIntFlag (1<<9) - -#define VSConfiguration 0x5800 -# define VS_UnitMode_ROM 0 -# define VS_UnitMode_AB8 3 -# define VS_UnitMode_Mask 7 -# define VS_GPBusMode_A (1<<3) -# define VS_HRefPolarityA (1<<9) -# define VS_VRefPolarityA (1<<10) -# define VS_VActivePolarityA (1<<11) -# define VS_UseFieldA (1<<12) -# define VS_FieldPolarityA (1<<13) -# define VS_FieldEdgeA (1<<14) -# define VS_VActiveVBIA (1<<15) -# define VS_InterlaceA (1<<16) -# define VS_ReverseDataA (1<<17) -# define VS_HRefPolarityB (1<<18) -# define VS_VRefPolarityB (1<<19) -# define VS_VActivePolarityB (1<<20) -# define VS_UseFieldB (1<<21) -# define VS_FieldPolarityB (1<<22) -# define VS_FieldEdgeB (1<<23) -# define VS_VActiveVBIB (1<<24) -# define VS_InterlaceB (1<<25) -# define VS_ColorSpaceB_RGB (1<<26) -# define VS_ReverseDataB (1<<27) -# define VS_DoubleEdgeB (1<<28) - -#define VSStatus 0x5808 -# define VS_FieldOne0A (1<<9) -# define VS_FieldOne1A (1<<10) -# define VS_FieldOne2A (1<<11) -# define VS_InvalidInterlaceA (1<<12) -# define VS_FieldOne0B (1<<17) -# define VS_FieldOne1B (1<<18) -# define VS_FieldOne2B (1<<19) -# define VS_InvalidInterlaceB (1<<20) - -#define VSSerialBusControl 0x5810 - -#define VSABase 0x5900 -# define VSA_Video (1<<0) -# define VSA_VBI (1<<1) -# define VSA_BufferCtl (1<<2) -# define VSA_MirrorX (1<<7) -# define VSA_MirrorY (1<<8) -# define VSA_Discard_None (0<<9) -# define VSA_Discard_FieldOne (1<<9) -# define VSA_Discard_FieldTwo (2<<9) -# define VSA_CombineFields (1<<11) -# define VSA_LockToStreamB (1<<12) - -#define VSBBase 0x5A00 -# define VSB_Video (1<<0) -# define VSB_VBI (1<<1) -# define VSB_BufferCtl (1<<2) -# define VSB_CombineFields (1<<3) -# define VSB_RGBOrder (1<<11) -# define VSB_GammaCorrect (1<<12) -# define VSB_LockToStreamA (1<<13) - -#define VSControl 0x0000 -#define VSInterrupt 0x0008 -#define VSCurrentLine 0x0010 -#define VSVideoAddressHost 0x0018 -#define VSVideoAddressIndex 0x0020 -#define VSVideoAddress0 0x0028 -#define VSVideoAddress1 0x0030 -#define VSVideoAddress2 0x0038 -#define VSVideoStride 0x0040 -#define VSVideoStartLine 0x0048 -#define VSVideoEndLine 0x0050 -#define VSVideoStartData 0x0058 -#define VSVideoEndData 0x0060 -#define VSVBIAddressHost 0x0068 -#define VSVBIAddressIndex 0x0070 -#define VSVBIAddress0 0x0078 -#define VSVBIAddress1 0x0080 -#define VSVBIAddress2 0x0088 -#define VSVBIStride 0x0090 -#define VSVBIStartLine 0x0098 -#define VSVBIEndLine 0x00A0 -#define VSVBIStartData 0x00A8 -#define VSVBIEndData 0x00B0 -#define VSFifoControl 0x00B8 - -/********************************** - * GLINT Delta Region 0 Registers * - **********************************/ - -/* Control Status Registers */ -#define DResetStatus 0x0800 -#define DIntEnable 0x0808 -#define DIntFlags 0x0810 -#define DErrorFlags 0x0838 -#define DTestRegister 0x0848 -#define DFIFODis 0x0868 - - - -/********************************** - * GLINT Gamma Region 0 Registers * - **********************************/ - -/* Control Status Registers */ -#define GInFIFOSpace 0x0018 -#define GDMAAddress 0x0028 -#define GDMACount 0x0030 -#define GDMAControl 0x0060 -#define GOutDMA 0x0080 -#define GOutDMACount 0x0088 -#define GResetStatus 0x0800 -#define GIntEnable 0x0808 -#define GIntFlags 0x0810 -#define GErrorFlags 0x0838 -#define GTestRegister 0x0848 -#define GFIFODis 0x0868 - -#define GChipConfig 0x0870 -# define GChipAGPCapable 1 << 0 -# define GChipAGPSideband 1 << 1 -# define GChipMultiGLINTApMask 3 << 19 -# define GChipMultiGLINTAp_0M 0 << 19 -# define GChipMultiGLINTAp_16M 1 << 19 -# define GChipMultiGLINTAp_32M 2 << 19 -# define GChipMultiGLINTAp_64M 3 << 19 - -#define GCSRAperture 0x0878 -# define GCSRSecondaryGLINTMapEn 1 << 0 -# define GCSRBitSwap 1 << 1 - -#define GPageTableAddr 0x0c00 -#define GPageTableLength 0x0c08 -#define GDelayTimer 0x0c38 -#define GCommandMode 0x0c40 -#define GCommandIntEnable 0x0c48 -#define GCommandIntFlags 0x0c50 -#define GCommandErrorFlags 0x0c58 -#define GCommandStatus 0x0c60 -#define GCommandFaultingAddr 0x0c68 -#define GVertexFaultingAddr 0x0c70 -#define GWriteFaultingAddr 0x0c88 -#define GFeedbackSelectCount 0x0c98 -#define GGammaProcessorMode 0x0cb8 -#define GVGAShadow 0x0d00 -#define GMultGLINTAperture 0x0d08 -#define GMultGLINT1 0x0d10 -#define GMultGLINT2 0x0d18 - -/************************ - * GLINT Core Registers * - ************************/ - -#define GLINT_TAG(major,offset) (((major) << 7) | ((offset) << 3)) -#define GLINT_TAG_ADDR(major,offset) (0x8000 | GLINT_TAG((major),(offset))) - -#define UNIT_DISABLE 0 -#define UNIT_ENABLE 1 - -#define StartXDom GLINT_TAG_ADDR(0x00,0x00) -#define dXDom GLINT_TAG_ADDR(0x00,0x01) -#define StartXSub GLINT_TAG_ADDR(0x00,0x02) -#define dXSub GLINT_TAG_ADDR(0x00,0x03) -#define StartY GLINT_TAG_ADDR(0x00,0x04) -#define dY GLINT_TAG_ADDR(0x00,0x05) -#define GLINTCount GLINT_TAG_ADDR(0x00,0x06) - -#define Render GLINT_TAG_ADDR(0x00,0x07) -# define AreaStippleEnable 0x00001 -# define LineStippleEnable 0x00002 -# define ResetLineStipple 0x00004 -# define FastFillEnable 0x00008 -# define PrimitiveLine 0 -# define PrimitiveTrapezoid 0x00040 -# define PrimitivePoint 0x00080 -# define PrimitiveRectangle 0x000C0 -# define AntialiasEnable 0x00100 -# define AntialiasingQuality 0x00200 -# define UsePointTable 0x00400 -# define SyncOnBitMask 0x00800 -# define SyncOnHostData 0x01000 -# define TextureEnable 0x02000 -# define FogEnable 0x04000 -# define CoverageEnable 0x08000 -# define SubPixelCorrectionEnable 0x10000 -# define SpanOperation 0x40000 -# define XPositive 1<<21 -# define YPositive 1<<22 - -#define ContinueNewLine GLINT_TAG_ADDR(0x00,0x08) -#define ContinueNewDom GLINT_TAG_ADDR(0x00,0x09) -#define ContinueNewSub GLINT_TAG_ADDR(0x00,0x0a) -#define Continue GLINT_TAG_ADDR(0x00,0x0b) -#define FlushSpan GLINT_TAG_ADDR(0x00,0x0c) -#define BitMaskPattern GLINT_TAG_ADDR(0x00,0x0d) - -#define PointTable0 GLINT_TAG_ADDR(0x01,0x00) -#define PointTable1 GLINT_TAG_ADDR(0x01,0x01) -#define PointTable2 GLINT_TAG_ADDR(0x01,0x02) -#define PointTable3 GLINT_TAG_ADDR(0x01,0x03) - -#define RasterizerMode GLINT_TAG_ADDR(0x01,0x04) -#define RMMultiGLINT 1<<17 -#define BitMaskPackingEachScanline 1<<9 -#define ForceBackgroundColor 1<<6 -#define InvertBitMask 1<<1 - -#define YLimits GLINT_TAG_ADDR(0x01,0x05) -#define ScanLineOwnership GLINT_TAG_ADDR(0x01,0x06) -#define WaitForCompletion GLINT_TAG_ADDR(0x01,0x07) -#define PixelSize GLINT_TAG_ADDR(0x01,0x08) -#define XLimits GLINT_TAG_ADDR(0x01,0x09) /* PM only */ - -#define RectangleOrigin GLINT_TAG_ADDR(0x01,0x0A) /* PM2 only */ -#define RectangleSize GLINT_TAG_ADDR(0x01,0x0B) /* PM2 only */ - -#define PackedDataLimits GLINT_TAG_ADDR(0x02,0x0a) /* PM only */ - -#define ScissorMode GLINT_TAG_ADDR(0x03,0x00) -# define SCI_USER 0x01 -# define SCI_SCREEN 0x02 -# define SCI_USERANDSCREEN 0x03 - -#define ScissorMinXY GLINT_TAG_ADDR(0x03,0x01) -#define ScissorMaxXY GLINT_TAG_ADDR(0x03,0x02) -#define ScreenSize GLINT_TAG_ADDR(0x03,0x03) -#define AreaStippleMode GLINT_TAG_ADDR(0x03,0x04) - /* 0: */ - /* NoMirrorY */ - /* NoMirrorX */ - /* NoInvertPattern */ - /* YAddress_1bit */ - /* XAddress_1bit */ - /* UNIT_DISABLE */ - -# define ASM_XAddress_2bit 1 << 1 -# define ASM_XAddress_3bit 2 << 1 -# define ASM_XAddress_4bit 3 << 1 -# define ASM_XAddress_5bit 4 << 1 -# define ASM_YAddress_2bit 1 << 4 -# define ASM_YAddress_3bit 2 << 4 -# define ASM_YAddress_4bit 3 << 4 -# define ASM_YAddress_5bit 4 << 4 -# define ASM_InvertPattern 1 << 17 -# define ASM_MirrorX 1 << 18 -# define ASM_MirrorY 1 << 19 - -#define LineStippleMode GLINT_TAG_ADDR(0x03,0x05) -#define LoadLineStippleCounters GLINT_TAG_ADDR(0x03,0x06) -#define UpdateLineStippleCounters GLINT_TAG_ADDR(0x03,0x07) -#define SaveLineStippleState GLINT_TAG_ADDR(0x03,0x08) -#define WindowOrigin GLINT_TAG_ADDR(0x03,0x09) - -#define AreaStipplePattern0 GLINT_TAG_ADDR(0x04,0x00) -#define AreaStipplePattern1 GLINT_TAG_ADDR(0x04,0x01) -#define AreaStipplePattern2 GLINT_TAG_ADDR(0x04,0x02) -#define AreaStipplePattern3 GLINT_TAG_ADDR(0x04,0x03) -#define AreaStipplePattern4 GLINT_TAG_ADDR(0x04,0x04) -#define AreaStipplePattern5 GLINT_TAG_ADDR(0x04,0x05) -#define AreaStipplePattern6 GLINT_TAG_ADDR(0x04,0x06) -#define AreaStipplePattern7 GLINT_TAG_ADDR(0x04,0x07) - -#define TextureAddressMode GLINT_TAG_ADDR(0x07,0x00) -#define SStart GLINT_TAG_ADDR(0x07,0x01) -#define dSdx GLINT_TAG_ADDR(0x07,0x02) -#define dSdyDom GLINT_TAG_ADDR(0x07,0x03) -#define TStart GLINT_TAG_ADDR(0x07,0x04) -#define dTdx GLINT_TAG_ADDR(0x07,0x05) -#define dTdyDom GLINT_TAG_ADDR(0x07,0x06) -#define QStart GLINT_TAG_ADDR(0x07,0x07) -#define dQdx GLINT_TAG_ADDR(0x07,0x08) -#define dQdyDom GLINT_TAG_ADDR(0x07,0x09) -#define LOD GLINT_TAG_ADDR(0x07,0x0A) -#define dSdy GLINT_TAG_ADDR(0x07,0x0B) -#define dTdy GLINT_TAG_ADDR(0x07,0x0C) -#define dQdy GLINT_TAG_ADDR(0x07,0x0D) - -#define TextureReadMode GLINT_TAG_ADDR(0x09,0x00) - -#define TextureFormat GLINT_TAG_ADDR(0x09,0x01) -# define Texture_4_Components 3 << 3 -# define Texture_Texel 0 - -#define TextureCacheControl GLINT_TAG_ADDR(0x09,0x02) -# define TextureCacheControlEnable 2 -# define TextureCacheControlInvalidate 1 - -#define GLINTBorderColor GLINT_TAG_ADDR(0x09,0x05) - -#define TexelLUTIndex GLINT_TAG_ADDR(0x09,0x08) -#define TexelLUTData GLINT_TAG_ADDR(0x09,0x09) -#define TexelLUTAddress GLINT_TAG_ADDR(0x09,0x0A) -#define TexelLUTTransfer GLINT_TAG_ADDR(0x09,0x0B) - -#define TextureFilterMode GLINT_TAG_ADDR(0x09,0x0C) - -#define TextureChromaUpper GLINT_TAG_ADDR(0x09,0x0D) -#define TextureChromaLower GLINT_TAG_ADDR(0x09,0x0E) - -#define TxBaseAddr0 GLINT_TAG_ADDR(0x0A,0x00) -#define TxBaseAddr1 GLINT_TAG_ADDR(0x0A,0x01) -#define TxBaseAddr2 GLINT_TAG_ADDR(0x0A,0x02) -#define TxBaseAddr3 GLINT_TAG_ADDR(0x0A,0x03) -#define TxBaseAddr4 GLINT_TAG_ADDR(0x0A,0x04) -#define TxBaseAddr5 GLINT_TAG_ADDR(0x0A,0x05) -#define TxBaseAddr6 GLINT_TAG_ADDR(0x0A,0x06) -#define TxBaseAddr7 GLINT_TAG_ADDR(0x0A,0x07) -#define TxBaseAddr8 GLINT_TAG_ADDR(0x0A,0x08) -#define TxBaseAddr9 GLINT_TAG_ADDR(0x0A,0x09) -#define TxBaseAddr10 GLINT_TAG_ADDR(0x0A,0x0A) -#define TxBaseAddr11 GLINT_TAG_ADDR(0x0A,0x0B) - -#define PMTextureBaseAddress GLINT_TAG_ADDR(0x0b,0x00) -#define PMTextureMapFormat GLINT_TAG_ADDR(0x0b,0x01) -#define PMTextureDataFormat GLINT_TAG_ADDR(0x0b,0x02) - -#define Texel0 GLINT_TAG_ADDR(0x0c,0x00) -#define Texel1 GLINT_TAG_ADDR(0x0c,0x01) -#define Texel2 GLINT_TAG_ADDR(0x0c,0x02) -#define Texel3 GLINT_TAG_ADDR(0x0c,0x03) -#define Texel4 GLINT_TAG_ADDR(0x0c,0x04) -#define Texel5 GLINT_TAG_ADDR(0x0c,0x05) -#define Texel6 GLINT_TAG_ADDR(0x0c,0x06) -#define Texel7 GLINT_TAG_ADDR(0x0c,0x07) - -#define Interp0 GLINT_TAG_ADDR(0x0c,0x08) -#define Interp1 GLINT_TAG_ADDR(0x0c,0x09) -#define Interp2 GLINT_TAG_ADDR(0x0c,0x0a) -#define Interp3 GLINT_TAG_ADDR(0x0c,0x0b) -#define Interp4 GLINT_TAG_ADDR(0x0c,0x0c) - -#define TextureFilter GLINT_TAG_ADDR(0x0c,0x0d) -#define PMTextureReadMode GLINT_TAG_ADDR(0x0c,0x0e) -#define TexelLUTMode GLINT_TAG_ADDR(0x0c,0x0f) - -#define TextureColorMode GLINT_TAG_ADDR(0x0d,0x00) -# define TextureTypeOpenGL 0 -# define TextureTypeApple 1 << 4 -# define TextureKsDDA 1 << 5 /* only Apple-Mode */ -# define TextureKdDDA 1 << 6 /* only Apple-Mode */ - -#define TextureEnvColor GLINT_TAG_ADDR(0x0d,0x01) -#define FogMode GLINT_TAG_ADDR(0x0d,0x02) - /* 0: */ - /* FOG RGBA */ - /* UNIT_DISABLE */ -# define FOG_CI 0x0002 - -#define FogColor GLINT_TAG_ADDR(0x0d,0x03) -#define FStart GLINT_TAG_ADDR(0x0d,0x04) -#define dFdx GLINT_TAG_ADDR(0x0d,0x05) -#define dFdyDom GLINT_TAG_ADDR(0x0d,0x06) -#define KsStart GLINT_TAG_ADDR(0x0d,0x09) -#define dKsdx GLINT_TAG_ADDR(0x0d,0x0a) -#define dKsdyDom GLINT_TAG_ADDR(0x0d,0x0b) -#define KdStart GLINT_TAG_ADDR(0x0d,0x0c) -#define dKdStart GLINT_TAG_ADDR(0x0d,0x0d) -#define dKddyDom GLINT_TAG_ADDR(0x0d,0x0e) - -#define RStart GLINT_TAG_ADDR(0x0f,0x00) -#define dRdx GLINT_TAG_ADDR(0x0f,0x01) -#define dRdyDom GLINT_TAG_ADDR(0x0f,0x02) -#define GStart GLINT_TAG_ADDR(0x0f,0x03) -#define dGdx GLINT_TAG_ADDR(0x0f,0x04) -#define dGdyDom GLINT_TAG_ADDR(0x0f,0x05) -#define BStart GLINT_TAG_ADDR(0x0f,0x06) -#define dBdx GLINT_TAG_ADDR(0x0f,0x07) -#define dBdyDom GLINT_TAG_ADDR(0x0f,0x08) -#define AStart GLINT_TAG_ADDR(0x0f,0x09) -#define dAdx GLINT_TAG_ADDR(0x0f,0x0a) -#define dAdyDom GLINT_TAG_ADDR(0x0f,0x0b) -#define ColorDDAMode GLINT_TAG_ADDR(0x0f,0x0c) - /* 0:*/ - /* UNIT_DISABLE */ -# define CDDA_FlatShading 0 -# define CDDA_GouraudShading 0x0002 - - -#define ConstantColor GLINT_TAG_ADDR(0x0f,0x0d) -#define GLINTColor GLINT_TAG_ADDR(0x0f,0x0e) -#define AlphaTestMode GLINT_TAG_ADDR(0x10,0x00) -#define AntialiasMode GLINT_TAG_ADDR(0x10,0x01) -#define AlphaBlendMode GLINT_TAG_ADDR(0x10,0x02) - /* 0: */ - /* SrcZERO */ - /* DstZERO */ - /* ColorFormat8888 */ - /* AlphaBuffer present */ - /* ColorOrderBGR */ - /* TypeOpenGL */ - /* DstFBData */ - /* UNIT_DISABLE */ - -# define ABM_SrcONE 1 << 1 -# define ABM_SrcDST_COLOR 2 << 1 -# define ABM_SrcONE_MINUS_DST_COLOR 3 << 1 -# define ABM_SrcSRC_ALPHA 4 << 1 -# define ABM_SrcONE_MINUS_SRC_ALPHA 5 << 1 -# define ABM_SrcDST_ALPHA 6 << 1 -# define ABM_SrcONE_MINUS_DST_ALPHA 7 << 1 -# define ABM_SrcSRC_ALPHA_SATURATE 8 << 1 -# define ABM_DstONE 1 << 5 -# define ABM_DstSRC_COLOR 2 << 5 -# define ABM_DstONE_MINUS_SRC_COLOR 3 << 5 -# define ABM_DstSRC_ALPHA 4 << 5 -# define ABM_DstONE_MINUS_SRC_ALPHA 5 << 5 -# define ABM_DstDST_ALPHA 6 << 5 -# define ABM_DstONE_MINUS_DST_ALPHA 7 << 5 -# define ABM_ColorFormat5555 1 << 8 -# define ABM_ColorFormat4444 2 << 8 -# define ABM_ColorFormat4444_Front 3 << 8 -# define ABM_ColorFormat4444_Back 4 << 8 -# define ABM_ColorFormat332_Front 5 << 8 -# define ABM_ColorFormat332_Back 6 << 8 -# define ABM_ColorFormat121_Front 7 << 8 -# define ABM_ColorFormat121_Back 8 << 8 -# define ABM_ColorFormat555_Back 13 << 8 -# define ABM_ColorFormat_CI8 14 << 8 -# define ABM_ColorFormat_CI4 15 << 8 -# define ABM_NoAlphaBuffer 0x1000 -# define ABM_ColorOrderRGB 0x2000 -# define ABM_TypeQuickDraw3D 0x4000 -# define ABM_DstFBSourceData 0x8000 - -#define DitherMode GLINT_TAG_ADDR(0x10,0x03) - /* 0: */ - /* ColorOrder BGR */ - /* AlphaDitherDefault */ - /* ColorFormat8888 */ - /* TruncateMode */ - /* DitherDisable */ - /* UNIT_DISABLE */ - -# define DTM_DitherEnable 1 << 1 -# define DTM_ColorFormat5555 1 << 2 -# define DTM_ColorFormat4444 2 << 2 -# define DTM_ColorFormat4444_Front 3 << 2 -# define DTM_ColorFormat4444_Back 4 << 2 -# define DTM_ColorFormat332_Front 5 << 2 -# define DTM_ColorFormat332_Back 6 << 2 -# define DTM_ColorFormat121_Front 7 << 2 -# define DTM_ColorFormat121_Back 8 << 2 -# define DTM_ColorFormat555_Back 13 << 2 -# define DTM_ColorFormat_CI8 14 << 2 -# define DTM_ColorFormat_CI4 15 << 2 -# define DTM_ColorOrderRGB 1 << 10 -# define DTM_NoAlphaDither 1 << 14 -# define DTM_RoundMode 1 << 15 - -#define FBSoftwareWriteMask GLINT_TAG_ADDR(0x10,0x04) -#define LogicalOpMode GLINT_TAG_ADDR(0x10,0x05) -# define Use_ConstantFBWriteData 0x40 - - -#define FBWriteData GLINT_TAG_ADDR(0x10,0x06) -#define RouterMode GLINT_TAG_ADDR(0x10,0x08) -# define ROUTER_Depth_Texture 1 -# define ROUTER_Texture_Depth 0 - - -#define LBReadMode GLINT_TAG_ADDR(0x11,0x00) - /* 0: */ - /* SrcNoRead */ - /* DstNoRead */ - /* DataLBDefault */ - /* WinTopLeft */ - /* NoPatch */ - /* ScanlineInterval1 */ - -# define LBRM_SrcEnable 1 << 9 -# define LBRM_DstEnable 1 << 10 -# define LBRM_DataLBStencil 1 << 16 -# define LBRM_DataLBDepth 2 << 16 -# define LBRM_WinBottomLeft 1 << 18 -# define LBRM_DoPatch 1 << 19 - -# define LBRM_ScanlineInt2 1 << 20 -# define LBRM_ScanlineInt4 2 << 20 -# define LBRM_ScanlineInt8 3 << 20 - - -#define LBReadFormat GLINT_TAG_ADDR(0x11,0x01) -# define LBRF_DepthWidth15 0x03 /* only permedia */ -# define LBRF_DepthWidth16 0x00 -# define LBRF_DepthWidth24 0x01 -# define LBRF_DepthWidth32 0x02 - -# define LBRF_StencilWidth0 (0 << 2) -# define LBRF_StencilWidth4 (1 << 2) -# define LBRF_StencilWidth8 (2 << 2) - -# define LBRF_StencilPos16 (0 << 4) -# define LBRF_StencilPos20 (1 << 4) -# define LBRF_StencilPos24 (2 << 4) -# define LBRF_StencilPos28 (3 << 4) -# define LBRF_StencilPos32 (4 << 4) - -# define LBRF_FrameCount0 (0 << 7) -# define LBRF_FrameCount4 (1 << 7) -# define LBRF_FrameCount8 (2 << 7) - -# define LBRF_FrameCountPos16 (0 << 9) -# define LBRF_FrameCountPos20 (1 << 9) -# define LBRF_FrameCountPos24 (2 << 9) -# define LBRF_FrameCountPos28 (3 << 9) -# define LBRF_FrameCountPos32 (4 << 9) -# define LBRF_FrameCountPos36 (5 << 9) -# define LBRF_FrameCountPos40 (6 << 9) - -# define LBRF_GIDWidth0 (0 << 12) -# define LBRF_GIDWidth4 (1 << 12) - -# define LBRF_GIDPos16 (0 << 13) -# define LBRF_GIDPos20 (1 << 13) -# define LBRF_GIDPos24 (2 << 13) -# define LBRF_GIDPos28 (3 << 13) -# define LBRF_GIDPos32 (4 << 13) -# define LBRF_GIDPos36 (5 << 13) -# define LBRF_GIDPos40 (6 << 13) -# define LBRF_GIDPos44 (7 << 13) -# define LBRF_GIDPos48 (8 << 13) - -# define LBRF_Compact32 (1 << 17) - - - -#define LBSourceOffset GLINT_TAG_ADDR(0x11,0x02) -#define LBStencil GLINT_TAG_ADDR(0x11,0x05) -#define LBDepth GLINT_TAG_ADDR(0x11,0x06) -#define LBWindowBase GLINT_TAG_ADDR(0x11,0x07) -#define LBWriteMode GLINT_TAG_ADDR(0x11,0x08) -# define LBWM_WriteEnable 0x1 -# define LBWM_UpLoad_LBDepth 0x2 -# define LBWM_UpLoad_LBStencil 0x4 - -#define LBWriteFormat GLINT_TAG_ADDR(0x11,0x09) - - -#define TextureData GLINT_TAG_ADDR(0x11,0x0d) -#define TextureDownloadOffset GLINT_TAG_ADDR(0x11,0x0e) -#define LBWindowOffset GLINT_TAG_ADDR(0x11,0x0f) - -#define GLINTWindow GLINT_TAG_ADDR(0x13,0x00) -# define GWIN_UnitEnable (1 << 0) -# define GWIN_ForceLBUpdate (1 << 3) -# define GWIN_LBUpdateSourceREG (1 << 4) -# define GWIN_LBUpdateSourceLB (0 << 4) -# define GWIN_StencilFCP (1 << 17) -# define GWIN_DepthFCP (1 << 18) -# define GWIN_OverrideWriteFilter (1 << 19) -# define GWIN_DisableLBUpdate 0x40000 /* ??? is this needed, set by permedia (2) modules */ - -#define StencilMode GLINT_TAG_ADDR(0x13,0x01) -#define StencilData GLINT_TAG_ADDR(0x13,0x02) -#define GLINTStencil GLINT_TAG_ADDR(0x13,0x03) -#define DepthMode GLINT_TAG_ADDR(0x13,0x04) - /* 0: */ - /* WriteDisable */ - /* SrcCompFragment */ - /* CompFuncNEVER */ - /* UNIT_DISABLE */ - -# define DPM_WriteEnable 1 << 1 -# define DPM_SrcCompLBData 1 << 2 -# define DPM_SrcCompDregister 2 << 2 -# define DPM_SrcCompLBSourceData 3 << 2 -# define DPM_CompFuncLESS 1 << 4 -# define DPM_CompFuncEQUAL 2 << 4 -# define DPM_CompFuncLESS_OR_EQ 3 << 4 -# define DPM_CompFuncGREATER 4 << 4 -# define DPM_CompFuncNOT_EQ 5 << 4 -# define DPM_CompFuncGREATER_OR_EQ 6 << 4 -# define DPM_CompFuncALWAYS 7 << 4 - -#define GLINTDepth GLINT_TAG_ADDR(0x13,0x05) -#define ZStartU GLINT_TAG_ADDR(0x13,0x06) -#define ZStartL GLINT_TAG_ADDR(0x13,0x07) -#define dZdxU GLINT_TAG_ADDR(0x13,0x08) -#define dZdxL GLINT_TAG_ADDR(0x13,0x09) -#define dZdyDomU GLINT_TAG_ADDR(0x13,0x0a) -#define dZdyDomL GLINT_TAG_ADDR(0x13,0x0b) -#define FastClearDepth GLINT_TAG_ADDR(0x13,0x0c) - -#define FBReadMode GLINT_TAG_ADDR(0x15,0x00) - /* 0: */ - /* SrcNoRead */ - /* DstNoRead */ - /* DataFBDefault */ - /* WinTopLeft */ - /* ScanlineInterval1 */ - -# define FBRM_SrcEnable 1 << 9 -# define FBRM_DstEnable 1 << 10 -# define FBRM_DataFBColor 1 << 15 -# define FBRM_WinBottomLeft 1 << 16 -# define FBRM_Packed 1 << 19 -# define FBRM_ScanlineInt2 1 << 23 -# define FBRM_ScanlineInt4 2 << 23 -# define FBRM_ScanlineInt8 3 << 23 - - -#define FBSourceOffset GLINT_TAG_ADDR(0x15,0x01) -#define FBPixelOffset GLINT_TAG_ADDR(0x15,0x02) -#define FBColor GLINT_TAG_ADDR(0x15,0x03) -#define FBData GLINT_TAG_ADDR(0x15,0x04) -#define FBSourceData GLINT_TAG_ADDR(0x15,0x05) - -#define FBWindowBase GLINT_TAG_ADDR(0x15,0x06) -#define FBWriteMode GLINT_TAG_ADDR(0x15,0x07) - /* 0: */ - /* FBWM_NoColorUpload */ - /* FBWM_WriteDisable */ -# define FBWM_WriteEnable 1 -# define FBWM_UploadColor 1 << 3 -# define FBWM_Enable0 1 << 12 /* PM3 */ - -#define FBHardwareWriteMask GLINT_TAG_ADDR(0x15,0x08) -#define FBBlockColor GLINT_TAG_ADDR(0x15,0x09) -#define FBReadPixel GLINT_TAG_ADDR(0x15,0x0a) /* PM */ -#define PatternRamMode GLINT_TAG_ADDR(0x15,0x0f) - -#define PatternRamData0 GLINT_TAG_ADDR(0x16,0x00) -#define PatternRamData1 GLINT_TAG_ADDR(0x16,0x01) -#define PatternRamData2 GLINT_TAG_ADDR(0x16,0x02) -#define PatternRamData3 GLINT_TAG_ADDR(0x16,0x03) -#define PatternRamData4 GLINT_TAG_ADDR(0x16,0x04) -#define PatternRamData5 GLINT_TAG_ADDR(0x16,0x05) -#define PatternRamData6 GLINT_TAG_ADDR(0x16,0x06) -#define PatternRamData7 GLINT_TAG_ADDR(0x16,0x07) - -#define FilterMode GLINT_TAG_ADDR(0x18,0x00) - /* 0: */ - /* CullDepthTags */ - /* CullDepthData */ - /* CullStencilTags */ - /* CullStencilData */ - /* CullColorTag */ - /* CullColorData */ - /* CullSyncTag */ - /* CullSyncData */ - /* CullStatisticTag */ - /* CullStatisticData */ - -# define FM_PassDepthTags 0x0010 -# define FM_PassDepthData 0x0020 -# define FM_PassStencilTags 0x0040 -# define FM_PassStencilData 0x0080 -# define FM_PassColorTag 0x0100 -# define FM_PassColorData 0x0200 -# define FM_PassSyncTag 0x0400 -# define FM_PassSyncData 0x0800 -# define FM_PassStatisticTag 0x1000 -# define FM_PassStatisticData 0x2000 - -#define Sync_tag 0x0188 - -#define StatisticMode GLINT_TAG_ADDR(0x18,0x01) -#define MinRegion GLINT_TAG_ADDR(0x18,0x02) -#define MaxRegion GLINT_TAG_ADDR(0x18,0x03) -#define ResetPickResult GLINT_TAG_ADDR(0x18,0x04) -#define MitHitRegion GLINT_TAG_ADDR(0x18,0x05) -#define MaxHitRegion GLINT_TAG_ADDR(0x18,0x06) -#define PickResult GLINT_TAG_ADDR(0x18,0x07) -#define GlintSync GLINT_TAG_ADDR(0x18,0x08) - -#define FBBlockColorU GLINT_TAG_ADDR(0x18,0x0d) -#define FBBlockColorL GLINT_TAG_ADDR(0x18,0x0e) -#define SuspendUntilFrameBlank GLINT_TAG_ADDR(0x18,0x0f) - -#define KsRStart GLINT_TAG_ADDR(0x19,0x00) -#define dKsRdx GLINT_TAG_ADDR(0x19,0x01) -#define dKsRdyDom GLINT_TAG_ADDR(0x19,0x02) -#define KsGStart GLINT_TAG_ADDR(0x19,0x03) -#define dKsGdx GLINT_TAG_ADDR(0x19,0x04) -#define dKsGdyDom GLINT_TAG_ADDR(0x19,0x05) -#define KsBStart GLINT_TAG_ADDR(0x19,0x06) -#define dKsBdx GLINT_TAG_ADDR(0x19,0x07) -#define dKsBdyDom GLINT_TAG_ADDR(0x19,0x08) - -#define KdRStart GLINT_TAG_ADDR(0x1A,0x00) -#define dKdRdx GLINT_TAG_ADDR(0x1A,0x01) -#define dKdRdyDom GLINT_TAG_ADDR(0x1A,0x02) -#define KdGStart GLINT_TAG_ADDR(0x1A,0x03) -#define dKdGdx GLINT_TAG_ADDR(0x1A,0x04) -#define dKdGdyDom GLINT_TAG_ADDR(0x1A,0x05) -#define KdBStart GLINT_TAG_ADDR(0x1A,0x06) -#define dKdBdx GLINT_TAG_ADDR(0x1A,0x07) -#define dKdBdyDom GLINT_TAG_ADDR(0x1A,0x08) - -#define FBSourceBase GLINT_TAG_ADDR(0x1B,0x00) -#define FBSourceDelta GLINT_TAG_ADDR(0x1B,0x01) -#define Config GLINT_TAG_ADDR(0x1B,0x02) -#define CFBRM_SrcEnable 1<<0 -#define CFBRM_DstEnable 1<<1 -#define CFBRM_Packed 1<<2 -#define CWM_Enable 1<<3 -#define CCDDA_Enable 1<<4 -#define CLogOp_Enable 1<<5 -#define ContextDump GLINT_TAG_ADDR(0x1B,0x08) -#define ContextRestore GLINT_TAG_ADDR(0x1B,0x09) -#define ContextData GLINT_TAG_ADDR(0x1B,0x0a) - -#define TexelLUT0 GLINT_TAG_ADDR(0x1D,0x00) -#define TexelLUT1 GLINT_TAG_ADDR(0x1D,0x01) -#define TexelLUT2 GLINT_TAG_ADDR(0x1D,0x02) -#define TexelLUT3 GLINT_TAG_ADDR(0x1D,0x03) -#define TexelLUT4 GLINT_TAG_ADDR(0x1D,0x04) -#define TexelLUT5 GLINT_TAG_ADDR(0x1D,0x05) -#define TexelLUT6 GLINT_TAG_ADDR(0x1D,0x06) -#define TexelLUT7 GLINT_TAG_ADDR(0x1D,0x07) -#define TexelLUT8 GLINT_TAG_ADDR(0x1D,0x08) -#define TexelLUT9 GLINT_TAG_ADDR(0x1D,0x09) -#define TexelLUT10 GLINT_TAG_ADDR(0x1D,0x0A) -#define TexelLUT11 GLINT_TAG_ADDR(0x1D,0x0B) -#define TexelLUT12 GLINT_TAG_ADDR(0x1D,0x0C) -#define TexelLUT13 GLINT_TAG_ADDR(0x1D,0x0D) -#define TexelLUT14 GLINT_TAG_ADDR(0x1D,0x0E) -#define TexelLUT15 GLINT_TAG_ADDR(0x1D,0x0F) - -#define YUVMode GLINT_TAG_ADDR(0x1E,0x00) -#define ChromaUpper GLINT_TAG_ADDR(0x1E,0x01) -#define ChromaLower GLINT_TAG_ADDR(0x1E,0x02) -#define ChromaTestMode GLINT_TAG_ADDR(0x1E,0x03) - - -/****************************** - * GLINT Delta Core Registers * - ******************************/ - -#define V0FixedTag GLINT_TAG_ADDR(0x20,0x00) -#define V1FixedTag GLINT_TAG_ADDR(0x21,0x00) -#define V2FixedTag GLINT_TAG_ADDR(0x22,0x00) -#define V0FloatTag GLINT_TAG_ADDR(0x23,0x00) -#define V1FloatTag GLINT_TAG_ADDR(0x24,0x00) -#define V2FloatTag GLINT_TAG_ADDR(0x25,0x00) - -#define VPAR_s 0x00 -#define VPAR_t 0x08 -#define VPAR_q 0x10 -#define VPAR_Ks 0x18 -#define VPAR_Kd 0x20 - -/* have changed colors in ramdac ! -#define VPAR_R 0x28 -#define VPAR_G 0x30 -#define VPAR_B 0x38 -#define VPAR_A 0x40 -*/ -#define VPAR_B 0x28 -#define VPAR_G 0x30 -#define VPAR_R 0x38 -#define VPAR_A 0x40 - -#define VPAR_f 0x48 - -#define VPAR_x 0x50 -#define VPAR_y 0x58 -#define VPAR_z 0x60 - -#define DeltaModeTag GLINT_TAG_ADDR(0x26,0x00) - /* 0: */ - /* GLINT_300SX */ - - /* DeltaMode Register Bit Field Assignments */ -# define DM_GLINT_300SX 0x0000 -# define DM_GLINT_500TX 0x0001 -# define DM_PERMEDIA 0x0002 -# define DM_Depth_16BPP (1 << 2) -# define DM_Depth_24BPP (2 << 2) -# define DM_Depth_32BPP (3 << 2) -# define DM_FogEnable 0x0010 -# define DM_TextureEnable 0x0020 -# define DM_SmoothShadingEnable 0x0040 -# define DM_DepthEnable 0x0080 -# define DM_SpecularTextureEnable 0x0100 -# define DM_DiffuseTextureEnable 0x0200 -# define DM_SubPixelCorrectionEnable 0x0400 -# define DM_DiamondExit 0x0800 -# define DM_NoDraw 0x1000 -# define DM_ClampEnable 0x2000 -# define DM_ClampedTexParMode 0x4000 -# define DM_NormalizedTexParMode 0xC000 - - -# define DDCMD_AreaStrippleEnable 0x0001 -# define DDCMD_LineStrippleEnable 0x0002 -# define DDCMD_ResetLineStripple 1 << 2 -# define DDCMD_FastFillEnable 1 << 3 - /* 2 Bits reserved */ -# define DDCMD_PrimitiveType_Point 2 << 6 -# define DDCMD_PrimitiveType_Line 0 << 6 -# define DDCMD_PrimitiveType_Trapezoid 1 << 6 -# define DDCMD_AntialiasEnable 1 << 8 -# define DDCMD_AntialiasingQuality 1 << 9 -# define DDCMD_UsePointTable 1 << 10 -# define DDCMD_SyncOnBitMask 1 << 11 -# define DDCMD_SyncOnHostDate 1 << 12 -# define DDCMD_TextureEnable 1 << 13 -# define DDCMD_FogEnable 1 << 14 -# define DDCMD_CoverageEnable 1 << 15 -# define DDCMD_SubPixelCorrectionEnable 1 << 16 - - - -#define DrawTriangle GLINT_TAG_ADDR(0x26,0x01) -#define RepeatTriangle GLINT_TAG_ADDR(0x26,0x02) -#define DrawLine01 GLINT_TAG_ADDR(0x26,0x03) -#define DrawLine10 GLINT_TAG_ADDR(0x26,0x04) -#define RepeatLine GLINT_TAG_ADDR(0x26,0x05) -#define BroadcastMask GLINT_TAG_ADDR(0x26,0x0F) - -/* Permedia 3 - Accelerator Extensions */ -#define FillRectanglePosition 0x8348 -#define FillRender2D 0x8350 -#define FBDstReadBufAddr0 0xAE80 -#define FBDstReadBufOffset0 0xAEA0 -#define FBDstReadBufWidth0 0xAEC0 -#define FBDstReadMode 0xAEE0 -#define FBDRM_Enable0 1<<8 -#define FBDRM_Blocking 1<<24 -#define FBDstReadEnables 0xAEE8 -#define FBSrcReadMode 0xAF00 -#define FBSRM_Blocking 1<<11 -#define FBSrcReadBufAddr 0xAF08 -#define FBSrcReadBufOffset0 0xAF10 -#define FBSrcReadBufWidth 0xAF18 -#define FBWriteBufAddr0 0xB000 -#define FBWriteBufOffset0 0xB020 -#define FBWriteBufWidth0 0xB040 -#define FBBlockColorBack 0xB0A0 -#define ForegroundColor 0xB0C0 -#define BackgroundColor 0xB0C8 -#define RectanglePosition 0xB600 -#define Render2D 0xB640 - -/* Colorformats */ -#define BGR555 1 -#define BGR565 16 -#define CI8 14 -#define CI4 15 - -#if 0 - -#ifdef DEBUG -#define GLINT_WRITE_REG(v,r) \ - GLINT_VERB_WRITE_REG(pGlint,v,r,__FILE__,__LINE__) -#define GLINT_READ_REG(r) \ - GLINT_VERB_READ_REG(pGlint,r,__FILE__,__LINE__) -#else - -#define GLINT_WRITE_REG(v,r) \ - MMIO_OUT32(pGlint->IOBase + pGlint->IOOffset,(unsigned long)(r), (v)) -#define GLINT_READ_REG(r) \ - MMIO_IN32(pGlint->IOBase + pGlint->IOOffset,(unsigned long)(r)) - -#endif /* DEBUG */ - -#define GLINT_WAIT(n) \ -do{ \ - if (pGlint->InFifoSpace>=(n)) \ - pGlint->InFifoSpace -= (n); \ - else { \ - int tmp; \ - while((tmp=GLINT_READ_REG(InFIFOSpace))<(n)); \ - /* Clamp value due to bugs in PM3 */ \ - if (tmp > pGlint->FIFOSize) \ - tmp = pGlint->FIFOSize; \ - pGlint->InFifoSpace = tmp - (n); \ - } \ -}while(0) - -#define GLINTDACDelay(x) do { \ - int delay = x; \ - while(delay--){(void)GLINT_READ_REG(InFIFOSpace);}; \ - } while(0) - -#define GLINT_MASK_WRITE_REG(v,m,r) \ - GLINT_WRITE_REG((GLINT_READ_REG(r)&(m))|(v),r) - -#define GLINT_SLOW_WRITE_REG(v,r) \ -do{ \ - mem_barrier(); \ - GLINT_WAIT(pGlint->FIFOSize); \ - mem_barrier(); \ - GLINT_WRITE_REG(v,r); \ -}while(0) - -#define GLINT_SET_INDEX(index) \ -do{ \ - GLINT_SLOW_WRITE_REG(((index)>>8)&0xff,PM2VDACIndexRegHigh); \ - GLINT_SLOW_WRITE_REG((index)&0xff,PM2VDACIndexRegLow); \ -} while(0) - -#define REPLICATE(r) \ -{ \ - if (pScrn->bitsPerPixel == 16) { \ - r &= 0xFFFF; \ - r |= (r<<16); \ - } else \ - if (pScrn->bitsPerPixel == 8) { \ - r &= 0xFF; \ - r |= (r<<8); \ - r |= (r<<16); \ - } \ -} - -#ifndef XF86DRI -#define LOADROP(rop) \ -{ \ - if (pGlint->ROP != rop) { \ - GLINT_WRITE_REG(rop<<1|UNIT_ENABLE, LogicalOpMode); \ - pGlint->ROP = rop; \ - } \ -} -#else -#define LOADROP(rop) \ - { \ - GLINT_WRITE_REG(rop<<1|UNIT_ENABLE, LogicalOpMode); \ - pGlint->ROP = rop; \ - } -#endif - -#define CHECKCLIPPING \ -{ \ - if (pGlint->ClippingOn) { \ - pGlint->ClippingOn = FALSE; \ - GLINT_WAIT(1); \ - GLINT_WRITE_REG(0, ScissorMode); \ - } \ -} - -#ifndef XF86DRI -#define DO_PLANEMASK(planemask) \ -{ \ - if (planemask != pGlint->planemask) { \ - pGlint->planemask = planemask; \ - REPLICATE(planemask); \ - GLINT_WRITE_REG(planemask, FBHardwareWriteMask);\ - } \ -} -#else -#define DO_PLANEMASK(planemask) \ - { \ - pGlint->planemask = planemask; \ - REPLICATE(planemask); \ - GLINT_WRITE_REG(planemask, FBHardwareWriteMask);\ - } -#endif - -/* Permedia Save/Restore functions */ - -#define STOREREG(address,value) \ - pReg->glintRegs[address >> 3] = value; - -#define SAVEREG(address) \ - pReg->glintRegs[address >> 3] = GLINT_READ_REG(address); - -#define RESTOREREG(address) \ - GLINT_SLOW_WRITE_REG(pReg->glintRegs[address >> 3], address); - -#define STOREDAC(address,value) \ - pReg->DacRegs[address] = value; - -#define P2VOUT(address) \ - Permedia2vOutIndReg(pScrn, address, 0x00, pReg->DacRegs[address]); - -#define P2VIN(address) \ - pReg->DacRegs[address] = Permedia2vInIndReg(pScrn, address); - -/* RamDac Save/Restore functions, used by external DAC's */ - -#define STORERAMDAC(address,value) \ - ramdacReg->DacRegs[address] = value; - -/* Multi Chip access */ - -#define ACCESSCHIP1() \ - pGlint->IOOffset = 0; - -#define ACCESSCHIP2() \ - pGlint->IOOffset = 0x10000; - -#endif /* 0 */ - -#define GLINT_XY(x,y) (((x) & 0x0FFF) | (((y) & 0x0FFF) << 16)) - -#endif diff --git a/hw/kdrive/pm2/pm2.c b/hw/kdrive/pm2/pm2.c deleted file mode 100644 index 148f03abd..000000000 --- a/hw/kdrive/pm2/pm2.c +++ /dev/null @@ -1,295 +0,0 @@ -#ifdef HAVE_CONFIG_H -#include -#endif -#include "kdrive.h" -#include "kaa.h" - -#include "pm2.h" - -#define PARTPROD(a,b,c) (((a)<<6) | ((b)<<3) | (c)) - -char bppand[4] = { 0x03, /* 8bpp */ - 0x01, /* 16bpp */ - 0x00, /* 24bpp */ - 0x00 /* 32bpp */}; - -int partprodPermedia[] = { - -1, - PARTPROD(0,0,1), PARTPROD(0,1,1), PARTPROD(1,1,1), PARTPROD(1,1,2), - PARTPROD(1,2,2), PARTPROD(2,2,2), PARTPROD(1,2,3), PARTPROD(2,2,3), - PARTPROD(1,3,3), PARTPROD(2,3,3), PARTPROD(1,2,4), PARTPROD(3,3,3), - PARTPROD(1,3,4), PARTPROD(2,3,4), -1, PARTPROD(3,3,4), - PARTPROD(1,4,4), PARTPROD(2,4,4), -1, PARTPROD(3,4,4), - -1, PARTPROD(2,3,5), -1, PARTPROD(4,4,4), - PARTPROD(1,4,5), PARTPROD(2,4,5), PARTPROD(3,4,5), -1, - -1, -1, -1, PARTPROD(4,4,5), - PARTPROD(1,5,5), PARTPROD(2,5,5), -1, PARTPROD(3,5,5), - -1, -1, -1, PARTPROD(4,5,5), - -1, -1, -1, PARTPROD(3,4,6), - -1, -1, -1, PARTPROD(5,5,5), - PARTPROD(1,5,6), PARTPROD(2,5,6), -1, PARTPROD(3,5,6), - -1, -1, -1, PARTPROD(4,5,6), - -1, -1, -1, -1, - -1, -1, -1, PARTPROD(5,5,6), - -1, -1, -1, -1, - -1, -1, -1, -1, - -1, -1, -1, -1, - -1, -1, -1, -1, - -1, -1, -1, -1, - -1, -1, -1, -1, - -1, -1, -1, -1, - -1, -1, -1, -1, - -1, -1, -1, -1, - -1, -1, -1, -1, - -1, -1, -1, -1, - -1, -1, -1, -1, - -1, -1, -1, -1, - -1, -1, -1, -1, - -1, -1, -1, -1, - -1, -1, -1, -1, - 0}; - -static Bool -pmMapReg(KdCardInfo *card, PM2CardInfo *pm2c) -{ - pm2c->reg_base = (CARD8 *)KdMapDevice(PM2_REG_BASE(card), - PM2_REG_SIZE(card)); - - if (pm2c->reg_base == NULL) - return FALSE; - - KdSetMappedMode(PM2_REG_BASE(card), PM2_REG_SIZE(card), - KD_MAPPED_MODE_REGISTERS); - - return TRUE; -} - -static void -pmUnmapReg(KdCardInfo *card, PM2CardInfo *pm2c) -{ - if (pm2c->reg_base) { - KdResetMappedMode(PM2_REG_BASE(card), PM2_REG_SIZE(card), - KD_MAPPED_MODE_REGISTERS); - KdUnmapDevice((void *)pm2c->reg_base, PM2_REG_SIZE(card)); - pm2c->reg_base = 0; - } -} - -Bool -pmCardInit (KdCardInfo *card) -{ - PM2CardInfo *pm2c; - - pm2c = (PM2CardInfo *) xalloc (sizeof (PM2CardInfo)); - if (!pm2c) - return FALSE; - memset (pm2c, '\0', sizeof (PM2CardInfo)); - - (void) pmMapReg (card, pm2c); - - if (!vesaInitialize (card, &pm2c->vesa)) - { - xfree (pm2c); - return FALSE; - } - - pm2c->InFifoSpace = 0; - - card->driver = pm2c; - - return TRUE; -} - -static void -pmCardFini (KdCardInfo *card) -{ - PM2CardInfo *pm2c = (PM2CardInfo *) card->driver; - - pmUnmapReg (card, pm2c); - vesaCardFini (card); -} - -Bool -pmScreenInit (KdScreenInfo *screen) -{ - PM2CardInfo *pm2c = screen->card->driver; - PM2ScreenInfo *pm2s; - int screen_size, memory; - - pm2s = (PM2ScreenInfo *) xalloc (sizeof (PM2ScreenInfo)); - if (!pm2s) - return FALSE; - memset (pm2s, '\0', sizeof (PM2ScreenInfo)); - - if (!vesaScreenInitialize (screen, &pm2s->vesa)) - { - xfree (pm2s); - return FALSE; - } - - pm2c->pprod = partprodPermedia[screen->width >> 5]; - pm2c->bppalign = bppand[(screen->fb[0].bitsPerPixel>>3)-1]; - - pm2s->screen = pm2s->vesa.fb; - memory = pm2s->vesa.fb_size; - - screen_size = screen->fb[0].byteStride * screen->height; - - if (pm2s->screen && memory >= screen_size + 2048) - { - memory -= 2048; - pm2s->cursor_base = pm2s->screen + memory - 2048; - } - else - pm2s->cursor_base = 0; - memory -= screen_size; - if (memory > screen->fb[0].byteStride) - { - pm2s->off_screen = pm2s->screen + screen_size; - pm2s->off_screen_size = memory; - } - else - { - pm2s->off_screen = 0; - pm2s->off_screen_size = 0; - } - - switch (screen->fb[0].bitsPerPixel) { - case 8: - pm2c->BppShift = 2; - break; - case 16: - pm2c->BppShift = 1; - break; - case 24: - pm2c->BppShift = 2; - break; - case 32: - pm2c->BppShift = 0; - break; - } - - screen->driver = pm2s; - - return TRUE; -} - -static void -pmScreenFini (KdScreenInfo *screen) -{ - PM2ScreenInfo *pm2s = (PM2ScreenInfo *) screen->driver; - - vesaScreenFini (screen); - xfree (pm2s); - screen->driver = 0; -} - -static Bool -pmInitScreen (ScreenPtr pScreen) -{ - return vesaInitScreen (pScreen); -} - -#ifdef RANDR -static Bool -pmRandRSetConfig (ScreenPtr pScreen, - Rotation rotation, - int rate, - RRScreenSizePtr pSize) -{ - kaaWaitSync (pScreen); - - if (!vesaRandRSetConfig (pScreen, rotation, rate, pSize)) - return FALSE; - - return TRUE; -} - -static void -pmRandRInit (ScreenPtr pScreen) -{ - rrScrPriv(pScreen); - - pScrPriv->rrSetConfig = pmRandRSetConfig; -} -#endif - -static Bool -pmFinishInitScreen (ScreenPtr pScreen) -{ - Bool ret; - ret = vesaFinishInitScreen (pScreen); -#ifdef RANDR - pmRandRInit (pScreen); -#endif - return ret; -} - -static void -pmPreserve(KdCardInfo *card) -{ - vesaPreserve(card); -} - -static void -pmRestore(KdCardInfo *card) -{ - vesaRestore (card); -} - -static Bool -pmEnable (ScreenPtr pScreen) -{ - if (!vesaEnable (pScreen)) - return FALSE; - -#ifdef XV - KdXVEnable (pScreen); -#endif - - return TRUE; -} - -static void -pmDisable(ScreenPtr pScreen) -{ -#ifdef XV - KdXVDisable (pScreen); -#endif - vesaDisable (pScreen); -} - -static Bool -pmDPMS(ScreenPtr pScreen, int mode) -{ - return vesaDPMS (pScreen, mode); -} - -KdCardFuncs PM2Funcs = { - pmCardInit, /* cardinit */ - pmScreenInit, /* scrinit */ - pmInitScreen, /* initScreen */ - pmFinishInitScreen, /* finishInitScreen */ - vesaCreateResources, /* createRes */ - pmPreserve, /* preserve */ - pmEnable, /* enable */ - pmDPMS, /* dpms */ - pmDisable, /* disable */ - pmRestore, /* restore */ - pmScreenFini, /* scrfini */ - pmCardFini, /* cardfini */ - - 0, /* initCursor */ - 0, /* enableCursor */ - 0, /* disableCursor */ - 0, /* finiCursor */ - NULL, /* recolorCursor */ - - pmDrawInit, /* initAccel */ - pmDrawEnable, /* enableAccel */ - pmDrawDisable, /* disableAccel */ - pmDrawFini, /* finiAccel */ - - vesaGetColors, /* getColors */ - vesaPutColors, /* putColors */ -}; diff --git a/hw/kdrive/pm2/pm2.h b/hw/kdrive/pm2/pm2.h deleted file mode 100644 index e05903365..000000000 --- a/hw/kdrive/pm2/pm2.h +++ /dev/null @@ -1,162 +0,0 @@ -#ifndef _PM2_H_ -#define _PM2_H_ -#include -#include "kxv.h" -#include "klinux.h" - -#include "glint_regs.h" - -typedef volatile CARD8 VOL8; -typedef volatile CARD16 VOL16; -typedef volatile CARD32 VOL32; - -#define PM2_REG_BASE(c) ((c)->attr.address[0] & 0xFFFFC000) -#define PM2_REG_SIZE(c) (0x10000) - -typedef struct _PM2CardInfo { - VesaCardPrivRec vesa; - CARD8 *reg_base; - - int InFifoSpace; - int FIFOSize; - - int pprod; - int bppalign; - - int ClippingOn; - - int ROP; - - int x; - int y; - int w; - int h; - - int FrameBufferReadMode; - int BppShift; - int BltScanDirection; - - int RasterizerSwap; - int PixelWidth; - int TexMapFormat; - int startxdom; - int startxsub; - int starty; - int count; - int dy; - int dxdom; - - int planemask; -} PM2CardInfo; - -#define getPM2CardInfo(kd) ((PM2CardInfo *) ((kd)->card->driver)) -#define pmCardInfo(kd) PM2CardInfo *pm2c = getPM2CardInfo(kd) - -typedef struct _PM2ScreenInfo { - VesaScreenPrivRec vesa; - CARD8 *cursor_base; - CARD8 *screen; - CARD8 *off_screen; - int off_screen_size; - KdVideoAdaptorPtr pAdaptor; - KaaScreenInfoRec kaa; -} PM2ScreenInfo; - -#define getPM2ScreenInfo(kd) ((PM2ScreenInfo *) ((kd)->screen->driver)) -#define pmScreenInfo(kd) PM2ScreenInfo *pm2s = getPM2ScreenInfo(kd) - -Bool -pmCardInit (KdCardInfo *card); - -Bool -pmScreenInit (KdScreenInfo *screen); - -Bool -pmDrawInit(ScreenPtr); - -void -pmDrawEnable (ScreenPtr); - -void -pmDrawDisable (ScreenPtr); - -void -pmDrawFini (ScreenPtr); - - -extern KdCardFuncs PM2Funcs; - -#define MMIO_OUT32(base, offset, val) \ -do { \ - *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val); \ -} while (0) - -# define MMIO_IN32(base, offset) \ - *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) - -#define GLINT_WRITE_REG(v,r) \ - MMIO_OUT32(mmio,(unsigned long)(r), (v)) - -#define GLINT_READ_REG(r) \ - MMIO_IN32(mmio,(unsigned long)(r)) - -#define GLINT_SLOW_WRITE_REG(v,r) \ -do{ \ - GLINT_WAIT(card->FIFOSize); \ - GLINT_WRITE_REG(v,r); \ -}while(0) - -#define REPLICATE(r) \ -{ \ - if (pScreenPriv->screen->fb[0].bitsPerPixel == 16) { \ - r &= 0xFFFF; \ - r |= (r<<16); \ - } else \ - if (pScreenPriv->screen->fb[0].bitsPerPixel == 8) { \ - r &= 0xFF; \ - r |= (r<<8); \ - r |= (r<<16); \ - } \ -} - -#define DO_PLANEMASK(planemask) \ -{ \ - if (planemask != card->planemask) { \ - card->planemask = planemask; \ - REPLICATE(planemask); \ - GLINT_WRITE_REG(planemask, FBHardwareWriteMask);\ - } \ -} - -#define LOADROP(rop) \ -{ \ - if (card->ROP != rop) { \ - GLINT_WRITE_REG(rop<<1|UNIT_ENABLE, LogicalOpMode); \ - card->ROP = rop; \ - } \ -} - -#define GLINT_WAIT(n) \ -do{ \ - if (card->InFifoSpace>=(n)) \ - card->InFifoSpace -= (n); \ - else { \ - int tmp; \ - while((tmp=GLINT_READ_REG(InFIFOSpace))<(n)); \ - /* Clamp value due to bugs in PM3 */ \ - if (tmp > card->FIFOSize) \ - tmp = card->FIFOSize; \ - card->InFifoSpace = tmp - (n); \ - } \ -}while(0) - -#define CHECKCLIPPING \ -{ \ - if (card->ClippingOn) { \ - card->ClippingOn = FALSE; \ - GLINT_WAIT(1); \ - GLINT_WRITE_REG(0, ScissorMode); \ - } \ -} - -#endif /* _PM2_H_ */ diff --git a/hw/kdrive/pm2/pm2_draw.c b/hw/kdrive/pm2/pm2_draw.c deleted file mode 100644 index 332fc8c8a..000000000 --- a/hw/kdrive/pm2/pm2_draw.c +++ /dev/null @@ -1,318 +0,0 @@ -#ifdef HAVE_CONFIG_H -#include -#endif -#include "kdrive.h" -#include "kaa.h" - -#include "pm2.h" - -static PM2CardInfo *card; -static VOL8 *mmio; - -static void Permedia2LoadCoord(int x, int y, int w, int h); - -static void -pmWaitMarker (ScreenPtr pScreen, int marker) -{ - CHECKCLIPPING; - - while (GLINT_READ_REG(DMACount) != 0); - GLINT_WAIT(2); - GLINT_WRITE_REG(0x400, FilterMode); - GLINT_WRITE_REG(0, GlintSync); - do { - while(GLINT_READ_REG(OutFIFOWords) == 0); - } while (GLINT_READ_REG(OutputFIFO) != Sync_tag); -} - -static Bool -pmPrepareSolid (PixmapPtr pPixmap, - int rop, - Pixel planemask, - Pixel color) -{ - ScreenPtr pScreen = pPixmap->drawable.pScreen; - KdScreenPriv(pScreen); - pmCardInfo(pScreenPriv); - - card = pm2c; - mmio = pm2c->reg_base; - - if (~planemask & FbFullMask(pPixmap->drawable.depth)) - return FALSE; - - REPLICATE(color); - - GLINT_WAIT(6); - DO_PLANEMASK(planemask); - if (rop == GXcopy) { - GLINT_WRITE_REG(UNIT_DISABLE, ColorDDAMode); - GLINT_WRITE_REG(card->pprod, FBReadMode); - GLINT_WRITE_REG(color, FBBlockColor); - } else { - GLINT_WRITE_REG(UNIT_ENABLE, ColorDDAMode); - GLINT_WRITE_REG(color, ConstantColor); - /* We can use Packed mode for filling solid non-GXcopy rasters */ - GLINT_WRITE_REG(card->pprod|FBRM_DstEnable|FBRM_Packed, FBReadMode); - } - LOADROP(rop); - - return TRUE; -} - -static void -pmSolid (int x1, int y1, int x2, int y2) -{ - int speed = 0; - - if (card->ROP == GXcopy) { - GLINT_WAIT(3); - Permedia2LoadCoord(x1, y1, x2-x1, y2-y1); - speed = FastFillEnable; - } else { - GLINT_WAIT(4); - Permedia2LoadCoord(x1>>card->BppShift, y1, - ((x2-x1)+7)>>card->BppShift, y2-y1); - GLINT_WRITE_REG(x1<<16|(x1+(x2-x1)), PackedDataLimits); - speed = 0; - } - GLINT_WRITE_REG(PrimitiveRectangle | XPositive | YPositive | speed, Render); -} - -static void -pmDoneSolid (void) -{ -} - -static Bool -pmPrepareCopy (PixmapPtr pSrcPixmap, - PixmapPtr pDstPixmap, - int dx, - int dy, - int rop, - Pixel planemask) -{ - ScreenPtr pScreen = pDstPixmap->drawable.pScreen; - KdScreenPriv(pScreen); - pmCardInfo(pScreenPriv); - - card = pm2c; - mmio = pm2c->reg_base; - - if (~planemask & FbFullMask(pDstPixmap->drawable.depth)) - return FALSE; - - card->BltScanDirection = ((dx >= 0 ? XPositive : 0) | (dy >= 0 ? YPositive : 0)); - - GLINT_WAIT(4); - DO_PLANEMASK(planemask); - - GLINT_WRITE_REG(UNIT_DISABLE, ColorDDAMode); - if ((rop == GXset) || (rop == GXclear)) { - card->FrameBufferReadMode = card->pprod; - } else - if ((rop == GXcopy) || (rop == GXcopyInverted)) { - card->FrameBufferReadMode = card->pprod |FBRM_SrcEnable; - } else { - card->FrameBufferReadMode = card->pprod | FBRM_SrcEnable | - FBRM_DstEnable; - } - LOADROP(rop); - - return TRUE; -} - - -static void -pmCopy (int x1, - int y1, - int x2, - int y2, - int w, - int h) -{ - char align; - - /* We can only use GXcopy for Packed modes */ - if (card->ROP != GXcopy) { - GLINT_WAIT(5); - GLINT_WRITE_REG(card->FrameBufferReadMode, FBReadMode); - Permedia2LoadCoord(x2, y2, w, h); - GLINT_WRITE_REG(((y1-y2)&0x0FFF)<<16 | ((x1-x2)&0x0FFF), FBSourceDelta); - } else { - align = (x2 & card->bppalign) - (x1 & card->bppalign); - GLINT_WAIT(6); - GLINT_WRITE_REG(card->FrameBufferReadMode|FBRM_Packed, FBReadMode); - Permedia2LoadCoord(x2>>card->BppShift, y2, - (w+7)>>card->BppShift, h); - GLINT_WRITE_REG(align<<29|x2<<16|(x2+w), PackedDataLimits); - GLINT_WRITE_REG(((y1-y2)&0x0FFF)<<16 | (((x1 & ~card->bppalign)-(x2 & ~card->bppalign))&0x0FFF), FBSourceDelta); - } - - GLINT_WRITE_REG(PrimitiveRectangle | card->BltScanDirection, Render); -} - - -static void -pmDoneCopy (void) -{ -} - -static void -Permedia2LoadCoord(int x, int y, - int w, int h) -{ - if ((h != card->h) || (w != card->w)) { - card->w = w; - card->h = h; - GLINT_WRITE_REG(((h&0x0FFF)<<16)|(w&0x0FFF), RectangleSize); - } - if ((y != card->y) || (x != card->x)) { - card->x = x; - card->y = y; - GLINT_WRITE_REG(((y&0x0FFF)<<16)|(x&0x0FFF), RectangleOrigin); - } -} - - -Bool -pmDrawInit (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - pmCardInfo(pScreenPriv); - pmScreenInfo(pScreenPriv); - Bool ret = TRUE; - - card = pm2c; - mmio = pm2c->reg_base; - - memset(&pm2s->kaa, 0, sizeof(KaaScreenInfoRec)); - pm2s->kaa.waitMarker = pmWaitMarker; - pm2s->kaa.PrepareSolid = pmPrepareSolid; - pm2s->kaa.Solid = pmSolid; - pm2s->kaa.DoneSolid = pmDoneSolid; - pm2s->kaa.PrepareCopy = pmPrepareCopy; - pm2s->kaa.Copy = pmCopy; - pm2s->kaa.DoneCopy = pmDoneCopy; - - if (ret && !kaaDrawInit (pScreen, &pm2s->kaa)) - { - ErrorF ("kaaDrawInit failed\n"); - ret = FALSE; - } - - return ret; -} - - -void -pmDrawEnable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - pmCardInfo(pScreenPriv); - - card = pm2c; - mmio = pm2c->reg_base; - - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, ScissorMode); - GLINT_SLOW_WRITE_REG(UNIT_ENABLE, FBWriteMode); - GLINT_SLOW_WRITE_REG(0, dXSub); - GLINT_SLOW_WRITE_REG(GWIN_DisableLBUpdate, GLINTWindow); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, DitherMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, AlphaBlendMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, ColorDDAMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, TextureColorMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, TextureAddressMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, PMTextureReadMode); - GLINT_SLOW_WRITE_REG(card->pprod, LBReadMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, AlphaBlendMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, TexelLUTMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, YUVMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, DepthMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, RouterMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, FogMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, AntialiasMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, AlphaTestMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, StencilMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, AreaStippleMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, LogicalOpMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, DepthMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, StatisticMode); - GLINT_SLOW_WRITE_REG(0x400, FilterMode); - GLINT_SLOW_WRITE_REG(0xffffffff, FBHardwareWriteMask); - GLINT_SLOW_WRITE_REG(0xffffffff, FBSoftwareWriteMask); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, RasterizerMode); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, GLINTDepth); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, FBSourceOffset); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, FBPixelOffset); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, LBSourceOffset); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, WindowOrigin); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, FBWindowBase); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, FBSourceBase); - GLINT_SLOW_WRITE_REG(UNIT_DISABLE, LBWindowBase); - -#if X_BYTE_ORDER == X_BIG_ENDIAN - card->RasterizerSwap = 1; -#else - card->RasterizerSwap = 0; -#endif - - switch (pScreenPriv->screen->fb[0].bitsPerPixel) { - case 8: - card->PixelWidth = 0x0; /* 8 Bits */ - card->TexMapFormat = card->pprod; -#if X_BYTE_ORDER == X_BIG_ENDIAN - card->RasterizerSwap |= 3<<15; /* Swap host data */ -#endif - break; - case 16: - card->PixelWidth = 0x1; /* 16 Bits */ - card->TexMapFormat = card->pprod | 1<<19; -#if X_BYTE_ORDER == X_BIG_ENDIAN - card->RasterizerSwap |= 2<<15; /* Swap host data */ -#endif - break; - case 24: - card->PixelWidth = 0x4; /* 24 Bits */ - card->TexMapFormat = card->pprod | 2<<19; - break; - case 32: - card->PixelWidth = 0x2; /* 32 Bits */ - card->TexMapFormat = card->pprod | 2<<19; - break; - } - card->ClippingOn = FALSE; - card->startxdom = 0; - card->startxsub = 0; - card->starty = 0; - card->count = 0; - card->dy = 1<<16; - card->dxdom = 0; - card->x = 0; - card->y = 0; - card->h = 0; - card->w = 0; - card->ROP = 0xFF; - GLINT_SLOW_WRITE_REG(card->PixelWidth, FBReadPixel); - GLINT_SLOW_WRITE_REG(card->TexMapFormat, PMTextureMapFormat); - GLINT_SLOW_WRITE_REG(0, RectangleSize); - GLINT_SLOW_WRITE_REG(0, RectangleOrigin); - GLINT_SLOW_WRITE_REG(0, dXDom); - GLINT_SLOW_WRITE_REG(1<<16, dY); - GLINT_SLOW_WRITE_REG(0, StartXDom); - GLINT_SLOW_WRITE_REG(0, StartXSub); - GLINT_SLOW_WRITE_REG(0, StartY); - GLINT_SLOW_WRITE_REG(0, GLINTCount); - - kaaMarkSync (pScreen); -} - -void -pmDrawDisable (ScreenPtr pScreen) -{ -} - -void -pmDrawFini (ScreenPtr pScreen) -{ -} diff --git a/hw/kdrive/pm2/pm2stub.c b/hw/kdrive/pm2/pm2stub.c deleted file mode 100644 index 1f824b347..000000000 --- a/hw/kdrive/pm2/pm2stub.c +++ /dev/null @@ -1,54 +0,0 @@ -#ifdef HAVE_CONFIG_H -#include -#endif -#include "kdrive.h" -#include "klinux.h" - -#include "pm2.h" - -static const int PM2Cards[]={ PCI_CHIP_3DLABS_PERMEDIA2, PCI_CHIP_3DLABS_PERMEDIA2V }; - - -#define numPM2Cards (sizeof(PM2Cards) / sizeof(PM2Cards[0])) - -void -InitCard (char *name) -{ - KdCardAttr attr; - int i; - - for (i = 0; i < numPM2Cards; i++) - if (LinuxFindPci (0x3d3d, PM2Cards[i], 0, &attr)) - KdCardInfoAdd (&PM2Funcs, &attr, (void *) PM2Cards[i]); -} - - -void -InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) -{ - KdInitOutput (pScreenInfo, argc, argv); -} - -void -InitInput (int argc, char **argv) -{ - KdOsAddInputDrivers (); - KdInitInput (); -} - -void -ddxUseMsg (void) -{ - KdUseMsg(); - vesaUseMsg(); -} - -int -ddxProcessArgument (int argc, char **argv, int i) -{ - int ret; - - if (!(ret = vesaProcessArgument (argc, argv, i))) - ret = KdProcessArgument(argc, argv, i); - return ret; -} diff --git a/hw/kdrive/r128/Makefile.am b/hw/kdrive/r128/Makefile.am deleted file mode 100644 index 344fbebf7..000000000 --- a/hw/kdrive/r128/Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -INCLUDES = \ - @KDRIVE_INCS@ \ - -I$(top_srcdir)/hw/kdrive/vesa \ - @KDRIVE_CFLAGS@ - -bin_PROGRAMS = Xr128 - -noinst_LIBRARIES = libr128.a - -libr128_a_SOURCES = \ - r128draw.c \ - r128.c \ - r128.h - -Xr128_SOURCES = \ - r128stub.c - -R128_LIBS = \ - libr128.a \ - $(top_builddir)/hw/kdrive/vesa/libvesa.a \ - @KDRIVE_LIBS@ - -if GLX -Xr128_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -endif - -Xr128_LDADD = \ - $(R128_LIBS) \ - @KDRIVE_LIBS@ - -Xr128_DEPENDENCIES = \ - libr128.a \ - @KDRIVE_LOCAL_LIBS@ - -relink: - rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS) diff --git a/hw/kdrive/r128/r128.c b/hw/kdrive/r128/r128.c deleted file mode 100644 index 9e7f312e0..000000000 --- a/hw/kdrive/r128/r128.c +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Copyright © 2003 Anders Carlsson - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Anders Carlsson not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Anders Carlsson makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ANDERS CARLSSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ANDERS CARLSSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -#ifdef HAVE_CONFIG_H -#include -#endif -#include "r128.h" - -static Bool -r128CardInit (KdCardInfo *card) -{ - R128CardInfo *r128c; - - r128c = (R128CardInfo *) xalloc (sizeof (R128CardInfo)); - if (!r128c) - return FALSE; - - r128MapReg (card, r128c); - - if (!vesaInitialize (card, &r128c->vesa)) - { - xfree (r128c); - return FALSE; - } - - r128c->fifo_size = 0; - - card->driver = r128c; - - return TRUE; -} - -static Bool -r128ScreenInit (KdScreenInfo *screen) -{ - R128ScreenInfo *r128s; - int screen_size, memory; - - r128s = (R128ScreenInfo *) xalloc (sizeof (R128ScreenInfo)); - if (!r128s) - return FALSE; - memset (r128s, '\0', sizeof (R128ScreenInfo)); - if (!vesaScreenInitialize (screen, &r128s->vesa)) - { - xfree (r128s); - return FALSE; - } -#if 0 - /* if (!r128c->reg) - screen->dumb = TRUE; */ - - if (r128s->vesa.mapping != VESA_LINEAR) - screen->dumb = TRUE; - - fprintf (stderr, "vesa mapping is %d\n", r128s->vesa.mapping); -#endif - r128s->screen = r128s->vesa.fb; - - memory = r128s->vesa.fb_size; - screen_size = screen->fb[0].byteStride * screen->height; - - memory -= screen_size; - if (memory > screen->fb[0].byteStride) - { - r128s->off_screen = r128s->screen + screen_size; - r128s->off_screen_size = memory; - } - else - { - r128s->off_screen = 0; - r128s->off_screen_size = 0; - } - screen->driver = r128s; - return TRUE; -} - -static Bool -r128InitScreen (ScreenPtr pScreen) -{ - return vesaInitScreen (pScreen); -} - -static Bool -r128FinishInitScreen (ScreenPtr pScreen) -{ - Bool ret; - - ret = vesaFinishInitScreen (pScreen); - - return ret; -} - -static void -r128Preserve (KdCardInfo *card) -{ - vesaPreserve (card); -} - -Bool -r128MapReg (KdCardInfo *card, R128CardInfo *r128c) -{ - r128c->reg_base = (CARD8 *) KdMapDevice (R128_REG_BASE (card), - R128_REG_SIZE (card)); - - if (!r128c->reg_base) - { - return FALSE; - } - - KdSetMappedMode (R128_REG_BASE (card), - R128_REG_SIZE (card), - KD_MAPPED_MODE_REGISTERS); - - return TRUE; -} - -void -r128UnmapReg (KdCardInfo *card, R128CardInfo *r128c) -{ - if (r128c->reg_base) - { - KdResetMappedMode (R128_REG_BASE (card), - R128_REG_SIZE (card), - KD_MAPPED_MODE_REGISTERS); - KdUnmapDevice ((void *) r128c->reg_base, R128_REG_SIZE (card)); - r128c->reg_base = 0; - } -} - -void -r128SetMMIO (KdCardInfo *card, R128CardInfo *r128c) -{ - if (!r128c->reg_base) - r128MapReg (card, r128c); -} - -void -r128ResetMMIO (KdCardInfo *card, R128CardInfo *r128c) -{ - r128UnmapReg (card, r128c); -} - - -static Bool -r128DPMS (ScreenPtr pScreen, int mode) -{ - /* XXX */ - return TRUE; -} - -static Bool -r128Enable (ScreenPtr pScreen) -{ - KdScreenPriv (pScreen); - R128CardInfo *r128c = pScreenPriv->card->driver; - - if (!vesaEnable (pScreen)) - return FALSE; - - r128SetMMIO (pScreenPriv->card, r128c); - r128DPMS (pScreen, KD_DPMS_NORMAL); - - return TRUE; -} - -static void -r128Disable (ScreenPtr pScreen) -{ - KdScreenPriv (pScreen); - R128CardInfo *r128c = pScreenPriv->card->driver; - - r128ResetMMIO (pScreenPriv->card, r128c); - vesaDisable (pScreen); -} - -static void -r128Restore (KdCardInfo *card) -{ - R128CardInfo *r128c = card->driver; - - r128ResetMMIO (card, r128c); - vesaRestore (card); -} - -static void -r128ScreenFini (KdScreenInfo *screen) -{ - R128ScreenInfo *r128s = (R128ScreenInfo *) screen->driver; - - vesaScreenFini (screen); - xfree (r128s); - screen->driver = 0; -} - -static void -r128CardFini (KdCardInfo *card) -{ - R128CardInfo *r128c = (R128CardInfo *)card->driver; - - r128UnmapReg (card, r128c); - vesaCardFini (card); -} - -KdCardFuncs r128Funcs = { - r128CardInit, /* cardinit */ - r128ScreenInit, /* scrinit */ - r128InitScreen, /* initScreen */ - r128FinishInitScreen, /* finishInitScreen */ - vesaCreateResources,/* createRes */ - r128Preserve, /* preserve */ - r128Enable, /* enable */ - r128DPMS, /* dpms */ - r128Disable, /* disable */ - r128Restore, /* restore */ - r128ScreenFini, /* scrfini */ - r128CardFini, /* cardfini */ - - 0, /* initCursor */ - 0, /* enableCursor */ - 0, /* disableCursor */ - 0, /* finiCursor */ - 0, /* recolorCursor */ - - r128DrawInit, /* initAccel */ - r128DrawEnable, /* enableAccel */ - r128DrawDisable, /* disableAccel */ - r128DrawFini, /* finiAccel */ - - vesaGetColors, /* getColors */ - vesaPutColors, /* putColors */ -}; - diff --git a/hw/kdrive/r128/r128.h b/hw/kdrive/r128/r128.h deleted file mode 100644 index ae9ae03aa..000000000 --- a/hw/kdrive/r128/r128.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright © 2003 Anders Carlsson - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Anders Carlsson not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Anders Carlsson makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ANDERS CARLSSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ANDERS CARLSSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _R128_H_ -#define _R128_H_ -#include - -#define R128_REG_BASE(c) ((c)->attr.address[1]) -#define R128_REG_SIZE(c) (0x4000) - -#define R128_OUT32(mmio, a, v) (*(VOL32 *) ((mmio) + (a)) = (v)) -#define R128_IN32(mmio, a) (*(VOL32 *) ((mmio) + (a))) - -#define R128_REG_GUI_STAT 0x1740 -#define R128_REG_DEFAULT_OFFSET 0x16e0 -#define R128_REG_DEFAULT_PITCH 0x16e4 -#define R128_REG_DP_GUI_MASTER_CNTL 0x146c -#define R128_REG_DP_BRUSH_FRGD_CLR 0x147c -#define R128_REG_DP_WRITE_MASK 0x16cc -#define R128_REG_DP_CNTL 0x16c0 -#define R128_REG_DST_WIDTH_HEIGHT 0x1598 -#define R128_REG_DST_Y_X 0x1438 -#define R128_REG_PC_NGUI_CTLSTAT 0x0184 -#define R128_REG_DST_HEIGHT_WIDTH 0x143c -#define R128_REG_SRC_Y_X 0x1434 -#define R128_DEFAULT_SC_BOTTOM_RIGHT 0x16e8 -#define R128_AUX_SC_CNTL 0x1660 -#define R128_SC_TOP_LEFT 0x16ec -#define R128_SC_BOTTOM_RIGHT 0x16f0 - -#define R128_GMC_DST_DATATYPE_SHIFT 8 -#define R128_GMC_CLR_CMP_CNTL_DIS (1 << 28) -#define R128_GMC_AUX_CLIP_DIS (1 << 29) -#define R128_GMC_BRUSH_SOLID_COLOR (13 << 4) -#define R128_GMC_SRC_DATATYPE_COLOR (3 << 12) -#define R128_GMC_ROP3_SHIFT 16 -#define R128_DST_X_LEFT_TO_RIGHT (1 << 0) -#define R128_DST_Y_TOP_TO_BOTTOM (1 << 1) -#define R128_GUI_ACTIVE (1 << 31) -#define R128_PC_BUSY (1 << 31) -#define R128_DP_SRC_SOURCE_MEMORY (2 << 24) -#define R128_DEFAULT_SC_RIGHT_MAX (0x1fff << 0) -#define R128_DEFAULT_SC_BOTTOM_MAX (0x1fff << 16) - -typedef volatile CARD8 VOL8; -typedef volatile CARD16 VOL16; -typedef volatile CARD32 VOL32; - -typedef struct _r128CardInfo { - VesaCardPrivRec vesa; - CARD8 *reg_base; - int fifo_size; -} R128CardInfo; - -#define getR128CardInfo(kd) ((R128CardInfo *) ((kd)->card->driver)) -#define r128CardInfo(kd) R128CardInfo *r128c = getR128CardInfo(kd) - -typedef struct _r128ScreenInfo { - VesaScreenPrivRec vesa; - CARD8 *screen; - CARD8 *off_screen; - int off_screen_size; - - KaaScreenInfoRec kaa; - - int pitch; - int datatype; - - int dp_gui_master_cntl; -} R128ScreenInfo; - -#define getR128ScreenInfo(kd) ((R128ScreenInfo *) ((kd)->screen->driver)) -#define r128ScreenInfo(kd) R128ScreenInfo *r128s = getR128ScreenInfo(kd) - -Bool -r128MapReg (KdCardInfo *card, R128CardInfo *r128c); - -void -r128UnmapReg (KdCardInfo *card, R128CardInfo *r128c); - -void -r128SetMMIO (KdCardInfo *card, R128CardInfo *r128c); - -void -r128ResetMMIO (KdCardInfo *card, R128CardInfo *r128c); - -Bool -r128DrawSetup (ScreenPtr pScreen); - -Bool -r128DrawInit (ScreenPtr pScreen); - -void -r128DrawEnable (ScreenPtr pScreen); - -void -r128DrawDisable (ScreenPtr pScreen); - -void -r128DrawFini (ScreenPtr pScreen); - -extern KdCardFuncs r128Funcs; - -#endif /* _R128_H_ */ diff --git a/hw/kdrive/r128/r128draw.c b/hw/kdrive/r128/r128draw.c deleted file mode 100644 index 142cc8b3e..000000000 --- a/hw/kdrive/r128/r128draw.c +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Copyright © 2003 Anders Carlsson - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Anders Carlsson not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Anders Carlsson makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ANDERS CARLSSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ANDERS CARLSSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -#ifdef HAVE_CONFIG_H -#include -#endif -#include "r128.h" -#include "kaa.h" - -CARD8 r128SolidRop[16] = { - /* GXclear */ 0x00, /* 0 */ - /* GXand */ 0xa0, /* src AND dst */ - /* GXandReverse */ 0x50, /* src AND NOT dst */ - /* GXcopy */ 0xf0, /* src */ - /* GXandInverted*/ 0x0a, /* NOT src AND dst */ - /* GXnoop */ 0xaa, /* dst */ - /* GXxor */ 0x5a, /* src XOR dst */ - /* GXor */ 0xfa, /* src OR dst */ - /* GXnor */ 0x05, /* NOT src AND NOT dst */ - /* GXequiv */ 0xa5, /* NOT src XOR dst */ - /* GXinvert */ 0x55, /* NOT dst */ - /* GXorReverse */ 0xf5, /* src OR NOT dst */ - /* GXcopyInverted*/ 0x0f, /* NOT src */ - /* GXorInverted */ 0xaf, /* NOT src OR dst */ - /* GXnand */ 0x5f, /* NOT src OR NOT dst */ - /* GXset */ 0xff, /* 1 */ -}; - -CARD8 r128BltRop[16] = { - /* GXclear */ 0x00, /* 0 */ - /* GXand */ 0x88, /* src AND dst */ - /* GXandReverse */ 0x44, /* src AND NOT dst */ - /* GXcopy */ 0xcc, /* src */ - /* GXandInverted*/ 0x22, /* NOT src AND dst */ - /* GXnoop */ 0xaa, /* dst */ - /* GXxor */ 0x66, /* src XOR dst */ - /* GXor */ 0xee, /* src OR dst */ - /* GXnor */ 0x11, /* NOT src AND NOT dst */ - /* GXequiv */ 0x99, /* NOT src XOR dst */ - /* GXinvert */ 0x55, /* NOT dst */ - /* GXorReverse */ 0xdd, /* src OR NOT dst */ - /* GXcopyInverted*/ 0x33, /* NOT src */ - /* GXorInverted */ 0xbb, /* NOT src OR dst */ - /* GXnand */ 0x77, /* NOT src OR NOT dst */ - /* GXset */ 0xff, /* 1 */ -}; - -int copydx, copydy; -int fifo_size; -char *mmio; - -static void -r128WaitAvail (int n) -{ - if (fifo_size < n) - { - while ((fifo_size = R128_IN32 (mmio, R128_REG_GUI_STAT) & 0xfff) < n) - ; - } - - fifo_size -= n; -} - -static void -r128WaitIdle (void) -{ - int tries; - - r128WaitAvail (64); - - tries = 1000000; - while (tries--) - { - if ((R128_IN32 (mmio, R128_REG_GUI_STAT) & R128_GUI_ACTIVE) == 0) - break; - } - - R128_OUT32 (mmio, R128_REG_PC_NGUI_CTLSTAT, - R128_IN32 (mmio, R128_REG_PC_NGUI_CTLSTAT | 0xff)); - - tries = 1000000; - while (tries--) - { - if ((R128_IN32 (mmio, R128_REG_PC_NGUI_CTLSTAT) & R128_PC_BUSY) != R128_PC_BUSY) - break; - } - -} - -static void -r128WaitMarker (ScreenPtr pScreen, int marker) -{ - KdScreenPriv (pScreen); - r128CardInfo (pScreenPriv); - - mmio = r128c->reg_base; - - r128WaitIdle (); -} - -static Bool -r128Setup (ScreenPtr pScreen, int wait) -{ - KdScreenPriv (pScreen); - r128ScreenInfo (pScreenPriv); - r128CardInfo (pScreenPriv); - - fifo_size = 0; - - mmio = r128c->reg_base; - - if (!mmio) - return FALSE; - - r128WaitAvail (2); - R128_OUT32 (mmio, R128_REG_DEFAULT_OFFSET, 0); - R128_OUT32 (mmio, R128_REG_DEFAULT_PITCH, r128s->pitch); - - r128WaitAvail (4); - R128_OUT32 (mmio, R128_AUX_SC_CNTL, 0); - R128_OUT32 (mmio, R128_DEFAULT_SC_BOTTOM_RIGHT, (R128_DEFAULT_SC_RIGHT_MAX - | R128_DEFAULT_SC_BOTTOM_MAX)); - R128_OUT32 (mmio, R128_SC_TOP_LEFT, 0); - R128_OUT32 (mmio, R128_SC_BOTTOM_RIGHT, (R128_DEFAULT_SC_RIGHT_MAX - | R128_DEFAULT_SC_BOTTOM_MAX)); - r128WaitAvail (wait); - return TRUE; -} - -static Bool -r128PrepareSolid (PixmapPtr pPixmap, int alu, Pixel pm, Pixel fg) -{ - KdScreenPriv (pPixmap->drawable.pScreen); - r128ScreenInfo (pScreenPriv); - - r128Setup (pPixmap->drawable.pScreen, 4); - R128_OUT32 (mmio, R128_REG_DP_GUI_MASTER_CNTL, r128s->dp_gui_master_cntl - | R128_GMC_BRUSH_SOLID_COLOR - | R128_GMC_SRC_DATATYPE_COLOR - | (r128SolidRop[alu] << R128_GMC_ROP3_SHIFT)); - R128_OUT32 (mmio, R128_REG_DP_BRUSH_FRGD_CLR, fg); - R128_OUT32 (mmio, R128_REG_DP_WRITE_MASK, pm); - R128_OUT32 (mmio, R128_REG_DP_CNTL, - (R128_DST_X_LEFT_TO_RIGHT | R128_DST_Y_TOP_TO_BOTTOM)); - - return TRUE; -} - -static void -r128Solid (int x1, int y1, int x2, int y2) -{ - r128WaitAvail (2); - R128_OUT32 (mmio, R128_REG_DST_Y_X, (y1 << 16) | x1); - R128_OUT32 (mmio, R128_REG_DST_WIDTH_HEIGHT, ((x2 - x1) << 16) | (y2 - y1)); - -} - -static void -r128DoneSolid (void) -{ -} - -static Bool -r128PrepareCopy (PixmapPtr pSrc, PixmapPtr pDst, int dx, int dy, int alu, Pixel pm) -{ - KdScreenPriv (pSrc->drawable.pScreen); - r128ScreenInfo (pScreenPriv); - - copydx = dx; - copydy = dy; - - r128Setup (pSrc->drawable.pScreen, 3); - R128_OUT32 (mmio, R128_REG_DP_GUI_MASTER_CNTL, r128s->dp_gui_master_cntl - | R128_GMC_BRUSH_SOLID_COLOR - | R128_GMC_SRC_DATATYPE_COLOR - | (r128BltRop[alu] << R128_GMC_ROP3_SHIFT) - | R128_DP_SRC_SOURCE_MEMORY); - R128_OUT32 (mmio, R128_REG_DP_WRITE_MASK, pm); - R128_OUT32 (mmio, R128_REG_DP_CNTL, - ((dx >= 0 ? R128_DST_X_LEFT_TO_RIGHT : 0) - | (dy >= 0 ? R128_DST_Y_TOP_TO_BOTTOM : 0))); - - - return TRUE; -} - -static void -r128Copy (int srcX, int srcY, int dstX, int dstY, int w, int h) -{ - if (copydx < 0) - { - srcX += w - 1; - dstX += w - 1; - } - - if (copydy < 0) - { - srcY += h - 1; - dstY += h - 1; - } - - r128WaitAvail (3); - R128_OUT32 (mmio, R128_REG_SRC_Y_X, (srcY << 16) | srcX); - R128_OUT32 (mmio, R128_REG_DST_Y_X, (dstY << 16) | dstX); - R128_OUT32 (mmio, R128_REG_DST_HEIGHT_WIDTH, (h << 16) | w); -} - -static void -r128DoneCopy (void) -{ -} - - -Bool -r128DrawInit (ScreenPtr pScreen) -{ - KdScreenPriv (pScreen); - r128ScreenInfo (pScreenPriv); - - memset(&r128s->kaa, 0, sizeof(KaaScreenInfoRec)); - r128s->kaa.waitMarker = r128WaitMarker; - r128s->kaa.PrepareSolid = r128PrepareSolid; - r128s->kaa.Solid = r128Solid; - r128s->kaa.DoneSolid = r128DoneSolid; - r128s->kaa.PrepareCopy = r128PrepareCopy; - r128s->kaa.Copy = r128Copy; - r128s->kaa.DoneCopy = r128DoneCopy; - - if (!kaaDrawInit (pScreen, &r128s->kaa)) - return FALSE; - - return TRUE; -} - -void -r128DrawEnable (ScreenPtr pScreen) -{ - KdScreenPriv (pScreen); - r128ScreenInfo (pScreenPriv); - - r128s->pitch = pScreenPriv->screen->width >> 3; - - switch (pScreenPriv->screen->fb[0].depth) { - case 8: - r128s->datatype = 2; - break; - case 15: - r128s->datatype = 3; - break; - case 16: - r128s->datatype = 4; - break; - case 24: - r128s->datatype = 5; - break; - case 32: - r128s->datatype = 6; - break; - default: - FatalError ("unsupported pixel format"); - } - - r128s->dp_gui_master_cntl = ((r128s->datatype << R128_GMC_DST_DATATYPE_SHIFT) - | R128_GMC_CLR_CMP_CNTL_DIS - | R128_GMC_AUX_CLIP_DIS); - - kaaMarkSync (pScreen); -} - -void -r128DrawDisable (ScreenPtr pScreen) -{ -} - -void -r128DrawFini (ScreenPtr pScreen) -{ -} diff --git a/hw/kdrive/r128/r128stub.c b/hw/kdrive/r128/r128stub.c deleted file mode 100644 index b5ffd9d77..000000000 --- a/hw/kdrive/r128/r128stub.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright © 2003 Anders Carlsson - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Anders Carlsson not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Anders Carlsson makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ANDERS CARLSSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ANDERS CARLSSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -#ifdef HAVE_CONFIG_H -#include -#endif -#include "r128.h" -#include "klinux.h" - -void -InitCard (char *name) -{ - KdCardAttr attr; - - if (LinuxFindPci (0x1002, 0x4c46, 0, &attr)) - KdCardInfoAdd (&r128Funcs, &attr, 0); - else if (LinuxFindPci (0x1002, 0x5046, 0, &attr)) - KdCardInfoAdd (&r128Funcs, &attr, 0); -} - -void -InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) -{ - KdInitOutput (pScreenInfo, argc, argv); -} - -void -InitInput (int argc, char **argv) -{ - KdOsAddInputDrivers (); - KdInitInput (); -} - -void -ddxUseMsg (void) -{ - KdUseMsg(); - vesaUseMsg(); -} - -int -ddxProcessArgument (int argc, char **argv, int i) -{ - int ret; - - if (!(ret = vesaProcessArgument (argc, argv, i))) - ret = KdProcessArgument(argc, argv, i); - return ret; -} diff --git a/hw/kdrive/savage/s3.c b/hw/kdrive/savage/s3.c deleted file mode 100644 index c1b01e701..000000000 --- a/hw/kdrive/savage/s3.c +++ /dev/null @@ -1,1835 +0,0 @@ -/* - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "s3.h" - -#define REGISTERS_OFFSET (0x1000000) -#define PACKED_OFFSET (0x8100) -#define IOMAP_OFFSET (0x8000) - -#define S3_MIN_CLOCK 250000 - -static void -_s3SetBlank (S3Ptr s3, S3Vga *s3vga, Bool blank) -{ - CARD8 clock_mode; - - s3SetImm(s3vga, s3_screen_off, blank ? 1 : 0); -} - -Bool -s3CardInit (KdCardInfo *card) -{ - S3CardInfo *s3c; - S3Ptr s3; - S3Vga *s3vga; - int size; - CARD8 *registers; - CARD32 s3FrameBuffer; - CARD32 s3Registers; - CARD8 *temp_buffer; - CARD32 max_memory; - VGA32 save_linear_window_size; - VGA32 save_enable_linear; - VGA32 save_register_lock_2; - VGA32 save_misc_output; - - s3c = (S3CardInfo *) xalloc (sizeof (S3CardInfo)); - if (!s3c) - { - goto bail0; - } - - memset (s3c, '\0', sizeof (S3CardInfo)); - - card->driver = s3c; - -#ifdef VXWORKS - s3c->bios_initialized = 0; -#else - s3c->bios_initialized = 1; -#endif - - if (card->attr.naddr > 1 && card->attr.address[1]) - { - s3FrameBuffer = card->attr.address[1]; - s3Registers = card->attr.address[0]; - max_memory = 32 * 1024 * 1024; - } - else - { - s3FrameBuffer = card->attr.address[0]; - s3Registers = s3FrameBuffer + REGISTERS_OFFSET; - max_memory = 16 * 1024 * 1024; - } - -#ifdef DEBUG - fprintf (stderr, "S3 at 0x%x/0x%x\n", s3Registers, s3FrameBuffer); -#endif - registers = KdMapDevice (s3Registers, - sizeof (S3) + PACKED_OFFSET); - if (!registers) - { - ErrorF ("Can't map s3 device\n"); - goto bail2; - } - s3 = (S3Ptr) (registers + PACKED_OFFSET); - s3c->registers = registers; - s3c->s3 = s3; - - s3vga = &s3c->s3vga; - s3RegInit (s3vga, (VGAVOL8 *) (registers + IOMAP_OFFSET)); - - if (!s3c->bios_initialized) - { - volatile CARD32 *wakeup; - - wakeup = (volatile CARD32 *) (registers + 0x8510); - ErrorF ("Wakeup S3 chip at 0x%x\n", wakeup); - ErrorF ("Wakeup was 0x%x\n", *wakeup); - /* wakeup the chip */ - *(volatile CARD32 *) (registers + 0x8510) = 1; - ErrorF ("Wakeup is 0x%x\n", *wakeup); - } - s3Set (s3vga, s3_io_addr_select, 1); - s3Set (s3vga, s3_enable_ram, 1); - VgaFlush (&s3vga->card); - - save_register_lock_2 = s3Get (s3vga, s3_register_lock_2); - s3SetImm (s3vga, s3_register_lock_2, 0xa0); - save_linear_window_size = s3Get (s3vga, s3_linear_window_size); - save_enable_linear = s3Get (s3vga, s3_enable_linear); - s3Set (s3vga, s3_linear_window_size, 3); - s3Set (s3vga, s3_enable_linear, 1); - VgaFlush (&s3vga->card); - VgaFinish (&s3vga->card); - - /* - * Can't trust S3 register value for frame buffer amount, must compute - */ - temp_buffer = KdMapDevice (s3FrameBuffer, max_memory); - - s3c->memory = KdFrameBufferSize (temp_buffer, max_memory); - - s3Set (s3vga, s3_linear_window_size, save_linear_window_size); - s3Set (s3vga, s3_enable_linear, save_enable_linear); - VgaFlush (&s3vga->card); - s3SetImm (s3vga, s3_register_lock_2, save_register_lock_2); - VgaFinish (&s3vga->card); -#ifdef DEBUG - fprintf (stderr, "Frame buffer 0x%x\n", s3c->memory); -#endif - KdUnmapDevice (temp_buffer, max_memory); - - if (!s3c->memory) - { - ErrorF ("Can't detect s3 frame buffer at 0x%x\n", s3FrameBuffer); - goto bail3; - } - - s3c->frameBuffer = KdMapDevice (s3FrameBuffer, s3c->memory); - if (!s3c->frameBuffer) - { - ErrorF ("Can't map s3 frame buffer\n"); - goto bail3; - } - - card->driver = s3c; - - return TRUE; -bail3: - KdUnmapDevice ((void *) s3, sizeof (S3)); -bail2: -bail1: - xfree (s3c); -bail0: - return FALSE; -} - -Bool -s3ModeSupported (KdScreenInfo *screen, - const KdMonitorTiming *t) -{ - if (screen->fb[1].depth) - { - /* - * Must have at least one true color stream - */ - if (screen->fb[0].depth <= 8 && - screen->fb[1].depth <= 8) - return FALSE; - } - /* make sure the clock isn't too fast */ - if (t->clock > S3_MAX_CLOCK * 2) - return FALSE; - /* width must be a multiple of 16 */ - if (t->horizontal & 0xf) - return FALSE; - return TRUE; -} - -Bool -s3ModeUsable (KdScreenInfo *screen) -{ - KdCardInfo *card = screen->card; - S3CardInfo *s3c = (S3CardInfo *) card->driver; - int screen_size; - int pixel_width; - int byte_width; - int fb; - - screen_size = 0; - for (fb = 0; fb < KD_MAX_FB && screen->fb[fb].depth; fb++) - { - if (screen->fb[fb].depth >= 24) - { - screen->fb[fb].depth = 24; - if (screen->fb[fb].bitsPerPixel != 24) - screen->fb[fb].bitsPerPixel = 32; - } - else if (screen->fb[fb].depth >= 16) - { - screen->fb[fb].depth = 16; - screen->fb[fb].bitsPerPixel = 16; - } - else if (screen->fb[fb].depth >= 15) - { - screen->fb[fb].depth = 15; - screen->fb[fb].bitsPerPixel = 16; - } - else - { - screen->fb[fb].depth = 8; - screen->fb[fb].bitsPerPixel = 8; - } - - /* - * SGRAM requires stride % 64 == 0 - */ - screen->fb[fb].pixelStride = (screen->width + 63) & ~63; - screen->fb[fb].byteStride = screen->fb[fb].pixelStride * (screen->fb[fb].bitsPerPixel >> 3); - screen_size += screen->fb[fb].byteStride * screen->height; - } - - return screen_size <= s3c->memory; -} - -Bool -s3ScreenInit (KdScreenInfo *screen) -{ - KdCardInfo *card = screen->card; - S3CardInfo *s3c = (S3CardInfo *) card->driver; - S3ScreenInfo *s3s; - int memory; - int requested_memory; - int v_total, h_total; - int m, n, r; - int i; - const KdMonitorTiming *t; - int screen_size; - int fb; - int ma; - - s3s = (S3ScreenInfo *) xalloc (sizeof (S3ScreenInfo)); - if (!s3s) - return FALSE; - - memset (s3s, '\0', sizeof (S3ScreenInfo)); - -#ifdef PHOENIX - screen->width = 1152; - screen->height = 900; - screen->rate = 85; - screen->depth = 32; -#endif - if (!screen->width || !screen->height) - { - screen->width = 800; - screen->height = 600; - screen->rate = 72; - } - if (!screen->fb[0].depth) - screen->fb[0].depth = 8; - - t = KdFindMode (screen, s3ModeSupported); - screen->rate = t->rate; - screen->width = t->horizontal; - screen->height = t->vertical; - s3GetClock (t->clock, &m, &n, &r, 511, 127, 4, 250000); -#ifdef DEBUG - fprintf (stderr, "computed %d,%d,%d (%d)\n", - m, n, r, S3_CLOCK(m,n,r)); -#endif -#if 0 - /* - * Can only operate in pixel-doubled mode at 8 or 16 bits per pixel - */ - if (screen->depth > 16 && S3_CLOCK(m,n,r) > S3_MAX_CLOCK) - screen->depth = 16; -#endif - - if (!KdTuneMode (screen, s3ModeUsable, s3ModeSupported)) - { - xfree (s3s); - return FALSE; - } - - s3s->fbmap[2] = -1; - if (screen->fb[1].depth) - { - if (screen->fb[0].bitsPerPixel >= 16) - { - s3s->fbmap[0] = 1; - s3s->fbmap[1] = 0; - } - else - { - s3s->fbmap[0] = 0; - s3s->fbmap[1] = 1; - } - } - else - { - s3s->fbmap[0] = 0; - s3s->fbmap[1] = -1; - } - - screen_size = 0; - for (fb = 0; fb < KD_MAX_FB && screen->fb[fb].depth; fb++) - screen_size += screen->fb[fb].byteStride * screen->height; - - memory = s3c->memory - screen_size; - - /* - * Stick cursor at end of memory - */ - if (memory >= 2048) - { - s3s->cursor_base = s3c->frameBuffer + (s3c->memory - 2048); - memory -= 2048; - } - else - s3s->cursor_base = 0; - - screen_size = 0; - for (ma = 0; s3s->fbmap[ma] >= 0; ma++) - { - fb = s3s->fbmap[ma]; - screen->fb[fb].frameBuffer = s3c->frameBuffer + screen_size; - screen_size += screen->fb[fb].byteStride * screen->height; - - REGION_INIT(pScreen, (&s3s->region[fb]), NullBox, 0); - if (screen->fb[fb].bitsPerPixel == 8) - s3s->fb[ma].chroma_key = 0xff; - else - s3s->fb[ma].chroma_key = 0; - - /* - * Use remaining memory for off-screen storage, but only use - * one piece (either right or bottom). - */ - if (memory >= screen->fb[fb].byteStride * S3_TILE_SIZE) - { - s3s->fb[ma].offscreen = screen->fb[fb].frameBuffer; - s3s->fb[ma].offscreen_x = 0; - s3s->fb[ma].offscreen_y = screen->height; - s3s->fb[ma].offscreen_width = screen->fb[fb].pixelStride; - s3s->fb[ma].offscreen_height = S3_TILE_SIZE; - memory -= s3s->fb[ma].offscreen_height * screen->fb[fb].byteStride; - screen_size += s3s->fb[ma].offscreen_height * screen->fb[fb].byteStride; - } - else - s3s->fb[ma].offscreen = 0; - - switch (screen->fb[fb].depth) { - case 8: - screen->fb[fb].visuals = ((1 << StaticGray) | - (1 << GrayScale) | - (1 << StaticColor) | - (1 << PseudoColor) | - (1 << TrueColor) | - (1 << DirectColor)); - screen->fb[fb].blueMask = 0x00; - screen->fb[fb].greenMask = 0x00; - screen->fb[fb].redMask = 0x00; - break; - case 15: - screen->fb[fb].visuals = (1 << TrueColor); - screen->fb[fb].blueMask = 0x001f; - screen->fb[fb].greenMask = 0x03e0; - screen->fb[fb].redMask = 0x7c00; - break; - case 16: - screen->fb[fb].visuals = (1 << TrueColor); - screen->fb[fb].blueMask = 0x001f; - screen->fb[fb].greenMask = 0x07e0; - screen->fb[fb].redMask = 0xf800; - break; - case 24: - screen->fb[fb].visuals = (1 << TrueColor); - screen->fb[fb].blueMask = 0x0000ff; - screen->fb[fb].greenMask = 0x00ff00; - screen->fb[fb].redMask = 0xff0000; - break; - } - } - - screen->driver = s3s; - - return TRUE; -} - -typedef struct _biosInit { - VGA16 reg; - VGA8 value; -} s3BiosInit; - -s3BiosInit s3BiosReg[] = { - S3_SR +0x15, 0x23, - S3_MISC_OUT, 0x2f, - 0xffff, 1, - S3_SR +0x15, 0x03, - - S3_SR + 0x0, 0x03, - S3_SR + 0x1, 0x00, - S3_SR + 0x2, 0x03, - S3_SR + 0x3, 0x00, - S3_SR + 0x4, 0x02, - S3_SR + 0x5, 0x05, - S3_SR + 0x6, 0x06, - S3_SR + 0x7, 0x07, -/* S3_SR + 0x8, 0x06, */ - S3_SR + 0x9, 0x00, - S3_SR + 0xa, 0x0a, - S3_SR + 0xb, 0x00, - S3_SR + 0xc, 0x0c, - S3_SR + 0xd, 0x00, - S3_SR + 0xe, 0x0e, - S3_SR + 0xf, 0x0f, - -/* S3_SR +0x10, 0x00, */ -/* S3_SR +0x11, 0x0c, */ - S3_SR +0x12, 0x01, - S3_SR +0x13, 0x52, - S3_SR +0x14, 0x00, - -/* S3_SR +0x15, 0x03, */ - - S3_SR +0x16, 0xc5, - S3_SR +0x17, 0xfc, - S3_SR +0x18, 0x40, - S3_SR +0x19, 0x00, - S3_SR +0x1a, 0x01, - S3_SR +0x1b, 0x02, - S3_SR +0x1c, 0x5d, - S3_SR +0x1d, 0x00, - S3_SR +0x1e, 0x00, - S3_SR +0x1f, 0x00, - S3_SR +0x20, 0x20, - S3_SR +0x21, 0x21, - S3_SR +0x22, 0x22, - S3_SR +0x23, 0x23, - S3_SR +0x24, 0x24, - S3_SR +0x25, 0x25, - S3_SR +0x26, 0x26, - S3_SR +0x27, 0x04, - S3_SR +0x28, 0xff, - S3_SR +0x29, 0x00, - S3_SR +0x2a, 0x2a, - S3_SR +0x2b, 0x2b, - S3_SR +0x2c, 0x2c, - S3_SR +0x2d, 0x2d, - S3_SR +0x2e, 0x2e, - S3_SR +0x2f, 0x2f, - S3_SR +0x30, 0x00, - S3_SR +0x31, 0x06, - S3_SR +0x32, 0x41, - S3_SR +0x33, 0x67, - S3_SR +0x34, 0x00, - S3_SR +0x35, 0x00, - S3_SR +0x36, 0x01, - S3_SR +0x37, 0x52, - S3_SR +0x38, 0x5d, - S3_SR +0x39, 0x05, - S3_SR +0x3a, 0x3a, - S3_SR +0x3b, 0x3b, - S3_SR +0x3c, 0x3c, - S3_SR +0x3d, 0x00, - S3_SR +0x3e, 0x3e, - S3_SR +0x3f, 0x00, - S3_SR +0x40, 0x40, - S3_SR +0x41, 0x41, - S3_SR +0x42, 0x42, - S3_SR +0x43, 0x43, - S3_SR +0x44, 0x44, - S3_SR +0x45, 0x45, - S3_SR +0x46, 0x46, - S3_SR +0x47, 0x47, - S3_SR +0x48, 0x48, - S3_SR +0x49, 0x49, - S3_SR +0x4a, 0x4a, - S3_SR +0x4b, 0x4b, - S3_SR +0x4c, 0x4c, - S3_SR +0x4d, 0x4d, - S3_SR +0x4e, 0x4e, - S3_SR +0x4f, 0x4f, - S3_SR +0x50, 0x00, - S3_SR +0x51, 0x00, - S3_SR +0x52, 0x00, - S3_SR +0x53, 0x00, - S3_SR +0x54, 0x00, - S3_SR +0x55, 0x00, - S3_SR +0x56, 0x00, - S3_SR +0x57, 0x00, - S3_SR +0x58, 0x00, - S3_SR +0x59, 0x70, - S3_SR +0x5a, 0x38, - S3_SR +0x5b, 0x08, - S3_SR +0x5c, 0x77, - S3_SR +0x5d, 0x77, - S3_SR +0x5e, 0x00, - S3_SR +0x5f, 0x00, - S3_SR +0x60, 0xff, - S3_SR +0x61, 0xbf, - S3_SR +0x62, 0xff, - S3_SR +0x63, 0xff, - S3_SR +0x64, 0xf7, - S3_SR +0x65, 0xff, - S3_SR +0x66, 0xff, - S3_SR +0x67, 0xff, - S3_SR +0x68, 0xff, - S3_SR +0x69, 0xff, - S3_SR +0x6a, 0xff, - S3_SR +0x6b, 0xff, - S3_SR +0x6c, 0xff, - S3_SR +0x6d, 0xff, - S3_SR +0x6e, 0x9b, - S3_SR +0x6f, 0xbf, - - S3_AR + 0x00, 0x00, - S3_AR + 0x01, 0x01, - S3_AR + 0x02, 0x02, - S3_AR + 0x03, 0x03, - S3_AR + 0x04, 0x04, - S3_AR + 0x05, 0x05, - S3_AR + 0x06, 0x06, - S3_AR + 0x07, 0x07, - S3_AR + 0x08, 0x08, - S3_AR + 0x09, 0x09, - S3_AR + 0x0a, 0x0a, - S3_AR + 0x0b, 0x0b, - S3_AR + 0x0c, 0x0c, - S3_AR + 0x0d, 0x0d, - S3_AR + 0x0e, 0x0e, - S3_AR + 0x0f, 0x0f, - S3_AR + 0x10, 0x05, - S3_AR + 0x11, 0x00, - S3_AR + 0x12, 0x0f, - S3_AR + 0x13, 0x08, - S3_AR + 0x14, 0x00, - - S3_GR + 0x00, 0x00, - S3_GR + 0x01, 0x00, - S3_GR + 0x02, 0x00, - S3_GR + 0x03, 0x00, - S3_GR + 0x04, 0x00, - S3_GR + 0x05, 0x10, - S3_GR + 0x06, 0x0e, - S3_GR + 0x07, 0x00, - - S3_CR + 0x00, 0x5f, - S3_CR + 0x01, 0x4f, - S3_CR + 0x02, 0x50, - S3_CR + 0x03, 0x82, - S3_CR + 0x04, 0x55, - S3_CR + 0x05, 0x81, - S3_CR + 0x06, 0xbf, - S3_CR + 0x07, 0x1f, - S3_CR + 0x08, 0x00, - S3_CR + 0x09, 0x4f, - S3_CR + 0x0a, 0x0d, - S3_CR + 0x0b, 0x0e, - S3_CR + 0x0c, 0x00, - S3_CR + 0x0d, 0x00, - S3_CR + 0x0e, 0x3f, - S3_CR + 0x0f, 0xff, - S3_CR + 0x10, 0x9c, - S3_CR + 0x11, 0x0e, - S3_CR + 0x12, 0x8f, - S3_CR + 0x13, 0x28, - S3_CR + 0x14, 0x1f, - S3_CR + 0x15, 0x96, - S3_CR + 0x16, 0xb9, - S3_CR + 0x17, 0xa3, - S3_CR + 0x18, 0xff, - S3_CR + 0x19, 0xdf, - S3_CR + 0x1a, 0xdf, - S3_CR + 0x1b, 0xdf, - S3_CR + 0x1c, 0xdf, - S3_CR + 0x1d, 0xdf, - S3_CR + 0x1e, 0xdf, - S3_CR + 0x1f, 0xdf, - S3_CR + 0x20, 0xdf, - S3_CR + 0x21, 0x00, -/* S3_CR + 0x22, 0x07, */ - S3_CR + 0x23, 0x00, - S3_CR + 0x24, 0xdf, - S3_CR + 0x25, 0xdf, - S3_CR + 0x26, 0x00, - S3_CR + 0x27, 0xdf, - S3_CR + 0x28, 0xdf, - S3_CR + 0x29, 0xdf, - S3_CR + 0x2a, 0xdf, - S3_CR + 0x2b, 0xdf, - S3_CR + 0x2c, 0xdf, - S3_CR + 0x2d, 0x8a, - S3_CR + 0x2e, 0x22, - S3_CR + 0x2f, 0x02, - S3_CR + 0x30, 0xe1, - S3_CR + 0x31, 0x05, - S3_CR + 0x32, 0x40, - S3_CR + 0x33, 0x08, - S3_CR + 0x34, 0x00, - S3_CR + 0x35, 0x00, - S3_CR + 0x36, 0xbf, - S3_CR + 0x37, 0x9b, -/* S3_CR + 0x38, 0x7b, */ -/* S3_CR + 0x39, 0xb8, */ - S3_CR + 0x3a, 0x45, - S3_CR + 0x3b, 0x5a, - S3_CR + 0x3c, 0x10, - S3_CR + 0x3d, 0x00, - S3_CR + 0x3e, 0xfd, - S3_CR + 0x3f, 0x00, - S3_CR + 0x40, 0x00, - S3_CR + 0x41, 0x92, - S3_CR + 0x42, 0xc0, - S3_CR + 0x43, 0x68, - S3_CR + 0x44, 0xff, - S3_CR + 0x45, 0xe8, - S3_CR + 0x46, 0xff, - S3_CR + 0x47, 0xff, - S3_CR + 0x48, 0xf8, - S3_CR + 0x49, 0xff, - S3_CR + 0x4a, 0xfe, - S3_CR + 0x4b, 0xff, - S3_CR + 0x4c, 0xff, - S3_CR + 0x4d, 0xff, - S3_CR + 0x4e, 0xff, - S3_CR + 0x4f, 0xff, - S3_CR + 0x50, 0x00, - S3_CR + 0x51, 0x00, - S3_CR + 0x52, 0x00, - S3_CR + 0x53, 0x00, - S3_CR + 0x54, 0x00, - S3_CR + 0x55, 0x00, - S3_CR + 0x56, 0x00, - S3_CR + 0x57, 0x00, -#if 0 - S3_CR + 0x58, 0x00, - S3_CR + 0x59, 0xf0, -#endif - S3_CR + 0x5a, 0x00, - S3_CR + 0x5b, 0x00, -#if 0 - S3_CR + 0x5c, 0x00, -#endif - S3_CR + 0x5d, 0x00, - S3_CR + 0x5e, 0x00, - S3_CR + 0x5f, 0x00, - S3_CR + 0x60, 0x09, - S3_CR + 0x61, 0x9d, - S3_CR + 0x62, 0xff, - S3_CR + 0x63, 0x00, - S3_CR + 0x64, 0xfd, - S3_CR + 0x65, 0x04, - S3_CR + 0x66, 0x88, - S3_CR + 0x67, 0x00, - S3_CR + 0x68, 0x7f, - S3_CR + 0x69, 0x00, - S3_CR + 0x6a, 0x00, - S3_CR + 0x6b, 0x00, - S3_CR + 0x6c, 0x00, - S3_CR + 0x6d, 0x11, - S3_CR + 0x6e, 0xff, - S3_CR + 0x6f, 0xfe, - - S3_CR + 0x70, 0x30, - S3_CR + 0x71, 0xc0, - S3_CR + 0x72, 0x07, - S3_CR + 0x73, 0x1f, - S3_CR + 0x74, 0x1f, - S3_CR + 0x75, 0x1f, - S3_CR + 0x76, 0x0f, - S3_CR + 0x77, 0x1f, - S3_CR + 0x78, 0x01, - S3_CR + 0x79, 0x01, - S3_CR + 0x7a, 0x1f, - S3_CR + 0x7b, 0x1f, - S3_CR + 0x7c, 0x17, - S3_CR + 0x7d, 0x17, - S3_CR + 0x7e, 0x17, - S3_CR + 0x7f, 0xfd, - S3_CR + 0x80, 0x00, - S3_CR + 0x81, 0x92, - S3_CR + 0x82, 0x10, - S3_CR + 0x83, 0x07, - S3_CR + 0x84, 0x42, - S3_CR + 0x85, 0x00, - S3_CR + 0x86, 0x00, - S3_CR + 0x87, 0x00, - S3_CR + 0x88, 0x10, - S3_CR + 0x89, 0xfd, - S3_CR + 0x8a, 0xfd, - S3_CR + 0x8b, 0xfd, - S3_CR + 0x8c, 0xfd, - S3_CR + 0x8d, 0xfd, - S3_CR + 0x8e, 0xfd, - S3_CR + 0x8f, 0xfd, - S3_CR + 0x90, 0x00, - S3_CR + 0x91, 0x4f, - S3_CR + 0x92, 0x10, - S3_CR + 0x93, 0x00, - S3_CR + 0x94, 0xfd, - S3_CR + 0x95, 0xfd, - S3_CR + 0x96, 0xfd, - S3_CR + 0x97, 0xfd, - S3_CR + 0x98, 0xfd, - S3_CR + 0x99, 0xff, - S3_CR + 0x9a, 0xfd, - S3_CR + 0x9b, 0xff, - S3_CR + 0x9c, 0xfd, - S3_CR + 0x9d, 0xfd, - S3_CR + 0x9e, 0xfd, - S3_CR + 0x9f, 0xff, - S3_CR + 0xa0, 0x0f, -#if 0 - S3_CR + 0xa1, 0x00, - S3_CR + 0xa2, 0x00, - S3_CR + 0xa3, 0x00, - S3_CR + 0xa4, 0x55, -#endif - S3_CR + 0xa5, 0x09, - S3_CR + 0xa6, 0x20, -#if 0 - S3_CR + 0xa7, 0x00, - S3_CR + 0xa8, 0x00, - S3_CR + 0xa9, 0x00, - S3_CR + 0xaa, 0x00, - S3_CR + 0xab, 0x00, - S3_CR + 0xac, 0x00, - S3_CR + 0xad, 0x00, - S3_CR + 0xae, 0x00, - S3_CR + 0xaf, 0x00, - S3_CR + 0xb0, 0xff, -#endif - S3_CR + 0xb1, 0x0e, -#if 0 - S3_CR + 0xb2, 0x55, - S3_CR + 0xb3, 0x00, - S3_CR + 0xb4, 0x55, - S3_CR + 0xb5, 0x00, - S3_CR + 0xb6, 0x00, -#endif - S3_CR + 0xb7, 0x84, -#if 0 - S3_CR + 0xb8, 0xff, - S3_CR + 0xb9, 0xff, - S3_CR + 0xba, 0xff, - S3_CR + 0xbb, 0xff, - S3_CR + 0xbc, 0xff, - S3_CR + 0xbd, 0xff, - S3_CR + 0xbe, 0xff, - S3_CR + 0xbf, 0xff, -#endif - - S3_SR +0x15, 0x23, - 0xffff, 1, - S3_SR +0x15, 0x03, - 0xffff, 1, -}; - -#define S3_NUM_BIOS_REG (sizeof (s3BiosReg) / sizeof (s3BiosReg[0])) - -typedef struct _bios32Init { - VGA16 offset; - VGA32 value; -} s3Bios32Init; - -s3Bios32Init s3Bios32Reg[] = { - 0x8168, 0x00000000, - 0x816c, 0x00000001, - 0x8170, 0x00000000, - 0x8174, 0x00000000, - 0x8178, 0x00000000, - 0x817c, 0x00000000, -#if 0 - 0x8180, 0x00140000, - 0x8184, 0x00000000, - 0x8188, 0x00000000, - 0x8190, 0x00000000, - 0x8194, 0x00000000, - 0x8198, 0x00000000, - 0x819c, 0x00000000, - 0x81a0, 0x00000000, -#endif - 0x81c0, 0x00000000, - 0x81c4, 0x01fbffff, - 0x81c8, 0x00f7ffbf, - 0x81cc, 0x00f7ff00, - 0x81d0, 0x11ffff7f, - 0x81d4, 0x7fffffdf, - 0x81d8, 0xfdfff9ff, - 0x81e0, 0xfd000000, - 0x81e4, 0x00000000, - 0x81e8, 0x00000000, - 0x81ec, 0x00010000, - 0x81f0, 0x07ff057f, - 0x81f4, 0x07ff07ff, - 0x81f8, 0x00000000, - 0x81fc, 0x00000000, - 0x8200, 0x00000000, - 0x8204, 0x00000000, - 0x8208, 0x33000000, - 0x820c, 0x7f000000, - 0x8210, 0x80000000, - 0x8214, 0x00000000, - 0x8218, 0xffffffff, - 0x8300, 0xff007fef, - 0x8304, 0xfffdf7bf, - 0x8308, 0xfdfffbff, -}; - -#define S3_NUM_BIOS32_REG (sizeof (s3Bios32Reg) / sizeof (s3Bios32Reg[0])) - -/* - * Initialize the card precisely as the bios does - */ -s3DoBiosInit (KdCardInfo *card) -{ - S3CardInfo *s3c = card->driver; - CARD32 *regs = (CARD32 *) s3c->registers; - S3Vga *s3vga = &s3c->s3vga; - int r; - - for (r = 0; r < S3_NUM_BIOS_REG; r++) - { - if (s3BiosReg[r].reg == 0xffff) - sleep (s3BiosReg[r].value); - else - VgaStore (&s3vga->card, s3BiosReg[r].reg, s3BiosReg[r].value); - } - VgaStore (&s3vga->card, S3_SR+0x10, 0x22); - VgaStore (&s3vga->card, S3_SR+0x11, 0x44); - VgaStore (&s3vga->card, S3_SR+0x15, 0x01); - sleep (1); - VgaStore (&s3vga->card, S3_SR+0x15, 0x03); - VgaStore (&s3vga->card, S3_CR+0x6f, 0xff); - VgaStore (&s3vga->card, S3_CR+0x3f, 0x3f); - sleep (1); - VgaStore (&s3vga->card, S3_CR+0x3f, 0x00); - VgaStore (&s3vga->card, S3_CR+0x6f, 0xfe); - VgaInvalidate (&s3vga->card); - for (r = 0; r < S3_NUM_BIOS32_REG; r++) - regs[s3Bios32Reg[r].offset/4] = s3Bios32Reg[r].value; -} - -void -s3Preserve (KdCardInfo *card) -{ - S3CardInfo *s3c = card->driver; - S3Ptr s3 = s3c->s3; - S3Vga *s3vga = &s3c->s3vga; - S3Save *save = &s3c->save; - CARD8 t1, t2; - CARD8 *cursor_base; - CARD8 streams_mode; - - s3Save (s3vga); - if (!s3c->bios_initialized) - s3DoBiosInit (card); - - _s3SetBlank (s3, s3vga, TRUE); - /* - * Preserve the first part of the frame buffer which holds - * the text mode fonts and data - */ - s3Set (s3vga, s3_linear_window_size, 3); - s3Set (s3vga, s3_enable_linear, 1); - VgaFlush (&s3vga->card); - memcpy (save->text_save, s3c->frameBuffer, S3_TEXT_SAVE); - /* - * Preserve graphics engine state - */ - save->alt_mix = s3->alt_mix; - save->write_mask = s3->write_mask; - save->fg = s3->fg; - save->bg = s3->bg; - /* - * Preserve streams processor state - */ - streams_mode = s3Get (s3vga, s3_streams_mode); - s3SetImm (s3vga, s3_streams_mode, 3); - save->global_bitmap_1 = s3->global_bitmap_1; - save->global_bitmap_2 = s3->global_bitmap_2; - save->adv_func_cntl = s3->adv_func_cntl; - save->primary_bitmap_1 = s3->primary_bitmap_1; - save->primary_bitmap_2 = s3->primary_bitmap_2; - save->secondary_bitmap_1 = s3->secondary_bitmap_1; - save->secondary_bitmap_2 = s3->secondary_bitmap_2; - save->primary_stream_control = s3->primary_stream_control; - save->blend_control = s3->blend_control; - save->primary_stream_addr_0 = s3->primary_stream_addr_0; - save->primary_stream_addr_1 = s3->primary_stream_addr_1; - save->primary_stream_stride = s3->primary_stream_stride; - save->primary_stream_xy = s3->primary_stream_xy; - save->primary_stream_size = s3->primary_stream_size; - save->primary_stream_mem = s3->primary_stream_mem; - save->secondary_stream_xy = s3->secondary_stream_xy; - save->secondary_stream_size = s3->secondary_stream_size; - save->streams_fifo = s3->streams_fifo; - s3SetImm (s3vga, s3_streams_mode, streams_mode); - _s3SetBlank (s3, s3vga, FALSE); -} - -/* - * Enable the card for rendering. Manipulate the initial settings - * of the card here. - */ -int s3CpuTimeout, s3AccelTimeout; - -void -s3SetGlobalBitmap (ScreenPtr pScreen, int ma) -{ - KdScreenPriv(pScreen); - s3ScreenInfo (pScreenPriv); - - if (s3s->current_ma != ma) - { - s3CardInfo (pScreenPriv); - S3Vga *s3vga = &s3c->s3vga; - S3Ptr s3 = s3c->s3; - CARD32 gb1, gb2; - int depth; - int length; - KdCheckSync (pScreen); - switch (s3s->fb[ma].accel_bpp) { - case 8: - case 24: - length = 0; - break; - case 16: - length = 1; - break; - case 32: - length = 3; - break; - } - s3SetImm (s3vga, s3_pixel_length, length); - gb1 = s3s->fb[ma].bitmap_offset; - gb2 = ((1 << 0) | - (0 << 2) | - (1 << 3) | - ((s3s->fb[ma].accel_stride >> 4) << 4) | - (s3s->fb[ma].accel_bpp << 16) | - (0 << 24) | - (1 << 28)); - s3->global_bitmap_1 = gb1; - s3->global_bitmap_2 = gb2; - s3->global_bitmap_2 = gb2; - s3s->current_ma = ma; - } -} - -Bool -s3Enable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - KdCardInfo *card = pScreenPriv->card; - KdScreenInfo *screen = pScreenPriv->screen; - s3CardInfo (pScreenPriv); - s3ScreenInfo (pScreenPriv); - - S3Vga *s3vga = &s3c->s3vga; - S3Ptr s3 = s3c->s3; - int hactive, hblank, hfp, hbp; - int vactive, vblank, vfp, vbp; - int hsize; - - int h_total; - int h_display_end; - int h_blank_start; - int h_blank_end; - int h_sync_start; - int h_sync_end; - int h_screen_off; - int h_start_fifo_fetch; - - int primary_stream_l1[KD_MAX_FB]; - - int v_total; - int v_retrace_start; - int v_retrace_end; - int v_display_end; - int v_blank_start; - int v_blank_end; - int v_blank_start_adjust = 0; - int v_blank_end_adjust = 0; - - int h_blank_start_adjust = 0; - int h_blank_end_adjust = 0; - int h_sync_start_adjust = 0; - int h_sync_end_adjust = 0; - int h_start_fifo_fetch_adjust = 0; - int h_sync_extend; - int h_blank_extend; - int i; - CARD16 cursor_address; - const KdMonitorTiming *t; - int m, n, r; - Bool clock_double; - int cpu_timeout; - int accel_timeout; - int bytes_per_ms; - CARD32 control[2]; - int fb; - int ma; - - s3s->primary_depth = screen->fb[s3s->fbmap[0]].depth; - - s3s->use_streams = TRUE; - - t = KdFindMode (screen, s3ModeSupported); - - hfp = t->hfp; - hbp = t->hbp; - hblank = t->hblank; - hactive = t->horizontal; - - vfp = t->vfp; - vbp = t->vbp; - vblank = t->vblank; - vactive = t->vertical; - - - m = s3Get (s3vga, s3_dclk_m); - n = s3Get (s3vga, s3_dclk_n); - r = s3Get (s3vga, s3_dclk_r); -#define DEBUG_CLOCK -#ifdef DEBUG_CLOCK - fprintf (stderr, "old clock %d, %d, %d (%d)\n", m, n, r, S3_CLOCK(m,n,r)); -#endif - clock_double = FALSE; - s3GetClock (t->clock, &m, &n, &r, 511, 127, 4, 250000); - if (S3_CLOCK(m,n,r) > S3_MAX_CLOCK && !s3s->use_streams) - clock_double = TRUE; - s3Set (s3vga, s3_clock_select, 3); - s3Set (s3vga, s3_dclk_m, m); - s3Set (s3vga, s3_dclk_n, n); - s3Set (s3vga, s3_dclk_r, r); -#ifdef DEBUG_CLOCK - fprintf (stderr, "new clock %d, %d, %d (%d)\n", m, n, r, S3_CLOCK(m,n,r)); -#endif - - if (s3s->use_streams) - { - s3Set (s3vga, s3_streams_mode, 3); - s3Set (s3vga, s3_enable_l1_parameter, 1); - } - else - { - s3Set (s3vga, s3_streams_mode, 0); - s3Set (s3vga, s3_enable_l1_parameter, 0); - } - s3Set (s3vga, s3_flat_panel_output_control_1, 0); - s3Set (s3vga, s3_flat_panel_output_control_2, 0); - s3Set (s3vga, s3_select_graphics_mode, 1); - s3Set (s3vga, s3_enable_blinking, 0); - s3Set (s3vga, s3_enable_vga_16bit, 0); - s3Set (s3vga, s3_enhanced_memory_mapping, 1); - s3Set (s3vga, s3_enable_sff, 1); - s3Set (s3vga, s3_enable_2d_access, 1); - s3Set (s3vga, s3_2bk_cga, 1); - s3Set (s3vga, s3_4bk_hga, 1); - s3Set (s3vga, s3_v_total_double, 0); - s3Set (s3vga, s3_address_16k_wrap, 1); - s3Set (s3vga, s3_word_mode, 0); - s3Set (s3vga, s3_byte_mode, 1); - s3Set (s3vga, s3_hardware_reset, 1); - s3Set (s3vga, s3_max_scan_line, 0); - s3Set (s3vga, s3_linear_window_size, 3); - s3Set (s3vga, s3_enable_linear, 1); - s3Set (s3vga, s3_enable_2d_3d, 1); - s3Set (s3vga, s3_refresh_control, 1); - s3Set (s3vga, s3_disable_pci_read_bursts, 0); - s3Set (s3vga, s3_pci_disconnect_enable, 1); - s3Set (s3vga, s3_primary_load_control, 0); - s3Set (s3vga, s3_secondary_load_control, 0); - s3Set (s3vga, s3_pci_retry_enable, 1); - s3Set (s3vga, s3_enable_256, 1); - s3Set (s3vga, s3_border_select, 1); /* eliminate white border */ - s3SetImm (s3vga, s3_lock_palette, 0); /* unlock palette/border regs */ - s3Set (s3vga, s3_disable_v_retrace_int, 1); - if (t->hpol == KdSyncPositive) - s3Set (s3vga, s3_horz_sync_neg, 0); - else - s3Set (s3vga, s3_horz_sync_neg, 1); - if (t->vpol == KdSyncPositive) - s3Set (s3vga, s3_vert_sync_neg, 0); - else - s3Set (s3vga, s3_vert_sync_neg, 1); - - s3Set (s3vga, s3_dot_clock_8, 1); - s3Set (s3vga, s3_enable_write_plane, 0xf); - s3Set (s3vga, s3_extended_memory_access, 1); - s3Set (s3vga, s3_sequential_addressing_mode, 1); - s3Set (s3vga, s3_select_chain_4_mode, 1); - s3Set (s3vga, s3_linear_addressing_control, 1); - - s3Set (s3vga, s3_enable_gamma_correction, 0); - - s3Set (s3vga, s3_enable_8_bit_luts, 1); - - s3Set (s3vga, s3_dclk_invert, 0); - s3Set (s3vga, s3_enable_clock_double, 0); - s3Set (s3vga, s3_dclk_over_2, 0); - - s3Set (s3vga, s3_delay_h_enable, 0); - s3Set (s3vga, s3_sdclk_skew, 0); - - s3Set (s3vga, s3_dac_mask, 0xff); - -#if 0 -#ifdef DEBUG_CLOCK - m = s3Get (s3vga, s3_mclk_m); - n = s3Get (s3vga, s3_mclk_n); - r = s3Get (s3vga, s3_mclk_r); - fprintf (stderr, "old mclk %d, %d, %d (%d)\n", m, n, r, S3_CLOCK(m,n,r)); -#endif - - s3GetClock (125282, &m, &n, &r, 127, 31, 3, 250000); - -#ifdef DEBUG_CLOCK - fprintf (stderr, "new mclk %d, %d, %d (%d)\n", m, n, r,S3_CLOCK(m,n,r)); -#endif - - s3Set (s3vga, s3_mclk_m, m); - s3Set (s3vga, s3_mclk_n, n); - s3Set (s3vga, s3_mclk_r, r); - -#ifdef DEBUG_CLOCK - m = s3Get (s3vga, s3_eclk_m); - n = s3Get (s3vga, s3_eclk_n); - r = s3Get (s3vga, s3_eclk_r); - fprintf (stderr, "old eclk %d, %d, %d (%d)\n", m, n, r, S3_CLOCK(m,n,r)); -#endif - -#define S3_ECLK 125282 - - s3GetClock (S3_ECLK, &m, &n, &r, 127, 31, 3, 250000); - -#ifdef DEBUG_CLOCK - fprintf (stderr, "new eclk %d, %d, %d (%d)\n", m, n, r,S3_CLOCK(m,n,r)); -#endif - - s3Set (s3vga, s3_eclk_m, m); - s3Set (s3vga, s3_eclk_n, n); - s3Set (s3vga, s3_eclk_r, r); -#endif - - /* - * Compute character lengths for horizontal timing values - */ - hactive = screen->width / 8; - hblank /= 8; - hfp /= 8; - hbp /= 8; - /* - * Set pixel size, choose clock doubling mode - */ - - bytes_per_ms = 0; - - for (ma = 0; s3s->fbmap[ma] >= 0; ma++) - { - fb = s3s->fbmap[ma]; - s3s->fb[ma].accel_bpp = screen->fb[fb].bitsPerPixel; - s3s->fb[ma].accel_stride = screen->fb[fb].pixelStride; - s3s->fb[ma].bitmap_offset = screen->fb[fb].frameBuffer - s3c->frameBuffer; - switch (s3s->fb[ma].accel_bpp) { - case 8: - h_screen_off = hactive; - s3Set (s3vga, s3_pixel_length, 0); - s3Set (s3vga, s3_color_mode, 0); - control[ma] = 0; - /* - * Set up for double-pixel mode, switch color modes, - * divide the dclk and delay h blank by 2 dclks - */ - if (clock_double) - { - s3Set (s3vga, s3_color_mode, 1); - s3Set (s3vga, s3_dclk_over_2, 1); - s3Set (s3vga, s3_enable_clock_double, 1); - s3Set (s3vga, s3_h_skew, 1); - h_blank_start_adjust = -3; - h_blank_end_adjust = -4; - s3Set (s3vga, s3_border_select, 0); - } - break; - case 16: - h_screen_off = hactive * 2; - s3Set (s3vga, s3_pixel_length, 1); - if (screen->fb[fb].depth == 15) - control[ma] = 3 << 24; - else - control[ma] = 5 << 24; - if (clock_double) - { - if (screen->fb[fb].depth == 15) - s3Set (s3vga, s3_color_mode, 3); - else - s3Set (s3vga, s3_color_mode, 5); - s3Set (s3vga, s3_dclk_over_2, 1); - s3Set (s3vga, s3_enable_clock_double, 1); - s3Set (s3vga, s3_border_select, 0); - h_blank_start_adjust = 4; - h_blank_end_adjust = -4; - } - else - { - if (screen->fb[fb].depth == 15) - s3Set (s3vga, s3_color_mode, 2); - else - s3Set (s3vga, s3_color_mode, 4); - s3Set (s3vga, s3_dclk_over_2, 0); - s3Set (s3vga, s3_enable_clock_double, 0); - s3Set (s3vga, s3_delay_blank, 0); - } - break; - case 24: - control[ma] = 6 << 24; - h_screen_off = hactive * 3; - s3s->fb[ma].accel_bpp = 8; - s3s->fb[ma].accel_stride = screen->fb[fb].pixelStride * 3; - break; - case 32: - control[ma] = 7 << 24; - h_screen_off = hactive * 4; - s3Set (s3vga, s3_pixel_length, 3); - s3Set (s3vga, s3_color_mode, 0xd); - break; - } - bytes_per_ms += t->clock * (screen->fb[fb].bitsPerPixel / 8); - primary_stream_l1[ma] = (screen->width * screen->fb[fb].bitsPerPixel / (8 * 8)) - 1; - } - - /* - * X server starts frame buffer at top of memory - */ - s3Set (s3vga, s3_start_address, 0); - - /* - * Set various registers to avoid snow on the screen - */ - - fprintf (stderr, "bytes_per_ms %d\n", bytes_per_ms); - fprintf (stderr, "primary 0x%x master 0x%x command 0x%x lpb 0x%x cpu 0x%x 2d 0x%x\n", - s3Get (s3vga, s3_primary_stream_timeout), - s3Get (s3vga, s3_master_control_unit_timeout), - s3Get (s3vga, s3_command_buffer_timeout), - s3Get (s3vga, s3_lpb_timeout), - s3Get (s3vga, s3_cpu_timeout), - s3Get (s3vga, s3_2d_graphics_engine_timeout)); - - /* - * Test: - * accel x11perf -line500 - * cpu x11perf -circle500 - * - * cpu accel - * 1600x1200x32x85 (918000) 1 1 not enough - * 1600x1200x32x75 (810000) 3 2 - * 1600x1200x32x70 (756000) 4 3 - * 1600x1200x32x60 (648000) 6 5 - * - * 1280x1024x32x85 (630000) 6 4 - * 1280x1024x32x75 (540000) a 6 - * 1280x1024x32x60 (432000) 1f a - * - * 1152x900x32x85 (490000) a 6 - * 1152x900x32x75 (433000) 1f 8 - * 1152x900x32x70 (401000) 1f a - * 1152x900x32x66 (380000) 1f a - * - * 1024x768x32x85 (378000) 1f a - * 1024x768x32x75 (315000) 1f b - * 1024x768x32x70 (300000) 1f b - * 1024x768x32x60 (260000) 1f 12 - * - * 800x600x32x85 (225000) 1f 1a - * 800x600x32x72 (200000) 1f 1d - * 800x600x32x75 (198000) 1f 1d - * - * 1600x1200x16x85 (459000) 1f 8 - * 1600x1200x16x75 (405000) 1f a - * 1600x1200x16x70 (378000) 1f b - * 1600x1200x16x60 (324000) 1f f - * - * 1280x1024x16x85 (315000) 1f 12 - * 1280x1024x16x75 (270000) 1f 16 - * 1280x1024x16x60 (216000) 1f 1d - * - * 1600x1200x8x85 (229000) 1f 1f - * - */ - - if (s3CpuTimeout) - { - if (s3CpuTimeout < 0) - cpu_timeout = 0; - else - cpu_timeout = s3CpuTimeout; - if (s3AccelTimeout < 0) - accel_timeout = 0; - else if (s3AccelTimeout) - accel_timeout = s3AccelTimeout; - else - accel_timeout = s3CpuTimeout; - } - else if (bytes_per_ms >= 900000) - { - cpu_timeout = 0x01; - accel_timeout = 0x01; - } - else if (bytes_per_ms >= 800000) - { - cpu_timeout = 0x03; - accel_timeout = 0x02; - } - else if (bytes_per_ms >= 700000) - { - cpu_timeout = 0x04; - accel_timeout = 0x03; - } - else if (bytes_per_ms >= 600000) - { - cpu_timeout = 0x06; - accel_timeout = 0x04; - } - else if (bytes_per_ms >= 475000) - { - cpu_timeout = 0x0a; - accel_timeout = 0x06; - } - else if (bytes_per_ms >= 425000) - { - cpu_timeout = 0x1f; - accel_timeout = 0x8; - } - else if (bytes_per_ms >= 300000) - { - cpu_timeout = 0x1f; - accel_timeout = 0x0a; - } - else if (bytes_per_ms >= 250000) - { - cpu_timeout = 0x1f; - accel_timeout = 0x12; - } - else if (bytes_per_ms >= 200000) - { - cpu_timeout = 0x1f; - accel_timeout = 0x1a; - } - else - { - cpu_timeout = 0x1f; - accel_timeout = 0x1f; - } - - fprintf (stderr, "cpu 0x%x accel 0x%x\n", cpu_timeout, accel_timeout); - - s3Set (s3vga, s3_primary_stream_timeout, 0xc0); - s3Set (s3vga, s3_master_control_unit_timeout, 0xf); - s3Set (s3vga, s3_command_buffer_timeout, 0x1f); - s3Set (s3vga, s3_lpb_timeout, 0xf); - s3Set (s3vga, s3_2d_graphics_engine_timeout, accel_timeout); - s3Set (s3vga, s3_cpu_timeout, cpu_timeout); - - s3Set (s3vga, s3_fifo_fetch_timing, 1); - s3Set (s3vga, s3_fifo_drain_delay, 2); - - /* - * Compute horizontal register values from timings - */ - h_total = hactive + hblank - 5; - h_display_end = hactive - 1; - - h_sync_start = hactive + hfp + h_sync_start_adjust; - h_sync_end = hactive + hblank - hbp + h_sync_end_adjust; - /* - * pad the blank values narrow a bit and use the border_select to - * eliminate the remaining border; don't know why, but it doesn't - * work in the documented fashion - */ - h_blank_start = hactive + 1 + h_blank_start_adjust; - h_blank_end = hactive + hblank - 2 + h_blank_end_adjust; - /* - * The manual says h_total - 5, but the - * bios does differently... - */ - if (screen->width >= 1600) - h_start_fifo_fetch = h_total - 24; - else if (screen->width >= 1280) - h_start_fifo_fetch = h_total - 19; - else if (screen->width >= 1024) - h_start_fifo_fetch = h_total - 14; - else if (screen->width >= 800) - h_start_fifo_fetch = h_total - 10; - else - h_start_fifo_fetch = h_total - 5; - - h_start_fifo_fetch += h_start_fifo_fetch_adjust; - if (h_blank_end - h_blank_start >= 0x40) - h_blank_extend = 1; - else - h_blank_extend = 0; - - if (h_sync_end - h_sync_start >= 0x20) - h_sync_extend = 1; - else - h_sync_extend = 0; - -#ifdef DEBUG - fprintf (stderr, "h_total %d h_display_end %d\n", - h_total, h_display_end); - fprintf (stderr, "h_sync_start %d h_sync_end %d h_sync_extend %d\n", - h_sync_start, h_sync_end, h_sync_extend); - fprintf (stderr, "h_blank_start %d h_blank_end %d h_blank_extend %d\n", - h_blank_start, h_blank_end, h_blank_extend); -#endif - - s3Set (s3vga, s3_h_total, h_total); - s3Set (s3vga, s3_h_display_end, h_display_end); - s3Set (s3vga, s3_h_blank_start, h_blank_start); - s3Set (s3vga, s3_h_blank_end, h_blank_end); - s3Set (s3vga, s3_h_sync_start, h_sync_start); - s3Set (s3vga, s3_h_sync_end, h_sync_end); - s3Set (s3vga, s3_screen_offset, h_screen_off); - s3Set (s3vga, s3_h_start_fifo_fetch, h_start_fifo_fetch); - s3Set (s3vga, s3_h_sync_extend, h_sync_extend); - s3Set (s3vga, s3_h_blank_extend, h_blank_extend); - - s3Set (s3vga, s3_dac_power_saving_disable, 0); - s3Set (s3vga, s3_dac_power_up_time, hactive + hblank); - - s3Set (s3vga, s3_primary_stream_l1, primary_stream_l1[0]); - - s3Set (s3vga, s3_streams_fifo_delay, 0); - - v_total = vactive + vblank - 2; - v_display_end = vactive - 1; - - v_blank_start = vactive - 1 + v_blank_start_adjust; - v_blank_end = v_blank_start + vblank - 1 + v_blank_end_adjust; - - v_retrace_start = vactive + vfp; - v_retrace_end = vactive + vblank - vbp; - - s3Set (s3vga, s3_v_total, v_total); - s3Set (s3vga, s3_v_retrace_start, v_retrace_start); - s3Set (s3vga, s3_v_retrace_end, v_retrace_end); - s3Set (s3vga, s3_v_display_end, v_display_end); - s3Set (s3vga, s3_v_blank_start, v_blank_start); - s3Set (s3vga, s3_v_blank_end, v_blank_end); - - if (vactive >= 1024) - s3Set (s3vga, s3_line_compare, 0x7ff); - else - s3Set (s3vga, s3_line_compare, 0x3ff); - - /* - * Set cursor - */ - if (!screen->softCursor) - { - cursor_address = (s3s->cursor_base - s3c->frameBuffer) / 1024; - - s3Set (s3vga, s3_cursor_address, cursor_address); - s3Set (s3vga, s3_cursor_ms_x11, 0); - s3Set (s3vga, s3_cursor_enable, 1); - } - else - s3Set (s3vga, s3_cursor_enable, 0); - -#define MAKE_GBF(bds,be,stride,bpp,tile) (\ - ((bds) << 0) | \ - ((be) << 3) | \ - ((stride) << 4) | \ - ((bpp) << 16) | \ - ((tile) << 24)) - /* - * Set accelerator - */ - switch (screen->width) { -#if 0 - case 640: s3Set (s3vga, s3_ge_screen_width, 1); break; - case 800: s3Set (s3vga, s3_ge_screen_width, 2); break; - case 1024: s3Set (s3vga, s3_ge_screen_width, 0); break; - case 1152: s3Set (s3vga, s3_ge_screen_width, 4); break; - case 1280: s3Set (s3vga, s3_ge_screen_width, 3); break; - case 1600: s3Set (s3vga, s3_ge_screen_width, 6); break; -#endif - default: - s3Set (s3vga, s3_ge_screen_width, 7); /* use global bitmap descriptor */ - } - -#if 0 - crtc->l_parm_0_7 = screen->width / 4; /* Undocumented. */ -#endif - - /* - * Set DPMS to normal - */ - s3Set (s3vga, s3_hsync_control, 0); - s3Set (s3vga, s3_vsync_control, 0); - - _s3SetBlank (s3, s3vga, TRUE); - if (s3s->use_streams) - s3Set (s3vga, s3_primary_stream_definition, 1); - else - s3Set (s3vga, s3_primary_stream_definition, 0); - - VgaFlush(&s3vga->card); - VgaSetImm (&s3vga->card, s3_clock_load_imm, 1); - VgaSetImm(&s3vga->card, s3_clock_load_imm, 0); - - - if (s3s->use_streams) - { - fb = s3s->fbmap[0]; - s3->primary_stream_control = control[0]; - s3->primary_stream_addr_0 = - s3->primary_stream_addr_1 = s3s->fb[0].bitmap_offset; - s3->primary_stream_stride = screen->fb[fb].byteStride; - s3->primary_stream_xy = (1 << 16) | 1; - s3->primary_stream_size = ((screen->fb[fb].pixelStride - 1) << 16) | screen->height; - s3->primary_stream_mem = (screen->fb[fb].byteStride * screen->height) / 8 - 1; - if (s3s->fbmap[1] >= 0) - { - fb = s3s->fbmap[1]; - s3->blend_control = 5 << 24; - if (s3s->fb[0].accel_bpp == 8) - s3->chroma_key_control = 0x33000000 | s3s->fb[0].chroma_key; - else - s3->chroma_key_control = 0x13010101; - s3->secondary_stream_control = control[1] | screen->width; - s3->secondary_stream_h_scale = (1 << 15); - s3->color_adjustment = 0; - s3->secondary_stream_vscale = (1 << 15); - s3->secondary_stream_vinit = 0; - s3->secondary_stream_mbuf = 0; - s3->secondary_stream_addr_0 = - s3->secondary_stream_addr_1 = s3s->fb[1].bitmap_offset; - s3->secondary_stream_stride = screen->fb[fb].byteStride; - s3->secondary_stream_scount = screen->height; - s3->secondary_stream_xy = (1 << 16) | 1; - s3->secondary_stream_size = ((screen->fb[fb].pixelStride - 1) << 16) | screen->height; - s3->secondary_stream_mem = (1 << 22) | ((screen->fb[fb].byteStride * screen->height) / 8 - 1); - } - else - { - s3->blend_control = 1 << 24; - s3->secondary_stream_xy = 0x07ff07ff; - s3->secondary_stream_size = 0x00010001; - } - s3->streams_fifo = (0x20 << 11) | (0x20 << 5) | 0x2; - } - s3->mult_misc_read_sel = (((1 << 9) | - (1 << 11) | - (0xe << 12)) | - (((0xe << 0) | - (0xf << 12)) << 16)); - - s3->cmd_overflow_buf_ptr = (1 << 3); - s3->bci_power_management = (1 << 9); - s3->adv_func_cntl = (3 << 8) | (1 << 4) | (1 << 2) | 1; - s3->primary_bitmap_1 = 0; - s3->primary_bitmap_2 = 0; - s3->secondary_bitmap_1 = 0; - s3->secondary_bitmap_2 = 0; - s3s->current_ma = -1; - _s3SetBlank (s3, s3vga, FALSE); -#if 0 - { - VGA16 r; - static CARD32 streams[][2] = { - /* PCI registers */ - 0x8000, 0x8024, - 0x802c, 0x8034, - 0x803c, 0x8040, -#if 0 - 0x8080, 0x808c, /* AGP */ -#endif - 0x80dc, 0x80e0, - - /* 2D registers */ - 0x8168, 0x8188, - 0x8190, 0x81a0, - 0x81c0, 0x81d8, - 0x81e0, 0x8218, - 0x8300, 0x8308, - 0x8504, 0x8510, - - /* LPB/VIP registers */ - 0xff00, 0xff18, - 0xff20, 0xff38, - 0xff40, 0xff40, - 0xff70, 0xff78, - 0xff8c, 0xffa0, - -#if 0 - /* 3D registers */ - 0x48508, 0x48508, - 0x48528, 0x48528, - 0x48548, 0x48548, - 0x48584, 0x485f0, -#endif - - /* motion compensation registers */ - 0x48900, 0x48924, -#if 0 - 0x48928, 0x48928, -#endif - - /* Mastered data transfer registers */ - 0x48a00, 0x48a1c, - - /* configuation/status registers */ - 0x48c00, 0x48c18, - 0x48c20, 0x48c24, - 0x48c40, 0x48c50, - 0x48c60, 0x48c64, - - 0, 0, - }; -#ifdef PHOENIX -#undef stderr -#define stderr stdout -#endif - CARD32 *regs = (CARD32 *) s3c->registers; - int i; - CARD32 reg; - - - for (r = S3_SR + 0; r < S3_SR + S3_NSR; r++) - fprintf (stderr, "SR%02x = %02x\n", r-S3_SR, VgaFetch (&s3vga->card, r)); - for (r = S3_GR + 0; r < S3_GR + S3_NGR; r++) - fprintf (stderr, "GR%02x = %02x\n", r-S3_GR, VgaFetch (&s3vga->card, r)); - for (r = S3_AR + 0; r < S3_AR + S3_NAR; r++) - fprintf (stderr, "AR%02x = %02x\n", r-S3_AR, VgaFetch (&s3vga->card, r)); - for (r = S3_CR + 0; r < S3_CR + S3_NCR; r++) - fprintf (stderr, "CR%02x = %02x\n", r-S3_CR, VgaFetch (&s3vga->card, r)); - for (r = S3_DAC + 0; r < S3_DAC + S3_NDAC; r++) - fprintf (stderr, "DAC%02x = %02x\n", r-S3_DAC, VgaFetch (&s3vga->card, r)); - fprintf (stderr, "MISC_OUT = %02x\n", VgaFetch (&s3vga->card, S3_MISC_OUT)); - fprintf (stderr, "INPUT_STATUS = %02x\n", VgaFetch (&s3vga->card, S3_INPUT_STATUS_1)); - - - for (i = 0; streams[i][0]; i++) - { - for (reg = streams[i][0]; reg <= streams[i][1]; reg += 4) - fprintf (stderr, "0x%4x: 0x%08x\n", reg, regs[reg/4]); - } - } -#endif - return TRUE; -} - -void -s3Disable (ScreenPtr pScreen) -{ -} - -void -s3Restore (KdCardInfo *card) -{ - S3CardInfo *s3c = card->driver; - S3Ptr s3 = s3c->s3; - S3Vga *s3vga = &s3c->s3vga; - S3Save *save = &s3c->save; - CARD8 *cursor_base; - CARD8 streams_mode; - - _s3SetBlank (s3, s3vga, TRUE); - /* streams processor state */ - streams_mode = s3Get (s3vga, s3_streams_mode); - s3SetImm (s3vga, s3_streams_mode, 3); - s3->global_bitmap_1 = save->global_bitmap_1; - s3->global_bitmap_2 = save->global_bitmap_2; - s3->adv_func_cntl = save->adv_func_cntl; - s3->primary_bitmap_1 = save->primary_bitmap_1; - s3->primary_bitmap_2 = save->primary_bitmap_2; - s3->secondary_bitmap_1 = save->secondary_bitmap_1; - s3->secondary_bitmap_2 = save->secondary_bitmap_2; - s3->primary_stream_control = save->primary_stream_control; - s3->blend_control = save->blend_control; - s3->primary_stream_addr_0 = save->primary_stream_addr_0; - s3->primary_stream_addr_0 = save->primary_stream_addr_0; - s3->primary_stream_stride = save->primary_stream_stride; - s3->primary_stream_xy = save->primary_stream_xy; - s3->primary_stream_size = save->primary_stream_size; - s3->primary_stream_mem = save->primary_stream_mem; - s3->secondary_stream_xy = save->secondary_stream_xy; - s3->secondary_stream_size = save->secondary_stream_size; - s3->streams_fifo = save->streams_fifo; - s3SetImm (s3vga, s3_streams_mode, streams_mode); - /* graphics engine state */ - s3->alt_mix = save->alt_mix; - s3->write_mask = save->write_mask; - s3->fg = save->fg; - s3->bg = save->bg; - /* XXX should save and restore real values? */ - s3->scissors_tl = 0x00000000; - s3->scissors_br = 0x0fff0fff; - - VgaRestore (&s3vga->card); - s3Set (s3vga, s3_linear_window_size, 3); - s3Set (s3vga, s3_enable_linear, 1); - VgaFlush (&s3vga->card); - memcpy (s3c->frameBuffer, save->text_save, S3_TEXT_SAVE); - s3Reset (s3vga); - _s3SetBlank (s3, s3vga, FALSE); -} - -void -_s3SetSync (S3CardInfo *s3c, int hsync, int vsync) -{ - /* this abuses the macros defined to access the crtc structure */ - S3Ptr s3 = s3c->s3; - S3Vga *s3vga = &s3c->s3vga; - - s3Set (s3vga, s3_hsync_control, hsync); - s3Set (s3vga, s3_vsync_control, vsync); - VgaFlush (&s3vga->card); -} - -Bool -s3DPMS (ScreenPtr pScreen, int mode) -{ - KdScreenPriv(pScreen); - s3CardInfo(pScreenPriv); - S3Vga *s3vga = &s3c->s3vga; - - switch (mode) { - case KD_DPMS_NORMAL: - _s3SetSync (s3c, 0, 0); - _s3SetBlank (s3c->s3, s3vga, FALSE); - break; - case KD_DPMS_STANDBY: - _s3SetBlank (s3c->s3, s3vga, TRUE); - _s3SetSync (s3c, 1, 0); - break; - case KD_DPMS_SUSPEND: - _s3SetBlank (s3c->s3, s3vga, TRUE); - _s3SetSync (s3c, 0, 1); - break; - case KD_DPMS_POWERDOWN: - _s3SetBlank (s3c->s3, s3vga, TRUE); - _s3SetSync (s3c, 1, 1); - break; - } - return TRUE; -} - -Bool -s3InitScreen(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - KdCardInfo *card = pScreenPriv->card; - KdScreenInfo *screen = pScreenPriv->screen; - s3CardInfo (pScreenPriv); - s3ScreenInfo (pScreenPriv); - int ma, fb; - - if (screen->fb[1].depth) - { - FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pScreen); - - for (ma = 0; s3s->fbmap[ma] >= 0; ma++) - { - fb = s3s->fbmap[ma]; - pScrPriv->layer[fb].key = s3s->fb[ma].chroma_key; - } - } - return TRUE; -} - -void -s3ScreenFini (KdScreenInfo *screen) -{ - S3ScreenInfo *s3s = (S3ScreenInfo *) screen->driver; - - xfree (s3s); - screen->driver = 0; -} - -void -s3CardFini (KdCardInfo *card) -{ - S3CardInfo *s3c = (S3CardInfo *) card->driver; - - KdUnmapDevice (s3c->frameBuffer, s3c->memory); - KdUnmapDevice (s3c->registers, sizeof (S3) + PACKED_OFFSET); - xfree (s3c); - card->driver = 0; -} - -KdCardFuncs s3Funcs = { - s3CardInit, - s3ScreenInit, - s3InitScreen, - s3Preserve, - s3Enable, - s3DPMS, - s3Disable, - s3Restore, - s3ScreenFini, - s3CardFini, - s3CursorInit, - s3CursorEnable, - s3CursorDisable, - s3CursorFini, - s3RecolorCursor, - s3DrawInit, - s3DrawEnable, - s3DrawSync, - s3DrawDisable, - s3DrawFini, - s3GetColors, - s3PutColors, -}; diff --git a/hw/kdrive/savage/s3.h b/hw/kdrive/savage/s3.h deleted file mode 100644 index d8db0ebbf..000000000 --- a/hw/kdrive/savage/s3.h +++ /dev/null @@ -1,533 +0,0 @@ -/* - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifndef _S3_H_ -#define _S3_H_ - -#include "kdrive.h" -#include "s3reg.h" - -/* VESA Approved Register Definitions */ - -/* - * Linear Addressing 000 0000 - 0ff ffff (16m) - * Image data transfer 100 0000 - 100 7fff (32k) - * PCI config 100 8000 - 100 8043 - * Packed enhanced regs 100 8100 - 100 814a - * Streams regs 100 8180 - 100 81ff - * Current Y pos 100 82e8 - * CRT VGA 3b? regs 100 83b0 - 100 83bf - * CRT VGA 3c? regs 100 83c0 - 100 83cf - * CRT VGA 3d? regs 100 83d0 - 100 83df - * Subsystem status (42e8h) 100 8504 - * Advanced function (42e8h) 100 850c - * Enhanced regs 100 86e8 - 100 eeea - * Local peripheral bus 100 ff00 - 100 ff5c - * - * We don't care about the image transfer or PCI regs, so - * this structure starts at the packed enhanced regs - */ - -typedef volatile CARD32 VOL32; -typedef volatile CARD16 VOL16; -typedef volatile CARD8 VOL8; - -typedef volatile struct _s3 { - VOL32 alt_curxy; /* 8100 */ - VOL32 _pad0; /* 8104 */ - VOL32 alt_step; /* 8108 */ - VOL32 _pad1; /* 810c */ - VOL32 err_term; /* 8110 */ - VOL32 _pad2; /* 8114 */ - VOL32 cmd_gp_stat; /* 8118 */ - VOL32 short_stroke; /* 811c */ - VOL32 bg; /* 8120 */ - VOL32 fg; /* 8124 */ - VOL32 write_mask; /* 8128 */ - VOL32 read_mask; /* 812c */ - VOL32 color_cmp; /* 8130 */ - VOL32 alt_mix; /* 8134 */ - VOL32 scissors_tl; /* 8138 */ - VOL32 scissors_br; /* 813c */ -#if 0 - VOL16 pix_cntl; /* 8140 */ - VOL16 mult_misc2; /* 8142 */ -#else - VOL32 pix_cntl_mult_misc2; /* 8140 */ -#endif - VOL32 mult_misc_read_sel; /* 8144 */ - VOL32 alt_pcnt; /* 8148 min_axis_pcnt, maj_axis_pcnt */ - VOL8 _pad3a[0x1c]; /* 814c */ - VOL32 global_bitmap_1; /* 8168 */ - VOL32 global_bitmap_2; /* 816c */ - VOL32 primary_bitmap_1; /* 8170 */ - VOL32 primary_bitmap_2; /* 8174 */ - VOL32 secondary_bitmap_1; /* 8178 */ - VOL32 secondary_bitmap_2; /* 817c */ - VOL32 primary_stream_control; /* 8180 */ - VOL32 chroma_key_control; /* 8184 */ - VOL32 genlocking_control; /* 8188 */ - VOL8 _pad3b[0x4]; /* 818c */ - VOL32 secondary_stream_control; /* 8190 */ - VOL32 chroma_key_upper_bound; /* 8194 */ - VOL32 secondary_stream_h_scale; /* 8198 */ - VOL32 color_adjustment; /* 819c */ - VOL32 blend_control; /* 81a0 */ - VOL8 _pad3c[0x1c]; /* 81a4 */ - VOL32 primary_stream_addr_0; /* 81c0 */ - VOL32 primary_stream_addr_1; /* 81c4 */ - VOL32 primary_stream_stride; /* 81c8 */ - VOL32 secondary_stream_mbuf; /* 81cc */ - VOL32 secondary_stream_addr_0;/* 81d0 */ - VOL32 secondary_stream_addr_1;/* 81d4 */ - VOL32 secondary_stream_stride;/* 81d8 */ - VOL8 _pad81dc[4]; /* 81dc */ - VOL32 secondary_stream_vscale;/* 81e0 */ - VOL32 secondary_stream_vinit; /* 81e4 */ - VOL32 secondary_stream_scount;/* 81e8 */ - VOL32 streams_fifo; /* 81ec */ - VOL32 primary_stream_xy; /* 81f0 */ - VOL32 primary_stream_size; /* 81f4 */ - VOL32 secondary_stream_xy; /* 81f8 */ - VOL32 secondary_stream_size; /* 81fc */ - VOL8 _pad8200[0xe8]; /* 8200 */ - VOL32 cur_y; /* 82e8 */ - VOL8 _pad4[0x14]; /* 82ec */ - VOL32 primary_stream_mem; /* 8300 */ - VOL32 secondary_stream_mem; /* 8304 */ - VOL8 _pad8308[0xD2]; /* 8308 */ - VOL8 input_status_1; /* 83da */ - VOL8 _pad83db[0x131]; /* 83db */ - VOL32 adv_func_cntl; /* 850c */ - VOL8 _pad8510[0x5dd8]; /* 8510 */ - VOL32 pix_trans; /* e2e8 */ - VOL8 _pade2ec[0x3a92c]; /* e2ec */ - VOL32 cmd_overflow_buf_ptr; /* 48c18 */ - VOL8 _pad48c1c[0x8]; /* 48c1c */ - VOL32 bci_power_management; /* 48c24 */ - VOL8 _pad48c28[0x38]; /* 48c28 */ - VOL32 alt_status_0; /* 48c60 */ - VOL32 alt_status_1; /* 48c64 */ -} S3, *S3Ptr; - -#define VGA_STATUS_1_DTM 0x01 -#define VGA_STATUS_1_VSY 0x08 - -#define DAC_MASK 0x03c6 -#define DAC_R_INDEX 0x03c7 -#define DAC_W_INDEX 0x03c8 -#define DAC_DATA 0x03c9 -#define DISP_STAT 0x02e8 -#define H_TOTAL 0x02e8 -#define H_DISP 0x06e8 -#define H_SYNC_STRT 0x0ae8 -#define H_SYNC_WID 0x0ee8 -#define V_TOTAL 0x12e8 -#define V_DISP 0x16e8 -#define V_SYNC_STRT 0x1ae8 -#define V_SYNC_WID 0x1ee8 -#define DISP_CNTL 0x22e8 -#define ADVFUNC_CNTL 0x4ae8 -#define SUBSYS_STAT 0x42e8 -#define SUBSYS_CNTL 0x42e8 -#define ROM_PAGE_SEL 0x46e8 -#define CUR_Y 0x82e8 -#define CUR_X 0x86e8 -#define DESTY_AXSTP 0x8ae8 -#define DESTX_DIASTP 0x8ee8 -#define ERR_TERM 0x92e8 -#define MAJ_AXIS_PCNT 0x96e8 -#define GP_STAT 0x9ae8 -#define CMD 0x9ae8 -#define SHORT_STROKE 0x9ee8 -#define BKGD_COLOR 0xa2e8 -#define FRGD_COLOR 0xa6e8 -#define WRT_MASK 0xaae8 -#define RD_MASK 0xaee8 -#define COLOR_CMP 0xb2e8 -#define BKGD_MIX 0xb6e8 -#define FRGD_MIX 0xbae8 -#define MULTIFUNC_CNTL 0xbee8 -#define MIN_AXIS_PCNT 0x0000 -#define SCISSORS_T 0x1000 -#define SCISSORS_L 0x2000 -#define SCISSORS_B 0x3000 -#define SCISSORS_R 0x4000 -#define MEM_CNTL 0x5000 -#define PATTERN_L 0x8000 -#define PATTERN_H 0x9000 -#define PIX_CNTL 0xa000 -#define CONTROL_MISC2 0xd000 -#define PIX_TRANS 0xe2e8 - -/* Advanced Function Control Regsiter */ -#define CLKSEL 0x0004 -#define DISABPASSTHRU 0x0001 - -/* Graphics Processor Status Register */ - -#define GPNSLOT 13 - -#define GPBUSY_1 0x0080 -#define GPBUSY_2 0x0040 -#define GPBUSY_3 0x0020 -#define GPBUSY_4 0x0010 -#define GPBUSY_5 0x0008 -#define GPBUSY_6 0x0004 -#define GPBUSY_7 0x0002 -#define GPBUSY_8 0x0001 -#define GPBUSY_9 0x8000 -#define GPBUSY_10 0x4000 -#define GPBUSY_11 0x2000 -#define GPBUSY_12 0x1000 -#define GPBUSY_13 0x0800 - -#define GPEMPTY 0x0400 -#define GPBUSY 0x0200 -#define DATDRDY 0x0100 - -/* Command Register */ -#define CMD_NOP 0x0000 -#define CMD_LINE 0x2000 -#define CMD_RECT 0x4000 -#define CMD_RECTV1 0x6000 -#define CMD_RECTV2 0x8000 -#define CMD_LINEAF 0xa000 -#define CMD_BITBLT 0xc000 -#define CMD_PATBLT 0xe000 -#define CMD_OP_MSK 0xe000 -#define BYTSEQ 0x1000 -#define _32BITNOPAD 0x0600 -#define _32BIT 0x0400 -#define _16BIT 0x0200 -#define _8BIT 0x0000 -#define PCDATA 0x0100 -#define INC_Y 0x0080 -#define YMAJAXIS 0x0040 -#define INC_X 0x0020 -#define DRAW 0x0010 -#define LINETYPE 0x0008 -#define LASTPIX 0x0004 /* Draw last pixel in line */ -#define PLANAR 0x0002 -#define WRTDATA 0x0001 - -/* Background Mix Register */ -#define BSS_BKGDCOL 0x0000 -#define BSS_FRGDCOL 0x0020 -#define BSS_PCDATA 0x0040 -#define BSS_BITBLT 0x0060 - -/* Foreground Mix Register */ -#define FSS_BKGDCOL 0x0000 -#define FSS_FRGDCOL 0x0020 -#define FSS_PCDATA 0x0040 -#define FSS_BITBLT 0x0060 - -/* The Mixes */ -#define MIX_MASK 0x001f - -#define MIX_NOT_DST 0x0000 -#define MIX_0 0x0001 -#define MIX_1 0x0002 -#define MIX_DST 0x0003 -#define MIX_NOT_SRC 0x0004 -#define MIX_XOR 0x0005 -#define MIX_XNOR 0x0006 -#define MIX_SRC 0x0007 -#define MIX_NAND 0x0008 -#define MIX_NOT_SRC_OR_DST 0x0009 -#define MIX_SRC_OR_NOT_DST 0x000a -#define MIX_OR 0x000b -#define MIX_AND 0x000c -#define MIX_SRC_AND_NOT_DST 0x000d -#define MIX_NOT_SRC_AND_DST 0x000e -#define MIX_NOR 0x000f - -#define MIX_MIN 0x0010 -#define MIX_DST_MINUS_SRC 0x0011 -#define MIX_SRC_MINUS_DST 0x0012 -#define MIX_PLUS 0x0013 -#define MIX_MAX 0x0014 -#define MIX_HALF__DST_MINUS_SRC 0x0015 -#define MIX_HALF__SRC_MINUS_DST 0x0016 -#define MIX_AVERAGE 0x0017 -#define MIX_DST_MINUS_SRC_SAT 0x0018 -#define MIX_SRC_MINUS_DST_SAT 0x001a -#define MIX_HALF__DST_MINUS_SRC_SAT 0x001c -#define MIX_HALF__SRC_MINUS_DST_SAT 0x001e -#define MIX_AVERAGE_SAT 0x001f - -/* Pixel Control Register */ -#define MIXSEL_FRGDMIX 0x0000 -#define MIXSEL_PATT 0x0040 -#define MIXSEL_EXPPC 0x0080 -#define MIXSEL_EXPBLT 0x00c0 -#define COLCMPOP_F 0x0000 -#define COLCMPOP_T 0x0008 -#define COLCMPOP_GE 0x0010 -#define COLCMPOP_LT 0x0018 -#define COLCMPOP_NE 0x0020 -#define COLCMPOP_EQ 0x0028 -#define COLCMPOP_LE 0x0030 -#define COLCMPOP_GT 0x0038 -#define PLANEMODE 0x0004 - -/* Multifunction Control Misc 8144 */ -#define MISC_DST_BA_0 (0x0 << 0) -#define MISC_DST_BA_1 (0x1 << 0) -#define MISC_DST_BA_2 (0x2 << 0) -#define MISC_DST_BA_3 (0x3 << 0) -#define MISC_SRC_BA_0 (0x0 << 2) -#define MISC_SRC_BA_1 (0x1 << 2) -#define MISC_SRC_BA_2 (0x2 << 2) -#define MISC_SRC_BA_3 (0x3 << 2) -#define MISC_RSF (1 << 4) -#define MISC_EXT_CLIP (1 << 5) -#define MISC_SRC_NE (1 << 7) -#define MISC_ENB_CMP (1 << 8) -#define MISC_32B (1 << 9) -#define MISC_DC (1 << 11) -#define MISC_INDEX_E (0xe << 12) - -#define S3_SAVAGE4_SLOTS 0x0001ffff -#define S3_SAVAGE4_2DI 0x00800000 - -#define _s3WaitLoop(s3,mask,value){ \ - int __loop = 1000000; \ - while (((s3)->alt_status_0 & (mask)) != (value)) \ - if (--__loop == 0) { \ - ErrorF ("savage wait loop failed 0x%x\n", s3->alt_status_0); \ - break; \ - } \ -} - -#define S3_SAVAGE4_ROOM 10 - -#define _s3WaitSlots(s3,n) { \ - int __loop = 1000000; \ - while (((s3)->alt_status_0 & S3_SAVAGE4_SLOTS) >= S3_SAVAGE4_ROOM-(n)) \ - if (--__loop == 0) { \ - ErrorF ("savage wait loop failed 0x%x\n", s3->alt_status_0); \ - break; \ - } \ -} - -#define _s3WaitEmpty(s3) _s3WaitLoop(s3,S3_SAVAGE4_SLOTS, 0) -#define _s3WaitIdleEmpty(s3) _s3WaitLoop(s3,S3_SAVAGE4_SLOTS|S3_SAVAGE4_2DI, S3_SAVAGE4_2DI) -#define _s3WaitIdle(s3) _s3WaitLoop(s3,S3_SAVAGE4_2DI, S3_SAVAGE4_2DI) - -typedef struct _s3Cursor { - int width, height; - int xhot, yhot; - Bool has_cursor; - CursorPtr pCursor; - Pixel source, mask; -} S3Cursor; - -typedef struct _s3PatternCache { - int id; - int x, y; -} S3PatternCache; - -typedef struct _s3Patterns { - S3PatternCache *cache; - int ncache; - int last_used; - int last_id; -} S3Patterns; - -#define S3_CLOCK_REF 14318 /* KHz */ - -#define S3_CLOCK(m,n,r) ((S3_CLOCK_REF * ((m) + 2)) / (((n) + 2) * (1 << (r)))) - -#define S3_MAX_CLOCK 150000 /* KHz */ - -typedef struct _s3Timing { - /* label */ - int horizontal; - int vertical; - int rate; - /* horizontal timing */ - int hfp; /* front porch */ - int hbp; /* back porch */ - int hblank; /* blanking */ - /* vertical timing */ - int vfp; /* front porch */ - int vbp; /* back porch */ - int vblank; /* blanking */ - /* clock values */ - int dac_m; - int dac_n; - int dac_r; -} S3Timing; - -#define S3_TEXT_SAVE (64*1024) - -typedef struct _s3Save { - CARD8 cursor_fg; - CARD8 cursor_bg; - CARD8 lock1; - CARD8 lock2; - CARD8 locksrtc; - CARD8 clock_mode; - CARD32 alt_mix; - CARD32 write_mask; - CARD32 fg; - CARD32 bg; - CARD32 global_bitmap_1; - CARD32 global_bitmap_2; - CARD32 adv_func_cntl; - CARD32 primary_bitmap_1; - CARD32 primary_bitmap_2; - CARD32 secondary_bitmap_1; - CARD32 secondary_bitmap_2; - CARD32 primary_stream_control; - CARD32 blend_control; - CARD32 primary_stream_addr_0; - CARD32 primary_stream_addr_1; - CARD32 primary_stream_stride; - CARD32 primary_stream_xy; - CARD32 primary_stream_size; - CARD32 primary_stream_mem; - CARD32 secondary_stream_xy; - CARD32 secondary_stream_size; - CARD32 streams_fifo; - CARD8 text_save[S3_TEXT_SAVE]; -} S3Save; - -typedef struct _s3CardInfo { - S3Ptr s3; /* pointer to register structure */ - int memory; /* amount of memory */ - CARD8 *frameBuffer; /* pointer to frame buffer */ - CARD8 *registers; /* pointer to register map */ - S3Vga s3vga; - S3Save save; - Bool need_sync; - Bool bios_initialized; /* whether the bios has been run */ -} S3CardInfo; - -typedef struct _s3FbInfo { - CARD8 *offscreen; /* pointer to offscreen area */ - int offscreen_y; /* top y coordinate of offscreen area */ - int offscreen_x; /* top x coordinate of offscreen area */ - int offscreen_width; /* width of offscreen area */ - int offscreen_height; /* height of offscreen area */ - S3Patterns patterns; - CARD32 bitmap_offset; - int accel_stride; - int accel_bpp; - CARD32 chroma_key; -} S3FBInfo; - -typedef struct _s3ScreenInfo { - CARD8 *cursor_base; /* pointer to cursor area */ - S3Cursor cursor; - Bool managing_border; - Bool use_streams; - int primary_depth; - int current_ma; - CARD32 border_pixel; - S3FBInfo fb[KD_MAX_FB]; - RegionRec region[KD_MAX_FB]; - int fbmap[KD_MAX_FB+1]; /* map from fb to stream */ -} S3ScreenInfo; - -#define getS3CardInfo(kd) ((S3CardInfo *) ((kd)->card->driver)) -#define s3CardInfo(kd) S3CardInfo *s3c = getS3CardInfo(kd) - -#define getS3ScreenInfo(kd) ((S3ScreenInfo *) ((kd)->screen->driver)) -#define s3ScreenInfo(kd) S3ScreenInfo *s3s = getS3ScreenInfo(kd) - -Bool s3CardInit (KdCardInfo *); -Bool s3ScreenInit (KdScreenInfo *); -Bool s3Enable (ScreenPtr pScreen); -void s3Disable (ScreenPtr pScreen); -void s3Fini (ScreenPtr pScreen); - -Bool s3CursorInit (ScreenPtr pScreen); -void s3CursorEnable (ScreenPtr pScreen); -void s3CursorDisable (ScreenPtr pScreen); -void s3CursorFini (ScreenPtr pScreen); -void s3RecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdefs); - -void s3DumbCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); - -Bool s3DrawInit (ScreenPtr pScreen); -void s3DrawEnable (ScreenPtr pScreen); -void s3DrawSync (ScreenPtr pScreen); -void s3DrawDisable (ScreenPtr pScreen); -void s3DrawFini (ScreenPtr pScreen); - -void s3GetColors (ScreenPtr pScreen, int fb, int ndef, xColorItem *pdefs); -void s3PutColors (ScreenPtr pScreen, int fb, int ndef, xColorItem *pdefs); - -void S3InitCard (KdCardAttr *attr); - -void s3GetClock (int target, int *Mp, int *Np, int *Rp, int maxM, int maxN, int maxR, int minVco); - -extern KdCardFuncs s3Funcs; - -/* - * Wait for the begining of the retrace interval - */ - -#define S3_RETRACE_LOOP_CHECK if (++_loop_count > 300000) {\ - DRAW_DEBUG ((DEBUG_FAILURE, "S3 wait loop failed at %s:%d", \ - __FILE__, __LINE__)); \ - break; \ -} - -#define DRAW_DEBUG(a) - -#define _s3WaitVRetrace(s3vga) { \ - int _loop_count; \ - _loop_count = 0; \ - while (s3GetImm(s3vga, s3_vertical_sync_active) != 0) S3_RETRACE_LOOP_CHECK; \ - _loop_count = 0; \ - while (s3GetImm(s3vga, s3_vertical_sync_active) == 0) S3_RETRACE_LOOP_CHECK; \ -} -#define _s3WaitVRetraceFast(s3) { \ - int _loop_count; \ - _loop_count = 0; \ - while (s3->input_status_1 & 8) S3_RETRACE_LOOP_CHECK; \ - _loop_count = 0; \ - while ((s3->input_status_1 & 8) == 0) S3_RETRACE_LOOP_CHECK; \ -} -/* - * Wait for the begining of the retrace interval - */ -#define _s3WaitVRetraceEnd(s3vga) { \ - int _loop_count; \ - _loop_count = 0; \ - while (s3GetImm(s3vga, s3_vertical_sync_active) == 0) S3_RETRACE_LOOP_CHECK; \ - _loop_count = 0; \ - while (s3GetImm(s3vga, s3_vertical_sync_active) != 0) S3_RETRACE_LOOP_CHECK; \ -} - -#define S3_CURSOR_WIDTH 64 -#define S3_CURSOR_HEIGHT 64 -#define S3_CURSOR_SIZE ((S3_CURSOR_WIDTH * S3_CURSOR_HEIGHT + 7) / 8) - -#define S3_TILE_SIZE 8 - -#endif /* _S3_H_ */ diff --git a/hw/kdrive/savage/s3.nick b/hw/kdrive/savage/s3.nick deleted file mode 100644 index 8f6791f87..000000000 --- a/hw/kdrive/savage/s3.nick +++ /dev/null @@ -1,41 +0,0 @@ -/* $RCSId: $ */ - -global f_ref = 14318000; - -function s3_clock (m, n, r) -{ - return f_ref * (m + 2) / ((n + 2) * (2 ^ r)); -} - -function s3_near (f1, f2) -{ - return abs (f1 - f2) < f1 / 10; -} - -function s3_clocks (f) -{ - auto m, n, r, ft; - auto dist, min_dist; - auto min_m, min_n, min_r; - - min_dist = f / 5; - for (r = 0; r <= 3; r++) - for (n = 0; n <= 31; n++) - for (m = 0; m <= 127; m++) - { - ft = s3_clock (m, n, r); - if (s3_near (ft, f)) - printf ("m %d n %d r %d = %d\n", - m, n, r, ft); - dist = abs (f - ft); - if (dist < min_dist) - { - min_dist = dist; - min_m = m; - min_n = n; - min_r = r; - } - } - printf ("m %d n %d r %d f %d dist %d\n", - min_m, min_n, min_r, s3_clock(min_m, min_n, min_r), min_dist); -} diff --git a/hw/kdrive/savage/s3clock.c b/hw/kdrive/savage/s3clock.c deleted file mode 100644 index 9e3f8b3e0..000000000 --- a/hw/kdrive/savage/s3clock.c +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "s3.h" - -/* - * Clock synthesis: - * - * f_out = f_ref * ((M + 2) / ((N + 2) * (1 << R))) - * - * Constraints: - * - * 1. 135MHz <= f_ref * ((M + 2) / (N + 2)) <= 270 MHz - * 2. N >= 1 - * - * Vertical refresh rate = clock / ((hsize + hblank) * (vsize + vblank)) - * Horizontal refresh rate = clock / (hsize + hblank) - */ - -/* all in kHz */ - -void -s3GetClock (int target, int *Mp, int *Np, int *Rp, int maxM, int maxN, int maxR, int minVco) -{ - int M, N, R, bestM, bestN; - int f_vco, f_out; - int err, abserr, besterr; - - /* - * Compute correct R value to keep VCO in range - */ - for (R = 0; R <= maxR; R++) - { - f_vco = target * (1 << R); - if (f_vco >= minVco) - break; - } - - /* M = f_out / f_ref * ((N + 2) * (1 << R)); */ - besterr = target; - for (N = 1; N <= maxN; N++) - { - M = ((target * (N + 2) * (1 << R) + (S3_CLOCK_REF/2)) + S3_CLOCK_REF/2) / S3_CLOCK_REF - 2; - if (0 <= M && M <= maxM) - { - f_out = S3_CLOCK(M,N,R); - err = target - f_out; - if (err < 0) - err = -err; - if (err < besterr) - { - besterr = err; - bestM = M; - bestN = N; - } - } - } - *Mp = bestM; - *Np = bestN; - *Rp = R; -} diff --git a/hw/kdrive/savage/s3cmap.c b/hw/kdrive/savage/s3cmap.c deleted file mode 100644 index 094a24755..000000000 --- a/hw/kdrive/savage/s3cmap.c +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "s3.h" - -void -s3GetColors (ScreenPtr pScreen, int fb, int ndef, xColorItem *pdefs) -{ - KdScreenPriv(pScreen); - s3CardInfo(pScreenPriv); - S3Vga *s3vga = &s3c->s3vga; - - while (ndef--) - { - s3SetImm (s3vga, s3_dac_read_index, pdefs->pixel); - pdefs->red = s3GetImm (s3vga, s3_dac_data) << 8; - pdefs->green = s3GetImm (s3vga, s3_dac_data) << 8; - pdefs->blue = s3GetImm (s3vga, s3_dac_data) << 8; - pdefs++; - } -} - -#ifndef S3_TRIO -#define Shift(v,d) ((d) < 0 ? ((v) >> (-d)) : ((v) << (d))) - -void -s3SetTrueChromaKey (ScreenPtr pScreen, int pfb, xColorItem *pdef) -{ - FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pScreen); - KdScreenPriv(pScreen); - s3ScreenInfo(pScreenPriv); - int fb, ma; - CARD32 key; - int r, g, b; - - for (ma = 0; s3s->fbmap[ma] >= 0; ma++) - { - fb = s3s->fbmap[ma]; - if (fb != pfb && pScreenPriv->screen->fb[fb].redMask) - { - r = KdComputeCmapShift (pScreenPriv->screen->fb[fb].redMask); - g = KdComputeCmapShift (pScreenPriv->screen->fb[fb].greenMask); - b = KdComputeCmapShift (pScreenPriv->screen->fb[fb].blueMask); - key = ((Shift(pdef->red,r) & pScreenPriv->screen->fb[fb].redMask) | - (Shift(pdef->green,g) & pScreenPriv->screen->fb[fb].greenMask) | - (Shift(pdef->blue,b) & pScreenPriv->screen->fb[fb].blueMask)); - if (pScrPriv->layer[fb].key != key) - { - pScrPriv->layer[fb].key = key; - (*pScrPriv->PaintKey) (&pScrPriv->layer[fb].u.run.pixmap->drawable, - &pScrPriv->layer[pfb].u.run.region, - pScrPriv->layer[fb].key, fb); - } - } - } -} -#endif - -void -s3PutColors (ScreenPtr pScreen, int fb, int ndef, xColorItem *pdefs) -{ - KdScreenPriv(pScreen); - s3CardInfo(pScreenPriv); - s3ScreenInfo(pScreenPriv); - S3Vga *s3vga = &s3c->s3vga; - xColorItem *chroma = 0; - CARD32 key; - -#if 0 - _s3WaitVRetrace (s3vga); -#else - S3Ptr s3 = s3c->s3; - _s3WaitVRetraceFast(s3); -#endif -#ifndef S3_TRIO - if (pScreenPriv->screen->fb[1].depth) - { - FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pScreen); - key = pScrPriv->layer[fb].key; - } -#endif - else - key = ~0; - while (ndef--) - { - if (pdefs->pixel == key) - chroma = pdefs; - s3SetImm (s3vga, s3_dac_write_index, pdefs->pixel); - s3SetImm (s3vga, s3_dac_data, pdefs->red >> 8); - s3SetImm (s3vga, s3_dac_data, pdefs->green >> 8); - s3SetImm (s3vga, s3_dac_data, pdefs->blue >> 8); - pdefs++; - } -#ifndef S3_TRIO - if (chroma && !pScreenPriv->closed) - s3SetTrueChromaKey (pScreen, fb, chroma); -#endif -} - diff --git a/hw/kdrive/savage/s3curs.c b/hw/kdrive/savage/s3curs.c deleted file mode 100644 index 5928989a6..000000000 --- a/hw/kdrive/savage/s3curs.c +++ /dev/null @@ -1,422 +0,0 @@ -/* - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "s3.h" -#include "s3draw.h" -#include "cursorstr.h" - -#define SetupCursor(s) KdScreenPriv(s); \ - s3CardInfo(pScreenPriv); \ - s3ScreenInfo(pScreenPriv); \ - S3Ptr s3 = s3c->s3; \ - S3Vga *s3vga = &s3c->s3vga; \ - S3Cursor *pCurPriv = &s3s->cursor - -static void -_s3MoveCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor(pScreen); - CARD8 xlow, xhigh, ylow, yhigh; - CARD8 xoff, yoff; - - DRAW_DEBUG ((DEBUG_CURSOR, "s3MoveCursor %d %d", x, y)); - - x -= pCurPriv->xhot; - xoff = 0; - if (x < 0) - { - xoff = -x; - x = 0; - } - y -= pCurPriv->yhot; - yoff = 0; - if (y < 0) - { - yoff = -y; - y = 0; - } - xlow = (CARD8) x; - xhigh = (CARD8) (x >> 8); - ylow = (CARD8) y; - yhigh = (CARD8) (y >> 8); - - - /* This is the recommended order to move the cursor */ - - s3SetImm (s3vga, s3_cursor_xhigh, xhigh); - s3SetImm (s3vga, s3_cursor_xlow, xlow); - s3SetImm (s3vga, s3_cursor_ylow, ylow); - s3SetImm (s3vga, s3_cursor_xoff, xoff); - s3SetImm (s3vga, s3_cursor_yoff, yoff); - s3SetImm (s3vga, s3_cursor_yhigh, yhigh); - - DRAW_DEBUG ((DEBUG_CURSOR, "s3MoveCursor done")); -} - -static void -s3MoveCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor (pScreen); - - if (!pCurPriv->has_cursor) - return; - - if (!pScreenPriv->enabled) - return; - - _s3MoveCursor (pScreen, x, y); -} - -#define S3Trunc(c) (((c) >> 8) & 0xff) - -#define S3CursColor(r,g,b) ((S3Trunc(r) << 16) | \ - (S3Trunc(g) << 8) | \ - (S3Trunc(b))) - -static void -s3AllocCursorColors (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - - if (s3s->use_streams) - { - pCurPriv->source = S3CursColor(pCursor->foreRed, - pCursor->foreGreen, - pCursor->foreBlue); - pCurPriv->mask = S3CursColor(pCursor->backRed, - pCursor->backGreen, - pCursor->backBlue); - } - else - { - KdAllocateCursorPixels (pScreen, 0, pCursor, - &pCurPriv->source, &pCurPriv->mask); - switch (pScreenPriv->screen->fb[0].bitsPerPixel) { - case 4: - pCurPriv->source |= pCurPriv->source << 4; - pCurPriv->mask |= pCurPriv->mask << 4; - case 8: - pCurPriv->source |= pCurPriv->source << 8; - pCurPriv->mask |= pCurPriv->mask << 8; - case 16: - pCurPriv->source |= pCurPriv->source << 16; - pCurPriv->mask |= pCurPriv->mask << 16; - } - } -} - -static void -_s3SetCursorColors (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - /* set foreground */ - /* Reset cursor color stack pointers */ - (void) s3GetImm (s3vga, s3_cursor_enable); - s3SetImm (s3vga, s3_cursor_fg, pCurPriv->source); - s3SetImm (s3vga, s3_cursor_fg, pCurPriv->source >> 8); - s3SetImm (s3vga, s3_cursor_fg, pCurPriv->source >> 16); - - /* set background */ - /* Reset cursor color stack pointers */ - (void) s3GetImm (s3vga, s3_cursor_enable); - s3SetImm (s3vga, s3_cursor_bg, pCurPriv->mask); - s3SetImm (s3vga, s3_cursor_bg, pCurPriv->mask >> 8); - s3SetImm (s3vga, s3_cursor_bg, pCurPriv->mask >> 16); -} - -void -s3RecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdef) -{ - SetupCursor (pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - xColorItem sourceColor, maskColor; - - if (!pCurPriv->has_cursor || !pCursor) - return; - - if (!pScreenPriv->enabled) - return; - - if (pdef) - { - while (ndef) - { - if (pdef->pixel == pCurPriv->source || - pdef->pixel == pCurPriv->mask) - break; - ndef--; - } - if (!ndef) - return; - } - s3AllocCursorColors (pScreen); - _s3SetCursorColors (pScreen); -} - -static void -s3LoadCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor(pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - CursorBitsPtr bits = pCursor->bits; - int w, h; - unsigned char r[2], g[2], b[2]; - unsigned long *ram; - unsigned long *msk, *mskLine, *src, *srcLine; - unsigned long and, xor; - int i, j; - int cursor_address; - int wsrc; - unsigned char ramdac_control_; - - /* - * Allocate new colors - */ - s3AllocCursorColors (pScreen); - - pCurPriv->pCursor = pCursor; - pCurPriv->xhot = pCursor->bits->xhot; - pCurPriv->yhot = pCursor->bits->yhot; - - /* - * Stick new image into cursor memory - */ - ram = (unsigned long *) s3s->cursor_base; - mskLine = (unsigned long *) bits->mask; - srcLine = (unsigned long *) bits->source; - - h = bits->height; - if (h > S3_CURSOR_HEIGHT) - h = S3_CURSOR_HEIGHT; - - wsrc = BitmapBytePad(bits->width) / 4; /* ulongs per line */ - - for (i = 0; i < S3_CURSOR_HEIGHT; i++) { - msk = mskLine; - src = srcLine; - mskLine += wsrc; - srcLine += wsrc; - for (j = 0; j < S3_CURSOR_WIDTH / 32; j++) { - - unsigned long m, s; - - if (i < h && j < wsrc) - { - m = *msk++; - s = *src++; - xor = m & s; - and = ~m; - } - else - { - and = 0xffffffff; - xor = 0x00000000; - } - - S3AdjustBits32(and); - S3AdjustBits32(xor); -#define S3SwapNibbles(x) ((x) = (((x) & 0x0f0f0f0f) << 4 | \ - ((x) >> 4) & 0x0f0f0f0f)) - if (s3s->use_streams) - { - S3SwapNibbles(and); - S3SwapNibbles(xor); - } - *ram++ = (and & 0xffff) | (xor << 16); - *ram++ = (and >> 16) | (xor & 0xffff0000); - } - } - - _s3WaitIdle (s3); - - /* Set new color */ - _s3SetCursorColors (pScreen); - - /* Enable the cursor */ - s3SetImm (s3vga, s3_cursor_ms_x11, 0); - s3SetImm (s3vga, s3_cursor_enable, 1); - - /* Wait for VRetrace to make sure the position is read */ - _s3WaitVRetrace (s3vga); - - /* Move to new position */ - _s3MoveCursor (pScreen, x, y); -} - -static void -s3UnloadCursor (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - /* Disable cursor */ - s3SetImm (s3vga, s3_cursor_enable, 0); -} - -static Bool -s3RealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) -{ - SetupCursor(pScreen); - - if (!pScreenPriv->enabled) - return TRUE; - - /* miRecolorCursor does this */ - if (pCurPriv->pCursor == pCursor) - { - if (pCursor) - { - int x, y; - - miPointerPosition (&x, &y); - s3LoadCursor (pScreen, x, y); - } - } - return TRUE; -} - -static Bool -s3UnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) -{ - return TRUE; -} - -static void -s3SetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y) -{ - SetupCursor(pScreen); - - pCurPriv->pCursor = pCursor; - - if (!pScreenPriv->enabled) - return; - - if (pCursor) - s3LoadCursor (pScreen, x, y); - else - s3UnloadCursor (pScreen); -} - -miPointerSpriteFuncRec s3PointerSpriteFuncs = { - s3RealizeCursor, - s3UnrealizeCursor, - s3SetCursor, - s3MoveCursor, -}; - -static void -s3QueryBestSize (int class, - unsigned short *pwidth, unsigned short *pheight, - ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - switch (class) - { - case CursorShape: - if (*pwidth > pCurPriv->width) - *pwidth = pCurPriv->width; - if (*pheight > pCurPriv->height) - *pheight = pCurPriv->height; - if (*pwidth > pScreen->width) - *pwidth = pScreen->width; - if (*pheight > pScreen->height) - *pheight = pScreen->height; - break; - default: - fbQueryBestSize (class, pwidth, pheight, pScreen); - break; - } -} - -Bool -s3CursorInit (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (!s3s->cursor_base) - { - DRAW_DEBUG ((DEBUG_CURSOR,"Not enough screen memory for cursor %d", s3d->memory)); - pCurPriv->has_cursor = FALSE; - return FALSE; - } - - pCurPriv->width = S3_CURSOR_WIDTH; - pCurPriv->height= S3_CURSOR_HEIGHT; - pScreen->QueryBestSize = s3QueryBestSize; - miPointerInitialize (pScreen, - &s3PointerSpriteFuncs, - &kdPointerScreenFuncs, - FALSE); - pCurPriv->has_cursor = TRUE; - pCurPriv->pCursor = NULL; - return TRUE; -} - -void -s3CursorEnable (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - DRAW_DEBUG ((DEBUG_INIT, "s3CursorEnable")); - if (pCurPriv->has_cursor) - { - if (pCurPriv->pCursor) - { - int x, y; - - miPointerPosition (&x, &y); - s3LoadCursor (pScreen, x, y); - } - else - s3UnloadCursor (pScreen); - } -} - -void -s3CursorDisable (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (!pScreenPriv->enabled) - return; - - if (pCurPriv->has_cursor) - { - if (pCurPriv->pCursor) - { - s3UnloadCursor (pScreen); - } - } -} - -void -s3CursorFini (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - pCurPriv->pCursor = NULL; -} diff --git a/hw/kdrive/savage/s3draw.c b/hw/kdrive/savage/s3draw.c deleted file mode 100644 index da0d6849f..000000000 --- a/hw/kdrive/savage/s3draw.c +++ /dev/null @@ -1,3114 +0,0 @@ -/* - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "s3.h" -#include "s3draw.h" - -#include "Xmd.h" -#include "gcstruct.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "regionstr.h" -#include "mistruct.h" -#include "fontstruct.h" -#include "dixfontstr.h" -#include "fb.h" -#include "migc.h" -#include "miline.h" - -/* - * Map X rops to S3 rops - */ - -short s3alu[16] = { - MIX_0, - MIX_AND, - MIX_SRC_AND_NOT_DST, - MIX_SRC, - MIX_NOT_SRC_AND_DST, - MIX_DST, - MIX_XOR, - MIX_OR, - MIX_NOR, - MIX_XNOR, - MIX_NOT_DST, - MIX_SRC_OR_NOT_DST, - MIX_NOT_SRC, - MIX_NOT_SRC_OR_DST, - MIX_NAND, - MIX_1 -}; - -/* - * Handle pixel transfers - */ - -#define BURST -#ifdef BURST -#define PixTransDeclare VOL32 *pix_trans_base = (VOL32 *) (s3c->registers),\ - *pix_trans = pix_trans_base -#define PixTransStart(n) if (pix_trans + (n) > pix_trans_base + 8192) pix_trans = pix_trans_base -#define PixTransStore(t) *pix_trans++ = (t) -#else -#define PixTransDeclare VOL32 *pix_trans = &s3->pix_trans -#define PixTransStart(n) -#define PixTransStore(t) *pix_trans = (t) -#endif - -DevPrivateKey s3GCPrivateKey = &s3GCPrivateKey; -DevPrivateKey s3WindowPrivateKey = &s3WindowPrivateKey; - -/* - s3DoBitBlt - ============= - Bit Blit for all window to window blits. -*/ - -#define sourceInvarient(alu) (((alu) & 3) == (((alu) >> 2) & 3)) - -void -s3CopyNtoN (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - BoxPtr pbox, - int nbox, - int dx, - int dy, - Bool reverse, - Bool upsidedown, - Pixel bitplane, - void *closure) -{ - SetupS3(pDstDrawable->pScreen); - int srcX, srcY, dstX, dstY; - int w, h; - int flags; - - if (sourceInvarient (pGC->alu)) - { - s3FillBoxSolid (pDstDrawable, nbox, pbox, 0, pGC->alu, pGC->planemask); - return; - } - - s3SetGlobalBitmap (pDstDrawable->pScreen, s3GCMap (pGC)); - _s3SetBlt(s3,pGC->alu,pGC->planemask); - DRAW_DEBUG ((DEBUG_RENDER, "s3CopyNtoN alu %d planemask 0x%x", - pGC->alu, pGC->planemask)); - while (nbox--) - { - w = pbox->x2 - pbox->x1; - h = pbox->y2 - pbox->y1; - flags = 0; - if (reverse) - { - dstX = pbox->x2 - 1; - } - else - { - dstX = pbox->x1; - flags |= INC_X; - } - srcX = dstX + dx; - - if (upsidedown) - { - dstY = pbox->y2 - 1; - } - else - { - dstY = pbox->y1; - flags |= INC_Y; - } - srcY = dstY + dy; - - _s3Blt (s3, srcX, srcY, dstX, dstY, w, h, flags); - pbox++; - } - MarkSyncS3 (pSrcDrawable->pScreen); -} - -RegionPtr -s3CopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, - int srcx, int srcy, int width, int height, int dstx, int dsty) -{ - SetupS3(pDstDrawable->pScreen); - - if (pSrcDrawable->type == DRAWABLE_WINDOW && - pDstDrawable->type == DRAWABLE_WINDOW) - { - return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, - srcx, srcy, width, height, - dstx, dsty, s3CopyNtoN, 0, 0); - } - return KdCheckCopyArea (pSrcDrawable, pDstDrawable, pGC, - srcx, srcy, width, height, dstx, dsty); -} - -typedef struct _s31toNargs { - unsigned long copyPlaneFG, copyPlaneBG; - Bool opaque; -} s31toNargs; - -void -_s3Stipple (S3CardInfo *s3c, - FbStip *psrcBase, - FbStride widthSrc, - int srcx, - int srcy, - int dstx, - int dsty, - int width, - int height) -{ - S3Ptr s3 = s3c->s3; - FbStip *psrcLine, *psrc; - FbStride widthRest; - FbStip bits, tmp, lastTmp; - int leftShift, rightShift; - int nl, nlMiddle; - int r; - PixTransDeclare; - - /* Compute blt address and parameters */ - psrc = psrcBase + srcy * widthSrc + (srcx >> 5); - nlMiddle = (width + 31) >> 5; - leftShift = srcx & 0x1f; - rightShift = 32 - leftShift; - widthRest = widthSrc - nlMiddle; - - _s3PlaneBlt(s3,dstx,dsty,width,height); - - if (leftShift == 0) - { - while (height--) - { - nl = nlMiddle; - PixTransStart(nl); - while (nl--) - { - tmp = *psrc++; - S3AdjustBits32 (tmp); - PixTransStore (tmp); - } - psrc += widthRest; - } - } - else - { - widthRest--; - while (height--) - { - bits = *psrc++; - nl = nlMiddle; - PixTransStart(nl); - while (nl--) - { - tmp = FbStipLeft(bits, leftShift); - bits = *psrc++; - tmp |= FbStipRight(bits, rightShift); - S3AdjustBits32(tmp); - PixTransStore (tmp); - } - psrc += widthRest; - } - } -} - -void -s3Copy1toN (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - BoxPtr pbox, - int nbox, - int dx, - int dy, - Bool reverse, - Bool upsidedown, - Pixel bitplane, - void *closure) -{ - SetupS3(pDstDrawable->pScreen); - - s31toNargs *args = closure; - int dstx, dsty; - FbStip *psrcBase; - FbStride widthSrc; - int srcBpp; - int srcXoff, srcYoff; - - if (args->opaque && sourceInvarient (pGC->alu)) - { - s3FillBoxSolid (pDstDrawable, nbox, pbox, - pGC->bgPixel, pGC->alu, pGC->planemask); - return; - } - - s3SetGlobalBitmap (pDstDrawable->pScreen, s3GCMap (pGC)); - fbGetStipDrawable (pSrcDrawable, psrcBase, widthSrc, srcBpp, srcXoff, srcYoff); - - if (args->opaque) - { - _s3SetOpaquePlaneBlt(s3,pGC->alu,pGC->planemask,args->copyPlaneFG, - args->copyPlaneBG); - } - else - { - _s3SetTransparentPlaneBlt (s3, pGC->alu, - pGC->planemask, args->copyPlaneFG); - } - - while (nbox--) - { - dstx = pbox->x1; - dsty = pbox->y1; - - _s3Stipple (s3c, - psrcBase, widthSrc, - dstx + dx - srcXoff, dsty + dy - srcYoff, - dstx, dsty, - pbox->x2 - dstx, pbox->y2 - dsty); - pbox++; - } - MarkSyncS3 (pDstDrawable->pScreen); -} - -RegionPtr -s3CopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, - int srcx, int srcy, int width, int height, - int dstx, int dsty, unsigned long bitPlane) -{ - SetupS3 (pDstDrawable->pScreen); - RegionPtr ret; - s31toNargs args; - - if (pDstDrawable->type == DRAWABLE_WINDOW && - pSrcDrawable->depth == 1) - { - args.copyPlaneFG = pGC->fgPixel; - args.copyPlaneBG = pGC->bgPixel; - args.opaque = TRUE; - return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, - srcx, srcy, width, height, - dstx, dsty, s3Copy1toN, bitPlane, &args); - } - return KdCheckCopyPlane(pSrcDrawable, pDstDrawable, pGC, - srcx, srcy, width, height, - dstx, dsty, bitPlane); -} - -void -s3PushPixels (GCPtr pGC, PixmapPtr pBitmap, - DrawablePtr pDrawable, - int w, int h, int x, int y) -{ - SetupS3 (pDrawable->pScreen); - s31toNargs args; - - if (pDrawable->type == DRAWABLE_WINDOW && pGC->fillStyle == FillSolid) - { - args.opaque = FALSE; - args.copyPlaneFG = pGC->fgPixel; - (void) fbDoCopy ((DrawablePtr) pBitmap, pDrawable, pGC, - 0, 0, w, h, x, y, s3Copy1toN, 1, &args); - } - else - { - KdCheckPushPixels (pGC, pBitmap, pDrawable, w, h, x, y); - } -} - -void -s3FillBoxSolid (DrawablePtr pDrawable, int nBox, BoxPtr pBox, - unsigned long pixel, int alu, unsigned long planemask) -{ - SetupS3(pDrawable->pScreen); - register int r; - - s3SetGlobalBitmap (pDrawable->pScreen, s3DrawMap (pDrawable)); - _s3SetSolidFill(s3,pixel,alu,planemask); - - while (nBox--) { - _s3SolidRect(s3,pBox->x1,pBox->y1,pBox->x2-pBox->x1,pBox->y2-pBox->y1); - pBox++; - } - MarkSyncS3 (pDrawable->pScreen); -} - -void -_s3SetPattern (ScreenPtr pScreen, int ma, - int alu, unsigned long planemask, s3PatternPtr pPattern) -{ - SetupS3(pScreen); - S3PatternCache *cache; - - _s3LoadPattern (pScreen, ma, pPattern); - cache = pPattern->cache; - - switch (pPattern->fillStyle) { - case FillTiled: - _s3SetTile(s3,alu,planemask); - break; - case FillStippled: - _s3SetStipple(s3,alu,planemask,pPattern->fore); - break; - case FillOpaqueStippled: - _s3SetOpaqueStipple(s3,alu,planemask,pPattern->fore,pPattern->back); - break; - } -} - -void -s3FillBoxPattern (DrawablePtr pDrawable, int nBox, BoxPtr pBox, - int alu, unsigned long planemask, s3PatternPtr pPattern) -{ - SetupS3(pDrawable->pScreen); - S3PatternCache *cache; - int patx, paty; - - s3SetGlobalBitmap (pDrawable->pScreen, s3DrawMap (pDrawable)); - _s3SetPattern (pDrawable->pScreen, s3DrawMap(pDrawable), alu, planemask, pPattern); - cache = pPattern->cache; - while (nBox--) - { - _s3PatRect(s3,cache->x, cache->y, - pBox->x1, pBox->y1, - pBox->x2-pBox->x1, pBox->y2-pBox->y1); - pBox++; - } - MarkSyncS3 (pDrawable->pScreen); -} - -void -s3FillBoxLargeStipple (DrawablePtr pDrawable, GCPtr pGC, - int nBox, BoxPtr pBox) -{ - SetupS3(pDrawable->pScreen); - DrawablePtr pStipple = &pGC->stipple->drawable; - int xRot = pGC->patOrg.x + pDrawable->x; - int yRot = pGC->patOrg.y + pDrawable->y; - FbStip *stip; - FbStride stipStride; - int stipBpp; - int stipXoff, stipYoff; - int stipWidth, stipHeight; - int dstX, dstY, width, height; - - stipWidth = pStipple->width; - stipHeight = pStipple->height; - fbGetStipDrawable (pStipple, stip, stipStride, stipBpp, stipXoff, stipYoff); - - s3SetGlobalBitmap (pDrawable->pScreen, s3DrawMap (pDrawable)); - if (pGC->fillStyle == FillOpaqueStippled) - { - _s3SetOpaquePlaneBlt(s3,pGC->alu,pGC->planemask, - pGC->fgPixel, pGC->bgPixel); - - } - else - { - _s3SetTransparentPlaneBlt(s3,pGC->alu,pGC->planemask, pGC->fgPixel); - } - - while (nBox--) - { - int stipX, stipY, sx; - int widthTmp; - int h, w; - int x, y; - - dstX = pBox->x1; - dstY = pBox->y1; - width = pBox->x2 - pBox->x1; - height = pBox->y2 - pBox->y1; - pBox++; - modulus (dstY - yRot - stipYoff, stipHeight, stipY); - modulus (dstX - xRot - stipXoff, stipWidth, stipX); - y = dstY; - while (height) - { - h = stipHeight - stipY; - if (h > height) - h = height; - height -= h; - widthTmp = width; - x = dstX; - sx = stipX; - while (widthTmp) - { - w = (stipWidth - sx); - if (w > widthTmp) - w = widthTmp; - widthTmp -= w; - _s3Stipple (s3c, - stip, - stipStride, - sx, stipY, - x, y, - w, h); - x += w; - sx = 0; - } - y += h; - stipY = 0; - } - } - MarkSyncS3 (pDrawable->pScreen); -} - -#define NUM_STACK_RECTS 1024 - -void -s3PolyFillRect (DrawablePtr pDrawable, GCPtr pGC, - int nrectFill, xRectangle *prectInit) -{ - s3GCPrivate(pGC); - xRectangle *prect; - RegionPtr prgnClip; - register BoxPtr pbox; - register BoxPtr pboxClipped; - BoxPtr pboxClippedBase; - BoxPtr pextent; - BoxRec stackRects[NUM_STACK_RECTS]; - int numRects; - int n; - int xorg, yorg; - int x, y; - - prgnClip = fbGetCompositeClip(pGC); - xorg = pDrawable->x; - yorg = pDrawable->y; - - if (xorg || yorg) - { - prect = prectInit; - n = nrectFill; - while(n--) - { - prect->x += xorg; - prect->y += yorg; - prect++; - } - } - - prect = prectInit; - - numRects = REGION_NUM_RECTS(prgnClip) * nrectFill; - if (numRects > NUM_STACK_RECTS) - { - pboxClippedBase = (BoxPtr)xalloc(numRects * sizeof(BoxRec)); - if (!pboxClippedBase) - return; - } - else - pboxClippedBase = stackRects; - - pboxClipped = pboxClippedBase; - - if (REGION_NUM_RECTS(prgnClip) == 1) - { - int x1, y1, x2, y2, bx2, by2; - - pextent = REGION_RECTS(prgnClip); - x1 = pextent->x1; - y1 = pextent->y1; - x2 = pextent->x2; - y2 = pextent->y2; - while (nrectFill--) - { - if ((pboxClipped->x1 = prect->x) < x1) - pboxClipped->x1 = x1; - - if ((pboxClipped->y1 = prect->y) < y1) - pboxClipped->y1 = y1; - - bx2 = (int) prect->x + (int) prect->width; - if (bx2 > x2) - bx2 = x2; - pboxClipped->x2 = bx2; - - by2 = (int) prect->y + (int) prect->height; - if (by2 > y2) - by2 = y2; - pboxClipped->y2 = by2; - - prect++; - if ((pboxClipped->x1 < pboxClipped->x2) && - (pboxClipped->y1 < pboxClipped->y2)) - { - pboxClipped++; - } - } - } - else - { - int x1, y1, x2, y2, bx2, by2; - - pextent = REGION_EXTENTS(pGC->pScreen, prgnClip); - x1 = pextent->x1; - y1 = pextent->y1; - x2 = pextent->x2; - y2 = pextent->y2; - while (nrectFill--) - { - BoxRec box; - - if ((box.x1 = prect->x) < x1) - box.x1 = x1; - - if ((box.y1 = prect->y) < y1) - box.y1 = y1; - - bx2 = (int) prect->x + (int) prect->width; - if (bx2 > x2) - bx2 = x2; - box.x2 = bx2; - - by2 = (int) prect->y + (int) prect->height; - if (by2 > y2) - by2 = y2; - box.y2 = by2; - - prect++; - - if ((box.x1 >= box.x2) || (box.y1 >= box.y2)) - continue; - - n = REGION_NUM_RECTS (prgnClip); - pbox = REGION_RECTS(prgnClip); - - /* clip the rectangle to each box in the clip region - this is logically equivalent to calling Intersect() - */ - while(n--) - { - pboxClipped->x1 = max(box.x1, pbox->x1); - pboxClipped->y1 = max(box.y1, pbox->y1); - pboxClipped->x2 = min(box.x2, pbox->x2); - pboxClipped->y2 = min(box.y2, pbox->y2); - pbox++; - - /* see if clipping left anything */ - if(pboxClipped->x1 < pboxClipped->x2 && - pboxClipped->y1 < pboxClipped->y2) - { - pboxClipped++; - } - } - } - } - if (pboxClipped != pboxClippedBase) - { - if (pGC->fillStyle == FillSolid) - s3FillBoxSolid(pDrawable, - pboxClipped-pboxClippedBase, pboxClippedBase, - pGC->fgPixel, pGC->alu, pGC->planemask); - else if (s3Priv->pPattern) - s3FillBoxPattern (pDrawable, - pboxClipped-pboxClippedBase, pboxClippedBase, - pGC->alu, pGC->planemask, - s3Priv->pPattern); - else - s3FillBoxLargeStipple (pDrawable, pGC, - pboxClipped-pboxClippedBase, - pboxClippedBase); - } - if (pboxClippedBase != stackRects) - xfree(pboxClippedBase); -} - -void -_s3FillSpanLargeStipple (DrawablePtr pDrawable, GCPtr pGC, - int n, DDXPointPtr ppt, int *pwidth) -{ - SetupS3 (pDrawable->pScreen); - DrawablePtr pStipple = &pGC->stipple->drawable; - int xRot = pGC->patOrg.x + pDrawable->x; - int yRot = pGC->patOrg.y + pDrawable->y; - FbStip *stip; - FbStride stipStride; - int stipBpp; - int stipXoff, stipYoff; - int stipWidth, stipHeight; - int dstX, dstY, width, height; - - s3SetGlobalBitmap (pDrawable->pScreen, s3GCMap (pGC)); - stipWidth = pStipple->width; - stipHeight = pStipple->height; - fbGetStipDrawable (pStipple, stip, stipStride, stipBpp, stipXoff, stipYoff); - if (pGC->fillStyle == FillOpaqueStippled) - { - _s3SetOpaquePlaneBlt(s3,pGC->alu,pGC->planemask, - pGC->fgPixel, pGC->bgPixel); - - } - else - { - _s3SetTransparentPlaneBlt(s3,pGC->alu,pGC->planemask, pGC->fgPixel); - } - while (n--) - { - int stipX, stipY, sx; - int w; - int x, y; - - dstX = ppt->x; - dstY = ppt->y; - ppt++; - width = *pwidth++; - modulus (dstY - yRot - stipYoff, stipHeight, stipY); - modulus (dstX - xRot - stipXoff, stipWidth, stipX); - y = dstY; - x = dstX; - sx = stipX; - while (width) - { - w = (stipWidth - sx); - if (w > width) - w = width; - width -= w; - _s3Stipple (s3c, - stip, - stipStride, - sx, stipY, - x, y, - w, 1); - x += w; - sx = 0; - } - } -} - -void -s3FillSpans (DrawablePtr pDrawable, GCPtr pGC, int n, - DDXPointPtr ppt, int *pwidth, int fSorted) -{ - s3GCPrivate(pGC); - SetupS3(pDrawable->pScreen); - int x, y, x1, y1, x2, y2; - int width; - /* next three parameters are post-clip */ - int nTmp; - int *pwidthFree;/* copies of the pointers to free */ - DDXPointPtr pptFree; - BoxPtr extents; - S3PatternCache *cache; - RegionPtr pClip = fbGetCompositeClip (pGC); - - s3SetGlobalBitmap (pDrawable->pScreen, s3GCMap (pGC)); - if (REGION_NUM_RECTS(pClip) == 1 && - (pGC->fillStyle == FillSolid || s3Priv->pPattern)) - { - extents = REGION_RECTS(pClip); - x1 = extents->x1; - x2 = extents->x2; - y1 = extents->y1; - y2 = extents->y2; - if (pGC->fillStyle == FillSolid) - { - _s3SetSolidFill(s3,pGC->fgPixel,pGC->alu,pGC->planemask); - cache = 0; - } - else - { - _s3SetPattern (pDrawable->pScreen, s3GCMap(pGC), pGC->alu, pGC->planemask, - s3Priv->pPattern); - cache = s3Priv->pPattern->cache; - } - while (n--) - { - y = ppt->y; - if (y1 <= y && y < y2) - { - x = ppt->x; - width = *pwidth; - if (x < x1) - { - width -= (x1 - x); - x = x1; - } - if (x2 < x + width) - width = x2 - x; - if (width > 0) - { - if (cache) - { - _s3PatRect(s3, cache->x, cache->y, x, y, width, 1); - } - else - { - _s3SolidRect(s3,x,y,width,1); - } - } - } - ppt++; - pwidth++; - } - } - else - { - nTmp = n * miFindMaxBand(pClip); - pwidthFree = (int *)xalloc(nTmp * sizeof(int)); - pptFree = (DDXPointRec *)xalloc(nTmp * sizeof(DDXPointRec)); - if(!pptFree || !pwidthFree) - { - if (pptFree) xfree(pptFree); - if (pwidthFree) xfree(pwidthFree); - return; - } - n = miClipSpans(fbGetCompositeClip(pGC), - ppt, pwidth, n, - pptFree, pwidthFree, fSorted); - pwidth = pwidthFree; - ppt = pptFree; - if (pGC->fillStyle == FillSolid) - { - _s3SetSolidFill(s3,pGC->fgPixel,pGC->alu,pGC->planemask); - while (n--) - { - x = ppt->x; - y = ppt->y; - ppt++; - width = *pwidth++; - if (width) - { - _s3SolidRect(s3,x,y,width,1); - } - } - } - else if (s3Priv->pPattern) - { - _s3SetPattern (pDrawable->pScreen, s3GCMap(pGC), pGC->alu, pGC->planemask, - s3Priv->pPattern); - cache = s3Priv->pPattern->cache; - while (n--) - { - x = ppt->x; - y = ppt->y; - ppt++; - width = *pwidth++; - if (width) - { - _s3PatRect(s3, cache->x, cache->y, x, y, width, 1); - } - } - } - else - { - _s3FillSpanLargeStipple (pDrawable, pGC, n, ppt, pwidth); - } - xfree(pptFree); - xfree(pwidthFree); - } - MarkSyncS3 (pDrawable->pScreen); -} - -#include "mifillarc.h" - -#define FILLSPAN(s3,y,__x1,__x2) {\ - DRAW_DEBUG ((DEBUG_ARCS, "FILLSPAN %d: %d->%d", y, __x1, __x2)); \ - if ((__x2) >= (__x1)) {\ - _s3SolidRect(s3,(__x1),(y),(__x2)-(__x1)+1,1); \ - } \ -} - -#define FILLSLICESPANS(flip,__y) \ - if (!flip) \ - { \ - FILLSPAN(s3,__y,xl,xr) \ - } \ - else \ - { \ - xc = xorg - x; \ - FILLSPAN(s3, __y, xc, xr) \ - xc += slw - 1; \ - FILLSPAN(s3, __y, xl, xc) \ - } - -static void -_s3FillEllipse (DrawablePtr pDraw, S3Ptr s3, xArc *arc) -{ - KdScreenPriv(pDraw->pScreen); - int x, y, e; - int yk, xk, ym, xm, dx, dy, xorg, yorg; - int y_top, y_bot; - miFillArcRec info; - register int xpos; - int slw; - - s3SetGlobalBitmap (pDraw->pScreen, s3DrawMap (pDraw)); - miFillArcSetup(arc, &info); - MIFILLARCSETUP(); - y_top = pDraw->y + yorg - y; - y_bot = pDraw->y + yorg + y + dy; - xorg += pDraw->x; - while (y) - { - y_top++; - y_bot--; - MIFILLARCSTEP(slw); - if (!slw) - continue; - xpos = xorg - x; - _s3SolidRect (s3,xpos,y_top,slw,1); - if (miFillArcLower(slw)) - _s3SolidRect (s3,xpos,y_bot,slw,1); - } -} - - -static void -_s3FillArcSlice (DrawablePtr pDraw, GCPtr pGC, S3Ptr s3, xArc *arc) -{ - KdScreenPriv(pDraw->pScreen); - int yk, xk, ym, xm, dx, dy, xorg, yorg, slw; - register int x, y, e; - miFillArcRec info; - miArcSliceRec slice; - int xl, xr, xc; - int y_top, y_bot; - - s3SetGlobalBitmap (pDraw->pScreen, s3DrawMap (pDraw)); - DRAW_DEBUG ((DEBUG_ARCS, "slice %dx%d+%d+%d %d->%d", - arc->width, arc->height, arc->x, arc->y, - arc->angle1, arc->angle2)); - miFillArcSetup(arc, &info); - miFillArcSliceSetup(arc, &slice, pGC); - DRAW_DEBUG ((DEBUG_ARCS, "edge1.x %d edge2.x %d", - slice.edge1.x, slice.edge2.x)); - MIFILLARCSETUP(); - DRAW_DEBUG ((DEBUG_ARCS, "xorg %d yorg %d", - xorg, yorg)); - xorg += pDraw->x; - yorg += pDraw->y; - y_top = yorg - y; - y_bot = yorg + y + dy; - slice.edge1.x += pDraw->x; - slice.edge2.x += pDraw->x; - DRAW_DEBUG ((DEBUG_ARCS, "xorg %d y_top %d y_bot %d", - xorg, y_top, y_bot)); - while (y > 0) - { - y_top++; - y_bot--; - MIFILLARCSTEP(slw); - MIARCSLICESTEP(slice.edge1); - MIARCSLICESTEP(slice.edge2); - if (miFillSliceUpper(slice)) - { - MIARCSLICEUPPER(xl, xr, slice, slw); - FILLSLICESPANS(slice.flip_top, y_top); - } - if (miFillSliceLower(slice)) - { - MIARCSLICELOWER(xl, xr, slice, slw); - FILLSLICESPANS(slice.flip_bot, y_bot); - } - } -} - -void -s3PolyFillArcSolid (DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) -{ - SetupS3(pDraw->pScreen); - xArc *arc; - int i; - int x, y; - BoxRec box; - RegionPtr pClip = fbGetCompositeClip(pGC); - BOOL set; - - set = FALSE; - for (; --narcs >= 0; parcs++) - { - if (miFillArcEmpty(parcs)) - continue; - if (miCanFillArc(parcs)) - { - box.x1 = parcs->x + pDraw->x; - box.y1 = parcs->y + pDraw->y; - box.x2 = box.x1 + (int)parcs->width + 1; - box.y2 = box.y1 + (int)parcs->height + 1; - switch (RECT_IN_REGION(pDraw->pScreen, pClip, &box)) - { - case rgnIN: - if (!set) - { - _s3SetSolidFill (s3, pGC->fgPixel, pGC->alu, pGC->planemask); - set = TRUE; - } - if ((parcs->angle2 >= FULLCIRCLE) || - (parcs->angle2 <= -FULLCIRCLE)) - { - DRAW_DEBUG ((DEBUG_ARCS, "Full circle ellipse %dx%d", - parcs->width, parcs->height)); - _s3FillEllipse (pDraw, s3, parcs); - } - else - { - DRAW_DEBUG ((DEBUG_ARCS, "Partial ellipse %dx%d", - parcs->width, parcs->height)); - _s3FillArcSlice (pDraw, pGC, s3, parcs); - } - /* fall through ... */ - case rgnOUT: - continue; - case rgnPART: - break; - } - } - if (set) - { - MarkSyncS3 (pDraw->pScreen); - set = FALSE; - } - KdCheckPolyFillArc(pDraw, pGC, 1, parcs); - } - if (set) - { - MarkSyncS3 (pDraw->pScreen); - set = FALSE; - } -} - -void -s3FillPoly (DrawablePtr pDrawable, GCPtr pGC, int shape, - int mode, int countInit, DDXPointPtr ptsIn) -{ - SetupS3(pDrawable->pScreen); - int nwidth; - int maxy; - int origin; - int count; - register int vertex1, vertex2; - int c; - RegionPtr pClip = fbGetCompositeClip(pGC); - BoxPtr extents; - int clip; - int y, sy; - int *vertex1p, *vertex2p; - int *endp; - int x1, x2, sx; - int dx1, dx2; - int dy1, dy2; - int e1, e2; - int step1, step2; - int sign1, sign2; - int h; - int l, r; - int nmiddle; - - if (mode == CoordModePrevious || REGION_NUM_RECTS(pClip) != 1) - { - KdCheckFillPolygon (pDrawable, pGC, shape, mode, countInit, ptsIn); - return; - } - - s3SetGlobalBitmap (pDrawable->pScreen, s3GCMap (pGC)); - sy = pDrawable->y; - sx = pDrawable->x; - origin = *((int *) &pDrawable->x); - origin -= (origin & 0x8000) << 1; - extents = &pClip->extents; - vertex1 = *((int *) &extents->x1) - origin; - vertex2 = *((int *) &extents->x2) - origin - 0x00010001; - clip = 0; - - y = 32767; - maxy = 0; - vertex2p = (int *) ptsIn; - endp = vertex2p + countInit; - if (shape == Convex) - { - count = countInit; - while (count--) - { - c = *vertex2p; - clip |= (c - vertex1) | (vertex2 - c); - c = intToY(c); - DRAW_DEBUG ((DEBUG_POLYGON, "Y coordinate %d", c)); - if (c < y) - { - y = c; - vertex1p = vertex2p; - } - vertex2p++; - if (c > maxy) - maxy = c; - } - } - else - { - int yFlip = 0; - dx1 = 1; - x2 = -1; - x1 = -1; - count = countInit; - while (count--) - { - c = *vertex2p; - clip |= (c - vertex1) | (vertex2 - c); - c = intToY(c); - DRAW_DEBUG ((DEBUG_POLYGON, "Y coordinate %d", c)); - if (c < y) - { - y = c; - vertex1p = vertex2p; - } - vertex2p++; - if (c > maxy) - maxy = c; - if (c == x1) - continue; - if (dx1 > 0) - { - if (x2 < 0) - x2 = c; - else - dx2 = dx1 = (c - x1) >> 31; - } - else - if ((c - x1) >> 31 != dx1) - { - dx1 = ~dx1; - yFlip++; - } - x1 = c; - } - x1 = (x2 - c) >> 31; - if (x1 != dx1) - yFlip++; - if (x1 != dx2) - yFlip++; - if (yFlip != 2) - clip = 0x8000; - } - if (y == maxy) - return; - - if (clip & 0x80008000) - { - KdCheckFillPolygon (pDrawable, pGC, shape, mode, countInit, ptsIn); - return; - } - _s3SetSolidFill(s3,pGC->fgPixel,pGC->alu,pGC->planemask); - - vertex2p = vertex1p; - vertex2 = vertex1 = *vertex2p++; - if (vertex2p == endp) - vertex2p = (int *) ptsIn; -#define Setup(c,x,vertex,dx,dy,e,sign,step) {\ - x = intToX(vertex); \ - if (dy = intToY(c) - y) { \ - dx = intToX(c) - x; \ - step = 0; \ - if (dx >= 0) \ - { \ - e = 0; \ - sign = 1; \ - if (dx >= dy) {\ - step = dx / dy; \ - dx = dx % dy; \ - } \ - } \ - else \ - { \ - e = 1 - dy; \ - sign = -1; \ - dx = -dx; \ - if (dx >= dy) { \ - step = - (dx / dy); \ - dx = dx % dy; \ - } \ - } \ - } \ - x += sx; \ - vertex = c; \ -} - -#define Step(x,dx,dy,e,sign,step) {\ - x += step; \ - if ((e += dx) > 0) \ - { \ - x += sign; \ - e -= dy; \ - } \ -} - sy += y; - DRAW_DEBUG ((DEBUG_POLYGON, "Starting polygon at %d", sy)); - for (;;) - { - DRAW_DEBUG ((DEBUG_POLYGON, "vertex1 0x%x vertex2 0x%x y %d vy1 %d vy2 %d", - vertex1, vertex2, - y, intToY(vertex1), intToY (vertex2))); - if (y == intToY(vertex1)) - { - DRAW_DEBUG ((DEBUG_POLYGON, "Find next -- vertext")); - do - { - if (vertex1p == (int *) ptsIn) - vertex1p = endp; - c = *--vertex1p; - Setup (c,x1,vertex1,dx1,dy1,e1,sign1,step1); - DRAW_DEBUG ((DEBUG_POLYGON, "-- vertex 0x%x y %d", - vertex1, intToY(vertex1))); - } while (y >= intToY(vertex1)); - h = dy1; - } - else - { - Step(x1,dx1,dy1,e1,sign1,step1) - h = intToY(vertex1) - y; - } - if (y == intToY(vertex2)) - { - DRAW_DEBUG ((DEBUG_POLYGON, "Find next ++ vertext")); - do - { - c = *vertex2p++; - if (vertex2p == endp) - vertex2p = (int *) ptsIn; - Setup (c,x2,vertex2,dx2,dy2,e2,sign2,step2) - DRAW_DEBUG ((DEBUG_POLYGON, "++ vertex 0x%x y %d", - vertex1, intToY(vertex1))); - } while (y >= intToY(vertex2)); - if (dy2 < h) - h = dy2; - } - else - { - Step(x2,dx2,dy2,e2,sign2,step2) - if ((c = (intToY(vertex2) - y)) < h) - h = c; - } - DRAW_DEBUG ((DEBUG_POLYGON, "This band %d", h)); - /* fill spans for this segment */ - for (;;) - { - nmiddle = x2 - x1; - DRAW_DEBUG ((DEBUG_POLYGON, "This span %d->%d", x1, x2)); - if (nmiddle) - { - l = x1; - if (nmiddle < 0) - { - nmiddle = -nmiddle; - l = x2; - } - _s3SolidRect(s3,l,sy,nmiddle,1); - } - y++; - sy++; - if (!--h) - break; - Step(x1,dx1,dy1,e1,sign1,step1) - Step(x2,dx2,dy2,e2,sign2,step2) - } - if (y == maxy) - break; - } - MarkSyncS3 (pDrawable->pScreen); -} - -void -s3PolyGlyphBltClipped (DrawablePtr pDrawable, - GCPtr pGC, - int x, int y, - unsigned int nglyph, - CharInfoPtr *ppciInit, - pointer pglyphBase) -{ - SetupS3(pDrawable->pScreen); - int h; - int w; - int xBack, yBack; - int hBack, wBack; - int lw; - FontPtr pfont = pGC->font; - CharInfoPtr pci; - unsigned long *bits; - BoxPtr extents; - BoxRec bbox; - CARD32 b; - CharInfoPtr *ppci; - FbGCPrivPtr fbPriv = fbGetGCPrivate(pGC); - RegionPtr pClip = fbGetCompositeClip(pGC); - BoxPtr pBox; - int nbox; - int x1, y1, x2, y2; - unsigned char alu; - Bool set; - PixTransDeclare; - - s3SetGlobalBitmap (pDrawable->pScreen, s3GCMap (pGC)); - x += pDrawable->x; - y += pDrawable->y; - - if (pglyphBase == (pointer) 1) - { - xBack = x; - yBack = y - FONTASCENT(pGC->font); - wBack = 0; - hBack = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font); - if (hBack) - { - h = nglyph; - ppci = ppciInit; - while (h--) - wBack += (*ppci++)->metrics.characterWidth; - } - if (wBack < 0) - { - xBack = xBack + wBack; - wBack = -wBack; - } - if (hBack < 0) - { - yBack = yBack + hBack; - hBack = -hBack; - } - alu = GXcopy; - } - else - { - wBack = 0; - alu = pGC->alu; - } - - if (wBack) - { - _s3SetSolidFill (s3, pGC->bgPixel, GXcopy, pGC->planemask); - for (nbox = REGION_NUM_RECTS (pClip), - pBox = REGION_RECTS (pClip); - nbox--; - pBox++) - { - x1 = xBack; - x2 = xBack + wBack; - y1 = yBack; - y2 = yBack + hBack; - if (x1 < pBox->x1) x1 = pBox->x1; - if (x2 > pBox->x2) x2 = pBox->x2; - if (y1 < pBox->y1) y1 = pBox->y1; - if (y2 > pBox->y2) y2 = pBox->y2; - if (x1 < x2 && y1 < y2) - { - _s3SolidRect (s3, x1, y1, x2 - x1, y2 - y1); - } - } - MarkSyncS3 (pDrawable->pScreen); - } - ppci = ppciInit; - set = FALSE; - while (nglyph--) - { - pci = *ppci++; - h = pci->metrics.ascent + pci->metrics.descent; - w = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing; - x1 = x + pci->metrics.leftSideBearing; - y1 = y - pci->metrics.ascent; - bbox.x1 = x1; - bbox.y1 = y1; - bbox.x2 = x1 + w; - bbox.y2 = y1 + h; - switch (RECT_IN_REGION(pGC->pScreen, pClip, &bbox)) - { - case rgnIN: -#if 1 - lw = h * ((w + 31) >> 5); - if (lw) - { - if (!set) - { - _s3SetTransparentPlaneBlt (s3, alu, pGC->planemask, pGC->fgPixel); - set = TRUE; - } - _s3PlaneBlt(s3, - x + pci->metrics.leftSideBearing, - y - pci->metrics.ascent, - w, h); - bits = (unsigned long *) pci->bits; - PixTransStart (lw); - while (lw--) - { - b = *bits++; - S3AdjustBits32 (b); - PixTransStore(b); - } - MarkSyncS3 (pDrawable->pScreen); - } - break; -#endif - case rgnPART: - set = FALSE; - CheckSyncS3 (pDrawable->pScreen); - fbPutXYImage (pDrawable, - pClip, - fbPriv->fg, - fbPriv->bg, - fbPriv->pm, - alu, - FALSE, - x1, y1, - w, h, - (FbStip *) pci->bits, - (w + 31) >> 5, - 0); - break; - case rgnOUT: - break; - } - x += pci->metrics.characterWidth; - } -} - -/* - * Blt glyphs using S3 image transfer register, this does both - * poly glyph blt and image glyph blt (when pglyphBase == 1) - */ - -void -s3PolyGlyphBlt (DrawablePtr pDrawable, - GCPtr pGC, - int x, int y, - unsigned int nglyph, - CharInfoPtr *ppciInit, - pointer pglyphBase) -{ - SetupS3(pDrawable->pScreen); - int h; - int w; - int xBack, yBack; - int hBack, wBack; - int lw; - FontPtr pfont = pGC->font; - CharInfoPtr pci; - unsigned long *bits; - BoxPtr extents; - BoxRec bbox; - CARD32 b; - CharInfoPtr *ppci; - unsigned char alu; - PixTransDeclare; - - s3SetGlobalBitmap (pDrawable->pScreen, s3GCMap (pGC)); - x += pDrawable->x; - y += pDrawable->y; - - /* compute an approximate (but covering) bounding box */ - ppci = ppciInit; - w = 0; - h = nglyph; - while (h--) - w += (*ppci++)->metrics.characterWidth; - if (w < 0) - { - bbox.x1 = x + w; - bbox.x2 = x; - } - else - { - bbox.x1 = x; - bbox.x2 = x + w; - } - w = FONTMINBOUNDS(pfont,leftSideBearing); - if (w < 0) - bbox.x1 += w; - w = FONTMAXBOUNDS(pfont, rightSideBearing) - FONTMINBOUNDS(pfont, characterWidth); - if (w > 0) - bbox.x2 += w; - bbox.y1 = y - FONTMAXBOUNDS(pfont,ascent); - bbox.y2 = y + FONTMAXBOUNDS(pfont,descent); - - DRAW_DEBUG ((DEBUG_TEXT, "PolyGlyphBlt %d box is %d %d", nglyph, - bbox.x1, bbox.x2)); - switch (RECT_IN_REGION(pGC->pScreen, fbGetCompositeClip(pGC), &bbox)) - { - case rgnIN: - break; - case rgnPART: - s3PolyGlyphBltClipped(pDrawable, pGC, x - pDrawable->x, - y - pDrawable->y, - nglyph, ppciInit, pglyphBase); - case rgnOUT: - return; - } - - if (pglyphBase == (pointer) 1) - { - xBack = x; - yBack = y - FONTASCENT(pGC->font); - wBack = 0; - hBack = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font); - if (hBack) - { - h = nglyph; - ppci = ppciInit; - while (h--) - wBack += (*ppci++)->metrics.characterWidth; - } - if (wBack < 0) - { - xBack = xBack + wBack; - wBack = -wBack; - } - if (hBack < 0) - { - yBack = yBack + hBack; - hBack = -hBack; - } - alu = GXcopy; - } - else - { - wBack = 0; - alu = pGC->alu; - } - - if (wBack) - { - _s3SetSolidFill (s3, pGC->bgPixel, GXcopy, pGC->planemask); - _s3SolidRect (s3, xBack, yBack, wBack, hBack); - } - _s3SetTransparentPlaneBlt (s3, alu, pGC->planemask, pGC->fgPixel); - ppci = ppciInit; - while (nglyph--) - { - pci = *ppci++; - h = pci->metrics.ascent + pci->metrics.descent; - w = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing; - lw = h * ((w + 31) >> 5); - if (lw) - { - _s3PlaneBlt(s3, - x + pci->metrics.leftSideBearing, - y - pci->metrics.ascent, - w, h); - bits = (unsigned long *) pci->bits; - PixTransStart(lw); - while (lw--) - { - b = *bits++; - S3AdjustBits32 (b); - PixTransStore(b); - } - } - x += pci->metrics.characterWidth; - } - MarkSyncS3 (pDrawable->pScreen); -} - -void -s3ImageGlyphBlt (DrawablePtr pDrawable, - GCPtr pGC, - int x, int y, - unsigned int nglyph, - CharInfoPtr *ppci, - pointer pglyphBase) -{ - s3PolyGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, (pointer) 1); -} - -/* - * Blt TE fonts using S3 image transfer. Differs from - * above in that it doesn't need to fill a solid rect for - * the background and it can draw multiple characters at a time - */ - -void -s3ImageTEGlyphBlt (DrawablePtr pDrawable, GCPtr pGC, - int xInit, int yInit, - unsigned int nglyph, - CharInfoPtr *ppci, - pointer pglyphBase) -{ - SetupS3(pDrawable->pScreen); - int x, y; - int h, lw, lwTmp; - int w; - FontPtr pfont = pGC->font; - unsigned long *char1, *char2, *char3, *char4; - int widthGlyphs, widthGlyph; - BoxRec bbox; - CARD32 tmp; - PixTransDeclare; - - s3SetGlobalBitmap (pDrawable->pScreen, s3GCMap (pGC)); - widthGlyph = FONTMAXBOUNDS(pfont,characterWidth); - if (!widthGlyph) - return; - - h = FONTASCENT(pfont) + FONTDESCENT(pfont); - if (!h) - return; - - DRAW_DEBUG ((DEBUG_TEXT, "ImageTEGlyphBlt chars are %d %d", - widthGlyph, h)); - - x = xInit + FONTMAXBOUNDS(pfont,leftSideBearing) + pDrawable->x; - y = yInit - FONTASCENT(pfont) + pDrawable->y; - - bbox.x1 = x; - bbox.x2 = x + (widthGlyph * nglyph); - bbox.y1 = y; - bbox.y2 = y + h; - - switch (RECT_IN_REGION(pGC->pScreen, fbGetCompositeClip(pGC), &bbox)) - { - case rgnIN: - break; - case rgnPART: - if (pglyphBase == (pointer) 1) - pglyphBase = 0; - else - pglyphBase = (pointer) 1; - s3PolyGlyphBltClipped(pDrawable, pGC, - xInit, - yInit, - nglyph, ppci, - pglyphBase); - case rgnOUT: - return; - } - - if (pglyphBase == (pointer) 1) - { - _s3SetTransparentPlaneBlt (s3, pGC->alu, pGC->planemask, pGC->fgPixel); - } - else - { - _s3SetOpaquePlaneBlt (s3, GXcopy, pGC->planemask, pGC->fgPixel, pGC->bgPixel); - } - -#if BITMAP_BIT_ORDER == LSBFirst -#define SHIFT << -#else -#define SHIFT >> -#endif - -#define LoopIt(count, w, loadup, fetch) \ - while (nglyph >= count) \ - { \ - nglyph -= count; \ - _s3PlaneBlt (s3, x, y, w, h); \ - x += w; \ - loadup \ - lwTmp = h; \ - PixTransStart(h); \ - while (lwTmp--) { \ - tmp = fetch; \ - S3AdjustBits32(tmp); \ - PixTransStore(tmp); \ - } \ - } - - if (widthGlyph <= 8) - { - widthGlyphs = widthGlyph << 2; - LoopIt(4, widthGlyphs, - char1 = (unsigned long *) (*ppci++)->bits; - char2 = (unsigned long *) (*ppci++)->bits; - char3 = (unsigned long *) (*ppci++)->bits; - char4 = (unsigned long *) (*ppci++)->bits;, - (*char1++ | ((*char2++ | ((*char3++ | (*char4++ - SHIFT widthGlyph)) - SHIFT widthGlyph)) - SHIFT widthGlyph))) - } - else if (widthGlyph <= 10) - { - widthGlyphs = (widthGlyph << 1) + widthGlyph; - LoopIt(3, widthGlyphs, - char1 = (unsigned long *) (*ppci++)->bits; - char2 = (unsigned long *) (*ppci++)->bits; - char3 = (unsigned long *) (*ppci++)->bits;, - (*char1++ | ((*char2++ | (*char3++ SHIFT widthGlyph)) SHIFT widthGlyph))) - } - else if (widthGlyph <= 16) - { - widthGlyphs = widthGlyph << 1; - LoopIt(2, widthGlyphs, - char1 = (unsigned long *) (*ppci++)->bits; - char2 = (unsigned long *) (*ppci++)->bits;, - (*char1++ | (*char2++ SHIFT widthGlyph))) - } - lw = h * ((widthGlyph + 31) >> 5); - while (nglyph--) - { - _s3PlaneBlt (s3, x, y, widthGlyph, h); - x += widthGlyph; - char1 = (unsigned long *) (*ppci++)->bits; - lwTmp = lw; - PixTransStart(lw); - while (lwTmp--) - { - tmp = *char1++; - S3AdjustBits32(tmp); - PixTransStore(tmp); - } - } - MarkSyncS3 (pDrawable->pScreen); -} - -void -s3PolyTEGlyphBlt (DrawablePtr pDrawable, GCPtr pGC, - int x, int y, - unsigned int nglyph, CharInfoPtr *ppci, - pointer pglyphBase) -{ - s3ImageTEGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, (pointer) 1); -} - -Bool -_s3Segment (DrawablePtr pDrawable, - GCPtr pGC, - int x1, - int y1, - int x2, - int y2, - Bool drawLast, - Bool s3Set) -{ - SetupS3(pDrawable->pScreen); - FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); - RegionPtr pClip = fbGetCompositeClip(pGC); - BoxPtr pBox; - int nBox; - int adx; /* abs values of dx and dy */ - int ady; - int signdx; /* sign of dx and dy */ - int signdy; - int e, e1, e2; /* bresenham error and increments */ - int len; /* length of segment */ - int axis; /* major axis */ - int octant; - int cmd; - unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); - unsigned int oc1; /* outcode of point 1 */ - unsigned int oc2; /* outcode of point 2 */ - - CalcLineDeltas(x1, y1, x2, y2, adx, ady, signdx, signdy, - 1, 1, octant); - - cmd = LASTPIX; - - if (adx > ady) - { - axis = X_AXIS; - e1 = ady << 1; - e2 = e1 - (adx << 1); - e = e1 - adx; - len = adx; - } - else - { - cmd |= YMAJAXIS; - axis = Y_AXIS; - e1 = adx << 1; - e2 = e1 - (ady << 1); - e = e1 - ady; - SetYMajorOctant(octant); - len = ady; - } - - /* S3 line drawing hardware has limited resolution for error terms */ - if (len >= 4096) - { - int dashOff = 0; - - KdCheckSync (pDrawable->pScreen); - fbSegment (pDrawable, pGC, x1, y1, x2, y2, drawLast, &dashOff); - return FALSE; - } - - FIXUP_ERROR (e, octant, bias); - - nBox = REGION_NUM_RECTS (pClip); - pBox = REGION_RECTS (pClip); - - if (signdx > 0) - cmd |= INC_X; - if (signdy > 0) - cmd |= INC_Y; - - /* we have bresenham parameters and two points. - all we have to do now is clip and draw. - */ - - if (drawLast) - len++; - while(nBox--) - { - oc1 = 0; - oc2 = 0; - OUTCODES(oc1, x1, y1, pBox); - OUTCODES(oc2, x2, y2, pBox); - if ((oc1 | oc2) == 0) - { - if (!s3Set) - { - s3SetGlobalBitmap (pDrawable->pScreen, s3GCMap (pGC)); - _s3SetSolidFill (s3, pGC->fgPixel, pGC->alu, pGC->planemask); - s3Set = TRUE; - } - _s3SetCur (s3, x1, y1); - _s3ClipLine (s3, cmd, e1, e2, e, len); - break; - } - else if (oc1 & oc2) - { - pBox++; - } - else - { - int new_x1 = x1, new_y1 = y1, new_x2 = x2, new_y2 = y2; - int clip1 = 0, clip2 = 0; - int clipdx, clipdy; - int err; - - if (miZeroClipLine(pBox->x1, pBox->y1, pBox->x2-1, - pBox->y2-1, - &new_x1, &new_y1, &new_x2, &new_y2, - adx, ady, &clip1, &clip2, - octant, bias, oc1, oc2) == -1) - { - pBox++; - continue; - } - - if (axis == X_AXIS) - len = abs(new_x2 - new_x1); - else - len = abs(new_y2 - new_y1); - if (clip2 != 0 || drawLast) - len++; - if (len) - { - /* unwind bresenham error term to first point */ - err = e; - if (clip1) - { - clipdx = abs(new_x1 - x1); - clipdy = abs(new_y1 - y1); - if (axis == X_AXIS) - err += (e2 - e1) * clipdy + e1 * clipdx; - else - err += (e2 - e1) * clipdx + e1 * clipdy; - } - if (!s3Set) - { - s3SetGlobalBitmap (pDrawable->pScreen, s3GCMap (pGC)); - _s3SetSolidFill (s3, pGC->fgPixel, pGC->alu, pGC->planemask); - s3Set = TRUE; - } - _s3SetCur (s3, new_x1, new_y1); - _s3ClipLine (s3, cmd, e1, e2, err, len); - } - pBox++; - } - } /* while (nBox--) */ - return s3Set; -} - -void -s3Polylines (DrawablePtr pDrawable, GCPtr pGC, - int mode, int npt, DDXPointPtr ppt) -{ - SetupS3(pDrawable->pScreen); - int x, y, nx, ny; - int ox = pDrawable->x, oy = pDrawable->y; - Bool s3Set = FALSE; - - if (!npt) - return; - - x = ppt->x + ox; - y = ppt->y + oy; - while (--npt) - { - ++ppt; - if (mode == CoordModePrevious) - { - nx = x + ppt->x; - ny = y + ppt->y; - } - else - { - nx = ppt->x + ox; - ny = ppt->y + oy; - } - s3Set = _s3Segment (pDrawable, pGC, x, y, nx, ny, - npt == 1 && pGC->capStyle != CapNotLast, - s3Set); - x = nx; - y = ny; - } - if (s3Set) - MarkSyncS3 (pDrawable->pScreen); -} - -void -s3PolySegment (DrawablePtr pDrawable, GCPtr pGC, - int nsegInit, xSegment *pSegInit) -{ - SetupS3(pDrawable->pScreen); - int x, y; - int ox = pDrawable->x, oy = pDrawable->y; - RegionPtr pClip = fbGetCompositeClip (pGC); - BoxPtr pBox; - int nbox; - int nseg; - xSegment *pSeg; - int dx, dy; - int maj, min, len, inc; - int t; - CARD32 cmd; - CARD32 init_cmd; - Bool drawLast; - Bool s3Set = FALSE; - - drawLast = pGC->capStyle != CapNotLast; - - for (nseg = nsegInit, pSeg = pSegInit; nseg--; pSeg++) - { - s3Set = _s3Segment (pDrawable, pGC, pSeg->x1 + ox, pSeg->y1 + oy, - pSeg->x2 + ox, pSeg->y2 + oy, drawLast, s3Set); - - } - if (s3Set) - MarkSyncS3 (pDrawable->pScreen); -} - -/* - * Check to see if a pattern can be painted with the S3 - */ - -#define _s3CheckPatternSize(s) ((s) <= S3_TILE_SIZE && ((s) & ((s) - 1)) == 0) -#define s3CheckPattern(w,h) (_s3CheckPatternSize(w) && _s3CheckPatternSize(h)) - -Bool -s3AllocPattern (ScreenPtr pScreen, - int ma, - PixmapPtr pPixmap, - int xorg, int yorg, - int fillStyle, Pixel fg, Pixel bg, - s3PatternPtr *ppPattern) -{ - KdScreenPriv(pScreen); - s3ScreenInfo(pScreenPriv); - s3PatternPtr pPattern; - - if (s3s->fb[ma].patterns.cache && fillStyle != FillSolid && - s3CheckPattern (pPixmap->drawable.width, pPixmap->drawable.height)) - { - if (!(pPattern = *ppPattern)) - { - pPattern = (s3PatternPtr) xalloc (sizeof (s3PatternRec)); - if (!pPattern) - return FALSE; - *ppPattern = pPattern; - } - - pPattern->cache = 0; - pPattern->id = 0; - pPattern->pPixmap = pPixmap; - pPattern->fillStyle = fillStyle; - pPattern->xrot = (-xorg) & (S3_TILE_SIZE-1); - pPattern->yrot = (-yorg) & (S3_TILE_SIZE-1); - pPattern->fore = fg; - pPattern->back = bg; - return TRUE; - } - else - { - if (*ppPattern) - { - xfree (*ppPattern); - *ppPattern = 0; - } - return FALSE; - } -} - -void -s3CheckGCFill (GCPtr pGC) -{ - s3PrivGCPtr s3Priv = s3GetGCPrivate (pGC); - PixmapPtr pPixmap; - - switch (pGC->fillStyle) { - case FillSolid: - pPixmap = 0; - break; - case FillOpaqueStippled: - case FillStippled: - pPixmap = pGC->stipple; - break; - case FillTiled: - pPixmap = pGC->tile.pixmap; - break; - } - s3AllocPattern (pGC->pScreen, - s3GCMap(pGC), - pPixmap, - pGC->patOrg.x + pGC->lastWinOrg.x, - pGC->patOrg.y + pGC->lastWinOrg.y, - pGC->fillStyle, pGC->fgPixel, pGC->bgPixel, - &s3Priv->pPattern); -} - -void -s3MoveGCFill (GCPtr pGC) -{ - s3PrivGCPtr s3Priv = s3GetGCPrivate (pGC); - int xorg, yorg; - s3PatternPtr pPattern; - - if (pPattern = s3Priv->pPattern) - { - /* - * Reset origin - */ - xorg = pGC->patOrg.x + pGC->lastWinOrg.x; - yorg = pGC->patOrg.y + pGC->lastWinOrg.y; - pPattern->xrot = (-xorg) & (S3_TILE_SIZE - 1); - pPattern->yrot = (-yorg) & (S3_TILE_SIZE - 1); - /* - * Invalidate cache entry - */ - pPattern->id = 0; - pPattern->cache = 0; - } -} - -/* - * S3 Patterns. These are always full-depth images, stored in off-screen - * memory. - */ - -Pixel -s3FetchPatternPixel (s3PatternPtr pPattern, int x, int y) -{ - CARD8 *src; - CARD16 *src16; - CARD32 *src32; - PixmapPtr pPixmap = pPattern->pPixmap; - - x = (x + pPattern->xrot) % pPixmap->drawable.width; - y = (y + pPattern->yrot) % pPixmap->drawable.height; - src = (CARD8 *) pPixmap->devPrivate.ptr + y * pPixmap->devKind; - switch (pPixmap->drawable.bitsPerPixel) { - case 1: - return (src[x>>3] >> (x & 7)) & 1 ? 0xffffffff : 0x00; - case 4: - if (x & 1) - return src[x>>1] >> 4; - else - return src[x>>1] & 0xf; - case 8: - return src[x]; - case 16: - src16 = (CARD16 *) src; - return src16[x]; - case 32: - src32 = (CARD32 *) src; - return src32[x]; - } -} - -/* - * Place pattern image on screen; done with S3 locked - */ -void -_s3PutPattern (ScreenPtr pScreen, int ma, s3PatternPtr pPattern) -{ - SetupS3(pScreen); - s3ScreenInfo(pScreenPriv); - int x, y; - CARD8 *dstLine, *dst8; - CARD16 *dst16; - CARD32 *dst32; - S3PatternCache *cache = pPattern->cache; -#ifdef S3_TRIO - int fb = 0; -#else - int fb = s3s->fbmap[ma]; -#endif - - DRAW_DEBUG ((DEBUG_PATTERN, "_s3PutPattern 0x%x id %d to %d %d", - pPattern, pPattern->id, cache->x, cache->y)); - - dstLine = (pScreenPriv->screen->fb[fb].frameBuffer + - cache->y * pScreenPriv->screen->fb[fb].byteStride + - cache->x * pScreenPriv->bytesPerPixel[fb]); - - CheckSyncS3 (pScreen); - - for (y = 0; y < S3_TILE_SIZE; y++) - { - switch (pScreenPriv->screen->fb[fb].bitsPerPixel) { - case 8: - dst8 = dstLine; - for (x = 0; x < S3_TILE_SIZE; x++) - *dst8++ = s3FetchPatternPixel (pPattern, x, y); - DRAW_DEBUG ((DEBUG_PATTERN, "%c%c%c%c%c%c%c%c", - dstLine[0] ? 'X' : ' ', - dstLine[1] ? 'X' : ' ', - dstLine[2] ? 'X' : ' ', - dstLine[3] ? 'X' : ' ', - dstLine[4] ? 'X' : ' ', - dstLine[5] ? 'X' : ' ', - dstLine[6] ? 'X' : ' ', - dstLine[7] ? 'X' : ' ')); - break; - case 16: - dst16 = (CARD16 *) dstLine; - for (x = 0; x < S3_TILE_SIZE; x++) - *dst16++ = s3FetchPatternPixel (pPattern, x, y); - break; - case 32: - dst32 = (CARD32 *) dstLine; - for (x = 0; x < S3_TILE_SIZE; x++) - *dst32++ = s3FetchPatternPixel (pPattern, x, y); - break; - } - dstLine += pScreenPriv->screen->fb[fb].byteStride; - } -} - -/* - * Load a stipple to off-screen memory; done with S3 locked - */ -void -_s3LoadPattern (ScreenPtr pScreen, int ma, s3PatternPtr pPattern) -{ - SetupS3(pScreen); - s3ScreenInfo(pScreenPriv); - S3PatternCache *cache; - - DRAW_DEBUG((DEBUG_PATTERN, - "s3LoadPattern 0x%x id %d cache 0x%x cacheid %d", - pPattern, pPattern->id, pPattern->cache, - pPattern->cache ? pPattern->cache->id : -1)); - /* - * Check to see if its still loaded - */ - cache = pPattern->cache; - if (cache && cache->id == pPattern->id) - return; - /* - * Lame replacement strategy; assume we'll have plenty of room. - */ - cache = &s3s->fb[ma].patterns.cache[s3s->fb[ma].patterns.last_used]; - if (++s3s->fb[ma].patterns.last_used == s3s->fb[ma].patterns.ncache) - s3s->fb[ma].patterns.last_used = 0; - cache->id = ++s3s->fb[ma].patterns.last_id; - pPattern->id = cache->id; - pPattern->cache = cache; - _s3PutPattern (pScreen, ma, pPattern); -} - -void -s3DestroyGC (GCPtr pGC) -{ - s3PrivGCPtr s3Priv = s3GetGCPrivate (pGC); - - if (s3Priv->pPattern) - xfree (s3Priv->pPattern); - miDestroyGC (pGC); -} - -GCFuncs s3GCFuncs = { - s3ValidateGC, - miChangeGC, - miCopyGC, - s3DestroyGC, - miChangeClip, - miDestroyClip, - miCopyClip -}; - -int -s3CreateGC (GCPtr pGC) -{ - KdScreenPriv(pGC->pScreen); - s3ScreenInfo(pScreenPriv); - s3PrivGCPtr s3Priv; - - if (!fbCreateGC (pGC)) - return FALSE; - - if (pGC->depth != 1) - pGC->funcs = &s3GCFuncs; - - s3Priv = s3GetGCPrivate(pGC); - s3Priv->type = DRAWABLE_PIXMAP; - s3Priv->pPattern = 0; -#ifndef S3_TRIO - if (pGC->depth == s3s->primary_depth) - s3Priv->ma = 0; - else - s3Priv->ma = 1; -#endif - return TRUE; -} - -Bool -s3CreateWindow (WindowPtr pWin) -{ - KdScreenPriv(pWin->drawable.pScreen); - s3ScreenInfo(pScreenPriv); - - dixSetPrivate(&pWin->devPrivates, s3WindowPrivateKey, NULL); - return KdCreateWindow (pWin); -} - -Bool -s3DestroyWindow (WindowPtr pWin) -{ - s3PatternPtr pPattern; - if (pPattern = s3GetWindowPrivate(pWin)) - xfree (pPattern); - return fbDestroyWindow (pWin); -} - -Bool -s3ChangeWindowAttributes (WindowPtr pWin, Mask mask) -{ - KdScreenPriv(pWin->drawable.pScreen); - Bool ret; - s3PatternPtr pPattern; - PixmapPtr pPixmap; - int fillStyle; - - ret = fbChangeWindowAttributes (pWin, mask); - if (mask & CWBackPixmap) - { - if (pWin->backgroundState == BackgroundPixmap) - { - pPixmap = pWin->background.pixmap; - fillStyle = FillTiled; - } - else - { - pPixmap = 0; - fillStyle = FillSolid; - } - pPattern = s3GetWindowPrivate(pWin); - s3AllocPattern (pWin->drawable.pScreen, - s3DrawMap (&pWin->drawable), - pPixmap, - pWin->drawable.x, pWin->drawable.y, - fillStyle, 0, 0, &pPattern); - DRAW_DEBUG ((DEBUG_PAINT_WINDOW, "Background pattern 0x%x pixmap 0x%x style %d", - pPattern, pPixmap, fillStyle)); - s3SetWindowPrivate (pWin, pPattern); - } - return ret; -} - - -#ifndef S3_TRIO -void -s3PaintKey (DrawablePtr pDrawable, - RegionPtr pRegion, - CARD32 pixel, - int fb) -{ - SetupS3 (pDrawable->pScreen); - s3ScreenInfo (pScreenPriv); - int nBox = REGION_NUM_RECTS(pRegion); - BoxPtr pBox = REGION_RECTS(pRegion); - int ma; - - if (!nBox) - return; - - for (ma = 0; s3s->fbmap[ma] >= 0; ma++) - if (s3s->fbmap[ma] == fb) - break; - s3SetGlobalBitmap (pDrawable->pScreen, ma); - _s3SetSolidFill (s3, pixel, GXcopy, 0xffffffff); - while (nBox--) - { - _s3SolidRect(s3,pBox->x1,pBox->y1,pBox->x2-pBox->x1,pBox->y2-pBox->y1); - pBox++; - } - MarkSyncS3 (pDrawable->pScreen); -} -#endif - -void -s3CopyWindowProc (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - BoxPtr pboxOrig, - int nboxOrig, - int dx, - int dy, - Bool reverse, - Bool upsidedown, - Pixel bitplane, - void *closure) -{ - SetupS3(pDstDrawable->pScreen); - s3ScreenInfo(pScreenPriv); - KdScreenInfo *screen = pScreenPriv->screen; - int srcX, srcY, dstX, dstY; - int x1, x2; - int w, h; - int flags; - int fb = (int) closure; - int ma; - BoxPtr pbox; - int nbox; - int bitsPerPixel; - -#ifdef S3_TRIO - ma = 0; -#else - for (ma = 0; s3s->fbmap[ma] >= 0; ma++) - if (s3s->fbmap[ma] == fb) - break; -#endif - bitsPerPixel = screen->fb[fb].bitsPerPixel; - if (bitsPerPixel == 24) - dx *= 3; - nbox = nboxOrig; - pbox = pboxOrig; - s3SetGlobalBitmap (pDstDrawable->pScreen, ma); - _s3SetBlt(s3,GXcopy,~0); - while (nbox--) - { - x1 = pbox->x1; - x2 = pbox->x2; - if (bitsPerPixel == 24) - { - x1 *= 3; - x2 *= 3; - } - - w = x2 - x1; - h = pbox->y2 - pbox->y1; - flags = 0; - if (reverse) - { - dstX = x2 - 1; - } - else - { - dstX = x1; - flags |= INC_X; - } - srcX = dstX + dx; - - if (upsidedown) - { - dstY = pbox->y2 - 1; - } - else - { - dstY = pbox->y1; - flags |= INC_Y; - } - srcY = dstY + dy; - - _s3Blt (s3, srcX, srcY, dstX, dstY, w, h, flags); - pbox++; - } - MarkSyncS3 (pDstDrawable->pScreen); -} - -void -s3CopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - KdScreenPriv (pScreen); - s3ScreenInfo (pScreenPriv); - KdScreenInfo *screen = pScreenPriv->screen; - RegionRec rgnDst; - int dx, dy; - WindowPtr pwinRoot; - - pwinRoot = WindowTable[pWin->drawable.pScreen->myNum]; - - dx = ptOldOrg.x - pWin->drawable.x; - dy = ptOldOrg.y - pWin->drawable.y; - - REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); - - REGION_INIT (pWin->drawable.pScreen, &rgnDst, NullBox, 0); - - REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst, - &pWin->borderClip, prgnSrc); - - fbCopyRegion ((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot, - 0, - &rgnDst, dx, dy, s3CopyWindowProc, 0, 0); - - REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); -} - -void -s3_24FillBoxSolid (DrawablePtr pDrawable, int nBox, BoxPtr pBox, - unsigned long pixel, int alu, unsigned long planemask) -{ - SetupS3(pDrawable->pScreen); - register int r; - int x1, x2; - - s3SetGlobalBitmap (pDrawable->pScreen, s3DrawMap (pDrawable)); - _s3SetSolidFill(s3,pixel,alu,planemask); - - while (nBox--) { - x1 = pBox->x1 * 3; - x2 = pBox->x2 * 3; - _s3SolidRect(s3,x1,pBox->y1,x2-x1,pBox->y2-pBox->y1); - pBox++; - } - MarkSyncS3 (pDrawable->pScreen); -} - -#define ok24(p) (((p) & 0xffffff) == ((((p) & 0xff) << 16) | (((p) >> 8) & 0xffff))) - -void -s3_24FillSpans (DrawablePtr pDrawable, GCPtr pGC, int n, - DDXPointPtr ppt, int *pwidth, int fSorted) -{ - SetupS3(pDrawable->pScreen); - int x, y, x1, y1, x2, y2; - int width; - /* next three parameters are post-clip */ - int nTmp; - int *pwidthFree;/* copies of the pointers to free */ - DDXPointPtr pptFree; - BoxPtr extents; - RegionPtr pClip = fbGetCompositeClip (pGC); - - if (pGC->fillStyle != FillSolid || !ok24 (pGC->fgPixel) || !ok24(pGC->planemask)) - { - KdCheckFillSpans (pDrawable, pGC, n, ppt, pwidth, fSorted); - return; - } - - s3SetGlobalBitmap (pDrawable->pScreen, s3GCMap (pGC)); - if (REGION_NUM_RECTS(pClip) == 1) - { - extents = REGION_RECTS(pClip); - x1 = extents->x1; - x2 = extents->x2; - y1 = extents->y1; - y2 = extents->y2; - _s3SetSolidFill(s3,pGC->fgPixel,pGC->alu,pGC->planemask); - while (n--) - { - y = ppt->y; - if (y1 <= y && y < y2) - { - x = ppt->x; - width = *pwidth; - if (x < x1) - { - width -= (x1 - x); - x = x1; - } - if (x2 < x + width) - width = x2 - x; - if (width > 0) - { - _s3SolidRect(s3,x*3,y,width*3,1); - } - } - ppt++; - pwidth++; - } - } - else - { - nTmp = n * miFindMaxBand(pClip); - pwidthFree = (int *)xalloc(nTmp * sizeof(int)); - pptFree = (DDXPointRec *)xalloc(nTmp * sizeof(DDXPointRec)); - if(!pptFree || !pwidthFree) - { - if (pptFree) xfree(pptFree); - if (pwidthFree) xfree(pwidthFree); - return; - } - n = miClipSpans(fbGetCompositeClip(pGC), - ppt, pwidth, n, - pptFree, pwidthFree, fSorted); - pwidth = pwidthFree; - ppt = pptFree; - _s3SetSolidFill(s3,pGC->fgPixel,pGC->alu,pGC->planemask); - while (n--) - { - x = ppt->x; - y = ppt->y; - ppt++; - width = *pwidth++; - if (width) - { - _s3SolidRect(s3,x*3,y,width*3,1); - } - } - xfree(pptFree); - xfree(pwidthFree); - } - MarkSyncS3 (pDrawable->pScreen); -} - -void -s3_24CopyNtoN (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - BoxPtr pbox, - int nbox, - int dx, - int dy, - Bool reverse, - Bool upsidedown, - Pixel bitplane, - void *closure) -{ - SetupS3(pDstDrawable->pScreen); - int srcX, srcY, dstX, dstY; - int w, h; - int flags; - int x1, x2; - - if (sourceInvarient (pGC->alu)) - { - s3_24FillBoxSolid (pDstDrawable, nbox, pbox, 0, pGC->alu, pGC->planemask); - return; - } - - s3SetGlobalBitmap (pDstDrawable->pScreen, s3GCMap (pGC)); - _s3SetBlt(s3,pGC->alu,pGC->planemask); - DRAW_DEBUG ((DEBUG_RENDER, "s3CopyNtoN alu %d planemask 0x%x", - pGC->alu, pGC->planemask)); - dx *= 3; - while (nbox--) - { - x1 = pbox->x1 * 3; - x2 = pbox->x2 * 3; - w = x2 - x1; - h = pbox->y2 - pbox->y1; - flags = 0; - if (reverse) - { - dstX = x2 - 1; - } - else - { - dstX = x1; - flags |= INC_X; - } - srcX = dstX + dx; - - if (upsidedown) - { - dstY = pbox->y2 - 1; - } - else - { - dstY = pbox->y1; - flags |= INC_Y; - } - srcY = dstY + dy; - - _s3Blt (s3, srcX, srcY, dstX, dstY, w, h, flags); - pbox++; - } - MarkSyncS3 (pSrcDrawable->pScreen); -} - -RegionPtr -s3_24CopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, - int srcx, int srcy, int width, int height, int dstx, int dsty) -{ - SetupS3(pDstDrawable->pScreen); - - if (pSrcDrawable->type == DRAWABLE_WINDOW && - pDstDrawable->type == DRAWABLE_WINDOW && - ok24(pGC->planemask)) - { - return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, - srcx, srcy, width, height, - dstx, dsty, s3_24CopyNtoN, 0, 0); - } - return KdCheckCopyArea (pSrcDrawable, pDstDrawable, pGC, - srcx, srcy, width, height, dstx, dsty); -} - - -#define NUM_STACK_RECTS 1024 - -void -s3_24PolyFillRect (DrawablePtr pDrawable, GCPtr pGC, - int nrectFill, xRectangle *prectInit) -{ - s3GCPrivate(pGC); - xRectangle *prect; - RegionPtr prgnClip; - register BoxPtr pbox; - register BoxPtr pboxClipped; - BoxPtr pboxClippedBase; - BoxPtr pextent; - BoxRec stackRects[NUM_STACK_RECTS]; - int numRects; - int n; - int xorg, yorg; - int x, y; - - if (pGC->fillStyle != FillSolid || !ok24 (pGC->fgPixel) || !ok24(pGC->planemask)) - { - KdCheckPolyFillRect (pDrawable, pGC, nrectFill, prectInit); - return; - } - - prgnClip = fbGetCompositeClip(pGC); - xorg = pDrawable->x; - yorg = pDrawable->y; - - if (xorg || yorg) - { - prect = prectInit; - n = nrectFill; - while(n--) - { - prect->x += xorg; - prect->y += yorg; - prect++; - } - } - - prect = prectInit; - - numRects = REGION_NUM_RECTS(prgnClip) * nrectFill; - if (numRects > NUM_STACK_RECTS) - { - pboxClippedBase = (BoxPtr)xalloc(numRects * sizeof(BoxRec)); - if (!pboxClippedBase) - return; - } - else - pboxClippedBase = stackRects; - - pboxClipped = pboxClippedBase; - - if (REGION_NUM_RECTS(prgnClip) == 1) - { - int x1, y1, x2, y2, bx2, by2; - - pextent = REGION_RECTS(prgnClip); - x1 = pextent->x1; - y1 = pextent->y1; - x2 = pextent->x2; - y2 = pextent->y2; - while (nrectFill--) - { - if ((pboxClipped->x1 = prect->x) < x1) - pboxClipped->x1 = x1; - - if ((pboxClipped->y1 = prect->y) < y1) - pboxClipped->y1 = y1; - - bx2 = (int) prect->x + (int) prect->width; - if (bx2 > x2) - bx2 = x2; - pboxClipped->x2 = bx2; - - by2 = (int) prect->y + (int) prect->height; - if (by2 > y2) - by2 = y2; - pboxClipped->y2 = by2; - - prect++; - if ((pboxClipped->x1 < pboxClipped->x2) && - (pboxClipped->y1 < pboxClipped->y2)) - { - pboxClipped++; - } - } - } - else - { - int x1, y1, x2, y2, bx2, by2; - - pextent = REGION_EXTENTS(pGC->pScreen, prgnClip); - x1 = pextent->x1; - y1 = pextent->y1; - x2 = pextent->x2; - y2 = pextent->y2; - while (nrectFill--) - { - BoxRec box; - - if ((box.x1 = prect->x) < x1) - box.x1 = x1; - - if ((box.y1 = prect->y) < y1) - box.y1 = y1; - - bx2 = (int) prect->x + (int) prect->width; - if (bx2 > x2) - bx2 = x2; - box.x2 = bx2; - - by2 = (int) prect->y + (int) prect->height; - if (by2 > y2) - by2 = y2; - box.y2 = by2; - - prect++; - - if ((box.x1 >= box.x2) || (box.y1 >= box.y2)) - continue; - - n = REGION_NUM_RECTS (prgnClip); - pbox = REGION_RECTS(prgnClip); - - /* clip the rectangle to each box in the clip region - this is logically equivalent to calling Intersect() - */ - while(n--) - { - pboxClipped->x1 = max(box.x1, pbox->x1); - pboxClipped->y1 = max(box.y1, pbox->y1); - pboxClipped->x2 = min(box.x2, pbox->x2); - pboxClipped->y2 = min(box.y2, pbox->y2); - pbox++; - - /* see if clipping left anything */ - if(pboxClipped->x1 < pboxClipped->x2 && - pboxClipped->y1 < pboxClipped->y2) - { - pboxClipped++; - } - } - } - } - if (pboxClipped != pboxClippedBase) - { - s3_24FillBoxSolid(pDrawable, - pboxClipped-pboxClippedBase, pboxClippedBase, - pGC->fgPixel, pGC->alu, pGC->planemask); - } - if (pboxClippedBase != stackRects) - xfree(pboxClippedBase); -} - -void -s3_24SolidBoxClipped (DrawablePtr pDrawable, - RegionPtr pClip, - int x1, - int y1, - int x2, - int y2, - FbBits fg) -{ - SetupS3 (pDrawable->pScreen); - BoxPtr pbox; - int nbox; - int partX1, partX2, partY1, partY2; - - s3SetGlobalBitmap (pDrawable->pScreen, s3DrawMap (pDrawable)); - _s3SetSolidFill(s3,fg,GXcopy,~0); - - for (nbox = REGION_NUM_RECTS(pClip), pbox = REGION_RECTS(pClip); - nbox--; - pbox++) - { - partX1 = pbox->x1; - if (partX1 < x1) - partX1 = x1; - - partX2 = pbox->x2; - if (partX2 > x2) - partX2 = x2; - - if (partX2 <= partX1) - continue; - - partY1 = pbox->y1; - if (partY1 < y1) - partY1 = y1; - - partY2 = pbox->y2; - if (partY2 > y2) - partY2 = y2; - - if (partY2 <= partY1) - continue; - - partX1 *= 3; - partX2 *= 3; - _s3SolidRect(s3,partX1, partY1, partX2-partX1, partY2-partY1); - } - MarkSyncS3(pDrawable->pScreen); -} - -void -s3_24ImageGlyphBlt (DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - unsigned int nglyph, - CharInfoPtr *ppciInit, - pointer pglyphBase) -{ - FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); - CharInfoPtr *ppci; - CharInfoPtr pci; - unsigned char *pglyph; /* pointer bits in glyph */ - int gWidth, gHeight; /* width and height of glyph */ - FbStride gStride; /* stride of glyph */ - Bool opaque; - int n; - int gx, gy; - FbBits *dst; - FbStride dstStride; - int dstBpp; - int dstXoff, dstYoff; - FbBits depthMask; - int xBack, widthBack; - int yBack, heightBack; - - depthMask = FbFullMask(pDrawable->depth); - if (!ok24 (pGC->fgPixel) || - !ok24(pGC->bgPixel) || - !ok24(pGC->planemask)) - { - KdCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase); - return; - } - fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); - - x += pDrawable->x; - y += pDrawable->y; - - ppci = ppciInit; - n = nglyph; - widthBack = 0; - while (n--) - widthBack += (*ppci++)->metrics.characterWidth; - - xBack = x; - if (widthBack < 0) - { - xBack += widthBack; - widthBack = -widthBack; - } - yBack = y - FONTASCENT(pGC->font); - heightBack = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font); - s3_24SolidBoxClipped (pDrawable, - fbGetCompositeClip(pGC), - xBack, - yBack, - xBack + widthBack, - yBack + heightBack, - pPriv->bg); - - KdCheckSync (pDrawable->pScreen); - - ppci = ppciInit; - while (nglyph--) - { - pci = *ppci++; - pglyph = FONTGLYPHBITS(pglyphBase, pci); - gWidth = GLYPHWIDTHPIXELS(pci); - gHeight = GLYPHHEIGHTPIXELS(pci); - if (gWidth && gHeight) - { - gx = x + pci->metrics.leftSideBearing; - gy = y - pci->metrics.ascent; - if (gWidth <= sizeof (FbStip) * 8 && - fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight)) - { - fbGlyph24 (dst + (gy - dstYoff) * dstStride, - dstStride, - dstBpp, - (FbStip *) pglyph, - pPriv->fg, - gx - dstXoff, - gHeight); - } - else - { - gStride = GLYPHWIDTHBYTESPADDED(pci) / sizeof (FbStip); - fbPutXYImage (pDrawable, - fbGetCompositeClip(pGC), - pPriv->fg, - pPriv->bg, - pPriv->pm, - GXcopy, - FALSE, - - gx, - gy, - gWidth, gHeight, - - (FbStip *) pglyph, - gStride, - 0); - } - } - x += pci->metrics.characterWidth; - } -} - -static const GCOps s3_24GCOps = { - s3_24FillSpans, - KdCheckSetSpans, - KdCheckPutImage, - KdCheckCopyArea, - KdCheckCopyPlane, - KdCheckPolyPoint, - KdCheckPolylines, - KdCheckPolySegment, - KdCheckPolyRectangle, - KdCheckPolyArc, - KdCheckFillPolygon, - s3_24PolyFillRect, - KdCheckPolyFillArc, - miPolyText8, - miPolyText16, - miImageText8, - miImageText16, - s3_24ImageGlyphBlt, - KdCheckPolyGlyphBlt, - KdCheckPushPixels, -}; - -void -s3_24ValidateGC (GCPtr pGC, Mask changes, DrawablePtr pDrawable) -{ - if (pDrawable->type != DRAWABLE_WINDOW) - pGC->ops = (GCOps *) &kdAsyncPixmapGCOps; - else - pGC->ops = (GCOps *) &s3_24GCOps; - fbValidateGC (pGC, changes, pDrawable); -} - -GCFuncs s3_24GCFuncs = { - s3_24ValidateGC, - miChangeGC, - miCopyGC, - miDestroyGC, - miChangeClip, - miDestroyClip, - miCopyClip -}; - -Bool -s3_24CreateGC (GCPtr pGC) -{ - if (!fbCreateGC (pGC)) - return FALSE; - - if (pGC->depth != 1) - pGC->funcs = &s3_24GCFuncs; - - return TRUE; -} - -Bool -s3_24CreateWindow(WindowPtr pWin) -{ - return fbCreateWindow (pWin); -} - - -Bool -s3DrawInit (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - s3ScreenInfo(pScreenPriv); - int ncache_w, ncache_h, ncache; - int px, py; - S3PatternCache *cache; - Bool dumb = FALSE; - int ma; - - switch (pScreenPriv->screen->fb[0].bitsPerPixel) { - case 8: - case 16: - case 32: - break; - case 24: - dumb = TRUE; - break; - default: - return FALSE; - } - /* - * Hook up asynchronous drawing - */ - RegisterSync (pScreen); - /* - * Replace various fb screen functions - */ - if (dumb) - { - pScreen->CreateGC = s3_24CreateGC; - pScreen->CreateWindow = s3_24CreateWindow; - pScreen->CopyWindow = s3CopyWindow; - } - else - { - if (!dixRequestPrivate(s3GCPrivateKey, sizeof (s3PrivGCRec))) - return FALSE; - pScreen->CreateGC = s3CreateGC; - pScreen->CreateWindow = s3CreateWindow; - pScreen->ChangeWindowAttributes = s3ChangeWindowAttributes; - pScreen->DestroyWindow = s3DestroyWindow; -#ifndef S3_TRIO - if (pScreenPriv->screen->fb[1].depth) - { - FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pScreen); - - pScrPriv->PaintKey = s3PaintKey; - pScrPriv->CopyWindow = s3CopyWindowProc; - pScreen->CopyWindow = fbOverlayCopyWindow; - } - else -#endif - pScreen->CopyWindow = s3CopyWindow; - - /* - * Initialize patterns - */ -#ifdef S3_TRIO - ma = 0; -#else - for (ma = 0; s3s->fbmap[ma] >= 0; ma++) -#endif - { - ncache_w = s3s->fb[ma].offscreen_width / S3_TILE_SIZE; - ncache_h = s3s->fb[ma].offscreen_height / S3_TILE_SIZE; - ncache = ncache_w * ncache_h; - if (ncache > 64) - ncache = 64; - DRAW_DEBUG ((DEBUG_S3INIT, "ncache_w %d ncache_h %d ncache %d", - ncache_w, ncache_h, ncache)); - s3s->fb[ma].patterns.cache = (S3PatternCache *) xalloc (ncache * sizeof (S3PatternCache)); - if (s3s->fb[ma].patterns.cache) - { - DRAW_DEBUG ((DEBUG_S3INIT, "Have pattern cache")); - s3s->fb[ma].patterns.ncache = ncache; - s3s->fb[ma].patterns.last_used = 0; - s3s->fb[ma].patterns.last_id = 0; - cache = s3s->fb[ma].patterns.cache; - for (py = 0; py < ncache_h && ncache; py++) - for (px = 0; px < ncache_w && ncache; px++) - { - cache->id = 0; - cache->x = s3s->fb[ma].offscreen_x + px * S3_TILE_SIZE; - cache->y = s3s->fb[ma].offscreen_y + py * S3_TILE_SIZE; - cache++; - ncache--; - } - } - } - } - return TRUE; -} - -void -s3DrawEnable (ScreenPtr pScreen) -{ - SetupS3(pScreen); - s3ScreenInfo(pScreenPriv); - int c; - int ma; - - s3SetGlobalBitmap (pScreen, 0); - _s3WaitIdleEmpty (s3); - if (pScreenPriv->screen->fb[0].bitsPerPixel == 24) - { - _s3SetScissorsTl(s3, 0, 0); - _s3SetScissorsBr(s3, pScreenPriv->screen->width*3 - 1, pScreenPriv->screen->height - 1); - _s3SetSolidFill(s3, pScreen->whitePixel, GXcopy, ~0); - _s3SolidRect (s3, 0, 0, pScreenPriv->screen->width*3, pScreenPriv->screen->height); - } - else - { - /* - * Flush pattern cache - */ -#ifdef S3_TRIO - ma = 0; -#else - for (ma = 0; s3s->fbmap[ma] >= 0; ma++) -#endif - { - for (c = 0; c < s3s->fb[ma].patterns.ncache; c++) - s3s->fb[ma].patterns.cache[c].id = 0; - } - - _s3SetScissorsTl(s3, 0, 0); - _s3SetScissorsBr(s3, pScreenPriv->screen->width - 1, pScreenPriv->screen->height - 1); - _s3SetSolidFill(s3, pScreen->blackPixel, GXcopy, ~0); - _s3SolidRect (s3, 0, 0, pScreenPriv->screen->width, pScreenPriv->screen->height); - } - MarkSyncS3 (pScreen); -} - -void -s3DrawDisable (ScreenPtr pScreen) -{ - SetupS3 (pScreen); - _s3WaitIdleEmpty (s3); -} - -void -s3DrawFini (ScreenPtr pScreen) -{ - SetupS3(pScreen); - s3ScreenInfo(pScreenPriv); - int ma; - -#ifdef S3_TRIO - ma = 0; -#else - for (ma = 0; s3s->fbmap[ma] >= 0; ma++) -#endif - { - if (s3s->fb[ma].patterns.cache) - { - xfree (s3s->fb[ma].patterns.cache); - s3s->fb[ma].patterns.cache = 0; - s3s->fb[ma].patterns.ncache = 0; - } - } -} - -void -s3DrawSync (ScreenPtr pScreen) -{ - SetupS3(pScreen); - - _s3WaitIdleEmpty(s3c->s3); -} diff --git a/hw/kdrive/savage/s3draw.h b/hw/kdrive/savage/s3draw.h deleted file mode 100644 index eab8e395e..000000000 --- a/hw/kdrive/savage/s3draw.h +++ /dev/null @@ -1,468 +0,0 @@ -/* - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifndef _S3DRAW_H_ -#define _S3DRAW_H_ - -extern DevPrivateKey s3GCPrivateKey; -extern DevPrivateKey s3WindowPrivateKey; - -typedef struct _s3Pattern { - S3PatternCache *cache; - int id; - PixmapPtr pPixmap; - int fillStyle; - int xrot, yrot; - unsigned int fore, back; -} s3PatternRec, *s3PatternPtr; - -typedef struct _s3PrivGC { - int type; /* type of drawable validated against */ - int ma; /* stream descriptor */ - s3PatternPtr pPattern; /* pattern */ -} s3PrivGCRec, *s3PrivGCPtr; - -#define s3GetGCPrivate(g) ((s3PrivGCPtr) \ - dixLookupPrivate(&(g)->devPrivates, s3GCPrivateKey)) - -#define s3GCPrivate(g) s3PrivGCPtr s3Priv = s3GetGCPrivate(g) - -#define s3GetWindowPrivate(w) ((s3PatternPtr) \ - dixLookupPrivate(&(w)->devPrivates, s3WindowPrivateKey)) - -#define s3SetWindowPrivate(w,p) \ - dixSetPrivate(&(w)->devPrivates, s3WindowPrivateKey, p) - -void _s3LoadPattern (ScreenPtr pScreen, int fb, s3PatternPtr pPattern); - -#define SetupS3(s) KdScreenPriv(s); \ - s3CardInfo(pScreenPriv); \ - S3Ptr s3 = s3c->s3 - -#ifdef S3_SYNC_DEBUG -#define SYNC_DEBUG() fprintf (stderr, "Sync at %s:%d\n", __FILE__,__LINE__) -#else -#define SYNC_DEBUG() -#endif - -#define S3_ASYNC -#ifdef S3_ASYNC -#define CheckSyncS3(s) KdCheckSync(s) -#define MarkSyncS3(s) KdMarkSync(s) -#define RegisterSync(screen) KdScreenInitAsync (screen) -#else -#define CheckSyncS3(s3c) -#define MarkSyncS3(s3c) _s3WaitIdleEmpty(s3c->s3) -#define RegisterSync(screen) -#endif - -#define WIDEN(x) ((unsigned long) (x)) -#define MERGE(a,b) ((WIDEN(a) << 16) | WIDEN(b)) - -#define s3BitmapDescriptor(_stream) ((_stream) + 1) - -#ifdef S3_TRIO -#define s3DrawMap(pDraw) 0 -#define s3SetGlobalBitmap(s,d) -#else -#define s3DrawMap(pDraw) ((pDraw)->depth == \ - getS3ScreenInfo(pScreenPriv)->primary_depth ? 0 : 1) -#endif - -#define s3GCMap(pGC) (s3GetGCPrivate(pGC)->ma) - -/* - * Ok, so the S3 is broken -- it expects bitmaps to come MSB bit order, - * but it's willing to take them in LSB byte order. These macros - * flip bits around without flipping bytes. Instead of using a table - * and burning memory bandwidth, do them in place with the CPU. - */ - -/* The MIPS compiler automatically places these constants in registers */ -#define S3InvertBits32(v) { \ - v = ((v & 0x55555555) << 1) | ((v >> 1) & 0x55555555); \ - v = ((v & 0x33333333) << 2) | ((v >> 2) & 0x33333333); \ - v = ((v & 0x0f0f0f0f) << 4) | ((v >> 4) & 0x0f0f0f0f); \ -} - -#define S3InvertBits16(v) { \ - v = ((v & 0x5555) << 1) | ((v >> 1) & 0x5555); \ - v = ((v & 0x3333) << 2) | ((v >> 2) & 0x3333); \ - v = ((v & 0x0f0f) << 4) | ((v >> 4) & 0x0f0f); \ -} - -#define S3InvertBits8(v) { \ - v = ((v & 0x55) << 1) | ((v >> 1) & 0x55); \ - v = ((v & 0x33) << 2) | ((v >> 2) & 0x33); \ - v = ((v & 0x0f) << 4) | ((v >> 4) & 0x0f); \ -} - -#define S3ByteSwap32(x) ((x) = (((x) >> 24) | \ - (((x) >> 8) & 0xff00) | \ - (((x) << 8) & 0xff0000) | \ - ((x) << 24))) - -#define S3ByteSwap16(x) ((x) = ((x) << 8) | ((x) >> 8)) - -#if BITMAP_BIT_ORDER == LSBFirst -#define S3AdjustBits32(x) S3InvertBits32(x) -#define S3AdjustBits16(x) S3InvertBits16(x) -#else -#define S3AdjustBits32(x) S3ByteSwap32(x) -#define S3AdjustBits16(x) S3ByteSwap16(x) -#endif - -#define _s3WaitSlot(s3) _s3WaitSlots(s3,1) - -#define _s3SetFg(s3,_fg) { \ - DRAW_DEBUG ((DEBUG_REGISTERS, " fg <- 0x%x", _fg));\ - s3->fg = (_fg); \ -} - -#define _s3SetBg(s3,_bg) { \ - DRAW_DEBUG ((DEBUG_REGISTERS, " bg <- 0x%x", _bg));\ - s3->bg = (_bg); \ -} - -#define _s3SetWriteMask(s3,_mask) {\ - DRAW_DEBUG((DEBUG_REGISTERS," write_mask <- 0x%x", _mask)); \ - s3->write_mask = (_mask); \ -} - -#define _s3SetReadMask(s3,_mask) {\ - DRAW_DEBUG((DEBUG_REGISTERS," read_mask <- 0x%x", _mask)); \ - s3->read_mask = (_mask); \ -} - -#define _s3SetPixelControl(s3,_ctl) { \ - DRAW_DEBUG((DEBUG_REGISTERS, " pix_cntl <- 0x%x", PIX_CNTL | (_ctl))); \ - s3->pix_cntl_mult_misc2 = MERGE (CONTROL_MISC2, PIX_CNTL | (_ctl)); \ -} - -#define _s3SetFgMix(s3,_mix) { \ - DRAW_DEBUG((DEBUG_REGISTERS, " fg_mix <- 0x%x", _mix)); \ - s3->enh_fg_mix = (_mix); \ -} - -#define _s3SetBgMix(s3,_mix) { \ - DRAW_DEBUG((DEBUG_REGISTERS, " bg_mix <- 0x%x", _mix)); \ - s3->enh_bg_mix = (_mix); \ -} - -#define _s3SetMix(s3,fg_mix,bg_mix) { \ - DRAW_DEBUG((DEBUG_REGISTERS, " alt_mix <- 0x%x", MERGE(fg_mix,bg_mix))); \ - s3->alt_mix = MERGE(fg_mix,bg_mix); \ -} - -#define _s3SetCur(s3,_x,_y) { \ - DRAW_DEBUG ((DEBUG_REGISTERS, " alt_curxy <- 0x%x", MERGE(_x,_y))); \ - s3->alt_curxy = MERGE(_x,_y); \ -} - -#define _s3SetStep(s3,_x,_y) { \ - DRAW_DEBUG ((DEBUG_REGISTERS, " alt_step <- 0x%x", MERGE(_x,_y))); \ - s3->alt_step = MERGE(_x,_y); \ -} - -#define _s3SetErr(s3,_e) { \ - DRAW_DEBUG ((DEBUG_REGISTERS, " err_term <- 0x%x", _e)); \ - s3->err_term = (_e); \ -} - -#define _s3SetPcnt(s3,_x,_y) { \ - DRAW_DEBUG ((DEBUG_REGISTERS, " alt_pcnt <- 0x%x", MERGE(_x,_y))); \ - s3->alt_pcnt = MERGE(_x,_y); \ -} - -#define _s3SetScissorsTl(s3,t,l) {\ - DRAW_DEBUG ((DEBUG_REGISTERS, " scissors_tl <- 0x%x", MERGE(t,l))); \ - s3->scissors_tl = MERGE(t,l); \ -} - -#define _s3SetScissorsBr(s3,b,r) {\ - DRAW_DEBUG ((DEBUG_REGISTERS, " scissors_br <- 0x%x", MERGE(b,r))); \ - s3->scissors_br = MERGE(b,r); \ -} - -#define _s3CmdWait(s3) - -#define _s3SetCmd(s3,_cmd) { \ - DRAW_DEBUG((DEBUG_REGISTERS, " cmd <- 0x%x", _cmd)); \ - _s3CmdWait(s3); \ - s3->cmd_gp_stat = (_cmd); \ - /* { CARD32 __junk__; __junk__ = s3->cmd_gp_stat; } */ \ -} - -#define _s3SetSolidFill(s3,pix,alu,mask) { \ - DRAW_DEBUG((DEBUG_SET,"set fill 0x%x %d 0x%x",pix,alu,mask)); \ - _s3WaitSlots(s3,4); \ - _s3SetFg (s3, pix); \ - _s3SetWriteMask(s3,mask); \ - _s3SetMix (s3, FSS_FRGDCOL | s3alu[alu], BSS_BKGDCOL | MIX_SRC); \ - _s3SetPixelControl (s3, MIXSEL_FRGDMIX); \ - DRAW_DEBUG((DEBUG_SET," done")); \ -} - -#define _s3SolidRect(s3,x,y,w,h) {\ - DRAW_DEBUG((DEBUG_RENDER,"solid rect %d,%d %dx%d",x,y,w,h)); \ - _s3WaitSlots(s3,3); \ - _s3SetCur(s3, x, y); \ - _s3SetPcnt (s3, (w)-1, (h)-1); \ - _s3SetCmd (s3, CMD_RECT|INC_X|INC_Y|DRAW|WRTDATA); \ - DRAW_DEBUG((DEBUG_RENDER," done")); \ -} - -#define _s3SolidLine(s3,maj,min,len,cmd) { \ - DRAW_DEBUG ((DEBUG_RENDER, "solid line 0x%x 0x%x 0x%x", maj, min, cmd)); \ - _s3WaitSlots(s3,4); \ - _s3SetPcnt(s3, (len), 0); \ - _s3SetStep(s3, 2*((min) - (maj)), 2*(min)); \ - _s3SetErr(s3, 2*(min) - (maj)); \ - _s3SetCmd (s3, CMD_LINE | (cmd) | DRAW | WRTDATA); \ -} - -#define _s3ClipLine(s3,cmd,e1,e2,e,len) {\ - DRAW_DEBUG ((DEBUG_RENDER, "clip line 0x%x 0x%x 0x%x 0x%x 0x%x", cmd,e1,e2,e,len)); \ - _s3WaitSlots(s3, 4); \ - _s3SetPcnt (s3, (len), 0); \ - _s3SetStep (s3, e2, e1); \ - _s3SetErr (s3, e); \ - _s3SetCmd (s3, CMD_LINE | (cmd) | DRAW | WRTDATA); \ -} - -#define _s3SetTile(s3,alu,mask) { \ - DRAW_DEBUG ((DEBUG_SET,"set tile %d 0x%x", alu, mask)); \ - _s3WaitSlots(s3,3); \ - _s3SetWriteMask(s3, mask); \ - _s3SetMix(s3, FSS_BITBLT | s3alu[alu], BSS_BITBLT|s3alu[alu]); \ - _s3SetPixelControl (s3, MIXSEL_FRGDMIX); \ - DRAW_DEBUG((DEBUG_SET," done")); \ -} - -/* - * For some reason, MIX_DST doesn't work in this mode; use MIX_OR with - * an explicit 0 pixel value - */ -#define _s3SetStipple(s3,alu,mask,_fg) {\ - DRAW_DEBUG ((DEBUG_SET,"set stipple 0x%x %d 0x%x", _fg, alu, mask)); \ - _s3WaitSlots(s3,5); \ - _s3SetFg (s3, _fg); \ - _s3SetBg (s3, 0); \ - _s3SetWriteMask(s3,mask); \ - _s3SetMix (s3, FSS_FRGDCOL | s3alu[alu], BSS_BKGDCOL|MIX_OR); \ - _s3SetPixelControl (s3, MIXSEL_EXPBLT); \ - DRAW_DEBUG((DEBUG_SET," done")); \ -} - -#define _s3SetOpaqueStipple(s3,alu,mask,_fg,_bg) {\ - DRAW_DEBUG ((DEBUG_SET,"set opaque stipple 0x%x 0x%x %d 0x%x", _fg, _bg, alu, mask)); \ - _s3WaitSlots(s3,5); \ - _s3SetFg (s3, _fg); \ - _s3SetBg (s3, _bg); \ - _s3SetWriteMask(s3,mask); \ - _s3SetMix (s3, FSS_FRGDCOL | s3alu[alu], BSS_BKGDCOL|s3alu[alu]); \ - _s3SetPixelControl (s3, MIXSEL_EXPBLT); \ - DRAW_DEBUG((DEBUG_SET," done")); \ -} - -#define _s3PatRect(s3,px,py,x,y,w,h) {\ - DRAW_DEBUG ((DEBUG_RENDER, "pat rect %d,%d %dx%d", x,y,w,h)); \ - _s3WaitSlots(s3, 4); \ - _s3SetCur (s3, px, py); \ - _s3SetStep (s3, x, y); \ - _s3SetPcnt (s3, (w)-1, (h)-1); \ - _s3SetCmd (s3, CMD_PATBLT|INC_X|INC_Y|DRAW|PLANAR|WRTDATA); \ - DRAW_DEBUG((DEBUG_RENDER," done")); \ -} - -#define _s3SetBlt(s3,alu,mask) { \ - DRAW_DEBUG ((DEBUG_SET,"set blt %d 0x%x", alu, mask)); \ - _s3WaitSlots(s3,3); \ - _s3SetPixelControl (s3, MIXSEL_FRGDMIX); \ - _s3SetMix(s3, FSS_BITBLT | s3alu[alu], BSS_BITBLT | s3alu[alu]); \ - _s3SetWriteMask(s3, mask); \ - DRAW_DEBUG((DEBUG_SET," done")); \ -} - -#define _s3Blt(s3,_sx,_sy,_dx,_dy,_w,_h,_dir) { \ - DRAW_DEBUG ((DEBUG_RENDER, "blt %d,%d -> %d,%d %dx%d 0x%x", \ - _sx,_sy,_dx,_dy,_w,_h,_dir)); \ - _s3WaitSlots(s3,4); \ - _s3SetCur(s3,_sx,_sy); \ - _s3SetStep(s3,_dx,_dy); \ - _s3SetPcnt(s3,(_w)-1,(_h)-1); \ - _s3SetCmd (s3, CMD_BITBLT | (_dir) | DRAW | WRTDATA); \ - DRAW_DEBUG((DEBUG_RENDER," done")); \ -} - -#define _s3SetOpaquePlaneBlt(s3,alu,mask,_fg,_bg) {\ - DRAW_DEBUG ((DEBUG_SET,"set opaque plane blt 0x%x 0x%x %d 0x%x", \ - _fg, _bg, alu, mask)); \ - /* _s3WaitSlots(s3, 5); */ \ - _s3WaitIdleEmpty (s3); \ - _s3SetFg(s3,_fg); \ - _s3SetBg(s3,_bg); \ - _s3SetWriteMask(s3,mask); \ - _s3SetMix(s3,FSS_FRGDCOL|s3alu[alu], BSS_BKGDCOL|s3alu[alu]); \ - _s3SetPixelControl(s3,MIXSEL_EXPPC); \ - DRAW_DEBUG((DEBUG_SET," done")); \ -} - -#define _s3SetTransparentPlaneBlt(s3,alu,mask,_fg) {\ - DRAW_DEBUG ((DEBUG_SET,"set transparent plane blt 0x%x %d 0x%x", \ - _fg, alu, mask)); \ - /*_s3WaitSlots(s3, 4); */ \ - _s3WaitIdleEmpty (s3); \ - _s3SetFg(s3,_fg); \ - _s3SetWriteMask(s3,mask); \ - _s3SetMix(s3,FSS_FRGDCOL|s3alu[alu], BSS_BKGDCOL|MIX_DST); \ - _s3SetPixelControl(s3,MIXSEL_EXPPC); \ - DRAW_DEBUG((DEBUG_SET," done")); \ -} - -/* Across the plane blt */ -#define _s3PlaneBlt(s3,x,y,w,h) {\ - DRAW_DEBUG ((DEBUG_RENDER, "plane blt %d,%d %dx%d", x,y,w,h)); \ - _s3WaitSlots(s3, 4); \ - _s3SetPixelControl(s3,MIXSEL_EXPPC); \ - _s3SetCur(s3, x, y); \ - _s3SetPcnt (s3, (w)-1, (h)-1); \ - _s3SetCmd (s3, \ - CMD_RECT| /* Fill rectangle */ \ - BYTSEQ| /* LSB byte order */ \ - _32BIT| /* 32 bit data on 32 bit boundaries */ \ - PCDATA| /* Data from CPU */ \ - INC_X|INC_Y| /* X and Y both increasing */ \ - DRAW| /* Draw, not move */ \ - PLANAR| /* multi pixel */ \ - WRTDATA); \ - DRAW_DEBUG((DEBUG_RENDER," done")); \ -} - -#define _s3SetClip(s3,pbox) {\ - DRAW_DEBUG ((DEBUG_SET, "set clip %dx%d -> %dx%d ", \ - pbox->x1, pbox->y1, pbox->x2, pbox->y2)); \ - _s3WaitSlots(s3, 2); \ - _s3SetScissorsTl(s3,(pbox)->x1, (pbox)->y1); \ - _s3SetScissorsBr(s3,(pbox)->x2 - 1, (pbox)->y2 - 1); \ - DRAW_DEBUG((DEBUG_SET," done")); \ -} - -#define _s3ResetClip(s3,pScreen) { \ - DRAW_DEBUG ((DEBUG_SET, "reset clip")); \ - _s3WaitSlots(s3, 2); \ - _s3SetScissorsTl(s3,0,0); \ - _s3SetScissorsBr(s3,pScreen->width - 1, pScreen->height - 1); \ - DRAW_DEBUG((DEBUG_SET," done")); \ -} - -RegionPtr -s3CopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, - int srcx, int srcy, int width, int height, int dstx, int dsty); - -RegionPtr -s3CopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, - int srcx, int srcy, int width, int height, - int dstx, int dsty, unsigned long bitPlane); - -void -s3PushPixels (GCPtr pGC, PixmapPtr pBitmap, - DrawablePtr pDrawable, - int w, int h, int x, int y); - -void -s3FillBoxSolid (DrawablePtr pDrawable, int nBox, BoxPtr pBox, - unsigned long pixel, int alu, unsigned long planemask); - -void -s3FillBoxPattern (DrawablePtr pDrawable, int nBox, BoxPtr pBox, - int alu, unsigned long planemask, s3PatternPtr pPattern); - -void -s3PolyFillRect (DrawablePtr pDrawable, GCPtr pGC, - int nrectFill, xRectangle *prectInit); - -void -s3FillSpans (DrawablePtr pDrawable, GCPtr pGC, int n, - DDXPointPtr ppt, int *pwidth, int fSorted); - -void -s3PolyFillArcSolid (DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs); - -void -s3FillPoly (DrawablePtr pDrawable, GCPtr pGC, int shape, - int mode, int count, DDXPointPtr ptsIn); - -void -s3PolyGlyphBlt (DrawablePtr pDrawable, - GCPtr pGC, - int xInit, int y, - unsigned int nglyphInit, - CharInfoPtr *ppciInit, - pointer pglyphBase); - -void -s3ImageGlyphBlt (DrawablePtr pDrawable, - GCPtr pGC, - int x, int y, - unsigned int nglyph, - CharInfoPtr *ppci, - pointer pglyphBase); - -void -s3ImageTEGlyphBlt (DrawablePtr pDrawable, GCPtr pGC, - int xInit, int y, - unsigned int nglyphInit, - CharInfoPtr *ppciInit, - pointer pglyphBase); - -void -s3PolyTEGlyphBlt (DrawablePtr pDrawable, GCPtr pGC, - int x, int y, - unsigned int nglyph, CharInfoPtr *ppci, - pointer pglyphBase); - -void -s3Polylines (DrawablePtr pDrawable, GCPtr pGC, - int mode, int nptInit, DDXPointPtr pptInit); - -void -s3PolySegment (DrawablePtr pDrawable, GCPtr pGC, - int nsegInit, xSegment *pSegInit); - -void -s3FillBoxSolid (DrawablePtr pDrawable, int nBox, BoxPtr pBox, - unsigned long pixel, int alu, unsigned long planemask); - -void s3ValidateGC (GCPtr pGC, Mask changes, DrawablePtr pDrawable); - -void -s3CheckGCFill (GCPtr pGC); - -void -s3MoveGCFill (GCPtr pGC); - -void -s3SyncProc (DrawablePtr pDrawable); - -#endif diff --git a/hw/kdrive/savage/s3gc.c b/hw/kdrive/savage/s3gc.c deleted file mode 100644 index ade14fa1f..000000000 --- a/hw/kdrive/savage/s3gc.c +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "s3.h" -#include "s3draw.h" - -#include "Xmd.h" -#include "gcstruct.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "regionstr.h" -#include "mistruct.h" -#include "fontstruct.h" -#include "dixfontstr.h" -#include "migc.h" - -/* - * Common op groups. Common assumptions: - * - * lineWidth 0 - * lineStyle LineSolid - * fillStyle FillSolid - * rop GXcopy - * font <= 32 pixels wide - */ - -/* TE font */ -static const GCOps s3TEOps = { - s3FillSpans, - KdCheckSetSpans, - KdCheckPutImage, - s3CopyArea, - s3CopyPlane, - KdCheckPolyPoint, - s3Polylines, - s3PolySegment, - KdCheckPolyRectangle, - KdCheckPolyArc, - s3FillPoly, - s3PolyFillRect, - s3PolyFillArcSolid, - miPolyText8, - miPolyText16, - miImageText8, - miImageText16, - s3ImageTEGlyphBlt, - s3PolyTEGlyphBlt, - s3PushPixels -}; - -/* Non TE font */ -static const GCOps s3NonTEOps = { - s3FillSpans, - KdCheckSetSpans, - KdCheckPutImage, - s3CopyArea, - s3CopyPlane, - KdCheckPolyPoint, - s3Polylines, - s3PolySegment, - KdCheckPolyRectangle, - KdCheckPolyArc, - s3FillPoly, - s3PolyFillRect, - s3PolyFillArcSolid, - miPolyText8, - miPolyText16, - miImageText8, - miImageText16, - s3ImageGlyphBlt, - s3PolyGlyphBlt, - s3PushPixels -}; - -static GCOps * -s3MatchCommon (DrawablePtr pDraw, GCPtr pGC, FbGCPrivPtr fbPriv) -{ - KdScreenPriv (pDraw->pScreen); - - if (!REGION_NOTEMPTY(pDraw->pScreen,fbGetCompositeClip(pGC))) - { - DRAW_DEBUG ((DEBUG_CLIP, "Empty composite clip, clipping all ops")); - return &kdNoopOps; - } - - if (pDraw->type != DRAWABLE_WINDOW) - return (GCOps *) &kdAsyncPixmapGCOps; - - if (pGC->lineWidth != 0) - return 0; - if (pGC->lineStyle != LineSolid) - return 0; - if (pGC->fillStyle != FillSolid) - return 0; - if (fbPriv->and != 0) - return 0; - if (pGC->font) - { - if (TERMINALFONT(pGC->font)) - return (GCOps *) &s3TEOps; - else - return (GCOps *) &s3NonTEOps; - } - return 0; -} - -void -s3ValidateGC (GCPtr pGC, Mask changes, DrawablePtr pDrawable) -{ - int new_type; /* drawable type has changed */ - int new_origin; - - /* flags for changing the proc vector */ - FbGCPrivPtr fbPriv; - s3PrivGCPtr s3Priv; - int oneRect; - GCOps *newops; - - fbPriv = fbGetGCPrivate(pGC); - s3Priv = s3GetGCPrivate(pGC); - - new_type = FALSE; - new_origin = FALSE; - - /* - * If the type of drawable has changed, fix up accelerated functions - */ - if (s3Priv->type != pDrawable->type) - { - new_type = TRUE; - s3Priv->type = pDrawable->type; - } - - /* - * Check tile/stipple origin - */ - if (pGC->lastWinOrg.x != pDrawable->x || pGC->lastWinOrg.y != pDrawable->y) - new_origin = TRUE; - - /* - * Call down to FB to set clip list and rrop values - */ - - fbValidateGC (pGC, changes, pDrawable); - - /* - * Check accelerated pattern if necessary - */ - if (changes & (GCFillStyle|GCStipple|GCTile)) - s3CheckGCFill (pGC); - else if (s3Priv->pPattern && - (new_origin || changes & (GCTileStipXOrigin|GCTileStipYOrigin))) - s3MoveGCFill (pGC); - - /* - * Try to match common vector - */ - - if (newops = s3MatchCommon (pDrawable, pGC, fbPriv)) - { - if (pGC->ops->devPrivate.val) - miDestroyGCOps (pGC->ops); - pGC->ops = newops; - return; - } - - /* - * No common vector matched, create private ops vector and - * fill it in - */ - if (!pGC->ops->devPrivate.val) - { - /* - * Switch from noop vector by first switching to fb - * vector and fixing it up - */ - if (pGC->ops == &kdNoopOps) - { - pGC->ops = (GCOps *) &kdAsyncPixmapGCOps; - new_type = TRUE; - } - pGC->ops = miCreateGCOps (pGC->ops); - pGC->ops->devPrivate.val = 1; - } - - /* - * Fills - */ - if (new_type || (changes & (GCFillStyle|GCTile|GCStipple))) - { - pGC->ops->FillSpans = KdCheckFillSpans; - pGC->ops->PolyFillRect = KdCheckPolyFillRect; - if (s3Priv->type == DRAWABLE_WINDOW && - (pGC->fillStyle != FillTiled || s3Priv->pPattern)) - { - pGC->ops->FillSpans = s3FillSpans; - pGC->ops->PolyFillRect = s3PolyFillRect; - } - } - - /* - * Blt - */ - if (new_type) - { - pGC->ops->CopyArea = s3CopyArea; - pGC->ops->CopyPlane = s3CopyPlane; - pGC->ops->PushPixels = s3PushPixels; - } - - /* - * Lines - */ - if (new_type || (changes & (GCLineStyle|GCLineWidth|GCFillStyle))) - { - pGC->ops->Polylines = KdCheckPolylines; - pGC->ops->PolySegment = KdCheckPolySegment; - if (pGC->lineStyle == LineSolid && - pGC->lineWidth == 0 && - pGC->fillStyle == FillSolid && - s3Priv->type == DRAWABLE_WINDOW) - { - pGC->ops->Polylines = s3Polylines; - pGC->ops->PolySegment = s3PolySegment; - } - } - - /* - * Polygons - */ - if (new_type || (changes & (GCFillStyle))) - { - pGC->ops->FillPolygon = KdCheckFillPolygon; - if (s3Priv->type == DRAWABLE_WINDOW && - pGC->fillStyle == FillSolid) - { - pGC->ops->FillPolygon = s3FillPoly; - } - } - - /* - * Filled arcs - */ - if (new_type || (changes & GCFillStyle)) - { - pGC->ops->PolyFillArc = KdCheckPolyFillArc; - if (s3Priv->type == DRAWABLE_WINDOW && - pGC->fillStyle == FillSolid) - { - pGC->ops->PolyFillArc = s3PolyFillArcSolid; - } - } - - /* - * Text - */ - if (new_type || (changes & (GCFont|GCFillStyle))) - { - pGC->ops->PolyGlyphBlt = KdCheckPolyGlyphBlt; - pGC->ops->ImageGlyphBlt = KdCheckImageGlyphBlt; - if (s3Priv->type == DRAWABLE_WINDOW && pGC->font) - { - if (pGC->fillStyle == FillSolid) - { - if (TERMINALFONT(pGC->font)) - pGC->ops->PolyGlyphBlt = s3PolyTEGlyphBlt; - else - pGC->ops->PolyGlyphBlt = s3PolyGlyphBlt; - } - if (TERMINALFONT(pGC->font)) - pGC->ops->ImageGlyphBlt = s3ImageTEGlyphBlt; - else - pGC->ops->ImageGlyphBlt = s3ImageGlyphBlt; - } - } -} diff --git a/hw/kdrive/savage/s3reg.c b/hw/kdrive/savage/s3reg.c deleted file mode 100644 index 673a2ac8f..000000000 --- a/hw/kdrive/savage/s3reg.c +++ /dev/null @@ -1,1301 +0,0 @@ -/* - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "s3reg.h" - -#define CR00 S3_CR+0x00 -#define CR01 S3_CR+0x01 -#define CR02 S3_CR+0x02 -#define CR03 S3_CR+0x03 -#define CR04 S3_CR+0x04 -#define CR05 S3_CR+0x05 -#define CR06 S3_CR+0x06 -#define CR07 S3_CR+0x07 -#define CR08 S3_CR+0x08 -#define CR09 S3_CR+0x09 -#define CR0A S3_CR+0x0A -#define CR0B S3_CR+0x0B -#define CR0C S3_CR+0x0C -#define CR0D S3_CR+0x0D -#define CR0E S3_CR+0x0E -#define CR0F S3_CR+0x0F -#define CR10 S3_CR+0x10 -#define CR11 S3_CR+0x11 -#define CR12 S3_CR+0x12 -#define CR13 S3_CR+0x13 -#define CR14 S3_CR+0x14 -#define CR15 S3_CR+0x15 -#define CR16 S3_CR+0x16 -#define CR17 S3_CR+0x17 -#define CR18 S3_CR+0x18 -#define CR19 S3_CR+0x19 -#define CR1A S3_CR+0x1A -#define CR1B S3_CR+0x1B -#define CR1C S3_CR+0x1C -#define CR1D S3_CR+0x1D -#define CR1E S3_CR+0x1E -#define CR1F S3_CR+0x1F -#define CR20 S3_CR+0x20 -#define CR21 S3_CR+0x21 -#define CR22 S3_CR+0x22 -#define CR23 S3_CR+0x23 -#define CR24 S3_CR+0x24 -#define CR25 S3_CR+0x25 -#define CR26 S3_CR+0x26 -#define CR27 S3_CR+0x27 -#define CR28 S3_CR+0x28 -#define CR29 S3_CR+0x29 -#define CR2A S3_CR+0x2A -#define CR2B S3_CR+0x2B -#define CR2C S3_CR+0x2C -#define CR2D S3_CR+0x2D -#define CR2E S3_CR+0x2E -#define CR2F S3_CR+0x2F -#define CR30 S3_CR+0x30 -#define CR31 S3_CR+0x31 -#define CR32 S3_CR+0x32 -#define CR33 S3_CR+0x33 -#define CR34 S3_CR+0x34 -#define CR35 S3_CR+0x35 -#define CR36 S3_CR+0x36 -#define CR37 S3_CR+0x37 -#define CR38 S3_CR+0x38 -#define CR39 S3_CR+0x39 -#define CR3A S3_CR+0x3A -#define CR3B S3_CR+0x3B -#define CR3C S3_CR+0x3C -#define CR3D S3_CR+0x3D -#define CR3E S3_CR+0x3E -#define CR3F S3_CR+0x3F -#define CR40 S3_CR+0x40 -#define CR41 S3_CR+0x41 -#define CR42 S3_CR+0x42 -#define CR43 S3_CR+0x43 -#define CR44 S3_CR+0x44 -#define CR45 S3_CR+0x45 -#define CR46 S3_CR+0x46 -#define CR47 S3_CR+0x47 -#define CR48 S3_CR+0x48 -#define CR49 S3_CR+0x49 -#define CR4A S3_CR+0x4A -#define CR4B S3_CR+0x4B -#define CR4C S3_CR+0x4C -#define CR4D S3_CR+0x4D -#define CR4E S3_CR+0x4E -#define CR4F S3_CR+0x4F -#define CR50 S3_CR+0x50 -#define CR51 S3_CR+0x51 -#define CR52 S3_CR+0x52 -#define CR53 S3_CR+0x53 -#define CR54 S3_CR+0x54 -#define CR55 S3_CR+0x55 -#define CR56 S3_CR+0x56 -#define CR57 S3_CR+0x57 -#define CR58 S3_CR+0x58 -#define CR59 S3_CR+0x59 -#define CR5A S3_CR+0x5A -#define CR5B S3_CR+0x5B -#define CR5C S3_CR+0x5C -#define CR5D S3_CR+0x5D -#define CR5E S3_CR+0x5E -#define CR5F S3_CR+0x5F -#define CR60 S3_CR+0x60 -#define CR61 S3_CR+0x61 -#define CR62 S3_CR+0x62 -#define CR63 S3_CR+0x63 -#define CR64 S3_CR+0x64 -#define CR65 S3_CR+0x65 -#define CR66 S3_CR+0x66 -#define CR67 S3_CR+0x67 -#define CR68 S3_CR+0x68 -#define CR69 S3_CR+0x69 -#define CR6A S3_CR+0x6A -#define CR6B S3_CR+0x6B -#define CR6C S3_CR+0x6C -#define CR6D S3_CR+0x6D -#define CR6E S3_CR+0x6E -#define CR6F S3_CR+0x6F -#define CR70 S3_CR+0x70 -#define CR71 S3_CR+0x71 -#define CR72 S3_CR+0x72 -#define CR73 S3_CR+0x73 -#define CR74 S3_CR+0x74 -#define CR75 S3_CR+0x75 -#define CR76 S3_CR+0x76 -#define CR77 S3_CR+0x77 -#define CR78 S3_CR+0x78 -#define CR79 S3_CR+0x79 -#define CR7A S3_CR+0x7A -#define CR7B S3_CR+0x7B -#define CR7C S3_CR+0x7C -#define CR7D S3_CR+0x7D -#define CR7E S3_CR+0x7E -#define CR7F S3_CR+0x7F -#define CR80 S3_CR+0x80 -#define CR81 S3_CR+0x81 -#define CR82 S3_CR+0x82 -#define CR83 S3_CR+0x83 -#define CR84 S3_CR+0x84 -#define CR85 S3_CR+0x85 -#define CR86 S3_CR+0x86 -#define CR87 S3_CR+0x87 -#define CR88 S3_CR+0x88 -#define CR89 S3_CR+0x89 -#define CR8A S3_CR+0x8A -#define CR8B S3_CR+0x8B -#define CR8C S3_CR+0x8C -#define CR8D S3_CR+0x8D -#define CR8E S3_CR+0x8E -#define CR8F S3_CR+0x8F -#define CR90 S3_CR+0x90 -#define CR91 S3_CR+0x91 -#define CR92 S3_CR+0x92 -#define CR93 S3_CR+0x93 -#define CR94 S3_CR+0x94 -#define CR95 S3_CR+0x95 -#define CR96 S3_CR+0x96 -#define CR97 S3_CR+0x97 -#define CR98 S3_CR+0x98 -#define CR99 S3_CR+0x99 -#define CR9A S3_CR+0x9A -#define CR9B S3_CR+0x9B -#define CR9C S3_CR+0x9C -#define CR9D S3_CR+0x9D -#define CR9E S3_CR+0x9E -#define CR9F S3_CR+0x9F -#define CRA0 S3_CR+0xA0 -#define CRA1 S3_CR+0xA1 -#define CRA2 S3_CR+0xA2 -#define CRA3 S3_CR+0xA3 -#define CRA4 S3_CR+0xA4 -#define CRA5 S3_CR+0xA5 -#define CRA6 S3_CR+0xA6 -#define CRA7 S3_CR+0xA7 -#define CRA8 S3_CR+0xA8 -#define CRA9 S3_CR+0xA9 -#define CRAA S3_CR+0xAA -#define CRAB S3_CR+0xAB -#define CRAC S3_CR+0xAC -#define CRAD S3_CR+0xAD -#define CRAE S3_CR+0xAE -#define CRAF S3_CR+0xAF -#define CRB0 S3_CR+0xB0 -#define CRB1 S3_CR+0xB1 -#define CRB2 S3_CR+0xB2 -#define CRB3 S3_CR+0xB3 -#define CRB4 S3_CR+0xB4 -#define CRB5 S3_CR+0xB5 -#define CRB6 S3_CR+0xB6 -#define CRB7 S3_CR+0xB7 -#define CRB8 S3_CR+0xB8 -#define CRB9 S3_CR+0xB9 -#define CRBA S3_CR+0xBA -#define CRBB S3_CR+0xBB -#define CRBC S3_CR+0xBC -#define CRBD S3_CR+0xBD -#define CRBE S3_CR+0xBE -#define CRBF S3_CR+0xBF - -#define CR_FIRST CR00 - -VgaReg s3_h_total[] = { - CR00, 0, 8, - CR5D, 0, 1, - CR5F, 0, 2, - VGA_REG_END -}; - -VgaReg s3_h_display_end[] = { - CR01, 0, 8, - CR5D, 1, 1, - CR5F, 2, 2, - VGA_REG_END -}; - -VgaReg s3_h_blank_start[] = { - CR02, 0, 8, - CR5D, 2, 1, - CR5F, 4, 2, - VGA_REG_END -}; - -VgaReg s3_h_blank_end[] = { - CR03, 0, 5, - CR05, 7, 1, - VGA_REG_END -}; - -VgaReg s3_display_skew[] = { - CR03, 5, 2, - VGA_REG_END -}; - -VgaReg s3_h_sync_start[] = { - CR04, 0, 8, - CR5D, 4, 1, - CR5F, 6, 2, - VGA_REG_END -}; - -VgaReg s3_h_sync_end[] = { - CR05, 0, 5, - VGA_REG_END -}; - -VgaReg s3_h_skew[] = { - CR05, 5, 2, - VGA_REG_END -}; - -VgaReg s3_v_total[] = { - CR06, 0, 8, - CR07, 0, 1, - CR07, 5, 1, - CR5E, 0, 1, - VGA_REG_END -}; - -VgaReg s3_preset_row_scan[] = { - CR08, 0, 8, - VGA_REG_END -}; - -VgaReg s3_max_scan_line[] = { - CR09, 0, 5, - VGA_REG_END -}; - -VgaReg s3_start_address[] = { - CR0D, 0, 8, - CR0C, 0, 8, - CR69, 0, 7, - VGA_REG_END -}; - -VgaReg s3_v_retrace_start[] = { - CR10, 0, 8, - CR07, 2, 1, - CR07, 7, 1, - CR5E, 4, 1, - VGA_REG_END -}; - -VgaReg s3_v_retrace_end[] = { - CR11, 0, 4, - VGA_REG_END -}; - -VgaReg s3_clear_v_retrace_int[] = { - CR11, 4, 1, - VGA_REG_END -}; - -VgaReg s3_disable_v_retrace_int[] = { - CR11, 5, 1, - VGA_REG_END -}; - -VgaReg s3_lock_crtc[] = { - CR11, 7, 1, - VGA_REG_END -}; - -VgaReg s3_v_display_end[] = { - CR12, 0, 8, - CR07, 1, 1, - CR07, 6, 1, - CR5E, 1, 1, - VGA_REG_END -}; - -VgaReg s3_screen_offset[] = { - CR13, 0, 8, - CR51, 4, 2, - VGA_REG_END -}; - -VgaReg s3_count_by_4_mode[] = { - CR14, 5, 1, - VGA_REG_END -}; - -VgaReg s3_doubleword_mode[] = { - CR14, 6, 1, - VGA_REG_END -}; - -VgaReg s3_v_blank_start[] = { - CR15, 0, 8, - CR07, 3, 1, - CR09, 5, 1, - CR5E, 2, 1, - VGA_REG_END -}; - -VgaReg s3_v_blank_end[] = { - CR16, 0, 8, - VGA_REG_END -}; - -VgaReg s3_2bk_cga[] = { - CR17, 0, 1, - VGA_REG_END -}; - -VgaReg s3_4bk_hga[] = { - CR17, 1, 1, - VGA_REG_END -}; - -VgaReg s3_v_total_double[] = { - CR17, 2, 1, - VGA_REG_END -}; - -VgaReg s3_word_mode[] = { - CR17, 3, 1, - VGA_REG_END -}; - -VgaReg s3_address_16k_wrap[] = { - CR17, 5, 1, - VGA_REG_END -}; - -VgaReg s3_byte_mode[] = { - CR17, 6, 1, - VGA_REG_END -}; - -VgaReg s3_hardware_reset[] = { - CR17, 7, 1, - VGA_REG_END -}; - -VgaReg s3_line_compare[] = { - CR18, 0, 8, - CR07, 4, 1, - CR09, 6, 1, - CR5E, 6, 1, - VGA_REG_END -}; - -VgaReg s3_delay_primary_load[] = { - CR21, 1, 1, - VGA_REG_END -}; - -VgaReg s3_device_id[] = { - CR2E, 0, 8, - CR2D, 0, 8, - VGA_REG_END -}; - -VgaReg s3_revision[] = { - CR2F, 0, 8, - VGA_REG_END -}; - -VgaReg s3_enable_vga_16bit[] = { - CR31, 2, 1, - VGA_REG_END -}; - -VgaReg s3_enhanced_memory_mapping[] = { - CR31, 3, 1, - VGA_REG_END -}; - -VgaReg s3_lock_dac_writes[] = { - CR33, 4, 1, - VGA_REG_END -}; - -VgaReg s3_border_select[] = { - CR33, 5, 1, - VGA_REG_END -}; - -VgaReg s3_lock_palette[] = { - CR33, 6, 1, - VGA_REG_END -}; - -VgaReg s3_enable_sff[] = { - CR34, 4, 1, - VGA_REG_END -}; - -VgaReg s3_lock_vert[] = { - CR35, 4, 1, - VGA_REG_END -}; - -VgaReg s3_lock_horz[] = { - CR35, 5, 1, - VGA_REG_END -}; - -VgaReg s3_io_disable[] = { - CR36, 4, 1, - VGA_REG_END -}; - -VgaReg s3_mem_size[] = { - CR36, 5, 3, - VGA_REG_END -}; - -VgaReg s3_register_lock_1 [] = { - CR38, 0, 8, /* load with 0x48 */ - VGA_REG_END -}; - -VgaReg s3_register_lock_2 [] = { - CR39, 0, 8, /* load with 0xa0 */ - VGA_REG_END -}; - -VgaReg s3_refresh_control[] = { - CR3A, 0, 2, - VGA_REG_END -}; - -VgaReg s3_enable_256[] = { - CR3A, 4, 1, - VGA_REG_END -}; - -VgaReg s3_disable_pci_read_bursts[] = { - CR3A, 7, 1, - VGA_REG_END -}; - -VgaReg s3_h_start_fifo_fetch[] = { - CR3B, 0, 8, - CR5D, 6, 1, - CR5B, 2, 2, - VGA_REG_END -}; - -VgaReg s3_enable_2d_access[] = { - CR40, 0, 1, - VGA_REG_END -}; - -VgaReg s3_interlace[] = { - CR42, 5, 1, - VGA_REG_END -}; - -VgaReg s3_old_screen_off_8[] = { - CR43, 2, 1, - VGA_REG_END -}; - -VgaReg s3_h_counter_double_mode[] = { - CR43, 7, 1, - VGA_REG_END -}; - -VgaReg s3_cursor_enable[] = { - CR45, 0, 1, - VGA_REG_END -}; - -VgaReg s3_cursor_right[] = { - CR45, 4, 1, - VGA_REG_END -}; - -VgaReg s3_cursor_xhigh[] = { - CR46, 0, 3, - VGA_REG_END -}; - -VgaReg s3_cursor_xlow[] = { - CR47, 0, 8, - VGA_REG_END -}; - -VgaReg s3_cursor_yhigh[] = { - CR48, 0, 3, - VGA_REG_END -}; - -VgaReg s3_cursor_ylow[] = { - CR49, 0, 8, - VGA_REG_END -}; - -VgaReg s3_cursor_fg[] = { - CR4A, 0, 8, - VGA_REG_END -}; - -VgaReg s3_cursor_bg[] = { - CR4B, 0, 8, - VGA_REG_END -}; - -VgaReg s3_cursor_address[] = { - CR4D, 0, 8, - CR4C, 0, 8, - VGA_REG_END -}; - -VgaReg s3_cursor_xoff[] = { - CR4E, 0, 6, - VGA_REG_END -}; - -VgaReg s3_cursor_yoff[] = { - CR4F, 0, 6, - VGA_REG_END -}; - -VgaReg s3_ge_screen_width[] = { - CR50, 6, 2, - CR50, 0, 1, - VGA_REG_END -}; - -VgaReg s3_pixel_length[] = { - CR50, 4, 2, - VGA_REG_END -}; - -VgaReg s3_big_endian_linear[] = { - CR53, 1, 2, - VGA_REG_END -}; - -VgaReg s3_mmio_select[] = { - CR53, 3, 2, - VGA_REG_END -}; - -VgaReg s3_mmio_window[] = { - CR53, 5, 1, - VGA_REG_END -}; - -VgaReg s3_swap_nibbles[] = { - CR53, 6, 1, - VGA_REG_END -}; - -VgaReg s3_cursor_ms_x11[] = { - CR55, 4, 1, - VGA_REG_END -}; - -VgaReg s3_linear_window_size[] = { - CR58, 0, 2, - VGA_REG_END -}; - -VgaReg s3_enable_linear[] = { - CR58, 4, 1, - VGA_REG_END -}; - -VgaReg s3_h_blank_extend[] = { - CR5D, 3, 1, - VGA_REG_END -}; - -VgaReg s3_h_sync_extend[] = { - CR5D, 5, 1, - VGA_REG_END -}; - -VgaReg s3_sdclk_skew[] = { - CR60, 0, 4, - VGA_REG_END -}; - -VgaReg s3_delay_blank[] = { - CR65, 3, 2, - VGA_REG_END -}; - -VgaReg s3_delay_h_enable[] = { - CR65, 6, 2, - CR65, 0, 1, - VGA_REG_END -}; - -VgaReg s3_enable_2d_3d[] = { - CR66, 0, 1, - VGA_REG_END -}; - -VgaReg s3_pci_disconnect_enable[] = { - CR66, 3, 1, - VGA_REG_END -}; - -VgaReg s3_primary_load_control[] = { - CR66, 4, 1, - VGA_REG_END -}; - -VgaReg s3_secondary_load_control[] = { - CR66, 5, 1, - VGA_REG_END -}; - -VgaReg s3_pci_retry_enable[] = { - CR66, 7, 1, - VGA_REG_END -}; - -VgaReg s3_streams_mode[] = { - CR67, 2, 2, - VGA_REG_END -}; - -VgaReg s3_color_mode[] = { - CR67, 4, 4, - VGA_REG_END -}; - -VgaReg s3_primary_stream_definition[] = { - CR69, 7, 1, - VGA_REG_END -}; - -VgaReg s3_primary_stream_timeout[] = { - CR71, 0, 8, - VGA_REG_END -}; - -VgaReg s3_master_control_unit_timeout[] = { - CR74, 0, 8, - VGA_REG_END -}; - -VgaReg s3_command_buffer_timeout[] = { - CR75, 0, 8, - VGA_REG_END -}; - -VgaReg s3_lpb_timeout[] = { - CR76, 0, 8, - VGA_REG_END -}; - -VgaReg s3_cpu_timeout[] = { - CR78, 0, 8, - VGA_REG_END -}; - -VgaReg s3_2d_graphics_engine_timeout[] = { - CR79, 0, 8, - VGA_REG_END -}; - -VgaReg s3_fifo_drain_delay[] = { - CR85, 0, 3, - VGA_REG_END -}; - -VgaReg s3_fifo_fetch_timing[] = { - CR85, 4, 1, - VGA_REG_END -}; - -VgaReg s3_dac_power_up_time[] = { - CR86, 0, 7, - VGA_REG_END -}; - -VgaReg s3_dac_power_saving_disable[] = { - CR86, 7, 1, - VGA_REG_END -}; - -VgaReg s3_flat_panel_output_control_1[] = { - CR90, 3, 1, - VGA_REG_END -}; - -VgaReg s3_streams_fifo_delay[] = { - CR90, 4, 2, - VGA_REG_END -}; - -VgaReg s3_flat_panel_output_control_2[] = { - CR90, 6, 1, - VGA_REG_END -}; - -VgaReg s3_enable_l1_parameter[] = { - CR90, 7, 1, - VGA_REG_END -}; - -VgaReg s3_primary_stream_l1[] = { - CR91, 0, 8, - CR90, 0, 3, - VGA_REG_END -}; - -#define CR_LAST CR91 - -#define SR00 S3_SR+0x00 -#define SR01 S3_SR+0x01 -#define SR02 S3_SR+0x02 -#define SR03 S3_SR+0x03 -#define SR04 S3_SR+0x04 -#define SR05 S3_SR+0x05 -#define SR06 S3_SR+0x06 -#define SR07 S3_SR+0x07 -#define SR08 S3_SR+0x08 -#define SR09 S3_SR+0x09 -#define SR0A S3_SR+0x0A -#define SR0B S3_SR+0x0B -#define SR0C S3_SR+0x0C -#define SR0D S3_SR+0x0D -#define SR0E S3_SR+0x0E -#define SR0F S3_SR+0x0F -#define SR10 S3_SR+0x10 -#define SR11 S3_SR+0x11 -#define SR12 S3_SR+0x12 -#define SR13 S3_SR+0x13 -#define SR14 S3_SR+0x14 -#define SR15 S3_SR+0x15 -#define SR16 S3_SR+0x16 -#define SR17 S3_SR+0x17 -#define SR18 S3_SR+0x18 -#define SR19 S3_SR+0x19 -#define SR1A S3_SR+0x1A -#define SR1B S3_SR+0x1B -#define SR1C S3_SR+0x1C -#define SR1D S3_SR+0x1D -#define SR1E S3_SR+0x1E -#define SR1F S3_SR+0x1F -#define SR20 S3_SR+0x20 -#define SR21 S3_SR+0x21 -#define SR22 S3_SR+0x22 -#define SR23 S3_SR+0x23 -#define SR24 S3_SR+0x24 -#define SR25 S3_SR+0x25 -#define SR26 S3_SR+0x26 -#define SR27 S3_SR+0x27 -#define SR28 S3_SR+0x28 -#define SR29 S3_SR+0x29 -#define SR2A S3_SR+0x2A -#define SR2B S3_SR+0x2B -#define SR2C S3_SR+0x2C -#define SR2D S3_SR+0x2D -#define SR2E S3_SR+0x2E -#define SR2F S3_SR+0x2F -#define SR30 S3_SR+0x30 -#define SR31 S3_SR+0x31 -#define SR32 S3_SR+0x32 -#define SR33 S3_SR+0x33 -#define SR34 S3_SR+0x34 -#define SR35 S3_SR+0x35 -#define SR36 S3_SR+0x36 -#define SR37 S3_SR+0x37 -#define SR38 S3_SR+0x38 -#define SR39 S3_SR+0x39 -#define SR3A S3_SR+0x3A -#define SR3B S3_SR+0x3B -#define SR3C S3_SR+0x3C -#define SR3D S3_SR+0x3D -#define SR3E S3_SR+0x3E -#define SR3F S3_SR+0x3F -#define SR40 S3_SR+0x40 -#define SR41 S3_SR+0x41 -#define SR42 S3_SR+0x42 -#define SR43 S3_SR+0x43 -#define SR44 S3_SR+0x44 -#define SR45 S3_SR+0x45 -#define SR46 S3_SR+0x46 -#define SR47 S3_SR+0x47 -#define SR48 S3_SR+0x48 -#define SR49 S3_SR+0x49 -#define SR4A S3_SR+0x4A -#define SR4B S3_SR+0x4B -#define SR4C S3_SR+0x4C -#define SR4D S3_SR+0x4D -#define SR4E S3_SR+0x4E -#define SR4F S3_SR+0x4F -#define SR50 S3_SR+0x50 -#define SR51 S3_SR+0x51 -#define SR52 S3_SR+0x52 -#define SR53 S3_SR+0x53 -#define SR54 S3_SR+0x54 -#define SR55 S3_SR+0x55 -#define SR56 S3_SR+0x56 -#define SR57 S3_SR+0x57 -#define SR58 S3_SR+0x58 -#define SR59 S3_SR+0x59 -#define SR5A S3_SR+0x5A -#define SR5B S3_SR+0x5B -#define SR5C S3_SR+0x5C -#define SR5D S3_SR+0x5D -#define SR5E S3_SR+0x5E -#define SR5F S3_SR+0x5F -#define SR60 S3_SR+0x60 -#define SR61 S3_SR+0x61 -#define SR62 S3_SR+0x62 -#define SR63 S3_SR+0x63 -#define SR64 S3_SR+0x64 -#define SR65 S3_SR+0x65 -#define SR66 S3_SR+0x66 -#define SR67 S3_SR+0x67 -#define SR68 S3_SR+0x68 -#define SR69 S3_SR+0x69 -#define SR6A S3_SR+0x6A -#define SR6B S3_SR+0x6B -#define SR6C S3_SR+0x6C -#define SR6D S3_SR+0x6D -#define SR6E S3_SR+0x6E -#define SR6F S3_SR+0x6F - -#define SR_FIRST SR02 - -VgaReg s3_dot_clock_8[] = { - SR01, 0, 1, - VGA_REG_END -}; - -VgaReg s3_screen_off[] = { - SR01, 5, 1, - VGA_REG_END -}; - -VgaReg s3_enable_write_plane[] = { - SR02, 0, 4, - VGA_REG_END -}; - -VgaReg s3_extended_memory_access[] = { - SR04, 1, 1, - VGA_REG_END -}; - -VgaReg s3_sequential_addressing_mode[] = { - SR04, 2, 1, - VGA_REG_END -}; - -VgaReg s3_select_chain_4_mode[] = { - SR04, 3, 1, - VGA_REG_END -}; - -VgaReg s3_unlock_extended_sequencer[] = { - SR08, 0, 8, /* write 0x06 */ - VGA_REG_END -}; - -VgaReg s3_linear_addressing_control[] = { - SR09, 0, 1, - VGA_REG_END -}; - -VgaReg s3_disable_io_ports[] = { - SR09, 7, 1, - VGA_REG_END -}; - -VgaReg s3_hsync_control[] = { - SR0D, 4, 2, - VGA_REG_END -}; - -VgaReg s3_vsync_control[] = { - SR0D, 6, 2, - VGA_REG_END -}; - -VgaReg s3_mclk_n[] = { - SR10, 0, 5, - VGA_REG_END -}; - -VgaReg s3_mclk_r[] = { - SR10, 5, 2, - VGA_REG_END -}; - -VgaReg s3_mclk_m[] = { - SR11, 0, 7, - VGA_REG_END -}; - -VgaReg s3_dclk_n[] = { - SR12, 0, 6, - SR29, 4, 1, - VGA_REG_END -}; - -VgaReg s3_dclk_r[] = { - SR12, 6, 2, - SR29, 2, 1, - VGA_REG_END -}; - -VgaReg s3_dclk_m[] = { - SR13, 0, 8, - SR29, 3, 1, - VGA_REG_END -}; - -VgaReg s3_mclk_load[] = { - SR15, 0, 1, - VGA_REG_END -}; - -VgaReg s3_dclk_load[] = { - SR15, 1, 1, - VGA_REG_END -}; - -VgaReg s3_dclk_over_2[] = { - SR15, 4, 1, - VGA_REG_END -}; - -VgaReg s3_clock_load_imm[] = { - SR15, 5, 1, - VGA_REG_END -}; - -VgaReg s3_dclk_invert[] = { - SR15, 6, 1, - VGA_REG_END -}; - -VgaReg s3_enable_clock_double[] = { - SR18, 7, 1, - VGA_REG_END -}; - -VgaReg s3_dclk_double_15_16_invert[] = { - SR1A, 0, 1, - VGA_REG_END -}; - -VgaReg s3_enable_gamma_correction[] = { - SR1B, 3, 1, - VGA_REG_END -}; - -VgaReg s3_enable_8_bit_luts[] = { - SR1B, 4, 1, - VGA_REG_END -}; - -VgaReg s3_dclk_control[] = { - SR1B, 7, 1, - VGA_REG_END -}; - -VgaReg s3_eclk_n[] = { - SR32, 0, 5, - VGA_REG_END -}; - -VgaReg s3_eclk_r[] = { - SR32, 5, 2, - VGA_REG_END -}; - -VgaReg s3_eclk_m[] = { - SR32, 0, 5, - VGA_REG_END -}; - -VgaReg s3_vga_dclk_n[] = { - SR36, 0, 6, - SR39, 4, 1, - VGA_REG_END -}; - -VgaReg s3_vga_dclk_r[] = { - SR36, 6, 2, - SR39, 2, 1, - VGA_REG_END -}; - -VgaReg s3_vga_dclk_m1[] = { - SR37, 0, 8, - SR39, 3, 1, - VGA_REG_END -}; - -VgaReg s3_vga_dclk_m2[] = { - SR38, 0, 8, - SR39, 3, 1, - VGA_REG_END -}; - -VgaReg s3_vga_clk_select[] = { - SR39, 0, 1, - VGA_REG_END -}; - -#define SR_LAST SR39 - -#define AR00 (S3_AR+0x00) -#define AR10 (S3_AR+0x10) -#define AR11 (S3_AR+0x11) -#define AR12 (S3_AR+0x12) -#define AR13 (S3_AR+0x13) -#define AR14 (S3_AR+0x14) - -#define AR_FIRST AR00 - -VgaReg s3_select_graphics_mode[] = { - AR10, 0, 1, - VGA_REG_END -}; - -VgaReg s3_enable_blinking[] = { - AR10, 3, 1, - VGA_REG_END -}; - -VgaReg s3_border_color[] = { - AR11, 0, 8, - VGA_REG_END -}; - -#define AR_LAST AR11 - -VgaReg s3_io_addr_select[] = { - S3_MISC_OUT, 0, 1, - VGA_REG_END -}; - -VgaReg s3_enable_ram[] = { - S3_MISC_OUT, 1, 1, - VGA_REG_END -}; - -VgaReg s3_clock_select[] = { - S3_MISC_OUT, 2, 2, - VGA_REG_END -}; - -VgaReg s3_horz_sync_neg[] = { - S3_MISC_OUT, 6, 1, - VGA_REG_END -}; - -VgaReg s3_vert_sync_neg[] = { - S3_MISC_OUT, 7, 1, - VGA_REG_END -}; - -VgaReg s3_display_mode_inactive[] = { - S3_INPUT_STATUS_1, 0, 1, - VGA_REG_END -}; - -VgaReg s3_vertical_sync_active[] = { - S3_INPUT_STATUS_1, 3, 1, - VGA_REG_END -}; - -VgaReg s3_dac_mask[] = { - S3_DAC + 0, 0, 8, - VGA_REG_END -}; - -VgaReg s3_dac_read_index[] = { - S3_DAC + 1, 0, 8, - VGA_REG_END -}; - -VgaReg s3_dac_write_index[] = { - S3_DAC + 2, 0, 8, - VGA_REG_END -}; - -VgaReg s3_dac_data[] = { - S3_DAC + 3, 0, 8, - VGA_REG_END -}; - -VGA8 -_s3Inb (VgaCard *card, VGA16 port) -{ - VGAVOL8 *reg; - - if (card->closure) - return VgaReadMemb ((VGA32) card->closure + port); - else - return VgaInb (port); -} - -void -_s3Outb (VgaCard *card, VGA8 value, VGA16 port) -{ - if (card->closure) - VgaWriteMemb (value, (VGA32) card->closure + port); - else - VgaOutb (value, port); -} - -void -_s3RegMap (VgaCard *card, VGA16 reg, VgaMap *map, VGABOOL write) -{ - - if (reg < S3_SR + S3_NSR) - { - map->access = VgaAccessIndIo; - map->port = 0x3c4; - map->addr = 0; - map->value = 1; - map->index = reg - S3_SR; - } - else if (reg < S3_GR + S3_NGR) - { - map->access = VgaAccessIndIo; - map->port = 0x3ce; - map->addr = 0; - map->value = 1; - map->index = reg - S3_GR; - } - else if (reg < S3_AR + S3_NAR) - { - reg -= S3_AR; - map->access = VgaAccessDone; - /* reset AFF to index */ - (void) _s3Inb (card, 0x3da); - if (reg >= 16) - reg |= 0x20; - _s3Outb (card, reg, 0x3c0); - if (write) - _s3Outb (card, map->value, 0x3c0); - else - map->value = _s3Inb (card, 0x3c1); - if (!(reg & 0x20)) - { - /* enable video display again */ - (void) _s3Inb (card, 0x3da); - _s3Outb (card, 0x20, 0x3c0); - } - return; - } - else if (reg < S3_CR + S3_NCR) - { - map->access = VgaAccessIndIo; - map->port = 0x3d4; - map->addr = 0; - map->value = 1; - map->index = reg - S3_CR; - } - else if (reg < S3_DAC + S3_NDAC) - { - map->access = VgaAccessIo; - map->port = 0x3c6 + reg - S3_DAC; - } - else switch (reg) { - case S3_MISC_OUT: - map->access = VgaAccessIo; - if (write) - map->port = 0x3c2; - else - map->port = 0x3cc; - break; - case S3_INPUT_STATUS_1: - map->access = VgaAccessIo; - map->port = 0x3da; - break; - } - if (card->closure) - { - map->port = map->port + (VGA32) card->closure; - if (map->access == VgaAccessIo) - map->access = VgaAccessMem; - if (map->access == VgaAccessIndIo) - map->access = VgaAccessIndMem; - } -} - -VgaSave s3Saves[] = { - CR_FIRST, CR18, - CR31, CR_LAST, - SR_FIRST, SR15, - SR18, SR_LAST, - AR_FIRST, AR_LAST, - S3_MISC_OUT, S3_MISC_OUT, - VGA_SAVE_END -}; - -void -s3RegInit (S3Vga *s3vga, VGAVOL8 *mmio) -{ - s3vga->card.map = _s3RegMap; - s3vga->card.closure = (void *) mmio; - s3vga->card.max = S3_NREG; - s3vga->card.values = s3vga->values; - s3vga->card.saves = s3Saves; -} - -void -s3Save (S3Vga *s3vga) -{ - s3vga->save_lock_crtc = s3Get(s3vga, s3_lock_crtc); - s3SetImm (s3vga, s3_lock_crtc, 0); - s3vga->save_register_lock_1 = s3Get (s3vga, s3_register_lock_1); - s3SetImm (s3vga, s3_register_lock_1, 0x48); - s3vga->save_register_lock_2 = s3Get (s3vga, s3_register_lock_2); - s3SetImm (s3vga, s3_register_lock_2, 0xa5); - s3vga->save_unlock_extended_sequencer = s3Get (s3vga, s3_unlock_extended_sequencer); - s3SetImm (s3vga, s3_unlock_extended_sequencer, 0x06); - s3vga->save_lock_horz = s3Get (s3vga, s3_lock_horz); - s3SetImm (s3vga, s3_lock_horz, 0); - s3vga->save_lock_vert = s3Get (s3vga, s3_lock_vert); - s3SetImm (s3vga, s3_lock_vert, 0); - s3vga->save_dot_clock_8 = s3Get (s3vga, s3_dot_clock_8); - VgaPreserve (&s3vga->card); -} - -void -s3Reset (S3Vga *s3vga) -{ - VgaRestore (&s3vga->card); - s3SetImm (s3vga, s3_clock_load_imm, 1); - s3SetImm (s3vga, s3_clock_load_imm, 0); - s3SetImm (s3vga, s3_dot_clock_8, s3vga->save_dot_clock_8); - s3SetImm (s3vga, s3_lock_vert, s3vga->save_lock_vert); - s3SetImm (s3vga, s3_lock_horz, s3vga->save_lock_horz); - s3SetImm (s3vga, s3_lock_dac_writes, s3vga->save_lock_dac_writes); - s3SetImm (s3vga, s3_unlock_extended_sequencer, s3vga->save_unlock_extended_sequencer); - s3SetImm (s3vga, s3_register_lock_2, s3vga->save_register_lock_2); - s3SetImm (s3vga, s3_register_lock_1, s3vga->save_register_lock_1); - s3SetImm (s3vga, s3_lock_crtc, s3vga->save_lock_crtc); - VgaFinish (&s3vga->card); -} diff --git a/hw/kdrive/savage/s3reg.h b/hw/kdrive/savage/s3reg.h deleted file mode 100644 index 5c5b09f6d..000000000 --- a/hw/kdrive/savage/s3reg.h +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifndef _S3REG_H_ -#define _S3REG_H_ - -#include "vga.h" - -#define S3_SR 0 -#define S3_NSR 0x70 -#define S3_GR (S3_SR+S3_NSR) -#define S3_NGR 0x09 -#define S3_AR (S3_GR+S3_NGR) -#define S3_NAR 0x15 -#define S3_CR (S3_AR+S3_NAR) -#define S3_NCR 0xc0 -#define S3_DAC (S3_CR+S3_NCR) -#define S3_NDAC 4 -#define S3_MISC_OUT (S3_DAC + S3_NDAC) -#define S3_INPUT_STATUS_1 (S3_MISC_OUT+1) -#define S3_NREG (S3_INPUT_STATUS_1+1) - -extern VgaReg s3_h_total[]; -extern VgaReg s3_h_display_end[]; -extern VgaReg s3_h_blank_start[]; -extern VgaReg s3_h_blank_end[]; -extern VgaReg s3_display_skew[]; -extern VgaReg s3_h_sync_start[]; -extern VgaReg s3_h_sync_end[]; -extern VgaReg s3_h_skew[]; -extern VgaReg s3_v_total[]; -extern VgaReg s3_preset_row_scan[]; -extern VgaReg s3_max_scan_line[]; -extern VgaReg s3_start_address[]; -extern VgaReg s3_v_retrace_start[]; -extern VgaReg s3_v_retrace_end[]; -extern VgaReg s3_clear_v_retrace_int[]; -extern VgaReg s3_disable_v_retrace_int[]; -extern VgaReg s3_lock_crtc[]; -extern VgaReg s3_v_display_end[]; -extern VgaReg s3_screen_offset[]; -extern VgaReg s3_count_by_4_mode[]; -extern VgaReg s3_doubleword_mode[]; -extern VgaReg s3_v_blank_start[]; -extern VgaReg s3_v_blank_end[]; -extern VgaReg s3_2bk_cga[]; -extern VgaReg s3_4bk_hga[]; -extern VgaReg s3_v_total_double[]; -extern VgaReg s3_address_16k_wrap[]; -extern VgaReg s3_word_mode[]; -extern VgaReg s3_byte_mode[]; -extern VgaReg s3_hardware_reset[]; -extern VgaReg s3_line_compare[]; -extern VgaReg s3_delay_primary_load[]; -extern VgaReg s3_device_id[]; -extern VgaReg s3_revision[]; -extern VgaReg s3_enable_vga_16bit[]; -extern VgaReg s3_enhanced_memory_mapping[]; -extern VgaReg s3_enable_sff[]; -extern VgaReg s3_lock_dac_writes[]; -extern VgaReg s3_border_select[]; -extern VgaReg s3_lock_palette[]; -extern VgaReg s3_lock_vert[]; -extern VgaReg s3_lock_horz[]; -extern VgaReg s3_io_disable[]; -extern VgaReg s3_mem_size[]; -extern VgaReg s3_register_lock_1 []; -extern VgaReg s3_register_lock_2 []; -extern VgaReg s3_refresh_control[]; -extern VgaReg s3_enable_256[]; -extern VgaReg s3_disable_pci_read_bursts[]; -extern VgaReg s3_h_start_fifo_fetch[]; -extern VgaReg s3_enable_2d_access[]; -extern VgaReg s3_interlace[]; -extern VgaReg s3_old_screen_off_8[]; -extern VgaReg s3_h_counter_double_mode[]; -extern VgaReg s3_cursor_enable[]; -extern VgaReg s3_cursor_right[]; -extern VgaReg s3_cursor_xhigh[]; -extern VgaReg s3_cursor_xlow[]; -extern VgaReg s3_cursor_yhigh[]; -extern VgaReg s3_cursor_ylow[]; -extern VgaReg s3_cursor_fg[]; -extern VgaReg s3_cursor_bg[]; -extern VgaReg s3_cursor_address[]; -extern VgaReg s3_cursor_xoff[]; -extern VgaReg s3_cursor_yoff[]; -extern VgaReg s3_ge_screen_width[]; -extern VgaReg s3_pixel_length[]; -extern VgaReg s3_big_endian_linear[]; -extern VgaReg s3_mmio_select[]; -extern VgaReg s3_mmio_window[]; -extern VgaReg s3_swap_nibbles[]; -extern VgaReg s3_cursor_ms_x11[]; -extern VgaReg s3_linear_window_size[]; -extern VgaReg s3_enable_linear[]; -extern VgaReg s3_h_blank_extend[]; -extern VgaReg s3_h_sync_extend[]; -extern VgaReg s3_sdclk_skew[]; -extern VgaReg s3_delay_blank[]; -extern VgaReg s3_delay_h_enable[]; -extern VgaReg s3_enable_2d_3d[]; -extern VgaReg s3_pci_disconnect_enable[]; -extern VgaReg s3_primary_load_control[]; -extern VgaReg s3_secondary_load_control[]; -extern VgaReg s3_pci_retry_enable[]; -extern VgaReg s3_streams_mode[]; -extern VgaReg s3_color_mode[]; -extern VgaReg s3_primary_stream_definition[]; -extern VgaReg s3_primary_stream_timeout[]; -extern VgaReg s3_master_control_unit_timeout[]; -extern VgaReg s3_command_buffer_timeout[]; -extern VgaReg s3_lpb_timeout[]; -extern VgaReg s3_cpu_timeout[]; -extern VgaReg s3_2d_graphics_engine_timeout[]; -extern VgaReg s3_fifo_drain_delay[]; -extern VgaReg s3_fifo_fetch_timing[]; -extern VgaReg s3_dac_power_up_time[]; -extern VgaReg s3_dac_power_saving_disable[]; -extern VgaReg s3_flat_panel_output_control_1[]; -extern VgaReg s3_streams_fifo_delay[]; -extern VgaReg s3_flat_panel_output_control_2[]; -extern VgaReg s3_enable_l1_parameter[]; -extern VgaReg s3_primary_stream_l1[]; - -extern VgaReg s3_dot_clock_8[]; -extern VgaReg s3_screen_off[]; -extern VgaReg s3_enable_write_plane[]; -extern VgaReg s3_extended_memory_access[]; -extern VgaReg s3_sequential_addressing_mode[]; -extern VgaReg s3_select_chain_4_mode[]; - -extern VgaReg s3_unlock_extended_sequencer[]; -extern VgaReg s3_linear_addressing_control[]; -extern VgaReg s3_disable_io_ports[]; -extern VgaReg s3_hsync_control[]; -extern VgaReg s3_vsync_control[]; -extern VgaReg s3_mclk_n[]; -extern VgaReg s3_mclk_r[]; -extern VgaReg s3_mclk_m[]; -extern VgaReg s3_dclk_n[]; -extern VgaReg s3_dclk_r[]; -extern VgaReg s3_dclk_m[]; -extern VgaReg s3_mclk_load[]; -extern VgaReg s3_dclk_load[]; -extern VgaReg s3_dclk_over_2[]; -extern VgaReg s3_clock_load_imm[]; -extern VgaReg s3_dclk_invert[]; -extern VgaReg s3_enable_clock_double[]; -extern VgaReg s3_dclk_double_15_16_invert[]; -extern VgaReg s3_enable_gamma_correction[]; -extern VgaReg s3_enable_8_bit_luts[]; -extern VgaReg s3_dclk_control[]; -extern VgaReg s3_eclk_n[]; -extern VgaReg s3_eclk_r[]; -extern VgaReg s3_eclk_m[]; -extern VgaReg s3_vga_dclk_n[]; -extern VgaReg s3_vga_dclk_r[]; -extern VgaReg s3_vga_dclk_m1[]; -extern VgaReg s3_vga_dclk_m2[]; -extern VgaReg s3_vga_clk_select[]; -extern VgaReg s3_select_graphics_mode[]; -extern VgaReg s3_enable_blinking[]; -extern VgaReg s3_border_color[]; - -extern VgaReg s3_io_addr_select[]; -extern VgaReg s3_enable_ram[]; -extern VgaReg s3_clock_select[]; -extern VgaReg s3_horz_sync_neg[]; -extern VgaReg s3_vert_sync_neg[]; - -extern VgaReg s3_display_mode_inactive[]; -extern VgaReg s3_vertical_sync_active[]; - -extern VgaReg s3_dac_mask[]; -extern VgaReg s3_dac_read_index[]; -extern VgaReg s3_dac_write_index[]; -extern VgaReg s3_dac_data[]; - -#define s3Get(sv,r) VgaGet(&(sv)->card, (r)) -#define s3GetImm(sv,r) VgaGetImm(&(sv)->card, (r)) -#define s3Set(sv,r,v) VgaSet(&(sv)->card, (r), (v)) -#define s3SetImm(sv,r,v) VgaSetImm(&(sv)->card, (r), (v)) - -typedef struct _s3Vga { - VgaCard card; - VgaValue values[S3_NREG]; - VGA32 save_lock_crtc; - VGA32 save_register_lock_1; - VGA32 save_register_lock_2; - VGA32 save_unlock_extended_sequencer; - VGA32 save_lock_dac_writes; - VGA32 save_lock_horz; - VGA32 save_lock_vert; - VGA32 save_dot_clock_8; -} S3Vga; - -void -s3RegInit (S3Vga *s3vga, VGAVOL8 *mmio); - -void -s3Save (S3Vga *s3vga); - -void -s3Reset (S3Vga *s3vga); - -#endif /* _S3REG_H_ */ diff --git a/hw/kdrive/savage/s3rtst.c b/hw/kdrive/savage/s3rtst.c deleted file mode 100644 index c24b860ac..000000000 --- a/hw/kdrive/savage/s3rtst.c +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include "s3reg.h" - -typedef struct { - VgaReg *reg; - char *name; -} NamedVgaReg; - -NamedVgaReg s3VRegs[] = { - s3_h_total, "h_total", - s3_h_display_end, "h_display_end", - s3_h_blank_start, "h_blank_start", - s3_h_blank_end, "h_blank_end", - s3_display_skew, "display_skew", - s3_h_sync_start, "h_sync_start", - s3_h_sync_end, "h_sync_end", - s3_h_skew, "h_skew", - s3_v_total, "v_total", - s3_preset_row_scan, "preset_row_scan", - s3_max_scan_line, "max_scan_line", - s3_start_address, "start_address", - s3_v_retrace_start, "v_retrace_start", - s3_v_retrace_end, "v_retrace_end", - s3_clear_v_retrace_int, "clear_v_retrace_int", - s3_disable_v_retrace_int, "disable_v_retrace_int", - s3_lock_crtc, "lock_crtc", - s3_v_display_end, "v_display_end", - s3_screen_offset, "screen_offset", - s3_count_by_4_mode, "count_by_4_mode", - s3_doubleword_mode, "doubleword_mode", - s3_v_blank_start, "v_blank_start", - s3_v_blank_end, "v_blank_end", - s3_v_total_double, "v_total_double", - s3_word_mode, "word_mode", - s3_byte_mode, "byte_mode", - s3_line_compare, "line_compare", - s3_device_id, "device_id", - s3_revision, "revision", - s3_lock_vert, "lock_vert", - s3_lock_horz, "lock_horz", - s3_io_disable, "io_disable", - s3_mem_size, "mem_size", - s3_register_lock_1 , "register_lock_1 ", - s3_register_lock_2 , "register_lock_2 ", - s3_refresh_control, "refresh_control", - s3_enable_256, "enable_256", - s3_enable_pci_read_bursts, "enable_pci_read_bursts", - s3_h_start_fifo_fetch, "h_start_fifo_fetch", - s3_interlace, "interlace", - s3_old_screen_off_8, "old_screen_off_8", - s3_h_counter_double_mode, "h_counter_double_mode", - s3_hardware_cursor_enable, "hardware_cursor_enable", - s3_hardware_cursor_right, "hardware_cursor_right", - s3_hardware_cursor_x, "hardware_cursor_x", - s3_hardware_cursor_y, "hardware_cursor_y", - s3_hardware_cursor_fg, "hardware_cursor_fg", - s3_cursor_address, "cursor_address", - s3_cursor_start_x, "cursor_start_x", - s3_cursor_start_y, "cursor_start_y", - s3_ge_screen_width, "ge_screen_width", - s3_pixel_length, "pixel_length", - s3_big_endian_linear, "big_endian_linear", - s3_mmio_select, "mmio_select", - s3_mmio_window, "mmio_window", - s3_swap_nibbles, "swap_nibbles", - s3_hardware_cursor_ms_x11, "hardware_cursor_ms_x11", - s3_h_blank_extend, "h_blank_extend", - s3_h_sync_extend, "h_sync_extend", - s3_enable_2d_3d, "enable_2d_3d", - s3_pci_disconnect_enable, "pci_disconnect_enable", - s3_pci_retry_enable, "pci_retry_enable", - s3_color_mode, "color_mode", - s3_screen_off, "screen_off", - s3_unlock_extended_sequencer, "unlock_extended_sequencer", - s3_disable_io_ports, "disable_io_ports", - s3_hsync_control, "hsync_control", - s3_vsync_control, "vsync_control", - s3_mclk_n, "mclk_n", - s3_mclk_r, "mclk_r", - s3_mclk_m, "mclk_m", - s3_dclk_n, "dclk_n", - s3_dclk_r, "dclk_r", - s3_dclk_m, "dclk_m", - s3_mclk_load, "mclk_load", - s3_dclk_load, "dclk_load", - s3_dclk_over_2, "dclk_over_2", - s3_clock_load_imm, "clock_load_imm", - s3_dclk_invert, "dclk_invert", - s3_enable_clock_double, "enable_clock_double", - s3_dclk_double_15_16_invert, "dclk_double_15_16_invert", - s3_enable_gamma_correction, "enable_gamma_correction", - s3_enable_8_bit_luts, "enable_8_bit_luts", - s3_dclk_control, "dclk_control", - s3_vga_dclk_n, "vga_dclk_n", - s3_vga_dclk_r, "vga_dclk_r", - s3_vga_dclk_m1, "vga_dclk_m1", - s3_vga_dclk_m2, "vga_dclk_m2", - s3_vga_clk_select, "vga_clk_select", - s3_clock_select, "clock_select", -}; - -#define NUM_S3_VREGS (sizeof (s3VRegs)/ sizeof (s3VRegs[0])) - -main (int argc, char **argv) -{ - int i; - - iopl(3); - s3SetImm(s3_register_lock_1, 0x48); - s3SetImm(s3_register_lock_2, 0xa0); - s3SetImm(s3_unlock_extended_sequencer, 0x06); - for (i = 0; i < NUM_S3_VREGS; i++) - printf ("%-20.20s %8x\n", s3VRegs[i].name, s3Get (s3VRegs[i].reg)); - s3Restore (); -} diff --git a/hw/kdrive/savage/s3stub.c b/hw/kdrive/savage/s3stub.c deleted file mode 100644 index 145c5c1f6..000000000 --- a/hw/kdrive/savage/s3stub.c +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "s3.h" - -void -InitCard (char *name) -{ - KdCardAttr attr; -#ifdef VXWORKS - attr.naddr = 2; - attr.io = 0; - attr.address[0] = 0xbc000000; /* registers */ - attr.address[1] = 0xba000000; /* frame buffer */ - KdCardInfoAdd (&s3Funcs, &attr, 0); -#else - CARD32 count; - - count = 0; - while (LinuxFindPci (0x5333, 0x8a22, count, &attr)) - { - KdCardInfoAdd (&s3Funcs, &attr, 0); - count++; - } -#endif -} - -void -InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) -{ - KdInitOutput (pScreenInfo, argc, argv); -} - -void -InitInput (int argc, char **argv) -{ - KdOsAddInputDrivers (); - KdInitInput (); -} - -extern int s3CpuTimeout; -extern int s3AccelTimeout; - -void -ddxUseMsg (void) -{ - ErrorF("\nSavage Driver Options:\n"); - ErrorF("-cpu Sets CPU timout\n"); - ErrorF("-accel Sets acceleration timout\n"); - - KdUseMsg(); -} - -int -ddxProcessArgument (int argc, char **argv, int i) -{ - int ret; - - if (!strcmp (argv[i], "-cpu")) - { - s3CpuTimeout = strtol(argv[i+1], NULL, 0); - return 2; - } - if (!strcmp (argv[i], "-accel")) - { - s3AccelTimeout = strtol (argv[i+1], NULL, 0); - return 2; - } - return KdProcessArgument (argc, argv, i); -} diff --git a/hw/kdrive/sis300/Makefile.am b/hw/kdrive/sis300/Makefile.am deleted file mode 100644 index af2500aee..000000000 --- a/hw/kdrive/sis300/Makefile.am +++ /dev/null @@ -1,51 +0,0 @@ -if KDRIVEFBDEV -FBDEV_INCLUDES =-I$(top_srcdir)/hw/kdrive/fbdev -FBDEV_LIBS = $(top_builddir)/hw/kdrive/fbdev/libfbdev.a -endif - -if KDRIVEVESA -VESA_INCLUDES = -I$(top_srcdir)/hw/kdrive/vesa -VESA_LIBS = $(top_builddir)/hw/kdrive/vesa/libvesa.a -endif - -INCLUDES = \ - @KDRIVE_INCS@ \ - $(DRI_INCLUDES) \ - $(FBDEV_INCLUDES) \ - $(VESA_INCLUDES) \ - @KDRIVE_CFLAGS@ - -bin_PROGRAMS = Xsis - -noinst_LIBRARIES = libsis.a - -libsis_a_SOURCES = \ - sis.c \ - sis.h \ - sis_draw.c \ - sis_reg.h - -Xsis_SOURCES = \ - sis_stub.c - -SIS_LIBS = \ - libsis.a \ - $(FBDEV_LIBS) \ - $(VESA_LIBS) \ - @KDRIVE_LIBS@ - -if GLX -Xsis_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -endif - -Xsis_LDADD = \ - $(SIS_LIBS) \ - @KDRIVE_LIBS@ \ - $(TSLIB_FLAG) - -Xsis_DEPENDENCIES = \ - libsis.a \ - @KDRIVE_LOCAL_LIBS@ - -relink: - rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS) diff --git a/hw/kdrive/sis300/sis.c b/hw/kdrive/sis300/sis.c deleted file mode 100644 index 30b7ac2c5..000000000 --- a/hw/kdrive/sis300/sis.c +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Copyright © 2003 Eric Anholt - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Eric Anholt not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Eric Anholt makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "sis.h" -#include "sis_reg.h" - -struct pci_id_entry sis_pci_ids[] = { - {0x1039, 0x0300, 0x1, "SiS 300/305"}, - {0x1039, 0x5300, 0x1, "SiS 540"}, - {0x1039, 0x6300, 0x1, "SiS 630"}, - {0x1039, 0x7300, 0x1, "SiS 730"}, - {0, 0, 0, NULL} -}; - -static Bool -SiSCardInit(KdCardInfo *card) -{ - SiSCardInfo *sisc; - Bool initialized = FALSE; - - sisc = xcalloc(sizeof(SiSCardInfo), 1); - if (sisc == NULL) - return FALSE; - -#ifdef KDRIVEFBDEV - if (!initialized && fbdevInitialize(card, &sisc->backend_priv.fbdev)) { - sisc->use_fbdev = TRUE; - initialized = TRUE; - sisc->backend_funcs.cardfini = fbdevCardFini; - sisc->backend_funcs.scrfini = fbdevScreenFini; - sisc->backend_funcs.initScreen = fbdevInitScreen; - sisc->backend_funcs.finishInitScreen = fbdevFinishInitScreen; - sisc->backend_funcs.createRes = fbdevCreateResources; - sisc->backend_funcs.preserve = fbdevPreserve; - sisc->backend_funcs.restore = fbdevRestore; - sisc->backend_funcs.dpms = fbdevDPMS; - sisc->backend_funcs.enable = fbdevEnable; - sisc->backend_funcs.disable = fbdevDisable; - sisc->backend_funcs.getColors = fbdevGetColors; - sisc->backend_funcs.putColors = fbdevPutColors; - } -#endif -#ifdef KDRIVEVESA - if (!initialized && vesaInitialize(card, &sisc->backend_priv.vesa)) { - sisc->use_vesa = TRUE; - initialized = TRUE; - sisc->backend_funcs.cardfini = vesaCardFini; - sisc->backend_funcs.scrfini = vesaScreenFini; - sisc->backend_funcs.initScreen = vesaInitScreen; - sisc->backend_funcs.finishInitScreen = vesaFinishInitScreen; - sisc->backend_funcs.createRes = vesaCreateResources; - sisc->backend_funcs.preserve = vesaPreserve; - sisc->backend_funcs.restore = vesaRestore; - sisc->backend_funcs.dpms = vesaDPMS; - sisc->backend_funcs.enable = vesaEnable; - sisc->backend_funcs.disable = vesaDisable; - sisc->backend_funcs.getColors = vesaGetColors; - sisc->backend_funcs.putColors = vesaPutColors; - } -#endif - - if (!initialized || !SiSMapReg(card, sisc)) { - xfree(sisc); - return FALSE; - } - - card->driver = sisc; - - return TRUE; -} - -static void -SiSCardFini(KdCardInfo *card) -{ - SiSCardInfo *sisc = (SiSCardInfo *)card->driver; - - SiSUnmapReg(card, sisc); - sisc->backend_funcs.cardfini(card); -} - -static Bool -SiSScreenInit(KdScreenInfo *screen) -{ - SiSScreenInfo *siss; - SiSCardInfo(screen); - int success = FALSE; - - siss = xcalloc(sizeof(SiSScreenInfo), 1); - if (siss == NULL) - return FALSE; - - siss->sisc = sisc; - - screen->driver = siss; - -#ifdef KDRIVEFBDEV - if (sisc->use_fbdev) { - success = fbdevScreenInitialize(screen, - &siss->backend_priv.fbdev); - screen->memory_size = sisc->backend_priv.fbdev.fix.smem_len; - screen->off_screen_base = - sisc->backend_priv.fbdev.var.yres_virtual * - screen->fb[0].byteStride; - } -#endif -#ifdef KDRIVEVESA - if (sisc->use_vesa) { - if (screen->fb[0].depth == 0) - screen->fb[0].depth = 16; - success = vesaScreenInitialize(screen, - &siss->backend_priv.vesa); - } -#endif - if (!success) { - screen->driver = NULL; - xfree(siss); - return FALSE; - } - - return TRUE; -} - -static void -SiSScreenFini(KdScreenInfo *screen) -{ - SiSScreenInfo *siss = (SiSScreenInfo *)screen->driver; - SiSCardInfo *sisc = screen->card->driver; - - sisc->backend_funcs.scrfini(screen); - xfree(siss); - screen->driver = 0; -} - -Bool -SiSMapReg(KdCardInfo *card, SiSCardInfo *sisc) -{ - sisc->reg_base = (CARD8 *)KdMapDevice(SIS_REG_BASE(card), - SIS_REG_SIZE(card)); - - if (sisc->reg_base == NULL) - return FALSE; - - KdSetMappedMode(SIS_REG_BASE(card), SIS_REG_SIZE(card), - KD_MAPPED_MODE_REGISTERS); - - return TRUE; -} - -void -SiSUnmapReg(KdCardInfo *card, SiSCardInfo *sisc) -{ - if (sisc->reg_base) { - KdResetMappedMode(SIS_REG_BASE(card), SIS_REG_SIZE(card), - KD_MAPPED_MODE_REGISTERS); - KdUnmapDevice((void *)sisc->reg_base, SIS_REG_SIZE(card)); - sisc->reg_base = 0; - } -} - -static Bool -SiSInitScreen(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - SiSCardInfo(pScreenPriv); - - return sisc->backend_funcs.initScreen(pScreen); -} - -static Bool -SiSFinishInitScreen(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - SiSCardInfo(pScreenPriv); - - return sisc->backend_funcs.finishInitScreen(pScreen); -} - -static Bool -SiSCreateResources(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - SiSCardInfo(pScreenPriv); - - return sisc->backend_funcs.createRes(pScreen); -} - -static void -SiSPreserve(KdCardInfo *card) -{ - SiSCardInfo *sisc = card->driver; - - sisc->backend_funcs.preserve(card); -} - -static void -SiSRestore(KdCardInfo *card) -{ - SiSCardInfo *sisc = card->driver; - - SiSUnmapReg(card, sisc); - - sisc->backend_funcs.restore(card); -} - -static Bool -SiSDPMS(ScreenPtr pScreen, int mode) -{ - KdScreenPriv(pScreen); - SiSCardInfo(pScreenPriv); - - return sisc->backend_funcs.dpms(pScreen, mode); -} - -static Bool -SiSEnable(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - SiSCardInfo(pScreenPriv); - - if (!sisc->backend_funcs.enable(pScreen)) - return FALSE; - - if ((sisc->reg_base == NULL) && !SiSMapReg(pScreenPriv->screen->card, - sisc)) - return FALSE; - - SiSDPMS(pScreen, KD_DPMS_NORMAL); - - return TRUE; -} - -static void -SiSDisable(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - SiSCardInfo(pScreenPriv); - - SiSUnmapReg(pScreenPriv->card, sisc); - - sisc->backend_funcs.disable(pScreen); -} - -static void -SiSGetColors(ScreenPtr pScreen, int fb, int n, xColorItem *pdefs) -{ - KdScreenPriv(pScreen); - SiSCardInfo(pScreenPriv); - - sisc->backend_funcs.getColors(pScreen, fb, n, pdefs); -} - -static void -SiSPutColors(ScreenPtr pScreen, int fb, int n, xColorItem *pdefs) -{ - KdScreenPriv(pScreen); - SiSCardInfo(pScreenPriv); - - sisc->backend_funcs.putColors(pScreen, fb, n, pdefs); -} - -KdCardFuncs SiSFuncs = { - SiSCardInit, /* cardinit */ - SiSScreenInit, /* scrinit */ - SiSInitScreen, /* initScreen */ - SiSFinishInitScreen, /* finishInitScreen */ - SiSCreateResources, /* createRes */ - SiSPreserve, /* preserve */ - SiSEnable, /* enable */ - SiSDPMS, /* dpms */ - SiSDisable, /* disable */ - SiSRestore, /* restore */ - SiSScreenFini, /* scrfini */ - SiSCardFini, /* cardfini */ - - 0, /* initCursor */ - 0, /* enableCursor */ - 0, /* disableCursor */ - 0, /* finiCursor */ - 0, /* recolorCursor */ - - SiSDrawInit, /* initAccel */ - SiSDrawEnable, /* enableAccel */ - SiSDrawSync, /* syncAccel */ - SiSDrawDisable, /* disableAccel */ - SiSDrawFini, /* finiAccel */ - - SiSGetColors, /* getColors */ - SiSPutColors, /* putColors */ -}; diff --git a/hw/kdrive/sis300/sis.h b/hw/kdrive/sis300/sis.h deleted file mode 100644 index 25d55be31..000000000 --- a/hw/kdrive/sis300/sis.h +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright © 2003 Eric Anholt - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Eric Anholt not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Eric Anholt makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _SIS_H_ -#define _SIS_H_ - -#include "kdrive-config.h" - -#ifdef KDRIVEFBDEV -#include -#endif -#ifdef KDRIVEVESA -#include -#endif - -/* XXX */ -#define SIS_REG_BASE(c) ((c)->attr.address[1]) -#define SIS_REG_SIZE(c) (0x10000) - -#ifdef __powerpc__ - -static __inline__ void -MMIO_OUT32(__volatile__ void *base, const unsigned long offset, - const unsigned int val) -{ - __asm__ __volatile__( - "stwbrx %1,%2,%3\n\t" - "eieio" - : "=m" (*((volatile unsigned char *)base+offset)) - : "r" (val), "b" (base), "r" (offset)); -} - -static __inline__ CARD32 -MMIO_IN32(__volatile__ void *base, const unsigned long offset) -{ - register unsigned int val; - __asm__ __volatile__( - "lwbrx %0,%1,%2\n\t" - "eieio" - : "=r" (val) - : "b" (base), "r" (offset), - "m" (*((volatile unsigned char *)base+offset))); - return val; -} - -#else - -#define MMIO_OUT32(mmio, a, v) (*(VOL32 *)((mmio) + (a)) = (v)) -#define MMIO_IN32(mmio, a) (*(VOL32 *)((mmio) + (a))) - -#endif - -typedef volatile CARD8 VOL8; -typedef volatile CARD16 VOL16; -typedef volatile CARD32 VOL32; - -struct pci_id_entry { - CARD16 vendor; - CARD16 device; - CARD8 caps; - char *name; -}; - -struct backend_funcs { - void (*cardfini)(KdCardInfo *); - void (*scrfini)(KdScreenInfo *); - Bool (*initScreen)(ScreenPtr); - Bool (*finishInitScreen)(ScreenPtr pScreen); - Bool (*createRes)(ScreenPtr); - void (*preserve)(KdCardInfo *); - void (*restore)(KdCardInfo *); - Bool (*dpms)(ScreenPtr, int); - Bool (*enable)(ScreenPtr); - void (*disable)(ScreenPtr); - void (*getColors)(ScreenPtr, int, int, xColorItem *); - void (*putColors)(ScreenPtr, int, int, xColorItem *); -}; - -typedef struct _SiSCardInfo { - union { -#ifdef KDRIVEFBDEV - FbdevPriv fbdev; -#endif -#ifdef KDRIVEVESA - VesaCardPrivRec vesa; -#endif - } backend_priv; - struct backend_funcs backend_funcs; - - struct pci_id_entry *pci_id; - CARD8 *reg_base; - Bool use_fbdev, use_vesa; -} SiSCardInfo; - -#define getSiSCardInfo(kd) ((SiSCardInfo *) ((kd)->card->driver)) -#define SiSCardInfo(kd) SiSCardInfo *sisc = getSiSCardInfo(kd) - -typedef struct _SiSScreenInfo { - union { -#ifdef KDRIVEFBDEV - FbdevScrPriv fbdev; -#endif -#ifdef KDRIVEVESA - VesaScreenPrivRec vesa; -#endif - } backend_priv; - CARD32 depthSet; /* depth value for REG_BLT_SRCPITCH */ - KaaScreenInfoRec kaa; - SiSCardInfo *sisc; -} SiSScreenInfo; - -#define getSiSScreenInfo(kd) ((SiSScreenInfo *) ((kd)->screen->driver)) -#define SiSScreenInfo(kd) SiSScreenInfo *siss = getSiSScreenInfo(kd) - -Bool -SiSMapReg(KdCardInfo *card, SiSCardInfo *sisc); - -void -SiSUnmapReg(KdCardInfo *card, SiSCardInfo *sisc); - -Bool -SiSDrawSetup(ScreenPtr pScreen); - -Bool -SiSDrawInit(ScreenPtr pScreen); - -void -SiSDrawEnable(ScreenPtr pScreen); - -void -SiSDrawSync(ScreenPtr pScreen); - -void -SiSDrawDisable(ScreenPtr pScreen); - -void -SiSDrawFini(ScreenPtr pScreen); - -extern KdCardFuncs SiSFuncs; - -#endif /* _SIS_H_ */ diff --git a/hw/kdrive/sis300/sis_draw.c b/hw/kdrive/sis300/sis_draw.c deleted file mode 100644 index bbc905e1d..000000000 --- a/hw/kdrive/sis300/sis_draw.c +++ /dev/null @@ -1,320 +0,0 @@ -/* - * Copyright © 2003 Eric Anholt - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Eric Anholt not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Eric Anholt makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#include - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "sis.h" -#include "sis_reg.h" - -#if 0 -#define SIS_FALLBACK(x) \ -do { \ - ErrorF x; \ - return FALSE; \ -} while (0) -#else -#define SIS_FALLBACK(x) return FALSE -#endif - -CARD8 SiSSolidRop[16] = { - /* GXclear */ 0x00, /* 0 */ - /* GXand */ 0xa0, /* src AND dst */ - /* GXandReverse */ 0x50, /* src AND NOT dst */ - /* GXcopy */ 0xf0, /* src */ - /* GXandInverted*/ 0x0a, /* NOT src AND dst */ - /* GXnoop */ 0xaa, /* dst */ - /* GXxor */ 0x5a, /* src XOR dst */ - /* GXor */ 0xfa, /* src OR dst */ - /* GXnor */ 0x05, /* NOT src AND NOT dst */ - /* GXequiv */ 0xa5, /* NOT src XOR dst */ - /* GXinvert */ 0x55, /* NOT dst */ - /* GXorReverse */ 0xf5, /* src OR NOT dst */ - /* GXcopyInverted*/ 0x0f, /* NOT src */ - /* GXorInverted */ 0xaf, /* NOT src OR dst */ - /* GXnand */ 0x5f, /* NOT src OR NOT dst */ - /* GXset */ 0xff, /* 1 */ -}; - -CARD8 SiSBltRop[16] = { - /* GXclear */ 0x00, /* 0 */ - /* GXand */ 0x88, /* src AND dst */ - /* GXandReverse */ 0x44, /* src AND NOT dst */ - /* GXcopy */ 0xcc, /* src */ - /* GXandInverted*/ 0x22, /* NOT src AND dst */ - /* GXnoop */ 0xaa, /* dst */ - /* GXxor */ 0x66, /* src XOR dst */ - /* GXor */ 0xee, /* src OR dst */ - /* GXnor */ 0x11, /* NOT src AND NOT dst */ - /* GXequiv */ 0x99, /* NOT src XOR dst */ - /* GXinvert */ 0x55, /* NOT dst */ - /* GXorReverse */ 0xdd, /* src OR NOT dst */ - /* GXcopyInverted*/ 0x33, /* NOT src */ - /* GXorInverted */ 0xbb, /* NOT src OR dst */ - /* GXnand */ 0x77, /* NOT src OR NOT dst */ - /* GXset */ 0xff, /* 1 */ -}; - -int copydx, copydy; -int fifo_size; -SiSScreenInfo *accel_siss; -char *mmio; -CARD32 sis_color = 0; -CARD32 blitCmd; - -static void -SiSWaitAvailMMIO(int n) -{ - while (fifo_size < n) { - fifo_size = MMIO_IN32(mmio, REG_CommandQueue) & MASK_QueueLen; - } - fifo_size -= n; -} - -static void -SiSWaitIdle(void) -{ - CARD32 engineState; - do { - engineState = MMIO_IN32(mmio, REG_CommandQueue); - } while ((engineState & SiS_EngIdle) != SiS_EngIdle); -} - -static Bool -SiSPrepareSolid(PixmapPtr pPixmap, int alu, Pixel pm, Pixel fg) -{ - KdScreenPriv(pPixmap->drawable.pScreen); - SiSScreenInfo(pScreenPriv); - SiSCardInfo(pScreenPriv); - - /* No acceleration for other formats (yet) */ - if (pPixmap->drawable.bitsPerPixel != - pScreenPriv->screen->fb[0].bitsPerPixel) - return FALSE; - - if ((pm & 0x00ffffff) != 0x00ffffff) /* XXX */ - SIS_FALLBACK(("Unsupported planemask 0x%x\n", pm)); - - accel_siss = siss; - mmio = sisc->reg_base; - - SiSWaitAvailMMIO(4); - MMIO_OUT32(mmio, REG_BLT_PATFG, fg); - MMIO_OUT32(mmio, REG_BLT_DSTRECT, (-1 << 16) | pPixmap->devKind); - MMIO_OUT32(mmio, REG_BLT_SRCPITCH, siss->depthSet); - MMIO_OUT32(mmio, REG_BLT_DSTBASE, ((CARD8 *)pPixmap->devPrivate.ptr - - pScreenPriv->screen->memory_base)); - - blitCmd = BLT_CMD_BITBLT | BLT_PAT_FG | BLT_X_INC | BLT_Y_INC | - BLT_NOCLIP | (SiSSolidRop[alu] << 8); - - return TRUE; -} - -static void -SiSSolid(int x1, int y1, int x2, int y2) -{ - SiSWaitAvailMMIO(3); - MMIO_OUT32(mmio, REG_BLT_DSTXY, (x1 << 16) | y1); - MMIO_OUT32(mmio, REG_BLT_H_W, ((y2 - y1) << 16) | (x2 - x1)); - MMIO_OUT32(mmio, REG_BLT_CMD, blitCmd); -} - -static void -SiSDoneSolid(void) -{ -} - -static Bool -SiSPrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, int dx, int dy, int alu, - Pixel pm) -{ - KdScreenPriv(pDst->drawable.pScreen); - SiSScreenInfo(pScreenPriv); - SiSCardInfo(pScreenPriv); - - /* No acceleration for other formats (yet) */ - if (pDst->drawable.bitsPerPixel != - pScreenPriv->screen->fb[0].bitsPerPixel) - return FALSE; - - if ((pm & 0x00ffffff) != 0x00ffffff) /* XXX */ - SIS_FALLBACK(("Unsupported pixel mask 0x%x\n", pm)); - - accel_siss = siss; - mmio = sisc->reg_base; - - SiSWaitAvailMMIO(4); - MMIO_OUT32(mmio, REG_BLT_SRCPITCH, siss->depthSet | pSrc->devKind); - MMIO_OUT32(mmio, REG_BLT_DSTRECT, (-1 << 16) | pDst->devKind); - MMIO_OUT32(mmio, REG_BLT_SRCBASE, ((CARD8 *)pSrc->devPrivate.ptr - - pScreenPriv->screen->memory_base)); - MMIO_OUT32(mmio, REG_BLT_DSTBASE, ((CARD8 *)pDst->devPrivate.ptr - - pScreenPriv->screen->memory_base)); - - blitCmd = BLT_CMD_BITBLT | BLT_PAT_FG | BLT_NOCLIP | - (SiSBltRop[alu] << 8); - - if (pSrc != pDst || dx >= 0) - blitCmd |= BLT_X_INC; - if (pSrc != pDst || dy >= 0) - blitCmd |= BLT_Y_INC; - - return TRUE; -} - -static void -SiSCopy(int srcX, int srcY, int dstX, int dstY, int w, int h) -{ - if (!(blitCmd & BLT_X_INC)) { - srcX += w - 1; - dstX += w - 1; - } - - if (!(blitCmd & BLT_Y_INC)) { - srcY += h - 1; - dstY += h - 1; - } - - SiSWaitAvailMMIO(4); - MMIO_OUT32(mmio, REG_BLT_H_W, (h << 16) | w); - MMIO_OUT32(mmio, REG_BLT_SRCXY, (srcX << 16) | srcY); - MMIO_OUT32(mmio, REG_BLT_DSTXY, (dstX << 16) | dstY); - MMIO_OUT32(mmio, REG_BLT_CMD, blitCmd); -} - -static void -SiSDoneCopy(void) -{ -} - -KaaScreenInfoRec SiSKaa = { - SiSPrepareSolid, - SiSSolid, - SiSDoneSolid, - SiSPrepareCopy, - SiSCopy, - SiSDoneCopy, - KAA_OFFSCREEN_PIXMAPS, - 8, - 8 -}; - -#define USE_TURBOQUEUE 0 - -Bool -SiSDrawInit(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - SiSScreenInfo(pScreenPriv); - CARD8 tmp; -#if USE_TURBOQUEUE - int tqsize; -#endif - - switch (pScreenPriv->screen->fb[0].depth) - { - case 8: - siss->depthSet = 0x00000000; - break; - case 15: - siss->depthSet = 0x40000000; - break; - case 16: - siss->depthSet = 0x80000000; - break; - case 24: - if (pScreenPriv->screen->fb[0].bitsPerPixel == 32) { - siss->depthSet = 0xc0000000; - break; - } - /* FALLTHROUGH*/ - default: - ErrorF("Unsupported depth/bpp %d/%d\n", - pScreenPriv->screen->fb[0].depth, - pScreenPriv->screen->fb[0].bitsPerPixel); - return FALSE; - } - - outb(0x05, 0x3c4); - outb(0x86, 0x3c5); /* unlock registers */ - - outb(0x20, 0x3c4); - outb(0xA1, 0x3c5); /* enable pci linear addressing, MMIO, PCI_IO */ - - outb(0x1e, 0x3c4); - tmp = inb(0x3c5); - outb(tmp | 0x42 | 0x18, 0x3c5); /* Enable 2d and 3d */ - -#if USE_TURBOQUEUE - tqsize = (pScreenPriv->screen->memory_size / 1024) / 64 - 8; - /* Enable TQ */ - outb(0x26, 0x3c4); - outb(tqsize & 0xff, 0x3c5); - outb(0x27, 0x3c4); - tmp = inb(0x3c5); - outb(((tqsize >> 8) & 0x03) | (tmp & 0x0c) | 0xF0, 0x3c5); - - /* XXX: Adjust offscreen size to avoid TQ area (last 512k) */ -#endif - - ErrorF("Screen: %d/%d depth/bpp\n", pScreenPriv->screen->fb[0].depth, - pScreenPriv->screen->fb[0].bitsPerPixel); - - if (!kaaDrawInit(pScreen, &SiSKaa)) - return FALSE; - - return TRUE; -} - -void -SiSDrawEnable(ScreenPtr pScreen) -{ - KdMarkSync(pScreen); -} - -void -SiSDrawDisable(ScreenPtr pScreen) -{ -} - -void -SiSDrawFini(ScreenPtr pScreen) -{ - kaaDrawFini (pScreen); -} - -void -SiSDrawSync(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - SiSScreenInfo(pScreenPriv); - SiSCardInfo(pScreenPriv); - - accel_siss = siss; - mmio = sisc->reg_base; - - SiSWaitIdle(); -} diff --git a/hw/kdrive/sis300/sis_reg.h b/hw/kdrive/sis300/sis_reg.h deleted file mode 100644 index 6e5a8f6d5..000000000 --- a/hw/kdrive/sis300/sis_reg.h +++ /dev/null @@ -1,902 +0,0 @@ -/************************************************************************** - -Copyright 2000 Silicon Integrated Systems Corp, Inc., HsinChu, Taiwan. -Copyright 2003 Eric Anholt -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -ERIC ANHOLT OR SILICON INTEGRATED SYSTEMS CORP BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Sung-Ching Lin - * Eric Anholt - */ - -#ifndef _sis_reg_h_ -#define _sis_reg_h_ - -/* - * Define All the Register Address of 6327 - */ - -#define REG_BLT_SRCBASE 0x8200 -#define REG_BLT_SRCPITCH 0x8204 -#define REG_BLT_SRCXY 0x8208 -#define REG_BLT_DSTXY 0x820c -#define REG_BLT_DSTBASE 0x8210 -#define REG_BLT_DSTRECT 0x8214 -#define REG_BLT_H_W 0x8218 -#define REG_BLT_PATFG 0x821c -#define REG_BLT_PATBG 0x8220 -#define REG_BLT_SRCFG 0x8224 -#define REG_BLT_SRCBG 0x8228 -#define REG_BLT_MONOPAT0 0x822c -#define REG_BLT_MONOPAT1 0x8230 -#define REG_BLT_CLIPLT 0x8234 -#define REG_BLT_CLIBRB 0x8238 -#define REG_BLT_CMD 0x823c -#define REG_CommandQueue 0x8240 - -#define REG_3D_TSFSa 0x8800 -#define REG_3D_TSZa 0x8804 -#define REG_3D_TSXa 0x8808 -#define REG_3D_TSYa 0x880C -#define REG_3D_TSARGBa 0x8810 -#define REG_3D_TSWGa 0x8814 -#define REG_3D_TSUAa 0x8818 -#define REG_3D_TSVAa 0x881C -#define REG_3D_TSUBa 0x8820 -#define REG_3D_TSVBa 0x8824 -#define REG_3D_TSUCa 0x8828 -#define REG_3D_TSVCa 0x882C - -#define REG_3D_TSFSb 0x8830 -#define REG_3D_TSZb 0x8834 -#define REG_3D_TSXb 0x8838 -#define REG_3D_TSYb 0x883C -#define REG_3D_TSARGBb 0x8840 -#define REG_3D_TSWGb 0x8844 -#define REG_3D_TSUAb 0x8848 -#define REG_3D_TSVAb 0x884C -#define REG_3D_TSUBb 0x8850 -#define REG_3D_TSVBb 0x8854 -#define REG_3D_TSUCb 0x8858 -#define REG_3D_TSVCb 0x885C - -#define REG_3D_TSFSc 0x8860 -#define REG_3D_TSZc 0x8864 -#define REG_3D_TSXc 0x8868 -#define REG_3D_TSYc 0x886C -#define REG_3D_TSARGBc 0x8870 -#define REG_3D_TSWGc 0x8874 -#define REG_3D_TSUAc 0x8878 -#define REG_3D_TSVAc 0x887C -#define REG_3D_TSUBc 0x8880 -#define REG_3D_TSVBc 0x8884 -#define REG_3D_TSUCc 0x8888 -#define REG_3D_TSVCc 0x888C - -/* - * REG_3D_AGPCmdSetting (89e4h-89f7) - */ -#define REG_3D_AGPCmBase 0x89E4 -#define REG_3D_AGPRmDwNum 0x89E8 -#define REG_3D_AGPTtDwNum 0x89EC -#define REG_3D_AGPCmFire 0x89F0 - -#define REG_3D_ParsingSet 0x89F4 -#define REG_3D_PrimitiveSet 0x89F8 -#define REG_3D_ShadeMode 0x89F8 -#define REG_3D_EngineFire 0x89FC -#define REG_3D_EngineStatus 0x89FC -#define REG_3D_TEnable 0x8A00 -#define REG_3D_TEnable2 0x8A04 - -#define REG_3D_ZSet 0x8A08 -#define REG_3D_ZBias 0x8A0C -#define REG_3D_ZStWriteMask 0x8A10 - -#define REG_3D_ZAddress 0x8A14 -#define REG_3D_AlphaSet 0x8A18 -#define REG_3D_AlphaAddress 0x8A1C -#define REG_3D_DstSet 0x8A20 -#define REG_3D_DstAlphaWriteMask 0x8A24 - -#define REG_3D_DstAddress 0x8A28 - -#define REG_3D_LinePattern 0x8A2C - -#define REG_3D_FogSet 0x8A30 - -#define REG_3D_FogFarDistance 0x8A34 -#define REG_3D_FogInverseDistance 0x8A38 -#define REG_3D_FogFactorDensity 0x8A3C - -#define REG_3D_StencilSet 0x8A44 -#define REG_3D_StencilSet2 0x8A48 -#define REG_3D_StencilAddress 0x8A4C - -#define REG_3D_DstBlendMode 0x8A50 -#define REG_3D_SrcBlendMode 0x8A50 -#define REG_3D_ClipTopBottom 0x8A54 -#define REG_3D_ClipLeftRight 0x8A58 - -#define REG_3D_Brightness 0x8A5C - -#define REG_3D_BumpMapSet 0x8A68 -#define REG_3D_BumpMapAddress 0x8A6C -#define REG_3D_BumpMapPitch 0x8A70 -#define REG_3D_BumpMapMatrix0 0x8A74 -#define REG_3D_BumpMapMatrix1 0x8A78 - -/* - * Define the Texture Register Address of 6326 - */ -#define REG_3D_TextureSet 0x8A7C -#define REG_3D_TextureWidthHeight 0x8A7C -#define REG_3D_TextureMip 0x8A80 - -#define REG_3D_TextureTransparencyColorHigh 0x8A84 -#define REG_3D_TextureTransparencyColorLow 0x8A88 -#define REG_3D_TextureBorderColor 0x8A8C -#define REG_3D_TextureAddress0 0x8A90 -#define REG_3D_TextureAddress1 0x8A94 -#define REG_3D_TextureAddress2 0x8A98 -#define REG_3D_TextureAddress3 0x8A9C -#define REG_3D_TextureAddress4 0x8AA0 -#define REG_3D_TextureAddress5 0x8AA4 -#define REG_3D_TextureAddress6 0x8AA8 -#define REG_3D_TextureAddress7 0x8AAC -#define REG_3D_TextureAddress8 0x8AB0 -#define REG_3D_TextureAddress9 0x8AB4 -#define REG_3D_TextureAddress10 0x8AB8 -#define REG_3D_TextureAddress11 0x8ABC -#define REG_3D_TexturePitch0 0x8AC0 -#define REG_3D_TexturePitch1 0x8AC0 -#define REG_3D_TexturePitch2 0x8AC4 -#define REG_3D_TexturePitch3 0x8AC4 -#define REG_3D_TexturePitch4 0x8AC8 -#define REG_3D_TexturePitch5 0x8AC8 -#define REG_3D_TexturePitch6 0x8ACC -#define REG_3D_TexturePitch7 0x8ACC -#define REG_3D_TexturePitch8 0x8AD0 -#define REG_3D_TexturePitch9 0x8AD0 -#define REG_3D_TexturePitch10 0x8AD4 - -#define REG_3D_Texture1Set 0x8ADC -#define REG_3D_Texture1WidthHeight 0x8ADC -#define REG_3D_Texture1Mip 0x8AE0 - -#define REG_3D_Texture1TransparencyColorHigh 0x8AE4 -#define REG_3D_Texture1TransparencyColorLow 0x8AE8 -#define REG_3D_Texture1BorderColor 0x8AEC -#define REG_3D_Texture1Address0 0x8AF0 -#define REG_3D_Texture1Address1 0x8AF4 -#define REG_3D_Texture1Address2 0x8AF8 -#define REG_3D_Texture1Address3 0x8AFC -#define REG_3D_Texture1Address4 0x8B00 -#define REG_3D_Texture1Address5 0x8B04 -#define REG_3D_Texture1Address6 0x8B08 -#define REG_3D_Texture1Address7 0x8B0C -#define REG_3D_Texture1Address8 0x8B10 -#define REG_3D_Texture1Address9 0x8B14 -#define REG_3D_Texture1Address10 0x8B18 -#define REG_3D_Texture1Address11 0x8B1C -#define REG_3D_Texture1Pitch0 0x8B20 -#define REG_3D_Texture1Pitch1 0x8B20 -#define REG_3D_Texture1Pitch2 0x8B24 -#define REG_3D_Texture1Pitch3 0x8B24 -#define REG_3D_Texture1Pitch4 0x8B28 -#define REG_3D_Texture1Pitch5 0x8B28 -#define REG_3D_Texture1Pitch6 0x8B2C -#define REG_3D_Texture1Pitch7 0x8B2C -#define REG_3D_Texture1Pitch8 0x8B30 -#define REG_3D_Texture1Pitch9 0x8B30 -#define REG_3D_Texture1Pitch10 0x8B34 - -#define REG_3D_TextureBlendFactor 0x8B3C -#define REG_3D_TextureColorBlendSet0 0x8B40 -#define REG_3D_TextureColorBlendSet1 0x8B44 -#define REG_3D_TextureAlphaBlendSet0 0x8B48 -#define REG_3D_TextureAlphaBlendSet1 0x8B4C -/* - * Define the End of Primitive List of 6326 - */ -#define REG_3D_EndPrimitiveList 0X8B50 - - -/* - * Define the Stipple Register Address of 6326 - */ -#define REG_3D_Stipple0 0X8B60 - -#define REG_3D_TexturePalette 0x8C00 - -/* - * REG_BLT_CMD -- (8x823c-0x823f) - */ -#define BLT_CMD_BITBLT 0x00000000 -#define BLT_CMD_COLOREXP 0x00000001 -#define BLT_CMD_ENCOLOREXP 0x00000002 -#define BLT_CMD_MULTIPLE_SCANLINE 0x00000003 -#define BLT_CMD_LINE 0x00000004 -#define BLT_CMD_TRAPAZOID_FILL 0x00000005 -#define BLT_CMD_TRANSPARENT_BITBLT 0x00000006 - -#define BLT_X_INC 0x00010000 -#define BLT_Y_INC 0x00020000 - -#define BLT_SRC_VIDEO 0x00000000 -#define BLT_SRC_SYSTEM 0x00000010 -#define BLT_SRC_CPUBLITBUF BLT_SRC_SYSTEM -#define BLT_SRC_AGP 0x00000020 - -#define BLT_PAT_FG 0x00000000 -#define BLT_PAT_PATREG 0x00000040 -#define BLT_PAT_MONO 0x00000080 - -/* Clipping flags */ -#define BLT_NOCLIP 0x00000000 -#define BLT_NOMERGECLIP 0x04000000 -#define BLT_CLIPENABLE 0x00040000 -#define BLT_CLIPWITHOUTMERGE 0x04040000 - -/* - * REG_CommandQueue -- (8240h-8243h) - */ -#define MASK_QueueLen 0x0000ffff -#define SiS_EngIdle2d 0x80000000 -#define SiS_EngIdle 0xe0000000 -#define MASK_EngState 0xf0000000 - -/* - * REG_3D_ParsingSet -- Define Parsing Mask (89F4h-89F7h) - */ -#define MASK_VertexDWSize 0xF0000000 -#define MASK_VertexDataFormat 0x0FFF0000 -#define MASK_PsVertex_HAS_RHW 0x08000000 -#define MASK_PsVertex_HAS_NORMALXYZ 0x04000000 -#define MASK_PsVertex_HAS_DIFFUSE 0x02000000 -#define MASK_PsVertex_HAS_SPECULAR 0x01000000 -#define MASK_PsUVSet 0x00FF0000 -#define MASK_PsVertex_HAS_1SetUV 0x00800000 -#define MASK_PsVertex_HAS_2SetUV 0x00C00000 -#define MASK_PsVertex_HAS_3SetUV 0x00E00000 -#define MASK_PsVertex_HAS_UVSet1 0x00800000 -#define MASK_PsVertex_HAS_UVSet2 0x00400000 -#define MASK_PsVertex_HAS_UVSet3 0x00200000 -#define MASK_PsCullDirection_CCW 0x00008000 -#define MASK_PsShadingMode 0x00007000 -/* XXX Shading modes just a guess, but seem to work*/ -#define MASK_PsShadingFlatA 0x00001000 -#define MASK_PsShadingFlatB 0x00002000 -#define MASK_PsShadingFlatC 0x00003000 -#define MASK_PsShadingSmooth 0x00004000 -#define MASK_PsTextureFrom 0x000003F0 -#define MASK_PsTexture0FromA 0x00000000 -#define MASK_PsTexture1FromA 0x00000000 -#define MASK_PsTexture1FromB 0x00000040 -#define MASK_PsBumpTextureFromA 0x00000000 -#define MASK_PsBumpTextureFromB 0x00000010 -#define MASK_PsBumpTextureFromC 0x00000020 -#define MASK_PsDataType 0x0000000F -#define MASK_PsPointList 0x00000000 -#define MASK_PsLineList 0x00000004 -#define MASK_PsLineStrip 0x00000005 -#define MASK_PsTriangleList 0x00000008 -#define MASK_PsTriangleStrip 0x00000009 -#define MASK_PsTriangleFan 0x0000000A - -/* - * REG_3D_PrimitiveSet -- Define Fire Primitive Mask (89F8h-89FBh) - */ -#define MASK_DrawPrimitiveCommand 0x00000007 -#define MASK_SetFirePosition 0x00001F00 -#define MASK_BumpTextureFrom 0x00030000 -#define MASK_Texture1From 0x000C0000 -#define MASK_Texture0From 0x00300000 -#define MASK_ShadingMode 0x07000000 -#define MASK_CullDirection 0x08000000 - -#define OP_3D_POINT_DRAW 0x00000000 -#define OP_3D_LINE_DRAW 0x00000001 -#define OP_3D_TRIANGLE_DRAW 0x00000002 - -#define OP_3D_DIRECTION_RIGHT 0x00000000 -#define OP_3D_DIRECTION_LEFT 0x00000100 -#define OP_3D_DIRECTION_HORIZONTAL 0x00000000 -#define OP_3D_DIRECTION_VERTICAL 0x00000100 - -#define OP_3D_FIRE_TFIRE 0x00000000 -#define OP_3D_FIRE_TSARGBa 0x00000100 -#define OP_3D_FIRE_TSWa 0x00000200 -#define OP_3D_FIRE_TSVAa 0x00000300 -#define OP_3D_FIRE_TSVBa 0x00000400 -#define OP_3D_FIRE_TSVCa 0x00000500 - -#define OP_3D_FIRE_TSARGBb 0x00000900 -#define OP_3D_FIRE_TSWb 0x00000a00 -#define OP_3D_FIRE_TSVAb 0x00000b00 -#define OP_3D_FIRE_TSVBb 0x00000c00 -#define OP_3D_FIRE_TSVCb 0x00000d00 - -#define OP_3D_FIRE_TSARGBc 0x00001100 -#define OP_3D_FIRE_TSWc 0x00001200 -#define OP_3D_FIRE_TSVAc 0x00001300 -#define OP_3D_FIRE_TSVBc 0x00001400 -#define OP_3D_FIRE_TSVCc 0x00001500 - -#define OP_3D_Texture0FromA 0x00000000 -#define OP_3D_Texture0FromB 0x00100000 -#define OP_3D_Texture0FromC 0x00200000 -#define OP_3D_Texture1FromA 0x00000000 -#define OP_3D_Texture1FromB 0x00040000 -#define OP_3D_Texture1FromC 0x00080000 -#define OP_3D_TextureBumpFromA 0x00000000 -#define OP_3D_TextureBumpFromB 0x00010000 -#define OP_3D_TextureBumpFromC 0x00020000 - -#define OP_3D_CullDirection_CCW 0x08000000 - -#define SHADE_FLAT_VertexA 0x01000000 -#define SHADE_FLAT_VertexB 0x02000000 -#define SHADE_FLAT_VertexC 0x03000000 -#define SHADE_GOURAUD 0x04000000 - -/* - * Define Command Queue Length Mask (89FCh-89FF) - */ -#define MASK_CmdQueueLen 0x0FFF0000 - -/* - * REG_3D_TEnable -- Define Capility Enable Mask (8A00h-8A03h) - */ -#define MASK_DitherEnable 0x00000001 -#define MASK_BlendEnable 0x00000002 -#define MASK_FogTestEnable 0x00000004 -#define MASK_FogEnable 0x00000008 -#define MASK_SpecularEnable 0x00000010 -#define MASK_FogPerspectiveEnable 0x00000020 -#define MASK_TextureCacheClear 0x00000040 -#define MASK_TextureCacheEnable 0x00000080 -#define MASK_BumpMapEnable 0x00000100 -#define MASK_TexturePerspectiveEnable 0x00000200 -#define MASK_TextureEnable 0x00000400 -#define MASK_CullEnable 0x00000800 -#define MASK_TextureNumUsed 0x0000F000 -#define MASK_AlphaBufferEnable 0x00010000 -#define MASK_AlphaTestEnable 0x00020000 -#define MASK_AlphaWriteEnable 0x00040000 -#define MASK_ZTestEnable 0x00080000 -#define MASK_ZWriteEnable 0x00100000 -#define MASK_StencilBufferEnable 0x00200000 -#define MASK_StencilTestEnable 0x00400000 -#define MASK_StencilWriteEnable 0x00800000 -#define MASK_Texture0TransparencyEnable 0x01000000 -#define MASK_Texture1TransparencyEnable 0x02000000 -#define MASK_TextureAWrapUCorrection 0x04000000 -#define MASK_TextureAWrapVCorrection 0x08000000 -#define MASK_TextureBWrapUCorrection 0x10000000 -#define MASK_TextureBWrapVCorrection 0x20000000 -#define MASK_TextureCWrapUCorrection 0x40000000 -#define MASK_TextureCWrapVCorrection 0x80000000 - -/* - * REG_3D_TEnable2 -- Define Capility Enable Mask2 (8A04h-8A07h) - */ -#define MASK_Texture0BlockTextureEnable 0x00000001 -#define MASK_Texture1BlockTextureEnable 0x00000002 -#define MASK_Texture0AnisotropicEnable 0x00000010 -#define MASK_Texture1AnisotropicEnable 0x00000020 -#define MASK_TextureMipmapBiasEnable 0x00000040 -#define MASK_LinePatternEnable 0x00000100 -#define MASK_StippleAlphaEnable 0x00000200 -#define MASK_StippleEnable 0x00000400 -#define MASK_AntiAliasEnable 0x00000800 -#define MASK_ZMaskWriteEnable 0x00001000 -#define MASK_StencilMaskWriteEnable 0x00002000 -#define MASK_AlphaMaskWriteEnable 0x00004000 -#define MASK_ColorMaskWriteEnable 0x00008000 -#define MASK_ZCacheClear 0x00010000 -#define MASK_ZCacheEnable 0x00020000 -#define MASK_StencilCacheClear 0x00040000 -#define MASK_StencilCacheEnable 0x00080000 -#define MASK_AlphaCacheClear 0x00100000 -#define MASK_AlphaCacheEnable 0x00200000 -#define MASK_ColorCacheClear 0x00400000 -#define MASK_ColorCacheEnable 0x00800000 - -/* - * REG_3D_ZSet -- Define Z Buffer Setting Mask (8A08h-8A0Bh) - */ -#define MASK_ZBufferPitch 0x00000FFF -#define MASK_ZTestMode 0x00070000 -#define MASK_ZBufferInSystem 0x00080000 -#define MASK_ZBufferFormat 0x01F00000 - -#define SiS_Z_COMP_NEVER 0x00000000 -#define SiS_Z_COMP_S_LT_B 0x00010000 -#define SiS_Z_COMP_S_EQ_B 0x00020000 -#define SiS_Z_COMP_S_LE_B 0x00030000 -#define SiS_Z_COMP_S_GT_B 0x00040000 -#define SiS_Z_COMP_S_NE_B 0x00050000 -#define SiS_Z_COMP_S_GE_B 0x00060000 -#define SiS_Z_COMP_ALWAYS 0x00070000 - -#define SiS_ZFORMAT_Z16 0x00000000 -#define SiS_ZFORMAT_Z16_INT 0x00100000 -#define SiS_ZFORMAT_S1Z15 0x00400000 -#define SiS_ZFORMAT_S1Z15_INT 0x00500000 -#define SiS_ZFORMAT_Z32 0x00800000 -#define SiS_ZFORMAT_S1Z31 0x00C00000 -#define SiS_ZFORMAT_S2Z30 0x00D00000 -#define SiS_ZFORMAT_S4Z28 0x00E00000 -#define SiS_ZFORMAT_S8Z24 0x00F00000 -#define SiS_ZFORMAT_FZ30 0x01800000 -#define SiS_ZFORMAT_FS1Z30 0x01C00000 -#define SiS_ZFORMAT_FS2Z30 0x01D00000 - -/* - * REG_3D_ZBias -- Define Z Buffer Setting Mask (8A0Ch-8A0Fh) - */ -#define MASK_ZBias 0xFFFFFFFF - -/* - * REG_3D_ZStWriteMask -- Define Z and Stencil Buffer Mask (8A10h-8A13h) - */ -#define MASK_ZWriteMask 0x00FFFFFF - -/* - * REG_3D_ZAddress -- Define Z Buffer Base Address(8A14h-8A17h) - */ -#define MASK_ZAddress 0xFFFFFFFF - -/* - * REG_3D_AlphaSet -- Define Alpha Buffer Setting Mask (8A18h-8A1Bh) - */ -#define MASK_AlphaBufferPitch 0x000003FF -#define MASK_AlphaRefValue 0x00FF0000 -#define MASK_AlphaTestMode 0x07000000 -#define MASK_AlphaBufferInSystem 0x08000000 -#define MASK_AlphaBufferFormat 0x30000000 - -#define SiS_ALPHA_NEVER 0x00000000 -#define SiS_ALPHA_LESS 0x01000000 -#define SiS_ALPHA_EQUAL 0x02000000 -#define SiS_ALPHA_LEQUAL 0x03000000 -#define SiS_ALPHA_GREATER 0x04000000 -#define SiS_ALPHA_NOTEQUAL 0x05000000 -#define SiS_ALPHA_GEQUAL 0x06000000 -#define SiS_ALPHA_ALWAYS 0x07000000 - -/* - * REG_3D_AlphaAddress -- Define Alpha Buffer Base Address(8A1Ch-8A1Fh) - */ -#define MASK_AlphaAddress 0xFFFFFFFF - -/* - * REG_3D_DstSet -- Define Destination Buffer Setting Mask (8A20h-8A23h) - */ -#define MASK_DstBufferPitch 0x00000FFF -#define MASK_DstBufferFormat 0x000F0000 -#define MASK_DstBufferBitDepth 0x00300000 -#define MASK_DstBufferRgbOrder 0x00400000 -#define MASK_DstBufferInSystem 0x00800000 -#define MASK_Dst7BitFormat 0x007F0000 -#define MASK_ROP2 0x0F000000 - -#define DST_FORMAT_RGB_555 0x00100000 -#define DST_FORMAT_RGB_565 0x00110000 -#define DST_FORMAT_ARGB_1555 0x00120000 -#define DST_FORMAT_ARGB_4444 0x00130000 -#define DST_FORMAT_ARGB_1888 0x00300000 -#define DST_FORMAT_ARGB_2888 0x00310000 -#define DST_FORMAT_ARGB_4888 0x00320000 -#define DST_FORMAT_ARGB_8888 0x00330000 -#define DST_FORMAT_ARGB_0888 0x00340000 - -#define DST_FORMAT_BGR_555 0x00500000 -#define DST_FORMAT_BGR_565 0x00510000 -#define DST_FORMAT_ABGR_1555 0x00520000 -#define DST_FORMAT_ABGR_4444 0x00530000 -#define DST_FORMAT_ABGR_1888 0x00700000 -#define DST_FORMAT_ABGR_2888 0x00710000 -#define DST_FORMAT_ABGR_4888 0x00720000 -#define DST_FORMAT_ABGR_8888 0x00730000 -#define DST_FORMAT_ABGR_0888 0x00740000 - -#define LOP_CLEAR 0x00000000 -#define LOP_NOR 0x01000000 -#define LOP_AND_INVERTED 0x02000000 -#define LOP_COPY_INVERTED 0x03000000 -#define LOP_AND_REVERSE 0x04000000 -#define LOP_INVERT 0x05000000 -#define LOP_XOR 0x06000000 -#define LOP_NAND 0x07000000 -#define LOP_AND 0x08000000 -#define LOP_EQUIV 0x09000000 -#define LOP_NOOP 0x0a000000 -#define LOP_OR_INVERTED 0x0b000000 -#define LOP_COPY 0x0c000000 -#define LOP_OR_REVERSE 0x0d000000 -#define LOP_OR 0x0e000000 -#define LOP_SET 0x0f000000 - -/* - * REG_3D_DstAlphaWriteMask -- Define Destination/Alpha Buffer Write Mask (8A24h-8A27h) - */ -#define MASK_ColorWriteMask 0x00FFFFFF -#define MASK_AlphaWriteMask 0xFF000000 - -/* - * REG_3D_DstAddress -- Define Destination Buffer Base Address(8A1Ch-8A1Fh) - */ -#define MASK_DstAddress 0xFFFFFFFF - -/* - * REG_3D_LinePattern -- Define Line Pattern (8A2Ch-8A2Fh) - */ -#define MASK_LinePatternRepeatFactor 0x00007FFF -#define MASK_LinePatternLastPixelFlag 0x00008000 -#define MASK_LinePattern 0xFFFF0000 - -/* - * REG_3D_FogSet -- Define Fog Mask (8A30h-8A33h) - */ -#define MASK_FogColor 0x00FFFFFF -#define MASK_FogMode 0x07000000 -#define MASK_FogZLookup 0x08000000 - -#define FOGMODE_CHEAP 0x04000000 -#define FOGMODE_LINEAR 0x05000000 -#define FOGMODE_EXP 0x06000000 -#define FOGMODE_EXP2 0x07000000 - -/* - * REG_3D_FogStartEnd -- Define Fog Start End Setting (0x8A34 - 0x8A37) - */ -#define MASK_FogFarDistance 0x0007FFFF - -/* - * REG_3D_FogStartEnd -- Define Fog End Setting (0x8A38 - 0x8A3B) - */ -#define MASK_FogInvFarDistance 0x0007FFFF - -/* - * REG_3D_FogFactorDensity (0x8A3C - 0x8A3F) - */ -#define MASK_FogDensity 0x0003FFFF -#define MASK_FogFactor 0xFF000000 - -/* - * REG_3D_StencilSet -- Define stencil test (8A44h-8A47h) - */ -#define MASK_StencilValueMask 0x000000ff -#define MASK_StencilRefMask 0x0000ff00 -#define MASK_StencilTestMode 0x07000000 -#define MASK_StencilBufferInSystem 0x08000000 -#define MASK_StencilFormat 0x30000000 - -#define SiS_STENCIL_NEVER 0x00000000 -#define SiS_STENCIL_LESS 0x01000000 -#define SiS_STENCIL_EQUAL 0x02000000 -#define SiS_STENCIL_LEQUAL 0x03000000 -#define SiS_STENCIL_GREATER 0x04000000 -#define SiS_STENCIL_NOTEQUAL 0x05000000 -#define SiS_STENCIL_GEQUAL 0x06000000 -#define SiS_STENCIL_ALWAYS 0x07000000 - -#define STENCIL_FORMAT_1 0x00000000 -#define STENCIL_FORMAT_2 0x10000000 -#define STENCIL_FORMAT_4 0x20000000 -#define STENCIL_FORMAT_8 0x30000000 - -/* - * REG_3D_StencilSet2 -- Define stencil test (8A4h-8A47h) - */ -#define MASK_StencilBufferPitch 0x00000FFF -#define MASK_StencilZPassOp 0x00007000 -#define MASK_StencilZFailOp 0x00070000 -#define MASK_StencilFailOp 0x00700000 -#define MASK_StencilWriteMask 0xFF000000 - -#define SiS_SFAIL_KEEP 0x00000000 -#define SiS_SFAIL_ZERO 0x00100000 -#define SiS_SFAIL_REPLACE 0x00200000 -#define SiS_SFAIL_INVERT 0x00500000 -#define SiS_SFAIL_INCR 0x00600000 -#define SiS_SFAIL_DECR 0x00700000 - -#define SiS_SPASS_ZFAIL_KEEP 0x00000000 -#define SiS_SPASS_ZFAIL_ZERO 0x00010000 -#define SiS_SPASS_ZFAIL_REPLACE 0x00020000 -#define SiS_SPASS_ZFAIL_INVERT 0x00050000 -#define SiS_SPASS_ZFAIL_INCR 0x00060000 -#define SiS_SPASS_ZFAIL_DECR 0x00070000 - -#define SiS_SPASS_ZPASS_KEEP 0x00000000 -#define SiS_SPASS_ZPASS_ZERO 0x00001000 -#define SiS_SPASS_ZPASS_REPLACE 0x00002000 -#define SiS_SPASS_ZPASS_INVERT 0x00005000 -#define SiS_SPASS_ZPASS_INCR 0x00006000 -#define SiS_SPASS_ZPASS_DECR 0x00007000 - -/* - * REG_3D_DstBlendMode (0x8A50 - 0x8A53) - */ -#define MASK_SrcBlendMode 0x0000000F -#define MASK_DstBlendMode 0x000000F0 - -#define SiS_D_ZERO 0x00000000 -#define SiS_D_ONE 0x00000010 -#define SiS_D_SRC_COLOR 0x00000020 -#define SiS_D_ONE_MINUS_SRC_COLOR 0x00000030 -#define SiS_D_SRC_ALPHA 0x00000040 -#define SiS_D_ONE_MINUS_SRC_ALPHA 0x00000050 -#define SiS_D_DST_ALPHA 0x00000060 -#define SiS_D_ONE_MINUS_DST_ALPHA 0x00000070 -#define SiS_D_DST_COLOR 0x00000080 -#define SiS_D_ONE_MINUS_DST_COLOR 0x00000090 -#define SiS_D_SRC_ALPHA_SAT 0x000000a0 - -#define SiS_S_ZERO 0x00000000 -#define SiS_S_ONE 0x00000001 -#define SiS_S_SRC_COLOR 0x00000002 -#define SiS_S_ONE_MINUS_SRC_COLOR 0x00000003 -#define SiS_S_SRC_ALPHA 0x00000004 -#define SiS_S_ONE_MINUS_SRC_ALPHA 0x00000005 -#define SiS_S_DST_ALPHA 0x00000006 -#define SiS_S_ONE_MINUS_DST_ALPHA 0x00000007 -#define SiS_S_DST_COLOR 0x00000008 -#define SiS_S_ONE_MINUS_DST_COLOR 0x00000009 -#define SiS_S_SRC_ALPHA_SATURATE 0x0000000a -#define SiS_S_BOTH_SRC_ALPHA 0x0000000b -#define SiS_S_BOTH_ONE_MINUS_SRC_ALPHA 0x0000000c - -/* - * REG_3D_DstBlendMode (0x8A54 - 0x8A57) - */ -#define MASK_BottomClip 0x00001FFF -#define MASK_TopClip 0x03FFE000 - -/* - * REG_3D_DstBlendMode (0x8A58 - 0x8A5B) - */ -#define MASK_RightClip 0x00001FFF -#define MASK_LeftClip 0x03FFE000 - -/* - * REG_3D_TextureSet (0x8A7C - 0x8A7F) - * REG_3D_Texture1Set (0x8ADC - 0x8ADF) - */ -#define MASK_TextureHeight 0x0000000F -#define MASK_TextureWidth 0x000000F0 -#define MASK_TextureLevel 0x00000F00 -#define MASK_TextureSignYUVFormat 0x00001000 -#define MASK_TextureMappingMode 0x00FF0000 -#define MASK_TextureWrapU 0x00010000 -#define MASK_TextureWrapV 0x00020000 -#define MASK_TextureMirrorU 0x00040000 -#define MASK_TextureMirrorV 0x00080000 -#define MASK_TextureClampU 0x00100000 -#define MASK_TextureClampV 0x00200000 -#define MASK_TextureBorderU 0x00400000 -#define MASK_TextureBorderV 0x00800000 -#define MASK_TextureFormat 0xFF000000 -#define MASK_TextureBitDepth 0x70000000 -#define MASK_TextureRgbOrder 0x80000000 - -#define TEXEL_INDEX1 0x00000000 -#define TEXEL_INDEX2 0x01000000 -#define TEXEL_INDEX4 0x02000000 -#define TEXEL_INDEX8 0x03000000 - -#define TEXEL_INDEX1WithAlpha 0x04000000 -#define TEXEL_INDEX2WithAlpha 0x05000000 -#define TEXEL_INDEX4WithAlpha 0x06000000 -#define TEXEL_INDEX8WithAlpha 0x07000000 - -#define TEXEL_I1 0x10000000 -#define TEXEL_I2 0x11000000 -#define TEXEL_I4 0x12000000 -#define TEXEL_I8 0x13000000 - -#define TEXEL_DXT1 0x19000000 -#define TEXEL_DXT2 0x1A000000 -#define TEXEL_DXT3 0x1B000000 - -#define TEXEL_YUV422 0x20000000 -#define TEXEL_YVU422 0x21000000 -#define TEXEL_UVY422 0x22000000 -#define TEXEL_VUY422 0x23000000 -#define TEXEL_YUV411 0x24000000 - -#define TEXEL_L1 0x30000000 -#define TEXEL_L2 0x31000000 -#define TEXEL_L4 0x32000000 -#define TEXEL_L8 0x33000000 - -#define TEXEL_AL11 0x34000000 -#define TEXEL_AL44 0x35000000 -#define TEXEL_AL26 0x37000000 -#define TEXEL_AL88 0x38000000 - -#define TEXEL_A1 0x40000000 -#define TEXEL_A2 0x41000000 -#define TEXEL_A4 0x42000000 -#define TEXEL_A8 0x43000000 - -#define TEXEL_RGB_332_8 0x50000000 -#define TEXEL_RGB_233_8 0x51000000 -#define TEXEL_RGB_232_8 0x52000000 -#define TEXEL_ARGB_1232_8 0x53000000 -#define TEXEL_ARGB_2222_8 0x54000000 - -#define TEXEL_RGB_555_16 0x60000000 -#define TEXEL_RGB_565_16 0x61000000 -#define TEXEL_ARGB_1555_16 0x62000000 -#define TEXEL_ARGB_4444_16 0x63000000 - -#define TEXEL_ARGB_1888_32 0x70000000 -#define TEXEL_ARGB_2888_32 0x71000000 -#define TEXEL_ARGB_4888_32 0x72000000 -#define TEXEL_ARGB_8888_32 0x73000000 -#define TEXEL_ARGB_0888_32 0x74000000 - -#define TEXEL_BGR_332_8 0xD0000000 -#define TEXEL_BGR_233_8 0xD1000000 -#define TEXEL_BGR_232_8 0xD2000000 -#define TEXEL_ABGR_1232_8 0xD3000000 -#define TEXEL_ABGR_2222_8 0xD4000000 - -#define TEXEL_BGR_555_16 0xE0000000 -#define TEXEL_BGR_565_16 0xE1000000 -#define TEXEL_ABGR_1555_16 0xE2000000 -#define TEXEL_ABGR_4444_16 0xE3000000 - -#define TEXEL_ABGR_1888_32 0xF0000000 -#define TEXEL_ABGR_2888_32 0xF1000000 -#define TEXEL_ABGR_4888_32 0xF2000000 -#define TEXEL_ABGR_8888_32 0xF3000000 -#define TEXEL_ABGR_0888_32 0xF4000000 - -#define TEXEL_VU88 0x00000000 -#define TEXEL_LVU655 0x00800000 -#define TEXEL_LVU888 0x01000000 -#define TEXEL_UV88 0x02000000 -#define TEXEL_LUV655 0x02800000 -#define TEXEL_LUV888 0x03000000 - -/* - * REG_3D_TextureMip (0x8A80 - 0x8A83) - * REG_3D_Texture1Mip (0x8AE0 - 0x8AE3) - */ -#define MASK_TextureAnisotropyRatio 0x0000000F -#define MASK_TextureMipmapLodBias 0x00003FF0 -#define MASK_TextureFilterMin 0x0001C000 -#define MASK_TextureFilterMag 0x00020000 -#define MASK_TextureFilter 0x0003C000 -#define MASK_TextureLevelInSystem 0x3FFC0000 -#define MASK_TextureLevel0InSystem 0x00040000 -#define MASK_TextureBlockLength 0xF0000000 - -#define TEXTURE_FILTER_NEAREST 0x00000000 -#define TEXTURE_FILTER_LINEAR 0x00004000 -#define TEXTURE_FILTER_NEAREST_MIP_NEAREST 0x00008000 -#define TEXTURE_FILTER_NEAREST_MIP_LINEAR 0x00010000 -#define TEXTURE_FILTER_LINEAR_MIP_NEAREST 0x0000c000 -#define TEXTURE_FILTER_LINEAR_MIP_LINEAR 0x00014000 - -/* - * REG_3D_TextureTransparencyColorHigh (0x8A84 - 0x8A87) - * REG_3D_Texture1TransparencyColorHigh (0x8AE4 - 0x8AE7) - */ -#define MASK_TextureTransparencyColorHighB 0x000000FF -#define MASK_TextureTransparencyColorHighG 0x0000FF00 -#define MASK_TextureTransparencyColorHighR 0x00FF0000 -#define MASK_TextureAlphaTransparencyMode 0x08000000 - -/* - * REG_3D_TextureTransparencyColorLow (0x8A88 - 0x8A8B) - * REG_3D_Texture1TransparencyColorLow (0x8AE8 - 0x8AEB) - */ -#define MASK_TextureTransparencyColorLowB 0x000000FF -#define MASK_TextureTransparencyColorLowG 0x0000FF00 -#define MASK_TextureTransparencyColorLowR 0x00FF0000 -#define MASK_TextureBlockHeight 0x07000000 -#define MASK_TextureBlockWidth 0x70000000 - -/* - * REG_3D_TextureTransparencyColorLow (0x8A8C - 0x8A8F) - * REG_3D_Texture1TransparencyColorLow (0x8AEC - 0x8AEF) - */ -#define MASK_TextureBorderColorB 0x000000FF -#define MASK_TextureBorderColorG 0x0000FF00 -#define MASK_TextureBorderColorR 0x00FF0000 -#define MASK_TextureBorderColorA 0xFF000000 - -/* - * REG_3D_TexturePitch0-10 (0x8AC0 - 0x8AD7) - * REG_3D_Texture1Pitch0-10 (0x8B20 - 0x8B37) - */ -#define MASK_TexturePitchOdd 0x000003FF -#define MASK_TexturePitchEven 0x03FF0000 -#define SHIFT_TexturePitchEven 16 - -/* - * REG_3D_TextureColorBlendSet0 (0x8B40 - 0x8B43) - * REG_3D_TextureColorBlendSet1 (0x8B44 - 0x8B46) - * REG_3D_TextureAlphaBlendSet0 (0x8B40 - 0x8B43) - * REG_3D_TextureAlphaBlendSet1 (0x8B44 - 0x8B46) - */ -#define STAGE0_C_CF 0xa1485000 -#define STAGE0_C_CS 0xc1485000 -#define STAGE0_C_CFCS 0xa1705000 -#define STAGE0_C_CFOMAS_CSAS 0xc534c001 -#define STAGE0_C_CFOMCS_CCCS 0x4530c001 - -#define STAGE0_A_AF 0x63230000 -#define STAGE0_A_AS 0xc3230000 -#define STAGE0_A_AFAS 0x63c30000 -#define STAGE0_A_AFOMAS_ACAS 0x46c60001 - -#define STAGE1_C_CF 0xa1485000 -#define STAGE1_C_CS 0xe1485000 -#define STAGE1_C_CFCS 0xa1785000 -#define STAGE1_C_CFOMAS_CSAS 0xe5394001 -#define STAGE1_C_CFOMCS_CCCS 0x45394001 - -#define STAGE1_A_AF 0xa3230000 -#define STAGE1_A_AS 0xe3230000 -#define STAGE1_A_AFAS 0xa3e30000 -#define STAGE1_A_AFOMAS_ACAS 0x4aea0001 - -/* What registers are these associated with? */ -#define MASK_BMMemoryInSystem 0x00000080 -#define MASK_BMHeight 0x00000F00 -#define MASK_BMWidth 0x0000F000 -#define MASK_BMFilter 0x00010000 -#define MASK_BMMappingMode 0x007E0000 -#define MASK_BMFormat 0x07800000 -#define MASK_BMTxBumpmap 0x08000000 - -#define MASK_BMAddress 0xFFFFFFFC - -#define MASK_BMOffset 0xFF800000 -#define MASK_BMScale 0x007FE000 -#define MASK_BMPitch 0x00001FFF - -#define MASK_BMMatrix00 0x000007FF -#define MASK_BMMatrix01 0x07FF0000 -#define MASK_BMMatrix10 0x000007FF -#define MASK_BMMatrix11 0x07FF0000 - -#define MASK_TextureRealInSystem 0x00000001 -#define MASK_TextureDowngrade 0x00000002 - -#define ALPHA_BUFFER_FORMAT_1 0x00000000 -#define ALPHA_BUFFER_FORMAT_2 0x10000000 -#define ALPHA_BUFFER_FORMAT_4 0x20000000 -#define ALPHA_BUFFER_FORMAT_8 0x30000000 - -#endif diff --git a/hw/kdrive/sis300/sis_stub.c b/hw/kdrive/sis300/sis_stub.c deleted file mode 100644 index bce7d02d2..000000000 --- a/hw/kdrive/sis300/sis_stub.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright © 2003 Eric Anholt - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Eric Anholt not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Eric Anholt makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "sis.h" -#include "klinux.h" - -extern struct pci_id_entry sis_pci_ids[]; - -void -InitCard(char *name) -{ - struct pci_id_entry *id; - KdCardAttr attr; - - for (id = sis_pci_ids; id->name != NULL; id++) { - int j = 0; - while (LinuxFindPci(id->vendor, id->device, j++, &attr)) - KdCardInfoAdd(&SiSFuncs, &attr, 0); - } -} - -void -InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) -{ - KdInitOutput(pScreenInfo, argc, argv); -} - -void -InitInput(int argc, char **argv) -{ - KdOsAddInputDrivers(); - KdInitInput(); -} - -void -ddxUseMsg (void) -{ - KdUseMsg(); -#ifdef KDRIVEVESA - vesaUseMsg(); -#endif -} - -int -ddxProcessArgument(int argc, char **argv, int i) -{ - int ret; - -#ifdef KDRIVEVESA - if (!(ret = vesaProcessArgument (argc, argv, i))) -#endif - ret = KdProcessArgument(argc, argv, i); - - return ret; -} diff --git a/hw/kdrive/sis530/sis.c b/hw/kdrive/sis530/sis.c deleted file mode 100644 index e1deb3b28..000000000 --- a/hw/kdrive/sis530/sis.c +++ /dev/null @@ -1,921 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "sis.h" - -#define MAX_FB_SIZE (4096 * 1024) - -#define MMIO_SIZE (64 * 1024) - -int sisMemoryTable[8] = { - 1, 2, 4, 0, 0, 2, 4, 8 -}; - -Bool -sisCardInit (KdCardInfo *card) -{ - SisCardInfo *sisc; - SisPtr sis; - int size; - CARD8 *registers; - CARD8 *temp_buffer; - CARD8 save_sr5; - - sisc = (SisCardInfo *) xalloc (sizeof (SisCardInfo)); - if (!sisc) - goto bail0; - - sisc->io_base = card->attr.io; - /* - * enable access to SiS ports (no MMIO available) - */ - iopl(3); - save_sr5 = GetSrtc(sisc,0x5); - if (save_sr5 != 0x21) - save_sr5 = 0x86; - PutSrtc(sisc,0x5,0x86); -#if 0 - { - int i; - - for (i = 0; i <= 0x3f; i++) - fprintf (stderr, "SR%02x = %02x\n", i, GetSrtc(sisc,i)); - } -#endif - sisc->memory = sisMemoryTable[GetSrtc(sisc,0xc)&0x7] * 1024 * 1024; - - PutSrtc(sisc,0x5,save_sr5); - - if (!sisc->memory) - { - ErrorF ("Can't detect SiS530 frame buffer\n"); - goto bail1; - } - - /* - * Map frame buffer and MMIO registers - */ - sisc->frameBuffer = KdMapDevice (card->attr.address[0], sisc->memory); - if (!sisc->frameBuffer) - goto bail1; - - sisc->registers = KdMapDevice (card->attr.address[1], MMIO_SIZE); - if (!sisc->registers) - goto bail2; - - /* - * Offset from base of MMIO to registers - */ - sisc->sis = (SisPtr) (sisc->registers + SIS_MMIO_OFFSET); - sisc->cpu_bitblt = (VOL32 *) sisc->registers; - - card->driver = sisc; - - return TRUE; -bail2: - KdUnmapDevice (sisc->frameBuffer, sisc->memory); -bail1: - xfree (sisc); -bail0: - return FALSE; -} - -Bool -sisModeSupported (KdScreenInfo *screen, const KdMonitorTiming *t) -{ - if (t->horizontal != 1600 && - t->horizontal != 1280 && - t->horizontal != 1152 && - t->horizontal != 1024 && - t->horizontal != 800 && - t->horizontal != 640) - return FALSE; - return TRUE; -} - -Bool -sisModeUsable (KdScreenInfo *screen) -{ - KdCardInfo *card = screen->card; - SisCardInfo *sisc = (SisCardInfo *) card->driver; - SisScreenInfo *siss; - int i; - KdMonitorTiming *t; - CARD32 memory; - int byte_width, pixel_width, screen_size; - - if (screen->fb[0].depth >= 24) - { - screen->fb[0].depth = 24; - screen->fb[0].bitsPerPixel = 24; - screen->dumb = TRUE; - } - else if (screen->fb[0].depth >= 16) - { - screen->fb[0].depth = 16; - screen->fb[0].bitsPerPixel = 16; - } - else if (screen->fb[0].depth >= 15) - { - screen->fb[0].depth = 15; - screen->fb[0].bitsPerPixel = 16; - } - else - { - screen->fb[0].depth = 8; - screen->fb[0].bitsPerPixel = 8; - } - byte_width = screen->width * (screen->fb[0].bitsPerPixel >> 3); - pixel_width = screen->width; - screen->fb[0].pixelStride = pixel_width; - screen->fb[0].byteStride = byte_width; - - screen_size = byte_width * screen->height; - - return screen_size <= sisc->memory; -} - -Bool -sisScreenInit (KdScreenInfo *screen) -{ - KdCardInfo *card = screen->card; - SisCardInfo *sisc = (SisCardInfo *) card->driver; - SisScreenInfo *siss; - int i; - const KdMonitorTiming *t; - CARD32 memory; - int byte_width, pixel_width, screen_size; - - siss = (SisScreenInfo *) xalloc (sizeof (SisScreenInfo)); - if (!siss) - return FALSE; - - memset (siss, '\0', sizeof (SisScreenInfo)); - - if (!screen->width || !screen->height) - { - screen->width = 800; - screen->height = 600; - screen->rate = 72; - } - if (!screen->fb[0].depth) - screen->fb[0].depth = 8; - - t = KdFindMode (screen, sisModeSupported); - - screen->rate = t->rate; - screen->width = t->horizontal; - screen->height = t->vertical; - - if (!KdTuneMode (screen, sisModeUsable, sisModeSupported)) - { - xfree (sisc); - return FALSE; - } - - memory = sisc->memory - screen_size; - - screen->fb[0].frameBuffer = sisc->frameBuffer; - - /* - * Cursor lives in the last 16k of memory - */ - if (memory >= 16384 && !screen->softCursor) - { - siss->cursor_base = sisc->frameBuffer + (sisc->memory - 16384); - siss->cursor_off = siss->cursor_base - sisc->frameBuffer; - memory -= 16384; - } - else - { - screen->softCursor = TRUE; - siss->cursor_base = 0; - siss->cursor_off = 0; - } - - if (memory > 8192) - { - siss->expand = screen->fb[0].frameBuffer + screen_size; - siss->expand_off = siss->expand - sisc->frameBuffer; - siss->expand_len = memory; - memory = 0; - } - else - { - siss->expand = 0; - siss->expand_len = 0; - } - - switch (screen->fb[0].depth) { - case 8: - screen->fb[0].visuals = ((1 << StaticGray) | - (1 << GrayScale) | - (1 << StaticColor) | - (1 << PseudoColor) | - (1 << TrueColor) | - (1 << DirectColor)); - screen->fb[0].blueMask = 0x00; - screen->fb[0].greenMask = 0x00; - screen->fb[0].redMask = 0x00; - break; - case 15: - screen->fb[0].visuals = (1 << TrueColor); - screen->fb[0].blueMask = 0x001f; - screen->fb[0].greenMask = 0x03e0; - screen->fb[0].redMask = 0x7c00; - break; - case 16: - screen->fb[0].visuals = (1 << TrueColor); - screen->fb[0].blueMask = 0x001f; - screen->fb[0].greenMask = 0x07e0; - screen->fb[0].redMask = 0xf800; - break; - case 24: - screen->fb[0].visuals = (1 << TrueColor); - screen->fb[0].blueMask = 0x0000ff; - screen->fb[0].greenMask = 0x00ff00; - screen->fb[0].redMask = 0xff0000; - break; - } - - screen->driver = siss; - - return TRUE; -} - -static void -_sisGetCrtc (SisCardInfo *sisc, SisCrtc *crtc) -{ - crtc->misc_output = _sisInb(sisc->io_base+0x4c); - crtc->h_total_0_7 = GetCrtc (sisc, 0x00); - crtc->h_display_end_0_7 = GetCrtc (sisc, 0x01); - crtc->h_blank_start_0_7 = GetCrtc (sisc, 0x02); - crtc->_h_blank_end = GetCrtc (sisc, 0x03); - crtc->h_sync_start_0_7 = GetCrtc (sisc, 0x04); - crtc->_h_sync_end = GetCrtc (sisc, 0x05); - crtc->v_total_0_7 = GetCrtc (sisc, 0x06); - crtc->crtc_overflow = GetCrtc (sisc, 0x07); - crtc->preset_row_scan = GetCrtc (sisc, 0x08); - crtc->_max_scan_line = GetCrtc (sisc, 0x09); - crtc->cursor_start = GetCrtc (sisc, 0x0a); - crtc->cursor_end = GetCrtc (sisc, 0x0a); - crtc->start_address_8_15 = GetCrtc (sisc, 0x0c); - crtc->start_address_0_7 = GetCrtc (sisc, 0x0d); - crtc->text_cursor_15_8 = GetCrtc (sisc, 0x0e); - crtc->text_cursor_7_0 = GetCrtc (sisc, 0x0f); - crtc->v_retrace_start_0_7 = GetCrtc (sisc, 0x10); - crtc->_v_retrace_end = GetCrtc (sisc, 0x11); - crtc->v_display_end_0_7 = GetCrtc (sisc, 0x12); - crtc->screen_off_0_7 = GetCrtc (sisc, 0x13); - crtc->_underline_location = GetCrtc (sisc, 0x14); - crtc->v_blank_start_0_7 = GetCrtc (sisc, 0x15); - crtc->v_blank_end_0_7 = GetCrtc (sisc, 0x16); - crtc->crtc_mode = GetCrtc (sisc, 0x17); - - crtc->line_compare_0_7 = GetCrtc (sisc, 0x18); - - crtc->mode_control = GetArtc (sisc, 0x10); - crtc->screen_border_color = GetArtc (sisc, 0x11); - crtc->enable_color_plane = GetArtc (sisc, 0x12); - crtc->horizontal_pixel_pan = GetArtc (sisc, 0x13); - - crtc->mode_register = GetGrtc (sisc, 0x5); - crtc->misc_register = GetGrtc (sisc, 0x6); - crtc->color_dont_care = GetGrtc (sisc, 0x7); - - crtc->clock_mode = GetSrtc (sisc, 0x1); - crtc->color_plane_w_enable = GetSrtc (sisc, 0x2); - crtc->memory_mode = GetSrtc (sisc, 0x4); - - crtc->graphics_mode = GetSrtc (sisc, 0x6); - crtc->misc_control_0 = GetSrtc (sisc, 0x7); - crtc->crt_cpu_threshold_control_0 = GetSrtc (sisc, 0x8); - crtc->crt_cpu_threshold_control_1 = GetSrtc (sisc, 0x9); - crtc->extended_crt_overflow = GetSrtc (sisc, 0xa); - crtc->misc_control_1 = GetSrtc (sisc, 0xb); - crtc->misc_control_2 = GetSrtc (sisc, 0xc); - - crtc->ddc_and_power_control = GetSrtc (sisc, 0x11); - crtc->extended_horizontal_overflow = GetSrtc (sisc, 0x12); - crtc->extended_clock_generator = GetSrtc (sisc, 0x13); - crtc->cursor_0_red = GetSrtc (sisc, 0x14); - crtc->cursor_0_green = GetSrtc (sisc, 0x15); - crtc->cursor_0_blue = GetSrtc (sisc, 0x16); - crtc->cursor_1_red = GetSrtc (sisc, 0x17); - crtc->cursor_1_green = GetSrtc (sisc, 0x18); - crtc->cursor_1_blue = GetSrtc (sisc, 0x19); - crtc->cursor_h_start_0_7 = GetSrtc (sisc, 0x1a); - crtc->cursor_h_start_1 = GetSrtc (sisc, 0x1b); - crtc->cursor_h_preset_0_5 = GetSrtc (sisc, 0x1c); - crtc->cursor_v_start_0_7 = GetSrtc (sisc, 0x1d); - crtc->cursor_v_start_1 = GetSrtc (sisc, 0x1e); - crtc->cursor_v_preset_0_5 = GetSrtc (sisc, 0x1f); - crtc->linear_base_19_26 = GetSrtc (sisc, 0x20); - crtc->linear_base_1 = GetSrtc (sisc, 0x21); - - crtc->graphics_engine_0 = GetSrtc (sisc, 0x26); - crtc->graphics_engine_1 = GetSrtc (sisc, 0x27); - crtc->internal_mclk_0 = GetSrtc (sisc, 0x28); - crtc->internal_mclk_1 = GetSrtc (sisc, 0x29); - crtc->internal_vclk_0 = GetSrtc (sisc, 0x2A); - crtc->internal_vclk_1 = GetSrtc (sisc, 0x2B); - - crtc->misc_control_7 = GetSrtc (sisc, 0x38); - - crtc->misc_control_11 = GetSrtc (sisc, 0x3E); - crtc->misc_control_12 = GetSrtc (sisc, 0x3F); -} - -static void -_sisSetBlank (SisCardInfo *sisc, Bool blank) -{ - CARD8 clock; - - clock = GetSrtc (sisc, 0x01); - if (blank) - clock |= 0x20; - else - clock &= ~0x20; - PutSrtc (sisc, 0x01, clock); -} - -static void -_sisSetCrtc (SisCardInfo *sisc, SisCrtc *crtc) -{ - _sisSetBlank (sisc, TRUE); - PutCrtc (sisc, 0x00, crtc->h_total_0_7); - PutCrtc (sisc, 0x01, crtc->h_display_end_0_7); - PutCrtc (sisc, 0x02, crtc->h_blank_start_0_7); - PutCrtc (sisc, 0x03, crtc->_h_blank_end); - PutCrtc (sisc, 0x04, crtc->h_sync_start_0_7); - PutCrtc (sisc, 0x05, crtc->_h_sync_end); - PutCrtc (sisc, 0x06, crtc->v_total_0_7); - PutCrtc (sisc, 0x07, crtc->crtc_overflow); - PutCrtc (sisc, 0x08, crtc->preset_row_scan); - PutCrtc (sisc, 0x09, crtc->_max_scan_line); - PutCrtc (sisc, 0x0a, crtc->cursor_start); - PutCrtc (sisc, 0x0b, crtc->cursor_end); - PutCrtc (sisc, 0x0c, crtc->start_address_8_15); - PutCrtc (sisc, 0x0d, crtc->start_address_0_7); - PutCrtc (sisc, 0x0e, crtc->text_cursor_15_8); - PutCrtc (sisc, 0x0f, crtc->text_cursor_7_0); - PutCrtc (sisc, 0x10, crtc->v_retrace_start_0_7); - PutCrtc (sisc, 0x11, crtc->_v_retrace_end); - PutCrtc (sisc, 0x12, crtc->v_display_end_0_7); - PutCrtc (sisc, 0x13, crtc->screen_off_0_7); - PutCrtc (sisc, 0x14, crtc->_underline_location); - PutCrtc (sisc, 0x15, crtc->v_blank_start_0_7); - PutCrtc (sisc, 0x16, crtc->v_blank_end_0_7); - PutCrtc (sisc, 0x17, crtc->crtc_mode); - PutCrtc (sisc, 0x18, crtc->line_compare_0_7); - - PutArtc (sisc, 0x10, crtc->mode_control); - PutArtc (sisc, 0x11, crtc->screen_border_color); - PutArtc (sisc, 0x12, crtc->enable_color_plane); - PutArtc (sisc, 0x13, crtc->horizontal_pixel_pan); - - PutGrtc (sisc, 0x5, crtc->mode_register); - PutGrtc (sisc, 0x6, crtc->misc_register); - PutGrtc (sisc, 0x7, crtc->color_dont_care); - - PutSrtc (sisc, 0x1, crtc->clock_mode | 0x20); - PutSrtc (sisc, 0x2, crtc->color_plane_w_enable); - PutSrtc (sisc, 0x4, crtc->memory_mode); - - PutSrtc (sisc, 0x6, crtc->graphics_mode); - PutSrtc (sisc, 0x7, crtc->misc_control_0); - PutSrtc (sisc, 0x8, crtc->crt_cpu_threshold_control_0); - PutSrtc (sisc, 0x9, crtc->crt_cpu_threshold_control_1); - PutSrtc (sisc, 0xa, crtc->extended_crt_overflow); - PutSrtc (sisc, 0xb, crtc->misc_control_1); - PutSrtc (sisc, 0xc, crtc->misc_control_2); - - PutSrtc (sisc, 0x11, crtc->ddc_and_power_control); - PutSrtc (sisc, 0x12, crtc->extended_horizontal_overflow); - PutSrtc (sisc, 0x13, crtc->extended_clock_generator); - PutSrtc (sisc, 0x14, crtc->cursor_0_red); - PutSrtc (sisc, 0x15, crtc->cursor_0_green); - PutSrtc (sisc, 0x16, crtc->cursor_0_blue); - PutSrtc (sisc, 0x17, crtc->cursor_1_red); - PutSrtc (sisc, 0x18, crtc->cursor_1_green); - PutSrtc (sisc, 0x19, crtc->cursor_1_blue); - PutSrtc (sisc, 0x1a, crtc->cursor_h_start_0_7); - PutSrtc (sisc, 0x1b, crtc->cursor_h_start_1); - PutSrtc (sisc, 0x1c, crtc->cursor_h_preset_0_5); - PutSrtc (sisc, 0x1d, crtc->cursor_v_start_0_7); - PutSrtc (sisc, 0x1e, crtc->cursor_v_start_1); - PutSrtc (sisc, 0x1f, crtc->cursor_v_preset_0_5); - PutSrtc (sisc, 0x20, crtc->linear_base_19_26); - PutSrtc (sisc, 0x21, crtc->linear_base_1); - - PutSrtc (sisc, 0x26, crtc->graphics_engine_0); - PutSrtc (sisc, 0x27, crtc->graphics_engine_1); - PutSrtc (sisc, 0x28, crtc->internal_mclk_0); - PutSrtc (sisc, 0x29, crtc->internal_mclk_1); - PutSrtc (sisc, 0x2A, crtc->internal_vclk_0); - PutSrtc (sisc, 0x2B, crtc->internal_vclk_1); - - PutSrtc (sisc, 0x38, crtc->misc_control_7); - - PutSrtc (sisc, 0x3E, crtc->misc_control_11); - PutSrtc (sisc, 0x3F, crtc->misc_control_12); - -#if 0 - PutCrtc (sisc, 0x5b, 0x27); - PutCrtc (sisc, 0x5c, 0xe1); - PutCrtc (sisc, 0x5d, 0x00); - - PutSrtc (sisc, 0x5a, 0xe6); - PutSrtc (sisc, 0x5d, 0xa1); - PutSrtc (sisc, 0x9a, 0xe6); - PutSrtc (sisc, 0x9d, 0xa1); - PutSrtc (sisc, 0xda, 0xe6); - PutSrtc (sisc, 0xdd, 0x6c); -#endif - - _sisOutb(crtc->misc_output, sisc->io_base+0x42); - - outw (0x3c4, 0x0100); - outw (0x3c4, 0x0300); - - _sisSetBlank (sisc, FALSE); -} - -CARD8 -_sisReadIndexRegister (CARD32 base, CARD8 index) -{ - CARD8 ret; - - _sisOutb (index, base); - ret = _sisInb (base+1); - return ret; -} - -void -_sisWriteIndexRegister (CARD32 base, CARD8 index, CARD8 value) -{ - _sisOutb (index, base); - _sisOutb (value, base+1); -} - -CARD8 -_sisReadArtc (CARD32 base, CARD8 index) -{ - CARD8 ret; - - _sisInb (base+0x1a); - _sisOutb (index,base); - ret = _sisInb (base+1); - _sisInb (base+0x1a); - _sisOutb (0x20,base); - return ret; -} - -void -_sisWriteArtc (CARD32 base, CARD8 index, CARD8 value) -{ - _sisInb (base+0x1a); - _sisOutb (index|0x20,base); - _sisOutb (value,base); - _sisInb (base+0x1a); - _sisOutb (0x20,base); -} - -void -sisPreserve (KdCardInfo *card) -{ - SisCardInfo *sisc = card->driver; - CARD8 *r = sisc->registers; - int a, i, l; - CARD8 line[16]; - CARD8 prev[16]; - BOOL gotone; - - sisc->save.sr5 = GetSrtc(sisc,0x5); - if (sisc->save.sr5 != 0x21) - sisc->save.sr5 = 0x86; - /* unlock extension registers */ - PutSrtc(sisc,0x5,0x86); - /* unlock CRTC registers */ - PutCrtc(sisc,0x11,GetCrtc(sisc,0x11)&~0x80); - /* enable vga */ - _sisOutb(0x1,sisc->io_base+0x43); - - /* enable MMIO access to registers */ - sisc->save.srb = GetSrtc(sisc,0xb); - PutSrtc(sisc, 0xb, sisc->save.srb | 0x60); - _sisGetCrtc (sisc, &sisc->save.crtc); - memcpy (sisc->save.text_save, sisc->frameBuffer, SIS_TEXT_SAVE); -} - -Bool -sisEnable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - KdCardInfo *card = pScreenPriv->card; - SisCardInfo *sisc = card->driver; - SisScreenInfo *siss = screen->driver; - const KdMonitorTiming *t; - SisCrtc crtc; - unsigned long pixel; - - int hactive; - int hblank; - int hfp; - int hbp; - - int vactive; - int vblank; - int vfp; - int vbp; - - int h_total; - int h_display_end; - int h_blank_start; - int h_blank_end; - int h_sync_start; - int h_sync_end; - int h_screen_off; - - int h_adjust; - - int v_total; - int v_retrace_start; - int v_retrace_end; - int v_display_end; - int v_blank_start; - int v_blank_end; - - crtc = sisc->save.crtc; - - t = KdFindMode (screen, sisModeSupported); - - /* CR9 */ - crtc.max_scan_line = 0; - - /* CRA */ - crtc.cursor_start = 0; - - /* CRB */ - crtc.cursor_end = 0; - - /* CRE */ - crtc.text_cursor_15_8 = 0; - - /* CRF */ - crtc.text_cursor_7_0 = 0; - - /* CR11 */ - crtc.disable_v_retrace_int = 1; - - /* CR14 */ - crtc.underline_location = 0; - crtc.count_by_four = 0; - crtc.doubleword_mode = 1; - - /* 3CC/3C2 */ - crtc.io_address_select = 1; - crtc.display_ram_enable = 1; - crtc.clock_select = 3; - - /* SR1 */ - crtc.clock_mode = 0; - crtc.dot_clock_8_9 = 1; - - /* SR2 */ - crtc.color_plane_w_enable = 0xf; - - /* SR4 */ - crtc.memory_mode = 0; - crtc.chain_4_enable = 1; - crtc.odd_even_disable = 1; - crtc.extended_memory_sz = 1; - - /* SR6 */ - crtc.graphics_mode_linear = 1; - crtc.enhanced_graphics_mode = 1; - - /* SR9 */ - crtc.crt_cpu_threshold_control_1 = 0; - - /* SRB */ -#if 0 - crtc.cpu_bitblt_enable = 1; -#endif - crtc.memory_mapped_mode = 3; - - /* SRC */ - crtc.graphics_mode_32bit_enable = 1; - crtc.read_ahead_enable = 1; - - /* SR11 */ - crtc.acpi_enable = 0; - crtc.kbd_cursor_activate = 0; - crtc.video_memory_activate = 0; - crtc.vga_standby = 0; - crtc.vga_suspend = 0; - - crtc.cursor_0_red = 0x3f; - crtc.cursor_0_green = 0x3f; - crtc.cursor_0_blue = 0x3f; - - /* SR20 */ - crtc.linear_base_19_26 = (card->attr.address[0] & 0x07f80000) >> 19; - - /* SR21 */ - crtc.linear_base_27_31 = (card->attr.address[0] & 0xf8000000) >> 27; - crtc.linear_aperture = SIS_LINEAR_APERTURE_4M; - - /* SR27 */ - crtc.logical_screen_width = 3; - crtc.graphics_prog_enable = 1; - - /* SR38 */ - crtc.extended_clock_select = 0; - - /* AR10 */ - crtc.mode_control = 0; - crtc.graphics_mode_enable = 1; - /* AR11 */ - crtc.screen_border_color = 0; - /* AR12 */ - crtc.enable_color_plane = 0xf; - /* AR13 */ - crtc.horizontal_pixel_pan = 0; - - /* GR5 */ - crtc.mode_register = 0; - - /* GR6 */ - crtc.graphics_enable = 1; - crtc.chain_odd_even = 0; - crtc.memory_address_select = 1; - - /* GR7 */ - crtc.color_dont_care = 0xf; - if (siss->cursor_base) - { - crtc_set_cursor_start_addr (&crtc, siss->cursor_off); - crtc.graphics_mode_hw_cursor = 0; - } - - hactive = t->horizontal; - hblank = t->hblank; - hbp = t->hbp; - hfp = t->hfp; - - vactive = t->vertical; - vblank = t->vblank; - vbp = t->vbp; - vfp = t->vfp; - - pixel = (hactive + hblank) * (vactive + vblank) * t->rate; - - switch (screen->fb[0].bitsPerPixel) { - case 8: - hactive /= 8; - hblank /= 8; - hfp /= 8; - hbp /= 8; - - crtc.color_mode_256 = 1; - h_screen_off = hactive; - h_adjust = 1; - - break; - case 16: - hactive /= 8; - hblank /= 8; - hfp /= 8; - hbp /= 8; - - h_screen_off = hactive * 2; - h_adjust = 1; - - crtc.color_mode_256 = 0; - - if (screen->fb[0].depth == 15) - crtc.graphics_mode_32k = 1; - else - crtc.graphics_mode_64k = 1; - break; - case 24: - hactive /= 8; - hblank /= 8; - hfp /= 8; - hbp /= 8; - - h_screen_off = hactive * 3; - h_adjust = 1; - - crtc.color_mode_256 = 0; - - /* SR6 */ - crtc.graphics_mode_true = 1; - /* SR7 */ - crtc.direct_color_24bit = 0; - /* SR9 */ - crtc.true_color_32bpp = 0; - /* SRB */ - crtc.true_color_order = 1; - break; - case 32: - hactive /= 8; - hblank /= 8; - hfp /= 8; - hbp /= 8; - - h_screen_off = hactive * 4; - h_adjust = 1; - - crtc.color_mode_256 = 0; - - /* SR6 */ - crtc.graphics_mode_true = 1; - /* SR7 */ - crtc.direct_color_24bit = 0; - /* SR9 */ - crtc.true_color_32bpp = 1; - /* SRB */ - crtc.true_color_order = 1; - break; - } - - sisGetClock (pixel, &crtc); - - crtc.high_speed_dac_0 = crtc.high_speed_dac_1 = pixel > 135000000; - - sisEngThresh (&crtc, pixel, screen->fb[0].bitsPerPixel); - - /* - * Compute horizontal register values from timings - */ - h_total = hactive + hblank - 5; - h_display_end = hactive - 1; - h_blank_start = h_display_end; - h_blank_end = h_blank_start + hblank; - - h_sync_start = hactive + hfp + h_adjust; - h_sync_end = h_sync_start + hblank - hbp - hfp; - - crtc_set_h_total(&crtc, h_total); - crtc_set_h_display_end (&crtc, h_display_end); - crtc_set_h_blank_start (&crtc, h_blank_start); - crtc_set_h_blank_end (&crtc, h_blank_end); - crtc_set_h_sync_start (&crtc, h_sync_start); - crtc_set_h_sync_end (&crtc, h_sync_end); - crtc_set_screen_off (&crtc, h_screen_off); - - v_total = vactive + vblank - 2; - v_retrace_start = vactive + vfp - 1; - v_retrace_end = v_retrace_start + vblank - vbp - vfp; - v_display_end = vactive - 1; - v_blank_start = vactive - 1; - v_blank_end = v_blank_start + vblank /* - 1 */; - - crtc_set_v_total(&crtc, v_total); - crtc_set_v_retrace_start (&crtc, v_retrace_start); - crtc.v_retrace_end_0_3 = v_retrace_end; - crtc_set_v_display_end (&crtc, v_display_end); - crtc_set_v_blank_start (&crtc, v_blank_start); - crtc.v_blank_end_0_7 = v_blank_end; - -#if 0 - crtc.h_blank_start_0_7 = 0x6a; - crtc._h_blank_end = 0x9a; - crtc.h_sync_start_0_7 = 0x6b; - crtc._h_sync_end = 0x9a; - - crtc.v_retrace_start_0_7 = 0x7d; - crtc._v_retrace_end = 0x23; - crtc.v_blank_start_0_7 = 0x7d; - crtc.v_blank_end_0_7 = 0x84; - - crtc.crt_cpu_threshold_control_0 = 0xdf; /* SR8 */ - crtc.crt_cpu_threshold_control_1 = 0x00; /* SR9 */ - crtc.extended_clock_generator = 0x40; /* SR13 */ - - crtc.cursor_h_start_0_7 = 0x83; - crtc.cursor_v_start_0_7 = 0x6c; - - crtc.internal_vclk_0 = 0x68; - crtc.internal_vclk_1 = 0xc4; - crtc.misc_control_7 = 0x70; -#endif - - _sisSetCrtc (sisc, &crtc); - return TRUE; -} - -Bool -sisDPMS (ScreenPtr pScreen, int mode) -{ - KdScreenPriv(pScreen); - sisCardInfo(pScreenPriv); - union ddc_and_power_control_u _ddc_and_power_control_u; - - ddc_and_power_control = sisc->save.crtc.ddc_and_power_control; - - kbd_cursor_activate = 0; - video_memory_activate = 0; - vga_standby = 0; - vga_suspend = 0; - acpi_enable = 0; - switch (mode) { - case KD_DPMS_NORMAL: - break; - case KD_DPMS_STANDBY: - vga_standby = 1; - break; - case KD_DPMS_SUSPEND: - vga_suspend = 1; - break; - case KD_DPMS_POWERDOWN: - acpi_enable = 1; - break; - } - PutSrtc (sisc, 0x11, ddc_and_power_control); - return TRUE; -} - -void -sisDisable (ScreenPtr pScreen) -{ -} - -void -sisRestore (KdCardInfo *card) -{ - SisCardInfo *sisc = (SisCardInfo *) card->driver; - - memcpy (sisc->frameBuffer, sisc->save.text_save, SIS_TEXT_SAVE); - _sisSetCrtc (sisc, &sisc->save.crtc); - PutSrtc (sisc, 0xb, sisc->save.srb); - PutSrtc (sisc, 0x5, sisc->save.sr5); -} - -void -sisScreenFini (KdScreenInfo *screen) -{ - SisScreenInfo *siss = (SisScreenInfo *) screen->driver; - - xfree (siss); - screen->driver = 0; -} - -void -sisCardFini (KdCardInfo *card) -{ - SisCardInfo *sisc = (SisCardInfo *) card->driver; - - KdUnmapDevice (sisc->frameBuffer, sisc->memory); - KdUnmapDevice (sisc->registers, sizeof (SisRec)); -} - -KdCardFuncs sisFuncs = { - sisCardInit, - sisScreenInit, - 0, - sisPreserve, - sisEnable, - sisDPMS, - sisDisable, - sisRestore, - sisScreenFini, - sisCardFini, - sisCursorInit, - sisCursorEnable, - sisCursorDisable, - sisCursorFini, - 0, - sisDrawInit, - sisDrawEnable, - sisDrawSync, - sisDrawDisable, - sisDrawFini, - sisGetColors, - sisPutColors, -}; diff --git a/hw/kdrive/sis530/sis.h b/hw/kdrive/sis530/sis.h deleted file mode 100644 index 194c33c02..000000000 --- a/hw/kdrive/sis530/sis.h +++ /dev/null @@ -1,1215 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _SIS_H_ -#define _SIS_H_ -#include "kdrive.h" -#include -#include -#include -#include -#include - -/* - * Linear Addressing 000 0000 - 0ff ffff (16m) - * Image data transfer 100 0000 - 100 7fff (32k) - * Empty 100 8000 - 100 81ff - * MMIO registers 100 8200 - 100 8480 - * - * We don't care about the image transfer or PCI regs, so - * this structure starts at the MMIO regs - */ - -typedef volatile CARD32 VOL32; -typedef volatile CARD16 VOL16; -typedef volatile CARD8 VOL8; - -#define SIS_MMIO_OFFSET 0x8200 - -typedef struct _sis530General { - VOL32 src_base; /* 8200 */ - VOL16 src_pitch; /* 8204 */ - VOL16 _pad0; /* 8206 */ - VOL16 src_y; /* 8208 */ - VOL16 src_x; /* 820a */ - VOL16 dst_y; /* 820c */ - VOL16 dst_x; /* 820e */ - VOL32 dst_base; /* 8210 */ - VOL16 dst_pitch; /* 8214 */ - VOL16 dst_height; /* 8216 */ - VOL16 rect_width; /* 8218 */ - VOL16 rect_height; /* 821a */ - VOL32 pattern_fg; /* 821c */ - VOL32 pattern_bg; /* 8220 */ - VOL32 src_fg; /* 8224 */ - VOL32 src_bg; /* 8228 */ - VOL8 mask[8]; /* 822c */ - VOL16 clip_left; /* 8234 */ - VOL16 clip_top; /* 8236 */ - VOL16 clip_right; /* 8238 */ - VOL16 clip_bottom; /* 823a */ - VOL32 command; /* 823c */ - VOL32 status; /* 8240 */ - VOL8 _pad1[0xbc]; /* 8244 */ - VOL8 pattern[256]; /* 8300 */ - /* 8400 */ -} SisGeneral; - -typedef struct _sis530Line { - VOL8 _pad0[8]; /* 8200 */ - VOL16 x0; /* 8208 */ - VOL16 y0; /* 820a */ - VOL16 x1; /* 820c */ - VOL16 y1; /* 820e */ - VOL32 dst_base; /* 8210 */ - VOL16 dst_pitch; /* 8214 */ - VOL16 dst_height; /* 8216 */ - VOL16 count; /* 8218 */ - VOL16 style_period; /* 821a */ - VOL32 fg; /* 821c */ - VOL32 bg; /* 8220 */ - VOL8 _pad1[8]; /* 8224 */ - VOL32 style0; /* 822c */ - VOL32 style1; /* 8228 */ - VOL16 clip_left; /* 8234 */ - VOL16 clip_top; /* 8236 */ - VOL16 clip_right; /* 8238 */ - VOL16 clip_bottom; /* 823a */ - VOL32 command; /* 823c */ - VOL32 status; /* 8240 */ - VOL8 _pad2[0xbc]; /* 8244 */ - struct { - VOL16 x; - VOL16 y; - } data[96]; /* 8300 */ - /* 8480 */ -} SisLine; - -typedef struct _sis530Transparent { - VOL32 src_base; /* 8200 */ - VOL16 src_pitch; /* 8204 */ - VOL16 _pad0; /* 8206 */ - VOL16 src_y; /* 8208 */ - VOL16 src_x; /* 820a */ - VOL16 dst_y; /* 820c */ - VOL16 dst_x; /* 820e */ - VOL32 dst_base; /* 8210 */ - VOL16 dst_pitch; /* 8214 */ - VOL16 dst_height; /* 8216 */ - VOL16 rect_width; /* 8218 */ - VOL16 rect_height; /* 821a */ - VOL32 dst_key_high; /* 821c */ - VOL32 dst_key_low; /* 8220 */ - VOL32 src_key_high; /* 8224 */ - VOL32 src_key_low; /* 8228 */ - VOL8 _pad1[8]; /* 822c */ - VOL16 clip_left; /* 8234 */ - VOL16 clip_top; /* 8236 */ - VOL16 clip_right; /* 8238 */ - VOL16 clip_bottom; /* 823a */ - VOL32 command; /* 823c */ - VOL32 status; /* 8240 */ - /* 8244 */ -} SisTransparent; - -typedef struct _sis530Multiple { - VOL8 _pad0[8]; /* 8200 */ - VOL16 count; /* 8208 */ - VOL16 y; /* 820a */ - VOL16 x0_start; /* 820c */ - VOL16 x0_end; /* 820e */ - VOL32 dst_base; /* 8210 */ - VOL16 dst_pitch; /* 8214 */ - VOL16 dst_height; /* 8216 */ - VOL8 _pad1[4]; /* 8218 */ - VOL32 fg; /* 821c */ - VOL32 bg; /* 8220 */ - VOL8 _pad2[8]; /* 8224 */ - VOL8 mask[8]; /* 822c */ - VOL16 clip_left; /* 8234 */ - VOL16 clip_top; /* 8236 */ - VOL16 clip_right; /* 8238 */ - VOL16 clip_bottom; /* 823a */ - VOL32 command; /* 823c */ - VOL32 status; /* 8240 */ - VOL16 x1_start; /* 8244 */ - VOL16 x1_end; /* 8246 */ - VOL8 _pad3[0xb8]; /* 8248 */ - VOL8 pattern[64]; /* 8300 */ - struct { - VOL16 x_start; - VOL16 y_end; - } data[80]; /* 8340 */ - /* 8480 */ -} SisMultiple; - -typedef struct _sis530Trapezoid { - VOL8 _pad0[8]; /* 8200 */ - VOL16 height; /* 8208 */ - VOL16 y; /* 820a */ - VOL16 left_x; /* 820c */ - VOL16 right_x; /* 820e */ - VOL32 dst_base; /* 8210 */ - VOL16 dst_pitch; /* 8214 */ - VOL16 dst_height; /* 8216 */ - VOL8 _pad1[4]; /* 8218 */ - VOL32 fg; /* 821c */ - VOL32 bg; /* 8220 */ - VOL8 _pad2[8]; /* 8224 */ - VOL8 mask[8]; /* 822c */ - VOL16 clip_left; /* 8234 */ - VOL16 clip_top; /* 8236 */ - VOL16 clip_right; /* 8238 */ - VOL16 clip_bottom; /* 823a */ - VOL32 command; /* 823c */ - VOL32 status; /* 8240 */ - VOL16 left_dx; /* 8244 */ - VOL16 left_dy; /* 8246 */ - VOL16 right_dx; /* 8248 */ - VOL16 right_dy; /* 824a */ - VOL32 left_error; /* 824c */ - VOL32 right_error; /* 8250 */ - /* 8254 */ -} SisTrapezoid; - -typedef struct _sisAccel { - VOL8 pad[0x80]; /* 8200 */ - VOL32 src_addr; /* 8280 */ - VOL32 dst_addr; /* 8284 */ - VOL32 pitch; /* 8288 */ - VOL32 dimension; /* 828c */ - VOL32 fg; /* 8290 */ - VOL32 bg; /* 8294 */ - - - VOL32 clip_ul; /* 82a0 */ - VOL32 clip_br; /* 82a4 */ - - VOL16 cmd; /* 82aa */ - - VOL8 pattern[256]; /* 82ac */ - -} SisAccel; - -typedef struct _sis530 { - union { - SisGeneral general; - SisLine line; - SisTransparent transparent; - SisMultiple multiple; - SisTrapezoid trapezoid; - SisAccel accel; - } u; -} SisRec, *SisPtr; - -typedef struct _sisCursor { - int width, height; - int xhot, yhot; - Bool has_cursor; - CursorPtr pCursor; -} SisCursor; - -#define SIS_CURSOR_WIDTH 64 -#define SIS_CURSOR_HEIGHT 64 - -typedef struct _sisClock { - CARD32 vclk_numerator; - BOOL vclk_divide_by_2; - CARD32 vclk_denominator; - CARD32 vclk_post_scale; - BOOL vclk_post_scale_2; - BOOL high_speed_dac; -} SisClockRec, *SisClockPtr; - -typedef struct _crtc { - - union { - struct { - CARD8 _io_address_select : 1; - CARD8 _display_ram_enable : 1; - CARD8 _clock_select : 2; - CARD8 : 1; - CARD8 _odd_even_page : 1; - CARD8 _h_sync_polarity : 1; - CARD8 _v_sync_polarity : 1; - } _misc_output_s; - CARD8 _misc_output; - } _misc_output_u; /* 3CC/3C2 */ - -#define misc_output _misc_output_u._misc_output -#define io_address_select _misc_output_u._misc_output_s._io_address_select -#define display_ram_enable _misc_output_u._misc_output_s._display_ram_enable -#define clock_select _misc_output_u._misc_output_s._clock_select -#define odd_even_page _misc_output_u._misc_output_s._odd_even_page -#define h_sync_polarity _misc_output_u._misc_output_s._h_sync_polarity -#define v_sync_polarity _misc_output_u._misc_output_s._v_sync_polarity - - CARD8 h_total_0_7; /* CR0 */ - CARD8 h_display_end_0_7; /* CR1 */ - CARD8 h_blank_start_0_7; /* CR2 */ - union { - struct { - CARD8 _h_blank_end_0_4 : 5; - CARD8 _display_skew : 2; - CARD8 : 1; - } _h_blank_end_s; - CARD8 __h_blank_end; /* CR3 */ - } _h_blank_end_u; -#define h_blank_end_0_4 _h_blank_end_u._h_blank_end_s._h_blank_end_0_4 -#define display_skew _h_blank_end_u._h_blank_end_s._display_skew -#define _h_blank_end _h_blank_end_u.__h_blank_end - - CARD8 h_sync_start_0_7; /* CR4 */ - - union { - struct { - CARD8 _h_sync_end_0_4 : 5; - CARD8 _horizontal_skew : 2; - CARD8 _h_blank_end_5 : 1; - } _h_sync_end_s; - CARD8 __h_sync_end; /* CR5 */ - } _h_sync_end_u; - -#define h_sync_end_0_4 _h_sync_end_u._h_sync_end_s._h_sync_end_0_4 -#define horizontal_skew _h_sync_end_u._h_sync_end_s._horizontal_skew -#define h_blank_end_5 _h_sync_end_u._h_sync_end_s._h_blank_end_5 -#define _h_sync_end _h_sync_end_u.__h_sync_end - - CARD8 v_total_0_7; /* CR6 */ - - union { - struct { - CARD8 _v_total_8 : 1; - CARD8 _v_display_end_8 : 1; - CARD8 _v_retrace_start_8 : 1; - CARD8 _v_blank_start_8 : 1; - CARD8 _line_compare_8 : 1; - CARD8 _v_total_9 : 1; - CARD8 _v_display_end_9 : 1; - CARD8 _v_retrace_start_9 : 1; - } _crtc_overflow_s; - CARD8 _crtc_overflow; /* CR7 */ - } _crtc_overflow_u; - -#define v_total_8 _crtc_overflow_u._crtc_overflow_s._v_total_8 -#define v_display_end_8 _crtc_overflow_u._crtc_overflow_s._v_display_end_8 -#define v_retrace_start_8 _crtc_overflow_u._crtc_overflow_s._v_retrace_start_8 -#define v_blank_start_8 _crtc_overflow_u._crtc_overflow_s._v_blank_start_8 -#define line_compare_8 _crtc_overflow_u._crtc_overflow_s._line_compare_8 -#define v_total_9 _crtc_overflow_u._crtc_overflow_s._v_total_9 -#define v_display_end_9 _crtc_overflow_u._crtc_overflow_s._v_display_end_9 -#define v_retrace_start_9 _crtc_overflow_u._crtc_overflow_s._v_retrace_start_9 -#define crtc_overflow _crtc_overflow_u._crtc_overflow - - CARD8 preset_row_scan; /* CR8 (unused) */ - - union { - struct { - CARD8 ___max_scan_line : 5; - CARD8 _v_blank_start_9 : 1; - CARD8 _line_compare_9 : 1; - CARD8 _double_scan : 1; - } _max_scan_line_s; - CARD8 __max_scan_line; /* CR9 */ - } _max_scan_line_u; - -#define max_scan_line _max_scan_line_u._max_scan_line_s.___max_scan_line -#define v_blank_start_9 _max_scan_line_u._max_scan_line_s._v_blank_start_9 -#define line_compare_9 _max_scan_line_u._max_scan_line_s._line_compare_9 -#define double_scan _max_scan_line_u._max_scan_line_s._double_scan -#define _max_scan_line _max_scan_line_u.__max_scan_line - - CARD8 cursor_start; /* CRA */ - CARD8 cursor_end; /* CRB */ - - CARD8 start_address_8_15; /* CRC */ - CARD8 start_address_0_7; /* CRD */ - - CARD8 text_cursor_15_8; /* CRE */ - CARD8 text_cursor_7_0; /* CRF */ - - CARD8 cursor_loc_high; - CARD8 cursor_loc_low; - - CARD8 v_retrace_start_0_7; /* CR10 */ - union { - struct { - CARD8 _v_retrace_end_0_3 : 4; - CARD8 _clear_v_retrace_int : 1; - CARD8 _disable_v_retrace_int : 1; - CARD8 _refresh_cycle_select : 1; - CARD8 _lock_crtc : 1; - } _v_retrace_end_s; - CARD8 __v_retrace_end; /* CR11 */ - } _v_retrace_end_u; - -#define v_retrace_end_0_3 _v_retrace_end_u._v_retrace_end_s._v_retrace_end_0_3 -#define clear_v_retrace_int _v_retrace_end_u._v_retrace_end_s._clear_v_retrace_int -#define disable_v_retrace_int _v_retrace_end_u._v_retrace_end_s._disable_v_retrace_int -#define refresh_cycle_select _v_retrace_end_u._v_retrace_end_s._refresh_cycle_select -#define lock_crtc _v_retrace_end_u._v_retrace_end_s._lock_crtc -#define _v_retrace_end _v_retrace_end_u.__v_retrace_end - - CARD8 v_display_end_0_7; /* CR12 */ - - CARD8 screen_off_0_7; /* CR13 */ - - union { - struct { - CARD8 ___underline_location : 5; - CARD8 _count_by_four : 1; - CARD8 _doubleword_mode : 1; - CARD8 : 1; - } _underline_location_s; - CARD8 __underline_location; /* CR14 */ - } _underline_location_u; - -#define underline_location _underline_location_u._underline_location_s.___underline_location -#define count_by_four _underline_location_u._underline_location_s._count_by_four -#define doubleword_mode _underline_location_u._underline_location_s._doubleword_mode -#define _underline_location _underline_location_u.__underline_location - - CARD8 v_blank_start_0_7; /* CR15 */ - CARD8 v_blank_end_0_7; /* CR16 */ - - union { - struct { - CARD8 _two_bk_cga : 1; - CARD8 _four_bk_cga : 1; - CARD8 _v_total_double : 1; - CARD8 _count_by_two : 1; - CARD8 : 1; - CARD8 _address_wrap : 1; - CARD8 _byte_mode : 1; - CARD8 _hardware_reset : 1; - } _crtc_mode_s; - CARD8 _crtc_mode; /* CR17 */ - } _crtc_mode_u; - -#define crtc_mode _crtc_mode_u._crtc_mode -#define two_bk_cga _crtc_mode_u._crtc_mode_s._two_bk_cga -#define four_bk_cga _crtc_mode_u._crtc_mode_s._four_bk_cga -#define v_total_double _crtc_mode_u._crtc_mode_s._v_total_double -#define count_by_two _crtc_mode_u._crtc_mode_s._count_by_two -#define address_wrap _crtc_mode_u._crtc_mode_s._address_wrap -#define byte_mode _crtc_mode_u._crtc_mode_s._byte_mode -#define hardware_reset _crtc_mode_u._crtc_mode_s._hardware_reset - - CARD8 line_compare_0_7; /* CR18 (unused) */ - - union { - struct { - CARD8 _graphics_mode_enable : 1; - CARD8 _attribute_byte_mda : 1; - CARD8 _line_graphics_enable : 1; - CARD8 _background_blink : 1; - CARD8 : 1; - CARD8 _pel_panning_compat : 1; - CARD8 _pixel_clock_double : 1; - CARD8 p4_p5_source_select : 1; - } _mode_control_s; - CARD8 _mode_control; - } _mode_control_u; /* AR10 */ - -#define mode_control _mode_control_u._mode_control -#define graphics_mode_enable _mode_control_u._mode_control_s._graphics_mode_enable -#define pixel_clock_double _mode_control_u._mode_control_s._pixel_clock_double - - CARD8 screen_border_color; /* AR11 */ - CARD8 enable_color_plane; /* AR12 */ - CARD8 horizontal_pixel_pan; /* AR13 */ - - union { - struct { - CARD8 _write_mode : 2; - CARD8 : 1; - CARD8 _read_mode : 1; - CARD8 _odd_even_addressing : 1; - CARD8 _shift_register_mode : 1; - CARD8 _color_mode_256 : 1; - CARD8 : 1; - } _mode_register_s; - CARD8 _mode_register; - } _mode_register_u; /* GR5 */ - -#define mode_register _mode_register_u._mode_register -#define color_mode_256 _mode_register_u._mode_register_s._color_mode_256 -#define odd_even_addressing _mode_register_u._mode_register_s._odd_even_addressing - - union { - struct { - CARD8 _graphics_enable : 1; - CARD8 _chain_odd_even : 1; - CARD8 _memory_address_select : 2; - CARD8 : 4; - } _misc_register_s; - CARD8 _misc_register; - } _misc_register_u; /* GR6 */ - -#define misc_register _misc_register_u._misc_register -#define graphics_enable _misc_register_u._misc_register_s._graphics_enable -#define chain_odd_even _misc_register_u._misc_register_s._chain_odd_even -#define memory_address_select _misc_register_u._misc_register_s._memory_address_select - - CARD8 color_dont_care; /* GR7 */ - - union { - struct { - CARD8 _dot_clock_8_9 : 1; - CARD8 : 1; - CARD8 _shifter_load_16 : 1; - CARD8 _dot_clock_divide_2 : 1; - CARD8 _shifter_load_32 : 1; - CARD8 _display_off : 1; - CARD8 : 2; - } _clock_mode_s; - CARD8 _clock_mode; - } _clock_mode_u; /* SR1 */ - -#define clock_mode _clock_mode_u._clock_mode -#define dot_clock_8_9 _clock_mode_u._clock_mode_s._dot_clock_8_9 -#define shifter_load_16 _clock_mode_u._clock_mode_s._shifter_load_16 -#define dot_clock_divide_2 _clock_mode_u._clock_mode_s._dot_clock_divide_2 -#define shifter_load_32 _clock_mode_u._clock_mode_s._shifter_load_32 -#define display_off _clock_mode_u._clock_mode_s._display_off - - CARD8 color_plane_w_enable; /* SR2 */ - - union { - struct { - CARD8 : 1; - CARD8 _extended_memory_size : 1; - CARD8 _odd_even_disable : 1; - CARD8 _chain_4_enable : 1; - CARD8 : 4; - } _memory_mode_s; - CARD8 _memory_mode; - } _memory_mode_u; /* SR4 */ - -#define memory_mode _memory_mode_u._memory_mode -#define extended_memory_sz _memory_mode_u._memory_mode_s._extended_memory_size -#define odd_even_disable _memory_mode_u._memory_mode_s._odd_even_disable -#define chain_4_enable _memory_mode_u._memory_mode_s._chain_4_enable - - union { - struct { - CARD8 _enhanced_text_mode : 1; - CARD8 _enhanced_graphics_mode : 1; - CARD8 _graphics_mode_32k : 1; - CARD8 _graphics_mode_64k : 1; - CARD8 _graphics_mode_true : 1; - CARD8 _graphics_mode_interlaced: 1; - CARD8 _graphics_mode_hw_cursor: 1; - CARD8 _graphics_mode_linear : 1; - } _graphics_mode_s; - CARD8 _graphics_mode; - } _graphics_mode_u; /* SR6 */ - -#define graphics_mode _graphics_mode_u._graphics_mode -#define enhanced_text_mode _graphics_mode_u._graphics_mode_s._enhanced_text_mode -#define enhanced_graphics_mode _graphics_mode_u._graphics_mode_s._enhanced_graphics_mode -#define graphics_mode_32k _graphics_mode_u._graphics_mode_s._graphics_mode_32k -#define graphics_mode_64k _graphics_mode_u._graphics_mode_s._graphics_mode_64k -#define graphics_mode_true _graphics_mode_u._graphics_mode_s._graphics_mode_true -#define graphics_mode_interlaced _graphics_mode_u._graphics_mode_s._graphics_mode_interlaced -#define graphics_mode_hw_cursor _graphics_mode_u._graphics_mode_s._graphics_mode_hw_cursor -#define graphics_mode_linear _graphics_mode_u._graphics_mode_s._graphics_mode_linear - - union { - struct { - CARD8 _external_dac_reference : 1; - CARD8 _high_speed_dac_0 : 1; - CARD8 _direct_color_24bit : 1; - CARD8 _multi_line_prefetch : 1; - CARD8 _extended_video_div_2 : 1; - CARD8 _ramdac_power_save : 1; - CARD8 : 1; - CARD8 _merge_video_fifo : 1; - } _misc_control_0_s; - CARD8 _misc_control_0; - } _misc_control_0_u; /* SR7 */ - -#define misc_control_0 _misc_control_0_u._misc_control_0 -#define external_dac_reference _misc_control_0_u._misc_control_0_s._external_dac_reference -#define high_speed_dac_0 _misc_control_0_u._misc_control_0_s._high_speed_dac_0 -#define direct_color_24bit _misc_control_0_u._misc_control_0_s._direct_color_24bit -#define multi_line_prefetch _misc_control_0_u._misc_control_0_s._multi_line_prefetch -#define extended_video_div_2 _misc_control_0_u._misc_control_0_s._extended_video_div_2 -#define ramdac_power_save _misc_control_0_u._misc_control_0_s._ramdac_power_save -#define merge_video_fifo _misc_control_0_u._misc_control_0_s._merge_video_fifo - - union { - struct { - CARD8 _crt_engine_threshold_high_0_3 : 4; - CARD8 _crt_cpu_threshold_low_0_3 : 4; - } _crt_cpu_threshold_control_0_s; - CARD8 _crt_cpu_threshold_control_0; - } _crt_cpu_threshold_control_0_u; /* SR8 */ - -#define crt_cpu_threshold_control_0 _crt_cpu_threshold_control_0_u._crt_cpu_threshold_control_0 -#define crt_engine_threshold_high_0_3 _crt_cpu_threshold_control_0_u._crt_cpu_threshold_control_0_s._crt_engine_threshold_high_0_3 -#define crt_cpu_threshold_low_0_3 _crt_cpu_threshold_control_0_u._crt_cpu_threshold_control_0_s._crt_cpu_threshold_low_0_3 - - union { - struct { - CARD8 _crt_cpu_threshold_high_0_3 : 4; - CARD8 _ascii_attribute_threshold_0_2 : 3; - CARD8 _true_color_32bpp : 1; - } _crt_cpu_threshold_control_1_s; - CARD8 _crt_cpu_threshold_control_1; - } _crt_cpu_threshold_control_1_u; /* SR9 */ - -#define crt_cpu_threshold_control_1 _crt_cpu_threshold_control_1_u._crt_cpu_threshold_control_1 -#define crt_cpu_threshold_high_0_3 _crt_cpu_threshold_control_1_u._crt_cpu_threshold_control_1_s._crt_cpu_threshold_high_0_3 -#define ascii_attribute_threshold_0_2 _crt_cpu_threshold_control_1_u._crt_cpu_threshold_control_1_s._ascii_attribute_threshold_0_2 -#define true_color_32bpp _crt_cpu_threshold_control_1_u._crt_cpu_threshold_control_1_s._true_color_32bpp - - union { - struct { - CARD8 _v_total_10 : 1; - CARD8 _v_display_end_10 : 1; - CARD8 _v_blank_start_10 : 1; - CARD8 _v_retrace_start_10 : 1; - CARD8 _screen_off_8_11 : 4; - } _extended_crt_overflow_s; - CARD8 _extended_crt_overflow; - } _extended_crt_overflow_u; /* SRA */ - -#define extended_crt_overflow _extended_crt_overflow_u._extended_crt_overflow -#define v_total_10 _extended_crt_overflow_u._extended_crt_overflow_s._v_total_10 -#define v_display_end_10 _extended_crt_overflow_u._extended_crt_overflow_s._v_display_end_10 -#define v_blank_start_10 _extended_crt_overflow_u._extended_crt_overflow_s._v_blank_start_10 -#define v_retrace_start_10 _extended_crt_overflow_u._extended_crt_overflow_s._v_retrace_start_10 -#define screen_off_8_11 _extended_crt_overflow_u._extended_crt_overflow_s._screen_off_8_11 - - union { - struct { - CARD8 _cpu_bitblt_enable : 1; /* enable CPU bitblt */ - CARD8 _packed_16_color_enable : 1; /* 2 pixels per byte? */ - CARD8 _io_gating : 1; /* when write buffer not empty */ - CARD8 _dual_segment_enable : 1; /* ? */ - CARD8 _true_color_modulation : 1; /* ? */ - CARD8 _memory_mapped_mode : 2; /* mmio enable */ - CARD8 _true_color_order : 1; /* 0: RGB 1: BGR */ - } _misc_control_1_s; - CARD8 _misc_control_1; /* SRB */ - } _misc_control_1_u; - -#define misc_control_1 _misc_control_1_u._misc_control_1 -#define cpu_bitblt_enable _misc_control_1_u._misc_control_1_s._cpu_bitblt_enable -#define memory_mapped_mode _misc_control_1_u._misc_control_1_s._memory_mapped_mode -#define true_color_modulation _misc_control_1_u._misc_control_1_s._true_color_modulation -#define true_color_order _misc_control_1_u._misc_control_1_s._true_color_order - - union { - struct { - CARD8 _sync_reset_enable : 1; - CARD8 _memory_configuration : 3; -#define SIS_MEMORY_CONFIG_1M_1BANK 0 -#define SIS_MEMORY_CONFIG_2M_2BANK 1 -#define SIS_MEMORY_CONFIG_4M_2BANK 2 -#define SIS_MEMORY_CONFIG_2M_1BANK 5 -#define SIS_MEMORY_CONFIG_4M_1BANK 6 -#define SIS_MEMORY_CONFIG_8M_2BANK 7 - CARD8 _test_mode_enable : 1; - CARD8 _read_ahead_enable : 1; - CARD8 _text_mode_16bit_enable : 1; - CARD8 _graphics_mode_32bit_enable : 1; - } _misc_control_2_s; - CARD8 _misc_control_2; - } _misc_control_2_u; /* SRC */ - -#define misc_control_2 _misc_control_2_u._misc_control_2 -#define sync_reset_enable _misc_control_2_u._misc_control_2_s._sync_reset_enable -#define memory_configuration _misc_control_2_u._misc_control_2_s._memory_configuration -#define test_mode_enable _misc_control_2_u._misc_control_2_s._test_mode_enable -#define read_ahead_enable _misc_control_2_u._misc_control_2_s._read_ahead_enable -#define text_mode_16bit_enable _misc_control_2_u._misc_control_2_s._text_mode_16bit_enable -#define graphics_mode_32bit_enable _misc_control_2_u._misc_control_2_s._graphics_mode_32bit_enable - - union ddc_and_power_control_u { - struct { - CARD8 _ddc_clk_programming : 1; - CARD8 _ddc_data_programming : 1; - CARD8 : 1; - CARD8 _acpi_enable : 1; - CARD8 _kbd_cursor_activate : 1; - CARD8 _video_memory_activate : 1; - CARD8 _vga_standby : 1; - CARD8 _vga_suspend : 1; - } _ddc_and_power_control_s; - CARD8 _ddc_and_power_control; - } _ddc_and_power_control_u; /* SR11 */ - -#define ddc_and_power_control _ddc_and_power_control_u._ddc_and_power_control -#define ddc_clk_programming _ddc_and_power_control_u._ddc_and_power_control_s._ddc_clk_programming -#define ddc_data_programming _ddc_and_power_control_u._ddc_and_power_control_s._ddc_data_programming -#define acpi_enable _ddc_and_power_control_u._ddc_and_power_control_s._acpi_enable -#define kbd_cursor_activate _ddc_and_power_control_u._ddc_and_power_control_s._kbd_cursor_activate -#define video_memory_activate _ddc_and_power_control_u._ddc_and_power_control_s._video_memory_activate -#define vga_standby _ddc_and_power_control_u._ddc_and_power_control_s._vga_standby -#define vga_suspend _ddc_and_power_control_u._ddc_and_power_control_s._vga_suspend - - union { - struct { - CARD8 _h_total_8 : 1; - CARD8 _h_display_end_8 : 1; - CARD8 _h_blank_start_8 : 1; - CARD8 _h_sync_start_8 : 1; - CARD8 _h_blank_end_6 : 1; - CARD8 _h_retrace_skew : 3; - } _extended_horizontal_overflow_s; - CARD8 _extended_horizontal_overflow; - } _extended_horizontal_overflow_u; /* SR12 */ -#define extended_horizontal_overflow _extended_horizontal_overflow_u._extended_horizontal_overflow -#define h_total_8 _extended_horizontal_overflow_u._extended_horizontal_overflow_s._h_total_8 -#define h_display_end_8 _extended_horizontal_overflow_u._extended_horizontal_overflow_s._h_display_end_8 -#define h_blank_start_8 _extended_horizontal_overflow_u._extended_horizontal_overflow_s._h_blank_start_8 -#define h_sync_start_8 _extended_horizontal_overflow_u._extended_horizontal_overflow_s._h_sync_start_8 -#define h_blank_end_6 _extended_horizontal_overflow_u._extended_horizontal_overflow_s._h_blank_end_6 -#define h_retrace_skew _extended_horizontal_overflow_u._extended_horizontal_overflow_s._h_retrace_skew - - union { - struct { - CARD8 : 6; - CARD8 _vclk_post_scale_2 : 1; - CARD8 _mclk_post_scale_2 : 1; - } _extended_clock_generator_s; - CARD8 _extended_clock_generator; - } _extended_clock_generator_u; /* SR13 */ - -#define extended_clock_generator _extended_clock_generator_u._extended_clock_generator -#define vclk_post_scale_2 _extended_clock_generator_u._extended_clock_generator_s._vclk_post_scale_2 -#define mclk_post_scale_2 _extended_clock_generator_u._extended_clock_generator_s._mclk_post_scale_2 - - CARD8 cursor_0_red; /* SR14 */ - CARD8 cursor_0_green; /* SR15 */ - CARD8 cursor_0_blue; /* SR16 */ - - CARD8 cursor_1_red; /* SR17 */ - CARD8 cursor_1_green; /* SR18 */ - CARD8 cursor_1_blue; /* SR19 */ - - CARD8 cursor_h_start_0_7; /* SR1A */ - union { - struct { - CARD8 _cursor_h_start_8_11 : 4; - CARD8 : 3; - CARD8 _cursor_mmio_enable : 1; - } _cusor_h_start_1_s; - CARD8 _cursor_h_start_1; - } _cursor_h_start_1_u; /* SR1B */ - -#define cursor_h_start_1 _cursor_h_start_1_u._cursor_h_start_1 -#define cursor_h_start_8_11 _cursor_h_start_1_u._cursor_h_start_1_s._cursor_h_start_8_11 - - CARD8 cursor_h_preset_0_5; /* SR1C */ - - CARD8 cursor_v_start_0_7; /* SR1D */ - - union { - struct { - CARD8 _cursor_v_start_8_10 : 3; - CARD8 _cursor_side_pattern : 1; - CARD8 _cursor_pattern : 4; - } _cusor_v_start_1_s; - CARD8 _cursor_v_start_1; - } _cursor_v_start_1_u; /* SR1E */ - -#define cursor_v_start_1 _cursor_v_start_1_u._cursor_v_start_1 - - CARD8 cursor_v_preset_0_5; /* SR1F */ - - CARD8 linear_base_19_26; /* SR20 */ - - union { - struct { - CARD8 _linear_base_27_31 : 5; - CARD8 _linear_aperture : 3; -#define SIS_LINEAR_APERTURE_512K 0 -#define SIS_LINEAR_APERTURE_1M 1 -#define SIS_LINEAR_APERTURE_2M 2 -#define SIS_LINEAR_APERTURE_4M 3 -#define SIS_LINEAR_APERTURE_8M 4 - } _linear_base_1_s; - CARD8 _linear_base_1; - } _linear_base_1_u; /* SR21 */ - -#define linear_base_1 _linear_base_1_u._linear_base_1 -#define linear_base_27_31 _linear_base_1_u._linear_base_1_s._linear_base_27_31 -#define linear_aperture _linear_base_1_u._linear_base_1_s._linear_aperture - - union { - struct { - CARD8 _screen_start_addr_20 : 1; - CARD8 : 3; - CARD8 _continuous_mem_access : 1; - CARD8 : 1; - CARD8 _power_down_dac : 1; - CARD8 : 1; - } _graphics_engine_0_s; - CARD8 _graphics_engine_0; - } _graphics_engine_0_u; /* SR26 */ - -#define graphics_engine_0 _graphics_engine_0_u._graphics_engine_0 - - - union { - struct { - CARD8 _screen_start_addr_16_19: 4; - CARD8 _logical_screen_width : 2; -#define SIS_LOG_SCREEN_WIDTH_1024 0 -#define SIS_LOG_SCREEN_WIDTH_2048 1 -#define SIS_LOG_SCREEN_WIDTH_4096 2 - CARD8 _graphics_prog_enable : 1; - CARD8 _turbo_queue_enable : 1; - } _graphics_engine_1_s; - CARD8 _graphics_engine_1; - } _graphics_engine_1_u; /* SR27 */ - -#define graphics_engine_1 _graphics_engine_1_u._graphics_engine_1 -#define screen_start_addr_16_19 _graphics_engine_1_u._graphics_engine_1_s._screen_start_addr_16_19 -#define logical_screen_width _graphics_engine_1_u._graphics_engine_1_s._logical_screen_width -#define graphics_prog_enable _graphics_engine_1_u._graphics_engine_1_s._graphics_prog_enable -#define turbo_queue_enable _graphics_engine_1_u._graphics_engine_1_s._turbo_queue_enable - - - union { - struct { - CARD8 _mclk_numerator : 7; - CARD8 _mclk_divide_by_2 : 1; - } _internal_mclk_0_s; - CARD8 _internal_mclk_0; - } _internal_mclk_0_u; /* SR28 */ - -#define internal_mclk_0 _internal_mclk_0_u._internal_mclk_0 -#define mclk_numerator _internal_mclk_0_u._internal_mclk_0_s._mclk_numerator -#define mclk_divide_by_2 _internal_mclk_0_u._internal_mclk_0_s._mclk_divide_by_2 - - union { - struct { - CARD8 _mclk_denominator : 5; - CARD8 _mclk_post_scale : 2; -#define SIS_MCLK_POST_SCALE_1 0 -#define SIS_MCLK_POST_SCALE_2 1 -#define SIS_MCLK_POST_SCALE_3 2 -#define SIS_MCLK_POST_SCALE_4 3 - CARD8 _mclk_vco_gain : 1; - } _internal_mclk_1_s; - CARD8 _internal_mclk_1; - } _internal_mclk_1_u; /* SR29 */ - -#define internal_mclk_1 _internal_mclk_1_u._internal_mclk_1 -#define mclk_denominator _internal_mclk_1_u._internal_mclk_1_s._mclk_denominator -#define mclk_post_scale _internal_mclk_1_u._internal_mclk_1_s._mclk_post_scale -#define mclk_vco_gain _internal_mclk_1_u._internal_mclk_1_s._mclk_vco_gain - - union { - struct { - CARD8 _vclk_numerator : 7; - CARD8 _vclk_divide_by_2 : 1; - } _internal_vclk_0_s; - CARD8 _internal_vclk_0; - } _internal_vclk_0_u; /* SR2A */ - -#define internal_vclk_0 _internal_vclk_0_u._internal_vclk_0 -#define vclk_numerator _internal_vclk_0_u._internal_vclk_0_s._vclk_numerator -#define vclk_divide_by_2 _internal_vclk_0_u._internal_vclk_0_s._vclk_divide_by_2 - - union { - struct { - CARD8 _vclk_denominator : 5; - CARD8 _vclk_post_scale : 2; -#define SIS_VCLK_POST_SCALE_1 0 -#define SIS_VCLK_POST_SCALE_2 1 -#define SIS_VCLK_POST_SCALE_3 2 -#define SIS_VCLK_POST_SCALE_4 3 - CARD8 _vclk_vco_gain : 1; - } _internal_vclk_1_s; - CARD8 _internal_vclk_1; - } _internal_vclk_1_u; /* SR2B */ - -#define internal_vclk_1 _internal_vclk_1_u._internal_vclk_1 -#define vclk_denominator _internal_vclk_1_u._internal_vclk_1_s._vclk_denominator -#define vclk_post_scale _internal_vclk_1_u._internal_vclk_1_s._vclk_post_scale -#define vclk_vco_gain _internal_vclk_1_u._internal_vclk_1_s._vclk_vco_gain - - union { - struct { - CARD8 _extended_clock_select : 2; -#define SIS_CLOCK_SELECT_INTERNAL 0 -#define SIS_CLOCK_SELECT_25MHZ 1 -#define SIS_CLOCK_SELECT_28MHZ 2 - CARD8 _disable_line_compare : 1; - CARD8 _disable_pci_read_t_o : 1; - CARD8 _cursor_start_addr_18_21: 4; - } _misc_control_7_s; - CARD8 _misc_control_7; - } _misc_control_7_u; /* SR38 */ - -#define misc_control_7 _misc_control_7_u._misc_control_7 -#define extended_clock_select _misc_control_7_u._misc_control_7_s._extended_clock_select -#define disable_line_compare _misc_control_7_u._misc_control_7_s._disable_line_compare -#define disable_pci_read_t_o _misc_control_7_u._misc_control_7_s._disable_pci_read_t_o -#define cursor_start_addr_18_21 _misc_control_7_u._misc_control_7_s._cursor_start_addr_18_21 - - union { - struct { - CARD8 _high_speed_dclk : 1; - CARD8 _sgram_block_write : 1; - CARD8 _cursor_start_addr_22 : 1; - CARD8 _dram_texture_read : 1; - CARD8 _sgram_16mb : 1; - CARD8 _agp_signal_delay : 2; - CARD8 _dclk_off : 1; - } _misc_control_11_s; - CARD8 _misc_control_11; - } _misc_control_11_u; /* SR3E */ - -#define misc_control_11 _misc_control_11_u._misc_control_11 -#define high_speed_dclk _misc_control_11_u._misc_control_11_s._high_speed_dclk -#define sgram_block_write _misc_control_11_u._misc_control_11_s.__sgram_block_write -#define cursor_start_addr_22 _misc_control_11_u._misc_control_11_s._cursor_start_addr_22 -#define dram_texture_read _misc_control_11_u._misc_control_11_s._dram_texture_read -#define sgram_16mb _misc_control_11_u._misc_control_11_s._sgram_16mb -#define agp_signal_delay _misc_control_11_u._misc_control_11_s._agp_signal_delay -#define dclk_off _misc_control_11_u._misc_control_11_s._dclk_off - - union { - struct { - CARD8 : 1; - CARD8 _flat_panel_low_enable : 1; - CARD8 _crt_cpu_threshold_low_4: 1; - CARD8 _crt_engine_threshold_high_4: 1; - CARD8 _crt_cpu_threshold_high_4 : 1; - CARD8 _crt_threshold_full_control : 2; -#define SIS_CRT_32_STAGE_THRESHOLD 0 -#define SIS_CRT_64_STAGE_THRESHOLD 1 -#define SIS_CRT_63_STAGE_THRESHOLD 2 -#define SIS_CRT_256_STAGE_THRESHOLD 3 - CARD8 _high_speed_dac_1 : 1; - } _misc_control_12_s; - CARD8 _misc_control_12; - } _misc_control_12_u; /* SR3F */ -#define misc_control_12 _misc_control_12_u._misc_control_12 -#define flat_panel_low_enable _misc_control_12_u._misc_control_12_s._flat_panel_low_enable -#define crt_cpu_threshold_low_4 _misc_control_12_u._misc_control_12_s._crt_cpu_threshold_low_4 -#define crt_engine_threshold_high_4 _misc_control_12_u._misc_control_12_s._crt_engine_threshold_high_4 -#define crt_cpu_threshold_high_4 _misc_control_12_u._misc_control_12_s._crt_cpu_threshold_high_4 -#define crt_threshold_full_control _misc_control_12_u._misc_control_12_s._crt_threshold_full_control -#define high_speed_dac_1 _misc_control_12_u._misc_control_12_s._high_speed_dac_1 - - /* computed values */ - CARD16 ge_screen_pitch; - CARD8 bits_per_pixel; - CARD8 depth; - CARD8 double_pixel_mode; - CARD16 pixel_width; -} SisCrtc; - -#define crtc_v_total(crtc) ((crtc)->v_total_0_7 | \ - ((crtc)->v_total_8 << 8) | \ - ((crtc)->v_total_9 << 9) | \ - ((crtc)->v_total_10 << 10)) - -#define crtc_set_v_total(crtc,v) { \ - ((crtc))->v_total_0_7 = (v); \ - ((crtc))->v_total_8 = (v) >> 8; \ - ((crtc))->v_total_9 = (v) >> 9; \ - ((crtc))->v_total_10 = (v) >> 10; \ -} - -#define crtc_v_display_end(crtc) ((crtc)->v_display_end_0_7 | \ - ((crtc)->v_display_end_8 << 8) | \ - ((crtc)->v_display_end_9 << 9) | \ - ((crtc)->v_display_end_10 << 10)) - -#define crtc_set_v_display_end(crtc,v) {\ - ((crtc))->v_display_end_0_7 = (v); \ - ((crtc))->v_display_end_8 = (v) >> 8; \ - ((crtc))->v_display_end_9 = (v) >> 9; \ - ((crtc))->v_display_end_10 = (v) >> 10; \ -} - -#define crtc_v_retrace_start(crtc) ((crtc)->v_retrace_start_0_7 | \ - ((crtc)->v_retrace_start_8 << 8) | \ - ((crtc)->v_retrace_start_9 << 9) | \ - ((crtc)->v_retrace_start_10 << 10)) - -#define crtc_set_v_retrace_start(crtc,v) {\ - ((crtc))->v_retrace_start_0_7 = (v); \ - ((crtc))->v_retrace_start_8 = (v) >> 8; \ - ((crtc))->v_retrace_start_9 = (v) >> 9; \ - ((crtc))->v_retrace_start_10 = (v) >> 10; \ -} - -#define crtc_v_blank_start(crtc) ((crtc)->v_blank_start_0_7 | \ - ((crtc)->v_blank_start_8 << 8) | \ - ((crtc)->v_blank_start_9 << 9) | \ - ((crtc)->v_blank_start_10 << 10)) - -#define crtc_set_v_blank_start(crtc,v) {\ - ((crtc))->v_blank_start_0_7 = (v); \ - ((crtc))->v_blank_start_8 = (v) >> 8; \ - ((crtc))->v_blank_start_9 = (v) >> 9; \ - ((crtc))->v_blank_start_10 = (v) >> 10; \ -} - -#define crtc_h_total(crtc) ((crtc)->h_total_0_7 | \ - ((crtc)->h_total_8 << 8)) - -#define crtc_set_h_total(crtc,v) {\ - ((crtc))->h_total_0_7 = (v); \ - ((crtc))->h_total_8 = (v) >> 8; \ -} - -#define crtc_h_display_end(crtc) ((crtc)->h_display_end_0_7 | \ - ((crtc)->h_display_end_8 << 8)) - -#define crtc_set_h_display_end(crtc,v) {\ - ((crtc))->h_display_end_0_7 = (v); \ - ((crtc))->h_display_end_8 = (v) >> 8; \ -} - -#define crtc_h_blank_start(crtc) ((crtc)->h_blank_start_0_7 | \ - ((crtc)->h_blank_start_8 << 8)) - -#define crtc_set_h_blank_start(crtc,v) {\ - ((crtc))->h_blank_start_0_7 = (v); \ - ((crtc))->h_blank_start_8 = (v) >> 8; \ -} - -#define crtc_h_blank_end(crtc) ((crtc)->h_blank_end_0_4 | \ - ((crtc)->h_blank_end_5 << 5)) - -#define crtc_set_h_blank_end(crtc,v) {\ - ((crtc))->h_blank_end_0_4 = (v); \ - ((crtc))->h_blank_end_5 = (v) >> 5; \ -} - -#define crtc_h_sync_start(crtc) ((crtc)->h_sync_start_0_7 | \ - ((crtc)->h_sync_start_8 << 8)) - -#define crtc_set_h_sync_start(crtc,v) {\ - ((crtc))->h_sync_start_0_7 = (v); \ - ((crtc))->h_sync_start_8 = (v) >> 8; \ -} - -#define crtc_h_sync_end(crtc) ((crtc)->h_sync_end_0_4) - -#define crtc_set_h_sync_end(crtc,v) {\ - ((crtc))->h_sync_end_0_4 = (v); \ -} - -#define crtc_screen_off(crtc) ((crtc)->screen_off_0_7 | \ - ((crtc)->screen_off_8_11 << 8)) - -#define crtc_set_screen_off(crtc,v) {\ - ((crtc))->screen_off_0_7 = (v); \ - ((crtc))->screen_off_8_11 = (v) >> 8; \ -} - -#define crtc_ge_screen_width(crtc) ((crtc)->ge_screen_width_0_1 | \ - ((crtc)->ge_screen_width_2 << 2)) - -#define crtc_set_ge_screen_width(crtc,v) { \ - (crtc)->ge_screen_width_0_1 = (v); \ - (crtc)->ge_screen_width_2 = (v) >> 2; \ -} - -#define crtc_h_start_fifo_fetch(crtc) ((crtc)->h_start_fifo_fetch_0_7 | \ - ((crtc)->h_start_fifo_fetch_8 << 8)) - -#define crtc_set_h_start_fifo_fetch(crtc,v) {\ - (crtc)->h_start_fifo_fetch_0_7 = (v); \ - (crtc)->h_start_fifo_fetch_8 = (v) >> 8; \ -} - -#define crtc_start_address(crtc) ((crtc)->start_address_0_7 | \ - ((crtc)->start_address_8_15 << 8) | \ - ((crtc)->start_address_16_19 << 16)) - -#define crtc_set_start_address(crtc,v) {\ - (crtc)->start_address_0_7 = (v); \ - (crtc)->start_address_8_15 = (v) >> 8; \ - (crtc)->start_address_16_19 = (v) >> 16; \ -} - -#define crtc_line_compare(crtc) ((crtc)->line_compare_0_7 | \ - ((crtc)->line_compare_8 << 8) | \ - ((crtc)->line_compare_9 << 9) | \ - ((crtc)->line_compare_10 << 10)) - -#define crtc_set_line_compare(crtc,v) { \ - ((crtc))->line_compare_0_7 = (v); \ - ((crtc))->line_compare_8 = (v) >> 8; \ - ((crtc))->line_compare_9 = (v) >> 9; \ - ((crtc))->line_compare_10 = (v) >> 10; \ -} - -#define crtc_set_cursor_start_addr(crtc,v) { \ - (crtc)->cursor_start_addr_18_21 = (v) >> 18; \ - (crtc)->cursor_start_addr_22 = (v) >> 22; \ -} - -#define _sisOutb(v,r) outb(v,r) -#define _sisInb(r) inb(r) - -#define SIS_DAC_INDEX_READ 0x47 -#define SIS_DAC_INDEX_WRITE 0x48 -#define SIS_DAC_DATA 0x49 - -#define GetCrtc(sisc,i) _sisReadIndexRegister ((sisc)->io_base+0x54,i) -#define PutCrtc(sisc,i,v) _sisWriteIndexRegister ((sisc)->io_base+0x54,i,v) - -#define GetSrtc(sisc,i) _sisReadIndexRegister ((sisc)->io_base+0x44,i) -#define PutSrtc(sisc,i,v) _sisWriteIndexRegister ((sisc)->io_base+0x44,i,v) - -#define GetArtc(sisc,i) _sisReadArtc ((sisc)->io_base+0x40,i) -#define PutArtc(sisc,i,v) _sisWriteArtc ((sisc)->io_base+0x40,i,v) - -#define GetGrtc(sisc,i) _sisReadIndexRegister ((sisc)->io_base+0x4e,i) -#define PutGrtc(sisc,i,v) _sisWriteIndexRegister ((sisc)->io_base+0x4e,i,v) - -#define _sisWaitVRetrace(sisc) - -#define LockSis(sisc) -#define UnlockSis(sisc) - -typedef struct _sisTiming { - /* label */ - int horizontal; - int vertical; - int rate; - /* horizontal timing */ - int hfp; /* front porch */ - int hbp; /* back porch */ - int hblank; /* blanking */ - /* vertical timing */ - int vfp; /* front porch */ - int vbp; /* back porch */ - int vblank; /* blanking */ -} SisTiming; - -#define SIS_TEXT_SAVE (64*1024) - -typedef struct _sisSave { - CARD8 srb; - CARD8 sr5; - SisCrtc crtc; - CARD8 text_save[SIS_TEXT_SAVE]; -} SisSave; - -typedef struct _sisCardInfo { - SisPtr sis; - int memory; - CARD8 *frameBuffer; - CARD8 *registers; - VOL32 *cpu_bitblt; - CARD32 io_base; - SisSave save; -} SisCardInfo; - -typedef struct _sisScreenInfo { - CARD8 *cursor_base; - CARD32 cursor_off; - CARD8 *expand; - CARD32 expand_off; - int expand_len; - SisCursor cursor; -} SisScreenInfo; - -#define getSisCardInfo(kd) ((SisCardInfo *) ((kd)->card->driver)) -#define sisCardInfo(kd) SisCardInfo *sisc = getSisCardInfo(kd) - -#define getSisScreenInfo(kd) ((SisScreenInfo *) ((kd)->screen->driver)) -#define sisScreenInfo(kd) SisScreenInfo *siss = getSisScreenInfo(kd) - -Bool sisCardInit (KdCardInfo *); -Bool sisScreenInit (KdScreenInfo *); -Bool sisEnable (ScreenPtr pScreen); -void sisDisable (ScreenPtr pScreen); -void sisFini (ScreenPtr pScreen); - -Bool sisCursorInit (ScreenPtr pScreen); -void sisCursorEnable (ScreenPtr pScreen); -void sisCursorDisable (ScreenPtr pScreen); -void sisCursorFini (ScreenPtr pScreen); -void sisRecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdefs); - -Bool sisDrawInit (ScreenPtr pScreen); -void sisDrawEnable (ScreenPtr pScreen); -void sisDrawSync (ScreenPtr pScreen); -void sisDrawDisable (ScreenPtr pScreen); -void sisDrawFini (ScreenPtr pScreen); - -void sisGetColors (ScreenPtr pScreen, int fb, int ndef, xColorItem *pdefs); -void sisPutColors (ScreenPtr pScreen, int fb, int ndef, xColorItem *pdefs); - -void SISInitCard (KdCardAttr *attr); - -CARD8 _sisReadIndexRegister (CARD32 base, CARD8 index); -void _sisWriteIndexRegister (CARD32 base, CARD8 index, CARD8 value); -CARD8 _sisReadArtc (CARD32 base, CARD8 index); -void _sisWriteArtc (CARD32 base, CARD8 index, CARD8 value); - -extern KdCardFuncs sisFuncs; - -/* - * sisclock.c - */ -void -sisGetClock (unsigned long clock, SisCrtc *crtc); - -void -sisEngThresh (SisCrtc *crtc, unsigned long vclk, int bpp); - -/* - * siscurs.c - */ - -Bool -sisCursorInit (ScreenPtr pScreen); - -void -sisCursorEnable (ScreenPtr pScreen); - -void -sisCursorDisable (ScreenPtr pScreen); - -void -sisCursorFini (ScreenPtr pScreen); - -/* sisdraw.c */ -Bool -sisDrawInit (ScreenPtr pScreen); - -void -sisDrawEnable (ScreenPtr pScreen); - -void -sisDrawDisable (ScreenPtr pScreen); - -void -sisDrawFini (ScreenPtr pScreen); - -#endif /* _SIS_H_ */ diff --git a/hw/kdrive/sis530/sisclock.c b/hw/kdrive/sis530/sisclock.c deleted file mode 100644 index f73cdac9d..000000000 --- a/hw/kdrive/sis530/sisclock.c +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "sis.h" -#include - -#define FREF 14318180 -#define MIN_VCO FREF -#define MAX_VCO 230000000 -#define MAX_PSN 0 /* no pre scaler for this chip */ -#define TOLERANCE 0.01 /* search smallest M and N in this tolerance */ -#define max_VLD 1 - -/* - * Compute clock values given target frequency - */ -void -sisGetClock (unsigned long clock, SisCrtc *crtc) -{ - unsigned char reg7, reg13, reg2a, reg2b; - int M, N, P, VLD; - - int bestM, bestN, bestP, bestPSN, bestVLD; - double bestError, abest = 42.0, bestFout; - - double Fvco, Fout; - double error, aerror; - - double target = (double) clock; - - int M_min = 2; - int M_max = 128; - - int low_N = 2; - int high_N = 32; - int PSN = 1; - - /* - * fd = fref*(Numerator/Denumerator)*(Divider/PostScaler) - * - * M = Numerator [1:128] - * N = DeNumerator [1:32] - * VLD = Divider (Vco Loop Divider) : divide by 1, 2 - * P = Post Scaler : divide by 1, 2, 3, 4 - * PSN = Pre Scaler (Reference Divisor Select) - * - * result in vclk[] - */ - - P = 1; - if (target < MAX_VCO / 2) - P = 2; - if (target < MAX_VCO / 3) - P = 3; - if (target < MAX_VCO / 4) - P = 4; - if (target < MAX_VCO / 6) - P = 6; - if (target < MAX_VCO / 8) - P = 8; - - Fvco = P * target; - - for (N = low_N; N <= high_N; N++) - { - double M_desired = Fvco / FREF * N; - - if (M_desired > M_max * max_VLD) - continue; - - if ( M_desired > M_max ) - { - M = (int)(M_desired / 2 + 0.5); - VLD = 2; - } - else - { - M = (int)(M_desired + 0.5); - VLD = 1; - } - - Fout = (double)FREF * (M * VLD)/(N * P); - error = (target - Fout) / target; - aerror = (error < 0) ? -error : error; - if (aerror < abest) - { - abest = aerror; - bestError = error; - bestM = M; - bestN = N; - bestP = P; - bestPSN = PSN; - bestVLD = VLD; - bestFout = Fout; - } - } - - crtc->vclk_numerator = bestM - 1; - crtc->vclk_divide_by_2 = bestVLD == 2; - - crtc->vclk_denominator = bestN - 1; - switch (bestP) { - case 1: - crtc->vclk_post_scale = SIS_VCLK_POST_SCALE_1; - crtc->vclk_post_scale_2 = 0; - break; - case 2: - crtc->vclk_post_scale = SIS_VCLK_POST_SCALE_2; - crtc->vclk_post_scale_2 = 0; - break; - case 3: - crtc->vclk_post_scale = SIS_VCLK_POST_SCALE_3; - crtc->vclk_post_scale_2 = 0; - break; - case 4: - crtc->vclk_post_scale = SIS_VCLK_POST_SCALE_4; - crtc->vclk_post_scale_2 = 0; - break; - case 6: - crtc->vclk_post_scale = SIS_VCLK_POST_SCALE_3; - crtc->vclk_post_scale_2 = 1; - break; - case 8: - crtc->vclk_post_scale = SIS_VCLK_POST_SCALE_4; - crtc->vclk_post_scale_2 = 1; - break; - } - - crtc->vclk_vco_gain = 1; - - /* - * Don't know how to set mclk for local frame buffer; for - * shared frame buffer, mclk is hardwired to bus speed (100MHz)? - */ -} - -sisCalcMclk (SisCrtc *crtc) -{ - int mclk, Numer, DeNumer; - double Divider, Scalar; - - Numer = crtc->mclk_numerator; - DeNumer = crtc->mclk_denominator; - Divider = crtc->mclk_divide_by_2 ? 2.0 : 1.0; - Scalar = 1.0; - if (crtc->mclk_post_scale_2) - { - switch (crtc->mclk_post_scale) { - case 2: - Scalar = 6.0; - break; - case 3: - Scalar = 8.0; - break; - } - } - else - { - switch (crtc->mclk_post_scale) { - case 0: - Scalar = 1.0; - break; - case 1: - Scalar = 2.0; - break; - case 2: - Scalar = 3.0; - break; - case 3: - Scalar = 4.0; - break; - } - } - - mclk = (int)(FREF*((double)(Numer+1)/(double)(DeNumer+1))*(Divider/Scalar)); - - return(mclk); -} - -#define UMA_FACTOR 60 -#define LFB_FACTOR 30 // Only if local frame buffer -#define SIS_SAYS_SO 0x1F // But how is the performance?? -#define CRT_ENG_THRESH 0x0F // But how is the performance?? -#define BUS_WIDTH 64 -#define DFP_BUS_WIDTH 32 // rumour has it for digital flat panel ?? -#define MEGAHZ (1<<20) - -void -sisEngThresh (SisCrtc *crtc, unsigned long vclk, int bpp) -{ - int threshlow, mclk; - - mclk = sisCalcMclk(crtc) / 1000000; - vclk = vclk / 1000000; - threshlow = ((((UMA_FACTOR*vclk*bpp)/ - (mclk*BUS_WIDTH))+1)/2)+4; - - crtc->crt_cpu_threshold_low_0_3 = threshlow; - crtc->crt_cpu_threshold_low_4 = threshlow >> 4; - - crtc->crt_cpu_threshold_high_0_3 = (SIS_SAYS_SO & 0xf); - crtc->crt_cpu_threshold_high_4 = 0; - - crtc->crt_engine_threshold_high_0_3 = CRT_ENG_THRESH; - crtc->crt_engine_threshold_high_4 = 1; - - crtc->ascii_attribute_threshold_0_2 = (SIS_SAYS_SO >> 4); - - crtc->crt_threshold_full_control = SIS_CRT_64_STAGE_THRESHOLD; -} diff --git a/hw/kdrive/sis530/siscmap.c b/hw/kdrive/sis530/siscmap.c deleted file mode 100644 index 2a28420c8..000000000 --- a/hw/kdrive/sis530/siscmap.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "sis.h" - -void -sisGetColors (ScreenPtr pScreen, int fb, int ndef, xColorItem *pdefs) -{ - KdScreenPriv(pScreen); - sisCardInfo(pScreenPriv); - - LockSis (sisc); - while (ndef--) - { - _sisOutb (pdefs->pixel, sisc->io_base+SIS_DAC_INDEX_READ); - pdefs->red = _sisInb (sisc->io_base+SIS_DAC_DATA) << 10; - pdefs->green = _sisInb (sisc->io_base+SIS_DAC_DATA) << 10; - pdefs->blue = _sisInb (sisc->io_base+SIS_DAC_DATA) << 10; - pdefs++; - } - UnlockSis (sisc); -} - -void -sisPutColors (ScreenPtr pScreen, int fb, int ndef, xColorItem *pdefs) -{ - KdScreenPriv(pScreen); - sisCardInfo(pScreenPriv); - - LockSis(sisc); - _sisWaitVRetrace (sisc); - while (ndef--) - { - _sisOutb (pdefs->pixel, sisc->io_base+SIS_DAC_INDEX_WRITE); - _sisOutb (pdefs->red >> 10, sisc->io_base+SIS_DAC_DATA); - _sisOutb (pdefs->green >> 10, sisc->io_base+SIS_DAC_DATA); - _sisOutb (pdefs->blue >> 10, sisc->io_base+SIS_DAC_DATA); - pdefs++; - } - UnlockSis(sisc); -} - diff --git a/hw/kdrive/sis530/siscurs.c b/hw/kdrive/sis530/siscurs.c deleted file mode 100644 index dad44471c..000000000 --- a/hw/kdrive/sis530/siscurs.c +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "sis.h" -#include "cursorstr.h" - -#define SetupCursor(s) KdScreenPriv(s); \ - sisCardInfo(pScreenPriv); \ - sisScreenInfo(pScreenPriv); \ - SisPtr sis = sisc->sis; \ - SisCursor *pCurPriv = &siss->cursor - -static void -_sisMoveCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor(pScreen); - CARD8 xlow, xhigh, ylow, yhigh; - CARD8 xoff, yoff; - - x -= pCurPriv->xhot; - xoff = 0; - if (x < 0) - { - xoff = -x; - x = 0; - } - y -= pCurPriv->yhot; - yoff = 0; - if (y < 0) - { - yoff = -y; - y = 0; - } - xlow = (CARD8) x; - xhigh = (CARD8) (x >> 8); - ylow = (CARD8) y; - yhigh = (CARD8) (y >> 8); - - PutSrtc (sisc, 0x5, 0x86); - PutSrtc (sisc, 0x1c, xoff & 0x3f); - PutSrtc (sisc, 0x1f, yoff & 0x3f); - - PutSrtc (sisc, 0x1a, xlow); - PutSrtc (sisc, 0x1b, xhigh & 0xf); - - PutSrtc (sisc, 0x1d, ylow); - PutSrtc (sisc, 0x1e, yhigh & 0x7); -} - -static void -sisMoveCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor (pScreen); - - if (!pCurPriv->has_cursor) - return; - - if (!pScreenPriv->enabled) - return; - - LockSis(sisc); - _sisMoveCursor (pScreen, x, y); - UnlockSis(sisc); -} - -static void -_sisSetCursorColors (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - /* set foreground */ - PutSrtc (sisc, 0x17, pCursor->foreRed >> 10); - PutSrtc (sisc, 0x18, pCursor->foreGreen >> 10); - PutSrtc (sisc, 0x19, pCursor->foreBlue >> 10); - - /* set background */ - PutSrtc (sisc, 0x14, pCursor->backRed >> 10); - PutSrtc (sisc, 0x15, pCursor->backGreen >> 10); - PutSrtc (sisc, 0x16, pCursor->backBlue >> 10); -} - -static void -sisLoadCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor(pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - CursorBitsPtr bits = pCursor->bits; - int w, h; - unsigned short *ram, r; - unsigned char *msk, *mskLine, *src, *srcLine; - unsigned short m, s; - - int i, j; - int cursor_address; - int src_stride, src_width; - - CARD8 sr6; - - /* - * Lock Sis so the cursor doesn't move while we're setting it - */ - LockSis(sisc); - - pCurPriv->pCursor = pCursor; - pCurPriv->xhot = pCursor->bits->xhot; - pCurPriv->yhot = pCursor->bits->yhot; - - /* - * Stick new image into cursor memory - */ - ram = (unsigned short *) siss->cursor_base; - mskLine = (unsigned char *) bits->mask; - srcLine = (unsigned char *) bits->source; - - h = bits->height; - if (h > SIS_CURSOR_HEIGHT) - h = SIS_CURSOR_HEIGHT; - - src_stride = BitmapBytePad(bits->width); /* bytes per line */ - src_width = (bits->width + 7) >> 3; - - for (i = 0; i < SIS_CURSOR_HEIGHT; i++) { - msk = mskLine; - src = srcLine; - mskLine += src_stride; - srcLine += src_stride; - for (j = 0; j < SIS_CURSOR_WIDTH / 8; j++) { - - unsigned short m, s; - - if (i < h && j < src_width) - { - m = *msk++; - s = *src++ & m; - m = ~m; - /* mask off right side */ - if (j == src_width - 1 && (bits->width & 7)) - { - m |= 0xff << (bits->width & 7); - } - } - else - { - m = 0xff; - s = 0x00; - } - - /* - * The SIS530 HW cursor format is: source(AND) bit, - * then a mask(XOR) bit, etc. - * byte swapping in sis530 is: - * abcd ==> cdab - */ - -#define bit(a,n) (((a) >> (n)) & 0x1) - - r = ((bit(m, 0) << 7) | (bit(s, 0) << 6) | - (bit(m, 1) << 5) | (bit(s, 1) << 4) | - (bit(m, 2) << 3) | (bit(s, 2) << 2) | - (bit(m, 3) << 1) | (bit(s, 3) << 0) | - (bit(m, 4) << 15) | (bit(s, 4) << 14) | - (bit(m, 5) << 13) | (bit(s, 5) << 12) | - (bit(m, 6) << 11) | (bit(s, 6) << 10) | - (bit(m, 7) << 9) | (bit(s, 7) << 8)); - - *ram++ = r; - } - } - - /* Set new color */ - _sisSetCursorColors (pScreen); - - /* Move to new position */ - _sisMoveCursor (pScreen, x, y); - - /* Enable cursor */ - sr6 = GetSrtc (sisc, 0x6); - sr6 |= 0x40; - PutSrtc (sisc, 0x6, sr6); - - UnlockSis(sisc); -} - -static void -sisUnloadCursor (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - CARD8 sr6; - - LockSis (sisc); - - /* Disable cursor */ - sr6 = GetSrtc (sisc, 0x6); - sr6 &= ~0x40; - PutSrtc (sisc, 0x6, sr6); - PutSrtc (sisc, 0x1b, 0x00); - - UnlockSis (sisc); -} - -static Bool -sisRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) -{ - SetupCursor(pScreen); - - if (!pScreenPriv->enabled) - return TRUE; - - /* miRecolorCursor does this */ - if (pCurPriv->pCursor == pCursor) - { - if (pCursor) - { - int x, y; - - miPointerPosition (&x, &y); - sisLoadCursor (pScreen, x, y); - } - } - return TRUE; -} - -static Bool -sisUnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) -{ - return TRUE; -} - -static void -sisSetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y) -{ - SetupCursor(pScreen); - - pCurPriv->pCursor = pCursor; - - if (!pScreenPriv->enabled) - return; - - if (pCursor) - sisLoadCursor (pScreen, x, y); - else - sisUnloadCursor (pScreen); -} - -miPointerSpriteFuncRec sisPointerSpriteFuncs = { - sisRealizeCursor, - sisUnrealizeCursor, - sisSetCursor, - sisMoveCursor, -}; - -static void -sisQueryBestSize (int class, - unsigned short *pwidth, unsigned short *pheight, - ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - switch (class) - { - case CursorShape: - if (*pwidth > pCurPriv->width) - *pwidth = pCurPriv->width; - if (*pheight > pCurPriv->height) - *pheight = pCurPriv->height; - if (*pwidth > pScreen->width) - *pwidth = pScreen->width; - if (*pheight > pScreen->height) - *pheight = pScreen->height; - break; - default: - fbQueryBestSize (class, pwidth, pheight, pScreen); - break; - } -} - -Bool -sisCursorInit (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (!siss->cursor_base) - { - pCurPriv->has_cursor = FALSE; - return FALSE; - } - - pCurPriv->width = SIS_CURSOR_WIDTH; - pCurPriv->height= SIS_CURSOR_HEIGHT; - pScreen->QueryBestSize = sisQueryBestSize; - miPointerInitialize (pScreen, - &sisPointerSpriteFuncs, - &kdPointerScreenFuncs, - FALSE); - pCurPriv->has_cursor = TRUE; - pCurPriv->pCursor = NULL; - return TRUE; -} - -void -sisCursorEnable (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (pCurPriv->has_cursor) - { - if (pCurPriv->pCursor) - { - int x, y; - - miPointerPosition (&x, &y); - sisLoadCursor (pScreen, x, y); - } - else - sisUnloadCursor (pScreen); - } -} - -void -sisCursorDisable (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (!pScreenPriv->enabled) - return; - - if (pCurPriv->has_cursor) - { - if (pCurPriv->pCursor) - { - sisUnloadCursor (pScreen); - } - } -} - -void -sisCursorFini (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - pCurPriv->pCursor = NULL; -} diff --git a/hw/kdrive/sis530/sisdraw.c b/hw/kdrive/sis530/sisdraw.c deleted file mode 100644 index 595544348..000000000 --- a/hw/kdrive/sis530/sisdraw.c +++ /dev/null @@ -1,1649 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "sis.h" -#include "sisdraw.h" - -#include "Xmd.h" -#include "gcstruct.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "regionstr.h" -#include "mistruct.h" -#include "fontstruct.h" -#include "dixfontstr.h" -#include "fb.h" -#include "migc.h" -#include "miline.h" - -CARD8 sisPatRop[16] = { - /* GXclear */ 0x00, /* 0 */ - /* GXand */ 0xa0, /* src AND dst */ - /* GXandReverse */ 0x50, /* src AND NOT dst */ - /* GXcopy */ 0xf0, /* src */ - /* GXandInverted*/ 0x0a, /* NOT src AND dst */ - /* GXnoop */ 0xaa, /* dst */ - /* GXxor */ 0x5a, /* src XOR dst */ - /* GXor */ 0xfa, /* src OR dst */ - /* GXnor */ 0x05, /* NOT src AND NOT dst */ - /* GXequiv */ 0xa5, /* NOT src XOR dst */ - /* GXinvert */ 0x55, /* NOT dst */ - /* GXorReverse */ 0xf5, /* src OR NOT dst */ - /* GXcopyInverted*/ 0x0f, /* NOT src */ - /* GXorInverted */ 0xaf, /* NOT src OR dst */ - /* GXnand */ 0x5f, /* NOT src OR NOT dst */ - /* GXset */ 0xff, /* 1 */ -}; - -CARD8 sisBltRop[16] = { - /* GXclear */ 0x00, /* 0 */ - /* GXand */ 0x88, /* src AND dst */ - /* GXandReverse */ 0x44, /* src AND NOT dst */ - /* GXcopy */ 0xcc, /* src */ - /* GXandInverted*/ 0x22, /* NOT src AND dst */ - /* GXnoop */ 0xaa, /* dst */ - /* GXxor */ 0x66, /* src XOR dst */ - /* GXor */ 0xee, /* src OR dst */ - /* GXnor */ 0x11, /* NOT src AND NOT dst */ - /* GXequiv */ 0x99, /* NOT src XOR dst */ - /* GXinvert */ 0x55, /* NOT dst */ - /* GXorReverse */ 0xdd, /* src OR NOT dst */ - /* GXcopyInverted*/ 0x33, /* NOT src */ - /* GXorInverted */ 0xbb, /* NOT src OR dst */ - /* GXnand */ 0x77, /* NOT src OR NOT dst */ - /* GXset */ 0xff, /* 1 */ -}; - -/* Align blts to this boundary or risk trashing an in-progress expand */ -#define SIS_MIN_PATTERN 8 - -/* Do plane bits in this increment to balance CPU and graphics engine */ -#define SIS_PATTERN_INC 1024 - -typedef struct _SisExpand { - SisCardInfo *sisc; - SisScreenInfo *siss; - CARD32 off; - int last; -} SisExpand; - -static void -sisExpandInit (ScreenPtr pScreen, - SisExpand *e) -{ - KdScreenPriv(pScreen); - sisCardInfo(pScreenPriv); - sisScreenInfo(pScreenPriv); - - e->sisc = sisc; - e->siss = siss; - e->off = siss->expand_off; - e->last = 0; -} - -static CARD32 * -sisExpandAlloc (SisExpand *e, - int nb) -{ - SisCardInfo *sisc = e->sisc; - SisScreenInfo *siss = e->siss; - SisPtr sis = sisc->sis; - CARD32 off; - - /* round up to alignment boundary */ - nb = (nb + SIS_MIN_PATTERN-1) & ~(SIS_MIN_PATTERN-1); - - off = e->off + e->last; - if (off + nb > siss->expand_off + siss->expand_len) - { - _sisWaitIdleEmpty (sis); - off = siss->expand_off; - } - e->off = off; - e->last = nb; - return (CARD32 *) (sisc->frameBuffer + off); -} - -void -sisGlyphBltClipped (DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - unsigned int nglyph, - CharInfoPtr *ppciInit, - Bool imageBlt) -{ - SetupSis(pDrawable->pScreen); - FbGCPrivPtr fbPriv = fbGetGCPrivate(pGC); - int height; - int width; - int xBack, yBack; - int hBack, wBack; - int nb, bwidth, nl; - FontPtr pfont = pGC->font; - CharInfoPtr pci; - CARD8 *bits8, b; - CARD16 *bits16; - CARD32 *bits32; - BoxPtr extents; - BoxRec bbox; - unsigned char alu; - CARD32 cmd; - SisExpand expand; - CARD32 *dst, d; - int nbytes; - int shift; - int x1, y1, x2, y2; - RegionPtr pClip = fbGetCompositeClip(pGC); - BoxPtr pBox; - int nbox; - int rect_in; - int widthBlt; - CharInfoPtr *ppci; - - x += pDrawable->x; - y += pDrawable->y; - - if (imageBlt) - { - xBack = x; - yBack = y - FONTASCENT(pGC->font); - wBack = 0; - hBack = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font); - if (hBack) - { - height = nglyph; - ppci = ppciInit; - while (height--) - wBack += (*ppci++)->metrics.characterWidth; - } - if (wBack < 0) - { - xBack = xBack + wBack; - wBack = -wBack; - } - if (hBack < 0) - { - yBack = yBack + hBack; - hBack = -hBack; - } - alu = GXcopy; - } - else - { - wBack = 0; - alu = pGC->alu; - } - - if (wBack) - { - _sisSetSolidRect (sis, pGC->bgPixel, GXcopy, cmd); - for (nbox = REGION_NUM_RECTS (pClip), - pBox = REGION_RECTS (pClip); - nbox--; - pBox++) - { - x1 = xBack; - x2 = xBack + wBack; - y1 = yBack; - y2 = yBack + hBack; - if (x1 < pBox->x1) x1 = pBox->x1; - if (x2 > pBox->x2) x2 = pBox->x2; - if (y1 < pBox->y1) y1 = pBox->y1; - if (y2 > pBox->y2) y2 = pBox->y2; - if (x1 < x2 && y1 < y2) - { - _sisRect (sis, x1, y1, x2 - x1, y2 - y1, cmd); - } - } - } - - sisExpandInit (pDrawable->pScreen, &expand); - - sis->u.general.src_fg = pGC->fgPixel; - sis->u.general.src_pitch = 0; - sis->u.general.src_x = 0; - sis->u.general.src_y = 0; - - cmd = (SIS_CMD_ENH_COLOR_EXPAND | - SIS_CMD_SRC_SCREEN | - SIS_CMD_PAT_FG | - (sisBltRop[alu] << 8) | - SIS_CMD_INC_X | - SIS_CMD_INC_Y | - SIS_CMD_RECT_CLIP_ENABLE | - SIS_CMD_TRANSPARENT); - - ppci = ppciInit; - while (nglyph--) - { - pci = *ppci++; - height = pci->metrics.ascent + pci->metrics.descent; - width = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing; - widthBlt = (width + 31) & ~31; - nb = (widthBlt >> 3) * height; - if (nb) - { - x1 = x + pci->metrics.leftSideBearing; - y1 = y - pci->metrics.ascent; - bbox.x1 = x1; - bbox.y1 = y1; - bbox.x2 = x1 + width; - bbox.y2 = y1 + height; - rect_in = RECT_IN_REGION(pGC->pScreen, pClip, &bbox); - if (rect_in != rgnOUT) - { - dst = sisExpandAlloc (&expand, nb); - - sis->u.general.src_base = expand.off; - sis->u.general.dst_x = x1; - sis->u.general.dst_y = y1; - sis->u.general.rect_width = widthBlt; - sis->u.general.rect_height = height; - nb >>= 2; - bits32 = (CARD32 *) pci->bits; - while (nb--) - { - d = *bits32++; - SisInvertBits32 (d); - *dst++ = d; - } - if (rect_in == rgnPART) - { - for (nbox = REGION_NUM_RECTS (pClip), - pBox = REGION_RECTS (pClip); - nbox--; - pBox++) - { - _sisClip (sis, pBox->x1, pBox->y1, pBox->x2, pBox->y2); - sis->u.general.command = cmd; - } - } - else - { - _sisClip (sis, 0, 0, x1+width, pScreenPriv->screen->height); - sis->u.general.command = cmd; - } - } - } - x += pci->metrics.characterWidth; - } - _sisClip (sis, 0, 0, - pScreenPriv->screen->width, pScreenPriv->screen->height); - KdMarkSync (pDrawable->pScreen); -} - -Bool -sisTEGlyphBlt (DrawablePtr pDrawable, - GCPtr pGC, - int xInit, - int yInit, - unsigned int nglyph, - CharInfoPtr *ppci, - Bool imageBlt) -{ - SetupSis(pDrawable->pScreen); - int x, y; - int widthGlyphs, widthGlyph; - int widthBlt; - FbBits depthMask; - int glyphsPer; - FontPtr pfont = pGC->font; - unsigned long *char1, *char2, *char3, *char4, *char5; - CARD8 alu; - CARD32 *dst, tmp; - CARD8 *dst8, *bits8; - int nb; - int bwidth; - CARD32 cmd; - int h; - BoxRec bbox; - SisExpand expand; - int lwTmp, lw; - int extra, n; - - widthGlyph = FONTMAXBOUNDS(pfont,characterWidth); - if (!widthGlyph) - return TRUE; - - h = FONTASCENT(pfont) + FONTDESCENT(pfont); - if (!h) - return TRUE; - - x = xInit + FONTMAXBOUNDS(pfont,leftSideBearing) + pDrawable->x; - y = yInit - FONTASCENT(pfont) + pDrawable->y; - - bbox.x1 = x; - bbox.x2 = x + (widthGlyph * nglyph); - bbox.y1 = y; - bbox.y2 = y + h; - - switch (RECT_IN_REGION(pGC->pScreen, fbGetCompositeClip(pGC), &bbox)) - { - case rgnPART: - if (x < 0 || y < 0) - return FALSE; - sisGlyphBltClipped (pDrawable, pGC, xInit, yInit, nglyph, ppci, imageBlt); - case rgnOUT: - return TRUE; - } - - if (widthGlyph <= 6) - glyphsPer = 5; - else if (widthGlyph <= 8) - glyphsPer = 4; - else if (widthGlyph <= 10) - glyphsPer = 3; - else if (widthGlyph <= 16) - glyphsPer = 2; - else - glyphsPer = 1; - - widthGlyphs = widthGlyph * glyphsPer; - widthBlt = widthGlyphs; - - /* make sure scanlines are 32-bit aligned */ - if (widthGlyphs <= 24) - widthBlt = 25; - - cmd = (SIS_CMD_ENH_COLOR_EXPAND | - SIS_CMD_SRC_SCREEN | - SIS_CMD_PAT_FG | - SIS_CMD_INC_X | - SIS_CMD_INC_Y); - - if (imageBlt) - { - sis->u.general.clip_right = bbox.x2; - cmd |= ((sisBltRop[GXcopy] << 8) | - SIS_CMD_OPAQUE | - SIS_CMD_RECT_CLIP_ENABLE); - } - else - { - cmd |= ((sisBltRop[pGC->alu] << 8) | - SIS_CMD_TRANSPARENT | - SIS_CMD_RECT_CLIP_DISABLE); - } - - sisExpandInit (pDrawable->pScreen, &expand); - - sis->u.general.src_fg = pGC->fgPixel; - sis->u.general.src_bg = pGC->bgPixel; - - bwidth = (widthBlt + 7) >> 3; - - nb = bwidth * h; - -#define LoopIt(count, loadup, fetch) \ - while (nglyph >= count) \ - { \ - nglyph -= count; \ - dst = sisExpandAlloc (&expand, nb); \ - sis->u.general.src_base = expand.off; \ - sis->u.general.src_pitch = 0; \ - sis->u.general.src_x = 0; \ - sis->u.general.src_y = 0; \ - sis->u.general.dst_x = x; \ - sis->u.general.dst_y = y; \ - sis->u.general.rect_width = widthBlt; \ - sis->u.general.rect_height = h; \ - x += widthGlyphs; \ - loadup \ - lwTmp = h; \ - while (lwTmp--) { \ - tmp = fetch; \ - SisInvertBits32(tmp); \ - *dst++ = tmp; \ - } \ - sis->u.general.command = cmd; \ - } - - switch (glyphsPer) { - case 5: - LoopIt(5, - char1 = (unsigned long *) (*ppci++)->bits; - char2 = (unsigned long *) (*ppci++)->bits; - char3 = (unsigned long *) (*ppci++)->bits; - char4 = (unsigned long *) (*ppci++)->bits; - char5 = (unsigned long *) (*ppci++)->bits;, - (*char1++ | ((*char2++ | ((*char3++ | ((*char4++ | (*char5++ - << widthGlyph)) - << widthGlyph)) - << widthGlyph)) - << widthGlyph))); - break; - case 4: - LoopIt(4, - char1 = (unsigned long *) (*ppci++)->bits; - char2 = (unsigned long *) (*ppci++)->bits; - char3 = (unsigned long *) (*ppci++)->bits; - char4 = (unsigned long *) (*ppci++)->bits;, - (*char1++ | ((*char2++ | ((*char3++ | (*char4++ - << widthGlyph)) - << widthGlyph)) - << widthGlyph))); - break; - case 3: - LoopIt(3, - char1 = (unsigned long *) (*ppci++)->bits; - char2 = (unsigned long *) (*ppci++)->bits; - char3 = (unsigned long *) (*ppci++)->bits;, - (*char1++ | ((*char2++ | (*char3++ << widthGlyph)) << widthGlyph))); - break; - case 2: - LoopIt(2, - char1 = (unsigned long *) (*ppci++)->bits; - char2 = (unsigned long *) (*ppci++)->bits;, - (*char1++ | (*char2++ << widthGlyph))); - break; - } - - widthBlt = (widthGlyph + 31) & ~31; - - bwidth = widthBlt >> 3; - - nb = bwidth * h; - - lw = (widthBlt >> 5) * h; - - while (nglyph--) - { - dst = (CARD32 *) sisExpandAlloc (&expand, nb); - char1 = (CARD32 *) (*ppci++)->bits; - sis->u.general.src_base = expand.off; - sis->u.general.src_pitch = 0; - sis->u.general.src_x = 0; - sis->u.general.src_y = 0; - sis->u.general.dst_x = x; - sis->u.general.dst_y = y; - sis->u.general.rect_width = widthBlt; - sis->u.general.rect_height = h; - lwTmp = lw; - while (lwTmp--) - { - tmp = *char1++; - SisInvertBits32 (tmp); - *dst++ = tmp; - } - sis->u.general.command = cmd; - x += widthGlyph; - } - if (imageBlt) - sis->u.general.clip_right = pScreenPriv->screen->width; - KdMarkSync (pDrawable->pScreen); - return TRUE; -} - -Bool -sisGlyphBlt(DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - unsigned int nglyph, - CharInfoPtr *ppciInit, - Bool imageBlt) -{ - SetupSis(pDrawable->pScreen); - int height; - int width; - int xBack, yBack; - int hBack, wBack; - int nb, bwidth, nl; - FontPtr pfont = pGC->font; - CharInfoPtr pci; - CARD8 *bits8, b; - CARD16 *bits16; - CARD32 *bits32; - BoxPtr extents; - BoxRec bbox; - CharInfoPtr *ppci; - unsigned char alu; - CARD32 cmd; - SisExpand expand; - CARD32 *dst, d; - int nbytes; - int shift; - - x += pDrawable->x; - y += pDrawable->y; - - /* compute an approximate (but covering) bounding box */ - ppci = ppciInit; - width = 0; - height = nglyph; - while (height--) - width += (*ppci++)->metrics.characterWidth; - if (width < 0) - { - bbox.x1 = x + width; - bbox.x2 = x; - } - else - { - bbox.x1 = x; - bbox.x2 = x + width; - } - width = FONTMINBOUNDS(pfont,leftSideBearing); - if (width < 0) - bbox.x1 += width; - width = FONTMAXBOUNDS(pfont, rightSideBearing) - FONTMINBOUNDS(pfont, characterWidth); - if (width > 0) - bbox.x2 += width; - bbox.y1 = y - FONTMAXBOUNDS(pfont,ascent); - bbox.y2 = y + FONTMAXBOUNDS(pfont,descent); - - switch (RECT_IN_REGION(pGC->pScreen, fbGetCompositeClip(pGC), &bbox)) - { - case rgnPART: - if (bbox.x1 < 0 || bbox.y1 < 0) - return FALSE; - sisGlyphBltClipped (pDrawable, pGC, - x - pDrawable->x, y - pDrawable->y, - nglyph, ppciInit, imageBlt); - case rgnOUT: - return TRUE; - } - - if (imageBlt) - { - xBack = x; - yBack = y - FONTASCENT(pGC->font); - wBack = 0; - hBack = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font); - if (hBack) - { - height = nglyph; - ppci = ppciInit; - while (height--) - wBack += (*ppci++)->metrics.characterWidth; - } - if (wBack < 0) - { - xBack = xBack + wBack; - wBack = -wBack; - } - if (hBack < 0) - { - yBack = yBack + hBack; - hBack = -hBack; - } - alu = GXcopy; - } - else - { - wBack = 0; - alu = pGC->alu; - } - - if (wBack) - { - _sisSetSolidRect (sis, pGC->bgPixel, GXcopy, cmd); - _sisRect (sis, xBack, yBack, wBack, hBack, cmd); - } - - sisExpandInit (pDrawable->pScreen, &expand); - - sis->u.general.src_fg = pGC->fgPixel; - - cmd = (SIS_CMD_ENH_COLOR_EXPAND | - SIS_CMD_SRC_SCREEN | - SIS_CMD_PAT_FG | - (sisBltRop[alu] << 8) | - SIS_CMD_INC_X | - SIS_CMD_INC_Y | - SIS_CMD_RECT_CLIP_DISABLE | - SIS_CMD_TRANSPARENT); - - ppci = ppciInit; - while (nglyph--) - { - pci = *ppci++; - height = pci->metrics.ascent + pci->metrics.descent; - width = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing; - /* - * For glyphs wider than 16 pixels, expand the blt to the nearest multiple - * of 32; this allows the scanlines to be padded to a 32-bit boundary - * instead of requiring byte packing - */ - if (width > 16) - width = (width + 31) & ~31; - bwidth = (width + 7) >> 3; - nb = bwidth * height; - if (nb) - { - dst = sisExpandAlloc (&expand, nb); - - sis->u.general.src_base = expand.off; - sis->u.general.src_pitch = 0; - sis->u.general.src_x = 0; - sis->u.general.src_y = 0; - sis->u.general.dst_x = x + pci->metrics.leftSideBearing; - sis->u.general.dst_y = y - pci->metrics.ascent; - sis->u.general.rect_width = width; - sis->u.general.rect_height = height; - switch (bwidth) { - case 1: - bits8 = (CARD8 *) pci->bits; - while (height >= 4) - { - d = (bits8[0] | (bits8[4] << 8) | - (bits8[8] << 16) | (bits8[12] << 24)); - SisInvertBits32(d); - *dst++ = d; - bits8 += 16; - height -= 4; - } - if (height) - { - switch (height) { - case 3: - d = bits8[0] | (bits8[4] << 8) | (bits8[8] << 16); - break; - case 2: - d = bits8[0] | (bits8[4] << 8); - break; - case 1: - d = bits8[0]; - break; - } - SisInvertBits32(d); - *dst++ = d; - } - break; - case 2: - bits16 = (CARD16 *) pci->bits; - while (height >= 2) - { - d = bits16[0] | (bits16[2] << 16); - SisInvertBits32(d); - *dst++ = d; - bits16 += 4; - height -= 2; - } - if (height) - { - d = bits16[0]; - SisInvertBits32(d); - *dst++ = d; - } - break; - default: - nb >>= 2; - bits32 = (CARD32 *) pci->bits; - while (nb--) - { - d = *bits32++; - SisInvertBits32 (d); - *dst++ = d; - } - } - sis->u.general.command = cmd; - } - x += pci->metrics.characterWidth; - } - KdMarkSync (pDrawable->pScreen); - return TRUE; -} -/* - * Blt glyphs using Sis image transfer register, this does both - * poly glyph blt and image glyph blt (when pglyphBase == 1) - */ - -void -sisPolyGlyphBlt (DrawablePtr pDrawable, - GCPtr pGC, - int x, int y, - unsigned int nglyph, - CharInfoPtr *ppci, - pointer pglyphBase) -{ - FbBits depthMask; - - depthMask = FbFullMask (pDrawable->depth); - if ((pGC->planemask & depthMask) == depthMask && - pGC->fillStyle == FillSolid) - { - if (TERMINALFONT(pGC->font)) - { - if (sisTEGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, FALSE)) - return; - } - else - { - if (sisGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, FALSE)) - return; - } - } - KdCheckPolyGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); -} - -void -sisImageGlyphBlt (DrawablePtr pDrawable, - GCPtr pGC, - int x, int y, - unsigned int nglyph, - CharInfoPtr *ppci, - pointer pglyphBase) -{ - FbBits depthMask; - - depthMask = FbFullMask (pDrawable->depth); - if ((pGC->planemask & depthMask) == depthMask) - { - if (TERMINALFONT(pGC->font)) - { - if (sisTEGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, TRUE)) - return; - } - else - { - if (sisGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, TRUE)) - return; - } - } - KdCheckImageGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); -} - -#define sourceInvarient(alu) (((alu) & 3) == (((alu) >> 2) & 3)) - -#define sisPatternDimOk(d) ((d) <= 8 && (((d) & ((d) - 1)) == 0)) - -BOOL -sisFillOk (GCPtr pGC) -{ - FbBits depthMask; - - depthMask = FbFullMask(pGC->depth); - if ((pGC->planemask & depthMask) != depthMask) - return FALSE; - switch (pGC->fillStyle) { - case FillSolid: - return TRUE; - case FillTiled: - return (sisPatternDimOk (pGC->tile.pixmap->drawable.width) && - sisPatternDimOk (pGC->tile.pixmap->drawable.height)); - case FillStippled: - case FillOpaqueStippled: - return (sisPatternDimOk (pGC->stipple->drawable.width) && - sisPatternDimOk (pGC->stipple->drawable.height)); - } -} - -CARD32 -sisStipplePrepare (DrawablePtr pDrawable, GCPtr pGC) -{ - SetupSis(pGC->pScreen); - PixmapPtr pStip = pGC->stipple; - int stipHeight = pStip->drawable.height; - int xRot, yRot; - int rot, stipX, stipY; - FbStip *stip, *stipEnd, bits; - FbStride stipStride; - int stipBpp; - int stipXoff, stipYoff; /* XXX assumed to be zero */ - int y; - CARD32 cmd; - - xRot = pGC->patOrg.x + pDrawable->x; - yRot = pGC->patOrg.y + pDrawable->y; - modulus (- yRot, stipHeight, stipY); - modulus (- xRot, FB_UNIT, stipX); - rot = stipX; - - fbGetStipDrawable (&pStip->drawable, stip, stipStride, stipBpp, stipXoff, stipYoff); - for (y = 0; y < 8; y++) - { - bits = stip[stipY<<1]; - FbRotLeft(bits, rot); - SisInvertBits32(bits); - sis->u.general.mask[y] = (CARD8) bits; - stipY++; - if (stipY == stipHeight) - stipY = 0; - } - sis->u.general.pattern_fg = pGC->fgPixel; - - cmd = (SIS_CMD_BITBLT | - SIS_CMD_SRC_SCREEN | - SIS_CMD_PAT_MONO | - (sisPatRop[pGC->alu] << 8) | - SIS_CMD_INC_X | - SIS_CMD_INC_Y | - SIS_CMD_RECT_CLIP_DISABLE | - SIS_CMD_RECT_CLIP_DONT_MERGE); - if (pGC->fillStyle == FillOpaqueStippled) - { - sis->u.general.pattern_bg = pGC->bgPixel; - cmd |= SIS_CMD_OPAQUE; - } - else - cmd |= SIS_CMD_TRANSPARENT; - return cmd; -} - -CARD32 -sisTilePrepare (PixmapPtr pTile, int xRot, int yRot, CARD8 alu) -{ - SetupSis(pTile->drawable.pScreen); - int tileHeight = pTile->drawable.height; - int tileWidth = pTile->drawable.width; - FbBits *tile; - FbStride tileStride; - int tileBpp; - int tileXoff, tileYoff; /* XXX assumed to be zero */ - - fbGetDrawable (&pTile->drawable, tile, tileStride, tileBpp, tileXoff, tileYoff); - - /* - * Tile the pattern register - */ - fbTile ((FbBits *) sis->u.general.pattern, - (8 * tileBpp) >> FB_SHIFT, - 0, - - 8 * tileBpp, 8, - - tile, - tileStride, - tileWidth * tileBpp, - tileHeight, - GXcopy, FB_ALLONES, tileBpp, - xRot * tileBpp, - yRot); - - return (SIS_CMD_BITBLT | - SIS_CMD_SRC_SCREEN | - SIS_CMD_PAT_PATTERN | - (sisPatRop[alu] << 8) | - SIS_CMD_INC_X | - SIS_CMD_INC_Y | - SIS_CMD_RECT_CLIP_DISABLE | - SIS_CMD_RECT_CLIP_DONT_MERGE); -} - -void -sisFillBoxSolid (DrawablePtr pDrawable, int nBox, BoxPtr pBox, - unsigned long pixel, int alu) -{ - SetupSis(pDrawable->pScreen); - CARD32 cmd; - - _sisSetSolidRect(sis,pixel,alu,cmd); - - while (nBox--) - { - _sisRect(sis,pBox->x1,pBox->y1,pBox->x2-pBox->x1,pBox->y2-pBox->y1,cmd); - pBox++; - } - KdMarkSync (pDrawable->pScreen); -} - -void -sisFillBoxStipple (DrawablePtr pDrawable, GCPtr pGC, - int nBox, BoxPtr pBox) -{ - SetupSis(pDrawable->pScreen); - CARD32 cmd; - - cmd = sisStipplePrepare (pDrawable, pGC); - - while (nBox--) - { - _sisRect(sis,pBox->x1,pBox->y1,pBox->x2-pBox->x1,pBox->y2-pBox->y1,cmd); - pBox++; - } - KdMarkSync (pDrawable->pScreen); -} - -void -sisFillBoxTiled (DrawablePtr pDrawable, - int nBox, BoxPtr pBox, - PixmapPtr pTile, int xRot, int yRot, CARD8 alu) -{ - SetupSis (pDrawable->pScreen); - CARD32 cmd; - - cmd = sisTilePrepare (pTile, xRot, yRot, alu); - - while (nBox--) - { - _sisRect(sis,pBox->x1,pBox->y1,pBox->x2-pBox->x1,pBox->y2-pBox->y1,cmd); - pBox++; - } - KdMarkSync (pDrawable->pScreen); -} - -/* - sisDoBitBlt - ============= - Bit Blit for all window to window blits. -*/ - -void -sisCopyNtoN (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - BoxPtr pbox, - int nbox, - int dx, - int dy, - Bool reverse, - Bool upsidedown, - Pixel bitplane, - void *closure) -{ - SetupSis(pDstDrawable->pScreen); - int srcX, srcY, dstX, dstY; - int w, h; - CARD32 flags; - CARD32 cmd; - CARD8 alu; - - if (pGC) - { - alu = pGC->alu; - if (sourceInvarient (pGC->alu)) - { - sisFillBoxSolid (pDstDrawable, nbox, pbox, 0, pGC->alu); - return; - } - } - else - alu = GXcopy; - - _sisSetBlt(sis,alu,cmd); - while (nbox--) - { - w = pbox->x2 - pbox->x1; - h = pbox->y2 - pbox->y1; - flags = 0; - if (reverse) - { - dstX = pbox->x2 - 1; - } - else - { - dstX = pbox->x1; - flags |= SIS_CMD_INC_X; - } - srcX = dstX + dx; - - if (upsidedown) - { - dstY = pbox->y2 - 1; - } - else - { - dstY = pbox->y1; - flags |= SIS_CMD_INC_Y; - } - srcY = dstY + dy; - - _sisBlt (sis, srcX, srcY, dstX, dstY, w, h, cmd|flags); - pbox++; - } - KdMarkSync (pDstDrawable->pScreen); -} - -RegionPtr -sisCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, - int srcx, int srcy, int width, int height, int dstx, int dsty) -{ - KdScreenPriv(pDstDrawable->pScreen); - FbBits depthMask; - - depthMask = FbFullMask (pDstDrawable->depth); - if ((pGC->planemask & depthMask) == depthMask && - pSrcDrawable->type == DRAWABLE_WINDOW && - pDstDrawable->type == DRAWABLE_WINDOW) - { - return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, - srcx, srcy, width, height, - dstx, dsty, sisCopyNtoN, 0, 0); - } - return KdCheckCopyArea (pSrcDrawable, pDstDrawable, pGC, - srcx, srcy, width, height, dstx, dsty); -} - -typedef struct _sis1toNargs { - unsigned long copyPlaneFG, copyPlaneBG; -} sis1toNargs; - -void -_sisStipple (ScreenPtr pScreen, - FbStip *psrcBase, - FbStride widthSrc, - CARD8 alu, - int srcx, - int srcy, - int dstx, - int dsty, - int width, - int height) -{ - SetupSis(pScreen); - FbStip *psrcLine, *psrc; - FbStride widthRest; - FbStip bits, tmp, lastTmp; - int leftShift, rightShift; - int nl, nlMiddle; - int r; - SisExpand expand; - CARD32 *dst; - int hthis; - int hper; - int bwidth; - CARD32 cmd; - - sisExpandInit (pScreen, &expand); - - /* Compute blt address and parameters */ - psrc = psrcBase + srcy * widthSrc + (srcx >> 5); - nlMiddle = (width + 31) >> 5; - leftShift = srcx & 0x1f; - rightShift = 32 - leftShift; - widthRest = widthSrc - nlMiddle; - - cmd = (SIS_CMD_ENH_COLOR_EXPAND | - SIS_CMD_SRC_SCREEN | - SIS_CMD_PAT_FG | - (sisBltRop[alu] << 8) | - SIS_CMD_INC_X | - SIS_CMD_INC_Y | - SIS_CMD_OPAQUE | - SIS_CMD_RECT_CLIP_ENABLE); - - if (leftShift != 0) - widthRest--; - - sis->u.general.src_x = 0; - sis->u.general.src_y = 0; - sis->u.general.dst_x = dstx; - sis->u.general.rect_width = (width + 31) & ~31; - sis->u.general.clip_right = (dstx + width); - - bwidth = nlMiddle << 2; - hper = SIS_PATTERN_INC / bwidth; - if (hper == 0) - hper = 1; - - while (height) - { - hthis = hper; - if (hthis > height) - hthis = height; - dst = sisExpandAlloc (&expand, bwidth * hthis); - sis->u.general.src_base = expand.off; - sis->u.general.dst_y = dsty; - sis->u.general.rect_height = hthis; - - dsty += hthis; - height -= hthis; - - if (leftShift == 0) - { - while (hthis--) - { - nl = nlMiddle; - while (nl--) - { - tmp = *psrc++; - SisInvertBits32(tmp); - *dst++ = tmp; - } - psrc += widthRest; - } - } - else - { - while (hthis--) - { - bits = *psrc++; - nl = nlMiddle; - while (nl--) - { - tmp = FbStipLeft(bits, leftShift); - bits = *psrc++; - tmp |= FbStipRight(bits, rightShift); - SisInvertBits32(tmp); - *dst++ = tmp; - } - psrc += widthRest; - } - } - sis->u.general.command = cmd; - } - sis->u.general.clip_right = pScreenPriv->screen->width; -} - -void -sisCopy1toN (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - BoxPtr pbox, - int nbox, - int dx, - int dy, - Bool reverse, - Bool upsidedown, - Pixel bitplane, - void *closure) -{ - SetupSis(pDstDrawable->pScreen); - - sis1toNargs *args = closure; - int dstx, dsty; - FbStip *psrcBase; - FbStride widthSrc; - int srcBpp; - int srcXoff, srcYoff; - - if (sourceInvarient (pGC->alu)) - { - sisFillBoxSolid (pDstDrawable, nbox, pbox, - pGC->bgPixel, pGC->alu); - return; - } - - fbGetStipDrawable (pSrcDrawable, psrcBase, widthSrc, srcBpp, srcXoff, srcYoff); - - sis->u.general.src_fg = args->copyPlaneFG; - sis->u.general.src_bg = args->copyPlaneBG; - - while (nbox--) - { - dstx = pbox->x1; - dsty = pbox->y1; - - _sisStipple (pDstDrawable->pScreen, - psrcBase, widthSrc, - pGC->alu, - dstx + dx - srcXoff, dsty + dy - srcYoff, - dstx, dsty, - pbox->x2 - dstx, pbox->y2 - dsty); - pbox++; - } - KdMarkSync (pDstDrawable->pScreen); -} - -RegionPtr -sisCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, - int srcx, int srcy, int width, int height, - int dstx, int dsty, unsigned long bitPlane) -{ - KdScreenPriv (pDstDrawable->pScreen); - RegionPtr ret; - sis1toNargs args; - FbBits depthMask; - - depthMask = FbFullMask (pDstDrawable->depth); - if ((pGC->planemask & depthMask) == depthMask && - pDstDrawable->type == DRAWABLE_WINDOW && - pSrcDrawable->depth == 1) - { - args.copyPlaneFG = pGC->fgPixel; - args.copyPlaneBG = pGC->bgPixel; - return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, - srcx, srcy, width, height, - dstx, dsty, sisCopy1toN, bitPlane, &args); - } - return KdCheckCopyPlane(pSrcDrawable, pDstDrawable, pGC, - srcx, srcy, width, height, - dstx, dsty, bitPlane); -} - -void -sisFillSpans (DrawablePtr pDrawable, GCPtr pGC, int n, - DDXPointPtr ppt, int *pwidth, int fSorted) -{ - SetupSis(pDrawable->pScreen); - DDXPointPtr pptFree; - FbGCPrivPtr fbPriv = fbGetGCPrivate(pGC); - int *pwidthFree;/* copies of the pointers to free */ - CARD32 cmd; - int nTmp; - INT16 x, y; - int width; - - if (!sisFillOk (pGC)) - { - KdCheckFillSpans (pDrawable, pGC, n, ppt, pwidth, fSorted); - return; - } - nTmp = n * miFindMaxBand(fbGetCompositeClip(pGC)); - pwidthFree = (int *)xalloc(nTmp * sizeof(int)); - pptFree = (DDXPointRec *)xalloc(nTmp * sizeof(DDXPointRec)); - if(!pptFree || !pwidthFree) - { - if (pptFree) xfree(pptFree); - if (pwidthFree) xfree(pwidthFree); - return; - } - n = miClipSpans(fbGetCompositeClip(pGC), - ppt, pwidth, n, - pptFree, pwidthFree, fSorted); - pwidth = pwidthFree; - ppt = pptFree; - switch (pGC->fillStyle) { - case FillSolid: - _sisSetSolidRect(sis,pGC->fgPixel,pGC->alu,cmd); - break; - case FillTiled: - cmd = sisTilePrepare (pGC->tile.pixmap, - pGC->patOrg.x + pDrawable->x, - pGC->patOrg.y + pDrawable->y, - pGC->alu); - break; - default: - cmd = sisStipplePrepare (pDrawable, pGC); - break; - } - while (n--) - { - x = ppt->x; - y = ppt->y; - ppt++; - width = *pwidth++; - if (width) - { - _sisRect(sis,x,y,width,1,cmd); - } - } - KdMarkSync (pDrawable->pScreen); - xfree(pptFree); - xfree(pwidthFree); -} - -#define NUM_STACK_RECTS 1024 - -void -sisPolyFillRect (DrawablePtr pDrawable, GCPtr pGC, - int nrectFill, xRectangle *prectInit) -{ - SetupSis(pDrawable->pScreen); - xRectangle *prect; - RegionPtr prgnClip; - register BoxPtr pbox; - register BoxPtr pboxClipped; - BoxPtr pboxClippedBase; - BoxPtr pextent; - BoxRec stackRects[NUM_STACK_RECTS]; - FbGCPrivPtr fbPriv = fbGetGCPrivate (pGC); - int numRects; - int n; - int xorg, yorg; - int x, y; - - if (!sisFillOk (pGC)) - { - KdCheckPolyFillRect (pDrawable, pGC, nrectFill, prectInit); - return; - } - prgnClip = fbGetCompositeClip(pGC); - xorg = pDrawable->x; - yorg = pDrawable->y; - - if (xorg || yorg) - { - prect = prectInit; - n = nrectFill; - while(n--) - { - prect->x += xorg; - prect->y += yorg; - prect++; - } - } - - prect = prectInit; - - numRects = REGION_NUM_RECTS(prgnClip) * nrectFill; - if (numRects > NUM_STACK_RECTS) - { - pboxClippedBase = (BoxPtr)xalloc(numRects * sizeof(BoxRec)); - if (!pboxClippedBase) - return; - } - else - pboxClippedBase = stackRects; - - pboxClipped = pboxClippedBase; - - if (REGION_NUM_RECTS(prgnClip) == 1) - { - int x1, y1, x2, y2, bx2, by2; - - pextent = REGION_RECTS(prgnClip); - x1 = pextent->x1; - y1 = pextent->y1; - x2 = pextent->x2; - y2 = pextent->y2; - while (nrectFill--) - { - if ((pboxClipped->x1 = prect->x) < x1) - pboxClipped->x1 = x1; - - if ((pboxClipped->y1 = prect->y) < y1) - pboxClipped->y1 = y1; - - bx2 = (int) prect->x + (int) prect->width; - if (bx2 > x2) - bx2 = x2; - pboxClipped->x2 = bx2; - - by2 = (int) prect->y + (int) prect->height; - if (by2 > y2) - by2 = y2; - pboxClipped->y2 = by2; - - prect++; - if ((pboxClipped->x1 < pboxClipped->x2) && - (pboxClipped->y1 < pboxClipped->y2)) - { - pboxClipped++; - } - } - } - else - { - int x1, y1, x2, y2, bx2, by2; - - pextent = REGION_EXTENTS(pGC->pScreen, prgnClip); - x1 = pextent->x1; - y1 = pextent->y1; - x2 = pextent->x2; - y2 = pextent->y2; - while (nrectFill--) - { - BoxRec box; - - if ((box.x1 = prect->x) < x1) - box.x1 = x1; - - if ((box.y1 = prect->y) < y1) - box.y1 = y1; - - bx2 = (int) prect->x + (int) prect->width; - if (bx2 > x2) - bx2 = x2; - box.x2 = bx2; - - by2 = (int) prect->y + (int) prect->height; - if (by2 > y2) - by2 = y2; - box.y2 = by2; - - prect++; - - if ((box.x1 >= box.x2) || (box.y1 >= box.y2)) - continue; - - n = REGION_NUM_RECTS (prgnClip); - pbox = REGION_RECTS(prgnClip); - - /* clip the rectangle to each box in the clip region - this is logically equivalent to calling Intersect() - */ - while(n--) - { - pboxClipped->x1 = max(box.x1, pbox->x1); - pboxClipped->y1 = max(box.y1, pbox->y1); - pboxClipped->x2 = min(box.x2, pbox->x2); - pboxClipped->y2 = min(box.y2, pbox->y2); - pbox++; - - /* see if clipping left anything */ - if(pboxClipped->x1 < pboxClipped->x2 && - pboxClipped->y1 < pboxClipped->y2) - { - pboxClipped++; - } - } - } - } - if (pboxClipped != pboxClippedBase) - { - switch (pGC->fillStyle) { - case FillSolid: - sisFillBoxSolid(pDrawable, - pboxClipped-pboxClippedBase, pboxClippedBase, - pGC->fgPixel, pGC->alu); - break; - case FillTiled: - sisFillBoxTiled(pDrawable, - pboxClipped-pboxClippedBase, pboxClippedBase, - pGC->tile.pixmap, - pGC->patOrg.x + pDrawable->x, - pGC->patOrg.y + pDrawable->y, - pGC->alu); - break; - case FillStippled: - case FillOpaqueStippled: - sisFillBoxStipple (pDrawable, pGC, - pboxClipped-pboxClippedBase, pboxClippedBase); - break; - } - } - if (pboxClippedBase != stackRects) - xfree(pboxClippedBase); -} - -static const GCOps sisOps = { - sisFillSpans, - KdCheckSetSpans, - KdCheckPutImage, - sisCopyArea, - sisCopyPlane, - KdCheckPolyPoint, - KdCheckPolylines, - KdCheckPolySegment, - miPolyRectangle, - KdCheckPolyArc, - miFillPolygon, - sisPolyFillRect, - KdCheckPolyFillArc, - miPolyText8, - miPolyText16, - miImageText8, - miImageText16, - sisImageGlyphBlt, - sisPolyGlyphBlt, - KdCheckPushPixels, -}; - -void -sisValidateGC (GCPtr pGC, Mask changes, DrawablePtr pDrawable) -{ - FbGCPrivPtr fbPriv = fbGetGCPrivate(pGC); - - fbValidateGC (pGC, changes, pDrawable); - - if (pDrawable->type == DRAWABLE_WINDOW) - pGC->ops = (GCOps *) &sisOps; - else - pGC->ops = (GCOps *) &kdAsyncPixmapGCOps; -} - -GCFuncs sisGCFuncs = { - sisValidateGC, - miChangeGC, - miCopyGC, - miDestroyGC, - miChangeClip, - miDestroyClip, - miCopyClip -}; - -int -sisCreateGC (GCPtr pGC) -{ - if (!fbCreateGC (pGC)) - return FALSE; - - if (pGC->depth != 1) - pGC->funcs = &sisGCFuncs; - - pGC->ops = (GCOps *) &kdAsyncPixmapGCOps; - - return TRUE; -} - -void -sisCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - KdScreenPriv(pScreen); - RegionRec rgnDst; - int dx, dy; - WindowPtr pwinRoot; - - pwinRoot = WindowTable[pWin->drawable.pScreen->myNum]; - - dx = ptOldOrg.x - pWin->drawable.x; - dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); - - REGION_INIT (pWin->drawable.pScreen, &rgnDst, NullBox, 0); - - REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst, &pWin->borderClip, prgnSrc); - - fbCopyRegion ((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot, - 0, - &rgnDst, dx, dy, sisCopyNtoN, 0, 0); - - REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); -} - -Bool -sisDrawInit (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - sisScreenInfo(pScreenPriv); - - /* - * Hook up asynchronous drawing - */ - KdScreenInitAsync (pScreen); - /* - * Replace various fb screen functions - */ - pScreen->CreateGC = sisCreateGC; - pScreen->CopyWindow = sisCopyWindow; - - return TRUE; -} - -void -sisDrawEnable (ScreenPtr pScreen) -{ - SetupSis(pScreen); - sisScreenInfo(pScreenPriv); - CARD32 cmd; - CARD32 base; - CARD16 stride; - CARD16 op; - - base = pScreenPriv->screen->fb[0].frameBuffer - sisc->frameBuffer; - stride = pScreenPriv->screen->fb[0].byteStride; -#if 0 - sis->u.general.dst_base = base; - sis->u.general.dst_pitch = stride; - sis->u.general.src_pitch = stride; - sis->u.general._pad0 = stride; - sis->u.general.dst_height = pScreenPriv->screen->height; - _sisClip (sis, 0, 0, - pScreenPriv->screen->width, pScreenPriv->screen->height); - _sisSetSolidRect(sis, pScreen->blackPixel, GXcopy, cmd); - _sisRect (sis, 0, 0, - pScreenPriv->screen->width, pScreenPriv->screen->height, - cmd); -#endif - base = (CARD32) (pScreenPriv->screen->fb[0].frameBuffer); - fprintf (stderr, "src 0x%x\n", sis->u.accel.src_addr); - sis->u.accel.src_addr = (base & 0x3fffff); - fprintf (stderr, "src 0x%x\n", sis->u.accel.src_addr); - sis->u.accel.dst_addr = (base & 0x3fffff); - sis->u.accel.pitch = (stride << 16) | stride; - sis->u.accel.dimension = ((pScreenPriv->screen->height-1) << 16 | - (pScreenPriv->screen->width - 1)); - sis->u.accel.fg = (sisBltRop[GXcopy] << 24) | 0xf800; - sis->u.accel.bg = (sisBltRop[GXcopy] << 24) | 0x00; - -#define sisLEFT2RIGHT 0x10 -#define sisRIGHT2LEFT 0x00 -#define sisTOP2BOTTOM 0x20 -#define sisBOTTOM2TOP 0x00 - -#define sisSRCSYSTEM 0x03 -#define sisSRCVIDEO 0x02 -#define sisSRCFG 0x01 -#define sisSRCBG 0x00 - -#define sisCMDBLT 0x0000 -#define sisCMDBLTMSK 0x0100 -#define sisCMDCOLEXP 0x0200 -#define sisCMDLINE 0x0300 - -#define sisCMDENHCOLEXP 0x2000 - -#define sisXINCREASE 0x10 -#define sisYINCREASE 0x20 -#define sisCLIPENABL 0x40 -#define sisCLIPINTRN 0x80 -#define sisCLIPEXTRN 0x00 - - -#define sisPATREG 0x08 -#define sisPATFG 0x04 -#define sisPATBG 0x00 - -#define sisLASTPIX 0x0800 -#define sisXMAJOR 0x0400 - - op = sisCMDBLT | sisLEFT2RIGHT | sisTOP2BOTTOM | sisSRCFG | sisPATFG; - - sis->u.accel.cmd = op; - - KdMarkSync (pScreen); -} - -void -sisDrawSync (ScreenPtr pScreen) -{ - SetupSis(pScreen); - - _sisWaitIdleEmpty (sis); -} - -void -sisDrawDisable (ScreenPtr pScreen) -{ -} - -void -sisDrawFini (ScreenPtr pScreen) -{ -} diff --git a/hw/kdrive/sis530/sisdraw.h b/hw/kdrive/sis530/sisdraw.h deleted file mode 100644 index 971ad64ac..000000000 --- a/hw/kdrive/sis530/sisdraw.h +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _SISDRAW_H_ -#define _SISDRAW_H_ - -#define SetupSis(s) KdScreenPriv(s); \ - sisCardInfo(pScreenPriv); \ - SisPtr sis = sisc->sis - -#define SIS_CMD_BITBLT (0) -#define SIS_CMD_COLOR_EXPAND (1) -#define SIS_CMD_ENH_COLOR_EXPAND (2) -#define SIS_CMD_MULTI_SCANLINE (3) -#define SIS_CMD_LINE (4) -#define SIS_CMD_TRAPEZOID (5) -#define SIS_CMD_TRANSPARENT_BITBLT (6) - -#define SIS_CMD_SRC_SCREEN (0 << 4) -#define SIS_CMD_SRC_CPU (1 << 4) - -#define SIS_CMD_PAT_FG (0 << 6) -#define SIS_CMD_PAT_PATTERN (1 << 6) -#define SIS_CMD_PAT_MONO (2 << 6) - -/* 8->15 rop */ - -#define SIS_CMD_DEC_X (0 << 16) -#define SIS_CMD_INC_X (1 << 16) - -#define SIS_CMD_DEC_Y (0 << 17) -#define SIS_CMD_INC_Y (1 << 17) - -#define SIS_CMD_RECT_CLIP_DISABLE (0 << 18) -#define SIS_CMD_RECT_CLIP_ENABLE (1 << 18) - -#define SIS_CMD_OPAQUE (0 << 20) -#define SIS_CMD_TRANSPARENT (1 << 20) - -#define SIS_CMD_RECT_CLIP_MERGE (0 << 26) -#define SIS_CMD_RECT_CLIP_DONT_MERGE (1 << 26) - -#define SIS_STAT_2D_IDLE (1 << 31) -#define SIS_STAT_3D_IDLE (1 << 30) -#define SIS_STAT_EMPTY (1 << 29) -#define SIS_STAT_CPU_BITBLT (0xf << 24) -#define SIS_STAT_ENH_COLOR_EXPAND (1 << 23) -#define SIS_STAT_AVAIL (0x1fff) - -extern CARD8 sisPatRop[16]; -extern CARD8 sisBltRop[16]; - -#define _sisSetSolidRect(sis,pix,alu,cmd) {\ - (sis)->u.general.pattern_fg = (pix); \ - (cmd) = (SIS_CMD_BITBLT | \ - SIS_CMD_SRC_SCREEN | \ - SIS_CMD_PAT_FG | \ - (sisPatRop[alu] << 8) | \ - SIS_CMD_INC_X | \ - SIS_CMD_INC_Y | \ - SIS_CMD_RECT_CLIP_DISABLE | \ - SIS_CMD_OPAQUE | \ - SIS_CMD_RECT_CLIP_DONT_MERGE); \ -} - -#define _sisClip(sis,x1,y1,x2,y2) { \ - (sis)->u.general.clip_left = (x1); \ - (sis)->u.general.clip_top = (y1); \ - (sis)->u.general.clip_right = (x2); \ - (sis)->u.general.clip_bottom = (y2); \ -} - -#define _sisRect(sis,x,y,w,h,cmd) { \ - (sis)->u.general.dst_x = (x); \ - (sis)->u.general.dst_y = (y); \ - (sis)->u.general.rect_width = (w); \ - (sis)->u.general.rect_height = (h); \ - (sis)->u.general.command = (cmd); \ -} - -#define _sisSetTransparentPlaneBlt(sis, alu, fg, cmd) { \ - (sis)->u.general.src_fg = (fg); \ - (cmd) = (SIS_CMD_ENH_COLOR_EXPAND | \ - SIS_CMD_SRC_CPU | \ - SIS_CMD_PAT_FG | \ - (sisBltRop[alu] << 8) | \ - SIS_CMD_INC_X | \ - SIS_CMD_INC_Y | \ - SIS_CMD_RECT_CLIP_DISABLE | \ - SIS_CMD_TRANSPARENT | \ - SIS_CMD_RECT_CLIP_DONT_MERGE); \ -} - -#define _sisSetOpaquePlaneBlt(sis, alu, fg, bg, cmd) { \ - (sis)->u.general.src_fg = (fg); \ - (sis)->u.general.src_bg = (bg); \ - (cmd) = (SIS_CMD_ENH_COLOR_EXPAND | \ - SIS_CMD_SRC_CPU | \ - SIS_CMD_PAT_FG | \ - (sisBltRop[alu] << 8) | \ - SIS_CMD_INC_X | \ - SIS_CMD_INC_Y | \ - SIS_CMD_RECT_CLIP_DISABLE | \ - SIS_CMD_OPAQUE | \ - SIS_CMD_RECT_CLIP_DONT_MERGE); \ -} - -#define _sisPlaneBlt(sis,x,y,w,h,cmd) _sisSolidRect(sis,x,y,w,h,cmd) - -#define _sisSetBlt(sis,alu,cmd) { \ - (sis)->u.general.src_base = (sis)->u.general.dst_base; \ - (sis)->u.general.src_pitch = (sis)->u.general.dst_pitch; \ - (cmd) = (SIS_CMD_RECT_CLIP_DONT_MERGE |\ - (sisBltRop[alu] << 8) |\ - SIS_CMD_PAT_FG |\ - SIS_CMD_SRC_SCREEN |\ - SIS_CMD_BITBLT); \ -} - -#define _sisBlt(sis,sx,sy,dx,dy,w,h,cmd) { \ - (sis)->u.general.src_x = (sx); \ - (sis)->u.general.src_y = (sy); \ - (sis)->u.general.dst_x = (dx); \ - (sis)->u.general.dst_y = (dy); \ - (sis)->u.general.rect_width = (w); \ - (sis)->u.general.rect_height = (h); \ - (sis)->u.general.command = (cmd); \ -} - -#define SIS_IE (SIS_STAT_2D_IDLE|SIS_STAT_EMPTY) - -#define _sisWaitIdleEmpty(sis) \ - while (((sis)->u.general.status & SIS_IE) != SIS_IE) - -/* - * Ok, so the Sis530 is broken -- it expects bitmaps to come MSB bit order, - * but it's willing to take them in LSB byte order. These macros - * flip bits around without flipping bytes. Instead of using a table - * and burning memory bandwidth, do them in place with the CPU. - */ - -/* The MIPS compiler automatically places these constants in registers */ -#define SisInvertBits32(v) { \ - v = ((v & 0x55555555) << 1) | ((v >> 1) & 0x55555555); \ - v = ((v & 0x33333333) << 2) | ((v >> 2) & 0x33333333); \ - v = ((v & 0x0f0f0f0f) << 4) | ((v >> 4) & 0x0f0f0f0f); \ -} - -#define SisInvertBits16(v) { \ - v = ((v & 0x5555) << 1) | ((v >> 1) & 0x5555); \ - v = ((v & 0x3333) << 2) | ((v >> 2) & 0x3333); \ - v = ((v & 0x0f0f) << 4) | ((v >> 4) & 0x0f0f); \ -} - -#define SisInvertBits8(v) { \ - v = ((v & 0x55) << 1) | ((v >> 1) & 0x55); \ - v = ((v & 0x33) << 2) | ((v >> 2) & 0x33); \ - v = ((v & 0x0f) << 4) | ((v >> 4) & 0x0f); \ -} - -#endif diff --git a/hw/kdrive/sis530/sisio.c b/hw/kdrive/sis530/sisio.c deleted file mode 100644 index 4741937a4..000000000 --- a/hw/kdrive/sis530/sisio.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#ifdef linux -#define extern -#include -#undef extern -#endif diff --git a/hw/kdrive/sis530/sisstub.c b/hw/kdrive/sis530/sisstub.c deleted file mode 100644 index 960510bff..000000000 --- a/hw/kdrive/sis530/sisstub.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "sis.h" - -static const int sisCards[] = { 0x6306, 0x0200 }; - -#define numSisCards (sizeof (sisCards) / sizeof (sisCards[0])) - -void -InitCard (char *name) -{ - KdCardAttr attr; - int i; - - for (i = 0; i < numSisCards; i++) - if (LinuxFindPci (0x1039, sisCards[i], 0, &attr)) - KdCardInfoAdd (&sisFuncs, &attr, (void *) sisCards[i]); -} - -void -InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) -{ - KdInitOutput (pScreenInfo, argc, argv); -} - -void -InitInput (int argc, char **argv) -{ - KdOsAddInputDrivers (); - KdInitInput (); -} - -void -ddxUseMsg (void) -{ - KdUseMsg(); -} - -int -ddxProcessArgument (int argc, char **argv, int i) -{ - return KdProcessArgument (argc, argv, i); -} diff --git a/hw/kdrive/smi/Makefile.am b/hw/kdrive/smi/Makefile.am deleted file mode 100644 index bd7077c56..000000000 --- a/hw/kdrive/smi/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -INCLUDES = \ - -I$(top_srcdir)/hw/kdrive/fbdev \ - -I$(top_srcdir)/hw/kdrive/vesa \ - @KDRIVE_INCS@ \ - @KDRIVE_CFLAGS@ - -bin_PROGRAMS = Xsmi - -noinst_LIBRARIES = libsmi.a - -# smivideo.c # not ready yet - -libsmi_a_SOURCES = \ - smi.c \ - smi.h \ - smidraw.c \ - smidraw.h - -Xsmi_SOURCES = \ - smistub.c - -SMI_LIBS = \ - libsmi.a \ - $(top_builddir)/hw/kdrive/fbdev/libfbdev.a \ - $(top_builddir)/hw/kdrive/vesa/libvesa.a \ - @KDRIVE_LIBS@ - -if GLX -Xsmi_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -endif - -Xsmi_LDADD = \ - $(SMI_LIBS) \ - @KDRIVE_LIBS@ - -Xsmi_DEPENDENCIES = \ - libsmi.a \ - @KDRIVE_LOCAL_LIBS@ - -relink: - rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS) diff --git a/hw/kdrive/smi/smi.c b/hw/kdrive/smi/smi.c deleted file mode 100644 index 7d4d725c7..000000000 --- a/hw/kdrive/smi/smi.c +++ /dev/null @@ -1,343 +0,0 @@ -/* - * Copyright © 2001 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "smi.h" -#include "kaa.h" -#include - -static Bool -smiCardInit (KdCardInfo *card) -{ - SmiCardInfo *smic; - - ENTER (); - smic = (SmiCardInfo *) xalloc (sizeof (SmiCardInfo)); - if (!smic) - return FALSE; - memset (smic, '\0', sizeof (SmiCardInfo)); - - (void) smiMapReg (card, smic); - - if (!subInitialize (card, &smic->sub)) - { - xfree (smic); - return FALSE; - } - - card->driver = smic; - LEAVE(); - return TRUE; -} - -static Bool -smiScreenInit (KdScreenInfo *screen) -{ - SmiCardInfo *smic = screen->card->driver; - SmiScreenInfo *smis; - - ENTER(); - smis = (SmiScreenInfo *) xalloc (sizeof (SmiScreenInfo)); - if (!smis) - return FALSE; - memset (smis, '\0', sizeof (SmiScreenInfo)); - screen->driver = smis; - if (!subScreenInitialize (screen, &smis->sub)) - { - xfree (smis); - return FALSE; - } - if (!smic->reg_base) - screen->dumb = TRUE; - screen->softCursor = TRUE; -#if SMI_VESA - smis->screen = smis->sub.fb; -#else - smis->screen = smic->sub.fb; -#endif - LEAVE(); - return TRUE; -} - -static Bool -smiInitScreen (ScreenPtr pScreen) -{ - Bool ret; - ENTER (); -#if 0 -#ifdef XV - KdScreenPriv(pScreen); - SmiCardInfo *smic = pScreenPriv->screen->card->driver; - if (smic->media_reg && smic->reg) - smiInitVideo(pScreen); -#endif -#endif - ret = subInitScreen (pScreen); - LEAVE(); - return ret; -} - -#ifdef RANDR -static Bool -smiRandRSetConfig (ScreenPtr pScreen, - Rotation randr, - int rate, - RRScreenSizePtr pSize) -{ - Bool ret; - - ENTER (); - kaaWaitSync (pScreen); - - ret = subRandRSetConfig (pScreen, randr, rate, pSize); - LEAVE(); - return ret; -} - -static Bool -smiRandRInit (ScreenPtr pScreen) -{ - rrScrPriv(pScreen); - - ENTER (); - pScrPriv->rrSetConfig = smiRandRSetConfig; - LEAVE (); - return TRUE; -} -#endif - -static Bool -smiFinishInitScreen (ScreenPtr pScreen) -{ - Bool ret; - ret = subFinishInitScreen (pScreen); -#ifdef RANDR - smiRandRInit (pScreen); -#endif - return ret; -} - -void -smiPreserve (KdCardInfo *card) -{ - ENTER (); - subPreserve(card); - LEAVE(); -} - -Bool -smiMapReg (KdCardInfo *card, SmiCardInfo *smic) -{ - ENTER (); - smic->io_base = 0; /* only handles one SMI card at standard VGA address */ - smic->reg_base = (CARD8 *) KdMapDevice (SMI_REG_BASE(card), - SMI_REG_SIZE(card)); - - if (!smic->reg_base) - { - smic->dpr = 0; - return FALSE; - } - - KdSetMappedMode (SMI_REG_BASE(card), - SMI_REG_SIZE(card), - KD_MAPPED_MODE_REGISTERS); - smic->dpr = (DPR *) (smic->reg_base + SMI_DPR_OFF(card)); - LEAVE (); - return TRUE; -} - -void -smiUnmapReg (KdCardInfo *card, SmiCardInfo *smic) -{ - ENTER (); - if (smic->reg_base) - { - KdResetMappedMode (SMI_REG_BASE(card), - SMI_REG_SIZE(card), - KD_MAPPED_MODE_REGISTERS); - KdUnmapDevice ((void *) smic->reg_base, SMI_REG_SIZE(card)); - smic->reg_base = 0; - smic->dpr = 0; - } - LEAVE (); -} - -void -smiOutb (CARD16 port, CARD8 val) -{ - asm volatile ("outb %b0,%w1" : : "a" (val), "d" (port)); -} - -CARD8 -smiInb (CARD16 port) -{ - CARD8 v; - asm volatile ("inb %w1,%b0" : "=a" (v) : "d" (port)); - return v; -} - -CARD8 -smiGetIndex (SmiCardInfo *smic, CARD16 addr, CARD16 data, CARD8 id) -{ - smiOutb (smic->io_base + addr, id); - return smiInb (smic->io_base + data); -} - -void -smiSetIndex (SmiCardInfo *smic, CARD16 addr, CARD16 data, CARD8 id, CARD8 val) -{ - smiOutb (smic->io_base + addr, id); - smiOutb (smic->io_base + data, val); -} - -void -smiSetMMIO (KdCardInfo *card, SmiCardInfo *smic) -{ - ENTER (); - if (!smic->reg_base) - smiMapReg (card, smic); - LEAVE(); -} - -void -smiResetMMIO (KdCardInfo *card, SmiCardInfo *smic) -{ - smiUnmapReg (card, smic); -} - -static Bool -smiDPMS (ScreenPtr pScreen, int mode) -{ - Bool ret; - ENTER (); - ret = subDPMS (pScreen, mode); - LEAVE (); - return ret; -} - -Bool -smiEnable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - SmiCardInfo *smic = pScreenPriv->card->driver; - - ENTER (); - iopl (3); - if (!subEnable (pScreen)) - return FALSE; - - smiSetMMIO (pScreenPriv->card, smic); - smiDPMS (pScreen, KD_DPMS_NORMAL); -#if 0 -#ifdef XV - KdXVEnable (pScreen); -#endif -#endif - LEAVE (); - return TRUE; -} - -void -smiDisable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - SmiCardInfo *smic = pScreenPriv->card->driver; - - ENTER (); -#if 0 -#ifdef XV - KdXVDisable (pScreen); -#endif -#endif - smiResetMMIO (pScreenPriv->card, smic); - subDisable (pScreen); - LEAVE (); -} - -static void -smiRestore (KdCardInfo *card) -{ - ENTER (); - subRestore (card); - LEAVE(); -} - -static void -smiScreenFini (KdScreenInfo *screen) -{ - SmiScreenInfo *smis = (SmiScreenInfo *) screen->driver; - - ENTER (); - subScreenFini (screen); - xfree (smis); - screen->driver = 0; - LEAVE (); -} - -static void -smiCardFini (KdCardInfo *card) -{ - SmiCardInfo *smic = card->driver; - - ENTER (); - smiUnmapReg (card, smic); - subCardFini (card); - LEAVE (); -} - -#define smiCursorInit 0 /* initCursor */ -#define smiCursorEnable 0 /* enableCursor */ -#define smiCursorDisable 0 /* disableCursor */ -#define smiCursorFini 0 /* finiCursor */ -#define smiRecolorCursor 0 /* recolorCursor */ - -KdCardFuncs smiFuncs = { - smiCardInit, /* cardinit */ - smiScreenInit, /* scrinit */ - smiInitScreen, /* initScreen */ - smiFinishInitScreen, /* finishInitScreen */ - subCreateResources, /* createRes */ - smiPreserve, /* preserve */ - smiEnable, /* enable */ - smiDPMS, /* dpms */ - smiDisable, /* disable */ - smiRestore, /* restore */ - smiScreenFini, /* scrfini */ - smiCardFini, /* cardfini */ - - smiCursorInit, /* initCursor */ - smiCursorEnable, /* enableCursor */ - smiCursorDisable, /* disableCursor */ - smiCursorFini, /* finiCursor */ - smiRecolorCursor, /* recolorCursor */ - - smiDrawInit, /* initAccel */ - smiDrawEnable, /* enableAccel */ - smiDrawDisable, /* disableAccel */ - smiDrawFini, /* finiAccel */ - - subGetColors, /* getColors */ - subPutColors, /* putColors */ -}; diff --git a/hw/kdrive/smi/smi.h b/hw/kdrive/smi/smi.h deleted file mode 100644 index ef0fd110a..000000000 --- a/hw/kdrive/smi/smi.h +++ /dev/null @@ -1,257 +0,0 @@ -/* - * Copyright © 2001 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _SMI_H_ -#define _SMI_H_ - -#define SMI_VESA 0 - -#if SMI_VESA -#include -#define subGetColors vesaGetColors -#define subPutColors vesaPutColors -#define subInitialize vesaInitialize -#define subScreenInitialize vesaScreenInitialize -#define subInitScreen vesaInitScreen -#define subFinishInitScreen vesaFinishInitScreen -#define subCreateResources vesaCreateResources -#define subRandRSetConfig vesaRandRSetConfig -#define subPreserve vesaPreserve -#define subEnable vesaEnable -#define subDPMS vesaDPMS -#define subRestore vesaRestore -#define subScreenFini vesaScreenFini -#define subCardFini vesaCardFini -#define subDisable vesaDisable -#define SubCardPrivRec VesaCardPrivRec -#define SubScreenPrivRec VesaScreenPrivRec -#define subUseMsg() vesaUseMsg() -#define subProcessArgument(c,v,i) vesaProcessArgument(c,v,i) -#else -#include -#define subGetColors fbdevGetColors -#define subPutColors fbdevPutColors -#define subInitialize fbdevInitialize -#define subScreenInitialize fbdevScreenInitialize -#define subInitScreen fbdevInitScreen -#define subFinishInitScreen fbdevFinishInitScreen -#define subCreateResources fbdevCreateResources -#define subRandRSetConfig fbdevRandRSetConfig -#define subPreserve fbdevPreserve -#define subEnable fbdevEnable -#define subDPMS fbdevDPMS -#define subRestore fbdevRestore -#define subScreenFini fbdevScreenFini -#define subCardFini fbdevCardFini -#define subDisable fbdevDisable -#define SubCardPrivRec FbdevPriv -#define SubScreenPrivRec FbdevScrPriv -#define subUseMsg() -#define subProcessArgument(c,v,i) 0 -#endif - -#include "kxv.h" - -#define SMI_DEBUG 0 -#if SMI_DEBUG -#define DBGOUT(fmt,a...) fprintf (stderr, fmt, ##a) -#else -#define DBGOUT(fmt,a...) -#endif - -#define ENTER() DBGOUT("Enter %s\n", __FUNCTION__) -#define LEAVE() DBGOUT("Leave %s\n", __FUNCTION__) - -/* - * offset from ioport beginning - */ - -#define SMI_IO_BASE(c) ((c)->attr.io) -#define SMI_REG_BASE(c) ((c)->attr.address[0]) -#define SMI_REG_SIZE(c) (4096) - -#define SMI_DPR_OFF(c) (0x00000) - -typedef volatile CARD8 VOL8; -typedef volatile CARD16 VOL16; -typedef volatile CARD32 VOL32; - -/* DPR reg */ -typedef struct _DPR { - VOL32 src_xy; /* 0x00 */ - VOL32 dst_xy; /* 0x04 */ - VOL32 dst_wh; /* 0x08 */ - VOL32 accel_cmd; /* 0x0c */ - VOL32 src_stride; /* 0x10 */ - VOL32 fg; /* 0x14 */ - VOL32 bg; /* 0x18 */ - VOL32 data_format; /* 0x1c */ - VOL32 transparent; /* 0x20 */ - VOL32 mask1; /* 0x24 ? */ - VOL32 mask2; /* 0x28 ? */ - VOL32 scissors_ul; /* 0x2c */ - VOL32 scissors_lr; /* 0x30 */ - VOL32 mask3; /* 0x34 */ - VOL32 mask4; /* 0x38 */ - VOL32 dst_stride; /* 0x3c */ - VOL32 unknown_40; /* 0x40 */ - VOL32 unknown_44; /* 0x44 */ -} DPR; - -#define SMI_XY(x,y) (((y) & 0x7fff) | (((x) & 0x7fff) << 16)) - -/* 2D Engine commands */ -#define SMI_TRANSPARENT_SRC 0x00000100 -#define SMI_TRANSPARENT_DEST 0x00000300 - -#define SMI_OPAQUE_PXL 0x00000000 -#define SMI_TRANSPARENT_PXL 0x00000400 - -#define SMI_MONO_PACK_8 0x00001000 -#define SMI_MONO_PACK_16 0x00002000 -#define SMI_MONO_PACK_32 0x00003000 - -#define SMI_ROP2_SRC 0x00008000 -#define SMI_ROP2_PAT 0x0000C000 -#define SMI_ROP3 0x00000000 - -#define SMI_BITBLT 0x00000000 -#define SMI_RECT_FILL 0x00010000 -#define SMI_TRAPEZOID_FILL 0x00030000 -#define SMI_SHORT_STROKE 0x00060000 -#define SMI_BRESENHAM_LINE 0x00070000 -#define SMI_HOSTBLT_WRITE 0x00080000 -#define SMI_HOSTBLT_READ 0x00090000 -#define SMI_ROTATE_BLT 0x000B0000 - -#define SMI_SRC_COLOR 0x00000000 -#define SMI_SRC_MONOCHROME 0x00400000 - -#define SMI_GRAPHICS_STRETCH 0x00800000 - -#define SMI_ROTATE_CW 0x01000000 -#define SMI_ROTATE_CCW 0x02000000 - -#define SMI_MAJOR_X 0x00000000 -#define SMI_MAJOR_Y 0x04000000 - -#define SMI_LEFT_TO_RIGHT 0x00000000 -#define SMI_RIGHT_TO_LEFT 0x08000000 - -#define SMI_COLOR_PATTERN 0x40000000 -#define SMI_MONO_PATTERN 0x00000000 - -#define SMI_QUICK_START 0x10000000 -#define SMI_START_ENGINE 0x80000000 - -#define VGA_SEQ_INDEX 0x3C4 -#define VGA_SEQ_DATA 0x3C5 - -typedef struct _smiCardInfo { - SubCardPrivRec sub; - CARD16 io_base; - CARD8 *reg_base; - DPR *dpr; - int avail; -} SmiCardInfo; - -#define getSmiCardInfo(kd) ((SmiCardInfo *) ((kd)->card->driver)) -#define smiCardInfo(kd) SmiCardInfo *smic = getSmiCardInfo(kd) - -typedef struct _smiScreenInfo { - SubScreenPrivRec sub; - CARD8 *screen; - CARD32 stride; - CARD32 data_format; - CARD8 dpr_vpr_enable; - KaaScreenInfoRec kaa; -} SmiScreenInfo; - -#define getSmiScreenInfo(kd) ((SmiScreenInfo *) ((kd)->screen->driver)) -#define smiScreenInfo(kd) SmiScreenInfo *smis = getSmiScreenInfo(kd) - -void -smiPreserve (KdCardInfo *card); - -Bool -smiMapReg (KdCardInfo *card, SmiCardInfo *smic); - -void -smiUnmapReg (KdCardInfo *card, SmiCardInfo *smic); - -void -smiOutb (CARD16 port, CARD8 val); - -CARD8 -smiInb (CARD16 port); - -CARD8 -smiGetIndex (SmiCardInfo *smic, CARD16 addr, CARD16 data, CARD8 id); - -void -smiSetIndex (SmiCardInfo *smic, CARD16 addr, CARD16 data, CARD8 id, CARD8 val); - -void -smiSetMMIO (KdCardInfo *card, SmiCardInfo *smic); - -void -smiResetMMIO (KdCardInfo *card, SmiCardInfo *smic); - -Bool -smiEnable (ScreenPtr pScreen); - -void -smiDisable (ScreenPtr pScreen); - -void -smiWaitAvail(SmiCardInfo *smic, int n); - -void -smiWaitIdle (SmiCardInfo *smic); - -Bool -smiDrawSetup (ScreenPtr pScreen); - -Bool -smiDrawInit (ScreenPtr pScreen); - -void -smiDrawReinit (ScreenPtr pScreen); - -void -smiDrawEnable (ScreenPtr pScreen); - -void -smiDrawDisable (ScreenPtr pScreen); - -void -smiDrawFini (ScreenPtr pScreen); - -CARD8 -smiReadIndex (SmiCardInfo *smic, CARD16 port, CARD8 index); - -void -smiWriteIndex (SmiCardInfo *smic, CARD16 port, CARD8 index, CARD8 value); - -extern KdCardFuncs smiFuncs; - -#endif /* _SMI_H_ */ diff --git a/hw/kdrive/smi/smidraw.c b/hw/kdrive/smi/smidraw.c deleted file mode 100644 index ba4e3904d..000000000 --- a/hw/kdrive/smi/smidraw.c +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "smi.h" -#include "smidraw.h" - -#include -#include "gcstruct.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "regionstr.h" -#include "mistruct.h" -#include "dixfontstr.h" -#include "fb.h" -#include "migc.h" -#include "miline.h" -#include "picturestr.h" -#include "kaa.h" - -CARD8 smiBltRop[16] = { - /* GXclear */ 0x00, /* 0 */ - /* GXand */ 0x88, /* src AND dst */ - /* GXandReverse */ 0x44, /* src AND NOT dst */ - /* GXcopy */ 0xcc, /* src */ - /* GXandInverted*/ 0x22, /* NOT src AND dst */ - /* GXnoop */ 0xaa, /* dst */ - /* GXxor */ 0x66, /* src XOR dst */ - /* GXor */ 0xee, /* src OR dst */ - /* GXnor */ 0x11, /* NOT src AND NOT dst */ - /* GXequiv */ 0x99, /* NOT src XOR dst */ - /* GXinvert */ 0x55, /* NOT dst */ - /* GXorReverse */ 0xdd, /* src OR NOT dst */ - /* GXcopyInverted*/ 0x33, /* NOT src */ - /* GXorInverted */ 0xbb, /* NOT src OR dst */ - /* GXnand */ 0x77, /* NOT src OR NOT dst */ - /* GXset */ 0xff, /* 1 */ -}; - -CARD8 smiSolidRop[16] = { - /* GXclear */ 0x00, /* 0 */ - /* GXand */ 0xa0, /* src AND dst */ - /* GXandReverse */ 0x50, /* src AND NOT dst */ - /* GXcopy */ 0xf0, /* src */ - /* GXandInverted*/ 0x0a, /* NOT src AND dst */ - /* GXnoop */ 0xaa, /* dst */ - /* GXxor */ 0x5a, /* src XOR dst */ - /* GXor */ 0xfa, /* src OR dst */ - /* GXnor */ 0x05, /* NOT src AND NOT dst */ - /* GXequiv */ 0xa5, /* NOT src XOR dst */ - /* GXinvert */ 0x55, /* NOT dst */ - /* GXorReverse */ 0xf5, /* src OR NOT dst */ - /* GXcopyInverted*/ 0x0f, /* NOT src */ - /* GXorInverted */ 0xaf, /* NOT src OR dst */ - /* GXnand */ 0x5f, /* NOT src OR NOT dst */ - /* GXset */ 0xff, /* 1 */ -}; - - -#define GET_STATUS(smic) smiGetIndex (smic, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x16) - -#define ENGINE_IDLE_EMPTY(smic) ((GET_STATUS(smic) & 0x18) == 0x10) -#define FIFO_EMPTY(smic) ((GET_STATUS(smic) & 0x10) == 0x10) - -#define MAX_FIFO 16 - -void -smiWaitAvail(SmiCardInfo *smic, int n) -{ - if (smic->avail < n) - { - while (!FIFO_EMPTY (smic)) - ; - smic->avail = MAX_FIFO; - } - smic->avail -= n; -} - -void -smiWaitIdle (SmiCardInfo *smic) -{ - while (!ENGINE_IDLE_EMPTY (smic)) - ; - smic->avail = MAX_FIFO; -} - -static SmiCardInfo *smic; -static SmiScreenInfo *smis; -static DPR *dpr; -static CARD32 accel_cmd; - -static Bool -smiSetup (ScreenPtr pScreen, int wait) -{ - KdScreenPriv(pScreen); - - smis = getSmiScreenInfo (pScreenPriv); - smic = getSmiCardInfo(pScreenPriv); - dpr = smic->dpr; - - if (!dpr) - return FALSE; - - /* enable DPR/VPR registers */ - smiSetIndex (smic, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x21, - smis->dpr_vpr_enable); - - smiWaitAvail (smic, wait + 9); - dpr->src_stride = (smis->stride << 16) | smis->stride; - dpr->data_format = smis->data_format; - dpr->mask1 = 0xffffffff; - dpr->mask2 = 0xffffffff; - dpr->dst_stride = (smis->stride << 16) | smis->stride; - dpr->unknown_40 = 0x0; - dpr->unknown_44 = 0x0; - dpr->scissors_ul = 0x0; - dpr->scissors_lr = SMI_XY(4095,4095); - - return TRUE; -} - -static void -smiWaitMarker (ScreenPtr pScreen, int marker) -{ - KdScreenPriv(pScreen); - smic = getSmiCardInfo(pScreenPriv); - - smiWaitIdle (smic); -} - -static Bool -smiPrepareSolid (PixmapPtr pPixmap, - int alu, - Pixel pm, - Pixel fg) -{ - if (~pm & FbFullMask(pPixmap->drawable.depth)) - return FALSE; - - if (!smiSetup (pPixmap->drawable.pScreen, 3)) - return FALSE; - - accel_cmd = smiSolidRop[alu] | SMI_BITBLT | SMI_START_ENGINE; - dpr->fg = fg; - dpr->mask3 = 0xffffffff; - dpr->mask4 = 0xffffffff; - return TRUE; -} - -static void -smiSolid (int x1, int y1, int x2, int y2) -{ - smiWaitAvail(smic,3); - dpr->dst_xy = SMI_XY(x1,y1); - dpr->dst_wh = SMI_XY(x2-x1,y2-y1); - dpr->accel_cmd = accel_cmd; -} - -static void -smiDoneSolid (void) -{ -} - -static int copyDx; -static int copyDy; - -static Bool -smiPrepareCopy (PixmapPtr pSrcPixmap, - PixmapPtr pDstPixmap, - int dx, - int dy, - int alu, - Pixel pm) -{ - if (~pm & FbFullMask(pSrcPixmap->drawable.depth)) - return FALSE; - - if (!smiSetup (pSrcPixmap->drawable.pScreen, 0)) - return FALSE; - - accel_cmd = smiBltRop[alu] | SMI_BITBLT | SMI_START_ENGINE; - - copyDx = dx; - copyDy = dy; - if (dy < 0 || (dy == 0 && dx < 0)) - accel_cmd |= SMI_RIGHT_TO_LEFT; - return TRUE; -} - -static void -smiCopy (int srcX, - int srcY, - int dstX, - int dstY, - int w, - int h) -{ - if (accel_cmd & SMI_RIGHT_TO_LEFT) - { - srcX += w - 1; - dstX += w - 1; - srcY += h - 1; - dstY += h - 1; - } - smiWaitAvail (smic, 4); - dpr->src_xy = SMI_XY (srcX, srcY); - dpr->dst_xy = SMI_XY (dstX, dstY); - dpr->dst_wh = SMI_XY (w, h); - dpr->accel_cmd = accel_cmd; -} - -static void -smiDoneCopy (void) -{ -} - - -Bool -smiDrawInit (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - smiCardInfo (pScreenPriv); - - ENTER (); - if (pScreenPriv->screen->fb[0].depth == 4) - { - LEAVE (); - return FALSE; - } - - if (!smic->dpr) - { - LEAVE (); - return FALSE; - } - - memset(&smis->kaa, 0, sizeof(KaaScreenInfoRec)); - smis->kaa.PrepareSolid = smiPrepareSolid; - smis->kaa.Solid = smiSolid; - smis->kaa.DoneSolid = smiDoneSolid; - smis->kaa.PrepareCopy = smiPrepareCopy; - smis->kaa.Copy = smiCopy; - smis->kaa.DoneCopy = smiDoneCopy; - smis->kaa.waitMarker = smiWaitMarker; - - if (!kaaDrawInit (pScreen, &smis->kaa)) - { - LEAVE (); - return FALSE; - } - - LEAVE (); - return TRUE; -} - -void -smiDrawEnable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - int i; - static const int xyAddress[] = { 320, 400, 512, 640, 800, 1024, 1280, 1600, 2048 }; - - ENTER (); - smis = getSmiScreenInfo (pScreenPriv); - smic = getSmiCardInfo(pScreenPriv); - dpr = smic->dpr; - - smis->stride = pScreenPriv->screen->fb[0].byteStride; - smis->dpr_vpr_enable = smiGetIndex (smic, VGA_SEQ_INDEX, - VGA_SEQ_DATA, 0x21) & ~0x03; - - switch (pScreenPriv->screen->fb[0].depth) { - case 8: - smis->data_format = 0x00000000; - break; - case 15: - case 16: - smis->data_format = 0x00100000; - smis->stride >>= 1; - break; - case 24: - smis->data_format = 0x00300000; - break; - case 32: - smis->data_format = 0x00200000; - smis->stride >>= 2; - break; - } - for (i = 0; i < sizeof(xyAddress) / sizeof(xyAddress[0]); i++) - { - if (xyAddress[i] == pScreenPriv->screen->fb[0].pixelStride) - { - smis->data_format |= i << 16; - break; - } - } - - smiSetup (pScreen, 0); - kaaMarkSync (pScreen); - LEAVE (); -} - -void -smiDrawDisable (ScreenPtr pScreen) -{ - ENTER (); - smic = 0; - smis = 0; - dpr = 0; - accel_cmd = 0; - LEAVE (); -} - -void -smiDrawFini (ScreenPtr pScreen) -{ - ENTER (); - LEAVE (); -} diff --git a/hw/kdrive/smi/smidraw.h b/hw/kdrive/smi/smidraw.h deleted file mode 100644 index 4165c7406..000000000 --- a/hw/kdrive/smi/smidraw.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _SMIDRAW_H_ -#define _SMIDRAW_H_ - -#define SetupSmi(s) KdScreenPriv(s); \ - smiCardInfo(pScreenPriv); \ - Cop *cop = smic->cop - -#define SmiAlpha (COP_MULTI_ALPHA|COP_ALPHA_WRITE_ENABLE) - -#define _smiInit(cop,smic) { \ - if ((cop)->status == 0xffffffff) smiSetMMIO(smic); \ - (cop)->multi = (smic)->cop_depth; \ - (cop)->multi = (smic)->cop_stride; \ - (cop)->multi = SmiAlpha; \ -} \ - -#define _smiSetSolidRect(cop,pix,alu,cmd) {\ - cop->multi = COP_MULTI_PATTERN; \ - cop->multi = COP_MULTI_ROP | smiRop[alu]; \ - cop->fg = (pix); \ - cmd = COP_OP_BLT | COP_SCL_OPAQUE | COP_OP_ROP | COP_OP_FG; \ -} - -#define _smiRect(cop,x1,y1,x2,y2,cmd) { \ - (cop)->dst_start_xy = TRI_XY (x1,y1); \ - (cop)->dst_end_xy = TRI_XY(x2,y2); \ - _smiWaitDone(cop); \ - (cop)->command = (cmd); \ -} - -#define COP_STATUS_BUSY (COP_STATUS_BE_BUSY | \ - COP_STATUS_DPE_BUSY | \ - COP_STATUS_MI_BUSY) - -#define _smiWaitDone(cop) { \ - int __q__ = 500000; \ - while (__q__-- && (cop)->status & COP_STATUS_BUSY) \ - ; \ - if (!__q__) \ - (cop)->status = 0; \ -} - -#define _smiWaitIdleEmpty(cop) _smiWaitDone(cop) - -#define sourceInvarient(alu) (((alu) & 3) == (((alu) >> 2) & 3)) - -#endif diff --git a/hw/kdrive/smi/smistub.c b/hw/kdrive/smi/smistub.c deleted file mode 100644 index 59faf2839..000000000 --- a/hw/kdrive/smi/smistub.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "smi.h" -#include "klinux.h" - -void -InitCard (char *name) -{ - KdCardAttr attr; - - if (LinuxFindPci (0x126f, 0x0720, 0, &attr)) - KdCardInfoAdd (&smiFuncs, &attr, 0); -} - -void -InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) -{ - KdInitOutput (pScreenInfo, argc, argv); -} - -void -InitInput (int argc, char **argv) -{ - KdOsAddInputDrivers (); - KdInitInput (); -} - -void -ddxUseMsg (void) -{ - KdUseMsg(); - subUseMsg(); -} - -int -ddxProcessArgument (int argc, char **argv, int i) -{ - int ret; - - if (!(ret = subProcessArgument (argc, argv, i))) - ret = KdProcessArgument(argc, argv, i); - return ret; -} diff --git a/hw/kdrive/smi/smivideo.c b/hw/kdrive/smi/smivideo.c deleted file mode 100644 index f372498c0..000000000 --- a/hw/kdrive/smi/smivideo.c +++ /dev/null @@ -1,1015 +0,0 @@ -/* - * Copyright © 2001 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -#ifdef HAVE_CONFIG_H -#include -#endif -#include "mach64.h" - -#include "Xv.h" -#include "../../xfree86/common/fourcc.h" - -#define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE) - -static Atom xvBrightness, xvSaturation, xvColorKey; - -#define IMAGE_MAX_WIDTH 720 -#define IMAGE_MAX_HEIGHT 576 - -static void -mach64StopVideo(KdScreenInfo *screen, pointer data, Bool exit) -{ - ScreenPtr pScreen = screen->pScreen; - KdScreenPriv(pScreen); - KdCardInfo *card = pScreenPriv->card; - Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver; - Mach64CardInfo *mach64c = (Mach64CardInfo *) card->driver; - Mach64PortPrivPtr pPortPriv = mach64s->pAdaptor->pPortPrivates[0].ptr; - Reg *reg = mach64c->reg; - MediaReg *media = mach64c->media_reg; - - REGION_EMPTY(screen->pScreen, &pPortPriv->clip); - - if (!media) - return; - - if(pPortPriv->videoOn) - { - mach64WaitIdle (reg); - /* wait for buffer to be displayed */ - while (((media->TRIG_CNTL >> 5) & 1) != pPortPriv->currentBuf) - ; - /* wait for buffer to be finished */ - while (((media->TRIG_CNTL >> 6) & 1) != 0) - ; - mach64WaitAvail (reg, 1); - media->OVERLAY_SCALE_CNTL = 0; - pPortPriv->videoOn = FALSE; - mach64WaitIdle (reg); - } -} - -static int -mach64SetPortAttribute(KdScreenInfo *screen, - Atom attribute, - int value, - pointer data) -{ - ScreenPtr pScreen = screen->pScreen; - KdScreenPriv(pScreen); - KdCardInfo *card = pScreenPriv->card; - Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver; - Mach64CardInfo *mach64c = (Mach64CardInfo *) card->driver; - Mach64PortPrivPtr pPortPriv = mach64s->pAdaptor->pPortPrivates[0].ptr; - MediaReg *media = mach64c->media_reg; - - if(attribute == xvBrightness) - { - if(value < -1000) - value = -1000; - if (value > 1000) - value = 1000; - pPortPriv->brightness = value; - } - else if(attribute == xvSaturation) - { - if (value < -1000) - value = -1000; - if (value > 1000) - value = 1000; - pPortPriv->saturation = value; - } - else if(attribute == xvColorKey) - { - if (pPortPriv->colorKey != value) - { - pPortPriv->colorKey = value; - REGION_EMPTY(screen->pScreen, &pPortPriv->clip); - } - } - else - return BadMatch; - - return Success; -} - -static int -mach64GetPortAttribute(KdScreenInfo *screen, - Atom attribute, - int *value, - pointer data) -{ - Mach64PortPrivPtr pPortPriv = (Mach64PortPrivPtr)data; - - if(attribute == xvBrightness) - *value = pPortPriv->brightness; - else if(attribute == xvSaturation) - *value = pPortPriv->saturation; - else if(attribute == xvColorKey) - *value = pPortPriv->colorKey; - else - return BadMatch; - - return Success; -} - -static void -mach64QueryBestSize(KdScreenInfo *screen, - Bool motion, - short vid_w, - short vid_h, - short drw_w, - short drw_h, - unsigned int *p_w, - unsigned int *p_h, - pointer data) -{ - *p_w = drw_w; - *p_h = drw_h; -} - - -static void -mach64CopyPackedData(KdScreenInfo *screen, - unsigned char *buf, - int randr, - int srcPitch, - int dstPitch, - int srcW, - int srcH, - int top, - int left, - int h, - int w) -{ - ScreenPtr pScreen = screen->pScreen; - KdScreenPriv(pScreen); - KdCardInfo *card = pScreenPriv->card; - Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver; - Mach64CardInfo *mach64c = (Mach64CardInfo *) card->driver; - Mach64PortPrivPtr pPortPriv = mach64s->pAdaptor->pPortPrivates[0].ptr; - CARD8 *src, *dst; - int srcDown, srcRight, srcNext; - int p; - - switch (randr & RR_Rotate_All) { - case RR_Rotate_0: - src = buf; - srcDown = srcPitch; - srcRight = 2; - break; - case RR_Rotate_90: - src = buf + (srcH - 1) * 2; - srcDown = -2; - srcRight = srcPitch; - break; - case RR_Rotate_180: - src = buf + srcPitch * (srcH - 1) + (srcW - 1) * 2; - srcDown = -srcPitch; - srcRight = -2; - break; - case RR_Rotate_270: - src = buf + srcPitch * (srcW - 1); - srcDown = 2; - srcRight = -srcPitch; - break; - } - - src = src + top*srcDown + left*srcRight; - - if (pPortPriv->currentBuf == 0) - dst = (CARD8 *) mach64s->vesa.fb + pPortPriv->YBuf0Offset; - else - dst = (CARD8 *) mach64s->vesa.fb + pPortPriv->YBuf1Offset; - - w >>= 1; - srcRight >>= 1; - srcNext = srcRight >> 1; - while(h--) - { - CARD16 *s = (CARD16 *) src; - CARD32 *d = (CARD32 *) dst; - p = w; - while (p--) - { - *d++ = s[0] | (s[srcNext] << 16); - s += srcRight; - } - src += srcPitch; - dst += dstPitch; - } -} - -static void -mach64CopyPlanarData(KdScreenInfo *screen, - unsigned char *buf, - int randr, - int srcPitch, - int srcPitch2, - int dstPitch, /* of chroma */ - int srcW, - int srcH, - int height, - int top, - int left, - int h, - int w, - int id) -{ - ScreenPtr pScreen = screen->pScreen; - KdScreenPriv(pScreen); - KdCardInfo *card = pScreenPriv->card; - Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver; - Mach64CardInfo *mach64c = (Mach64CardInfo *) card->driver; - Mach64PortPrivPtr pPortPriv = mach64s->pAdaptor->pPortPrivates[0].ptr; - int i, j; - CARD8 *src1, *src2, *src3, *dst1; - int srcDown, srcDown2, srcRight, srcRight2, srcNext; - - /* compute source data pointers */ - src1 = buf; - src2 = src1 + height * srcPitch; - src3 = src2 + (height >> 1) * srcPitch2; - switch (randr & RR_Rotate_All) { - case RR_Rotate_0: - srcDown = srcPitch; - srcDown2 = srcPitch2; - srcRight = 2; - srcRight2 = 1; - srcNext = 1; - break; - case RR_Rotate_90: - src1 = src1 + srcH - 1; - src2 = src2 + (srcH >> 1) - 1; - src3 = src3 + (srcH >> 1) - 1; - srcDown = -1; - srcDown2 = -1; - srcRight = srcPitch * 2; - srcRight2 = srcPitch2; - srcNext = srcPitch; - break; - case RR_Rotate_180: - src1 = src1 + srcPitch * (srcH - 1) + (srcW - 1); - src2 = src2 + srcPitch2 * ((srcH >> 1) - 1) + ((srcW >> 1) - 1); - src3 = src3 + srcPitch2 * ((srcH >> 1) - 1) + ((srcW >> 1) - 1); - srcDown = -srcPitch; - srcDown2 = -srcPitch2; - srcRight = -2; - srcRight2 = -1; - srcNext = -1; - break; - case RR_Rotate_270: - src1 = src1 + srcPitch * (srcW - 1); - src2 = src2 + srcPitch2 * ((srcW >> 1) - 1); - src3 = src3 + srcPitch2 * ((srcW >> 1) - 1); - srcDown = 1; - srcDown2 = 1; - srcRight = -srcPitch * 2; - srcRight2 = -srcPitch2; - srcNext = -srcPitch; - break; - } - - /* adjust for origin */ - src1 += top * srcDown + left * srcNext; - src2 += (top >> 1) * srcDown2 + (left >> 1) * srcRight2; - src3 += (top >> 1) * srcDown2 + (left >> 1) * srcRight2; - - if (id == FOURCC_I420) - { - CARD8 *srct = src2; - src2 = src3; - src3 = srct; - } - - if (pPortPriv->currentBuf == 0) - dst1 = (CARD8 *) mach64s->vesa.fb + pPortPriv->YBuf0Offset; - else - dst1 = (CARD8 *) mach64s->vesa.fb + pPortPriv->YBuf1Offset; - - w >>= 1; - for (j = 0; j < h; j++) - { - CARD32 *dst = (CARD32 *) dst1; - CARD8 *s1l = src1; - CARD8 *s1r = src1 + srcNext; - CARD8 *s2 = src2; - CARD8 *s3 = src3; - - for (i = 0; i < w; i++) - { - *dst++ = *s1l | (*s1r << 16) | (*s3 << 8) | (*s2 << 24); - s1l += srcRight; - s1r += srcRight; - s2 += srcRight2; - s3 += srcRight2; - } - src1 += srcDown; - dst1 += dstPitch; - if (j & 1) - { - src2 += srcDown2; - src3 += srcDown2; - } - } -} - -static void -mach64PaintRegion (ScreenPtr pScreen, RegionPtr pRgn, Pixel fg) -{ - WindowPtr pRoot = WindowTable[pScreen->myNum]; - GCPtr pGC; - CARD32 val[2]; - xRectangle *rects, *r; - BoxPtr pBox = REGION_RECTS (pRgn); - int nBox = REGION_NUM_RECTS (pRgn); - - rects = xalloc (nBox * sizeof (xRectangle)); - if (!rects) - goto bail0; - r = rects; - while (nBox--) - { - r->x = pBox->x1; - r->y = pBox->y1; - r->width = pBox->x2 - pBox->x1; - r->height = pBox->y2 - pBox->y1; - r++; - pBox++; - } - - pGC = GetScratchGC (pRoot->drawable.depth, pScreen); - if (!pGC) - goto bail1; - - val[0] = fg; - val[1] = IncludeInferiors; - ChangeGC (pGC, GCForeground|GCSubwindowMode, val); - - ValidateGC (&pRoot->drawable, pGC); - - (*pGC->ops->PolyFillRect) (&pRoot->drawable, pGC, - REGION_NUM_RECTS (pRgn), rects); - - FreeScratchGC (pGC); -bail1: - xfree (rects); -bail0: - ; -} - -/* Mach64ClipVideo - - - Takes the dst box in standard X BoxRec form (top and left - edges inclusive, bottom and right exclusive). The new dst - box is returned. The source boundaries are given (x1, y1 - inclusive, x2, y2 exclusive) and returned are the new source - boundaries in 16.16 fixed point. -*/ - -static void -Mach64ClipVideo(BoxPtr dst, - INT32 *x1, - INT32 *x2, - INT32 *y1, - INT32 *y2, - BoxPtr extents, /* extents of the clip region */ - INT32 width, - INT32 height) -{ - INT32 vscale, hscale, delta; - int diff; - - hscale = ((*x2 - *x1) << 16) / (dst->x2 - dst->x1); - vscale = ((*y2 - *y1) << 16) / (dst->y2 - dst->y1); - - *x1 <<= 16; *x2 <<= 16; - *y1 <<= 16; *y2 <<= 16; - - diff = extents->x1 - dst->x1; - if(diff > 0) { - dst->x1 = extents->x1; - *x1 += diff * hscale; - } - diff = dst->x2 - extents->x2; - if(diff > 0) { - dst->x2 = extents->x2; - *x2 -= diff * hscale; - } - diff = extents->y1 - dst->y1; - if(diff > 0) { - dst->y1 = extents->y1; - *y1 += diff * vscale; - } - diff = dst->y2 - extents->y2; - if(diff > 0) { - dst->y2 = extents->y2; - *y2 -= diff * vscale; - } - - if(*x1 < 0) { - diff = (- *x1 + hscale - 1)/ hscale; - dst->x1 += diff; - *x1 += diff * hscale; - } - delta = *x2 - (width << 16); - if(delta > 0) { - diff = (delta + hscale - 1)/ hscale; - dst->x2 -= diff; - *x2 -= diff * hscale; - } - if(*y1 < 0) { - diff = (- *y1 + vscale - 1)/ vscale; - dst->y1 += diff; - *y1 += diff * vscale; - } - delta = *y2 - (height << 16); - if(delta > 0) { - diff = (delta + vscale - 1)/ vscale; - dst->y2 -= diff; - *y2 -= diff * vscale; - } -} - -static void -mach64DisplayVideo(KdScreenInfo *screen, - int id, - int dstPitch, /* of chroma for 4:2:0 */ - int x1, - int y1, - int x2, - int y2, - int dst_x1, - int dst_y1, - int dst_x2, - int dst_y2, - short src_w, - short src_h, - short drw_w, - short drw_h) -{ - ScreenPtr pScreen = screen->pScreen; - KdScreenPriv(pScreen); - KdCardInfo *card = pScreenPriv->card; - Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver; - Mach64CardInfo *mach64c = (Mach64CardInfo *) card->driver; - Mach64PortPrivPtr pPortPriv = mach64s->pAdaptor->pPortPrivates[0].ptr; - Reg *reg = mach64c->reg; - MediaReg *media = mach64c->media_reg; - int xscaleInt, xscaleFract, yscaleInt, yscaleFract; - int xscaleIntUV = 0, xscaleFractUV = 0; - int yscaleIntUV = 0, yscaleFractUV = 0; - int randr = mach64s->vesa.randr; - int HORZ_INC, VERT_INC; - CARD32 SCALER_IN; - CARD32 OVERLAY_SCALE_CNTL; - int tmp; - int left; - int bright; - int sat; - - if (id == FOURCC_UYVY) - SCALER_IN = SCALER_IN_YVYU422; - else - SCALER_IN = SCALER_IN_VYUY422; - - mach64WaitAvail (reg, 4); - - media->VIDEO_FORMAT = SCALER_IN | VIDEO_IN_VYUY422; - - /* color key */ - media->OVERLAY_GRAPHICS_KEY_MSK = (1 << screen->fb[0].depth) - 1; - media->OVERLAY_GRAPHICS_KEY_CLR = pPortPriv->colorKey; - /* set key control to obey only graphics color key */ - media->OVERLAY_KEY_CNTL = 0x50; - - mach64WaitAvail (reg, 9); - media->CAPTURE_DEBUG = 0; - /* no exclusive video region */ - media->OVERLAY_EXCLUSIVE_HORZ = 0; - media->OVERLAY_EXCLUSIVE_VERT = 0; - /* scaling coefficients */ - media->SCALER_H_COEFF0 = 0x00002000; - media->SCALER_H_COEFF1 = 0x0D06200D; - media->SCALER_H_COEFF2 = 0x0D0A1C0D; - media->SCALER_H_COEFF3 = 0x0C0E1A0C; - media->SCALER_H_COEFF4 = 0x0C14140C; - media->SCALER_TEST = 0; - - mach64WaitAvail (reg, 2); - media->OVERLAY_SCALE_CNTL = (SCALE_PIX_EXPAND | - SCALE_GAMMA_BRIGHT | - SCALE_BANDWIDTH | - SCALE_OVERLAY_EN | - SCALE_EN); - - bright = (pPortPriv->brightness * 64 / 1000); - if (bright < -0x40) - bright = -0x40; - if (bright > 0x3f) - bright = 0x3f; - bright = bright & 0x7f; - sat = ((pPortPriv->saturation * 31 + 31000) / 2000); - if (sat > 0x1f) - sat = 0x1f; - if (sat < 0) - sat = 0; - - media->SCALER_COLOUR_CNTL = ((bright << 0) | /* BRIGHTNESS */ - (sat << 8) | /* SATURATION_U */ - (sat << 16) | /* SATURATION_V */ - (0 << 21) | /* SCALER_VERT_ADJ_UV */ - (0 << 28)); /* SCALER_HORZ_ADJ_UV */ - - VERT_INC = (src_h << 12) / drw_h; - HORZ_INC = (src_w << 12) / drw_w; - - mach64WaitAvail (reg, 13); - - /* lock registers to prevent non-atomic update */ - media->OVERLAY_Y_X_START = 0x80000000 | MACH64_YX (dst_x1, dst_y1); - /* ending screen coordinate */ - media->OVERLAY_Y_X_END = 0x80000000 | MACH64_YX (dst_x2, dst_y2); - - media->OVERLAY_SCALE_INC = MACH64_YX(HORZ_INC, VERT_INC); - - media->SCALER_BUF0_OFFSET = pPortPriv->YBuf0Offset; - media->SCALER_BUF1_OFFSET = pPortPriv->YBuf1Offset; - - media->SCALER_BUF0_OFFSET_U = pPortPriv->YBuf0Offset; - media->SCALER_BUF1_OFFSET_U = pPortPriv->YBuf1Offset; - - media->SCALER_BUF0_OFFSET_V = pPortPriv->YBuf0Offset; - media->SCALER_BUF1_OFFSET_V = pPortPriv->YBuf1Offset; - - media->SCALER_BUF_PITCH = dstPitch >> 1; - media->SCALER_HEIGHT_WIDTH = MACH64_YX(src_w - (x1 >> 16), src_h - (y1 >> 16)); - - media->CAPTURE_CONFIG = pPortPriv->currentBuf << 28; - - /* set XY location and unlock */ - media->OVERLAY_Y_X_START = MACH64_YX (dst_x1, dst_y1); -} - -static int -mach64PutImage(KdScreenInfo *screen, - short src_x, - short src_y, - short drw_x, - short drw_y, - short src_w, - short src_h, - short drw_w, - short drw_h, - int id, - unsigned char *buf, - short width, - short height, - Bool sync, - RegionPtr clipBoxes, - pointer data) -{ - KdCardInfo *card = screen->card; - Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver; - Mach64CardInfo *mach64c = (Mach64CardInfo *) card->driver; - Mach64PortPrivPtr pPortPriv = (Mach64PortPrivPtr)data; - Reg *reg = mach64c->reg; - MediaReg *media = mach64c->media_reg; - INT32 x1, x2, y1, y2; - int randr = mach64s->vesa.randr; - int srcPitch, srcPitch2, dstPitch; - int top, left, npixels, nlines, size; - BoxRec dstBox; - int dst_width = width, dst_height = height; - int rot_x1, rot_y1, rot_x2, rot_y2; - int dst_x1, dst_y1, dst_x2, dst_y2; - int rot_src_w, rot_src_h, rot_drw_w, rot_drw_h; - - /* Clip */ - x1 = src_x; - x2 = src_x + src_w; - y1 = src_y; - y2 = src_y + src_h; - - dstBox.x1 = drw_x; - dstBox.x2 = drw_x + drw_w; - dstBox.y1 = drw_y; - dstBox.y2 = drw_y + drw_h; - - Mach64ClipVideo(&dstBox, &x1, &x2, &y1, &y2, - REGION_EXTENTS(pScreen, clipBoxes), width, height); - - if((x1 >= x2) || (y1 >= y2)) - return Success; - - if (!media) - return BadAlloc; - - if (randr & (RR_Rotate_0|RR_Rotate_180)) - { - dst_width = width; - dst_height = height; - rot_src_w = src_w; - rot_src_h = src_h; - rot_drw_w = drw_w; - rot_drw_h = drw_h; - } - else - { - dst_width = height; - dst_height = width; - rot_src_w = src_h; - rot_src_h = src_w; - rot_drw_w = drw_h; - rot_drw_h = drw_w; - } - - switch (randr & RR_Rotate_All) { - case RR_Rotate_0: - dst_x1 = dstBox.x1; - dst_y1 = dstBox.y1; - dst_x2 = dstBox.x2; - dst_y2 = dstBox.y2; - rot_x1 = x1; - rot_y1 = y1; - rot_x2 = x2; - rot_y2 = y2; - break; - case RR_Rotate_90: - dst_x1 = dstBox.y1; - dst_y1 = screen->height - dstBox.x2; - dst_x2 = dstBox.y2; - dst_y2 = screen->height - dstBox.x1; - - rot_x1 = y1; - rot_y1 = (src_w << 16) - x2; - rot_x2 = y2; - rot_y2 = (src_w << 16) - x1; - break; - case RR_Rotate_180: - dst_x1 = screen->width - dstBox.x2; - dst_y1 = screen->height - dstBox.y2; - dst_x2 = screen->width - dstBox.x1; - dst_y2 = screen->height - dstBox.y1; - rot_x1 = (src_w << 16) - x2; - rot_y1 = (src_h << 16) - y2; - rot_x2 = (src_w << 16) - x1; - rot_y2 = (src_h << 16) - y1; - break; - case RR_Rotate_270: - dst_x1 = screen->width - dstBox.y2; - dst_y1 = dstBox.x1; - dst_x2 = screen->width - dstBox.y1; - dst_y2 = dstBox.x2; - rot_x1 = (src_h << 16) - y2; - rot_y1 = x1; - rot_x2 = (src_h << 16) - y1; - rot_y2 = x2; - break; - } - - switch(id) { - case FOURCC_YV12: - case FOURCC_I420: - dstPitch = ((dst_width << 1) + 15) & ~15; - srcPitch = (width + 3) & ~3; - srcPitch2 = ((width >> 1) + 3) & ~3; - size = dstPitch * (int) dst_height; - break; - case FOURCC_UYVY: - case FOURCC_YUY2: - default: - dstPitch = ((dst_width << 1) + 15) & ~15; - srcPitch = (width << 1); - size = dstPitch * (int) dst_height; - break; - } - - pPortPriv->offset = mach64s->off_screen - (CARD8 *) mach64s->vesa.fb; - /* fixup pointers */ - - pPortPriv->YBuf0Offset = pPortPriv->offset; - pPortPriv->YBuf1Offset = pPortPriv->offset + size; - -#if 0 - mach64WaitIdle (reg); - - if (pPortPriv->videoOn) - { - /* wait for buffer to be displayed */ - while (((media->TRIG_CNTL >> 5) & 1) != pPortPriv->currentBuf) - ; - } -#endif - /* - * Use the other buffer - */ - pPortPriv->currentBuf = 1 - pPortPriv->currentBuf; - - /* copy data */ - top = rot_y1 >> 16; - left = (rot_x1 >> 16) & ~1; - npixels = ((((rot_x2 + 0xffff) >> 16) + 1) & ~1) - left; - - switch(id) { - case FOURCC_YV12: - case FOURCC_I420: - top &= ~1; - nlines = ((((rot_y2 + 0xffff) >> 16) + 1) & ~1) - top; - mach64CopyPlanarData(screen, buf, randr, - srcPitch, srcPitch2, dstPitch, - rot_src_w, rot_src_h, height, - top, left, nlines, npixels, id); - break; - case FOURCC_UYVY: - case FOURCC_YUY2: - default: - nlines = ((rot_y2 + 0xffff) >> 16) - top; - mach64CopyPackedData(screen, buf, randr, - srcPitch, dstPitch, - rot_src_w, rot_src_h, - top, left, nlines, - npixels); - break; - } - - mach64DisplayVideo(screen, id, dstPitch, - rot_x1, rot_y1, rot_x2, rot_y2, - dst_x1, dst_y1, - dst_x2, dst_y2, - rot_src_w, rot_src_h, rot_drw_w, rot_drw_h); - - /* update cliplist */ - if (!REGION_EQUAL (screen->pScreen, &pPortPriv->clip, clipBoxes)) - { - REGION_COPY (screen->pScreen, &pPortPriv->clip, clipBoxes); - mach64PaintRegion (screen->pScreen, &pPortPriv->clip, pPortPriv->colorKey); - } - - pPortPriv->videoOn = TRUE; - - return Success; -} - -static int -mach64QueryImageAttributes(KdScreenInfo *screen, - int id, - unsigned short *w, - unsigned short *h, - int *pitches, - int *offsets) -{ - int size, tmp; - - if(*w > IMAGE_MAX_WIDTH) - *w = IMAGE_MAX_WIDTH; - if(*h > IMAGE_MAX_HEIGHT) - *h = IMAGE_MAX_HEIGHT; - - *w = (*w + 1) & ~1; - if(offsets) offsets[0] = 0; - - switch(id) { - case FOURCC_YV12: - case FOURCC_I420: - *h = (*h + 1) & ~1; - size = (*w + 3) & ~3; - if(pitches) - pitches[0] = size; - size *= *h; - if(offsets) - offsets[1] = size; - tmp = ((*w >> 1) + 3) & ~3; - if(pitches) - pitches[1] = pitches[2] = tmp; - tmp *= (*h >> 1); - size += tmp; - if(offsets) - offsets[2] = size; - size += tmp; - break; - case FOURCC_UYVY: - case FOURCC_YUY2: - default: - size = *w << 1; - if(pitches) - pitches[0] = size; - size *= *h; - break; - } - - return size; -} - - -/* client libraries expect an encoding */ -static KdVideoEncodingRec DummyEncoding[1] = -{ - { - 0, - "XV_IMAGE", - IMAGE_MAX_WIDTH, IMAGE_MAX_HEIGHT, - {1, 1} - } -}; - -#define NUM_FORMATS 3 - -static KdVideoFormatRec Formats[NUM_FORMATS] = -{ - {15, TrueColor}, {16, TrueColor}, {24, TrueColor} -}; - -#define NUM_ATTRIBUTES 3 - -static KdAttributeRec Attributes[NUM_ATTRIBUTES] = -{ - {XvSettable | XvGettable, 0, ~0, "XV_COLORKEY"}, - {XvSettable | XvGettable, -1000, 1000, "XV_BRIGHTNESS"}, - {XvSettable | XvGettable, -1000, 1000, "XV_SATURATION"} -}; - -#define NUM_IMAGES 4 - -static KdImageRec Images[NUM_IMAGES] = -{ - XVIMAGE_YUY2, - XVIMAGE_YV12, - XVIMAGE_I420, - XVIMAGE_UYVY -}; - -static void mach64ResetVideo(KdScreenInfo *screen) -{ - ScreenPtr pScreen = screen->pScreen; - KdScreenPriv(pScreen); - KdCardInfo *card = pScreenPriv->card; - Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver; - Mach64CardInfo *mach64c = (Mach64CardInfo *) card->driver; - Mach64PortPrivPtr pPortPriv = mach64s->pAdaptor->pPortPrivates[0].ptr; - MediaReg *media = mach64c->media_reg; - - /* - * Default to maximum image size in YV12 - */ - -} - -static int -mach64ReputImage (KdScreenInfo *screen, - short drw_x, - short drw_y, - RegionPtr clipBoxes, - pointer data) -{ - ScreenPtr pScreen = screen->pScreen; - Mach64PortPrivPtr pPortPriv = (Mach64PortPrivPtr)data; - BoxPtr pOldExtents = REGION_EXTENTS (pScreen, &pPortPriv->clip); - BoxPtr pNewExtents = REGION_EXTENTS (pScreen, clipBoxes); - - if (pOldExtents->x1 == pNewExtents->x1 && - pOldExtents->x2 == pNewExtents->x2 && - pOldExtents->y1 == pNewExtents->y1 && - pOldExtents->y2 == pNewExtents->y2) - { - /* update cliplist */ - if (!REGION_EQUAL (screen->pScreen, &pPortPriv->clip, clipBoxes)) - { - REGION_COPY (screen->pScreen, &pPortPriv->clip, clipBoxes); - mach64PaintRegion (screen->pScreen, &pPortPriv->clip, pPortPriv->colorKey); - } - return Success; - } - return BadMatch; -} - -static KdVideoAdaptorPtr -mach64SetupImageVideo(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - mach64CardInfo(pScreenPriv); - mach64ScreenInfo(pScreenPriv); - KdScreenInfo *screen = pScreenPriv->screen; - KdCardInfo *card = pScreenPriv->card; - KdVideoAdaptorPtr adapt; - Mach64PortPrivPtr pPortPriv; - - if(!(adapt = xcalloc(1, sizeof(KdVideoAdaptorRec) + - sizeof(Mach64PortPrivRec) + - sizeof(DevUnion)))) - return NULL; - - adapt->type = XvWindowMask | XvInputMask | XvImageMask; - adapt->flags = VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT; - adapt->name = "Mach64 Video Overlay"; - adapt->nEncodings = 1; - adapt->pEncodings = DummyEncoding; - adapt->nFormats = NUM_FORMATS; - adapt->pFormats = Formats; - adapt->nPorts = 1; - adapt->pPortPrivates = (DevUnion*)(&adapt[1]); - - pPortPriv = (Mach64PortPrivPtr)(&adapt->pPortPrivates[1]); - - adapt->pPortPrivates[0].ptr = (pointer)(pPortPriv); - adapt->pAttributes = Attributes; - adapt->nImages = NUM_IMAGES; - adapt->nAttributes = NUM_ATTRIBUTES; - adapt->pImages = Images; - adapt->PutVideo = NULL; - adapt->PutStill = NULL; - adapt->GetVideo = NULL; - adapt->GetStill = NULL; - adapt->StopVideo = mach64StopVideo; - adapt->SetPortAttribute = mach64SetPortAttribute; - adapt->GetPortAttribute = mach64GetPortAttribute; - adapt->QueryBestSize = mach64QueryBestSize; - adapt->PutImage = mach64PutImage; - adapt->ReputImage = mach64ReputImage; - adapt->QueryImageAttributes = mach64QueryImageAttributes; - - pPortPriv->colorKey = mach64s->colorKey; - pPortPriv->videoOn = FALSE; - pPortPriv->brightness = 0; - pPortPriv->saturation = 0; - pPortPriv->currentBuf = 0; - - /* gotta uninit this someplace */ - REGION_INIT(pScreen, &pPortPriv->clip, NullBox, 0); - - mach64s->pAdaptor = adapt; - - xvBrightness = MAKE_ATOM("XV_BRIGHTNESS"); - xvSaturation = MAKE_ATOM("XV_SATURATION"); - xvColorKey = MAKE_ATOM("XV_COLORKEY"); - - mach64ResetVideo(screen); - - return adapt; -} - -Bool mach64InitVideo(ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - KdVideoAdaptorPtr *adaptors, *newAdaptors = NULL; - KdVideoAdaptorPtr newAdaptor = NULL; - int num_adaptors; - KdCardInfo *card = pScreenPriv->card; - Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver; - Mach64CardInfo *mach64c = (Mach64CardInfo *) card->driver; - - if (!mach64c->media_reg) - return FALSE; - - newAdaptor = mach64SetupImageVideo(pScreen); - - num_adaptors = KdXVListGenericAdaptors(screen, &adaptors); - - if(newAdaptor) - { - if(!num_adaptors) - { - num_adaptors = 1; - adaptors = &newAdaptor; - } - else - { - newAdaptors = xalloc((num_adaptors + 1) * - sizeof(KdVideoAdaptorPtr*)); - if(newAdaptors) - { - memcpy(newAdaptors, adaptors, - num_adaptors * sizeof(KdVideoAdaptorPtr)); - newAdaptors[num_adaptors] = newAdaptor; - adaptors = newAdaptors; - num_adaptors++; - } - } - } - - if(num_adaptors) - KdXVScreenInit(pScreen, adaptors, num_adaptors); - - if(newAdaptors) - xfree(newAdaptors); - return TRUE; -} diff --git a/hw/kdrive/trident/trident.c b/hw/kdrive/trident/trident.c deleted file mode 100644 index 694a70810..000000000 --- a/hw/kdrive/trident/trident.c +++ /dev/null @@ -1,612 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "trident.h" -#include - -#undef TRI_DEBUG - -int trident_clk = 0; -int trident_mclk = 0; - -#define CLOCK 14318 /* KHz */ -#define CLK_N(a,b) (a & 0xff) -#define CLK_M(a,b) ((b) & 0x3f) -#define CLK_K(a,b) (((b) >> 6) & 3) -#define CLK_FREQ(a,b) (((CLK_N(a,b) + 8) * CLOCK) / ((CLK_M(a,b)+2) << CLK_K(a,b))) - -Bool -tridentCardInit (KdCardInfo *card) -{ - int k; - char *pixels; - TridentCardInfo *tridentc; - CARD8 r39; - - tridentc = (TridentCardInfo *) xalloc (sizeof (TridentCardInfo)); - if (!tridentc) - return FALSE; - - iopl (3); - tridentc->cop_base = (CARD8 *) KdMapDevice (TRIDENT_COP_BASE(card), - TRIDENT_COP_SIZE(card)); - - if (tridentc->cop_base) - { - KdSetMappedMode (TRIDENT_COP_BASE(card), - TRIDENT_COP_SIZE(card), - KD_MAPPED_MODE_REGISTERS); - } - tridentc->cop = (Cop *) (tridentc->cop_base + TRIDENT_COP_OFF(card)); - tridentc->mmio = FALSE; - r39 = tridentReadIndex (tridentc, 0x3d4, 0x39); - if (r39 & 1) - { - tridentc->mmio = TRUE; - r39 = tridentReadIndex (tridentc, 0x3d4, 0x39); - if ((r39 & 1) == 0) - { - ErrorF ("Trident: inconsisent IO mapping values\n"); - return FALSE; - } - } - -#ifdef VESA - if (!vesaInitialize (card, &tridentc->vesa)) -#else - if (!fbdevInitialize (card, &tridentc->fb)) -#endif - { - xfree (tridentc); - return FALSE; - } - -#ifdef USE_PCI - tridentc->window = (CARD32 *) (tridentc->cop_base + 0x10000); -#else - tridentc->window = 0; -#endif - card->driver = tridentc; - - return TRUE; -} - -Bool -tridentScreenInit (KdScreenInfo *screen) -{ - TridentCardInfo *tridentc = screen->card->driver; - TridentScreenInfo *tridents; - int screen_size, memory; - - tridents = (TridentScreenInfo *) xalloc (sizeof (TridentScreenInfo)); - if (!tridents) - return FALSE; - memset (tridents, '\0', sizeof (TridentScreenInfo)); -#ifdef VESA - if (!vesaScreenInitialize (screen, &tridents->vesa)) -#else - if (!fbdevScreenInitialize (screen, &tridents->fbdev)) -#endif - { - xfree (tridents); - return FALSE; - } - if (!tridentc->cop) - screen->dumb = TRUE; -#ifdef VESA - if (tridents->vesa.mapping != VESA_LINEAR) - screen->dumb = TRUE; - tridents->screen = tridents->vesa.fb; - memory = tridents->vesa.fb_size; -#else - tridents->screen = tridentc->fb.fb; - memory = (2048 + 512) * 1024; -#endif - screen_size = screen->fb[0].byteStride * screen->height; - if (tridents->screen && memory >= screen_size + 2048) - { - memory -= 2048; - tridents->cursor_base = tridents->screen + memory - 2048; - } - else - tridents->cursor_base = 0; - memory -= screen_size; - if (memory > screen->fb[0].byteStride) - { - tridents->off_screen = tridents->screen + screen_size; - tridents->off_screen_size = memory; - } - else - { - tridents->off_screen = 0; - tridents->off_screen_size = 0; - } - screen->driver = tridents; - return TRUE; -} - -Bool -tridentInitScreen (ScreenPtr pScreen) -{ -#ifdef VESA - return vesaInitScreen (pScreen); -#else - return fbdevInitScreen (pScreen); -#endif -} - -Bool -tridentFinishInitScreen (ScreenPtr pScreen) -{ -#ifdef VESA - return vesaFinishInitScreen (pScreen); -#endif -} - -CARD8 -tridentReadIndex (TridentCardInfo *tridentc, CARD16 port, CARD8 index) -{ - CARD8 value; - - if (tridentc->mmio) - { - tridentc->cop_base[port] = index; - value = tridentc->cop_base[port+1]; - } - else - { - outb (index, port); - value = inb (port+1); - } - return value; -} - -void -tridentWriteIndex (TridentCardInfo *tridentc, CARD16 port, CARD8 index, CARD8 value) -{ - if (tridentc->mmio) - { - tridentc->cop_base[port] = index; - tridentc->cop_base[port+1] = value; - } - else - { - outb (index, port); - outb (value, port+1); - } -} - -CARD8 -tridentReadReg (TridentCardInfo *tridentc, CARD16 port) -{ - CARD8 value; - - if (tridentc->mmio) - { - value = tridentc->cop_base[port]; - } - else - { - value = inb (port); - } - return value; -} - -void -tridentWriteReg (TridentCardInfo *tridentc, CARD16 port, CARD8 value) -{ - if (tridentc->mmio) - { - tridentc->cop_base[port] = value; - } - else - { - outb (value, port); - } -} - - -void -tridentPause () -{ - struct timeval tv; - - tv.tv_sec = 0; - tv.tv_usec = 50 * 1000; - select (1, 0, 0, 0, &tv); -} - -void -tridentPreserve (KdCardInfo *card) -{ - TridentCardInfo *tridentc = card->driver; - -#ifdef VESA - vesaPreserve(card); -#else - fbdevPreserve (card); -#endif - tridentPause (); - tridentc->save.reg_3c4_0e = tridentReadIndex (tridentc, 0x3c4, 0x0e); - tridentc->save.reg_3d4_36 = tridentReadIndex (tridentc, 0x3d4, 0x36); - tridentc->save.reg_3d4_39 = tridentReadIndex (tridentc, 0x3d4, 0x39); - tridentc->save.reg_3d4_62 = tridentReadIndex (tridentc, 0x3d4, 0x62); - tridentc->save.reg_3ce_21 = tridentReadIndex (tridentc, 0x3ce, 0x21); - tridentc->save.reg_3c2 = tridentReadReg (tridentc, 0x3cc); - tridentc->save.reg_3c4_16 = tridentReadIndex (tridentc, 0x3c4, 0x16); - tridentc->save.reg_3c4_17 = tridentReadIndex (tridentc, 0x3c4, 0x17); - tridentc->save.reg_3c4_18 = tridentReadIndex (tridentc, 0x3c4, 0x18); - tridentc->save.reg_3c4_19 = tridentReadIndex (tridentc, 0x3c4, 0x19); - ErrorF ("clk low 0x%x high 0x%x freq %d\n", - tridentc->save.reg_3c4_18, - tridentc->save.reg_3c4_19, - CLK_FREQ(tridentc->save.reg_3c4_18, - tridentc->save.reg_3c4_19)); -#ifdef TRI_DEBUG - fprintf (stderr, "3c4 0e: %02x\n", tridentc->save.reg_3c4_0e); - fprintf (stderr, "3d4 36: %02x\n", tridentc->save.reg_3d4_36); - fprintf (stderr, "3d4 39: %02x\n", tridentc->save.reg_3d4_39); - fprintf (stderr, "3d4 62: %02x\n", tridentc->save.reg_3d4_62); - fprintf (stderr, "3ce 21: %02x\n", tridentc->save.reg_3ce_21); - fflush (stderr); -#endif - tridentPause (); -} - -void -tridentSetCLK(int clock, CARD8 *a, CARD8 *b) -{ - int powerup[4] = { 1,2,4,8 }; - int clock_diff = 750; - int freq, ffreq; - int m, n, k; - int p, q, r, s; - int startn, endn; - int endm, endk; - - p = q = r = s = 0; - - startn = 64; - endn = 255; - endm = 63; - endk = 3; - - freq = clock; - - for (k=0;k<=endk;k++) - for (n=startn;n<=endn;n++) - for (m=1;m<=endm;m++) - { - ffreq = ( ( ((n + 8) * CLOCK) / ((m + 2) * powerup[k]) )); - if ((ffreq > freq - clock_diff) && (ffreq < freq + clock_diff)) - { - clock_diff = (freq > ffreq) ? freq - ffreq : ffreq - freq; - p = n; q = m; r = k; s = ffreq; - } - } - - ErrorF ("ffreq %d clock %d\n", s, clock); - if (s == 0) - { - FatalError("Unable to set programmable clock.\n" - "Frequency %d is not a valid clock.\n" - "Please modify XF86Config for a new clock.\n", - freq); - } - - /* N is all 8bits */ - *a = p; - /* M is first 6bits, with K last 2bits */ - *b = (q & 0x3F) | (r << 6); -} - -void -tridentSetMCLK(int clock, CARD8 *a, CARD8 *b) -{ - int powerup[4] = { 1,2,4,8 }; - int clock_diff = 750; - int freq, ffreq; - int m,n,k; - int p, q, r, s; - int startn, endn; - int endm, endk; - - p = q = r = s = 0; - - startn = 64; - endn = 255; - endm = 63; - endk = 3; - - freq = clock; - - for (k=0;k<=endk;k++) - for (n=startn;n<=endn;n++) - for (m=1;m<=endm;m++) { - ffreq = ((((n+8)*CLOCK)/((m+2)*powerup[k]))); - if ((ffreq > freq - clock_diff) && (ffreq < freq + clock_diff)) - { - clock_diff = (freq > ffreq) ? freq - ffreq : ffreq - freq; - p = n; q = m; r = k; s = ffreq; - } - } - - if (s == 0) - { - FatalError("Unable to set memory clock.\n" - "Frequency %d is not a valid clock.\n" - "Please modify XF86Config for a new clock.\n", - freq); - } - - /* N is all 8bits */ - *a = p; - /* M is first 6bits, with K last 2bits */ - *b = (q & 0x3F) | (r << 6); -} - -void -tridentSetMMIO (TridentCardInfo *tridentc) -{ - int tries; - CARD8 v; - -#ifdef TRI_DEBUG - fprintf (stderr, "Set MMIO\n"); -#endif - /* enable config port writes */ - for (tries = 0; tries < 3; tries++) - { - /* enable direct read when GE busy, enable PCI retries */ - tridentWriteIndex (tridentc, 0x3d4, 0x62, - tridentc->save.reg_3d4_62 | 0x70); - /* make sure the chip is in new mode */ - tridentReadIndex (tridentc, 0x3c4, 0xb); - /* enable access to upper registers */ - tridentWriteIndex (tridentc, 0x3c4, 0xe, - tridentc->save.reg_3c4_0e | 0x80); - v = tridentReadIndex (tridentc, 0x3c4, 0xe); - if (!(v & 0x80)) - { - fprintf (stderr, "Trident GE not enabled 0x%x\n", v); - continue; - } - /* enable screen */ - tridentWriteIndex (tridentc, 0x3ce, 0x21, 0x80); -#ifdef USE_PCI - /* enable burst r/w, enable memory mapped ports */ - tridentWriteIndex (tridentc, 0x3d4, 0x39, 7); - tridentc->mmio = TRUE; - /* reset GE, enable GE, set GE to pci 1 */ - tridentWriteIndex (tridentc, 0x3d4, 0x36, 0x90); -#else - /* enable burst r/w, disable memory mapped ports */ - tridentWriteIndex (tridentc, 0x3d4, 0x39, 0x6); - /* reset GE, enable GE, set GE to 0xbff00 */ - tridentWriteIndex (tridentc, 0x3d4, 0x36, 0x92); -#endif - /* set clock */ - if (trident_clk) - { - CARD8 a, b; - - a = tridentReadIndex (tridentc, 0x3c4, 0x18); - b = tridentReadIndex (tridentc, 0x3c4, 0x19); - ErrorF ("old clock 0x%x 0x%x %d\n", - a, b, CLK_FREQ(a,b)); - tridentSetCLK (trident_clk, &a, &b); - ErrorF ("clk %d-> 0x%x 0x%x %d\n", trident_clk, a, b, - CLK_FREQ(a,b)); -#if 1 - tridentWriteIndex (tridentc, 0x3c4, 0x18, a); - tridentWriteIndex (tridentc, 0x3c4, 0x19, b); -#endif - } - if (trident_mclk) - { - CARD8 a, b; - - tridentSetMCLK (trident_mclk, &a, &b); - ErrorF ("mclk %d -> 0x%x 0x%x\n", trident_mclk, a, b); -#if 0 - tridentWriteIndex (tridentc, 0x3c4, 0x16, a); - tridentWriteIndex (tridentc, 0x3c4, 0x17, b); -#endif - } - if (trident_clk || trident_mclk) - { - CARD8 mode; - - mode = tridentReadReg (tridentc, 0x3cc); - ErrorF ("old mode 0x%x\n", mode); - mode = (mode & 0xf3) | 0x08; - ErrorF ("new mode 0x%x\n", mode); -#if 1 - tridentWriteReg (tridentc, 0x3c2, mode); -#endif - } -#ifdef TRI_DEBUG - fprintf (stderr, "0x36: 0x%02x\n", - tridentReadIndex (tridentc, 0x3d4, 0x36)); -#endif - if (tridentc->cop->status != 0xffffffff) - break; - } -#ifdef TRI_DEBUG - fprintf (stderr, "COP status 0x%x\n", tridentc->cop->status); -#endif - if (tridentc->cop->status == 0xffffffff) - FatalError ("Trident COP not visible\n"); -} - -void -tridentResetMMIO (TridentCardInfo *tridentc) -{ -#ifdef TRI_DEBUG - fprintf (stderr, "Reset MMIO\n"); -#endif - tridentPause (); -#if 0 - tridentWriteIndex (tridentc, 0x3c4, 0x16, tridentc->save.reg_3c4_16); - tridentWriteIndex (tridentc, 0x3c4, 0x17, tridentc->save.reg_3c4_17); -#endif - tridentWriteIndex (tridentc, 0x3c4, 0x18, tridentc->save.reg_3c4_18); - tridentWriteIndex (tridentc, 0x3c4, 0x19, tridentc->save.reg_3c4_19); - tridentWriteReg (tridentc, 0x3c2, tridentc->save.reg_3c2); - tridentPause (); - tridentWriteIndex (tridentc, 0x3ce, 0x21, tridentc->save.reg_3ce_21); - tridentPause (); - tridentWriteIndex (tridentc, 0x3d4, 0x62, tridentc->save.reg_3d4_62); - tridentWriteIndex (tridentc, 0x3d4, 0x39, tridentc->save.reg_3d4_39); - tridentc->mmio = FALSE; - tridentWriteIndex (tridentc, 0x3d4, 0x36, tridentc->save.reg_3d4_36); - tridentWriteIndex (tridentc, 0x3c4, 0x0e, tridentc->save.reg_3c4_0e); - tridentPause (); -} - -Bool -tridentEnable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - TridentCardInfo *tridentc = pScreenPriv->card->driver; - -#ifdef VESA - if (!vesaEnable (pScreen)) - return FALSE; -#else - if (!fbdevEnable (pScreen)) - return FALSE; -#endif - tridentSetMMIO (tridentc); - return TRUE; -} - -void -tridentDisable (ScreenPtr pScreen) -{ -#ifdef VESA - vesaDisable (pScreen); -#else - fbdevDisable (pScreen); -#endif -} - -const CARD8 tridentDPMSModes[4] = { - 0x80, /* KD_DPMS_NORMAL */ - 0x8c, /* KD_DPMS_STANDBY */ - 0x8c, /* KD_DPMS_STANDBY */ - 0x8c, /* KD_DPMS_STANDBY */ -/* 0xb0, /* KD_DPMS_SUSPEND */ -/* 0xbc, /* KD_DPMS_POWERDOWN */ -}; - -Bool -tridentDPMS (ScreenPtr pScreen, int mode) -{ - KdScreenPriv(pScreen); - TridentCardInfo *tridentc = pScreenPriv->card->driver; - - tridentWriteIndex (tridentc, 0x3ce, 0x21, tridentDPMSModes[mode]); - tridentPause (); - return TRUE; -} - -void -tridentRestore (KdCardInfo *card) -{ - TridentCardInfo *tridentc = card->driver; - - tridentResetMMIO (tridentc); -#ifdef VESA - vesaRestore (card); -#else - fbdevRestore (card); -#endif -} - -void -tridentScreenFini (KdScreenInfo *screen) -{ - TridentScreenInfo *tridents = (TridentScreenInfo *) screen->driver; - -#ifdef VESA - vesaScreenFini (screen); -#endif - xfree (tridents); - screen->driver = 0; -} - -void -tridentCardFini (KdCardInfo *card) -{ - TridentCardInfo *tridentc = card->driver; - - if (tridentc->cop_base) - { - KdUnmapDevice ((void *) tridentc->cop_base, TRIDENT_COP_SIZE(card)); - KdResetMappedMode (TRIDENT_COP_BASE(card), - TRIDENT_COP_SIZE(card), - KD_MAPPED_MODE_REGISTERS); - } -#ifdef VESA - vesaCardFini (card); -#else - fbdevCardFini (card); -#endif -} - -KdCardFuncs tridentFuncs = { - tridentCardInit, /* cardinit */ - tridentScreenInit, /* scrinit */ - tridentInitScreen, /* initScreen */ - tridentPreserve, /* preserve */ - tridentEnable, /* enable */ - tridentDPMS, /* dpms */ - tridentDisable, /* disable */ - tridentRestore, /* restore */ - tridentScreenFini, /* scrfini */ - tridentCardFini, /* cardfini */ - - tridentCursorInit, /* initCursor */ - tridentCursorEnable, /* enableCursor */ - tridentCursorDisable, /* disableCursor */ - tridentCursorFini, /* finiCursor */ - tridentRecolorCursor, /* recolorCursor */ - - tridentDrawInit, /* initAccel */ - tridentDrawEnable, /* enableAccel */ - tridentDrawSync, /* syncAccel */ - tridentDrawDisable, /* disableAccel */ - tridentDrawFini, /* finiAccel */ - -#ifdef VESA - vesaGetColors, /* getColors */ - vesaPutColors, /* putColors */ -#else - fbdevGetColors, /* getColors */ - fbdevPutColors, /* putColors */ -#endif - tridentFinishInitScreen /* finishInitScreen */ -}; diff --git a/hw/kdrive/trident/trident.h b/hw/kdrive/trident/trident.h deleted file mode 100644 index feb939de3..000000000 --- a/hw/kdrive/trident/trident.h +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _TRIDENT_H_ -#define _TRIDENT_H_ -#ifdef VESA -#include -#else -#include -#endif - -/* - * offset from ioport beginning - */ - -#ifdef USE_PCI -#define TRIDENT_COP_BASE(c) (c->attr.address[1]) -#define TRIDENT_COP_OFF(c) 0x2100 -#define TRIDENT_COP_SIZE(c) 0x20000 -#else -#define TRIDENT_COP_BASE(c) 0xbf000 -#define TRIDENT_COP_OFF(c) 0x00f00 -#define TRIDENT_COP_SIZE(c) (0x2000) -#endif - -typedef volatile CARD8 VOL8; -typedef volatile CARD16 VOL16; -typedef volatile CARD32 VOL32; - -typedef struct _cop { - VOL32 src_start_xy; /* 0x00 */ - VOL32 src_end_xy; /* 0x04 */ - VOL32 dst_start_xy; /* 0x08 */ - VOL32 dst_end_xy; /* 0x0c */ - VOL32 alpha; /* 0x10 */ - CARD8 pad14[0xc]; /* 0x14 */ - VOL32 multi; /* 0x20 */ - -#define COP_MULTI_CLIP_TOP_LEFT 0x10000000 -#define COP_MULTI_DEPTH 0x40000000 -#define COP_MULTI_COLOR_KEY 0x70000000 -#define COP_MULTI_STYLE 0x50000000 -#define COP_MULTI_PATTERN 0x80000000 -#define COP_MULTI_ROP 0x90000000 -#define COP_MULTI_STRIDE 0x60000000 -#define COP_MULTI_Z 0xa0000000 -#define COP_MULTI_ALPHA 0xb0000000 -#define COP_MULTI_TEXTURE 0xd0000000 -#define COP_MULTI_TEXTURE_BOUND 0xe0000000 -#define COP_MULTI_TEXTURE_ADVANCED 0x20000000 -#define COP_MULTI_MASK 0xf0000000 - -#define COP_DEPTH_8 0x00000000 -#define COP_DEPTH_16 0x00000001 -#define COP_DEPTH_24_32 0x00000002 -#define COP_DEPTH_15 0x00000005 -#define COP_DEPTH_DITHER_DISABLE 0x00000008 - - -#define COP_ALPHA_SRC_BLEND_0 0x00000000 -#define COP_ALPHA_SRC_BLEND_1 0x00000001 -#define COP_ALPHA_SRC_BLEND_SRC_C 0x00000002 -#define COP_ALPHA_SRC_BLEND_1_SRC_C 0x00000003 -#define COP_ALPHA_SRC_BLEND_SRC_A 0x00000004 -#define COP_ALPHA_SRC_BLEND_1_SRC_A 0x00000005 -#define COP_ALPHA_SRC_BLEND_DST_A 0x00000006 -#define COP_ALPHA_SRC_BLEND_1_DST_A 0x00000007 -#define COP_ALPHA_SRC_BLEND_DST_C 0x00000008 -#define COP_ALPHA_SRC_BLEND_1_DST_C 0x00000009 -#define COP_ALPHA_SRC_BLEND_SAT 0x0000000A -#define COP_ALPHA_SRC_BLEND_BG 0x0000000B - -#define COP_ALPHA_DST_BLEND_0 0x00000000 -#define COP_ALPHA_DST_BLEND_1 0x00000010 -#define COP_ALPHA_DST_BLEND_SRC_C 0x00000020 -#define COP_ALPHA_DST_BLEND_1_SRC_C 0x00000030 -#define COP_ALPHA_DST_BLEND_SRC_A 0x00000040 -#define COP_ALPHA_DST_BLEND_1_SRC_A 0x00000050 -#define COP_ALPHA_DST_BLEND_DST_A 0x00000060 -#define COP_ALPHA_DST_BLEND_1_DST_A 0x00000070 -#define COP_ALPHA_DST_BLEND_DST_C 0x00000080 -#define COP_ALPHA_DST_BLEND_1_DST_C 0x00000090 -#define COP_ALPHA_DST_BLEND_OTHER 0x000000A0 - -#define COP_ALPHA_RESULT_ALPHA 0x00100000 -#define COP_ALPHA_DEST_ALPHA 0x00200000 -#define COP_ALPHA_SOURCE_ALPHA 0x00400000 -#define COP_ALPHA_WRITE_ENABLE 0x00800000 -#define COP_ALPHA_TEST_ENABLE 0x01000000 -#define COP_ALPHA_BLEND_ENABLE 0x02000000 -#define COP_ALPHA_DEST_VALUE 0x04000000 -#define COP_ALPHA_SOURCE_VALUE 0x08000000 - - VOL32 command; /* 0x24 */ -#define COP_OP_NULL 0x00000000 -#define COP_OP_LINE 0x20000000 -#define COP_OP_BLT 0x80000000 -#define COP_OP_TEXT 0x90000000 -#define COP_OP_POLY 0xb0000000 -#define COP_OP_POLY2 0xe0000000 -#define COP_SCL_EXPAND 0x00800000 -#define COP_SCL_OPAQUE 0x00400000 -#define COP_SCL_REVERSE 0x00200000 -#define COP_SCL_MONO_OFF 0x001c0000 -#define COP_LIT_TEXTURE 0x00004000 -#define COP_BILINEAR 0x00002000 -#define COP_OP_ZBUF 0x00000800 -#define COP_OP_ROP 0x00000400 -#define COP_OP_FG 0x00000200 -#define COP_OP_FB 0x00000080 -#define COP_X_REVERSE 0x00000004 -#define COP_CLIP 0x00000001 - VOL32 texture_format; /* 0x28 */ - CARD8 pad2c[0x4]; /* 0x2c */ - - VOL32 clip_bottom_right; /* 0x30 */ - VOL32 dataIII; /* 0x34 */ - VOL32 dataIV; /* 0x38 */ - CARD8 pad3c[0x8]; /* 0x3c */ - - VOL32 fg; /* 0x44 */ - VOL32 bg; /* 0x48 */ - CARD8 pad4c[0x4]; /* 0x4c */ - - VOL32 pattern_fg; /* 0x50 */ - VOL32 pattern_bg; /* 0x54 */ - CARD8 pad58[0xc]; /* 0x58 */ - - VOL32 status; /* 0x64 */ -#define COP_STATUS_BE_BUSY 0x80000000 -#define COP_STATUS_DPE_BUSY 0x20000000 -#define COP_STATUS_MI_BUSY 0x10000000 -#define COP_STATUS_FIFO_BUSY 0x08000000 -#define COP_STATUS_WB_BUSY 0x00800000 -#define COP_STATUS_Z_FAILED 0x00400000 -#define COP_STATUS_EFFECTIVE 0x00200000 -#define COP_STATUS_LEFT_VIEW 0x00080000 - - CARD8 pad68[0x4]; /* 0x68 */ - - VOL32 src_offset; /* 0x6c */ - VOL32 z_offset; /* 0x70 */ - CARD8 pad74[0x4]; /* 0x74 */ - - VOL32 display_offset; /* 0x78 */ - VOL32 dst_offset; /* 0x7c */ - CARD8 pad80[0x34]; /* 0x80 */ - - VOL32 semaphore; /* 0xb4 */ -} Cop; - -#define TRI_XY(x,y) ((y) << 16 | (x)) - -typedef struct _tridentSave { - CARD8 reg_3c4_0e; /* config port value */ - CARD8 reg_3d4_36; - CARD8 reg_3d4_39; - CARD8 reg_3d4_62; /* GE setup */ - CARD8 reg_3ce_21; /* DPMS */ - CARD8 reg_3c2; /* clock config */ - CARD8 reg_3c4_16; /* MCLKLow */ - CARD8 reg_3c4_17; /* MCLKHigh */ - CARD8 reg_3c4_18; /* ClockLow */ - CARD8 reg_3c4_19; /* ClockHigh */ -} TridentSave; - -typedef struct _tridentCardInfo { -#ifdef VESA - VesaCardPrivRec vesa; -#else - FbdevPriv fb; -#endif - CARD8 *cop_base; - Cop *cop; - CARD32 *window; - CARD32 cop_depth; - CARD32 cop_stride; - Bool mmio; - TridentSave save; -} TridentCardInfo; - -#define getTridentCardInfo(kd) ((TridentCardInfo *) ((kd)->card->driver)) -#define tridentCardInfo(kd) TridentCardInfo *tridentc = getTridentCardInfo(kd) - -typedef struct _tridentCursor { - int width, height; - int xhot, yhot; - Bool has_cursor; - CursorPtr pCursor; - Pixel source, mask; -} TridentCursor; - -#define TRIDENT_CURSOR_WIDTH 64 -#define TRIDENT_CURSOR_HEIGHT 64 - -typedef struct _tridentScreenInfo { -#ifdef VESA - VesaScreenPrivRec vesa; -#else - FbdevScrPriv fbdev; -#endif - CARD8 *cursor_base; - CARD8 *screen; - CARD8 *off_screen; - int off_screen_size; - TridentCursor cursor; -} TridentScreenInfo; - -#define getTridentScreenInfo(kd) ((TridentScreenInfo *) ((kd)->screen->driver)) -#define tridentScreenInfo(kd) TridentScreenInfo *tridents = getTridentScreenInfo(kd) - -Bool -tridentDrawInit (ScreenPtr pScreen); - -void -tridentDrawEnable (ScreenPtr pScreen); - -void -tridentDrawSync (ScreenPtr pScreen); - -void -tridentDrawDisable (ScreenPtr pScreen); - -void -tridentDrawFini (ScreenPtr pScreen); - -CARD8 -tridentReadIndex (TridentCardInfo *tridentc, CARD16 port, CARD8 index); - -void -tridentWriteIndex (TridentCardInfo *tridentc, CARD16 port, CARD8 index, CARD8 value); - -Bool -tridentCursorInit (ScreenPtr pScreen); - -void -tridentCursorEnable (ScreenPtr pScreen); - -void -tridentCursorDisable (ScreenPtr pScreen); - -void -tridentCursorFini (ScreenPtr pScreen); - -void -tridentRecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdef); - -extern KdCardFuncs tridentFuncs; - -#endif /* _TRIDENT_H_ */ diff --git a/hw/kdrive/trident/tridentcurs.c b/hw/kdrive/trident/tridentcurs.c deleted file mode 100644 index 4a5938162..000000000 --- a/hw/kdrive/trident/tridentcurs.c +++ /dev/null @@ -1,389 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "trident.h" -#include "cursorstr.h" - -#define SetupCursor(s) KdScreenPriv(s); \ - tridentCardInfo(pScreenPriv); \ - tridentScreenInfo(pScreenPriv); \ - TridentCursor *pCurPriv = &tridents->cursor - -static void -_tridentMoveCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor(pScreen); - CARD8 xlow, xhigh, ylow, yhigh; - CARD8 xoff, yoff; - - x -= pCurPriv->xhot; - xoff = 0; - if (x < 0) - { - xoff = -x; - x = 0; - } - y -= pCurPriv->yhot; - yoff = 0; - if (y < 0) - { - yoff = -y; - y = 0; - } - xlow = (CARD8) x; - xhigh = (CARD8) (x >> 8); - ylow = (CARD8) y; - yhigh = (CARD8) (y >> 8); - - - /* This is the recommended order to move the cursor */ - - tridentWriteIndex (tridentc, 0x3d4, 0x41, xhigh); - tridentWriteIndex (tridentc, 0x3d4, 0x40, xlow); - tridentWriteIndex (tridentc, 0x3d4, 0x42, ylow); - tridentWriteIndex (tridentc, 0x3d4, 0x46, xoff); - tridentWriteIndex (tridentc, 0x3d4, 0x47, yoff); - tridentWriteIndex (tridentc, 0x3d4, 0x43, yhigh); -} - -static void -tridentMoveCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor (pScreen); - - if (!pCurPriv->has_cursor) - return; - - if (!pScreenPriv->enabled) - return; - - _tridentMoveCursor (pScreen, x, y); -} - -static void -tridentAllocCursorColors (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - - KdAllocateCursorPixels (pScreen, 0, pCursor, - &pCurPriv->source, &pCurPriv->mask); - switch (pScreenPriv->screen->fb[0].bitsPerPixel) { - case 4: - pCurPriv->source |= pCurPriv->source << 4; - pCurPriv->mask |= pCurPriv->mask << 4; - case 8: - pCurPriv->source |= pCurPriv->source << 8; - pCurPriv->mask |= pCurPriv->mask << 8; - case 16: - pCurPriv->source |= pCurPriv->source << 16; - pCurPriv->mask |= pCurPriv->mask << 16; - } -} - -static void -tridentSetCursorColors (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - CARD32 fg, bg; - - fg = pCurPriv->source; - bg = pCurPriv->mask; - tridentWriteIndex (tridentc, 0x3d4, 0x48, fg); - tridentWriteIndex (tridentc, 0x3d4, 0x49, fg >> 8); - tridentWriteIndex (tridentc, 0x3d4, 0x4a, fg >> 16); - - tridentWriteIndex (tridentc, 0x3d4, 0x4c, bg); - tridentWriteIndex (tridentc, 0x3d4, 0x4d, bg >> 8); - tridentWriteIndex (tridentc, 0x3d4, 0x4e, bg >> 16); -} - -void -tridentRecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdef) -{ - SetupCursor (pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - xColorItem sourceColor, maskColor; - - if (!pCurPriv->has_cursor || !pCursor) - return; - - if (!pScreenPriv->enabled) - return; - - if (pdef) - { - while (ndef) - { - if (pdef->pixel == pCurPriv->source || - pdef->pixel == pCurPriv->mask) - break; - ndef--; - } - if (!ndef) - return; - } - tridentAllocCursorColors (pScreen); - tridentSetCursorColors (pScreen); -} - -#define InvertBits32(v) { \ - v = ((v & 0x55555555) << 1) | ((v >> 1) & 0x55555555); \ - v = ((v & 0x33333333) << 2) | ((v >> 2) & 0x33333333); \ - v = ((v & 0x0f0f0f0f) << 4) | ((v >> 4) & 0x0f0f0f0f); \ -} - -static void -tridentLoadCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor(pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - CursorBitsPtr bits = pCursor->bits; - int w, h; - CARD32 *ram, *msk, *mskLine, *src, *srcLine; - int i, j; - int cursor_address; - int lwsrc; - unsigned char ramdac_control_; - CARD32 offset; - - /* - * Allocate new colors - */ - tridentAllocCursorColors (pScreen); - - pCurPriv->pCursor = pCursor; - pCurPriv->xhot = pCursor->bits->xhot; - pCurPriv->yhot = pCursor->bits->yhot; - - /* - * Stick new image into cursor memory - */ - ram = (CARD32 *) tridents->cursor_base; - mskLine = (CARD32 *) bits->mask; - srcLine = (CARD32 *) bits->source; - - h = bits->height; - if (h > TRIDENT_CURSOR_HEIGHT) - h = TRIDENT_CURSOR_HEIGHT; - - lwsrc = BitmapBytePad(bits->width) / 4; /* words per line */ - - for (i = 0; i < TRIDENT_CURSOR_HEIGHT; i++) { - msk = mskLine; - src = srcLine; - mskLine += lwsrc; - srcLine += lwsrc; - for (j = 0; j < TRIDENT_CURSOR_WIDTH / 32; j++) { - - CARD32 m, s; - -#if 1 - if (i < h && j < lwsrc) - { - m = *msk++; - s = *src++; - InvertBits32(m); - InvertBits32(s); - } - else - { - m = 0; - s = 0; - } -#endif - *ram++ = m; - *ram++ = s; - } - } - - /* Set address for cursor bits */ - offset = tridents->cursor_base - (CARD8 *) tridents->screen; - offset >>= 10; - tridentWriteIndex (tridentc, 0x3d4, 0x44, (CARD8) (offset & 0xff)); - tridentWriteIndex (tridentc, 0x3d4, 0x45, (CARD8) (offset >> 8)); - - /* Set new color */ - tridentSetCursorColors (pScreen); - - /* Enable the cursor */ - tridentWriteIndex (tridentc, 0x3d4, 0x50, 0xc1); - - /* Move to new position */ - tridentMoveCursor (pScreen, x, y); -} - -static void -tridentUnloadCursor (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - /* Disable cursor */ - tridentWriteIndex (tridentc, 0x3d4, 0x50, 0); -} - -static Bool -tridentRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) -{ - SetupCursor(pScreen); - - if (!pScreenPriv->enabled) - return TRUE; - - /* miRecolorCursor does this */ - if (pCurPriv->pCursor == pCursor) - { - if (pCursor) - { - int x, y; - - miPointerPosition (&x, &y); - tridentLoadCursor (pScreen, x, y); - } - } - return TRUE; -} - -static Bool -tridentUnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) -{ - return TRUE; -} - -static void -tridentSetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y) -{ - SetupCursor(pScreen); - - pCurPriv->pCursor = pCursor; - - if (!pScreenPriv->enabled) - return; - - if (pCursor) - tridentLoadCursor (pScreen, x, y); - else - tridentUnloadCursor (pScreen); -} - -miPointerSpriteFuncRec tridentPointerSpriteFuncs = { - tridentRealizeCursor, - tridentUnrealizeCursor, - tridentSetCursor, - tridentMoveCursor, -}; - -static void -tridentQueryBestSize (int class, - unsigned short *pwidth, unsigned short *pheight, - ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - switch (class) - { - case CursorShape: - if (*pwidth > pCurPriv->width) - *pwidth = pCurPriv->width; - if (*pheight > pCurPriv->height) - *pheight = pCurPriv->height; - if (*pwidth > pScreen->width) - *pwidth = pScreen->width; - if (*pheight > pScreen->height) - *pheight = pScreen->height; - break; - default: - fbQueryBestSize (class, pwidth, pheight, pScreen); - break; - } -} - -Bool -tridentCursorInit (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (!tridents->cursor_base) - { - pCurPriv->has_cursor = FALSE; - return FALSE; - } - - pCurPriv->width = TRIDENT_CURSOR_WIDTH; - pCurPriv->height= TRIDENT_CURSOR_HEIGHT; - pScreen->QueryBestSize = tridentQueryBestSize; - miPointerInitialize (pScreen, - &tridentPointerSpriteFuncs, - &kdPointerScreenFuncs, - FALSE); - pCurPriv->has_cursor = TRUE; - pCurPriv->pCursor = NULL; - return TRUE; -} - -void -tridentCursorEnable (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (pCurPriv->has_cursor) - { - if (pCurPriv->pCursor) - { - int x, y; - - miPointerPosition (&x, &y); - tridentLoadCursor (pScreen, x, y); - } - else - tridentUnloadCursor (pScreen); - } -} - -void -tridentCursorDisable (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (!pScreenPriv->enabled) - return; - - if (pCurPriv->has_cursor) - { - if (pCurPriv->pCursor) - { - tridentUnloadCursor (pScreen); - } - } -} - -void -tridentCursorFini (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - pCurPriv->pCursor = NULL; -} diff --git a/hw/kdrive/trident/tridentdraw.c b/hw/kdrive/trident/tridentdraw.c deleted file mode 100644 index c26d0be8b..000000000 --- a/hw/kdrive/trident/tridentdraw.c +++ /dev/null @@ -1,496 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "trident.h" -#include "tridentdraw.h" - -#include "Xmd.h" -#include "gcstruct.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "regionstr.h" -#include "mistruct.h" -#include "fontstruct.h" -#include "dixfontstr.h" -#include "fb.h" -#include "migc.h" -#include "miline.h" -#include "picturestr.h" - -CARD8 tridentRop[16] = { - /* GXclear */ 0x00, /* 0 */ - /* GXand */ 0x88, /* src AND dst */ - /* GXandReverse */ 0x44, /* src AND NOT dst */ - /* GXcopy */ 0xcc, /* src */ - /* GXandInverted*/ 0x22, /* NOT src AND dst */ - /* GXnoop */ 0xaa, /* dst */ - /* GXxor */ 0x66, /* src XOR dst */ - /* GXor */ 0xee, /* src OR dst */ - /* GXnor */ 0x11, /* NOT src AND NOT dst */ - /* GXequiv */ 0x99, /* NOT src XOR dst */ - /* GXinvert */ 0x55, /* NOT dst */ - /* GXorReverse */ 0xdd, /* src OR NOT dst */ - /* GXcopyInverted*/ 0x33, /* NOT src */ - /* GXorInverted */ 0xbb, /* NOT src OR dst */ - /* GXnand */ 0x77, /* NOT src OR NOT dst */ - /* GXset */ 0xff, /* 1 */ -}; - -#define tridentFillPix(bpp,pixel) {\ - if (bpp == 8) \ - { \ - pixel = pixel & 0xff; \ - pixel = pixel | pixel << 8; \ - } \ - if (bpp <= 16) \ - { \ - pixel = pixel & 0xffff; \ - pixel = pixel | pixel << 16; \ - } \ -} - -static Cop *cop; -static CARD32 cmd; - -Bool -tridentPrepareSolid (DrawablePtr pDrawable, - int alu, - Pixel pm, - Pixel fg) -{ - FbBits depthMask = FbFullMask(pDrawable->depth); - - if ((pm & depthMask) != depthMask) - return FALSE; - else - { - KdScreenPriv(pDrawable->pScreen); - tridentCardInfo(pScreenPriv); - cop = tridentc->cop; - - tridentFillPix(pDrawable->bitsPerPixel,fg); - _tridentInit(cop,tridentc); - _tridentSetSolidRect(cop,fg,alu,cmd); - return TRUE; - } -} - -void -tridentSolid (int x1, int y1, int x2, int y2) -{ - _tridentRect (cop, x1, y1, x2 - 1, y2 - 1, cmd); -} - -void -tridentDoneSolid (void) -{ -} - -Bool -tridentPrepareCopy (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - int dx, - int dy, - int alu, - Pixel pm) -{ - FbBits depthMask = FbFullMask(pDstDrawable->depth); - - if ((pm & depthMask) == depthMask) - { - KdScreenPriv(pDstDrawable->pScreen); - tridentCardInfo(pScreenPriv); - cop = tridentc->cop; - _tridentInit(cop,tridentc); - cop->multi = COP_MULTI_PATTERN; - cop->multi = COP_MULTI_ROP | tridentRop[alu]; - cmd = COP_OP_BLT | COP_SCL_OPAQUE | COP_OP_ROP | COP_OP_FB; - if (dx < 0 || dy < 0) - cmd |= COP_X_REVERSE; - return TRUE; - } - else - return FALSE; -} - -void -tridentCopy (int srcX, - int srcY, - int dstX, - int dstY, - int w, - int h) -{ - if (cmd & COP_X_REVERSE) - { - cop->src_start_xy = TRI_XY (srcX + w - 1, srcY + h - 1); - cop->src_end_xy = TRI_XY (srcX, srcY); - cop->dst_start_xy = TRI_XY (dstX + w - 1, dstY + h - 1); - cop->dst_end_xy = TRI_XY (dstX, dstY); - } - else - { - cop->src_start_xy = TRI_XY (srcX, srcY); - cop->src_end_xy = TRI_XY (srcX + w - 1, srcY + h - 1); - cop->dst_start_xy = TRI_XY (dstX, dstY); - cop->dst_end_xy = TRI_XY (dstX + w - 1, dstY + h - 1); - } - _tridentWaitDone (cop); - cop->command = cmd; -} - -void -tridentDoneCopy (void) -{ -} - -void -tridentComposite (CARD8 op, - PicturePtr pSrc, - PicturePtr pMask, - PicturePtr pDst, - INT16 xSrc, - INT16 ySrc, - INT16 xMask, - INT16 yMask, - INT16 xDst, - INT16 yDst, - CARD16 width, - CARD16 height) -{ - SetupTrident (pDst->pDrawable->pScreen); - tridentScreenInfo(pScreenPriv); - RegionRec region; - int n; - BoxPtr pbox; - CARD32 rgb; - CARD8 *msk, *mskLine; - FbBits *mskBits; - FbStride mskStride; - int mskBpp; - int mskXoff, mskYoff; - CARD32 *src, *srcLine; - CARD32 *off, *offLine; - FbBits *srcBits; - FbStride srcStride; - int srcXoff, srcYoff; - FbStride offStride; - int srcBpp; - int x_msk, y_msk, x_src, y_src, x_dst, y_dst; - int x2; - int w, h, w_this, h_this, w_remain; - CARD32 *off_screen; - int off_size = tridents->off_screen_size >> 2; - int off_width, off_height; - int stride = pScreenPriv->screen->fb[0].pixelStride; - int mskExtra; - CARD32 off_screen_offset = tridents->off_screen - tridents->screen; - int mode; - -#define MODE_NONE 0 -#define MODE_IMAGE 1 -#define MODE_MASK 2 - - rgb = *((CARD32 *) ((PixmapPtr) (pSrc->pDrawable))->devPrivate.ptr); - if (pMask && - !pMask->repeat && - pMask->format == PICT_a8 && - op == PictOpOver && - pSrc->repeat && - pSrc->pDrawable->width == 1 && - pSrc->pDrawable->height == 1 && - PICT_FORMAT_BPP(pSrc->format) == 32 && - (PICT_FORMAT_A(pSrc->format) == 0 || - (rgb & 0xff000000) == 0xff000000) && - pDst->pDrawable->bitsPerPixel == 32 && - pDst->pDrawable->type == DRAWABLE_WINDOW) - { - mode = MODE_MASK; - } - else if (!pMask && - op == PictOpOver && - !pSrc->repeat && - PICT_FORMAT_A(pSrc->format) == 8 && - PICT_FORMAT_BPP(pSrc->format) == 32 && - pDst->pDrawable->bitsPerPixel == 32 && - pDst->pDrawable->type == DRAWABLE_WINDOW) - { - mode = MODE_IMAGE; - } - else - mode = MODE_NONE; - - if (mode != MODE_NONE) - { - xDst += pDst->pDrawable->x; - yDst += pDst->pDrawable->y; - xSrc += pSrc->pDrawable->x; - ySrc += pSrc->pDrawable->y; - - fbGetDrawable (pSrc->pDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff); - - if (pMask) - { - xMask += pMask->pDrawable->x; - yMask += pMask->pDrawable->y; - fbGetDrawable (pMask->pDrawable, mskBits, mskStride, mskBpp, mskXoff, mskYoff); - mskStride = mskStride * sizeof (FbBits) / sizeof (CARD8); - } - - if (!miComputeCompositeRegion (®ion, - pSrc, - pMask, - pDst, - xSrc, - ySrc, - xMask, - yMask, - xDst, - yDst, - width, - height)) - return; - - _tridentInit(cop,tridentc); - - cop->multi = COP_MULTI_PATTERN; - cop->src_offset = off_screen_offset; - - if (mode == MODE_IMAGE) - { - cop->multi = (COP_MULTI_ALPHA | - COP_ALPHA_BLEND_ENABLE | - COP_ALPHA_WRITE_ENABLE | - 0x7 << 16 | - COP_ALPHA_DST_BLEND_1_SRC_A | - COP_ALPHA_SRC_BLEND_1); - } - else - { - rgb &= 0xffffff; - cop->multi = (COP_MULTI_ALPHA | - COP_ALPHA_BLEND_ENABLE | - COP_ALPHA_WRITE_ENABLE | - 0x7 << 16 | - COP_ALPHA_DST_BLEND_1_SRC_A | - COP_ALPHA_SRC_BLEND_SRC_A); - } - - n = REGION_NUM_RECTS (®ion); - pbox = REGION_RECTS (®ion); - - while (n--) - { - h = pbox->y2 - pbox->y1; - w = pbox->x2 - pbox->x1; - - offStride = (w + 7) & ~7; - off_height = off_size / offStride; - if (off_height > h) - off_height = h; - - cop->multi = COP_MULTI_STRIDE | (stride << 16) | offStride; - - y_dst = pbox->y1; - y_src = y_dst - yDst + ySrc; - y_msk = y_dst - yDst + yMask; - - x_dst = pbox->x1; - x_src = x_dst - xDst + xSrc; - x_msk = x_dst - xDst + xMask; - - if (mode == MODE_IMAGE) - srcLine = (CARD32 *) srcBits + (y_src - srcYoff) * srcStride + (x_src - srcXoff); - else - mskLine = (CARD8 *) mskBits + (y_msk - mskYoff) * mskStride + (x_msk - mskXoff); - - while (h) - { - h_this = h; - if (h_this > off_height) - h_this = off_height; - h -= h_this; - - offLine = (CARD32 *) tridents->off_screen; - - _tridentWaitDone(cop); - - cop->dst_start_xy = TRI_XY(x_dst, y_dst); - cop->dst_end_xy = TRI_XY(x_dst + w - 1, y_dst + h_this - 1); - cop->src_start_xy = TRI_XY(0,0); - cop->src_end_xy = TRI_XY(w - 1, h_this - 1); - - if (mode == MODE_IMAGE) - { - while (h_this--) - { - w_remain = w; - src = srcLine; - srcLine += srcStride; - off = offLine; - offLine += offStride; - while (w_remain--) - *off++ = *src++; - } - } - else - { - while (h_this--) - { - w_remain = w; - msk = mskLine; - mskLine += mskStride; - off = offLine; - offLine += offStride; - while (w_remain--) - *off++ = rgb | (*msk++ << 24); - } - } - - cop->command = (COP_OP_BLT | - COP_SCL_OPAQUE | - COP_OP_FB); - } - pbox++; - } - cop->src_offset = 0; - - KdMarkSync (pDst->pDrawable->pScreen); - } - else - { - KdCheckComposite (op, - pSrc, - pMask, - pDst, - xSrc, - ySrc, - xMask, - yMask, - xDst, - yDst, - width, - height); - } -} - -KaaScreenPrivRec tridentKaa = { - tridentPrepareSolid, - tridentSolid, - tridentDoneSolid, - - tridentPrepareCopy, - tridentCopy, - tridentDoneCopy, -}; - -Bool -tridentDrawInit (ScreenPtr pScreen) -{ - SetupTrident(pScreen); - tridentScreenInfo(pScreenPriv); - PictureScreenPtr ps = GetPictureScreen(pScreen); - - if (!kaaDrawInit (pScreen, &tridentKaa)) - return FALSE; - - if (ps && tridents->off_screen) - ps->Composite = tridentComposite; - - return TRUE; -} - -void -tridentDrawEnable (ScreenPtr pScreen) -{ - SetupTrident(pScreen); - CARD32 cmd; - CARD32 base; - CARD16 stride; - CARD32 format; - CARD32 alpha; - int tries; - int nwrite; - - stride = pScreenPriv->screen->fb[0].pixelStride; - switch (pScreenPriv->screen->fb[0].bitsPerPixel) { - case 8: - format = COP_DEPTH_8; - break; - case 16: - format = COP_DEPTH_16; - break; - case 24: - format = COP_DEPTH_24_32; - break; - case 32: - format = COP_DEPTH_24_32; - break; - } - /* - * compute a few things which will be set every time the - * accelerator is used; this avoids problems with APM - */ - tridentc->cop_depth = COP_MULTI_DEPTH | format; - tridentc->cop_stride = COP_MULTI_STRIDE | (stride << 16) | (stride); - -#define NUM_TRIES 100000 - for (tries = 0; tries < NUM_TRIES; tries++) - if (!(cop->status & COP_STATUS_BUSY)) - break; - if (cop->status & COP_STATUS_BUSY) - FatalError ("Can't initialize graphics coprocessor"); - cop->multi = COP_MULTI_CLIP_TOP_LEFT; - cop->multi = COP_MULTI_MASK | 0; - cop->src_offset = 0; - cop->dst_offset = 0; - cop->z_offset = 0; - cop->clip_bottom_right = 0x0fff0fff; - - _tridentInit(cop,tridentc); - _tridentSetSolidRect(cop, pScreen->blackPixel, GXcopy, cmd); - _tridentRect (cop, 0, 0, - pScreenPriv->screen->width, pScreenPriv->screen->height, - cmd); - KdMarkSync (pScreen); -} - -void -tridentDrawDisable (ScreenPtr pScreen) -{ -} - -void -tridentDrawFini (ScreenPtr pScreen) -{ -} - -void -tridentDrawSync (ScreenPtr pScreen) -{ - SetupTrident(pScreen); - - _tridentWaitIdleEmpty(cop); -} diff --git a/hw/kdrive/trident/tridentdraw.h b/hw/kdrive/trident/tridentdraw.h deleted file mode 100644 index bac11c2a6..000000000 --- a/hw/kdrive/trident/tridentdraw.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _TRIDENTDRAW_H_ -#define _TRIDENTDRAW_H_ - -#define SetupTrident(s) KdScreenPriv(s); \ - tridentCardInfo(pScreenPriv); \ - Cop *cop = tridentc->cop - -#define TridentAlpha (COP_MULTI_ALPHA|COP_ALPHA_WRITE_ENABLE) - -#define _tridentInit(cop,tridentc) { \ - if ((cop)->status == 0xffffffff) tridentSetMMIO(tridentc); \ - (cop)->multi = (tridentc)->cop_depth; \ - (cop)->multi = (tridentc)->cop_stride; \ - (cop)->multi = TridentAlpha; \ -} \ - -#define _tridentSetSolidRect(cop,pix,alu,cmd) {\ - cop->multi = COP_MULTI_PATTERN; \ - cop->multi = COP_MULTI_ROP | tridentRop[alu]; \ - cop->fg = (pix); \ - cmd = COP_OP_BLT | COP_SCL_OPAQUE | COP_OP_ROP | COP_OP_FG; \ -} - -#define _tridentRect(cop,x1,y1,x2,y2,cmd) { \ - (cop)->dst_start_xy = TRI_XY (x1,y1); \ - (cop)->dst_end_xy = TRI_XY(x2,y2); \ - _tridentWaitDone(cop); \ - (cop)->command = (cmd); \ -} - -#define COP_STATUS_BUSY (COP_STATUS_BE_BUSY | \ - COP_STATUS_DPE_BUSY | \ - COP_STATUS_MI_BUSY) - -#define _tridentWaitDone(cop) { \ - int __q__ = 500000; \ - while (__q__-- && (cop)->status & COP_STATUS_BUSY) \ - ; \ - if (!__q__) \ - (cop)->status = 0; \ -} - -#define _tridentWaitIdleEmpty(cop) _tridentWaitDone(cop) - -#define sourceInvarient(alu) (((alu) & 3) == (((alu) >> 2) & 3)) - -#endif diff --git a/hw/kdrive/trident/tridentstub.c b/hw/kdrive/trident/tridentstub.c deleted file mode 100644 index 0792a50d4..000000000 --- a/hw/kdrive/trident/tridentstub.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "trident.h" - -extern int trident_clk, trident_mclk; - -void -InitCard (char *name) -{ - KdCardAttr attr; - - if (LinuxFindPci (0x1023, 0x9525, 0, &attr)) - KdCardInfoAdd (&tridentFuncs, &attr, 0); -} - -void -InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) -{ - KdInitOutput (pScreenInfo, argc, argv); -} - -void -InitInput (int argc, char **argv) -{ - KdOsAddInputDrivers (); - KdInitInput (); -} - -void -ddxUseMsg (void) -{ -#if 0 - ErrorF("\nTrident Driver Options:\n"); - ErrorF("-clk XXX: what's this?\n"); - ErrorF("-mclk XXX: what's this?\n"); -#endif - KdUseMsg(); -#ifdef VESA - vesaUseMsg() -#endif -} - -int -ddxProcessArgument (int argc, char **argv, int i) -{ - int ret; - - if (!strcmp (argv[i], "-clk")) - { - if (i+1 < argc) - trident_clk = atoi (argv[i+1]); - else - UseMsg (); - return 2; - } - if (!strcmp (argv[i], "-mclk")) - { - if (i+1 < argc) - trident_mclk = atoi (argv[i+1]); - else - UseMsg (); - return 2; - } - -#ifdef VESA - if (!(ret = vesaProcessArgument (argc, argv, i))) -#endif - ret = KdProcessArgument(argc, argv, i); - return ret; -} diff --git a/hw/kdrive/trio/s3.c b/hw/kdrive/trio/s3.c deleted file mode 100644 index cb5104926..000000000 --- a/hw/kdrive/trio/s3.c +++ /dev/null @@ -1,1013 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "s3.h" - -#define REGISTERS_OFFSET (0x1000000) -#define PACKED_OFFSET (0x8100) - - -CARD8 -_s3ReadIndexRegister (volatile CARD8 *base, CARD8 index) -{ - CARD8 ret; - *base = index; - ret = *(base + 1); - DRAW_DEBUG ((DEBUG_CRTC, " 0x%3x 0x%02x -> 0x%02x", - ((int) base) & 0xfff, index, ret)); - return ret; -} - -void -_s3WriteIndexRegister (volatile CARD8 *base, CARD8 index, CARD8 value) -{ - DRAW_DEBUG ((DEBUG_CRTC, " 0x%3x 0x%02x <- 0x%02x", - ((int) base) & 0xfff, index, value)); - *base = index; - *(base + 1) = value; -} - -/* - * Map the S3 card and detect its configuration. Do not touch the card - */ - -static void -_s3LoadCrtc (S3Ptr s3, S3Crtc *crtc) -{ - crtc->h_total_0_7 = GetCrtc (s3, 0x00); - crtc->h_display_end_0_7 = GetCrtc (s3, 0x01); - crtc->h_blank_start_0_7 = GetCrtc (s3, 0x02); - crtc->_h_blank_end = GetCrtc (s3, 0x03); - crtc->h_sync_start_0_7 = GetCrtc (s3, 0x04); - crtc->_h_sync_end = GetCrtc (s3, 0x05); - crtc->v_total_0_7 = GetCrtc (s3, 0x06); - crtc->crtc_overflow = GetCrtc (s3, 0x07); - crtc->preset_row_scan = GetCrtc (s3, 0x08); - crtc->_max_scan_line = GetCrtc (s3, 0x09); - - crtc->start_address_8_15 = GetCrtc (s3, 0x0c); - crtc->start_address_0_7 = GetCrtc (s3, 0x0d); - - crtc->v_retrace_start_0_7 = GetCrtc (s3, 0x10); - crtc->_v_retrace_end = GetCrtc (s3, 0x11); - crtc->v_display_end_0_7 = GetCrtc (s3, 0x12); - crtc->screen_off_0_7 = GetCrtc (s3, 0x13); - - crtc->v_blank_start_0_7 = GetCrtc (s3, 0x15); - crtc->v_blank_end_0_7 = GetCrtc (s3, 0x16); - - crtc->line_compare_0_7 = GetCrtc (s3, 0x18); - - crtc->memory_configuration = GetCrtc (s3, 0x31); - - crtc->misc_1 = GetCrtc (s3, 0x3a); - crtc->h_start_fifo_fetch_0_7 = GetCrtc (s3, 0x3b); - - crtc->mode_control = GetCrtc (s3, 0x42); - - crtc->hardware_cursor_mode = GetCrtc (s3, 0x45); - crtc->cursor_address_8_15 = GetCrtc (s3, 0x4C); - crtc->cursor_address_0_7 = GetCrtc (s3, 0x4D); - - crtc->extended_system_control_1 = GetCrtc (s3, 0x50); - crtc->extended_system_control_2 = GetCrtc (s3, 0x51); - - crtc->extended_memory_control = GetCrtc (s3, 0x53); - - crtc->extended_ramdac_control = GetCrtc (s3, 0x55); - - crtc->extended_horizontal_overflow = GetCrtc (s3, 0x5d); - crtc->extended_vertical_overflow = GetCrtc (s3, 0x5e); - - crtc->l_parm_0_7 = GetCrtc (s3, 0x62); - - crtc->extended_misc_control = GetCrtc (s3, 0x65); - - crtc->extended_misc_control_2 = GetCrtc (s3, 0x67); - - crtc->configuration_3 = GetCrtc (s3, 0x68); - - crtc->extended_system_control_3 = GetCrtc (s3, 0x69); - - crtc->extended_bios_5 = GetCrtc (s3, 0x6d); - - crtc->extended_sequencer_b = GetSrtc (s3, 0x0b); - crtc->extended_sequencer_d = GetSrtc (s3, 0x0d); - crtc->dclk_value_low = GetSrtc (s3, 0x12); - crtc->dclk_value_high = GetSrtc (s3, 0x13); - crtc->control_2 = GetSrtc (s3, 0x15); - crtc->ramdac_control = GetSrtc (s3, 0x18); - -/* combine values */ - - switch (crtc_ge_screen_width(crtc)) { - case 0: - if (crtc->enable_two_page) - crtc->ge_screen_pitch = 2048; - else - crtc->ge_screen_pitch = 1024; - break; - case 1: - crtc->ge_screen_pitch = 640; - break; - case 2: - /* ignore magic 1600x1200x4 mode */ - crtc->ge_screen_pitch = 800; - break; - case 3: - crtc->ge_screen_pitch = 1280; - break; - case 4: - crtc->ge_screen_pitch = 1152; - break; - case 5: - crtc->ge_screen_pitch = 0; /* reserved */ - break; - case 6: - crtc->ge_screen_pitch = 1600; - break; - case 7: - crtc->ge_screen_pitch = 0; /* reserved */ - break; - } - switch (crtc->pixel_length) { - case 0: - crtc->bits_per_pixel = 8; - crtc->pixel_width = (crtc_h_display_end(crtc) + 1) * 8; - break; - case 1: - crtc->bits_per_pixel = 16; - crtc->pixel_width = (crtc_h_display_end(crtc) + 1) * 4; - break; - case 3: - crtc->bits_per_pixel = 32; - crtc->pixel_width = (crtc_h_display_end(crtc) + 1) * 8; - break; - } - crtc->double_pixel_mode = 0; - switch (crtc->color_mode) { - case 0x0: - crtc->depth = 8; break; - case 0x1: - crtc->depth = 8; crtc->double_pixel_mode = 1; break; - case 0x3: - crtc->depth = 15; break; - case 0x5: - crtc->depth = 16; break; - case 0x7: - crtc->depth = 24; break; /* unused */ - case 0xd: - crtc->depth = 24; break; - } -} - -static void -_s3SetBlank (S3Ptr s3, Bool blank) -{ - CARD8 clock_mode; - - DRAW_DEBUG ((DEBUG_S3INIT, "3c4 at 0x%x\n", &s3->crt_vga_3c4)); - clock_mode = _s3ReadIndexRegister (&s3->crt_vga_3c4, 0x01); - if (blank) - clock_mode |= 0x20; - else - clock_mode &= ~0x20; - _s3WaitVRetrace (s3); - _s3WriteIndexRegister (&s3->crt_vga_3c4, 0x01, clock_mode); - DRAW_DEBUG ((DEBUG_S3INIT, "blank is set to 0x%x", clock_mode)); -} - -static void -_s3SetDepth (S3Ptr s3, S3Crtc *crtc) -{ - CARD8 save_3c2; - _s3SetBlank (s3, TRUE); - PutCrtc(s3, 0x38, 0x48); - PutCrtc(s3, 0x39, 0xA0); - PutCrtc(s3, 0x00, crtc->h_total_0_7); - PutCrtc(s3, 0x01, crtc->h_display_end_0_7); - PutCrtc(s3, 0x02, crtc->h_blank_start_0_7); - PutCrtc(s3, 0x03, crtc->_h_blank_end); - PutCrtc(s3, 0x04, crtc->h_sync_start_0_7); - PutCrtc(s3, 0x05, crtc->_h_sync_end); - PutCrtc(s3, 0x06, crtc->v_total_0_7); - PutCrtc(s3, 0x07, crtc->crtc_overflow); - PutCrtc(s3, 0x09, crtc->_max_scan_line); - PutCrtc(s3, 0x0c, crtc->start_address_8_15); - PutCrtc(s3, 0x0d, crtc->start_address_0_7); - PutCrtc(s3, 0x10, crtc->v_retrace_start_0_7); - PutCrtc(s3, 0x11, crtc->_v_retrace_end); - PutCrtc(s3, 0x12, crtc->v_display_end_0_7); - PutCrtc(s3, 0x13, crtc->screen_off_0_7); - PutCrtc(s3, 0x15, crtc->v_blank_start_0_7); - PutCrtc(s3, 0x16, crtc->v_blank_end_0_7); - PutCrtc(s3, 0x18, crtc->line_compare_0_7); - PutCrtc(s3, 0x31, crtc->memory_configuration); - PutCrtc(s3, 0x3a, crtc->misc_1); - PutCrtc(s3, 0x3b, crtc->h_start_fifo_fetch_0_7); - PutCrtc(s3, 0x42, crtc->mode_control); - PutCrtc(s3, 0x45, crtc->hardware_cursor_mode); - PutCrtc(s3, 0x4c, crtc->cursor_address_8_15); - PutCrtc(s3, 0x4d, crtc->cursor_address_0_7); - PutCrtc(s3, 0x50, crtc->extended_system_control_1); - PutCrtc(s3, 0x51, crtc->extended_system_control_2); - PutCrtc(s3, 0x53, crtc->extended_memory_control); - PutCrtc(s3, 0x55, crtc->extended_ramdac_control); - PutCrtc(s3, 0x5d, crtc->extended_horizontal_overflow); - PutCrtc(s3, 0x5e, crtc->extended_vertical_overflow); - PutCrtc(s3, 0x62, crtc->l_parm_0_7); - PutCrtc(s3, 0x65, crtc->extended_misc_control); - PutCrtc(s3, 0x67, crtc->extended_misc_control_2); - PutCrtc(s3, 0x68, crtc->configuration_3); - PutCrtc(s3, 0x69, crtc->extended_system_control_3); - PutCrtc(s3, 0x6d, crtc->extended_bios_5); - PutCrtc(s3, 0x39, 0x00); - PutCrtc(s3, 0x38, 0x00); - PutSrtc(s3, 0x0b, crtc->extended_sequencer_b); - PutSrtc(s3, 0x0d, crtc->extended_sequencer_d); - /* - * Move new dclk/mclk values into PLL - */ - save_3c2 = s3->crt_vga_3cc; - DRAW_DEBUG ((DEBUG_S3INIT, "save_3c2 0x%x", save_3c2)); - s3->crt_vga_3c2 = save_3c2 | 0x0c; - - PutSrtc(s3, 0x12, crtc->dclk_value_low); - PutSrtc(s3, 0x13, crtc->dclk_value_high); - - DRAW_DEBUG ((DEBUG_S3INIT, "Set PLL load enable, frobbing clk_load...")); - crtc->dfrq_en = 1; - PutSrtc(s3, 0x15, crtc->control_2); - PutSrtc(s3, 0x18, crtc->ramdac_control); - - DRAW_DEBUG ((DEBUG_S3INIT, "Clk load frobbed, restoring 3c2 to 0x%x", save_3c2)); - s3->crt_vga_3c2 = save_3c2; - - DRAW_DEBUG ((DEBUG_S3INIT, "Enabling display")); - _s3SetBlank (s3, FALSE); -} - -void -_s3RestoreCrtc (S3Ptr s3, S3Crtc *crtc) -{ - _s3SetDepth (s3, crtc); -} - -s3Reset (S3CardInfo *s3c) -{ - S3Ptr s3 = s3c->s3; - S3Save *save = &s3c->save; - CARD8 *cursor_base; - - LockS3 (s3c); - - _s3UnlockExt (s3); - - _s3RestoreCrtc (s3, &save->crtc); - - /* set foreground */ - /* Reset cursor color stack pointers */ - (void) GetCrtc(s3, 0x45); - PutCrtc(s3, 0x4a, save->cursor_fg); - /* XXX for deeper screens? */ - - /* set background */ - /* Reset cursor color stack pointers */ - (void) GetCrtc(s3, 0x45); - PutCrtc(s3, 0x4b, save->cursor_bg); - - _s3LockExt (s3); - - /* graphics engine state */ - s3->alt_mix = save->alt_mix; - s3->write_mask = save->write_mask; - s3->fg = save->fg; - s3->bg = save->bg; - /* XXX should save and restore real values? */ - s3->scissors_tl = 0x00000000; - s3->scissors_br = 0x0fff0fff; - - _s3WriteIndexRegister (&s3->crt_vga_3c4, 0x01, save->clock_mode); - PutCrtc(s3, 0x39, save->lock2); - PutCrtc(s3, 0x38, save->lock1); - - UnlockS3 (s3c); -} - -void -s3Save (S3CardInfo *s3c) -{ - S3Ptr s3 = s3c->s3; - S3Save *save = &s3c->save; - S3Crtc newCrtc; - CARD8 t1, t2; - CARD8 *cursor_base; - - LockS3 (s3c); - - save->alt_mix = s3->alt_mix; - save->write_mask = s3->write_mask; - save->fg = s3->fg; - save->bg = s3->bg; - - save->lock1 = GetCrtc(s3, 0x38); - save->lock2 = GetCrtc(s3, 0x39); - save->clock_mode = _s3ReadIndexRegister (&s3->crt_vga_3c4, 0x01); - - _s3UnlockExt (s3); - save->cursor_fg = GetCrtc(s3, 0x4a); - save->cursor_bg = GetCrtc(s3, 0x4b); - - _s3LoadCrtc (s3, &save->crtc); - - _s3LockExt (s3); - - UnlockS3 (s3c); -} -Bool -s3CardInit (KdCardInfo *card) -{ - S3CardInfo *s3c; - S3Ptr s3; - int size; - CARD8 *registers; - CARD32 s3Address = card->attr.address[0]; - CARD8 *temp_buffer; - - DRAW_DEBUG ((DEBUG_S3INIT, "s3CardInit")); - s3c = (S3CardInfo *) xalloc (sizeof (S3CardInfo)); - if (!s3c) - { - DRAW_DEBUG ((DEBUG_FAILURE, "can't alloc s3 card info")); - goto bail0; - } - - memset (s3c, '\0', sizeof (S3CardInfo)); - - card->driver = s3c; - - fprintf (stderr, "S3 at 0x%x\n", s3Address); - registers = KdMapDevice (s3Address + REGISTERS_OFFSET, - sizeof (S3) + PACKED_OFFSET); - if (!registers) - { - ErrorF ("Can't map s3 device\n"); - goto bail2; - } - s3 = (S3Ptr) (registers + PACKED_OFFSET); - s3c->registers = registers; - s3c->s3 = s3; - - s3->crt_vga_3c3 = 1; /* wake up part from deep sleep */ - s3->crt_vga_3c2 = 0x01 | 0x02 | 0x0c; - - s3->crt_vga_3c4 = 0x58; - s3->crt_vga_3c5 = 0x10 | 0x3; - - /* - * Can't trust S3 register value for frame buffer amount, must compute - */ - temp_buffer = KdMapDevice (s3Address, 4096 * 1024); - - s3c->memory = KdFrameBufferSize (temp_buffer, 4096 * 1024); - - DRAW_DEBUG ((DEBUG_S3INIT, "Detected frame buffer %d", s3c->memory)); - - KdUnmapDevice (temp_buffer, 4096 * 1024); - - if (!s3c->memory) - { - ErrorF ("Can't detect s3 frame buffer\n"); - goto bail3; - } - - s3c->frameBuffer = KdMapDevice (s3Address, s3c->memory); - if (!s3c->frameBuffer) - { - ErrorF ("Can't map s3 frame buffer\n"); - goto bail3; - } - - card->driver = s3c; - - return TRUE; -bail3: - KdUnmapDevice ((void *) s3, sizeof (S3)); -bail2: -bail1: - xfree (s3c); -bail0: - return FALSE; -} - -Bool -s3ModeSupported (KdScreenInfo *screen, - const KdMonitorTiming *t) -{ - if (t->horizontal != 1600 && - t->horizontal != 1280 && - t->horizontal != 1152 && - t->horizontal != 1024 && - t->horizontal != 800 && - t->horizontal != 640) - return FALSE; - if (t->clock > S3_MAX_CLOCK * 2) - return FALSE; - return TRUE; -} - -Bool -s3ModeUsable (KdScreenInfo *screen) -{ - KdCardInfo *card = screen->card; - S3CardInfo *s3c = (S3CardInfo *) card->driver; - int screen_size; - int pixel_width; - int byte_width; - - if (screen->fb[0].depth >= 24) - { - screen->fb[0].depth = 24; - screen->fb[0].bitsPerPixel = 32; - } - else if (screen->fb[0].depth >= 16) - { - screen->fb[0].depth = 16; - screen->fb[0].bitsPerPixel = 16; - } - else if (screen->fb[0].depth >= 15) - { - screen->fb[0].depth = 15; - screen->fb[0].bitsPerPixel = 16; - } - else - { - screen->fb[0].depth = 8; - screen->fb[0].bitsPerPixel = 8; - } - - byte_width = screen->width * (screen->fb[0].bitsPerPixel >> 3); - pixel_width = screen->width; - screen->fb[0].pixelStride = pixel_width; - screen->fb[0].byteStride = byte_width; - - screen_size = byte_width * screen->height; - - return screen_size <= s3c->memory; -} - -Bool -s3ScreenInit (KdScreenInfo *screen) -{ - KdCardInfo *card = screen->card; - S3CardInfo *s3c = (S3CardInfo *) card->driver; - S3ScreenInfo *s3s; - int screen_size; - int memory; - int requested_memory; - int v_total, h_total; - int byte_width; - int pixel_width; - int m, n, r; - int i; - const KdMonitorTiming *t; - - DRAW_DEBUG ((DEBUG_S3INIT, "s3ScreenInit")); - s3s = (S3ScreenInfo *) xalloc (sizeof (S3ScreenInfo)); - if (!s3s) - return FALSE; - - memset (s3s, '\0', sizeof (S3ScreenInfo)); - - if (!screen->width || !screen->height) - { - screen->width = 800; - screen->height = 600; - screen->rate = 72; - } - if (!screen->fb[0].depth) - screen->fb[0].depth = 8; - - DRAW_DEBUG ((DEBUG_S3INIT, "Requested parameters %dx%dx%d", - screen->width, screen->height, screen->rate)); - t = KdFindMode (screen, s3ModeSupported); - screen->rate = t->rate; - screen->width = t->horizontal; - screen->height = t->vertical; - s3GetClock (t->clock, &m, &n, &r, 127, 31, 3); -#if 0 - fprintf (stderr, "computed %d,%d,%d (%d) provided %d,%d,%d (%d)\n", - m, n, r, S3_CLOCK(m,n,r), - t->dac_m, t->dac_n, t->dac_r, - S3_CLOCK(t->dac_m, t->dac_n, t->dac_r)); -#endif - /* - * Can only operate in pixel-doubled mode at 8 bits per pixel - */ - if (screen->fb[0].depth > 8 && S3_CLOCK(m,n,r) > S3_MAX_CLOCK) - screen->fb[0].depth = 8; - - if (!KdTuneMode (screen, s3ModeUsable, s3ModeSupported)) - { - xfree (s3s); - return FALSE; - } - - memory = s3c->memory - screen_size; - - /* - * Stick frame buffer at start of memory - */ - screen->fb[0].frameBuffer = s3c->frameBuffer; - - /* - * Stick cursor at end of memory - */ - if (memory >= 2048) - { - s3s->cursor_base = s3c->frameBuffer + (s3c->memory - 2048); - memory -= 2048; - } - else - s3s->cursor_base = 0; - - /* - * Use remaining memory for off-screen storage, but only use - * one piece (either right or bottom). - */ - if (memory >= byte_width * S3_TILE_SIZE) - { - s3s->fb[0].offscreen = s3c->frameBuffer + screen_size; - s3s->fb[0].offscreen_x = 0; - s3s->fb[0].offscreen_y = screen_size / byte_width; - s3s->fb[0].offscreen_width = pixel_width; - s3s->fb[0].offscreen_height = memory / byte_width; - memory -= s3s->fb[0].offscreen_height * byte_width; - } - else if (pixel_width - screen->width >= S3_TILE_SIZE) - { - s3s->fb[0].offscreen = s3c->frameBuffer + screen->width; - s3s->fb[0].offscreen_x = screen->width; - s3s->fb[0].offscreen_y = 0; - s3s->fb[0].offscreen_width = pixel_width - screen->width; - s3s->fb[0].offscreen_height = screen->height; - } - else - s3s->fb[0].offscreen = 0; - - DRAW_DEBUG ((DEBUG_S3INIT, "depth %d bits %d", screen->fb[0].depth, screen->fb[0].bitsPerPixel)); - - DRAW_DEBUG ((DEBUG_S3INIT, "Screen size %dx%d memory %d", - screen->width, screen->height, s3c->memory)); - DRAW_DEBUG ((DEBUG_S3INIT, "frame buffer 0x%x cursor 0x%x offscreen 0x%x", - s3c->frameBuffer, s3s->cursor_base, s3s->offscreen)); - DRAW_DEBUG ((DEBUG_S3INIT, "offscreen %dx%d+%d+%d", - s3s->offscreen_width, s3s->offscreen_height, - s3s->offscreen_x, s3s->offscreen_y)); - - switch (screen->fb[0].depth) { - case 8: - screen->fb[0].visuals = ((1 << StaticGray) | - (1 << GrayScale) | - (1 << StaticColor) | - (1 << PseudoColor) | - (1 << TrueColor) | - (1 << DirectColor)); - screen->fb[0].blueMask = 0x00; - screen->fb[0].greenMask = 0x00; - screen->fb[0].redMask = 0x00; - break; - case 15: - screen->fb[0].visuals = (1 << TrueColor); - screen->fb[0].blueMask = 0x001f; - screen->fb[0].greenMask = 0x03e0; - screen->fb[0].redMask = 0x7c00; - break; - case 16: - screen->fb[0].visuals = (1 << TrueColor); - screen->fb[0].blueMask = 0x001f; - screen->fb[0].greenMask = 0x07e0; - screen->fb[0].redMask = 0xf800; - break; - case 24: - screen->fb[0].visuals = (1 << TrueColor); - screen->fb[0].blueMask = 0x0000ff; - screen->fb[0].greenMask = 0x00ff00; - screen->fb[0].redMask = 0xff0000; - break; - } - - screen->driver = s3s; - - return TRUE; -} - -void -s3Preserve (KdCardInfo *card) -{ - S3CardInfo *s3c = card->driver; - - s3Save (s3c); -} - -/* - * Enable the card for rendering. Manipulate the initial settings - * of the card here. - */ -Bool -s3Enable (ScreenPtr pScreen) -{ - KdScreenPriv(pScreen); - KdCardInfo *card = pScreenPriv->card; - KdScreenInfo *screen = pScreenPriv->screen; - s3CardInfo (pScreenPriv); - s3ScreenInfo (pScreenPriv); - - S3Crtc crtcR, *crtc; - int hactive, hblank, hfp, hbp; - int vactive, vblank, vfp, vbp; - int hsize; - - int h_total; - int h_display_end; - int h_blank_start; - int h_blank_end; - int h_sync_start; - int h_sync_end; - int h_screen_off; - int h_start_fifo_fetch; - - int v_total; - int v_retrace_start; - int v_retrace_end; - int v_display_end; - int v_blank_start; - int v_blank_end; - - int h_adjust; - int h_sync_extend_; - int h_blank_extend_; - int i; - CARD16 cursor_address; - const KdMonitorTiming *t; - int m, n, r; - - DRAW_DEBUG ((DEBUG_S3INIT, "s3Enable")); - - DRAW_DEBUG ((DEBUG_S3INIT, "requested bpp %d current %d", - pScreenPriv->bitsPerPixel, s3c->save.crtc.bits_per_pixel)); - - t = KdFindMode (screen, s3ModeSupported); - - hfp = t->hfp; - hbp = t->hbp; - hblank = t->hblank; - hactive = t->horizontal; - - vfp = t->vfp; - vbp = t->vbp; - vblank = t->vblank; - vactive = t->vertical; - - crtcR = s3c->save.crtc; - crtc = &crtcR; - - s3GetClock (t->clock, &m, &n, &r, 127, 31, 3); - crtc->dclk_pll_m_trio = m; - crtc->dclk_pll_n_trio = n; - crtc->dclk_pll_r_trio = r; - - crtc->alt_refresh_count = 0x02; - crtc->enable_alt_refresh = 1; - crtc->enable_256_or_more = 1; - - DRAW_DEBUG ((DEBUG_S3INIT, "memory_bus_size %d\n", crtc->memory_bus_size)); - crtc->memory_bus_size = 1; - - crtc->dclk_over_2 = 0; - crtc->dclk_invert = 0; - crtc->enable_clock_double = 0; - crtc->delay_blank = 0; - crtc->extended_bios_5 = 0; - /* - * Compute character lengths for horizontal timing values - */ - switch (screen->fb[0].bitsPerPixel) { - case 8: - hactive = screen->width / 8; - hblank /= 8; - hfp /= 8; - hbp /= 8; - h_screen_off = hactive; - crtc->pixel_length = 0; - crtc->color_mode = 0; - /* - * Set up for double-pixel mode, switch color modes, - * divide the dclk and delay h blank by 2 dclks - */ - if (S3_CLOCK(crtc->dclk_pll_m_trio, crtc->dclk_pll_n_trio, - crtc->dclk_pll_r_trio) > S3_MAX_CLOCK) - { - DRAW_DEBUG ((DEBUG_S3INIT, "S3 clock %g > 80MHz, using pixel double mode", - S3_CLOCK(crtc->dclk_pll_m_trio, crtc->dclk_pll_n_trio, - crtc->dclk_pll_r_trio))); - crtc->color_mode = 1; - crtc->dclk_over_2 = 1; - crtc->enable_clock_double = 1; - crtc->delay_blank = 2; - crtc->extended_bios_5 = 2; - } - h_adjust = 1; - break; - case 16: - hactive = screen->width / 4; - hblank /= 4; - hfp /= 4; - hbp /= 4; - h_screen_off = hactive; - crtc->pixel_length = 1; - crtc->extended_bios_5 = 2; - if (crtc->depth == 15) - crtc->color_mode = 3; - else - crtc->color_mode = 5; - h_adjust = 2; - break; - case 32: - hactive = screen->width / 8; - hblank /= 8; - hfp /= 8; - hbp /= 8; - h_screen_off = hactive * 4; - crtc->pixel_length = 3; - crtc->color_mode = 0xd; - h_adjust = 1; - break; - } - - /* - * X server starts frame buffer at top of memory - */ - DRAW_DEBUG ((DEBUG_S3INIT, "Old start address 0x%x\n", - crtc_start_address (crtc))); - crtc_set_start_address (crtc, 0); - - /* - * Compute horizontal register values from timings - */ - h_total = hactive + hblank - 5; - h_display_end = hactive - 1; - h_blank_start = h_display_end; - h_blank_end = h_blank_start + hblank - h_adjust; - h_sync_start = hactive + hfp + h_adjust; - h_sync_end = h_sync_start + hblank - hbp - hfp; - h_start_fifo_fetch = h_total - 5; - - DRAW_DEBUG ((DEBUG_S3INIT, "blank_end 0x%x sync_end 0x%x sync_start 0x%x\n", - h_blank_end, h_sync_end, h_sync_start)); - - if (h_blank_end - h_blank_start > 0x40) - h_blank_extend_ = 1; - else - h_blank_extend_ = 0; - - if (h_sync_end - h_sync_start > 0x20) - h_sync_extend_ = 1; - else - h_sync_extend_ = 0; - - DRAW_DEBUG ((DEBUG_S3INIT, "blank_end 0x%x sync_end 0x%x extend %d\n", - h_blank_end, h_sync_end, h_sync_extend_)); - - crtc_set_h_total(crtc, h_total); - crtc_set_h_display_end (crtc, h_display_end); - crtc_set_h_blank_start (crtc, h_blank_start); - crtc_set_h_blank_end (crtc, h_blank_end); - crtc_set_h_sync_start (crtc, h_sync_start); - crtc_set_h_sync_end (crtc, h_sync_end); - crtc_set_screen_off (crtc, h_screen_off); - crtc_set_h_start_fifo_fetch (crtc, h_start_fifo_fetch); - crtc->h_sync_extend = h_sync_extend_; - crtc->h_blank_extend = h_blank_extend_; - - - v_total = vactive + vblank - 2; - v_retrace_start = vactive + vfp - 1; - v_retrace_end = v_retrace_start + vblank - vbp - 1; - v_display_end = vactive - 1; - v_blank_start = vactive - 1; - v_blank_end = v_blank_start + vblank - 1; - - crtc_set_v_total(crtc, v_total); - crtc_set_v_retrace_start (crtc, v_retrace_start); - crtc->v_retrace_end_0_3 = v_retrace_end; - crtc_set_v_display_end (crtc, v_display_end); - crtc_set_v_blank_start (crtc, v_blank_start); - crtc->v_blank_end_0_7 = v_blank_end; - - /* - * Set cursor - */ - if (!screen->softCursor) - { - cursor_address = (s3s->cursor_base - screen->fb[0].frameBuffer) / 1024; - - crtc->cursor_address_0_7 = cursor_address; - crtc->cursor_address_8_15 = cursor_address >> 8; - crtc->hardware_cursor_ms_x11 = 0; - crtc->hardware_cursor_enable = 1; - } - else - crtc->hardware_cursor_enable = 0; - - /* - * Set accelerator - */ - switch (screen->width) { - case 640: crtc_set_ge_screen_width(crtc,1); break; - case 800: crtc_set_ge_screen_width(crtc,2); break; - case 1024: crtc_set_ge_screen_width(crtc,0); break; - case 1152: crtc_set_ge_screen_width(crtc,4); break; - case 1280: crtc_set_ge_screen_width(crtc,3); break; - case 1600: crtc_set_ge_screen_width(crtc,6); break; - } - - /* - * Set depth values - */ - crtc->bits_per_pixel = screen->fb[0].bitsPerPixel; - crtc->depth = screen->fb[0].depth; - - crtc->l_parm_0_7 = screen->width / 4; /* Undocumented. */ - - crtc->disable_v_retrace_int = 1; /* don't let retrace interrupt */ - - DRAW_DEBUG ((DEBUG_S3INIT, "new h total %d display_end %d", - crtc_h_total(crtc), - crtc_h_display_end(crtc))); - DRAW_DEBUG ((DEBUG_S3INIT, " sync_start %d sync_end %d (%d)", - crtc_h_sync_start(crtc), - crtc_h_sync_end(crtc), h_sync_end)); - - DRAW_DEBUG ((DEBUG_S3INIT, " blank_start %d blank_end %d", - crtc_h_blank_start(crtc), - crtc_h_blank_end(crtc))); - - DRAW_DEBUG ((DEBUG_S3INIT, " screen_off %d start_fifo %d", - crtc_screen_off(crtc), crtc_h_start_fifo_fetch(crtc))); - - DRAW_DEBUG ((DEBUG_S3INIT, " active %d blank %d fp %d bp %d", - hactive, hblank, hfp, hbp)); - - DRAW_DEBUG ((DEBUG_S3INIT, "new v total %d display_end %d", - crtc_v_total(crtc), - crtc_v_display_end(crtc))); - DRAW_DEBUG ((DEBUG_S3INIT, " retrace_start %d retrace_end %d (%d)", - crtc_v_retrace_start(crtc), - crtc->v_retrace_end, - v_retrace_end)); - DRAW_DEBUG ((DEBUG_S3INIT, " blank_start %d blank_end %d", - crtc_v_blank_start(crtc), - crtc->v_blank_end_0_7)); - - DRAW_DEBUG ((DEBUG_S3INIT, " active %d blank %d fp %d bp %d", - vactive, vblank, vfp, vbp)); - - /* - * Set DPMS to normal - */ - crtc->hsync_control = 0; - crtc->vsync_control = 0; - - LockS3 (s3c); - _s3SetDepth (s3c->s3, crtc); - UnlockS3 (s3c); - return TRUE; -} - -void -s3Disable (ScreenPtr pScreen) -{ -} - -void -s3Restore (KdCardInfo *card) -{ - S3CardInfo *s3c = card->driver; - - s3Reset (s3c); -} - -void -_s3SetSync (S3CardInfo *s3c, int hsync, int vsync) -{ - /* this abuses the macros defined to access the crtc structure */ - union extended_sequencer_d_u _extended_sequencer_d_u; - S3Ptr s3 = s3c->s3; - - extended_sequencer_d = s3c->save.crtc.extended_sequencer_d; - hsync_control = hsync; - vsync_control = vsync; - PutSrtc (s3, 0x0d, extended_sequencer_d); -} - -Bool -s3DPMS (ScreenPtr pScreen, int mode) -{ - KdScreenPriv(pScreen); - s3CardInfo(pScreenPriv); - - switch (mode) { - case KD_DPMS_NORMAL: - _s3SetSync (s3c, 0, 0); - _s3SetBlank (s3c->s3, FALSE); - break; - case KD_DPMS_STANDBY: - _s3SetBlank (s3c->s3, TRUE); - _s3SetSync (s3c, 1, 0); - break; - case KD_DPMS_SUSPEND: - _s3SetBlank (s3c->s3, TRUE); - _s3SetSync (s3c, 0, 1); - break; - case KD_DPMS_POWERDOWN: - _s3SetBlank (s3c->s3, TRUE); - _s3SetSync (s3c, 1, 1); - break; - } - return TRUE; -} - -void -s3ScreenFini (KdScreenInfo *screen) -{ - S3ScreenInfo *s3s = (S3ScreenInfo *) screen->driver; - - xfree (s3s); - screen->driver = 0; -} - -void -s3CardFini (KdCardInfo *card) -{ - S3CardInfo *s3c = (S3CardInfo *) card->driver; - - KdUnmapDevice (s3c->frameBuffer, s3c->memory); - KdUnmapDevice (s3c->registers, sizeof (S3) + PACKED_OFFSET); -/* DeleteCriticalSection (&s3c->lock); */ - xfree (s3c); - card->driver = 0; -} - -KdCardFuncs s3Funcs = { - s3CardInit, - s3ScreenInit, - 0, - s3Preserve, - s3Enable, - s3DPMS, - s3Disable, - s3Restore, - s3ScreenFini, - s3CardFini, - s3CursorInit, - s3CursorEnable, - s3CursorDisable, - s3CursorFini, - s3RecolorCursor, - s3DrawInit, - s3DrawEnable, - s3DrawSync, - s3DrawDisable, - s3DrawFini, - s3GetColors, - s3PutColors, -}; - -void -S3InitCard (KdCardAttr *attr) -{ - KdCardInfoAdd (&s3Funcs, attr, 0); -} diff --git a/hw/kdrive/trio/s3.h b/hw/kdrive/trio/s3.h deleted file mode 100644 index b45a8ba80..000000000 --- a/hw/kdrive/trio/s3.h +++ /dev/null @@ -1,1200 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _S3_H_ -#define _S3_H_ - -#include "kdrive.h" - -#define PLATFORM 300 - -#define DRAW_DEBUG(a) - -#define DEBUG_S3INIT (DEBUG_ACCEL) -#define DEBUG_CRTC (DEBUG_ACCEL+1) -#define DEBUG_PATTERN (DEBUG_ACCEL+2) -#define DEBUG_RECT (DEBUG_ACCEL+3) -#define DEBUG_PAINT_WINDOW (DEBUG_ACCEL+4) -#define DEBUG_SET (DEBUG_ACCEL+5) -#define DEBUG_RENDER (DEBUG_ACCEL+6) -#define DEBUG_REGISTERS (DEBUG_ACCEL+7) -#define DEBUG_ARCS (DEBUG_ACCEL+8) -#define DEBUG_TEXT (DEBUG_ACCEL+9) -#define DEBUG_POLYGON (DEBUG_ACCEL+10) -#define DEBUG_CLIP (DEBUG_ACCEL+11) - -/* VESA Approved Register Definitions */ - -/* - * Linear Addressing 000 0000 - 0ff ffff (16m) - * Image data transfer 100 0000 - 100 7fff (32k) - * PCI config 100 8000 - 100 8043 - * Packed enhanced regs 100 8100 - 100 814a - * Streams regs 100 8180 - 100 81ff - * Current Y pos 100 82e8 - * CRT VGA 3b? regs 100 83b0 - 100 83bf - * CRT VGA 3c? regs 100 83c0 - 100 83cf - * CRT VGA 3d? regs 100 83d0 - 100 83df - * Subsystem status (42e8h) 100 8504 - * Advanced function (42e8h) 100 850c - * Enhanced regs 100 86e8 - 100 eeea - * Local peripheral bus 100 ff00 - 100 ff5c - * - * We don't care about the image transfer or PCI regs, so - * this structure starts at the packed enhanced regs - */ - -typedef volatile CARD32 VOL32; -typedef volatile CARD16 VOL16; -typedef volatile CARD8 VOL8; - -typedef volatile struct _s3 { - VOL32 alt_curxy; /* 8100 */ - VOL32 _pad0; /* 8104 */ - VOL32 alt_step; /* 8108 */ - VOL32 _pad1; /* 810c */ - VOL32 err_term; /* 8110 */ - VOL32 _pad2; /* 8114 */ - VOL32 cmd_gp_stat; /* 8118 */ - VOL32 short_stroke; /* 811c */ - VOL32 bg; /* 8120 */ - VOL32 fg; /* 8124 */ - VOL32 write_mask; /* 8128 */ - VOL32 read_mask; /* 812c */ - VOL32 color_cmp; /* 8130 */ - VOL32 alt_mix; /* 8134 */ - VOL32 scissors_tl; /* 8138 */ - VOL32 scissors_br; /* 813c */ - VOL32 pix_cntl_mult_misc2; /* 8140 */ - VOL32 mult_misc_read_sel; /* 8144 */ - VOL32 alt_pcnt; /* 8148 min_axis_pcnt, maj_axis_pcnt */ - VOL8 _pad3[0x19c]; /* 814c */ - VOL16 cur_y; /* 82e8 */ - VOL8 _pad4[0xc6]; /* 82ea */ - - VOL8 crt_vga_3b0; /* 83b0 */ - VOL8 crt_vga_3b1; /* 83b1 */ - VOL8 crt_vga_3b2; /* 83b2 */ - VOL8 crt_vga_3b3; /* 83b3 */ - VOL8 crt_vga_3b4; /* 83b4 */ - VOL8 crt_vga_3b5; /* 83b5 */ - VOL8 crt_vga_3b6; /* 83b6 */ - VOL8 crt_vga_3b7; /* 83b7 */ - VOL8 crt_vga_3b8; /* 83b8 */ - VOL8 crt_vga_3b9; /* 83b9 */ - VOL8 crt_vga_3ba; /* 83ba */ - VOL8 crt_vga_3bb; /* 83bb */ - VOL8 crt_vga_3bc; /* 83bc */ - VOL8 crt_vga_3bd; /* 83bd */ - VOL8 crt_vga_3be; /* 83be */ - VOL8 crt_vga_3bf; /* 83bf */ - - VOL8 crt_vga_3c0; /* 83c0 */ - VOL8 crt_vga_3c1; /* 83c1 */ - VOL8 crt_vga_3c2; /* 83c2 */ - VOL8 crt_vga_3c3; /* 83c3 */ - VOL8 crt_vga_3c4; /* 83c4 */ - VOL8 crt_vga_3c5; /* 83c5 */ - VOL8 crt_vga_dac_ad_mk; /* 83c6 */ - VOL8 crt_vga_dac_rd_ad; /* 83c7 */ - VOL8 crt_vga_dac_wt_ad; /* 83c8 */ - VOL8 crt_vga_dac_data; /* 83c9 */ - VOL8 crt_vga_3ca; /* 83ca */ - VOL8 crt_vga_3cb; /* 83cb */ - VOL8 crt_vga_3cc; /* 83cc */ - VOL8 crt_vga_3cd; /* 83cd */ - VOL8 crt_vga_3ce; /* 83ce */ - VOL8 crt_vga_3cf; /* 83cf */ - - VOL8 crt_vga_3d0; /* 83d0 */ - VOL8 crt_vga_3d1; /* 83d1 */ - VOL8 crt_vga_3d2; /* 83d2 */ - VOL8 crt_vga_3d3; /* 83d3 */ - VOL8 crt_vga_3d4; /* 83d4 */ - VOL8 crt_vga_3d5; /* 83d5 */ - VOL8 crt_vga_3d6; /* 83d6 */ - VOL8 crt_vga_3d7; /* 83d7 */ - VOL8 crt_vga_3d8; /* 83d8 */ - VOL8 crt_vga_3d9; /* 83d9 */ - VOL8 crt_vga_status_1; /* 83da */ - VOL8 crt_vga_3db; /* 83db */ - VOL8 crt_vga_3dc; /* 83dc */ - VOL8 crt_vga_3dd; /* 83dd */ - VOL8 crt_vga_3de; /* 83de */ - VOL8 crt_vga_3df; /* 83df */ - - VOL8 _pad5[0x124]; /* 83e0 */ - VOL16 subsys_status; /* 8504 */ - VOL8 _pad6[0x6]; /* 8506 */ - VOL16 adv_control; /* 850c */ - VOL8 _pad7[0x1da]; /* 850e */ - VOL16 cur_x; /* 86e8 */ - VOL8 _pad8[0x3fe]; /* 86ea */ - VOL16 desty_axstp; /* 8ae8 */ - VOL8 _pad9[0x3fe]; /* 8aea */ - VOL16 destx_diastp; /* 8ee8 */ - VOL8 _pad10[0x3fe]; /* 8eea */ - VOL16 enh_err_term; /* 92e8 */ - VOL8 _pad11[0x3fe]; /* 92ea */ - VOL16 maj_axis_pcnt; /* 96e8 */ - VOL8 _pad12[0x3fe]; /* 96ea */ - VOL16 enh_cmd_gp_stat; /* 9ae8 */ - VOL8 _pad13[0x3fe]; /* 9aea */ - VOL16 enh_short_stroke; /* 9ee8 */ - VOL8 _pad14[0x3fe]; /* 9eea */ - VOL16 enh_bg; /* a2e8 */ - VOL8 _pad15[0x3fe]; /* a2ea */ - VOL16 enh_fg; /* a6e8 */ - VOL8 _pad16[0x3fe]; /* a6ea */ - VOL16 enh_wrt_mask; /* aae8 */ - VOL8 _pad17[0x3fe]; /* aaea */ - VOL16 enh_rd_mask; /* aee8 */ - VOL8 _pad18[0x3fe]; /* aeea */ - VOL16 enh_color_cmp; /* b2e8 */ - VOL8 _pad19[0x3fe]; /* b2ea */ - VOL16 enh_bg_mix; /* b6e8 */ - VOL8 _pad20[0x3fe]; /* b6ea */ - VOL16 enh_fg_mix; /* bae8 */ - VOL8 _pad21[0x3fe]; /* baea */ - VOL16 enh_rd_reg_dt; /* bee8 */ - VOL8 _pad22[0x23fe]; /* beea */ - VOL32 pix_trans; /* e2e8 */ -} S3, *S3Ptr; - -#define VGA_STATUS_1_DTM 0x01 -#define VGA_STATUS_1_VSY 0x08 - -#define DAC_MASK 0x03c6 -#define DAC_R_INDEX 0x03c7 -#define DAC_W_INDEX 0x03c8 -#define DAC_DATA 0x03c9 -#define DISP_STAT 0x02e8 -#define H_TOTAL 0x02e8 -#define H_DISP 0x06e8 -#define H_SYNC_STRT 0x0ae8 -#define H_SYNC_WID 0x0ee8 -#define V_TOTAL 0x12e8 -#define V_DISP 0x16e8 -#define V_SYNC_STRT 0x1ae8 -#define V_SYNC_WID 0x1ee8 -#define DISP_CNTL 0x22e8 -#define ADVFUNC_CNTL 0x4ae8 -#define SUBSYS_STAT 0x42e8 -#define SUBSYS_CNTL 0x42e8 -#define ROM_PAGE_SEL 0x46e8 -#define CUR_Y 0x82e8 -#define CUR_X 0x86e8 -#define DESTY_AXSTP 0x8ae8 -#define DESTX_DIASTP 0x8ee8 -#define ERR_TERM 0x92e8 -#define MAJ_AXIS_PCNT 0x96e8 -#define GP_STAT 0x9ae8 -#define CMD 0x9ae8 -#define SHORT_STROKE 0x9ee8 -#define BKGD_COLOR 0xa2e8 -#define FRGD_COLOR 0xa6e8 -#define WRT_MASK 0xaae8 -#define RD_MASK 0xaee8 -#define COLOR_CMP 0xb2e8 -#define BKGD_MIX 0xb6e8 -#define FRGD_MIX 0xbae8 -#define MULTIFUNC_CNTL 0xbee8 -#define MIN_AXIS_PCNT 0x0000 -#define SCISSORS_T 0x1000 -#define SCISSORS_L 0x2000 -#define SCISSORS_B 0x3000 -#define SCISSORS_R 0x4000 -#define MEM_CNTL 0x5000 -#define PATTERN_L 0x8000 -#define PATTERN_H 0x9000 -#define PIX_CNTL 0xa000 -#define CONTROL_MISC2 0xd000 -#define PIX_TRANS 0xe2e8 - -/* Advanced Function Control Regsiter */ -#define CLKSEL 0x0004 -#define DISABPASSTHRU 0x0001 - -/* Graphics Processor Status Register */ - -#define GPNSLOT 13 - -#define GPBUSY_1 0x0080 -#define GPBUSY_2 0x0040 -#define GPBUSY_3 0x0020 -#define GPBUSY_4 0x0010 -#define GPBUSY_5 0x0008 -#define GPBUSY_6 0x0004 -#define GPBUSY_7 0x0002 -#define GPBUSY_8 0x0001 -#define GPBUSY_9 0x8000 -#define GPBUSY_10 0x4000 -#define GPBUSY_11 0x2000 -#define GPBUSY_12 0x1000 -#define GPBUSY_13 0x0800 - -#define GPEMPTY 0x0400 -#define GPBUSY 0x0200 -#define DATDRDY 0x0100 - -/* Command Register */ -#define CMD_NOP 0x0000 -#define CMD_LINE 0x2000 -#define CMD_RECT 0x4000 -#define CMD_RECTV1 0x6000 -#define CMD_RECTV2 0x8000 -#define CMD_LINEAF 0xa000 -#define CMD_BITBLT 0xc000 -#define CMD_PATBLT 0xe000 -#define CMD_OP_MSK 0xe000 -#define BYTSEQ 0x1000 -#define _32BITNOPAD 0x0600 -#define _32BIT 0x0400 -#define _16BIT 0x0200 -#define _8BIT 0x0000 -#define PCDATA 0x0100 -#define INC_Y 0x0080 -#define YMAJAXIS 0x0040 -#define INC_X 0x0020 -#define DRAW 0x0010 -#define LINETYPE 0x0008 -#define LASTPIX 0x0004 /* Draw last pixel in line */ -#define PLANAR 0x0002 -#define WRTDATA 0x0001 - -/* Background Mix Register */ -#define BSS_BKGDCOL 0x0000 -#define BSS_FRGDCOL 0x0020 -#define BSS_PCDATA 0x0040 -#define BSS_BITBLT 0x0060 - -/* Foreground Mix Register */ -#define FSS_BKGDCOL 0x0000 -#define FSS_FRGDCOL 0x0020 -#define FSS_PCDATA 0x0040 -#define FSS_BITBLT 0x0060 - -/* The Mixes */ -#define MIX_MASK 0x001f - -#define MIX_NOT_DST 0x0000 -#define MIX_0 0x0001 -#define MIX_1 0x0002 -#define MIX_DST 0x0003 -#define MIX_NOT_SRC 0x0004 -#define MIX_XOR 0x0005 -#define MIX_XNOR 0x0006 -#define MIX_SRC 0x0007 -#define MIX_NAND 0x0008 -#define MIX_NOT_SRC_OR_DST 0x0009 -#define MIX_SRC_OR_NOT_DST 0x000a -#define MIX_OR 0x000b -#define MIX_AND 0x000c -#define MIX_SRC_AND_NOT_DST 0x000d -#define MIX_NOT_SRC_AND_DST 0x000e -#define MIX_NOR 0x000f - -#define MIX_MIN 0x0010 -#define MIX_DST_MINUS_SRC 0x0011 -#define MIX_SRC_MINUS_DST 0x0012 -#define MIX_PLUS 0x0013 -#define MIX_MAX 0x0014 -#define MIX_HALF__DST_MINUS_SRC 0x0015 -#define MIX_HALF__SRC_MINUS_DST 0x0016 -#define MIX_AVERAGE 0x0017 -#define MIX_DST_MINUS_SRC_SAT 0x0018 -#define MIX_SRC_MINUS_DST_SAT 0x001a -#define MIX_HALF__DST_MINUS_SRC_SAT 0x001c -#define MIX_HALF__SRC_MINUS_DST_SAT 0x001e -#define MIX_AVERAGE_SAT 0x001f - -/* Pixel Control Register */ -#define MIXSEL_FRGDMIX 0x0000 -#define MIXSEL_PATT 0x0040 -#define MIXSEL_EXPPC 0x0080 -#define MIXSEL_EXPBLT 0x00c0 -#define COLCMPOP_F 0x0000 -#define COLCMPOP_T 0x0008 -#define COLCMPOP_GE 0x0010 -#define COLCMPOP_LT 0x0018 -#define COLCMPOP_NE 0x0020 -#define COLCMPOP_EQ 0x0028 -#define COLCMPOP_LE 0x0030 -#define COLCMPOP_GT 0x0038 -#define PLANEMODE 0x0004 - -#define FIFO_SLOTS 13 - -#define GPSLOT(n) (1 << ((n) > 8 ? (15 - ((n) - 9)) : (8 - (n)))) - -/* Wait for n slots to become available */ -#if 0 -#define _s3WaitSlots(s3,n) { \ - DRAW_DEBUG ((DEBUG_CRTC, "_s3WaitSlots 0x%x %d", (s3)->cmd_gp_stat, n)); \ - while (((s3)->cmd_gp_stat & GPSLOT(n)) != 0); \ - DRAW_DEBUG ((DEBUG_CRTC, " s3 0x%x %d slots ready", (s3)->cmd_gp_stat, n)); \ -} -#else -/* let PCI retries solve this problem */ -#define _s3WaitSlots(s3,n) -#endif - -/* Wait until queue is empty */ -#define _s3WaitEmpty(s3) { \ - DRAW_DEBUG ((DEBUG_CRTC, "_s3WaitEmpty 0x%x", (s3)->cmd_gp_stat)); \ - while (!((s3)->cmd_gp_stat & GPEMPTY)) ; \ - DRAW_DEBUG ((DEBUG_CRTC, " s3 empty")); \ -} - -/* Wait until GP is idle and queue is empty */ -#define _s3WaitIdleEmpty(s3) { \ - DRAW_DEBUG ((DEBUG_CRTC, "_s3WaitIdleEmpty 0x%x", (s3)->cmd_gp_stat)); \ - while (((s3)->cmd_gp_stat & (GPBUSY|GPEMPTY)) != GPEMPTY) ; \ - DRAW_DEBUG ((DEBUG_CRTC, " s3 idle empty")); \ -} - -/* Wait until GP is idle */ -#define _s3WaitIdle(s3) { \ - DRAW_DEBUG ((DEBUG_CRTC, "_s3WaitIdle 0x%x", (s3)->cmd_gp_stat)); \ - while ((s3)->cmd_gp_stat & GPBUSY) ; \ - DRAW_DEBUG ((DEBUG_CRTC, " s3 idle")); \ -} - -typedef struct _s3Cursor { - int width, height; - int xhot, yhot; - Bool has_cursor; - CursorPtr pCursor; - Pixel source, mask; -} S3Cursor; - -typedef struct _s3PatternCache { - int id; - int x, y; -} S3PatternCache; - -typedef struct _s3Patterns { - S3PatternCache *cache; - int ncache; - int last_used; - int last_id; -} S3Patterns; - -typedef struct _crtc { - CARD8 h_total_0_7; /* CR0 */ - CARD8 h_display_end_0_7; /* CR1 */ - CARD8 h_blank_start_0_7; /* CR2 */ - union { - struct { - CARD8 _h_blank_end_0_4 : 5; - CARD8 _display_skew : 2; - CARD8 : 1; - } _h_blank_end_s; - CARD8 __h_blank_end; /* CR3 */ - } _h_blank_end_u; -#define h_blank_end_0_4 _h_blank_end_u._h_blank_end_s._h_blank_end_0_4 -#define display_skew _h_blank_end_u._h_blank_end_s._display_skew -#define _h_blank_end _h_blank_end_u.__h_blank_end - - CARD8 h_sync_start_0_7; /* CR4 */ - - union { - struct { - CARD8 _h_sync_end_0_4 : 5; - CARD8 _horizontal_skew : 2; - CARD8 _h_blank_end_5 : 1; - } _h_sync_end_s; - CARD8 __h_sync_end; /* CR5 */ - } _h_sync_end_u; - -#define h_sync_end_0_4 _h_sync_end_u._h_sync_end_s._h_sync_end_0_4 -#define horizontal_skew _h_sync_end_u._h_sync_end_s._horizontal_skew -#define h_blank_end_5 _h_sync_end_u._h_sync_end_s._h_blank_end_5 -#define _h_sync_end _h_sync_end_u.__h_sync_end - - CARD8 v_total_0_7; /* CR6 */ - - union { - struct { - CARD8 _v_total_8 : 1; - CARD8 _v_display_end_8 : 1; - CARD8 _v_retrace_start_8 : 1; - CARD8 _v_blank_start_8 : 1; - CARD8 _line_compare_8 : 1; - CARD8 _v_total_9 : 1; - CARD8 _v_display_end_9 : 1; - CARD8 _v_retrace_start_9 : 1; - } _crtc_overflow_s; - CARD8 _crtc_overflow; /* CR7 */ - } _crtc_overflow_u; - -#define v_total_8 _crtc_overflow_u._crtc_overflow_s._v_total_8 -#define v_display_end_8 _crtc_overflow_u._crtc_overflow_s._v_display_end_8 -#define v_retrace_start_8 _crtc_overflow_u._crtc_overflow_s._v_retrace_start_8 -#define v_blank_start_8 _crtc_overflow_u._crtc_overflow_s._v_blank_start_8 -#define line_compare_8 _crtc_overflow_u._crtc_overflow_s._line_compare_8 -#define v_total_9 _crtc_overflow_u._crtc_overflow_s._v_total_9 -#define v_display_end_9 _crtc_overflow_u._crtc_overflow_s._v_display_end_9 -#define v_retrace_start_9 _crtc_overflow_u._crtc_overflow_s._v_retrace_start_9 -#define crtc_overflow _crtc_overflow_u._crtc_overflow - - CARD8 preset_row_scan; /* CR8 (unused) */ - - union { - struct { - CARD8 _max_scan_line : 5; - CARD8 _v_blank_start_9 : 1; - CARD8 _line_compare_9 : 1; - CARD8 _double_scan : 1; - } _max_scan_line_s; - CARD8 __max_scan_line; /* CR9 */ - } _max_scan_line_u; - -#define max_scan_line _max_scan_line_u._max_scan_line_s._max_scan_line -#define v_blank_start_9 _max_scan_line_u._max_scan_line_s._v_blank_start_9 -#define line_compare_9 _max_scan_line_u._max_scan_line_s._line_compare_9 -#define double_scan _max_scan_line_u._max_scan_line_s._double_scan -#define _max_scan_line _max_scan_line_u.__max_scan_line - - CARD8 cursor_start; - CARD8 cursor_end; - - CARD8 start_address_8_15; /* CRC */ - CARD8 start_address_0_7; /* CRD */ - - CARD8 cursor_loc_high; - CARD8 cursor_loc_low; - - CARD8 v_retrace_start_0_7; /* CR10 */ - union { - struct { - CARD8 _v_retrace_end_0_3 : 4; - CARD8 _clear_v_retrace_int : 1; - CARD8 _disable_v_retrace_int : 1; - CARD8 _refresh_cycle_select : 1; - CARD8 _lock_crtc : 1; - } _v_retrace_end_s; - CARD8 __v_retrace_end; /* CR11 */ - } _v_retrace_end_u; - -#define v_retrace_end_0_3 _v_retrace_end_u._v_retrace_end_s._v_retrace_end_0_3 -#define clear_v_retrace_int _v_retrace_end_u._v_retrace_end_s._clear_v_retrace_int -#define disable_v_retrace_int _v_retrace_end_u._v_retrace_end_s._disable_v_retrace_int -#define refresh_cycle_select _v_retrace_end_u._v_retrace_end_s._refresh_cycle_select -#define lock_crtc _v_retrace_end_u._v_retrace_end_s._lock_crtc -#define _v_retrace_end _v_retrace_end_u.__v_retrace_end - - CARD8 v_display_end_0_7; /* CR12 */ - - CARD8 screen_off_0_7; /* CR13 */ - - union { - struct { - CARD8 _underline_location : 5; - CARD8 _count_by_four : 1; - CARD8 _doubleword_mode : 1; - CARD8 : 1; - } _underline_location_s; - CARD8 __underline_location; /* CR14 (unused) */ - } _underline_location_u; - -#define underline_location _underline_location_u._underline_location_s._underline_location -#define count_by_four _underline_location_u._underline_location_s._count_by_four -#define doubleword_mode _underline_location_u._underline_location_s._doubleword_mode -#define _underline_location _underline_location_u.__underline_location - - CARD8 v_blank_start_0_7; /* CR15 */ - CARD8 v_blank_end_0_7; /* CR16 */ - - union { - struct { - CARD8 _two_bk_cga : 1; - CARD8 _four_bk_cga : 1; - CARD8 _v_total_double : 1; - CARD8 _word_mode : 1; - CARD8 : 1; - CARD8 _address_wrap : 1; - CARD8 _byte_mode : 1; - CARD8 _hardware_reset : 1; - } _crtc_mode_s; - CARD8 _crtc_mode; /* CR17 (unused) */ - } _crtc_mode_u; - - CARD8 line_compare_0_7; /* CR18 (unused) */ - - union { - struct { - CARD8 _enable_base_offset : 1; - CARD8 _enable_two_page : 1; - CARD8 _enable_vga_16_bit : 1; - CARD8 _enhanced_mode_mapping : 1; - CARD8 _old_display_start : 2; - CARD8 _enable_high_speed_text : 1; - CARD8 : 1; - } _memory_configuration_s; - CARD8 _memory_configuration; /* CR31 (unused) */ - } _memory_configuration_u; - -#define memory_configuration _memory_configuration_u._memory_configuration -#define enable_base_offset _memory_configuration_u._memory_configuration_s._enable_base_offset -#define enable_two_page _memory_configuration_u._memory_configuration_s._enable_two_page -#define enable_vga_16_bit _memory_configuration_u._memory_configuration_s._enable_vga_16_bit -#define enhanved_mode_mapping _memory_configuration_u._memory_configuration_s._enhanced_mode_mapping -#define old_display_start _memory_configuration_u._memory_configuration_s._old_display_start -#define enable_high_speed_text _memory_configuration_u._memory_configuration_s._enable_high_speed_text - - union { - struct { - CARD8 _alt_refresh_count : 2; - CARD8 _enable_alt_refresh : 1; - CARD8 _enable_top_memory : 1; - CARD8 _enable_256_or_more : 1; - CARD8 _high_speed_text : 1; - CARD8 : 1; - CARD8 _pci_burst_disabled : 1; - } _misc_1_s; - CARD8 _misc_1; /* CR3A */ - } _misc_1_u; -#define misc_1 _misc_1_u._misc_1 -#define alt_refresh_count _misc_1_u._misc_1_s._alt_refresh_count -#define enable_alt_refresh _misc_1_u._misc_1_s._enable_alt_refresh -#define enable_top_memory _misc_1_u._misc_1_s._enable_top_memory -#define enable_256_or_more _misc_1_u._misc_1_s._enable_256_or_more -#define high_speed_text _misc_1_u._misc_1_s._high_speed_text -#define pci_burst_disabled _misc_1_u._misc_1_s._pci_burst_disabled - - CARD8 h_start_fifo_fetch_0_7; /* CR3B */ - - union { - struct { - CARD8 : 5; - CARD8 interlace : 1; - CARD8 : 2; - } _mode_control_s; - CARD8 _mode_control; /* CR42 */ - } _mode_control_u; - -#define mode_control _mode_control_u._mode_control - - union { - struct { - CARD8 : 2; - CARD8 _old_screen_off_8 : 1; - CARD8 : 4; - CARD8 h_counter_double_mode : 1; - } _extended_mode_s; - CARD8 _extended_mode; /* CR43 (unused) */ - } _extended_mode_u; - -#define extended_mode _extended_mode_u._extended_mode -#define old_screen_off_8 _extended_mode_u._extended_mode_s._old_screen_off_8 - - union { - struct { - CARD8 _hardware_cursor_enable : 1; - CARD8 : 3; - CARD8 _hardware_cursor_right : 1; - CARD8 : 3; - } _hardware_cursor_mode_s; - CARD8 _hardware_cursor_mode; /* CR45 */ - } _hardware_cursor_mode_u; - -#define hardware_cursor_mode _hardware_cursor_mode_u._hardware_cursor_mode -#define hardware_cursor_enable _hardware_cursor_mode_u._hardware_cursor_mode_s._hardware_cursor_enable - - CARD8 cursor_address_8_15; /* CR4C */ - CARD8 cursor_address_0_7; /* CR4D */ - - union { - struct { - CARD8 _ge_screen_width_2 : 1; - CARD8 : 3; - CARD8 _pixel_length : 2; - CARD8 _ge_screen_width_0_1 : 2; - } _extended_system_control_1_s; - CARD8 _extended_system_control_1; /* CR50 */ - } _extended_system_control_1_u; -#define ge_screen_width_2 _extended_system_control_1_u._extended_system_control_1_s._ge_screen_width_2 -#define pixel_length _extended_system_control_1_u._extended_system_control_1_s._pixel_length -#define ge_screen_width_0_1 _extended_system_control_1_u._extended_system_control_1_s._ge_screen_width_0_1 -#define extended_system_control_1 _extended_system_control_1_u._extended_system_control_1 - - union { - struct { - CARD8 : 4; - CARD8 _screen_off_8_9 : 2; - CARD8 : 2; - } _extended_system_control_2_s; - CARD8 _extended_system_control_2; /* CR51 */ - } _extended_system_control_2_u; -#define extended_system_control_2 _extended_system_control_2_u._extended_system_control_2 -#define screen_off_8_9 _extended_system_control_2_u._extended_system_control_2_s._screen_off_8_9 - - union { - struct { - CARD8 : 1; - CARD8 big_endian_linear : 2; - CARD8 mmio_select : 2; - CARD8 mmio_window : 1; - CARD8 swap_nibbles : 1; - CARD8 : 1; - } _extended_memory_control_s; - CARD8 _extended_memory_control; /* CR53 */ - } _extended_memory_control_u; -#define extended_memory_control _extended_memory_control_u._extended_memory_control - - union { - struct { - CARD8 : 2; - CARD8 _enable_gir : 1; - CARD8 : 1; - CARD8 _hardware_cursor_ms_x11 : 1; - CARD8 : 2; - CARD8 _tri_state_off_vclk : 1; - } _extended_ramdac_control_s; - CARD8 _extended_ramdac_control; /* CR55 */ - } _extended_ramdac_control_u; -#define extended_ramdac_control _extended_ramdac_control_u._extended_ramdac_control -#define hardware_cursor_ms_x11 _extended_ramdac_control_u._extended_ramdac_control_s._hardware_cursor_ms_x11 - - - union { - struct { - CARD8 _h_total_8 : 1; - CARD8 _h_display_end_8 : 1; - CARD8 _h_blank_start_8 : 1; - CARD8 _h_blank_extend : 1; /* extend h_blank by 64 */ - CARD8 _h_sync_start_8 : 1; - CARD8 _h_sync_extend : 1; /* extend h_sync by 32 */ - CARD8 _h_start_fifo_fetch_8 : 1; - CARD8 : 1; - } _extended_horizontal_overflow_s; - CARD8 _extended_horizontal_overflow; /* CR5D */ - } _extended_horizontal_overflow_u; -#define extended_horizontal_overflow _extended_horizontal_overflow_u._extended_horizontal_overflow -#define h_total_8 _extended_horizontal_overflow_u._extended_horizontal_overflow_s._h_total_8 -#define h_display_end_8 _extended_horizontal_overflow_u._extended_horizontal_overflow_s._h_display_end_8 -#define h_blank_start_8 _extended_horizontal_overflow_u._extended_horizontal_overflow_s._h_blank_start_8 -#define h_blank_extend _extended_horizontal_overflow_u._extended_horizontal_overflow_s._h_blank_extend -#define h_sync_start_8 _extended_horizontal_overflow_u._extended_horizontal_overflow_s._h_sync_start_8 -#define h_sync_extend _extended_horizontal_overflow_u._extended_horizontal_overflow_s._h_sync_extend -#define h_start_fifo_fetch_8 _extended_horizontal_overflow_u._extended_horizontal_overflow_s._h_start_fifo_fetch_8 - - - union { - struct { - CARD8 _v_total_10 : 1; - CARD8 _v_display_end_10 : 1; - CARD8 _v_blank_start_10 : 1; - CARD8 : 1; - CARD8 _v_retrace_start_10 : 1; - CARD8 : 1; - CARD8 _line_compare_10 : 1; - CARD8 : 1; - } _extended_vertical_overflow_s; - CARD8 _extended_vertical_overflow; /* CR5E */ - } _extended_vertical_overflow_u; -#define extended_vertical_overflow _extended_vertical_overflow_u._extended_vertical_overflow -#define v_total_10 _extended_vertical_overflow_u._extended_vertical_overflow_s._v_total_10 -#define v_display_end_10 _extended_vertical_overflow_u._extended_vertical_overflow_s._v_display_end_10 -#define v_blank_start_10 _extended_vertical_overflow_u._extended_vertical_overflow_s._v_blank_start_10 -#define v_retrace_start_10 _extended_vertical_overflow_u._extended_vertical_overflow_s._v_retrace_start_10 -#define line_compare_10 _extended_vertical_overflow_u._extended_vertical_overflow_s._line_compare_10 - - - CARD8 l_parm_0_7; /* CR62 (undocumented) */ - - union { - struct { - CARD8 : 3; - CARD8 _delay_blank : 2; - CARD8 : 3; - } _extended_misc_control_s; - CARD8 _extended_misc_control; /* CR65 */ - } _extended_misc_control_u; -#define extended_misc_control _extended_misc_control_u._extended_misc_control -#define delay_blank _extended_misc_control_u._extended_misc_control_s._delay_blank - - union { - struct { - CARD8 _v_clock_phase : 1; - CARD8 : 3; - CARD8 _color_mode : 4; - } _extended_misc_control_2_s; - CARD8 _extended_misc_control_2; /* CR67 */ - } _extended_misc_control_2_u; - -#define v_clock_phase _extended_misc_control_2_u._extended_misc_control_2_s._v_clock_phase -#define color_mode _extended_misc_control_2_u._extended_misc_control_2_s._color_mode -#define extended_misc_control_2 _extended_misc_control_2_u._extended_misc_control_2 - - - union { - struct { - CARD8 cas_oe_str : 2; - CARD8 ras_low : 1; - CARD8 ras_precharge : 1; - CARD8 : 3; - CARD8 _memory_bus_size : 1; /* 0 = 32, 1 = 32/64 */ - } _configuration_3_s; - CARD8 _configuration_3; /* CR68 */ - } _configuration_3_u; -#define configuration_3 _configuration_3_u._configuration_3 -#define memory_bus_size _configuration_3_u._configuration_3_s._memory_bus_size - - union { - struct { - CARD8 _start_address_16_19 : 4; - CARD8 : 4; - } _extended_system_control_3_s; - CARD8 _extended_system_control_3; /* CR69 */ - } _extended_system_control_3_u; -#define extended_system_control_3 _extended_system_control_3_u._extended_system_control_3 -#define start_address_16_19 _extended_system_control_3_u._extended_system_control_3_s._start_address_16_19 - - CARD8 extended_bios_5; /* CR6D */ - - union { - struct { - CARD8 dot_clock_vclki : 1; /* testing only */ - CARD8 vclki_with_vafc : 1; /* feature connector */ - CARD8 : 1; - CARD8 bpp_24_mode : 1; /* 24 bpp mode */ - CARD8 alt_color_mode : 4; /* feature connector mode */ - } _extended_sequencer_b_s; - CARD8 _extended_sequencer_b; /* SRB */ - } _extended_sequencer_b_u; - -#define extended_sequencer_b _extended_sequencer_b_u._extended_sequencer_b - - union extended_sequencer_d_u { - struct { - CARD8 enable_feature : 1; - CARD8 lpb_feature : 1; - CARD8 : 2; - CARD8 _hsync_control : 2; - CARD8 _vsync_control : 2; - } _extended_sequencer_d_s; - CARD8 _extended_sequencer_d; - } _extended_sequencer_d_u; - -#define extended_sequencer_d _extended_sequencer_d_u._extended_sequencer_d -#define hsync_control _extended_sequencer_d_u._extended_sequencer_d_s._hsync_control -#define vsync_control _extended_sequencer_d_u._extended_sequencer_d_s._vsync_control - - union { - struct { - CARD8 _dclk_pll_n : 5; - CARD8 _dclk_pll_r : 2; - CARD8 : 1; - } _dclk_value_low_s; - CARD8 _dclk_value_low; /* SR12 */ - } _dclk_value_low_u; - -#define dclk_value_low _dclk_value_low_u._dclk_value_low -#define dclk_pll_n_trio _dclk_value_low_u._dclk_value_low_s._dclk_pll_n -#define dclk_pll_r_trio _dclk_value_low_u._dclk_value_low_s._dclk_pll_r - - union { - struct { - CARD8 _dclk_pll_m : 7; - CARD8 : 1; - } _dclk_value_high_s; - CARD8 _dclk_value_high; /* SR13 */ - } _dclk_value_high_u; - -#define dclk_value_high _dclk_value_high_u._dclk_value_high -#define dclk_pll_m_trio _dclk_value_high_u._dclk_value_high_s._dclk_pll_m - - union { - struct { - CARD8 _mfrq_en : 1; - CARD8 _dfrq_en : 1; - CARD8 _mclk_out : 1; - CARD8 _vclk_out : 1; - CARD8 _dclk_over_2 : 1; - CARD8 _clk_load : 1; - CARD8 _dclk_invert : 1; - CARD8 _ena_2_cycle_write : 1; - } _control_2_s; - CARD8 _control_2; /* SR15 */ - } _control_2_u; - -#define control_2 _control_2_u._control_2 -#define mfrq_en _control_2_u._control_2_s._mfrq_en -#define dfrq_en _control_2_u._control_2_s._dfrq_en -#define mclk_out _control_2_u._control_2_s._mclk_out -#define vclk_out _control_2_u._control_2_s._vclk_out -#define dclk_over_2 _control_2_u._control_2_s._dclk_over_2 -#define clk_load _control_2_u._control_2_s._clk_load -#define dclk_invert _control_2_u._control_2_s._dclk_invert -#define ena_2_cycle_write _control_2_u._control_2_s._ena_2_cycle_write - - union { - struct { - CARD8 : 5; - CARD8 _dac_power_down : 1; - CARD8 _lut_write_control : 1; - CARD8 _enable_clock_double : 1; - } _ramdac_control_s; - CARD8 _ramdac_control; /* SR18 */ - } _ramdac_control_u; - -#define ramdac_control _ramdac_control_u._ramdac_control -#define enable_clock_double _ramdac_control_u._ramdac_control_s._enable_clock_double - - union { - struct { - CARD8 _dclk_pll_n : 6; - CARD8 _dclk_pll_r : 2; - } _dclk_value_low_s; - CARD8 _dclk_value_low; /* SR36 */ - } _dclk_value_low_savage_u; - -#define dclk_value_low_savage _dclk_value_low_savage_u._dclk_value_low -#define dclk_pll_n_savage_0_5 _dclk_value_low_savage_u._dclk_value_low_s._dclk_pll_n -#define dclk_pll_r_savage_0_1 _dclk_value_low_savage_u._dclk_value_low_s._dclk_pll_r - - CARD8 dclk_pll_m0_savage_0_7; /* SR37 */ - CARD8 dclk_pll_m1_savage_0_7; /* SR38 */ - - struct { - CARD8 _dclk_pll_m : 8; - } _dclk_value_high_s_savage; - - union { - struct { - CARD8 _dclk_select : 1; - CARD8 : 1; - CARD8 _dclk_pll_r_2 : 1; - CARD8 _dclk_pll_m_8 : 1; - CARD8 _dclk_pll_n_6 : 1; - CARD8 _pce : 1; - CARD8 _ccg : 1; - CARD8 _csp : 1; - } _extended_seq_39_s; - CARD8 _extended_seq_39; /* SR39 */ - } _extended_seq_39_u; - -#define extended_seq_39 _extended_seq_39_u._extended_seq_39 -#define dclk_pll_select_savage _extended_seq_39_u._extended_seq_39_s._dclk_select -#define dclk_pll_r_savage_2 _extended_seq_39_u._extended_seq_39_s._dclk_pll_r_2 -#define dclk_pll_m_savage_8 _extended_seq_39_u._extended_seq_39_s._dclk_pll_m_8 -#define dclk_pll_n_savage_6 _extended_seq_39_u._extended_seq_39_s._dclk_pll_n_6 - - /* computed values */ - CARD16 ge_screen_pitch; - CARD8 bits_per_pixel; - CARD8 depth; - CARD8 double_pixel_mode; - CARD16 pixel_width; -} S3Crtc; - -#define crtc_v_total(crtc) ((crtc)->v_total_0_7 | \ - ((crtc)->v_total_8 << 8) | \ - ((crtc)->v_total_9 << 9) | \ - ((crtc)->v_total_10 << 10)) - -#define crtc_set_v_total(crtc,v) { \ - ((crtc))->v_total_0_7 = (v); \ - ((crtc))->v_total_8 = (v) >> 8; \ - ((crtc))->v_total_9 = (v) >> 9; \ - ((crtc))->v_total_10 = (v) >> 10; \ -} - -#define crtc_v_display_end(crtc) ((crtc)->v_display_end_0_7 | \ - ((crtc)->v_display_end_8 << 8) | \ - ((crtc)->v_display_end_9 << 9) | \ - ((crtc)->v_display_end_10 << 10)) - -#define crtc_set_v_display_end(crtc,v) {\ - ((crtc))->v_display_end_0_7 = (v); \ - ((crtc))->v_display_end_8 = (v) >> 8; \ - ((crtc))->v_display_end_9 = (v) >> 9; \ - ((crtc))->v_display_end_10 = (v) >> 10; \ -} - -#define crtc_v_retrace_start(crtc) ((crtc)->v_retrace_start_0_7 | \ - ((crtc)->v_retrace_start_8 << 8) | \ - ((crtc)->v_retrace_start_9 << 9) | \ - ((crtc)->v_retrace_start_10 << 10)) - -#define crtc_set_v_retrace_start(crtc,v) {\ - ((crtc))->v_retrace_start_0_7 = (v); \ - ((crtc))->v_retrace_start_8 = (v) >> 8; \ - ((crtc))->v_retrace_start_9 = (v) >> 9; \ - ((crtc))->v_retrace_start_10 = (v) >> 10; \ -} - -#define crtc_v_blank_start(crtc) ((crtc)->v_blank_start_0_7 | \ - ((crtc)->v_blank_start_8 << 8) | \ - ((crtc)->v_blank_start_9 << 9) | \ - ((crtc)->v_blank_start_10 << 10)) - -#define crtc_set_v_blank_start(crtc,v) {\ - ((crtc))->v_blank_start_0_7 = (v); \ - ((crtc))->v_blank_start_8 = (v) >> 8; \ - ((crtc))->v_blank_start_9 = (v) >> 9; \ - ((crtc))->v_blank_start_10 = (v) >> 10; \ -} - -#define crtc_h_total(crtc) ((crtc)->h_total_0_7 | \ - ((crtc)->h_total_8 << 8)) - -#define crtc_set_h_total(crtc,v) {\ - ((crtc))->h_total_0_7 = (v); \ - ((crtc))->h_total_8 = (v) >> 8; \ -} - -#define crtc_h_display_end(crtc) ((crtc)->h_display_end_0_7 | \ - ((crtc)->h_display_end_8 << 8)) - -#define crtc_set_h_display_end(crtc,v) {\ - ((crtc))->h_display_end_0_7 = (v); \ - ((crtc))->h_display_end_8 = (v) >> 8; \ -} - -#define crtc_h_blank_start(crtc) ((crtc)->h_blank_start_0_7 | \ - ((crtc)->h_blank_start_8 << 8)) - -#define crtc_set_h_blank_start(crtc,v) {\ - ((crtc))->h_blank_start_0_7 = (v); \ - ((crtc))->h_blank_start_8 = (v) >> 8; \ -} - -#define crtc_h_blank_end(crtc) ((crtc)->h_blank_end_0_4 | \ - ((crtc)->h_blank_end_5 << 5)) - -#define crtc_set_h_blank_end(crtc,v) {\ - ((crtc))->h_blank_end_0_4 = (v); \ - ((crtc))->h_blank_end_5 = (v) >> 5; \ -} - -#define crtc_h_sync_start(crtc) ((crtc)->h_sync_start_0_7 | \ - ((crtc)->h_sync_start_8 << 8)) - -#define crtc_set_h_sync_start(crtc,v) {\ - ((crtc))->h_sync_start_0_7 = (v); \ - ((crtc))->h_sync_start_8 = (v) >> 8; \ -} - -#define crtc_h_sync_end(crtc) ((crtc)->h_sync_end_0_4) - -#define crtc_set_h_sync_end(crtc,v) {\ - ((crtc))->h_sync_end_0_4 = (v); \ -} - -#define crtc_screen_off(crtc) ((crtc)->screen_off_0_7 | \ - (((crtc)->screen_off_8_9 ? \ - ((crtc))->screen_off_8_9 : \ - ((crtc))->old_screen_off_8) << 8)) - -#define crtc_set_screen_off(crtc,v) {\ - ((crtc))->screen_off_0_7 = (v); \ - ((crtc))->old_screen_off_8 = 0; \ - ((crtc))->screen_off_8_9 = (v) >> 8; \ -} - -#define crtc_ge_screen_width(crtc) ((crtc)->ge_screen_width_0_1 | \ - ((crtc)->ge_screen_width_2 << 2)) - -#define crtc_set_ge_screen_width(crtc,v) { \ - (crtc)->ge_screen_width_0_1 = (v); \ - (crtc)->ge_screen_width_2 = (v) >> 2; \ -} - -#define crtc_h_start_fifo_fetch(crtc) ((crtc)->h_start_fifo_fetch_0_7 | \ - ((crtc)->h_start_fifo_fetch_8 << 8)) - -#define crtc_set_h_start_fifo_fetch(crtc,v) {\ - (crtc)->h_start_fifo_fetch_0_7 = (v); \ - (crtc)->h_start_fifo_fetch_8 = (v) >> 8; \ -} - -#define crtc_start_address(crtc) ((crtc)->start_address_0_7 | \ - ((crtc)->start_address_8_15 << 8) | \ - ((crtc)->start_address_16_19 << 16)) - -#define crtc_set_start_address(crtc,v) {\ - (crtc)->start_address_0_7 = (v); \ - (crtc)->start_address_8_15 = (v) >> 8; \ - (crtc)->start_address_16_19 = (v) >> 16; \ -} - -#define crtc_line_compare(crtc) ((crtc)->line_compare_0_7 | \ - ((crtc)->line_compare_8 << 8) | \ - ((crtc)->line_compare_9 << 9) | \ - ((crtc)->line_compare_10 << 10)) - -#define crtc_set_line_compare(crtc,v) { \ - ((crtc))->line_compare_0_7 = (v); \ - ((crtc))->line_compare_8 = (v) >> 8; \ - ((crtc))->line_compare_9 = (v) >> 9; \ - ((crtc))->line_compare_10 = (v) >> 10; \ -} - - -#define GetCrtc(s3,i) _s3ReadIndexRegister (&(s3)->crt_vga_3d4, (i)) -#define PutCrtc(s3,i,v) _s3WriteIndexRegister (&(s3)->crt_vga_3d4, (i), (v)) - -#define GetSrtc(s3,i) _s3ReadIndexRegister (&(s3)->crt_vga_3c4, (i)) -#define PutSrtc(s3,i,v) _s3WriteIndexRegister (&(s3)->crt_vga_3c4, (i), (v)) - -#define S3_CLOCK_REF 14318 /* KHz */ - -#define S3_CLOCK(m,n,r) (S3_CLOCK_REF * ((m) + 2) / (((n) + 2) * (1 << (r)))) - -#if PLATFORM == 200 -#define S3_MAX_CLOCK 80000 /* KHz */ -#endif -#if PLATFORM == 300 -#define S3_MAX_CLOCK 135000 /* KHz */ -#endif - -typedef struct _s3Save { - CARD8 cursor_fg; - CARD8 cursor_bg; - CARD8 lock1; - CARD8 lock2; - CARD8 locksrtc; - CARD8 clock_mode; - CARD32 alt_mix; - CARD32 write_mask; - CARD32 fg; - CARD32 bg; - S3Crtc crtc; -} S3Save; - -typedef struct _s3CardInfo { - S3Ptr s3; /* pointer to register structure */ - int memory; /* amount of memory */ - CARD8 *frameBuffer; /* pointer to frame buffer */ - CARD8 *registers; /* pointer to register map */ - S3Save save; - Bool savage; - Bool need_sync; -} S3CardInfo; - -typedef struct _s3FbInfo { - CARD8 *offscreen; /* pointer to offscreen area */ - int offscreen_y; /* top y coordinate of offscreen area */ - int offscreen_x; /* top x coordinate of offscreen area */ - int offscreen_width; /* width of offscreen area */ - int offscreen_height; /* height of offscreen area */ - S3Patterns patterns; - CARD32 bitmap_offset; - int accel_stride; - int accel_bpp; -} S3FBInfo; - -typedef struct _s3ScreenInfo { - CARD8 *cursor_base; /* pointer to cursor area */ - S3Cursor cursor; - S3FBInfo fb[1]; -} S3ScreenInfo; - -#define LockS3(s3c) -#define UnlockS3(s3c) - -#define getS3CardInfo(kd) ((S3CardInfo *) ((kd)->card->driver)) -#define s3CardInfo(kd) S3CardInfo *s3c = getS3CardInfo(kd) - -#define getS3ScreenInfo(kd) ((S3ScreenInfo *) ((kd)->screen->driver)) -#define s3ScreenInfo(kd) S3ScreenInfo *s3s = getS3ScreenInfo(kd) - -Bool s3CardInit (KdCardInfo *); -Bool s3ScreenInit (KdScreenInfo *); -Bool s3Enable (ScreenPtr pScreen); -void s3Disable (ScreenPtr pScreen); -void s3Fini (ScreenPtr pScreen); - -Bool s3CursorInit (ScreenPtr pScreen); -void s3CursorEnable (ScreenPtr pScreen); -void s3CursorDisable (ScreenPtr pScreen); -void s3CursorFini (ScreenPtr pScreen); -void s3RecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdefs); - -Bool s3DrawInit (ScreenPtr pScreen); -void s3DrawEnable (ScreenPtr pScreen); -void s3DrawSync (ScreenPtr pScreen); -void s3DrawDisable (ScreenPtr pScreen); -void s3DrawFini (ScreenPtr pScreen); - -void s3GetColors (ScreenPtr pScreen, int fb, int ndef, xColorItem *pdefs); -void s3PutColors (ScreenPtr pScreen, int fb, int ndef, xColorItem *pdefs); - -void S3InitCard (KdCardAttr *attr); - -void s3GetClock (int target, int *Mp, int *Np, int *Rp, int maxM, int maxN, int maxR); - -CARD8 _s3ReadIndexRegister (VOL8 *base, CARD8 index); -void _s3WriteIndexRegister (VOL8 *base, CARD8 index, CARD8 value); - -extern KdCardFuncs s3Funcs; - -/* - * Wait for the begining of the retrace interval - */ - -#define S3_RETRACE_LOOP_CHECK if (++_loop_count > 300000) {\ - DRAW_DEBUG ((DEBUG_FAILURE, "S3 wait loop failed at %s:%d", \ - __FILE__, __LINE__)); \ - break; \ -} - -#define _s3WaitVRetrace(s3) { \ - VOL8 *_status = &s3->crt_vga_status_1; \ - int _loop_count; \ - DRAW_DEBUG ((DEBUG_CRTC, "_s3WaitVRetrace 0x%x", *_status)); \ - _loop_count = 0; \ - while ((*_status & VGA_STATUS_1_VSY) != 0) S3_RETRACE_LOOP_CHECK; \ - _loop_count = 0; \ - while ((*_status & VGA_STATUS_1_VSY) == 0) S3_RETRACE_LOOP_CHECK; \ -} -/* - * Wait for the begining of the retrace interval - */ -#define _s3WaitVRetraceEnd(s3) { \ - VOL8 *_status = &s3->crt_vga_status_1; \ - int _loop_count; \ - DRAW_DEBUG ((DEBUG_CRTC, "_s3WaitVRetraceEnd 0x%x", *_status)); \ - _loop_count = 0; \ - while ((*_status & VGA_STATUS_1_VSY) == 0) S3_RETRACE_LOOP_CHECK; \ - _loop_count = 0; \ - while ((*_status & VGA_STATUS_1_VSY) != 0) S3_RETRACE_LOOP_CHECK; \ -} - -/* - * This extension register must contain a magic bit pattern to enable - * the remaining extended registers - */ - -#define _s3UnlockExt(s3) _s3WriteIndexRegister (&s3->crt_vga_3d4, 0x39, 0xa0) -#define _s3LockExt(s3) _s3WriteIndexRegister (&s3->crt_vga_3d4, 0x39, 0x00) - -#define S3_CURSOR_WIDTH 64 -#define S3_CURSOR_HEIGHT 64 -#define S3_CURSOR_SIZE ((S3_CURSOR_WIDTH * S3_CURSOR_HEIGHT + 7) / 8) - -#define S3_TILE_SIZE 8 - -#endif /* _S3_H_ */ diff --git a/hw/kdrive/trio/s3clock.c b/hw/kdrive/trio/s3clock.c deleted file mode 100644 index 9f2d313ca..000000000 --- a/hw/kdrive/trio/s3clock.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "s3.h" - -/* - * Clock synthesis: - * - * f_out = f_ref * ((M + 2) / ((N + 2) * (1 << R))) - * - * Constraints: - * - * 1. 135MHz <= f_ref * ((M + 2) / (N + 2)) <= 270 MHz - * 2. N >= 1 - * - * Vertical refresh rate = clock / ((hsize + hblank) * (vsize + vblank)) - * Horizontal refresh rate = clock / (hsize + hblank) - */ - -/* all in kHz */ -#define MIN_VCO 180000.0 -#define MAX_VCO 360000.0 - -void -s3GetClock (int target, int *Mp, int *Np, int *Rp, int maxM, int maxN, int maxR) -{ - int M, N, R, bestM, bestN; - int f_vco, f_out; - int err, abserr, besterr; - - /* - * Compute correct R value to keep VCO in range - */ - for (R = 0; R <= maxR; R++) - { - f_vco = target * (1 << R); - if (MIN_VCO <= f_vco && f_vco < MAX_VCO) - break; - } - - /* M = f_out / f_ref * ((N + 2) * (1 << R)); */ - besterr = target; - for (N = 0; N <= maxN; N++) - { - M = (target * (N + 2) * (1 << R) + (S3_CLOCK_REF/2)) / S3_CLOCK_REF - 2; - if (0 <= M && M <= maxM) - { - f_out = S3_CLOCK(M,N,R); - err = target - f_out; - if (err < 0) - err = -err; - if (err < besterr) - { - besterr = err; - bestM = M; - bestN = N; - } - } - } - *Mp = bestM; - *Np = bestN; - *Rp = R; -} diff --git a/hw/kdrive/trio/s3cmap.c b/hw/kdrive/trio/s3cmap.c deleted file mode 100644 index cc32da38c..000000000 --- a/hw/kdrive/trio/s3cmap.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "s3.h" - -void -s3GetColors (ScreenPtr pScreen, int fb, int ndef, xColorItem *pdefs) -{ - KdScreenPriv(pScreen); - s3CardInfo(pScreenPriv); - S3Ptr s3 = s3c->s3; - VOL8 *dac_rd_ad = &s3->crt_vga_dac_rd_ad; - VOL8 *dac_data = &s3->crt_vga_dac_data; - - LockS3 (s3c); - while (ndef--) - { - *dac_rd_ad = pdefs->pixel; - pdefs->red = *dac_data << 10; - pdefs->green = *dac_data << 10; - pdefs->blue = *dac_data << 10; - pdefs++; - } - UnlockS3(s3c); -} - -void -s3PutColors (ScreenPtr pScreen, int fb, int ndef, xColorItem *pdefs) -{ - KdScreenPriv(pScreen); - s3CardInfo(pScreenPriv); - S3Ptr s3 = s3c->s3; - VOL8 *dac_wt_ad = &s3->crt_vga_dac_wt_ad; - VOL8 *dac_data = &s3->crt_vga_dac_data; - - LockS3(s3c); - _s3WaitVRetrace (s3); - while (ndef--) - { - *dac_wt_ad = pdefs->pixel; - *dac_data = pdefs->red >> 10; - *dac_data = pdefs->green >> 10; - *dac_data = pdefs->blue >> 10; - pdefs++; - } - UnlockS3(s3c); -} - diff --git a/hw/kdrive/trio/s3curs.c b/hw/kdrive/trio/s3curs.c deleted file mode 100644 index 20afad756..000000000 --- a/hw/kdrive/trio/s3curs.c +++ /dev/null @@ -1,408 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "s3.h" -#include "s3draw.h" -#include "cursorstr.h" - -#define SetupCursor(s) KdScreenPriv(s); \ - s3CardInfo(pScreenPriv); \ - s3ScreenInfo(pScreenPriv); \ - S3Ptr s3 = s3c->s3; \ - S3Cursor *pCurPriv = &s3s->cursor - -static void -_s3MoveCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor(pScreen); - CARD8 xlow, xhigh, ylow, yhigh; - CARD8 xoff, yoff; - - x -= pCurPriv->xhot; - xoff = 0; - if (x < 0) - { - xoff = -x; - x = 0; - } - y -= pCurPriv->yhot; - yoff = 0; - if (y < 0) - { - yoff = -y; - y = 0; - } - xlow = (CARD8) x; - xhigh = (CARD8) (x >> 8); - ylow = (CARD8) y; - yhigh = (CARD8) (y >> 8); - - - /* This is the recommended order to move the cursor */ - - _s3WriteIndexRegister (&s3->crt_vga_3d4, 0x46, xhigh); - _s3WriteIndexRegister (&s3->crt_vga_3d4, 0x47, xlow); - _s3WriteIndexRegister (&s3->crt_vga_3d4, 0x49, ylow); - _s3WriteIndexRegister (&s3->crt_vga_3d4, 0x4e, xoff); - _s3WriteIndexRegister (&s3->crt_vga_3d4, 0x4f, yoff); - _s3WriteIndexRegister (&s3->crt_vga_3d4, 0x48, yhigh); -} - -static void -s3MoveCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor (pScreen); - - if (!pCurPriv->has_cursor) - return; - - if (!pScreenPriv->enabled) - return; - - LockS3(s3c); - _s3UnlockExt(s3); - _s3MoveCursor (pScreen, x, y); - _s3LockExt(s3); - UnlockS3(s3c); -} - -static void -s3AllocCursorColors (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - xColorItem sourceColor, maskColor; - - KdAllocateCursorPixels (pScreen, 0, pCursor, - &pCurPriv->source, &pCurPriv->mask); - switch (pScreenPriv->screen->fb[0].bitsPerPixel) { - case 4: - pCurPriv->source |= pCurPriv->source << 4; - pCurPriv->mask |= pCurPriv->mask << 4; - case 8: - pCurPriv->source |= pCurPriv->source << 8; - pCurPriv->mask |= pCurPriv->mask << 8; - case 16: - pCurPriv->source |= pCurPriv->source << 16; - pCurPriv->mask |= pCurPriv->mask << 16; - } -} - -static void -_s3SetCursorColors (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - /* set foreground */ - /* Reset cursor color stack pointers */ - (void) _s3ReadIndexRegister(&s3->crt_vga_3d4, 0x45); - _s3WriteIndexRegister (&s3->crt_vga_3d4, 0x4a, pCurPriv->source); - _s3WriteIndexRegister (&s3->crt_vga_3d4, 0x4a, pCurPriv->source >> 8); - _s3WriteIndexRegister (&s3->crt_vga_3d4, 0x4a, pCurPriv->source >> 16); - - /* set background */ - /* Reset cursor color stack pointers */ - (void) _s3ReadIndexRegister(&s3->crt_vga_3d4, 0x45); - _s3WriteIndexRegister (&s3->crt_vga_3d4, 0x4b, pCurPriv->mask); - _s3WriteIndexRegister (&s3->crt_vga_3d4, 0x4b, pCurPriv->mask >> 8); - _s3WriteIndexRegister (&s3->crt_vga_3d4, 0x4b, pCurPriv->mask >> 16); -} - -void -s3RecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdef) -{ - SetupCursor (pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - xColorItem sourceColor, maskColor; - - if (!pCurPriv->has_cursor || !pCursor) - return; - - if (!pScreenPriv->enabled) - return; - - if (pdef) - { - while (ndef) - { - if (pdef->pixel == pCurPriv->source || - pdef->pixel == pCurPriv->mask) - break; - ndef--; - } - if (!ndef) - return; - } - s3AllocCursorColors (pScreen); - LockS3 (s3c); - _s3UnlockExt(s3); - _s3SetCursorColors (pScreen); - _s3LockExt (s3); - UnlockS3 (s3c); -} - -static void -s3LoadCursor (ScreenPtr pScreen, int x, int y) -{ - SetupCursor(pScreen); - CursorPtr pCursor = pCurPriv->pCursor; - CursorBitsPtr bits = pCursor->bits; - int w, h; - unsigned char r[2], g[2], b[2]; - unsigned long *ram; - unsigned long *msk, *mskLine, *src, *srcLine; - unsigned long and, xor; - int i, j; - int cursor_address; - int wsrc; - unsigned char ramdac_control_; - - /* - * Allocate new colors - */ - s3AllocCursorColors (pScreen); - - pCurPriv->pCursor = pCursor; - pCurPriv->xhot = pCursor->bits->xhot; - pCurPriv->yhot = pCursor->bits->yhot; - - /* - * Stick new image into cursor memory - */ - ram = (unsigned long *) s3s->cursor_base; - mskLine = (unsigned long *) bits->mask; - srcLine = (unsigned long *) bits->source; - - h = bits->height; - if (h > S3_CURSOR_HEIGHT) - h = S3_CURSOR_HEIGHT; - - wsrc = BitmapBytePad(bits->width) / 4; /* ulongs per line */ - - for (i = 0; i < S3_CURSOR_HEIGHT; i++) - { - msk = mskLine; - src = srcLine; - mskLine += wsrc; - srcLine += wsrc; - for (j = 0; j < S3_CURSOR_WIDTH / 32; j++) { - - unsigned long m, s; - - if (i < h && j < wsrc) - { - m = *msk++; - s = *src++; - xor = m & s; - and = ~m; - } - else - { - and = 0xffffffff; - xor = 0x00000000; - } - - S3AdjustBits32(and); - S3AdjustBits32(xor); - *ram++ = (and & 0xffff) | (xor << 16); - *ram++ = (and >> 16) | (xor & 0xffff0000); - } - } - - _s3WaitIdle (s3); - _s3UnlockExt (s3); - - /* Set new color */ - _s3SetCursorColors (pScreen); - - /* Enable the cursor */ - _s3WriteIndexRegister (&s3->crt_vga_3d4, 0x45, 0x01); - - /* Wait for VRetrace to make sure the position is read */ - _s3WaitVRetrace (s3); - - /* Move to new position */ - _s3MoveCursor (pScreen, x, y); - - _s3LockExt (s3); - UnlockS3(s3c); -} - -static void -s3UnloadCursor (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - LockS3 (s3c); - _s3UnlockExt(s3); - - /* Disable cursor */ - _s3WriteIndexRegister (&s3->crt_vga_3d4, 0x45, 0); - - _s3LockExt(s3); - UnlockS3 (s3c); -} - -static Bool -s3RealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) -{ - SetupCursor(pScreen); - - if (!pScreenPriv->enabled) - return TRUE; - - /* miRecolorCursor does this */ - if (pCurPriv->pCursor == pCursor) - { - if (pCursor) - { - int x, y; - - miPointerPosition (&x, &y); - s3LoadCursor (pScreen, x, y); - } - } - return TRUE; -} - -static Bool -s3UnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) -{ - return TRUE; -} - -static void -s3SetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y) -{ - SetupCursor(pScreen); - - pCurPriv->pCursor = pCursor; - - if (!pScreenPriv->enabled) - return; - - if (pCursor) - s3LoadCursor (pScreen, x, y); - else - s3UnloadCursor (pScreen); -} - -miPointerSpriteFuncRec s3PointerSpriteFuncs = { - s3RealizeCursor, - s3UnrealizeCursor, - s3SetCursor, - s3MoveCursor, -}; - -static void -s3QueryBestSize (int class, - unsigned short *pwidth, unsigned short *pheight, - ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - switch (class) - { - case CursorShape: - if (*pwidth > pCurPriv->width) - *pwidth = pCurPriv->width; - if (*pheight > pCurPriv->height) - *pheight = pCurPriv->height; - if (*pwidth > pScreen->width) - *pwidth = pScreen->width; - if (*pheight > pScreen->height) - *pheight = pScreen->height; - break; - default: - fbQueryBestSize (class, pwidth, pheight, pScreen); - break; - } -} - -Bool -s3CursorInit (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (!s3s->cursor_base) - { - pCurPriv->has_cursor = FALSE; - return FALSE; - } - - pCurPriv->width = S3_CURSOR_WIDTH; - pCurPriv->height= S3_CURSOR_HEIGHT; - pScreen->QueryBestSize = s3QueryBestSize; - miPointerInitialize (pScreen, - &s3PointerSpriteFuncs, - &kdPointerScreenFuncs, - FALSE); - pCurPriv->has_cursor = TRUE; - pCurPriv->pCursor = NULL; - return TRUE; -} - -void -s3CursorEnable (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (pCurPriv->has_cursor) - { - if (pCurPriv->pCursor) - { - int x, y; - - miPointerPosition (&x, &y); - s3LoadCursor (pScreen, x, y); - } - else - s3UnloadCursor (pScreen); - } -} - -void -s3CursorDisable (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - if (!pScreenPriv->enabled) - return; - - if (pCurPriv->has_cursor) - { - if (pCurPriv->pCursor) - { - s3UnloadCursor (pScreen); - } - } -} - -void -s3CursorFini (ScreenPtr pScreen) -{ - SetupCursor (pScreen); - - pCurPriv->pCursor = NULL; -} diff --git a/hw/kdrive/trio/s3stub.c b/hw/kdrive/trio/s3stub.c deleted file mode 100644 index f44ad84c6..000000000 --- a/hw/kdrive/trio/s3stub.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 1999 SuSE, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "s3.h" - -void -InitCard (char *name) -{ - KdCardAttr attr; - CARD32 count; - - count = 0; - while (LinuxFindPci (0x5333, 0x8904, count, &attr)) - { - KdCardInfoAdd (&s3Funcs, &attr, 0); - count++; - } -} - -void -InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) -{ - KdInitOutput (pScreenInfo, argc, argv); -} - -void -InitInput (int argc, char **argv) -{ - KdOsAddInputDrivers (); - KdInitInput (); -} - -void -ddxUseMsg (void) -{ - KdUseMsg(); -} - -int -ddxProcessArgument (int argc, char **argv, int i) -{ - return KdProcessArgument (argc, argv, i); -} diff --git a/hw/kdrive/ts300/ts300.c b/hw/kdrive/ts300/ts300.c deleted file mode 100644 index e9ff3a3da..000000000 --- a/hw/kdrive/ts300/ts300.c +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright © 1999 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "kdrive.h" - -extern KdCardFuncs sisFuncs; -extern KdCardFuncs s3Funcs; - -/* - * Kludgy code to parse the ascii /proc/pci file as the TS300 - * is running a 2.0 kernel - */ -BOOL -HasPCI (char *name, KdCardAttr *attr) -{ - FILE *f; - char line[1024]; - BOOL waiting; - BOOL found = FALSE; - char *mem; - - f = fopen ("/proc/pci", "r"); - if (!f) - return FALSE; - waiting = FALSE; - attr->naddr = 0; - while (fgets (line, sizeof (line), f)) - { - if (waiting) - { - - if (mem = strstr (line, "memory at ")) - { - mem += strlen ("memory at "); - attr->address[attr->naddr++] = strtoul (mem, NULL, 0); - found = TRUE; - } - else if (mem = strstr (line, "I/O at ")) - { - mem += strlen ("I/O at "); - attr->io = strtoul (mem, NULL, 0); - found = TRUE; - } - else if (strstr (line, "Bus") && strstr (line, "device") && - strstr (line, "function")) - break; - } - else if (strstr (line, "VGA compatible controller")) - { - if (strstr (line, name)) - waiting = TRUE; - } - } - fclose (f); - return found; -} - -typedef struct _PCICard { - char *user; - char *name; - KdCardFuncs *funcs; -} PCICard; - -PCICard PCICards[] = { - "sis", "Silicon Integrated Systems", &sisFuncs, - "s3", "S3 Inc.", &s3Funcs, -}; - -#define NUM_PCI_CARDS (sizeof (PCICards) / sizeof (PCICards[0])) - -void -InitCard (char *name) -{ - KdCardInfo *card; - CARD32 fb; - int i; - KdCardAttr attr; - - for (i = 0; i < NUM_PCI_CARDS; i++) - { - if (!name || !strcmp (name, PCICards[i].user)) - { - if (HasPCI (PCICards[i].name, &attr)) - { - KdCardInfoAdd (PCICards[i].funcs, &attr, 0); - return; - } - } - } -} - -void -InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) -{ - KdInitOutput (pScreenInfo, argc, argv); -} - -void -InitInput (int argc, char **argv) -{ - KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs); -} - -void -ddxUseMsg (void) -{ - KdUseMsg(); -} - -int -ddxProcessArgument (int argc, char **argv, int i) -{ - return KdProcessArgument (argc, argv, i); -} diff --git a/hw/kdrive/via/Makefile.am b/hw/kdrive/via/Makefile.am deleted file mode 100644 index c659379f0..000000000 --- a/hw/kdrive/via/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -INCLUDES = \ - @KDRIVE_INCS@ \ - -I$(top_srcdir)/hw/kdrive/vesa \ - @KDRIVE_CFLAGS@ - -bin_PROGRAMS = Xvia - -noinst_LIBRARIES = libvia.a - -libvia_a_SOURCES = \ - via.c \ - viadraw.c \ - viadraw.h \ - via.h \ - via_regs.h - -Xvia_SOURCES = \ - viastub.c - -VIA_LIBS = \ - libvia.a \ - $(top_builddir)/hw/kdrive/vesa/libvesa.a - -if GLX -Xvia_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -endif - -Xvia_LDADD = \ - $(VIA_LIBS) \ - @KDRIVE_LIBS@ - -Xvia_DEPENDENCIES = \ - libvia.a \ - @KDRIVE_LOCAL_LIBS@ - -relink: - rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS) diff --git a/hw/kdrive/via/via.c b/hw/kdrive/via/via.c deleted file mode 100644 index b8e1036aa..000000000 --- a/hw/kdrive/via/via.c +++ /dev/null @@ -1,435 +0,0 @@ -/* - * Copyright © 2004 Ralph Thomas - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Ralph Thomas not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Ralph Thomas makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * RALPH THOMAS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL RALPH THOMAS BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -/* -** VIA CLE266 driver -** Copyright 2004 (C) Ralph Thomas -** -** http://www.viatech.com.tw/ -*/ - -#include "via.h" -#include "viadraw.h" - -/* -** viaCardInit( KdCardInfo* card ) -** -** Description: -** Create card specific structures, map chip registers and initialize the -** VESA driver. We make the VESA driver do boring stuff for us, like set -** up a framebuffer and program a mode. -** -** Parameters: -** card Information stucture for the card we want to bring up. -** It should be a VIA card. -** -** Return: -** TRUE Initialization went ok. -** FALSE Initialization failed. -*/ -static Bool -viaCardInit( KdCardInfo* card ) { - ViaCardInfo* viac; - - viac = (ViaCardInfo*) xalloc( sizeof( ViaCardInfo ) ); - if( !viac ) return FALSE; - memset( viac, '\0', sizeof( ViaCardInfo ) ); - - - viaMapReg( card, viac ); - - if( !vesaInitialize( card, &viac->vesa ) ) { - xfree( viac ); - return FALSE; - } - - card->driver = viac; - - return TRUE; -} - -/* -** Bool viaScreenInit( KdScreenInfo* screen ) -** -** Description: -** Initialize a single screen, described by the screen parameter. -** This is where fairly low-level screen related things get setup, -** such as video mode and resolution. Currently that all gets -** handed off to the VESA driver. -** -** Parameters: -** screen Information structure for the screen to enable. -** -** Return: -** TRUE Screen was initialized successfully -** FALSE Screen initialization failed -*/ -static Bool -viaScreenInit( KdScreenInfo* screen ) { - ViaCardInfo* viac = screen->card->driver; - ViaScreenInfo* vias; - - vias = (ViaScreenInfo*) xalloc( sizeof( ViaScreenInfo ) ); - if( !vias ) return FALSE; - memset( vias, '\0', sizeof( ViaScreenInfo ) ); - - if( !vesaScreenInitialize( screen, &vias->vesa ) ) { - xfree( vias ); - return FALSE; - } - - /* - ** XXX: What does this do? - */ - if( !viac->mapBase ) - screen->dumb = TRUE; - if( vias->vesa.mapping != VESA_LINEAR ) - screen->dumb = TRUE; - - screen->driver = vias; - return TRUE; -} - -/* -** Bool viaInitScreen( ScreenPtr pScreen ) -** -** Description: -** High level screen initialization occurs here. We could register XV -** adaptors, etc, here. -** -** Arguments: -** pScreen X screen information -** -** Return: -** TRUE Initialization was successful, -** FALSE Initialization failed. -*/ -static Bool -viaInitScreen( ScreenPtr pScreen ) { - return vesaInitScreen( pScreen ); -} - -/* -** Bool viaFinishInitScreen -** -** Description: -** Finish up any high-level screen initialization. Per-Screen extension -** initialization can be done here. -** -** Arguments: -** pScreen X screen information -** -** Return: -** TRUE Initialization was successful. -** FALSE Initialization failed. -*/ -static Bool -viaFinishInitScreen( ScreenPtr pScreen ) { - return vesaFinishInitScreen( pScreen ); -} - -/* -** Bool viaCreateResources( ScreenPtr pScreen ) -** -** Description: -** Do any screen specific configuration. -** -** Arguments: -** pScreen X screen information -** -** Return: -** TRUE configuration was successful. -** FALSE configuration failed. -*/ -static Bool -viaCreateResources( ScreenPtr pScreen ) { - return vesaCreateResources( pScreen ); -} - -/* -** void viaPreserve( KdCardInfo* card ) -** -** Description: -** Save the current state of the chip, so that it can be restored by -** viaRestore at a later time. -** -** Arguments: -** card Information structure for the chip we want to preserve the -** state of. -** -** Return: -** None. -** -** See Also: -** viaRestore -*/ -static void -viaPreserve( KdCardInfo* card ) { - vesaPreserve( card ); -} - -/* -** void viaRestore( KdCardInfo* card ) -** -** Description: -** Restore the previous state of the chip, as saved by viaPreserve -** earlier. -** -** Arguments: -** card Information structure for the chip we want to restore the -** state of. -** -** Return: -** None. -** -** See Also: -** viaPreserve -*/ -static void viaRestore( KdCardInfo* card ) { - ViaCardInfo* viac = card->driver; - - viaResetMMIO( card, viac ); - vesaRestore( card ); -} - -/* -** Bool viaEnable( ScreenPtr pScreen ) -** -** Description: -** This is where we set the card up for drawing the specified screen, e.g.: -** set the mode and mmap the framebuffer. -** -** Arguments: -** pScreen X screen information -** -** Return: -** TRUE the screen was enabled -** FALSE the screen could not be enabled -*/ -static Bool -viaEnable( ScreenPtr pScreen ) { - KdScreenPriv( pScreen ); - ViaCardInfo* viac = pScreenPriv->card->driver; - - if( !vesaEnable( pScreen ) ) return FALSE; - - viaSetMMIO( pScreenPriv->card, viac ); - - if( !viac->mapBase ) { - ErrorF( "Could not map CLE266 graphics registers" ); - return FALSE; - } - - return TRUE; -} - -/* -** void viaDisable( ScreenPtr pScreen ) -** -** Description: -** Shut down drawing: save some state and unmap the framebuffer. -** -** Arguments: -** pScreen X screen information -** -** Return: -** None. -*/ -static void -viaDisable( ScreenPtr pScreen ) { - KdScreenPriv( pScreen ); - ViaCardInfo* viac = pScreenPriv->card->driver; - - viaResetMMIO( pScreenPriv->card, viac ); - vesaDisable( pScreen ); -} - -/* -** void viaScreenFini( KdScreenInfo* screen ) -** -** Description: -** Release memory and resources allocated by viaScreenInit. -** -** Arguments: -** screen Information structure for the screen to release. -** -** Return: -** None. -** -** See Also: -** viaScreenInit -*/ -static void -viaScreenFini( KdScreenInfo* screen ) { - ViaScreenInfo* vias = screen->driver; - - vesaScreenFini( screen ); - xfree( vias ); - screen->driver = 0; -} - -/* -** void viaCardFini( KdCardInfo* card ) -** -** Description: -** Release memory and resources allocated by viaCardInit. -** -** Arguments: -** card Information structure for the chip to release. -** -** Return: -** None. -** -** See Also: -** viaCardInit -*/ -static void -viaCardFini( KdCardInfo* card ) { - ViaCardInfo* viac = card->driver; - - viaUnmapReg( card, viac ); - vesaCardFini( card ); - xfree( viac ); -} - -/* -** void viaSetMMIO( KdCardInfo* card, ViaCardInfo* viac ) -** -** Description: -** Map the card's registers, if they're not already -** mapped. -** -** Arguments: -** card generic chip information -** viac VIA-driver specific chip information -** -** Return: -** None. -*/ -void viaSetMMIO( KdCardInfo* card, ViaCardInfo* viac ) { - if( !viac->mapBase ) viaMapReg( card, viac ); -} - -/* -** void viaResetMMIO( KdCardInfo* card, ViaCardInfo* viac ) -** -** Description: -** Unmap chip's registers. -** -** Arguments: -** card generic chip information -** viac VIA-driver specific chip information -** -** Return: -** None. -*/ -void viaResetMMIO( KdCardInfo* card, ViaCardInfo* viac ) { - viaUnmapReg( card, viac ); -} - -/* -** Bool viaMapReg( KdCardInfo* card, ViaCardInfo* viac ) -** -** Description: -** Map the chip's registers into our address space. -** -** Arguments: -** card the card information -** viac the VIA-driver specific card information -** -** Return: -** TRUE the registers were succesfully mapped -** FALSE the registers could not be mapped -*/ -Bool -viaMapReg( KdCardInfo* card, ViaCardInfo* viac ) { - viac->mapBase = (VOL8*) KdMapDevice( VIA_REG_BASE( card ), - VIA_REG_SIZE( card ) ); - - if( !viac->mapBase ) { - ErrorF( "Couldn't allocate viac->mapBase\n" ); - return FALSE; - } - - KdSetMappedMode( VIA_REG_BASE( card ), VIA_REG_SIZE( card ), - KD_MAPPED_MODE_REGISTERS ); - - /* - ** Enable extended IO space - */ - VGAOUT8( 0x3C4, 0x10 ); - VGAOUT8( 0x3C5, 0x01 ); - - return TRUE; -} - -/* -** void viaUnmapReg( KdCardInfo* card, ViaCardInfo* viac ) -** -** Description: -** Unmap the the chip's registers. -** -** Arguments: -** card the card information -** viac the VIA-driver specific card information -** -** Return: -** None. -*/ -void -viaUnmapReg( KdCardInfo* card, ViaCardInfo* viac ) { - if( !viac->mapBase ) return; - - KdResetMappedMode( VIA_REG_BASE( card ), VIA_REG_SIZE( card ), - KD_MAPPED_MODE_REGISTERS ); - KdUnmapDevice( (void*) viac->mapBase, VIA_REG_SIZE( card ) ); - viac->mapBase = 0; -} - -KdCardFuncs viaFuncs = { - viaCardInit, /* cardinit */ - viaScreenInit, /* scrinit */ - viaInitScreen, /* initScreen */ - viaFinishInitScreen, /* finishInitScreen */ - viaCreateResources, /* createRes */ - viaPreserve, /* preserve */ - viaEnable, /* enable */ - vesaDPMS, /* dpms */ - viaDisable, /* disable */ - viaRestore, /* restore */ - viaScreenFini, /* scrfini */ - viaCardFini, /* cardfini */ - - 0, /* initCursor */ - 0, /* enableCursor */ - 0, /* disableCursor */ - 0, /* finiCursor */ - 0, /* recolorCursor */ - - viaDrawInit, /* initAccel */ - viaDrawEnable, /* enableAccel */ - viaDrawDisable, /* disableAccel */ - viaDrawFini, /* finiAccel */ - - vesaGetColors, /* getColors */ - vesaPutColors, /* putColors */ -}; - diff --git a/hw/kdrive/via/via.h b/hw/kdrive/via/via.h deleted file mode 100644 index 00f40bc04..000000000 --- a/hw/kdrive/via/via.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright © 2004 Ralph Thomas - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Ralph Thomas not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Ralph Thomas makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * RALPH THOMAS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL RALPH THOMAS BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -/* -** VIA CLE266 driver -** Copyright 2004 (C) Ralph Thomas -** -** http://www.viatech.com.tw/ -*/ - -#ifndef _VIA_H_ -#define _VIA_H_ - -#include -#include - -/* -** Define DebugF so that we can spot debug statements easily. -*/ -#define DebugF ErrorF - -typedef volatile CARD8 VOL8; -typedef volatile CARD16 VOL16; -typedef volatile CARD32 VOL32; - -/* -** These macros provide access to data on the card. The VIA graphics chips -** are only available on IA-32 architecture, so PCI address space and CPU -** address space are always the same (hence accesses can be performed by -** dereferencing a pointer into PCI space). -*/ -#define MMIO_OUT32( mmio, a, v ) (*(VOL32 *)((mmio) + (a)) = (v)) -#define MMIO_IN32( mmio, a ) (*(VOL32 *)((mmio) + (a))) -#define MMIO_OUT16( mmio, a, v ) (*(VOL16 *)((mmio) + (a)) = (v)) -#define MMIO_IN16( mmio, a ) (*(VOL16 *)((mmio) + (a))) -#define MMIO_OUT8( mmio, a, v ) (*(VOL8 *)((mmio) + (a)) = (v)) -#define MMIO_IN8( mmio, a, v ) (*(VOL8 *)((mmio) + (a))) - -/* -** VGA regisers are offset 0x8000 from the beginning of the mmap'd register -** space. -*/ -#define VIA_MMIO_VGABASE 0x8000 - -/* -** The size of the register space, used when we mmap the registers. The -** argument "c" should be a KdCardInfo*. -*/ -#define VIA_REG_SIZE(c) (0x9000) - -/* -** The base of the register space, used when we mmap the registers. The -** argument "c" should be a KdCardInfo*. -*/ -#define VIA_REG_BASE(c) ((c)->attr.address[1]) - -/* -** Access to the mmap'd VGA registers. The VGA registers are offset from the -** beginning of the 16M pci space by 0x8000. These macros get used just like -** outb/inb would be used to access VGA. -*/ -#define VGAOUT32( addr, v ) MMIO_OUT32( viac->mapBase + VIA_MMIO_VGABASE, addr, v ) -#define VGAIN32( addr ) MMIO_IN32( viac->mapBase + VIA_MMIO_VGABASE, addr ) -#define VGAOUT16( addr, v ) MMIO_OUT16( viac->mapBase + VIA_MMIO_VGABASE, addr, v ) -#define VGAIN16( addr ) MIIO_IN16( viac->mapBase + VIA_MMIO_VGABASE, addr ) -#define VGAOUT8( addr, v ) MMIO_OUT8( viac->mapBase + VIA_MMIO_VGABASE, addr, v ) -#define VGAIN8( addr ) MMIO_IN8( viac->mapBase + VIA_MMIO_VGABASE, addr ) - -/* -** Access to any of the registers on the chip. -*/ -#define OUTREG32( addr, v ) MMIO_OUT32( viac->mapBase, addr, v ) -#define INREG32( addr ) MMIO_IN32( viac->mapBase, addr ) -#define OUTREG16( addr, v ) MMIO_OUT16( viac->mapBase, addr, v ) -#define INREG16( addr ) MMIO_IN16( viac->mapBase, addr ) - -/* -** We keep all of our chip specific data in a ViaCardInfo. -*/ -typedef struct _viaCardInfo { - VesaCardPrivRec vesa; /* card info for VESA driver */ - VOL8* mapBase; /* mmap'd registers */ - CARD32 savedCommand; /* command to issue to GE */ - CARD32 savedFgColor; /* color to issue to GE */ -} ViaCardInfo; - -/* -** We keep all of our screen specific data in a ViaScreenInfo. -*/ -typedef struct _viaScreenInfo { - VesaScreenPrivRec vesa; - KaaScreenInfoRec kaa; -} ViaScreenInfo; - -/* -** These function prototypes are for support functions. More infomation on each -** function is available at the place the function is implemented, in via.c. -*/ -Bool viaMapReg( KdCardInfo* card, ViaCardInfo* viac ); -void viaUnmapReg( KdCardInfo* card, ViaCardInfo* viac ); -void viaSetMMIO( KdCardInfo* card, ViaCardInfo* viac ); -void viaResetMMIO( KdCardInfo* card, ViaCardInfo* viac ); - -/* -** The viaFuncs structure gets filled with the addresses of the functions -** that we use to talk to the graphics chip. -*/ -extern KdCardFuncs viaFuncs; - -#endif - diff --git a/hw/kdrive/via/via_regs.h b/hw/kdrive/via/via_regs.h deleted file mode 100644 index 2d8195d5d..000000000 --- a/hw/kdrive/via/via_regs.h +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. - * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VIA, S3 GRAPHICS, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/************************************************************************* - * - * File: via_regs.h - * Content: The defines of Via registers - * - ************************************************************************/ - -#ifndef _VIA_REGS_H_ -#define _VIA_REGS_H_ - -/* defines for VIA 2D registers */ -#define VIA_REG_GECMD 0x000 -#define VIA_REG_GEMODE 0x004 -#define VIA_REG_GESTATUS 0x004 /* as same as VIA_REG_GEMODE */ -#define VIA_REG_SRCPOS 0x008 -#define VIA_REG_DSTPOS 0x00C -#define VIA_REG_LINE_K1K2 0x008 -#define VIA_REG_LINE_XY 0x00C -#define VIA_REG_DIMENSION 0x010 /* width and height */ -#define VIA_REG_PATADDR 0x014 -#define VIA_REG_FGCOLOR 0x018 -#define VIA_REG_DSTCOLORKEY 0x018 /* as same as VIA_REG_FG */ -#define VIA_REG_BGCOLOR 0x01C -#define VIA_REG_SRCCOLORKEY 0x01C /* as same as VIA_REG_BG */ -#define VIA_REG_CLIPTL 0x020 /* top and left of clipping */ -#define VIA_REG_CLIPBR 0x024 /* bottom and right of clipping */ -#define VIA_REG_OFFSET 0x028 -#define VIA_REG_LINE_ERROR 0x028 -#define VIA_REG_KEYCONTROL 0x02C /* color key control */ -#define VIA_REG_SRCBASE 0x030 -#define VIA_REG_DSTBASE 0x034 -#define VIA_REG_PITCH 0x038 /* pitch of src and dst */ -#define VIA_REG_MONOPAT0 0x03C -#define VIA_REG_MONOPAT1 0x040 -#define VIA_REG_COLORPAT 0x100 /* from 0x100 to 0x1ff */ - - - -/* defines for VIA video registers */ -#define VIA_REG_INTERRUPT 0x200 -#define VIA_REG_CRTCSTART 0x214 - - -/* defines for VIA HW cursor registers */ -#define VIA_REG_CURSOR_MODE 0x2D0 -#define VIA_REG_CURSOR_POS 0x2D4 -#define VIA_REG_CURSOR_ORG 0x2D8 -#define VIA_REG_CURSOR_BG 0x2DC -#define VIA_REG_CURSOR_FG 0x2E0 - - -/* defines for VIA 3D registers */ -#define VIA_REG_STATUS 0x400 -#define VIA_REG_TRANSET 0x43C -#define VIA_REG_TRANSPACE 0x440 - -/* VIA_REG_STATUS(0x400): Engine Status */ -#define VIA_CMD_RGTR_BUSY 0x00000080 /* Command Regulator is busy */ -#define VIA_2D_ENG_BUSY 0x00000001 /* 2D Engine is busy */ -#define VIA_3D_ENG_BUSY 0x00000002 /* 3D Engine is busy */ -#define VIA_VR_QUEUE_BUSY 0x00020000 /* Virtual Queue is busy */ -#define VIA_BUSY (VIA_CMD_RGTR_BUSY|VIA_2D_ENG_BUSY|VIA_3D_ENG_BUSY) - - -/* VIA_REG_GECMD(0x00): 2D Engine Command */ -#define VIA_GEC_NOOP 0x00000000 -#define VIA_GEC_BLT 0x00000001 -#define VIA_GEC_LINE 0x00000005 - -#define VIA_GEC_SRC_XY 0x00000000 -#define VIA_GEC_SRC_LINEAR 0x00000010 -#define VIA_GEC_DST_XY 0x00000000 -#define VIA_GEC_DST_LINRAT 0x00000020 - -#define VIA_GEC_SRC_FB 0x00000000 -#define VIA_GEC_SRC_SYS 0x00000040 -#define VIA_GEC_DST_FB 0x00000000 -#define VIA_GEC_DST_SYS 0x00000080 - -#define VIA_GEC_SRC_MONO 0x00000100 /* source is mono */ -#define VIA_GEC_PAT_MONO 0x00000200 /* pattern is mono */ - -#define VIA_GEC_MSRC_OPAQUE 0x00000000 /* mono src is opaque */ -#define VIA_GEC_MSRC_TRANS 0x00000400 /* mono src is transparent */ - -#define VIA_GEC_PAT_FB 0x00000000 /* pattern is in frame buffer */ -#define VIA_GEC_PAT_REG 0x00000800 /* pattern is from reg setting */ - -#define VIA_GEC_CLIP_DISABLE 0x00000000 -#define VIA_GEC_CLIP_ENABLE 0x00001000 - -#define VIA_GEC_FIXCOLOR_PAT 0x00002000 - -#define VIA_GEC_INCX 0x00000000 -#define VIA_GEC_DECY 0x00004000 -#define VIA_GEC_INCY 0x00000000 -#define VIA_GEC_DECX 0x00008000 - -#define VIA_GEC_MPAT_OPAQUE 0x00000000 /* mono pattern is opaque */ -#define VIA_GEC_MPAT_TRANS 0x00010000 /* mono pattern is transparent */ - -#define VIA_GEC_MONO_UNPACK 0x00000000 -#define VIA_GEC_MONO_PACK 0x00020000 -#define VIA_GEC_MONO_DWORD 0x00000000 -#define VIA_GEC_MONO_WORD 0x00040000 -#define VIA_GEC_MONO_BYTE 0x00080000 - -#define VIA_GEC_LASTPIXEL_ON 0x00000000 -#define VIA_GEC_LASTPIXEL_OFF 0x00100000 -#define VIA_GEC_X_MAJOR 0x00000000 -#define VIA_GEC_Y_MAJOR 0x00200000 -#define VIA_GEC_QUICK_START 0x00800000 - - -/* VIA_REG_GEMODE(0x04): GE mode */ -#define VIA_GEM_8bpp 0x00000000 -#define VIA_GEM_16bpp 0x00000100 -#define VIA_GEM_32bpp 0x00000300 - -#define VIA_GEM_640 0x00000000 /* 640*480 */ -#define VIA_GEM_800 0x00000400 /* 800*600 */ -#define VIA_GEM_1024 0x00000800 /* 1024*768 */ -#define VIA_GEM_1280 0x00000C00 /* 1280*1024 */ -#define VIA_GEM_1600 0x00001000 /* 1600*1200 */ -#define VIA_GEM_2048 0x00001400 /* 2048*1536 */ - -/* VIA_REG_PITCH(0x38): Pitch Setting */ -#define VIA_PITCH_ENABLE 0x80000000 - -#endif /* _VIA_REGS_H_ */ diff --git a/hw/kdrive/via/viadraw.c b/hw/kdrive/via/viadraw.c deleted file mode 100644 index a6544ee36..000000000 --- a/hw/kdrive/via/viadraw.c +++ /dev/null @@ -1,499 +0,0 @@ -/* - * Copyright © 2004 Ralph Thomas - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Ralph Thomas not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Ralph Thomas makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * RALPH THOMAS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL RALPH THOMAS BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -/* -** VIA CLE266 driver -** Copyright 2004 (C) Ralph Thomas -** -** http://www.viatech.com.tw/ -** -** This code is for accelerated drawing of solids and accelerated -** copies. Note that there is currently no software FIFO implemented, -** and no documentation on any hardware FIFO. -*/ - -#include "via.h" -#include "viadraw.h" -#include "via_regs.h" -#include -#include "kdrive.h" -#include "kaa.h" - -/* -** A global to contain card information between calls into this file. -** XXX: This is totally brain-damaged. Why don't I get the information -** I want in viaSolid/viaCopy/viaDoneXXX? -*/ -static ViaCardInfo* card; - -/* -** Translation table from GC raster operation values into ROP3 values -** that the VIA chip understands. -** -** viaPatternRop is used by viaPrepareSolid. -** viaCopyRop is used by viaPrepareCopy. -*/ -CARD8 viaPatternRop[16] = { - /* GXclear */ 0x00, /* ROP_0 0 */ - /* GXand */ 0xA0, /* ROP_DPa src AND dst */ - /* GXandReverse */ 0x50, /* ROP_PDna src AND NOT dst */ - /* GXcopy */ 0xF0, /* ROP_P src */ - /* GXandInverted*/ 0x0A, /* ROP_DPna NOT src AND dst */ - /* GXnoop */ 0xAA, /* ROP_D dst */ - /* GXxor */ 0x5A, /* ROP_DPx src XOR dst */ - /* GXor */ 0xFA, /* ROP_DPo src OR dst */ - /* GXnor */ 0x05, /* ROP_DPon NOT src AND NOT dst */ - /* GXequiv */ 0xA5, /* ROP_PDxn NOT src XOR dst */ - /* GXinvert */ 0x55, /* ROP_Dn NOT dst */ - /* GXorReverse */ 0xF5, /* ROP_PDno src OR NOT dst */ - /* GXcopyInverted*/ 0x0F, /* ROP_Pn NOT src */ - /* GXorInverted */ 0xAF, /* ROP_DPno NOT src OR dst */ - /* GXnand */ 0x5F, /* ROP_DPan NOT src OR NOT dst */ - /* GXset */ 0xFF, /* ROP_1 1 */ -}; - -CARD8 viaCopyRop[16] = { - /* GXclear */ 0x00, /* ROP_0 0 */ - /* GXand */ 0x88, /* ROP_DSa src AND dst */ - /* GXandReverse */ 0x44, /* ROP_SDna src AND NOT dst */ - /* GXcopy */ 0xCC, /* ROP_S src */ - /* GXandInverted*/ 0x22, /* ROP_DSna NOT src AND dst */ - /* GXnoop */ 0xAA, /* ROP_D dst */ - /* GXxor */ 0x66, /* ROP_DSx src XOR dst */ - /* GXor */ 0xEE, /* ROP_DSo src OR dst */ - /* GXnor */ 0x11, /* ROP_DSon NOT src AND NOT dst */ - /* GXequiv */ 0x99, /* ROP_DSxn NOT src XOR dst */ - /* GXinvert */ 0x55, /* ROP_Dn NOT dst */ - /* GXorReverse */ 0xDD, /* ROP_SDno src OR NOT dst */ - /* GXcopyInverted*/ 0x33, /* ROP_Sn NOT src */ - /* GXorInverted */ 0xBB, /* ROP_DSno NOT src OR dst */ - /* GXnand */ 0x77, /* ROP_DSan NOT src OR NOT dst */ - /* GXset */ 0xFF, /* ROP_1 1 */ -}; - -/* -** void viaWaitIdle( ViaCardInfo* viac ) -** -** Description: -** Block up the CPU while waiting for the last command sent to -** the chip to complete. As an experiment I'm going to try to -** yield my process to others instead of just tight looping. -** -** Arguments: -** viac VIA-driver specific chip information -** -** Return: -** None. -*/ -void -viaWaitIdle( ViaCardInfo* viac ) { - while( INREG32( VIA_REG_STATUS ) & VIA_BUSY ) - sched_yield(); -} - -/* -** void viaDrawSync( ScreenPtr pScreen, int marker ) -** -** Description: -** Block until the graphics chip has finished all outstanding drawing -** operations and the framebuffer contents is static. -** -** Arguments: -** pScreen Pointer to screen strucutre for the screen we're -** waiting for drawing to end on. -** -** Return: -** None. -*/ -static void -viaWaitMarker( ScreenPtr pScreen, int marker ) { - KdScreenPriv( pScreen ); - ViaCardInfo* viac = pScreenPriv->card->driver; - - viaWaitIdle( viac ); -} - - -/* -** Bool viaPrepareSolid( PixmapPtr pPixmap, int alu, Pixel planemask, Pixel fg ) -** -** Description: -** Decide if the specified solid fill operation can be accelerated or not, -** and if the fill can be accelerated, prepare the hardware for doing it. -** -** Arguments: -** pPixmap Pixmap to draw solid into. -** alu Raster operation to draw using, these are the same -** values which get set by XSetFunction(3X). See the -** Xlib PM p. 140 for a list of raster operations as -** well as descriptions. -** planemask This is the GC plane mask. We only copy bits which -** match the plane mask. -** fg The foreground pixel of the GC, the pixel to draw in. -** -** Return: -** TRUE This operation can be accelerated, call viaSolid to actually -** have it drawn. -** FALSE This operation cannot be accelerated, fall back to software. -** -** See Also: -** viaSolid - the function which actually draws the solid. -*/ -static Bool -viaPrepareSolid( PixmapPtr pPixmap, int alu, Pixel planeMask, Pixel fg ) { - ScreenPtr pScreen = pPixmap->drawable.pScreen; - KdScreenPriv( pScreen ); - ViaCardInfo* viac = pScreenPriv->card->driver; - - /* - ** We don't accelerate when the plane mask is not everything. - */ - if( ~planeMask & FbFullMask( pPixmap->drawable.depth ) ) return FALSE; - - /* - ** Compose the command, then store the composed command and color - ** in the viac structure so that when viaSolid gets called we can - ** write them out. - */ - viac->savedCommand = VIA_GEC_BLT | VIA_GEC_FIXCOLOR_PAT | - (viaPatternRop[alu] << 24); - viac->savedFgColor = fg; - - /* - ** Store pointer to chip information, due to brain-damaged KAA. - */ - card = viac; - - return TRUE; -} - -/* -** void viaSolid( int x1, int y1, int x2, int y2 ) -** -** Description: -** Perform a solid fill, using the data that was stored by viaPrepareSolid. -** -** Arguments: -** x1 x-coordinate of fill origin -** y1 y-coordinate of fill origin -** x2 x-coordinate of fill end point -** y2 y-coordinate of fill end point -** -** Return: -** None. -** -** See Also: -** viaPrepareSolid - the function that composes the GE command and saves -** the color for us. -*/ -static void -viaSolid( int x1, int y1, int x2, int y2 ) { - ViaCardInfo* viac = card; - int w = x2 - x1; int h = y2 - y1; - - if( !viac ) return; - if( !w || !h ) return; - - /* - ** Wait for the card to finish the current draw. - */ - viaWaitIdle( viac ); - - /* - ** Do the draw. - */ - OUTREG32( VIA_REG_DSTPOS, ((y1 << 16) | x1) ); - OUTREG32( VIA_REG_DIMENSION, (((h - 1) << 16) | (w - 1)) ); - OUTREG32( VIA_REG_FGCOLOR, viac->savedFgColor ); - OUTREG32( VIA_REG_GECMD, viac->savedCommand ); -} - -/* -** void viaDoneSolid -** -** Description: -** Finish up drawing of the solid. -** -** Arguments: -** None. -** -** Return: -** None. -*/ -static void -viaDoneSolid(void) { -} - -/* -** Bool viaPrepareCopy( PixmapPtr pSrcPixmap, PixmapPtr pDestPixmap, int dx, -** int dy, int alu, Pixel planeMask ) -** -** Description: -** Set up the VIA chip for a BitBlt. -** -** Arguments: -** pSrcPixmap the source pixmap to copy from -** pDestPixmap the destination pixmap to copy to -** dx direction of copy in x -** dy direction of copy in y -** alu Raster operation to draw using, these are the same -** values which get set by XSetFunction(3X). See the -** Xlib PM p. 140 for a list of raster operations as -** well as descriptions. -** planeMask This is the GC plane mask. We only copy bits which -** match the plane mask. -** -** Return: -** TRUE the requested copy operation can be accelerated using hardware, -** call viaCopy next. -** FALSE the requested copy operation cannot be accelerated using -** hardware - fallback to software. -** -** See Also: -** viaCopy - the function which does the actual copy. -*/ -static Bool -viaPrepareCopy( PixmapPtr pSrcPixmap, PixmapPtr pDestPixmap, int dx, int dy, - int alu, Pixel planeMask ) { - ScreenPtr pScreen = pDestPixmap->drawable.pScreen; - KdScreenPriv( pScreen ); - ViaCardInfo* viac = pScreenPriv->card->driver; - - /* - ** Don't accelerate when the plane mask is set. - */ - if( ~planeMask & FbFullMask( pDestPixmap->drawable.depth ) ) return FALSE; - - viac->savedCommand = VIA_GEC_BLT | (viaCopyRop[alu] << 24); - - if( dx < 0 ) viac->savedCommand |= VIA_GEC_DECX; - if( dy < 0 ) viac->savedCommand |= VIA_GEC_DECY; - - /* - ** Store pointer to chip structure, due to brain-damaged KAA. - */ - card = viac; - - return TRUE; -} - -/* -** void viaCopy( int srcX, int srcY, int dstX, int dstY, int w, int h ) -** -** Description: -** Perform a BitBlt from one screen area to another. -** -** Arguments: -** srcX source x-coordinate -** srcY source y-coordinate -** dstX destination x-coordinate -** dstY destination y-coordinate -** w width of area to copy (pixels) -** h height of area to copy (pixels) -** -** Return: -** None. -** -** See Also: -** viaPrepareCopy - the function which sets up for the copy. -*/ -static void -viaCopy( int srcX, int srcY, int dstX, int dstY, int w, int h ) { - ViaCardInfo* viac = card; - - if( !viac ) return; - if( !w | !h ) return; - - /* - ** XXX: Check these two "if"s out. - */ - if( viac->savedCommand & VIA_GEC_DECX ) { - srcX += ( w - 1 ); - dstX += ( w - 1 ); - } - - if( viac->savedCommand & VIA_GEC_DECY ) { - srcY += ( h - 1 ); - dstY += ( h - 1 ); - } - - OUTREG32( VIA_REG_SRCPOS, ((srcY << 16) | srcX) ); - OUTREG32( VIA_REG_DSTPOS, ((dstY << 16) | dstX) ); - OUTREG32( VIA_REG_DIMENSION, (((h - 1) << 16) | (w - 1)) ); - OUTREG32( VIA_REG_GECMD, viac->savedCommand ); -} - -/* -** void viaDoneCopy() -** -** Description: -** Finish up the copy. -** -** Arguments: -** None. -** -** Return: -** None. -*/ -static void -viaDoneCopy(void) { -} - - -/* -** Bool viaDrawInit( ScreenPtr pScreen ) -** -** Description: -** Initialize the 2D acceleration hardware and register the KAA -** acceleration layer with the VIA acceleration functions (above). -** -** Arguments: -** pScreen Pointer to screen structure for the screen we're -** enabling acceleration on. -** -** Return: -** TRUE initialization and setup of KAA acceleration was successful. -** FALSE initialization and setup of KAA acceleration failed. -*/ -Bool -viaDrawInit( ScreenPtr pScreen ) { - KdScreenPriv( pScreen ); - ViaCardInfo* viac = pScreenPriv->card->driver; - ViaScreenInfo* vias = pScreenPriv->card->driver; - CARD32 geMode = 0; - - if( !viac ) return FALSE; - DebugF( "viac->mapBase = 0x%x\n", viac->mapBase ); - - /* - ** We reset the 2D engine to a known state by setting all of it's - ** registers to zero. - */ - OUTREG32( VIA_REG_GEMODE, 0x0 ); - OUTREG32( VIA_REG_SRCPOS, 0x0 ); - OUTREG32( VIA_REG_DSTPOS, 0x0 ); - OUTREG32( VIA_REG_DIMENSION, 0x0 ); - OUTREG32( VIA_REG_PATADDR, 0x0 ); - OUTREG32( VIA_REG_FGCOLOR, 0x0 ); - OUTREG32( VIA_REG_BGCOLOR, 0x0 ); - OUTREG32( VIA_REG_CLIPTL, 0x0 ); - OUTREG32( VIA_REG_CLIPBR, 0x0 ); - OUTREG32( VIA_REG_OFFSET, 0x0 ); - OUTREG32( VIA_REG_KEYCONTROL, 0x0 ); - OUTREG32( VIA_REG_SRCBASE, 0x0 ); - OUTREG32( VIA_REG_DSTBASE, 0x0 ); - OUTREG32( VIA_REG_PITCH, 0x0 ); - OUTREG32( VIA_REG_MONOPAT0, 0x0 ); - OUTREG32( VIA_REG_MONOPAT1, 0x0 ); - - /* - ** Set the GE mode up. - ** XXX: What happens in 24bpp mode? - */ - switch( pScreenPriv->screen->fb[0].bitsPerPixel ) { - case 16: - geMode = VIA_GEM_16bpp; - break; - case 32: - geMode = VIA_GEM_32bpp; - break; - default: - geMode = VIA_GEM_8bpp; - break; - } - - OUTREG32( VIA_REG_GEMODE, geMode ); - - /* - ** Set the source and destination base addresses, and set pitch. - */ - OUTREG32( VIA_REG_SRCBASE, 0x0 ); - OUTREG32( VIA_REG_DSTBASE, 0x0 ); - OUTREG32( VIA_REG_PITCH, VIA_PITCH_ENABLE | - ((pScreen->width * pScreenPriv->screen->fb[0].bitsPerPixel >> 3) >> 3) | - (((pScreen->width * pScreenPriv->screen->fb[0].bitsPerPixel >> 3) >> 3) << 16)); - - DebugF( "Initialized 2D engine!\n" ); - - memset(&vias->kaa, 0, sizeof(KaaScreenInfoRec)); - vias->kaa.waitMarker = viaWaitMarker; - vias->kaa.PrepareSolid = viaPrepareSolid; - vias->kaa.Solid = viaSolid; - vias->kaa.DoneSolid = viaDoneSolid; - vias->kaa.PrepareCopy = viaPrepareCopy; - vias->kaa.Copy = viaCopy; - vias->kaa.DoneCopy = viaDoneCopy; - - return kaaDrawInit( pScreen, &vias->kaa ); -} - -/* -** void viaDrawEnable( ScreenPtr pScreen ) -** -** Description: -** Enable accelerated drawing on the specified screen. -** -** Arguments: -** pScreen Pointer to screen structure for the screen we're -** enabling acceleration on. -** -** Return: -** None. -*/ -void -viaDrawEnable( ScreenPtr pScreen ) { - kaaMarkSync( pScreen ); -} - -/* -** void viaDrawDisable( ScreenPtr pScreen ) -** -** Description: -** Disable accelerated drawing to the specified screen. -** -** Arguments: -** pScreen Pointer to screen structure for the screen we're -** disabling acceleration on. -** -** Return: -** None -*/ -void -viaDrawDisable( ScreenPtr pScreen ) { -} - -/* -** void viaDrawFini( ScreenPtr pScreen ) -** -** Description: -** Shutdown accelerated drawing and free associated strucures and -** resources. -** -** Arguments: -** pScreen Pointer to screen structure for the screen we're -** disabling acceleration on. -** -** Return: -** None. -*/ -void -viaDrawFini( ScreenPtr pScreen ) { -} diff --git a/hw/kdrive/via/viadraw.h b/hw/kdrive/via/viadraw.h deleted file mode 100644 index 404923053..000000000 --- a/hw/kdrive/via/viadraw.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright © 2004 Ralph Thomas - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Ralph Thomas not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Ralph Thomas makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * RALPH THOMAS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL RALPH THOMAS BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -/* -** VIA CLE266 driver -** Copyright 2004 (C) Ralph Thomas -** -** http://www.viatech.com.tw/ -** -** This header has some function prototypes for the hardware -** accelerated drawing code in viadraw.c. -*/ - -#ifndef _VIA_DRAW_H_ -#define _VIA_DRAW_H_ - -/* -** More information on these functions is in viadraw.c. -*/ -void viaWaitIdle( ViaCardInfo* card ); -Bool viaDrawInit( ScreenPtr pScreen ); -void viaDrawEnable( ScreenPtr pScreen ); -void viaDrawDisable( ScreenPtr pScreen ); -void viaDrawFini( ScreenPtr pScreen ); -void viaDrawSync( ScreenPtr pScreen ); - -#endif diff --git a/hw/kdrive/via/viastub.c b/hw/kdrive/via/viastub.c deleted file mode 100644 index 1439010a9..000000000 --- a/hw/kdrive/via/viastub.c +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright © 2004 Ralph Thomas - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Ralph Thomas not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Ralph Thomas makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * RALPH THOMAS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL RALPH THOMAS BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -/* -** VIA CLE266 driver -** Copyright 2004 (C) Ralph Thomas -** -** http://www.viatech.com.tw/ -** -** This is the stub code which links the VIA drawing code into the kdrive -** framework. -*/ - -#include "via.h" -#include - -/* -** void InitCard( char* name ) -** -** Description: -** Initialize the graphics chip. We find the chip on the PCI bus, -** register the functions to access the chip. -** -** Arguments: -** name XXX: unknown. -** -** Return: -** None. -*/ -void -InitCard( char* name ) { - KdCardAttr attr; - - if( LinuxFindPci( 0x1106, 0x3122, 0, &attr ) ) - KdCardInfoAdd( &viaFuncs, &attr, 0 ); -} - -/* -** void InitOutput( ScreenInfo* pScreenInfo, int argc, char** argv ) -** -** Description: -** Initialize I/O, or something. XXX: Or what? -** -** Arguments: -** pScreenInfo XXX -** argc command line argument count -** argv command line arguments -** -** Return: -** None. -*/ -void -InitOutput( ScreenInfo* pScreenInfo, int argc, char** argv ) { - KdInitOutput( pScreenInfo, argc, argv ); -} - -/* -** void InitInput( int argc, char** argv ) -** -** Description: -** Initialize keyboard and mouse input. -** -** Arguments: -** argc command line argument count -** argv command line arguments -** -** Return: -** None. -*/ -void -InitInput( int argc, char** argv ) { - KdOsAddInputDrivers(); - KdInitInput(); -} - -/* -** void ddxUseMsg() -** -** Description: -** Print the usage message for Xvia. -** -** Arguments: -** None. -** -** Return: -** None. -*/ -void -ddxUseMsg() { - KdUseMsg(); - vesaUseMsg(); -} - - -/* -** int ddxProcessArgument( int argc, char** argv, int i ) -** -** Description: -** Process a single command line argument. -** -** Arguments: -** argc command line argument count -** argv command line arguments -** i number of argument to process -** -** Return: -** some values. -*/ -int -ddxProcessArgument( int argc, char** argv, int i ) { - int ret; - - if( !( ret = vesaProcessArgument( argc, argv, i ) )) - ret = KdProcessArgument( argc, argv, i ); - return ret; -} - diff --git a/hw/kdrive/vxworks/vxkbd.c b/hw/kdrive/vxworks/vxkbd.c deleted file mode 100644 index ac83ef729..000000000 --- a/hw/kdrive/vxworks/vxkbd.c +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Copyright © 1999 Network Computing Devices, Inc. All rights reserved. - * - * Author: Keith Packard - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "kdrive.h" -#include "kkeymap.h" -#include -#include - -#define VXWORKS_WIDTH 2 - -KeySym VxWorksKeymap[] = { -/*7 f1 */ XK_F1, NoSymbol, -/*8 escape */ XK_Escape, NoSymbol, - NoSymbol, NoSymbol, - NoSymbol, NoSymbol, - NoSymbol, NoSymbol, - NoSymbol, NoSymbol, -/*13 tab */ XK_Tab, NoSymbol, -/*14 ` */ XK_grave, XK_asciitilde, -/*15 f2 */ XK_F2, NoSymbol, - NoSymbol, NoSymbol, -/*17 lctrl */ XK_Control_L, NoSymbol, -/*18 lshift */ XK_Shift_L, NoSymbol, - NoSymbol, NoSymbol, -/*20 lock */ XK_Caps_Lock, NoSymbol, -/*21 q */ XK_Q, NoSymbol, -/*22 1 */ XK_1, XK_exclam, -/*23 f3 */ XK_F3, NoSymbol, - NoSymbol, NoSymbol, -/*25 lalt */ XK_Meta_L, XK_Alt_L, -/*26 z */ XK_Z, NoSymbol, -/*27 s */ XK_S, NoSymbol, -/*28 a */ XK_A, NoSymbol, -/*29 w */ XK_W, NoSymbol, -/*30 2 */ XK_2, XK_at, -/*31 f4 */ XK_F4, NoSymbol, - NoSymbol, NoSymbol, -/*33 c */ XK_C, NoSymbol, -/*34 x */ XK_X, NoSymbol, -/*35 d */ XK_D, NoSymbol, -/*36 e */ XK_E, NoSymbol, -/*37 4 */ XK_4, XK_dollar, -/*38 3 */ XK_3, XK_numbersign, -/*39 f5 */ XK_F5, NoSymbol, - NoSymbol, NoSymbol, -/*41 space */ XK_space, NoSymbol, -/*42 v */ XK_V, NoSymbol, -/*43 f */ XK_F, NoSymbol, -/*44 t */ XK_T, NoSymbol, -/*45 r */ XK_R, NoSymbol, -/*46 5 */ XK_5, XK_percent, -/*47 f6 */ XK_F6, NoSymbol, - NoSymbol, NoSymbol, -/*49 n */ XK_N, NoSymbol, -/*50 b */ XK_B, NoSymbol, -/*51 h */ XK_H, NoSymbol, -/*52 g */ XK_G, NoSymbol, -/*53 y */ XK_Y, NoSymbol, -/*54 6 */ XK_6, XK_asciicircum, -/*55 f7 */ XK_F7, NoSymbol, - NoSymbol, NoSymbol, -/*57 ralt */ XK_Meta_R, XK_Alt_R, -/*58 m */ XK_M, NoSymbol, -/*59 j */ XK_J, NoSymbol, -/*60 u */ XK_U, NoSymbol, -/*61 7 */ XK_7, XK_ampersand, -/*62 8 */ XK_8, XK_asterisk, -/*63 f8 */ XK_F8, NoSymbol, - NoSymbol, NoSymbol, -/*65 , */ XK_comma, XK_less, -/*66 k */ XK_K, NoSymbol, -/*67 i */ XK_I, NoSymbol, -/*68 o */ XK_O, NoSymbol, -/*69 0 */ XK_0, XK_parenright, -/*70 9 */ XK_9, XK_parenleft, -/*71 f9 */ XK_F9, NoSymbol, - NoSymbol, NoSymbol, -/*73 . */ XK_period, XK_greater, -/*74 / */ XK_slash, XK_question, -/*75 l */ XK_L, NoSymbol, -/*76 ; */ XK_semicolon, XK_colon, -/*77 p */ XK_P, NoSymbol, -/*78 - */ XK_minus, XK_underscore, -/*79 f10 */ XK_F10, NoSymbol, - NoSymbol, NoSymbol, - NoSymbol, NoSymbol, -/*82 ' */ XK_apostrophe, XK_quotedbl, - NoSymbol, NoSymbol, -/*84 [ */ XK_bracketleft, XK_braceleft, -/*85 = */ XK_equal, XK_plus, -/*86 f11 */ XK_F11, NoSymbol, -/*87 sysrq */ XK_Sys_Req, XK_Print, -/*88 rctrl */ XK_Control_R, NoSymbol, -/*89 rshift */ XK_Shift_R, NoSymbol, -/*90 enter */ XK_Return, NoSymbol, -/*91 ] */ XK_bracketright, XK_braceright, -/*92 \ */ XK_backslash, XK_bar, - NoSymbol, NoSymbol, -/*94 f12 */ XK_F12, NoSymbol, -/*95 scrolllock*/ XK_Scroll_Lock, NoSymbol, -/*96 down */ XK_Down, NoSymbol, -/*97 left */ XK_Left, NoSymbol, -/*98 pause */ XK_Break, XK_Pause, -/*99 up */ XK_Up, NoSymbol, -/*100 delete */ XK_Delete, NoSymbol, -/*101 end */ XK_End, NoSymbol, -/*102 bs */ XK_BackSpace, NoSymbol, -/*103 insert */ XK_Insert, NoSymbol, - NoSymbol, NoSymbol, -/*105 np 1 */ XK_KP_End, XK_KP_1, -/*106 right */ XK_Right, NoSymbol, -/*107 np 4 */ XK_KP_Left, XK_KP_4, -/*108 np 7 */ XK_KP_Home, XK_KP_7, -/*109 pgdn */ XK_Page_Down, NoSymbol, -/*110 home */ XK_Home, NoSymbol, -/*111 pgup */ XK_Page_Up, NoSymbol, -/*112 np 0 */ XK_KP_Insert, XK_KP_0, -/*113 np . */ XK_KP_Delete, XK_KP_Decimal, -/*114 np 2 */ XK_KP_Down, XK_KP_2, -/*115 np 5 */ XK_KP_5, NoSymbol, -/*116 np 6 */ XK_KP_Right, XK_KP_6, -/*117 np 8 */ XK_KP_Up, XK_KP_8, -/*118 numlock */ XK_Num_Lock, NoSymbol, -/*119 np / */ XK_KP_Divide, NoSymbol, - NoSymbol, NoSymbol, -/*121 np enter */ XK_KP_Enter, NoSymbol, -/*122 np 3 */ XK_KP_Page_Down, XK_KP_3, - NoSymbol, NoSymbol, -/*124 np + */ XK_KP_Add, NoSymbol, -/*125 np 9 */ XK_KP_Page_Up, XK_KP_9, -/*126 np * */ XK_KP_Multiply, NoSymbol, - NoSymbol, NoSymbol, - NoSymbol, NoSymbol, - NoSymbol, NoSymbol, - NoSymbol, NoSymbol, - NoSymbol, NoSymbol, -/*132 np - */ XK_KP_Subtract, NoSymbol, - NoSymbol, NoSymbol, - NoSymbol, NoSymbol, - NoSymbol, NoSymbol, - NoSymbol, NoSymbol, - NoSymbol, NoSymbol, - NoSymbol, NoSymbol, -/*139 lwin */ XK_Super_L, NoSymbol, -/*140 rwin */ XK_Super_R, NoSymbol, -/*141 menu */ XK_Menu, NoSymbol, -}; - -void -VxWorksKeyboardLoad (void) -{ - KeySym *k; - - kdMinScanCode = 7; - kdKeymapWidth = VXWORKS_WIDTH; - kdMaxScanCode = 141; - memcpy (kdKeymap, VxWorksKeymap, sizeof (VxWorksKeymap)); -} - -static int kbdFd = -1; - -#include -#include -#include - -extern KeyboardCtrl defaultKeyboardControl; - -static void -VxWorksSetAutorepeat (unsigned char *repeats, Bool on) -{ - int i; - unsigned char mask; - int scan_code; - int key_code; - unsigned char realkc; - - if (on) - { - realkc = 1; - ioctl (kbdFd, KBD_ALL_REPEAT, &realkc); - for (scan_code = 7; scan_code <= 141; scan_code++) - { - key_code = scan_code + 1; - i = key_code >> 3; - mask = 1 << (key_code & 7); - if ((repeats[i] & mask) == 0) - { - realkc = scan_code; - ioctl (kbdFd, KBD_NO_REPEAT, &realkc); - } - } - } - else - { - realkc = 0; - ioctl (kbdFd, KBD_ALL_REPEAT, &realkc); - } -} - -int -VxWorksKeyboardInit (void) -{ - - kbdFd = open ("/dev/kbd", O_RDONLY, 0); - if (kbdFd < 0) - ErrorF ("keyboard open failure %d\n", errno); - VxWorksSetAutorepeat (defaultKeyboardControl.autoRepeats, TRUE); - return -1; -} - -void -VxWorksKeyboardFini (int fd) -{ - if (kbdFd >= 0) - { - close (kbdFd); - kbdFd = -1; - } -} - -void -VxWorksKeyboardRead (int fd) -{ -} - -void -VxWorksKeyboardLeds (int leds) -{ - DeviceIntPtr pKeyboard = inputInfo.keyboard; - KeyboardCtrl *ctrl = &pKeyboard->kbdfeed->ctrl; - led_ioctl_info led_info; - int i; - - VxWorksSetAutorepeat (ctrl->autoRepeats, ctrl->autoRepeat); - for (i = 0; i < 3; i++) - { - led_info.bit_n = 1 << i; - led_info.OFF_or_ON = (leds & (1 << i)) != 0; - led_info.reversed = 0; - ioctl (kbdFd, KBD_SET_LED, &led_info); - } -} - -void -VxWorksKeyboardBell (int volume, int frequency, int duration) -{ -} - -KdKeyboardFuncs VxWorksKeyboardFuncs = { - VxWorksKeyboardLoad, - VxWorksKeyboardInit, - VxWorksKeyboardRead, - VxWorksKeyboardLeds, - VxWorksKeyboardBell, - VxWorksKeyboardFini, - 3, -}; diff --git a/hw/kdrive/vxworks/vxmouse.c b/hw/kdrive/vxworks/vxmouse.c deleted file mode 100644 index 8192d7e5a..000000000 --- a/hw/kdrive/vxworks/vxmouse.c +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright © 1999 Network Computing Devices, Inc. All rights reserved. - * - * Author: Keith Packard - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#define NEED_EVENTS -#include -#include -#include "inputstr.h" -#include "scrnintstr.h" -#include "kdrive.h" -#include "Xpoll.h" -#include -#include - -static unsigned long mouseState; - -#define BUTTON1 0x01 -#define BUTTON2 0x02 -#define BUTTON3 0x04 - -#include - -static int mouseFd = -1; - -static eventqueue *eventQueue; - -void -VxMouseRead (int mousePort) -{ - Event ev; - int dx, dy; - unsigned long flags; - unsigned long mask; - int n; - - while (eventQueue->head != eventQueue->tail) - { - ev = *eventQueue->head; - if (eventQueue->head >= &eventQueue->events[eventQueue->size-1]) - eventQueue->head = &eventQueue->events[0]; - else - eventQueue->head++; - switch (ev.e_type) { - case E_BUTTON: - switch (ev.e_device) { - case E_MOUSE: - switch (ev.e_key) { - case BUTTON1: - mask = KD_BUTTON_1; - break; - case BUTTON2: - mask = KD_BUTTON_2; - break; - case BUTTON3: - mask = KD_BUTTON_3; - break; - default: - mask = 0; - break; - } - if (ev.e_direction == E_KBUP) - mouseState &= ~mask; - else - mouseState |= mask; - KdEnqueueMouseEvent (mouseState | KD_MOUSE_DELTA, 0, 0); - break; - case E_DKB: - KdEnqueueKeyboardEvent (ev.e_key, ev.e_direction == E_KBUP); - break; - } - break; - case E_MMOTION: - KdEnqueueMouseEvent (mouseState | KD_MOUSE_DELTA, - ev.e_x, ev.e_y); - break; - } - } -} - -int -VxMouseInit (void) -{ - int mousePort; - unsigned long ev_size; - - mouseState = 0; - mousePort = open ("/dev/xdev", O_RDONLY, 0); - if (mousePort < 0) - ErrorF ("event port open failure %d\n", errno); - mouseFd = open ("/dev/mouse", O_RDONLY, 0); - if (mouseFd < 0) - ErrorF ("mouse open failure %d\n", errno); - if (eventQueue == 0) - { - ioctl (mousePort, EVENT_QUEUE_SMSIZE, &ev_size); - eventQueue = (eventqueue *) smem_get ("event", ev_size, (SM_READ|SM_WRITE)); - } - return mousePort; -} - -void -VxMouseFini (int mousePort) -{ - if (mousePort >= 0) - close (mousePort); - if (mouseFd >= 0) - { - close (mouseFd); - mouseFd = -1; - } -} - -KdMouseFuncs VxWorksMouseFuncs = { - VxMouseInit, - VxMouseRead, - VxMouseFini -}; diff --git a/hw/kdrive/vxworks/vxworks.c b/hw/kdrive/vxworks/vxworks.c deleted file mode 100644 index c9e2be7cc..000000000 --- a/hw/kdrive/vxworks/vxworks.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright © 1999 Network Computing Devices, Inc. All rights reserved. - * - * Author: Keith Packard - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "kdrive.h" -#include - -Bool -VxWorksSpecialKey (KeySym sym) -{ - switch (sym) { - case XK_Sys_Req: - download(1, "setup", 0); - return TRUE; - case XK_Break: - download(1, "launcher", 0); - return TRUE; - } - return FALSE; -} - -void -KdOsAddInputDrivers (void) -{ - KdAddPointerDriver(&VxWorksMouseDriver); - KdAddPointerDriver(&VxWorksKeyboardDriver); -} - -KdOsFuncs VxWorksFuncs = { - .SpecialKey = VxWorksSpecialKey, -}; - -void -OsVendorInit (void) -{ - KdOsInit (&VxWorksFuncs); -} From f52f6c5c7efc281f9ac204fbaa4f71383df7463d Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 5 May 2008 14:37:07 -0400 Subject: [PATCH 529/634] Fix hal shutdown crash. Removing the device invalidates its ->next pointer. Copy it aside before destroying the device. --- config/hal.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/config/hal.c b/config/hal.c index e197cb1b4..1d62a1de1 100644 --- a/config/hal.c +++ b/config/hal.c @@ -74,7 +74,7 @@ remove_device(DeviceIntPtr dev) static void device_removed(LibHalContext *ctx, const char *udi) { - DeviceIntPtr dev; + DeviceIntPtr dev, next; char *value; value = xalloc(strlen(udi) + 5); /* "hal:" + NULL */ @@ -82,11 +82,13 @@ device_removed(LibHalContext *ctx, const char *udi) return; sprintf(value, "hal:%s", udi); - for (dev = inputInfo.devices; dev; dev = dev->next) { + for (dev = inputInfo.devices; dev; dev = next) { + next = dev->next; if (dev->config_info && strcmp(dev->config_info, value) == 0) remove_device(dev); } - for (dev = inputInfo.off_devices; dev; dev = dev->next) { + for (dev = inputInfo.off_devices; dev; dev = next) { + next = dev->next; if (dev->config_info && strcmp(dev->config_info, value) == 0) remove_device(dev); } From a4bbe1c8bca08f3df5ff7e50444af6aef7ec8b25 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 16 May 2008 10:25:12 -0400 Subject: [PATCH 530/634] Re-add sync range inference from legacy setup to RANDR 1.2. --- hw/xfree86/modes/xf86Crtc.c | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 8c2b24786..402336fe9 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -1300,6 +1300,50 @@ preferredMode(ScrnInfoPtr pScrn, xf86OutputPtr output) return preferred_mode; } +static void +GuessRangeFromModes(MonPtr mon, DisplayModePtr mode) +{ + if (!mon || !mode) + return; + + mon->nHsync = 1; + mon->hsync[0].lo = 1024.0; + mon->hsync[0].hi = 0.0; + + mon->nVrefresh = 1; + mon->vrefresh[0].lo = 1024.0; + mon->vrefresh[0].hi = 0.0; + + while (mode) { + if (!mode->HSync) + mode->HSync = ((float) mode->Clock ) / ((float) mode->HTotal); + + if (!mode->VRefresh) + mode->VRefresh = (1000.0 * ((float) mode->Clock)) / + ((float) (mode->HTotal * mode->VTotal)); + + if (mode->HSync < mon->hsync[0].lo) + mon->hsync[0].lo = mode->HSync; + + if (mode->HSync > mon->hsync[0].hi) + mon->hsync[0].hi = mode->HSync; + + if (mode->VRefresh < mon->vrefresh[0].lo) + mon->vrefresh[0].lo = mode->VRefresh; + + if (mode->VRefresh > mon->vrefresh[0].hi) + mon->vrefresh[0].hi = mode->VRefresh; + + mode = mode->next; + } + + /* stretch out the bottom to fit 640x480@60 */ + if (mon->hsync[0].lo > 31.0) + mon->hsync[0].lo = 31.0; + if (mon->vrefresh[0].lo > 58.0) + mon->vrefresh[0].lo = 58.0; +} + _X_EXPORT void xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) { @@ -1417,6 +1461,10 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) OPTUNITS_KHZ, &clock)) max_clock = (int) clock; + /* If we still don't have a sync range, guess wildly */ + if (!mon_rec.nHsync || !mon_rec.nVrefresh) + GuessRangeFromModes(&mon_rec, output_modes); + /* * These limits will end up setting a 1024x768@60Hz mode by default, * which seems like a fairly good mode to use when nothing else is From 96111c154713600dd534dd82104ac18b91466202 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 16 May 2008 10:31:58 -0400 Subject: [PATCH 531/634] Redo RANDR compatibility output selection. Old logic was just the first one that happened to have an associated CRTC. The new logic tries to find one that's definitely connected, has probed modes, and has the largest candidate mode. --- hw/xfree86/modes/xf86Crtc.c | 132 ++++++++++++++++++++++++++---------- 1 file changed, 96 insertions(+), 36 deletions(-) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 402336fe9..1b6bb9fea 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -1593,7 +1593,98 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) _X_EXPORT void xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr scrn, int *x, int *y); -_X_EXPORT void +static DisplayModePtr +biggestMode(DisplayModePtr a, DisplayModePtr b) +{ + int A, B; + + if (!a) + return b; + if (!b) + return a; + + A = a->HDisplay * a->VDisplay; + B = b->HDisplay * b->VDisplay; + + if (A > B) + return a; + + return b; +} + +static xf86OutputPtr +SetCompatOutput(xf86CrtcConfigPtr config) +{ + xf86OutputPtr output = NULL, test = NULL; + DisplayModePtr maxmode = NULL, testmode, mode; + int o, compat = -1, count, mincount = 0; + + /* Look for one that's definitely connected */ + for (o = 0; o < config->num_output; o++) + { + test = config->output[o]; + if (!test->crtc) + continue; + if (test->status != XF86OutputStatusConnected) + continue; + if (!test->probed_modes) + continue; + + testmode = mode = test->probed_modes; + for (count = 0; mode; mode = mode->next, count++) + testmode = biggestMode(testmode, mode); + + if (!output) { + output = test; + compat = o; + maxmode = testmode; + mincount = count; + } else if (maxmode == biggestMode(maxmode, testmode)) { + output = test; + compat = o; + maxmode = testmode; + mincount = count; + } else if ((maxmode->HDisplay == testmode->HDisplay) && + (maxmode->VDisplay == testmode->VDisplay) && + count <= mincount) { + output = test; + compat = o; + maxmode = testmode; + mincount = count; + } + } + + /* If we didn't find one, take anything we can get */ + if (!output) + { + for (o = 0; o < config->num_output; o++) + { + test = config->output[o]; + if (!test->crtc) + continue; + if (!test->probed_modes) + continue; + + if (!output) { + output = test; + compat = o; + } else if (test->probed_modes->HDisplay < output->probed_modes->HDisplay) { + output = test; + compat = o; + } + } + } + + if (compat >= 0) { + config->compat_output = compat; + } else { + /* Don't change the compat output when no valid outputs found */ + output = config->output[config->compat_output]; + } + + return output; +} + xf86SetScrnInfoModes (ScrnInfoPtr scrn) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); @@ -1601,23 +1692,11 @@ xf86SetScrnInfoModes (ScrnInfoPtr scrn) xf86CrtcPtr crtc; DisplayModePtr last, mode; - output = config->output[config->compat_output]; - if (!output->crtc) - { - int o; + output = SetCompatOutput(config); + + if (!output) + return; /* punt */ - output = NULL; - for (o = 0; o < config->num_output; o++) - if (config->output[o]->crtc) - { - config->compat_output = o; - output = config->output[o]; - break; - } - /* no outputs are active, punt and leave things as they are */ - if (!output) - return; - } crtc = output->crtc; /* Clear any existing modes from scrn->modes */ @@ -1782,25 +1861,6 @@ bestModeForAspect(xf86CrtcConfigPtr config, Bool *enabled, float aspect) return match; } -static DisplayModePtr -biggestMode(DisplayModePtr a, DisplayModePtr b) -{ - int A, B; - - if (!a) - return b; - if (!b) - return a; - - A = a->HDisplay * a->VDisplay; - B = b->HDisplay * b->VDisplay; - - if (A > B) - return a; - - return b; -} - static Bool xf86TargetAspect(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, DisplayModePtr *modes, Bool *enabled, From 459f34b089aca4f4eee9752600c3a9e4f4e343ab Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 16 May 2008 10:48:00 -0400 Subject: [PATCH 532/634] Fix initial mode selection even harder. The first guess used to be "is the preferred mode for one output the preferred mode on all outputs". Instead, do "find the largest mode that's preferred for at least one output and available on all outputs". --- hw/xfree86/modes/xf86Crtc.c | 79 +++++++++++++++++++++++-------------- 1 file changed, 50 insertions(+), 29 deletions(-) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 1b6bb9fea..1a49cb532 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -1760,46 +1760,65 @@ nextEnabledOutput(xf86CrtcConfigPtr config, Bool *enabled, int *index) } static Bool -xf86TargetExact(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, - DisplayModePtr *modes, Bool *enabled, - int width, int height) +xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, + DisplayModePtr *modes, Bool *enabled, + int width, int height) { - int o; - int pref_width = 0, pref_height = 0; - DisplayModePtr *preferred; + int o, p; + int max_pref_width = 0, max_pref_height = 0; + DisplayModePtr *preferred, *preferred_match; Bool ret = FALSE; preferred = xnfcalloc(config->num_output, sizeof(DisplayModePtr)); + preferred_match = xnfcalloc(config->num_output, sizeof(DisplayModePtr)); - /* Find all the preferred modes; fail if any outputs lack them */ - for (o = -1; nextEnabledOutput(config, enabled, &o); ) { - preferred[o] = - xf86OutputHasPreferredMode(config->output[o], width, height); + /* Check if the preferred mode is available on all outputs */ + for (p = -1; nextEnabledOutput(config, enabled, &p); ) { + Rotation r = config->output[p]->initial_rotation; + DisplayModePtr mode; + if ((preferred[p] = xf86OutputHasPreferredMode(config->output[p], + width, height))) { + int pref_width = xf86ModeWidth(preferred[p], r); + int pref_height = xf86ModeHeight(preferred[p], r); + Bool all_match = TRUE; - if (!preferred[o]) - goto out; - } + for (o = -1; nextEnabledOutput(config, enabled, &o); ) { + Bool match = FALSE; + xf86OutputPtr output = config->output[o]; + if (o == p) + continue; - /* check that they're all the same size */ - for (o = -1; nextEnabledOutput(config, enabled, &o); ) { - Rotation r = config->output[o]->initial_rotation; - if (!pref_width) { - pref_width = xf86ModeWidth(preferred[o], r); - pref_height = xf86ModeHeight(preferred[o], r); - } else { - if (pref_width != xf86ModeWidth(preferred[o], r)) - goto out; - if (pref_height != xf86ModeHeight(preferred[o], r)) - goto out; + for (mode = output->probed_modes; mode; mode = mode->next) { + Rotation r = output->initial_rotation; + if (xf86ModeWidth(mode, r) == pref_width && + xf86ModeHeight(mode, r) == pref_height) { + preferred[o] = mode; + match = TRUE; + } + } + + all_match &= match; + } + + if (all_match && + (pref_width*pref_height > max_pref_width*max_pref_height)) { + for (o = -1; nextEnabledOutput(config, enabled, &o); ) + preferred_match[o] = preferred[o]; + max_pref_width = pref_width; + max_pref_height = pref_height; + ret = TRUE; + } } } - /* oh good, they match. stash the selected modes and return. */ - memcpy(modes, preferred, config->num_output * sizeof(DisplayModePtr)); - ret = TRUE; + if (ret) { + /* oh good, there is a match. stash the selected modes and return. */ + memcpy(modes, preferred_match, + config->num_output * sizeof(DisplayModePtr)); + } -out: xfree(preferred); + xfree(preferred_match); return ret; } @@ -2025,7 +2044,7 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) if (xf86TargetUserpref(scrn, config, modes, enabled, width, height)) xf86DrvMsg(i, X_INFO, "Using user preference for initial modes\n"); - else if (xf86TargetExact(scrn, config, modes, enabled, width, height)) + else if (xf86TargetPreferred(scrn, config, modes, enabled, width, height)) xf86DrvMsg(i, X_INFO, "Using exact sizes for initial modes\n"); else if (xf86TargetAspect(scrn, config, modes, enabled, width, height)) xf86DrvMsg(i, X_INFO, "Using fuzzy aspect match for initial modes\n"); @@ -2097,6 +2116,8 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) crtc->x = output->initial_x; crtc->y = output->initial_y; output->crtc = crtc; + } else { + output->crtc = NULL; } } From 14726b776d6cebb7d864b6ffa7554e1ce5637d5c Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 16 May 2008 10:51:32 -0400 Subject: [PATCH 533/634] xf86SetDesiredModes(): Skip disabled CRTCs first thing. --- hw/xfree86/modes/xf86Crtc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 1a49cb532..58c3512f8 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -2244,6 +2244,10 @@ xf86SetDesiredModes (ScrnInfoPtr scrn) xf86OutputPtr output = NULL; int o; + /* Skip disabled CRTCs */ + if (!crtc->enabled) + continue; + if (config->output[config->compat_output]->crtc == crtc) output = config->output[config->compat_output]; else @@ -2255,9 +2259,7 @@ xf86SetDesiredModes (ScrnInfoPtr scrn) break; } } - /* - * Skip disabled crtcs - */ + /* paranoia */ if (!output) continue; From aad1c37b0951eae216ac323c5d8bfc6fbcf096bd Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 16 May 2008 10:52:41 -0400 Subject: [PATCH 534/634] RANDR 1.1 compat: remove senseless comparison against the virtual size. --- hw/xfree86/modes/xf86RandR12.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c index 4767f2671..6c4ab4317 100644 --- a/hw/xfree86/modes/xf86RandR12.c +++ b/hw/xfree86/modes/xf86RandR12.c @@ -129,9 +129,7 @@ xf86RandR12GetInfo (ScreenPtr pScreen, Rotation *rotations) return FALSE; RRRegisterRate (pScreen, pSize, refresh); - if (xf86ModesEqual(mode, scrp->currentMode) && - mode->HDisplay == scrp->virtualX && - mode->VDisplay == scrp->virtualY) + if (xf86ModesEqual(mode, scrp->currentMode)) { RRSetCurrentConfig (pScreen, randrp->rotation, refresh, pSize); } From 895d4e274d2b4638f0e6838dfee0e543311dba34 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sat, 17 May 2008 13:05:58 +0200 Subject: [PATCH 535/634] BSD's also have /dev/urandom. --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure.ac b/configure.ac index 403ce8c89..311f5c5aa 100644 --- a/configure.ac +++ b/configure.ac @@ -179,6 +179,8 @@ AC_CHECK_FUNC([dlopen], [], case $host_os in linux*|darwin*) AC_DEFINE(HAVE_URANDOM, 1, [Has /dev/urandom]) ;; + freebsd*|netbsd*|openbsd*|dragonfly*) + AC_DEFINE(HAVE_URANDOM, 1, [Has /dev/urandom]) ;; solaris*) # Solaris 8 with patches, or Solaris 9 or later have /dev/urandom if test -r /dev/urandom ; then From 93c082a060bfa8d2a204c0c57ec3507a8edea087 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sat, 17 May 2008 13:14:31 +0200 Subject: [PATCH 536/634] OpenBSD doesn't define __x86_64__, simplify tests. Seeing as this code seems to be specific to OpenBSD I don't think __x86_64__ should have been added there at all. It appears to have been added wherever __amd64__ existed before which is wrong. I think that part of the commit should be reverted but also all four of the checks should be __OpenBSD__ && __amd64__ instead of two one direction and two flipped. --- hw/xfree86/os-support/bsd/i386_video.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/os-support/bsd/i386_video.c b/hw/xfree86/os-support/bsd/i386_video.c index e2f6420d8..505659e5a 100644 --- a/hw/xfree86/os-support/bsd/i386_video.c +++ b/hw/xfree86/os-support/bsd/i386_video.c @@ -55,7 +55,7 @@ #endif #endif -#if defined(__OpenBSD__) && (defined(__amd64__) || defined(__x86_64__)) +#if defined(__OpenBSD__) && defined(__amd64__) #include #include #endif @@ -108,7 +108,7 @@ static pointer NetBSDsetWC(int, unsigned long, unsigned long, Bool, MessageType); static void NetBSDundoWC(int, pointer); #endif -#if (defined(__amd64__) || defined(__x86_64__)) && defined(__OpenBSD__) +#if defined(__OpenBSD__) && defined(__amd64__) static pointer amd64setWC(int, unsigned long, unsigned long, Bool, MessageType); static void amd64undoWC(int, pointer); @@ -229,7 +229,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) pVidMem->setWC = NetBSDsetWC; pVidMem->undoWC = NetBSDundoWC; #endif -#if (defined(__amd64__) || defined(__x86_64__)) && defined(__OpenBSD__) +#if defined(__OpenBSD__) && defined(__amd64__) pVidMem->setWC = amd64setWC; pVidMem->undoWC = amd64undoWC; #endif @@ -953,7 +953,7 @@ NetBSDundoWC(int screenNum, pointer list) } #endif -#if defined(__OpenBSD__) && (defined(__amd64__) || defined(__x86_64__)) +#if defined(__OpenBSD__) && defined(__amd64__) static pointer amd64setWC(int screenNum, unsigned long base, unsigned long size, Bool enable, MessageType from) From adc62f62b9f08aa6633718989ab61b61e3c1e8e2 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 14 May 2008 01:33:43 -0700 Subject: [PATCH 537/634] Xquartz: Xquartz stub now can send Mach IPC to start the server. (cherry picked from commit 55a3bca8ea42f8677897f94bf0a429bdc08c6696) --- hw/xquartz/mach-startup/Makefile.am | 1 + hw/xquartz/mach-startup/bundle-main.c | 5 ++++- hw/xquartz/mach-startup/stub.c | 9 +++++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am index ee2cbfe9e..d81caa95b 100644 --- a/hw/xquartz/mach-startup/Makefile.am +++ b/hw/xquartz/mach-startup/Makefile.am @@ -1,6 +1,7 @@ AM_CPPFLAGS = \ -DBUILD_DATE=\"$(BUILD_DATE)\" \ -DXSERVER_VERSION=\"$(VERSION)\" +# -DNEW_LAUNCH_METHOD -DNEW_LAUNCH_METHOD_2 x11appdir = $(APPLE_APPLICATIONS_DIR)/X11.app/Contents/MacOS x11app_PROGRAMS = X11 diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c index cd64e425c..dd75f0267 100644 --- a/hw/xquartz/mach-startup/bundle-main.c +++ b/hw/xquartz/mach-startup/bundle-main.c @@ -165,10 +165,11 @@ int main(int argc, char **argv, char **envp) { mach_port_t mp; kern_return_t kr; + fprintf(stderr, "X11.app: main(): argc=%d\n", argc); for(i=1; i < argc; i++) { + fprintf(stderr, "\targv[%u] = %s\n", (unsigned)i, argv[i]); if(!strcmp(argv[i], "--listenonly")) { listenOnly = TRUE; - break; } } @@ -221,10 +222,12 @@ int main(int argc, char **argv, char **envp) { const char *s; size_t i; +#ifndef NEW_LAUNCH_METHOD fprintf(stderr, "X11.app: main(): argc=%d\n", argc); for(i=0; i < argc; i++) { fprintf(stderr, "\targv[%u] = %s\n", (unsigned)i, argv[i]); } +#endif /* Take care of the case where we're called like a normal DDX */ if(argc > 1 && argv[1][0] == ':') { diff --git a/hw/xquartz/mach-startup/stub.c b/hw/xquartz/mach-startup/stub.c index fae97201f..c53ed5364 100644 --- a/hw/xquartz/mach-startup/stub.c +++ b/hw/xquartz/mach-startup/stub.c @@ -115,6 +115,7 @@ int main(int argc, char **argv, char **envp) { mach_port_t mp; string_array_t newenvp; string_array_t newargv; + size_t i; #endif if(argc == 2 && !strcmp(argv[1], "-version")) { @@ -127,7 +128,6 @@ int main(int argc, char **argv, char **envp) { #ifdef NEW_LAUNCH_METHOD_2 kr = bootstrap_look_up(bootstrap_port, SERVER_BOOTSTRAP_NAME, &mp); if(kr != KERN_SUCCESS) { - int i; set_x11_path(); /* This forking is ugly and will be cleaned up later */ @@ -142,19 +142,20 @@ int main(int argc, char **argv, char **envp) { _argv[0] = x11_path; _argv[1] = "--listenonly"; _argv[2] = NULL; + fprintf(stderr, "Starting X server: %s --listenonly\n", x11_path); return execvp(x11_path, _argv); } /* Try connecting for 10 seconds */ - for(i=0; i < 20; i++) { - usleep(500); + for(i=0; i < 40; i++) { + usleep(250000); kr = bootstrap_look_up(bootstrap_port, SERVER_BOOTSTRAP_NAME, &mp); if(kr == KERN_SUCCESS) break; } if(kr != KERN_SUCCESS) { - fprintf(stderr, "bootstrap_look_up(): %s\n", bootstrap_strerror(kr)); + fprintf(stderr, "bootstrap_look_up(): Timed out: %s\n", bootstrap_strerror(kr)); return EXIT_FAILURE; } } From 1d09deaa6e5a75420ea4f24f6b5533f0ebc3ba28 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 15 May 2008 05:49:43 -0700 Subject: [PATCH 538/634] XQuartz: Made DarwinSendDDXEvent a little more robust to context switching diring server init. (cherry picked from commit 5626b0949b1a6bdd2fa3ec2ef53a688084349b87) --- hw/xquartz/X11Application.m | 4 +--- hw/xquartz/darwinEvents.c | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m index 9367c9fa1..50a30fbf5 100644 --- a/hw/xquartz/X11Application.m +++ b/hw/xquartz/X11Application.m @@ -59,11 +59,9 @@ int X11EnableKeyEquivalents = TRUE; int quartzHasRoot = FALSE, quartzEnableRootless = TRUE; -extern int darwinFakeButtons, input_check_flag; +extern int darwinFakeButtons; extern Bool enable_stereo; -extern xEvent *darwinEvents; - X11Application *X11App; #define ALL_KEY_MASKS (NSShiftKeyMask | NSControlKeyMask | NSAlternateKeyMask | NSCommandKeyMask) diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c index 154709448..7376c5796 100644 --- a/hw/xquartz/darwinEvents.c +++ b/hw/xquartz/darwinEvents.c @@ -76,12 +76,10 @@ in this Software without prior written authorization from The Open Group. /* FIXME: Abstract this better */ void QuartzModeEQInit(void); -int input_check_zero, input_check_flag; - static int old_flags = 0; // last known modifier state -xEvent *darwinEvents = NULL; -pthread_mutex_t darwinEvents_mutex = PTHREAD_MUTEX_INITIALIZER; +static xEvent *darwinEvents = NULL; +static pthread_mutex_t darwinEvents_mutex = PTHREAD_MUTEX_INITIALIZER; static inline void darwinEvents_lock(void) { int err; @@ -307,11 +305,6 @@ static void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, in } Bool DarwinEQInit(void) { - if (!darwinEvents) - darwinEvents = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum()); - if (!darwinEvents) - FatalError("Couldn't allocate event buffer\n"); - mieqInit(); mieqSetHandler(kXquartzReloadKeymap, DarwinKeyboardReloadHandler); mieqSetHandler(kXquartzActivate, DarwinEventHandler); @@ -328,6 +321,11 @@ Bool DarwinEQInit(void) { mieqSetHandler(kXquartzDisplayChanged, QuartzDisplayChangedHandler); QuartzModeEQInit(); + + if (!darwinEvents) + darwinEvents = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum()); + if (!darwinEvents) + FatalError("Couldn't allocate event buffer\n"); return TRUE; } @@ -354,7 +352,6 @@ void ProcessInputEvents(void) { Dispatch() event loop to check out event queue */ static void DarwinPokeEQ(void) { char nullbyte=0; - input_check_flag++; // oh, i ... er ... christ. write(darwinEventWriteFD, &nullbyte, 1); } @@ -567,8 +564,13 @@ void DarwinSendDDXEvent(int type, int argc, ...) { va_end (args); } - darwinEvents_lock(); + /* If we're called from something other than the X server thread, we need + * to wait for the X server to setup darwinEvents. + */ + while(darwinEvents == NULL) { + usleep(250000); + } + mieqEnqueue(darwinPointer, &xe); DarwinPokeEQ(); - darwinEvents_unlock(); } From 01612fe612aa27262fc3c8167f52e0376941f1ef Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 15 May 2008 07:08:21 -0700 Subject: [PATCH 539/634] XQuartz: Disable xkb since it doesn't work after getting xkeyboard-config installed Need to setup configs for the quartz keyboard (cherry picked from commit c28fecc621b1803a4d4536afbc724d141de9e6ee) --- hw/xquartz/quartzKeyboard.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c index 698f39a22..cc0c88959 100644 --- a/hw/xquartz/quartzKeyboard.c +++ b/hw/xquartz/quartzKeyboard.c @@ -43,7 +43,10 @@ // Define this to get a diagnostic output to stderr which is helpful // in determining how the X server is interpreting the Darwin keymap. #define DUMP_DARWIN_KEYMAP -#define XQUARTZ_USE_XKB + +// This breaks when we actually install xkeyboard-config files to start using it +// We need to serup keymaps in the configs or something... +// #define XQUARTZ_USE_XKB #define HACK_MISSING 1 #define HACK_KEYPAD 1 From 2408303d79297385063cae557195bd5fd3698478 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 17 May 2008 14:56:53 -0700 Subject: [PATCH 540/634] XQuartz: Added functionality to add a file descriptor to the connection list after the server is already running. (cherry picked from commit 543c2cd68d1ffef65d4644b860faad7191c6b9da) --- hw/xquartz/X11Application.m | 25 +++++++-- hw/xquartz/darwinEvents.c | 14 ++++- hw/xquartz/darwinEvents.h | 1 + hw/xquartz/mach-startup/Makefile.am | 7 ++- hw/xquartz/mach-startup/launchd_fd.c | 82 ++++++++++++++++++++++++++++ hw/xquartz/mach-startup/launchd_fd.h | 36 ++++++++++++ hw/xquartz/quartzKeyboard.c | 2 - include/os.h | 4 ++ os/connection.c | 64 ++++++++++++++++++++++ 9 files changed, 224 insertions(+), 11 deletions(-) create mode 100644 hw/xquartz/mach-startup/launchd_fd.c create mode 100644 hw/xquartz/mach-startup/launchd_fd.h diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m index 50a30fbf5..1a7d55a8c 100644 --- a/hw/xquartz/X11Application.m +++ b/hw/xquartz/X11Application.m @@ -38,12 +38,16 @@ #import "X11Application.h" -# include "darwin.h" -# include "darwinEvents.h" -# include "quartz.h" -# define _APPLEWM_SERVER_ -# include "X11/extensions/applewm.h" -# include "micmap.h" +#include "darwin.h" +#include "darwinEvents.h" +#include "quartz.h" +#define _APPLEWM_SERVER_ +#include "X11/extensions/applewm.h" +#include "micmap.h" + +#include "os.h" +#include "mach-startup/launchd_fd.h" + #include #include @@ -783,6 +787,7 @@ environment?", @"Startup xinitrc dialog"); void X11ApplicationMain (int argc, char **argv, char **envp) { NSAutoreleasePool *pool; + int launchd_fd; #ifdef DEBUG while (access ("/tmp/x11-block", F_OK) == 0) sleep (1); @@ -810,6 +815,14 @@ void X11ApplicationMain (int argc, char **argv, char **envp) { /* Tell the server thread that it can proceed */ QuartzInitServer(argc, argv, envp); + +#ifndef NEW_LAUNCH_METHOD + /* Start listening on the launchd fd */ + launchd_fd = launchd_display_fd(); + if(launchd_fd != -1) { + DarwinSendDDXEvent(kXquartzListenOnOpenFD, 1, launchd_fd); + } +#endif [NSApp run]; /* not reached */ diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c index 7376c5796..06c5df048 100644 --- a/hw/xquartz/darwinEvents.c +++ b/hw/xquartz/darwinEvents.c @@ -45,6 +45,7 @@ in this Software without prior written authorization from The Open Group. #include "mi.h" #include "scrnintstr.h" #include "mipointer.h" +#include "os.h" #include "darwin.h" #include "quartz.h" @@ -214,6 +215,16 @@ static void DarwinSimulateMouseClick( DarwinUpdateModifiers(KeyPress, modifierMask); } +static void kXquartzListenOnOpenFDHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int nevents) { + size_t i; + TA_SERVER(); + + for (i=0; i +#include +#include + +#include "launchd_fd.h" + +int launchd_display_fd() { + launch_data_t sockets_dict, checkin_request, checkin_response; + launch_data_t listening_fd_array, listening_fd; + + /* Get launchd fd */ + if ((checkin_request = launch_data_new_string(LAUNCH_KEY_CHECKIN)) == NULL) { + fprintf(stderr,"launch_data_new_string(\"" LAUNCH_KEY_CHECKIN "\") Unable to create string.\n"); + return ERROR_FD; + } + + if ((checkin_response = launch_msg(checkin_request)) == NULL) { + fprintf(stderr,"launch_msg(\"" LAUNCH_KEY_CHECKIN "\") IPC failure: %s\n",strerror(errno)); + return ERROR_FD; + } + + if (LAUNCH_DATA_ERRNO == launch_data_get_type(checkin_response)) { + // ignore EACCES, which is common if we weren't started by launchd + if (launch_data_get_errno(checkin_response) != EACCES) + fprintf(stderr,"launchd check-in failed: %s\n", strerror(launch_data_get_errno(checkin_response))); + return ERROR_FD; + } + + sockets_dict = launch_data_dict_lookup(checkin_response, LAUNCH_JOBKEY_SOCKETS); + if (NULL == sockets_dict) { + fprintf(stderr,"launchd check-in: no sockets found to answer requests on!\n"); + return ERROR_FD; + } + + if (launch_data_dict_get_count(sockets_dict) > 1) { + fprintf(stderr,"launchd check-in: some sockets will be ignored!\n"); + return ERROR_FD; + } + + listening_fd_array = launch_data_dict_lookup(sockets_dict, ":0"); + if (NULL == listening_fd_array) { + fprintf(stderr,"launchd check-in: No known sockets found to answer requests on!\n"); + return ERROR_FD; + } + + if (launch_data_array_get_count(listening_fd_array)!=1) { + fprintf(stderr,"launchd check-in: Expected 1 socket from launchd, got %u)\n", + (unsigned)launch_data_array_get_count(listening_fd_array)); + return ERROR_FD; + } + + listening_fd=launch_data_array_get_index(listening_fd_array, 0); + return launch_data_get_fd(listening_fd); +} diff --git a/hw/xquartz/mach-startup/launchd_fd.h b/hw/xquartz/mach-startup/launchd_fd.h new file mode 100644 index 000000000..5083fae21 --- /dev/null +++ b/hw/xquartz/mach-startup/launchd_fd.h @@ -0,0 +1,36 @@ +/* Copyright (c) 2008 Apple Inc. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation files + * (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + * HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name(s) of the above + * copyright holders shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization. + */ + +#ifndef _XQUARTZ_LAUNCHD_FD_H_ +#define _XQUARTZ_LAUNCHD_FD_H_ + +#define ERROR_FD -1 + +int launchd_display_fd(void); + +#endif /* _XQUARTZ_LAUNCHD_FD_H_ */ \ No newline at end of file diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c index cc0c88959..b9d45cb21 100644 --- a/hw/xquartz/quartzKeyboard.c +++ b/hw/xquartz/quartzKeyboard.c @@ -904,7 +904,6 @@ void DarwinKeyboardInit(DeviceIntPtr pDev) { QuartzXkbUpdate(pDev); #else -#error FAIL assert( InitKeyboardDeviceStruct( (DevicePtr)pDev, &keySyms, keyInfo.modMap, QuartzBell, DarwinChangeKeyboardControl )); @@ -921,7 +920,6 @@ void DarwinKeyboardReloadHandler(int screenNum, xEventPtr xe, DeviceIntPtr pDev, #ifdef XQUARTZ_USE_XKB QuartzXkbUpdate(pDev); #else -#error FAIL if (pDev->key) { if (pDev->key->curKeySyms.map) xfree(pDev->key->curKeySyms.map); if (pDev->key->modifierKeyMap) xfree(pDev->key->modifierKeyMap); diff --git a/include/os.h b/include/os.h index c0f04c6af..fd3407718 100644 --- a/include/os.h +++ b/include/os.h @@ -166,6 +166,10 @@ extern void MakeClientGrabImpervious(ClientPtr /*client*/); extern void MakeClientGrabPervious(ClientPtr /*client*/); +#ifdef XQUARTZ +extern void ListenOnOpenFD(int /* fd */); +#endif + extern void AvailableClientInput(ClientPtr /* client */); extern CARD32 GetTimeInMillis(void); diff --git a/os/connection.c b/os/connection.c index 396593698..a87725782 100644 --- a/os/connection.c +++ b/os/connection.c @@ -1297,3 +1297,67 @@ MakeClientGrabPervious(ClientPtr client) } } +#ifdef XQUARTZ +/* Add a fd (from launchd) to our listeners */ +_X_EXPORT void ListenOnOpenFD(int fd) { + char port[20]; + XtransConnInfo ciptr, *ciptr2, *ciptr3; + int *iptr, *iptr2; + + /* Sigh for inconsistencies. */ + sprintf (port, ":%d", atoi(display)); + + /* Make our XtransConnInfo + * TRANS_SOCKET_LOCAL_INDEX = 5 from Xtrans.c + */ + ciptr = _XSERVTransReopenCOTSServer(5, fd, port); + if(ciptr == NULL) { + fprintf(stderr, "Got NULL while trying to Reopen launchd port.\n"); + return; + } + + /* Allocate space to store it */ + iptr = (int *) realloc(ListenTransFds, (ListenTransCount + 1) * sizeof (int)); + + if(!iptr) { + fprintf(stderr, "Memory allocation error"); + return; + } + + ciptr2 = (XtransConnInfo *) realloc(ListenTransConns, (ListenTransCount + 1) * sizeof (XtransConnInfo)); + if(!ciptr2) { + fprintf(stderr, "Memory allocation error"); + if(iptr != ListenTransFds) + free(ListenTransFds); + return; + } + + if(iptr != ListenTransFds) { + iptr2 = ListenTransFds; + ListenTransFds = iptr; + free(iptr2); + } + + if(ciptr2 != ListenTransConns) { + ciptr3 = ListenTransConns; + ListenTransConns = ciptr2; + free(ciptr3); + } + + /* Store it */ + ListenTransConns[ListenTransCount] = ciptr; + ListenTransFds[ListenTransCount] = fd; + + FD_SET(fd, &WellKnownConnections); + + /* It is always local + if (!_XSERVTransIsLocal(ciptr)) { + // DefineSelf (fd); + } + */ + + /* Increment the count */ + ListenTransCount++; +} + +#endif From 5af5db5033582a84b616d5c50f4288adb0210459 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 17 May 2008 14:51:09 -0700 Subject: [PATCH 541/634] XQuartz: Ok, pass XQUARTZ_USE_XKB since it breaks worse without it... but we have issues when we have the keyboard configs installed... need to figure out what to do there... (cherry picked from commit 301262b07024ad960f22d99a1267fe137f5c3fce) --- hw/xquartz/quartzKeyboard.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c index b9d45cb21..c75cd1d45 100644 --- a/hw/xquartz/quartzKeyboard.c +++ b/hw/xquartz/quartzKeyboard.c @@ -43,10 +43,7 @@ // Define this to get a diagnostic output to stderr which is helpful // in determining how the X server is interpreting the Darwin keymap. #define DUMP_DARWIN_KEYMAP - -// This breaks when we actually install xkeyboard-config files to start using it -// We need to serup keymaps in the configs or something... -// #define XQUARTZ_USE_XKB +#define XQUARTZ_USE_XKB #define HACK_MISSING 1 #define HACK_KEYPAD 1 From 7dca84f3ee7265119fb81d598d7d2f7363e25f1f Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 19 May 2008 11:16:08 +1000 Subject: [PATCH 542/634] cursor: don't dereference NULL pointer is devPrivates not yet set. This fixes a bug on server recycle with ati zaphod. --- hw/xfree86/modes/xf86Cursors.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c index 57cfcb65a..19fe9f5ee 100644 --- a/hw/xfree86/modes/xf86Cursors.c +++ b/hw/xfree86/modes/xf86Cursors.c @@ -613,18 +613,17 @@ xf86_reload_cursors (ScreenPtr screen) if (cursor) { +#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) + void *src = dixLookupPrivate(&cursor->devPrivates, screen); +#else + void *src = cursor->devPriv[screen->myNum]; +#endif #ifdef ARGB_CURSOR if (cursor->bits->argb && cursor_info->LoadCursorARGB) (*cursor_info->LoadCursorARGB) (scrn, cursor); - else + else if (src) #endif - (*cursor_info->LoadCursorImage)(cursor_info->pScrn, -#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) - dixLookupPrivate(&cursor->devPrivates, screen) -#else - cursor->devPriv[screen->myNum] -#endif - ); + (*cursor_info->LoadCursorImage)(cursor_info->pScrn, src); (*cursor_info->SetCursorPosition)(cursor_info->pScrn, x, y); (*cursor_info->ShowCursor)(cursor_info->pScrn); From 82c4075d4ba3bea03341c80b754b0f9d2f62a826 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Mon, 19 May 2008 03:15:11 +0200 Subject: [PATCH 543/634] xfree86: fix initial output positions with Above or LeftOf and rotation The fix in fa19e84714aa84a2f2e817e363d6440349d0b619 was incomplete, as it was still using the wrong output's initial rotation to compute the position. --- hw/xfree86/modes/xf86Crtc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 58c3512f8..9512805af 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -1137,10 +1137,10 @@ xf86InitialOutputPositions (ScrnInfoPtr scrn, DisplayModePtr *modes) output->initial_x += xf86ModeWidth (modes[or], relative->initial_rotation); break; case OPTION_ABOVE: - output->initial_y -= xf86ModeHeight (modes[o], relative->initial_rotation); + output->initial_y -= xf86ModeHeight (modes[o], output->initial_rotation); break; case OPTION_LEFT_OF: - output->initial_x -= xf86ModeWidth (modes[o], relative->initial_rotation); + output->initial_x -= xf86ModeWidth (modes[o], output->initial_rotation); break; default: break; From 4be2104c801340075e030d06d24ceb4d8a6d6549 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 15 May 2008 12:26:32 -0700 Subject: [PATCH 544/634] XQuartz: More work towards Mach-IPC startup... started working on FD passing (cherry picked from commit 27fbfeacfa16d620801ac3492b25c1e50aec8588) --- hw/xquartz/Makefile.am | 1 + hw/xquartz/X11Application.m | 5 +- hw/xquartz/darwinEvents.c | 3 + hw/xquartz/darwinEvents.h | 1 + hw/xquartz/mach-startup/Makefile.am | 14 +- hw/xquartz/mach-startup/bundle-main.c | 250 ++++++++++++++-------- hw/xquartz/mach-startup/mach_startup.defs | 7 +- hw/xquartz/mach-startup/stub.c | 19 +- 8 files changed, 194 insertions(+), 106 deletions(-) diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am index 77d662f97..cc39c9da1 100644 --- a/hw/xquartz/Makefile.am +++ b/hw/xquartz/Makefile.am @@ -8,6 +8,7 @@ AM_CPPFLAGS = \ -DUSE_NEW_CLUT \ -DXFree86Server \ -I$(top_srcdir)/miext/rootless +# -DNEW_LAUNCH_METHOD SUBDIRS = bundle . GL xpr mach-startup doc diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m index 1a7d55a8c..d687c1f5f 100644 --- a/hw/xquartz/X11Application.m +++ b/hw/xquartz/X11Application.m @@ -787,7 +787,6 @@ environment?", @"Startup xinitrc dialog"); void X11ApplicationMain (int argc, char **argv, char **envp) { NSAutoreleasePool *pool; - int launchd_fd; #ifdef DEBUG while (access ("/tmp/x11-block", F_OK) == 0) sleep (1); @@ -818,9 +817,9 @@ void X11ApplicationMain (int argc, char **argv, char **envp) { #ifndef NEW_LAUNCH_METHOD /* Start listening on the launchd fd */ - launchd_fd = launchd_display_fd(); + int launchd_fd = launchd_display_fd(); if(launchd_fd != -1) { - DarwinSendDDXEvent(kXquartzListenOnOpenFD, 1, launchd_fd); + DarwinListenOnOpenFD(launchd_fd); } #endif diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c index 06c5df048..9ecebe421 100644 --- a/hw/xquartz/darwinEvents.c +++ b/hw/xquartz/darwinEvents.c @@ -551,6 +551,9 @@ void DarwinUpdateModKeys(int flags) { old_flags = flags; } +void DarwinListenOnOpenFD(int fd) { + DarwinSendDDXEvent(kXquartzListenOnOpenFD, 1, fd); +} /* * DarwinSendDDXEvent diff --git a/hw/xquartz/darwinEvents.h b/hw/xquartz/darwinEvents.h index 58817fb01..7a1e8ca5d 100644 --- a/hw/xquartz/darwinEvents.h +++ b/hw/xquartz/darwinEvents.h @@ -39,6 +39,7 @@ void DarwinSendKeyboardEvents(int ev_type, int keycode); void DarwinSendScrollEvents(float count_x, float count_y, int pointer_x, int pointer_y, float pressure, float tilt_x, float tilt_y); void DarwinUpdateModKeys(int flags); +void DarwinListenOnOpenFD(int fd); /* * Special ddx events understood by the X server diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am index 3ed1c1ab3..11f6ba607 100644 --- a/hw/xquartz/mach-startup/Makefile.am +++ b/hw/xquartz/mach-startup/Makefile.am @@ -10,9 +10,9 @@ dist_X11_SOURCES = \ bundle-main.c \ launchd_fd.c -nodist_X11_SOURCES = \ - mach_startupServer.c \ - mach_startupUser.c +#nodist_X11_SOURCES = \ +# mach_startupServer.c \ +# mach_startupUser.c X11_LDADD = \ $(top_builddir)/hw/xquartz/libXquartz.la \ @@ -34,11 +34,11 @@ X11_LDFLAGS = \ bin_PROGRAMS = Xquartz dist_Xquartz_SOURCES = \ - stub.c \ - launchd_fd.c + stub.c +# launchd_fd.c -nodist_Xquartz_SOURCES = \ - mach_startupUser.c +#nodist_Xquartz_SOURCES = \ +# mach_startupUser.c Xquartz_LDFLAGS = \ -Wl,-framework,CoreServices diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c index dd75f0267..4ddd82f7b 100644 --- a/hw/xquartz/mach-startup/bundle-main.c +++ b/hw/xquartz/mach-startup/bundle-main.c @@ -28,6 +28,8 @@ promote the sale, use or other dealings in this Software without prior written authorization. */ +#include + #include #include #include @@ -35,10 +37,8 @@ #include #include #include - -#include - -#include +#include +#include #include #include @@ -56,6 +56,11 @@ static char *command_from_prefs(const char *key, const char *default_value); /* This is in quartzStartup.c */ int server_main(int argc, char **argv, char **envp); +static int execute(const char *command); +static char *command_from_prefs(const char *key, const char *default_value); + +#ifdef NEW_LAUNCH_METHOD + struct arg { int argc; char **argv; @@ -69,39 +74,6 @@ union MaxMsgSize { union __ReplyUnion__mach_startup_subsystem rep; }; -kern_return_t do_start_x11_server(mach_port_t port, string_array_t argv, - mach_msg_type_number_t argvCnt, - string_array_t envp, - mach_msg_type_number_t envpCnt) { - /* And now back to char ** */ - char **_argv = alloca((argvCnt + 1) * sizeof(char *)); - char **_envp = alloca((envpCnt + 1) * sizeof(char *)); - size_t i; - - if(!_argv || !_envp) { - return KERN_FAILURE; - } - - for(i=0; i < argvCnt; i++) { - _argv[i] = argv[i]; - } - _argv[argvCnt] = NULL; - - for(i=0; i < envpCnt; i++) { - _envp[i] = envp[i]; - } - _envp[envpCnt] = NULL; - - if(server_main(argvCnt, _argv, _envp) == 0) - return KERN_SUCCESS; - else - return KERN_FAILURE; -} - -kern_return_t do_exit(mach_port_t port, int value) { - exit(value); -} - static mach_port_t checkin_or_register(char *bname) { kern_return_t kr; mach_port_t mp; @@ -147,71 +119,99 @@ static pthread_t create_thread(void *func, void *arg) { return tid; } -/*** Main ***/ -static int execute(const char *command); -static char *command_from_prefs(const char *key, const char *default_value); +/*** $DISPLAY handoff ***/ +static char display_handoff_socket[PATH_MAX + 1]; -#ifdef NEW_LAUNCH_METHOD -static void startup_trigger_thread(void *arg) { - struct arg args = *((struct arg *)arg); - free(arg); - startup_trigger(args.argc, args.argv, args.envp); +kern_return_t do_get_display_handoff_socket(mach_port_t port, string_t filename) { + strlcpy(filename, display_handoff_socket, STRING_T_SIZE); + fprintf(stderr, "Telling him the filename is %s = %s\n", filename, display_handoff_socket); + return KERN_SUCCESS; } -int main(int argc, char **argv, char **envp) { - Bool listen, listenOnly = FALSE; - int i; - mach_msg_size_t mxmsgsz = sizeof(union MaxMsgSize) + MAX_TRAILER_SIZE; - mach_port_t mp; - kern_return_t kr; +/* From darwinEvents.c ... but don't want to pull in all the server cruft */ +void DarwinListenOnOpenFD(int fd); - fprintf(stderr, "X11.app: main(): argc=%d\n", argc); - for(i=1; i < argc; i++) { - fprintf(stderr, "\targv[%u] = %s\n", (unsigned)i, argv[i]); - if(!strcmp(argv[i], "--listenonly")) { - listenOnly = TRUE; +static void accept_fd_handoff(int connectedSocket) { + int fd; + return; + DarwinListenOnOpenFD(fd); +} + +/* This thread loops accepting incoming connections and handing off the file + * descriptor for the new connection to accept_fd_handoff() + */ +static void socket_handoff_thread(void *arg) { + struct sockaddr_un servaddr_un; + struct sockaddr *servaddr; + int handoff_fd; + int servaddr_len; + + /* Wipe ourselves clean */ + memset (&servaddr_un, 0, sizeof (struct sockaddr_un)); + + servaddr_un.sun_family = AF_UNIX; + strcpy(servaddr_un.sun_path, display_handoff_socket); + servaddr = (struct sockaddr *) &servaddr_un; + servaddr_len = sizeof(struct sockaddr_un) - sizeof(servaddr_un.sun_path) + strlen(display_handoff_socket); + + handoff_fd = socket(AF_UNIX, SOCK_STREAM, 0); + if(handoff_fd == 0) { + fprintf(stderr, "Failed to create socket: %s - %s\n", display_handoff_socket, strerror(errno)); + return; + exit(EXIT_FAILURE); + } + + if(bind(handoff_fd, servaddr, servaddr_len) != 0) { + fprintf(stderr, "Failed to bind socket: %s - %s\n", display_handoff_socket, strerror(errno)); + return; + exit(EXIT_FAILURE); + } + + if(listen(handoff_fd, 10) != 0) { + fprintf(stderr, "Failed to listen to socket: %s - %s\n", display_handoff_socket, strerror(errno)); + return; + exit(EXIT_FAILURE); + } + + while(true) { + int connectedSocket = accept(handoff_fd, NULL, NULL); + + if(connectedSocket == -1) { + fprintf(stderr, "Failed to accept incoming connection on socket: %s - %s\n", display_handoff_socket, strerror(errno)); + continue; } + accept_fd_handoff(connectedSocket); } +} - /* TODO: This should be unconditional once we figure out fd passing */ - listen = (argc > 1 && argv[1][0] == ':') || listenOnly; - if(listen) { - mp = checkin_or_register(SERVER_BOOTSTRAP_NAME); +/*** Server Startup ***/ +kern_return_t do_start_x11_server(mach_port_t port, string_array_t argv, + mach_msg_type_number_t argvCnt, + string_array_t envp, + mach_msg_type_number_t envpCnt) { + /* And now back to char ** */ + char **_argv = alloca((argvCnt + 1) * sizeof(char *)); + char **_envp = alloca((envpCnt + 1) * sizeof(char *)); + size_t i; + + if(!_argv || !_envp) { + return KERN_FAILURE; } - - /* Check if we need to do something other than listen, and make another - * thread handle it. - */ - if(!listenOnly) { - struct arg *args = (struct arg*)malloc(sizeof(struct arg)); - if(!args) { - fprintf(stderr, "Memory allocation error.\n"); - return EXIT_FAILURE; - } - - args->argc = argc; - args->argv = argv; - args->envp = envp; - - create_thread(startup_trigger_thread, args); + + for(i=0; i < argvCnt; i++) { + _argv[i] = argv[i]; } - - /* TODO: This should actually fall through rather than be the else - * case once we figure out how to get the stub to pass the - * file descriptor. For now, we only listen if we are explicitly - * told to. - */ - if(listen) { - /* Main event loop */ - kr = mach_msg_server(mach_startup_server, mxmsgsz, mp, 0); - if (kr != KERN_SUCCESS) { - asl_log(NULL, NULL, ASL_LEVEL_ERR, - "org.x.X11(mp): %s\n", mach_error_string(kr)); - return EXIT_FAILURE; - } + _argv[argvCnt] = NULL; + + for(i=0; i < envpCnt; i++) { + _envp[i] = envp[i]; } - - return EXIT_SUCCESS; + _envp[envpCnt] = NULL; + + if(server_main(argvCnt, _argv, _envp) == 0) + return KERN_SUCCESS; + else + return KERN_FAILURE; } int startup_trigger(int argc, char **argv, char **envp) { @@ -305,6 +305,72 @@ int main(int argc, char **argv, char **envp) { return execute(command_from_prefs("startx_script", DEFAULT_STARTX)); } +#ifdef NEW_LAUNCH_METHOD +static void startup_trigger_thread(void *arg) { + struct arg args = *((struct arg *)arg); + free(arg); + startup_trigger(args.argc, args.argv, args.envp); +} + +/*** Main ***/ +int main(int argc, char **argv, char **envp) { + Bool listenOnly = FALSE; + int i; + mach_msg_size_t mxmsgsz = sizeof(union MaxMsgSize) + MAX_TRAILER_SIZE; + mach_port_t mp; + kern_return_t kr; + + fprintf(stderr, "X11.app: main(): argc=%d\n", argc); + for(i=1; i < argc; i++) { + fprintf(stderr, "\targv[%u] = %s\n", (unsigned)i, argv[i]); + if(!strcmp(argv[i], "--listenonly")) { + listenOnly = TRUE; + } + } + + mp = checkin_or_register(SERVER_BOOTSTRAP_NAME); + if(mp == MACH_PORT_NULL) { + fprintf(stderr, "NULL mach service: %s", SERVER_BOOTSTRAP_NAME); + return EXIT_FAILURE; + } + + /* Figure out what our handoff socket will be + * TODO: cleanup on exit. + */ + tmpnam(display_handoff_socket); + create_thread(socket_handoff_thread, NULL); + + fprintf(stderr, "Hi\n"); + + /* Check if we need to do something other than listen, and make another + * thread handle it. + */ + if(!listenOnly) { + struct arg *args = (struct arg*)malloc(sizeof(struct arg)); + if(!args) { + fprintf(stderr, "Memory allocation error.\n"); + return EXIT_FAILURE; + } + + args->argc = argc; + args->argv = argv; + args->envp = envp; + + create_thread(startup_trigger_thread, args); + } + + /* Main event loop */ + fprintf(stderr, "Statrup coming...\n"); + kr = mach_msg_server(mach_startup_server, mxmsgsz, mp, 0); + if (kr != KERN_SUCCESS) { + fprintf(stderr, "org.x.X11(mp): %s\n", mach_error_string(kr)); + return EXIT_FAILURE; + } + + return EXIT_SUCCESS; +} +#endif + static int execute(const char *command) { const char *newargv[7]; const char **s; diff --git a/hw/xquartz/mach-startup/mach_startup.defs b/hw/xquartz/mach-startup/mach_startup.defs index 83b31b7c0..05bdf569f 100644 --- a/hw/xquartz/mach-startup/mach_startup.defs +++ b/hw/xquartz/mach-startup/mach_startup.defs @@ -33,9 +33,14 @@ import "mach_startup_types.h"; subsystem mach_startup 1000; serverprefix do_; -type string_array_t = array[] of c_string[1024]; +type string_t = c_string[1024]; +type string_array_t = array[] of string_t; routine start_x11_server( port : mach_port_t; argv : string_array_t; envp : string_array_t); + +routine get_display_handoff_socket( + port : mach_port_t; + filename : string_t); diff --git a/hw/xquartz/mach-startup/stub.c b/hw/xquartz/mach-startup/stub.c index c53ed5364..5fdbad882 100644 --- a/hw/xquartz/mach-startup/stub.c +++ b/hw/xquartz/mach-startup/stub.c @@ -45,6 +45,8 @@ #include #include "mach_startup.h" +#include "launchd_fd.h" + static char x11_path[PATH_MAX + 1]; static void set_x11_path() { @@ -109,13 +111,15 @@ static void set_x11_path() { #endif int main(int argc, char **argv, char **envp) { -#ifdef NEW_LAUNCH_METHOD_2 +#ifdef NEW_LAUNCH_METHOD int envpc; kern_return_t kr; mach_port_t mp; string_array_t newenvp; string_array_t newargv; size_t i; + int launchd_fd; + string_t handoff_socket; #endif if(argc == 2 && !strcmp(argv[1], "-version")) { @@ -125,7 +129,10 @@ int main(int argc, char **argv, char **envp) { return EXIT_SUCCESS; } -#ifdef NEW_LAUNCH_METHOD_2 +#ifdef NEW_LAUNCH_METHOD + /* Get the $DISPLAY FD */ + launchd_fd = launchd_display_fd(); + kr = bootstrap_look_up(bootstrap_port, SERVER_BOOTSTRAP_NAME, &mp); if(kr != KERN_SUCCESS) { set_x11_path(); @@ -147,7 +154,7 @@ int main(int argc, char **argv, char **envp) { } /* Try connecting for 10 seconds */ - for(i=0; i < 40; i++) { + for(i=0; i < 80; i++) { usleep(250000); kr = bootstrap_look_up(bootstrap_port, SERVER_BOOTSTRAP_NAME, &mp); if(kr == KERN_SUCCESS) @@ -159,6 +166,12 @@ int main(int argc, char **argv, char **envp) { return EXIT_FAILURE; } } + + /* Handoff the $DISPLAY FD */ + if(launchd_fd != -1) { + get_display_handoff_socket(mp, handoff_socket); + fprintf(stderr, "Handoff socket: %s %d\n", handoff_socket, launchd_fd); + } /* Count envp */ for(envpc=0; envp[envpc]; envpc++); From 738672858d9399ecbc170500c15f90bf657502d2 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sun, 18 May 2008 23:02:12 -0700 Subject: [PATCH 545/634] New XQuartz icon thanks to Simone Karin Lehmann (cherry picked from commit c27e0c8f3c5108192362735db8a80bf3a9a1cc3a) --- hw/xquartz/bundle/Resources/X11.icns | Bin 65908 -> 37823 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/hw/xquartz/bundle/Resources/X11.icns b/hw/xquartz/bundle/Resources/X11.icns index d770e617ddb455d8a499550e712f93a06a69f871..d19cc63015333dfd14ffe3cbaff0662bbd5f64b8 100644 GIT binary patch literal 37823 zcmeIb2UrwI*FRdrL}q{?XGxNClB5FWNKhn*fC00ZU3C?;XUMwd95Dw3b_!jXhN|VyR+X))k8Jbc>GBk!Ass^R>A=SYAreE7x6|LYw$6{7W)451 zjVFk22C1|Gys}5#D%PAmRmf*r>zYb5(*T=yM@KKwzj5(g%uFb zs4YJs3_^TcTP^?jKl(Foxr04IQf^xj2aiG|9Ood)?~&V1!BuKy=xbkVzSI6@Ua3J@~0 zuo;ITyRsip(680#wS~Th^>&1+DiC^HRER896_gZRa8#Uy(1v^Y2bl;_nJo9()I81jb0~H_g^QT15tnb?d-!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jm2`CVT$6@z@UhnBOjQZ zcPsd|NI^oc`XXp!(1(*)Hdnh{#c0P0p(R=A1CJE^)dcgb2hwt*hI_vqjypAnK}4qw z2Y3k~gn-rI0h*9rfLMO6O0!#|-|i4H-o|vcsB*>JW6zmqgzXS>(E@1~GZO6~pktW% zQzLc5REVcf#oky9)gQ_2hj1cSC@jMBgr|Y=FPT>P&Nq8J{?ixe_c!ssIV8UoUB--2 zX73mUCRm)1h=n`}+SaSGT{8l*Z8^qYgN7>JL& ztp5M>plu~?Sr&U{P0lnHk4=LO+;x9ApD4qM`;3x`zh#PMqCY0q&-Rsn6UVr!rNv%S;c);;z&tK8l81v-dDp)f1W%nIf!(ZFVo&-mk*ri4&YP z)4Y_6HoWW$9!+!k$fuJCKwWJUfk|awa7rcwq-G#EJepRa}U{Akpz>{vzd4xd+#=glE1^IRg zvruIkLrGFY`k*4~{*WrYe&cIP#RdPlof9$S=?YH-D}9215_u6Y|l;mePniFk&xd zQ>)@T8kO|pFGm@eaPXEgid;NgUI8aT0x#r5AZr*fteSRGH)%(`mgmhni5rhYC|n1U z!;^Gik!;A*?3MQ)4KrjJ6r8I zvqd#5G$z)#NzqTedIvljE`B!sA^FlA3TJ%1IQ>^>!EDs+Lf6{n6TQ99vA~ezz3V91 z(Evga>gdlm8O6rFro-`LXxWoms~=aW?oK>4-zEAl9cptpcXH`;D*dkLY}np4)lLJB zxa6B?UoEpNj9TY))6B$Dpl+og8$w$3C0YdI7{fe_HWGzL*4-o9ZrGW@_TL1U?le^O zfc2ubP9rb|GA?MW`Ig<3)ZVjDJx|KG&dO$^1pYstawna)`5K1gDGbd2 E014<25dZ)H From e997df8cd3c4222ea9fc3f0ebda728c4d1f15df5 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sun, 18 May 2008 23:31:41 -0700 Subject: [PATCH 546/634] XQuartz: Cleaned up ListenOnOpenFD... (cherry picked from commit 6fb587d3d5fbbaee9e46cdce24d03e5d1c66d58a) --- hw/xquartz/darwinEvents.c | 1 - os/connection.c | 35 +++++------------------------------ 2 files changed, 5 insertions(+), 31 deletions(-) diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c index 9ecebe421..0ecb064c4 100644 --- a/hw/xquartz/darwinEvents.c +++ b/hw/xquartz/darwinEvents.c @@ -220,7 +220,6 @@ static void kXquartzListenOnOpenFDHandler(int screenNum, xEventPtr xe, DeviceInt TA_SERVER(); for (i=0; i Date: Sun, 18 May 2008 23:51:06 -0700 Subject: [PATCH 547/634] XQuartz: Fixed dropped code in the !XKB blocks, disable XKB support until we figure out a solution for xkeyboard-config (cherry picked from commit 2a72309c061f7060480d150791019ce232481462) --- hw/xquartz/quartzKeyboard.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c index c75cd1d45..5b8d32dae 100644 --- a/hw/xquartz/quartzKeyboard.c +++ b/hw/xquartz/quartzKeyboard.c @@ -43,7 +43,7 @@ // Define this to get a diagnostic output to stderr which is helpful // in determining how the X server is interpreting the Darwin keymap. #define DUMP_DARWIN_KEYMAP -#define XQUARTZ_USE_XKB +//#define XQUARTZ_USE_XKB #define HACK_MISSING 1 #define HACK_KEYPAD 1 @@ -910,24 +910,26 @@ void DarwinKeyboardInit(DeviceIntPtr pDev) { void DarwinKeyboardReloadHandler(int screenNum, xEventPtr xe, DeviceIntPtr pDev, int nevents) { - if (pDev == NULL) pDev = darwinKeyboard; - - DEBUG_LOG("DarwinKeyboardReloadHandler(%p)\n", pDev); + if (pDev == NULL) pDev = darwinKeyboard; + + DEBUG_LOG("DarwinKeyboardReloadHandler(%p)\n", pDev); #ifdef XQUARTZ_USE_XKB - QuartzXkbUpdate(pDev); + QuartzXkbUpdate(pDev); #else - if (pDev->key) { - if (pDev->key->curKeySyms.map) xfree(pDev->key->curKeySyms.map); - if (pDev->key->modifierKeyMap) xfree(pDev->key->modifierKeyMap); - xfree(pDev->key); - } - KeySymsRec keySyms; - if (!InitKeyClassDeviceStruct(pDev, &keySyms, keyInfo.modMap)) { - DEBUG_LOG("InitKeyClassDeviceStruct failed\n"); - return; - } + DarwinLoadKeyboardMapping(&keySyms); + + if (pDev->key) { + if (pDev->key->curKeySyms.map) xfree(pDev->key->curKeySyms.map); + if (pDev->key->modifierKeyMap) xfree(pDev->key->modifierKeyMap); + xfree(pDev->key); + } + + if (!InitKeyClassDeviceStruct(pDev, &keySyms, keyInfo.modMap)) { + DEBUG_LOG("InitKeyClassDeviceStruct failed\n"); + return; + } SendMappingNotify(MappingKeyboard, MIN_KEYCODE, NUM_KEYCODES, 0); SendMappingNotify(MappingModifier, 0, 0, 0); From bb687465d0c5aef3cc1c865e6ea67c01a8b417fb Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Mon, 19 May 2008 02:45:47 -0700 Subject: [PATCH 548/634] XQuartz: First stab at SCM_RIGHTS passing the $DISPLAY launchd fd from the stub to server (cherry picked from commit cccee9cfc29f85cca635df3b8dd54199b45c4df8) --- hw/xquartz/mach-startup/bundle-main.c | 145 ++++++++++++++++------ hw/xquartz/mach-startup/mach_startup.defs | 4 +- hw/xquartz/mach-startup/stub.c | 93 ++++++++++++-- 3 files changed, 192 insertions(+), 50 deletions(-) diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c index 4ddd82f7b..c9751236f 100644 --- a/hw/xquartz/mach-startup/bundle-main.c +++ b/hw/xquartz/mach-startup/bundle-main.c @@ -37,6 +37,7 @@ #include #include #include + #include #include @@ -120,68 +121,140 @@ static pthread_t create_thread(void *func, void *arg) { } /*** $DISPLAY handoff ***/ -static char display_handoff_socket[PATH_MAX + 1]; - -kern_return_t do_get_display_handoff_socket(mach_port_t port, string_t filename) { - strlcpy(filename, display_handoff_socket, STRING_T_SIZE); - fprintf(stderr, "Telling him the filename is %s = %s\n", filename, display_handoff_socket); - return KERN_SUCCESS; -} - /* From darwinEvents.c ... but don't want to pull in all the server cruft */ void DarwinListenOnOpenFD(int fd); -static void accept_fd_handoff(int connectedSocket) { - int fd; - return; - DarwinListenOnOpenFD(fd); +static void accept_fd_handoff(int connected_fd) { + int launchd_fd; + + char databuf[] = "display"; + struct iovec iov[1]; + + iov[0].iov_base = databuf; + iov[0].iov_len = sizeof(databuf); + + union { + struct cmsghdr hdr; + char bytes[CMSG_SPACE(sizeof(int))]; + } buf; + + struct msghdr msg; + msg.msg_iov = iov; + msg.msg_iovlen = 1; + msg.msg_control = buf.bytes; + msg.msg_controllen = sizeof(buf); + msg.msg_name = 0; + msg.msg_namelen = 0; + msg.msg_flags = 0; + + struct cmsghdr *cmsg = CMSG_FIRSTHDR (&msg); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(int)); + + msg.msg_controllen = cmsg->cmsg_len; + + *((int*)CMSG_DATA(cmsg)) = -1; + + if(recvmsg(connected_fd, &msg, 0) < 0) { + fprintf(stderr, "Error receiving $DISPLAY file descriptor: %s\n", strerror(errno)); + return; + } + + launchd_fd = *((int*)CMSG_DATA(cmsg)); + + if(launchd_fd > 0) + DarwinListenOnOpenFD(launchd_fd); + else + fprintf(stderr, "Error receiving $DISPLAY file descriptor, no descriptor received? %d\n", launchd_fd); } +typedef struct { + string_t socket_filename; + pthread_mutex_t lock; + pthread_cond_t cond; + kern_return_t retval; +} handoff_data_t; + /* This thread loops accepting incoming connections and handing off the file * descriptor for the new connection to accept_fd_handoff() */ static void socket_handoff_thread(void *arg) { + handoff_data_t *data = (handoff_data_t *)arg; + string_t filename; struct sockaddr_un servaddr_un; struct sockaddr *servaddr; - int handoff_fd; - int servaddr_len; + socklen_t servaddr_len; + int handoff_fd, connected_fd; + + /* We need to save it since data dies after we pthread_cond_broadcast */ + strlcpy(filename, data->socket_filename, STRING_T_SIZE); - /* Wipe ourselves clean */ + /* Make sure we only run once the dispatch thread is waiting for us */ + pthread_mutex_lock(&data->lock); + + /* Setup servaddr_un */ memset (&servaddr_un, 0, sizeof (struct sockaddr_un)); - servaddr_un.sun_family = AF_UNIX; - strcpy(servaddr_un.sun_path, display_handoff_socket); + strlcpy(servaddr_un.sun_path, filename, sizeof(servaddr_un.sun_path)); + servaddr = (struct sockaddr *) &servaddr_un; - servaddr_len = sizeof(struct sockaddr_un) - sizeof(servaddr_un.sun_path) + strlen(display_handoff_socket); + servaddr_len = sizeof(struct sockaddr_un) - sizeof(servaddr_un.sun_path) + strlen(filename); handoff_fd = socket(AF_UNIX, SOCK_STREAM, 0); if(handoff_fd == 0) { - fprintf(stderr, "Failed to create socket: %s - %s\n", display_handoff_socket, strerror(errno)); + fprintf(stderr, "Failed to create socket: %s - %s\n", filename, strerror(errno)); + data->retval = EXIT_FAILURE; return; - exit(EXIT_FAILURE); } if(bind(handoff_fd, servaddr, servaddr_len) != 0) { - fprintf(stderr, "Failed to bind socket: %s - %s\n", display_handoff_socket, strerror(errno)); + fprintf(stderr, "Failed to bind socket: %s - %s\n", filename, strerror(errno)); + data->retval = EXIT_FAILURE; return; - exit(EXIT_FAILURE); } if(listen(handoff_fd, 10) != 0) { - fprintf(stderr, "Failed to listen to socket: %s - %s\n", display_handoff_socket, strerror(errno)); + fprintf(stderr, "Failed to listen to socket: %s - %s\n", filename, strerror(errno)); + data->retval = EXIT_FAILURE; return; - exit(EXIT_FAILURE); } + + /* Let the dispatch thread now tell the caller that we're listening */ + data->retval = EXIT_SUCCESS; + pthread_mutex_unlock(&data->lock); + pthread_cond_broadcast(&data->cond); - while(true) { - int connectedSocket = accept(handoff_fd, NULL, NULL); - - if(connectedSocket == -1) { - fprintf(stderr, "Failed to accept incoming connection on socket: %s - %s\n", display_handoff_socket, strerror(errno)); - continue; - } - accept_fd_handoff(connectedSocket); + connected_fd = accept(handoff_fd, NULL, NULL); + + /* We delete this temporary socket after we get the connection */ + unlink(filename); + + if(connected_fd == -1) { + fprintf(stderr, "Failed to accept incoming connection on socket: %s - %s\n", filename, strerror(errno)); + return; } + + /* Now actually get the passed file descriptor from this connection */ + accept_fd_handoff(connected_fd); + + close(handoff_fd); +} + +kern_return_t do_prep_fd_handoff(mach_port_t port, string_t socket_filename) { + handoff_data_t handoff_data; + + pthread_mutex_init(&handoff_data.lock, NULL); + pthread_cond_init(&handoff_data.cond, NULL); + strlcpy(handoff_data.socket_filename, socket_filename, STRING_T_SIZE); + + pthread_mutex_lock(&handoff_data.lock); + + create_thread(socket_handoff_thread, &handoff_data); + + pthread_cond_wait(&handoff_data.cond, &handoff_data.lock); + + return handoff_data.retval; } /*** Server Startup ***/ @@ -334,14 +407,6 @@ int main(int argc, char **argv, char **envp) { return EXIT_FAILURE; } - /* Figure out what our handoff socket will be - * TODO: cleanup on exit. - */ - tmpnam(display_handoff_socket); - create_thread(socket_handoff_thread, NULL); - - fprintf(stderr, "Hi\n"); - /* Check if we need to do something other than listen, and make another * thread handle it. */ diff --git a/hw/xquartz/mach-startup/mach_startup.defs b/hw/xquartz/mach-startup/mach_startup.defs index 05bdf569f..19c105cb2 100644 --- a/hw/xquartz/mach-startup/mach_startup.defs +++ b/hw/xquartz/mach-startup/mach_startup.defs @@ -41,6 +41,6 @@ routine start_x11_server( argv : string_array_t; envp : string_array_t); -routine get_display_handoff_socket( +routine prep_fd_handoff( port : mach_port_t; - filename : string_t); + socket_filename : string_t); diff --git a/hw/xquartz/mach-startup/stub.c b/hw/xquartz/mach-startup/stub.c index 5fdbad882..0a9ab669c 100644 --- a/hw/xquartz/mach-startup/stub.c +++ b/hw/xquartz/mach-startup/stub.c @@ -37,6 +37,9 @@ #include #include +#include +#include + #define kX11AppBundleId "org.x.X11" #define kX11AppBundlePath "/Contents/MacOS/X11" @@ -47,6 +50,13 @@ #include "launchd_fd.h" +#ifndef BUILD_DATE +#define BUILD_DATE "?" +#endif +#ifndef XSERVER_VERSION +#define XSERVER_VERSION "?" +#endif + static char x11_path[PATH_MAX + 1]; static void set_x11_path() { @@ -103,12 +113,75 @@ static void set_x11_path() { } } -#ifndef BUILD_DATE -#define BUILD_DATE "?" -#endif -#ifndef XSERVER_VERSION -#define XSERVER_VERSION "?" -#endif +static void send_fd_handoff(int connected_fd, int launchd_fd) { + char databuf[] = "display"; + struct iovec iov[1]; + + iov[0].iov_base = databuf; + iov[0].iov_len = sizeof(databuf); + + union { + struct cmsghdr hdr; + char bytes[CMSG_SPACE(sizeof(int))]; + } buf; + + struct msghdr msg; + msg.msg_iov = iov; + msg.msg_iovlen = 1; + msg.msg_control = buf.bytes; + msg.msg_controllen = sizeof(buf); + msg.msg_name = 0; + msg.msg_namelen = 0; + msg.msg_flags = 0; + + struct cmsghdr *cmsg = CMSG_FIRSTHDR (&msg); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(int)); + + msg.msg_controllen = cmsg->cmsg_len; + + *((int*)CMSG_DATA(cmsg)) = launchd_fd; + + if (sendmsg(connected_fd, &msg, 0) < 0) { + fprintf(stderr, "Error sending $DISPLAY file descriptor: %s\n", strerror(errno)); + return; + } + + fprintf(stderr, "send %d %d %d %s\n", connected_fd, launchd_fd, errno, strerror(errno)); +} + +static void handoff_fd(const char *filename, int launchd_fd) { + struct sockaddr_un servaddr_un; + struct sockaddr *servaddr; + socklen_t servaddr_len; + int handoff_fd, connected_fd; + + /* Setup servaddr_un */ + memset (&servaddr_un, 0, sizeof (struct sockaddr_un)); + servaddr_un.sun_family = AF_UNIX; + strlcpy(servaddr_un.sun_path, filename, sizeof(servaddr_un.sun_path)); + + servaddr = (struct sockaddr *) &servaddr_un; + servaddr_len = sizeof(struct sockaddr_un) - sizeof(servaddr_un.sun_path) + strlen(filename); + + handoff_fd = socket(PF_UNIX, SOCK_STREAM, 0); + if(handoff_fd == 0) { + fprintf(stderr, "Failed to create socket: %s - %s\n", filename, strerror(errno)); + return; + } + + connected_fd = connect(handoff_fd, servaddr, servaddr_len); + + if(connected_fd == -1) { + fprintf(stderr, "Failed to establish connection on socket: %s - %s\n", filename, strerror(errno)); + return; + } + + send_fd_handoff(connected_fd, launchd_fd); + + close(handoff_fd); +} int main(int argc, char **argv, char **envp) { #ifdef NEW_LAUNCH_METHOD @@ -169,8 +242,12 @@ int main(int argc, char **argv, char **envp) { /* Handoff the $DISPLAY FD */ if(launchd_fd != -1) { - get_display_handoff_socket(mp, handoff_socket); - fprintf(stderr, "Handoff socket: %s %d\n", handoff_socket, launchd_fd); + tmpnam(handoff_socket); + if(prep_fd_handoff(mp, handoff_socket) == KERN_SUCCESS) { + handoff_fd(handoff_socket, launchd_fd); + } else { + fprintf(stderr, "Unable to hand of $DISPLAY file descriptor\n"); + } } /* Count envp */ From 0178b6a4abed0df3e90ba393709ed566105e7c2c Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 19 May 2008 11:22:19 -0400 Subject: [PATCH 549/634] Fix reduced-blanking mode filtering in RANDR 1.2. If the monitor isn't reduced-blanking (either through EDID logic, or config file setting), then remove RB modes from the default pool. Any RB modes from the driver and config file pools will stick around though; you asked for them, you got them. --- hw/xfree86/modes/xf86Crtc.c | 9 ++++++++- hw/xfree86/modes/xf86Modes.c | 22 ++++++++++++++++++++++ hw/xfree86/modes/xf86Modes.h | 3 +++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 9512805af..41ac2f6e0 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -1484,7 +1484,14 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) } default_modes = xf86GetDefaultModes (output->interlaceAllowed, output->doubleScanAllowed); - + + /* + * If this is not an RB monitor, remove RB modes from the default + * pool. RB modes from the config or the monitor itself are fine. + */ + if (!mon_rec.reducedblanking) + xf86ValidateModesReducedBlanking (scrn, default_modes); + if (sync_source == sync_config) { /* diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c index 2dff31b3a..3a9f3ff24 100644 --- a/hw/xfree86/modes/xf86Modes.c +++ b/hw/xfree86/modes/xf86Modes.c @@ -518,6 +518,28 @@ xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList, } } +/** + * Marks as bad any reduced-blanking modes. + * + * \param modeList doubly-linked list of modes. + */ +_X_EXPORT void +xf86ValidateModesReducedBlanking(ScrnInfoPtr pScrn, DisplayModePtr modeList) +{ + Bool mode_is_reduced = FALSE; + DisplayModePtr mode; + + for (mode = modeList; mode != NULL; mode = mode->next) { + /* gratuitous duplication from pre-randr validation code */ + if ((((mode->HDisplay * 5 / 4) & ~0x07) > mode->HTotal) && + ((mode->HTotal - mode->HDisplay) == 160) && + ((mode->HSyncEnd - mode->HDisplay) == 80) && + ((mode->HSyncEnd - mode->HSyncStart) == 32) && + ((mode->VSyncStart - mode->VDisplay) == 3)) + mode->status = MODE_NO_REDUCED; + } +} + /** * Frees any modes from the list with a status other than MODE_OK. * diff --git a/hw/xfree86/modes/xf86Modes.h b/hw/xfree86/modes/xf86Modes.h index 5d49c9314..acdea65d8 100644 --- a/hw/xfree86/modes/xf86Modes.h +++ b/hw/xfree86/modes/xf86Modes.h @@ -84,6 +84,9 @@ void xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList, unsigned int bandwidth, int depth); +void +xf86ValidateModesReducedBlanking(ScrnInfoPtr pScrn, DisplayModePtr modeList); + void xf86PruneInvalidModes(ScrnInfoPtr pScrn, DisplayModePtr *modeList, Bool verbose); From e73a03d589b47ac9131f3932da7f78d2fef7bfb5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 20 May 2008 10:54:32 +0930 Subject: [PATCH 550/634] fb: shut up two compiler warnings. --- fb/fbarc.c | 2 ++ fb/fbpict.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fb/fbarc.c b/fb/fbarc.c index f89b81c52..3a8a2c56a 100644 --- a/fb/fbarc.c +++ b/fb/fbarc.c @@ -77,6 +77,8 @@ fbPolyArc (DrawablePtr pDrawable, fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); #ifdef FB_ACCESS_WRAPPER wrapped = 1; +#else + wrapped = 0; #endif while (narcs--) { diff --git a/fb/fbpict.c b/fb/fbpict.c index 85b5171c5..1355e9071 100644 --- a/fb/fbpict.c +++ b/fb/fbpict.c @@ -292,7 +292,7 @@ create_bits_picture (PicturePtr pict, fbGetDrawable (pict->pDrawable, bits, stride, bpp, xoff, yoff); - bits = (CARD8*)bits + yoff * stride * sizeof(FbBits) + xoff * (bpp / 8); + bits = (FbBits*)((CARD8*)bits + yoff * stride * sizeof(FbBits) + xoff * (bpp / 8)); image = pixman_image_create_bits ( pict->format, From f9edecd1b53a2e234def9cbd954a47c4bda2bebc Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 20 May 2008 11:07:17 +0930 Subject: [PATCH 551/634] mi: sync declaration and definition of mieqResizeEvents. --- mi/mi.h | 2 +- mi/mieq.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mi/mi.h b/mi/mi.h index 0af1a1bd3..2fdaf2047 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -153,7 +153,7 @@ extern Bool mieqInit( void ); -extern void mieqResize( +extern void mieqResizeEvents( int /* min_size */ ); diff --git a/mi/mieq.c b/mi/mieq.c index 3ab893650..830bab8a2 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -103,7 +103,7 @@ mieqInit(void) } /* Ensure all events in the EQ are at least size bytes. */ -Bool +void mieqResizeEvents(int min_size) { int i; From 7a550cefd9417c22a4397ea4d103ddc347ab1a0f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 20 May 2008 11:07:39 +0930 Subject: [PATCH 552/634] dix: shut up two compiler warnings. --- dix/devices.c | 1 + dix/main.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index 4dd1dc5f1..5606543f7 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -71,6 +71,7 @@ SOFTWARE. #endif #include "privates.h" #include "xace.h" +#include "mi.h" #include "dispatch.h" #include "swaprep.h" diff --git a/dix/main.c b/dix/main.c index 11ea29bba..328c0b4ba 100644 --- a/dix/main.c +++ b/dix/main.c @@ -240,7 +240,7 @@ int dix_main(int argc, char *argv[], char *envp[]) int main(int argc, char *argv[], char *envp[]) #endif { - int i, j, k, error; + int i, j, k; char *xauthfile; HWEventQueueType alwaysCheckForInput[2]; From 925e895b869e461a9e7f135891463c56ee633cd6 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 19 May 2008 18:43:29 -0700 Subject: [PATCH 553/634] Restore return type on xf86SetScrnInfoModes Seems to have been accidentally lost by commit 76943fec860315f3c93539e59a59080b8a7b3e75 --- hw/xfree86/modes/xf86Crtc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 41ac2f6e0..7edd23c5f 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -1692,6 +1692,7 @@ SetCompatOutput(xf86CrtcConfigPtr config) return output; } +_X_EXPORT void xf86SetScrnInfoModes (ScrnInfoPtr scrn) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); From 4056595fc77c20052e226b402e38a2a914dca123 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 20 May 2008 18:57:31 +0930 Subject: [PATCH 554/634] xkb: remove superfluous checks in if statement. --- xkb/xkbUtils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index 19a171a86..0727ad83a 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -2052,7 +2052,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) * just MapNotify. we also need to send NKN if the geometry * changed (obviously ...). */ if ((src->min_key_code != dst->min_key_code || - src->max_key_code != dst->max_key_code) && sendNotifies) { + src->max_key_code != dst->max_key_code)) { nkn.oldMinKeyCode = dst->min_key_code; nkn.oldMaxKeyCode = dst->max_key_code; nkn.deviceID = nkn.oldDeviceID = pDev->id; @@ -2062,8 +2062,8 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) nkn.requestMinor = X_kbSetMap; /* XXX bare-faced lie */ nkn.changed = XkbAllNewKeyboardEventsMask; XkbSendNewKeyboardNotify(pDev, &nkn); - } - else if (sendNotifies) { + } else + { mn.deviceID = pDev->id; mn.minKeyCode = src->min_key_code; mn.maxKeyCode = src->max_key_code; From 6ff6465931c397f72db27a4fd0ca0dcac0609537 Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Tue, 20 May 2008 16:36:22 -0400 Subject: [PATCH 555/634] Add loader for the swrast dri driver. --- GL/glx/Makefile.am | 2 + GL/glx/glxdri.c | 29 +- GL/glx/glxdri2.c | 180 +---------- GL/glx/glxdricommon.c | 209 +++++++++++++ GL/glx/glxdricommon.h | 40 +++ GL/glx/glxdriswrast.c | 547 +++++++++++++++++++++++++++++++++ hw/xfree86/dixmods/glxmodule.c | 4 + mi/miinitext.c | 2 + 8 files changed, 806 insertions(+), 207 deletions(-) create mode 100644 GL/glx/glxdricommon.c create mode 100644 GL/glx/glxdricommon.h create mode 100644 GL/glx/glxdriswrast.c diff --git a/GL/glx/Makefile.am b/GL/glx/Makefile.am index 9bf296c71..d86141f4e 100644 --- a/GL/glx/Makefile.am +++ b/GL/glx/Makefile.am @@ -62,6 +62,8 @@ libglx_la_SOURCES = \ glxext.c \ glxext.h \ glxglcore.c \ + glxdriswrast.c \ + glxdricommon.c \ glxscreens.c \ glxscreens.h \ glxserver.h \ diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c index 9cd0738a0..43b0523f3 100644 --- a/GL/glx/glxdri.c +++ b/GL/glx/glxdri.c @@ -52,6 +52,7 @@ #define DRI_NEW_INTERFACE_ONLY #include "glxserver.h" #include "glxutil.h" +#include "glxdricommon.h" #include "g_disptab.h" #include "glapitable.h" @@ -63,7 +64,6 @@ typedef struct __GLXDRIscreen __GLXDRIscreen; typedef struct __GLXDRIcontext __GLXDRIcontext; typedef struct __GLXDRIdrawable __GLXDRIdrawable; -typedef struct __GLXDRIconfig __GLXDRIconfig; struct __GLXDRIscreen { __GLXscreen base; @@ -108,11 +108,6 @@ struct __GLXDRIdrawable { #endif }; -struct __GLXDRIconfig { - __GLXconfig config; - __DRIconfig *driConfig; -}; - static void __glXDRIleaveServer(GLboolean rendering) { @@ -797,22 +792,6 @@ getDrawableInfo(__DRIdrawable *driDrawable, return retval; } -static int -getUST(int64_t *ust) -{ - struct timeval tv; - - if (ust == NULL) - return -EFAULT; - - if (gettimeofday(&tv, NULL) == 0) { - ust[0] = (tv.tv_sec * 1000000) + tv.tv_usec; - return 0; - } else { - return -errno; - } -} - static void __glXReportDamage(__DRIdrawable *driDraw, int x, int y, drm_clip_rect_t *rects, int num_rects, @@ -833,12 +812,6 @@ static void __glXReportDamage(__DRIdrawable *driDraw, __glXleaveServer(GL_FALSE); } -static const __DRIsystemTimeExtension systemTimeExtension = { - { __DRI_SYSTEM_TIME, __DRI_SYSTEM_TIME_VERSION }, - getUST, - NULL, -}; - static const __DRIgetDrawableInfoExtension getDrawableInfoExtension = { { __DRI_GET_DRAWABLE_INFO, __DRI_GET_DRAWABLE_INFO_VERSION }, getDrawableInfo diff --git a/GL/glx/glxdri2.c b/GL/glx/glxdri2.c index 40590c167..9a3bc1fdb 100644 --- a/GL/glx/glxdri2.c +++ b/GL/glx/glxdri2.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include @@ -47,6 +46,7 @@ #include "glxserver.h" #include "glxutil.h" +#include "glxdricommon.h" #include "g_disptab.h" #include "glapitable.h" @@ -58,7 +58,6 @@ typedef struct __GLXDRIscreen __GLXDRIscreen; typedef struct __GLXDRIcontext __GLXDRIcontext; typedef struct __GLXDRIdrawable __GLXDRIdrawable; -typedef struct __GLXDRIconfig __GLXDRIconfig; struct __GLXDRIscreen { __GLXscreen base; @@ -88,11 +87,6 @@ struct __GLXDRIdrawable { __GLXDRIscreen *screen; }; -struct __GLXDRIconfig { - __GLXconfig config; - const __DRIconfig *driConfig; -}; - static void __glXDRIdrawableDestroy(__GLXdrawable *drawable) { @@ -359,28 +353,6 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen, return &private->base; } -static int -getUST(int64_t *ust) -{ - struct timeval tv; - - if (ust == NULL) - return -EFAULT; - - if (gettimeofday(&tv, NULL) == 0) { - ust[0] = (tv.tv_sec * 1000000) + tv.tv_usec; - return 0; - } else { - return -errno; - } -} - -static const __DRIsystemTimeExtension systemTimeExtension = { - { __DRI_SYSTEM_TIME, __DRI_SYSTEM_TIME_VERSION }, - getUST, - NULL, -}; - static void dri2ReemitDrawableInfo(__DRIdrawable *draw, unsigned int *tail, void *loaderPrivate) { @@ -490,156 +462,6 @@ initializeExtensions(__GLXDRIscreen *screen) /* Ignore unknown extensions */ } } - -#define __ATTRIB(attrib, field) \ - { attrib, offsetof(__GLXconfig, field) } - -static const struct { unsigned int attrib, offset; } attribMap[] = { - __ATTRIB(__DRI_ATTRIB_BUFFER_SIZE, rgbBits), - __ATTRIB(__DRI_ATTRIB_LEVEL, level), - __ATTRIB(__DRI_ATTRIB_RED_SIZE, redBits), - __ATTRIB(__DRI_ATTRIB_GREEN_SIZE, greenBits), - __ATTRIB(__DRI_ATTRIB_BLUE_SIZE, blueBits), - __ATTRIB(__DRI_ATTRIB_ALPHA_SIZE, alphaBits), - __ATTRIB(__DRI_ATTRIB_DEPTH_SIZE, depthBits), - __ATTRIB(__DRI_ATTRIB_STENCIL_SIZE, stencilBits), - __ATTRIB(__DRI_ATTRIB_ACCUM_RED_SIZE, accumRedBits), - __ATTRIB(__DRI_ATTRIB_ACCUM_GREEN_SIZE, accumGreenBits), - __ATTRIB(__DRI_ATTRIB_ACCUM_BLUE_SIZE, accumBlueBits), - __ATTRIB(__DRI_ATTRIB_ACCUM_ALPHA_SIZE, accumAlphaBits), - __ATTRIB(__DRI_ATTRIB_SAMPLE_BUFFERS, sampleBuffers), - __ATTRIB(__DRI_ATTRIB_SAMPLES, samples), - __ATTRIB(__DRI_ATTRIB_DOUBLE_BUFFER, doubleBufferMode), - __ATTRIB(__DRI_ATTRIB_STEREO, stereoMode), - __ATTRIB(__DRI_ATTRIB_AUX_BUFFERS, numAuxBuffers), - __ATTRIB(__DRI_ATTRIB_TRANSPARENT_TYPE, transparentPixel), - __ATTRIB(__DRI_ATTRIB_TRANSPARENT_INDEX_VALUE, transparentPixel), - __ATTRIB(__DRI_ATTRIB_TRANSPARENT_RED_VALUE, transparentRed), - __ATTRIB(__DRI_ATTRIB_TRANSPARENT_GREEN_VALUE, transparentGreen), - __ATTRIB(__DRI_ATTRIB_TRANSPARENT_BLUE_VALUE, transparentBlue), - __ATTRIB(__DRI_ATTRIB_TRANSPARENT_ALPHA_VALUE, transparentAlpha), - __ATTRIB(__DRI_ATTRIB_FLOAT_MODE, floatMode), - __ATTRIB(__DRI_ATTRIB_RED_MASK, redMask), - __ATTRIB(__DRI_ATTRIB_GREEN_MASK, greenMask), - __ATTRIB(__DRI_ATTRIB_BLUE_MASK, blueMask), - __ATTRIB(__DRI_ATTRIB_ALPHA_MASK, alphaMask), - __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_WIDTH, maxPbufferWidth), - __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_HEIGHT, maxPbufferHeight), - __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_PIXELS, maxPbufferPixels), - __ATTRIB(__DRI_ATTRIB_OPTIMAL_PBUFFER_WIDTH, optimalPbufferWidth), - __ATTRIB(__DRI_ATTRIB_OPTIMAL_PBUFFER_HEIGHT, optimalPbufferHeight), - __ATTRIB(__DRI_ATTRIB_SWAP_METHOD, swapMethod), - __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGB, bindToTextureRgb), - __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGBA, bindToTextureRgba), - __ATTRIB(__DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE, bindToMipmapTexture), - __ATTRIB(__DRI_ATTRIB_YINVERTED, yInverted), -}; - -#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) - -static void -setScalar(__GLXconfig *config, unsigned int attrib, unsigned int value) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(attribMap); i++) - if (attribMap[i].attrib == attrib) { - *(unsigned int *) ((char *) config + attribMap[i].offset) = value; - return; - } -} - -static __GLXconfig * -createModeFromConfig(const __DRIcoreExtension *core, - const __DRIconfig *driConfig, - unsigned int visualType) -{ - __GLXDRIconfig *config; - unsigned int attrib, value; - int i; - - config = xalloc(sizeof *config); - - config->driConfig = driConfig; - - i = 0; - while (core->indexConfigAttrib(driConfig, i++, &attrib, &value)) { - switch (attrib) { - case __DRI_ATTRIB_RENDER_TYPE: - if (value & __DRI_ATTRIB_RGBA_BIT) { - config->config.renderType |= GLX_RGBA_BIT; - config->config.rgbMode = GL_TRUE; - } else if (value & __DRI_ATTRIB_COLOR_INDEX_BIT) { - config->config.renderType |= GLX_COLOR_INDEX_BIT; - config->config.rgbMode = GL_FALSE; - } else { - config->config.renderType = 0; - config->config.rgbMode = GL_FALSE; - } - break; - case __DRI_ATTRIB_CONFIG_CAVEAT: - if (value & __DRI_ATTRIB_NON_CONFORMANT_CONFIG) - config->config.visualRating = GLX_NON_CONFORMANT_CONFIG; - else if (value & __DRI_ATTRIB_SLOW_BIT) - config->config.visualRating = GLX_SLOW_CONFIG; - else - config->config.visualRating = GLX_NONE; - break; - case __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS: - config->config.bindToTextureTargets = 0; - if (value & __DRI_ATTRIB_TEXTURE_1D_BIT) - config->config.bindToTextureTargets |= GLX_TEXTURE_1D_BIT_EXT; - if (value & __DRI_ATTRIB_TEXTURE_2D_BIT) - config->config.bindToTextureTargets |= GLX_TEXTURE_2D_BIT_EXT; - if (value & __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT) - config->config.bindToTextureTargets |= GLX_TEXTURE_RECTANGLE_BIT_EXT; - break; - default: - setScalar(&config->config, attrib, value); - break; - } - } - - config->config.next = NULL; - config->config.xRenderable = GL_TRUE; - config->config.visualType = visualType; - config->config.drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT; - - return &config->config; -} - -__GLXconfig * -glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs); - -__GLXconfig * -glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs) -{ - __GLXconfig head, *tail; - int i; - - tail = &head; - head.next = NULL; - - for (i = 0; configs[i]; i++) { - tail->next = createModeFromConfig(core, - configs[i], GLX_TRUE_COLOR); - if (tail->next == NULL) - break; - - tail = tail->next; - } - - for (i = 0; configs[i]; i++) { - tail->next = createModeFromConfig(core, - configs[i], GLX_DIRECT_COLOR); - if (tail->next == NULL) - break; - - tail = tail->next; - } - - return head.next; -} static __GLXscreen * __glXDRIscreenProbe(ScreenPtr pScreen) diff --git a/GL/glx/glxdricommon.c b/GL/glx/glxdricommon.c new file mode 100644 index 000000000..13725ae73 --- /dev/null +++ b/GL/glx/glxdricommon.c @@ -0,0 +1,209 @@ +/* + * Copyright © 2008 Red Hat, Inc + * + * Permission to use, copy, modify, distribute, and sell this software + * and its documentation for any purpose is hereby granted without + * fee, provided that the above copyright notice appear in all copies + * and that both that copyright notice and this permission notice + * appear in supporting documentation, and that the name of the + * copyright holders not be used in advertising or publicity + * pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied + * warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include "glxserver.h" +#include "glxcontext.h" +#include "glxscreens.h" +#include "glxdricommon.h" + +static int +getUST(int64_t *ust) +{ + struct timeval tv; + + if (ust == NULL) + return -EFAULT; + + if (gettimeofday(&tv, NULL) == 0) { + ust[0] = (tv.tv_sec * 1000000) + tv.tv_usec; + return 0; + } else { + return -errno; + } +} + +const __DRIsystemTimeExtension systemTimeExtension = { + { __DRI_SYSTEM_TIME, __DRI_SYSTEM_TIME_VERSION }, + getUST, + NULL, +}; + +#define __ATTRIB(attrib, field) \ + { attrib, offsetof(__GLXconfig, field) } + +static const struct { unsigned int attrib, offset; } attribMap[] = { + __ATTRIB(__DRI_ATTRIB_BUFFER_SIZE, rgbBits), + __ATTRIB(__DRI_ATTRIB_LEVEL, level), + __ATTRIB(__DRI_ATTRIB_RED_SIZE, redBits), + __ATTRIB(__DRI_ATTRIB_GREEN_SIZE, greenBits), + __ATTRIB(__DRI_ATTRIB_BLUE_SIZE, blueBits), + __ATTRIB(__DRI_ATTRIB_ALPHA_SIZE, alphaBits), + __ATTRIB(__DRI_ATTRIB_DEPTH_SIZE, depthBits), + __ATTRIB(__DRI_ATTRIB_STENCIL_SIZE, stencilBits), + __ATTRIB(__DRI_ATTRIB_ACCUM_RED_SIZE, accumRedBits), + __ATTRIB(__DRI_ATTRIB_ACCUM_GREEN_SIZE, accumGreenBits), + __ATTRIB(__DRI_ATTRIB_ACCUM_BLUE_SIZE, accumBlueBits), + __ATTRIB(__DRI_ATTRIB_ACCUM_ALPHA_SIZE, accumAlphaBits), + __ATTRIB(__DRI_ATTRIB_SAMPLE_BUFFERS, sampleBuffers), + __ATTRIB(__DRI_ATTRIB_SAMPLES, samples), + __ATTRIB(__DRI_ATTRIB_DOUBLE_BUFFER, doubleBufferMode), + __ATTRIB(__DRI_ATTRIB_STEREO, stereoMode), + __ATTRIB(__DRI_ATTRIB_AUX_BUFFERS, numAuxBuffers), + __ATTRIB(__DRI_ATTRIB_TRANSPARENT_TYPE, transparentPixel), + __ATTRIB(__DRI_ATTRIB_TRANSPARENT_INDEX_VALUE, transparentPixel), + __ATTRIB(__DRI_ATTRIB_TRANSPARENT_RED_VALUE, transparentRed), + __ATTRIB(__DRI_ATTRIB_TRANSPARENT_GREEN_VALUE, transparentGreen), + __ATTRIB(__DRI_ATTRIB_TRANSPARENT_BLUE_VALUE, transparentBlue), + __ATTRIB(__DRI_ATTRIB_TRANSPARENT_ALPHA_VALUE, transparentAlpha), + __ATTRIB(__DRI_ATTRIB_FLOAT_MODE, floatMode), + __ATTRIB(__DRI_ATTRIB_RED_MASK, redMask), + __ATTRIB(__DRI_ATTRIB_GREEN_MASK, greenMask), + __ATTRIB(__DRI_ATTRIB_BLUE_MASK, blueMask), + __ATTRIB(__DRI_ATTRIB_ALPHA_MASK, alphaMask), + __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_WIDTH, maxPbufferWidth), + __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_HEIGHT, maxPbufferHeight), + __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_PIXELS, maxPbufferPixels), + __ATTRIB(__DRI_ATTRIB_OPTIMAL_PBUFFER_WIDTH, optimalPbufferWidth), + __ATTRIB(__DRI_ATTRIB_OPTIMAL_PBUFFER_HEIGHT, optimalPbufferHeight), + __ATTRIB(__DRI_ATTRIB_SWAP_METHOD, swapMethod), + __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGB, bindToTextureRgb), + __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGBA, bindToTextureRgba), + __ATTRIB(__DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE, bindToMipmapTexture), + __ATTRIB(__DRI_ATTRIB_YINVERTED, yInverted), +}; + +#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) + +static void +setScalar(__GLXconfig *config, unsigned int attrib, unsigned int value) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(attribMap); i++) + if (attribMap[i].attrib == attrib) { + *(unsigned int *) ((char *) config + attribMap[i].offset) = value; + return; + } +} + +static __GLXconfig * +createModeFromConfig(const __DRIcoreExtension *core, + const __DRIconfig *driConfig, + unsigned int visualType) +{ + __GLXDRIconfig *config; + unsigned int attrib, value; + int i; + + config = xalloc(sizeof *config); + + config->driConfig = driConfig; + + i = 0; + while (core->indexConfigAttrib(driConfig, i++, &attrib, &value)) { + switch (attrib) { + case __DRI_ATTRIB_RENDER_TYPE: + if (value & __DRI_ATTRIB_RGBA_BIT) { + config->config.renderType |= GLX_RGBA_BIT; + config->config.rgbMode = GL_TRUE; + } else if (value & __DRI_ATTRIB_COLOR_INDEX_BIT) { + config->config.renderType |= GLX_COLOR_INDEX_BIT; + config->config.rgbMode = GL_FALSE; + } else { + config->config.renderType = 0; + config->config.rgbMode = GL_FALSE; + } + break; + case __DRI_ATTRIB_CONFIG_CAVEAT: + if (value & __DRI_ATTRIB_NON_CONFORMANT_CONFIG) + config->config.visualRating = GLX_NON_CONFORMANT_CONFIG; + else if (value & __DRI_ATTRIB_SLOW_BIT) + config->config.visualRating = GLX_SLOW_CONFIG; + else + config->config.visualRating = GLX_NONE; + break; + case __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS: + config->config.bindToTextureTargets = 0; + if (value & __DRI_ATTRIB_TEXTURE_1D_BIT) + config->config.bindToTextureTargets |= GLX_TEXTURE_1D_BIT_EXT; + if (value & __DRI_ATTRIB_TEXTURE_2D_BIT) + config->config.bindToTextureTargets |= GLX_TEXTURE_2D_BIT_EXT; + if (value & __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT) + config->config.bindToTextureTargets |= GLX_TEXTURE_RECTANGLE_BIT_EXT; + break; + default: + setScalar(&config->config, attrib, value); + break; + } + } + + config->config.next = NULL; + config->config.xRenderable = GL_TRUE; + config->config.visualType = visualType; + config->config.drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT; + + return &config->config; +} + +__GLXconfig * +glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs) +{ + __GLXconfig head, *tail; + int i; + + tail = &head; + head.next = NULL; + + for (i = 0; configs[i]; i++) { + tail->next = createModeFromConfig(core, + configs[i], GLX_TRUE_COLOR); + if (tail->next == NULL) + break; + + tail = tail->next; + } + + for (i = 0; configs[i]; i++) { + tail->next = createModeFromConfig(core, + configs[i], GLX_DIRECT_COLOR); + if (tail->next == NULL) + break; + + tail = tail->next; + } + + return head.next; +} diff --git a/GL/glx/glxdricommon.h b/GL/glx/glxdricommon.h new file mode 100644 index 000000000..f88964b36 --- /dev/null +++ b/GL/glx/glxdricommon.h @@ -0,0 +1,40 @@ +/* + * Copyright © 2008 Red Hat, Inc + * + * Permission to use, copy, modify, distribute, and sell this software + * and its documentation for any purpose is hereby granted without + * fee, provided that the above copyright notice appear in all copies + * and that both that copyright notice and this permission notice + * appear in supporting documentation, and that the name of the + * copyright holders not be used in advertising or publicity + * pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied + * warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + */ + +#ifndef _GLX_dri_common_h +#define _GLX_dri_common_h + +typedef struct __GLXDRIconfig __GLXDRIconfig; +struct __GLXDRIconfig { + __GLXconfig config; + const __DRIconfig *driConfig; +}; + +__GLXconfig * +glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs); + +extern const __DRIsystemTimeExtension systemTimeExtension; + +#endif diff --git a/GL/glx/glxdriswrast.c b/GL/glx/glxdriswrast.c new file mode 100644 index 000000000..5e98da49b --- /dev/null +++ b/GL/glx/glxdriswrast.c @@ -0,0 +1,547 @@ +/* + * Copyright © 2008 George Sapountzis + * Copyright © 2008 Red Hat, Inc + * + * Permission to use, copy, modify, distribute, and sell this software + * and its documentation for any purpose is hereby granted without + * fee, provided that the above copyright notice appear in all copies + * and that both that copyright notice and this permission notice + * appear in supporting documentation, and that the name of the + * copyright holders not be used in advertising or publicity + * pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied + * warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "gcstruct.h" +#include "os.h" + +#include "glxserver.h" +#include "glxutil.h" +#include "glxdricommon.h" + +#include "g_disptab.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" +#include "extension_string.h" + +typedef struct __GLXDRIscreen __GLXDRIscreen; +typedef struct __GLXDRIcontext __GLXDRIcontext; +typedef struct __GLXDRIdrawable __GLXDRIdrawable; + +struct __GLXDRIscreen { + __GLXscreen base; + __DRIscreen *driScreen; + void *driver; + + const __DRIcoreExtension *core; + const __DRIswrastExtension *swrast; + const __DRIcopySubBufferExtension *copySubBuffer; + const __DRItexBufferExtension *texBuffer; +}; + +struct __GLXDRIcontext { + __GLXcontext base; + __DRIcontext *driContext; +}; + +struct __GLXDRIdrawable { + __GLXdrawable base; + __DRIdrawable *driDrawable; + __GLXDRIscreen *screen; + + GCPtr gc; /* scratch GC for span drawing */ + GCPtr cleargc; /* GC for clearing the color buffer */ + GCPtr swapgc; /* GC for swapping the color buffers */ +}; + +static void +__glXDRIdrawableDestroy(__GLXdrawable *drawable) +{ + __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable; + const __DRIcoreExtension *core = private->screen->core; + + (*core->destroyDrawable)(private->driDrawable); + + FreeScratchGC(private->gc); + FreeScratchGC(private->cleargc); + FreeScratchGC(private->swapgc); + + xfree(private); +} + +static GLboolean +__glXDRIdrawableResize(__GLXdrawable *glxPriv) +{ + /* Nothing to do here, the DRI driver asks the server for drawable + * geometry when it sess the SAREA timestamps change.*/ + + return GL_TRUE; +} + +static GLboolean +__glXDRIdrawableSwapBuffers(__GLXdrawable *drawable) +{ + __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable; + const __DRIcoreExtension *core = private->screen->core; + + (*core->swapBuffers)(private->driDrawable); + + return TRUE; +} + +static void +__glXDRIdrawableCopySubBuffer(__GLXdrawable *basePrivate, + int x, int y, int w, int h) +{ + __GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate; + const __DRIcopySubBufferExtension *copySubBuffer = + private->screen->copySubBuffer; + + if (copySubBuffer) + (*copySubBuffer->copySubBuffer)(private->driDrawable, x, y, w, h); +} + +static void +__glXDRIcontextDestroy(__GLXcontext *baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen; + + (*screen->core->destroyContext)(context->driContext); + __glXContextDestroy(&context->base); + xfree(context); +} + +static int +__glXDRIcontextMakeCurrent(__GLXcontext *baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv; + __GLXDRIdrawable *read = (__GLXDRIdrawable *) baseContext->readPriv; + __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen; + + return (*screen->core->bindContext)(context->driContext, + draw->driDrawable, + read->driDrawable); +} + +static int +__glXDRIcontextLoseCurrent(__GLXcontext *baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen; + + return (*screen->core->unbindContext)(context->driContext); +} + +static int +__glXDRIcontextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc, + unsigned long mask) +{ + __GLXDRIcontext *dst = (__GLXDRIcontext *) baseDst; + __GLXDRIcontext *src = (__GLXDRIcontext *) baseSrc; + __GLXDRIscreen *screen = (__GLXDRIscreen *) dst->base.pGlxScreen; + + return (*screen->core->copyContext)(dst->driContext, + src->driContext, mask); +} + +static int +__glXDRIcontextForceCurrent(__GLXcontext *baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv; + __GLXDRIdrawable *read = (__GLXDRIdrawable *) baseContext->readPriv; + __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen; + + return (*screen->core->bindContext)(context->driContext, + draw->driDrawable, + read->driDrawable); +} + +#ifdef __DRI_TEX_BUFFER + +static int +__glXDRIbindTexImage(__GLXcontext *baseContext, + int buffer, + __GLXdrawable *glxPixmap) +{ + __GLXDRIdrawable *drawable = (__GLXDRIdrawable *) glxPixmap; + const __DRItexBufferExtension *texBuffer = drawable->screen->texBuffer; + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + + if (texBuffer == NULL) + return Success; + + texBuffer->setTexBuffer(context->driContext, + glxPixmap->target, + drawable->driDrawable); + + return Success; +} + +static int +__glXDRIreleaseTexImage(__GLXcontext *baseContext, + int buffer, + __GLXdrawable *pixmap) +{ + /* FIXME: Just unbind the texture? */ + return Success; +} + +#else + +static int +__glXDRIbindTexImage(__GLXcontext *baseContext, + int buffer, + __GLXdrawable *glxPixmap) +{ + return Success; +} + +static int +__glXDRIreleaseTexImage(__GLXcontext *baseContext, + int buffer, + __GLXdrawable *pixmap) +{ + return Success; +} + +#endif + +static __GLXtextureFromPixmap __glXDRItextureFromPixmap = { + __glXDRIbindTexImage, + __glXDRIreleaseTexImage +}; + +static void +__glXDRIscreenDestroy(__GLXscreen *baseScreen) +{ + __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen; + + (*screen->core->destroyScreen)(screen->driScreen); + + dlclose(screen->driver); + + __glXScreenDestroy(baseScreen); + + xfree(screen); +} + +static __GLXcontext * +__glXDRIscreenCreateContext(__GLXscreen *baseScreen, + __GLXconfig *glxConfig, + __GLXcontext *baseShareContext) +{ + __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen; + __GLXDRIcontext *context, *shareContext; + __GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig; + const __DRIcoreExtension *core = screen->core; + __DRIcontext *driShare; + + shareContext = (__GLXDRIcontext *) baseShareContext; + if (shareContext) + driShare = shareContext->driContext; + else + driShare = NULL; + + context = xalloc(sizeof *context); + if (context == NULL) + return NULL; + + memset(context, 0, sizeof *context); + context->base.destroy = __glXDRIcontextDestroy; + context->base.makeCurrent = __glXDRIcontextMakeCurrent; + context->base.loseCurrent = __glXDRIcontextLoseCurrent; + context->base.copy = __glXDRIcontextCopy; + context->base.forceCurrent = __glXDRIcontextForceCurrent; + context->base.textureFromPixmap = &__glXDRItextureFromPixmap; + + context->driContext = + (*core->createNewContext)(screen->driScreen, + config->driConfig, driShare, context); + + return &context->base; +} + +static void +glxChangeGC(GCPtr gc, BITS32 mask, CARD32 val) +{ + CARD32 v[1]; + v[0] = val; + dixChangeGC(NullClient, gc, mask, v, NULL); +} + +static __GLXdrawable * +__glXDRIscreenCreateDrawable(__GLXscreen *screen, + DrawablePtr pDraw, + int type, + XID drawId, + __GLXconfig *glxConfig) +{ + __GLXDRIscreen *driScreen = (__GLXDRIscreen *) screen; + __GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig; + __GLXDRIdrawable *private; + + ScreenPtr pScreen = driScreen->base.pScreen; + + private = xalloc(sizeof *private); + if (private == NULL) + return NULL; + + memset(private, 0, sizeof *private); + + private->screen = driScreen; + if (!__glXDrawableInit(&private->base, screen, + pDraw, type, drawId, glxConfig)) { + xfree(private); + return NULL; + } + + private->base.destroy = __glXDRIdrawableDestroy; + private->base.resize = __glXDRIdrawableResize; + private->base.swapBuffers = __glXDRIdrawableSwapBuffers; + private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer; + + private->gc = CreateScratchGC(pScreen, pDraw->depth); + private->cleargc = CreateScratchGC(pScreen, pDraw->depth); + private->swapgc = CreateScratchGC(pScreen, pDraw->depth); + + glxChangeGC(private->gc, GCFunction, GXcopy); + glxChangeGC(private->cleargc, GCFunction, GXcopy); + glxChangeGC(private->swapgc, GCFunction, GXcopy); + glxChangeGC(private->swapgc, GCGraphicsExposures, FALSE); + + private->driDrawable = + (*driScreen->swrast->createNewDrawable)(driScreen->driScreen, + config->driConfig, + private); + + return &private->base; +} + +static void +swrastGetDrawableInfo(__DRIdrawable *draw, + int *x, int *y, int *w, int *h, + void *loaderPrivate) +{ + __GLXDRIdrawable *drawable = loaderPrivate; + DrawablePtr pDraw = drawable->base.pDraw; + + *x = pDraw->x; + *y = pDraw->x; + *w = pDraw->width; + *h = pDraw->height; +} + +static void +swrastPutImage(__DRIdrawable *draw, int op, + int x, int y, int w, int h, char *data, + void *loaderPrivate) +{ + __GLXDRIdrawable *drawable = loaderPrivate; + DrawablePtr pDraw = drawable->base.pDraw; + GCPtr gc; + + switch (op) { + case __DRI_SWRAST_IMAGE_OP_DRAW: + gc = drawable->gc; + break; + case __DRI_SWRAST_IMAGE_OP_CLEAR: + gc = drawable->cleargc; + break; + case __DRI_SWRAST_IMAGE_OP_SWAP: + gc = drawable->swapgc; + break; + default: + return; + } + + ValidateGC(pDraw, gc); + + gc->ops->PutImage(pDraw, gc, pDraw->depth, + x, y, w, h, 0, ZPixmap, data); +} + +static void +swrastGetImage(__DRIdrawable *draw, + int x, int y, int w, int h, char *data, + void *loaderPrivate) +{ + __GLXDRIdrawable *drawable = loaderPrivate; + DrawablePtr pDraw = drawable->base.pDraw; + ScreenPtr pScreen = pDraw->pScreen; + + pScreen->GetImage(pDraw, x, y, w, h, ZPixmap, ~0L, data); +} + +static const __DRIswrastLoaderExtension swrastLoaderExtension = { + { __DRI_SWRAST_LOADER, __DRI_SWRAST_LOADER_VERSION }, + swrastGetDrawableInfo, + swrastPutImage, + swrastGetImage +}; + +static const __DRIextension *loader_extensions[] = { + &systemTimeExtension.base, + &swrastLoaderExtension.base, + NULL +}; + +static void +initializeExtensions(__GLXDRIscreen *screen) +{ + const __DRIextension **extensions; + int i; + + extensions = screen->core->getExtensions(screen->driScreen); + + for (i = 0; extensions[i]; i++) { +#ifdef __DRI_COPY_SUB_BUFFER + if (strcmp(extensions[i]->name, __DRI_COPY_SUB_BUFFER) == 0) { + screen->copySubBuffer = + (const __DRIcopySubBufferExtension *) extensions[i]; + /* GLX_MESA_copy_sub_buffer is always enabled. */ + } +#endif + +#ifdef __DRI_TEX_BUFFER + if (strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0) { + screen->texBuffer = + (const __DRItexBufferExtension *) extensions[i]; + /* GLX_EXT_texture_from_pixmap is always enabled. */ + } +#endif + /* Ignore unknown extensions */ + } +} + +static const char dri_driver_path[] = DRI_DRIVER_PATH; + +static __GLXscreen * +__glXDRIscreenProbe(ScreenPtr pScreen) +{ + const char *driverName = "swrast"; + __GLXDRIscreen *screen; + char filename[128]; + unsigned int sareaHandle; + const __DRIextension **extensions; + const __DRIconfig **driConfigs; + int i; + + screen = xalloc(sizeof *screen); + if (screen == NULL) + return NULL; + memset(screen, 0, sizeof *screen); + + screen->base.destroy = __glXDRIscreenDestroy; + screen->base.createContext = __glXDRIscreenCreateContext; + screen->base.createDrawable = __glXDRIscreenCreateDrawable; + screen->base.swapInterval = NULL; + screen->base.pScreen = pScreen; + + snprintf(filename, sizeof filename, + "%s/%s_dri.so", dri_driver_path, driverName); + + screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL); + if (screen->driver == NULL) { + LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n", + filename, dlerror()); + goto handle_error; + } + + extensions = dlsym(screen->driver, __DRI_DRIVER_EXTENSIONS); + if (extensions == NULL) { + LogMessage(X_ERROR, "AIGLX error: %s exports no extensions (%s)\n", + driverName, dlerror()); + goto handle_error; + } + + for (i = 0; extensions[i]; i++) { + if (strcmp(extensions[i]->name, __DRI_CORE) == 0 && + extensions[i]->version >= __DRI_CORE_VERSION) { + screen->core = (const __DRIcoreExtension *) extensions[i]; + } + if (strcmp(extensions[i]->name, __DRI_SWRAST) == 0 && + extensions[i]->version >= __DRI_SWRAST_VERSION) { + screen->swrast = (const __DRIswrastExtension *) extensions[i]; + } + } + + if (screen->core == NULL || screen->swrast == NULL) { + LogMessage(X_ERROR, "AIGLX error: %s exports no DRI extension\n", + driverName); + goto handle_error; + } + + sareaHandle = 0; + screen->driScreen = + (*screen->swrast->createNewScreen)(pScreen->myNum, + loader_extensions, + &driConfigs, + screen); + + if (screen->driScreen == NULL) { + LogMessage(X_ERROR, "AIGLX error: Calling driver entry point failed"); + goto handle_error; + } + + initializeExtensions(screen); + + screen->base.fbconfigs = glxConvertConfigs(screen->core, driConfigs); + + __glXScreenInit(&screen->base, pScreen); + + LogMessage(X_INFO, + "AIGLX: Loaded and initialized %s\n", filename); + + return &screen->base; + + handle_error: + if (screen->driver) + dlclose(screen->driver); + + xfree(screen); + + LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n"); + + return NULL; +} + +__GLXprovider __glXDRIswrastProvider = { + __glXDRIscreenProbe, + "DRISWRAST", + NULL +}; diff --git a/hw/xfree86/dixmods/glxmodule.c b/hw/xfree86/dixmods/glxmodule.c index 88091cd69..dc94a129f 100644 --- a/hw/xfree86/dixmods/glxmodule.c +++ b/hw/xfree86/dixmods/glxmodule.c @@ -90,6 +90,10 @@ glxSetup(pointer module, pointer opts, int *errmaj, int *errmin) return NULL; GlxPushProvider(provider); + provider = LoaderSymbol("__glXDRIswrastProvider"); + if (provider) + GlxPushProvider(provider); + xf86Msg(xf86Info.aiglxFrom, "AIGLX %s\n", xf86Info.aiglx ? "enabled" : "disabled"); if (xf86Info.aiglx) { diff --git a/mi/miinitext.c b/mi/miinitext.c index 9a8736061..bc8d54e9c 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -288,6 +288,7 @@ extern void XFree86DGAExtensionInit(INITARGS); #ifdef GLXEXT typedef struct __GLXprovider __GLXprovider; extern __GLXprovider __glXMesaProvider; +extern __GLXprovider __glXDRIswrastProvider; extern void GlxPushProvider(__GLXprovider *impl); extern void GlxExtensionInit(INITARGS); #endif @@ -573,6 +574,7 @@ InitExtensions(argc, argv) #ifdef GLXEXT GlxPushProvider(&__glXMesaProvider); + GlxPushProvider(&__glXDRIswrastProvider); if (!noGlxExtension) GlxExtensionInit(); #endif } From 8b3d26f5b6caff1766669deb0e2100d2dee3f185 Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Tue, 20 May 2008 12:39:28 -0700 Subject: [PATCH 556/634] Short-circuit PanoramiXTranslateVisualID after verifying that the visual actually exists first. This allows using PanoramiXTranslateVisualID to test whether a given visual made it through PanoramiXVisualConsolidate. --- Xext/panoramiX.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index eb7068925..2792dc714 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -850,10 +850,6 @@ PanoramiXTranslateVisualID(int screen, VisualID orig) VisualPtr pVisual = NULL; int i; - /* if screen is 0, orig is already the correct visual ID */ - if (screen == 0) - return orig; - for (i = 0; i < PanoramiXNumVisuals; i++) { if (orig == PanoramiXVisuals[i].vid) { pVisual = &PanoramiXVisuals[i]; @@ -864,6 +860,10 @@ PanoramiXTranslateVisualID(int screen, VisualID orig) if (!pVisual) return 0; + /* if screen is 0, orig is already the correct visual ID */ + if (screen == 0) + return orig; + /* found the original, now translate it relative to the backend screen */ for (i = 0; i < pOtherScreen->numVisuals; i++) { VisualPtr pOtherVisual = &pOtherScreen->visuals[i]; From 2ae3bed33731d800bb28a968e3a1c8066d179740 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 21 May 2008 15:51:35 +0930 Subject: [PATCH 557/634] mi: shut up compiler warning (return w/o a value) --- mi/mipointer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mi/mipointer.c b/mi/mipointer.c index 484947da9..0d5c98419 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -199,7 +199,7 @@ miPointerDisplayCursor (pDev, pScreen, pCursor) /* return for keyboards */ if ((pDev->isMaster && !DevHasCursor(pDev)) || (!pDev->isMaster && pDev->u.master && !DevHasCursor(pDev->u.master))) - return; + return FALSE; pPointer = MIPOINTER(pDev); From 5c5a1eaf68eb11053fd5b99d24eb8024b6d5b218 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 21 May 2008 21:51:27 +0930 Subject: [PATCH 558/634] Replace UniSA with full Uni name in Author affiliation. Big boss says UniSA isn't unique enough. Who am I to argue? --- Xext/geext.c | 2 +- Xext/geint.h | 2 +- Xi/chaccess.c | 2 +- Xi/chaccess.h | 2 +- Xi/chdevcur.c | 2 +- Xi/chdevcur.h | 2 +- Xi/chdevhier.c | 2 +- Xi/chdevhier.h | 2 +- Xi/extgrbdev.c | 2 +- Xi/extgrbdev.h | 2 +- Xi/getcptr.c | 2 +- Xi/getcptr.h | 2 +- Xi/qryacces.c | 2 +- Xi/qryacces.h | 2 +- Xi/querydp.c | 2 +- Xi/querydp.h | 2 +- Xi/setcptr.c | 2 +- Xi/setcptr.h | 2 +- Xi/warpdevp.c | 2 +- Xi/warpdevp.h | 2 +- Xi/xiselev.c | 2 +- Xi/xiselev.h | 2 +- dix/access.c | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Xext/geext.c b/Xext/geext.c index afede22c7..e49e71f66 100644 --- a/Xext/geext.c +++ b/Xext/geext.c @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ #ifdef HAVE_DIX_CONFIG_H diff --git a/Xext/geint.h b/Xext/geint.h index 2e0eb094c..60cba7d72 100644 --- a/Xext/geint.h +++ b/Xext/geint.h @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/Xi/chaccess.c b/Xi/chaccess.c index 3ef29fc71..a6798b793 100644 --- a/Xi/chaccess.c +++ b/Xi/chaccess.c @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ #define NEED_EVENTS diff --git a/Xi/chaccess.h b/Xi/chaccess.h index 090258c9f..baea69ca2 100644 --- a/Xi/chaccess.h +++ b/Xi/chaccess.h @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ #ifdef HAVE_DIX_CONFIG_H diff --git a/Xi/chdevcur.c b/Xi/chdevcur.c index 867bf9787..121f7921d 100644 --- a/Xi/chdevcur.c +++ b/Xi/chdevcur.c @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ /*********************************************************************** diff --git a/Xi/chdevcur.h b/Xi/chdevcur.h index af8627913..e6df9eb89 100644 --- a/Xi/chdevcur.h +++ b/Xi/chdevcur.h @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ #ifdef HAVE_DIX_CONFIG_H diff --git a/Xi/chdevhier.c b/Xi/chdevhier.c index 1d5784364..99957fe0c 100644 --- a/Xi/chdevhier.c +++ b/Xi/chdevhier.c @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ /*********************************************************************** diff --git a/Xi/chdevhier.h b/Xi/chdevhier.h index 85c1a39a7..07afd53ec 100644 --- a/Xi/chdevhier.h +++ b/Xi/chdevhier.h @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ /*********************************************************************** diff --git a/Xi/extgrbdev.c b/Xi/extgrbdev.c index c92c31dcd..1a2584fb6 100644 --- a/Xi/extgrbdev.c +++ b/Xi/extgrbdev.c @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ /*********************************************************************** diff --git a/Xi/extgrbdev.h b/Xi/extgrbdev.h index 7e2b0ea83..6e3e371a5 100644 --- a/Xi/extgrbdev.h +++ b/Xi/extgrbdev.h @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ #ifdef HAVE_DIX_CONFIG_H diff --git a/Xi/getcptr.c b/Xi/getcptr.c index c85fced68..ae45b13ae 100644 --- a/Xi/getcptr.c +++ b/Xi/getcptr.c @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ #define NEED_EVENTS diff --git a/Xi/getcptr.h b/Xi/getcptr.h index cf8cd2e45..27458338d 100644 --- a/Xi/getcptr.h +++ b/Xi/getcptr.h @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ #ifdef HAVE_DIX_CONFIG_H diff --git a/Xi/qryacces.c b/Xi/qryacces.c index b3cc27a39..99221ea7e 100644 --- a/Xi/qryacces.c +++ b/Xi/qryacces.c @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ #define NEED_EVENTS diff --git a/Xi/qryacces.h b/Xi/qryacces.h index 085d93a8b..238cdba9a 100644 --- a/Xi/qryacces.h +++ b/Xi/qryacces.h @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ #ifdef HAVE_DIX_CONFIG_H diff --git a/Xi/querydp.c b/Xi/querydp.c index bd0a1c54e..d63bed144 100644 --- a/Xi/querydp.c +++ b/Xi/querydp.c @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ /*********************************************************************** diff --git a/Xi/querydp.h b/Xi/querydp.h index e8c5165ba..5370ed49a 100644 --- a/Xi/querydp.h +++ b/Xi/querydp.h @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ #ifdef HAVE_DIX_CONFIG_H diff --git a/Xi/setcptr.c b/Xi/setcptr.c index f73a44cb0..81ce66bd5 100644 --- a/Xi/setcptr.c +++ b/Xi/setcptr.c @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ /*********************************************************************** diff --git a/Xi/setcptr.h b/Xi/setcptr.h index 114623cc4..df38addee 100644 --- a/Xi/setcptr.h +++ b/Xi/setcptr.h @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ #ifdef HAVE_DIX_CONFIG_H diff --git a/Xi/warpdevp.c b/Xi/warpdevp.c index 5ea613205..3720441d9 100644 --- a/Xi/warpdevp.c +++ b/Xi/warpdevp.c @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ /*********************************************************************** diff --git a/Xi/warpdevp.h b/Xi/warpdevp.h index 7034e163a..00a4dffad 100644 --- a/Xi/warpdevp.h +++ b/Xi/warpdevp.h @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ #ifdef HAVE_DIX_CONFIG_H diff --git a/Xi/xiselev.c b/Xi/xiselev.c index fc0a0f0f5..0f8433451 100644 --- a/Xi/xiselev.c +++ b/Xi/xiselev.c @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ #define NEED_EVENTS diff --git a/Xi/xiselev.h b/Xi/xiselev.h index e84640744..b751c5d1b 100644 --- a/Xi/xiselev.h +++ b/Xi/xiselev.h @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ #ifdef HAVE_DIX_CONFIG_H diff --git a/dix/access.c b/dix/access.c index e29ab867f..f71b3cc8b 100644 --- a/dix/access.c +++ b/dix/access.c @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * Author: Peter Hutterer, UniSA, NICTA + * Author: Peter Hutterer, University of South Australia, NICTA */ /* This file controls the access control lists for each window. From 641ce9c706ce3cbf726fb3fc9623161bb96ba127 Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Thu, 3 Jan 2008 17:28:04 +0200 Subject: [PATCH 559/634] drop xprint remnants: xpstubs --- configure.ac | 18 +++++++----------- dix/Makefile.am | 7 +------ dix/xpstubs.c | 50 ------------------------------------------------- 3 files changed, 8 insertions(+), 67 deletions(-) delete mode 100644 dix/xpstubs.c diff --git a/configure.ac b/configure.ac index 311f5c5aa..8244d7e32 100644 --- a/configure.ac +++ b/configure.ac @@ -581,9 +581,6 @@ AC_ARG_ENABLE(xsdl, AS_HELP_STRING([--enable-xsdl], [Build the kdrive AC_ARG_ENABLE(xfake, AS_HELP_STRING([--enable-xfake], [Build the kdrive 'fake' server (default: auto)]), [XFAKE=$enableval], [XFAKE=auto]) AC_ARG_ENABLE(xfbdev, AS_HELP_STRING([--enable-xfbdev], [Build the kdrive framebuffer device server (default: auto)]), [XFBDEV=$enableval], [XFBDEV=auto]) AC_ARG_ENABLE(kdrive-vesa, AS_HELP_STRING([--enable-kdrive-vesa], [Build the kdrive VESA-based servers (default: auto)]), [KDRIVEVESA=$enableval], [KDRIVEVESA=auto]) -dnl xprint -AC_ARG_ENABLE(freetype, AS_HELP_STRING([ --enable-freetype], [Build Xprint FreeType backend (default: yes)]), [XP_USE_FREETYPE=$enableval],[XP_USE_FREETYPE=no]) -AC_ARG_WITH(freetype-config, AS_HELP_STRING([ --with-freetype-config=PROG], [Use FreeType configuration program PROG (default: auto)]), freetype_config=$withval, freetype_config=auto) dnl chown/chmod to be setuid root as part of build @@ -1124,7 +1121,6 @@ FB_LIB='$(top_builddir)/fb/libfb.la' FB_INC='-I$(top_srcdir)/fb' MIEXT_SHADOW_INC='-I$(top_srcdir)/miext/shadow' MIEXT_SHADOW_LIB='$(top_builddir)/miext/shadow/libshadow.la' -XPSTUBS_LIB='$(top_builddir)/dix/libxpstubs.la' CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include' PKG_CHECK_MODULES([XSERVERCFLAGS], [$REQUIRED_MODULES $REQUIRED_LIBS]) @@ -1231,7 +1227,7 @@ AC_MSG_RESULT([$XVFB]) AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes]) if test "x$XVFB" = xyes; then - XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB" + XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB" XVFB_SYS_LIBS="$XVFBMODULES_LIBS" AC_SUBST([XVFB_LIBS]) AC_SUBST([XVFB_SYS_LIBS]) @@ -1249,7 +1245,7 @@ AC_MSG_RESULT([$XNEST]) AM_CONDITIONAL(XNEST, [test "x$XNEST" = xyes]) if test "x$XNEST" = xyes; then - XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $DIX_LIB $OS_LIB $CONFIG_LIB" + XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DIX_LIB $OS_LIB $CONFIG_LIB" XNEST_SYS_LIBS="$XNESTMODULES_LIBS" AC_SUBST([XNEST_LIBS]) AC_SUBST([XNEST_SYS_LIBS]) @@ -1279,7 +1275,7 @@ AC_MSG_RESULT([$XGL]) AM_CONDITIONAL(XGL, [test "x$XGL" = xyes]) if test "x$XGL" = xyes; then - XGL_LIBS="$FB_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB" + XGL_LIBS="$FB_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB" XGL_SYS_LIBS="$XGLMODULES_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS" AC_SUBST([XGL_LIBS]) AC_SUBST([XGL_SYS_LIBS]) @@ -1301,7 +1297,7 @@ AC_MSG_RESULT([$XEGL]) AM_CONDITIONAL(XEGL, [test "x$XEGL" = xyes]) if test "x$XEGL" = xyes; then - XEGL_LIBS="$FB_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB" + XEGL_LIBS="$FB_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB" XEGL_SYS_LIBS = "$XEGL_SYS_LIBS $XEGLMODULES_LIBS $GLX_SYS_LIBS" AC_SUBST([XEGL_LIBS]) AC_SUBST([XEGL_SYS_LIBS]) @@ -1318,7 +1314,7 @@ AC_MSG_RESULT([$XGLX]) AM_CONDITIONAL(XGLX, [test "x$XGLX" = xyes]) if test "x$XGLX" = xyes; then - XGLX_LIBS="$FB_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB" + XGLX_LIBS="$FB_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB" XGLX_SYS_LIBS="$XGLX_SYS_LIBS $XGLXMODULES_LIBS $GLX_SYS_LIBS" AC_SUBST([XGLX_LIBS]) AC_SUBST([XGLX_SYS_LIBS]) @@ -1336,7 +1332,7 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os' XORG_INCS="$XORG_DDXINCS $XORG_OSINCS" XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H" - XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XPSTUBS_LIB $SELINUX_LIB" + XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $SELINUX_LIB" PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0]) SAVE_LIBS=$LIBS @@ -1864,7 +1860,7 @@ if test "$KDRIVE" = yes; then KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS" - KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB" + KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $OS_LIB" KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a' case $host_os in *linux*) diff --git a/dix/Makefile.am b/dix/Makefile.am index ac5d344e9..4fe4b1eb2 100644 --- a/dix/Makefile.am +++ b/dix/Makefile.am @@ -1,6 +1,4 @@ -standard_dix_libs = libdix.la libxpstubs.la - -noinst_LTLIBRARIES = $(standard_dix_libs) +noinst_LTLIBRARIES = libdix.la AM_CFLAGS = $(DIX_CFLAGS) \ -DVENDOR_NAME=\""@VENDOR_NAME@"\" \ @@ -38,9 +36,6 @@ libdix_la_SOURCES = \ window.c \ strcasecmp.c -libxpstubs_la_SOURCES = \ - xpstubs.c - EXTRA_DIST = buildatoms BuiltInAtoms CHANGES Xserver.d Xserver-dtrace.h.in # Install list of protocol names diff --git a/dix/xpstubs.c b/dix/xpstubs.c deleted file mode 100644 index f8cd207eb..000000000 --- a/dix/xpstubs.c +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 1996, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. -*/ - - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "misc.h" -#include -extern Bool XpClientIsBitmapClient(ClientPtr client); -extern Bool XpClientIsPrintClient(ClientPtr client, FontPathElementPtr fpe); - -Bool -XpClientIsBitmapClient( - ClientPtr client) -{ - return TRUE; -} - -Bool -XpClientIsPrintClient( - ClientPtr client, - FontPathElementPtr fpe) -{ - return FALSE; -} From 255142b61eb73843b16c2afdb95aa4d1f27e4f0d Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Thu, 3 Jan 2008 17:53:56 +0200 Subject: [PATCH 560/634] drop xprint remnants: InitGlobals --- dix/main.c | 1 - hw/dmx/dmxinit.c | 7 ------- hw/kdrive/src/kdrive.c | 2 -- hw/vfb/InitOutput.c | 5 ----- hw/xfree86/common/xf86Init.c | 5 ----- hw/xgl/glx/xglxinit.c | 4 ---- hw/xgl/xglinit.c | 4 ---- hw/xnest/Args.c | 10 ---------- hw/xquartz/darwin.c | 9 --------- hw/xwin/InitOutput.c | 5 ----- include/os.h | 4 ---- mi/miinitext.c | 1 + os/utils.c | 11 ----------- 13 files changed, 1 insertion(+), 67 deletions(-) diff --git a/dix/main.c b/dix/main.c index 2e12b709f..1972fd913 100644 --- a/dix/main.c +++ b/dix/main.c @@ -246,7 +246,6 @@ int main(int argc, char *argv[], char *envp[]) display = "0"; - InitGlobals(); InitRegions(); CheckUserParameters(argc, argv, envp); diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c index 29dc00575..366bd1423 100644 --- a/hw/dmx/dmxinit.c +++ b/hw/dmx/dmxinit.c @@ -873,13 +873,6 @@ void OsVendorFatalError(void) { } -/** This funciton is called by InitGlobals from Xserver/os/utils.c to - * initialize any ddx specific globals at a very early point in the - * server startup. */ -void ddxInitGlobals(void) -{ -} - /** Process our command line arguments. */ int ddxProcessArgument(int argc, char *argv[], int i) { diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c index e2ee4adea..51dc633f7 100644 --- a/hw/kdrive/src/kdrive.c +++ b/hw/kdrive/src/kdrive.c @@ -1412,5 +1412,3 @@ DPMSSupported (void) } #endif -void ddxInitGlobals(void) { /* THANK YOU XPRINT */ } - diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c index 1edceb930..bdd1f934f 100644 --- a/hw/vfb/InitOutput.c +++ b/hw/vfb/InitOutput.c @@ -266,11 +266,6 @@ ddxUseMsg() #endif } -/* ddxInitGlobals - called by |InitGlobals| from os/util.c */ -void ddxInitGlobals(void) -{ -} - int ddxProcessArgument(int argc, char *argv[], int i) { diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 4e1f6d6b3..6d123d690 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -1696,11 +1696,6 @@ ddxProcessArgument(int argc, char **argv, int i) return xf86ProcessArgument(argc, argv, i); } -/* ddxInitGlobals - called by |InitGlobals| from os/util.c */ -void ddxInitGlobals(void) -{ -} - /* * ddxUseMsg -- * Print out correct use of device dependent commandline options. diff --git a/hw/xgl/glx/xglxinit.c b/hw/xgl/glx/xglxinit.c index b87e5d682..0348d1fe8 100644 --- a/hw/xgl/glx/xglxinit.c +++ b/hw/xgl/glx/xglxinit.c @@ -166,7 +166,3 @@ OsVendorInit (void) { xglxOsVendorInit (); } - -void ddxInitGlobals() -{ -} diff --git a/hw/xgl/xglinit.c b/hw/xgl/xglinit.c index e0c9e7ded..f170e92f0 100644 --- a/hw/xgl/xglinit.c +++ b/hw/xgl/xglinit.c @@ -330,7 +330,3 @@ OsVendorInit (void) if (xglEnsureDDXModule ()) (*__ddxFunc.osVendorInit) (); } - -void ddxInitGlobals() -{ -} diff --git a/hw/xnest/Args.c b/hw/xnest/Args.c index 209f175ab..b95f70093 100644 --- a/hw/xnest/Args.c +++ b/hw/xnest/Args.c @@ -49,16 +49,6 @@ int xnestNumScreens = 0; Bool xnestDoDirectColormaps = False; Window xnestParentWindow = 0; -/* ddxInitGlobals - called by |InitGlobals| from os/util.c */ -void ddxInitGlobals(void) -{ -#ifdef COMPOSITE - /* XXX terrible hack */ - extern Bool noCompositeExtension; - noCompositeExtension = TRUE; -#endif -} - int ddxProcessArgument (int argc, char *argv[], int i) { diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index 4f3553393..51224b6d1 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -677,15 +677,6 @@ void OsVendorInit(void) } -/* - * ddxInitGlobals - * Called by InitGlobals() from os/util.c. - */ -void ddxInitGlobals(void) -{ -} - - /* * ddxProcessArgument * Process device-dependent command line args. Returns 0 if argument is diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c index d2159813c..abc35b943 100644 --- a/hw/xwin/InitOutput.c +++ b/hw/xwin/InitOutput.c @@ -920,11 +920,6 @@ ddxUseMsg(void) MB_ICONINFORMATION); } -/* ddxInitGlobals - called by |InitGlobals| from os/util.c */ -void ddxInitGlobals(void) -{ -} - /* See Porting Layer Definition - p. 20 */ /* * Do any global initialization, then initialize each screen. diff --git a/include/os.h b/include/os.h index fd3407718..89c624c38 100644 --- a/include/os.h +++ b/include/os.h @@ -212,8 +212,6 @@ extern SIGVAL GiveUp(int /*sig*/); extern void UseMsg(void); -extern void InitGlobals(void); - extern void ProcessCommandLine(int /*argc*/, char* /*argv*/[]); extern int set_font_authorizations( @@ -411,8 +409,6 @@ extern XID GenerateAuthorization( extern void ExpandCommandLine(int * /*pargc*/, char *** /*pargv*/); #endif -extern void ddxInitGlobals(void); - extern int ddxProcessArgument(int /*argc*/, char * /*argv*/ [], int /*i*/); extern void ddxUseMsg(void); diff --git a/mi/miinitext.c b/mi/miinitext.c index bc8d54e9c..ce57f6939 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -59,6 +59,7 @@ SOFTWARE. #ifdef HAVE_XNEST_CONFIG_H #include +#undef COMPOSITE #undef DPMSExtension #endif diff --git a/os/utils.c b/os/utils.c index 9aa510b4e..f3272d43a 100644 --- a/os/utils.c +++ b/os/utils.c @@ -659,17 +659,6 @@ VerifyDisplayName(const char *d) return( 1 ); } -/* - * This function is responsible for doing initalisation of any global - * variables at an very early point of server startup (even before - * |ProcessCommandLine()|. - */ -void InitGlobals(void) -{ - ddxInitGlobals(); -} - - /* * This function parses the command line. Handles device-independent fields * and allows ddx to handle additional fields. It is not allowed to modify From 88f43e5d06fb5543bc40ca060b2c5d8e2673afad Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Wed, 21 May 2008 18:13:47 +0300 Subject: [PATCH 561/634] glx: drop drm.h, sareaHandle from swrast loader --- GL/glx/glxdriswrast.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/GL/glx/glxdriswrast.c b/GL/glx/glxdriswrast.c index 5e98da49b..b3b95995d 100644 --- a/GL/glx/glxdriswrast.c +++ b/GL/glx/glxdriswrast.c @@ -35,7 +35,6 @@ #include #include -#include #include #include #include @@ -102,10 +101,10 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable) } static GLboolean -__glXDRIdrawableResize(__GLXdrawable *glxPriv) +__glXDRIdrawableResize(__GLXdrawable *drawable) { /* Nothing to do here, the DRI driver asks the server for drawable - * geometry when it sess the SAREA timestamps change.*/ + * geometry appropriately. */ return GL_TRUE; } @@ -456,7 +455,6 @@ __glXDRIscreenProbe(ScreenPtr pScreen) const char *driverName = "swrast"; __GLXDRIscreen *screen; char filename[128]; - unsigned int sareaHandle; const __DRIextension **extensions; const __DRIconfig **driConfigs; int i; @@ -506,7 +504,6 @@ __glXDRIscreenProbe(ScreenPtr pScreen) goto handle_error; } - sareaHandle = 0; screen->driScreen = (*screen->swrast->createNewScreen)(pScreen->myNum, loader_extensions, From 61eaef22359ae2abcee7dcd73ee8610a83776fc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 20 May 2008 16:56:27 -0400 Subject: [PATCH 562/634] Stop symlinking glcontextmodes.[ch] from mesa. --- GL/glx/Makefile.am | 4 ---- GL/symlink-mesa.sh | 2 -- 2 files changed, 6 deletions(-) diff --git a/GL/glx/Makefile.am b/GL/glx/Makefile.am index d86141f4e..620fc9b97 100644 --- a/GL/glx/Makefile.am +++ b/GL/glx/Makefile.am @@ -47,10 +47,6 @@ libglxdri_la_SOURCES = \ extension_string.c \ extension_string.h -#if XQUARTZ -XQUARTZ_libglx_la_SOURCES = glcontextmodes.c -#endif - libglx_la_SOURCES = \ $(XQUARTZ_libglx_la_SOURCES) \ g_disptab.h \ diff --git a/GL/symlink-mesa.sh b/GL/symlink-mesa.sh index def4f63f7..8deaa436f 100755 --- a/GL/symlink-mesa.sh +++ b/GL/symlink-mesa.sh @@ -64,8 +64,6 @@ symlink_glx() { dst_dir glx action indirect_size.h - action glcontextmodes.c - action glcontextmodes.h action indirect_dispatch.c action indirect_dispatch.h action indirect_dispatch_swap.c From 77ff8fd5072fa57158463bfd84656389eeb7b503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 21 May 2008 10:17:53 -0400 Subject: [PATCH 563/634] Drop glcore GLX provider. Obsoleted by the DRI swrast driver. --- GL/glx/Makefile.am | 1 - GL/glx/glxdriswrast.c | 2 +- GL/glx/glxglcore.c | 528 --------------------------------- hw/dmx/glxProxy/glxext.c | 2 +- hw/xfree86/dixmods/glxmodule.c | 5 - hw/xquartz/GL/indirect.c | 10 +- mi/miinitext.c | 6 +- 7 files changed, 9 insertions(+), 545 deletions(-) delete mode 100644 GL/glx/glxglcore.c diff --git a/GL/glx/Makefile.am b/GL/glx/Makefile.am index 620fc9b97..76fd6e649 100644 --- a/GL/glx/Makefile.am +++ b/GL/glx/Makefile.am @@ -57,7 +57,6 @@ libglx_la_SOURCES = \ glxdrawable.h \ glxext.c \ glxext.h \ - glxglcore.c \ glxdriswrast.c \ glxdricommon.c \ glxscreens.c \ diff --git a/GL/glx/glxdriswrast.c b/GL/glx/glxdriswrast.c index b3b95995d..50dee5111 100644 --- a/GL/glx/glxdriswrast.c +++ b/GL/glx/glxdriswrast.c @@ -537,7 +537,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) return NULL; } -__GLXprovider __glXDRIswrastProvider = { +__GLXprovider __glXDRISWRastProvider = { __glXDRIscreenProbe, "DRISWRAST", NULL diff --git a/GL/glx/glxglcore.c b/GL/glx/glxglcore.c deleted file mode 100644 index dafa9bca7..000000000 --- a/GL/glx/glxglcore.c +++ /dev/null @@ -1,528 +0,0 @@ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Kevin E. Martin - * Brian E. Paul - * - */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include - -#define _NEED_GL_CORE_IF -#include -#include -#include -#include -#include -#include -#include - -#include "os.h" - -#define XMesaCreateVisual (*glcore->XMesaCreateVisual) -#define XMesaDestroyVisual (*glcore->XMesaDestroyVisual) - -#define XMesaCreateWindowBuffer (*glcore->XMesaCreateWindowBuffer) -#define XMesaCreatePixmapBuffer (*glcore->XMesaCreatePixmapBuffer) -#define XMesaDestroyBuffer (*glcore->XMesaDestroyBuffer) -#define XMesaSwapBuffers (*glcore->XMesaSwapBuffers) -#define XMesaResizeBuffers (*glcore->XMesaResizeBuffers) - -#define XMesaCreateContext (*glcore->XMesaCreateContext) -#define XMesaDestroyContext (*glcore->XMesaDestroyContext) -#define XMesaCopyContext (*glcore->XMesaCopyContext) -#define XMesaMakeCurrent2 (*glcore->XMesaMakeCurrent2) -#define XMesaForceCurrent (*glcore->XMesaForceCurrent) -#define XMesaLoseCurrent (*glcore->XMesaLoseCurrent) - -typedef struct __GLXMESAscreen __GLXMESAscreen; -typedef struct __GLXMESAcontext __GLXMESAcontext; -typedef struct __GLXMESAdrawable __GLXMESAdrawable; - -struct __GLXMESAscreen { - __GLXscreen base; - int index; - int num_vis; - XMesaVisual *xm_vis; - void *driver; - - const __GLcoreModule *glcore; -}; - -struct __GLXMESAcontext { - __GLXcontext base; - XMesaContext xmesa; -}; - -struct __GLXMESAdrawable { - __GLXdrawable base; - XMesaBuffer xm_buf; - __GLXMESAscreen *screen; -}; - -static XMesaVisual find_mesa_visual(__GLXscreen *screen, XID fbconfigID); - - -static void -__glXMesaDrawableDestroy(__GLXdrawable *base) -{ - __GLXMESAdrawable *glxPriv = (__GLXMESAdrawable *) base; - const __GLcoreModule *glcore = glxPriv->screen->glcore; - - if (glxPriv->xm_buf != NULL) - XMesaDestroyBuffer(glxPriv->xm_buf); - xfree(glxPriv); -} - -static GLboolean -__glXMesaDrawableResize(__GLXdrawable *base) -{ - __GLXMESAdrawable *glxPriv = (__GLXMESAdrawable *) base; - const __GLcoreModule *glcore = glxPriv->screen->glcore; - - XMesaResizeBuffers(glxPriv->xm_buf); - - return GL_TRUE; -} - -static GLboolean -__glXMesaDrawableSwapBuffers(__GLXdrawable *base) -{ - __GLXMESAdrawable *glxPriv = (__GLXMESAdrawable *) base; - const __GLcoreModule *glcore = glxPriv->screen->glcore; - - /* This is terrifying: XMesaSwapBuffers() ends up calling CopyArea - * to do the buffer swap, but this assumes that the server holds - * the lock and has its context visible. If another screen uses a - * DRI driver, that will have installed the DRI enter/leave server - * functions, which lifts the lock during GLX dispatch. This is - * why we need to re-take the lock and swap in the server context - * before calling XMesaSwapBuffers() here. /me shakes head. */ - - __glXenterServer(GL_FALSE); - - XMesaSwapBuffers(glxPriv->xm_buf); - - __glXleaveServer(GL_FALSE); - - return GL_TRUE; -} - - -static __GLXdrawable * -__glXMesaScreenCreateDrawable(__GLXscreen *screen, - DrawablePtr pDraw, int type, - XID drawId, - __GLXconfig *modes) -{ - __GLXMESAscreen *mesaScreen = (__GLXMESAscreen *) screen; - const __GLcoreModule *glcore = mesaScreen->glcore; - __GLXMESAdrawable *glxPriv; - XMesaVisual xm_vis; - - glxPriv = xalloc(sizeof *glxPriv); - if (glxPriv == NULL) - return NULL; - - memset(glxPriv, 0, sizeof *glxPriv); - - glxPriv->screen = mesaScreen; - if (!__glXDrawableInit(&glxPriv->base, screen, - pDraw, type, drawId, modes)) { - xfree(glxPriv); - return NULL; - } - - glxPriv->base.destroy = __glXMesaDrawableDestroy; - glxPriv->base.resize = __glXMesaDrawableResize; - glxPriv->base.swapBuffers = __glXMesaDrawableSwapBuffers; - - xm_vis = find_mesa_visual(screen, modes->fbconfigID); - if (xm_vis == NULL) { - ErrorF("find_mesa_visual returned NULL for visualID = 0x%04x\n", - modes->visualID); - xfree(glxPriv); - return NULL; - } - - if (glxPriv->base.type == DRAWABLE_WINDOW) { - glxPriv->xm_buf = XMesaCreateWindowBuffer(xm_vis, (WindowPtr)pDraw); - } else { - glxPriv->xm_buf = XMesaCreatePixmapBuffer(xm_vis, (PixmapPtr)pDraw, 0); - } - - if (glxPriv->xm_buf == NULL) { - xfree(glxPriv); - return NULL; - } - - return &glxPriv->base; -} - -static void -__glXMesaContextDestroy(__GLXcontext *baseContext) -{ - __GLXMESAcontext *context = (__GLXMESAcontext *) baseContext; - __GLXMESAscreen *screen = (__GLXMESAscreen *) context->base.pGlxScreen; - const __GLcoreModule *glcore = screen->glcore; - - XMesaDestroyContext(context->xmesa); - __glXContextDestroy(&context->base); - xfree(context); -} - -static int -__glXMesaContextMakeCurrent(__GLXcontext *baseContext) - -{ - __GLXMESAcontext *context = (__GLXMESAcontext *) baseContext; - __GLXMESAdrawable *drawPriv = (__GLXMESAdrawable *) context->base.drawPriv; - __GLXMESAdrawable *readPriv = (__GLXMESAdrawable *) context->base.readPriv; - __GLXMESAscreen *screen = (__GLXMESAscreen *) context->base.pGlxScreen; - const __GLcoreModule *glcore = screen->glcore; - - return XMesaMakeCurrent2(context->xmesa, - drawPriv->xm_buf, - readPriv->xm_buf); -} - -static int -__glXMesaContextLoseCurrent(__GLXcontext *baseContext) -{ - __GLXMESAcontext *context = (__GLXMESAcontext *) baseContext; - __GLXMESAscreen *screen = (__GLXMESAscreen *) context->base.pGlxScreen; - const __GLcoreModule *glcore = screen->glcore; - - return XMesaLoseCurrent(context->xmesa); -} - -static int -__glXMesaContextCopy(__GLXcontext *baseDst, - __GLXcontext *baseSrc, - unsigned long mask) -{ - __GLXMESAcontext *dst = (__GLXMESAcontext *) baseDst; - __GLXMESAcontext *src = (__GLXMESAcontext *) baseSrc; - __GLXMESAscreen *screen = (__GLXMESAscreen *) dst->base.pGlxScreen; - const __GLcoreModule *glcore = screen->glcore; - - return XMesaCopyContext(src->xmesa, dst->xmesa, mask); -} - -static int -__glXMesaContextForceCurrent(__GLXcontext *baseContext) -{ - __GLXMESAcontext *context = (__GLXMESAcontext *) baseContext; - __GLXMESAscreen *screen = (__GLXMESAscreen *) context->base.pGlxScreen; - const __GLcoreModule *glcore = screen->glcore; - - /* GlxSetRenderTables() call for XGL moved in XMesaForceCurrent() */ - - return XMesaForceCurrent(context->xmesa); -} - -static __GLXcontext * -__glXMesaScreenCreateContext(__GLXscreen *screen, - __GLXconfig *config, - __GLXcontext *baseShareContext) -{ - __GLXMESAscreen *mesaScreen = (__GLXMESAscreen *) screen; - const __GLcoreModule *glcore = mesaScreen->glcore; - __GLXMESAcontext *context; - __GLXMESAcontext *shareContext = (__GLXMESAcontext *) baseShareContext; - XMesaVisual xm_vis; - XMesaContext xm_share; - - context = xalloc (sizeof (__GLXMESAcontext)); - if (context == NULL) - return NULL; - - memset(context, 0, sizeof *context); - - context->base.pGlxScreen = screen; - context->base.config = config; - - context->base.destroy = __glXMesaContextDestroy; - context->base.makeCurrent = __glXMesaContextMakeCurrent; - context->base.loseCurrent = __glXMesaContextLoseCurrent; - context->base.copy = __glXMesaContextCopy; - context->base.forceCurrent = __glXMesaContextForceCurrent; - - xm_vis = find_mesa_visual(screen, config->fbconfigID); - if (!xm_vis) { - ErrorF("find_mesa_visual returned NULL for visualID = 0x%04x\n", - config->visualID); - xfree(context); - return NULL; - } - - xm_share = shareContext ? shareContext->xmesa : NULL; - context->xmesa = XMesaCreateContext(xm_vis, xm_share); - if (!context->xmesa) { - xfree(context); - return NULL; - } - - return &context->base; -} - -static void -__glXMesaScreenDestroy(__GLXscreen *screen) -{ - __GLXMESAscreen *mesaScreen = (__GLXMESAscreen *) screen; - const __GLcoreModule *glcore = mesaScreen->glcore; - int i; - - if (mesaScreen->xm_vis) { - for (i = 0; i < mesaScreen->base.numFBConfigs; i++) { - if (mesaScreen->xm_vis[i]) - XMesaDestroyVisual(mesaScreen->xm_vis[i]); - } - - xfree(mesaScreen->xm_vis); - } - - dlclose(mesaScreen->driver); - - __glXScreenDestroy(screen); - - xfree(screen); -} - -static XMesaVisual -find_mesa_visual(__GLXscreen *screen, XID fbconfigID) -{ - __GLXMESAscreen *mesaScreen = (__GLXMESAscreen *) screen; - const __GLXconfig *config; - unsigned i = 0; - - for (config = screen->fbconfigs; config != NULL; config = config->next) { - if (config->fbconfigID == fbconfigID) - return mesaScreen->xm_vis[i]; - i++; - } - - return NULL; -} - -const static int numBack = 2; -const static int numDepth = 2; -const static int numStencil = 2; - -static const int glx_visual_types[] = { - GLX_STATIC_GRAY, - GLX_GRAY_SCALE, - GLX_STATIC_COLOR, - GLX_PSEUDO_COLOR, - GLX_TRUE_COLOR, - GLX_DIRECT_COLOR -}; - -static __GLXconfig * -createFBConfigsForVisual(__GLXscreen *screen, ScreenPtr pScreen, - VisualPtr visual, __GLXconfig *config) -{ - int back, depth, stencil; - - /* FIXME: Ok, I'm making all this up... anybody has a better idea? */ - - for (back = numBack - 1; back >= 0; back--) - for (depth = 0; depth < numDepth; depth++) - for (stencil = 0; stencil < numStencil; stencil++) { - config->next = xcalloc(sizeof(*config), 1); - config = config->next; - - config->visualRating = GLX_NONE; - config->visualType = glx_visual_types[visual->class]; - config->xRenderable = GL_TRUE; - config->drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT; - config->rgbMode = (visual->class >= TrueColor); - config->colorIndexMode = !config->rgbMode; - config->renderType = - (config->rgbMode) ? GLX_RGBA_BIT : GLX_COLOR_INDEX_BIT; - config->doubleBufferMode = back; - config->haveDepthBuffer = depth; - config->depthBits = depth ? visual->nplanes : 0; - config->haveStencilBuffer = stencil; - config->stencilBits = stencil ? visual->bitsPerRGBValue : 0; - config->haveAccumBuffer = 0; - - config->redBits = Ones(visual->redMask); - config->greenBits = Ones(visual->greenMask); - config->blueBits = Ones(visual->blueMask); - config->alphaBits = 0; - config->redMask = visual->redMask; - config->greenMask = visual->greenMask; - config->blueMask = visual->blueMask; - config->alphaMask = 0; - config->rgbBits = config->rgbMode ? visual->nplanes : 0; - config->indexBits = config->colorIndexMode ? visual->nplanes : 0; - } - - return config; -} - -static void -createFBConfigs(__GLXscreen *pGlxScreen, ScreenPtr pScreen) -{ - __GLXconfig head, *tail; - int i; - - /* We assume here that each existing visual correspond to a - * different visual class. Note, this runs before COMPOSITE adds - * its visual, so it's not entirely crazy. */ - pGlxScreen->numFBConfigs = pScreen->numVisuals * numBack * numDepth * numStencil; - - head.next = NULL; - tail = &head; - for (i = 0; i < pScreen->numVisuals; i++) - tail = createFBConfigsForVisual(pGlxScreen, pScreen, - &pScreen->visuals[i], tail); - - pGlxScreen->fbconfigs = head.next; -} - -static void -createMesaVisuals(__GLXMESAscreen *pMesaScreen) -{ - const __GLcoreModule *glcore = pMesaScreen->glcore; - __GLXconfig *config; - ScreenPtr pScreen; - VisualPtr visual = NULL; - int i, j; - - i = 0; - pScreen = pMesaScreen->base.pScreen; - pMesaScreen->xm_vis = - xcalloc(pMesaScreen->base.numFBConfigs, sizeof (XMesaVisual)); - for (config = pMesaScreen->base.fbconfigs; config != NULL; config = config->next) { - for (j = 0; j < pScreen->numVisuals; j++) - if (pScreen->visuals[j].vid == config->visualID) { - visual = &pScreen->visuals[j]; - break; - } - - pMesaScreen->xm_vis[i++] = - XMesaCreateVisual(pScreen, - visual, - config->rgbMode, - (config->alphaBits > 0), - config->doubleBufferMode, - config->stereoMode, - GL_TRUE, /* ximage_flag */ - config->depthBits, - config->stencilBits, - config->accumRedBits, - config->accumGreenBits, - config->accumBlueBits, - config->accumAlphaBits, - config->samples, - config->level, - config->visualRating); - } -} - -static const char dri_driver_path[] = DRI_DRIVER_PATH; - -static __GLXscreen * -__glXMesaScreenProbe(ScreenPtr pScreen) -{ - __GLXMESAscreen *screen; - char filename[128]; - - screen = xalloc(sizeof *screen); - if (screen == NULL) - return NULL; - - snprintf(filename, sizeof filename, "%s/%s.so", - dri_driver_path, "libGLcore"); - - screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL); - if (screen->driver == NULL) { - LogMessage(X_ERROR, "GLX error: dlopen of %s failed (%s)\n", - filename, dlerror()); - goto handle_error; - } - - screen->glcore = dlsym(screen->driver, __GL_CORE); - if (screen->glcore == NULL) { - LogMessage(X_ERROR, "GLX error: dlsym for %s failed (%s)\n", - __GL_CORE, dlerror()); - goto handle_error; - } - - /* - * Find the GLX visuals that are supported by this screen and create - * XMesa's visuals. - */ - createFBConfigs(&screen->base, pScreen); - - __glXScreenInit(&screen->base, pScreen); - - /* Now that GLX has created the corresponding X visual, create the mesa visuals. */ - createMesaVisuals(screen); - - screen->base.destroy = __glXMesaScreenDestroy; - screen->base.createContext = __glXMesaScreenCreateContext; - screen->base.createDrawable = __glXMesaScreenCreateDrawable; - screen->base.swapInterval = NULL; - screen->base.pScreen = pScreen; - - LogMessage(X_INFO, "GLX: Loaded and initialized %s\n", filename); - - return &screen->base; - -handle_error: - - if (screen->driver) - dlclose(screen->driver); - - xfree(screen); - - FatalError("GLX: could not load software renderer\n"); - - return NULL; -} - -__GLXprovider __glXMesaProvider = { - __glXMesaScreenProbe, - "MESA", - NULL -}; - -__GLXprovider * -GlxGetMesaProvider (void) -{ - return &__glXMesaProvider; -} diff --git a/hw/dmx/glxProxy/glxext.c b/hw/dmx/glxProxy/glxext.c index de8bef8fb..4825831bd 100644 --- a/hw/dmx/glxProxy/glxext.c +++ b/hw/dmx/glxProxy/glxext.c @@ -40,7 +40,7 @@ ** Stubs to satisfy miinitext.c references. */ typedef int __GLXprovider; -__GLXprovider __glXMesaProvider; +__GLXprovider __glXDRIswrastProvider; void GlxPushProvider(__GLXprovider *provider) { } /* diff --git a/hw/xfree86/dixmods/glxmodule.c b/hw/xfree86/dixmods/glxmodule.c index dc94a129f..026a93692 100644 --- a/hw/xfree86/dixmods/glxmodule.c +++ b/hw/xfree86/dixmods/glxmodule.c @@ -85,11 +85,6 @@ glxSetup(pointer module, pointer opts, int *errmaj, int *errmin) setupDone = TRUE; - provider = LoaderSymbol("__glXMesaProvider"); - if (provider == NULL) - return NULL; - GlxPushProvider(provider); - provider = LoaderSymbol("__glXDRIswrastProvider"); if (provider) GlxPushProvider(provider); diff --git a/hw/xquartz/GL/indirect.c b/hw/xquartz/GL/indirect.c index a0884d45c..3cf43bbea 100644 --- a/hw/xquartz/GL/indirect.c +++ b/hw/xquartz/GL/indirect.c @@ -87,7 +87,7 @@ typedef long long GLint64EXT; // ggs: needed to call back to glx with visual configs extern void GlxSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs, void **configprivs); -__GLXprovider * GlxGetMesaProvider (void); +__GLXprovider * GlxGetDRISWrastProvider (void); // Write debugging output, or not #ifdef GLAQUA_DEBUG @@ -120,17 +120,17 @@ static int __glXAquaContextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc, un static CGLPixelFormatObj makeFormat(__GLXconfig *mode); -__GLXprovider __glXMesaProvider = { +__GLXprovider __glXDRISWRastProvider = { __glXAquaScreenProbe, "Core OpenGL", NULL }; __GLXprovider * -GlxGetMesaProvider (void) +GlxGetDRISWRastProvider (void) { - GLAQUA_DEBUG_MSG("GlxGetMesaProvider\n"); - return &__glXMesaProvider; + GLAQUA_DEBUG_MSG("GlxGetDRISWRastProvider\n"); + return &__glXDRISWRastProvider; } typedef struct __GLXAquaScreen __GLXAquaScreen; diff --git a/mi/miinitext.c b/mi/miinitext.c index ce57f6939..e4b4fe059 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -288,8 +288,7 @@ extern void XFree86DGAExtensionInit(INITARGS); #endif #ifdef GLXEXT typedef struct __GLXprovider __GLXprovider; -extern __GLXprovider __glXMesaProvider; -extern __GLXprovider __glXDRIswrastProvider; +extern __GLXprovider __glXDRISWRastProvider; extern void GlxPushProvider(__GLXprovider *impl); extern void GlxExtensionInit(INITARGS); #endif @@ -574,8 +573,7 @@ InitExtensions(argc, argv) #endif #ifdef GLXEXT - GlxPushProvider(&__glXMesaProvider); - GlxPushProvider(&__glXDRIswrastProvider); + GlxPushProvider(&__glXDRISWRastProvider); if (!noGlxExtension) GlxExtensionInit(); #endif } From f558c7d4d1d87affe1ce4aec2e62ff64545f2bc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 21 May 2008 10:18:16 -0400 Subject: [PATCH 564/634] Use LD_EXPORT_SYMBOLS_FLAG when linking Xnest. --- hw/xnest/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/xnest/Makefile.am b/hw/xnest/Makefile.am index 8601b2988..f95aab140 100644 --- a/hw/xnest/Makefile.am +++ b/hw/xnest/Makefile.am @@ -56,6 +56,7 @@ Xnest_SOURCES = $(SRCS) Xnest_DEPENDENCIES = $(XNEST_LIBS) Xnest_LDADD = $(XNEST_LIBS) $(XNEST_SYS_LIBS) $(XSERVER_SYS_LIBS) +Xnest_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) EXTRA_DIST = icon \ screensaver \ From e5aad4bc087036489e2af576628aa9b612054a6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 21 May 2008 11:44:12 -0400 Subject: [PATCH 565/634] Get out of the mesa symlinking business. This copies over the files generated from mesa/src/mesa/glapi. There's a corresponding mesa commit that makes it easy to generate the glapi files straight into the xserver tree when the XML definitions change. The only few files that are copied from mesa but aren't generated are glapi.[ch] and glthread.[ch]. Everything in there is technically DRI driver API and the whole setup is still a bit fragile, but it's not a new problem. The --with-mesa-source configure option is still around since other parts of the server (XGL and DMX - grep for MESA_SOURCE) need that, but for common case of building with GLX and AIGLX support, that option is no longer needed. --- GL/glx/.gitignore | 13 - GL/glx/Makefile.am | 45 +- GL/glx/dispatch.h | 3829 ++++++++++++++++++ GL/glx/glapi.c | 1064 +++++ GL/glx/glapi.h | 160 + GL/glx/glapioffsets.h | 1174 ++++++ GL/glx/glapitable.h | 816 ++++ GL/glx/glapitemp.h | 6655 +++++++++++++++++++++++++++++++ GL/glx/glprocs.h | 2260 +++++++++++ GL/glx/glthread.c | 378 ++ GL/glx/glthread.h | 319 ++ GL/glx/indirect_dispatch.c | 5889 +++++++++++++++++++++++++++ GL/glx/indirect_dispatch.h | 1047 +++++ GL/glx/indirect_dispatch_swap.c | 6051 ++++++++++++++++++++++++++++ GL/glx/indirect_reqsize.c | 832 ++++ GL/glx/indirect_reqsize.h | 121 + GL/glx/indirect_size.h | 88 + GL/glx/indirect_size_get.c | 1210 ++++++ GL/glx/indirect_size_get.h | 102 + GL/glx/indirect_table.c | 1596 ++++++++ GL/symlink-mesa.sh | 178 - configure.ac | 14 +- hw/xfree86/dri/Makefile.am | 1 - hw/xfree86/dri2/Makefile.am | 2 +- 24 files changed, 33618 insertions(+), 226 deletions(-) delete mode 100644 GL/glx/.gitignore create mode 100644 GL/glx/dispatch.h create mode 100644 GL/glx/glapi.c create mode 100644 GL/glx/glapi.h create mode 100644 GL/glx/glapioffsets.h create mode 100644 GL/glx/glapitable.h create mode 100644 GL/glx/glapitemp.h create mode 100644 GL/glx/glprocs.h create mode 100644 GL/glx/glthread.c create mode 100644 GL/glx/glthread.h create mode 100644 GL/glx/indirect_dispatch.c create mode 100644 GL/glx/indirect_dispatch.h create mode 100644 GL/glx/indirect_dispatch_swap.c create mode 100644 GL/glx/indirect_reqsize.c create mode 100644 GL/glx/indirect_reqsize.h create mode 100644 GL/glx/indirect_size.h create mode 100644 GL/glx/indirect_size_get.c create mode 100644 GL/glx/indirect_size_get.h create mode 100644 GL/glx/indirect_table.c delete mode 100755 GL/symlink-mesa.sh diff --git a/GL/glx/.gitignore b/GL/glx/.gitignore deleted file mode 100644 index c49b54d43..000000000 --- a/GL/glx/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -glapi.c -glcontextmodes.c -glcontextmodes.h -glthread.c -indirect_dispatch.c -indirect_dispatch.h -indirect_dispatch_swap.c -indirect_reqsize.c -indirect_reqsize.h -indirect_size.h -indirect_size_get.c -indirect_size_get.h -indirect_table.c diff --git a/GL/glx/Makefile.am b/GL/glx/Makefile.am index 76fd6e649..f62d2ed86 100644 --- a/GL/glx/Makefile.am +++ b/GL/glx/Makefile.am @@ -5,14 +5,11 @@ endif noinst_LTLIBRARIES = libglx.la $(GLXDRI_LIBRARY) AM_CFLAGS = \ - -I@MESA_SOURCE@/include \ @DIX_CFLAGS@ \ @GL_CFLAGS@ \ @XLIB_CFLAGS@ \ @LIBDRM_CFLAGS@ \ @DRIPROTO_CFLAGS@ \ - -I@MESA_SOURCE@/src/mesa/glapi \ - -I@MESA_SOURCE@/src/mesa/main \ -DXFree86Server \ @GLX_DEFINES@ \ @GLX_ARCH_DEFINES@ @@ -28,18 +25,23 @@ INCLUDES = \ -I$(top_srcdir)/hw/xfree86/dri2 \ -I$(top_srcdir)/mi - -nodist_libglx_la_SOURCES = indirect_size.h \ - glapi.c \ - glthread.c \ - indirect_dispatch.c \ - indirect_dispatch.h \ - indirect_dispatch_swap.c \ - indirect_reqsize.c \ - indirect_reqsize.h \ - indirect_size_get.c \ - indirect_size_get.h \ - indirect_table.c +glapi_sources = \ + indirect_dispatch.c \ + indirect_dispatch.h \ + indirect_dispatch_swap.c \ + indirect_reqsize.c \ + indirect_reqsize.h \ + indirect_size.h \ + indirect_size_get.c \ + indirect_size_get.h \ + indirect_table.c \ + dispatch.h \ + glapitable.h \ + glapitemp.h \ + glapi.c \ + glapi.h \ + glthread.c \ + glthread.h libglxdri_la_SOURCES = \ glxdri.c \ @@ -48,7 +50,13 @@ libglxdri_la_SOURCES = \ extension_string.h libglx_la_SOURCES = \ - $(XQUARTZ_libglx_la_SOURCES) \ + $(indirect_sources) \ + $(glapi_sources) \ + indirect_util.c \ + indirect_util.h \ + indirect_program.c \ + indirect_table.h \ + indirect_texture_compression.c \ g_disptab.h \ glxbyteorder.h \ glxcmds.c \ @@ -64,11 +72,6 @@ libglx_la_SOURCES = \ glxserver.h \ glxutil.c \ glxutil.h \ - indirect_program.c \ - indirect_table.h \ - indirect_texture_compression.c \ - indirect_util.c \ - indirect_util.h \ render2.c \ render2swap.c \ renderpix.c \ diff --git a/GL/glx/dispatch.h b/GL/glx/dispatch.h new file mode 100644 index 000000000..712315608 --- /dev/null +++ b/GL/glx/dispatch.h @@ -0,0 +1,3829 @@ +/* DO NOT EDIT - This file generated automatically by gl_table.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#if !defined( _DISPATCH_H_ ) +# define _DISPATCH_H_ + +/** + * \file dispatch.h + * Macros for handling GL dispatch tables. + * + * For each known GL function, there are 3 macros in this file. The first + * macro is named CALL_FuncName and is used to call that GL function using + * the specified dispatch table. The other 2 macros, called GET_FuncName + * can SET_FuncName, are used to get and set the dispatch pointer for the + * named function in the specified dispatch table. + */ + +#define CALL_by_offset(disp, cast, offset, parameters) \ + (*(cast (GET_by_offset(disp, offset)))) parameters +#define GET_by_offset(disp, offset) \ + (offset >= 0) ? (((_glapi_proc *)(disp))[offset]) : NULL +#define SET_by_offset(disp, offset, fn) \ + do { \ + if ( (offset) < 0 ) { \ + /* fprintf( stderr, "[%s:%u] SET_by_offset(%p, %d, %s)!\n", */ \ + /* __func__, __LINE__, disp, offset, # fn); */ \ + /* abort(); */ \ + } \ + else { \ + ( (_glapi_proc *) (disp) )[offset] = (_glapi_proc) fn; \ + } \ + } while(0) + +#define CALL_NewList(disp, parameters) (*((disp)->NewList)) parameters +#define GET_NewList(disp) ((disp)->NewList) +#define SET_NewList(disp, fn) ((disp)->NewList = fn) +#define CALL_EndList(disp, parameters) (*((disp)->EndList)) parameters +#define GET_EndList(disp) ((disp)->EndList) +#define SET_EndList(disp, fn) ((disp)->EndList = fn) +#define CALL_CallList(disp, parameters) (*((disp)->CallList)) parameters +#define GET_CallList(disp) ((disp)->CallList) +#define SET_CallList(disp, fn) ((disp)->CallList = fn) +#define CALL_CallLists(disp, parameters) (*((disp)->CallLists)) parameters +#define GET_CallLists(disp) ((disp)->CallLists) +#define SET_CallLists(disp, fn) ((disp)->CallLists = fn) +#define CALL_DeleteLists(disp, parameters) (*((disp)->DeleteLists)) parameters +#define GET_DeleteLists(disp) ((disp)->DeleteLists) +#define SET_DeleteLists(disp, fn) ((disp)->DeleteLists = fn) +#define CALL_GenLists(disp, parameters) (*((disp)->GenLists)) parameters +#define GET_GenLists(disp) ((disp)->GenLists) +#define SET_GenLists(disp, fn) ((disp)->GenLists = fn) +#define CALL_ListBase(disp, parameters) (*((disp)->ListBase)) parameters +#define GET_ListBase(disp) ((disp)->ListBase) +#define SET_ListBase(disp, fn) ((disp)->ListBase = fn) +#define CALL_Begin(disp, parameters) (*((disp)->Begin)) parameters +#define GET_Begin(disp) ((disp)->Begin) +#define SET_Begin(disp, fn) ((disp)->Begin = fn) +#define CALL_Bitmap(disp, parameters) (*((disp)->Bitmap)) parameters +#define GET_Bitmap(disp) ((disp)->Bitmap) +#define SET_Bitmap(disp, fn) ((disp)->Bitmap = fn) +#define CALL_Color3b(disp, parameters) (*((disp)->Color3b)) parameters +#define GET_Color3b(disp) ((disp)->Color3b) +#define SET_Color3b(disp, fn) ((disp)->Color3b = fn) +#define CALL_Color3bv(disp, parameters) (*((disp)->Color3bv)) parameters +#define GET_Color3bv(disp) ((disp)->Color3bv) +#define SET_Color3bv(disp, fn) ((disp)->Color3bv = fn) +#define CALL_Color3d(disp, parameters) (*((disp)->Color3d)) parameters +#define GET_Color3d(disp) ((disp)->Color3d) +#define SET_Color3d(disp, fn) ((disp)->Color3d = fn) +#define CALL_Color3dv(disp, parameters) (*((disp)->Color3dv)) parameters +#define GET_Color3dv(disp) ((disp)->Color3dv) +#define SET_Color3dv(disp, fn) ((disp)->Color3dv = fn) +#define CALL_Color3f(disp, parameters) (*((disp)->Color3f)) parameters +#define GET_Color3f(disp) ((disp)->Color3f) +#define SET_Color3f(disp, fn) ((disp)->Color3f = fn) +#define CALL_Color3fv(disp, parameters) (*((disp)->Color3fv)) parameters +#define GET_Color3fv(disp) ((disp)->Color3fv) +#define SET_Color3fv(disp, fn) ((disp)->Color3fv = fn) +#define CALL_Color3i(disp, parameters) (*((disp)->Color3i)) parameters +#define GET_Color3i(disp) ((disp)->Color3i) +#define SET_Color3i(disp, fn) ((disp)->Color3i = fn) +#define CALL_Color3iv(disp, parameters) (*((disp)->Color3iv)) parameters +#define GET_Color3iv(disp) ((disp)->Color3iv) +#define SET_Color3iv(disp, fn) ((disp)->Color3iv = fn) +#define CALL_Color3s(disp, parameters) (*((disp)->Color3s)) parameters +#define GET_Color3s(disp) ((disp)->Color3s) +#define SET_Color3s(disp, fn) ((disp)->Color3s = fn) +#define CALL_Color3sv(disp, parameters) (*((disp)->Color3sv)) parameters +#define GET_Color3sv(disp) ((disp)->Color3sv) +#define SET_Color3sv(disp, fn) ((disp)->Color3sv = fn) +#define CALL_Color3ub(disp, parameters) (*((disp)->Color3ub)) parameters +#define GET_Color3ub(disp) ((disp)->Color3ub) +#define SET_Color3ub(disp, fn) ((disp)->Color3ub = fn) +#define CALL_Color3ubv(disp, parameters) (*((disp)->Color3ubv)) parameters +#define GET_Color3ubv(disp) ((disp)->Color3ubv) +#define SET_Color3ubv(disp, fn) ((disp)->Color3ubv = fn) +#define CALL_Color3ui(disp, parameters) (*((disp)->Color3ui)) parameters +#define GET_Color3ui(disp) ((disp)->Color3ui) +#define SET_Color3ui(disp, fn) ((disp)->Color3ui = fn) +#define CALL_Color3uiv(disp, parameters) (*((disp)->Color3uiv)) parameters +#define GET_Color3uiv(disp) ((disp)->Color3uiv) +#define SET_Color3uiv(disp, fn) ((disp)->Color3uiv = fn) +#define CALL_Color3us(disp, parameters) (*((disp)->Color3us)) parameters +#define GET_Color3us(disp) ((disp)->Color3us) +#define SET_Color3us(disp, fn) ((disp)->Color3us = fn) +#define CALL_Color3usv(disp, parameters) (*((disp)->Color3usv)) parameters +#define GET_Color3usv(disp) ((disp)->Color3usv) +#define SET_Color3usv(disp, fn) ((disp)->Color3usv = fn) +#define CALL_Color4b(disp, parameters) (*((disp)->Color4b)) parameters +#define GET_Color4b(disp) ((disp)->Color4b) +#define SET_Color4b(disp, fn) ((disp)->Color4b = fn) +#define CALL_Color4bv(disp, parameters) (*((disp)->Color4bv)) parameters +#define GET_Color4bv(disp) ((disp)->Color4bv) +#define SET_Color4bv(disp, fn) ((disp)->Color4bv = fn) +#define CALL_Color4d(disp, parameters) (*((disp)->Color4d)) parameters +#define GET_Color4d(disp) ((disp)->Color4d) +#define SET_Color4d(disp, fn) ((disp)->Color4d = fn) +#define CALL_Color4dv(disp, parameters) (*((disp)->Color4dv)) parameters +#define GET_Color4dv(disp) ((disp)->Color4dv) +#define SET_Color4dv(disp, fn) ((disp)->Color4dv = fn) +#define CALL_Color4f(disp, parameters) (*((disp)->Color4f)) parameters +#define GET_Color4f(disp) ((disp)->Color4f) +#define SET_Color4f(disp, fn) ((disp)->Color4f = fn) +#define CALL_Color4fv(disp, parameters) (*((disp)->Color4fv)) parameters +#define GET_Color4fv(disp) ((disp)->Color4fv) +#define SET_Color4fv(disp, fn) ((disp)->Color4fv = fn) +#define CALL_Color4i(disp, parameters) (*((disp)->Color4i)) parameters +#define GET_Color4i(disp) ((disp)->Color4i) +#define SET_Color4i(disp, fn) ((disp)->Color4i = fn) +#define CALL_Color4iv(disp, parameters) (*((disp)->Color4iv)) parameters +#define GET_Color4iv(disp) ((disp)->Color4iv) +#define SET_Color4iv(disp, fn) ((disp)->Color4iv = fn) +#define CALL_Color4s(disp, parameters) (*((disp)->Color4s)) parameters +#define GET_Color4s(disp) ((disp)->Color4s) +#define SET_Color4s(disp, fn) ((disp)->Color4s = fn) +#define CALL_Color4sv(disp, parameters) (*((disp)->Color4sv)) parameters +#define GET_Color4sv(disp) ((disp)->Color4sv) +#define SET_Color4sv(disp, fn) ((disp)->Color4sv = fn) +#define CALL_Color4ub(disp, parameters) (*((disp)->Color4ub)) parameters +#define GET_Color4ub(disp) ((disp)->Color4ub) +#define SET_Color4ub(disp, fn) ((disp)->Color4ub = fn) +#define CALL_Color4ubv(disp, parameters) (*((disp)->Color4ubv)) parameters +#define GET_Color4ubv(disp) ((disp)->Color4ubv) +#define SET_Color4ubv(disp, fn) ((disp)->Color4ubv = fn) +#define CALL_Color4ui(disp, parameters) (*((disp)->Color4ui)) parameters +#define GET_Color4ui(disp) ((disp)->Color4ui) +#define SET_Color4ui(disp, fn) ((disp)->Color4ui = fn) +#define CALL_Color4uiv(disp, parameters) (*((disp)->Color4uiv)) parameters +#define GET_Color4uiv(disp) ((disp)->Color4uiv) +#define SET_Color4uiv(disp, fn) ((disp)->Color4uiv = fn) +#define CALL_Color4us(disp, parameters) (*((disp)->Color4us)) parameters +#define GET_Color4us(disp) ((disp)->Color4us) +#define SET_Color4us(disp, fn) ((disp)->Color4us = fn) +#define CALL_Color4usv(disp, parameters) (*((disp)->Color4usv)) parameters +#define GET_Color4usv(disp) ((disp)->Color4usv) +#define SET_Color4usv(disp, fn) ((disp)->Color4usv = fn) +#define CALL_EdgeFlag(disp, parameters) (*((disp)->EdgeFlag)) parameters +#define GET_EdgeFlag(disp) ((disp)->EdgeFlag) +#define SET_EdgeFlag(disp, fn) ((disp)->EdgeFlag = fn) +#define CALL_EdgeFlagv(disp, parameters) (*((disp)->EdgeFlagv)) parameters +#define GET_EdgeFlagv(disp) ((disp)->EdgeFlagv) +#define SET_EdgeFlagv(disp, fn) ((disp)->EdgeFlagv = fn) +#define CALL_End(disp, parameters) (*((disp)->End)) parameters +#define GET_End(disp) ((disp)->End) +#define SET_End(disp, fn) ((disp)->End = fn) +#define CALL_Indexd(disp, parameters) (*((disp)->Indexd)) parameters +#define GET_Indexd(disp) ((disp)->Indexd) +#define SET_Indexd(disp, fn) ((disp)->Indexd = fn) +#define CALL_Indexdv(disp, parameters) (*((disp)->Indexdv)) parameters +#define GET_Indexdv(disp) ((disp)->Indexdv) +#define SET_Indexdv(disp, fn) ((disp)->Indexdv = fn) +#define CALL_Indexf(disp, parameters) (*((disp)->Indexf)) parameters +#define GET_Indexf(disp) ((disp)->Indexf) +#define SET_Indexf(disp, fn) ((disp)->Indexf = fn) +#define CALL_Indexfv(disp, parameters) (*((disp)->Indexfv)) parameters +#define GET_Indexfv(disp) ((disp)->Indexfv) +#define SET_Indexfv(disp, fn) ((disp)->Indexfv = fn) +#define CALL_Indexi(disp, parameters) (*((disp)->Indexi)) parameters +#define GET_Indexi(disp) ((disp)->Indexi) +#define SET_Indexi(disp, fn) ((disp)->Indexi = fn) +#define CALL_Indexiv(disp, parameters) (*((disp)->Indexiv)) parameters +#define GET_Indexiv(disp) ((disp)->Indexiv) +#define SET_Indexiv(disp, fn) ((disp)->Indexiv = fn) +#define CALL_Indexs(disp, parameters) (*((disp)->Indexs)) parameters +#define GET_Indexs(disp) ((disp)->Indexs) +#define SET_Indexs(disp, fn) ((disp)->Indexs = fn) +#define CALL_Indexsv(disp, parameters) (*((disp)->Indexsv)) parameters +#define GET_Indexsv(disp) ((disp)->Indexsv) +#define SET_Indexsv(disp, fn) ((disp)->Indexsv = fn) +#define CALL_Normal3b(disp, parameters) (*((disp)->Normal3b)) parameters +#define GET_Normal3b(disp) ((disp)->Normal3b) +#define SET_Normal3b(disp, fn) ((disp)->Normal3b = fn) +#define CALL_Normal3bv(disp, parameters) (*((disp)->Normal3bv)) parameters +#define GET_Normal3bv(disp) ((disp)->Normal3bv) +#define SET_Normal3bv(disp, fn) ((disp)->Normal3bv = fn) +#define CALL_Normal3d(disp, parameters) (*((disp)->Normal3d)) parameters +#define GET_Normal3d(disp) ((disp)->Normal3d) +#define SET_Normal3d(disp, fn) ((disp)->Normal3d = fn) +#define CALL_Normal3dv(disp, parameters) (*((disp)->Normal3dv)) parameters +#define GET_Normal3dv(disp) ((disp)->Normal3dv) +#define SET_Normal3dv(disp, fn) ((disp)->Normal3dv = fn) +#define CALL_Normal3f(disp, parameters) (*((disp)->Normal3f)) parameters +#define GET_Normal3f(disp) ((disp)->Normal3f) +#define SET_Normal3f(disp, fn) ((disp)->Normal3f = fn) +#define CALL_Normal3fv(disp, parameters) (*((disp)->Normal3fv)) parameters +#define GET_Normal3fv(disp) ((disp)->Normal3fv) +#define SET_Normal3fv(disp, fn) ((disp)->Normal3fv = fn) +#define CALL_Normal3i(disp, parameters) (*((disp)->Normal3i)) parameters +#define GET_Normal3i(disp) ((disp)->Normal3i) +#define SET_Normal3i(disp, fn) ((disp)->Normal3i = fn) +#define CALL_Normal3iv(disp, parameters) (*((disp)->Normal3iv)) parameters +#define GET_Normal3iv(disp) ((disp)->Normal3iv) +#define SET_Normal3iv(disp, fn) ((disp)->Normal3iv = fn) +#define CALL_Normal3s(disp, parameters) (*((disp)->Normal3s)) parameters +#define GET_Normal3s(disp) ((disp)->Normal3s) +#define SET_Normal3s(disp, fn) ((disp)->Normal3s = fn) +#define CALL_Normal3sv(disp, parameters) (*((disp)->Normal3sv)) parameters +#define GET_Normal3sv(disp) ((disp)->Normal3sv) +#define SET_Normal3sv(disp, fn) ((disp)->Normal3sv = fn) +#define CALL_RasterPos2d(disp, parameters) (*((disp)->RasterPos2d)) parameters +#define GET_RasterPos2d(disp) ((disp)->RasterPos2d) +#define SET_RasterPos2d(disp, fn) ((disp)->RasterPos2d = fn) +#define CALL_RasterPos2dv(disp, parameters) (*((disp)->RasterPos2dv)) parameters +#define GET_RasterPos2dv(disp) ((disp)->RasterPos2dv) +#define SET_RasterPos2dv(disp, fn) ((disp)->RasterPos2dv = fn) +#define CALL_RasterPos2f(disp, parameters) (*((disp)->RasterPos2f)) parameters +#define GET_RasterPos2f(disp) ((disp)->RasterPos2f) +#define SET_RasterPos2f(disp, fn) ((disp)->RasterPos2f = fn) +#define CALL_RasterPos2fv(disp, parameters) (*((disp)->RasterPos2fv)) parameters +#define GET_RasterPos2fv(disp) ((disp)->RasterPos2fv) +#define SET_RasterPos2fv(disp, fn) ((disp)->RasterPos2fv = fn) +#define CALL_RasterPos2i(disp, parameters) (*((disp)->RasterPos2i)) parameters +#define GET_RasterPos2i(disp) ((disp)->RasterPos2i) +#define SET_RasterPos2i(disp, fn) ((disp)->RasterPos2i = fn) +#define CALL_RasterPos2iv(disp, parameters) (*((disp)->RasterPos2iv)) parameters +#define GET_RasterPos2iv(disp) ((disp)->RasterPos2iv) +#define SET_RasterPos2iv(disp, fn) ((disp)->RasterPos2iv = fn) +#define CALL_RasterPos2s(disp, parameters) (*((disp)->RasterPos2s)) parameters +#define GET_RasterPos2s(disp) ((disp)->RasterPos2s) +#define SET_RasterPos2s(disp, fn) ((disp)->RasterPos2s = fn) +#define CALL_RasterPos2sv(disp, parameters) (*((disp)->RasterPos2sv)) parameters +#define GET_RasterPos2sv(disp) ((disp)->RasterPos2sv) +#define SET_RasterPos2sv(disp, fn) ((disp)->RasterPos2sv = fn) +#define CALL_RasterPos3d(disp, parameters) (*((disp)->RasterPos3d)) parameters +#define GET_RasterPos3d(disp) ((disp)->RasterPos3d) +#define SET_RasterPos3d(disp, fn) ((disp)->RasterPos3d = fn) +#define CALL_RasterPos3dv(disp, parameters) (*((disp)->RasterPos3dv)) parameters +#define GET_RasterPos3dv(disp) ((disp)->RasterPos3dv) +#define SET_RasterPos3dv(disp, fn) ((disp)->RasterPos3dv = fn) +#define CALL_RasterPos3f(disp, parameters) (*((disp)->RasterPos3f)) parameters +#define GET_RasterPos3f(disp) ((disp)->RasterPos3f) +#define SET_RasterPos3f(disp, fn) ((disp)->RasterPos3f = fn) +#define CALL_RasterPos3fv(disp, parameters) (*((disp)->RasterPos3fv)) parameters +#define GET_RasterPos3fv(disp) ((disp)->RasterPos3fv) +#define SET_RasterPos3fv(disp, fn) ((disp)->RasterPos3fv = fn) +#define CALL_RasterPos3i(disp, parameters) (*((disp)->RasterPos3i)) parameters +#define GET_RasterPos3i(disp) ((disp)->RasterPos3i) +#define SET_RasterPos3i(disp, fn) ((disp)->RasterPos3i = fn) +#define CALL_RasterPos3iv(disp, parameters) (*((disp)->RasterPos3iv)) parameters +#define GET_RasterPos3iv(disp) ((disp)->RasterPos3iv) +#define SET_RasterPos3iv(disp, fn) ((disp)->RasterPos3iv = fn) +#define CALL_RasterPos3s(disp, parameters) (*((disp)->RasterPos3s)) parameters +#define GET_RasterPos3s(disp) ((disp)->RasterPos3s) +#define SET_RasterPos3s(disp, fn) ((disp)->RasterPos3s = fn) +#define CALL_RasterPos3sv(disp, parameters) (*((disp)->RasterPos3sv)) parameters +#define GET_RasterPos3sv(disp) ((disp)->RasterPos3sv) +#define SET_RasterPos3sv(disp, fn) ((disp)->RasterPos3sv = fn) +#define CALL_RasterPos4d(disp, parameters) (*((disp)->RasterPos4d)) parameters +#define GET_RasterPos4d(disp) ((disp)->RasterPos4d) +#define SET_RasterPos4d(disp, fn) ((disp)->RasterPos4d = fn) +#define CALL_RasterPos4dv(disp, parameters) (*((disp)->RasterPos4dv)) parameters +#define GET_RasterPos4dv(disp) ((disp)->RasterPos4dv) +#define SET_RasterPos4dv(disp, fn) ((disp)->RasterPos4dv = fn) +#define CALL_RasterPos4f(disp, parameters) (*((disp)->RasterPos4f)) parameters +#define GET_RasterPos4f(disp) ((disp)->RasterPos4f) +#define SET_RasterPos4f(disp, fn) ((disp)->RasterPos4f = fn) +#define CALL_RasterPos4fv(disp, parameters) (*((disp)->RasterPos4fv)) parameters +#define GET_RasterPos4fv(disp) ((disp)->RasterPos4fv) +#define SET_RasterPos4fv(disp, fn) ((disp)->RasterPos4fv = fn) +#define CALL_RasterPos4i(disp, parameters) (*((disp)->RasterPos4i)) parameters +#define GET_RasterPos4i(disp) ((disp)->RasterPos4i) +#define SET_RasterPos4i(disp, fn) ((disp)->RasterPos4i = fn) +#define CALL_RasterPos4iv(disp, parameters) (*((disp)->RasterPos4iv)) parameters +#define GET_RasterPos4iv(disp) ((disp)->RasterPos4iv) +#define SET_RasterPos4iv(disp, fn) ((disp)->RasterPos4iv = fn) +#define CALL_RasterPos4s(disp, parameters) (*((disp)->RasterPos4s)) parameters +#define GET_RasterPos4s(disp) ((disp)->RasterPos4s) +#define SET_RasterPos4s(disp, fn) ((disp)->RasterPos4s = fn) +#define CALL_RasterPos4sv(disp, parameters) (*((disp)->RasterPos4sv)) parameters +#define GET_RasterPos4sv(disp) ((disp)->RasterPos4sv) +#define SET_RasterPos4sv(disp, fn) ((disp)->RasterPos4sv = fn) +#define CALL_Rectd(disp, parameters) (*((disp)->Rectd)) parameters +#define GET_Rectd(disp) ((disp)->Rectd) +#define SET_Rectd(disp, fn) ((disp)->Rectd = fn) +#define CALL_Rectdv(disp, parameters) (*((disp)->Rectdv)) parameters +#define GET_Rectdv(disp) ((disp)->Rectdv) +#define SET_Rectdv(disp, fn) ((disp)->Rectdv = fn) +#define CALL_Rectf(disp, parameters) (*((disp)->Rectf)) parameters +#define GET_Rectf(disp) ((disp)->Rectf) +#define SET_Rectf(disp, fn) ((disp)->Rectf = fn) +#define CALL_Rectfv(disp, parameters) (*((disp)->Rectfv)) parameters +#define GET_Rectfv(disp) ((disp)->Rectfv) +#define SET_Rectfv(disp, fn) ((disp)->Rectfv = fn) +#define CALL_Recti(disp, parameters) (*((disp)->Recti)) parameters +#define GET_Recti(disp) ((disp)->Recti) +#define SET_Recti(disp, fn) ((disp)->Recti = fn) +#define CALL_Rectiv(disp, parameters) (*((disp)->Rectiv)) parameters +#define GET_Rectiv(disp) ((disp)->Rectiv) +#define SET_Rectiv(disp, fn) ((disp)->Rectiv = fn) +#define CALL_Rects(disp, parameters) (*((disp)->Rects)) parameters +#define GET_Rects(disp) ((disp)->Rects) +#define SET_Rects(disp, fn) ((disp)->Rects = fn) +#define CALL_Rectsv(disp, parameters) (*((disp)->Rectsv)) parameters +#define GET_Rectsv(disp) ((disp)->Rectsv) +#define SET_Rectsv(disp, fn) ((disp)->Rectsv = fn) +#define CALL_TexCoord1d(disp, parameters) (*((disp)->TexCoord1d)) parameters +#define GET_TexCoord1d(disp) ((disp)->TexCoord1d) +#define SET_TexCoord1d(disp, fn) ((disp)->TexCoord1d = fn) +#define CALL_TexCoord1dv(disp, parameters) (*((disp)->TexCoord1dv)) parameters +#define GET_TexCoord1dv(disp) ((disp)->TexCoord1dv) +#define SET_TexCoord1dv(disp, fn) ((disp)->TexCoord1dv = fn) +#define CALL_TexCoord1f(disp, parameters) (*((disp)->TexCoord1f)) parameters +#define GET_TexCoord1f(disp) ((disp)->TexCoord1f) +#define SET_TexCoord1f(disp, fn) ((disp)->TexCoord1f = fn) +#define CALL_TexCoord1fv(disp, parameters) (*((disp)->TexCoord1fv)) parameters +#define GET_TexCoord1fv(disp) ((disp)->TexCoord1fv) +#define SET_TexCoord1fv(disp, fn) ((disp)->TexCoord1fv = fn) +#define CALL_TexCoord1i(disp, parameters) (*((disp)->TexCoord1i)) parameters +#define GET_TexCoord1i(disp) ((disp)->TexCoord1i) +#define SET_TexCoord1i(disp, fn) ((disp)->TexCoord1i = fn) +#define CALL_TexCoord1iv(disp, parameters) (*((disp)->TexCoord1iv)) parameters +#define GET_TexCoord1iv(disp) ((disp)->TexCoord1iv) +#define SET_TexCoord1iv(disp, fn) ((disp)->TexCoord1iv = fn) +#define CALL_TexCoord1s(disp, parameters) (*((disp)->TexCoord1s)) parameters +#define GET_TexCoord1s(disp) ((disp)->TexCoord1s) +#define SET_TexCoord1s(disp, fn) ((disp)->TexCoord1s = fn) +#define CALL_TexCoord1sv(disp, parameters) (*((disp)->TexCoord1sv)) parameters +#define GET_TexCoord1sv(disp) ((disp)->TexCoord1sv) +#define SET_TexCoord1sv(disp, fn) ((disp)->TexCoord1sv = fn) +#define CALL_TexCoord2d(disp, parameters) (*((disp)->TexCoord2d)) parameters +#define GET_TexCoord2d(disp) ((disp)->TexCoord2d) +#define SET_TexCoord2d(disp, fn) ((disp)->TexCoord2d = fn) +#define CALL_TexCoord2dv(disp, parameters) (*((disp)->TexCoord2dv)) parameters +#define GET_TexCoord2dv(disp) ((disp)->TexCoord2dv) +#define SET_TexCoord2dv(disp, fn) ((disp)->TexCoord2dv = fn) +#define CALL_TexCoord2f(disp, parameters) (*((disp)->TexCoord2f)) parameters +#define GET_TexCoord2f(disp) ((disp)->TexCoord2f) +#define SET_TexCoord2f(disp, fn) ((disp)->TexCoord2f = fn) +#define CALL_TexCoord2fv(disp, parameters) (*((disp)->TexCoord2fv)) parameters +#define GET_TexCoord2fv(disp) ((disp)->TexCoord2fv) +#define SET_TexCoord2fv(disp, fn) ((disp)->TexCoord2fv = fn) +#define CALL_TexCoord2i(disp, parameters) (*((disp)->TexCoord2i)) parameters +#define GET_TexCoord2i(disp) ((disp)->TexCoord2i) +#define SET_TexCoord2i(disp, fn) ((disp)->TexCoord2i = fn) +#define CALL_TexCoord2iv(disp, parameters) (*((disp)->TexCoord2iv)) parameters +#define GET_TexCoord2iv(disp) ((disp)->TexCoord2iv) +#define SET_TexCoord2iv(disp, fn) ((disp)->TexCoord2iv = fn) +#define CALL_TexCoord2s(disp, parameters) (*((disp)->TexCoord2s)) parameters +#define GET_TexCoord2s(disp) ((disp)->TexCoord2s) +#define SET_TexCoord2s(disp, fn) ((disp)->TexCoord2s = fn) +#define CALL_TexCoord2sv(disp, parameters) (*((disp)->TexCoord2sv)) parameters +#define GET_TexCoord2sv(disp) ((disp)->TexCoord2sv) +#define SET_TexCoord2sv(disp, fn) ((disp)->TexCoord2sv = fn) +#define CALL_TexCoord3d(disp, parameters) (*((disp)->TexCoord3d)) parameters +#define GET_TexCoord3d(disp) ((disp)->TexCoord3d) +#define SET_TexCoord3d(disp, fn) ((disp)->TexCoord3d = fn) +#define CALL_TexCoord3dv(disp, parameters) (*((disp)->TexCoord3dv)) parameters +#define GET_TexCoord3dv(disp) ((disp)->TexCoord3dv) +#define SET_TexCoord3dv(disp, fn) ((disp)->TexCoord3dv = fn) +#define CALL_TexCoord3f(disp, parameters) (*((disp)->TexCoord3f)) parameters +#define GET_TexCoord3f(disp) ((disp)->TexCoord3f) +#define SET_TexCoord3f(disp, fn) ((disp)->TexCoord3f = fn) +#define CALL_TexCoord3fv(disp, parameters) (*((disp)->TexCoord3fv)) parameters +#define GET_TexCoord3fv(disp) ((disp)->TexCoord3fv) +#define SET_TexCoord3fv(disp, fn) ((disp)->TexCoord3fv = fn) +#define CALL_TexCoord3i(disp, parameters) (*((disp)->TexCoord3i)) parameters +#define GET_TexCoord3i(disp) ((disp)->TexCoord3i) +#define SET_TexCoord3i(disp, fn) ((disp)->TexCoord3i = fn) +#define CALL_TexCoord3iv(disp, parameters) (*((disp)->TexCoord3iv)) parameters +#define GET_TexCoord3iv(disp) ((disp)->TexCoord3iv) +#define SET_TexCoord3iv(disp, fn) ((disp)->TexCoord3iv = fn) +#define CALL_TexCoord3s(disp, parameters) (*((disp)->TexCoord3s)) parameters +#define GET_TexCoord3s(disp) ((disp)->TexCoord3s) +#define SET_TexCoord3s(disp, fn) ((disp)->TexCoord3s = fn) +#define CALL_TexCoord3sv(disp, parameters) (*((disp)->TexCoord3sv)) parameters +#define GET_TexCoord3sv(disp) ((disp)->TexCoord3sv) +#define SET_TexCoord3sv(disp, fn) ((disp)->TexCoord3sv = fn) +#define CALL_TexCoord4d(disp, parameters) (*((disp)->TexCoord4d)) parameters +#define GET_TexCoord4d(disp) ((disp)->TexCoord4d) +#define SET_TexCoord4d(disp, fn) ((disp)->TexCoord4d = fn) +#define CALL_TexCoord4dv(disp, parameters) (*((disp)->TexCoord4dv)) parameters +#define GET_TexCoord4dv(disp) ((disp)->TexCoord4dv) +#define SET_TexCoord4dv(disp, fn) ((disp)->TexCoord4dv = fn) +#define CALL_TexCoord4f(disp, parameters) (*((disp)->TexCoord4f)) parameters +#define GET_TexCoord4f(disp) ((disp)->TexCoord4f) +#define SET_TexCoord4f(disp, fn) ((disp)->TexCoord4f = fn) +#define CALL_TexCoord4fv(disp, parameters) (*((disp)->TexCoord4fv)) parameters +#define GET_TexCoord4fv(disp) ((disp)->TexCoord4fv) +#define SET_TexCoord4fv(disp, fn) ((disp)->TexCoord4fv = fn) +#define CALL_TexCoord4i(disp, parameters) (*((disp)->TexCoord4i)) parameters +#define GET_TexCoord4i(disp) ((disp)->TexCoord4i) +#define SET_TexCoord4i(disp, fn) ((disp)->TexCoord4i = fn) +#define CALL_TexCoord4iv(disp, parameters) (*((disp)->TexCoord4iv)) parameters +#define GET_TexCoord4iv(disp) ((disp)->TexCoord4iv) +#define SET_TexCoord4iv(disp, fn) ((disp)->TexCoord4iv = fn) +#define CALL_TexCoord4s(disp, parameters) (*((disp)->TexCoord4s)) parameters +#define GET_TexCoord4s(disp) ((disp)->TexCoord4s) +#define SET_TexCoord4s(disp, fn) ((disp)->TexCoord4s = fn) +#define CALL_TexCoord4sv(disp, parameters) (*((disp)->TexCoord4sv)) parameters +#define GET_TexCoord4sv(disp) ((disp)->TexCoord4sv) +#define SET_TexCoord4sv(disp, fn) ((disp)->TexCoord4sv = fn) +#define CALL_Vertex2d(disp, parameters) (*((disp)->Vertex2d)) parameters +#define GET_Vertex2d(disp) ((disp)->Vertex2d) +#define SET_Vertex2d(disp, fn) ((disp)->Vertex2d = fn) +#define CALL_Vertex2dv(disp, parameters) (*((disp)->Vertex2dv)) parameters +#define GET_Vertex2dv(disp) ((disp)->Vertex2dv) +#define SET_Vertex2dv(disp, fn) ((disp)->Vertex2dv = fn) +#define CALL_Vertex2f(disp, parameters) (*((disp)->Vertex2f)) parameters +#define GET_Vertex2f(disp) ((disp)->Vertex2f) +#define SET_Vertex2f(disp, fn) ((disp)->Vertex2f = fn) +#define CALL_Vertex2fv(disp, parameters) (*((disp)->Vertex2fv)) parameters +#define GET_Vertex2fv(disp) ((disp)->Vertex2fv) +#define SET_Vertex2fv(disp, fn) ((disp)->Vertex2fv = fn) +#define CALL_Vertex2i(disp, parameters) (*((disp)->Vertex2i)) parameters +#define GET_Vertex2i(disp) ((disp)->Vertex2i) +#define SET_Vertex2i(disp, fn) ((disp)->Vertex2i = fn) +#define CALL_Vertex2iv(disp, parameters) (*((disp)->Vertex2iv)) parameters +#define GET_Vertex2iv(disp) ((disp)->Vertex2iv) +#define SET_Vertex2iv(disp, fn) ((disp)->Vertex2iv = fn) +#define CALL_Vertex2s(disp, parameters) (*((disp)->Vertex2s)) parameters +#define GET_Vertex2s(disp) ((disp)->Vertex2s) +#define SET_Vertex2s(disp, fn) ((disp)->Vertex2s = fn) +#define CALL_Vertex2sv(disp, parameters) (*((disp)->Vertex2sv)) parameters +#define GET_Vertex2sv(disp) ((disp)->Vertex2sv) +#define SET_Vertex2sv(disp, fn) ((disp)->Vertex2sv = fn) +#define CALL_Vertex3d(disp, parameters) (*((disp)->Vertex3d)) parameters +#define GET_Vertex3d(disp) ((disp)->Vertex3d) +#define SET_Vertex3d(disp, fn) ((disp)->Vertex3d = fn) +#define CALL_Vertex3dv(disp, parameters) (*((disp)->Vertex3dv)) parameters +#define GET_Vertex3dv(disp) ((disp)->Vertex3dv) +#define SET_Vertex3dv(disp, fn) ((disp)->Vertex3dv = fn) +#define CALL_Vertex3f(disp, parameters) (*((disp)->Vertex3f)) parameters +#define GET_Vertex3f(disp) ((disp)->Vertex3f) +#define SET_Vertex3f(disp, fn) ((disp)->Vertex3f = fn) +#define CALL_Vertex3fv(disp, parameters) (*((disp)->Vertex3fv)) parameters +#define GET_Vertex3fv(disp) ((disp)->Vertex3fv) +#define SET_Vertex3fv(disp, fn) ((disp)->Vertex3fv = fn) +#define CALL_Vertex3i(disp, parameters) (*((disp)->Vertex3i)) parameters +#define GET_Vertex3i(disp) ((disp)->Vertex3i) +#define SET_Vertex3i(disp, fn) ((disp)->Vertex3i = fn) +#define CALL_Vertex3iv(disp, parameters) (*((disp)->Vertex3iv)) parameters +#define GET_Vertex3iv(disp) ((disp)->Vertex3iv) +#define SET_Vertex3iv(disp, fn) ((disp)->Vertex3iv = fn) +#define CALL_Vertex3s(disp, parameters) (*((disp)->Vertex3s)) parameters +#define GET_Vertex3s(disp) ((disp)->Vertex3s) +#define SET_Vertex3s(disp, fn) ((disp)->Vertex3s = fn) +#define CALL_Vertex3sv(disp, parameters) (*((disp)->Vertex3sv)) parameters +#define GET_Vertex3sv(disp) ((disp)->Vertex3sv) +#define SET_Vertex3sv(disp, fn) ((disp)->Vertex3sv = fn) +#define CALL_Vertex4d(disp, parameters) (*((disp)->Vertex4d)) parameters +#define GET_Vertex4d(disp) ((disp)->Vertex4d) +#define SET_Vertex4d(disp, fn) ((disp)->Vertex4d = fn) +#define CALL_Vertex4dv(disp, parameters) (*((disp)->Vertex4dv)) parameters +#define GET_Vertex4dv(disp) ((disp)->Vertex4dv) +#define SET_Vertex4dv(disp, fn) ((disp)->Vertex4dv = fn) +#define CALL_Vertex4f(disp, parameters) (*((disp)->Vertex4f)) parameters +#define GET_Vertex4f(disp) ((disp)->Vertex4f) +#define SET_Vertex4f(disp, fn) ((disp)->Vertex4f = fn) +#define CALL_Vertex4fv(disp, parameters) (*((disp)->Vertex4fv)) parameters +#define GET_Vertex4fv(disp) ((disp)->Vertex4fv) +#define SET_Vertex4fv(disp, fn) ((disp)->Vertex4fv = fn) +#define CALL_Vertex4i(disp, parameters) (*((disp)->Vertex4i)) parameters +#define GET_Vertex4i(disp) ((disp)->Vertex4i) +#define SET_Vertex4i(disp, fn) ((disp)->Vertex4i = fn) +#define CALL_Vertex4iv(disp, parameters) (*((disp)->Vertex4iv)) parameters +#define GET_Vertex4iv(disp) ((disp)->Vertex4iv) +#define SET_Vertex4iv(disp, fn) ((disp)->Vertex4iv = fn) +#define CALL_Vertex4s(disp, parameters) (*((disp)->Vertex4s)) parameters +#define GET_Vertex4s(disp) ((disp)->Vertex4s) +#define SET_Vertex4s(disp, fn) ((disp)->Vertex4s = fn) +#define CALL_Vertex4sv(disp, parameters) (*((disp)->Vertex4sv)) parameters +#define GET_Vertex4sv(disp) ((disp)->Vertex4sv) +#define SET_Vertex4sv(disp, fn) ((disp)->Vertex4sv = fn) +#define CALL_ClipPlane(disp, parameters) (*((disp)->ClipPlane)) parameters +#define GET_ClipPlane(disp) ((disp)->ClipPlane) +#define SET_ClipPlane(disp, fn) ((disp)->ClipPlane = fn) +#define CALL_ColorMaterial(disp, parameters) (*((disp)->ColorMaterial)) parameters +#define GET_ColorMaterial(disp) ((disp)->ColorMaterial) +#define SET_ColorMaterial(disp, fn) ((disp)->ColorMaterial = fn) +#define CALL_CullFace(disp, parameters) (*((disp)->CullFace)) parameters +#define GET_CullFace(disp) ((disp)->CullFace) +#define SET_CullFace(disp, fn) ((disp)->CullFace = fn) +#define CALL_Fogf(disp, parameters) (*((disp)->Fogf)) parameters +#define GET_Fogf(disp) ((disp)->Fogf) +#define SET_Fogf(disp, fn) ((disp)->Fogf = fn) +#define CALL_Fogfv(disp, parameters) (*((disp)->Fogfv)) parameters +#define GET_Fogfv(disp) ((disp)->Fogfv) +#define SET_Fogfv(disp, fn) ((disp)->Fogfv = fn) +#define CALL_Fogi(disp, parameters) (*((disp)->Fogi)) parameters +#define GET_Fogi(disp) ((disp)->Fogi) +#define SET_Fogi(disp, fn) ((disp)->Fogi = fn) +#define CALL_Fogiv(disp, parameters) (*((disp)->Fogiv)) parameters +#define GET_Fogiv(disp) ((disp)->Fogiv) +#define SET_Fogiv(disp, fn) ((disp)->Fogiv = fn) +#define CALL_FrontFace(disp, parameters) (*((disp)->FrontFace)) parameters +#define GET_FrontFace(disp) ((disp)->FrontFace) +#define SET_FrontFace(disp, fn) ((disp)->FrontFace = fn) +#define CALL_Hint(disp, parameters) (*((disp)->Hint)) parameters +#define GET_Hint(disp) ((disp)->Hint) +#define SET_Hint(disp, fn) ((disp)->Hint = fn) +#define CALL_Lightf(disp, parameters) (*((disp)->Lightf)) parameters +#define GET_Lightf(disp) ((disp)->Lightf) +#define SET_Lightf(disp, fn) ((disp)->Lightf = fn) +#define CALL_Lightfv(disp, parameters) (*((disp)->Lightfv)) parameters +#define GET_Lightfv(disp) ((disp)->Lightfv) +#define SET_Lightfv(disp, fn) ((disp)->Lightfv = fn) +#define CALL_Lighti(disp, parameters) (*((disp)->Lighti)) parameters +#define GET_Lighti(disp) ((disp)->Lighti) +#define SET_Lighti(disp, fn) ((disp)->Lighti = fn) +#define CALL_Lightiv(disp, parameters) (*((disp)->Lightiv)) parameters +#define GET_Lightiv(disp) ((disp)->Lightiv) +#define SET_Lightiv(disp, fn) ((disp)->Lightiv = fn) +#define CALL_LightModelf(disp, parameters) (*((disp)->LightModelf)) parameters +#define GET_LightModelf(disp) ((disp)->LightModelf) +#define SET_LightModelf(disp, fn) ((disp)->LightModelf = fn) +#define CALL_LightModelfv(disp, parameters) (*((disp)->LightModelfv)) parameters +#define GET_LightModelfv(disp) ((disp)->LightModelfv) +#define SET_LightModelfv(disp, fn) ((disp)->LightModelfv = fn) +#define CALL_LightModeli(disp, parameters) (*((disp)->LightModeli)) parameters +#define GET_LightModeli(disp) ((disp)->LightModeli) +#define SET_LightModeli(disp, fn) ((disp)->LightModeli = fn) +#define CALL_LightModeliv(disp, parameters) (*((disp)->LightModeliv)) parameters +#define GET_LightModeliv(disp) ((disp)->LightModeliv) +#define SET_LightModeliv(disp, fn) ((disp)->LightModeliv = fn) +#define CALL_LineStipple(disp, parameters) (*((disp)->LineStipple)) parameters +#define GET_LineStipple(disp) ((disp)->LineStipple) +#define SET_LineStipple(disp, fn) ((disp)->LineStipple = fn) +#define CALL_LineWidth(disp, parameters) (*((disp)->LineWidth)) parameters +#define GET_LineWidth(disp) ((disp)->LineWidth) +#define SET_LineWidth(disp, fn) ((disp)->LineWidth = fn) +#define CALL_Materialf(disp, parameters) (*((disp)->Materialf)) parameters +#define GET_Materialf(disp) ((disp)->Materialf) +#define SET_Materialf(disp, fn) ((disp)->Materialf = fn) +#define CALL_Materialfv(disp, parameters) (*((disp)->Materialfv)) parameters +#define GET_Materialfv(disp) ((disp)->Materialfv) +#define SET_Materialfv(disp, fn) ((disp)->Materialfv = fn) +#define CALL_Materiali(disp, parameters) (*((disp)->Materiali)) parameters +#define GET_Materiali(disp) ((disp)->Materiali) +#define SET_Materiali(disp, fn) ((disp)->Materiali = fn) +#define CALL_Materialiv(disp, parameters) (*((disp)->Materialiv)) parameters +#define GET_Materialiv(disp) ((disp)->Materialiv) +#define SET_Materialiv(disp, fn) ((disp)->Materialiv = fn) +#define CALL_PointSize(disp, parameters) (*((disp)->PointSize)) parameters +#define GET_PointSize(disp) ((disp)->PointSize) +#define SET_PointSize(disp, fn) ((disp)->PointSize = fn) +#define CALL_PolygonMode(disp, parameters) (*((disp)->PolygonMode)) parameters +#define GET_PolygonMode(disp) ((disp)->PolygonMode) +#define SET_PolygonMode(disp, fn) ((disp)->PolygonMode = fn) +#define CALL_PolygonStipple(disp, parameters) (*((disp)->PolygonStipple)) parameters +#define GET_PolygonStipple(disp) ((disp)->PolygonStipple) +#define SET_PolygonStipple(disp, fn) ((disp)->PolygonStipple = fn) +#define CALL_Scissor(disp, parameters) (*((disp)->Scissor)) parameters +#define GET_Scissor(disp) ((disp)->Scissor) +#define SET_Scissor(disp, fn) ((disp)->Scissor = fn) +#define CALL_ShadeModel(disp, parameters) (*((disp)->ShadeModel)) parameters +#define GET_ShadeModel(disp) ((disp)->ShadeModel) +#define SET_ShadeModel(disp, fn) ((disp)->ShadeModel = fn) +#define CALL_TexParameterf(disp, parameters) (*((disp)->TexParameterf)) parameters +#define GET_TexParameterf(disp) ((disp)->TexParameterf) +#define SET_TexParameterf(disp, fn) ((disp)->TexParameterf = fn) +#define CALL_TexParameterfv(disp, parameters) (*((disp)->TexParameterfv)) parameters +#define GET_TexParameterfv(disp) ((disp)->TexParameterfv) +#define SET_TexParameterfv(disp, fn) ((disp)->TexParameterfv = fn) +#define CALL_TexParameteri(disp, parameters) (*((disp)->TexParameteri)) parameters +#define GET_TexParameteri(disp) ((disp)->TexParameteri) +#define SET_TexParameteri(disp, fn) ((disp)->TexParameteri = fn) +#define CALL_TexParameteriv(disp, parameters) (*((disp)->TexParameteriv)) parameters +#define GET_TexParameteriv(disp) ((disp)->TexParameteriv) +#define SET_TexParameteriv(disp, fn) ((disp)->TexParameteriv = fn) +#define CALL_TexImage1D(disp, parameters) (*((disp)->TexImage1D)) parameters +#define GET_TexImage1D(disp) ((disp)->TexImage1D) +#define SET_TexImage1D(disp, fn) ((disp)->TexImage1D = fn) +#define CALL_TexImage2D(disp, parameters) (*((disp)->TexImage2D)) parameters +#define GET_TexImage2D(disp) ((disp)->TexImage2D) +#define SET_TexImage2D(disp, fn) ((disp)->TexImage2D = fn) +#define CALL_TexEnvf(disp, parameters) (*((disp)->TexEnvf)) parameters +#define GET_TexEnvf(disp) ((disp)->TexEnvf) +#define SET_TexEnvf(disp, fn) ((disp)->TexEnvf = fn) +#define CALL_TexEnvfv(disp, parameters) (*((disp)->TexEnvfv)) parameters +#define GET_TexEnvfv(disp) ((disp)->TexEnvfv) +#define SET_TexEnvfv(disp, fn) ((disp)->TexEnvfv = fn) +#define CALL_TexEnvi(disp, parameters) (*((disp)->TexEnvi)) parameters +#define GET_TexEnvi(disp) ((disp)->TexEnvi) +#define SET_TexEnvi(disp, fn) ((disp)->TexEnvi = fn) +#define CALL_TexEnviv(disp, parameters) (*((disp)->TexEnviv)) parameters +#define GET_TexEnviv(disp) ((disp)->TexEnviv) +#define SET_TexEnviv(disp, fn) ((disp)->TexEnviv = fn) +#define CALL_TexGend(disp, parameters) (*((disp)->TexGend)) parameters +#define GET_TexGend(disp) ((disp)->TexGend) +#define SET_TexGend(disp, fn) ((disp)->TexGend = fn) +#define CALL_TexGendv(disp, parameters) (*((disp)->TexGendv)) parameters +#define GET_TexGendv(disp) ((disp)->TexGendv) +#define SET_TexGendv(disp, fn) ((disp)->TexGendv = fn) +#define CALL_TexGenf(disp, parameters) (*((disp)->TexGenf)) parameters +#define GET_TexGenf(disp) ((disp)->TexGenf) +#define SET_TexGenf(disp, fn) ((disp)->TexGenf = fn) +#define CALL_TexGenfv(disp, parameters) (*((disp)->TexGenfv)) parameters +#define GET_TexGenfv(disp) ((disp)->TexGenfv) +#define SET_TexGenfv(disp, fn) ((disp)->TexGenfv = fn) +#define CALL_TexGeni(disp, parameters) (*((disp)->TexGeni)) parameters +#define GET_TexGeni(disp) ((disp)->TexGeni) +#define SET_TexGeni(disp, fn) ((disp)->TexGeni = fn) +#define CALL_TexGeniv(disp, parameters) (*((disp)->TexGeniv)) parameters +#define GET_TexGeniv(disp) ((disp)->TexGeniv) +#define SET_TexGeniv(disp, fn) ((disp)->TexGeniv = fn) +#define CALL_FeedbackBuffer(disp, parameters) (*((disp)->FeedbackBuffer)) parameters +#define GET_FeedbackBuffer(disp) ((disp)->FeedbackBuffer) +#define SET_FeedbackBuffer(disp, fn) ((disp)->FeedbackBuffer = fn) +#define CALL_SelectBuffer(disp, parameters) (*((disp)->SelectBuffer)) parameters +#define GET_SelectBuffer(disp) ((disp)->SelectBuffer) +#define SET_SelectBuffer(disp, fn) ((disp)->SelectBuffer = fn) +#define CALL_RenderMode(disp, parameters) (*((disp)->RenderMode)) parameters +#define GET_RenderMode(disp) ((disp)->RenderMode) +#define SET_RenderMode(disp, fn) ((disp)->RenderMode = fn) +#define CALL_InitNames(disp, parameters) (*((disp)->InitNames)) parameters +#define GET_InitNames(disp) ((disp)->InitNames) +#define SET_InitNames(disp, fn) ((disp)->InitNames = fn) +#define CALL_LoadName(disp, parameters) (*((disp)->LoadName)) parameters +#define GET_LoadName(disp) ((disp)->LoadName) +#define SET_LoadName(disp, fn) ((disp)->LoadName = fn) +#define CALL_PassThrough(disp, parameters) (*((disp)->PassThrough)) parameters +#define GET_PassThrough(disp) ((disp)->PassThrough) +#define SET_PassThrough(disp, fn) ((disp)->PassThrough = fn) +#define CALL_PopName(disp, parameters) (*((disp)->PopName)) parameters +#define GET_PopName(disp) ((disp)->PopName) +#define SET_PopName(disp, fn) ((disp)->PopName = fn) +#define CALL_PushName(disp, parameters) (*((disp)->PushName)) parameters +#define GET_PushName(disp) ((disp)->PushName) +#define SET_PushName(disp, fn) ((disp)->PushName = fn) +#define CALL_DrawBuffer(disp, parameters) (*((disp)->DrawBuffer)) parameters +#define GET_DrawBuffer(disp) ((disp)->DrawBuffer) +#define SET_DrawBuffer(disp, fn) ((disp)->DrawBuffer = fn) +#define CALL_Clear(disp, parameters) (*((disp)->Clear)) parameters +#define GET_Clear(disp) ((disp)->Clear) +#define SET_Clear(disp, fn) ((disp)->Clear = fn) +#define CALL_ClearAccum(disp, parameters) (*((disp)->ClearAccum)) parameters +#define GET_ClearAccum(disp) ((disp)->ClearAccum) +#define SET_ClearAccum(disp, fn) ((disp)->ClearAccum = fn) +#define CALL_ClearIndex(disp, parameters) (*((disp)->ClearIndex)) parameters +#define GET_ClearIndex(disp) ((disp)->ClearIndex) +#define SET_ClearIndex(disp, fn) ((disp)->ClearIndex = fn) +#define CALL_ClearColor(disp, parameters) (*((disp)->ClearColor)) parameters +#define GET_ClearColor(disp) ((disp)->ClearColor) +#define SET_ClearColor(disp, fn) ((disp)->ClearColor = fn) +#define CALL_ClearStencil(disp, parameters) (*((disp)->ClearStencil)) parameters +#define GET_ClearStencil(disp) ((disp)->ClearStencil) +#define SET_ClearStencil(disp, fn) ((disp)->ClearStencil = fn) +#define CALL_ClearDepth(disp, parameters) (*((disp)->ClearDepth)) parameters +#define GET_ClearDepth(disp) ((disp)->ClearDepth) +#define SET_ClearDepth(disp, fn) ((disp)->ClearDepth = fn) +#define CALL_StencilMask(disp, parameters) (*((disp)->StencilMask)) parameters +#define GET_StencilMask(disp) ((disp)->StencilMask) +#define SET_StencilMask(disp, fn) ((disp)->StencilMask = fn) +#define CALL_ColorMask(disp, parameters) (*((disp)->ColorMask)) parameters +#define GET_ColorMask(disp) ((disp)->ColorMask) +#define SET_ColorMask(disp, fn) ((disp)->ColorMask = fn) +#define CALL_DepthMask(disp, parameters) (*((disp)->DepthMask)) parameters +#define GET_DepthMask(disp) ((disp)->DepthMask) +#define SET_DepthMask(disp, fn) ((disp)->DepthMask = fn) +#define CALL_IndexMask(disp, parameters) (*((disp)->IndexMask)) parameters +#define GET_IndexMask(disp) ((disp)->IndexMask) +#define SET_IndexMask(disp, fn) ((disp)->IndexMask = fn) +#define CALL_Accum(disp, parameters) (*((disp)->Accum)) parameters +#define GET_Accum(disp) ((disp)->Accum) +#define SET_Accum(disp, fn) ((disp)->Accum = fn) +#define CALL_Disable(disp, parameters) (*((disp)->Disable)) parameters +#define GET_Disable(disp) ((disp)->Disable) +#define SET_Disable(disp, fn) ((disp)->Disable = fn) +#define CALL_Enable(disp, parameters) (*((disp)->Enable)) parameters +#define GET_Enable(disp) ((disp)->Enable) +#define SET_Enable(disp, fn) ((disp)->Enable = fn) +#define CALL_Finish(disp, parameters) (*((disp)->Finish)) parameters +#define GET_Finish(disp) ((disp)->Finish) +#define SET_Finish(disp, fn) ((disp)->Finish = fn) +#define CALL_Flush(disp, parameters) (*((disp)->Flush)) parameters +#define GET_Flush(disp) ((disp)->Flush) +#define SET_Flush(disp, fn) ((disp)->Flush = fn) +#define CALL_PopAttrib(disp, parameters) (*((disp)->PopAttrib)) parameters +#define GET_PopAttrib(disp) ((disp)->PopAttrib) +#define SET_PopAttrib(disp, fn) ((disp)->PopAttrib = fn) +#define CALL_PushAttrib(disp, parameters) (*((disp)->PushAttrib)) parameters +#define GET_PushAttrib(disp) ((disp)->PushAttrib) +#define SET_PushAttrib(disp, fn) ((disp)->PushAttrib = fn) +#define CALL_Map1d(disp, parameters) (*((disp)->Map1d)) parameters +#define GET_Map1d(disp) ((disp)->Map1d) +#define SET_Map1d(disp, fn) ((disp)->Map1d = fn) +#define CALL_Map1f(disp, parameters) (*((disp)->Map1f)) parameters +#define GET_Map1f(disp) ((disp)->Map1f) +#define SET_Map1f(disp, fn) ((disp)->Map1f = fn) +#define CALL_Map2d(disp, parameters) (*((disp)->Map2d)) parameters +#define GET_Map2d(disp) ((disp)->Map2d) +#define SET_Map2d(disp, fn) ((disp)->Map2d = fn) +#define CALL_Map2f(disp, parameters) (*((disp)->Map2f)) parameters +#define GET_Map2f(disp) ((disp)->Map2f) +#define SET_Map2f(disp, fn) ((disp)->Map2f = fn) +#define CALL_MapGrid1d(disp, parameters) (*((disp)->MapGrid1d)) parameters +#define GET_MapGrid1d(disp) ((disp)->MapGrid1d) +#define SET_MapGrid1d(disp, fn) ((disp)->MapGrid1d = fn) +#define CALL_MapGrid1f(disp, parameters) (*((disp)->MapGrid1f)) parameters +#define GET_MapGrid1f(disp) ((disp)->MapGrid1f) +#define SET_MapGrid1f(disp, fn) ((disp)->MapGrid1f = fn) +#define CALL_MapGrid2d(disp, parameters) (*((disp)->MapGrid2d)) parameters +#define GET_MapGrid2d(disp) ((disp)->MapGrid2d) +#define SET_MapGrid2d(disp, fn) ((disp)->MapGrid2d = fn) +#define CALL_MapGrid2f(disp, parameters) (*((disp)->MapGrid2f)) parameters +#define GET_MapGrid2f(disp) ((disp)->MapGrid2f) +#define SET_MapGrid2f(disp, fn) ((disp)->MapGrid2f = fn) +#define CALL_EvalCoord1d(disp, parameters) (*((disp)->EvalCoord1d)) parameters +#define GET_EvalCoord1d(disp) ((disp)->EvalCoord1d) +#define SET_EvalCoord1d(disp, fn) ((disp)->EvalCoord1d = fn) +#define CALL_EvalCoord1dv(disp, parameters) (*((disp)->EvalCoord1dv)) parameters +#define GET_EvalCoord1dv(disp) ((disp)->EvalCoord1dv) +#define SET_EvalCoord1dv(disp, fn) ((disp)->EvalCoord1dv = fn) +#define CALL_EvalCoord1f(disp, parameters) (*((disp)->EvalCoord1f)) parameters +#define GET_EvalCoord1f(disp) ((disp)->EvalCoord1f) +#define SET_EvalCoord1f(disp, fn) ((disp)->EvalCoord1f = fn) +#define CALL_EvalCoord1fv(disp, parameters) (*((disp)->EvalCoord1fv)) parameters +#define GET_EvalCoord1fv(disp) ((disp)->EvalCoord1fv) +#define SET_EvalCoord1fv(disp, fn) ((disp)->EvalCoord1fv = fn) +#define CALL_EvalCoord2d(disp, parameters) (*((disp)->EvalCoord2d)) parameters +#define GET_EvalCoord2d(disp) ((disp)->EvalCoord2d) +#define SET_EvalCoord2d(disp, fn) ((disp)->EvalCoord2d = fn) +#define CALL_EvalCoord2dv(disp, parameters) (*((disp)->EvalCoord2dv)) parameters +#define GET_EvalCoord2dv(disp) ((disp)->EvalCoord2dv) +#define SET_EvalCoord2dv(disp, fn) ((disp)->EvalCoord2dv = fn) +#define CALL_EvalCoord2f(disp, parameters) (*((disp)->EvalCoord2f)) parameters +#define GET_EvalCoord2f(disp) ((disp)->EvalCoord2f) +#define SET_EvalCoord2f(disp, fn) ((disp)->EvalCoord2f = fn) +#define CALL_EvalCoord2fv(disp, parameters) (*((disp)->EvalCoord2fv)) parameters +#define GET_EvalCoord2fv(disp) ((disp)->EvalCoord2fv) +#define SET_EvalCoord2fv(disp, fn) ((disp)->EvalCoord2fv = fn) +#define CALL_EvalMesh1(disp, parameters) (*((disp)->EvalMesh1)) parameters +#define GET_EvalMesh1(disp) ((disp)->EvalMesh1) +#define SET_EvalMesh1(disp, fn) ((disp)->EvalMesh1 = fn) +#define CALL_EvalPoint1(disp, parameters) (*((disp)->EvalPoint1)) parameters +#define GET_EvalPoint1(disp) ((disp)->EvalPoint1) +#define SET_EvalPoint1(disp, fn) ((disp)->EvalPoint1 = fn) +#define CALL_EvalMesh2(disp, parameters) (*((disp)->EvalMesh2)) parameters +#define GET_EvalMesh2(disp) ((disp)->EvalMesh2) +#define SET_EvalMesh2(disp, fn) ((disp)->EvalMesh2 = fn) +#define CALL_EvalPoint2(disp, parameters) (*((disp)->EvalPoint2)) parameters +#define GET_EvalPoint2(disp) ((disp)->EvalPoint2) +#define SET_EvalPoint2(disp, fn) ((disp)->EvalPoint2 = fn) +#define CALL_AlphaFunc(disp, parameters) (*((disp)->AlphaFunc)) parameters +#define GET_AlphaFunc(disp) ((disp)->AlphaFunc) +#define SET_AlphaFunc(disp, fn) ((disp)->AlphaFunc = fn) +#define CALL_BlendFunc(disp, parameters) (*((disp)->BlendFunc)) parameters +#define GET_BlendFunc(disp) ((disp)->BlendFunc) +#define SET_BlendFunc(disp, fn) ((disp)->BlendFunc = fn) +#define CALL_LogicOp(disp, parameters) (*((disp)->LogicOp)) parameters +#define GET_LogicOp(disp) ((disp)->LogicOp) +#define SET_LogicOp(disp, fn) ((disp)->LogicOp = fn) +#define CALL_StencilFunc(disp, parameters) (*((disp)->StencilFunc)) parameters +#define GET_StencilFunc(disp) ((disp)->StencilFunc) +#define SET_StencilFunc(disp, fn) ((disp)->StencilFunc = fn) +#define CALL_StencilOp(disp, parameters) (*((disp)->StencilOp)) parameters +#define GET_StencilOp(disp) ((disp)->StencilOp) +#define SET_StencilOp(disp, fn) ((disp)->StencilOp = fn) +#define CALL_DepthFunc(disp, parameters) (*((disp)->DepthFunc)) parameters +#define GET_DepthFunc(disp) ((disp)->DepthFunc) +#define SET_DepthFunc(disp, fn) ((disp)->DepthFunc = fn) +#define CALL_PixelZoom(disp, parameters) (*((disp)->PixelZoom)) parameters +#define GET_PixelZoom(disp) ((disp)->PixelZoom) +#define SET_PixelZoom(disp, fn) ((disp)->PixelZoom = fn) +#define CALL_PixelTransferf(disp, parameters) (*((disp)->PixelTransferf)) parameters +#define GET_PixelTransferf(disp) ((disp)->PixelTransferf) +#define SET_PixelTransferf(disp, fn) ((disp)->PixelTransferf = fn) +#define CALL_PixelTransferi(disp, parameters) (*((disp)->PixelTransferi)) parameters +#define GET_PixelTransferi(disp) ((disp)->PixelTransferi) +#define SET_PixelTransferi(disp, fn) ((disp)->PixelTransferi = fn) +#define CALL_PixelStoref(disp, parameters) (*((disp)->PixelStoref)) parameters +#define GET_PixelStoref(disp) ((disp)->PixelStoref) +#define SET_PixelStoref(disp, fn) ((disp)->PixelStoref = fn) +#define CALL_PixelStorei(disp, parameters) (*((disp)->PixelStorei)) parameters +#define GET_PixelStorei(disp) ((disp)->PixelStorei) +#define SET_PixelStorei(disp, fn) ((disp)->PixelStorei = fn) +#define CALL_PixelMapfv(disp, parameters) (*((disp)->PixelMapfv)) parameters +#define GET_PixelMapfv(disp) ((disp)->PixelMapfv) +#define SET_PixelMapfv(disp, fn) ((disp)->PixelMapfv = fn) +#define CALL_PixelMapuiv(disp, parameters) (*((disp)->PixelMapuiv)) parameters +#define GET_PixelMapuiv(disp) ((disp)->PixelMapuiv) +#define SET_PixelMapuiv(disp, fn) ((disp)->PixelMapuiv = fn) +#define CALL_PixelMapusv(disp, parameters) (*((disp)->PixelMapusv)) parameters +#define GET_PixelMapusv(disp) ((disp)->PixelMapusv) +#define SET_PixelMapusv(disp, fn) ((disp)->PixelMapusv = fn) +#define CALL_ReadBuffer(disp, parameters) (*((disp)->ReadBuffer)) parameters +#define GET_ReadBuffer(disp) ((disp)->ReadBuffer) +#define SET_ReadBuffer(disp, fn) ((disp)->ReadBuffer = fn) +#define CALL_CopyPixels(disp, parameters) (*((disp)->CopyPixels)) parameters +#define GET_CopyPixels(disp) ((disp)->CopyPixels) +#define SET_CopyPixels(disp, fn) ((disp)->CopyPixels = fn) +#define CALL_ReadPixels(disp, parameters) (*((disp)->ReadPixels)) parameters +#define GET_ReadPixels(disp) ((disp)->ReadPixels) +#define SET_ReadPixels(disp, fn) ((disp)->ReadPixels = fn) +#define CALL_DrawPixels(disp, parameters) (*((disp)->DrawPixels)) parameters +#define GET_DrawPixels(disp) ((disp)->DrawPixels) +#define SET_DrawPixels(disp, fn) ((disp)->DrawPixels = fn) +#define CALL_GetBooleanv(disp, parameters) (*((disp)->GetBooleanv)) parameters +#define GET_GetBooleanv(disp) ((disp)->GetBooleanv) +#define SET_GetBooleanv(disp, fn) ((disp)->GetBooleanv = fn) +#define CALL_GetClipPlane(disp, parameters) (*((disp)->GetClipPlane)) parameters +#define GET_GetClipPlane(disp) ((disp)->GetClipPlane) +#define SET_GetClipPlane(disp, fn) ((disp)->GetClipPlane = fn) +#define CALL_GetDoublev(disp, parameters) (*((disp)->GetDoublev)) parameters +#define GET_GetDoublev(disp) ((disp)->GetDoublev) +#define SET_GetDoublev(disp, fn) ((disp)->GetDoublev = fn) +#define CALL_GetError(disp, parameters) (*((disp)->GetError)) parameters +#define GET_GetError(disp) ((disp)->GetError) +#define SET_GetError(disp, fn) ((disp)->GetError = fn) +#define CALL_GetFloatv(disp, parameters) (*((disp)->GetFloatv)) parameters +#define GET_GetFloatv(disp) ((disp)->GetFloatv) +#define SET_GetFloatv(disp, fn) ((disp)->GetFloatv = fn) +#define CALL_GetIntegerv(disp, parameters) (*((disp)->GetIntegerv)) parameters +#define GET_GetIntegerv(disp) ((disp)->GetIntegerv) +#define SET_GetIntegerv(disp, fn) ((disp)->GetIntegerv = fn) +#define CALL_GetLightfv(disp, parameters) (*((disp)->GetLightfv)) parameters +#define GET_GetLightfv(disp) ((disp)->GetLightfv) +#define SET_GetLightfv(disp, fn) ((disp)->GetLightfv = fn) +#define CALL_GetLightiv(disp, parameters) (*((disp)->GetLightiv)) parameters +#define GET_GetLightiv(disp) ((disp)->GetLightiv) +#define SET_GetLightiv(disp, fn) ((disp)->GetLightiv = fn) +#define CALL_GetMapdv(disp, parameters) (*((disp)->GetMapdv)) parameters +#define GET_GetMapdv(disp) ((disp)->GetMapdv) +#define SET_GetMapdv(disp, fn) ((disp)->GetMapdv = fn) +#define CALL_GetMapfv(disp, parameters) (*((disp)->GetMapfv)) parameters +#define GET_GetMapfv(disp) ((disp)->GetMapfv) +#define SET_GetMapfv(disp, fn) ((disp)->GetMapfv = fn) +#define CALL_GetMapiv(disp, parameters) (*((disp)->GetMapiv)) parameters +#define GET_GetMapiv(disp) ((disp)->GetMapiv) +#define SET_GetMapiv(disp, fn) ((disp)->GetMapiv = fn) +#define CALL_GetMaterialfv(disp, parameters) (*((disp)->GetMaterialfv)) parameters +#define GET_GetMaterialfv(disp) ((disp)->GetMaterialfv) +#define SET_GetMaterialfv(disp, fn) ((disp)->GetMaterialfv = fn) +#define CALL_GetMaterialiv(disp, parameters) (*((disp)->GetMaterialiv)) parameters +#define GET_GetMaterialiv(disp) ((disp)->GetMaterialiv) +#define SET_GetMaterialiv(disp, fn) ((disp)->GetMaterialiv = fn) +#define CALL_GetPixelMapfv(disp, parameters) (*((disp)->GetPixelMapfv)) parameters +#define GET_GetPixelMapfv(disp) ((disp)->GetPixelMapfv) +#define SET_GetPixelMapfv(disp, fn) ((disp)->GetPixelMapfv = fn) +#define CALL_GetPixelMapuiv(disp, parameters) (*((disp)->GetPixelMapuiv)) parameters +#define GET_GetPixelMapuiv(disp) ((disp)->GetPixelMapuiv) +#define SET_GetPixelMapuiv(disp, fn) ((disp)->GetPixelMapuiv = fn) +#define CALL_GetPixelMapusv(disp, parameters) (*((disp)->GetPixelMapusv)) parameters +#define GET_GetPixelMapusv(disp) ((disp)->GetPixelMapusv) +#define SET_GetPixelMapusv(disp, fn) ((disp)->GetPixelMapusv = fn) +#define CALL_GetPolygonStipple(disp, parameters) (*((disp)->GetPolygonStipple)) parameters +#define GET_GetPolygonStipple(disp) ((disp)->GetPolygonStipple) +#define SET_GetPolygonStipple(disp, fn) ((disp)->GetPolygonStipple = fn) +#define CALL_GetString(disp, parameters) (*((disp)->GetString)) parameters +#define GET_GetString(disp) ((disp)->GetString) +#define SET_GetString(disp, fn) ((disp)->GetString = fn) +#define CALL_GetTexEnvfv(disp, parameters) (*((disp)->GetTexEnvfv)) parameters +#define GET_GetTexEnvfv(disp) ((disp)->GetTexEnvfv) +#define SET_GetTexEnvfv(disp, fn) ((disp)->GetTexEnvfv = fn) +#define CALL_GetTexEnviv(disp, parameters) (*((disp)->GetTexEnviv)) parameters +#define GET_GetTexEnviv(disp) ((disp)->GetTexEnviv) +#define SET_GetTexEnviv(disp, fn) ((disp)->GetTexEnviv = fn) +#define CALL_GetTexGendv(disp, parameters) (*((disp)->GetTexGendv)) parameters +#define GET_GetTexGendv(disp) ((disp)->GetTexGendv) +#define SET_GetTexGendv(disp, fn) ((disp)->GetTexGendv = fn) +#define CALL_GetTexGenfv(disp, parameters) (*((disp)->GetTexGenfv)) parameters +#define GET_GetTexGenfv(disp) ((disp)->GetTexGenfv) +#define SET_GetTexGenfv(disp, fn) ((disp)->GetTexGenfv = fn) +#define CALL_GetTexGeniv(disp, parameters) (*((disp)->GetTexGeniv)) parameters +#define GET_GetTexGeniv(disp) ((disp)->GetTexGeniv) +#define SET_GetTexGeniv(disp, fn) ((disp)->GetTexGeniv = fn) +#define CALL_GetTexImage(disp, parameters) (*((disp)->GetTexImage)) parameters +#define GET_GetTexImage(disp) ((disp)->GetTexImage) +#define SET_GetTexImage(disp, fn) ((disp)->GetTexImage = fn) +#define CALL_GetTexParameterfv(disp, parameters) (*((disp)->GetTexParameterfv)) parameters +#define GET_GetTexParameterfv(disp) ((disp)->GetTexParameterfv) +#define SET_GetTexParameterfv(disp, fn) ((disp)->GetTexParameterfv = fn) +#define CALL_GetTexParameteriv(disp, parameters) (*((disp)->GetTexParameteriv)) parameters +#define GET_GetTexParameteriv(disp) ((disp)->GetTexParameteriv) +#define SET_GetTexParameteriv(disp, fn) ((disp)->GetTexParameteriv = fn) +#define CALL_GetTexLevelParameterfv(disp, parameters) (*((disp)->GetTexLevelParameterfv)) parameters +#define GET_GetTexLevelParameterfv(disp) ((disp)->GetTexLevelParameterfv) +#define SET_GetTexLevelParameterfv(disp, fn) ((disp)->GetTexLevelParameterfv = fn) +#define CALL_GetTexLevelParameteriv(disp, parameters) (*((disp)->GetTexLevelParameteriv)) parameters +#define GET_GetTexLevelParameteriv(disp) ((disp)->GetTexLevelParameteriv) +#define SET_GetTexLevelParameteriv(disp, fn) ((disp)->GetTexLevelParameteriv = fn) +#define CALL_IsEnabled(disp, parameters) (*((disp)->IsEnabled)) parameters +#define GET_IsEnabled(disp) ((disp)->IsEnabled) +#define SET_IsEnabled(disp, fn) ((disp)->IsEnabled = fn) +#define CALL_IsList(disp, parameters) (*((disp)->IsList)) parameters +#define GET_IsList(disp) ((disp)->IsList) +#define SET_IsList(disp, fn) ((disp)->IsList = fn) +#define CALL_DepthRange(disp, parameters) (*((disp)->DepthRange)) parameters +#define GET_DepthRange(disp) ((disp)->DepthRange) +#define SET_DepthRange(disp, fn) ((disp)->DepthRange = fn) +#define CALL_Frustum(disp, parameters) (*((disp)->Frustum)) parameters +#define GET_Frustum(disp) ((disp)->Frustum) +#define SET_Frustum(disp, fn) ((disp)->Frustum = fn) +#define CALL_LoadIdentity(disp, parameters) (*((disp)->LoadIdentity)) parameters +#define GET_LoadIdentity(disp) ((disp)->LoadIdentity) +#define SET_LoadIdentity(disp, fn) ((disp)->LoadIdentity = fn) +#define CALL_LoadMatrixf(disp, parameters) (*((disp)->LoadMatrixf)) parameters +#define GET_LoadMatrixf(disp) ((disp)->LoadMatrixf) +#define SET_LoadMatrixf(disp, fn) ((disp)->LoadMatrixf = fn) +#define CALL_LoadMatrixd(disp, parameters) (*((disp)->LoadMatrixd)) parameters +#define GET_LoadMatrixd(disp) ((disp)->LoadMatrixd) +#define SET_LoadMatrixd(disp, fn) ((disp)->LoadMatrixd = fn) +#define CALL_MatrixMode(disp, parameters) (*((disp)->MatrixMode)) parameters +#define GET_MatrixMode(disp) ((disp)->MatrixMode) +#define SET_MatrixMode(disp, fn) ((disp)->MatrixMode = fn) +#define CALL_MultMatrixf(disp, parameters) (*((disp)->MultMatrixf)) parameters +#define GET_MultMatrixf(disp) ((disp)->MultMatrixf) +#define SET_MultMatrixf(disp, fn) ((disp)->MultMatrixf = fn) +#define CALL_MultMatrixd(disp, parameters) (*((disp)->MultMatrixd)) parameters +#define GET_MultMatrixd(disp) ((disp)->MultMatrixd) +#define SET_MultMatrixd(disp, fn) ((disp)->MultMatrixd = fn) +#define CALL_Ortho(disp, parameters) (*((disp)->Ortho)) parameters +#define GET_Ortho(disp) ((disp)->Ortho) +#define SET_Ortho(disp, fn) ((disp)->Ortho = fn) +#define CALL_PopMatrix(disp, parameters) (*((disp)->PopMatrix)) parameters +#define GET_PopMatrix(disp) ((disp)->PopMatrix) +#define SET_PopMatrix(disp, fn) ((disp)->PopMatrix = fn) +#define CALL_PushMatrix(disp, parameters) (*((disp)->PushMatrix)) parameters +#define GET_PushMatrix(disp) ((disp)->PushMatrix) +#define SET_PushMatrix(disp, fn) ((disp)->PushMatrix = fn) +#define CALL_Rotated(disp, parameters) (*((disp)->Rotated)) parameters +#define GET_Rotated(disp) ((disp)->Rotated) +#define SET_Rotated(disp, fn) ((disp)->Rotated = fn) +#define CALL_Rotatef(disp, parameters) (*((disp)->Rotatef)) parameters +#define GET_Rotatef(disp) ((disp)->Rotatef) +#define SET_Rotatef(disp, fn) ((disp)->Rotatef = fn) +#define CALL_Scaled(disp, parameters) (*((disp)->Scaled)) parameters +#define GET_Scaled(disp) ((disp)->Scaled) +#define SET_Scaled(disp, fn) ((disp)->Scaled = fn) +#define CALL_Scalef(disp, parameters) (*((disp)->Scalef)) parameters +#define GET_Scalef(disp) ((disp)->Scalef) +#define SET_Scalef(disp, fn) ((disp)->Scalef = fn) +#define CALL_Translated(disp, parameters) (*((disp)->Translated)) parameters +#define GET_Translated(disp) ((disp)->Translated) +#define SET_Translated(disp, fn) ((disp)->Translated = fn) +#define CALL_Translatef(disp, parameters) (*((disp)->Translatef)) parameters +#define GET_Translatef(disp) ((disp)->Translatef) +#define SET_Translatef(disp, fn) ((disp)->Translatef = fn) +#define CALL_Viewport(disp, parameters) (*((disp)->Viewport)) parameters +#define GET_Viewport(disp) ((disp)->Viewport) +#define SET_Viewport(disp, fn) ((disp)->Viewport = fn) +#define CALL_ArrayElement(disp, parameters) (*((disp)->ArrayElement)) parameters +#define GET_ArrayElement(disp) ((disp)->ArrayElement) +#define SET_ArrayElement(disp, fn) ((disp)->ArrayElement = fn) +#define CALL_BindTexture(disp, parameters) (*((disp)->BindTexture)) parameters +#define GET_BindTexture(disp) ((disp)->BindTexture) +#define SET_BindTexture(disp, fn) ((disp)->BindTexture = fn) +#define CALL_ColorPointer(disp, parameters) (*((disp)->ColorPointer)) parameters +#define GET_ColorPointer(disp) ((disp)->ColorPointer) +#define SET_ColorPointer(disp, fn) ((disp)->ColorPointer = fn) +#define CALL_DisableClientState(disp, parameters) (*((disp)->DisableClientState)) parameters +#define GET_DisableClientState(disp) ((disp)->DisableClientState) +#define SET_DisableClientState(disp, fn) ((disp)->DisableClientState = fn) +#define CALL_DrawArrays(disp, parameters) (*((disp)->DrawArrays)) parameters +#define GET_DrawArrays(disp) ((disp)->DrawArrays) +#define SET_DrawArrays(disp, fn) ((disp)->DrawArrays = fn) +#define CALL_DrawElements(disp, parameters) (*((disp)->DrawElements)) parameters +#define GET_DrawElements(disp) ((disp)->DrawElements) +#define SET_DrawElements(disp, fn) ((disp)->DrawElements = fn) +#define CALL_EdgeFlagPointer(disp, parameters) (*((disp)->EdgeFlagPointer)) parameters +#define GET_EdgeFlagPointer(disp) ((disp)->EdgeFlagPointer) +#define SET_EdgeFlagPointer(disp, fn) ((disp)->EdgeFlagPointer = fn) +#define CALL_EnableClientState(disp, parameters) (*((disp)->EnableClientState)) parameters +#define GET_EnableClientState(disp) ((disp)->EnableClientState) +#define SET_EnableClientState(disp, fn) ((disp)->EnableClientState = fn) +#define CALL_IndexPointer(disp, parameters) (*((disp)->IndexPointer)) parameters +#define GET_IndexPointer(disp) ((disp)->IndexPointer) +#define SET_IndexPointer(disp, fn) ((disp)->IndexPointer = fn) +#define CALL_Indexub(disp, parameters) (*((disp)->Indexub)) parameters +#define GET_Indexub(disp) ((disp)->Indexub) +#define SET_Indexub(disp, fn) ((disp)->Indexub = fn) +#define CALL_Indexubv(disp, parameters) (*((disp)->Indexubv)) parameters +#define GET_Indexubv(disp) ((disp)->Indexubv) +#define SET_Indexubv(disp, fn) ((disp)->Indexubv = fn) +#define CALL_InterleavedArrays(disp, parameters) (*((disp)->InterleavedArrays)) parameters +#define GET_InterleavedArrays(disp) ((disp)->InterleavedArrays) +#define SET_InterleavedArrays(disp, fn) ((disp)->InterleavedArrays = fn) +#define CALL_NormalPointer(disp, parameters) (*((disp)->NormalPointer)) parameters +#define GET_NormalPointer(disp) ((disp)->NormalPointer) +#define SET_NormalPointer(disp, fn) ((disp)->NormalPointer = fn) +#define CALL_PolygonOffset(disp, parameters) (*((disp)->PolygonOffset)) parameters +#define GET_PolygonOffset(disp) ((disp)->PolygonOffset) +#define SET_PolygonOffset(disp, fn) ((disp)->PolygonOffset = fn) +#define CALL_TexCoordPointer(disp, parameters) (*((disp)->TexCoordPointer)) parameters +#define GET_TexCoordPointer(disp) ((disp)->TexCoordPointer) +#define SET_TexCoordPointer(disp, fn) ((disp)->TexCoordPointer = fn) +#define CALL_VertexPointer(disp, parameters) (*((disp)->VertexPointer)) parameters +#define GET_VertexPointer(disp) ((disp)->VertexPointer) +#define SET_VertexPointer(disp, fn) ((disp)->VertexPointer = fn) +#define CALL_AreTexturesResident(disp, parameters) (*((disp)->AreTexturesResident)) parameters +#define GET_AreTexturesResident(disp) ((disp)->AreTexturesResident) +#define SET_AreTexturesResident(disp, fn) ((disp)->AreTexturesResident = fn) +#define CALL_CopyTexImage1D(disp, parameters) (*((disp)->CopyTexImage1D)) parameters +#define GET_CopyTexImage1D(disp) ((disp)->CopyTexImage1D) +#define SET_CopyTexImage1D(disp, fn) ((disp)->CopyTexImage1D = fn) +#define CALL_CopyTexImage2D(disp, parameters) (*((disp)->CopyTexImage2D)) parameters +#define GET_CopyTexImage2D(disp) ((disp)->CopyTexImage2D) +#define SET_CopyTexImage2D(disp, fn) ((disp)->CopyTexImage2D = fn) +#define CALL_CopyTexSubImage1D(disp, parameters) (*((disp)->CopyTexSubImage1D)) parameters +#define GET_CopyTexSubImage1D(disp) ((disp)->CopyTexSubImage1D) +#define SET_CopyTexSubImage1D(disp, fn) ((disp)->CopyTexSubImage1D = fn) +#define CALL_CopyTexSubImage2D(disp, parameters) (*((disp)->CopyTexSubImage2D)) parameters +#define GET_CopyTexSubImage2D(disp) ((disp)->CopyTexSubImage2D) +#define SET_CopyTexSubImage2D(disp, fn) ((disp)->CopyTexSubImage2D = fn) +#define CALL_DeleteTextures(disp, parameters) (*((disp)->DeleteTextures)) parameters +#define GET_DeleteTextures(disp) ((disp)->DeleteTextures) +#define SET_DeleteTextures(disp, fn) ((disp)->DeleteTextures = fn) +#define CALL_GenTextures(disp, parameters) (*((disp)->GenTextures)) parameters +#define GET_GenTextures(disp) ((disp)->GenTextures) +#define SET_GenTextures(disp, fn) ((disp)->GenTextures = fn) +#define CALL_GetPointerv(disp, parameters) (*((disp)->GetPointerv)) parameters +#define GET_GetPointerv(disp) ((disp)->GetPointerv) +#define SET_GetPointerv(disp, fn) ((disp)->GetPointerv = fn) +#define CALL_IsTexture(disp, parameters) (*((disp)->IsTexture)) parameters +#define GET_IsTexture(disp) ((disp)->IsTexture) +#define SET_IsTexture(disp, fn) ((disp)->IsTexture = fn) +#define CALL_PrioritizeTextures(disp, parameters) (*((disp)->PrioritizeTextures)) parameters +#define GET_PrioritizeTextures(disp) ((disp)->PrioritizeTextures) +#define SET_PrioritizeTextures(disp, fn) ((disp)->PrioritizeTextures = fn) +#define CALL_TexSubImage1D(disp, parameters) (*((disp)->TexSubImage1D)) parameters +#define GET_TexSubImage1D(disp) ((disp)->TexSubImage1D) +#define SET_TexSubImage1D(disp, fn) ((disp)->TexSubImage1D = fn) +#define CALL_TexSubImage2D(disp, parameters) (*((disp)->TexSubImage2D)) parameters +#define GET_TexSubImage2D(disp) ((disp)->TexSubImage2D) +#define SET_TexSubImage2D(disp, fn) ((disp)->TexSubImage2D = fn) +#define CALL_PopClientAttrib(disp, parameters) (*((disp)->PopClientAttrib)) parameters +#define GET_PopClientAttrib(disp) ((disp)->PopClientAttrib) +#define SET_PopClientAttrib(disp, fn) ((disp)->PopClientAttrib = fn) +#define CALL_PushClientAttrib(disp, parameters) (*((disp)->PushClientAttrib)) parameters +#define GET_PushClientAttrib(disp) ((disp)->PushClientAttrib) +#define SET_PushClientAttrib(disp, fn) ((disp)->PushClientAttrib = fn) +#define CALL_BlendColor(disp, parameters) (*((disp)->BlendColor)) parameters +#define GET_BlendColor(disp) ((disp)->BlendColor) +#define SET_BlendColor(disp, fn) ((disp)->BlendColor = fn) +#define CALL_BlendEquation(disp, parameters) (*((disp)->BlendEquation)) parameters +#define GET_BlendEquation(disp) ((disp)->BlendEquation) +#define SET_BlendEquation(disp, fn) ((disp)->BlendEquation = fn) +#define CALL_DrawRangeElements(disp, parameters) (*((disp)->DrawRangeElements)) parameters +#define GET_DrawRangeElements(disp) ((disp)->DrawRangeElements) +#define SET_DrawRangeElements(disp, fn) ((disp)->DrawRangeElements = fn) +#define CALL_ColorTable(disp, parameters) (*((disp)->ColorTable)) parameters +#define GET_ColorTable(disp) ((disp)->ColorTable) +#define SET_ColorTable(disp, fn) ((disp)->ColorTable = fn) +#define CALL_ColorTableParameterfv(disp, parameters) (*((disp)->ColorTableParameterfv)) parameters +#define GET_ColorTableParameterfv(disp) ((disp)->ColorTableParameterfv) +#define SET_ColorTableParameterfv(disp, fn) ((disp)->ColorTableParameterfv = fn) +#define CALL_ColorTableParameteriv(disp, parameters) (*((disp)->ColorTableParameteriv)) parameters +#define GET_ColorTableParameteriv(disp) ((disp)->ColorTableParameteriv) +#define SET_ColorTableParameteriv(disp, fn) ((disp)->ColorTableParameteriv = fn) +#define CALL_CopyColorTable(disp, parameters) (*((disp)->CopyColorTable)) parameters +#define GET_CopyColorTable(disp) ((disp)->CopyColorTable) +#define SET_CopyColorTable(disp, fn) ((disp)->CopyColorTable = fn) +#define CALL_GetColorTable(disp, parameters) (*((disp)->GetColorTable)) parameters +#define GET_GetColorTable(disp) ((disp)->GetColorTable) +#define SET_GetColorTable(disp, fn) ((disp)->GetColorTable = fn) +#define CALL_GetColorTableParameterfv(disp, parameters) (*((disp)->GetColorTableParameterfv)) parameters +#define GET_GetColorTableParameterfv(disp) ((disp)->GetColorTableParameterfv) +#define SET_GetColorTableParameterfv(disp, fn) ((disp)->GetColorTableParameterfv = fn) +#define CALL_GetColorTableParameteriv(disp, parameters) (*((disp)->GetColorTableParameteriv)) parameters +#define GET_GetColorTableParameteriv(disp) ((disp)->GetColorTableParameteriv) +#define SET_GetColorTableParameteriv(disp, fn) ((disp)->GetColorTableParameteriv = fn) +#define CALL_ColorSubTable(disp, parameters) (*((disp)->ColorSubTable)) parameters +#define GET_ColorSubTable(disp) ((disp)->ColorSubTable) +#define SET_ColorSubTable(disp, fn) ((disp)->ColorSubTable = fn) +#define CALL_CopyColorSubTable(disp, parameters) (*((disp)->CopyColorSubTable)) parameters +#define GET_CopyColorSubTable(disp) ((disp)->CopyColorSubTable) +#define SET_CopyColorSubTable(disp, fn) ((disp)->CopyColorSubTable = fn) +#define CALL_ConvolutionFilter1D(disp, parameters) (*((disp)->ConvolutionFilter1D)) parameters +#define GET_ConvolutionFilter1D(disp) ((disp)->ConvolutionFilter1D) +#define SET_ConvolutionFilter1D(disp, fn) ((disp)->ConvolutionFilter1D = fn) +#define CALL_ConvolutionFilter2D(disp, parameters) (*((disp)->ConvolutionFilter2D)) parameters +#define GET_ConvolutionFilter2D(disp) ((disp)->ConvolutionFilter2D) +#define SET_ConvolutionFilter2D(disp, fn) ((disp)->ConvolutionFilter2D = fn) +#define CALL_ConvolutionParameterf(disp, parameters) (*((disp)->ConvolutionParameterf)) parameters +#define GET_ConvolutionParameterf(disp) ((disp)->ConvolutionParameterf) +#define SET_ConvolutionParameterf(disp, fn) ((disp)->ConvolutionParameterf = fn) +#define CALL_ConvolutionParameterfv(disp, parameters) (*((disp)->ConvolutionParameterfv)) parameters +#define GET_ConvolutionParameterfv(disp) ((disp)->ConvolutionParameterfv) +#define SET_ConvolutionParameterfv(disp, fn) ((disp)->ConvolutionParameterfv = fn) +#define CALL_ConvolutionParameteri(disp, parameters) (*((disp)->ConvolutionParameteri)) parameters +#define GET_ConvolutionParameteri(disp) ((disp)->ConvolutionParameteri) +#define SET_ConvolutionParameteri(disp, fn) ((disp)->ConvolutionParameteri = fn) +#define CALL_ConvolutionParameteriv(disp, parameters) (*((disp)->ConvolutionParameteriv)) parameters +#define GET_ConvolutionParameteriv(disp) ((disp)->ConvolutionParameteriv) +#define SET_ConvolutionParameteriv(disp, fn) ((disp)->ConvolutionParameteriv = fn) +#define CALL_CopyConvolutionFilter1D(disp, parameters) (*((disp)->CopyConvolutionFilter1D)) parameters +#define GET_CopyConvolutionFilter1D(disp) ((disp)->CopyConvolutionFilter1D) +#define SET_CopyConvolutionFilter1D(disp, fn) ((disp)->CopyConvolutionFilter1D = fn) +#define CALL_CopyConvolutionFilter2D(disp, parameters) (*((disp)->CopyConvolutionFilter2D)) parameters +#define GET_CopyConvolutionFilter2D(disp) ((disp)->CopyConvolutionFilter2D) +#define SET_CopyConvolutionFilter2D(disp, fn) ((disp)->CopyConvolutionFilter2D = fn) +#define CALL_GetConvolutionFilter(disp, parameters) (*((disp)->GetConvolutionFilter)) parameters +#define GET_GetConvolutionFilter(disp) ((disp)->GetConvolutionFilter) +#define SET_GetConvolutionFilter(disp, fn) ((disp)->GetConvolutionFilter = fn) +#define CALL_GetConvolutionParameterfv(disp, parameters) (*((disp)->GetConvolutionParameterfv)) parameters +#define GET_GetConvolutionParameterfv(disp) ((disp)->GetConvolutionParameterfv) +#define SET_GetConvolutionParameterfv(disp, fn) ((disp)->GetConvolutionParameterfv = fn) +#define CALL_GetConvolutionParameteriv(disp, parameters) (*((disp)->GetConvolutionParameteriv)) parameters +#define GET_GetConvolutionParameteriv(disp) ((disp)->GetConvolutionParameteriv) +#define SET_GetConvolutionParameteriv(disp, fn) ((disp)->GetConvolutionParameteriv = fn) +#define CALL_GetSeparableFilter(disp, parameters) (*((disp)->GetSeparableFilter)) parameters +#define GET_GetSeparableFilter(disp) ((disp)->GetSeparableFilter) +#define SET_GetSeparableFilter(disp, fn) ((disp)->GetSeparableFilter = fn) +#define CALL_SeparableFilter2D(disp, parameters) (*((disp)->SeparableFilter2D)) parameters +#define GET_SeparableFilter2D(disp) ((disp)->SeparableFilter2D) +#define SET_SeparableFilter2D(disp, fn) ((disp)->SeparableFilter2D = fn) +#define CALL_GetHistogram(disp, parameters) (*((disp)->GetHistogram)) parameters +#define GET_GetHistogram(disp) ((disp)->GetHistogram) +#define SET_GetHistogram(disp, fn) ((disp)->GetHistogram = fn) +#define CALL_GetHistogramParameterfv(disp, parameters) (*((disp)->GetHistogramParameterfv)) parameters +#define GET_GetHistogramParameterfv(disp) ((disp)->GetHistogramParameterfv) +#define SET_GetHistogramParameterfv(disp, fn) ((disp)->GetHistogramParameterfv = fn) +#define CALL_GetHistogramParameteriv(disp, parameters) (*((disp)->GetHistogramParameteriv)) parameters +#define GET_GetHistogramParameteriv(disp) ((disp)->GetHistogramParameteriv) +#define SET_GetHistogramParameteriv(disp, fn) ((disp)->GetHistogramParameteriv = fn) +#define CALL_GetMinmax(disp, parameters) (*((disp)->GetMinmax)) parameters +#define GET_GetMinmax(disp) ((disp)->GetMinmax) +#define SET_GetMinmax(disp, fn) ((disp)->GetMinmax = fn) +#define CALL_GetMinmaxParameterfv(disp, parameters) (*((disp)->GetMinmaxParameterfv)) parameters +#define GET_GetMinmaxParameterfv(disp) ((disp)->GetMinmaxParameterfv) +#define SET_GetMinmaxParameterfv(disp, fn) ((disp)->GetMinmaxParameterfv = fn) +#define CALL_GetMinmaxParameteriv(disp, parameters) (*((disp)->GetMinmaxParameteriv)) parameters +#define GET_GetMinmaxParameteriv(disp) ((disp)->GetMinmaxParameteriv) +#define SET_GetMinmaxParameteriv(disp, fn) ((disp)->GetMinmaxParameteriv = fn) +#define CALL_Histogram(disp, parameters) (*((disp)->Histogram)) parameters +#define GET_Histogram(disp) ((disp)->Histogram) +#define SET_Histogram(disp, fn) ((disp)->Histogram = fn) +#define CALL_Minmax(disp, parameters) (*((disp)->Minmax)) parameters +#define GET_Minmax(disp) ((disp)->Minmax) +#define SET_Minmax(disp, fn) ((disp)->Minmax = fn) +#define CALL_ResetHistogram(disp, parameters) (*((disp)->ResetHistogram)) parameters +#define GET_ResetHistogram(disp) ((disp)->ResetHistogram) +#define SET_ResetHistogram(disp, fn) ((disp)->ResetHistogram = fn) +#define CALL_ResetMinmax(disp, parameters) (*((disp)->ResetMinmax)) parameters +#define GET_ResetMinmax(disp) ((disp)->ResetMinmax) +#define SET_ResetMinmax(disp, fn) ((disp)->ResetMinmax = fn) +#define CALL_TexImage3D(disp, parameters) (*((disp)->TexImage3D)) parameters +#define GET_TexImage3D(disp) ((disp)->TexImage3D) +#define SET_TexImage3D(disp, fn) ((disp)->TexImage3D = fn) +#define CALL_TexSubImage3D(disp, parameters) (*((disp)->TexSubImage3D)) parameters +#define GET_TexSubImage3D(disp) ((disp)->TexSubImage3D) +#define SET_TexSubImage3D(disp, fn) ((disp)->TexSubImage3D = fn) +#define CALL_CopyTexSubImage3D(disp, parameters) (*((disp)->CopyTexSubImage3D)) parameters +#define GET_CopyTexSubImage3D(disp) ((disp)->CopyTexSubImage3D) +#define SET_CopyTexSubImage3D(disp, fn) ((disp)->CopyTexSubImage3D = fn) +#define CALL_ActiveTextureARB(disp, parameters) (*((disp)->ActiveTextureARB)) parameters +#define GET_ActiveTextureARB(disp) ((disp)->ActiveTextureARB) +#define SET_ActiveTextureARB(disp, fn) ((disp)->ActiveTextureARB = fn) +#define CALL_ClientActiveTextureARB(disp, parameters) (*((disp)->ClientActiveTextureARB)) parameters +#define GET_ClientActiveTextureARB(disp) ((disp)->ClientActiveTextureARB) +#define SET_ClientActiveTextureARB(disp, fn) ((disp)->ClientActiveTextureARB = fn) +#define CALL_MultiTexCoord1dARB(disp, parameters) (*((disp)->MultiTexCoord1dARB)) parameters +#define GET_MultiTexCoord1dARB(disp) ((disp)->MultiTexCoord1dARB) +#define SET_MultiTexCoord1dARB(disp, fn) ((disp)->MultiTexCoord1dARB = fn) +#define CALL_MultiTexCoord1dvARB(disp, parameters) (*((disp)->MultiTexCoord1dvARB)) parameters +#define GET_MultiTexCoord1dvARB(disp) ((disp)->MultiTexCoord1dvARB) +#define SET_MultiTexCoord1dvARB(disp, fn) ((disp)->MultiTexCoord1dvARB = fn) +#define CALL_MultiTexCoord1fARB(disp, parameters) (*((disp)->MultiTexCoord1fARB)) parameters +#define GET_MultiTexCoord1fARB(disp) ((disp)->MultiTexCoord1fARB) +#define SET_MultiTexCoord1fARB(disp, fn) ((disp)->MultiTexCoord1fARB = fn) +#define CALL_MultiTexCoord1fvARB(disp, parameters) (*((disp)->MultiTexCoord1fvARB)) parameters +#define GET_MultiTexCoord1fvARB(disp) ((disp)->MultiTexCoord1fvARB) +#define SET_MultiTexCoord1fvARB(disp, fn) ((disp)->MultiTexCoord1fvARB = fn) +#define CALL_MultiTexCoord1iARB(disp, parameters) (*((disp)->MultiTexCoord1iARB)) parameters +#define GET_MultiTexCoord1iARB(disp) ((disp)->MultiTexCoord1iARB) +#define SET_MultiTexCoord1iARB(disp, fn) ((disp)->MultiTexCoord1iARB = fn) +#define CALL_MultiTexCoord1ivARB(disp, parameters) (*((disp)->MultiTexCoord1ivARB)) parameters +#define GET_MultiTexCoord1ivARB(disp) ((disp)->MultiTexCoord1ivARB) +#define SET_MultiTexCoord1ivARB(disp, fn) ((disp)->MultiTexCoord1ivARB = fn) +#define CALL_MultiTexCoord1sARB(disp, parameters) (*((disp)->MultiTexCoord1sARB)) parameters +#define GET_MultiTexCoord1sARB(disp) ((disp)->MultiTexCoord1sARB) +#define SET_MultiTexCoord1sARB(disp, fn) ((disp)->MultiTexCoord1sARB = fn) +#define CALL_MultiTexCoord1svARB(disp, parameters) (*((disp)->MultiTexCoord1svARB)) parameters +#define GET_MultiTexCoord1svARB(disp) ((disp)->MultiTexCoord1svARB) +#define SET_MultiTexCoord1svARB(disp, fn) ((disp)->MultiTexCoord1svARB = fn) +#define CALL_MultiTexCoord2dARB(disp, parameters) (*((disp)->MultiTexCoord2dARB)) parameters +#define GET_MultiTexCoord2dARB(disp) ((disp)->MultiTexCoord2dARB) +#define SET_MultiTexCoord2dARB(disp, fn) ((disp)->MultiTexCoord2dARB = fn) +#define CALL_MultiTexCoord2dvARB(disp, parameters) (*((disp)->MultiTexCoord2dvARB)) parameters +#define GET_MultiTexCoord2dvARB(disp) ((disp)->MultiTexCoord2dvARB) +#define SET_MultiTexCoord2dvARB(disp, fn) ((disp)->MultiTexCoord2dvARB = fn) +#define CALL_MultiTexCoord2fARB(disp, parameters) (*((disp)->MultiTexCoord2fARB)) parameters +#define GET_MultiTexCoord2fARB(disp) ((disp)->MultiTexCoord2fARB) +#define SET_MultiTexCoord2fARB(disp, fn) ((disp)->MultiTexCoord2fARB = fn) +#define CALL_MultiTexCoord2fvARB(disp, parameters) (*((disp)->MultiTexCoord2fvARB)) parameters +#define GET_MultiTexCoord2fvARB(disp) ((disp)->MultiTexCoord2fvARB) +#define SET_MultiTexCoord2fvARB(disp, fn) ((disp)->MultiTexCoord2fvARB = fn) +#define CALL_MultiTexCoord2iARB(disp, parameters) (*((disp)->MultiTexCoord2iARB)) parameters +#define GET_MultiTexCoord2iARB(disp) ((disp)->MultiTexCoord2iARB) +#define SET_MultiTexCoord2iARB(disp, fn) ((disp)->MultiTexCoord2iARB = fn) +#define CALL_MultiTexCoord2ivARB(disp, parameters) (*((disp)->MultiTexCoord2ivARB)) parameters +#define GET_MultiTexCoord2ivARB(disp) ((disp)->MultiTexCoord2ivARB) +#define SET_MultiTexCoord2ivARB(disp, fn) ((disp)->MultiTexCoord2ivARB = fn) +#define CALL_MultiTexCoord2sARB(disp, parameters) (*((disp)->MultiTexCoord2sARB)) parameters +#define GET_MultiTexCoord2sARB(disp) ((disp)->MultiTexCoord2sARB) +#define SET_MultiTexCoord2sARB(disp, fn) ((disp)->MultiTexCoord2sARB = fn) +#define CALL_MultiTexCoord2svARB(disp, parameters) (*((disp)->MultiTexCoord2svARB)) parameters +#define GET_MultiTexCoord2svARB(disp) ((disp)->MultiTexCoord2svARB) +#define SET_MultiTexCoord2svARB(disp, fn) ((disp)->MultiTexCoord2svARB = fn) +#define CALL_MultiTexCoord3dARB(disp, parameters) (*((disp)->MultiTexCoord3dARB)) parameters +#define GET_MultiTexCoord3dARB(disp) ((disp)->MultiTexCoord3dARB) +#define SET_MultiTexCoord3dARB(disp, fn) ((disp)->MultiTexCoord3dARB = fn) +#define CALL_MultiTexCoord3dvARB(disp, parameters) (*((disp)->MultiTexCoord3dvARB)) parameters +#define GET_MultiTexCoord3dvARB(disp) ((disp)->MultiTexCoord3dvARB) +#define SET_MultiTexCoord3dvARB(disp, fn) ((disp)->MultiTexCoord3dvARB = fn) +#define CALL_MultiTexCoord3fARB(disp, parameters) (*((disp)->MultiTexCoord3fARB)) parameters +#define GET_MultiTexCoord3fARB(disp) ((disp)->MultiTexCoord3fARB) +#define SET_MultiTexCoord3fARB(disp, fn) ((disp)->MultiTexCoord3fARB = fn) +#define CALL_MultiTexCoord3fvARB(disp, parameters) (*((disp)->MultiTexCoord3fvARB)) parameters +#define GET_MultiTexCoord3fvARB(disp) ((disp)->MultiTexCoord3fvARB) +#define SET_MultiTexCoord3fvARB(disp, fn) ((disp)->MultiTexCoord3fvARB = fn) +#define CALL_MultiTexCoord3iARB(disp, parameters) (*((disp)->MultiTexCoord3iARB)) parameters +#define GET_MultiTexCoord3iARB(disp) ((disp)->MultiTexCoord3iARB) +#define SET_MultiTexCoord3iARB(disp, fn) ((disp)->MultiTexCoord3iARB = fn) +#define CALL_MultiTexCoord3ivARB(disp, parameters) (*((disp)->MultiTexCoord3ivARB)) parameters +#define GET_MultiTexCoord3ivARB(disp) ((disp)->MultiTexCoord3ivARB) +#define SET_MultiTexCoord3ivARB(disp, fn) ((disp)->MultiTexCoord3ivARB = fn) +#define CALL_MultiTexCoord3sARB(disp, parameters) (*((disp)->MultiTexCoord3sARB)) parameters +#define GET_MultiTexCoord3sARB(disp) ((disp)->MultiTexCoord3sARB) +#define SET_MultiTexCoord3sARB(disp, fn) ((disp)->MultiTexCoord3sARB = fn) +#define CALL_MultiTexCoord3svARB(disp, parameters) (*((disp)->MultiTexCoord3svARB)) parameters +#define GET_MultiTexCoord3svARB(disp) ((disp)->MultiTexCoord3svARB) +#define SET_MultiTexCoord3svARB(disp, fn) ((disp)->MultiTexCoord3svARB = fn) +#define CALL_MultiTexCoord4dARB(disp, parameters) (*((disp)->MultiTexCoord4dARB)) parameters +#define GET_MultiTexCoord4dARB(disp) ((disp)->MultiTexCoord4dARB) +#define SET_MultiTexCoord4dARB(disp, fn) ((disp)->MultiTexCoord4dARB = fn) +#define CALL_MultiTexCoord4dvARB(disp, parameters) (*((disp)->MultiTexCoord4dvARB)) parameters +#define GET_MultiTexCoord4dvARB(disp) ((disp)->MultiTexCoord4dvARB) +#define SET_MultiTexCoord4dvARB(disp, fn) ((disp)->MultiTexCoord4dvARB = fn) +#define CALL_MultiTexCoord4fARB(disp, parameters) (*((disp)->MultiTexCoord4fARB)) parameters +#define GET_MultiTexCoord4fARB(disp) ((disp)->MultiTexCoord4fARB) +#define SET_MultiTexCoord4fARB(disp, fn) ((disp)->MultiTexCoord4fARB = fn) +#define CALL_MultiTexCoord4fvARB(disp, parameters) (*((disp)->MultiTexCoord4fvARB)) parameters +#define GET_MultiTexCoord4fvARB(disp) ((disp)->MultiTexCoord4fvARB) +#define SET_MultiTexCoord4fvARB(disp, fn) ((disp)->MultiTexCoord4fvARB = fn) +#define CALL_MultiTexCoord4iARB(disp, parameters) (*((disp)->MultiTexCoord4iARB)) parameters +#define GET_MultiTexCoord4iARB(disp) ((disp)->MultiTexCoord4iARB) +#define SET_MultiTexCoord4iARB(disp, fn) ((disp)->MultiTexCoord4iARB = fn) +#define CALL_MultiTexCoord4ivARB(disp, parameters) (*((disp)->MultiTexCoord4ivARB)) parameters +#define GET_MultiTexCoord4ivARB(disp) ((disp)->MultiTexCoord4ivARB) +#define SET_MultiTexCoord4ivARB(disp, fn) ((disp)->MultiTexCoord4ivARB = fn) +#define CALL_MultiTexCoord4sARB(disp, parameters) (*((disp)->MultiTexCoord4sARB)) parameters +#define GET_MultiTexCoord4sARB(disp) ((disp)->MultiTexCoord4sARB) +#define SET_MultiTexCoord4sARB(disp, fn) ((disp)->MultiTexCoord4sARB = fn) +#define CALL_MultiTexCoord4svARB(disp, parameters) (*((disp)->MultiTexCoord4svARB)) parameters +#define GET_MultiTexCoord4svARB(disp) ((disp)->MultiTexCoord4svARB) +#define SET_MultiTexCoord4svARB(disp, fn) ((disp)->MultiTexCoord4svARB = fn) + +#if !defined(IN_DRI_DRIVER) + +#define CALL_AttachShader(disp, parameters) (*((disp)->AttachShader)) parameters +#define GET_AttachShader(disp) ((disp)->AttachShader) +#define SET_AttachShader(disp, fn) ((disp)->AttachShader = fn) +#define CALL_CreateProgram(disp, parameters) (*((disp)->CreateProgram)) parameters +#define GET_CreateProgram(disp) ((disp)->CreateProgram) +#define SET_CreateProgram(disp, fn) ((disp)->CreateProgram = fn) +#define CALL_CreateShader(disp, parameters) (*((disp)->CreateShader)) parameters +#define GET_CreateShader(disp) ((disp)->CreateShader) +#define SET_CreateShader(disp, fn) ((disp)->CreateShader = fn) +#define CALL_DeleteProgram(disp, parameters) (*((disp)->DeleteProgram)) parameters +#define GET_DeleteProgram(disp) ((disp)->DeleteProgram) +#define SET_DeleteProgram(disp, fn) ((disp)->DeleteProgram = fn) +#define CALL_DeleteShader(disp, parameters) (*((disp)->DeleteShader)) parameters +#define GET_DeleteShader(disp) ((disp)->DeleteShader) +#define SET_DeleteShader(disp, fn) ((disp)->DeleteShader = fn) +#define CALL_DetachShader(disp, parameters) (*((disp)->DetachShader)) parameters +#define GET_DetachShader(disp) ((disp)->DetachShader) +#define SET_DetachShader(disp, fn) ((disp)->DetachShader = fn) +#define CALL_GetAttachedShaders(disp, parameters) (*((disp)->GetAttachedShaders)) parameters +#define GET_GetAttachedShaders(disp) ((disp)->GetAttachedShaders) +#define SET_GetAttachedShaders(disp, fn) ((disp)->GetAttachedShaders = fn) +#define CALL_GetProgramInfoLog(disp, parameters) (*((disp)->GetProgramInfoLog)) parameters +#define GET_GetProgramInfoLog(disp) ((disp)->GetProgramInfoLog) +#define SET_GetProgramInfoLog(disp, fn) ((disp)->GetProgramInfoLog = fn) +#define CALL_GetProgramiv(disp, parameters) (*((disp)->GetProgramiv)) parameters +#define GET_GetProgramiv(disp) ((disp)->GetProgramiv) +#define SET_GetProgramiv(disp, fn) ((disp)->GetProgramiv = fn) +#define CALL_GetShaderInfoLog(disp, parameters) (*((disp)->GetShaderInfoLog)) parameters +#define GET_GetShaderInfoLog(disp) ((disp)->GetShaderInfoLog) +#define SET_GetShaderInfoLog(disp, fn) ((disp)->GetShaderInfoLog = fn) +#define CALL_GetShaderiv(disp, parameters) (*((disp)->GetShaderiv)) parameters +#define GET_GetShaderiv(disp) ((disp)->GetShaderiv) +#define SET_GetShaderiv(disp, fn) ((disp)->GetShaderiv = fn) +#define CALL_IsProgram(disp, parameters) (*((disp)->IsProgram)) parameters +#define GET_IsProgram(disp) ((disp)->IsProgram) +#define SET_IsProgram(disp, fn) ((disp)->IsProgram = fn) +#define CALL_IsShader(disp, parameters) (*((disp)->IsShader)) parameters +#define GET_IsShader(disp) ((disp)->IsShader) +#define SET_IsShader(disp, fn) ((disp)->IsShader = fn) +#define CALL_StencilFuncSeparate(disp, parameters) (*((disp)->StencilFuncSeparate)) parameters +#define GET_StencilFuncSeparate(disp) ((disp)->StencilFuncSeparate) +#define SET_StencilFuncSeparate(disp, fn) ((disp)->StencilFuncSeparate = fn) +#define CALL_StencilMaskSeparate(disp, parameters) (*((disp)->StencilMaskSeparate)) parameters +#define GET_StencilMaskSeparate(disp) ((disp)->StencilMaskSeparate) +#define SET_StencilMaskSeparate(disp, fn) ((disp)->StencilMaskSeparate = fn) +#define CALL_StencilOpSeparate(disp, parameters) (*((disp)->StencilOpSeparate)) parameters +#define GET_StencilOpSeparate(disp) ((disp)->StencilOpSeparate) +#define SET_StencilOpSeparate(disp, fn) ((disp)->StencilOpSeparate = fn) +#define CALL_UniformMatrix2x3fv(disp, parameters) (*((disp)->UniformMatrix2x3fv)) parameters +#define GET_UniformMatrix2x3fv(disp) ((disp)->UniformMatrix2x3fv) +#define SET_UniformMatrix2x3fv(disp, fn) ((disp)->UniformMatrix2x3fv = fn) +#define CALL_UniformMatrix2x4fv(disp, parameters) (*((disp)->UniformMatrix2x4fv)) parameters +#define GET_UniformMatrix2x4fv(disp) ((disp)->UniformMatrix2x4fv) +#define SET_UniformMatrix2x4fv(disp, fn) ((disp)->UniformMatrix2x4fv = fn) +#define CALL_UniformMatrix3x2fv(disp, parameters) (*((disp)->UniformMatrix3x2fv)) parameters +#define GET_UniformMatrix3x2fv(disp) ((disp)->UniformMatrix3x2fv) +#define SET_UniformMatrix3x2fv(disp, fn) ((disp)->UniformMatrix3x2fv = fn) +#define CALL_UniformMatrix3x4fv(disp, parameters) (*((disp)->UniformMatrix3x4fv)) parameters +#define GET_UniformMatrix3x4fv(disp) ((disp)->UniformMatrix3x4fv) +#define SET_UniformMatrix3x4fv(disp, fn) ((disp)->UniformMatrix3x4fv = fn) +#define CALL_UniformMatrix4x2fv(disp, parameters) (*((disp)->UniformMatrix4x2fv)) parameters +#define GET_UniformMatrix4x2fv(disp) ((disp)->UniformMatrix4x2fv) +#define SET_UniformMatrix4x2fv(disp, fn) ((disp)->UniformMatrix4x2fv = fn) +#define CALL_UniformMatrix4x3fv(disp, parameters) (*((disp)->UniformMatrix4x3fv)) parameters +#define GET_UniformMatrix4x3fv(disp) ((disp)->UniformMatrix4x3fv) +#define SET_UniformMatrix4x3fv(disp, fn) ((disp)->UniformMatrix4x3fv = fn) +#define CALL_LoadTransposeMatrixdARB(disp, parameters) (*((disp)->LoadTransposeMatrixdARB)) parameters +#define GET_LoadTransposeMatrixdARB(disp) ((disp)->LoadTransposeMatrixdARB) +#define SET_LoadTransposeMatrixdARB(disp, fn) ((disp)->LoadTransposeMatrixdARB = fn) +#define CALL_LoadTransposeMatrixfARB(disp, parameters) (*((disp)->LoadTransposeMatrixfARB)) parameters +#define GET_LoadTransposeMatrixfARB(disp) ((disp)->LoadTransposeMatrixfARB) +#define SET_LoadTransposeMatrixfARB(disp, fn) ((disp)->LoadTransposeMatrixfARB = fn) +#define CALL_MultTransposeMatrixdARB(disp, parameters) (*((disp)->MultTransposeMatrixdARB)) parameters +#define GET_MultTransposeMatrixdARB(disp) ((disp)->MultTransposeMatrixdARB) +#define SET_MultTransposeMatrixdARB(disp, fn) ((disp)->MultTransposeMatrixdARB = fn) +#define CALL_MultTransposeMatrixfARB(disp, parameters) (*((disp)->MultTransposeMatrixfARB)) parameters +#define GET_MultTransposeMatrixfARB(disp) ((disp)->MultTransposeMatrixfARB) +#define SET_MultTransposeMatrixfARB(disp, fn) ((disp)->MultTransposeMatrixfARB = fn) +#define CALL_SampleCoverageARB(disp, parameters) (*((disp)->SampleCoverageARB)) parameters +#define GET_SampleCoverageARB(disp) ((disp)->SampleCoverageARB) +#define SET_SampleCoverageARB(disp, fn) ((disp)->SampleCoverageARB = fn) +#define CALL_CompressedTexImage1DARB(disp, parameters) (*((disp)->CompressedTexImage1DARB)) parameters +#define GET_CompressedTexImage1DARB(disp) ((disp)->CompressedTexImage1DARB) +#define SET_CompressedTexImage1DARB(disp, fn) ((disp)->CompressedTexImage1DARB = fn) +#define CALL_CompressedTexImage2DARB(disp, parameters) (*((disp)->CompressedTexImage2DARB)) parameters +#define GET_CompressedTexImage2DARB(disp) ((disp)->CompressedTexImage2DARB) +#define SET_CompressedTexImage2DARB(disp, fn) ((disp)->CompressedTexImage2DARB = fn) +#define CALL_CompressedTexImage3DARB(disp, parameters) (*((disp)->CompressedTexImage3DARB)) parameters +#define GET_CompressedTexImage3DARB(disp) ((disp)->CompressedTexImage3DARB) +#define SET_CompressedTexImage3DARB(disp, fn) ((disp)->CompressedTexImage3DARB = fn) +#define CALL_CompressedTexSubImage1DARB(disp, parameters) (*((disp)->CompressedTexSubImage1DARB)) parameters +#define GET_CompressedTexSubImage1DARB(disp) ((disp)->CompressedTexSubImage1DARB) +#define SET_CompressedTexSubImage1DARB(disp, fn) ((disp)->CompressedTexSubImage1DARB = fn) +#define CALL_CompressedTexSubImage2DARB(disp, parameters) (*((disp)->CompressedTexSubImage2DARB)) parameters +#define GET_CompressedTexSubImage2DARB(disp) ((disp)->CompressedTexSubImage2DARB) +#define SET_CompressedTexSubImage2DARB(disp, fn) ((disp)->CompressedTexSubImage2DARB = fn) +#define CALL_CompressedTexSubImage3DARB(disp, parameters) (*((disp)->CompressedTexSubImage3DARB)) parameters +#define GET_CompressedTexSubImage3DARB(disp) ((disp)->CompressedTexSubImage3DARB) +#define SET_CompressedTexSubImage3DARB(disp, fn) ((disp)->CompressedTexSubImage3DARB = fn) +#define CALL_GetCompressedTexImageARB(disp, parameters) (*((disp)->GetCompressedTexImageARB)) parameters +#define GET_GetCompressedTexImageARB(disp) ((disp)->GetCompressedTexImageARB) +#define SET_GetCompressedTexImageARB(disp, fn) ((disp)->GetCompressedTexImageARB = fn) +#define CALL_DisableVertexAttribArrayARB(disp, parameters) (*((disp)->DisableVertexAttribArrayARB)) parameters +#define GET_DisableVertexAttribArrayARB(disp) ((disp)->DisableVertexAttribArrayARB) +#define SET_DisableVertexAttribArrayARB(disp, fn) ((disp)->DisableVertexAttribArrayARB = fn) +#define CALL_EnableVertexAttribArrayARB(disp, parameters) (*((disp)->EnableVertexAttribArrayARB)) parameters +#define GET_EnableVertexAttribArrayARB(disp) ((disp)->EnableVertexAttribArrayARB) +#define SET_EnableVertexAttribArrayARB(disp, fn) ((disp)->EnableVertexAttribArrayARB = fn) +#define CALL_GetProgramEnvParameterdvARB(disp, parameters) (*((disp)->GetProgramEnvParameterdvARB)) parameters +#define GET_GetProgramEnvParameterdvARB(disp) ((disp)->GetProgramEnvParameterdvARB) +#define SET_GetProgramEnvParameterdvARB(disp, fn) ((disp)->GetProgramEnvParameterdvARB = fn) +#define CALL_GetProgramEnvParameterfvARB(disp, parameters) (*((disp)->GetProgramEnvParameterfvARB)) parameters +#define GET_GetProgramEnvParameterfvARB(disp) ((disp)->GetProgramEnvParameterfvARB) +#define SET_GetProgramEnvParameterfvARB(disp, fn) ((disp)->GetProgramEnvParameterfvARB = fn) +#define CALL_GetProgramLocalParameterdvARB(disp, parameters) (*((disp)->GetProgramLocalParameterdvARB)) parameters +#define GET_GetProgramLocalParameterdvARB(disp) ((disp)->GetProgramLocalParameterdvARB) +#define SET_GetProgramLocalParameterdvARB(disp, fn) ((disp)->GetProgramLocalParameterdvARB = fn) +#define CALL_GetProgramLocalParameterfvARB(disp, parameters) (*((disp)->GetProgramLocalParameterfvARB)) parameters +#define GET_GetProgramLocalParameterfvARB(disp) ((disp)->GetProgramLocalParameterfvARB) +#define SET_GetProgramLocalParameterfvARB(disp, fn) ((disp)->GetProgramLocalParameterfvARB = fn) +#define CALL_GetProgramStringARB(disp, parameters) (*((disp)->GetProgramStringARB)) parameters +#define GET_GetProgramStringARB(disp) ((disp)->GetProgramStringARB) +#define SET_GetProgramStringARB(disp, fn) ((disp)->GetProgramStringARB = fn) +#define CALL_GetProgramivARB(disp, parameters) (*((disp)->GetProgramivARB)) parameters +#define GET_GetProgramivARB(disp) ((disp)->GetProgramivARB) +#define SET_GetProgramivARB(disp, fn) ((disp)->GetProgramivARB = fn) +#define CALL_GetVertexAttribdvARB(disp, parameters) (*((disp)->GetVertexAttribdvARB)) parameters +#define GET_GetVertexAttribdvARB(disp) ((disp)->GetVertexAttribdvARB) +#define SET_GetVertexAttribdvARB(disp, fn) ((disp)->GetVertexAttribdvARB = fn) +#define CALL_GetVertexAttribfvARB(disp, parameters) (*((disp)->GetVertexAttribfvARB)) parameters +#define GET_GetVertexAttribfvARB(disp) ((disp)->GetVertexAttribfvARB) +#define SET_GetVertexAttribfvARB(disp, fn) ((disp)->GetVertexAttribfvARB = fn) +#define CALL_GetVertexAttribivARB(disp, parameters) (*((disp)->GetVertexAttribivARB)) parameters +#define GET_GetVertexAttribivARB(disp) ((disp)->GetVertexAttribivARB) +#define SET_GetVertexAttribivARB(disp, fn) ((disp)->GetVertexAttribivARB = fn) +#define CALL_ProgramEnvParameter4dARB(disp, parameters) (*((disp)->ProgramEnvParameter4dARB)) parameters +#define GET_ProgramEnvParameter4dARB(disp) ((disp)->ProgramEnvParameter4dARB) +#define SET_ProgramEnvParameter4dARB(disp, fn) ((disp)->ProgramEnvParameter4dARB = fn) +#define CALL_ProgramEnvParameter4dvARB(disp, parameters) (*((disp)->ProgramEnvParameter4dvARB)) parameters +#define GET_ProgramEnvParameter4dvARB(disp) ((disp)->ProgramEnvParameter4dvARB) +#define SET_ProgramEnvParameter4dvARB(disp, fn) ((disp)->ProgramEnvParameter4dvARB = fn) +#define CALL_ProgramEnvParameter4fARB(disp, parameters) (*((disp)->ProgramEnvParameter4fARB)) parameters +#define GET_ProgramEnvParameter4fARB(disp) ((disp)->ProgramEnvParameter4fARB) +#define SET_ProgramEnvParameter4fARB(disp, fn) ((disp)->ProgramEnvParameter4fARB = fn) +#define CALL_ProgramEnvParameter4fvARB(disp, parameters) (*((disp)->ProgramEnvParameter4fvARB)) parameters +#define GET_ProgramEnvParameter4fvARB(disp) ((disp)->ProgramEnvParameter4fvARB) +#define SET_ProgramEnvParameter4fvARB(disp, fn) ((disp)->ProgramEnvParameter4fvARB = fn) +#define CALL_ProgramLocalParameter4dARB(disp, parameters) (*((disp)->ProgramLocalParameter4dARB)) parameters +#define GET_ProgramLocalParameter4dARB(disp) ((disp)->ProgramLocalParameter4dARB) +#define SET_ProgramLocalParameter4dARB(disp, fn) ((disp)->ProgramLocalParameter4dARB = fn) +#define CALL_ProgramLocalParameter4dvARB(disp, parameters) (*((disp)->ProgramLocalParameter4dvARB)) parameters +#define GET_ProgramLocalParameter4dvARB(disp) ((disp)->ProgramLocalParameter4dvARB) +#define SET_ProgramLocalParameter4dvARB(disp, fn) ((disp)->ProgramLocalParameter4dvARB = fn) +#define CALL_ProgramLocalParameter4fARB(disp, parameters) (*((disp)->ProgramLocalParameter4fARB)) parameters +#define GET_ProgramLocalParameter4fARB(disp) ((disp)->ProgramLocalParameter4fARB) +#define SET_ProgramLocalParameter4fARB(disp, fn) ((disp)->ProgramLocalParameter4fARB = fn) +#define CALL_ProgramLocalParameter4fvARB(disp, parameters) (*((disp)->ProgramLocalParameter4fvARB)) parameters +#define GET_ProgramLocalParameter4fvARB(disp) ((disp)->ProgramLocalParameter4fvARB) +#define SET_ProgramLocalParameter4fvARB(disp, fn) ((disp)->ProgramLocalParameter4fvARB = fn) +#define CALL_ProgramStringARB(disp, parameters) (*((disp)->ProgramStringARB)) parameters +#define GET_ProgramStringARB(disp) ((disp)->ProgramStringARB) +#define SET_ProgramStringARB(disp, fn) ((disp)->ProgramStringARB = fn) +#define CALL_VertexAttrib1dARB(disp, parameters) (*((disp)->VertexAttrib1dARB)) parameters +#define GET_VertexAttrib1dARB(disp) ((disp)->VertexAttrib1dARB) +#define SET_VertexAttrib1dARB(disp, fn) ((disp)->VertexAttrib1dARB = fn) +#define CALL_VertexAttrib1dvARB(disp, parameters) (*((disp)->VertexAttrib1dvARB)) parameters +#define GET_VertexAttrib1dvARB(disp) ((disp)->VertexAttrib1dvARB) +#define SET_VertexAttrib1dvARB(disp, fn) ((disp)->VertexAttrib1dvARB = fn) +#define CALL_VertexAttrib1fARB(disp, parameters) (*((disp)->VertexAttrib1fARB)) parameters +#define GET_VertexAttrib1fARB(disp) ((disp)->VertexAttrib1fARB) +#define SET_VertexAttrib1fARB(disp, fn) ((disp)->VertexAttrib1fARB = fn) +#define CALL_VertexAttrib1fvARB(disp, parameters) (*((disp)->VertexAttrib1fvARB)) parameters +#define GET_VertexAttrib1fvARB(disp) ((disp)->VertexAttrib1fvARB) +#define SET_VertexAttrib1fvARB(disp, fn) ((disp)->VertexAttrib1fvARB = fn) +#define CALL_VertexAttrib1sARB(disp, parameters) (*((disp)->VertexAttrib1sARB)) parameters +#define GET_VertexAttrib1sARB(disp) ((disp)->VertexAttrib1sARB) +#define SET_VertexAttrib1sARB(disp, fn) ((disp)->VertexAttrib1sARB = fn) +#define CALL_VertexAttrib1svARB(disp, parameters) (*((disp)->VertexAttrib1svARB)) parameters +#define GET_VertexAttrib1svARB(disp) ((disp)->VertexAttrib1svARB) +#define SET_VertexAttrib1svARB(disp, fn) ((disp)->VertexAttrib1svARB = fn) +#define CALL_VertexAttrib2dARB(disp, parameters) (*((disp)->VertexAttrib2dARB)) parameters +#define GET_VertexAttrib2dARB(disp) ((disp)->VertexAttrib2dARB) +#define SET_VertexAttrib2dARB(disp, fn) ((disp)->VertexAttrib2dARB = fn) +#define CALL_VertexAttrib2dvARB(disp, parameters) (*((disp)->VertexAttrib2dvARB)) parameters +#define GET_VertexAttrib2dvARB(disp) ((disp)->VertexAttrib2dvARB) +#define SET_VertexAttrib2dvARB(disp, fn) ((disp)->VertexAttrib2dvARB = fn) +#define CALL_VertexAttrib2fARB(disp, parameters) (*((disp)->VertexAttrib2fARB)) parameters +#define GET_VertexAttrib2fARB(disp) ((disp)->VertexAttrib2fARB) +#define SET_VertexAttrib2fARB(disp, fn) ((disp)->VertexAttrib2fARB = fn) +#define CALL_VertexAttrib2fvARB(disp, parameters) (*((disp)->VertexAttrib2fvARB)) parameters +#define GET_VertexAttrib2fvARB(disp) ((disp)->VertexAttrib2fvARB) +#define SET_VertexAttrib2fvARB(disp, fn) ((disp)->VertexAttrib2fvARB = fn) +#define CALL_VertexAttrib2sARB(disp, parameters) (*((disp)->VertexAttrib2sARB)) parameters +#define GET_VertexAttrib2sARB(disp) ((disp)->VertexAttrib2sARB) +#define SET_VertexAttrib2sARB(disp, fn) ((disp)->VertexAttrib2sARB = fn) +#define CALL_VertexAttrib2svARB(disp, parameters) (*((disp)->VertexAttrib2svARB)) parameters +#define GET_VertexAttrib2svARB(disp) ((disp)->VertexAttrib2svARB) +#define SET_VertexAttrib2svARB(disp, fn) ((disp)->VertexAttrib2svARB = fn) +#define CALL_VertexAttrib3dARB(disp, parameters) (*((disp)->VertexAttrib3dARB)) parameters +#define GET_VertexAttrib3dARB(disp) ((disp)->VertexAttrib3dARB) +#define SET_VertexAttrib3dARB(disp, fn) ((disp)->VertexAttrib3dARB = fn) +#define CALL_VertexAttrib3dvARB(disp, parameters) (*((disp)->VertexAttrib3dvARB)) parameters +#define GET_VertexAttrib3dvARB(disp) ((disp)->VertexAttrib3dvARB) +#define SET_VertexAttrib3dvARB(disp, fn) ((disp)->VertexAttrib3dvARB = fn) +#define CALL_VertexAttrib3fARB(disp, parameters) (*((disp)->VertexAttrib3fARB)) parameters +#define GET_VertexAttrib3fARB(disp) ((disp)->VertexAttrib3fARB) +#define SET_VertexAttrib3fARB(disp, fn) ((disp)->VertexAttrib3fARB = fn) +#define CALL_VertexAttrib3fvARB(disp, parameters) (*((disp)->VertexAttrib3fvARB)) parameters +#define GET_VertexAttrib3fvARB(disp) ((disp)->VertexAttrib3fvARB) +#define SET_VertexAttrib3fvARB(disp, fn) ((disp)->VertexAttrib3fvARB = fn) +#define CALL_VertexAttrib3sARB(disp, parameters) (*((disp)->VertexAttrib3sARB)) parameters +#define GET_VertexAttrib3sARB(disp) ((disp)->VertexAttrib3sARB) +#define SET_VertexAttrib3sARB(disp, fn) ((disp)->VertexAttrib3sARB = fn) +#define CALL_VertexAttrib3svARB(disp, parameters) (*((disp)->VertexAttrib3svARB)) parameters +#define GET_VertexAttrib3svARB(disp) ((disp)->VertexAttrib3svARB) +#define SET_VertexAttrib3svARB(disp, fn) ((disp)->VertexAttrib3svARB = fn) +#define CALL_VertexAttrib4NbvARB(disp, parameters) (*((disp)->VertexAttrib4NbvARB)) parameters +#define GET_VertexAttrib4NbvARB(disp) ((disp)->VertexAttrib4NbvARB) +#define SET_VertexAttrib4NbvARB(disp, fn) ((disp)->VertexAttrib4NbvARB = fn) +#define CALL_VertexAttrib4NivARB(disp, parameters) (*((disp)->VertexAttrib4NivARB)) parameters +#define GET_VertexAttrib4NivARB(disp) ((disp)->VertexAttrib4NivARB) +#define SET_VertexAttrib4NivARB(disp, fn) ((disp)->VertexAttrib4NivARB = fn) +#define CALL_VertexAttrib4NsvARB(disp, parameters) (*((disp)->VertexAttrib4NsvARB)) parameters +#define GET_VertexAttrib4NsvARB(disp) ((disp)->VertexAttrib4NsvARB) +#define SET_VertexAttrib4NsvARB(disp, fn) ((disp)->VertexAttrib4NsvARB = fn) +#define CALL_VertexAttrib4NubARB(disp, parameters) (*((disp)->VertexAttrib4NubARB)) parameters +#define GET_VertexAttrib4NubARB(disp) ((disp)->VertexAttrib4NubARB) +#define SET_VertexAttrib4NubARB(disp, fn) ((disp)->VertexAttrib4NubARB = fn) +#define CALL_VertexAttrib4NubvARB(disp, parameters) (*((disp)->VertexAttrib4NubvARB)) parameters +#define GET_VertexAttrib4NubvARB(disp) ((disp)->VertexAttrib4NubvARB) +#define SET_VertexAttrib4NubvARB(disp, fn) ((disp)->VertexAttrib4NubvARB = fn) +#define CALL_VertexAttrib4NuivARB(disp, parameters) (*((disp)->VertexAttrib4NuivARB)) parameters +#define GET_VertexAttrib4NuivARB(disp) ((disp)->VertexAttrib4NuivARB) +#define SET_VertexAttrib4NuivARB(disp, fn) ((disp)->VertexAttrib4NuivARB = fn) +#define CALL_VertexAttrib4NusvARB(disp, parameters) (*((disp)->VertexAttrib4NusvARB)) parameters +#define GET_VertexAttrib4NusvARB(disp) ((disp)->VertexAttrib4NusvARB) +#define SET_VertexAttrib4NusvARB(disp, fn) ((disp)->VertexAttrib4NusvARB = fn) +#define CALL_VertexAttrib4bvARB(disp, parameters) (*((disp)->VertexAttrib4bvARB)) parameters +#define GET_VertexAttrib4bvARB(disp) ((disp)->VertexAttrib4bvARB) +#define SET_VertexAttrib4bvARB(disp, fn) ((disp)->VertexAttrib4bvARB = fn) +#define CALL_VertexAttrib4dARB(disp, parameters) (*((disp)->VertexAttrib4dARB)) parameters +#define GET_VertexAttrib4dARB(disp) ((disp)->VertexAttrib4dARB) +#define SET_VertexAttrib4dARB(disp, fn) ((disp)->VertexAttrib4dARB = fn) +#define CALL_VertexAttrib4dvARB(disp, parameters) (*((disp)->VertexAttrib4dvARB)) parameters +#define GET_VertexAttrib4dvARB(disp) ((disp)->VertexAttrib4dvARB) +#define SET_VertexAttrib4dvARB(disp, fn) ((disp)->VertexAttrib4dvARB = fn) +#define CALL_VertexAttrib4fARB(disp, parameters) (*((disp)->VertexAttrib4fARB)) parameters +#define GET_VertexAttrib4fARB(disp) ((disp)->VertexAttrib4fARB) +#define SET_VertexAttrib4fARB(disp, fn) ((disp)->VertexAttrib4fARB = fn) +#define CALL_VertexAttrib4fvARB(disp, parameters) (*((disp)->VertexAttrib4fvARB)) parameters +#define GET_VertexAttrib4fvARB(disp) ((disp)->VertexAttrib4fvARB) +#define SET_VertexAttrib4fvARB(disp, fn) ((disp)->VertexAttrib4fvARB = fn) +#define CALL_VertexAttrib4ivARB(disp, parameters) (*((disp)->VertexAttrib4ivARB)) parameters +#define GET_VertexAttrib4ivARB(disp) ((disp)->VertexAttrib4ivARB) +#define SET_VertexAttrib4ivARB(disp, fn) ((disp)->VertexAttrib4ivARB = fn) +#define CALL_VertexAttrib4sARB(disp, parameters) (*((disp)->VertexAttrib4sARB)) parameters +#define GET_VertexAttrib4sARB(disp) ((disp)->VertexAttrib4sARB) +#define SET_VertexAttrib4sARB(disp, fn) ((disp)->VertexAttrib4sARB = fn) +#define CALL_VertexAttrib4svARB(disp, parameters) (*((disp)->VertexAttrib4svARB)) parameters +#define GET_VertexAttrib4svARB(disp) ((disp)->VertexAttrib4svARB) +#define SET_VertexAttrib4svARB(disp, fn) ((disp)->VertexAttrib4svARB = fn) +#define CALL_VertexAttrib4ubvARB(disp, parameters) (*((disp)->VertexAttrib4ubvARB)) parameters +#define GET_VertexAttrib4ubvARB(disp) ((disp)->VertexAttrib4ubvARB) +#define SET_VertexAttrib4ubvARB(disp, fn) ((disp)->VertexAttrib4ubvARB = fn) +#define CALL_VertexAttrib4uivARB(disp, parameters) (*((disp)->VertexAttrib4uivARB)) parameters +#define GET_VertexAttrib4uivARB(disp) ((disp)->VertexAttrib4uivARB) +#define SET_VertexAttrib4uivARB(disp, fn) ((disp)->VertexAttrib4uivARB = fn) +#define CALL_VertexAttrib4usvARB(disp, parameters) (*((disp)->VertexAttrib4usvARB)) parameters +#define GET_VertexAttrib4usvARB(disp) ((disp)->VertexAttrib4usvARB) +#define SET_VertexAttrib4usvARB(disp, fn) ((disp)->VertexAttrib4usvARB = fn) +#define CALL_VertexAttribPointerARB(disp, parameters) (*((disp)->VertexAttribPointerARB)) parameters +#define GET_VertexAttribPointerARB(disp) ((disp)->VertexAttribPointerARB) +#define SET_VertexAttribPointerARB(disp, fn) ((disp)->VertexAttribPointerARB = fn) +#define CALL_BindBufferARB(disp, parameters) (*((disp)->BindBufferARB)) parameters +#define GET_BindBufferARB(disp) ((disp)->BindBufferARB) +#define SET_BindBufferARB(disp, fn) ((disp)->BindBufferARB = fn) +#define CALL_BufferDataARB(disp, parameters) (*((disp)->BufferDataARB)) parameters +#define GET_BufferDataARB(disp) ((disp)->BufferDataARB) +#define SET_BufferDataARB(disp, fn) ((disp)->BufferDataARB = fn) +#define CALL_BufferSubDataARB(disp, parameters) (*((disp)->BufferSubDataARB)) parameters +#define GET_BufferSubDataARB(disp) ((disp)->BufferSubDataARB) +#define SET_BufferSubDataARB(disp, fn) ((disp)->BufferSubDataARB = fn) +#define CALL_DeleteBuffersARB(disp, parameters) (*((disp)->DeleteBuffersARB)) parameters +#define GET_DeleteBuffersARB(disp) ((disp)->DeleteBuffersARB) +#define SET_DeleteBuffersARB(disp, fn) ((disp)->DeleteBuffersARB = fn) +#define CALL_GenBuffersARB(disp, parameters) (*((disp)->GenBuffersARB)) parameters +#define GET_GenBuffersARB(disp) ((disp)->GenBuffersARB) +#define SET_GenBuffersARB(disp, fn) ((disp)->GenBuffersARB = fn) +#define CALL_GetBufferParameterivARB(disp, parameters) (*((disp)->GetBufferParameterivARB)) parameters +#define GET_GetBufferParameterivARB(disp) ((disp)->GetBufferParameterivARB) +#define SET_GetBufferParameterivARB(disp, fn) ((disp)->GetBufferParameterivARB = fn) +#define CALL_GetBufferPointervARB(disp, parameters) (*((disp)->GetBufferPointervARB)) parameters +#define GET_GetBufferPointervARB(disp) ((disp)->GetBufferPointervARB) +#define SET_GetBufferPointervARB(disp, fn) ((disp)->GetBufferPointervARB = fn) +#define CALL_GetBufferSubDataARB(disp, parameters) (*((disp)->GetBufferSubDataARB)) parameters +#define GET_GetBufferSubDataARB(disp) ((disp)->GetBufferSubDataARB) +#define SET_GetBufferSubDataARB(disp, fn) ((disp)->GetBufferSubDataARB = fn) +#define CALL_IsBufferARB(disp, parameters) (*((disp)->IsBufferARB)) parameters +#define GET_IsBufferARB(disp) ((disp)->IsBufferARB) +#define SET_IsBufferARB(disp, fn) ((disp)->IsBufferARB = fn) +#define CALL_MapBufferARB(disp, parameters) (*((disp)->MapBufferARB)) parameters +#define GET_MapBufferARB(disp) ((disp)->MapBufferARB) +#define SET_MapBufferARB(disp, fn) ((disp)->MapBufferARB = fn) +#define CALL_UnmapBufferARB(disp, parameters) (*((disp)->UnmapBufferARB)) parameters +#define GET_UnmapBufferARB(disp) ((disp)->UnmapBufferARB) +#define SET_UnmapBufferARB(disp, fn) ((disp)->UnmapBufferARB = fn) +#define CALL_BeginQueryARB(disp, parameters) (*((disp)->BeginQueryARB)) parameters +#define GET_BeginQueryARB(disp) ((disp)->BeginQueryARB) +#define SET_BeginQueryARB(disp, fn) ((disp)->BeginQueryARB = fn) +#define CALL_DeleteQueriesARB(disp, parameters) (*((disp)->DeleteQueriesARB)) parameters +#define GET_DeleteQueriesARB(disp) ((disp)->DeleteQueriesARB) +#define SET_DeleteQueriesARB(disp, fn) ((disp)->DeleteQueriesARB = fn) +#define CALL_EndQueryARB(disp, parameters) (*((disp)->EndQueryARB)) parameters +#define GET_EndQueryARB(disp) ((disp)->EndQueryARB) +#define SET_EndQueryARB(disp, fn) ((disp)->EndQueryARB = fn) +#define CALL_GenQueriesARB(disp, parameters) (*((disp)->GenQueriesARB)) parameters +#define GET_GenQueriesARB(disp) ((disp)->GenQueriesARB) +#define SET_GenQueriesARB(disp, fn) ((disp)->GenQueriesARB = fn) +#define CALL_GetQueryObjectivARB(disp, parameters) (*((disp)->GetQueryObjectivARB)) parameters +#define GET_GetQueryObjectivARB(disp) ((disp)->GetQueryObjectivARB) +#define SET_GetQueryObjectivARB(disp, fn) ((disp)->GetQueryObjectivARB = fn) +#define CALL_GetQueryObjectuivARB(disp, parameters) (*((disp)->GetQueryObjectuivARB)) parameters +#define GET_GetQueryObjectuivARB(disp) ((disp)->GetQueryObjectuivARB) +#define SET_GetQueryObjectuivARB(disp, fn) ((disp)->GetQueryObjectuivARB = fn) +#define CALL_GetQueryivARB(disp, parameters) (*((disp)->GetQueryivARB)) parameters +#define GET_GetQueryivARB(disp) ((disp)->GetQueryivARB) +#define SET_GetQueryivARB(disp, fn) ((disp)->GetQueryivARB = fn) +#define CALL_IsQueryARB(disp, parameters) (*((disp)->IsQueryARB)) parameters +#define GET_IsQueryARB(disp) ((disp)->IsQueryARB) +#define SET_IsQueryARB(disp, fn) ((disp)->IsQueryARB = fn) +#define CALL_AttachObjectARB(disp, parameters) (*((disp)->AttachObjectARB)) parameters +#define GET_AttachObjectARB(disp) ((disp)->AttachObjectARB) +#define SET_AttachObjectARB(disp, fn) ((disp)->AttachObjectARB = fn) +#define CALL_CompileShaderARB(disp, parameters) (*((disp)->CompileShaderARB)) parameters +#define GET_CompileShaderARB(disp) ((disp)->CompileShaderARB) +#define SET_CompileShaderARB(disp, fn) ((disp)->CompileShaderARB = fn) +#define CALL_CreateProgramObjectARB(disp, parameters) (*((disp)->CreateProgramObjectARB)) parameters +#define GET_CreateProgramObjectARB(disp) ((disp)->CreateProgramObjectARB) +#define SET_CreateProgramObjectARB(disp, fn) ((disp)->CreateProgramObjectARB = fn) +#define CALL_CreateShaderObjectARB(disp, parameters) (*((disp)->CreateShaderObjectARB)) parameters +#define GET_CreateShaderObjectARB(disp) ((disp)->CreateShaderObjectARB) +#define SET_CreateShaderObjectARB(disp, fn) ((disp)->CreateShaderObjectARB = fn) +#define CALL_DeleteObjectARB(disp, parameters) (*((disp)->DeleteObjectARB)) parameters +#define GET_DeleteObjectARB(disp) ((disp)->DeleteObjectARB) +#define SET_DeleteObjectARB(disp, fn) ((disp)->DeleteObjectARB = fn) +#define CALL_DetachObjectARB(disp, parameters) (*((disp)->DetachObjectARB)) parameters +#define GET_DetachObjectARB(disp) ((disp)->DetachObjectARB) +#define SET_DetachObjectARB(disp, fn) ((disp)->DetachObjectARB = fn) +#define CALL_GetActiveUniformARB(disp, parameters) (*((disp)->GetActiveUniformARB)) parameters +#define GET_GetActiveUniformARB(disp) ((disp)->GetActiveUniformARB) +#define SET_GetActiveUniformARB(disp, fn) ((disp)->GetActiveUniformARB = fn) +#define CALL_GetAttachedObjectsARB(disp, parameters) (*((disp)->GetAttachedObjectsARB)) parameters +#define GET_GetAttachedObjectsARB(disp) ((disp)->GetAttachedObjectsARB) +#define SET_GetAttachedObjectsARB(disp, fn) ((disp)->GetAttachedObjectsARB = fn) +#define CALL_GetHandleARB(disp, parameters) (*((disp)->GetHandleARB)) parameters +#define GET_GetHandleARB(disp) ((disp)->GetHandleARB) +#define SET_GetHandleARB(disp, fn) ((disp)->GetHandleARB = fn) +#define CALL_GetInfoLogARB(disp, parameters) (*((disp)->GetInfoLogARB)) parameters +#define GET_GetInfoLogARB(disp) ((disp)->GetInfoLogARB) +#define SET_GetInfoLogARB(disp, fn) ((disp)->GetInfoLogARB = fn) +#define CALL_GetObjectParameterfvARB(disp, parameters) (*((disp)->GetObjectParameterfvARB)) parameters +#define GET_GetObjectParameterfvARB(disp) ((disp)->GetObjectParameterfvARB) +#define SET_GetObjectParameterfvARB(disp, fn) ((disp)->GetObjectParameterfvARB = fn) +#define CALL_GetObjectParameterivARB(disp, parameters) (*((disp)->GetObjectParameterivARB)) parameters +#define GET_GetObjectParameterivARB(disp) ((disp)->GetObjectParameterivARB) +#define SET_GetObjectParameterivARB(disp, fn) ((disp)->GetObjectParameterivARB = fn) +#define CALL_GetShaderSourceARB(disp, parameters) (*((disp)->GetShaderSourceARB)) parameters +#define GET_GetShaderSourceARB(disp) ((disp)->GetShaderSourceARB) +#define SET_GetShaderSourceARB(disp, fn) ((disp)->GetShaderSourceARB = fn) +#define CALL_GetUniformLocationARB(disp, parameters) (*((disp)->GetUniformLocationARB)) parameters +#define GET_GetUniformLocationARB(disp) ((disp)->GetUniformLocationARB) +#define SET_GetUniformLocationARB(disp, fn) ((disp)->GetUniformLocationARB = fn) +#define CALL_GetUniformfvARB(disp, parameters) (*((disp)->GetUniformfvARB)) parameters +#define GET_GetUniformfvARB(disp) ((disp)->GetUniformfvARB) +#define SET_GetUniformfvARB(disp, fn) ((disp)->GetUniformfvARB = fn) +#define CALL_GetUniformivARB(disp, parameters) (*((disp)->GetUniformivARB)) parameters +#define GET_GetUniformivARB(disp) ((disp)->GetUniformivARB) +#define SET_GetUniformivARB(disp, fn) ((disp)->GetUniformivARB = fn) +#define CALL_LinkProgramARB(disp, parameters) (*((disp)->LinkProgramARB)) parameters +#define GET_LinkProgramARB(disp) ((disp)->LinkProgramARB) +#define SET_LinkProgramARB(disp, fn) ((disp)->LinkProgramARB = fn) +#define CALL_ShaderSourceARB(disp, parameters) (*((disp)->ShaderSourceARB)) parameters +#define GET_ShaderSourceARB(disp) ((disp)->ShaderSourceARB) +#define SET_ShaderSourceARB(disp, fn) ((disp)->ShaderSourceARB = fn) +#define CALL_Uniform1fARB(disp, parameters) (*((disp)->Uniform1fARB)) parameters +#define GET_Uniform1fARB(disp) ((disp)->Uniform1fARB) +#define SET_Uniform1fARB(disp, fn) ((disp)->Uniform1fARB = fn) +#define CALL_Uniform1fvARB(disp, parameters) (*((disp)->Uniform1fvARB)) parameters +#define GET_Uniform1fvARB(disp) ((disp)->Uniform1fvARB) +#define SET_Uniform1fvARB(disp, fn) ((disp)->Uniform1fvARB = fn) +#define CALL_Uniform1iARB(disp, parameters) (*((disp)->Uniform1iARB)) parameters +#define GET_Uniform1iARB(disp) ((disp)->Uniform1iARB) +#define SET_Uniform1iARB(disp, fn) ((disp)->Uniform1iARB = fn) +#define CALL_Uniform1ivARB(disp, parameters) (*((disp)->Uniform1ivARB)) parameters +#define GET_Uniform1ivARB(disp) ((disp)->Uniform1ivARB) +#define SET_Uniform1ivARB(disp, fn) ((disp)->Uniform1ivARB = fn) +#define CALL_Uniform2fARB(disp, parameters) (*((disp)->Uniform2fARB)) parameters +#define GET_Uniform2fARB(disp) ((disp)->Uniform2fARB) +#define SET_Uniform2fARB(disp, fn) ((disp)->Uniform2fARB = fn) +#define CALL_Uniform2fvARB(disp, parameters) (*((disp)->Uniform2fvARB)) parameters +#define GET_Uniform2fvARB(disp) ((disp)->Uniform2fvARB) +#define SET_Uniform2fvARB(disp, fn) ((disp)->Uniform2fvARB = fn) +#define CALL_Uniform2iARB(disp, parameters) (*((disp)->Uniform2iARB)) parameters +#define GET_Uniform2iARB(disp) ((disp)->Uniform2iARB) +#define SET_Uniform2iARB(disp, fn) ((disp)->Uniform2iARB = fn) +#define CALL_Uniform2ivARB(disp, parameters) (*((disp)->Uniform2ivARB)) parameters +#define GET_Uniform2ivARB(disp) ((disp)->Uniform2ivARB) +#define SET_Uniform2ivARB(disp, fn) ((disp)->Uniform2ivARB = fn) +#define CALL_Uniform3fARB(disp, parameters) (*((disp)->Uniform3fARB)) parameters +#define GET_Uniform3fARB(disp) ((disp)->Uniform3fARB) +#define SET_Uniform3fARB(disp, fn) ((disp)->Uniform3fARB = fn) +#define CALL_Uniform3fvARB(disp, parameters) (*((disp)->Uniform3fvARB)) parameters +#define GET_Uniform3fvARB(disp) ((disp)->Uniform3fvARB) +#define SET_Uniform3fvARB(disp, fn) ((disp)->Uniform3fvARB = fn) +#define CALL_Uniform3iARB(disp, parameters) (*((disp)->Uniform3iARB)) parameters +#define GET_Uniform3iARB(disp) ((disp)->Uniform3iARB) +#define SET_Uniform3iARB(disp, fn) ((disp)->Uniform3iARB = fn) +#define CALL_Uniform3ivARB(disp, parameters) (*((disp)->Uniform3ivARB)) parameters +#define GET_Uniform3ivARB(disp) ((disp)->Uniform3ivARB) +#define SET_Uniform3ivARB(disp, fn) ((disp)->Uniform3ivARB = fn) +#define CALL_Uniform4fARB(disp, parameters) (*((disp)->Uniform4fARB)) parameters +#define GET_Uniform4fARB(disp) ((disp)->Uniform4fARB) +#define SET_Uniform4fARB(disp, fn) ((disp)->Uniform4fARB = fn) +#define CALL_Uniform4fvARB(disp, parameters) (*((disp)->Uniform4fvARB)) parameters +#define GET_Uniform4fvARB(disp) ((disp)->Uniform4fvARB) +#define SET_Uniform4fvARB(disp, fn) ((disp)->Uniform4fvARB = fn) +#define CALL_Uniform4iARB(disp, parameters) (*((disp)->Uniform4iARB)) parameters +#define GET_Uniform4iARB(disp) ((disp)->Uniform4iARB) +#define SET_Uniform4iARB(disp, fn) ((disp)->Uniform4iARB = fn) +#define CALL_Uniform4ivARB(disp, parameters) (*((disp)->Uniform4ivARB)) parameters +#define GET_Uniform4ivARB(disp) ((disp)->Uniform4ivARB) +#define SET_Uniform4ivARB(disp, fn) ((disp)->Uniform4ivARB = fn) +#define CALL_UniformMatrix2fvARB(disp, parameters) (*((disp)->UniformMatrix2fvARB)) parameters +#define GET_UniformMatrix2fvARB(disp) ((disp)->UniformMatrix2fvARB) +#define SET_UniformMatrix2fvARB(disp, fn) ((disp)->UniformMatrix2fvARB = fn) +#define CALL_UniformMatrix3fvARB(disp, parameters) (*((disp)->UniformMatrix3fvARB)) parameters +#define GET_UniformMatrix3fvARB(disp) ((disp)->UniformMatrix3fvARB) +#define SET_UniformMatrix3fvARB(disp, fn) ((disp)->UniformMatrix3fvARB = fn) +#define CALL_UniformMatrix4fvARB(disp, parameters) (*((disp)->UniformMatrix4fvARB)) parameters +#define GET_UniformMatrix4fvARB(disp) ((disp)->UniformMatrix4fvARB) +#define SET_UniformMatrix4fvARB(disp, fn) ((disp)->UniformMatrix4fvARB = fn) +#define CALL_UseProgramObjectARB(disp, parameters) (*((disp)->UseProgramObjectARB)) parameters +#define GET_UseProgramObjectARB(disp) ((disp)->UseProgramObjectARB) +#define SET_UseProgramObjectARB(disp, fn) ((disp)->UseProgramObjectARB = fn) +#define CALL_ValidateProgramARB(disp, parameters) (*((disp)->ValidateProgramARB)) parameters +#define GET_ValidateProgramARB(disp) ((disp)->ValidateProgramARB) +#define SET_ValidateProgramARB(disp, fn) ((disp)->ValidateProgramARB = fn) +#define CALL_BindAttribLocationARB(disp, parameters) (*((disp)->BindAttribLocationARB)) parameters +#define GET_BindAttribLocationARB(disp) ((disp)->BindAttribLocationARB) +#define SET_BindAttribLocationARB(disp, fn) ((disp)->BindAttribLocationARB = fn) +#define CALL_GetActiveAttribARB(disp, parameters) (*((disp)->GetActiveAttribARB)) parameters +#define GET_GetActiveAttribARB(disp) ((disp)->GetActiveAttribARB) +#define SET_GetActiveAttribARB(disp, fn) ((disp)->GetActiveAttribARB = fn) +#define CALL_GetAttribLocationARB(disp, parameters) (*((disp)->GetAttribLocationARB)) parameters +#define GET_GetAttribLocationARB(disp) ((disp)->GetAttribLocationARB) +#define SET_GetAttribLocationARB(disp, fn) ((disp)->GetAttribLocationARB = fn) +#define CALL_DrawBuffersARB(disp, parameters) (*((disp)->DrawBuffersARB)) parameters +#define GET_DrawBuffersARB(disp) ((disp)->DrawBuffersARB) +#define SET_DrawBuffersARB(disp, fn) ((disp)->DrawBuffersARB = fn) +#define CALL_PolygonOffsetEXT(disp, parameters) (*((disp)->PolygonOffsetEXT)) parameters +#define GET_PolygonOffsetEXT(disp) ((disp)->PolygonOffsetEXT) +#define SET_PolygonOffsetEXT(disp, fn) ((disp)->PolygonOffsetEXT = fn) +#define CALL_GetPixelTexGenParameterfvSGIS(disp, parameters) (*((disp)->GetPixelTexGenParameterfvSGIS)) parameters +#define GET_GetPixelTexGenParameterfvSGIS(disp) ((disp)->GetPixelTexGenParameterfvSGIS) +#define SET_GetPixelTexGenParameterfvSGIS(disp, fn) ((disp)->GetPixelTexGenParameterfvSGIS = fn) +#define CALL_GetPixelTexGenParameterivSGIS(disp, parameters) (*((disp)->GetPixelTexGenParameterivSGIS)) parameters +#define GET_GetPixelTexGenParameterivSGIS(disp) ((disp)->GetPixelTexGenParameterivSGIS) +#define SET_GetPixelTexGenParameterivSGIS(disp, fn) ((disp)->GetPixelTexGenParameterivSGIS = fn) +#define CALL_PixelTexGenParameterfSGIS(disp, parameters) (*((disp)->PixelTexGenParameterfSGIS)) parameters +#define GET_PixelTexGenParameterfSGIS(disp) ((disp)->PixelTexGenParameterfSGIS) +#define SET_PixelTexGenParameterfSGIS(disp, fn) ((disp)->PixelTexGenParameterfSGIS = fn) +#define CALL_PixelTexGenParameterfvSGIS(disp, parameters) (*((disp)->PixelTexGenParameterfvSGIS)) parameters +#define GET_PixelTexGenParameterfvSGIS(disp) ((disp)->PixelTexGenParameterfvSGIS) +#define SET_PixelTexGenParameterfvSGIS(disp, fn) ((disp)->PixelTexGenParameterfvSGIS = fn) +#define CALL_PixelTexGenParameteriSGIS(disp, parameters) (*((disp)->PixelTexGenParameteriSGIS)) parameters +#define GET_PixelTexGenParameteriSGIS(disp) ((disp)->PixelTexGenParameteriSGIS) +#define SET_PixelTexGenParameteriSGIS(disp, fn) ((disp)->PixelTexGenParameteriSGIS = fn) +#define CALL_PixelTexGenParameterivSGIS(disp, parameters) (*((disp)->PixelTexGenParameterivSGIS)) parameters +#define GET_PixelTexGenParameterivSGIS(disp) ((disp)->PixelTexGenParameterivSGIS) +#define SET_PixelTexGenParameterivSGIS(disp, fn) ((disp)->PixelTexGenParameterivSGIS = fn) +#define CALL_SampleMaskSGIS(disp, parameters) (*((disp)->SampleMaskSGIS)) parameters +#define GET_SampleMaskSGIS(disp) ((disp)->SampleMaskSGIS) +#define SET_SampleMaskSGIS(disp, fn) ((disp)->SampleMaskSGIS = fn) +#define CALL_SamplePatternSGIS(disp, parameters) (*((disp)->SamplePatternSGIS)) parameters +#define GET_SamplePatternSGIS(disp) ((disp)->SamplePatternSGIS) +#define SET_SamplePatternSGIS(disp, fn) ((disp)->SamplePatternSGIS = fn) +#define CALL_ColorPointerEXT(disp, parameters) (*((disp)->ColorPointerEXT)) parameters +#define GET_ColorPointerEXT(disp) ((disp)->ColorPointerEXT) +#define SET_ColorPointerEXT(disp, fn) ((disp)->ColorPointerEXT = fn) +#define CALL_EdgeFlagPointerEXT(disp, parameters) (*((disp)->EdgeFlagPointerEXT)) parameters +#define GET_EdgeFlagPointerEXT(disp) ((disp)->EdgeFlagPointerEXT) +#define SET_EdgeFlagPointerEXT(disp, fn) ((disp)->EdgeFlagPointerEXT = fn) +#define CALL_IndexPointerEXT(disp, parameters) (*((disp)->IndexPointerEXT)) parameters +#define GET_IndexPointerEXT(disp) ((disp)->IndexPointerEXT) +#define SET_IndexPointerEXT(disp, fn) ((disp)->IndexPointerEXT = fn) +#define CALL_NormalPointerEXT(disp, parameters) (*((disp)->NormalPointerEXT)) parameters +#define GET_NormalPointerEXT(disp) ((disp)->NormalPointerEXT) +#define SET_NormalPointerEXT(disp, fn) ((disp)->NormalPointerEXT = fn) +#define CALL_TexCoordPointerEXT(disp, parameters) (*((disp)->TexCoordPointerEXT)) parameters +#define GET_TexCoordPointerEXT(disp) ((disp)->TexCoordPointerEXT) +#define SET_TexCoordPointerEXT(disp, fn) ((disp)->TexCoordPointerEXT = fn) +#define CALL_VertexPointerEXT(disp, parameters) (*((disp)->VertexPointerEXT)) parameters +#define GET_VertexPointerEXT(disp) ((disp)->VertexPointerEXT) +#define SET_VertexPointerEXT(disp, fn) ((disp)->VertexPointerEXT = fn) +#define CALL_PointParameterfEXT(disp, parameters) (*((disp)->PointParameterfEXT)) parameters +#define GET_PointParameterfEXT(disp) ((disp)->PointParameterfEXT) +#define SET_PointParameterfEXT(disp, fn) ((disp)->PointParameterfEXT = fn) +#define CALL_PointParameterfvEXT(disp, parameters) (*((disp)->PointParameterfvEXT)) parameters +#define GET_PointParameterfvEXT(disp) ((disp)->PointParameterfvEXT) +#define SET_PointParameterfvEXT(disp, fn) ((disp)->PointParameterfvEXT = fn) +#define CALL_LockArraysEXT(disp, parameters) (*((disp)->LockArraysEXT)) parameters +#define GET_LockArraysEXT(disp) ((disp)->LockArraysEXT) +#define SET_LockArraysEXT(disp, fn) ((disp)->LockArraysEXT = fn) +#define CALL_UnlockArraysEXT(disp, parameters) (*((disp)->UnlockArraysEXT)) parameters +#define GET_UnlockArraysEXT(disp) ((disp)->UnlockArraysEXT) +#define SET_UnlockArraysEXT(disp, fn) ((disp)->UnlockArraysEXT = fn) +#define CALL_CullParameterdvEXT(disp, parameters) (*((disp)->CullParameterdvEXT)) parameters +#define GET_CullParameterdvEXT(disp) ((disp)->CullParameterdvEXT) +#define SET_CullParameterdvEXT(disp, fn) ((disp)->CullParameterdvEXT = fn) +#define CALL_CullParameterfvEXT(disp, parameters) (*((disp)->CullParameterfvEXT)) parameters +#define GET_CullParameterfvEXT(disp) ((disp)->CullParameterfvEXT) +#define SET_CullParameterfvEXT(disp, fn) ((disp)->CullParameterfvEXT = fn) +#define CALL_SecondaryColor3bEXT(disp, parameters) (*((disp)->SecondaryColor3bEXT)) parameters +#define GET_SecondaryColor3bEXT(disp) ((disp)->SecondaryColor3bEXT) +#define SET_SecondaryColor3bEXT(disp, fn) ((disp)->SecondaryColor3bEXT = fn) +#define CALL_SecondaryColor3bvEXT(disp, parameters) (*((disp)->SecondaryColor3bvEXT)) parameters +#define GET_SecondaryColor3bvEXT(disp) ((disp)->SecondaryColor3bvEXT) +#define SET_SecondaryColor3bvEXT(disp, fn) ((disp)->SecondaryColor3bvEXT = fn) +#define CALL_SecondaryColor3dEXT(disp, parameters) (*((disp)->SecondaryColor3dEXT)) parameters +#define GET_SecondaryColor3dEXT(disp) ((disp)->SecondaryColor3dEXT) +#define SET_SecondaryColor3dEXT(disp, fn) ((disp)->SecondaryColor3dEXT = fn) +#define CALL_SecondaryColor3dvEXT(disp, parameters) (*((disp)->SecondaryColor3dvEXT)) parameters +#define GET_SecondaryColor3dvEXT(disp) ((disp)->SecondaryColor3dvEXT) +#define SET_SecondaryColor3dvEXT(disp, fn) ((disp)->SecondaryColor3dvEXT = fn) +#define CALL_SecondaryColor3fEXT(disp, parameters) (*((disp)->SecondaryColor3fEXT)) parameters +#define GET_SecondaryColor3fEXT(disp) ((disp)->SecondaryColor3fEXT) +#define SET_SecondaryColor3fEXT(disp, fn) ((disp)->SecondaryColor3fEXT = fn) +#define CALL_SecondaryColor3fvEXT(disp, parameters) (*((disp)->SecondaryColor3fvEXT)) parameters +#define GET_SecondaryColor3fvEXT(disp) ((disp)->SecondaryColor3fvEXT) +#define SET_SecondaryColor3fvEXT(disp, fn) ((disp)->SecondaryColor3fvEXT = fn) +#define CALL_SecondaryColor3iEXT(disp, parameters) (*((disp)->SecondaryColor3iEXT)) parameters +#define GET_SecondaryColor3iEXT(disp) ((disp)->SecondaryColor3iEXT) +#define SET_SecondaryColor3iEXT(disp, fn) ((disp)->SecondaryColor3iEXT = fn) +#define CALL_SecondaryColor3ivEXT(disp, parameters) (*((disp)->SecondaryColor3ivEXT)) parameters +#define GET_SecondaryColor3ivEXT(disp) ((disp)->SecondaryColor3ivEXT) +#define SET_SecondaryColor3ivEXT(disp, fn) ((disp)->SecondaryColor3ivEXT = fn) +#define CALL_SecondaryColor3sEXT(disp, parameters) (*((disp)->SecondaryColor3sEXT)) parameters +#define GET_SecondaryColor3sEXT(disp) ((disp)->SecondaryColor3sEXT) +#define SET_SecondaryColor3sEXT(disp, fn) ((disp)->SecondaryColor3sEXT = fn) +#define CALL_SecondaryColor3svEXT(disp, parameters) (*((disp)->SecondaryColor3svEXT)) parameters +#define GET_SecondaryColor3svEXT(disp) ((disp)->SecondaryColor3svEXT) +#define SET_SecondaryColor3svEXT(disp, fn) ((disp)->SecondaryColor3svEXT = fn) +#define CALL_SecondaryColor3ubEXT(disp, parameters) (*((disp)->SecondaryColor3ubEXT)) parameters +#define GET_SecondaryColor3ubEXT(disp) ((disp)->SecondaryColor3ubEXT) +#define SET_SecondaryColor3ubEXT(disp, fn) ((disp)->SecondaryColor3ubEXT = fn) +#define CALL_SecondaryColor3ubvEXT(disp, parameters) (*((disp)->SecondaryColor3ubvEXT)) parameters +#define GET_SecondaryColor3ubvEXT(disp) ((disp)->SecondaryColor3ubvEXT) +#define SET_SecondaryColor3ubvEXT(disp, fn) ((disp)->SecondaryColor3ubvEXT = fn) +#define CALL_SecondaryColor3uiEXT(disp, parameters) (*((disp)->SecondaryColor3uiEXT)) parameters +#define GET_SecondaryColor3uiEXT(disp) ((disp)->SecondaryColor3uiEXT) +#define SET_SecondaryColor3uiEXT(disp, fn) ((disp)->SecondaryColor3uiEXT = fn) +#define CALL_SecondaryColor3uivEXT(disp, parameters) (*((disp)->SecondaryColor3uivEXT)) parameters +#define GET_SecondaryColor3uivEXT(disp) ((disp)->SecondaryColor3uivEXT) +#define SET_SecondaryColor3uivEXT(disp, fn) ((disp)->SecondaryColor3uivEXT = fn) +#define CALL_SecondaryColor3usEXT(disp, parameters) (*((disp)->SecondaryColor3usEXT)) parameters +#define GET_SecondaryColor3usEXT(disp) ((disp)->SecondaryColor3usEXT) +#define SET_SecondaryColor3usEXT(disp, fn) ((disp)->SecondaryColor3usEXT = fn) +#define CALL_SecondaryColor3usvEXT(disp, parameters) (*((disp)->SecondaryColor3usvEXT)) parameters +#define GET_SecondaryColor3usvEXT(disp) ((disp)->SecondaryColor3usvEXT) +#define SET_SecondaryColor3usvEXT(disp, fn) ((disp)->SecondaryColor3usvEXT = fn) +#define CALL_SecondaryColorPointerEXT(disp, parameters) (*((disp)->SecondaryColorPointerEXT)) parameters +#define GET_SecondaryColorPointerEXT(disp) ((disp)->SecondaryColorPointerEXT) +#define SET_SecondaryColorPointerEXT(disp, fn) ((disp)->SecondaryColorPointerEXT = fn) +#define CALL_MultiDrawArraysEXT(disp, parameters) (*((disp)->MultiDrawArraysEXT)) parameters +#define GET_MultiDrawArraysEXT(disp) ((disp)->MultiDrawArraysEXT) +#define SET_MultiDrawArraysEXT(disp, fn) ((disp)->MultiDrawArraysEXT = fn) +#define CALL_MultiDrawElementsEXT(disp, parameters) (*((disp)->MultiDrawElementsEXT)) parameters +#define GET_MultiDrawElementsEXT(disp) ((disp)->MultiDrawElementsEXT) +#define SET_MultiDrawElementsEXT(disp, fn) ((disp)->MultiDrawElementsEXT = fn) +#define CALL_FogCoordPointerEXT(disp, parameters) (*((disp)->FogCoordPointerEXT)) parameters +#define GET_FogCoordPointerEXT(disp) ((disp)->FogCoordPointerEXT) +#define SET_FogCoordPointerEXT(disp, fn) ((disp)->FogCoordPointerEXT = fn) +#define CALL_FogCoorddEXT(disp, parameters) (*((disp)->FogCoorddEXT)) parameters +#define GET_FogCoorddEXT(disp) ((disp)->FogCoorddEXT) +#define SET_FogCoorddEXT(disp, fn) ((disp)->FogCoorddEXT = fn) +#define CALL_FogCoorddvEXT(disp, parameters) (*((disp)->FogCoorddvEXT)) parameters +#define GET_FogCoorddvEXT(disp) ((disp)->FogCoorddvEXT) +#define SET_FogCoorddvEXT(disp, fn) ((disp)->FogCoorddvEXT = fn) +#define CALL_FogCoordfEXT(disp, parameters) (*((disp)->FogCoordfEXT)) parameters +#define GET_FogCoordfEXT(disp) ((disp)->FogCoordfEXT) +#define SET_FogCoordfEXT(disp, fn) ((disp)->FogCoordfEXT = fn) +#define CALL_FogCoordfvEXT(disp, parameters) (*((disp)->FogCoordfvEXT)) parameters +#define GET_FogCoordfvEXT(disp) ((disp)->FogCoordfvEXT) +#define SET_FogCoordfvEXT(disp, fn) ((disp)->FogCoordfvEXT = fn) +#define CALL_PixelTexGenSGIX(disp, parameters) (*((disp)->PixelTexGenSGIX)) parameters +#define GET_PixelTexGenSGIX(disp) ((disp)->PixelTexGenSGIX) +#define SET_PixelTexGenSGIX(disp, fn) ((disp)->PixelTexGenSGIX = fn) +#define CALL_BlendFuncSeparateEXT(disp, parameters) (*((disp)->BlendFuncSeparateEXT)) parameters +#define GET_BlendFuncSeparateEXT(disp) ((disp)->BlendFuncSeparateEXT) +#define SET_BlendFuncSeparateEXT(disp, fn) ((disp)->BlendFuncSeparateEXT = fn) +#define CALL_FlushVertexArrayRangeNV(disp, parameters) (*((disp)->FlushVertexArrayRangeNV)) parameters +#define GET_FlushVertexArrayRangeNV(disp) ((disp)->FlushVertexArrayRangeNV) +#define SET_FlushVertexArrayRangeNV(disp, fn) ((disp)->FlushVertexArrayRangeNV = fn) +#define CALL_VertexArrayRangeNV(disp, parameters) (*((disp)->VertexArrayRangeNV)) parameters +#define GET_VertexArrayRangeNV(disp) ((disp)->VertexArrayRangeNV) +#define SET_VertexArrayRangeNV(disp, fn) ((disp)->VertexArrayRangeNV = fn) +#define CALL_CombinerInputNV(disp, parameters) (*((disp)->CombinerInputNV)) parameters +#define GET_CombinerInputNV(disp) ((disp)->CombinerInputNV) +#define SET_CombinerInputNV(disp, fn) ((disp)->CombinerInputNV = fn) +#define CALL_CombinerOutputNV(disp, parameters) (*((disp)->CombinerOutputNV)) parameters +#define GET_CombinerOutputNV(disp) ((disp)->CombinerOutputNV) +#define SET_CombinerOutputNV(disp, fn) ((disp)->CombinerOutputNV = fn) +#define CALL_CombinerParameterfNV(disp, parameters) (*((disp)->CombinerParameterfNV)) parameters +#define GET_CombinerParameterfNV(disp) ((disp)->CombinerParameterfNV) +#define SET_CombinerParameterfNV(disp, fn) ((disp)->CombinerParameterfNV = fn) +#define CALL_CombinerParameterfvNV(disp, parameters) (*((disp)->CombinerParameterfvNV)) parameters +#define GET_CombinerParameterfvNV(disp) ((disp)->CombinerParameterfvNV) +#define SET_CombinerParameterfvNV(disp, fn) ((disp)->CombinerParameterfvNV = fn) +#define CALL_CombinerParameteriNV(disp, parameters) (*((disp)->CombinerParameteriNV)) parameters +#define GET_CombinerParameteriNV(disp) ((disp)->CombinerParameteriNV) +#define SET_CombinerParameteriNV(disp, fn) ((disp)->CombinerParameteriNV = fn) +#define CALL_CombinerParameterivNV(disp, parameters) (*((disp)->CombinerParameterivNV)) parameters +#define GET_CombinerParameterivNV(disp) ((disp)->CombinerParameterivNV) +#define SET_CombinerParameterivNV(disp, fn) ((disp)->CombinerParameterivNV = fn) +#define CALL_FinalCombinerInputNV(disp, parameters) (*((disp)->FinalCombinerInputNV)) parameters +#define GET_FinalCombinerInputNV(disp) ((disp)->FinalCombinerInputNV) +#define SET_FinalCombinerInputNV(disp, fn) ((disp)->FinalCombinerInputNV = fn) +#define CALL_GetCombinerInputParameterfvNV(disp, parameters) (*((disp)->GetCombinerInputParameterfvNV)) parameters +#define GET_GetCombinerInputParameterfvNV(disp) ((disp)->GetCombinerInputParameterfvNV) +#define SET_GetCombinerInputParameterfvNV(disp, fn) ((disp)->GetCombinerInputParameterfvNV = fn) +#define CALL_GetCombinerInputParameterivNV(disp, parameters) (*((disp)->GetCombinerInputParameterivNV)) parameters +#define GET_GetCombinerInputParameterivNV(disp) ((disp)->GetCombinerInputParameterivNV) +#define SET_GetCombinerInputParameterivNV(disp, fn) ((disp)->GetCombinerInputParameterivNV = fn) +#define CALL_GetCombinerOutputParameterfvNV(disp, parameters) (*((disp)->GetCombinerOutputParameterfvNV)) parameters +#define GET_GetCombinerOutputParameterfvNV(disp) ((disp)->GetCombinerOutputParameterfvNV) +#define SET_GetCombinerOutputParameterfvNV(disp, fn) ((disp)->GetCombinerOutputParameterfvNV = fn) +#define CALL_GetCombinerOutputParameterivNV(disp, parameters) (*((disp)->GetCombinerOutputParameterivNV)) parameters +#define GET_GetCombinerOutputParameterivNV(disp) ((disp)->GetCombinerOutputParameterivNV) +#define SET_GetCombinerOutputParameterivNV(disp, fn) ((disp)->GetCombinerOutputParameterivNV = fn) +#define CALL_GetFinalCombinerInputParameterfvNV(disp, parameters) (*((disp)->GetFinalCombinerInputParameterfvNV)) parameters +#define GET_GetFinalCombinerInputParameterfvNV(disp) ((disp)->GetFinalCombinerInputParameterfvNV) +#define SET_GetFinalCombinerInputParameterfvNV(disp, fn) ((disp)->GetFinalCombinerInputParameterfvNV = fn) +#define CALL_GetFinalCombinerInputParameterivNV(disp, parameters) (*((disp)->GetFinalCombinerInputParameterivNV)) parameters +#define GET_GetFinalCombinerInputParameterivNV(disp) ((disp)->GetFinalCombinerInputParameterivNV) +#define SET_GetFinalCombinerInputParameterivNV(disp, fn) ((disp)->GetFinalCombinerInputParameterivNV = fn) +#define CALL_ResizeBuffersMESA(disp, parameters) (*((disp)->ResizeBuffersMESA)) parameters +#define GET_ResizeBuffersMESA(disp) ((disp)->ResizeBuffersMESA) +#define SET_ResizeBuffersMESA(disp, fn) ((disp)->ResizeBuffersMESA = fn) +#define CALL_WindowPos2dMESA(disp, parameters) (*((disp)->WindowPos2dMESA)) parameters +#define GET_WindowPos2dMESA(disp) ((disp)->WindowPos2dMESA) +#define SET_WindowPos2dMESA(disp, fn) ((disp)->WindowPos2dMESA = fn) +#define CALL_WindowPos2dvMESA(disp, parameters) (*((disp)->WindowPos2dvMESA)) parameters +#define GET_WindowPos2dvMESA(disp) ((disp)->WindowPos2dvMESA) +#define SET_WindowPos2dvMESA(disp, fn) ((disp)->WindowPos2dvMESA = fn) +#define CALL_WindowPos2fMESA(disp, parameters) (*((disp)->WindowPos2fMESA)) parameters +#define GET_WindowPos2fMESA(disp) ((disp)->WindowPos2fMESA) +#define SET_WindowPos2fMESA(disp, fn) ((disp)->WindowPos2fMESA = fn) +#define CALL_WindowPos2fvMESA(disp, parameters) (*((disp)->WindowPos2fvMESA)) parameters +#define GET_WindowPos2fvMESA(disp) ((disp)->WindowPos2fvMESA) +#define SET_WindowPos2fvMESA(disp, fn) ((disp)->WindowPos2fvMESA = fn) +#define CALL_WindowPos2iMESA(disp, parameters) (*((disp)->WindowPos2iMESA)) parameters +#define GET_WindowPos2iMESA(disp) ((disp)->WindowPos2iMESA) +#define SET_WindowPos2iMESA(disp, fn) ((disp)->WindowPos2iMESA = fn) +#define CALL_WindowPos2ivMESA(disp, parameters) (*((disp)->WindowPos2ivMESA)) parameters +#define GET_WindowPos2ivMESA(disp) ((disp)->WindowPos2ivMESA) +#define SET_WindowPos2ivMESA(disp, fn) ((disp)->WindowPos2ivMESA = fn) +#define CALL_WindowPos2sMESA(disp, parameters) (*((disp)->WindowPos2sMESA)) parameters +#define GET_WindowPos2sMESA(disp) ((disp)->WindowPos2sMESA) +#define SET_WindowPos2sMESA(disp, fn) ((disp)->WindowPos2sMESA = fn) +#define CALL_WindowPos2svMESA(disp, parameters) (*((disp)->WindowPos2svMESA)) parameters +#define GET_WindowPos2svMESA(disp) ((disp)->WindowPos2svMESA) +#define SET_WindowPos2svMESA(disp, fn) ((disp)->WindowPos2svMESA = fn) +#define CALL_WindowPos3dMESA(disp, parameters) (*((disp)->WindowPos3dMESA)) parameters +#define GET_WindowPos3dMESA(disp) ((disp)->WindowPos3dMESA) +#define SET_WindowPos3dMESA(disp, fn) ((disp)->WindowPos3dMESA = fn) +#define CALL_WindowPos3dvMESA(disp, parameters) (*((disp)->WindowPos3dvMESA)) parameters +#define GET_WindowPos3dvMESA(disp) ((disp)->WindowPos3dvMESA) +#define SET_WindowPos3dvMESA(disp, fn) ((disp)->WindowPos3dvMESA = fn) +#define CALL_WindowPos3fMESA(disp, parameters) (*((disp)->WindowPos3fMESA)) parameters +#define GET_WindowPos3fMESA(disp) ((disp)->WindowPos3fMESA) +#define SET_WindowPos3fMESA(disp, fn) ((disp)->WindowPos3fMESA = fn) +#define CALL_WindowPos3fvMESA(disp, parameters) (*((disp)->WindowPos3fvMESA)) parameters +#define GET_WindowPos3fvMESA(disp) ((disp)->WindowPos3fvMESA) +#define SET_WindowPos3fvMESA(disp, fn) ((disp)->WindowPos3fvMESA = fn) +#define CALL_WindowPos3iMESA(disp, parameters) (*((disp)->WindowPos3iMESA)) parameters +#define GET_WindowPos3iMESA(disp) ((disp)->WindowPos3iMESA) +#define SET_WindowPos3iMESA(disp, fn) ((disp)->WindowPos3iMESA = fn) +#define CALL_WindowPos3ivMESA(disp, parameters) (*((disp)->WindowPos3ivMESA)) parameters +#define GET_WindowPos3ivMESA(disp) ((disp)->WindowPos3ivMESA) +#define SET_WindowPos3ivMESA(disp, fn) ((disp)->WindowPos3ivMESA = fn) +#define CALL_WindowPos3sMESA(disp, parameters) (*((disp)->WindowPos3sMESA)) parameters +#define GET_WindowPos3sMESA(disp) ((disp)->WindowPos3sMESA) +#define SET_WindowPos3sMESA(disp, fn) ((disp)->WindowPos3sMESA = fn) +#define CALL_WindowPos3svMESA(disp, parameters) (*((disp)->WindowPos3svMESA)) parameters +#define GET_WindowPos3svMESA(disp) ((disp)->WindowPos3svMESA) +#define SET_WindowPos3svMESA(disp, fn) ((disp)->WindowPos3svMESA = fn) +#define CALL_WindowPos4dMESA(disp, parameters) (*((disp)->WindowPos4dMESA)) parameters +#define GET_WindowPos4dMESA(disp) ((disp)->WindowPos4dMESA) +#define SET_WindowPos4dMESA(disp, fn) ((disp)->WindowPos4dMESA = fn) +#define CALL_WindowPos4dvMESA(disp, parameters) (*((disp)->WindowPos4dvMESA)) parameters +#define GET_WindowPos4dvMESA(disp) ((disp)->WindowPos4dvMESA) +#define SET_WindowPos4dvMESA(disp, fn) ((disp)->WindowPos4dvMESA = fn) +#define CALL_WindowPos4fMESA(disp, parameters) (*((disp)->WindowPos4fMESA)) parameters +#define GET_WindowPos4fMESA(disp) ((disp)->WindowPos4fMESA) +#define SET_WindowPos4fMESA(disp, fn) ((disp)->WindowPos4fMESA = fn) +#define CALL_WindowPos4fvMESA(disp, parameters) (*((disp)->WindowPos4fvMESA)) parameters +#define GET_WindowPos4fvMESA(disp) ((disp)->WindowPos4fvMESA) +#define SET_WindowPos4fvMESA(disp, fn) ((disp)->WindowPos4fvMESA = fn) +#define CALL_WindowPos4iMESA(disp, parameters) (*((disp)->WindowPos4iMESA)) parameters +#define GET_WindowPos4iMESA(disp) ((disp)->WindowPos4iMESA) +#define SET_WindowPos4iMESA(disp, fn) ((disp)->WindowPos4iMESA = fn) +#define CALL_WindowPos4ivMESA(disp, parameters) (*((disp)->WindowPos4ivMESA)) parameters +#define GET_WindowPos4ivMESA(disp) ((disp)->WindowPos4ivMESA) +#define SET_WindowPos4ivMESA(disp, fn) ((disp)->WindowPos4ivMESA = fn) +#define CALL_WindowPos4sMESA(disp, parameters) (*((disp)->WindowPos4sMESA)) parameters +#define GET_WindowPos4sMESA(disp) ((disp)->WindowPos4sMESA) +#define SET_WindowPos4sMESA(disp, fn) ((disp)->WindowPos4sMESA = fn) +#define CALL_WindowPos4svMESA(disp, parameters) (*((disp)->WindowPos4svMESA)) parameters +#define GET_WindowPos4svMESA(disp) ((disp)->WindowPos4svMESA) +#define SET_WindowPos4svMESA(disp, fn) ((disp)->WindowPos4svMESA = fn) +#define CALL_MultiModeDrawArraysIBM(disp, parameters) (*((disp)->MultiModeDrawArraysIBM)) parameters +#define GET_MultiModeDrawArraysIBM(disp) ((disp)->MultiModeDrawArraysIBM) +#define SET_MultiModeDrawArraysIBM(disp, fn) ((disp)->MultiModeDrawArraysIBM = fn) +#define CALL_MultiModeDrawElementsIBM(disp, parameters) (*((disp)->MultiModeDrawElementsIBM)) parameters +#define GET_MultiModeDrawElementsIBM(disp) ((disp)->MultiModeDrawElementsIBM) +#define SET_MultiModeDrawElementsIBM(disp, fn) ((disp)->MultiModeDrawElementsIBM = fn) +#define CALL_DeleteFencesNV(disp, parameters) (*((disp)->DeleteFencesNV)) parameters +#define GET_DeleteFencesNV(disp) ((disp)->DeleteFencesNV) +#define SET_DeleteFencesNV(disp, fn) ((disp)->DeleteFencesNV = fn) +#define CALL_FinishFenceNV(disp, parameters) (*((disp)->FinishFenceNV)) parameters +#define GET_FinishFenceNV(disp) ((disp)->FinishFenceNV) +#define SET_FinishFenceNV(disp, fn) ((disp)->FinishFenceNV = fn) +#define CALL_GenFencesNV(disp, parameters) (*((disp)->GenFencesNV)) parameters +#define GET_GenFencesNV(disp) ((disp)->GenFencesNV) +#define SET_GenFencesNV(disp, fn) ((disp)->GenFencesNV = fn) +#define CALL_GetFenceivNV(disp, parameters) (*((disp)->GetFenceivNV)) parameters +#define GET_GetFenceivNV(disp) ((disp)->GetFenceivNV) +#define SET_GetFenceivNV(disp, fn) ((disp)->GetFenceivNV = fn) +#define CALL_IsFenceNV(disp, parameters) (*((disp)->IsFenceNV)) parameters +#define GET_IsFenceNV(disp) ((disp)->IsFenceNV) +#define SET_IsFenceNV(disp, fn) ((disp)->IsFenceNV = fn) +#define CALL_SetFenceNV(disp, parameters) (*((disp)->SetFenceNV)) parameters +#define GET_SetFenceNV(disp) ((disp)->SetFenceNV) +#define SET_SetFenceNV(disp, fn) ((disp)->SetFenceNV = fn) +#define CALL_TestFenceNV(disp, parameters) (*((disp)->TestFenceNV)) parameters +#define GET_TestFenceNV(disp) ((disp)->TestFenceNV) +#define SET_TestFenceNV(disp, fn) ((disp)->TestFenceNV = fn) +#define CALL_AreProgramsResidentNV(disp, parameters) (*((disp)->AreProgramsResidentNV)) parameters +#define GET_AreProgramsResidentNV(disp) ((disp)->AreProgramsResidentNV) +#define SET_AreProgramsResidentNV(disp, fn) ((disp)->AreProgramsResidentNV = fn) +#define CALL_BindProgramNV(disp, parameters) (*((disp)->BindProgramNV)) parameters +#define GET_BindProgramNV(disp) ((disp)->BindProgramNV) +#define SET_BindProgramNV(disp, fn) ((disp)->BindProgramNV = fn) +#define CALL_DeleteProgramsNV(disp, parameters) (*((disp)->DeleteProgramsNV)) parameters +#define GET_DeleteProgramsNV(disp) ((disp)->DeleteProgramsNV) +#define SET_DeleteProgramsNV(disp, fn) ((disp)->DeleteProgramsNV = fn) +#define CALL_ExecuteProgramNV(disp, parameters) (*((disp)->ExecuteProgramNV)) parameters +#define GET_ExecuteProgramNV(disp) ((disp)->ExecuteProgramNV) +#define SET_ExecuteProgramNV(disp, fn) ((disp)->ExecuteProgramNV = fn) +#define CALL_GenProgramsNV(disp, parameters) (*((disp)->GenProgramsNV)) parameters +#define GET_GenProgramsNV(disp) ((disp)->GenProgramsNV) +#define SET_GenProgramsNV(disp, fn) ((disp)->GenProgramsNV = fn) +#define CALL_GetProgramParameterdvNV(disp, parameters) (*((disp)->GetProgramParameterdvNV)) parameters +#define GET_GetProgramParameterdvNV(disp) ((disp)->GetProgramParameterdvNV) +#define SET_GetProgramParameterdvNV(disp, fn) ((disp)->GetProgramParameterdvNV = fn) +#define CALL_GetProgramParameterfvNV(disp, parameters) (*((disp)->GetProgramParameterfvNV)) parameters +#define GET_GetProgramParameterfvNV(disp) ((disp)->GetProgramParameterfvNV) +#define SET_GetProgramParameterfvNV(disp, fn) ((disp)->GetProgramParameterfvNV = fn) +#define CALL_GetProgramStringNV(disp, parameters) (*((disp)->GetProgramStringNV)) parameters +#define GET_GetProgramStringNV(disp) ((disp)->GetProgramStringNV) +#define SET_GetProgramStringNV(disp, fn) ((disp)->GetProgramStringNV = fn) +#define CALL_GetProgramivNV(disp, parameters) (*((disp)->GetProgramivNV)) parameters +#define GET_GetProgramivNV(disp) ((disp)->GetProgramivNV) +#define SET_GetProgramivNV(disp, fn) ((disp)->GetProgramivNV = fn) +#define CALL_GetTrackMatrixivNV(disp, parameters) (*((disp)->GetTrackMatrixivNV)) parameters +#define GET_GetTrackMatrixivNV(disp) ((disp)->GetTrackMatrixivNV) +#define SET_GetTrackMatrixivNV(disp, fn) ((disp)->GetTrackMatrixivNV = fn) +#define CALL_GetVertexAttribPointervNV(disp, parameters) (*((disp)->GetVertexAttribPointervNV)) parameters +#define GET_GetVertexAttribPointervNV(disp) ((disp)->GetVertexAttribPointervNV) +#define SET_GetVertexAttribPointervNV(disp, fn) ((disp)->GetVertexAttribPointervNV = fn) +#define CALL_GetVertexAttribdvNV(disp, parameters) (*((disp)->GetVertexAttribdvNV)) parameters +#define GET_GetVertexAttribdvNV(disp) ((disp)->GetVertexAttribdvNV) +#define SET_GetVertexAttribdvNV(disp, fn) ((disp)->GetVertexAttribdvNV = fn) +#define CALL_GetVertexAttribfvNV(disp, parameters) (*((disp)->GetVertexAttribfvNV)) parameters +#define GET_GetVertexAttribfvNV(disp) ((disp)->GetVertexAttribfvNV) +#define SET_GetVertexAttribfvNV(disp, fn) ((disp)->GetVertexAttribfvNV = fn) +#define CALL_GetVertexAttribivNV(disp, parameters) (*((disp)->GetVertexAttribivNV)) parameters +#define GET_GetVertexAttribivNV(disp) ((disp)->GetVertexAttribivNV) +#define SET_GetVertexAttribivNV(disp, fn) ((disp)->GetVertexAttribivNV = fn) +#define CALL_IsProgramNV(disp, parameters) (*((disp)->IsProgramNV)) parameters +#define GET_IsProgramNV(disp) ((disp)->IsProgramNV) +#define SET_IsProgramNV(disp, fn) ((disp)->IsProgramNV = fn) +#define CALL_LoadProgramNV(disp, parameters) (*((disp)->LoadProgramNV)) parameters +#define GET_LoadProgramNV(disp) ((disp)->LoadProgramNV) +#define SET_LoadProgramNV(disp, fn) ((disp)->LoadProgramNV = fn) +#define CALL_ProgramParameters4dvNV(disp, parameters) (*((disp)->ProgramParameters4dvNV)) parameters +#define GET_ProgramParameters4dvNV(disp) ((disp)->ProgramParameters4dvNV) +#define SET_ProgramParameters4dvNV(disp, fn) ((disp)->ProgramParameters4dvNV = fn) +#define CALL_ProgramParameters4fvNV(disp, parameters) (*((disp)->ProgramParameters4fvNV)) parameters +#define GET_ProgramParameters4fvNV(disp) ((disp)->ProgramParameters4fvNV) +#define SET_ProgramParameters4fvNV(disp, fn) ((disp)->ProgramParameters4fvNV = fn) +#define CALL_RequestResidentProgramsNV(disp, parameters) (*((disp)->RequestResidentProgramsNV)) parameters +#define GET_RequestResidentProgramsNV(disp) ((disp)->RequestResidentProgramsNV) +#define SET_RequestResidentProgramsNV(disp, fn) ((disp)->RequestResidentProgramsNV = fn) +#define CALL_TrackMatrixNV(disp, parameters) (*((disp)->TrackMatrixNV)) parameters +#define GET_TrackMatrixNV(disp) ((disp)->TrackMatrixNV) +#define SET_TrackMatrixNV(disp, fn) ((disp)->TrackMatrixNV = fn) +#define CALL_VertexAttrib1dNV(disp, parameters) (*((disp)->VertexAttrib1dNV)) parameters +#define GET_VertexAttrib1dNV(disp) ((disp)->VertexAttrib1dNV) +#define SET_VertexAttrib1dNV(disp, fn) ((disp)->VertexAttrib1dNV = fn) +#define CALL_VertexAttrib1dvNV(disp, parameters) (*((disp)->VertexAttrib1dvNV)) parameters +#define GET_VertexAttrib1dvNV(disp) ((disp)->VertexAttrib1dvNV) +#define SET_VertexAttrib1dvNV(disp, fn) ((disp)->VertexAttrib1dvNV = fn) +#define CALL_VertexAttrib1fNV(disp, parameters) (*((disp)->VertexAttrib1fNV)) parameters +#define GET_VertexAttrib1fNV(disp) ((disp)->VertexAttrib1fNV) +#define SET_VertexAttrib1fNV(disp, fn) ((disp)->VertexAttrib1fNV = fn) +#define CALL_VertexAttrib1fvNV(disp, parameters) (*((disp)->VertexAttrib1fvNV)) parameters +#define GET_VertexAttrib1fvNV(disp) ((disp)->VertexAttrib1fvNV) +#define SET_VertexAttrib1fvNV(disp, fn) ((disp)->VertexAttrib1fvNV = fn) +#define CALL_VertexAttrib1sNV(disp, parameters) (*((disp)->VertexAttrib1sNV)) parameters +#define GET_VertexAttrib1sNV(disp) ((disp)->VertexAttrib1sNV) +#define SET_VertexAttrib1sNV(disp, fn) ((disp)->VertexAttrib1sNV = fn) +#define CALL_VertexAttrib1svNV(disp, parameters) (*((disp)->VertexAttrib1svNV)) parameters +#define GET_VertexAttrib1svNV(disp) ((disp)->VertexAttrib1svNV) +#define SET_VertexAttrib1svNV(disp, fn) ((disp)->VertexAttrib1svNV = fn) +#define CALL_VertexAttrib2dNV(disp, parameters) (*((disp)->VertexAttrib2dNV)) parameters +#define GET_VertexAttrib2dNV(disp) ((disp)->VertexAttrib2dNV) +#define SET_VertexAttrib2dNV(disp, fn) ((disp)->VertexAttrib2dNV = fn) +#define CALL_VertexAttrib2dvNV(disp, parameters) (*((disp)->VertexAttrib2dvNV)) parameters +#define GET_VertexAttrib2dvNV(disp) ((disp)->VertexAttrib2dvNV) +#define SET_VertexAttrib2dvNV(disp, fn) ((disp)->VertexAttrib2dvNV = fn) +#define CALL_VertexAttrib2fNV(disp, parameters) (*((disp)->VertexAttrib2fNV)) parameters +#define GET_VertexAttrib2fNV(disp) ((disp)->VertexAttrib2fNV) +#define SET_VertexAttrib2fNV(disp, fn) ((disp)->VertexAttrib2fNV = fn) +#define CALL_VertexAttrib2fvNV(disp, parameters) (*((disp)->VertexAttrib2fvNV)) parameters +#define GET_VertexAttrib2fvNV(disp) ((disp)->VertexAttrib2fvNV) +#define SET_VertexAttrib2fvNV(disp, fn) ((disp)->VertexAttrib2fvNV = fn) +#define CALL_VertexAttrib2sNV(disp, parameters) (*((disp)->VertexAttrib2sNV)) parameters +#define GET_VertexAttrib2sNV(disp) ((disp)->VertexAttrib2sNV) +#define SET_VertexAttrib2sNV(disp, fn) ((disp)->VertexAttrib2sNV = fn) +#define CALL_VertexAttrib2svNV(disp, parameters) (*((disp)->VertexAttrib2svNV)) parameters +#define GET_VertexAttrib2svNV(disp) ((disp)->VertexAttrib2svNV) +#define SET_VertexAttrib2svNV(disp, fn) ((disp)->VertexAttrib2svNV = fn) +#define CALL_VertexAttrib3dNV(disp, parameters) (*((disp)->VertexAttrib3dNV)) parameters +#define GET_VertexAttrib3dNV(disp) ((disp)->VertexAttrib3dNV) +#define SET_VertexAttrib3dNV(disp, fn) ((disp)->VertexAttrib3dNV = fn) +#define CALL_VertexAttrib3dvNV(disp, parameters) (*((disp)->VertexAttrib3dvNV)) parameters +#define GET_VertexAttrib3dvNV(disp) ((disp)->VertexAttrib3dvNV) +#define SET_VertexAttrib3dvNV(disp, fn) ((disp)->VertexAttrib3dvNV = fn) +#define CALL_VertexAttrib3fNV(disp, parameters) (*((disp)->VertexAttrib3fNV)) parameters +#define GET_VertexAttrib3fNV(disp) ((disp)->VertexAttrib3fNV) +#define SET_VertexAttrib3fNV(disp, fn) ((disp)->VertexAttrib3fNV = fn) +#define CALL_VertexAttrib3fvNV(disp, parameters) (*((disp)->VertexAttrib3fvNV)) parameters +#define GET_VertexAttrib3fvNV(disp) ((disp)->VertexAttrib3fvNV) +#define SET_VertexAttrib3fvNV(disp, fn) ((disp)->VertexAttrib3fvNV = fn) +#define CALL_VertexAttrib3sNV(disp, parameters) (*((disp)->VertexAttrib3sNV)) parameters +#define GET_VertexAttrib3sNV(disp) ((disp)->VertexAttrib3sNV) +#define SET_VertexAttrib3sNV(disp, fn) ((disp)->VertexAttrib3sNV = fn) +#define CALL_VertexAttrib3svNV(disp, parameters) (*((disp)->VertexAttrib3svNV)) parameters +#define GET_VertexAttrib3svNV(disp) ((disp)->VertexAttrib3svNV) +#define SET_VertexAttrib3svNV(disp, fn) ((disp)->VertexAttrib3svNV = fn) +#define CALL_VertexAttrib4dNV(disp, parameters) (*((disp)->VertexAttrib4dNV)) parameters +#define GET_VertexAttrib4dNV(disp) ((disp)->VertexAttrib4dNV) +#define SET_VertexAttrib4dNV(disp, fn) ((disp)->VertexAttrib4dNV = fn) +#define CALL_VertexAttrib4dvNV(disp, parameters) (*((disp)->VertexAttrib4dvNV)) parameters +#define GET_VertexAttrib4dvNV(disp) ((disp)->VertexAttrib4dvNV) +#define SET_VertexAttrib4dvNV(disp, fn) ((disp)->VertexAttrib4dvNV = fn) +#define CALL_VertexAttrib4fNV(disp, parameters) (*((disp)->VertexAttrib4fNV)) parameters +#define GET_VertexAttrib4fNV(disp) ((disp)->VertexAttrib4fNV) +#define SET_VertexAttrib4fNV(disp, fn) ((disp)->VertexAttrib4fNV = fn) +#define CALL_VertexAttrib4fvNV(disp, parameters) (*((disp)->VertexAttrib4fvNV)) parameters +#define GET_VertexAttrib4fvNV(disp) ((disp)->VertexAttrib4fvNV) +#define SET_VertexAttrib4fvNV(disp, fn) ((disp)->VertexAttrib4fvNV = fn) +#define CALL_VertexAttrib4sNV(disp, parameters) (*((disp)->VertexAttrib4sNV)) parameters +#define GET_VertexAttrib4sNV(disp) ((disp)->VertexAttrib4sNV) +#define SET_VertexAttrib4sNV(disp, fn) ((disp)->VertexAttrib4sNV = fn) +#define CALL_VertexAttrib4svNV(disp, parameters) (*((disp)->VertexAttrib4svNV)) parameters +#define GET_VertexAttrib4svNV(disp) ((disp)->VertexAttrib4svNV) +#define SET_VertexAttrib4svNV(disp, fn) ((disp)->VertexAttrib4svNV = fn) +#define CALL_VertexAttrib4ubNV(disp, parameters) (*((disp)->VertexAttrib4ubNV)) parameters +#define GET_VertexAttrib4ubNV(disp) ((disp)->VertexAttrib4ubNV) +#define SET_VertexAttrib4ubNV(disp, fn) ((disp)->VertexAttrib4ubNV = fn) +#define CALL_VertexAttrib4ubvNV(disp, parameters) (*((disp)->VertexAttrib4ubvNV)) parameters +#define GET_VertexAttrib4ubvNV(disp) ((disp)->VertexAttrib4ubvNV) +#define SET_VertexAttrib4ubvNV(disp, fn) ((disp)->VertexAttrib4ubvNV = fn) +#define CALL_VertexAttribPointerNV(disp, parameters) (*((disp)->VertexAttribPointerNV)) parameters +#define GET_VertexAttribPointerNV(disp) ((disp)->VertexAttribPointerNV) +#define SET_VertexAttribPointerNV(disp, fn) ((disp)->VertexAttribPointerNV = fn) +#define CALL_VertexAttribs1dvNV(disp, parameters) (*((disp)->VertexAttribs1dvNV)) parameters +#define GET_VertexAttribs1dvNV(disp) ((disp)->VertexAttribs1dvNV) +#define SET_VertexAttribs1dvNV(disp, fn) ((disp)->VertexAttribs1dvNV = fn) +#define CALL_VertexAttribs1fvNV(disp, parameters) (*((disp)->VertexAttribs1fvNV)) parameters +#define GET_VertexAttribs1fvNV(disp) ((disp)->VertexAttribs1fvNV) +#define SET_VertexAttribs1fvNV(disp, fn) ((disp)->VertexAttribs1fvNV = fn) +#define CALL_VertexAttribs1svNV(disp, parameters) (*((disp)->VertexAttribs1svNV)) parameters +#define GET_VertexAttribs1svNV(disp) ((disp)->VertexAttribs1svNV) +#define SET_VertexAttribs1svNV(disp, fn) ((disp)->VertexAttribs1svNV = fn) +#define CALL_VertexAttribs2dvNV(disp, parameters) (*((disp)->VertexAttribs2dvNV)) parameters +#define GET_VertexAttribs2dvNV(disp) ((disp)->VertexAttribs2dvNV) +#define SET_VertexAttribs2dvNV(disp, fn) ((disp)->VertexAttribs2dvNV = fn) +#define CALL_VertexAttribs2fvNV(disp, parameters) (*((disp)->VertexAttribs2fvNV)) parameters +#define GET_VertexAttribs2fvNV(disp) ((disp)->VertexAttribs2fvNV) +#define SET_VertexAttribs2fvNV(disp, fn) ((disp)->VertexAttribs2fvNV = fn) +#define CALL_VertexAttribs2svNV(disp, parameters) (*((disp)->VertexAttribs2svNV)) parameters +#define GET_VertexAttribs2svNV(disp) ((disp)->VertexAttribs2svNV) +#define SET_VertexAttribs2svNV(disp, fn) ((disp)->VertexAttribs2svNV = fn) +#define CALL_VertexAttribs3dvNV(disp, parameters) (*((disp)->VertexAttribs3dvNV)) parameters +#define GET_VertexAttribs3dvNV(disp) ((disp)->VertexAttribs3dvNV) +#define SET_VertexAttribs3dvNV(disp, fn) ((disp)->VertexAttribs3dvNV = fn) +#define CALL_VertexAttribs3fvNV(disp, parameters) (*((disp)->VertexAttribs3fvNV)) parameters +#define GET_VertexAttribs3fvNV(disp) ((disp)->VertexAttribs3fvNV) +#define SET_VertexAttribs3fvNV(disp, fn) ((disp)->VertexAttribs3fvNV = fn) +#define CALL_VertexAttribs3svNV(disp, parameters) (*((disp)->VertexAttribs3svNV)) parameters +#define GET_VertexAttribs3svNV(disp) ((disp)->VertexAttribs3svNV) +#define SET_VertexAttribs3svNV(disp, fn) ((disp)->VertexAttribs3svNV = fn) +#define CALL_VertexAttribs4dvNV(disp, parameters) (*((disp)->VertexAttribs4dvNV)) parameters +#define GET_VertexAttribs4dvNV(disp) ((disp)->VertexAttribs4dvNV) +#define SET_VertexAttribs4dvNV(disp, fn) ((disp)->VertexAttribs4dvNV = fn) +#define CALL_VertexAttribs4fvNV(disp, parameters) (*((disp)->VertexAttribs4fvNV)) parameters +#define GET_VertexAttribs4fvNV(disp) ((disp)->VertexAttribs4fvNV) +#define SET_VertexAttribs4fvNV(disp, fn) ((disp)->VertexAttribs4fvNV = fn) +#define CALL_VertexAttribs4svNV(disp, parameters) (*((disp)->VertexAttribs4svNV)) parameters +#define GET_VertexAttribs4svNV(disp) ((disp)->VertexAttribs4svNV) +#define SET_VertexAttribs4svNV(disp, fn) ((disp)->VertexAttribs4svNV = fn) +#define CALL_VertexAttribs4ubvNV(disp, parameters) (*((disp)->VertexAttribs4ubvNV)) parameters +#define GET_VertexAttribs4ubvNV(disp) ((disp)->VertexAttribs4ubvNV) +#define SET_VertexAttribs4ubvNV(disp, fn) ((disp)->VertexAttribs4ubvNV = fn) +#define CALL_AlphaFragmentOp1ATI(disp, parameters) (*((disp)->AlphaFragmentOp1ATI)) parameters +#define GET_AlphaFragmentOp1ATI(disp) ((disp)->AlphaFragmentOp1ATI) +#define SET_AlphaFragmentOp1ATI(disp, fn) ((disp)->AlphaFragmentOp1ATI = fn) +#define CALL_AlphaFragmentOp2ATI(disp, parameters) (*((disp)->AlphaFragmentOp2ATI)) parameters +#define GET_AlphaFragmentOp2ATI(disp) ((disp)->AlphaFragmentOp2ATI) +#define SET_AlphaFragmentOp2ATI(disp, fn) ((disp)->AlphaFragmentOp2ATI = fn) +#define CALL_AlphaFragmentOp3ATI(disp, parameters) (*((disp)->AlphaFragmentOp3ATI)) parameters +#define GET_AlphaFragmentOp3ATI(disp) ((disp)->AlphaFragmentOp3ATI) +#define SET_AlphaFragmentOp3ATI(disp, fn) ((disp)->AlphaFragmentOp3ATI = fn) +#define CALL_BeginFragmentShaderATI(disp, parameters) (*((disp)->BeginFragmentShaderATI)) parameters +#define GET_BeginFragmentShaderATI(disp) ((disp)->BeginFragmentShaderATI) +#define SET_BeginFragmentShaderATI(disp, fn) ((disp)->BeginFragmentShaderATI = fn) +#define CALL_BindFragmentShaderATI(disp, parameters) (*((disp)->BindFragmentShaderATI)) parameters +#define GET_BindFragmentShaderATI(disp) ((disp)->BindFragmentShaderATI) +#define SET_BindFragmentShaderATI(disp, fn) ((disp)->BindFragmentShaderATI = fn) +#define CALL_ColorFragmentOp1ATI(disp, parameters) (*((disp)->ColorFragmentOp1ATI)) parameters +#define GET_ColorFragmentOp1ATI(disp) ((disp)->ColorFragmentOp1ATI) +#define SET_ColorFragmentOp1ATI(disp, fn) ((disp)->ColorFragmentOp1ATI = fn) +#define CALL_ColorFragmentOp2ATI(disp, parameters) (*((disp)->ColorFragmentOp2ATI)) parameters +#define GET_ColorFragmentOp2ATI(disp) ((disp)->ColorFragmentOp2ATI) +#define SET_ColorFragmentOp2ATI(disp, fn) ((disp)->ColorFragmentOp2ATI = fn) +#define CALL_ColorFragmentOp3ATI(disp, parameters) (*((disp)->ColorFragmentOp3ATI)) parameters +#define GET_ColorFragmentOp3ATI(disp) ((disp)->ColorFragmentOp3ATI) +#define SET_ColorFragmentOp3ATI(disp, fn) ((disp)->ColorFragmentOp3ATI = fn) +#define CALL_DeleteFragmentShaderATI(disp, parameters) (*((disp)->DeleteFragmentShaderATI)) parameters +#define GET_DeleteFragmentShaderATI(disp) ((disp)->DeleteFragmentShaderATI) +#define SET_DeleteFragmentShaderATI(disp, fn) ((disp)->DeleteFragmentShaderATI = fn) +#define CALL_EndFragmentShaderATI(disp, parameters) (*((disp)->EndFragmentShaderATI)) parameters +#define GET_EndFragmentShaderATI(disp) ((disp)->EndFragmentShaderATI) +#define SET_EndFragmentShaderATI(disp, fn) ((disp)->EndFragmentShaderATI = fn) +#define CALL_GenFragmentShadersATI(disp, parameters) (*((disp)->GenFragmentShadersATI)) parameters +#define GET_GenFragmentShadersATI(disp) ((disp)->GenFragmentShadersATI) +#define SET_GenFragmentShadersATI(disp, fn) ((disp)->GenFragmentShadersATI = fn) +#define CALL_PassTexCoordATI(disp, parameters) (*((disp)->PassTexCoordATI)) parameters +#define GET_PassTexCoordATI(disp) ((disp)->PassTexCoordATI) +#define SET_PassTexCoordATI(disp, fn) ((disp)->PassTexCoordATI = fn) +#define CALL_SampleMapATI(disp, parameters) (*((disp)->SampleMapATI)) parameters +#define GET_SampleMapATI(disp) ((disp)->SampleMapATI) +#define SET_SampleMapATI(disp, fn) ((disp)->SampleMapATI = fn) +#define CALL_SetFragmentShaderConstantATI(disp, parameters) (*((disp)->SetFragmentShaderConstantATI)) parameters +#define GET_SetFragmentShaderConstantATI(disp) ((disp)->SetFragmentShaderConstantATI) +#define SET_SetFragmentShaderConstantATI(disp, fn) ((disp)->SetFragmentShaderConstantATI = fn) +#define CALL_PointParameteriNV(disp, parameters) (*((disp)->PointParameteriNV)) parameters +#define GET_PointParameteriNV(disp) ((disp)->PointParameteriNV) +#define SET_PointParameteriNV(disp, fn) ((disp)->PointParameteriNV = fn) +#define CALL_PointParameterivNV(disp, parameters) (*((disp)->PointParameterivNV)) parameters +#define GET_PointParameterivNV(disp) ((disp)->PointParameterivNV) +#define SET_PointParameterivNV(disp, fn) ((disp)->PointParameterivNV = fn) +#define CALL_ActiveStencilFaceEXT(disp, parameters) (*((disp)->ActiveStencilFaceEXT)) parameters +#define GET_ActiveStencilFaceEXT(disp) ((disp)->ActiveStencilFaceEXT) +#define SET_ActiveStencilFaceEXT(disp, fn) ((disp)->ActiveStencilFaceEXT = fn) +#define CALL_BindVertexArrayAPPLE(disp, parameters) (*((disp)->BindVertexArrayAPPLE)) parameters +#define GET_BindVertexArrayAPPLE(disp) ((disp)->BindVertexArrayAPPLE) +#define SET_BindVertexArrayAPPLE(disp, fn) ((disp)->BindVertexArrayAPPLE = fn) +#define CALL_DeleteVertexArraysAPPLE(disp, parameters) (*((disp)->DeleteVertexArraysAPPLE)) parameters +#define GET_DeleteVertexArraysAPPLE(disp) ((disp)->DeleteVertexArraysAPPLE) +#define SET_DeleteVertexArraysAPPLE(disp, fn) ((disp)->DeleteVertexArraysAPPLE = fn) +#define CALL_GenVertexArraysAPPLE(disp, parameters) (*((disp)->GenVertexArraysAPPLE)) parameters +#define GET_GenVertexArraysAPPLE(disp) ((disp)->GenVertexArraysAPPLE) +#define SET_GenVertexArraysAPPLE(disp, fn) ((disp)->GenVertexArraysAPPLE = fn) +#define CALL_IsVertexArrayAPPLE(disp, parameters) (*((disp)->IsVertexArrayAPPLE)) parameters +#define GET_IsVertexArrayAPPLE(disp) ((disp)->IsVertexArrayAPPLE) +#define SET_IsVertexArrayAPPLE(disp, fn) ((disp)->IsVertexArrayAPPLE = fn) +#define CALL_GetProgramNamedParameterdvNV(disp, parameters) (*((disp)->GetProgramNamedParameterdvNV)) parameters +#define GET_GetProgramNamedParameterdvNV(disp) ((disp)->GetProgramNamedParameterdvNV) +#define SET_GetProgramNamedParameterdvNV(disp, fn) ((disp)->GetProgramNamedParameterdvNV = fn) +#define CALL_GetProgramNamedParameterfvNV(disp, parameters) (*((disp)->GetProgramNamedParameterfvNV)) parameters +#define GET_GetProgramNamedParameterfvNV(disp) ((disp)->GetProgramNamedParameterfvNV) +#define SET_GetProgramNamedParameterfvNV(disp, fn) ((disp)->GetProgramNamedParameterfvNV = fn) +#define CALL_ProgramNamedParameter4dNV(disp, parameters) (*((disp)->ProgramNamedParameter4dNV)) parameters +#define GET_ProgramNamedParameter4dNV(disp) ((disp)->ProgramNamedParameter4dNV) +#define SET_ProgramNamedParameter4dNV(disp, fn) ((disp)->ProgramNamedParameter4dNV = fn) +#define CALL_ProgramNamedParameter4dvNV(disp, parameters) (*((disp)->ProgramNamedParameter4dvNV)) parameters +#define GET_ProgramNamedParameter4dvNV(disp) ((disp)->ProgramNamedParameter4dvNV) +#define SET_ProgramNamedParameter4dvNV(disp, fn) ((disp)->ProgramNamedParameter4dvNV = fn) +#define CALL_ProgramNamedParameter4fNV(disp, parameters) (*((disp)->ProgramNamedParameter4fNV)) parameters +#define GET_ProgramNamedParameter4fNV(disp) ((disp)->ProgramNamedParameter4fNV) +#define SET_ProgramNamedParameter4fNV(disp, fn) ((disp)->ProgramNamedParameter4fNV = fn) +#define CALL_ProgramNamedParameter4fvNV(disp, parameters) (*((disp)->ProgramNamedParameter4fvNV)) parameters +#define GET_ProgramNamedParameter4fvNV(disp) ((disp)->ProgramNamedParameter4fvNV) +#define SET_ProgramNamedParameter4fvNV(disp, fn) ((disp)->ProgramNamedParameter4fvNV = fn) +#define CALL_DepthBoundsEXT(disp, parameters) (*((disp)->DepthBoundsEXT)) parameters +#define GET_DepthBoundsEXT(disp) ((disp)->DepthBoundsEXT) +#define SET_DepthBoundsEXT(disp, fn) ((disp)->DepthBoundsEXT = fn) +#define CALL_BlendEquationSeparateEXT(disp, parameters) (*((disp)->BlendEquationSeparateEXT)) parameters +#define GET_BlendEquationSeparateEXT(disp) ((disp)->BlendEquationSeparateEXT) +#define SET_BlendEquationSeparateEXT(disp, fn) ((disp)->BlendEquationSeparateEXT = fn) +#define CALL_BindFramebufferEXT(disp, parameters) (*((disp)->BindFramebufferEXT)) parameters +#define GET_BindFramebufferEXT(disp) ((disp)->BindFramebufferEXT) +#define SET_BindFramebufferEXT(disp, fn) ((disp)->BindFramebufferEXT = fn) +#define CALL_BindRenderbufferEXT(disp, parameters) (*((disp)->BindRenderbufferEXT)) parameters +#define GET_BindRenderbufferEXT(disp) ((disp)->BindRenderbufferEXT) +#define SET_BindRenderbufferEXT(disp, fn) ((disp)->BindRenderbufferEXT = fn) +#define CALL_CheckFramebufferStatusEXT(disp, parameters) (*((disp)->CheckFramebufferStatusEXT)) parameters +#define GET_CheckFramebufferStatusEXT(disp) ((disp)->CheckFramebufferStatusEXT) +#define SET_CheckFramebufferStatusEXT(disp, fn) ((disp)->CheckFramebufferStatusEXT = fn) +#define CALL_DeleteFramebuffersEXT(disp, parameters) (*((disp)->DeleteFramebuffersEXT)) parameters +#define GET_DeleteFramebuffersEXT(disp) ((disp)->DeleteFramebuffersEXT) +#define SET_DeleteFramebuffersEXT(disp, fn) ((disp)->DeleteFramebuffersEXT = fn) +#define CALL_DeleteRenderbuffersEXT(disp, parameters) (*((disp)->DeleteRenderbuffersEXT)) parameters +#define GET_DeleteRenderbuffersEXT(disp) ((disp)->DeleteRenderbuffersEXT) +#define SET_DeleteRenderbuffersEXT(disp, fn) ((disp)->DeleteRenderbuffersEXT = fn) +#define CALL_FramebufferRenderbufferEXT(disp, parameters) (*((disp)->FramebufferRenderbufferEXT)) parameters +#define GET_FramebufferRenderbufferEXT(disp) ((disp)->FramebufferRenderbufferEXT) +#define SET_FramebufferRenderbufferEXT(disp, fn) ((disp)->FramebufferRenderbufferEXT = fn) +#define CALL_FramebufferTexture1DEXT(disp, parameters) (*((disp)->FramebufferTexture1DEXT)) parameters +#define GET_FramebufferTexture1DEXT(disp) ((disp)->FramebufferTexture1DEXT) +#define SET_FramebufferTexture1DEXT(disp, fn) ((disp)->FramebufferTexture1DEXT = fn) +#define CALL_FramebufferTexture2DEXT(disp, parameters) (*((disp)->FramebufferTexture2DEXT)) parameters +#define GET_FramebufferTexture2DEXT(disp) ((disp)->FramebufferTexture2DEXT) +#define SET_FramebufferTexture2DEXT(disp, fn) ((disp)->FramebufferTexture2DEXT = fn) +#define CALL_FramebufferTexture3DEXT(disp, parameters) (*((disp)->FramebufferTexture3DEXT)) parameters +#define GET_FramebufferTexture3DEXT(disp) ((disp)->FramebufferTexture3DEXT) +#define SET_FramebufferTexture3DEXT(disp, fn) ((disp)->FramebufferTexture3DEXT = fn) +#define CALL_GenFramebuffersEXT(disp, parameters) (*((disp)->GenFramebuffersEXT)) parameters +#define GET_GenFramebuffersEXT(disp) ((disp)->GenFramebuffersEXT) +#define SET_GenFramebuffersEXT(disp, fn) ((disp)->GenFramebuffersEXT = fn) +#define CALL_GenRenderbuffersEXT(disp, parameters) (*((disp)->GenRenderbuffersEXT)) parameters +#define GET_GenRenderbuffersEXT(disp) ((disp)->GenRenderbuffersEXT) +#define SET_GenRenderbuffersEXT(disp, fn) ((disp)->GenRenderbuffersEXT = fn) +#define CALL_GenerateMipmapEXT(disp, parameters) (*((disp)->GenerateMipmapEXT)) parameters +#define GET_GenerateMipmapEXT(disp) ((disp)->GenerateMipmapEXT) +#define SET_GenerateMipmapEXT(disp, fn) ((disp)->GenerateMipmapEXT = fn) +#define CALL_GetFramebufferAttachmentParameterivEXT(disp, parameters) (*((disp)->GetFramebufferAttachmentParameterivEXT)) parameters +#define GET_GetFramebufferAttachmentParameterivEXT(disp) ((disp)->GetFramebufferAttachmentParameterivEXT) +#define SET_GetFramebufferAttachmentParameterivEXT(disp, fn) ((disp)->GetFramebufferAttachmentParameterivEXT = fn) +#define CALL_GetRenderbufferParameterivEXT(disp, parameters) (*((disp)->GetRenderbufferParameterivEXT)) parameters +#define GET_GetRenderbufferParameterivEXT(disp) ((disp)->GetRenderbufferParameterivEXT) +#define SET_GetRenderbufferParameterivEXT(disp, fn) ((disp)->GetRenderbufferParameterivEXT = fn) +#define CALL_IsFramebufferEXT(disp, parameters) (*((disp)->IsFramebufferEXT)) parameters +#define GET_IsFramebufferEXT(disp) ((disp)->IsFramebufferEXT) +#define SET_IsFramebufferEXT(disp, fn) ((disp)->IsFramebufferEXT = fn) +#define CALL_IsRenderbufferEXT(disp, parameters) (*((disp)->IsRenderbufferEXT)) parameters +#define GET_IsRenderbufferEXT(disp) ((disp)->IsRenderbufferEXT) +#define SET_IsRenderbufferEXT(disp, fn) ((disp)->IsRenderbufferEXT = fn) +#define CALL_RenderbufferStorageEXT(disp, parameters) (*((disp)->RenderbufferStorageEXT)) parameters +#define GET_RenderbufferStorageEXT(disp) ((disp)->RenderbufferStorageEXT) +#define SET_RenderbufferStorageEXT(disp, fn) ((disp)->RenderbufferStorageEXT = fn) +#define CALL_BlitFramebufferEXT(disp, parameters) (*((disp)->BlitFramebufferEXT)) parameters +#define GET_BlitFramebufferEXT(disp) ((disp)->BlitFramebufferEXT) +#define SET_BlitFramebufferEXT(disp, fn) ((disp)->BlitFramebufferEXT = fn) +#define CALL_FramebufferTextureLayerEXT(disp, parameters) (*((disp)->FramebufferTextureLayerEXT)) parameters +#define GET_FramebufferTextureLayerEXT(disp) ((disp)->FramebufferTextureLayerEXT) +#define SET_FramebufferTextureLayerEXT(disp, fn) ((disp)->FramebufferTextureLayerEXT = fn) +#define CALL_StencilFuncSeparateATI(disp, parameters) (*((disp)->StencilFuncSeparateATI)) parameters +#define GET_StencilFuncSeparateATI(disp) ((disp)->StencilFuncSeparateATI) +#define SET_StencilFuncSeparateATI(disp, fn) ((disp)->StencilFuncSeparateATI = fn) +#define CALL_ProgramEnvParameters4fvEXT(disp, parameters) (*((disp)->ProgramEnvParameters4fvEXT)) parameters +#define GET_ProgramEnvParameters4fvEXT(disp) ((disp)->ProgramEnvParameters4fvEXT) +#define SET_ProgramEnvParameters4fvEXT(disp, fn) ((disp)->ProgramEnvParameters4fvEXT = fn) +#define CALL_ProgramLocalParameters4fvEXT(disp, parameters) (*((disp)->ProgramLocalParameters4fvEXT)) parameters +#define GET_ProgramLocalParameters4fvEXT(disp) ((disp)->ProgramLocalParameters4fvEXT) +#define SET_ProgramLocalParameters4fvEXT(disp, fn) ((disp)->ProgramLocalParameters4fvEXT = fn) +#define CALL_GetQueryObjecti64vEXT(disp, parameters) (*((disp)->GetQueryObjecti64vEXT)) parameters +#define GET_GetQueryObjecti64vEXT(disp) ((disp)->GetQueryObjecti64vEXT) +#define SET_GetQueryObjecti64vEXT(disp, fn) ((disp)->GetQueryObjecti64vEXT = fn) +#define CALL_GetQueryObjectui64vEXT(disp, parameters) (*((disp)->GetQueryObjectui64vEXT)) parameters +#define GET_GetQueryObjectui64vEXT(disp) ((disp)->GetQueryObjectui64vEXT) +#define SET_GetQueryObjectui64vEXT(disp, fn) ((disp)->GetQueryObjectui64vEXT = fn) + +#else + +#define driDispatchRemapTable_size 362 +extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; + +#define AttachShader_remap_index 0 +#define CreateProgram_remap_index 1 +#define CreateShader_remap_index 2 +#define DeleteProgram_remap_index 3 +#define DeleteShader_remap_index 4 +#define DetachShader_remap_index 5 +#define GetAttachedShaders_remap_index 6 +#define GetProgramInfoLog_remap_index 7 +#define GetProgramiv_remap_index 8 +#define GetShaderInfoLog_remap_index 9 +#define GetShaderiv_remap_index 10 +#define IsProgram_remap_index 11 +#define IsShader_remap_index 12 +#define StencilFuncSeparate_remap_index 13 +#define StencilMaskSeparate_remap_index 14 +#define StencilOpSeparate_remap_index 15 +#define UniformMatrix2x3fv_remap_index 16 +#define UniformMatrix2x4fv_remap_index 17 +#define UniformMatrix3x2fv_remap_index 18 +#define UniformMatrix3x4fv_remap_index 19 +#define UniformMatrix4x2fv_remap_index 20 +#define UniformMatrix4x3fv_remap_index 21 +#define LoadTransposeMatrixdARB_remap_index 22 +#define LoadTransposeMatrixfARB_remap_index 23 +#define MultTransposeMatrixdARB_remap_index 24 +#define MultTransposeMatrixfARB_remap_index 25 +#define SampleCoverageARB_remap_index 26 +#define CompressedTexImage1DARB_remap_index 27 +#define CompressedTexImage2DARB_remap_index 28 +#define CompressedTexImage3DARB_remap_index 29 +#define CompressedTexSubImage1DARB_remap_index 30 +#define CompressedTexSubImage2DARB_remap_index 31 +#define CompressedTexSubImage3DARB_remap_index 32 +#define GetCompressedTexImageARB_remap_index 33 +#define DisableVertexAttribArrayARB_remap_index 34 +#define EnableVertexAttribArrayARB_remap_index 35 +#define GetProgramEnvParameterdvARB_remap_index 36 +#define GetProgramEnvParameterfvARB_remap_index 37 +#define GetProgramLocalParameterdvARB_remap_index 38 +#define GetProgramLocalParameterfvARB_remap_index 39 +#define GetProgramStringARB_remap_index 40 +#define GetProgramivARB_remap_index 41 +#define GetVertexAttribdvARB_remap_index 42 +#define GetVertexAttribfvARB_remap_index 43 +#define GetVertexAttribivARB_remap_index 44 +#define ProgramEnvParameter4dARB_remap_index 45 +#define ProgramEnvParameter4dvARB_remap_index 46 +#define ProgramEnvParameter4fARB_remap_index 47 +#define ProgramEnvParameter4fvARB_remap_index 48 +#define ProgramLocalParameter4dARB_remap_index 49 +#define ProgramLocalParameter4dvARB_remap_index 50 +#define ProgramLocalParameter4fARB_remap_index 51 +#define ProgramLocalParameter4fvARB_remap_index 52 +#define ProgramStringARB_remap_index 53 +#define VertexAttrib1dARB_remap_index 54 +#define VertexAttrib1dvARB_remap_index 55 +#define VertexAttrib1fARB_remap_index 56 +#define VertexAttrib1fvARB_remap_index 57 +#define VertexAttrib1sARB_remap_index 58 +#define VertexAttrib1svARB_remap_index 59 +#define VertexAttrib2dARB_remap_index 60 +#define VertexAttrib2dvARB_remap_index 61 +#define VertexAttrib2fARB_remap_index 62 +#define VertexAttrib2fvARB_remap_index 63 +#define VertexAttrib2sARB_remap_index 64 +#define VertexAttrib2svARB_remap_index 65 +#define VertexAttrib3dARB_remap_index 66 +#define VertexAttrib3dvARB_remap_index 67 +#define VertexAttrib3fARB_remap_index 68 +#define VertexAttrib3fvARB_remap_index 69 +#define VertexAttrib3sARB_remap_index 70 +#define VertexAttrib3svARB_remap_index 71 +#define VertexAttrib4NbvARB_remap_index 72 +#define VertexAttrib4NivARB_remap_index 73 +#define VertexAttrib4NsvARB_remap_index 74 +#define VertexAttrib4NubARB_remap_index 75 +#define VertexAttrib4NubvARB_remap_index 76 +#define VertexAttrib4NuivARB_remap_index 77 +#define VertexAttrib4NusvARB_remap_index 78 +#define VertexAttrib4bvARB_remap_index 79 +#define VertexAttrib4dARB_remap_index 80 +#define VertexAttrib4dvARB_remap_index 81 +#define VertexAttrib4fARB_remap_index 82 +#define VertexAttrib4fvARB_remap_index 83 +#define VertexAttrib4ivARB_remap_index 84 +#define VertexAttrib4sARB_remap_index 85 +#define VertexAttrib4svARB_remap_index 86 +#define VertexAttrib4ubvARB_remap_index 87 +#define VertexAttrib4uivARB_remap_index 88 +#define VertexAttrib4usvARB_remap_index 89 +#define VertexAttribPointerARB_remap_index 90 +#define BindBufferARB_remap_index 91 +#define BufferDataARB_remap_index 92 +#define BufferSubDataARB_remap_index 93 +#define DeleteBuffersARB_remap_index 94 +#define GenBuffersARB_remap_index 95 +#define GetBufferParameterivARB_remap_index 96 +#define GetBufferPointervARB_remap_index 97 +#define GetBufferSubDataARB_remap_index 98 +#define IsBufferARB_remap_index 99 +#define MapBufferARB_remap_index 100 +#define UnmapBufferARB_remap_index 101 +#define BeginQueryARB_remap_index 102 +#define DeleteQueriesARB_remap_index 103 +#define EndQueryARB_remap_index 104 +#define GenQueriesARB_remap_index 105 +#define GetQueryObjectivARB_remap_index 106 +#define GetQueryObjectuivARB_remap_index 107 +#define GetQueryivARB_remap_index 108 +#define IsQueryARB_remap_index 109 +#define AttachObjectARB_remap_index 110 +#define CompileShaderARB_remap_index 111 +#define CreateProgramObjectARB_remap_index 112 +#define CreateShaderObjectARB_remap_index 113 +#define DeleteObjectARB_remap_index 114 +#define DetachObjectARB_remap_index 115 +#define GetActiveUniformARB_remap_index 116 +#define GetAttachedObjectsARB_remap_index 117 +#define GetHandleARB_remap_index 118 +#define GetInfoLogARB_remap_index 119 +#define GetObjectParameterfvARB_remap_index 120 +#define GetObjectParameterivARB_remap_index 121 +#define GetShaderSourceARB_remap_index 122 +#define GetUniformLocationARB_remap_index 123 +#define GetUniformfvARB_remap_index 124 +#define GetUniformivARB_remap_index 125 +#define LinkProgramARB_remap_index 126 +#define ShaderSourceARB_remap_index 127 +#define Uniform1fARB_remap_index 128 +#define Uniform1fvARB_remap_index 129 +#define Uniform1iARB_remap_index 130 +#define Uniform1ivARB_remap_index 131 +#define Uniform2fARB_remap_index 132 +#define Uniform2fvARB_remap_index 133 +#define Uniform2iARB_remap_index 134 +#define Uniform2ivARB_remap_index 135 +#define Uniform3fARB_remap_index 136 +#define Uniform3fvARB_remap_index 137 +#define Uniform3iARB_remap_index 138 +#define Uniform3ivARB_remap_index 139 +#define Uniform4fARB_remap_index 140 +#define Uniform4fvARB_remap_index 141 +#define Uniform4iARB_remap_index 142 +#define Uniform4ivARB_remap_index 143 +#define UniformMatrix2fvARB_remap_index 144 +#define UniformMatrix3fvARB_remap_index 145 +#define UniformMatrix4fvARB_remap_index 146 +#define UseProgramObjectARB_remap_index 147 +#define ValidateProgramARB_remap_index 148 +#define BindAttribLocationARB_remap_index 149 +#define GetActiveAttribARB_remap_index 150 +#define GetAttribLocationARB_remap_index 151 +#define DrawBuffersARB_remap_index 152 +#define PolygonOffsetEXT_remap_index 153 +#define GetPixelTexGenParameterfvSGIS_remap_index 154 +#define GetPixelTexGenParameterivSGIS_remap_index 155 +#define PixelTexGenParameterfSGIS_remap_index 156 +#define PixelTexGenParameterfvSGIS_remap_index 157 +#define PixelTexGenParameteriSGIS_remap_index 158 +#define PixelTexGenParameterivSGIS_remap_index 159 +#define SampleMaskSGIS_remap_index 160 +#define SamplePatternSGIS_remap_index 161 +#define ColorPointerEXT_remap_index 162 +#define EdgeFlagPointerEXT_remap_index 163 +#define IndexPointerEXT_remap_index 164 +#define NormalPointerEXT_remap_index 165 +#define TexCoordPointerEXT_remap_index 166 +#define VertexPointerEXT_remap_index 167 +#define PointParameterfEXT_remap_index 168 +#define PointParameterfvEXT_remap_index 169 +#define LockArraysEXT_remap_index 170 +#define UnlockArraysEXT_remap_index 171 +#define CullParameterdvEXT_remap_index 172 +#define CullParameterfvEXT_remap_index 173 +#define SecondaryColor3bEXT_remap_index 174 +#define SecondaryColor3bvEXT_remap_index 175 +#define SecondaryColor3dEXT_remap_index 176 +#define SecondaryColor3dvEXT_remap_index 177 +#define SecondaryColor3fEXT_remap_index 178 +#define SecondaryColor3fvEXT_remap_index 179 +#define SecondaryColor3iEXT_remap_index 180 +#define SecondaryColor3ivEXT_remap_index 181 +#define SecondaryColor3sEXT_remap_index 182 +#define SecondaryColor3svEXT_remap_index 183 +#define SecondaryColor3ubEXT_remap_index 184 +#define SecondaryColor3ubvEXT_remap_index 185 +#define SecondaryColor3uiEXT_remap_index 186 +#define SecondaryColor3uivEXT_remap_index 187 +#define SecondaryColor3usEXT_remap_index 188 +#define SecondaryColor3usvEXT_remap_index 189 +#define SecondaryColorPointerEXT_remap_index 190 +#define MultiDrawArraysEXT_remap_index 191 +#define MultiDrawElementsEXT_remap_index 192 +#define FogCoordPointerEXT_remap_index 193 +#define FogCoorddEXT_remap_index 194 +#define FogCoorddvEXT_remap_index 195 +#define FogCoordfEXT_remap_index 196 +#define FogCoordfvEXT_remap_index 197 +#define PixelTexGenSGIX_remap_index 198 +#define BlendFuncSeparateEXT_remap_index 199 +#define FlushVertexArrayRangeNV_remap_index 200 +#define VertexArrayRangeNV_remap_index 201 +#define CombinerInputNV_remap_index 202 +#define CombinerOutputNV_remap_index 203 +#define CombinerParameterfNV_remap_index 204 +#define CombinerParameterfvNV_remap_index 205 +#define CombinerParameteriNV_remap_index 206 +#define CombinerParameterivNV_remap_index 207 +#define FinalCombinerInputNV_remap_index 208 +#define GetCombinerInputParameterfvNV_remap_index 209 +#define GetCombinerInputParameterivNV_remap_index 210 +#define GetCombinerOutputParameterfvNV_remap_index 211 +#define GetCombinerOutputParameterivNV_remap_index 212 +#define GetFinalCombinerInputParameterfvNV_remap_index 213 +#define GetFinalCombinerInputParameterivNV_remap_index 214 +#define ResizeBuffersMESA_remap_index 215 +#define WindowPos2dMESA_remap_index 216 +#define WindowPos2dvMESA_remap_index 217 +#define WindowPos2fMESA_remap_index 218 +#define WindowPos2fvMESA_remap_index 219 +#define WindowPos2iMESA_remap_index 220 +#define WindowPos2ivMESA_remap_index 221 +#define WindowPos2sMESA_remap_index 222 +#define WindowPos2svMESA_remap_index 223 +#define WindowPos3dMESA_remap_index 224 +#define WindowPos3dvMESA_remap_index 225 +#define WindowPos3fMESA_remap_index 226 +#define WindowPos3fvMESA_remap_index 227 +#define WindowPos3iMESA_remap_index 228 +#define WindowPos3ivMESA_remap_index 229 +#define WindowPos3sMESA_remap_index 230 +#define WindowPos3svMESA_remap_index 231 +#define WindowPos4dMESA_remap_index 232 +#define WindowPos4dvMESA_remap_index 233 +#define WindowPos4fMESA_remap_index 234 +#define WindowPos4fvMESA_remap_index 235 +#define WindowPos4iMESA_remap_index 236 +#define WindowPos4ivMESA_remap_index 237 +#define WindowPos4sMESA_remap_index 238 +#define WindowPos4svMESA_remap_index 239 +#define MultiModeDrawArraysIBM_remap_index 240 +#define MultiModeDrawElementsIBM_remap_index 241 +#define DeleteFencesNV_remap_index 242 +#define FinishFenceNV_remap_index 243 +#define GenFencesNV_remap_index 244 +#define GetFenceivNV_remap_index 245 +#define IsFenceNV_remap_index 246 +#define SetFenceNV_remap_index 247 +#define TestFenceNV_remap_index 248 +#define AreProgramsResidentNV_remap_index 249 +#define BindProgramNV_remap_index 250 +#define DeleteProgramsNV_remap_index 251 +#define ExecuteProgramNV_remap_index 252 +#define GenProgramsNV_remap_index 253 +#define GetProgramParameterdvNV_remap_index 254 +#define GetProgramParameterfvNV_remap_index 255 +#define GetProgramStringNV_remap_index 256 +#define GetProgramivNV_remap_index 257 +#define GetTrackMatrixivNV_remap_index 258 +#define GetVertexAttribPointervNV_remap_index 259 +#define GetVertexAttribdvNV_remap_index 260 +#define GetVertexAttribfvNV_remap_index 261 +#define GetVertexAttribivNV_remap_index 262 +#define IsProgramNV_remap_index 263 +#define LoadProgramNV_remap_index 264 +#define ProgramParameters4dvNV_remap_index 265 +#define ProgramParameters4fvNV_remap_index 266 +#define RequestResidentProgramsNV_remap_index 267 +#define TrackMatrixNV_remap_index 268 +#define VertexAttrib1dNV_remap_index 269 +#define VertexAttrib1dvNV_remap_index 270 +#define VertexAttrib1fNV_remap_index 271 +#define VertexAttrib1fvNV_remap_index 272 +#define VertexAttrib1sNV_remap_index 273 +#define VertexAttrib1svNV_remap_index 274 +#define VertexAttrib2dNV_remap_index 275 +#define VertexAttrib2dvNV_remap_index 276 +#define VertexAttrib2fNV_remap_index 277 +#define VertexAttrib2fvNV_remap_index 278 +#define VertexAttrib2sNV_remap_index 279 +#define VertexAttrib2svNV_remap_index 280 +#define VertexAttrib3dNV_remap_index 281 +#define VertexAttrib3dvNV_remap_index 282 +#define VertexAttrib3fNV_remap_index 283 +#define VertexAttrib3fvNV_remap_index 284 +#define VertexAttrib3sNV_remap_index 285 +#define VertexAttrib3svNV_remap_index 286 +#define VertexAttrib4dNV_remap_index 287 +#define VertexAttrib4dvNV_remap_index 288 +#define VertexAttrib4fNV_remap_index 289 +#define VertexAttrib4fvNV_remap_index 290 +#define VertexAttrib4sNV_remap_index 291 +#define VertexAttrib4svNV_remap_index 292 +#define VertexAttrib4ubNV_remap_index 293 +#define VertexAttrib4ubvNV_remap_index 294 +#define VertexAttribPointerNV_remap_index 295 +#define VertexAttribs1dvNV_remap_index 296 +#define VertexAttribs1fvNV_remap_index 297 +#define VertexAttribs1svNV_remap_index 298 +#define VertexAttribs2dvNV_remap_index 299 +#define VertexAttribs2fvNV_remap_index 300 +#define VertexAttribs2svNV_remap_index 301 +#define VertexAttribs3dvNV_remap_index 302 +#define VertexAttribs3fvNV_remap_index 303 +#define VertexAttribs3svNV_remap_index 304 +#define VertexAttribs4dvNV_remap_index 305 +#define VertexAttribs4fvNV_remap_index 306 +#define VertexAttribs4svNV_remap_index 307 +#define VertexAttribs4ubvNV_remap_index 308 +#define AlphaFragmentOp1ATI_remap_index 309 +#define AlphaFragmentOp2ATI_remap_index 310 +#define AlphaFragmentOp3ATI_remap_index 311 +#define BeginFragmentShaderATI_remap_index 312 +#define BindFragmentShaderATI_remap_index 313 +#define ColorFragmentOp1ATI_remap_index 314 +#define ColorFragmentOp2ATI_remap_index 315 +#define ColorFragmentOp3ATI_remap_index 316 +#define DeleteFragmentShaderATI_remap_index 317 +#define EndFragmentShaderATI_remap_index 318 +#define GenFragmentShadersATI_remap_index 319 +#define PassTexCoordATI_remap_index 320 +#define SampleMapATI_remap_index 321 +#define SetFragmentShaderConstantATI_remap_index 322 +#define PointParameteriNV_remap_index 323 +#define PointParameterivNV_remap_index 324 +#define ActiveStencilFaceEXT_remap_index 325 +#define BindVertexArrayAPPLE_remap_index 326 +#define DeleteVertexArraysAPPLE_remap_index 327 +#define GenVertexArraysAPPLE_remap_index 328 +#define IsVertexArrayAPPLE_remap_index 329 +#define GetProgramNamedParameterdvNV_remap_index 330 +#define GetProgramNamedParameterfvNV_remap_index 331 +#define ProgramNamedParameter4dNV_remap_index 332 +#define ProgramNamedParameter4dvNV_remap_index 333 +#define ProgramNamedParameter4fNV_remap_index 334 +#define ProgramNamedParameter4fvNV_remap_index 335 +#define DepthBoundsEXT_remap_index 336 +#define BlendEquationSeparateEXT_remap_index 337 +#define BindFramebufferEXT_remap_index 338 +#define BindRenderbufferEXT_remap_index 339 +#define CheckFramebufferStatusEXT_remap_index 340 +#define DeleteFramebuffersEXT_remap_index 341 +#define DeleteRenderbuffersEXT_remap_index 342 +#define FramebufferRenderbufferEXT_remap_index 343 +#define FramebufferTexture1DEXT_remap_index 344 +#define FramebufferTexture2DEXT_remap_index 345 +#define FramebufferTexture3DEXT_remap_index 346 +#define GenFramebuffersEXT_remap_index 347 +#define GenRenderbuffersEXT_remap_index 348 +#define GenerateMipmapEXT_remap_index 349 +#define GetFramebufferAttachmentParameterivEXT_remap_index 350 +#define GetRenderbufferParameterivEXT_remap_index 351 +#define IsFramebufferEXT_remap_index 352 +#define IsRenderbufferEXT_remap_index 353 +#define RenderbufferStorageEXT_remap_index 354 +#define BlitFramebufferEXT_remap_index 355 +#define FramebufferTextureLayerEXT_remap_index 356 +#define StencilFuncSeparateATI_remap_index 357 +#define ProgramEnvParameters4fvEXT_remap_index 358 +#define ProgramLocalParameters4fvEXT_remap_index 359 +#define GetQueryObjecti64vEXT_remap_index 360 +#define GetQueryObjectui64vEXT_remap_index 361 + +#define CALL_AttachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), driDispatchRemapTable[AttachShader_remap_index], parameters) +#define GET_AttachShader(disp) GET_by_offset(disp, driDispatchRemapTable[AttachShader_remap_index]) +#define SET_AttachShader(disp, fn) SET_by_offset(disp, driDispatchRemapTable[AttachShader_remap_index], fn) +#define CALL_CreateProgram(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(void)), driDispatchRemapTable[CreateProgram_remap_index], parameters) +#define GET_CreateProgram(disp) GET_by_offset(disp, driDispatchRemapTable[CreateProgram_remap_index]) +#define SET_CreateProgram(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CreateProgram_remap_index], fn) +#define CALL_CreateShader(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[CreateShader_remap_index], parameters) +#define GET_CreateShader(disp) GET_by_offset(disp, driDispatchRemapTable[CreateShader_remap_index]) +#define SET_CreateShader(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CreateShader_remap_index], fn) +#define CALL_DeleteProgram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[DeleteProgram_remap_index], parameters) +#define GET_DeleteProgram(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteProgram_remap_index]) +#define SET_DeleteProgram(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteProgram_remap_index], fn) +#define CALL_DeleteShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[DeleteShader_remap_index], parameters) +#define GET_DeleteShader(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteShader_remap_index]) +#define SET_DeleteShader(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteShader_remap_index], fn) +#define CALL_DetachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), driDispatchRemapTable[DetachShader_remap_index], parameters) +#define GET_DetachShader(disp) GET_by_offset(disp, driDispatchRemapTable[DetachShader_remap_index]) +#define SET_DetachShader(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DetachShader_remap_index], fn) +#define CALL_GetAttachedShaders(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLuint *)), driDispatchRemapTable[GetAttachedShaders_remap_index], parameters) +#define GET_GetAttachedShaders(disp) GET_by_offset(disp, driDispatchRemapTable[GetAttachedShaders_remap_index]) +#define SET_GetAttachedShaders(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetAttachedShaders_remap_index], fn) +#define CALL_GetProgramInfoLog(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLchar *)), driDispatchRemapTable[GetProgramInfoLog_remap_index], parameters) +#define GET_GetProgramInfoLog(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramInfoLog_remap_index]) +#define SET_GetProgramInfoLog(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramInfoLog_remap_index], fn) +#define CALL_GetProgramiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), driDispatchRemapTable[GetProgramiv_remap_index], parameters) +#define GET_GetProgramiv(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramiv_remap_index]) +#define SET_GetProgramiv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramiv_remap_index], fn) +#define CALL_GetShaderInfoLog(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLchar *)), driDispatchRemapTable[GetShaderInfoLog_remap_index], parameters) +#define GET_GetShaderInfoLog(disp) GET_by_offset(disp, driDispatchRemapTable[GetShaderInfoLog_remap_index]) +#define SET_GetShaderInfoLog(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetShaderInfoLog_remap_index], fn) +#define CALL_GetShaderiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), driDispatchRemapTable[GetShaderiv_remap_index], parameters) +#define GET_GetShaderiv(disp) GET_by_offset(disp, driDispatchRemapTable[GetShaderiv_remap_index]) +#define SET_GetShaderiv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetShaderiv_remap_index], fn) +#define CALL_IsProgram(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[IsProgram_remap_index], parameters) +#define GET_IsProgram(disp) GET_by_offset(disp, driDispatchRemapTable[IsProgram_remap_index]) +#define SET_IsProgram(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsProgram_remap_index], fn) +#define CALL_IsShader(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[IsShader_remap_index], parameters) +#define GET_IsShader(disp) GET_by_offset(disp, driDispatchRemapTable[IsShader_remap_index]) +#define SET_IsShader(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsShader_remap_index], fn) +#define CALL_StencilFuncSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), driDispatchRemapTable[StencilFuncSeparate_remap_index], parameters) +#define GET_StencilFuncSeparate(disp) GET_by_offset(disp, driDispatchRemapTable[StencilFuncSeparate_remap_index]) +#define SET_StencilFuncSeparate(disp, fn) SET_by_offset(disp, driDispatchRemapTable[StencilFuncSeparate_remap_index], fn) +#define CALL_StencilMaskSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), driDispatchRemapTable[StencilMaskSeparate_remap_index], parameters) +#define GET_StencilMaskSeparate(disp) GET_by_offset(disp, driDispatchRemapTable[StencilMaskSeparate_remap_index]) +#define SET_StencilMaskSeparate(disp, fn) SET_by_offset(disp, driDispatchRemapTable[StencilMaskSeparate_remap_index], fn) +#define CALL_StencilOpSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), driDispatchRemapTable[StencilOpSeparate_remap_index], parameters) +#define GET_StencilOpSeparate(disp) GET_by_offset(disp, driDispatchRemapTable[StencilOpSeparate_remap_index]) +#define SET_StencilOpSeparate(disp, fn) SET_by_offset(disp, driDispatchRemapTable[StencilOpSeparate_remap_index], fn) +#define CALL_UniformMatrix2x3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix2x3fv_remap_index], parameters) +#define GET_UniformMatrix2x3fv(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix2x3fv_remap_index]) +#define SET_UniformMatrix2x3fv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix2x3fv_remap_index], fn) +#define CALL_UniformMatrix2x4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix2x4fv_remap_index], parameters) +#define GET_UniformMatrix2x4fv(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix2x4fv_remap_index]) +#define SET_UniformMatrix2x4fv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix2x4fv_remap_index], fn) +#define CALL_UniformMatrix3x2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix3x2fv_remap_index], parameters) +#define GET_UniformMatrix3x2fv(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix3x2fv_remap_index]) +#define SET_UniformMatrix3x2fv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix3x2fv_remap_index], fn) +#define CALL_UniformMatrix3x4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix3x4fv_remap_index], parameters) +#define GET_UniformMatrix3x4fv(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix3x4fv_remap_index]) +#define SET_UniformMatrix3x4fv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix3x4fv_remap_index], fn) +#define CALL_UniformMatrix4x2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix4x2fv_remap_index], parameters) +#define GET_UniformMatrix4x2fv(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix4x2fv_remap_index]) +#define SET_UniformMatrix4x2fv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix4x2fv_remap_index], fn) +#define CALL_UniformMatrix4x3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix4x3fv_remap_index], parameters) +#define GET_UniformMatrix4x3fv(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix4x3fv_remap_index]) +#define SET_UniformMatrix4x3fv(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix4x3fv_remap_index], fn) +#define CALL_LoadTransposeMatrixdARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), driDispatchRemapTable[LoadTransposeMatrixdARB_remap_index], parameters) +#define GET_LoadTransposeMatrixdARB(disp) GET_by_offset(disp, driDispatchRemapTable[LoadTransposeMatrixdARB_remap_index]) +#define SET_LoadTransposeMatrixdARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[LoadTransposeMatrixdARB_remap_index], fn) +#define CALL_LoadTransposeMatrixfARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), driDispatchRemapTable[LoadTransposeMatrixfARB_remap_index], parameters) +#define GET_LoadTransposeMatrixfARB(disp) GET_by_offset(disp, driDispatchRemapTable[LoadTransposeMatrixfARB_remap_index]) +#define SET_LoadTransposeMatrixfARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[LoadTransposeMatrixfARB_remap_index], fn) +#define CALL_MultTransposeMatrixdARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), driDispatchRemapTable[MultTransposeMatrixdARB_remap_index], parameters) +#define GET_MultTransposeMatrixdARB(disp) GET_by_offset(disp, driDispatchRemapTable[MultTransposeMatrixdARB_remap_index]) +#define SET_MultTransposeMatrixdARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[MultTransposeMatrixdARB_remap_index], fn) +#define CALL_MultTransposeMatrixfARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), driDispatchRemapTable[MultTransposeMatrixfARB_remap_index], parameters) +#define GET_MultTransposeMatrixfARB(disp) GET_by_offset(disp, driDispatchRemapTable[MultTransposeMatrixfARB_remap_index]) +#define SET_MultTransposeMatrixfARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[MultTransposeMatrixfARB_remap_index], fn) +#define CALL_SampleCoverageARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLboolean)), driDispatchRemapTable[SampleCoverageARB_remap_index], parameters) +#define GET_SampleCoverageARB(disp) GET_by_offset(disp, driDispatchRemapTable[SampleCoverageARB_remap_index]) +#define SET_SampleCoverageARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SampleCoverageARB_remap_index], fn) +#define CALL_CompressedTexImage1DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *)), driDispatchRemapTable[CompressedTexImage1DARB_remap_index], parameters) +#define GET_CompressedTexImage1DARB(disp) GET_by_offset(disp, driDispatchRemapTable[CompressedTexImage1DARB_remap_index]) +#define SET_CompressedTexImage1DARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CompressedTexImage1DARB_remap_index], fn) +#define CALL_CompressedTexImage2DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)), driDispatchRemapTable[CompressedTexImage2DARB_remap_index], parameters) +#define GET_CompressedTexImage2DARB(disp) GET_by_offset(disp, driDispatchRemapTable[CompressedTexImage2DARB_remap_index]) +#define SET_CompressedTexImage2DARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CompressedTexImage2DARB_remap_index], fn) +#define CALL_CompressedTexImage3DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)), driDispatchRemapTable[CompressedTexImage3DARB_remap_index], parameters) +#define GET_CompressedTexImage3DARB(disp) GET_by_offset(disp, driDispatchRemapTable[CompressedTexImage3DARB_remap_index]) +#define SET_CompressedTexImage3DARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CompressedTexImage3DARB_remap_index], fn) +#define CALL_CompressedTexSubImage1DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *)), driDispatchRemapTable[CompressedTexSubImage1DARB_remap_index], parameters) +#define GET_CompressedTexSubImage1DARB(disp) GET_by_offset(disp, driDispatchRemapTable[CompressedTexSubImage1DARB_remap_index]) +#define SET_CompressedTexSubImage1DARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CompressedTexSubImage1DARB_remap_index], fn) +#define CALL_CompressedTexSubImage2DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)), driDispatchRemapTable[CompressedTexSubImage2DARB_remap_index], parameters) +#define GET_CompressedTexSubImage2DARB(disp) GET_by_offset(disp, driDispatchRemapTable[CompressedTexSubImage2DARB_remap_index]) +#define SET_CompressedTexSubImage2DARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CompressedTexSubImage2DARB_remap_index], fn) +#define CALL_CompressedTexSubImage3DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)), driDispatchRemapTable[CompressedTexSubImage3DARB_remap_index], parameters) +#define GET_CompressedTexSubImage3DARB(disp) GET_by_offset(disp, driDispatchRemapTable[CompressedTexSubImage3DARB_remap_index]) +#define SET_CompressedTexSubImage3DARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CompressedTexSubImage3DARB_remap_index], fn) +#define CALL_GetCompressedTexImageARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLvoid *)), driDispatchRemapTable[GetCompressedTexImageARB_remap_index], parameters) +#define GET_GetCompressedTexImageARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetCompressedTexImageARB_remap_index]) +#define SET_GetCompressedTexImageARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetCompressedTexImageARB_remap_index], fn) +#define CALL_DisableVertexAttribArrayARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[DisableVertexAttribArrayARB_remap_index], parameters) +#define GET_DisableVertexAttribArrayARB(disp) GET_by_offset(disp, driDispatchRemapTable[DisableVertexAttribArrayARB_remap_index]) +#define SET_DisableVertexAttribArrayARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DisableVertexAttribArrayARB_remap_index], fn) +#define CALL_EnableVertexAttribArrayARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[EnableVertexAttribArrayARB_remap_index], parameters) +#define GET_EnableVertexAttribArrayARB(disp) GET_by_offset(disp, driDispatchRemapTable[EnableVertexAttribArrayARB_remap_index]) +#define SET_EnableVertexAttribArrayARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[EnableVertexAttribArrayARB_remap_index], fn) +#define CALL_GetProgramEnvParameterdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble *)), driDispatchRemapTable[GetProgramEnvParameterdvARB_remap_index], parameters) +#define GET_GetProgramEnvParameterdvARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramEnvParameterdvARB_remap_index]) +#define SET_GetProgramEnvParameterdvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramEnvParameterdvARB_remap_index], fn) +#define CALL_GetProgramEnvParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat *)), driDispatchRemapTable[GetProgramEnvParameterfvARB_remap_index], parameters) +#define GET_GetProgramEnvParameterfvARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramEnvParameterfvARB_remap_index]) +#define SET_GetProgramEnvParameterfvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramEnvParameterfvARB_remap_index], fn) +#define CALL_GetProgramLocalParameterdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble *)), driDispatchRemapTable[GetProgramLocalParameterdvARB_remap_index], parameters) +#define GET_GetProgramLocalParameterdvARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramLocalParameterdvARB_remap_index]) +#define SET_GetProgramLocalParameterdvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramLocalParameterdvARB_remap_index], fn) +#define CALL_GetProgramLocalParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat *)), driDispatchRemapTable[GetProgramLocalParameterfvARB_remap_index], parameters) +#define GET_GetProgramLocalParameterfvARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramLocalParameterfvARB_remap_index]) +#define SET_GetProgramLocalParameterfvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramLocalParameterfvARB_remap_index], fn) +#define CALL_GetProgramStringARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid *)), driDispatchRemapTable[GetProgramStringARB_remap_index], parameters) +#define GET_GetProgramStringARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramStringARB_remap_index]) +#define SET_GetProgramStringARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramStringARB_remap_index], fn) +#define CALL_GetProgramivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), driDispatchRemapTable[GetProgramivARB_remap_index], parameters) +#define GET_GetProgramivARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramivARB_remap_index]) +#define SET_GetProgramivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramivARB_remap_index], fn) +#define CALL_GetVertexAttribdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLdouble *)), driDispatchRemapTable[GetVertexAttribdvARB_remap_index], parameters) +#define GET_GetVertexAttribdvARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetVertexAttribdvARB_remap_index]) +#define SET_GetVertexAttribdvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetVertexAttribdvARB_remap_index], fn) +#define CALL_GetVertexAttribfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLfloat *)), driDispatchRemapTable[GetVertexAttribfvARB_remap_index], parameters) +#define GET_GetVertexAttribfvARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetVertexAttribfvARB_remap_index]) +#define SET_GetVertexAttribfvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetVertexAttribfvARB_remap_index], fn) +#define CALL_GetVertexAttribivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), driDispatchRemapTable[GetVertexAttribivARB_remap_index], parameters) +#define GET_GetVertexAttribivARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetVertexAttribivARB_remap_index]) +#define SET_GetVertexAttribivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetVertexAttribivARB_remap_index], fn) +#define CALL_ProgramEnvParameter4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), driDispatchRemapTable[ProgramEnvParameter4dARB_remap_index], parameters) +#define GET_ProgramEnvParameter4dARB(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameter4dARB_remap_index]) +#define SET_ProgramEnvParameter4dARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameter4dARB_remap_index], fn) +#define CALL_ProgramEnvParameter4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLdouble *)), driDispatchRemapTable[ProgramEnvParameter4dvARB_remap_index], parameters) +#define GET_ProgramEnvParameter4dvARB(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameter4dvARB_remap_index]) +#define SET_ProgramEnvParameter4dvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameter4dvARB_remap_index], fn) +#define CALL_ProgramEnvParameter4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[ProgramEnvParameter4fARB_remap_index], parameters) +#define GET_ProgramEnvParameter4fARB(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameter4fARB_remap_index]) +#define SET_ProgramEnvParameter4fARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameter4fARB_remap_index], fn) +#define CALL_ProgramEnvParameter4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), driDispatchRemapTable[ProgramEnvParameter4fvARB_remap_index], parameters) +#define GET_ProgramEnvParameter4fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameter4fvARB_remap_index]) +#define SET_ProgramEnvParameter4fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameter4fvARB_remap_index], fn) +#define CALL_ProgramLocalParameter4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), driDispatchRemapTable[ProgramLocalParameter4dARB_remap_index], parameters) +#define GET_ProgramLocalParameter4dARB(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramLocalParameter4dARB_remap_index]) +#define SET_ProgramLocalParameter4dARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramLocalParameter4dARB_remap_index], fn) +#define CALL_ProgramLocalParameter4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLdouble *)), driDispatchRemapTable[ProgramLocalParameter4dvARB_remap_index], parameters) +#define GET_ProgramLocalParameter4dvARB(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramLocalParameter4dvARB_remap_index]) +#define SET_ProgramLocalParameter4dvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramLocalParameter4dvARB_remap_index], fn) +#define CALL_ProgramLocalParameter4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[ProgramLocalParameter4fARB_remap_index], parameters) +#define GET_ProgramLocalParameter4fARB(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramLocalParameter4fARB_remap_index]) +#define SET_ProgramLocalParameter4fARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramLocalParameter4fARB_remap_index], fn) +#define CALL_ProgramLocalParameter4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), driDispatchRemapTable[ProgramLocalParameter4fvARB_remap_index], parameters) +#define GET_ProgramLocalParameter4fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramLocalParameter4fvARB_remap_index]) +#define SET_ProgramLocalParameter4fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramLocalParameter4fvARB_remap_index], fn) +#define CALL_ProgramStringARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, const GLvoid *)), driDispatchRemapTable[ProgramStringARB_remap_index], parameters) +#define GET_ProgramStringARB(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramStringARB_remap_index]) +#define SET_ProgramStringARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramStringARB_remap_index], fn) +#define CALL_VertexAttrib1dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble)), driDispatchRemapTable[VertexAttrib1dARB_remap_index], parameters) +#define GET_VertexAttrib1dARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1dARB_remap_index]) +#define SET_VertexAttrib1dARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1dARB_remap_index], fn) +#define CALL_VertexAttrib1dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), driDispatchRemapTable[VertexAttrib1dvARB_remap_index], parameters) +#define GET_VertexAttrib1dvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1dvARB_remap_index]) +#define SET_VertexAttrib1dvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1dvARB_remap_index], fn) +#define CALL_VertexAttrib1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat)), driDispatchRemapTable[VertexAttrib1fARB_remap_index], parameters) +#define GET_VertexAttrib1fARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1fARB_remap_index]) +#define SET_VertexAttrib1fARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1fARB_remap_index], fn) +#define CALL_VertexAttrib1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), driDispatchRemapTable[VertexAttrib1fvARB_remap_index], parameters) +#define GET_VertexAttrib1fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1fvARB_remap_index]) +#define SET_VertexAttrib1fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1fvARB_remap_index], fn) +#define CALL_VertexAttrib1sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort)), driDispatchRemapTable[VertexAttrib1sARB_remap_index], parameters) +#define GET_VertexAttrib1sARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1sARB_remap_index]) +#define SET_VertexAttrib1sARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1sARB_remap_index], fn) +#define CALL_VertexAttrib1svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), driDispatchRemapTable[VertexAttrib1svARB_remap_index], parameters) +#define GET_VertexAttrib1svARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1svARB_remap_index]) +#define SET_VertexAttrib1svARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1svARB_remap_index], fn) +#define CALL_VertexAttrib2dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble)), driDispatchRemapTable[VertexAttrib2dARB_remap_index], parameters) +#define GET_VertexAttrib2dARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2dARB_remap_index]) +#define SET_VertexAttrib2dARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2dARB_remap_index], fn) +#define CALL_VertexAttrib2dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), driDispatchRemapTable[VertexAttrib2dvARB_remap_index], parameters) +#define GET_VertexAttrib2dvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2dvARB_remap_index]) +#define SET_VertexAttrib2dvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2dvARB_remap_index], fn) +#define CALL_VertexAttrib2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat)), driDispatchRemapTable[VertexAttrib2fARB_remap_index], parameters) +#define GET_VertexAttrib2fARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2fARB_remap_index]) +#define SET_VertexAttrib2fARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2fARB_remap_index], fn) +#define CALL_VertexAttrib2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), driDispatchRemapTable[VertexAttrib2fvARB_remap_index], parameters) +#define GET_VertexAttrib2fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2fvARB_remap_index]) +#define SET_VertexAttrib2fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2fvARB_remap_index], fn) +#define CALL_VertexAttrib2sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort)), driDispatchRemapTable[VertexAttrib2sARB_remap_index], parameters) +#define GET_VertexAttrib2sARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2sARB_remap_index]) +#define SET_VertexAttrib2sARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2sARB_remap_index], fn) +#define CALL_VertexAttrib2svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), driDispatchRemapTable[VertexAttrib2svARB_remap_index], parameters) +#define GET_VertexAttrib2svARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2svARB_remap_index]) +#define SET_VertexAttrib2svARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2svARB_remap_index], fn) +#define CALL_VertexAttrib3dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble)), driDispatchRemapTable[VertexAttrib3dARB_remap_index], parameters) +#define GET_VertexAttrib3dARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3dARB_remap_index]) +#define SET_VertexAttrib3dARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3dARB_remap_index], fn) +#define CALL_VertexAttrib3dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), driDispatchRemapTable[VertexAttrib3dvARB_remap_index], parameters) +#define GET_VertexAttrib3dvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3dvARB_remap_index]) +#define SET_VertexAttrib3dvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3dvARB_remap_index], fn) +#define CALL_VertexAttrib3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[VertexAttrib3fARB_remap_index], parameters) +#define GET_VertexAttrib3fARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3fARB_remap_index]) +#define SET_VertexAttrib3fARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3fARB_remap_index], fn) +#define CALL_VertexAttrib3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), driDispatchRemapTable[VertexAttrib3fvARB_remap_index], parameters) +#define GET_VertexAttrib3fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3fvARB_remap_index]) +#define SET_VertexAttrib3fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3fvARB_remap_index], fn) +#define CALL_VertexAttrib3sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort)), driDispatchRemapTable[VertexAttrib3sARB_remap_index], parameters) +#define GET_VertexAttrib3sARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3sARB_remap_index]) +#define SET_VertexAttrib3sARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3sARB_remap_index], fn) +#define CALL_VertexAttrib3svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), driDispatchRemapTable[VertexAttrib3svARB_remap_index], parameters) +#define GET_VertexAttrib3svARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3svARB_remap_index]) +#define SET_VertexAttrib3svARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3svARB_remap_index], fn) +#define CALL_VertexAttrib4NbvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), driDispatchRemapTable[VertexAttrib4NbvARB_remap_index], parameters) +#define GET_VertexAttrib4NbvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NbvARB_remap_index]) +#define SET_VertexAttrib4NbvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NbvARB_remap_index], fn) +#define CALL_VertexAttrib4NivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), driDispatchRemapTable[VertexAttrib4NivARB_remap_index], parameters) +#define GET_VertexAttrib4NivARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NivARB_remap_index]) +#define SET_VertexAttrib4NivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NivARB_remap_index], fn) +#define CALL_VertexAttrib4NsvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), driDispatchRemapTable[VertexAttrib4NsvARB_remap_index], parameters) +#define GET_VertexAttrib4NsvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NsvARB_remap_index]) +#define SET_VertexAttrib4NsvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NsvARB_remap_index], fn) +#define CALL_VertexAttrib4NubARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)), driDispatchRemapTable[VertexAttrib4NubARB_remap_index], parameters) +#define GET_VertexAttrib4NubARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NubARB_remap_index]) +#define SET_VertexAttrib4NubARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NubARB_remap_index], fn) +#define CALL_VertexAttrib4NubvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), driDispatchRemapTable[VertexAttrib4NubvARB_remap_index], parameters) +#define GET_VertexAttrib4NubvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NubvARB_remap_index]) +#define SET_VertexAttrib4NubvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NubvARB_remap_index], fn) +#define CALL_VertexAttrib4NuivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), driDispatchRemapTable[VertexAttrib4NuivARB_remap_index], parameters) +#define GET_VertexAttrib4NuivARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NuivARB_remap_index]) +#define SET_VertexAttrib4NuivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NuivARB_remap_index], fn) +#define CALL_VertexAttrib4NusvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), driDispatchRemapTable[VertexAttrib4NusvARB_remap_index], parameters) +#define GET_VertexAttrib4NusvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NusvARB_remap_index]) +#define SET_VertexAttrib4NusvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4NusvARB_remap_index], fn) +#define CALL_VertexAttrib4bvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), driDispatchRemapTable[VertexAttrib4bvARB_remap_index], parameters) +#define GET_VertexAttrib4bvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4bvARB_remap_index]) +#define SET_VertexAttrib4bvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4bvARB_remap_index], fn) +#define CALL_VertexAttrib4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), driDispatchRemapTable[VertexAttrib4dARB_remap_index], parameters) +#define GET_VertexAttrib4dARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4dARB_remap_index]) +#define SET_VertexAttrib4dARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4dARB_remap_index], fn) +#define CALL_VertexAttrib4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), driDispatchRemapTable[VertexAttrib4dvARB_remap_index], parameters) +#define GET_VertexAttrib4dvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4dvARB_remap_index]) +#define SET_VertexAttrib4dvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4dvARB_remap_index], fn) +#define CALL_VertexAttrib4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[VertexAttrib4fARB_remap_index], parameters) +#define GET_VertexAttrib4fARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4fARB_remap_index]) +#define SET_VertexAttrib4fARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4fARB_remap_index], fn) +#define CALL_VertexAttrib4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), driDispatchRemapTable[VertexAttrib4fvARB_remap_index], parameters) +#define GET_VertexAttrib4fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4fvARB_remap_index]) +#define SET_VertexAttrib4fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4fvARB_remap_index], fn) +#define CALL_VertexAttrib4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), driDispatchRemapTable[VertexAttrib4ivARB_remap_index], parameters) +#define GET_VertexAttrib4ivARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4ivARB_remap_index]) +#define SET_VertexAttrib4ivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4ivARB_remap_index], fn) +#define CALL_VertexAttrib4sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort, GLshort)), driDispatchRemapTable[VertexAttrib4sARB_remap_index], parameters) +#define GET_VertexAttrib4sARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4sARB_remap_index]) +#define SET_VertexAttrib4sARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4sARB_remap_index], fn) +#define CALL_VertexAttrib4svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), driDispatchRemapTable[VertexAttrib4svARB_remap_index], parameters) +#define GET_VertexAttrib4svARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4svARB_remap_index]) +#define SET_VertexAttrib4svARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4svARB_remap_index], fn) +#define CALL_VertexAttrib4ubvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), driDispatchRemapTable[VertexAttrib4ubvARB_remap_index], parameters) +#define GET_VertexAttrib4ubvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4ubvARB_remap_index]) +#define SET_VertexAttrib4ubvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4ubvARB_remap_index], fn) +#define CALL_VertexAttrib4uivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), driDispatchRemapTable[VertexAttrib4uivARB_remap_index], parameters) +#define GET_VertexAttrib4uivARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4uivARB_remap_index]) +#define SET_VertexAttrib4uivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4uivARB_remap_index], fn) +#define CALL_VertexAttrib4usvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), driDispatchRemapTable[VertexAttrib4usvARB_remap_index], parameters) +#define GET_VertexAttrib4usvARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4usvARB_remap_index]) +#define SET_VertexAttrib4usvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4usvARB_remap_index], fn) +#define CALL_VertexAttribPointerARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *)), driDispatchRemapTable[VertexAttribPointerARB_remap_index], parameters) +#define GET_VertexAttribPointerARB(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribPointerARB_remap_index]) +#define SET_VertexAttribPointerARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribPointerARB_remap_index], fn) +#define CALL_BindBufferARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), driDispatchRemapTable[BindBufferARB_remap_index], parameters) +#define GET_BindBufferARB(disp) GET_by_offset(disp, driDispatchRemapTable[BindBufferARB_remap_index]) +#define SET_BindBufferARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BindBufferARB_remap_index], fn) +#define CALL_BufferDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizeiptrARB, const GLvoid *, GLenum)), driDispatchRemapTable[BufferDataARB_remap_index], parameters) +#define GET_BufferDataARB(disp) GET_by_offset(disp, driDispatchRemapTable[BufferDataARB_remap_index]) +#define SET_BufferDataARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BufferDataARB_remap_index], fn) +#define CALL_BufferSubDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *)), driDispatchRemapTable[BufferSubDataARB_remap_index], parameters) +#define GET_BufferSubDataARB(disp) GET_by_offset(disp, driDispatchRemapTable[BufferSubDataARB_remap_index]) +#define SET_BufferSubDataARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BufferSubDataARB_remap_index], fn) +#define CALL_DeleteBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), driDispatchRemapTable[DeleteBuffersARB_remap_index], parameters) +#define GET_DeleteBuffersARB(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteBuffersARB_remap_index]) +#define SET_DeleteBuffersARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteBuffersARB_remap_index], fn) +#define CALL_GenBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), driDispatchRemapTable[GenBuffersARB_remap_index], parameters) +#define GET_GenBuffersARB(disp) GET_by_offset(disp, driDispatchRemapTable[GenBuffersARB_remap_index]) +#define SET_GenBuffersARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GenBuffersARB_remap_index], fn) +#define CALL_GetBufferParameterivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), driDispatchRemapTable[GetBufferParameterivARB_remap_index], parameters) +#define GET_GetBufferParameterivARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetBufferParameterivARB_remap_index]) +#define SET_GetBufferParameterivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetBufferParameterivARB_remap_index], fn) +#define CALL_GetBufferPointervARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid **)), driDispatchRemapTable[GetBufferPointervARB_remap_index], parameters) +#define GET_GetBufferPointervARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetBufferPointervARB_remap_index]) +#define SET_GetBufferPointervARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetBufferPointervARB_remap_index], fn) +#define CALL_GetBufferSubDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *)), driDispatchRemapTable[GetBufferSubDataARB_remap_index], parameters) +#define GET_GetBufferSubDataARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetBufferSubDataARB_remap_index]) +#define SET_GetBufferSubDataARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetBufferSubDataARB_remap_index], fn) +#define CALL_IsBufferARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[IsBufferARB_remap_index], parameters) +#define GET_IsBufferARB(disp) GET_by_offset(disp, driDispatchRemapTable[IsBufferARB_remap_index]) +#define SET_IsBufferARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsBufferARB_remap_index], fn) +#define CALL_MapBufferARB(disp, parameters) CALL_by_offset(disp, (GLvoid * (GLAPIENTRYP)(GLenum, GLenum)), driDispatchRemapTable[MapBufferARB_remap_index], parameters) +#define GET_MapBufferARB(disp) GET_by_offset(disp, driDispatchRemapTable[MapBufferARB_remap_index]) +#define SET_MapBufferARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[MapBufferARB_remap_index], fn) +#define CALL_UnmapBufferARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[UnmapBufferARB_remap_index], parameters) +#define GET_UnmapBufferARB(disp) GET_by_offset(disp, driDispatchRemapTable[UnmapBufferARB_remap_index]) +#define SET_UnmapBufferARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UnmapBufferARB_remap_index], fn) +#define CALL_BeginQueryARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), driDispatchRemapTable[BeginQueryARB_remap_index], parameters) +#define GET_BeginQueryARB(disp) GET_by_offset(disp, driDispatchRemapTable[BeginQueryARB_remap_index]) +#define SET_BeginQueryARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BeginQueryARB_remap_index], fn) +#define CALL_DeleteQueriesARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), driDispatchRemapTable[DeleteQueriesARB_remap_index], parameters) +#define GET_DeleteQueriesARB(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteQueriesARB_remap_index]) +#define SET_DeleteQueriesARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteQueriesARB_remap_index], fn) +#define CALL_EndQueryARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[EndQueryARB_remap_index], parameters) +#define GET_EndQueryARB(disp) GET_by_offset(disp, driDispatchRemapTable[EndQueryARB_remap_index]) +#define SET_EndQueryARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[EndQueryARB_remap_index], fn) +#define CALL_GenQueriesARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), driDispatchRemapTable[GenQueriesARB_remap_index], parameters) +#define GET_GenQueriesARB(disp) GET_by_offset(disp, driDispatchRemapTable[GenQueriesARB_remap_index]) +#define SET_GenQueriesARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GenQueriesARB_remap_index], fn) +#define CALL_GetQueryObjectivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), driDispatchRemapTable[GetQueryObjectivARB_remap_index], parameters) +#define GET_GetQueryObjectivARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetQueryObjectivARB_remap_index]) +#define SET_GetQueryObjectivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetQueryObjectivARB_remap_index], fn) +#define CALL_GetQueryObjectuivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint *)), driDispatchRemapTable[GetQueryObjectuivARB_remap_index], parameters) +#define GET_GetQueryObjectuivARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetQueryObjectuivARB_remap_index]) +#define SET_GetQueryObjectuivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetQueryObjectuivARB_remap_index], fn) +#define CALL_GetQueryivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), driDispatchRemapTable[GetQueryivARB_remap_index], parameters) +#define GET_GetQueryivARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetQueryivARB_remap_index]) +#define SET_GetQueryivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetQueryivARB_remap_index], fn) +#define CALL_IsQueryARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[IsQueryARB_remap_index], parameters) +#define GET_IsQueryARB(disp) GET_by_offset(disp, driDispatchRemapTable[IsQueryARB_remap_index]) +#define SET_IsQueryARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsQueryARB_remap_index], fn) +#define CALL_AttachObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLhandleARB)), driDispatchRemapTable[AttachObjectARB_remap_index], parameters) +#define GET_AttachObjectARB(disp) GET_by_offset(disp, driDispatchRemapTable[AttachObjectARB_remap_index]) +#define SET_AttachObjectARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[AttachObjectARB_remap_index], fn) +#define CALL_CompileShaderARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), driDispatchRemapTable[CompileShaderARB_remap_index], parameters) +#define GET_CompileShaderARB(disp) GET_by_offset(disp, driDispatchRemapTable[CompileShaderARB_remap_index]) +#define SET_CompileShaderARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CompileShaderARB_remap_index], fn) +#define CALL_CreateProgramObjectARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(void)), driDispatchRemapTable[CreateProgramObjectARB_remap_index], parameters) +#define GET_CreateProgramObjectARB(disp) GET_by_offset(disp, driDispatchRemapTable[CreateProgramObjectARB_remap_index]) +#define SET_CreateProgramObjectARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CreateProgramObjectARB_remap_index], fn) +#define CALL_CreateShaderObjectARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[CreateShaderObjectARB_remap_index], parameters) +#define GET_CreateShaderObjectARB(disp) GET_by_offset(disp, driDispatchRemapTable[CreateShaderObjectARB_remap_index]) +#define SET_CreateShaderObjectARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CreateShaderObjectARB_remap_index], fn) +#define CALL_DeleteObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), driDispatchRemapTable[DeleteObjectARB_remap_index], parameters) +#define GET_DeleteObjectARB(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteObjectARB_remap_index]) +#define SET_DeleteObjectARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteObjectARB_remap_index], fn) +#define CALL_DetachObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLhandleARB)), driDispatchRemapTable[DetachObjectARB_remap_index], parameters) +#define GET_DetachObjectARB(disp) GET_by_offset(disp, driDispatchRemapTable[DetachObjectARB_remap_index]) +#define SET_DetachObjectARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DetachObjectARB_remap_index], fn) +#define CALL_GetActiveUniformARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)), driDispatchRemapTable[GetActiveUniformARB_remap_index], parameters) +#define GET_GetActiveUniformARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetActiveUniformARB_remap_index]) +#define SET_GetActiveUniformARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetActiveUniformARB_remap_index], fn) +#define CALL_GetAttachedObjectsARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLhandleARB *)), driDispatchRemapTable[GetAttachedObjectsARB_remap_index], parameters) +#define GET_GetAttachedObjectsARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetAttachedObjectsARB_remap_index]) +#define SET_GetAttachedObjectsARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetAttachedObjectsARB_remap_index], fn) +#define CALL_GetHandleARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[GetHandleARB_remap_index], parameters) +#define GET_GetHandleARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetHandleARB_remap_index]) +#define SET_GetHandleARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetHandleARB_remap_index], fn) +#define CALL_GetInfoLogARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *)), driDispatchRemapTable[GetInfoLogARB_remap_index], parameters) +#define GET_GetInfoLogARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetInfoLogARB_remap_index]) +#define SET_GetInfoLogARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetInfoLogARB_remap_index], fn) +#define CALL_GetObjectParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLenum, GLfloat *)), driDispatchRemapTable[GetObjectParameterfvARB_remap_index], parameters) +#define GET_GetObjectParameterfvARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetObjectParameterfvARB_remap_index]) +#define SET_GetObjectParameterfvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetObjectParameterfvARB_remap_index], fn) +#define CALL_GetObjectParameterivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLenum, GLint *)), driDispatchRemapTable[GetObjectParameterivARB_remap_index], parameters) +#define GET_GetObjectParameterivARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetObjectParameterivARB_remap_index]) +#define SET_GetObjectParameterivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetObjectParameterivARB_remap_index], fn) +#define CALL_GetShaderSourceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *)), driDispatchRemapTable[GetShaderSourceARB_remap_index], parameters) +#define GET_GetShaderSourceARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetShaderSourceARB_remap_index]) +#define SET_GetShaderSourceARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetShaderSourceARB_remap_index], fn) +#define CALL_GetUniformLocationARB(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLhandleARB, const GLcharARB *)), driDispatchRemapTable[GetUniformLocationARB_remap_index], parameters) +#define GET_GetUniformLocationARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetUniformLocationARB_remap_index]) +#define SET_GetUniformLocationARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetUniformLocationARB_remap_index], fn) +#define CALL_GetUniformfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLfloat *)), driDispatchRemapTable[GetUniformfvARB_remap_index], parameters) +#define GET_GetUniformfvARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetUniformfvARB_remap_index]) +#define SET_GetUniformfvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetUniformfvARB_remap_index], fn) +#define CALL_GetUniformivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLint *)), driDispatchRemapTable[GetUniformivARB_remap_index], parameters) +#define GET_GetUniformivARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetUniformivARB_remap_index]) +#define SET_GetUniformivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetUniformivARB_remap_index], fn) +#define CALL_LinkProgramARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), driDispatchRemapTable[LinkProgramARB_remap_index], parameters) +#define GET_LinkProgramARB(disp) GET_by_offset(disp, driDispatchRemapTable[LinkProgramARB_remap_index]) +#define SET_LinkProgramARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[LinkProgramARB_remap_index], fn) +#define CALL_ShaderSourceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, const GLcharARB **, const GLint *)), driDispatchRemapTable[ShaderSourceARB_remap_index], parameters) +#define GET_ShaderSourceARB(disp) GET_by_offset(disp, driDispatchRemapTable[ShaderSourceARB_remap_index]) +#define SET_ShaderSourceARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ShaderSourceARB_remap_index], fn) +#define CALL_Uniform1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat)), driDispatchRemapTable[Uniform1fARB_remap_index], parameters) +#define GET_Uniform1fARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform1fARB_remap_index]) +#define SET_Uniform1fARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform1fARB_remap_index], fn) +#define CALL_Uniform1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), driDispatchRemapTable[Uniform1fvARB_remap_index], parameters) +#define GET_Uniform1fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform1fvARB_remap_index]) +#define SET_Uniform1fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform1fvARB_remap_index], fn) +#define CALL_Uniform1iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), driDispatchRemapTable[Uniform1iARB_remap_index], parameters) +#define GET_Uniform1iARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform1iARB_remap_index]) +#define SET_Uniform1iARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform1iARB_remap_index], fn) +#define CALL_Uniform1ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), driDispatchRemapTable[Uniform1ivARB_remap_index], parameters) +#define GET_Uniform1ivARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform1ivARB_remap_index]) +#define SET_Uniform1ivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform1ivARB_remap_index], fn) +#define CALL_Uniform2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat)), driDispatchRemapTable[Uniform2fARB_remap_index], parameters) +#define GET_Uniform2fARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform2fARB_remap_index]) +#define SET_Uniform2fARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform2fARB_remap_index], fn) +#define CALL_Uniform2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), driDispatchRemapTable[Uniform2fvARB_remap_index], parameters) +#define GET_Uniform2fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform2fvARB_remap_index]) +#define SET_Uniform2fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform2fvARB_remap_index], fn) +#define CALL_Uniform2iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), driDispatchRemapTable[Uniform2iARB_remap_index], parameters) +#define GET_Uniform2iARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform2iARB_remap_index]) +#define SET_Uniform2iARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform2iARB_remap_index], fn) +#define CALL_Uniform2ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), driDispatchRemapTable[Uniform2ivARB_remap_index], parameters) +#define GET_Uniform2ivARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform2ivARB_remap_index]) +#define SET_Uniform2ivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform2ivARB_remap_index], fn) +#define CALL_Uniform3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[Uniform3fARB_remap_index], parameters) +#define GET_Uniform3fARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform3fARB_remap_index]) +#define SET_Uniform3fARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform3fARB_remap_index], fn) +#define CALL_Uniform3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), driDispatchRemapTable[Uniform3fvARB_remap_index], parameters) +#define GET_Uniform3fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform3fvARB_remap_index]) +#define SET_Uniform3fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform3fvARB_remap_index], fn) +#define CALL_Uniform3iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), driDispatchRemapTable[Uniform3iARB_remap_index], parameters) +#define GET_Uniform3iARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform3iARB_remap_index]) +#define SET_Uniform3iARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform3iARB_remap_index], fn) +#define CALL_Uniform3ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), driDispatchRemapTable[Uniform3ivARB_remap_index], parameters) +#define GET_Uniform3ivARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform3ivARB_remap_index]) +#define SET_Uniform3ivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform3ivARB_remap_index], fn) +#define CALL_Uniform4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[Uniform4fARB_remap_index], parameters) +#define GET_Uniform4fARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform4fARB_remap_index]) +#define SET_Uniform4fARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform4fARB_remap_index], fn) +#define CALL_Uniform4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), driDispatchRemapTable[Uniform4fvARB_remap_index], parameters) +#define GET_Uniform4fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform4fvARB_remap_index]) +#define SET_Uniform4fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform4fvARB_remap_index], fn) +#define CALL_Uniform4iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint, GLint)), driDispatchRemapTable[Uniform4iARB_remap_index], parameters) +#define GET_Uniform4iARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform4iARB_remap_index]) +#define SET_Uniform4iARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform4iARB_remap_index], fn) +#define CALL_Uniform4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), driDispatchRemapTable[Uniform4ivARB_remap_index], parameters) +#define GET_Uniform4ivARB(disp) GET_by_offset(disp, driDispatchRemapTable[Uniform4ivARB_remap_index]) +#define SET_Uniform4ivARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[Uniform4ivARB_remap_index], fn) +#define CALL_UniformMatrix2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix2fvARB_remap_index], parameters) +#define GET_UniformMatrix2fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix2fvARB_remap_index]) +#define SET_UniformMatrix2fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix2fvARB_remap_index], fn) +#define CALL_UniformMatrix3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix3fvARB_remap_index], parameters) +#define GET_UniformMatrix3fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix3fvARB_remap_index]) +#define SET_UniformMatrix3fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix3fvARB_remap_index], fn) +#define CALL_UniformMatrix4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), driDispatchRemapTable[UniformMatrix4fvARB_remap_index], parameters) +#define GET_UniformMatrix4fvARB(disp) GET_by_offset(disp, driDispatchRemapTable[UniformMatrix4fvARB_remap_index]) +#define SET_UniformMatrix4fvARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UniformMatrix4fvARB_remap_index], fn) +#define CALL_UseProgramObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), driDispatchRemapTable[UseProgramObjectARB_remap_index], parameters) +#define GET_UseProgramObjectARB(disp) GET_by_offset(disp, driDispatchRemapTable[UseProgramObjectARB_remap_index]) +#define SET_UseProgramObjectARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UseProgramObjectARB_remap_index], fn) +#define CALL_ValidateProgramARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), driDispatchRemapTable[ValidateProgramARB_remap_index], parameters) +#define GET_ValidateProgramARB(disp) GET_by_offset(disp, driDispatchRemapTable[ValidateProgramARB_remap_index]) +#define SET_ValidateProgramARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ValidateProgramARB_remap_index], fn) +#define CALL_BindAttribLocationARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, const GLcharARB *)), driDispatchRemapTable[BindAttribLocationARB_remap_index], parameters) +#define GET_BindAttribLocationARB(disp) GET_by_offset(disp, driDispatchRemapTable[BindAttribLocationARB_remap_index]) +#define SET_BindAttribLocationARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BindAttribLocationARB_remap_index], fn) +#define CALL_GetActiveAttribARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)), driDispatchRemapTable[GetActiveAttribARB_remap_index], parameters) +#define GET_GetActiveAttribARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetActiveAttribARB_remap_index]) +#define SET_GetActiveAttribARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetActiveAttribARB_remap_index], fn) +#define CALL_GetAttribLocationARB(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLhandleARB, const GLcharARB *)), driDispatchRemapTable[GetAttribLocationARB_remap_index], parameters) +#define GET_GetAttribLocationARB(disp) GET_by_offset(disp, driDispatchRemapTable[GetAttribLocationARB_remap_index]) +#define SET_GetAttribLocationARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetAttribLocationARB_remap_index], fn) +#define CALL_DrawBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLenum *)), driDispatchRemapTable[DrawBuffersARB_remap_index], parameters) +#define GET_DrawBuffersARB(disp) GET_by_offset(disp, driDispatchRemapTable[DrawBuffersARB_remap_index]) +#define SET_DrawBuffersARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DrawBuffersARB_remap_index], fn) +#define CALL_PolygonOffsetEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), driDispatchRemapTable[PolygonOffsetEXT_remap_index], parameters) +#define GET_PolygonOffsetEXT(disp) GET_by_offset(disp, driDispatchRemapTable[PolygonOffsetEXT_remap_index]) +#define SET_PolygonOffsetEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PolygonOffsetEXT_remap_index], fn) +#define CALL_GetPixelTexGenParameterfvSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), driDispatchRemapTable[GetPixelTexGenParameterfvSGIS_remap_index], parameters) +#define GET_GetPixelTexGenParameterfvSGIS(disp) GET_by_offset(disp, driDispatchRemapTable[GetPixelTexGenParameterfvSGIS_remap_index]) +#define SET_GetPixelTexGenParameterfvSGIS(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetPixelTexGenParameterfvSGIS_remap_index], fn) +#define CALL_GetPixelTexGenParameterivSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *)), driDispatchRemapTable[GetPixelTexGenParameterivSGIS_remap_index], parameters) +#define GET_GetPixelTexGenParameterivSGIS(disp) GET_by_offset(disp, driDispatchRemapTable[GetPixelTexGenParameterivSGIS_remap_index]) +#define SET_GetPixelTexGenParameterivSGIS(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetPixelTexGenParameterivSGIS_remap_index], fn) +#define CALL_PixelTexGenParameterfSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), driDispatchRemapTable[PixelTexGenParameterfSGIS_remap_index], parameters) +#define GET_PixelTexGenParameterfSGIS(disp) GET_by_offset(disp, driDispatchRemapTable[PixelTexGenParameterfSGIS_remap_index]) +#define SET_PixelTexGenParameterfSGIS(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PixelTexGenParameterfSGIS_remap_index], fn) +#define CALL_PixelTexGenParameterfvSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), driDispatchRemapTable[PixelTexGenParameterfvSGIS_remap_index], parameters) +#define GET_PixelTexGenParameterfvSGIS(disp) GET_by_offset(disp, driDispatchRemapTable[PixelTexGenParameterfvSGIS_remap_index]) +#define SET_PixelTexGenParameterfvSGIS(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PixelTexGenParameterfvSGIS_remap_index], fn) +#define CALL_PixelTexGenParameteriSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), driDispatchRemapTable[PixelTexGenParameteriSGIS_remap_index], parameters) +#define GET_PixelTexGenParameteriSGIS(disp) GET_by_offset(disp, driDispatchRemapTable[PixelTexGenParameteriSGIS_remap_index]) +#define SET_PixelTexGenParameteriSGIS(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PixelTexGenParameteriSGIS_remap_index], fn) +#define CALL_PixelTexGenParameterivSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), driDispatchRemapTable[PixelTexGenParameterivSGIS_remap_index], parameters) +#define GET_PixelTexGenParameterivSGIS(disp) GET_by_offset(disp, driDispatchRemapTable[PixelTexGenParameterivSGIS_remap_index]) +#define SET_PixelTexGenParameterivSGIS(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PixelTexGenParameterivSGIS_remap_index], fn) +#define CALL_SampleMaskSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLboolean)), driDispatchRemapTable[SampleMaskSGIS_remap_index], parameters) +#define GET_SampleMaskSGIS(disp) GET_by_offset(disp, driDispatchRemapTable[SampleMaskSGIS_remap_index]) +#define SET_SampleMaskSGIS(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SampleMaskSGIS_remap_index], fn) +#define CALL_SamplePatternSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[SamplePatternSGIS_remap_index], parameters) +#define GET_SamplePatternSGIS(disp) GET_by_offset(disp, driDispatchRemapTable[SamplePatternSGIS_remap_index]) +#define SET_SamplePatternSGIS(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SamplePatternSGIS_remap_index], fn) +#define CALL_ColorPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), driDispatchRemapTable[ColorPointerEXT_remap_index], parameters) +#define GET_ColorPointerEXT(disp) GET_by_offset(disp, driDispatchRemapTable[ColorPointerEXT_remap_index]) +#define SET_ColorPointerEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ColorPointerEXT_remap_index], fn) +#define CALL_EdgeFlagPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLsizei, const GLboolean *)), driDispatchRemapTable[EdgeFlagPointerEXT_remap_index], parameters) +#define GET_EdgeFlagPointerEXT(disp) GET_by_offset(disp, driDispatchRemapTable[EdgeFlagPointerEXT_remap_index]) +#define SET_EdgeFlagPointerEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[EdgeFlagPointerEXT_remap_index], fn) +#define CALL_IndexPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, const GLvoid *)), driDispatchRemapTable[IndexPointerEXT_remap_index], parameters) +#define GET_IndexPointerEXT(disp) GET_by_offset(disp, driDispatchRemapTable[IndexPointerEXT_remap_index]) +#define SET_IndexPointerEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IndexPointerEXT_remap_index], fn) +#define CALL_NormalPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, const GLvoid *)), driDispatchRemapTable[NormalPointerEXT_remap_index], parameters) +#define GET_NormalPointerEXT(disp) GET_by_offset(disp, driDispatchRemapTable[NormalPointerEXT_remap_index]) +#define SET_NormalPointerEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[NormalPointerEXT_remap_index], fn) +#define CALL_TexCoordPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), driDispatchRemapTable[TexCoordPointerEXT_remap_index], parameters) +#define GET_TexCoordPointerEXT(disp) GET_by_offset(disp, driDispatchRemapTable[TexCoordPointerEXT_remap_index]) +#define SET_TexCoordPointerEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[TexCoordPointerEXT_remap_index], fn) +#define CALL_VertexPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), driDispatchRemapTable[VertexPointerEXT_remap_index], parameters) +#define GET_VertexPointerEXT(disp) GET_by_offset(disp, driDispatchRemapTable[VertexPointerEXT_remap_index]) +#define SET_VertexPointerEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexPointerEXT_remap_index], fn) +#define CALL_PointParameterfEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), driDispatchRemapTable[PointParameterfEXT_remap_index], parameters) +#define GET_PointParameterfEXT(disp) GET_by_offset(disp, driDispatchRemapTable[PointParameterfEXT_remap_index]) +#define SET_PointParameterfEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PointParameterfEXT_remap_index], fn) +#define CALL_PointParameterfvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), driDispatchRemapTable[PointParameterfvEXT_remap_index], parameters) +#define GET_PointParameterfvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[PointParameterfvEXT_remap_index]) +#define SET_PointParameterfvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PointParameterfvEXT_remap_index], fn) +#define CALL_LockArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei)), driDispatchRemapTable[LockArraysEXT_remap_index], parameters) +#define GET_LockArraysEXT(disp) GET_by_offset(disp, driDispatchRemapTable[LockArraysEXT_remap_index]) +#define SET_LockArraysEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[LockArraysEXT_remap_index], fn) +#define CALL_UnlockArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), driDispatchRemapTable[UnlockArraysEXT_remap_index], parameters) +#define GET_UnlockArraysEXT(disp) GET_by_offset(disp, driDispatchRemapTable[UnlockArraysEXT_remap_index]) +#define SET_UnlockArraysEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[UnlockArraysEXT_remap_index], fn) +#define CALL_CullParameterdvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble *)), driDispatchRemapTable[CullParameterdvEXT_remap_index], parameters) +#define GET_CullParameterdvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[CullParameterdvEXT_remap_index]) +#define SET_CullParameterdvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CullParameterdvEXT_remap_index], fn) +#define CALL_CullParameterfvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), driDispatchRemapTable[CullParameterfvEXT_remap_index], parameters) +#define GET_CullParameterfvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[CullParameterfvEXT_remap_index]) +#define SET_CullParameterfvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CullParameterfvEXT_remap_index], fn) +#define CALL_SecondaryColor3bEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte)), driDispatchRemapTable[SecondaryColor3bEXT_remap_index], parameters) +#define GET_SecondaryColor3bEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3bEXT_remap_index]) +#define SET_SecondaryColor3bEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3bEXT_remap_index], fn) +#define CALL_SecondaryColor3bvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), driDispatchRemapTable[SecondaryColor3bvEXT_remap_index], parameters) +#define GET_SecondaryColor3bvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3bvEXT_remap_index]) +#define SET_SecondaryColor3bvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3bvEXT_remap_index], fn) +#define CALL_SecondaryColor3dEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), driDispatchRemapTable[SecondaryColor3dEXT_remap_index], parameters) +#define GET_SecondaryColor3dEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3dEXT_remap_index]) +#define SET_SecondaryColor3dEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3dEXT_remap_index], fn) +#define CALL_SecondaryColor3dvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), driDispatchRemapTable[SecondaryColor3dvEXT_remap_index], parameters) +#define GET_SecondaryColor3dvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3dvEXT_remap_index]) +#define SET_SecondaryColor3dvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3dvEXT_remap_index], fn) +#define CALL_SecondaryColor3fEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[SecondaryColor3fEXT_remap_index], parameters) +#define GET_SecondaryColor3fEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3fEXT_remap_index]) +#define SET_SecondaryColor3fEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3fEXT_remap_index], fn) +#define CALL_SecondaryColor3fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), driDispatchRemapTable[SecondaryColor3fvEXT_remap_index], parameters) +#define GET_SecondaryColor3fvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3fvEXT_remap_index]) +#define SET_SecondaryColor3fvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3fvEXT_remap_index], fn) +#define CALL_SecondaryColor3iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), driDispatchRemapTable[SecondaryColor3iEXT_remap_index], parameters) +#define GET_SecondaryColor3iEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3iEXT_remap_index]) +#define SET_SecondaryColor3iEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3iEXT_remap_index], fn) +#define CALL_SecondaryColor3ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), driDispatchRemapTable[SecondaryColor3ivEXT_remap_index], parameters) +#define GET_SecondaryColor3ivEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3ivEXT_remap_index]) +#define SET_SecondaryColor3ivEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3ivEXT_remap_index], fn) +#define CALL_SecondaryColor3sEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), driDispatchRemapTable[SecondaryColor3sEXT_remap_index], parameters) +#define GET_SecondaryColor3sEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3sEXT_remap_index]) +#define SET_SecondaryColor3sEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3sEXT_remap_index], fn) +#define CALL_SecondaryColor3svEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), driDispatchRemapTable[SecondaryColor3svEXT_remap_index], parameters) +#define GET_SecondaryColor3svEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3svEXT_remap_index]) +#define SET_SecondaryColor3svEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3svEXT_remap_index], fn) +#define CALL_SecondaryColor3ubEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte, GLubyte, GLubyte)), driDispatchRemapTable[SecondaryColor3ubEXT_remap_index], parameters) +#define GET_SecondaryColor3ubEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3ubEXT_remap_index]) +#define SET_SecondaryColor3ubEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3ubEXT_remap_index], fn) +#define CALL_SecondaryColor3ubvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), driDispatchRemapTable[SecondaryColor3ubvEXT_remap_index], parameters) +#define GET_SecondaryColor3ubvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3ubvEXT_remap_index]) +#define SET_SecondaryColor3ubvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3ubvEXT_remap_index], fn) +#define CALL_SecondaryColor3uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint)), driDispatchRemapTable[SecondaryColor3uiEXT_remap_index], parameters) +#define GET_SecondaryColor3uiEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3uiEXT_remap_index]) +#define SET_SecondaryColor3uiEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3uiEXT_remap_index], fn) +#define CALL_SecondaryColor3uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLuint *)), driDispatchRemapTable[SecondaryColor3uivEXT_remap_index], parameters) +#define GET_SecondaryColor3uivEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3uivEXT_remap_index]) +#define SET_SecondaryColor3uivEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3uivEXT_remap_index], fn) +#define CALL_SecondaryColor3usEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLushort, GLushort, GLushort)), driDispatchRemapTable[SecondaryColor3usEXT_remap_index], parameters) +#define GET_SecondaryColor3usEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3usEXT_remap_index]) +#define SET_SecondaryColor3usEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3usEXT_remap_index], fn) +#define CALL_SecondaryColor3usvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLushort *)), driDispatchRemapTable[SecondaryColor3usvEXT_remap_index], parameters) +#define GET_SecondaryColor3usvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColor3usvEXT_remap_index]) +#define SET_SecondaryColor3usvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColor3usvEXT_remap_index], fn) +#define CALL_SecondaryColorPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), driDispatchRemapTable[SecondaryColorPointerEXT_remap_index], parameters) +#define GET_SecondaryColorPointerEXT(disp) GET_by_offset(disp, driDispatchRemapTable[SecondaryColorPointerEXT_remap_index]) +#define SET_SecondaryColorPointerEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SecondaryColorPointerEXT_remap_index], fn) +#define CALL_MultiDrawArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *, GLsizei *, GLsizei)), driDispatchRemapTable[MultiDrawArraysEXT_remap_index], parameters) +#define GET_MultiDrawArraysEXT(disp) GET_by_offset(disp, driDispatchRemapTable[MultiDrawArraysEXT_remap_index]) +#define SET_MultiDrawArraysEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[MultiDrawArraysEXT_remap_index], fn) +#define CALL_MultiDrawElementsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei)), driDispatchRemapTable[MultiDrawElementsEXT_remap_index], parameters) +#define GET_MultiDrawElementsEXT(disp) GET_by_offset(disp, driDispatchRemapTable[MultiDrawElementsEXT_remap_index]) +#define SET_MultiDrawElementsEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[MultiDrawElementsEXT_remap_index], fn) +#define CALL_FogCoordPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), driDispatchRemapTable[FogCoordPointerEXT_remap_index], parameters) +#define GET_FogCoordPointerEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FogCoordPointerEXT_remap_index]) +#define SET_FogCoordPointerEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FogCoordPointerEXT_remap_index], fn) +#define CALL_FogCoorddEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), driDispatchRemapTable[FogCoorddEXT_remap_index], parameters) +#define GET_FogCoorddEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FogCoorddEXT_remap_index]) +#define SET_FogCoorddEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FogCoorddEXT_remap_index], fn) +#define CALL_FogCoorddvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), driDispatchRemapTable[FogCoorddvEXT_remap_index], parameters) +#define GET_FogCoorddvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FogCoorddvEXT_remap_index]) +#define SET_FogCoorddvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FogCoorddvEXT_remap_index], fn) +#define CALL_FogCoordfEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), driDispatchRemapTable[FogCoordfEXT_remap_index], parameters) +#define GET_FogCoordfEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FogCoordfEXT_remap_index]) +#define SET_FogCoordfEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FogCoordfEXT_remap_index], fn) +#define CALL_FogCoordfvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), driDispatchRemapTable[FogCoordfvEXT_remap_index], parameters) +#define GET_FogCoordfvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FogCoordfvEXT_remap_index]) +#define SET_FogCoordfvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FogCoordfvEXT_remap_index], fn) +#define CALL_PixelTexGenSGIX(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[PixelTexGenSGIX_remap_index], parameters) +#define GET_PixelTexGenSGIX(disp) GET_by_offset(disp, driDispatchRemapTable[PixelTexGenSGIX_remap_index]) +#define SET_PixelTexGenSGIX(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PixelTexGenSGIX_remap_index], fn) +#define CALL_BlendFuncSeparateEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), driDispatchRemapTable[BlendFuncSeparateEXT_remap_index], parameters) +#define GET_BlendFuncSeparateEXT(disp) GET_by_offset(disp, driDispatchRemapTable[BlendFuncSeparateEXT_remap_index]) +#define SET_BlendFuncSeparateEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BlendFuncSeparateEXT_remap_index], fn) +#define CALL_FlushVertexArrayRangeNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), driDispatchRemapTable[FlushVertexArrayRangeNV_remap_index], parameters) +#define GET_FlushVertexArrayRangeNV(disp) GET_by_offset(disp, driDispatchRemapTable[FlushVertexArrayRangeNV_remap_index]) +#define SET_FlushVertexArrayRangeNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FlushVertexArrayRangeNV_remap_index], fn) +#define CALL_VertexArrayRangeNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLvoid *)), driDispatchRemapTable[VertexArrayRangeNV_remap_index], parameters) +#define GET_VertexArrayRangeNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexArrayRangeNV_remap_index]) +#define SET_VertexArrayRangeNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexArrayRangeNV_remap_index], fn) +#define CALL_CombinerInputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum)), driDispatchRemapTable[CombinerInputNV_remap_index], parameters) +#define GET_CombinerInputNV(disp) GET_by_offset(disp, driDispatchRemapTable[CombinerInputNV_remap_index]) +#define SET_CombinerInputNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CombinerInputNV_remap_index], fn) +#define CALL_CombinerOutputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean)), driDispatchRemapTable[CombinerOutputNV_remap_index], parameters) +#define GET_CombinerOutputNV(disp) GET_by_offset(disp, driDispatchRemapTable[CombinerOutputNV_remap_index]) +#define SET_CombinerOutputNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CombinerOutputNV_remap_index], fn) +#define CALL_CombinerParameterfNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), driDispatchRemapTable[CombinerParameterfNV_remap_index], parameters) +#define GET_CombinerParameterfNV(disp) GET_by_offset(disp, driDispatchRemapTable[CombinerParameterfNV_remap_index]) +#define SET_CombinerParameterfNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CombinerParameterfNV_remap_index], fn) +#define CALL_CombinerParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), driDispatchRemapTable[CombinerParameterfvNV_remap_index], parameters) +#define GET_CombinerParameterfvNV(disp) GET_by_offset(disp, driDispatchRemapTable[CombinerParameterfvNV_remap_index]) +#define SET_CombinerParameterfvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CombinerParameterfvNV_remap_index], fn) +#define CALL_CombinerParameteriNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), driDispatchRemapTable[CombinerParameteriNV_remap_index], parameters) +#define GET_CombinerParameteriNV(disp) GET_by_offset(disp, driDispatchRemapTable[CombinerParameteriNV_remap_index]) +#define SET_CombinerParameteriNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CombinerParameteriNV_remap_index], fn) +#define CALL_CombinerParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), driDispatchRemapTable[CombinerParameterivNV_remap_index], parameters) +#define GET_CombinerParameterivNV(disp) GET_by_offset(disp, driDispatchRemapTable[CombinerParameterivNV_remap_index]) +#define SET_CombinerParameterivNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CombinerParameterivNV_remap_index], fn) +#define CALL_FinalCombinerInputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), driDispatchRemapTable[FinalCombinerInputNV_remap_index], parameters) +#define GET_FinalCombinerInputNV(disp) GET_by_offset(disp, driDispatchRemapTable[FinalCombinerInputNV_remap_index]) +#define SET_FinalCombinerInputNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FinalCombinerInputNV_remap_index], fn) +#define CALL_GetCombinerInputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLfloat *)), driDispatchRemapTable[GetCombinerInputParameterfvNV_remap_index], parameters) +#define GET_GetCombinerInputParameterfvNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetCombinerInputParameterfvNV_remap_index]) +#define SET_GetCombinerInputParameterfvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetCombinerInputParameterfvNV_remap_index], fn) +#define CALL_GetCombinerInputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLint *)), driDispatchRemapTable[GetCombinerInputParameterivNV_remap_index], parameters) +#define GET_GetCombinerInputParameterivNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetCombinerInputParameterivNV_remap_index]) +#define SET_GetCombinerInputParameterivNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetCombinerInputParameterivNV_remap_index], fn) +#define CALL_GetCombinerOutputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLfloat *)), driDispatchRemapTable[GetCombinerOutputParameterfvNV_remap_index], parameters) +#define GET_GetCombinerOutputParameterfvNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetCombinerOutputParameterfvNV_remap_index]) +#define SET_GetCombinerOutputParameterfvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetCombinerOutputParameterfvNV_remap_index], fn) +#define CALL_GetCombinerOutputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLint *)), driDispatchRemapTable[GetCombinerOutputParameterivNV_remap_index], parameters) +#define GET_GetCombinerOutputParameterivNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetCombinerOutputParameterivNV_remap_index]) +#define SET_GetCombinerOutputParameterivNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetCombinerOutputParameterivNV_remap_index], fn) +#define CALL_GetFinalCombinerInputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), driDispatchRemapTable[GetFinalCombinerInputParameterfvNV_remap_index], parameters) +#define GET_GetFinalCombinerInputParameterfvNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetFinalCombinerInputParameterfvNV_remap_index]) +#define SET_GetFinalCombinerInputParameterfvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetFinalCombinerInputParameterfvNV_remap_index], fn) +#define CALL_GetFinalCombinerInputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), driDispatchRemapTable[GetFinalCombinerInputParameterivNV_remap_index], parameters) +#define GET_GetFinalCombinerInputParameterivNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetFinalCombinerInputParameterivNV_remap_index]) +#define SET_GetFinalCombinerInputParameterivNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetFinalCombinerInputParameterivNV_remap_index], fn) +#define CALL_ResizeBuffersMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), driDispatchRemapTable[ResizeBuffersMESA_remap_index], parameters) +#define GET_ResizeBuffersMESA(disp) GET_by_offset(disp, driDispatchRemapTable[ResizeBuffersMESA_remap_index]) +#define SET_ResizeBuffersMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ResizeBuffersMESA_remap_index], fn) +#define CALL_WindowPos2dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), driDispatchRemapTable[WindowPos2dMESA_remap_index], parameters) +#define GET_WindowPos2dMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos2dMESA_remap_index]) +#define SET_WindowPos2dMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos2dMESA_remap_index], fn) +#define CALL_WindowPos2dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), driDispatchRemapTable[WindowPos2dvMESA_remap_index], parameters) +#define GET_WindowPos2dvMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos2dvMESA_remap_index]) +#define SET_WindowPos2dvMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos2dvMESA_remap_index], fn) +#define CALL_WindowPos2fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), driDispatchRemapTable[WindowPos2fMESA_remap_index], parameters) +#define GET_WindowPos2fMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos2fMESA_remap_index]) +#define SET_WindowPos2fMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos2fMESA_remap_index], fn) +#define CALL_WindowPos2fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), driDispatchRemapTable[WindowPos2fvMESA_remap_index], parameters) +#define GET_WindowPos2fvMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos2fvMESA_remap_index]) +#define SET_WindowPos2fvMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos2fvMESA_remap_index], fn) +#define CALL_WindowPos2iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), driDispatchRemapTable[WindowPos2iMESA_remap_index], parameters) +#define GET_WindowPos2iMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos2iMESA_remap_index]) +#define SET_WindowPos2iMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos2iMESA_remap_index], fn) +#define CALL_WindowPos2ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), driDispatchRemapTable[WindowPos2ivMESA_remap_index], parameters) +#define GET_WindowPos2ivMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos2ivMESA_remap_index]) +#define SET_WindowPos2ivMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos2ivMESA_remap_index], fn) +#define CALL_WindowPos2sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), driDispatchRemapTable[WindowPos2sMESA_remap_index], parameters) +#define GET_WindowPos2sMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos2sMESA_remap_index]) +#define SET_WindowPos2sMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos2sMESA_remap_index], fn) +#define CALL_WindowPos2svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), driDispatchRemapTable[WindowPos2svMESA_remap_index], parameters) +#define GET_WindowPos2svMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos2svMESA_remap_index]) +#define SET_WindowPos2svMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos2svMESA_remap_index], fn) +#define CALL_WindowPos3dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), driDispatchRemapTable[WindowPos3dMESA_remap_index], parameters) +#define GET_WindowPos3dMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos3dMESA_remap_index]) +#define SET_WindowPos3dMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos3dMESA_remap_index], fn) +#define CALL_WindowPos3dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), driDispatchRemapTable[WindowPos3dvMESA_remap_index], parameters) +#define GET_WindowPos3dvMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos3dvMESA_remap_index]) +#define SET_WindowPos3dvMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos3dvMESA_remap_index], fn) +#define CALL_WindowPos3fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[WindowPos3fMESA_remap_index], parameters) +#define GET_WindowPos3fMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos3fMESA_remap_index]) +#define SET_WindowPos3fMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos3fMESA_remap_index], fn) +#define CALL_WindowPos3fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), driDispatchRemapTable[WindowPos3fvMESA_remap_index], parameters) +#define GET_WindowPos3fvMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos3fvMESA_remap_index]) +#define SET_WindowPos3fvMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos3fvMESA_remap_index], fn) +#define CALL_WindowPos3iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), driDispatchRemapTable[WindowPos3iMESA_remap_index], parameters) +#define GET_WindowPos3iMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos3iMESA_remap_index]) +#define SET_WindowPos3iMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos3iMESA_remap_index], fn) +#define CALL_WindowPos3ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), driDispatchRemapTable[WindowPos3ivMESA_remap_index], parameters) +#define GET_WindowPos3ivMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos3ivMESA_remap_index]) +#define SET_WindowPos3ivMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos3ivMESA_remap_index], fn) +#define CALL_WindowPos3sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), driDispatchRemapTable[WindowPos3sMESA_remap_index], parameters) +#define GET_WindowPos3sMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos3sMESA_remap_index]) +#define SET_WindowPos3sMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos3sMESA_remap_index], fn) +#define CALL_WindowPos3svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), driDispatchRemapTable[WindowPos3svMESA_remap_index], parameters) +#define GET_WindowPos3svMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos3svMESA_remap_index]) +#define SET_WindowPos3svMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos3svMESA_remap_index], fn) +#define CALL_WindowPos4dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), driDispatchRemapTable[WindowPos4dMESA_remap_index], parameters) +#define GET_WindowPos4dMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos4dMESA_remap_index]) +#define SET_WindowPos4dMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos4dMESA_remap_index], fn) +#define CALL_WindowPos4dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), driDispatchRemapTable[WindowPos4dvMESA_remap_index], parameters) +#define GET_WindowPos4dvMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos4dvMESA_remap_index]) +#define SET_WindowPos4dvMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos4dvMESA_remap_index], fn) +#define CALL_WindowPos4fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[WindowPos4fMESA_remap_index], parameters) +#define GET_WindowPos4fMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos4fMESA_remap_index]) +#define SET_WindowPos4fMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos4fMESA_remap_index], fn) +#define CALL_WindowPos4fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), driDispatchRemapTable[WindowPos4fvMESA_remap_index], parameters) +#define GET_WindowPos4fvMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos4fvMESA_remap_index]) +#define SET_WindowPos4fvMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos4fvMESA_remap_index], fn) +#define CALL_WindowPos4iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), driDispatchRemapTable[WindowPos4iMESA_remap_index], parameters) +#define GET_WindowPos4iMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos4iMESA_remap_index]) +#define SET_WindowPos4iMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos4iMESA_remap_index], fn) +#define CALL_WindowPos4ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), driDispatchRemapTable[WindowPos4ivMESA_remap_index], parameters) +#define GET_WindowPos4ivMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos4ivMESA_remap_index]) +#define SET_WindowPos4ivMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos4ivMESA_remap_index], fn) +#define CALL_WindowPos4sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), driDispatchRemapTable[WindowPos4sMESA_remap_index], parameters) +#define GET_WindowPos4sMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos4sMESA_remap_index]) +#define SET_WindowPos4sMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos4sMESA_remap_index], fn) +#define CALL_WindowPos4svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), driDispatchRemapTable[WindowPos4svMESA_remap_index], parameters) +#define GET_WindowPos4svMESA(disp) GET_by_offset(disp, driDispatchRemapTable[WindowPos4svMESA_remap_index]) +#define SET_WindowPos4svMESA(disp, fn) SET_by_offset(disp, driDispatchRemapTable[WindowPos4svMESA_remap_index], fn) +#define CALL_MultiModeDrawArraysIBM(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint)), driDispatchRemapTable[MultiModeDrawArraysIBM_remap_index], parameters) +#define GET_MultiModeDrawArraysIBM(disp) GET_by_offset(disp, driDispatchRemapTable[MultiModeDrawArraysIBM_remap_index]) +#define SET_MultiModeDrawArraysIBM(disp, fn) SET_by_offset(disp, driDispatchRemapTable[MultiModeDrawArraysIBM_remap_index], fn) +#define CALL_MultiModeDrawElementsIBM(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLenum *, const GLsizei *, GLenum, const GLvoid * const *, GLsizei, GLint)), driDispatchRemapTable[MultiModeDrawElementsIBM_remap_index], parameters) +#define GET_MultiModeDrawElementsIBM(disp) GET_by_offset(disp, driDispatchRemapTable[MultiModeDrawElementsIBM_remap_index]) +#define SET_MultiModeDrawElementsIBM(disp, fn) SET_by_offset(disp, driDispatchRemapTable[MultiModeDrawElementsIBM_remap_index], fn) +#define CALL_DeleteFencesNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), driDispatchRemapTable[DeleteFencesNV_remap_index], parameters) +#define GET_DeleteFencesNV(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteFencesNV_remap_index]) +#define SET_DeleteFencesNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteFencesNV_remap_index], fn) +#define CALL_FinishFenceNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[FinishFenceNV_remap_index], parameters) +#define GET_FinishFenceNV(disp) GET_by_offset(disp, driDispatchRemapTable[FinishFenceNV_remap_index]) +#define SET_FinishFenceNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FinishFenceNV_remap_index], fn) +#define CALL_GenFencesNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), driDispatchRemapTable[GenFencesNV_remap_index], parameters) +#define GET_GenFencesNV(disp) GET_by_offset(disp, driDispatchRemapTable[GenFencesNV_remap_index]) +#define SET_GenFencesNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GenFencesNV_remap_index], fn) +#define CALL_GetFenceivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), driDispatchRemapTable[GetFenceivNV_remap_index], parameters) +#define GET_GetFenceivNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetFenceivNV_remap_index]) +#define SET_GetFenceivNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetFenceivNV_remap_index], fn) +#define CALL_IsFenceNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[IsFenceNV_remap_index], parameters) +#define GET_IsFenceNV(disp) GET_by_offset(disp, driDispatchRemapTable[IsFenceNV_remap_index]) +#define SET_IsFenceNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsFenceNV_remap_index], fn) +#define CALL_SetFenceNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), driDispatchRemapTable[SetFenceNV_remap_index], parameters) +#define GET_SetFenceNV(disp) GET_by_offset(disp, driDispatchRemapTable[SetFenceNV_remap_index]) +#define SET_SetFenceNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SetFenceNV_remap_index], fn) +#define CALL_TestFenceNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[TestFenceNV_remap_index], parameters) +#define GET_TestFenceNV(disp) GET_by_offset(disp, driDispatchRemapTable[TestFenceNV_remap_index]) +#define SET_TestFenceNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[TestFenceNV_remap_index], fn) +#define CALL_AreProgramsResidentNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLsizei, const GLuint *, GLboolean *)), driDispatchRemapTable[AreProgramsResidentNV_remap_index], parameters) +#define GET_AreProgramsResidentNV(disp) GET_by_offset(disp, driDispatchRemapTable[AreProgramsResidentNV_remap_index]) +#define SET_AreProgramsResidentNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[AreProgramsResidentNV_remap_index], fn) +#define CALL_BindProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), driDispatchRemapTable[BindProgramNV_remap_index], parameters) +#define GET_BindProgramNV(disp) GET_by_offset(disp, driDispatchRemapTable[BindProgramNV_remap_index]) +#define SET_BindProgramNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BindProgramNV_remap_index], fn) +#define CALL_DeleteProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), driDispatchRemapTable[DeleteProgramsNV_remap_index], parameters) +#define GET_DeleteProgramsNV(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteProgramsNV_remap_index]) +#define SET_DeleteProgramsNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteProgramsNV_remap_index], fn) +#define CALL_ExecuteProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), driDispatchRemapTable[ExecuteProgramNV_remap_index], parameters) +#define GET_ExecuteProgramNV(disp) GET_by_offset(disp, driDispatchRemapTable[ExecuteProgramNV_remap_index]) +#define SET_ExecuteProgramNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ExecuteProgramNV_remap_index], fn) +#define CALL_GenProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), driDispatchRemapTable[GenProgramsNV_remap_index], parameters) +#define GET_GenProgramsNV(disp) GET_by_offset(disp, driDispatchRemapTable[GenProgramsNV_remap_index]) +#define SET_GenProgramsNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GenProgramsNV_remap_index], fn) +#define CALL_GetProgramParameterdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLdouble *)), driDispatchRemapTable[GetProgramParameterdvNV_remap_index], parameters) +#define GET_GetProgramParameterdvNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramParameterdvNV_remap_index]) +#define SET_GetProgramParameterdvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramParameterdvNV_remap_index], fn) +#define CALL_GetProgramParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLfloat *)), driDispatchRemapTable[GetProgramParameterfvNV_remap_index], parameters) +#define GET_GetProgramParameterfvNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramParameterfvNV_remap_index]) +#define SET_GetProgramParameterfvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramParameterfvNV_remap_index], fn) +#define CALL_GetProgramStringNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLubyte *)), driDispatchRemapTable[GetProgramStringNV_remap_index], parameters) +#define GET_GetProgramStringNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramStringNV_remap_index]) +#define SET_GetProgramStringNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramStringNV_remap_index], fn) +#define CALL_GetProgramivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), driDispatchRemapTable[GetProgramivNV_remap_index], parameters) +#define GET_GetProgramivNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramivNV_remap_index]) +#define SET_GetProgramivNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramivNV_remap_index], fn) +#define CALL_GetTrackMatrixivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLint *)), driDispatchRemapTable[GetTrackMatrixivNV_remap_index], parameters) +#define GET_GetTrackMatrixivNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetTrackMatrixivNV_remap_index]) +#define SET_GetTrackMatrixivNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetTrackMatrixivNV_remap_index], fn) +#define CALL_GetVertexAttribPointervNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLvoid **)), driDispatchRemapTable[GetVertexAttribPointervNV_remap_index], parameters) +#define GET_GetVertexAttribPointervNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetVertexAttribPointervNV_remap_index]) +#define SET_GetVertexAttribPointervNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetVertexAttribPointervNV_remap_index], fn) +#define CALL_GetVertexAttribdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLdouble *)), driDispatchRemapTable[GetVertexAttribdvNV_remap_index], parameters) +#define GET_GetVertexAttribdvNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetVertexAttribdvNV_remap_index]) +#define SET_GetVertexAttribdvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetVertexAttribdvNV_remap_index], fn) +#define CALL_GetVertexAttribfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLfloat *)), driDispatchRemapTable[GetVertexAttribfvNV_remap_index], parameters) +#define GET_GetVertexAttribfvNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetVertexAttribfvNV_remap_index]) +#define SET_GetVertexAttribfvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetVertexAttribfvNV_remap_index], fn) +#define CALL_GetVertexAttribivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), driDispatchRemapTable[GetVertexAttribivNV_remap_index], parameters) +#define GET_GetVertexAttribivNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetVertexAttribivNV_remap_index]) +#define SET_GetVertexAttribivNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetVertexAttribivNV_remap_index], fn) +#define CALL_IsProgramNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[IsProgramNV_remap_index], parameters) +#define GET_IsProgramNV(disp) GET_by_offset(disp, driDispatchRemapTable[IsProgramNV_remap_index]) +#define SET_IsProgramNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsProgramNV_remap_index], fn) +#define CALL_LoadProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLubyte *)), driDispatchRemapTable[LoadProgramNV_remap_index], parameters) +#define GET_LoadProgramNV(disp) GET_by_offset(disp, driDispatchRemapTable[LoadProgramNV_remap_index]) +#define SET_LoadProgramNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[LoadProgramNV_remap_index], fn) +#define CALL_ProgramParameters4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, const GLdouble *)), driDispatchRemapTable[ProgramParameters4dvNV_remap_index], parameters) +#define GET_ProgramParameters4dvNV(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramParameters4dvNV_remap_index]) +#define SET_ProgramParameters4dvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramParameters4dvNV_remap_index], fn) +#define CALL_ProgramParameters4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, const GLfloat *)), driDispatchRemapTable[ProgramParameters4fvNV_remap_index], parameters) +#define GET_ProgramParameters4fvNV(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramParameters4fvNV_remap_index]) +#define SET_ProgramParameters4fvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramParameters4fvNV_remap_index], fn) +#define CALL_RequestResidentProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), driDispatchRemapTable[RequestResidentProgramsNV_remap_index], parameters) +#define GET_RequestResidentProgramsNV(disp) GET_by_offset(disp, driDispatchRemapTable[RequestResidentProgramsNV_remap_index]) +#define SET_RequestResidentProgramsNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[RequestResidentProgramsNV_remap_index], fn) +#define CALL_TrackMatrixNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLenum)), driDispatchRemapTable[TrackMatrixNV_remap_index], parameters) +#define GET_TrackMatrixNV(disp) GET_by_offset(disp, driDispatchRemapTable[TrackMatrixNV_remap_index]) +#define SET_TrackMatrixNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[TrackMatrixNV_remap_index], fn) +#define CALL_VertexAttrib1dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble)), driDispatchRemapTable[VertexAttrib1dNV_remap_index], parameters) +#define GET_VertexAttrib1dNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1dNV_remap_index]) +#define SET_VertexAttrib1dNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1dNV_remap_index], fn) +#define CALL_VertexAttrib1dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), driDispatchRemapTable[VertexAttrib1dvNV_remap_index], parameters) +#define GET_VertexAttrib1dvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1dvNV_remap_index]) +#define SET_VertexAttrib1dvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1dvNV_remap_index], fn) +#define CALL_VertexAttrib1fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat)), driDispatchRemapTable[VertexAttrib1fNV_remap_index], parameters) +#define GET_VertexAttrib1fNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1fNV_remap_index]) +#define SET_VertexAttrib1fNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1fNV_remap_index], fn) +#define CALL_VertexAttrib1fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), driDispatchRemapTable[VertexAttrib1fvNV_remap_index], parameters) +#define GET_VertexAttrib1fvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1fvNV_remap_index]) +#define SET_VertexAttrib1fvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1fvNV_remap_index], fn) +#define CALL_VertexAttrib1sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort)), driDispatchRemapTable[VertexAttrib1sNV_remap_index], parameters) +#define GET_VertexAttrib1sNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1sNV_remap_index]) +#define SET_VertexAttrib1sNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1sNV_remap_index], fn) +#define CALL_VertexAttrib1svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), driDispatchRemapTable[VertexAttrib1svNV_remap_index], parameters) +#define GET_VertexAttrib1svNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib1svNV_remap_index]) +#define SET_VertexAttrib1svNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib1svNV_remap_index], fn) +#define CALL_VertexAttrib2dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble)), driDispatchRemapTable[VertexAttrib2dNV_remap_index], parameters) +#define GET_VertexAttrib2dNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2dNV_remap_index]) +#define SET_VertexAttrib2dNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2dNV_remap_index], fn) +#define CALL_VertexAttrib2dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), driDispatchRemapTable[VertexAttrib2dvNV_remap_index], parameters) +#define GET_VertexAttrib2dvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2dvNV_remap_index]) +#define SET_VertexAttrib2dvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2dvNV_remap_index], fn) +#define CALL_VertexAttrib2fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat)), driDispatchRemapTable[VertexAttrib2fNV_remap_index], parameters) +#define GET_VertexAttrib2fNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2fNV_remap_index]) +#define SET_VertexAttrib2fNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2fNV_remap_index], fn) +#define CALL_VertexAttrib2fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), driDispatchRemapTable[VertexAttrib2fvNV_remap_index], parameters) +#define GET_VertexAttrib2fvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2fvNV_remap_index]) +#define SET_VertexAttrib2fvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2fvNV_remap_index], fn) +#define CALL_VertexAttrib2sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort)), driDispatchRemapTable[VertexAttrib2sNV_remap_index], parameters) +#define GET_VertexAttrib2sNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2sNV_remap_index]) +#define SET_VertexAttrib2sNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2sNV_remap_index], fn) +#define CALL_VertexAttrib2svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), driDispatchRemapTable[VertexAttrib2svNV_remap_index], parameters) +#define GET_VertexAttrib2svNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib2svNV_remap_index]) +#define SET_VertexAttrib2svNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib2svNV_remap_index], fn) +#define CALL_VertexAttrib3dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble)), driDispatchRemapTable[VertexAttrib3dNV_remap_index], parameters) +#define GET_VertexAttrib3dNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3dNV_remap_index]) +#define SET_VertexAttrib3dNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3dNV_remap_index], fn) +#define CALL_VertexAttrib3dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), driDispatchRemapTable[VertexAttrib3dvNV_remap_index], parameters) +#define GET_VertexAttrib3dvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3dvNV_remap_index]) +#define SET_VertexAttrib3dvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3dvNV_remap_index], fn) +#define CALL_VertexAttrib3fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[VertexAttrib3fNV_remap_index], parameters) +#define GET_VertexAttrib3fNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3fNV_remap_index]) +#define SET_VertexAttrib3fNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3fNV_remap_index], fn) +#define CALL_VertexAttrib3fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), driDispatchRemapTable[VertexAttrib3fvNV_remap_index], parameters) +#define GET_VertexAttrib3fvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3fvNV_remap_index]) +#define SET_VertexAttrib3fvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3fvNV_remap_index], fn) +#define CALL_VertexAttrib3sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort)), driDispatchRemapTable[VertexAttrib3sNV_remap_index], parameters) +#define GET_VertexAttrib3sNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3sNV_remap_index]) +#define SET_VertexAttrib3sNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3sNV_remap_index], fn) +#define CALL_VertexAttrib3svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), driDispatchRemapTable[VertexAttrib3svNV_remap_index], parameters) +#define GET_VertexAttrib3svNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib3svNV_remap_index]) +#define SET_VertexAttrib3svNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib3svNV_remap_index], fn) +#define CALL_VertexAttrib4dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), driDispatchRemapTable[VertexAttrib4dNV_remap_index], parameters) +#define GET_VertexAttrib4dNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4dNV_remap_index]) +#define SET_VertexAttrib4dNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4dNV_remap_index], fn) +#define CALL_VertexAttrib4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), driDispatchRemapTable[VertexAttrib4dvNV_remap_index], parameters) +#define GET_VertexAttrib4dvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4dvNV_remap_index]) +#define SET_VertexAttrib4dvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4dvNV_remap_index], fn) +#define CALL_VertexAttrib4fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[VertexAttrib4fNV_remap_index], parameters) +#define GET_VertexAttrib4fNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4fNV_remap_index]) +#define SET_VertexAttrib4fNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4fNV_remap_index], fn) +#define CALL_VertexAttrib4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), driDispatchRemapTable[VertexAttrib4fvNV_remap_index], parameters) +#define GET_VertexAttrib4fvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4fvNV_remap_index]) +#define SET_VertexAttrib4fvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4fvNV_remap_index], fn) +#define CALL_VertexAttrib4sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort, GLshort)), driDispatchRemapTable[VertexAttrib4sNV_remap_index], parameters) +#define GET_VertexAttrib4sNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4sNV_remap_index]) +#define SET_VertexAttrib4sNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4sNV_remap_index], fn) +#define CALL_VertexAttrib4svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), driDispatchRemapTable[VertexAttrib4svNV_remap_index], parameters) +#define GET_VertexAttrib4svNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4svNV_remap_index]) +#define SET_VertexAttrib4svNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4svNV_remap_index], fn) +#define CALL_VertexAttrib4ubNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)), driDispatchRemapTable[VertexAttrib4ubNV_remap_index], parameters) +#define GET_VertexAttrib4ubNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4ubNV_remap_index]) +#define SET_VertexAttrib4ubNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4ubNV_remap_index], fn) +#define CALL_VertexAttrib4ubvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), driDispatchRemapTable[VertexAttrib4ubvNV_remap_index], parameters) +#define GET_VertexAttrib4ubvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttrib4ubvNV_remap_index]) +#define SET_VertexAttrib4ubvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttrib4ubvNV_remap_index], fn) +#define CALL_VertexAttribPointerNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLsizei, const GLvoid *)), driDispatchRemapTable[VertexAttribPointerNV_remap_index], parameters) +#define GET_VertexAttribPointerNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribPointerNV_remap_index]) +#define SET_VertexAttribPointerNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribPointerNV_remap_index], fn) +#define CALL_VertexAttribs1dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), driDispatchRemapTable[VertexAttribs1dvNV_remap_index], parameters) +#define GET_VertexAttribs1dvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs1dvNV_remap_index]) +#define SET_VertexAttribs1dvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs1dvNV_remap_index], fn) +#define CALL_VertexAttribs1fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), driDispatchRemapTable[VertexAttribs1fvNV_remap_index], parameters) +#define GET_VertexAttribs1fvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs1fvNV_remap_index]) +#define SET_VertexAttribs1fvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs1fvNV_remap_index], fn) +#define CALL_VertexAttribs1svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), driDispatchRemapTable[VertexAttribs1svNV_remap_index], parameters) +#define GET_VertexAttribs1svNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs1svNV_remap_index]) +#define SET_VertexAttribs1svNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs1svNV_remap_index], fn) +#define CALL_VertexAttribs2dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), driDispatchRemapTable[VertexAttribs2dvNV_remap_index], parameters) +#define GET_VertexAttribs2dvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs2dvNV_remap_index]) +#define SET_VertexAttribs2dvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs2dvNV_remap_index], fn) +#define CALL_VertexAttribs2fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), driDispatchRemapTable[VertexAttribs2fvNV_remap_index], parameters) +#define GET_VertexAttribs2fvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs2fvNV_remap_index]) +#define SET_VertexAttribs2fvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs2fvNV_remap_index], fn) +#define CALL_VertexAttribs2svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), driDispatchRemapTable[VertexAttribs2svNV_remap_index], parameters) +#define GET_VertexAttribs2svNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs2svNV_remap_index]) +#define SET_VertexAttribs2svNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs2svNV_remap_index], fn) +#define CALL_VertexAttribs3dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), driDispatchRemapTable[VertexAttribs3dvNV_remap_index], parameters) +#define GET_VertexAttribs3dvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs3dvNV_remap_index]) +#define SET_VertexAttribs3dvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs3dvNV_remap_index], fn) +#define CALL_VertexAttribs3fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), driDispatchRemapTable[VertexAttribs3fvNV_remap_index], parameters) +#define GET_VertexAttribs3fvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs3fvNV_remap_index]) +#define SET_VertexAttribs3fvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs3fvNV_remap_index], fn) +#define CALL_VertexAttribs3svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), driDispatchRemapTable[VertexAttribs3svNV_remap_index], parameters) +#define GET_VertexAttribs3svNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs3svNV_remap_index]) +#define SET_VertexAttribs3svNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs3svNV_remap_index], fn) +#define CALL_VertexAttribs4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), driDispatchRemapTable[VertexAttribs4dvNV_remap_index], parameters) +#define GET_VertexAttribs4dvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs4dvNV_remap_index]) +#define SET_VertexAttribs4dvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs4dvNV_remap_index], fn) +#define CALL_VertexAttribs4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), driDispatchRemapTable[VertexAttribs4fvNV_remap_index], parameters) +#define GET_VertexAttribs4fvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs4fvNV_remap_index]) +#define SET_VertexAttribs4fvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs4fvNV_remap_index], fn) +#define CALL_VertexAttribs4svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), driDispatchRemapTable[VertexAttribs4svNV_remap_index], parameters) +#define GET_VertexAttribs4svNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs4svNV_remap_index]) +#define SET_VertexAttribs4svNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs4svNV_remap_index], fn) +#define CALL_VertexAttribs4ubvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *)), driDispatchRemapTable[VertexAttribs4ubvNV_remap_index], parameters) +#define GET_VertexAttribs4ubvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs4ubvNV_remap_index]) +#define SET_VertexAttribs4ubvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs4ubvNV_remap_index], fn) +#define CALL_AlphaFragmentOp1ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint)), driDispatchRemapTable[AlphaFragmentOp1ATI_remap_index], parameters) +#define GET_AlphaFragmentOp1ATI(disp) GET_by_offset(disp, driDispatchRemapTable[AlphaFragmentOp1ATI_remap_index]) +#define SET_AlphaFragmentOp1ATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[AlphaFragmentOp1ATI_remap_index], fn) +#define CALL_AlphaFragmentOp2ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), driDispatchRemapTable[AlphaFragmentOp2ATI_remap_index], parameters) +#define GET_AlphaFragmentOp2ATI(disp) GET_by_offset(disp, driDispatchRemapTable[AlphaFragmentOp2ATI_remap_index]) +#define SET_AlphaFragmentOp2ATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[AlphaFragmentOp2ATI_remap_index], fn) +#define CALL_AlphaFragmentOp3ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), driDispatchRemapTable[AlphaFragmentOp3ATI_remap_index], parameters) +#define GET_AlphaFragmentOp3ATI(disp) GET_by_offset(disp, driDispatchRemapTable[AlphaFragmentOp3ATI_remap_index]) +#define SET_AlphaFragmentOp3ATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[AlphaFragmentOp3ATI_remap_index], fn) +#define CALL_BeginFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), driDispatchRemapTable[BeginFragmentShaderATI_remap_index], parameters) +#define GET_BeginFragmentShaderATI(disp) GET_by_offset(disp, driDispatchRemapTable[BeginFragmentShaderATI_remap_index]) +#define SET_BeginFragmentShaderATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BeginFragmentShaderATI_remap_index], fn) +#define CALL_BindFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[BindFragmentShaderATI_remap_index], parameters) +#define GET_BindFragmentShaderATI(disp) GET_by_offset(disp, driDispatchRemapTable[BindFragmentShaderATI_remap_index]) +#define SET_BindFragmentShaderATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BindFragmentShaderATI_remap_index], fn) +#define CALL_ColorFragmentOp1ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), driDispatchRemapTable[ColorFragmentOp1ATI_remap_index], parameters) +#define GET_ColorFragmentOp1ATI(disp) GET_by_offset(disp, driDispatchRemapTable[ColorFragmentOp1ATI_remap_index]) +#define SET_ColorFragmentOp1ATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ColorFragmentOp1ATI_remap_index], fn) +#define CALL_ColorFragmentOp2ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), driDispatchRemapTable[ColorFragmentOp2ATI_remap_index], parameters) +#define GET_ColorFragmentOp2ATI(disp) GET_by_offset(disp, driDispatchRemapTable[ColorFragmentOp2ATI_remap_index]) +#define SET_ColorFragmentOp2ATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ColorFragmentOp2ATI_remap_index], fn) +#define CALL_ColorFragmentOp3ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), driDispatchRemapTable[ColorFragmentOp3ATI_remap_index], parameters) +#define GET_ColorFragmentOp3ATI(disp) GET_by_offset(disp, driDispatchRemapTable[ColorFragmentOp3ATI_remap_index]) +#define SET_ColorFragmentOp3ATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ColorFragmentOp3ATI_remap_index], fn) +#define CALL_DeleteFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[DeleteFragmentShaderATI_remap_index], parameters) +#define GET_DeleteFragmentShaderATI(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteFragmentShaderATI_remap_index]) +#define SET_DeleteFragmentShaderATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteFragmentShaderATI_remap_index], fn) +#define CALL_EndFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), driDispatchRemapTable[EndFragmentShaderATI_remap_index], parameters) +#define GET_EndFragmentShaderATI(disp) GET_by_offset(disp, driDispatchRemapTable[EndFragmentShaderATI_remap_index]) +#define SET_EndFragmentShaderATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[EndFragmentShaderATI_remap_index], fn) +#define CALL_GenFragmentShadersATI(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[GenFragmentShadersATI_remap_index], parameters) +#define GET_GenFragmentShadersATI(disp) GET_by_offset(disp, driDispatchRemapTable[GenFragmentShadersATI_remap_index]) +#define SET_GenFragmentShadersATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GenFragmentShadersATI_remap_index], fn) +#define CALL_PassTexCoordATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLenum)), driDispatchRemapTable[PassTexCoordATI_remap_index], parameters) +#define GET_PassTexCoordATI(disp) GET_by_offset(disp, driDispatchRemapTable[PassTexCoordATI_remap_index]) +#define SET_PassTexCoordATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PassTexCoordATI_remap_index], fn) +#define CALL_SampleMapATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLenum)), driDispatchRemapTable[SampleMapATI_remap_index], parameters) +#define GET_SampleMapATI(disp) GET_by_offset(disp, driDispatchRemapTable[SampleMapATI_remap_index]) +#define SET_SampleMapATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SampleMapATI_remap_index], fn) +#define CALL_SetFragmentShaderConstantATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), driDispatchRemapTable[SetFragmentShaderConstantATI_remap_index], parameters) +#define GET_SetFragmentShaderConstantATI(disp) GET_by_offset(disp, driDispatchRemapTable[SetFragmentShaderConstantATI_remap_index]) +#define SET_SetFragmentShaderConstantATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[SetFragmentShaderConstantATI_remap_index], fn) +#define CALL_PointParameteriNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), driDispatchRemapTable[PointParameteriNV_remap_index], parameters) +#define GET_PointParameteriNV(disp) GET_by_offset(disp, driDispatchRemapTable[PointParameteriNV_remap_index]) +#define SET_PointParameteriNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PointParameteriNV_remap_index], fn) +#define CALL_PointParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), driDispatchRemapTable[PointParameterivNV_remap_index], parameters) +#define GET_PointParameterivNV(disp) GET_by_offset(disp, driDispatchRemapTable[PointParameterivNV_remap_index]) +#define SET_PointParameterivNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PointParameterivNV_remap_index], fn) +#define CALL_ActiveStencilFaceEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[ActiveStencilFaceEXT_remap_index], parameters) +#define GET_ActiveStencilFaceEXT(disp) GET_by_offset(disp, driDispatchRemapTable[ActiveStencilFaceEXT_remap_index]) +#define SET_ActiveStencilFaceEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ActiveStencilFaceEXT_remap_index], fn) +#define CALL_BindVertexArrayAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[BindVertexArrayAPPLE_remap_index], parameters) +#define GET_BindVertexArrayAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[BindVertexArrayAPPLE_remap_index]) +#define SET_BindVertexArrayAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BindVertexArrayAPPLE_remap_index], fn) +#define CALL_DeleteVertexArraysAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), driDispatchRemapTable[DeleteVertexArraysAPPLE_remap_index], parameters) +#define GET_DeleteVertexArraysAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteVertexArraysAPPLE_remap_index]) +#define SET_DeleteVertexArraysAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteVertexArraysAPPLE_remap_index], fn) +#define CALL_GenVertexArraysAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), driDispatchRemapTable[GenVertexArraysAPPLE_remap_index], parameters) +#define GET_GenVertexArraysAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[GenVertexArraysAPPLE_remap_index]) +#define SET_GenVertexArraysAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GenVertexArraysAPPLE_remap_index], fn) +#define CALL_IsVertexArrayAPPLE(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[IsVertexArrayAPPLE_remap_index], parameters) +#define GET_IsVertexArrayAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[IsVertexArrayAPPLE_remap_index]) +#define SET_IsVertexArrayAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsVertexArrayAPPLE_remap_index], fn) +#define CALL_GetProgramNamedParameterdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLdouble *)), driDispatchRemapTable[GetProgramNamedParameterdvNV_remap_index], parameters) +#define GET_GetProgramNamedParameterdvNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramNamedParameterdvNV_remap_index]) +#define SET_GetProgramNamedParameterdvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramNamedParameterdvNV_remap_index], fn) +#define CALL_GetProgramNamedParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLfloat *)), driDispatchRemapTable[GetProgramNamedParameterfvNV_remap_index], parameters) +#define GET_GetProgramNamedParameterfvNV(disp) GET_by_offset(disp, driDispatchRemapTable[GetProgramNamedParameterfvNV_remap_index]) +#define SET_GetProgramNamedParameterfvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetProgramNamedParameterfvNV_remap_index], fn) +#define CALL_ProgramNamedParameter4dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble)), driDispatchRemapTable[ProgramNamedParameter4dNV_remap_index], parameters) +#define GET_ProgramNamedParameter4dNV(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramNamedParameter4dNV_remap_index]) +#define SET_ProgramNamedParameter4dNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramNamedParameter4dNV_remap_index], fn) +#define CALL_ProgramNamedParameter4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, const GLdouble *)), driDispatchRemapTable[ProgramNamedParameter4dvNV_remap_index], parameters) +#define GET_ProgramNamedParameter4dvNV(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramNamedParameter4dvNV_remap_index]) +#define SET_ProgramNamedParameter4dvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramNamedParameter4dvNV_remap_index], fn) +#define CALL_ProgramNamedParameter4fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat)), driDispatchRemapTable[ProgramNamedParameter4fNV_remap_index], parameters) +#define GET_ProgramNamedParameter4fNV(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramNamedParameter4fNV_remap_index]) +#define SET_ProgramNamedParameter4fNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramNamedParameter4fNV_remap_index], fn) +#define CALL_ProgramNamedParameter4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, const GLfloat *)), driDispatchRemapTable[ProgramNamedParameter4fvNV_remap_index], parameters) +#define GET_ProgramNamedParameter4fvNV(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramNamedParameter4fvNV_remap_index]) +#define SET_ProgramNamedParameter4fvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramNamedParameter4fvNV_remap_index], fn) +#define CALL_DepthBoundsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampd, GLclampd)), driDispatchRemapTable[DepthBoundsEXT_remap_index], parameters) +#define GET_DepthBoundsEXT(disp) GET_by_offset(disp, driDispatchRemapTable[DepthBoundsEXT_remap_index]) +#define SET_DepthBoundsEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DepthBoundsEXT_remap_index], fn) +#define CALL_BlendEquationSeparateEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), driDispatchRemapTable[BlendEquationSeparateEXT_remap_index], parameters) +#define GET_BlendEquationSeparateEXT(disp) GET_by_offset(disp, driDispatchRemapTable[BlendEquationSeparateEXT_remap_index]) +#define SET_BlendEquationSeparateEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BlendEquationSeparateEXT_remap_index], fn) +#define CALL_BindFramebufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), driDispatchRemapTable[BindFramebufferEXT_remap_index], parameters) +#define GET_BindFramebufferEXT(disp) GET_by_offset(disp, driDispatchRemapTable[BindFramebufferEXT_remap_index]) +#define SET_BindFramebufferEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BindFramebufferEXT_remap_index], fn) +#define CALL_BindRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), driDispatchRemapTable[BindRenderbufferEXT_remap_index], parameters) +#define GET_BindRenderbufferEXT(disp) GET_by_offset(disp, driDispatchRemapTable[BindRenderbufferEXT_remap_index]) +#define SET_BindRenderbufferEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BindRenderbufferEXT_remap_index], fn) +#define CALL_CheckFramebufferStatusEXT(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[CheckFramebufferStatusEXT_remap_index], parameters) +#define GET_CheckFramebufferStatusEXT(disp) GET_by_offset(disp, driDispatchRemapTable[CheckFramebufferStatusEXT_remap_index]) +#define SET_CheckFramebufferStatusEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[CheckFramebufferStatusEXT_remap_index], fn) +#define CALL_DeleteFramebuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), driDispatchRemapTable[DeleteFramebuffersEXT_remap_index], parameters) +#define GET_DeleteFramebuffersEXT(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteFramebuffersEXT_remap_index]) +#define SET_DeleteFramebuffersEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteFramebuffersEXT_remap_index], fn) +#define CALL_DeleteRenderbuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), driDispatchRemapTable[DeleteRenderbuffersEXT_remap_index], parameters) +#define GET_DeleteRenderbuffersEXT(disp) GET_by_offset(disp, driDispatchRemapTable[DeleteRenderbuffersEXT_remap_index]) +#define SET_DeleteRenderbuffersEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DeleteRenderbuffersEXT_remap_index], fn) +#define CALL_FramebufferRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint)), driDispatchRemapTable[FramebufferRenderbufferEXT_remap_index], parameters) +#define GET_FramebufferRenderbufferEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FramebufferRenderbufferEXT_remap_index]) +#define SET_FramebufferRenderbufferEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FramebufferRenderbufferEXT_remap_index], fn) +#define CALL_FramebufferTexture1DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint)), driDispatchRemapTable[FramebufferTexture1DEXT_remap_index], parameters) +#define GET_FramebufferTexture1DEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FramebufferTexture1DEXT_remap_index]) +#define SET_FramebufferTexture1DEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FramebufferTexture1DEXT_remap_index], fn) +#define CALL_FramebufferTexture2DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint)), driDispatchRemapTable[FramebufferTexture2DEXT_remap_index], parameters) +#define GET_FramebufferTexture2DEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FramebufferTexture2DEXT_remap_index]) +#define SET_FramebufferTexture2DEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FramebufferTexture2DEXT_remap_index], fn) +#define CALL_FramebufferTexture3DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint, GLint)), driDispatchRemapTable[FramebufferTexture3DEXT_remap_index], parameters) +#define GET_FramebufferTexture3DEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FramebufferTexture3DEXT_remap_index]) +#define SET_FramebufferTexture3DEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FramebufferTexture3DEXT_remap_index], fn) +#define CALL_GenFramebuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), driDispatchRemapTable[GenFramebuffersEXT_remap_index], parameters) +#define GET_GenFramebuffersEXT(disp) GET_by_offset(disp, driDispatchRemapTable[GenFramebuffersEXT_remap_index]) +#define SET_GenFramebuffersEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GenFramebuffersEXT_remap_index], fn) +#define CALL_GenRenderbuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), driDispatchRemapTable[GenRenderbuffersEXT_remap_index], parameters) +#define GET_GenRenderbuffersEXT(disp) GET_by_offset(disp, driDispatchRemapTable[GenRenderbuffersEXT_remap_index]) +#define SET_GenRenderbuffersEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GenRenderbuffersEXT_remap_index], fn) +#define CALL_GenerateMipmapEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[GenerateMipmapEXT_remap_index], parameters) +#define GET_GenerateMipmapEXT(disp) GET_by_offset(disp, driDispatchRemapTable[GenerateMipmapEXT_remap_index]) +#define SET_GenerateMipmapEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GenerateMipmapEXT_remap_index], fn) +#define CALL_GetFramebufferAttachmentParameterivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLint *)), driDispatchRemapTable[GetFramebufferAttachmentParameterivEXT_remap_index], parameters) +#define GET_GetFramebufferAttachmentParameterivEXT(disp) GET_by_offset(disp, driDispatchRemapTable[GetFramebufferAttachmentParameterivEXT_remap_index]) +#define SET_GetFramebufferAttachmentParameterivEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetFramebufferAttachmentParameterivEXT_remap_index], fn) +#define CALL_GetRenderbufferParameterivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), driDispatchRemapTable[GetRenderbufferParameterivEXT_remap_index], parameters) +#define GET_GetRenderbufferParameterivEXT(disp) GET_by_offset(disp, driDispatchRemapTable[GetRenderbufferParameterivEXT_remap_index]) +#define SET_GetRenderbufferParameterivEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetRenderbufferParameterivEXT_remap_index], fn) +#define CALL_IsFramebufferEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[IsFramebufferEXT_remap_index], parameters) +#define GET_IsFramebufferEXT(disp) GET_by_offset(disp, driDispatchRemapTable[IsFramebufferEXT_remap_index]) +#define SET_IsFramebufferEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsFramebufferEXT_remap_index], fn) +#define CALL_IsRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), driDispatchRemapTable[IsRenderbufferEXT_remap_index], parameters) +#define GET_IsRenderbufferEXT(disp) GET_by_offset(disp, driDispatchRemapTable[IsRenderbufferEXT_remap_index]) +#define SET_IsRenderbufferEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsRenderbufferEXT_remap_index], fn) +#define CALL_RenderbufferStorageEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLsizei)), driDispatchRemapTable[RenderbufferStorageEXT_remap_index], parameters) +#define GET_RenderbufferStorageEXT(disp) GET_by_offset(disp, driDispatchRemapTable[RenderbufferStorageEXT_remap_index]) +#define SET_RenderbufferStorageEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[RenderbufferStorageEXT_remap_index], fn) +#define CALL_BlitFramebufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum)), driDispatchRemapTable[BlitFramebufferEXT_remap_index], parameters) +#define GET_BlitFramebufferEXT(disp) GET_by_offset(disp, driDispatchRemapTable[BlitFramebufferEXT_remap_index]) +#define SET_BlitFramebufferEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BlitFramebufferEXT_remap_index], fn) +#define CALL_FramebufferTextureLayerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint, GLint)), driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index], parameters) +#define GET_FramebufferTextureLayerEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index]) +#define SET_FramebufferTextureLayerEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index], fn) +#define CALL_StencilFuncSeparateATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), driDispatchRemapTable[StencilFuncSeparateATI_remap_index], parameters) +#define GET_StencilFuncSeparateATI(disp) GET_by_offset(disp, driDispatchRemapTable[StencilFuncSeparateATI_remap_index]) +#define SET_StencilFuncSeparateATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[StencilFuncSeparateATI_remap_index], fn) +#define CALL_ProgramEnvParameters4fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index], parameters) +#define GET_ProgramEnvParameters4fvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index]) +#define SET_ProgramEnvParameters4fvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index], fn) +#define CALL_ProgramLocalParameters4fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), driDispatchRemapTable[ProgramLocalParameters4fvEXT_remap_index], parameters) +#define GET_ProgramLocalParameters4fvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[ProgramLocalParameters4fvEXT_remap_index]) +#define SET_ProgramLocalParameters4fvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProgramLocalParameters4fvEXT_remap_index], fn) +#define CALL_GetQueryObjecti64vEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint64EXT *)), driDispatchRemapTable[GetQueryObjecti64vEXT_remap_index], parameters) +#define GET_GetQueryObjecti64vEXT(disp) GET_by_offset(disp, driDispatchRemapTable[GetQueryObjecti64vEXT_remap_index]) +#define SET_GetQueryObjecti64vEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetQueryObjecti64vEXT_remap_index], fn) +#define CALL_GetQueryObjectui64vEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint64EXT *)), driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index], parameters) +#define GET_GetQueryObjectui64vEXT(disp) GET_by_offset(disp, driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index]) +#define SET_GetQueryObjectui64vEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index], fn) + +#endif /* !defined(IN_DRI_DRIVER) */ + +#endif /* !defined( _DISPATCH_H_ ) */ diff --git a/GL/glx/glapi.c b/GL/glx/glapi.c new file mode 100644 index 000000000..c4d101aee --- /dev/null +++ b/GL/glx/glapi.c @@ -0,0 +1,1064 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5 + * + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +/* + * This file manages the OpenGL API dispatch layer. + * The dispatch table (struct _glapi_table) is basically just a list + * of function pointers. + * There are functions to set/get the current dispatch table for the + * current thread and to manage registration/dispatch of dynamically + * added extension functions. + * + * It's intended that this file and the other glapi*.[ch] files are + * flexible enough to be reused in several places: XFree86, DRI- + * based libGL.so, and perhaps the SGI SI. + * + * NOTE: There are no dependencies on Mesa in this code. + * + * Versions (API changes): + * 2000/02/23 - original version for Mesa 3.3 and XFree86 4.0 + * 2001/01/16 - added dispatch override feature for Mesa 3.5 + * 2002/06/28 - added _glapi_set_warning_func(), Mesa 4.1. + * 2002/10/01 - _glapi_get_proc_address() will now generate new entrypoints + * itself (using offset ~0). _glapi_add_entrypoint() can be + * called afterward and it'll fill in the correct dispatch + * offset. This allows DRI libGL to avoid probing for DRI + * drivers! No changes to the public glapi interface. + */ + + + +#ifdef HAVE_DIX_CONFIG_H + +#include +#define PUBLIC + +#else + +#include "glheader.h" + +#endif + +#include +#include + +#include "glapi.h" +#include "glapioffsets.h" +#include "glapitable.h" + +/***** BEGIN NO-OP DISPATCH *****/ + +static GLboolean WarnFlag = GL_FALSE; +static _glapi_warning_func warning_func; + +#if defined(PTHREADS) || defined(GLX_USE_TLS) +static void init_glapi_relocs(void); +#endif + +static _glapi_proc generate_entrypoint(GLuint functionOffset); +static void fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset); + +/* + * Enable/disable printing of warning messages. + */ +PUBLIC void +_glapi_noop_enable_warnings(GLboolean enable) +{ + WarnFlag = enable; +} + +/* + * Register a callback function for reporting errors. + */ +PUBLIC void +_glapi_set_warning_func( _glapi_warning_func func ) +{ + warning_func = func; +} + +static GLboolean +warn(void) +{ + if ((WarnFlag || getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) + && warning_func) { + return GL_TRUE; + } + else { + return GL_FALSE; + } +} + + +#define KEYWORD1 static +#define KEYWORD1_ALT static +#define KEYWORD2 GLAPIENTRY +#define NAME(func) NoOp##func + +#define F NULL + +#define DISPATCH(func, args, msg) \ + if (warn()) { \ + warning_func(NULL, "GL User Error: called without context: %s", #func); \ + } + +#define RETURN_DISPATCH(func, args, msg) \ + if (warn()) { \ + warning_func(NULL, "GL User Error: called without context: %s", #func); \ + } \ + return 0 + +#define DISPATCH_TABLE_NAME __glapi_noop_table +#define UNUSED_TABLE_NAME __unused_noop_functions + +#define TABLE_ENTRY(name) (_glapi_proc) NoOp##name + +static GLint NoOpUnused(void) +{ + if (warn()) { + warning_func(NULL, "GL User Error: calling extension function without a current context\n"); + } + return 0; +} + +#include "glapitemp.h" + +/***** END NO-OP DISPATCH *****/ + + + +/** + * \name Current dispatch and current context control variables + * + * Depending on whether or not multithreading is support, and the type of + * support available, several variables are used to store the current context + * pointer and the current dispatch table pointer. In the non-threaded case, + * the variables \c _glapi_Dispatch and \c _glapi_Context are used for this + * purpose. + * + * In the "normal" threaded case, the variables \c _glapi_Dispatch and + * \c _glapi_Context will be \c NULL if an application is detected as being + * multithreaded. Single-threaded applications will use \c _glapi_Dispatch + * and \c _glapi_Context just like the case without any threading support. + * When \c _glapi_Dispatch and \c _glapi_Context are \c NULL, the thread state + * data \c _gl_DispatchTSD and \c ContextTSD are used. Drivers and the + * static dispatch functions access these variables via \c _glapi_get_dispatch + * and \c _glapi_get_context. + * + * There is a race condition in setting \c _glapi_Dispatch to \c NULL. It is + * possible for the original thread to be setting it at the same instant a new + * thread, perhaps running on a different processor, is clearing it. Because + * of that, \c ThreadSafe, which can only ever be changed to \c GL_TRUE, is + * used to determine whether or not the application is multithreaded. + * + * In the TLS case, the variables \c _glapi_Dispatch and \c _glapi_Context are + * hardcoded to \c NULL. Instead the TLS variables \c _glapi_tls_Dispatch and + * \c _glapi_tls_Context are used. Having \c _glapi_Dispatch and + * \c _glapi_Context be hardcoded to \c NULL maintains binary compatability + * between TLS enabled loaders and non-TLS DRI drivers. + */ +/*@{*/ +#if defined(GLX_USE_TLS) + +PUBLIC __thread struct _glapi_table * _glapi_tls_Dispatch + __attribute__((tls_model("initial-exec"))) + = (struct _glapi_table *) __glapi_noop_table; + +PUBLIC __thread void * _glapi_tls_Context + __attribute__((tls_model("initial-exec"))); + +PUBLIC const struct _glapi_table *_glapi_Dispatch = NULL; +PUBLIC const void *_glapi_Context = NULL; + +#else + +#if defined(THREADS) + +static GLboolean ThreadSafe = GL_FALSE; /**< In thread-safe mode? */ +_glthread_TSD _gl_DispatchTSD; /**< Per-thread dispatch pointer */ +static _glthread_TSD ContextTSD; /**< Per-thread context pointer */ + +#if defined(WIN32_THREADS) +void FreeTSD(_glthread_TSD *p); +void FreeAllTSD(void) +{ + FreeTSD(&_gl_DispatchTSD); + FreeTSD(&ContextTSD); +} +#endif /* defined(WIN32_THREADS) */ + +#endif /* defined(THREADS) */ + +PUBLIC struct _glapi_table *_glapi_Dispatch = + (struct _glapi_table *) __glapi_noop_table; +PUBLIC void *_glapi_Context = NULL; + +#endif /* defined(GLX_USE_TLS) */ +/*@}*/ + + +/** + * strdup() is actually not a standard ANSI C or POSIX routine. + * Irix will not define it if ANSI mode is in effect. + */ +static char * +str_dup(const char *str) +{ + char *copy; + copy = (char*) malloc(strlen(str) + 1); + if (!copy) + return NULL; + strcpy(copy, str); + return copy; +} + + + +/** + * We should call this periodically from a function such as glXMakeCurrent + * in order to test if multiple threads are being used. + */ +void +_glapi_check_multithread(void) +{ +#if defined(THREADS) && !defined(GLX_USE_TLS) + if (!ThreadSafe) { + static unsigned long knownID; + static GLboolean firstCall = GL_TRUE; + if (firstCall) { + knownID = _glthread_GetID(); + firstCall = GL_FALSE; + } + else if (knownID != _glthread_GetID()) { + ThreadSafe = GL_TRUE; + _glapi_set_dispatch(NULL); + _glapi_set_context(NULL); + } + } + else if (!_glapi_get_dispatch()) { + /* make sure that this thread's dispatch pointer isn't null */ + _glapi_set_dispatch(NULL); + } +#endif +} + + + +/** + * Set the current context pointer for this thread. + * The context pointer is an opaque type which should be cast to + * void from the real context pointer type. + */ +PUBLIC void +_glapi_set_context(void *context) +{ + (void) __unused_noop_functions; /* silence a warning */ +#if defined(GLX_USE_TLS) + _glapi_tls_Context = context; +#elif defined(THREADS) + _glthread_SetTSD(&ContextTSD, context); + _glapi_Context = (ThreadSafe) ? NULL : context; +#else + _glapi_Context = context; +#endif +} + + + +/** + * Get the current context pointer for this thread. + * The context pointer is an opaque type which should be cast from + * void to the real context pointer type. + */ +PUBLIC void * +_glapi_get_context(void) +{ +#if defined(GLX_USE_TLS) + return _glapi_tls_Context; +#elif defined(THREADS) + if (ThreadSafe) { + return _glthread_GetTSD(&ContextTSD); + } + else { + return _glapi_Context; + } +#else + return _glapi_Context; +#endif +} + + + +/** + * Set the global or per-thread dispatch table pointer. + * If the dispatch parameter is NULL we'll plug in the no-op dispatch + * table (__glapi_noop_table). + */ +PUBLIC void +_glapi_set_dispatch(struct _glapi_table *dispatch) +{ +#if defined(PTHREADS) || defined(GLX_USE_TLS) + static pthread_once_t once_control = PTHREAD_ONCE_INIT; + pthread_once( & once_control, init_glapi_relocs ); +#endif + + if (!dispatch) { + /* use the no-op functions */ + dispatch = (struct _glapi_table *) __glapi_noop_table; + } +#ifdef DEBUG + else { + _glapi_check_table(dispatch); + } +#endif + +#if defined(GLX_USE_TLS) + _glapi_tls_Dispatch = dispatch; +#elif defined(THREADS) + _glthread_SetTSD(&_gl_DispatchTSD, (void *) dispatch); + _glapi_Dispatch = (ThreadSafe) ? NULL : dispatch; +#else /*THREADS*/ + _glapi_Dispatch = dispatch; +#endif /*THREADS*/ +} + + + +/** + * Return pointer to current dispatch table for calling thread. + */ +PUBLIC struct _glapi_table * +_glapi_get_dispatch(void) +{ + struct _glapi_table * api; +#if defined(GLX_USE_TLS) + api = _glapi_tls_Dispatch; +#elif defined(THREADS) + api = (ThreadSafe) + ? (struct _glapi_table *) _glthread_GetTSD(&_gl_DispatchTSD) + : _glapi_Dispatch; +#else + api = _glapi_Dispatch; +#endif + return api; +} + + + +/*** + *** The rest of this file is pretty much concerned with GetProcAddress + *** functionality. + ***/ + +#if defined(USE_X64_64_ASM) && defined(GLX_USE_TLS) +# define DISPATCH_FUNCTION_SIZE 16 +#elif defined(USE_X86_ASM) +# if defined(THREADS) && !defined(GLX_USE_TLS) +# define DISPATCH_FUNCTION_SIZE 32 +# else +# define DISPATCH_FUNCTION_SIZE 16 +# endif +#endif + +#if !defined(DISPATCH_FUNCTION_SIZE) && !defined(XFree86Server) && !defined(XGLServer) +# define NEED_FUNCTION_POINTER +#endif + +/* The code in this file is auto-generated with Python */ +#include "glprocs.h" + + +/** + * Search the table of static entrypoint functions for the named function + * and return the corresponding glprocs_table_t entry. + */ +static const glprocs_table_t * +find_entry( const char * n ) +{ + GLuint i; + for (i = 0; static_functions[i].Name_offset >= 0; i++) { + const char *testName = gl_string_table + static_functions[i].Name_offset; + if (strcmp(testName, n) == 0) { + return &static_functions[i]; + } + } + return NULL; +} + + +/** + * Return dispatch table offset of the named static (built-in) function. + * Return -1 if function not found. + */ +static GLint +get_static_proc_offset(const char *funcName) +{ + const glprocs_table_t * const f = find_entry( funcName ); + if (f) { + return f->Offset; + } + return -1; +} + + +#if !defined(XFree86Server) && !defined(XGLServer) +#ifdef USE_X86_ASM + +#if defined( GLX_USE_TLS ) +extern GLubyte gl_dispatch_functions_start[]; +extern GLubyte gl_dispatch_functions_end[]; +#else +extern const GLubyte gl_dispatch_functions_start[]; +#endif + +#endif /* USE_X86_ASM */ + + +/** + * Return dispatch function address for the named static (built-in) function. + * Return NULL if function not found. + */ +static _glapi_proc +get_static_proc_address(const char *funcName) +{ + const glprocs_table_t * const f = find_entry( funcName ); + if (f) { +#if defined(DISPATCH_FUNCTION_SIZE) && defined(GLX_INDIRECT_RENDERING) + return (f->Address == NULL) + ? (_glapi_proc) (gl_dispatch_functions_start + + (DISPATCH_FUNCTION_SIZE * f->Offset)) + : f->Address; +#elif defined(DISPATCH_FUNCTION_SIZE) + return (_glapi_proc) (gl_dispatch_functions_start + + (DISPATCH_FUNCTION_SIZE * f->Offset)); +#else + return f->Address; +#endif + } + else { + return NULL; + } +} + +#endif /* !defined(XFree86Server) && !defined(XGLServer) */ + + + +/** + * Return the name of the function at the given offset in the dispatch + * table. For debugging only. + */ +static const char * +get_static_proc_name( GLuint offset ) +{ + GLuint i; + for (i = 0; static_functions[i].Name_offset >= 0; i++) { + if (static_functions[i].Offset == offset) { + return gl_string_table + static_functions[i].Name_offset; + } + } + return NULL; +} + + + +/********************************************************************** + * Extension function management. + */ + +/* + * Number of extension functions which we can dynamically add at runtime. + */ +#define MAX_EXTENSION_FUNCS 300 + + +/* + * The dispatch table size (number of entries) is the size of the + * _glapi_table struct plus the number of dynamic entries we can add. + * The extra slots can be filled in by DRI drivers that register new extension + * functions. + */ +#define DISPATCH_TABLE_SIZE (sizeof(struct _glapi_table) / sizeof(void *) + MAX_EXTENSION_FUNCS) + + +/** + * Track information about a function added to the GL API. + */ +struct _glapi_function { + /** + * Name of the function. + */ + const char * name; + + + /** + * Text string that describes the types of the parameters passed to the + * named function. Parameter types are converted to characters using the + * following rules: + * - 'i' for \c GLint, \c GLuint, and \c GLenum + * - 'p' for any pointer type + * - 'f' for \c GLfloat and \c GLclampf + * - 'd' for \c GLdouble and \c GLclampd + */ + const char * parameter_signature; + + + /** + * Offset in the dispatch table where the pointer to the real function is + * located. If the driver has not requested that the named function be + * added to the dispatch table, this will have the value ~0. + */ + unsigned dispatch_offset; + + + /** + * Pointer to the dispatch stub for the named function. + * + * \todo + * The semantic of this field should be changed slightly. Currently, it + * is always expected to be non-\c NULL. However, it would be better to + * only allocate the entry-point stub when the application requests the + * function via \c glXGetProcAddress. This would save memory for all the + * functions that the driver exports but that the application never wants + * to call. + */ + _glapi_proc dispatch_stub; +}; + + +static struct _glapi_function ExtEntryTable[MAX_EXTENSION_FUNCS]; +static GLuint NumExtEntryPoints = 0; + +#ifdef USE_SPARC_ASM +extern void __glapi_sparc_icache_flush(unsigned int *); +#endif + +/** + * Generate a dispatch function (entrypoint) which jumps through + * the given slot number (offset) in the current dispatch table. + * We need assembly language in order to accomplish this. + */ +static _glapi_proc +generate_entrypoint(GLuint functionOffset) +{ +#if defined(USE_X86_ASM) + /* 32 is chosen as something of a magic offset. For x86, the dispatch + * at offset 32 is the first one where the offset in the + * "jmp OFFSET*4(%eax)" can't be encoded in a single byte. + */ + const GLubyte * const template_func = gl_dispatch_functions_start + + (DISPATCH_FUNCTION_SIZE * 32); + GLubyte * const code = (GLubyte *) malloc(DISPATCH_FUNCTION_SIZE); + + + if ( code != NULL ) { + (void) memcpy(code, template_func, DISPATCH_FUNCTION_SIZE); + fill_in_entrypoint_offset( (_glapi_proc) code, functionOffset ); + } + + return (_glapi_proc) code; +#elif defined(USE_SPARC_ASM) + +#ifdef __arch64__ + static const unsigned int insn_template[] = { + 0x05000000, /* sethi %uhi(_glapi_Dispatch), %g2 */ + 0x03000000, /* sethi %hi(_glapi_Dispatch), %g1 */ + 0x8410a000, /* or %g2, %ulo(_glapi_Dispatch), %g2 */ + 0x82106000, /* or %g1, %lo(_glapi_Dispatch), %g1 */ + 0x8528b020, /* sllx %g2, 32, %g2 */ + 0xc2584002, /* ldx [%g1 + %g2], %g1 */ + 0x05000000, /* sethi %hi(8 * glapioffset), %g2 */ + 0x8410a000, /* or %g2, %lo(8 * glapioffset), %g2 */ + 0xc6584002, /* ldx [%g1 + %g2], %g3 */ + 0x81c0c000, /* jmpl %g3, %g0 */ + 0x01000000 /* nop */ + }; +#else + static const unsigned int insn_template[] = { + 0x03000000, /* sethi %hi(_glapi_Dispatch), %g1 */ + 0xc2006000, /* ld [%g1 + %lo(_glapi_Dispatch)], %g1 */ + 0xc6006000, /* ld [%g1 + %lo(4*glapioffset)], %g3 */ + 0x81c0c000, /* jmpl %g3, %g0 */ + 0x01000000 /* nop */ + }; +#endif /* __arch64__ */ + unsigned int *code = (unsigned int *) malloc(sizeof(insn_template)); + unsigned long glapi_addr = (unsigned long) &_glapi_Dispatch; + if (code) { + memcpy(code, insn_template, sizeof(insn_template)); + +#ifdef __arch64__ + code[0] |= (glapi_addr >> (32 + 10)); + code[1] |= ((glapi_addr & 0xffffffff) >> 10); + __glapi_sparc_icache_flush(&code[0]); + code[2] |= ((glapi_addr >> 32) & ((1 << 10) - 1)); + code[3] |= (glapi_addr & ((1 << 10) - 1)); + __glapi_sparc_icache_flush(&code[2]); + code[6] |= ((functionOffset * 8) >> 10); + code[7] |= ((functionOffset * 8) & ((1 << 10) - 1)); + __glapi_sparc_icache_flush(&code[6]); +#else + code[0] |= (glapi_addr >> 10); + code[1] |= (glapi_addr & ((1 << 10) - 1)); + __glapi_sparc_icache_flush(&code[0]); + code[2] |= (functionOffset * 4); + __glapi_sparc_icache_flush(&code[2]); +#endif /* __arch64__ */ + } + return (_glapi_proc) code; +#else + (void) functionOffset; + return NULL; +#endif /* USE_*_ASM */ +} + + +/** + * This function inserts a new dispatch offset into the assembly language + * stub that was generated with the preceeding function. + */ +static void +fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset) +{ +#if defined(USE_X86_ASM) + GLubyte * const code = (GLubyte *) entrypoint; + +#if DISPATCH_FUNCTION_SIZE == 32 + *((unsigned int *)(code + 11)) = 4 * offset; + *((unsigned int *)(code + 22)) = 4 * offset; +#elif DISPATCH_FUNCTION_SIZE == 16 && defined( GLX_USE_TLS ) + *((unsigned int *)(code + 8)) = 4 * offset; +#elif DISPATCH_FUNCTION_SIZE == 16 + *((unsigned int *)(code + 7)) = 4 * offset; +#else +# error Invalid DISPATCH_FUNCTION_SIZE! +#endif + +#elif defined(USE_SPARC_ASM) + + /* XXX this hasn't been tested! */ + unsigned int *code = (unsigned int *) entrypoint; +#ifdef __arch64__ + code[6] = 0x05000000; /* sethi %hi(8 * glapioffset), %g2 */ + code[7] = 0x8410a000; /* or %g2, %lo(8 * glapioffset), %g2 */ + code[6] |= ((offset * 8) >> 10); + code[7] |= ((offset * 8) & ((1 << 10) - 1)); + __glapi_sparc_icache_flush(&code[6]); +#else /* __arch64__ */ + code[2] = 0xc6006000; /* ld [%g1 + %lo(4*glapioffset)], %g3 */ + code[2] |= (offset * 4); + __glapi_sparc_icache_flush(&code[2]); +#endif /* __arch64__ */ + +#else + + /* an unimplemented architecture */ + (void) entrypoint; + (void) offset; + +#endif /* USE_*_ASM */ +} + + +/** + * Generate new entrypoint + * + * Use a temporary dispatch offset of ~0 (i.e. -1). Later, when the driver + * calls \c _glapi_add_dispatch we'll put in the proper offset. If that + * never happens, and the user calls this function, he'll segfault. That's + * what you get when you try calling a GL function that doesn't really exist. + * + * \param funcName Name of the function to create an entry-point for. + * + * \sa _glapi_add_entrypoint + */ + +static struct _glapi_function * +add_function_name( const char * funcName ) +{ + struct _glapi_function * entry = NULL; + + if (NumExtEntryPoints < MAX_EXTENSION_FUNCS) { + _glapi_proc entrypoint = generate_entrypoint(~0); + if (entrypoint != NULL) { + entry = & ExtEntryTable[NumExtEntryPoints]; + + ExtEntryTable[NumExtEntryPoints].name = str_dup(funcName); + ExtEntryTable[NumExtEntryPoints].parameter_signature = NULL; + ExtEntryTable[NumExtEntryPoints].dispatch_offset = ~0; + ExtEntryTable[NumExtEntryPoints].dispatch_stub = entrypoint; + NumExtEntryPoints++; + } + } + + return entry; +} + + +/** + * Fill-in the dispatch stub for the named function. + * + * This function is intended to be called by a hardware driver. When called, + * a dispatch stub may be created created for the function. A pointer to this + * dispatch function will be returned by glXGetProcAddress. + * + * \param function_names Array of pointers to function names that should + * share a common dispatch offset. + * \param parameter_signature String representing the types of the parameters + * passed to the named function. Parameter types + * are converted to characters using the following + * rules: + * - 'i' for \c GLint, \c GLuint, and \c GLenum + * - 'p' for any pointer type + * - 'f' for \c GLfloat and \c GLclampf + * - 'd' for \c GLdouble and \c GLclampd + * + * \returns + * The offset in the dispatch table of the named function. A pointer to the + * driver's implementation of the named function should be stored at + * \c dispatch_table[\c offset]. + * + * \sa glXGetProcAddress + * + * \warning + * This function can only handle up to 8 names at a time. As far as I know, + * the maximum number of names ever associated with an existing GL function is + * 4 (\c glPointParameterfSGIS, \c glPointParameterfEXT, + * \c glPointParameterfARB, and \c glPointParameterf), so this should not be + * too painful of a limitation. + * + * \todo + * Determine whether or not \c parameter_signature should be allowed to be + * \c NULL. It doesn't seem like much of a hardship for drivers to have to + * pass in an empty string. + * + * \todo + * Determine if code should be added to reject function names that start with + * 'glX'. + * + * \bug + * Add code to compare \c parameter_signature with the parameter signature of + * a static function. In order to do that, we need to find a way to \b get + * the parameter signature of a static function. + */ + +PUBLIC int +_glapi_add_dispatch( const char * const * function_names, + const char * parameter_signature ) +{ + static int next_dynamic_offset = _gloffset_FIRST_DYNAMIC; + const char * const real_sig = (parameter_signature != NULL) + ? parameter_signature : ""; + struct _glapi_function * entry[8]; + GLboolean is_static[8]; + unsigned i; + unsigned j; + int offset = ~0; + int new_offset; + + + (void) memset( is_static, 0, sizeof( is_static ) ); + (void) memset( entry, 0, sizeof( entry ) ); + + for ( i = 0 ; function_names[i] != NULL ; i++ ) { + /* Do some trivial validation on the name of the function. + */ + + if (!function_names[i] || function_names[i][0] != 'g' || function_names[i][1] != 'l') + return GL_FALSE; + + /* Determine if the named function already exists. If the function does + * exist, it must have the same parameter signature as the function + * being added. + */ + + new_offset = get_static_proc_offset(function_names[i]); + if (new_offset >= 0) { + /* FIXME: Make sure the parameter signatures match! How do we get + * FIXME: the parameter signature for static functions? + */ + + if ( (offset != ~0) && (new_offset != offset) ) { + return -1; + } + + is_static[i] = GL_TRUE; + offset = new_offset; + } + + + for ( j = 0 ; j < NumExtEntryPoints ; j++ ) { + if (strcmp(ExtEntryTable[j].name, function_names[i]) == 0) { + /* The offset may be ~0 if the function name was added by + * glXGetProcAddress but never filled in by the driver. + */ + + if (ExtEntryTable[j].dispatch_offset != ~0) { + if (strcmp(real_sig, ExtEntryTable[j].parameter_signature) + != 0) { + return -1; + } + + if ( (offset != ~0) && (ExtEntryTable[j].dispatch_offset != offset) ) { + return -1; + } + + offset = ExtEntryTable[j].dispatch_offset; + } + + entry[i] = & ExtEntryTable[j]; + break; + } + } + } + + if (offset == ~0) { + offset = next_dynamic_offset; + next_dynamic_offset++; + } + + for ( i = 0 ; function_names[i] != NULL ; i++ ) { + if (! is_static[i] ) { + if (entry[i] == NULL) { + entry[i] = add_function_name( function_names[i] ); + if (entry[i] == NULL) { + /* FIXME: Possible memory leak here. + */ + return -1; + } + } + + entry[i]->parameter_signature = str_dup(real_sig); + fill_in_entrypoint_offset(entry[i]->dispatch_stub, offset); + entry[i]->dispatch_offset = offset; + } + } + + return offset; +} + + +/** + * Return offset of entrypoint for named function within dispatch table. + */ +PUBLIC GLint +_glapi_get_proc_offset(const char *funcName) +{ + /* search extension functions first */ + GLuint i; + for (i = 0; i < NumExtEntryPoints; i++) { + if (strcmp(ExtEntryTable[i].name, funcName) == 0) { + return ExtEntryTable[i].dispatch_offset; + } + } + /* search static functions */ + return get_static_proc_offset(funcName); +} + + + +/** + * Return pointer to the named function. If the function name isn't found + * in the name of static functions, try generating a new API entrypoint on + * the fly with assembly language. + */ +_glapi_proc +_glapi_get_proc_address(const char *funcName) +{ + struct _glapi_function * entry; + GLuint i; + +#ifdef MANGLE + if (funcName[0] != 'm' || funcName[1] != 'g' || funcName[2] != 'l') + return NULL; +#else + if (funcName[0] != 'g' || funcName[1] != 'l') + return NULL; +#endif + + /* search extension functions first */ + for (i = 0; i < NumExtEntryPoints; i++) { + if (strcmp(ExtEntryTable[i].name, funcName) == 0) { + return ExtEntryTable[i].dispatch_stub; + } + } + +#if !defined( XFree86Server ) && !defined( XGLServer ) + /* search static functions */ + { + const _glapi_proc func = get_static_proc_address(funcName); + if (func) + return func; + } +#endif /* !defined( XFree86Server ) */ + + entry = add_function_name(funcName); + return (entry == NULL) ? NULL : entry->dispatch_stub; +} + + + +/** + * Return the name of the function at the given dispatch offset. + * This is only intended for debugging. + */ +const char * +_glapi_get_proc_name(GLuint offset) +{ + GLuint i; + const char * n; + + /* search built-in functions */ + n = get_static_proc_name(offset); + if ( n != NULL ) { + return n; + } + + /* search added extension functions */ + for (i = 0; i < NumExtEntryPoints; i++) { + if (ExtEntryTable[i].dispatch_offset == offset) { + return ExtEntryTable[i].name; + } + } + return NULL; +} + + + +/** + * Return size of dispatch table struct as number of functions (or + * slots). + */ +PUBLIC GLuint +_glapi_get_dispatch_table_size(void) +{ + return DISPATCH_TABLE_SIZE; +} + + + +/** + * Make sure there are no NULL pointers in the given dispatch table. + * Intended for debugging purposes. + */ +void +_glapi_check_table(const struct _glapi_table *table) +{ +#ifdef DEBUG + const GLuint entries = _glapi_get_dispatch_table_size(); + const void **tab = (const void **) table; + GLuint i; + for (i = 1; i < entries; i++) { + assert(tab[i]); + } + + /* Do some spot checks to be sure that the dispatch table + * slots are assigned correctly. + */ + { + GLuint BeginOffset = _glapi_get_proc_offset("glBegin"); + char *BeginFunc = (char*) &table->Begin; + GLuint offset = (BeginFunc - (char *) table) / sizeof(void *); + assert(BeginOffset == _gloffset_Begin); + assert(BeginOffset == offset); + } + { + GLuint viewportOffset = _glapi_get_proc_offset("glViewport"); + char *viewportFunc = (char*) &table->Viewport; + GLuint offset = (viewportFunc - (char *) table) / sizeof(void *); + assert(viewportOffset == _gloffset_Viewport); + assert(viewportOffset == offset); + } + { + GLuint VertexPointerOffset = _glapi_get_proc_offset("glVertexPointer"); + char *VertexPointerFunc = (char*) &table->VertexPointer; + GLuint offset = (VertexPointerFunc - (char *) table) / sizeof(void *); + assert(VertexPointerOffset == _gloffset_VertexPointer); + assert(VertexPointerOffset == offset); + } + { + GLuint ResetMinMaxOffset = _glapi_get_proc_offset("glResetMinmax"); + char *ResetMinMaxFunc = (char*) &table->ResetMinmax; + GLuint offset = (ResetMinMaxFunc - (char *) table) / sizeof(void *); + assert(ResetMinMaxOffset == _gloffset_ResetMinmax); + assert(ResetMinMaxOffset == offset); + } + { + GLuint blendColorOffset = _glapi_get_proc_offset("glBlendColor"); + char *blendColorFunc = (char*) &table->BlendColor; + GLuint offset = (blendColorFunc - (char *) table) / sizeof(void *); + assert(blendColorOffset == _gloffset_BlendColor); + assert(blendColorOffset == offset); + } + { + GLuint secondaryColor3fOffset = _glapi_get_proc_offset("glSecondaryColor3fEXT"); + char *secondaryColor3fFunc = (char*) &table->SecondaryColor3fEXT; + GLuint offset = (secondaryColor3fFunc - (char *) table) / sizeof(void *); + assert(secondaryColor3fOffset == _gloffset_SecondaryColor3fEXT); + assert(secondaryColor3fOffset == offset); + } + { + GLuint pointParameterivOffset = _glapi_get_proc_offset("glPointParameterivNV"); + char *pointParameterivFunc = (char*) &table->PointParameterivNV; + GLuint offset = (pointParameterivFunc - (char *) table) / sizeof(void *); + assert(pointParameterivOffset == _gloffset_PointParameterivNV); + assert(pointParameterivOffset == offset); + } + { + GLuint setFenceOffset = _glapi_get_proc_offset("glSetFenceNV"); + char *setFenceFunc = (char*) &table->SetFenceNV; + GLuint offset = (setFenceFunc - (char *) table) / sizeof(void *); + assert(setFenceOffset == _gloffset_SetFenceNV); + assert(setFenceOffset == offset); + } +#else + (void) table; +#endif +} + + +#if defined(PTHREADS) || defined(GLX_USE_TLS) +/** + * Perform platform-specific GL API entry-point fixups. + */ +static void +init_glapi_relocs( void ) +{ +#if defined(USE_X86_ASM) && defined(GLX_USE_TLS) && !defined(GLX_X86_READONLY_TEXT) + extern unsigned long _x86_get_dispatch(void); + char run_time_patch[] = { + 0x65, 0xa1, 0, 0, 0, 0 /* movl %gs:0,%eax */ + }; + GLuint *offset = (GLuint *) &run_time_patch[2]; /* 32-bits for x86/32 */ + const GLubyte * const get_disp = (const GLubyte *) run_time_patch; + GLubyte * curr_func = (GLubyte *) gl_dispatch_functions_start; + + *offset = _x86_get_dispatch(); + while ( curr_func != (GLubyte *) gl_dispatch_functions_end ) { + (void) memcpy( curr_func, get_disp, sizeof(run_time_patch)); + curr_func += DISPATCH_FUNCTION_SIZE; + } +#endif +} +#endif /* defined(PTHREADS) || defined(GLX_USE_TLS) */ diff --git a/GL/glx/glapi.h b/GL/glx/glapi.h new file mode 100644 index 000000000..ddfb1cffb --- /dev/null +++ b/GL/glx/glapi.h @@ -0,0 +1,160 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5 + * + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +/** + * \mainpage Mesa GL API Module + * + * \section GLAPIIntroduction Introduction + * + * The Mesa GL API module is responsible for dispatching all the + * gl*() functions. All GL functions are dispatched by jumping through + * the current dispatch table (basically a struct full of function + * pointers.) + * + * A per-thread current dispatch table and per-thread current context + * pointer are managed by this module too. + * + * This module is intended to be non-Mesa-specific so it can be used + * with the X/DRI libGL also. + */ + + +#ifndef _GLAPI_H +#define _GLAPI_H + + +#include "GL/gl.h" +#include "glapitable.h" +#include "glthread.h" + + +typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...); + + +#if defined(USE_MGL_NAMESPACE) +#define _glapi_set_dispatch _mglapi_set_dispatch +#define _glapi_get_dispatch _mglapi_get_dispatch +#define _glapi_set_context _mglapi_set_context +#define _glapi_get_context _mglapi_get_context +#define _glapi_Context _mglapi_Context +#define _glapi_Dispatch _mglapi_Dispatch +#endif + + +/** + ** Define the GET_CURRENT_CONTEXT() macro. + ** \param C local variable which will hold the current context. + **/ +#if defined (GLX_USE_TLS) + +const extern void *_glapi_Context; +const extern struct _glapi_table *_glapi_Dispatch; + +extern __thread void * _glapi_tls_Context + __attribute__((tls_model("initial-exec"))); + +# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_tls_Context + +#else + +extern void *_glapi_Context; +extern struct _glapi_table *_glapi_Dispatch; + +# ifdef THREADS +# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) (_glapi_Context ? _glapi_Context : _glapi_get_context()) +# else +# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_Context +# endif + +#endif /* defined (GLX_USE_TLS) */ + + +/** + ** GL API public functions + **/ + +extern void +_glapi_noop_enable_warnings(GLboolean enable); + +extern void +_glapi_set_warning_func(_glapi_warning_func func); + +extern void +_glapi_check_multithread(void); + + +extern void +_glapi_set_context(void *context); + + +extern void * +_glapi_get_context(void); + + +extern void +_glapi_set_dispatch(struct _glapi_table *dispatch); + + +extern struct _glapi_table * +_glapi_get_dispatch(void); + + +extern int +_glapi_begin_dispatch_override(struct _glapi_table *override); + + +extern void +_glapi_end_dispatch_override(int layer); + + +struct _glapi_table * +_glapi_get_override_dispatch(int layer); + + +extern GLuint +_glapi_get_dispatch_table_size(void); + + +extern void +_glapi_check_table(const struct _glapi_table *table); + + +extern int +_glapi_add_dispatch( const char * const * function_names, + const char * parameter_signature ); + +extern GLint +_glapi_get_proc_offset(const char *funcName); + + +extern _glapi_proc +_glapi_get_proc_address(const char *funcName); + + +extern const char * +_glapi_get_proc_name(GLuint offset); + + +#endif diff --git a/GL/glx/glapioffsets.h b/GL/glx/glapioffsets.h new file mode 100644 index 000000000..43c265924 --- /dev/null +++ b/GL/glx/glapioffsets.h @@ -0,0 +1,1174 @@ +/* DO NOT EDIT - This file generated automatically by gl_offsets.py (from Mesa) script */ + +/* + * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * (C) Copyright IBM Corporation 2004 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL, IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#if !defined( _GLAPI_OFFSETS_H_ ) +# define _GLAPI_OFFSETS_H_ + +#define _gloffset_NewList 0 +#define _gloffset_EndList 1 +#define _gloffset_CallList 2 +#define _gloffset_CallLists 3 +#define _gloffset_DeleteLists 4 +#define _gloffset_GenLists 5 +#define _gloffset_ListBase 6 +#define _gloffset_Begin 7 +#define _gloffset_Bitmap 8 +#define _gloffset_Color3b 9 +#define _gloffset_Color3bv 10 +#define _gloffset_Color3d 11 +#define _gloffset_Color3dv 12 +#define _gloffset_Color3f 13 +#define _gloffset_Color3fv 14 +#define _gloffset_Color3i 15 +#define _gloffset_Color3iv 16 +#define _gloffset_Color3s 17 +#define _gloffset_Color3sv 18 +#define _gloffset_Color3ub 19 +#define _gloffset_Color3ubv 20 +#define _gloffset_Color3ui 21 +#define _gloffset_Color3uiv 22 +#define _gloffset_Color3us 23 +#define _gloffset_Color3usv 24 +#define _gloffset_Color4b 25 +#define _gloffset_Color4bv 26 +#define _gloffset_Color4d 27 +#define _gloffset_Color4dv 28 +#define _gloffset_Color4f 29 +#define _gloffset_Color4fv 30 +#define _gloffset_Color4i 31 +#define _gloffset_Color4iv 32 +#define _gloffset_Color4s 33 +#define _gloffset_Color4sv 34 +#define _gloffset_Color4ub 35 +#define _gloffset_Color4ubv 36 +#define _gloffset_Color4ui 37 +#define _gloffset_Color4uiv 38 +#define _gloffset_Color4us 39 +#define _gloffset_Color4usv 40 +#define _gloffset_EdgeFlag 41 +#define _gloffset_EdgeFlagv 42 +#define _gloffset_End 43 +#define _gloffset_Indexd 44 +#define _gloffset_Indexdv 45 +#define _gloffset_Indexf 46 +#define _gloffset_Indexfv 47 +#define _gloffset_Indexi 48 +#define _gloffset_Indexiv 49 +#define _gloffset_Indexs 50 +#define _gloffset_Indexsv 51 +#define _gloffset_Normal3b 52 +#define _gloffset_Normal3bv 53 +#define _gloffset_Normal3d 54 +#define _gloffset_Normal3dv 55 +#define _gloffset_Normal3f 56 +#define _gloffset_Normal3fv 57 +#define _gloffset_Normal3i 58 +#define _gloffset_Normal3iv 59 +#define _gloffset_Normal3s 60 +#define _gloffset_Normal3sv 61 +#define _gloffset_RasterPos2d 62 +#define _gloffset_RasterPos2dv 63 +#define _gloffset_RasterPos2f 64 +#define _gloffset_RasterPos2fv 65 +#define _gloffset_RasterPos2i 66 +#define _gloffset_RasterPos2iv 67 +#define _gloffset_RasterPos2s 68 +#define _gloffset_RasterPos2sv 69 +#define _gloffset_RasterPos3d 70 +#define _gloffset_RasterPos3dv 71 +#define _gloffset_RasterPos3f 72 +#define _gloffset_RasterPos3fv 73 +#define _gloffset_RasterPos3i 74 +#define _gloffset_RasterPos3iv 75 +#define _gloffset_RasterPos3s 76 +#define _gloffset_RasterPos3sv 77 +#define _gloffset_RasterPos4d 78 +#define _gloffset_RasterPos4dv 79 +#define _gloffset_RasterPos4f 80 +#define _gloffset_RasterPos4fv 81 +#define _gloffset_RasterPos4i 82 +#define _gloffset_RasterPos4iv 83 +#define _gloffset_RasterPos4s 84 +#define _gloffset_RasterPos4sv 85 +#define _gloffset_Rectd 86 +#define _gloffset_Rectdv 87 +#define _gloffset_Rectf 88 +#define _gloffset_Rectfv 89 +#define _gloffset_Recti 90 +#define _gloffset_Rectiv 91 +#define _gloffset_Rects 92 +#define _gloffset_Rectsv 93 +#define _gloffset_TexCoord1d 94 +#define _gloffset_TexCoord1dv 95 +#define _gloffset_TexCoord1f 96 +#define _gloffset_TexCoord1fv 97 +#define _gloffset_TexCoord1i 98 +#define _gloffset_TexCoord1iv 99 +#define _gloffset_TexCoord1s 100 +#define _gloffset_TexCoord1sv 101 +#define _gloffset_TexCoord2d 102 +#define _gloffset_TexCoord2dv 103 +#define _gloffset_TexCoord2f 104 +#define _gloffset_TexCoord2fv 105 +#define _gloffset_TexCoord2i 106 +#define _gloffset_TexCoord2iv 107 +#define _gloffset_TexCoord2s 108 +#define _gloffset_TexCoord2sv 109 +#define _gloffset_TexCoord3d 110 +#define _gloffset_TexCoord3dv 111 +#define _gloffset_TexCoord3f 112 +#define _gloffset_TexCoord3fv 113 +#define _gloffset_TexCoord3i 114 +#define _gloffset_TexCoord3iv 115 +#define _gloffset_TexCoord3s 116 +#define _gloffset_TexCoord3sv 117 +#define _gloffset_TexCoord4d 118 +#define _gloffset_TexCoord4dv 119 +#define _gloffset_TexCoord4f 120 +#define _gloffset_TexCoord4fv 121 +#define _gloffset_TexCoord4i 122 +#define _gloffset_TexCoord4iv 123 +#define _gloffset_TexCoord4s 124 +#define _gloffset_TexCoord4sv 125 +#define _gloffset_Vertex2d 126 +#define _gloffset_Vertex2dv 127 +#define _gloffset_Vertex2f 128 +#define _gloffset_Vertex2fv 129 +#define _gloffset_Vertex2i 130 +#define _gloffset_Vertex2iv 131 +#define _gloffset_Vertex2s 132 +#define _gloffset_Vertex2sv 133 +#define _gloffset_Vertex3d 134 +#define _gloffset_Vertex3dv 135 +#define _gloffset_Vertex3f 136 +#define _gloffset_Vertex3fv 137 +#define _gloffset_Vertex3i 138 +#define _gloffset_Vertex3iv 139 +#define _gloffset_Vertex3s 140 +#define _gloffset_Vertex3sv 141 +#define _gloffset_Vertex4d 142 +#define _gloffset_Vertex4dv 143 +#define _gloffset_Vertex4f 144 +#define _gloffset_Vertex4fv 145 +#define _gloffset_Vertex4i 146 +#define _gloffset_Vertex4iv 147 +#define _gloffset_Vertex4s 148 +#define _gloffset_Vertex4sv 149 +#define _gloffset_ClipPlane 150 +#define _gloffset_ColorMaterial 151 +#define _gloffset_CullFace 152 +#define _gloffset_Fogf 153 +#define _gloffset_Fogfv 154 +#define _gloffset_Fogi 155 +#define _gloffset_Fogiv 156 +#define _gloffset_FrontFace 157 +#define _gloffset_Hint 158 +#define _gloffset_Lightf 159 +#define _gloffset_Lightfv 160 +#define _gloffset_Lighti 161 +#define _gloffset_Lightiv 162 +#define _gloffset_LightModelf 163 +#define _gloffset_LightModelfv 164 +#define _gloffset_LightModeli 165 +#define _gloffset_LightModeliv 166 +#define _gloffset_LineStipple 167 +#define _gloffset_LineWidth 168 +#define _gloffset_Materialf 169 +#define _gloffset_Materialfv 170 +#define _gloffset_Materiali 171 +#define _gloffset_Materialiv 172 +#define _gloffset_PointSize 173 +#define _gloffset_PolygonMode 174 +#define _gloffset_PolygonStipple 175 +#define _gloffset_Scissor 176 +#define _gloffset_ShadeModel 177 +#define _gloffset_TexParameterf 178 +#define _gloffset_TexParameterfv 179 +#define _gloffset_TexParameteri 180 +#define _gloffset_TexParameteriv 181 +#define _gloffset_TexImage1D 182 +#define _gloffset_TexImage2D 183 +#define _gloffset_TexEnvf 184 +#define _gloffset_TexEnvfv 185 +#define _gloffset_TexEnvi 186 +#define _gloffset_TexEnviv 187 +#define _gloffset_TexGend 188 +#define _gloffset_TexGendv 189 +#define _gloffset_TexGenf 190 +#define _gloffset_TexGenfv 191 +#define _gloffset_TexGeni 192 +#define _gloffset_TexGeniv 193 +#define _gloffset_FeedbackBuffer 194 +#define _gloffset_SelectBuffer 195 +#define _gloffset_RenderMode 196 +#define _gloffset_InitNames 197 +#define _gloffset_LoadName 198 +#define _gloffset_PassThrough 199 +#define _gloffset_PopName 200 +#define _gloffset_PushName 201 +#define _gloffset_DrawBuffer 202 +#define _gloffset_Clear 203 +#define _gloffset_ClearAccum 204 +#define _gloffset_ClearIndex 205 +#define _gloffset_ClearColor 206 +#define _gloffset_ClearStencil 207 +#define _gloffset_ClearDepth 208 +#define _gloffset_StencilMask 209 +#define _gloffset_ColorMask 210 +#define _gloffset_DepthMask 211 +#define _gloffset_IndexMask 212 +#define _gloffset_Accum 213 +#define _gloffset_Disable 214 +#define _gloffset_Enable 215 +#define _gloffset_Finish 216 +#define _gloffset_Flush 217 +#define _gloffset_PopAttrib 218 +#define _gloffset_PushAttrib 219 +#define _gloffset_Map1d 220 +#define _gloffset_Map1f 221 +#define _gloffset_Map2d 222 +#define _gloffset_Map2f 223 +#define _gloffset_MapGrid1d 224 +#define _gloffset_MapGrid1f 225 +#define _gloffset_MapGrid2d 226 +#define _gloffset_MapGrid2f 227 +#define _gloffset_EvalCoord1d 228 +#define _gloffset_EvalCoord1dv 229 +#define _gloffset_EvalCoord1f 230 +#define _gloffset_EvalCoord1fv 231 +#define _gloffset_EvalCoord2d 232 +#define _gloffset_EvalCoord2dv 233 +#define _gloffset_EvalCoord2f 234 +#define _gloffset_EvalCoord2fv 235 +#define _gloffset_EvalMesh1 236 +#define _gloffset_EvalPoint1 237 +#define _gloffset_EvalMesh2 238 +#define _gloffset_EvalPoint2 239 +#define _gloffset_AlphaFunc 240 +#define _gloffset_BlendFunc 241 +#define _gloffset_LogicOp 242 +#define _gloffset_StencilFunc 243 +#define _gloffset_StencilOp 244 +#define _gloffset_DepthFunc 245 +#define _gloffset_PixelZoom 246 +#define _gloffset_PixelTransferf 247 +#define _gloffset_PixelTransferi 248 +#define _gloffset_PixelStoref 249 +#define _gloffset_PixelStorei 250 +#define _gloffset_PixelMapfv 251 +#define _gloffset_PixelMapuiv 252 +#define _gloffset_PixelMapusv 253 +#define _gloffset_ReadBuffer 254 +#define _gloffset_CopyPixels 255 +#define _gloffset_ReadPixels 256 +#define _gloffset_DrawPixels 257 +#define _gloffset_GetBooleanv 258 +#define _gloffset_GetClipPlane 259 +#define _gloffset_GetDoublev 260 +#define _gloffset_GetError 261 +#define _gloffset_GetFloatv 262 +#define _gloffset_GetIntegerv 263 +#define _gloffset_GetLightfv 264 +#define _gloffset_GetLightiv 265 +#define _gloffset_GetMapdv 266 +#define _gloffset_GetMapfv 267 +#define _gloffset_GetMapiv 268 +#define _gloffset_GetMaterialfv 269 +#define _gloffset_GetMaterialiv 270 +#define _gloffset_GetPixelMapfv 271 +#define _gloffset_GetPixelMapuiv 272 +#define _gloffset_GetPixelMapusv 273 +#define _gloffset_GetPolygonStipple 274 +#define _gloffset_GetString 275 +#define _gloffset_GetTexEnvfv 276 +#define _gloffset_GetTexEnviv 277 +#define _gloffset_GetTexGendv 278 +#define _gloffset_GetTexGenfv 279 +#define _gloffset_GetTexGeniv 280 +#define _gloffset_GetTexImage 281 +#define _gloffset_GetTexParameterfv 282 +#define _gloffset_GetTexParameteriv 283 +#define _gloffset_GetTexLevelParameterfv 284 +#define _gloffset_GetTexLevelParameteriv 285 +#define _gloffset_IsEnabled 286 +#define _gloffset_IsList 287 +#define _gloffset_DepthRange 288 +#define _gloffset_Frustum 289 +#define _gloffset_LoadIdentity 290 +#define _gloffset_LoadMatrixf 291 +#define _gloffset_LoadMatrixd 292 +#define _gloffset_MatrixMode 293 +#define _gloffset_MultMatrixf 294 +#define _gloffset_MultMatrixd 295 +#define _gloffset_Ortho 296 +#define _gloffset_PopMatrix 297 +#define _gloffset_PushMatrix 298 +#define _gloffset_Rotated 299 +#define _gloffset_Rotatef 300 +#define _gloffset_Scaled 301 +#define _gloffset_Scalef 302 +#define _gloffset_Translated 303 +#define _gloffset_Translatef 304 +#define _gloffset_Viewport 305 +#define _gloffset_ArrayElement 306 +#define _gloffset_BindTexture 307 +#define _gloffset_ColorPointer 308 +#define _gloffset_DisableClientState 309 +#define _gloffset_DrawArrays 310 +#define _gloffset_DrawElements 311 +#define _gloffset_EdgeFlagPointer 312 +#define _gloffset_EnableClientState 313 +#define _gloffset_IndexPointer 314 +#define _gloffset_Indexub 315 +#define _gloffset_Indexubv 316 +#define _gloffset_InterleavedArrays 317 +#define _gloffset_NormalPointer 318 +#define _gloffset_PolygonOffset 319 +#define _gloffset_TexCoordPointer 320 +#define _gloffset_VertexPointer 321 +#define _gloffset_AreTexturesResident 322 +#define _gloffset_CopyTexImage1D 323 +#define _gloffset_CopyTexImage2D 324 +#define _gloffset_CopyTexSubImage1D 325 +#define _gloffset_CopyTexSubImage2D 326 +#define _gloffset_DeleteTextures 327 +#define _gloffset_GenTextures 328 +#define _gloffset_GetPointerv 329 +#define _gloffset_IsTexture 330 +#define _gloffset_PrioritizeTextures 331 +#define _gloffset_TexSubImage1D 332 +#define _gloffset_TexSubImage2D 333 +#define _gloffset_PopClientAttrib 334 +#define _gloffset_PushClientAttrib 335 +#define _gloffset_BlendColor 336 +#define _gloffset_BlendEquation 337 +#define _gloffset_DrawRangeElements 338 +#define _gloffset_ColorTable 339 +#define _gloffset_ColorTableParameterfv 340 +#define _gloffset_ColorTableParameteriv 341 +#define _gloffset_CopyColorTable 342 +#define _gloffset_GetColorTable 343 +#define _gloffset_GetColorTableParameterfv 344 +#define _gloffset_GetColorTableParameteriv 345 +#define _gloffset_ColorSubTable 346 +#define _gloffset_CopyColorSubTable 347 +#define _gloffset_ConvolutionFilter1D 348 +#define _gloffset_ConvolutionFilter2D 349 +#define _gloffset_ConvolutionParameterf 350 +#define _gloffset_ConvolutionParameterfv 351 +#define _gloffset_ConvolutionParameteri 352 +#define _gloffset_ConvolutionParameteriv 353 +#define _gloffset_CopyConvolutionFilter1D 354 +#define _gloffset_CopyConvolutionFilter2D 355 +#define _gloffset_GetConvolutionFilter 356 +#define _gloffset_GetConvolutionParameterfv 357 +#define _gloffset_GetConvolutionParameteriv 358 +#define _gloffset_GetSeparableFilter 359 +#define _gloffset_SeparableFilter2D 360 +#define _gloffset_GetHistogram 361 +#define _gloffset_GetHistogramParameterfv 362 +#define _gloffset_GetHistogramParameteriv 363 +#define _gloffset_GetMinmax 364 +#define _gloffset_GetMinmaxParameterfv 365 +#define _gloffset_GetMinmaxParameteriv 366 +#define _gloffset_Histogram 367 +#define _gloffset_Minmax 368 +#define _gloffset_ResetHistogram 369 +#define _gloffset_ResetMinmax 370 +#define _gloffset_TexImage3D 371 +#define _gloffset_TexSubImage3D 372 +#define _gloffset_CopyTexSubImage3D 373 +#define _gloffset_ActiveTextureARB 374 +#define _gloffset_ClientActiveTextureARB 375 +#define _gloffset_MultiTexCoord1dARB 376 +#define _gloffset_MultiTexCoord1dvARB 377 +#define _gloffset_MultiTexCoord1fARB 378 +#define _gloffset_MultiTexCoord1fvARB 379 +#define _gloffset_MultiTexCoord1iARB 380 +#define _gloffset_MultiTexCoord1ivARB 381 +#define _gloffset_MultiTexCoord1sARB 382 +#define _gloffset_MultiTexCoord1svARB 383 +#define _gloffset_MultiTexCoord2dARB 384 +#define _gloffset_MultiTexCoord2dvARB 385 +#define _gloffset_MultiTexCoord2fARB 386 +#define _gloffset_MultiTexCoord2fvARB 387 +#define _gloffset_MultiTexCoord2iARB 388 +#define _gloffset_MultiTexCoord2ivARB 389 +#define _gloffset_MultiTexCoord2sARB 390 +#define _gloffset_MultiTexCoord2svARB 391 +#define _gloffset_MultiTexCoord3dARB 392 +#define _gloffset_MultiTexCoord3dvARB 393 +#define _gloffset_MultiTexCoord3fARB 394 +#define _gloffset_MultiTexCoord3fvARB 395 +#define _gloffset_MultiTexCoord3iARB 396 +#define _gloffset_MultiTexCoord3ivARB 397 +#define _gloffset_MultiTexCoord3sARB 398 +#define _gloffset_MultiTexCoord3svARB 399 +#define _gloffset_MultiTexCoord4dARB 400 +#define _gloffset_MultiTexCoord4dvARB 401 +#define _gloffset_MultiTexCoord4fARB 402 +#define _gloffset_MultiTexCoord4fvARB 403 +#define _gloffset_MultiTexCoord4iARB 404 +#define _gloffset_MultiTexCoord4ivARB 405 +#define _gloffset_MultiTexCoord4sARB 406 +#define _gloffset_MultiTexCoord4svARB 407 + +#if !defined(IN_DRI_DRIVER) + +#define _gloffset_AttachShader 408 +#define _gloffset_CreateProgram 409 +#define _gloffset_CreateShader 410 +#define _gloffset_DeleteProgram 411 +#define _gloffset_DeleteShader 412 +#define _gloffset_DetachShader 413 +#define _gloffset_GetAttachedShaders 414 +#define _gloffset_GetProgramInfoLog 415 +#define _gloffset_GetProgramiv 416 +#define _gloffset_GetShaderInfoLog 417 +#define _gloffset_GetShaderiv 418 +#define _gloffset_IsProgram 419 +#define _gloffset_IsShader 420 +#define _gloffset_StencilFuncSeparate 421 +#define _gloffset_StencilMaskSeparate 422 +#define _gloffset_StencilOpSeparate 423 +#define _gloffset_UniformMatrix2x3fv 424 +#define _gloffset_UniformMatrix2x4fv 425 +#define _gloffset_UniformMatrix3x2fv 426 +#define _gloffset_UniformMatrix3x4fv 427 +#define _gloffset_UniformMatrix4x2fv 428 +#define _gloffset_UniformMatrix4x3fv 429 +#define _gloffset_LoadTransposeMatrixdARB 430 +#define _gloffset_LoadTransposeMatrixfARB 431 +#define _gloffset_MultTransposeMatrixdARB 432 +#define _gloffset_MultTransposeMatrixfARB 433 +#define _gloffset_SampleCoverageARB 434 +#define _gloffset_CompressedTexImage1DARB 435 +#define _gloffset_CompressedTexImage2DARB 436 +#define _gloffset_CompressedTexImage3DARB 437 +#define _gloffset_CompressedTexSubImage1DARB 438 +#define _gloffset_CompressedTexSubImage2DARB 439 +#define _gloffset_CompressedTexSubImage3DARB 440 +#define _gloffset_GetCompressedTexImageARB 441 +#define _gloffset_DisableVertexAttribArrayARB 442 +#define _gloffset_EnableVertexAttribArrayARB 443 +#define _gloffset_GetProgramEnvParameterdvARB 444 +#define _gloffset_GetProgramEnvParameterfvARB 445 +#define _gloffset_GetProgramLocalParameterdvARB 446 +#define _gloffset_GetProgramLocalParameterfvARB 447 +#define _gloffset_GetProgramStringARB 448 +#define _gloffset_GetProgramivARB 449 +#define _gloffset_GetVertexAttribdvARB 450 +#define _gloffset_GetVertexAttribfvARB 451 +#define _gloffset_GetVertexAttribivARB 452 +#define _gloffset_ProgramEnvParameter4dARB 453 +#define _gloffset_ProgramEnvParameter4dvARB 454 +#define _gloffset_ProgramEnvParameter4fARB 455 +#define _gloffset_ProgramEnvParameter4fvARB 456 +#define _gloffset_ProgramLocalParameter4dARB 457 +#define _gloffset_ProgramLocalParameter4dvARB 458 +#define _gloffset_ProgramLocalParameter4fARB 459 +#define _gloffset_ProgramLocalParameter4fvARB 460 +#define _gloffset_ProgramStringARB 461 +#define _gloffset_VertexAttrib1dARB 462 +#define _gloffset_VertexAttrib1dvARB 463 +#define _gloffset_VertexAttrib1fARB 464 +#define _gloffset_VertexAttrib1fvARB 465 +#define _gloffset_VertexAttrib1sARB 466 +#define _gloffset_VertexAttrib1svARB 467 +#define _gloffset_VertexAttrib2dARB 468 +#define _gloffset_VertexAttrib2dvARB 469 +#define _gloffset_VertexAttrib2fARB 470 +#define _gloffset_VertexAttrib2fvARB 471 +#define _gloffset_VertexAttrib2sARB 472 +#define _gloffset_VertexAttrib2svARB 473 +#define _gloffset_VertexAttrib3dARB 474 +#define _gloffset_VertexAttrib3dvARB 475 +#define _gloffset_VertexAttrib3fARB 476 +#define _gloffset_VertexAttrib3fvARB 477 +#define _gloffset_VertexAttrib3sARB 478 +#define _gloffset_VertexAttrib3svARB 479 +#define _gloffset_VertexAttrib4NbvARB 480 +#define _gloffset_VertexAttrib4NivARB 481 +#define _gloffset_VertexAttrib4NsvARB 482 +#define _gloffset_VertexAttrib4NubARB 483 +#define _gloffset_VertexAttrib4NubvARB 484 +#define _gloffset_VertexAttrib4NuivARB 485 +#define _gloffset_VertexAttrib4NusvARB 486 +#define _gloffset_VertexAttrib4bvARB 487 +#define _gloffset_VertexAttrib4dARB 488 +#define _gloffset_VertexAttrib4dvARB 489 +#define _gloffset_VertexAttrib4fARB 490 +#define _gloffset_VertexAttrib4fvARB 491 +#define _gloffset_VertexAttrib4ivARB 492 +#define _gloffset_VertexAttrib4sARB 493 +#define _gloffset_VertexAttrib4svARB 494 +#define _gloffset_VertexAttrib4ubvARB 495 +#define _gloffset_VertexAttrib4uivARB 496 +#define _gloffset_VertexAttrib4usvARB 497 +#define _gloffset_VertexAttribPointerARB 498 +#define _gloffset_BindBufferARB 499 +#define _gloffset_BufferDataARB 500 +#define _gloffset_BufferSubDataARB 501 +#define _gloffset_DeleteBuffersARB 502 +#define _gloffset_GenBuffersARB 503 +#define _gloffset_GetBufferParameterivARB 504 +#define _gloffset_GetBufferPointervARB 505 +#define _gloffset_GetBufferSubDataARB 506 +#define _gloffset_IsBufferARB 507 +#define _gloffset_MapBufferARB 508 +#define _gloffset_UnmapBufferARB 509 +#define _gloffset_BeginQueryARB 510 +#define _gloffset_DeleteQueriesARB 511 +#define _gloffset_EndQueryARB 512 +#define _gloffset_GenQueriesARB 513 +#define _gloffset_GetQueryObjectivARB 514 +#define _gloffset_GetQueryObjectuivARB 515 +#define _gloffset_GetQueryivARB 516 +#define _gloffset_IsQueryARB 517 +#define _gloffset_AttachObjectARB 518 +#define _gloffset_CompileShaderARB 519 +#define _gloffset_CreateProgramObjectARB 520 +#define _gloffset_CreateShaderObjectARB 521 +#define _gloffset_DeleteObjectARB 522 +#define _gloffset_DetachObjectARB 523 +#define _gloffset_GetActiveUniformARB 524 +#define _gloffset_GetAttachedObjectsARB 525 +#define _gloffset_GetHandleARB 526 +#define _gloffset_GetInfoLogARB 527 +#define _gloffset_GetObjectParameterfvARB 528 +#define _gloffset_GetObjectParameterivARB 529 +#define _gloffset_GetShaderSourceARB 530 +#define _gloffset_GetUniformLocationARB 531 +#define _gloffset_GetUniformfvARB 532 +#define _gloffset_GetUniformivARB 533 +#define _gloffset_LinkProgramARB 534 +#define _gloffset_ShaderSourceARB 535 +#define _gloffset_Uniform1fARB 536 +#define _gloffset_Uniform1fvARB 537 +#define _gloffset_Uniform1iARB 538 +#define _gloffset_Uniform1ivARB 539 +#define _gloffset_Uniform2fARB 540 +#define _gloffset_Uniform2fvARB 541 +#define _gloffset_Uniform2iARB 542 +#define _gloffset_Uniform2ivARB 543 +#define _gloffset_Uniform3fARB 544 +#define _gloffset_Uniform3fvARB 545 +#define _gloffset_Uniform3iARB 546 +#define _gloffset_Uniform3ivARB 547 +#define _gloffset_Uniform4fARB 548 +#define _gloffset_Uniform4fvARB 549 +#define _gloffset_Uniform4iARB 550 +#define _gloffset_Uniform4ivARB 551 +#define _gloffset_UniformMatrix2fvARB 552 +#define _gloffset_UniformMatrix3fvARB 553 +#define _gloffset_UniformMatrix4fvARB 554 +#define _gloffset_UseProgramObjectARB 555 +#define _gloffset_ValidateProgramARB 556 +#define _gloffset_BindAttribLocationARB 557 +#define _gloffset_GetActiveAttribARB 558 +#define _gloffset_GetAttribLocationARB 559 +#define _gloffset_DrawBuffersARB 560 +#define _gloffset_PolygonOffsetEXT 561 +#define _gloffset_GetPixelTexGenParameterfvSGIS 562 +#define _gloffset_GetPixelTexGenParameterivSGIS 563 +#define _gloffset_PixelTexGenParameterfSGIS 564 +#define _gloffset_PixelTexGenParameterfvSGIS 565 +#define _gloffset_PixelTexGenParameteriSGIS 566 +#define _gloffset_PixelTexGenParameterivSGIS 567 +#define _gloffset_SampleMaskSGIS 568 +#define _gloffset_SamplePatternSGIS 569 +#define _gloffset_ColorPointerEXT 570 +#define _gloffset_EdgeFlagPointerEXT 571 +#define _gloffset_IndexPointerEXT 572 +#define _gloffset_NormalPointerEXT 573 +#define _gloffset_TexCoordPointerEXT 574 +#define _gloffset_VertexPointerEXT 575 +#define _gloffset_PointParameterfEXT 576 +#define _gloffset_PointParameterfvEXT 577 +#define _gloffset_LockArraysEXT 578 +#define _gloffset_UnlockArraysEXT 579 +#define _gloffset_CullParameterdvEXT 580 +#define _gloffset_CullParameterfvEXT 581 +#define _gloffset_SecondaryColor3bEXT 582 +#define _gloffset_SecondaryColor3bvEXT 583 +#define _gloffset_SecondaryColor3dEXT 584 +#define _gloffset_SecondaryColor3dvEXT 585 +#define _gloffset_SecondaryColor3fEXT 586 +#define _gloffset_SecondaryColor3fvEXT 587 +#define _gloffset_SecondaryColor3iEXT 588 +#define _gloffset_SecondaryColor3ivEXT 589 +#define _gloffset_SecondaryColor3sEXT 590 +#define _gloffset_SecondaryColor3svEXT 591 +#define _gloffset_SecondaryColor3ubEXT 592 +#define _gloffset_SecondaryColor3ubvEXT 593 +#define _gloffset_SecondaryColor3uiEXT 594 +#define _gloffset_SecondaryColor3uivEXT 595 +#define _gloffset_SecondaryColor3usEXT 596 +#define _gloffset_SecondaryColor3usvEXT 597 +#define _gloffset_SecondaryColorPointerEXT 598 +#define _gloffset_MultiDrawArraysEXT 599 +#define _gloffset_MultiDrawElementsEXT 600 +#define _gloffset_FogCoordPointerEXT 601 +#define _gloffset_FogCoorddEXT 602 +#define _gloffset_FogCoorddvEXT 603 +#define _gloffset_FogCoordfEXT 604 +#define _gloffset_FogCoordfvEXT 605 +#define _gloffset_PixelTexGenSGIX 606 +#define _gloffset_BlendFuncSeparateEXT 607 +#define _gloffset_FlushVertexArrayRangeNV 608 +#define _gloffset_VertexArrayRangeNV 609 +#define _gloffset_CombinerInputNV 610 +#define _gloffset_CombinerOutputNV 611 +#define _gloffset_CombinerParameterfNV 612 +#define _gloffset_CombinerParameterfvNV 613 +#define _gloffset_CombinerParameteriNV 614 +#define _gloffset_CombinerParameterivNV 615 +#define _gloffset_FinalCombinerInputNV 616 +#define _gloffset_GetCombinerInputParameterfvNV 617 +#define _gloffset_GetCombinerInputParameterivNV 618 +#define _gloffset_GetCombinerOutputParameterfvNV 619 +#define _gloffset_GetCombinerOutputParameterivNV 620 +#define _gloffset_GetFinalCombinerInputParameterfvNV 621 +#define _gloffset_GetFinalCombinerInputParameterivNV 622 +#define _gloffset_ResizeBuffersMESA 623 +#define _gloffset_WindowPos2dMESA 624 +#define _gloffset_WindowPos2dvMESA 625 +#define _gloffset_WindowPos2fMESA 626 +#define _gloffset_WindowPos2fvMESA 627 +#define _gloffset_WindowPos2iMESA 628 +#define _gloffset_WindowPos2ivMESA 629 +#define _gloffset_WindowPos2sMESA 630 +#define _gloffset_WindowPos2svMESA 631 +#define _gloffset_WindowPos3dMESA 632 +#define _gloffset_WindowPos3dvMESA 633 +#define _gloffset_WindowPos3fMESA 634 +#define _gloffset_WindowPos3fvMESA 635 +#define _gloffset_WindowPos3iMESA 636 +#define _gloffset_WindowPos3ivMESA 637 +#define _gloffset_WindowPos3sMESA 638 +#define _gloffset_WindowPos3svMESA 639 +#define _gloffset_WindowPos4dMESA 640 +#define _gloffset_WindowPos4dvMESA 641 +#define _gloffset_WindowPos4fMESA 642 +#define _gloffset_WindowPos4fvMESA 643 +#define _gloffset_WindowPos4iMESA 644 +#define _gloffset_WindowPos4ivMESA 645 +#define _gloffset_WindowPos4sMESA 646 +#define _gloffset_WindowPos4svMESA 647 +#define _gloffset_MultiModeDrawArraysIBM 648 +#define _gloffset_MultiModeDrawElementsIBM 649 +#define _gloffset_DeleteFencesNV 650 +#define _gloffset_FinishFenceNV 651 +#define _gloffset_GenFencesNV 652 +#define _gloffset_GetFenceivNV 653 +#define _gloffset_IsFenceNV 654 +#define _gloffset_SetFenceNV 655 +#define _gloffset_TestFenceNV 656 +#define _gloffset_AreProgramsResidentNV 657 +#define _gloffset_BindProgramNV 658 +#define _gloffset_DeleteProgramsNV 659 +#define _gloffset_ExecuteProgramNV 660 +#define _gloffset_GenProgramsNV 661 +#define _gloffset_GetProgramParameterdvNV 662 +#define _gloffset_GetProgramParameterfvNV 663 +#define _gloffset_GetProgramStringNV 664 +#define _gloffset_GetProgramivNV 665 +#define _gloffset_GetTrackMatrixivNV 666 +#define _gloffset_GetVertexAttribPointervNV 667 +#define _gloffset_GetVertexAttribdvNV 668 +#define _gloffset_GetVertexAttribfvNV 669 +#define _gloffset_GetVertexAttribivNV 670 +#define _gloffset_IsProgramNV 671 +#define _gloffset_LoadProgramNV 672 +#define _gloffset_ProgramParameters4dvNV 673 +#define _gloffset_ProgramParameters4fvNV 674 +#define _gloffset_RequestResidentProgramsNV 675 +#define _gloffset_TrackMatrixNV 676 +#define _gloffset_VertexAttrib1dNV 677 +#define _gloffset_VertexAttrib1dvNV 678 +#define _gloffset_VertexAttrib1fNV 679 +#define _gloffset_VertexAttrib1fvNV 680 +#define _gloffset_VertexAttrib1sNV 681 +#define _gloffset_VertexAttrib1svNV 682 +#define _gloffset_VertexAttrib2dNV 683 +#define _gloffset_VertexAttrib2dvNV 684 +#define _gloffset_VertexAttrib2fNV 685 +#define _gloffset_VertexAttrib2fvNV 686 +#define _gloffset_VertexAttrib2sNV 687 +#define _gloffset_VertexAttrib2svNV 688 +#define _gloffset_VertexAttrib3dNV 689 +#define _gloffset_VertexAttrib3dvNV 690 +#define _gloffset_VertexAttrib3fNV 691 +#define _gloffset_VertexAttrib3fvNV 692 +#define _gloffset_VertexAttrib3sNV 693 +#define _gloffset_VertexAttrib3svNV 694 +#define _gloffset_VertexAttrib4dNV 695 +#define _gloffset_VertexAttrib4dvNV 696 +#define _gloffset_VertexAttrib4fNV 697 +#define _gloffset_VertexAttrib4fvNV 698 +#define _gloffset_VertexAttrib4sNV 699 +#define _gloffset_VertexAttrib4svNV 700 +#define _gloffset_VertexAttrib4ubNV 701 +#define _gloffset_VertexAttrib4ubvNV 702 +#define _gloffset_VertexAttribPointerNV 703 +#define _gloffset_VertexAttribs1dvNV 704 +#define _gloffset_VertexAttribs1fvNV 705 +#define _gloffset_VertexAttribs1svNV 706 +#define _gloffset_VertexAttribs2dvNV 707 +#define _gloffset_VertexAttribs2fvNV 708 +#define _gloffset_VertexAttribs2svNV 709 +#define _gloffset_VertexAttribs3dvNV 710 +#define _gloffset_VertexAttribs3fvNV 711 +#define _gloffset_VertexAttribs3svNV 712 +#define _gloffset_VertexAttribs4dvNV 713 +#define _gloffset_VertexAttribs4fvNV 714 +#define _gloffset_VertexAttribs4svNV 715 +#define _gloffset_VertexAttribs4ubvNV 716 +#define _gloffset_AlphaFragmentOp1ATI 717 +#define _gloffset_AlphaFragmentOp2ATI 718 +#define _gloffset_AlphaFragmentOp3ATI 719 +#define _gloffset_BeginFragmentShaderATI 720 +#define _gloffset_BindFragmentShaderATI 721 +#define _gloffset_ColorFragmentOp1ATI 722 +#define _gloffset_ColorFragmentOp2ATI 723 +#define _gloffset_ColorFragmentOp3ATI 724 +#define _gloffset_DeleteFragmentShaderATI 725 +#define _gloffset_EndFragmentShaderATI 726 +#define _gloffset_GenFragmentShadersATI 727 +#define _gloffset_PassTexCoordATI 728 +#define _gloffset_SampleMapATI 729 +#define _gloffset_SetFragmentShaderConstantATI 730 +#define _gloffset_PointParameteriNV 731 +#define _gloffset_PointParameterivNV 732 +#define _gloffset_ActiveStencilFaceEXT 733 +#define _gloffset_BindVertexArrayAPPLE 734 +#define _gloffset_DeleteVertexArraysAPPLE 735 +#define _gloffset_GenVertexArraysAPPLE 736 +#define _gloffset_IsVertexArrayAPPLE 737 +#define _gloffset_GetProgramNamedParameterdvNV 738 +#define _gloffset_GetProgramNamedParameterfvNV 739 +#define _gloffset_ProgramNamedParameter4dNV 740 +#define _gloffset_ProgramNamedParameter4dvNV 741 +#define _gloffset_ProgramNamedParameter4fNV 742 +#define _gloffset_ProgramNamedParameter4fvNV 743 +#define _gloffset_DepthBoundsEXT 744 +#define _gloffset_BlendEquationSeparateEXT 745 +#define _gloffset_BindFramebufferEXT 746 +#define _gloffset_BindRenderbufferEXT 747 +#define _gloffset_CheckFramebufferStatusEXT 748 +#define _gloffset_DeleteFramebuffersEXT 749 +#define _gloffset_DeleteRenderbuffersEXT 750 +#define _gloffset_FramebufferRenderbufferEXT 751 +#define _gloffset_FramebufferTexture1DEXT 752 +#define _gloffset_FramebufferTexture2DEXT 753 +#define _gloffset_FramebufferTexture3DEXT 754 +#define _gloffset_GenFramebuffersEXT 755 +#define _gloffset_GenRenderbuffersEXT 756 +#define _gloffset_GenerateMipmapEXT 757 +#define _gloffset_GetFramebufferAttachmentParameterivEXT 758 +#define _gloffset_GetRenderbufferParameterivEXT 759 +#define _gloffset_IsFramebufferEXT 760 +#define _gloffset_IsRenderbufferEXT 761 +#define _gloffset_RenderbufferStorageEXT 762 +#define _gloffset_BlitFramebufferEXT 763 +#define _gloffset_FramebufferTextureLayerEXT 764 +#define _gloffset_StencilFuncSeparateATI 765 +#define _gloffset_ProgramEnvParameters4fvEXT 766 +#define _gloffset_ProgramLocalParameters4fvEXT 767 +#define _gloffset_GetQueryObjecti64vEXT 768 +#define _gloffset_GetQueryObjectui64vEXT 769 +#define _gloffset_FIRST_DYNAMIC 770 + +#else + +#define _gloffset_AttachShader driDispatchRemapTable[AttachShader_remap_index] +#define _gloffset_CreateProgram driDispatchRemapTable[CreateProgram_remap_index] +#define _gloffset_CreateShader driDispatchRemapTable[CreateShader_remap_index] +#define _gloffset_DeleteProgram driDispatchRemapTable[DeleteProgram_remap_index] +#define _gloffset_DeleteShader driDispatchRemapTable[DeleteShader_remap_index] +#define _gloffset_DetachShader driDispatchRemapTable[DetachShader_remap_index] +#define _gloffset_GetAttachedShaders driDispatchRemapTable[GetAttachedShaders_remap_index] +#define _gloffset_GetProgramInfoLog driDispatchRemapTable[GetProgramInfoLog_remap_index] +#define _gloffset_GetProgramiv driDispatchRemapTable[GetProgramiv_remap_index] +#define _gloffset_GetShaderInfoLog driDispatchRemapTable[GetShaderInfoLog_remap_index] +#define _gloffset_GetShaderiv driDispatchRemapTable[GetShaderiv_remap_index] +#define _gloffset_IsProgram driDispatchRemapTable[IsProgram_remap_index] +#define _gloffset_IsShader driDispatchRemapTable[IsShader_remap_index] +#define _gloffset_StencilFuncSeparate driDispatchRemapTable[StencilFuncSeparate_remap_index] +#define _gloffset_StencilMaskSeparate driDispatchRemapTable[StencilMaskSeparate_remap_index] +#define _gloffset_StencilOpSeparate driDispatchRemapTable[StencilOpSeparate_remap_index] +#define _gloffset_UniformMatrix2x3fv driDispatchRemapTable[UniformMatrix2x3fv_remap_index] +#define _gloffset_UniformMatrix2x4fv driDispatchRemapTable[UniformMatrix2x4fv_remap_index] +#define _gloffset_UniformMatrix3x2fv driDispatchRemapTable[UniformMatrix3x2fv_remap_index] +#define _gloffset_UniformMatrix3x4fv driDispatchRemapTable[UniformMatrix3x4fv_remap_index] +#define _gloffset_UniformMatrix4x2fv driDispatchRemapTable[UniformMatrix4x2fv_remap_index] +#define _gloffset_UniformMatrix4x3fv driDispatchRemapTable[UniformMatrix4x3fv_remap_index] +#define _gloffset_LoadTransposeMatrixdARB driDispatchRemapTable[LoadTransposeMatrixdARB_remap_index] +#define _gloffset_LoadTransposeMatrixfARB driDispatchRemapTable[LoadTransposeMatrixfARB_remap_index] +#define _gloffset_MultTransposeMatrixdARB driDispatchRemapTable[MultTransposeMatrixdARB_remap_index] +#define _gloffset_MultTransposeMatrixfARB driDispatchRemapTable[MultTransposeMatrixfARB_remap_index] +#define _gloffset_SampleCoverageARB driDispatchRemapTable[SampleCoverageARB_remap_index] +#define _gloffset_CompressedTexImage1DARB driDispatchRemapTable[CompressedTexImage1DARB_remap_index] +#define _gloffset_CompressedTexImage2DARB driDispatchRemapTable[CompressedTexImage2DARB_remap_index] +#define _gloffset_CompressedTexImage3DARB driDispatchRemapTable[CompressedTexImage3DARB_remap_index] +#define _gloffset_CompressedTexSubImage1DARB driDispatchRemapTable[CompressedTexSubImage1DARB_remap_index] +#define _gloffset_CompressedTexSubImage2DARB driDispatchRemapTable[CompressedTexSubImage2DARB_remap_index] +#define _gloffset_CompressedTexSubImage3DARB driDispatchRemapTable[CompressedTexSubImage3DARB_remap_index] +#define _gloffset_GetCompressedTexImageARB driDispatchRemapTable[GetCompressedTexImageARB_remap_index] +#define _gloffset_DisableVertexAttribArrayARB driDispatchRemapTable[DisableVertexAttribArrayARB_remap_index] +#define _gloffset_EnableVertexAttribArrayARB driDispatchRemapTable[EnableVertexAttribArrayARB_remap_index] +#define _gloffset_GetProgramEnvParameterdvARB driDispatchRemapTable[GetProgramEnvParameterdvARB_remap_index] +#define _gloffset_GetProgramEnvParameterfvARB driDispatchRemapTable[GetProgramEnvParameterfvARB_remap_index] +#define _gloffset_GetProgramLocalParameterdvARB driDispatchRemapTable[GetProgramLocalParameterdvARB_remap_index] +#define _gloffset_GetProgramLocalParameterfvARB driDispatchRemapTable[GetProgramLocalParameterfvARB_remap_index] +#define _gloffset_GetProgramStringARB driDispatchRemapTable[GetProgramStringARB_remap_index] +#define _gloffset_GetProgramivARB driDispatchRemapTable[GetProgramivARB_remap_index] +#define _gloffset_GetVertexAttribdvARB driDispatchRemapTable[GetVertexAttribdvARB_remap_index] +#define _gloffset_GetVertexAttribfvARB driDispatchRemapTable[GetVertexAttribfvARB_remap_index] +#define _gloffset_GetVertexAttribivARB driDispatchRemapTable[GetVertexAttribivARB_remap_index] +#define _gloffset_ProgramEnvParameter4dARB driDispatchRemapTable[ProgramEnvParameter4dARB_remap_index] +#define _gloffset_ProgramEnvParameter4dvARB driDispatchRemapTable[ProgramEnvParameter4dvARB_remap_index] +#define _gloffset_ProgramEnvParameter4fARB driDispatchRemapTable[ProgramEnvParameter4fARB_remap_index] +#define _gloffset_ProgramEnvParameter4fvARB driDispatchRemapTable[ProgramEnvParameter4fvARB_remap_index] +#define _gloffset_ProgramLocalParameter4dARB driDispatchRemapTable[ProgramLocalParameter4dARB_remap_index] +#define _gloffset_ProgramLocalParameter4dvARB driDispatchRemapTable[ProgramLocalParameter4dvARB_remap_index] +#define _gloffset_ProgramLocalParameter4fARB driDispatchRemapTable[ProgramLocalParameter4fARB_remap_index] +#define _gloffset_ProgramLocalParameter4fvARB driDispatchRemapTable[ProgramLocalParameter4fvARB_remap_index] +#define _gloffset_ProgramStringARB driDispatchRemapTable[ProgramStringARB_remap_index] +#define _gloffset_VertexAttrib1dARB driDispatchRemapTable[VertexAttrib1dARB_remap_index] +#define _gloffset_VertexAttrib1dvARB driDispatchRemapTable[VertexAttrib1dvARB_remap_index] +#define _gloffset_VertexAttrib1fARB driDispatchRemapTable[VertexAttrib1fARB_remap_index] +#define _gloffset_VertexAttrib1fvARB driDispatchRemapTable[VertexAttrib1fvARB_remap_index] +#define _gloffset_VertexAttrib1sARB driDispatchRemapTable[VertexAttrib1sARB_remap_index] +#define _gloffset_VertexAttrib1svARB driDispatchRemapTable[VertexAttrib1svARB_remap_index] +#define _gloffset_VertexAttrib2dARB driDispatchRemapTable[VertexAttrib2dARB_remap_index] +#define _gloffset_VertexAttrib2dvARB driDispatchRemapTable[VertexAttrib2dvARB_remap_index] +#define _gloffset_VertexAttrib2fARB driDispatchRemapTable[VertexAttrib2fARB_remap_index] +#define _gloffset_VertexAttrib2fvARB driDispatchRemapTable[VertexAttrib2fvARB_remap_index] +#define _gloffset_VertexAttrib2sARB driDispatchRemapTable[VertexAttrib2sARB_remap_index] +#define _gloffset_VertexAttrib2svARB driDispatchRemapTable[VertexAttrib2svARB_remap_index] +#define _gloffset_VertexAttrib3dARB driDispatchRemapTable[VertexAttrib3dARB_remap_index] +#define _gloffset_VertexAttrib3dvARB driDispatchRemapTable[VertexAttrib3dvARB_remap_index] +#define _gloffset_VertexAttrib3fARB driDispatchRemapTable[VertexAttrib3fARB_remap_index] +#define _gloffset_VertexAttrib3fvARB driDispatchRemapTable[VertexAttrib3fvARB_remap_index] +#define _gloffset_VertexAttrib3sARB driDispatchRemapTable[VertexAttrib3sARB_remap_index] +#define _gloffset_VertexAttrib3svARB driDispatchRemapTable[VertexAttrib3svARB_remap_index] +#define _gloffset_VertexAttrib4NbvARB driDispatchRemapTable[VertexAttrib4NbvARB_remap_index] +#define _gloffset_VertexAttrib4NivARB driDispatchRemapTable[VertexAttrib4NivARB_remap_index] +#define _gloffset_VertexAttrib4NsvARB driDispatchRemapTable[VertexAttrib4NsvARB_remap_index] +#define _gloffset_VertexAttrib4NubARB driDispatchRemapTable[VertexAttrib4NubARB_remap_index] +#define _gloffset_VertexAttrib4NubvARB driDispatchRemapTable[VertexAttrib4NubvARB_remap_index] +#define _gloffset_VertexAttrib4NuivARB driDispatchRemapTable[VertexAttrib4NuivARB_remap_index] +#define _gloffset_VertexAttrib4NusvARB driDispatchRemapTable[VertexAttrib4NusvARB_remap_index] +#define _gloffset_VertexAttrib4bvARB driDispatchRemapTable[VertexAttrib4bvARB_remap_index] +#define _gloffset_VertexAttrib4dARB driDispatchRemapTable[VertexAttrib4dARB_remap_index] +#define _gloffset_VertexAttrib4dvARB driDispatchRemapTable[VertexAttrib4dvARB_remap_index] +#define _gloffset_VertexAttrib4fARB driDispatchRemapTable[VertexAttrib4fARB_remap_index] +#define _gloffset_VertexAttrib4fvARB driDispatchRemapTable[VertexAttrib4fvARB_remap_index] +#define _gloffset_VertexAttrib4ivARB driDispatchRemapTable[VertexAttrib4ivARB_remap_index] +#define _gloffset_VertexAttrib4sARB driDispatchRemapTable[VertexAttrib4sARB_remap_index] +#define _gloffset_VertexAttrib4svARB driDispatchRemapTable[VertexAttrib4svARB_remap_index] +#define _gloffset_VertexAttrib4ubvARB driDispatchRemapTable[VertexAttrib4ubvARB_remap_index] +#define _gloffset_VertexAttrib4uivARB driDispatchRemapTable[VertexAttrib4uivARB_remap_index] +#define _gloffset_VertexAttrib4usvARB driDispatchRemapTable[VertexAttrib4usvARB_remap_index] +#define _gloffset_VertexAttribPointerARB driDispatchRemapTable[VertexAttribPointerARB_remap_index] +#define _gloffset_BindBufferARB driDispatchRemapTable[BindBufferARB_remap_index] +#define _gloffset_BufferDataARB driDispatchRemapTable[BufferDataARB_remap_index] +#define _gloffset_BufferSubDataARB driDispatchRemapTable[BufferSubDataARB_remap_index] +#define _gloffset_DeleteBuffersARB driDispatchRemapTable[DeleteBuffersARB_remap_index] +#define _gloffset_GenBuffersARB driDispatchRemapTable[GenBuffersARB_remap_index] +#define _gloffset_GetBufferParameterivARB driDispatchRemapTable[GetBufferParameterivARB_remap_index] +#define _gloffset_GetBufferPointervARB driDispatchRemapTable[GetBufferPointervARB_remap_index] +#define _gloffset_GetBufferSubDataARB driDispatchRemapTable[GetBufferSubDataARB_remap_index] +#define _gloffset_IsBufferARB driDispatchRemapTable[IsBufferARB_remap_index] +#define _gloffset_MapBufferARB driDispatchRemapTable[MapBufferARB_remap_index] +#define _gloffset_UnmapBufferARB driDispatchRemapTable[UnmapBufferARB_remap_index] +#define _gloffset_BeginQueryARB driDispatchRemapTable[BeginQueryARB_remap_index] +#define _gloffset_DeleteQueriesARB driDispatchRemapTable[DeleteQueriesARB_remap_index] +#define _gloffset_EndQueryARB driDispatchRemapTable[EndQueryARB_remap_index] +#define _gloffset_GenQueriesARB driDispatchRemapTable[GenQueriesARB_remap_index] +#define _gloffset_GetQueryObjectivARB driDispatchRemapTable[GetQueryObjectivARB_remap_index] +#define _gloffset_GetQueryObjectuivARB driDispatchRemapTable[GetQueryObjectuivARB_remap_index] +#define _gloffset_GetQueryivARB driDispatchRemapTable[GetQueryivARB_remap_index] +#define _gloffset_IsQueryARB driDispatchRemapTable[IsQueryARB_remap_index] +#define _gloffset_AttachObjectARB driDispatchRemapTable[AttachObjectARB_remap_index] +#define _gloffset_CompileShaderARB driDispatchRemapTable[CompileShaderARB_remap_index] +#define _gloffset_CreateProgramObjectARB driDispatchRemapTable[CreateProgramObjectARB_remap_index] +#define _gloffset_CreateShaderObjectARB driDispatchRemapTable[CreateShaderObjectARB_remap_index] +#define _gloffset_DeleteObjectARB driDispatchRemapTable[DeleteObjectARB_remap_index] +#define _gloffset_DetachObjectARB driDispatchRemapTable[DetachObjectARB_remap_index] +#define _gloffset_GetActiveUniformARB driDispatchRemapTable[GetActiveUniformARB_remap_index] +#define _gloffset_GetAttachedObjectsARB driDispatchRemapTable[GetAttachedObjectsARB_remap_index] +#define _gloffset_GetHandleARB driDispatchRemapTable[GetHandleARB_remap_index] +#define _gloffset_GetInfoLogARB driDispatchRemapTable[GetInfoLogARB_remap_index] +#define _gloffset_GetObjectParameterfvARB driDispatchRemapTable[GetObjectParameterfvARB_remap_index] +#define _gloffset_GetObjectParameterivARB driDispatchRemapTable[GetObjectParameterivARB_remap_index] +#define _gloffset_GetShaderSourceARB driDispatchRemapTable[GetShaderSourceARB_remap_index] +#define _gloffset_GetUniformLocationARB driDispatchRemapTable[GetUniformLocationARB_remap_index] +#define _gloffset_GetUniformfvARB driDispatchRemapTable[GetUniformfvARB_remap_index] +#define _gloffset_GetUniformivARB driDispatchRemapTable[GetUniformivARB_remap_index] +#define _gloffset_LinkProgramARB driDispatchRemapTable[LinkProgramARB_remap_index] +#define _gloffset_ShaderSourceARB driDispatchRemapTable[ShaderSourceARB_remap_index] +#define _gloffset_Uniform1fARB driDispatchRemapTable[Uniform1fARB_remap_index] +#define _gloffset_Uniform1fvARB driDispatchRemapTable[Uniform1fvARB_remap_index] +#define _gloffset_Uniform1iARB driDispatchRemapTable[Uniform1iARB_remap_index] +#define _gloffset_Uniform1ivARB driDispatchRemapTable[Uniform1ivARB_remap_index] +#define _gloffset_Uniform2fARB driDispatchRemapTable[Uniform2fARB_remap_index] +#define _gloffset_Uniform2fvARB driDispatchRemapTable[Uniform2fvARB_remap_index] +#define _gloffset_Uniform2iARB driDispatchRemapTable[Uniform2iARB_remap_index] +#define _gloffset_Uniform2ivARB driDispatchRemapTable[Uniform2ivARB_remap_index] +#define _gloffset_Uniform3fARB driDispatchRemapTable[Uniform3fARB_remap_index] +#define _gloffset_Uniform3fvARB driDispatchRemapTable[Uniform3fvARB_remap_index] +#define _gloffset_Uniform3iARB driDispatchRemapTable[Uniform3iARB_remap_index] +#define _gloffset_Uniform3ivARB driDispatchRemapTable[Uniform3ivARB_remap_index] +#define _gloffset_Uniform4fARB driDispatchRemapTable[Uniform4fARB_remap_index] +#define _gloffset_Uniform4fvARB driDispatchRemapTable[Uniform4fvARB_remap_index] +#define _gloffset_Uniform4iARB driDispatchRemapTable[Uniform4iARB_remap_index] +#define _gloffset_Uniform4ivARB driDispatchRemapTable[Uniform4ivARB_remap_index] +#define _gloffset_UniformMatrix2fvARB driDispatchRemapTable[UniformMatrix2fvARB_remap_index] +#define _gloffset_UniformMatrix3fvARB driDispatchRemapTable[UniformMatrix3fvARB_remap_index] +#define _gloffset_UniformMatrix4fvARB driDispatchRemapTable[UniformMatrix4fvARB_remap_index] +#define _gloffset_UseProgramObjectARB driDispatchRemapTable[UseProgramObjectARB_remap_index] +#define _gloffset_ValidateProgramARB driDispatchRemapTable[ValidateProgramARB_remap_index] +#define _gloffset_BindAttribLocationARB driDispatchRemapTable[BindAttribLocationARB_remap_index] +#define _gloffset_GetActiveAttribARB driDispatchRemapTable[GetActiveAttribARB_remap_index] +#define _gloffset_GetAttribLocationARB driDispatchRemapTable[GetAttribLocationARB_remap_index] +#define _gloffset_DrawBuffersARB driDispatchRemapTable[DrawBuffersARB_remap_index] +#define _gloffset_PolygonOffsetEXT driDispatchRemapTable[PolygonOffsetEXT_remap_index] +#define _gloffset_GetPixelTexGenParameterfvSGIS driDispatchRemapTable[GetPixelTexGenParameterfvSGIS_remap_index] +#define _gloffset_GetPixelTexGenParameterivSGIS driDispatchRemapTable[GetPixelTexGenParameterivSGIS_remap_index] +#define _gloffset_PixelTexGenParameterfSGIS driDispatchRemapTable[PixelTexGenParameterfSGIS_remap_index] +#define _gloffset_PixelTexGenParameterfvSGIS driDispatchRemapTable[PixelTexGenParameterfvSGIS_remap_index] +#define _gloffset_PixelTexGenParameteriSGIS driDispatchRemapTable[PixelTexGenParameteriSGIS_remap_index] +#define _gloffset_PixelTexGenParameterivSGIS driDispatchRemapTable[PixelTexGenParameterivSGIS_remap_index] +#define _gloffset_SampleMaskSGIS driDispatchRemapTable[SampleMaskSGIS_remap_index] +#define _gloffset_SamplePatternSGIS driDispatchRemapTable[SamplePatternSGIS_remap_index] +#define _gloffset_ColorPointerEXT driDispatchRemapTable[ColorPointerEXT_remap_index] +#define _gloffset_EdgeFlagPointerEXT driDispatchRemapTable[EdgeFlagPointerEXT_remap_index] +#define _gloffset_IndexPointerEXT driDispatchRemapTable[IndexPointerEXT_remap_index] +#define _gloffset_NormalPointerEXT driDispatchRemapTable[NormalPointerEXT_remap_index] +#define _gloffset_TexCoordPointerEXT driDispatchRemapTable[TexCoordPointerEXT_remap_index] +#define _gloffset_VertexPointerEXT driDispatchRemapTable[VertexPointerEXT_remap_index] +#define _gloffset_PointParameterfEXT driDispatchRemapTable[PointParameterfEXT_remap_index] +#define _gloffset_PointParameterfvEXT driDispatchRemapTable[PointParameterfvEXT_remap_index] +#define _gloffset_LockArraysEXT driDispatchRemapTable[LockArraysEXT_remap_index] +#define _gloffset_UnlockArraysEXT driDispatchRemapTable[UnlockArraysEXT_remap_index] +#define _gloffset_CullParameterdvEXT driDispatchRemapTable[CullParameterdvEXT_remap_index] +#define _gloffset_CullParameterfvEXT driDispatchRemapTable[CullParameterfvEXT_remap_index] +#define _gloffset_SecondaryColor3bEXT driDispatchRemapTable[SecondaryColor3bEXT_remap_index] +#define _gloffset_SecondaryColor3bvEXT driDispatchRemapTable[SecondaryColor3bvEXT_remap_index] +#define _gloffset_SecondaryColor3dEXT driDispatchRemapTable[SecondaryColor3dEXT_remap_index] +#define _gloffset_SecondaryColor3dvEXT driDispatchRemapTable[SecondaryColor3dvEXT_remap_index] +#define _gloffset_SecondaryColor3fEXT driDispatchRemapTable[SecondaryColor3fEXT_remap_index] +#define _gloffset_SecondaryColor3fvEXT driDispatchRemapTable[SecondaryColor3fvEXT_remap_index] +#define _gloffset_SecondaryColor3iEXT driDispatchRemapTable[SecondaryColor3iEXT_remap_index] +#define _gloffset_SecondaryColor3ivEXT driDispatchRemapTable[SecondaryColor3ivEXT_remap_index] +#define _gloffset_SecondaryColor3sEXT driDispatchRemapTable[SecondaryColor3sEXT_remap_index] +#define _gloffset_SecondaryColor3svEXT driDispatchRemapTable[SecondaryColor3svEXT_remap_index] +#define _gloffset_SecondaryColor3ubEXT driDispatchRemapTable[SecondaryColor3ubEXT_remap_index] +#define _gloffset_SecondaryColor3ubvEXT driDispatchRemapTable[SecondaryColor3ubvEXT_remap_index] +#define _gloffset_SecondaryColor3uiEXT driDispatchRemapTable[SecondaryColor3uiEXT_remap_index] +#define _gloffset_SecondaryColor3uivEXT driDispatchRemapTable[SecondaryColor3uivEXT_remap_index] +#define _gloffset_SecondaryColor3usEXT driDispatchRemapTable[SecondaryColor3usEXT_remap_index] +#define _gloffset_SecondaryColor3usvEXT driDispatchRemapTable[SecondaryColor3usvEXT_remap_index] +#define _gloffset_SecondaryColorPointerEXT driDispatchRemapTable[SecondaryColorPointerEXT_remap_index] +#define _gloffset_MultiDrawArraysEXT driDispatchRemapTable[MultiDrawArraysEXT_remap_index] +#define _gloffset_MultiDrawElementsEXT driDispatchRemapTable[MultiDrawElementsEXT_remap_index] +#define _gloffset_FogCoordPointerEXT driDispatchRemapTable[FogCoordPointerEXT_remap_index] +#define _gloffset_FogCoorddEXT driDispatchRemapTable[FogCoorddEXT_remap_index] +#define _gloffset_FogCoorddvEXT driDispatchRemapTable[FogCoorddvEXT_remap_index] +#define _gloffset_FogCoordfEXT driDispatchRemapTable[FogCoordfEXT_remap_index] +#define _gloffset_FogCoordfvEXT driDispatchRemapTable[FogCoordfvEXT_remap_index] +#define _gloffset_PixelTexGenSGIX driDispatchRemapTable[PixelTexGenSGIX_remap_index] +#define _gloffset_BlendFuncSeparateEXT driDispatchRemapTable[BlendFuncSeparateEXT_remap_index] +#define _gloffset_FlushVertexArrayRangeNV driDispatchRemapTable[FlushVertexArrayRangeNV_remap_index] +#define _gloffset_VertexArrayRangeNV driDispatchRemapTable[VertexArrayRangeNV_remap_index] +#define _gloffset_CombinerInputNV driDispatchRemapTable[CombinerInputNV_remap_index] +#define _gloffset_CombinerOutputNV driDispatchRemapTable[CombinerOutputNV_remap_index] +#define _gloffset_CombinerParameterfNV driDispatchRemapTable[CombinerParameterfNV_remap_index] +#define _gloffset_CombinerParameterfvNV driDispatchRemapTable[CombinerParameterfvNV_remap_index] +#define _gloffset_CombinerParameteriNV driDispatchRemapTable[CombinerParameteriNV_remap_index] +#define _gloffset_CombinerParameterivNV driDispatchRemapTable[CombinerParameterivNV_remap_index] +#define _gloffset_FinalCombinerInputNV driDispatchRemapTable[FinalCombinerInputNV_remap_index] +#define _gloffset_GetCombinerInputParameterfvNV driDispatchRemapTable[GetCombinerInputParameterfvNV_remap_index] +#define _gloffset_GetCombinerInputParameterivNV driDispatchRemapTable[GetCombinerInputParameterivNV_remap_index] +#define _gloffset_GetCombinerOutputParameterfvNV driDispatchRemapTable[GetCombinerOutputParameterfvNV_remap_index] +#define _gloffset_GetCombinerOutputParameterivNV driDispatchRemapTable[GetCombinerOutputParameterivNV_remap_index] +#define _gloffset_GetFinalCombinerInputParameterfvNV driDispatchRemapTable[GetFinalCombinerInputParameterfvNV_remap_index] +#define _gloffset_GetFinalCombinerInputParameterivNV driDispatchRemapTable[GetFinalCombinerInputParameterivNV_remap_index] +#define _gloffset_ResizeBuffersMESA driDispatchRemapTable[ResizeBuffersMESA_remap_index] +#define _gloffset_WindowPos2dMESA driDispatchRemapTable[WindowPos2dMESA_remap_index] +#define _gloffset_WindowPos2dvMESA driDispatchRemapTable[WindowPos2dvMESA_remap_index] +#define _gloffset_WindowPos2fMESA driDispatchRemapTable[WindowPos2fMESA_remap_index] +#define _gloffset_WindowPos2fvMESA driDispatchRemapTable[WindowPos2fvMESA_remap_index] +#define _gloffset_WindowPos2iMESA driDispatchRemapTable[WindowPos2iMESA_remap_index] +#define _gloffset_WindowPos2ivMESA driDispatchRemapTable[WindowPos2ivMESA_remap_index] +#define _gloffset_WindowPos2sMESA driDispatchRemapTable[WindowPos2sMESA_remap_index] +#define _gloffset_WindowPos2svMESA driDispatchRemapTable[WindowPos2svMESA_remap_index] +#define _gloffset_WindowPos3dMESA driDispatchRemapTable[WindowPos3dMESA_remap_index] +#define _gloffset_WindowPos3dvMESA driDispatchRemapTable[WindowPos3dvMESA_remap_index] +#define _gloffset_WindowPos3fMESA driDispatchRemapTable[WindowPos3fMESA_remap_index] +#define _gloffset_WindowPos3fvMESA driDispatchRemapTable[WindowPos3fvMESA_remap_index] +#define _gloffset_WindowPos3iMESA driDispatchRemapTable[WindowPos3iMESA_remap_index] +#define _gloffset_WindowPos3ivMESA driDispatchRemapTable[WindowPos3ivMESA_remap_index] +#define _gloffset_WindowPos3sMESA driDispatchRemapTable[WindowPos3sMESA_remap_index] +#define _gloffset_WindowPos3svMESA driDispatchRemapTable[WindowPos3svMESA_remap_index] +#define _gloffset_WindowPos4dMESA driDispatchRemapTable[WindowPos4dMESA_remap_index] +#define _gloffset_WindowPos4dvMESA driDispatchRemapTable[WindowPos4dvMESA_remap_index] +#define _gloffset_WindowPos4fMESA driDispatchRemapTable[WindowPos4fMESA_remap_index] +#define _gloffset_WindowPos4fvMESA driDispatchRemapTable[WindowPos4fvMESA_remap_index] +#define _gloffset_WindowPos4iMESA driDispatchRemapTable[WindowPos4iMESA_remap_index] +#define _gloffset_WindowPos4ivMESA driDispatchRemapTable[WindowPos4ivMESA_remap_index] +#define _gloffset_WindowPos4sMESA driDispatchRemapTable[WindowPos4sMESA_remap_index] +#define _gloffset_WindowPos4svMESA driDispatchRemapTable[WindowPos4svMESA_remap_index] +#define _gloffset_MultiModeDrawArraysIBM driDispatchRemapTable[MultiModeDrawArraysIBM_remap_index] +#define _gloffset_MultiModeDrawElementsIBM driDispatchRemapTable[MultiModeDrawElementsIBM_remap_index] +#define _gloffset_DeleteFencesNV driDispatchRemapTable[DeleteFencesNV_remap_index] +#define _gloffset_FinishFenceNV driDispatchRemapTable[FinishFenceNV_remap_index] +#define _gloffset_GenFencesNV driDispatchRemapTable[GenFencesNV_remap_index] +#define _gloffset_GetFenceivNV driDispatchRemapTable[GetFenceivNV_remap_index] +#define _gloffset_IsFenceNV driDispatchRemapTable[IsFenceNV_remap_index] +#define _gloffset_SetFenceNV driDispatchRemapTable[SetFenceNV_remap_index] +#define _gloffset_TestFenceNV driDispatchRemapTable[TestFenceNV_remap_index] +#define _gloffset_AreProgramsResidentNV driDispatchRemapTable[AreProgramsResidentNV_remap_index] +#define _gloffset_BindProgramNV driDispatchRemapTable[BindProgramNV_remap_index] +#define _gloffset_DeleteProgramsNV driDispatchRemapTable[DeleteProgramsNV_remap_index] +#define _gloffset_ExecuteProgramNV driDispatchRemapTable[ExecuteProgramNV_remap_index] +#define _gloffset_GenProgramsNV driDispatchRemapTable[GenProgramsNV_remap_index] +#define _gloffset_GetProgramParameterdvNV driDispatchRemapTable[GetProgramParameterdvNV_remap_index] +#define _gloffset_GetProgramParameterfvNV driDispatchRemapTable[GetProgramParameterfvNV_remap_index] +#define _gloffset_GetProgramStringNV driDispatchRemapTable[GetProgramStringNV_remap_index] +#define _gloffset_GetProgramivNV driDispatchRemapTable[GetProgramivNV_remap_index] +#define _gloffset_GetTrackMatrixivNV driDispatchRemapTable[GetTrackMatrixivNV_remap_index] +#define _gloffset_GetVertexAttribPointervNV driDispatchRemapTable[GetVertexAttribPointervNV_remap_index] +#define _gloffset_GetVertexAttribdvNV driDispatchRemapTable[GetVertexAttribdvNV_remap_index] +#define _gloffset_GetVertexAttribfvNV driDispatchRemapTable[GetVertexAttribfvNV_remap_index] +#define _gloffset_GetVertexAttribivNV driDispatchRemapTable[GetVertexAttribivNV_remap_index] +#define _gloffset_IsProgramNV driDispatchRemapTable[IsProgramNV_remap_index] +#define _gloffset_LoadProgramNV driDispatchRemapTable[LoadProgramNV_remap_index] +#define _gloffset_ProgramParameters4dvNV driDispatchRemapTable[ProgramParameters4dvNV_remap_index] +#define _gloffset_ProgramParameters4fvNV driDispatchRemapTable[ProgramParameters4fvNV_remap_index] +#define _gloffset_RequestResidentProgramsNV driDispatchRemapTable[RequestResidentProgramsNV_remap_index] +#define _gloffset_TrackMatrixNV driDispatchRemapTable[TrackMatrixNV_remap_index] +#define _gloffset_VertexAttrib1dNV driDispatchRemapTable[VertexAttrib1dNV_remap_index] +#define _gloffset_VertexAttrib1dvNV driDispatchRemapTable[VertexAttrib1dvNV_remap_index] +#define _gloffset_VertexAttrib1fNV driDispatchRemapTable[VertexAttrib1fNV_remap_index] +#define _gloffset_VertexAttrib1fvNV driDispatchRemapTable[VertexAttrib1fvNV_remap_index] +#define _gloffset_VertexAttrib1sNV driDispatchRemapTable[VertexAttrib1sNV_remap_index] +#define _gloffset_VertexAttrib1svNV driDispatchRemapTable[VertexAttrib1svNV_remap_index] +#define _gloffset_VertexAttrib2dNV driDispatchRemapTable[VertexAttrib2dNV_remap_index] +#define _gloffset_VertexAttrib2dvNV driDispatchRemapTable[VertexAttrib2dvNV_remap_index] +#define _gloffset_VertexAttrib2fNV driDispatchRemapTable[VertexAttrib2fNV_remap_index] +#define _gloffset_VertexAttrib2fvNV driDispatchRemapTable[VertexAttrib2fvNV_remap_index] +#define _gloffset_VertexAttrib2sNV driDispatchRemapTable[VertexAttrib2sNV_remap_index] +#define _gloffset_VertexAttrib2svNV driDispatchRemapTable[VertexAttrib2svNV_remap_index] +#define _gloffset_VertexAttrib3dNV driDispatchRemapTable[VertexAttrib3dNV_remap_index] +#define _gloffset_VertexAttrib3dvNV driDispatchRemapTable[VertexAttrib3dvNV_remap_index] +#define _gloffset_VertexAttrib3fNV driDispatchRemapTable[VertexAttrib3fNV_remap_index] +#define _gloffset_VertexAttrib3fvNV driDispatchRemapTable[VertexAttrib3fvNV_remap_index] +#define _gloffset_VertexAttrib3sNV driDispatchRemapTable[VertexAttrib3sNV_remap_index] +#define _gloffset_VertexAttrib3svNV driDispatchRemapTable[VertexAttrib3svNV_remap_index] +#define _gloffset_VertexAttrib4dNV driDispatchRemapTable[VertexAttrib4dNV_remap_index] +#define _gloffset_VertexAttrib4dvNV driDispatchRemapTable[VertexAttrib4dvNV_remap_index] +#define _gloffset_VertexAttrib4fNV driDispatchRemapTable[VertexAttrib4fNV_remap_index] +#define _gloffset_VertexAttrib4fvNV driDispatchRemapTable[VertexAttrib4fvNV_remap_index] +#define _gloffset_VertexAttrib4sNV driDispatchRemapTable[VertexAttrib4sNV_remap_index] +#define _gloffset_VertexAttrib4svNV driDispatchRemapTable[VertexAttrib4svNV_remap_index] +#define _gloffset_VertexAttrib4ubNV driDispatchRemapTable[VertexAttrib4ubNV_remap_index] +#define _gloffset_VertexAttrib4ubvNV driDispatchRemapTable[VertexAttrib4ubvNV_remap_index] +#define _gloffset_VertexAttribPointerNV driDispatchRemapTable[VertexAttribPointerNV_remap_index] +#define _gloffset_VertexAttribs1dvNV driDispatchRemapTable[VertexAttribs1dvNV_remap_index] +#define _gloffset_VertexAttribs1fvNV driDispatchRemapTable[VertexAttribs1fvNV_remap_index] +#define _gloffset_VertexAttribs1svNV driDispatchRemapTable[VertexAttribs1svNV_remap_index] +#define _gloffset_VertexAttribs2dvNV driDispatchRemapTable[VertexAttribs2dvNV_remap_index] +#define _gloffset_VertexAttribs2fvNV driDispatchRemapTable[VertexAttribs2fvNV_remap_index] +#define _gloffset_VertexAttribs2svNV driDispatchRemapTable[VertexAttribs2svNV_remap_index] +#define _gloffset_VertexAttribs3dvNV driDispatchRemapTable[VertexAttribs3dvNV_remap_index] +#define _gloffset_VertexAttribs3fvNV driDispatchRemapTable[VertexAttribs3fvNV_remap_index] +#define _gloffset_VertexAttribs3svNV driDispatchRemapTable[VertexAttribs3svNV_remap_index] +#define _gloffset_VertexAttribs4dvNV driDispatchRemapTable[VertexAttribs4dvNV_remap_index] +#define _gloffset_VertexAttribs4fvNV driDispatchRemapTable[VertexAttribs4fvNV_remap_index] +#define _gloffset_VertexAttribs4svNV driDispatchRemapTable[VertexAttribs4svNV_remap_index] +#define _gloffset_VertexAttribs4ubvNV driDispatchRemapTable[VertexAttribs4ubvNV_remap_index] +#define _gloffset_AlphaFragmentOp1ATI driDispatchRemapTable[AlphaFragmentOp1ATI_remap_index] +#define _gloffset_AlphaFragmentOp2ATI driDispatchRemapTable[AlphaFragmentOp2ATI_remap_index] +#define _gloffset_AlphaFragmentOp3ATI driDispatchRemapTable[AlphaFragmentOp3ATI_remap_index] +#define _gloffset_BeginFragmentShaderATI driDispatchRemapTable[BeginFragmentShaderATI_remap_index] +#define _gloffset_BindFragmentShaderATI driDispatchRemapTable[BindFragmentShaderATI_remap_index] +#define _gloffset_ColorFragmentOp1ATI driDispatchRemapTable[ColorFragmentOp1ATI_remap_index] +#define _gloffset_ColorFragmentOp2ATI driDispatchRemapTable[ColorFragmentOp2ATI_remap_index] +#define _gloffset_ColorFragmentOp3ATI driDispatchRemapTable[ColorFragmentOp3ATI_remap_index] +#define _gloffset_DeleteFragmentShaderATI driDispatchRemapTable[DeleteFragmentShaderATI_remap_index] +#define _gloffset_EndFragmentShaderATI driDispatchRemapTable[EndFragmentShaderATI_remap_index] +#define _gloffset_GenFragmentShadersATI driDispatchRemapTable[GenFragmentShadersATI_remap_index] +#define _gloffset_PassTexCoordATI driDispatchRemapTable[PassTexCoordATI_remap_index] +#define _gloffset_SampleMapATI driDispatchRemapTable[SampleMapATI_remap_index] +#define _gloffset_SetFragmentShaderConstantATI driDispatchRemapTable[SetFragmentShaderConstantATI_remap_index] +#define _gloffset_PointParameteriNV driDispatchRemapTable[PointParameteriNV_remap_index] +#define _gloffset_PointParameterivNV driDispatchRemapTable[PointParameterivNV_remap_index] +#define _gloffset_ActiveStencilFaceEXT driDispatchRemapTable[ActiveStencilFaceEXT_remap_index] +#define _gloffset_BindVertexArrayAPPLE driDispatchRemapTable[BindVertexArrayAPPLE_remap_index] +#define _gloffset_DeleteVertexArraysAPPLE driDispatchRemapTable[DeleteVertexArraysAPPLE_remap_index] +#define _gloffset_GenVertexArraysAPPLE driDispatchRemapTable[GenVertexArraysAPPLE_remap_index] +#define _gloffset_IsVertexArrayAPPLE driDispatchRemapTable[IsVertexArrayAPPLE_remap_index] +#define _gloffset_GetProgramNamedParameterdvNV driDispatchRemapTable[GetProgramNamedParameterdvNV_remap_index] +#define _gloffset_GetProgramNamedParameterfvNV driDispatchRemapTable[GetProgramNamedParameterfvNV_remap_index] +#define _gloffset_ProgramNamedParameter4dNV driDispatchRemapTable[ProgramNamedParameter4dNV_remap_index] +#define _gloffset_ProgramNamedParameter4dvNV driDispatchRemapTable[ProgramNamedParameter4dvNV_remap_index] +#define _gloffset_ProgramNamedParameter4fNV driDispatchRemapTable[ProgramNamedParameter4fNV_remap_index] +#define _gloffset_ProgramNamedParameter4fvNV driDispatchRemapTable[ProgramNamedParameter4fvNV_remap_index] +#define _gloffset_DepthBoundsEXT driDispatchRemapTable[DepthBoundsEXT_remap_index] +#define _gloffset_BlendEquationSeparateEXT driDispatchRemapTable[BlendEquationSeparateEXT_remap_index] +#define _gloffset_BindFramebufferEXT driDispatchRemapTable[BindFramebufferEXT_remap_index] +#define _gloffset_BindRenderbufferEXT driDispatchRemapTable[BindRenderbufferEXT_remap_index] +#define _gloffset_CheckFramebufferStatusEXT driDispatchRemapTable[CheckFramebufferStatusEXT_remap_index] +#define _gloffset_DeleteFramebuffersEXT driDispatchRemapTable[DeleteFramebuffersEXT_remap_index] +#define _gloffset_DeleteRenderbuffersEXT driDispatchRemapTable[DeleteRenderbuffersEXT_remap_index] +#define _gloffset_FramebufferRenderbufferEXT driDispatchRemapTable[FramebufferRenderbufferEXT_remap_index] +#define _gloffset_FramebufferTexture1DEXT driDispatchRemapTable[FramebufferTexture1DEXT_remap_index] +#define _gloffset_FramebufferTexture2DEXT driDispatchRemapTable[FramebufferTexture2DEXT_remap_index] +#define _gloffset_FramebufferTexture3DEXT driDispatchRemapTable[FramebufferTexture3DEXT_remap_index] +#define _gloffset_GenFramebuffersEXT driDispatchRemapTable[GenFramebuffersEXT_remap_index] +#define _gloffset_GenRenderbuffersEXT driDispatchRemapTable[GenRenderbuffersEXT_remap_index] +#define _gloffset_GenerateMipmapEXT driDispatchRemapTable[GenerateMipmapEXT_remap_index] +#define _gloffset_GetFramebufferAttachmentParameterivEXT driDispatchRemapTable[GetFramebufferAttachmentParameterivEXT_remap_index] +#define _gloffset_GetRenderbufferParameterivEXT driDispatchRemapTable[GetRenderbufferParameterivEXT_remap_index] +#define _gloffset_IsFramebufferEXT driDispatchRemapTable[IsFramebufferEXT_remap_index] +#define _gloffset_IsRenderbufferEXT driDispatchRemapTable[IsRenderbufferEXT_remap_index] +#define _gloffset_RenderbufferStorageEXT driDispatchRemapTable[RenderbufferStorageEXT_remap_index] +#define _gloffset_BlitFramebufferEXT driDispatchRemapTable[BlitFramebufferEXT_remap_index] +#define _gloffset_FramebufferTextureLayerEXT driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index] +#define _gloffset_StencilFuncSeparateATI driDispatchRemapTable[StencilFuncSeparateATI_remap_index] +#define _gloffset_ProgramEnvParameters4fvEXT driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index] +#define _gloffset_ProgramLocalParameters4fvEXT driDispatchRemapTable[ProgramLocalParameters4fvEXT_remap_index] +#define _gloffset_GetQueryObjecti64vEXT driDispatchRemapTable[GetQueryObjecti64vEXT_remap_index] +#define _gloffset_GetQueryObjectui64vEXT driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index] + +#endif /* !defined(IN_DRI_DRIVER) */ + +#endif /* !defined( _GLAPI_OFFSETS_H_ ) */ diff --git a/GL/glx/glapitable.h b/GL/glx/glapitable.h new file mode 100644 index 000000000..48941f559 --- /dev/null +++ b/GL/glx/glapitable.h @@ -0,0 +1,816 @@ +/* DO NOT EDIT - This file generated automatically by gl_table.py (from Mesa) script */ + +/* + * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. + * (C) Copyright IBM Corporation 2004 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL, IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#if !defined( _GLAPI_TABLE_H_ ) +# define _GLAPI_TABLE_H_ + +#ifndef GLAPIENTRYP +# ifndef GLAPIENTRY +# define GLAPIENTRY +# endif + +# define GLAPIENTRYP GLAPIENTRY * +#endif + +typedef void (*_glapi_proc)(void); /* generic function pointer */ + +struct _glapi_table +{ + void (GLAPIENTRYP NewList)(GLuint list, GLenum mode); /* 0 */ + void (GLAPIENTRYP EndList)(void); /* 1 */ + void (GLAPIENTRYP CallList)(GLuint list); /* 2 */ + void (GLAPIENTRYP CallLists)(GLsizei n, GLenum type, const GLvoid * lists); /* 3 */ + void (GLAPIENTRYP DeleteLists)(GLuint list, GLsizei range); /* 4 */ + GLuint (GLAPIENTRYP GenLists)(GLsizei range); /* 5 */ + void (GLAPIENTRYP ListBase)(GLuint base); /* 6 */ + void (GLAPIENTRYP Begin)(GLenum mode); /* 7 */ + void (GLAPIENTRYP Bitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap); /* 8 */ + void (GLAPIENTRYP Color3b)(GLbyte red, GLbyte green, GLbyte blue); /* 9 */ + void (GLAPIENTRYP Color3bv)(const GLbyte * v); /* 10 */ + void (GLAPIENTRYP Color3d)(GLdouble red, GLdouble green, GLdouble blue); /* 11 */ + void (GLAPIENTRYP Color3dv)(const GLdouble * v); /* 12 */ + void (GLAPIENTRYP Color3f)(GLfloat red, GLfloat green, GLfloat blue); /* 13 */ + void (GLAPIENTRYP Color3fv)(const GLfloat * v); /* 14 */ + void (GLAPIENTRYP Color3i)(GLint red, GLint green, GLint blue); /* 15 */ + void (GLAPIENTRYP Color3iv)(const GLint * v); /* 16 */ + void (GLAPIENTRYP Color3s)(GLshort red, GLshort green, GLshort blue); /* 17 */ + void (GLAPIENTRYP Color3sv)(const GLshort * v); /* 18 */ + void (GLAPIENTRYP Color3ub)(GLubyte red, GLubyte green, GLubyte blue); /* 19 */ + void (GLAPIENTRYP Color3ubv)(const GLubyte * v); /* 20 */ + void (GLAPIENTRYP Color3ui)(GLuint red, GLuint green, GLuint blue); /* 21 */ + void (GLAPIENTRYP Color3uiv)(const GLuint * v); /* 22 */ + void (GLAPIENTRYP Color3us)(GLushort red, GLushort green, GLushort blue); /* 23 */ + void (GLAPIENTRYP Color3usv)(const GLushort * v); /* 24 */ + void (GLAPIENTRYP Color4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); /* 25 */ + void (GLAPIENTRYP Color4bv)(const GLbyte * v); /* 26 */ + void (GLAPIENTRYP Color4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); /* 27 */ + void (GLAPIENTRYP Color4dv)(const GLdouble * v); /* 28 */ + void (GLAPIENTRYP Color4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); /* 29 */ + void (GLAPIENTRYP Color4fv)(const GLfloat * v); /* 30 */ + void (GLAPIENTRYP Color4i)(GLint red, GLint green, GLint blue, GLint alpha); /* 31 */ + void (GLAPIENTRYP Color4iv)(const GLint * v); /* 32 */ + void (GLAPIENTRYP Color4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha); /* 33 */ + void (GLAPIENTRYP Color4sv)(const GLshort * v); /* 34 */ + void (GLAPIENTRYP Color4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); /* 35 */ + void (GLAPIENTRYP Color4ubv)(const GLubyte * v); /* 36 */ + void (GLAPIENTRYP Color4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha); /* 37 */ + void (GLAPIENTRYP Color4uiv)(const GLuint * v); /* 38 */ + void (GLAPIENTRYP Color4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha); /* 39 */ + void (GLAPIENTRYP Color4usv)(const GLushort * v); /* 40 */ + void (GLAPIENTRYP EdgeFlag)(GLboolean flag); /* 41 */ + void (GLAPIENTRYP EdgeFlagv)(const GLboolean * flag); /* 42 */ + void (GLAPIENTRYP End)(void); /* 43 */ + void (GLAPIENTRYP Indexd)(GLdouble c); /* 44 */ + void (GLAPIENTRYP Indexdv)(const GLdouble * c); /* 45 */ + void (GLAPIENTRYP Indexf)(GLfloat c); /* 46 */ + void (GLAPIENTRYP Indexfv)(const GLfloat * c); /* 47 */ + void (GLAPIENTRYP Indexi)(GLint c); /* 48 */ + void (GLAPIENTRYP Indexiv)(const GLint * c); /* 49 */ + void (GLAPIENTRYP Indexs)(GLshort c); /* 50 */ + void (GLAPIENTRYP Indexsv)(const GLshort * c); /* 51 */ + void (GLAPIENTRYP Normal3b)(GLbyte nx, GLbyte ny, GLbyte nz); /* 52 */ + void (GLAPIENTRYP Normal3bv)(const GLbyte * v); /* 53 */ + void (GLAPIENTRYP Normal3d)(GLdouble nx, GLdouble ny, GLdouble nz); /* 54 */ + void (GLAPIENTRYP Normal3dv)(const GLdouble * v); /* 55 */ + void (GLAPIENTRYP Normal3f)(GLfloat nx, GLfloat ny, GLfloat nz); /* 56 */ + void (GLAPIENTRYP Normal3fv)(const GLfloat * v); /* 57 */ + void (GLAPIENTRYP Normal3i)(GLint nx, GLint ny, GLint nz); /* 58 */ + void (GLAPIENTRYP Normal3iv)(const GLint * v); /* 59 */ + void (GLAPIENTRYP Normal3s)(GLshort nx, GLshort ny, GLshort nz); /* 60 */ + void (GLAPIENTRYP Normal3sv)(const GLshort * v); /* 61 */ + void (GLAPIENTRYP RasterPos2d)(GLdouble x, GLdouble y); /* 62 */ + void (GLAPIENTRYP RasterPos2dv)(const GLdouble * v); /* 63 */ + void (GLAPIENTRYP RasterPos2f)(GLfloat x, GLfloat y); /* 64 */ + void (GLAPIENTRYP RasterPos2fv)(const GLfloat * v); /* 65 */ + void (GLAPIENTRYP RasterPos2i)(GLint x, GLint y); /* 66 */ + void (GLAPIENTRYP RasterPos2iv)(const GLint * v); /* 67 */ + void (GLAPIENTRYP RasterPos2s)(GLshort x, GLshort y); /* 68 */ + void (GLAPIENTRYP RasterPos2sv)(const GLshort * v); /* 69 */ + void (GLAPIENTRYP RasterPos3d)(GLdouble x, GLdouble y, GLdouble z); /* 70 */ + void (GLAPIENTRYP RasterPos3dv)(const GLdouble * v); /* 71 */ + void (GLAPIENTRYP RasterPos3f)(GLfloat x, GLfloat y, GLfloat z); /* 72 */ + void (GLAPIENTRYP RasterPos3fv)(const GLfloat * v); /* 73 */ + void (GLAPIENTRYP RasterPos3i)(GLint x, GLint y, GLint z); /* 74 */ + void (GLAPIENTRYP RasterPos3iv)(const GLint * v); /* 75 */ + void (GLAPIENTRYP RasterPos3s)(GLshort x, GLshort y, GLshort z); /* 76 */ + void (GLAPIENTRYP RasterPos3sv)(const GLshort * v); /* 77 */ + void (GLAPIENTRYP RasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 78 */ + void (GLAPIENTRYP RasterPos4dv)(const GLdouble * v); /* 79 */ + void (GLAPIENTRYP RasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 80 */ + void (GLAPIENTRYP RasterPos4fv)(const GLfloat * v); /* 81 */ + void (GLAPIENTRYP RasterPos4i)(GLint x, GLint y, GLint z, GLint w); /* 82 */ + void (GLAPIENTRYP RasterPos4iv)(const GLint * v); /* 83 */ + void (GLAPIENTRYP RasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w); /* 84 */ + void (GLAPIENTRYP RasterPos4sv)(const GLshort * v); /* 85 */ + void (GLAPIENTRYP Rectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); /* 86 */ + void (GLAPIENTRYP Rectdv)(const GLdouble * v1, const GLdouble * v2); /* 87 */ + void (GLAPIENTRYP Rectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); /* 88 */ + void (GLAPIENTRYP Rectfv)(const GLfloat * v1, const GLfloat * v2); /* 89 */ + void (GLAPIENTRYP Recti)(GLint x1, GLint y1, GLint x2, GLint y2); /* 90 */ + void (GLAPIENTRYP Rectiv)(const GLint * v1, const GLint * v2); /* 91 */ + void (GLAPIENTRYP Rects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2); /* 92 */ + void (GLAPIENTRYP Rectsv)(const GLshort * v1, const GLshort * v2); /* 93 */ + void (GLAPIENTRYP TexCoord1d)(GLdouble s); /* 94 */ + void (GLAPIENTRYP TexCoord1dv)(const GLdouble * v); /* 95 */ + void (GLAPIENTRYP TexCoord1f)(GLfloat s); /* 96 */ + void (GLAPIENTRYP TexCoord1fv)(const GLfloat * v); /* 97 */ + void (GLAPIENTRYP TexCoord1i)(GLint s); /* 98 */ + void (GLAPIENTRYP TexCoord1iv)(const GLint * v); /* 99 */ + void (GLAPIENTRYP TexCoord1s)(GLshort s); /* 100 */ + void (GLAPIENTRYP TexCoord1sv)(const GLshort * v); /* 101 */ + void (GLAPIENTRYP TexCoord2d)(GLdouble s, GLdouble t); /* 102 */ + void (GLAPIENTRYP TexCoord2dv)(const GLdouble * v); /* 103 */ + void (GLAPIENTRYP TexCoord2f)(GLfloat s, GLfloat t); /* 104 */ + void (GLAPIENTRYP TexCoord2fv)(const GLfloat * v); /* 105 */ + void (GLAPIENTRYP TexCoord2i)(GLint s, GLint t); /* 106 */ + void (GLAPIENTRYP TexCoord2iv)(const GLint * v); /* 107 */ + void (GLAPIENTRYP TexCoord2s)(GLshort s, GLshort t); /* 108 */ + void (GLAPIENTRYP TexCoord2sv)(const GLshort * v); /* 109 */ + void (GLAPIENTRYP TexCoord3d)(GLdouble s, GLdouble t, GLdouble r); /* 110 */ + void (GLAPIENTRYP TexCoord3dv)(const GLdouble * v); /* 111 */ + void (GLAPIENTRYP TexCoord3f)(GLfloat s, GLfloat t, GLfloat r); /* 112 */ + void (GLAPIENTRYP TexCoord3fv)(const GLfloat * v); /* 113 */ + void (GLAPIENTRYP TexCoord3i)(GLint s, GLint t, GLint r); /* 114 */ + void (GLAPIENTRYP TexCoord3iv)(const GLint * v); /* 115 */ + void (GLAPIENTRYP TexCoord3s)(GLshort s, GLshort t, GLshort r); /* 116 */ + void (GLAPIENTRYP TexCoord3sv)(const GLshort * v); /* 117 */ + void (GLAPIENTRYP TexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q); /* 118 */ + void (GLAPIENTRYP TexCoord4dv)(const GLdouble * v); /* 119 */ + void (GLAPIENTRYP TexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q); /* 120 */ + void (GLAPIENTRYP TexCoord4fv)(const GLfloat * v); /* 121 */ + void (GLAPIENTRYP TexCoord4i)(GLint s, GLint t, GLint r, GLint q); /* 122 */ + void (GLAPIENTRYP TexCoord4iv)(const GLint * v); /* 123 */ + void (GLAPIENTRYP TexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q); /* 124 */ + void (GLAPIENTRYP TexCoord4sv)(const GLshort * v); /* 125 */ + void (GLAPIENTRYP Vertex2d)(GLdouble x, GLdouble y); /* 126 */ + void (GLAPIENTRYP Vertex2dv)(const GLdouble * v); /* 127 */ + void (GLAPIENTRYP Vertex2f)(GLfloat x, GLfloat y); /* 128 */ + void (GLAPIENTRYP Vertex2fv)(const GLfloat * v); /* 129 */ + void (GLAPIENTRYP Vertex2i)(GLint x, GLint y); /* 130 */ + void (GLAPIENTRYP Vertex2iv)(const GLint * v); /* 131 */ + void (GLAPIENTRYP Vertex2s)(GLshort x, GLshort y); /* 132 */ + void (GLAPIENTRYP Vertex2sv)(const GLshort * v); /* 133 */ + void (GLAPIENTRYP Vertex3d)(GLdouble x, GLdouble y, GLdouble z); /* 134 */ + void (GLAPIENTRYP Vertex3dv)(const GLdouble * v); /* 135 */ + void (GLAPIENTRYP Vertex3f)(GLfloat x, GLfloat y, GLfloat z); /* 136 */ + void (GLAPIENTRYP Vertex3fv)(const GLfloat * v); /* 137 */ + void (GLAPIENTRYP Vertex3i)(GLint x, GLint y, GLint z); /* 138 */ + void (GLAPIENTRYP Vertex3iv)(const GLint * v); /* 139 */ + void (GLAPIENTRYP Vertex3s)(GLshort x, GLshort y, GLshort z); /* 140 */ + void (GLAPIENTRYP Vertex3sv)(const GLshort * v); /* 141 */ + void (GLAPIENTRYP Vertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 142 */ + void (GLAPIENTRYP Vertex4dv)(const GLdouble * v); /* 143 */ + void (GLAPIENTRYP Vertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 144 */ + void (GLAPIENTRYP Vertex4fv)(const GLfloat * v); /* 145 */ + void (GLAPIENTRYP Vertex4i)(GLint x, GLint y, GLint z, GLint w); /* 146 */ + void (GLAPIENTRYP Vertex4iv)(const GLint * v); /* 147 */ + void (GLAPIENTRYP Vertex4s)(GLshort x, GLshort y, GLshort z, GLshort w); /* 148 */ + void (GLAPIENTRYP Vertex4sv)(const GLshort * v); /* 149 */ + void (GLAPIENTRYP ClipPlane)(GLenum plane, const GLdouble * equation); /* 150 */ + void (GLAPIENTRYP ColorMaterial)(GLenum face, GLenum mode); /* 151 */ + void (GLAPIENTRYP CullFace)(GLenum mode); /* 152 */ + void (GLAPIENTRYP Fogf)(GLenum pname, GLfloat param); /* 153 */ + void (GLAPIENTRYP Fogfv)(GLenum pname, const GLfloat * params); /* 154 */ + void (GLAPIENTRYP Fogi)(GLenum pname, GLint param); /* 155 */ + void (GLAPIENTRYP Fogiv)(GLenum pname, const GLint * params); /* 156 */ + void (GLAPIENTRYP FrontFace)(GLenum mode); /* 157 */ + void (GLAPIENTRYP Hint)(GLenum target, GLenum mode); /* 158 */ + void (GLAPIENTRYP Lightf)(GLenum light, GLenum pname, GLfloat param); /* 159 */ + void (GLAPIENTRYP Lightfv)(GLenum light, GLenum pname, const GLfloat * params); /* 160 */ + void (GLAPIENTRYP Lighti)(GLenum light, GLenum pname, GLint param); /* 161 */ + void (GLAPIENTRYP Lightiv)(GLenum light, GLenum pname, const GLint * params); /* 162 */ + void (GLAPIENTRYP LightModelf)(GLenum pname, GLfloat param); /* 163 */ + void (GLAPIENTRYP LightModelfv)(GLenum pname, const GLfloat * params); /* 164 */ + void (GLAPIENTRYP LightModeli)(GLenum pname, GLint param); /* 165 */ + void (GLAPIENTRYP LightModeliv)(GLenum pname, const GLint * params); /* 166 */ + void (GLAPIENTRYP LineStipple)(GLint factor, GLushort pattern); /* 167 */ + void (GLAPIENTRYP LineWidth)(GLfloat width); /* 168 */ + void (GLAPIENTRYP Materialf)(GLenum face, GLenum pname, GLfloat param); /* 169 */ + void (GLAPIENTRYP Materialfv)(GLenum face, GLenum pname, const GLfloat * params); /* 170 */ + void (GLAPIENTRYP Materiali)(GLenum face, GLenum pname, GLint param); /* 171 */ + void (GLAPIENTRYP Materialiv)(GLenum face, GLenum pname, const GLint * params); /* 172 */ + void (GLAPIENTRYP PointSize)(GLfloat size); /* 173 */ + void (GLAPIENTRYP PolygonMode)(GLenum face, GLenum mode); /* 174 */ + void (GLAPIENTRYP PolygonStipple)(const GLubyte * mask); /* 175 */ + void (GLAPIENTRYP Scissor)(GLint x, GLint y, GLsizei width, GLsizei height); /* 176 */ + void (GLAPIENTRYP ShadeModel)(GLenum mode); /* 177 */ + void (GLAPIENTRYP TexParameterf)(GLenum target, GLenum pname, GLfloat param); /* 178 */ + void (GLAPIENTRYP TexParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 179 */ + void (GLAPIENTRYP TexParameteri)(GLenum target, GLenum pname, GLint param); /* 180 */ + void (GLAPIENTRYP TexParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 181 */ + void (GLAPIENTRYP TexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 182 */ + void (GLAPIENTRYP TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 183 */ + void (GLAPIENTRYP TexEnvf)(GLenum target, GLenum pname, GLfloat param); /* 184 */ + void (GLAPIENTRYP TexEnvfv)(GLenum target, GLenum pname, const GLfloat * params); /* 185 */ + void (GLAPIENTRYP TexEnvi)(GLenum target, GLenum pname, GLint param); /* 186 */ + void (GLAPIENTRYP TexEnviv)(GLenum target, GLenum pname, const GLint * params); /* 187 */ + void (GLAPIENTRYP TexGend)(GLenum coord, GLenum pname, GLdouble param); /* 188 */ + void (GLAPIENTRYP TexGendv)(GLenum coord, GLenum pname, const GLdouble * params); /* 189 */ + void (GLAPIENTRYP TexGenf)(GLenum coord, GLenum pname, GLfloat param); /* 190 */ + void (GLAPIENTRYP TexGenfv)(GLenum coord, GLenum pname, const GLfloat * params); /* 191 */ + void (GLAPIENTRYP TexGeni)(GLenum coord, GLenum pname, GLint param); /* 192 */ + void (GLAPIENTRYP TexGeniv)(GLenum coord, GLenum pname, const GLint * params); /* 193 */ + void (GLAPIENTRYP FeedbackBuffer)(GLsizei size, GLenum type, GLfloat * buffer); /* 194 */ + void (GLAPIENTRYP SelectBuffer)(GLsizei size, GLuint * buffer); /* 195 */ + GLint (GLAPIENTRYP RenderMode)(GLenum mode); /* 196 */ + void (GLAPIENTRYP InitNames)(void); /* 197 */ + void (GLAPIENTRYP LoadName)(GLuint name); /* 198 */ + void (GLAPIENTRYP PassThrough)(GLfloat token); /* 199 */ + void (GLAPIENTRYP PopName)(void); /* 200 */ + void (GLAPIENTRYP PushName)(GLuint name); /* 201 */ + void (GLAPIENTRYP DrawBuffer)(GLenum mode); /* 202 */ + void (GLAPIENTRYP Clear)(GLbitfield mask); /* 203 */ + void (GLAPIENTRYP ClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); /* 204 */ + void (GLAPIENTRYP ClearIndex)(GLfloat c); /* 205 */ + void (GLAPIENTRYP ClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); /* 206 */ + void (GLAPIENTRYP ClearStencil)(GLint s); /* 207 */ + void (GLAPIENTRYP ClearDepth)(GLclampd depth); /* 208 */ + void (GLAPIENTRYP StencilMask)(GLuint mask); /* 209 */ + void (GLAPIENTRYP ColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); /* 210 */ + void (GLAPIENTRYP DepthMask)(GLboolean flag); /* 211 */ + void (GLAPIENTRYP IndexMask)(GLuint mask); /* 212 */ + void (GLAPIENTRYP Accum)(GLenum op, GLfloat value); /* 213 */ + void (GLAPIENTRYP Disable)(GLenum cap); /* 214 */ + void (GLAPIENTRYP Enable)(GLenum cap); /* 215 */ + void (GLAPIENTRYP Finish)(void); /* 216 */ + void (GLAPIENTRYP Flush)(void); /* 217 */ + void (GLAPIENTRYP PopAttrib)(void); /* 218 */ + void (GLAPIENTRYP PushAttrib)(GLbitfield mask); /* 219 */ + void (GLAPIENTRYP Map1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points); /* 220 */ + void (GLAPIENTRYP Map1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points); /* 221 */ + void (GLAPIENTRYP Map2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points); /* 222 */ + void (GLAPIENTRYP Map2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points); /* 223 */ + void (GLAPIENTRYP MapGrid1d)(GLint un, GLdouble u1, GLdouble u2); /* 224 */ + void (GLAPIENTRYP MapGrid1f)(GLint un, GLfloat u1, GLfloat u2); /* 225 */ + void (GLAPIENTRYP MapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); /* 226 */ + void (GLAPIENTRYP MapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); /* 227 */ + void (GLAPIENTRYP EvalCoord1d)(GLdouble u); /* 228 */ + void (GLAPIENTRYP EvalCoord1dv)(const GLdouble * u); /* 229 */ + void (GLAPIENTRYP EvalCoord1f)(GLfloat u); /* 230 */ + void (GLAPIENTRYP EvalCoord1fv)(const GLfloat * u); /* 231 */ + void (GLAPIENTRYP EvalCoord2d)(GLdouble u, GLdouble v); /* 232 */ + void (GLAPIENTRYP EvalCoord2dv)(const GLdouble * u); /* 233 */ + void (GLAPIENTRYP EvalCoord2f)(GLfloat u, GLfloat v); /* 234 */ + void (GLAPIENTRYP EvalCoord2fv)(const GLfloat * u); /* 235 */ + void (GLAPIENTRYP EvalMesh1)(GLenum mode, GLint i1, GLint i2); /* 236 */ + void (GLAPIENTRYP EvalPoint1)(GLint i); /* 237 */ + void (GLAPIENTRYP EvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); /* 238 */ + void (GLAPIENTRYP EvalPoint2)(GLint i, GLint j); /* 239 */ + void (GLAPIENTRYP AlphaFunc)(GLenum func, GLclampf ref); /* 240 */ + void (GLAPIENTRYP BlendFunc)(GLenum sfactor, GLenum dfactor); /* 241 */ + void (GLAPIENTRYP LogicOp)(GLenum opcode); /* 242 */ + void (GLAPIENTRYP StencilFunc)(GLenum func, GLint ref, GLuint mask); /* 243 */ + void (GLAPIENTRYP StencilOp)(GLenum fail, GLenum zfail, GLenum zpass); /* 244 */ + void (GLAPIENTRYP DepthFunc)(GLenum func); /* 245 */ + void (GLAPIENTRYP PixelZoom)(GLfloat xfactor, GLfloat yfactor); /* 246 */ + void (GLAPIENTRYP PixelTransferf)(GLenum pname, GLfloat param); /* 247 */ + void (GLAPIENTRYP PixelTransferi)(GLenum pname, GLint param); /* 248 */ + void (GLAPIENTRYP PixelStoref)(GLenum pname, GLfloat param); /* 249 */ + void (GLAPIENTRYP PixelStorei)(GLenum pname, GLint param); /* 250 */ + void (GLAPIENTRYP PixelMapfv)(GLenum map, GLsizei mapsize, const GLfloat * values); /* 251 */ + void (GLAPIENTRYP PixelMapuiv)(GLenum map, GLsizei mapsize, const GLuint * values); /* 252 */ + void (GLAPIENTRYP PixelMapusv)(GLenum map, GLsizei mapsize, const GLushort * values); /* 253 */ + void (GLAPIENTRYP ReadBuffer)(GLenum mode); /* 254 */ + void (GLAPIENTRYP CopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); /* 255 */ + void (GLAPIENTRYP ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels); /* 256 */ + void (GLAPIENTRYP DrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); /* 257 */ + void (GLAPIENTRYP GetBooleanv)(GLenum pname, GLboolean * params); /* 258 */ + void (GLAPIENTRYP GetClipPlane)(GLenum plane, GLdouble * equation); /* 259 */ + void (GLAPIENTRYP GetDoublev)(GLenum pname, GLdouble * params); /* 260 */ + GLenum (GLAPIENTRYP GetError)(void); /* 261 */ + void (GLAPIENTRYP GetFloatv)(GLenum pname, GLfloat * params); /* 262 */ + void (GLAPIENTRYP GetIntegerv)(GLenum pname, GLint * params); /* 263 */ + void (GLAPIENTRYP GetLightfv)(GLenum light, GLenum pname, GLfloat * params); /* 264 */ + void (GLAPIENTRYP GetLightiv)(GLenum light, GLenum pname, GLint * params); /* 265 */ + void (GLAPIENTRYP GetMapdv)(GLenum target, GLenum query, GLdouble * v); /* 266 */ + void (GLAPIENTRYP GetMapfv)(GLenum target, GLenum query, GLfloat * v); /* 267 */ + void (GLAPIENTRYP GetMapiv)(GLenum target, GLenum query, GLint * v); /* 268 */ + void (GLAPIENTRYP GetMaterialfv)(GLenum face, GLenum pname, GLfloat * params); /* 269 */ + void (GLAPIENTRYP GetMaterialiv)(GLenum face, GLenum pname, GLint * params); /* 270 */ + void (GLAPIENTRYP GetPixelMapfv)(GLenum map, GLfloat * values); /* 271 */ + void (GLAPIENTRYP GetPixelMapuiv)(GLenum map, GLuint * values); /* 272 */ + void (GLAPIENTRYP GetPixelMapusv)(GLenum map, GLushort * values); /* 273 */ + void (GLAPIENTRYP GetPolygonStipple)(GLubyte * mask); /* 274 */ + const GLubyte * (GLAPIENTRYP GetString)(GLenum name); /* 275 */ + void (GLAPIENTRYP GetTexEnvfv)(GLenum target, GLenum pname, GLfloat * params); /* 276 */ + void (GLAPIENTRYP GetTexEnviv)(GLenum target, GLenum pname, GLint * params); /* 277 */ + void (GLAPIENTRYP GetTexGendv)(GLenum coord, GLenum pname, GLdouble * params); /* 278 */ + void (GLAPIENTRYP GetTexGenfv)(GLenum coord, GLenum pname, GLfloat * params); /* 279 */ + void (GLAPIENTRYP GetTexGeniv)(GLenum coord, GLenum pname, GLint * params); /* 280 */ + void (GLAPIENTRYP GetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels); /* 281 */ + void (GLAPIENTRYP GetTexParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 282 */ + void (GLAPIENTRYP GetTexParameteriv)(GLenum target, GLenum pname, GLint * params); /* 283 */ + void (GLAPIENTRYP GetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat * params); /* 284 */ + void (GLAPIENTRYP GetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint * params); /* 285 */ + GLboolean (GLAPIENTRYP IsEnabled)(GLenum cap); /* 286 */ + GLboolean (GLAPIENTRYP IsList)(GLuint list); /* 287 */ + void (GLAPIENTRYP DepthRange)(GLclampd zNear, GLclampd zFar); /* 288 */ + void (GLAPIENTRYP Frustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); /* 289 */ + void (GLAPIENTRYP LoadIdentity)(void); /* 290 */ + void (GLAPIENTRYP LoadMatrixf)(const GLfloat * m); /* 291 */ + void (GLAPIENTRYP LoadMatrixd)(const GLdouble * m); /* 292 */ + void (GLAPIENTRYP MatrixMode)(GLenum mode); /* 293 */ + void (GLAPIENTRYP MultMatrixf)(const GLfloat * m); /* 294 */ + void (GLAPIENTRYP MultMatrixd)(const GLdouble * m); /* 295 */ + void (GLAPIENTRYP Ortho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); /* 296 */ + void (GLAPIENTRYP PopMatrix)(void); /* 297 */ + void (GLAPIENTRYP PushMatrix)(void); /* 298 */ + void (GLAPIENTRYP Rotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); /* 299 */ + void (GLAPIENTRYP Rotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); /* 300 */ + void (GLAPIENTRYP Scaled)(GLdouble x, GLdouble y, GLdouble z); /* 301 */ + void (GLAPIENTRYP Scalef)(GLfloat x, GLfloat y, GLfloat z); /* 302 */ + void (GLAPIENTRYP Translated)(GLdouble x, GLdouble y, GLdouble z); /* 303 */ + void (GLAPIENTRYP Translatef)(GLfloat x, GLfloat y, GLfloat z); /* 304 */ + void (GLAPIENTRYP Viewport)(GLint x, GLint y, GLsizei width, GLsizei height); /* 305 */ + void (GLAPIENTRYP ArrayElement)(GLint i); /* 306 */ + void (GLAPIENTRYP BindTexture)(GLenum target, GLuint texture); /* 307 */ + void (GLAPIENTRYP ColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 308 */ + void (GLAPIENTRYP DisableClientState)(GLenum array); /* 309 */ + void (GLAPIENTRYP DrawArrays)(GLenum mode, GLint first, GLsizei count); /* 310 */ + void (GLAPIENTRYP DrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices); /* 311 */ + void (GLAPIENTRYP EdgeFlagPointer)(GLsizei stride, const GLvoid * pointer); /* 312 */ + void (GLAPIENTRYP EnableClientState)(GLenum array); /* 313 */ + void (GLAPIENTRYP IndexPointer)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 314 */ + void (GLAPIENTRYP Indexub)(GLubyte c); /* 315 */ + void (GLAPIENTRYP Indexubv)(const GLubyte * c); /* 316 */ + void (GLAPIENTRYP InterleavedArrays)(GLenum format, GLsizei stride, const GLvoid * pointer); /* 317 */ + void (GLAPIENTRYP NormalPointer)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 318 */ + void (GLAPIENTRYP PolygonOffset)(GLfloat factor, GLfloat units); /* 319 */ + void (GLAPIENTRYP TexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 320 */ + void (GLAPIENTRYP VertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 321 */ + GLboolean (GLAPIENTRYP AreTexturesResident)(GLsizei n, const GLuint * textures, GLboolean * residences); /* 322 */ + void (GLAPIENTRYP CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); /* 323 */ + void (GLAPIENTRYP CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); /* 324 */ + void (GLAPIENTRYP CopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); /* 325 */ + void (GLAPIENTRYP CopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); /* 326 */ + void (GLAPIENTRYP DeleteTextures)(GLsizei n, const GLuint * textures); /* 327 */ + void (GLAPIENTRYP GenTextures)(GLsizei n, GLuint * textures); /* 328 */ + void (GLAPIENTRYP GetPointerv)(GLenum pname, GLvoid ** params); /* 329 */ + GLboolean (GLAPIENTRYP IsTexture)(GLuint texture); /* 330 */ + void (GLAPIENTRYP PrioritizeTextures)(GLsizei n, const GLuint * textures, const GLclampf * priorities); /* 331 */ + void (GLAPIENTRYP TexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels); /* 332 */ + void (GLAPIENTRYP TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); /* 333 */ + void (GLAPIENTRYP PopClientAttrib)(void); /* 334 */ + void (GLAPIENTRYP PushClientAttrib)(GLbitfield mask); /* 335 */ + void (GLAPIENTRYP BlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); /* 336 */ + void (GLAPIENTRYP BlendEquation)(GLenum mode); /* 337 */ + void (GLAPIENTRYP DrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices); /* 338 */ + void (GLAPIENTRYP ColorTable)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table); /* 339 */ + void (GLAPIENTRYP ColorTableParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 340 */ + void (GLAPIENTRYP ColorTableParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 341 */ + void (GLAPIENTRYP CopyColorTable)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); /* 342 */ + void (GLAPIENTRYP GetColorTable)(GLenum target, GLenum format, GLenum type, GLvoid * table); /* 343 */ + void (GLAPIENTRYP GetColorTableParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 344 */ + void (GLAPIENTRYP GetColorTableParameteriv)(GLenum target, GLenum pname, GLint * params); /* 345 */ + void (GLAPIENTRYP ColorSubTable)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data); /* 346 */ + void (GLAPIENTRYP CopyColorSubTable)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); /* 347 */ + void (GLAPIENTRYP ConvolutionFilter1D)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image); /* 348 */ + void (GLAPIENTRYP ConvolutionFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image); /* 349 */ + void (GLAPIENTRYP ConvolutionParameterf)(GLenum target, GLenum pname, GLfloat params); /* 350 */ + void (GLAPIENTRYP ConvolutionParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 351 */ + void (GLAPIENTRYP ConvolutionParameteri)(GLenum target, GLenum pname, GLint params); /* 352 */ + void (GLAPIENTRYP ConvolutionParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 353 */ + void (GLAPIENTRYP CopyConvolutionFilter1D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); /* 354 */ + void (GLAPIENTRYP CopyConvolutionFilter2D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); /* 355 */ + void (GLAPIENTRYP GetConvolutionFilter)(GLenum target, GLenum format, GLenum type, GLvoid * image); /* 356 */ + void (GLAPIENTRYP GetConvolutionParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 357 */ + void (GLAPIENTRYP GetConvolutionParameteriv)(GLenum target, GLenum pname, GLint * params); /* 358 */ + void (GLAPIENTRYP GetSeparableFilter)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span); /* 359 */ + void (GLAPIENTRYP SeparableFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column); /* 360 */ + void (GLAPIENTRYP GetHistogram)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); /* 361 */ + void (GLAPIENTRYP GetHistogramParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 362 */ + void (GLAPIENTRYP GetHistogramParameteriv)(GLenum target, GLenum pname, GLint * params); /* 363 */ + void (GLAPIENTRYP GetMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); /* 364 */ + void (GLAPIENTRYP GetMinmaxParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 365 */ + void (GLAPIENTRYP GetMinmaxParameteriv)(GLenum target, GLenum pname, GLint * params); /* 366 */ + void (GLAPIENTRYP Histogram)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); /* 367 */ + void (GLAPIENTRYP Minmax)(GLenum target, GLenum internalformat, GLboolean sink); /* 368 */ + void (GLAPIENTRYP ResetHistogram)(GLenum target); /* 369 */ + void (GLAPIENTRYP ResetMinmax)(GLenum target); /* 370 */ + void (GLAPIENTRYP TexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 371 */ + void (GLAPIENTRYP TexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels); /* 372 */ + void (GLAPIENTRYP CopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); /* 373 */ + void (GLAPIENTRYP ActiveTextureARB)(GLenum texture); /* 374 */ + void (GLAPIENTRYP ClientActiveTextureARB)(GLenum texture); /* 375 */ + void (GLAPIENTRYP MultiTexCoord1dARB)(GLenum target, GLdouble s); /* 376 */ + void (GLAPIENTRYP MultiTexCoord1dvARB)(GLenum target, const GLdouble * v); /* 377 */ + void (GLAPIENTRYP MultiTexCoord1fARB)(GLenum target, GLfloat s); /* 378 */ + void (GLAPIENTRYP MultiTexCoord1fvARB)(GLenum target, const GLfloat * v); /* 379 */ + void (GLAPIENTRYP MultiTexCoord1iARB)(GLenum target, GLint s); /* 380 */ + void (GLAPIENTRYP MultiTexCoord1ivARB)(GLenum target, const GLint * v); /* 381 */ + void (GLAPIENTRYP MultiTexCoord1sARB)(GLenum target, GLshort s); /* 382 */ + void (GLAPIENTRYP MultiTexCoord1svARB)(GLenum target, const GLshort * v); /* 383 */ + void (GLAPIENTRYP MultiTexCoord2dARB)(GLenum target, GLdouble s, GLdouble t); /* 384 */ + void (GLAPIENTRYP MultiTexCoord2dvARB)(GLenum target, const GLdouble * v); /* 385 */ + void (GLAPIENTRYP MultiTexCoord2fARB)(GLenum target, GLfloat s, GLfloat t); /* 386 */ + void (GLAPIENTRYP MultiTexCoord2fvARB)(GLenum target, const GLfloat * v); /* 387 */ + void (GLAPIENTRYP MultiTexCoord2iARB)(GLenum target, GLint s, GLint t); /* 388 */ + void (GLAPIENTRYP MultiTexCoord2ivARB)(GLenum target, const GLint * v); /* 389 */ + void (GLAPIENTRYP MultiTexCoord2sARB)(GLenum target, GLshort s, GLshort t); /* 390 */ + void (GLAPIENTRYP MultiTexCoord2svARB)(GLenum target, const GLshort * v); /* 391 */ + void (GLAPIENTRYP MultiTexCoord3dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r); /* 392 */ + void (GLAPIENTRYP MultiTexCoord3dvARB)(GLenum target, const GLdouble * v); /* 393 */ + void (GLAPIENTRYP MultiTexCoord3fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r); /* 394 */ + void (GLAPIENTRYP MultiTexCoord3fvARB)(GLenum target, const GLfloat * v); /* 395 */ + void (GLAPIENTRYP MultiTexCoord3iARB)(GLenum target, GLint s, GLint t, GLint r); /* 396 */ + void (GLAPIENTRYP MultiTexCoord3ivARB)(GLenum target, const GLint * v); /* 397 */ + void (GLAPIENTRYP MultiTexCoord3sARB)(GLenum target, GLshort s, GLshort t, GLshort r); /* 398 */ + void (GLAPIENTRYP MultiTexCoord3svARB)(GLenum target, const GLshort * v); /* 399 */ + void (GLAPIENTRYP MultiTexCoord4dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); /* 400 */ + void (GLAPIENTRYP MultiTexCoord4dvARB)(GLenum target, const GLdouble * v); /* 401 */ + void (GLAPIENTRYP MultiTexCoord4fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); /* 402 */ + void (GLAPIENTRYP MultiTexCoord4fvARB)(GLenum target, const GLfloat * v); /* 403 */ + void (GLAPIENTRYP MultiTexCoord4iARB)(GLenum target, GLint s, GLint t, GLint r, GLint q); /* 404 */ + void (GLAPIENTRYP MultiTexCoord4ivARB)(GLenum target, const GLint * v); /* 405 */ + void (GLAPIENTRYP MultiTexCoord4sARB)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); /* 406 */ + void (GLAPIENTRYP MultiTexCoord4svARB)(GLenum target, const GLshort * v); /* 407 */ + void (GLAPIENTRYP AttachShader)(GLuint program, GLuint shader); /* 408 */ + GLuint (GLAPIENTRYP CreateProgram)(void); /* 409 */ + GLuint (GLAPIENTRYP CreateShader)(GLenum type); /* 410 */ + void (GLAPIENTRYP DeleteProgram)(GLuint program); /* 411 */ + void (GLAPIENTRYP DeleteShader)(GLuint program); /* 412 */ + void (GLAPIENTRYP DetachShader)(GLuint program, GLuint shader); /* 413 */ + void (GLAPIENTRYP GetAttachedShaders)(GLuint program, GLsizei maxCount, GLsizei * count, GLuint * obj); /* 414 */ + void (GLAPIENTRYP GetProgramInfoLog)(GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog); /* 415 */ + void (GLAPIENTRYP GetProgramiv)(GLuint program, GLenum pname, GLint * params); /* 416 */ + void (GLAPIENTRYP GetShaderInfoLog)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog); /* 417 */ + void (GLAPIENTRYP GetShaderiv)(GLuint shader, GLenum pname, GLint * params); /* 418 */ + GLboolean (GLAPIENTRYP IsProgram)(GLuint program); /* 419 */ + GLboolean (GLAPIENTRYP IsShader)(GLuint shader); /* 420 */ + void (GLAPIENTRYP StencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask); /* 421 */ + void (GLAPIENTRYP StencilMaskSeparate)(GLenum face, GLuint mask); /* 422 */ + void (GLAPIENTRYP StencilOpSeparate)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass); /* 423 */ + void (GLAPIENTRYP UniformMatrix2x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 424 */ + void (GLAPIENTRYP UniformMatrix2x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 425 */ + void (GLAPIENTRYP UniformMatrix3x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 426 */ + void (GLAPIENTRYP UniformMatrix3x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 427 */ + void (GLAPIENTRYP UniformMatrix4x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 428 */ + void (GLAPIENTRYP UniformMatrix4x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 429 */ + void (GLAPIENTRYP LoadTransposeMatrixdARB)(const GLdouble * m); /* 430 */ + void (GLAPIENTRYP LoadTransposeMatrixfARB)(const GLfloat * m); /* 431 */ + void (GLAPIENTRYP MultTransposeMatrixdARB)(const GLdouble * m); /* 432 */ + void (GLAPIENTRYP MultTransposeMatrixfARB)(const GLfloat * m); /* 433 */ + void (GLAPIENTRYP SampleCoverageARB)(GLclampf value, GLboolean invert); /* 434 */ + void (GLAPIENTRYP CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data); /* 435 */ + void (GLAPIENTRYP CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data); /* 436 */ + void (GLAPIENTRYP CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); /* 437 */ + void (GLAPIENTRYP CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data); /* 438 */ + void (GLAPIENTRYP CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data); /* 439 */ + void (GLAPIENTRYP CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); /* 440 */ + void (GLAPIENTRYP GetCompressedTexImageARB)(GLenum target, GLint level, GLvoid * img); /* 441 */ + void (GLAPIENTRYP DisableVertexAttribArrayARB)(GLuint index); /* 442 */ + void (GLAPIENTRYP EnableVertexAttribArrayARB)(GLuint index); /* 443 */ + void (GLAPIENTRYP GetProgramEnvParameterdvARB)(GLenum target, GLuint index, GLdouble * params); /* 444 */ + void (GLAPIENTRYP GetProgramEnvParameterfvARB)(GLenum target, GLuint index, GLfloat * params); /* 445 */ + void (GLAPIENTRYP GetProgramLocalParameterdvARB)(GLenum target, GLuint index, GLdouble * params); /* 446 */ + void (GLAPIENTRYP GetProgramLocalParameterfvARB)(GLenum target, GLuint index, GLfloat * params); /* 447 */ + void (GLAPIENTRYP GetProgramStringARB)(GLenum target, GLenum pname, GLvoid * string); /* 448 */ + void (GLAPIENTRYP GetProgramivARB)(GLenum target, GLenum pname, GLint * params); /* 449 */ + void (GLAPIENTRYP GetVertexAttribdvARB)(GLuint index, GLenum pname, GLdouble * params); /* 450 */ + void (GLAPIENTRYP GetVertexAttribfvARB)(GLuint index, GLenum pname, GLfloat * params); /* 451 */ + void (GLAPIENTRYP GetVertexAttribivARB)(GLuint index, GLenum pname, GLint * params); /* 452 */ + void (GLAPIENTRYP ProgramEnvParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 453 */ + void (GLAPIENTRYP ProgramEnvParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params); /* 454 */ + void (GLAPIENTRYP ProgramEnvParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 455 */ + void (GLAPIENTRYP ProgramEnvParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params); /* 456 */ + void (GLAPIENTRYP ProgramLocalParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 457 */ + void (GLAPIENTRYP ProgramLocalParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params); /* 458 */ + void (GLAPIENTRYP ProgramLocalParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 459 */ + void (GLAPIENTRYP ProgramLocalParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params); /* 460 */ + void (GLAPIENTRYP ProgramStringARB)(GLenum target, GLenum format, GLsizei len, const GLvoid * string); /* 461 */ + void (GLAPIENTRYP VertexAttrib1dARB)(GLuint index, GLdouble x); /* 462 */ + void (GLAPIENTRYP VertexAttrib1dvARB)(GLuint index, const GLdouble * v); /* 463 */ + void (GLAPIENTRYP VertexAttrib1fARB)(GLuint index, GLfloat x); /* 464 */ + void (GLAPIENTRYP VertexAttrib1fvARB)(GLuint index, const GLfloat * v); /* 465 */ + void (GLAPIENTRYP VertexAttrib1sARB)(GLuint index, GLshort x); /* 466 */ + void (GLAPIENTRYP VertexAttrib1svARB)(GLuint index, const GLshort * v); /* 467 */ + void (GLAPIENTRYP VertexAttrib2dARB)(GLuint index, GLdouble x, GLdouble y); /* 468 */ + void (GLAPIENTRYP VertexAttrib2dvARB)(GLuint index, const GLdouble * v); /* 469 */ + void (GLAPIENTRYP VertexAttrib2fARB)(GLuint index, GLfloat x, GLfloat y); /* 470 */ + void (GLAPIENTRYP VertexAttrib2fvARB)(GLuint index, const GLfloat * v); /* 471 */ + void (GLAPIENTRYP VertexAttrib2sARB)(GLuint index, GLshort x, GLshort y); /* 472 */ + void (GLAPIENTRYP VertexAttrib2svARB)(GLuint index, const GLshort * v); /* 473 */ + void (GLAPIENTRYP VertexAttrib3dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 474 */ + void (GLAPIENTRYP VertexAttrib3dvARB)(GLuint index, const GLdouble * v); /* 475 */ + void (GLAPIENTRYP VertexAttrib3fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 476 */ + void (GLAPIENTRYP VertexAttrib3fvARB)(GLuint index, const GLfloat * v); /* 477 */ + void (GLAPIENTRYP VertexAttrib3sARB)(GLuint index, GLshort x, GLshort y, GLshort z); /* 478 */ + void (GLAPIENTRYP VertexAttrib3svARB)(GLuint index, const GLshort * v); /* 479 */ + void (GLAPIENTRYP VertexAttrib4NbvARB)(GLuint index, const GLbyte * v); /* 480 */ + void (GLAPIENTRYP VertexAttrib4NivARB)(GLuint index, const GLint * v); /* 481 */ + void (GLAPIENTRYP VertexAttrib4NsvARB)(GLuint index, const GLshort * v); /* 482 */ + void (GLAPIENTRYP VertexAttrib4NubARB)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 483 */ + void (GLAPIENTRYP VertexAttrib4NubvARB)(GLuint index, const GLubyte * v); /* 484 */ + void (GLAPIENTRYP VertexAttrib4NuivARB)(GLuint index, const GLuint * v); /* 485 */ + void (GLAPIENTRYP VertexAttrib4NusvARB)(GLuint index, const GLushort * v); /* 486 */ + void (GLAPIENTRYP VertexAttrib4bvARB)(GLuint index, const GLbyte * v); /* 487 */ + void (GLAPIENTRYP VertexAttrib4dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 488 */ + void (GLAPIENTRYP VertexAttrib4dvARB)(GLuint index, const GLdouble * v); /* 489 */ + void (GLAPIENTRYP VertexAttrib4fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 490 */ + void (GLAPIENTRYP VertexAttrib4fvARB)(GLuint index, const GLfloat * v); /* 491 */ + void (GLAPIENTRYP VertexAttrib4ivARB)(GLuint index, const GLint * v); /* 492 */ + void (GLAPIENTRYP VertexAttrib4sARB)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 493 */ + void (GLAPIENTRYP VertexAttrib4svARB)(GLuint index, const GLshort * v); /* 494 */ + void (GLAPIENTRYP VertexAttrib4ubvARB)(GLuint index, const GLubyte * v); /* 495 */ + void (GLAPIENTRYP VertexAttrib4uivARB)(GLuint index, const GLuint * v); /* 496 */ + void (GLAPIENTRYP VertexAttrib4usvARB)(GLuint index, const GLushort * v); /* 497 */ + void (GLAPIENTRYP VertexAttribPointerARB)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer); /* 498 */ + void (GLAPIENTRYP BindBufferARB)(GLenum target, GLuint buffer); /* 499 */ + void (GLAPIENTRYP BufferDataARB)(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage); /* 500 */ + void (GLAPIENTRYP BufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data); /* 501 */ + void (GLAPIENTRYP DeleteBuffersARB)(GLsizei n, const GLuint * buffer); /* 502 */ + void (GLAPIENTRYP GenBuffersARB)(GLsizei n, GLuint * buffer); /* 503 */ + void (GLAPIENTRYP GetBufferParameterivARB)(GLenum target, GLenum pname, GLint * params); /* 504 */ + void (GLAPIENTRYP GetBufferPointervARB)(GLenum target, GLenum pname, GLvoid ** params); /* 505 */ + void (GLAPIENTRYP GetBufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid * data); /* 506 */ + GLboolean (GLAPIENTRYP IsBufferARB)(GLuint buffer); /* 507 */ + GLvoid * (GLAPIENTRYP MapBufferARB)(GLenum target, GLenum access); /* 508 */ + GLboolean (GLAPIENTRYP UnmapBufferARB)(GLenum target); /* 509 */ + void (GLAPIENTRYP BeginQueryARB)(GLenum target, GLuint id); /* 510 */ + void (GLAPIENTRYP DeleteQueriesARB)(GLsizei n, const GLuint * ids); /* 511 */ + void (GLAPIENTRYP EndQueryARB)(GLenum target); /* 512 */ + void (GLAPIENTRYP GenQueriesARB)(GLsizei n, GLuint * ids); /* 513 */ + void (GLAPIENTRYP GetQueryObjectivARB)(GLuint id, GLenum pname, GLint * params); /* 514 */ + void (GLAPIENTRYP GetQueryObjectuivARB)(GLuint id, GLenum pname, GLuint * params); /* 515 */ + void (GLAPIENTRYP GetQueryivARB)(GLenum target, GLenum pname, GLint * params); /* 516 */ + GLboolean (GLAPIENTRYP IsQueryARB)(GLuint id); /* 517 */ + void (GLAPIENTRYP AttachObjectARB)(GLhandleARB containerObj, GLhandleARB obj); /* 518 */ + void (GLAPIENTRYP CompileShaderARB)(GLhandleARB shader); /* 519 */ + GLhandleARB (GLAPIENTRYP CreateProgramObjectARB)(void); /* 520 */ + GLhandleARB (GLAPIENTRYP CreateShaderObjectARB)(GLenum shaderType); /* 521 */ + void (GLAPIENTRYP DeleteObjectARB)(GLhandleARB obj); /* 522 */ + void (GLAPIENTRYP DetachObjectARB)(GLhandleARB containerObj, GLhandleARB attachedObj); /* 523 */ + void (GLAPIENTRYP GetActiveUniformARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); /* 524 */ + void (GLAPIENTRYP GetAttachedObjectsARB)(GLhandleARB containerObj, GLsizei maxLength, GLsizei * length, GLhandleARB * infoLog); /* 525 */ + GLhandleARB (GLAPIENTRYP GetHandleARB)(GLenum pname); /* 526 */ + void (GLAPIENTRYP GetInfoLogARB)(GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog); /* 527 */ + void (GLAPIENTRYP GetObjectParameterfvARB)(GLhandleARB obj, GLenum pname, GLfloat * params); /* 528 */ + void (GLAPIENTRYP GetObjectParameterivARB)(GLhandleARB obj, GLenum pname, GLint * params); /* 529 */ + void (GLAPIENTRYP GetShaderSourceARB)(GLhandleARB shader, GLsizei bufSize, GLsizei * length, GLcharARB * source); /* 530 */ + GLint (GLAPIENTRYP GetUniformLocationARB)(GLhandleARB program, const GLcharARB * name); /* 531 */ + void (GLAPIENTRYP GetUniformfvARB)(GLhandleARB program, GLint location, GLfloat * params); /* 532 */ + void (GLAPIENTRYP GetUniformivARB)(GLhandleARB program, GLint location, GLint * params); /* 533 */ + void (GLAPIENTRYP LinkProgramARB)(GLhandleARB program); /* 534 */ + void (GLAPIENTRYP ShaderSourceARB)(GLhandleARB shader, GLsizei count, const GLcharARB ** string, const GLint * length); /* 535 */ + void (GLAPIENTRYP Uniform1fARB)(GLint location, GLfloat v0); /* 536 */ + void (GLAPIENTRYP Uniform1fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 537 */ + void (GLAPIENTRYP Uniform1iARB)(GLint location, GLint v0); /* 538 */ + void (GLAPIENTRYP Uniform1ivARB)(GLint location, GLsizei count, const GLint * value); /* 539 */ + void (GLAPIENTRYP Uniform2fARB)(GLint location, GLfloat v0, GLfloat v1); /* 540 */ + void (GLAPIENTRYP Uniform2fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 541 */ + void (GLAPIENTRYP Uniform2iARB)(GLint location, GLint v0, GLint v1); /* 542 */ + void (GLAPIENTRYP Uniform2ivARB)(GLint location, GLsizei count, const GLint * value); /* 543 */ + void (GLAPIENTRYP Uniform3fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); /* 544 */ + void (GLAPIENTRYP Uniform3fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 545 */ + void (GLAPIENTRYP Uniform3iARB)(GLint location, GLint v0, GLint v1, GLint v2); /* 546 */ + void (GLAPIENTRYP Uniform3ivARB)(GLint location, GLsizei count, const GLint * value); /* 547 */ + void (GLAPIENTRYP Uniform4fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); /* 548 */ + void (GLAPIENTRYP Uniform4fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 549 */ + void (GLAPIENTRYP Uniform4iARB)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); /* 550 */ + void (GLAPIENTRYP Uniform4ivARB)(GLint location, GLsizei count, const GLint * value); /* 551 */ + void (GLAPIENTRYP UniformMatrix2fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 552 */ + void (GLAPIENTRYP UniformMatrix3fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 553 */ + void (GLAPIENTRYP UniformMatrix4fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 554 */ + void (GLAPIENTRYP UseProgramObjectARB)(GLhandleARB program); /* 555 */ + void (GLAPIENTRYP ValidateProgramARB)(GLhandleARB program); /* 556 */ + void (GLAPIENTRYP BindAttribLocationARB)(GLhandleARB program, GLuint index, const GLcharARB * name); /* 557 */ + void (GLAPIENTRYP GetActiveAttribARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); /* 558 */ + GLint (GLAPIENTRYP GetAttribLocationARB)(GLhandleARB program, const GLcharARB * name); /* 559 */ + void (GLAPIENTRYP DrawBuffersARB)(GLsizei n, const GLenum * bufs); /* 560 */ + void (GLAPIENTRYP PolygonOffsetEXT)(GLfloat factor, GLfloat bias); /* 561 */ + void (GLAPIENTRYP GetPixelTexGenParameterfvSGIS)(GLenum pname, GLfloat * params); /* 562 */ + void (GLAPIENTRYP GetPixelTexGenParameterivSGIS)(GLenum pname, GLint * params); /* 563 */ + void (GLAPIENTRYP PixelTexGenParameterfSGIS)(GLenum pname, GLfloat param); /* 564 */ + void (GLAPIENTRYP PixelTexGenParameterfvSGIS)(GLenum pname, const GLfloat * params); /* 565 */ + void (GLAPIENTRYP PixelTexGenParameteriSGIS)(GLenum pname, GLint param); /* 566 */ + void (GLAPIENTRYP PixelTexGenParameterivSGIS)(GLenum pname, const GLint * params); /* 567 */ + void (GLAPIENTRYP SampleMaskSGIS)(GLclampf value, GLboolean invert); /* 568 */ + void (GLAPIENTRYP SamplePatternSGIS)(GLenum pattern); /* 569 */ + void (GLAPIENTRYP ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 570 */ + void (GLAPIENTRYP EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean * pointer); /* 571 */ + void (GLAPIENTRYP IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 572 */ + void (GLAPIENTRYP NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 573 */ + void (GLAPIENTRYP TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 574 */ + void (GLAPIENTRYP VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 575 */ + void (GLAPIENTRYP PointParameterfEXT)(GLenum pname, GLfloat param); /* 576 */ + void (GLAPIENTRYP PointParameterfvEXT)(GLenum pname, const GLfloat * params); /* 577 */ + void (GLAPIENTRYP LockArraysEXT)(GLint first, GLsizei count); /* 578 */ + void (GLAPIENTRYP UnlockArraysEXT)(void); /* 579 */ + void (GLAPIENTRYP CullParameterdvEXT)(GLenum pname, GLdouble * params); /* 580 */ + void (GLAPIENTRYP CullParameterfvEXT)(GLenum pname, GLfloat * params); /* 581 */ + void (GLAPIENTRYP SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue); /* 582 */ + void (GLAPIENTRYP SecondaryColor3bvEXT)(const GLbyte * v); /* 583 */ + void (GLAPIENTRYP SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue); /* 584 */ + void (GLAPIENTRYP SecondaryColor3dvEXT)(const GLdouble * v); /* 585 */ + void (GLAPIENTRYP SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue); /* 586 */ + void (GLAPIENTRYP SecondaryColor3fvEXT)(const GLfloat * v); /* 587 */ + void (GLAPIENTRYP SecondaryColor3iEXT)(GLint red, GLint green, GLint blue); /* 588 */ + void (GLAPIENTRYP SecondaryColor3ivEXT)(const GLint * v); /* 589 */ + void (GLAPIENTRYP SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue); /* 590 */ + void (GLAPIENTRYP SecondaryColor3svEXT)(const GLshort * v); /* 591 */ + void (GLAPIENTRYP SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue); /* 592 */ + void (GLAPIENTRYP SecondaryColor3ubvEXT)(const GLubyte * v); /* 593 */ + void (GLAPIENTRYP SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue); /* 594 */ + void (GLAPIENTRYP SecondaryColor3uivEXT)(const GLuint * v); /* 595 */ + void (GLAPIENTRYP SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue); /* 596 */ + void (GLAPIENTRYP SecondaryColor3usvEXT)(const GLushort * v); /* 597 */ + void (GLAPIENTRYP SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 598 */ + void (GLAPIENTRYP MultiDrawArraysEXT)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount); /* 599 */ + void (GLAPIENTRYP MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount); /* 600 */ + void (GLAPIENTRYP FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 601 */ + void (GLAPIENTRYP FogCoorddEXT)(GLdouble coord); /* 602 */ + void (GLAPIENTRYP FogCoorddvEXT)(const GLdouble * coord); /* 603 */ + void (GLAPIENTRYP FogCoordfEXT)(GLfloat coord); /* 604 */ + void (GLAPIENTRYP FogCoordfvEXT)(const GLfloat * coord); /* 605 */ + void (GLAPIENTRYP PixelTexGenSGIX)(GLenum mode); /* 606 */ + void (GLAPIENTRYP BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); /* 607 */ + void (GLAPIENTRYP FlushVertexArrayRangeNV)(void); /* 608 */ + void (GLAPIENTRYP VertexArrayRangeNV)(GLsizei length, const GLvoid * pointer); /* 609 */ + void (GLAPIENTRYP CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 610 */ + void (GLAPIENTRYP CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); /* 611 */ + void (GLAPIENTRYP CombinerParameterfNV)(GLenum pname, GLfloat param); /* 612 */ + void (GLAPIENTRYP CombinerParameterfvNV)(GLenum pname, const GLfloat * params); /* 613 */ + void (GLAPIENTRYP CombinerParameteriNV)(GLenum pname, GLint param); /* 614 */ + void (GLAPIENTRYP CombinerParameterivNV)(GLenum pname, const GLint * params); /* 615 */ + void (GLAPIENTRYP FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 616 */ + void (GLAPIENTRYP GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params); /* 617 */ + void (GLAPIENTRYP GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params); /* 618 */ + void (GLAPIENTRYP GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat * params); /* 619 */ + void (GLAPIENTRYP GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint * params); /* 620 */ + void (GLAPIENTRYP GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat * params); /* 621 */ + void (GLAPIENTRYP GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint * params); /* 622 */ + void (GLAPIENTRYP ResizeBuffersMESA)(void); /* 623 */ + void (GLAPIENTRYP WindowPos2dMESA)(GLdouble x, GLdouble y); /* 624 */ + void (GLAPIENTRYP WindowPos2dvMESA)(const GLdouble * v); /* 625 */ + void (GLAPIENTRYP WindowPos2fMESA)(GLfloat x, GLfloat y); /* 626 */ + void (GLAPIENTRYP WindowPos2fvMESA)(const GLfloat * v); /* 627 */ + void (GLAPIENTRYP WindowPos2iMESA)(GLint x, GLint y); /* 628 */ + void (GLAPIENTRYP WindowPos2ivMESA)(const GLint * v); /* 629 */ + void (GLAPIENTRYP WindowPos2sMESA)(GLshort x, GLshort y); /* 630 */ + void (GLAPIENTRYP WindowPos2svMESA)(const GLshort * v); /* 631 */ + void (GLAPIENTRYP WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z); /* 632 */ + void (GLAPIENTRYP WindowPos3dvMESA)(const GLdouble * v); /* 633 */ + void (GLAPIENTRYP WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z); /* 634 */ + void (GLAPIENTRYP WindowPos3fvMESA)(const GLfloat * v); /* 635 */ + void (GLAPIENTRYP WindowPos3iMESA)(GLint x, GLint y, GLint z); /* 636 */ + void (GLAPIENTRYP WindowPos3ivMESA)(const GLint * v); /* 637 */ + void (GLAPIENTRYP WindowPos3sMESA)(GLshort x, GLshort y, GLshort z); /* 638 */ + void (GLAPIENTRYP WindowPos3svMESA)(const GLshort * v); /* 639 */ + void (GLAPIENTRYP WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 640 */ + void (GLAPIENTRYP WindowPos4dvMESA)(const GLdouble * v); /* 641 */ + void (GLAPIENTRYP WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 642 */ + void (GLAPIENTRYP WindowPos4fvMESA)(const GLfloat * v); /* 643 */ + void (GLAPIENTRYP WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w); /* 644 */ + void (GLAPIENTRYP WindowPos4ivMESA)(const GLint * v); /* 645 */ + void (GLAPIENTRYP WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w); /* 646 */ + void (GLAPIENTRYP WindowPos4svMESA)(const GLshort * v); /* 647 */ + void (GLAPIENTRYP MultiModeDrawArraysIBM)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); /* 648 */ + void (GLAPIENTRYP MultiModeDrawElementsIBM)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride); /* 649 */ + void (GLAPIENTRYP DeleteFencesNV)(GLsizei n, const GLuint * fences); /* 650 */ + void (GLAPIENTRYP FinishFenceNV)(GLuint fence); /* 651 */ + void (GLAPIENTRYP GenFencesNV)(GLsizei n, GLuint * fences); /* 652 */ + void (GLAPIENTRYP GetFenceivNV)(GLuint fence, GLenum pname, GLint * params); /* 653 */ + GLboolean (GLAPIENTRYP IsFenceNV)(GLuint fence); /* 654 */ + void (GLAPIENTRYP SetFenceNV)(GLuint fence, GLenum condition); /* 655 */ + GLboolean (GLAPIENTRYP TestFenceNV)(GLuint fence); /* 656 */ + GLboolean (GLAPIENTRYP AreProgramsResidentNV)(GLsizei n, const GLuint * ids, GLboolean * residences); /* 657 */ + void (GLAPIENTRYP BindProgramNV)(GLenum target, GLuint program); /* 658 */ + void (GLAPIENTRYP DeleteProgramsNV)(GLsizei n, const GLuint * programs); /* 659 */ + void (GLAPIENTRYP ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat * params); /* 660 */ + void (GLAPIENTRYP GenProgramsNV)(GLsizei n, GLuint * programs); /* 661 */ + void (GLAPIENTRYP GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble * params); /* 662 */ + void (GLAPIENTRYP GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat * params); /* 663 */ + void (GLAPIENTRYP GetProgramStringNV)(GLuint id, GLenum pname, GLubyte * program); /* 664 */ + void (GLAPIENTRYP GetProgramivNV)(GLuint id, GLenum pname, GLint * params); /* 665 */ + void (GLAPIENTRYP GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint * params); /* 666 */ + void (GLAPIENTRYP GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** pointer); /* 667 */ + void (GLAPIENTRYP GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params); /* 668 */ + void (GLAPIENTRYP GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat * params); /* 669 */ + void (GLAPIENTRYP GetVertexAttribivNV)(GLuint index, GLenum pname, GLint * params); /* 670 */ + GLboolean (GLAPIENTRYP IsProgramNV)(GLuint program); /* 671 */ + void (GLAPIENTRYP LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte * program); /* 672 */ + void (GLAPIENTRYP ProgramParameters4dvNV)(GLenum target, GLuint index, GLuint num, const GLdouble * params); /* 673 */ + void (GLAPIENTRYP ProgramParameters4fvNV)(GLenum target, GLuint index, GLuint num, const GLfloat * params); /* 674 */ + void (GLAPIENTRYP RequestResidentProgramsNV)(GLsizei n, const GLuint * ids); /* 675 */ + void (GLAPIENTRYP TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform); /* 676 */ + void (GLAPIENTRYP VertexAttrib1dNV)(GLuint index, GLdouble x); /* 677 */ + void (GLAPIENTRYP VertexAttrib1dvNV)(GLuint index, const GLdouble * v); /* 678 */ + void (GLAPIENTRYP VertexAttrib1fNV)(GLuint index, GLfloat x); /* 679 */ + void (GLAPIENTRYP VertexAttrib1fvNV)(GLuint index, const GLfloat * v); /* 680 */ + void (GLAPIENTRYP VertexAttrib1sNV)(GLuint index, GLshort x); /* 681 */ + void (GLAPIENTRYP VertexAttrib1svNV)(GLuint index, const GLshort * v); /* 682 */ + void (GLAPIENTRYP VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y); /* 683 */ + void (GLAPIENTRYP VertexAttrib2dvNV)(GLuint index, const GLdouble * v); /* 684 */ + void (GLAPIENTRYP VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y); /* 685 */ + void (GLAPIENTRYP VertexAttrib2fvNV)(GLuint index, const GLfloat * v); /* 686 */ + void (GLAPIENTRYP VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y); /* 687 */ + void (GLAPIENTRYP VertexAttrib2svNV)(GLuint index, const GLshort * v); /* 688 */ + void (GLAPIENTRYP VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 689 */ + void (GLAPIENTRYP VertexAttrib3dvNV)(GLuint index, const GLdouble * v); /* 690 */ + void (GLAPIENTRYP VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 691 */ + void (GLAPIENTRYP VertexAttrib3fvNV)(GLuint index, const GLfloat * v); /* 692 */ + void (GLAPIENTRYP VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z); /* 693 */ + void (GLAPIENTRYP VertexAttrib3svNV)(GLuint index, const GLshort * v); /* 694 */ + void (GLAPIENTRYP VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 695 */ + void (GLAPIENTRYP VertexAttrib4dvNV)(GLuint index, const GLdouble * v); /* 696 */ + void (GLAPIENTRYP VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 697 */ + void (GLAPIENTRYP VertexAttrib4fvNV)(GLuint index, const GLfloat * v); /* 698 */ + void (GLAPIENTRYP VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 699 */ + void (GLAPIENTRYP VertexAttrib4svNV)(GLuint index, const GLshort * v); /* 700 */ + void (GLAPIENTRYP VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 701 */ + void (GLAPIENTRYP VertexAttrib4ubvNV)(GLuint index, const GLubyte * v); /* 702 */ + void (GLAPIENTRYP VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 703 */ + void (GLAPIENTRYP VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 704 */ + void (GLAPIENTRYP VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 705 */ + void (GLAPIENTRYP VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort * v); /* 706 */ + void (GLAPIENTRYP VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 707 */ + void (GLAPIENTRYP VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 708 */ + void (GLAPIENTRYP VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort * v); /* 709 */ + void (GLAPIENTRYP VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 710 */ + void (GLAPIENTRYP VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 711 */ + void (GLAPIENTRYP VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort * v); /* 712 */ + void (GLAPIENTRYP VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 713 */ + void (GLAPIENTRYP VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 714 */ + void (GLAPIENTRYP VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort * v); /* 715 */ + void (GLAPIENTRYP VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte * v); /* 716 */ + void (GLAPIENTRYP AlphaFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 717 */ + void (GLAPIENTRYP AlphaFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 718 */ + void (GLAPIENTRYP AlphaFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 719 */ + void (GLAPIENTRYP BeginFragmentShaderATI)(void); /* 720 */ + void (GLAPIENTRYP BindFragmentShaderATI)(GLuint id); /* 721 */ + void (GLAPIENTRYP ColorFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 722 */ + void (GLAPIENTRYP ColorFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 723 */ + void (GLAPIENTRYP ColorFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 724 */ + void (GLAPIENTRYP DeleteFragmentShaderATI)(GLuint id); /* 725 */ + void (GLAPIENTRYP EndFragmentShaderATI)(void); /* 726 */ + GLuint (GLAPIENTRYP GenFragmentShadersATI)(GLuint range); /* 727 */ + void (GLAPIENTRYP PassTexCoordATI)(GLuint dst, GLuint coord, GLenum swizzle); /* 728 */ + void (GLAPIENTRYP SampleMapATI)(GLuint dst, GLuint interp, GLenum swizzle); /* 729 */ + void (GLAPIENTRYP SetFragmentShaderConstantATI)(GLuint dst, const GLfloat * value); /* 730 */ + void (GLAPIENTRYP PointParameteriNV)(GLenum pname, GLint param); /* 731 */ + void (GLAPIENTRYP PointParameterivNV)(GLenum pname, const GLint * params); /* 732 */ + void (GLAPIENTRYP ActiveStencilFaceEXT)(GLenum face); /* 733 */ + void (GLAPIENTRYP BindVertexArrayAPPLE)(GLuint array); /* 734 */ + void (GLAPIENTRYP DeleteVertexArraysAPPLE)(GLsizei n, const GLuint * arrays); /* 735 */ + void (GLAPIENTRYP GenVertexArraysAPPLE)(GLsizei n, GLuint * arrays); /* 736 */ + GLboolean (GLAPIENTRYP IsVertexArrayAPPLE)(GLuint array); /* 737 */ + void (GLAPIENTRYP GetProgramNamedParameterdvNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params); /* 738 */ + void (GLAPIENTRYP GetProgramNamedParameterfvNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params); /* 739 */ + void (GLAPIENTRYP ProgramNamedParameter4dNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 740 */ + void (GLAPIENTRYP ProgramNamedParameter4dvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v); /* 741 */ + void (GLAPIENTRYP ProgramNamedParameter4fNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 742 */ + void (GLAPIENTRYP ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v); /* 743 */ + void (GLAPIENTRYP DepthBoundsEXT)(GLclampd zmin, GLclampd zmax); /* 744 */ + void (GLAPIENTRYP BlendEquationSeparateEXT)(GLenum modeRGB, GLenum modeA); /* 745 */ + void (GLAPIENTRYP BindFramebufferEXT)(GLenum target, GLuint framebuffer); /* 746 */ + void (GLAPIENTRYP BindRenderbufferEXT)(GLenum target, GLuint renderbuffer); /* 747 */ + GLenum (GLAPIENTRYP CheckFramebufferStatusEXT)(GLenum target); /* 748 */ + void (GLAPIENTRYP DeleteFramebuffersEXT)(GLsizei n, const GLuint * framebuffers); /* 749 */ + void (GLAPIENTRYP DeleteRenderbuffersEXT)(GLsizei n, const GLuint * renderbuffers); /* 750 */ + void (GLAPIENTRYP FramebufferRenderbufferEXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); /* 751 */ + void (GLAPIENTRYP FramebufferTexture1DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 752 */ + void (GLAPIENTRYP FramebufferTexture2DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 753 */ + void (GLAPIENTRYP FramebufferTexture3DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); /* 754 */ + void (GLAPIENTRYP GenFramebuffersEXT)(GLsizei n, GLuint * framebuffers); /* 755 */ + void (GLAPIENTRYP GenRenderbuffersEXT)(GLsizei n, GLuint * renderbuffers); /* 756 */ + void (GLAPIENTRYP GenerateMipmapEXT)(GLenum target); /* 757 */ + void (GLAPIENTRYP GetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint * params); /* 758 */ + void (GLAPIENTRYP GetRenderbufferParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 759 */ + GLboolean (GLAPIENTRYP IsFramebufferEXT)(GLuint framebuffer); /* 760 */ + GLboolean (GLAPIENTRYP IsRenderbufferEXT)(GLuint renderbuffer); /* 761 */ + void (GLAPIENTRYP RenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); /* 762 */ + void (GLAPIENTRYP BlitFramebufferEXT)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); /* 763 */ + void (GLAPIENTRYP FramebufferTextureLayerEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); /* 764 */ + void (GLAPIENTRYP StencilFuncSeparateATI)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); /* 765 */ + void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 766 */ + void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 767 */ + void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 768 */ + void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 769 */ +}; + +#endif /* !defined( _GLAPI_TABLE_H_ ) */ diff --git a/GL/glx/glapitemp.h b/GL/glx/glapitemp.h new file mode 100644 index 000000000..09259f470 --- /dev/null +++ b/GL/glx/glapitemp.h @@ -0,0 +1,6655 @@ +/* DO NOT EDIT - This file generated automatically by gl_apitemp.py (from Mesa) script */ + +/* + * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * (C) Copyright IBM Corporation 2004 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL, IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + + +# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) +# define HIDDEN __attribute__((visibility("hidden"))) +# else +# define HIDDEN +# endif + +/* + * This file is a template which generates the OpenGL API entry point + * functions. It should be included by a .c file which first defines + * the following macros: + * KEYWORD1 - usually nothing, but might be __declspec(dllexport) on Win32 + * KEYWORD2 - usually nothing, but might be __stdcall on Win32 + * NAME(n) - builds the final function name (usually add "gl" prefix) + * DISPATCH(func, args, msg) - code to do dispatch of named function. + * msg is a printf-style debug message. + * RETURN_DISPATCH(func, args, msg) - code to do dispatch with a return value + * + * Here is an example which generates the usual OpenGL functions: + * #define KEYWORD1 + * #define KEYWORD2 + * #define NAME(func) gl##func + * #define DISPATCH(func, args, msg) \ + * struct _glapi_table *dispatch = CurrentDispatch; \ + * (*dispatch->func) args + * #define RETURN DISPATCH(func, args, msg) \ + * struct _glapi_table *dispatch = CurrentDispatch; \ + * return (*dispatch->func) args + * + */ + + +#if defined( NAME ) +#ifndef KEYWORD1 +#define KEYWORD1 +#endif + +#ifndef KEYWORD1_ALT +#define KEYWORD1_ALT HIDDEN +#endif + +#ifndef KEYWORD2 +#define KEYWORD2 +#endif + +#ifndef DISPATCH +#error DISPATCH must be defined +#endif + +#ifndef RETURN_DISPATCH +#error RETURN_DISPATCH must be defined +#endif + + +KEYWORD1 void KEYWORD2 NAME(NewList)(GLuint list, GLenum mode) +{ + DISPATCH(NewList, (list, mode), (F, "glNewList(%d, 0x%x);\n", list, mode)); +} + +KEYWORD1 void KEYWORD2 NAME(EndList)(void) +{ + DISPATCH(EndList, (), (F, "glEndList();\n")); +} + +KEYWORD1 void KEYWORD2 NAME(CallList)(GLuint list) +{ + DISPATCH(CallList, (list), (F, "glCallList(%d);\n", list)); +} + +KEYWORD1 void KEYWORD2 NAME(CallLists)(GLsizei n, GLenum type, const GLvoid * lists) +{ + DISPATCH(CallLists, (n, type, lists), (F, "glCallLists(%d, 0x%x, %p);\n", n, type, (const void *) lists)); +} + +KEYWORD1 void KEYWORD2 NAME(DeleteLists)(GLuint list, GLsizei range) +{ + DISPATCH(DeleteLists, (list, range), (F, "glDeleteLists(%d, %d);\n", list, range)); +} + +KEYWORD1 GLuint KEYWORD2 NAME(GenLists)(GLsizei range) +{ + RETURN_DISPATCH(GenLists, (range), (F, "glGenLists(%d);\n", range)); +} + +KEYWORD1 void KEYWORD2 NAME(ListBase)(GLuint base) +{ + DISPATCH(ListBase, (base), (F, "glListBase(%d);\n", base)); +} + +KEYWORD1 void KEYWORD2 NAME(Begin)(GLenum mode) +{ + DISPATCH(Begin, (mode), (F, "glBegin(0x%x);\n", mode)); +} + +KEYWORD1 void KEYWORD2 NAME(Bitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap) +{ + DISPATCH(Bitmap, (width, height, xorig, yorig, xmove, ymove, bitmap), (F, "glBitmap(%d, %d, %f, %f, %f, %f, %p);\n", width, height, xorig, yorig, xmove, ymove, (const void *) bitmap)); +} + +KEYWORD1 void KEYWORD2 NAME(Color3b)(GLbyte red, GLbyte green, GLbyte blue) +{ + DISPATCH(Color3b, (red, green, blue), (F, "glColor3b(%d, %d, %d);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(Color3bv)(const GLbyte * v) +{ + DISPATCH(Color3bv, (v), (F, "glColor3bv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Color3d)(GLdouble red, GLdouble green, GLdouble blue) +{ + DISPATCH(Color3d, (red, green, blue), (F, "glColor3d(%f, %f, %f);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(Color3dv)(const GLdouble * v) +{ + DISPATCH(Color3dv, (v), (F, "glColor3dv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Color3f)(GLfloat red, GLfloat green, GLfloat blue) +{ + DISPATCH(Color3f, (red, green, blue), (F, "glColor3f(%f, %f, %f);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(Color3fv)(const GLfloat * v) +{ + DISPATCH(Color3fv, (v), (F, "glColor3fv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Color3i)(GLint red, GLint green, GLint blue) +{ + DISPATCH(Color3i, (red, green, blue), (F, "glColor3i(%d, %d, %d);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(Color3iv)(const GLint * v) +{ + DISPATCH(Color3iv, (v), (F, "glColor3iv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Color3s)(GLshort red, GLshort green, GLshort blue) +{ + DISPATCH(Color3s, (red, green, blue), (F, "glColor3s(%d, %d, %d);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(Color3sv)(const GLshort * v) +{ + DISPATCH(Color3sv, (v), (F, "glColor3sv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Color3ub)(GLubyte red, GLubyte green, GLubyte blue) +{ + DISPATCH(Color3ub, (red, green, blue), (F, "glColor3ub(%d, %d, %d);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(Color3ubv)(const GLubyte * v) +{ + DISPATCH(Color3ubv, (v), (F, "glColor3ubv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Color3ui)(GLuint red, GLuint green, GLuint blue) +{ + DISPATCH(Color3ui, (red, green, blue), (F, "glColor3ui(%d, %d, %d);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(Color3uiv)(const GLuint * v) +{ + DISPATCH(Color3uiv, (v), (F, "glColor3uiv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Color3us)(GLushort red, GLushort green, GLushort blue) +{ + DISPATCH(Color3us, (red, green, blue), (F, "glColor3us(%d, %d, %d);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(Color3usv)(const GLushort * v) +{ + DISPATCH(Color3usv, (v), (F, "glColor3usv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Color4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha) +{ + DISPATCH(Color4b, (red, green, blue, alpha), (F, "glColor4b(%d, %d, %d, %d);\n", red, green, blue, alpha)); +} + +KEYWORD1 void KEYWORD2 NAME(Color4bv)(const GLbyte * v) +{ + DISPATCH(Color4bv, (v), (F, "glColor4bv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Color4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha) +{ + DISPATCH(Color4d, (red, green, blue, alpha), (F, "glColor4d(%f, %f, %f, %f);\n", red, green, blue, alpha)); +} + +KEYWORD1 void KEYWORD2 NAME(Color4dv)(const GLdouble * v) +{ + DISPATCH(Color4dv, (v), (F, "glColor4dv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Color4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) +{ + DISPATCH(Color4f, (red, green, blue, alpha), (F, "glColor4f(%f, %f, %f, %f);\n", red, green, blue, alpha)); +} + +KEYWORD1 void KEYWORD2 NAME(Color4fv)(const GLfloat * v) +{ + DISPATCH(Color4fv, (v), (F, "glColor4fv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Color4i)(GLint red, GLint green, GLint blue, GLint alpha) +{ + DISPATCH(Color4i, (red, green, blue, alpha), (F, "glColor4i(%d, %d, %d, %d);\n", red, green, blue, alpha)); +} + +KEYWORD1 void KEYWORD2 NAME(Color4iv)(const GLint * v) +{ + DISPATCH(Color4iv, (v), (F, "glColor4iv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Color4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha) +{ + DISPATCH(Color4s, (red, green, blue, alpha), (F, "glColor4s(%d, %d, %d, %d);\n", red, green, blue, alpha)); +} + +KEYWORD1 void KEYWORD2 NAME(Color4sv)(const GLshort * v) +{ + DISPATCH(Color4sv, (v), (F, "glColor4sv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Color4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) +{ + DISPATCH(Color4ub, (red, green, blue, alpha), (F, "glColor4ub(%d, %d, %d, %d);\n", red, green, blue, alpha)); +} + +KEYWORD1 void KEYWORD2 NAME(Color4ubv)(const GLubyte * v) +{ + DISPATCH(Color4ubv, (v), (F, "glColor4ubv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Color4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha) +{ + DISPATCH(Color4ui, (red, green, blue, alpha), (F, "glColor4ui(%d, %d, %d, %d);\n", red, green, blue, alpha)); +} + +KEYWORD1 void KEYWORD2 NAME(Color4uiv)(const GLuint * v) +{ + DISPATCH(Color4uiv, (v), (F, "glColor4uiv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Color4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha) +{ + DISPATCH(Color4us, (red, green, blue, alpha), (F, "glColor4us(%d, %d, %d, %d);\n", red, green, blue, alpha)); +} + +KEYWORD1 void KEYWORD2 NAME(Color4usv)(const GLushort * v) +{ + DISPATCH(Color4usv, (v), (F, "glColor4usv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(EdgeFlag)(GLboolean flag) +{ + DISPATCH(EdgeFlag, (flag), (F, "glEdgeFlag(%d);\n", flag)); +} + +KEYWORD1 void KEYWORD2 NAME(EdgeFlagv)(const GLboolean * flag) +{ + DISPATCH(EdgeFlagv, (flag), (F, "glEdgeFlagv(%p);\n", (const void *) flag)); +} + +KEYWORD1 void KEYWORD2 NAME(End)(void) +{ + DISPATCH(End, (), (F, "glEnd();\n")); +} + +KEYWORD1 void KEYWORD2 NAME(Indexd)(GLdouble c) +{ + DISPATCH(Indexd, (c), (F, "glIndexd(%f);\n", c)); +} + +KEYWORD1 void KEYWORD2 NAME(Indexdv)(const GLdouble * c) +{ + DISPATCH(Indexdv, (c), (F, "glIndexdv(%p);\n", (const void *) c)); +} + +KEYWORD1 void KEYWORD2 NAME(Indexf)(GLfloat c) +{ + DISPATCH(Indexf, (c), (F, "glIndexf(%f);\n", c)); +} + +KEYWORD1 void KEYWORD2 NAME(Indexfv)(const GLfloat * c) +{ + DISPATCH(Indexfv, (c), (F, "glIndexfv(%p);\n", (const void *) c)); +} + +KEYWORD1 void KEYWORD2 NAME(Indexi)(GLint c) +{ + DISPATCH(Indexi, (c), (F, "glIndexi(%d);\n", c)); +} + +KEYWORD1 void KEYWORD2 NAME(Indexiv)(const GLint * c) +{ + DISPATCH(Indexiv, (c), (F, "glIndexiv(%p);\n", (const void *) c)); +} + +KEYWORD1 void KEYWORD2 NAME(Indexs)(GLshort c) +{ + DISPATCH(Indexs, (c), (F, "glIndexs(%d);\n", c)); +} + +KEYWORD1 void KEYWORD2 NAME(Indexsv)(const GLshort * c) +{ + DISPATCH(Indexsv, (c), (F, "glIndexsv(%p);\n", (const void *) c)); +} + +KEYWORD1 void KEYWORD2 NAME(Normal3b)(GLbyte nx, GLbyte ny, GLbyte nz) +{ + DISPATCH(Normal3b, (nx, ny, nz), (F, "glNormal3b(%d, %d, %d);\n", nx, ny, nz)); +} + +KEYWORD1 void KEYWORD2 NAME(Normal3bv)(const GLbyte * v) +{ + DISPATCH(Normal3bv, (v), (F, "glNormal3bv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Normal3d)(GLdouble nx, GLdouble ny, GLdouble nz) +{ + DISPATCH(Normal3d, (nx, ny, nz), (F, "glNormal3d(%f, %f, %f);\n", nx, ny, nz)); +} + +KEYWORD1 void KEYWORD2 NAME(Normal3dv)(const GLdouble * v) +{ + DISPATCH(Normal3dv, (v), (F, "glNormal3dv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Normal3f)(GLfloat nx, GLfloat ny, GLfloat nz) +{ + DISPATCH(Normal3f, (nx, ny, nz), (F, "glNormal3f(%f, %f, %f);\n", nx, ny, nz)); +} + +KEYWORD1 void KEYWORD2 NAME(Normal3fv)(const GLfloat * v) +{ + DISPATCH(Normal3fv, (v), (F, "glNormal3fv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Normal3i)(GLint nx, GLint ny, GLint nz) +{ + DISPATCH(Normal3i, (nx, ny, nz), (F, "glNormal3i(%d, %d, %d);\n", nx, ny, nz)); +} + +KEYWORD1 void KEYWORD2 NAME(Normal3iv)(const GLint * v) +{ + DISPATCH(Normal3iv, (v), (F, "glNormal3iv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Normal3s)(GLshort nx, GLshort ny, GLshort nz) +{ + DISPATCH(Normal3s, (nx, ny, nz), (F, "glNormal3s(%d, %d, %d);\n", nx, ny, nz)); +} + +KEYWORD1 void KEYWORD2 NAME(Normal3sv)(const GLshort * v) +{ + DISPATCH(Normal3sv, (v), (F, "glNormal3sv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos2d)(GLdouble x, GLdouble y) +{ + DISPATCH(RasterPos2d, (x, y), (F, "glRasterPos2d(%f, %f);\n", x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos2dv)(const GLdouble * v) +{ + DISPATCH(RasterPos2dv, (v), (F, "glRasterPos2dv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos2f)(GLfloat x, GLfloat y) +{ + DISPATCH(RasterPos2f, (x, y), (F, "glRasterPos2f(%f, %f);\n", x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos2fv)(const GLfloat * v) +{ + DISPATCH(RasterPos2fv, (v), (F, "glRasterPos2fv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos2i)(GLint x, GLint y) +{ + DISPATCH(RasterPos2i, (x, y), (F, "glRasterPos2i(%d, %d);\n", x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos2iv)(const GLint * v) +{ + DISPATCH(RasterPos2iv, (v), (F, "glRasterPos2iv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos2s)(GLshort x, GLshort y) +{ + DISPATCH(RasterPos2s, (x, y), (F, "glRasterPos2s(%d, %d);\n", x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos2sv)(const GLshort * v) +{ + DISPATCH(RasterPos2sv, (v), (F, "glRasterPos2sv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos3d)(GLdouble x, GLdouble y, GLdouble z) +{ + DISPATCH(RasterPos3d, (x, y, z), (F, "glRasterPos3d(%f, %f, %f);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos3dv)(const GLdouble * v) +{ + DISPATCH(RasterPos3dv, (v), (F, "glRasterPos3dv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos3f)(GLfloat x, GLfloat y, GLfloat z) +{ + DISPATCH(RasterPos3f, (x, y, z), (F, "glRasterPos3f(%f, %f, %f);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos3fv)(const GLfloat * v) +{ + DISPATCH(RasterPos3fv, (v), (F, "glRasterPos3fv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos3i)(GLint x, GLint y, GLint z) +{ + DISPATCH(RasterPos3i, (x, y, z), (F, "glRasterPos3i(%d, %d, %d);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos3iv)(const GLint * v) +{ + DISPATCH(RasterPos3iv, (v), (F, "glRasterPos3iv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos3s)(GLshort x, GLshort y, GLshort z) +{ + DISPATCH(RasterPos3s, (x, y, z), (F, "glRasterPos3s(%d, %d, %d);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos3sv)(const GLshort * v) +{ + DISPATCH(RasterPos3sv, (v), (F, "glRasterPos3sv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w) +{ + DISPATCH(RasterPos4d, (x, y, z, w), (F, "glRasterPos4d(%f, %f, %f, %f);\n", x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos4dv)(const GLdouble * v) +{ + DISPATCH(RasterPos4dv, (v), (F, "glRasterPos4dv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + DISPATCH(RasterPos4f, (x, y, z, w), (F, "glRasterPos4f(%f, %f, %f, %f);\n", x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos4fv)(const GLfloat * v) +{ + DISPATCH(RasterPos4fv, (v), (F, "glRasterPos4fv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos4i)(GLint x, GLint y, GLint z, GLint w) +{ + DISPATCH(RasterPos4i, (x, y, z, w), (F, "glRasterPos4i(%d, %d, %d, %d);\n", x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos4iv)(const GLint * v) +{ + DISPATCH(RasterPos4iv, (v), (F, "glRasterPos4iv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w) +{ + DISPATCH(RasterPos4s, (x, y, z, w), (F, "glRasterPos4s(%d, %d, %d, %d);\n", x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(RasterPos4sv)(const GLshort * v) +{ + DISPATCH(RasterPos4sv, (v), (F, "glRasterPos4sv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Rectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2) +{ + DISPATCH(Rectd, (x1, y1, x2, y2), (F, "glRectd(%f, %f, %f, %f);\n", x1, y1, x2, y2)); +} + +KEYWORD1 void KEYWORD2 NAME(Rectdv)(const GLdouble * v1, const GLdouble * v2) +{ + DISPATCH(Rectdv, (v1, v2), (F, "glRectdv(%p, %p);\n", (const void *) v1, (const void *) v2)); +} + +KEYWORD1 void KEYWORD2 NAME(Rectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) +{ + DISPATCH(Rectf, (x1, y1, x2, y2), (F, "glRectf(%f, %f, %f, %f);\n", x1, y1, x2, y2)); +} + +KEYWORD1 void KEYWORD2 NAME(Rectfv)(const GLfloat * v1, const GLfloat * v2) +{ + DISPATCH(Rectfv, (v1, v2), (F, "glRectfv(%p, %p);\n", (const void *) v1, (const void *) v2)); +} + +KEYWORD1 void KEYWORD2 NAME(Recti)(GLint x1, GLint y1, GLint x2, GLint y2) +{ + DISPATCH(Recti, (x1, y1, x2, y2), (F, "glRecti(%d, %d, %d, %d);\n", x1, y1, x2, y2)); +} + +KEYWORD1 void KEYWORD2 NAME(Rectiv)(const GLint * v1, const GLint * v2) +{ + DISPATCH(Rectiv, (v1, v2), (F, "glRectiv(%p, %p);\n", (const void *) v1, (const void *) v2)); +} + +KEYWORD1 void KEYWORD2 NAME(Rects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2) +{ + DISPATCH(Rects, (x1, y1, x2, y2), (F, "glRects(%d, %d, %d, %d);\n", x1, y1, x2, y2)); +} + +KEYWORD1 void KEYWORD2 NAME(Rectsv)(const GLshort * v1, const GLshort * v2) +{ + DISPATCH(Rectsv, (v1, v2), (F, "glRectsv(%p, %p);\n", (const void *) v1, (const void *) v2)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord1d)(GLdouble s) +{ + DISPATCH(TexCoord1d, (s), (F, "glTexCoord1d(%f);\n", s)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord1dv)(const GLdouble * v) +{ + DISPATCH(TexCoord1dv, (v), (F, "glTexCoord1dv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord1f)(GLfloat s) +{ + DISPATCH(TexCoord1f, (s), (F, "glTexCoord1f(%f);\n", s)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord1fv)(const GLfloat * v) +{ + DISPATCH(TexCoord1fv, (v), (F, "glTexCoord1fv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord1i)(GLint s) +{ + DISPATCH(TexCoord1i, (s), (F, "glTexCoord1i(%d);\n", s)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord1iv)(const GLint * v) +{ + DISPATCH(TexCoord1iv, (v), (F, "glTexCoord1iv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord1s)(GLshort s) +{ + DISPATCH(TexCoord1s, (s), (F, "glTexCoord1s(%d);\n", s)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord1sv)(const GLshort * v) +{ + DISPATCH(TexCoord1sv, (v), (F, "glTexCoord1sv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord2d)(GLdouble s, GLdouble t) +{ + DISPATCH(TexCoord2d, (s, t), (F, "glTexCoord2d(%f, %f);\n", s, t)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord2dv)(const GLdouble * v) +{ + DISPATCH(TexCoord2dv, (v), (F, "glTexCoord2dv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord2f)(GLfloat s, GLfloat t) +{ + DISPATCH(TexCoord2f, (s, t), (F, "glTexCoord2f(%f, %f);\n", s, t)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord2fv)(const GLfloat * v) +{ + DISPATCH(TexCoord2fv, (v), (F, "glTexCoord2fv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord2i)(GLint s, GLint t) +{ + DISPATCH(TexCoord2i, (s, t), (F, "glTexCoord2i(%d, %d);\n", s, t)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord2iv)(const GLint * v) +{ + DISPATCH(TexCoord2iv, (v), (F, "glTexCoord2iv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord2s)(GLshort s, GLshort t) +{ + DISPATCH(TexCoord2s, (s, t), (F, "glTexCoord2s(%d, %d);\n", s, t)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord2sv)(const GLshort * v) +{ + DISPATCH(TexCoord2sv, (v), (F, "glTexCoord2sv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord3d)(GLdouble s, GLdouble t, GLdouble r) +{ + DISPATCH(TexCoord3d, (s, t, r), (F, "glTexCoord3d(%f, %f, %f);\n", s, t, r)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord3dv)(const GLdouble * v) +{ + DISPATCH(TexCoord3dv, (v), (F, "glTexCoord3dv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord3f)(GLfloat s, GLfloat t, GLfloat r) +{ + DISPATCH(TexCoord3f, (s, t, r), (F, "glTexCoord3f(%f, %f, %f);\n", s, t, r)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord3fv)(const GLfloat * v) +{ + DISPATCH(TexCoord3fv, (v), (F, "glTexCoord3fv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord3i)(GLint s, GLint t, GLint r) +{ + DISPATCH(TexCoord3i, (s, t, r), (F, "glTexCoord3i(%d, %d, %d);\n", s, t, r)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord3iv)(const GLint * v) +{ + DISPATCH(TexCoord3iv, (v), (F, "glTexCoord3iv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord3s)(GLshort s, GLshort t, GLshort r) +{ + DISPATCH(TexCoord3s, (s, t, r), (F, "glTexCoord3s(%d, %d, %d);\n", s, t, r)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord3sv)(const GLshort * v) +{ + DISPATCH(TexCoord3sv, (v), (F, "glTexCoord3sv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q) +{ + DISPATCH(TexCoord4d, (s, t, r, q), (F, "glTexCoord4d(%f, %f, %f, %f);\n", s, t, r, q)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord4dv)(const GLdouble * v) +{ + DISPATCH(TexCoord4dv, (v), (F, "glTexCoord4dv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q) +{ + DISPATCH(TexCoord4f, (s, t, r, q), (F, "glTexCoord4f(%f, %f, %f, %f);\n", s, t, r, q)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord4fv)(const GLfloat * v) +{ + DISPATCH(TexCoord4fv, (v), (F, "glTexCoord4fv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord4i)(GLint s, GLint t, GLint r, GLint q) +{ + DISPATCH(TexCoord4i, (s, t, r, q), (F, "glTexCoord4i(%d, %d, %d, %d);\n", s, t, r, q)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord4iv)(const GLint * v) +{ + DISPATCH(TexCoord4iv, (v), (F, "glTexCoord4iv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q) +{ + DISPATCH(TexCoord4s, (s, t, r, q), (F, "glTexCoord4s(%d, %d, %d, %d);\n", s, t, r, q)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoord4sv)(const GLshort * v) +{ + DISPATCH(TexCoord4sv, (v), (F, "glTexCoord4sv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex2d)(GLdouble x, GLdouble y) +{ + DISPATCH(Vertex2d, (x, y), (F, "glVertex2d(%f, %f);\n", x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex2dv)(const GLdouble * v) +{ + DISPATCH(Vertex2dv, (v), (F, "glVertex2dv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex2f)(GLfloat x, GLfloat y) +{ + DISPATCH(Vertex2f, (x, y), (F, "glVertex2f(%f, %f);\n", x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex2fv)(const GLfloat * v) +{ + DISPATCH(Vertex2fv, (v), (F, "glVertex2fv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex2i)(GLint x, GLint y) +{ + DISPATCH(Vertex2i, (x, y), (F, "glVertex2i(%d, %d);\n", x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex2iv)(const GLint * v) +{ + DISPATCH(Vertex2iv, (v), (F, "glVertex2iv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex2s)(GLshort x, GLshort y) +{ + DISPATCH(Vertex2s, (x, y), (F, "glVertex2s(%d, %d);\n", x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex2sv)(const GLshort * v) +{ + DISPATCH(Vertex2sv, (v), (F, "glVertex2sv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex3d)(GLdouble x, GLdouble y, GLdouble z) +{ + DISPATCH(Vertex3d, (x, y, z), (F, "glVertex3d(%f, %f, %f);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex3dv)(const GLdouble * v) +{ + DISPATCH(Vertex3dv, (v), (F, "glVertex3dv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex3f)(GLfloat x, GLfloat y, GLfloat z) +{ + DISPATCH(Vertex3f, (x, y, z), (F, "glVertex3f(%f, %f, %f);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex3fv)(const GLfloat * v) +{ + DISPATCH(Vertex3fv, (v), (F, "glVertex3fv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex3i)(GLint x, GLint y, GLint z) +{ + DISPATCH(Vertex3i, (x, y, z), (F, "glVertex3i(%d, %d, %d);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex3iv)(const GLint * v) +{ + DISPATCH(Vertex3iv, (v), (F, "glVertex3iv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex3s)(GLshort x, GLshort y, GLshort z) +{ + DISPATCH(Vertex3s, (x, y, z), (F, "glVertex3s(%d, %d, %d);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex3sv)(const GLshort * v) +{ + DISPATCH(Vertex3sv, (v), (F, "glVertex3sv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w) +{ + DISPATCH(Vertex4d, (x, y, z, w), (F, "glVertex4d(%f, %f, %f, %f);\n", x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex4dv)(const GLdouble * v) +{ + DISPATCH(Vertex4dv, (v), (F, "glVertex4dv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + DISPATCH(Vertex4f, (x, y, z, w), (F, "glVertex4f(%f, %f, %f, %f);\n", x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex4fv)(const GLfloat * v) +{ + DISPATCH(Vertex4fv, (v), (F, "glVertex4fv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex4i)(GLint x, GLint y, GLint z, GLint w) +{ + DISPATCH(Vertex4i, (x, y, z, w), (F, "glVertex4i(%d, %d, %d, %d);\n", x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex4iv)(const GLint * v) +{ + DISPATCH(Vertex4iv, (v), (F, "glVertex4iv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex4s)(GLshort x, GLshort y, GLshort z, GLshort w) +{ + DISPATCH(Vertex4s, (x, y, z, w), (F, "glVertex4s(%d, %d, %d, %d);\n", x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(Vertex4sv)(const GLshort * v) +{ + DISPATCH(Vertex4sv, (v), (F, "glVertex4sv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(ClipPlane)(GLenum plane, const GLdouble * equation) +{ + DISPATCH(ClipPlane, (plane, equation), (F, "glClipPlane(0x%x, %p);\n", plane, (const void *) equation)); +} + +KEYWORD1 void KEYWORD2 NAME(ColorMaterial)(GLenum face, GLenum mode) +{ + DISPATCH(ColorMaterial, (face, mode), (F, "glColorMaterial(0x%x, 0x%x);\n", face, mode)); +} + +KEYWORD1 void KEYWORD2 NAME(CullFace)(GLenum mode) +{ + DISPATCH(CullFace, (mode), (F, "glCullFace(0x%x);\n", mode)); +} + +KEYWORD1 void KEYWORD2 NAME(Fogf)(GLenum pname, GLfloat param) +{ + DISPATCH(Fogf, (pname, param), (F, "glFogf(0x%x, %f);\n", pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(Fogfv)(GLenum pname, const GLfloat * params) +{ + DISPATCH(Fogfv, (pname, params), (F, "glFogfv(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(Fogi)(GLenum pname, GLint param) +{ + DISPATCH(Fogi, (pname, param), (F, "glFogi(0x%x, %d);\n", pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(Fogiv)(GLenum pname, const GLint * params) +{ + DISPATCH(Fogiv, (pname, params), (F, "glFogiv(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(FrontFace)(GLenum mode) +{ + DISPATCH(FrontFace, (mode), (F, "glFrontFace(0x%x);\n", mode)); +} + +KEYWORD1 void KEYWORD2 NAME(Hint)(GLenum target, GLenum mode) +{ + DISPATCH(Hint, (target, mode), (F, "glHint(0x%x, 0x%x);\n", target, mode)); +} + +KEYWORD1 void KEYWORD2 NAME(Lightf)(GLenum light, GLenum pname, GLfloat param) +{ + DISPATCH(Lightf, (light, pname, param), (F, "glLightf(0x%x, 0x%x, %f);\n", light, pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(Lightfv)(GLenum light, GLenum pname, const GLfloat * params) +{ + DISPATCH(Lightfv, (light, pname, params), (F, "glLightfv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(Lighti)(GLenum light, GLenum pname, GLint param) +{ + DISPATCH(Lighti, (light, pname, param), (F, "glLighti(0x%x, 0x%x, %d);\n", light, pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(Lightiv)(GLenum light, GLenum pname, const GLint * params) +{ + DISPATCH(Lightiv, (light, pname, params), (F, "glLightiv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(LightModelf)(GLenum pname, GLfloat param) +{ + DISPATCH(LightModelf, (pname, param), (F, "glLightModelf(0x%x, %f);\n", pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(LightModelfv)(GLenum pname, const GLfloat * params) +{ + DISPATCH(LightModelfv, (pname, params), (F, "glLightModelfv(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(LightModeli)(GLenum pname, GLint param) +{ + DISPATCH(LightModeli, (pname, param), (F, "glLightModeli(0x%x, %d);\n", pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(LightModeliv)(GLenum pname, const GLint * params) +{ + DISPATCH(LightModeliv, (pname, params), (F, "glLightModeliv(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(LineStipple)(GLint factor, GLushort pattern) +{ + DISPATCH(LineStipple, (factor, pattern), (F, "glLineStipple(%d, %d);\n", factor, pattern)); +} + +KEYWORD1 void KEYWORD2 NAME(LineWidth)(GLfloat width) +{ + DISPATCH(LineWidth, (width), (F, "glLineWidth(%f);\n", width)); +} + +KEYWORD1 void KEYWORD2 NAME(Materialf)(GLenum face, GLenum pname, GLfloat param) +{ + DISPATCH(Materialf, (face, pname, param), (F, "glMaterialf(0x%x, 0x%x, %f);\n", face, pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(Materialfv)(GLenum face, GLenum pname, const GLfloat * params) +{ + DISPATCH(Materialfv, (face, pname, params), (F, "glMaterialfv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(Materiali)(GLenum face, GLenum pname, GLint param) +{ + DISPATCH(Materiali, (face, pname, param), (F, "glMateriali(0x%x, 0x%x, %d);\n", face, pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(Materialiv)(GLenum face, GLenum pname, const GLint * params) +{ + DISPATCH(Materialiv, (face, pname, params), (F, "glMaterialiv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(PointSize)(GLfloat size) +{ + DISPATCH(PointSize, (size), (F, "glPointSize(%f);\n", size)); +} + +KEYWORD1 void KEYWORD2 NAME(PolygonMode)(GLenum face, GLenum mode) +{ + DISPATCH(PolygonMode, (face, mode), (F, "glPolygonMode(0x%x, 0x%x);\n", face, mode)); +} + +KEYWORD1 void KEYWORD2 NAME(PolygonStipple)(const GLubyte * mask) +{ + DISPATCH(PolygonStipple, (mask), (F, "glPolygonStipple(%p);\n", (const void *) mask)); +} + +KEYWORD1 void KEYWORD2 NAME(Scissor)(GLint x, GLint y, GLsizei width, GLsizei height) +{ + DISPATCH(Scissor, (x, y, width, height), (F, "glScissor(%d, %d, %d, %d);\n", x, y, width, height)); +} + +KEYWORD1 void KEYWORD2 NAME(ShadeModel)(GLenum mode) +{ + DISPATCH(ShadeModel, (mode), (F, "glShadeModel(0x%x);\n", mode)); +} + +KEYWORD1 void KEYWORD2 NAME(TexParameterf)(GLenum target, GLenum pname, GLfloat param) +{ + DISPATCH(TexParameterf, (target, pname, param), (F, "glTexParameterf(0x%x, 0x%x, %f);\n", target, pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(TexParameterfv)(GLenum target, GLenum pname, const GLfloat * params) +{ + DISPATCH(TexParameterfv, (target, pname, params), (F, "glTexParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(TexParameteri)(GLenum target, GLenum pname, GLint param) +{ + DISPATCH(TexParameteri, (target, pname, param), (F, "glTexParameteri(0x%x, 0x%x, %d);\n", target, pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(TexParameteriv)(GLenum target, GLenum pname, const GLint * params) +{ + DISPATCH(TexParameteriv, (target, pname, params), (F, "glTexParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(TexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels) +{ + DISPATCH(TexImage1D, (target, level, internalformat, width, border, format, type, pixels), (F, "glTexImage1D(0x%x, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, border, format, type, (const void *) pixels)); +} + +KEYWORD1 void KEYWORD2 NAME(TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels) +{ + DISPATCH(TexImage2D, (target, level, internalformat, width, height, border, format, type, pixels), (F, "glTexImage2D(0x%x, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, height, border, format, type, (const void *) pixels)); +} + +KEYWORD1 void KEYWORD2 NAME(TexEnvf)(GLenum target, GLenum pname, GLfloat param) +{ + DISPATCH(TexEnvf, (target, pname, param), (F, "glTexEnvf(0x%x, 0x%x, %f);\n", target, pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(TexEnvfv)(GLenum target, GLenum pname, const GLfloat * params) +{ + DISPATCH(TexEnvfv, (target, pname, params), (F, "glTexEnvfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(TexEnvi)(GLenum target, GLenum pname, GLint param) +{ + DISPATCH(TexEnvi, (target, pname, param), (F, "glTexEnvi(0x%x, 0x%x, %d);\n", target, pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(TexEnviv)(GLenum target, GLenum pname, const GLint * params) +{ + DISPATCH(TexEnviv, (target, pname, params), (F, "glTexEnviv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(TexGend)(GLenum coord, GLenum pname, GLdouble param) +{ + DISPATCH(TexGend, (coord, pname, param), (F, "glTexGend(0x%x, 0x%x, %f);\n", coord, pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(TexGendv)(GLenum coord, GLenum pname, const GLdouble * params) +{ + DISPATCH(TexGendv, (coord, pname, params), (F, "glTexGendv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(TexGenf)(GLenum coord, GLenum pname, GLfloat param) +{ + DISPATCH(TexGenf, (coord, pname, param), (F, "glTexGenf(0x%x, 0x%x, %f);\n", coord, pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(TexGenfv)(GLenum coord, GLenum pname, const GLfloat * params) +{ + DISPATCH(TexGenfv, (coord, pname, params), (F, "glTexGenfv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(TexGeni)(GLenum coord, GLenum pname, GLint param) +{ + DISPATCH(TexGeni, (coord, pname, param), (F, "glTexGeni(0x%x, 0x%x, %d);\n", coord, pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(TexGeniv)(GLenum coord, GLenum pname, const GLint * params) +{ + DISPATCH(TexGeniv, (coord, pname, params), (F, "glTexGeniv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(FeedbackBuffer)(GLsizei size, GLenum type, GLfloat * buffer) +{ + DISPATCH(FeedbackBuffer, (size, type, buffer), (F, "glFeedbackBuffer(%d, 0x%x, %p);\n", size, type, (const void *) buffer)); +} + +KEYWORD1 void KEYWORD2 NAME(SelectBuffer)(GLsizei size, GLuint * buffer) +{ + DISPATCH(SelectBuffer, (size, buffer), (F, "glSelectBuffer(%d, %p);\n", size, (const void *) buffer)); +} + +KEYWORD1 GLint KEYWORD2 NAME(RenderMode)(GLenum mode) +{ + RETURN_DISPATCH(RenderMode, (mode), (F, "glRenderMode(0x%x);\n", mode)); +} + +KEYWORD1 void KEYWORD2 NAME(InitNames)(void) +{ + DISPATCH(InitNames, (), (F, "glInitNames();\n")); +} + +KEYWORD1 void KEYWORD2 NAME(LoadName)(GLuint name) +{ + DISPATCH(LoadName, (name), (F, "glLoadName(%d);\n", name)); +} + +KEYWORD1 void KEYWORD2 NAME(PassThrough)(GLfloat token) +{ + DISPATCH(PassThrough, (token), (F, "glPassThrough(%f);\n", token)); +} + +KEYWORD1 void KEYWORD2 NAME(PopName)(void) +{ + DISPATCH(PopName, (), (F, "glPopName();\n")); +} + +KEYWORD1 void KEYWORD2 NAME(PushName)(GLuint name) +{ + DISPATCH(PushName, (name), (F, "glPushName(%d);\n", name)); +} + +KEYWORD1 void KEYWORD2 NAME(DrawBuffer)(GLenum mode) +{ + DISPATCH(DrawBuffer, (mode), (F, "glDrawBuffer(0x%x);\n", mode)); +} + +KEYWORD1 void KEYWORD2 NAME(Clear)(GLbitfield mask) +{ + DISPATCH(Clear, (mask), (F, "glClear(%d);\n", mask)); +} + +KEYWORD1 void KEYWORD2 NAME(ClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) +{ + DISPATCH(ClearAccum, (red, green, blue, alpha), (F, "glClearAccum(%f, %f, %f, %f);\n", red, green, blue, alpha)); +} + +KEYWORD1 void KEYWORD2 NAME(ClearIndex)(GLfloat c) +{ + DISPATCH(ClearIndex, (c), (F, "glClearIndex(%f);\n", c)); +} + +KEYWORD1 void KEYWORD2 NAME(ClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) +{ + DISPATCH(ClearColor, (red, green, blue, alpha), (F, "glClearColor(%f, %f, %f, %f);\n", red, green, blue, alpha)); +} + +KEYWORD1 void KEYWORD2 NAME(ClearStencil)(GLint s) +{ + DISPATCH(ClearStencil, (s), (F, "glClearStencil(%d);\n", s)); +} + +KEYWORD1 void KEYWORD2 NAME(ClearDepth)(GLclampd depth) +{ + DISPATCH(ClearDepth, (depth), (F, "glClearDepth(%f);\n", depth)); +} + +KEYWORD1 void KEYWORD2 NAME(StencilMask)(GLuint mask) +{ + DISPATCH(StencilMask, (mask), (F, "glStencilMask(%d);\n", mask)); +} + +KEYWORD1 void KEYWORD2 NAME(ColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) +{ + DISPATCH(ColorMask, (red, green, blue, alpha), (F, "glColorMask(%d, %d, %d, %d);\n", red, green, blue, alpha)); +} + +KEYWORD1 void KEYWORD2 NAME(DepthMask)(GLboolean flag) +{ + DISPATCH(DepthMask, (flag), (F, "glDepthMask(%d);\n", flag)); +} + +KEYWORD1 void KEYWORD2 NAME(IndexMask)(GLuint mask) +{ + DISPATCH(IndexMask, (mask), (F, "glIndexMask(%d);\n", mask)); +} + +KEYWORD1 void KEYWORD2 NAME(Accum)(GLenum op, GLfloat value) +{ + DISPATCH(Accum, (op, value), (F, "glAccum(0x%x, %f);\n", op, value)); +} + +KEYWORD1 void KEYWORD2 NAME(Disable)(GLenum cap) +{ + DISPATCH(Disable, (cap), (F, "glDisable(0x%x);\n", cap)); +} + +KEYWORD1 void KEYWORD2 NAME(Enable)(GLenum cap) +{ + DISPATCH(Enable, (cap), (F, "glEnable(0x%x);\n", cap)); +} + +KEYWORD1 void KEYWORD2 NAME(Finish)(void) +{ + DISPATCH(Finish, (), (F, "glFinish();\n")); +} + +KEYWORD1 void KEYWORD2 NAME(Flush)(void) +{ + DISPATCH(Flush, (), (F, "glFlush();\n")); +} + +KEYWORD1 void KEYWORD2 NAME(PopAttrib)(void) +{ + DISPATCH(PopAttrib, (), (F, "glPopAttrib();\n")); +} + +KEYWORD1 void KEYWORD2 NAME(PushAttrib)(GLbitfield mask) +{ + DISPATCH(PushAttrib, (mask), (F, "glPushAttrib(%d);\n", mask)); +} + +KEYWORD1 void KEYWORD2 NAME(Map1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points) +{ + DISPATCH(Map1d, (target, u1, u2, stride, order, points), (F, "glMap1d(0x%x, %f, %f, %d, %d, %p);\n", target, u1, u2, stride, order, (const void *) points)); +} + +KEYWORD1 void KEYWORD2 NAME(Map1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points) +{ + DISPATCH(Map1f, (target, u1, u2, stride, order, points), (F, "glMap1f(0x%x, %f, %f, %d, %d, %p);\n", target, u1, u2, stride, order, (const void *) points)); +} + +KEYWORD1 void KEYWORD2 NAME(Map2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points) +{ + DISPATCH(Map2d, (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points), (F, "glMap2d(0x%x, %f, %f, %d, %d, %f, %f, %d, %d, %p);\n", target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, (const void *) points)); +} + +KEYWORD1 void KEYWORD2 NAME(Map2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points) +{ + DISPATCH(Map2f, (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points), (F, "glMap2f(0x%x, %f, %f, %d, %d, %f, %f, %d, %d, %p);\n", target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, (const void *) points)); +} + +KEYWORD1 void KEYWORD2 NAME(MapGrid1d)(GLint un, GLdouble u1, GLdouble u2) +{ + DISPATCH(MapGrid1d, (un, u1, u2), (F, "glMapGrid1d(%d, %f, %f);\n", un, u1, u2)); +} + +KEYWORD1 void KEYWORD2 NAME(MapGrid1f)(GLint un, GLfloat u1, GLfloat u2) +{ + DISPATCH(MapGrid1f, (un, u1, u2), (F, "glMapGrid1f(%d, %f, %f);\n", un, u1, u2)); +} + +KEYWORD1 void KEYWORD2 NAME(MapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2) +{ + DISPATCH(MapGrid2d, (un, u1, u2, vn, v1, v2), (F, "glMapGrid2d(%d, %f, %f, %d, %f, %f);\n", un, u1, u2, vn, v1, v2)); +} + +KEYWORD1 void KEYWORD2 NAME(MapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2) +{ + DISPATCH(MapGrid2f, (un, u1, u2, vn, v1, v2), (F, "glMapGrid2f(%d, %f, %f, %d, %f, %f);\n", un, u1, u2, vn, v1, v2)); +} + +KEYWORD1 void KEYWORD2 NAME(EvalCoord1d)(GLdouble u) +{ + DISPATCH(EvalCoord1d, (u), (F, "glEvalCoord1d(%f);\n", u)); +} + +KEYWORD1 void KEYWORD2 NAME(EvalCoord1dv)(const GLdouble * u) +{ + DISPATCH(EvalCoord1dv, (u), (F, "glEvalCoord1dv(%p);\n", (const void *) u)); +} + +KEYWORD1 void KEYWORD2 NAME(EvalCoord1f)(GLfloat u) +{ + DISPATCH(EvalCoord1f, (u), (F, "glEvalCoord1f(%f);\n", u)); +} + +KEYWORD1 void KEYWORD2 NAME(EvalCoord1fv)(const GLfloat * u) +{ + DISPATCH(EvalCoord1fv, (u), (F, "glEvalCoord1fv(%p);\n", (const void *) u)); +} + +KEYWORD1 void KEYWORD2 NAME(EvalCoord2d)(GLdouble u, GLdouble v) +{ + DISPATCH(EvalCoord2d, (u, v), (F, "glEvalCoord2d(%f, %f);\n", u, v)); +} + +KEYWORD1 void KEYWORD2 NAME(EvalCoord2dv)(const GLdouble * u) +{ + DISPATCH(EvalCoord2dv, (u), (F, "glEvalCoord2dv(%p);\n", (const void *) u)); +} + +KEYWORD1 void KEYWORD2 NAME(EvalCoord2f)(GLfloat u, GLfloat v) +{ + DISPATCH(EvalCoord2f, (u, v), (F, "glEvalCoord2f(%f, %f);\n", u, v)); +} + +KEYWORD1 void KEYWORD2 NAME(EvalCoord2fv)(const GLfloat * u) +{ + DISPATCH(EvalCoord2fv, (u), (F, "glEvalCoord2fv(%p);\n", (const void *) u)); +} + +KEYWORD1 void KEYWORD2 NAME(EvalMesh1)(GLenum mode, GLint i1, GLint i2) +{ + DISPATCH(EvalMesh1, (mode, i1, i2), (F, "glEvalMesh1(0x%x, %d, %d);\n", mode, i1, i2)); +} + +KEYWORD1 void KEYWORD2 NAME(EvalPoint1)(GLint i) +{ + DISPATCH(EvalPoint1, (i), (F, "glEvalPoint1(%d);\n", i)); +} + +KEYWORD1 void KEYWORD2 NAME(EvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) +{ + DISPATCH(EvalMesh2, (mode, i1, i2, j1, j2), (F, "glEvalMesh2(0x%x, %d, %d, %d, %d);\n", mode, i1, i2, j1, j2)); +} + +KEYWORD1 void KEYWORD2 NAME(EvalPoint2)(GLint i, GLint j) +{ + DISPATCH(EvalPoint2, (i, j), (F, "glEvalPoint2(%d, %d);\n", i, j)); +} + +KEYWORD1 void KEYWORD2 NAME(AlphaFunc)(GLenum func, GLclampf ref) +{ + DISPATCH(AlphaFunc, (func, ref), (F, "glAlphaFunc(0x%x, %f);\n", func, ref)); +} + +KEYWORD1 void KEYWORD2 NAME(BlendFunc)(GLenum sfactor, GLenum dfactor) +{ + DISPATCH(BlendFunc, (sfactor, dfactor), (F, "glBlendFunc(0x%x, 0x%x);\n", sfactor, dfactor)); +} + +KEYWORD1 void KEYWORD2 NAME(LogicOp)(GLenum opcode) +{ + DISPATCH(LogicOp, (opcode), (F, "glLogicOp(0x%x);\n", opcode)); +} + +KEYWORD1 void KEYWORD2 NAME(StencilFunc)(GLenum func, GLint ref, GLuint mask) +{ + DISPATCH(StencilFunc, (func, ref, mask), (F, "glStencilFunc(0x%x, %d, %d);\n", func, ref, mask)); +} + +KEYWORD1 void KEYWORD2 NAME(StencilOp)(GLenum fail, GLenum zfail, GLenum zpass) +{ + DISPATCH(StencilOp, (fail, zfail, zpass), (F, "glStencilOp(0x%x, 0x%x, 0x%x);\n", fail, zfail, zpass)); +} + +KEYWORD1 void KEYWORD2 NAME(DepthFunc)(GLenum func) +{ + DISPATCH(DepthFunc, (func), (F, "glDepthFunc(0x%x);\n", func)); +} + +KEYWORD1 void KEYWORD2 NAME(PixelZoom)(GLfloat xfactor, GLfloat yfactor) +{ + DISPATCH(PixelZoom, (xfactor, yfactor), (F, "glPixelZoom(%f, %f);\n", xfactor, yfactor)); +} + +KEYWORD1 void KEYWORD2 NAME(PixelTransferf)(GLenum pname, GLfloat param) +{ + DISPATCH(PixelTransferf, (pname, param), (F, "glPixelTransferf(0x%x, %f);\n", pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(PixelTransferi)(GLenum pname, GLint param) +{ + DISPATCH(PixelTransferi, (pname, param), (F, "glPixelTransferi(0x%x, %d);\n", pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(PixelStoref)(GLenum pname, GLfloat param) +{ + DISPATCH(PixelStoref, (pname, param), (F, "glPixelStoref(0x%x, %f);\n", pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(PixelStorei)(GLenum pname, GLint param) +{ + DISPATCH(PixelStorei, (pname, param), (F, "glPixelStorei(0x%x, %d);\n", pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(PixelMapfv)(GLenum map, GLsizei mapsize, const GLfloat * values) +{ + DISPATCH(PixelMapfv, (map, mapsize, values), (F, "glPixelMapfv(0x%x, %d, %p);\n", map, mapsize, (const void *) values)); +} + +KEYWORD1 void KEYWORD2 NAME(PixelMapuiv)(GLenum map, GLsizei mapsize, const GLuint * values) +{ + DISPATCH(PixelMapuiv, (map, mapsize, values), (F, "glPixelMapuiv(0x%x, %d, %p);\n", map, mapsize, (const void *) values)); +} + +KEYWORD1 void KEYWORD2 NAME(PixelMapusv)(GLenum map, GLsizei mapsize, const GLushort * values) +{ + DISPATCH(PixelMapusv, (map, mapsize, values), (F, "glPixelMapusv(0x%x, %d, %p);\n", map, mapsize, (const void *) values)); +} + +KEYWORD1 void KEYWORD2 NAME(ReadBuffer)(GLenum mode) +{ + DISPATCH(ReadBuffer, (mode), (F, "glReadBuffer(0x%x);\n", mode)); +} + +KEYWORD1 void KEYWORD2 NAME(CopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type) +{ + DISPATCH(CopyPixels, (x, y, width, height, type), (F, "glCopyPixels(%d, %d, %d, %d, 0x%x);\n", x, y, width, height, type)); +} + +KEYWORD1 void KEYWORD2 NAME(ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels) +{ + DISPATCH(ReadPixels, (x, y, width, height, format, type, pixels), (F, "glReadPixels(%d, %d, %d, %d, 0x%x, 0x%x, %p);\n", x, y, width, height, format, type, (const void *) pixels)); +} + +KEYWORD1 void KEYWORD2 NAME(DrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels) +{ + DISPATCH(DrawPixels, (width, height, format, type, pixels), (F, "glDrawPixels(%d, %d, 0x%x, 0x%x, %p);\n", width, height, format, type, (const void *) pixels)); +} + +KEYWORD1 void KEYWORD2 NAME(GetBooleanv)(GLenum pname, GLboolean * params) +{ + DISPATCH(GetBooleanv, (pname, params), (F, "glGetBooleanv(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetClipPlane)(GLenum plane, GLdouble * equation) +{ + DISPATCH(GetClipPlane, (plane, equation), (F, "glGetClipPlane(0x%x, %p);\n", plane, (const void *) equation)); +} + +KEYWORD1 void KEYWORD2 NAME(GetDoublev)(GLenum pname, GLdouble * params) +{ + DISPATCH(GetDoublev, (pname, params), (F, "glGetDoublev(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1 GLenum KEYWORD2 NAME(GetError)(void) +{ + RETURN_DISPATCH(GetError, (), (F, "glGetError();\n")); +} + +KEYWORD1 void KEYWORD2 NAME(GetFloatv)(GLenum pname, GLfloat * params) +{ + DISPATCH(GetFloatv, (pname, params), (F, "glGetFloatv(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetIntegerv)(GLenum pname, GLint * params) +{ + DISPATCH(GetIntegerv, (pname, params), (F, "glGetIntegerv(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetLightfv)(GLenum light, GLenum pname, GLfloat * params) +{ + DISPATCH(GetLightfv, (light, pname, params), (F, "glGetLightfv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetLightiv)(GLenum light, GLenum pname, GLint * params) +{ + DISPATCH(GetLightiv, (light, pname, params), (F, "glGetLightiv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetMapdv)(GLenum target, GLenum query, GLdouble * v) +{ + DISPATCH(GetMapdv, (target, query, v), (F, "glGetMapdv(0x%x, 0x%x, %p);\n", target, query, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(GetMapfv)(GLenum target, GLenum query, GLfloat * v) +{ + DISPATCH(GetMapfv, (target, query, v), (F, "glGetMapfv(0x%x, 0x%x, %p);\n", target, query, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(GetMapiv)(GLenum target, GLenum query, GLint * v) +{ + DISPATCH(GetMapiv, (target, query, v), (F, "glGetMapiv(0x%x, 0x%x, %p);\n", target, query, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(GetMaterialfv)(GLenum face, GLenum pname, GLfloat * params) +{ + DISPATCH(GetMaterialfv, (face, pname, params), (F, "glGetMaterialfv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetMaterialiv)(GLenum face, GLenum pname, GLint * params) +{ + DISPATCH(GetMaterialiv, (face, pname, params), (F, "glGetMaterialiv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetPixelMapfv)(GLenum map, GLfloat * values) +{ + DISPATCH(GetPixelMapfv, (map, values), (F, "glGetPixelMapfv(0x%x, %p);\n", map, (const void *) values)); +} + +KEYWORD1 void KEYWORD2 NAME(GetPixelMapuiv)(GLenum map, GLuint * values) +{ + DISPATCH(GetPixelMapuiv, (map, values), (F, "glGetPixelMapuiv(0x%x, %p);\n", map, (const void *) values)); +} + +KEYWORD1 void KEYWORD2 NAME(GetPixelMapusv)(GLenum map, GLushort * values) +{ + DISPATCH(GetPixelMapusv, (map, values), (F, "glGetPixelMapusv(0x%x, %p);\n", map, (const void *) values)); +} + +KEYWORD1 void KEYWORD2 NAME(GetPolygonStipple)(GLubyte * mask) +{ + DISPATCH(GetPolygonStipple, (mask), (F, "glGetPolygonStipple(%p);\n", (const void *) mask)); +} + +KEYWORD1 const GLubyte * KEYWORD2 NAME(GetString)(GLenum name) +{ + RETURN_DISPATCH(GetString, (name), (F, "glGetString(0x%x);\n", name)); +} + +KEYWORD1 void KEYWORD2 NAME(GetTexEnvfv)(GLenum target, GLenum pname, GLfloat * params) +{ + DISPATCH(GetTexEnvfv, (target, pname, params), (F, "glGetTexEnvfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetTexEnviv)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetTexEnviv, (target, pname, params), (F, "glGetTexEnviv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetTexGendv)(GLenum coord, GLenum pname, GLdouble * params) +{ + DISPATCH(GetTexGendv, (coord, pname, params), (F, "glGetTexGendv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetTexGenfv)(GLenum coord, GLenum pname, GLfloat * params) +{ + DISPATCH(GetTexGenfv, (coord, pname, params), (F, "glGetTexGenfv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetTexGeniv)(GLenum coord, GLenum pname, GLint * params) +{ + DISPATCH(GetTexGeniv, (coord, pname, params), (F, "glGetTexGeniv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels) +{ + DISPATCH(GetTexImage, (target, level, format, type, pixels), (F, "glGetTexImage(0x%x, %d, 0x%x, 0x%x, %p);\n", target, level, format, type, (const void *) pixels)); +} + +KEYWORD1 void KEYWORD2 NAME(GetTexParameterfv)(GLenum target, GLenum pname, GLfloat * params) +{ + DISPATCH(GetTexParameterfv, (target, pname, params), (F, "glGetTexParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetTexParameteriv)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetTexParameteriv, (target, pname, params), (F, "glGetTexParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat * params) +{ + DISPATCH(GetTexLevelParameterfv, (target, level, pname, params), (F, "glGetTexLevelParameterfv(0x%x, %d, 0x%x, %p);\n", target, level, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint * params) +{ + DISPATCH(GetTexLevelParameteriv, (target, level, pname, params), (F, "glGetTexLevelParameteriv(0x%x, %d, 0x%x, %p);\n", target, level, pname, (const void *) params)); +} + +KEYWORD1 GLboolean KEYWORD2 NAME(IsEnabled)(GLenum cap) +{ + RETURN_DISPATCH(IsEnabled, (cap), (F, "glIsEnabled(0x%x);\n", cap)); +} + +KEYWORD1 GLboolean KEYWORD2 NAME(IsList)(GLuint list) +{ + RETURN_DISPATCH(IsList, (list), (F, "glIsList(%d);\n", list)); +} + +KEYWORD1 void KEYWORD2 NAME(DepthRange)(GLclampd zNear, GLclampd zFar) +{ + DISPATCH(DepthRange, (zNear, zFar), (F, "glDepthRange(%f, %f);\n", zNear, zFar)); +} + +KEYWORD1 void KEYWORD2 NAME(Frustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) +{ + DISPATCH(Frustum, (left, right, bottom, top, zNear, zFar), (F, "glFrustum(%f, %f, %f, %f, %f, %f);\n", left, right, bottom, top, zNear, zFar)); +} + +KEYWORD1 void KEYWORD2 NAME(LoadIdentity)(void) +{ + DISPATCH(LoadIdentity, (), (F, "glLoadIdentity();\n")); +} + +KEYWORD1 void KEYWORD2 NAME(LoadMatrixf)(const GLfloat * m) +{ + DISPATCH(LoadMatrixf, (m), (F, "glLoadMatrixf(%p);\n", (const void *) m)); +} + +KEYWORD1 void KEYWORD2 NAME(LoadMatrixd)(const GLdouble * m) +{ + DISPATCH(LoadMatrixd, (m), (F, "glLoadMatrixd(%p);\n", (const void *) m)); +} + +KEYWORD1 void KEYWORD2 NAME(MatrixMode)(GLenum mode) +{ + DISPATCH(MatrixMode, (mode), (F, "glMatrixMode(0x%x);\n", mode)); +} + +KEYWORD1 void KEYWORD2 NAME(MultMatrixf)(const GLfloat * m) +{ + DISPATCH(MultMatrixf, (m), (F, "glMultMatrixf(%p);\n", (const void *) m)); +} + +KEYWORD1 void KEYWORD2 NAME(MultMatrixd)(const GLdouble * m) +{ + DISPATCH(MultMatrixd, (m), (F, "glMultMatrixd(%p);\n", (const void *) m)); +} + +KEYWORD1 void KEYWORD2 NAME(Ortho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) +{ + DISPATCH(Ortho, (left, right, bottom, top, zNear, zFar), (F, "glOrtho(%f, %f, %f, %f, %f, %f);\n", left, right, bottom, top, zNear, zFar)); +} + +KEYWORD1 void KEYWORD2 NAME(PopMatrix)(void) +{ + DISPATCH(PopMatrix, (), (F, "glPopMatrix();\n")); +} + +KEYWORD1 void KEYWORD2 NAME(PushMatrix)(void) +{ + DISPATCH(PushMatrix, (), (F, "glPushMatrix();\n")); +} + +KEYWORD1 void KEYWORD2 NAME(Rotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z) +{ + DISPATCH(Rotated, (angle, x, y, z), (F, "glRotated(%f, %f, %f, %f);\n", angle, x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(Rotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) +{ + DISPATCH(Rotatef, (angle, x, y, z), (F, "glRotatef(%f, %f, %f, %f);\n", angle, x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(Scaled)(GLdouble x, GLdouble y, GLdouble z) +{ + DISPATCH(Scaled, (x, y, z), (F, "glScaled(%f, %f, %f);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(Scalef)(GLfloat x, GLfloat y, GLfloat z) +{ + DISPATCH(Scalef, (x, y, z), (F, "glScalef(%f, %f, %f);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(Translated)(GLdouble x, GLdouble y, GLdouble z) +{ + DISPATCH(Translated, (x, y, z), (F, "glTranslated(%f, %f, %f);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(Translatef)(GLfloat x, GLfloat y, GLfloat z) +{ + DISPATCH(Translatef, (x, y, z), (F, "glTranslatef(%f, %f, %f);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(Viewport)(GLint x, GLint y, GLsizei width, GLsizei height) +{ + DISPATCH(Viewport, (x, y, width, height), (F, "glViewport(%d, %d, %d, %d);\n", x, y, width, height)); +} + +KEYWORD1 void KEYWORD2 NAME(ArrayElement)(GLint i) +{ + DISPATCH(ArrayElement, (i), (F, "glArrayElement(%d);\n", i)); +} + +KEYWORD1 void KEYWORD2 NAME(ArrayElementEXT)(GLint i) +{ + DISPATCH(ArrayElement, (i), (F, "glArrayElementEXT(%d);\n", i)); +} + +KEYWORD1 void KEYWORD2 NAME(BindTexture)(GLenum target, GLuint texture) +{ + DISPATCH(BindTexture, (target, texture), (F, "glBindTexture(0x%x, %d);\n", target, texture)); +} + +KEYWORD1 void KEYWORD2 NAME(BindTextureEXT)(GLenum target, GLuint texture) +{ + DISPATCH(BindTexture, (target, texture), (F, "glBindTextureEXT(0x%x, %d);\n", target, texture)); +} + +KEYWORD1 void KEYWORD2 NAME(ColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) +{ + DISPATCH(ColorPointer, (size, type, stride, pointer), (F, "glColorPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(DisableClientState)(GLenum array) +{ + DISPATCH(DisableClientState, (array), (F, "glDisableClientState(0x%x);\n", array)); +} + +KEYWORD1 void KEYWORD2 NAME(DrawArrays)(GLenum mode, GLint first, GLsizei count) +{ + DISPATCH(DrawArrays, (mode, first, count), (F, "glDrawArrays(0x%x, %d, %d);\n", mode, first, count)); +} + +KEYWORD1 void KEYWORD2 NAME(DrawArraysEXT)(GLenum mode, GLint first, GLsizei count) +{ + DISPATCH(DrawArrays, (mode, first, count), (F, "glDrawArraysEXT(0x%x, %d, %d);\n", mode, first, count)); +} + +KEYWORD1 void KEYWORD2 NAME(DrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices) +{ + DISPATCH(DrawElements, (mode, count, type, indices), (F, "glDrawElements(0x%x, %d, 0x%x, %p);\n", mode, count, type, (const void *) indices)); +} + +KEYWORD1 void KEYWORD2 NAME(EdgeFlagPointer)(GLsizei stride, const GLvoid * pointer) +{ + DISPATCH(EdgeFlagPointer, (stride, pointer), (F, "glEdgeFlagPointer(%d, %p);\n", stride, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(EnableClientState)(GLenum array) +{ + DISPATCH(EnableClientState, (array), (F, "glEnableClientState(0x%x);\n", array)); +} + +KEYWORD1 void KEYWORD2 NAME(IndexPointer)(GLenum type, GLsizei stride, const GLvoid * pointer) +{ + DISPATCH(IndexPointer, (type, stride, pointer), (F, "glIndexPointer(0x%x, %d, %p);\n", type, stride, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(Indexub)(GLubyte c) +{ + DISPATCH(Indexub, (c), (F, "glIndexub(%d);\n", c)); +} + +KEYWORD1 void KEYWORD2 NAME(Indexubv)(const GLubyte * c) +{ + DISPATCH(Indexubv, (c), (F, "glIndexubv(%p);\n", (const void *) c)); +} + +KEYWORD1 void KEYWORD2 NAME(InterleavedArrays)(GLenum format, GLsizei stride, const GLvoid * pointer) +{ + DISPATCH(InterleavedArrays, (format, stride, pointer), (F, "glInterleavedArrays(0x%x, %d, %p);\n", format, stride, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(NormalPointer)(GLenum type, GLsizei stride, const GLvoid * pointer) +{ + DISPATCH(NormalPointer, (type, stride, pointer), (F, "glNormalPointer(0x%x, %d, %p);\n", type, stride, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(PolygonOffset)(GLfloat factor, GLfloat units) +{ + DISPATCH(PolygonOffset, (factor, units), (F, "glPolygonOffset(%f, %f);\n", factor, units)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) +{ + DISPATCH(TexCoordPointer, (size, type, stride, pointer), (F, "glTexCoordPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) +{ + DISPATCH(VertexPointer, (size, type, stride, pointer), (F, "glVertexPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer)); +} + +KEYWORD1 GLboolean KEYWORD2 NAME(AreTexturesResident)(GLsizei n, const GLuint * textures, GLboolean * residences) +{ + RETURN_DISPATCH(AreTexturesResident, (n, textures, residences), (F, "glAreTexturesResident(%d, %p, %p);\n", n, (const void *) textures, (const void *) residences)); +} + +#ifndef GLX_INDIRECT_RENDERING +KEYWORD1 GLboolean KEYWORD2 NAME(AreTexturesResidentEXT)(GLsizei n, const GLuint * textures, GLboolean * residences) +{ + RETURN_DISPATCH(AreTexturesResident, (n, textures, residences), (F, "glAreTexturesResidentEXT(%d, %p, %p);\n", n, (const void *) textures, (const void *) residences)); +} +#endif /* GLX_INDIRECT_RENDERING */ + +KEYWORD1 void KEYWORD2 NAME(CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) +{ + DISPATCH(CopyTexImage1D, (target, level, internalformat, x, y, width, border), (F, "glCopyTexImage1D(0x%x, %d, 0x%x, %d, %d, %d, %d);\n", target, level, internalformat, x, y, width, border)); +} + +KEYWORD1 void KEYWORD2 NAME(CopyTexImage1DEXT)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) +{ + DISPATCH(CopyTexImage1D, (target, level, internalformat, x, y, width, border), (F, "glCopyTexImage1DEXT(0x%x, %d, 0x%x, %d, %d, %d, %d);\n", target, level, internalformat, x, y, width, border)); +} + +KEYWORD1 void KEYWORD2 NAME(CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) +{ + DISPATCH(CopyTexImage2D, (target, level, internalformat, x, y, width, height, border), (F, "glCopyTexImage2D(0x%x, %d, 0x%x, %d, %d, %d, %d, %d);\n", target, level, internalformat, x, y, width, height, border)); +} + +KEYWORD1 void KEYWORD2 NAME(CopyTexImage2DEXT)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) +{ + DISPATCH(CopyTexImage2D, (target, level, internalformat, x, y, width, height, border), (F, "glCopyTexImage2DEXT(0x%x, %d, 0x%x, %d, %d, %d, %d, %d);\n", target, level, internalformat, x, y, width, height, border)); +} + +KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) +{ + DISPATCH(CopyTexSubImage1D, (target, level, xoffset, x, y, width), (F, "glCopyTexSubImage1D(0x%x, %d, %d, %d, %d, %d);\n", target, level, xoffset, x, y, width)); +} + +KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage1DEXT)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) +{ + DISPATCH(CopyTexSubImage1D, (target, level, xoffset, x, y, width), (F, "glCopyTexSubImage1DEXT(0x%x, %d, %d, %d, %d, %d);\n", target, level, xoffset, x, y, width)); +} + +KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) +{ + DISPATCH(CopyTexSubImage2D, (target, level, xoffset, yoffset, x, y, width, height), (F, "glCopyTexSubImage2D(0x%x, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, x, y, width, height)); +} + +KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage2DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) +{ + DISPATCH(CopyTexSubImage2D, (target, level, xoffset, yoffset, x, y, width, height), (F, "glCopyTexSubImage2DEXT(0x%x, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, x, y, width, height)); +} + +KEYWORD1 void KEYWORD2 NAME(DeleteTextures)(GLsizei n, const GLuint * textures) +{ + DISPATCH(DeleteTextures, (n, textures), (F, "glDeleteTextures(%d, %p);\n", n, (const void *) textures)); +} + +#ifndef GLX_INDIRECT_RENDERING +KEYWORD1 void KEYWORD2 NAME(DeleteTexturesEXT)(GLsizei n, const GLuint * textures) +{ + DISPATCH(DeleteTextures, (n, textures), (F, "glDeleteTexturesEXT(%d, %p);\n", n, (const void *) textures)); +} +#endif /* GLX_INDIRECT_RENDERING */ + +KEYWORD1 void KEYWORD2 NAME(GenTextures)(GLsizei n, GLuint * textures) +{ + DISPATCH(GenTextures, (n, textures), (F, "glGenTextures(%d, %p);\n", n, (const void *) textures)); +} + +#ifndef GLX_INDIRECT_RENDERING +KEYWORD1 void KEYWORD2 NAME(GenTexturesEXT)(GLsizei n, GLuint * textures) +{ + DISPATCH(GenTextures, (n, textures), (F, "glGenTexturesEXT(%d, %p);\n", n, (const void *) textures)); +} +#endif /* GLX_INDIRECT_RENDERING */ + +KEYWORD1 void KEYWORD2 NAME(GetPointerv)(GLenum pname, GLvoid ** params) +{ + DISPATCH(GetPointerv, (pname, params), (F, "glGetPointerv(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetPointervEXT)(GLenum pname, GLvoid ** params) +{ + DISPATCH(GetPointerv, (pname, params), (F, "glGetPointervEXT(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1 GLboolean KEYWORD2 NAME(IsTexture)(GLuint texture) +{ + RETURN_DISPATCH(IsTexture, (texture), (F, "glIsTexture(%d);\n", texture)); +} + +#ifndef GLX_INDIRECT_RENDERING +KEYWORD1 GLboolean KEYWORD2 NAME(IsTextureEXT)(GLuint texture) +{ + RETURN_DISPATCH(IsTexture, (texture), (F, "glIsTextureEXT(%d);\n", texture)); +} +#endif /* GLX_INDIRECT_RENDERING */ + +KEYWORD1 void KEYWORD2 NAME(PrioritizeTextures)(GLsizei n, const GLuint * textures, const GLclampf * priorities) +{ + DISPATCH(PrioritizeTextures, (n, textures, priorities), (F, "glPrioritizeTextures(%d, %p, %p);\n", n, (const void *) textures, (const void *) priorities)); +} + +KEYWORD1 void KEYWORD2 NAME(PrioritizeTexturesEXT)(GLsizei n, const GLuint * textures, const GLclampf * priorities) +{ + DISPATCH(PrioritizeTextures, (n, textures, priorities), (F, "glPrioritizeTexturesEXT(%d, %p, %p);\n", n, (const void *) textures, (const void *) priorities)); +} + +KEYWORD1 void KEYWORD2 NAME(TexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels) +{ + DISPATCH(TexSubImage1D, (target, level, xoffset, width, format, type, pixels), (F, "glTexSubImage1D(0x%x, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, width, format, type, (const void *) pixels)); +} + +KEYWORD1 void KEYWORD2 NAME(TexSubImage1DEXT)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels) +{ + DISPATCH(TexSubImage1D, (target, level, xoffset, width, format, type, pixels), (F, "glTexSubImage1DEXT(0x%x, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, width, format, type, (const void *) pixels)); +} + +KEYWORD1 void KEYWORD2 NAME(TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels) +{ + DISPATCH(TexSubImage2D, (target, level, xoffset, yoffset, width, height, format, type, pixels), (F, "glTexSubImage2D(0x%x, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, width, height, format, type, (const void *) pixels)); +} + +KEYWORD1 void KEYWORD2 NAME(TexSubImage2DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels) +{ + DISPATCH(TexSubImage2D, (target, level, xoffset, yoffset, width, height, format, type, pixels), (F, "glTexSubImage2DEXT(0x%x, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, width, height, format, type, (const void *) pixels)); +} + +KEYWORD1 void KEYWORD2 NAME(PopClientAttrib)(void) +{ + DISPATCH(PopClientAttrib, (), (F, "glPopClientAttrib();\n")); +} + +KEYWORD1 void KEYWORD2 NAME(PushClientAttrib)(GLbitfield mask) +{ + DISPATCH(PushClientAttrib, (mask), (F, "glPushClientAttrib(%d);\n", mask)); +} + +KEYWORD1 void KEYWORD2 NAME(BlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) +{ + DISPATCH(BlendColor, (red, green, blue, alpha), (F, "glBlendColor(%f, %f, %f, %f);\n", red, green, blue, alpha)); +} + +KEYWORD1 void KEYWORD2 NAME(BlendColorEXT)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) +{ + DISPATCH(BlendColor, (red, green, blue, alpha), (F, "glBlendColorEXT(%f, %f, %f, %f);\n", red, green, blue, alpha)); +} + +KEYWORD1 void KEYWORD2 NAME(BlendEquation)(GLenum mode) +{ + DISPATCH(BlendEquation, (mode), (F, "glBlendEquation(0x%x);\n", mode)); +} + +KEYWORD1 void KEYWORD2 NAME(BlendEquationEXT)(GLenum mode) +{ + DISPATCH(BlendEquation, (mode), (F, "glBlendEquationEXT(0x%x);\n", mode)); +} + +KEYWORD1 void KEYWORD2 NAME(DrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices) +{ + DISPATCH(DrawRangeElements, (mode, start, end, count, type, indices), (F, "glDrawRangeElements(0x%x, %d, %d, %d, 0x%x, %p);\n", mode, start, end, count, type, (const void *) indices)); +} + +KEYWORD1 void KEYWORD2 NAME(DrawRangeElementsEXT)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices) +{ + DISPATCH(DrawRangeElements, (mode, start, end, count, type, indices), (F, "glDrawRangeElementsEXT(0x%x, %d, %d, %d, 0x%x, %p);\n", mode, start, end, count, type, (const void *) indices)); +} + +KEYWORD1 void KEYWORD2 NAME(ColorTable)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table) +{ + DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTable(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_339)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_339)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table) +{ + DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTableSGI(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table)); +} + +KEYWORD1 void KEYWORD2 NAME(ColorTableEXT)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table) +{ + DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTableEXT(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table)); +} + +KEYWORD1 void KEYWORD2 NAME(ColorTableParameterfv)(GLenum target, GLenum pname, const GLfloat * params) +{ + DISPATCH(ColorTableParameterfv, (target, pname, params), (F, "glColorTableParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_340)(GLenum target, GLenum pname, const GLfloat * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_340)(GLenum target, GLenum pname, const GLfloat * params) +{ + DISPATCH(ColorTableParameterfv, (target, pname, params), (F, "glColorTableParameterfvSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(ColorTableParameteriv)(GLenum target, GLenum pname, const GLint * params) +{ + DISPATCH(ColorTableParameteriv, (target, pname, params), (F, "glColorTableParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_341)(GLenum target, GLenum pname, const GLint * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_341)(GLenum target, GLenum pname, const GLint * params) +{ + DISPATCH(ColorTableParameteriv, (target, pname, params), (F, "glColorTableParameterivSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(CopyColorTable)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) +{ + DISPATCH(CopyColorTable, (target, internalformat, x, y, width), (F, "glCopyColorTable(0x%x, 0x%x, %d, %d, %d);\n", target, internalformat, x, y, width)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_342)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_342)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) +{ + DISPATCH(CopyColorTable, (target, internalformat, x, y, width), (F, "glCopyColorTableSGI(0x%x, 0x%x, %d, %d, %d);\n", target, internalformat, x, y, width)); +} + +KEYWORD1 void KEYWORD2 NAME(GetColorTable)(GLenum target, GLenum format, GLenum type, GLvoid * table) +{ + DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTable(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table)); +} + +#ifndef GLX_INDIRECT_RENDERING +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_343)(GLenum target, GLenum format, GLenum type, GLvoid * table); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_343)(GLenum target, GLenum format, GLenum type, GLvoid * table) +{ + DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTableSGI(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table)); +} +#endif /* GLX_INDIRECT_RENDERING */ + +#ifndef GLX_INDIRECT_RENDERING +KEYWORD1 void KEYWORD2 NAME(GetColorTableEXT)(GLenum target, GLenum format, GLenum type, GLvoid * table) +{ + DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTableEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table)); +} +#endif /* GLX_INDIRECT_RENDERING */ + +KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterfv)(GLenum target, GLenum pname, GLfloat * params) +{ + DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +#ifndef GLX_INDIRECT_RENDERING +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_344)(GLenum target, GLenum pname, GLfloat * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_344)(GLenum target, GLenum pname, GLfloat * params) +{ + DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfvSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} +#endif /* GLX_INDIRECT_RENDERING */ + +#ifndef GLX_INDIRECT_RENDERING +KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params) +{ + DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} +#endif /* GLX_INDIRECT_RENDERING */ + +KEYWORD1 void KEYWORD2 NAME(GetColorTableParameteriv)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +#ifndef GLX_INDIRECT_RENDERING +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_345)(GLenum target, GLenum pname, GLint * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_345)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameterivSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} +#endif /* GLX_INDIRECT_RENDERING */ + +#ifndef GLX_INDIRECT_RENDERING +KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterivEXT)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} +#endif /* GLX_INDIRECT_RENDERING */ + +KEYWORD1 void KEYWORD2 NAME(ColorSubTable)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data) +{ + DISPATCH(ColorSubTable, (target, start, count, format, type, data), (F, "glColorSubTable(0x%x, %d, %d, 0x%x, 0x%x, %p);\n", target, start, count, format, type, (const void *) data)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_346)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_346)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data) +{ + DISPATCH(ColorSubTable, (target, start, count, format, type, data), (F, "glColorSubTableEXT(0x%x, %d, %d, 0x%x, 0x%x, %p);\n", target, start, count, format, type, (const void *) data)); +} + +KEYWORD1 void KEYWORD2 NAME(CopyColorSubTable)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width) +{ + DISPATCH(CopyColorSubTable, (target, start, x, y, width), (F, "glCopyColorSubTable(0x%x, %d, %d, %d, %d);\n", target, start, x, y, width)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_347)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_347)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width) +{ + DISPATCH(CopyColorSubTable, (target, start, x, y, width), (F, "glCopyColorSubTableEXT(0x%x, %d, %d, %d, %d);\n", target, start, x, y, width)); +} + +KEYWORD1 void KEYWORD2 NAME(ConvolutionFilter1D)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image) +{ + DISPATCH(ConvolutionFilter1D, (target, internalformat, width, format, type, image), (F, "glConvolutionFilter1D(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) image)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_348)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_348)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image) +{ + DISPATCH(ConvolutionFilter1D, (target, internalformat, width, format, type, image), (F, "glConvolutionFilter1DEXT(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) image)); +} + +KEYWORD1 void KEYWORD2 NAME(ConvolutionFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image) +{ + DISPATCH(ConvolutionFilter2D, (target, internalformat, width, height, format, type, image), (F, "glConvolutionFilter2D(0x%x, 0x%x, %d, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, height, format, type, (const void *) image)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_349)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_349)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image) +{ + DISPATCH(ConvolutionFilter2D, (target, internalformat, width, height, format, type, image), (F, "glConvolutionFilter2DEXT(0x%x, 0x%x, %d, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, height, format, type, (const void *) image)); +} + +KEYWORD1 void KEYWORD2 NAME(ConvolutionParameterf)(GLenum target, GLenum pname, GLfloat params) +{ + DISPATCH(ConvolutionParameterf, (target, pname, params), (F, "glConvolutionParameterf(0x%x, 0x%x, %f);\n", target, pname, params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_350)(GLenum target, GLenum pname, GLfloat params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_350)(GLenum target, GLenum pname, GLfloat params) +{ + DISPATCH(ConvolutionParameterf, (target, pname, params), (F, "glConvolutionParameterfEXT(0x%x, 0x%x, %f);\n", target, pname, params)); +} + +KEYWORD1 void KEYWORD2 NAME(ConvolutionParameterfv)(GLenum target, GLenum pname, const GLfloat * params) +{ + DISPATCH(ConvolutionParameterfv, (target, pname, params), (F, "glConvolutionParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_351)(GLenum target, GLenum pname, const GLfloat * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_351)(GLenum target, GLenum pname, const GLfloat * params) +{ + DISPATCH(ConvolutionParameterfv, (target, pname, params), (F, "glConvolutionParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(ConvolutionParameteri)(GLenum target, GLenum pname, GLint params) +{ + DISPATCH(ConvolutionParameteri, (target, pname, params), (F, "glConvolutionParameteri(0x%x, 0x%x, %d);\n", target, pname, params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_352)(GLenum target, GLenum pname, GLint params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_352)(GLenum target, GLenum pname, GLint params) +{ + DISPATCH(ConvolutionParameteri, (target, pname, params), (F, "glConvolutionParameteriEXT(0x%x, 0x%x, %d);\n", target, pname, params)); +} + +KEYWORD1 void KEYWORD2 NAME(ConvolutionParameteriv)(GLenum target, GLenum pname, const GLint * params) +{ + DISPATCH(ConvolutionParameteriv, (target, pname, params), (F, "glConvolutionParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_353)(GLenum target, GLenum pname, const GLint * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_353)(GLenum target, GLenum pname, const GLint * params) +{ + DISPATCH(ConvolutionParameteriv, (target, pname, params), (F, "glConvolutionParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(CopyConvolutionFilter1D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) +{ + DISPATCH(CopyConvolutionFilter1D, (target, internalformat, x, y, width), (F, "glCopyConvolutionFilter1D(0x%x, 0x%x, %d, %d, %d);\n", target, internalformat, x, y, width)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_354)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_354)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) +{ + DISPATCH(CopyConvolutionFilter1D, (target, internalformat, x, y, width), (F, "glCopyConvolutionFilter1DEXT(0x%x, 0x%x, %d, %d, %d);\n", target, internalformat, x, y, width)); +} + +KEYWORD1 void KEYWORD2 NAME(CopyConvolutionFilter2D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height) +{ + DISPATCH(CopyConvolutionFilter2D, (target, internalformat, x, y, width, height), (F, "glCopyConvolutionFilter2D(0x%x, 0x%x, %d, %d, %d, %d);\n", target, internalformat, x, y, width, height)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_355)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_355)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height) +{ + DISPATCH(CopyConvolutionFilter2D, (target, internalformat, x, y, width, height), (F, "glCopyConvolutionFilter2DEXT(0x%x, 0x%x, %d, %d, %d, %d);\n", target, internalformat, x, y, width, height)); +} + +KEYWORD1 void KEYWORD2 NAME(GetConvolutionFilter)(GLenum target, GLenum format, GLenum type, GLvoid * image) +{ + DISPATCH(GetConvolutionFilter, (target, format, type, image), (F, "glGetConvolutionFilter(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) image)); +} + +#ifndef GLX_INDIRECT_RENDERING +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_356)(GLenum target, GLenum format, GLenum type, GLvoid * image); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_356)(GLenum target, GLenum format, GLenum type, GLvoid * image) +{ + DISPATCH(GetConvolutionFilter, (target, format, type, image), (F, "glGetConvolutionFilterEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) image)); +} +#endif /* GLX_INDIRECT_RENDERING */ + +KEYWORD1 void KEYWORD2 NAME(GetConvolutionParameterfv)(GLenum target, GLenum pname, GLfloat * params) +{ + DISPATCH(GetConvolutionParameterfv, (target, pname, params), (F, "glGetConvolutionParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +#ifndef GLX_INDIRECT_RENDERING +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_357)(GLenum target, GLenum pname, GLfloat * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_357)(GLenum target, GLenum pname, GLfloat * params) +{ + DISPATCH(GetConvolutionParameterfv, (target, pname, params), (F, "glGetConvolutionParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} +#endif /* GLX_INDIRECT_RENDERING */ + +KEYWORD1 void KEYWORD2 NAME(GetConvolutionParameteriv)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetConvolutionParameteriv, (target, pname, params), (F, "glGetConvolutionParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +#ifndef GLX_INDIRECT_RENDERING +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_358)(GLenum target, GLenum pname, GLint * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_358)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetConvolutionParameteriv, (target, pname, params), (F, "glGetConvolutionParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} +#endif /* GLX_INDIRECT_RENDERING */ + +KEYWORD1 void KEYWORD2 NAME(GetSeparableFilter)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span) +{ + DISPATCH(GetSeparableFilter, (target, format, type, row, column, span), (F, "glGetSeparableFilter(0x%x, 0x%x, 0x%x, %p, %p, %p);\n", target, format, type, (const void *) row, (const void *) column, (const void *) span)); +} + +#ifndef GLX_INDIRECT_RENDERING +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_359)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_359)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span) +{ + DISPATCH(GetSeparableFilter, (target, format, type, row, column, span), (F, "glGetSeparableFilterEXT(0x%x, 0x%x, 0x%x, %p, %p, %p);\n", target, format, type, (const void *) row, (const void *) column, (const void *) span)); +} +#endif /* GLX_INDIRECT_RENDERING */ + +KEYWORD1 void KEYWORD2 NAME(SeparableFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column) +{ + DISPATCH(SeparableFilter2D, (target, internalformat, width, height, format, type, row, column), (F, "glSeparableFilter2D(0x%x, 0x%x, %d, %d, 0x%x, 0x%x, %p, %p);\n", target, internalformat, width, height, format, type, (const void *) row, (const void *) column)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_360)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_360)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column) +{ + DISPATCH(SeparableFilter2D, (target, internalformat, width, height, format, type, row, column), (F, "glSeparableFilter2DEXT(0x%x, 0x%x, %d, %d, 0x%x, 0x%x, %p, %p);\n", target, internalformat, width, height, format, type, (const void *) row, (const void *) column)); +} + +KEYWORD1 void KEYWORD2 NAME(GetHistogram)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) +{ + DISPATCH(GetHistogram, (target, reset, format, type, values), (F, "glGetHistogram(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values)); +} + +#ifndef GLX_INDIRECT_RENDERING +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_361)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_361)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) +{ + DISPATCH(GetHistogram, (target, reset, format, type, values), (F, "glGetHistogramEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values)); +} +#endif /* GLX_INDIRECT_RENDERING */ + +KEYWORD1 void KEYWORD2 NAME(GetHistogramParameterfv)(GLenum target, GLenum pname, GLfloat * params) +{ + DISPATCH(GetHistogramParameterfv, (target, pname, params), (F, "glGetHistogramParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +#ifndef GLX_INDIRECT_RENDERING +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_362)(GLenum target, GLenum pname, GLfloat * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_362)(GLenum target, GLenum pname, GLfloat * params) +{ + DISPATCH(GetHistogramParameterfv, (target, pname, params), (F, "glGetHistogramParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} +#endif /* GLX_INDIRECT_RENDERING */ + +KEYWORD1 void KEYWORD2 NAME(GetHistogramParameteriv)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetHistogramParameteriv, (target, pname, params), (F, "glGetHistogramParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +#ifndef GLX_INDIRECT_RENDERING +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_363)(GLenum target, GLenum pname, GLint * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_363)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetHistogramParameteriv, (target, pname, params), (F, "glGetHistogramParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} +#endif /* GLX_INDIRECT_RENDERING */ + +KEYWORD1 void KEYWORD2 NAME(GetMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) +{ + DISPATCH(GetMinmax, (target, reset, format, type, values), (F, "glGetMinmax(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values)); +} + +#ifndef GLX_INDIRECT_RENDERING +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_364)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_364)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) +{ + DISPATCH(GetMinmax, (target, reset, format, type, values), (F, "glGetMinmaxEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values)); +} +#endif /* GLX_INDIRECT_RENDERING */ + +KEYWORD1 void KEYWORD2 NAME(GetMinmaxParameterfv)(GLenum target, GLenum pname, GLfloat * params) +{ + DISPATCH(GetMinmaxParameterfv, (target, pname, params), (F, "glGetMinmaxParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +#ifndef GLX_INDIRECT_RENDERING +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_365)(GLenum target, GLenum pname, GLfloat * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_365)(GLenum target, GLenum pname, GLfloat * params) +{ + DISPATCH(GetMinmaxParameterfv, (target, pname, params), (F, "glGetMinmaxParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} +#endif /* GLX_INDIRECT_RENDERING */ + +KEYWORD1 void KEYWORD2 NAME(GetMinmaxParameteriv)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetMinmaxParameteriv, (target, pname, params), (F, "glGetMinmaxParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +#ifndef GLX_INDIRECT_RENDERING +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_366)(GLenum target, GLenum pname, GLint * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_366)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetMinmaxParameteriv, (target, pname, params), (F, "glGetMinmaxParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} +#endif /* GLX_INDIRECT_RENDERING */ + +KEYWORD1 void KEYWORD2 NAME(Histogram)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink) +{ + DISPATCH(Histogram, (target, width, internalformat, sink), (F, "glHistogram(0x%x, %d, 0x%x, %d);\n", target, width, internalformat, sink)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_367)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_367)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink) +{ + DISPATCH(Histogram, (target, width, internalformat, sink), (F, "glHistogramEXT(0x%x, %d, 0x%x, %d);\n", target, width, internalformat, sink)); +} + +KEYWORD1 void KEYWORD2 NAME(Minmax)(GLenum target, GLenum internalformat, GLboolean sink) +{ + DISPATCH(Minmax, (target, internalformat, sink), (F, "glMinmax(0x%x, 0x%x, %d);\n", target, internalformat, sink)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_368)(GLenum target, GLenum internalformat, GLboolean sink); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_368)(GLenum target, GLenum internalformat, GLboolean sink) +{ + DISPATCH(Minmax, (target, internalformat, sink), (F, "glMinmaxEXT(0x%x, 0x%x, %d);\n", target, internalformat, sink)); +} + +KEYWORD1 void KEYWORD2 NAME(ResetHistogram)(GLenum target) +{ + DISPATCH(ResetHistogram, (target), (F, "glResetHistogram(0x%x);\n", target)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_369)(GLenum target); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_369)(GLenum target) +{ + DISPATCH(ResetHistogram, (target), (F, "glResetHistogramEXT(0x%x);\n", target)); +} + +KEYWORD1 void KEYWORD2 NAME(ResetMinmax)(GLenum target) +{ + DISPATCH(ResetMinmax, (target), (F, "glResetMinmax(0x%x);\n", target)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_370)(GLenum target); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_370)(GLenum target) +{ + DISPATCH(ResetMinmax, (target), (F, "glResetMinmaxEXT(0x%x);\n", target)); +} + +KEYWORD1 void KEYWORD2 NAME(TexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels) +{ + DISPATCH(TexImage3D, (target, level, internalformat, width, height, depth, border, format, type, pixels), (F, "glTexImage3D(0x%x, %d, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, height, depth, border, format, type, (const void *) pixels)); +} + +KEYWORD1 void KEYWORD2 NAME(TexImage3DEXT)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels) +{ + DISPATCH(TexImage3D, (target, level, internalformat, width, height, depth, border, format, type, pixels), (F, "glTexImage3DEXT(0x%x, %d, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, height, depth, border, format, type, (const void *) pixels)); +} + +KEYWORD1 void KEYWORD2 NAME(TexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels) +{ + DISPATCH(TexSubImage3D, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels), (F, "glTexSubImage3D(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, (const void *) pixels)); +} + +KEYWORD1 void KEYWORD2 NAME(TexSubImage3DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels) +{ + DISPATCH(TexSubImage3D, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels), (F, "glTexSubImage3DEXT(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, (const void *) pixels)); +} + +KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) +{ + DISPATCH(CopyTexSubImage3D, (target, level, xoffset, yoffset, zoffset, x, y, width, height), (F, "glCopyTexSubImage3D(0x%x, %d, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, zoffset, x, y, width, height)); +} + +KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage3DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) +{ + DISPATCH(CopyTexSubImage3D, (target, level, xoffset, yoffset, zoffset, x, y, width, height), (F, "glCopyTexSubImage3DEXT(0x%x, %d, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, zoffset, x, y, width, height)); +} + +KEYWORD1 void KEYWORD2 NAME(ActiveTexture)(GLenum texture) +{ + DISPATCH(ActiveTextureARB, (texture), (F, "glActiveTexture(0x%x);\n", texture)); +} + +KEYWORD1 void KEYWORD2 NAME(ActiveTextureARB)(GLenum texture) +{ + DISPATCH(ActiveTextureARB, (texture), (F, "glActiveTextureARB(0x%x);\n", texture)); +} + +KEYWORD1 void KEYWORD2 NAME(ClientActiveTexture)(GLenum texture) +{ + DISPATCH(ClientActiveTextureARB, (texture), (F, "glClientActiveTexture(0x%x);\n", texture)); +} + +KEYWORD1 void KEYWORD2 NAME(ClientActiveTextureARB)(GLenum texture) +{ + DISPATCH(ClientActiveTextureARB, (texture), (F, "glClientActiveTextureARB(0x%x);\n", texture)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1d)(GLenum target, GLdouble s) +{ + DISPATCH(MultiTexCoord1dARB, (target, s), (F, "glMultiTexCoord1d(0x%x, %f);\n", target, s)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1dARB)(GLenum target, GLdouble s) +{ + DISPATCH(MultiTexCoord1dARB, (target, s), (F, "glMultiTexCoord1dARB(0x%x, %f);\n", target, s)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1dv)(GLenum target, const GLdouble * v) +{ + DISPATCH(MultiTexCoord1dvARB, (target, v), (F, "glMultiTexCoord1dv(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1dvARB)(GLenum target, const GLdouble * v) +{ + DISPATCH(MultiTexCoord1dvARB, (target, v), (F, "glMultiTexCoord1dvARB(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1f)(GLenum target, GLfloat s) +{ + DISPATCH(MultiTexCoord1fARB, (target, s), (F, "glMultiTexCoord1f(0x%x, %f);\n", target, s)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1fARB)(GLenum target, GLfloat s) +{ + DISPATCH(MultiTexCoord1fARB, (target, s), (F, "glMultiTexCoord1fARB(0x%x, %f);\n", target, s)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1fv)(GLenum target, const GLfloat * v) +{ + DISPATCH(MultiTexCoord1fvARB, (target, v), (F, "glMultiTexCoord1fv(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1fvARB)(GLenum target, const GLfloat * v) +{ + DISPATCH(MultiTexCoord1fvARB, (target, v), (F, "glMultiTexCoord1fvARB(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1i)(GLenum target, GLint s) +{ + DISPATCH(MultiTexCoord1iARB, (target, s), (F, "glMultiTexCoord1i(0x%x, %d);\n", target, s)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1iARB)(GLenum target, GLint s) +{ + DISPATCH(MultiTexCoord1iARB, (target, s), (F, "glMultiTexCoord1iARB(0x%x, %d);\n", target, s)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1iv)(GLenum target, const GLint * v) +{ + DISPATCH(MultiTexCoord1ivARB, (target, v), (F, "glMultiTexCoord1iv(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1ivARB)(GLenum target, const GLint * v) +{ + DISPATCH(MultiTexCoord1ivARB, (target, v), (F, "glMultiTexCoord1ivARB(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1s)(GLenum target, GLshort s) +{ + DISPATCH(MultiTexCoord1sARB, (target, s), (F, "glMultiTexCoord1s(0x%x, %d);\n", target, s)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1sARB)(GLenum target, GLshort s) +{ + DISPATCH(MultiTexCoord1sARB, (target, s), (F, "glMultiTexCoord1sARB(0x%x, %d);\n", target, s)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1sv)(GLenum target, const GLshort * v) +{ + DISPATCH(MultiTexCoord1svARB, (target, v), (F, "glMultiTexCoord1sv(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1svARB)(GLenum target, const GLshort * v) +{ + DISPATCH(MultiTexCoord1svARB, (target, v), (F, "glMultiTexCoord1svARB(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2d)(GLenum target, GLdouble s, GLdouble t) +{ + DISPATCH(MultiTexCoord2dARB, (target, s, t), (F, "glMultiTexCoord2d(0x%x, %f, %f);\n", target, s, t)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2dARB)(GLenum target, GLdouble s, GLdouble t) +{ + DISPATCH(MultiTexCoord2dARB, (target, s, t), (F, "glMultiTexCoord2dARB(0x%x, %f, %f);\n", target, s, t)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2dv)(GLenum target, const GLdouble * v) +{ + DISPATCH(MultiTexCoord2dvARB, (target, v), (F, "glMultiTexCoord2dv(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2dvARB)(GLenum target, const GLdouble * v) +{ + DISPATCH(MultiTexCoord2dvARB, (target, v), (F, "glMultiTexCoord2dvARB(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2f)(GLenum target, GLfloat s, GLfloat t) +{ + DISPATCH(MultiTexCoord2fARB, (target, s, t), (F, "glMultiTexCoord2f(0x%x, %f, %f);\n", target, s, t)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2fARB)(GLenum target, GLfloat s, GLfloat t) +{ + DISPATCH(MultiTexCoord2fARB, (target, s, t), (F, "glMultiTexCoord2fARB(0x%x, %f, %f);\n", target, s, t)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2fv)(GLenum target, const GLfloat * v) +{ + DISPATCH(MultiTexCoord2fvARB, (target, v), (F, "glMultiTexCoord2fv(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2fvARB)(GLenum target, const GLfloat * v) +{ + DISPATCH(MultiTexCoord2fvARB, (target, v), (F, "glMultiTexCoord2fvARB(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2i)(GLenum target, GLint s, GLint t) +{ + DISPATCH(MultiTexCoord2iARB, (target, s, t), (F, "glMultiTexCoord2i(0x%x, %d, %d);\n", target, s, t)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2iARB)(GLenum target, GLint s, GLint t) +{ + DISPATCH(MultiTexCoord2iARB, (target, s, t), (F, "glMultiTexCoord2iARB(0x%x, %d, %d);\n", target, s, t)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2iv)(GLenum target, const GLint * v) +{ + DISPATCH(MultiTexCoord2ivARB, (target, v), (F, "glMultiTexCoord2iv(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2ivARB)(GLenum target, const GLint * v) +{ + DISPATCH(MultiTexCoord2ivARB, (target, v), (F, "glMultiTexCoord2ivARB(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2s)(GLenum target, GLshort s, GLshort t) +{ + DISPATCH(MultiTexCoord2sARB, (target, s, t), (F, "glMultiTexCoord2s(0x%x, %d, %d);\n", target, s, t)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2sARB)(GLenum target, GLshort s, GLshort t) +{ + DISPATCH(MultiTexCoord2sARB, (target, s, t), (F, "glMultiTexCoord2sARB(0x%x, %d, %d);\n", target, s, t)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2sv)(GLenum target, const GLshort * v) +{ + DISPATCH(MultiTexCoord2svARB, (target, v), (F, "glMultiTexCoord2sv(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2svARB)(GLenum target, const GLshort * v) +{ + DISPATCH(MultiTexCoord2svARB, (target, v), (F, "glMultiTexCoord2svARB(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3d)(GLenum target, GLdouble s, GLdouble t, GLdouble r) +{ + DISPATCH(MultiTexCoord3dARB, (target, s, t, r), (F, "glMultiTexCoord3d(0x%x, %f, %f, %f);\n", target, s, t, r)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r) +{ + DISPATCH(MultiTexCoord3dARB, (target, s, t, r), (F, "glMultiTexCoord3dARB(0x%x, %f, %f, %f);\n", target, s, t, r)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3dv)(GLenum target, const GLdouble * v) +{ + DISPATCH(MultiTexCoord3dvARB, (target, v), (F, "glMultiTexCoord3dv(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3dvARB)(GLenum target, const GLdouble * v) +{ + DISPATCH(MultiTexCoord3dvARB, (target, v), (F, "glMultiTexCoord3dvARB(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3f)(GLenum target, GLfloat s, GLfloat t, GLfloat r) +{ + DISPATCH(MultiTexCoord3fARB, (target, s, t, r), (F, "glMultiTexCoord3f(0x%x, %f, %f, %f);\n", target, s, t, r)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r) +{ + DISPATCH(MultiTexCoord3fARB, (target, s, t, r), (F, "glMultiTexCoord3fARB(0x%x, %f, %f, %f);\n", target, s, t, r)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3fv)(GLenum target, const GLfloat * v) +{ + DISPATCH(MultiTexCoord3fvARB, (target, v), (F, "glMultiTexCoord3fv(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3fvARB)(GLenum target, const GLfloat * v) +{ + DISPATCH(MultiTexCoord3fvARB, (target, v), (F, "glMultiTexCoord3fvARB(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3i)(GLenum target, GLint s, GLint t, GLint r) +{ + DISPATCH(MultiTexCoord3iARB, (target, s, t, r), (F, "glMultiTexCoord3i(0x%x, %d, %d, %d);\n", target, s, t, r)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3iARB)(GLenum target, GLint s, GLint t, GLint r) +{ + DISPATCH(MultiTexCoord3iARB, (target, s, t, r), (F, "glMultiTexCoord3iARB(0x%x, %d, %d, %d);\n", target, s, t, r)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3iv)(GLenum target, const GLint * v) +{ + DISPATCH(MultiTexCoord3ivARB, (target, v), (F, "glMultiTexCoord3iv(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3ivARB)(GLenum target, const GLint * v) +{ + DISPATCH(MultiTexCoord3ivARB, (target, v), (F, "glMultiTexCoord3ivARB(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3s)(GLenum target, GLshort s, GLshort t, GLshort r) +{ + DISPATCH(MultiTexCoord3sARB, (target, s, t, r), (F, "glMultiTexCoord3s(0x%x, %d, %d, %d);\n", target, s, t, r)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3sARB)(GLenum target, GLshort s, GLshort t, GLshort r) +{ + DISPATCH(MultiTexCoord3sARB, (target, s, t, r), (F, "glMultiTexCoord3sARB(0x%x, %d, %d, %d);\n", target, s, t, r)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3sv)(GLenum target, const GLshort * v) +{ + DISPATCH(MultiTexCoord3svARB, (target, v), (F, "glMultiTexCoord3sv(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3svARB)(GLenum target, const GLshort * v) +{ + DISPATCH(MultiTexCoord3svARB, (target, v), (F, "glMultiTexCoord3svARB(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4d)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) +{ + DISPATCH(MultiTexCoord4dARB, (target, s, t, r, q), (F, "glMultiTexCoord4d(0x%x, %f, %f, %f, %f);\n", target, s, t, r, q)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) +{ + DISPATCH(MultiTexCoord4dARB, (target, s, t, r, q), (F, "glMultiTexCoord4dARB(0x%x, %f, %f, %f, %f);\n", target, s, t, r, q)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4dv)(GLenum target, const GLdouble * v) +{ + DISPATCH(MultiTexCoord4dvARB, (target, v), (F, "glMultiTexCoord4dv(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4dvARB)(GLenum target, const GLdouble * v) +{ + DISPATCH(MultiTexCoord4dvARB, (target, v), (F, "glMultiTexCoord4dvARB(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4f)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) +{ + DISPATCH(MultiTexCoord4fARB, (target, s, t, r, q), (F, "glMultiTexCoord4f(0x%x, %f, %f, %f, %f);\n", target, s, t, r, q)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) +{ + DISPATCH(MultiTexCoord4fARB, (target, s, t, r, q), (F, "glMultiTexCoord4fARB(0x%x, %f, %f, %f, %f);\n", target, s, t, r, q)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4fv)(GLenum target, const GLfloat * v) +{ + DISPATCH(MultiTexCoord4fvARB, (target, v), (F, "glMultiTexCoord4fv(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4fvARB)(GLenum target, const GLfloat * v) +{ + DISPATCH(MultiTexCoord4fvARB, (target, v), (F, "glMultiTexCoord4fvARB(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4i)(GLenum target, GLint s, GLint t, GLint r, GLint q) +{ + DISPATCH(MultiTexCoord4iARB, (target, s, t, r, q), (F, "glMultiTexCoord4i(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4iARB)(GLenum target, GLint s, GLint t, GLint r, GLint q) +{ + DISPATCH(MultiTexCoord4iARB, (target, s, t, r, q), (F, "glMultiTexCoord4iARB(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4iv)(GLenum target, const GLint * v) +{ + DISPATCH(MultiTexCoord4ivARB, (target, v), (F, "glMultiTexCoord4iv(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4ivARB)(GLenum target, const GLint * v) +{ + DISPATCH(MultiTexCoord4ivARB, (target, v), (F, "glMultiTexCoord4ivARB(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4s)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) +{ + DISPATCH(MultiTexCoord4sARB, (target, s, t, r, q), (F, "glMultiTexCoord4s(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4sARB)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) +{ + DISPATCH(MultiTexCoord4sARB, (target, s, t, r, q), (F, "glMultiTexCoord4sARB(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4sv)(GLenum target, const GLshort * v) +{ + DISPATCH(MultiTexCoord4svARB, (target, v), (F, "glMultiTexCoord4sv(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4svARB)(GLenum target, const GLshort * v) +{ + DISPATCH(MultiTexCoord4svARB, (target, v), (F, "glMultiTexCoord4svARB(0x%x, %p);\n", target, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(AttachShader)(GLuint program, GLuint shader) +{ + DISPATCH(AttachShader, (program, shader), (F, "glAttachShader(%d, %d);\n", program, shader)); +} + +KEYWORD1 GLuint KEYWORD2 NAME(CreateProgram)(void) +{ + RETURN_DISPATCH(CreateProgram, (), (F, "glCreateProgram();\n")); +} + +KEYWORD1 GLuint KEYWORD2 NAME(CreateShader)(GLenum type) +{ + RETURN_DISPATCH(CreateShader, (type), (F, "glCreateShader(0x%x);\n", type)); +} + +KEYWORD1 void KEYWORD2 NAME(DeleteProgram)(GLuint program) +{ + DISPATCH(DeleteProgram, (program), (F, "glDeleteProgram(%d);\n", program)); +} + +KEYWORD1 void KEYWORD2 NAME(DeleteShader)(GLuint program) +{ + DISPATCH(DeleteShader, (program), (F, "glDeleteShader(%d);\n", program)); +} + +KEYWORD1 void KEYWORD2 NAME(DetachShader)(GLuint program, GLuint shader) +{ + DISPATCH(DetachShader, (program, shader), (F, "glDetachShader(%d, %d);\n", program, shader)); +} + +KEYWORD1 void KEYWORD2 NAME(GetAttachedShaders)(GLuint program, GLsizei maxCount, GLsizei * count, GLuint * obj) +{ + DISPATCH(GetAttachedShaders, (program, maxCount, count, obj), (F, "glGetAttachedShaders(%d, %d, %p, %p);\n", program, maxCount, (const void *) count, (const void *) obj)); +} + +KEYWORD1 void KEYWORD2 NAME(GetProgramInfoLog)(GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog) +{ + DISPATCH(GetProgramInfoLog, (program, bufSize, length, infoLog), (F, "glGetProgramInfoLog(%d, %d, %p, %p);\n", program, bufSize, (const void *) length, (const void *) infoLog)); +} + +KEYWORD1 void KEYWORD2 NAME(GetProgramiv)(GLuint program, GLenum pname, GLint * params) +{ + DISPATCH(GetProgramiv, (program, pname, params), (F, "glGetProgramiv(%d, 0x%x, %p);\n", program, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetShaderInfoLog)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog) +{ + DISPATCH(GetShaderInfoLog, (shader, bufSize, length, infoLog), (F, "glGetShaderInfoLog(%d, %d, %p, %p);\n", shader, bufSize, (const void *) length, (const void *) infoLog)); +} + +KEYWORD1 void KEYWORD2 NAME(GetShaderiv)(GLuint shader, GLenum pname, GLint * params) +{ + DISPATCH(GetShaderiv, (shader, pname, params), (F, "glGetShaderiv(%d, 0x%x, %p);\n", shader, pname, (const void *) params)); +} + +KEYWORD1 GLboolean KEYWORD2 NAME(IsProgram)(GLuint program) +{ + RETURN_DISPATCH(IsProgram, (program), (F, "glIsProgram(%d);\n", program)); +} + +KEYWORD1 GLboolean KEYWORD2 NAME(IsShader)(GLuint shader) +{ + RETURN_DISPATCH(IsShader, (shader), (F, "glIsShader(%d);\n", shader)); +} + +KEYWORD1 void KEYWORD2 NAME(StencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask) +{ + DISPATCH(StencilFuncSeparate, (face, func, ref, mask), (F, "glStencilFuncSeparate(0x%x, 0x%x, %d, %d);\n", face, func, ref, mask)); +} + +KEYWORD1 void KEYWORD2 NAME(StencilMaskSeparate)(GLenum face, GLuint mask) +{ + DISPATCH(StencilMaskSeparate, (face, mask), (F, "glStencilMaskSeparate(0x%x, %d);\n", face, mask)); +} + +KEYWORD1 void KEYWORD2 NAME(StencilOpSeparate)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass) +{ + DISPATCH(StencilOpSeparate, (face, sfail, zfail, zpass), (F, "glStencilOpSeparate(0x%x, 0x%x, 0x%x, 0x%x);\n", face, sfail, zfail, zpass)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_423)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_423)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass) +{ + DISPATCH(StencilOpSeparate, (face, sfail, zfail, zpass), (F, "glStencilOpSeparateATI(0x%x, 0x%x, 0x%x, 0x%x);\n", face, sfail, zfail, zpass)); +} + +KEYWORD1 void KEYWORD2 NAME(UniformMatrix2x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) +{ + DISPATCH(UniformMatrix2x3fv, (location, count, transpose, value), (F, "glUniformMatrix2x3fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(UniformMatrix2x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) +{ + DISPATCH(UniformMatrix2x4fv, (location, count, transpose, value), (F, "glUniformMatrix2x4fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(UniformMatrix3x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) +{ + DISPATCH(UniformMatrix3x2fv, (location, count, transpose, value), (F, "glUniformMatrix3x2fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(UniformMatrix3x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) +{ + DISPATCH(UniformMatrix3x4fv, (location, count, transpose, value), (F, "glUniformMatrix3x4fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(UniformMatrix4x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) +{ + DISPATCH(UniformMatrix4x2fv, (location, count, transpose, value), (F, "glUniformMatrix4x2fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(UniformMatrix4x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) +{ + DISPATCH(UniformMatrix4x3fv, (location, count, transpose, value), (F, "glUniformMatrix4x3fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(LoadTransposeMatrixd)(const GLdouble * m) +{ + DISPATCH(LoadTransposeMatrixdARB, (m), (F, "glLoadTransposeMatrixd(%p);\n", (const void *) m)); +} + +KEYWORD1 void KEYWORD2 NAME(LoadTransposeMatrixdARB)(const GLdouble * m) +{ + DISPATCH(LoadTransposeMatrixdARB, (m), (F, "glLoadTransposeMatrixdARB(%p);\n", (const void *) m)); +} + +KEYWORD1 void KEYWORD2 NAME(LoadTransposeMatrixf)(const GLfloat * m) +{ + DISPATCH(LoadTransposeMatrixfARB, (m), (F, "glLoadTransposeMatrixf(%p);\n", (const void *) m)); +} + +KEYWORD1 void KEYWORD2 NAME(LoadTransposeMatrixfARB)(const GLfloat * m) +{ + DISPATCH(LoadTransposeMatrixfARB, (m), (F, "glLoadTransposeMatrixfARB(%p);\n", (const void *) m)); +} + +KEYWORD1 void KEYWORD2 NAME(MultTransposeMatrixd)(const GLdouble * m) +{ + DISPATCH(MultTransposeMatrixdARB, (m), (F, "glMultTransposeMatrixd(%p);\n", (const void *) m)); +} + +KEYWORD1 void KEYWORD2 NAME(MultTransposeMatrixdARB)(const GLdouble * m) +{ + DISPATCH(MultTransposeMatrixdARB, (m), (F, "glMultTransposeMatrixdARB(%p);\n", (const void *) m)); +} + +KEYWORD1 void KEYWORD2 NAME(MultTransposeMatrixf)(const GLfloat * m) +{ + DISPATCH(MultTransposeMatrixfARB, (m), (F, "glMultTransposeMatrixf(%p);\n", (const void *) m)); +} + +KEYWORD1 void KEYWORD2 NAME(MultTransposeMatrixfARB)(const GLfloat * m) +{ + DISPATCH(MultTransposeMatrixfARB, (m), (F, "glMultTransposeMatrixfARB(%p);\n", (const void *) m)); +} + +KEYWORD1 void KEYWORD2 NAME(SampleCoverage)(GLclampf value, GLboolean invert) +{ + DISPATCH(SampleCoverageARB, (value, invert), (F, "glSampleCoverage(%f, %d);\n", value, invert)); +} + +KEYWORD1 void KEYWORD2 NAME(SampleCoverageARB)(GLclampf value, GLboolean invert) +{ + DISPATCH(SampleCoverageARB, (value, invert), (F, "glSampleCoverageARB(%f, %d);\n", value, invert)); +} + +KEYWORD1 void KEYWORD2 NAME(CompressedTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data) +{ + DISPATCH(CompressedTexImage1DARB, (target, level, internalformat, width, border, imageSize, data), (F, "glCompressedTexImage1D(0x%x, %d, 0x%x, %d, %d, %d, %p);\n", target, level, internalformat, width, border, imageSize, (const void *) data)); +} + +KEYWORD1 void KEYWORD2 NAME(CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data) +{ + DISPATCH(CompressedTexImage1DARB, (target, level, internalformat, width, border, imageSize, data), (F, "glCompressedTexImage1DARB(0x%x, %d, 0x%x, %d, %d, %d, %p);\n", target, level, internalformat, width, border, imageSize, (const void *) data)); +} + +KEYWORD1 void KEYWORD2 NAME(CompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data) +{ + DISPATCH(CompressedTexImage2DARB, (target, level, internalformat, width, height, border, imageSize, data), (F, "glCompressedTexImage2D(0x%x, %d, 0x%x, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, border, imageSize, (const void *) data)); +} + +KEYWORD1 void KEYWORD2 NAME(CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data) +{ + DISPATCH(CompressedTexImage2DARB, (target, level, internalformat, width, height, border, imageSize, data), (F, "glCompressedTexImage2DARB(0x%x, %d, 0x%x, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, border, imageSize, (const void *) data)); +} + +KEYWORD1 void KEYWORD2 NAME(CompressedTexImage3D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data) +{ + DISPATCH(CompressedTexImage3DARB, (target, level, internalformat, width, height, depth, border, imageSize, data), (F, "glCompressedTexImage3D(0x%x, %d, 0x%x, %d, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, depth, border, imageSize, (const void *) data)); +} + +KEYWORD1 void KEYWORD2 NAME(CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data) +{ + DISPATCH(CompressedTexImage3DARB, (target, level, internalformat, width, height, depth, border, imageSize, data), (F, "glCompressedTexImage3DARB(0x%x, %d, 0x%x, %d, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, depth, border, imageSize, (const void *) data)); +} + +KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data) +{ + DISPATCH(CompressedTexSubImage1DARB, (target, level, xoffset, width, format, imageSize, data), (F, "glCompressedTexSubImage1D(0x%x, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, width, format, imageSize, (const void *) data)); +} + +KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data) +{ + DISPATCH(CompressedTexSubImage1DARB, (target, level, xoffset, width, format, imageSize, data), (F, "glCompressedTexSubImage1DARB(0x%x, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, width, format, imageSize, (const void *) data)); +} + +KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data) +{ + DISPATCH(CompressedTexSubImage2DARB, (target, level, xoffset, yoffset, width, height, format, imageSize, data), (F, "glCompressedTexSubImage2D(0x%x, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, width, height, format, imageSize, (const void *) data)); +} + +KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data) +{ + DISPATCH(CompressedTexSubImage2DARB, (target, level, xoffset, yoffset, width, height, format, imageSize, data), (F, "glCompressedTexSubImage2DARB(0x%x, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, width, height, format, imageSize, (const void *) data)); +} + +KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data) +{ + DISPATCH(CompressedTexSubImage3DARB, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data), (F, "glCompressedTexSubImage3D(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, (const void *) data)); +} + +KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data) +{ + DISPATCH(CompressedTexSubImage3DARB, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data), (F, "glCompressedTexSubImage3DARB(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, (const void *) data)); +} + +KEYWORD1 void KEYWORD2 NAME(GetCompressedTexImage)(GLenum target, GLint level, GLvoid * img) +{ + DISPATCH(GetCompressedTexImageARB, (target, level, img), (F, "glGetCompressedTexImage(0x%x, %d, %p);\n", target, level, (const void *) img)); +} + +KEYWORD1 void KEYWORD2 NAME(GetCompressedTexImageARB)(GLenum target, GLint level, GLvoid * img) +{ + DISPATCH(GetCompressedTexImageARB, (target, level, img), (F, "glGetCompressedTexImageARB(0x%x, %d, %p);\n", target, level, (const void *) img)); +} + +KEYWORD1 void KEYWORD2 NAME(DisableVertexAttribArray)(GLuint index) +{ + DISPATCH(DisableVertexAttribArrayARB, (index), (F, "glDisableVertexAttribArray(%d);\n", index)); +} + +KEYWORD1 void KEYWORD2 NAME(DisableVertexAttribArrayARB)(GLuint index) +{ + DISPATCH(DisableVertexAttribArrayARB, (index), (F, "glDisableVertexAttribArrayARB(%d);\n", index)); +} + +KEYWORD1 void KEYWORD2 NAME(EnableVertexAttribArray)(GLuint index) +{ + DISPATCH(EnableVertexAttribArrayARB, (index), (F, "glEnableVertexAttribArray(%d);\n", index)); +} + +KEYWORD1 void KEYWORD2 NAME(EnableVertexAttribArrayARB)(GLuint index) +{ + DISPATCH(EnableVertexAttribArrayARB, (index), (F, "glEnableVertexAttribArrayARB(%d);\n", index)); +} + +KEYWORD1 void KEYWORD2 NAME(GetProgramEnvParameterdvARB)(GLenum target, GLuint index, GLdouble * params) +{ + DISPATCH(GetProgramEnvParameterdvARB, (target, index, params), (F, "glGetProgramEnvParameterdvARB(0x%x, %d, %p);\n", target, index, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetProgramEnvParameterfvARB)(GLenum target, GLuint index, GLfloat * params) +{ + DISPATCH(GetProgramEnvParameterfvARB, (target, index, params), (F, "glGetProgramEnvParameterfvARB(0x%x, %d, %p);\n", target, index, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetProgramLocalParameterdvARB)(GLenum target, GLuint index, GLdouble * params) +{ + DISPATCH(GetProgramLocalParameterdvARB, (target, index, params), (F, "glGetProgramLocalParameterdvARB(0x%x, %d, %p);\n", target, index, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetProgramLocalParameterfvARB)(GLenum target, GLuint index, GLfloat * params) +{ + DISPATCH(GetProgramLocalParameterfvARB, (target, index, params), (F, "glGetProgramLocalParameterfvARB(0x%x, %d, %p);\n", target, index, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetProgramStringARB)(GLenum target, GLenum pname, GLvoid * string) +{ + DISPATCH(GetProgramStringARB, (target, pname, string), (F, "glGetProgramStringARB(0x%x, 0x%x, %p);\n", target, pname, (const void *) string)); +} + +KEYWORD1 void KEYWORD2 NAME(GetProgramivARB)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetProgramivARB, (target, pname, params), (F, "glGetProgramivARB(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetVertexAttribdv)(GLuint index, GLenum pname, GLdouble * params) +{ + DISPATCH(GetVertexAttribdvARB, (index, pname, params), (F, "glGetVertexAttribdv(%d, 0x%x, %p);\n", index, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetVertexAttribdvARB)(GLuint index, GLenum pname, GLdouble * params) +{ + DISPATCH(GetVertexAttribdvARB, (index, pname, params), (F, "glGetVertexAttribdvARB(%d, 0x%x, %p);\n", index, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetVertexAttribfv)(GLuint index, GLenum pname, GLfloat * params) +{ + DISPATCH(GetVertexAttribfvARB, (index, pname, params), (F, "glGetVertexAttribfv(%d, 0x%x, %p);\n", index, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetVertexAttribfvARB)(GLuint index, GLenum pname, GLfloat * params) +{ + DISPATCH(GetVertexAttribfvARB, (index, pname, params), (F, "glGetVertexAttribfvARB(%d, 0x%x, %p);\n", index, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetVertexAttribiv)(GLuint index, GLenum pname, GLint * params) +{ + DISPATCH(GetVertexAttribivARB, (index, pname, params), (F, "glGetVertexAttribiv(%d, 0x%x, %p);\n", index, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetVertexAttribivARB)(GLuint index, GLenum pname, GLint * params) +{ + DISPATCH(GetVertexAttribivARB, (index, pname, params), (F, "glGetVertexAttribivARB(%d, 0x%x, %p);\n", index, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(ProgramEnvParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) +{ + DISPATCH(ProgramEnvParameter4dARB, (target, index, x, y, z, w), (F, "glProgramEnvParameter4dARB(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(ProgramParameter4dNV)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) +{ + DISPATCH(ProgramEnvParameter4dARB, (target, index, x, y, z, w), (F, "glProgramParameter4dNV(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(ProgramEnvParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params) +{ + DISPATCH(ProgramEnvParameter4dvARB, (target, index, params), (F, "glProgramEnvParameter4dvARB(0x%x, %d, %p);\n", target, index, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(ProgramParameter4dvNV)(GLenum target, GLuint index, const GLdouble * params) +{ + DISPATCH(ProgramEnvParameter4dvARB, (target, index, params), (F, "glProgramParameter4dvNV(0x%x, %d, %p);\n", target, index, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(ProgramEnvParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + DISPATCH(ProgramEnvParameter4fARB, (target, index, x, y, z, w), (F, "glProgramEnvParameter4fARB(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(ProgramParameter4fNV)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + DISPATCH(ProgramEnvParameter4fARB, (target, index, x, y, z, w), (F, "glProgramParameter4fNV(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(ProgramEnvParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params) +{ + DISPATCH(ProgramEnvParameter4fvARB, (target, index, params), (F, "glProgramEnvParameter4fvARB(0x%x, %d, %p);\n", target, index, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(ProgramParameter4fvNV)(GLenum target, GLuint index, const GLfloat * params) +{ + DISPATCH(ProgramEnvParameter4fvARB, (target, index, params), (F, "glProgramParameter4fvNV(0x%x, %d, %p);\n", target, index, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(ProgramLocalParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) +{ + DISPATCH(ProgramLocalParameter4dARB, (target, index, x, y, z, w), (F, "glProgramLocalParameter4dARB(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(ProgramLocalParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params) +{ + DISPATCH(ProgramLocalParameter4dvARB, (target, index, params), (F, "glProgramLocalParameter4dvARB(0x%x, %d, %p);\n", target, index, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(ProgramLocalParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + DISPATCH(ProgramLocalParameter4fARB, (target, index, x, y, z, w), (F, "glProgramLocalParameter4fARB(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(ProgramLocalParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params) +{ + DISPATCH(ProgramLocalParameter4fvARB, (target, index, params), (F, "glProgramLocalParameter4fvARB(0x%x, %d, %p);\n", target, index, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(ProgramStringARB)(GLenum target, GLenum format, GLsizei len, const GLvoid * string) +{ + DISPATCH(ProgramStringARB, (target, format, len, string), (F, "glProgramStringARB(0x%x, 0x%x, %d, %p);\n", target, format, len, (const void *) string)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1d)(GLuint index, GLdouble x) +{ + DISPATCH(VertexAttrib1dARB, (index, x), (F, "glVertexAttrib1d(%d, %f);\n", index, x)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1dARB)(GLuint index, GLdouble x) +{ + DISPATCH(VertexAttrib1dARB, (index, x), (F, "glVertexAttrib1dARB(%d, %f);\n", index, x)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1dv)(GLuint index, const GLdouble * v) +{ + DISPATCH(VertexAttrib1dvARB, (index, v), (F, "glVertexAttrib1dv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1dvARB)(GLuint index, const GLdouble * v) +{ + DISPATCH(VertexAttrib1dvARB, (index, v), (F, "glVertexAttrib1dvARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1f)(GLuint index, GLfloat x) +{ + DISPATCH(VertexAttrib1fARB, (index, x), (F, "glVertexAttrib1f(%d, %f);\n", index, x)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1fARB)(GLuint index, GLfloat x) +{ + DISPATCH(VertexAttrib1fARB, (index, x), (F, "glVertexAttrib1fARB(%d, %f);\n", index, x)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1fv)(GLuint index, const GLfloat * v) +{ + DISPATCH(VertexAttrib1fvARB, (index, v), (F, "glVertexAttrib1fv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1fvARB)(GLuint index, const GLfloat * v) +{ + DISPATCH(VertexAttrib1fvARB, (index, v), (F, "glVertexAttrib1fvARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1s)(GLuint index, GLshort x) +{ + DISPATCH(VertexAttrib1sARB, (index, x), (F, "glVertexAttrib1s(%d, %d);\n", index, x)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1sARB)(GLuint index, GLshort x) +{ + DISPATCH(VertexAttrib1sARB, (index, x), (F, "glVertexAttrib1sARB(%d, %d);\n", index, x)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1sv)(GLuint index, const GLshort * v) +{ + DISPATCH(VertexAttrib1svARB, (index, v), (F, "glVertexAttrib1sv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1svARB)(GLuint index, const GLshort * v) +{ + DISPATCH(VertexAttrib1svARB, (index, v), (F, "glVertexAttrib1svARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2d)(GLuint index, GLdouble x, GLdouble y) +{ + DISPATCH(VertexAttrib2dARB, (index, x, y), (F, "glVertexAttrib2d(%d, %f, %f);\n", index, x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2dARB)(GLuint index, GLdouble x, GLdouble y) +{ + DISPATCH(VertexAttrib2dARB, (index, x, y), (F, "glVertexAttrib2dARB(%d, %f, %f);\n", index, x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2dv)(GLuint index, const GLdouble * v) +{ + DISPATCH(VertexAttrib2dvARB, (index, v), (F, "glVertexAttrib2dv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2dvARB)(GLuint index, const GLdouble * v) +{ + DISPATCH(VertexAttrib2dvARB, (index, v), (F, "glVertexAttrib2dvARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2f)(GLuint index, GLfloat x, GLfloat y) +{ + DISPATCH(VertexAttrib2fARB, (index, x, y), (F, "glVertexAttrib2f(%d, %f, %f);\n", index, x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2fARB)(GLuint index, GLfloat x, GLfloat y) +{ + DISPATCH(VertexAttrib2fARB, (index, x, y), (F, "glVertexAttrib2fARB(%d, %f, %f);\n", index, x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2fv)(GLuint index, const GLfloat * v) +{ + DISPATCH(VertexAttrib2fvARB, (index, v), (F, "glVertexAttrib2fv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2fvARB)(GLuint index, const GLfloat * v) +{ + DISPATCH(VertexAttrib2fvARB, (index, v), (F, "glVertexAttrib2fvARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2s)(GLuint index, GLshort x, GLshort y) +{ + DISPATCH(VertexAttrib2sARB, (index, x, y), (F, "glVertexAttrib2s(%d, %d, %d);\n", index, x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2sARB)(GLuint index, GLshort x, GLshort y) +{ + DISPATCH(VertexAttrib2sARB, (index, x, y), (F, "glVertexAttrib2sARB(%d, %d, %d);\n", index, x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2sv)(GLuint index, const GLshort * v) +{ + DISPATCH(VertexAttrib2svARB, (index, v), (F, "glVertexAttrib2sv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2svARB)(GLuint index, const GLshort * v) +{ + DISPATCH(VertexAttrib2svARB, (index, v), (F, "glVertexAttrib2svARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3d)(GLuint index, GLdouble x, GLdouble y, GLdouble z) +{ + DISPATCH(VertexAttrib3dARB, (index, x, y, z), (F, "glVertexAttrib3d(%d, %f, %f, %f);\n", index, x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z) +{ + DISPATCH(VertexAttrib3dARB, (index, x, y, z), (F, "glVertexAttrib3dARB(%d, %f, %f, %f);\n", index, x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3dv)(GLuint index, const GLdouble * v) +{ + DISPATCH(VertexAttrib3dvARB, (index, v), (F, "glVertexAttrib3dv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3dvARB)(GLuint index, const GLdouble * v) +{ + DISPATCH(VertexAttrib3dvARB, (index, v), (F, "glVertexAttrib3dvARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3f)(GLuint index, GLfloat x, GLfloat y, GLfloat z) +{ + DISPATCH(VertexAttrib3fARB, (index, x, y, z), (F, "glVertexAttrib3f(%d, %f, %f, %f);\n", index, x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z) +{ + DISPATCH(VertexAttrib3fARB, (index, x, y, z), (F, "glVertexAttrib3fARB(%d, %f, %f, %f);\n", index, x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3fv)(GLuint index, const GLfloat * v) +{ + DISPATCH(VertexAttrib3fvARB, (index, v), (F, "glVertexAttrib3fv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3fvARB)(GLuint index, const GLfloat * v) +{ + DISPATCH(VertexAttrib3fvARB, (index, v), (F, "glVertexAttrib3fvARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3s)(GLuint index, GLshort x, GLshort y, GLshort z) +{ + DISPATCH(VertexAttrib3sARB, (index, x, y, z), (F, "glVertexAttrib3s(%d, %d, %d, %d);\n", index, x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3sARB)(GLuint index, GLshort x, GLshort y, GLshort z) +{ + DISPATCH(VertexAttrib3sARB, (index, x, y, z), (F, "glVertexAttrib3sARB(%d, %d, %d, %d);\n", index, x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3sv)(GLuint index, const GLshort * v) +{ + DISPATCH(VertexAttrib3svARB, (index, v), (F, "glVertexAttrib3sv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3svARB)(GLuint index, const GLshort * v) +{ + DISPATCH(VertexAttrib3svARB, (index, v), (F, "glVertexAttrib3svARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4Nbv)(GLuint index, const GLbyte * v) +{ + DISPATCH(VertexAttrib4NbvARB, (index, v), (F, "glVertexAttrib4Nbv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NbvARB)(GLuint index, const GLbyte * v) +{ + DISPATCH(VertexAttrib4NbvARB, (index, v), (F, "glVertexAttrib4NbvARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4Niv)(GLuint index, const GLint * v) +{ + DISPATCH(VertexAttrib4NivARB, (index, v), (F, "glVertexAttrib4Niv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NivARB)(GLuint index, const GLint * v) +{ + DISPATCH(VertexAttrib4NivARB, (index, v), (F, "glVertexAttrib4NivARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4Nsv)(GLuint index, const GLshort * v) +{ + DISPATCH(VertexAttrib4NsvARB, (index, v), (F, "glVertexAttrib4Nsv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NsvARB)(GLuint index, const GLshort * v) +{ + DISPATCH(VertexAttrib4NsvARB, (index, v), (F, "glVertexAttrib4NsvARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4Nub)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) +{ + DISPATCH(VertexAttrib4NubARB, (index, x, y, z, w), (F, "glVertexAttrib4Nub(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NubARB)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) +{ + DISPATCH(VertexAttrib4NubARB, (index, x, y, z, w), (F, "glVertexAttrib4NubARB(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4Nubv)(GLuint index, const GLubyte * v) +{ + DISPATCH(VertexAttrib4NubvARB, (index, v), (F, "glVertexAttrib4Nubv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NubvARB)(GLuint index, const GLubyte * v) +{ + DISPATCH(VertexAttrib4NubvARB, (index, v), (F, "glVertexAttrib4NubvARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4Nuiv)(GLuint index, const GLuint * v) +{ + DISPATCH(VertexAttrib4NuivARB, (index, v), (F, "glVertexAttrib4Nuiv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NuivARB)(GLuint index, const GLuint * v) +{ + DISPATCH(VertexAttrib4NuivARB, (index, v), (F, "glVertexAttrib4NuivARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4Nusv)(GLuint index, const GLushort * v) +{ + DISPATCH(VertexAttrib4NusvARB, (index, v), (F, "glVertexAttrib4Nusv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NusvARB)(GLuint index, const GLushort * v) +{ + DISPATCH(VertexAttrib4NusvARB, (index, v), (F, "glVertexAttrib4NusvARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4bv)(GLuint index, const GLbyte * v) +{ + DISPATCH(VertexAttrib4bvARB, (index, v), (F, "glVertexAttrib4bv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4bvARB)(GLuint index, const GLbyte * v) +{ + DISPATCH(VertexAttrib4bvARB, (index, v), (F, "glVertexAttrib4bvARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4d)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) +{ + DISPATCH(VertexAttrib4dARB, (index, x, y, z, w), (F, "glVertexAttrib4d(%d, %f, %f, %f, %f);\n", index, x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) +{ + DISPATCH(VertexAttrib4dARB, (index, x, y, z, w), (F, "glVertexAttrib4dARB(%d, %f, %f, %f, %f);\n", index, x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4dv)(GLuint index, const GLdouble * v) +{ + DISPATCH(VertexAttrib4dvARB, (index, v), (F, "glVertexAttrib4dv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4dvARB)(GLuint index, const GLdouble * v) +{ + DISPATCH(VertexAttrib4dvARB, (index, v), (F, "glVertexAttrib4dvARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4f)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + DISPATCH(VertexAttrib4fARB, (index, x, y, z, w), (F, "glVertexAttrib4f(%d, %f, %f, %f, %f);\n", index, x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + DISPATCH(VertexAttrib4fARB, (index, x, y, z, w), (F, "glVertexAttrib4fARB(%d, %f, %f, %f, %f);\n", index, x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fv)(GLuint index, const GLfloat * v) +{ + DISPATCH(VertexAttrib4fvARB, (index, v), (F, "glVertexAttrib4fv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fvARB)(GLuint index, const GLfloat * v) +{ + DISPATCH(VertexAttrib4fvARB, (index, v), (F, "glVertexAttrib4fvARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4iv)(GLuint index, const GLint * v) +{ + DISPATCH(VertexAttrib4ivARB, (index, v), (F, "glVertexAttrib4iv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ivARB)(GLuint index, const GLint * v) +{ + DISPATCH(VertexAttrib4ivARB, (index, v), (F, "glVertexAttrib4ivARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4s)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) +{ + DISPATCH(VertexAttrib4sARB, (index, x, y, z, w), (F, "glVertexAttrib4s(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4sARB)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) +{ + DISPATCH(VertexAttrib4sARB, (index, x, y, z, w), (F, "glVertexAttrib4sARB(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4sv)(GLuint index, const GLshort * v) +{ + DISPATCH(VertexAttrib4svARB, (index, v), (F, "glVertexAttrib4sv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4svARB)(GLuint index, const GLshort * v) +{ + DISPATCH(VertexAttrib4svARB, (index, v), (F, "glVertexAttrib4svARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ubv)(GLuint index, const GLubyte * v) +{ + DISPATCH(VertexAttrib4ubvARB, (index, v), (F, "glVertexAttrib4ubv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ubvARB)(GLuint index, const GLubyte * v) +{ + DISPATCH(VertexAttrib4ubvARB, (index, v), (F, "glVertexAttrib4ubvARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4uiv)(GLuint index, const GLuint * v) +{ + DISPATCH(VertexAttrib4uivARB, (index, v), (F, "glVertexAttrib4uiv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4uivARB)(GLuint index, const GLuint * v) +{ + DISPATCH(VertexAttrib4uivARB, (index, v), (F, "glVertexAttrib4uivARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4usv)(GLuint index, const GLushort * v) +{ + DISPATCH(VertexAttrib4usvARB, (index, v), (F, "glVertexAttrib4usv(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4usvARB)(GLuint index, const GLushort * v) +{ + DISPATCH(VertexAttrib4usvARB, (index, v), (F, "glVertexAttrib4usvARB(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttribPointer)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer) +{ + DISPATCH(VertexAttribPointerARB, (index, size, type, normalized, stride, pointer), (F, "glVertexAttribPointer(%d, %d, 0x%x, %d, %d, %p);\n", index, size, type, normalized, stride, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttribPointerARB)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer) +{ + DISPATCH(VertexAttribPointerARB, (index, size, type, normalized, stride, pointer), (F, "glVertexAttribPointerARB(%d, %d, 0x%x, %d, %d, %p);\n", index, size, type, normalized, stride, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(BindBuffer)(GLenum target, GLuint buffer) +{ + DISPATCH(BindBufferARB, (target, buffer), (F, "glBindBuffer(0x%x, %d);\n", target, buffer)); +} + +KEYWORD1 void KEYWORD2 NAME(BindBufferARB)(GLenum target, GLuint buffer) +{ + DISPATCH(BindBufferARB, (target, buffer), (F, "glBindBufferARB(0x%x, %d);\n", target, buffer)); +} + +KEYWORD1 void KEYWORD2 NAME(BufferData)(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage) +{ + DISPATCH(BufferDataARB, (target, size, data, usage), (F, "glBufferData(0x%x, %d, %p, 0x%x);\n", target, size, (const void *) data, usage)); +} + +KEYWORD1 void KEYWORD2 NAME(BufferDataARB)(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage) +{ + DISPATCH(BufferDataARB, (target, size, data, usage), (F, "glBufferDataARB(0x%x, %d, %p, 0x%x);\n", target, size, (const void *) data, usage)); +} + +KEYWORD1 void KEYWORD2 NAME(BufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data) +{ + DISPATCH(BufferSubDataARB, (target, offset, size, data), (F, "glBufferSubData(0x%x, %d, %d, %p);\n", target, offset, size, (const void *) data)); +} + +KEYWORD1 void KEYWORD2 NAME(BufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data) +{ + DISPATCH(BufferSubDataARB, (target, offset, size, data), (F, "glBufferSubDataARB(0x%x, %d, %d, %p);\n", target, offset, size, (const void *) data)); +} + +KEYWORD1 void KEYWORD2 NAME(DeleteBuffers)(GLsizei n, const GLuint * buffer) +{ + DISPATCH(DeleteBuffersARB, (n, buffer), (F, "glDeleteBuffers(%d, %p);\n", n, (const void *) buffer)); +} + +KEYWORD1 void KEYWORD2 NAME(DeleteBuffersARB)(GLsizei n, const GLuint * buffer) +{ + DISPATCH(DeleteBuffersARB, (n, buffer), (F, "glDeleteBuffersARB(%d, %p);\n", n, (const void *) buffer)); +} + +KEYWORD1 void KEYWORD2 NAME(GenBuffers)(GLsizei n, GLuint * buffer) +{ + DISPATCH(GenBuffersARB, (n, buffer), (F, "glGenBuffers(%d, %p);\n", n, (const void *) buffer)); +} + +KEYWORD1 void KEYWORD2 NAME(GenBuffersARB)(GLsizei n, GLuint * buffer) +{ + DISPATCH(GenBuffersARB, (n, buffer), (F, "glGenBuffersARB(%d, %p);\n", n, (const void *) buffer)); +} + +KEYWORD1 void KEYWORD2 NAME(GetBufferParameteriv)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetBufferParameterivARB, (target, pname, params), (F, "glGetBufferParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetBufferParameterivARB)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetBufferParameterivARB, (target, pname, params), (F, "glGetBufferParameterivARB(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetBufferPointerv)(GLenum target, GLenum pname, GLvoid ** params) +{ + DISPATCH(GetBufferPointervARB, (target, pname, params), (F, "glGetBufferPointerv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetBufferPointervARB)(GLenum target, GLenum pname, GLvoid ** params) +{ + DISPATCH(GetBufferPointervARB, (target, pname, params), (F, "glGetBufferPointervARB(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid * data) +{ + DISPATCH(GetBufferSubDataARB, (target, offset, size, data), (F, "glGetBufferSubData(0x%x, %d, %d, %p);\n", target, offset, size, (const void *) data)); +} + +KEYWORD1 void KEYWORD2 NAME(GetBufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid * data) +{ + DISPATCH(GetBufferSubDataARB, (target, offset, size, data), (F, "glGetBufferSubDataARB(0x%x, %d, %d, %p);\n", target, offset, size, (const void *) data)); +} + +KEYWORD1 GLboolean KEYWORD2 NAME(IsBuffer)(GLuint buffer) +{ + RETURN_DISPATCH(IsBufferARB, (buffer), (F, "glIsBuffer(%d);\n", buffer)); +} + +KEYWORD1 GLboolean KEYWORD2 NAME(IsBufferARB)(GLuint buffer) +{ + RETURN_DISPATCH(IsBufferARB, (buffer), (F, "glIsBufferARB(%d);\n", buffer)); +} + +KEYWORD1 GLvoid * KEYWORD2 NAME(MapBuffer)(GLenum target, GLenum access) +{ + RETURN_DISPATCH(MapBufferARB, (target, access), (F, "glMapBuffer(0x%x, 0x%x);\n", target, access)); +} + +KEYWORD1 GLvoid * KEYWORD2 NAME(MapBufferARB)(GLenum target, GLenum access) +{ + RETURN_DISPATCH(MapBufferARB, (target, access), (F, "glMapBufferARB(0x%x, 0x%x);\n", target, access)); +} + +KEYWORD1 GLboolean KEYWORD2 NAME(UnmapBuffer)(GLenum target) +{ + RETURN_DISPATCH(UnmapBufferARB, (target), (F, "glUnmapBuffer(0x%x);\n", target)); +} + +KEYWORD1 GLboolean KEYWORD2 NAME(UnmapBufferARB)(GLenum target) +{ + RETURN_DISPATCH(UnmapBufferARB, (target), (F, "glUnmapBufferARB(0x%x);\n", target)); +} + +KEYWORD1 void KEYWORD2 NAME(BeginQuery)(GLenum target, GLuint id) +{ + DISPATCH(BeginQueryARB, (target, id), (F, "glBeginQuery(0x%x, %d);\n", target, id)); +} + +KEYWORD1 void KEYWORD2 NAME(BeginQueryARB)(GLenum target, GLuint id) +{ + DISPATCH(BeginQueryARB, (target, id), (F, "glBeginQueryARB(0x%x, %d);\n", target, id)); +} + +KEYWORD1 void KEYWORD2 NAME(DeleteQueries)(GLsizei n, const GLuint * ids) +{ + DISPATCH(DeleteQueriesARB, (n, ids), (F, "glDeleteQueries(%d, %p);\n", n, (const void *) ids)); +} + +KEYWORD1 void KEYWORD2 NAME(DeleteQueriesARB)(GLsizei n, const GLuint * ids) +{ + DISPATCH(DeleteQueriesARB, (n, ids), (F, "glDeleteQueriesARB(%d, %p);\n", n, (const void *) ids)); +} + +KEYWORD1 void KEYWORD2 NAME(EndQuery)(GLenum target) +{ + DISPATCH(EndQueryARB, (target), (F, "glEndQuery(0x%x);\n", target)); +} + +KEYWORD1 void KEYWORD2 NAME(EndQueryARB)(GLenum target) +{ + DISPATCH(EndQueryARB, (target), (F, "glEndQueryARB(0x%x);\n", target)); +} + +KEYWORD1 void KEYWORD2 NAME(GenQueries)(GLsizei n, GLuint * ids) +{ + DISPATCH(GenQueriesARB, (n, ids), (F, "glGenQueries(%d, %p);\n", n, (const void *) ids)); +} + +KEYWORD1 void KEYWORD2 NAME(GenQueriesARB)(GLsizei n, GLuint * ids) +{ + DISPATCH(GenQueriesARB, (n, ids), (F, "glGenQueriesARB(%d, %p);\n", n, (const void *) ids)); +} + +KEYWORD1 void KEYWORD2 NAME(GetQueryObjectiv)(GLuint id, GLenum pname, GLint * params) +{ + DISPATCH(GetQueryObjectivARB, (id, pname, params), (F, "glGetQueryObjectiv(%d, 0x%x, %p);\n", id, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetQueryObjectivARB)(GLuint id, GLenum pname, GLint * params) +{ + DISPATCH(GetQueryObjectivARB, (id, pname, params), (F, "glGetQueryObjectivARB(%d, 0x%x, %p);\n", id, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetQueryObjectuiv)(GLuint id, GLenum pname, GLuint * params) +{ + DISPATCH(GetQueryObjectuivARB, (id, pname, params), (F, "glGetQueryObjectuiv(%d, 0x%x, %p);\n", id, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetQueryObjectuivARB)(GLuint id, GLenum pname, GLuint * params) +{ + DISPATCH(GetQueryObjectuivARB, (id, pname, params), (F, "glGetQueryObjectuivARB(%d, 0x%x, %p);\n", id, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetQueryiv)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetQueryivARB, (target, pname, params), (F, "glGetQueryiv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetQueryivARB)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetQueryivARB, (target, pname, params), (F, "glGetQueryivARB(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1 GLboolean KEYWORD2 NAME(IsQuery)(GLuint id) +{ + RETURN_DISPATCH(IsQueryARB, (id), (F, "glIsQuery(%d);\n", id)); +} + +KEYWORD1 GLboolean KEYWORD2 NAME(IsQueryARB)(GLuint id) +{ + RETURN_DISPATCH(IsQueryARB, (id), (F, "glIsQueryARB(%d);\n", id)); +} + +KEYWORD1 void KEYWORD2 NAME(AttachObjectARB)(GLhandleARB containerObj, GLhandleARB obj) +{ + DISPATCH(AttachObjectARB, (containerObj, obj), (F, "glAttachObjectARB(%d, %d);\n", containerObj, obj)); +} + +KEYWORD1 void KEYWORD2 NAME(CompileShader)(GLuint shader) +{ + DISPATCH(CompileShaderARB, (shader), (F, "glCompileShader(%d);\n", shader)); +} + +KEYWORD1 void KEYWORD2 NAME(CompileShaderARB)(GLhandleARB shader) +{ + DISPATCH(CompileShaderARB, (shader), (F, "glCompileShaderARB(%d);\n", shader)); +} + +KEYWORD1 GLhandleARB KEYWORD2 NAME(CreateProgramObjectARB)(void) +{ + RETURN_DISPATCH(CreateProgramObjectARB, (), (F, "glCreateProgramObjectARB();\n")); +} + +KEYWORD1 GLhandleARB KEYWORD2 NAME(CreateShaderObjectARB)(GLenum shaderType) +{ + RETURN_DISPATCH(CreateShaderObjectARB, (shaderType), (F, "glCreateShaderObjectARB(0x%x);\n", shaderType)); +} + +KEYWORD1 void KEYWORD2 NAME(DeleteObjectARB)(GLhandleARB obj) +{ + DISPATCH(DeleteObjectARB, (obj), (F, "glDeleteObjectARB(%d);\n", obj)); +} + +KEYWORD1 void KEYWORD2 NAME(DetachObjectARB)(GLhandleARB containerObj, GLhandleARB attachedObj) +{ + DISPATCH(DetachObjectARB, (containerObj, attachedObj), (F, "glDetachObjectARB(%d, %d);\n", containerObj, attachedObj)); +} + +KEYWORD1 void KEYWORD2 NAME(GetActiveUniform)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name) +{ + DISPATCH(GetActiveUniformARB, (program, index, bufSize, length, size, type, name), (F, "glGetActiveUniform(%d, %d, %d, %p, %p, %p, %p);\n", program, index, bufSize, (const void *) length, (const void *) size, (const void *) type, (const void *) name)); +} + +KEYWORD1 void KEYWORD2 NAME(GetActiveUniformARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name) +{ + DISPATCH(GetActiveUniformARB, (program, index, bufSize, length, size, type, name), (F, "glGetActiveUniformARB(%d, %d, %d, %p, %p, %p, %p);\n", program, index, bufSize, (const void *) length, (const void *) size, (const void *) type, (const void *) name)); +} + +KEYWORD1 void KEYWORD2 NAME(GetAttachedObjectsARB)(GLhandleARB containerObj, GLsizei maxLength, GLsizei * length, GLhandleARB * infoLog) +{ + DISPATCH(GetAttachedObjectsARB, (containerObj, maxLength, length, infoLog), (F, "glGetAttachedObjectsARB(%d, %d, %p, %p);\n", containerObj, maxLength, (const void *) length, (const void *) infoLog)); +} + +KEYWORD1 GLhandleARB KEYWORD2 NAME(GetHandleARB)(GLenum pname) +{ + RETURN_DISPATCH(GetHandleARB, (pname), (F, "glGetHandleARB(0x%x);\n", pname)); +} + +KEYWORD1 void KEYWORD2 NAME(GetInfoLogARB)(GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog) +{ + DISPATCH(GetInfoLogARB, (obj, maxLength, length, infoLog), (F, "glGetInfoLogARB(%d, %d, %p, %p);\n", obj, maxLength, (const void *) length, (const void *) infoLog)); +} + +KEYWORD1 void KEYWORD2 NAME(GetObjectParameterfvARB)(GLhandleARB obj, GLenum pname, GLfloat * params) +{ + DISPATCH(GetObjectParameterfvARB, (obj, pname, params), (F, "glGetObjectParameterfvARB(%d, 0x%x, %p);\n", obj, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetObjectParameterivARB)(GLhandleARB obj, GLenum pname, GLint * params) +{ + DISPATCH(GetObjectParameterivARB, (obj, pname, params), (F, "glGetObjectParameterivARB(%d, 0x%x, %p);\n", obj, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetShaderSource)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * source) +{ + DISPATCH(GetShaderSourceARB, (shader, bufSize, length, source), (F, "glGetShaderSource(%d, %d, %p, %p);\n", shader, bufSize, (const void *) length, (const void *) source)); +} + +KEYWORD1 void KEYWORD2 NAME(GetShaderSourceARB)(GLhandleARB shader, GLsizei bufSize, GLsizei * length, GLcharARB * source) +{ + DISPATCH(GetShaderSourceARB, (shader, bufSize, length, source), (F, "glGetShaderSourceARB(%d, %d, %p, %p);\n", shader, bufSize, (const void *) length, (const void *) source)); +} + +KEYWORD1 GLint KEYWORD2 NAME(GetUniformLocation)(GLuint program, const GLchar * name) +{ + RETURN_DISPATCH(GetUniformLocationARB, (program, name), (F, "glGetUniformLocation(%d, %p);\n", program, (const void *) name)); +} + +KEYWORD1 GLint KEYWORD2 NAME(GetUniformLocationARB)(GLhandleARB program, const GLcharARB * name) +{ + RETURN_DISPATCH(GetUniformLocationARB, (program, name), (F, "glGetUniformLocationARB(%d, %p);\n", program, (const void *) name)); +} + +KEYWORD1 void KEYWORD2 NAME(GetUniformfv)(GLuint program, GLint location, GLfloat * params) +{ + DISPATCH(GetUniformfvARB, (program, location, params), (F, "glGetUniformfv(%d, %d, %p);\n", program, location, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetUniformfvARB)(GLhandleARB program, GLint location, GLfloat * params) +{ + DISPATCH(GetUniformfvARB, (program, location, params), (F, "glGetUniformfvARB(%d, %d, %p);\n", program, location, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetUniformiv)(GLuint program, GLint location, GLint * params) +{ + DISPATCH(GetUniformivARB, (program, location, params), (F, "glGetUniformiv(%d, %d, %p);\n", program, location, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetUniformivARB)(GLhandleARB program, GLint location, GLint * params) +{ + DISPATCH(GetUniformivARB, (program, location, params), (F, "glGetUniformivARB(%d, %d, %p);\n", program, location, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(LinkProgram)(GLuint program) +{ + DISPATCH(LinkProgramARB, (program), (F, "glLinkProgram(%d);\n", program)); +} + +KEYWORD1 void KEYWORD2 NAME(LinkProgramARB)(GLhandleARB program) +{ + DISPATCH(LinkProgramARB, (program), (F, "glLinkProgramARB(%d);\n", program)); +} + +KEYWORD1 void KEYWORD2 NAME(ShaderSource)(GLuint shader, GLsizei count, const GLchar ** string, const GLint * length) +{ + DISPATCH(ShaderSourceARB, (shader, count, string, length), (F, "glShaderSource(%d, %d, %p, %p);\n", shader, count, (const void *) string, (const void *) length)); +} + +KEYWORD1 void KEYWORD2 NAME(ShaderSourceARB)(GLhandleARB shader, GLsizei count, const GLcharARB ** string, const GLint * length) +{ + DISPATCH(ShaderSourceARB, (shader, count, string, length), (F, "glShaderSourceARB(%d, %d, %p, %p);\n", shader, count, (const void *) string, (const void *) length)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform1f)(GLint location, GLfloat v0) +{ + DISPATCH(Uniform1fARB, (location, v0), (F, "glUniform1f(%d, %f);\n", location, v0)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform1fARB)(GLint location, GLfloat v0) +{ + DISPATCH(Uniform1fARB, (location, v0), (F, "glUniform1fARB(%d, %f);\n", location, v0)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform1fv)(GLint location, GLsizei count, const GLfloat * value) +{ + DISPATCH(Uniform1fvARB, (location, count, value), (F, "glUniform1fv(%d, %d, %p);\n", location, count, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform1fvARB)(GLint location, GLsizei count, const GLfloat * value) +{ + DISPATCH(Uniform1fvARB, (location, count, value), (F, "glUniform1fvARB(%d, %d, %p);\n", location, count, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform1i)(GLint location, GLint v0) +{ + DISPATCH(Uniform1iARB, (location, v0), (F, "glUniform1i(%d, %d);\n", location, v0)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform1iARB)(GLint location, GLint v0) +{ + DISPATCH(Uniform1iARB, (location, v0), (F, "glUniform1iARB(%d, %d);\n", location, v0)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform1iv)(GLint location, GLsizei count, const GLint * value) +{ + DISPATCH(Uniform1ivARB, (location, count, value), (F, "glUniform1iv(%d, %d, %p);\n", location, count, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform1ivARB)(GLint location, GLsizei count, const GLint * value) +{ + DISPATCH(Uniform1ivARB, (location, count, value), (F, "glUniform1ivARB(%d, %d, %p);\n", location, count, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform2f)(GLint location, GLfloat v0, GLfloat v1) +{ + DISPATCH(Uniform2fARB, (location, v0, v1), (F, "glUniform2f(%d, %f, %f);\n", location, v0, v1)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform2fARB)(GLint location, GLfloat v0, GLfloat v1) +{ + DISPATCH(Uniform2fARB, (location, v0, v1), (F, "glUniform2fARB(%d, %f, %f);\n", location, v0, v1)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform2fv)(GLint location, GLsizei count, const GLfloat * value) +{ + DISPATCH(Uniform2fvARB, (location, count, value), (F, "glUniform2fv(%d, %d, %p);\n", location, count, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform2fvARB)(GLint location, GLsizei count, const GLfloat * value) +{ + DISPATCH(Uniform2fvARB, (location, count, value), (F, "glUniform2fvARB(%d, %d, %p);\n", location, count, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform2i)(GLint location, GLint v0, GLint v1) +{ + DISPATCH(Uniform2iARB, (location, v0, v1), (F, "glUniform2i(%d, %d, %d);\n", location, v0, v1)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform2iARB)(GLint location, GLint v0, GLint v1) +{ + DISPATCH(Uniform2iARB, (location, v0, v1), (F, "glUniform2iARB(%d, %d, %d);\n", location, v0, v1)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform2iv)(GLint location, GLsizei count, const GLint * value) +{ + DISPATCH(Uniform2ivARB, (location, count, value), (F, "glUniform2iv(%d, %d, %p);\n", location, count, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform2ivARB)(GLint location, GLsizei count, const GLint * value) +{ + DISPATCH(Uniform2ivARB, (location, count, value), (F, "glUniform2ivARB(%d, %d, %p);\n", location, count, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform3f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) +{ + DISPATCH(Uniform3fARB, (location, v0, v1, v2), (F, "glUniform3f(%d, %f, %f, %f);\n", location, v0, v1, v2)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform3fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) +{ + DISPATCH(Uniform3fARB, (location, v0, v1, v2), (F, "glUniform3fARB(%d, %f, %f, %f);\n", location, v0, v1, v2)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform3fv)(GLint location, GLsizei count, const GLfloat * value) +{ + DISPATCH(Uniform3fvARB, (location, count, value), (F, "glUniform3fv(%d, %d, %p);\n", location, count, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform3fvARB)(GLint location, GLsizei count, const GLfloat * value) +{ + DISPATCH(Uniform3fvARB, (location, count, value), (F, "glUniform3fvARB(%d, %d, %p);\n", location, count, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform3i)(GLint location, GLint v0, GLint v1, GLint v2) +{ + DISPATCH(Uniform3iARB, (location, v0, v1, v2), (F, "glUniform3i(%d, %d, %d, %d);\n", location, v0, v1, v2)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform3iARB)(GLint location, GLint v0, GLint v1, GLint v2) +{ + DISPATCH(Uniform3iARB, (location, v0, v1, v2), (F, "glUniform3iARB(%d, %d, %d, %d);\n", location, v0, v1, v2)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform3iv)(GLint location, GLsizei count, const GLint * value) +{ + DISPATCH(Uniform3ivARB, (location, count, value), (F, "glUniform3iv(%d, %d, %p);\n", location, count, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform3ivARB)(GLint location, GLsizei count, const GLint * value) +{ + DISPATCH(Uniform3ivARB, (location, count, value), (F, "glUniform3ivARB(%d, %d, %p);\n", location, count, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform4f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) +{ + DISPATCH(Uniform4fARB, (location, v0, v1, v2, v3), (F, "glUniform4f(%d, %f, %f, %f, %f);\n", location, v0, v1, v2, v3)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform4fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) +{ + DISPATCH(Uniform4fARB, (location, v0, v1, v2, v3), (F, "glUniform4fARB(%d, %f, %f, %f, %f);\n", location, v0, v1, v2, v3)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform4fv)(GLint location, GLsizei count, const GLfloat * value) +{ + DISPATCH(Uniform4fvARB, (location, count, value), (F, "glUniform4fv(%d, %d, %p);\n", location, count, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform4fvARB)(GLint location, GLsizei count, const GLfloat * value) +{ + DISPATCH(Uniform4fvARB, (location, count, value), (F, "glUniform4fvARB(%d, %d, %p);\n", location, count, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform4i)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) +{ + DISPATCH(Uniform4iARB, (location, v0, v1, v2, v3), (F, "glUniform4i(%d, %d, %d, %d, %d);\n", location, v0, v1, v2, v3)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform4iARB)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) +{ + DISPATCH(Uniform4iARB, (location, v0, v1, v2, v3), (F, "glUniform4iARB(%d, %d, %d, %d, %d);\n", location, v0, v1, v2, v3)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform4iv)(GLint location, GLsizei count, const GLint * value) +{ + DISPATCH(Uniform4ivARB, (location, count, value), (F, "glUniform4iv(%d, %d, %p);\n", location, count, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(Uniform4ivARB)(GLint location, GLsizei count, const GLint * value) +{ + DISPATCH(Uniform4ivARB, (location, count, value), (F, "glUniform4ivARB(%d, %d, %p);\n", location, count, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(UniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) +{ + DISPATCH(UniformMatrix2fvARB, (location, count, transpose, value), (F, "glUniformMatrix2fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(UniformMatrix2fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) +{ + DISPATCH(UniformMatrix2fvARB, (location, count, transpose, value), (F, "glUniformMatrix2fvARB(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(UniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) +{ + DISPATCH(UniformMatrix3fvARB, (location, count, transpose, value), (F, "glUniformMatrix3fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(UniformMatrix3fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) +{ + DISPATCH(UniformMatrix3fvARB, (location, count, transpose, value), (F, "glUniformMatrix3fvARB(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(UniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) +{ + DISPATCH(UniformMatrix4fvARB, (location, count, transpose, value), (F, "glUniformMatrix4fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(UniformMatrix4fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) +{ + DISPATCH(UniformMatrix4fvARB, (location, count, transpose, value), (F, "glUniformMatrix4fvARB(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(UseProgram)(GLuint program) +{ + DISPATCH(UseProgramObjectARB, (program), (F, "glUseProgram(%d);\n", program)); +} + +KEYWORD1 void KEYWORD2 NAME(UseProgramObjectARB)(GLhandleARB program) +{ + DISPATCH(UseProgramObjectARB, (program), (F, "glUseProgramObjectARB(%d);\n", program)); +} + +KEYWORD1 void KEYWORD2 NAME(ValidateProgram)(GLuint program) +{ + DISPATCH(ValidateProgramARB, (program), (F, "glValidateProgram(%d);\n", program)); +} + +KEYWORD1 void KEYWORD2 NAME(ValidateProgramARB)(GLhandleARB program) +{ + DISPATCH(ValidateProgramARB, (program), (F, "glValidateProgramARB(%d);\n", program)); +} + +KEYWORD1 void KEYWORD2 NAME(BindAttribLocation)(GLuint program, GLuint index, const GLchar * name) +{ + DISPATCH(BindAttribLocationARB, (program, index, name), (F, "glBindAttribLocation(%d, %d, %p);\n", program, index, (const void *) name)); +} + +KEYWORD1 void KEYWORD2 NAME(BindAttribLocationARB)(GLhandleARB program, GLuint index, const GLcharARB * name) +{ + DISPATCH(BindAttribLocationARB, (program, index, name), (F, "glBindAttribLocationARB(%d, %d, %p);\n", program, index, (const void *) name)); +} + +KEYWORD1 void KEYWORD2 NAME(GetActiveAttrib)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name) +{ + DISPATCH(GetActiveAttribARB, (program, index, bufSize, length, size, type, name), (F, "glGetActiveAttrib(%d, %d, %d, %p, %p, %p, %p);\n", program, index, bufSize, (const void *) length, (const void *) size, (const void *) type, (const void *) name)); +} + +KEYWORD1 void KEYWORD2 NAME(GetActiveAttribARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name) +{ + DISPATCH(GetActiveAttribARB, (program, index, bufSize, length, size, type, name), (F, "glGetActiveAttribARB(%d, %d, %d, %p, %p, %p, %p);\n", program, index, bufSize, (const void *) length, (const void *) size, (const void *) type, (const void *) name)); +} + +KEYWORD1 GLint KEYWORD2 NAME(GetAttribLocation)(GLuint program, const GLchar * name) +{ + RETURN_DISPATCH(GetAttribLocationARB, (program, name), (F, "glGetAttribLocation(%d, %p);\n", program, (const void *) name)); +} + +KEYWORD1 GLint KEYWORD2 NAME(GetAttribLocationARB)(GLhandleARB program, const GLcharARB * name) +{ + RETURN_DISPATCH(GetAttribLocationARB, (program, name), (F, "glGetAttribLocationARB(%d, %p);\n", program, (const void *) name)); +} + +KEYWORD1 void KEYWORD2 NAME(DrawBuffers)(GLsizei n, const GLenum * bufs) +{ + DISPATCH(DrawBuffersARB, (n, bufs), (F, "glDrawBuffers(%d, %p);\n", n, (const void *) bufs)); +} + +KEYWORD1 void KEYWORD2 NAME(DrawBuffersARB)(GLsizei n, const GLenum * bufs) +{ + DISPATCH(DrawBuffersARB, (n, bufs), (F, "glDrawBuffersARB(%d, %p);\n", n, (const void *) bufs)); +} + +KEYWORD1 void KEYWORD2 NAME(DrawBuffersATI)(GLsizei n, const GLenum * bufs) +{ + DISPATCH(DrawBuffersARB, (n, bufs), (F, "glDrawBuffersATI(%d, %p);\n", n, (const void *) bufs)); +} + +KEYWORD1 void KEYWORD2 NAME(PolygonOffsetEXT)(GLfloat factor, GLfloat bias) +{ + DISPATCH(PolygonOffsetEXT, (factor, bias), (F, "glPolygonOffsetEXT(%f, %f);\n", factor, bias)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_562)(GLenum pname, GLfloat * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_562)(GLenum pname, GLfloat * params) +{ + DISPATCH(GetPixelTexGenParameterfvSGIS, (pname, params), (F, "glGetPixelTexGenParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_563)(GLenum pname, GLint * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_563)(GLenum pname, GLint * params) +{ + DISPATCH(GetPixelTexGenParameterivSGIS, (pname, params), (F, "glGetPixelTexGenParameterivSGIS(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_564)(GLenum pname, GLfloat param); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_564)(GLenum pname, GLfloat param) +{ + DISPATCH(PixelTexGenParameterfSGIS, (pname, param), (F, "glPixelTexGenParameterfSGIS(0x%x, %f);\n", pname, param)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_565)(GLenum pname, const GLfloat * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_565)(GLenum pname, const GLfloat * params) +{ + DISPATCH(PixelTexGenParameterfvSGIS, (pname, params), (F, "glPixelTexGenParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_566)(GLenum pname, GLint param); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_566)(GLenum pname, GLint param) +{ + DISPATCH(PixelTexGenParameteriSGIS, (pname, param), (F, "glPixelTexGenParameteriSGIS(0x%x, %d);\n", pname, param)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_567)(GLenum pname, const GLint * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_567)(GLenum pname, const GLint * params) +{ + DISPATCH(PixelTexGenParameterivSGIS, (pname, params), (F, "glPixelTexGenParameterivSGIS(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_568)(GLclampf value, GLboolean invert); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_568)(GLclampf value, GLboolean invert) +{ + DISPATCH(SampleMaskSGIS, (value, invert), (F, "glSampleMaskSGIS(%f, %d);\n", value, invert)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_569)(GLenum pattern); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_569)(GLenum pattern) +{ + DISPATCH(SamplePatternSGIS, (pattern), (F, "glSamplePatternSGIS(0x%x);\n", pattern)); +} + +KEYWORD1 void KEYWORD2 NAME(ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer) +{ + DISPATCH(ColorPointerEXT, (size, type, stride, count, pointer), (F, "glColorPointerEXT(%d, 0x%x, %d, %d, %p);\n", size, type, stride, count, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean * pointer) +{ + DISPATCH(EdgeFlagPointerEXT, (stride, count, pointer), (F, "glEdgeFlagPointerEXT(%d, %d, %p);\n", stride, count, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer) +{ + DISPATCH(IndexPointerEXT, (type, stride, count, pointer), (F, "glIndexPointerEXT(0x%x, %d, %d, %p);\n", type, stride, count, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer) +{ + DISPATCH(NormalPointerEXT, (type, stride, count, pointer), (F, "glNormalPointerEXT(0x%x, %d, %d, %p);\n", type, stride, count, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer) +{ + DISPATCH(TexCoordPointerEXT, (size, type, stride, count, pointer), (F, "glTexCoordPointerEXT(%d, 0x%x, %d, %d, %p);\n", size, type, stride, count, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer) +{ + DISPATCH(VertexPointerEXT, (size, type, stride, count, pointer), (F, "glVertexPointerEXT(%d, 0x%x, %d, %d, %p);\n", size, type, stride, count, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(PointParameterf)(GLenum pname, GLfloat param) +{ + DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterf(0x%x, %f);\n", pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(PointParameterfARB)(GLenum pname, GLfloat param) +{ + DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfARB(0x%x, %f);\n", pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(PointParameterfEXT)(GLenum pname, GLfloat param) +{ + DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfEXT(0x%x, %f);\n", pname, param)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_576)(GLenum pname, GLfloat param); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_576)(GLenum pname, GLfloat param) +{ + DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfSGIS(0x%x, %f);\n", pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(PointParameterfv)(GLenum pname, const GLfloat * params) +{ + DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfv(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(PointParameterfvARB)(GLenum pname, const GLfloat * params) +{ + DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvARB(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(PointParameterfvEXT)(GLenum pname, const GLfloat * params) +{ + DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvEXT(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_577)(GLenum pname, const GLfloat * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_577)(GLenum pname, const GLfloat * params) +{ + DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(LockArraysEXT)(GLint first, GLsizei count) +{ + DISPATCH(LockArraysEXT, (first, count), (F, "glLockArraysEXT(%d, %d);\n", first, count)); +} + +KEYWORD1 void KEYWORD2 NAME(UnlockArraysEXT)(void) +{ + DISPATCH(UnlockArraysEXT, (), (F, "glUnlockArraysEXT();\n")); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_580)(GLenum pname, GLdouble * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_580)(GLenum pname, GLdouble * params) +{ + DISPATCH(CullParameterdvEXT, (pname, params), (F, "glCullParameterdvEXT(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_581)(GLenum pname, GLfloat * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_581)(GLenum pname, GLfloat * params) +{ + DISPATCH(CullParameterfvEXT, (pname, params), (F, "glCullParameterfvEXT(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3b)(GLbyte red, GLbyte green, GLbyte blue) +{ + DISPATCH(SecondaryColor3bEXT, (red, green, blue), (F, "glSecondaryColor3b(%d, %d, %d);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue) +{ + DISPATCH(SecondaryColor3bEXT, (red, green, blue), (F, "glSecondaryColor3bEXT(%d, %d, %d);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3bv)(const GLbyte * v) +{ + DISPATCH(SecondaryColor3bvEXT, (v), (F, "glSecondaryColor3bv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3bvEXT)(const GLbyte * v) +{ + DISPATCH(SecondaryColor3bvEXT, (v), (F, "glSecondaryColor3bvEXT(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3d)(GLdouble red, GLdouble green, GLdouble blue) +{ + DISPATCH(SecondaryColor3dEXT, (red, green, blue), (F, "glSecondaryColor3d(%f, %f, %f);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue) +{ + DISPATCH(SecondaryColor3dEXT, (red, green, blue), (F, "glSecondaryColor3dEXT(%f, %f, %f);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3dv)(const GLdouble * v) +{ + DISPATCH(SecondaryColor3dvEXT, (v), (F, "glSecondaryColor3dv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3dvEXT)(const GLdouble * v) +{ + DISPATCH(SecondaryColor3dvEXT, (v), (F, "glSecondaryColor3dvEXT(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3f)(GLfloat red, GLfloat green, GLfloat blue) +{ + DISPATCH(SecondaryColor3fEXT, (red, green, blue), (F, "glSecondaryColor3f(%f, %f, %f);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue) +{ + DISPATCH(SecondaryColor3fEXT, (red, green, blue), (F, "glSecondaryColor3fEXT(%f, %f, %f);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3fv)(const GLfloat * v) +{ + DISPATCH(SecondaryColor3fvEXT, (v), (F, "glSecondaryColor3fv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3fvEXT)(const GLfloat * v) +{ + DISPATCH(SecondaryColor3fvEXT, (v), (F, "glSecondaryColor3fvEXT(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3i)(GLint red, GLint green, GLint blue) +{ + DISPATCH(SecondaryColor3iEXT, (red, green, blue), (F, "glSecondaryColor3i(%d, %d, %d);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3iEXT)(GLint red, GLint green, GLint blue) +{ + DISPATCH(SecondaryColor3iEXT, (red, green, blue), (F, "glSecondaryColor3iEXT(%d, %d, %d);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3iv)(const GLint * v) +{ + DISPATCH(SecondaryColor3ivEXT, (v), (F, "glSecondaryColor3iv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ivEXT)(const GLint * v) +{ + DISPATCH(SecondaryColor3ivEXT, (v), (F, "glSecondaryColor3ivEXT(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3s)(GLshort red, GLshort green, GLshort blue) +{ + DISPATCH(SecondaryColor3sEXT, (red, green, blue), (F, "glSecondaryColor3s(%d, %d, %d);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue) +{ + DISPATCH(SecondaryColor3sEXT, (red, green, blue), (F, "glSecondaryColor3sEXT(%d, %d, %d);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3sv)(const GLshort * v) +{ + DISPATCH(SecondaryColor3svEXT, (v), (F, "glSecondaryColor3sv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3svEXT)(const GLshort * v) +{ + DISPATCH(SecondaryColor3svEXT, (v), (F, "glSecondaryColor3svEXT(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ub)(GLubyte red, GLubyte green, GLubyte blue) +{ + DISPATCH(SecondaryColor3ubEXT, (red, green, blue), (F, "glSecondaryColor3ub(%d, %d, %d);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue) +{ + DISPATCH(SecondaryColor3ubEXT, (red, green, blue), (F, "glSecondaryColor3ubEXT(%d, %d, %d);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ubv)(const GLubyte * v) +{ + DISPATCH(SecondaryColor3ubvEXT, (v), (F, "glSecondaryColor3ubv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ubvEXT)(const GLubyte * v) +{ + DISPATCH(SecondaryColor3ubvEXT, (v), (F, "glSecondaryColor3ubvEXT(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ui)(GLuint red, GLuint green, GLuint blue) +{ + DISPATCH(SecondaryColor3uiEXT, (red, green, blue), (F, "glSecondaryColor3ui(%d, %d, %d);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue) +{ + DISPATCH(SecondaryColor3uiEXT, (red, green, blue), (F, "glSecondaryColor3uiEXT(%d, %d, %d);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3uiv)(const GLuint * v) +{ + DISPATCH(SecondaryColor3uivEXT, (v), (F, "glSecondaryColor3uiv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3uivEXT)(const GLuint * v) +{ + DISPATCH(SecondaryColor3uivEXT, (v), (F, "glSecondaryColor3uivEXT(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3us)(GLushort red, GLushort green, GLushort blue) +{ + DISPATCH(SecondaryColor3usEXT, (red, green, blue), (F, "glSecondaryColor3us(%d, %d, %d);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue) +{ + DISPATCH(SecondaryColor3usEXT, (red, green, blue), (F, "glSecondaryColor3usEXT(%d, %d, %d);\n", red, green, blue)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3usv)(const GLushort * v) +{ + DISPATCH(SecondaryColor3usvEXT, (v), (F, "glSecondaryColor3usv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColor3usvEXT)(const GLushort * v) +{ + DISPATCH(SecondaryColor3usvEXT, (v), (F, "glSecondaryColor3usvEXT(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) +{ + DISPATCH(SecondaryColorPointerEXT, (size, type, stride, pointer), (F, "glSecondaryColorPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) +{ + DISPATCH(SecondaryColorPointerEXT, (size, type, stride, pointer), (F, "glSecondaryColorPointerEXT(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiDrawArrays)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount) +{ + DISPATCH(MultiDrawArraysEXT, (mode, first, count, primcount), (F, "glMultiDrawArrays(0x%x, %p, %p, %d);\n", mode, (const void *) first, (const void *) count, primcount)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiDrawArraysEXT)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount) +{ + DISPATCH(MultiDrawArraysEXT, (mode, first, count, primcount), (F, "glMultiDrawArraysEXT(0x%x, %p, %p, %d);\n", mode, (const void *) first, (const void *) count, primcount)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiDrawElements)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount) +{ + DISPATCH(MultiDrawElementsEXT, (mode, count, type, indices, primcount), (F, "glMultiDrawElements(0x%x, %p, 0x%x, %p, %d);\n", mode, (const void *) count, type, (const void *) indices, primcount)); +} + +KEYWORD1 void KEYWORD2 NAME(MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount) +{ + DISPATCH(MultiDrawElementsEXT, (mode, count, type, indices, primcount), (F, "glMultiDrawElementsEXT(0x%x, %p, 0x%x, %p, %d);\n", mode, (const void *) count, type, (const void *) indices, primcount)); +} + +KEYWORD1 void KEYWORD2 NAME(FogCoordPointer)(GLenum type, GLsizei stride, const GLvoid * pointer) +{ + DISPATCH(FogCoordPointerEXT, (type, stride, pointer), (F, "glFogCoordPointer(0x%x, %d, %p);\n", type, stride, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid * pointer) +{ + DISPATCH(FogCoordPointerEXT, (type, stride, pointer), (F, "glFogCoordPointerEXT(0x%x, %d, %p);\n", type, stride, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(FogCoordd)(GLdouble coord) +{ + DISPATCH(FogCoorddEXT, (coord), (F, "glFogCoordd(%f);\n", coord)); +} + +KEYWORD1 void KEYWORD2 NAME(FogCoorddEXT)(GLdouble coord) +{ + DISPATCH(FogCoorddEXT, (coord), (F, "glFogCoorddEXT(%f);\n", coord)); +} + +KEYWORD1 void KEYWORD2 NAME(FogCoorddv)(const GLdouble * coord) +{ + DISPATCH(FogCoorddvEXT, (coord), (F, "glFogCoorddv(%p);\n", (const void *) coord)); +} + +KEYWORD1 void KEYWORD2 NAME(FogCoorddvEXT)(const GLdouble * coord) +{ + DISPATCH(FogCoorddvEXT, (coord), (F, "glFogCoorddvEXT(%p);\n", (const void *) coord)); +} + +KEYWORD1 void KEYWORD2 NAME(FogCoordf)(GLfloat coord) +{ + DISPATCH(FogCoordfEXT, (coord), (F, "glFogCoordf(%f);\n", coord)); +} + +KEYWORD1 void KEYWORD2 NAME(FogCoordfEXT)(GLfloat coord) +{ + DISPATCH(FogCoordfEXT, (coord), (F, "glFogCoordfEXT(%f);\n", coord)); +} + +KEYWORD1 void KEYWORD2 NAME(FogCoordfv)(const GLfloat * coord) +{ + DISPATCH(FogCoordfvEXT, (coord), (F, "glFogCoordfv(%p);\n", (const void *) coord)); +} + +KEYWORD1 void KEYWORD2 NAME(FogCoordfvEXT)(const GLfloat * coord) +{ + DISPATCH(FogCoordfvEXT, (coord), (F, "glFogCoordfvEXT(%p);\n", (const void *) coord)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_606)(GLenum mode); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_606)(GLenum mode) +{ + DISPATCH(PixelTexGenSGIX, (mode), (F, "glPixelTexGenSGIX(0x%x);\n", mode)); +} + +KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparate)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) +{ + DISPATCH(BlendFuncSeparateEXT, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparate(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha)); +} + +KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) +{ + DISPATCH(BlendFuncSeparateEXT, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparateEXT(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_607)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_607)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) +{ + DISPATCH(BlendFuncSeparateEXT, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparateINGR(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha)); +} + +KEYWORD1 void KEYWORD2 NAME(FlushVertexArrayRangeNV)(void) +{ + DISPATCH(FlushVertexArrayRangeNV, (), (F, "glFlushVertexArrayRangeNV();\n")); +} + +KEYWORD1 void KEYWORD2 NAME(VertexArrayRangeNV)(GLsizei length, const GLvoid * pointer) +{ + DISPATCH(VertexArrayRangeNV, (length, pointer), (F, "glVertexArrayRangeNV(%d, %p);\n", length, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage) +{ + DISPATCH(CombinerInputNV, (stage, portion, variable, input, mapping, componentUsage), (F, "glCombinerInputNV(0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x);\n", stage, portion, variable, input, mapping, componentUsage)); +} + +KEYWORD1 void KEYWORD2 NAME(CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum) +{ + DISPATCH(CombinerOutputNV, (stage, portion, abOutput, cdOutput, sumOutput, scale, bias, abDotProduct, cdDotProduct, muxSum), (F, "glCombinerOutputNV(0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, %d, %d, %d);\n", stage, portion, abOutput, cdOutput, sumOutput, scale, bias, abDotProduct, cdDotProduct, muxSum)); +} + +KEYWORD1 void KEYWORD2 NAME(CombinerParameterfNV)(GLenum pname, GLfloat param) +{ + DISPATCH(CombinerParameterfNV, (pname, param), (F, "glCombinerParameterfNV(0x%x, %f);\n", pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(CombinerParameterfvNV)(GLenum pname, const GLfloat * params) +{ + DISPATCH(CombinerParameterfvNV, (pname, params), (F, "glCombinerParameterfvNV(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(CombinerParameteriNV)(GLenum pname, GLint param) +{ + DISPATCH(CombinerParameteriNV, (pname, param), (F, "glCombinerParameteriNV(0x%x, %d);\n", pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(CombinerParameterivNV)(GLenum pname, const GLint * params) +{ + DISPATCH(CombinerParameterivNV, (pname, params), (F, "glCombinerParameterivNV(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage) +{ + DISPATCH(FinalCombinerInputNV, (variable, input, mapping, componentUsage), (F, "glFinalCombinerInputNV(0x%x, 0x%x, 0x%x, 0x%x);\n", variable, input, mapping, componentUsage)); +} + +KEYWORD1 void KEYWORD2 NAME(GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params) +{ + DISPATCH(GetCombinerInputParameterfvNV, (stage, portion, variable, pname, params), (F, "glGetCombinerInputParameterfvNV(0x%x, 0x%x, 0x%x, 0x%x, %p);\n", stage, portion, variable, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params) +{ + DISPATCH(GetCombinerInputParameterivNV, (stage, portion, variable, pname, params), (F, "glGetCombinerInputParameterivNV(0x%x, 0x%x, 0x%x, 0x%x, %p);\n", stage, portion, variable, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat * params) +{ + DISPATCH(GetCombinerOutputParameterfvNV, (stage, portion, pname, params), (F, "glGetCombinerOutputParameterfvNV(0x%x, 0x%x, 0x%x, %p);\n", stage, portion, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint * params) +{ + DISPATCH(GetCombinerOutputParameterivNV, (stage, portion, pname, params), (F, "glGetCombinerOutputParameterivNV(0x%x, 0x%x, 0x%x, %p);\n", stage, portion, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat * params) +{ + DISPATCH(GetFinalCombinerInputParameterfvNV, (variable, pname, params), (F, "glGetFinalCombinerInputParameterfvNV(0x%x, 0x%x, %p);\n", variable, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint * params) +{ + DISPATCH(GetFinalCombinerInputParameterivNV, (variable, pname, params), (F, "glGetFinalCombinerInputParameterivNV(0x%x, 0x%x, %p);\n", variable, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(ResizeBuffersMESA)(void) +{ + DISPATCH(ResizeBuffersMESA, (), (F, "glResizeBuffersMESA();\n")); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2d)(GLdouble x, GLdouble y) +{ + DISPATCH(WindowPos2dMESA, (x, y), (F, "glWindowPos2d(%f, %f);\n", x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2dARB)(GLdouble x, GLdouble y) +{ + DISPATCH(WindowPos2dMESA, (x, y), (F, "glWindowPos2dARB(%f, %f);\n", x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2dMESA)(GLdouble x, GLdouble y) +{ + DISPATCH(WindowPos2dMESA, (x, y), (F, "glWindowPos2dMESA(%f, %f);\n", x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2dv)(const GLdouble * v) +{ + DISPATCH(WindowPos2dvMESA, (v), (F, "glWindowPos2dv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2dvARB)(const GLdouble * v) +{ + DISPATCH(WindowPos2dvMESA, (v), (F, "glWindowPos2dvARB(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2dvMESA)(const GLdouble * v) +{ + DISPATCH(WindowPos2dvMESA, (v), (F, "glWindowPos2dvMESA(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2f)(GLfloat x, GLfloat y) +{ + DISPATCH(WindowPos2fMESA, (x, y), (F, "glWindowPos2f(%f, %f);\n", x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2fARB)(GLfloat x, GLfloat y) +{ + DISPATCH(WindowPos2fMESA, (x, y), (F, "glWindowPos2fARB(%f, %f);\n", x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2fMESA)(GLfloat x, GLfloat y) +{ + DISPATCH(WindowPos2fMESA, (x, y), (F, "glWindowPos2fMESA(%f, %f);\n", x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2fv)(const GLfloat * v) +{ + DISPATCH(WindowPos2fvMESA, (v), (F, "glWindowPos2fv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2fvARB)(const GLfloat * v) +{ + DISPATCH(WindowPos2fvMESA, (v), (F, "glWindowPos2fvARB(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2fvMESA)(const GLfloat * v) +{ + DISPATCH(WindowPos2fvMESA, (v), (F, "glWindowPos2fvMESA(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2i)(GLint x, GLint y) +{ + DISPATCH(WindowPos2iMESA, (x, y), (F, "glWindowPos2i(%d, %d);\n", x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2iARB)(GLint x, GLint y) +{ + DISPATCH(WindowPos2iMESA, (x, y), (F, "glWindowPos2iARB(%d, %d);\n", x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2iMESA)(GLint x, GLint y) +{ + DISPATCH(WindowPos2iMESA, (x, y), (F, "glWindowPos2iMESA(%d, %d);\n", x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2iv)(const GLint * v) +{ + DISPATCH(WindowPos2ivMESA, (v), (F, "glWindowPos2iv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2ivARB)(const GLint * v) +{ + DISPATCH(WindowPos2ivMESA, (v), (F, "glWindowPos2ivARB(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2ivMESA)(const GLint * v) +{ + DISPATCH(WindowPos2ivMESA, (v), (F, "glWindowPos2ivMESA(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2s)(GLshort x, GLshort y) +{ + DISPATCH(WindowPos2sMESA, (x, y), (F, "glWindowPos2s(%d, %d);\n", x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2sARB)(GLshort x, GLshort y) +{ + DISPATCH(WindowPos2sMESA, (x, y), (F, "glWindowPos2sARB(%d, %d);\n", x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2sMESA)(GLshort x, GLshort y) +{ + DISPATCH(WindowPos2sMESA, (x, y), (F, "glWindowPos2sMESA(%d, %d);\n", x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2sv)(const GLshort * v) +{ + DISPATCH(WindowPos2svMESA, (v), (F, "glWindowPos2sv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2svARB)(const GLshort * v) +{ + DISPATCH(WindowPos2svMESA, (v), (F, "glWindowPos2svARB(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos2svMESA)(const GLshort * v) +{ + DISPATCH(WindowPos2svMESA, (v), (F, "glWindowPos2svMESA(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3d)(GLdouble x, GLdouble y, GLdouble z) +{ + DISPATCH(WindowPos3dMESA, (x, y, z), (F, "glWindowPos3d(%f, %f, %f);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3dARB)(GLdouble x, GLdouble y, GLdouble z) +{ + DISPATCH(WindowPos3dMESA, (x, y, z), (F, "glWindowPos3dARB(%f, %f, %f);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z) +{ + DISPATCH(WindowPos3dMESA, (x, y, z), (F, "glWindowPos3dMESA(%f, %f, %f);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3dv)(const GLdouble * v) +{ + DISPATCH(WindowPos3dvMESA, (v), (F, "glWindowPos3dv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3dvARB)(const GLdouble * v) +{ + DISPATCH(WindowPos3dvMESA, (v), (F, "glWindowPos3dvARB(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3dvMESA)(const GLdouble * v) +{ + DISPATCH(WindowPos3dvMESA, (v), (F, "glWindowPos3dvMESA(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3f)(GLfloat x, GLfloat y, GLfloat z) +{ + DISPATCH(WindowPos3fMESA, (x, y, z), (F, "glWindowPos3f(%f, %f, %f);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3fARB)(GLfloat x, GLfloat y, GLfloat z) +{ + DISPATCH(WindowPos3fMESA, (x, y, z), (F, "glWindowPos3fARB(%f, %f, %f);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z) +{ + DISPATCH(WindowPos3fMESA, (x, y, z), (F, "glWindowPos3fMESA(%f, %f, %f);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3fv)(const GLfloat * v) +{ + DISPATCH(WindowPos3fvMESA, (v), (F, "glWindowPos3fv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3fvARB)(const GLfloat * v) +{ + DISPATCH(WindowPos3fvMESA, (v), (F, "glWindowPos3fvARB(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3fvMESA)(const GLfloat * v) +{ + DISPATCH(WindowPos3fvMESA, (v), (F, "glWindowPos3fvMESA(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3i)(GLint x, GLint y, GLint z) +{ + DISPATCH(WindowPos3iMESA, (x, y, z), (F, "glWindowPos3i(%d, %d, %d);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3iARB)(GLint x, GLint y, GLint z) +{ + DISPATCH(WindowPos3iMESA, (x, y, z), (F, "glWindowPos3iARB(%d, %d, %d);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3iMESA)(GLint x, GLint y, GLint z) +{ + DISPATCH(WindowPos3iMESA, (x, y, z), (F, "glWindowPos3iMESA(%d, %d, %d);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3iv)(const GLint * v) +{ + DISPATCH(WindowPos3ivMESA, (v), (F, "glWindowPos3iv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3ivARB)(const GLint * v) +{ + DISPATCH(WindowPos3ivMESA, (v), (F, "glWindowPos3ivARB(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3ivMESA)(const GLint * v) +{ + DISPATCH(WindowPos3ivMESA, (v), (F, "glWindowPos3ivMESA(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3s)(GLshort x, GLshort y, GLshort z) +{ + DISPATCH(WindowPos3sMESA, (x, y, z), (F, "glWindowPos3s(%d, %d, %d);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3sARB)(GLshort x, GLshort y, GLshort z) +{ + DISPATCH(WindowPos3sMESA, (x, y, z), (F, "glWindowPos3sARB(%d, %d, %d);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3sMESA)(GLshort x, GLshort y, GLshort z) +{ + DISPATCH(WindowPos3sMESA, (x, y, z), (F, "glWindowPos3sMESA(%d, %d, %d);\n", x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3sv)(const GLshort * v) +{ + DISPATCH(WindowPos3svMESA, (v), (F, "glWindowPos3sv(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3svARB)(const GLshort * v) +{ + DISPATCH(WindowPos3svMESA, (v), (F, "glWindowPos3svARB(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos3svMESA)(const GLshort * v) +{ + DISPATCH(WindowPos3svMESA, (v), (F, "glWindowPos3svMESA(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w) +{ + DISPATCH(WindowPos4dMESA, (x, y, z, w), (F, "glWindowPos4dMESA(%f, %f, %f, %f);\n", x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos4dvMESA)(const GLdouble * v) +{ + DISPATCH(WindowPos4dvMESA, (v), (F, "glWindowPos4dvMESA(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + DISPATCH(WindowPos4fMESA, (x, y, z, w), (F, "glWindowPos4fMESA(%f, %f, %f, %f);\n", x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos4fvMESA)(const GLfloat * v) +{ + DISPATCH(WindowPos4fvMESA, (v), (F, "glWindowPos4fvMESA(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w) +{ + DISPATCH(WindowPos4iMESA, (x, y, z, w), (F, "glWindowPos4iMESA(%d, %d, %d, %d);\n", x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos4ivMESA)(const GLint * v) +{ + DISPATCH(WindowPos4ivMESA, (v), (F, "glWindowPos4ivMESA(%p);\n", (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w) +{ + DISPATCH(WindowPos4sMESA, (x, y, z, w), (F, "glWindowPos4sMESA(%d, %d, %d, %d);\n", x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(WindowPos4svMESA)(const GLshort * v) +{ + DISPATCH(WindowPos4svMESA, (v), (F, "glWindowPos4svMESA(%p);\n", (const void *) v)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_648)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_648)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride) +{ + DISPATCH(MultiModeDrawArraysIBM, (mode, first, count, primcount, modestride), (F, "glMultiModeDrawArraysIBM(%p, %p, %p, %d, %d);\n", (const void *) mode, (const void *) first, (const void *) count, primcount, modestride)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_649)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_649)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride) +{ + DISPATCH(MultiModeDrawElementsIBM, (mode, count, type, indices, primcount, modestride), (F, "glMultiModeDrawElementsIBM(%p, %p, 0x%x, %p, %d, %d);\n", (const void *) mode, (const void *) count, type, (const void *) indices, primcount, modestride)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_650)(GLsizei n, const GLuint * fences); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_650)(GLsizei n, const GLuint * fences) +{ + DISPATCH(DeleteFencesNV, (n, fences), (F, "glDeleteFencesNV(%d, %p);\n", n, (const void *) fences)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_651)(GLuint fence); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_651)(GLuint fence) +{ + DISPATCH(FinishFenceNV, (fence), (F, "glFinishFenceNV(%d);\n", fence)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_652)(GLsizei n, GLuint * fences); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_652)(GLsizei n, GLuint * fences) +{ + DISPATCH(GenFencesNV, (n, fences), (F, "glGenFencesNV(%d, %p);\n", n, (const void *) fences)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_653)(GLuint fence, GLenum pname, GLint * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_653)(GLuint fence, GLenum pname, GLint * params) +{ + DISPATCH(GetFenceivNV, (fence, pname, params), (F, "glGetFenceivNV(%d, 0x%x, %p);\n", fence, pname, (const void *) params)); +} + +KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_654)(GLuint fence); + +KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_654)(GLuint fence) +{ + RETURN_DISPATCH(IsFenceNV, (fence), (F, "glIsFenceNV(%d);\n", fence)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_655)(GLuint fence, GLenum condition); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_655)(GLuint fence, GLenum condition) +{ + DISPATCH(SetFenceNV, (fence, condition), (F, "glSetFenceNV(%d, 0x%x);\n", fence, condition)); +} + +KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_656)(GLuint fence); + +KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_656)(GLuint fence) +{ + RETURN_DISPATCH(TestFenceNV, (fence), (F, "glTestFenceNV(%d);\n", fence)); +} + +KEYWORD1 GLboolean KEYWORD2 NAME(AreProgramsResidentNV)(GLsizei n, const GLuint * ids, GLboolean * residences) +{ + RETURN_DISPATCH(AreProgramsResidentNV, (n, ids, residences), (F, "glAreProgramsResidentNV(%d, %p, %p);\n", n, (const void *) ids, (const void *) residences)); +} + +KEYWORD1 void KEYWORD2 NAME(BindProgramARB)(GLenum target, GLuint program) +{ + DISPATCH(BindProgramNV, (target, program), (F, "glBindProgramARB(0x%x, %d);\n", target, program)); +} + +KEYWORD1 void KEYWORD2 NAME(BindProgramNV)(GLenum target, GLuint program) +{ + DISPATCH(BindProgramNV, (target, program), (F, "glBindProgramNV(0x%x, %d);\n", target, program)); +} + +KEYWORD1 void KEYWORD2 NAME(DeleteProgramsARB)(GLsizei n, const GLuint * programs) +{ + DISPATCH(DeleteProgramsNV, (n, programs), (F, "glDeleteProgramsARB(%d, %p);\n", n, (const void *) programs)); +} + +KEYWORD1 void KEYWORD2 NAME(DeleteProgramsNV)(GLsizei n, const GLuint * programs) +{ + DISPATCH(DeleteProgramsNV, (n, programs), (F, "glDeleteProgramsNV(%d, %p);\n", n, (const void *) programs)); +} + +KEYWORD1 void KEYWORD2 NAME(ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat * params) +{ + DISPATCH(ExecuteProgramNV, (target, id, params), (F, "glExecuteProgramNV(0x%x, %d, %p);\n", target, id, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GenProgramsARB)(GLsizei n, GLuint * programs) +{ + DISPATCH(GenProgramsNV, (n, programs), (F, "glGenProgramsARB(%d, %p);\n", n, (const void *) programs)); +} + +KEYWORD1 void KEYWORD2 NAME(GenProgramsNV)(GLsizei n, GLuint * programs) +{ + DISPATCH(GenProgramsNV, (n, programs), (F, "glGenProgramsNV(%d, %p);\n", n, (const void *) programs)); +} + +KEYWORD1 void KEYWORD2 NAME(GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble * params) +{ + DISPATCH(GetProgramParameterdvNV, (target, index, pname, params), (F, "glGetProgramParameterdvNV(0x%x, %d, 0x%x, %p);\n", target, index, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat * params) +{ + DISPATCH(GetProgramParameterfvNV, (target, index, pname, params), (F, "glGetProgramParameterfvNV(0x%x, %d, 0x%x, %p);\n", target, index, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetProgramStringNV)(GLuint id, GLenum pname, GLubyte * program) +{ + DISPATCH(GetProgramStringNV, (id, pname, program), (F, "glGetProgramStringNV(%d, 0x%x, %p);\n", id, pname, (const void *) program)); +} + +KEYWORD1 void KEYWORD2 NAME(GetProgramivNV)(GLuint id, GLenum pname, GLint * params) +{ + DISPATCH(GetProgramivNV, (id, pname, params), (F, "glGetProgramivNV(%d, 0x%x, %p);\n", id, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint * params) +{ + DISPATCH(GetTrackMatrixivNV, (target, address, pname, params), (F, "glGetTrackMatrixivNV(0x%x, %d, 0x%x, %p);\n", target, address, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid ** pointer) +{ + DISPATCH(GetVertexAttribPointervNV, (index, pname, pointer), (F, "glGetVertexAttribPointerv(%d, 0x%x, %p);\n", index, pname, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(GetVertexAttribPointervARB)(GLuint index, GLenum pname, GLvoid ** pointer) +{ + DISPATCH(GetVertexAttribPointervNV, (index, pname, pointer), (F, "glGetVertexAttribPointervARB(%d, 0x%x, %p);\n", index, pname, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** pointer) +{ + DISPATCH(GetVertexAttribPointervNV, (index, pname, pointer), (F, "glGetVertexAttribPointervNV(%d, 0x%x, %p);\n", index, pname, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params) +{ + DISPATCH(GetVertexAttribdvNV, (index, pname, params), (F, "glGetVertexAttribdvNV(%d, 0x%x, %p);\n", index, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat * params) +{ + DISPATCH(GetVertexAttribfvNV, (index, pname, params), (F, "glGetVertexAttribfvNV(%d, 0x%x, %p);\n", index, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetVertexAttribivNV)(GLuint index, GLenum pname, GLint * params) +{ + DISPATCH(GetVertexAttribivNV, (index, pname, params), (F, "glGetVertexAttribivNV(%d, 0x%x, %p);\n", index, pname, (const void *) params)); +} + +KEYWORD1 GLboolean KEYWORD2 NAME(IsProgramARB)(GLuint program) +{ + RETURN_DISPATCH(IsProgramNV, (program), (F, "glIsProgramARB(%d);\n", program)); +} + +KEYWORD1 GLboolean KEYWORD2 NAME(IsProgramNV)(GLuint program) +{ + RETURN_DISPATCH(IsProgramNV, (program), (F, "glIsProgramNV(%d);\n", program)); +} + +KEYWORD1 void KEYWORD2 NAME(LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte * program) +{ + DISPATCH(LoadProgramNV, (target, id, len, program), (F, "glLoadProgramNV(0x%x, %d, %d, %p);\n", target, id, len, (const void *) program)); +} + +KEYWORD1 void KEYWORD2 NAME(ProgramParameters4dvNV)(GLenum target, GLuint index, GLuint num, const GLdouble * params) +{ + DISPATCH(ProgramParameters4dvNV, (target, index, num, params), (F, "glProgramParameters4dvNV(0x%x, %d, %d, %p);\n", target, index, num, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(ProgramParameters4fvNV)(GLenum target, GLuint index, GLuint num, const GLfloat * params) +{ + DISPATCH(ProgramParameters4fvNV, (target, index, num, params), (F, "glProgramParameters4fvNV(0x%x, %d, %d, %p);\n", target, index, num, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(RequestResidentProgramsNV)(GLsizei n, const GLuint * ids) +{ + DISPATCH(RequestResidentProgramsNV, (n, ids), (F, "glRequestResidentProgramsNV(%d, %p);\n", n, (const void *) ids)); +} + +KEYWORD1 void KEYWORD2 NAME(TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform) +{ + DISPATCH(TrackMatrixNV, (target, address, matrix, transform), (F, "glTrackMatrixNV(0x%x, %d, 0x%x, 0x%x);\n", target, address, matrix, transform)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1dNV)(GLuint index, GLdouble x) +{ + DISPATCH(VertexAttrib1dNV, (index, x), (F, "glVertexAttrib1dNV(%d, %f);\n", index, x)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1dvNV)(GLuint index, const GLdouble * v) +{ + DISPATCH(VertexAttrib1dvNV, (index, v), (F, "glVertexAttrib1dvNV(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1fNV)(GLuint index, GLfloat x) +{ + DISPATCH(VertexAttrib1fNV, (index, x), (F, "glVertexAttrib1fNV(%d, %f);\n", index, x)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1fvNV)(GLuint index, const GLfloat * v) +{ + DISPATCH(VertexAttrib1fvNV, (index, v), (F, "glVertexAttrib1fvNV(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1sNV)(GLuint index, GLshort x) +{ + DISPATCH(VertexAttrib1sNV, (index, x), (F, "glVertexAttrib1sNV(%d, %d);\n", index, x)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib1svNV)(GLuint index, const GLshort * v) +{ + DISPATCH(VertexAttrib1svNV, (index, v), (F, "glVertexAttrib1svNV(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y) +{ + DISPATCH(VertexAttrib2dNV, (index, x, y), (F, "glVertexAttrib2dNV(%d, %f, %f);\n", index, x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2dvNV)(GLuint index, const GLdouble * v) +{ + DISPATCH(VertexAttrib2dvNV, (index, v), (F, "glVertexAttrib2dvNV(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y) +{ + DISPATCH(VertexAttrib2fNV, (index, x, y), (F, "glVertexAttrib2fNV(%d, %f, %f);\n", index, x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2fvNV)(GLuint index, const GLfloat * v) +{ + DISPATCH(VertexAttrib2fvNV, (index, v), (F, "glVertexAttrib2fvNV(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y) +{ + DISPATCH(VertexAttrib2sNV, (index, x, y), (F, "glVertexAttrib2sNV(%d, %d, %d);\n", index, x, y)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib2svNV)(GLuint index, const GLshort * v) +{ + DISPATCH(VertexAttrib2svNV, (index, v), (F, "glVertexAttrib2svNV(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z) +{ + DISPATCH(VertexAttrib3dNV, (index, x, y, z), (F, "glVertexAttrib3dNV(%d, %f, %f, %f);\n", index, x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3dvNV)(GLuint index, const GLdouble * v) +{ + DISPATCH(VertexAttrib3dvNV, (index, v), (F, "glVertexAttrib3dvNV(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z) +{ + DISPATCH(VertexAttrib3fNV, (index, x, y, z), (F, "glVertexAttrib3fNV(%d, %f, %f, %f);\n", index, x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3fvNV)(GLuint index, const GLfloat * v) +{ + DISPATCH(VertexAttrib3fvNV, (index, v), (F, "glVertexAttrib3fvNV(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z) +{ + DISPATCH(VertexAttrib3sNV, (index, x, y, z), (F, "glVertexAttrib3sNV(%d, %d, %d, %d);\n", index, x, y, z)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib3svNV)(GLuint index, const GLshort * v) +{ + DISPATCH(VertexAttrib3svNV, (index, v), (F, "glVertexAttrib3svNV(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) +{ + DISPATCH(VertexAttrib4dNV, (index, x, y, z, w), (F, "glVertexAttrib4dNV(%d, %f, %f, %f, %f);\n", index, x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4dvNV)(GLuint index, const GLdouble * v) +{ + DISPATCH(VertexAttrib4dvNV, (index, v), (F, "glVertexAttrib4dvNV(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + DISPATCH(VertexAttrib4fNV, (index, x, y, z, w), (F, "glVertexAttrib4fNV(%d, %f, %f, %f, %f);\n", index, x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fvNV)(GLuint index, const GLfloat * v) +{ + DISPATCH(VertexAttrib4fvNV, (index, v), (F, "glVertexAttrib4fvNV(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) +{ + DISPATCH(VertexAttrib4sNV, (index, x, y, z, w), (F, "glVertexAttrib4sNV(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4svNV)(GLuint index, const GLshort * v) +{ + DISPATCH(VertexAttrib4svNV, (index, v), (F, "glVertexAttrib4svNV(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) +{ + DISPATCH(VertexAttrib4ubNV, (index, x, y, z, w), (F, "glVertexAttrib4ubNV(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ubvNV)(GLuint index, const GLubyte * v) +{ + DISPATCH(VertexAttrib4ubvNV, (index, v), (F, "glVertexAttrib4ubvNV(%d, %p);\n", index, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) +{ + DISPATCH(VertexAttribPointerNV, (index, size, type, stride, pointer), (F, "glVertexAttribPointerNV(%d, %d, 0x%x, %d, %p);\n", index, size, type, stride, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble * v) +{ + DISPATCH(VertexAttribs1dvNV, (index, n, v), (F, "glVertexAttribs1dvNV(%d, %d, %p);\n", index, n, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat * v) +{ + DISPATCH(VertexAttribs1fvNV, (index, n, v), (F, "glVertexAttribs1fvNV(%d, %d, %p);\n", index, n, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort * v) +{ + DISPATCH(VertexAttribs1svNV, (index, n, v), (F, "glVertexAttribs1svNV(%d, %d, %p);\n", index, n, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble * v) +{ + DISPATCH(VertexAttribs2dvNV, (index, n, v), (F, "glVertexAttribs2dvNV(%d, %d, %p);\n", index, n, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat * v) +{ + DISPATCH(VertexAttribs2fvNV, (index, n, v), (F, "glVertexAttribs2fvNV(%d, %d, %p);\n", index, n, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort * v) +{ + DISPATCH(VertexAttribs2svNV, (index, n, v), (F, "glVertexAttribs2svNV(%d, %d, %p);\n", index, n, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble * v) +{ + DISPATCH(VertexAttribs3dvNV, (index, n, v), (F, "glVertexAttribs3dvNV(%d, %d, %p);\n", index, n, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat * v) +{ + DISPATCH(VertexAttribs3fvNV, (index, n, v), (F, "glVertexAttribs3fvNV(%d, %d, %p);\n", index, n, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort * v) +{ + DISPATCH(VertexAttribs3svNV, (index, n, v), (F, "glVertexAttribs3svNV(%d, %d, %p);\n", index, n, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble * v) +{ + DISPATCH(VertexAttribs4dvNV, (index, n, v), (F, "glVertexAttribs4dvNV(%d, %d, %p);\n", index, n, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat * v) +{ + DISPATCH(VertexAttribs4fvNV, (index, n, v), (F, "glVertexAttribs4fvNV(%d, %d, %p);\n", index, n, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort * v) +{ + DISPATCH(VertexAttribs4svNV, (index, n, v), (F, "glVertexAttribs4svNV(%d, %d, %p);\n", index, n, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte * v) +{ + DISPATCH(VertexAttribs4ubvNV, (index, n, v), (F, "glVertexAttribs4ubvNV(%d, %d, %p);\n", index, n, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(AlphaFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod) +{ + DISPATCH(AlphaFragmentOp1ATI, (op, dst, dstMod, arg1, arg1Rep, arg1Mod), (F, "glAlphaFragmentOp1ATI(0x%x, %d, %d, %d, %d, %d);\n", op, dst, dstMod, arg1, arg1Rep, arg1Mod)); +} + +KEYWORD1 void KEYWORD2 NAME(AlphaFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod) +{ + DISPATCH(AlphaFragmentOp2ATI, (op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod), (F, "glAlphaFragmentOp2ATI(0x%x, %d, %d, %d, %d, %d, %d, %d, %d);\n", op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod)); +} + +KEYWORD1 void KEYWORD2 NAME(AlphaFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod) +{ + DISPATCH(AlphaFragmentOp3ATI, (op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod), (F, "glAlphaFragmentOp3ATI(0x%x, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d);\n", op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod)); +} + +KEYWORD1 void KEYWORD2 NAME(BeginFragmentShaderATI)(void) +{ + DISPATCH(BeginFragmentShaderATI, (), (F, "glBeginFragmentShaderATI();\n")); +} + +KEYWORD1 void KEYWORD2 NAME(BindFragmentShaderATI)(GLuint id) +{ + DISPATCH(BindFragmentShaderATI, (id), (F, "glBindFragmentShaderATI(%d);\n", id)); +} + +KEYWORD1 void KEYWORD2 NAME(ColorFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod) +{ + DISPATCH(ColorFragmentOp1ATI, (op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod), (F, "glColorFragmentOp1ATI(0x%x, %d, %d, %d, %d, %d, %d);\n", op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod)); +} + +KEYWORD1 void KEYWORD2 NAME(ColorFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod) +{ + DISPATCH(ColorFragmentOp2ATI, (op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod), (F, "glColorFragmentOp2ATI(0x%x, %d, %d, %d, %d, %d, %d, %d, %d, %d);\n", op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod)); +} + +KEYWORD1 void KEYWORD2 NAME(ColorFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod) +{ + DISPATCH(ColorFragmentOp3ATI, (op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod), (F, "glColorFragmentOp3ATI(0x%x, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d);\n", op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod)); +} + +KEYWORD1 void KEYWORD2 NAME(DeleteFragmentShaderATI)(GLuint id) +{ + DISPATCH(DeleteFragmentShaderATI, (id), (F, "glDeleteFragmentShaderATI(%d);\n", id)); +} + +KEYWORD1 void KEYWORD2 NAME(EndFragmentShaderATI)(void) +{ + DISPATCH(EndFragmentShaderATI, (), (F, "glEndFragmentShaderATI();\n")); +} + +KEYWORD1 GLuint KEYWORD2 NAME(GenFragmentShadersATI)(GLuint range) +{ + RETURN_DISPATCH(GenFragmentShadersATI, (range), (F, "glGenFragmentShadersATI(%d);\n", range)); +} + +KEYWORD1 void KEYWORD2 NAME(PassTexCoordATI)(GLuint dst, GLuint coord, GLenum swizzle) +{ + DISPATCH(PassTexCoordATI, (dst, coord, swizzle), (F, "glPassTexCoordATI(%d, %d, 0x%x);\n", dst, coord, swizzle)); +} + +KEYWORD1 void KEYWORD2 NAME(SampleMapATI)(GLuint dst, GLuint interp, GLenum swizzle) +{ + DISPATCH(SampleMapATI, (dst, interp, swizzle), (F, "glSampleMapATI(%d, %d, 0x%x);\n", dst, interp, swizzle)); +} + +KEYWORD1 void KEYWORD2 NAME(SetFragmentShaderConstantATI)(GLuint dst, const GLfloat * value) +{ + DISPATCH(SetFragmentShaderConstantATI, (dst, value), (F, "glSetFragmentShaderConstantATI(%d, %p);\n", dst, (const void *) value)); +} + +KEYWORD1 void KEYWORD2 NAME(PointParameteri)(GLenum pname, GLint param) +{ + DISPATCH(PointParameteriNV, (pname, param), (F, "glPointParameteri(0x%x, %d);\n", pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(PointParameteriNV)(GLenum pname, GLint param) +{ + DISPATCH(PointParameteriNV, (pname, param), (F, "glPointParameteriNV(0x%x, %d);\n", pname, param)); +} + +KEYWORD1 void KEYWORD2 NAME(PointParameteriv)(GLenum pname, const GLint * params) +{ + DISPATCH(PointParameterivNV, (pname, params), (F, "glPointParameteriv(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(PointParameterivNV)(GLenum pname, const GLint * params) +{ + DISPATCH(PointParameterivNV, (pname, params), (F, "glPointParameterivNV(0x%x, %p);\n", pname, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_733)(GLenum face); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_733)(GLenum face) +{ + DISPATCH(ActiveStencilFaceEXT, (face), (F, "glActiveStencilFaceEXT(0x%x);\n", face)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_734)(GLuint array); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_734)(GLuint array) +{ + DISPATCH(BindVertexArrayAPPLE, (array), (F, "glBindVertexArrayAPPLE(%d);\n", array)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_735)(GLsizei n, const GLuint * arrays); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_735)(GLsizei n, const GLuint * arrays) +{ + DISPATCH(DeleteVertexArraysAPPLE, (n, arrays), (F, "glDeleteVertexArraysAPPLE(%d, %p);\n", n, (const void *) arrays)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_736)(GLsizei n, GLuint * arrays); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_736)(GLsizei n, GLuint * arrays) +{ + DISPATCH(GenVertexArraysAPPLE, (n, arrays), (F, "glGenVertexArraysAPPLE(%d, %p);\n", n, (const void *) arrays)); +} + +KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_737)(GLuint array); + +KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_737)(GLuint array) +{ + RETURN_DISPATCH(IsVertexArrayAPPLE, (array), (F, "glIsVertexArrayAPPLE(%d);\n", array)); +} + +KEYWORD1 void KEYWORD2 NAME(GetProgramNamedParameterdvNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params) +{ + DISPATCH(GetProgramNamedParameterdvNV, (id, len, name, params), (F, "glGetProgramNamedParameterdvNV(%d, %d, %p, %p);\n", id, len, (const void *) name, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetProgramNamedParameterfvNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params) +{ + DISPATCH(GetProgramNamedParameterfvNV, (id, len, name, params), (F, "glGetProgramNamedParameterfvNV(%d, %d, %p, %p);\n", id, len, (const void *) name, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(ProgramNamedParameter4dNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w) +{ + DISPATCH(ProgramNamedParameter4dNV, (id, len, name, x, y, z, w), (F, "glProgramNamedParameter4dNV(%d, %d, %p, %f, %f, %f, %f);\n", id, len, (const void *) name, x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(ProgramNamedParameter4dvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v) +{ + DISPATCH(ProgramNamedParameter4dvNV, (id, len, name, v), (F, "glProgramNamedParameter4dvNV(%d, %d, %p, %p);\n", id, len, (const void *) name, (const void *) v)); +} + +KEYWORD1 void KEYWORD2 NAME(ProgramNamedParameter4fNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + DISPATCH(ProgramNamedParameter4fNV, (id, len, name, x, y, z, w), (F, "glProgramNamedParameter4fNV(%d, %d, %p, %f, %f, %f, %f);\n", id, len, (const void *) name, x, y, z, w)); +} + +KEYWORD1 void KEYWORD2 NAME(ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v) +{ + DISPATCH(ProgramNamedParameter4fvNV, (id, len, name, v), (F, "glProgramNamedParameter4fvNV(%d, %d, %p, %p);\n", id, len, (const void *) name, (const void *) v)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_744)(GLclampd zmin, GLclampd zmax); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_744)(GLclampd zmin, GLclampd zmax) +{ + DISPATCH(DepthBoundsEXT, (zmin, zmax), (F, "glDepthBoundsEXT(%f, %f);\n", zmin, zmax)); +} + +KEYWORD1 void KEYWORD2 NAME(BlendEquationSeparate)(GLenum modeRGB, GLenum modeA) +{ + DISPATCH(BlendEquationSeparateEXT, (modeRGB, modeA), (F, "glBlendEquationSeparate(0x%x, 0x%x);\n", modeRGB, modeA)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_745)(GLenum modeRGB, GLenum modeA); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_745)(GLenum modeRGB, GLenum modeA) +{ + DISPATCH(BlendEquationSeparateEXT, (modeRGB, modeA), (F, "glBlendEquationSeparateEXT(0x%x, 0x%x);\n", modeRGB, modeA)); +} + +KEYWORD1 void KEYWORD2 NAME(BindFramebufferEXT)(GLenum target, GLuint framebuffer) +{ + DISPATCH(BindFramebufferEXT, (target, framebuffer), (F, "glBindFramebufferEXT(0x%x, %d);\n", target, framebuffer)); +} + +KEYWORD1 void KEYWORD2 NAME(BindRenderbufferEXT)(GLenum target, GLuint renderbuffer) +{ + DISPATCH(BindRenderbufferEXT, (target, renderbuffer), (F, "glBindRenderbufferEXT(0x%x, %d);\n", target, renderbuffer)); +} + +KEYWORD1 GLenum KEYWORD2 NAME(CheckFramebufferStatusEXT)(GLenum target) +{ + RETURN_DISPATCH(CheckFramebufferStatusEXT, (target), (F, "glCheckFramebufferStatusEXT(0x%x);\n", target)); +} + +KEYWORD1 void KEYWORD2 NAME(DeleteFramebuffersEXT)(GLsizei n, const GLuint * framebuffers) +{ + DISPATCH(DeleteFramebuffersEXT, (n, framebuffers), (F, "glDeleteFramebuffersEXT(%d, %p);\n", n, (const void *) framebuffers)); +} + +KEYWORD1 void KEYWORD2 NAME(DeleteRenderbuffersEXT)(GLsizei n, const GLuint * renderbuffers) +{ + DISPATCH(DeleteRenderbuffersEXT, (n, renderbuffers), (F, "glDeleteRenderbuffersEXT(%d, %p);\n", n, (const void *) renderbuffers)); +} + +KEYWORD1 void KEYWORD2 NAME(FramebufferRenderbufferEXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) +{ + DISPATCH(FramebufferRenderbufferEXT, (target, attachment, renderbuffertarget, renderbuffer), (F, "glFramebufferRenderbufferEXT(0x%x, 0x%x, 0x%x, %d);\n", target, attachment, renderbuffertarget, renderbuffer)); +} + +KEYWORD1 void KEYWORD2 NAME(FramebufferTexture1DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) +{ + DISPATCH(FramebufferTexture1DEXT, (target, attachment, textarget, texture, level), (F, "glFramebufferTexture1DEXT(0x%x, 0x%x, 0x%x, %d, %d);\n", target, attachment, textarget, texture, level)); +} + +KEYWORD1 void KEYWORD2 NAME(FramebufferTexture2DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) +{ + DISPATCH(FramebufferTexture2DEXT, (target, attachment, textarget, texture, level), (F, "glFramebufferTexture2DEXT(0x%x, 0x%x, 0x%x, %d, %d);\n", target, attachment, textarget, texture, level)); +} + +KEYWORD1 void KEYWORD2 NAME(FramebufferTexture3DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) +{ + DISPATCH(FramebufferTexture3DEXT, (target, attachment, textarget, texture, level, zoffset), (F, "glFramebufferTexture3DEXT(0x%x, 0x%x, 0x%x, %d, %d, %d);\n", target, attachment, textarget, texture, level, zoffset)); +} + +KEYWORD1 void KEYWORD2 NAME(GenFramebuffersEXT)(GLsizei n, GLuint * framebuffers) +{ + DISPATCH(GenFramebuffersEXT, (n, framebuffers), (F, "glGenFramebuffersEXT(%d, %p);\n", n, (const void *) framebuffers)); +} + +KEYWORD1 void KEYWORD2 NAME(GenRenderbuffersEXT)(GLsizei n, GLuint * renderbuffers) +{ + DISPATCH(GenRenderbuffersEXT, (n, renderbuffers), (F, "glGenRenderbuffersEXT(%d, %p);\n", n, (const void *) renderbuffers)); +} + +KEYWORD1 void KEYWORD2 NAME(GenerateMipmapEXT)(GLenum target) +{ + DISPATCH(GenerateMipmapEXT, (target), (F, "glGenerateMipmapEXT(0x%x);\n", target)); +} + +KEYWORD1 void KEYWORD2 NAME(GetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint * params) +{ + DISPATCH(GetFramebufferAttachmentParameterivEXT, (target, attachment, pname, params), (F, "glGetFramebufferAttachmentParameterivEXT(0x%x, 0x%x, 0x%x, %p);\n", target, attachment, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetRenderbufferParameterivEXT)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetRenderbufferParameterivEXT, (target, pname, params), (F, "glGetRenderbufferParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1 GLboolean KEYWORD2 NAME(IsFramebufferEXT)(GLuint framebuffer) +{ + RETURN_DISPATCH(IsFramebufferEXT, (framebuffer), (F, "glIsFramebufferEXT(%d);\n", framebuffer)); +} + +KEYWORD1 GLboolean KEYWORD2 NAME(IsRenderbufferEXT)(GLuint renderbuffer) +{ + RETURN_DISPATCH(IsRenderbufferEXT, (renderbuffer), (F, "glIsRenderbufferEXT(%d);\n", renderbuffer)); +} + +KEYWORD1 void KEYWORD2 NAME(RenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) +{ + DISPATCH(RenderbufferStorageEXT, (target, internalformat, width, height), (F, "glRenderbufferStorageEXT(0x%x, 0x%x, %d, %d);\n", target, internalformat, width, height)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_763)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_763)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) +{ + DISPATCH(BlitFramebufferEXT, (srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter), (F, "glBlitFramebufferEXT(%d, %d, %d, %d, %d, %d, %d, %d, %d, 0x%x);\n", srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter)); +} + +KEYWORD1 void KEYWORD2 NAME(FramebufferTextureLayerEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) +{ + DISPATCH(FramebufferTextureLayerEXT, (target, attachment, texture, level, layer), (F, "glFramebufferTextureLayerEXT(0x%x, 0x%x, %d, %d, %d);\n", target, attachment, texture, level, layer)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_765)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_765)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask) +{ + DISPATCH(StencilFuncSeparateATI, (frontfunc, backfunc, ref, mask), (F, "glStencilFuncSeparateATI(0x%x, 0x%x, %d, %d);\n", frontfunc, backfunc, ref, mask)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_766)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_766)(GLenum target, GLuint index, GLsizei count, const GLfloat * params) +{ + DISPATCH(ProgramEnvParameters4fvEXT, (target, index, count, params), (F, "glProgramEnvParameters4fvEXT(0x%x, %d, %d, %p);\n", target, index, count, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_767)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_767)(GLenum target, GLuint index, GLsizei count, const GLfloat * params) +{ + DISPATCH(ProgramLocalParameters4fvEXT, (target, index, count, params), (F, "glProgramLocalParameters4fvEXT(0x%x, %d, %d, %p);\n", target, index, count, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_768)(GLuint id, GLenum pname, GLint64EXT * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_768)(GLuint id, GLenum pname, GLint64EXT * params) +{ + DISPATCH(GetQueryObjecti64vEXT, (id, pname, params), (F, "glGetQueryObjecti64vEXT(%d, 0x%x, %p);\n", id, pname, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_769)(GLuint id, GLenum pname, GLuint64EXT * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_769)(GLuint id, GLenum pname, GLuint64EXT * params) +{ + DISPATCH(GetQueryObjectui64vEXT, (id, pname, params), (F, "glGetQueryObjectui64vEXT(%d, 0x%x, %p);\n", id, pname, (const void *) params)); +} + + +#endif /* defined( NAME ) */ + +/* + * This is how a dispatch table can be initialized with all the functions + * we generated above. + */ +#ifdef DISPATCH_TABLE_NAME + +#ifndef TABLE_ENTRY +#error TABLE_ENTRY must be defined +#endif + +static _glapi_proc DISPATCH_TABLE_NAME[] = { + TABLE_ENTRY(NewList), + TABLE_ENTRY(EndList), + TABLE_ENTRY(CallList), + TABLE_ENTRY(CallLists), + TABLE_ENTRY(DeleteLists), + TABLE_ENTRY(GenLists), + TABLE_ENTRY(ListBase), + TABLE_ENTRY(Begin), + TABLE_ENTRY(Bitmap), + TABLE_ENTRY(Color3b), + TABLE_ENTRY(Color3bv), + TABLE_ENTRY(Color3d), + TABLE_ENTRY(Color3dv), + TABLE_ENTRY(Color3f), + TABLE_ENTRY(Color3fv), + TABLE_ENTRY(Color3i), + TABLE_ENTRY(Color3iv), + TABLE_ENTRY(Color3s), + TABLE_ENTRY(Color3sv), + TABLE_ENTRY(Color3ub), + TABLE_ENTRY(Color3ubv), + TABLE_ENTRY(Color3ui), + TABLE_ENTRY(Color3uiv), + TABLE_ENTRY(Color3us), + TABLE_ENTRY(Color3usv), + TABLE_ENTRY(Color4b), + TABLE_ENTRY(Color4bv), + TABLE_ENTRY(Color4d), + TABLE_ENTRY(Color4dv), + TABLE_ENTRY(Color4f), + TABLE_ENTRY(Color4fv), + TABLE_ENTRY(Color4i), + TABLE_ENTRY(Color4iv), + TABLE_ENTRY(Color4s), + TABLE_ENTRY(Color4sv), + TABLE_ENTRY(Color4ub), + TABLE_ENTRY(Color4ubv), + TABLE_ENTRY(Color4ui), + TABLE_ENTRY(Color4uiv), + TABLE_ENTRY(Color4us), + TABLE_ENTRY(Color4usv), + TABLE_ENTRY(EdgeFlag), + TABLE_ENTRY(EdgeFlagv), + TABLE_ENTRY(End), + TABLE_ENTRY(Indexd), + TABLE_ENTRY(Indexdv), + TABLE_ENTRY(Indexf), + TABLE_ENTRY(Indexfv), + TABLE_ENTRY(Indexi), + TABLE_ENTRY(Indexiv), + TABLE_ENTRY(Indexs), + TABLE_ENTRY(Indexsv), + TABLE_ENTRY(Normal3b), + TABLE_ENTRY(Normal3bv), + TABLE_ENTRY(Normal3d), + TABLE_ENTRY(Normal3dv), + TABLE_ENTRY(Normal3f), + TABLE_ENTRY(Normal3fv), + TABLE_ENTRY(Normal3i), + TABLE_ENTRY(Normal3iv), + TABLE_ENTRY(Normal3s), + TABLE_ENTRY(Normal3sv), + TABLE_ENTRY(RasterPos2d), + TABLE_ENTRY(RasterPos2dv), + TABLE_ENTRY(RasterPos2f), + TABLE_ENTRY(RasterPos2fv), + TABLE_ENTRY(RasterPos2i), + TABLE_ENTRY(RasterPos2iv), + TABLE_ENTRY(RasterPos2s), + TABLE_ENTRY(RasterPos2sv), + TABLE_ENTRY(RasterPos3d), + TABLE_ENTRY(RasterPos3dv), + TABLE_ENTRY(RasterPos3f), + TABLE_ENTRY(RasterPos3fv), + TABLE_ENTRY(RasterPos3i), + TABLE_ENTRY(RasterPos3iv), + TABLE_ENTRY(RasterPos3s), + TABLE_ENTRY(RasterPos3sv), + TABLE_ENTRY(RasterPos4d), + TABLE_ENTRY(RasterPos4dv), + TABLE_ENTRY(RasterPos4f), + TABLE_ENTRY(RasterPos4fv), + TABLE_ENTRY(RasterPos4i), + TABLE_ENTRY(RasterPos4iv), + TABLE_ENTRY(RasterPos4s), + TABLE_ENTRY(RasterPos4sv), + TABLE_ENTRY(Rectd), + TABLE_ENTRY(Rectdv), + TABLE_ENTRY(Rectf), + TABLE_ENTRY(Rectfv), + TABLE_ENTRY(Recti), + TABLE_ENTRY(Rectiv), + TABLE_ENTRY(Rects), + TABLE_ENTRY(Rectsv), + TABLE_ENTRY(TexCoord1d), + TABLE_ENTRY(TexCoord1dv), + TABLE_ENTRY(TexCoord1f), + TABLE_ENTRY(TexCoord1fv), + TABLE_ENTRY(TexCoord1i), + TABLE_ENTRY(TexCoord1iv), + TABLE_ENTRY(TexCoord1s), + TABLE_ENTRY(TexCoord1sv), + TABLE_ENTRY(TexCoord2d), + TABLE_ENTRY(TexCoord2dv), + TABLE_ENTRY(TexCoord2f), + TABLE_ENTRY(TexCoord2fv), + TABLE_ENTRY(TexCoord2i), + TABLE_ENTRY(TexCoord2iv), + TABLE_ENTRY(TexCoord2s), + TABLE_ENTRY(TexCoord2sv), + TABLE_ENTRY(TexCoord3d), + TABLE_ENTRY(TexCoord3dv), + TABLE_ENTRY(TexCoord3f), + TABLE_ENTRY(TexCoord3fv), + TABLE_ENTRY(TexCoord3i), + TABLE_ENTRY(TexCoord3iv), + TABLE_ENTRY(TexCoord3s), + TABLE_ENTRY(TexCoord3sv), + TABLE_ENTRY(TexCoord4d), + TABLE_ENTRY(TexCoord4dv), + TABLE_ENTRY(TexCoord4f), + TABLE_ENTRY(TexCoord4fv), + TABLE_ENTRY(TexCoord4i), + TABLE_ENTRY(TexCoord4iv), + TABLE_ENTRY(TexCoord4s), + TABLE_ENTRY(TexCoord4sv), + TABLE_ENTRY(Vertex2d), + TABLE_ENTRY(Vertex2dv), + TABLE_ENTRY(Vertex2f), + TABLE_ENTRY(Vertex2fv), + TABLE_ENTRY(Vertex2i), + TABLE_ENTRY(Vertex2iv), + TABLE_ENTRY(Vertex2s), + TABLE_ENTRY(Vertex2sv), + TABLE_ENTRY(Vertex3d), + TABLE_ENTRY(Vertex3dv), + TABLE_ENTRY(Vertex3f), + TABLE_ENTRY(Vertex3fv), + TABLE_ENTRY(Vertex3i), + TABLE_ENTRY(Vertex3iv), + TABLE_ENTRY(Vertex3s), + TABLE_ENTRY(Vertex3sv), + TABLE_ENTRY(Vertex4d), + TABLE_ENTRY(Vertex4dv), + TABLE_ENTRY(Vertex4f), + TABLE_ENTRY(Vertex4fv), + TABLE_ENTRY(Vertex4i), + TABLE_ENTRY(Vertex4iv), + TABLE_ENTRY(Vertex4s), + TABLE_ENTRY(Vertex4sv), + TABLE_ENTRY(ClipPlane), + TABLE_ENTRY(ColorMaterial), + TABLE_ENTRY(CullFace), + TABLE_ENTRY(Fogf), + TABLE_ENTRY(Fogfv), + TABLE_ENTRY(Fogi), + TABLE_ENTRY(Fogiv), + TABLE_ENTRY(FrontFace), + TABLE_ENTRY(Hint), + TABLE_ENTRY(Lightf), + TABLE_ENTRY(Lightfv), + TABLE_ENTRY(Lighti), + TABLE_ENTRY(Lightiv), + TABLE_ENTRY(LightModelf), + TABLE_ENTRY(LightModelfv), + TABLE_ENTRY(LightModeli), + TABLE_ENTRY(LightModeliv), + TABLE_ENTRY(LineStipple), + TABLE_ENTRY(LineWidth), + TABLE_ENTRY(Materialf), + TABLE_ENTRY(Materialfv), + TABLE_ENTRY(Materiali), + TABLE_ENTRY(Materialiv), + TABLE_ENTRY(PointSize), + TABLE_ENTRY(PolygonMode), + TABLE_ENTRY(PolygonStipple), + TABLE_ENTRY(Scissor), + TABLE_ENTRY(ShadeModel), + TABLE_ENTRY(TexParameterf), + TABLE_ENTRY(TexParameterfv), + TABLE_ENTRY(TexParameteri), + TABLE_ENTRY(TexParameteriv), + TABLE_ENTRY(TexImage1D), + TABLE_ENTRY(TexImage2D), + TABLE_ENTRY(TexEnvf), + TABLE_ENTRY(TexEnvfv), + TABLE_ENTRY(TexEnvi), + TABLE_ENTRY(TexEnviv), + TABLE_ENTRY(TexGend), + TABLE_ENTRY(TexGendv), + TABLE_ENTRY(TexGenf), + TABLE_ENTRY(TexGenfv), + TABLE_ENTRY(TexGeni), + TABLE_ENTRY(TexGeniv), + TABLE_ENTRY(FeedbackBuffer), + TABLE_ENTRY(SelectBuffer), + TABLE_ENTRY(RenderMode), + TABLE_ENTRY(InitNames), + TABLE_ENTRY(LoadName), + TABLE_ENTRY(PassThrough), + TABLE_ENTRY(PopName), + TABLE_ENTRY(PushName), + TABLE_ENTRY(DrawBuffer), + TABLE_ENTRY(Clear), + TABLE_ENTRY(ClearAccum), + TABLE_ENTRY(ClearIndex), + TABLE_ENTRY(ClearColor), + TABLE_ENTRY(ClearStencil), + TABLE_ENTRY(ClearDepth), + TABLE_ENTRY(StencilMask), + TABLE_ENTRY(ColorMask), + TABLE_ENTRY(DepthMask), + TABLE_ENTRY(IndexMask), + TABLE_ENTRY(Accum), + TABLE_ENTRY(Disable), + TABLE_ENTRY(Enable), + TABLE_ENTRY(Finish), + TABLE_ENTRY(Flush), + TABLE_ENTRY(PopAttrib), + TABLE_ENTRY(PushAttrib), + TABLE_ENTRY(Map1d), + TABLE_ENTRY(Map1f), + TABLE_ENTRY(Map2d), + TABLE_ENTRY(Map2f), + TABLE_ENTRY(MapGrid1d), + TABLE_ENTRY(MapGrid1f), + TABLE_ENTRY(MapGrid2d), + TABLE_ENTRY(MapGrid2f), + TABLE_ENTRY(EvalCoord1d), + TABLE_ENTRY(EvalCoord1dv), + TABLE_ENTRY(EvalCoord1f), + TABLE_ENTRY(EvalCoord1fv), + TABLE_ENTRY(EvalCoord2d), + TABLE_ENTRY(EvalCoord2dv), + TABLE_ENTRY(EvalCoord2f), + TABLE_ENTRY(EvalCoord2fv), + TABLE_ENTRY(EvalMesh1), + TABLE_ENTRY(EvalPoint1), + TABLE_ENTRY(EvalMesh2), + TABLE_ENTRY(EvalPoint2), + TABLE_ENTRY(AlphaFunc), + TABLE_ENTRY(BlendFunc), + TABLE_ENTRY(LogicOp), + TABLE_ENTRY(StencilFunc), + TABLE_ENTRY(StencilOp), + TABLE_ENTRY(DepthFunc), + TABLE_ENTRY(PixelZoom), + TABLE_ENTRY(PixelTransferf), + TABLE_ENTRY(PixelTransferi), + TABLE_ENTRY(PixelStoref), + TABLE_ENTRY(PixelStorei), + TABLE_ENTRY(PixelMapfv), + TABLE_ENTRY(PixelMapuiv), + TABLE_ENTRY(PixelMapusv), + TABLE_ENTRY(ReadBuffer), + TABLE_ENTRY(CopyPixels), + TABLE_ENTRY(ReadPixels), + TABLE_ENTRY(DrawPixels), + TABLE_ENTRY(GetBooleanv), + TABLE_ENTRY(GetClipPlane), + TABLE_ENTRY(GetDoublev), + TABLE_ENTRY(GetError), + TABLE_ENTRY(GetFloatv), + TABLE_ENTRY(GetIntegerv), + TABLE_ENTRY(GetLightfv), + TABLE_ENTRY(GetLightiv), + TABLE_ENTRY(GetMapdv), + TABLE_ENTRY(GetMapfv), + TABLE_ENTRY(GetMapiv), + TABLE_ENTRY(GetMaterialfv), + TABLE_ENTRY(GetMaterialiv), + TABLE_ENTRY(GetPixelMapfv), + TABLE_ENTRY(GetPixelMapuiv), + TABLE_ENTRY(GetPixelMapusv), + TABLE_ENTRY(GetPolygonStipple), + TABLE_ENTRY(GetString), + TABLE_ENTRY(GetTexEnvfv), + TABLE_ENTRY(GetTexEnviv), + TABLE_ENTRY(GetTexGendv), + TABLE_ENTRY(GetTexGenfv), + TABLE_ENTRY(GetTexGeniv), + TABLE_ENTRY(GetTexImage), + TABLE_ENTRY(GetTexParameterfv), + TABLE_ENTRY(GetTexParameteriv), + TABLE_ENTRY(GetTexLevelParameterfv), + TABLE_ENTRY(GetTexLevelParameteriv), + TABLE_ENTRY(IsEnabled), + TABLE_ENTRY(IsList), + TABLE_ENTRY(DepthRange), + TABLE_ENTRY(Frustum), + TABLE_ENTRY(LoadIdentity), + TABLE_ENTRY(LoadMatrixf), + TABLE_ENTRY(LoadMatrixd), + TABLE_ENTRY(MatrixMode), + TABLE_ENTRY(MultMatrixf), + TABLE_ENTRY(MultMatrixd), + TABLE_ENTRY(Ortho), + TABLE_ENTRY(PopMatrix), + TABLE_ENTRY(PushMatrix), + TABLE_ENTRY(Rotated), + TABLE_ENTRY(Rotatef), + TABLE_ENTRY(Scaled), + TABLE_ENTRY(Scalef), + TABLE_ENTRY(Translated), + TABLE_ENTRY(Translatef), + TABLE_ENTRY(Viewport), + TABLE_ENTRY(ArrayElement), + TABLE_ENTRY(BindTexture), + TABLE_ENTRY(ColorPointer), + TABLE_ENTRY(DisableClientState), + TABLE_ENTRY(DrawArrays), + TABLE_ENTRY(DrawElements), + TABLE_ENTRY(EdgeFlagPointer), + TABLE_ENTRY(EnableClientState), + TABLE_ENTRY(IndexPointer), + TABLE_ENTRY(Indexub), + TABLE_ENTRY(Indexubv), + TABLE_ENTRY(InterleavedArrays), + TABLE_ENTRY(NormalPointer), + TABLE_ENTRY(PolygonOffset), + TABLE_ENTRY(TexCoordPointer), + TABLE_ENTRY(VertexPointer), + TABLE_ENTRY(AreTexturesResident), + TABLE_ENTRY(CopyTexImage1D), + TABLE_ENTRY(CopyTexImage2D), + TABLE_ENTRY(CopyTexSubImage1D), + TABLE_ENTRY(CopyTexSubImage2D), + TABLE_ENTRY(DeleteTextures), + TABLE_ENTRY(GenTextures), + TABLE_ENTRY(GetPointerv), + TABLE_ENTRY(IsTexture), + TABLE_ENTRY(PrioritizeTextures), + TABLE_ENTRY(TexSubImage1D), + TABLE_ENTRY(TexSubImage2D), + TABLE_ENTRY(PopClientAttrib), + TABLE_ENTRY(PushClientAttrib), + TABLE_ENTRY(BlendColor), + TABLE_ENTRY(BlendEquation), + TABLE_ENTRY(DrawRangeElements), + TABLE_ENTRY(ColorTable), + TABLE_ENTRY(ColorTableParameterfv), + TABLE_ENTRY(ColorTableParameteriv), + TABLE_ENTRY(CopyColorTable), + TABLE_ENTRY(GetColorTable), + TABLE_ENTRY(GetColorTableParameterfv), + TABLE_ENTRY(GetColorTableParameteriv), + TABLE_ENTRY(ColorSubTable), + TABLE_ENTRY(CopyColorSubTable), + TABLE_ENTRY(ConvolutionFilter1D), + TABLE_ENTRY(ConvolutionFilter2D), + TABLE_ENTRY(ConvolutionParameterf), + TABLE_ENTRY(ConvolutionParameterfv), + TABLE_ENTRY(ConvolutionParameteri), + TABLE_ENTRY(ConvolutionParameteriv), + TABLE_ENTRY(CopyConvolutionFilter1D), + TABLE_ENTRY(CopyConvolutionFilter2D), + TABLE_ENTRY(GetConvolutionFilter), + TABLE_ENTRY(GetConvolutionParameterfv), + TABLE_ENTRY(GetConvolutionParameteriv), + TABLE_ENTRY(GetSeparableFilter), + TABLE_ENTRY(SeparableFilter2D), + TABLE_ENTRY(GetHistogram), + TABLE_ENTRY(GetHistogramParameterfv), + TABLE_ENTRY(GetHistogramParameteriv), + TABLE_ENTRY(GetMinmax), + TABLE_ENTRY(GetMinmaxParameterfv), + TABLE_ENTRY(GetMinmaxParameteriv), + TABLE_ENTRY(Histogram), + TABLE_ENTRY(Minmax), + TABLE_ENTRY(ResetHistogram), + TABLE_ENTRY(ResetMinmax), + TABLE_ENTRY(TexImage3D), + TABLE_ENTRY(TexSubImage3D), + TABLE_ENTRY(CopyTexSubImage3D), + TABLE_ENTRY(ActiveTextureARB), + TABLE_ENTRY(ClientActiveTextureARB), + TABLE_ENTRY(MultiTexCoord1dARB), + TABLE_ENTRY(MultiTexCoord1dvARB), + TABLE_ENTRY(MultiTexCoord1fARB), + TABLE_ENTRY(MultiTexCoord1fvARB), + TABLE_ENTRY(MultiTexCoord1iARB), + TABLE_ENTRY(MultiTexCoord1ivARB), + TABLE_ENTRY(MultiTexCoord1sARB), + TABLE_ENTRY(MultiTexCoord1svARB), + TABLE_ENTRY(MultiTexCoord2dARB), + TABLE_ENTRY(MultiTexCoord2dvARB), + TABLE_ENTRY(MultiTexCoord2fARB), + TABLE_ENTRY(MultiTexCoord2fvARB), + TABLE_ENTRY(MultiTexCoord2iARB), + TABLE_ENTRY(MultiTexCoord2ivARB), + TABLE_ENTRY(MultiTexCoord2sARB), + TABLE_ENTRY(MultiTexCoord2svARB), + TABLE_ENTRY(MultiTexCoord3dARB), + TABLE_ENTRY(MultiTexCoord3dvARB), + TABLE_ENTRY(MultiTexCoord3fARB), + TABLE_ENTRY(MultiTexCoord3fvARB), + TABLE_ENTRY(MultiTexCoord3iARB), + TABLE_ENTRY(MultiTexCoord3ivARB), + TABLE_ENTRY(MultiTexCoord3sARB), + TABLE_ENTRY(MultiTexCoord3svARB), + TABLE_ENTRY(MultiTexCoord4dARB), + TABLE_ENTRY(MultiTexCoord4dvARB), + TABLE_ENTRY(MultiTexCoord4fARB), + TABLE_ENTRY(MultiTexCoord4fvARB), + TABLE_ENTRY(MultiTexCoord4iARB), + TABLE_ENTRY(MultiTexCoord4ivARB), + TABLE_ENTRY(MultiTexCoord4sARB), + TABLE_ENTRY(MultiTexCoord4svARB), + TABLE_ENTRY(AttachShader), + TABLE_ENTRY(CreateProgram), + TABLE_ENTRY(CreateShader), + TABLE_ENTRY(DeleteProgram), + TABLE_ENTRY(DeleteShader), + TABLE_ENTRY(DetachShader), + TABLE_ENTRY(GetAttachedShaders), + TABLE_ENTRY(GetProgramInfoLog), + TABLE_ENTRY(GetProgramiv), + TABLE_ENTRY(GetShaderInfoLog), + TABLE_ENTRY(GetShaderiv), + TABLE_ENTRY(IsProgram), + TABLE_ENTRY(IsShader), + TABLE_ENTRY(StencilFuncSeparate), + TABLE_ENTRY(StencilMaskSeparate), + TABLE_ENTRY(StencilOpSeparate), + TABLE_ENTRY(UniformMatrix2x3fv), + TABLE_ENTRY(UniformMatrix2x4fv), + TABLE_ENTRY(UniformMatrix3x2fv), + TABLE_ENTRY(UniformMatrix3x4fv), + TABLE_ENTRY(UniformMatrix4x2fv), + TABLE_ENTRY(UniformMatrix4x3fv), + TABLE_ENTRY(LoadTransposeMatrixdARB), + TABLE_ENTRY(LoadTransposeMatrixfARB), + TABLE_ENTRY(MultTransposeMatrixdARB), + TABLE_ENTRY(MultTransposeMatrixfARB), + TABLE_ENTRY(SampleCoverageARB), + TABLE_ENTRY(CompressedTexImage1DARB), + TABLE_ENTRY(CompressedTexImage2DARB), + TABLE_ENTRY(CompressedTexImage3DARB), + TABLE_ENTRY(CompressedTexSubImage1DARB), + TABLE_ENTRY(CompressedTexSubImage2DARB), + TABLE_ENTRY(CompressedTexSubImage3DARB), + TABLE_ENTRY(GetCompressedTexImageARB), + TABLE_ENTRY(DisableVertexAttribArrayARB), + TABLE_ENTRY(EnableVertexAttribArrayARB), + TABLE_ENTRY(GetProgramEnvParameterdvARB), + TABLE_ENTRY(GetProgramEnvParameterfvARB), + TABLE_ENTRY(GetProgramLocalParameterdvARB), + TABLE_ENTRY(GetProgramLocalParameterfvARB), + TABLE_ENTRY(GetProgramStringARB), + TABLE_ENTRY(GetProgramivARB), + TABLE_ENTRY(GetVertexAttribdvARB), + TABLE_ENTRY(GetVertexAttribfvARB), + TABLE_ENTRY(GetVertexAttribivARB), + TABLE_ENTRY(ProgramEnvParameter4dARB), + TABLE_ENTRY(ProgramEnvParameter4dvARB), + TABLE_ENTRY(ProgramEnvParameter4fARB), + TABLE_ENTRY(ProgramEnvParameter4fvARB), + TABLE_ENTRY(ProgramLocalParameter4dARB), + TABLE_ENTRY(ProgramLocalParameter4dvARB), + TABLE_ENTRY(ProgramLocalParameter4fARB), + TABLE_ENTRY(ProgramLocalParameter4fvARB), + TABLE_ENTRY(ProgramStringARB), + TABLE_ENTRY(VertexAttrib1dARB), + TABLE_ENTRY(VertexAttrib1dvARB), + TABLE_ENTRY(VertexAttrib1fARB), + TABLE_ENTRY(VertexAttrib1fvARB), + TABLE_ENTRY(VertexAttrib1sARB), + TABLE_ENTRY(VertexAttrib1svARB), + TABLE_ENTRY(VertexAttrib2dARB), + TABLE_ENTRY(VertexAttrib2dvARB), + TABLE_ENTRY(VertexAttrib2fARB), + TABLE_ENTRY(VertexAttrib2fvARB), + TABLE_ENTRY(VertexAttrib2sARB), + TABLE_ENTRY(VertexAttrib2svARB), + TABLE_ENTRY(VertexAttrib3dARB), + TABLE_ENTRY(VertexAttrib3dvARB), + TABLE_ENTRY(VertexAttrib3fARB), + TABLE_ENTRY(VertexAttrib3fvARB), + TABLE_ENTRY(VertexAttrib3sARB), + TABLE_ENTRY(VertexAttrib3svARB), + TABLE_ENTRY(VertexAttrib4NbvARB), + TABLE_ENTRY(VertexAttrib4NivARB), + TABLE_ENTRY(VertexAttrib4NsvARB), + TABLE_ENTRY(VertexAttrib4NubARB), + TABLE_ENTRY(VertexAttrib4NubvARB), + TABLE_ENTRY(VertexAttrib4NuivARB), + TABLE_ENTRY(VertexAttrib4NusvARB), + TABLE_ENTRY(VertexAttrib4bvARB), + TABLE_ENTRY(VertexAttrib4dARB), + TABLE_ENTRY(VertexAttrib4dvARB), + TABLE_ENTRY(VertexAttrib4fARB), + TABLE_ENTRY(VertexAttrib4fvARB), + TABLE_ENTRY(VertexAttrib4ivARB), + TABLE_ENTRY(VertexAttrib4sARB), + TABLE_ENTRY(VertexAttrib4svARB), + TABLE_ENTRY(VertexAttrib4ubvARB), + TABLE_ENTRY(VertexAttrib4uivARB), + TABLE_ENTRY(VertexAttrib4usvARB), + TABLE_ENTRY(VertexAttribPointerARB), + TABLE_ENTRY(BindBufferARB), + TABLE_ENTRY(BufferDataARB), + TABLE_ENTRY(BufferSubDataARB), + TABLE_ENTRY(DeleteBuffersARB), + TABLE_ENTRY(GenBuffersARB), + TABLE_ENTRY(GetBufferParameterivARB), + TABLE_ENTRY(GetBufferPointervARB), + TABLE_ENTRY(GetBufferSubDataARB), + TABLE_ENTRY(IsBufferARB), + TABLE_ENTRY(MapBufferARB), + TABLE_ENTRY(UnmapBufferARB), + TABLE_ENTRY(BeginQueryARB), + TABLE_ENTRY(DeleteQueriesARB), + TABLE_ENTRY(EndQueryARB), + TABLE_ENTRY(GenQueriesARB), + TABLE_ENTRY(GetQueryObjectivARB), + TABLE_ENTRY(GetQueryObjectuivARB), + TABLE_ENTRY(GetQueryivARB), + TABLE_ENTRY(IsQueryARB), + TABLE_ENTRY(AttachObjectARB), + TABLE_ENTRY(CompileShaderARB), + TABLE_ENTRY(CreateProgramObjectARB), + TABLE_ENTRY(CreateShaderObjectARB), + TABLE_ENTRY(DeleteObjectARB), + TABLE_ENTRY(DetachObjectARB), + TABLE_ENTRY(GetActiveUniformARB), + TABLE_ENTRY(GetAttachedObjectsARB), + TABLE_ENTRY(GetHandleARB), + TABLE_ENTRY(GetInfoLogARB), + TABLE_ENTRY(GetObjectParameterfvARB), + TABLE_ENTRY(GetObjectParameterivARB), + TABLE_ENTRY(GetShaderSourceARB), + TABLE_ENTRY(GetUniformLocationARB), + TABLE_ENTRY(GetUniformfvARB), + TABLE_ENTRY(GetUniformivARB), + TABLE_ENTRY(LinkProgramARB), + TABLE_ENTRY(ShaderSourceARB), + TABLE_ENTRY(Uniform1fARB), + TABLE_ENTRY(Uniform1fvARB), + TABLE_ENTRY(Uniform1iARB), + TABLE_ENTRY(Uniform1ivARB), + TABLE_ENTRY(Uniform2fARB), + TABLE_ENTRY(Uniform2fvARB), + TABLE_ENTRY(Uniform2iARB), + TABLE_ENTRY(Uniform2ivARB), + TABLE_ENTRY(Uniform3fARB), + TABLE_ENTRY(Uniform3fvARB), + TABLE_ENTRY(Uniform3iARB), + TABLE_ENTRY(Uniform3ivARB), + TABLE_ENTRY(Uniform4fARB), + TABLE_ENTRY(Uniform4fvARB), + TABLE_ENTRY(Uniform4iARB), + TABLE_ENTRY(Uniform4ivARB), + TABLE_ENTRY(UniformMatrix2fvARB), + TABLE_ENTRY(UniformMatrix3fvARB), + TABLE_ENTRY(UniformMatrix4fvARB), + TABLE_ENTRY(UseProgramObjectARB), + TABLE_ENTRY(ValidateProgramARB), + TABLE_ENTRY(BindAttribLocationARB), + TABLE_ENTRY(GetActiveAttribARB), + TABLE_ENTRY(GetAttribLocationARB), + TABLE_ENTRY(DrawBuffersARB), + TABLE_ENTRY(PolygonOffsetEXT), + TABLE_ENTRY(_dispatch_stub_562), + TABLE_ENTRY(_dispatch_stub_563), + TABLE_ENTRY(_dispatch_stub_564), + TABLE_ENTRY(_dispatch_stub_565), + TABLE_ENTRY(_dispatch_stub_566), + TABLE_ENTRY(_dispatch_stub_567), + TABLE_ENTRY(_dispatch_stub_568), + TABLE_ENTRY(_dispatch_stub_569), + TABLE_ENTRY(ColorPointerEXT), + TABLE_ENTRY(EdgeFlagPointerEXT), + TABLE_ENTRY(IndexPointerEXT), + TABLE_ENTRY(NormalPointerEXT), + TABLE_ENTRY(TexCoordPointerEXT), + TABLE_ENTRY(VertexPointerEXT), + TABLE_ENTRY(PointParameterfEXT), + TABLE_ENTRY(PointParameterfvEXT), + TABLE_ENTRY(LockArraysEXT), + TABLE_ENTRY(UnlockArraysEXT), + TABLE_ENTRY(_dispatch_stub_580), + TABLE_ENTRY(_dispatch_stub_581), + TABLE_ENTRY(SecondaryColor3bEXT), + TABLE_ENTRY(SecondaryColor3bvEXT), + TABLE_ENTRY(SecondaryColor3dEXT), + TABLE_ENTRY(SecondaryColor3dvEXT), + TABLE_ENTRY(SecondaryColor3fEXT), + TABLE_ENTRY(SecondaryColor3fvEXT), + TABLE_ENTRY(SecondaryColor3iEXT), + TABLE_ENTRY(SecondaryColor3ivEXT), + TABLE_ENTRY(SecondaryColor3sEXT), + TABLE_ENTRY(SecondaryColor3svEXT), + TABLE_ENTRY(SecondaryColor3ubEXT), + TABLE_ENTRY(SecondaryColor3ubvEXT), + TABLE_ENTRY(SecondaryColor3uiEXT), + TABLE_ENTRY(SecondaryColor3uivEXT), + TABLE_ENTRY(SecondaryColor3usEXT), + TABLE_ENTRY(SecondaryColor3usvEXT), + TABLE_ENTRY(SecondaryColorPointerEXT), + TABLE_ENTRY(MultiDrawArraysEXT), + TABLE_ENTRY(MultiDrawElementsEXT), + TABLE_ENTRY(FogCoordPointerEXT), + TABLE_ENTRY(FogCoorddEXT), + TABLE_ENTRY(FogCoorddvEXT), + TABLE_ENTRY(FogCoordfEXT), + TABLE_ENTRY(FogCoordfvEXT), + TABLE_ENTRY(_dispatch_stub_606), + TABLE_ENTRY(BlendFuncSeparateEXT), + TABLE_ENTRY(FlushVertexArrayRangeNV), + TABLE_ENTRY(VertexArrayRangeNV), + TABLE_ENTRY(CombinerInputNV), + TABLE_ENTRY(CombinerOutputNV), + TABLE_ENTRY(CombinerParameterfNV), + TABLE_ENTRY(CombinerParameterfvNV), + TABLE_ENTRY(CombinerParameteriNV), + TABLE_ENTRY(CombinerParameterivNV), + TABLE_ENTRY(FinalCombinerInputNV), + TABLE_ENTRY(GetCombinerInputParameterfvNV), + TABLE_ENTRY(GetCombinerInputParameterivNV), + TABLE_ENTRY(GetCombinerOutputParameterfvNV), + TABLE_ENTRY(GetCombinerOutputParameterivNV), + TABLE_ENTRY(GetFinalCombinerInputParameterfvNV), + TABLE_ENTRY(GetFinalCombinerInputParameterivNV), + TABLE_ENTRY(ResizeBuffersMESA), + TABLE_ENTRY(WindowPos2dMESA), + TABLE_ENTRY(WindowPos2dvMESA), + TABLE_ENTRY(WindowPos2fMESA), + TABLE_ENTRY(WindowPos2fvMESA), + TABLE_ENTRY(WindowPos2iMESA), + TABLE_ENTRY(WindowPos2ivMESA), + TABLE_ENTRY(WindowPos2sMESA), + TABLE_ENTRY(WindowPos2svMESA), + TABLE_ENTRY(WindowPos3dMESA), + TABLE_ENTRY(WindowPos3dvMESA), + TABLE_ENTRY(WindowPos3fMESA), + TABLE_ENTRY(WindowPos3fvMESA), + TABLE_ENTRY(WindowPos3iMESA), + TABLE_ENTRY(WindowPos3ivMESA), + TABLE_ENTRY(WindowPos3sMESA), + TABLE_ENTRY(WindowPos3svMESA), + TABLE_ENTRY(WindowPos4dMESA), + TABLE_ENTRY(WindowPos4dvMESA), + TABLE_ENTRY(WindowPos4fMESA), + TABLE_ENTRY(WindowPos4fvMESA), + TABLE_ENTRY(WindowPos4iMESA), + TABLE_ENTRY(WindowPos4ivMESA), + TABLE_ENTRY(WindowPos4sMESA), + TABLE_ENTRY(WindowPos4svMESA), + TABLE_ENTRY(_dispatch_stub_648), + TABLE_ENTRY(_dispatch_stub_649), + TABLE_ENTRY(_dispatch_stub_650), + TABLE_ENTRY(_dispatch_stub_651), + TABLE_ENTRY(_dispatch_stub_652), + TABLE_ENTRY(_dispatch_stub_653), + TABLE_ENTRY(_dispatch_stub_654), + TABLE_ENTRY(_dispatch_stub_655), + TABLE_ENTRY(_dispatch_stub_656), + TABLE_ENTRY(AreProgramsResidentNV), + TABLE_ENTRY(BindProgramNV), + TABLE_ENTRY(DeleteProgramsNV), + TABLE_ENTRY(ExecuteProgramNV), + TABLE_ENTRY(GenProgramsNV), + TABLE_ENTRY(GetProgramParameterdvNV), + TABLE_ENTRY(GetProgramParameterfvNV), + TABLE_ENTRY(GetProgramStringNV), + TABLE_ENTRY(GetProgramivNV), + TABLE_ENTRY(GetTrackMatrixivNV), + TABLE_ENTRY(GetVertexAttribPointervNV), + TABLE_ENTRY(GetVertexAttribdvNV), + TABLE_ENTRY(GetVertexAttribfvNV), + TABLE_ENTRY(GetVertexAttribivNV), + TABLE_ENTRY(IsProgramNV), + TABLE_ENTRY(LoadProgramNV), + TABLE_ENTRY(ProgramParameters4dvNV), + TABLE_ENTRY(ProgramParameters4fvNV), + TABLE_ENTRY(RequestResidentProgramsNV), + TABLE_ENTRY(TrackMatrixNV), + TABLE_ENTRY(VertexAttrib1dNV), + TABLE_ENTRY(VertexAttrib1dvNV), + TABLE_ENTRY(VertexAttrib1fNV), + TABLE_ENTRY(VertexAttrib1fvNV), + TABLE_ENTRY(VertexAttrib1sNV), + TABLE_ENTRY(VertexAttrib1svNV), + TABLE_ENTRY(VertexAttrib2dNV), + TABLE_ENTRY(VertexAttrib2dvNV), + TABLE_ENTRY(VertexAttrib2fNV), + TABLE_ENTRY(VertexAttrib2fvNV), + TABLE_ENTRY(VertexAttrib2sNV), + TABLE_ENTRY(VertexAttrib2svNV), + TABLE_ENTRY(VertexAttrib3dNV), + TABLE_ENTRY(VertexAttrib3dvNV), + TABLE_ENTRY(VertexAttrib3fNV), + TABLE_ENTRY(VertexAttrib3fvNV), + TABLE_ENTRY(VertexAttrib3sNV), + TABLE_ENTRY(VertexAttrib3svNV), + TABLE_ENTRY(VertexAttrib4dNV), + TABLE_ENTRY(VertexAttrib4dvNV), + TABLE_ENTRY(VertexAttrib4fNV), + TABLE_ENTRY(VertexAttrib4fvNV), + TABLE_ENTRY(VertexAttrib4sNV), + TABLE_ENTRY(VertexAttrib4svNV), + TABLE_ENTRY(VertexAttrib4ubNV), + TABLE_ENTRY(VertexAttrib4ubvNV), + TABLE_ENTRY(VertexAttribPointerNV), + TABLE_ENTRY(VertexAttribs1dvNV), + TABLE_ENTRY(VertexAttribs1fvNV), + TABLE_ENTRY(VertexAttribs1svNV), + TABLE_ENTRY(VertexAttribs2dvNV), + TABLE_ENTRY(VertexAttribs2fvNV), + TABLE_ENTRY(VertexAttribs2svNV), + TABLE_ENTRY(VertexAttribs3dvNV), + TABLE_ENTRY(VertexAttribs3fvNV), + TABLE_ENTRY(VertexAttribs3svNV), + TABLE_ENTRY(VertexAttribs4dvNV), + TABLE_ENTRY(VertexAttribs4fvNV), + TABLE_ENTRY(VertexAttribs4svNV), + TABLE_ENTRY(VertexAttribs4ubvNV), + TABLE_ENTRY(AlphaFragmentOp1ATI), + TABLE_ENTRY(AlphaFragmentOp2ATI), + TABLE_ENTRY(AlphaFragmentOp3ATI), + TABLE_ENTRY(BeginFragmentShaderATI), + TABLE_ENTRY(BindFragmentShaderATI), + TABLE_ENTRY(ColorFragmentOp1ATI), + TABLE_ENTRY(ColorFragmentOp2ATI), + TABLE_ENTRY(ColorFragmentOp3ATI), + TABLE_ENTRY(DeleteFragmentShaderATI), + TABLE_ENTRY(EndFragmentShaderATI), + TABLE_ENTRY(GenFragmentShadersATI), + TABLE_ENTRY(PassTexCoordATI), + TABLE_ENTRY(SampleMapATI), + TABLE_ENTRY(SetFragmentShaderConstantATI), + TABLE_ENTRY(PointParameteriNV), + TABLE_ENTRY(PointParameterivNV), + TABLE_ENTRY(_dispatch_stub_733), + TABLE_ENTRY(_dispatch_stub_734), + TABLE_ENTRY(_dispatch_stub_735), + TABLE_ENTRY(_dispatch_stub_736), + TABLE_ENTRY(_dispatch_stub_737), + TABLE_ENTRY(GetProgramNamedParameterdvNV), + TABLE_ENTRY(GetProgramNamedParameterfvNV), + TABLE_ENTRY(ProgramNamedParameter4dNV), + TABLE_ENTRY(ProgramNamedParameter4dvNV), + TABLE_ENTRY(ProgramNamedParameter4fNV), + TABLE_ENTRY(ProgramNamedParameter4fvNV), + TABLE_ENTRY(_dispatch_stub_744), + TABLE_ENTRY(_dispatch_stub_745), + TABLE_ENTRY(BindFramebufferEXT), + TABLE_ENTRY(BindRenderbufferEXT), + TABLE_ENTRY(CheckFramebufferStatusEXT), + TABLE_ENTRY(DeleteFramebuffersEXT), + TABLE_ENTRY(DeleteRenderbuffersEXT), + TABLE_ENTRY(FramebufferRenderbufferEXT), + TABLE_ENTRY(FramebufferTexture1DEXT), + TABLE_ENTRY(FramebufferTexture2DEXT), + TABLE_ENTRY(FramebufferTexture3DEXT), + TABLE_ENTRY(GenFramebuffersEXT), + TABLE_ENTRY(GenRenderbuffersEXT), + TABLE_ENTRY(GenerateMipmapEXT), + TABLE_ENTRY(GetFramebufferAttachmentParameterivEXT), + TABLE_ENTRY(GetRenderbufferParameterivEXT), + TABLE_ENTRY(IsFramebufferEXT), + TABLE_ENTRY(IsRenderbufferEXT), + TABLE_ENTRY(RenderbufferStorageEXT), + TABLE_ENTRY(_dispatch_stub_763), + TABLE_ENTRY(FramebufferTextureLayerEXT), + TABLE_ENTRY(_dispatch_stub_765), + TABLE_ENTRY(_dispatch_stub_766), + TABLE_ENTRY(_dispatch_stub_767), + TABLE_ENTRY(_dispatch_stub_768), + TABLE_ENTRY(_dispatch_stub_769), + /* A whole bunch of no-op functions. These might be called + * when someone tries to call a dynamically-registered + * extension function without a current rendering context. + */ + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), + TABLE_ENTRY(Unused), +}; +#endif /* DISPATCH_TABLE_NAME */ + + +/* + * This is just used to silence compiler warnings. + * We list the functions which are not otherwise used. + */ +#ifdef UNUSED_TABLE_NAME +static _glapi_proc UNUSED_TABLE_NAME[] = { + TABLE_ENTRY(ArrayElementEXT), + TABLE_ENTRY(BindTextureEXT), + TABLE_ENTRY(DrawArraysEXT), +#ifndef GLX_INDIRECT_RENDERING + TABLE_ENTRY(AreTexturesResidentEXT), +#endif + TABLE_ENTRY(CopyTexImage1DEXT), + TABLE_ENTRY(CopyTexImage2DEXT), + TABLE_ENTRY(CopyTexSubImage1DEXT), + TABLE_ENTRY(CopyTexSubImage2DEXT), +#ifndef GLX_INDIRECT_RENDERING + TABLE_ENTRY(DeleteTexturesEXT), +#endif +#ifndef GLX_INDIRECT_RENDERING + TABLE_ENTRY(GenTexturesEXT), +#endif + TABLE_ENTRY(GetPointervEXT), +#ifndef GLX_INDIRECT_RENDERING + TABLE_ENTRY(IsTextureEXT), +#endif + TABLE_ENTRY(PrioritizeTexturesEXT), + TABLE_ENTRY(TexSubImage1DEXT), + TABLE_ENTRY(TexSubImage2DEXT), + TABLE_ENTRY(BlendColorEXT), + TABLE_ENTRY(BlendEquationEXT), + TABLE_ENTRY(DrawRangeElementsEXT), + TABLE_ENTRY(ColorTableEXT), +#ifndef GLX_INDIRECT_RENDERING + TABLE_ENTRY(GetColorTableEXT), +#endif +#ifndef GLX_INDIRECT_RENDERING + TABLE_ENTRY(GetColorTableParameterfvEXT), +#endif +#ifndef GLX_INDIRECT_RENDERING + TABLE_ENTRY(GetColorTableParameterivEXT), +#endif + TABLE_ENTRY(TexImage3DEXT), + TABLE_ENTRY(TexSubImage3DEXT), + TABLE_ENTRY(CopyTexSubImage3DEXT), + TABLE_ENTRY(ActiveTexture), + TABLE_ENTRY(ClientActiveTexture), + TABLE_ENTRY(MultiTexCoord1d), + TABLE_ENTRY(MultiTexCoord1dv), + TABLE_ENTRY(MultiTexCoord1f), + TABLE_ENTRY(MultiTexCoord1fv), + TABLE_ENTRY(MultiTexCoord1i), + TABLE_ENTRY(MultiTexCoord1iv), + TABLE_ENTRY(MultiTexCoord1s), + TABLE_ENTRY(MultiTexCoord1sv), + TABLE_ENTRY(MultiTexCoord2d), + TABLE_ENTRY(MultiTexCoord2dv), + TABLE_ENTRY(MultiTexCoord2f), + TABLE_ENTRY(MultiTexCoord2fv), + TABLE_ENTRY(MultiTexCoord2i), + TABLE_ENTRY(MultiTexCoord2iv), + TABLE_ENTRY(MultiTexCoord2s), + TABLE_ENTRY(MultiTexCoord2sv), + TABLE_ENTRY(MultiTexCoord3d), + TABLE_ENTRY(MultiTexCoord3dv), + TABLE_ENTRY(MultiTexCoord3f), + TABLE_ENTRY(MultiTexCoord3fv), + TABLE_ENTRY(MultiTexCoord3i), + TABLE_ENTRY(MultiTexCoord3iv), + TABLE_ENTRY(MultiTexCoord3s), + TABLE_ENTRY(MultiTexCoord3sv), + TABLE_ENTRY(MultiTexCoord4d), + TABLE_ENTRY(MultiTexCoord4dv), + TABLE_ENTRY(MultiTexCoord4f), + TABLE_ENTRY(MultiTexCoord4fv), + TABLE_ENTRY(MultiTexCoord4i), + TABLE_ENTRY(MultiTexCoord4iv), + TABLE_ENTRY(MultiTexCoord4s), + TABLE_ENTRY(MultiTexCoord4sv), + TABLE_ENTRY(LoadTransposeMatrixd), + TABLE_ENTRY(LoadTransposeMatrixf), + TABLE_ENTRY(MultTransposeMatrixd), + TABLE_ENTRY(MultTransposeMatrixf), + TABLE_ENTRY(SampleCoverage), + TABLE_ENTRY(CompressedTexImage1D), + TABLE_ENTRY(CompressedTexImage2D), + TABLE_ENTRY(CompressedTexImage3D), + TABLE_ENTRY(CompressedTexSubImage1D), + TABLE_ENTRY(CompressedTexSubImage2D), + TABLE_ENTRY(CompressedTexSubImage3D), + TABLE_ENTRY(GetCompressedTexImage), + TABLE_ENTRY(DisableVertexAttribArray), + TABLE_ENTRY(EnableVertexAttribArray), + TABLE_ENTRY(GetVertexAttribdv), + TABLE_ENTRY(GetVertexAttribfv), + TABLE_ENTRY(GetVertexAttribiv), + TABLE_ENTRY(ProgramParameter4dNV), + TABLE_ENTRY(ProgramParameter4dvNV), + TABLE_ENTRY(ProgramParameter4fNV), + TABLE_ENTRY(ProgramParameter4fvNV), + TABLE_ENTRY(VertexAttrib1d), + TABLE_ENTRY(VertexAttrib1dv), + TABLE_ENTRY(VertexAttrib1f), + TABLE_ENTRY(VertexAttrib1fv), + TABLE_ENTRY(VertexAttrib1s), + TABLE_ENTRY(VertexAttrib1sv), + TABLE_ENTRY(VertexAttrib2d), + TABLE_ENTRY(VertexAttrib2dv), + TABLE_ENTRY(VertexAttrib2f), + TABLE_ENTRY(VertexAttrib2fv), + TABLE_ENTRY(VertexAttrib2s), + TABLE_ENTRY(VertexAttrib2sv), + TABLE_ENTRY(VertexAttrib3d), + TABLE_ENTRY(VertexAttrib3dv), + TABLE_ENTRY(VertexAttrib3f), + TABLE_ENTRY(VertexAttrib3fv), + TABLE_ENTRY(VertexAttrib3s), + TABLE_ENTRY(VertexAttrib3sv), + TABLE_ENTRY(VertexAttrib4Nbv), + TABLE_ENTRY(VertexAttrib4Niv), + TABLE_ENTRY(VertexAttrib4Nsv), + TABLE_ENTRY(VertexAttrib4Nub), + TABLE_ENTRY(VertexAttrib4Nubv), + TABLE_ENTRY(VertexAttrib4Nuiv), + TABLE_ENTRY(VertexAttrib4Nusv), + TABLE_ENTRY(VertexAttrib4bv), + TABLE_ENTRY(VertexAttrib4d), + TABLE_ENTRY(VertexAttrib4dv), + TABLE_ENTRY(VertexAttrib4f), + TABLE_ENTRY(VertexAttrib4fv), + TABLE_ENTRY(VertexAttrib4iv), + TABLE_ENTRY(VertexAttrib4s), + TABLE_ENTRY(VertexAttrib4sv), + TABLE_ENTRY(VertexAttrib4ubv), + TABLE_ENTRY(VertexAttrib4uiv), + TABLE_ENTRY(VertexAttrib4usv), + TABLE_ENTRY(VertexAttribPointer), + TABLE_ENTRY(BindBuffer), + TABLE_ENTRY(BufferData), + TABLE_ENTRY(BufferSubData), + TABLE_ENTRY(DeleteBuffers), + TABLE_ENTRY(GenBuffers), + TABLE_ENTRY(GetBufferParameteriv), + TABLE_ENTRY(GetBufferPointerv), + TABLE_ENTRY(GetBufferSubData), + TABLE_ENTRY(IsBuffer), + TABLE_ENTRY(MapBuffer), + TABLE_ENTRY(UnmapBuffer), + TABLE_ENTRY(BeginQuery), + TABLE_ENTRY(DeleteQueries), + TABLE_ENTRY(EndQuery), + TABLE_ENTRY(GenQueries), + TABLE_ENTRY(GetQueryObjectiv), + TABLE_ENTRY(GetQueryObjectuiv), + TABLE_ENTRY(GetQueryiv), + TABLE_ENTRY(IsQuery), + TABLE_ENTRY(CompileShader), + TABLE_ENTRY(GetActiveUniform), + TABLE_ENTRY(GetShaderSource), + TABLE_ENTRY(GetUniformLocation), + TABLE_ENTRY(GetUniformfv), + TABLE_ENTRY(GetUniformiv), + TABLE_ENTRY(LinkProgram), + TABLE_ENTRY(ShaderSource), + TABLE_ENTRY(Uniform1f), + TABLE_ENTRY(Uniform1fv), + TABLE_ENTRY(Uniform1i), + TABLE_ENTRY(Uniform1iv), + TABLE_ENTRY(Uniform2f), + TABLE_ENTRY(Uniform2fv), + TABLE_ENTRY(Uniform2i), + TABLE_ENTRY(Uniform2iv), + TABLE_ENTRY(Uniform3f), + TABLE_ENTRY(Uniform3fv), + TABLE_ENTRY(Uniform3i), + TABLE_ENTRY(Uniform3iv), + TABLE_ENTRY(Uniform4f), + TABLE_ENTRY(Uniform4fv), + TABLE_ENTRY(Uniform4i), + TABLE_ENTRY(Uniform4iv), + TABLE_ENTRY(UniformMatrix2fv), + TABLE_ENTRY(UniformMatrix3fv), + TABLE_ENTRY(UniformMatrix4fv), + TABLE_ENTRY(UseProgram), + TABLE_ENTRY(ValidateProgram), + TABLE_ENTRY(BindAttribLocation), + TABLE_ENTRY(GetActiveAttrib), + TABLE_ENTRY(GetAttribLocation), + TABLE_ENTRY(DrawBuffers), + TABLE_ENTRY(DrawBuffersATI), + TABLE_ENTRY(PointParameterf), + TABLE_ENTRY(PointParameterfARB), + TABLE_ENTRY(PointParameterfv), + TABLE_ENTRY(PointParameterfvARB), + TABLE_ENTRY(SecondaryColor3b), + TABLE_ENTRY(SecondaryColor3bv), + TABLE_ENTRY(SecondaryColor3d), + TABLE_ENTRY(SecondaryColor3dv), + TABLE_ENTRY(SecondaryColor3f), + TABLE_ENTRY(SecondaryColor3fv), + TABLE_ENTRY(SecondaryColor3i), + TABLE_ENTRY(SecondaryColor3iv), + TABLE_ENTRY(SecondaryColor3s), + TABLE_ENTRY(SecondaryColor3sv), + TABLE_ENTRY(SecondaryColor3ub), + TABLE_ENTRY(SecondaryColor3ubv), + TABLE_ENTRY(SecondaryColor3ui), + TABLE_ENTRY(SecondaryColor3uiv), + TABLE_ENTRY(SecondaryColor3us), + TABLE_ENTRY(SecondaryColor3usv), + TABLE_ENTRY(SecondaryColorPointer), + TABLE_ENTRY(MultiDrawArrays), + TABLE_ENTRY(MultiDrawElements), + TABLE_ENTRY(FogCoordPointer), + TABLE_ENTRY(FogCoordd), + TABLE_ENTRY(FogCoorddv), + TABLE_ENTRY(FogCoordf), + TABLE_ENTRY(FogCoordfv), + TABLE_ENTRY(BlendFuncSeparate), + TABLE_ENTRY(WindowPos2d), + TABLE_ENTRY(WindowPos2dARB), + TABLE_ENTRY(WindowPos2dv), + TABLE_ENTRY(WindowPos2dvARB), + TABLE_ENTRY(WindowPos2f), + TABLE_ENTRY(WindowPos2fARB), + TABLE_ENTRY(WindowPos2fv), + TABLE_ENTRY(WindowPos2fvARB), + TABLE_ENTRY(WindowPos2i), + TABLE_ENTRY(WindowPos2iARB), + TABLE_ENTRY(WindowPos2iv), + TABLE_ENTRY(WindowPos2ivARB), + TABLE_ENTRY(WindowPos2s), + TABLE_ENTRY(WindowPos2sARB), + TABLE_ENTRY(WindowPos2sv), + TABLE_ENTRY(WindowPos2svARB), + TABLE_ENTRY(WindowPos3d), + TABLE_ENTRY(WindowPos3dARB), + TABLE_ENTRY(WindowPos3dv), + TABLE_ENTRY(WindowPos3dvARB), + TABLE_ENTRY(WindowPos3f), + TABLE_ENTRY(WindowPos3fARB), + TABLE_ENTRY(WindowPos3fv), + TABLE_ENTRY(WindowPos3fvARB), + TABLE_ENTRY(WindowPos3i), + TABLE_ENTRY(WindowPos3iARB), + TABLE_ENTRY(WindowPos3iv), + TABLE_ENTRY(WindowPos3ivARB), + TABLE_ENTRY(WindowPos3s), + TABLE_ENTRY(WindowPos3sARB), + TABLE_ENTRY(WindowPos3sv), + TABLE_ENTRY(WindowPos3svARB), + TABLE_ENTRY(BindProgramARB), + TABLE_ENTRY(DeleteProgramsARB), + TABLE_ENTRY(GenProgramsARB), + TABLE_ENTRY(GetVertexAttribPointerv), + TABLE_ENTRY(GetVertexAttribPointervARB), + TABLE_ENTRY(IsProgramARB), + TABLE_ENTRY(PointParameteri), + TABLE_ENTRY(PointParameteriv), + TABLE_ENTRY(BlendEquationSeparate), +}; +#endif /*UNUSED_TABLE_NAME*/ + + +# undef KEYWORD1 +# undef KEYWORD1_ALT +# undef KEYWORD2 +# undef NAME +# undef DISPATCH +# undef RETURN_DISPATCH +# undef DISPATCH_TABLE_NAME +# undef UNUSED_TABLE_NAME +# undef TABLE_ENTRY +# undef HIDDEN diff --git a/GL/glx/glprocs.h b/GL/glx/glprocs.h new file mode 100644 index 000000000..5a99d505e --- /dev/null +++ b/GL/glx/glprocs.h @@ -0,0 +1,2260 @@ +/* DO NOT EDIT - This file generated automatically by gl_procs.py (from Mesa) script */ + +/* + * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * (C) Copyright IBM Corporation 2004, 2006 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL, IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + + +/* This file is only included by glapi.c and is used for + * the GetProcAddress() function + */ + +typedef struct { + GLint Name_offset; +#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) + _glapi_proc Address; +#endif + GLuint Offset; +} glprocs_table_t; + +#if !defined(NEED_FUNCTION_POINTER) && !defined(GLX_INDIRECT_RENDERING) +# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , o } +#elif defined(NEED_FUNCTION_POINTER) && !defined(GLX_INDIRECT_RENDERING) +# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f1 , o } +#elif defined(NEED_FUNCTION_POINTER) && defined(GLX_INDIRECT_RENDERING) +# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f2 , o } +#elif !defined(NEED_FUNCTION_POINTER) && defined(GLX_INDIRECT_RENDERING) +# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f3 , o } +#endif + + + +static const char gl_string_table[] = + "glNewList\0" + "glEndList\0" + "glCallList\0" + "glCallLists\0" + "glDeleteLists\0" + "glGenLists\0" + "glListBase\0" + "glBegin\0" + "glBitmap\0" + "glColor3b\0" + "glColor3bv\0" + "glColor3d\0" + "glColor3dv\0" + "glColor3f\0" + "glColor3fv\0" + "glColor3i\0" + "glColor3iv\0" + "glColor3s\0" + "glColor3sv\0" + "glColor3ub\0" + "glColor3ubv\0" + "glColor3ui\0" + "glColor3uiv\0" + "glColor3us\0" + "glColor3usv\0" + "glColor4b\0" + "glColor4bv\0" + "glColor4d\0" + "glColor4dv\0" + "glColor4f\0" + "glColor4fv\0" + "glColor4i\0" + "glColor4iv\0" + "glColor4s\0" + "glColor4sv\0" + "glColor4ub\0" + "glColor4ubv\0" + "glColor4ui\0" + "glColor4uiv\0" + "glColor4us\0" + "glColor4usv\0" + "glEdgeFlag\0" + "glEdgeFlagv\0" + "glEnd\0" + "glIndexd\0" + "glIndexdv\0" + "glIndexf\0" + "glIndexfv\0" + "glIndexi\0" + "glIndexiv\0" + "glIndexs\0" + "glIndexsv\0" + "glNormal3b\0" + "glNormal3bv\0" + "glNormal3d\0" + "glNormal3dv\0" + "glNormal3f\0" + "glNormal3fv\0" + "glNormal3i\0" + "glNormal3iv\0" + "glNormal3s\0" + "glNormal3sv\0" + "glRasterPos2d\0" + "glRasterPos2dv\0" + "glRasterPos2f\0" + "glRasterPos2fv\0" + "glRasterPos2i\0" + "glRasterPos2iv\0" + "glRasterPos2s\0" + "glRasterPos2sv\0" + "glRasterPos3d\0" + "glRasterPos3dv\0" + "glRasterPos3f\0" + "glRasterPos3fv\0" + "glRasterPos3i\0" + "glRasterPos3iv\0" + "glRasterPos3s\0" + "glRasterPos3sv\0" + "glRasterPos4d\0" + "glRasterPos4dv\0" + "glRasterPos4f\0" + "glRasterPos4fv\0" + "glRasterPos4i\0" + "glRasterPos4iv\0" + "glRasterPos4s\0" + "glRasterPos4sv\0" + "glRectd\0" + "glRectdv\0" + "glRectf\0" + "glRectfv\0" + "glRecti\0" + "glRectiv\0" + "glRects\0" + "glRectsv\0" + "glTexCoord1d\0" + "glTexCoord1dv\0" + "glTexCoord1f\0" + "glTexCoord1fv\0" + "glTexCoord1i\0" + "glTexCoord1iv\0" + "glTexCoord1s\0" + "glTexCoord1sv\0" + "glTexCoord2d\0" + "glTexCoord2dv\0" + "glTexCoord2f\0" + "glTexCoord2fv\0" + "glTexCoord2i\0" + "glTexCoord2iv\0" + "glTexCoord2s\0" + "glTexCoord2sv\0" + "glTexCoord3d\0" + "glTexCoord3dv\0" + "glTexCoord3f\0" + "glTexCoord3fv\0" + "glTexCoord3i\0" + "glTexCoord3iv\0" + "glTexCoord3s\0" + "glTexCoord3sv\0" + "glTexCoord4d\0" + "glTexCoord4dv\0" + "glTexCoord4f\0" + "glTexCoord4fv\0" + "glTexCoord4i\0" + "glTexCoord4iv\0" + "glTexCoord4s\0" + "glTexCoord4sv\0" + "glVertex2d\0" + "glVertex2dv\0" + "glVertex2f\0" + "glVertex2fv\0" + "glVertex2i\0" + "glVertex2iv\0" + "glVertex2s\0" + "glVertex2sv\0" + "glVertex3d\0" + "glVertex3dv\0" + "glVertex3f\0" + "glVertex3fv\0" + "glVertex3i\0" + "glVertex3iv\0" + "glVertex3s\0" + "glVertex3sv\0" + "glVertex4d\0" + "glVertex4dv\0" + "glVertex4f\0" + "glVertex4fv\0" + "glVertex4i\0" + "glVertex4iv\0" + "glVertex4s\0" + "glVertex4sv\0" + "glClipPlane\0" + "glColorMaterial\0" + "glCullFace\0" + "glFogf\0" + "glFogfv\0" + "glFogi\0" + "glFogiv\0" + "glFrontFace\0" + "glHint\0" + "glLightf\0" + "glLightfv\0" + "glLighti\0" + "glLightiv\0" + "glLightModelf\0" + "glLightModelfv\0" + "glLightModeli\0" + "glLightModeliv\0" + "glLineStipple\0" + "glLineWidth\0" + "glMaterialf\0" + "glMaterialfv\0" + "glMateriali\0" + "glMaterialiv\0" + "glPointSize\0" + "glPolygonMode\0" + "glPolygonStipple\0" + "glScissor\0" + "glShadeModel\0" + "glTexParameterf\0" + "glTexParameterfv\0" + "glTexParameteri\0" + "glTexParameteriv\0" + "glTexImage1D\0" + "glTexImage2D\0" + "glTexEnvf\0" + "glTexEnvfv\0" + "glTexEnvi\0" + "glTexEnviv\0" + "glTexGend\0" + "glTexGendv\0" + "glTexGenf\0" + "glTexGenfv\0" + "glTexGeni\0" + "glTexGeniv\0" + "glFeedbackBuffer\0" + "glSelectBuffer\0" + "glRenderMode\0" + "glInitNames\0" + "glLoadName\0" + "glPassThrough\0" + "glPopName\0" + "glPushName\0" + "glDrawBuffer\0" + "glClear\0" + "glClearAccum\0" + "glClearIndex\0" + "glClearColor\0" + "glClearStencil\0" + "glClearDepth\0" + "glStencilMask\0" + "glColorMask\0" + "glDepthMask\0" + "glIndexMask\0" + "glAccum\0" + "glDisable\0" + "glEnable\0" + "glFinish\0" + "glFlush\0" + "glPopAttrib\0" + "glPushAttrib\0" + "glMap1d\0" + "glMap1f\0" + "glMap2d\0" + "glMap2f\0" + "glMapGrid1d\0" + "glMapGrid1f\0" + "glMapGrid2d\0" + "glMapGrid2f\0" + "glEvalCoord1d\0" + "glEvalCoord1dv\0" + "glEvalCoord1f\0" + "glEvalCoord1fv\0" + "glEvalCoord2d\0" + "glEvalCoord2dv\0" + "glEvalCoord2f\0" + "glEvalCoord2fv\0" + "glEvalMesh1\0" + "glEvalPoint1\0" + "glEvalMesh2\0" + "glEvalPoint2\0" + "glAlphaFunc\0" + "glBlendFunc\0" + "glLogicOp\0" + "glStencilFunc\0" + "glStencilOp\0" + "glDepthFunc\0" + "glPixelZoom\0" + "glPixelTransferf\0" + "glPixelTransferi\0" + "glPixelStoref\0" + "glPixelStorei\0" + "glPixelMapfv\0" + "glPixelMapuiv\0" + "glPixelMapusv\0" + "glReadBuffer\0" + "glCopyPixels\0" + "glReadPixels\0" + "glDrawPixels\0" + "glGetBooleanv\0" + "glGetClipPlane\0" + "glGetDoublev\0" + "glGetError\0" + "glGetFloatv\0" + "glGetIntegerv\0" + "glGetLightfv\0" + "glGetLightiv\0" + "glGetMapdv\0" + "glGetMapfv\0" + "glGetMapiv\0" + "glGetMaterialfv\0" + "glGetMaterialiv\0" + "glGetPixelMapfv\0" + "glGetPixelMapuiv\0" + "glGetPixelMapusv\0" + "glGetPolygonStipple\0" + "glGetString\0" + "glGetTexEnvfv\0" + "glGetTexEnviv\0" + "glGetTexGendv\0" + "glGetTexGenfv\0" + "glGetTexGeniv\0" + "glGetTexImage\0" + "glGetTexParameterfv\0" + "glGetTexParameteriv\0" + "glGetTexLevelParameterfv\0" + "glGetTexLevelParameteriv\0" + "glIsEnabled\0" + "glIsList\0" + "glDepthRange\0" + "glFrustum\0" + "glLoadIdentity\0" + "glLoadMatrixf\0" + "glLoadMatrixd\0" + "glMatrixMode\0" + "glMultMatrixf\0" + "glMultMatrixd\0" + "glOrtho\0" + "glPopMatrix\0" + "glPushMatrix\0" + "glRotated\0" + "glRotatef\0" + "glScaled\0" + "glScalef\0" + "glTranslated\0" + "glTranslatef\0" + "glViewport\0" + "glArrayElement\0" + "glBindTexture\0" + "glColorPointer\0" + "glDisableClientState\0" + "glDrawArrays\0" + "glDrawElements\0" + "glEdgeFlagPointer\0" + "glEnableClientState\0" + "glIndexPointer\0" + "glIndexub\0" + "glIndexubv\0" + "glInterleavedArrays\0" + "glNormalPointer\0" + "glPolygonOffset\0" + "glTexCoordPointer\0" + "glVertexPointer\0" + "glAreTexturesResident\0" + "glCopyTexImage1D\0" + "glCopyTexImage2D\0" + "glCopyTexSubImage1D\0" + "glCopyTexSubImage2D\0" + "glDeleteTextures\0" + "glGenTextures\0" + "glGetPointerv\0" + "glIsTexture\0" + "glPrioritizeTextures\0" + "glTexSubImage1D\0" + "glTexSubImage2D\0" + "glPopClientAttrib\0" + "glPushClientAttrib\0" + "glBlendColor\0" + "glBlendEquation\0" + "glDrawRangeElements\0" + "glColorTable\0" + "glColorTableParameterfv\0" + "glColorTableParameteriv\0" + "glCopyColorTable\0" + "glGetColorTable\0" + "glGetColorTableParameterfv\0" + "glGetColorTableParameteriv\0" + "glColorSubTable\0" + "glCopyColorSubTable\0" + "glConvolutionFilter1D\0" + "glConvolutionFilter2D\0" + "glConvolutionParameterf\0" + "glConvolutionParameterfv\0" + "glConvolutionParameteri\0" + "glConvolutionParameteriv\0" + "glCopyConvolutionFilter1D\0" + "glCopyConvolutionFilter2D\0" + "glGetConvolutionFilter\0" + "glGetConvolutionParameterfv\0" + "glGetConvolutionParameteriv\0" + "glGetSeparableFilter\0" + "glSeparableFilter2D\0" + "glGetHistogram\0" + "glGetHistogramParameterfv\0" + "glGetHistogramParameteriv\0" + "glGetMinmax\0" + "glGetMinmaxParameterfv\0" + "glGetMinmaxParameteriv\0" + "glHistogram\0" + "glMinmax\0" + "glResetHistogram\0" + "glResetMinmax\0" + "glTexImage3D\0" + "glTexSubImage3D\0" + "glCopyTexSubImage3D\0" + "glActiveTextureARB\0" + "glClientActiveTextureARB\0" + "glMultiTexCoord1dARB\0" + "glMultiTexCoord1dvARB\0" + "glMultiTexCoord1fARB\0" + "glMultiTexCoord1fvARB\0" + "glMultiTexCoord1iARB\0" + "glMultiTexCoord1ivARB\0" + "glMultiTexCoord1sARB\0" + "glMultiTexCoord1svARB\0" + "glMultiTexCoord2dARB\0" + "glMultiTexCoord2dvARB\0" + "glMultiTexCoord2fARB\0" + "glMultiTexCoord2fvARB\0" + "glMultiTexCoord2iARB\0" + "glMultiTexCoord2ivARB\0" + "glMultiTexCoord2sARB\0" + "glMultiTexCoord2svARB\0" + "glMultiTexCoord3dARB\0" + "glMultiTexCoord3dvARB\0" + "glMultiTexCoord3fARB\0" + "glMultiTexCoord3fvARB\0" + "glMultiTexCoord3iARB\0" + "glMultiTexCoord3ivARB\0" + "glMultiTexCoord3sARB\0" + "glMultiTexCoord3svARB\0" + "glMultiTexCoord4dARB\0" + "glMultiTexCoord4dvARB\0" + "glMultiTexCoord4fARB\0" + "glMultiTexCoord4fvARB\0" + "glMultiTexCoord4iARB\0" + "glMultiTexCoord4ivARB\0" + "glMultiTexCoord4sARB\0" + "glMultiTexCoord4svARB\0" + "glAttachShader\0" + "glCreateProgram\0" + "glCreateShader\0" + "glDeleteProgram\0" + "glDeleteShader\0" + "glDetachShader\0" + "glGetAttachedShaders\0" + "glGetProgramInfoLog\0" + "glGetProgramiv\0" + "glGetShaderInfoLog\0" + "glGetShaderiv\0" + "glIsProgram\0" + "glIsShader\0" + "glStencilFuncSeparate\0" + "glStencilMaskSeparate\0" + "glStencilOpSeparate\0" + "glUniformMatrix2x3fv\0" + "glUniformMatrix2x4fv\0" + "glUniformMatrix3x2fv\0" + "glUniformMatrix3x4fv\0" + "glUniformMatrix4x2fv\0" + "glUniformMatrix4x3fv\0" + "glLoadTransposeMatrixdARB\0" + "glLoadTransposeMatrixfARB\0" + "glMultTransposeMatrixdARB\0" + "glMultTransposeMatrixfARB\0" + "glSampleCoverageARB\0" + "glCompressedTexImage1DARB\0" + "glCompressedTexImage2DARB\0" + "glCompressedTexImage3DARB\0" + "glCompressedTexSubImage1DARB\0" + "glCompressedTexSubImage2DARB\0" + "glCompressedTexSubImage3DARB\0" + "glGetCompressedTexImageARB\0" + "glDisableVertexAttribArrayARB\0" + "glEnableVertexAttribArrayARB\0" + "glGetProgramEnvParameterdvARB\0" + "glGetProgramEnvParameterfvARB\0" + "glGetProgramLocalParameterdvARB\0" + "glGetProgramLocalParameterfvARB\0" + "glGetProgramStringARB\0" + "glGetProgramivARB\0" + "glGetVertexAttribdvARB\0" + "glGetVertexAttribfvARB\0" + "glGetVertexAttribivARB\0" + "glProgramEnvParameter4dARB\0" + "glProgramEnvParameter4dvARB\0" + "glProgramEnvParameter4fARB\0" + "glProgramEnvParameter4fvARB\0" + "glProgramLocalParameter4dARB\0" + "glProgramLocalParameter4dvARB\0" + "glProgramLocalParameter4fARB\0" + "glProgramLocalParameter4fvARB\0" + "glProgramStringARB\0" + "glVertexAttrib1dARB\0" + "glVertexAttrib1dvARB\0" + "glVertexAttrib1fARB\0" + "glVertexAttrib1fvARB\0" + "glVertexAttrib1sARB\0" + "glVertexAttrib1svARB\0" + "glVertexAttrib2dARB\0" + "glVertexAttrib2dvARB\0" + "glVertexAttrib2fARB\0" + "glVertexAttrib2fvARB\0" + "glVertexAttrib2sARB\0" + "glVertexAttrib2svARB\0" + "glVertexAttrib3dARB\0" + "glVertexAttrib3dvARB\0" + "glVertexAttrib3fARB\0" + "glVertexAttrib3fvARB\0" + "glVertexAttrib3sARB\0" + "glVertexAttrib3svARB\0" + "glVertexAttrib4NbvARB\0" + "glVertexAttrib4NivARB\0" + "glVertexAttrib4NsvARB\0" + "glVertexAttrib4NubARB\0" + "glVertexAttrib4NubvARB\0" + "glVertexAttrib4NuivARB\0" + "glVertexAttrib4NusvARB\0" + "glVertexAttrib4bvARB\0" + "glVertexAttrib4dARB\0" + "glVertexAttrib4dvARB\0" + "glVertexAttrib4fARB\0" + "glVertexAttrib4fvARB\0" + "glVertexAttrib4ivARB\0" + "glVertexAttrib4sARB\0" + "glVertexAttrib4svARB\0" + "glVertexAttrib4ubvARB\0" + "glVertexAttrib4uivARB\0" + "glVertexAttrib4usvARB\0" + "glVertexAttribPointerARB\0" + "glBindBufferARB\0" + "glBufferDataARB\0" + "glBufferSubDataARB\0" + "glDeleteBuffersARB\0" + "glGenBuffersARB\0" + "glGetBufferParameterivARB\0" + "glGetBufferPointervARB\0" + "glGetBufferSubDataARB\0" + "glIsBufferARB\0" + "glMapBufferARB\0" + "glUnmapBufferARB\0" + "glBeginQueryARB\0" + "glDeleteQueriesARB\0" + "glEndQueryARB\0" + "glGenQueriesARB\0" + "glGetQueryObjectivARB\0" + "glGetQueryObjectuivARB\0" + "glGetQueryivARB\0" + "glIsQueryARB\0" + "glAttachObjectARB\0" + "glCompileShaderARB\0" + "glCreateProgramObjectARB\0" + "glCreateShaderObjectARB\0" + "glDeleteObjectARB\0" + "glDetachObjectARB\0" + "glGetActiveUniformARB\0" + "glGetAttachedObjectsARB\0" + "glGetHandleARB\0" + "glGetInfoLogARB\0" + "glGetObjectParameterfvARB\0" + "glGetObjectParameterivARB\0" + "glGetShaderSourceARB\0" + "glGetUniformLocationARB\0" + "glGetUniformfvARB\0" + "glGetUniformivARB\0" + "glLinkProgramARB\0" + "glShaderSourceARB\0" + "glUniform1fARB\0" + "glUniform1fvARB\0" + "glUniform1iARB\0" + "glUniform1ivARB\0" + "glUniform2fARB\0" + "glUniform2fvARB\0" + "glUniform2iARB\0" + "glUniform2ivARB\0" + "glUniform3fARB\0" + "glUniform3fvARB\0" + "glUniform3iARB\0" + "glUniform3ivARB\0" + "glUniform4fARB\0" + "glUniform4fvARB\0" + "glUniform4iARB\0" + "glUniform4ivARB\0" + "glUniformMatrix2fvARB\0" + "glUniformMatrix3fvARB\0" + "glUniformMatrix4fvARB\0" + "glUseProgramObjectARB\0" + "glValidateProgramARB\0" + "glBindAttribLocationARB\0" + "glGetActiveAttribARB\0" + "glGetAttribLocationARB\0" + "glDrawBuffersARB\0" + "glPolygonOffsetEXT\0" + "glGetPixelTexGenParameterfvSGIS\0" + "glGetPixelTexGenParameterivSGIS\0" + "glPixelTexGenParameterfSGIS\0" + "glPixelTexGenParameterfvSGIS\0" + "glPixelTexGenParameteriSGIS\0" + "glPixelTexGenParameterivSGIS\0" + "glSampleMaskSGIS\0" + "glSamplePatternSGIS\0" + "glColorPointerEXT\0" + "glEdgeFlagPointerEXT\0" + "glIndexPointerEXT\0" + "glNormalPointerEXT\0" + "glTexCoordPointerEXT\0" + "glVertexPointerEXT\0" + "glPointParameterfEXT\0" + "glPointParameterfvEXT\0" + "glLockArraysEXT\0" + "glUnlockArraysEXT\0" + "glCullParameterdvEXT\0" + "glCullParameterfvEXT\0" + "glSecondaryColor3bEXT\0" + "glSecondaryColor3bvEXT\0" + "glSecondaryColor3dEXT\0" + "glSecondaryColor3dvEXT\0" + "glSecondaryColor3fEXT\0" + "glSecondaryColor3fvEXT\0" + "glSecondaryColor3iEXT\0" + "glSecondaryColor3ivEXT\0" + "glSecondaryColor3sEXT\0" + "glSecondaryColor3svEXT\0" + "glSecondaryColor3ubEXT\0" + "glSecondaryColor3ubvEXT\0" + "glSecondaryColor3uiEXT\0" + "glSecondaryColor3uivEXT\0" + "glSecondaryColor3usEXT\0" + "glSecondaryColor3usvEXT\0" + "glSecondaryColorPointerEXT\0" + "glMultiDrawArraysEXT\0" + "glMultiDrawElementsEXT\0" + "glFogCoordPointerEXT\0" + "glFogCoorddEXT\0" + "glFogCoorddvEXT\0" + "glFogCoordfEXT\0" + "glFogCoordfvEXT\0" + "glPixelTexGenSGIX\0" + "glBlendFuncSeparateEXT\0" + "glFlushVertexArrayRangeNV\0" + "glVertexArrayRangeNV\0" + "glCombinerInputNV\0" + "glCombinerOutputNV\0" + "glCombinerParameterfNV\0" + "glCombinerParameterfvNV\0" + "glCombinerParameteriNV\0" + "glCombinerParameterivNV\0" + "glFinalCombinerInputNV\0" + "glGetCombinerInputParameterfvNV\0" + "glGetCombinerInputParameterivNV\0" + "glGetCombinerOutputParameterfvNV\0" + "glGetCombinerOutputParameterivNV\0" + "glGetFinalCombinerInputParameterfvNV\0" + "glGetFinalCombinerInputParameterivNV\0" + "glResizeBuffersMESA\0" + "glWindowPos2dMESA\0" + "glWindowPos2dvMESA\0" + "glWindowPos2fMESA\0" + "glWindowPos2fvMESA\0" + "glWindowPos2iMESA\0" + "glWindowPos2ivMESA\0" + "glWindowPos2sMESA\0" + "glWindowPos2svMESA\0" + "glWindowPos3dMESA\0" + "glWindowPos3dvMESA\0" + "glWindowPos3fMESA\0" + "glWindowPos3fvMESA\0" + "glWindowPos3iMESA\0" + "glWindowPos3ivMESA\0" + "glWindowPos3sMESA\0" + "glWindowPos3svMESA\0" + "glWindowPos4dMESA\0" + "glWindowPos4dvMESA\0" + "glWindowPos4fMESA\0" + "glWindowPos4fvMESA\0" + "glWindowPos4iMESA\0" + "glWindowPos4ivMESA\0" + "glWindowPos4sMESA\0" + "glWindowPos4svMESA\0" + "glMultiModeDrawArraysIBM\0" + "glMultiModeDrawElementsIBM\0" + "glDeleteFencesNV\0" + "glFinishFenceNV\0" + "glGenFencesNV\0" + "glGetFenceivNV\0" + "glIsFenceNV\0" + "glSetFenceNV\0" + "glTestFenceNV\0" + "glAreProgramsResidentNV\0" + "glBindProgramNV\0" + "glDeleteProgramsNV\0" + "glExecuteProgramNV\0" + "glGenProgramsNV\0" + "glGetProgramParameterdvNV\0" + "glGetProgramParameterfvNV\0" + "glGetProgramStringNV\0" + "glGetProgramivNV\0" + "glGetTrackMatrixivNV\0" + "glGetVertexAttribPointervNV\0" + "glGetVertexAttribdvNV\0" + "glGetVertexAttribfvNV\0" + "glGetVertexAttribivNV\0" + "glIsProgramNV\0" + "glLoadProgramNV\0" + "glProgramParameters4dvNV\0" + "glProgramParameters4fvNV\0" + "glRequestResidentProgramsNV\0" + "glTrackMatrixNV\0" + "glVertexAttrib1dNV\0" + "glVertexAttrib1dvNV\0" + "glVertexAttrib1fNV\0" + "glVertexAttrib1fvNV\0" + "glVertexAttrib1sNV\0" + "glVertexAttrib1svNV\0" + "glVertexAttrib2dNV\0" + "glVertexAttrib2dvNV\0" + "glVertexAttrib2fNV\0" + "glVertexAttrib2fvNV\0" + "glVertexAttrib2sNV\0" + "glVertexAttrib2svNV\0" + "glVertexAttrib3dNV\0" + "glVertexAttrib3dvNV\0" + "glVertexAttrib3fNV\0" + "glVertexAttrib3fvNV\0" + "glVertexAttrib3sNV\0" + "glVertexAttrib3svNV\0" + "glVertexAttrib4dNV\0" + "glVertexAttrib4dvNV\0" + "glVertexAttrib4fNV\0" + "glVertexAttrib4fvNV\0" + "glVertexAttrib4sNV\0" + "glVertexAttrib4svNV\0" + "glVertexAttrib4ubNV\0" + "glVertexAttrib4ubvNV\0" + "glVertexAttribPointerNV\0" + "glVertexAttribs1dvNV\0" + "glVertexAttribs1fvNV\0" + "glVertexAttribs1svNV\0" + "glVertexAttribs2dvNV\0" + "glVertexAttribs2fvNV\0" + "glVertexAttribs2svNV\0" + "glVertexAttribs3dvNV\0" + "glVertexAttribs3fvNV\0" + "glVertexAttribs3svNV\0" + "glVertexAttribs4dvNV\0" + "glVertexAttribs4fvNV\0" + "glVertexAttribs4svNV\0" + "glVertexAttribs4ubvNV\0" + "glAlphaFragmentOp1ATI\0" + "glAlphaFragmentOp2ATI\0" + "glAlphaFragmentOp3ATI\0" + "glBeginFragmentShaderATI\0" + "glBindFragmentShaderATI\0" + "glColorFragmentOp1ATI\0" + "glColorFragmentOp2ATI\0" + "glColorFragmentOp3ATI\0" + "glDeleteFragmentShaderATI\0" + "glEndFragmentShaderATI\0" + "glGenFragmentShadersATI\0" + "glPassTexCoordATI\0" + "glSampleMapATI\0" + "glSetFragmentShaderConstantATI\0" + "glPointParameteriNV\0" + "glPointParameterivNV\0" + "glActiveStencilFaceEXT\0" + "glBindVertexArrayAPPLE\0" + "glDeleteVertexArraysAPPLE\0" + "glGenVertexArraysAPPLE\0" + "glIsVertexArrayAPPLE\0" + "glGetProgramNamedParameterdvNV\0" + "glGetProgramNamedParameterfvNV\0" + "glProgramNamedParameter4dNV\0" + "glProgramNamedParameter4dvNV\0" + "glProgramNamedParameter4fNV\0" + "glProgramNamedParameter4fvNV\0" + "glDepthBoundsEXT\0" + "glBlendEquationSeparateEXT\0" + "glBindFramebufferEXT\0" + "glBindRenderbufferEXT\0" + "glCheckFramebufferStatusEXT\0" + "glDeleteFramebuffersEXT\0" + "glDeleteRenderbuffersEXT\0" + "glFramebufferRenderbufferEXT\0" + "glFramebufferTexture1DEXT\0" + "glFramebufferTexture2DEXT\0" + "glFramebufferTexture3DEXT\0" + "glGenFramebuffersEXT\0" + "glGenRenderbuffersEXT\0" + "glGenerateMipmapEXT\0" + "glGetFramebufferAttachmentParameterivEXT\0" + "glGetRenderbufferParameterivEXT\0" + "glIsFramebufferEXT\0" + "glIsRenderbufferEXT\0" + "glRenderbufferStorageEXT\0" + "glBlitFramebufferEXT\0" + "glFramebufferTextureLayerEXT\0" + "glStencilFuncSeparateATI\0" + "glProgramEnvParameters4fvEXT\0" + "glProgramLocalParameters4fvEXT\0" + "glGetQueryObjecti64vEXT\0" + "glGetQueryObjectui64vEXT\0" + "glArrayElementEXT\0" + "glBindTextureEXT\0" + "glDrawArraysEXT\0" + "glAreTexturesResidentEXT\0" + "glCopyTexImage1DEXT\0" + "glCopyTexImage2DEXT\0" + "glCopyTexSubImage1DEXT\0" + "glCopyTexSubImage2DEXT\0" + "glDeleteTexturesEXT\0" + "glGenTexturesEXT\0" + "glGetPointervEXT\0" + "glIsTextureEXT\0" + "glPrioritizeTexturesEXT\0" + "glTexSubImage1DEXT\0" + "glTexSubImage2DEXT\0" + "glBlendColorEXT\0" + "glBlendEquationEXT\0" + "glDrawRangeElementsEXT\0" + "glColorTableSGI\0" + "glColorTableEXT\0" + "glColorTableParameterfvSGI\0" + "glColorTableParameterivSGI\0" + "glCopyColorTableSGI\0" + "glGetColorTableSGI\0" + "glGetColorTableEXT\0" + "glGetColorTableParameterfvSGI\0" + "glGetColorTableParameterfvEXT\0" + "glGetColorTableParameterivSGI\0" + "glGetColorTableParameterivEXT\0" + "glColorSubTableEXT\0" + "glCopyColorSubTableEXT\0" + "glConvolutionFilter1DEXT\0" + "glConvolutionFilter2DEXT\0" + "glConvolutionParameterfEXT\0" + "glConvolutionParameterfvEXT\0" + "glConvolutionParameteriEXT\0" + "glConvolutionParameterivEXT\0" + "glCopyConvolutionFilter1DEXT\0" + "glCopyConvolutionFilter2DEXT\0" + "glGetConvolutionFilterEXT\0" + "glGetConvolutionParameterfvEXT\0" + "glGetConvolutionParameterivEXT\0" + "glGetSeparableFilterEXT\0" + "glSeparableFilter2DEXT\0" + "glGetHistogramEXT\0" + "glGetHistogramParameterfvEXT\0" + "glGetHistogramParameterivEXT\0" + "glGetMinmaxEXT\0" + "glGetMinmaxParameterfvEXT\0" + "glGetMinmaxParameterivEXT\0" + "glHistogramEXT\0" + "glMinmaxEXT\0" + "glResetHistogramEXT\0" + "glResetMinmaxEXT\0" + "glTexImage3DEXT\0" + "glTexSubImage3DEXT\0" + "glCopyTexSubImage3DEXT\0" + "glActiveTexture\0" + "glClientActiveTexture\0" + "glMultiTexCoord1d\0" + "glMultiTexCoord1dv\0" + "glMultiTexCoord1f\0" + "glMultiTexCoord1fv\0" + "glMultiTexCoord1i\0" + "glMultiTexCoord1iv\0" + "glMultiTexCoord1s\0" + "glMultiTexCoord1sv\0" + "glMultiTexCoord2d\0" + "glMultiTexCoord2dv\0" + "glMultiTexCoord2f\0" + "glMultiTexCoord2fv\0" + "glMultiTexCoord2i\0" + "glMultiTexCoord2iv\0" + "glMultiTexCoord2s\0" + "glMultiTexCoord2sv\0" + "glMultiTexCoord3d\0" + "glMultiTexCoord3dv\0" + "glMultiTexCoord3f\0" + "glMultiTexCoord3fv\0" + "glMultiTexCoord3i\0" + "glMultiTexCoord3iv\0" + "glMultiTexCoord3s\0" + "glMultiTexCoord3sv\0" + "glMultiTexCoord4d\0" + "glMultiTexCoord4dv\0" + "glMultiTexCoord4f\0" + "glMultiTexCoord4fv\0" + "glMultiTexCoord4i\0" + "glMultiTexCoord4iv\0" + "glMultiTexCoord4s\0" + "glMultiTexCoord4sv\0" + "glStencilOpSeparateATI\0" + "glLoadTransposeMatrixd\0" + "glLoadTransposeMatrixf\0" + "glMultTransposeMatrixd\0" + "glMultTransposeMatrixf\0" + "glSampleCoverage\0" + "glCompressedTexImage1D\0" + "glCompressedTexImage2D\0" + "glCompressedTexImage3D\0" + "glCompressedTexSubImage1D\0" + "glCompressedTexSubImage2D\0" + "glCompressedTexSubImage3D\0" + "glGetCompressedTexImage\0" + "glDisableVertexAttribArray\0" + "glEnableVertexAttribArray\0" + "glGetVertexAttribdv\0" + "glGetVertexAttribfv\0" + "glGetVertexAttribiv\0" + "glProgramParameter4dNV\0" + "glProgramParameter4dvNV\0" + "glProgramParameter4fNV\0" + "glProgramParameter4fvNV\0" + "glVertexAttrib1d\0" + "glVertexAttrib1dv\0" + "glVertexAttrib1f\0" + "glVertexAttrib1fv\0" + "glVertexAttrib1s\0" + "glVertexAttrib1sv\0" + "glVertexAttrib2d\0" + "glVertexAttrib2dv\0" + "glVertexAttrib2f\0" + "glVertexAttrib2fv\0" + "glVertexAttrib2s\0" + "glVertexAttrib2sv\0" + "glVertexAttrib3d\0" + "glVertexAttrib3dv\0" + "glVertexAttrib3f\0" + "glVertexAttrib3fv\0" + "glVertexAttrib3s\0" + "glVertexAttrib3sv\0" + "glVertexAttrib4Nbv\0" + "glVertexAttrib4Niv\0" + "glVertexAttrib4Nsv\0" + "glVertexAttrib4Nub\0" + "glVertexAttrib4Nubv\0" + "glVertexAttrib4Nuiv\0" + "glVertexAttrib4Nusv\0" + "glVertexAttrib4bv\0" + "glVertexAttrib4d\0" + "glVertexAttrib4dv\0" + "glVertexAttrib4f\0" + "glVertexAttrib4fv\0" + "glVertexAttrib4iv\0" + "glVertexAttrib4s\0" + "glVertexAttrib4sv\0" + "glVertexAttrib4ubv\0" + "glVertexAttrib4uiv\0" + "glVertexAttrib4usv\0" + "glVertexAttribPointer\0" + "glBindBuffer\0" + "glBufferData\0" + "glBufferSubData\0" + "glDeleteBuffers\0" + "glGenBuffers\0" + "glGetBufferParameteriv\0" + "glGetBufferPointerv\0" + "glGetBufferSubData\0" + "glIsBuffer\0" + "glMapBuffer\0" + "glUnmapBuffer\0" + "glBeginQuery\0" + "glDeleteQueries\0" + "glEndQuery\0" + "glGenQueries\0" + "glGetQueryObjectiv\0" + "glGetQueryObjectuiv\0" + "glGetQueryiv\0" + "glIsQuery\0" + "glCompileShader\0" + "glGetActiveUniform\0" + "glGetShaderSource\0" + "glGetUniformLocation\0" + "glGetUniformfv\0" + "glGetUniformiv\0" + "glLinkProgram\0" + "glShaderSource\0" + "glUniform1f\0" + "glUniform1fv\0" + "glUniform1i\0" + "glUniform1iv\0" + "glUniform2f\0" + "glUniform2fv\0" + "glUniform2i\0" + "glUniform2iv\0" + "glUniform3f\0" + "glUniform3fv\0" + "glUniform3i\0" + "glUniform3iv\0" + "glUniform4f\0" + "glUniform4fv\0" + "glUniform4i\0" + "glUniform4iv\0" + "glUniformMatrix2fv\0" + "glUniformMatrix3fv\0" + "glUniformMatrix4fv\0" + "glUseProgram\0" + "glValidateProgram\0" + "glBindAttribLocation\0" + "glGetActiveAttrib\0" + "glGetAttribLocation\0" + "glDrawBuffers\0" + "glDrawBuffersATI\0" + "glSampleMaskEXT\0" + "glSamplePatternEXT\0" + "glPointParameterf\0" + "glPointParameterfARB\0" + "glPointParameterfSGIS\0" + "glPointParameterfv\0" + "glPointParameterfvARB\0" + "glPointParameterfvSGIS\0" + "glSecondaryColor3b\0" + "glSecondaryColor3bv\0" + "glSecondaryColor3d\0" + "glSecondaryColor3dv\0" + "glSecondaryColor3f\0" + "glSecondaryColor3fv\0" + "glSecondaryColor3i\0" + "glSecondaryColor3iv\0" + "glSecondaryColor3s\0" + "glSecondaryColor3sv\0" + "glSecondaryColor3ub\0" + "glSecondaryColor3ubv\0" + "glSecondaryColor3ui\0" + "glSecondaryColor3uiv\0" + "glSecondaryColor3us\0" + "glSecondaryColor3usv\0" + "glSecondaryColorPointer\0" + "glMultiDrawArrays\0" + "glMultiDrawElements\0" + "glFogCoordPointer\0" + "glFogCoordd\0" + "glFogCoorddv\0" + "glFogCoordf\0" + "glFogCoordfv\0" + "glBlendFuncSeparate\0" + "glBlendFuncSeparateINGR\0" + "glWindowPos2d\0" + "glWindowPos2dARB\0" + "glWindowPos2dv\0" + "glWindowPos2dvARB\0" + "glWindowPos2f\0" + "glWindowPos2fARB\0" + "glWindowPos2fv\0" + "glWindowPos2fvARB\0" + "glWindowPos2i\0" + "glWindowPos2iARB\0" + "glWindowPos2iv\0" + "glWindowPos2ivARB\0" + "glWindowPos2s\0" + "glWindowPos2sARB\0" + "glWindowPos2sv\0" + "glWindowPos2svARB\0" + "glWindowPos3d\0" + "glWindowPos3dARB\0" + "glWindowPos3dv\0" + "glWindowPos3dvARB\0" + "glWindowPos3f\0" + "glWindowPos3fARB\0" + "glWindowPos3fv\0" + "glWindowPos3fvARB\0" + "glWindowPos3i\0" + "glWindowPos3iARB\0" + "glWindowPos3iv\0" + "glWindowPos3ivARB\0" + "glWindowPos3s\0" + "glWindowPos3sARB\0" + "glWindowPos3sv\0" + "glWindowPos3svARB\0" + "glBindProgramARB\0" + "glDeleteProgramsARB\0" + "glGenProgramsARB\0" + "glGetVertexAttribPointerv\0" + "glGetVertexAttribPointervARB\0" + "glIsProgramARB\0" + "glPointParameteri\0" + "glPointParameteriv\0" + "glBlendEquationSeparate\0" + "glBlendEquationSeparateATI\0" + ; + + +#ifdef USE_MGL_NAMESPACE +#define gl_dispatch_stub_343 mgl_dispatch_stub_343 +#define gl_dispatch_stub_344 mgl_dispatch_stub_344 +#define gl_dispatch_stub_345 mgl_dispatch_stub_345 +#define gl_dispatch_stub_356 mgl_dispatch_stub_356 +#define gl_dispatch_stub_357 mgl_dispatch_stub_357 +#define gl_dispatch_stub_358 mgl_dispatch_stub_358 +#define gl_dispatch_stub_359 mgl_dispatch_stub_359 +#define gl_dispatch_stub_361 mgl_dispatch_stub_361 +#define gl_dispatch_stub_362 mgl_dispatch_stub_362 +#define gl_dispatch_stub_363 mgl_dispatch_stub_363 +#define gl_dispatch_stub_364 mgl_dispatch_stub_364 +#define gl_dispatch_stub_365 mgl_dispatch_stub_365 +#define gl_dispatch_stub_366 mgl_dispatch_stub_366 +#define gl_dispatch_stub_562 mgl_dispatch_stub_562 +#define gl_dispatch_stub_563 mgl_dispatch_stub_563 +#define gl_dispatch_stub_564 mgl_dispatch_stub_564 +#define gl_dispatch_stub_565 mgl_dispatch_stub_565 +#define gl_dispatch_stub_566 mgl_dispatch_stub_566 +#define gl_dispatch_stub_567 mgl_dispatch_stub_567 +#define gl_dispatch_stub_568 mgl_dispatch_stub_568 +#define gl_dispatch_stub_569 mgl_dispatch_stub_569 +#define gl_dispatch_stub_580 mgl_dispatch_stub_580 +#define gl_dispatch_stub_581 mgl_dispatch_stub_581 +#define gl_dispatch_stub_606 mgl_dispatch_stub_606 +#define gl_dispatch_stub_648 mgl_dispatch_stub_648 +#define gl_dispatch_stub_649 mgl_dispatch_stub_649 +#define gl_dispatch_stub_650 mgl_dispatch_stub_650 +#define gl_dispatch_stub_651 mgl_dispatch_stub_651 +#define gl_dispatch_stub_652 mgl_dispatch_stub_652 +#define gl_dispatch_stub_653 mgl_dispatch_stub_653 +#define gl_dispatch_stub_654 mgl_dispatch_stub_654 +#define gl_dispatch_stub_655 mgl_dispatch_stub_655 +#define gl_dispatch_stub_656 mgl_dispatch_stub_656 +#define gl_dispatch_stub_733 mgl_dispatch_stub_733 +#define gl_dispatch_stub_734 mgl_dispatch_stub_734 +#define gl_dispatch_stub_735 mgl_dispatch_stub_735 +#define gl_dispatch_stub_736 mgl_dispatch_stub_736 +#define gl_dispatch_stub_737 mgl_dispatch_stub_737 +#define gl_dispatch_stub_744 mgl_dispatch_stub_744 +#define gl_dispatch_stub_745 mgl_dispatch_stub_745 +#define gl_dispatch_stub_763 mgl_dispatch_stub_763 +#define gl_dispatch_stub_765 mgl_dispatch_stub_765 +#define gl_dispatch_stub_766 mgl_dispatch_stub_766 +#define gl_dispatch_stub_767 mgl_dispatch_stub_767 +#define gl_dispatch_stub_768 mgl_dispatch_stub_768 +#define gl_dispatch_stub_769 mgl_dispatch_stub_769 +#endif /* USE_MGL_NAMESPACE */ + + +/* FIXME: Having these (incorrect) prototypes here is ugly. */ +#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) +extern void gl_dispatch_stub_343(void); +extern void gl_dispatch_stub_344(void); +extern void gl_dispatch_stub_345(void); +extern void gl_dispatch_stub_356(void); +extern void gl_dispatch_stub_357(void); +extern void gl_dispatch_stub_358(void); +extern void gl_dispatch_stub_359(void); +extern void gl_dispatch_stub_361(void); +extern void gl_dispatch_stub_362(void); +extern void gl_dispatch_stub_363(void); +extern void gl_dispatch_stub_364(void); +extern void gl_dispatch_stub_365(void); +extern void gl_dispatch_stub_366(void); +extern void gl_dispatch_stub_562(void); +extern void gl_dispatch_stub_563(void); +extern void gl_dispatch_stub_564(void); +extern void gl_dispatch_stub_565(void); +extern void gl_dispatch_stub_566(void); +extern void gl_dispatch_stub_567(void); +extern void gl_dispatch_stub_568(void); +extern void gl_dispatch_stub_569(void); +extern void gl_dispatch_stub_580(void); +extern void gl_dispatch_stub_581(void); +extern void gl_dispatch_stub_606(void); +extern void gl_dispatch_stub_648(void); +extern void gl_dispatch_stub_649(void); +extern void gl_dispatch_stub_650(void); +extern void gl_dispatch_stub_651(void); +extern void gl_dispatch_stub_652(void); +extern void gl_dispatch_stub_653(void); +extern void gl_dispatch_stub_654(void); +extern void gl_dispatch_stub_655(void); +extern void gl_dispatch_stub_656(void); +extern void gl_dispatch_stub_733(void); +extern void gl_dispatch_stub_734(void); +extern void gl_dispatch_stub_735(void); +extern void gl_dispatch_stub_736(void); +extern void gl_dispatch_stub_737(void); +extern void gl_dispatch_stub_744(void); +extern void gl_dispatch_stub_745(void); +extern void gl_dispatch_stub_763(void); +extern void gl_dispatch_stub_765(void); +extern void gl_dispatch_stub_766(void); +extern void gl_dispatch_stub_767(void); +extern void gl_dispatch_stub_768(void); +extern void gl_dispatch_stub_769(void); +#endif /* defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) */ + +static const glprocs_table_t static_functions[] = { + NAME_FUNC_OFFSET( 0, glNewList, glNewList, NULL, _gloffset_NewList), + NAME_FUNC_OFFSET( 10, glEndList, glEndList, NULL, _gloffset_EndList), + NAME_FUNC_OFFSET( 20, glCallList, glCallList, NULL, _gloffset_CallList), + NAME_FUNC_OFFSET( 31, glCallLists, glCallLists, NULL, _gloffset_CallLists), + NAME_FUNC_OFFSET( 43, glDeleteLists, glDeleteLists, NULL, _gloffset_DeleteLists), + NAME_FUNC_OFFSET( 57, glGenLists, glGenLists, NULL, _gloffset_GenLists), + NAME_FUNC_OFFSET( 68, glListBase, glListBase, NULL, _gloffset_ListBase), + NAME_FUNC_OFFSET( 79, glBegin, glBegin, NULL, _gloffset_Begin), + NAME_FUNC_OFFSET( 87, glBitmap, glBitmap, NULL, _gloffset_Bitmap), + NAME_FUNC_OFFSET( 96, glColor3b, glColor3b, NULL, _gloffset_Color3b), + NAME_FUNC_OFFSET( 106, glColor3bv, glColor3bv, NULL, _gloffset_Color3bv), + NAME_FUNC_OFFSET( 117, glColor3d, glColor3d, NULL, _gloffset_Color3d), + NAME_FUNC_OFFSET( 127, glColor3dv, glColor3dv, NULL, _gloffset_Color3dv), + NAME_FUNC_OFFSET( 138, glColor3f, glColor3f, NULL, _gloffset_Color3f), + NAME_FUNC_OFFSET( 148, glColor3fv, glColor3fv, NULL, _gloffset_Color3fv), + NAME_FUNC_OFFSET( 159, glColor3i, glColor3i, NULL, _gloffset_Color3i), + NAME_FUNC_OFFSET( 169, glColor3iv, glColor3iv, NULL, _gloffset_Color3iv), + NAME_FUNC_OFFSET( 180, glColor3s, glColor3s, NULL, _gloffset_Color3s), + NAME_FUNC_OFFSET( 190, glColor3sv, glColor3sv, NULL, _gloffset_Color3sv), + NAME_FUNC_OFFSET( 201, glColor3ub, glColor3ub, NULL, _gloffset_Color3ub), + NAME_FUNC_OFFSET( 212, glColor3ubv, glColor3ubv, NULL, _gloffset_Color3ubv), + NAME_FUNC_OFFSET( 224, glColor3ui, glColor3ui, NULL, _gloffset_Color3ui), + NAME_FUNC_OFFSET( 235, glColor3uiv, glColor3uiv, NULL, _gloffset_Color3uiv), + NAME_FUNC_OFFSET( 247, glColor3us, glColor3us, NULL, _gloffset_Color3us), + NAME_FUNC_OFFSET( 258, glColor3usv, glColor3usv, NULL, _gloffset_Color3usv), + NAME_FUNC_OFFSET( 270, glColor4b, glColor4b, NULL, _gloffset_Color4b), + NAME_FUNC_OFFSET( 280, glColor4bv, glColor4bv, NULL, _gloffset_Color4bv), + NAME_FUNC_OFFSET( 291, glColor4d, glColor4d, NULL, _gloffset_Color4d), + NAME_FUNC_OFFSET( 301, glColor4dv, glColor4dv, NULL, _gloffset_Color4dv), + NAME_FUNC_OFFSET( 312, glColor4f, glColor4f, NULL, _gloffset_Color4f), + NAME_FUNC_OFFSET( 322, glColor4fv, glColor4fv, NULL, _gloffset_Color4fv), + NAME_FUNC_OFFSET( 333, glColor4i, glColor4i, NULL, _gloffset_Color4i), + NAME_FUNC_OFFSET( 343, glColor4iv, glColor4iv, NULL, _gloffset_Color4iv), + NAME_FUNC_OFFSET( 354, glColor4s, glColor4s, NULL, _gloffset_Color4s), + NAME_FUNC_OFFSET( 364, glColor4sv, glColor4sv, NULL, _gloffset_Color4sv), + NAME_FUNC_OFFSET( 375, glColor4ub, glColor4ub, NULL, _gloffset_Color4ub), + NAME_FUNC_OFFSET( 386, glColor4ubv, glColor4ubv, NULL, _gloffset_Color4ubv), + NAME_FUNC_OFFSET( 398, glColor4ui, glColor4ui, NULL, _gloffset_Color4ui), + NAME_FUNC_OFFSET( 409, glColor4uiv, glColor4uiv, NULL, _gloffset_Color4uiv), + NAME_FUNC_OFFSET( 421, glColor4us, glColor4us, NULL, _gloffset_Color4us), + NAME_FUNC_OFFSET( 432, glColor4usv, glColor4usv, NULL, _gloffset_Color4usv), + NAME_FUNC_OFFSET( 444, glEdgeFlag, glEdgeFlag, NULL, _gloffset_EdgeFlag), + NAME_FUNC_OFFSET( 455, glEdgeFlagv, glEdgeFlagv, NULL, _gloffset_EdgeFlagv), + NAME_FUNC_OFFSET( 467, glEnd, glEnd, NULL, _gloffset_End), + NAME_FUNC_OFFSET( 473, glIndexd, glIndexd, NULL, _gloffset_Indexd), + NAME_FUNC_OFFSET( 482, glIndexdv, glIndexdv, NULL, _gloffset_Indexdv), + NAME_FUNC_OFFSET( 492, glIndexf, glIndexf, NULL, _gloffset_Indexf), + NAME_FUNC_OFFSET( 501, glIndexfv, glIndexfv, NULL, _gloffset_Indexfv), + NAME_FUNC_OFFSET( 511, glIndexi, glIndexi, NULL, _gloffset_Indexi), + NAME_FUNC_OFFSET( 520, glIndexiv, glIndexiv, NULL, _gloffset_Indexiv), + NAME_FUNC_OFFSET( 530, glIndexs, glIndexs, NULL, _gloffset_Indexs), + NAME_FUNC_OFFSET( 539, glIndexsv, glIndexsv, NULL, _gloffset_Indexsv), + NAME_FUNC_OFFSET( 549, glNormal3b, glNormal3b, NULL, _gloffset_Normal3b), + NAME_FUNC_OFFSET( 560, glNormal3bv, glNormal3bv, NULL, _gloffset_Normal3bv), + NAME_FUNC_OFFSET( 572, glNormal3d, glNormal3d, NULL, _gloffset_Normal3d), + NAME_FUNC_OFFSET( 583, glNormal3dv, glNormal3dv, NULL, _gloffset_Normal3dv), + NAME_FUNC_OFFSET( 595, glNormal3f, glNormal3f, NULL, _gloffset_Normal3f), + NAME_FUNC_OFFSET( 606, glNormal3fv, glNormal3fv, NULL, _gloffset_Normal3fv), + NAME_FUNC_OFFSET( 618, glNormal3i, glNormal3i, NULL, _gloffset_Normal3i), + NAME_FUNC_OFFSET( 629, glNormal3iv, glNormal3iv, NULL, _gloffset_Normal3iv), + NAME_FUNC_OFFSET( 641, glNormal3s, glNormal3s, NULL, _gloffset_Normal3s), + NAME_FUNC_OFFSET( 652, glNormal3sv, glNormal3sv, NULL, _gloffset_Normal3sv), + NAME_FUNC_OFFSET( 664, glRasterPos2d, glRasterPos2d, NULL, _gloffset_RasterPos2d), + NAME_FUNC_OFFSET( 678, glRasterPos2dv, glRasterPos2dv, NULL, _gloffset_RasterPos2dv), + NAME_FUNC_OFFSET( 693, glRasterPos2f, glRasterPos2f, NULL, _gloffset_RasterPos2f), + NAME_FUNC_OFFSET( 707, glRasterPos2fv, glRasterPos2fv, NULL, _gloffset_RasterPos2fv), + NAME_FUNC_OFFSET( 722, glRasterPos2i, glRasterPos2i, NULL, _gloffset_RasterPos2i), + NAME_FUNC_OFFSET( 736, glRasterPos2iv, glRasterPos2iv, NULL, _gloffset_RasterPos2iv), + NAME_FUNC_OFFSET( 751, glRasterPos2s, glRasterPos2s, NULL, _gloffset_RasterPos2s), + NAME_FUNC_OFFSET( 765, glRasterPos2sv, glRasterPos2sv, NULL, _gloffset_RasterPos2sv), + NAME_FUNC_OFFSET( 780, glRasterPos3d, glRasterPos3d, NULL, _gloffset_RasterPos3d), + NAME_FUNC_OFFSET( 794, glRasterPos3dv, glRasterPos3dv, NULL, _gloffset_RasterPos3dv), + NAME_FUNC_OFFSET( 809, glRasterPos3f, glRasterPos3f, NULL, _gloffset_RasterPos3f), + NAME_FUNC_OFFSET( 823, glRasterPos3fv, glRasterPos3fv, NULL, _gloffset_RasterPos3fv), + NAME_FUNC_OFFSET( 838, glRasterPos3i, glRasterPos3i, NULL, _gloffset_RasterPos3i), + NAME_FUNC_OFFSET( 852, glRasterPos3iv, glRasterPos3iv, NULL, _gloffset_RasterPos3iv), + NAME_FUNC_OFFSET( 867, glRasterPos3s, glRasterPos3s, NULL, _gloffset_RasterPos3s), + NAME_FUNC_OFFSET( 881, glRasterPos3sv, glRasterPos3sv, NULL, _gloffset_RasterPos3sv), + NAME_FUNC_OFFSET( 896, glRasterPos4d, glRasterPos4d, NULL, _gloffset_RasterPos4d), + NAME_FUNC_OFFSET( 910, glRasterPos4dv, glRasterPos4dv, NULL, _gloffset_RasterPos4dv), + NAME_FUNC_OFFSET( 925, glRasterPos4f, glRasterPos4f, NULL, _gloffset_RasterPos4f), + NAME_FUNC_OFFSET( 939, glRasterPos4fv, glRasterPos4fv, NULL, _gloffset_RasterPos4fv), + NAME_FUNC_OFFSET( 954, glRasterPos4i, glRasterPos4i, NULL, _gloffset_RasterPos4i), + NAME_FUNC_OFFSET( 968, glRasterPos4iv, glRasterPos4iv, NULL, _gloffset_RasterPos4iv), + NAME_FUNC_OFFSET( 983, glRasterPos4s, glRasterPos4s, NULL, _gloffset_RasterPos4s), + NAME_FUNC_OFFSET( 997, glRasterPos4sv, glRasterPos4sv, NULL, _gloffset_RasterPos4sv), + NAME_FUNC_OFFSET( 1012, glRectd, glRectd, NULL, _gloffset_Rectd), + NAME_FUNC_OFFSET( 1020, glRectdv, glRectdv, NULL, _gloffset_Rectdv), + NAME_FUNC_OFFSET( 1029, glRectf, glRectf, NULL, _gloffset_Rectf), + NAME_FUNC_OFFSET( 1037, glRectfv, glRectfv, NULL, _gloffset_Rectfv), + NAME_FUNC_OFFSET( 1046, glRecti, glRecti, NULL, _gloffset_Recti), + NAME_FUNC_OFFSET( 1054, glRectiv, glRectiv, NULL, _gloffset_Rectiv), + NAME_FUNC_OFFSET( 1063, glRects, glRects, NULL, _gloffset_Rects), + NAME_FUNC_OFFSET( 1071, glRectsv, glRectsv, NULL, _gloffset_Rectsv), + NAME_FUNC_OFFSET( 1080, glTexCoord1d, glTexCoord1d, NULL, _gloffset_TexCoord1d), + NAME_FUNC_OFFSET( 1093, glTexCoord1dv, glTexCoord1dv, NULL, _gloffset_TexCoord1dv), + NAME_FUNC_OFFSET( 1107, glTexCoord1f, glTexCoord1f, NULL, _gloffset_TexCoord1f), + NAME_FUNC_OFFSET( 1120, glTexCoord1fv, glTexCoord1fv, NULL, _gloffset_TexCoord1fv), + NAME_FUNC_OFFSET( 1134, glTexCoord1i, glTexCoord1i, NULL, _gloffset_TexCoord1i), + NAME_FUNC_OFFSET( 1147, glTexCoord1iv, glTexCoord1iv, NULL, _gloffset_TexCoord1iv), + NAME_FUNC_OFFSET( 1161, glTexCoord1s, glTexCoord1s, NULL, _gloffset_TexCoord1s), + NAME_FUNC_OFFSET( 1174, glTexCoord1sv, glTexCoord1sv, NULL, _gloffset_TexCoord1sv), + NAME_FUNC_OFFSET( 1188, glTexCoord2d, glTexCoord2d, NULL, _gloffset_TexCoord2d), + NAME_FUNC_OFFSET( 1201, glTexCoord2dv, glTexCoord2dv, NULL, _gloffset_TexCoord2dv), + NAME_FUNC_OFFSET( 1215, glTexCoord2f, glTexCoord2f, NULL, _gloffset_TexCoord2f), + NAME_FUNC_OFFSET( 1228, glTexCoord2fv, glTexCoord2fv, NULL, _gloffset_TexCoord2fv), + NAME_FUNC_OFFSET( 1242, glTexCoord2i, glTexCoord2i, NULL, _gloffset_TexCoord2i), + NAME_FUNC_OFFSET( 1255, glTexCoord2iv, glTexCoord2iv, NULL, _gloffset_TexCoord2iv), + NAME_FUNC_OFFSET( 1269, glTexCoord2s, glTexCoord2s, NULL, _gloffset_TexCoord2s), + NAME_FUNC_OFFSET( 1282, glTexCoord2sv, glTexCoord2sv, NULL, _gloffset_TexCoord2sv), + NAME_FUNC_OFFSET( 1296, glTexCoord3d, glTexCoord3d, NULL, _gloffset_TexCoord3d), + NAME_FUNC_OFFSET( 1309, glTexCoord3dv, glTexCoord3dv, NULL, _gloffset_TexCoord3dv), + NAME_FUNC_OFFSET( 1323, glTexCoord3f, glTexCoord3f, NULL, _gloffset_TexCoord3f), + NAME_FUNC_OFFSET( 1336, glTexCoord3fv, glTexCoord3fv, NULL, _gloffset_TexCoord3fv), + NAME_FUNC_OFFSET( 1350, glTexCoord3i, glTexCoord3i, NULL, _gloffset_TexCoord3i), + NAME_FUNC_OFFSET( 1363, glTexCoord3iv, glTexCoord3iv, NULL, _gloffset_TexCoord3iv), + NAME_FUNC_OFFSET( 1377, glTexCoord3s, glTexCoord3s, NULL, _gloffset_TexCoord3s), + NAME_FUNC_OFFSET( 1390, glTexCoord3sv, glTexCoord3sv, NULL, _gloffset_TexCoord3sv), + NAME_FUNC_OFFSET( 1404, glTexCoord4d, glTexCoord4d, NULL, _gloffset_TexCoord4d), + NAME_FUNC_OFFSET( 1417, glTexCoord4dv, glTexCoord4dv, NULL, _gloffset_TexCoord4dv), + NAME_FUNC_OFFSET( 1431, glTexCoord4f, glTexCoord4f, NULL, _gloffset_TexCoord4f), + NAME_FUNC_OFFSET( 1444, glTexCoord4fv, glTexCoord4fv, NULL, _gloffset_TexCoord4fv), + NAME_FUNC_OFFSET( 1458, glTexCoord4i, glTexCoord4i, NULL, _gloffset_TexCoord4i), + NAME_FUNC_OFFSET( 1471, glTexCoord4iv, glTexCoord4iv, NULL, _gloffset_TexCoord4iv), + NAME_FUNC_OFFSET( 1485, glTexCoord4s, glTexCoord4s, NULL, _gloffset_TexCoord4s), + NAME_FUNC_OFFSET( 1498, glTexCoord4sv, glTexCoord4sv, NULL, _gloffset_TexCoord4sv), + NAME_FUNC_OFFSET( 1512, glVertex2d, glVertex2d, NULL, _gloffset_Vertex2d), + NAME_FUNC_OFFSET( 1523, glVertex2dv, glVertex2dv, NULL, _gloffset_Vertex2dv), + NAME_FUNC_OFFSET( 1535, glVertex2f, glVertex2f, NULL, _gloffset_Vertex2f), + NAME_FUNC_OFFSET( 1546, glVertex2fv, glVertex2fv, NULL, _gloffset_Vertex2fv), + NAME_FUNC_OFFSET( 1558, glVertex2i, glVertex2i, NULL, _gloffset_Vertex2i), + NAME_FUNC_OFFSET( 1569, glVertex2iv, glVertex2iv, NULL, _gloffset_Vertex2iv), + NAME_FUNC_OFFSET( 1581, glVertex2s, glVertex2s, NULL, _gloffset_Vertex2s), + NAME_FUNC_OFFSET( 1592, glVertex2sv, glVertex2sv, NULL, _gloffset_Vertex2sv), + NAME_FUNC_OFFSET( 1604, glVertex3d, glVertex3d, NULL, _gloffset_Vertex3d), + NAME_FUNC_OFFSET( 1615, glVertex3dv, glVertex3dv, NULL, _gloffset_Vertex3dv), + NAME_FUNC_OFFSET( 1627, glVertex3f, glVertex3f, NULL, _gloffset_Vertex3f), + NAME_FUNC_OFFSET( 1638, glVertex3fv, glVertex3fv, NULL, _gloffset_Vertex3fv), + NAME_FUNC_OFFSET( 1650, glVertex3i, glVertex3i, NULL, _gloffset_Vertex3i), + NAME_FUNC_OFFSET( 1661, glVertex3iv, glVertex3iv, NULL, _gloffset_Vertex3iv), + NAME_FUNC_OFFSET( 1673, glVertex3s, glVertex3s, NULL, _gloffset_Vertex3s), + NAME_FUNC_OFFSET( 1684, glVertex3sv, glVertex3sv, NULL, _gloffset_Vertex3sv), + NAME_FUNC_OFFSET( 1696, glVertex4d, glVertex4d, NULL, _gloffset_Vertex4d), + NAME_FUNC_OFFSET( 1707, glVertex4dv, glVertex4dv, NULL, _gloffset_Vertex4dv), + NAME_FUNC_OFFSET( 1719, glVertex4f, glVertex4f, NULL, _gloffset_Vertex4f), + NAME_FUNC_OFFSET( 1730, glVertex4fv, glVertex4fv, NULL, _gloffset_Vertex4fv), + NAME_FUNC_OFFSET( 1742, glVertex4i, glVertex4i, NULL, _gloffset_Vertex4i), + NAME_FUNC_OFFSET( 1753, glVertex4iv, glVertex4iv, NULL, _gloffset_Vertex4iv), + NAME_FUNC_OFFSET( 1765, glVertex4s, glVertex4s, NULL, _gloffset_Vertex4s), + NAME_FUNC_OFFSET( 1776, glVertex4sv, glVertex4sv, NULL, _gloffset_Vertex4sv), + NAME_FUNC_OFFSET( 1788, glClipPlane, glClipPlane, NULL, _gloffset_ClipPlane), + NAME_FUNC_OFFSET( 1800, glColorMaterial, glColorMaterial, NULL, _gloffset_ColorMaterial), + NAME_FUNC_OFFSET( 1816, glCullFace, glCullFace, NULL, _gloffset_CullFace), + NAME_FUNC_OFFSET( 1827, glFogf, glFogf, NULL, _gloffset_Fogf), + NAME_FUNC_OFFSET( 1834, glFogfv, glFogfv, NULL, _gloffset_Fogfv), + NAME_FUNC_OFFSET( 1842, glFogi, glFogi, NULL, _gloffset_Fogi), + NAME_FUNC_OFFSET( 1849, glFogiv, glFogiv, NULL, _gloffset_Fogiv), + NAME_FUNC_OFFSET( 1857, glFrontFace, glFrontFace, NULL, _gloffset_FrontFace), + NAME_FUNC_OFFSET( 1869, glHint, glHint, NULL, _gloffset_Hint), + NAME_FUNC_OFFSET( 1876, glLightf, glLightf, NULL, _gloffset_Lightf), + NAME_FUNC_OFFSET( 1885, glLightfv, glLightfv, NULL, _gloffset_Lightfv), + NAME_FUNC_OFFSET( 1895, glLighti, glLighti, NULL, _gloffset_Lighti), + NAME_FUNC_OFFSET( 1904, glLightiv, glLightiv, NULL, _gloffset_Lightiv), + NAME_FUNC_OFFSET( 1914, glLightModelf, glLightModelf, NULL, _gloffset_LightModelf), + NAME_FUNC_OFFSET( 1928, glLightModelfv, glLightModelfv, NULL, _gloffset_LightModelfv), + NAME_FUNC_OFFSET( 1943, glLightModeli, glLightModeli, NULL, _gloffset_LightModeli), + NAME_FUNC_OFFSET( 1957, glLightModeliv, glLightModeliv, NULL, _gloffset_LightModeliv), + NAME_FUNC_OFFSET( 1972, glLineStipple, glLineStipple, NULL, _gloffset_LineStipple), + NAME_FUNC_OFFSET( 1986, glLineWidth, glLineWidth, NULL, _gloffset_LineWidth), + NAME_FUNC_OFFSET( 1998, glMaterialf, glMaterialf, NULL, _gloffset_Materialf), + NAME_FUNC_OFFSET( 2010, glMaterialfv, glMaterialfv, NULL, _gloffset_Materialfv), + NAME_FUNC_OFFSET( 2023, glMateriali, glMateriali, NULL, _gloffset_Materiali), + NAME_FUNC_OFFSET( 2035, glMaterialiv, glMaterialiv, NULL, _gloffset_Materialiv), + NAME_FUNC_OFFSET( 2048, glPointSize, glPointSize, NULL, _gloffset_PointSize), + NAME_FUNC_OFFSET( 2060, glPolygonMode, glPolygonMode, NULL, _gloffset_PolygonMode), + NAME_FUNC_OFFSET( 2074, glPolygonStipple, glPolygonStipple, NULL, _gloffset_PolygonStipple), + NAME_FUNC_OFFSET( 2091, glScissor, glScissor, NULL, _gloffset_Scissor), + NAME_FUNC_OFFSET( 2101, glShadeModel, glShadeModel, NULL, _gloffset_ShadeModel), + NAME_FUNC_OFFSET( 2114, glTexParameterf, glTexParameterf, NULL, _gloffset_TexParameterf), + NAME_FUNC_OFFSET( 2130, glTexParameterfv, glTexParameterfv, NULL, _gloffset_TexParameterfv), + NAME_FUNC_OFFSET( 2147, glTexParameteri, glTexParameteri, NULL, _gloffset_TexParameteri), + NAME_FUNC_OFFSET( 2163, glTexParameteriv, glTexParameteriv, NULL, _gloffset_TexParameteriv), + NAME_FUNC_OFFSET( 2180, glTexImage1D, glTexImage1D, NULL, _gloffset_TexImage1D), + NAME_FUNC_OFFSET( 2193, glTexImage2D, glTexImage2D, NULL, _gloffset_TexImage2D), + NAME_FUNC_OFFSET( 2206, glTexEnvf, glTexEnvf, NULL, _gloffset_TexEnvf), + NAME_FUNC_OFFSET( 2216, glTexEnvfv, glTexEnvfv, NULL, _gloffset_TexEnvfv), + NAME_FUNC_OFFSET( 2227, glTexEnvi, glTexEnvi, NULL, _gloffset_TexEnvi), + NAME_FUNC_OFFSET( 2237, glTexEnviv, glTexEnviv, NULL, _gloffset_TexEnviv), + NAME_FUNC_OFFSET( 2248, glTexGend, glTexGend, NULL, _gloffset_TexGend), + NAME_FUNC_OFFSET( 2258, glTexGendv, glTexGendv, NULL, _gloffset_TexGendv), + NAME_FUNC_OFFSET( 2269, glTexGenf, glTexGenf, NULL, _gloffset_TexGenf), + NAME_FUNC_OFFSET( 2279, glTexGenfv, glTexGenfv, NULL, _gloffset_TexGenfv), + NAME_FUNC_OFFSET( 2290, glTexGeni, glTexGeni, NULL, _gloffset_TexGeni), + NAME_FUNC_OFFSET( 2300, glTexGeniv, glTexGeniv, NULL, _gloffset_TexGeniv), + NAME_FUNC_OFFSET( 2311, glFeedbackBuffer, glFeedbackBuffer, NULL, _gloffset_FeedbackBuffer), + NAME_FUNC_OFFSET( 2328, glSelectBuffer, glSelectBuffer, NULL, _gloffset_SelectBuffer), + NAME_FUNC_OFFSET( 2343, glRenderMode, glRenderMode, NULL, _gloffset_RenderMode), + NAME_FUNC_OFFSET( 2356, glInitNames, glInitNames, NULL, _gloffset_InitNames), + NAME_FUNC_OFFSET( 2368, glLoadName, glLoadName, NULL, _gloffset_LoadName), + NAME_FUNC_OFFSET( 2379, glPassThrough, glPassThrough, NULL, _gloffset_PassThrough), + NAME_FUNC_OFFSET( 2393, glPopName, glPopName, NULL, _gloffset_PopName), + NAME_FUNC_OFFSET( 2403, glPushName, glPushName, NULL, _gloffset_PushName), + NAME_FUNC_OFFSET( 2414, glDrawBuffer, glDrawBuffer, NULL, _gloffset_DrawBuffer), + NAME_FUNC_OFFSET( 2427, glClear, glClear, NULL, _gloffset_Clear), + NAME_FUNC_OFFSET( 2435, glClearAccum, glClearAccum, NULL, _gloffset_ClearAccum), + NAME_FUNC_OFFSET( 2448, glClearIndex, glClearIndex, NULL, _gloffset_ClearIndex), + NAME_FUNC_OFFSET( 2461, glClearColor, glClearColor, NULL, _gloffset_ClearColor), + NAME_FUNC_OFFSET( 2474, glClearStencil, glClearStencil, NULL, _gloffset_ClearStencil), + NAME_FUNC_OFFSET( 2489, glClearDepth, glClearDepth, NULL, _gloffset_ClearDepth), + NAME_FUNC_OFFSET( 2502, glStencilMask, glStencilMask, NULL, _gloffset_StencilMask), + NAME_FUNC_OFFSET( 2516, glColorMask, glColorMask, NULL, _gloffset_ColorMask), + NAME_FUNC_OFFSET( 2528, glDepthMask, glDepthMask, NULL, _gloffset_DepthMask), + NAME_FUNC_OFFSET( 2540, glIndexMask, glIndexMask, NULL, _gloffset_IndexMask), + NAME_FUNC_OFFSET( 2552, glAccum, glAccum, NULL, _gloffset_Accum), + NAME_FUNC_OFFSET( 2560, glDisable, glDisable, NULL, _gloffset_Disable), + NAME_FUNC_OFFSET( 2570, glEnable, glEnable, NULL, _gloffset_Enable), + NAME_FUNC_OFFSET( 2579, glFinish, glFinish, NULL, _gloffset_Finish), + NAME_FUNC_OFFSET( 2588, glFlush, glFlush, NULL, _gloffset_Flush), + NAME_FUNC_OFFSET( 2596, glPopAttrib, glPopAttrib, NULL, _gloffset_PopAttrib), + NAME_FUNC_OFFSET( 2608, glPushAttrib, glPushAttrib, NULL, _gloffset_PushAttrib), + NAME_FUNC_OFFSET( 2621, glMap1d, glMap1d, NULL, _gloffset_Map1d), + NAME_FUNC_OFFSET( 2629, glMap1f, glMap1f, NULL, _gloffset_Map1f), + NAME_FUNC_OFFSET( 2637, glMap2d, glMap2d, NULL, _gloffset_Map2d), + NAME_FUNC_OFFSET( 2645, glMap2f, glMap2f, NULL, _gloffset_Map2f), + NAME_FUNC_OFFSET( 2653, glMapGrid1d, glMapGrid1d, NULL, _gloffset_MapGrid1d), + NAME_FUNC_OFFSET( 2665, glMapGrid1f, glMapGrid1f, NULL, _gloffset_MapGrid1f), + NAME_FUNC_OFFSET( 2677, glMapGrid2d, glMapGrid2d, NULL, _gloffset_MapGrid2d), + NAME_FUNC_OFFSET( 2689, glMapGrid2f, glMapGrid2f, NULL, _gloffset_MapGrid2f), + NAME_FUNC_OFFSET( 2701, glEvalCoord1d, glEvalCoord1d, NULL, _gloffset_EvalCoord1d), + NAME_FUNC_OFFSET( 2715, glEvalCoord1dv, glEvalCoord1dv, NULL, _gloffset_EvalCoord1dv), + NAME_FUNC_OFFSET( 2730, glEvalCoord1f, glEvalCoord1f, NULL, _gloffset_EvalCoord1f), + NAME_FUNC_OFFSET( 2744, glEvalCoord1fv, glEvalCoord1fv, NULL, _gloffset_EvalCoord1fv), + NAME_FUNC_OFFSET( 2759, glEvalCoord2d, glEvalCoord2d, NULL, _gloffset_EvalCoord2d), + NAME_FUNC_OFFSET( 2773, glEvalCoord2dv, glEvalCoord2dv, NULL, _gloffset_EvalCoord2dv), + NAME_FUNC_OFFSET( 2788, glEvalCoord2f, glEvalCoord2f, NULL, _gloffset_EvalCoord2f), + NAME_FUNC_OFFSET( 2802, glEvalCoord2fv, glEvalCoord2fv, NULL, _gloffset_EvalCoord2fv), + NAME_FUNC_OFFSET( 2817, glEvalMesh1, glEvalMesh1, NULL, _gloffset_EvalMesh1), + NAME_FUNC_OFFSET( 2829, glEvalPoint1, glEvalPoint1, NULL, _gloffset_EvalPoint1), + NAME_FUNC_OFFSET( 2842, glEvalMesh2, glEvalMesh2, NULL, _gloffset_EvalMesh2), + NAME_FUNC_OFFSET( 2854, glEvalPoint2, glEvalPoint2, NULL, _gloffset_EvalPoint2), + NAME_FUNC_OFFSET( 2867, glAlphaFunc, glAlphaFunc, NULL, _gloffset_AlphaFunc), + NAME_FUNC_OFFSET( 2879, glBlendFunc, glBlendFunc, NULL, _gloffset_BlendFunc), + NAME_FUNC_OFFSET( 2891, glLogicOp, glLogicOp, NULL, _gloffset_LogicOp), + NAME_FUNC_OFFSET( 2901, glStencilFunc, glStencilFunc, NULL, _gloffset_StencilFunc), + NAME_FUNC_OFFSET( 2915, glStencilOp, glStencilOp, NULL, _gloffset_StencilOp), + NAME_FUNC_OFFSET( 2927, glDepthFunc, glDepthFunc, NULL, _gloffset_DepthFunc), + NAME_FUNC_OFFSET( 2939, glPixelZoom, glPixelZoom, NULL, _gloffset_PixelZoom), + NAME_FUNC_OFFSET( 2951, glPixelTransferf, glPixelTransferf, NULL, _gloffset_PixelTransferf), + NAME_FUNC_OFFSET( 2968, glPixelTransferi, glPixelTransferi, NULL, _gloffset_PixelTransferi), + NAME_FUNC_OFFSET( 2985, glPixelStoref, glPixelStoref, NULL, _gloffset_PixelStoref), + NAME_FUNC_OFFSET( 2999, glPixelStorei, glPixelStorei, NULL, _gloffset_PixelStorei), + NAME_FUNC_OFFSET( 3013, glPixelMapfv, glPixelMapfv, NULL, _gloffset_PixelMapfv), + NAME_FUNC_OFFSET( 3026, glPixelMapuiv, glPixelMapuiv, NULL, _gloffset_PixelMapuiv), + NAME_FUNC_OFFSET( 3040, glPixelMapusv, glPixelMapusv, NULL, _gloffset_PixelMapusv), + NAME_FUNC_OFFSET( 3054, glReadBuffer, glReadBuffer, NULL, _gloffset_ReadBuffer), + NAME_FUNC_OFFSET( 3067, glCopyPixels, glCopyPixels, NULL, _gloffset_CopyPixels), + NAME_FUNC_OFFSET( 3080, glReadPixels, glReadPixels, NULL, _gloffset_ReadPixels), + NAME_FUNC_OFFSET( 3093, glDrawPixels, glDrawPixels, NULL, _gloffset_DrawPixels), + NAME_FUNC_OFFSET( 3106, glGetBooleanv, glGetBooleanv, NULL, _gloffset_GetBooleanv), + NAME_FUNC_OFFSET( 3120, glGetClipPlane, glGetClipPlane, NULL, _gloffset_GetClipPlane), + NAME_FUNC_OFFSET( 3135, glGetDoublev, glGetDoublev, NULL, _gloffset_GetDoublev), + NAME_FUNC_OFFSET( 3148, glGetError, glGetError, NULL, _gloffset_GetError), + NAME_FUNC_OFFSET( 3159, glGetFloatv, glGetFloatv, NULL, _gloffset_GetFloatv), + NAME_FUNC_OFFSET( 3171, glGetIntegerv, glGetIntegerv, NULL, _gloffset_GetIntegerv), + NAME_FUNC_OFFSET( 3185, glGetLightfv, glGetLightfv, NULL, _gloffset_GetLightfv), + NAME_FUNC_OFFSET( 3198, glGetLightiv, glGetLightiv, NULL, _gloffset_GetLightiv), + NAME_FUNC_OFFSET( 3211, glGetMapdv, glGetMapdv, NULL, _gloffset_GetMapdv), + NAME_FUNC_OFFSET( 3222, glGetMapfv, glGetMapfv, NULL, _gloffset_GetMapfv), + NAME_FUNC_OFFSET( 3233, glGetMapiv, glGetMapiv, NULL, _gloffset_GetMapiv), + NAME_FUNC_OFFSET( 3244, glGetMaterialfv, glGetMaterialfv, NULL, _gloffset_GetMaterialfv), + NAME_FUNC_OFFSET( 3260, glGetMaterialiv, glGetMaterialiv, NULL, _gloffset_GetMaterialiv), + NAME_FUNC_OFFSET( 3276, glGetPixelMapfv, glGetPixelMapfv, NULL, _gloffset_GetPixelMapfv), + NAME_FUNC_OFFSET( 3292, glGetPixelMapuiv, glGetPixelMapuiv, NULL, _gloffset_GetPixelMapuiv), + NAME_FUNC_OFFSET( 3309, glGetPixelMapusv, glGetPixelMapusv, NULL, _gloffset_GetPixelMapusv), + NAME_FUNC_OFFSET( 3326, glGetPolygonStipple, glGetPolygonStipple, NULL, _gloffset_GetPolygonStipple), + NAME_FUNC_OFFSET( 3346, glGetString, glGetString, NULL, _gloffset_GetString), + NAME_FUNC_OFFSET( 3358, glGetTexEnvfv, glGetTexEnvfv, NULL, _gloffset_GetTexEnvfv), + NAME_FUNC_OFFSET( 3372, glGetTexEnviv, glGetTexEnviv, NULL, _gloffset_GetTexEnviv), + NAME_FUNC_OFFSET( 3386, glGetTexGendv, glGetTexGendv, NULL, _gloffset_GetTexGendv), + NAME_FUNC_OFFSET( 3400, glGetTexGenfv, glGetTexGenfv, NULL, _gloffset_GetTexGenfv), + NAME_FUNC_OFFSET( 3414, glGetTexGeniv, glGetTexGeniv, NULL, _gloffset_GetTexGeniv), + NAME_FUNC_OFFSET( 3428, glGetTexImage, glGetTexImage, NULL, _gloffset_GetTexImage), + NAME_FUNC_OFFSET( 3442, glGetTexParameterfv, glGetTexParameterfv, NULL, _gloffset_GetTexParameterfv), + NAME_FUNC_OFFSET( 3462, glGetTexParameteriv, glGetTexParameteriv, NULL, _gloffset_GetTexParameteriv), + NAME_FUNC_OFFSET( 3482, glGetTexLevelParameterfv, glGetTexLevelParameterfv, NULL, _gloffset_GetTexLevelParameterfv), + NAME_FUNC_OFFSET( 3507, glGetTexLevelParameteriv, glGetTexLevelParameteriv, NULL, _gloffset_GetTexLevelParameteriv), + NAME_FUNC_OFFSET( 3532, glIsEnabled, glIsEnabled, NULL, _gloffset_IsEnabled), + NAME_FUNC_OFFSET( 3544, glIsList, glIsList, NULL, _gloffset_IsList), + NAME_FUNC_OFFSET( 3553, glDepthRange, glDepthRange, NULL, _gloffset_DepthRange), + NAME_FUNC_OFFSET( 3566, glFrustum, glFrustum, NULL, _gloffset_Frustum), + NAME_FUNC_OFFSET( 3576, glLoadIdentity, glLoadIdentity, NULL, _gloffset_LoadIdentity), + NAME_FUNC_OFFSET( 3591, glLoadMatrixf, glLoadMatrixf, NULL, _gloffset_LoadMatrixf), + NAME_FUNC_OFFSET( 3605, glLoadMatrixd, glLoadMatrixd, NULL, _gloffset_LoadMatrixd), + NAME_FUNC_OFFSET( 3619, glMatrixMode, glMatrixMode, NULL, _gloffset_MatrixMode), + NAME_FUNC_OFFSET( 3632, glMultMatrixf, glMultMatrixf, NULL, _gloffset_MultMatrixf), + NAME_FUNC_OFFSET( 3646, glMultMatrixd, glMultMatrixd, NULL, _gloffset_MultMatrixd), + NAME_FUNC_OFFSET( 3660, glOrtho, glOrtho, NULL, _gloffset_Ortho), + NAME_FUNC_OFFSET( 3668, glPopMatrix, glPopMatrix, NULL, _gloffset_PopMatrix), + NAME_FUNC_OFFSET( 3680, glPushMatrix, glPushMatrix, NULL, _gloffset_PushMatrix), + NAME_FUNC_OFFSET( 3693, glRotated, glRotated, NULL, _gloffset_Rotated), + NAME_FUNC_OFFSET( 3703, glRotatef, glRotatef, NULL, _gloffset_Rotatef), + NAME_FUNC_OFFSET( 3713, glScaled, glScaled, NULL, _gloffset_Scaled), + NAME_FUNC_OFFSET( 3722, glScalef, glScalef, NULL, _gloffset_Scalef), + NAME_FUNC_OFFSET( 3731, glTranslated, glTranslated, NULL, _gloffset_Translated), + NAME_FUNC_OFFSET( 3744, glTranslatef, glTranslatef, NULL, _gloffset_Translatef), + NAME_FUNC_OFFSET( 3757, glViewport, glViewport, NULL, _gloffset_Viewport), + NAME_FUNC_OFFSET( 3768, glArrayElement, glArrayElement, NULL, _gloffset_ArrayElement), + NAME_FUNC_OFFSET( 3783, glBindTexture, glBindTexture, NULL, _gloffset_BindTexture), + NAME_FUNC_OFFSET( 3797, glColorPointer, glColorPointer, NULL, _gloffset_ColorPointer), + NAME_FUNC_OFFSET( 3812, glDisableClientState, glDisableClientState, NULL, _gloffset_DisableClientState), + NAME_FUNC_OFFSET( 3833, glDrawArrays, glDrawArrays, NULL, _gloffset_DrawArrays), + NAME_FUNC_OFFSET( 3846, glDrawElements, glDrawElements, NULL, _gloffset_DrawElements), + NAME_FUNC_OFFSET( 3861, glEdgeFlagPointer, glEdgeFlagPointer, NULL, _gloffset_EdgeFlagPointer), + NAME_FUNC_OFFSET( 3879, glEnableClientState, glEnableClientState, NULL, _gloffset_EnableClientState), + NAME_FUNC_OFFSET( 3899, glIndexPointer, glIndexPointer, NULL, _gloffset_IndexPointer), + NAME_FUNC_OFFSET( 3914, glIndexub, glIndexub, NULL, _gloffset_Indexub), + NAME_FUNC_OFFSET( 3924, glIndexubv, glIndexubv, NULL, _gloffset_Indexubv), + NAME_FUNC_OFFSET( 3935, glInterleavedArrays, glInterleavedArrays, NULL, _gloffset_InterleavedArrays), + NAME_FUNC_OFFSET( 3955, glNormalPointer, glNormalPointer, NULL, _gloffset_NormalPointer), + NAME_FUNC_OFFSET( 3971, glPolygonOffset, glPolygonOffset, NULL, _gloffset_PolygonOffset), + NAME_FUNC_OFFSET( 3987, glTexCoordPointer, glTexCoordPointer, NULL, _gloffset_TexCoordPointer), + NAME_FUNC_OFFSET( 4005, glVertexPointer, glVertexPointer, NULL, _gloffset_VertexPointer), + NAME_FUNC_OFFSET( 4021, glAreTexturesResident, glAreTexturesResident, NULL, _gloffset_AreTexturesResident), + NAME_FUNC_OFFSET( 4043, glCopyTexImage1D, glCopyTexImage1D, NULL, _gloffset_CopyTexImage1D), + NAME_FUNC_OFFSET( 4060, glCopyTexImage2D, glCopyTexImage2D, NULL, _gloffset_CopyTexImage2D), + NAME_FUNC_OFFSET( 4077, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, _gloffset_CopyTexSubImage1D), + NAME_FUNC_OFFSET( 4097, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, _gloffset_CopyTexSubImage2D), + NAME_FUNC_OFFSET( 4117, glDeleteTextures, glDeleteTextures, NULL, _gloffset_DeleteTextures), + NAME_FUNC_OFFSET( 4134, glGenTextures, glGenTextures, NULL, _gloffset_GenTextures), + NAME_FUNC_OFFSET( 4148, glGetPointerv, glGetPointerv, NULL, _gloffset_GetPointerv), + NAME_FUNC_OFFSET( 4162, glIsTexture, glIsTexture, NULL, _gloffset_IsTexture), + NAME_FUNC_OFFSET( 4174, glPrioritizeTextures, glPrioritizeTextures, NULL, _gloffset_PrioritizeTextures), + NAME_FUNC_OFFSET( 4195, glTexSubImage1D, glTexSubImage1D, NULL, _gloffset_TexSubImage1D), + NAME_FUNC_OFFSET( 4211, glTexSubImage2D, glTexSubImage2D, NULL, _gloffset_TexSubImage2D), + NAME_FUNC_OFFSET( 4227, glPopClientAttrib, glPopClientAttrib, NULL, _gloffset_PopClientAttrib), + NAME_FUNC_OFFSET( 4245, glPushClientAttrib, glPushClientAttrib, NULL, _gloffset_PushClientAttrib), + NAME_FUNC_OFFSET( 4264, glBlendColor, glBlendColor, NULL, _gloffset_BlendColor), + NAME_FUNC_OFFSET( 4277, glBlendEquation, glBlendEquation, NULL, _gloffset_BlendEquation), + NAME_FUNC_OFFSET( 4293, glDrawRangeElements, glDrawRangeElements, NULL, _gloffset_DrawRangeElements), + NAME_FUNC_OFFSET( 4313, glColorTable, glColorTable, NULL, _gloffset_ColorTable), + NAME_FUNC_OFFSET( 4326, glColorTableParameterfv, glColorTableParameterfv, NULL, _gloffset_ColorTableParameterfv), + NAME_FUNC_OFFSET( 4350, glColorTableParameteriv, glColorTableParameteriv, NULL, _gloffset_ColorTableParameteriv), + NAME_FUNC_OFFSET( 4374, glCopyColorTable, glCopyColorTable, NULL, _gloffset_CopyColorTable), + NAME_FUNC_OFFSET( 4391, glGetColorTable, glGetColorTable, NULL, _gloffset_GetColorTable), + NAME_FUNC_OFFSET( 4407, glGetColorTableParameterfv, glGetColorTableParameterfv, NULL, _gloffset_GetColorTableParameterfv), + NAME_FUNC_OFFSET( 4434, glGetColorTableParameteriv, glGetColorTableParameteriv, NULL, _gloffset_GetColorTableParameteriv), + NAME_FUNC_OFFSET( 4461, glColorSubTable, glColorSubTable, NULL, _gloffset_ColorSubTable), + NAME_FUNC_OFFSET( 4477, glCopyColorSubTable, glCopyColorSubTable, NULL, _gloffset_CopyColorSubTable), + NAME_FUNC_OFFSET( 4497, glConvolutionFilter1D, glConvolutionFilter1D, NULL, _gloffset_ConvolutionFilter1D), + NAME_FUNC_OFFSET( 4519, glConvolutionFilter2D, glConvolutionFilter2D, NULL, _gloffset_ConvolutionFilter2D), + NAME_FUNC_OFFSET( 4541, glConvolutionParameterf, glConvolutionParameterf, NULL, _gloffset_ConvolutionParameterf), + NAME_FUNC_OFFSET( 4565, glConvolutionParameterfv, glConvolutionParameterfv, NULL, _gloffset_ConvolutionParameterfv), + NAME_FUNC_OFFSET( 4590, glConvolutionParameteri, glConvolutionParameteri, NULL, _gloffset_ConvolutionParameteri), + NAME_FUNC_OFFSET( 4614, glConvolutionParameteriv, glConvolutionParameteriv, NULL, _gloffset_ConvolutionParameteriv), + NAME_FUNC_OFFSET( 4639, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, _gloffset_CopyConvolutionFilter1D), + NAME_FUNC_OFFSET( 4665, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, _gloffset_CopyConvolutionFilter2D), + NAME_FUNC_OFFSET( 4691, glGetConvolutionFilter, glGetConvolutionFilter, NULL, _gloffset_GetConvolutionFilter), + NAME_FUNC_OFFSET( 4714, glGetConvolutionParameterfv, glGetConvolutionParameterfv, NULL, _gloffset_GetConvolutionParameterfv), + NAME_FUNC_OFFSET( 4742, glGetConvolutionParameteriv, glGetConvolutionParameteriv, NULL, _gloffset_GetConvolutionParameteriv), + NAME_FUNC_OFFSET( 4770, glGetSeparableFilter, glGetSeparableFilter, NULL, _gloffset_GetSeparableFilter), + NAME_FUNC_OFFSET( 4791, glSeparableFilter2D, glSeparableFilter2D, NULL, _gloffset_SeparableFilter2D), + NAME_FUNC_OFFSET( 4811, glGetHistogram, glGetHistogram, NULL, _gloffset_GetHistogram), + NAME_FUNC_OFFSET( 4826, glGetHistogramParameterfv, glGetHistogramParameterfv, NULL, _gloffset_GetHistogramParameterfv), + NAME_FUNC_OFFSET( 4852, glGetHistogramParameteriv, glGetHistogramParameteriv, NULL, _gloffset_GetHistogramParameteriv), + NAME_FUNC_OFFSET( 4878, glGetMinmax, glGetMinmax, NULL, _gloffset_GetMinmax), + NAME_FUNC_OFFSET( 4890, glGetMinmaxParameterfv, glGetMinmaxParameterfv, NULL, _gloffset_GetMinmaxParameterfv), + NAME_FUNC_OFFSET( 4913, glGetMinmaxParameteriv, glGetMinmaxParameteriv, NULL, _gloffset_GetMinmaxParameteriv), + NAME_FUNC_OFFSET( 4936, glHistogram, glHistogram, NULL, _gloffset_Histogram), + NAME_FUNC_OFFSET( 4948, glMinmax, glMinmax, NULL, _gloffset_Minmax), + NAME_FUNC_OFFSET( 4957, glResetHistogram, glResetHistogram, NULL, _gloffset_ResetHistogram), + NAME_FUNC_OFFSET( 4974, glResetMinmax, glResetMinmax, NULL, _gloffset_ResetMinmax), + NAME_FUNC_OFFSET( 4988, glTexImage3D, glTexImage3D, NULL, _gloffset_TexImage3D), + NAME_FUNC_OFFSET( 5001, glTexSubImage3D, glTexSubImage3D, NULL, _gloffset_TexSubImage3D), + NAME_FUNC_OFFSET( 5017, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, _gloffset_CopyTexSubImage3D), + NAME_FUNC_OFFSET( 5037, glActiveTextureARB, glActiveTextureARB, NULL, _gloffset_ActiveTextureARB), + NAME_FUNC_OFFSET( 5056, glClientActiveTextureARB, glClientActiveTextureARB, NULL, _gloffset_ClientActiveTextureARB), + NAME_FUNC_OFFSET( 5081, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, _gloffset_MultiTexCoord1dARB), + NAME_FUNC_OFFSET( 5102, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, _gloffset_MultiTexCoord1dvARB), + NAME_FUNC_OFFSET( 5124, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, _gloffset_MultiTexCoord1fARB), + NAME_FUNC_OFFSET( 5145, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, _gloffset_MultiTexCoord1fvARB), + NAME_FUNC_OFFSET( 5167, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, _gloffset_MultiTexCoord1iARB), + NAME_FUNC_OFFSET( 5188, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, _gloffset_MultiTexCoord1ivARB), + NAME_FUNC_OFFSET( 5210, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, _gloffset_MultiTexCoord1sARB), + NAME_FUNC_OFFSET( 5231, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, _gloffset_MultiTexCoord1svARB), + NAME_FUNC_OFFSET( 5253, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, _gloffset_MultiTexCoord2dARB), + NAME_FUNC_OFFSET( 5274, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, _gloffset_MultiTexCoord2dvARB), + NAME_FUNC_OFFSET( 5296, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, _gloffset_MultiTexCoord2fARB), + NAME_FUNC_OFFSET( 5317, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, _gloffset_MultiTexCoord2fvARB), + NAME_FUNC_OFFSET( 5339, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, _gloffset_MultiTexCoord2iARB), + NAME_FUNC_OFFSET( 5360, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, _gloffset_MultiTexCoord2ivARB), + NAME_FUNC_OFFSET( 5382, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, _gloffset_MultiTexCoord2sARB), + NAME_FUNC_OFFSET( 5403, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, _gloffset_MultiTexCoord2svARB), + NAME_FUNC_OFFSET( 5425, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, _gloffset_MultiTexCoord3dARB), + NAME_FUNC_OFFSET( 5446, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, _gloffset_MultiTexCoord3dvARB), + NAME_FUNC_OFFSET( 5468, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, _gloffset_MultiTexCoord3fARB), + NAME_FUNC_OFFSET( 5489, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, _gloffset_MultiTexCoord3fvARB), + NAME_FUNC_OFFSET( 5511, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, _gloffset_MultiTexCoord3iARB), + NAME_FUNC_OFFSET( 5532, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, _gloffset_MultiTexCoord3ivARB), + NAME_FUNC_OFFSET( 5554, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, _gloffset_MultiTexCoord3sARB), + NAME_FUNC_OFFSET( 5575, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, _gloffset_MultiTexCoord3svARB), + NAME_FUNC_OFFSET( 5597, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, _gloffset_MultiTexCoord4dARB), + NAME_FUNC_OFFSET( 5618, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, _gloffset_MultiTexCoord4dvARB), + NAME_FUNC_OFFSET( 5640, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, _gloffset_MultiTexCoord4fARB), + NAME_FUNC_OFFSET( 5661, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, _gloffset_MultiTexCoord4fvARB), + NAME_FUNC_OFFSET( 5683, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, _gloffset_MultiTexCoord4iARB), + NAME_FUNC_OFFSET( 5704, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, _gloffset_MultiTexCoord4ivARB), + NAME_FUNC_OFFSET( 5726, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, _gloffset_MultiTexCoord4sARB), + NAME_FUNC_OFFSET( 5747, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, _gloffset_MultiTexCoord4svARB), + NAME_FUNC_OFFSET( 5769, glAttachShader, glAttachShader, NULL, _gloffset_AttachShader), + NAME_FUNC_OFFSET( 5784, glCreateProgram, glCreateProgram, NULL, _gloffset_CreateProgram), + NAME_FUNC_OFFSET( 5800, glCreateShader, glCreateShader, NULL, _gloffset_CreateShader), + NAME_FUNC_OFFSET( 5815, glDeleteProgram, glDeleteProgram, NULL, _gloffset_DeleteProgram), + NAME_FUNC_OFFSET( 5831, glDeleteShader, glDeleteShader, NULL, _gloffset_DeleteShader), + NAME_FUNC_OFFSET( 5846, glDetachShader, glDetachShader, NULL, _gloffset_DetachShader), + NAME_FUNC_OFFSET( 5861, glGetAttachedShaders, glGetAttachedShaders, NULL, _gloffset_GetAttachedShaders), + NAME_FUNC_OFFSET( 5882, glGetProgramInfoLog, glGetProgramInfoLog, NULL, _gloffset_GetProgramInfoLog), + NAME_FUNC_OFFSET( 5902, glGetProgramiv, glGetProgramiv, NULL, _gloffset_GetProgramiv), + NAME_FUNC_OFFSET( 5917, glGetShaderInfoLog, glGetShaderInfoLog, NULL, _gloffset_GetShaderInfoLog), + NAME_FUNC_OFFSET( 5936, glGetShaderiv, glGetShaderiv, NULL, _gloffset_GetShaderiv), + NAME_FUNC_OFFSET( 5950, glIsProgram, glIsProgram, NULL, _gloffset_IsProgram), + NAME_FUNC_OFFSET( 5962, glIsShader, glIsShader, NULL, _gloffset_IsShader), + NAME_FUNC_OFFSET( 5973, glStencilFuncSeparate, glStencilFuncSeparate, NULL, _gloffset_StencilFuncSeparate), + NAME_FUNC_OFFSET( 5995, glStencilMaskSeparate, glStencilMaskSeparate, NULL, _gloffset_StencilMaskSeparate), + NAME_FUNC_OFFSET( 6017, glStencilOpSeparate, glStencilOpSeparate, NULL, _gloffset_StencilOpSeparate), + NAME_FUNC_OFFSET( 6037, glUniformMatrix2x3fv, glUniformMatrix2x3fv, NULL, _gloffset_UniformMatrix2x3fv), + NAME_FUNC_OFFSET( 6058, glUniformMatrix2x4fv, glUniformMatrix2x4fv, NULL, _gloffset_UniformMatrix2x4fv), + NAME_FUNC_OFFSET( 6079, glUniformMatrix3x2fv, glUniformMatrix3x2fv, NULL, _gloffset_UniformMatrix3x2fv), + NAME_FUNC_OFFSET( 6100, glUniformMatrix3x4fv, glUniformMatrix3x4fv, NULL, _gloffset_UniformMatrix3x4fv), + NAME_FUNC_OFFSET( 6121, glUniformMatrix4x2fv, glUniformMatrix4x2fv, NULL, _gloffset_UniformMatrix4x2fv), + NAME_FUNC_OFFSET( 6142, glUniformMatrix4x3fv, glUniformMatrix4x3fv, NULL, _gloffset_UniformMatrix4x3fv), + NAME_FUNC_OFFSET( 6163, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB), + NAME_FUNC_OFFSET( 6189, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB), + NAME_FUNC_OFFSET( 6215, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB), + NAME_FUNC_OFFSET( 6241, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB), + NAME_FUNC_OFFSET( 6267, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB), + NAME_FUNC_OFFSET( 6287, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB), + NAME_FUNC_OFFSET( 6313, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB), + NAME_FUNC_OFFSET( 6339, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB), + NAME_FUNC_OFFSET( 6365, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB), + NAME_FUNC_OFFSET( 6394, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB), + NAME_FUNC_OFFSET( 6423, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB), + NAME_FUNC_OFFSET( 6452, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB), + NAME_FUNC_OFFSET( 6479, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, _gloffset_DisableVertexAttribArrayARB), + NAME_FUNC_OFFSET( 6509, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, _gloffset_EnableVertexAttribArrayARB), + NAME_FUNC_OFFSET( 6538, glGetProgramEnvParameterdvARB, glGetProgramEnvParameterdvARB, NULL, _gloffset_GetProgramEnvParameterdvARB), + NAME_FUNC_OFFSET( 6568, glGetProgramEnvParameterfvARB, glGetProgramEnvParameterfvARB, NULL, _gloffset_GetProgramEnvParameterfvARB), + NAME_FUNC_OFFSET( 6598, glGetProgramLocalParameterdvARB, glGetProgramLocalParameterdvARB, NULL, _gloffset_GetProgramLocalParameterdvARB), + NAME_FUNC_OFFSET( 6630, glGetProgramLocalParameterfvARB, glGetProgramLocalParameterfvARB, NULL, _gloffset_GetProgramLocalParameterfvARB), + NAME_FUNC_OFFSET( 6662, glGetProgramStringARB, glGetProgramStringARB, NULL, _gloffset_GetProgramStringARB), + NAME_FUNC_OFFSET( 6684, glGetProgramivARB, glGetProgramivARB, NULL, _gloffset_GetProgramivARB), + NAME_FUNC_OFFSET( 6702, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, _gloffset_GetVertexAttribdvARB), + NAME_FUNC_OFFSET( 6725, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, _gloffset_GetVertexAttribfvARB), + NAME_FUNC_OFFSET( 6748, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, _gloffset_GetVertexAttribivARB), + NAME_FUNC_OFFSET( 6771, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, _gloffset_ProgramEnvParameter4dARB), + NAME_FUNC_OFFSET( 6798, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, _gloffset_ProgramEnvParameter4dvARB), + NAME_FUNC_OFFSET( 6826, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, _gloffset_ProgramEnvParameter4fARB), + NAME_FUNC_OFFSET( 6853, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, _gloffset_ProgramEnvParameter4fvARB), + NAME_FUNC_OFFSET( 6881, glProgramLocalParameter4dARB, glProgramLocalParameter4dARB, NULL, _gloffset_ProgramLocalParameter4dARB), + NAME_FUNC_OFFSET( 6910, glProgramLocalParameter4dvARB, glProgramLocalParameter4dvARB, NULL, _gloffset_ProgramLocalParameter4dvARB), + NAME_FUNC_OFFSET( 6940, glProgramLocalParameter4fARB, glProgramLocalParameter4fARB, NULL, _gloffset_ProgramLocalParameter4fARB), + NAME_FUNC_OFFSET( 6969, glProgramLocalParameter4fvARB, glProgramLocalParameter4fvARB, NULL, _gloffset_ProgramLocalParameter4fvARB), + NAME_FUNC_OFFSET( 6999, glProgramStringARB, glProgramStringARB, NULL, _gloffset_ProgramStringARB), + NAME_FUNC_OFFSET( 7018, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, _gloffset_VertexAttrib1dARB), + NAME_FUNC_OFFSET( 7038, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, _gloffset_VertexAttrib1dvARB), + NAME_FUNC_OFFSET( 7059, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, _gloffset_VertexAttrib1fARB), + NAME_FUNC_OFFSET( 7079, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, _gloffset_VertexAttrib1fvARB), + NAME_FUNC_OFFSET( 7100, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, _gloffset_VertexAttrib1sARB), + NAME_FUNC_OFFSET( 7120, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, _gloffset_VertexAttrib1svARB), + NAME_FUNC_OFFSET( 7141, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, _gloffset_VertexAttrib2dARB), + NAME_FUNC_OFFSET( 7161, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, _gloffset_VertexAttrib2dvARB), + NAME_FUNC_OFFSET( 7182, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, _gloffset_VertexAttrib2fARB), + NAME_FUNC_OFFSET( 7202, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, _gloffset_VertexAttrib2fvARB), + NAME_FUNC_OFFSET( 7223, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, _gloffset_VertexAttrib2sARB), + NAME_FUNC_OFFSET( 7243, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, _gloffset_VertexAttrib2svARB), + NAME_FUNC_OFFSET( 7264, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, _gloffset_VertexAttrib3dARB), + NAME_FUNC_OFFSET( 7284, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, _gloffset_VertexAttrib3dvARB), + NAME_FUNC_OFFSET( 7305, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, _gloffset_VertexAttrib3fARB), + NAME_FUNC_OFFSET( 7325, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, _gloffset_VertexAttrib3fvARB), + NAME_FUNC_OFFSET( 7346, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, _gloffset_VertexAttrib3sARB), + NAME_FUNC_OFFSET( 7366, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, _gloffset_VertexAttrib3svARB), + NAME_FUNC_OFFSET( 7387, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, _gloffset_VertexAttrib4NbvARB), + NAME_FUNC_OFFSET( 7409, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, _gloffset_VertexAttrib4NivARB), + NAME_FUNC_OFFSET( 7431, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, _gloffset_VertexAttrib4NsvARB), + NAME_FUNC_OFFSET( 7453, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, _gloffset_VertexAttrib4NubARB), + NAME_FUNC_OFFSET( 7475, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB), + NAME_FUNC_OFFSET( 7498, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB), + NAME_FUNC_OFFSET( 7521, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB), + NAME_FUNC_OFFSET( 7544, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, _gloffset_VertexAttrib4bvARB), + NAME_FUNC_OFFSET( 7565, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB), + NAME_FUNC_OFFSET( 7585, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB), + NAME_FUNC_OFFSET( 7606, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB), + NAME_FUNC_OFFSET( 7626, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB), + NAME_FUNC_OFFSET( 7647, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, _gloffset_VertexAttrib4ivARB), + NAME_FUNC_OFFSET( 7668, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB), + NAME_FUNC_OFFSET( 7688, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB), + NAME_FUNC_OFFSET( 7709, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, _gloffset_VertexAttrib4ubvARB), + NAME_FUNC_OFFSET( 7731, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, _gloffset_VertexAttrib4uivARB), + NAME_FUNC_OFFSET( 7753, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, _gloffset_VertexAttrib4usvARB), + NAME_FUNC_OFFSET( 7775, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB), + NAME_FUNC_OFFSET( 7800, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB), + NAME_FUNC_OFFSET( 7816, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB), + NAME_FUNC_OFFSET( 7832, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB), + NAME_FUNC_OFFSET( 7851, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB), + NAME_FUNC_OFFSET( 7870, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB), + NAME_FUNC_OFFSET( 7886, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB), + NAME_FUNC_OFFSET( 7912, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB), + NAME_FUNC_OFFSET( 7935, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB), + NAME_FUNC_OFFSET( 7957, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB), + NAME_FUNC_OFFSET( 7971, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB), + NAME_FUNC_OFFSET( 7986, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB), + NAME_FUNC_OFFSET( 8003, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB), + NAME_FUNC_OFFSET( 8019, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB), + NAME_FUNC_OFFSET( 8038, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB), + NAME_FUNC_OFFSET( 8052, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB), + NAME_FUNC_OFFSET( 8068, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB), + NAME_FUNC_OFFSET( 8090, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB), + NAME_FUNC_OFFSET( 8113, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB), + NAME_FUNC_OFFSET( 8129, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB), + NAME_FUNC_OFFSET( 8142, glAttachObjectARB, glAttachObjectARB, NULL, _gloffset_AttachObjectARB), + NAME_FUNC_OFFSET( 8160, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB), + NAME_FUNC_OFFSET( 8179, glCreateProgramObjectARB, glCreateProgramObjectARB, NULL, _gloffset_CreateProgramObjectARB), + NAME_FUNC_OFFSET( 8204, glCreateShaderObjectARB, glCreateShaderObjectARB, NULL, _gloffset_CreateShaderObjectARB), + NAME_FUNC_OFFSET( 8228, glDeleteObjectARB, glDeleteObjectARB, NULL, _gloffset_DeleteObjectARB), + NAME_FUNC_OFFSET( 8246, glDetachObjectARB, glDetachObjectARB, NULL, _gloffset_DetachObjectARB), + NAME_FUNC_OFFSET( 8264, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB), + NAME_FUNC_OFFSET( 8286, glGetAttachedObjectsARB, glGetAttachedObjectsARB, NULL, _gloffset_GetAttachedObjectsARB), + NAME_FUNC_OFFSET( 8310, glGetHandleARB, glGetHandleARB, NULL, _gloffset_GetHandleARB), + NAME_FUNC_OFFSET( 8325, glGetInfoLogARB, glGetInfoLogARB, NULL, _gloffset_GetInfoLogARB), + NAME_FUNC_OFFSET( 8341, glGetObjectParameterfvARB, glGetObjectParameterfvARB, NULL, _gloffset_GetObjectParameterfvARB), + NAME_FUNC_OFFSET( 8367, glGetObjectParameterivARB, glGetObjectParameterivARB, NULL, _gloffset_GetObjectParameterivARB), + NAME_FUNC_OFFSET( 8393, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB), + NAME_FUNC_OFFSET( 8414, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB), + NAME_FUNC_OFFSET( 8438, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB), + NAME_FUNC_OFFSET( 8456, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB), + NAME_FUNC_OFFSET( 8474, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB), + NAME_FUNC_OFFSET( 8491, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB), + NAME_FUNC_OFFSET( 8509, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB), + NAME_FUNC_OFFSET( 8524, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB), + NAME_FUNC_OFFSET( 8540, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB), + NAME_FUNC_OFFSET( 8555, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB), + NAME_FUNC_OFFSET( 8571, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB), + NAME_FUNC_OFFSET( 8586, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB), + NAME_FUNC_OFFSET( 8602, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB), + NAME_FUNC_OFFSET( 8617, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB), + NAME_FUNC_OFFSET( 8633, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB), + NAME_FUNC_OFFSET( 8648, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB), + NAME_FUNC_OFFSET( 8664, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB), + NAME_FUNC_OFFSET( 8679, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB), + NAME_FUNC_OFFSET( 8695, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB), + NAME_FUNC_OFFSET( 8710, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB), + NAME_FUNC_OFFSET( 8726, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB), + NAME_FUNC_OFFSET( 8741, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB), + NAME_FUNC_OFFSET( 8757, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB), + NAME_FUNC_OFFSET( 8779, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB), + NAME_FUNC_OFFSET( 8801, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB), + NAME_FUNC_OFFSET( 8823, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB), + NAME_FUNC_OFFSET( 8845, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB), + NAME_FUNC_OFFSET( 8866, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB), + NAME_FUNC_OFFSET( 8890, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB), + NAME_FUNC_OFFSET( 8911, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB), + NAME_FUNC_OFFSET( 8934, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB), + NAME_FUNC_OFFSET( 8951, glPolygonOffsetEXT, glPolygonOffsetEXT, NULL, _gloffset_PolygonOffsetEXT), + NAME_FUNC_OFFSET( 8970, gl_dispatch_stub_562, gl_dispatch_stub_562, NULL, _gloffset_GetPixelTexGenParameterfvSGIS), + NAME_FUNC_OFFSET( 9002, gl_dispatch_stub_563, gl_dispatch_stub_563, NULL, _gloffset_GetPixelTexGenParameterivSGIS), + NAME_FUNC_OFFSET( 9034, gl_dispatch_stub_564, gl_dispatch_stub_564, NULL, _gloffset_PixelTexGenParameterfSGIS), + NAME_FUNC_OFFSET( 9062, gl_dispatch_stub_565, gl_dispatch_stub_565, NULL, _gloffset_PixelTexGenParameterfvSGIS), + NAME_FUNC_OFFSET( 9091, gl_dispatch_stub_566, gl_dispatch_stub_566, NULL, _gloffset_PixelTexGenParameteriSGIS), + NAME_FUNC_OFFSET( 9119, gl_dispatch_stub_567, gl_dispatch_stub_567, NULL, _gloffset_PixelTexGenParameterivSGIS), + NAME_FUNC_OFFSET( 9148, gl_dispatch_stub_568, gl_dispatch_stub_568, NULL, _gloffset_SampleMaskSGIS), + NAME_FUNC_OFFSET( 9165, gl_dispatch_stub_569, gl_dispatch_stub_569, NULL, _gloffset_SamplePatternSGIS), + NAME_FUNC_OFFSET( 9185, glColorPointerEXT, glColorPointerEXT, NULL, _gloffset_ColorPointerEXT), + NAME_FUNC_OFFSET( 9203, glEdgeFlagPointerEXT, glEdgeFlagPointerEXT, NULL, _gloffset_EdgeFlagPointerEXT), + NAME_FUNC_OFFSET( 9224, glIndexPointerEXT, glIndexPointerEXT, NULL, _gloffset_IndexPointerEXT), + NAME_FUNC_OFFSET( 9242, glNormalPointerEXT, glNormalPointerEXT, NULL, _gloffset_NormalPointerEXT), + NAME_FUNC_OFFSET( 9261, glTexCoordPointerEXT, glTexCoordPointerEXT, NULL, _gloffset_TexCoordPointerEXT), + NAME_FUNC_OFFSET( 9282, glVertexPointerEXT, glVertexPointerEXT, NULL, _gloffset_VertexPointerEXT), + NAME_FUNC_OFFSET( 9301, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), + NAME_FUNC_OFFSET( 9322, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), + NAME_FUNC_OFFSET( 9344, glLockArraysEXT, glLockArraysEXT, NULL, _gloffset_LockArraysEXT), + NAME_FUNC_OFFSET( 9360, glUnlockArraysEXT, glUnlockArraysEXT, NULL, _gloffset_UnlockArraysEXT), + NAME_FUNC_OFFSET( 9378, gl_dispatch_stub_580, gl_dispatch_stub_580, NULL, _gloffset_CullParameterdvEXT), + NAME_FUNC_OFFSET( 9399, gl_dispatch_stub_581, gl_dispatch_stub_581, NULL, _gloffset_CullParameterfvEXT), + NAME_FUNC_OFFSET( 9420, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT), + NAME_FUNC_OFFSET( 9442, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT), + NAME_FUNC_OFFSET( 9465, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT), + NAME_FUNC_OFFSET( 9487, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT), + NAME_FUNC_OFFSET( 9510, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT), + NAME_FUNC_OFFSET( 9532, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT), + NAME_FUNC_OFFSET( 9555, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT), + NAME_FUNC_OFFSET( 9577, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT), + NAME_FUNC_OFFSET( 9600, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT), + NAME_FUNC_OFFSET( 9622, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT), + NAME_FUNC_OFFSET( 9645, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT), + NAME_FUNC_OFFSET( 9668, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT), + NAME_FUNC_OFFSET( 9692, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT), + NAME_FUNC_OFFSET( 9715, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT), + NAME_FUNC_OFFSET( 9739, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT), + NAME_FUNC_OFFSET( 9762, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT), + NAME_FUNC_OFFSET( 9786, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT), + NAME_FUNC_OFFSET( 9813, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT), + NAME_FUNC_OFFSET( 9834, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT), + NAME_FUNC_OFFSET( 9857, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT), + NAME_FUNC_OFFSET( 9878, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT), + NAME_FUNC_OFFSET( 9893, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT), + NAME_FUNC_OFFSET( 9909, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT), + NAME_FUNC_OFFSET( 9924, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT), + NAME_FUNC_OFFSET( 9940, gl_dispatch_stub_606, gl_dispatch_stub_606, NULL, _gloffset_PixelTexGenSGIX), + NAME_FUNC_OFFSET( 9958, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT), + NAME_FUNC_OFFSET( 9981, glFlushVertexArrayRangeNV, glFlushVertexArrayRangeNV, NULL, _gloffset_FlushVertexArrayRangeNV), + NAME_FUNC_OFFSET(10007, glVertexArrayRangeNV, glVertexArrayRangeNV, NULL, _gloffset_VertexArrayRangeNV), + NAME_FUNC_OFFSET(10028, glCombinerInputNV, glCombinerInputNV, NULL, _gloffset_CombinerInputNV), + NAME_FUNC_OFFSET(10046, glCombinerOutputNV, glCombinerOutputNV, NULL, _gloffset_CombinerOutputNV), + NAME_FUNC_OFFSET(10065, glCombinerParameterfNV, glCombinerParameterfNV, NULL, _gloffset_CombinerParameterfNV), + NAME_FUNC_OFFSET(10088, glCombinerParameterfvNV, glCombinerParameterfvNV, NULL, _gloffset_CombinerParameterfvNV), + NAME_FUNC_OFFSET(10112, glCombinerParameteriNV, glCombinerParameteriNV, NULL, _gloffset_CombinerParameteriNV), + NAME_FUNC_OFFSET(10135, glCombinerParameterivNV, glCombinerParameterivNV, NULL, _gloffset_CombinerParameterivNV), + NAME_FUNC_OFFSET(10159, glFinalCombinerInputNV, glFinalCombinerInputNV, NULL, _gloffset_FinalCombinerInputNV), + NAME_FUNC_OFFSET(10182, glGetCombinerInputParameterfvNV, glGetCombinerInputParameterfvNV, NULL, _gloffset_GetCombinerInputParameterfvNV), + NAME_FUNC_OFFSET(10214, glGetCombinerInputParameterivNV, glGetCombinerInputParameterivNV, NULL, _gloffset_GetCombinerInputParameterivNV), + NAME_FUNC_OFFSET(10246, glGetCombinerOutputParameterfvNV, glGetCombinerOutputParameterfvNV, NULL, _gloffset_GetCombinerOutputParameterfvNV), + NAME_FUNC_OFFSET(10279, glGetCombinerOutputParameterivNV, glGetCombinerOutputParameterivNV, NULL, _gloffset_GetCombinerOutputParameterivNV), + NAME_FUNC_OFFSET(10312, glGetFinalCombinerInputParameterfvNV, glGetFinalCombinerInputParameterfvNV, NULL, _gloffset_GetFinalCombinerInputParameterfvNV), + NAME_FUNC_OFFSET(10349, glGetFinalCombinerInputParameterivNV, glGetFinalCombinerInputParameterivNV, NULL, _gloffset_GetFinalCombinerInputParameterivNV), + NAME_FUNC_OFFSET(10386, glResizeBuffersMESA, glResizeBuffersMESA, NULL, _gloffset_ResizeBuffersMESA), + NAME_FUNC_OFFSET(10406, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA), + NAME_FUNC_OFFSET(10424, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA), + NAME_FUNC_OFFSET(10443, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA), + NAME_FUNC_OFFSET(10461, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA), + NAME_FUNC_OFFSET(10480, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA), + NAME_FUNC_OFFSET(10498, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA), + NAME_FUNC_OFFSET(10517, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA), + NAME_FUNC_OFFSET(10535, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA), + NAME_FUNC_OFFSET(10554, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA), + NAME_FUNC_OFFSET(10572, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA), + NAME_FUNC_OFFSET(10591, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA), + NAME_FUNC_OFFSET(10609, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA), + NAME_FUNC_OFFSET(10628, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA), + NAME_FUNC_OFFSET(10646, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA), + NAME_FUNC_OFFSET(10665, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA), + NAME_FUNC_OFFSET(10683, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA), + NAME_FUNC_OFFSET(10702, glWindowPos4dMESA, glWindowPos4dMESA, NULL, _gloffset_WindowPos4dMESA), + NAME_FUNC_OFFSET(10720, glWindowPos4dvMESA, glWindowPos4dvMESA, NULL, _gloffset_WindowPos4dvMESA), + NAME_FUNC_OFFSET(10739, glWindowPos4fMESA, glWindowPos4fMESA, NULL, _gloffset_WindowPos4fMESA), + NAME_FUNC_OFFSET(10757, glWindowPos4fvMESA, glWindowPos4fvMESA, NULL, _gloffset_WindowPos4fvMESA), + NAME_FUNC_OFFSET(10776, glWindowPos4iMESA, glWindowPos4iMESA, NULL, _gloffset_WindowPos4iMESA), + NAME_FUNC_OFFSET(10794, glWindowPos4ivMESA, glWindowPos4ivMESA, NULL, _gloffset_WindowPos4ivMESA), + NAME_FUNC_OFFSET(10813, glWindowPos4sMESA, glWindowPos4sMESA, NULL, _gloffset_WindowPos4sMESA), + NAME_FUNC_OFFSET(10831, glWindowPos4svMESA, glWindowPos4svMESA, NULL, _gloffset_WindowPos4svMESA), + NAME_FUNC_OFFSET(10850, gl_dispatch_stub_648, gl_dispatch_stub_648, NULL, _gloffset_MultiModeDrawArraysIBM), + NAME_FUNC_OFFSET(10875, gl_dispatch_stub_649, gl_dispatch_stub_649, NULL, _gloffset_MultiModeDrawElementsIBM), + NAME_FUNC_OFFSET(10902, gl_dispatch_stub_650, gl_dispatch_stub_650, NULL, _gloffset_DeleteFencesNV), + NAME_FUNC_OFFSET(10919, gl_dispatch_stub_651, gl_dispatch_stub_651, NULL, _gloffset_FinishFenceNV), + NAME_FUNC_OFFSET(10935, gl_dispatch_stub_652, gl_dispatch_stub_652, NULL, _gloffset_GenFencesNV), + NAME_FUNC_OFFSET(10949, gl_dispatch_stub_653, gl_dispatch_stub_653, NULL, _gloffset_GetFenceivNV), + NAME_FUNC_OFFSET(10964, gl_dispatch_stub_654, gl_dispatch_stub_654, NULL, _gloffset_IsFenceNV), + NAME_FUNC_OFFSET(10976, gl_dispatch_stub_655, gl_dispatch_stub_655, NULL, _gloffset_SetFenceNV), + NAME_FUNC_OFFSET(10989, gl_dispatch_stub_656, gl_dispatch_stub_656, NULL, _gloffset_TestFenceNV), + NAME_FUNC_OFFSET(11003, glAreProgramsResidentNV, glAreProgramsResidentNV, NULL, _gloffset_AreProgramsResidentNV), + NAME_FUNC_OFFSET(11027, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV), + NAME_FUNC_OFFSET(11043, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV), + NAME_FUNC_OFFSET(11062, glExecuteProgramNV, glExecuteProgramNV, NULL, _gloffset_ExecuteProgramNV), + NAME_FUNC_OFFSET(11081, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV), + NAME_FUNC_OFFSET(11097, glGetProgramParameterdvNV, glGetProgramParameterdvNV, NULL, _gloffset_GetProgramParameterdvNV), + NAME_FUNC_OFFSET(11123, glGetProgramParameterfvNV, glGetProgramParameterfvNV, NULL, _gloffset_GetProgramParameterfvNV), + NAME_FUNC_OFFSET(11149, glGetProgramStringNV, glGetProgramStringNV, NULL, _gloffset_GetProgramStringNV), + NAME_FUNC_OFFSET(11170, glGetProgramivNV, glGetProgramivNV, NULL, _gloffset_GetProgramivNV), + NAME_FUNC_OFFSET(11187, glGetTrackMatrixivNV, glGetTrackMatrixivNV, NULL, _gloffset_GetTrackMatrixivNV), + NAME_FUNC_OFFSET(11208, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV), + NAME_FUNC_OFFSET(11236, glGetVertexAttribdvNV, glGetVertexAttribdvNV, NULL, _gloffset_GetVertexAttribdvNV), + NAME_FUNC_OFFSET(11258, glGetVertexAttribfvNV, glGetVertexAttribfvNV, NULL, _gloffset_GetVertexAttribfvNV), + NAME_FUNC_OFFSET(11280, glGetVertexAttribivNV, glGetVertexAttribivNV, NULL, _gloffset_GetVertexAttribivNV), + NAME_FUNC_OFFSET(11302, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV), + NAME_FUNC_OFFSET(11316, glLoadProgramNV, glLoadProgramNV, NULL, _gloffset_LoadProgramNV), + NAME_FUNC_OFFSET(11332, glProgramParameters4dvNV, glProgramParameters4dvNV, NULL, _gloffset_ProgramParameters4dvNV), + NAME_FUNC_OFFSET(11357, glProgramParameters4fvNV, glProgramParameters4fvNV, NULL, _gloffset_ProgramParameters4fvNV), + NAME_FUNC_OFFSET(11382, glRequestResidentProgramsNV, glRequestResidentProgramsNV, NULL, _gloffset_RequestResidentProgramsNV), + NAME_FUNC_OFFSET(11410, glTrackMatrixNV, glTrackMatrixNV, NULL, _gloffset_TrackMatrixNV), + NAME_FUNC_OFFSET(11426, glVertexAttrib1dNV, glVertexAttrib1dNV, NULL, _gloffset_VertexAttrib1dNV), + NAME_FUNC_OFFSET(11445, glVertexAttrib1dvNV, glVertexAttrib1dvNV, NULL, _gloffset_VertexAttrib1dvNV), + NAME_FUNC_OFFSET(11465, glVertexAttrib1fNV, glVertexAttrib1fNV, NULL, _gloffset_VertexAttrib1fNV), + NAME_FUNC_OFFSET(11484, glVertexAttrib1fvNV, glVertexAttrib1fvNV, NULL, _gloffset_VertexAttrib1fvNV), + NAME_FUNC_OFFSET(11504, glVertexAttrib1sNV, glVertexAttrib1sNV, NULL, _gloffset_VertexAttrib1sNV), + NAME_FUNC_OFFSET(11523, glVertexAttrib1svNV, glVertexAttrib1svNV, NULL, _gloffset_VertexAttrib1svNV), + NAME_FUNC_OFFSET(11543, glVertexAttrib2dNV, glVertexAttrib2dNV, NULL, _gloffset_VertexAttrib2dNV), + NAME_FUNC_OFFSET(11562, glVertexAttrib2dvNV, glVertexAttrib2dvNV, NULL, _gloffset_VertexAttrib2dvNV), + NAME_FUNC_OFFSET(11582, glVertexAttrib2fNV, glVertexAttrib2fNV, NULL, _gloffset_VertexAttrib2fNV), + NAME_FUNC_OFFSET(11601, glVertexAttrib2fvNV, glVertexAttrib2fvNV, NULL, _gloffset_VertexAttrib2fvNV), + NAME_FUNC_OFFSET(11621, glVertexAttrib2sNV, glVertexAttrib2sNV, NULL, _gloffset_VertexAttrib2sNV), + NAME_FUNC_OFFSET(11640, glVertexAttrib2svNV, glVertexAttrib2svNV, NULL, _gloffset_VertexAttrib2svNV), + NAME_FUNC_OFFSET(11660, glVertexAttrib3dNV, glVertexAttrib3dNV, NULL, _gloffset_VertexAttrib3dNV), + NAME_FUNC_OFFSET(11679, glVertexAttrib3dvNV, glVertexAttrib3dvNV, NULL, _gloffset_VertexAttrib3dvNV), + NAME_FUNC_OFFSET(11699, glVertexAttrib3fNV, glVertexAttrib3fNV, NULL, _gloffset_VertexAttrib3fNV), + NAME_FUNC_OFFSET(11718, glVertexAttrib3fvNV, glVertexAttrib3fvNV, NULL, _gloffset_VertexAttrib3fvNV), + NAME_FUNC_OFFSET(11738, glVertexAttrib3sNV, glVertexAttrib3sNV, NULL, _gloffset_VertexAttrib3sNV), + NAME_FUNC_OFFSET(11757, glVertexAttrib3svNV, glVertexAttrib3svNV, NULL, _gloffset_VertexAttrib3svNV), + NAME_FUNC_OFFSET(11777, glVertexAttrib4dNV, glVertexAttrib4dNV, NULL, _gloffset_VertexAttrib4dNV), + NAME_FUNC_OFFSET(11796, glVertexAttrib4dvNV, glVertexAttrib4dvNV, NULL, _gloffset_VertexAttrib4dvNV), + NAME_FUNC_OFFSET(11816, glVertexAttrib4fNV, glVertexAttrib4fNV, NULL, _gloffset_VertexAttrib4fNV), + NAME_FUNC_OFFSET(11835, glVertexAttrib4fvNV, glVertexAttrib4fvNV, NULL, _gloffset_VertexAttrib4fvNV), + NAME_FUNC_OFFSET(11855, glVertexAttrib4sNV, glVertexAttrib4sNV, NULL, _gloffset_VertexAttrib4sNV), + NAME_FUNC_OFFSET(11874, glVertexAttrib4svNV, glVertexAttrib4svNV, NULL, _gloffset_VertexAttrib4svNV), + NAME_FUNC_OFFSET(11894, glVertexAttrib4ubNV, glVertexAttrib4ubNV, NULL, _gloffset_VertexAttrib4ubNV), + NAME_FUNC_OFFSET(11914, glVertexAttrib4ubvNV, glVertexAttrib4ubvNV, NULL, _gloffset_VertexAttrib4ubvNV), + NAME_FUNC_OFFSET(11935, glVertexAttribPointerNV, glVertexAttribPointerNV, NULL, _gloffset_VertexAttribPointerNV), + NAME_FUNC_OFFSET(11959, glVertexAttribs1dvNV, glVertexAttribs1dvNV, NULL, _gloffset_VertexAttribs1dvNV), + NAME_FUNC_OFFSET(11980, glVertexAttribs1fvNV, glVertexAttribs1fvNV, NULL, _gloffset_VertexAttribs1fvNV), + NAME_FUNC_OFFSET(12001, glVertexAttribs1svNV, glVertexAttribs1svNV, NULL, _gloffset_VertexAttribs1svNV), + NAME_FUNC_OFFSET(12022, glVertexAttribs2dvNV, glVertexAttribs2dvNV, NULL, _gloffset_VertexAttribs2dvNV), + NAME_FUNC_OFFSET(12043, glVertexAttribs2fvNV, glVertexAttribs2fvNV, NULL, _gloffset_VertexAttribs2fvNV), + NAME_FUNC_OFFSET(12064, glVertexAttribs2svNV, glVertexAttribs2svNV, NULL, _gloffset_VertexAttribs2svNV), + NAME_FUNC_OFFSET(12085, glVertexAttribs3dvNV, glVertexAttribs3dvNV, NULL, _gloffset_VertexAttribs3dvNV), + NAME_FUNC_OFFSET(12106, glVertexAttribs3fvNV, glVertexAttribs3fvNV, NULL, _gloffset_VertexAttribs3fvNV), + NAME_FUNC_OFFSET(12127, glVertexAttribs3svNV, glVertexAttribs3svNV, NULL, _gloffset_VertexAttribs3svNV), + NAME_FUNC_OFFSET(12148, glVertexAttribs4dvNV, glVertexAttribs4dvNV, NULL, _gloffset_VertexAttribs4dvNV), + NAME_FUNC_OFFSET(12169, glVertexAttribs4fvNV, glVertexAttribs4fvNV, NULL, _gloffset_VertexAttribs4fvNV), + NAME_FUNC_OFFSET(12190, glVertexAttribs4svNV, glVertexAttribs4svNV, NULL, _gloffset_VertexAttribs4svNV), + NAME_FUNC_OFFSET(12211, glVertexAttribs4ubvNV, glVertexAttribs4ubvNV, NULL, _gloffset_VertexAttribs4ubvNV), + NAME_FUNC_OFFSET(12233, glAlphaFragmentOp1ATI, glAlphaFragmentOp1ATI, NULL, _gloffset_AlphaFragmentOp1ATI), + NAME_FUNC_OFFSET(12255, glAlphaFragmentOp2ATI, glAlphaFragmentOp2ATI, NULL, _gloffset_AlphaFragmentOp2ATI), + NAME_FUNC_OFFSET(12277, glAlphaFragmentOp3ATI, glAlphaFragmentOp3ATI, NULL, _gloffset_AlphaFragmentOp3ATI), + NAME_FUNC_OFFSET(12299, glBeginFragmentShaderATI, glBeginFragmentShaderATI, NULL, _gloffset_BeginFragmentShaderATI), + NAME_FUNC_OFFSET(12324, glBindFragmentShaderATI, glBindFragmentShaderATI, NULL, _gloffset_BindFragmentShaderATI), + NAME_FUNC_OFFSET(12348, glColorFragmentOp1ATI, glColorFragmentOp1ATI, NULL, _gloffset_ColorFragmentOp1ATI), + NAME_FUNC_OFFSET(12370, glColorFragmentOp2ATI, glColorFragmentOp2ATI, NULL, _gloffset_ColorFragmentOp2ATI), + NAME_FUNC_OFFSET(12392, glColorFragmentOp3ATI, glColorFragmentOp3ATI, NULL, _gloffset_ColorFragmentOp3ATI), + NAME_FUNC_OFFSET(12414, glDeleteFragmentShaderATI, glDeleteFragmentShaderATI, NULL, _gloffset_DeleteFragmentShaderATI), + NAME_FUNC_OFFSET(12440, glEndFragmentShaderATI, glEndFragmentShaderATI, NULL, _gloffset_EndFragmentShaderATI), + NAME_FUNC_OFFSET(12463, glGenFragmentShadersATI, glGenFragmentShadersATI, NULL, _gloffset_GenFragmentShadersATI), + NAME_FUNC_OFFSET(12487, glPassTexCoordATI, glPassTexCoordATI, NULL, _gloffset_PassTexCoordATI), + NAME_FUNC_OFFSET(12505, glSampleMapATI, glSampleMapATI, NULL, _gloffset_SampleMapATI), + NAME_FUNC_OFFSET(12520, glSetFragmentShaderConstantATI, glSetFragmentShaderConstantATI, NULL, _gloffset_SetFragmentShaderConstantATI), + NAME_FUNC_OFFSET(12551, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV), + NAME_FUNC_OFFSET(12571, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV), + NAME_FUNC_OFFSET(12592, gl_dispatch_stub_733, gl_dispatch_stub_733, NULL, _gloffset_ActiveStencilFaceEXT), + NAME_FUNC_OFFSET(12615, gl_dispatch_stub_734, gl_dispatch_stub_734, NULL, _gloffset_BindVertexArrayAPPLE), + NAME_FUNC_OFFSET(12638, gl_dispatch_stub_735, gl_dispatch_stub_735, NULL, _gloffset_DeleteVertexArraysAPPLE), + NAME_FUNC_OFFSET(12664, gl_dispatch_stub_736, gl_dispatch_stub_736, NULL, _gloffset_GenVertexArraysAPPLE), + NAME_FUNC_OFFSET(12687, gl_dispatch_stub_737, gl_dispatch_stub_737, NULL, _gloffset_IsVertexArrayAPPLE), + NAME_FUNC_OFFSET(12708, glGetProgramNamedParameterdvNV, glGetProgramNamedParameterdvNV, NULL, _gloffset_GetProgramNamedParameterdvNV), + NAME_FUNC_OFFSET(12739, glGetProgramNamedParameterfvNV, glGetProgramNamedParameterfvNV, NULL, _gloffset_GetProgramNamedParameterfvNV), + NAME_FUNC_OFFSET(12770, glProgramNamedParameter4dNV, glProgramNamedParameter4dNV, NULL, _gloffset_ProgramNamedParameter4dNV), + NAME_FUNC_OFFSET(12798, glProgramNamedParameter4dvNV, glProgramNamedParameter4dvNV, NULL, _gloffset_ProgramNamedParameter4dvNV), + NAME_FUNC_OFFSET(12827, glProgramNamedParameter4fNV, glProgramNamedParameter4fNV, NULL, _gloffset_ProgramNamedParameter4fNV), + NAME_FUNC_OFFSET(12855, glProgramNamedParameter4fvNV, glProgramNamedParameter4fvNV, NULL, _gloffset_ProgramNamedParameter4fvNV), + NAME_FUNC_OFFSET(12884, gl_dispatch_stub_744, gl_dispatch_stub_744, NULL, _gloffset_DepthBoundsEXT), + NAME_FUNC_OFFSET(12901, gl_dispatch_stub_745, gl_dispatch_stub_745, NULL, _gloffset_BlendEquationSeparateEXT), + NAME_FUNC_OFFSET(12928, glBindFramebufferEXT, glBindFramebufferEXT, NULL, _gloffset_BindFramebufferEXT), + NAME_FUNC_OFFSET(12949, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, _gloffset_BindRenderbufferEXT), + NAME_FUNC_OFFSET(12971, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, _gloffset_CheckFramebufferStatusEXT), + NAME_FUNC_OFFSET(12999, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, _gloffset_DeleteFramebuffersEXT), + NAME_FUNC_OFFSET(13023, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, _gloffset_DeleteRenderbuffersEXT), + NAME_FUNC_OFFSET(13048, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, _gloffset_FramebufferRenderbufferEXT), + NAME_FUNC_OFFSET(13077, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, _gloffset_FramebufferTexture1DEXT), + NAME_FUNC_OFFSET(13103, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, _gloffset_FramebufferTexture2DEXT), + NAME_FUNC_OFFSET(13129, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, _gloffset_FramebufferTexture3DEXT), + NAME_FUNC_OFFSET(13155, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, _gloffset_GenFramebuffersEXT), + NAME_FUNC_OFFSET(13176, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, _gloffset_GenRenderbuffersEXT), + NAME_FUNC_OFFSET(13198, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, _gloffset_GenerateMipmapEXT), + NAME_FUNC_OFFSET(13218, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, _gloffset_GetFramebufferAttachmentParameterivEXT), + NAME_FUNC_OFFSET(13259, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, _gloffset_GetRenderbufferParameterivEXT), + NAME_FUNC_OFFSET(13291, glIsFramebufferEXT, glIsFramebufferEXT, NULL, _gloffset_IsFramebufferEXT), + NAME_FUNC_OFFSET(13310, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, _gloffset_IsRenderbufferEXT), + NAME_FUNC_OFFSET(13330, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, _gloffset_RenderbufferStorageEXT), + NAME_FUNC_OFFSET(13355, gl_dispatch_stub_763, gl_dispatch_stub_763, NULL, _gloffset_BlitFramebufferEXT), + NAME_FUNC_OFFSET(13376, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, _gloffset_FramebufferTextureLayerEXT), + NAME_FUNC_OFFSET(13405, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_StencilFuncSeparateATI), + NAME_FUNC_OFFSET(13430, gl_dispatch_stub_766, gl_dispatch_stub_766, NULL, _gloffset_ProgramEnvParameters4fvEXT), + NAME_FUNC_OFFSET(13459, gl_dispatch_stub_767, gl_dispatch_stub_767, NULL, _gloffset_ProgramLocalParameters4fvEXT), + NAME_FUNC_OFFSET(13490, gl_dispatch_stub_768, gl_dispatch_stub_768, NULL, _gloffset_GetQueryObjecti64vEXT), + NAME_FUNC_OFFSET(13514, gl_dispatch_stub_769, gl_dispatch_stub_769, NULL, _gloffset_GetQueryObjectui64vEXT), + NAME_FUNC_OFFSET(13539, glArrayElement, glArrayElement, NULL, _gloffset_ArrayElement), + NAME_FUNC_OFFSET(13557, glBindTexture, glBindTexture, NULL, _gloffset_BindTexture), + NAME_FUNC_OFFSET(13574, glDrawArrays, glDrawArrays, NULL, _gloffset_DrawArrays), + NAME_FUNC_OFFSET(13590, glAreTexturesResident, glAreTexturesResidentEXT, glAreTexturesResidentEXT, _gloffset_AreTexturesResident), + NAME_FUNC_OFFSET(13615, glCopyTexImage1D, glCopyTexImage1D, NULL, _gloffset_CopyTexImage1D), + NAME_FUNC_OFFSET(13635, glCopyTexImage2D, glCopyTexImage2D, NULL, _gloffset_CopyTexImage2D), + NAME_FUNC_OFFSET(13655, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, _gloffset_CopyTexSubImage1D), + NAME_FUNC_OFFSET(13678, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, _gloffset_CopyTexSubImage2D), + NAME_FUNC_OFFSET(13701, glDeleteTextures, glDeleteTexturesEXT, glDeleteTexturesEXT, _gloffset_DeleteTextures), + NAME_FUNC_OFFSET(13721, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, _gloffset_GenTextures), + NAME_FUNC_OFFSET(13738, glGetPointerv, glGetPointerv, NULL, _gloffset_GetPointerv), + NAME_FUNC_OFFSET(13755, glIsTexture, glIsTextureEXT, glIsTextureEXT, _gloffset_IsTexture), + NAME_FUNC_OFFSET(13770, glPrioritizeTextures, glPrioritizeTextures, NULL, _gloffset_PrioritizeTextures), + NAME_FUNC_OFFSET(13794, glTexSubImage1D, glTexSubImage1D, NULL, _gloffset_TexSubImage1D), + NAME_FUNC_OFFSET(13813, glTexSubImage2D, glTexSubImage2D, NULL, _gloffset_TexSubImage2D), + NAME_FUNC_OFFSET(13832, glBlendColor, glBlendColor, NULL, _gloffset_BlendColor), + NAME_FUNC_OFFSET(13848, glBlendEquation, glBlendEquation, NULL, _gloffset_BlendEquation), + NAME_FUNC_OFFSET(13867, glDrawRangeElements, glDrawRangeElements, NULL, _gloffset_DrawRangeElements), + NAME_FUNC_OFFSET(13890, glColorTable, glColorTable, NULL, _gloffset_ColorTable), + NAME_FUNC_OFFSET(13906, glColorTable, glColorTable, NULL, _gloffset_ColorTable), + NAME_FUNC_OFFSET(13922, glColorTableParameterfv, glColorTableParameterfv, NULL, _gloffset_ColorTableParameterfv), + NAME_FUNC_OFFSET(13949, glColorTableParameteriv, glColorTableParameteriv, NULL, _gloffset_ColorTableParameteriv), + NAME_FUNC_OFFSET(13976, glCopyColorTable, glCopyColorTable, NULL, _gloffset_CopyColorTable), + NAME_FUNC_OFFSET(13996, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable), + NAME_FUNC_OFFSET(14015, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable), + NAME_FUNC_OFFSET(14034, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv), + NAME_FUNC_OFFSET(14064, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv), + NAME_FUNC_OFFSET(14094, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv), + NAME_FUNC_OFFSET(14124, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv), + NAME_FUNC_OFFSET(14154, glColorSubTable, glColorSubTable, NULL, _gloffset_ColorSubTable), + NAME_FUNC_OFFSET(14173, glCopyColorSubTable, glCopyColorSubTable, NULL, _gloffset_CopyColorSubTable), + NAME_FUNC_OFFSET(14196, glConvolutionFilter1D, glConvolutionFilter1D, NULL, _gloffset_ConvolutionFilter1D), + NAME_FUNC_OFFSET(14221, glConvolutionFilter2D, glConvolutionFilter2D, NULL, _gloffset_ConvolutionFilter2D), + NAME_FUNC_OFFSET(14246, glConvolutionParameterf, glConvolutionParameterf, NULL, _gloffset_ConvolutionParameterf), + NAME_FUNC_OFFSET(14273, glConvolutionParameterfv, glConvolutionParameterfv, NULL, _gloffset_ConvolutionParameterfv), + NAME_FUNC_OFFSET(14301, glConvolutionParameteri, glConvolutionParameteri, NULL, _gloffset_ConvolutionParameteri), + NAME_FUNC_OFFSET(14328, glConvolutionParameteriv, glConvolutionParameteriv, NULL, _gloffset_ConvolutionParameteriv), + NAME_FUNC_OFFSET(14356, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, _gloffset_CopyConvolutionFilter1D), + NAME_FUNC_OFFSET(14385, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, _gloffset_CopyConvolutionFilter2D), + NAME_FUNC_OFFSET(14414, glGetConvolutionFilter, gl_dispatch_stub_356, gl_dispatch_stub_356, _gloffset_GetConvolutionFilter), + NAME_FUNC_OFFSET(14440, glGetConvolutionParameterfv, gl_dispatch_stub_357, gl_dispatch_stub_357, _gloffset_GetConvolutionParameterfv), + NAME_FUNC_OFFSET(14471, glGetConvolutionParameteriv, gl_dispatch_stub_358, gl_dispatch_stub_358, _gloffset_GetConvolutionParameteriv), + NAME_FUNC_OFFSET(14502, glGetSeparableFilter, gl_dispatch_stub_359, gl_dispatch_stub_359, _gloffset_GetSeparableFilter), + NAME_FUNC_OFFSET(14526, glSeparableFilter2D, glSeparableFilter2D, NULL, _gloffset_SeparableFilter2D), + NAME_FUNC_OFFSET(14549, glGetHistogram, gl_dispatch_stub_361, gl_dispatch_stub_361, _gloffset_GetHistogram), + NAME_FUNC_OFFSET(14567, glGetHistogramParameterfv, gl_dispatch_stub_362, gl_dispatch_stub_362, _gloffset_GetHistogramParameterfv), + NAME_FUNC_OFFSET(14596, glGetHistogramParameteriv, gl_dispatch_stub_363, gl_dispatch_stub_363, _gloffset_GetHistogramParameteriv), + NAME_FUNC_OFFSET(14625, glGetMinmax, gl_dispatch_stub_364, gl_dispatch_stub_364, _gloffset_GetMinmax), + NAME_FUNC_OFFSET(14640, glGetMinmaxParameterfv, gl_dispatch_stub_365, gl_dispatch_stub_365, _gloffset_GetMinmaxParameterfv), + NAME_FUNC_OFFSET(14666, glGetMinmaxParameteriv, gl_dispatch_stub_366, gl_dispatch_stub_366, _gloffset_GetMinmaxParameteriv), + NAME_FUNC_OFFSET(14692, glHistogram, glHistogram, NULL, _gloffset_Histogram), + NAME_FUNC_OFFSET(14707, glMinmax, glMinmax, NULL, _gloffset_Minmax), + NAME_FUNC_OFFSET(14719, glResetHistogram, glResetHistogram, NULL, _gloffset_ResetHistogram), + NAME_FUNC_OFFSET(14739, glResetMinmax, glResetMinmax, NULL, _gloffset_ResetMinmax), + NAME_FUNC_OFFSET(14756, glTexImage3D, glTexImage3D, NULL, _gloffset_TexImage3D), + NAME_FUNC_OFFSET(14772, glTexSubImage3D, glTexSubImage3D, NULL, _gloffset_TexSubImage3D), + NAME_FUNC_OFFSET(14791, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, _gloffset_CopyTexSubImage3D), + NAME_FUNC_OFFSET(14814, glActiveTextureARB, glActiveTextureARB, NULL, _gloffset_ActiveTextureARB), + NAME_FUNC_OFFSET(14830, glClientActiveTextureARB, glClientActiveTextureARB, NULL, _gloffset_ClientActiveTextureARB), + NAME_FUNC_OFFSET(14852, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, _gloffset_MultiTexCoord1dARB), + NAME_FUNC_OFFSET(14870, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, _gloffset_MultiTexCoord1dvARB), + NAME_FUNC_OFFSET(14889, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, _gloffset_MultiTexCoord1fARB), + NAME_FUNC_OFFSET(14907, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, _gloffset_MultiTexCoord1fvARB), + NAME_FUNC_OFFSET(14926, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, _gloffset_MultiTexCoord1iARB), + NAME_FUNC_OFFSET(14944, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, _gloffset_MultiTexCoord1ivARB), + NAME_FUNC_OFFSET(14963, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, _gloffset_MultiTexCoord1sARB), + NAME_FUNC_OFFSET(14981, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, _gloffset_MultiTexCoord1svARB), + NAME_FUNC_OFFSET(15000, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, _gloffset_MultiTexCoord2dARB), + NAME_FUNC_OFFSET(15018, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, _gloffset_MultiTexCoord2dvARB), + NAME_FUNC_OFFSET(15037, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, _gloffset_MultiTexCoord2fARB), + NAME_FUNC_OFFSET(15055, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, _gloffset_MultiTexCoord2fvARB), + NAME_FUNC_OFFSET(15074, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, _gloffset_MultiTexCoord2iARB), + NAME_FUNC_OFFSET(15092, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, _gloffset_MultiTexCoord2ivARB), + NAME_FUNC_OFFSET(15111, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, _gloffset_MultiTexCoord2sARB), + NAME_FUNC_OFFSET(15129, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, _gloffset_MultiTexCoord2svARB), + NAME_FUNC_OFFSET(15148, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, _gloffset_MultiTexCoord3dARB), + NAME_FUNC_OFFSET(15166, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, _gloffset_MultiTexCoord3dvARB), + NAME_FUNC_OFFSET(15185, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, _gloffset_MultiTexCoord3fARB), + NAME_FUNC_OFFSET(15203, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, _gloffset_MultiTexCoord3fvARB), + NAME_FUNC_OFFSET(15222, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, _gloffset_MultiTexCoord3iARB), + NAME_FUNC_OFFSET(15240, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, _gloffset_MultiTexCoord3ivARB), + NAME_FUNC_OFFSET(15259, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, _gloffset_MultiTexCoord3sARB), + NAME_FUNC_OFFSET(15277, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, _gloffset_MultiTexCoord3svARB), + NAME_FUNC_OFFSET(15296, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, _gloffset_MultiTexCoord4dARB), + NAME_FUNC_OFFSET(15314, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, _gloffset_MultiTexCoord4dvARB), + NAME_FUNC_OFFSET(15333, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, _gloffset_MultiTexCoord4fARB), + NAME_FUNC_OFFSET(15351, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, _gloffset_MultiTexCoord4fvARB), + NAME_FUNC_OFFSET(15370, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, _gloffset_MultiTexCoord4iARB), + NAME_FUNC_OFFSET(15388, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, _gloffset_MultiTexCoord4ivARB), + NAME_FUNC_OFFSET(15407, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, _gloffset_MultiTexCoord4sARB), + NAME_FUNC_OFFSET(15425, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, _gloffset_MultiTexCoord4svARB), + NAME_FUNC_OFFSET(15444, glStencilOpSeparate, glStencilOpSeparate, NULL, _gloffset_StencilOpSeparate), + NAME_FUNC_OFFSET(15467, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB), + NAME_FUNC_OFFSET(15490, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB), + NAME_FUNC_OFFSET(15513, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB), + NAME_FUNC_OFFSET(15536, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB), + NAME_FUNC_OFFSET(15559, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB), + NAME_FUNC_OFFSET(15576, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB), + NAME_FUNC_OFFSET(15599, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB), + NAME_FUNC_OFFSET(15622, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB), + NAME_FUNC_OFFSET(15645, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB), + NAME_FUNC_OFFSET(15671, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB), + NAME_FUNC_OFFSET(15697, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB), + NAME_FUNC_OFFSET(15723, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB), + NAME_FUNC_OFFSET(15747, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, _gloffset_DisableVertexAttribArrayARB), + NAME_FUNC_OFFSET(15774, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, _gloffset_EnableVertexAttribArrayARB), + NAME_FUNC_OFFSET(15800, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, _gloffset_GetVertexAttribdvARB), + NAME_FUNC_OFFSET(15820, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, _gloffset_GetVertexAttribfvARB), + NAME_FUNC_OFFSET(15840, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, _gloffset_GetVertexAttribivARB), + NAME_FUNC_OFFSET(15860, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, _gloffset_ProgramEnvParameter4dARB), + NAME_FUNC_OFFSET(15883, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, _gloffset_ProgramEnvParameter4dvARB), + NAME_FUNC_OFFSET(15907, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, _gloffset_ProgramEnvParameter4fARB), + NAME_FUNC_OFFSET(15930, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, _gloffset_ProgramEnvParameter4fvARB), + NAME_FUNC_OFFSET(15954, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, _gloffset_VertexAttrib1dARB), + NAME_FUNC_OFFSET(15971, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, _gloffset_VertexAttrib1dvARB), + NAME_FUNC_OFFSET(15989, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, _gloffset_VertexAttrib1fARB), + NAME_FUNC_OFFSET(16006, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, _gloffset_VertexAttrib1fvARB), + NAME_FUNC_OFFSET(16024, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, _gloffset_VertexAttrib1sARB), + NAME_FUNC_OFFSET(16041, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, _gloffset_VertexAttrib1svARB), + NAME_FUNC_OFFSET(16059, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, _gloffset_VertexAttrib2dARB), + NAME_FUNC_OFFSET(16076, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, _gloffset_VertexAttrib2dvARB), + NAME_FUNC_OFFSET(16094, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, _gloffset_VertexAttrib2fARB), + NAME_FUNC_OFFSET(16111, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, _gloffset_VertexAttrib2fvARB), + NAME_FUNC_OFFSET(16129, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, _gloffset_VertexAttrib2sARB), + NAME_FUNC_OFFSET(16146, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, _gloffset_VertexAttrib2svARB), + NAME_FUNC_OFFSET(16164, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, _gloffset_VertexAttrib3dARB), + NAME_FUNC_OFFSET(16181, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, _gloffset_VertexAttrib3dvARB), + NAME_FUNC_OFFSET(16199, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, _gloffset_VertexAttrib3fARB), + NAME_FUNC_OFFSET(16216, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, _gloffset_VertexAttrib3fvARB), + NAME_FUNC_OFFSET(16234, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, _gloffset_VertexAttrib3sARB), + NAME_FUNC_OFFSET(16251, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, _gloffset_VertexAttrib3svARB), + NAME_FUNC_OFFSET(16269, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, _gloffset_VertexAttrib4NbvARB), + NAME_FUNC_OFFSET(16288, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, _gloffset_VertexAttrib4NivARB), + NAME_FUNC_OFFSET(16307, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, _gloffset_VertexAttrib4NsvARB), + NAME_FUNC_OFFSET(16326, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, _gloffset_VertexAttrib4NubARB), + NAME_FUNC_OFFSET(16345, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB), + NAME_FUNC_OFFSET(16365, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB), + NAME_FUNC_OFFSET(16385, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB), + NAME_FUNC_OFFSET(16405, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, _gloffset_VertexAttrib4bvARB), + NAME_FUNC_OFFSET(16423, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB), + NAME_FUNC_OFFSET(16440, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB), + NAME_FUNC_OFFSET(16458, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB), + NAME_FUNC_OFFSET(16475, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB), + NAME_FUNC_OFFSET(16493, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, _gloffset_VertexAttrib4ivARB), + NAME_FUNC_OFFSET(16511, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB), + NAME_FUNC_OFFSET(16528, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB), + NAME_FUNC_OFFSET(16546, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, _gloffset_VertexAttrib4ubvARB), + NAME_FUNC_OFFSET(16565, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, _gloffset_VertexAttrib4uivARB), + NAME_FUNC_OFFSET(16584, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, _gloffset_VertexAttrib4usvARB), + NAME_FUNC_OFFSET(16603, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB), + NAME_FUNC_OFFSET(16625, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB), + NAME_FUNC_OFFSET(16638, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB), + NAME_FUNC_OFFSET(16651, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB), + NAME_FUNC_OFFSET(16667, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB), + NAME_FUNC_OFFSET(16683, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB), + NAME_FUNC_OFFSET(16696, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB), + NAME_FUNC_OFFSET(16719, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB), + NAME_FUNC_OFFSET(16739, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB), + NAME_FUNC_OFFSET(16758, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB), + NAME_FUNC_OFFSET(16769, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB), + NAME_FUNC_OFFSET(16781, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB), + NAME_FUNC_OFFSET(16795, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB), + NAME_FUNC_OFFSET(16808, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB), + NAME_FUNC_OFFSET(16824, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB), + NAME_FUNC_OFFSET(16835, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB), + NAME_FUNC_OFFSET(16848, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB), + NAME_FUNC_OFFSET(16867, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB), + NAME_FUNC_OFFSET(16887, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB), + NAME_FUNC_OFFSET(16900, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB), + NAME_FUNC_OFFSET(16910, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB), + NAME_FUNC_OFFSET(16926, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB), + NAME_FUNC_OFFSET(16945, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB), + NAME_FUNC_OFFSET(16963, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB), + NAME_FUNC_OFFSET(16984, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB), + NAME_FUNC_OFFSET(16999, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB), + NAME_FUNC_OFFSET(17014, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB), + NAME_FUNC_OFFSET(17028, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB), + NAME_FUNC_OFFSET(17043, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB), + NAME_FUNC_OFFSET(17055, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB), + NAME_FUNC_OFFSET(17068, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB), + NAME_FUNC_OFFSET(17080, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB), + NAME_FUNC_OFFSET(17093, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB), + NAME_FUNC_OFFSET(17105, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB), + NAME_FUNC_OFFSET(17118, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB), + NAME_FUNC_OFFSET(17130, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB), + NAME_FUNC_OFFSET(17143, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB), + NAME_FUNC_OFFSET(17155, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB), + NAME_FUNC_OFFSET(17168, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB), + NAME_FUNC_OFFSET(17180, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB), + NAME_FUNC_OFFSET(17193, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB), + NAME_FUNC_OFFSET(17205, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB), + NAME_FUNC_OFFSET(17218, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB), + NAME_FUNC_OFFSET(17230, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB), + NAME_FUNC_OFFSET(17243, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB), + NAME_FUNC_OFFSET(17262, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB), + NAME_FUNC_OFFSET(17281, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB), + NAME_FUNC_OFFSET(17300, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB), + NAME_FUNC_OFFSET(17313, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB), + NAME_FUNC_OFFSET(17331, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB), + NAME_FUNC_OFFSET(17352, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB), + NAME_FUNC_OFFSET(17370, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB), + NAME_FUNC_OFFSET(17390, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB), + NAME_FUNC_OFFSET(17404, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB), + NAME_FUNC_OFFSET(17421, gl_dispatch_stub_568, gl_dispatch_stub_568, NULL, _gloffset_SampleMaskSGIS), + NAME_FUNC_OFFSET(17437, gl_dispatch_stub_569, gl_dispatch_stub_569, NULL, _gloffset_SamplePatternSGIS), + NAME_FUNC_OFFSET(17456, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), + NAME_FUNC_OFFSET(17474, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), + NAME_FUNC_OFFSET(17495, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), + NAME_FUNC_OFFSET(17517, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), + NAME_FUNC_OFFSET(17536, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), + NAME_FUNC_OFFSET(17558, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), + NAME_FUNC_OFFSET(17581, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT), + NAME_FUNC_OFFSET(17600, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT), + NAME_FUNC_OFFSET(17620, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT), + NAME_FUNC_OFFSET(17639, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT), + NAME_FUNC_OFFSET(17659, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT), + NAME_FUNC_OFFSET(17678, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT), + NAME_FUNC_OFFSET(17698, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT), + NAME_FUNC_OFFSET(17717, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT), + NAME_FUNC_OFFSET(17737, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT), + NAME_FUNC_OFFSET(17756, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT), + NAME_FUNC_OFFSET(17776, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT), + NAME_FUNC_OFFSET(17796, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT), + NAME_FUNC_OFFSET(17817, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT), + NAME_FUNC_OFFSET(17837, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT), + NAME_FUNC_OFFSET(17858, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT), + NAME_FUNC_OFFSET(17878, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT), + NAME_FUNC_OFFSET(17899, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT), + NAME_FUNC_OFFSET(17923, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT), + NAME_FUNC_OFFSET(17941, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT), + NAME_FUNC_OFFSET(17961, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT), + NAME_FUNC_OFFSET(17979, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT), + NAME_FUNC_OFFSET(17991, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT), + NAME_FUNC_OFFSET(18004, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT), + NAME_FUNC_OFFSET(18016, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT), + NAME_FUNC_OFFSET(18029, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT), + NAME_FUNC_OFFSET(18049, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT), + NAME_FUNC_OFFSET(18073, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA), + NAME_FUNC_OFFSET(18087, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA), + NAME_FUNC_OFFSET(18104, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA), + NAME_FUNC_OFFSET(18119, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA), + NAME_FUNC_OFFSET(18137, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA), + NAME_FUNC_OFFSET(18151, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA), + NAME_FUNC_OFFSET(18168, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA), + NAME_FUNC_OFFSET(18183, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA), + NAME_FUNC_OFFSET(18201, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA), + NAME_FUNC_OFFSET(18215, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA), + NAME_FUNC_OFFSET(18232, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA), + NAME_FUNC_OFFSET(18247, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA), + NAME_FUNC_OFFSET(18265, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA), + NAME_FUNC_OFFSET(18279, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA), + NAME_FUNC_OFFSET(18296, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA), + NAME_FUNC_OFFSET(18311, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA), + NAME_FUNC_OFFSET(18329, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA), + NAME_FUNC_OFFSET(18343, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA), + NAME_FUNC_OFFSET(18360, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA), + NAME_FUNC_OFFSET(18375, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA), + NAME_FUNC_OFFSET(18393, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA), + NAME_FUNC_OFFSET(18407, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA), + NAME_FUNC_OFFSET(18424, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA), + NAME_FUNC_OFFSET(18439, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA), + NAME_FUNC_OFFSET(18457, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA), + NAME_FUNC_OFFSET(18471, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA), + NAME_FUNC_OFFSET(18488, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA), + NAME_FUNC_OFFSET(18503, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA), + NAME_FUNC_OFFSET(18521, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA), + NAME_FUNC_OFFSET(18535, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA), + NAME_FUNC_OFFSET(18552, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA), + NAME_FUNC_OFFSET(18567, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA), + NAME_FUNC_OFFSET(18585, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV), + NAME_FUNC_OFFSET(18602, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV), + NAME_FUNC_OFFSET(18622, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV), + NAME_FUNC_OFFSET(18639, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV), + NAME_FUNC_OFFSET(18665, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV), + NAME_FUNC_OFFSET(18694, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV), + NAME_FUNC_OFFSET(18709, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV), + NAME_FUNC_OFFSET(18727, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV), + NAME_FUNC_OFFSET(18746, gl_dispatch_stub_745, gl_dispatch_stub_745, NULL, _gloffset_BlendEquationSeparateEXT), + NAME_FUNC_OFFSET(18770, gl_dispatch_stub_745, gl_dispatch_stub_745, NULL, _gloffset_BlendEquationSeparateEXT), + NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0) +}; + +#undef NAME_FUNC_OFFSET diff --git a/GL/glx/glthread.c b/GL/glx/glthread.c new file mode 100644 index 000000000..813d6f9db --- /dev/null +++ b/GL/glx/glthread.c @@ -0,0 +1,378 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.1 + * + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +/* + * XXX There's probably some work to do in order to make this file + * truly reusable outside of Mesa. + */ + + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "glthread.h" + + +/* + * This file should still compile even when THREADS is not defined. + * This is to make things easier to deal with on the makefile scene.. + */ +#ifdef THREADS +#include + +/* + * Error messages + */ +#define INIT_TSD_ERROR "_glthread_: failed to allocate key for thread specific data" +#define GET_TSD_ERROR "_glthread_: failed to get thread specific data" +#define SET_TSD_ERROR "_glthread_: thread failed to set thread specific data" + + +/* + * Magic number to determine if a TSD object has been initialized. + * Kind of a hack but there doesn't appear to be a better cross-platform + * solution. + */ +#define INIT_MAGIC 0xff8adc98 + + + +/* + * POSIX Threads -- The best way to go if your platform supports them. + * Solaris >= 2.5 have POSIX threads, IRIX >= 6.4 reportedly + * has them, and many of the free Unixes now have them. + * Be sure to use appropriate -mt or -D_REENTRANT type + * compile flags when building. + */ +#ifdef PTHREADS + +unsigned long +_glthread_GetID(void) +{ + return (unsigned long) pthread_self(); +} + + +void +_glthread_InitTSD(_glthread_TSD *tsd) +{ + if (pthread_key_create(&tsd->key, NULL/*free*/) != 0) { + perror(INIT_TSD_ERROR); + exit(-1); + } + tsd->initMagic = INIT_MAGIC; +} + + +void * +_glthread_GetTSD(_glthread_TSD *tsd) +{ + if (tsd->initMagic != (int) INIT_MAGIC) { + _glthread_InitTSD(tsd); + } + return pthread_getspecific(tsd->key); +} + + +void +_glthread_SetTSD(_glthread_TSD *tsd, void *ptr) +{ + if (tsd->initMagic != (int) INIT_MAGIC) { + _glthread_InitTSD(tsd); + } + if (pthread_setspecific(tsd->key, ptr) != 0) { + perror(SET_TSD_ERROR); + exit(-1); + } +} + +#endif /* PTHREADS */ + + + +/* + * Solaris/Unix International Threads -- Use only if POSIX threads + * aren't available on your Unix platform. Solaris 2.[34] are examples + * of platforms where this is the case. Be sure to use -mt and/or + * -D_REENTRANT when compiling. + */ +#ifdef SOLARIS_THREADS +#define USE_LOCK_FOR_KEY /* undef this to try a version without + lock for the global key... */ + +unsigned long +_glthread_GetID(void) +{ + abort(); /* XXX not implemented yet */ + return (unsigned long) 0; +} + + +void +_glthread_InitTSD(_glthread_TSD *tsd) +{ + if ((errno = mutex_init(&tsd->keylock, 0, NULL)) != 0 || + (errno = thr_keycreate(&(tsd->key), free)) != 0) { + perror(INIT_TSD_ERROR); + exit(-1); + } + tsd->initMagic = INIT_MAGIC; +} + + +void * +_glthread_GetTSD(_glthread_TSD *tsd) +{ + void* ret; + if (tsd->initMagic != INIT_MAGIC) { + _glthread_InitTSD(tsd); + } +#ifdef USE_LOCK_FOR_KEY + mutex_lock(&tsd->keylock); + thr_getspecific(tsd->key, &ret); + mutex_unlock(&tsd->keylock); +#else + if ((errno = thr_getspecific(tsd->key, &ret)) != 0) { + perror(GET_TSD_ERROR); + exit(-1); + } +#endif + return ret; +} + + +void +_glthread_SetTSD(_glthread_TSD *tsd, void *ptr) +{ + if (tsd->initMagic != INIT_MAGIC) { + _glthread_InitTSD(tsd); + } + if ((errno = thr_setspecific(tsd->key, ptr)) != 0) { + perror(SET_TSD_ERROR); + exit(-1); + } +} + +#undef USE_LOCK_FOR_KEY +#endif /* SOLARIS_THREADS */ + + + +/* + * Win32 Threads. The only available option for Windows 95/NT. + * Be sure that you compile using the Multithreaded runtime, otherwise + * bad things will happen. + */ +#ifdef WIN32_THREADS + +void FreeTSD(_glthread_TSD *p) +{ + if (p->initMagic==INIT_MAGIC) { + TlsFree(p->key); + p->initMagic=0; + } +} + +void InsteadOf_exit(int nCode) +{ + DWORD dwErr=GetLastError(); +} + +unsigned long +_glthread_GetID(void) +{ + return GetCurrentThreadId(); +} + + +void +_glthread_InitTSD(_glthread_TSD *tsd) +{ + tsd->key = TlsAlloc(); + if (tsd->key == TLS_OUT_OF_INDEXES) { + perror("Mesa:_glthread_InitTSD"); + InsteadOf_exit(-1); + } + tsd->initMagic = INIT_MAGIC; +} + + +void * +_glthread_GetTSD(_glthread_TSD *tsd) +{ + if (tsd->initMagic != INIT_MAGIC) { + _glthread_InitTSD(tsd); + } + return TlsGetValue(tsd->key); +} + + +void +_glthread_SetTSD(_glthread_TSD *tsd, void *ptr) +{ + /* the following code assumes that the _glthread_TSD has been initialized + to zero at creation */ + if (tsd->initMagic != INIT_MAGIC) { + _glthread_InitTSD(tsd); + } + if (TlsSetValue(tsd->key, ptr) == 0) { + perror("Mesa:_glthread_SetTSD"); + InsteadOf_exit(-1); + } +} + +#endif /* WIN32_THREADS */ + + + +/* + * XFree86 has its own thread wrapper, Xthreads.h + * We wrap it again for GL. + */ +#ifdef USE_XTHREADS + +unsigned long +_glthread_GetID(void) +{ + return (unsigned long) xthread_self(); +} + + +void +_glthread_InitTSD(_glthread_TSD *tsd) +{ + if (xthread_key_create(&tsd->key, NULL) != 0) { + perror(INIT_TSD_ERROR); + exit(-1); + } + tsd->initMagic = INIT_MAGIC; +} + + +void * +_glthread_GetTSD(_glthread_TSD *tsd) +{ + void *ptr; + if (tsd->initMagic != INIT_MAGIC) { + _glthread_InitTSD(tsd); + } + xthread_get_specific(tsd->key, &ptr); + return ptr; +} + + +void +_glthread_SetTSD(_glthread_TSD *tsd, void *ptr) +{ + if (tsd->initMagic != INIT_MAGIC) { + _glthread_InitTSD(tsd); + } + xthread_set_specific(tsd->key, ptr); +} + +#endif /* XTHREAD */ + + + +/* + * BeOS threads + */ +#ifdef BEOS_THREADS + +unsigned long +_glthread_GetID(void) +{ + return (unsigned long) find_thread(NULL); +} + +void +_glthread_InitTSD(_glthread_TSD *tsd) +{ + tsd->key = tls_allocate(); + tsd->initMagic = INIT_MAGIC; +} + +void * +_glthread_GetTSD(_glthread_TSD *tsd) +{ + if (tsd->initMagic != (int) INIT_MAGIC) { + _glthread_InitTSD(tsd); + } + return tls_get(tsd->key); +} + +void +_glthread_SetTSD(_glthread_TSD *tsd, void *ptr) +{ + if (tsd->initMagic != (int) INIT_MAGIC) { + _glthread_InitTSD(tsd); + } + tls_set(tsd->key, ptr); +} + +#endif /* BEOS_THREADS */ + + + +#else /* THREADS */ + + +/* + * no-op functions + */ + +unsigned long +_glthread_GetID(void) +{ + return 0; +} + + +void +_glthread_InitTSD(_glthread_TSD *tsd) +{ + (void) tsd; +} + + +void * +_glthread_GetTSD(_glthread_TSD *tsd) +{ + (void) tsd; + return NULL; +} + + +void +_glthread_SetTSD(_glthread_TSD *tsd, void *ptr) +{ + (void) tsd; + (void) ptr; +} + + +#endif /* THREADS */ diff --git a/GL/glx/glthread.h b/GL/glx/glthread.h new file mode 100644 index 000000000..e2765cebb --- /dev/null +++ b/GL/glx/glthread.h @@ -0,0 +1,319 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.2 + * + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +/* + * Thread support for gl dispatch. + * + * Initial version by John Stone (j.stone@acm.org) (johns@cs.umr.edu) + * and Christoph Poliwoda (poliwoda@volumegraphics.com) + * Revised by Keith Whitwell + * Adapted for new gl dispatcher by Brian Paul + * + * + * + * DOCUMENTATION + * + * This thread module exports the following types: + * _glthread_TSD Thread-specific data area + * _glthread_Thread Thread datatype + * _glthread_Mutex Mutual exclusion lock + * + * Macros: + * _glthread_DECLARE_STATIC_MUTEX(name) Declare a non-local mutex + * _glthread_INIT_MUTEX(name) Initialize a mutex + * _glthread_LOCK_MUTEX(name) Lock a mutex + * _glthread_UNLOCK_MUTEX(name) Unlock a mutex + * + * Functions: + * _glthread_GetID(v) Get integer thread ID + * _glthread_InitTSD() Initialize thread-specific data + * _glthread_GetTSD() Get thread-specific data + * _glthread_SetTSD() Set thread-specific data + * + */ + +/* + * If this file is accidentally included by a non-threaded build, + * it should not cause the build to fail, or otherwise cause problems. + * In general, it should only be included when needed however. + */ + +#ifndef GLTHREAD_H +#define GLTHREAD_H + + +#if defined(USE_MGL_NAMESPACE) +#define _glapi_Dispatch _mglapi_Dispatch +#endif + + + +#if (defined(PTHREADS) || defined(SOLARIS_THREADS) ||\ + defined(WIN32_THREADS) || defined(USE_XTHREADS) || defined(BEOS_THREADS)) \ + && !defined(THREADS) +# define THREADS +#endif + +#ifdef VMS +#include +#endif + +/* + * POSIX threads. This should be your choice in the Unix world + * whenever possible. When building with POSIX threads, be sure + * to enable any compiler flags which will cause the MT-safe + * libc (if one exists) to be used when linking, as well as any + * header macros for MT-safe errno, etc. For Solaris, this is the -mt + * compiler flag. On Solaris with gcc, use -D_REENTRANT to enable + * proper compiling for MT-safe libc etc. + */ +#if defined(PTHREADS) +#include /* POSIX threads headers */ + +typedef struct { + pthread_key_t key; + int initMagic; +} _glthread_TSD; + +typedef pthread_t _glthread_Thread; + +typedef pthread_mutex_t _glthread_Mutex; + +#define _glthread_DECLARE_STATIC_MUTEX(name) \ + static _glthread_Mutex name = PTHREAD_MUTEX_INITIALIZER + +#define _glthread_INIT_MUTEX(name) \ + pthread_mutex_init(&(name), NULL) + +#define _glthread_DESTROY_MUTEX(name) \ + pthread_mutex_destroy(&(name)) + +#define _glthread_LOCK_MUTEX(name) \ + (void) pthread_mutex_lock(&(name)) + +#define _glthread_UNLOCK_MUTEX(name) \ + (void) pthread_mutex_unlock(&(name)) + +#endif /* PTHREADS */ + + + + +/* + * Solaris threads. Use only up to Solaris 2.4. + * Solaris 2.5 and higher provide POSIX threads. + * Be sure to compile with -mt on the Solaris compilers, or + * use -D_REENTRANT if using gcc. + */ +#ifdef SOLARIS_THREADS +#include + +typedef struct { + thread_key_t key; + mutex_t keylock; + int initMagic; +} _glthread_TSD; + +typedef thread_t _glthread_Thread; + +typedef mutex_t _glthread_Mutex; + +/* XXX need to really implement mutex-related macros */ +#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0 +#define _glthread_INIT_MUTEX(name) (void) name +#define _glthread_DESTROY_MUTEX(name) (void) name +#define _glthread_LOCK_MUTEX(name) (void) name +#define _glthread_UNLOCK_MUTEX(name) (void) name + +#endif /* SOLARIS_THREADS */ + + + + +/* + * Windows threads. Should work with Windows NT and 95. + * IMPORTANT: Link with multithreaded runtime library when THREADS are + * used! + */ +#ifdef WIN32_THREADS +#include + +typedef struct { + DWORD key; + int initMagic; +} _glthread_TSD; + +typedef HANDLE _glthread_Thread; + +typedef CRITICAL_SECTION _glthread_Mutex; + +#define _glthread_DECLARE_STATIC_MUTEX(name) /*static*/ _glthread_Mutex name = {0,0,0,0,0,0} +#define _glthread_INIT_MUTEX(name) InitializeCriticalSection(&name) +#define _glthread_DESTROY_MUTEX(name) DeleteCriticalSection(&name) +#define _glthread_LOCK_MUTEX(name) EnterCriticalSection(&name) +#define _glthread_UNLOCK_MUTEX(name) LeaveCriticalSection(&name) + +#endif /* WIN32_THREADS */ + + + + +/* + * XFree86 has its own thread wrapper, Xthreads.h + * We wrap it again for GL. + */ +#ifdef USE_XTHREADS +#include + +typedef struct { + xthread_key_t key; + int initMagic; +} _glthread_TSD; + +typedef xthread_t _glthread_Thread; + +typedef xmutex_rec _glthread_Mutex; + +#ifdef XMUTEX_INITIALIZER +#define _glthread_DECLARE_STATIC_MUTEX(name) \ + static _glthread_Mutex name = XMUTEX_INITIALIZER +#else +#define _glthread_DECLARE_STATIC_MUTEX(name) \ + static _glthread_Mutex name +#endif + +#define _glthread_INIT_MUTEX(name) \ + xmutex_init(&(name)) + +#define _glthread_DESTROY_MUTEX(name) \ + xmutex_clear(&(name)) + +#define _glthread_LOCK_MUTEX(name) \ + (void) xmutex_lock(&(name)) + +#define _glthread_UNLOCK_MUTEX(name) \ + (void) xmutex_unlock(&(name)) + +#endif /* USE_XTHREADS */ + + + +/* + * BeOS threads. R5.x required. + */ +#ifdef BEOS_THREADS + +#include +#include + +typedef struct { + int32 key; + int initMagic; +} _glthread_TSD; + +typedef thread_id _glthread_Thread; + +/* Use Benaphore, aka speeder semaphore */ +typedef struct { + int32 lock; + sem_id sem; +} benaphore; +typedef benaphore _glthread_Mutex; + +#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = { 0, 0 } +#define _glthread_INIT_MUTEX(name) name.sem = create_sem(0, #name"_benaphore"), name.lock = 0 +#define _glthread_DESTROY_MUTEX(name) delete_sem(name.sem), name.lock = 0 +#define _glthread_LOCK_MUTEX(name) if (name.sem == 0) _glthread_INIT_MUTEX(name); \ + if (atomic_add(&(name.lock), 1) >= 1) acquire_sem(name.sem) +#define _glthread_UNLOCK_MUTEX(name) if (atomic_add(&(name.lock), -1) > 1) release_sem(name.sem) + +#endif /* BEOS_THREADS */ + + + +#ifndef THREADS + +/* + * THREADS not defined + */ + +typedef int _glthread_TSD; + +typedef int _glthread_Thread; + +typedef int _glthread_Mutex; + +#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0 + +#define _glthread_INIT_MUTEX(name) (void) name + +#define _glthread_DESTROY_MUTEX(name) (void) name + +#define _glthread_LOCK_MUTEX(name) (void) name + +#define _glthread_UNLOCK_MUTEX(name) (void) name + +#endif /* THREADS */ + + + +/* + * Platform independent thread specific data API. + */ + +extern unsigned long +_glthread_GetID(void); + + +extern void +_glthread_InitTSD(_glthread_TSD *); + + +extern void * +_glthread_GetTSD(_glthread_TSD *); + + +extern void +_glthread_SetTSD(_glthread_TSD *, void *); + +#if defined(GLX_USE_TLS) + +extern __thread struct _glapi_table * _glapi_tls_Dispatch + __attribute__((tls_model("initial-exec"))); + +#define GET_DISPATCH() _glapi_tls_Dispatch + +#elif !defined(GL_CALL) +# if defined(THREADS) +# define GET_DISPATCH() \ + ((__builtin_expect( _glapi_Dispatch != NULL, 1 )) \ + ? _glapi_Dispatch : _glapi_get_dispatch()) +# else +# define GET_DISPATCH() _glapi_Dispatch +# endif /* defined(THREADS) */ +#endif /* ndef GL_CALL */ + + +#endif /* THREADS_H */ diff --git a/GL/glx/indirect_dispatch.c b/GL/glx/indirect_dispatch.c new file mode 100644 index 000000000..2afd3eb22 --- /dev/null +++ b/GL/glx/indirect_dispatch.c @@ -0,0 +1,5889 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include +#include +#include +#include +#include "indirect_size.h" +#include "indirect_size_get.h" +#include "indirect_dispatch.h" +#include "glxserver.h" +#include "glxbyteorder.h" +#include "indirect_util.h" +#include "singlesize.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" + +#define __GLX_PAD(x) (((x) + 3) & ~3) + +typedef struct { + __GLX_PIXEL_3D_HDR; +} __GLXpixel3DHeader; + +extern GLboolean __glXErrorOccured( void ); +extern void __glXClearErrorOccured( void ); + +static const unsigned dummy_answer[2] = {0, 0}; + +int __glXDisp_NewList(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_NewList( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + *(GLenum *)(pc + 4) + ) ); + error = Success; + } + + return error; +} + +int __glXDisp_EndList(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_EndList( GET_DISPATCH(), () ); + error = Success; + } + + return error; +} + +void __glXDisp_CallList(GLbyte * pc) +{ + CALL_CallList( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_CallLists(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 0); + const GLenum type = *(GLenum *)(pc + 4); + const GLvoid * lists = (const GLvoid *)(pc + 8); + + lists = (const GLvoid *) (pc + 8); + + CALL_CallLists( GET_DISPATCH(), ( + n, + type, + lists + ) ); +} + +int __glXDisp_DeleteLists(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_DeleteLists( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + *(GLsizei *)(pc + 4) + ) ); + error = Success; + } + + return error; +} + +int __glXDisp_GenLists(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLuint retval; + retval = CALL_GenLists( GET_DISPATCH(), ( + *(GLsizei *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_ListBase(GLbyte * pc) +{ + CALL_ListBase( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_Begin(GLbyte * pc) +{ + CALL_Begin( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_Bitmap(GLbyte * pc) +{ + const GLubyte * const bitmap = (const GLubyte *) (pc + 44); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_Bitmap( GET_DISPATCH(), ( + *(GLsizei *)(pc + 20), + *(GLsizei *)(pc + 24), + *(GLfloat *)(pc + 28), + *(GLfloat *)(pc + 32), + *(GLfloat *)(pc + 36), + *(GLfloat *)(pc + 40), + bitmap + ) ); +} + +void __glXDisp_Color3bv(GLbyte * pc) +{ + CALL_Color3bv( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDisp_Color3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Color3dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Color3fv(GLbyte * pc) +{ + CALL_Color3fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Color3iv(GLbyte * pc) +{ + CALL_Color3iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_Color3sv(GLbyte * pc) +{ + CALL_Color3sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_Color3ubv(GLbyte * pc) +{ + CALL_Color3ubv( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDisp_Color3uiv(GLbyte * pc) +{ + CALL_Color3uiv( GET_DISPATCH(), ( + (const GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_Color3usv(GLbyte * pc) +{ + CALL_Color3usv( GET_DISPATCH(), ( + (const GLushort *)(pc + 0) + ) ); +} + +void __glXDisp_Color4bv(GLbyte * pc) +{ + CALL_Color4bv( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDisp_Color4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_Color4dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Color4fv(GLbyte * pc) +{ + CALL_Color4fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Color4iv(GLbyte * pc) +{ + CALL_Color4iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_Color4sv(GLbyte * pc) +{ + CALL_Color4sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_Color4ubv(GLbyte * pc) +{ + CALL_Color4ubv( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDisp_Color4uiv(GLbyte * pc) +{ + CALL_Color4uiv( GET_DISPATCH(), ( + (const GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_Color4usv(GLbyte * pc) +{ + CALL_Color4usv( GET_DISPATCH(), ( + (const GLushort *)(pc + 0) + ) ); +} + +void __glXDisp_EdgeFlagv(GLbyte * pc) +{ + CALL_EdgeFlagv( GET_DISPATCH(), ( + (const GLboolean *)(pc + 0) + ) ); +} + +void __glXDisp_End(GLbyte * pc) +{ + CALL_End( GET_DISPATCH(), () ); +} + +void __glXDisp_Indexdv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_Indexdv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Indexfv(GLbyte * pc) +{ + CALL_Indexfv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Indexiv(GLbyte * pc) +{ + CALL_Indexiv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_Indexsv(GLbyte * pc) +{ + CALL_Indexsv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_Normal3bv(GLbyte * pc) +{ + CALL_Normal3bv( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDisp_Normal3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Normal3dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Normal3fv(GLbyte * pc) +{ + CALL_Normal3fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Normal3iv(GLbyte * pc) +{ + CALL_Normal3iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_Normal3sv(GLbyte * pc) +{ + CALL_Normal3sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_RasterPos2dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos2fv(GLbyte * pc) +{ + CALL_RasterPos2fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos2iv(GLbyte * pc) +{ + CALL_RasterPos2iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos2sv(GLbyte * pc) +{ + CALL_RasterPos2sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_RasterPos3dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos3fv(GLbyte * pc) +{ + CALL_RasterPos3fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos3iv(GLbyte * pc) +{ + CALL_RasterPos3iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos3sv(GLbyte * pc) +{ + CALL_RasterPos3sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_RasterPos4dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos4fv(GLbyte * pc) +{ + CALL_RasterPos4fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos4iv(GLbyte * pc) +{ + CALL_RasterPos4iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos4sv(GLbyte * pc) +{ + CALL_RasterPos4sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_Rectdv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_Rectdv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0), + (const GLdouble *)(pc + 16) + ) ); +} + +void __glXDisp_Rectfv(GLbyte * pc) +{ + CALL_Rectfv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0), + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_Rectiv(GLbyte * pc) +{ + CALL_Rectiv( GET_DISPATCH(), ( + (const GLint *)(pc + 0), + (const GLint *)(pc + 8) + ) ); +} + +void __glXDisp_Rectsv(GLbyte * pc) +{ + CALL_Rectsv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_TexCoord1dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_TexCoord1dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord1fv(GLbyte * pc) +{ + CALL_TexCoord1fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord1iv(GLbyte * pc) +{ + CALL_TexCoord1iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord1sv(GLbyte * pc) +{ + CALL_TexCoord1sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_TexCoord2dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord2fv(GLbyte * pc) +{ + CALL_TexCoord2fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord2iv(GLbyte * pc) +{ + CALL_TexCoord2iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord2sv(GLbyte * pc) +{ + CALL_TexCoord2sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_TexCoord3dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord3fv(GLbyte * pc) +{ + CALL_TexCoord3fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord3iv(GLbyte * pc) +{ + CALL_TexCoord3iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord3sv(GLbyte * pc) +{ + CALL_TexCoord3sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_TexCoord4dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord4fv(GLbyte * pc) +{ + CALL_TexCoord4fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord4iv(GLbyte * pc) +{ + CALL_TexCoord4iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord4sv(GLbyte * pc) +{ + CALL_TexCoord4sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_Vertex2dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex2fv(GLbyte * pc) +{ + CALL_Vertex2fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex2iv(GLbyte * pc) +{ + CALL_Vertex2iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex2sv(GLbyte * pc) +{ + CALL_Vertex2sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Vertex3dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex3fv(GLbyte * pc) +{ + CALL_Vertex3fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex3iv(GLbyte * pc) +{ + CALL_Vertex3iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex3sv(GLbyte * pc) +{ + CALL_Vertex3sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_Vertex4dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex4fv(GLbyte * pc) +{ + CALL_Vertex4fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex4iv(GLbyte * pc) +{ + CALL_Vertex4iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex4sv(GLbyte * pc) +{ + CALL_Vertex4sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_ClipPlane(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_ClipPlane( GET_DISPATCH(), ( + *(GLenum *)(pc + 32), + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_ColorMaterial(GLbyte * pc) +{ + CALL_ColorMaterial( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4) + ) ); +} + +void __glXDisp_CullFace(GLbyte * pc) +{ + CALL_CullFace( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_Fogf(GLbyte * pc) +{ + CALL_Fogf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_Fogfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 0); + const GLfloat * params; + + params = (const GLfloat *) (pc + 4); + + CALL_Fogfv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDisp_Fogi(GLbyte * pc) +{ + CALL_Fogi( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4) + ) ); +} + +void __glXDisp_Fogiv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 0); + const GLint * params; + + params = (const GLint *) (pc + 4); + + CALL_Fogiv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDisp_FrontFace(GLbyte * pc) +{ + CALL_FrontFace( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_Hint(GLbyte * pc) +{ + CALL_Hint( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4) + ) ); +} + +void __glXDisp_Lightf(GLbyte * pc) +{ + CALL_Lightf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_Lightfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLfloat * params; + + params = (const GLfloat *) (pc + 8); + + CALL_Lightfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_Lighti(GLbyte * pc) +{ + CALL_Lighti( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8) + ) ); +} + +void __glXDisp_Lightiv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLint * params; + + params = (const GLint *) (pc + 8); + + CALL_Lightiv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_LightModelf(GLbyte * pc) +{ + CALL_LightModelf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_LightModelfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 0); + const GLfloat * params; + + params = (const GLfloat *) (pc + 4); + + CALL_LightModelfv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDisp_LightModeli(GLbyte * pc) +{ + CALL_LightModeli( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4) + ) ); +} + +void __glXDisp_LightModeliv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 0); + const GLint * params; + + params = (const GLint *) (pc + 4); + + CALL_LightModeliv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDisp_LineStipple(GLbyte * pc) +{ + CALL_LineStipple( GET_DISPATCH(), ( + *(GLint *)(pc + 0), + *(GLushort *)(pc + 4) + ) ); +} + +void __glXDisp_LineWidth(GLbyte * pc) +{ + CALL_LineWidth( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Materialf(GLbyte * pc) +{ + CALL_Materialf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_Materialfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLfloat * params; + + params = (const GLfloat *) (pc + 8); + + CALL_Materialfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_Materiali(GLbyte * pc) +{ + CALL_Materiali( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8) + ) ); +} + +void __glXDisp_Materialiv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLint * params; + + params = (const GLint *) (pc + 8); + + CALL_Materialiv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_PointSize(GLbyte * pc) +{ + CALL_PointSize( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_PolygonMode(GLbyte * pc) +{ + CALL_PolygonMode( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4) + ) ); +} + +void __glXDisp_PolygonStipple(GLbyte * pc) +{ + const GLubyte * const mask = (const GLubyte *) (pc + 20); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_PolygonStipple( GET_DISPATCH(), ( + mask + ) ); +} + +void __glXDisp_Scissor(GLbyte * pc) +{ + CALL_Scissor( GET_DISPATCH(), ( + *(GLint *)(pc + 0), + *(GLint *)(pc + 4), + *(GLsizei *)(pc + 8), + *(GLsizei *)(pc + 12) + ) ); +} + +void __glXDisp_ShadeModel(GLbyte * pc) +{ + CALL_ShadeModel( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_TexParameterf(GLbyte * pc) +{ + CALL_TexParameterf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_TexParameterfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLfloat * params; + + params = (const GLfloat *) (pc + 8); + + CALL_TexParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_TexParameteri(GLbyte * pc) +{ + CALL_TexParameteri( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8) + ) ); +} + +void __glXDisp_TexParameteriv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLint * params; + + params = (const GLint *) (pc + 8); + + CALL_TexParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_TexImage1D(GLbyte * pc) +{ + const GLvoid * const pixels = (const GLvoid *) (pc + 52); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_TexImage1D( GET_DISPATCH(), ( + *(GLenum *)(pc + 20), + *(GLint *)(pc + 24), + *(GLint *)(pc + 28), + *(GLsizei *)(pc + 32), + *(GLint *)(pc + 40), + *(GLenum *)(pc + 44), + *(GLenum *)(pc + 48), + pixels + ) ); +} + +void __glXDisp_TexImage2D(GLbyte * pc) +{ + const GLvoid * const pixels = (const GLvoid *) (pc + 52); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_TexImage2D( GET_DISPATCH(), ( + *(GLenum *)(pc + 20), + *(GLint *)(pc + 24), + *(GLint *)(pc + 28), + *(GLsizei *)(pc + 32), + *(GLsizei *)(pc + 36), + *(GLint *)(pc + 40), + *(GLenum *)(pc + 44), + *(GLenum *)(pc + 48), + pixels + ) ); +} + +void __glXDisp_TexEnvf(GLbyte * pc) +{ + CALL_TexEnvf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_TexEnvfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLfloat * params; + + params = (const GLfloat *) (pc + 8); + + CALL_TexEnvfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_TexEnvi(GLbyte * pc) +{ + CALL_TexEnvi( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8) + ) ); +} + +void __glXDisp_TexEnviv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLint * params; + + params = (const GLint *) (pc + 8); + + CALL_TexEnviv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_TexGend(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_TexGend( GET_DISPATCH(), ( + *(GLenum *)(pc + 8), + *(GLenum *)(pc + 12), + *(GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_TexGendv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLdouble * params; + +#ifdef __GLX_ALIGN64 + const GLuint compsize = __glTexGendv_size(pname); + const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + params = (const GLdouble *) (pc + 8); + + CALL_TexGendv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_TexGenf(GLbyte * pc) +{ + CALL_TexGenf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_TexGenfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLfloat * params; + + params = (const GLfloat *) (pc + 8); + + CALL_TexGenfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_TexGeni(GLbyte * pc) +{ + CALL_TexGeni( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8) + ) ); +} + +void __glXDisp_TexGeniv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLint * params; + + params = (const GLint *) (pc + 8); + + CALL_TexGeniv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_InitNames(GLbyte * pc) +{ + CALL_InitNames( GET_DISPATCH(), () ); +} + +void __glXDisp_LoadName(GLbyte * pc) +{ + CALL_LoadName( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_PassThrough(GLbyte * pc) +{ + CALL_PassThrough( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_PopName(GLbyte * pc) +{ + CALL_PopName( GET_DISPATCH(), () ); +} + +void __glXDisp_PushName(GLbyte * pc) +{ + CALL_PushName( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_DrawBuffer(GLbyte * pc) +{ + CALL_DrawBuffer( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_Clear(GLbyte * pc) +{ + CALL_Clear( GET_DISPATCH(), ( + *(GLbitfield *)(pc + 0) + ) ); +} + +void __glXDisp_ClearAccum(GLbyte * pc) +{ + CALL_ClearAccum( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0), + *(GLfloat *)(pc + 4), + *(GLfloat *)(pc + 8), + *(GLfloat *)(pc + 12) + ) ); +} + +void __glXDisp_ClearIndex(GLbyte * pc) +{ + CALL_ClearIndex( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_ClearColor(GLbyte * pc) +{ + CALL_ClearColor( GET_DISPATCH(), ( + *(GLclampf *)(pc + 0), + *(GLclampf *)(pc + 4), + *(GLclampf *)(pc + 8), + *(GLclampf *)(pc + 12) + ) ); +} + +void __glXDisp_ClearStencil(GLbyte * pc) +{ + CALL_ClearStencil( GET_DISPATCH(), ( + *(GLint *)(pc + 0) + ) ); +} + +void __glXDisp_ClearDepth(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_ClearDepth( GET_DISPATCH(), ( + *(GLclampd *)(pc + 0) + ) ); +} + +void __glXDisp_StencilMask(GLbyte * pc) +{ + CALL_StencilMask( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_ColorMask(GLbyte * pc) +{ + CALL_ColorMask( GET_DISPATCH(), ( + *(GLboolean *)(pc + 0), + *(GLboolean *)(pc + 1), + *(GLboolean *)(pc + 2), + *(GLboolean *)(pc + 3) + ) ); +} + +void __glXDisp_DepthMask(GLbyte * pc) +{ + CALL_DepthMask( GET_DISPATCH(), ( + *(GLboolean *)(pc + 0) + ) ); +} + +void __glXDisp_IndexMask(GLbyte * pc) +{ + CALL_IndexMask( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_Accum(GLbyte * pc) +{ + CALL_Accum( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_Disable(GLbyte * pc) +{ + CALL_Disable( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_Enable(GLbyte * pc) +{ + CALL_Enable( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_PopAttrib(GLbyte * pc) +{ + CALL_PopAttrib( GET_DISPATCH(), () ); +} + +void __glXDisp_PushAttrib(GLbyte * pc) +{ + CALL_PushAttrib( GET_DISPATCH(), ( + *(GLbitfield *)(pc + 0) + ) ); +} + +void __glXDisp_MapGrid1d(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_MapGrid1d( GET_DISPATCH(), ( + *(GLint *)(pc + 16), + *(GLdouble *)(pc + 0), + *(GLdouble *)(pc + 8) + ) ); +} + +void __glXDisp_MapGrid1f(GLbyte * pc) +{ + CALL_MapGrid1f( GET_DISPATCH(), ( + *(GLint *)(pc + 0), + *(GLfloat *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_MapGrid2d(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 40); + pc -= 4; + } +#endif + + CALL_MapGrid2d( GET_DISPATCH(), ( + *(GLint *)(pc + 32), + *(GLdouble *)(pc + 0), + *(GLdouble *)(pc + 8), + *(GLint *)(pc + 36), + *(GLdouble *)(pc + 16), + *(GLdouble *)(pc + 24) + ) ); +} + +void __glXDisp_MapGrid2f(GLbyte * pc) +{ + CALL_MapGrid2f( GET_DISPATCH(), ( + *(GLint *)(pc + 0), + *(GLfloat *)(pc + 4), + *(GLfloat *)(pc + 8), + *(GLint *)(pc + 12), + *(GLfloat *)(pc + 16), + *(GLfloat *)(pc + 20) + ) ); +} + +void __glXDisp_EvalCoord1dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_EvalCoord1dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_EvalCoord1fv(GLbyte * pc) +{ + CALL_EvalCoord1fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_EvalCoord2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_EvalCoord2dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_EvalCoord2fv(GLbyte * pc) +{ + CALL_EvalCoord2fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_EvalMesh1(GLbyte * pc) +{ + CALL_EvalMesh1( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8) + ) ); +} + +void __glXDisp_EvalPoint1(GLbyte * pc) +{ + CALL_EvalPoint1( GET_DISPATCH(), ( + *(GLint *)(pc + 0) + ) ); +} + +void __glXDisp_EvalMesh2(GLbyte * pc) +{ + CALL_EvalMesh2( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLint *)(pc + 16) + ) ); +} + +void __glXDisp_EvalPoint2(GLbyte * pc) +{ + CALL_EvalPoint2( GET_DISPATCH(), ( + *(GLint *)(pc + 0), + *(GLint *)(pc + 4) + ) ); +} + +void __glXDisp_AlphaFunc(GLbyte * pc) +{ + CALL_AlphaFunc( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLclampf *)(pc + 4) + ) ); +} + +void __glXDisp_BlendFunc(GLbyte * pc) +{ + CALL_BlendFunc( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4) + ) ); +} + +void __glXDisp_LogicOp(GLbyte * pc) +{ + CALL_LogicOp( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_StencilFunc(GLbyte * pc) +{ + CALL_StencilFunc( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLuint *)(pc + 8) + ) ); +} + +void __glXDisp_StencilOp(GLbyte * pc) +{ + CALL_StencilOp( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8) + ) ); +} + +void __glXDisp_DepthFunc(GLbyte * pc) +{ + CALL_DepthFunc( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_PixelZoom(GLbyte * pc) +{ + CALL_PixelZoom( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_PixelTransferf(GLbyte * pc) +{ + CALL_PixelTransferf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_PixelTransferi(GLbyte * pc) +{ + CALL_PixelTransferi( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4) + ) ); +} + +int __glXDisp_PixelStoref(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_PixelStoref( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); + error = Success; + } + + return error; +} + +int __glXDisp_PixelStorei(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_PixelStorei( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4) + ) ); + error = Success; + } + + return error; +} + +void __glXDisp_PixelMapfv(GLbyte * pc) +{ + const GLsizei mapsize = *(GLsizei *)(pc + 4); + + CALL_PixelMapfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + mapsize, + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_PixelMapuiv(GLbyte * pc) +{ + const GLsizei mapsize = *(GLsizei *)(pc + 4); + + CALL_PixelMapuiv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + mapsize, + (const GLuint *)(pc + 8) + ) ); +} + +void __glXDisp_PixelMapusv(GLbyte * pc) +{ + const GLsizei mapsize = *(GLsizei *)(pc + 4); + + CALL_PixelMapusv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + mapsize, + (const GLushort *)(pc + 8) + ) ); +} + +void __glXDisp_ReadBuffer(GLbyte * pc) +{ + CALL_ReadBuffer( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_CopyPixels(GLbyte * pc) +{ + CALL_CopyPixels( GET_DISPATCH(), ( + *(GLint *)(pc + 0), + *(GLint *)(pc + 4), + *(GLsizei *)(pc + 8), + *(GLsizei *)(pc + 12), + *(GLenum *)(pc + 16) + ) ); +} + +void __glXDisp_DrawPixels(GLbyte * pc) +{ + const GLvoid * const pixels = (const GLvoid *) (pc + 36); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_DrawPixels( GET_DISPATCH(), ( + *(GLsizei *)(pc + 20), + *(GLsizei *)(pc + 24), + *(GLenum *)(pc + 28), + *(GLenum *)(pc + 32), + pixels + ) ); +} + +int __glXDisp_GetBooleanv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 0); + + const GLuint compsize = __glGetBooleanv_size(pname); + GLboolean answerBuffer[200]; + GLboolean * params = __glXGetAnswerBuffer(cl, compsize, answerBuffer, sizeof(answerBuffer), 1); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetBooleanv( GET_DISPATCH(), ( + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 1, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetClipPlane(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLdouble equation[4]; + CALL_GetClipPlane( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + equation + ) ); + __glXSendReply(cl->client, equation, 4, 8, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetDoublev(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 0); + + const GLuint compsize = __glGetDoublev_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetDoublev( GET_DISPATCH(), ( + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetError(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLenum retval; + retval = CALL_GetError( GET_DISPATCH(), () ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int __glXDisp_GetFloatv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 0); + + const GLuint compsize = __glGetFloatv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetFloatv( GET_DISPATCH(), ( + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetIntegerv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 0); + + const GLuint compsize = __glGetIntegerv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetIntegerv( GET_DISPATCH(), ( + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetLightfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetLightfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetLightfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetLightiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetLightiv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetLightiv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMapdv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum target = *(GLenum *)(pc + 0); + const GLenum query = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetMapdv_size(target,query); + GLdouble answerBuffer[200]; + GLdouble * v = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (v == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMapdv( GET_DISPATCH(), ( + target, + query, + v + ) ); + __glXSendReply(cl->client, v, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMapfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum target = *(GLenum *)(pc + 0); + const GLenum query = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetMapfv_size(target,query); + GLfloat answerBuffer[200]; + GLfloat * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (v == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMapfv( GET_DISPATCH(), ( + target, + query, + v + ) ); + __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMapiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum target = *(GLenum *)(pc + 0); + const GLenum query = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetMapiv_size(target,query); + GLint answerBuffer[200]; + GLint * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (v == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMapiv( GET_DISPATCH(), ( + target, + query, + v + ) ); + __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMaterialfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetMaterialfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMaterialfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMaterialiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetMaterialiv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMaterialiv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum map = *(GLenum *)(pc + 0); + + const GLuint compsize = __glGetPixelMapfv_size(map); + GLfloat answerBuffer[200]; + GLfloat * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (values == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetPixelMapfv( GET_DISPATCH(), ( + map, + values + ) ); + __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum map = *(GLenum *)(pc + 0); + + const GLuint compsize = __glGetPixelMapuiv_size(map); + GLuint answerBuffer[200]; + GLuint * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (values == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetPixelMapuiv( GET_DISPATCH(), ( + map, + values + ) ); + __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum map = *(GLenum *)(pc + 0); + + const GLuint compsize = __glGetPixelMapusv_size(map); + GLushort answerBuffer[200]; + GLushort * values = __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer, sizeof(answerBuffer), 2); + + if (values == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetPixelMapusv( GET_DISPATCH(), ( + map, + values + ) ); + __glXSendReply(cl->client, values, compsize, 2, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetTexEnvfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexEnvfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexEnviv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetTexEnviv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexEnviv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexGendv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetTexGendv_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexGendv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexGenfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetTexGenfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexGenfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexGeniv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetTexGeniv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexGeniv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetTexParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetTexParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 8); + + const GLuint compsize = __glGetTexLevelParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexLevelParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 8); + + const GLuint compsize = __glGetTexLevelParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexLevelParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_IsEnabled(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsEnabled( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int __glXDisp_IsList(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsList( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_DepthRange(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_DepthRange( GET_DISPATCH(), ( + *(GLclampd *)(pc + 0), + *(GLclampd *)(pc + 8) + ) ); +} + +void __glXDisp_Frustum(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 48); + pc -= 4; + } +#endif + + CALL_Frustum( GET_DISPATCH(), ( + *(GLdouble *)(pc + 0), + *(GLdouble *)(pc + 8), + *(GLdouble *)(pc + 16), + *(GLdouble *)(pc + 24), + *(GLdouble *)(pc + 32), + *(GLdouble *)(pc + 40) + ) ); +} + +void __glXDisp_LoadIdentity(GLbyte * pc) +{ + CALL_LoadIdentity( GET_DISPATCH(), () ); +} + +void __glXDisp_LoadMatrixf(GLbyte * pc) +{ + CALL_LoadMatrixf( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_LoadMatrixd(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 128); + pc -= 4; + } +#endif + + CALL_LoadMatrixd( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_MatrixMode(GLbyte * pc) +{ + CALL_MatrixMode( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_MultMatrixf(GLbyte * pc) +{ + CALL_MultMatrixf( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_MultMatrixd(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 128); + pc -= 4; + } +#endif + + CALL_MultMatrixd( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Ortho(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 48); + pc -= 4; + } +#endif + + CALL_Ortho( GET_DISPATCH(), ( + *(GLdouble *)(pc + 0), + *(GLdouble *)(pc + 8), + *(GLdouble *)(pc + 16), + *(GLdouble *)(pc + 24), + *(GLdouble *)(pc + 32), + *(GLdouble *)(pc + 40) + ) ); +} + +void __glXDisp_PopMatrix(GLbyte * pc) +{ + CALL_PopMatrix( GET_DISPATCH(), () ); +} + +void __glXDisp_PushMatrix(GLbyte * pc) +{ + CALL_PushMatrix( GET_DISPATCH(), () ); +} + +void __glXDisp_Rotated(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_Rotated( GET_DISPATCH(), ( + *(GLdouble *)(pc + 0), + *(GLdouble *)(pc + 8), + *(GLdouble *)(pc + 16), + *(GLdouble *)(pc + 24) + ) ); +} + +void __glXDisp_Rotatef(GLbyte * pc) +{ + CALL_Rotatef( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0), + *(GLfloat *)(pc + 4), + *(GLfloat *)(pc + 8), + *(GLfloat *)(pc + 12) + ) ); +} + +void __glXDisp_Scaled(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Scaled( GET_DISPATCH(), ( + *(GLdouble *)(pc + 0), + *(GLdouble *)(pc + 8), + *(GLdouble *)(pc + 16) + ) ); +} + +void __glXDisp_Scalef(GLbyte * pc) +{ + CALL_Scalef( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0), + *(GLfloat *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_Translated(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Translated( GET_DISPATCH(), ( + *(GLdouble *)(pc + 0), + *(GLdouble *)(pc + 8), + *(GLdouble *)(pc + 16) + ) ); +} + +void __glXDisp_Translatef(GLbyte * pc) +{ + CALL_Translatef( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0), + *(GLfloat *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_Viewport(GLbyte * pc) +{ + CALL_Viewport( GET_DISPATCH(), ( + *(GLint *)(pc + 0), + *(GLint *)(pc + 4), + *(GLsizei *)(pc + 8), + *(GLsizei *)(pc + 12) + ) ); +} + +void __glXDisp_BindTexture(GLbyte * pc) +{ + CALL_BindTexture( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_Indexubv(GLbyte * pc) +{ + CALL_Indexubv( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDisp_PolygonOffset(GLbyte * pc) +{ + CALL_PolygonOffset( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); +} + +int __glXDisp_AreTexturesResident(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLboolean retval; + GLboolean answerBuffer[200]; + GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); + retval = CALL_AreTexturesResident( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4), + residences + ) ); + __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval); + error = Success; + } + + return error; +} + +int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLboolean retval; + GLboolean answerBuffer[200]; + GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); + retval = CALL_AreTexturesResident( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4), + residences + ) ); + __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_CopyTexImage1D(GLbyte * pc) +{ + CALL_CopyTexImage1D( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLint *)(pc + 12), + *(GLint *)(pc + 16), + *(GLsizei *)(pc + 20), + *(GLint *)(pc + 24) + ) ); +} + +void __glXDisp_CopyTexImage2D(GLbyte * pc) +{ + CALL_CopyTexImage2D( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLint *)(pc + 12), + *(GLint *)(pc + 16), + *(GLsizei *)(pc + 20), + *(GLsizei *)(pc + 24), + *(GLint *)(pc + 28) + ) ); +} + +void __glXDisp_CopyTexSubImage1D(GLbyte * pc) +{ + CALL_CopyTexSubImage1D( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLint *)(pc + 16), + *(GLsizei *)(pc + 20) + ) ); +} + +void __glXDisp_CopyTexSubImage2D(GLbyte * pc) +{ + CALL_CopyTexSubImage2D( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLint *)(pc + 16), + *(GLint *)(pc + 20), + *(GLsizei *)(pc + 24), + *(GLsizei *)(pc + 28) + ) ); +} + +int __glXDisp_DeleteTextures(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DeleteTextures( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); + error = Success; + } + + return error; +} + +int __glXDisp_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DeleteTextures( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); + error = Success; + } + + return error; +} + +int __glXDisp_GenTextures(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLuint answerBuffer[200]; + GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenTextures( GET_DISPATCH(), ( + n, + textures + ) ); + __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLuint answerBuffer[200]; + GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenTextures( GET_DISPATCH(), ( + n, + textures + ) ); + __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_IsTexture(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsTexture( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int __glXDisp_IsTextureEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsTexture( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_PrioritizeTextures(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_PrioritizeTextures( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4), + (const GLclampf *)(pc + 4) + ) ); +} + +void __glXDisp_TexSubImage1D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_TexSubImage1D( GET_DISPATCH(), ( + *(GLenum *)(pc + 20), + *(GLint *)(pc + 24), + *(GLint *)(pc + 28), + *(GLsizei *)(pc + 36), + *(GLenum *)(pc + 44), + *(GLenum *)(pc + 48), + pixels + ) ); +} + +void __glXDisp_TexSubImage2D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_TexSubImage2D( GET_DISPATCH(), ( + *(GLenum *)(pc + 20), + *(GLint *)(pc + 24), + *(GLint *)(pc + 28), + *(GLint *)(pc + 32), + *(GLsizei *)(pc + 36), + *(GLsizei *)(pc + 40), + *(GLenum *)(pc + 44), + *(GLenum *)(pc + 48), + pixels + ) ); +} + +void __glXDisp_BlendColor(GLbyte * pc) +{ + CALL_BlendColor( GET_DISPATCH(), ( + *(GLclampf *)(pc + 0), + *(GLclampf *)(pc + 4), + *(GLclampf *)(pc + 8), + *(GLclampf *)(pc + 12) + ) ); +} + +void __glXDisp_BlendEquation(GLbyte * pc) +{ + CALL_BlendEquation( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_ColorTable(GLbyte * pc) +{ + const GLvoid * const table = (const GLvoid *) (pc + 40); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_ColorTable( GET_DISPATCH(), ( + *(GLenum *)(pc + 20), + *(GLenum *)(pc + 24), + *(GLsizei *)(pc + 28), + *(GLenum *)(pc + 32), + *(GLenum *)(pc + 36), + table + ) ); +} + +void __glXDisp_ColorTableParameterfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLfloat * params; + + params = (const GLfloat *) (pc + 8); + + CALL_ColorTableParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_ColorTableParameteriv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLint * params; + + params = (const GLint *) (pc + 8); + + CALL_ColorTableParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_CopyColorTable(GLbyte * pc) +{ + CALL_CopyColorTable( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16) + ) ); +} + +int __glXDisp_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetColorTableParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetColorTableParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetColorTableParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetColorTableParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void __glXDisp_ColorSubTable(GLbyte * pc) +{ + const GLvoid * const data = (const GLvoid *) (pc + 40); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_ColorSubTable( GET_DISPATCH(), ( + *(GLenum *)(pc + 20), + *(GLsizei *)(pc + 24), + *(GLsizei *)(pc + 28), + *(GLenum *)(pc + 32), + *(GLenum *)(pc + 36), + data + ) ); +} + +void __glXDisp_CopyColorSubTable(GLbyte * pc) +{ + CALL_CopyColorSubTable( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLsizei *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16) + ) ); +} + +void __glXDisp_ConvolutionFilter1D(GLbyte * pc) +{ + const GLvoid * const image = (const GLvoid *) (pc + 44); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_ConvolutionFilter1D( GET_DISPATCH(), ( + *(GLenum *)(pc + 20), + *(GLenum *)(pc + 24), + *(GLsizei *)(pc + 28), + *(GLenum *)(pc + 36), + *(GLenum *)(pc + 40), + image + ) ); +} + +void __glXDisp_ConvolutionFilter2D(GLbyte * pc) +{ + const GLvoid * const image = (const GLvoid *) (pc + 44); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_ConvolutionFilter2D( GET_DISPATCH(), ( + *(GLenum *)(pc + 20), + *(GLenum *)(pc + 24), + *(GLsizei *)(pc + 28), + *(GLsizei *)(pc + 32), + *(GLenum *)(pc + 36), + *(GLenum *)(pc + 40), + image + ) ); +} + +void __glXDisp_ConvolutionParameterf(GLbyte * pc) +{ + CALL_ConvolutionParameterf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_ConvolutionParameterfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLfloat * params; + + params = (const GLfloat *) (pc + 8); + + CALL_ConvolutionParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_ConvolutionParameteri(GLbyte * pc) +{ + CALL_ConvolutionParameteri( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8) + ) ); +} + +void __glXDisp_ConvolutionParameteriv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLint * params; + + params = (const GLint *) (pc + 8); + + CALL_ConvolutionParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_CopyConvolutionFilter1D(GLbyte * pc) +{ + CALL_CopyConvolutionFilter1D( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16) + ) ); +} + +void __glXDisp_CopyConvolutionFilter2D(GLbyte * pc) +{ + CALL_CopyConvolutionFilter2D( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16), + *(GLsizei *)(pc + 20) + ) ); +} + +int __glXDisp_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetConvolutionParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetConvolutionParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetConvolutionParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetConvolutionParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetHistogramParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetHistogramParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetHistogramParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetHistogramParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetMinmaxParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetMinmaxParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetMinmaxParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetMinmaxParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void __glXDisp_Histogram(GLbyte * pc) +{ + CALL_Histogram( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLsizei *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLboolean *)(pc + 12) + ) ); +} + +void __glXDisp_Minmax(GLbyte * pc) +{ + CALL_Minmax( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLboolean *)(pc + 8) + ) ); +} + +void __glXDisp_ResetHistogram(GLbyte * pc) +{ + CALL_ResetHistogram( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_ResetMinmax(GLbyte * pc) +{ + CALL_ResetMinmax( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_TexImage3D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 76); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 80); + __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) hdr->skipImages) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_TexImage3D( GET_DISPATCH(), ( + *(GLenum *)(pc + 36), + *(GLint *)(pc + 40), + *(GLint *)(pc + 44), + *(GLsizei *)(pc + 48), + *(GLsizei *)(pc + 52), + *(GLsizei *)(pc + 56), + *(GLint *)(pc + 64), + *(GLenum *)(pc + 68), + *(GLenum *)(pc + 72), + pixels + ) ); +} + +void __glXDisp_TexSubImage3D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 84); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 88); + __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) hdr->skipImages) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); + + CALL_TexSubImage3D( GET_DISPATCH(), ( + *(GLenum *)(pc + 36), + *(GLint *)(pc + 40), + *(GLint *)(pc + 44), + *(GLint *)(pc + 48), + *(GLint *)(pc + 52), + *(GLsizei *)(pc + 60), + *(GLsizei *)(pc + 64), + *(GLsizei *)(pc + 68), + *(GLenum *)(pc + 76), + *(GLenum *)(pc + 80), + pixels + ) ); +} + +void __glXDisp_CopyTexSubImage3D(GLbyte * pc) +{ + CALL_CopyTexSubImage3D( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLint *)(pc + 16), + *(GLint *)(pc + 20), + *(GLint *)(pc + 24), + *(GLsizei *)(pc + 28), + *(GLsizei *)(pc + 32) + ) ); +} + +void __glXDisp_ActiveTextureARB(GLbyte * pc) +{ + CALL_ActiveTextureARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_MultiTexCoord1dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 12); + pc -= 4; + } +#endif + + CALL_MultiTexCoord1dvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 8), + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_MultiTexCoord1fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord1fvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord1ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord1ivARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLint *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord1svARB(GLbyte * pc) +{ + CALL_MultiTexCoord1svARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord2dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_MultiTexCoord2dvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 16), + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_MultiTexCoord2fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord2fvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord2ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord2ivARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLint *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord2svARB(GLbyte * pc) +{ + CALL_MultiTexCoord2svARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord3dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 28); + pc -= 4; + } +#endif + + CALL_MultiTexCoord3dvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 24), + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord3fvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord3ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord3ivARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLint *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord3svARB(GLbyte * pc) +{ + CALL_MultiTexCoord3svARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_MultiTexCoord4dvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 32), + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_MultiTexCoord4fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord4fvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord4ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord4ivARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLint *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord4svARB(GLbyte * pc) +{ + CALL_MultiTexCoord4svARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_SampleCoverageARB(GLbyte * pc) +{ + CALL_SampleCoverageARB( GET_DISPATCH(), ( + *(GLclampf *)(pc + 0), + *(GLboolean *)(pc + 4) + ) ); +} + +void __glXDisp_CompressedTexImage1DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 20); + + CALL_CompressedTexImage1DARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLsizei *)(pc + 12), + *(GLint *)(pc + 16), + imageSize, + (const GLvoid *)(pc + 24) + ) ); +} + +void __glXDisp_CompressedTexImage2DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 24); + + CALL_CompressedTexImage2DARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLsizei *)(pc + 12), + *(GLsizei *)(pc + 16), + *(GLint *)(pc + 20), + imageSize, + (const GLvoid *)(pc + 28) + ) ); +} + +void __glXDisp_CompressedTexImage3DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 28); + + CALL_CompressedTexImage3DARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLsizei *)(pc + 12), + *(GLsizei *)(pc + 16), + *(GLsizei *)(pc + 20), + *(GLint *)(pc + 24), + imageSize, + (const GLvoid *)(pc + 32) + ) ); +} + +void __glXDisp_CompressedTexSubImage1DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 20); + + CALL_CompressedTexSubImage1DARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8), + *(GLsizei *)(pc + 12), + *(GLenum *)(pc + 16), + imageSize, + (const GLvoid *)(pc + 24) + ) ); +} + +void __glXDisp_CompressedTexSubImage2DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 28); + + CALL_CompressedTexSubImage2DARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16), + *(GLsizei *)(pc + 20), + *(GLenum *)(pc + 24), + imageSize, + (const GLvoid *)(pc + 32) + ) ); +} + +void __glXDisp_CompressedTexSubImage3DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 36); + + CALL_CompressedTexSubImage3DARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLint *)(pc + 16), + *(GLsizei *)(pc + 20), + *(GLsizei *)(pc + 24), + *(GLsizei *)(pc + 28), + *(GLenum *)(pc + 32), + imageSize, + (const GLvoid *)(pc + 40) + ) ); +} + +int __glXDisp_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLdouble params[4]; + CALL_GetProgramEnvParameterdvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + params + ) ); + __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLfloat params[4]; + CALL_GetProgramEnvParameterfvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + params + ) ); + __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLdouble params[4]; + CALL_GetProgramLocalParameterdvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + params + ) ); + __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLfloat params[4]; + CALL_GetProgramLocalParameterfvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + params + ) ); + __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetProgramivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetProgramivARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetVertexAttribdvARB_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribdvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetVertexAttribfvARB_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribfvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetVertexAttribivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetVertexAttribivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 40); + pc -= 4; + } +#endif + + CALL_ProgramEnvParameter4dvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + (const GLdouble *)(pc + 8) + ) ); +} + +void __glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc) +{ + CALL_ProgramEnvParameter4fvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 40); + pc -= 4; + } +#endif + + CALL_ProgramLocalParameter4dvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + (const GLdouble *)(pc + 8) + ) ); +} + +void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc) +{ + CALL_ProgramLocalParameter4fvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_ProgramStringARB(GLbyte * pc) +{ + const GLsizei len = *(GLsizei *)(pc + 8); + + CALL_ProgramStringARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + len, + (const GLvoid *)(pc + 12) + ) ); +} + +void __glXDisp_VertexAttrib1dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 12); + pc -= 4; + } +#endif + + CALL_VertexAttrib1dvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib1fvARB(GLbyte * pc) +{ + CALL_VertexAttrib1fvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib1svARB(GLbyte * pc) +{ + CALL_VertexAttrib1svARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib2dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_VertexAttrib2dvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib2fvARB(GLbyte * pc) +{ + CALL_VertexAttrib2fvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib2svARB(GLbyte * pc) +{ + CALL_VertexAttrib2svARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib3dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 28); + pc -= 4; + } +#endif + + CALL_VertexAttrib3dvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib3fvARB(GLbyte * pc) +{ + CALL_VertexAttrib3fvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib3svARB(GLbyte * pc) +{ + CALL_VertexAttrib3svARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NbvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NbvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLbyte *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NivARB(GLbyte * pc) +{ + CALL_VertexAttrib4NivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLint *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NsvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NsvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NubvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NubvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLubyte *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NuivARB(GLbyte * pc) +{ + CALL_VertexAttrib4NuivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NusvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NusvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLushort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4bvARB(GLbyte * pc) +{ + CALL_VertexAttrib4bvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLbyte *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_VertexAttrib4dvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4fvARB(GLbyte * pc) +{ + CALL_VertexAttrib4fvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4ivARB(GLbyte * pc) +{ + CALL_VertexAttrib4ivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLint *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4svARB(GLbyte * pc) +{ + CALL_VertexAttrib4svARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4ubvARB(GLbyte * pc) +{ + CALL_VertexAttrib4ubvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLubyte *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4uivARB(GLbyte * pc) +{ + CALL_VertexAttrib4uivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4usvARB(GLbyte * pc) +{ + CALL_VertexAttrib4usvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLushort *)(pc + 4) + ) ); +} + +void __glXDisp_BeginQueryARB(GLbyte * pc) +{ + CALL_BeginQueryARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4) + ) ); +} + +int __glXDisp_DeleteQueriesARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DeleteQueriesARB( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); + error = Success; + } + + return error; +} + +void __glXDisp_EndQueryARB(GLbyte * pc) +{ + CALL_EndQueryARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +int __glXDisp_GenQueriesARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLuint answerBuffer[200]; + GLuint * ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenQueriesARB( GET_DISPATCH(), ( + n, + ids + ) ); + __glXSendReply(cl->client, ids, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetQueryObjectivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetQueryObjectivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryObjectivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetQueryObjectuivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetQueryObjectuivARB_size(pname); + GLuint answerBuffer[200]; + GLuint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryObjectuivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetQueryivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetQueryivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryivARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_IsQueryARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsQueryARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_DrawBuffersARB(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DrawBuffersARB( GET_DISPATCH(), ( + n, + (const GLenum *)(pc + 4) + ) ); +} + +void __glXDisp_SampleMaskSGIS(GLbyte * pc) +{ + CALL_SampleMaskSGIS( GET_DISPATCH(), ( + *(GLclampf *)(pc + 0), + *(GLboolean *)(pc + 4) + ) ); +} + +void __glXDisp_SamplePatternSGIS(GLbyte * pc) +{ + CALL_SamplePatternSGIS( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_PointParameterfEXT(GLbyte * pc) +{ + CALL_PointParameterfEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_PointParameterfvEXT(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 0); + const GLfloat * params; + + params = (const GLfloat *) (pc + 4); + + CALL_PointParameterfvEXT( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDisp_SecondaryColor3bvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3bvEXT( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDisp_SecondaryColor3dvEXT(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_SecondaryColor3dvEXT( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_SecondaryColor3fvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3fvEXT( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_SecondaryColor3ivEXT(GLbyte * pc) +{ + CALL_SecondaryColor3ivEXT( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_SecondaryColor3svEXT(GLbyte * pc) +{ + CALL_SecondaryColor3svEXT( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_SecondaryColor3ubvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3ubvEXT( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc) +{ + CALL_SecondaryColor3uivEXT( GET_DISPATCH(), ( + (const GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_SecondaryColor3usvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3usvEXT( GET_DISPATCH(), ( + (const GLushort *)(pc + 0) + ) ); +} + +void __glXDisp_FogCoorddvEXT(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_FogCoorddvEXT( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_FogCoordfvEXT(GLbyte * pc) +{ + CALL_FogCoordfvEXT( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc) +{ + CALL_BlendFuncSeparateEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLenum *)(pc + 12) + ) ); +} + +void __glXDisp_WindowPos3fvMESA(GLbyte * pc) +{ + CALL_WindowPos3fvMESA( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +int __glXDisp_AreProgramsResidentNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLboolean retval; + GLboolean answerBuffer[200]; + GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); + retval = CALL_AreProgramsResidentNV( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4), + residences + ) ); + __glXSendReply(cl->client, residences, n, 1, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_BindProgramNV(GLbyte * pc) +{ + CALL_BindProgramNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4) + ) ); +} + +int __glXDisp_DeleteProgramsNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DeleteProgramsNV( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); + error = Success; + } + + return error; +} + +void __glXDisp_ExecuteProgramNV(GLbyte * pc) +{ + CALL_ExecuteProgramNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + (const GLfloat *)(pc + 8) + ) ); +} + +int __glXDisp_GenProgramsNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLuint answerBuffer[200]; + GLuint * programs = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenProgramsNV( GET_DISPATCH(), ( + n, + programs + ) ); + __glXSendReply(cl->client, programs, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramParameterdvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLdouble params[4]; + CALL_GetProgramParameterdvNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + *(GLenum *)(pc + 8), + params + ) ); + __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramParameterfvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLfloat params[4]; + CALL_GetProgramParameterfvNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + *(GLenum *)(pc + 8), + params + ) ); + __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramivNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetProgramivNV_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetProgramivNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTrackMatrixivNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLint params[1]; + CALL_GetTrackMatrixivNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + *(GLenum *)(pc + 8), + params + ) ); + __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetVertexAttribdvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetVertexAttribdvNV_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribdvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetVertexAttribfvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetVertexAttribfvNV_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribfvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetVertexAttribivNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetVertexAttribivNV_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribivNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_IsProgramNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsProgramNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_LoadProgramNV(GLbyte * pc) +{ + const GLsizei len = *(GLsizei *)(pc + 8); + + CALL_LoadProgramNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + len, + (const GLubyte *)(pc + 12) + ) ); +} + +void __glXDisp_ProgramParameters4dvNV(GLbyte * pc) +{ + const GLuint num = *(GLuint *)(pc + 8); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 16 + __GLX_PAD((num * 32)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_ProgramParameters4dvNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + num, + (const GLdouble *)(pc + 12) + ) ); +} + +void __glXDisp_ProgramParameters4fvNV(GLbyte * pc) +{ + const GLuint num = *(GLuint *)(pc + 8); + + CALL_ProgramParameters4fvNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + num, + (const GLfloat *)(pc + 12) + ) ); +} + +void __glXDisp_RequestResidentProgramsNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_RequestResidentProgramsNV( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_TrackMatrixNV(GLbyte * pc) +{ + CALL_TrackMatrixNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLenum *)(pc + 12) + ) ); +} + +void __glXDisp_VertexAttrib1dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 12); + pc -= 4; + } +#endif + + CALL_VertexAttrib1dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib1fvNV(GLbyte * pc) +{ + CALL_VertexAttrib1fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib1svNV(GLbyte * pc) +{ + CALL_VertexAttrib1svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib2dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_VertexAttrib2dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib2fvNV(GLbyte * pc) +{ + CALL_VertexAttrib2fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib2svNV(GLbyte * pc) +{ + CALL_VertexAttrib2svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib3dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 28); + pc -= 4; + } +#endif + + CALL_VertexAttrib3dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib3fvNV(GLbyte * pc) +{ + CALL_VertexAttrib3fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib3svNV(GLbyte * pc) +{ + CALL_VertexAttrib3svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_VertexAttrib4dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4fvNV(GLbyte * pc) +{ + CALL_VertexAttrib4fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4svNV(GLbyte * pc) +{ + CALL_VertexAttrib4svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc) +{ + CALL_VertexAttrib4ubvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLubyte *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttribs1dvNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_VertexAttribs1dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLdouble *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs1fvNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs1fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs1svNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs1svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLshort *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs2dvNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_VertexAttribs2dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLdouble *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs2fvNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs2fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs2svNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs2svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLshort *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs3dvNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_VertexAttribs3dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLdouble *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs3fvNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs3fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs3svNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs3svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLshort *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs4dvNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_VertexAttribs4dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLdouble *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs4fvNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs4fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs4svNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs4svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLshort *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs4ubvNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs4ubvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLubyte *)(pc + 8) + ) ); +} + +void __glXDisp_PointParameteriNV(GLbyte * pc) +{ + CALL_PointParameteriNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4) + ) ); +} + +void __glXDisp_PointParameterivNV(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 0); + const GLint * params; + + params = (const GLint *) (pc + 4); + + CALL_PointParameterivNV( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc) +{ + CALL_ActiveStencilFaceEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +int __glXDisp_GetProgramNamedParameterdvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei len = *(GLsizei *)(pc + 4); + + GLdouble params[4]; + CALL_GetProgramNamedParameterdvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + len, + (const GLubyte *)(pc + 8), + params + ) ); + __glXSendReply(cl->client, params, 4, 8, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramNamedParameterfvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei len = *(GLsizei *)(pc + 4); + + GLfloat params[4]; + CALL_GetProgramNamedParameterfvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + len, + (const GLubyte *)(pc + 8), + params + ) ); + __glXSendReply(cl->client, params, 4, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +void __glXDisp_ProgramNamedParameter4dvNV(GLbyte * pc) +{ + const GLsizei len = *(GLsizei *)(pc + 36); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 44 + __GLX_PAD(len) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_ProgramNamedParameter4dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 32), + len, + (const GLubyte *)(pc + 40), + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_ProgramNamedParameter4fvNV(GLbyte * pc) +{ + const GLsizei len = *(GLsizei *)(pc + 4); + + CALL_ProgramNamedParameter4fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + len, + (const GLubyte *)(pc + 24), + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_BlendEquationSeparateEXT(GLbyte * pc) +{ + CALL_BlendEquationSeparateEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4) + ) ); +} + +void __glXDisp_BindFramebufferEXT(GLbyte * pc) +{ + CALL_BindFramebufferEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_BindRenderbufferEXT(GLbyte * pc) +{ + CALL_BindRenderbufferEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4) + ) ); +} + +int __glXDisp_CheckFramebufferStatusEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLenum retval; + retval = CALL_CheckFramebufferStatusEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_DeleteFramebuffersEXT(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DeleteFramebuffersEXT( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_DeleteRenderbuffersEXT(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DeleteRenderbuffersEXT( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_FramebufferRenderbufferEXT(GLbyte * pc) +{ + CALL_FramebufferRenderbufferEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLuint *)(pc + 12) + ) ); +} + +void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture1DEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLuint *)(pc + 12), + *(GLint *)(pc + 16) + ) ); +} + +void __glXDisp_FramebufferTexture2DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture2DEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLuint *)(pc + 12), + *(GLint *)(pc + 16) + ) ); +} + +void __glXDisp_FramebufferTexture3DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture3DEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLuint *)(pc + 12), + *(GLint *)(pc + 16), + *(GLint *)(pc + 20) + ) ); +} + +int __glXDisp_GenFramebuffersEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLuint answerBuffer[200]; + GLuint * framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenFramebuffersEXT( GET_DISPATCH(), ( + n, + framebuffers + ) ); + __glXSendReply(cl->client, framebuffers, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GenRenderbuffersEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLuint answerBuffer[200]; + GLuint * renderbuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenRenderbuffersEXT( GET_DISPATCH(), ( + n, + renderbuffers + ) ); + __glXSendReply(cl->client, renderbuffers, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +void __glXDisp_GenerateMipmapEXT(GLbyte * pc) +{ + CALL_GenerateMipmapEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +int __glXDisp_GetFramebufferAttachmentParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLint params[1]; + CALL_GetFramebufferAttachmentParameterivEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + params + ) ); + __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetRenderbufferParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLint params[1]; + CALL_GetRenderbufferParameterivEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + params + ) ); + __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_IsFramebufferEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsFramebufferEXT( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int __glXDisp_IsRenderbufferEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsRenderbufferEXT( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_RenderbufferStorageEXT(GLbyte * pc) +{ + CALL_RenderbufferStorageEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLsizei *)(pc + 8), + *(GLsizei *)(pc + 12) + ) ); +} + diff --git a/GL/glx/indirect_dispatch.h b/GL/glx/indirect_dispatch.h new file mode 100644 index 000000000..e81c382f0 --- /dev/null +++ b/GL/glx/indirect_dispatch.h @@ -0,0 +1,1047 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#if !defined( _INDIRECT_DISPATCH_H_ ) +# define _INDIRECT_DISPATCH_H_ + +# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) +# define HIDDEN __attribute__((visibility("hidden"))) +# else +# define HIDDEN +# endif +struct __GLXclientStateRec; + +extern HIDDEN void __glXDisp_MapGrid1d(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MapGrid1d(GLbyte * pc); +extern HIDDEN void __glXDisp_MapGrid1f(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MapGrid1f(GLbyte * pc); +extern HIDDEN int __glXDisp_NewList(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_NewList(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_LoadIdentity(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LoadIdentity(GLbyte * pc); +extern HIDDEN void __glXDisp_SampleCoverageARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SampleCoverageARB(GLbyte * pc); +extern HIDDEN void __glXDisp_ConvolutionFilter1D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ConvolutionFilter1D(GLbyte * pc); +extern HIDDEN void __glXDisp_BeginQueryARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BeginQueryARB(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos3dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos3dv(GLbyte * pc); +extern HIDDEN void __glXDisp_PointParameteriNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PointParameteriNV(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord1iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord1iv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord4sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord4sv(GLbyte * pc); +extern HIDDEN void __glXDisp_ActiveTextureARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ActiveTextureARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Histogram(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Histogram(GLbyte * pc); +extern HIDDEN int __glXDisp_GetMapfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMapfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_RasterPos4dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos4dv(GLbyte * pc); +extern HIDDEN void __glXDisp_PolygonStipple(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PolygonStipple(GLbyte * pc); +extern HIDDEN void __glXDisp_BlendEquationSeparateEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BlendEquationSeparateEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_GetPixelMapfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetPixelMapfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Color3uiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3uiv(GLbyte * pc); +extern HIDDEN int __glXDisp_IsEnabled(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsEnabled(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib4svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4svNV(GLbyte * pc); +extern HIDDEN void __glXDisp_EvalCoord2fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalCoord2fv(GLbyte * pc); +extern HIDDEN int __glXDisp_DestroyPixmap(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DestroyPixmap(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetMapiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMapiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_SwapBuffers(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_SwapBuffers(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Indexubv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Indexubv(GLbyte * pc); +extern HIDDEN int __glXDisp_Render(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_Render(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetQueryivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetQueryivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexImage3D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexImage3D(GLbyte * pc); +extern HIDDEN int __glXDisp_MakeContextCurrent(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_MakeContextCurrent(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetFBConfigs(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetFBConfigs(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Color3ubv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3ubv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetQueryObjectivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetQueryObjectivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Vertex3dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex3dv(GLbyte * pc); +extern HIDDEN void __glXDisp_CompressedTexSubImage2DARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CompressedTexSubImage2DARB(GLbyte * pc); +extern HIDDEN void __glXDisp_LightModeliv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LightModeliv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib1svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib1svARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs1dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs1dvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Normal3bv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Normal3bv(GLbyte * pc); +extern HIDDEN int __glXDisp_VendorPrivate(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_VendorPrivate(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_CreateGLXPixmapWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreateGLXPixmapWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib1fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex3iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex3iv(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyConvolutionFilter1D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc); +extern HIDDEN void __glXDisp_BlendColor(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BlendColor(GLbyte * pc); +extern HIDDEN void __glXDisp_Scalef(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Scalef(GLbyte * pc); +extern HIDDEN void __glXDisp_Normal3iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Normal3iv(GLbyte * pc); +extern HIDDEN void __glXDisp_PassThrough(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PassThrough(GLbyte * pc); +extern HIDDEN void __glXDisp_Viewport(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Viewport(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4NusvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4NusvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyTexSubImage2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc); +extern HIDDEN void __glXDisp_DepthRange(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DepthRange(GLbyte * pc); +extern HIDDEN void __glXDisp_ResetHistogram(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ResetHistogram(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramNamedParameterfvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramNamedParameterfvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_PointParameterfEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PointParameterfEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord2sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord2sv(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex4dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex4dv(GLbyte * pc); +extern HIDDEN void __glXDisp_CompressedTexImage3DARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CompressedTexImage3DARB(GLbyte * pc); +extern HIDDEN void __glXDisp_Color3sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3sv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetConvolutionParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetConvolutionParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Vertex2dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex2dv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetVisualConfigs(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVisualConfigs(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_MultiTexCoord1fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord3iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord3iv(GLbyte * pc); +extern HIDDEN int __glXDisp_CopyContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CopyContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Color3fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3fv(GLbyte * pc); +extern HIDDEN void __glXDisp_PointSize(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PointSize(GLbyte * pc); +extern HIDDEN void __glXDisp_PopName(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PopName(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4NbvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4NbvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex4sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex4sv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetTexEnvfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexEnvfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_LineStipple(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LineStipple(GLbyte * pc); +extern HIDDEN void __glXDisp_TexEnvi(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexEnvi(GLbyte * pc); +extern HIDDEN int __glXDisp_GetClipPlane(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetClipPlane(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttribs3dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs3dvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_LightModeli(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LightModeli(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs4fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs4fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Scaled(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Scaled(GLbyte * pc); +extern HIDDEN void __glXDisp_CallLists(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CallLists(GLbyte * pc); +extern HIDDEN void __glXDisp_AlphaFunc(GLbyte * pc); +extern HIDDEN void __glXDispSwap_AlphaFunc(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord2iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord2iv(GLbyte * pc); +extern HIDDEN void __glXDisp_CompressedTexImage1DARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CompressedTexImage1DARB(GLbyte * pc); +extern HIDDEN void __glXDisp_Rotated(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Rotated(GLbyte * pc); +extern HIDDEN int __glXDisp_ReadPixels(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_ReadPixels(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_EdgeFlagv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EdgeFlagv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexParameterf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexParameterf(GLbyte * pc); +extern HIDDEN void __glXDisp_TexParameteri(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexParameteri(GLbyte * pc); +extern HIDDEN int __glXDisp_DestroyContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DestroyContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_DrawPixels(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DrawPixels(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord2svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord2svARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs3fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs3fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_GenerateMipmapEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_GenerateMipmapEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_GenLists(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GenLists(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_MapGrid2d(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MapGrid2d(GLbyte * pc); +extern HIDDEN void __glXDisp_MapGrid2f(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MapGrid2f(GLbyte * pc); +extern HIDDEN void __glXDisp_Scissor(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Scissor(GLbyte * pc); +extern HIDDEN void __glXDisp_Fogf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Fogf(GLbyte * pc); +extern HIDDEN void __glXDisp_TexSubImage1D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexSubImage1D(GLbyte * pc); +extern HIDDEN void __glXDisp_Color4usv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4usv(GLbyte * pc); +extern HIDDEN void __glXDisp_Fogi(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Fogi(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos3iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos3iv(GLbyte * pc); +extern HIDDEN void __glXDisp_PixelMapfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PixelMapfv(GLbyte * pc); +extern HIDDEN void __glXDisp_Color3usv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3usv(GLbyte * pc); +extern HIDDEN int __glXDisp_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_PointParameterfvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PointParameterfvEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_Color3bv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3bv(GLbyte * pc); +extern HIDDEN void __glXDisp_SecondaryColor3bvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3bvEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramLocalParameterfvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramLocalParameterfvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_RenderbufferStorageEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RenderbufferStorageEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_ColorTable(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ColorTable(GLbyte * pc); +extern HIDDEN void __glXDisp_Accum(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Accum(GLbyte * pc); +extern HIDDEN int __glXDisp_GetTexImage(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexImage(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ConvolutionFilter2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ConvolutionFilter2D(GLbyte * pc); +extern HIDDEN int __glXDisp_Finish(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_Finish(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ClearStencil(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ClearStencil(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib3dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib3dvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs4ubvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_ConvolutionParameteriv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ConvolutionParameteriv(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos2fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos2fv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord1fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord1fv(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos4fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos4fv(GLbyte * pc); +extern HIDDEN void __glXDisp_ClearIndex(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ClearIndex(GLbyte * pc); +extern HIDDEN void __glXDisp_LoadMatrixd(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LoadMatrixd(GLbyte * pc); +extern HIDDEN void __glXDisp_PushMatrix(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PushMatrix(GLbyte * pc); +extern HIDDEN void __glXDisp_ConvolutionParameterfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ConvolutionParameterfv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetTexGendv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexGendv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_LoadProgramNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LoadProgramNV(GLbyte * pc); +extern HIDDEN int __glXDisp_EndList(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_EndList(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib4fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_EvalCoord1fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalCoord1fv(GLbyte * pc); +extern HIDDEN void __glXDisp_EvalMesh2(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalMesh2(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex4fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex4fv(GLbyte * pc); +extern HIDDEN int __glXDisp_CheckFramebufferStatusEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CheckFramebufferStatusEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetVertexAttribivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVertexAttribivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetFBConfigsSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetFBConfigsSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_CreateNewContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreateNewContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetMinmax(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMinmax(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetMinmaxEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMinmaxEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Normal3fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Normal3fv(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4ivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4ivARB(GLbyte * pc); +extern HIDDEN void __glXDisp_End(GLbyte * pc); +extern HIDDEN void __glXDispSwap_End(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs2dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs2dvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramParameterfvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramParameterfvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_BindTexture(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BindTexture(GLbyte * pc); +extern HIDDEN void __glXDisp_TexSubImage2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexSubImage2D(GLbyte * pc); +extern HIDDEN void __glXDisp_DeleteRenderbuffersEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DeleteRenderbuffersEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_TexGenfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexGenfv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4bvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4bvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_CreateContextWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreateContextWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_FramebufferTexture3DEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_FramebufferTexture3DEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_CopySubBufferMESA(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CopySubBufferMESA(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_BlendEquation(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BlendEquation(GLbyte * pc); +extern HIDDEN int __glXDisp_GetError(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetError(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexCoord3dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord3dv(GLbyte * pc); +extern HIDDEN void __glXDisp_Indexdv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Indexdv(GLbyte * pc); +extern HIDDEN void __glXDisp_PushName(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PushName(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord2dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord2dvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramNamedParameter4fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramNamedParameter4fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4fvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_CreateGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreateGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_MultiTexCoord1svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord1svARB(GLbyte * pc); +extern HIDDEN void __glXDisp_EndQueryARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EndQueryARB(GLbyte * pc); +extern HIDDEN void __glXDisp_DepthMask(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DepthMask(GLbyte * pc); +extern HIDDEN void __glXDisp_Color4iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4iv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetMaterialiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMaterialiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_StencilOp(GLbyte * pc); +extern HIDDEN void __glXDispSwap_StencilOp(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord3svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord3svARB(GLbyte * pc); +extern HIDDEN void __glXDisp_TexEnvfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexEnvfv(GLbyte * pc); +extern HIDDEN int __glXDisp_QueryServerString(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_QueryServerString(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_LoadMatrixf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LoadMatrixf(GLbyte * pc); +extern HIDDEN void __glXDisp_Color4bv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4bv(GLbyte * pc); +extern HIDDEN void __glXDisp_SecondaryColor3usvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3usvEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib2fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib2fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_DeleteLists(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DeleteLists(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_LogicOp(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LogicOp(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord4fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord4fv(GLbyte * pc); +extern HIDDEN int __glXDisp_WaitX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_WaitX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_FramebufferRenderbufferEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_FramebufferRenderbufferEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib1dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc); +extern HIDDEN int __glXDisp_GenTextures(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GenTextures(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_RasterPos2sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos2sv(GLbyte * pc); +extern HIDDEN void __glXDisp_Color4ubv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4ubv(GLbyte * pc); +extern HIDDEN void __glXDisp_DrawBuffer(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DrawBuffer(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord2fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord2fv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord1sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord1sv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexGeniv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexGeniv(GLbyte * pc); +extern HIDDEN void __glXDisp_DepthFunc(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DepthFunc(GLbyte * pc); +extern HIDDEN void __glXDisp_PixelMapusv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PixelMapusv(GLbyte * pc); +extern HIDDEN void __glXDisp_PointParameterivNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PointParameterivNV(GLbyte * pc); +extern HIDDEN void __glXDisp_BlendFunc(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BlendFunc(GLbyte * pc); +extern HIDDEN int __glXDisp_WaitGL(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_WaitGL(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_MultiTexCoord3dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord3dvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramNamedParameter4dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramNamedParameter4dvNV(GLbyte * pc); +extern HIDDEN int __glXDisp_Flush(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_Flush(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Color4uiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4uiv(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos3sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos3sv(GLbyte * pc); +extern HIDDEN void __glXDisp_BindFramebufferEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BindFramebufferEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_PushAttrib(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PushAttrib(GLbyte * pc); +extern HIDDEN int __glXDisp_DestroyPbuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DestroyPbuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexParameteriv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexParameteriv(GLbyte * pc); +extern HIDDEN void __glXDisp_WindowPos3fvMESA(GLbyte * pc); +extern HIDDEN void __glXDispSwap_WindowPos3fvMESA(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib1svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib1svNV(GLbyte * pc); +extern HIDDEN int __glXDisp_QueryExtensionsString(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_QueryExtensionsString(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_RasterPos3fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos3fv(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyTexSubImage3D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyTexSubImage3D(GLbyte * pc); +extern HIDDEN int __glXDisp_GetColorTable(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetColorTable(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Indexiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Indexiv(GLbyte * pc); +extern HIDDEN int __glXDisp_CreateContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreateContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_CopyColorTable(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyColorTable(GLbyte * pc); +extern HIDDEN int __glXDisp_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetHistogramParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetHistogramParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Frustum(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Frustum(GLbyte * pc); +extern HIDDEN int __glXDisp_GetString(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetString(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_CreateGLXPixmap(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreateGLXPixmap(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexEnvf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexEnvf(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_MultiTexCoord3ivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord3ivARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib1dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_DeleteTextures(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DeleteTextures(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_DeleteTexturesEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DeleteTexturesEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ClearAccum(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ClearAccum(GLbyte * pc); +extern HIDDEN int __glXDisp_QueryVersion(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_QueryVersion(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetVertexAttribfvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVertexAttribfvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_SecondaryColor3ivEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3ivEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord4iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord4iv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_SampleMaskSGIS(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SampleMaskSGIS(GLbyte * pc); +extern HIDDEN void __glXDisp_ColorTableParameteriv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ColorTableParameteriv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4ubvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4ubvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyTexImage2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyTexImage2D(GLbyte * pc); +extern HIDDEN void __glXDisp_Lightfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Lightfv(GLbyte * pc); +extern HIDDEN void __glXDisp_ClearDepth(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ClearDepth(GLbyte * pc); +extern HIDDEN void __glXDisp_ColorSubTable(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ColorSubTable(GLbyte * pc); +extern HIDDEN void __glXDisp_Color4fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4fv(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord4ivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord4ivARB(GLbyte * pc); +extern HIDDEN int __glXDisp_CreatePixmap(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreatePixmap(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Lightiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Lightiv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetQueryObjectuivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetQueryObjectuivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetTexParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GenRenderbuffersEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GenRenderbuffersEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib2dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib2dvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs2svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs2svNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Rectdv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Rectdv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4NivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4NivARB(GLbyte * pc); +extern HIDDEN void __glXDisp_Materialiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Materialiv(GLbyte * pc); +extern HIDDEN void __glXDisp_SecondaryColor3fvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_PolygonMode(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PolygonMode(GLbyte * pc); +extern HIDDEN void __glXDisp_CompressedTexSubImage1DARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CompressedTexSubImage1DARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib2dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc); +extern HIDDEN int __glXDisp_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_IsQueryARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsQueryARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexGeni(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexGeni(GLbyte * pc); +extern HIDDEN void __glXDisp_TexGenf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexGenf(GLbyte * pc); +extern HIDDEN void __glXDisp_TexGend(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexGend(GLbyte * pc); +extern HIDDEN int __glXDisp_GetPolygonStipple(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetPolygonStipple(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetVertexAttribfvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVertexAttribfvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib2svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib2svNV(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs1fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4NuivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4NuivARB(GLbyte * pc); +extern HIDDEN int __glXDisp_DestroyWindow(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DestroyWindow(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Color4sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4sv(GLbyte * pc); +extern HIDDEN int __glXDisp_IsProgramNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsProgramNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_PixelZoom(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PixelZoom(GLbyte * pc); +extern HIDDEN void __glXDisp_ColorTableParameterfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ColorTableParameterfv(GLbyte * pc); +extern HIDDEN void __glXDisp_PixelMapuiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PixelMapuiv(GLbyte * pc); +extern HIDDEN void __glXDisp_Color3dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3dv(GLbyte * pc); +extern HIDDEN int __glXDisp_IsTexture(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsTexture(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetMapdv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMapdv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_DestroyGLXPixmap(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DestroyGLXPixmap(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_SamplePatternSGIS(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SamplePatternSGIS(GLbyte * pc); +extern HIDDEN int __glXDisp_PixelStoref(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_PixelStoref(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_PrioritizeTextures(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PrioritizeTextures(GLbyte * pc); +extern HIDDEN int __glXDisp_PixelStorei(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_PixelStorei(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib4usvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4usvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_DestroyGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DestroyGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_EvalCoord2dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalCoord2dv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib3svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib3svARB(GLbyte * pc); +extern HIDDEN void __glXDisp_ColorMaterial(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ColorMaterial(GLbyte * pc); +extern HIDDEN void __glXDisp_CompressedTexSubImage3DARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CompressedTexSubImage3DARB(GLbyte * pc); +extern HIDDEN int __glXDisp_IsFramebufferEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsFramebufferEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetVertexAttribdvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVertexAttribdvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetSeparableFilterEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetSeparableFilterEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_RequestResidentProgramsNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RequestResidentProgramsNV(GLbyte * pc); +extern HIDDEN int __glXDisp_FeedbackBuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_FeedbackBuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_RasterPos2iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos2iv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexImage1D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexImage1D(GLbyte * pc); +extern HIDDEN void __glXDisp_FrontFace(GLbyte * pc); +extern HIDDEN void __glXDispSwap_FrontFace(GLbyte * pc); +extern HIDDEN int __glXDisp_RenderLarge(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_RenderLarge(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib4dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4dvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_PolygonOffset(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PolygonOffset(GLbyte * pc); +extern HIDDEN void __glXDisp_ExecuteProgramNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ExecuteProgramNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Normal3dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Normal3dv(GLbyte * pc); +extern HIDDEN void __glXDisp_Lightf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Lightf(GLbyte * pc); +extern HIDDEN void __glXDisp_MatrixMode(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MatrixMode(GLbyte * pc); +extern HIDDEN void __glXDisp_FramebufferTexture2DEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_FramebufferTexture2DEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_GetPixelMapusv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetPixelMapusv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Lighti(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Lighti(GLbyte * pc); +extern HIDDEN int __glXDisp_GetFramebufferAttachmentParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetFramebufferAttachmentParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_ChangeDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_ChangeDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_MultiTexCoord4dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord4dvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_CreatePbuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreatePbuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetDoublev(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetDoublev(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_MultMatrixd(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultMatrixd(GLbyte * pc); +extern HIDDEN void __glXDisp_MultMatrixf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultMatrixf(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord4fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_TrackMatrixNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TrackMatrixNV(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos4sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos4sv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4NsvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4NsvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib3fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib3fvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_ClearColor(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ClearColor(GLbyte * pc); +extern HIDDEN int __glXDisp_IsDirect(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsDirect(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_DeleteFramebuffersEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DeleteFramebuffersEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_TexEnviv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexEnviv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexSubImage3D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexSubImage3D(GLbyte * pc); +extern HIDDEN int __glXDisp_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Bitmap(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Bitmap(GLbyte * pc); +extern HIDDEN int __glXDisp_GetTexLevelParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexLevelParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GenFramebuffersEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GenFramebuffersEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetProgramParameterdvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramParameterdvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Vertex2sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex2sv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetIntegerv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetIntegerv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetProgramEnvParameterfvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramEnvParameterfvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetTrackMatrixivNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTrackMatrixivNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib3svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib3svNV(GLbyte * pc); +extern HIDDEN int __glXDisp_GetTexEnviv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexEnviv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_VendorPrivateWithReply(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_VendorPrivateWithReply(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_SeparableFilter2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SeparableFilter2D(GLbyte * pc); +extern HIDDEN void __glXDisp_Map1d(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Map1d(GLbyte * pc); +extern HIDDEN void __glXDisp_Map1f(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Map1f(GLbyte * pc); +extern HIDDEN void __glXDisp_CompressedTexImage2DARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CompressedTexImage2DARB(GLbyte * pc); +extern HIDDEN void __glXDisp_TexImage2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexImage2D(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramParameters4fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramParameters4fvNV(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramivNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramivNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_ChangeDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_ChangeDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetMinmaxParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMinmaxParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_PixelTransferf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PixelTransferf(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyTexImage1D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyTexImage1D(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos2dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos2dv(GLbyte * pc); +extern HIDDEN void __glXDisp_Fogiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Fogiv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord1dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord1dv(GLbyte * pc); +extern HIDDEN void __glXDisp_PixelTransferi(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PixelTransferi(GLbyte * pc); +extern HIDDEN void __glXDisp_SecondaryColor3ubvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3ubvEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib3fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib3fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Clear(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Clear(GLbyte * pc); +extern HIDDEN void __glXDisp_ReadBuffer(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ReadBuffer(GLbyte * pc); +extern HIDDEN void __glXDisp_ConvolutionParameteri(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ConvolutionParameteri(GLbyte * pc); +extern HIDDEN void __glXDisp_Ortho(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Ortho(GLbyte * pc); +extern HIDDEN void __glXDisp_ListBase(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ListBase(GLbyte * pc); +extern HIDDEN void __glXDisp_ConvolutionParameterf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ConvolutionParameterf(GLbyte * pc); +extern HIDDEN int __glXDisp_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_CallList(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CallList(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs2fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs2fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Rectiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Rectiv(GLbyte * pc); +extern HIDDEN void __glXDisp_SecondaryColor3dvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3dvEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex2fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex2fv(GLbyte * pc); +extern HIDDEN void __glXDisp_BindRenderbufferEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex3sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex3sv(GLbyte * pc); +extern HIDDEN int __glXDisp_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_DeleteProgramsNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DeleteProgramsNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_EvalMesh1(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalMesh1(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord1dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord1dvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex2iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex2iv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramStringNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramStringNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_LineWidth(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LineWidth(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib2fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_TexGendv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexGendv(GLbyte * pc); +extern HIDDEN void __glXDisp_ResetMinmax(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ResetMinmax(GLbyte * pc); +extern HIDDEN int __glXDisp_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetConvolutionParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetConvolutionParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttribs4dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc); +extern HIDDEN int __glXDisp_GetMaterialfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMaterialfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_UseXFont(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_UseXFont(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ShadeModel(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ShadeModel(GLbyte * pc); +extern HIDDEN void __glXDisp_Materialfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Materialfv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord3fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord3fv(GLbyte * pc); +extern HIDDEN void __glXDisp_FogCoordfvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_FogCoordfvEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord1ivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord1ivARB(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord2ivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord2ivARB(GLbyte * pc); +extern HIDDEN void __glXDisp_DrawArrays(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DrawArrays(GLbyte * pc); +extern HIDDEN void __glXDisp_Color3iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3iv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramLocalParameterdvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramLocalParameterdvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Rotatef(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Rotatef(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BlendFuncSeparateEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramParameters4dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_EvalPoint2(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalPoint2(GLbyte * pc); +extern HIDDEN void __glXDisp_EvalPoint1(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalPoint1(GLbyte * pc); +extern HIDDEN void __glXDisp_PopMatrix(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PopMatrix(GLbyte * pc); +extern HIDDEN int __glXDisp_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetTexGeniv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexGeniv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_MakeCurrent(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_MakeCurrent(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Map2d(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Map2d(GLbyte * pc); +extern HIDDEN void __glXDisp_Map2f(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Map2f(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramStringARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramStringARB(GLbyte * pc); +extern HIDDEN int __glXDisp_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetCompressedTexImageARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetCompressedTexImageARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetHistogram(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetHistogram(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetHistogramEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetHistogramEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_Materialf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Materialf(GLbyte * pc); +extern HIDDEN void __glXDisp_Materiali(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Materiali(GLbyte * pc); +extern HIDDEN void __glXDisp_Indexsv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Indexsv(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord4svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord4svARB(GLbyte * pc); +extern HIDDEN void __glXDisp_LightModelfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LightModelfv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord2dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord2dv(GLbyte * pc); +extern HIDDEN int __glXDisp_GenQueriesARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GenQueriesARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_EvalCoord1dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalCoord1dv(GLbyte * pc); +extern HIDDEN void __glXDisp_Translated(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Translated(GLbyte * pc); +extern HIDDEN void __glXDisp_Translatef(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Translatef(GLbyte * pc); +extern HIDDEN void __glXDisp_StencilMask(GLbyte * pc); +extern HIDDEN void __glXDispSwap_StencilMask(GLbyte * pc); +extern HIDDEN int __glXDisp_CreateWindow(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CreateWindow(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetLightiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetLightiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_IsList(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsList(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_RenderMode(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_RenderMode(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_DrawBuffersARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DrawBuffersARB(GLbyte * pc); +extern HIDDEN void __glXDisp_LoadName(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LoadName(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyTexSubImage1D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyTexSubImage1D(GLbyte * pc); +extern HIDDEN void __glXDisp_CullFace(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CullFace(GLbyte * pc); +extern HIDDEN int __glXDisp_QueryContextInfoEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_QueryContextInfoEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttribs3svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs3svNV(GLbyte * pc); +extern HIDDEN void __glXDisp_StencilFunc(GLbyte * pc); +extern HIDDEN void __glXDispSwap_StencilFunc(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyPixels(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyPixels(GLbyte * pc); +extern HIDDEN void __glXDisp_Rectsv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Rectsv(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyConvolutionFilter2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc); +extern HIDDEN void __glXDisp_TexParameterfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexParameterfv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4uivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4uivARB(GLbyte * pc); +extern HIDDEN void __glXDisp_ClipPlane(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ClipPlane(GLbyte * pc); +extern HIDDEN int __glXDisp_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Indexfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Indexfv(GLbyte * pc); +extern HIDDEN int __glXDisp_QueryContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_QueryContext(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_SecondaryColor3svEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3svEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_IndexMask(GLbyte * pc); +extern HIDDEN void __glXDispSwap_IndexMask(GLbyte * pc); +extern HIDDEN void __glXDisp_BindProgramNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BindProgramNV(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4svARB(GLbyte * pc); +extern HIDDEN int __glXDisp_GetFloatv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetFloatv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexCoord3sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord3sv(GLbyte * pc); +extern HIDDEN void __glXDisp_PopAttrib(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PopAttrib(GLbyte * pc); +extern HIDDEN void __glXDisp_Fogfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Fogfv(GLbyte * pc); +extern HIDDEN void __glXDisp_InitNames(GLbyte * pc); +extern HIDDEN void __glXDispSwap_InitNames(GLbyte * pc); +extern HIDDEN void __glXDisp_Normal3sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Normal3sv(GLbyte * pc); +extern HIDDEN void __glXDisp_Minmax(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Minmax(GLbyte * pc); +extern HIDDEN void __glXDisp_FogCoorddvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_FogCoorddvEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_GetBooleanv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetBooleanv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Hint(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Hint(GLbyte * pc); +extern HIDDEN void __glXDisp_Color4dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4dv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib2svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib2svARB(GLbyte * pc); +extern HIDDEN int __glXDisp_AreProgramsResidentNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_AreProgramsResidentNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_CopyColorSubTable(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyColorSubTable(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4NubvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4NubvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib3dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib3dvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex4iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex4iv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramEnvParameterdvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramEnvParameterdvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexCoord4dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord4dv(GLbyte * pc); +extern HIDDEN void __glXDisp_Begin(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Begin(GLbyte * pc); +extern HIDDEN int __glXDisp_ClientInfo(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_ClientInfo(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Rectfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Rectfv(GLbyte * pc); +extern HIDDEN void __glXDisp_LightModelf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LightModelf(GLbyte * pc); +extern HIDDEN int __glXDisp_GetTexParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetLightfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetLightfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Disable(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Disable(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord2fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_GetRenderbufferParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetRenderbufferParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_SelectBuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_SelectBuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ColorMask(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ColorMask(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos4iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos4iv(GLbyte * pc); +extern HIDDEN void __glXDisp_Enable(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Enable(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs4svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs4svNV(GLbyte * pc); +extern HIDDEN int __glXDisp_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetMinmaxParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMinmaxParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib1fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs1svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs1svNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex3fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex3fv(GLbyte * pc); +extern HIDDEN int __glXDisp_GenProgramsNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GenProgramsNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib4dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4dvNV(GLbyte * pc); + +# undef HIDDEN + +#endif /* !defined( _INDIRECT_DISPATCH_H_ ) */ diff --git a/GL/glx/indirect_dispatch_swap.c b/GL/glx/indirect_dispatch_swap.c new file mode 100644 index 000000000..f137cbe98 --- /dev/null +++ b/GL/glx/indirect_dispatch_swap.c @@ -0,0 +1,6051 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include +#include +#include +#include +#include "indirect_size.h" +#include "indirect_size_get.h" +#include "indirect_dispatch.h" +#include "glxserver.h" +#include "glxbyteorder.h" +#include "indirect_util.h" +#include "singlesize.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" + +#define __GLX_PAD(x) (((x) + 3) & ~3) + +typedef struct { + __GLX_PIXEL_3D_HDR; +} __GLXpixel3DHeader; + +extern GLboolean __glXErrorOccured( void ); +extern void __glXClearErrorOccured( void ); + +static const unsigned dummy_answer[2] = {0, 0}; + +static GLsizei +bswap_CARD32( const void * src ) +{ + union { uint32_t dst; GLsizei ret; } x; + x.dst = bswap_32( *(uint32_t *) src ); + return x.ret; +} + +static GLshort +bswap_CARD16( const void * src ) +{ + union { uint16_t dst; GLshort ret; } x; + x.dst = bswap_16( *(uint16_t *) src ); + return x.ret; +} + +static GLenum +bswap_ENUM( const void * src ) +{ + union { uint32_t dst; GLenum ret; } x; + x.dst = bswap_32( *(uint32_t *) src ); + return x.ret; +} + +static GLdouble +bswap_FLOAT64( const void * src ) +{ + union { uint64_t dst; GLdouble ret; } x; + x.dst = bswap_64( *(uint64_t *) src ); + return x.ret; +} + +static GLfloat +bswap_FLOAT32( const void * src ) +{ + union { uint32_t dst; GLfloat ret; } x; + x.dst = bswap_32( *(uint32_t *) src ); + return x.ret; +} + +static void * +bswap_16_array( uint16_t * src, unsigned count ) +{ + unsigned i; + + for ( i = 0 ; i < count ; i++ ) { + uint16_t temp = bswap_16( src[i] ); + src[i] = temp; + } + + return src; +} + +static void * +bswap_32_array( uint32_t * src, unsigned count ) +{ + unsigned i; + + for ( i = 0 ; i < count ; i++ ) { + uint32_t temp = bswap_32( src[i] ); + src[i] = temp; + } + + return src; +} + +static void * +bswap_64_array( uint64_t * src, unsigned count ) +{ + unsigned i; + + for ( i = 0 ; i < count ; i++ ) { + uint64_t temp = bswap_64( src[i] ); + src[i] = temp; + } + + return src; +} + +int __glXDispSwap_NewList(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_NewList( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ) + ) ); + error = Success; + } + + return error; +} + +int __glXDispSwap_EndList(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_EndList( GET_DISPATCH(), () ); + error = Success; + } + + return error; +} + +void __glXDispSwap_CallList(GLbyte * pc) +{ + CALL_CallList( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_CallLists(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + const GLenum type = (GLenum )bswap_ENUM ( pc + 4 ); + const GLvoid * lists; + + switch(type) { + case GL_BYTE: + case GL_UNSIGNED_BYTE: + case GL_2_BYTES: + case GL_3_BYTES: + case GL_4_BYTES: + lists = (const GLvoid *) (pc + 8); break; + case GL_SHORT: + case GL_UNSIGNED_SHORT: + lists = (const GLvoid *) bswap_16_array( (uint16_t *) (pc + 8), n ); break; + case GL_INT: + case GL_UNSIGNED_INT: + case GL_FLOAT: + lists = (const GLvoid *) bswap_32_array( (uint32_t *) (pc + 8), n ); break; + default: + return; + } + + CALL_CallLists( GET_DISPATCH(), ( + n, + type, + lists + ) ); +} + +int __glXDispSwap_DeleteLists(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_DeleteLists( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (GLsizei )bswap_CARD32 ( pc + 4 ) + ) ); + error = Success; + } + + return error; +} + +int __glXDispSwap_GenLists(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLuint retval; + retval = CALL_GenLists( GET_DISPATCH(), ( + (GLsizei )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_ListBase(GLbyte * pc) +{ + CALL_ListBase( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_Begin(GLbyte * pc) +{ + CALL_Begin( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_Bitmap(GLbyte * pc) +{ + const GLubyte * const bitmap = (const GLubyte *) (pc + 44); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_Bitmap( GET_DISPATCH(), ( + (GLsizei )bswap_CARD32 ( pc + 20 ), + (GLsizei )bswap_CARD32 ( pc + 24 ), + (GLfloat )bswap_FLOAT32( pc + 28 ), + (GLfloat )bswap_FLOAT32( pc + 32 ), + (GLfloat )bswap_FLOAT32( pc + 36 ), + (GLfloat )bswap_FLOAT32( pc + 40 ), + bitmap + ) ); +} + +void __glXDispSwap_Color3bv(GLbyte * pc) +{ + CALL_Color3bv( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_Color3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Color3dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Color3fv(GLbyte * pc) +{ + CALL_Color3fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Color3iv(GLbyte * pc) +{ + CALL_Color3iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Color3sv(GLbyte * pc) +{ + CALL_Color3sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Color3ubv(GLbyte * pc) +{ + CALL_Color3ubv( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_Color3uiv(GLbyte * pc) +{ + CALL_Color3uiv( GET_DISPATCH(), ( + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Color3usv(GLbyte * pc) +{ + CALL_Color3usv( GET_DISPATCH(), ( + (const GLushort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Color4bv(GLbyte * pc) +{ + CALL_Color4bv( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_Color4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_Color4dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Color4fv(GLbyte * pc) +{ + CALL_Color4fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Color4iv(GLbyte * pc) +{ + CALL_Color4iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Color4sv(GLbyte * pc) +{ + CALL_Color4sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Color4ubv(GLbyte * pc) +{ + CALL_Color4ubv( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_Color4uiv(GLbyte * pc) +{ + CALL_Color4uiv( GET_DISPATCH(), ( + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Color4usv(GLbyte * pc) +{ + CALL_Color4usv( GET_DISPATCH(), ( + (const GLushort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_EdgeFlagv(GLbyte * pc) +{ + CALL_EdgeFlagv( GET_DISPATCH(), ( + (const GLboolean *)(pc + 0) + ) ); +} + +void __glXDispSwap_End(GLbyte * pc) +{ + CALL_End( GET_DISPATCH(), () ); +} + +void __glXDispSwap_Indexdv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_Indexdv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_Indexfv(GLbyte * pc) +{ + CALL_Indexfv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_Indexiv(GLbyte * pc) +{ + CALL_Indexiv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_Indexsv(GLbyte * pc) +{ + CALL_Indexsv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_Normal3bv(GLbyte * pc) +{ + CALL_Normal3bv( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_Normal3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Normal3dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Normal3fv(GLbyte * pc) +{ + CALL_Normal3fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Normal3iv(GLbyte * pc) +{ + CALL_Normal3iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Normal3sv(GLbyte * pc) +{ + CALL_Normal3sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_RasterPos2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_RasterPos2dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_RasterPos2fv(GLbyte * pc) +{ + CALL_RasterPos2fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_RasterPos2iv(GLbyte * pc) +{ + CALL_RasterPos2iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_RasterPos2sv(GLbyte * pc) +{ + CALL_RasterPos2sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_RasterPos3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_RasterPos3dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_RasterPos3fv(GLbyte * pc) +{ + CALL_RasterPos3fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_RasterPos3iv(GLbyte * pc) +{ + CALL_RasterPos3iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_RasterPos3sv(GLbyte * pc) +{ + CALL_RasterPos3sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_RasterPos4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_RasterPos4dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_RasterPos4fv(GLbyte * pc) +{ + CALL_RasterPos4fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_RasterPos4iv(GLbyte * pc) +{ + CALL_RasterPos4iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_RasterPos4sv(GLbyte * pc) +{ + CALL_RasterPos4sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Rectdv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_Rectdv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 16), 2 ) + ) ); +} + +void __glXDispSwap_Rectfv(GLbyte * pc) +{ + CALL_Rectfv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 2 ) + ) ); +} + +void __glXDispSwap_Rectiv(GLbyte * pc) +{ + CALL_Rectiv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 8), 2 ) + ) ); +} + +void __glXDispSwap_Rectsv(GLbyte * pc) +{ + CALL_Rectsv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_TexCoord1dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_TexCoord1dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_TexCoord1fv(GLbyte * pc) +{ + CALL_TexCoord1fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_TexCoord1iv(GLbyte * pc) +{ + CALL_TexCoord1iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_TexCoord1sv(GLbyte * pc) +{ + CALL_TexCoord1sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_TexCoord2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_TexCoord2dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_TexCoord2fv(GLbyte * pc) +{ + CALL_TexCoord2fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_TexCoord2iv(GLbyte * pc) +{ + CALL_TexCoord2iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_TexCoord2sv(GLbyte * pc) +{ + CALL_TexCoord2sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_TexCoord3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_TexCoord3dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_TexCoord3fv(GLbyte * pc) +{ + CALL_TexCoord3fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_TexCoord3iv(GLbyte * pc) +{ + CALL_TexCoord3iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_TexCoord3sv(GLbyte * pc) +{ + CALL_TexCoord3sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_TexCoord4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_TexCoord4dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_TexCoord4fv(GLbyte * pc) +{ + CALL_TexCoord4fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_TexCoord4iv(GLbyte * pc) +{ + CALL_TexCoord4iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_TexCoord4sv(GLbyte * pc) +{ + CALL_TexCoord4sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Vertex2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_Vertex2dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_Vertex2fv(GLbyte * pc) +{ + CALL_Vertex2fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_Vertex2iv(GLbyte * pc) +{ + CALL_Vertex2iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_Vertex2sv(GLbyte * pc) +{ + CALL_Vertex2sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_Vertex3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Vertex3dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Vertex3fv(GLbyte * pc) +{ + CALL_Vertex3fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Vertex3iv(GLbyte * pc) +{ + CALL_Vertex3iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Vertex3sv(GLbyte * pc) +{ + CALL_Vertex3sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Vertex4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_Vertex4dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Vertex4fv(GLbyte * pc) +{ + CALL_Vertex4fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Vertex4iv(GLbyte * pc) +{ + CALL_Vertex4iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Vertex4sv(GLbyte * pc) +{ + CALL_Vertex4sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_ClipPlane(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_ClipPlane( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 32 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_ColorMaterial(GLbyte * pc) +{ + CALL_ColorMaterial( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ) + ) ); +} + +void __glXDispSwap_CullFace(GLbyte * pc) +{ + CALL_CullFace( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_Fogf(GLbyte * pc) +{ + CALL_Fogf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); +} + +void __glXDispSwap_Fogfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glFogfv_size(pname) ); + + CALL_Fogfv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDispSwap_Fogi(GLbyte * pc) +{ + CALL_Fogi( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_Fogiv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glFogiv_size(pname) ); + + CALL_Fogiv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDispSwap_FrontFace(GLbyte * pc) +{ + CALL_FrontFace( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_Hint(GLbyte * pc) +{ + CALL_Hint( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ) + ) ); +} + +void __glXDispSwap_Lightf(GLbyte * pc) +{ + CALL_Lightf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_Lightfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glLightfv_size(pname) ); + + CALL_Lightfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_Lighti(GLbyte * pc) +{ + CALL_Lighti( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_Lightiv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glLightiv_size(pname) ); + + CALL_Lightiv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_LightModelf(GLbyte * pc) +{ + CALL_LightModelf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); +} + +void __glXDispSwap_LightModelfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glLightModelfv_size(pname) ); + + CALL_LightModelfv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDispSwap_LightModeli(GLbyte * pc) +{ + CALL_LightModeli( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_LightModeliv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glLightModeliv_size(pname) ); + + CALL_LightModeliv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDispSwap_LineStipple(GLbyte * pc) +{ + CALL_LineStipple( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ), + (GLushort)bswap_CARD16 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_LineWidth(GLbyte * pc) +{ + CALL_LineWidth( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ) + ) ); +} + +void __glXDispSwap_Materialf(GLbyte * pc) +{ + CALL_Materialf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_Materialfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glMaterialfv_size(pname) ); + + CALL_Materialfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_Materiali(GLbyte * pc) +{ + CALL_Materiali( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_Materialiv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glMaterialiv_size(pname) ); + + CALL_Materialiv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_PointSize(GLbyte * pc) +{ + CALL_PointSize( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ) + ) ); +} + +void __glXDispSwap_PolygonMode(GLbyte * pc) +{ + CALL_PolygonMode( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ) + ) ); +} + +void __glXDispSwap_PolygonStipple(GLbyte * pc) +{ + const GLubyte * const mask = (const GLubyte *) (pc + 20); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_PolygonStipple( GET_DISPATCH(), ( + mask + ) ); +} + +void __glXDispSwap_Scissor(GLbyte * pc) +{ + CALL_Scissor( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLsizei )bswap_CARD32 ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ) + ) ); +} + +void __glXDispSwap_ShadeModel(GLbyte * pc) +{ + CALL_ShadeModel( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_TexParameterf(GLbyte * pc) +{ + CALL_TexParameterf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_TexParameterfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexParameterfv_size(pname) ); + + CALL_TexParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_TexParameteri(GLbyte * pc) +{ + CALL_TexParameteri( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_TexParameteriv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexParameteriv_size(pname) ); + + CALL_TexParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_TexImage1D(GLbyte * pc) +{ + const GLvoid * const pixels = (const GLvoid *) (pc + 52); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_TexImage1D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 20 ), + (GLint )bswap_CARD32 ( pc + 24 ), + (GLint )bswap_CARD32 ( pc + 28 ), + (GLsizei )bswap_CARD32 ( pc + 32 ), + (GLint )bswap_CARD32 ( pc + 40 ), + (GLenum )bswap_ENUM ( pc + 44 ), + (GLenum )bswap_ENUM ( pc + 48 ), + pixels + ) ); +} + +void __glXDispSwap_TexImage2D(GLbyte * pc) +{ + const GLvoid * const pixels = (const GLvoid *) (pc + 52); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_TexImage2D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 20 ), + (GLint )bswap_CARD32 ( pc + 24 ), + (GLint )bswap_CARD32 ( pc + 28 ), + (GLsizei )bswap_CARD32 ( pc + 32 ), + (GLsizei )bswap_CARD32 ( pc + 36 ), + (GLint )bswap_CARD32 ( pc + 40 ), + (GLenum )bswap_ENUM ( pc + 44 ), + (GLenum )bswap_ENUM ( pc + 48 ), + pixels + ) ); +} + +void __glXDispSwap_TexEnvf(GLbyte * pc) +{ + CALL_TexEnvf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_TexEnvfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexEnvfv_size(pname) ); + + CALL_TexEnvfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_TexEnvi(GLbyte * pc) +{ + CALL_TexEnvi( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_TexEnviv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexEnviv_size(pname) ); + + CALL_TexEnviv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_TexGend(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_TexGend( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 8 ), + (GLenum )bswap_ENUM ( pc + 12 ), + (GLdouble)bswap_FLOAT64( pc + 0 ) + ) ); +} + +void __glXDispSwap_TexGendv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLdouble * params; + +#ifdef __GLX_ALIGN64 + const GLuint compsize = __glTexGendv_size(pname); + const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + params = (const GLdouble *) bswap_64_array( (uint64_t *) (pc + 8), __glTexGendv_size(pname) ); + + CALL_TexGendv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_TexGenf(GLbyte * pc) +{ + CALL_TexGenf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_TexGenfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexGenfv_size(pname) ); + + CALL_TexGenfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_TexGeni(GLbyte * pc) +{ + CALL_TexGeni( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_TexGeniv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexGeniv_size(pname) ); + + CALL_TexGeniv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_InitNames(GLbyte * pc) +{ + CALL_InitNames( GET_DISPATCH(), () ); +} + +void __glXDispSwap_LoadName(GLbyte * pc) +{ + CALL_LoadName( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_PassThrough(GLbyte * pc) +{ + CALL_PassThrough( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ) + ) ); +} + +void __glXDispSwap_PopName(GLbyte * pc) +{ + CALL_PopName( GET_DISPATCH(), () ); +} + +void __glXDispSwap_PushName(GLbyte * pc) +{ + CALL_PushName( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_DrawBuffer(GLbyte * pc) +{ + CALL_DrawBuffer( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_Clear(GLbyte * pc) +{ + CALL_Clear( GET_DISPATCH(), ( + (GLbitfield)bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_ClearAccum(GLbyte * pc) +{ + CALL_ClearAccum( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ), + (GLfloat )bswap_FLOAT32( pc + 12 ) + ) ); +} + +void __glXDispSwap_ClearIndex(GLbyte * pc) +{ + CALL_ClearIndex( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ) + ) ); +} + +void __glXDispSwap_ClearColor(GLbyte * pc) +{ + CALL_ClearColor( GET_DISPATCH(), ( + (GLclampf)bswap_FLOAT32( pc + 0 ), + (GLclampf)bswap_FLOAT32( pc + 4 ), + (GLclampf)bswap_FLOAT32( pc + 8 ), + (GLclampf)bswap_FLOAT32( pc + 12 ) + ) ); +} + +void __glXDispSwap_ClearStencil(GLbyte * pc) +{ + CALL_ClearStencil( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_ClearDepth(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_ClearDepth( GET_DISPATCH(), ( + (GLclampd)bswap_FLOAT64( pc + 0 ) + ) ); +} + +void __glXDispSwap_StencilMask(GLbyte * pc) +{ + CALL_StencilMask( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_ColorMask(GLbyte * pc) +{ + CALL_ColorMask( GET_DISPATCH(), ( + *(GLboolean *)(pc + 0), + *(GLboolean *)(pc + 1), + *(GLboolean *)(pc + 2), + *(GLboolean *)(pc + 3) + ) ); +} + +void __glXDispSwap_DepthMask(GLbyte * pc) +{ + CALL_DepthMask( GET_DISPATCH(), ( + *(GLboolean *)(pc + 0) + ) ); +} + +void __glXDispSwap_IndexMask(GLbyte * pc) +{ + CALL_IndexMask( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_Accum(GLbyte * pc) +{ + CALL_Accum( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); +} + +void __glXDispSwap_Disable(GLbyte * pc) +{ + CALL_Disable( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_Enable(GLbyte * pc) +{ + CALL_Enable( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_PopAttrib(GLbyte * pc) +{ + CALL_PopAttrib( GET_DISPATCH(), () ); +} + +void __glXDispSwap_PushAttrib(GLbyte * pc) +{ + CALL_PushAttrib( GET_DISPATCH(), ( + (GLbitfield)bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_MapGrid1d(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_MapGrid1d( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 16 ), + (GLdouble)bswap_FLOAT64( pc + 0 ), + (GLdouble)bswap_FLOAT64( pc + 8 ) + ) ); +} + +void __glXDispSwap_MapGrid1f(GLbyte * pc) +{ + CALL_MapGrid1f( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_MapGrid2d(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 40); + pc -= 4; + } +#endif + + CALL_MapGrid2d( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 32 ), + (GLdouble)bswap_FLOAT64( pc + 0 ), + (GLdouble)bswap_FLOAT64( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 36 ), + (GLdouble)bswap_FLOAT64( pc + 16 ), + (GLdouble)bswap_FLOAT64( pc + 24 ) + ) ); +} + +void __glXDispSwap_MapGrid2f(GLbyte * pc) +{ + CALL_MapGrid2f( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLfloat )bswap_FLOAT32( pc + 16 ), + (GLfloat )bswap_FLOAT32( pc + 20 ) + ) ); +} + +void __glXDispSwap_EvalCoord1dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_EvalCoord1dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_EvalCoord1fv(GLbyte * pc) +{ + CALL_EvalCoord1fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_EvalCoord2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_EvalCoord2dv( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_EvalCoord2fv(GLbyte * pc) +{ + CALL_EvalCoord2fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_EvalMesh1(GLbyte * pc) +{ + CALL_EvalMesh1( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_EvalPoint1(GLbyte * pc) +{ + CALL_EvalPoint1( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_EvalMesh2(GLbyte * pc) +{ + CALL_EvalMesh2( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ) + ) ); +} + +void __glXDispSwap_EvalPoint2(GLbyte * pc) +{ + CALL_EvalPoint2( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_AlphaFunc(GLbyte * pc) +{ + CALL_AlphaFunc( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLclampf)bswap_FLOAT32( pc + 4 ) + ) ); +} + +void __glXDispSwap_BlendFunc(GLbyte * pc) +{ + CALL_BlendFunc( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ) + ) ); +} + +void __glXDispSwap_LogicOp(GLbyte * pc) +{ + CALL_LogicOp( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_StencilFunc(GLbyte * pc) +{ + CALL_StencilFunc( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLuint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_StencilOp(GLbyte * pc) +{ + CALL_StencilOp( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ) + ) ); +} + +void __glXDispSwap_DepthFunc(GLbyte * pc) +{ + CALL_DepthFunc( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_PixelZoom(GLbyte * pc) +{ + CALL_PixelZoom( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); +} + +void __glXDispSwap_PixelTransferf(GLbyte * pc) +{ + CALL_PixelTransferf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); +} + +void __glXDispSwap_PixelTransferi(GLbyte * pc) +{ + CALL_PixelTransferi( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +int __glXDispSwap_PixelStoref(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_PixelStoref( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); + error = Success; + } + + return error; +} + +int __glXDispSwap_PixelStorei(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_PixelStorei( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ) + ) ); + error = Success; + } + + return error; +} + +void __glXDispSwap_PixelMapfv(GLbyte * pc) +{ + const GLsizei mapsize = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_PixelMapfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + mapsize, + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_PixelMapuiv(GLbyte * pc) +{ + const GLsizei mapsize = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_PixelMapuiv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + mapsize, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_PixelMapusv(GLbyte * pc) +{ + const GLsizei mapsize = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_PixelMapusv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + mapsize, + (const GLushort *)bswap_16_array( (uint16_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_ReadBuffer(GLbyte * pc) +{ + CALL_ReadBuffer( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_CopyPixels(GLbyte * pc) +{ + CALL_CopyPixels( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLsizei )bswap_CARD32 ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ), + (GLenum )bswap_ENUM ( pc + 16 ) + ) ); +} + +void __glXDispSwap_DrawPixels(GLbyte * pc) +{ + const GLvoid * const pixels = (const GLvoid *) (pc + 36); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_DrawPixels( GET_DISPATCH(), ( + (GLsizei )bswap_CARD32 ( pc + 20 ), + (GLsizei )bswap_CARD32 ( pc + 24 ), + (GLenum )bswap_ENUM ( pc + 28 ), + (GLenum )bswap_ENUM ( pc + 32 ), + pixels + ) ); +} + +int __glXDispSwap_GetBooleanv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + + const GLuint compsize = __glGetBooleanv_size(pname); + GLboolean answerBuffer[200]; + GLboolean * params = __glXGetAnswerBuffer(cl, compsize, answerBuffer, sizeof(answerBuffer), 1); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetBooleanv( GET_DISPATCH(), ( + pname, + params + ) ); + __glXSendReplySwap(cl->client, params, compsize, 1, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetClipPlane(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLdouble equation[4]; + CALL_GetClipPlane( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + equation + ) ); + (void) bswap_64_array( (uint64_t *) equation, 4 ); + __glXSendReplySwap(cl->client, equation, 4, 8, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetDoublev(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + + const GLuint compsize = __glGetDoublev_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetDoublev( GET_DISPATCH(), ( + pname, + params + ) ); + (void) bswap_64_array( (uint64_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetError(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLenum retval; + retval = CALL_GetError( GET_DISPATCH(), () ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetFloatv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + + const GLuint compsize = __glGetFloatv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetFloatv( GET_DISPATCH(), ( + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetIntegerv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + + const GLuint compsize = __glGetIntegerv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetIntegerv( GET_DISPATCH(), ( + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetLightfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetLightfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetLightfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetLightiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetLightiv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetLightiv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMapdv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum target = (GLenum )bswap_ENUM ( pc + 0 ); + const GLenum query = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetMapdv_size(target,query); + GLdouble answerBuffer[200]; + GLdouble * v = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (v == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMapdv( GET_DISPATCH(), ( + target, + query, + v + ) ); + (void) bswap_64_array( (uint64_t *) v, compsize ); + __glXSendReplySwap(cl->client, v, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMapfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum target = (GLenum )bswap_ENUM ( pc + 0 ); + const GLenum query = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetMapfv_size(target,query); + GLfloat answerBuffer[200]; + GLfloat * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (v == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMapfv( GET_DISPATCH(), ( + target, + query, + v + ) ); + (void) bswap_32_array( (uint32_t *) v, compsize ); + __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMapiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum target = (GLenum )bswap_ENUM ( pc + 0 ); + const GLenum query = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetMapiv_size(target,query); + GLint answerBuffer[200]; + GLint * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (v == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMapiv( GET_DISPATCH(), ( + target, + query, + v + ) ); + (void) bswap_32_array( (uint32_t *) v, compsize ); + __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMaterialfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetMaterialfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMaterialfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMaterialiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetMaterialiv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMaterialiv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum map = (GLenum )bswap_ENUM ( pc + 0 ); + + const GLuint compsize = __glGetPixelMapfv_size(map); + GLfloat answerBuffer[200]; + GLfloat * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (values == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetPixelMapfv( GET_DISPATCH(), ( + map, + values + ) ); + (void) bswap_32_array( (uint32_t *) values, compsize ); + __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum map = (GLenum )bswap_ENUM ( pc + 0 ); + + const GLuint compsize = __glGetPixelMapuiv_size(map); + GLuint answerBuffer[200]; + GLuint * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (values == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetPixelMapuiv( GET_DISPATCH(), ( + map, + values + ) ); + (void) bswap_32_array( (uint32_t *) values, compsize ); + __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum map = (GLenum )bswap_ENUM ( pc + 0 ); + + const GLuint compsize = __glGetPixelMapusv_size(map); + GLushort answerBuffer[200]; + GLushort * values = __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer, sizeof(answerBuffer), 2); + + if (values == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetPixelMapusv( GET_DISPATCH(), ( + map, + values + ) ); + (void) bswap_16_array( (uint16_t *) values, compsize ); + __glXSendReplySwap(cl->client, values, compsize, 2, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetTexEnvfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexEnvfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexEnviv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetTexEnviv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexEnviv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexGendv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetTexGendv_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexGendv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_64_array( (uint64_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexGenfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetTexGenfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexGenfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexGeniv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetTexGeniv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexGeniv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetTexParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetTexParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 8 ); + + const GLuint compsize = __glGetTexLevelParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexLevelParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 8 ); + + const GLuint compsize = __glGetTexLevelParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexLevelParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_IsEnabled(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsEnabled( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int __glXDispSwap_IsList(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsList( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_DepthRange(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_DepthRange( GET_DISPATCH(), ( + (GLclampd)bswap_FLOAT64( pc + 0 ), + (GLclampd)bswap_FLOAT64( pc + 8 ) + ) ); +} + +void __glXDispSwap_Frustum(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 48); + pc -= 4; + } +#endif + + CALL_Frustum( GET_DISPATCH(), ( + (GLdouble)bswap_FLOAT64( pc + 0 ), + (GLdouble)bswap_FLOAT64( pc + 8 ), + (GLdouble)bswap_FLOAT64( pc + 16 ), + (GLdouble)bswap_FLOAT64( pc + 24 ), + (GLdouble)bswap_FLOAT64( pc + 32 ), + (GLdouble)bswap_FLOAT64( pc + 40 ) + ) ); +} + +void __glXDispSwap_LoadIdentity(GLbyte * pc) +{ + CALL_LoadIdentity( GET_DISPATCH(), () ); +} + +void __glXDispSwap_LoadMatrixf(GLbyte * pc) +{ + CALL_LoadMatrixf( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 16 ) + ) ); +} + +void __glXDispSwap_LoadMatrixd(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 128); + pc -= 4; + } +#endif + + CALL_LoadMatrixd( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 16 ) + ) ); +} + +void __glXDispSwap_MatrixMode(GLbyte * pc) +{ + CALL_MatrixMode( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_MultMatrixf(GLbyte * pc) +{ + CALL_MultMatrixf( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 16 ) + ) ); +} + +void __glXDispSwap_MultMatrixd(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 128); + pc -= 4; + } +#endif + + CALL_MultMatrixd( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 16 ) + ) ); +} + +void __glXDispSwap_Ortho(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 48); + pc -= 4; + } +#endif + + CALL_Ortho( GET_DISPATCH(), ( + (GLdouble)bswap_FLOAT64( pc + 0 ), + (GLdouble)bswap_FLOAT64( pc + 8 ), + (GLdouble)bswap_FLOAT64( pc + 16 ), + (GLdouble)bswap_FLOAT64( pc + 24 ), + (GLdouble)bswap_FLOAT64( pc + 32 ), + (GLdouble)bswap_FLOAT64( pc + 40 ) + ) ); +} + +void __glXDispSwap_PopMatrix(GLbyte * pc) +{ + CALL_PopMatrix( GET_DISPATCH(), () ); +} + +void __glXDispSwap_PushMatrix(GLbyte * pc) +{ + CALL_PushMatrix( GET_DISPATCH(), () ); +} + +void __glXDispSwap_Rotated(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_Rotated( GET_DISPATCH(), ( + (GLdouble)bswap_FLOAT64( pc + 0 ), + (GLdouble)bswap_FLOAT64( pc + 8 ), + (GLdouble)bswap_FLOAT64( pc + 16 ), + (GLdouble)bswap_FLOAT64( pc + 24 ) + ) ); +} + +void __glXDispSwap_Rotatef(GLbyte * pc) +{ + CALL_Rotatef( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ), + (GLfloat )bswap_FLOAT32( pc + 12 ) + ) ); +} + +void __glXDispSwap_Scaled(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Scaled( GET_DISPATCH(), ( + (GLdouble)bswap_FLOAT64( pc + 0 ), + (GLdouble)bswap_FLOAT64( pc + 8 ), + (GLdouble)bswap_FLOAT64( pc + 16 ) + ) ); +} + +void __glXDispSwap_Scalef(GLbyte * pc) +{ + CALL_Scalef( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_Translated(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Translated( GET_DISPATCH(), ( + (GLdouble)bswap_FLOAT64( pc + 0 ), + (GLdouble)bswap_FLOAT64( pc + 8 ), + (GLdouble)bswap_FLOAT64( pc + 16 ) + ) ); +} + +void __glXDispSwap_Translatef(GLbyte * pc) +{ + CALL_Translatef( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_Viewport(GLbyte * pc) +{ + CALL_Viewport( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLsizei )bswap_CARD32 ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ) + ) ); +} + +void __glXDispSwap_BindTexture(GLbyte * pc) +{ + CALL_BindTexture( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_Indexubv(GLbyte * pc) +{ + CALL_Indexubv( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_PolygonOffset(GLbyte * pc) +{ + CALL_PolygonOffset( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); +} + +int __glXDispSwap_AreTexturesResident(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLboolean retval; + GLboolean answerBuffer[200]; + GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); + retval = CALL_AreTexturesResident( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ), + residences + ) ); + __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval); + error = Success; + } + + return error; +} + +int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLboolean retval; + GLboolean answerBuffer[200]; + GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); + retval = CALL_AreTexturesResident( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ), + residences + ) ); + __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_CopyTexImage1D(GLbyte * pc) +{ + CALL_CopyTexImage1D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ), + (GLsizei )bswap_CARD32 ( pc + 20 ), + (GLint )bswap_CARD32 ( pc + 24 ) + ) ); +} + +void __glXDispSwap_CopyTexImage2D(GLbyte * pc) +{ + CALL_CopyTexImage2D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ), + (GLsizei )bswap_CARD32 ( pc + 20 ), + (GLsizei )bswap_CARD32 ( pc + 24 ), + (GLint )bswap_CARD32 ( pc + 28 ) + ) ); +} + +void __glXDispSwap_CopyTexSubImage1D(GLbyte * pc) +{ + CALL_CopyTexSubImage1D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ), + (GLsizei )bswap_CARD32 ( pc + 20 ) + ) ); +} + +void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc) +{ + CALL_CopyTexSubImage2D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ), + (GLint )bswap_CARD32 ( pc + 20 ), + (GLsizei )bswap_CARD32 ( pc + 24 ), + (GLsizei )bswap_CARD32 ( pc + 28 ) + ) ); +} + +int __glXDispSwap_DeleteTextures(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DeleteTextures( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); + error = Success; + } + + return error; +} + +int __glXDispSwap_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DeleteTextures( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); + error = Success; + } + + return error; +} + +int __glXDispSwap_GenTextures(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLuint answerBuffer[200]; + GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenTextures( GET_DISPATCH(), ( + n, + textures + ) ); + (void) bswap_32_array( (uint32_t *) textures, n ); + __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLuint answerBuffer[200]; + GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenTextures( GET_DISPATCH(), ( + n, + textures + ) ); + (void) bswap_32_array( (uint32_t *) textures, n ); + __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_IsTexture(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsTexture( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int __glXDispSwap_IsTextureEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsTexture( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_PrioritizeTextures(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_PrioritizeTextures( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ), + (const GLclampf *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); +} + +void __glXDispSwap_TexSubImage1D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_TexSubImage1D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 20 ), + (GLint )bswap_CARD32 ( pc + 24 ), + (GLint )bswap_CARD32 ( pc + 28 ), + (GLsizei )bswap_CARD32 ( pc + 36 ), + (GLenum )bswap_ENUM ( pc + 44 ), + (GLenum )bswap_ENUM ( pc + 48 ), + pixels + ) ); +} + +void __glXDispSwap_TexSubImage2D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_TexSubImage2D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 20 ), + (GLint )bswap_CARD32 ( pc + 24 ), + (GLint )bswap_CARD32 ( pc + 28 ), + (GLint )bswap_CARD32 ( pc + 32 ), + (GLsizei )bswap_CARD32 ( pc + 36 ), + (GLsizei )bswap_CARD32 ( pc + 40 ), + (GLenum )bswap_ENUM ( pc + 44 ), + (GLenum )bswap_ENUM ( pc + 48 ), + pixels + ) ); +} + +void __glXDispSwap_BlendColor(GLbyte * pc) +{ + CALL_BlendColor( GET_DISPATCH(), ( + (GLclampf)bswap_FLOAT32( pc + 0 ), + (GLclampf)bswap_FLOAT32( pc + 4 ), + (GLclampf)bswap_FLOAT32( pc + 8 ), + (GLclampf)bswap_FLOAT32( pc + 12 ) + ) ); +} + +void __glXDispSwap_BlendEquation(GLbyte * pc) +{ + CALL_BlendEquation( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_ColorTable(GLbyte * pc) +{ + const GLvoid * const table = (const GLvoid *) (pc + 40); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_ColorTable( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 20 ), + (GLenum )bswap_ENUM ( pc + 24 ), + (GLsizei )bswap_CARD32 ( pc + 28 ), + (GLenum )bswap_ENUM ( pc + 32 ), + (GLenum )bswap_ENUM ( pc + 36 ), + table + ) ); +} + +void __glXDispSwap_ColorTableParameterfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glColorTableParameterfv_size(pname) ); + + CALL_ColorTableParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_ColorTableParameteriv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glColorTableParameteriv_size(pname) ); + + CALL_ColorTableParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_CopyColorTable(GLbyte * pc) +{ + CALL_CopyColorTable( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLsizei )bswap_CARD32 ( pc + 16 ) + ) ); +} + +int __glXDispSwap_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetColorTableParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetColorTableParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetColorTableParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetColorTableParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void __glXDispSwap_ColorSubTable(GLbyte * pc) +{ + const GLvoid * const data = (const GLvoid *) (pc + 40); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_ColorSubTable( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 20 ), + (GLsizei )bswap_CARD32 ( pc + 24 ), + (GLsizei )bswap_CARD32 ( pc + 28 ), + (GLenum )bswap_ENUM ( pc + 32 ), + (GLenum )bswap_ENUM ( pc + 36 ), + data + ) ); +} + +void __glXDispSwap_CopyColorSubTable(GLbyte * pc) +{ + CALL_CopyColorSubTable( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLsizei )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLsizei )bswap_CARD32 ( pc + 16 ) + ) ); +} + +void __glXDispSwap_ConvolutionFilter1D(GLbyte * pc) +{ + const GLvoid * const image = (const GLvoid *) (pc + 44); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_ConvolutionFilter1D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 20 ), + (GLenum )bswap_ENUM ( pc + 24 ), + (GLsizei )bswap_CARD32 ( pc + 28 ), + (GLenum )bswap_ENUM ( pc + 36 ), + (GLenum )bswap_ENUM ( pc + 40 ), + image + ) ); +} + +void __glXDispSwap_ConvolutionFilter2D(GLbyte * pc) +{ + const GLvoid * const image = (const GLvoid *) (pc + 44); + __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_ConvolutionFilter2D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 20 ), + (GLenum )bswap_ENUM ( pc + 24 ), + (GLsizei )bswap_CARD32 ( pc + 28 ), + (GLsizei )bswap_CARD32 ( pc + 32 ), + (GLenum )bswap_ENUM ( pc + 36 ), + (GLenum )bswap_ENUM ( pc + 40 ), + image + ) ); +} + +void __glXDispSwap_ConvolutionParameterf(GLbyte * pc) +{ + CALL_ConvolutionParameterf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_ConvolutionParameterfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glConvolutionParameterfv_size(pname) ); + + CALL_ConvolutionParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_ConvolutionParameteri(GLbyte * pc) +{ + CALL_ConvolutionParameteri( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_ConvolutionParameteriv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glConvolutionParameteriv_size(pname) ); + + CALL_ConvolutionParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc) +{ + CALL_CopyConvolutionFilter1D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLsizei )bswap_CARD32 ( pc + 16 ) + ) ); +} + +void __glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc) +{ + CALL_CopyConvolutionFilter2D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLsizei )bswap_CARD32 ( pc + 16 ), + (GLsizei )bswap_CARD32 ( pc + 20 ) + ) ); +} + +int __glXDispSwap_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetConvolutionParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetConvolutionParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetConvolutionParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetConvolutionParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetHistogramParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetHistogramParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetHistogramParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetHistogramParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetMinmaxParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetMinmaxParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetMinmaxParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetMinmaxParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void __glXDispSwap_Histogram(GLbyte * pc) +{ + CALL_Histogram( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLsizei )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + *(GLboolean *)(pc + 12) + ) ); +} + +void __glXDispSwap_Minmax(GLbyte * pc) +{ + CALL_Minmax( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + *(GLboolean *)(pc + 8) + ) ); +} + +void __glXDispSwap_ResetHistogram(GLbyte * pc) +{ + CALL_ResetHistogram( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_ResetMinmax(GLbyte * pc) +{ + CALL_ResetMinmax( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_TexImage3D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 76); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 80); + __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) bswap_CARD32( & hdr->imageHeight )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) bswap_CARD32( & hdr->skipImages )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_TexImage3D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 36 ), + (GLint )bswap_CARD32 ( pc + 40 ), + (GLint )bswap_CARD32 ( pc + 44 ), + (GLsizei )bswap_CARD32 ( pc + 48 ), + (GLsizei )bswap_CARD32 ( pc + 52 ), + (GLsizei )bswap_CARD32 ( pc + 56 ), + (GLint )bswap_CARD32 ( pc + 64 ), + (GLenum )bswap_ENUM ( pc + 68 ), + (GLenum )bswap_ENUM ( pc + 72 ), + pixels + ) ); +} + +void __glXDispSwap_TexSubImage3D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 84); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 88); + __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) bswap_CARD32( & hdr->imageHeight )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) bswap_CARD32( & hdr->skipImages )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); + + CALL_TexSubImage3D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 36 ), + (GLint )bswap_CARD32 ( pc + 40 ), + (GLint )bswap_CARD32 ( pc + 44 ), + (GLint )bswap_CARD32 ( pc + 48 ), + (GLint )bswap_CARD32 ( pc + 52 ), + (GLsizei )bswap_CARD32 ( pc + 60 ), + (GLsizei )bswap_CARD32 ( pc + 64 ), + (GLsizei )bswap_CARD32 ( pc + 68 ), + (GLenum )bswap_ENUM ( pc + 76 ), + (GLenum )bswap_ENUM ( pc + 80 ), + pixels + ) ); +} + +void __glXDispSwap_CopyTexSubImage3D(GLbyte * pc) +{ + CALL_CopyTexSubImage3D( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ), + (GLint )bswap_CARD32 ( pc + 20 ), + (GLint )bswap_CARD32 ( pc + 24 ), + (GLsizei )bswap_CARD32 ( pc + 28 ), + (GLsizei )bswap_CARD32 ( pc + 32 ) + ) ); +} + +void __glXDispSwap_ActiveTextureARB(GLbyte * pc) +{ + CALL_ActiveTextureARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord1dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 12); + pc -= 4; + } +#endif + + CALL_MultiTexCoord1dvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 8 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord1fvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord1ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord1ivARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord1svARB(GLbyte * pc) +{ + CALL_MultiTexCoord1svARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord2dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_MultiTexCoord2dvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 16 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord2fvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord2ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord2ivARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord2svARB(GLbyte * pc) +{ + CALL_MultiTexCoord2svARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord3dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 28); + pc -= 4; + } +#endif + + CALL_MultiTexCoord3dvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 24 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord3fvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord3ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord3ivARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord3svARB(GLbyte * pc) +{ + CALL_MultiTexCoord3svARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_MultiTexCoord4dvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 32 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord4fvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord4ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord4ivARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord4svARB(GLbyte * pc) +{ + CALL_MultiTexCoord4svARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_SampleCoverageARB(GLbyte * pc) +{ + CALL_SampleCoverageARB( GET_DISPATCH(), ( + (GLclampf)bswap_FLOAT32( pc + 0 ), + *(GLboolean *)(pc + 4) + ) ); +} + +void __glXDispSwap_CompressedTexImage1DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 20 ); + + CALL_CompressedTexImage1DARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ), + imageSize, + (const GLvoid *)(pc + 24) + ) ); +} + +void __glXDispSwap_CompressedTexImage2DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 24 ); + + CALL_CompressedTexImage2DARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ), + (GLsizei )bswap_CARD32 ( pc + 16 ), + (GLint )bswap_CARD32 ( pc + 20 ), + imageSize, + (const GLvoid *)(pc + 28) + ) ); +} + +void __glXDispSwap_CompressedTexImage3DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 28 ); + + CALL_CompressedTexImage3DARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ), + (GLsizei )bswap_CARD32 ( pc + 16 ), + (GLsizei )bswap_CARD32 ( pc + 20 ), + (GLint )bswap_CARD32 ( pc + 24 ), + imageSize, + (const GLvoid *)(pc + 32) + ) ); +} + +void __glXDispSwap_CompressedTexSubImage1DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 20 ); + + CALL_CompressedTexSubImage1DARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ), + (GLenum )bswap_ENUM ( pc + 16 ), + imageSize, + (const GLvoid *)(pc + 24) + ) ); +} + +void __glXDispSwap_CompressedTexSubImage2DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 28 ); + + CALL_CompressedTexSubImage2DARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLsizei )bswap_CARD32 ( pc + 16 ), + (GLsizei )bswap_CARD32 ( pc + 20 ), + (GLenum )bswap_ENUM ( pc + 24 ), + imageSize, + (const GLvoid *)(pc + 32) + ) ); +} + +void __glXDispSwap_CompressedTexSubImage3DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 36 ); + + CALL_CompressedTexSubImage3DARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ), + (GLsizei )bswap_CARD32 ( pc + 20 ), + (GLsizei )bswap_CARD32 ( pc + 24 ), + (GLsizei )bswap_CARD32 ( pc + 28 ), + (GLenum )bswap_ENUM ( pc + 32 ), + imageSize, + (const GLvoid *)(pc + 40) + ) ); +} + +int __glXDispSwap_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLdouble params[4]; + CALL_GetProgramEnvParameterdvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + params + ) ); + (void) bswap_64_array( (uint64_t *) params, 4 ); + __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLfloat params[4]; + CALL_GetProgramEnvParameterfvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + params + ) ); + (void) bswap_32_array( (uint32_t *) params, 4 ); + __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLdouble params[4]; + CALL_GetProgramLocalParameterdvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + params + ) ); + (void) bswap_64_array( (uint64_t *) params, 4 ); + __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLfloat params[4]; + CALL_GetProgramLocalParameterfvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + params + ) ); + (void) bswap_32_array( (uint32_t *) params, 4 ); + __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetProgramivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetProgramivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetProgramivARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetVertexAttribdvARB_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribdvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_64_array( (uint64_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetVertexAttribfvARB_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribfvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetVertexAttribivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetVertexAttribivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 40); + pc -= 4; + } +#endif + + CALL_ProgramEnvParameter4dvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 4 ) + ) ); +} + +void __glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc) +{ + CALL_ProgramEnvParameter4fvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) + ) ); +} + +void __glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 40); + pc -= 4; + } +#endif + + CALL_ProgramLocalParameter4dvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 4 ) + ) ); +} + +void __glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc) +{ + CALL_ProgramLocalParameter4fvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) + ) ); +} + +void __glXDispSwap_ProgramStringARB(GLbyte * pc) +{ + const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 8 ); + + CALL_ProgramStringARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + len, + (const GLvoid *)(pc + 12) + ) ); +} + +void __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 12); + pc -= 4; + } +#endif + + CALL_VertexAttrib1dvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc) +{ + CALL_VertexAttrib1fvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_VertexAttrib1svARB(GLbyte * pc) +{ + CALL_VertexAttrib1svARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_VertexAttrib2dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_VertexAttrib2dvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc) +{ + CALL_VertexAttrib2fvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_VertexAttrib2svARB(GLbyte * pc) +{ + CALL_VertexAttrib2svARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_VertexAttrib3dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 28); + pc -= 4; + } +#endif + + CALL_VertexAttrib3dvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_VertexAttrib3fvARB(GLbyte * pc) +{ + CALL_VertexAttrib3fvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_VertexAttrib3svARB(GLbyte * pc) +{ + CALL_VertexAttrib3svARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4NbvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NbvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLbyte *)(pc + 4) + ) ); +} + +void __glXDispSwap_VertexAttrib4NivARB(GLbyte * pc) +{ + CALL_VertexAttrib4NivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4NsvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NsvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4NubvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NubvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLubyte *)(pc + 4) + ) ); +} + +void __glXDispSwap_VertexAttrib4NuivARB(GLbyte * pc) +{ + CALL_VertexAttrib4NuivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4NusvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NusvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLushort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4bvARB(GLbyte * pc) +{ + CALL_VertexAttrib4bvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLbyte *)(pc + 4) + ) ); +} + +void __glXDispSwap_VertexAttrib4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_VertexAttrib4dvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4fvARB(GLbyte * pc) +{ + CALL_VertexAttrib4fvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4ivARB(GLbyte * pc) +{ + CALL_VertexAttrib4ivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4svARB(GLbyte * pc) +{ + CALL_VertexAttrib4svARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4ubvARB(GLbyte * pc) +{ + CALL_VertexAttrib4ubvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLubyte *)(pc + 4) + ) ); +} + +void __glXDispSwap_VertexAttrib4uivARB(GLbyte * pc) +{ + CALL_VertexAttrib4uivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4usvARB(GLbyte * pc) +{ + CALL_VertexAttrib4usvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLushort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_BeginQueryARB(GLbyte * pc) +{ + CALL_BeginQueryARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +int __glXDispSwap_DeleteQueriesARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DeleteQueriesARB( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); + error = Success; + } + + return error; +} + +void __glXDispSwap_EndQueryARB(GLbyte * pc) +{ + CALL_EndQueryARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +int __glXDispSwap_GenQueriesARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLuint answerBuffer[200]; + GLuint * ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenQueriesARB( GET_DISPATCH(), ( + n, + ids + ) ); + (void) bswap_32_array( (uint32_t *) ids, n ); + __glXSendReplySwap(cl->client, ids, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetQueryObjectivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetQueryObjectivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryObjectivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetQueryObjectuivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetQueryObjectuivARB_size(pname); + GLuint answerBuffer[200]; + GLuint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryObjectuivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetQueryivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetQueryivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryivARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_IsQueryARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsQueryARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_DrawBuffersARB(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DrawBuffersARB( GET_DISPATCH(), ( + n, + (const GLenum *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); +} + +void __glXDispSwap_SampleMaskSGIS(GLbyte * pc) +{ + CALL_SampleMaskSGIS( GET_DISPATCH(), ( + (GLclampf)bswap_FLOAT32( pc + 0 ), + *(GLboolean *)(pc + 4) + ) ); +} + +void __glXDispSwap_SamplePatternSGIS(GLbyte * pc) +{ + CALL_SamplePatternSGIS( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_PointParameterfEXT(GLbyte * pc) +{ + CALL_PointParameterfEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); +} + +void __glXDispSwap_PointParameterfvEXT(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glPointParameterfvEXT_size(pname) ); + + CALL_PointParameterfvEXT( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDispSwap_SecondaryColor3bvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3bvEXT( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_SecondaryColor3dvEXT(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_SecondaryColor3dvEXT( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3fvEXT( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_SecondaryColor3ivEXT(GLbyte * pc) +{ + CALL_SecondaryColor3ivEXT( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_SecondaryColor3svEXT(GLbyte * pc) +{ + CALL_SecondaryColor3svEXT( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_SecondaryColor3ubvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3ubvEXT( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc) +{ + CALL_SecondaryColor3uivEXT( GET_DISPATCH(), ( + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_SecondaryColor3usvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3usvEXT( GET_DISPATCH(), ( + (const GLushort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_FogCoorddvEXT(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_FogCoorddvEXT( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_FogCoordfvEXT(GLbyte * pc) +{ + CALL_FogCoordfvEXT( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_BlendFuncSeparateEXT(GLbyte * pc) +{ + CALL_BlendFuncSeparateEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLenum )bswap_ENUM ( pc + 12 ) + ) ); +} + +void __glXDispSwap_WindowPos3fvMESA(GLbyte * pc) +{ + CALL_WindowPos3fvMESA( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +int __glXDispSwap_AreProgramsResidentNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLboolean retval; + GLboolean answerBuffer[200]; + GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); + retval = CALL_AreProgramsResidentNV( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ), + residences + ) ); + __glXSendReplySwap(cl->client, residences, n, 1, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_BindProgramNV(GLbyte * pc) +{ + CALL_BindProgramNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +int __glXDispSwap_DeleteProgramsNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DeleteProgramsNV( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); + error = Success; + } + + return error; +} + +void __glXDispSwap_ExecuteProgramNV(GLbyte * pc) +{ + CALL_ExecuteProgramNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) + ) ); +} + +int __glXDispSwap_GenProgramsNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLuint answerBuffer[200]; + GLuint * programs = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenProgramsNV( GET_DISPATCH(), ( + n, + programs + ) ); + (void) bswap_32_array( (uint32_t *) programs, n ); + __glXSendReplySwap(cl->client, programs, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetProgramParameterdvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLdouble params[4]; + CALL_GetProgramParameterdvNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + params + ) ); + (void) bswap_64_array( (uint64_t *) params, 4 ); + __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetProgramParameterfvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLfloat params[4]; + CALL_GetProgramParameterfvNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + params + ) ); + (void) bswap_32_array( (uint32_t *) params, 4 ); + __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetProgramivNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetProgramivNV_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetProgramivNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTrackMatrixivNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLint params[1]; + CALL_GetTrackMatrixivNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + params + ) ); + (void) bswap_32_array( (uint32_t *) params, 1 ); + __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetVertexAttribdvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetVertexAttribdvNV_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribdvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_64_array( (uint64_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetVertexAttribfvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetVertexAttribfvNV_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribfvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetVertexAttribivNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetVertexAttribivNV_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribivNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_IsProgramNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsProgramNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_LoadProgramNV(GLbyte * pc) +{ + const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 8 ); + + CALL_LoadProgramNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + len, + (const GLubyte *)(pc + 12) + ) ); +} + +void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc) +{ + const GLuint num = (GLuint )bswap_CARD32 ( pc + 8 ); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 16 + __GLX_PAD((num * 32)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_ProgramParameters4dvNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + num, + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 12), 0 ) + ) ); +} + +void __glXDispSwap_ProgramParameters4fvNV(GLbyte * pc) +{ + const GLuint num = (GLuint )bswap_CARD32 ( pc + 8 ); + + CALL_ProgramParameters4fvNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + num, + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 12), 0 ) + ) ); +} + +void __glXDispSwap_RequestResidentProgramsNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_RequestResidentProgramsNV( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); +} + +void __glXDispSwap_TrackMatrixNV(GLbyte * pc) +{ + CALL_TrackMatrixNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLenum )bswap_ENUM ( pc + 12 ) + ) ); +} + +void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 12); + pc -= 4; + } +#endif + + CALL_VertexAttrib1dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc) +{ + CALL_VertexAttrib1fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_VertexAttrib1svNV(GLbyte * pc) +{ + CALL_VertexAttrib1svNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_VertexAttrib2dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_VertexAttrib2fvNV(GLbyte * pc) +{ + CALL_VertexAttrib2fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_VertexAttrib2svNV(GLbyte * pc) +{ + CALL_VertexAttrib2svNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_VertexAttrib3dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 28); + pc -= 4; + } +#endif + + CALL_VertexAttrib3dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_VertexAttrib3fvNV(GLbyte * pc) +{ + CALL_VertexAttrib3fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_VertexAttrib3svNV(GLbyte * pc) +{ + CALL_VertexAttrib3svNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_VertexAttrib4dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4fvNV(GLbyte * pc) +{ + CALL_VertexAttrib4fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4svNV(GLbyte * pc) +{ + CALL_VertexAttrib4svNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc) +{ + CALL_VertexAttrib4ubvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLubyte *)(pc + 4) + ) ); +} + +void __glXDispSwap_VertexAttribs1dvNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_VertexAttribs1dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_VertexAttribs1fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs1svNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_VertexAttribs1svNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs2dvNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_VertexAttribs2dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs2fvNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_VertexAttribs2fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs2svNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_VertexAttribs2svNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs3dvNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_VertexAttribs3dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs3fvNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_VertexAttribs3fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs3svNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_VertexAttribs3svNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_VertexAttribs4dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs4fvNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_VertexAttribs4fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs4svNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_VertexAttribs4svNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_VertexAttribs4ubvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLubyte *)(pc + 8) + ) ); +} + +void __glXDispSwap_PointParameteriNV(GLbyte * pc) +{ + CALL_PointParameteriNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_PointParameterivNV(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glPointParameterivNV_size(pname) ); + + CALL_PointParameterivNV( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc) +{ + CALL_ActiveStencilFaceEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +int __glXDispSwap_GetProgramNamedParameterdvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 4 ); + + GLdouble params[4]; + CALL_GetProgramNamedParameterdvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + len, + (const GLubyte *)(pc + 8), + params + ) ); + (void) bswap_64_array( (uint64_t *) params, 4 ); + __glXSendReplySwap(cl->client, params, 4, 8, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetProgramNamedParameterfvNV(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 4 ); + + GLfloat params[4]; + CALL_GetProgramNamedParameterfvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + len, + (const GLubyte *)(pc + 8), + params + ) ); + (void) bswap_32_array( (uint32_t *) params, 4 ); + __glXSendReplySwap(cl->client, params, 4, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +void __glXDispSwap_ProgramNamedParameter4dvNV(GLbyte * pc) +{ + const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 36 ); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 44 + __GLX_PAD(len) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; + } +#endif + + CALL_ProgramNamedParameter4dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 32 ), + len, + (const GLubyte *)(pc + 40), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_ProgramNamedParameter4fvNV(GLbyte * pc) +{ + const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 4 ); + + CALL_ProgramNamedParameter4fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + len, + (const GLubyte *)(pc + 24), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) + ) ); +} + +void __glXDispSwap_BlendEquationSeparateEXT(GLbyte * pc) +{ + CALL_BlendEquationSeparateEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ) + ) ); +} + +void __glXDispSwap_BindFramebufferEXT(GLbyte * pc) +{ + CALL_BindFramebufferEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc) +{ + CALL_BindRenderbufferEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +int __glXDispSwap_CheckFramebufferStatusEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLenum retval; + retval = CALL_CheckFramebufferStatusEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_DeleteFramebuffersEXT(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DeleteFramebuffersEXT( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); +} + +void __glXDispSwap_DeleteRenderbuffersEXT(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DeleteRenderbuffersEXT( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); +} + +void __glXDispSwap_FramebufferRenderbufferEXT(GLbyte * pc) +{ + CALL_FramebufferRenderbufferEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLuint )bswap_CARD32 ( pc + 12 ) + ) ); +} + +void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture1DEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLuint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ) + ) ); +} + +void __glXDispSwap_FramebufferTexture2DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture2DEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLuint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ) + ) ); +} + +void __glXDispSwap_FramebufferTexture3DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture3DEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLuint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ), + (GLint )bswap_CARD32 ( pc + 20 ) + ) ); +} + +int __glXDispSwap_GenFramebuffersEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLuint answerBuffer[200]; + GLuint * framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenFramebuffersEXT( GET_DISPATCH(), ( + n, + framebuffers + ) ); + (void) bswap_32_array( (uint32_t *) framebuffers, n ); + __glXSendReplySwap(cl->client, framebuffers, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GenRenderbuffersEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLuint answerBuffer[200]; + GLuint * renderbuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenRenderbuffersEXT( GET_DISPATCH(), ( + n, + renderbuffers + ) ); + (void) bswap_32_array( (uint32_t *) renderbuffers, n ); + __glXSendReplySwap(cl->client, renderbuffers, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +void __glXDispSwap_GenerateMipmapEXT(GLbyte * pc) +{ + CALL_GenerateMipmapEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +int __glXDispSwap_GetFramebufferAttachmentParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLint params[1]; + CALL_GetFramebufferAttachmentParameterivEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + params + ) ); + (void) bswap_32_array( (uint32_t *) params, 1 ); + __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetRenderbufferParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLint params[1]; + CALL_GetRenderbufferParameterivEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + params + ) ); + (void) bswap_32_array( (uint32_t *) params, 1 ); + __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_IsFramebufferEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsFramebufferEXT( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int __glXDispSwap_IsRenderbufferEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsRenderbufferEXT( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_RenderbufferStorageEXT(GLbyte * pc) +{ + CALL_RenderbufferStorageEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLsizei )bswap_CARD32 ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ) + ) ); +} + diff --git a/GL/glx/indirect_reqsize.c b/GL/glx/indirect_reqsize.c new file mode 100644 index 000000000..954eecd97 --- /dev/null +++ b/GL/glx/indirect_reqsize.c @@ -0,0 +1,832 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + + +#include +#include "glxserver.h" +#include "glxbyteorder.h" +#include "indirect_size.h" +#include "indirect_reqsize.h" + +#define __GLX_PAD(x) (((x) + 3) & ~3) + +#if defined(__CYGWIN__) || defined(__MINGW32__) +# undef HAVE_ALIAS +#endif +#ifdef HAVE_ALIAS +# define ALIAS2(from,to) \ + GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \ + __attribute__ ((alias( # to ))); +# define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize ) +#else +# define ALIAS(from,to) \ + GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \ + { return __glX ## to ## ReqSize( pc, swap ); } +#endif + + +int +__glXCallListsReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 0); + GLenum type = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + n = bswap_32(n); + type = bswap_32(type); + } + + compsize = __glCallLists_size(type); + return __GLX_PAD((compsize * n)); +} + +int +__glXBitmapReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLsizei width = *(GLsizei *) (pc + 20); + GLsizei height = *(GLsizei *) (pc + 24); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + width = bswap_32(width); + height = bswap_32(height); + } + + return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXFogfvReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 0); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glFogfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXLightfvReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glLightfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXLightModelfvReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 0); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glLightModelfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXMaterialfvReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glMaterialfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXPolygonStippleReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + } + + return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, 32, 32, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexParameterfvReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glTexParameterfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXTexImage1DReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei width = *(GLsizei *) (pc + 32); + GLenum format = *(GLenum *) (pc + 44); + GLenum type = *(GLenum *) (pc + 48); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexImage2DReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei width = *(GLsizei *) (pc + 32); + GLsizei height = *(GLsizei *) (pc + 36); + GLenum format = *(GLenum *) (pc + 44); + GLenum type = *(GLenum *) (pc + 48); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + height = bswap_32(height); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexEnvfvReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glTexEnvfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXTexGendvReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glTexGendv_size(pname); + return __GLX_PAD((compsize * 8)); +} + +int +__glXTexGenfvReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glTexGenfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXPixelMapfvReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei mapsize = *(GLsizei *) (pc + 4); + + if (swap) { + mapsize = bswap_32(mapsize); + } + + return __GLX_PAD((mapsize * 4)); +} + +int +__glXPixelMapusvReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei mapsize = *(GLsizei *) (pc + 4); + + if (swap) { + mapsize = bswap_32(mapsize); + } + + return __GLX_PAD((mapsize * 2)); +} + +int +__glXDrawPixelsReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLsizei width = *(GLsizei *) (pc + 20); + GLsizei height = *(GLsizei *) (pc + 24); + GLenum format = *(GLenum *) (pc + 28); + GLenum type = *(GLenum *) (pc + 32); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + width = bswap_32(width); + height = bswap_32(height); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, 0, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 0); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 4) + (n * 4)); +} + +int +__glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei width = *(GLsizei *) (pc + 36); + GLenum format = *(GLenum *) (pc + 44); + GLenum type = *(GLenum *) (pc + 48); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei width = *(GLsizei *) (pc + 36); + GLsizei height = *(GLsizei *) (pc + 40); + GLenum format = *(GLenum *) (pc + 44); + GLenum type = *(GLenum *) (pc + 48); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + height = bswap_32(height); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXColorTableReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei width = *(GLsizei *) (pc + 28); + GLenum format = *(GLenum *) (pc + 32); + GLenum type = *(GLenum *) (pc + 36); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glColorTableParameterfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXColorSubTableReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei count = *(GLsizei *) (pc + 28); + GLenum format = *(GLenum *) (pc + 32); + GLenum type = *(GLenum *) (pc + 36); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + count = bswap_32(count); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, count, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei width = *(GLsizei *) (pc + 28); + GLenum format = *(GLenum *) (pc + 36); + GLenum type = *(GLenum *) (pc + 40); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei width = *(GLsizei *) (pc + 28); + GLsizei height = *(GLsizei *) (pc + 32); + GLenum format = *(GLenum *) (pc + 36); + GLenum type = *(GLenum *) (pc + 40); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + height = bswap_32(height); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glConvolutionParameterfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXTexImage3DReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = *(GLint *) (pc + 8); + GLint skip_rows = *(GLint *) (pc + 16); + GLint skip_images = *(GLint *) (pc + 20); + GLint alignment = *(GLint *) (pc + 32); + GLenum target = *(GLenum *) (pc + 36); + GLsizei width = *(GLsizei *) (pc + 48); + GLsizei height = *(GLsizei *) (pc + 52); + GLsizei depth = *(GLsizei *) (pc + 56); + GLenum format = *(GLenum *) (pc + 68); + GLenum type = *(GLenum *) (pc + 72); + + if (swap) { + row_length = bswap_32(row_length); + image_height = bswap_32(image_height); + skip_rows = bswap_32(skip_rows); + skip_images = bswap_32(skip_images); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + height = bswap_32(height); + depth = bswap_32(depth); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, height, depth, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = *(GLint *) (pc + 8); + GLint skip_rows = *(GLint *) (pc + 16); + GLint skip_images = *(GLint *) (pc + 20); + GLint alignment = *(GLint *) (pc + 32); + GLenum target = *(GLenum *) (pc + 36); + GLsizei width = *(GLsizei *) (pc + 60); + GLsizei height = *(GLsizei *) (pc + 64); + GLsizei depth = *(GLsizei *) (pc + 68); + GLenum format = *(GLenum *) (pc + 76); + GLenum type = *(GLenum *) (pc + 80); + + if (swap) { + row_length = bswap_32(row_length); + image_height = bswap_32(image_height); + skip_rows = bswap_32(skip_rows); + skip_images = bswap_32(skip_images); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + height = bswap_32(height); + depth = bswap_32(depth); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, height, depth, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei imageSize = *(GLsizei *) (pc + 20); + + if (swap) { + imageSize = bswap_32(imageSize); + } + + return __GLX_PAD(imageSize); +} + +int +__glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei imageSize = *(GLsizei *) (pc + 24); + + if (swap) { + imageSize = bswap_32(imageSize); + } + + return __GLX_PAD(imageSize); +} + +int +__glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei imageSize = *(GLsizei *) (pc + 28); + + if (swap) { + imageSize = bswap_32(imageSize); + } + + return __GLX_PAD(imageSize); +} + +int +__glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei imageSize = *(GLsizei *) (pc + 36); + + if (swap) { + imageSize = bswap_32(imageSize); + } + + return __GLX_PAD(imageSize); +} + +int +__glXProgramStringARBReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei len = *(GLsizei *) (pc + 8); + + if (swap) { + len = bswap_32(len); + } + + return __GLX_PAD(len); +} + +int +__glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 0); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 4)); +} + +int +__glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 0); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glPointParameterfvEXT_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap) +{ + GLuint num = *(GLuint *) (pc + 8); + + if (swap) { + num = bswap_32(num); + } + + return __GLX_PAD((num * 32)); +} + +int +__glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap) +{ + GLuint num = *(GLuint *) (pc + 8); + + if (swap) { + num = bswap_32(num); + } + + return __GLX_PAD((num * 16)); +} + +int +__glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 4); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 8)); +} + +int +__glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 4); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 16)); +} + +int +__glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 4); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 24)); +} + +int +__glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 4); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 12)); +} + +int +__glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 4); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 6)); +} + +int +__glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 4); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 32)); +} + +int +__glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap) +{ + GLsizei len = *(GLsizei *) (pc + 4); + + if (swap) { + len = bswap_32(len); + } + + return __GLX_PAD(len); +} + +ALIAS(Fogiv, Fogfv) + ALIAS(Lightiv, Lightfv) + ALIAS(LightModeliv, LightModelfv) + ALIAS(Materialiv, Materialfv) + ALIAS(TexParameteriv, TexParameterfv) + ALIAS(TexEnviv, TexEnvfv) + ALIAS(TexGeniv, TexGenfv) + ALIAS(PixelMapuiv, PixelMapfv) + ALIAS(ColorTableParameteriv, ColorTableParameterfv) + ALIAS(ConvolutionParameteriv, ConvolutionParameterfv) + ALIAS(CompressedTexSubImage1DARB, CompressedTexImage1DARB) + ALIAS(CompressedTexSubImage2DARB, CompressedTexImage3DARB) + ALIAS(LoadProgramNV, ProgramStringARB) + ALIAS(RequestResidentProgramsNV, DrawBuffersARB) + ALIAS(VertexAttribs1fvNV, PixelMapfv) + ALIAS(VertexAttribs1svNV, PixelMapusv) + ALIAS(VertexAttribs2fvNV, VertexAttribs1dvNV) + ALIAS(VertexAttribs2svNV, PixelMapfv) + ALIAS(VertexAttribs4fvNV, VertexAttribs2dvNV) + ALIAS(VertexAttribs4svNV, VertexAttribs1dvNV) + ALIAS(VertexAttribs4ubvNV, PixelMapfv) + ALIAS(PointParameterivNV, PointParameterfvEXT) + ALIAS(ProgramNamedParameter4dvNV, CompressedTexSubImage3DARB) + ALIAS(DeleteFramebuffersEXT, DrawBuffersARB) + ALIAS(DeleteRenderbuffersEXT, DrawBuffersARB) diff --git a/GL/glx/indirect_reqsize.h b/GL/glx/indirect_reqsize.h new file mode 100644 index 000000000..26211ee5c --- /dev/null +++ b/GL/glx/indirect_reqsize.h @@ -0,0 +1,121 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#if !defined( _INDIRECT_REQSIZE_H_ ) +# define _INDIRECT_REQSIZE_H_ + +# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) +# define HIDDEN __attribute__((visibility("hidden"))) +# else +# define HIDDEN +# endif + +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define PURE __attribute__((pure)) +# else +# define PURE +# endif + +extern PURE HIDDEN int __glXCallListsReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXBitmapReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXFogfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXFogivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXLightfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXLightivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXLightModelfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXLightModelivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXMaterialfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXMaterialivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPolygonStippleReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexParameterfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexParameterivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexImage1DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexImage2DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexEnvfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexEnvivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexGendvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexGenfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexGenivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXMap1dReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXMap1fReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXMap2dReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXMap2fReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPixelMapfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPixelMapuivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPixelMapusvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXDrawPixelsReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXDrawArraysReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXColorTableReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXColorTableParameterivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXColorSubTableReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXConvolutionParameterivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXSeparableFilter2DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexImage3DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexSubImage1DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexSubImage2DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXProgramStringARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXLoadProgramNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXRequestResidentProgramsNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs1fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs1svNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs2fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs2svNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs4fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs4svNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs4ubvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPointParameterivNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXProgramNamedParameter4dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXDeleteFramebuffersEXTReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXDeleteRenderbuffersEXTReqSize(const GLbyte *pc, Bool swap); + +# undef HIDDEN +# undef PURE + +#endif /* !defined( _INDIRECT_REQSIZE_H_ ) */ diff --git a/GL/glx/indirect_size.h b/GL/glx/indirect_size.h new file mode 100644 index 000000000..9ba0bd690 --- /dev/null +++ b/GL/glx/indirect_size.h @@ -0,0 +1,88 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2004 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#if !defined( _INDIRECT_SIZE_H_ ) +# define _INDIRECT_SIZE_H_ + +/** + * \file + * Prototypes for functions used to determine the number of data elements in + * various GLX protocol messages. + * + * \author Ian Romanick + */ + +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define PURE __attribute__((pure)) +# else +# define PURE +# endif + +# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) +# define FASTCALL __attribute__((fastcall)) +# else +# define FASTCALL +# endif + +# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) +# define INTERNAL __attribute__((visibility("internal"))) +# else +# define INTERNAL +# endif + +extern INTERNAL PURE FASTCALL GLint __glCallLists_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glFogfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glFogiv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glLightfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glLightiv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glLightModelfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glLightModeliv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glMaterialfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glMaterialiv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glTexParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glTexParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glTexEnvfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glTexEnviv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glTexGendv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glTexGenfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glTexGeniv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glMap1d_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glMap1f_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glMap2d_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glMap2f_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glColorTableParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glColorTableParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glConvolutionParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glConvolutionParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glPointParameterfvEXT_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glPointParameterivNV_size(GLenum); + +# undef PURE +# undef FASTCALL +# undef INTERNAL + +#endif /* !defined( _INDIRECT_SIZE_H_ ) */ diff --git a/GL/glx/indirect_size_get.c b/GL/glx/indirect_size_get.c new file mode 100644 index 000000000..8f726904f --- /dev/null +++ b/GL/glx/indirect_size_get.c @@ -0,0 +1,1210 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2004 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + + +#include +#include "indirect_size_get.h" +#include "glxserver.h" +#include "indirect_util.h" +#include "indirect_size.h" + +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define PURE __attribute__((pure)) +# else +# define PURE +# endif + +# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) +# define FASTCALL __attribute__((fastcall)) +# else +# define FASTCALL +# endif + +# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) +# define INTERNAL __attribute__((visibility("internal"))) +# else +# define INTERNAL +# endif + + +#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) +# undef HAVE_ALIAS +#endif +#ifdef HAVE_ALIAS +# define ALIAS2(from,to) \ + INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \ + __attribute__ ((alias( # to ))); +# define ALIAS(from,to) ALIAS2( from, __gl ## to ## _size ) +#else +# define ALIAS(from,to) \ + INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \ + { return __gl ## to ## _size( e ); } +#endif + + +INTERNAL PURE FASTCALL GLint +__glCallLists_size(GLenum e) +{ + switch (e) { + case GL_BYTE: + case GL_UNSIGNED_BYTE: + return 1; + case GL_SHORT: + case GL_UNSIGNED_SHORT: + case GL_2_BYTES: + return 2; + case GL_3_BYTES: + return 3; + case GL_INT: + case GL_UNSIGNED_INT: + case GL_FLOAT: + case GL_4_BYTES: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glFogfv_size(GLenum e) +{ + switch (e) { + case GL_FOG_INDEX: + case GL_FOG_DENSITY: + case GL_FOG_START: + case GL_FOG_END: + case GL_FOG_MODE: + case GL_FOG_OFFSET_VALUE_SGIX: + case GL_FOG_DISTANCE_MODE_NV: + return 1; + case GL_FOG_COLOR: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glLightfv_size(GLenum e) +{ + switch (e) { + case GL_SPOT_EXPONENT: + case GL_SPOT_CUTOFF: + case GL_CONSTANT_ATTENUATION: + case GL_LINEAR_ATTENUATION: + case GL_QUADRATIC_ATTENUATION: + return 1; + case GL_SPOT_DIRECTION: + return 3; + case GL_AMBIENT: + case GL_DIFFUSE: + case GL_SPECULAR: + case GL_POSITION: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glLightModelfv_size(GLenum e) +{ + switch (e) { + case GL_LIGHT_MODEL_LOCAL_VIEWER: + case GL_LIGHT_MODEL_TWO_SIDE: + case GL_LIGHT_MODEL_COLOR_CONTROL: +/* case GL_LIGHT_MODEL_COLOR_CONTROL_EXT:*/ + return 1; + case GL_LIGHT_MODEL_AMBIENT: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glMaterialfv_size(GLenum e) +{ + switch (e) { + case GL_SHININESS: + return 1; + case GL_COLOR_INDEXES: + return 3; + case GL_AMBIENT: + case GL_DIFFUSE: + case GL_SPECULAR: + case GL_EMISSION: + case GL_AMBIENT_AND_DIFFUSE: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glTexParameterfv_size(GLenum e) +{ + switch (e) { + case GL_TEXTURE_MAG_FILTER: + case GL_TEXTURE_MIN_FILTER: + case GL_TEXTURE_WRAP_S: + case GL_TEXTURE_WRAP_T: + case GL_TEXTURE_PRIORITY: + case GL_TEXTURE_WRAP_R: + case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: +/* case GL_SHADOW_AMBIENT_SGIX:*/ + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_MAX_LEVEL: + case GL_TEXTURE_CLIPMAP_FRAME_SGIX: + case GL_TEXTURE_LOD_BIAS_S_SGIX: + case GL_TEXTURE_LOD_BIAS_T_SGIX: + case GL_TEXTURE_LOD_BIAS_R_SGIX: + case GL_GENERATE_MIPMAP: +/* case GL_GENERATE_MIPMAP_SGIS:*/ + case GL_TEXTURE_COMPARE_SGIX: + case GL_TEXTURE_COMPARE_OPERATOR_SGIX: + case GL_TEXTURE_MAX_CLAMP_S_SGIX: + case GL_TEXTURE_MAX_CLAMP_T_SGIX: + case GL_TEXTURE_MAX_CLAMP_R_SGIX: + case GL_TEXTURE_MAX_ANISOTROPY_EXT: + case GL_TEXTURE_LOD_BIAS: +/* case GL_TEXTURE_LOD_BIAS_EXT:*/ + case GL_DEPTH_TEXTURE_MODE: +/* case GL_DEPTH_TEXTURE_MODE_ARB:*/ + case GL_TEXTURE_COMPARE_MODE: +/* case GL_TEXTURE_COMPARE_MODE_ARB:*/ + case GL_TEXTURE_COMPARE_FUNC: +/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/ + case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: + return 1; + case GL_TEXTURE_CLIPMAP_CENTER_SGIX: + case GL_TEXTURE_CLIPMAP_OFFSET_SGIX: + return 2; + case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: + return 3; + case GL_TEXTURE_BORDER_COLOR: + case GL_POST_TEXTURE_FILTER_BIAS_SGIX: + case GL_POST_TEXTURE_FILTER_SCALE_SGIX: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glTexEnvfv_size(GLenum e) +{ + switch (e) { + case GL_ALPHA_SCALE: + case GL_TEXTURE_ENV_MODE: + case GL_TEXTURE_LOD_BIAS: + case GL_COMBINE_RGB: + case GL_COMBINE_ALPHA: + case GL_RGB_SCALE: + case GL_SOURCE0_RGB: + case GL_SOURCE1_RGB: + case GL_SOURCE2_RGB: + case GL_SOURCE3_RGB_NV: + case GL_SOURCE0_ALPHA: + case GL_SOURCE1_ALPHA: + case GL_SOURCE2_ALPHA: + case GL_SOURCE3_ALPHA_NV: + case GL_OPERAND0_RGB: + case GL_OPERAND1_RGB: + case GL_OPERAND2_RGB: + case GL_OPERAND3_RGB_NV: + case GL_OPERAND0_ALPHA: + case GL_OPERAND1_ALPHA: + case GL_OPERAND2_ALPHA: + case GL_OPERAND3_ALPHA_NV: + case GL_COORD_REPLACE_ARB: +/* case GL_COORD_REPLACE_NV:*/ + return 1; + case GL_TEXTURE_ENV_COLOR: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glTexGendv_size(GLenum e) +{ + switch (e) { + case GL_TEXTURE_GEN_MODE: + return 1; + case GL_OBJECT_PLANE: + case GL_EYE_PLANE: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glMap1d_size(GLenum e) +{ + switch (e) { + case GL_MAP1_INDEX: + case GL_MAP1_TEXTURE_COORD_1: + return 1; + case GL_MAP1_TEXTURE_COORD_2: + return 2; + case GL_MAP1_NORMAL: + case GL_MAP1_TEXTURE_COORD_3: + case GL_MAP1_VERTEX_3: + return 3; + case GL_MAP1_COLOR_4: + case GL_MAP1_TEXTURE_COORD_4: + case GL_MAP1_VERTEX_4: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glMap2d_size(GLenum e) +{ + switch (e) { + case GL_MAP2_INDEX: + case GL_MAP2_TEXTURE_COORD_1: + return 1; + case GL_MAP2_TEXTURE_COORD_2: + return 2; + case GL_MAP2_NORMAL: + case GL_MAP2_TEXTURE_COORD_3: + case GL_MAP2_VERTEX_3: + return 3; + case GL_MAP2_COLOR_4: + case GL_MAP2_TEXTURE_COORD_4: + case GL_MAP2_VERTEX_4: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetBooleanv_size(GLenum e) +{ + switch (e) { + case GL_CURRENT_INDEX: + case GL_CURRENT_RASTER_INDEX: + case GL_CURRENT_RASTER_POSITION_VALID: + case GL_CURRENT_RASTER_DISTANCE: + case GL_POINT_SMOOTH: + case GL_POINT_SIZE: + case GL_SMOOTH_POINT_SIZE_GRANULARITY: + case GL_LINE_SMOOTH: + case GL_LINE_WIDTH: + case GL_LINE_WIDTH_GRANULARITY: + case GL_LINE_STIPPLE: + case GL_LINE_STIPPLE_PATTERN: + case GL_LINE_STIPPLE_REPEAT: + case GL_LIST_MODE: + case GL_MAX_LIST_NESTING: + case GL_LIST_BASE: + case GL_LIST_INDEX: + case GL_POLYGON_SMOOTH: + case GL_POLYGON_STIPPLE: + case GL_EDGE_FLAG: + case GL_CULL_FACE: + case GL_CULL_FACE_MODE: + case GL_FRONT_FACE: + case GL_LIGHTING: + case GL_LIGHT_MODEL_LOCAL_VIEWER: + case GL_LIGHT_MODEL_TWO_SIDE: + case GL_SHADE_MODEL: + case GL_COLOR_MATERIAL_FACE: + case GL_COLOR_MATERIAL_PARAMETER: + case GL_COLOR_MATERIAL: + case GL_FOG: + case GL_FOG_INDEX: + case GL_FOG_DENSITY: + case GL_FOG_START: + case GL_FOG_END: + case GL_FOG_MODE: + case GL_DEPTH_TEST: + case GL_DEPTH_WRITEMASK: + case GL_DEPTH_CLEAR_VALUE: + case GL_DEPTH_FUNC: + case GL_STENCIL_TEST: + case GL_STENCIL_CLEAR_VALUE: + case GL_STENCIL_FUNC: + case GL_STENCIL_VALUE_MASK: + case GL_STENCIL_FAIL: + case GL_STENCIL_PASS_DEPTH_FAIL: + case GL_STENCIL_PASS_DEPTH_PASS: + case GL_STENCIL_REF: + case GL_STENCIL_WRITEMASK: + case GL_MATRIX_MODE: + case GL_NORMALIZE: + case GL_MODELVIEW_STACK_DEPTH: + case GL_PROJECTION_STACK_DEPTH: + case GL_TEXTURE_STACK_DEPTH: + case GL_ATTRIB_STACK_DEPTH: + case GL_CLIENT_ATTRIB_STACK_DEPTH: + case GL_ALPHA_TEST: + case GL_ALPHA_TEST_FUNC: + case GL_ALPHA_TEST_REF: + case GL_DITHER: + case GL_BLEND_DST: + case GL_BLEND_SRC: + case GL_BLEND: + case GL_LOGIC_OP_MODE: + case GL_LOGIC_OP: + case GL_AUX_BUFFERS: + case GL_DRAW_BUFFER: + case GL_READ_BUFFER: + case GL_SCISSOR_TEST: + case GL_INDEX_CLEAR_VALUE: + case GL_INDEX_WRITEMASK: + case GL_INDEX_MODE: + case GL_RGBA_MODE: + case GL_DOUBLEBUFFER: + case GL_STEREO: + case GL_RENDER_MODE: + case GL_PERSPECTIVE_CORRECTION_HINT: + case GL_POINT_SMOOTH_HINT: + case GL_LINE_SMOOTH_HINT: + case GL_POLYGON_SMOOTH_HINT: + case GL_FOG_HINT: + case GL_TEXTURE_GEN_S: + case GL_TEXTURE_GEN_T: + case GL_TEXTURE_GEN_R: + case GL_TEXTURE_GEN_Q: + case GL_PIXEL_MAP_I_TO_I: + case GL_PIXEL_MAP_I_TO_I_SIZE: + case GL_PIXEL_MAP_S_TO_S_SIZE: + case GL_PIXEL_MAP_I_TO_R_SIZE: + case GL_PIXEL_MAP_I_TO_G_SIZE: + case GL_PIXEL_MAP_I_TO_B_SIZE: + case GL_PIXEL_MAP_I_TO_A_SIZE: + case GL_PIXEL_MAP_R_TO_R_SIZE: + case GL_PIXEL_MAP_G_TO_G_SIZE: + case GL_PIXEL_MAP_B_TO_B_SIZE: + case GL_PIXEL_MAP_A_TO_A_SIZE: + case GL_UNPACK_SWAP_BYTES: + case GL_UNPACK_LSB_FIRST: + case GL_UNPACK_ROW_LENGTH: + case GL_UNPACK_SKIP_ROWS: + case GL_UNPACK_SKIP_PIXELS: + case GL_UNPACK_ALIGNMENT: + case GL_PACK_SWAP_BYTES: + case GL_PACK_LSB_FIRST: + case GL_PACK_ROW_LENGTH: + case GL_PACK_SKIP_ROWS: + case GL_PACK_SKIP_PIXELS: + case GL_PACK_ALIGNMENT: + case GL_MAP_COLOR: + case GL_MAP_STENCIL: + case GL_INDEX_SHIFT: + case GL_INDEX_OFFSET: + case GL_RED_SCALE: + case GL_RED_BIAS: + case GL_ZOOM_X: + case GL_ZOOM_Y: + case GL_GREEN_SCALE: + case GL_GREEN_BIAS: + case GL_BLUE_SCALE: + case GL_BLUE_BIAS: + case GL_ALPHA_SCALE: + case GL_ALPHA_BIAS: + case GL_DEPTH_SCALE: + case GL_DEPTH_BIAS: + case GL_MAX_EVAL_ORDER: + case GL_MAX_LIGHTS: + case GL_MAX_CLIP_PLANES: + case GL_MAX_TEXTURE_SIZE: + case GL_MAX_PIXEL_MAP_TABLE: + case GL_MAX_ATTRIB_STACK_DEPTH: + case GL_MAX_MODELVIEW_STACK_DEPTH: + case GL_MAX_NAME_STACK_DEPTH: + case GL_MAX_PROJECTION_STACK_DEPTH: + case GL_MAX_TEXTURE_STACK_DEPTH: + case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: + case GL_SUBPIXEL_BITS: + case GL_INDEX_BITS: + case GL_RED_BITS: + case GL_GREEN_BITS: + case GL_BLUE_BITS: + case GL_ALPHA_BITS: + case GL_DEPTH_BITS: + case GL_STENCIL_BITS: + case GL_ACCUM_RED_BITS: + case GL_ACCUM_GREEN_BITS: + case GL_ACCUM_BLUE_BITS: + case GL_ACCUM_ALPHA_BITS: + case GL_NAME_STACK_DEPTH: + case GL_AUTO_NORMAL: + case GL_MAP1_COLOR_4: + case GL_MAP1_INDEX: + case GL_MAP1_NORMAL: + case GL_MAP1_TEXTURE_COORD_1: + case GL_MAP1_TEXTURE_COORD_2: + case GL_MAP1_TEXTURE_COORD_3: + case GL_MAP1_TEXTURE_COORD_4: + case GL_MAP1_VERTEX_3: + case GL_MAP1_VERTEX_4: + case GL_MAP2_COLOR_4: + case GL_MAP2_INDEX: + case GL_MAP2_NORMAL: + case GL_MAP2_TEXTURE_COORD_1: + case GL_MAP2_TEXTURE_COORD_2: + case GL_MAP2_TEXTURE_COORD_3: + case GL_MAP2_TEXTURE_COORD_4: + case GL_MAP2_VERTEX_3: + case GL_MAP2_VERTEX_4: + case GL_MAP1_GRID_SEGMENTS: + case GL_TEXTURE_1D: + case GL_TEXTURE_2D: + case GL_POLYGON_OFFSET_UNITS: + case GL_CLIP_PLANE0: + case GL_CLIP_PLANE1: + case GL_CLIP_PLANE2: + case GL_CLIP_PLANE3: + case GL_CLIP_PLANE4: + case GL_CLIP_PLANE5: + case GL_LIGHT0: + case GL_LIGHT1: + case GL_LIGHT2: + case GL_LIGHT3: + case GL_LIGHT4: + case GL_LIGHT5: + case GL_LIGHT6: + case GL_LIGHT7: + case GL_BLEND_EQUATION: +/* case GL_BLEND_EQUATION_EXT:*/ + case GL_CONVOLUTION_1D: + case GL_CONVOLUTION_2D: + case GL_SEPARABLE_2D: + case GL_MAX_CONVOLUTION_WIDTH: +/* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/ + case GL_MAX_CONVOLUTION_HEIGHT: +/* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/ + case GL_POST_CONVOLUTION_RED_SCALE: +/* case GL_POST_CONVOLUTION_RED_SCALE_EXT:*/ + case GL_POST_CONVOLUTION_GREEN_SCALE: +/* case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:*/ + case GL_POST_CONVOLUTION_BLUE_SCALE: +/* case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:*/ + case GL_POST_CONVOLUTION_ALPHA_SCALE: +/* case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:*/ + case GL_POST_CONVOLUTION_RED_BIAS: +/* case GL_POST_CONVOLUTION_RED_BIAS_EXT:*/ + case GL_POST_CONVOLUTION_GREEN_BIAS: +/* case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:*/ + case GL_POST_CONVOLUTION_BLUE_BIAS: +/* case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:*/ + case GL_POST_CONVOLUTION_ALPHA_BIAS: +/* case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:*/ + case GL_HISTOGRAM: + case GL_MINMAX: + case GL_POLYGON_OFFSET_FACTOR: + case GL_RESCALE_NORMAL: +/* case GL_RESCALE_NORMAL_EXT:*/ + case GL_TEXTURE_BINDING_1D: + case GL_TEXTURE_BINDING_2D: + case GL_TEXTURE_BINDING_3D: + case GL_PACK_SKIP_IMAGES: + case GL_PACK_IMAGE_HEIGHT: + case GL_UNPACK_SKIP_IMAGES: + case GL_UNPACK_IMAGE_HEIGHT: + case GL_TEXTURE_3D: + case GL_MAX_3D_TEXTURE_SIZE: + case GL_VERTEX_ARRAY: + case GL_NORMAL_ARRAY: + case GL_COLOR_ARRAY: + case GL_INDEX_ARRAY: + case GL_TEXTURE_COORD_ARRAY: + case GL_EDGE_FLAG_ARRAY: + case GL_VERTEX_ARRAY_SIZE: + case GL_VERTEX_ARRAY_TYPE: + case GL_VERTEX_ARRAY_STRIDE: + case GL_NORMAL_ARRAY_TYPE: + case GL_NORMAL_ARRAY_STRIDE: + case GL_COLOR_ARRAY_SIZE: + case GL_COLOR_ARRAY_TYPE: + case GL_COLOR_ARRAY_STRIDE: + case GL_INDEX_ARRAY_TYPE: + case GL_INDEX_ARRAY_STRIDE: + case GL_TEXTURE_COORD_ARRAY_SIZE: + case GL_TEXTURE_COORD_ARRAY_TYPE: + case GL_TEXTURE_COORD_ARRAY_STRIDE: + case GL_EDGE_FLAG_ARRAY_STRIDE: + case GL_MULTISAMPLE: +/* case GL_MULTISAMPLE_ARB:*/ + case GL_SAMPLE_ALPHA_TO_COVERAGE: +/* case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:*/ + case GL_SAMPLE_ALPHA_TO_ONE: +/* case GL_SAMPLE_ALPHA_TO_ONE_ARB:*/ + case GL_SAMPLE_COVERAGE: +/* case GL_SAMPLE_COVERAGE_ARB:*/ + case GL_SAMPLE_BUFFERS: +/* case GL_SAMPLE_BUFFERS_ARB:*/ + case GL_SAMPLES: +/* case GL_SAMPLES_ARB:*/ + case GL_SAMPLE_COVERAGE_VALUE: +/* case GL_SAMPLE_COVERAGE_VALUE_ARB:*/ + case GL_SAMPLE_COVERAGE_INVERT: +/* case GL_SAMPLE_COVERAGE_INVERT_ARB:*/ + case GL_COLOR_MATRIX_STACK_DEPTH: + case GL_MAX_COLOR_MATRIX_STACK_DEPTH: + case GL_POST_COLOR_MATRIX_RED_SCALE: + case GL_POST_COLOR_MATRIX_GREEN_SCALE: + case GL_POST_COLOR_MATRIX_BLUE_SCALE: + case GL_POST_COLOR_MATRIX_ALPHA_SCALE: + case GL_POST_COLOR_MATRIX_RED_BIAS: + case GL_POST_COLOR_MATRIX_GREEN_BIAS: + case GL_POST_COLOR_MATRIX_BLUE_BIAS: + case GL_POST_COLOR_MATRIX_ALPHA_BIAS: + case GL_BLEND_DST_RGB: + case GL_BLEND_SRC_RGB: + case GL_BLEND_DST_ALPHA: + case GL_BLEND_SRC_ALPHA: + case GL_COLOR_TABLE: + case GL_POST_CONVOLUTION_COLOR_TABLE: + case GL_POST_COLOR_MATRIX_COLOR_TABLE: + case GL_MAX_ELEMENTS_VERTICES: + case GL_MAX_ELEMENTS_INDICES: + case GL_CLIP_VOLUME_CLIPPING_HINT_EXT: + case GL_POINT_SIZE_MIN: + case GL_POINT_SIZE_MAX: + case GL_POINT_FADE_THRESHOLD_SIZE: + case GL_OCCLUSION_TEST_HP: + case GL_OCCLUSION_TEST_RESULT_HP: + case GL_LIGHT_MODEL_COLOR_CONTROL: + case GL_CURRENT_FOG_COORD: + case GL_FOG_COORDINATE_ARRAY_TYPE: + case GL_FOG_COORDINATE_ARRAY_STRIDE: + case GL_FOG_COORD_ARRAY: + case GL_COLOR_SUM_ARB: + case GL_SECONDARY_COLOR_ARRAY_SIZE: + case GL_SECONDARY_COLOR_ARRAY_TYPE: + case GL_SECONDARY_COLOR_ARRAY_STRIDE: + case GL_SECONDARY_COLOR_ARRAY: + case GL_ACTIVE_TEXTURE: +/* case GL_ACTIVE_TEXTURE_ARB:*/ + case GL_CLIENT_ACTIVE_TEXTURE: +/* case GL_CLIENT_ACTIVE_TEXTURE_ARB:*/ + case GL_MAX_TEXTURE_UNITS: +/* case GL_MAX_TEXTURE_UNITS_ARB:*/ + case GL_MAX_RENDERBUFFER_SIZE_EXT: + case GL_TEXTURE_COMPRESSION_HINT: +/* case GL_TEXTURE_COMPRESSION_HINT_ARB:*/ + case GL_TEXTURE_RECTANGLE_ARB: +/* case GL_TEXTURE_RECTANGLE_NV:*/ + case GL_TEXTURE_BINDING_RECTANGLE_ARB: +/* case GL_TEXTURE_BINDING_RECTANGLE_NV:*/ + case GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB: +/* case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:*/ + case GL_MAX_TEXTURE_LOD_BIAS: + case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT: + case GL_MAX_SHININESS_NV: + case GL_MAX_SPOT_EXPONENT_NV: + case GL_TEXTURE_CUBE_MAP: +/* case GL_TEXTURE_CUBE_MAP_ARB:*/ + case GL_TEXTURE_BINDING_CUBE_MAP: +/* case GL_TEXTURE_BINDING_CUBE_MAP_ARB:*/ + case GL_MAX_CUBE_MAP_TEXTURE_SIZE: +/* case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:*/ + case GL_MULTISAMPLE_FILTER_HINT_NV: + case GL_FOG_DISTANCE_MODE_NV: + case GL_VERTEX_PROGRAM_ARB: + case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB: + case GL_MAX_PROGRAM_MATRICES_ARB: + case GL_CURRENT_MATRIX_STACK_DEPTH_ARB: + case GL_VERTEX_PROGRAM_POINT_SIZE_ARB: + case GL_VERTEX_PROGRAM_TWO_SIDE_ARB: + case GL_PROGRAM_ERROR_POSITION_ARB: + case GL_DEPTH_CLAMP_NV: + case GL_NUM_COMPRESSED_TEXTURE_FORMATS: +/* case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:*/ + case GL_MAX_VERTEX_UNITS_ARB: + case GL_ACTIVE_VERTEX_UNITS_ARB: + case GL_WEIGHT_SUM_UNITY_ARB: + case GL_VERTEX_BLEND_ARB: + case GL_CURRENT_WEIGHT_ARB: + case GL_WEIGHT_ARRAY_TYPE_ARB: + case GL_WEIGHT_ARRAY_STRIDE_ARB: + case GL_WEIGHT_ARRAY_SIZE_ARB: + case GL_WEIGHT_ARRAY_ARB: + case GL_PACK_INVERT_MESA: + case GL_STENCIL_BACK_FUNC_ATI: + case GL_STENCIL_BACK_FAIL_ATI: + case GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI: + case GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI: + case GL_FRAGMENT_PROGRAM_ARB: + case GL_MAX_DRAW_BUFFERS_ARB: +/* case GL_MAX_DRAW_BUFFERS_ATI:*/ + case GL_DRAW_BUFFER0_ARB: +/* case GL_DRAW_BUFFER0_ATI:*/ + case GL_DRAW_BUFFER1_ARB: +/* case GL_DRAW_BUFFER1_ATI:*/ + case GL_DRAW_BUFFER2_ARB: +/* case GL_DRAW_BUFFER2_ATI:*/ + case GL_DRAW_BUFFER3_ARB: +/* case GL_DRAW_BUFFER3_ATI:*/ + case GL_DRAW_BUFFER4_ARB: +/* case GL_DRAW_BUFFER4_ATI:*/ + case GL_DRAW_BUFFER5_ARB: +/* case GL_DRAW_BUFFER5_ATI:*/ + case GL_DRAW_BUFFER6_ARB: +/* case GL_DRAW_BUFFER6_ATI:*/ + case GL_DRAW_BUFFER7_ARB: +/* case GL_DRAW_BUFFER7_ATI:*/ + case GL_DRAW_BUFFER8_ARB: +/* case GL_DRAW_BUFFER8_ATI:*/ + case GL_DRAW_BUFFER9_ARB: +/* case GL_DRAW_BUFFER9_ATI:*/ + case GL_DRAW_BUFFER10_ARB: +/* case GL_DRAW_BUFFER10_ATI:*/ + case GL_DRAW_BUFFER11_ARB: +/* case GL_DRAW_BUFFER11_ATI:*/ + case GL_DRAW_BUFFER12_ARB: +/* case GL_DRAW_BUFFER12_ATI:*/ + case GL_DRAW_BUFFER13_ARB: +/* case GL_DRAW_BUFFER13_ATI:*/ + case GL_DRAW_BUFFER14_ARB: +/* case GL_DRAW_BUFFER14_ATI:*/ + case GL_DRAW_BUFFER15_ARB: +/* case GL_DRAW_BUFFER15_ATI:*/ + case GL_BLEND_EQUATION_ALPHA_EXT: + case GL_MATRIX_PALETTE_ARB: + case GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB: + case GL_MAX_PALETTE_MATRICES_ARB: + case GL_CURRENT_PALETTE_MATRIX_ARB: + case GL_MATRIX_INDEX_ARRAY_ARB: + case GL_CURRENT_MATRIX_INDEX_ARB: + case GL_MATRIX_INDEX_ARRAY_SIZE_ARB: + case GL_MATRIX_INDEX_ARRAY_TYPE_ARB: + case GL_MATRIX_INDEX_ARRAY_STRIDE_ARB: + case GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT: + case GL_POINT_SPRITE_ARB: +/* case GL_POINT_SPRITE_NV:*/ + case GL_POINT_SPRITE_R_MODE_NV: + case GL_MAX_VERTEX_ATTRIBS_ARB: + case GL_MAX_TEXTURE_COORDS_ARB: + case GL_MAX_TEXTURE_IMAGE_UNITS_ARB: + case GL_DEPTH_BOUNDS_TEST_EXT: + case GL_MAX_ARRAY_TEXTURE_LAYERS_EXT: + case GL_STENCIL_TEST_TWO_SIDE_EXT: + case GL_ACTIVE_STENCIL_FACE_EXT: + case GL_TEXTURE_BINDING_1D_ARRAY_EXT: + case GL_TEXTURE_BINDING_2D_ARRAY_EXT: + case GL_DRAW_FRAMEBUFFER_BINDING_EXT: + case GL_RENDERBUFFER_BINDING_EXT: + case GL_READ_FRAMEBUFFER_BINDING_EXT: + case GL_MAX_COLOR_ATTACHMENTS_EXT: + case GL_RASTER_POSITION_UNCLIPPED_IBM: + return 1; + case GL_SMOOTH_POINT_SIZE_RANGE: + case GL_LINE_WIDTH_RANGE: + case GL_POLYGON_MODE: + case GL_DEPTH_RANGE: + case GL_MAX_VIEWPORT_DIMS: + case GL_MAP1_GRID_DOMAIN: + case GL_MAP2_GRID_SEGMENTS: + case GL_ALIASED_POINT_SIZE_RANGE: + case GL_ALIASED_LINE_WIDTH_RANGE: + case GL_DEPTH_BOUNDS_EXT: + return 2; + case GL_CURRENT_NORMAL: + case GL_POINT_DISTANCE_ATTENUATION: + return 3; + case GL_CURRENT_COLOR: + case GL_CURRENT_TEXTURE_COORDS: + case GL_CURRENT_RASTER_COLOR: + case GL_CURRENT_RASTER_TEXTURE_COORDS: + case GL_CURRENT_RASTER_POSITION: + case GL_LIGHT_MODEL_AMBIENT: + case GL_FOG_COLOR: + case GL_ACCUM_CLEAR_VALUE: + case GL_VIEWPORT: + case GL_SCISSOR_BOX: + case GL_COLOR_CLEAR_VALUE: + case GL_COLOR_WRITEMASK: + case GL_MAP2_GRID_DOMAIN: + case GL_BLEND_COLOR: +/* case GL_BLEND_COLOR_EXT:*/ + case GL_CURRENT_SECONDARY_COLOR: + return 4; + case GL_MODELVIEW_MATRIX: + case GL_PROJECTION_MATRIX: + case GL_TEXTURE_MATRIX: + case GL_MODELVIEW0_ARB: + case GL_COLOR_MATRIX: + case GL_MODELVIEW1_ARB: + case GL_CURRENT_MATRIX_ARB: + case GL_MODELVIEW2_ARB: + case GL_MODELVIEW3_ARB: + case GL_MODELVIEW4_ARB: + case GL_MODELVIEW5_ARB: + case GL_MODELVIEW6_ARB: + case GL_MODELVIEW7_ARB: + case GL_MODELVIEW8_ARB: + case GL_MODELVIEW9_ARB: + case GL_MODELVIEW10_ARB: + case GL_MODELVIEW11_ARB: + case GL_MODELVIEW12_ARB: + case GL_MODELVIEW13_ARB: + case GL_MODELVIEW14_ARB: + case GL_MODELVIEW15_ARB: + case GL_MODELVIEW16_ARB: + case GL_MODELVIEW17_ARB: + case GL_MODELVIEW18_ARB: + case GL_MODELVIEW19_ARB: + case GL_MODELVIEW20_ARB: + case GL_MODELVIEW21_ARB: + case GL_MODELVIEW22_ARB: + case GL_MODELVIEW23_ARB: + case GL_MODELVIEW24_ARB: + case GL_MODELVIEW25_ARB: + case GL_MODELVIEW26_ARB: + case GL_MODELVIEW27_ARB: + case GL_MODELVIEW28_ARB: + case GL_MODELVIEW29_ARB: + case GL_MODELVIEW30_ARB: + case GL_MODELVIEW31_ARB: + case GL_TRANSPOSE_CURRENT_MATRIX_ARB: + return 16; + case GL_FOG_COORDINATE_SOURCE: + case GL_COMPRESSED_TEXTURE_FORMATS: + return __glGetBooleanv_variable_size(e); + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetTexParameterfv_size(GLenum e) +{ + switch (e) { + case GL_TEXTURE_MAG_FILTER: + case GL_TEXTURE_MIN_FILTER: + case GL_TEXTURE_WRAP_S: + case GL_TEXTURE_WRAP_T: + case GL_TEXTURE_PRIORITY: + case GL_TEXTURE_RESIDENT: + case GL_TEXTURE_WRAP_R: + case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: +/* case GL_SHADOW_AMBIENT_SGIX:*/ + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_MAX_LEVEL: + case GL_TEXTURE_CLIPMAP_FRAME_SGIX: + case GL_TEXTURE_LOD_BIAS_S_SGIX: + case GL_TEXTURE_LOD_BIAS_T_SGIX: + case GL_TEXTURE_LOD_BIAS_R_SGIX: + case GL_GENERATE_MIPMAP: +/* case GL_GENERATE_MIPMAP_SGIS:*/ + case GL_TEXTURE_COMPARE_SGIX: + case GL_TEXTURE_COMPARE_OPERATOR_SGIX: + case GL_TEXTURE_MAX_CLAMP_S_SGIX: + case GL_TEXTURE_MAX_CLAMP_T_SGIX: + case GL_TEXTURE_MAX_CLAMP_R_SGIX: + case GL_TEXTURE_MAX_ANISOTROPY_EXT: + case GL_TEXTURE_LOD_BIAS: +/* case GL_TEXTURE_LOD_BIAS_EXT:*/ + case GL_DEPTH_TEXTURE_MODE: +/* case GL_DEPTH_TEXTURE_MODE_ARB:*/ + case GL_TEXTURE_COMPARE_MODE: +/* case GL_TEXTURE_COMPARE_MODE_ARB:*/ + case GL_TEXTURE_COMPARE_FUNC: +/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/ + case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: + return 1; + case GL_TEXTURE_CLIPMAP_CENTER_SGIX: + case GL_TEXTURE_CLIPMAP_OFFSET_SGIX: + return 2; + case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: + return 3; + case GL_TEXTURE_BORDER_COLOR: + case GL_POST_TEXTURE_FILTER_BIAS_SGIX: + case GL_POST_TEXTURE_FILTER_SCALE_SGIX: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetTexLevelParameterfv_size(GLenum e) +{ + switch (e) { + case GL_TEXTURE_WIDTH: + case GL_TEXTURE_HEIGHT: + case GL_TEXTURE_COMPONENTS: + case GL_TEXTURE_BORDER: + case GL_TEXTURE_RED_SIZE: +/* case GL_TEXTURE_RED_SIZE_EXT:*/ + case GL_TEXTURE_GREEN_SIZE: +/* case GL_TEXTURE_GREEN_SIZE_EXT:*/ + case GL_TEXTURE_BLUE_SIZE: +/* case GL_TEXTURE_BLUE_SIZE_EXT:*/ + case GL_TEXTURE_ALPHA_SIZE: +/* case GL_TEXTURE_ALPHA_SIZE_EXT:*/ + case GL_TEXTURE_LUMINANCE_SIZE: +/* case GL_TEXTURE_LUMINANCE_SIZE_EXT:*/ + case GL_TEXTURE_INTENSITY_SIZE: +/* case GL_TEXTURE_INTENSITY_SIZE_EXT:*/ + case GL_TEXTURE_DEPTH: + case GL_TEXTURE_INDEX_SIZE_EXT: + case GL_TEXTURE_COMPRESSED_IMAGE_SIZE: +/* case GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB:*/ + case GL_TEXTURE_COMPRESSED: +/* case GL_TEXTURE_COMPRESSED_ARB:*/ + case GL_TEXTURE_DEPTH_SIZE: +/* case GL_TEXTURE_DEPTH_SIZE_ARB:*/ + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glColorTableParameterfv_size(GLenum e) +{ + switch (e) { + case GL_COLOR_TABLE_SCALE: + case GL_COLOR_TABLE_BIAS: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetColorTableParameterfv_size(GLenum e) +{ + switch (e) { + case GL_COLOR_TABLE_FORMAT: +/* case GL_COLOR_TABLE_FORMAT_EXT:*/ + case GL_COLOR_TABLE_WIDTH: +/* case GL_COLOR_TABLE_WIDTH_EXT:*/ + case GL_COLOR_TABLE_RED_SIZE: +/* case GL_COLOR_TABLE_RED_SIZE_EXT:*/ + case GL_COLOR_TABLE_GREEN_SIZE: +/* case GL_COLOR_TABLE_GREEN_SIZE_EXT:*/ + case GL_COLOR_TABLE_BLUE_SIZE: +/* case GL_COLOR_TABLE_BLUE_SIZE_EXT:*/ + case GL_COLOR_TABLE_ALPHA_SIZE: +/* case GL_COLOR_TABLE_ALPHA_SIZE_EXT:*/ + case GL_COLOR_TABLE_LUMINANCE_SIZE: +/* case GL_COLOR_TABLE_LUMINANCE_SIZE_EXT:*/ + case GL_COLOR_TABLE_INTENSITY_SIZE: +/* case GL_COLOR_TABLE_INTENSITY_SIZE_EXT:*/ + return 1; + case GL_COLOR_TABLE_SCALE: + case GL_COLOR_TABLE_BIAS: + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glConvolutionParameterfv_size(GLenum e) +{ + switch (e) { + case GL_CONVOLUTION_BORDER_MODE: +/* case GL_CONVOLUTION_BORDER_MODE_EXT:*/ + return 1; + case GL_CONVOLUTION_FILTER_SCALE: +/* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/ + case GL_CONVOLUTION_FILTER_BIAS: +/* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/ + case GL_CONVOLUTION_BORDER_COLOR: +/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/ + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetConvolutionParameterfv_size(GLenum e) +{ + switch (e) { + case GL_CONVOLUTION_BORDER_MODE: +/* case GL_CONVOLUTION_BORDER_MODE_EXT:*/ + case GL_CONVOLUTION_FORMAT: +/* case GL_CONVOLUTION_FORMAT_EXT:*/ + case GL_CONVOLUTION_WIDTH: +/* case GL_CONVOLUTION_WIDTH_EXT:*/ + case GL_CONVOLUTION_HEIGHT: +/* case GL_CONVOLUTION_HEIGHT_EXT:*/ + case GL_MAX_CONVOLUTION_WIDTH: +/* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/ + case GL_MAX_CONVOLUTION_HEIGHT: +/* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/ + return 1; + case GL_CONVOLUTION_FILTER_SCALE: +/* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/ + case GL_CONVOLUTION_FILTER_BIAS: +/* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/ + case GL_CONVOLUTION_BORDER_COLOR: +/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/ + return 4; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetHistogramParameterfv_size(GLenum e) +{ + switch (e) { + case GL_HISTOGRAM_WIDTH: + case GL_HISTOGRAM_FORMAT: + case GL_HISTOGRAM_RED_SIZE: + case GL_HISTOGRAM_GREEN_SIZE: + case GL_HISTOGRAM_BLUE_SIZE: + case GL_HISTOGRAM_ALPHA_SIZE: + case GL_HISTOGRAM_LUMINANCE_SIZE: + case GL_HISTOGRAM_SINK: + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetMinmaxParameterfv_size(GLenum e) +{ + switch (e) { + case GL_MINMAX_FORMAT: + case GL_MINMAX_SINK: + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetProgramivARB_size(GLenum e) +{ + switch (e) { + case GL_PROGRAM_LENGTH_ARB: + case GL_PROGRAM_BINDING_ARB: + case GL_PROGRAM_ALU_INSTRUCTIONS_ARB: + case GL_PROGRAM_TEX_INSTRUCTIONS_ARB: + case GL_PROGRAM_TEX_INDIRECTIONS_ARB: + case GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB: + case GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB: + case GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB: + case GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB: + case GL_PROGRAM_FORMAT_ARB: + case GL_PROGRAM_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_INSTRUCTIONS_ARB: + case GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB: + case GL_PROGRAM_TEMPORARIES_ARB: + case GL_MAX_PROGRAM_TEMPORARIES_ARB: + case GL_PROGRAM_NATIVE_TEMPORARIES_ARB: + case GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB: + case GL_PROGRAM_PARAMETERS_ARB: + case GL_MAX_PROGRAM_PARAMETERS_ARB: + case GL_PROGRAM_NATIVE_PARAMETERS_ARB: + case GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB: + case GL_PROGRAM_ATTRIBS_ARB: + case GL_MAX_PROGRAM_ATTRIBS_ARB: + case GL_PROGRAM_NATIVE_ATTRIBS_ARB: + case GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB: + case GL_PROGRAM_ADDRESS_REGISTERS_ARB: + case GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB: + case GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB: + case GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB: + case GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB: + case GL_MAX_PROGRAM_ENV_PARAMETERS_ARB: + case GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB: + case GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV: + case GL_MAX_PROGRAM_CALL_DEPTH_NV: + case GL_MAX_PROGRAM_IF_DEPTH_NV: + case GL_MAX_PROGRAM_LOOP_DEPTH_NV: + case GL_MAX_PROGRAM_LOOP_COUNT_NV: + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetVertexAttribdvARB_size(GLenum e) +{ + switch (e) { + case GL_VERTEX_PROGRAM_ARB: + case GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB: + case GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB: + case GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB: + case GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB: + case GL_CURRENT_VERTEX_ATTRIB_ARB: + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetQueryObjectivARB_size(GLenum e) +{ + switch (e) { + case GL_QUERY_RESULT_ARB: + case GL_QUERY_RESULT_AVAILABLE_ARB: + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetQueryivARB_size(GLenum e) +{ + switch (e) { + case GL_QUERY_COUNTER_BITS_ARB: + case GL_CURRENT_QUERY_ARB: + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glPointParameterfvEXT_size(GLenum e) +{ + switch (e) { + case GL_POINT_SIZE_MIN: +/* case GL_POINT_SIZE_MIN_ARB:*/ +/* case GL_POINT_SIZE_MIN_SGIS:*/ + case GL_POINT_SIZE_MAX: +/* case GL_POINT_SIZE_MAX_ARB:*/ +/* case GL_POINT_SIZE_MAX_SGIS:*/ + case GL_POINT_FADE_THRESHOLD_SIZE: +/* case GL_POINT_FADE_THRESHOLD_SIZE_ARB:*/ +/* case GL_POINT_FADE_THRESHOLD_SIZE_SGIS:*/ + case GL_POINT_SPRITE_R_MODE_NV: + case GL_POINT_SPRITE_COORD_ORIGIN: + return 1; + case GL_POINT_DISTANCE_ATTENUATION: +/* case GL_POINT_DISTANCE_ATTENUATION_ARB:*/ +/* case GL_POINT_DISTANCE_ATTENUATION_SGIS:*/ + return 3; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetProgramivNV_size(GLenum e) +{ + switch (e) { + case GL_PROGRAM_LENGTH_NV: + case GL_PROGRAM_TARGET_NV: + case GL_PROGRAM_RESIDENT_NV: + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetVertexAttribdvNV_size(GLenum e) +{ + switch (e) { + case GL_ATTRIB_ARRAY_SIZE_NV: + case GL_ATTRIB_ARRAY_STRIDE_NV: + case GL_ATTRIB_ARRAY_TYPE_NV: + case GL_CURRENT_ATTRIB_NV: + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetFramebufferAttachmentParameterivEXT_size(GLenum e) +{ + switch (e) { + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT: + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT: + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT: + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT: + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT: + return 1; + default: + return 0; + } +} + +ALIAS(Fogiv, Fogfv) + ALIAS(Lightiv, Lightfv) + ALIAS(LightModeliv, LightModelfv) + ALIAS(Materialiv, Materialfv) + ALIAS(TexParameteriv, TexParameterfv) + ALIAS(TexEnviv, TexEnvfv) + ALIAS(TexGenfv, TexGendv) + ALIAS(TexGeniv, TexGendv) + ALIAS(Map1f, Map1d) + ALIAS(Map2f, Map2d) + ALIAS(GetDoublev, GetBooleanv) + ALIAS(GetFloatv, GetBooleanv) + ALIAS(GetIntegerv, GetBooleanv) + ALIAS(GetLightfv, Lightfv) + ALIAS(GetLightiv, Lightfv) + ALIAS(GetMaterialfv, Materialfv) + ALIAS(GetMaterialiv, Materialfv) + ALIAS(GetTexEnvfv, TexEnvfv) + ALIAS(GetTexEnviv, TexEnvfv) + ALIAS(GetTexGendv, TexGendv) + ALIAS(GetTexGenfv, TexGendv) + ALIAS(GetTexGeniv, TexGendv) + ALIAS(GetTexParameteriv, GetTexParameterfv) + ALIAS(GetTexLevelParameteriv, GetTexLevelParameterfv) + ALIAS(ColorTableParameteriv, ColorTableParameterfv) + ALIAS(GetColorTableParameteriv, GetColorTableParameterfv) + ALIAS(ConvolutionParameteriv, ConvolutionParameterfv) + ALIAS(GetConvolutionParameteriv, GetConvolutionParameterfv) + ALIAS(GetHistogramParameteriv, GetHistogramParameterfv) + ALIAS(GetMinmaxParameteriv, GetMinmaxParameterfv) + ALIAS(GetVertexAttribfvARB, GetVertexAttribdvARB) + ALIAS(GetVertexAttribivARB, GetVertexAttribdvARB) + ALIAS(GetQueryObjectuivARB, GetQueryObjectivARB) + ALIAS(GetVertexAttribfvNV, GetVertexAttribdvNV) + ALIAS(GetVertexAttribivNV, GetVertexAttribdvNV) + ALIAS(PointParameterivNV, PointParameterfvEXT) +# undef PURE +# undef FASTCALL +# undef INTERNAL diff --git a/GL/glx/indirect_size_get.h b/GL/glx/indirect_size_get.h new file mode 100644 index 000000000..4fcb55b4e --- /dev/null +++ b/GL/glx/indirect_size_get.h @@ -0,0 +1,102 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2004 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#if !defined( _INDIRECT_SIZE_GET_H_ ) +# define _INDIRECT_SIZE_GET_H_ + +/** + * \file + * Prototypes for functions used to determine the number of data elements in + * various GLX protocol messages. + * + * \author Ian Romanick + */ + +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define PURE __attribute__((pure)) +# else +# define PURE +# endif + +# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) +# define FASTCALL __attribute__((fastcall)) +# else +# define FASTCALL +# endif + +# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) +# define INTERNAL __attribute__((visibility("internal"))) +# else +# define INTERNAL +# endif + +extern INTERNAL PURE FASTCALL GLint __glGetBooleanv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetDoublev_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetFloatv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetIntegerv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetLightfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetLightiv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetMaterialfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetMaterialiv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexEnvfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexEnviv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexGendv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexGenfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexGeniv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint +__glGetConvolutionParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint +__glGetConvolutionParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetProgramivARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectivARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectuivARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetQueryivARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetProgramivNV_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvNV_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvNV_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivNV_size(GLenum); +extern INTERNAL PURE FASTCALL GLint +__glGetFramebufferAttachmentParameterivEXT_size(GLenum); + +# undef PURE +# undef FASTCALL +# undef INTERNAL + +#endif /* !defined( _INDIRECT_SIZE_GET_H_ ) */ diff --git a/GL/glx/indirect_table.c b/GL/glx/indirect_table.c new file mode 100644 index 000000000..cb3202605 --- /dev/null +++ b/GL/glx/indirect_table.c @@ -0,0 +1,1596 @@ +/* DO NOT EDIT - This file generated automatically by glX_server_table.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005, 2006 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include +#include "glxserver.h" +#include "glxext.h" +#include "indirect_dispatch.h" +#include "indirect_reqsize.h" +#include "g_disptab.h" +#include "indirect_table.h" + +/*****************************************************************/ +/* tree depth = 3 */ +static const int_fast16_t Single_dispatch_tree[24] = { + /* [0] -> opcode range [0, 256], node depth 1 */ + 2, + 5, + 13, + 16, + EMPTY_LEAF, + + /* [5] -> opcode range [0, 64], node depth 2 */ + 2, + LEAF(0), + LEAF(16), + 10, + EMPTY_LEAF, + + /* [10] -> opcode range [32, 48], node depth 3 */ + 1, + LEAF(32), + EMPTY_LEAF, + + /* [13] -> opcode range [64, 128], node depth 2 */ + 1, + EMPTY_LEAF, + LEAF(40), + + /* [16] -> opcode range [128, 192], node depth 2 */ + 2, + LEAF(72), + LEAF(88), + 21, + EMPTY_LEAF, + + /* [21] -> opcode range [160, 176], node depth 3 */ + 1, + LEAF(104), + EMPTY_LEAF, + +}; + +static const void *Single_function_table[112][2] = { + /* [ 0] = 0 */ {NULL, NULL}, + /* [ 1] = 1 */ {__glXDisp_Render, __glXDispSwap_Render}, + /* [ 2] = 2 */ {__glXDisp_RenderLarge, __glXDispSwap_RenderLarge}, + /* [ 3] = 3 */ {__glXDisp_CreateContext, __glXDispSwap_CreateContext}, + /* [ 4] = 4 */ {__glXDisp_DestroyContext, __glXDispSwap_DestroyContext}, + /* [ 5] = 5 */ {__glXDisp_MakeCurrent, __glXDispSwap_MakeCurrent}, + /* [ 6] = 6 */ {__glXDisp_IsDirect, __glXDispSwap_IsDirect}, + /* [ 7] = 7 */ {__glXDisp_QueryVersion, __glXDispSwap_QueryVersion}, + /* [ 8] = 8 */ {__glXDisp_WaitGL, __glXDispSwap_WaitGL}, + /* [ 9] = 9 */ {__glXDisp_WaitX, __glXDispSwap_WaitX}, + /* [ 10] = 10 */ {__glXDisp_CopyContext, __glXDispSwap_CopyContext}, + /* [ 11] = 11 */ {__glXDisp_SwapBuffers, __glXDispSwap_SwapBuffers}, + /* [ 12] = 12 */ {__glXDisp_UseXFont, __glXDispSwap_UseXFont}, + /* [ 13] = 13 */ {__glXDisp_CreateGLXPixmap, __glXDispSwap_CreateGLXPixmap}, + /* [ 14] = 14 */ {__glXDisp_GetVisualConfigs, __glXDispSwap_GetVisualConfigs}, + /* [ 15] = 15 */ {__glXDisp_DestroyGLXPixmap, __glXDispSwap_DestroyGLXPixmap}, + /* [ 16] = 16 */ {__glXDisp_VendorPrivate, __glXDispSwap_VendorPrivate}, + /* [ 17] = 17 */ {__glXDisp_VendorPrivateWithReply, __glXDispSwap_VendorPrivateWithReply}, + /* [ 18] = 18 */ {__glXDisp_QueryExtensionsString, __glXDispSwap_QueryExtensionsString}, + /* [ 19] = 19 */ {__glXDisp_QueryServerString, __glXDispSwap_QueryServerString}, + /* [ 20] = 20 */ {__glXDisp_ClientInfo, __glXDispSwap_ClientInfo}, + /* [ 21] = 21 */ {__glXDisp_GetFBConfigs, __glXDispSwap_GetFBConfigs}, + /* [ 22] = 22 */ {__glXDisp_CreatePixmap, __glXDispSwap_CreatePixmap}, + /* [ 23] = 23 */ {__glXDisp_DestroyPixmap, __glXDispSwap_DestroyPixmap}, + /* [ 24] = 24 */ {__glXDisp_CreateNewContext, __glXDispSwap_CreateNewContext}, + /* [ 25] = 25 */ {__glXDisp_QueryContext, __glXDispSwap_QueryContext}, + /* [ 26] = 26 */ {__glXDisp_MakeContextCurrent, __glXDispSwap_MakeContextCurrent}, + /* [ 27] = 27 */ {__glXDisp_CreatePbuffer, __glXDispSwap_CreatePbuffer}, + /* [ 28] = 28 */ {__glXDisp_DestroyPbuffer, __glXDispSwap_DestroyPbuffer}, + /* [ 29] = 29 */ {__glXDisp_GetDrawableAttributes, __glXDispSwap_GetDrawableAttributes}, + /* [ 30] = 30 */ {__glXDisp_ChangeDrawableAttributes, __glXDispSwap_ChangeDrawableAttributes}, + /* [ 31] = 31 */ {__glXDisp_CreateWindow, __glXDispSwap_CreateWindow}, + /* [ 32] = 32 */ {__glXDisp_DestroyWindow, __glXDispSwap_DestroyWindow}, + /* [ 33] = 33 */ {NULL, NULL}, + /* [ 34] = 34 */ {NULL, NULL}, + /* [ 35] = 35 */ {NULL, NULL}, + /* [ 36] = 36 */ {NULL, NULL}, + /* [ 37] = 37 */ {NULL, NULL}, + /* [ 38] = 38 */ {NULL, NULL}, + /* [ 39] = 39 */ {NULL, NULL}, + /* [ 40] = 96 */ {NULL, NULL}, + /* [ 41] = 97 */ {NULL, NULL}, + /* [ 42] = 98 */ {NULL, NULL}, + /* [ 43] = 99 */ {NULL, NULL}, + /* [ 44] = 100 */ {NULL, NULL}, + /* [ 45] = 101 */ {__glXDisp_NewList, __glXDispSwap_NewList}, + /* [ 46] = 102 */ {__glXDisp_EndList, __glXDispSwap_EndList}, + /* [ 47] = 103 */ {__glXDisp_DeleteLists, __glXDispSwap_DeleteLists}, + /* [ 48] = 104 */ {__glXDisp_GenLists, __glXDispSwap_GenLists}, + /* [ 49] = 105 */ {__glXDisp_FeedbackBuffer, __glXDispSwap_FeedbackBuffer}, + /* [ 50] = 106 */ {__glXDisp_SelectBuffer, __glXDispSwap_SelectBuffer}, + /* [ 51] = 107 */ {__glXDisp_RenderMode, __glXDispSwap_RenderMode}, + /* [ 52] = 108 */ {__glXDisp_Finish, __glXDispSwap_Finish}, + /* [ 53] = 109 */ {__glXDisp_PixelStoref, __glXDispSwap_PixelStoref}, + /* [ 54] = 110 */ {__glXDisp_PixelStorei, __glXDispSwap_PixelStorei}, + /* [ 55] = 111 */ {__glXDisp_ReadPixels, __glXDispSwap_ReadPixels}, + /* [ 56] = 112 */ {__glXDisp_GetBooleanv, __glXDispSwap_GetBooleanv}, + /* [ 57] = 113 */ {__glXDisp_GetClipPlane, __glXDispSwap_GetClipPlane}, + /* [ 58] = 114 */ {__glXDisp_GetDoublev, __glXDispSwap_GetDoublev}, + /* [ 59] = 115 */ {__glXDisp_GetError, __glXDispSwap_GetError}, + /* [ 60] = 116 */ {__glXDisp_GetFloatv, __glXDispSwap_GetFloatv}, + /* [ 61] = 117 */ {__glXDisp_GetIntegerv, __glXDispSwap_GetIntegerv}, + /* [ 62] = 118 */ {__glXDisp_GetLightfv, __glXDispSwap_GetLightfv}, + /* [ 63] = 119 */ {__glXDisp_GetLightiv, __glXDispSwap_GetLightiv}, + /* [ 64] = 120 */ {__glXDisp_GetMapdv, __glXDispSwap_GetMapdv}, + /* [ 65] = 121 */ {__glXDisp_GetMapfv, __glXDispSwap_GetMapfv}, + /* [ 66] = 122 */ {__glXDisp_GetMapiv, __glXDispSwap_GetMapiv}, + /* [ 67] = 123 */ {__glXDisp_GetMaterialfv, __glXDispSwap_GetMaterialfv}, + /* [ 68] = 124 */ {__glXDisp_GetMaterialiv, __glXDispSwap_GetMaterialiv}, + /* [ 69] = 125 */ {__glXDisp_GetPixelMapfv, __glXDispSwap_GetPixelMapfv}, + /* [ 70] = 126 */ {__glXDisp_GetPixelMapuiv, __glXDispSwap_GetPixelMapuiv}, + /* [ 71] = 127 */ {__glXDisp_GetPixelMapusv, __glXDispSwap_GetPixelMapusv}, + /* [ 72] = 128 */ {__glXDisp_GetPolygonStipple, __glXDispSwap_GetPolygonStipple}, + /* [ 73] = 129 */ {__glXDisp_GetString, __glXDispSwap_GetString}, + /* [ 74] = 130 */ {__glXDisp_GetTexEnvfv, __glXDispSwap_GetTexEnvfv}, + /* [ 75] = 131 */ {__glXDisp_GetTexEnviv, __glXDispSwap_GetTexEnviv}, + /* [ 76] = 132 */ {__glXDisp_GetTexGendv, __glXDispSwap_GetTexGendv}, + /* [ 77] = 133 */ {__glXDisp_GetTexGenfv, __glXDispSwap_GetTexGenfv}, + /* [ 78] = 134 */ {__glXDisp_GetTexGeniv, __glXDispSwap_GetTexGeniv}, + /* [ 79] = 135 */ {__glXDisp_GetTexImage, __glXDispSwap_GetTexImage}, + /* [ 80] = 136 */ {__glXDisp_GetTexParameterfv, __glXDispSwap_GetTexParameterfv}, + /* [ 81] = 137 */ {__glXDisp_GetTexParameteriv, __glXDispSwap_GetTexParameteriv}, + /* [ 82] = 138 */ {__glXDisp_GetTexLevelParameterfv, __glXDispSwap_GetTexLevelParameterfv}, + /* [ 83] = 139 */ {__glXDisp_GetTexLevelParameteriv, __glXDispSwap_GetTexLevelParameteriv}, + /* [ 84] = 140 */ {__glXDisp_IsEnabled, __glXDispSwap_IsEnabled}, + /* [ 85] = 141 */ {__glXDisp_IsList, __glXDispSwap_IsList}, + /* [ 86] = 142 */ {__glXDisp_Flush, __glXDispSwap_Flush}, + /* [ 87] = 143 */ {__glXDisp_AreTexturesResident, __glXDispSwap_AreTexturesResident}, + /* [ 88] = 144 */ {__glXDisp_DeleteTextures, __glXDispSwap_DeleteTextures}, + /* [ 89] = 145 */ {__glXDisp_GenTextures, __glXDispSwap_GenTextures}, + /* [ 90] = 146 */ {__glXDisp_IsTexture, __glXDispSwap_IsTexture}, + /* [ 91] = 147 */ {__glXDisp_GetColorTable, __glXDispSwap_GetColorTable}, + /* [ 92] = 148 */ {__glXDisp_GetColorTableParameterfv, __glXDispSwap_GetColorTableParameterfv}, + /* [ 93] = 149 */ {__glXDisp_GetColorTableParameteriv, __glXDispSwap_GetColorTableParameteriv}, + /* [ 94] = 150 */ {__glXDisp_GetConvolutionFilter, __glXDispSwap_GetConvolutionFilter}, + /* [ 95] = 151 */ {__glXDisp_GetConvolutionParameterfv, __glXDispSwap_GetConvolutionParameterfv}, + /* [ 96] = 152 */ {__glXDisp_GetConvolutionParameteriv, __glXDispSwap_GetConvolutionParameteriv}, + /* [ 97] = 153 */ {__glXDisp_GetSeparableFilter, __glXDispSwap_GetSeparableFilter}, + /* [ 98] = 154 */ {__glXDisp_GetHistogram, __glXDispSwap_GetHistogram}, + /* [ 99] = 155 */ {__glXDisp_GetHistogramParameterfv, __glXDispSwap_GetHistogramParameterfv}, + /* [ 100] = 156 */ {__glXDisp_GetHistogramParameteriv, __glXDispSwap_GetHistogramParameteriv}, + /* [ 101] = 157 */ {__glXDisp_GetMinmax, __glXDispSwap_GetMinmax}, + /* [ 102] = 158 */ {__glXDisp_GetMinmaxParameterfv, __glXDispSwap_GetMinmaxParameterfv}, + /* [ 103] = 159 */ {__glXDisp_GetMinmaxParameteriv, __glXDispSwap_GetMinmaxParameteriv}, + /* [ 104] = 160 */ {__glXDisp_GetCompressedTexImageARB, __glXDispSwap_GetCompressedTexImageARB}, + /* [ 105] = 161 */ {__glXDisp_DeleteQueriesARB, __glXDispSwap_DeleteQueriesARB}, + /* [ 106] = 162 */ {__glXDisp_GenQueriesARB, __glXDispSwap_GenQueriesARB}, + /* [ 107] = 163 */ {__glXDisp_IsQueryARB, __glXDispSwap_IsQueryARB}, + /* [ 108] = 164 */ {__glXDisp_GetQueryivARB, __glXDispSwap_GetQueryivARB}, + /* [ 109] = 165 */ {__glXDisp_GetQueryObjectivARB, __glXDispSwap_GetQueryObjectivARB}, + /* [ 110] = 166 */ {__glXDisp_GetQueryObjectuivARB, __glXDispSwap_GetQueryObjectuivARB}, + /* [ 111] = 167 */ {NULL, NULL}, +}; + +const struct __glXDispatchInfo Single_dispatch_info = { + 8, + Single_dispatch_tree, + Single_function_table, + NULL, + NULL +}; + +/*****************************************************************/ +/* tree depth = 8 */ +static const int_fast16_t Render_dispatch_tree[95] = { + /* [0] -> opcode range [0, 8192], node depth 1 */ + 2, + 5, + 31, + 54, + EMPTY_LEAF, + + /* [5] -> opcode range [0, 2048], node depth 2 */ + 1, + 8, + EMPTY_LEAF, + + /* [8] -> opcode range [0, 1024], node depth 3 */ + 1, + 11, + EMPTY_LEAF, + + /* [11] -> opcode range [0, 512], node depth 4 */ + 1, + 14, + EMPTY_LEAF, + + /* [14] -> opcode range [0, 256], node depth 5 */ + 4, + LEAF(0), + LEAF(16), + LEAF(32), + LEAF(48), + LEAF(64), + LEAF(80), + LEAF(96), + LEAF(112), + LEAF(128), + LEAF(144), + LEAF(160), + LEAF(176), + LEAF(192), + LEAF(208), + LEAF(224), + EMPTY_LEAF, + + /* [31] -> opcode range [2048, 4096], node depth 2 */ + 1, + 34, + EMPTY_LEAF, + + /* [34] -> opcode range [2048, 3072], node depth 3 */ + 1, + 37, + EMPTY_LEAF, + + /* [37] -> opcode range [2048, 2560], node depth 4 */ + 1, + 40, + EMPTY_LEAF, + + /* [40] -> opcode range [2048, 2304], node depth 5 */ + 1, + 43, + EMPTY_LEAF, + + /* [43] -> opcode range [2048, 2176], node depth 6 */ + 1, + 46, + EMPTY_LEAF, + + /* [46] -> opcode range [2048, 2112], node depth 7 */ + 1, + 49, + EMPTY_LEAF, + + /* [49] -> opcode range [2048, 2080], node depth 8 */ + 2, + LEAF(240), + LEAF(248), + LEAF(256), + EMPTY_LEAF, + + /* [54] -> opcode range [4096, 6144], node depth 2 */ + 1, + 57, + EMPTY_LEAF, + + /* [57] -> opcode range [4096, 5120], node depth 3 */ + 1, + 60, + EMPTY_LEAF, + + /* [60] -> opcode range [4096, 4608], node depth 4 */ + 1, + 63, + EMPTY_LEAF, + + /* [63] -> opcode range [4096, 4352], node depth 5 */ + 4, + LEAF(264), + LEAF(280), + 80, + EMPTY_LEAF, + EMPTY_LEAF, + LEAF(296), + LEAF(312), + LEAF(328), + LEAF(344), + EMPTY_LEAF, + 83, + 86, + EMPTY_LEAF, + 89, + 92, + EMPTY_LEAF, + + /* [80] -> opcode range [4128, 4144], node depth 6 */ + 1, + LEAF(360), + EMPTY_LEAF, + + /* [83] -> opcode range [4256, 4272], node depth 6 */ + 1, + EMPTY_LEAF, + LEAF(368), + + /* [86] -> opcode range [4272, 4288], node depth 6 */ + 1, + LEAF(376), + EMPTY_LEAF, + + /* [89] -> opcode range [4304, 4320], node depth 6 */ + 1, + EMPTY_LEAF, + LEAF(384), + + /* [92] -> opcode range [4320, 4336], node depth 6 */ + 1, + LEAF(392), + EMPTY_LEAF, + +}; + +static const void *Render_function_table[400][2] = { + /* [ 0] = 0 */ {NULL, NULL}, + /* [ 1] = 1 */ {__glXDisp_CallList, __glXDispSwap_CallList}, + /* [ 2] = 2 */ {__glXDisp_CallLists, __glXDispSwap_CallLists}, + /* [ 3] = 3 */ {__glXDisp_ListBase, __glXDispSwap_ListBase}, + /* [ 4] = 4 */ {__glXDisp_Begin, __glXDispSwap_Begin}, + /* [ 5] = 5 */ {__glXDisp_Bitmap, __glXDispSwap_Bitmap}, + /* [ 6] = 6 */ {__glXDisp_Color3bv, __glXDispSwap_Color3bv}, + /* [ 7] = 7 */ {__glXDisp_Color3dv, __glXDispSwap_Color3dv}, + /* [ 8] = 8 */ {__glXDisp_Color3fv, __glXDispSwap_Color3fv}, + /* [ 9] = 9 */ {__glXDisp_Color3iv, __glXDispSwap_Color3iv}, + /* [ 10] = 10 */ {__glXDisp_Color3sv, __glXDispSwap_Color3sv}, + /* [ 11] = 11 */ {__glXDisp_Color3ubv, __glXDispSwap_Color3ubv}, + /* [ 12] = 12 */ {__glXDisp_Color3uiv, __glXDispSwap_Color3uiv}, + /* [ 13] = 13 */ {__glXDisp_Color3usv, __glXDispSwap_Color3usv}, + /* [ 14] = 14 */ {__glXDisp_Color4bv, __glXDispSwap_Color4bv}, + /* [ 15] = 15 */ {__glXDisp_Color4dv, __glXDispSwap_Color4dv}, + /* [ 16] = 16 */ {__glXDisp_Color4fv, __glXDispSwap_Color4fv}, + /* [ 17] = 17 */ {__glXDisp_Color4iv, __glXDispSwap_Color4iv}, + /* [ 18] = 18 */ {__glXDisp_Color4sv, __glXDispSwap_Color4sv}, + /* [ 19] = 19 */ {__glXDisp_Color4ubv, __glXDispSwap_Color4ubv}, + /* [ 20] = 20 */ {__glXDisp_Color4uiv, __glXDispSwap_Color4uiv}, + /* [ 21] = 21 */ {__glXDisp_Color4usv, __glXDispSwap_Color4usv}, + /* [ 22] = 22 */ {__glXDisp_EdgeFlagv, __glXDispSwap_EdgeFlagv}, + /* [ 23] = 23 */ {__glXDisp_End, __glXDispSwap_End}, + /* [ 24] = 24 */ {__glXDisp_Indexdv, __glXDispSwap_Indexdv}, + /* [ 25] = 25 */ {__glXDisp_Indexfv, __glXDispSwap_Indexfv}, + /* [ 26] = 26 */ {__glXDisp_Indexiv, __glXDispSwap_Indexiv}, + /* [ 27] = 27 */ {__glXDisp_Indexsv, __glXDispSwap_Indexsv}, + /* [ 28] = 28 */ {__glXDisp_Normal3bv, __glXDispSwap_Normal3bv}, + /* [ 29] = 29 */ {__glXDisp_Normal3dv, __glXDispSwap_Normal3dv}, + /* [ 30] = 30 */ {__glXDisp_Normal3fv, __glXDispSwap_Normal3fv}, + /* [ 31] = 31 */ {__glXDisp_Normal3iv, __glXDispSwap_Normal3iv}, + /* [ 32] = 32 */ {__glXDisp_Normal3sv, __glXDispSwap_Normal3sv}, + /* [ 33] = 33 */ {__glXDisp_RasterPos2dv, __glXDispSwap_RasterPos2dv}, + /* [ 34] = 34 */ {__glXDisp_RasterPos2fv, __glXDispSwap_RasterPos2fv}, + /* [ 35] = 35 */ {__glXDisp_RasterPos2iv, __glXDispSwap_RasterPos2iv}, + /* [ 36] = 36 */ {__glXDisp_RasterPos2sv, __glXDispSwap_RasterPos2sv}, + /* [ 37] = 37 */ {__glXDisp_RasterPos3dv, __glXDispSwap_RasterPos3dv}, + /* [ 38] = 38 */ {__glXDisp_RasterPos3fv, __glXDispSwap_RasterPos3fv}, + /* [ 39] = 39 */ {__glXDisp_RasterPos3iv, __glXDispSwap_RasterPos3iv}, + /* [ 40] = 40 */ {__glXDisp_RasterPos3sv, __glXDispSwap_RasterPos3sv}, + /* [ 41] = 41 */ {__glXDisp_RasterPos4dv, __glXDispSwap_RasterPos4dv}, + /* [ 42] = 42 */ {__glXDisp_RasterPos4fv, __glXDispSwap_RasterPos4fv}, + /* [ 43] = 43 */ {__glXDisp_RasterPos4iv, __glXDispSwap_RasterPos4iv}, + /* [ 44] = 44 */ {__glXDisp_RasterPos4sv, __glXDispSwap_RasterPos4sv}, + /* [ 45] = 45 */ {__glXDisp_Rectdv, __glXDispSwap_Rectdv}, + /* [ 46] = 46 */ {__glXDisp_Rectfv, __glXDispSwap_Rectfv}, + /* [ 47] = 47 */ {__glXDisp_Rectiv, __glXDispSwap_Rectiv}, + /* [ 48] = 48 */ {__glXDisp_Rectsv, __glXDispSwap_Rectsv}, + /* [ 49] = 49 */ {__glXDisp_TexCoord1dv, __glXDispSwap_TexCoord1dv}, + /* [ 50] = 50 */ {__glXDisp_TexCoord1fv, __glXDispSwap_TexCoord1fv}, + /* [ 51] = 51 */ {__glXDisp_TexCoord1iv, __glXDispSwap_TexCoord1iv}, + /* [ 52] = 52 */ {__glXDisp_TexCoord1sv, __glXDispSwap_TexCoord1sv}, + /* [ 53] = 53 */ {__glXDisp_TexCoord2dv, __glXDispSwap_TexCoord2dv}, + /* [ 54] = 54 */ {__glXDisp_TexCoord2fv, __glXDispSwap_TexCoord2fv}, + /* [ 55] = 55 */ {__glXDisp_TexCoord2iv, __glXDispSwap_TexCoord2iv}, + /* [ 56] = 56 */ {__glXDisp_TexCoord2sv, __glXDispSwap_TexCoord2sv}, + /* [ 57] = 57 */ {__glXDisp_TexCoord3dv, __glXDispSwap_TexCoord3dv}, + /* [ 58] = 58 */ {__glXDisp_TexCoord3fv, __glXDispSwap_TexCoord3fv}, + /* [ 59] = 59 */ {__glXDisp_TexCoord3iv, __glXDispSwap_TexCoord3iv}, + /* [ 60] = 60 */ {__glXDisp_TexCoord3sv, __glXDispSwap_TexCoord3sv}, + /* [ 61] = 61 */ {__glXDisp_TexCoord4dv, __glXDispSwap_TexCoord4dv}, + /* [ 62] = 62 */ {__glXDisp_TexCoord4fv, __glXDispSwap_TexCoord4fv}, + /* [ 63] = 63 */ {__glXDisp_TexCoord4iv, __glXDispSwap_TexCoord4iv}, + /* [ 64] = 64 */ {__glXDisp_TexCoord4sv, __glXDispSwap_TexCoord4sv}, + /* [ 65] = 65 */ {__glXDisp_Vertex2dv, __glXDispSwap_Vertex2dv}, + /* [ 66] = 66 */ {__glXDisp_Vertex2fv, __glXDispSwap_Vertex2fv}, + /* [ 67] = 67 */ {__glXDisp_Vertex2iv, __glXDispSwap_Vertex2iv}, + /* [ 68] = 68 */ {__glXDisp_Vertex2sv, __glXDispSwap_Vertex2sv}, + /* [ 69] = 69 */ {__glXDisp_Vertex3dv, __glXDispSwap_Vertex3dv}, + /* [ 70] = 70 */ {__glXDisp_Vertex3fv, __glXDispSwap_Vertex3fv}, + /* [ 71] = 71 */ {__glXDisp_Vertex3iv, __glXDispSwap_Vertex3iv}, + /* [ 72] = 72 */ {__glXDisp_Vertex3sv, __glXDispSwap_Vertex3sv}, + /* [ 73] = 73 */ {__glXDisp_Vertex4dv, __glXDispSwap_Vertex4dv}, + /* [ 74] = 74 */ {__glXDisp_Vertex4fv, __glXDispSwap_Vertex4fv}, + /* [ 75] = 75 */ {__glXDisp_Vertex4iv, __glXDispSwap_Vertex4iv}, + /* [ 76] = 76 */ {__glXDisp_Vertex4sv, __glXDispSwap_Vertex4sv}, + /* [ 77] = 77 */ {__glXDisp_ClipPlane, __glXDispSwap_ClipPlane}, + /* [ 78] = 78 */ {__glXDisp_ColorMaterial, __glXDispSwap_ColorMaterial}, + /* [ 79] = 79 */ {__glXDisp_CullFace, __glXDispSwap_CullFace}, + /* [ 80] = 80 */ {__glXDisp_Fogf, __glXDispSwap_Fogf}, + /* [ 81] = 81 */ {__glXDisp_Fogfv, __glXDispSwap_Fogfv}, + /* [ 82] = 82 */ {__glXDisp_Fogi, __glXDispSwap_Fogi}, + /* [ 83] = 83 */ {__glXDisp_Fogiv, __glXDispSwap_Fogiv}, + /* [ 84] = 84 */ {__glXDisp_FrontFace, __glXDispSwap_FrontFace}, + /* [ 85] = 85 */ {__glXDisp_Hint, __glXDispSwap_Hint}, + /* [ 86] = 86 */ {__glXDisp_Lightf, __glXDispSwap_Lightf}, + /* [ 87] = 87 */ {__glXDisp_Lightfv, __glXDispSwap_Lightfv}, + /* [ 88] = 88 */ {__glXDisp_Lighti, __glXDispSwap_Lighti}, + /* [ 89] = 89 */ {__glXDisp_Lightiv, __glXDispSwap_Lightiv}, + /* [ 90] = 90 */ {__glXDisp_LightModelf, __glXDispSwap_LightModelf}, + /* [ 91] = 91 */ {__glXDisp_LightModelfv, __glXDispSwap_LightModelfv}, + /* [ 92] = 92 */ {__glXDisp_LightModeli, __glXDispSwap_LightModeli}, + /* [ 93] = 93 */ {__glXDisp_LightModeliv, __glXDispSwap_LightModeliv}, + /* [ 94] = 94 */ {__glXDisp_LineStipple, __glXDispSwap_LineStipple}, + /* [ 95] = 95 */ {__glXDisp_LineWidth, __glXDispSwap_LineWidth}, + /* [ 96] = 96 */ {__glXDisp_Materialf, __glXDispSwap_Materialf}, + /* [ 97] = 97 */ {__glXDisp_Materialfv, __glXDispSwap_Materialfv}, + /* [ 98] = 98 */ {__glXDisp_Materiali, __glXDispSwap_Materiali}, + /* [ 99] = 99 */ {__glXDisp_Materialiv, __glXDispSwap_Materialiv}, + /* [ 100] = 100 */ {__glXDisp_PointSize, __glXDispSwap_PointSize}, + /* [ 101] = 101 */ {__glXDisp_PolygonMode, __glXDispSwap_PolygonMode}, + /* [ 102] = 102 */ {__glXDisp_PolygonStipple, __glXDispSwap_PolygonStipple}, + /* [ 103] = 103 */ {__glXDisp_Scissor, __glXDispSwap_Scissor}, + /* [ 104] = 104 */ {__glXDisp_ShadeModel, __glXDispSwap_ShadeModel}, + /* [ 105] = 105 */ {__glXDisp_TexParameterf, __glXDispSwap_TexParameterf}, + /* [ 106] = 106 */ {__glXDisp_TexParameterfv, __glXDispSwap_TexParameterfv}, + /* [ 107] = 107 */ {__glXDisp_TexParameteri, __glXDispSwap_TexParameteri}, + /* [ 108] = 108 */ {__glXDisp_TexParameteriv, __glXDispSwap_TexParameteriv}, + /* [ 109] = 109 */ {__glXDisp_TexImage1D, __glXDispSwap_TexImage1D}, + /* [ 110] = 110 */ {__glXDisp_TexImage2D, __glXDispSwap_TexImage2D}, + /* [ 111] = 111 */ {__glXDisp_TexEnvf, __glXDispSwap_TexEnvf}, + /* [ 112] = 112 */ {__glXDisp_TexEnvfv, __glXDispSwap_TexEnvfv}, + /* [ 113] = 113 */ {__glXDisp_TexEnvi, __glXDispSwap_TexEnvi}, + /* [ 114] = 114 */ {__glXDisp_TexEnviv, __glXDispSwap_TexEnviv}, + /* [ 115] = 115 */ {__glXDisp_TexGend, __glXDispSwap_TexGend}, + /* [ 116] = 116 */ {__glXDisp_TexGendv, __glXDispSwap_TexGendv}, + /* [ 117] = 117 */ {__glXDisp_TexGenf, __glXDispSwap_TexGenf}, + /* [ 118] = 118 */ {__glXDisp_TexGenfv, __glXDispSwap_TexGenfv}, + /* [ 119] = 119 */ {__glXDisp_TexGeni, __glXDispSwap_TexGeni}, + /* [ 120] = 120 */ {__glXDisp_TexGeniv, __glXDispSwap_TexGeniv}, + /* [ 121] = 121 */ {__glXDisp_InitNames, __glXDispSwap_InitNames}, + /* [ 122] = 122 */ {__glXDisp_LoadName, __glXDispSwap_LoadName}, + /* [ 123] = 123 */ {__glXDisp_PassThrough, __glXDispSwap_PassThrough}, + /* [ 124] = 124 */ {__glXDisp_PopName, __glXDispSwap_PopName}, + /* [ 125] = 125 */ {__glXDisp_PushName, __glXDispSwap_PushName}, + /* [ 126] = 126 */ {__glXDisp_DrawBuffer, __glXDispSwap_DrawBuffer}, + /* [ 127] = 127 */ {__glXDisp_Clear, __glXDispSwap_Clear}, + /* [ 128] = 128 */ {__glXDisp_ClearAccum, __glXDispSwap_ClearAccum}, + /* [ 129] = 129 */ {__glXDisp_ClearIndex, __glXDispSwap_ClearIndex}, + /* [ 130] = 130 */ {__glXDisp_ClearColor, __glXDispSwap_ClearColor}, + /* [ 131] = 131 */ {__glXDisp_ClearStencil, __glXDispSwap_ClearStencil}, + /* [ 132] = 132 */ {__glXDisp_ClearDepth, __glXDispSwap_ClearDepth}, + /* [ 133] = 133 */ {__glXDisp_StencilMask, __glXDispSwap_StencilMask}, + /* [ 134] = 134 */ {__glXDisp_ColorMask, __glXDispSwap_ColorMask}, + /* [ 135] = 135 */ {__glXDisp_DepthMask, __glXDispSwap_DepthMask}, + /* [ 136] = 136 */ {__glXDisp_IndexMask, __glXDispSwap_IndexMask}, + /* [ 137] = 137 */ {__glXDisp_Accum, __glXDispSwap_Accum}, + /* [ 138] = 138 */ {__glXDisp_Disable, __glXDispSwap_Disable}, + /* [ 139] = 139 */ {__glXDisp_Enable, __glXDispSwap_Enable}, + /* [ 140] = 140 */ {NULL, NULL}, + /* [ 141] = 141 */ {__glXDisp_PopAttrib, __glXDispSwap_PopAttrib}, + /* [ 142] = 142 */ {__glXDisp_PushAttrib, __glXDispSwap_PushAttrib}, + /* [ 143] = 143 */ {__glXDisp_Map1d, __glXDispSwap_Map1d}, + /* [ 144] = 144 */ {__glXDisp_Map1f, __glXDispSwap_Map1f}, + /* [ 145] = 145 */ {__glXDisp_Map2d, __glXDispSwap_Map2d}, + /* [ 146] = 146 */ {__glXDisp_Map2f, __glXDispSwap_Map2f}, + /* [ 147] = 147 */ {__glXDisp_MapGrid1d, __glXDispSwap_MapGrid1d}, + /* [ 148] = 148 */ {__glXDisp_MapGrid1f, __glXDispSwap_MapGrid1f}, + /* [ 149] = 149 */ {__glXDisp_MapGrid2d, __glXDispSwap_MapGrid2d}, + /* [ 150] = 150 */ {__glXDisp_MapGrid2f, __glXDispSwap_MapGrid2f}, + /* [ 151] = 151 */ {__glXDisp_EvalCoord1dv, __glXDispSwap_EvalCoord1dv}, + /* [ 152] = 152 */ {__glXDisp_EvalCoord1fv, __glXDispSwap_EvalCoord1fv}, + /* [ 153] = 153 */ {__glXDisp_EvalCoord2dv, __glXDispSwap_EvalCoord2dv}, + /* [ 154] = 154 */ {__glXDisp_EvalCoord2fv, __glXDispSwap_EvalCoord2fv}, + /* [ 155] = 155 */ {__glXDisp_EvalMesh1, __glXDispSwap_EvalMesh1}, + /* [ 156] = 156 */ {__glXDisp_EvalPoint1, __glXDispSwap_EvalPoint1}, + /* [ 157] = 157 */ {__glXDisp_EvalMesh2, __glXDispSwap_EvalMesh2}, + /* [ 158] = 158 */ {__glXDisp_EvalPoint2, __glXDispSwap_EvalPoint2}, + /* [ 159] = 159 */ {__glXDisp_AlphaFunc, __glXDispSwap_AlphaFunc}, + /* [ 160] = 160 */ {__glXDisp_BlendFunc, __glXDispSwap_BlendFunc}, + /* [ 161] = 161 */ {__glXDisp_LogicOp, __glXDispSwap_LogicOp}, + /* [ 162] = 162 */ {__glXDisp_StencilFunc, __glXDispSwap_StencilFunc}, + /* [ 163] = 163 */ {__glXDisp_StencilOp, __glXDispSwap_StencilOp}, + /* [ 164] = 164 */ {__glXDisp_DepthFunc, __glXDispSwap_DepthFunc}, + /* [ 165] = 165 */ {__glXDisp_PixelZoom, __glXDispSwap_PixelZoom}, + /* [ 166] = 166 */ {__glXDisp_PixelTransferf, __glXDispSwap_PixelTransferf}, + /* [ 167] = 167 */ {__glXDisp_PixelTransferi, __glXDispSwap_PixelTransferi}, + /* [ 168] = 168 */ {__glXDisp_PixelMapfv, __glXDispSwap_PixelMapfv}, + /* [ 169] = 169 */ {__glXDisp_PixelMapuiv, __glXDispSwap_PixelMapuiv}, + /* [ 170] = 170 */ {__glXDisp_PixelMapusv, __glXDispSwap_PixelMapusv}, + /* [ 171] = 171 */ {__glXDisp_ReadBuffer, __glXDispSwap_ReadBuffer}, + /* [ 172] = 172 */ {__glXDisp_CopyPixels, __glXDispSwap_CopyPixels}, + /* [ 173] = 173 */ {__glXDisp_DrawPixels, __glXDispSwap_DrawPixels}, + /* [ 174] = 174 */ {__glXDisp_DepthRange, __glXDispSwap_DepthRange}, + /* [ 175] = 175 */ {__glXDisp_Frustum, __glXDispSwap_Frustum}, + /* [ 176] = 176 */ {__glXDisp_LoadIdentity, __glXDispSwap_LoadIdentity}, + /* [ 177] = 177 */ {__glXDisp_LoadMatrixf, __glXDispSwap_LoadMatrixf}, + /* [ 178] = 178 */ {__glXDisp_LoadMatrixd, __glXDispSwap_LoadMatrixd}, + /* [ 179] = 179 */ {__glXDisp_MatrixMode, __glXDispSwap_MatrixMode}, + /* [ 180] = 180 */ {__glXDisp_MultMatrixf, __glXDispSwap_MultMatrixf}, + /* [ 181] = 181 */ {__glXDisp_MultMatrixd, __glXDispSwap_MultMatrixd}, + /* [ 182] = 182 */ {__glXDisp_Ortho, __glXDispSwap_Ortho}, + /* [ 183] = 183 */ {__glXDisp_PopMatrix, __glXDispSwap_PopMatrix}, + /* [ 184] = 184 */ {__glXDisp_PushMatrix, __glXDispSwap_PushMatrix}, + /* [ 185] = 185 */ {__glXDisp_Rotated, __glXDispSwap_Rotated}, + /* [ 186] = 186 */ {__glXDisp_Rotatef, __glXDispSwap_Rotatef}, + /* [ 187] = 187 */ {__glXDisp_Scaled, __glXDispSwap_Scaled}, + /* [ 188] = 188 */ {__glXDisp_Scalef, __glXDispSwap_Scalef}, + /* [ 189] = 189 */ {__glXDisp_Translated, __glXDispSwap_Translated}, + /* [ 190] = 190 */ {__glXDisp_Translatef, __glXDispSwap_Translatef}, + /* [ 191] = 191 */ {__glXDisp_Viewport, __glXDispSwap_Viewport}, + /* [ 192] = 192 */ {__glXDisp_PolygonOffset, __glXDispSwap_PolygonOffset}, + /* [ 193] = 193 */ {__glXDisp_DrawArrays, __glXDispSwap_DrawArrays}, + /* [ 194] = 194 */ {__glXDisp_Indexubv, __glXDispSwap_Indexubv}, + /* [ 195] = 195 */ {__glXDisp_ColorSubTable, __glXDispSwap_ColorSubTable}, + /* [ 196] = 196 */ {__glXDisp_CopyColorSubTable, __glXDispSwap_CopyColorSubTable}, + /* [ 197] = 197 */ {__glXDisp_ActiveTextureARB, __glXDispSwap_ActiveTextureARB}, + /* [ 198] = 198 */ {__glXDisp_MultiTexCoord1dvARB, __glXDispSwap_MultiTexCoord1dvARB}, + /* [ 199] = 199 */ {__glXDisp_MultiTexCoord1fvARB, __glXDispSwap_MultiTexCoord1fvARB}, + /* [ 200] = 200 */ {__glXDisp_MultiTexCoord1ivARB, __glXDispSwap_MultiTexCoord1ivARB}, + /* [ 201] = 201 */ {__glXDisp_MultiTexCoord1svARB, __glXDispSwap_MultiTexCoord1svARB}, + /* [ 202] = 202 */ {__glXDisp_MultiTexCoord2dvARB, __glXDispSwap_MultiTexCoord2dvARB}, + /* [ 203] = 203 */ {__glXDisp_MultiTexCoord2fvARB, __glXDispSwap_MultiTexCoord2fvARB}, + /* [ 204] = 204 */ {__glXDisp_MultiTexCoord2ivARB, __glXDispSwap_MultiTexCoord2ivARB}, + /* [ 205] = 205 */ {__glXDisp_MultiTexCoord2svARB, __glXDispSwap_MultiTexCoord2svARB}, + /* [ 206] = 206 */ {__glXDisp_MultiTexCoord3dvARB, __glXDispSwap_MultiTexCoord3dvARB}, + /* [ 207] = 207 */ {__glXDisp_MultiTexCoord3fvARB, __glXDispSwap_MultiTexCoord3fvARB}, + /* [ 208] = 208 */ {__glXDisp_MultiTexCoord3ivARB, __glXDispSwap_MultiTexCoord3ivARB}, + /* [ 209] = 209 */ {__glXDisp_MultiTexCoord3svARB, __glXDispSwap_MultiTexCoord3svARB}, + /* [ 210] = 210 */ {__glXDisp_MultiTexCoord4dvARB, __glXDispSwap_MultiTexCoord4dvARB}, + /* [ 211] = 211 */ {__glXDisp_MultiTexCoord4fvARB, __glXDispSwap_MultiTexCoord4fvARB}, + /* [ 212] = 212 */ {__glXDisp_MultiTexCoord4ivARB, __glXDispSwap_MultiTexCoord4ivARB}, + /* [ 213] = 213 */ {__glXDisp_MultiTexCoord4svARB, __glXDispSwap_MultiTexCoord4svARB}, + /* [ 214] = 214 */ {__glXDisp_CompressedTexImage1DARB, __glXDispSwap_CompressedTexImage1DARB}, + /* [ 215] = 215 */ {__glXDisp_CompressedTexImage2DARB, __glXDispSwap_CompressedTexImage2DARB}, + /* [ 216] = 216 */ {__glXDisp_CompressedTexImage3DARB, __glXDispSwap_CompressedTexImage3DARB}, + /* [ 217] = 217 */ {__glXDisp_CompressedTexSubImage1DARB, __glXDispSwap_CompressedTexSubImage1DARB}, + /* [ 218] = 218 */ {__glXDisp_CompressedTexSubImage2DARB, __glXDispSwap_CompressedTexSubImage2DARB}, + /* [ 219] = 219 */ {__glXDisp_CompressedTexSubImage3DARB, __glXDispSwap_CompressedTexSubImage3DARB}, + /* [ 220] = 220 */ {NULL, NULL}, + /* [ 221] = 221 */ {NULL, NULL}, + /* [ 222] = 222 */ {NULL, NULL}, + /* [ 223] = 223 */ {NULL, NULL}, + /* [ 224] = 224 */ {NULL, NULL}, + /* [ 225] = 225 */ {NULL, NULL}, + /* [ 226] = 226 */ {NULL, NULL}, + /* [ 227] = 227 */ {NULL, NULL}, + /* [ 228] = 228 */ {NULL, NULL}, + /* [ 229] = 229 */ {__glXDisp_SampleCoverageARB, __glXDispSwap_SampleCoverageARB}, + /* [ 230] = 230 */ {__glXDisp_WindowPos3fvMESA, __glXDispSwap_WindowPos3fvMESA}, + /* [ 231] = 231 */ {__glXDisp_BeginQueryARB, __glXDispSwap_BeginQueryARB}, + /* [ 232] = 232 */ {__glXDisp_EndQueryARB, __glXDispSwap_EndQueryARB}, + /* [ 233] = 233 */ {__glXDisp_DrawBuffersARB, __glXDispSwap_DrawBuffersARB}, + /* [ 234] = 234 */ {NULL, NULL}, + /* [ 235] = 235 */ {NULL, NULL}, + /* [ 236] = 236 */ {NULL, NULL}, + /* [ 237] = 237 */ {NULL, NULL}, + /* [ 238] = 238 */ {NULL, NULL}, + /* [ 239] = 239 */ {NULL, NULL}, + /* [ 240] = 2048 */ {__glXDisp_SampleMaskSGIS, __glXDispSwap_SampleMaskSGIS}, + /* [ 241] = 2049 */ {__glXDisp_SamplePatternSGIS, __glXDispSwap_SamplePatternSGIS}, + /* [ 242] = 2050 */ {NULL, NULL}, + /* [ 243] = 2051 */ {NULL, NULL}, + /* [ 244] = 2052 */ {NULL, NULL}, + /* [ 245] = 2053 */ {__glXDisp_ColorTable, __glXDispSwap_ColorTable}, + /* [ 246] = 2054 */ {__glXDisp_ColorTableParameterfv, __glXDispSwap_ColorTableParameterfv}, + /* [ 247] = 2055 */ {__glXDisp_ColorTableParameteriv, __glXDispSwap_ColorTableParameteriv}, + /* [ 248] = 2056 */ {__glXDisp_CopyColorTable, __glXDispSwap_CopyColorTable}, + /* [ 249] = 2057 */ {NULL, NULL}, + /* [ 250] = 2058 */ {NULL, NULL}, + /* [ 251] = 2059 */ {NULL, NULL}, + /* [ 252] = 2060 */ {NULL, NULL}, + /* [ 253] = 2061 */ {NULL, NULL}, + /* [ 254] = 2062 */ {NULL, NULL}, + /* [ 255] = 2063 */ {NULL, NULL}, + /* [ 256] = 2064 */ {NULL, NULL}, + /* [ 257] = 2065 */ {__glXDisp_PointParameterfEXT, __glXDispSwap_PointParameterfEXT}, + /* [ 258] = 2066 */ {__glXDisp_PointParameterfvEXT, __glXDispSwap_PointParameterfvEXT}, + /* [ 259] = 2067 */ {NULL, NULL}, + /* [ 260] = 2068 */ {NULL, NULL}, + /* [ 261] = 2069 */ {NULL, NULL}, + /* [ 262] = 2070 */ {NULL, NULL}, + /* [ 263] = 2071 */ {NULL, NULL}, + /* [ 264] = 4096 */ {__glXDisp_BlendColor, __glXDispSwap_BlendColor}, + /* [ 265] = 4097 */ {__glXDisp_BlendEquation, __glXDispSwap_BlendEquation}, + /* [ 266] = 4098 */ {NULL, NULL}, + /* [ 267] = 4099 */ {__glXDisp_TexSubImage1D, __glXDispSwap_TexSubImage1D}, + /* [ 268] = 4100 */ {__glXDisp_TexSubImage2D, __glXDispSwap_TexSubImage2D}, + /* [ 269] = 4101 */ {__glXDisp_ConvolutionFilter1D, __glXDispSwap_ConvolutionFilter1D}, + /* [ 270] = 4102 */ {__glXDisp_ConvolutionFilter2D, __glXDispSwap_ConvolutionFilter2D}, + /* [ 271] = 4103 */ {__glXDisp_ConvolutionParameterf, __glXDispSwap_ConvolutionParameterf}, + /* [ 272] = 4104 */ {__glXDisp_ConvolutionParameterfv, __glXDispSwap_ConvolutionParameterfv}, + /* [ 273] = 4105 */ {__glXDisp_ConvolutionParameteri, __glXDispSwap_ConvolutionParameteri}, + /* [ 274] = 4106 */ {__glXDisp_ConvolutionParameteriv, __glXDispSwap_ConvolutionParameteriv}, + /* [ 275] = 4107 */ {__glXDisp_CopyConvolutionFilter1D, __glXDispSwap_CopyConvolutionFilter1D}, + /* [ 276] = 4108 */ {__glXDisp_CopyConvolutionFilter2D, __glXDispSwap_CopyConvolutionFilter2D}, + /* [ 277] = 4109 */ {__glXDisp_SeparableFilter2D, __glXDispSwap_SeparableFilter2D}, + /* [ 278] = 4110 */ {__glXDisp_Histogram, __glXDispSwap_Histogram}, + /* [ 279] = 4111 */ {__glXDisp_Minmax, __glXDispSwap_Minmax}, + /* [ 280] = 4112 */ {__glXDisp_ResetHistogram, __glXDispSwap_ResetHistogram}, + /* [ 281] = 4113 */ {__glXDisp_ResetMinmax, __glXDispSwap_ResetMinmax}, + /* [ 282] = 4114 */ {__glXDisp_TexImage3D, __glXDispSwap_TexImage3D}, + /* [ 283] = 4115 */ {__glXDisp_TexSubImage3D, __glXDispSwap_TexSubImage3D}, + /* [ 284] = 4116 */ {NULL, NULL}, + /* [ 285] = 4117 */ {__glXDisp_BindTexture, __glXDispSwap_BindTexture}, + /* [ 286] = 4118 */ {__glXDisp_PrioritizeTextures, __glXDispSwap_PrioritizeTextures}, + /* [ 287] = 4119 */ {__glXDisp_CopyTexImage1D, __glXDispSwap_CopyTexImage1D}, + /* [ 288] = 4120 */ {__glXDisp_CopyTexImage2D, __glXDispSwap_CopyTexImage2D}, + /* [ 289] = 4121 */ {__glXDisp_CopyTexSubImage1D, __glXDispSwap_CopyTexSubImage1D}, + /* [ 290] = 4122 */ {__glXDisp_CopyTexSubImage2D, __glXDispSwap_CopyTexSubImage2D}, + /* [ 291] = 4123 */ {__glXDisp_CopyTexSubImage3D, __glXDispSwap_CopyTexSubImage3D}, + /* [ 292] = 4124 */ {__glXDisp_FogCoordfvEXT, __glXDispSwap_FogCoordfvEXT}, + /* [ 293] = 4125 */ {__glXDisp_FogCoorddvEXT, __glXDispSwap_FogCoorddvEXT}, + /* [ 294] = 4126 */ {__glXDisp_SecondaryColor3bvEXT, __glXDispSwap_SecondaryColor3bvEXT}, + /* [ 295] = 4127 */ {__glXDisp_SecondaryColor3svEXT, __glXDispSwap_SecondaryColor3svEXT}, + /* [ 296] = 4176 */ {NULL, NULL}, + /* [ 297] = 4177 */ {NULL, NULL}, + /* [ 298] = 4178 */ {NULL, NULL}, + /* [ 299] = 4179 */ {NULL, NULL}, + /* [ 300] = 4180 */ {__glXDisp_BindProgramNV, __glXDispSwap_BindProgramNV}, + /* [ 301] = 4181 */ {__glXDisp_ExecuteProgramNV, __glXDispSwap_ExecuteProgramNV}, + /* [ 302] = 4182 */ {__glXDisp_RequestResidentProgramsNV, __glXDispSwap_RequestResidentProgramsNV}, + /* [ 303] = 4183 */ {__glXDisp_LoadProgramNV, __glXDispSwap_LoadProgramNV}, + /* [ 304] = 4184 */ {__glXDisp_ProgramEnvParameter4fvARB, __glXDispSwap_ProgramEnvParameter4fvARB}, + /* [ 305] = 4185 */ {__glXDisp_ProgramEnvParameter4dvARB, __glXDispSwap_ProgramEnvParameter4dvARB}, + /* [ 306] = 4186 */ {__glXDisp_ProgramParameters4fvNV, __glXDispSwap_ProgramParameters4fvNV}, + /* [ 307] = 4187 */ {__glXDisp_ProgramParameters4dvNV, __glXDispSwap_ProgramParameters4dvNV}, + /* [ 308] = 4188 */ {__glXDisp_TrackMatrixNV, __glXDispSwap_TrackMatrixNV}, + /* [ 309] = 4189 */ {__glXDisp_VertexAttrib1svARB, __glXDispSwap_VertexAttrib1svARB}, + /* [ 310] = 4190 */ {__glXDisp_VertexAttrib2svARB, __glXDispSwap_VertexAttrib2svARB}, + /* [ 311] = 4191 */ {__glXDisp_VertexAttrib3svARB, __glXDispSwap_VertexAttrib3svARB}, + /* [ 312] = 4192 */ {__glXDisp_VertexAttrib4svARB, __glXDispSwap_VertexAttrib4svARB}, + /* [ 313] = 4193 */ {__glXDisp_VertexAttrib1fvARB, __glXDispSwap_VertexAttrib1fvARB}, + /* [ 314] = 4194 */ {__glXDisp_VertexAttrib2fvARB, __glXDispSwap_VertexAttrib2fvARB}, + /* [ 315] = 4195 */ {__glXDisp_VertexAttrib3fvARB, __glXDispSwap_VertexAttrib3fvARB}, + /* [ 316] = 4196 */ {__glXDisp_VertexAttrib4fvARB, __glXDispSwap_VertexAttrib4fvARB}, + /* [ 317] = 4197 */ {__glXDisp_VertexAttrib1dvARB, __glXDispSwap_VertexAttrib1dvARB}, + /* [ 318] = 4198 */ {__glXDisp_VertexAttrib2dvARB, __glXDispSwap_VertexAttrib2dvARB}, + /* [ 319] = 4199 */ {__glXDisp_VertexAttrib3dvARB, __glXDispSwap_VertexAttrib3dvARB}, + /* [ 320] = 4200 */ {__glXDisp_VertexAttrib4dvARB, __glXDispSwap_VertexAttrib4dvARB}, + /* [ 321] = 4201 */ {__glXDisp_VertexAttrib4NubvARB, __glXDispSwap_VertexAttrib4NubvARB}, + /* [ 322] = 4202 */ {__glXDisp_VertexAttribs1svNV, __glXDispSwap_VertexAttribs1svNV}, + /* [ 323] = 4203 */ {__glXDisp_VertexAttribs2svNV, __glXDispSwap_VertexAttribs2svNV}, + /* [ 324] = 4204 */ {__glXDisp_VertexAttribs3svNV, __glXDispSwap_VertexAttribs3svNV}, + /* [ 325] = 4205 */ {__glXDisp_VertexAttribs4svNV, __glXDispSwap_VertexAttribs4svNV}, + /* [ 326] = 4206 */ {__glXDisp_VertexAttribs1fvNV, __glXDispSwap_VertexAttribs1fvNV}, + /* [ 327] = 4207 */ {__glXDisp_VertexAttribs2fvNV, __glXDispSwap_VertexAttribs2fvNV}, + /* [ 328] = 4208 */ {__glXDisp_VertexAttribs3fvNV, __glXDispSwap_VertexAttribs3fvNV}, + /* [ 329] = 4209 */ {__glXDisp_VertexAttribs4fvNV, __glXDispSwap_VertexAttribs4fvNV}, + /* [ 330] = 4210 */ {__glXDisp_VertexAttribs1dvNV, __glXDispSwap_VertexAttribs1dvNV}, + /* [ 331] = 4211 */ {__glXDisp_VertexAttribs2dvNV, __glXDispSwap_VertexAttribs2dvNV}, + /* [ 332] = 4212 */ {__glXDisp_VertexAttribs3dvNV, __glXDispSwap_VertexAttribs3dvNV}, + /* [ 333] = 4213 */ {__glXDisp_VertexAttribs4dvNV, __glXDispSwap_VertexAttribs4dvNV}, + /* [ 334] = 4214 */ {__glXDisp_VertexAttribs4ubvNV, __glXDispSwap_VertexAttribs4ubvNV}, + /* [ 335] = 4215 */ {__glXDisp_ProgramLocalParameter4fvARB, __glXDispSwap_ProgramLocalParameter4fvARB}, + /* [ 336] = 4216 */ {__glXDisp_ProgramLocalParameter4dvARB, __glXDispSwap_ProgramLocalParameter4dvARB}, + /* [ 337] = 4217 */ {__glXDisp_ProgramStringARB, __glXDispSwap_ProgramStringARB}, + /* [ 338] = 4218 */ {__glXDisp_ProgramNamedParameter4fvNV, __glXDispSwap_ProgramNamedParameter4fvNV}, + /* [ 339] = 4219 */ {__glXDisp_ProgramNamedParameter4dvNV, __glXDispSwap_ProgramNamedParameter4dvNV}, + /* [ 340] = 4220 */ {__glXDisp_ActiveStencilFaceEXT, __glXDispSwap_ActiveStencilFaceEXT}, + /* [ 341] = 4221 */ {__glXDisp_PointParameteriNV, __glXDispSwap_PointParameteriNV}, + /* [ 342] = 4222 */ {__glXDisp_PointParameterivNV, __glXDispSwap_PointParameterivNV}, + /* [ 343] = 4223 */ {NULL, NULL}, + /* [ 344] = 4224 */ {NULL, NULL}, + /* [ 345] = 4225 */ {NULL, NULL}, + /* [ 346] = 4226 */ {NULL, NULL}, + /* [ 347] = 4227 */ {NULL, NULL}, + /* [ 348] = 4228 */ {__glXDisp_BlendEquationSeparateEXT, __glXDispSwap_BlendEquationSeparateEXT}, + /* [ 349] = 4229 */ {NULL, NULL}, + /* [ 350] = 4230 */ {__glXDisp_VertexAttrib4bvARB, __glXDispSwap_VertexAttrib4bvARB}, + /* [ 351] = 4231 */ {__glXDisp_VertexAttrib4ivARB, __glXDispSwap_VertexAttrib4ivARB}, + /* [ 352] = 4232 */ {__glXDisp_VertexAttrib4ubvARB, __glXDispSwap_VertexAttrib4ubvARB}, + /* [ 353] = 4233 */ {__glXDisp_VertexAttrib4usvARB, __glXDispSwap_VertexAttrib4usvARB}, + /* [ 354] = 4234 */ {__glXDisp_VertexAttrib4uivARB, __glXDispSwap_VertexAttrib4uivARB}, + /* [ 355] = 4235 */ {__glXDisp_VertexAttrib4NbvARB, __glXDispSwap_VertexAttrib4NbvARB}, + /* [ 356] = 4236 */ {__glXDisp_VertexAttrib4NsvARB, __glXDispSwap_VertexAttrib4NsvARB}, + /* [ 357] = 4237 */ {__glXDisp_VertexAttrib4NivARB, __glXDispSwap_VertexAttrib4NivARB}, + /* [ 358] = 4238 */ {__glXDisp_VertexAttrib4NusvARB, __glXDispSwap_VertexAttrib4NusvARB}, + /* [ 359] = 4239 */ {__glXDisp_VertexAttrib4NuivARB, __glXDispSwap_VertexAttrib4NuivARB}, + /* [ 360] = 4128 */ {__glXDisp_SecondaryColor3ivEXT, __glXDispSwap_SecondaryColor3ivEXT}, + /* [ 361] = 4129 */ {__glXDisp_SecondaryColor3fvEXT, __glXDispSwap_SecondaryColor3fvEXT}, + /* [ 362] = 4130 */ {__glXDisp_SecondaryColor3dvEXT, __glXDispSwap_SecondaryColor3dvEXT}, + /* [ 363] = 4131 */ {__glXDisp_SecondaryColor3ubvEXT, __glXDispSwap_SecondaryColor3ubvEXT}, + /* [ 364] = 4132 */ {__glXDisp_SecondaryColor3usvEXT, __glXDispSwap_SecondaryColor3usvEXT}, + /* [ 365] = 4133 */ {__glXDisp_SecondaryColor3uivEXT, __glXDispSwap_SecondaryColor3uivEXT}, + /* [ 366] = 4134 */ {__glXDisp_BlendFuncSeparateEXT, __glXDispSwap_BlendFuncSeparateEXT}, + /* [ 367] = 4135 */ {NULL, NULL}, + /* [ 368] = 4264 */ {NULL, NULL}, + /* [ 369] = 4265 */ {__glXDisp_VertexAttrib1svNV, __glXDispSwap_VertexAttrib1svNV}, + /* [ 370] = 4266 */ {__glXDisp_VertexAttrib2svNV, __glXDispSwap_VertexAttrib2svNV}, + /* [ 371] = 4267 */ {__glXDisp_VertexAttrib3svNV, __glXDispSwap_VertexAttrib3svNV}, + /* [ 372] = 4268 */ {__glXDisp_VertexAttrib4svNV, __glXDispSwap_VertexAttrib4svNV}, + /* [ 373] = 4269 */ {__glXDisp_VertexAttrib1fvNV, __glXDispSwap_VertexAttrib1fvNV}, + /* [ 374] = 4270 */ {__glXDisp_VertexAttrib2fvNV, __glXDispSwap_VertexAttrib2fvNV}, + /* [ 375] = 4271 */ {__glXDisp_VertexAttrib3fvNV, __glXDispSwap_VertexAttrib3fvNV}, + /* [ 376] = 4272 */ {__glXDisp_VertexAttrib4fvNV, __glXDispSwap_VertexAttrib4fvNV}, + /* [ 377] = 4273 */ {__glXDisp_VertexAttrib1dvNV, __glXDispSwap_VertexAttrib1dvNV}, + /* [ 378] = 4274 */ {__glXDisp_VertexAttrib2dvNV, __glXDispSwap_VertexAttrib2dvNV}, + /* [ 379] = 4275 */ {__glXDisp_VertexAttrib3dvNV, __glXDispSwap_VertexAttrib3dvNV}, + /* [ 380] = 4276 */ {__glXDisp_VertexAttrib4dvNV, __glXDispSwap_VertexAttrib4dvNV}, + /* [ 381] = 4277 */ {__glXDisp_VertexAttrib4ubvNV, __glXDispSwap_VertexAttrib4ubvNV}, + /* [ 382] = 4278 */ {NULL, NULL}, + /* [ 383] = 4279 */ {NULL, NULL}, + /* [ 384] = 4312 */ {NULL, NULL}, + /* [ 385] = 4313 */ {NULL, NULL}, + /* [ 386] = 4314 */ {NULL, NULL}, + /* [ 387] = 4315 */ {NULL, NULL}, + /* [ 388] = 4316 */ {__glXDisp_BindRenderbufferEXT, __glXDispSwap_BindRenderbufferEXT}, + /* [ 389] = 4317 */ {__glXDisp_DeleteRenderbuffersEXT, __glXDispSwap_DeleteRenderbuffersEXT}, + /* [ 390] = 4318 */ {__glXDisp_RenderbufferStorageEXT, __glXDispSwap_RenderbufferStorageEXT}, + /* [ 391] = 4319 */ {__glXDisp_BindFramebufferEXT, __glXDispSwap_BindFramebufferEXT}, + /* [ 392] = 4320 */ {__glXDisp_DeleteFramebuffersEXT, __glXDispSwap_DeleteFramebuffersEXT}, + /* [ 393] = 4321 */ {__glXDisp_FramebufferTexture1DEXT, __glXDispSwap_FramebufferTexture1DEXT}, + /* [ 394] = 4322 */ {__glXDisp_FramebufferTexture2DEXT, __glXDispSwap_FramebufferTexture2DEXT}, + /* [ 395] = 4323 */ {__glXDisp_FramebufferTexture3DEXT, __glXDispSwap_FramebufferTexture3DEXT}, + /* [ 396] = 4324 */ {__glXDisp_FramebufferRenderbufferEXT, __glXDispSwap_FramebufferRenderbufferEXT}, + /* [ 397] = 4325 */ {__glXDisp_GenerateMipmapEXT, __glXDispSwap_GenerateMipmapEXT}, + /* [ 398] = 4326 */ {NULL, NULL}, + /* [ 399] = 4327 */ {NULL, NULL}, +}; + +static const int_fast16_t Render_size_table[400][2] = { + /* [ 0] = 0 */ { 0, ~0}, + /* [ 1] = 1 */ { 8, ~0}, + /* [ 2] = 2 */ { 12, 0}, + /* [ 3] = 3 */ { 8, ~0}, + /* [ 4] = 4 */ { 8, ~0}, + /* [ 5] = 5 */ { 48, 1}, + /* [ 6] = 6 */ { 8, ~0}, + /* [ 7] = 7 */ { 28, ~0}, + /* [ 8] = 8 */ { 16, ~0}, + /* [ 9] = 9 */ { 16, ~0}, + /* [ 10] = 10 */ { 12, ~0}, + /* [ 11] = 11 */ { 8, ~0}, + /* [ 12] = 12 */ { 16, ~0}, + /* [ 13] = 13 */ { 12, ~0}, + /* [ 14] = 14 */ { 8, ~0}, + /* [ 15] = 15 */ { 36, ~0}, + /* [ 16] = 16 */ { 20, ~0}, + /* [ 17] = 17 */ { 20, ~0}, + /* [ 18] = 18 */ { 12, ~0}, + /* [ 19] = 19 */ { 8, ~0}, + /* [ 20] = 20 */ { 20, ~0}, + /* [ 21] = 21 */ { 12, ~0}, + /* [ 22] = 22 */ { 8, ~0}, + /* [ 23] = 23 */ { 4, ~0}, + /* [ 24] = 24 */ { 12, ~0}, + /* [ 25] = 25 */ { 8, ~0}, + /* [ 26] = 26 */ { 8, ~0}, + /* [ 27] = 27 */ { 8, ~0}, + /* [ 28] = 28 */ { 8, ~0}, + /* [ 29] = 29 */ { 28, ~0}, + /* [ 30] = 30 */ { 16, ~0}, + /* [ 31] = 31 */ { 16, ~0}, + /* [ 32] = 32 */ { 12, ~0}, + /* [ 33] = 33 */ { 20, ~0}, + /* [ 34] = 34 */ { 12, ~0}, + /* [ 35] = 35 */ { 12, ~0}, + /* [ 36] = 36 */ { 8, ~0}, + /* [ 37] = 37 */ { 28, ~0}, + /* [ 38] = 38 */ { 16, ~0}, + /* [ 39] = 39 */ { 16, ~0}, + /* [ 40] = 40 */ { 12, ~0}, + /* [ 41] = 41 */ { 36, ~0}, + /* [ 42] = 42 */ { 20, ~0}, + /* [ 43] = 43 */ { 20, ~0}, + /* [ 44] = 44 */ { 12, ~0}, + /* [ 45] = 45 */ { 36, ~0}, + /* [ 46] = 46 */ { 20, ~0}, + /* [ 47] = 47 */ { 20, ~0}, + /* [ 48] = 48 */ { 12, ~0}, + /* [ 49] = 49 */ { 12, ~0}, + /* [ 50] = 50 */ { 8, ~0}, + /* [ 51] = 51 */ { 8, ~0}, + /* [ 52] = 52 */ { 8, ~0}, + /* [ 53] = 53 */ { 20, ~0}, + /* [ 54] = 54 */ { 12, ~0}, + /* [ 55] = 55 */ { 12, ~0}, + /* [ 56] = 56 */ { 8, ~0}, + /* [ 57] = 57 */ { 28, ~0}, + /* [ 58] = 58 */ { 16, ~0}, + /* [ 59] = 59 */ { 16, ~0}, + /* [ 60] = 60 */ { 12, ~0}, + /* [ 61] = 61 */ { 36, ~0}, + /* [ 62] = 62 */ { 20, ~0}, + /* [ 63] = 63 */ { 20, ~0}, + /* [ 64] = 64 */ { 12, ~0}, + /* [ 65] = 65 */ { 20, ~0}, + /* [ 66] = 66 */ { 12, ~0}, + /* [ 67] = 67 */ { 12, ~0}, + /* [ 68] = 68 */ { 8, ~0}, + /* [ 69] = 69 */ { 28, ~0}, + /* [ 70] = 70 */ { 16, ~0}, + /* [ 71] = 71 */ { 16, ~0}, + /* [ 72] = 72 */ { 12, ~0}, + /* [ 73] = 73 */ { 36, ~0}, + /* [ 74] = 74 */ { 20, ~0}, + /* [ 75] = 75 */ { 20, ~0}, + /* [ 76] = 76 */ { 12, ~0}, + /* [ 77] = 77 */ { 40, ~0}, + /* [ 78] = 78 */ { 12, ~0}, + /* [ 79] = 79 */ { 8, ~0}, + /* [ 80] = 80 */ { 12, ~0}, + /* [ 81] = 81 */ { 8, 2}, + /* [ 82] = 82 */ { 12, ~0}, + /* [ 83] = 83 */ { 8, 3}, + /* [ 84] = 84 */ { 8, ~0}, + /* [ 85] = 85 */ { 12, ~0}, + /* [ 86] = 86 */ { 16, ~0}, + /* [ 87] = 87 */ { 12, 4}, + /* [ 88] = 88 */ { 16, ~0}, + /* [ 89] = 89 */ { 12, 5}, + /* [ 90] = 90 */ { 12, ~0}, + /* [ 91] = 91 */ { 8, 6}, + /* [ 92] = 92 */ { 12, ~0}, + /* [ 93] = 93 */ { 8, 7}, + /* [ 94] = 94 */ { 12, ~0}, + /* [ 95] = 95 */ { 8, ~0}, + /* [ 96] = 96 */ { 16, ~0}, + /* [ 97] = 97 */ { 12, 8}, + /* [ 98] = 98 */ { 16, ~0}, + /* [ 99] = 99 */ { 12, 9}, + /* [100] = 100 */ { 8, ~0}, + /* [101] = 101 */ { 12, ~0}, + /* [102] = 102 */ { 24, 10}, + /* [103] = 103 */ { 20, ~0}, + /* [104] = 104 */ { 8, ~0}, + /* [105] = 105 */ { 16, ~0}, + /* [106] = 106 */ { 12, 11}, + /* [107] = 107 */ { 16, ~0}, + /* [108] = 108 */ { 12, 12}, + /* [109] = 109 */ { 56, 13}, + /* [110] = 110 */ { 56, 14}, + /* [111] = 111 */ { 16, ~0}, + /* [112] = 112 */ { 12, 15}, + /* [113] = 113 */ { 16, ~0}, + /* [114] = 114 */ { 12, 16}, + /* [115] = 115 */ { 20, ~0}, + /* [116] = 116 */ { 12, 17}, + /* [117] = 117 */ { 16, ~0}, + /* [118] = 118 */ { 12, 18}, + /* [119] = 119 */ { 16, ~0}, + /* [120] = 120 */ { 12, 19}, + /* [121] = 121 */ { 4, ~0}, + /* [122] = 122 */ { 8, ~0}, + /* [123] = 123 */ { 8, ~0}, + /* [124] = 124 */ { 4, ~0}, + /* [125] = 125 */ { 8, ~0}, + /* [126] = 126 */ { 8, ~0}, + /* [127] = 127 */ { 8, ~0}, + /* [128] = 128 */ { 20, ~0}, + /* [129] = 129 */ { 8, ~0}, + /* [130] = 130 */ { 20, ~0}, + /* [131] = 131 */ { 8, ~0}, + /* [132] = 132 */ { 12, ~0}, + /* [133] = 133 */ { 8, ~0}, + /* [134] = 134 */ { 8, ~0}, + /* [135] = 135 */ { 8, ~0}, + /* [136] = 136 */ { 8, ~0}, + /* [137] = 137 */ { 12, ~0}, + /* [138] = 138 */ { 8, ~0}, + /* [139] = 139 */ { 8, ~0}, + /* [140] = 140 */ { 0, ~0}, + /* [141] = 141 */ { 4, ~0}, + /* [142] = 142 */ { 8, ~0}, + /* [143] = 143 */ { 28, 20}, + /* [144] = 144 */ { 20, 21}, + /* [145] = 145 */ { 48, 22}, + /* [146] = 146 */ { 32, 23}, + /* [147] = 147 */ { 24, ~0}, + /* [148] = 148 */ { 16, ~0}, + /* [149] = 149 */ { 44, ~0}, + /* [150] = 150 */ { 28, ~0}, + /* [151] = 151 */ { 12, ~0}, + /* [152] = 152 */ { 8, ~0}, + /* [153] = 153 */ { 20, ~0}, + /* [154] = 154 */ { 12, ~0}, + /* [155] = 155 */ { 16, ~0}, + /* [156] = 156 */ { 8, ~0}, + /* [157] = 157 */ { 24, ~0}, + /* [158] = 158 */ { 12, ~0}, + /* [159] = 159 */ { 12, ~0}, + /* [160] = 160 */ { 12, ~0}, + /* [161] = 161 */ { 8, ~0}, + /* [162] = 162 */ { 16, ~0}, + /* [163] = 163 */ { 16, ~0}, + /* [164] = 164 */ { 8, ~0}, + /* [165] = 165 */ { 12, ~0}, + /* [166] = 166 */ { 12, ~0}, + /* [167] = 167 */ { 12, ~0}, + /* [168] = 168 */ { 12, 24}, + /* [169] = 169 */ { 12, 25}, + /* [170] = 170 */ { 12, 26}, + /* [171] = 171 */ { 8, ~0}, + /* [172] = 172 */ { 24, ~0}, + /* [173] = 173 */ { 40, 27}, + /* [174] = 174 */ { 20, ~0}, + /* [175] = 175 */ { 52, ~0}, + /* [176] = 176 */ { 4, ~0}, + /* [177] = 177 */ { 68, ~0}, + /* [178] = 178 */ {132, ~0}, + /* [179] = 179 */ { 8, ~0}, + /* [180] = 180 */ { 68, ~0}, + /* [181] = 181 */ {132, ~0}, + /* [182] = 182 */ { 52, ~0}, + /* [183] = 183 */ { 4, ~0}, + /* [184] = 184 */ { 4, ~0}, + /* [185] = 185 */ { 36, ~0}, + /* [186] = 186 */ { 20, ~0}, + /* [187] = 187 */ { 28, ~0}, + /* [188] = 188 */ { 16, ~0}, + /* [189] = 189 */ { 28, ~0}, + /* [190] = 190 */ { 16, ~0}, + /* [191] = 191 */ { 20, ~0}, + /* [192] = 192 */ { 12, ~0}, + /* [193] = 193 */ { 16, 28}, + /* [194] = 194 */ { 8, ~0}, + /* [195] = 195 */ { 44, 29}, + /* [196] = 196 */ { 24, ~0}, + /* [197] = 197 */ { 8, ~0}, + /* [198] = 198 */ { 16, ~0}, + /* [199] = 199 */ { 12, ~0}, + /* [200] = 200 */ { 12, ~0}, + /* [201] = 201 */ { 12, ~0}, + /* [202] = 202 */ { 24, ~0}, + /* [203] = 203 */ { 16, ~0}, + /* [204] = 204 */ { 16, ~0}, + /* [205] = 205 */ { 12, ~0}, + /* [206] = 206 */ { 32, ~0}, + /* [207] = 207 */ { 20, ~0}, + /* [208] = 208 */ { 20, ~0}, + /* [209] = 209 */ { 16, ~0}, + /* [210] = 210 */ { 40, ~0}, + /* [211] = 211 */ { 24, ~0}, + /* [212] = 212 */ { 24, ~0}, + /* [213] = 213 */ { 16, ~0}, + /* [214] = 214 */ { 28, 30}, + /* [215] = 215 */ { 32, 31}, + /* [216] = 216 */ { 36, 32}, + /* [217] = 217 */ { 28, 33}, + /* [218] = 218 */ { 36, 34}, + /* [219] = 219 */ { 44, 35}, + /* [220] = 220 */ { 0, ~0}, + /* [221] = 221 */ { 0, ~0}, + /* [222] = 222 */ { 0, ~0}, + /* [223] = 223 */ { 0, ~0}, + /* [224] = 224 */ { 0, ~0}, + /* [225] = 225 */ { 0, ~0}, + /* [226] = 226 */ { 0, ~0}, + /* [227] = 227 */ { 0, ~0}, + /* [228] = 228 */ { 0, ~0}, + /* [229] = 229 */ { 12, ~0}, + /* [230] = 230 */ { 16, ~0}, + /* [231] = 231 */ { 12, ~0}, + /* [232] = 232 */ { 8, ~0}, + /* [233] = 233 */ { 8, 36}, + /* [234] = 234 */ { 0, ~0}, + /* [235] = 235 */ { 0, ~0}, + /* [236] = 236 */ { 0, ~0}, + /* [237] = 237 */ { 0, ~0}, + /* [238] = 238 */ { 0, ~0}, + /* [239] = 239 */ { 0, ~0}, + /* [240] = 2048 */ { 12, ~0}, + /* [241] = 2049 */ { 8, ~0}, + /* [242] = 2050 */ { 0, ~0}, + /* [243] = 2051 */ { 0, ~0}, + /* [244] = 2052 */ { 0, ~0}, + /* [245] = 2053 */ { 44, 37}, + /* [246] = 2054 */ { 12, 38}, + /* [247] = 2055 */ { 12, 39}, + /* [248] = 2056 */ { 24, ~0}, + /* [249] = 2057 */ { 0, ~0}, + /* [250] = 2058 */ { 0, ~0}, + /* [251] = 2059 */ { 0, ~0}, + /* [252] = 2060 */ { 0, ~0}, + /* [253] = 2061 */ { 0, ~0}, + /* [254] = 2062 */ { 0, ~0}, + /* [255] = 2063 */ { 0, ~0}, + /* [256] = 2064 */ { 0, ~0}, + /* [257] = 2065 */ { 12, ~0}, + /* [258] = 2066 */ { 8, 40}, + /* [259] = 2067 */ { 0, ~0}, + /* [260] = 2068 */ { 0, ~0}, + /* [261] = 2069 */ { 0, ~0}, + /* [262] = 2070 */ { 0, ~0}, + /* [263] = 2071 */ { 0, ~0}, + /* [264] = 4096 */ { 20, ~0}, + /* [265] = 4097 */ { 8, ~0}, + /* [266] = 4098 */ { 0, ~0}, + /* [267] = 4099 */ { 60, 41}, + /* [268] = 4100 */ { 60, 42}, + /* [269] = 4101 */ { 48, 43}, + /* [270] = 4102 */ { 48, 44}, + /* [271] = 4103 */ { 16, ~0}, + /* [272] = 4104 */ { 12, 45}, + /* [273] = 4105 */ { 16, ~0}, + /* [274] = 4106 */ { 12, 46}, + /* [275] = 4107 */ { 24, ~0}, + /* [276] = 4108 */ { 28, ~0}, + /* [277] = 4109 */ { 32, 47}, + /* [278] = 4110 */ { 20, ~0}, + /* [279] = 4111 */ { 16, ~0}, + /* [280] = 4112 */ { 8, ~0}, + /* [281] = 4113 */ { 8, ~0}, + /* [282] = 4114 */ { 84, 48}, + /* [283] = 4115 */ { 92, 49}, + /* [284] = 4116 */ { 0, ~0}, + /* [285] = 4117 */ { 12, ~0}, + /* [286] = 4118 */ { 8, 50}, + /* [287] = 4119 */ { 32, ~0}, + /* [288] = 4120 */ { 36, ~0}, + /* [289] = 4121 */ { 28, ~0}, + /* [290] = 4122 */ { 36, ~0}, + /* [291] = 4123 */ { 40, ~0}, + /* [292] = 4124 */ { 8, ~0}, + /* [293] = 4125 */ { 12, ~0}, + /* [294] = 4126 */ { 8, ~0}, + /* [295] = 4127 */ { 12, ~0}, + /* [296] = 4176 */ { 0, ~0}, + /* [297] = 4177 */ { 0, ~0}, + /* [298] = 4178 */ { 0, ~0}, + /* [299] = 4179 */ { 0, ~0}, + /* [300] = 4180 */ { 12, ~0}, + /* [301] = 4181 */ { 28, ~0}, + /* [302] = 4182 */ { 8, 51}, + /* [303] = 4183 */ { 16, 52}, + /* [304] = 4184 */ { 28, ~0}, + /* [305] = 4185 */ { 44, ~0}, + /* [306] = 4186 */ { 16, 53}, + /* [307] = 4187 */ { 16, 54}, + /* [308] = 4188 */ { 20, ~0}, + /* [309] = 4189 */ { 12, ~0}, + /* [310] = 4190 */ { 12, ~0}, + /* [311] = 4191 */ { 16, ~0}, + /* [312] = 4192 */ { 16, ~0}, + /* [313] = 4193 */ { 12, ~0}, + /* [314] = 4194 */ { 16, ~0}, + /* [315] = 4195 */ { 20, ~0}, + /* [316] = 4196 */ { 24, ~0}, + /* [317] = 4197 */ { 16, ~0}, + /* [318] = 4198 */ { 24, ~0}, + /* [319] = 4199 */ { 32, ~0}, + /* [320] = 4200 */ { 40, ~0}, + /* [321] = 4201 */ { 12, ~0}, + /* [322] = 4202 */ { 12, 55}, + /* [323] = 4203 */ { 12, 56}, + /* [324] = 4204 */ { 12, 57}, + /* [325] = 4205 */ { 12, 58}, + /* [326] = 4206 */ { 12, 59}, + /* [327] = 4207 */ { 12, 60}, + /* [328] = 4208 */ { 12, 61}, + /* [329] = 4209 */ { 12, 62}, + /* [330] = 4210 */ { 12, 63}, + /* [331] = 4211 */ { 12, 64}, + /* [332] = 4212 */ { 12, 65}, + /* [333] = 4213 */ { 12, 66}, + /* [334] = 4214 */ { 12, 67}, + /* [335] = 4215 */ { 28, ~0}, + /* [336] = 4216 */ { 44, ~0}, + /* [337] = 4217 */ { 16, 68}, + /* [338] = 4218 */ { 28, 69}, + /* [339] = 4219 */ { 44, 70}, + /* [340] = 4220 */ { 8, ~0}, + /* [341] = 4221 */ { 12, ~0}, + /* [342] = 4222 */ { 8, 71}, + /* [343] = 4223 */ { 0, ~0}, + /* [344] = 4224 */ { 0, ~0}, + /* [345] = 4225 */ { 0, ~0}, + /* [346] = 4226 */ { 0, ~0}, + /* [347] = 4227 */ { 0, ~0}, + /* [348] = 4228 */ { 12, ~0}, + /* [349] = 4229 */ { 0, ~0}, + /* [350] = 4230 */ { 12, ~0}, + /* [351] = 4231 */ { 24, ~0}, + /* [352] = 4232 */ { 12, ~0}, + /* [353] = 4233 */ { 16, ~0}, + /* [354] = 4234 */ { 24, ~0}, + /* [355] = 4235 */ { 12, ~0}, + /* [356] = 4236 */ { 16, ~0}, + /* [357] = 4237 */ { 24, ~0}, + /* [358] = 4238 */ { 16, ~0}, + /* [359] = 4239 */ { 24, ~0}, + /* [360] = 4128 */ { 16, ~0}, + /* [361] = 4129 */ { 16, ~0}, + /* [362] = 4130 */ { 28, ~0}, + /* [363] = 4131 */ { 8, ~0}, + /* [364] = 4132 */ { 12, ~0}, + /* [365] = 4133 */ { 16, ~0}, + /* [366] = 4134 */ { 20, ~0}, + /* [367] = 4135 */ { 0, ~0}, + /* [368] = 4264 */ { 0, ~0}, + /* [369] = 4265 */ { 12, ~0}, + /* [370] = 4266 */ { 12, ~0}, + /* [371] = 4267 */ { 16, ~0}, + /* [372] = 4268 */ { 16, ~0}, + /* [373] = 4269 */ { 12, ~0}, + /* [374] = 4270 */ { 16, ~0}, + /* [375] = 4271 */ { 20, ~0}, + /* [376] = 4272 */ { 24, ~0}, + /* [377] = 4273 */ { 16, ~0}, + /* [378] = 4274 */ { 24, ~0}, + /* [379] = 4275 */ { 32, ~0}, + /* [380] = 4276 */ { 40, ~0}, + /* [381] = 4277 */ { 12, ~0}, + /* [382] = 4278 */ { 0, ~0}, + /* [383] = 4279 */ { 0, ~0}, + /* [384] = 4312 */ { 0, ~0}, + /* [385] = 4313 */ { 0, ~0}, + /* [386] = 4314 */ { 0, ~0}, + /* [387] = 4315 */ { 0, ~0}, + /* [388] = 4316 */ { 12, ~0}, + /* [389] = 4317 */ { 8, 72}, + /* [390] = 4318 */ { 20, ~0}, + /* [391] = 4319 */ { 12, ~0}, + /* [392] = 4320 */ { 8, 73}, + /* [393] = 4321 */ { 24, ~0}, + /* [394] = 4322 */ { 24, ~0}, + /* [395] = 4323 */ { 28, ~0}, + /* [396] = 4324 */ { 20, ~0}, + /* [397] = 4325 */ { 8, ~0}, + /* [398] = 4326 */ { 0, ~0}, + /* [399] = 4327 */ { 0, ~0}, +}; + +static const gl_proto_size_func Render_size_func_table[74] = { + __glXCallListsReqSize, + __glXBitmapReqSize, + __glXFogfvReqSize, + __glXFogivReqSize, + __glXLightfvReqSize, + __glXLightivReqSize, + __glXLightModelfvReqSize, + __glXLightModelivReqSize, + __glXMaterialfvReqSize, + __glXMaterialivReqSize, + __glXPolygonStippleReqSize, + __glXTexParameterfvReqSize, + __glXTexParameterivReqSize, + __glXTexImage1DReqSize, + __glXTexImage2DReqSize, + __glXTexEnvfvReqSize, + __glXTexEnvivReqSize, + __glXTexGendvReqSize, + __glXTexGenfvReqSize, + __glXTexGenivReqSize, + __glXMap1dReqSize, + __glXMap1fReqSize, + __glXMap2dReqSize, + __glXMap2fReqSize, + __glXPixelMapfvReqSize, + __glXPixelMapuivReqSize, + __glXPixelMapusvReqSize, + __glXDrawPixelsReqSize, + __glXDrawArraysReqSize, + __glXColorSubTableReqSize, + __glXCompressedTexImage1DARBReqSize, + __glXCompressedTexImage2DARBReqSize, + __glXCompressedTexImage3DARBReqSize, + __glXCompressedTexSubImage1DARBReqSize, + __glXCompressedTexSubImage2DARBReqSize, + __glXCompressedTexSubImage3DARBReqSize, + __glXDrawBuffersARBReqSize, + __glXColorTableReqSize, + __glXColorTableParameterfvReqSize, + __glXColorTableParameterivReqSize, + __glXPointParameterfvEXTReqSize, + __glXTexSubImage1DReqSize, + __glXTexSubImage2DReqSize, + __glXConvolutionFilter1DReqSize, + __glXConvolutionFilter2DReqSize, + __glXConvolutionParameterfvReqSize, + __glXConvolutionParameterivReqSize, + __glXSeparableFilter2DReqSize, + __glXTexImage3DReqSize, + __glXTexSubImage3DReqSize, + __glXPrioritizeTexturesReqSize, + __glXRequestResidentProgramsNVReqSize, + __glXLoadProgramNVReqSize, + __glXProgramParameters4fvNVReqSize, + __glXProgramParameters4dvNVReqSize, + __glXVertexAttribs1svNVReqSize, + __glXVertexAttribs2svNVReqSize, + __glXVertexAttribs3svNVReqSize, + __glXVertexAttribs4svNVReqSize, + __glXVertexAttribs1fvNVReqSize, + __glXVertexAttribs2fvNVReqSize, + __glXVertexAttribs3fvNVReqSize, + __glXVertexAttribs4fvNVReqSize, + __glXVertexAttribs1dvNVReqSize, + __glXVertexAttribs2dvNVReqSize, + __glXVertexAttribs3dvNVReqSize, + __glXVertexAttribs4dvNVReqSize, + __glXVertexAttribs4ubvNVReqSize, + __glXProgramStringARBReqSize, + __glXProgramNamedParameter4fvNVReqSize, + __glXProgramNamedParameter4dvNVReqSize, + __glXPointParameterivNVReqSize, + __glXDeleteRenderbuffersEXTReqSize, + __glXDeleteFramebuffersEXTReqSize, +}; + +const struct __glXDispatchInfo Render_dispatch_info = { + 13, + Render_dispatch_tree, + Render_function_table, + Render_size_table, + Render_size_func_table +}; + +/*****************************************************************/ +/* tree depth = 12 */ +static const int_fast16_t VendorPriv_dispatch_tree[152] = { + /* [0] -> opcode range [0, 131072], node depth 1 */ + 2, + 5, + EMPTY_LEAF, + 119, + EMPTY_LEAF, + + /* [5] -> opcode range [0, 32768], node depth 2 */ + 1, + 8, + EMPTY_LEAF, + + /* [8] -> opcode range [0, 16384], node depth 3 */ + 1, + 11, + EMPTY_LEAF, + + /* [11] -> opcode range [0, 8192], node depth 4 */ + 2, + 16, + EMPTY_LEAF, + 78, + EMPTY_LEAF, + + /* [16] -> opcode range [0, 2048], node depth 5 */ + 2, + 21, + EMPTY_LEAF, + 36, + EMPTY_LEAF, + + /* [21] -> opcode range [0, 512], node depth 6 */ + 1, + 24, + EMPTY_LEAF, + + /* [24] -> opcode range [0, 256], node depth 7 */ + 1, + 27, + EMPTY_LEAF, + + /* [27] -> opcode range [0, 128], node depth 8 */ + 1, + 30, + EMPTY_LEAF, + + /* [30] -> opcode range [0, 64], node depth 9 */ + 1, + 33, + EMPTY_LEAF, + + /* [33] -> opcode range [0, 32], node depth 10 */ + 1, + LEAF(0), + EMPTY_LEAF, + + /* [36] -> opcode range [1024, 1536], node depth 6 */ + 2, + 41, + EMPTY_LEAF, + 53, + 67, + + /* [41] -> opcode range [1024, 1152], node depth 7 */ + 1, + 44, + EMPTY_LEAF, + + /* [44] -> opcode range [1024, 1088], node depth 8 */ + 1, + 47, + EMPTY_LEAF, + + /* [47] -> opcode range [1024, 1056], node depth 9 */ + 1, + 50, + EMPTY_LEAF, + + /* [50] -> opcode range [1024, 1040], node depth 10 */ + 1, + LEAF(16), + EMPTY_LEAF, + + /* [53] -> opcode range [1280, 1408], node depth 7 */ + 1, + 56, + EMPTY_LEAF, + + /* [56] -> opcode range [1280, 1344], node depth 8 */ + 2, + 61, + LEAF(24), + EMPTY_LEAF, + 64, + + /* [61] -> opcode range [1280, 1296], node depth 9 */ + 1, + EMPTY_LEAF, + LEAF(40), + + /* [64] -> opcode range [1328, 1344], node depth 9 */ + 1, + LEAF(48), + EMPTY_LEAF, + + /* [67] -> opcode range [1408, 1536], node depth 7 */ + 1, + 70, + EMPTY_LEAF, + + /* [70] -> opcode range [1408, 1472], node depth 8 */ + 1, + 73, + EMPTY_LEAF, + + /* [73] -> opcode range [1408, 1440], node depth 9 */ + 2, + EMPTY_LEAF, + LEAF(56), + LEAF(64), + EMPTY_LEAF, + + /* [78] -> opcode range [4096, 6144], node depth 5 */ + 2, + 83, + EMPTY_LEAF, + 101, + EMPTY_LEAF, + + /* [83] -> opcode range [4096, 4608], node depth 6 */ + 1, + 86, + EMPTY_LEAF, + + /* [86] -> opcode range [4096, 4352], node depth 7 */ + 1, + 89, + EMPTY_LEAF, + + /* [89] -> opcode range [4096, 4224], node depth 8 */ + 1, + 92, + EMPTY_LEAF, + + /* [92] -> opcode range [4096, 4160], node depth 9 */ + 1, + 95, + EMPTY_LEAF, + + /* [95] -> opcode range [4096, 4128], node depth 10 */ + 1, + 98, + EMPTY_LEAF, + + /* [98] -> opcode range [4096, 4112], node depth 11 */ + 1, + LEAF(72), + EMPTY_LEAF, + + /* [101] -> opcode range [5120, 5632], node depth 6 */ + 1, + 104, + EMPTY_LEAF, + + /* [104] -> opcode range [5120, 5376], node depth 7 */ + 1, + 107, + EMPTY_LEAF, + + /* [107] -> opcode range [5120, 5248], node depth 8 */ + 1, + 110, + EMPTY_LEAF, + + /* [110] -> opcode range [5120, 5184], node depth 9 */ + 1, + EMPTY_LEAF, + 113, + + /* [113] -> opcode range [5152, 5184], node depth 10 */ + 1, + 116, + EMPTY_LEAF, + + /* [116] -> opcode range [5152, 5168], node depth 11 */ + 1, + LEAF(80), + EMPTY_LEAF, + + /* [119] -> opcode range [65536, 98304], node depth 2 */ + 1, + 122, + EMPTY_LEAF, + + /* [122] -> opcode range [65536, 81920], node depth 3 */ + 1, + 125, + EMPTY_LEAF, + + /* [125] -> opcode range [65536, 73728], node depth 4 */ + 1, + 128, + EMPTY_LEAF, + + /* [128] -> opcode range [65536, 69632], node depth 5 */ + 1, + 131, + EMPTY_LEAF, + + /* [131] -> opcode range [65536, 67584], node depth 6 */ + 1, + 134, + EMPTY_LEAF, + + /* [134] -> opcode range [65536, 66560], node depth 7 */ + 1, + 137, + EMPTY_LEAF, + + /* [137] -> opcode range [65536, 66048], node depth 8 */ + 1, + 140, + EMPTY_LEAF, + + /* [140] -> opcode range [65536, 65792], node depth 9 */ + 1, + 143, + EMPTY_LEAF, + + /* [143] -> opcode range [65536, 65664], node depth 10 */ + 1, + 146, + EMPTY_LEAF, + + /* [146] -> opcode range [65536, 65600], node depth 11 */ + 1, + 149, + EMPTY_LEAF, + + /* [149] -> opcode range [65536, 65568], node depth 12 */ + 1, + LEAF(88), + EMPTY_LEAF, + +}; + +static const void *VendorPriv_function_table[104][2] = { + /* [ 0] = 0 */ {NULL, NULL}, + /* [ 1] = 1 */ {__glXDisp_GetConvolutionFilterEXT, __glXDispSwap_GetConvolutionFilterEXT}, + /* [ 2] = 2 */ {__glXDisp_GetConvolutionParameterfvEXT, __glXDispSwap_GetConvolutionParameterfvEXT}, + /* [ 3] = 3 */ {__glXDisp_GetConvolutionParameterivEXT, __glXDispSwap_GetConvolutionParameterivEXT}, + /* [ 4] = 4 */ {__glXDisp_GetSeparableFilterEXT, __glXDispSwap_GetSeparableFilterEXT}, + /* [ 5] = 5 */ {__glXDisp_GetHistogramEXT, __glXDispSwap_GetHistogramEXT}, + /* [ 6] = 6 */ {__glXDisp_GetHistogramParameterfvEXT, __glXDispSwap_GetHistogramParameterfvEXT}, + /* [ 7] = 7 */ {__glXDisp_GetHistogramParameterivEXT, __glXDispSwap_GetHistogramParameterivEXT}, + /* [ 8] = 8 */ {__glXDisp_GetMinmaxEXT, __glXDispSwap_GetMinmaxEXT}, + /* [ 9] = 9 */ {__glXDisp_GetMinmaxParameterfvEXT, __glXDispSwap_GetMinmaxParameterfvEXT}, + /* [ 10] = 10 */ {__glXDisp_GetMinmaxParameterivEXT, __glXDispSwap_GetMinmaxParameterivEXT}, + /* [ 11] = 11 */ {__glXDisp_AreTexturesResidentEXT, __glXDispSwap_AreTexturesResidentEXT}, + /* [ 12] = 12 */ {__glXDisp_DeleteTexturesEXT, __glXDispSwap_DeleteTexturesEXT}, + /* [ 13] = 13 */ {__glXDisp_GenTexturesEXT, __glXDispSwap_GenTexturesEXT}, + /* [ 14] = 14 */ {__glXDisp_IsTextureEXT, __glXDispSwap_IsTextureEXT}, + /* [ 15] = 15 */ {NULL, NULL}, + /* [ 16] = 1024 */ {__glXDisp_QueryContextInfoEXT, __glXDispSwap_QueryContextInfoEXT}, + /* [ 17] = 1025 */ {NULL, NULL}, + /* [ 18] = 1026 */ {NULL, NULL}, + /* [ 19] = 1027 */ {NULL, NULL}, + /* [ 20] = 1028 */ {NULL, NULL}, + /* [ 21] = 1029 */ {NULL, NULL}, + /* [ 22] = 1030 */ {NULL, NULL}, + /* [ 23] = 1031 */ {NULL, NULL}, + /* [ 24] = 1296 */ {__glXDisp_GetProgramEnvParameterfvARB, __glXDispSwap_GetProgramEnvParameterfvARB}, + /* [ 25] = 1297 */ {__glXDisp_GetProgramEnvParameterdvARB, __glXDispSwap_GetProgramEnvParameterdvARB}, + /* [ 26] = 1298 */ {__glXDisp_GetProgramivNV, __glXDispSwap_GetProgramivNV}, + /* [ 27] = 1299 */ {__glXDisp_GetProgramStringNV, __glXDispSwap_GetProgramStringNV}, + /* [ 28] = 1300 */ {__glXDisp_GetTrackMatrixivNV, __glXDispSwap_GetTrackMatrixivNV}, + /* [ 29] = 1301 */ {__glXDisp_GetVertexAttribdvARB, __glXDispSwap_GetVertexAttribdvARB}, + /* [ 30] = 1302 */ {__glXDisp_GetVertexAttribfvNV, __glXDispSwap_GetVertexAttribfvNV}, + /* [ 31] = 1303 */ {__glXDisp_GetVertexAttribivNV, __glXDispSwap_GetVertexAttribivNV}, + /* [ 32] = 1304 */ {__glXDisp_IsProgramNV, __glXDispSwap_IsProgramNV}, + /* [ 33] = 1305 */ {__glXDisp_GetProgramLocalParameterfvARB, __glXDispSwap_GetProgramLocalParameterfvARB}, + /* [ 34] = 1306 */ {__glXDisp_GetProgramLocalParameterdvARB, __glXDispSwap_GetProgramLocalParameterdvARB}, + /* [ 35] = 1307 */ {__glXDisp_GetProgramivARB, __glXDispSwap_GetProgramivARB}, + /* [ 36] = 1308 */ {__glXDisp_GetProgramStringARB, __glXDispSwap_GetProgramStringARB}, + /* [ 37] = 1309 */ {NULL, NULL}, + /* [ 38] = 1310 */ {__glXDisp_GetProgramNamedParameterfvNV, __glXDispSwap_GetProgramNamedParameterfvNV}, + /* [ 39] = 1311 */ {__glXDisp_GetProgramNamedParameterdvNV, __glXDispSwap_GetProgramNamedParameterdvNV}, + /* [ 40] = 1288 */ {NULL, NULL}, + /* [ 41] = 1289 */ {NULL, NULL}, + /* [ 42] = 1290 */ {NULL, NULL}, + /* [ 43] = 1291 */ {NULL, NULL}, + /* [ 44] = 1292 */ {NULL, NULL}, + /* [ 45] = 1293 */ {__glXDisp_AreProgramsResidentNV, __glXDispSwap_AreProgramsResidentNV}, + /* [ 46] = 1294 */ {__glXDisp_DeleteProgramsNV, __glXDispSwap_DeleteProgramsNV}, + /* [ 47] = 1295 */ {__glXDisp_GenProgramsNV, __glXDispSwap_GenProgramsNV}, + /* [ 48] = 1328 */ {NULL, NULL}, + /* [ 49] = 1329 */ {NULL, NULL}, + /* [ 50] = 1330 */ {__glXDisp_BindTexImageEXT, __glXDispSwap_BindTexImageEXT}, + /* [ 51] = 1331 */ {__glXDisp_ReleaseTexImageEXT, __glXDispSwap_ReleaseTexImageEXT}, + /* [ 52] = 1332 */ {NULL, NULL}, + /* [ 53] = 1333 */ {NULL, NULL}, + /* [ 54] = 1334 */ {NULL, NULL}, + /* [ 55] = 1335 */ {NULL, NULL}, + /* [ 56] = 1416 */ {NULL, NULL}, + /* [ 57] = 1417 */ {NULL, NULL}, + /* [ 58] = 1418 */ {NULL, NULL}, + /* [ 59] = 1419 */ {NULL, NULL}, + /* [ 60] = 1420 */ {NULL, NULL}, + /* [ 61] = 1421 */ {NULL, NULL}, + /* [ 62] = 1422 */ {__glXDisp_IsRenderbufferEXT, __glXDispSwap_IsRenderbufferEXT}, + /* [ 63] = 1423 */ {__glXDisp_GenRenderbuffersEXT, __glXDispSwap_GenRenderbuffersEXT}, + /* [ 64] = 1424 */ {__glXDisp_GetRenderbufferParameterivEXT, __glXDispSwap_GetRenderbufferParameterivEXT}, + /* [ 65] = 1425 */ {__glXDisp_IsFramebufferEXT, __glXDispSwap_IsFramebufferEXT}, + /* [ 66] = 1426 */ {__glXDisp_GenFramebuffersEXT, __glXDispSwap_GenFramebuffersEXT}, + /* [ 67] = 1427 */ {__glXDisp_CheckFramebufferStatusEXT, __glXDispSwap_CheckFramebufferStatusEXT}, + /* [ 68] = 1428 */ {__glXDisp_GetFramebufferAttachmentParameterivEXT, __glXDispSwap_GetFramebufferAttachmentParameterivEXT}, + /* [ 69] = 1429 */ {NULL, NULL}, + /* [ 70] = 1430 */ {NULL, NULL}, + /* [ 71] = 1431 */ {NULL, NULL}, + /* [ 72] = 4096 */ {NULL, NULL}, + /* [ 73] = 4097 */ {NULL, NULL}, + /* [ 74] = 4098 */ {__glXDisp_GetColorTableSGI, __glXDispSwap_GetColorTableSGI}, + /* [ 75] = 4099 */ {__glXDisp_GetColorTableParameterfvSGI, __glXDispSwap_GetColorTableParameterfvSGI}, + /* [ 76] = 4100 */ {__glXDisp_GetColorTableParameterivSGI, __glXDispSwap_GetColorTableParameterivSGI}, + /* [ 77] = 4101 */ {NULL, NULL}, + /* [ 78] = 4102 */ {NULL, NULL}, + /* [ 79] = 4103 */ {NULL, NULL}, + /* [ 80] = 5152 */ {NULL, NULL}, + /* [ 81] = 5153 */ {NULL, NULL}, + /* [ 82] = 5154 */ {__glXDisp_CopySubBufferMESA, __glXDispSwap_CopySubBufferMESA}, + /* [ 83] = 5155 */ {NULL, NULL}, + /* [ 84] = 5156 */ {NULL, NULL}, + /* [ 85] = 5157 */ {NULL, NULL}, + /* [ 86] = 5158 */ {NULL, NULL}, + /* [ 87] = 5159 */ {NULL, NULL}, + /* [ 88] = 65536 */ {__glXDisp_SwapIntervalSGI, __glXDispSwap_SwapIntervalSGI}, + /* [ 89] = 65537 */ {__glXDisp_MakeCurrentReadSGI, __glXDispSwap_MakeCurrentReadSGI}, + /* [ 90] = 65538 */ {NULL, NULL}, + /* [ 91] = 65539 */ {NULL, NULL}, + /* [ 92] = 65540 */ {__glXDisp_GetFBConfigsSGIX, __glXDispSwap_GetFBConfigsSGIX}, + /* [ 93] = 65541 */ {__glXDisp_CreateContextWithConfigSGIX, __glXDispSwap_CreateContextWithConfigSGIX}, + /* [ 94] = 65542 */ {__glXDisp_CreateGLXPixmapWithConfigSGIX, __glXDispSwap_CreateGLXPixmapWithConfigSGIX}, + /* [ 95] = 65543 */ {__glXDisp_CreateGLXPbufferSGIX, __glXDispSwap_CreateGLXPbufferSGIX}, + /* [ 96] = 65544 */ {__glXDisp_DestroyGLXPbufferSGIX, __glXDispSwap_DestroyGLXPbufferSGIX}, + /* [ 97] = 65545 */ {__glXDisp_ChangeDrawableAttributesSGIX, __glXDispSwap_ChangeDrawableAttributesSGIX}, + /* [ 98] = 65546 */ {__glXDisp_GetDrawableAttributesSGIX, __glXDispSwap_GetDrawableAttributesSGIX}, + /* [ 99] = 65547 */ {NULL, NULL}, + /* [ 100] = 65548 */ {NULL, NULL}, + /* [ 101] = 65549 */ {NULL, NULL}, + /* [ 102] = 65550 */ {NULL, NULL}, + /* [ 103] = 65551 */ {NULL, NULL}, +}; + +const struct __glXDispatchInfo VendorPriv_dispatch_info = { + 17, + VendorPriv_dispatch_tree, + VendorPriv_function_table, + NULL, + NULL +}; + diff --git a/GL/symlink-mesa.sh b/GL/symlink-mesa.sh deleted file mode 100755 index 8deaa436f..000000000 --- a/GL/symlink-mesa.sh +++ /dev/null @@ -1,178 +0,0 @@ -#!/bin/sh - -# -# A script that symlinks source files from Mesa to modular -# -# Author: Soren Sandmann (sandmann@redhat.com) (original) -# adapted for Mesa by Adam Jackson (ajax@nwnk.net) - -# -# Things we would like to do -# -# - Check that all the relevant files exist -# - AUTHORS, autogen.sh, configure.ac, ... -# - Check that we have actually linked everything -# - if a file doesn't need to be linked, then it needs -# to be listed as "not-linked" -# - Compute diffs between all the files (shouldn't be necessary) -# - possibly check that files are listet in Makefile.am's -# - Clean target directory of irrelevant files -# - -check_destinations () { - # don't do anything - we are relying on the side - # effect of dst_dir - true -} - -check_exist() { - # Check whether $1 exists - - if [ ! -e $1 ] ; then - error "$1 not found" - fi -} - -delete_existing() { - # Delete $2 - - rm -f $2 -} - -link_files() { - # Link $1 to $2 - - if [ ! -e $2 ] ; then - ln -s $1 $2 - fi -} - -main() { - check_args $1 $2 - - run check_destinations "Creating destination directories" - run check_exist "Checking that the source files exist" - run delete_existing "Deleting existing files" - run link_files "Linking files" -} - -## actual symlinking - -symlink_glx() { - # this is... unpleasant - src_dir src/glx/x11 - dst_dir glx - - action indirect_size.h - action indirect_dispatch.c - action indirect_dispatch.h - action indirect_dispatch_swap.c - action indirect_reqsize.c - action indirect_reqsize.h - action indirect_size_get.c - action indirect_size_get.h - action indirect_table.c - - src_dir src/mesa/glapi - - action glapi.c - action glthread.c -} - -######### -# -# Helper functions -# -######### - -error() { - echo - echo \ \ \ error:\ \ \ $1 - exit 1 -} - -# printing out what's going on -run_module() { - # $1 module - # $2 explanation - echo -n $EXPLANATION for $1 module ...\ - symlink_$1 - echo DONE -} - -run() { - # $1 what to do - # $2 explanation - - ACTION=$1 EXPLANATION=$2 run_module glx -} - -src_dir() { - REAL_SRC_DIR=$SRC_DIR/$1 - if [ ! -d $REAL_SRC_DIR ] ; then - error "Source directory $REAL_SRC_DIR does not exist" - fi -} - -dst_dir() { - REAL_DST_DIR=$DST_DIR/$1 - if [ ! -d $REAL_DST_DIR ] ; then - mkdir -p $REAL_DST_DIR - fi -} - -action() { - if [ -z $2 ] ; then - $ACTION $REAL_SRC_DIR/$1 $REAL_DST_DIR/$1 - else - $ACTION $REAL_SRC_DIR/$1 $REAL_DST_DIR/$2 - fi -} - -usage() { - echo symlink-mesa.sh src-dir dst-dir - echo src-dir: the Mesa source directory - echo dst-dir: the GL subdirectory of the Xserver modular tree -} - -# Check commandline args -check_args() { - if [ -z $1 ] ; then - echo Missing source dir - usage - exit 1 - fi - - if [ -z $2 ] ; then - echo Missing destination dir - usage - exit 1 - fi - - if [ ! -d $1 ] ; then - echo $1 is not a dir - usage - exit 1 - fi - - if [ ! -d $2 ] ; then - echo $2 is not a dir - usage - exit 1 - fi - - if [ $1 = $2 ] ; then - echo source and destination can\'t be the same - usage - exit 1 - fi - - D=`dirname "$relpath"` - B=`basename "$relpath"` - abspath="`cd \"$D\" 2>/dev/null && pwd || echo \"$D\"`/$B" - - SRC_DIR=`( cd $1 ; pwd )` - DST_DIR=`(cd $2 ; pwd )` -} - -main $1 $2 diff --git a/configure.ac b/configure.ac index 8244d7e32..855e3f152 100644 --- a/configure.ac +++ b/configure.ac @@ -853,20 +853,10 @@ fi if test "x$GLX" = xyes && ! test "x$MESA_SOURCE" = x; then PKG_CHECK_MODULES([XLIB], [x11]) - PKG_CHECK_MODULES([GL], [glproto >= 1.4.9]) + PKG_CHECK_MODULES([GL], [glproto >= 1.4.9 gl >= 7.1.0]) AC_SUBST(XLIB_CFLAGS) AC_DEFINE(GLXEXT, 1, [Build GLX extension]) GLX_LIBS='$(top_builddir)/GL/glx/libglx.la' - test -d GL || mkdir GL - case $host_os in - solaris*) - SYMLINK_MESA="/usr/bin/bash $srcdir/GL/symlink-mesa.sh" ;; - *) SYMLINK_MESA=$srcdir/GL/symlink-mesa.sh ;; - esac - $SYMLINK_MESA $MESA_SOURCE GL/ - if test $? -ne 0; then - AC_MSG_ERROR([Failed to link Mesa source tree. Please specify a proper path to Mesa sources, or disable GLX.]) - fi GLX_SYS_LIBS="$GLX_SYS_LIBS $DLOPEN_LIBS" else GLX=no @@ -892,7 +882,7 @@ if test "x$DRI" = xyes; then AC_DEFINE(XF86DRI, 1, [Build DRI extension]) PKG_CHECK_MODULES([DRIPROTO], [xf86driproto]) PKG_CHECK_MODULES([LIBDRM], [libdrm >= 2.3.0]) - PKG_CHECK_MODULES([GL], [glproto >= 1.4.1]) + PKG_CHECK_MODULES([GL], [glproto >= 1.4.1 gl >= 7.1.0]) PKG_CHECK_EXISTS(libdrm >= 2.2.0, [AC_DEFINE([HAVE_LIBDRM_2_2], 1, [Has version 2.2 (or newer) of the drm library])]) diff --git a/hw/xfree86/dri/Makefile.am b/hw/xfree86/dri/Makefile.am index bee315288..ff71731b8 100644 --- a/hw/xfree86/dri/Makefile.am +++ b/hw/xfree86/dri/Makefile.am @@ -5,7 +5,6 @@ libdri_la_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/GL/glx \ -I$(top_srcdir)/GL/include \ -I$(top_builddir)/GL/include \ - -I@MESA_SOURCE@/include \ -DHAVE_XORG_CONFIG_H \ @DIX_CFLAGS@ @XORG_CFLAGS@ @DRIPROTO_CFLAGS@ \ @LIBDRM_CFLAGS@ \ diff --git a/hw/xfree86/dri2/Makefile.am b/hw/xfree86/dri2/Makefile.am index fd8962ebb..e5bd16bd2 100644 --- a/hw/xfree86/dri2/Makefile.am +++ b/hw/xfree86/dri2/Makefile.am @@ -1,7 +1,7 @@ libdri2_la_LTLIBRARIES = libdri2.la libdri2_la_CFLAGS = \ -DHAVE_XORG_CONFIG_H \ - -I@MESA_SOURCE@/include \ + @GL_CFLAGS@ \ @DIX_CFLAGS@ @XORG_CFLAGS@ @DRI2PROTO_CFLAGS@ @LIBDRM_CFLAGS@ \ -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/os-support/bus From a8a9b40e554dd0c184866978889a39519afc466a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 21 May 2008 12:34:07 -0400 Subject: [PATCH 566/634] Move the windows GL files to the xwin DDX. --- hw/xwin/Makefile.am | 7 +++++++ {GL/windows => hw/xwin/glx}/ChangeLog | 0 {GL/windows => hw/xwin/glx}/glwindows.h | 0 {GL/windows => hw/xwin/glx}/glwrap.c | 0 {GL/windows => hw/xwin/glx}/indirect.c | 0 5 files changed, 7 insertions(+) rename {GL/windows => hw/xwin/glx}/ChangeLog (100%) rename {GL/windows => hw/xwin/glx}/glwindows.h (100%) rename {GL/windows => hw/xwin/glx}/glwrap.c (100%) rename {GL/windows => hw/xwin/glx}/indirect.c (100%) diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am index 5ffba1274..a88528901 100644 --- a/hw/xwin/Makefile.am +++ b/hw/xwin/Makefile.am @@ -167,7 +167,14 @@ AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \ dist_man1_MANS = XWin.man XWinrc.man +GLX_EXTRAS = \ + windows/ChangeLog \ + windows/glwindows.h \ + windows/glwrap.c \ + windows/indirect.c + EXTRA_DIST = \ + $(GLX_EXTRAS) \ _usr_X11R6_lib_X11_system.XWinrc \ X-boxed.ico \ X.ico \ diff --git a/GL/windows/ChangeLog b/hw/xwin/glx/ChangeLog similarity index 100% rename from GL/windows/ChangeLog rename to hw/xwin/glx/ChangeLog diff --git a/GL/windows/glwindows.h b/hw/xwin/glx/glwindows.h similarity index 100% rename from GL/windows/glwindows.h rename to hw/xwin/glx/glwindows.h diff --git a/GL/windows/glwrap.c b/hw/xwin/glx/glwrap.c similarity index 100% rename from GL/windows/glwrap.c rename to hw/xwin/glx/glwrap.c diff --git a/GL/windows/indirect.c b/hw/xwin/glx/indirect.c similarity index 100% rename from GL/windows/indirect.c rename to hw/xwin/glx/indirect.c From c3eb5b80d8cc7ca6a425ccf359718d1ef3d5af55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 21 May 2008 13:33:36 -0400 Subject: [PATCH 567/634] Move GL/glx on level up now that it's the only thing left under GL. --- GL/Makefile.am | 9 --------- Makefile.am | 4 ++-- configure.ac | 7 +++---- {GL/glx => glx}/Makefile.am | 0 {GL/glx => glx}/dispatch.h | 0 {GL/glx => glx}/extension_string.c | 0 {GL/glx => glx}/extension_string.h | 0 {GL/glx => glx}/g_disptab.h | 0 {GL/glx => glx}/glapi.c | 0 {GL/glx => glx}/glapi.h | 0 {GL/glx => glx}/glapioffsets.h | 0 {GL/glx => glx}/glapitable.h | 0 {GL/glx => glx}/glapitemp.h | 0 {GL/glx => glx}/glprocs.h | 0 {GL/glx => glx}/glthread.c | 0 {GL/glx => glx}/glthread.h | 0 {GL/glx => glx}/glxbyteorder.h | 0 {GL/glx => glx}/glxcmds.c | 0 {GL/glx => glx}/glxcmdsswap.c | 0 {GL/glx => glx}/glxcontext.h | 0 {GL/glx => glx}/glxdrawable.h | 0 {GL/glx => glx}/glxdri.c | 0 {GL/glx => glx}/glxdri2.c | 0 {GL/glx => glx}/glxdricommon.c | 0 {GL/glx => glx}/glxdricommon.h | 0 {GL/glx => glx}/glxdriswrast.c | 0 {GL/glx => glx}/glxext.c | 0 {GL/glx => glx}/glxext.h | 0 {GL/glx => glx}/glxscreens.c | 0 {GL/glx => glx}/glxscreens.h | 0 {GL/glx => glx}/glxserver.h | 0 {GL/glx => glx}/glxutil.c | 0 {GL/glx => glx}/glxutil.h | 0 {GL/glx => glx}/indirect_dispatch.c | 0 {GL/glx => glx}/indirect_dispatch.h | 0 {GL/glx => glx}/indirect_dispatch_swap.c | 0 {GL/glx => glx}/indirect_program.c | 0 {GL/glx => glx}/indirect_reqsize.c | 0 {GL/glx => glx}/indirect_reqsize.h | 0 {GL/glx => glx}/indirect_size.h | 0 {GL/glx => glx}/indirect_size_get.c | 0 {GL/glx => glx}/indirect_size_get.h | 0 {GL/glx => glx}/indirect_table.c | 0 {GL/glx => glx}/indirect_table.h | 0 {GL/glx => glx}/indirect_texture_compression.c | 0 {GL/glx => glx}/indirect_util.c | 0 {GL/glx => glx}/indirect_util.h | 0 {GL/glx => glx}/render2.c | 0 {GL/glx => glx}/render2swap.c | 0 {GL/glx => glx}/renderpix.c | 0 {GL/glx => glx}/renderpixswap.c | 0 {GL/glx => glx}/rensize.c | 0 {GL/glx => glx}/single2.c | 0 {GL/glx => glx}/single2swap.c | 0 {GL/glx => glx}/singlepix.c | 0 {GL/glx => glx}/singlepixswap.c | 0 {GL/glx => glx}/singlesize.c | 0 {GL/glx => glx}/singlesize.h | 0 {GL/glx => glx}/swap_interval.c | 0 {GL/glx => glx}/unpack.h | 0 {GL/glx => glx}/xfont.c | 0 61 files changed, 5 insertions(+), 15 deletions(-) delete mode 100644 GL/Makefile.am rename {GL/glx => glx}/Makefile.am (100%) rename {GL/glx => glx}/dispatch.h (100%) rename {GL/glx => glx}/extension_string.c (100%) rename {GL/glx => glx}/extension_string.h (100%) rename {GL/glx => glx}/g_disptab.h (100%) rename {GL/glx => glx}/glapi.c (100%) rename {GL/glx => glx}/glapi.h (100%) rename {GL/glx => glx}/glapioffsets.h (100%) rename {GL/glx => glx}/glapitable.h (100%) rename {GL/glx => glx}/glapitemp.h (100%) rename {GL/glx => glx}/glprocs.h (100%) rename {GL/glx => glx}/glthread.c (100%) rename {GL/glx => glx}/glthread.h (100%) rename {GL/glx => glx}/glxbyteorder.h (100%) rename {GL/glx => glx}/glxcmds.c (100%) rename {GL/glx => glx}/glxcmdsswap.c (100%) rename {GL/glx => glx}/glxcontext.h (100%) rename {GL/glx => glx}/glxdrawable.h (100%) rename {GL/glx => glx}/glxdri.c (100%) rename {GL/glx => glx}/glxdri2.c (100%) rename {GL/glx => glx}/glxdricommon.c (100%) rename {GL/glx => glx}/glxdricommon.h (100%) rename {GL/glx => glx}/glxdriswrast.c (100%) rename {GL/glx => glx}/glxext.c (100%) rename {GL/glx => glx}/glxext.h (100%) rename {GL/glx => glx}/glxscreens.c (100%) rename {GL/glx => glx}/glxscreens.h (100%) rename {GL/glx => glx}/glxserver.h (100%) rename {GL/glx => glx}/glxutil.c (100%) rename {GL/glx => glx}/glxutil.h (100%) rename {GL/glx => glx}/indirect_dispatch.c (100%) rename {GL/glx => glx}/indirect_dispatch.h (100%) rename {GL/glx => glx}/indirect_dispatch_swap.c (100%) rename {GL/glx => glx}/indirect_program.c (100%) rename {GL/glx => glx}/indirect_reqsize.c (100%) rename {GL/glx => glx}/indirect_reqsize.h (100%) rename {GL/glx => glx}/indirect_size.h (100%) rename {GL/glx => glx}/indirect_size_get.c (100%) rename {GL/glx => glx}/indirect_size_get.h (100%) rename {GL/glx => glx}/indirect_table.c (100%) rename {GL/glx => glx}/indirect_table.h (100%) rename {GL/glx => glx}/indirect_texture_compression.c (100%) rename {GL/glx => glx}/indirect_util.c (100%) rename {GL/glx => glx}/indirect_util.h (100%) rename {GL/glx => glx}/render2.c (100%) rename {GL/glx => glx}/render2swap.c (100%) rename {GL/glx => glx}/renderpix.c (100%) rename {GL/glx => glx}/renderpixswap.c (100%) rename {GL/glx => glx}/rensize.c (100%) rename {GL/glx => glx}/single2.c (100%) rename {GL/glx => glx}/single2swap.c (100%) rename {GL/glx => glx}/singlepix.c (100%) rename {GL/glx => glx}/singlepixswap.c (100%) rename {GL/glx => glx}/singlesize.c (100%) rename {GL/glx => glx}/singlesize.h (100%) rename {GL/glx => glx}/swap_interval.c (100%) rename {GL/glx => glx}/unpack.h (100%) rename {GL/glx => glx}/xfont.c (100%) diff --git a/GL/Makefile.am b/GL/Makefile.am deleted file mode 100644 index c3ac15564..000000000 --- a/GL/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -SUBDIRS = glx - -WINDOWS_EXTRAS = \ - windows/ChangeLog \ - windows/glwindows.h \ - windows/glwrap.c \ - windows/indirect.c - -EXTRA_DIST = symlink-mesa.sh $(WINDOWS_EXTRAS) diff --git a/Makefile.am b/Makefile.am index d2e10acaf..86ee9e8e3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,7 +18,7 @@ MFB_DIR=mfb endif if GLX -GLX_DIR=GL +GLX_DIR=glx endif if DBE @@ -94,7 +94,7 @@ DIST_SUBDIRS = \ damageext \ XTrap \ composite \ - GL \ + glx \ exa \ config \ hw diff --git a/configure.ac b/configure.ac index 855e3f152..7c749f52e 100644 --- a/configure.ac +++ b/configure.ac @@ -856,7 +856,7 @@ if test "x$GLX" = xyes && ! test "x$MESA_SOURCE" = x; then PKG_CHECK_MODULES([GL], [glproto >= 1.4.9 gl >= 7.1.0]) AC_SUBST(XLIB_CFLAGS) AC_DEFINE(GLXEXT, 1, [Build GLX extension]) - GLX_LIBS='$(top_builddir)/GL/glx/libglx.la' + GLX_LIBS='$(top_builddir)/glx/libglx.la' GLX_SYS_LIBS="$GLX_SYS_LIBS $DLOPEN_LIBS" else GLX=no @@ -1664,7 +1664,7 @@ if test "x$XQUARTZ" = xyes; then AC_DEFINE(XQUARTZ,1,[Have Quartz]) AC_DEFINE(ROOTLESS,1,[Build Rootless code]) - DARWIN_GLX_LIBS='$(top_builddir)/hw/xquartz/GL/libCGLCore.la $(top_builddir)/GL/glx/libglx.la' + DARWIN_GLX_LIBS='$(top_builddir)/hw/xquartz/GL/libCGLCore.la $(top_builddir)/glx/libglx.la' DARWIN_LIBS="$MI_LIB $OS_LIB $DIX_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $DARWIN_GLX_LIBS" AC_SUBST([DARWIN_LIBS]) @@ -1990,8 +1990,7 @@ XORG_MANPAGE_SECTIONS AC_OUTPUT([ Makefile -GL/Makefile -GL/glx/Makefile +glx/Makefile include/Makefile afb/Makefile composite/Makefile diff --git a/GL/glx/Makefile.am b/glx/Makefile.am similarity index 100% rename from GL/glx/Makefile.am rename to glx/Makefile.am diff --git a/GL/glx/dispatch.h b/glx/dispatch.h similarity index 100% rename from GL/glx/dispatch.h rename to glx/dispatch.h diff --git a/GL/glx/extension_string.c b/glx/extension_string.c similarity index 100% rename from GL/glx/extension_string.c rename to glx/extension_string.c diff --git a/GL/glx/extension_string.h b/glx/extension_string.h similarity index 100% rename from GL/glx/extension_string.h rename to glx/extension_string.h diff --git a/GL/glx/g_disptab.h b/glx/g_disptab.h similarity index 100% rename from GL/glx/g_disptab.h rename to glx/g_disptab.h diff --git a/GL/glx/glapi.c b/glx/glapi.c similarity index 100% rename from GL/glx/glapi.c rename to glx/glapi.c diff --git a/GL/glx/glapi.h b/glx/glapi.h similarity index 100% rename from GL/glx/glapi.h rename to glx/glapi.h diff --git a/GL/glx/glapioffsets.h b/glx/glapioffsets.h similarity index 100% rename from GL/glx/glapioffsets.h rename to glx/glapioffsets.h diff --git a/GL/glx/glapitable.h b/glx/glapitable.h similarity index 100% rename from GL/glx/glapitable.h rename to glx/glapitable.h diff --git a/GL/glx/glapitemp.h b/glx/glapitemp.h similarity index 100% rename from GL/glx/glapitemp.h rename to glx/glapitemp.h diff --git a/GL/glx/glprocs.h b/glx/glprocs.h similarity index 100% rename from GL/glx/glprocs.h rename to glx/glprocs.h diff --git a/GL/glx/glthread.c b/glx/glthread.c similarity index 100% rename from GL/glx/glthread.c rename to glx/glthread.c diff --git a/GL/glx/glthread.h b/glx/glthread.h similarity index 100% rename from GL/glx/glthread.h rename to glx/glthread.h diff --git a/GL/glx/glxbyteorder.h b/glx/glxbyteorder.h similarity index 100% rename from GL/glx/glxbyteorder.h rename to glx/glxbyteorder.h diff --git a/GL/glx/glxcmds.c b/glx/glxcmds.c similarity index 100% rename from GL/glx/glxcmds.c rename to glx/glxcmds.c diff --git a/GL/glx/glxcmdsswap.c b/glx/glxcmdsswap.c similarity index 100% rename from GL/glx/glxcmdsswap.c rename to glx/glxcmdsswap.c diff --git a/GL/glx/glxcontext.h b/glx/glxcontext.h similarity index 100% rename from GL/glx/glxcontext.h rename to glx/glxcontext.h diff --git a/GL/glx/glxdrawable.h b/glx/glxdrawable.h similarity index 100% rename from GL/glx/glxdrawable.h rename to glx/glxdrawable.h diff --git a/GL/glx/glxdri.c b/glx/glxdri.c similarity index 100% rename from GL/glx/glxdri.c rename to glx/glxdri.c diff --git a/GL/glx/glxdri2.c b/glx/glxdri2.c similarity index 100% rename from GL/glx/glxdri2.c rename to glx/glxdri2.c diff --git a/GL/glx/glxdricommon.c b/glx/glxdricommon.c similarity index 100% rename from GL/glx/glxdricommon.c rename to glx/glxdricommon.c diff --git a/GL/glx/glxdricommon.h b/glx/glxdricommon.h similarity index 100% rename from GL/glx/glxdricommon.h rename to glx/glxdricommon.h diff --git a/GL/glx/glxdriswrast.c b/glx/glxdriswrast.c similarity index 100% rename from GL/glx/glxdriswrast.c rename to glx/glxdriswrast.c diff --git a/GL/glx/glxext.c b/glx/glxext.c similarity index 100% rename from GL/glx/glxext.c rename to glx/glxext.c diff --git a/GL/glx/glxext.h b/glx/glxext.h similarity index 100% rename from GL/glx/glxext.h rename to glx/glxext.h diff --git a/GL/glx/glxscreens.c b/glx/glxscreens.c similarity index 100% rename from GL/glx/glxscreens.c rename to glx/glxscreens.c diff --git a/GL/glx/glxscreens.h b/glx/glxscreens.h similarity index 100% rename from GL/glx/glxscreens.h rename to glx/glxscreens.h diff --git a/GL/glx/glxserver.h b/glx/glxserver.h similarity index 100% rename from GL/glx/glxserver.h rename to glx/glxserver.h diff --git a/GL/glx/glxutil.c b/glx/glxutil.c similarity index 100% rename from GL/glx/glxutil.c rename to glx/glxutil.c diff --git a/GL/glx/glxutil.h b/glx/glxutil.h similarity index 100% rename from GL/glx/glxutil.h rename to glx/glxutil.h diff --git a/GL/glx/indirect_dispatch.c b/glx/indirect_dispatch.c similarity index 100% rename from GL/glx/indirect_dispatch.c rename to glx/indirect_dispatch.c diff --git a/GL/glx/indirect_dispatch.h b/glx/indirect_dispatch.h similarity index 100% rename from GL/glx/indirect_dispatch.h rename to glx/indirect_dispatch.h diff --git a/GL/glx/indirect_dispatch_swap.c b/glx/indirect_dispatch_swap.c similarity index 100% rename from GL/glx/indirect_dispatch_swap.c rename to glx/indirect_dispatch_swap.c diff --git a/GL/glx/indirect_program.c b/glx/indirect_program.c similarity index 100% rename from GL/glx/indirect_program.c rename to glx/indirect_program.c diff --git a/GL/glx/indirect_reqsize.c b/glx/indirect_reqsize.c similarity index 100% rename from GL/glx/indirect_reqsize.c rename to glx/indirect_reqsize.c diff --git a/GL/glx/indirect_reqsize.h b/glx/indirect_reqsize.h similarity index 100% rename from GL/glx/indirect_reqsize.h rename to glx/indirect_reqsize.h diff --git a/GL/glx/indirect_size.h b/glx/indirect_size.h similarity index 100% rename from GL/glx/indirect_size.h rename to glx/indirect_size.h diff --git a/GL/glx/indirect_size_get.c b/glx/indirect_size_get.c similarity index 100% rename from GL/glx/indirect_size_get.c rename to glx/indirect_size_get.c diff --git a/GL/glx/indirect_size_get.h b/glx/indirect_size_get.h similarity index 100% rename from GL/glx/indirect_size_get.h rename to glx/indirect_size_get.h diff --git a/GL/glx/indirect_table.c b/glx/indirect_table.c similarity index 100% rename from GL/glx/indirect_table.c rename to glx/indirect_table.c diff --git a/GL/glx/indirect_table.h b/glx/indirect_table.h similarity index 100% rename from GL/glx/indirect_table.h rename to glx/indirect_table.h diff --git a/GL/glx/indirect_texture_compression.c b/glx/indirect_texture_compression.c similarity index 100% rename from GL/glx/indirect_texture_compression.c rename to glx/indirect_texture_compression.c diff --git a/GL/glx/indirect_util.c b/glx/indirect_util.c similarity index 100% rename from GL/glx/indirect_util.c rename to glx/indirect_util.c diff --git a/GL/glx/indirect_util.h b/glx/indirect_util.h similarity index 100% rename from GL/glx/indirect_util.h rename to glx/indirect_util.h diff --git a/GL/glx/render2.c b/glx/render2.c similarity index 100% rename from GL/glx/render2.c rename to glx/render2.c diff --git a/GL/glx/render2swap.c b/glx/render2swap.c similarity index 100% rename from GL/glx/render2swap.c rename to glx/render2swap.c diff --git a/GL/glx/renderpix.c b/glx/renderpix.c similarity index 100% rename from GL/glx/renderpix.c rename to glx/renderpix.c diff --git a/GL/glx/renderpixswap.c b/glx/renderpixswap.c similarity index 100% rename from GL/glx/renderpixswap.c rename to glx/renderpixswap.c diff --git a/GL/glx/rensize.c b/glx/rensize.c similarity index 100% rename from GL/glx/rensize.c rename to glx/rensize.c diff --git a/GL/glx/single2.c b/glx/single2.c similarity index 100% rename from GL/glx/single2.c rename to glx/single2.c diff --git a/GL/glx/single2swap.c b/glx/single2swap.c similarity index 100% rename from GL/glx/single2swap.c rename to glx/single2swap.c diff --git a/GL/glx/singlepix.c b/glx/singlepix.c similarity index 100% rename from GL/glx/singlepix.c rename to glx/singlepix.c diff --git a/GL/glx/singlepixswap.c b/glx/singlepixswap.c similarity index 100% rename from GL/glx/singlepixswap.c rename to glx/singlepixswap.c diff --git a/GL/glx/singlesize.c b/glx/singlesize.c similarity index 100% rename from GL/glx/singlesize.c rename to glx/singlesize.c diff --git a/GL/glx/singlesize.h b/glx/singlesize.h similarity index 100% rename from GL/glx/singlesize.h rename to glx/singlesize.h diff --git a/GL/glx/swap_interval.c b/glx/swap_interval.c similarity index 100% rename from GL/glx/swap_interval.c rename to glx/swap_interval.c diff --git a/GL/glx/unpack.h b/glx/unpack.h similarity index 100% rename from GL/glx/unpack.h rename to glx/unpack.h diff --git a/GL/glx/xfont.c b/glx/xfont.c similarity index 100% rename from GL/glx/xfont.c rename to glx/xfont.c From c76fddeea28b4f88db97a2a3487d7a57cd9d578c Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Wed, 21 May 2008 10:51:15 -0700 Subject: [PATCH 568/634] Fix up paths for GL/glx -> glx renaming --- hw/kdrive/ephyr/ephyrglxext.c | 8 ++++---- hw/xfree86/dixmods/Makefile.am | 6 +++--- hw/xfree86/dri/Makefile.am | 2 +- hw/xgl/Makefile.am | 2 +- hw/xgl/glx/Makefile.am | 2 +- hw/xgl/glxext/Makefile.am | 2 +- hw/xgl/glxext/module/Makefile.am | 2 +- hw/xquartz/GL/Makefile.am | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/hw/kdrive/ephyr/ephyrglxext.c b/hw/kdrive/ephyr/ephyrglxext.c index 2e08e392c..63c4ceda4 100644 --- a/hw/kdrive/ephyr/ephyrglxext.c +++ b/hw/kdrive/ephyr/ephyrglxext.c @@ -35,10 +35,10 @@ #define _HAVE_XALLOC_DECLS #include "ephyrlog.h" #include -#include "GL/glx/glxserver.h" -#include "GL/glx/indirect_table.h" -#include "GL/glx/indirect_util.h" -#include "GL/glx/unpack.h" +#include "glx/glxserver.h" +#include "glx/indirect_table.h" +#include "glx/indirect_util.h" +#include "glx/unpack.h" #include "hostx.h" diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am index beff9b175..904507971 100644 --- a/hw/xfree86/dixmods/Makefile.am +++ b/hw/xfree86/dixmods/Makefile.am @@ -46,7 +46,7 @@ INCLUDES = @XORG_INCS@ \ -I$(top_srcdir)/dbe \ -I$(top_srcdir)/hw/xfree86/loader \ -I$(top_srcdir)/miext/shadow \ - -I$(top_srcdir)/GL/glx + -I$(top_srcdir)/glx libafb_la_LDFLAGS = -avoid-version libafb_la_LIBADD = $(top_builddir)/afb/libafb.la @@ -68,10 +68,10 @@ libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER libglx_la_LDFLAGS = -avoid-version if AIGLX -GLXDRI_LIBRARY = $(top_builddir)/GL/glx/libglxdri.la +GLXDRI_LIBRARY = $(top_builddir)/glx/libglxdri.la endif libglx_la_LIBADD = \ - $(top_builddir)/GL/glx/libglx.la \ + $(top_builddir)/glx/libglx.la \ $(GLXDRI_LIBRARY) libglx_la_SOURCES = glxmodule.c diff --git a/hw/xfree86/dri/Makefile.am b/hw/xfree86/dri/Makefile.am index ff71731b8..e17cea7fd 100644 --- a/hw/xfree86/dri/Makefile.am +++ b/hw/xfree86/dri/Makefile.am @@ -2,7 +2,7 @@ libdri_la_LTLIBRARIES = libdri.la libdri_la_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/os-support \ -I$(top_srcdir)/hw/xfree86/os-support/bus \ - -I$(top_srcdir)/GL/glx \ + -I$(top_srcdir)/glx \ -I$(top_srcdir)/GL/include \ -I$(top_builddir)/GL/include \ -DHAVE_XORG_CONFIG_H \ diff --git a/hw/xgl/Makefile.am b/hw/xgl/Makefile.am index ef9fc0ea9..8df8ae9af 100644 --- a/hw/xgl/Makefile.am +++ b/hw/xgl/Makefile.am @@ -22,7 +22,7 @@ AM_CFLAGS = \ $(DIX_CFLAGS) \ -DHAVE_XGL_CONFIG_H \ -DHAVE_DIX_CONFIG_H \ - -I$(top_srcdir)/GL/glx \ + -I$(top_srcdir)/glx \ -I$(top_srcdir)/GL/include \ -I@MESA_SOURCE@/include \ -I@MESA_SOURCE@/src/mesa/glapi \ diff --git a/hw/xgl/glx/Makefile.am b/hw/xgl/glx/Makefile.am index 314c02e96..ea34ea460 100644 --- a/hw/xgl/glx/Makefile.am +++ b/hw/xgl/glx/Makefile.am @@ -11,7 +11,7 @@ SUBDIRS = \ AM_CFLAGS = \ -I$(srcdir)/.. \ -I$(srcdir)/../glxext \ - -I$(top_srcdir)/GL/glx \ + -I$(top_srcdir)/glx \ -I$(top_srcdir)/GL/include \ -I@MESA_SOURCE@/include \ -I@MESA_SOURCE@/src/mesa/glapi \ diff --git a/hw/xgl/glxext/Makefile.am b/hw/xgl/glxext/Makefile.am index 98a9b13c4..f79b855e7 100644 --- a/hw/xgl/glxext/Makefile.am +++ b/hw/xgl/glxext/Makefile.am @@ -5,7 +5,7 @@ AM_CFLAGS = \ -DHAVE_XGL_CONFIG_H \ -DHAVE_DIX_CONFIG_H \ $(XGLMODULES_CFLAGS) \ - -I$(top_srcdir)/GL/glx \ + -I$(top_srcdir)/glx \ -I$(top_srcdir)/GL/include \ -I$(top_srcdir)/hw/xgl \ -I@MESA_SOURCE@/include \ diff --git a/hw/xgl/glxext/module/Makefile.am b/hw/xgl/glxext/module/Makefile.am index 4633f7ffa..67653cde4 100644 --- a/hw/xgl/glxext/module/Makefile.am +++ b/hw/xgl/glxext/module/Makefile.am @@ -7,7 +7,7 @@ AM_CFLAGS = \ libglx_la_LDFLAGS = -avoid-version libglx_la_SOURCES = glxmodule.c -libglx_la_LIBADD = $(top_builddir)/GL/glx/libglx.la +libglx_la_LIBADD = $(top_builddir)/glx/libglx.la libglx_modules = libglx.la libglcore_la_LDFLAGS = -avoid-version diff --git a/hw/xquartz/GL/Makefile.am b/hw/xquartz/GL/Makefile.am index 41d4566dc..450ee5c5b 100644 --- a/hw/xquartz/GL/Makefile.am +++ b/hw/xquartz/GL/Makefile.am @@ -2,7 +2,7 @@ noinst_LTLIBRARIES = libCGLCore.la AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = \ -I$(top_srcdir) \ - -I$(top_srcdir)/GL/glx \ + -I$(top_srcdir)/glx \ -I$(top_srcdir)/GL/include \ -I$(top_srcdir)/GL/mesa/glapi \ -I$(top_srcdir)/hw/xquartz \ From 20ea99c655140e101f2d20cfab78fb22765fec62 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 21 May 2008 17:03:25 -0400 Subject: [PATCH 569/634] Death to afb. Planar framebuffer people, please talk to wfb for all your 1988 hardware needs. --- Makefile.am | 4 - afb/Makefile.am | 51 -- afb/README | 10 - afb/Xdaniver.doc | 218 ------ afb/afb.h | 972 --------------------------- afb/afbbitblt.c | 343 ---------- afb/afbblt.c | 563 ---------------- afb/afbbres.c | 323 --------- afb/afbbresd.c | 214 ------ afb/afbclip.c | 248 ------- afb/afbcmap.c | 84 --- afb/afbfillarc.c | 347 ---------- afb/afbfillrct.c | 292 --------- afb/afbfillsp.c | 1130 -------------------------------- afb/afbfont.c | 77 --- afb/afbgc.c | 685 ------------------- afb/afbgetsp.c | 165 ----- afb/afbhrzvert.c | 209 ------ afb/afbimage.c | 272 -------- afb/afbimggblt.c | 472 ------------- afb/afbline.c | 707 -------------------- afb/afbmisc.c | 94 --- afb/afbpixmap.c | 299 --------- afb/afbply1rct.c | 300 --------- afb/afbplygblt.c | 463 ------------- afb/afbpntarea.c | 655 ------------------ afb/afbpolypnt.c | 146 ----- afb/afbpushpxl.c | 169 ----- afb/afbscrinit.c | 218 ------ afb/afbsetsp.c | 257 -------- afb/afbtegblt.c | 586 ----------------- afb/afbtile.c | 857 ------------------------ afb/afbwindow.c | 164 ----- afb/afbzerarc.c | 201 ------ configure.ac | 6 +- hw/xfree86/dixmods/Makefile.am | 11 +- hw/xfree86/dixmods/afbmodule.c | 57 -- 37 files changed, 2 insertions(+), 11867 deletions(-) delete mode 100644 afb/Makefile.am delete mode 100644 afb/README delete mode 100644 afb/Xdaniver.doc delete mode 100644 afb/afb.h delete mode 100644 afb/afbbitblt.c delete mode 100644 afb/afbblt.c delete mode 100644 afb/afbbres.c delete mode 100644 afb/afbbresd.c delete mode 100644 afb/afbclip.c delete mode 100644 afb/afbcmap.c delete mode 100644 afb/afbfillarc.c delete mode 100644 afb/afbfillrct.c delete mode 100644 afb/afbfillsp.c delete mode 100644 afb/afbfont.c delete mode 100644 afb/afbgc.c delete mode 100644 afb/afbgetsp.c delete mode 100644 afb/afbhrzvert.c delete mode 100644 afb/afbimage.c delete mode 100644 afb/afbimggblt.c delete mode 100644 afb/afbline.c delete mode 100644 afb/afbmisc.c delete mode 100644 afb/afbpixmap.c delete mode 100644 afb/afbply1rct.c delete mode 100644 afb/afbplygblt.c delete mode 100644 afb/afbpntarea.c delete mode 100644 afb/afbpolypnt.c delete mode 100644 afb/afbpushpxl.c delete mode 100644 afb/afbscrinit.c delete mode 100644 afb/afbsetsp.c delete mode 100644 afb/afbtegblt.c delete mode 100644 afb/afbtile.c delete mode 100644 afb/afbwindow.c delete mode 100644 afb/afbzerarc.c delete mode 100644 hw/xfree86/dixmods/afbmodule.c diff --git a/Makefile.am b/Makefile.am index 86ee9e8e3..7b6b02a1f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,10 +9,6 @@ if XTRAP XTRAP_DIR=XTrap endif -if AFB -AFB_DIR=afb -endif - if MFB MFB_DIR=mfb endif diff --git a/afb/Makefile.am b/afb/Makefile.am deleted file mode 100644 index 9fc22ca54..000000000 --- a/afb/Makefile.am +++ /dev/null @@ -1,51 +0,0 @@ -noinst_LTLIBRARIES = libafb.la - -AM_CFLAGS = $(DIX_CFLAGS) - -libafb_gen_sources = afbbltC.c afbbltX.c afbbltCI.c afbbltO.c afbbltG.c afbtileC.c afbtileG.c afbseg.c - -DISTCLEANFILES = $(libafb_gen_sources) - -libafb_la_SOURCES = afbgc.c afbwindow.c afbfont.c afbfillrct.c afbpixmap.c \ - afbimage.c afbline.c afbbres.c afbhrzvert.c afbbresd.c afbpushpxl.c afbply1rct.c \ - afbzerarc.c afbfillarc.c afbfillsp.c afbsetsp.c afbscrinit.c afbplygblt.c \ - afbclip.c afbgetsp.c afbpolypnt.c afbbitblt.c afbcmap.c afbimggblt.c afbpntarea.c \ - afbmisc.c afbtegblt.c $(libafb_gen_sources) - -INCLUDES = -I$(top_srcdir)/mfb -I$(top_srcdir)/hw/xfree86/os-support - -EXTRA_DIST = afbline.c afbblt.c afbtile.c README Xdaniver.doc - -afbseg.c: - echo "#define POLYSEGMENT" > $@ - echo "#include \"$(srcdir)/afbline.c\"" >> $@ - -afbbltC.c: - echo "#define MROP Mcopy" > $@ - echo "#include \"$(srcdir)/afbblt.c\"" >> $@ - -afbbltX.c: - echo "#define MROP Mxor" > $@ - echo "#include \"$(srcdir)/afbblt.c\"" >> $@ - -afbbltCI.c: - echo "#define MROP McopyInverted" > $@ - echo "#include \"$(srcdir)/afbblt.c\"" >> $@ - -afbbltO.c: - echo "#define MROP Mor" > $@ - echo "#include \"$(srcdir)/afbblt.c\"" >> $@ - -afbbltG.c: - echo "#define MROP 0" > $@ - echo "#include \"$(srcdir)/afbblt.c\"" >> $@ - -afbtileC.c: - echo "#define MROP Mcopy" > $@ - echo "#include \"$(srcdir)/afbtile.c\"" >> $@ - -afbtileG.c: - echo "#define MROP 0" > $@ - echo "#include \"$(srcdir)/afbtile.c\"" >> $@ - -sdk_HEADERS = afb.h diff --git a/afb/README b/afb/README deleted file mode 100644 index 5c9586013..000000000 --- a/afb/README +++ /dev/null @@ -1,10 +0,0 @@ - -All stuff in this directory is based on Xdaniver (read Xdaniver.doc). - -Actually this is the same code as in the ilbm directory, except that here the -conversion from normal bitplanes to interleaved bitplanes didn't happen. - --- -Geert Uytterhoeven Geert.Uytterhoeven@cs.kuleuven.ac.be -Wavelets, Linux/m68k on Amiga http://www.cs.kuleuven.ac.be/~geert/ -Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium diff --git a/afb/Xdaniver.doc b/afb/Xdaniver.doc deleted file mode 100644 index 1c8ad5ad4..000000000 --- a/afb/Xdaniver.doc +++ /dev/null @@ -1,218 +0,0 @@ - -What is it? ------------ - -Xdaniver is a fast, colour X11R6 server for the Amiga's custom chip set -under NetBSD 1.0 and NetBSD-current, supporting all the Amiga's display -depths from 1 to 4 (upto 16 colours) on ECS machines and 1 to 8 (upto 256 -colours) on AGA machines (though, not all resolutions are available, see -General Information below). - -Xdaniver is designed to be a drop-in replacement for the Xmono server provided -with the X11R6 binary distribution supplied by Bernd Ernesti available from -ftp.uni-regensburg.de or one of its mirrors. - -Unlike previous colour X servers for the Amiga that emulate a chunky pixel -screen in fast RAM, use the standard frame buffer drivers provided with the -X11R6 source code to draw and then use a chunky to planar conversion routine -to write the results to the screen (all very slow), Xdaniver uses a heavily -modified mono frame buffer driver to draw directly using the Amiga's planar -format. The net result is much faster drawing and support for all the Amiga's -custom display depths but, as usual, the fewer planes used, the faster the -drawing operations of the X server. Even so, on my A1200 with a 33Mhz 68030, -I'm getting reasonable performance when using 8 bit planes in Dbl NTSC mode. - -Installation ------------- - -You will need to have first obtained and installed the X11R6 binary -distribution available from ftp.uni-regensburg.de in -/pub/NetBSD-Amiga/contrib/X11 or one of its mirrors. Xdaniver has been -compiled to expect font and configuration files sitting under -/usr/local/X11R6, if your setup is different you will need to provide a -symbolic link from /usr/local/X11R6 to where your tree resides or supply -several command line flags to the server. - -To get Xdaniver running as the default X server, copy the uncompressed binary -into /usr/local/X11R6/bin, remove the current X file from that directory -(which is a symbolic link to Xmono) and replace it with a link to Xdaniver: - - gzip -d < X11R6.Xdaniver.1.01.tar.gz | tar xvf - - mv Xdaniver /usr/local/X11R6/bin - cd /usr/local/X11R6/bin - rm X - ln -s Xdaniver X - -Note that on some setups, the devices /dev/kbd, /dev/mouse and /dev/view?? -have been created to be accessable only by superuser; Xdaniver needs to open -these devices. To workaround this problem, log on as superuser and then -either make Xdaniver setuid root: - - chown root Xdaniver - chmod 4755 Xdaniver - -or give everyone access the devices: - - chmod 666 /dev/kbd /dev/mouse /dev/view?? - -the latter option is a possible cause of a security hole if your machine is -ever used multi-user. - -General Information -------------------- - -The default resolution of the server is 700x430 and the default depth 4. AGA -users might what to increase the display depth by editing the startx script -and providing a -depth argument to Xdaniver on the xinit line of the -script. As always, the lower the depth, the faster the drawing and window -manipulation of the server. - -The resolution can be altered similarly by suppling -width and --height arguments to the server. - -The NetBSD kernel selects actual screen modes by picking a mode who's -natural, non-overscanned size best-fits the requested resolution. -Unfortunately, for AGA users, the 1.0 kernel only has support for the -Dbl-NTSC AGA display mode and only this mode has support for depths greater -than 4. The NetBSD-current (work-in-progress) kernel also has support for -Dbl-PAL but still no support for the Super72 or other super-hires modes -(perhaps some kind, kernel-hacker could add support for them ?). - -If you have a 2 button mouse (like me) you might want to try and use the 3 -button mouse emulation. On other systems, it is usual for the left and right -buttons to be provided and emulate the middle button by pressing both -buttons together, however, the middle button is tends to be used more than -the right button so I have provided two options: - --emulateright (or -3), the two physical mouse buttons act as left and middle -and pressing them both together emulates the right button. - --emulatemiddle (or -2), the two physical mouse buttons act as left and right -and pressing them both together emulated the middle button. - -When using screen depths of less than 6 (4 is the maximum for ECS machines) -the lack of possible colours on screen at once causes problems for many X -applications. Specifying -cc 2 as a command line argument to Xdaniver -causes the server to switch the default visual type from PsuedoColor to -StaticColor; to put it simply, the server prefills the colormap with a -selection of 16 colours (depth 4) and when an application asks for a -particular colour, its gets allocated one that is closest to one from the -selection of 16. This removes the 'WARNING: Cannot allocate colormap entry -for "XXX"' errors but at the expense of applications not being able to get -the precise colour they wanted. Also, some badly written X applications fail -altogether when presented with a StaticColor visual. - -Bugs/Limitations ----------------- - -The limited choice of display resolutions for AGA/ECS machines is a real -pain - requires a kernel change to fix. Worse still, the kernel specifies -the maximum overscan resolution on the Dbl-NTSC to be 724x482 but selecting -anything more than 702x430 on my machine causes the screen either sheer -diagonally (as if the bytes per row calculation in Xdaniver or the kernel is -wrong) or completely loose sync (suggesting a custom chip register sync -calculation bug). As other, non-aga modes aren't affected when selection -overscan both problems seem to point to a kernel driver bug. Also, depths -greater than 4 for AGA users are only supported by the kernel in the Dbl-NTSC -mode (and Dbl-PAL with the current-NetBSD kernel). - -I know of one bug so-far (there will be more), The PutImage request of an XY -format image expects the bitplane order to be the reverse of that specified -in the X protocol but since virtually all applications use the Z (chunky) -format, you are unlikely to come across this problem. - -The PutImage request of Z format images is a little slow - when I have time -I'll try and add one of the fast assembly chunky-to-planar routines developed -for doom style games/demos. Unfortunately, the current crop all require a -picture size that is a multiple of 32 pixels and so cannot be used out-of-the- -box. - -Some extra performance could easily be squeezed out of the terminal font -drawing code (used by xterm) - when I have time I'll add the code. - -The Amiga's blitter and sprites are totally unused and will remain so -until/if someone else adds support to the kernel. The blitter would help -speed up screen scrolling and window manipulation and sprite support could -be used for the X pointer shape (if small enough) which would speed up all -drawing operations (no need to remove the software based pointer shape -first, draw, then replace the pointer shape). - -I removed the X image extension (XIE) from the X server as it increased the -size of the binary by some 400k. I haven't come across any applications that -need it yet (I haven't been looking!) so if you need the extension for some -reason send me e-mail and I'll build a server with the extension included. - -The 3 button mouse emulation is very simple - to emulate the 3rd button you -have to press both button precisely at the same moment - I've got quite good -at it now. When I have some spare time I'll add a timer so you will have a -few milli-seconds between one button being pressed and the next and it still -being registered as the emulated button. - -AGA users don't forget to provide the -A flag to loadbsd to enable the one -AGA mode in the 1.0 kernel but only if you have a VGA, multisync or dual-scan -monitor, of course ! - -Xdaniver has been tested on: - -A1200, 33Mhz 68030, 8Mb RAM and NetBSD 1.0 by myself. -A4000/40, 12Mb RAM and NetBSD 1.0 by Andreas Holzhammer. -A3000, 12Mb RAM and NetBSD 1.0 by Charlie Root, Stuart Park and others. -A3000, 25Mhz 68040, 18Mb RAM and NetBSD-current by Michael K. Sanders. -A2000, 8Mb RAM and NetBSD (version unknown) by Hubert Feyrer. - -Release and Bug Fix History ---------------------------- - -1.0 - First release - -1.01 Bugs fixed: - - Narrow (<32 pixels) Z format GetImage requests corrupted the stack - and could cause the server to core dump. (Xpaint caused this problem) - - Drawing dots (PolyPoint request) into a clipped window caused a - c pointer to go out of range, causing a core dump (xv showed this - problem). - - New features: - - Simple 3 button mouse emulation using a 2 button mouse; specify - -emulate_middle (or -2) or -emulate_right (or -3) on the server's - command line and press both mouse buttons together emulate the 'missing' - button. - - Basic beep sound support added by sending bell characters to the - console. - - Source code released. - -Disclaimer and Copyright Notices --------------------------------- - -Multi-depth planar frame buffer code: -Copyright (c) 1995 by Daniver Limited. - -Large portions: -Copyright (c) 1994 by Eduardo Horvath. -Copyright (c) 1987-1995 by the Regents of the University of California. -Copyright (c) 1987 by Sun Microsystems, Inc. Mountain View, CA. -Copyright (c) 1987-1995 by X Consortium. -Copyright (c) 1987, 1989 by Digital Equipment Corporation, Maynard, Massachusetts. -Copyright (c) 1989 Network Computing Devices, Inc., Mountain View, California. - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, provided -that the above copyright notice appear in all copies. The Daniver Limited, -the above companies and individuals makes no representations about the -suitability of this software for any purpose. It is provided "as is" without -express or implied warranty. - -Credits -------- - -Thanks to Bernd Ernesti for making the operating system server source code -available for others to use and Eduardo Horvath and Andy Heffernan, who (I -think) did the original Xmono server port. - -Also, many thanks to the first brave users who tested Xdaniver for me on other -Amiga setups and found a few bugs in the process. - -Gary Henderson. - -Daytime: garyh@wet.sbi.com -Home: gary@daniver.demon.co.uk diff --git a/afb/afb.h b/afb/afb.h deleted file mode 100644 index 6731d9557..000000000 --- a/afb/afb.h +++ /dev/null @@ -1,972 +0,0 @@ -/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ -/* Monochrome Frame Buffer definitions - written by drewry, september 1986 -*/ - -#include "pixmap.h" -#include "region.h" -#include "gc.h" -#include "colormap.h" -#include "regionstr.h" -#include "privates.h" -#include "mibstore.h" -#include "mfb.h" - -extern int afbInverseAlu[]; -/* warning: PixelType definition duplicated in maskbits.h */ -#ifndef PixelType -#define PixelType CARD32 -#endif /* PixelType */ - -#define AFB_MAX_DEPTH 8 - -/* afbbitblt.c */ - -extern void afbDoBitblt( - DrawablePtr /*pSrc*/, - DrawablePtr /*pDst*/, - int /*alu*/, - RegionPtr /*prgnDst*/, - DDXPointPtr /*pptSrc*/, - unsigned long /*planemask*/ -); - -extern RegionPtr afbCopyArea( - DrawablePtr /*pSrcDrawable*/, - DrawablePtr /*pDstDrawable*/, - GCPtr/*pGC*/, - int /*srcx*/, - int /*srcy*/, - int /*width*/, - int /*height*/, - int /*dstx*/, - int /*dsty*/ -); - -/* afbbltC.c */ - -extern void afbDoBitbltCopy( - DrawablePtr /*pSrc*/, - DrawablePtr /*pDst*/, - int /*alu*/, - RegionPtr /*prgnDst*/, - DDXPointPtr /*pptSrc*/, - unsigned long /*planemask*/ -); -/* afbbltCI.c */ - -extern void afbDoBitbltCopyInverted( - DrawablePtr /*pSrc*/, - DrawablePtr /*pDst*/, - int /*alu*/, - RegionPtr /*prgnDst*/, - DDXPointPtr /*pptSrc*/, - unsigned long /*planemask*/ -); -/* afbbltG.c */ - -extern void afbDoBitbltGeneral( - DrawablePtr /*pSrc*/, - DrawablePtr /*pDst*/, - int /*alu*/, - RegionPtr /*prgnDst*/, - DDXPointPtr /*pptSrc*/, - unsigned long /*planemask*/ -); -/* afbbltO.c */ - -extern void afbDoBitbltOr( - DrawablePtr /*pSrc*/, - DrawablePtr /*pDst*/, - int /*alu*/, - RegionPtr /*prgnDst*/, - DDXPointPtr /*pptSrc*/, - unsigned long /*planemask*/ -); -/* afbbltX.c */ - -extern void afbDoBitbltXor( - DrawablePtr /*pSrc*/, - DrawablePtr /*pDst*/, - int /*alu*/, - RegionPtr /*prgnDst*/, - DDXPointPtr /*pptSrc*/, - unsigned long /*planemask*/ -); -/* afbbres.c */ - -extern void afbBresS( - PixelType * /*addrl*/, - int /*nlwidth*/, - int /*sizeDst*/, - int /*depthDst*/, - int /*signdx*/, - int /*signdy*/, - int /*axis*/, - int /*x1*/, - int /*y1*/, - int /*e*/, - int /*e1*/, - int /*e2*/, - int /*len*/, - unsigned char * /*rrops*/ -); -/* afbbresd.c */ - -extern void afbBresD( - int * /*pdashIndex*/, - unsigned char * /*pDash*/, - int /*numInDashList*/, - int * /*pdashOffset*/, - int /*isDoubleDash*/, - PixelType * /*addrl*/, - int /*nlwidth*/, - int /*sizeDst*/, - int /*depthDst*/, - int /*signdx*/, - int /*signdy*/, - int /*axis*/, - int /*x1*/, - int /*y1*/, - int /*e*/, - int /*e1*/, - int /*e2*/, - int /*len*/, - unsigned char * /*rrops*/, - unsigned char * /*bgrrops*/ -); - -/* afbclip.c */ - -extern RegionPtr afbPixmapToRegion( - PixmapPtr /*pPix*/ -); - -/* afbcmap.c */ - -extern int afbListInstalledColormaps( - ScreenPtr /*pScreen*/, - Colormap * /*pmaps*/ -); - -extern void afbInstallColormap( - ColormapPtr /*pmap*/ -); - -extern void afbUninstallColormap( - ColormapPtr /*pmap*/ -); - -extern void afbResolveColor( - unsigned short * /*pred*/, - unsigned short * /*pgreen*/, - unsigned short * /*pblue*/, - VisualPtr /*pVisual*/ -); - -extern Bool afbInitializeColormap( - ColormapPtr /*pmap*/ -); - -extern Bool afbInitVisuals( - VisualPtr * /*visualp*/, - DepthPtr * /*depthp*/, - int * /*nvisualp*/, - int * /*ndepthp*/, - int * /*rootDepthp*/, - VisualID * /*defaultVisp*/, - unsigned long /*sizes*/, - int /*bitsPerRGB*/ -); - -/* afbfillarc.c */ - -extern void afbPolyFillArcSolid( - DrawablePtr /*pDraw*/, - GCPtr /*pGC*/, - int /*narcs*/, - xArc * /*parcs*/ -); -/* afbfillrct.c */ - -extern void afbPolyFillRect( - DrawablePtr /*pDrawable*/, - GCPtr /*pGC*/, - int /*nrectFill*/, - xRectangle * /*prectInit*/ -); - -/* afbply1rct.c */ -extern void afbFillPolygonSolid( - DrawablePtr /*pDrawable*/, - GCPtr /*pGC*/, - int /*mode*/, - int /*shape*/, - int /*count*/, - DDXPointPtr /*ptsIn*/ -); - -/* afbfillsp.c */ - -extern void afbSolidFS( - DrawablePtr /*pDrawable*/, - GCPtr /*pGC*/, - int /*nInit*/, - DDXPointPtr /*pptInit*/, - int * /*pwidthInit*/, - int /*fSorted*/ -); - -extern void afbStippleFS( - DrawablePtr /*pDrawable*/, - GCPtr/*pGC*/, - int /*nInit*/, - DDXPointPtr /*pptInit*/, - int * /*pwidthInit*/, - int /*fSorted*/ -); - -extern void afbTileFS( - DrawablePtr /*pDrawable*/, - GCPtr/*pGC*/, - int /*nInit*/, - DDXPointPtr /*pptInit*/, - int * /*pwidthInit*/, - int /*fSorted*/ -); - -extern void afbUnnaturalTileFS( - DrawablePtr /*pDrawable*/, - GCPtr/*pGC*/, - int /*nInit*/, - DDXPointPtr /*pptInit*/, - int * /*pwidthInit*/, - int /*fSorted*/ -); - -extern void afbUnnaturalStippleFS( - DrawablePtr /*pDrawable*/, - GCPtr/*pGC*/, - int /*nInit*/, - DDXPointPtr /*pptInit*/, - int * /*pwidthInit*/, - int /*fSorted*/ -); - -extern void afbOpaqueStippleFS( - DrawablePtr /*pDrawable*/, - GCPtr/*pGC*/, - int /*nInit*/, - DDXPointPtr /*pptInit*/, - int * /*pwidthInit*/, - int /*fSorted*/ -); - -extern void afbUnnaturalOpaqueStippleFS( - DrawablePtr /*pDrawable*/, - GCPtr/*pGC*/, - int /*nInit*/, - DDXPointPtr /*pptInit*/, - int * /*pwidthInit*/, - int /*fSorted*/ -); - -/* afbfont.c */ - -extern Bool afbRealizeFont( - ScreenPtr /*pscr*/, - FontPtr /*pFont*/ -); - -extern Bool afbUnrealizeFont( - ScreenPtr /*pscr*/, - FontPtr /*pFont*/ -); -/* afbgc.c */ - -extern Bool afbCreateGC( - GCPtr /*pGC*/ -); - -extern void afbReduceRop( - int /*alu*/, - Pixel /*src*/, - unsigned long /*planemask*/, - int /*depth*/, - unsigned char * /*rrops*/ -); - -/* afbgetsp.c */ - -extern void afbGetSpans( - DrawablePtr /*pDrawable*/, - int /*wMax*/, - DDXPointPtr /*ppt*/, - int * /*pwidth*/, - int /*nspans*/, - char * /*pdstStart*/ -); -/* afbhrzvert.c */ - -extern void afbHorzS( - PixelType * /*addrl*/, - int /*nlwidth*/, - int /*sizeDst*/, - int /*depthDst*/, - int /*x1*/, - int /*y1*/, - int /*len*/, - unsigned char * /*rrops*/ -); - -extern void afbVertS( - PixelType * /*addrl*/, - int /*nlwidth*/, - int /*sizeDst*/, - int /*depthDst*/, - int /*x1*/, - int /*y1*/, - int /*len*/, - unsigned char * /*rrops*/ -); -/* afbigbblak.c */ - -extern void afbImageGlyphBlt ( - DrawablePtr /*pDrawable*/, - GCPtr/*pGC*/, - int /*x*/, - int /*y*/, - unsigned int /*nglyph*/, - CharInfoPtr * /*ppci*/, - pointer /*pglyphBase*/ -); -/* afbigbwht.c */ - -/* afbimage.c */ - -extern void afbPutImage( - DrawablePtr /*dst*/, - GCPtr /*pGC*/, - int /*depth*/, - int /*x*/, - int /*y*/, - int /*w*/, - int /*h*/, - int /*leftPad*/, - int /*format*/, - char * /*pImage*/ -); - -extern void afbGetImage( - DrawablePtr /*pDrawable*/, - int /*sx*/, - int /*sy*/, - int /*w*/, - int /*h*/, - unsigned int /*format*/, - unsigned long /*planeMask*/, - char * /*pdstLine*/ -); -/* afbline.c */ - -extern void afbLineSS( - DrawablePtr /*pDrawable*/, - GCPtr /*pGC*/, - int /*mode*/, - int /*npt*/, - DDXPointPtr /*pptInit*/ -); - -extern void afbLineSD( - DrawablePtr /*pDrawable*/, - GCPtr /*pGC*/, - int /*mode*/, - int /*npt*/, - DDXPointPtr /*pptInit*/ -); - -/* afbmisc.c */ - -extern void afbQueryBestSize( - int /*class*/, - unsigned short * /*pwidth*/, - unsigned short * /*pheight*/, - ScreenPtr /*pScreen*/ -); -/* afbpntarea.c */ - -extern void afbSolidFillArea( - DrawablePtr /*pDraw*/, - int /*nbox*/, - BoxPtr /*pbox*/, - unsigned char * /*rrops*/ -); - -extern void afbStippleAreaPPW( - DrawablePtr /*pDraw*/, - int /*nbox*/, - BoxPtr /*pbox*/, - PixmapPtr /*pstipple*/, - unsigned char * /*rrops*/ -); -extern void afbStippleArea( - DrawablePtr /*pDraw*/, - int /*nbox*/, - BoxPtr /*pbox*/, - PixmapPtr /*pstipple*/, - int /*xOff*/, - int /*yOff*/, - unsigned char * /*rrops*/ -); -/* afbplygblt.c */ - -extern void afbPolyGlyphBlt( - DrawablePtr /*pDrawable*/, - GCPtr /*pGC*/, - int /*x*/, - int /*y*/, - unsigned int /*nglyph*/, - CharInfoPtr * /*ppci*/, - pointer /*pglyphBase*/ -); - -/* afbpixmap.c */ - -extern PixmapPtr afbCreatePixmap( - ScreenPtr /*pScreen*/, - int /*width*/, - int /*height*/, - int /*depth*/, - unsigned /*usage_hint*/ -); - -extern Bool afbDestroyPixmap( - PixmapPtr /*pPixmap*/ -); - -extern void afbXRotatePixmap( - PixmapPtr /*pPix*/, - int /*rw*/ -); - -extern void afbYRotatePixmap( - PixmapPtr /*pPix*/, - int /*rh*/ -); - -extern void afbCopyRotatePixmap( - PixmapPtr /*psrcPix*/, - PixmapPtr * /*ppdstPix*/, - int /*xrot*/, - int /*yrot*/ -); -/* afbpolypnt.c */ - -extern void afbPolyPoint( - DrawablePtr /*pDrawable*/, - GCPtr /*pGC*/, - int /*mode*/, - int /*npt*/, - xPoint * /*pptInit*/ -); -/* afbpushpxl.c */ - -extern void afbPushPixels( - GCPtr /*pGC*/, - PixmapPtr /*pBitMap*/, - DrawablePtr /*pDrawable*/, - int /*dx*/, - int /*dy*/, - int /*xOrg*/, - int /*yOrg*/ -); - -/* afbscrinit.c */ - -extern Bool afbScreenInit( - ScreenPtr /*pScreen*/, - pointer /*pbits*/, - int /*xsize*/, - int /*ysize*/, - int /*dpix*/, - int /*dpiy*/, - int /*width*/ -); - -/* afbseg.c */ - -extern void afbSegmentSS( - DrawablePtr /*pDrawable*/, - GCPtr /*pGC*/, - int /*nseg*/, - xSegment * /*pSeg*/ -); - -extern void afbSegmentSD( - DrawablePtr /*pDrawable*/, - GCPtr /*pGC*/, - int /*nseg*/, - xSegment * /*pSeg*/ -); -/* afbsetsp.c */ - -extern void afbSetSpans( - DrawablePtr /*pDrawable*/, - GCPtr /*pGC*/, - char * /*psrc*/, - DDXPointPtr /*ppt*/, - int * /*pwidth*/, - int /*nspans*/, - int /*fSorted*/ -); -/* afbtegblt.c */ - -extern void afbTEGlyphBlt( - DrawablePtr /*pDrawable*/, - GCPtr/*pGC*/, - int /*x*/, - int /*y*/, - unsigned int /*nglyph*/, - CharInfoPtr * /*ppci*/, - pointer /*pglyphBase*/ -); -/* afbtileC.c */ - -extern void afbTileAreaPPWCopy( - DrawablePtr /*pDraw*/, - int /*nbox*/, - BoxPtr /*pbox*/, - int /*alu*/, - PixmapPtr /*ptile*/, - unsigned long /*planemask*/ -); -/* afbtileG.c */ - -extern void afbTileAreaPPWGeneral( - DrawablePtr /*pDraw*/, - int /*nbox*/, - BoxPtr /*pbox*/, - int /*alu*/, - PixmapPtr /*ptile*/, - unsigned long /*planemask*/ -); - -extern void afbTileAreaCopy( - DrawablePtr /*pDraw*/, - int /*nbox*/, - BoxPtr /*pbox*/, - int /*alu*/, - PixmapPtr /*ptile*/, - int /*xOff*/, - int /*yOff*/, - unsigned long /*planemask*/ -); -/* afbtileG.c */ - -extern void afbTileAreaGeneral( - DrawablePtr /*pDraw*/, - int /*nbox*/, - BoxPtr /*pbox*/, - int /*alu*/, - PixmapPtr /*ptile*/, - int /*xOff*/, - int /*yOff*/, - unsigned long /*planemask*/ -); - -extern void afbOpaqueStippleAreaPPWCopy( - DrawablePtr /*pDraw*/, - int /*nbox*/, - BoxPtr /*pbox*/, - int /*alu*/, - PixmapPtr /*ptile*/, - unsigned char */*rropsOS*/, - unsigned long /*planemask*/ -); -/* afbtileG.c */ - -extern void afbOpaqueStippleAreaPPWGeneral( - DrawablePtr /*pDraw*/, - int /*nbox*/, - BoxPtr /*pbox*/, - int /*alu*/, - PixmapPtr /*ptile*/, - unsigned char */*rropsOS*/, - unsigned long /*planemask*/ -); - -extern void afbOpaqueStippleAreaCopy( - DrawablePtr /*pDraw*/, - int /*nbox*/, - BoxPtr /*pbox*/, - int /*alu*/, - PixmapPtr /*ptile*/, - int /*xOff*/, - int /*yOff*/, - unsigned char */*rropsOS*/, - unsigned long /*planemask*/ -); -/* afbtileG.c */ - -extern void afbOpaqueStippleAreaGeneral( - DrawablePtr /*pDraw*/, - int /*nbox*/, - BoxPtr /*pbox*/, - int /*alu*/, - PixmapPtr /*ptile*/, - int /*xOff*/, - int /*yOff*/, - unsigned char */*rropsOS*/, - unsigned long /*planemask*/ -); - -/* afbwindow.c */ - -extern Bool afbCreateWindow( - WindowPtr /*pWin*/ -); - -extern Bool afbDestroyWindow( - WindowPtr /*pWin*/ -); - -extern Bool afbMapWindow( - WindowPtr /*pWindow*/ -); - -extern Bool afbPositionWindow( - WindowPtr /*pWin*/, - int /*x*/, - int /*y*/ -); - -extern Bool afbUnmapWindow( - WindowPtr /*pWindow*/ -); - -extern void afbCopyWindow( - WindowPtr /*pWin*/, - DDXPointRec /*ptOldOrg*/, - RegionPtr /*prgnSrc*/ -); - -extern Bool afbChangeWindowAttributes( - WindowPtr /*pWin*/, - unsigned long /*mask*/ -); -/* afbzerarc.c */ - -extern void afbZeroPolyArcSS( - DrawablePtr /*pDraw*/, - GCPtr /*pGC*/, - int /*narcs*/, - xArc * /*parcs*/ -); - -/* - private field of pixmap - pixmap.devPrivate = (PixelType *)pointer_to_bits - pixmap.devKind = width_of_pixmap_in_bytes - - private field of screen - a pixmap, for which we allocate storage. devPrivate is a pointer to -the bits in the hardware framebuffer. note that devKind can be poked to -make the code work for framebuffers that are wider than their -displayable screen (e.g. the early vsII, which displayed 960 pixels -across, but was 1024 in the hardware.) - - private field of GC -*/ - -typedef struct { - unsigned char rrops[AFB_MAX_DEPTH]; /* reduction of rasterop to 1 of 3 */ - unsigned char rropOS[AFB_MAX_DEPTH]; /* rop for opaque stipple */ -} afbPrivGC; -typedef afbPrivGC *afbPrivGCPtr; - -extern DevPrivateKey afbScreenPrivateKey; -extern DevPrivateKey afbGCPrivateKey; -extern DevPrivateKey afbWindowPrivateKey; -#ifdef PIXMAP_PER_WINDOW -extern DevPrivateKey frameWindowPrivateKey; -#endif - -#define afbGetGCPrivate(pGC) \ - ((afbPrivGC *)dixLookupPrivate(&(pGC)->devPrivates, afbGCPrivateKey)) - -/* Common macros for extracting drawing information */ - -#define afbGetTypedWidth(pDrawable,wtype)( \ - (((pDrawable)->type == DRAWABLE_WINDOW) ? \ - (int)(((PixmapPtr)dixLookupPrivate(&(pDrawable)->pScreen->devPrivates, afbScreenPrivateKey)->devKind) : \ - (int)(((PixmapPtr)pDrawable)->devKind)) / sizeof (wtype)) - -#define afbGetByteWidth(pDrawable) afbGetTypedWidth(pDrawable, unsigned char) - -#define afbGetPixelWidth(pDrawable) afbGetTypedWidth(pDrawable, PixelType) - -#define afbGetTypedWidthAndPointer(pDrawable, width, pointer, wtype, ptype) {\ - PixmapPtr _pPix; \ - if ((pDrawable)->type == DRAWABLE_WINDOW) \ - _pPix = (PixmapPtr)dixLookupPrivate(&(pDrawable)->pScreen->devPrivates, afbScreenPrivateKey); \ - else \ - _pPix = (PixmapPtr)(pDrawable); \ - (pointer) = (ptype *) _pPix->devPrivate.ptr; \ - (width) = ((int) _pPix->devKind) / sizeof (wtype); \ -} - -#define afbGetPixelWidthSizeDepthAndPointer(pDrawable, width, size, dep, pointer) {\ - PixmapPtr _pPix; \ - if ((pDrawable)->type == DRAWABLE_WINDOW) \ - _pPix = (PixmapPtr)dixLookupPrivate(&(pDrawable)->pScreen->devPrivates, afbScreenPrivateKey); \ - else \ - _pPix = (PixmapPtr)(pDrawable); \ - (pointer) = (PixelType *)_pPix->devPrivate.ptr; \ - (width) = ((int)_pPix->devKind) / sizeof (PixelType); \ - (size) = (width) * _pPix->drawable.height; \ - (dep) = _pPix->drawable.depth; (void)(dep); \ -} - -#define afbGetByteWidthAndPointer(pDrawable, width, pointer) \ - afbGetTypedWidthAndPointer(pDrawable, width, pointer, unsigned char, unsigned char) - -#define afbGetPixelWidthAndPointer(pDrawable, width, pointer) \ - afbGetTypedWidthAndPointer(pDrawable, width, pointer, PixelType, PixelType) - -#define afbGetWindowTypedWidthAndPointer(pWin, width, pointer, wtype, ptype) {\ - PixmapPtr _pPix = (PixmapPtr)dixLookupPrivate(&(pWin)->drawable.pScreen->devPrivates, afbScreenPrivateKey); \ - (pointer) = (ptype *) _pPix->devPrivate.ptr; \ - (width) = ((int) _pPix->devKind) / sizeof (wtype); \ -} - -#define afbGetWindowPixelWidthAndPointer(pWin, width, pointer) \ - afbGetWindowTypedWidthAndPointer(pWin, width, pointer, PixelType, PixelType) - -#define afbGetWindowByteWidthAndPointer(pWin, width, pointer) \ - afbGetWindowTypedWidthAndPointer(pWin, width, pointer, char, char) - -/* afb uses the following macros to calculate addresses in drawables. - * To support banked framebuffers, the macros come in four flavors. - * All four collapse into the same definition on unbanked devices. - * - * afbScanlineFoo - calculate address and do bank switching - * afbScanlineFooNoBankSwitch - calculate address, don't bank switch - * afbScanlineFooSrc - calculate address, switch source bank - * afbScanlineFooDst - calculate address, switch destination bank - */ - -/* The NoBankSwitch versions are the same for banked and unbanked cases */ - -#define afbScanlineIncNoBankSwitch(_ptr, _off) _ptr += (_off) -#define afbScanlineOffsetNoBankSwitch(_ptr, _off) ((_ptr) + (_off)) -#define afbScanlineDeltaNoBankSwitch(_ptr, _y, _w) \ - afbScanlineOffsetNoBankSwitch(_ptr, (_y) * (_w)) -#define afbScanlineNoBankSwitch(_ptr, _x, _y, _w) \ - afbScanlineOffsetNoBankSwitch(_ptr, (_y) * (_w) + ((_x) >> MFB_PWSH)) - -#ifdef MFB_LINE_BANK - -#include "afblinebank.h" /* get macro definitions from this file */ - -#else /* !MFB_LINE_BANK - unbanked case */ - -#define afbScanlineInc(_ptr, _off) afbScanlineIncNoBankSwitch(_ptr, _off) -#define afbScanlineIncSrc(_ptr, _off) afbScanlineInc(_ptr, _off) -#define afbScanlineIncDst(_ptr, _off) afbScanlineInc(_ptr, _off) - -#define afbScanlineOffset(_ptr, _off) afbScanlineOffsetNoBankSwitch(_ptr, _off) -#define afbScanlineOffsetSrc(_ptr, _off) afbScanlineOffset(_ptr, _off) -#define afbScanlineOffsetDst(_ptr, _off) afbScanlineOffset(_ptr, _off) - -#define afbScanlineSrc(_ptr, _x, _y, _w) afbScanline(_ptr, _x, _y, _w) -#define afbScanlineDst(_ptr, _x, _y, _w) afbScanline(_ptr, _x, _y, _w) - -#define afbScanlineDeltaSrc(_ptr, _y, _w) afbScanlineDelta(_ptr, _y, _w) -#define afbScanlineDeltaDst(_ptr, _y, _w) afbScanlineDelta(_ptr, _y, _w) - -#endif /* MFB_LINE_BANK */ - -#define afbScanlineDelta(_ptr, _y, _w) \ - afbScanlineOffset(_ptr, (_y) * (_w)) - -#define afbScanline(_ptr, _x, _y, _w) \ - afbScanlineOffset(_ptr, (_y) * (_w) + ((_x) >> MFB_PWSH)) - -/* precomputed information about each glyph for GlyphBlt code. - this saves recalculating the per glyph information for each box. -*/ - -typedef struct _afbpos{ - int xpos; /* xposition of glyph's origin */ - int xchar; /* x position mod 32 */ - int leftEdge; - int rightEdge; - int topEdge; - int bottomEdge; - PixelType *pdstBase; /* longword with character origin */ - int widthGlyph; /* width in bytes of this glyph */ -} afbTEXTPOS; - -/* reduced raster ops for afb */ -#define RROP_BLACK GXclear -#define RROP_WHITE GXset -#define RROP_NOP GXnoop -#define RROP_INVERT GXinvert -#define RROP_COPY GXcopy - -/* macros for afbbitblt.c, afbfillsp.c - these let the code do one switch on the rop per call, rather - than a switch on the rop per item (span or rectangle.) -*/ - -#define fnCLEAR(src, dst) (0) -#define fnAND(src, dst) (src & dst) -#define fnANDREVERSE(src, dst) (src & ~dst) -#define fnCOPY(src, dst) (src) -#define fnANDINVERTED(src, dst) (~src & dst) -#define fnNOOP(src, dst) (dst) -#define fnXOR(src, dst) (src ^ dst) -#define fnOR(src, dst) (src | dst) -#define fnNOR(src, dst) (~(src | dst)) -#define fnEQUIV(src, dst) (~src ^ dst) -#define fnINVERT(src, dst) (~dst) -#define fnORREVERSE(src, dst) (src | ~dst) -#define fnCOPYINVERTED(src, dst) (~src) -#define fnORINVERTED(src, dst) (~src | dst) -#define fnNAND(src, dst) (~(src & dst)) -#undef fnSET -#define fnSET(src, dst) (~0) - -/* Using a "switch" statement is much faster in most cases - * since the compiler can do a look-up table or multi-way branch - * instruction, depending on the architecture. The result on - * A Sun 3/50 is at least 2.5 times faster, assuming a uniform - * distribution of RasterOp operation types. - * - * However, doing some profiling on a running system reveals - * GXcopy is the operation over 99.5% of the time and - * GXxor is the next most frequent (about .4%), so we make special - * checks for those first. - * - * Note that this requires a change to the "calling sequence" - * since we can't engineer a "switch" statement to have an lvalue. - */ -#undef DoRop -#define DoRop(result, alu, src, dst) \ -{ \ - if (alu == GXcopy) \ - result = fnCOPY (src, dst); \ - else if (alu == GXxor) \ - result = fnXOR (src, dst); \ - else \ - switch (alu) { \ - case GXclear: \ - result = fnCLEAR (src, dst); \ - break; \ - case GXand: \ - result = fnAND (src, dst); \ - break; \ - case GXandReverse: \ - result = fnANDREVERSE (src, dst); \ - break; \ - case GXandInverted: \ - result = fnANDINVERTED (src, dst); \ - break; \ - default: \ - case GXnoop: \ - result = fnNOOP (src, dst); \ - break; \ - case GXor: \ - result = fnOR (src, dst); \ - break; \ - case GXnor: \ - result = fnNOR (src, dst); \ - break; \ - case GXequiv: \ - result = fnEQUIV (src, dst); \ - break; \ - case GXinvert: \ - result = fnINVERT (src, dst); \ - break; \ - case GXorReverse: \ - result = fnORREVERSE (src, dst); \ - break; \ - case GXcopyInverted: \ - result = fnCOPYINVERTED (src, dst); \ - break; \ - case GXorInverted: \ - result = fnORINVERTED (src, dst); \ - break; \ - case GXnand: \ - result = fnNAND (src, dst); \ - break; \ - case GXset: \ - result = fnSET (src, dst); \ - break; \ - } \ -} - - -/* C expression fragments for various operations. These get passed in - * as -D's on the compile command line. See afb/Imakefile. This - * fixes XBUG 6319. - * - * This seems like a good place to point out that afb's use of the - * words black and white is an unfortunate misnomer. In afb code, black - * means zero, and white means one. - */ -#define MFB_OPEQ_WHITE |= -#define MFB_OPEQ_BLACK &=~ -#define MFB_OPEQ_INVERT ^= -#define MFB_EQWHOLEWORD_WHITE =~0 -#define MFB_EQWHOLEWORD_BLACK =0 -#define MFB_EQWHOLEWORD_INVERT ^=~0 -#define MFB_OP_WHITE /* nothing */ -#define MFB_OP_BLACK ~ diff --git a/afb/afbbitblt.c b/afb/afbbitblt.c deleted file mode 100644 index d8b2ccda5..000000000 --- a/afb/afbbitblt.c +++ /dev/null @@ -1,343 +0,0 @@ -/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include - -#include -#include - -#include "regionstr.h" -#include "gcstruct.h" -#include "windowstr.h" -#include "pixmapstr.h" -#include "scrnintstr.h" - -#include "mi.h" - -#include "afb.h" -#include "maskbits.h" - -/* CopyArea and CopyPlane for a monchrome frame buffer - - - clip the source rectangle to the source's available bits. (this -avoids copying unnecessary pieces that will just get exposed anyway.) -this becomes the new shape of the destination. - clip the destination region to the composite clip in the -GC. this requires translating the destination region to (dstx, dsty). - build a list of source points, one for each rectangle in the -destination. this is a simple translation. - go do the multiple rectangle copies - do graphics exposures -*/ -/** Optimized for drawing pixmaps into windows, especially when drawing into - ** unobscured windows. Calls to the general-purpose region code were - ** replaced with rectangle-to-rectangle clipping comparisions. This is - ** possible, since the pixmap is a single rectangle. In an unobscured - ** window, the destination clip is also a single rectangle, and region - ** code can be avoided entirely. This is a big savings, since the region - ** code uses XAlloc() and makes many function calls. - ** - ** In addition, if source is a pixmap, there is no need to call the - ** expensive miHandleExposures() routine. Instead, we simply return NULL. - ** - ** Previously, drawing a pixmap into an unobscured window executed at least - ** 8 XAlloc()'s, 30 function calls, and hundreds of lines of code. - ** - ** Now, the same operation requires no XAlloc()'s, no region function calls, - ** and much less overhead. Nice for drawing lots of small pixmaps. - */ - -void -afbDoBitblt(DrawablePtr pSrc, DrawablePtr pDst, int alu, RegionPtr prgnDst, DDXPointPtr pptSrc, long unsigned int planemask) -{ - switch (alu) { - case GXcopy: - afbDoBitbltCopy(pSrc, pDst, alu, prgnDst, pptSrc, planemask); - break; - case GXxor: - afbDoBitbltXor(pSrc, pDst, alu, prgnDst, pptSrc, planemask); - break; - case GXcopyInverted: - afbDoBitbltCopyInverted(pSrc, pDst, alu, prgnDst, pptSrc, planemask); - break; - case GXor: - afbDoBitbltOr(pSrc, pDst, alu, prgnDst, pptSrc, planemask); - break; - default: - afbDoBitbltGeneral(pSrc, pDst, alu, prgnDst, pptSrc, planemask); - break; - } -} - -typedef void (*afb_blit_func) - (DrawablePtr, DrawablePtr, int, RegionPtr, DDXPointPtr, unsigned long); - -static RegionPtr -afbBitBlt(register DrawablePtr pSrcDrawable, register DrawablePtr pDstDrawable, register GC *pGC, int srcx, int srcy, int width, int height, int dstx, int dsty, afb_blit_func doBitBlt, long unsigned int planemask) -{ - RegionPtr prgnSrcClip = NULL; /* may be a new region, or just a copy */ - Bool freeSrcClip = FALSE; - - RegionPtr prgnExposed; - RegionRec rgnDst; - DDXPointPtr pptSrc; - register DDXPointPtr ppt; - register BoxPtr pbox; - int i; - register int dx; - register int dy; - xRectangle origSource; - DDXPointRec origDest; - int numRects; - BoxRec fastBox; - int fastClip = 0; /* for fast clipping with pixmap source */ - int fastExpose = 0; /* for fast exposures with pixmap source */ - - origSource.x = srcx; - origSource.y = srcy; - origSource.width = width; - origSource.height = height; - origDest.x = dstx; - origDest.y = dsty; - - if ((pSrcDrawable != pDstDrawable) && pSrcDrawable->pScreen->SourceValidate) - (*pSrcDrawable->pScreen->SourceValidate)(pSrcDrawable, srcx, srcy, width, - height); - - srcx += pSrcDrawable->x; - srcy += pSrcDrawable->y; - - /* clip the source */ - - if (pSrcDrawable->type == DRAWABLE_PIXMAP) - if ((pSrcDrawable == pDstDrawable) && (pGC->clientClipType == CT_NONE)) - prgnSrcClip = pGC->pCompositeClip; - else - fastClip = 1; - else if (pGC->subWindowMode == IncludeInferiors) - if (!((WindowPtr)pSrcDrawable)->parent) - /* - * special case bitblt from root window in - * IncludeInferiors mode; just like from a pixmap - */ - fastClip = 1; - else if ((pSrcDrawable == pDstDrawable) && (pGC->clientClipType == CT_NONE)) - prgnSrcClip = pGC->pCompositeClip; - else { - prgnSrcClip = NotClippedByChildren((WindowPtr)pSrcDrawable); - freeSrcClip = TRUE; - } - else - prgnSrcClip = &((WindowPtr)pSrcDrawable)->clipList; - - fastBox.x1 = srcx; - fastBox.y1 = srcy; - fastBox.x2 = srcx + width; - fastBox.y2 = srcy + height; - - /* Don't create a source region if we are doing a fast clip */ - if (fastClip) { - fastExpose = 1; - /* - * clip the source; if regions extend beyond the source size, - * make sure exposure events get sent - */ - if (fastBox.x1 < pSrcDrawable->x) { - fastBox.x1 = pSrcDrawable->x; - fastExpose = 0; - } - if (fastBox.y1 < pSrcDrawable->y) { - fastBox.y1 = pSrcDrawable->y; - fastExpose = 0; - } - if (fastBox.x2 > pSrcDrawable->x + (int)pSrcDrawable->width) { - fastBox.x2 = pSrcDrawable->x + (int)pSrcDrawable->width; - fastExpose = 0; - } - if (fastBox.y2 > pSrcDrawable->y + (int)pSrcDrawable->height) { - fastBox.y2 = pSrcDrawable->y + (int)pSrcDrawable->height; - fastExpose = 0; - } - } else { - REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1); - REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, prgnSrcClip); - } - - dstx += pDstDrawable->x; - dsty += pDstDrawable->y; - - if (pDstDrawable->type == DRAWABLE_WINDOW) - if (!((WindowPtr)pDstDrawable)->realized) { - if (!fastClip) - REGION_UNINIT(pGC->pScreen, &rgnDst); - if (freeSrcClip) - REGION_DESTROY(pGC->pScreen, prgnSrcClip); - return NULL; - } - - dx = srcx - dstx; - dy = srcy - dsty; - - /* Translate and clip the dst to the destination composite clip */ - if (fastClip) { - RegionPtr cclip; - - /* Translate the region directly */ - fastBox.x1 -= dx; - fastBox.x2 -= dx; - fastBox.y1 -= dy; - fastBox.y2 -= dy; - - /* If the destination composite clip is one rectangle we can - do the clip directly. Otherwise we have to create a full - blown region and call intersect */ - cclip = pGC->pCompositeClip; - if (REGION_NUM_RECTS(cclip) == 1) { - BoxPtr pBox = REGION_RECTS(cclip); - - if (fastBox.x1 < pBox->x1) - fastBox.x1 = pBox->x1; - if (fastBox.x2 > pBox->x2) - fastBox.x2 = pBox->x2; - if (fastBox.y1 < pBox->y1) - fastBox.y1 = pBox->y1; - if (fastBox.y2 > pBox->y2) - fastBox.y2 = pBox->y2; - - /* Check to see if the region is empty */ - if (fastBox.x1 >= fastBox.x2 || fastBox.y1 >= fastBox.y2) { - REGION_NULL(pGC->pScreen, &rgnDst); - } else { - REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1); - } - } else { - /* We must turn off fastClip now, since we must create - a full blown region. It is intersected with the - composite clip below. */ - fastClip = 0; - REGION_INIT(pGC->pScreen, &rgnDst, &fastBox,1); - } - } else - REGION_TRANSLATE(pGC->pScreen, &rgnDst, -dx, -dy); - - if (!fastClip) { - REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, - pGC->pCompositeClip); - } - - /* Do bit blitting */ - numRects = REGION_NUM_RECTS(&rgnDst); - if (numRects && width && height) { - if(!(pptSrc = (DDXPointPtr)xalloc(numRects * - sizeof(DDXPointRec)))) { - REGION_UNINIT(pGC->pScreen, &rgnDst); - if (freeSrcClip) - REGION_DESTROY(pGC->pScreen, prgnSrcClip); - return NULL; - } - pbox = REGION_RECTS(&rgnDst); - ppt = pptSrc; - for (i = numRects; --i >= 0; pbox++, ppt++) { - ppt->x = pbox->x1 + dx; - ppt->y = pbox->y1 + dy; - } - - (*doBitBlt)(pSrcDrawable, pDstDrawable, pGC->alu, &rgnDst, pptSrc, - planemask); - - xfree(pptSrc); - } - - prgnExposed = NULL; - if (pGC->fExpose) { - /* Pixmap sources generate a NoExposed (we return NULL to do this) */ - if (!fastExpose) - prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, - origSource.x, origSource.y, - (int)origSource.width, - (int)origSource.height, origDest.x, - origDest.y, (unsigned long)0); - } - REGION_UNINIT(pGC->pScreen, &rgnDst); - if (freeSrcClip) - REGION_DESTROY(pGC->pScreen, prgnSrcClip); - return prgnExposed; -} - -RegionPtr -afbCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GC *pGC, int srcx, int srcy, int width, int height, int dstx, int dsty) -{ - afb_blit_func doBitBlt; - - switch (pGC->alu) { - case GXcopy: - doBitBlt = afbDoBitbltCopy; - break; - case GXxor: - doBitBlt = afbDoBitbltXor; - break; - case GXcopyInverted: - doBitBlt = afbDoBitbltCopyInverted; - break; - case GXor: - doBitBlt = afbDoBitbltOr; - break; - default: - doBitBlt = afbDoBitbltGeneral; - break; - } - - return(afbBitBlt(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, - width, height, dstx, dsty, doBitBlt, pGC->planemask)); -} diff --git a/afb/afbblt.c b/afb/afbblt.c deleted file mode 100644 index 4e1a49e9d..000000000 --- a/afb/afbblt.c +++ /dev/null @@ -1,563 +0,0 @@ -/* - * afb copy area - */ - -/* - -Copyright (c) 1989 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Author: Keith Packard - -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include - -#include -#include -#include -#include "afb.h" -#include "gcstruct.h" -#include "windowstr.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "regionstr.h" -#include "maskbits.h" -#include "fastblt.h" -#include "mergerop.h" - -void -MROP_NAME(afbDoBitblt)(pSrc, pDst, alu, prgnDst, pptSrc, planemask) - DrawablePtr pSrc, pDst; - int alu; - RegionPtr prgnDst; - DDXPointPtr pptSrc; - unsigned long planemask; -{ - PixelType *psrcBase, *pdstBase; /* start of src and dst bitmaps */ - int widthSrc, widthDst; /* add to get to same position in next line */ - int sizeSrc, sizeDst; - - BoxPtr pbox; - int nbox; - - BoxPtr pboxTmp, pboxNext, pboxBase, pboxNew1, pboxNew2; - /* temporaries for shuffling rectangles */ - DDXPointPtr pptTmp, pptNew1, pptNew2; - /* shuffling boxes entails shuffling the - source points too */ - int w, h; - int xdir; /* 1 = left right, -1 = right left/ */ - int ydir; /* 1 = top down, -1 = bottom up */ - - PixelType *psrcLine, *pdstLine; - /* pointers to line with current src and dst */ - register PixelType *psrc; /* pointer to current src longword */ - register PixelType *pdst; /* pointer to current dst longword */ - - MROP_DECLARE_REG() - - /* following used for looping through a line */ - PixelType startmask, endmask; /* masks for writing ends of dst */ - int nlMiddle; /* whole longwords in dst */ - int xoffSrc, xoffDst; - register int leftShift, rightShift; - register PixelType bits; - register PixelType bits1; - register int nl; /* temp copy of nlMiddle */ - - int careful; - int depthSrc; - int depthDst; - - MROP_INITIALIZE(alu,0); - - afbGetPixelWidthSizeDepthAndPointer(pSrc, widthSrc, sizeSrc, depthSrc, - psrcBase); - afbGetPixelWidthSizeDepthAndPointer(pDst, widthDst, sizeDst, depthDst, - pdstBase); - - /* Special case where depth of dest pixmap is 1 but source pixmap isn't - * Used for GetImage to copy a plane from a source pixmap to a particular - * dest pixmap plane. - * Note: planemask should have only one bit set or several planes from - * the source will be copied to the same dest plane. - */ - if (depthDst == 1 && depthDst != depthSrc) - sizeDst = 0; - - /* XXX we have to err on the side of safety when both are windows, - * because we don't know if IncludeInferiors is being used. - */ - careful = ((pSrc == pDst) || - ((pSrc->type == DRAWABLE_WINDOW) && - (pDst->type == DRAWABLE_WINDOW))); - - pbox = REGION_RECTS(prgnDst); - nbox = REGION_NUM_RECTS(prgnDst); - - pboxNew1 = NULL; - pptNew1 = NULL; - pboxNew2 = NULL; - pptNew2 = NULL; - if (careful && (pptSrc->y < pbox->y1)) { - /* walk source botttom to top */ - ydir = -1; - widthSrc = -widthSrc; - widthDst = -widthDst; - - if (nbox > 1) { - /* keep ordering in each band, reverse order of bands */ - pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec)*nbox); - if(!pboxNew1) - return; - pptNew1 = (DDXPointPtr)xalloc(sizeof(DDXPointRec)*nbox); - if(!pptNew1) { - xfree(pboxNew1); - return; - } - pboxBase = pboxNext = pbox+nbox-1; - while (pboxBase >= pbox) { - while ((pboxNext >= pbox) && - (pboxBase->y1 == pboxNext->y1)) - pboxNext--; - pboxTmp = pboxNext+1; - pptTmp = pptSrc + (pboxTmp - pbox); - while (pboxTmp <= pboxBase) { - *pboxNew1++ = *pboxTmp++; - *pptNew1++ = *pptTmp++; - } - pboxBase = pboxNext; - } - pboxNew1 -= nbox; - pbox = pboxNew1; - pptNew1 -= nbox; - pptSrc = pptNew1; - } - } else { - /* walk source top to bottom */ - ydir = 1; - } - - if (careful && (pptSrc->x < pbox->x1)) { - /* walk source right to left */ - xdir = -1; - - if (nbox > 1) { - /* reverse order of rects in each band */ - pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox); - pptNew2 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox); - if(!pboxNew2 || !pptNew2) { - if (pptNew2) - xfree(pptNew2); - if (pboxNew2) - xfree(pboxNew2); - if (pboxNew1) { - xfree(pptNew1); - xfree(pboxNew1); - } - return; - } - pboxBase = pboxNext = pbox; - while (pboxBase < pbox+nbox) { - while ((pboxNext < pbox+nbox) && (pboxNext->y1 == pboxBase->y1)) - pboxNext++; - pboxTmp = pboxNext; - pptTmp = pptSrc + (pboxTmp - pbox); - while (pboxTmp != pboxBase) { - *pboxNew2++ = *--pboxTmp; - *pptNew2++ = *--pptTmp; - } - pboxBase = pboxNext; - } - pboxNew2 -= nbox; - pbox = pboxNew2; - pptNew2 -= nbox; - pptSrc = pptNew2; - } - } else { - /* walk source left to right */ - xdir = 1; - } - - while(nbox--) { - int d; - for (d = 0; d < depthSrc; d++) { - PixelType *psrcB; - PixelType *pdstB; - - if (!(planemask & (1 << d))) - continue; - - psrcB = psrcBase + sizeSrc * d; /* @@@ NEXT PLANE @@@ */ - pdstB = pdstBase + sizeDst * d; /* @@@ NEXT PLANE @@@ */ - - w = pbox->x2 - pbox->x1; - h = pbox->y2 - pbox->y1; - - if (ydir == -1) { /* start at last scanline of rectangle */ - psrcLine = afbScanlineDeltaSrc(psrcB, -(pptSrc->y+h-1), widthSrc); - pdstLine = afbScanlineDeltaDst(pdstB, -(pbox->y2-1), widthDst); - } else { /* start at first scanline */ - psrcLine = afbScanlineDeltaSrc(psrcB, pptSrc->y, widthSrc); - pdstLine = afbScanlineDeltaDst(pdstB, pbox->y1, widthDst); - } - if ((pbox->x1 & PIM) + w <= PPW) { - maskpartialbits (pbox->x1, w, startmask); - endmask = 0; - nlMiddle = 0; - } else { - maskbits(pbox->x1, w, startmask, endmask, nlMiddle); - } - if (xdir == 1) { - xoffSrc = pptSrc->x & PIM; - xoffDst = pbox->x1 & PIM; - pdstLine += (pbox->x1 >> PWSH); - psrcLine += (pptSrc->x >> PWSH); -#ifdef DO_UNALIGNED_BITBLT - nl = xoffSrc - xoffDst; - psrcLine = (PixelType *)(((unsigned char *) psrcLine) + nl); -#else - if (xoffSrc == xoffDst) -#endif - { - while (h--) { - psrc = psrcLine; - pdst = pdstLine; - if (startmask) { - *pdst = MROP_MASK(*psrc, *pdst, startmask); - psrc++; - pdst++; - } - nl = nlMiddle; - -#ifdef LARGE_INSTRUCTION_CACHE -#ifdef FAST_CONSTANT_OFFSET_MODE - - psrc += nl & (UNROLL-1); - pdst += nl & (UNROLL-1); - -#define BodyOdd(n) pdst[-n] = MROP_SOLID (psrc[-n], pdst[-n]); -#define BodyEven(n) pdst[-n] = MROP_SOLID (psrc[-n], pdst[-n]); - -#define LoopReset \ -pdst += UNROLL; \ -psrc += UNROLL; - -#else - -#define BodyOdd(n) *pdst = MROP_SOLID (*psrc, *pdst); pdst++; psrc++; -#define BodyEven(n) BodyOdd(n) - -#define LoopReset ; - -#endif - PackedLoop - -#undef BodyOdd -#undef BodyEven -#undef LoopReset - -#else -#ifdef NOTDEF - /* you'd think this would be faster -- - * a single instruction instead of 6 - * but measurements show it to be ~15% slower - */ - while ((nl -= 6) >= 0) { - asm ("moveml %1+,#0x0c0f;moveml#0x0c0f,%0" - : "=m" (*(char *)pdst) - : "m" (*(char *)psrc) - : "d0", "d1", "d2", "d3", - "a2", "a3"); - pdst += 6; - } - nl += 6; - while (nl--) - *pdst++ = *psrc++; -#endif - DuffL(nl, label1, - *pdst = MROP_SOLID (*psrc, *pdst); - pdst++; psrc++;) -#endif - - if (endmask) - *pdst = MROP_MASK(*psrc, *pdst, endmask); - afbScanlineIncDst(pdstLine, widthDst); - afbScanlineIncSrc(psrcLine, widthSrc); - } - } -#ifndef DO_UNALIGNED_BITBLT - else { - if (xoffSrc > xoffDst) { - leftShift = (xoffSrc - xoffDst); - rightShift = PPW - leftShift; - } else { - rightShift = (xoffDst - xoffSrc); - leftShift = PPW - rightShift; - } - while (h--) { - psrc = psrcLine; - pdst = pdstLine; - bits = 0; - if (xoffSrc > xoffDst) - bits = *psrc++; - if (startmask) { - bits1 = BitLeft(bits,leftShift); - bits = *psrc++; - bits1 |= BitRight(bits,rightShift); - *pdst = MROP_MASK(bits1, *pdst, startmask); - pdst++; - } - nl = nlMiddle; - -#ifdef LARGE_INSTRUCTION_CACHE - bits1 = bits; - -#ifdef FAST_CONSTANT_OFFSET_MODE - - psrc += nl & (UNROLL-1); - pdst += nl & (UNROLL-1); - -#define BodyOdd(n) \ -bits = psrc[-n]; \ -pdst[-n] = MROP_SOLID(BitLeft(bits1, leftShift) | BitRight(bits, rightShift), pdst[-n]); - -#define BodyEven(n) \ -bits1 = psrc[-n]; \ -pdst[-n] = MROP_SOLID(BitLeft(bits, leftShift) | BitRight(bits1, rightShift), pdst[-n]); - -#define LoopReset \ -pdst += UNROLL; \ -psrc += UNROLL; - -#else - -#define BodyOdd(n) \ -bits = *psrc++; \ -*pdst = MROP_SOLID(BitLeft(bits1, leftShift) | BitRight(bits, rightShift), *pdst); \ -pdst++; - -#define BodyEven(n) \ -bits1 = *psrc++; \ -*pdst = MROP_SOLID(BitLeft(bits, leftShift) | BitRight(bits1, rightShift), *pdst); \ -pdst++; - -#define LoopReset ; - -#endif /* !FAST_CONSTANT_OFFSET_MODE */ - - PackedLoop - -#undef BodyOdd -#undef BodyEven -#undef LoopReset - -#else - DuffL(nl,label2, - bits1 = BitLeft(bits, leftShift); - bits = *psrc++; - *pdst = MROP_SOLID (bits1 | BitRight(bits, rightShift), *pdst); - pdst++; - ) -#endif - - if (endmask) { - bits1 = BitLeft(bits, leftShift); - if (BitLeft(endmask, rightShift)) { - bits = *psrc; - bits1 |= BitRight(bits, rightShift); - } - *pdst = MROP_MASK (bits1, *pdst, endmask); - } - afbScanlineIncDst(pdstLine, widthDst); - afbScanlineIncSrc(psrcLine, widthSrc); - } - } -#endif /* DO_UNALIGNED_BITBLT */ - } else { /* xdir == -1 */ - xoffSrc = (pptSrc->x + w - 1) & PIM; - xoffDst = (pbox->x2 - 1) & PIM; - pdstLine += ((pbox->x2-1) >> PWSH) + 1; - psrcLine += ((pptSrc->x+w - 1) >> PWSH) + 1; -#ifdef DO_UNALIGNED_BITBLT - nl = xoffSrc - xoffDst; - psrcLine = (PixelType *) - (((unsigned char *) psrcLine) + nl); -#else - if (xoffSrc == xoffDst) -#endif - { - while (h--) { - psrc = psrcLine; - pdst = pdstLine; - if (endmask) { - pdst--; - psrc--; - *pdst = MROP_MASK (*psrc, *pdst, endmask); - } - nl = nlMiddle; - -#ifdef LARGE_INSTRUCTION_CACHE -#ifdef FAST_CONSTANT_OFFSET_MODE - psrc -= nl & (UNROLL - 1); - pdst -= nl & (UNROLL - 1); - -#define BodyOdd(n) pdst[n-1] = MROP_SOLID (psrc[n-1], pdst[n-1]); - -#define BodyEven(n) BodyOdd(n) - -#define LoopReset \ -pdst -= UNROLL;\ -psrc -= UNROLL; - -#else - -#define BodyOdd(n) --pdst; --psrc; *pdst = MROP_SOLID(*psrc, *pdst); -#define BodyEven(n) BodyOdd(n) -#define LoopReset ; - -#endif - PackedLoop - -#undef BodyOdd -#undef BodyEven -#undef LoopReset - -#else - DuffL(nl,label3, - --pdst; --psrc; *pdst = MROP_SOLID (*psrc, *pdst);) -#endif - - if (startmask) { - --pdst; - --psrc; - *pdst = MROP_MASK(*psrc, *pdst, startmask); - } - afbScanlineIncDst(pdstLine, widthDst); - afbScanlineIncSrc(psrcLine, widthSrc); - } - } -#ifndef DO_UNALIGNED_BITBLT - else { - if (xoffDst > xoffSrc) { - rightShift = (xoffDst - xoffSrc); - leftShift = PPW - rightShift; - } else { - leftShift = (xoffSrc - xoffDst); - rightShift = PPW - leftShift; - } - while (h--) { - psrc = psrcLine; - pdst = pdstLine; - bits = 0; - if (xoffDst > xoffSrc) - bits = *--psrc; - if (endmask) { - bits1 = BitRight(bits, rightShift); - bits = *--psrc; - bits1 |= BitLeft(bits, leftShift); - pdst--; - *pdst = MROP_MASK(bits1, *pdst, endmask); - } - nl = nlMiddle; - -#ifdef LARGE_INSTRUCTION_CACHE - bits1 = bits; -#ifdef FAST_CONSTANT_OFFSET_MODE - psrc -= nl & (UNROLL - 1); - pdst -= nl & (UNROLL - 1); - -#define BodyOdd(n) \ -bits = psrc[n-1]; \ -pdst[n-1] = MROP_SOLID(BitRight(bits1, rightShift) | BitLeft(bits, leftShift),pdst[n-1]); - -#define BodyEven(n) \ -bits1 = psrc[n-1]; \ -pdst[n-1] = MROP_SOLID(BitRight(bits, rightShift) | BitLeft(bits1, leftShift),pdst[n-1]); - -#define LoopReset \ -pdst -= UNROLL; \ -psrc -= UNROLL; - -#else - -#define BodyOdd(n) \ -bits = *--psrc; --pdst; \ -*pdst = MROP_SOLID(BitRight(bits1, rightShift) | BitLeft(bits, leftShift),*pdst); - -#define BodyEven(n) \ -bits1 = *--psrc; --pdst; \ -*pdst = MROP_SOLID(BitRight(bits, rightShift) | BitLeft(bits1, leftShift),*pdst); - -#define LoopReset ; - -#endif - - PackedLoop - -#undef BodyOdd -#undef BodyEven -#undef LoopReset - -#else - DuffL(nl, label4, - bits1 = BitRight(bits, rightShift); - bits = *--psrc; - --pdst; - *pdst = MROP_SOLID(bits1 | BitLeft(bits, leftShift),*pdst); - ) -#endif - - if (startmask) { - bits1 = BitRight(bits, rightShift); - if (BitRight (startmask, leftShift)) { - bits = *--psrc; - bits1 |= BitLeft(bits, leftShift); - } - --pdst; - *pdst = MROP_MASK(bits1, *pdst, startmask); - } - afbScanlineIncDst(pdstLine, widthDst); - afbScanlineIncSrc(psrcLine, widthSrc); - } - } -#endif - } - } - pbox++; - pptSrc++; - } - if (pboxNew2) { - xfree(pptNew2); - xfree(pboxNew2); - } - if (pboxNew1) { - xfree(pptNew1); - xfree(pboxNew1); - } -} diff --git a/afb/afbbres.c b/afb/afbbres.c deleted file mode 100644 index dae4746a0..000000000 --- a/afb/afbbres.c +++ /dev/null @@ -1,323 +0,0 @@ -/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include "misc.h" -#include "afb.h" -#include "maskbits.h" -#include "miline.h" - -/* Solid bresenham line */ -/* NOTES - e2 is used less often than e1, so it's not in a register -*/ - -void -afbBresS(addrlbase, nlwidth, sizeDst, depthDst, signdx, signdy, axis, x1, y1, - e, e1, e2, len, rrops) -PixelType *addrlbase; /* pointer to base of bitmap */ -int nlwidth; /* width in longwords of bitmap */ -int sizeDst; -int depthDst; -int signdx, signdy; /* signs of directions */ -int axis; /* major axis (Y_AXIS or X_AXIS) */ -int x1, y1; /* initial point */ -register int e; /* error accumulator */ -register int e1; /* bresenham increments */ -int e2; -int len; /* length of line */ -unsigned char *rrops; -{ - register int yinc; /* increment to next scanline, in bytes */ - register PixelType *addrl; /* bitmask long pointer */ - register PixelType bit; /* current bit being set/cleared/etc. */ - PixelType leftbit = mfbGetmask(0); /* leftmost bit to process in new word */ - PixelType rightbit = mfbGetmask(PPW-1); /* rightmost bit to process in new word */ - - register int e3 = e2-e1; - PixelType tmp; - int saveE; - int saveLen; - int d; - - /* point to longword containing first point */ - yinc = signdy * nlwidth; - e = e-e1; /* to make looping easier */ - - if (!len) - return; - - saveLen = len; - saveE = e; - - for (d = 0; d < depthDst; d++) { - addrl = afbScanline(addrlbase, x1, y1, nlwidth); - addrlbase += sizeDst; /* @@@ NEXT PLANE @@@ */ - len = saveLen; - e = saveE; - bit = mfbGetmask(x1 & PIM); - - switch (rrops[d]) { - case RROP_BLACK: - if (axis == X_AXIS) { - if (signdx > 0) { - tmp = *addrl; - for (;;) { - tmp &= ~bit; - if (!--len) - break; - bit = SCRRIGHT(bit,1); - e += e1; - if (e >= 0) { - *addrl = tmp; - afbScanlineInc(addrl, yinc); - e += e3; - if (!bit) { - bit = leftbit; - addrl ++; - } - tmp = *addrl; - } else if (!bit) { - *addrl = tmp; - bit = leftbit; - addrl ++; - tmp = *addrl; - } - } - *addrl = tmp; - } else { - tmp = *addrl; - for (;;) { - tmp &= ~bit; - if (!--len) - break; - e += e1; - bit = SCRLEFT(bit,1); - if (e >= 0) { - *addrl = tmp; - afbScanlineInc(addrl, yinc); - e += e3; - if (!bit) { - bit = rightbit; - addrl --; - } - tmp = *addrl; - } else if (!bit) { - *addrl = tmp; - bit = rightbit; - addrl --; - tmp = *addrl; - } - } - *addrl = tmp; - } - } /* if X_AXIS */ else { - if (signdx > 0) { - while(len--) { - *addrl &= ~bit; - e += e1; - if (e >= 0) { - bit = SCRRIGHT(bit,1); - if (!bit) { bit = leftbit;addrl ++; } - e += e3; - } - afbScanlineInc(addrl, yinc); - } - } else { - while(len--) { - *addrl &= ~bit; - e += e1; - if (e >= 0) { - bit = SCRLEFT(bit,1); - if (!bit) { bit = rightbit;addrl --; } - e += e3; - } - afbScanlineInc(addrl, yinc); - } - } - } /* else Y_AXIS */ - break; - - case RROP_WHITE: - if (axis == X_AXIS) { - if (signdx > 0) { - tmp = *addrl; - for (;;) { - tmp |= bit; - if (!--len) - break; - e += e1; - bit = SCRRIGHT(bit,1); - if (e >= 0) { - *addrl = tmp; - afbScanlineInc(addrl, yinc); - e += e3; - if (!bit) { - bit = leftbit; - addrl ++; - } - tmp = *addrl; - } else if (!bit) { - *addrl = tmp; - bit = leftbit; - addrl ++; - tmp = *addrl; - } - } - *addrl = tmp; - } else { - tmp = *addrl; - for (;;) { - tmp |= bit; - if (!--len) - break; - e += e1; - bit = SCRLEFT(bit,1); - if (e >= 0) { - *addrl = tmp; - afbScanlineInc(addrl, yinc); - e += e3; - if (!bit) { - bit = rightbit; - addrl --; - } - tmp = *addrl; - } else if (!bit) { - *addrl = tmp; - bit = rightbit; - addrl --; - tmp = *addrl; - } - } - *addrl = tmp; - } - } /* if X_AXIS */ else { - if (signdx > 0) { - while(len--) { - *addrl |= bit; - e += e1; - if (e >= 0) { - bit = SCRRIGHT(bit,1); - if (!bit) { bit = leftbit;addrl ++; } - e += e3; - } - afbScanlineInc(addrl, yinc); - } - } else { - while(len--) { - *addrl |= bit; - e += e1; - if (e >= 0) { - bit = SCRLEFT(bit,1); - if (!bit) { bit = rightbit;addrl --; } - e += e3; - } - afbScanlineInc(addrl, yinc); - } - } - } /* else Y_AXIS */ - break; - - case RROP_INVERT: - if (axis == X_AXIS) { - if (signdx > 0) { - while(len--) { - *addrl ^= bit; - e += e1; - if (e >= 0) { - afbScanlineInc(addrl, yinc); - e += e3; - } - bit = SCRRIGHT(bit,1); - if (!bit) { bit = leftbit;addrl ++; } - } - } else { - while(len--) { - *addrl ^= bit; - e += e1; - if (e >= 0) { - afbScanlineInc(addrl, yinc); - e += e3; - } - bit = SCRLEFT(bit,1); - if (!bit) { bit = rightbit;addrl --; } - } - } - } /* if X_AXIS */ else { - if (signdx > 0) { - while(len--) { - *addrl ^= bit; - e += e1; - if (e >= 0) { - bit = SCRRIGHT(bit,1); - if (!bit) { bit = leftbit;addrl ++; } - e += e3; - } - afbScanlineInc(addrl, yinc); - } - } else { - while(len--) { - *addrl ^= bit; - e += e1; - if (e >= 0) { - bit = SCRLEFT(bit,1); - if (!bit) { bit = rightbit; addrl --; } - e += e3; - } - afbScanlineInc(addrl, yinc); - } - } - } /* else Y_AXIS */ - } /* switch */ - } /* for (d = ... ) */ -} diff --git a/afb/afbbresd.c b/afb/afbbresd.c deleted file mode 100644 index 4f07ede6c..000000000 --- a/afb/afbbresd.c +++ /dev/null @@ -1,214 +0,0 @@ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include "misc.h" -#include "afb.h" -#include "maskbits.h" -#include "miline.h" - -/* Dashed bresenham line */ - -#define StepDash\ - if (!--dashRemaining) { \ - if (++ dashIndex == numInDashList) \ - dashIndex = 0; \ - dashRemaining = pDash[dashIndex]; \ - rop = fgrop; \ - if (dashIndex & 1) \ - rop = bgrop; \ - } - -void -afbBresD(pdashIndex, pDash, numInDashList, pdashOffset, isDoubleDash, - addrlbase, nlwidth, sizeDst, depthDst, - signdx, signdy, axis, x1, y1, e, e1, e2, len, rrops, bgrrops) -int *pdashIndex; /* current dash */ -unsigned char *pDash; /* dash list */ -int numInDashList; /* total length of dash list */ -int *pdashOffset; /* offset into current dash */ -int isDoubleDash; -PixelType *addrlbase; /* pointer to base of bitmap */ -int nlwidth; /* width in longwords of bitmap */ -int sizeDst; -int depthDst; -int signdx, signdy; /* signs of directions */ -int axis; /* major axis (Y_AXIS or X_AXIS) */ -int x1, y1; /* initial point */ -register int e; /* error accumulator */ -register int e1; /* bresenham increments */ -int e2; -int len; /* length of line */ -unsigned char *rrops; -unsigned char *bgrrops; -{ - register int yinc; /* increment to next scanline, in bytes */ - register PixelType *addrl; - register int e3 = e2-e1; - register unsigned long bit; - PixelType leftbit = mfbGetmask(0); /* leftmost bit to process in new word */ - PixelType rightbit = mfbGetmask(PPW-1); /* rightmost bit to process in new word */ - int dashIndex; - int dashOffset; - int dashRemaining; - int rop; - int fgrop; - int bgrop; - int saveE; - int saveLen; - int d; - - dashOffset = *pdashOffset; - dashIndex = *pdashIndex; - dashRemaining = pDash[dashIndex] - dashOffset; - /* point to longword containing first point */ - - yinc = signdy * nlwidth; - e = e-e1; /* to make looping easier */ - - saveE = e; - saveLen = len; - - for (d = 0; d < depthDst; d++) { - addrl = afbScanline(addrlbase, x1, y1, nlwidth); - addrlbase += sizeDst; /* @@@ NEXT PLANE @@@ */ - - fgrop = rrops[d]; - bgrop = bgrrops[d]; - - e = saveE; - len = saveLen; - bit = mfbGetmask(x1 & PIM); - - rop = fgrop; - if (!isDoubleDash) - bgrop = -1; - if (dashIndex & 1) - rop = bgrop; - - if (axis == X_AXIS) { - if (signdx > 0) { - while(len--) { - if (rop == RROP_BLACK) - *addrl &= ~bit; - else if (rop == RROP_WHITE) - *addrl |= bit; - else if (rop == RROP_INVERT) - *addrl ^= bit; - e += e1; - if (e >= 0) { - afbScanlineInc(addrl, yinc); - e += e3; - } - bit = SCRRIGHT(bit,1); - if (!bit) { bit = leftbit;addrl ++; } - StepDash - } - } else { - while(len--) { - if (rop == RROP_BLACK) - *addrl &= ~bit; - else if (rop == RROP_WHITE) - *addrl |= bit; - else if (rop == RROP_INVERT) - *addrl ^= bit; - e += e1; - if (e >= 0) { - afbScanlineInc(addrl, yinc); - e += e3; - } - bit = SCRLEFT(bit,1); - if (!bit) { bit = rightbit;addrl --; } - StepDash - } - } - } /* if X_AXIS */ else { - if (signdx > 0) { - while(len--) { - if (rop == RROP_BLACK) - *addrl &= ~bit; - else if (rop == RROP_WHITE) - *addrl |= bit; - else if (rop == RROP_INVERT) - *addrl ^= bit; - e += e1; - if (e >= 0) { - bit = SCRRIGHT(bit,1); - if (!bit) { bit = leftbit;addrl ++; } - e += e3; - } - afbScanlineInc(addrl, yinc); - StepDash - } - } else { - while(len--) { - if (rop == RROP_BLACK) - *addrl &= ~bit; - else if (rop == RROP_WHITE) - *addrl |= bit; - else if (rop == RROP_INVERT) - *addrl ^= bit; - e += e1; - if (e >= 0) { - bit = SCRLEFT(bit,1); - if (!bit) { bit = rightbit;addrl --; } - e += e3; - } - afbScanlineInc(addrl, yinc); - StepDash - } - } - } /* else Y_AXIS */ - } /* for (d = ...) */ - *pdashIndex = dashIndex; - *pdashOffset = pDash[dashIndex] - dashRemaining; -} diff --git a/afb/afbclip.c b/afb/afbclip.c deleted file mode 100644 index 15be4051c..000000000 --- a/afb/afbclip.c +++ /dev/null @@ -1,248 +0,0 @@ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include - -#include -#include "regionstr.h" -#include "pixmapstr.h" -#include "scrnintstr.h" -#include "gc.h" -#include "maskbits.h" -#include "mi.h" -#include "afb.h" - -#define ADDRECT(reg,r,fr,rx1,ry1,rx2,ry2) \ -if (((rx1) < (rx2)) && ((ry1) < (ry2)) && \ - (!((reg)->data->numRects && \ - ((r-1)->y1 == (ry1)) && \ - ((r-1)->y2 == (ry2)) && \ - ((r-1)->x1 <= (rx1)) && \ - ((r-1)->x2 >= (rx2))))) \ -{ \ - if ((reg)->data->numRects == (reg)->data->size) \ - { \ - miRectAlloc(reg, 1); \ - fr = REGION_BOXPTR(reg); \ - r = fr + (reg)->data->numRects; \ - } \ - r->x1 = (rx1); \ - r->y1 = (ry1); \ - r->x2 = (rx2); \ - r->y2 = (ry2); \ - (reg)->data->numRects++; \ - if(r->x1 < (reg)->extents.x1) \ - (reg)->extents.x1 = r->x1; \ - if(r->x2 > (reg)->extents.x2) \ - (reg)->extents.x2 = r->x2; \ - r++; \ -} - -/* Convert bitmap clip mask into clipping region. - * First, goes through each line and makes boxes by noting the transitions - * from 0 to 1 and 1 to 0. - * Then it coalesces the current line with the previous if they have boxes - * at the same X coordinates. - */ -RegionPtr -afbPixmapToRegion(pPix) - PixmapPtr pPix; -{ - register RegionPtr pReg; - register PixelType *pw, w; - register int ib; - int width, h, base, rx1 = 0, crects; - PixelType *pwLineEnd; - int irectPrevStart, irectLineStart; - register BoxPtr prectO, prectN; - BoxPtr FirstRect, rects, prectLineStart; - Bool fInBox, fSame; - register PixelType mask0 = mfbGetmask(0); - PixelType *pwLine; - int nWidth; - - pReg = REGION_CREATE(pPix->drawable.pScreen, NULL, 1); - if(!pReg) - return NullRegion; - FirstRect = REGION_BOXPTR(pReg); - rects = FirstRect; - - pwLine = (PixelType *) pPix->devPrivate.ptr; - nWidth = pPix->devKind / PGSZB; - - width = pPix->drawable.width; - pReg->extents.x1 = width - 1; - pReg->extents.x2 = 0; - irectPrevStart = -1; - for(h = 0; h < pPix->drawable.height; h++) { - pw = pwLine; - pwLine += nWidth; - irectLineStart = rects - FirstRect; - /* If the Screen left most bit of the word is set, we're starting in - * a box */ - if(*pw & mask0) { - fInBox = TRUE; - rx1 = 0; - } - else - fInBox = FALSE; - /* Process all words which are fully in the pixmap */ - pwLineEnd = pw + (width >> PWSH); - for (base = 0; pw < pwLineEnd; base += PPW) { - w = *pw++; - if (fInBox) { - if (!~w) - continue; - } else { - if (!w) - continue; - } - for(ib = 0; ib < PPW; ib++) { - /* If the Screen left most bit of the word is set, we're - * starting a box */ - if(w & mask0) { - if(!fInBox) { - rx1 = base + ib; - /* start new box */ - fInBox = TRUE; - } - } else { - if(fInBox) { - /* end box */ - ADDRECT(pReg, rects, FirstRect, - rx1, h, base + ib, h + 1); - fInBox = FALSE; - } - } - /* Shift the word VISUALLY left one. */ - w = SCRLEFT(w, 1); - } - } - if(width & PIM) { - /* Process final partial word on line */ - w = *pw++; - for(ib = 0; ib < (width & PIM); ib++) { - /* If the Screen left most bit of the word is set, we're - * starting a box */ - if(w & mask0) { - if(!fInBox) { - rx1 = base + ib; - /* start new box */ - fInBox = TRUE; - } - } else { - if(fInBox) { - /* end box */ - ADDRECT(pReg, rects, FirstRect, - rx1, h, base + ib, h + 1); - fInBox = FALSE; - } - } - /* Shift the word VISUALLY left one. */ - w = SCRLEFT(w, 1); - } - } - /* If scanline ended with last bit set, end the box */ - if(fInBox) { - ADDRECT(pReg, rects, FirstRect, - rx1, h, base + (width & PIM), h + 1); - } - /* if all rectangles on this line have the same x-coords as - * those on the previous line, then add 1 to all the previous y2s and - * throw away all the rectangles from this line - */ - fSame = FALSE; - if(irectPrevStart != -1) { - crects = irectLineStart - irectPrevStart; - if(crects == ((rects - FirstRect) - irectLineStart)) { - prectO = FirstRect + irectPrevStart; - prectN = prectLineStart = FirstRect + irectLineStart; - fSame = TRUE; - while(prectO < prectLineStart) { - if((prectO->x1 != prectN->x1) || (prectO->x2 != prectN->x2)) { - fSame = FALSE; - break; - } - prectO++; - prectN++; - } - if (fSame) { - prectO = FirstRect + irectPrevStart; - while(prectO < prectLineStart) { - prectO->y2 += 1; - prectO++; - } - rects -= crects; - pReg->data->numRects -= crects; - } - } - } - if(!fSame) - irectPrevStart = irectLineStart; - } - if (!pReg->data->numRects) - pReg->extents.x1 = pReg->extents.x2 = 0; - else - { - pReg->extents.y1 = REGION_BOXPTR(pReg)->y1; - pReg->extents.y2 = REGION_END(pReg)->y2; - if (pReg->data->numRects == 1) { - xfree(pReg->data); - pReg->data = (RegDataPtr)NULL; - } - } -#ifdef DEBUG - if (!miValidRegion(pReg)) - FatalError("Assertion failed file %s, line %d: expr\n", __FILE__, __LINE__); -#endif - return(pReg); -} diff --git a/afb/afbcmap.c b/afb/afbcmap.c deleted file mode 100644 index 9608a3653..000000000 --- a/afb/afbcmap.c +++ /dev/null @@ -1,84 +0,0 @@ -/************************************************************ -Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, provided that the above copyright no- -tice appear in all copies and that both that copyright no- -tice and this permission notice appear in supporting docu- -mentation, and that the names of Sun or X Consortium -not be used in advertising or publicity pertaining to -distribution of the software without specific prior -written permission. Sun and X Consortium make no -representations about the suitability of this software for -any purpose. It is provided "as is" without any express or -implied warranty. - -SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- -NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE LI- -ABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH -THE USE OR PERFORMANCE OF THIS SOFTWARE. - -********************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "scrnintstr.h" -#include "colormapst.h" -#include "resource.h" -#include "micmap.h" -#include "afb.h" - -int -afbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps) -{ - return miListInstalledColormaps(pScreen, pmaps); -} - - -void -afbInstallColormap(ColormapPtr pmap) -{ - miInstallColormap(pmap); -} - -void -afbUninstallColormap(ColormapPtr pmap) -{ - miUninstallColormap(pmap); -} - -void -afbResolveColor(short unsigned int *pred, short unsigned int *pgreen, short unsigned int *pblue, register VisualPtr pVisual) -{ - miResolveColor(pred, pgreen, pblue, pVisual); -} - -Bool -afbInitializeColormap(register ColormapPtr pmap) -{ - return miInitializeColormap(pmap); -} - -/* - * Given a list of formats for a screen, create a list - * of visuals and depths for the screen which correspond to - * the set which can be used with this version of afb. - */ - -Bool -afbInitVisuals(VisualPtr *visualp, DepthPtr *depthp, int *nvisualp, int *ndepthp, int *rootDepthp, VisualID *defaultVisp, long unsigned int sizes, int bitsPerRGB) -{ - return miInitVisuals(visualp, depthp, nvisualp, ndepthp, rootDepthp, - defaultVisp, sizes, bitsPerRGB, -1); -} diff --git a/afb/afbfillarc.c b/afb/afbfillarc.c deleted file mode 100644 index cfc3133ee..000000000 --- a/afb/afbfillarc.c +++ /dev/null @@ -1,347 +0,0 @@ -/************************************************************ - -Copyright (c) 1989 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -********************************************************/ - - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "regionstr.h" -#include "gcstruct.h" -#include "pixmapstr.h" -#include "scrnintstr.h" -#include "afb.h" -#include "maskbits.h" -#include "mifillarc.h" -#include "mi.h" - -static void -afbFillEllipseSolid(DrawablePtr pDraw, xArc *arc, register unsigned char *rrops) -{ - int x, y, e; - int yk, xk, ym, xm, dx, dy, xorg, yorg; - register int slw; - miFillArcRec info; - PixelType *addrlt, *addrlb; - register PixelType *pdst; - PixelType *addrl; - register int n; - register int d; - int nlwidth; - register int xpos; - PixelType startmask, endmask; - int nlmiddle; - int depthDst; - int sizeDst; - - afbGetPixelWidthSizeDepthAndPointer(pDraw, nlwidth, sizeDst, depthDst, - addrlt); - miFillArcSetup(arc, &info); - MIFILLARCSETUP(); - xorg += pDraw->x; - yorg += pDraw->y; - addrlb = addrlt; - addrlt += nlwidth * (yorg - y); - addrlb += nlwidth * (yorg + y + dy); - while (y) { - addrlt += nlwidth; - addrlb -= nlwidth; - MIFILLARCSTEP(slw); - if (!slw) - continue; - xpos = xorg - x; - pdst = addrl = afbScanlineOffset(addrlt, (xpos >> PWSH)); - if (((xpos & PIM) + slw) < PPW) { - maskpartialbits(xpos, slw, startmask); - for (d = 0; d < depthDst; d++, pdst += sizeDst) { /* @@@ NEXT PLANE @@@ */ - switch (rrops[d]) { - case RROP_BLACK: - *pdst &= ~startmask; - break; - case RROP_WHITE: - *pdst |= startmask; - break; - case RROP_INVERT: - *pdst ^= startmask; - break; - case RROP_NOP: - break; - } - } - if (miFillArcLower(slw)) { - pdst = afbScanlineOffset(addrlb, (xpos >> PWSH)); - - for (d = 0; d < depthDst; d++, pdst += sizeDst) { /* @@@ NEXT PLANE @@@ */ - switch (rrops[d]) { - case RROP_BLACK: - *pdst &= ~startmask; - break; - case RROP_WHITE: - *pdst |= startmask; - break; - case RROP_INVERT: - *pdst ^= startmask; - break; - case RROP_NOP: - break; - } - } - } - continue; - } - maskbits(xpos, slw, startmask, endmask, nlmiddle); - for (d = 0; d < depthDst; d++, addrl += sizeDst) { /* @@@ NEXT PLANE @@@ */ - n = nlmiddle; - pdst = addrl; - - switch (rrops[d]) { - case RROP_BLACK: - if (startmask) - *pdst++ &= ~startmask; - while (n--) - *pdst++ = 0; - if (endmask) - *pdst &= ~endmask; - break; - - case RROP_WHITE: - if (startmask) - *pdst++ |= startmask; - while (n--) - *pdst++ = ~0; - if (endmask) - *pdst |= endmask; - break; - - case RROP_INVERT: - if (startmask) - *pdst++ ^= startmask; - while (n--) - *pdst++ ^= ~0; - if (endmask) - *pdst ^= endmask; - break; - - case RROP_NOP: - break; - } - } - if (!miFillArcLower(slw)) - continue; - addrl = afbScanlineOffset(addrlb, (xpos >> PWSH)); - for (d = 0; d < depthDst; d++, addrl += sizeDst) { /* @@@ NEXT PLANE @@@ */ - n = nlmiddle; - pdst = addrl; - - switch (rrops[d]) { - case RROP_BLACK: - if (startmask) - *pdst++ &= ~startmask; - while (n--) - *pdst++ = 0; - if (endmask) - *pdst &= ~endmask; - break; - - case RROP_WHITE: - if (startmask) - *pdst++ |= startmask; - while (n--) - *pdst++ = ~0; - if (endmask) - *pdst |= endmask; - break; - - case RROP_INVERT: - if (startmask) - *pdst++ ^= startmask; - while (n--) - *pdst++ ^= ~0; - if (endmask) - *pdst ^= endmask; - break; - - case RROP_NOP: - break; - } - } - } -} - -#define FILLSPAN(xl,xr,addr) \ - if (xr >= xl) { \ - width = xr - xl + 1; \ - addrl = afbScanlineOffset(addr, (xl >> PWSH)); \ - if (((xl & PIM) + width) < PPW) { \ - maskpartialbits(xl, width, startmask); \ - for (pdst = addrl, d = 0; d < depthDst; d++, pdst += sizeDst) { /* @@@ NEXT PLANE @@@ */ \ - switch (rrops[d]) { \ - case RROP_BLACK: \ - *pdst &= ~startmask; \ - break; \ - case RROP_WHITE: \ - *pdst |= startmask; \ - break; \ - case RROP_INVERT: \ - *pdst ^= startmask; \ - break; \ - case RROP_NOP: \ - break; \ - } \ - } \ - } else { \ - maskbits(xl, width, startmask, endmask, nlmiddle); \ - for (d = 0; d < depthDst; d++, addrl += sizeDst) { /* @@@ NEXT PLANE @@@ */ \ - n = nlmiddle; \ - pdst = addrl; \ - switch (rrops[d]) { \ - case RROP_BLACK: \ - if (startmask) \ - *pdst++ &= ~startmask; \ - while (n--) \ - *pdst++ = 0; \ - if (endmask) \ - *pdst &= ~endmask; \ - break; \ - case RROP_WHITE: \ - if (startmask) \ - *pdst++ |= startmask; \ - while (n--) \ - *pdst++ = ~0; \ - if (endmask) \ - *pdst |= endmask; \ - break; \ - case RROP_INVERT: \ - if (startmask) \ - *pdst++ ^= startmask; \ - while (n--) \ - *pdst++ ^= ~0; \ - if (endmask) \ - *pdst ^= endmask; \ - break; \ - case RROP_NOP: \ - break; \ - } \ - } \ - } \ - } - -#define FILLSLICESPANS(flip,addr) \ - if (!flip) { \ - FILLSPAN(xl, xr, addr); \ - } else { \ - xc = xorg - x; \ - FILLSPAN(xc, xr, addr); \ - xc += slw - 1; \ - FILLSPAN(xl, xc, addr); \ - } - -static void -afbFillArcSliceSolidCopy(DrawablePtr pDraw, GCPtr pGC, xArc *arc, register unsigned char *rrops) -{ - PixelType *addrl; - register PixelType *pdst; - register int n; - register int d; - int yk, xk, ym, xm, dx, dy, xorg, yorg, slw; - register int x, y, e; - miFillArcRec info; - miArcSliceRec slice; - int xl, xr, xc; - PixelType *addrlt, *addrlb; - int nlwidth; - int width; - PixelType startmask, endmask; - int nlmiddle; - int sizeDst; - int depthDst; - - afbGetPixelWidthSizeDepthAndPointer(pDraw, nlwidth, sizeDst, depthDst, - addrlt); - miFillArcSetup(arc, &info); - miFillArcSliceSetup(arc, &slice, pGC); - MIFILLARCSETUP(); - xorg += pDraw->x; - yorg += pDraw->y; - addrlb = addrlt; - addrlt = afbScanlineDeltaNoBankSwitch(addrlt, yorg - y, nlwidth); - addrlb = afbScanlineDeltaNoBankSwitch(addrlb, yorg + y + dy, nlwidth); - slice.edge1.x += pDraw->x; - slice.edge2.x += pDraw->x; - while (y > 0) { - afbScanlineIncNoBankSwitch(addrlt, nlwidth); - afbScanlineIncNoBankSwitch(addrlb, -nlwidth); - MIFILLARCSTEP(slw); - MIARCSLICESTEP(slice.edge1); - MIARCSLICESTEP(slice.edge2); - if (miFillSliceUpper(slice)) { - MIARCSLICEUPPER(xl, xr, slice, slw); - FILLSLICESPANS(slice.flip_top, addrlt); - } - if (miFillSliceLower(slice)) { - MIARCSLICELOWER(xl, xr, slice, slw); - FILLSLICESPANS(slice.flip_bot, addrlb); - } - } -} - -void -afbPolyFillArcSolid(register DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) -{ - afbPrivGC *priv; - register xArc *arc; - register int i; - BoxRec box; - RegionPtr cclip; - unsigned char *rrops; - - priv = (afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, - afbGCPrivateKey); - rrops = priv->rrops; - cclip = pGC->pCompositeClip; - for (arc = parcs, i = narcs; --i >= 0; arc++) { - if (miFillArcEmpty(arc)) - continue; - if (miCanFillArc(arc)) { - box.x1 = arc->x + pDraw->x; - box.y1 = arc->y + pDraw->y; - box.x2 = box.x1 + (int)arc->width + 1; - box.y2 = box.y1 + (int)arc->height + 1; - if (RECT_IN_REGION(pDraw->pScreen, cclip, &box) == rgnIN) { - if ((arc->angle2 >= FULLCIRCLE) || - (arc->angle2 <= -FULLCIRCLE)) - afbFillEllipseSolid(pDraw, arc, rrops); - else - afbFillArcSliceSolidCopy(pDraw, pGC, arc, rrops); - continue; - } - } - miPolyFillArc(pDraw, pGC, 1, arc); - } -} diff --git a/afb/afbfillrct.c b/afb/afbfillrct.c deleted file mode 100644 index 4dff9576f..000000000 --- a/afb/afbfillrct.c +++ /dev/null @@ -1,292 +0,0 @@ -/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "pixmapstr.h" -#include "gcstruct.h" -#include "windowstr.h" -#include "regionstr.h" -#include "scrnintstr.h" - -#include "afb.h" -#include "maskbits.h" - -#define MODEQ(a, b) ((a) %= (b)) - -/* - filled rectangles. - translate the rectangles, clip them, and call the -helper function in the GC. -*/ - -#define NUM_STACK_RECTS 1024 - -void -afbPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, xRectangle *prectInit) - - - /* number of rectangles to fill */ - /* Pointer to first rectangle to fill */ -{ - xRectangle *prect; - RegionPtr prgnClip; - register BoxPtr pbox; - register BoxPtr pboxClipped; - BoxPtr pboxClippedBase; - BoxPtr pextent; - BoxRec stackRects[NUM_STACK_RECTS]; - int numRects; - int n; - int xorg, yorg; - afbPrivGC *priv; - unsigned char *rrops; - unsigned char *rropsOS; - - priv = (afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, - afbGCPrivateKey); - prgnClip = pGC->pCompositeClip; - rrops = priv->rrops; - rropsOS = priv->rropOS; - - prect = prectInit; - xorg = pDrawable->x; - yorg = pDrawable->y; - if (xorg || yorg) { - prect = prectInit; - n = nrectFill; - Duff(n, prect->x += xorg; prect->y += yorg; prect++); - } - - prect = prectInit; - - numRects = REGION_NUM_RECTS(prgnClip) * nrectFill; - if (numRects > NUM_STACK_RECTS) { - pboxClippedBase = (BoxPtr)xalloc(numRects * sizeof(BoxRec)); - if (!pboxClippedBase) - return; - } - else - pboxClippedBase = stackRects; - - pboxClipped = pboxClippedBase; - - if (REGION_NUM_RECTS(prgnClip) == 1) { - int x1, y1, x2, y2, bx2, by2; - - pextent = REGION_RECTS(prgnClip); - x1 = pextent->x1; - y1 = pextent->y1; - x2 = pextent->x2; - y2 = pextent->y2; - while (nrectFill--) { - if ((pboxClipped->x1 = prect->x) < x1) - pboxClipped->x1 = x1; - - if ((pboxClipped->y1 = prect->y) < y1) - pboxClipped->y1 = y1; - - bx2 = (int) prect->x + (int) prect->width; - if (bx2 > x2) - bx2 = x2; - pboxClipped->x2 = bx2; - - by2 = (int) prect->y + (int) prect->height; - if (by2 > y2) - by2 = y2; - pboxClipped->y2 = by2; - - prect++; - if ((pboxClipped->x1 < pboxClipped->x2) && - (pboxClipped->y1 < pboxClipped->y2)) { - pboxClipped++; - } - } - } else { - int x1, y1, x2, y2, bx2, by2; - - pextent = REGION_EXTENTS(pGC->pScreen, prgnClip); - x1 = pextent->x1; - y1 = pextent->y1; - x2 = pextent->x2; - y2 = pextent->y2; - while (nrectFill--) { - BoxRec box; - - if ((box.x1 = prect->x) < x1) - box.x1 = x1; - - if ((box.y1 = prect->y) < y1) - box.y1 = y1; - - bx2 = (int) prect->x + (int) prect->width; - if (bx2 > x2) - bx2 = x2; - box.x2 = bx2; - - by2 = (int) prect->y + (int) prect->height; - if (by2 > y2) - by2 = y2; - box.y2 = by2; - - prect++; - - if ((box.x1 >= box.x2) || (box.y1 >= box.y2)) - continue; - - n = REGION_NUM_RECTS (prgnClip); - pbox = REGION_RECTS(prgnClip); - - /* clip the rectangle to each box in the clip region - this is logically equivalent to calling Intersect() - */ - while(n--) { - pboxClipped->x1 = max(box.x1, pbox->x1); - pboxClipped->y1 = max(box.y1, pbox->y1); - pboxClipped->x2 = min(box.x2, pbox->x2); - pboxClipped->y2 = min(box.y2, pbox->y2); - pbox++; - - /* see if clipping left anything */ - if(pboxClipped->x1 < pboxClipped->x2 && - pboxClipped->y1 < pboxClipped->y2) { - pboxClipped++; - } - } - } - } - if (pboxClipped != pboxClippedBase) { - switch (pGC->fillStyle) { - case FillSolid: - afbSolidFillArea(pDrawable, pboxClipped-pboxClippedBase, - pboxClippedBase, rrops); - break; - case FillTiled: - switch (pGC->alu) { - case GXcopy: - if (pGC->pRotatedPixmap) - afbTileAreaPPWCopy(pDrawable, pboxClipped-pboxClippedBase, - pboxClippedBase, GXcopy, - pGC->pRotatedPixmap, pGC->planemask); - else - afbTileAreaCopy (pDrawable, pboxClipped-pboxClippedBase, - pboxClippedBase, GXcopy, - pGC->tile.pixmap, - pGC->patOrg.x, pGC->patOrg.y, - pGC->planemask); - break; - - default: - if (pGC->pRotatedPixmap) - afbTileAreaPPWGeneral(pDrawable, pboxClipped-pboxClippedBase, - pboxClippedBase, pGC->alu, - pGC->pRotatedPixmap, - pGC->planemask); - else - afbTileAreaGeneral(pDrawable, pboxClipped-pboxClippedBase, - pboxClippedBase, pGC->alu, - pGC->tile.pixmap, - pGC->patOrg.x, pGC->patOrg.y, - pGC->planemask); - break; - } /* switch (alu) */ - break; - - case FillStippled: - if (pGC->pRotatedPixmap) - afbStippleAreaPPW(pDrawable, pboxClipped-pboxClippedBase, - pboxClippedBase, pGC->pRotatedPixmap, rrops); - else - afbStippleArea(pDrawable, pboxClipped-pboxClippedBase, - pboxClippedBase, pGC->stipple, - pGC->patOrg.x, pGC->patOrg.y, rrops); - break; - - case FillOpaqueStippled: - switch (pGC->alu) { - case GXcopy: - if (pGC->pRotatedPixmap) - afbOpaqueStippleAreaPPWCopy(pDrawable, pboxClipped-pboxClippedBase, - pboxClippedBase, GXcopy, - pGC->pRotatedPixmap, - rropsOS, pGC->planemask); - else - afbOpaqueStippleAreaCopy(pDrawable, pboxClipped-pboxClippedBase, - pboxClippedBase, GXcopy, - pGC->stipple, - pGC->patOrg.x, pGC->patOrg.y, rropsOS, - pGC->planemask); - break; - - default: - if (pGC->pRotatedPixmap) - afbOpaqueStippleAreaPPWGeneral(pDrawable, pboxClipped-pboxClippedBase, - pboxClippedBase, pGC->alu, - pGC->pRotatedPixmap, - rropsOS, - pGC->planemask); - else - afbOpaqueStippleAreaGeneral(pDrawable, pboxClipped-pboxClippedBase, - pboxClippedBase, pGC->alu, - pGC->stipple, - pGC->patOrg.x, pGC->patOrg.y, - rropsOS, - pGC->planemask); - break; - } /* switch (alu) */ - break; - } - } - if (pboxClippedBase != stackRects) - xfree(pboxClippedBase); -} diff --git a/afb/afbfillsp.c b/afb/afbfillsp.c deleted file mode 100644 index 16295067b..000000000 --- a/afb/afbfillsp.c +++ /dev/null @@ -1,1130 +0,0 @@ -/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "gcstruct.h" -#include "window.h" -#include "pixmapstr.h" -#include "scrnintstr.h" -#include "windowstr.h" -#include "afb.h" - -#include "maskbits.h" - -#include "mergerop.h" - -#include "servermd.h" -#include "mi.h" -#include "mispans.h" - -/* scanline filling for monochrome frame buffer - written by drewry, oct 1986 - - these routines all clip. they assume that anything that has called -them has already translated the points (i.e. pGC->miTranslate is -non-zero, which is howit gets set in afbCreateGC().) - - the number of new scnalines created by clipping == -MaxRectsPerBand * nSpans. - -*/ - - -void -afbSolidFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) - DrawablePtr pDrawable; - GCPtr pGC; - int nInit; /* number of spans to fill */ - DDXPointPtr pptInit; /* pointer to list of start points */ - int *pwidthInit; /* pointer to list of n widths */ - int fSorted; -{ - /* next three parameters are post-clip */ - int n; /* number of spans to fill */ - register DDXPointPtr ppt; /* pointer to list of start points */ - register int *pwidth; /* pointer to list of n widths */ - PixelType *addrlBase; /* pointer to start of bitmap */ - PixelType *pBase; - int nlwidth; /* width in longwords of bitmap */ - register PixelType *addrl;/* pointer to current longword in bitmap */ - register int nlmiddle; - register PixelType startmask; - register PixelType endmask; - int *pwidthFree; /* copies of the pointers to free */ - DDXPointPtr pptFree; - int depthDst; - int sizeDst; - int d; - unsigned char *rrops; - - n = nInit * miFindMaxBand(pGC->pCompositeClip); - pwidthFree = (int *)xalloc(n * sizeof(int)); - pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec)); - if(!pptFree || !pwidthFree) { - if (pptFree) xfree(pptFree); - if (pwidthFree) xfree(pwidthFree); - return; - } - pwidth = pwidthFree; - ppt = pptFree; - n = miClipSpans(pGC->pCompositeClip, pptInit, pwidthInit, nInit, - ppt, pwidth, fSorted); - - afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, - pBase); - rrops = ((afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, - afbGCPrivateKey))->rrops; - while (n--) { - addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); - - for (d = 0; d < depthDst; d++, addrlBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ - if (*pwidth) { - addrl = addrlBase; - - switch (rrops[d]) { - case RROP_BLACK: - if ( ((ppt->x & PIM) + *pwidth) < PPW) { - /* all bits inside same longword */ - maskpartialbits(ppt->x, *pwidth, startmask); - *addrl &= ~startmask; - } else { - maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); - if (startmask) - *addrl++ &= ~startmask; - Duff (nlmiddle, *addrl++ = 0x0); - if (endmask) - *addrl &= ~endmask; - } - break; - - case RROP_WHITE: - if ( ((ppt->x & PIM) + *pwidth) < PPW) { - /* all bits inside same longword */ - maskpartialbits(ppt->x, *pwidth, startmask); - *addrl |= startmask; - } else { - maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); - if (startmask) - *addrl++ |= startmask; - Duff (nlmiddle, *addrl++ = ~0); - if (endmask) - *addrl |= endmask; - } - break; - case RROP_INVERT: - if ( ((ppt->x & PIM) + *pwidth) < PPW) { - /* all bits inside same longword */ - maskpartialbits(ppt->x, *pwidth, startmask); - *addrl ^= startmask; - } else { - maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); - if (startmask) - *addrl++ ^= startmask; - Duff (nlmiddle, *addrl++ ^= ~0); - if (endmask) - *addrl ^= endmask; - } - break; - case RROP_NOP: - break; - } - } - } - pwidth++; - ppt++; - } - xfree(pptFree); - xfree(pwidthFree); -} - -void -afbStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) - DrawablePtr pDrawable; - GC *pGC; - int nInit; /* number of spans to fill */ - DDXPointPtr pptInit; /* pointer to list of start points */ - int *pwidthInit; /* pointer to list of n widths */ - int fSorted; -{ - /* next three parameters are post-clip */ - int n; /* number of spans to fill */ - register DDXPointPtr ppt; /* pointer to list of start points */ - register int *pwidth; /* pointer to list of n widths */ - PixelType *addrlBase; /* pointer to start of bitmap */ - PixelType *pBase; - int nlwidth; /* width in longwords of bitmap */ - register PixelType *addrl;/* pointer to current longword in bitmap */ - register PixelType src; - register int nlmiddle; - register PixelType startmask; - register PixelType endmask; - PixmapPtr pStipple; - PixelType *psrc; - int tileHeight; - int *pwidthFree; /* copies of the pointers to free */ - DDXPointPtr pptFree; - int d; - int depthDst; - int sizeDst; - unsigned char *rrops; - - n = nInit * miFindMaxBand(pGC->pCompositeClip); - pwidthFree = (int *)xalloc(n * sizeof(int)); - pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec)); - if(!pptFree || !pwidthFree) { - if (pptFree) xfree(pptFree); - if (pwidthFree) xfree(pwidthFree); - return; - } - pwidth = pwidthFree; - ppt = pptFree; - n = miClipSpans(pGC->pCompositeClip, pptInit, pwidthInit, nInit, - ppt, pwidth, fSorted); - - afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, - pBase); - - pStipple = pGC->pRotatedPixmap; - tileHeight = pStipple->drawable.height; - psrc = (PixelType *)(pStipple->devPrivate.ptr); - - rrops = ((afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, - afbGCPrivateKey))->rrops; - while (n--) { - src = psrc[ppt->y % tileHeight]; - addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); - for (d = 0; d < depthDst; d++, addrlBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ - addrl = addrlBase; - - switch (rrops[d]) { - case RROP_BLACK: - /* all bits inside same longword */ - if ( ((ppt->x & PIM) + *pwidth) < PPW) { - maskpartialbits(ppt->x, *pwidth, startmask); - *addrl &= ~(src & startmask); - } else { - maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); - if (startmask) - *addrl++ &= ~(src & startmask); - Duff (nlmiddle, *addrl++ &= ~src); - if (endmask) - *addrl &= ~(src & endmask); - } - break; - case RROP_WHITE: - /* all bits inside same longword */ - if ( ((ppt->x & PIM) + *pwidth) < PPW) { - maskpartialbits(ppt->x, *pwidth, startmask); - *addrl |= (src & startmask); - } else { - maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); - if (startmask) - *addrl++ |= (src & startmask); - Duff (nlmiddle, *addrl++ |= src); - if (endmask) - *addrl |= (src & endmask); - } - break; - case RROP_INVERT: - /* all bits inside same longword */ - if ( ((ppt->x & PIM) + *pwidth) < PPW) { - maskpartialbits(ppt->x, *pwidth, startmask); - *addrl ^= (src & startmask); - } else { - maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); - if (startmask) - *addrl++ ^= (src & startmask); - Duff (nlmiddle, *addrl++ ^= src); - if (endmask) - *addrl ^= (src & endmask); - } - break; - - case RROP_NOP: - break; - } - } - pwidth++; - ppt++; - } - xfree(pptFree); - xfree(pwidthFree); -} - -void -afbTileFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) - DrawablePtr pDrawable; - GC *pGC; - int nInit; /* number of spans to fill */ - DDXPointPtr pptInit; /* pointer to list of start points */ - int *pwidthInit; /* pointer to list of n widths */ - int fSorted; -{ - /* next three parameters are post-clip */ - int n; /* number of spans to fill */ - register DDXPointPtr ppt; /* pointer to list of start points */ - register int *pwidth; /* pointer to list of n widths */ - PixelType *addrlBase; /* pointer to start of bitmap */ - PixelType *pBase; - int nlwidth; /* width in longwords of bitmap */ - register PixelType *addrl; /* pointer to current longword in bitmap */ - register PixelType src; - register int nlmiddle; - register PixelType startmask; - register PixelType endmask; - PixmapPtr pTile; - PixelType *psrc; - int tileHeight; - int rop; - int *pwidthFree; /* copies of the pointers to free */ - DDXPointPtr pptFree; - int sizeDst; - int depthDst; - int d; - - n = nInit * miFindMaxBand(pGC->pCompositeClip); - pwidthFree = (int *)xalloc(n * sizeof(int)); - pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec)); - if(!pptFree || !pwidthFree) { - if (pptFree) xfree(pptFree); - if (pwidthFree) xfree(pwidthFree); - return; - } - pwidth = pwidthFree; - ppt = pptFree; - n = miClipSpans(pGC->pCompositeClip, pptInit, pwidthInit, nInit, - ppt, pwidth, fSorted); - - afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, - pBase); - - pTile = pGC->pRotatedPixmap; - tileHeight = pTile->drawable.height; - psrc = (PixelType *)(pTile->devPrivate.ptr); - rop = pGC->alu; - - switch(rop) { - case GXcopy: -#define DoMaskCopyRop(src,dst,mask) (((dst) & ~(mask)) | ((src) & (mask))) - while (n--) { - if (*pwidth) { - addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); - - for (d = 0; d < depthDst; d++, addrlBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ - if (!(pGC->planemask & (1 << d))) - continue; - - addrl = addrlBase; - src = psrc[ppt->y % tileHeight + tileHeight * d]; - if ( ((ppt->x & PIM) + *pwidth) < PPW) { - maskpartialbits(ppt->x, *pwidth, startmask); - *addrl = DoMaskCopyRop (src, *addrl, startmask); - } else { - maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); - if (startmask) { - *addrl = DoMaskCopyRop (src, *addrl, startmask); - addrl++; - } - while (nlmiddle--) { - *addrl = src; - addrl++; - } - if (endmask) - *addrl = DoMaskCopyRop (src, *addrl, endmask); - } - } - } - pwidth++; - ppt++; - } - break; - - default: - { - register DeclareMergeRop (); - - InitializeMergeRop(rop,~0); - while (n--) { - if (*pwidth) { - addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); - for (d = 0; d < depthDst; d++, addrlBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ - if (!(pGC->planemask & (1 << d))) - continue; - - addrl = addrlBase; - - src = psrc[ppt->y % tileHeight + tileHeight * d]; - if ( ((ppt->x & PIM) + *pwidth) < PPW) { - maskpartialbits(ppt->x, *pwidth, startmask); - *addrl = DoMaskMergeRop (src, *addrl, startmask); - } else { - maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); - if (startmask) { - *addrl = DoMaskMergeRop (src, *addrl, startmask); - addrl++; - } - while (nlmiddle--) { - *addrl = DoMergeRop (src, *addrl); - addrl++; - } - if (endmask) - *addrl = DoMaskMergeRop (src, *addrl, endmask); - } - } - } - pwidth++; - ppt++; - } - break; - } - } - xfree(pptFree); - xfree(pwidthFree); -} - -void -afbOpaqueStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) - DrawablePtr pDrawable; - GC *pGC; - int nInit; /* number of spans to fill */ - DDXPointPtr pptInit; /* pointer to list of start points */ - int *pwidthInit; /* pointer to list of n widths */ - int fSorted; -{ - /* next three parameters are post-clip */ - int n; /* number of spans to fill */ - register DDXPointPtr ppt; /* pointer to list of start points */ - register int *pwidth; /* pointer to list of n widths */ - PixelType *addrlBase; /* pointer to start of bitmap */ - PixelType *pBase; - int nlwidth; /* width in longwords of bitmap */ - register PixelType *addrl; /* pointer to current longword in bitmap */ - register PixelType src = 0; - register int nlmiddle; - register PixelType startmask; - register PixelType endmask; - PixmapPtr pTile; - PixelType *psrc; - int tileHeight; - int rop; - unsigned char *rropsOS; - int *pwidthFree; /* copies of the pointers to free */ - DDXPointPtr pptFree; - int sizeDst; - int depthDst; - int d; - - n = nInit * miFindMaxBand(pGC->pCompositeClip); - pwidthFree = (int *)xalloc(n * sizeof(int)); - pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec)); - if(!pptFree || !pwidthFree) { - if (pptFree) xfree(pptFree); - if (pwidthFree) xfree(pwidthFree); - return; - } - pwidth = pwidthFree; - ppt = pptFree; - n = miClipSpans(pGC->pCompositeClip, pptInit, pwidthInit, nInit, - ppt, pwidth, fSorted); - - afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, - pBase); - - pTile = pGC->pRotatedPixmap; - tileHeight = pTile->drawable.height; - psrc = (PixelType *)(pTile->devPrivate.ptr); - rop = pGC->alu; - rropsOS = ((afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, - afbGCPrivateKey))->rropOS; - switch(rop) { - case GXcopy: - while (n--) { - addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); - if (*pwidth) { - for (d = 0; d < depthDst; d++, addrlBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ - switch (rropsOS[d]) { - case RROP_BLACK: - src = 0; - break; - case RROP_WHITE: - src = ~0; - break; - case RROP_INVERT: - src = ~psrc[ppt->y % tileHeight]; - break; - case RROP_COPY: - src = psrc[ppt->y % tileHeight]; - break; - case RROP_NOP: - continue; - } - - addrl = addrlBase; - - if ( ((ppt->x & PIM) + *pwidth) < PPW) { - maskpartialbits(ppt->x, *pwidth, startmask); - *addrl = DoMaskCopyRop (src, *addrl, startmask); - } else { - maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); - if (startmask) { - *addrl = DoMaskCopyRop (src, *addrl, startmask); - addrl++; - } - while (nlmiddle--) { - *addrl = src; - addrl++; - } - if (endmask) - *addrl = DoMaskCopyRop (src, *addrl, endmask); - } - } /* for (d = ...) */ - } - - pwidth++; - ppt++; - } - break; - - default: - { - register DeclareMergeRop (); - - InitializeMergeRop(rop,~0); - while (n--) { - addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); - if (*pwidth) { - for (d = 0; d < depthDst; d++, addrlBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ - switch (rropsOS[d]) { - case RROP_BLACK: - src = 0; - break; - case RROP_WHITE: - src = ~0; - break; - case RROP_INVERT: - src = ~psrc[ppt->y % tileHeight]; - break; - case RROP_COPY: - src = psrc[ppt->y % tileHeight]; - break; - case RROP_NOP: - continue; - } - - addrl = addrlBase; - - if ( ((ppt->x & PIM) + *pwidth) < PPW) { - maskpartialbits(ppt->x, *pwidth, startmask); - *addrl = DoMaskMergeRop (src, *addrl, startmask); - } else { - maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); - if (startmask) { - *addrl = DoMaskMergeRop (src, *addrl, startmask); - addrl++; - } - while (nlmiddle--) { - *addrl = DoMergeRop (src, *addrl); - addrl++; - } - if (endmask) - *addrl = DoMaskMergeRop (src, *addrl, endmask); - } - } /* for (d = ...) */ - } - pwidth++; - ppt++; - } /* while (n) */ - break; - } - } /* switch (rop) */ - xfree(pptFree); - xfree(pwidthFree); -} - -/* Fill spans with tiles that aren't PPW bits wide */ -void -afbUnnaturalTileFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) - DrawablePtr pDrawable; - GC *pGC; - int nInit; /* number of spans to fill */ - DDXPointPtr pptInit; /* pointer to list of start points */ - int *pwidthInit; /* pointer to list of n widths */ - int fSorted; -{ - int iline; /* first line of tile to use */ - /* next three parameters are post-clip */ - int n; /* number of spans to fill */ - register DDXPointPtr ppt; /* pointer to list of start points */ - register int *pwidth; /* pointer to list of n widths */ - PixelType *addrlBase; /* pointer to start of bitmap */ - PixelType *pBase; - int nlwidth; /* width in longwords of bitmap */ - register PixelType *pdst;/* pointer to current word in bitmap */ - register PixelType *psrc;/* pointer to current word in tile */ - register int nlMiddle; - register int rop, nstart; - PixelType startmask; - PixmapPtr pTile; /* pointer to tile we want to fill with */ - int w, width, x, xSrc, ySrc, srcStartOver, nend; - int tlwidth, rem, tileWidth, tileHeight, endinc; - PixelType endmask, *psrcT; - int *pwidthFree; /* copies of the pointers to free */ - DDXPointPtr pptFree; - int sizeDst; - int sizeTile; - int depthDst; - register int d; - - n = nInit * miFindMaxBand(pGC->pCompositeClip); - pwidthFree = (int *)xalloc(n * sizeof(int)); - pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec)); - if(!pptFree || !pwidthFree) { - if (pptFree) xfree(pptFree); - if (pwidthFree) xfree(pwidthFree); - return; - } - pwidth = pwidthFree; - ppt = pptFree; - n = miClipSpans(pGC->pCompositeClip, pptInit, pwidthInit, nInit, - ppt, pwidth, fSorted); - - pTile = pGC->tile.pixmap; - tlwidth = pTile->devKind / PGSZB; - rop = pGC->alu; - - xSrc = pDrawable->x; - ySrc = pDrawable->y; - - afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, - pBase); - - tileWidth = pTile->drawable.width; - tileHeight = pTile->drawable.height; - sizeTile = tlwidth * tileHeight; - - /* this replaces rotating the tile. Instead we just adjust the offset - * at which we start grabbing bits from the tile. - * Ensure that ppt->x - xSrc >= 0 and ppt->y - ySrc >= 0, - * so that iline and rem always stay within the tile bounds. - */ - xSrc += (pGC->patOrg.x % tileWidth) - tileWidth; - ySrc += (pGC->patOrg.y % tileHeight) - tileHeight; - - while (n--) { - iline = (ppt->y - ySrc) % tileHeight; - psrcT = (PixelType *) pTile->devPrivate.ptr + (iline * tlwidth); - addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); - - for (d = 0; d < depthDst; d++, psrcT += sizeTile, addrlBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ - if (!(pGC->planemask & (1 << d))) - continue; - - if (*pwidth) { - x = ppt->x; - pdst = addrlBase; - width = *pwidth; - while(width > 0) { - psrc = psrcT; - w = min(tileWidth, width); - if((rem = (x - xSrc) % tileWidth) != 0) { - /* if we're in the middle of the tile, get - as many bits as will finish the span, or - as many as will get to the left edge of the tile, - or a longword worth, starting at the appropriate - offset in the tile. - */ - w = min(min(tileWidth - rem, width), BITMAP_SCANLINE_PAD); - endinc = rem / BITMAP_SCANLINE_PAD; - getandputrop((psrc+endinc), (rem&PIM), (x & PIM), w, pdst, rop); - if((x & PIM) + w >= PPW) - pdst++; - } else if(((x & PIM) + w) < PPW) { - /* doing < PPW bits is easy, and worth special-casing */ - putbitsrop(*psrc, x & PIM, w, pdst, rop); - } else { - /* start at the left edge of the tile, - and put down as much as we can - */ - maskbits(x, w, startmask, endmask, nlMiddle); - - if (startmask) - nstart = PPW - (x & PIM); - else - nstart = 0; - if (endmask) - nend = (x + w) & PIM; - else - nend = 0; - - srcStartOver = nstart > PLST; - - if(startmask) { - putbitsrop(*psrc, (x & PIM), nstart, pdst, rop); - pdst++; - if(srcStartOver) - psrc++; - } - - while(nlMiddle--) { - getandputrop0(psrc, nstart, PPW, pdst, rop); - pdst++; - psrc++; - } - if(endmask) { - getandputrop0(psrc, nstart, nend, pdst, rop); - } - } - x += w; - width -= w; - } - } - } - ppt++; - pwidth++; - } - xfree(pptFree); - xfree(pwidthFree); -} - -/* Fill spans with stipples that aren't PPW bits wide */ -void -afbUnnaturalStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) - DrawablePtr pDrawable; - GC *pGC; - int nInit; /* number of spans to fill */ - DDXPointPtr pptInit; /* pointer to list of start points */ - int *pwidthInit; /* pointer to list of n widths */ - int fSorted; -{ - /* next three parameters are post-clip */ - int n; /* number of spans to fill */ - register DDXPointPtr ppt; /* pointer to list of start points */ - register int *pwidth; /* pointer to list of n widths */ - int iline; /* first line of tile to use */ - PixelType *addrlBase; /* pointer to start of bitmap */ - PixelType *pBase; - int nlwidth; /* width in longwords of bitmap */ - register PixelType *pdst; /* pointer to current word in bitmap */ - register PixelType *psrc; /* pointer to current word in tile */ - register int nlMiddle; - register int rop, nstart; - PixelType startmask; - PixmapPtr pTile; /* pointer to tile we want to fill with */ - int w, width, x, xSrc, ySrc, srcStartOver, nend; - PixelType endmask, *psrcT; - int tlwidth, rem, tileWidth, endinc; - int tileHeight; - int *pwidthFree; /* copies of the pointers to free */ - DDXPointPtr pptFree; - unsigned char *rrops; - register int d; - int sizeDst; - int depthDst; - - n = nInit * miFindMaxBand(pGC->pCompositeClip); - pwidthFree = (int *)xalloc(n * sizeof(int)); - pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec)); - if(!pptFree || !pwidthFree) { - if (pptFree) xfree(pptFree); - if (pwidthFree) xfree(pwidthFree); - return; - } - pwidth = pwidthFree; - ppt = pptFree; - n = miClipSpans(pGC->pCompositeClip, pptInit, pwidthInit, nInit, - ppt, pwidth, fSorted); - - pTile = pGC->stipple; - tlwidth = pTile->devKind / PGSZB; - xSrc = pDrawable->x; - ySrc = pDrawable->y; - afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, - pBase); - - tileWidth = pTile->drawable.width; - tileHeight = pTile->drawable.height; - rrops = ((afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, - afbGCPrivateKey))->rrops; - /* this replaces rotating the stipple. Instead, we just adjust the offset - * at which we start grabbing bits from the stipple. - * Ensure that ppt->x - xSrc >= 0 and ppt->y - ySrc >= 0, - * so that iline and rem always stay within the tile bounds. - */ - xSrc += (pGC->patOrg.x % tileWidth) - tileWidth; - ySrc += (pGC->patOrg.y % tileHeight) - tileHeight; - while (n--) { - iline = (ppt->y - ySrc) % tileHeight; - psrcT = (PixelType *) pTile->devPrivate.ptr + (iline * tlwidth); - addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); - - for (d = 0; d < depthDst; d++, addrlBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ - rop = rrops[d]; - if (rop == RROP_NOP) - continue; - - pdst = addrlBase; - x = ppt->x; - - if (*pwidth) { - width = *pwidth; - while(width > 0) { - psrc = psrcT; - w = min(tileWidth, width); - if((rem = (x - xSrc) % tileWidth) != 0) { - /* if we're in the middle of the tile, get - as many bits as will finish the span, or - as many as will get to the left edge of the tile, - or a longword worth, starting at the appropriate - offset in the tile. - */ - w = min(min(tileWidth - rem, width), BITMAP_SCANLINE_PAD); - endinc = rem / BITMAP_SCANLINE_PAD; - getandputrrop((psrc + endinc), (rem & PIM), (x & PIM), - w, pdst, rop) - if((x & PIM) + w >= PPW) - pdst++; - } else if(((x & PIM) + w) < PPW) { - /* doing < PPW bits is easy, and worth special-casing */ - putbitsrrop(*psrc, x & PIM, w, pdst, rop); - } else { - /* start at the left edge of the tile, - and put down as much as we can - */ - maskbits(x, w, startmask, endmask, nlMiddle); - - if (startmask) - nstart = PPW - (x & PIM); - else - nstart = 0; - if (endmask) - nend = (x + w) & PIM; - else - nend = 0; - - srcStartOver = nstart > PLST; - - if(startmask) { - putbitsrrop(*psrc, (x & PIM), nstart, pdst, rop); - pdst++; - if(srcStartOver) - psrc++; - } - - while(nlMiddle--) { - getandputrrop0(psrc, nstart, PPW, pdst, rop); - pdst++; - psrc++; - } - if(endmask) { - getandputrrop0(psrc, nstart, nend, pdst, rop); - } - } - x += w; - width -= w; - } - } - } - ppt++; - pwidth++; - } - xfree(pptFree); - xfree(pwidthFree); -} - -/* Fill spans with OpaqueStipples that aren't PPW bits wide */ -void -afbUnnaturalOpaqueStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) - DrawablePtr pDrawable; - GC *pGC; - int nInit; /* number of spans to fill */ - DDXPointPtr pptInit; /* pointer to list of start points */ - int *pwidthInit; /* pointer to list of n widths */ - int fSorted; -{ - int iline; /* first line of tile to use */ - /* next three parameters are post-clip */ - int n; /* number of spans to fill */ - register DDXPointPtr ppt; /* pointer to list of start points */ - register int *pwidth; /* pointer to list of n widths */ - PixelType *addrlBase; /* pointer to start of bitmap */ - PixelType *pBase; - int nlwidth; /* width in longwords of bitmap */ - register PixelType *pdst;/* pointer to current word in bitmap */ - register PixelType *psrc;/* pointer to current word in tile */ - register int nlMiddle; - register int d; - register PixelType tmpsrc = 0; - register PixelType tmpdst; - register int alu, nstart; - register unsigned char *rropsOS; - PixelType startmask; - PixmapPtr pTile; /* pointer to tile we want to fill with */ - int w, width, x, xSrc, ySrc, srcStartOver, nend; - int tlwidth, rem, tileWidth, tileHeight, endinc; - PixelType endmask, *psrcT; - int *pwidthFree; /* copies of the pointers to free */ - DDXPointPtr pptFree; - int sizeDst; - int depthDst; - - n = nInit * miFindMaxBand(pGC->pCompositeClip); - pwidthFree = (int *)xalloc(n * sizeof(int)); - pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec)); - if(!pptFree || !pwidthFree) { - if (pptFree) xfree(pptFree); - if (pwidthFree) xfree(pwidthFree); - return; - } - pwidth = pwidthFree; - ppt = pptFree; - n = miClipSpans(pGC->pCompositeClip, pptInit, pwidthInit, nInit, - ppt, pwidth, fSorted); - - pTile = pGC->stipple; - tlwidth = pTile->devKind / PGSZB; - alu = pGC->alu; - - xSrc = pDrawable->x; - ySrc = pDrawable->y; - - afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, - pBase); - - tileWidth = pTile->drawable.width; - tileHeight = pTile->drawable.height; - rropsOS = afbGetGCPrivate(pGC)->rropOS; - - /* this replaces rotating the tile. Instead we just adjust the offset - * at which we start grabbing bits from the tile. - * Ensure that ppt->x - xSrc >= 0 and ppt->y - ySrc >= 0, - * so that iline and rem always stay within the tile bounds. - */ - xSrc += (pGC->patOrg.x % tileWidth) - tileWidth; - ySrc += (pGC->patOrg.y % tileHeight) - tileHeight; - - while (n--) { - iline = (ppt->y - ySrc) % tileHeight; - psrcT = (PixelType *) pTile->devPrivate.ptr + (iline * tlwidth); - addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); - - for (d = 0; d < depthDst; d++, addrlBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ - if (!(pGC->planemask & (1 << d))) - continue; - - if (*pwidth) { - x = ppt->x; - pdst = addrlBase; - width = *pwidth; - while(width > 0) { - psrc = psrcT; - w = min(tileWidth, width); - if((rem = (x - xSrc) % tileWidth) != 0) { - /* if we're in the middle of the tile, get - as many bits as will finish the span, or - as many as will get to the left edge of the tile, - or a longword worth, starting at the appropriate - offset in the tile. - */ - w = min(min(tileWidth - rem, width), BITMAP_SCANLINE_PAD); - endinc = rem / BITMAP_SCANLINE_PAD; - switch (rropsOS[d]) { - case RROP_BLACK: - tmpsrc = 0; - break; - case RROP_WHITE: - tmpsrc = ~0; - break; - - case RROP_COPY: - getbits ((psrc+endinc), (rem&PIM), w, tmpsrc); - break; - - case RROP_INVERT: - getbits ((psrc+endinc), (rem&PIM), w, tmpsrc); - tmpsrc = ~tmpsrc; - break; - } - - if (alu != GXcopy) { - getbits (pdst, (x & PIM), w, tmpdst); - DoRop (tmpsrc, alu, tmpsrc, tmpdst); - } - - putbits (tmpsrc, (x & PIM), w, pdst); - if((x & PIM) + w >= PPW) - pdst++; - } else if(((x & PIM) + w) < PPW) { - /* doing < PPW bits is easy, and worth special-casing */ - switch (rropsOS[d]) { - case RROP_BLACK: - tmpsrc = 0; - break; - case RROP_WHITE: - tmpsrc = ~0; - break; - case RROP_COPY: - tmpsrc = *psrc; - break; - case RROP_INVERT: - tmpsrc = ~*psrc; - break; - } - if (alu != GXcopy) { - getbits (pdst, (x & PIM), w, tmpdst); - DoRop (tmpsrc, alu, tmpsrc, tmpdst); - } - putbits (tmpsrc, (x & PIM), w, pdst); - } else { - /* start at the left edge of the tile, - and put down as much as we can - */ - maskbits(x, w, startmask, endmask, nlMiddle); - - if (startmask) - nstart = PPW - (x & PIM); - else - nstart = 0; - if (endmask) - nend = (x + w) & PIM; - else - nend = 0; - - srcStartOver = nstart > PLST; - - if(startmask) { - switch (rropsOS[d]) { - case RROP_BLACK: - tmpsrc = 0; - break; - case RROP_WHITE: - tmpsrc = ~0; - break; - case RROP_COPY: - tmpsrc = *psrc; - break; - case RROP_INVERT: - tmpsrc = ~*psrc; - break; - } - if (alu != GXcopy) { - getbits (pdst, (x & PIM), nstart, tmpdst); - DoRop (tmpsrc, alu, tmpsrc, tmpdst); - } - putbits (tmpsrc, (x & PIM), nstart, pdst); - pdst++; - if(srcStartOver) - psrc++; - } - - while(nlMiddle--) { - switch (rropsOS[d]) { - case RROP_BLACK: - tmpsrc = 0; - break; - case RROP_WHITE: - tmpsrc = ~0; - break; - case RROP_COPY: - getbits (psrc, nstart, PPW, tmpsrc); - break; - case RROP_INVERT: - getbits (psrc, nstart, PPW, tmpsrc); - tmpsrc = ~tmpsrc; - break; - } - if (alu != GXcopy) { - tmpdst = *pdst; - DoRop (tmpsrc, alu, tmpsrc, tmpdst); - } - *pdst++ = tmpsrc; - /*putbits (tmpsrc, 0, PPW, pdst); - pdst++;*/ - psrc++; - } - if(endmask) { - switch (rropsOS[d]) { - case RROP_BLACK: - tmpsrc = 0; - break; - case RROP_WHITE: - tmpsrc = ~0; - break; - - case RROP_COPY: - getbits (psrc, nstart, nend, tmpsrc); - break; - - case RROP_INVERT: - getbits (psrc, nstart, nend, tmpsrc); - tmpsrc = ~tmpsrc; - break; - } - if (alu != GXcopy) { - tmpdst = *pdst; - DoRop (tmpsrc, alu, tmpsrc, tmpdst); - } - putbits (tmpsrc, 0, nend, pdst); - } - } - x += w; - width -= w; - } - } - } - ppt++; - pwidth++; - } - xfree(pptFree); - xfree(pwidthFree); -} diff --git a/afb/afbfont.c b/afb/afbfont.c deleted file mode 100644 index 11a449423..000000000 --- a/afb/afbfont.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include "afb.h" -#include -#include "dixfontstr.h" -#include "scrnintstr.h" - -/*ARGSUSED*/ -Bool -afbRealizeFont( pscr, pFont) - ScreenPtr pscr; - FontPtr pFont; -{ - return (TRUE); -} - -/*ARGSUSED*/ -Bool -afbUnrealizeFont( pscr, pFont) - ScreenPtr pscr; - FontPtr pFont; -{ - return (TRUE); -} diff --git a/afb/afbgc.c b/afb/afbgc.c deleted file mode 100644 index 1d1fdc58b..000000000 --- a/afb/afbgc.c +++ /dev/null @@ -1,685 +0,0 @@ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include - -#include -#include -#include -#include "afb.h" -#include "dixfontstr.h" -#include -#include "gcstruct.h" -#include "windowstr.h" -#include "pixmapstr.h" -#include "scrnintstr.h" -#include "region.h" - -#include "mistruct.h" -#include "migc.h" - -#include "maskbits.h" - -static void afbDestroyGC(GCPtr); -static void afbValidateGC(GCPtr, unsigned long, DrawablePtr); - -static GCFuncs afbFuncs = { - afbValidateGC, - miChangeGC, - miCopyGC, - afbDestroyGC, - miChangeClip, - miDestroyClip, - miCopyClip -}; - -static GCOps afbGCOps = { - afbSolidFS, - afbSetSpans, - afbPutImage, - afbCopyArea, - miCopyPlane, - afbPolyPoint, - afbLineSS, - afbSegmentSS, - miPolyRectangle, - afbZeroPolyArcSS, - afbFillPolygonSolid, - afbPolyFillRect, - afbPolyFillArcSolid, - miPolyText8, - miPolyText16, - miImageText8, - miImageText16, - afbTEGlyphBlt, - afbPolyGlyphBlt, - afbPushPixels -}; - -static void -afbReduceOpaqueStipple(PixelType fg, PixelType bg, unsigned long planemask, - int depth, unsigned char *rop) -{ - register int d; - register Pixel mask = 1; - - bg ^= fg; - - for (d = 0; d < depth; d++, mask <<= 1) { - if (!(planemask & mask)) - rop[d] = RROP_NOP; - else if (!(bg & mask)) { - /* Both fg and bg have a 0 or 1 in this plane */ - if (fg & mask) - rop[d] = RROP_WHITE; - else - rop[d] = RROP_BLACK; - } else { - /* Both fg and bg have different bits on this plane */ - if (fg & mask) - rop[d] = RROP_COPY; - else - rop[d] = RROP_INVERT; - } - } -} - -Bool -afbCreateGC(pGC) - register GCPtr pGC; -{ - afbPrivGC *pPriv; - - pGC->clientClip = NULL; - pGC->clientClipType = CT_NONE; - - /* some of the output primitives aren't really necessary, since - they will be filled in ValidateGC because of dix/CreateGC() - setting all the change bits. Others are necessary because although - they depend on being a monochrome frame buffer, they don't change - */ - - pGC->ops = &afbGCOps; - pGC->funcs = &afbFuncs; - - /* afb wants to translate before scan convesion */ - pGC->miTranslate = 1; - - pPriv = (afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, - afbGCPrivateKey); - afbReduceRop(pGC->alu, pGC->fgPixel, pGC->planemask, pGC->depth, - pPriv->rrops); - afbReduceOpaqueStipple(pGC->fgPixel, pGC->bgPixel, pGC->planemask, - pGC->depth, pPriv->rropOS); - - pGC->fExpose = TRUE; - pGC->pRotatedPixmap = NullPixmap; - pGC->freeCompClip = FALSE; - return TRUE; -} - -static void -afbComputeCompositeClip(GCPtr pGC, DrawablePtr pDrawable) -{ - if (pDrawable->type == DRAWABLE_WINDOW) { - WindowPtr pWin = (WindowPtr) pDrawable; - RegionPtr pregWin; - Bool freeTmpClip, freeCompClip; - - if (pGC->subWindowMode == IncludeInferiors) { - pregWin = NotClippedByChildren(pWin); - freeTmpClip = TRUE; - } else { - pregWin = &pWin->clipList; - freeTmpClip = FALSE; - } - freeCompClip = pGC->freeCompClip; - - /* - * if there is no client clip, we can get by with just keeping the - * pointer we got, and remembering whether or not should destroy (or - * maybe re-use) it later. this way, we avoid unnecessary copying of - * regions. (this wins especially if many clients clip by children - * and have no client clip.) - */ - if (pGC->clientClipType == CT_NONE) { - if (freeCompClip) - REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip); - pGC->pCompositeClip = pregWin; - pGC->freeCompClip = freeTmpClip; - } else { - /* - * we need one 'real' region to put into the composite clip. if - * pregWin the current composite clip are real, we can get rid of - * one. if pregWin is real and the current composite clip isn't, - * use pregWin for the composite clip. if the current composite - * clip is real and pregWin isn't, use the current composite - * clip. if neither is real, create a new region. - */ - - REGION_TRANSLATE(pGC->pScreen, pGC->clientClip, - pDrawable->x + pGC->clipOrg.x, - pDrawable->y + pGC->clipOrg.y); - - if (freeCompClip) { - REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, pregWin, - pGC->clientClip); - if (freeTmpClip) - REGION_DESTROY(pGC->pScreen, pregWin); - } else if (freeTmpClip) { - REGION_INTERSECT(pGC->pScreen, pregWin, pregWin, pGC->clientClip); - pGC->pCompositeClip = pregWin; - } else { - pGC->pCompositeClip = REGION_CREATE(pGC->pScreen, NullBox, 0); - REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, - pregWin, pGC->clientClip); - } - pGC->freeCompClip = TRUE; - REGION_TRANSLATE(pGC->pScreen, pGC->clientClip, - -(pDrawable->x + pGC->clipOrg.x), - -(pDrawable->y + pGC->clipOrg.y)); - } - } /* end of composite clip for a window */ - else { - BoxRec pixbounds; - - /* XXX should we translate by drawable.x/y here ? */ - pixbounds.x1 = 0; - pixbounds.y1 = 0; - pixbounds.x2 = pDrawable->width; - pixbounds.y2 = pDrawable->height; - - if (pGC->freeCompClip) { - REGION_RESET(pGC->pScreen, pGC->pCompositeClip, &pixbounds); - } else { - pGC->freeCompClip = TRUE; - pGC->pCompositeClip = REGION_CREATE(pGC->pScreen, &pixbounds, 1); - } - - if (pGC->clientClipType == CT_REGION) { - REGION_TRANSLATE(pGC->pScreen, pGC->pCompositeClip, -pGC->clipOrg.x, - -pGC->clipOrg.y); - REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, - pGC->pCompositeClip, pGC->clientClip); - REGION_TRANSLATE(pGC->pScreen, pGC->pCompositeClip, pGC->clipOrg.x, - pGC->clipOrg.y); - } - } /* end of composite clip for pixmap */ -} /* end afbComputeCompositeClip */ - -/* Clipping conventions - if the drawable is a window - CT_REGION ==> pCompositeClip really is the composite - CT_other ==> pCompositeClip is the window clip region - if the drawable is a pixmap - CT_REGION ==> pCompositeClip is the translated client region - clipped to the pixmap boundary - CT_other ==> pCompositeClip is the pixmap bounding box -*/ - -/*ARGSUSED*/ -static void -afbValidateGC(pGC, changes, pDrawable) - register GCPtr pGC; - unsigned long changes; - DrawablePtr pDrawable; -{ - register afbPrivGCPtr devPriv; - int mask; /* stateChanges */ - int index; /* used for stepping through bitfields */ - int xrot, yrot; /* rotations for tile and stipple pattern */ - /* flags for changing the proc vector - and updating things in devPriv - */ - int new_rotate, new_rrop, new_line, new_text, new_fill; - DDXPointRec oldOrg; /* origin of thing GC was last used with */ - - oldOrg = pGC->lastWinOrg; - - pGC->lastWinOrg.x = pDrawable->x; - pGC->lastWinOrg.y = pDrawable->y; - - /* we need to re-rotate the tile if the previous window/pixmap - origin (oldOrg) differs from the new window/pixmap origin - (pGC->lastWinOrg) - */ - new_rotate = (oldOrg.x != pGC->lastWinOrg.x) || - (oldOrg.y != pGC->lastWinOrg.y); - - - devPriv = (afbPrivGCPtr)dixLookupPrivate(&pGC->devPrivates, - afbGCPrivateKey); - - /* - if the client clip is different or moved OR - the subwindowMode has changed OR - the window's clip has changed since the last validation - we need to recompute the composite clip - */ - if ((changes & (GCClipXOrigin|GCClipYOrigin|GCClipMask|GCSubwindowMode)) || - (pDrawable->serialNumber != (pGC->serialNumber & DRAWABLE_SERIAL_BITS))) - afbComputeCompositeClip(pGC, pDrawable); - - new_rrop = FALSE; - new_line = FALSE; - new_text = FALSE; - new_fill = FALSE; - - mask = changes; - while (mask) { - index = lowbit(mask); - mask &= ~index; - - /* this switch acculmulates a list of which procedures - might have to change due to changes in the GC. in - some cases (e.g. changing one 16 bit tile for another) - we might not really need a change, but the code is - being paranoid. - this sort of batching wins if, for example, the alu - and the font have been changed, or any other pair - of items that both change the same thing. - */ - switch (index) { - case GCPlaneMask: - case GCFunction: - case GCForeground: - new_rrop = TRUE; - break; - case GCBackground: - new_rrop = TRUE; /* for opaque stipples */ - break; - case GCLineStyle: - case GCLineWidth: - case GCJoinStyle: - new_line = TRUE; - break; - case GCCapStyle: - break; - case GCFillStyle: - new_fill = TRUE; - break; - case GCFillRule: - break; - case GCTile: - if(pGC->tileIsPixel) - break; - new_rotate = TRUE; - new_fill = TRUE; - break; - - case GCStipple: - if(pGC->stipple == (PixmapPtr)NULL) - break; - new_rotate = TRUE; - new_fill = TRUE; - break; - - case GCTileStipXOrigin: - new_rotate = TRUE; - break; - - case GCTileStipYOrigin: - new_rotate = TRUE; - break; - - case GCFont: - new_text = TRUE; - break; - case GCSubwindowMode: - break; - case GCGraphicsExposures: - break; - case GCClipXOrigin: - break; - case GCClipYOrigin: - break; - case GCClipMask: - break; - case GCDashOffset: - break; - case GCDashList: - break; - case GCArcMode: - break; - default: - break; - } - } - - /* deal with the changes we've collected . - new_rrop must be done first because subsequent things - depend on it. - */ - - if(new_rotate || new_fill) { - Bool new_pix = FALSE; - - /* figure out how much to rotate */ - xrot = pGC->patOrg.x; - yrot = pGC->patOrg.y; - xrot += pDrawable->x; - yrot += pDrawable->y; - - switch (pGC->fillStyle) { - case FillTiled: - /* copy current tile and stipple */ - if (!pGC->tileIsPixel && - (pGC->tile.pixmap->drawable.width <= PPW) && - !(pGC->tile.pixmap->drawable.width & - (pGC->tile.pixmap->drawable.width - 1))) { - afbCopyRotatePixmap(pGC->tile.pixmap, &pGC->pRotatedPixmap, - xrot, yrot); - new_pix = TRUE; - } - break; - case FillStippled: - case FillOpaqueStippled: - if (pGC->stipple && (pGC->stipple->drawable.width <= PPW) && - !(pGC->stipple->drawable.width & - (pGC->stipple->drawable.width - 1))) { - afbCopyRotatePixmap(pGC->stipple, &pGC->pRotatedPixmap, - xrot, yrot); - new_pix = TRUE; - } - } - /* destroy any previously rotated tile or stipple */ - if (!new_pix && pGC->pRotatedPixmap) { - (*pDrawable->pScreen->DestroyPixmap)(pGC->pRotatedPixmap); - pGC->pRotatedPixmap = (PixmapPtr)NULL; - } - } - - /* - * duck out here when the GC is unchanged - */ - - if (!changes) - return; - - if (new_rrop || new_fill) { - afbReduceRop(pGC->alu, pGC->fgPixel, pGC->planemask, pDrawable->depth, - devPriv->rrops); - afbReduceOpaqueStipple(pGC->fgPixel, pGC->bgPixel, pGC->planemask, - pGC->depth, devPriv->rropOS); - new_fill = TRUE; - } - - if (new_line || new_fill || new_text) { - if (!pGC->ops->devPrivate.val) { - pGC->ops = miCreateGCOps(pGC->ops); - pGC->ops->devPrivate.val = 1; - } - } - - if (new_line || new_fill) { - if (pGC->lineWidth == 0) { - if (pGC->lineStyle == LineSolid && pGC->fillStyle == FillSolid) - pGC->ops->PolyArc = afbZeroPolyArcSS; - else - pGC->ops->PolyArc = miZeroPolyArc; - } else - pGC->ops->PolyArc = miPolyArc; - if (pGC->lineStyle == LineSolid) { - if(pGC->lineWidth == 0) { - if (pGC->fillStyle == FillSolid) { - pGC->ops->PolySegment = afbSegmentSS; - pGC->ops->Polylines = afbLineSS; - } - else - { - pGC->ops->PolySegment = miPolySegment; - pGC->ops->Polylines = miZeroLine; - } - } else { - pGC->ops->PolySegment = miPolySegment; - pGC->ops->Polylines = miWideLine; - } - } else { - if(pGC->lineWidth == 0 && pGC->fillStyle == FillSolid) { - pGC->ops->PolySegment = afbSegmentSD; - pGC->ops->Polylines = afbLineSD; - } else { - pGC->ops->PolySegment = miPolySegment; - pGC->ops->Polylines = miWideDash; - } - } - } - - if (new_text || new_fill) { - if ((pGC->font) && - (FONTMAXBOUNDS(pGC->font,rightSideBearing) - - FONTMINBOUNDS(pGC->font,leftSideBearing) > 32 || - FONTMINBOUNDS(pGC->font,characterWidth) < 0)) { - pGC->ops->PolyGlyphBlt = miPolyGlyphBlt; - pGC->ops->ImageGlyphBlt = miImageGlyphBlt; - } else { - /* special case ImageGlyphBlt for terminal emulator fonts */ - if ((pGC->font) && - TERMINALFONT(pGC->font)) { - pGC->ops->ImageGlyphBlt = afbTEGlyphBlt; - } else { - pGC->ops->ImageGlyphBlt = afbImageGlyphBlt; - } - - /* now do PolyGlyphBlt */ - if (pGC->fillStyle == FillSolid) { - pGC->ops->PolyGlyphBlt = afbPolyGlyphBlt; - } else { - pGC->ops->PolyGlyphBlt = miPolyGlyphBlt; - } - } - } - - if (new_fill) { - /* install a suitable fillspans and pushpixels */ - pGC->ops->PushPixels = afbPushPixels; - pGC->ops->FillPolygon = miFillPolygon; - pGC->ops->PolyFillArc = miPolyFillArc; - - switch (pGC->fillStyle) { - case FillSolid: - pGC->ops->FillSpans = afbSolidFS; - pGC->ops->FillPolygon = afbFillPolygonSolid; - pGC->ops->PolyFillArc = afbPolyFillArcSolid; - break; - case FillTiled: - if (pGC->pRotatedPixmap) - pGC->ops->FillSpans = afbTileFS; - else - pGC->ops->FillSpans = afbUnnaturalTileFS; - break; - case FillOpaqueStippled: - if (pGC->pRotatedPixmap) - pGC->ops->FillSpans = afbOpaqueStippleFS; - else - pGC->ops->FillSpans = afbUnnaturalOpaqueStippleFS; - break; - - case FillStippled: - if (pGC->pRotatedPixmap) - pGC->ops->FillSpans = afbStippleFS; - else - pGC->ops->FillSpans = afbUnnaturalStippleFS; - break; - } - } /* end of new_fill */ -} - -static void -afbDestroyGC(pGC) - GCPtr pGC; -{ - if (pGC->pRotatedPixmap) - (*pGC->pScreen->DestroyPixmap)(pGC->pRotatedPixmap); - if (pGC->freeCompClip) - REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip); - miDestroyGCOps(pGC->ops); -} - -void -afbReduceRop(alu, src, planemask, depth, rop) - register int alu; - register Pixel src; - register unsigned long planemask; - int depth; - register unsigned char *rop; -{ - register int d; - register Pixel mask = 1; - - for (d = 0; d < depth; d++, mask <<= 1) { - if (!(planemask & mask)) - rop[d] = RROP_NOP; - else if ((src & mask) == 0) /* src is black */ - switch (alu) { - case GXclear: - rop[d] = RROP_BLACK; - break; - case GXand: - rop[d] = RROP_BLACK; - break; - case GXandReverse: - rop[d] = RROP_BLACK; - break; - case GXcopy: - rop[d] = RROP_BLACK; - break; - case GXandInverted: - rop[d] = RROP_NOP; - break; - case GXnoop: - rop[d] = RROP_NOP; - break; - case GXxor: - rop[d] = RROP_NOP; - break; - case GXor: - rop[d] = RROP_NOP; - break; - case GXnor: - rop[d] = RROP_INVERT; - break; - case GXequiv: - rop[d] = RROP_INVERT; - break; - case GXinvert: - rop[d] = RROP_INVERT; - break; - case GXorReverse: - rop[d] = RROP_INVERT; - break; - case GXcopyInverted: - rop[d] = RROP_WHITE; - break; - case GXorInverted: - rop[d] = RROP_WHITE; - break; - case GXnand: - rop[d] = RROP_WHITE; - break; - case GXset: - rop[d] = RROP_WHITE; - break; - } - else /* src is white */ - switch (alu) { - case GXclear: - rop[d] = RROP_BLACK; - break; - case GXand: - rop[d] = RROP_NOP; - break; - case GXandReverse: - rop[d] = RROP_INVERT; - break; - case GXcopy: - rop[d] = RROP_WHITE; - break; - case GXandInverted: - rop[d] = RROP_BLACK; - break; - case GXnoop: - rop[d] = RROP_NOP; - break; - case GXxor: - rop[d] = RROP_INVERT; - break; - case GXor: - rop[d] = RROP_WHITE; - break; - case GXnor: - rop[d] = RROP_BLACK; - break; - case GXequiv: - rop[d] = RROP_NOP; - break; - case GXinvert: - rop[d] = RROP_INVERT; - break; - case GXorReverse: - rop[d] = RROP_WHITE; - break; - case GXcopyInverted: - rop[d] = RROP_BLACK; - break; - case GXorInverted: - rop[d] = RROP_NOP; - break; - case GXnand: - rop[d] = RROP_INVERT; - break; - case GXset: - rop[d] = RROP_WHITE; - break; - } - } -} diff --git a/afb/afbgetsp.c b/afb/afbgetsp.c deleted file mode 100644 index 8d1db1482..000000000 --- a/afb/afbgetsp.c +++ /dev/null @@ -1,165 +0,0 @@ -/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include - -#include "misc.h" -#include "region.h" -#include "gc.h" -#include "windowstr.h" -#include "pixmapstr.h" -#include "scrnintstr.h" - -#include "afb.h" -#include "maskbits.h" - -#include "servermd.h" - -/* GetSpans -- for each span, gets bits from drawable starting at ppt[i] - * and continuing for pwidth[i] bits - * Each scanline returned will be server scanline padded, i.e., it will come - * out to an integral number of words. - */ -/*ARGSUSED*/ -void -afbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pchardstStart) - DrawablePtr pDrawable; /* drawable from which to get bits */ - int wMax; /* largest value of all *pwidths */ - register DDXPointPtr ppt; /* points to start copying from */ - int *pwidth; /* list of number of bits to copy */ - int nspans; /* number of scanlines to copy */ - char *pchardstStart; /* where to put the bits */ -{ - PixelType *pdstStart = (PixelType *)pchardstStart; - register PixelType *pdst; /* where to put the bits */ - register PixelType *psrc; /* where to get the bits */ - register PixelType tmpSrc; /* scratch buffer for bits */ - PixelType *psrcBase; /* start of src bitmap */ - int widthSrc; /* width of pixmap in bytes */ - int sizeSrc; - int depthSrc; - register DDXPointPtr pptLast; /* one past last point to get */ - int xEnd; /* last pixel to copy from */ - register int nstart; - register int d; - int nend = 0; - int srcStartOver; - PixelType startmask, endmask; - unsigned int srcBit; - int nlMiddle, nl; - int w; - - pptLast = ppt + nspans; - - afbGetPixelWidthSizeDepthAndPointer(pDrawable, widthSrc, sizeSrc, depthSrc, - psrcBase); - pdst = pdstStart; - - while(ppt < pptLast) { - /* XXX should this really be << PWSH, or * 8, or * PGSZB? */ - xEnd = min(ppt->x + *pwidth, widthSrc << PWSH); - pwidth++; - for (d = 0; d < depthSrc; d++) { - psrc = afbScanline(psrcBase, ppt->x, ppt->y, widthSrc); - psrcBase += sizeSrc; /* @@@ NEXT PLANE @@@ */ - w = xEnd - ppt->x; - srcBit = ppt->x & PIM; - - if (srcBit + w <= PPW) - { - getandputbits0(psrc, srcBit, w, pdst); - pdst++; - } - else - { - - maskbits(ppt->x, w, startmask, endmask, nlMiddle); - if (startmask) - nstart = PPW - srcBit; - else - nstart = 0; - if (endmask) - nend = xEnd & PIM; - srcStartOver = srcBit + nstart > PLST; - if (startmask) - { - getandputbits0(psrc, srcBit, nstart, pdst); - if(srcStartOver) - psrc++; - } - nl = nlMiddle; -#ifdef FASTPUTBITS - Duff(nl, putbits(*psrc, nstart, PPW, pdst); psrc++; pdst++;); -#else - while (nl--) - { - tmpSrc = *psrc; - putbits(tmpSrc, nstart, PPW, pdst); - psrc++; - pdst++; - } -#endif - if (endmask) - { - putbits(*psrc, nstart, nend, pdst); - if(nstart + nend > PPW) - pdst++; - } - if (startmask || endmask) - pdst++; - } - } - ppt++; - } -} diff --git a/afb/afbhrzvert.c b/afb/afbhrzvert.c deleted file mode 100644 index 8f332e6d8..000000000 --- a/afb/afbhrzvert.c +++ /dev/null @@ -1,209 +0,0 @@ -/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include - -#include "gc.h" -#include "window.h" -#include "pixmap.h" -#include "region.h" - -#include "afb.h" -#include "maskbits.h" - -/* horizontal solid line - abs(len) > 1 -*/ -void -afbHorzS(pbase, nlwidth, sizeDst, depthDst, x1, y1, len, rrops) -PixelType *pbase; /* pointer to base of bitmap */ -register int nlwidth; /* width in longwords of bitmap */ -int sizeDst; -int depthDst; -int x1; /* initial point */ -int y1; -int len; /* length of line */ -register unsigned char *rrops; -{ - register PixelType *addrl; - register PixelType startmask; - register PixelType endmask; - register int nlmiddle; - register int d; - int saveNLmiddle; - - /* force the line to go left to right - but don't draw the last point - */ - if (len < 0) { - x1 += len; - x1 += 1; - len = -len; - } - - /* all bits inside same longword */ - if ( ((x1 & PIM) + len) < PPW) { - maskpartialbits(x1, len, startmask); - - for (d = 0; d < depthDst; d++) { - addrl = afbScanline(pbase, x1, y1, nlwidth); - pbase += sizeDst; /* @@@ NEXT PLANE @@@ */ - - switch (rrops[d]) { - case RROP_BLACK: - *addrl &= ~startmask; - break; - case RROP_WHITE: - *addrl |= startmask; - break; - case RROP_INVERT: - *addrl ^= startmask; - break; - case RROP_NOP: - break; - } /* switch */ - } /* for (d = ...) */ - } else { - maskbits(x1, len, startmask, endmask, nlmiddle); - saveNLmiddle = nlmiddle; - - for (d = 0; d < depthDst; d++) { - addrl = afbScanline(pbase, x1, y1, nlwidth); - pbase += sizeDst; /* @@@ NEXT PLANE @@@ */ - nlmiddle = saveNLmiddle; - - switch (rrops[d]) { - case RROP_BLACK: - if (startmask) - *addrl++ &= ~startmask; - Duff (nlmiddle, *addrl++ = 0x0); - if (endmask) - *addrl &= ~endmask; - break; - - case RROP_WHITE: - if (startmask) - *addrl++ |= startmask; - Duff (nlmiddle, *addrl++ = ~0); - if (endmask) - *addrl |= endmask; - break; - - case RROP_INVERT: - if (startmask) - *addrl++ ^= startmask; - Duff (nlmiddle, *addrl++ ^= ~0); - if (endmask) - *addrl ^= endmask; - break; - - case RROP_NOP: - break; - } /* switch */ - } /* for (d = ... ) */ - } -} - -/* vertical solid line - this uses do loops because pcc (Ultrix 1.2, bsd 4.2) generates - better code. sigh. we know that len will never be 0 or 1, so - it's OK to use it. -*/ -void -afbVertS(pbase, nlwidth, sizeDst, depthDst, x1, y1, len, rrops) -PixelType *pbase; /* pointer to base of bitmap */ -register int nlwidth; /* width in longwords of bitmap */ -int sizeDst; -int depthDst; -int x1, y1; /* initial point */ -register int len; /* length of line */ -unsigned char *rrops; -{ - register PixelType *addrl; - register PixelType bitmask; - int saveLen; - int d; - - if (len < 0) { - nlwidth = -nlwidth; - len = -len; - } - - saveLen = len; - - for (d = 0; d < depthDst; d++) { - addrl = afbScanline(pbase, x1, y1, nlwidth); - pbase += sizeDst; /* @@@ NEXT PLANE @@@ */ - len = saveLen; - - switch (rrops[d]) { - case RROP_BLACK: - bitmask = mfbGetrmask(x1 & PIM); - Duff(len, *addrl &= bitmask; afbScanlineInc(addrl, nlwidth) ); - break; - - case RROP_WHITE: - bitmask = mfbGetmask(x1 & PIM); - Duff(len, *addrl |= bitmask; afbScanlineInc(addrl, nlwidth) ); - break; - - case RROP_INVERT: - bitmask = mfbGetmask(x1 & PIM); - Duff(len, *addrl ^= bitmask; afbScanlineInc(addrl, nlwidth) ); - break; - - case RROP_NOP: - break; - } /* switch */ - } /* for (d = ...) */ -} diff --git a/afb/afbimage.c b/afb/afbimage.c deleted file mode 100644 index 890429fe6..000000000 --- a/afb/afbimage.c +++ /dev/null @@ -1,272 +0,0 @@ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include - -#include -#include "windowstr.h" -#include "pixmapstr.h" -#include "scrnintstr.h" -#include "gcstruct.h" -#include "afb.h" -#include "maskbits.h" -#include "servermd.h" -#include "mfb.h" - -void -afbPutImage(pDraw, pGC, depth, x, y, width, height, leftPad, format, pImage) - DrawablePtr pDraw; - GCPtr pGC; - int depth, x, y, width, height; - int leftPad; - int format; - char *pImage; -{ - PixmapPtr pPixmap; - - if ((width == 0) || (height == 0)) - return; - - if (format != ZPixmap || depth == 1 || pDraw->depth == 1) { - pPixmap = GetScratchPixmapHeader(pDraw->pScreen, width+leftPad, height, - depth, depth, - BitmapBytePad(width+leftPad), - (pointer)pImage); - if (!pPixmap) - return; - - pGC->fExpose = FALSE; - if (format == XYBitmap) - (void)(*pGC->ops->CopyPlane)((DrawablePtr)pPixmap, pDraw, pGC, leftPad, - 0, width, height, x, y, 1); - else { - (void)(*pGC->ops->CopyArea)((DrawablePtr)pPixmap, pDraw, pGC, leftPad, - 0, width, height, x, y); - } - - pGC->fExpose = TRUE; - FreeScratchPixmapHeader(pPixmap); - } else { - /* Chunky to planar conversion required */ - - PixmapPtr pPixmap; - ScreenPtr pScreen = pDraw->pScreen; - int widthSrc; - int start_srcshift; - register int b; - register int dstshift; - register int shift_step; - register PixelType dst; - register PixelType srcbits; - register PixelType *pdst; - register PixelType *psrc; - int start_bit; - register int nl; - register int h; - register int d; - int sizeDst; - PixelType *pdstBase; - int widthDst; - int depthDst; - - /* Create a tmp pixmap */ - pPixmap = (pScreen->CreatePixmap)(pScreen, width, height, depth, - CREATE_PIXMAP_USAGE_SCRATCH); - if (!pPixmap) - return; - - afbGetPixelWidthSizeDepthAndPointer((DrawablePtr)pPixmap, widthDst, - sizeDst, depthDst, pdstBase); - - widthSrc = PixmapWidthInPadUnits(width, depth); - /* XXX: if depth == 8, use fast chunky to planar assembly function.*/ - if (depth > 4) { - start_srcshift = 24; - shift_step = 8; - } else { - start_srcshift = 28; - shift_step = 4; - } - - for (d = 0; d < depth; d++, pdstBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ - start_bit = start_srcshift + d; - psrc = (PixelType *)pImage; - pdst = pdstBase; - h = height; - - while (h--) { - dstshift = PPW - 1; - dst = 0; - nl = widthSrc; - while (nl--) { - srcbits = *psrc++; - for (b = start_bit; b >= 0; b -= shift_step) { - dst |= ((srcbits >> b) & 1) << dstshift; - if (--dstshift < 0) { - dstshift = PPW - 1; - *pdst++ = dst; - dst = 0; - } - } - } - if (dstshift != PPW - 1) - *pdst++ = dst; - } - } /* for (d = ...) */ - - pGC->fExpose = FALSE; - (void)(*pGC->ops->CopyArea)((DrawablePtr)pPixmap, pDraw, pGC, leftPad, 0, - width, height, x, y); - pGC->fExpose = TRUE; - (*pScreen->DestroyPixmap)(pPixmap); - } -} - -void -afbGetImage(pDrawable, sx, sy, width, height, format, planemask, pdstLine) - DrawablePtr pDrawable; - int sx, sy, width, height; - unsigned int format; - unsigned long planemask; - char *pdstLine; -{ - BoxRec box; - DDXPointRec ptSrc; - RegionRec rgnDst; - ScreenPtr pScreen; - PixmapPtr pPixmap; - - if ((width == 0) || (height == 0)) - return; - - pScreen = pDrawable->pScreen; - sx += pDrawable->x; - sy += pDrawable->y; - - if (format == XYPixmap || pDrawable->depth == 1) { - pPixmap = GetScratchPixmapHeader(pScreen, width, height, 1, 1, - BitmapBytePad(width), (pointer)pdstLine); - if (!pPixmap) - return; - - ptSrc.x = sx; - ptSrc.y = sy; - box.x1 = 0; - box.y1 = 0; - box.x2 = width; - box.y2 = height; - REGION_INIT(pScreen, &rgnDst, &box, 1); - - pPixmap->drawable.depth = 1; - pPixmap->drawable.bitsPerPixel = 1; - /* dix layer only ever calls GetImage with 1 bit set in planemask - * when format is XYPixmap. - */ - afbDoBitblt(pDrawable, (DrawablePtr)pPixmap, GXcopy, &rgnDst, &ptSrc, - planemask); - - FreeScratchPixmapHeader(pPixmap); - REGION_UNINIT(pScreen, &rgnDst); - } else { - /* Planar to chunky conversion required */ - - PixelType *psrcBits; - PixelType *psrcLine; - PixelType startmask, endmask; - int depthSrc; - int widthSrc; - int sizeSrc; - int sizeDst; - int widthDst; - register PixelType *psrc; - register PixelType *pdst; - register PixelType dst; - register PixelType srcbits; - register int d; - register int b; - register int dstshift; - register int shift_step; - register int start_endbit; - int start_startbit; - register int end_endbit = 0; - register int start_dstshift; - register int nl; - register int h; - int nlmiddle; - - widthDst = PixmapWidthInPadUnits(width, pDrawable->depth); - sizeDst = widthDst * height; - - /* Clear the dest image */ - bzero(pdstLine, sizeDst << 2); - - afbGetPixelWidthSizeDepthAndPointer(pDrawable, widthSrc, sizeSrc, - depthSrc, psrcBits); - - psrcBits = afbScanline(psrcBits, sx, sy, widthSrc); - - start_startbit = PPW - 1 - (sx & PIM); - if ((sx & PIM) + width < PPW) { - maskpartialbits(sx, width, startmask); - nlmiddle = 0; - endmask = 0; - start_endbit = PPW - ((sx + width) & PIM); - } else { - maskbits(sx, width, startmask, endmask, nlmiddle); - start_endbit = 0; - end_endbit = PPW - ((sx + width) & PIM); - } - /* ZPixmap images have either 4 or 8 bits per pixel dependent on - * depth. - */ - if (depthSrc > 4) { - start_dstshift = 24; - shift_step = 8; - } else { - start_dstshift = 28; - shift_step = 4; - } -#define SHIFT_BITS(start_bit,end_bit) \ -for (b = (start_bit); b >= (end_bit); b--) { \ - dst |= ((srcbits >> b) & 1) << dstshift; \ - if ((dstshift -= shift_step) < 0) { \ - dstshift = start_dstshift + d; \ - *pdst++ = dst; \ - dst = *pdst; \ - } \ -} \ - - for (d = 0; d < depthSrc; d++, psrcBits += sizeSrc) { /* @@@ NEXT PLANE @@@ */ - psrcLine = psrcBits; - pdst = (PixelType *)pdstLine; - h = height; - - while (h--) { - psrc = psrcLine; - psrcLine += widthSrc; - dst = *pdst; - dstshift = start_dstshift + d; - - if (startmask) { - srcbits = *psrc++ & startmask; - SHIFT_BITS(start_startbit, start_endbit); - } - - nl = nlmiddle; - while (nl--) { - srcbits = *psrc++; - SHIFT_BITS(PPW - 1, 0); - } - if (endmask) { - srcbits = *psrc & endmask; - SHIFT_BITS(PPW - 1, end_endbit); - } - - if (dstshift != start_dstshift + d) - *pdst++ = dst; - } /* while (h--) */ - } /* for (d = ...) */ - } -} diff --git a/afb/afbimggblt.c b/afb/afbimggblt.c deleted file mode 100644 index 36818ac50..000000000 --- a/afb/afbimggblt.c +++ /dev/null @@ -1,472 +0,0 @@ -/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include "afb.h" -#include -#include "dixfontstr.h" -#include "gcstruct.h" -#include "windowstr.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "regionstr.h" -#include "maskbits.h" - -/* - we should eventually special-case fixed-width fonts for ImageText. - - this works for fonts with glyphs <= 32 bits wide. - - the clipping calculations are done for worst-case fonts. -we make no assumptions about the heights, widths, or bearings -of the glyphs. if we knew that the glyphs are all the same height, -we could clip the tops and bottoms per clipping box, rather -than per character per clipping box. if we knew that the glyphs' -left and right bearings were wlle-behaved, we could clip a single -character at the start, output until the last unclipped -character, and then clip the last one. this is all straightforward -to determine based on max-bounds and min-bounds from the font. - there is some inefficiency introduced in the per-character -clipping to make what's going on clearer. - - (it is possible, for example, for a font to be defined in which the -next-to-last character in a font would be clipped out, but the last -one wouldn't. the code below deals with this.) - - Image text looks at the bits in the glyph and the fg and bg in the -GC. it paints a rectangle, as defined in the protocol dcoument, -and the paints the characters. - - the register allocations for startmask and endmask may not -be the right thing. are there two other deserving candidates? -xoff, pdst, pglyph, and tmpSrc seem like the right things, though. -*/ - -void -afbImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) - DrawablePtr pDrawable; - GC *pGC; - int x, y; - unsigned int nglyph; - CharInfoPtr *ppci; /* array of character info */ - pointer pglyphBase; /* start of array of glyphs */ -{ - ExtentInfoRec info; /* used by QueryGlyphExtents() */ - BoxRec bbox; /* string's bounding box */ - xRectangle backrect;/* backing rectangle to paint. - in the general case, NOT necessarily - the same as the string's bounding box - */ - - CharInfoPtr pci; - int xorg, yorg; /* origin of drawable in bitmap */ - int widthDst; /* width of dst in longwords */ - - /* these keep track of the character origin */ - PixelType *pdstBase; - /* points to longword with character origin */ - int xchar; /* xorigin of char (mod 32) */ - - /* these are used for placing the glyph */ - register int xoff; /* x offset of left edge of glyph (mod 32) */ - register PixelType *pdst; - /* pointer to current longword in dst */ - - register int d; - int depthDst; - int sizeDst; - int hSave; - int w; /* width of glyph in bits */ - int h; /* height of glyph */ - int widthGlyph; /* width of glyph, in bytes */ - unsigned char rrops[AFB_MAX_DEPTH]; - register unsigned char *pglyph; - /* pointer to current row of glyph */ - unsigned char *pglyphSave; - - /* used for putting down glyph */ - register PixelType tmpSrc; - /* for getting bits from glyph */ - register PixelType startmask; - register PixelType endmask; - - register int nFirst;/* bits of glyph in current longword */ - PixelType *pdstSave; - int oldFill; - afbPrivGC *pPriv = (afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, - afbGCPrivateKey); - xorg = pDrawable->x; - yorg = pDrawable->y; - afbGetPixelWidthSizeDepthAndPointer(pDrawable, widthDst, sizeDst, depthDst, - pdstBase); - - QueryGlyphExtents(pGC->font, ppci, (unsigned long)nglyph, &info); - - backrect.x = x; - backrect.y = y - FONTASCENT(pGC->font); - backrect.width = info.overallWidth; - backrect.height = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font); - - x += xorg; - y += yorg; - - bbox.x1 = x + info.overallLeft; - bbox.x2 = x + info.overallRight; - bbox.y1 = y - info.overallAscent; - bbox.y2 = y + info.overallDescent; - - oldFill = pGC->fillStyle; - pGC->fillStyle = FillSolid; - afbReduceRop (pGC->alu, pGC->bgPixel, pGC->planemask, pGC->depth, - pPriv->rrops); - afbPolyFillRect(pDrawable, pGC, 1, &backrect); - pGC->fillStyle = oldFill; - afbReduceRop (pGC->alu, pGC->fgPixel, pGC->planemask, pGC->depth, - pPriv->rrops); - afbReduceRop (GXcopy, pGC->fgPixel, pGC->planemask, pGC->depth, rrops); - - /* the faint-hearted can open their eyes now */ - - switch (RECT_IN_REGION(pGC->pScreen, pGC->pCompositeClip, &bbox)) { - case rgnOUT: - break; - case rgnIN: - pdstBase = afbScanlineNoBankSwitch(pdstBase, x, y, widthDst); - xchar = x & PIM; - - while(nglyph--) { - pci = *ppci; - pglyphSave = FONTGLYPHBITS(pglyphBase, pci); - w = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing; - hSave = pci->metrics.ascent + pci->metrics.descent; - widthGlyph = GLYPHWIDTHBYTESPADDED(pci); - /* start at top scanline of glyph */ - pdstSave = afbScanlineDelta(pdstBase, -pci->metrics.ascent, - widthDst); - - /* find correct word in scanline and x offset within it - for left edge of glyph - */ - xoff = xchar + pci->metrics.leftSideBearing; - if (xoff > PLST) { - pdstSave++; - xoff &= PIM; - } else if (xoff < 0) { - xoff += PPW; - pdstSave--; - } - - for (d = 0; d < depthDst; d++) { - h = hSave; - pdst = pdstSave; - pdstSave += sizeDst; /* @@@ NEXT PLANE @@@ */ - pglyph = pglyphSave; - - if ((xoff + w) <= PPW) { - /* glyph all in one longword */ - maskpartialbits(xoff, w, startmask); - - switch (rrops[d]) { - case RROP_BLACK: - while (h--) { - getleftbits(pglyph, w, tmpSrc); - *pdst &= ~(SCRRIGHT(tmpSrc, xoff) & startmask); - pglyph += widthGlyph; - afbScanlineInc(pdst, widthDst); - } - break; - case RROP_WHITE: - while (h--) { - getleftbits(pglyph, w, tmpSrc); - *pdst |= SCRRIGHT(tmpSrc, xoff) & startmask; - pglyph += widthGlyph; - afbScanlineInc(pdst, widthDst); - } - break; - case RROP_NOP: - break; - } - } else { - /* glyph crosses longword boundary */ - maskPPWbits(xoff, w, startmask, endmask); - nFirst = PPW - xoff; - - switch (rrops[d]) { - case RROP_BLACK: - while (h--) { - getleftbits(pglyph, w, tmpSrc); - *pdst &= ~(SCRRIGHT(tmpSrc, xoff) & startmask); - *(pdst+1) &= ~(SCRLEFT(tmpSrc, nFirst) & endmask); - pglyph += widthGlyph; - afbScanlineInc(pdst, widthDst); - } - break; - case RROP_WHITE: - while (h--) { - getleftbits(pglyph, w, tmpSrc); - *pdst |= SCRRIGHT(tmpSrc, xoff) & startmask; - *(pdst+1) |= SCRLEFT(tmpSrc, nFirst) & endmask; - pglyph += widthGlyph; - afbScanlineInc(pdst, widthDst); - } - break; - case RROP_NOP: - break; - } - } /* glyph crosses longwords boundary */ - } /* depth loop */ - /* update character origin */ - x += pci->metrics.characterWidth; - xchar += pci->metrics.characterWidth; - if (xchar > PLST) { - xchar -= PPW; - pdstBase++; - } else if (xchar < 0) { - xchar += PPW; - pdstBase--; - } - ppci++; - } /* while nglyph-- */ - break; - case rgnPART: - { - afbTEXTPOS *ppos; - int nbox; - BoxPtr pbox; - RegionPtr cclip; - int xpos; /* x position of char origin */ - int i; - BoxRec clip; - int leftEdge, rightEdge; - int topEdge, bottomEdge; - int glyphRow; /* first row of glyph not wholly - clipped out */ - int glyphCol; /* leftmost visible column of glyph */ -#if GETLEFTBITS_ALIGNMENT > 1 - int getWidth; /* bits to get from glyph */ -#endif - - if(!(ppos = (afbTEXTPOS *)xalloc(nglyph * sizeof(afbTEXTPOS)))) - return; - - pdstBase = afbScanlineNoBankSwitch(pdstBase, x, y, widthDst); - xpos = x; - xchar = xpos & PIM; - - for (i = 0; i < nglyph; i++) { - pci = ppci[i]; - - ppos[i].xpos = xpos; - ppos[i].xchar = xchar; - ppos[i].leftEdge = xpos + pci->metrics.leftSideBearing; - ppos[i].rightEdge = xpos + pci->metrics.rightSideBearing; - ppos[i].topEdge = y - pci->metrics.ascent; - ppos[i].bottomEdge = y + pci->metrics.descent; - ppos[i].pdstBase = pdstBase; - ppos[i].widthGlyph = GLYPHWIDTHBYTESPADDED(pci); - - xpos += pci->metrics.characterWidth; - xchar += pci->metrics.characterWidth; - if (xchar > PLST) { - xchar &= PIM; - pdstBase++; - } else if (xchar < 0) { - xchar += PPW; - pdstBase--; - } - } - - cclip = pGC->pCompositeClip; - pbox = REGION_RECTS(cclip); - nbox = REGION_NUM_RECTS(cclip); - - /* HACK ALERT - since we continue out of the loop below so often, it - is easier to increment pbox at the top than at the end. - don't try this at home. - */ - pbox--; - while(nbox--) { - pbox++; - clip.x1 = max(bbox.x1, pbox->x1); - clip.y1 = max(bbox.y1, pbox->y1); - clip.x2 = min(bbox.x2, pbox->x2); - clip.y2 = min(bbox.y2, pbox->y2); - if ((clip.x2<=clip.x1) || (clip.y2<=clip.y1)) - continue; - - for(i=0; i clip.x2) - rightEdge = clip.x2; - else - rightEdge = ppos[i].rightEdge; - - w = rightEdge - leftEdge; - if (w <= 0) - continue; - - /* clip the top and bottom edges */ - if (ppos[i].topEdge < clip.y1) - topEdge = clip.y1; - else - topEdge = ppos[i].topEdge; - - if (ppos[i].bottomEdge > clip.y2) - bottomEdge = clip.y2; - else - bottomEdge = ppos[i].bottomEdge; - - hSave = bottomEdge - topEdge; - if (hSave <= 0) - continue; - - glyphRow = (topEdge - y) + pci->metrics.ascent; - widthGlyph = ppos[i].widthGlyph; - pglyphSave = FONTGLYPHBITS(pglyphBase, pci); - pglyphSave += (glyphRow * widthGlyph); - - glyphCol = (leftEdge - ppos[i].xpos) - - (pci->metrics.leftSideBearing); -#if GETLEFTBITS_ALIGNMENT > 1 - getWidth = w + glyphCol; -#endif - - pdstSave = afbScanlineDelta(ppos[i].pdstBase, -(y-topEdge), - widthDst); - xoff = xchar + (leftEdge - ppos[i].xpos); - if (xoff > PLST) { - xoff &= PIM; - pdstSave++; - } else if (xoff < 0) { - xoff += PPW; - pdstSave--; - } - - for (d = 0; d < depthDst; d++) { - h = hSave; - pdst = pdstSave; - pdstSave += sizeDst; /* @@@ NEXT PLANE @@@ */ - pglyph = pglyphSave; - - if ((xoff + w) <= PPW) { - maskpartialbits(xoff, w, startmask); - - switch (rrops[d]) { - case RROP_BLACK: - while (h--) { - getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); - *pdst &= ~(SCRRIGHT(tmpSrc, xoff) & startmask); - pglyph += widthGlyph; - afbScanlineInc(pdst, widthDst); - } - break; - case RROP_WHITE: - while (h--) { - getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); - *pdst |= SCRRIGHT(tmpSrc, xoff) & startmask; - pglyph += widthGlyph; - afbScanlineInc(pdst, widthDst); - } - break; - case RROP_NOP: - break; - } - } else { - maskPPWbits(xoff, w, startmask, endmask); - nFirst = PPW - xoff; - - switch (rrops[d]) { - case RROP_BLACK: - while (h--) { - getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); - *pdst &= ~(SCRRIGHT(tmpSrc, xoff) & startmask); - *(pdst+1) &= ~(SCRLEFT(tmpSrc, nFirst) & endmask); - pglyph += widthGlyph; - afbScanlineInc(pdst, widthDst); - } - break; - case RROP_WHITE: - while (h--) { - getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); - *pdst |= SCRRIGHT(tmpSrc, xoff) & startmask; - *(pdst+1) |= SCRLEFT(tmpSrc, nFirst) & endmask; - pglyph += widthGlyph; - afbScanlineInc(pdst, widthDst); - } - break; - case RROP_NOP: - break; - } - } - } /* depth */ - } /* for each glyph */ - } /* while nbox-- */ - xfree(ppos); - break; - } - - default: - break; - } -} diff --git a/afb/afbline.c b/afb/afbline.c deleted file mode 100644 index d05675869..000000000 --- a/afb/afbline.c +++ /dev/null @@ -1,707 +0,0 @@ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include - -#include "gcstruct.h" -#include "windowstr.h" -#include "pixmapstr.h" -#include "regionstr.h" -#include "scrnintstr.h" -#include "mistruct.h" - -#include "afb.h" -#include "maskbits.h" -#include "miline.h" - -/* single-pixel lines on a color frame buffer - - NON-SLOPED LINES - horizontal lines are always drawn left to right; we have to -move the endpoints right by one after they're swapped. - horizontal lines will be confined to a single band of a -region. the code finds that band (giving up if the lower -bound of the band is above the line we're drawing); then it -finds the first box in that band that contains part of the -line. we clip the line to subsequent boxes in that band. - vertical lines are always drawn top to bottom (y-increasing.) -this requires adding one to the y-coordinate of each endpoint -after swapping. - - SLOPED LINES - when clipping a sloped line, we bring the second point inside -the clipping box, rather than one beyond it, and then add 1 to -the length of the line before drawing it. this lets us use -the same box for finding the outcodes for both endpoints. since -the equation for clipping the second endpoint to an edge gives us -1 beyond the edge, we then have to move the point towards the -first point by one step on the major axis. - eventually, there will be a diagram here to explain what's going -on. the method uses Cohen-Sutherland outcodes to determine -outsideness, and a method similar to Pike's layers for doing the -actual clipping. - -*/ - -void -#ifdef POLYSEGMENT -afbSegmentSS(pDrawable, pGC, nseg, pSeg) - DrawablePtr pDrawable; - GCPtr pGC; - int nseg; - register xSegment *pSeg; -#else -afbLineSS(pDrawable, pGC, mode, npt, pptInit) - DrawablePtr pDrawable; - GCPtr pGC; - int mode; /* Origin or Previous */ - int npt; /* number of points */ - DDXPointPtr pptInit; -#endif -{ - int nboxInit; - register int nbox; - BoxPtr pboxInit; - register BoxPtr pbox; -#ifndef POLYSEGMENT - register DDXPointPtr ppt; /* pointer to list of translated points */ -#endif - - unsigned int oc1; /* outcode of point 1 */ - unsigned int oc2; /* outcode of point 2 */ - - PixelType *addrlBase; /* pointer to start of drawable */ - int nlwidth; /* width in longwords of destination pixmap */ - int xorg, yorg; /* origin of window */ - - int adx; /* abs values of dx and dy */ - int ady; - int signdx; /* sign of dx and dy */ - int signdy; - int e, e1, e2; /* bresenham error and increments */ - int len; /* length of segment */ - int axis; /* major axis */ - int octant; - unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); - int depthDst; -#ifndef POLYSEGMENT - PixelType *addrl; /* address of destination pixmap */ - int d; -#endif - int sizeDst; - unsigned char *rrops; - - /* a bunch of temporaries */ - register int y1, y2; - register int x1, x2; - RegionPtr cclip; - - cclip = pGC->pCompositeClip; - rrops = ((afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, - afbGCPrivateKey))->rrops; - pboxInit = REGION_RECTS(cclip); - nboxInit = REGION_NUM_RECTS(cclip); - - afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, - addrlBase); - - xorg = pDrawable->x; - yorg = pDrawable->y; -#ifdef POLYSEGMENT - while (nseg--) -#else - ppt = pptInit; - x2 = ppt->x + xorg; - y2 = ppt->y + yorg; - while(--npt) -#endif - { - nbox = nboxInit; - pbox = pboxInit; - -#ifdef POLYSEGMENT - x1 = pSeg->x1 + xorg; - y1 = pSeg->y1 + yorg; - x2 = pSeg->x2 + xorg; - y2 = pSeg->y2 + yorg; - pSeg++; -#else - x1 = x2; - y1 = y2; - ++ppt; - if (mode == CoordModePrevious) { - xorg = x1; - yorg = y1; - } - x2 = ppt->x + xorg; - y2 = ppt->y + yorg; -#endif - - if (x1 == x2) /* vertical line */ - { - /* make the line go top to bottom of screen, keeping - endpoint semantics - */ - if (y1 > y2) { - register int tmp; - - tmp = y2; - y2 = y1 + 1; - y1 = tmp + 1; -#ifdef POLYSEGMENT - if (pGC->capStyle != CapNotLast) - y1--; -#endif - } -#ifdef POLYSEGMENT - else if (pGC->capStyle != CapNotLast) - y2++; -#endif - /* get to first band that might contain part of line */ - while ((nbox) && (pbox->y2 <= y1)) { - pbox++; - nbox--; - } - - if (nbox) { - /* stop when lower edge of box is beyond end of line */ - while((nbox) && (y2 >= pbox->y1)) { - if ((x1 >= pbox->x1) && (x1 < pbox->x2)) { - int y1t, y2t; - /* this box has part of the line in it */ - y1t = max(y1, pbox->y1); - y2t = min(y2, pbox->y2); - if (y1t != y2t) - afbVertS(addrlBase, nlwidth, sizeDst, depthDst, x1, y1t, - y2t-y1t, rrops); /* @@@ NEXT PLANE PASSED @@@ */ - } - nbox--; - pbox++; - } - } -#ifndef POLYSEGMENT - y2 = ppt->y + yorg; -#endif - } else if (y1 == y2) /* horizontal line */ { - /* force line from left to right, keeping - endpoint semantics - */ - if (x1 > x2) { - register int tmp; - - tmp = x2; - x2 = x1 + 1; - x1 = tmp + 1; -#ifdef POLYSEGMENT - if (pGC->capStyle != CapNotLast) - x1--; -#endif - } -#ifdef POLYSEGMENT - else if (pGC->capStyle != CapNotLast) - x2++; -#endif - - /* find the correct band */ - while( (nbox) && (pbox->y2 <= y1)) { - pbox++; - nbox--; - } - - /* try to draw the line, if we haven't gone beyond it */ - if ((nbox) && (pbox->y1 <= y1)) { - int tmp; - - /* when we leave this band, we're done */ - tmp = pbox->y1; - while((nbox) && (pbox->y1 == tmp)) { - int x1t, x2t; - - if (pbox->x2 <= x1) { - /* skip boxes until one might contain start point */ - nbox--; - pbox++; - continue; - } - - /* stop if left of box is beyond right of line */ - if (pbox->x1 >= x2) { - nbox = 0; - break; - } - - x1t = max(x1, pbox->x1); - x2t = min(x2, pbox->x2); - if (x1t != x2t) - afbHorzS(addrlBase, nlwidth, sizeDst, depthDst, x1t, y1, - x2t-x1t, rrops); /* @@@ NEXT PLANE PASSED @@@ */ - nbox--; - pbox++; - } - } -#ifndef POLYSEGMENT - x2 = ppt->x + xorg; -#endif - } - else /* sloped line */ - { - CalcLineDeltas(x1, y1, x2, y2, adx, ady, - signdx, signdy, 1, 1, octant); - - if (adx > ady) { - axis = X_AXIS; - e1 = ady << 1; - e2 = e1 - (adx << 1); - e = e1 - adx; - } else { - axis = Y_AXIS; - e1 = adx << 1; - e2 = e1 - (ady << 1); - e = e1 - ady; - SetYMajorOctant(octant); - } - - FIXUP_ERROR(e, octant, bias); - - /* we have bresenham parameters and two points. - all we have to do now is clip and draw. - */ - - while(nbox--) { - oc1 = 0; - oc2 = 0; - OUTCODES(oc1, x1, y1, pbox); - OUTCODES(oc2, x2, y2, pbox); - if ((oc1 | oc2) == 0) { - if (axis == X_AXIS) - len = adx; - else - len = ady; -#ifdef POLYSEGMENT - if (pGC->capStyle != CapNotLast) - len++; -#endif - afbBresS(addrlBase, nlwidth, sizeDst, depthDst, signdx, signdy, - axis, x1, y1, e, e1, e2, len, rrops); /* @@@ NEXT PLANE PASSED @@@ */ - break; - } else if (oc1 & oc2) { - pbox++; - } else { - int new_x1 = x1, new_y1 = y1, new_x2 = x2, new_y2 = y2; - int clip1 = 0, clip2 = 0; - int clipdx, clipdy; - int err; - - if (miZeroClipLine(pbox->x1, pbox->y1, pbox->x2-1, - pbox->y2-1, - &new_x1, &new_y1, &new_x2, &new_y2, - adx, ady, &clip1, &clip2, - octant, bias, oc1, oc2) == -1) { - pbox++; - continue; - } - - if (axis == X_AXIS) - len = abs(new_x2 - new_x1); - else - len = abs(new_y2 - new_y1); -#ifdef POLYSEGMENT - if (clip2 != 0 || pGC->capStyle != CapNotLast) - len++; -#else - len += (clip2 != 0); -#endif - if (len) { - /* unwind bresenham error term to first point */ - if (clip1) { - clipdx = abs(new_x1 - x1); - clipdy = abs(new_y1 - y1); - if (axis == X_AXIS) - err = e+((clipdy*e2) + ((clipdx-clipdy)*e1)); - else - err = e+((clipdx*e2) + ((clipdy-clipdx)*e1)); - } - else - err = e; - afbBresS(addrlBase, nlwidth, sizeDst, depthDst, signdx, - signdy, axis, new_x1, new_y1, err, e1, e2, len, - rrops); /* @@@ NEXT PLANE PASSED @@@ */ - } - pbox++; - } - } /* while (nbox--) */ - } /* sloped line */ - } /* while (nline--) */ - -#ifndef POLYSEGMENT - - /* paint the last point if the end style isn't CapNotLast. - (Assume that a projecting, butt, or round cap that is one - pixel wide is the same as the single pixel of the endpoint.) - */ - - if ((pGC->capStyle != CapNotLast) && - ((ppt->x + xorg != pptInit->x + pDrawable->x) || - (ppt->y + yorg != pptInit->y + pDrawable->y) || - (ppt == pptInit + 1))) { - nbox = nboxInit; - pbox = pboxInit; - while (nbox--) { - if ((x2 >= pbox->x1) && (y2 >= pbox->y1) && (x2 < pbox->x2) && - (y2 < pbox->y2)) { - for (d = 0; d < depthDst; d++) { - addrl = afbScanline(addrlBase, x2, y2, nlwidth); - addrlBase += sizeDst; /* @@@ NEXT PLANE @@@ */ - - switch(rrops[d]) { - case RROP_BLACK: - *addrl &= mfbGetrmask(x2 & PIM); - break; - case RROP_WHITE: - *addrl |= mfbGetmask(x2 & PIM); - break; - case RROP_INVERT: - *addrl ^= mfbGetmask(x2 & PIM); - break; - case RROP_NOP: - break; - } /* switch */ - } /* for (d = ...) */ - break; - } else - pbox++; - } - } -#endif -} - -/* - * Draw dashed 1-pixel lines. - */ - -void -#ifdef POLYSEGMENT -afbSegmentSD(pDrawable, pGC, nseg, pSeg) - DrawablePtr pDrawable; - register GCPtr pGC; - int nseg; - register xSegment *pSeg; -#else -afbLineSD(pDrawable, pGC, mode, npt, pptInit) - DrawablePtr pDrawable; - register GCPtr pGC; - int mode; /* Origin or Previous */ - int npt; /* number of points */ - DDXPointPtr pptInit; -#endif -{ - int nboxInit; - register int nbox; - BoxPtr pboxInit; - register BoxPtr pbox; -#ifndef POLYSEGMENT - register DDXPointPtr ppt; /* pointer to list of translated points */ -#endif - - register unsigned int oc1; /* outcode of point 1 */ - register unsigned int oc2; /* outcode of point 2 */ - - PixelType *addrlBase; /* address of destination pixmap */ - int nlwidth; /* width in longwords of destination pixmap */ - int sizeDst; - int depthDst; - int xorg, yorg; /* origin of window */ - - int adx; /* abs values of dx and dy */ - int ady; - int signdx; /* sign of dx and dy */ - int signdy; - int e, e1, e2; /* bresenham error and increments */ - int len; /* length of segment */ - int axis; /* major axis */ - int octant; - unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); - int x1, x2, y1, y2; - RegionPtr cclip; - unsigned char *rrops; - unsigned char bgrrops[AFB_MAX_DEPTH]; - unsigned char *pDash; - int dashOffset; - int numInDashList; - int dashIndex; - int isDoubleDash; - int dashIndexTmp, dashOffsetTmp; - int unclippedlen; -#ifndef POLYSEGMENT - PixelType *addrl; - int d; -#endif - - cclip = pGC->pCompositeClip; - rrops = ((afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, - afbGCPrivateKey))->rrops; - pboxInit = REGION_RECTS(cclip); - nboxInit = REGION_NUM_RECTS(cclip); - - afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, - addrlBase); - - /* compute initial dash values */ - - pDash = (unsigned char *) pGC->dash; - numInDashList = pGC->numInDashList; - isDoubleDash = (pGC->lineStyle == LineDoubleDash); - dashIndex = 0; - dashOffset = 0; - miStepDash ((int)pGC->dashOffset, &dashIndex, pDash, - numInDashList, &dashOffset); - - if (isDoubleDash) - afbReduceRop (pGC->alu, pGC->bgPixel, pGC->planemask, pGC->depth, - bgrrops); - - xorg = pDrawable->x; - yorg = pDrawable->y; -#ifdef POLYSEGMENT - while (nseg--) -#else - ppt = pptInit; - x2 = ppt->x + xorg; - y2 = ppt->y + yorg; - while(--npt) -#endif - { - nbox = nboxInit; - pbox = pboxInit; - -#ifdef POLYSEGMENT - x1 = pSeg->x1 + xorg; - y1 = pSeg->y1 + yorg; - x2 = pSeg->x2 + xorg; - y2 = pSeg->y2 + yorg; - pSeg++; -#else - x1 = x2; - y1 = y2; - ++ppt; - if (mode == CoordModePrevious) { - xorg = x1; - yorg = y1; - } - x2 = ppt->x + xorg; - y2 = ppt->y + yorg; -#endif - - CalcLineDeltas(x1, y1, x2, y2, adx, ady, signdx, signdy, - 1, 1, octant); - - if (adx > ady) { - axis = X_AXIS; - e1 = ady << 1; - e2 = e1 - (adx << 1); - e = e1 - adx; - unclippedlen = adx; - } else { - axis = Y_AXIS; - e1 = adx << 1; - e2 = e1 - (ady << 1); - e = e1 - ady; - unclippedlen = ady; - SetYMajorOctant(octant); - } - - FIXUP_ERROR(e, octant, bias); - - /* we have bresenham parameters and two points. - all we have to do now is clip and draw. - */ - - while(nbox--) { - oc1 = 0; - oc2 = 0; - OUTCODES(oc1, x1, y1, pbox); - OUTCODES(oc2, x2, y2, pbox); - if ((oc1 | oc2) == 0) { -#ifdef POLYSEGMENT - if (pGC->capStyle != CapNotLast) - unclippedlen++; - dashIndexTmp = dashIndex; - dashOffsetTmp = dashOffset; - afbBresD(&dashIndexTmp, pDash, numInDashList, &dashOffsetTmp, - isDoubleDash, addrlBase, nlwidth, sizeDst, depthDst, - signdx, signdy, axis, x1, y1, e, e1, e2, unclippedlen, - rrops, bgrrops); /* @@@ NEXT PLANE PASSED @@@ */ - break; -#else - afbBresD(&dashIndex, pDash, numInDashList, &dashOffset, - isDoubleDash, addrlBase, nlwidth, sizeDst, depthDst, - signdx, signdy, axis, x1, y1, e, e1, e2, unclippedlen, - rrops, bgrrops); /* @@@ NEXT PLANE PASSED @@@ */ - goto dontStep; -#endif - } else if (oc1 & oc2) { - pbox++; - } else /* have to clip */ { - int new_x1 = x1, new_y1 = y1, new_x2 = x2, new_y2 = y2; - int clip1 = 0, clip2 = 0; - int clipdx, clipdy; - int err; - - if (miZeroClipLine(pbox->x1, pbox->y1, pbox->x2-1, pbox->y2-1, - &new_x1, &new_y1, &new_x2, &new_y2, - adx, ady, &clip1, &clip2, - octant, bias, oc1, oc2) == -1) { - pbox++; - continue; - } - dashIndexTmp = dashIndex; - dashOffsetTmp = dashOffset; - if (clip1) { - int dlen; - - if (axis == X_AXIS) - dlen = abs(new_x1 - x1); - else - dlen = abs(new_y1 - y1); - miStepDash (dlen, &dashIndexTmp, pDash, - numInDashList, &dashOffsetTmp); - } - if (axis == X_AXIS) - len = abs(new_x2 - new_x1); - else - len = abs(new_y2 - new_y1); -#ifdef POLYSEGMENT - if (clip2 != 0 || pGC->capStyle != CapNotLast) - len++; -#else - len += (clip2 != 0); -#endif - if (len) { - /* unwind bresenham error term to first point */ - if (clip1) { - clipdx = abs(new_x1 - x1); - clipdy = abs(new_y1 - y1); - if (axis == X_AXIS) - err = e+((clipdy*e2) + ((clipdx-clipdy)*e1)); - else - err = e+((clipdx*e2) + ((clipdy-clipdx)*e1)); - } - else - err = e; - afbBresD(&dashIndexTmp, pDash, numInDashList, &dashOffsetTmp, - isDoubleDash, addrlBase, nlwidth, sizeDst, depthDst, - signdx, signdy, axis, new_x1, new_y1, err, e1, e2, - len, rrops, bgrrops); /* @@@ NEXT PLANE PASSED @@@ */ - } - pbox++; - } - } /* while (nbox--) */ -#ifndef POLYSEGMENT - /* - * walk the dash list around to the next line - */ - miStepDash (unclippedlen, &dashIndex, pDash, - numInDashList, &dashOffset); -dontStep: ; -#endif - } /* while (nline--) */ - -#ifndef POLYSEGMENT - /* paint the last point if the end style isn't CapNotLast. - (Assume that a projecting, butt, or round cap that is one - pixel wide is the same as the single pixel of the endpoint.) - */ - - if ((pGC->capStyle != CapNotLast) && - ((dashIndex & 1) == 0 || isDoubleDash) && - ((ppt->x + xorg != pptInit->x + pDrawable->x) || - (ppt->y + yorg != pptInit->y + pDrawable->y) || - (ppt == pptInit + 1))) { - nbox = nboxInit; - pbox = pboxInit; - while (nbox--) { - if ((x2 >= pbox->x1) && (y2 >= pbox->y1) && (x2 < pbox->x2) && - (y2 < pbox->y2)) { - int rop; - - for (d = 0; d < depthDst; d++) { - addrl = afbScanline(addrlBase, x2, y2, nlwidth); - addrlBase += sizeDst; /* @@@ NEXT PLANE @@@ */ - - rop = rrops[d]; - if (dashIndex & 1) - rop = bgrrops[d]; - - switch (rop) { - case RROP_BLACK: - *addrl &= mfbGetrmask(x2 & PIM); - break; - case RROP_WHITE: - *addrl |= mfbGetmask(x2 & PIM); - break; - - case RROP_INVERT: - *addrl ^= mfbGetmask(x2 & PIM); - break; - - case RROP_NOP: - break; - } - } /* for (d = ...) */ - break; - } else - pbox++; - } - } -#endif -} diff --git a/afb/afbmisc.c b/afb/afbmisc.c deleted file mode 100644 index 8e9c9e8e9..000000000 --- a/afb/afbmisc.c +++ /dev/null @@ -1,94 +0,0 @@ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include "misc.h" -#include "cursor.h" -#include "scrnintstr.h" - -#include "afb.h" - -/*ARGSUSED*/ -void -afbQueryBestSize(class, pwidth, pheight, pScreen) -int class; -unsigned short *pwidth; -unsigned short *pheight; -ScreenPtr pScreen; -{ - unsigned width, test; - - switch(class) { - case CursorShape: - if (*pwidth > pScreen->width) - *pwidth = pScreen->width; - if (*pheight > pScreen->height) - *pheight = pScreen->height; - break; - case TileShape: - case StippleShape: - width = *pwidth; - if (!width) break; - /* Return the closes power of two not less than what they gave me */ - test = 0x80000000; - /* Find the highest 1 bit in the width given */ - while(!(test & width)) - test >>= 1; - /* If their number is greater than that, bump up to the next - * power of two */ - if((test - 1) & width) - test <<= 1; - *pwidth = test; - /* We don't care what height they use */ - break; - } -} diff --git a/afb/afbpixmap.c b/afb/afbpixmap.c deleted file mode 100644 index ad591a1af..000000000 --- a/afb/afbpixmap.c +++ /dev/null @@ -1,299 +0,0 @@ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -/* pixmap management - written by drewry, september 1986 - - on a monchrome device, a pixmap is a bitmap. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include - -#include -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "maskbits.h" - -#include "afb.h" -#include "mi.h" - -#include "servermd.h" -#include "mfb.h" - -PixmapPtr -afbCreatePixmap(pScreen, width, height, depth, usage_hint) - ScreenPtr pScreen; - int width; - int height; - int depth; - unsigned usage_hint; -{ - PixmapPtr pPixmap; - size_t datasize; - size_t paddedWidth; - - paddedWidth = BitmapBytePad(width); - - if (paddedWidth > 32767 || height > 32767 || depth > 4) - return NullPixmap; - - datasize = height * paddedWidth * depth; - pPixmap = AllocatePixmap(pScreen, datasize); - if (!pPixmap) - return(NullPixmap); - pPixmap->drawable.type = DRAWABLE_PIXMAP; - pPixmap->drawable.class = 0; - pPixmap->drawable.pScreen = pScreen; - pPixmap->drawable.depth = depth; - pPixmap->drawable.bitsPerPixel = depth; - pPixmap->drawable.id = 0; - pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; - pPixmap->drawable.x = 0; - pPixmap->drawable.y = 0; - pPixmap->drawable.width = width; - pPixmap->drawable.height = height; - pPixmap->devKind = paddedWidth; - pPixmap->refcnt = 1; - pPixmap->devPrivate.ptr = datasize ? - (pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL; - pPixmap->usage_hint = usage_hint; - return(pPixmap); -} - -Bool -afbDestroyPixmap(pPixmap) - PixmapPtr pPixmap; -{ - if(--pPixmap->refcnt) - return(TRUE); - dixFreePrivates(pPixmap->devPrivates); - xfree(pPixmap); - return(TRUE); -} - - -static PixmapPtr -afbCopyPixmap(PixmapPtr pSrc) -{ - register PixmapPtr pDst; - int size; - ScreenPtr pScreen; - - size = pSrc->drawable.height * pSrc->devKind * pSrc->drawable.depth; - pScreen = pSrc->drawable.pScreen; - pDst = (*pScreen->CreatePixmap)(pScreen, - pSrc->drawable.width, - pSrc->drawable.height, - pSrc->drawable.depth, 0); - if (!pDst) - return(NullPixmap); - memmove((char *)pDst->devPrivate.ptr, (char *)pSrc->devPrivate.ptr, size); - return(pDst); -} - - -/* replicates a pattern to be a full 32 bits wide. - relies on the fact that each scnaline is longword padded. - doesn't do anything if pixmap is not a factor of 32 wide. - changes width field of pixmap if successful, so that the fast - XRotatePixmap code gets used if we rotate the pixmap later. - - calculate number of times to repeat - for each scanline of pattern - zero out area to be filled with replicate - left shift and or in original as many times as needed -*/ -static void -afbPadPixmap(PixmapPtr pPixmap) -{ - register int width = pPixmap->drawable.width; - register int h; - register PixelType mask; - register PixelType *p; - register PixelType bits; /* real pattern bits */ - register int i; - int d; - int rep; /* repeat count for pattern */ - - if (width >= PPW) - return; - - rep = PPW/width; - if (rep*width != PPW) - return; - - mask = mfbGetendtab(width); - - p = (PixelType *)(pPixmap->devPrivate.ptr); - - for (d = 0; d < pPixmap->drawable.depth; d++) { - for (h = 0; h < pPixmap->drawable.height; h++) { - *p &= mask; - bits = *p; - for(i = 1; i < rep; i++) { - bits = SCRRIGHT(bits, width); - *p |= bits; - } - p++; /* @@@ NEXT PLANE @@@ */ - } - } - pPixmap->drawable.width = PPW; -} - -/* Rotates pixmap pPix by w pixels to the right on the screen. Assumes that - * words are PPW bits wide, and that the least significant bit appears on the - * left. - */ -void -afbXRotatePixmap(pPix, rw) - PixmapPtr pPix; - register int rw; -{ - register PixelType *pw, *pwFinal; - register PixelType t; - - if (pPix == NullPixmap) - return; - - pw = (PixelType *)pPix->devPrivate.ptr; - rw %= (int)pPix->drawable.width; - if (rw < 0) - rw += (int)pPix->drawable.width; - if(pPix->drawable.width == PPW) { - pwFinal = pw + pPix->drawable.height * pPix->drawable.depth; - while(pw < pwFinal) { - t = *pw; - *pw++ = SCRRIGHT(t, rw) | - (SCRLEFT(t, (PPW-rw)) & mfbGetendtab(rw)); - } - } else { - /* We no longer do this. Validate doesn't try to rotate odd-size - * tiles or stipples. afbUnnaturalFS works directly off - * the unrotate tile/stipple in the GC - */ - ErrorF("X internal error: trying to rotate odd-sized pixmap.\n"); - } - -} - -/* Rotates pixmap pPix by h lines. Assumes that h is always less than - pPix->height - works on any width. - */ -void -afbYRotatePixmap(pPix, rh) - register PixmapPtr pPix; - int rh; -{ - int nbyDown; /* bytes to move down to row 0; also offset of - row rh */ - int nbyUp; /* bytes to move up to line rh; also - offset of first line moved down to 0 */ - char *pbase; - char *ptmp; - int height; - int d; - - if (pPix == NullPixmap) - return; - height = (int) pPix->drawable.height; - rh %= height; - if (rh < 0) - rh += height; - - nbyDown = rh * pPix->devKind; - nbyUp = (pPix->devKind * height) - nbyDown; - - if(!(ptmp = (char *)xalloc(nbyUp))) - return; - - for (d = 0; d < pPix->drawable.depth; d++) { - pbase = (char *)pPix->devPrivate.ptr + pPix->devKind * height * d; /* @@@ NEXT PLANE @@@ */ - - memmove(ptmp, pbase, nbyUp); /* save the low rows */ - memmove(pbase, pbase+nbyUp, nbyDown); /* slide the top rows down */ - memmove(pbase+nbyDown, ptmp, nbyUp); /* move lower rows up to row rh */ - } - xfree(ptmp); -} - -void -afbCopyRotatePixmap(psrcPix, ppdstPix, xrot, yrot) - register PixmapPtr psrcPix, *ppdstPix; - int xrot, yrot; -{ - register PixmapPtr pdstPix; - - if ((pdstPix = *ppdstPix) && - (pdstPix->devKind == psrcPix->devKind) && - (pdstPix->drawable.height == psrcPix->drawable.height) && - (pdstPix->drawable.depth == psrcPix->drawable.depth)) { - memmove((char *)pdstPix->devPrivate.ptr, - (char *)psrcPix->devPrivate.ptr, - psrcPix->drawable.height * psrcPix->devKind * - psrcPix->drawable.depth); - pdstPix->drawable.width = psrcPix->drawable.width; - pdstPix->drawable.serialNumber = NEXT_SERIAL_NUMBER; - } else { - if (pdstPix) - /* FIX XBUG 6168 */ - (*pdstPix->drawable.pScreen->DestroyPixmap)(pdstPix); - *ppdstPix = pdstPix = afbCopyPixmap(psrcPix); - if (!pdstPix) - return; - } - afbPadPixmap(pdstPix); - if (xrot) - afbXRotatePixmap(pdstPix, xrot); - if (yrot) - afbYRotatePixmap(pdstPix, yrot); -} diff --git a/afb/afbply1rct.c b/afb/afbply1rct.c deleted file mode 100644 index e9d4d5e09..000000000 --- a/afb/afbply1rct.c +++ /dev/null @@ -1,300 +0,0 @@ -/* - * -Copyright (c) 1990 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - * - * Author: Keith Packard, MIT X Consortium - */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include - -#include - -#include "gcstruct.h" -#include "windowstr.h" -#include "pixmapstr.h" -#include "regionstr.h" -#include "scrnintstr.h" -#include "mistruct.h" - -#include "afb.h" -#include "maskbits.h" - -#if defined(mips) || defined(sparc) -#define GetHighWord(x) (((int)(x)) >> 16) -#else -#define GetHighWord(x) (((int)(x)) / 65536) -#endif - -#if IMAGE_BYTE_ORDER == MSBFirst -#define intToCoord(i,x,y) (((x) = GetHighWord(i)), ((y) = (int)((short) (i)))) -#define coordToInt(x,y) (((x) << 16) | (y)) -#define intToX(i) (GetHighWord(i)) -#define intToY(i) ((int)((short) i)) -#else -#define intToCoord(i,x,y) (((x) = (int)((short) (i))), ((y) = GetHighWord(i))) -#define coordToInt(x,y) (((y) << 16) | (x)) -#define intToX(i) ((int)((short) (i))) -#define intToY(i) (GetHighWord(i)) -#endif - -void -afbFillPolygonSolid (pDrawable, pGC, shape, mode, count, ptsIn) - DrawablePtr pDrawable; - GCPtr pGC; - int shape; - int mode; - int count; - DDXPointPtr ptsIn; -{ - afbPrivGCPtr devPriv; - int nlwidth; - PixelType *addrl, *addr; - int maxy; - int origin; - register int vertex1, vertex2; - int c; - BoxPtr extents; - int clip; - int y; - int *vertex1p = NULL, *vertex2p; - int *endp; - int x1 = 0, x2 = 0; - int dx1 = 0, dx2 = 0; - int dy1 = 0, dy2 = 0; - int e1 = 0, e2 = 0; - int step1 = 0, step2 = 0; - int sign1 = 0, sign2 = 0; - int h; - int l, r; - PixelType mask, bits = ~((PixelType)0); - int nmiddle; - register unsigned char *rrops; - register int n; - register int d; - int sizeDst; - int depthDst; - register PixelType *pdst; - - devPriv = (afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, - afbGCPrivateKey); - if (mode == CoordModePrevious || shape != Convex || - REGION_NUM_RECTS(pGC->pCompositeClip) != 1) { - miFillPolygon (pDrawable, pGC, shape, mode, count, ptsIn); - return; - } - origin = *((int *) &pDrawable->x); - origin -= (origin & 0x8000) << 1; - extents = &pGC->pCompositeClip->extents; - vertex1 = *((int *) &extents->x1) - origin; - vertex2 = *((int *) &extents->x2) - origin - 0x00010001; - clip = 0; - y = 32767; - maxy = 0; - vertex2p = (int *) ptsIn; - endp = vertex2p + count; - while (count--) { - c = *vertex2p; - clip |= (c - vertex1) | (vertex2 - c); - c = intToY(c); - if (c < y) { - y = c; - vertex1p = vertex2p; - } - vertex2p++; - if (c > maxy) - maxy = c; - } - if (y == maxy) - return; - - if (clip & 0x80008000) { - miFillPolygon (pDrawable, pGC, shape, mode, vertex2p - (int *) ptsIn, ptsIn); - return; - } - - afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, - addrl); - rrops = devPriv->rrops; - addrl = afbScanlineDelta(addrl, y + pDrawable->y, nlwidth); - origin = intToX(origin); - vertex2p = vertex1p; - vertex2 = vertex1 = *vertex2p++; - if (vertex2p == endp) - vertex2p = (int *) ptsIn; -#define Setup(c,x,vertex,dx,dy,e,sign,step) {\ - x = intToX(vertex); \ - if ((dy = intToY(c) - y)) { \ - dx = intToX(c) - x; \ - step = 0; \ - if (dx >= 0) { \ - e = 0; \ - sign = 1; \ - if (dx >= dy) {\ - step = dx / dy; \ - dx = dx % dy; \ - } \ - } else { \ - e = 1 - dy; \ - sign = -1; \ - dx = -dx; \ - if (dx >= dy) { \ - step = - (dx / dy); \ - dx = dx % dy; \ - } \ - } \ - } \ - x += origin; \ - vertex = c; \ -} - -#define Step(x,dx,dy,e,sign,step) {\ - x += step; \ - if ((e += dx) > 0) { \ - x += sign; \ - e -= dy; \ - } \ -} - for (;;) { - if (y == intToY(vertex1)) { - do { - if (vertex1p == (int *) ptsIn) - vertex1p = endp; - c = *--vertex1p; - Setup (c,x1,vertex1,dx1,dy1,e1,sign1,step1) - } while (y >= intToY(vertex1)); - h = dy1; - } else { - Step(x1,dx1,dy1,e1,sign1,step1) - h = intToY(vertex1) - y; - } - if (y == intToY(vertex2)) { - do { - c = *vertex2p++; - if (vertex2p == endp) - vertex2p = (int *) ptsIn; - Setup (c,x2,vertex2,dx2,dy2,e2,sign2,step2) - } while (y >= intToY(vertex2)); - if (dy2 < h) - h = dy2; - } else { - Step(x2,dx2,dy2,e2,sign2,step2) - if ((c = (intToY(vertex2) - y)) < h) - h = c; - } - /* fill spans for this segment */ - y += h; - for (;;) { - l = x1; - r = x2; - nmiddle = x2 - x1; - if (nmiddle < 0) { - nmiddle = -nmiddle; - l = x2; - r = x1; - } - c = l & PIM; - l -= c; - l = l >> PWSH; - addr = addrl + l; - if (c + nmiddle < PPW) { - mask = SCRRIGHT (bits,c) ^ SCRRIGHT (bits,c+nmiddle); - for (pdst = addr, d = 0; d < depthDst; d++, pdst += sizeDst) { /* @@@ NEXT PLANE @@@ */ - switch (rrops[d]) { - case RROP_BLACK: - *pdst &= ~mask; - break; - case RROP_WHITE: - *pdst |= mask; - break; - case RROP_INVERT: - *pdst ^= mask; - break; - case RROP_NOP: - break; - } - } - } else { - if (c) { - mask = SCRRIGHT(bits, c); - for (pdst = addr, d = 0; d < depthDst; d++, pdst += sizeDst) { /* @@@ NEXT PLANE @@@ */ - switch (rrops[d]) { - case RROP_BLACK: - *pdst &= ~mask; - break; - case RROP_WHITE: - *pdst |= mask; - break; - case RROP_INVERT: - *pdst ^= mask; - break; - case RROP_NOP: - break; - } - } - nmiddle += c - PPW; - addr++; - } - nmiddle >>= PWSH; - mask = ~SCRRIGHT(bits, r & PIM); - - for (d = 0; d < depthDst; d++, addr += sizeDst) { /* @@@ NEXT PLANE @@@ */ - n = nmiddle; - pdst = addr; - - switch (rrops[d]) { - case RROP_BLACK: - Duff (n, *pdst++ = 0;) - if (mask) - *pdst &= ~mask; - break; - case RROP_WHITE: - Duff (n, *pdst++ = ~0;); - if (mask) - *pdst |= mask; - break; - case RROP_INVERT: - Duff (n, *pdst++ ^= ~0;); - if (mask) - *pdst ^= mask; - break; - case RROP_NOP: - break; - } - } - } - if (!--h) - break; - afbScanlineInc(addrl, nlwidth); - Step(x1,dx1,dy1,e1,sign1,step1) - Step(x2,dx2,dy2,e2,sign2,step2) - } - if (y == maxy) - break; - afbScanlineInc(addrl, nlwidth); - } -} diff --git a/afb/afbplygblt.c b/afb/afbplygblt.c deleted file mode 100644 index d1de102d7..000000000 --- a/afb/afbplygblt.c +++ /dev/null @@ -1,463 +0,0 @@ -/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include "afb.h" -#include -#include "dixfontstr.h" -#include "gcstruct.h" -#include "windowstr.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "regionstr.h" -#include "maskbits.h" - -/* - this works for fonts with glyphs <= 32 bits wide. - - the clipping calculations are done for worst-case fonts. -we make no assumptions about the heights, widths, or bearings -of the glyphs. if we knew that the glyphs are all the same height, -we could clip the tops and bottoms per clipping box, rather -than per character per clipping box. if we knew that the glyphs' -left and right bearings were wlle-behaved, we could clip a single -character at the start, output until the last unclipped -character, and then clip the last one. this is all straightforward -to determine based on max-bounds and min-bounds from the font. - there is some inefficiency introduced in the per-character -clipping to make what's going on clearer. - - (it is possible, for example, for a font to be defined in which the -next-to-last character in a font would be clipped out, but the last -one wouldn't. the code below deals with this.) - -*/ - -void -afbPolyGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) - DrawablePtr pDrawable; - GC *pGC; - int x, y; - unsigned int nglyph; - CharInfoPtr *ppci; /* array of character info */ - pointer pglyphBase; /* start of array of glyphs */ -{ - ExtentInfoRec info; /* used by QueryGlyphExtents() */ - BoxRec bbox; /* string's bounding box */ - - CharInfoPtr pci; - int xorg, yorg; /* origin of drawable in bitmap */ - int widthDst; /* width of dst in longwords */ - - /* these keep track of the character origin */ - PixelType *pdstBase; - /* points to longword with character origin */ - int xchar; /* xorigin of char (mod 32) */ - - /* these are used for placing the glyph */ - register int xoff; /* x offset of left edge of glyph (mod 32) */ - register PixelType *pdst; /* pointer to current longword in dst */ - - register int d; - int depthDst; - int sizeDst; - int hSave; - int w; /* width of glyph in bits */ - int h; /* height of glyph */ - int widthGlyph; /* width of glyph, in bytes */ - unsigned char *rrops; - register unsigned char *pglyph; - /* pointer to current row of glyph */ - unsigned char *pglyphSave; - - /* used for putting down glyph */ - register PixelType tmpSrc; - /* for getting bits from glyph */ - register PixelType startmask; - register PixelType endmask; - - register int nFirst; /* bits of glyph in current longword */ - PixelType *pdstSave; - - xorg = pDrawable->x; - yorg = pDrawable->y; - afbGetPixelWidthSizeDepthAndPointer(pDrawable, widthDst, sizeDst, depthDst, - pdstBase); - - QueryGlyphExtents(pGC->font, ppci, (unsigned long)nglyph, &info); - - x += xorg; - y += yorg; - - bbox.x1 = x + info.overallLeft; - bbox.x2 = x + info.overallRight; - bbox.y1 = y - info.overallAscent; - bbox.y2 = y + info.overallDescent; - - rrops = ((afbPrivGCPtr)dixLookupPrivate(&pGC->devPrivates, - afbGCPrivateKey))->rrops; - switch (RECT_IN_REGION(pGC->pScreen, pGC->pCompositeClip, &bbox)) { - case rgnOUT: - break; - case rgnIN: - pdstBase = afbScanlineNoBankSwitch(pdstBase, x, y, widthDst); - xchar = x & PIM; - - while(nglyph--) { - pci = *ppci; - pglyphSave = FONTGLYPHBITS(pglyphBase, pci); - w = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing; - hSave = pci->metrics.ascent + pci->metrics.descent; - widthGlyph = GLYPHWIDTHBYTESPADDED(pci); - /* start at top scanline of glyph */ - pdstSave = afbScanlineDelta(pdstBase, -pci->metrics.ascent, - widthDst); - - /* find correct word in scanline and x offset within it - for left edge of glyph - */ - xoff = xchar + pci->metrics.leftSideBearing; - if (xoff > PLST) { - pdstSave++; - xoff &= PIM; - } else if (xoff < 0) { - xoff += PPW; - pdstSave--; - } - - for (d = 0; d < depthDst; d++) { - h = hSave; - pdst = pdstSave; - pdstSave += sizeDst; /* @@@ NEXT PLANE @@@ */ - pglyph = pglyphSave; - - if ((xoff + w) <= PPW) { - /* glyph all in one longword */ - maskpartialbits(xoff, w, startmask); - switch (rrops[d]) { - case RROP_WHITE: - while (h--) { - getleftbits(pglyph, w, tmpSrc); - *pdst |= (SCRRIGHT(tmpSrc, xoff) & startmask); - pglyph += widthGlyph; - afbScanlineInc(pdst, widthDst); - } - break; - case RROP_BLACK: - while (h--) { - getleftbits(pglyph, w, tmpSrc); - *pdst &= ~(SCRRIGHT(tmpSrc, xoff) & startmask); - pglyph += widthGlyph; - afbScanlineInc(pdst, widthDst); - } - break; - case RROP_INVERT: - while (h--) { - getleftbits(pglyph, w, tmpSrc); - *pdst ^= (SCRRIGHT(tmpSrc, xoff) & startmask); - pglyph += widthGlyph; - afbScanlineInc(pdst, widthDst); - } - break; - } - } else { - /* glyph crosses longword boundary */ - maskPPWbits(xoff, w, startmask, endmask); - nFirst = PPW - xoff; - switch (rrops[d]) { - case RROP_WHITE: - while (h--) { - getleftbits(pglyph, w, tmpSrc); - *pdst |= (SCRRIGHT(tmpSrc, xoff) & startmask); - *(pdst+1) |= (SCRLEFT(tmpSrc, nFirst) & endmask); - pglyph += widthGlyph; - afbScanlineInc(pdst, widthDst); - } - break; - case RROP_BLACK: - while (h--) { - getleftbits(pglyph, w, tmpSrc); - *pdst &= ~(SCRRIGHT(tmpSrc, xoff) & startmask); - *(pdst+1) &= ~(SCRLEFT(tmpSrc, nFirst) & endmask); - pglyph += widthGlyph; - afbScanlineInc(pdst, widthDst); - } - break; - case RROP_INVERT: - while (h--) { - getleftbits(pglyph, w, tmpSrc); - *pdst ^= (SCRRIGHT(tmpSrc, xoff) & startmask); - *(pdst+1) ^= (SCRLEFT(tmpSrc, nFirst) & endmask); - pglyph += widthGlyph; - afbScanlineInc(pdst, widthDst); - } - break; - } - } /* glyph crosses longwords boundary */ - } /* depth loop */ - /* update character origin */ - x += pci->metrics.characterWidth; - xchar += pci->metrics.characterWidth; - if (xchar > PLST) { - xchar -= PPW; - pdstBase++; - } else if (xchar < 0) { - xchar += PPW; - pdstBase--; - } - ppci++; - } /* while nglyph-- */ - break; - case rgnPART: - { - afbTEXTPOS *ppos; - int nbox; - BoxPtr pbox; - RegionPtr cclip; - int xpos; /* x position of char origin */ - int i; - BoxRec clip; - int leftEdge, rightEdge; - int topEdge, bottomEdge; - int glyphRow; /* first row of glyph not wholly - clipped out */ - int glyphCol; /* leftmost visible column of glyph */ -#if GETLEFTBITS_ALIGNMENT > 1 - int getWidth; /* bits to get from glyph */ -#endif - - if(!(ppos = (afbTEXTPOS *)xalloc(nglyph * sizeof(afbTEXTPOS)))) - return; - - pdstBase = afbScanlineNoBankSwitch(pdstBase, x, y, widthDst); - xpos = x; - xchar = xpos & PIM; - - for (i = 0; i < nglyph; i++) { - pci = ppci[i]; - - ppos[i].xpos = xpos; - ppos[i].xchar = xchar; - ppos[i].leftEdge = xpos + pci->metrics.leftSideBearing; - ppos[i].rightEdge = xpos + pci->metrics.rightSideBearing; - ppos[i].topEdge = y - pci->metrics.ascent; - ppos[i].bottomEdge = y + pci->metrics.descent; - ppos[i].pdstBase = pdstBase; - ppos[i].widthGlyph = GLYPHWIDTHBYTESPADDED(pci); - - xpos += pci->metrics.characterWidth; - xchar += pci->metrics.characterWidth; - if (xchar > PLST) { - xchar &= PIM; - pdstBase++; - } else if (xchar < 0) { - xchar += PPW; - pdstBase--; - } - } - - cclip = pGC->pCompositeClip; - pbox = REGION_RECTS(cclip); - nbox = REGION_NUM_RECTS(cclip); - - /* HACK ALERT - since we continue out of the loop below so often, it - is easier to increment pbox at the top than at the end. - don't try this at home. - */ - pbox--; - while(nbox--) { - pbox++; - clip.x1 = max(bbox.x1, pbox->x1); - clip.y1 = max(bbox.y1, pbox->y1); - clip.x2 = min(bbox.x2, pbox->x2); - clip.y2 = min(bbox.y2, pbox->y2); - if ((clip.x2<=clip.x1) || (clip.y2<=clip.y1)) - continue; - - for(i=0; i clip.x2) - rightEdge = clip.x2; - else - rightEdge = ppos[i].rightEdge; - - w = rightEdge - leftEdge; - if (w <= 0) - continue; - - /* clip the top and bottom edges */ - if (ppos[i].topEdge < clip.y1) - topEdge = clip.y1; - else - topEdge = ppos[i].topEdge; - - if (ppos[i].bottomEdge > clip.y2) - bottomEdge = clip.y2; - else - bottomEdge = ppos[i].bottomEdge; - - hSave = bottomEdge - topEdge; - if (hSave <= 0) - continue; - - glyphRow = (topEdge - y) + pci->metrics.ascent; - widthGlyph = ppos[i].widthGlyph; - pglyphSave = FONTGLYPHBITS(pglyphBase, pci); - pglyphSave += (glyphRow * widthGlyph); - - glyphCol = (leftEdge - ppos[i].xpos) - - (pci->metrics.leftSideBearing); -#if GETLEFTBITS_ALIGNMENT > 1 - getWidth = w + glyphCol; -#endif - - pdstSave = afbScanlineDelta(ppos[i].pdstBase, -(y-topEdge), - widthDst); - xoff = xchar + (leftEdge - ppos[i].xpos); - if (xoff > PLST) { - xoff &= PIM; - pdstSave++; - } else if (xoff < 0) { - xoff += PPW; - pdstSave--; - } - - for (d = 0; d < depthDst; d++) { - h = hSave; - pdst = pdstSave; - pdstSave += sizeDst; /* @@@ NEXT PLANE @@@ */ - pglyph = pglyphSave; - - if ((xoff + w) <= PPW) { - maskpartialbits(xoff, w, startmask); - switch (rrops[d]) { - case RROP_WHITE: - while (h--) { - getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); - *pdst |= (SCRRIGHT(tmpSrc, xoff) & startmask); - pglyph += widthGlyph; - afbScanlineInc(pdst, widthDst); - } - break; - case RROP_BLACK: - while (h--) { - getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); - *pdst &= ~(SCRRIGHT(tmpSrc, xoff) & startmask); - pglyph += widthGlyph; - afbScanlineInc(pdst, widthDst); - } - break; - case RROP_INVERT: - while (h--) { - getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); - *pdst ^= (SCRRIGHT(tmpSrc, xoff) & startmask); - pglyph += widthGlyph; - afbScanlineInc(pdst, widthDst); - } - break; - } - } else { - maskPPWbits(xoff, w, startmask, endmask); - nFirst = PPW - xoff; - switch (rrops[d]) { - case RROP_WHITE: - while (h--) { - getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); - *pdst |= (SCRRIGHT(tmpSrc, xoff) & startmask); - *(pdst+1) |= (SCRLEFT(tmpSrc, nFirst) & endmask); - pglyph += widthGlyph; - afbScanlineInc(pdst, widthDst); - } - break; - case RROP_BLACK: - while (h--) { - getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); - *pdst &= ~(SCRRIGHT(tmpSrc, xoff) & startmask); - *(pdst+1) &= ~(SCRLEFT(tmpSrc, nFirst) & endmask); - pglyph += widthGlyph; - afbScanlineInc(pdst, widthDst); - } - break; - case RROP_INVERT: - while (h--) { - getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); - *pdst ^= (SCRRIGHT(tmpSrc, xoff) & startmask); - *(pdst+1) ^= (SCRLEFT(tmpSrc, nFirst) & endmask); - pglyph += widthGlyph; - afbScanlineInc(pdst, widthDst); - } - break; - } - } - } /* depth */ - } /* for each glyph */ - } /* while nbox-- */ - xfree(ppos); - break; - } - - default: - break; - } -} diff --git a/afb/afbpntarea.c b/afb/afbpntarea.c deleted file mode 100644 index cc43f5237..000000000 --- a/afb/afbpntarea.c +++ /dev/null @@ -1,655 +0,0 @@ -/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include - -#include "windowstr.h" -#include "regionstr.h" -#include "pixmapstr.h" -#include "scrnintstr.h" - -#include "afb.h" -#include "maskbits.h" - -/* - the solid fillers are called for rectangles and window backgrounds. - the boxes are already translated. - maybe this should always take a pixmap instead of a drawable? - - NOTE: - iy = ++iy < tileHeight ? iy : 0 -is equivalent to iy%= tileheight, and saves a division. -*/ - -/*ARGSUSED*/ -void -afbSolidFillArea (pDraw, nbox, pbox, rrops) - DrawablePtr pDraw; - int nbox; - BoxPtr pbox; - register unsigned char *rrops; -{ - int nlwidth; /* width in longwords of the drawable */ - int w; /* width of current box */ - register int h; /* height of current box */ - register PixelType *p; /* pointer to bits we're writing */ - register int nlw; /* loop version of nlwMiddle */ - register PixelType startmask; - register PixelType endmask; - /* masks for reggedy bits at either end of line */ - register int nlwExtra; - /* to get from right of box to left of next span */ - int nlwMiddle; /* number of longwords between sides of boxes */ - PixelType *pbits; /* pointer to start of drawable */ - PixelType *saveP; - int saveH; - int depthDst; - int sizeDst; - register int d; - - afbGetPixelWidthSizeDepthAndPointer(pDraw, nlwidth, sizeDst, depthDst, - pbits); - - while (nbox--) { - w = pbox->x2 - pbox->x1; - saveH = pbox->y2 - pbox->y1; - - saveP = afbScanline(pbits, pbox->x1, pbox->y1, nlwidth); - - if ( ((pbox->x1 & PIM) + w) < PPW) { - for (d = 0; d < depthDst; d++) { - h = saveH; - p = saveP; - saveP += sizeDst; /* @@@ NEXT PLANE @@@ */ - maskpartialbits(pbox->x1, w, startmask); - nlwExtra = nlwidth; - - switch (rrops[d]) { - case RROP_BLACK: - Duff(h, *p &= ~startmask; afbScanlineInc(p, nlwExtra)); - break; - case RROP_WHITE: - Duff(h, *p |= startmask; afbScanlineInc(p, nlwExtra)); - break; - case RROP_INVERT: - Duff(h, *p ^= startmask; afbScanlineInc(p, nlwExtra)); - break; - case RROP_NOP: - break; - } /* switch */ - } /* for (d = ..) */ - } else { - maskbits(pbox->x1, w, startmask, endmask, nlwMiddle); - - for (d = 0; d < depthDst; d++) { - h = saveH; - p = saveP; - saveP += sizeDst; /* @@@ NEXT PLANE @@@ */ - nlwExtra = nlwidth - nlwMiddle; - - if (startmask && endmask) { - nlwExtra -= 1; - switch (rrops[d]) { - case RROP_BLACK: - while (h--) { - nlw = nlwMiddle; - *p &= ~startmask; - p++; - Duff(nlw, *p++ = 0); - *p &= ~endmask; - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_WHITE: - while (h--) { - nlw = nlwMiddle; - *p |= startmask; - p++; - Duff(nlw, *p++ = ~0); - *p |= endmask; - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_INVERT: - while (h--) { - nlw = nlwMiddle; - *p ^= startmask; - p++; - Duff(nlw, *p++ ^= ~0); - *p ^= endmask; - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_NOP: - break; - } - } else if (startmask && !endmask) { - nlwExtra -= 1; - switch (rrops[d]) { - case RROP_BLACK: - while (h--) { - nlw = nlwMiddle; - *p &= ~startmask; - p++; - Duff(nlw, *p++ = 0); - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_WHITE: - while (h--) { - nlw = nlwMiddle; - *p |= startmask; - p++; - Duff(nlw, *p++ = ~0); - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_INVERT: - while (h--) { - nlw = nlwMiddle; - *p ^= startmask; - p++; - Duff(nlw, *p++ ^= ~0); - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_NOP: - break; - } - } else if (!startmask && endmask) { - switch (rrops[d]) { - case RROP_BLACK: - while (h--) { - nlw = nlwMiddle; - Duff(nlw, *p++ = 0); - *p &= ~endmask; - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_WHITE: - while (h--) { - nlw = nlwMiddle; - Duff(nlw, *p++ = ~0); - *p |= endmask; - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_INVERT: - while (h--) { - nlw = nlwMiddle; - Duff(nlw, *p++ ^= ~0); - *p ^= endmask; - afbScanlineInc(p, nlwExtra); - } - case RROP_NOP: - break; - } - } else { /* no ragged bits at either end */ - switch (rrops[d]) { - case RROP_BLACK: - while (h--) { - nlw = nlwMiddle; - Duff(nlw, *p++ = 0); - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_WHITE: - while (h--) { - nlw = nlwMiddle; - Duff(nlw, *p++ = ~0); - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_INVERT: - while (h--) { - nlw = nlwMiddle; - Duff(nlw, *p++ ^= ~0); - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_NOP: - break; - } /* switch */ - } - } /* for (d = 0 ... ) */ - } - pbox++; - } -} - -/* stipple a list of boxes - - -you can use the reduced rasterop for stipples. if rrop is -black, AND the destination with (not stipple pattern). if rrop is -white OR the destination with the stipple pattern. if rrop is invert, -XOR the destination with the stipple pattern. -*/ - -/*ARGSUSED*/ -void -afbStippleAreaPPW (pDraw, nbox, pbox, pstipple, rrops) - DrawablePtr pDraw; - int nbox; - BoxPtr pbox; - PixmapPtr pstipple; - unsigned char *rrops; -{ - register PixelType *psrc; - /* pointer to bits in tile, if needed */ - int tileHeight; /* height of the tile */ - register PixelType srcpix; - - int nlwidth; /* width in longwords of the drawable */ - int w; /* width of current box */ - register int nlw; /* loop version of nlwMiddle */ - register PixelType *p; /* pointer to bits we're writing */ - register int h; /* height of current box */ - PixelType startmask; - PixelType endmask; /* masks for reggedy bits at either end of line */ - int nlwMiddle; /* number of longwords between sides of boxes */ - int nlwExtra; /* to get from right of box to left of next span */ - int sizeDst; - int depthDst; - int d; - int saveIy; - register int iy; /* index of current scanline in tile */ - PixelType *pbits; /* pointer to start of drawable */ - PixelType *pBase; - - afbGetPixelWidthSizeDepthAndPointer(pDraw, nlwidth, sizeDst, depthDst, - pBase); - - tileHeight = pstipple->drawable.height; - psrc = (PixelType *)(pstipple->devPrivate.ptr); - - while (nbox--) { - w = pbox->x2 - pbox->x1; - saveIy = pbox->y1 % tileHeight; - pbits = pBase; - - if ( ((pbox->x1 & PIM) + w) < PPW) { - maskpartialbits(pbox->x1, w, startmask); - nlwExtra = nlwidth; - for (d = 0; d < depthDst; d++) { - p = afbScanline(pbits, pbox->x1, pbox->y1, nlwidth); - pbits += sizeDst; /* @@@ NEXT PLANE @@@ */ - iy = saveIy; - h = pbox->y2 - pbox->y1; - - switch (rrops[d]) { - case RROP_BLACK: - while (h--) { - srcpix = psrc[iy]; - iy = ++iy < tileHeight ? iy : 0; - *p &= ~(srcpix & startmask); - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_WHITE: - while (h--) { - srcpix = psrc[iy]; - iy = ++iy < tileHeight ? iy : 0; - *p |= (srcpix & startmask); - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_INVERT: - while (h--) { - srcpix = psrc[iy]; - iy = ++iy < tileHeight ? iy : 0; - *p ^= (srcpix & startmask); - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_NOP: - break; - } /* switch */ - } /* for (d = ...) */ - - } else { - maskbits(pbox->x1, w, startmask, endmask, nlwMiddle); - - for (d = 0; d < depthDst; d++) { - nlwExtra = nlwidth - nlwMiddle; - p = afbScanline(pbits, pbox->x1, pbox->y1, nlwidth); - pbits += sizeDst; /* @@@ NEXT PLANE @@@ */ - iy = saveIy; - h = pbox->y2 - pbox->y1; - - if (startmask && endmask) { - nlwExtra -= 1; - switch (rrops[d]) { - case RROP_BLACK: - while (h--) { - srcpix = psrc[iy]; - iy = ++iy < tileHeight ? iy : 0; - nlw = nlwMiddle; - *p &= ~(srcpix & startmask); - p++; - Duff (nlw, *p++ &= ~srcpix); - *p &= ~(srcpix & endmask); - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_WHITE: - while (h--) { - srcpix = psrc[iy]; - iy = ++iy < tileHeight ? iy : 0; - nlw = nlwMiddle; - *p |= (srcpix & startmask); - p++; - Duff (nlw, *p++ |= srcpix); - *p |= (srcpix & endmask); - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_INVERT: - while (h--) { - srcpix = psrc[iy]; - iy = ++iy < tileHeight ? iy : 0; - nlw = nlwMiddle; - *p ^= (srcpix & startmask); - p++; - Duff (nlw, *p++ ^= srcpix); - *p ^= (srcpix & endmask); - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_NOP: - break; - } /* switch */ - } else if (startmask && !endmask) { - nlwExtra -= 1; - switch (rrops[d]) { - case RROP_BLACK: - while (h--) { - srcpix = psrc[iy]; - iy = ++iy < tileHeight ? iy : 0; - nlw = nlwMiddle; - *p &= ~(srcpix & startmask); - p++; - Duff(nlw, *p++ &= ~srcpix); - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_WHITE: - while (h--) { - srcpix = psrc[iy]; - iy = ++iy < tileHeight ? iy : 0; - nlw = nlwMiddle; - *p |= (srcpix & startmask); - p++; - Duff(nlw, *p++ |= srcpix); - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_INVERT: - while (h--) { - srcpix = psrc[iy]; - iy = ++iy < tileHeight ? iy : 0; - nlw = nlwMiddle; - *p ^= (srcpix & startmask); - p++; - Duff(nlw, *p++ ^= srcpix); - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_NOP: - break; - } /* switch */ - } else if (!startmask && endmask) { - switch (rrops[d]) { - case RROP_BLACK: - while (h--) { - srcpix = psrc[iy]; - iy = ++iy < tileHeight ? iy : 0; - nlw = nlwMiddle; - Duff(nlw, *p++ &= ~srcpix); - *p &= ~(srcpix & endmask); - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_WHITE: - while (h--) { - srcpix = psrc[iy]; - iy = ++iy < tileHeight ? iy : 0; - nlw = nlwMiddle; - Duff(nlw, *p++ |= srcpix); - *p |= (srcpix & endmask); - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_INVERT: - while (h--) { - srcpix = psrc[iy]; - iy = ++iy < tileHeight ? iy : 0; - nlw = nlwMiddle; - Duff(nlw, *p++ ^= srcpix); - *p ^= (srcpix & endmask); - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_NOP: - break; - } /* switch */ - } else { /* no ragged bits at either end */ - switch (rrops[d]) { - case RROP_BLACK: - while (h--) { - srcpix = psrc[iy]; - iy = ++iy < tileHeight ? iy : 0; - nlw = nlwMiddle; - Duff(nlw, *p++ &= ~srcpix); - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_WHITE: - while (h--) { - srcpix = psrc[iy]; - iy = ++iy < tileHeight ? iy : 0; - nlw = nlwMiddle; - Duff(nlw, *p++ |= srcpix); - afbScanlineInc(p, nlwExtra); - } - break; - case RROP_INVERT: - while (h--) { - srcpix = psrc[iy]; - iy = ++iy < tileHeight ? iy : 0; - nlw = nlwMiddle; - Duff(nlw, *p++ ^= srcpix); - afbScanlineInc(p, nlwExtra); - } - break; - } /* switch */ - } - } /* for (d = ...) */ - } - pbox++; - } -} - -void -afbStippleArea (pDraw, nbox, pbox, pTile, xOff, yOff, rrops) - DrawablePtr pDraw; - int nbox; - BoxPtr pbox; - PixmapPtr pTile; - int xOff; - int yOff; - unsigned char *rrops; -{ - register PixelType *psrc; /* pointer to bits in tile, if needed */ - int nlwidth; /* width in longwords of the drawable */ - register int h; /* height of current box */ - register PixelType *pdst; /* pointer to bits we're writing */ - int sizeDst; - int depthDst; - int tileLine; - int iline; - int w, width, x, xSrc, ySrc, srcStartOver, nend; - int tlwidth, rem, tileWidth, tileHeight, endinc; - int saveW; - register int rop; - PixelType *psrcT; - int d; - int nstart; - PixelType startmask; - PixelType endmask; /* masks for reggedy bits at either end of line */ - int nlMiddle; /* number of longwords between sides of boxes */ - int iy; - PixelType *pBase; /* pointer to start of drawable */ - PixelType *saveP; - PixelType *pStartDst; - PixelType *pStartTile; - int saveH; - - afbGetPixelWidthSizeDepthAndPointer(pDraw, nlwidth, sizeDst, depthDst, - pBase); - - tileHeight = pTile->drawable.height; - tileWidth = pTile->drawable.width; - tlwidth = pTile->devKind / sizeof (PixelType); - - xSrc = pDraw->x + ((xOff % tileWidth) - tileWidth); - ySrc = pDraw->y + ((yOff % tileHeight) - tileHeight); - - while (nbox--) { - saveW = pbox->x2 - pbox->x1; - iline = (pbox->y1 - ySrc) % tileHeight; - psrcT = (PixelType *) pTile->devPrivate.ptr; - tileLine = iline * tlwidth; - saveH = pbox->y2 - pbox->y1; - saveP = afbScanline(pBase, pbox->x1, pbox->y1, nlwidth); - - for (d = 0; d < depthDst; d++, saveP += sizeDst) { /* @@@ NEXT PLANE @@@ */ - h = saveH; - pStartDst = saveP; - pStartTile = psrcT + tileLine; - iy = iline; - - while (h--) { - x = pbox->x1; - width = saveW; - pdst = pStartDst; - rop = rrops[d]; - - while(width > 0) { - psrc = pStartTile; - w = min(tileWidth, width); - if((rem = (x - xSrc) % tileWidth) != 0) { - /* if we're in the middle of the tile, get - as many bits as will finish the span, or - as many as will get to the left edge of the tile, - or a longword worth, starting at the appropriate - offset in the tile. - */ - w = min(min(tileWidth - rem, width), BITMAP_SCANLINE_PAD); - endinc = rem / BITMAP_SCANLINE_PAD; - getandputrrop((psrc + endinc), (rem & PIM), (x & PIM), - w, pdst, rop) - if((x & PIM) + w >= PPW) - pdst++; - } else if(((x & PIM) + w) < PPW) { - /* doing < PPW bits is easy, and worth special-casing */ - putbitsrrop(*psrc, x & PIM, w, pdst, rop); - } else { - /* start at the left edge of the tile, - and put down as much as we can - */ - maskbits(x, w, startmask, endmask, nlMiddle); - - if (startmask) - nstart = PPW - (x & PIM); - else - nstart = 0; - if (endmask) - nend = (x + w) & PIM; - else - nend = 0; - - srcStartOver = nstart > PLST; - - if(startmask) { - putbitsrrop(*psrc, (x & PIM), nstart, pdst, rop); - pdst++; - if(srcStartOver) - psrc++; - } - - while(nlMiddle--) { - getandputrrop0(psrc, nstart, PPW, pdst, rop); - pdst++; - psrc++; - } - - if(endmask) { - getandputrrop0(psrc, nstart, nend, pdst, rop); - } - } - x += w; - width -= w; - } /* while (width > 0) */ - - pStartDst += nlwidth; - if (++iy >= tileHeight) { - iy = 0; - pStartTile = psrcT; - } else - pStartTile += tlwidth; - - } /* while (h) */ - } /* for (d = ... ) */ - pbox++; - } /* for each box */ -} diff --git a/afb/afbpolypnt.c b/afb/afbpolypnt.c deleted file mode 100644 index b8ea3ed3e..000000000 --- a/afb/afbpolypnt.c +++ /dev/null @@ -1,146 +0,0 @@ -/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "pixmapstr.h" -#include "gcstruct.h" -#include "windowstr.h" -#include "regionstr.h" -#include "scrnintstr.h" - -#include "afb.h" -#include "maskbits.h" - -void -afbPolyPoint(pDrawable, pGC, mode, npt, pptInit) - register DrawablePtr pDrawable; - GCPtr pGC; - int mode; /* Origin or Previous */ - int npt; - xPoint *pptInit; -{ - - register BoxPtr pbox; - register int nbox; - register int d; - - register PixelType *addrl; - PixelType *pBase; - PixelType *pBaseSave; - int nlwidth; - int sizeDst; - int depthDst; - - int nptTmp; - register xPoint *ppt; - - register int x; - register int y; - register unsigned char *rrops; - afbPrivGC *pGCPriv; - - pGCPriv = (afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, - afbGCPrivateKey); - afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, - pBaseSave); - - rrops = pGCPriv->rrops; - if ((mode == CoordModePrevious) && (npt > 1)) - for (ppt = pptInit + 1, nptTmp = npt - 1; --nptTmp >= 0; ppt++) { - ppt->x += (ppt-1)->x; - ppt->y += (ppt-1)->y; - } - - nbox = REGION_NUM_RECTS(pGC->pCompositeClip); - pbox = REGION_RECTS(pGC->pCompositeClip); - for (; --nbox >= 0; pbox++) - for (d = 0, pBase = pBaseSave; d < depthDst; d++, pBase += sizeDst) { /* @@@ NEXT PLANE @@@ */ - addrl = pBase; - - switch (rrops[d]) { - case RROP_BLACK: - for (ppt = pptInit, nptTmp = npt; --nptTmp >= 0; ppt++) { - x = ppt->x + pDrawable->x; - y = ppt->y + pDrawable->y; - if ((x >= pbox->x1) && (x < pbox->x2) && - (y >= pbox->y1) && (y < pbox->y2)) - *afbScanline(addrl, x, y, nlwidth) &= mfbGetrmask(x & PIM); - } - break; - - case RROP_WHITE: - for (ppt = pptInit, nptTmp = npt; --nptTmp >= 0; ppt++) { - x = ppt->x + pDrawable->x; - y = ppt->y + pDrawable->y; - if ((x >= pbox->x1) && (x < pbox->x2) && - (y >= pbox->y1) && (y < pbox->y2)) - *afbScanline(addrl, x, y, nlwidth) |= mfbGetmask(x & PIM); - } - break; - - case RROP_INVERT: - for (ppt = pptInit, nptTmp = npt; --nptTmp >= 0; ppt++) { - x = ppt->x + pDrawable->x; - y = ppt->y + pDrawable->y; - if ((x >= pbox->x1) && (x < pbox->x2) && - (y >= pbox->y1) && (y < pbox->y2)) - *afbScanline(addrl, x, y, nlwidth) ^= mfbGetmask(x & PIM); - } - break; - - case RROP_NOP: - break; - } /* switch */ - } /* for (d = ...) */ -} diff --git a/afb/afbpushpxl.c b/afb/afbpushpxl.c deleted file mode 100644 index 3dd548737..000000000 --- a/afb/afbpushpxl.c +++ /dev/null @@ -1,169 +0,0 @@ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include - -#include -#include "gcstruct.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "regionstr.h" -#include "maskbits.h" -#include "afb.h" - -#define NPT 128 - -/* afbPushPixels -- squeegees the forground color of pGC through pBitMap - * into pDrawable. pBitMap is a stencil (dx by dy of it is used, it may - * be bigger) which is placed on the drawable at xOrg, yOrg. Where a 1 bit - * is set in the bitmap, the fill style is put onto the drawable using - * the GC's logical function. The drawable is not changed where the bitmap - * has a zero bit or outside the area covered by the stencil. - */ -void -afbPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDrawable, int dx, int dy, int xOrg, int yOrg) -{ - int h, dxDivPPW, ibEnd; - PixelType *pwLineStart; - register PixelType *pw, *pwEnd; - register PixelType mask; - register int ib; - register PixelType w; - register int ipt; /* index into above arrays */ - Bool fInBox; - DDXPointRec pt[NPT]; - int width[NPT]; - - /* Now scan convert the pixmap and use the result to call fillspans in - * in the drawable with the original GC */ - ipt = 0; - dxDivPPW = dx/PPW; - for (h = 0; h < dy; h++) { - - pw = (PixelType *) - (((char *)(pBitMap->devPrivate.ptr))+(h * pBitMap->devKind)); - pwLineStart = pw; - /* Process all words which are fully in the pixmap */ - - fInBox = FALSE; - pwEnd = pwLineStart + dxDivPPW; - while(pw < pwEnd) { - w = *pw; - mask = mfbGetendtab(1); - for(ib = 0; ib < PPW; ib++) { - if(w & mask) { - if(!fInBox) { - pt[ipt].x = ((pw - pwLineStart) << PWSH) + ib + xOrg; - pt[ipt].y = h + yOrg; - /* start new box */ - fInBox = TRUE; - } - } else { - if(fInBox) { - width[ipt] = ((pw - pwLineStart) << PWSH) + - ib + xOrg - pt[ipt].x; - if (++ipt >= NPT) { - (*pGC->ops->FillSpans)(pDrawable, pGC, NPT, pt, - width, TRUE); - ipt = 0; - } - /* end box */ - fInBox = FALSE; - } - } - mask = SCRRIGHT(mask, 1); - } - pw++; - } - ibEnd = dx & PIM; - if(ibEnd) { - /* Process final partial word on line */ - w = *pw; - mask = mfbGetendtab(1); - for(ib = 0; ib < ibEnd; ib++) { - if(w & mask) { - if(!fInBox) { - /* start new box */ - pt[ipt].x = ((pw - pwLineStart) << PWSH) + ib + xOrg; - pt[ipt].y = h + yOrg; - fInBox = TRUE; - } - } else { - if(fInBox) { - /* end box */ - width[ipt] = ((pw - pwLineStart) << PWSH) + - ib + xOrg - pt[ipt].x; - if (++ipt >= NPT) { - (*pGC->ops->FillSpans)(pDrawable, pGC, NPT, pt, - width, TRUE); - ipt = 0; - } - fInBox = FALSE; - } - } - mask = SCRRIGHT(mask, 1); - } - } - /* If scanline ended with last bit set, end the box */ - if(fInBox) { - width[ipt] = dx + xOrg - pt[ipt].x; - if (++ipt >= NPT) { - (*pGC->ops->FillSpans)(pDrawable, pGC, NPT, pt, width, TRUE); - ipt = 0; - } - } - } - /* Flush any remaining spans */ - if (ipt) { - (*pGC->ops->FillSpans)(pDrawable, pGC, ipt, pt, width, TRUE); - } -} diff --git a/afb/afbscrinit.c b/afb/afbscrinit.c deleted file mode 100644 index cbabb894e..000000000 --- a/afb/afbscrinit.c +++ /dev/null @@ -1,218 +0,0 @@ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include - -#include -#include /* for xColorItem */ -#include -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "windowstr.h" -#include "resource.h" -#include "colormap.h" -#include "afb.h" -#include "mistruct.h" -#include "dix.h" -#include "mi.h" -#include "mibstore.h" -#include "migc.h" -#include "servermd.h" - -#ifdef PIXMAP_PER_WINDOW -DevPrivateKey frameWindowPrivateKey = &frameWindowPrivateKey; -#endif -DevPrivateKey afbGCPrivateKey = &afbGCPrivateKey; -DevPrivateKey afbScreenPrivateKey = &afbScreenPrivateKey; - -static Bool -afbCloseScreen(int index, ScreenPtr pScreen) -{ - int d; - DepthPtr depths = pScreen->allowedDepths; - - for (d = 0; d < pScreen->numDepths; d++) - xfree(depths[d].vids); - xfree(depths); - xfree(pScreen->visuals); - xfree(dixLookupPrivate(&pScreen->devPrivates, afbScreenPrivateKey)); - return(TRUE); -} - -static Bool -afbCreateScreenResources(ScreenPtr pScreen) -{ - Bool retval; - - pointer oldDevPrivate = pScreen->devPrivate; - - pScreen->devPrivate = dixLookupPrivate(&pScreen->devPrivates, - afbScreenPrivateKey); - retval = miCreateScreenResources(pScreen); - - /* Modify screen's pixmap devKind value stored off devPrivate to - * be the width of a single plane in longs rather than the width - * of a chunky screen in longs as incorrectly setup by the mi routine. - */ - ((PixmapPtr)pScreen->devPrivate)->devKind = BitmapBytePad(pScreen->width); - dixSetPrivate(&pScreen->devPrivates, afbScreenPrivateKey, - pScreen->devPrivate); - pScreen->devPrivate = oldDevPrivate; - return(retval); -} - -static PixmapPtr -afbGetWindowPixmap(WindowPtr pWin) -{ -#ifdef PIXMAP_PER_WINDOW - return (PixmapPtr)dixLookupPrivate(&pWin->devPrivates, - frameWindowPrivateKey); -#else - ScreenPtr pScreen = pWin->drawable.pScreen; - - return (* pScreen->GetScreenPixmap)(pScreen); -#endif -} - -static void -afbSetWindowPixmap(WindowPtr pWin, PixmapPtr pPix) -{ -#ifdef PIXMAP_PER_WINDOW - dixSetPrivate(&pWin->devPrivates, frameWindowPrivateKey, pPix); -#else - (* pWin->drawable.pScreen->SetScreenPixmap)(pPix); -#endif -} - -static Bool -afbAllocatePrivates(ScreenPtr pScreen, DevPrivateKey *pGCKey) -{ - if (pGCKey) - *pGCKey = afbGCPrivateKey; - - pScreen->GetWindowPixmap = afbGetWindowPixmap; - pScreen->SetWindowPixmap = afbSetWindowPixmap; - return dixRequestPrivate(afbGCPrivateKey, sizeof(afbPrivGC)); -} - -/* dts * (inch/dot) * (25.4 mm / inch) = mm */ -Bool -afbScreenInit(register ScreenPtr pScreen, pointer pbits, int xsize, int ysize, int dpix, int dpiy, int width) - - /* pointer to screen bitmap */ - /* in pixels */ - /* dots per inch */ - /* pixel width of frame buffer */ -{ - VisualPtr visuals; - DepthPtr depths; - int nvisuals; - int ndepths; - int rootdepth; - VisualID defaultVisual; - pointer oldDevPrivate; - - rootdepth = 0; - if (!afbInitVisuals(&visuals, &depths, &nvisuals, &ndepths, &rootdepth, - &defaultVisual, 256, 8)) { - ErrorF("afbInitVisuals: FALSE\n"); - return FALSE; - } - if (!afbAllocatePrivates(pScreen, NULL)) { - ErrorF("afbAllocatePrivates: FALSE\n"); - return FALSE; - } - - pScreen->defColormap = (Colormap)FakeClientID(0); - /* whitePixel, blackPixel */ - pScreen->blackPixel = 0; - pScreen->whitePixel = 0; - pScreen->QueryBestSize = afbQueryBestSize; - /* SaveScreen */ - pScreen->GetImage = afbGetImage; - pScreen->GetSpans = afbGetSpans; - pScreen->CreateWindow = afbCreateWindow; - pScreen->DestroyWindow = afbDestroyWindow; - pScreen->PositionWindow = afbPositionWindow; - pScreen->ChangeWindowAttributes = afbChangeWindowAttributes; - pScreen->RealizeWindow = afbMapWindow; - pScreen->UnrealizeWindow = afbUnmapWindow; - pScreen->CopyWindow = afbCopyWindow; - pScreen->CreatePixmap = afbCreatePixmap; - pScreen->DestroyPixmap = afbDestroyPixmap; - pScreen->RealizeFont = afbRealizeFont; - pScreen->UnrealizeFont = afbUnrealizeFont; - pScreen->CreateGC = afbCreateGC; - pScreen->CreateColormap = afbInitializeColormap; - pScreen->DestroyColormap = (DestroyColormapProcPtr)NoopDDA; - pScreen->InstallColormap = afbInstallColormap; - pScreen->UninstallColormap = afbUninstallColormap; - pScreen->ListInstalledColormaps = afbListInstalledColormaps; - pScreen->StoreColors = (StoreColorsProcPtr)NoopDDA; - pScreen->ResolveColor = afbResolveColor; - pScreen->BitmapToRegion = afbPixmapToRegion; - oldDevPrivate = pScreen->devPrivate; - if (!miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, rootdepth, - ndepths, depths, defaultVisual, nvisuals, visuals)) { - ErrorF("miScreenInit: FALSE\n"); - return FALSE; - } - - pScreen->CloseScreen = afbCloseScreen; - pScreen->CreateScreenResources = afbCreateScreenResources; - - dixSetPrivate(&pScreen->devPrivates, afbScreenPrivateKey, - pScreen->devPrivate); - pScreen->devPrivate = oldDevPrivate; - - return TRUE; -} diff --git a/afb/afbsetsp.c b/afb/afbsetsp.c deleted file mode 100644 index cb36dba99..000000000 --- a/afb/afbsetsp.c +++ /dev/null @@ -1,257 +0,0 @@ -/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include - -#include "misc.h" -#include "regionstr.h" -#include "gcstruct.h" -#include "windowstr.h" -#include "pixmapstr.h" -#include "scrnintstr.h" - -#include "afb.h" -#include "maskbits.h" - -#include "servermd.h" - - -/* afbSetScanline -- copies the bits from psrc to the drawable starting at - * (xStart, y) and continuing to (xEnd, y). xOrigin tells us where psrc - * starts on the scanline. (I.e., if this scanline passes through multiple - * boxes, we may not want to start grabbing bits at psrc but at some offset - * further on.) - */ -static void -afbSetScanline(int y, int xOrigin, int xStart, int xEnd, PixelType *psrc, - int alu, PixelType *pdstBase, int widthDst, int sizeDst, - int depthDst, int sizeSrc) -{ - int w; /* width of scanline in bits */ - register PixelType *pdst; /* where to put the bits */ - register PixelType tmpSrc; /* scratch buffer to collect bits in */ - int dstBit; /* offset in bits from beginning of - * word */ - register int nstart; /* number of bits from first partial */ - register int nend; /* " " last partial word */ - int offSrc; - PixelType startmask, endmask; - PixelType *savePsrc = psrc + ((xStart - xOrigin) >> PWSH); - int nlMiddle, nl; - int d; - - for (d = 0; d < depthDst; d++) { - pdst = afbScanline(pdstBase, xStart, y, widthDst) + sizeDst * d; /* @@@ NEXT PLANE @@@ */ - psrc = savePsrc + sizeSrc * d; /* @@@ NEXT PLANE @@@ */ - offSrc = (xStart - xOrigin) & PIM; - w = xEnd - xStart; - dstBit = xStart & PIM; - - if (dstBit + w <= PPW) { - getandputrop(psrc, offSrc, dstBit, w, pdst, alu) - } else { - maskbits(xStart, w, startmask, endmask, nlMiddle); - if (startmask) - nstart = PPW - dstBit; - else - nstart = 0; - if (endmask) - nend = xEnd & PIM; - else - nend = 0; - if (startmask) { - getandputrop(psrc, offSrc, dstBit, nstart, pdst, alu) - pdst++; - offSrc += nstart; - if (offSrc > PLST) { - psrc++; - offSrc -= PPW; - } - } - nl = nlMiddle; - while (nl--) { - getbits(psrc, offSrc, PPW, tmpSrc); - DoRop(*pdst, alu, tmpSrc, *pdst); - pdst++; - psrc++; - } - if (endmask) { - getandputrop0(psrc, offSrc, nend, pdst, alu); - } - } - } -} - - - -/* SetSpans -- for each span copy pwidth[i] bits from psrc to pDrawable at - * ppt[i] using the raster op from the GC. If fSorted is TRUE, the scanlines - * are in increasing Y order. - * Source bit lines are server scanline padded so that they always begin - * on a word boundary. - */ -void -afbSetSpans(pDrawable, pGC, pcharsrc, ppt, pwidth, nspans, fSorted) - DrawablePtr pDrawable; - GCPtr pGC; - char *pcharsrc; - register DDXPointPtr ppt; - int *pwidth; - int nspans; - int fSorted; -{ - PixelType *psrc = (PixelType *)pcharsrc; - PixelType *pdstBase; /* start of dst bitmap */ - int widthDst; /* width of bitmap in words */ - int sizeDst; - int depthDst; - int sizeSrc = 0; - register BoxPtr pbox, pboxLast, pboxTest; - register DDXPointPtr pptLast; - int alu; - RegionPtr prgnDst; - int xStart, xEnd; - int yMax; - - alu = pGC->alu; - prgnDst = pGC->pCompositeClip; - - pptLast = ppt + nspans; - - yMax = pDrawable->y + (int) pDrawable->height; - afbGetPixelWidthSizeDepthAndPointer(pDrawable, widthDst, sizeDst, depthDst, - pdstBase); - - pbox = REGION_RECTS(prgnDst); - pboxLast = pbox + REGION_NUM_RECTS(prgnDst); - - if(fSorted) { - /* scan lines sorted in ascending order. Because they are sorted, we - * don't have to check each scanline against each clip box. We can be - * sure that this scanline only has to be clipped to boxes at or after the - * beginning of this y-band - */ - pboxTest = pbox; - while(ppt < pptLast) { - pbox = pboxTest; - if(ppt->y >= yMax) - break; - while(pbox < pboxLast) { - if(pbox->y1 > ppt->y) { - /* scanline is before clip box */ - break; - } else if(pbox->y2 <= ppt->y) { - /* clip box is before scanline */ - pboxTest = ++pbox; - continue; - } else if(pbox->x1 > ppt->x + *pwidth) { - /* clip box is to right of scanline */ - break; - } else if(pbox->x2 <= ppt->x) { - /* scanline is to right of clip box */ - pbox++; - continue; - } - - /* at least some of the scanline is in the current clip box */ - xStart = max(pbox->x1, ppt->x); - xEnd = min(ppt->x + *pwidth, pbox->x2); - sizeSrc = PixmapWidthInPadUnits(*pwidth, 1); - afbSetScanline(ppt->y, ppt->x, xStart, xEnd, psrc, alu, pdstBase, - widthDst, sizeDst, depthDst, sizeSrc); - if(ppt->x + *pwidth <= pbox->x2) { - /* End of the line, as it were */ - break; - } else - pbox++; - } - /* We've tried this line against every box; it must be outside them - * all. move on to the next point */ - ppt++; - psrc += sizeSrc * depthDst; - pwidth++; - } - } else { - /* scan lines not sorted. We must clip each line against all the boxes */ - while(ppt < pptLast) { - if(ppt->y >= 0 && ppt->y < yMax) { - for(pbox = REGION_RECTS(prgnDst); pbox< pboxLast; pbox++) { - if(pbox->y1 > ppt->y) { - /* rest of clip region is above this scanline, - * skip it */ - break; - } - if(pbox->y2 <= ppt->y) { - /* clip box is below scanline */ - pbox++; - break; - } - if(pbox->x1 <= ppt->x + *pwidth && - pbox->x2 > ppt->x) { - xStart = max(pbox->x1, ppt->x); - xEnd = min(pbox->x2, ppt->x + *pwidth); - sizeSrc = PixmapWidthInPadUnits(*pwidth, 1); - afbSetScanline(ppt->y, ppt->x, xStart, xEnd, psrc, alu, - pdstBase, widthDst, sizeDst, depthDst, - sizeSrc); - } - - } - } - psrc += sizeSrc * depthDst; - ppt++; - pwidth++; - } - } -} diff --git a/afb/afbtegblt.c b/afb/afbtegblt.c deleted file mode 100644 index c89b23a5d..000000000 --- a/afb/afbtegblt.c +++ /dev/null @@ -1,586 +0,0 @@ -/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include "afb.h" -#include -#include "dixfontstr.h" -#include "gcstruct.h" -#include "windowstr.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "regionstr.h" -#include "maskbits.h" - -/* - this works for fonts with glyphs <= PPW bits wide. - - This should be called only with a terminal-emulator font; -this means that the FIXED_METRICS flag is set, and that -glyphbounds == charbounds. - - in theory, this goes faster; even if it doesn't, it reduces the -flicker caused by writing a string over itself with image text (since -the background gets repainted per character instead of per string.) -this seems to be important for some converted X10 applications. - - Image text looks at the bits in the glyph and the fg and bg in the -GC. it paints a rectangle, as defined in the protocol dcoument, -and the paints the characters. - -*/ - -#if defined(NO_3_60_CG4) && defined(FASTPUTBITS) && defined(FASTGETBITS) -#define FASTCHARS -#endif - -/* - * this macro "knows" that only characters <= 8 bits wide will - * fit this case (which is why it is independent of GLYPHPADBYTES) - */ - -#if (BITMAP_BIT_ORDER == MSBFirst) && (GLYPHPADBYTES != 4) -#if GLYPHPADBYTES == 1 -#define ShiftAmnt 24 -#else -#define ShiftAmnt 16 -#endif - -/* - * Note: for BITMAP_BIT_ORDER != IMAGE_BYTE_ORDER, SCRRIGHT() evaluates its - * first argument more than once. Thus the imbedded char++ have to be moved. - * (DHD) - */ -#if BITMAP_BIT_ORDER == IMAGE_BYTE_ORDER -#if PPW == 32 -#define GetBits4 c = (*char1++ << ShiftAmnt) | \ - SCRRIGHT (*char2++ << ShiftAmnt, xoff2) | \ - SCRRIGHT (*char3++ << ShiftAmnt, xoff3) | \ - SCRRIGHT (*char4++ << ShiftAmnt, xoff4); -#else /* PPW */ -#define GetBits4 c = ((unsigned long)(*char1++ << ShiftAmnt) << 32 ) | \ - (SCRRIGHT (*char2++ << ShiftAmnt, xoff2) << 32 ) | \ - (SCRRIGHT (*char3++ << ShiftAmnt, xoff3) << 32 ) | \ - (SCRRIGHT (*char4++ << ShiftAmnt, xoff4) << 32 ) | \ - (*char5++ << ShiftAmnt) | \ - SCRRIGHT (*char6++ << ShiftAmnt, xoff6) | \ - SCRRIGHT (*char7++ << ShiftAmnt, xoff7) | \ - SCRRIGHT (*char8++ << ShiftAmnt, xoff8); -#endif /* PPW */ -#else /* BITMAP_BIT_ORDER != IMAGE_BYTE_ORDER */ -#if PPW == 32 -#define GetBits4 c = (*char1++ << ShiftAmnt) | \ - SCRRIGHT (*char2 << ShiftAmnt, xoff2) | \ - SCRRIGHT (*char3 << ShiftAmnt, xoff3) | \ - SCRRIGHT (*char4 << ShiftAmnt, xoff4); \ - char2++; char3++; char4++; -#else /* PPW == 64 */ -#define GetBits4 c = ((unsigned long)(*char1++ << ShiftAmnt) << 32 ) | \ - (SCRRIGHT (*char2 << ShiftAmnt, xoff2) << 32 ) | \ - (SCRRIGHT (*char3 << ShiftAmnt, xoff3) << 32 ) | \ - (SCRRIGHT (*char4 << ShiftAmnt, xoff4) << 32 ) | \ - (*char5++ << ShiftAmnt) | \ - SCRRIGHT (*char6 << ShiftAmnt, xoff6) | \ - SCRRIGHT (*char7 << ShiftAmnt, xoff7) | \ - SCRRIGHT (*char8 << ShiftAmnt, xoff8); \ - char2++; char3++; char4++; char6++; char7++; char8++; -#endif /* PPW */ -#endif /* BITMAP_BIT_ORDER == IMAGE_BYTE_ORDER */ - -#else /* (BITMAP_BIT_ORDER != MSBFirst) || (GLYPHPADBYTES == 4) */ - -#if BITMAP_BIT_ORDER == IMAGE_BYTE_ORDER -#if PPW == 32 -#define GetBits4 c = *char1++ | \ - SCRRIGHT (*char2++, xoff2) | \ - SCRRIGHT (*char3++, xoff3) | \ - SCRRIGHT (*char4++, xoff4); -#else /* PPW == 64 */ -#define GetBits4 c = (unsigned long)(((*char1++) << 64 ) | \ - (SCRRIGHT (*char2++, xoff2) << 64 ) | \ - (SCRRIGHT (*char3++, xoff3) << 64 ) | \ - (SCRRIGHT (*char4++, xoff4) << 64 ) | \ - SCRRIGHT (*char5++, xoff5) | \ - SCRRIGHT (*char6++, xoff6) | \ - SCRRIGHT (*char7++, xoff7) | \ - SCRRIGHT (*char8++, xoff8)); -#endif /* PPW */ -#else /* BITMAP_BIT_ORDER != IMAGE_BYTE_ORDER */ -#if PPW == 32 -#define GetBits4 c = *char1++ | \ - SCRRIGHT (*char2, xoff2) | \ - SCRRIGHT (*char3, xoff3) | \ - SCRRIGHT (*char4, xoff4); \ - char2++; char3++; char4++; -#else /* PPW == 64 */ -#define GetBits4 c = (unsigned long)(((*char1++) << 64 ) | \ - (SCRRIGHT (*char2, xoff2) << 64 ) | \ - (SCRRIGHT (*char3, xoff3) << 64 ) | \ - (SCRRIGHT (*char4, xoff4) << 64 ) | \ - SCRRIGHT (*char5, xoff5) | \ - SCRRIGHT (*char6, xoff6) | \ - SCRRIGHT (*char7, xoff7) | \ - SCRRIGHT (*char8, xoff8)); \ - char2++; char3++; char4++; \ - char5++; char6++; char7++; char8++; -#endif /* PPW */ -#endif /* BITMAP_BIT_ORDER == IMAGE_BYTE_ORDER */ - -#endif /* BITMAP_BIT_ORDER && GLYPHPADBYTES */ - - -#if GLYPHPADBYTES == 1 -typedef unsigned char *glyphPointer; -#define USE_LEFTBITS -#endif - -#if GLYPHPADBYTES == 2 -typedef unsigned short *glyphPointer; -#define USE_LEFTBITS -#endif - -#if GLYPHPADBYTES == 4 -typedef unsigned int *glyphPointer; -#endif - -#ifdef USE_LEFTBITS -#define GetBits1 getleftbits (char1, widthGlyph, c); \ - c &= glyphMask; \ - char1 = (glyphPointer) (((char *) char1) + glyphBytes); -#else -#define GetBits1 c = *char1++; -#endif - -void -afbTEGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) - DrawablePtr pDrawable; - GC *pGC; - int x, y; - unsigned int nglyph; - CharInfoPtr *ppci; /* array of character info */ - pointer pglyphBase; /* start of array of glyphs */ -{ - FontPtr pfont = pGC->font; - int widthDst; - PixelType *pdstBase; /* pointer to longword with top row - of current glyph */ - - int h; /* height of glyph and char */ - register int xpos; /* current x */ - int ypos; /* current y */ - int widthGlyph; - - int hTmp; /* counter for height */ - register PixelType startmask, endmask; - int nfirst; /* used if glyphs spans a longword boundary */ - BoxRec bbox; /* for clipping */ - int widthGlyphs; - int sizeDst; - int depthDst; - PixelType *saveDst; - register PixelType *dst; - register PixelType c; - register int d; - register int xoff1, xoff2, xoff3, xoff4; - register glyphPointer char1, char2, char3, char4; - glyphPointer schar1, schar2, schar3, schar4; -#if PPW == 64 - register int xoff5, xoff6, xoff7, xoff8; - register glyphPointer char5, char6, char7, char8; - glyphPointer schar5, schar6, schar7, schar8; -#endif /* PPW */ - - unsigned char *rrops; -#ifdef USE_LEFTBITS - register PixelType glyphMask; - register PixelType tmpSrc; - register int glyphBytes; -#endif - - afbGetPixelWidthSizeDepthAndPointer(pDrawable, widthDst, sizeDst, depthDst, - pdstBase); - - xpos = x + pDrawable->x; - ypos = y + pDrawable->y; - - widthGlyph = FONTMAXBOUNDS(pfont,characterWidth); - h = FONTASCENT(pfont) + FONTDESCENT(pfont); - - xpos += FONTMAXBOUNDS(pfont,leftSideBearing); - ypos -= FONTASCENT(pfont); - - rrops = ((afbPrivGCPtr)dixLookupPrivate(&pGC->devPrivates, - afbGCPrivateKey))->rropOS; - bbox.x1 = xpos; - bbox.x2 = xpos + (widthGlyph * nglyph); - bbox.y1 = ypos; - bbox.y2 = ypos + h; - - switch (RECT_IN_REGION(pGC->pScreen, pGC->pCompositeClip, &bbox)) { - case rgnPART: - /* this is the WRONG thing to do, but it works. - calling the non-terminal text is easy, but slow, given - what we know about the font. - - the right thing to do is something like: - for each clip rectangle - compute at which row the glyph starts to be in it, - and at which row the glyph ceases to be in it - compute which is the first glyph inside the left - edge, and the last one inside the right edge - draw a fractional first glyph, using only - the rows we know are in - draw all the whole glyphs, using the appropriate rows - draw any pieces of the last glyph, using the right rows - - this way, the code would take advantage of knowing that - all glyphs are the same height and don't overlap. - - one day... - */ - afbImageGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); - case rgnOUT: - return; - } - pdstBase = afbScanlineDeltaNoBankSwitch(pdstBase, ypos, widthDst); - widthGlyphs = widthGlyph * PGSZB; - -#ifdef USE_LEFTBITS - glyphMask = mfbGetendtab(widthGlyph); - glyphBytes = GLYPHWIDTHBYTESPADDED(*ppci); -#endif - - if (nglyph >= PGSZB && widthGlyphs <= PPW) { - while (nglyph >= PGSZB) { - nglyph -= PGSZB; - xoff1 = xpos & PIM; - xoff2 = widthGlyph; - xoff3 = xoff2 + widthGlyph; - xoff4 = xoff3 + widthGlyph; -#if PPW == 64 - xoff5 = xoff4 + widthGlyph; - xoff6 = xoff5 + widthGlyph; - xoff7 = xoff6 + widthGlyph; - xoff8 = xoff7 + widthGlyph; -#endif /* PPW */ - schar1 = (glyphPointer)FONTGLYPHBITS(pglyphBase,(*ppci++)); - schar2 = (glyphPointer)FONTGLYPHBITS(pglyphBase,(*ppci++)); - schar3 = (glyphPointer)FONTGLYPHBITS(pglyphBase,(*ppci++)); - schar4 = (glyphPointer)FONTGLYPHBITS(pglyphBase,(*ppci++)); -#if PPW == 64 - schar5 = (glyphPointer)FONTGLYPHBITS(pglyphBase,(*ppci++)); - schar6 = (glyphPointer)FONTGLYPHBITS(pglyphBase,(*ppci++)); - schar7 = (glyphPointer)FONTGLYPHBITS(pglyphBase,(*ppci++)); - schar8 = (glyphPointer)FONTGLYPHBITS(pglyphBase,(*ppci++)); -#endif /* PPW */ - - hTmp = h; - saveDst = afbScanlineOffset(pdstBase, (xpos >> PWSH)); /* switch now */ - -#ifndef FASTCHARS - if (xoff1 + widthGlyphs <= PPW) { - maskpartialbits (xoff1, widthGlyphs, startmask); -#endif - for (d = 0; d < depthDst; d++) { - hTmp = h; - dst = saveDst; - saveDst += sizeDst; /* @@@ NEXT PLANE @@@ */ - - switch (rrops[d]) { - case RROP_BLACK: - while (hTmp--) { -#ifdef FASTCHARS - FASTPUTBITS(0, xoff1, widthGlyphs, dst); -#else - *(dst) &= ~startmask; -#endif - afbScanlineInc(dst, widthDst); - } - break; - case RROP_WHITE: - while (hTmp--) { -#ifdef FASTCHARS - FASTPUTBITS(~0, xoff1, widthGlyphs, dst); -#else - *(dst) |= startmask; -#endif - afbScanlineInc(dst, widthDst); - } - break; - case RROP_INVERT: - char1 = schar1; - char2 = schar2; - char3 = schar3; - char4 = schar4; - /* XXX */ - while (hTmp--) { - GetBits4 -#ifdef FASTCHARS -# if BITMAP_BIT_ORDER == MSBFirst - c >>= PPW - widthGlyphs; -# endif - FASTPUTBITS(~c, xoff1, widthGlyphs, dst); -#else - *(dst) = ((*dst) & ~startmask) | (~SCRRIGHT(c, xoff1) & startmask); -#endif - afbScanlineInc(dst, widthDst); - } - break; - case RROP_COPY: - char1 = schar1; - char2 = schar2; - char3 = schar3; - char4 = schar4; - - while (hTmp--) { - GetBits4 -#ifdef FASTCHARS -# if BITMAP_BIT_ORDER == MSBFirst - c >>= PPW - widthGlyphs; -#endif - FASTPUTBITS(c, xoff1, widthGlyphs, dst); -#else - *(dst) = ((*dst) & ~startmask) | (SCRRIGHT(c, xoff1) & startmask); -#endif - afbScanlineInc(dst, widthDst); - } - break; - case RROP_NOP: - break; - } /* switch (rrops[d]) */ - } /* for (d = ... ) */ -#ifndef FASTCHARS - } else { - maskPPWbits (xoff1, widthGlyphs, startmask, endmask); - nfirst = PPW - xoff1; - for (d = 0; d < depthDst; d++) { - hTmp = h; - dst = saveDst; - saveDst += sizeDst; /* @@@ NEXT PLANE @@@ */ - - switch (rrops[d]) { - case RROP_BLACK: - while (hTmp--) { - dst[0] &= ~startmask; - dst[1] &= ~endmask; - afbScanlineInc(dst, widthDst); - } - break; - case RROP_WHITE: - while (hTmp--) { - dst[0] |= startmask; - dst[1] |= endmask; - afbScanlineInc(dst, widthDst); - } - break; - case RROP_INVERT: - char1 = schar1; - char2 = schar2; - char3 = schar3; - char4 = schar4; - - while (hTmp--) { - GetBits4 - dst[0] = (dst[0] & ~startmask) | (~SCRRIGHT(c,xoff1) & startmask); - dst[1] = (dst[1] & ~endmask) | (~SCRLEFT(c,nfirst) & endmask); - afbScanlineInc(dst, widthDst); - } - break; - case RROP_COPY: - char1 = schar1; - char2 = schar2; - char3 = schar3; - char4 = schar4; - - while (hTmp--) { - GetBits4 - dst[0] = (dst[0] & ~startmask) | (SCRRIGHT(c,xoff1) & startmask); - dst[1] = (dst[1] & ~endmask) | (SCRLEFT(c,nfirst) & endmask); - afbScanlineInc(dst, widthDst); - } - break; - - case RROP_NOP: - break; - } /* switch */ - } /* for (d = ... ) */ - } -#endif - xpos += widthGlyphs; - } - } - - while(nglyph--) { - xoff1 = xpos & PIM; - schar1 = (glyphPointer) FONTGLYPHBITS(pglyphBase,(*ppci++)); - hTmp = h; - saveDst = afbScanlineOffset(pdstBase, (xpos >> PWSH)); - - if (xoff1 + widthGlyph <= PPW) { - maskpartialbits (xoff1, widthGlyph, startmask); - - for (d = 0; d < depthDst; d++) { - hTmp = h; - dst = saveDst; - saveDst += sizeDst; /* @@@ NEXT PLANE @@@ */ - char1 = schar1; - - switch (rrops[d]) { - case RROP_BLACK: - while (hTmp--) { - (*dst) &= ~startmask; - afbScanlineInc(dst, widthDst); - } - break; - case RROP_WHITE: - while (hTmp--) { - (*dst) |= startmask; - afbScanlineInc(dst, widthDst); - } - break; - case RROP_INVERT: - while (hTmp--) { -#ifdef FASTCHARS -#ifdef USE_LEFTBITS - FASTGETBITS (char1,0,widthGlyph,c); - char1 = (glyphPointer) (((char *) char1) + glyphBytes); -#else - c = *char1++; -#if BITMAP_BIT_ORDER == MSBFirst - c >>= PPW - widthGlyph; -#endif -#endif - FASTPUTBITS (~c,xoff1,widthGlyph,dst); -#else - GetBits1 - (*dst) = ((*dst) & ~startmask) | (~SCRRIGHT(c, xoff1) & startmask); -#endif - afbScanlineInc(dst, widthDst); - } - break; - case RROP_COPY: - while (hTmp--) { -#ifdef FASTCHARS -#ifdef USE_LEFTBITS - FASTGETBITS (char1,0,widthGlyph,c); - char1 = (glyphPointer) (((char *) char1) + glyphBytes); -#else - c = *char1++; -#if BITMAP_BIT_ORDER == MSBFirst - c >>= PPW - widthGlyph; -#endif -#endif - FASTPUTBITS (c,xoff1,widthGlyph,dst); -#else - GetBits1 - (*dst) = ((*dst) & ~startmask) | (SCRRIGHT(c, xoff1) & startmask); -#endif - afbScanlineInc(dst, widthDst); - } - break; - case RROP_NOP: - break; - } /* switch */ - } /* for (d = ...) */ - } else { - maskPPWbits (xoff1, widthGlyph, startmask, endmask); - nfirst = PPW - xoff1; - - for (d = 0; d < depthDst; d++) { - hTmp = h; - dst = saveDst; - saveDst += sizeDst; /* @@@ NEXT PLANE @@@ */ - char1 = schar1; - - switch (rrops[d]) { - case RROP_BLACK: - while (hTmp--) { - dst[0] &= ~startmask; - dst[1] &= ~endmask; - afbScanlineInc(dst, widthDst); - } - break; - case RROP_WHITE: - while (hTmp--) { - dst[0] |= startmask; - dst[1] |= endmask; - afbScanlineInc(dst, widthDst); - } - break; - case RROP_INVERT: - while (hTmp--) { - GetBits1 - dst[0] = (dst[0] & ~startmask) | (~SCRRIGHT(c,xoff1) & startmask); - dst[1] = (dst[1] & ~endmask) | (~SCRLEFT(c,nfirst) & endmask); - afbScanlineInc(dst, widthDst); - } - break; - case RROP_COPY: - while (hTmp--) { - GetBits1 - dst[0] = (dst[0] & ~startmask) | (SCRRIGHT(c,xoff1) & startmask); - dst[1] = (dst[1] & ~endmask) | (SCRLEFT(c,nfirst) & endmask); - afbScanlineInc(dst, widthDst); - } - break; - case RROP_NOP: - break; - } /* switch */ - } /* for (d = ...) */ - } - - xpos += widthGlyph; - } -} diff --git a/afb/afbtile.c b/afb/afbtile.c deleted file mode 100644 index 8fcb9cde7..000000000 --- a/afb/afbtile.c +++ /dev/null @@ -1,857 +0,0 @@ -/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include - -#include "windowstr.h" -#include "regionstr.h" -#include "pixmapstr.h" -#include "scrnintstr.h" - -#include "afb.h" - -#include "maskbits.h" - -#include "mergerop.h" -/* - - the boxes are already translated. - - NOTE: - iy = ++iy < tileHeight ? iy : 0 -is equivalent to iy%= tileheight, and saves a division. -*/ - -/* - tile area with a PPW bit wide pixmap -*/ -void -MROP_NAME(afbTileAreaPPW)(pDraw, nbox, pbox, alu, ptile, planemask) - DrawablePtr pDraw; - int nbox; - BoxPtr pbox; - int alu; - PixmapPtr ptile; - unsigned long planemask; -{ - register PixelType *psrc; - /* pointer to bits in tile, if needed */ - int tileHeight; /* height of the tile */ - register PixelType srcpix; - int nlwidth; /* width in longwords of the drawable */ - int w; /* width of current box */ - MROP_DECLARE_REG () - register int h; /* height of current box */ - register int nlw; /* loop version of nlwMiddle */ - register PixelType *p; /* pointer to bits we're writing */ - int sizeDst; - int depthDst; - register int d; - PixelType startmask; - PixelType endmask; /* masks for reggedy bits at either end of line */ - int nlwMiddle; /* number of longwords between sides of boxes */ - int nlwExtra; /* to get from right of box to left of next span */ - register int iy; /* index of current scanline in tile */ - PixelType *pbits; /* pointer to start of drawable */ - PixelType *saveP; - PixelType *pSaveSrc; - int saveH; - int saveIY; - - afbGetPixelWidthSizeDepthAndPointer(pDraw, nlwidth, sizeDst, depthDst, - pbits); - - MROP_INITIALIZE(alu,~0) - - tileHeight = ptile->drawable.height; - pSaveSrc = (PixelType *)(ptile->devPrivate.ptr); - - while (nbox--) { - w = pbox->x2 - pbox->x1; - saveH = pbox->y2 - pbox->y1; - saveIY = pbox->y1 % tileHeight; - saveP = afbScanline(pbits, pbox->x1, pbox->y1, nlwidth); - psrc = pSaveSrc; - - if (((pbox->x1 & PIM) + w) < PPW) { - maskpartialbits(pbox->x1, w, startmask); - nlwExtra = nlwidth; - for (d = 0; d < depthDst; d++, saveP += sizeDst, psrc += tileHeight) { /* @@@ NEXT PLANE @@@ */ - if (!(planemask & (1 << d))) - continue; - - p = saveP; - h = saveH; - iy = saveIY; - - while (h--) { - srcpix = psrc[iy]; - iy++; - if (iy == tileHeight) - iy = 0; - *p = MROP_MASK(srcpix,*p,startmask); - afbScanlineInc(p, nlwExtra); - } - } - } else { - maskbits(pbox->x1, w, startmask, endmask, nlwMiddle); - - for (d = 0; d < depthDst; d++, saveP += sizeDst, psrc += tileHeight) { /* @@@ NEXT PLANE @@@ */ - if (!(planemask & (1 << d))) - continue; - - p = saveP; - h = saveH; - iy = saveIY; - nlwExtra = nlwidth - nlwMiddle; - - if (startmask && endmask) { - nlwExtra -= 1; - while (h--) { - srcpix = psrc[iy]; - iy++; - if (iy == tileHeight) - iy = 0; - nlw = nlwMiddle; - *p = MROP_MASK (srcpix,*p,startmask); - p++; - while (nlw--) { - *p = MROP_SOLID(srcpix,*p); - p++; - } - - *p = MROP_MASK(srcpix,*p,endmask); - afbScanlineInc(p, nlwExtra); - } - } else if (startmask && !endmask) { - nlwExtra -= 1; - while (h--) { - srcpix = psrc[iy]; - iy++; - if (iy == tileHeight) - iy = 0; - nlw = nlwMiddle; - *p = MROP_MASK(srcpix,*p,startmask); - p++; - while (nlw--) { - *p = MROP_SOLID(srcpix,*p); - p++; - } - afbScanlineInc(p, nlwExtra); - } - } else if (!startmask && endmask) { - while (h--) { - srcpix = psrc[iy]; - iy++; - if (iy == tileHeight) - iy = 0; - nlw = nlwMiddle; - while (nlw--) { - *p = MROP_SOLID(srcpix,*p); - p++; - } - - *p = MROP_MASK(srcpix,*p,endmask); - afbScanlineInc(p, nlwExtra); - } - } else { /* no ragged bits at either end */ - while (h--) { - srcpix = psrc[iy]; - iy++; - if (iy == tileHeight) - iy = 0; - nlw = nlwMiddle; - while (nlw--) { - *p = MROP_SOLID (srcpix,*p); - p++; - } - afbScanlineInc(p, nlwExtra); - } - } - } /* for (d = ...) */ - } - pbox++; - } -} - -void -MROP_NAME(afbTileArea)(pDraw, nbox, pbox, alu, pTile, xOff, yOff, planemask) - DrawablePtr pDraw; - int nbox; - BoxPtr pbox; - int alu; - PixmapPtr pTile; - int xOff; - int yOff; - unsigned long planemask; -{ - register PixelType *psrc; - /* pointer to bits in tile, if needed */ - int nlwidth; /* width in longwords of the drawable */ - MROP_DECLARE_REG () - register int h; /* height of current box */ - register PixelType *pdst; /* pointer to bits we're writing */ - register PixelType tmpsrc; -#if (MROP) != Mcopy - register PixelType tmpdst; -#endif - int sizeDst; - int depthDst; - int sizeTile; - int tileLine; - int iline; - int w, width, x, xSrc, ySrc, srcStartOver, nend; - int tlwidth, rem, tileWidth, tileHeight, endinc; - int saveW; - PixelType *psrcT; - int d; - int nstart; - PixelType startmask; - PixelType endmask; /* masks for reggedy bits at either end of line */ - int nlMiddle; /* number of longwords between sides of boxes */ - int iy; - PixelType *pBase; /* pointer to start of drawable */ - PixelType *saveP; - PixelType *pStartDst; - PixelType *pStartTile; - int saveH; - - afbGetPixelWidthSizeDepthAndPointer(pDraw, nlwidth, sizeDst, depthDst, - pBase); - - MROP_INITIALIZE(alu,~0) - - tileHeight = pTile->drawable.height; - tileWidth = pTile->drawable.width; - tlwidth = pTile->devKind / sizeof (PixelType); - sizeTile = tlwidth * tileHeight; - - xSrc = pDraw->x + ((xOff % tileWidth) - tileWidth); - ySrc = pDraw->y + ((yOff % tileHeight) - tileHeight); - - while (nbox--) { - saveW = pbox->x2 - pbox->x1; - iline = (pbox->y1 - ySrc) % tileHeight; - psrcT = (PixelType *) pTile->devPrivate.ptr; - tileLine = iline * tlwidth; - saveH = pbox->y2 - pbox->y1; - saveP = afbScanline(pBase, pbox->x1, pbox->y1, nlwidth); - - for (d = 0; d < depthDst; d++, psrcT += sizeTile, saveP += sizeDst) { /* @@@ NEXT PLANE @@@ */ - if (!(planemask & (1 << d))) - continue; - - h = saveH; - pStartDst = saveP; - pStartTile = psrcT + tileLine; - iy = iline; - - while (h--) { - x = pbox->x1; - width = saveW; - pdst = pStartDst; - while(width > 0) { - psrc = pStartTile; - w = min(tileWidth, width); - if((rem = (x - xSrc) % tileWidth) != 0) { - /* if we're in the middle of the tile, get - as many bits as will finish the span, or - as many as will get to the left edge of the tile, - or a longword worth, starting at the appropriate - offset in the tile. - */ - w = min(min(tileWidth - rem, width), BITMAP_SCANLINE_PAD); - endinc = rem / BITMAP_SCANLINE_PAD; - - getbits ((psrc+endinc), (rem&PIM), w, tmpsrc); -#if (MROP) != Mcopy - getbits (pdst, (x & PIM), w, tmpdst); - tmpsrc = DoMergeRop (tmpsrc, tmpdst); -#endif - putbits (tmpsrc, (x & PIM), w, pdst); - - if((x & PIM) + w >= PPW) - pdst++; - } else if(((x & PIM) + w) < PPW) { - /* doing < PPW bits is easy, and worth special-casing */ - tmpsrc = *psrc; -#if (MROP) != Mcopy - getbits (pdst, (x & PIM), w, tmpdst); - tmpsrc = DoMergeRop (tmpsrc, tmpdst); -#endif - putbits (tmpsrc, (x & PIM), w, pdst); - } else { - /* start at the left edge of the tile, - and put down as much as we can - */ - maskbits(x, w, startmask, endmask, nlMiddle); - - if (startmask) - nstart = PPW - (x & PIM); - else - nstart = 0; - if (endmask) - nend = (x + w) & PIM; - else - nend = 0; - - srcStartOver = nstart > PLST; - - if(startmask) { - tmpsrc = *psrc; -#if (MROP) != Mcopy - getbits (pdst, (x & PIM), nstart, tmpdst); - tmpsrc = DoMergeRop (tmpsrc, tmpdst); -#endif - putbits (tmpsrc, (x & PIM), nstart, pdst); - pdst++; - if(srcStartOver) - psrc++; - } - - while(nlMiddle--) { - getbits (psrc, nstart, PPW, tmpsrc); -#if (MROP) != Mcopy - tmpdst = *pdst; - tmpsrc = DoMergeRop (tmpsrc, tmpdst); -#endif - *pdst++ = tmpsrc; - /*putbits (tmpsrc, 0, PPW, pdst); - pdst++;*/ - psrc++; - } - - if(endmask) { - getbits (psrc, nstart, nend, tmpsrc); -#if (MROP) != Mcopy - tmpdst = *pdst; - tmpsrc = DoMergeRop (tmpsrc, tmpdst); -#endif - putbits (tmpsrc, 0, nend, pdst); - } - } - x += w; - width -= w; - } /* while (width > 0) */ - - pStartDst += nlwidth; - if (++iy >= tileHeight) { - iy = 0; - pStartTile = psrcT; - } else - pStartTile += tlwidth; - - } /* while (h) */ - } /* for (d = ... ) */ - pbox++; - } /* for each box */ -} - -void -MROP_NAME(afbOpaqueStippleAreaPPW)(pDraw, nbox, pbox, alu, ptile, - rropsOS, planemask) - DrawablePtr pDraw; - int nbox; - BoxPtr pbox; - int alu; - PixmapPtr ptile; - register unsigned char *rropsOS; - unsigned long planemask; -{ - register PixelType *psrc; - /* pointer to bits in tile, if needed */ - int tileHeight; /* height of the tile */ - register PixelType srcpix = 0; - int nlwidth; /* width in longwords of the drawable */ - int w; /* width of current box */ - MROP_DECLARE_REG () - register int h; /* height of current box */ - register int nlw; /* loop version of nlwMiddle */ - register PixelType *p; /* pointer to bits we're writing */ - int sizeDst; - int depthDst; - register int d; - PixelType startmask; - PixelType endmask; /* masks for reggedy bits at either end of line */ - int nlwMiddle; /* number of longwords between sides of boxes */ - int nlwExtra; /* to get from right of box to left of next span */ - register int iy; /* index of current scanline in tile */ - PixelType *pbits; /* pointer to start of drawable */ - PixelType *saveP; - int saveH; - int saveIY; - - afbGetPixelWidthSizeDepthAndPointer(pDraw, nlwidth, sizeDst, depthDst, - pbits); - - MROP_INITIALIZE(alu,~0) - - tileHeight = ptile->drawable.height; - psrc = (PixelType *)(ptile->devPrivate.ptr); - - while (nbox--) { - w = pbox->x2 - pbox->x1; - saveH = pbox->y2 - pbox->y1; - saveIY = pbox->y1 % tileHeight; - saveP = afbScanline(pbits, pbox->x1, pbox->y1, nlwidth); - - if ( ((pbox->x1 & PIM) + w) < PPW) { - maskpartialbits(pbox->x1, w, startmask); - nlwExtra = nlwidth; - for (d = 0; d < depthDst; d++, saveP += sizeDst) { /* @@@ NEXT PLANE @@@ */ - if (!(planemask & (1 << d))) - continue; - - p = saveP; - h = saveH; - iy = saveIY; - - while (h--) { - switch (rropsOS[d]) { - case RROP_BLACK: - srcpix = 0; - break; - case RROP_WHITE: - srcpix = ~0; - break; - case RROP_COPY: - srcpix = psrc[iy]; - break; - case RROP_INVERT: - srcpix = ~psrc[iy]; - break; - } - iy++; - if (iy == tileHeight) - iy = 0; - *p = MROP_MASK(srcpix,*p,startmask); - afbScanlineInc(p, nlwExtra); - } - } - } else { - maskbits(pbox->x1, w, startmask, endmask, nlwMiddle); - - for (d = 0; d < depthDst; d++, saveP += sizeDst) { /* @@@ NEXT PLANE @@@ */ - if (!(planemask & (1 << d))) - continue; - - p = saveP; - h = saveH; - iy = saveIY; - nlwExtra = nlwidth - nlwMiddle; - - if (startmask && endmask) { - nlwExtra -= 1; - while (h--) { - switch (rropsOS[d]) { - case RROP_BLACK: - srcpix = 0; - break; - case RROP_WHITE: - srcpix = ~0; - break; - case RROP_COPY: - srcpix = psrc[iy]; - break; - case RROP_INVERT: - srcpix = ~psrc[iy]; - break; - } - iy++; - if (iy == tileHeight) - iy = 0; - nlw = nlwMiddle; - *p = MROP_MASK (srcpix,*p,startmask); - p++; - while (nlw--) { - *p = MROP_SOLID(srcpix,*p); - p++; - } - - *p = MROP_MASK(srcpix,*p,endmask); - afbScanlineInc(p, nlwExtra); - } - } else if (startmask && !endmask) { - nlwExtra -= 1; - while (h--) { - switch (rropsOS[d]) { - case RROP_BLACK: - srcpix = 0; - break; - case RROP_WHITE: - srcpix = ~0; - break; - case RROP_COPY: - srcpix = psrc[iy]; - break; - case RROP_INVERT: - srcpix = ~psrc[iy]; - break; - } - iy++; - if (iy == tileHeight) - iy = 0; - nlw = nlwMiddle; - *p = MROP_MASK(srcpix,*p,startmask); - p++; - while (nlw--) { - *p = MROP_SOLID(srcpix,*p); - p++; - } - afbScanlineInc(p, nlwExtra); - } - } else if (!startmask && endmask) { - while (h--) { - switch (rropsOS[d]) { - case RROP_BLACK: - srcpix = 0; - break; - case RROP_WHITE: - srcpix = ~0; - break; - case RROP_COPY: - srcpix = psrc[iy]; - break; - case RROP_INVERT: - srcpix = ~psrc[iy]; - break; - } - iy++; - if (iy == tileHeight) - iy = 0; - nlw = nlwMiddle; - while (nlw--) { - *p = MROP_SOLID(srcpix,*p); - p++; - } - - *p = MROP_MASK(srcpix,*p,endmask); - afbScanlineInc(p, nlwExtra); - } - } else { /* no ragged bits at either end */ - while (h--) { - switch (rropsOS[d]) { - case RROP_BLACK: - srcpix = 0; - break; - case RROP_WHITE: - srcpix = ~0; - break; - case RROP_COPY: - srcpix = psrc[iy]; - break; - case RROP_INVERT: - srcpix = ~psrc[iy]; - break; - } - iy++; - if (iy == tileHeight) - iy = 0; - nlw = nlwMiddle; - while (nlw--) { - *p = MROP_SOLID (srcpix,*p); - p++; - } - afbScanlineInc(p, nlwExtra); - } - } - } /* for (d = ...) */ - } - pbox++; - } -} - -void -MROP_NAME(afbOpaqueStippleArea)(pDraw, nbox, pbox, alu, pTile, xOff, yOff, - rropsOS, planemask) - DrawablePtr pDraw; - int nbox; - BoxPtr pbox; - int alu; - PixmapPtr pTile; - int xOff; - int yOff; - register unsigned char *rropsOS; - unsigned long planemask; -{ - register PixelType *psrc; - /* pointer to bits in tile, if needed */ - int nlwidth; /* width in longwords of the drawable */ - MROP_DECLARE_REG () - register int h; /* height of current box */ - register PixelType *pdst; /* pointer to bits we're writing */ - register PixelType tmpsrc = 0; -#if (MROP) != Mcopy - register PixelType tmpdst; -#endif - int sizeDst; - int depthDst; - int tileLine; - int iline; - int w, width, x, xSrc, ySrc, srcStartOver, nend; - int tlwidth, rem, tileWidth, tileHeight, endinc; - int saveW; - PixelType *psrcT; - int d; - int nstart; - PixelType startmask; - PixelType endmask; /* masks for reggedy bits at either end of line */ - int nlMiddle; /* number of longwords between sides of boxes */ - int iy; - PixelType *pBase; /* pointer to start of drawable */ - PixelType *saveP; - PixelType *pStartDst; - PixelType *pStartTile; - int saveH; - - afbGetPixelWidthSizeDepthAndPointer(pDraw, nlwidth, sizeDst, depthDst, - pBase); - - MROP_INITIALIZE(alu,~0) - - tileHeight = pTile->drawable.height; - tileWidth = pTile->drawable.width; - tlwidth = pTile->devKind / sizeof (PixelType); - - xSrc = pDraw->x + ((xOff % tileWidth) - tileWidth); - ySrc = pDraw->y + ((yOff % tileHeight) - tileHeight); - - while (nbox--) { - saveW = pbox->x2 - pbox->x1; - iline = (pbox->y1 - ySrc) % tileHeight; - psrcT = (PixelType *) pTile->devPrivate.ptr; - tileLine = iline * tlwidth; - saveH = pbox->y2 - pbox->y1; - saveP = afbScanline(pBase, pbox->x1, pbox->y1, nlwidth); - - for (d = 0; d < depthDst; d++, saveP += sizeDst) { /* @@@ NEXT PLANE @@@ */ - if (!(planemask & (1 << d))) - continue; - - h = saveH; - pStartDst = saveP; - pStartTile = psrcT + tileLine; - iy = iline; - - while (h--) { - x = pbox->x1; - width = saveW; - pdst = pStartDst; - while(width > 0) { - psrc = pStartTile; - w = min(tileWidth, width); - if((rem = (x - xSrc) % tileWidth) != 0) { - /* if we're in the middle of the tile, get - as many bits as will finish the span, or - as many as will get to the left edge of the tile, - or a longword worth, starting at the appropriate - offset in the tile. - */ - w = min(min(tileWidth - rem, width), BITMAP_SCANLINE_PAD); - endinc = rem / BITMAP_SCANLINE_PAD; - - switch (rropsOS[d]) { - case RROP_BLACK: - tmpsrc = 0; - break; - case RROP_WHITE: - tmpsrc = ~0; - break; - - case RROP_COPY: - getbits ((psrc+endinc), (rem&PIM), w, tmpsrc); - break; - - case RROP_INVERT: - getbits ((psrc+endinc), (rem&PIM), w, tmpsrc); - tmpsrc = ~tmpsrc; - break; - } -#if (MROP) != Mcopy - getbits (pdst, (x & PIM), w, tmpdst); - tmpsrc = DoMergeRop (tmpsrc, tmpdst); -#endif - putbits (tmpsrc, (x & PIM), w, pdst); - - if((x & PIM) + w >= PPW) - pdst++; - } else if(((x & PIM) + w) < PPW) { - /* doing < PPW bits is easy, and worth special-casing */ - switch (rropsOS[d]) { - case RROP_BLACK: - tmpsrc = 0; - break; - case RROP_WHITE: - tmpsrc = ~0; - break; - case RROP_COPY: - tmpsrc = *psrc; - break; - case RROP_INVERT: - tmpsrc = ~*psrc; - break; - } -#if (MROP) != Mcopy - getbits (pdst, (x & PIM), w, tmpdst); - tmpsrc = DoMergeRop (tmpsrc, tmpdst); -#endif - putbits (tmpsrc, (x & PIM), w, pdst); - } else { - /* start at the left edge of the tile, - and put down as much as we can - */ - maskbits(x, w, startmask, endmask, nlMiddle); - - if (startmask) - nstart = PPW - (x & PIM); - else - nstart = 0; - if (endmask) - nend = (x + w) & PIM; - else - nend = 0; - - srcStartOver = nstart > PLST; - - if(startmask) { - switch (rropsOS[d]) { - case RROP_BLACK: - tmpsrc = 0; - break; - case RROP_WHITE: - tmpsrc = ~0; - break; - case RROP_COPY: - tmpsrc = *psrc; - break; - case RROP_INVERT: - tmpsrc = ~*psrc; - break; - } -#if (MROP) != Mcopy - getbits (pdst, (x & PIM), nstart, tmpdst); - tmpsrc = DoMergeRop (tmpsrc, tmpdst); -#endif - putbits (tmpsrc, (x & PIM), nstart, pdst); - pdst++; - if(srcStartOver) - psrc++; - } - - while(nlMiddle--) { - switch (rropsOS[d]) { - case RROP_BLACK: - tmpsrc = 0; - break; - case RROP_WHITE: - tmpsrc = ~0; - break; - case RROP_COPY: - getbits (psrc, nstart, PPW, tmpsrc); - break; - case RROP_INVERT: - getbits (psrc, nstart, PPW, tmpsrc); - tmpsrc = ~tmpsrc; - break; - } -#if (MROP) != Mcopy - tmpdst = *pdst; - tmpsrc = DoMergeRop (tmpsrc, tmpdst); -#endif - *pdst++ = tmpsrc; - /*putbits (tmpsrc, 0, PPW, pdst); - pdst++; */ - psrc++; - } - - if(endmask) { - switch (rropsOS[d]) { - case RROP_BLACK: - tmpsrc = 0; - break; - case RROP_WHITE: - tmpsrc = ~0; - break; - - case RROP_COPY: - getbits (psrc, nstart, nend, tmpsrc); - break; - - case RROP_INVERT: - getbits (psrc, nstart, nend, tmpsrc); - tmpsrc = ~tmpsrc; - break; - } -#if (MROP) != Mcopy - tmpdst = *pdst; - tmpsrc = DoMergeRop (tmpsrc, tmpdst); -#endif - putbits (tmpsrc, 0, nend, pdst); - } - } - x += w; - width -= w; - } /* while (width > 0) */ - - pStartDst += nlwidth; - if (++iy >= tileHeight) { - iy = 0; - pStartTile = psrcT; - } else - pStartTile += tlwidth; - - } /* while (h) */ - } /* for (d = ... ) */ - pbox++; - } /* for each box */ -} diff --git a/afb/afbwindow.c b/afb/afbwindow.c deleted file mode 100644 index c0dee980d..000000000 --- a/afb/afbwindow.c +++ /dev/null @@ -1,164 +0,0 @@ -/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include - -#include -#include "scrnintstr.h" -#include "windowstr.h" -#include "privates.h" -#include "afb.h" -#include "mistruct.h" -#include "regionstr.h" -#include "maskbits.h" - -Bool -afbCreateWindow(WindowPtr pWin) -{ - return (TRUE); -} - -/* This always returns true, because Xfree can't fail. It might be possible - * on some devices for Destroy to fail */ -Bool -afbDestroyWindow(WindowPtr pWin) -{ - return (TRUE); -} - -/*ARGSUSED*/ -Bool -afbMapWindow(pWindow) - WindowPtr pWindow; -{ - return (TRUE); -} - -/*ARGSUSED*/ -Bool -afbPositionWindow(WindowPtr pWin, int x, int y) -{ - /* This is the "wrong" fix to the right problem, but it doesn't really - * cost very much. When the window is moved, we need to invalidate any - * RotatedPixmap that exists in any GC currently validated against this - * window. - */ - pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER; - - /* Again, we have no failure modes indicated by any of the routines - * we've called, so we have to assume it worked */ - return (TRUE); -} - -/*ARGSUSED*/ -Bool -afbUnmapWindow(pWindow) - WindowPtr pWindow; -{ - return (TRUE); -} - -/* UNCLEAN! - this code calls the bitblt helper code directly. - - afbCopyWindow copies only the parts of the destination that are -visible in the source. -*/ - - -void -afbCopyWindow(pWin, ptOldOrg, prgnSrc) - WindowPtr pWin; - DDXPointRec ptOldOrg; - RegionPtr prgnSrc; -{ - DDXPointPtr pptSrc; - register DDXPointPtr ppt; - RegionPtr prgnDst; - register BoxPtr pbox; - register int dx, dy; - register int i, nbox; - WindowPtr pwinRoot; - - pwinRoot = WindowTable[pWin->drawable.pScreen->myNum]; - - prgnDst = REGION_CREATE(pWin->drawable.pScreen, NULL, 1); - - dx = ptOldOrg.x - pWin->drawable.x; - dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); - REGION_INTERSECT(pWin->drawable.pScreen, prgnDst, &pWin->borderClip, - prgnSrc); - - pbox = REGION_RECTS(prgnDst); - nbox = REGION_NUM_RECTS(prgnDst); - if(!(pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec)))) - return; - ppt = pptSrc; - - for (i=nbox; --i >= 0; ppt++, pbox++) { - ppt->x = pbox->x1 + dx; - ppt->y = pbox->y1 + dy; - } - - afbDoBitblt((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot, GXcopy, prgnDst, - pptSrc, ~0); - xfree(pptSrc); - REGION_DESTROY(pWin->drawable.pScreen, prgnDst); -} - -Bool -afbChangeWindowAttributes(WindowPtr pWin, unsigned long mask) -{ - return (TRUE); -} diff --git a/afb/afbzerarc.c b/afb/afbzerarc.c deleted file mode 100644 index e53488e02..000000000 --- a/afb/afbzerarc.c +++ /dev/null @@ -1,201 +0,0 @@ -/************************************************************ - -Copyright (c) 1989 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -********************************************************/ - - -/* Derived from: - * "Algorithm for drawing ellipses or hyperbolae with a digital plotter" - * by M. L. V. Pitteway - * The Computer Journal, November 1967, Volume 10, Number 3, pp. 282-289 - */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "regionstr.h" -#include "gcstruct.h" -#include "pixmapstr.h" -#include "scrnintstr.h" -#include "afb.h" -#include "maskbits.h" -#include "mizerarc.h" -#include "mi.h" - -/* - * Note: LEFTMOST must be the bit leftmost in the actual screen - * representation. This depends also on the IMAGE_BYTE_ORDER. - * LONG2CHARS() takes care of the re-ordering as required. (DHD) - */ -#if (BITMAP_BIT_ORDER == MSBFirst) -#define LEFTMOST ((PixelType) LONG2CHARS((1 << PLST))) -#else -#define LEFTMOST ((PixelType) LONG2CHARS(1)) -#endif - -#define Pixelate(base,yoff,xoff) \ -{ \ - paddr = afbScanlineOffset(base, (yoff) + ((xoff)>>PWSH)); \ - pmask = SCRRIGHT(LEFTMOST, (xoff) & PIM); \ - for (de = 0; de < depthDst; de++, paddr += sizeDst) /* @@@ NEXT PLANE @@@ */ \ - switch (rrops[de]) { \ - case RROP_BLACK: \ - *paddr &= ~pmask; \ - break; \ - case RROP_WHITE: \ - *paddr |= pmask; \ - break; \ - case RROP_INVERT: \ - *paddr ^= pmask; \ - break; \ - case RROP_NOP: \ - break; \ - } \ -} - -#define DoPix(bit,base,yoff,xoff) if (mask & bit) Pixelate(base,yoff,xoff); - -static void -afbZeroArcSS(DrawablePtr pDraw, GCPtr pGC, xArc *arc) -{ - miZeroArcRec info; - Bool do360; - register int de; - register int x, y, a, b, d, mask; - register int k1, k3, dx, dy; - PixelType *addrl; - PixelType *yorgl, *yorgol; - int nlwidth, yoffset, dyoffset; - int sizeDst, depthDst; - PixelType pmask; - register PixelType *paddr; - register unsigned char *rrops; - - rrops = ((afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, - afbGCPrivateKey))->rrops; - afbGetPixelWidthSizeDepthAndPointer(pDraw, nlwidth, sizeDst, depthDst, - addrl); - do360 = miZeroArcSetup(arc, &info, TRUE); - yorgl = addrl + ((info.yorg + pDraw->y) * nlwidth); - yorgol = addrl + ((info.yorgo + pDraw->y) * nlwidth); - info.xorg += pDraw->x; - info.xorgo += pDraw->x; - MIARCSETUP(); - yoffset = y ? nlwidth : 0; - dyoffset = 0; - mask = info.initialMask; - if (!(arc->width & 1)) { - DoPix(2, yorgl, 0, info.xorgo); - DoPix(8, yorgol, 0, info.xorgo); - } - if (!info.end.x || !info.end.y) { - mask = info.end.mask; - info.end = info.altend; - } - if (do360 && (arc->width == arc->height) && !(arc->width & 1)) { - int xoffset = nlwidth; - PixelType *yorghl = afbScanlineDeltaNoBankSwitch(yorgl, info.h, nlwidth); - int xorghp = info.xorg + info.h; - int xorghn = info.xorg - info.h; - - while (1) { - Pixelate(yorgl, yoffset, info.xorg + x); - Pixelate(yorgl, yoffset, info.xorg - x); - Pixelate(yorgol, -yoffset, info.xorg - x); - Pixelate(yorgol, -yoffset, info.xorg + x); - if (a < 0) - break; - Pixelate(yorghl, -xoffset, xorghp - y); - Pixelate(yorghl, -xoffset, xorghn + y); - Pixelate(yorghl, xoffset, xorghn + y); - Pixelate(yorghl, xoffset, xorghp - y); - xoffset += nlwidth; - MIARCCIRCLESTEP(yoffset += nlwidth;); - } - x = info.w; - yoffset = info.h * nlwidth; - } else if (do360) { - while (y < info.h || x < info.w) { - MIARCOCTANTSHIFT(dyoffset = nlwidth;); - Pixelate(yorgl, yoffset, info.xorg + x); - Pixelate(yorgl, yoffset, info.xorgo - x); - Pixelate(yorgol, -yoffset, info.xorgo - x); - Pixelate(yorgol, -yoffset, info.xorg + x); - MIARCSTEP(yoffset += dyoffset;, yoffset += nlwidth;); - } - } else { - while (y < info.h || x < info.w) { - MIARCOCTANTSHIFT(dyoffset = nlwidth;); - if ((x == info.start.x) || (y == info.start.y)) { - mask = info.start.mask; - info.start = info.altstart; - } - DoPix(1, yorgl, yoffset, info.xorg + x); - DoPix(2, yorgl, yoffset, info.xorgo - x); - DoPix(4, yorgol, -yoffset, info.xorgo - x); - DoPix(8, yorgol, -yoffset, info.xorg + x); - if ((x == info.end.x) || (y == info.end.y)) { - mask = info.end.mask; - info.end = info.altend; - } - MIARCSTEP(yoffset += dyoffset;, yoffset += nlwidth;); - } - } - if ((x == info.start.x) || (y == info.start.y)) - mask = info.start.mask; - DoPix(1, yorgl, yoffset, info.xorg + x); - DoPix(4, yorgol, -yoffset, info.xorgo - x); - if (arc->height & 1) { - DoPix(2, yorgl, yoffset, info.xorgo - x); - DoPix(8, yorgol, -yoffset, info.xorg + x); - } -} - -void -afbZeroPolyArcSS(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) -{ - register xArc *arc; - register int i; - BoxRec box; - RegionPtr cclip; - - cclip = pGC->pCompositeClip; - for (arc = parcs, i = narcs; --i >= 0; arc++) { - if (miCanZeroArc(arc)) { - box.x1 = arc->x + pDraw->x; - box.y1 = arc->y + pDraw->y; - box.x2 = box.x1 + (int)arc->width + 1; - box.y2 = box.y1 + (int)arc->height + 1; - if (RECT_IN_REGION(pDraw->pScreen, cclip, &box) == rgnIN) - afbZeroArcSS(pDraw, pGC, arc); - else - miZeroPolyArc(pDraw, pGC, 1, arc); - } else - miPolyArc(pDraw, pGC, 1, arc); - } -} diff --git a/configure.ac b/configure.ac index 7c749f52e..8a1b73f20 100644 --- a/configure.ac +++ b/configure.ac @@ -573,7 +573,6 @@ AC_ARG_ENABLE(xglx, AS_HELP_STRING([--enable-xglx], [Build Xglx xgl mo AC_ARG_ENABLE(xegl, AS_HELP_STRING([--enable-xegl], [Build Xegl xgl module (default: no)]), [XEGL=$enableval], [XEGL=no]) dnl legacy fb support AC_ARG_ENABLE(mfb, AS_HELP_STRING([--enable-mfb], [Build legacy mono framebuffer support (default: disable)]), [MFB=$enableval], [MFB=no]) -AC_ARG_ENABLE(afb, AS_HELP_STRING([--enable-afb], [Build legacy advanced framebuffer support (default: disable)]), [AFB=$enableval], [AFB=no]) dnl kdrive and its subsystems AC_ARG_ENABLE(kdrive, AS_HELP_STRING([--enable-kdrive], [Build kdrive servers (default: no)]), [KDRIVE=$enableval], [KDRIVE=no]) AC_ARG_ENABLE(xephyr, AS_HELP_STRING([--enable-xephyr], [Build the kdrive Xephyr server (default: auto)]), [XEPHYR=$enableval], [XEPHYR=auto]) @@ -1581,10 +1580,8 @@ AM_CONDITIONAL([XF86VIDMODE], [test "x$XF86VIDMODE" = xyes]) dnl legacy fb support test "x$MFB" = xauto && MFB="$XORG" -test "x$AFB" = xauto && AFB="$XORG" AM_CONDITIONAL(MFB, [test "x$MFB" = xyes]) -AM_CONDITIONAL(AFB, [test "x$AFB" = xyes]) -if test "x$MFB" = xyes -o "x$AFB" = xyes; then +if test "x$MFB" = xyes; then if test "x$XORG" != xyes; then AC_MSG_ERROR([legacy fb support requires the Xorg server]) fi @@ -1992,7 +1989,6 @@ AC_OUTPUT([ Makefile glx/Makefile include/Makefile -afb/Makefile composite/Makefile damageext/Makefile dbe/Makefile diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am index 904507971..bb79c9c61 100644 --- a/hw/xfree86/dixmods/Makefile.am +++ b/hw/xfree86/dixmods/Makefile.am @@ -14,10 +14,6 @@ if DBE DBEMOD = libdbe.la endif -if AFB -AFBMOD = libafb.la -endif - if MFB MFBMOD = libmfb.la endif @@ -26,8 +22,7 @@ if RECORD RECORDMOD = librecord.la endif -module_LTLIBRARIES = $(AFBMOD) \ - libfb.la \ +module_LTLIBRARIES = libfb.la \ libwfb.la \ $(MFBMOD) \ libshadow.la @@ -48,10 +43,6 @@ INCLUDES = @XORG_INCS@ \ -I$(top_srcdir)/miext/shadow \ -I$(top_srcdir)/glx -libafb_la_LDFLAGS = -avoid-version -libafb_la_LIBADD = $(top_builddir)/afb/libafb.la -libafb_la_SOURCES = afbmodule.c - libdbe_la_LDFLAGS = -avoid-version libdbe_la_LIBADD = $(top_builddir)/dbe/libdbe.la libdbe_la_SOURCES = dbemodule.c diff --git a/hw/xfree86/dixmods/afbmodule.c b/hw/xfree86/dixmods/afbmodule.c deleted file mode 100644 index b0aea6ddc..000000000 --- a/hw/xfree86/dixmods/afbmodule.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 1998 The XFree86 Project, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the XFree86 Project shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from the - * XFree86 Project. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf86Module.h" - -static MODULESETUPPROTO(afbSetup); - -static XF86ModuleVersionInfo VersRec = -{ - "afb", - MODULEVENDORSTRING, - MODINFOSTRING1, - MODINFOSTRING2, - XORG_VERSION_CURRENT, - 1, 0, 0, - ABI_CLASS_ANSIC, /* Only need the ansic layer */ - ABI_ANSIC_VERSION, - MOD_CLASS_NONE, - {0,0,0,0} /* signature, to be patched into the file by a tool */ -}; - -_X_EXPORT XF86ModuleData afbModuleData = { &VersRec, afbSetup, NULL }; - -static pointer -afbSetup(pointer module, pointer opts, int *errmaj, int *errmin) -{ - /* This modules requires mfb, so load it */ - return LoadSubModule(module, "mfb", NULL, NULL, NULL, NULL, - errmaj, errmin); -} From 4230b92744d54528f48ddc3b096a265b488053c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 21 May 2008 17:58:15 -0400 Subject: [PATCH 570/634] Clean up remaining afb references. --- .gitignore | 8 -------- Makefile.am | 2 -- hw/xfree86/dixmods/extmod/Makefile.am | 1 - 3 files changed, 11 deletions(-) diff --git a/.gitignore b/.gitignore index 13d5de4fd..d2699dbf1 100644 --- a/.gitignore +++ b/.gitignore @@ -37,14 +37,6 @@ xorg-server.pc stamp-h? do-not-use-config.h do-not-use-config.h.in -afb/afbbltC.c -afb/afbbltCI.c -afb/afbbltG.c -afb/afbbltO.c -afb/afbbltX.c -afb/afbseg.c -afb/afbtileC.c -afb/afbtileG.c cfb/cfb8lineCO.c cfb/cfb8lineCP.c cfb/cfb8lineG.c diff --git a/Makefile.am b/Makefile.am index 7b6b02a1f..4ed30dc89 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,7 +40,6 @@ SUBDIRS = \ xkb \ $(DBE_DIR) \ $(MFB_DIR) \ - $(AFB_DIR) \ $(RECORD_DIR) \ xfixes \ damageext \ @@ -84,7 +83,6 @@ DIST_SUBDIRS = \ xkb \ dbe \ mfb \ - afb \ record \ xfixes \ damageext \ diff --git a/hw/xfree86/dixmods/extmod/Makefile.am b/hw/xfree86/dixmods/extmod/Makefile.am index 77af62da4..fb0849747 100644 --- a/hw/xfree86/dixmods/extmod/Makefile.am +++ b/hw/xfree86/dixmods/extmod/Makefile.am @@ -21,7 +21,6 @@ endif AM_CFLAGS = @DIX_CFLAGS@ @XORG_CFLAGS@ INCLUDES = @XORG_INCS@ \ - -I$(top_srcdir)/afb \ -I$(top_srcdir)/mfb \ -I$(top_srcdir)/dbe \ -I$(top_srcdir)/hw/xfree86/loader \ From ea4ec9e9983e25d94a3edf8a77ed2ad1db193284 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 20 May 2008 13:59:09 +1000 Subject: [PATCH 571/634] int10: add pci_device_enable support on Linux --- configure.ac | 1 + hw/xfree86/os-support/linux/int10/linux.c | 4 ++++ include/xorg-config.h.in | 3 +++ 3 files changed, 8 insertions(+) diff --git a/configure.ac b/configure.ac index 8a1b73f20..9c969fefb 100644 --- a/configure.ac +++ b/configure.ac @@ -1329,6 +1329,7 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then CFLAGS=$PCIACCESS_CFLAGS LIBS=$PCIACCESS_LIBS AC_CHECK_FUNCS([pci_system_init_dev_mem]) + AC_CHECK_FUNCS([pci_device_enable]) LIBS=$SAVE_LIBS CFLAGS=$SAVE_CFLAGS XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $DLOPEN_LIBS $GLX_SYS_LIBS" diff --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c index 574843473..9e2c6199c 100644 --- a/hw/xfree86/os-support/linux/int10/linux.c +++ b/hw/xfree86/os-support/linux/int10/linux.c @@ -278,6 +278,10 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) struct pci_device *rom_device = xf86GetPciInfoForEntity(pInt->entityIndex); +#if HAVE_PCI_DEVICE_ENABLE + pci_device_enable(rom_device); +#endif + err = pci_device_read_rom(rom_device, (unsigned char *)(V_BIOS)); if (err) { xf86DrvMsg(screen,X_ERROR,"Cannot read V_BIOS (%s)\n", diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in index 5587c0a8d..e05d3bfd3 100644 --- a/include/xorg-config.h.in +++ b/include/xorg-config.h.in @@ -118,6 +118,9 @@ /* Have pci_system_init_dev_mem() */ #undef HAVE_PCI_SYSTEM_INIT_DEV_MEM +/* Have pci_enable_device */ +#undef HAVE_PCI_DEVICE_ENABLE + /* Path to text files containing PCI IDs */ #undef PCI_TXT_IDS_PATH From e837244947fbb18192e9056c070ce439ef24d1a3 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Wed, 21 May 2008 16:14:55 -0700 Subject: [PATCH 572/634] Actually enable building GLX without Mesa source --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9c969fefb..3cec454da 100644 --- a/configure.ac +++ b/configure.ac @@ -850,7 +850,7 @@ if test "x$RES" = xyes; then REQUIRED_MODULES="$REQUIRED_MODULES resourceproto" fi -if test "x$GLX" = xyes && ! test "x$MESA_SOURCE" = x; then +if test "x$GLX" = xyes; then PKG_CHECK_MODULES([XLIB], [x11]) PKG_CHECK_MODULES([GL], [glproto >= 1.4.9 gl >= 7.1.0]) AC_SUBST(XLIB_CFLAGS) From 30e9a33f7d1972dcf1c29c7455b2cea4e5857913 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 22 May 2008 16:00:21 +0930 Subject: [PATCH 573/634] xkb: fix crash caused by uninitialised variable. --- xkb/xkbLEDs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c index 2b8efcef2..edc389f04 100644 --- a/xkb/xkbLEDs.c +++ b/xkb/xkbLEDs.c @@ -629,7 +629,7 @@ XkbCopySrvLedInfo( DeviceIntPtr from, KbdFeedbackPtr kf, LedFeedbackPtr lf) { - XkbSrvLedInfoPtr sli_new; + XkbSrvLedInfoPtr sli_new = NULL; if (!src) goto finish; From 74372fd0049676787904f1f9f80f836b97f5f60e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 22 May 2008 18:02:10 +0930 Subject: [PATCH 574/634] xfree86: suspend signals while removing a device. Getting a keyboard event while halfway through freeing memory can be unpleasant. --- hw/xfree86/common/xf86Xinput.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index e53756fc2..996162402 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -475,6 +475,7 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) drv = pInfo->drv; idev = pInfo->conf_idev; } + OsBlockSignals(); RemoveDevice(pDev); if (pDev->isMaster) @@ -484,6 +485,7 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) drv->UnInit(drv, pInfo, 0); else xf86DeleteInput(pInfo, 0); + OsReleaseSignals(); /* devices added through HAL aren't in the config layout */ it = xf86ConfigLayout.inputs; From 0f15875a271889ae3cc4997ad15f787ea28b3a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Vigerl=C3=B6f?= Date: Sat, 17 May 2008 19:24:00 +0200 Subject: [PATCH 575/634] Make all conversion handling in GPE. This isn't quite finished yet, but at least it gives us the ability to use a tablet as a normal mouse - with all the scaling in place. Signed-off-by: Peter Hutterer --- dix/getevents.c | 223 +++++++++++++++++++++++++++++++----------------- 1 file changed, 144 insertions(+), 79 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index 0879434f8..15e7f3b3c 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -155,6 +155,55 @@ CreateClassesChangedEvent(EventList* event, dcce->length = (len - sizeof(xEvent))/4; } +/** + * Rescale the coord between the two axis ranges. + */ +static int +rescaleValuatorAxis(int coord, int fmin, int fmax, + int tmin, int tmax, int smax) +{ + if(fmin >= fmax) { + fmin = 0; + fmax = smax; + } + if(tmin >= tmax) { + tmin = 0; + tmax = smax; + } + if(fmin == tmin && fmax == tmax) + return coord; + + return (int)(((float)(coord - fmin)) * (tmax - tmin + 1) / + (fmax - fmin + 1)) + tmin; +} + +/** + * Update all coordinates when changing to a different SD + * to ensure that relative reporting will work as expected + * without loss of precision. + */ +static void +updateSlaveDeviceCoords(DeviceIntPtr master, DeviceIntPtr pDev) +{ + ScreenPtr scr = miPointerGetScreen(pDev); + + /* lastx/y is in screen coords and the actual position + * of the pointer */ + pDev->lastx = master->lastx; + pDev->lasty = master->lasty; + /* the valuator axis is in device coords and holds the + * position of the pointer, but in device coords. */ + if(pDev->valuator->numAxes > 0) + pDev->valuator->axisVal[0] = rescaleValuatorAxis(pDev->lastx, 0, scr->width, + pDev->valuator->axes[0].min_value, + pDev->valuator->axes[0].max_value, scr->width); + if(pDev->valuator->numAxes > 1) + pDev->valuator->axisVal[1] = rescaleValuatorAxis(pDev->lasty, 0, scr->height, + pDev->valuator->axes[1].min_value, + pDev->valuator->axes[1].max_value, scr->height); + /*TODO calculate the other axis as well based on info from the old slave-device */ +} + /** * Allocate the motion history buffer. */ @@ -395,25 +444,23 @@ clipValuators(DeviceIntPtr pDev, int first_valuator, int num_valuators, * Fills events with valuator events for pDev, as given by the other * parameters. * - * Note that we mis-use the sequence number to store the absolute bit. - * * FIXME: Need to fix ValuatorClassRec to store all the valuators as * last posted, not just x and y; otherwise relative non-x/y * valuators, though a very narrow use case, will be broken. */ static EventList * -getValuatorEvents(EventList *events, DeviceIntPtr pDev, int absolute, +getValuatorEvents(EventList *events, DeviceIntPtr pDev, int first_valuator, int num_valuators, int *valuators) { deviceValuator *xv; - int i = 0, final_valuator = first_valuator + num_valuators; + int i; - for (i = first_valuator; i < final_valuator; i += 6, events++) { + for (i = 0; i < num_valuators; i += 6, events++) { xv = (deviceValuator*)events->event; xv->type = DeviceValuator; - xv->first_valuator = i; - xv->num_valuators = ((final_valuator - i) > 6) ? 6 : (final_valuator - i); + xv->first_valuator = first_valuator + i; + xv->num_valuators = ((num_valuators - i) > 6) ? 6 : (num_valuators - i); xv->deviceid = pDev->id; - switch (final_valuator - i) { + switch (num_valuators - i) { case 6: xv->valuator5 = valuators[i + 5]; case 5: @@ -425,13 +472,11 @@ getValuatorEvents(EventList *events, DeviceIntPtr pDev, int absolute, case 2: xv->valuator1 = valuators[i + 1]; case 1: - xv->valuator0 = valuators[i]; + xv->valuator0 = valuators[i + 0]; } - if (i + 6 < final_valuator) + if (i + 6 < num_valuators) xv->deviceid |= MORE_EVENTS; - - xv->sequenceNumber = (absolute) ? Absolute : Relative; } return events; @@ -576,8 +621,8 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type, if (num_valuators) { kbp->deviceid |= MORE_EVENTS; clipValuators(pDev, first_valuator, num_valuators, valuators); - events = getValuatorEvents(events, pDev, FALSE /* relative */, - first_valuator, num_valuators, valuators); + events = getValuatorEvents(events, pDev, first_valuator, + num_valuators, valuators); } return numEvents; @@ -674,44 +719,28 @@ _X_EXPORT int GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, int flags, int first_valuator, int num_valuators, int *valuators) { - int num_events = 0, final_valuator = 0; + int num_events = 1; CARD32 ms = 0; deviceKeyButtonPointer *kbp = NULL; DeviceIntPtr master; - int x = 0, y = 0; + int x, y, cx, cy; + ScreenPtr scr = miPointerGetScreen(pDev); /* Sanity checks. */ if (type != MotionNotify && type != ButtonPress && type != ButtonRelease) return 0; - - if ((type == ButtonPress || type == ButtonRelease) && !pDev->button) + if (type != MotionNotify && !pDev->button) return 0; - /* FIXME: I guess it should, in theory, be possible to post button events * from devices without valuators. */ - if (!pDev->valuator) + /* This method require at least valuator 0&1 defined on the InputDevice */ + if (!pDev->valuator || pDev->valuator->numAxes < 2) return 0; - if (type == MotionNotify && num_valuators <= 0) return 0; ms = GetTimeInMillis(); - num_events = 1; - - master = pDev->u.master; - if (master && master->u.lastSlave != pDev) - { - CreateClassesChangedEvent(events, master, pDev); - - pDev->lastx = master->lastx; - pDev->lasty = master->lasty; - master->u.lastSlave = pDev; - - num_events++; - events++; - } - /* Do we need to send a DeviceValuator event? */ if (num_valuators) { if ((((num_valuators - 1) / 6) + 1) > MAX_VALUATOR_EVENTS) @@ -719,28 +748,34 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, num_events += ((num_valuators - 1) / 6) + 1; } - final_valuator = num_valuators + first_valuator; - /* You fail. */ - if (first_valuator < 0 || final_valuator > pDev->valuator->numAxes) + if (first_valuator < 0 || + (num_valuators + first_valuator) > pDev->valuator->numAxes) return 0; + master = pDev->u.master; + if (master && master->u.lastSlave != pDev) + { + CreateClassesChangedEvent(events, master, pDev); + updateSlaveDeviceCoords(master, pDev); + master->u.lastSlave = pDev; + num_events++; + events++; + } + /* Set x and y based on whether this is absolute or relative, and * accelerate if we need to. */ + x = pDev->valuator->axisVal[0]; + y = pDev->valuator->axisVal[1]; if (flags & POINTER_ABSOLUTE) { - if (num_valuators >= 1 && first_valuator == 0) { + if (num_valuators >= 1 && first_valuator == 0) x = valuators[0]; - } - else { - x = pDev->lastx; - } - - if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) { + if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) y = valuators[1 - first_valuator]; - } - else { - y = pDev->lasty; - } + + /* Clip both x and y to the defined limits (usually co-ord space limit). */ + clipAxis(pDev, 0, &x); + clipAxis(pDev, 1, &y); } else { if (flags & POINTER_ACCELERATE) @@ -748,34 +783,69 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, valuators); if (first_valuator == 0 && num_valuators >= 1) - x = pDev->lastx + valuators[0]; - else - x = pDev->lastx; - + x += valuators[0]; if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) - y = pDev->lasty + valuators[1 - first_valuator]; - else - y = pDev->lasty; + y += valuators[1 - first_valuator]; + + /* if not core -> clip both x and y to the defined limits (usually + * co-ord space limit). */ + if(!pDev->coreEvents) { + clipAxis(pDev, 0, &x); + clipAxis(pDev, 1, &y); + } } - /* Clip both x and y to the defined limits (usually co-ord space limit). */ - clipAxis(pDev, 0, &x); - clipAxis(pDev, 1, &y); + /* scale x&y to screen */ + pDev->lastx = cx = rescaleValuatorAxis(x, pDev->valuator->axes[0].min_value, + pDev->valuator->axes[0].max_value, + 0, scr->width, scr->width); + pDev->lasty = cy = rescaleValuatorAxis(y, pDev->valuator->axes[1].min_value, + pDev->valuator->axes[1].max_value, + 0, scr->height, scr->height); /* This takes care of crossing screens for us, as well as clipping * to the current screen. Right now, we only have one history buffer, * so we don't set this for both the device and core.*/ - miPointerSetPosition(pDev, &x, &y, ms); + miPointerSetPosition(pDev, &pDev->lastx, &pDev->lasty, ms); + + scr = miPointerGetScreen(pDev); + if(cx != pDev->lastx) + x = rescaleValuatorAxis(pDev->lastx, 0, scr->width, + pDev->valuator->axes[0].min_value, + pDev->valuator->axes[0].max_value, + scr->width); + if(cy != pDev->lasty) + y = rescaleValuatorAxis(pDev->lasty, 0, scr->height, + pDev->valuator->axes[1].min_value, + pDev->valuator->axes[1].max_value, + scr->height); + updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); - pDev->lastx = x; - pDev->lasty = y; - if (master) - { - master->lastx = x; - master->lasty = y; + if (master) { + master->lastx = pDev->lastx; + master->lasty = pDev->lasty; } + /* update the contents of the valuators based on the mode of the InputDevice */ + if(1) { /*TODO Absolute mode */ + /* Update the valuators with the true value sent to the client + * (only absolute mode on the InputDevice) */ + if (first_valuator == 0 && num_valuators >= 1) + pDev->valuator->axisVal[0] = x; + if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) + pDev->valuator->axisVal[1] = y; + } else {/* Relative mode */ + /* If driver reported in absolute, calculate the relative valuator + * values as a delta from the old absolute values of the valuator + * values. If relative report, keep it as-is.*/ + /*TODO*/ + } + /* Save the last calculated device axis value in the device + * valuator for next event */ + pDev->valuator->axisVal[0] = x; + pDev->valuator->axisVal[1] = y; + kbp = (deviceKeyButtonPointer *) events->event; kbp->time = ms; kbp->deviceid = pDev->id; @@ -791,15 +861,15 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, kbp->detail = pDev->button->map[buttons]; } - kbp->root_x = x; - kbp->root_y = y; + kbp->root_x = pDev->lastx; + kbp->root_y = pDev->lasty; events++; if (num_valuators) { kbp->deviceid |= MORE_EVENTS; clipValuators(pDev, first_valuator, num_valuators, valuators); - events = getValuatorEvents(events, pDev, (flags & POINTER_ABSOLUTE), - first_valuator, num_valuators, valuators); + events = getValuatorEvents(events, pDev, first_valuator, + num_valuators, valuators); } return num_events; @@ -824,10 +894,8 @@ GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type, /* Sanity checks. */ if (type != ProximityIn && type != ProximityOut) return 0; - if (!pDev->valuator) return 0; - /* Do we need to send a DeviceValuator event? */ if ((pDev->valuator->mode & 1) == Relative) num_valuators = 0; @@ -847,11 +915,8 @@ GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type, if (master && master->u.lastSlave != pDev) { CreateClassesChangedEvent(events, master, pDev); - - pDev->lastx = master->lastx; - pDev->lasty = master->lasty; + updateSlaveDeviceCoords(master, pDev); master->u.lastSlave = pDev; - num_events++; events++; } @@ -866,8 +931,8 @@ GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type, kbp->deviceid |= MORE_EVENTS; events++; clipValuators(pDev, first_valuator, num_valuators, valuators); - events = getValuatorEvents(events, pDev, False /* relative */, - first_valuator, num_valuators, valuators); + events = getValuatorEvents(events, pDev, first_valuator, + num_valuators, valuators); } return num_events; From e0fbe404a436aef24624a3a15e8405a9ca38aadb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 22 May 2008 23:24:29 +0930 Subject: [PATCH 576/634] mi: handle sprite even for floating slave devices. We still don't render it, but we accept all the other calls to update it's internal state. --- mi/mipointer.c | 49 ++++++++++++------------------------------------- 1 file changed, 12 insertions(+), 37 deletions(-) diff --git a/mi/mipointer.c b/mi/mipointer.c index e49b3df50..28f3b4e2e 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -50,7 +50,7 @@ _X_EXPORT DevPrivateKey miPointerScreenKey = &miPointerScreenKey; static DevPrivateKey miPointerPrivKey = &miPointerPrivKey; #define MIPOINTER(dev) \ - ((DevHasCursor((dev))) ? \ + ((DevHasCursor((dev)) || (!dev->isMaster && !dev->u.master)) ? \ (miPointerPtr)dixLookupPrivate(&(dev)->devPrivates, miPointerPrivKey): \ (miPointerPtr)dixLookupPrivate(&(dev)->u.master->devPrivates, miPointerPrivKey)) @@ -193,9 +193,6 @@ miPointerDisplayCursor (pDev, pScreen, pCursor) { miPointerPtr pPointer; - if (!pDev->isMaster && !pDev->u.master) - return FALSE; - /* return for keyboards */ if ((pDev->isMaster && !DevHasCursor(pDev)) || (!pDev->isMaster && pDev->u.master && !DevHasCursor(pDev->u.master))) @@ -217,9 +214,6 @@ miPointerConstrainCursor (pDev, pScreen, pBox) { miPointerPtr pPointer; - if (!pDev->isMaster && !pDev->u.master) - return; - pPointer = MIPOINTER(pDev); pPointer->limits = *pBox; @@ -313,13 +307,13 @@ miPointerDeviceCleanup(pDev, pScreen) DeviceIntPtr pDev; ScreenPtr pScreen; { - if (DevHasCursor(pDev)) - { - SetupScreen(pScreen); - (*pScreenPriv->spriteFuncs->DeviceCursorCleanup)(pDev, pScreen); - xfree(dixLookupPrivate(&pDev->devPrivates, miPointerPrivKey)); - dixSetPrivate(&pDev->devPrivates, miPointerPrivKey, NULL); - } + if (!pDev->isMaster && pDev->u.master) + return; + + SetupScreen(pScreen); + (*pScreenPriv->spriteFuncs->DeviceCursorCleanup)(pDev, pScreen); + xfree(dixLookupPrivate(&pDev->devPrivates, miPointerPrivKey)); + dixSetPrivate(&pDev->devPrivates, miPointerPrivKey, NULL); } @@ -334,8 +328,6 @@ miPointerWarpCursor (pDev, pScreen, x, y) miPointerPtr pPointer; BOOL changedScreen = FALSE; - if (!pDev->isMaster && !pDev->u.master) - return; pPointer = MIPOINTER(pDev); SetupScreen (pScreen); @@ -388,7 +380,7 @@ miPointerUpdateSprite (DeviceIntPtr pDev) int x, y, devx, devy; miPointerPtr pPointer; - if (!pDev || !pDev->coreEvents || (!pDev->isMaster && !pDev->u.master)) + if (!pDev || !pDev->coreEvents) return; pPointer = MIPOINTER(pDev); @@ -477,10 +469,7 @@ miPointerSetScreen(DeviceIntPtr pDev, int screen_no, int x, int y) { miPointerScreenPtr pScreenPriv; ScreenPtr pScreen; - miPointerPtr pPointer; - - if (!pDev->isMaster && !pDev->u.master) - return; + miPointerPtr pPointer; pPointer = MIPOINTER(pDev); @@ -502,10 +491,8 @@ miPointerCurrentScreen () _X_EXPORT ScreenPtr miPointerGetScreen(DeviceIntPtr pDev) { - if (!pDev || (!pDev->isMaster && !pDev->u.master)) - return NULL; - - return MIPOINTER(pDev)->pScreen; + miPointerPtr pPointer = MIPOINTER(pDev); + return (pPointer) ? pPointer->pScreen : NULL; } /* Move the pointer to x, y on the current screen, update the sprite, and @@ -525,9 +512,6 @@ miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, miPointerPtr pPointer; SetupScreen(pScreen); - if (!pDev->isMaster && !pDev->u.master) - return; - pPointer = MIPOINTER(pDev); /* Hack: We mustn't call into ->MoveCursor for anything but the @@ -556,9 +540,6 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y, unsigned long time) ScreenPtr newScreen; miPointerPtr pPointer; - - if (!pDev->isMaster && !pDev->u.master) - return; pPointer = MIPOINTER(pDev); pScreen = pPointer->pScreen; @@ -613,12 +594,6 @@ miPointerPosition (int *x, int *y) _X_EXPORT void miPointerGetPosition(DeviceIntPtr pDev, int *x, int *y) { - if (!pDev->isMaster && !pDev->u.master) - { - ErrorF("[mi] miPointerGetPosition called for floating device.\n"); - return; - } - *x = MIPOINTER(pDev)->x; *y = MIPOINTER(pDev)->y; } From 1a3f351c50cba66f71a73239318174b09fd9b63b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 22 May 2008 23:25:20 +0930 Subject: [PATCH 577/634] dix: when floating a device, create a new cursor sprite. This is essentially necessary to allow calls to miPointerGetSprite etc. to work for floating slave devices. --- dix/devices.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dix/devices.c b/dix/devices.c index 5606543f7..1b71a42be 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2415,6 +2415,7 @@ PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd) int AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) { + ScreenPtr screen; DeviceIntPtr oldmaster; if (!dev || dev->isMaster) return BadDevice; @@ -2428,7 +2429,11 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) /* free the existing sprite. */ if (!dev->u.master && dev->spriteInfo->paired == dev) + { + screen = miPointerGetScreen(dev); + screen->DeviceCursorCleanup(dev, screen); xfree(dev->spriteInfo->sprite); + } oldmaster = dev->u.master; dev->u.master = master; @@ -2442,10 +2447,14 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) if (!master) { WindowPtr currentRoot = dev->spriteInfo->sprite->spriteTrace[0]; + /* we need to init a fake sprite */ + screen = currentRoot->drawable.pScreen; + screen->DeviceCursorInitialize(dev, screen); dev->spriteInfo->sprite = NULL; InitializeSprite(dev, currentRoot); dev->spriteInfo->spriteOwner = FALSE; dev->spriteInfo->paired = dev; + } else { dev->spriteInfo->sprite = master->spriteInfo->sprite; From 7f85acdf70c67c567de688439e25081be5a7d5df Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 22 May 2008 23:27:15 +0930 Subject: [PATCH 578/634] dix: fill valuators with the correct values depending on the device mode (GPE) valuators[] is passed from the DDX. Depending on the device mode, update it with either absolute values or relative values. The deviceValuator event sent to the client will then contain the respective values. --- dix/getevents.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index 15e7f3b3c..fafb632b8 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -827,19 +827,23 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, master->lasty = pDev->lasty; } - /* update the contents of the valuators based on the mode of the InputDevice */ - if(1) { /*TODO Absolute mode */ - /* Update the valuators with the true value sent to the client - * (only absolute mode on the InputDevice) */ + /* update the valuators based on the mode of the InputDevice */ + if(pDev->valuator->mode == Absolute) { + /* Update the valuators with the true value sent to the client*/ if (first_valuator == 0 && num_valuators >= 1) - pDev->valuator->axisVal[0] = x; + valuators[0] = x; if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) - pDev->valuator->axisVal[1] = y; + valuators[1] = y; } else {/* Relative mode */ /* If driver reported in absolute, calculate the relative valuator * values as a delta from the old absolute values of the valuator * values. If relative report, keep it as-is.*/ - /*TODO*/ + if (flags & POINTER_ABSOLUTE) { + int i; + for (i = first_valuator; i < num_valuators; i++) + valuators[i] = valuators[i] - pDev->valuator->axisVal[i]; + + } } /* Save the last calculated device axis value in the device * valuator for next event */ From f6645ddbf754c80e9a8b1672519534a887622270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Vigerl=C3=B6f?= Date: Thu, 22 May 2008 23:33:45 +0200 Subject: [PATCH 579/634] dix: Correct values in the device axisVal are calculated in GPE Signed-off-by: Peter Hutterer --- Xi/exevents.c | 103 +------------------------------------------------- 1 file changed, 2 insertions(+), 101 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 42b77c137..da6cf8dee 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -818,107 +818,8 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) bit = 1 << (key & 7); } - /* Update device axis */ - for (i = 1; i < count; i++) { - if ((++xV)->type == DeviceValuator) { - int *axisvals; - int first = xV->first_valuator; - BOOL change = FALSE; - - if (xV->num_valuators && - (!v || (xV->num_valuators && - (first + xV->num_valuators > v->numAxes)))) - FatalError("Bad valuators reported for device %s\n", - device->name); - if (v && v->axisVal) { - /* The device always stores values in absolute. Only the - * delivery mode changes. - * If device is mode Absolute, and event is Relative - * dev += event - * event = dev - * If device is mode Absolute, and event is Absolute - * dev = event - * If device is mode Relative, and event is Absolute - * swap = (event - device) - * dev = event - * event = delta - * If device is mode Relative, and event is Relative - * dev += event - * - * XXX: axis clipping for relative events? - */ - axisvals = v->axisVal; - if (xV->sequenceNumber & Absolute) { - int delta; - if (v->mode == Relative) /* device reports relative */ - { - change = TRUE; - xV->sequenceNumber &= ~Absolute; - } - - switch (xV->num_valuators) { - case 6: - if (change) delta = xV->valuator5 - *(axisvals + first + 5); - *(axisvals + first + 5) = xV->valuator5; - if (change) xV->valuator5 = delta; - case 5: - if (change) delta = xV->valuator4 - *(axisvals + first + 4); - *(axisvals + first + 4) = xV->valuator4; - if (change) xV->valuator4 = delta; - case 4: - if (change) delta = xV->valuator3 - *(axisvals + first + 3); - *(axisvals + first + 3) = xV->valuator3; - if (change) xV->valuator3 = delta; - case 3: - if (change) delta = xV->valuator2 - *(axisvals + first + 2); - *(axisvals + first + 2) = xV->valuator2; - if (change) xV->valuator2 = delta; - case 2: - if (change) delta = xV->valuator1 - *(axisvals + first + 1); - *(axisvals + first + 1) = xV->valuator1; - if (change) xV->valuator1 = delta; - case 1: - if (change) delta = xV->valuator0 - *(axisvals + first); - *(axisvals + first) = xV->valuator0; - if (change) xV->valuator0 = delta; - case 0: - default: - break; - } - } else { /* event is relative */ - if (v->mode == Absolute) /* device reports absolute */ - { - change = TRUE; - xV->sequenceNumber |= Absolute; - } - - switch (xV->num_valuators) { - case 6: - *(axisvals + first + 5) += xV->valuator5; - if (change) xV->valuator5 = *(axisvals + first + 5); - case 5: - *(axisvals + first + 4) += xV->valuator4; - if (change) xV->valuator4 = *(axisvals + first + 4); - case 4: - *(axisvals + first + 3) += xV->valuator3; - if (change) xV->valuator3 = *(axisvals + first + 3); - case 3: - *(axisvals + first + 2) += xV->valuator2; - if (change) xV->valuator2 = *(axisvals + first + 2); - case 2: - *(axisvals + first + 1) += xV->valuator1; - if (change) xV->valuator1 = *(axisvals + first + 1); - case 1: - *(axisvals + first) += xV->valuator0; - if (change) xV->valuator0 = *(axisvals + first); - case 0: - default: - break; - } - } - } - } - } + /* Device axis are calculated in GetPointerEvents and need + * no more processing */ if (xE->u.u.type == DeviceKeyPress) { if (!k) From a0241d5380bb5d8b10865f8ea81a9a011de4aaf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Vigerl=C3=B6f?= Date: Fri, 23 May 2008 00:36:11 +0200 Subject: [PATCH 580/634] dix: Correct clipAxis so it can handle devices with value ranges properly Signed-off-by: Peter Hutterer --- dix/getevents.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index fafb632b8..26add1280 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -406,22 +406,15 @@ static void clipAxis(DeviceIntPtr pDev, int axisNum, int *val) { AxisInfoPtr axis = pDev->valuator->axes + axisNum; - /* InitValuatoraAxisStruct ensures that (min < max). */ - - /* FIXME: drivers need to be updated, evdev e.g. inits axes as min = 0 and - * max = -1. Leave this extra check until the drivers have been updated. - */ - if (axis->max_value < axis->min_value) + /* If a value range is defined, clip. If not, do nothing */ + if (axis->max_value <= axis->min_value) return; - if (axis->min_value != NO_AXIS_LIMITS && - *val < axis->min_value) + if (*val < axis->min_value) *val = axis->min_value; - - if (axis->max_value != NO_AXIS_LIMITS && - *val > axis->max_value) + if (*val > axis->max_value) *val = axis->max_value; } From fc1cc0adcb91fdfa4c547bf379a85f9558c959ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Vigerl=C3=B6f?= Date: Fri, 23 May 2008 00:33:18 +0200 Subject: [PATCH 581/634] dix: Cleanup of GetPointerEvents Changed all the checks for x&y valuator so the more complex calculation is only made once. Added TODOs for valuator/axis 2 and above for future correct handling of relative reporting of these. Signed-off-by: Peter Hutterer --- dix/getevents.c | 93 +++++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 45 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index 26add1280..0caa76409 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -159,20 +159,22 @@ CreateClassesChangedEvent(EventList* event, * Rescale the coord between the two axis ranges. */ static int -rescaleValuatorAxis(int coord, int fmin, int fmax, - int tmin, int tmax, int smax) +rescaleValuatorAxis(int coord, AxisInfoPtr from, AxisInfoPtr to, + int defmax) { - if(fmin >= fmax) { - fmin = 0; - fmax = smax; + int fmin = 0, tmin = 0, fmax = defmax, tmax = defmax; + + if(from && from->min_value < from->max_value) { + fmin = from->min_value; + fmax = from->max_value; } - if(tmin >= tmax) { - tmin = 0; - tmax = smax; + if(to && to->min_value < to->max_value) { + tmin = to->min_value; + tmax = to->max_value; } + if(fmin == tmin && fmax == tmax) return coord; - return (int)(((float)(coord - fmin)) * (tmax - tmin + 1) / (fmax - fmin + 1)) + tmin; } @@ -194,13 +196,11 @@ updateSlaveDeviceCoords(DeviceIntPtr master, DeviceIntPtr pDev) /* the valuator axis is in device coords and holds the * position of the pointer, but in device coords. */ if(pDev->valuator->numAxes > 0) - pDev->valuator->axisVal[0] = rescaleValuatorAxis(pDev->lastx, 0, scr->width, - pDev->valuator->axes[0].min_value, - pDev->valuator->axes[0].max_value, scr->width); + pDev->valuator->axisVal[0] = rescaleValuatorAxis(pDev->lastx, NULL, + pDev->valuator->axes + 0, scr->width); if(pDev->valuator->numAxes > 1) - pDev->valuator->axisVal[1] = rescaleValuatorAxis(pDev->lasty, 0, scr->height, - pDev->valuator->axes[1].min_value, - pDev->valuator->axes[1].max_value, scr->height); + pDev->valuator->axisVal[1] = rescaleValuatorAxis(pDev->lasty, NULL, + pDev->valuator->axes + 1, scr->height); /*TODO calculate the other axis as well based on info from the old slave-device */ } @@ -707,17 +707,22 @@ FreeEventList(EventListPtr list, int num_events) * The DDX is responsible for allocating the event structure in the first * place via InitEventList() and GetMaximumEventsNum(), and for freeing it. * + * In the generated events rootX/Y will be in absolute screen coords and + * the valuator information in the absolute or relative device coords. + * lastx/y of the device is always in absolute screen coords while the + * device valuator struct contain the absolute device coords. */ _X_EXPORT int GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, int flags, int first_valuator, int num_valuators, int *valuators) { int num_events = 1; - CARD32 ms = 0; + CARD32 ms; deviceKeyButtonPointer *kbp = NULL; DeviceIntPtr master; int x, y, cx, cy; ScreenPtr scr = miPointerGetScreen(pDev); + int *v0 = NULL, *v1 = NULL; /* Sanity checks. */ if (type != MotionNotify && type != ButtonPress && type != ButtonRelease) @@ -756,29 +761,34 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, events++; } + /* Fetch pointers into the valuator array for more easy to read code */ + if (num_valuators >= 1 && first_valuator == 0) + v0 = valuators + 0; + if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) + v1 = valuators + 1 - first_valuator; + /* Set x and y based on whether this is absolute or relative, and * accelerate if we need to. */ x = pDev->valuator->axisVal[0]; y = pDev->valuator->axisVal[1]; if (flags & POINTER_ABSOLUTE) { - if (num_valuators >= 1 && first_valuator == 0) - x = valuators[0]; - if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) - y = valuators[1 - first_valuator]; + if(v0) x = *v0; + if(v1) y = *v1; + /*TODO: Update the rest of the valuators */ /* Clip both x and y to the defined limits (usually co-ord space limit). */ clipAxis(pDev, 0, &x); clipAxis(pDev, 1, &y); + /*TODO: Clip the rest of the valuators */ } else { if (flags & POINTER_ACCELERATE) acceleratePointer(pDev, first_valuator, num_valuators, valuators); - if (first_valuator == 0 && num_valuators >= 1) - x += valuators[0]; - if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) - y += valuators[1 - first_valuator]; + if(v0) x += *v0; + if(v1) y += *v1; + /*TODO: Update the rest of the valuators */ /* if not core -> clip both x and y to the defined limits (usually * co-ord space limit). */ @@ -786,15 +796,14 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, clipAxis(pDev, 0, &x); clipAxis(pDev, 1, &y); } + /*TODO: Clip the rest of the valuators (Yes, here. Only x&y get special treatment) */ } /* scale x&y to screen */ - pDev->lastx = cx = rescaleValuatorAxis(x, pDev->valuator->axes[0].min_value, - pDev->valuator->axes[0].max_value, - 0, scr->width, scr->width); - pDev->lasty = cy = rescaleValuatorAxis(y, pDev->valuator->axes[1].min_value, - pDev->valuator->axes[1].max_value, - 0, scr->height, scr->height); + pDev->lastx = cx = rescaleValuatorAxis(x, pDev->valuator->axes + 0, + NULL, scr->width); + pDev->lasty = cy = rescaleValuatorAxis(y, pDev->valuator->axes + 1, + NULL, scr->height); /* This takes care of crossing screens for us, as well as clipping * to the current screen. Right now, we only have one history buffer, @@ -803,15 +812,11 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, scr = miPointerGetScreen(pDev); if(cx != pDev->lastx) - x = rescaleValuatorAxis(pDev->lastx, 0, scr->width, - pDev->valuator->axes[0].min_value, - pDev->valuator->axes[0].max_value, - scr->width); + x = rescaleValuatorAxis(pDev->lastx, NULL, + pDev->valuator->axes + 0, scr->width); if(cy != pDev->lasty) - y = rescaleValuatorAxis(pDev->lasty, 0, scr->height, - pDev->valuator->axes[1].min_value, - pDev->valuator->axes[1].max_value, - scr->height); + y = rescaleValuatorAxis(pDev->lasty, NULL, + pDev->valuator->axes + 1, scr->height); updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); @@ -823,19 +828,17 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, /* update the valuators based on the mode of the InputDevice */ if(pDev->valuator->mode == Absolute) { /* Update the valuators with the true value sent to the client*/ - if (first_valuator == 0 && num_valuators >= 1) - valuators[0] = x; - if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) - valuators[1] = y; + if(v0) *v0 = x; + if(v1) *v1 = y; + /*TODO Ensure that valuator 2 and onward also are absolute */ } else {/* Relative mode */ /* If driver reported in absolute, calculate the relative valuator * values as a delta from the old absolute values of the valuator * values. If relative report, keep it as-is.*/ if (flags & POINTER_ABSOLUTE) { int i; - for (i = first_valuator; i < num_valuators; i++) - valuators[i] = valuators[i] - pDev->valuator->axisVal[i]; - + for (i = 0; i < num_valuators; i++) + valuators[i] = valuators[i] - pDev->valuator->axisVal[i + first_valuator]; } } /* Save the last calculated device axis value in the device From fb146cbb0f28e4e480e5d16d61476ac46b5d00ce Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 23 May 2008 12:00:13 +0930 Subject: [PATCH 582/634] dix: coreEvents doesn't have meaning here, use master instead. We mustn't clip x/y if we are attached, otherwise we can't change screens. --- dix/getevents.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index 0caa76409..fea5285b1 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -790,9 +790,10 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, if(v1) y += *v1; /*TODO: Update the rest of the valuators */ - /* if not core -> clip both x and y to the defined limits (usually - * co-ord space limit). */ - if(!pDev->coreEvents) { + /* if attached, clip both x and y to the defined limits (usually + * co-ord space limit). If it is attached, we need x/y to go over the + * limits to be able to change screens. */ + if(master) { clipAxis(pDev, 0, &x); clipAxis(pDev, 1, &y); } From 6c9e9f8a40e20fb1761440acd2755f5fd31f4d44 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 23 May 2008 11:51:53 +0930 Subject: [PATCH 583/634] input: instead of lastx/y, use a last.valuators[] array on the device. During GetPointerEvents (and others), we need to access the last coordinates posted for this device from the driver (not as posted to the client!). Lastx/y is ok if we only have two axes, but with more complex devices we also need to transition between all other axes. ABI break, recompile your input drivers. --- Xext/xtest.c | 8 +++---- Xi/warpdevp.c | 4 ++-- dix/devices.c | 10 ++++++-- dix/getevents.c | 43 +++++++++++++++++----------------- hw/xfree86/common/xf86Xinput.c | 10 ++++---- include/input.h | 2 ++ include/inputstr.h | 9 +++++-- 7 files changed, 49 insertions(+), 37 deletions(-) diff --git a/Xext/xtest.c b/Xext/xtest.c index a42faa791..58e20ef81 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -470,16 +470,16 @@ ProcXTestFakeInput(client) ev->u.keyButtonPointer.rootX, ev->u.keyButtonPointer.rootY, FALSE); } - dev->lastx = ev->u.keyButtonPointer.rootX; - dev->lasty = ev->u.keyButtonPointer.rootY; + dev->last.valuators[0] = ev->u.keyButtonPointer.rootX; + dev->last.valuators[1] = ev->u.keyButtonPointer.rootY; break; case ButtonPress: case ButtonRelease: if (!extension) dev = PickPointer(client); - ev->u.keyButtonPointer.rootX = dev->lastx; - ev->u.keyButtonPointer.rootY = dev->lasty; + ev->u.keyButtonPointer.rootX = dev->last.valuators[0]; + ev->u.keyButtonPointer.rootY = dev->last.valuators[1]; if (!ev->u.u.detail || ev->u.u.detail > dev->button->numButtons) { client->errorValue = ev->u.u.detail; diff --git a/Xi/warpdevp.c b/Xi/warpdevp.c index 3720441d9..502cab402 100644 --- a/Xi/warpdevp.c +++ b/Xi/warpdevp.c @@ -166,8 +166,8 @@ ProcXWarpDevicePointer(ClientPtr client) } /* if we don't update the device, we get a jump next time it moves */ - pDev->lastx = x; - pDev->lasty = x; + pDev->last.valuators[0] = x; + pDev->last.valuators[1] = x; miPointerUpdateSprite(pDev); /* FIXME: XWarpPointer is supposed to generate an event. It doesn't do it diff --git a/dix/devices.c b/dix/devices.c index 1b71a42be..252118690 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -168,6 +168,10 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) dev->spriteInfo->sprite = NULL; dev->spriteInfo->spriteOwner = FALSE; + /* last valuators */ + memset(dev->last.valuators, 0, sizeof(dev->last.valuators)); + dev->last.numValuators = 0; + /* security creation/labeling check */ if (XaceHook(XACE_DEVICE_ACCESS, client, dev, DixCreateAccess)) { @@ -491,9 +495,9 @@ CorePointerProc(DeviceIntPtr pDev, int what) GetMotionHistory, (PtrCtrlProcPtr)NoopDDA, GetMotionHistorySize(), 2); pDev->valuator->axisVal[0] = screenInfo.screens[0]->width / 2; - pDev->lastx = pDev->valuator->axisVal[0]; + pDev->last.valuators[0] = pDev->valuator->axisVal[0]; pDev->valuator->axisVal[1] = screenInfo.screens[0]->height / 2; - pDev->lasty = pDev->valuator->axisVal[1]; + pDev->last.valuators[1] = pDev->valuator->axisVal[1]; break; case DEVICE_CLOSE: @@ -1192,6 +1196,8 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, 0, 0, 0); valc->axisVal[i]=0; } + + dev->last.numValuators = numAxes; return TRUE; } diff --git a/dix/getevents.c b/dix/getevents.c index fea5285b1..300dae5be 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -189,17 +189,17 @@ updateSlaveDeviceCoords(DeviceIntPtr master, DeviceIntPtr pDev) { ScreenPtr scr = miPointerGetScreen(pDev); - /* lastx/y is in screen coords and the actual position + /* last.valuators[0]/[1] is in screen coords and the actual position * of the pointer */ - pDev->lastx = master->lastx; - pDev->lasty = master->lasty; + pDev->last.valuators[0] = master->last.valuators[0]; + pDev->last.valuators[1] = master->last.valuators[1]; /* the valuator axis is in device coords and holds the * position of the pointer, but in device coords. */ if(pDev->valuator->numAxes > 0) - pDev->valuator->axisVal[0] = rescaleValuatorAxis(pDev->lastx, NULL, + pDev->valuator->axisVal[0] = rescaleValuatorAxis(pDev->last.valuators[0], NULL, pDev->valuator->axes + 0, scr->width); if(pDev->valuator->numAxes > 1) - pDev->valuator->axisVal[1] = rescaleValuatorAxis(pDev->lasty, NULL, + pDev->valuator->axisVal[1] = rescaleValuatorAxis(pDev->last.valuators[1], NULL, pDev->valuator->axes + 1, scr->height); /*TODO calculate the other axis as well based on info from the old slave-device */ } @@ -542,8 +542,8 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type, if (master->valuator && pDev->valuator) { - pDev->lastx = master->lastx; - pDev->lasty = master->lasty; + pDev->last.valuators[0] = master->last.valuators[0]; + pDev->last.valuators[1] = master->last.valuators[1]; } master->u.lastSlave = pDev; numEvents++; @@ -709,8 +709,8 @@ FreeEventList(EventListPtr list, int num_events) * * In the generated events rootX/Y will be in absolute screen coords and * the valuator information in the absolute or relative device coords. - * lastx/y of the device is always in absolute screen coords while the - * device valuator struct contain the absolute device coords. + * last.valuators[0]/[1] of the device is always in absolute screen coords + * while the device valuator struct contain the absolute device coords. */ _X_EXPORT int GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, @@ -801,29 +801,29 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, } /* scale x&y to screen */ - pDev->lastx = cx = rescaleValuatorAxis(x, pDev->valuator->axes + 0, + pDev->last.valuators[0] = cx = rescaleValuatorAxis(x, pDev->valuator->axes + 0, NULL, scr->width); - pDev->lasty = cy = rescaleValuatorAxis(y, pDev->valuator->axes + 1, + pDev->last.valuators[1] = cy = rescaleValuatorAxis(y, pDev->valuator->axes + 1, NULL, scr->height); /* This takes care of crossing screens for us, as well as clipping * to the current screen. Right now, we only have one history buffer, * so we don't set this for both the device and core.*/ - miPointerSetPosition(pDev, &pDev->lastx, &pDev->lasty, ms); + miPointerSetPosition(pDev, &pDev->last.valuators[0], &pDev->last.valuators[1], ms); scr = miPointerGetScreen(pDev); - if(cx != pDev->lastx) - x = rescaleValuatorAxis(pDev->lastx, NULL, + if(cx != pDev->last.valuators[0]) + x = rescaleValuatorAxis(pDev->last.valuators[0], NULL, pDev->valuator->axes + 0, scr->width); - if(cy != pDev->lasty) - y = rescaleValuatorAxis(pDev->lasty, NULL, + if(cy != pDev->last.valuators[1]) + y = rescaleValuatorAxis(pDev->last.valuators[1], NULL, pDev->valuator->axes + 1, scr->height); updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); if (master) { - master->lastx = pDev->lastx; - master->lasty = pDev->lasty; + master->last.valuators[0] = pDev->last.valuators[0]; + master->last.valuators[1] = pDev->last.valuators[1]; } /* update the valuators based on the mode of the InputDevice */ @@ -862,13 +862,14 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, kbp->detail = pDev->button->map[buttons]; } - kbp->root_x = pDev->lastx; - kbp->root_y = pDev->lasty; + kbp->root_x = pDev->last.valuators[0]; + kbp->root_y = pDev->last.valuators[1]; events++; if (num_valuators) { kbp->deviceid |= MORE_EVENTS; - clipValuators(pDev, first_valuator, num_valuators, valuators); + if (flags & POINTER_ABSOLUTE) + clipValuators(pDev, first_valuator, num_valuators, valuators); events = getValuatorEvents(events, pDev, first_valuator, num_valuators, valuators); } diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 996162402..2ae463013 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -505,8 +505,6 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) * convenient functions to post events */ -#define MAX_VALUATORS 36 /* XXX from comment in dix/getevents.c */ - _X_EXPORT void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute, @@ -566,14 +564,14 @@ xf86PostMotionEventP(DeviceIntPtr device, { dx = valuators[0]; if (is_absolute) - dx -= device->lastx; + dx -= device->last.valuators[0]; } if (first_valuator == 1 || num_valuators >= 2) { dy = valuators[1 - first_valuator]; if (is_absolute) - dy -= device->lasty; + dy -= device->last.valuators[1]; } if (DGAStealMotionEvent(device, index, dx, dy)) @@ -833,11 +831,11 @@ xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum) { if (axnum == 0) { dev->valuator->axisVal[0] = screenInfo.screens[0]->width / 2; - dev->lastx = dev->valuator->axisVal[0]; + dev->last.valuators[0] = dev->valuator->axisVal[0]; } else if (axnum == 1) { dev->valuator->axisVal[1] = screenInfo.screens[0]->height / 2; - dev->lasty = dev->valuator->axisVal[1]; + dev->last.valuators[1] = dev->valuator->axisVal[1]; } } diff --git a/include/input.h b/include/input.h index 13902d77e..9b92ea33d 100644 --- a/include/input.h +++ b/include/input.h @@ -63,6 +63,8 @@ SOFTWARE. #define POINTER_ABSOLUTE (1 << 2) #define POINTER_ACCELERATE (1 << 3) +#define MAX_VALUATORS 36 /* XXX from comment in dix/getevents.c */ + #define NO_AXIS_LIMITS -1 #define MAP_LENGTH 256 diff --git a/include/inputstr.h b/include/inputstr.h index d117e554d..d1cc44801 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -420,8 +420,13 @@ typedef struct _DeviceIntRec { DeviceIntPtr master; /* master device */ DeviceIntPtr lastSlave; /* last slave device used */ } u; - int lastx, lasty; /* last event recorded, not posted to - * client; see dix/devices.c */ + + /* last valuator values recorded, not posted to client; + * see dix/getevents.c */ + struct { + int valuators[MAX_VALUATORS]; + int numValuators; + } last; } DeviceIntRec; typedef struct { From fe59b1a62b2c7f467d20132db4913317bbf308eb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 23 May 2008 12:51:52 +0930 Subject: [PATCH 584/634] dix: more device scaling insanity. Assuming master->last.valuators is in screen coords, SD's are always in device coordinates. 1. If an event comes in, scale masters->last to the device, drop into device's last->valuators. 2. Apply motion from the actual event 3. Scale back to screen coords, check if we may need to cross screens 4. Drop screen coords into master->last 5. Rescale to device coords, drop into deviceValuator event and SD->last 6. Drop screen coords into ev->root_x/y Whoopee... --- dix/getevents.c | 70 ++++++++++++++++++++++++++-------------------- include/inputstr.h | 2 ++ 2 files changed, 41 insertions(+), 31 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index 300dae5be..48aa0e8b5 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -183,24 +183,25 @@ rescaleValuatorAxis(int coord, AxisInfoPtr from, AxisInfoPtr to, * Update all coordinates when changing to a different SD * to ensure that relative reporting will work as expected * without loss of precision. + * + * pDev->last.valuators will be in absolute device coordinates after this + * function. */ static void updateSlaveDeviceCoords(DeviceIntPtr master, DeviceIntPtr pDev) { ScreenPtr scr = miPointerGetScreen(pDev); - /* last.valuators[0]/[1] is in screen coords and the actual position - * of the pointer */ + /* master->last.valuators[0]/[1] is in screen coords and the actual + * position of the pointer */ pDev->last.valuators[0] = master->last.valuators[0]; pDev->last.valuators[1] = master->last.valuators[1]; - /* the valuator axis is in device coords and holds the - * position of the pointer, but in device coords. */ + + /* scale back to device coordinates */ if(pDev->valuator->numAxes > 0) - pDev->valuator->axisVal[0] = rescaleValuatorAxis(pDev->last.valuators[0], NULL, - pDev->valuator->axes + 0, scr->width); + pDev->last.valuators[0] = rescaleValuatorAxis(pDev->last.valuators[0], NULL, pDev->valuator->axes + 0, scr->width); if(pDev->valuator->numAxes > 1) - pDev->valuator->axisVal[1] = rescaleValuatorAxis(pDev->last.valuators[1], NULL, - pDev->valuator->axes + 1, scr->height); + pDev->last.valuators[1] = rescaleValuatorAxis(pDev->last.valuators[1], NULL, pDev->valuator->axes + 1, scr->height); /*TODO calculate the other axis as well based on info from the old slave-device */ } @@ -709,8 +710,9 @@ FreeEventList(EventListPtr list, int num_events) * * In the generated events rootX/Y will be in absolute screen coords and * the valuator information in the absolute or relative device coords. - * last.valuators[0]/[1] of the device is always in absolute screen coords - * while the device valuator struct contain the absolute device coords. + * + * last.valuators[x] of the device is always in absolute device coords. + * last.valuators[x] of the master device is in absolute screen coords. */ _X_EXPORT int GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, @@ -720,7 +722,8 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, CARD32 ms; deviceKeyButtonPointer *kbp = NULL; DeviceIntPtr master; - int x, y, cx, cy; + int x, y, /* switches between device and screen coords */ + cx, cy; /* only screen coordinates */ ScreenPtr scr = miPointerGetScreen(pDev); int *v0 = NULL, *v1 = NULL; @@ -769,8 +772,8 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, /* Set x and y based on whether this is absolute or relative, and * accelerate if we need to. */ - x = pDev->valuator->axisVal[0]; - y = pDev->valuator->axisVal[1]; + x = pDev->last.valuators[0]; + y = pDev->last.valuators[1]; if (flags & POINTER_ABSOLUTE) { if(v0) x = *v0; if(v1) y = *v1; @@ -811,21 +814,26 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, * so we don't set this for both the device and core.*/ miPointerSetPosition(pDev, &pDev->last.valuators[0], &pDev->last.valuators[1], ms); - scr = miPointerGetScreen(pDev); - if(cx != pDev->last.valuators[0]) - x = rescaleValuatorAxis(pDev->last.valuators[0], NULL, - pDev->valuator->axes + 0, scr->width); - if(cy != pDev->last.valuators[1]) - y = rescaleValuatorAxis(pDev->last.valuators[1], NULL, - pDev->valuator->axes + 1, scr->height); - - updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); - if (master) { master->last.valuators[0] = pDev->last.valuators[0]; master->last.valuators[1] = pDev->last.valuators[1]; } + if(cx != pDev->last.valuators[0]) + cx = pDev->last.valuators[0]; + if(cy != pDev->last.valuators[1]) + cy = pDev->last.valuators[1]; + + /* scale x/y back to device coordinates */ + scr = miPointerGetScreen(pDev); + x = rescaleValuatorAxis(pDev->last.valuators[0], NULL, + pDev->valuator->axes + 0, scr->width); + y = rescaleValuatorAxis(pDev->last.valuators[1], NULL, + pDev->valuator->axes + 1, scr->height); + + updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); + + /* update the valuators based on the mode of the InputDevice */ if(pDev->valuator->mode == Absolute) { /* Update the valuators with the true value sent to the client*/ @@ -838,14 +846,14 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, * values. If relative report, keep it as-is.*/ if (flags & POINTER_ABSOLUTE) { int i; - for (i = 0; i < num_valuators; i++) - valuators[i] = valuators[i] - pDev->valuator->axisVal[i + first_valuator]; + for (i = 0; i < num_valuators && i < pDev->last.numValuators; i++) + valuators[i] = valuators[i] - pDev->last.valuators[i + first_valuator]; } } - /* Save the last calculated device axis value in the device - * valuator for next event */ - pDev->valuator->axisVal[0] = x; - pDev->valuator->axisVal[1] = y; + + /* dropy x/y (device coordinates) back into valuators for next event */ + pDev->last.valuators[0] = x; + pDev->last.valuators[1] = y; kbp = (deviceKeyButtonPointer *) events->event; kbp->time = ms; @@ -862,8 +870,8 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, kbp->detail = pDev->button->map[buttons]; } - kbp->root_x = pDev->last.valuators[0]; - kbp->root_y = pDev->last.valuators[1]; + kbp->root_x = cx; /* root_x/y always in screen coords */ + kbp->root_y = cy; events++; if (num_valuators) { diff --git a/include/inputstr.h b/include/inputstr.h index d1cc44801..d26eb1377 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -422,6 +422,8 @@ typedef struct _DeviceIntRec { } u; /* last valuator values recorded, not posted to client; + * for slave devices, valuators is in device coordinates + * for master devices, valuators is in screen coordinates * see dix/getevents.c */ struct { int valuators[MAX_VALUATORS]; From 75551a2ef949c2cfb53fdc4b97f3964a5e2f45f5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 23 May 2008 12:55:50 +0930 Subject: [PATCH 585/634] Revert "dix: Correct values in the device axisVal are calculated in GPE" We can't rely on GPE to update device->valuators->axisVal. If a SIGIO occurs during event processing this may have incoherent results. This reverts commit f6645ddbf754c80e9a8b1672519534a887622270. --- Xi/exevents.c | 103 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 101 insertions(+), 2 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index da6cf8dee..42b77c137 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -818,8 +818,107 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) bit = 1 << (key & 7); } - /* Device axis are calculated in GetPointerEvents and need - * no more processing */ + /* Update device axis */ + for (i = 1; i < count; i++) { + if ((++xV)->type == DeviceValuator) { + int *axisvals; + int first = xV->first_valuator; + BOOL change = FALSE; + + if (xV->num_valuators && + (!v || (xV->num_valuators && + (first + xV->num_valuators > v->numAxes)))) + FatalError("Bad valuators reported for device %s\n", + device->name); + if (v && v->axisVal) { + /* The device always stores values in absolute. Only the + * delivery mode changes. + * If device is mode Absolute, and event is Relative + * dev += event + * event = dev + * If device is mode Absolute, and event is Absolute + * dev = event + * If device is mode Relative, and event is Absolute + * swap = (event - device) + * dev = event + * event = delta + * If device is mode Relative, and event is Relative + * dev += event + * + * XXX: axis clipping for relative events? + */ + axisvals = v->axisVal; + if (xV->sequenceNumber & Absolute) { + int delta; + if (v->mode == Relative) /* device reports relative */ + { + change = TRUE; + xV->sequenceNumber &= ~Absolute; + } + + switch (xV->num_valuators) { + case 6: + if (change) delta = xV->valuator5 - *(axisvals + first + 5); + *(axisvals + first + 5) = xV->valuator5; + if (change) xV->valuator5 = delta; + case 5: + if (change) delta = xV->valuator4 - *(axisvals + first + 4); + *(axisvals + first + 4) = xV->valuator4; + if (change) xV->valuator4 = delta; + case 4: + if (change) delta = xV->valuator3 - *(axisvals + first + 3); + *(axisvals + first + 3) = xV->valuator3; + if (change) xV->valuator3 = delta; + case 3: + if (change) delta = xV->valuator2 - *(axisvals + first + 2); + *(axisvals + first + 2) = xV->valuator2; + if (change) xV->valuator2 = delta; + case 2: + if (change) delta = xV->valuator1 - *(axisvals + first + 1); + *(axisvals + first + 1) = xV->valuator1; + if (change) xV->valuator1 = delta; + case 1: + if (change) delta = xV->valuator0 - *(axisvals + first); + *(axisvals + first) = xV->valuator0; + if (change) xV->valuator0 = delta; + case 0: + default: + break; + } + } else { /* event is relative */ + if (v->mode == Absolute) /* device reports absolute */ + { + change = TRUE; + xV->sequenceNumber |= Absolute; + } + + switch (xV->num_valuators) { + case 6: + *(axisvals + first + 5) += xV->valuator5; + if (change) xV->valuator5 = *(axisvals + first + 5); + case 5: + *(axisvals + first + 4) += xV->valuator4; + if (change) xV->valuator4 = *(axisvals + first + 4); + case 4: + *(axisvals + first + 3) += xV->valuator3; + if (change) xV->valuator3 = *(axisvals + first + 3); + case 3: + *(axisvals + first + 2) += xV->valuator2; + if (change) xV->valuator2 = *(axisvals + first + 2); + case 2: + *(axisvals + first + 1) += xV->valuator1; + if (change) xV->valuator1 = *(axisvals + first + 1); + case 1: + *(axisvals + first) += xV->valuator0; + if (change) xV->valuator0 = *(axisvals + first); + case 0: + default: + break; + } + } + } + } + } if (xE->u.u.type == DeviceKeyPress) { if (!k) From 7eec1c23a34591064ea64499acb24f22ada08dfa Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 23 May 2008 13:23:02 +0930 Subject: [PATCH 586/634] dix: don't allow relative data in deviceValuators. In GPE, we don't care about the device mode. Let's put the absolute values into the deviceValuator event and worry about relative valuators on the other side of the EQ. --- dix/getevents.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index 48aa0e8b5..23ec6c4b2 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -833,23 +833,10 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); - - /* update the valuators based on the mode of the InputDevice */ - if(pDev->valuator->mode == Absolute) { - /* Update the valuators with the true value sent to the client*/ - if(v0) *v0 = x; - if(v1) *v1 = y; - /*TODO Ensure that valuator 2 and onward also are absolute */ - } else {/* Relative mode */ - /* If driver reported in absolute, calculate the relative valuator - * values as a delta from the old absolute values of the valuator - * values. If relative report, keep it as-is.*/ - if (flags & POINTER_ABSOLUTE) { - int i; - for (i = 0; i < num_valuators && i < pDev->last.numValuators; i++) - valuators[i] = valuators[i] - pDev->last.valuators[i + first_valuator]; - } - } + /* Update the valuators with the true value sent to the client*/ + if(v0) *v0 = x; + if(v1) *v1 = y; + /* TODO: other axes */ /* dropy x/y (device coordinates) back into valuators for next event */ pDev->last.valuators[0] = x; From 0d1b41ace38bc918e2cc2a0a6ad107c76346fd00 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 23 May 2008 13:32:33 +0930 Subject: [PATCH 587/634] Xi: update device valuators based on the event. Event is always absolute, update the device's valuators (always absolute too), and then change the deviceValuator event to reflect the device's reporting mode. --- Xi/exevents.c | 108 ++++++++++++++++---------------------------------- 1 file changed, 34 insertions(+), 74 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 42b77c137..f477a7323 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -831,90 +831,50 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) FatalError("Bad valuators reported for device %s\n", device->name); if (v && v->axisVal) { - /* The device always stores values in absolute. Only the + /* v->axisVal is always in absolute coordinates. Only the * delivery mode changes. - * If device is mode Absolute, and event is Relative - * dev += event - * event = dev - * If device is mode Absolute, and event is Absolute + * If device is mode Absolute * dev = event - * If device is mode Relative, and event is Absolute + * If device is mode Relative * swap = (event - device) * dev = event * event = delta - * If device is mode Relative, and event is Relative - * dev += event * * XXX: axis clipping for relative events? */ axisvals = v->axisVal; - if (xV->sequenceNumber & Absolute) { - int delta; - if (v->mode == Relative) /* device reports relative */ - { - change = TRUE; - xV->sequenceNumber &= ~Absolute; - } + int delta; + if (v->mode == Relative) /* device reports relative */ + change = TRUE; - switch (xV->num_valuators) { - case 6: - if (change) delta = xV->valuator5 - *(axisvals + first + 5); - *(axisvals + first + 5) = xV->valuator5; - if (change) xV->valuator5 = delta; - case 5: - if (change) delta = xV->valuator4 - *(axisvals + first + 4); - *(axisvals + first + 4) = xV->valuator4; - if (change) xV->valuator4 = delta; - case 4: - if (change) delta = xV->valuator3 - *(axisvals + first + 3); - *(axisvals + first + 3) = xV->valuator3; - if (change) xV->valuator3 = delta; - case 3: - if (change) delta = xV->valuator2 - *(axisvals + first + 2); - *(axisvals + first + 2) = xV->valuator2; - if (change) xV->valuator2 = delta; - case 2: - if (change) delta = xV->valuator1 - *(axisvals + first + 1); - *(axisvals + first + 1) = xV->valuator1; - if (change) xV->valuator1 = delta; - case 1: - if (change) delta = xV->valuator0 - *(axisvals + first); - *(axisvals + first) = xV->valuator0; - if (change) xV->valuator0 = delta; - case 0: - default: - break; - } - } else { /* event is relative */ - if (v->mode == Absolute) /* device reports absolute */ - { - change = TRUE; - xV->sequenceNumber |= Absolute; - } - - switch (xV->num_valuators) { - case 6: - *(axisvals + first + 5) += xV->valuator5; - if (change) xV->valuator5 = *(axisvals + first + 5); - case 5: - *(axisvals + first + 4) += xV->valuator4; - if (change) xV->valuator4 = *(axisvals + first + 4); - case 4: - *(axisvals + first + 3) += xV->valuator3; - if (change) xV->valuator3 = *(axisvals + first + 3); - case 3: - *(axisvals + first + 2) += xV->valuator2; - if (change) xV->valuator2 = *(axisvals + first + 2); - case 2: - *(axisvals + first + 1) += xV->valuator1; - if (change) xV->valuator1 = *(axisvals + first + 1); - case 1: - *(axisvals + first) += xV->valuator0; - if (change) xV->valuator0 = *(axisvals + first); - case 0: - default: - break; - } + switch (xV->num_valuators) { + case 6: + if (change) delta = xV->valuator5 - *(axisvals + first + 5); + *(axisvals + first + 5) = xV->valuator5; + if (change) xV->valuator5 = delta; + case 5: + if (change) delta = xV->valuator4 - *(axisvals + first + 4); + *(axisvals + first + 4) = xV->valuator4; + if (change) xV->valuator4 = delta; + case 4: + if (change) delta = xV->valuator3 - *(axisvals + first + 3); + *(axisvals + first + 3) = xV->valuator3; + if (change) xV->valuator3 = delta; + case 3: + if (change) delta = xV->valuator2 - *(axisvals + first + 2); + *(axisvals + first + 2) = xV->valuator2; + if (change) xV->valuator2 = delta; + case 2: + if (change) delta = xV->valuator1 - *(axisvals + first + 1); + *(axisvals + first + 1) = xV->valuator1; + if (change) xV->valuator1 = delta; + case 1: + if (change) delta = xV->valuator0 - *(axisvals + first); + *(axisvals + first) = xV->valuator0; + if (change) xV->valuator0 = delta; + case 0: + default: + break; } } } From 3ae0f4fc832462444d03024c5fbb867f19d5e960 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 23 May 2008 15:02:43 +0930 Subject: [PATCH 588/634] dix: update valuators > 2 as well. master->last.valuator[x] for x > 2 is undefined. For all other devices, it's the respective device's last valuators. If the lastSlave did not have a valuator that is to be updated now, it is reset to 0. --- dix/getevents.c | 57 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 12 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index 23ec6c4b2..7c7c63fda 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -191,18 +191,39 @@ static void updateSlaveDeviceCoords(DeviceIntPtr master, DeviceIntPtr pDev) { ScreenPtr scr = miPointerGetScreen(pDev); + int i; + DeviceIntPtr lastSlave; /* master->last.valuators[0]/[1] is in screen coords and the actual * position of the pointer */ pDev->last.valuators[0] = master->last.valuators[0]; pDev->last.valuators[1] = master->last.valuators[1]; + if (!pDev->valuator) + return; + /* scale back to device coordinates */ if(pDev->valuator->numAxes > 0) pDev->last.valuators[0] = rescaleValuatorAxis(pDev->last.valuators[0], NULL, pDev->valuator->axes + 0, scr->width); if(pDev->valuator->numAxes > 1) pDev->last.valuators[1] = rescaleValuatorAxis(pDev->last.valuators[1], NULL, pDev->valuator->axes + 1, scr->height); - /*TODO calculate the other axis as well based on info from the old slave-device */ + + /* calculate the other axis as well based on info from the old + * slave-device. If the old slave had less axes than this one, + * last.valuators is reset to 0. + */ + if ((lastSlave = master->u.lastSlave) && lastSlave->valuator) { + for (i = 2; i < pDev->valuator->numAxes; i++) { + if (i >= lastSlave->valuator->numAxes) + pDev->last.valuators[i] = 0; + else + pDev->last.valuators[i] = + rescaleValuatorAxis(pDev->last.valuators[i], + lastSlave->valuator->axes + i, + pDev->valuator->axes + i, 0); + } + } + } /** @@ -540,13 +561,9 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type, if (master && master->u.lastSlave != pDev) { CreateClassesChangedEvent(events, master, pDev); - - if (master->valuator && pDev->valuator) - { - pDev->last.valuators[0] = master->last.valuators[0]; - pDev->last.valuators[1] = master->last.valuators[1]; - } + updateSlaveDeviceCoords(master, pDev); master->u.lastSlave = pDev; + master->last.numValuators = pDev->last.numValuators; numEvents++; events++; } @@ -713,6 +730,8 @@ FreeEventList(EventListPtr list, int num_events) * * last.valuators[x] of the device is always in absolute device coords. * last.valuators[x] of the master device is in absolute screen coords. + * + * master->last.valuators[x] for x > 2 is undefined. */ _X_EXPORT int GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, @@ -726,6 +745,7 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, cx, cy; /* only screen coordinates */ ScreenPtr scr = miPointerGetScreen(pDev); int *v0 = NULL, *v1 = NULL; + int i; /* Sanity checks. */ if (type != MotionNotify && type != ButtonPress && type != ButtonRelease) @@ -760,6 +780,7 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, CreateClassesChangedEvent(events, master, pDev); updateSlaveDeviceCoords(master, pDev); master->u.lastSlave = pDev; + master->last.numValuators = pDev->last.numValuators; num_events++; events++; } @@ -777,12 +798,17 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, if (flags & POINTER_ABSOLUTE) { if(v0) x = *v0; if(v1) y = *v1; - /*TODO: Update the rest of the valuators */ /* Clip both x and y to the defined limits (usually co-ord space limit). */ clipAxis(pDev, 0, &x); clipAxis(pDev, 1, &y); - /*TODO: Clip the rest of the valuators */ + + i = (first_valuator > 2) ? 0 : 2; + for (; i < num_valuators; i++) + { + pDev->last.valuators[i + first_valuator] = valuators[i]; + clipAxis(pDev, i, &pDev->last.valuators[i + first_valuator]); + } } else { if (flags & POINTER_ACCELERATE) @@ -791,7 +817,6 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, if(v0) x += *v0; if(v1) y += *v1; - /*TODO: Update the rest of the valuators */ /* if attached, clip both x and y to the defined limits (usually * co-ord space limit). If it is attached, we need x/y to go over the @@ -800,7 +825,15 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, clipAxis(pDev, 0, &x); clipAxis(pDev, 1, &y); } - /*TODO: Clip the rest of the valuators (Yes, here. Only x&y get special treatment) */ + + /* calc other axes, clip, drop back into valuators */ + i = (first_valuator > 2) ? 0 : 2; + for (; i < num_valuators; i++) + { + pDev->last.valuators[i + first_valuator] += valuators[i]; + clipAxis(pDev, i, &pDev->last.valuators[i + first_valuator]); + valuators[i] = pDev->last.valuators[i + first_valuator]; + } } /* scale x&y to screen */ @@ -836,7 +869,6 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, /* Update the valuators with the true value sent to the client*/ if(v0) *v0 = x; if(v1) *v1 = y; - /* TODO: other axes */ /* dropy x/y (device coordinates) back into valuators for next event */ pDev->last.valuators[0] = x; @@ -914,6 +946,7 @@ GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type, CreateClassesChangedEvent(events, master, pDev); updateSlaveDeviceCoords(master, pDev); master->u.lastSlave = pDev; + master->last.numValuators = pDev->last.numValuators; num_events++; events++; } From 3a22190061c7ebefee85564b0def5e1112c07ae8 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Mon, 19 May 2008 03:13:09 -0700 Subject: [PATCH 589/634] XQuartz: Fixed a few issues with fd passing... still not working =( (cherry picked from commit 7dd351271522b475d8017e4bd1618f12817ee2fa) --- hw/xquartz/mach-startup/bundle-main.c | 14 +++++++------- hw/xquartz/mach-startup/stub.c | 15 +++++++-------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c index c9751236f..0fab99044 100644 --- a/hw/xquartz/mach-startup/bundle-main.c +++ b/hw/xquartz/mach-startup/bundle-main.c @@ -163,10 +163,11 @@ static void accept_fd_handoff(int connected_fd) { launchd_fd = *((int*)CMSG_DATA(cmsg)); - if(launchd_fd > 0) - DarwinListenOnOpenFD(launchd_fd); - else + if(launchd_fd == -1) fprintf(stderr, "Error receiving $DISPLAY file descriptor, no descriptor received? %d\n", launchd_fd); + + fprintf(stderr, "Received new DISPLAY fd: %d\n", launchd_fd); + DarwinListenOnOpenFD(launchd_fd); } typedef struct { @@ -227,9 +228,6 @@ static void socket_handoff_thread(void *arg) { connected_fd = accept(handoff_fd, NULL, NULL); - /* We delete this temporary socket after we get the connection */ - unlink(filename); - if(connected_fd == -1) { fprintf(stderr, "Failed to accept incoming connection on socket: %s - %s\n", filename, strerror(errno)); return; @@ -237,8 +235,10 @@ static void socket_handoff_thread(void *arg) { /* Now actually get the passed file descriptor from this connection */ accept_fd_handoff(connected_fd); - + + close(connected_fd); close(handoff_fd); + unlink(filename); } kern_return_t do_prep_fd_handoff(mach_port_t port, string_t socket_filename) { diff --git a/hw/xquartz/mach-startup/stub.c b/hw/xquartz/mach-startup/stub.c index 0a9ab669c..854b71cbe 100644 --- a/hw/xquartz/mach-startup/stub.c +++ b/hw/xquartz/mach-startup/stub.c @@ -113,7 +113,7 @@ static void set_x11_path() { } } -static void send_fd_handoff(int connected_fd, int launchd_fd) { +static void send_fd_handoff(int handoff_fd, int launchd_fd) { char databuf[] = "display"; struct iovec iov[1]; @@ -143,19 +143,19 @@ static void send_fd_handoff(int connected_fd, int launchd_fd) { *((int*)CMSG_DATA(cmsg)) = launchd_fd; - if (sendmsg(connected_fd, &msg, 0) < 0) { + if (sendmsg(handoff_fd, &msg, 0) < 0) { fprintf(stderr, "Error sending $DISPLAY file descriptor: %s\n", strerror(errno)); return; } - fprintf(stderr, "send %d %d %d %s\n", connected_fd, launchd_fd, errno, strerror(errno)); + fprintf(stderr, "send %d %d %d %s\n", handoff_fd, launchd_fd, errno, strerror(errno)); } static void handoff_fd(const char *filename, int launchd_fd) { struct sockaddr_un servaddr_un; struct sockaddr *servaddr; socklen_t servaddr_len; - int handoff_fd, connected_fd; + int handoff_fd; /* Setup servaddr_un */ memset (&servaddr_un, 0, sizeof (struct sockaddr_un)); @@ -171,15 +171,14 @@ static void handoff_fd(const char *filename, int launchd_fd) { return; } - connected_fd = connect(handoff_fd, servaddr, servaddr_len); - - if(connected_fd == -1) { + if(connect(handoff_fd, servaddr, servaddr_len) < 0) { fprintf(stderr, "Failed to establish connection on socket: %s - %s\n", filename, strerror(errno)); return; } - send_fd_handoff(connected_fd, launchd_fd); + fprintf(stderr, "Socket: %s\n", filename); + send_fd_handoff(handoff_fd, launchd_fd); close(handoff_fd); } From 225dddbaeded4d64fcc104da538449e5c4dedd2d Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Fri, 23 May 2008 01:39:02 -0700 Subject: [PATCH 590/634] XQuartz: Move the launchd display grabbing into mach_startup (cherry picked from commit c3866c98d23020d2151977ee1177b6054d05832e) --- hw/xquartz/X11Application.m | 11 ------ hw/xquartz/mach-startup/bundle-main.c | 53 +++++++++++++++++---------- 2 files changed, 33 insertions(+), 31 deletions(-) diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m index d687c1f5f..c6c9c59ab 100644 --- a/hw/xquartz/X11Application.m +++ b/hw/xquartz/X11Application.m @@ -45,9 +45,6 @@ #include "X11/extensions/applewm.h" #include "micmap.h" -#include "os.h" -#include "mach-startup/launchd_fd.h" - #include #include @@ -815,14 +812,6 @@ void X11ApplicationMain (int argc, char **argv, char **envp) { /* Tell the server thread that it can proceed */ QuartzInitServer(argc, argv, envp); -#ifndef NEW_LAUNCH_METHOD - /* Start listening on the launchd fd */ - int launchd_fd = launchd_display_fd(); - if(launchd_fd != -1) { - DarwinListenOnOpenFD(launchd_fd); - } -#endif - [NSApp run]; /* not reached */ } diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c index 0fab99044..73c0483ab 100644 --- a/hw/xquartz/mach-startup/bundle-main.c +++ b/hw/xquartz/mach-startup/bundle-main.c @@ -47,6 +47,10 @@ #include "mach_startup.h" #include "mach_startupServer.h" +#include "launchd_fd.h" +void DarwinListenOnOpenFD(int fd); + + #define DEFAULT_CLIENT "/usr/X11/bin/xterm" #define DEFAULT_STARTX "/usr/X11/bin/startx" #define DEFAULT_SHELL "/bin/sh" @@ -60,8 +64,21 @@ int server_main(int argc, char **argv, char **envp); static int execute(const char *command); static char *command_from_prefs(const char *key, const char *default_value); -#ifdef NEW_LAUNCH_METHOD +/*** Pthread Magics ***/ +static pthread_t create_thread(void *func, void *arg) { + pthread_attr_t attr; + pthread_t tid; + + pthread_attr_init (&attr); + pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM); + pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED); + pthread_create (&tid, &attr, func, arg); + pthread_attr_destroy (&attr); + + return tid; +} +#ifdef NEW_LAUNCH_METHOD struct arg { int argc; char **argv; @@ -106,20 +123,6 @@ static mach_port_t checkin_or_register(char *bname) { return mp; } -/*** Pthread Magics ***/ -static pthread_t create_thread(void *func, void *arg) { - pthread_attr_t attr; - pthread_t tid; - - pthread_attr_init (&attr); - pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM); - pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED); - pthread_create (&tid, &attr, func, arg); - pthread_attr_destroy (&attr); - - return tid; -} - /*** $DISPLAY handoff ***/ /* From darwinEvents.c ... but don't want to pull in all the server cruft */ void DarwinListenOnOpenFD(int fd); @@ -289,6 +292,8 @@ kern_return_t do_start_x11_server(mach_port_t port, string_array_t argv, int startup_trigger(int argc, char **argv, char **envp) { #else +void *add_launchd_display_thread(void *data); + int main(int argc, char **argv, char **envp) { #endif Display *display; @@ -345,6 +350,7 @@ int main(int argc, char **argv, char **envp) { } exit(EXIT_SUCCESS); #else + create_thread(add_launchd_display_thread, NULL); return server_main(argc, argv, envp); #endif } @@ -356,14 +362,9 @@ int main(int argc, char **argv, char **envp) { /* Now, try to open a display, if so, run the launcher */ display = XOpenDisplay(NULL); if(display) { - fprintf(stderr, "X11.app: Closing the display and sleeping for 2s to allow the X server to start up.\n"); /* Could open the display, start the launcher */ XCloseDisplay(display); - /* Give 2 seconds for the server to start... - * TODO: *Really* fix this race condition - */ - usleep(2000); return execute(command_from_prefs("app_to_run", DEFAULT_CLIENT)); } } @@ -434,6 +435,18 @@ int main(int argc, char **argv, char **envp) { return EXIT_SUCCESS; } +#else +void *add_launchd_display_thread(void *data) { + /* TODO: Really fix this race */ + sleep(5); + + /* Start listening on the launchd fd */ + int launchd_fd = launchd_display_fd(); + if(launchd_fd != -1) { + DarwinListenOnOpenFD(launchd_fd); + } + return NULL; +} #endif static int execute(const char *command) { From 77b688a73025238ed9fe286a2bae8f78da65fce3 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Fri, 23 May 2008 02:32:28 -0700 Subject: [PATCH 591/634] XQuartz: Don't need launchd checking in configure.ac anymore since its functionality has been removed from libxtrans and into the mach startup code. (cherry picked from commit 1e1f4fb717d2f3a3227be2a034d28d6a4f29b5d1) --- configure.ac | 16 ---------------- include/dix-config.h.in | 3 --- 2 files changed, 19 deletions(-) diff --git a/configure.ac b/configure.ac index 3cec454da..21a7cb776 100644 --- a/configure.ac +++ b/configure.ac @@ -493,7 +493,6 @@ AC_ARG_WITH(apple-applications-dir,AS_HELP_STRING([--with-apple-applications-dir [ APPLE_APPLICATIONS_DIR="${withval}" ], [ APPLE_APPLICATIONS_DIR="/Applications/Utilities" ]) AC_SUBST([APPLE_APPLICATIONS_DIR]) -AC_ARG_WITH(launchd, AS_HELP_STRING([--with-launchd], [Build with support for Apple's launchd (default: auto)]), [LAUNCHD=$withval], [LAUNCHD=auto]) AC_ARG_WITH(launchagents-dir,AS_HELP_STRING([--with-launchagents-dir=PATH], [Path to launchd's LaunchAgents directory (default: /Library/LaunchAgents)]), [ launchagentsdir="${withval}" ], [ launchagentsdir="/Library/LaunchAgents" ]) @@ -1686,21 +1685,6 @@ AM_CONDITIONAL(HAVE_XPLUGIN, [test "x$ac_cv_lib_Xplugin_xp_init" = xyes]) AM_CONDITIONAL(HAVE_AGL_FRAMEWORK, [test "x$xorg_cv_AGL_framework" = xyes]) AM_CONDITIONAL(XQUARTZ, [test "x$XQUARTZ" = xyes]) -if test "x$LAUNCHD" = "xauto"; then - if test "x$XQUARTZ" = "xyes" ; then - LAUNCHD=yes - else - unset LAUNCHD - AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no]) - fi -fi - -if test "x$LAUNCHD" = "xyes" ; then - AC_DEFINE(HAVE_LAUNCHD, 1, [launchd support available]) -fi -AM_CONDITIONAL(LAUNCHD, [test "x$LAUNCHD" = "xyes"]) - - dnl DMX DDX AC_MSG_CHECKING([whether to build Xdmx DDX]) diff --git a/include/dix-config.h.in b/include/dix-config.h.in index 914ce4947..6b9b896f3 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -148,9 +148,6 @@ /* Define to 1 if you have version 2.2 (or newer) of the drm library */ #undef HAVE_LIBDRM_2_2 -/* Define to 1 if launchd is available. */ -#undef HAVE_LAUNCHD - /* Have Quartz */ #undef XQUARTZ From 5a388b27a094c71b4214aa744b2ba0fdda7fd607 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Fri, 23 May 2008 02:10:14 -0700 Subject: [PATCH 592/634] XQuartz: Add the launchd fd to AllSockets as well (cherry picked from commit 83f72529394be5871671d73b6ef4f8bc83708f8a) --- os/connection.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/os/connection.c b/os/connection.c index 316e347f2..38521e686 100644 --- a/os/connection.c +++ b/os/connection.c @@ -1324,15 +1324,17 @@ _X_EXPORT void ListenOnOpenFD(int fd) { ListenTransFds[ListenTransCount] = fd; FD_SET(fd, &WellKnownConnections); + FD_SET(fd, &AllSockets); - /* It is always local - if (!_XSERVTransIsLocal(ciptr)) { - // DefineSelf (fd); - } - */ - /* Increment the count */ ListenTransCount++; + + /* This *might* be needed, but it seems to be working fine without it... */ + //ResetAuthorization(); + //ResetHosts(display); +#ifdef XDMCP + //XdmcpReset(); +#endif } #endif From 7082929ef7db20b507dce5a8cec043e787d0b55e Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Fri, 23 May 2008 02:27:58 -0700 Subject: [PATCH 593/634] XQuartz: A 2 second delay for launchd socket connections should be sufficient. (cherry picked from commit 2bb4251b3c6b30dbf1a556e1b51e6f03f02d2529) --- hw/xquartz/mach-startup/bundle-main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c index 73c0483ab..0068e02cb 100644 --- a/hw/xquartz/mach-startup/bundle-main.c +++ b/hw/xquartz/mach-startup/bundle-main.c @@ -437,8 +437,10 @@ int main(int argc, char **argv, char **envp) { } #else void *add_launchd_display_thread(void *data) { - /* TODO: Really fix this race */ - sleep(5); + /* TODO: Really fix this race... we want xinitrc to finish before connections + * are accepted on the launchd socket. + */ + sleep(2); /* Start listening on the launchd fd */ int launchd_fd = launchd_display_fd(); From ae0504d34d245f15b2f098a63ad1a9e1c4daef35 Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Fri, 23 May 2008 22:40:03 +0300 Subject: [PATCH 594/634] kdrive: need not export symbols for glx anymore --- hw/kdrive/ephyr/Makefile.am | 4 ---- hw/kdrive/fake/Makefile.am | 4 ---- hw/kdrive/fbdev/Makefile.am | 4 ---- hw/kdrive/sdl/Makefile.am | 4 ---- hw/kdrive/vesa/Makefile.am | 4 ---- 5 files changed, 20 deletions(-) diff --git a/hw/kdrive/ephyr/Makefile.am b/hw/kdrive/ephyr/Makefile.am index 526987672..140cccbc8 100644 --- a/hw/kdrive/ephyr/Makefile.am +++ b/hw/kdrive/ephyr/Makefile.am @@ -62,10 +62,6 @@ libxephyr_a_SOURCES = $(XEPHYR_SRCS) Xephyr_SOURCES = \ ephyrinit.c -if GLX -Xephyr_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -endif - Xephyr_LDADD = \ libxephyr.a \ libxephyr-hostx.a \ diff --git a/hw/kdrive/fake/Makefile.am b/hw/kdrive/fake/Makefile.am index 0f8865699..09d179eb0 100644 --- a/hw/kdrive/fake/Makefile.am +++ b/hw/kdrive/fake/Makefile.am @@ -16,10 +16,6 @@ libfake_a_SOURCES = \ Xfake_SOURCES = \ fakeinit.c -if GLX -Xfake_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -endif - Xfake_LDADD = \ libfake.a \ @KDRIVE_LIBS@ \ diff --git a/hw/kdrive/fbdev/Makefile.am b/hw/kdrive/fbdev/Makefile.am index c77f146ee..420855b8d 100644 --- a/hw/kdrive/fbdev/Makefile.am +++ b/hw/kdrive/fbdev/Makefile.am @@ -14,10 +14,6 @@ bin_PROGRAMS = Xfbdev Xfbdev_SOURCES = \ fbinit.c -if GLX -Xfbdev_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -endif - Xfbdev_LDADD = \ libfbdev.a \ @KDRIVE_LIBS@ diff --git a/hw/kdrive/sdl/Makefile.am b/hw/kdrive/sdl/Makefile.am index a70d147de..fe9309e46 100644 --- a/hw/kdrive/sdl/Makefile.am +++ b/hw/kdrive/sdl/Makefile.am @@ -7,10 +7,6 @@ bin_PROGRAMS = Xsdl Xsdl_SOURCES = sdl.c -if GLX -Xsdl_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -endif - Xsdl_LDADD = \ @KDRIVE_LIBS@ \ @XSDL_LIBS@ diff --git a/hw/kdrive/vesa/Makefile.am b/hw/kdrive/vesa/Makefile.am index ec35c1e2b..ac50d2bf5 100644 --- a/hw/kdrive/vesa/Makefile.am +++ b/hw/kdrive/vesa/Makefile.am @@ -19,10 +19,6 @@ libvesa_a_SOURCES = \ Xvesa_SOURCES = \ vesainit.c -if GLX -Xvesa_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -endif - Xvesa_LDADD = \ libvesa.a \ @KDRIVE_LIBS@ From 1345c93ad4be875951256dae87bc4fd9a1b5e08a Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Fri, 23 May 2008 22:38:11 +0300 Subject: [PATCH 595/634] glx: drop stray glcore.h include --- glx/glxutil.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/glx/glxutil.c b/glx/glxutil.c index aa23a95fd..fc73a02c9 100644 --- a/glx/glxutil.c +++ b/glx/glxutil.c @@ -42,13 +42,7 @@ #include #include "glxserver.h" -#include -#include -#include -#include #include "glxutil.h" -#include "GL/internal/glcore.h" -#include "GL/glxint.h" /************************************************************************/ /* Context stuff */ From 877e6c35ff1f0f110627590ac0f12fddf47de506 Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Fri, 23 May 2008 22:38:36 +0300 Subject: [PATCH 596/634] glx: missing swrast is fatal --- glx/glxdriswrast.c | 2 +- hw/xfree86/dixmods/glxmodule.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c index 50dee5111..9d987c238 100644 --- a/glx/glxdriswrast.c +++ b/glx/glxdriswrast.c @@ -532,7 +532,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) xfree(screen); - LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n"); + FatalError("GLX: could not load software renderer\n"); return NULL; } diff --git a/hw/xfree86/dixmods/glxmodule.c b/hw/xfree86/dixmods/glxmodule.c index 026a93692..35ba74b25 100644 --- a/hw/xfree86/dixmods/glxmodule.c +++ b/hw/xfree86/dixmods/glxmodule.c @@ -86,8 +86,9 @@ glxSetup(pointer module, pointer opts, int *errmaj, int *errmin) setupDone = TRUE; provider = LoaderSymbol("__glXDRIswrastProvider"); - if (provider) - GlxPushProvider(provider); + if (provider == NULL) + return NULL; + GlxPushProvider(provider); xf86Msg(xf86Info.aiglxFrom, "AIGLX %s\n", xf86Info.aiglx ? "enabled" : "disabled"); From 21a8052fdca2115668dfc747b0b58db437b4eb6d Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Fri, 23 May 2008 22:39:09 +0300 Subject: [PATCH 597/634] glx: fix forgotten swrast -> SWRast --- hw/dmx/glxProxy/glxext.c | 2 +- hw/xfree86/dixmods/glxmodule.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/dmx/glxProxy/glxext.c b/hw/dmx/glxProxy/glxext.c index 4825831bd..c40150d80 100644 --- a/hw/dmx/glxProxy/glxext.c +++ b/hw/dmx/glxProxy/glxext.c @@ -40,7 +40,7 @@ ** Stubs to satisfy miinitext.c references. */ typedef int __GLXprovider; -__GLXprovider __glXDRIswrastProvider; +__GLXprovider __glXDRISWRastProvider; void GlxPushProvider(__GLXprovider *provider) { } /* diff --git a/hw/xfree86/dixmods/glxmodule.c b/hw/xfree86/dixmods/glxmodule.c index 35ba74b25..f6fda4b07 100644 --- a/hw/xfree86/dixmods/glxmodule.c +++ b/hw/xfree86/dixmods/glxmodule.c @@ -85,7 +85,7 @@ glxSetup(pointer module, pointer opts, int *errmaj, int *errmin) setupDone = TRUE; - provider = LoaderSymbol("__glXDRIswrastProvider"); + provider = LoaderSymbol("__glXDRISWRastProvider"); if (provider == NULL) return NULL; GlxPushProvider(provider); From 6c72961d8fa1ab1543f1b3e2cc7d34ff6d254bf8 Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Fri, 23 May 2008 22:39:35 +0300 Subject: [PATCH 598/634] glx: fix memory corruption with r5g6b5 should cherry-pick to xserver-1.5 --- glx/glxscreens.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/glx/glxscreens.c b/glx/glxscreens.c index 5859de0b1..cc7054a64 100644 --- a/glx/glxscreens.c +++ b/glx/glxscreens.c @@ -420,10 +420,13 @@ findFirstSet(unsigned int v) static void initGlxVisual(VisualPtr visual, __GLXconfig *config) { + int maxBits; + maxBits = max(config->redBits, max(config->greenBits, config->blueBits)); + config->visualID = visual->vid; visual->class = glxConvertToXVisualType(config->visualType); - visual->bitsPerRGBValue = config->redBits; - visual->ColormapEntries = 1 << config->redBits; + visual->bitsPerRGBValue = maxBits; + visual->ColormapEntries = 1 << maxBits; visual->nplanes = config->redBits + config->greenBits + config->blueBits; visual->redMask = config->redMask; From e6cbb1e11e5da1a8b9001853c25f4e5a052e7110 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Fri, 23 May 2008 23:00:40 +0200 Subject: [PATCH 599/634] xfree86: fix build on GNU/kFreeBSD GNU/kFreeBSD defines __FreeBSD_kernel__, but not __FreeBSD__. Unify preprocessor conditionals between variable declaration and use. Debian bug #482550. --- hw/xfree86/os-support/bsd/bsd_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/os-support/bsd/bsd_init.c b/hw/xfree86/os-support/bsd/bsd_init.c index 2c6a0256b..83583d5b9 100644 --- a/hw/xfree86/os-support/bsd/bsd_init.c +++ b/hw/xfree86/os-support/bsd/bsd_init.c @@ -159,7 +159,7 @@ xf86OpenConsole() xf86ConsOpen_t *driver; #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) int result; -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) struct utsname uts; #endif vtmode_t vtmode; From ba557e0263eee0b75847c596f31c71492611b22c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 24 May 2008 17:23:10 +0930 Subject: [PATCH 600/634] Xi: remove deprecated comment. Axis clipping wouldn't be necessary here, it's already performed in GPE. --- Xi/exevents.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index f477a7323..a48ba115d 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -839,8 +839,6 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count) * swap = (event - device) * dev = event * event = delta - * - * XXX: axis clipping for relative events? */ axisvals = v->axisVal; int delta; From 3baf3b42e079b4e7b61c1e20df305db0724d21f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Sat, 24 May 2008 20:01:21 +0200 Subject: [PATCH 601/634] EXA: Specify region used for source pixmap migration in exaCopyNtoN. Avoids excessive migration overhead in some pathological cases. See http://bugs.freedesktop.org/show_bug.cgi?id=15845 . --- exa/exa_accel.c | 52 +++++++++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/exa/exa_accel.c b/exa/exa_accel.c index 844683cfc..67d30f154 100644 --- a/exa/exa_accel.c +++ b/exa/exa_accel.c @@ -487,7 +487,8 @@ exaCopyNtoN (DrawablePtr pSrcDrawable, int src_off_x, src_off_y; int dst_off_x, dst_off_y; ExaMigrationRec pixmaps[2]; - RegionPtr region = NULL; + RegionPtr srcregion = NULL, dstregion = NULL; + xRectangle *rects; pSrcPixmap = exaGetDrawablePixmap (pSrcDrawable); pDstPixmap = exaGetDrawablePixmap (pDstDrawable); @@ -495,33 +496,38 @@ exaCopyNtoN (DrawablePtr pSrcDrawable, exaGetDrawableDeltas (pSrcDrawable, pSrcPixmap, &src_off_x, &src_off_y); exaGetDrawableDeltas (pDstDrawable, pDstPixmap, &dst_off_x, &dst_off_y); - if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask, - pGC->fillStyle, pGC->alu)) { - xRectangle *rects = xalloc(nbox * sizeof(xRectangle)); + rects = xalloc(nbox * sizeof(xRectangle)); - if (rects) { - int i; + if (rects) { + int i; - for (i = 0; i < nbox; i++) { - rects[i].x = pbox[i].x1 + dst_off_x; - rects[i].y = pbox[i].y1 + dst_off_y; - rects[i].width = pbox[i].x2 - pbox[i].x1; - rects[i].height = pbox[i].y2 - pbox[i].y1; - } + for (i = 0; i < nbox; i++) { + rects[i].x = pbox[i].x1 + dx + src_off_x; + rects[i].y = pbox[i].y1 + dy + src_off_y; + rects[i].width = pbox[i].x2 - pbox[i].x1; + rects[i].height = pbox[i].y2 - pbox[i].y1; + } - region = RECTS_TO_REGION(pScreen, nbox, rects, CT_YXBANDED); - xfree(rects); + srcregion = RECTS_TO_REGION(pScreen, nbox, rects, CT_YXBANDED); + xfree(rects); + + if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask, + pGC->fillStyle, pGC->alu)) { + dstregion = REGION_CREATE(pScreen, NullBox, 0); + REGION_COPY(pScreen, dstregion, srcregion); + REGION_TRANSLATE(pScreen, dstregion, dst_off_x - dx - src_off_x, + dst_off_y - dy - src_off_y); } } pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = FALSE; pixmaps[0].pPix = pDstPixmap; - pixmaps[0].pReg = region; + pixmaps[0].pReg = dstregion; pixmaps[1].as_dst = FALSE; pixmaps[1].as_src = TRUE; pixmaps[1].pPix = pSrcPixmap; - pixmaps[1].pReg = NULL; + pixmaps[1].pReg = srcregion; pSrcExaPixmap = ExaGetPixmapPriv (pSrcPixmap); pDstExaPixmap = ExaGetPixmapPriv (pDstPixmap); @@ -594,17 +600,21 @@ fallback: EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrcDrawable, pDstDrawable, exaDrawableLocation(pSrcDrawable), exaDrawableLocation(pDstDrawable))); - exaPrepareAccessReg (pDstDrawable, EXA_PREPARE_DEST, region); - exaPrepareAccess (pSrcDrawable, EXA_PREPARE_SRC); + exaPrepareAccessReg (pDstDrawable, EXA_PREPARE_DEST, dstregion); + exaPrepareAccessReg (pSrcDrawable, EXA_PREPARE_SRC, srcregion); fbCopyNtoN (pSrcDrawable, pDstDrawable, pGC, pbox, nbox, dx, dy, reverse, upsidedown, bitplane, closure); exaFinishAccess (pSrcDrawable, EXA_PREPARE_SRC); exaFinishAccess (pDstDrawable, EXA_PREPARE_DEST); out: - if (region) { - REGION_UNINIT(pScreen, region); - REGION_DESTROY(pScreen, region); + if (dstregion) { + REGION_UNINIT(pScreen, dstregion); + REGION_DESTROY(pScreen, dstregion); + } + if (srcregion) { + REGION_UNINIT(pScreen, srcregion); + REGION_DESTROY(pScreen, srcregion); } } From d73304398255e0c3b03a497a8d4a2f8d900eef44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Sat, 24 May 2008 20:01:31 +0200 Subject: [PATCH 602/634] EXA: Don't suggest exaCopyDirty be inlined. Leave the decision to the compiler toolchain. --- exa/exa_migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exa/exa_migration.c b/exa/exa_migration.c index d3646b0b6..5f22474e9 100644 --- a/exa/exa_migration.c +++ b/exa/exa_migration.c @@ -116,7 +116,7 @@ exaPixmapShouldBeInFB (PixmapPtr pPix) * If the pixmap is currently dirty, this copies at least the dirty area from * FB to system or vice versa. Both areas must be allocated. */ -static _X_INLINE void +static void exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc, Bool (*transfer) (PixmapPtr pPix, int x, int y, int w, int h, char *sys, int sys_pitch), CARD8 *fallback_src, From f6d61d3d86971d6a202b46ff2fab8c8799a4d057 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Sat, 24 May 2008 20:01:36 +0200 Subject: [PATCH 603/634] EXA: Don't migrate twice in exaImageGlyphBlt. exaPrepareAccess already handles migration. --- exa/exa_accel.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/exa/exa_accel.c b/exa/exa_accel.c index 67d30f154..edaec23df 100644 --- a/exa/exa_accel.c +++ b/exa/exa_accel.c @@ -970,10 +970,8 @@ exaImageGlyphBlt (DrawablePtr pDrawable, int dstBpp; int dstXoff, dstYoff; FbBits depthMask; - Bool fallback; PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable); ExaPixmapPriv(pPixmap); - ExaMigrationRec pixmaps[1]; RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage); BoxRec extents = *REGION_EXTENTS(pScreen, pending_damage); int xoff, yoff; @@ -982,16 +980,8 @@ exaImageGlyphBlt (DrawablePtr pDrawable, return; depthMask = FbFullMask(pDrawable->depth); - fallback = (pGC->planemask & depthMask) != depthMask; - pixmaps[0].as_dst = TRUE; - pixmaps[0].as_src = FALSE; - pixmaps[0].pPix = pPixmap; - pixmaps[0].pReg = fallback ? NULL : pending_damage; - - exaDoMigration(pixmaps, 1, FALSE); - - if (fallback) + if ((pGC->planemask & depthMask) != depthMask) { ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase); return; @@ -1014,7 +1004,7 @@ exaImageGlyphBlt (DrawablePtr pDrawable, extents.y1 -= yoff; extents.y2 -= yoff; - exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST, pixmaps[0].pReg); + exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST, pending_damage); if (TERMINALFONT (pGC->font) && !glyph) { From 29586101dc11d498b212510f8dedbfeca7f8c859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Sat, 24 May 2008 20:01:41 +0200 Subject: [PATCH 604/634] EXA: Only record damage generated by rendering operations. Recording damage from other operations (e.g. creating a client damage record) may confuse the migration code resulting in corruption. Option "EXAOptimizeMigration" appears safe now, so enable it by default. Also remove it from the manpage, as it should only be necessary on request in the course of bug report diagnostics anymore. --- exa/exa.c | 17 ++++++++++++++++- exa/exa_accel.c | 6 ++++-- exa/exa_migration.c | 6 ++++++ exa/exa_priv.h | 1 + exa/exa_unaccel.c | 5 ++++- hw/xfree86/exa/exa.man.pre | 6 ------ hw/xfree86/exa/examodule.c | 2 +- 7 files changed, 32 insertions(+), 11 deletions(-) diff --git a/exa/exa.c b/exa/exa.c index 809fb4b00..fc047483d 100644 --- a/exa/exa.c +++ b/exa/exa.c @@ -261,6 +261,21 @@ exaSetFbPitch(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap, pExaScr->info->pixmapPitchAlign); } + +static void +ExaDamageReport(DamagePtr pDamage, RegionPtr pReg, void *pClosure) +{ + PixmapPtr pPixmap = pClosure; + ExaPixmapPriv(pPixmap); + RegionPtr pDamageReg = DamageRegion(pDamage); + + if (pExaPixmap->pendingDamage) { + REGION_UNION(pScreen, pDamageReg, pDamageReg, pReg); + pExaPixmap->pendingDamage = FALSE; + } +} + + /** * exaCreatePixmap() creates a new pixmap. * @@ -352,7 +367,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, pExaPixmap->area = NULL; /* Set up damage tracking */ - pExaPixmap->pDamage = DamageCreate (NULL, NULL, DamageReportNone, TRUE, + pExaPixmap->pDamage = DamageCreate (ExaDamageReport, NULL, DamageReportRawRegion, TRUE, pScreen, pPixmap); if (pExaPixmap->pDamage == NULL) { diff --git a/exa/exa_accel.c b/exa/exa_accel.c index edaec23df..1dbb269f6 100644 --- a/exa/exa_accel.c +++ b/exa/exa_accel.c @@ -262,6 +262,7 @@ exaDoShmPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, if (format == ZPixmap) { PixmapPtr pPixmap; + ExaPixmapPriv(exaGetDrawablePixmap(pDrawable)); pPixmap = GetScratchPixmapHeader(pDrawable->pScreen, w, h, depth, BitsPerPixel(depth), PixmapBytePad(w, depth), (pointer)data); @@ -272,7 +273,8 @@ exaDoShmPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, pGC->alu)) exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); else - ExaDoPrepareAccess (pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST, + DamagePendingRegion(pExaPixmap->pDamage)); fbCopyArea((DrawablePtr)pPixmap, pDrawable, pGC, sx, sy, sw, sh, dx, dy); exaFinishAccess(pDrawable, EXA_PREPARE_DEST); @@ -316,7 +318,7 @@ exaShmPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, unsigned int format, pGC->alu)) exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); else - ExaDoPrepareAccess (pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST, ®ion); fbShmPutImage(pDrawable, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data); exaFinishAccess(pDrawable, EXA_PREPARE_DEST); diff --git a/exa/exa_migration.c b/exa/exa_migration.c index 5f22474e9..3c79f683c 100644 --- a/exa/exa_migration.c +++ b/exa/exa_migration.c @@ -301,6 +301,9 @@ exaDoMoveInPixmap (ExaMigrationPtr migrate) ExaScreenPriv (pScreen); ExaPixmapPriv (pPixmap); + if (migrate->as_dst) + pExaPixmap->pendingDamage = TRUE; + /* If we're VT-switched away, no touching card memory allowed. */ if (pExaScr->swappedOut) return; @@ -369,6 +372,9 @@ exaDoMoveOutPixmap (ExaMigrationPtr migrate) PixmapPtr pPixmap = migrate->pPix; ExaPixmapPriv (pPixmap); + if (migrate->as_dst) + pExaPixmap->pendingDamage = TRUE; + if (!pExaPixmap->area || exaPixmapIsPinned(pPixmap)) return; diff --git a/exa/exa_priv.h b/exa/exa_priv.h index f3b72ae66..9ec2a560c 100644 --- a/exa/exa_priv.h +++ b/exa/exa_priv.h @@ -226,6 +226,7 @@ typedef struct { * location. */ DamagePtr pDamage; + Bool pendingDamage; /** * The valid regions mark the valid bits (at least, as they're derived from * damage, which may be overreported) of a pixmap's system and FB copies. diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c index c55ef032b..5a2576414 100644 --- a/exa/exa_unaccel.c +++ b/exa/exa_unaccel.c @@ -97,12 +97,15 @@ ExaCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *bits) { + ExaPixmapPriv(exaGetDrawablePixmap(pDrawable)); + EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); if (exaGCReadsDestination(pDrawable, pGC->planemask, pGC->fillStyle, pGC->alu)) exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); else - ExaDoPrepareAccess (pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST, + DamagePendingRegion(pExaPixmap->pDamage)); fbPutImage (pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits); exaFinishAccess (pDrawable, EXA_PREPARE_DEST); } diff --git a/hw/xfree86/exa/exa.man.pre b/hw/xfree86/exa/exa.man.pre index 14859bc8f..31e1cfe34 100644 --- a/hw/xfree86/exa/exa.man.pre +++ b/hw/xfree86/exa/exa.man.pre @@ -31,12 +31,6 @@ Disables acceleration of downloading of pixmap data from the framebuffer. Not usable with drivers which rely on DownloadFromScreen succeeding. Default: No. .TP -.BI "Option \*qEXAOptimizeMigration\*q \*q" boolean \*q -Enables an additional optimization for migration of destination pixmaps. This -may improve performance in some cases (e.g. when switching virtual desktops with -no compositing manager) but causes corruption in others (e.g. when starting -compiz). Default: No. -.TP .BI "Option \*qMigrationHeuristic\*q \*q" anystr \*q Chooses an alternate pixmap migration heuristic, for debugging purposes. The default is intended to be the best performing one for general use, though others diff --git a/hw/xfree86/exa/examodule.c b/hw/xfree86/exa/examodule.c index e18da0a37..63ea8c56b 100644 --- a/hw/xfree86/exa/examodule.c +++ b/hw/xfree86/exa/examodule.c @@ -145,7 +145,7 @@ exaDDXDriverInit(ScreenPtr pScreen) pExaScr->optimize_migration = xf86ReturnOptValBool(pScreenPriv->options, EXAOPT_OPTIMIZE_MIGRATION, - FALSE); + TRUE); } if (xf86ReturnOptValBool(pScreenPriv->options, From 096117cf023dc92dcadc91677931fc6ad1feb4a0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 25 May 2008 10:38:33 +0930 Subject: [PATCH 605/634] Xi: reset motion history when swapping device classes. This isn't really the correct solution, but it'll have to do until I figured out how to transfer the history over correctly. --- Xi/exevents.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Xi/exevents.c b/Xi/exevents.c index a48ba115d..f13959fc9 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -574,6 +574,8 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) memcpy(v, from->valuator, sizeof(ValuatorClassRec)); v->motion = NULL; AllocateMotionHistory(to); /*XXX should be copied somehow */ + v->first_motion = 0; + v->last_motion = 0; v->axes = (AxisInfoPtr)&v[1]; memcpy(v->axes, from->valuator->axes, v->numAxes * sizeof(AxisInfo)); From 00b4339168c10dd4ce026deb8e04bfb63dfd11dc Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 25 May 2008 22:34:11 +0930 Subject: [PATCH 606/634] dmx: remove some #if 0'd code. --- hw/dmx/input/dmxxinput.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hw/dmx/input/dmxxinput.c b/hw/dmx/input/dmxxinput.c index 97bea7596..692e647bf 100644 --- a/hw/dmx/input/dmxxinput.c +++ b/hw/dmx/input/dmxxinput.c @@ -98,13 +98,8 @@ int ChangePointerDevice(DeviceIntPtr old_dev, } dmxLocalNew->savedMotionProc = new_dev->valuator->GetMotionProc; dmxLocalNew->savedMotionEvents = new_dev->valuator->numMotionEvents; -#if 00 /*BP*/ - new_dev->valuator->GetMotionProc = miPointerGetMotionEvents; - new_dev->valuator->numMotionEvents = miPointerGetMotionBufferSize(); -#else new_dev->valuator->GetMotionProc = GetMotionHistory; new_dev->valuator->numMotionEvents = GetMaximumEventsNum(); -#endif /* Switch our notion of core pointer */ dmxLocalOld->isCore = 0; dmxLocalOld->sendsCore = dmxLocalOld->savedSendsCore; From 0877de13ac6ddfb55108aa3456d47f970c6c442c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 25 May 2008 22:49:54 +0930 Subject: [PATCH 607/634] Remove GetMotionProc from ValuatorClassRec. With the MD/SD device hierarchy we need control over the generation of the motion history as well as the conversion later before posting it to the client. So let's not let the drivers change it. No x.org driver currently uses it anyway, linuxwacom doesn't either so dumping it seems safe enough. --- Xi/gtmotion.c | 6 +++--- dix/devices.c | 19 ++++++------------- dix/getevents.c | 4 ++-- hw/kdrive/src/kinput.c | 1 - hw/vfb/InitInput.c | 2 +- hw/xnest/Pointer.c | 1 - include/input.h | 9 --------- include/inputstr.h | 3 +-- 8 files changed, 13 insertions(+), 32 deletions(-) diff --git a/Xi/gtmotion.c b/Xi/gtmotion.c index 4f4d7cb77..7994890d3 100644 --- a/Xi/gtmotion.c +++ b/Xi/gtmotion.c @@ -137,9 +137,9 @@ ProcXGetDeviceMotionEvents(ClientPtr client) coords = (INT32 *) xalloc(tsize); if (!coords) return BadAlloc; - rep.nEvents = (v->GetMotionProc) (dev, (xTimecoord *) coords, /* XXX */ - start.milliseconds, stop.milliseconds, - (ScreenPtr) NULL); + rep.nEvents = GetMotionHistory(dev, (xTimecoord *) coords,/* XXX */ + start.milliseconds, stop.milliseconds, + (ScreenPtr) NULL); } if (rep.nEvents > 0) { length = (rep.nEvents * size + 3) >> 2; diff --git a/dix/devices.c b/dix/devices.c index 252118690..9db276b16 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -492,7 +492,7 @@ CorePointerProc(DeviceIntPtr pDev, int what) for (i = 1; i <= 32; i++) map[i] = i; InitPointerDeviceStruct((DevicePtr)pDev, map, 32, - GetMotionHistory, (PtrCtrlProcPtr)NoopDDA, + (PtrCtrlProcPtr)NoopDDA, GetMotionHistorySize(), 2); pDev->valuator->axisVal[0] = screenInfo.screens[0]->width / 2; pDev->last.valuators[0] = pDev->valuator->axisVal[0]; @@ -643,7 +643,7 @@ FreeDeviceClass(int type, pointer *class) ValuatorClassPtr *v = (ValuatorClassPtr*)class; /* Counterpart to 'biggest hack ever' in init. */ - if ((*v)->motion && (*v)->GetMotionProc == GetMotionHistory) + if ((*v)->motion) xfree((*v)->motion); xfree((*v)); break; @@ -1157,7 +1157,6 @@ InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, _X_EXPORT Bool InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, - ValuatorMotionProcPtr motionProc, int numMotionEvents, int mode) { int i; @@ -1175,7 +1174,6 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, valc->motion = NULL; valc->first_motion = 0; valc->last_motion = 0; - valc->GetMotionProc = motionProc; valc->numMotionEvents = numMotionEvents; valc->motionHintWindow = NullWindow; @@ -1187,9 +1185,7 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, valc->dyremaind = 0; dev->valuator = valc; - /* biggest hack ever. */ - if (motionProc == GetMotionHistory) - AllocateMotionHistory(dev); + AllocateMotionHistory(dev); for (i=0; ivaluator->GetMotionProc) (mouse, coords, - start.milliseconds, - stop.milliseconds, - pWin->drawable.pScreen); + count = GetMotionHistory(mouse, coords, start.milliseconds, + stop.milliseconds, pWin->drawable.pScreen); xmin = pWin->drawable.x - wBorderWidth (pWin); xmax = pWin->drawable.x + (int)pWin->drawable.width + wBorderWidth (pWin); diff --git a/dix/getevents.c b/dix/getevents.c index 7c7c63fda..dda681d27 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -238,8 +238,8 @@ AllocateMotionHistory(DeviceIntPtr pDev) if (pDev->valuator->numMotionEvents < 1) return; - pDev->valuator->motion = xalloc(((sizeof(INT32) * pDev->valuator->numAxes) + - sizeof(Time)) * + pDev->valuator->motion = xalloc(((sizeof(INT32) * pDev->valuator->numAxes) + + sizeof(Time)) * pDev->valuator->numMotionEvents); pDev->valuator->first_motion = 0; pDev->valuator->last_motion = 0; diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index c6724e487..005465fb6 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -438,7 +438,6 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff) } InitPointerDeviceStruct(pDev, pi->map, pi->nButtons, - GetMotionHistory, (PtrCtrlProcPtr)NoopDDA, GetMotionHistorySize(), pi->nAxes); diff --git a/hw/vfb/InitInput.c b/hw/vfb/InitInput.c index 3b001eea7..2af3c6421 100644 --- a/hw/vfb/InitInput.c +++ b/hw/vfb/InitInput.c @@ -295,7 +295,7 @@ vfbMouseProc(DeviceIntPtr pDevice, int onoff) map[1] = 1; map[2] = 2; map[3] = 3; - InitPointerDeviceStruct(pDev, map, 3, GetMotionHistory, + InitPointerDeviceStruct(pDev, map, 3, (PtrCtrlProcPtr)NoopDDA, GetMotionHistorySize(), 2); break; diff --git a/hw/xnest/Pointer.c b/hw/xnest/Pointer.c index b0de13b5f..8f764a624 100644 --- a/hw/xnest/Pointer.c +++ b/hw/xnest/Pointer.c @@ -56,7 +56,6 @@ xnestPointerProc(DeviceIntPtr pDev, int onoff) for (i = 0; i <= nmap; i++) map[i] = i; /* buttons are already mapped */ InitPointerDeviceStruct(&pDev->public, map, nmap, - GetMotionHistory, xnestChangePointerControl, GetMotionHistorySize(), 2); break; diff --git a/include/input.h b/include/input.h index 9b92ea33d..70f3de64f 100644 --- a/include/input.h +++ b/include/input.h @@ -274,17 +274,9 @@ extern Bool InitButtonClassDeviceStruct( int /*numButtons*/, CARD8* /*map*/); -typedef int (*ValuatorMotionProcPtr)( - DeviceIntPtr /*pdevice*/, - xTimecoord * /*coords*/, - unsigned long /*start*/, - unsigned long /*stop*/, - ScreenPtr /*pScreen*/); - extern Bool InitValuatorClassDeviceStruct( DeviceIntPtr /*device*/, int /*numAxes*/, - ValuatorMotionProcPtr /* motionProc */, int /*numMotionEvents*/, int /*mode*/); @@ -358,7 +350,6 @@ extern Bool InitPointerDeviceStruct( DevicePtr /*device*/, CARD8* /*map*/, int /*numButtons*/, - ValuatorMotionProcPtr /*motionProc*/, PtrCtrlProcPtr /*controlProc*/, int /*numMotionEvents*/, int /*numAxes*/); diff --git a/include/inputstr.h b/include/inputstr.h index d26eb1377..86b166721 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -164,11 +164,10 @@ typedef struct _AxisInfo { } AxisInfo, *AxisInfoPtr; typedef struct _ValuatorClassRec { - ValuatorMotionProcPtr GetMotionProc; int numMotionEvents; int first_motion; int last_motion; - void *motion; + void *motion; /* motion history buffer */ WindowPtr motionHintWindow; From d22c25bda450f6f1dfa634f0f72b32c4bec429cd Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 26 May 2008 09:26:18 +0930 Subject: [PATCH 608/634] dix: Allocate MD's motion history to be large enough for potential valuators Since we can't predict how many valuators may be in a future SD attached to an MD, we need to preallocate a history buffer that is large enough to keep MAX_VALUATORS coordinates per event. In addition, the history buffer needs to memorize the coordinate ranges at the time, thus requiring MDs to store (min_val, max_val, current_val, time) instead of (current_val, time) for each motion history entry. This commit only fixes the allocation. --- dix/getevents.c | 16 +++++++++++++--- include/inputstr.h | 6 +++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index dda681d27..6e723f88f 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -232,15 +232,25 @@ updateSlaveDeviceCoords(DeviceIntPtr master, DeviceIntPtr pDev) _X_EXPORT void AllocateMotionHistory(DeviceIntPtr pDev) { + int size; if (pDev->valuator->motion) xfree(pDev->valuator->motion); if (pDev->valuator->numMotionEvents < 1) return; - pDev->valuator->motion = xalloc(((sizeof(INT32) * pDev->valuator->numAxes) - + sizeof(Time)) * - pDev->valuator->numMotionEvents); + /* An MD must have a motion history size large enough to keep all + * potential valuators, plus the respective range of the valuators. + * 3 * INT32 for (min_val, max_val, curr_val)) + */ + if (pDev->isMaster) + size = sizeof(INT32) * 3 * MAX_VALUATORS; + else + size = sizeof(INT32) * pDev->valuator->numAxes; + + size += sizeof(Time); + + pDev->valuator->motion = xcalloc(pDev->valuator->numMotionEvents, size); pDev->valuator->first_motion = 0; pDev->valuator->last_motion = 0; } diff --git a/include/inputstr.h b/include/inputstr.h index 86b166721..5e745b356 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -167,9 +167,9 @@ typedef struct _ValuatorClassRec { int numMotionEvents; int first_motion; int last_motion; - void *motion; /* motion history buffer */ - - WindowPtr motionHintWindow; + void *motion; /* motion history buffer. Different layout + for MDs and SDs!*/ + WindowPtr motionHintWindow; AxisInfoPtr axes; unsigned short numAxes; From 0b88510069bdf6d020d73b424f62c2923c0db4a4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 26 May 2008 13:53:45 +0930 Subject: [PATCH 609/634] Ensure the motion history is merged for master devices. Add each event to the master's MH as well as to the SDs. In the MD, store min/max and the actual value. When retrieving the MH, rescale all coordinates to the current coordinate range and only post those valuators that are currently active on the device. --- Xi/exevents.c | 6 +-- Xi/gtmotion.c | 8 +--- dix/getevents.c | 120 ++++++++++++++++++++++++++++++++++++++++++------ include/input.h | 2 +- 4 files changed, 111 insertions(+), 25 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index f13959fc9..725c57835 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -571,12 +571,8 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) v = to->valuator; if (!v) FatalError("[Xi] no memory for class shift.\n"); - memcpy(v, from->valuator, sizeof(ValuatorClassRec)); - v->motion = NULL; - AllocateMotionHistory(to); /*XXX should be copied somehow */ - v->first_motion = 0; - v->last_motion = 0; + v->numAxes = from->valuator->numAxes; v->axes = (AxisInfoPtr)&v[1]; memcpy(v->axes, from->valuator->axes, v->numAxes * sizeof(AxisInfo)); diff --git a/Xi/gtmotion.c b/Xi/gtmotion.c index 7994890d3..8b59d67ec 100644 --- a/Xi/gtmotion.c +++ b/Xi/gtmotion.c @@ -132,12 +132,8 @@ ProcXGetDeviceMotionEvents(ClientPtr client) stop = currentTime; num_events = v->numMotionEvents; if (num_events) { - size = sizeof(Time) + (axes * sizeof(INT32)); - tsize = num_events * size; - coords = (INT32 *) xalloc(tsize); - if (!coords) - return BadAlloc; - rep.nEvents = GetMotionHistory(dev, (xTimecoord *) coords,/* XXX */ + size = sizeof(Time) + (axes * sizeof(INT32)); + rep.nEvents = GetMotionHistory(dev, (xTimecoord **) &coords,/* XXX */ start.milliseconds, stop.milliseconds, (ScreenPtr) NULL); } diff --git a/dix/getevents.c b/dix/getevents.c index 6e723f88f..349823dc8 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -253,6 +253,9 @@ AllocateMotionHistory(DeviceIntPtr pDev) pDev->valuator->motion = xcalloc(pDev->valuator->numMotionEvents, size); pDev->valuator->first_motion = 0; pDev->valuator->last_motion = 0; + if (!pDev->valuator->motion) + ErrorF("[dix] %s: Failed to alloc motion history (%d bytes).\n", + pDev->name, size * pDev->valuator->numMotionEvents); } @@ -262,18 +265,32 @@ AllocateMotionHistory(DeviceIntPtr pDev) * sort of ignore this. */ _X_EXPORT int -GetMotionHistory(DeviceIntPtr pDev, xTimecoord *buff, unsigned long start, +GetMotionHistory(DeviceIntPtr pDev, xTimecoord **buff, unsigned long start, unsigned long stop, ScreenPtr pScreen) { - char *ibuff = NULL, *obuff = (char *) buff; + char *ibuff = NULL, *obuff; int i = 0, ret = 0; + int j, coord; Time current; /* The size of a single motion event. */ - int size = (sizeof(INT32) * pDev->valuator->numAxes) + sizeof(Time); + int size; + int dflt; + AxisInfo from, *to; /* for scaling */ + CARD32 *ocbuf, *icbuf; /* pointer to coordinates for copying */ if (!pDev->valuator || !pDev->valuator->numMotionEvents) return 0; + if (pDev->isMaster) + size = (sizeof(INT32) * 3 * MAX_VALUATORS) + sizeof(Time); + else + size = (sizeof(INT32) * pDev->valuator->numAxes) + sizeof(Time); + + *buff = xalloc(size * pDev->valuator->numMotionEvents); + if (!(*buff)) + return 0; + obuff = *buff; + for (i = pDev->valuator->first_motion; i != pDev->valuator->last_motion; i = (i + 1) % pDev->valuator->numMotionEvents) { @@ -287,8 +304,48 @@ GetMotionHistory(DeviceIntPtr pDev, xTimecoord *buff, unsigned long start, return ret; } else if (current >= start) { - memcpy(obuff, ibuff, size); - obuff += size; + if (pDev->isMaster) + { + memcpy(obuff, ibuff, sizeof(Time)); /* copy timestamp */ + + ocbuf = (INT32*)(obuff + sizeof(Time)); + icbuf = (INT32*)(ibuff + sizeof(Time)); + for (j = 0; j < MAX_VALUATORS; j++) + { + if (j >= pDev->valuator->numAxes) + break; + + /* fetch min/max/coordinate */ + memcpy(&from.min_value, icbuf++, sizeof(INT32)); + memcpy(&from.max_value, icbuf++, sizeof(INT32)); + memcpy(&coord, icbuf++, sizeof(INT32)); + + to = (j < pDev->valuator->numAxes) ? &pDev->valuator->axes[j] : NULL; + + /* x/y scaled to screen if no range is present */ + if (j == 0 && (from.max_value < from.min_value)) + from.max_value = pScreen->width; + else if (j == 1 && (from.max_value < from.min_value)) + from.max_value = pScreen->height; + + if (j == 0 && (to->max_value < to->min_value)) + dflt = pScreen->width; + else if (j == 1 && (to->max_value < to->min_value)) + dflt = pScreen->height; + else + dflt = 0; + + /* scale from stored range into current range */ + coord = rescaleValuatorAxis(coord, &from, to, 0); + memcpy(ocbuf, &coord, sizeof(INT32)); + ocbuf++; + } + } else + memcpy(obuff, ibuff, size); + + /* don't advance by size here. size may be different to the + * actually written size if the MD has less valuators than MAX */ + obuff += (sizeof(INT32) * pDev->valuator->numAxes) + sizeof(Time); ret++; } } @@ -300,29 +357,63 @@ GetMotionHistory(DeviceIntPtr pDev, xTimecoord *buff, unsigned long start, /** * Update the motion history for a specific device, with the list of * valuators. + * + * Layout of the history buffer: + * for SDs: [time] [val0] [val1] ... [valn] + * for MDs: [time] [min_val0] [max_val0] [val0] [min_val1] ... [valn] + * + * For events that have some valuators unset (first_valuator > 0): + * min_val == max_val == val == 0. */ static void updateMotionHistory(DeviceIntPtr pDev, CARD32 ms, int first_valuator, int num_valuators, int *valuators) { char *buff = (char *) pDev->valuator->motion; + ValuatorClassPtr v; + int i; if (!pDev->valuator->numMotionEvents) return; - buff += ((sizeof(INT32) * pDev->valuator->numAxes) + sizeof(CARD32)) * + v = pDev->valuator; + if (pDev->isMaster) + { + buff += ((sizeof(INT32) * 3 * MAX_VALUATORS) + sizeof(CARD32)) * + v->last_motion; + + memcpy(buff, &ms, sizeof(Time)); + buff += sizeof(Time); + + memset(buff, 0, sizeof(INT32) * 3 * MAX_VALUATORS); + buff += 3 * sizeof(INT32) * first_valuator; + + for (i = first_valuator; i < first_valuator + num_valuators; i++) + { + memcpy(buff, &v->axes[i].min_value, sizeof(INT32)); + buff += sizeof(INT32); + memcpy(buff, &v->axes[i].max_value, sizeof(INT32)); + buff += sizeof(INT32); + memcpy(buff, &valuators[i - first_valuator], sizeof(INT32)); + buff += sizeof(INT32); + } + } else + { + + buff += ((sizeof(INT32) * pDev->valuator->numAxes) + sizeof(CARD32)) * pDev->valuator->last_motion; - memcpy(buff, &ms, sizeof(Time)); - buff += sizeof(Time); - bzero(buff, sizeof(INT32) * pDev->valuator->numAxes); + memcpy(buff, &ms, sizeof(Time)); + buff += sizeof(Time); - buff += sizeof(INT32) * first_valuator; - memcpy(buff, valuators, sizeof(INT32) * num_valuators); + memset(buff, 0, sizeof(INT32) * pDev->valuator->numAxes); + buff += sizeof(INT32) * first_valuator; + + memcpy(buff, valuators, sizeof(INT32) * num_valuators); + } pDev->valuator->last_motion = (pDev->valuator->last_motion + 1) % - pDev->valuator->numMotionEvents; - + pDev->valuator->numMotionEvents; /* If we're wrapping around, just keep the circular buffer going. */ if (pDev->valuator->first_motion == pDev->valuator->last_motion) pDev->valuator->first_motion = (pDev->valuator->first_motion + 1) % @@ -875,6 +966,9 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, pDev->valuator->axes + 1, scr->height); updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); + if (master) + updateMotionHistory(master, ms, first_valuator, num_valuators, + valuators); /* Update the valuators with the true value sent to the client*/ if(v0) *v0 = x; diff --git a/include/input.h b/include/input.h index 70f3de64f..3071d75de 100644 --- a/include/input.h +++ b/include/input.h @@ -483,7 +483,7 @@ extern void AllocateMotionHistory( extern int GetMotionHistory( DeviceIntPtr pDev, - xTimecoord *buff, + xTimecoord **buff, unsigned long start, unsigned long stop, ScreenPtr pScreen); From 1883485edd7eb90c0b76bca41c71e26ae2c0b91a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 26 May 2008 16:35:23 +0930 Subject: [PATCH 610/634] If core motion history is required, scale back to screen coords and INT16. --- Xi/gtmotion.c | 2 +- dix/devices.c | 9 +++---- dix/getevents.c | 46 +++++++++++++++++++++++++++++++--- hw/xfree86/common/xf86Helper.c | 4 +-- hw/xfree86/common/xf86Xinput.h | 2 +- include/input.h | 3 ++- 6 files changed, 51 insertions(+), 15 deletions(-) diff --git a/Xi/gtmotion.c b/Xi/gtmotion.c index 8b59d67ec..7cc5c2670 100644 --- a/Xi/gtmotion.c +++ b/Xi/gtmotion.c @@ -135,7 +135,7 @@ ProcXGetDeviceMotionEvents(ClientPtr client) size = sizeof(Time) + (axes * sizeof(INT32)); rep.nEvents = GetMotionHistory(dev, (xTimecoord **) &coords,/* XXX */ start.milliseconds, stop.milliseconds, - (ScreenPtr) NULL); + (ScreenPtr) NULL, FALSE); } if (rep.nEvents > 0) { length = (rep.nEvents * size + 3) >> 2; diff --git a/dix/devices.c b/dix/devices.c index 9db276b16..60d48b25e 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2308,12 +2308,9 @@ ProcGetMotionEvents(ClientPtr client) { if (CompareTimeStamps(stop, currentTime) == LATER) stop = currentTime; - coords = (xTimecoord *)xalloc(mouse->valuator->numMotionEvents - * sizeof(xTimecoord)); - if (!coords) - return BadAlloc; - count = GetMotionHistory(mouse, coords, start.milliseconds, - stop.milliseconds, pWin->drawable.pScreen); + count = GetMotionHistory(mouse, &coords, start.milliseconds, + stop.milliseconds, pWin->drawable.pScreen, + TRUE); xmin = pWin->drawable.x - wBorderWidth (pWin); xmax = pWin->drawable.x + (int)pWin->drawable.width + wBorderWidth (pWin); diff --git a/dix/getevents.c b/dix/getevents.c index 349823dc8..643e97763 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -258,15 +258,16 @@ AllocateMotionHistory(DeviceIntPtr pDev) pDev->name, size * pDev->valuator->numMotionEvents); } - /** * Dump the motion history between start and stop into the supplied buffer. * Only records the event for a given screen in theory, but in practice, we * sort of ignore this. + * + * If core is set, we only generate x/y, in INT16, scaled to screen coords. */ _X_EXPORT int GetMotionHistory(DeviceIntPtr pDev, xTimecoord **buff, unsigned long start, - unsigned long stop, ScreenPtr pScreen) + unsigned long stop, ScreenPtr pScreen, BOOL core) { char *ibuff = NULL, *obuff; int i = 0, ret = 0; @@ -277,10 +278,15 @@ GetMotionHistory(DeviceIntPtr pDev, xTimecoord **buff, unsigned long start, int dflt; AxisInfo from, *to; /* for scaling */ CARD32 *ocbuf, *icbuf; /* pointer to coordinates for copying */ + INT16 *corebuf; + AxisInfo core_axis = {0}; if (!pDev->valuator || !pDev->valuator->numMotionEvents) return 0; + if (core && !pScreen) + return 0; + if (pDev->isMaster) size = (sizeof(INT32) * 3 * MAX_VALUATORS) + sizeof(Time); else @@ -304,7 +310,36 @@ GetMotionHistory(DeviceIntPtr pDev, xTimecoord **buff, unsigned long start, return ret; } else if (current >= start) { - if (pDev->isMaster) + if (core) + { + memcpy(obuff, ibuff, sizeof(Time)); /* copy timestamp */ + + icbuf = (INT32*)(ibuff + sizeof(Time)); + corebuf = (INT16*)(obuff + sizeof(Time)); + + /* fetch x coordinate + range */ + memcpy(&from.min_value, icbuf++, sizeof(INT32)); + memcpy(&from.max_value, icbuf++, sizeof(INT32)); + memcpy(&coord, icbuf++, sizeof(INT32)); + + /* scale to screen coords */ + to = &core_axis; + to->max_value = pScreen->width; + coord = rescaleValuatorAxis(coord, &from, to, pScreen->width); + + memcpy(corebuf, &coord, sizeof(INT16)); + corebuf++; + + /* fetch y coordinate + range */ + memcpy(&from.min_value, icbuf++, sizeof(INT32)); + memcpy(&from.max_value, icbuf++, sizeof(INT32)); + memcpy(&coord, icbuf++, sizeof(INT32)); + + to->max_value = pScreen->height; + coord = rescaleValuatorAxis(coord, &from, to, pScreen->height); + memcpy(corebuf, &coord, sizeof(INT16)); + + } else if (pDev->isMaster) { memcpy(obuff, ibuff, sizeof(Time)); /* copy timestamp */ @@ -345,7 +380,10 @@ GetMotionHistory(DeviceIntPtr pDev, xTimecoord **buff, unsigned long start, /* don't advance by size here. size may be different to the * actually written size if the MD has less valuators than MAX */ - obuff += (sizeof(INT32) * pDev->valuator->numAxes) + sizeof(Time); + if (core) + obuff += sizeof(INT32) + sizeof(Time); + else + obuff += (sizeof(INT32) * pDev->valuator->numAxes) + sizeof(Time); ret++; } } diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index 1dd0bbc0d..eaa6c76fb 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -2933,9 +2933,9 @@ xf86MotionHistoryAllocate(LocalDevicePtr local) _X_EXPORT int xf86GetMotionEvents(DeviceIntPtr pDev, xTimecoord *buff, unsigned long start, - unsigned long stop, ScreenPtr pScreen) + unsigned long stop, ScreenPtr pScreen, BOOL core) { - return GetMotionHistory(pDev, buff, start, stop, pScreen); + return GetMotionHistory(pDev, buff, start, stop, pScreen, core); } _X_EXPORT void diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h index dd72ec733..02f657de3 100644 --- a/hw/xfree86/common/xf86Xinput.h +++ b/hw/xfree86/common/xf86Xinput.h @@ -197,7 +197,7 @@ void xf86DeleteInput(InputInfoPtr pInp, int flags); void xf86MotionHistoryAllocate(LocalDevicePtr local); int xf86GetMotionEvents(DeviceIntPtr dev, xTimecoord *buff, unsigned long start, unsigned long stop, - ScreenPtr pScreen); + ScreenPtr pScreen, BOOL core); /* xf86Option.c */ void xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts, diff --git a/include/input.h b/include/input.h index 3071d75de..a816385a5 100644 --- a/include/input.h +++ b/include/input.h @@ -486,7 +486,8 @@ extern int GetMotionHistory( xTimecoord **buff, unsigned long start, unsigned long stop, - ScreenPtr pScreen); + ScreenPtr pScreen, + BOOL core); extern void SwitchCorePointer(DeviceIntPtr pDev); From 5fe57787faa2ea4f2f57b25455d200bf924206d6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 26 May 2008 17:23:34 +0930 Subject: [PATCH 611/634] dix: store the absolute values in the motion history. The core protocol requires absolute values and it's a bit hard to get them if we only have relative ones in the history. Switch the motion history to absolute, and if we really need the relative values, we can probably generated them from the abs. ones in the future. --- Xi/gtmotion.c | 2 +- dix/getevents.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Xi/gtmotion.c b/Xi/gtmotion.c index 7cc5c2670..ce1312e90 100644 --- a/Xi/gtmotion.c +++ b/Xi/gtmotion.c @@ -119,7 +119,7 @@ ProcXGetDeviceMotionEvents(ClientPtr client) rep.sequenceNumber = client->sequence; rep.nEvents = 0; rep.axes = axes; - rep.mode = v->mode & DeviceMode; + rep.mode = Absolute; /* XXX we don't do relative at the moment */ rep.length = 0; start = ClientTimeToServerTime(stuff->start); stop = ClientTimeToServerTime(stuff->stop); diff --git a/dix/getevents.c b/dix/getevents.c index 643e97763..b5657a86e 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -1003,10 +1003,11 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, y = rescaleValuatorAxis(pDev->last.valuators[1], NULL, pDev->valuator->axes + 1, scr->height); - updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); + updateMotionHistory(pDev, ms, first_valuator, num_valuators, + &pDev->last.valuators[first_valuator]); if (master) updateMotionHistory(master, ms, first_valuator, num_valuators, - valuators); + &pDev->last.valuators[first_valuator]); /* Update the valuators with the true value sent to the client*/ if(v0) *v0 = x; From 0050165a67bb462e0bf644a11644ad9d587c62bb Mon Sep 17 00:00:00 2001 From: Simon Thum Date: Mon, 26 May 2008 17:56:08 +0930 Subject: [PATCH 612/634] input: change dxremaind, dyremaind to floats for better acceleration #9156 X.Org Bug 9156 Signed-off-by: Peter Hutterer --- include/inputstr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/inputstr.h b/include/inputstr.h index 5e745b356..7209b2cb3 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -174,7 +174,7 @@ typedef struct _ValuatorClassRec { AxisInfoPtr axes; unsigned short numAxes; int *axisVal; /* always absolute, but device-coord system */ - int dxremaind, dyremaind; /* for acceleration */ + float dxremaind, dyremaind; /* for acceleration */ CARD8 mode; } ValuatorClassRec, *ValuatorClassPtr; From 3a1278907ea8059546c7b9ab0c02714832c693e3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 26 May 2008 18:01:07 +0930 Subject: [PATCH 613/634] xfree86: Bump XINPUT ABI to 3.0. --- hw/xfree86/common/xf86Module.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h index 240155ca7..78a22ecd4 100644 --- a/hw/xfree86/common/xf86Module.h +++ b/hw/xfree86/common/xf86Module.h @@ -84,7 +84,7 @@ typedef enum { */ #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 3) #define ABI_VIDEODRV_VERSION SET_ABI_VERSION(4, 0) -#define ABI_XINPUT_VERSION SET_ABI_VERSION(2, 0) +#define ABI_XINPUT_VERSION SET_ABI_VERSION(3, 0) #define ABI_EXTENSION_VERSION SET_ABI_VERSION(1, 0) #define ABI_FONT_VERSION SET_ABI_VERSION(0, 5) From c8af7ce35a900ac9b898f51c1b95dabad3ba1d76 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Fri, 23 May 2008 13:50:39 -0300 Subject: [PATCH 614/634] Correct a NULL pointer deference The problem happens if Monitor/Card combo doesn't provide EDID info, and the XFree86-VidModeExtension extension is used. Signed-off-by: Peter Hutterer --- hw/xfree86/common/xf86VidMode.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/common/xf86VidMode.c b/hw/xfree86/common/xf86VidMode.c index 38d605c88..9260bb57b 100644 --- a/hw/xfree86/common/xf86VidMode.c +++ b/hw/xfree86/common/xf86VidMode.c @@ -150,10 +150,14 @@ VidModeGetCurrentModeline(int scrnIndex, pointer *mode, int *dotClock) return FALSE; pScrn = xf86Screens[scrnIndex]; - *mode = (pointer)(pScrn->currentMode); - *dotClock = pScrn->currentMode->Clock; - return TRUE; + if (pScrn->currentMode) { + *mode = (pointer)(pScrn->currentMode); + *dotClock = pScrn->currentMode->Clock; + + return TRUE; + } + return FALSE; } _X_EXPORT int From 64677f6a167a5bee99e5dfb599a3c3a6fb5dffe7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 27 May 2008 21:01:26 +0930 Subject: [PATCH 615/634] xfree86: fix offset error in EDID parsing. #15964 X.Org Bug 15964 --- hw/xfree86/ddc/interpret_edid.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c index 21391dd66..b31969914 100644 --- a/hw/xfree86/ddc/interpret_edid.c +++ b/hw/xfree86/ddc/interpret_edid.c @@ -349,14 +349,14 @@ get_monitor_ranges(Uchar *c, struct monitor_ranges *r) static void get_whitepoint_section(Uchar *c, struct whitePoints *wp) { - wp[1].white_x = WHITEX1; - wp[1].white_y = WHITEY1; - wp[2].white_x = WHITEX2; - wp[2].white_y = WHITEY2; - wp[1].index = WHITE_INDEX1; - wp[2].index = WHITE_INDEX2; - wp[1].white_gamma = WHITE_GAMMA1; - wp[2].white_gamma = WHITE_GAMMA2; + wp[0].white_x = WHITEX1; + wp[0].white_y = WHITEY1; + wp[1].white_x = WHITEX2; + wp[1].white_y = WHITEY2; + wp[0].index = WHITE_INDEX1; + wp[1].index = WHITE_INDEX2; + wp[0].white_gamma = WHITE_GAMMA1; + wp[1].white_gamma = WHITE_GAMMA2; } static void From 9b544fa40062b342ff3aa75f8f21d0bd4cec80ab Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 28 May 2008 12:27:07 +0930 Subject: [PATCH 616/634] mi: ansify. --- mi/miarc.c | 6 +-- mi/mibitblt.c | 53 ++++++++++------------ mi/micursor.c | 7 +-- mi/midash.c | 13 +++--- mi/midispcur.c | 63 ++++++++------------------ mi/miexpose.c | 33 ++++---------- mi/mifillarc.c | 15 ++---- mi/mifillrct.c | 11 +++-- mi/mifpolycon.c | 18 ++++---- mi/migc.c | 34 ++++---------- mi/miglblt.c | 32 +++++++------ mi/miinitext.c | 8 +--- mi/mipointer.c | 82 +++++++++++---------------------- mi/mipoly.c | 9 ++-- mi/mipolycon.c | 11 +++-- mi/mipolygen.c | 11 +++-- mi/mipolypnt.c | 13 +++--- mi/mipolyrect.c | 6 +-- mi/mipolyseg.c | 6 +-- mi/mipolytext.c | 29 ++---------- mi/mipolyutil.c | 21 +++------ mi/mipushpxl.c | 7 +-- mi/miregion.c | 118 ++++++++++++++++++------------------------------ mi/miscrinit.c | 55 ++++++++-------------- mi/mispans.c | 15 ++---- mi/misprite.c | 98 +++++++++++----------------------------- mi/mivaltree.c | 16 +++---- mi/miwideline.c | 68 ++++++++++++---------------- mi/miwindow.c | 62 +++++++++---------------- mi/mizerarc.c | 11 +---- mi/mizerclip.c | 17 +++---- mi/mizerline.c | 25 +++++----- 32 files changed, 345 insertions(+), 628 deletions(-) diff --git a/mi/miarc.c b/mi/miarc.c index 5ccd11127..f0c863fd9 100644 --- a/mi/miarc.c +++ b/mi/miarc.c @@ -1042,11 +1042,7 @@ miFillWideEllipse( */ _X_EXPORT void -miPolyArc(pDraw, pGC, narcs, parcs) - DrawablePtr pDraw; - GCPtr pGC; - int narcs; - xArc *parcs; +miPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) { int i; xArc *parc; diff --git a/mi/mibitblt.c b/mi/mibitblt.c index 14d68e2e1..168b91564 100644 --- a/mi/mibitblt.c +++ b/mi/mibitblt.c @@ -74,14 +74,15 @@ extern int ffs(int); * We let SetSpans worry about clipping to the destination. */ _X_EXPORT RegionPtr -miCopyArea(pSrcDrawable, pDstDrawable, - pGC, xIn, yIn, widthSrc, heightSrc, xOut, yOut) - DrawablePtr pSrcDrawable; - DrawablePtr pDstDrawable; - GCPtr pGC; - int xIn, yIn; - int widthSrc, heightSrc; - int xOut, yOut; +miCopyArea(DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + int xIn, + int yIn, + int widthSrc, + int heightSrc, + int xOut, + int yOut) { DDXPointPtr ppt, pptFirst; unsigned int *pwidthFirst, *pwidth, *pbits; @@ -549,15 +550,16 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc, * Use the bitmap we've built up as a Stipple for the destination */ _X_EXPORT RegionPtr -miCopyPlane(pSrcDrawable, pDstDrawable, - pGC, srcx, srcy, width, height, dstx, dsty, bitPlane) - DrawablePtr pSrcDrawable; - DrawablePtr pDstDrawable; - GCPtr pGC; - int srcx, srcy; - int width, height; - int dstx, dsty; - unsigned long bitPlane; +miCopyPlane( DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + int srcx, + int srcy, + int width, + int height, + int dstx, + int dsty, + unsigned long bitPlane) { MiBits *ptile; BoxRec box; @@ -643,12 +645,8 @@ miCopyPlane(pSrcDrawable, pDstDrawable, * get the single plane specified in planemask */ _X_EXPORT void -miGetImage(pDraw, sx, sy, w, h, format, planeMask, pDst) - DrawablePtr pDraw; - int sx, sy, w, h; - unsigned int format; - unsigned long planeMask; - char * pDst; +miGetImage( DrawablePtr pDraw, int sx, int sy, int w, int h, + unsigned int format, unsigned long planeMask, char *pDst) { unsigned char depth; int i, linelength, width, srcx, srcy; @@ -745,12 +743,9 @@ miGetImage(pDraw, sx, sy, w, h, format, planeMask, pDst) * This part is simple, just call SetSpans */ _X_EXPORT void -miPutImage(pDraw, pGC, depth, x, y, w, h, leftPad, format, pImage) - DrawablePtr pDraw; - GCPtr pGC; - int depth, x, y, w, h, leftPad; - int format; - char *pImage; +miPutImage( DrawablePtr pDraw, GCPtr pGC, int depth, + int x, int y, int w, int h, + int leftPad, int format, char *pImage) { DDXPointPtr pptFirst, ppt; int *pwidthFirst, *pwidth; diff --git a/mi/micursor.c b/mi/micursor.c index af2cd0870..ec20946a3 100644 --- a/mi/micursor.c +++ b/mi/micursor.c @@ -57,11 +57,8 @@ SOFTWARE. extern Bool Must_have_memory; _X_EXPORT void -miRecolorCursor( pDev, pScr, pCurs, displayed) - DeviceIntPtr pDev; - ScreenPtr pScr; - CursorPtr pCurs; - Bool displayed; +miRecolorCursor(DeviceIntPtr pDev, ScreenPtr pScr, + CursorPtr pCurs, Bool displayed) { /* * This is guaranteed to correct any color-dependent state which may have diff --git a/mi/midash.c b/mi/midash.c index 95a19c295..40c741b44 100644 --- a/mi/midash.c +++ b/mi/midash.c @@ -53,12 +53,13 @@ SOFTWARE. #include "mifpoly.h" _X_EXPORT void -miStepDash (dist, pDashIndex, pDash, numInDashList, pDashOffset) - int dist; /* distance to step */ - int *pDashIndex; /* current dash */ - unsigned char *pDash; /* dash list */ - int numInDashList; /* total length of dash list */ - int *pDashOffset; /* offset into current dash */ +miStepDash ( + int dist, /* distance to step */ + int *pDashIndex, /* current dash */ + unsigned char *pDash, /* dash list */ + int numInDashList, /* total length of dash list */ + int *pDashOffset /* offset into current dash */ + ) { int dashIndex, dashOffset; int totallen; diff --git a/mi/midispcur.c b/mi/midispcur.c index 7d1aed9fb..d68050feb 100644 --- a/mi/midispcur.c +++ b/mi/midispcur.c @@ -142,9 +142,7 @@ static miSpriteCursorFuncRec miDCFuncs = { }; _X_EXPORT Bool -miDCInitialize (pScreen, screenFuncs) - ScreenPtr pScreen; - miPointerScreenFuncPtr screenFuncs; +miDCInitialize (ScreenPtr pScreen, miPointerScreenFuncPtr screenFuncs) { miDCScreenPtr pScreenPriv; @@ -171,9 +169,7 @@ miDCInitialize (pScreen, screenFuncs) #define tossPict(pict) (pict ? FreePicture (pict, 0) : 0) static Bool -miDCCloseScreen (index, pScreen) - int index; - ScreenPtr pScreen; +miDCCloseScreen (int index, ScreenPtr pScreen) { miDCScreenPtr pScreenPriv; @@ -185,9 +181,7 @@ miDCCloseScreen (index, pScreen) } static Bool -miDCRealizeCursor (pScreen, pCursor) - ScreenPtr pScreen; - CursorPtr pCursor; +miDCRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) { if (pCursor->bits->refcnt <= 1) dixSetPrivate(&pCursor->bits->devPrivates, pScreen, NULL); @@ -235,9 +229,7 @@ miDCMakePicture (PicturePtr *ppPicture, DrawablePtr pDraw, WindowPtr pWin) #endif static miDCCursorPtr -miDCRealize ( - ScreenPtr pScreen, - CursorPtr pCursor) +miDCRealize (ScreenPtr pScreen, CursorPtr pCursor) { miDCCursorPtr pPriv; GCPtr pGC; @@ -349,9 +341,7 @@ miDCRealize ( } static Bool -miDCUnrealizeCursor (pScreen, pCursor) - ScreenPtr pScreen; - CursorPtr pCursor; +miDCUnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) { miDCCursorPtr pPriv; @@ -453,12 +443,8 @@ miDCMakeGC( static Bool -miDCPutUpCursor (pDev, pScreen, pCursor, x, y, source, mask) - DeviceIntPtr pDev; - ScreenPtr pScreen; - CursorPtr pCursor; - int x, y; - unsigned long source, mask; +miDCPutUpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, + int x, int y, unsigned long source, unsigned long mask) { miDCScreenPtr pScreenPriv; miDCCursorPtr pPriv; @@ -540,10 +526,8 @@ miDCPutUpCursor (pDev, pScreen, pCursor, x, y, source, mask) } static Bool -miDCSaveUnderCursor (pDev, pScreen, x, y, w, h) - DeviceIntPtr pDev; - ScreenPtr pScreen; - int x, y, w, h; +miDCSaveUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen, + int x, int y, int w, int h) { miDCScreenPtr pScreenPriv; miDCBufferPtr pBuffer; @@ -583,10 +567,8 @@ miDCSaveUnderCursor (pDev, pScreen, x, y, w, h) } static Bool -miDCRestoreUnderCursor (pDev, pScreen, x, y, w, h) - DeviceIntPtr pDev; - ScreenPtr pScreen; - int x, y, w, h; +miDCRestoreUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen, + int x, int y, int w, int h) { miDCScreenPtr pScreenPriv; miDCBufferPtr pBuffer; @@ -619,10 +601,8 @@ miDCRestoreUnderCursor (pDev, pScreen, x, y, w, h) } static Bool -miDCChangeSave (pDev, pScreen, x, y, w, h, dx, dy) - DeviceIntPtr pDev; - ScreenPtr pScreen; - int x, y, w, h, dx, dy; +miDCChangeSave (DeviceIntPtr pDev, ScreenPtr pScreen, + int x, int y, int w, int h, int dx, int dy) { miDCScreenPtr pScreenPriv; miDCBufferPtr pBuffer; @@ -768,12 +748,9 @@ miDCChangeSave (pDev, pScreen, x, y, w, h, dx, dy) } static Bool -miDCMoveCursor (pDev, pScreen, pCursor, x, y, w, h, dx, dy, source, mask) - DeviceIntPtr pDev; - ScreenPtr pScreen; - CursorPtr pCursor; - int x, y, w, h, dx, dy; - unsigned long source, mask; +miDCMoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, + int x, int y, int w, int h, int dx, int dy, + unsigned long source, unsigned long mask) { miDCCursorPtr pPriv; miDCScreenPtr pScreenPriv; @@ -904,9 +881,7 @@ miDCMoveCursor (pDev, pScreen, pCursor, x, y, w, h, dx, dy, source, mask) } static Bool -miDCDeviceInitialize(pDev, pScreen) - DeviceIntPtr pDev; - ScreenPtr pScreen; +miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) { miDCBufferPtr pBuffer; @@ -930,9 +905,7 @@ miDCDeviceInitialize(pDev, pScreen) } static void -miDCDeviceCleanup(pDev, pScreen) - DeviceIntPtr pDev; - ScreenPtr pScreen; +miDCDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) { miDCBufferPtr pBuffer; diff --git a/mi/miexpose.c b/mi/miexpose.c index e9b3a2d12..b1bc0135c 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -128,15 +128,9 @@ exposing is done by the backing store's GraphicsExpose function, of course. */ _X_EXPORT RegionPtr -miHandleExposures(pSrcDrawable, pDstDrawable, - pGC, srcx, srcy, width, height, dstx, dsty, plane) - DrawablePtr pSrcDrawable; - DrawablePtr pDstDrawable; - GCPtr pGC; - int srcx, srcy; - int width, height; - int dstx, dsty; - unsigned long plane; +miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, + GCPtr pGC, int srcx, int srcy, int width, int height, + int dstx, int dsty, unsigned long plane) { ScreenPtr pscr; RegionPtr prgnSrcClip; /* drawable-relative source clip */ @@ -350,12 +344,8 @@ miHandleExposures(pSrcDrawable, pDstDrawable, /* send GraphicsExpose events, or a NoExpose event, based on the region */ _X_EXPORT void -miSendGraphicsExpose (client, pRgn, drawable, major, minor) - ClientPtr client; - RegionPtr pRgn; - XID drawable; - int major; - int minor; +miSendGraphicsExpose (ClientPtr client, RegionPtr pRgn, XID drawable, + int major, int minor) { if (pRgn && !REGION_NIL(pRgn)) { @@ -401,10 +391,7 @@ miSendGraphicsExpose (client, pRgn, drawable, major, minor) void -miSendExposures(pWin, pRgn, dx, dy) - WindowPtr pWin; - RegionPtr pRgn; - int dx, dy; +miSendExposures( WindowPtr pWin, RegionPtr pRgn, int dx, int dy) { BoxPtr pBox; int numRects; @@ -464,9 +451,7 @@ miSendExposures(pWin, pRgn, dx, dy) } _X_EXPORT void -miWindowExposures(pWin, prgn, other_exposed) - WindowPtr pWin; - RegionPtr prgn, other_exposed; +miWindowExposures( WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed) { RegionPtr exposures = prgn; if ((prgn && !REGION_NIL(prgn)) || @@ -654,9 +639,7 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) * the GC. Useful when we have a scratch drawable and need to initialize * it. */ _X_EXPORT void -miClearDrawable(pDraw, pGC) - DrawablePtr pDraw; - GCPtr pGC; +miClearDrawable(DrawablePtr pDraw, GCPtr pGC) { XID fg = pGC->fgPixel; XID bg = pGC->bgPixel; diff --git a/mi/mifillarc.c b/mi/mifillarc.c index f68ddf468..2ca6a4d77 100644 --- a/mi/mifillarc.c +++ b/mi/mifillarc.c @@ -53,9 +53,7 @@ Author: Bob Scheifler, MIT X Consortium #define Dcos(d) cos((double)d*(M_PI/11520.0)) _X_EXPORT void -miFillArcSetup(arc, info) - xArc *arc; - miFillArcRec *info; +miFillArcSetup(xArc *arc, miFillArcRec *info) { info->y = arc->height >> 1; info->dy = arc->height & 1; @@ -307,10 +305,7 @@ miGetPieEdge( } _X_EXPORT void -miFillArcSliceSetup(arc, slice, pGC) - xArc *arc; - miArcSliceRec *slice; - GCPtr pGC; +miFillArcSliceSetup(xArc *arc, miArcSliceRec *slice, GCPtr pGC) { int angle1, angle2; @@ -776,11 +771,7 @@ miFillArcSliceD( * fill each arc as it comes. */ _X_EXPORT void -miPolyFillArc(pDraw, pGC, narcs, parcs) - DrawablePtr pDraw; - GCPtr pGC; - int narcs; - xArc *parcs; +miPolyFillArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) { int i; xArc *arc; diff --git a/mi/mifillrct.c b/mi/mifillrct.c index e7646cf38..06f018e27 100644 --- a/mi/mifillrct.c +++ b/mi/mifillrct.c @@ -67,11 +67,12 @@ SOFTWARE. * clipping to the destination */ _X_EXPORT void -miPolyFillRect(pDrawable, pGC, nrectFill, prectInit) - DrawablePtr pDrawable; - GCPtr pGC; - int nrectFill; /* number of rectangles to fill */ - xRectangle *prectInit; /* Pointer to first rectangle to fill */ +miPolyFillRect( + DrawablePtr pDrawable, + GCPtr pGC, + int nrectFill, /* number of rectangles to fill */ + xRectangle *prectInit /* Pointer to first rectangle to fill */ + ) { int i; int height; diff --git a/mi/mifpolycon.c b/mi/mifpolycon.c index d19f031d7..4a3acfd2b 100644 --- a/mi/mifpolycon.c +++ b/mi/mifpolycon.c @@ -71,18 +71,20 @@ static int GetFPolyYBounds(SppPointPtr pts, int n, double yFtrans, * interpolation involved because of the subpixel postioning. */ void -miFillSppPoly(dst, pgc, count, ptsIn, xTrans, yTrans, xFtrans, yFtrans) - DrawablePtr dst; - GCPtr pgc; - int count; /* number of points */ - SppPointPtr ptsIn; /* the points */ - int xTrans, yTrans; /* Translate each point by this */ - double xFtrans, yFtrans; /* translate before conversion - by this amount. This provides +miFillSppPoly( + DrawablePtr dst, + GCPtr pgc, + int count, /* number of points */ + SppPointPtr ptsIn, /* the points */ + int xTrans, int yTrans, /* Translate each point by this */ + double xFtrans, + double yFtrans /* translate before conversion + by this amount. This provides a mechanism to match rounding errors with any shape that must meet the polygon exactly. */ + ) { double xl = 0.0, xr = 0.0, /* x vals of left and right edges */ ml = 0.0, /* left edge slope */ diff --git a/mi/migc.c b/mi/migc.c index 46643ab26..7fb28c43f 100644 --- a/mi/migc.c +++ b/mi/migc.c @@ -39,16 +39,13 @@ from The Open Group. /* ARGSUSED */ _X_EXPORT void -miChangeGC(pGC, mask) - GCPtr pGC; - unsigned long mask; +miChangeGC(GCPtr pGC, unsigned long mask) { return; } _X_EXPORT void -miDestroyGC(pGC) - GCPtr pGC; +miDestroyGC(GCPtr pGC) { if (pGC->pRotatedPixmap) (*pGC->pScreen->DestroyPixmap) (pGC->pRotatedPixmap); @@ -62,8 +59,7 @@ miDestroyGC(pGC) */ _X_EXPORT GCOpsPtr -miCreateGCOps(prototype) - GCOpsPtr prototype; +miCreateGCOps(GCOpsPtr prototype) { GCOpsPtr ret; @@ -78,8 +74,7 @@ miCreateGCOps(prototype) } _X_EXPORT void -miDestroyGCOps(ops) - GCOpsPtr ops; +miDestroyGCOps(GCOpsPtr ops) { if (ops->devPrivate.val) xfree(ops); @@ -87,8 +82,7 @@ miDestroyGCOps(ops) _X_EXPORT void -miDestroyClip(pGC) - GCPtr pGC; +miDestroyClip(GCPtr pGC) { if (pGC->clientClipType == CT_NONE) return; @@ -109,11 +103,7 @@ miDestroyClip(pGC) } _X_EXPORT void -miChangeClip(pGC, type, pvalue, nrects) - GCPtr pGC; - int type; - pointer pvalue; - int nrects; +miChangeClip( GCPtr pGC, int type, pointer pvalue, int nrects) { (*pGC->funcs->DestroyClip) (pGC); if (type == CT_PIXMAP) @@ -140,8 +130,7 @@ miChangeClip(pGC, type, pvalue, nrects) } _X_EXPORT void -miCopyClip(pgcDst, pgcSrc) - GCPtr pgcDst, pgcSrc; +miCopyClip(GCPtr pgcDst, GCPtr pgcSrc) { RegionPtr prgnNew; @@ -165,18 +154,13 @@ miCopyClip(pgcDst, pgcSrc) /* ARGSUSED */ _X_EXPORT void -miCopyGC(pGCSrc, changes, pGCDst) - GCPtr pGCSrc; - unsigned long changes; - GCPtr pGCDst; +miCopyGC(GCPtr pGCSrc, unsigned long changes, GCPtr pGCDst) { return; } _X_EXPORT void -miComputeCompositeClip(pGC, pDrawable) - GCPtr pGC; - DrawablePtr pDrawable; +miComputeCompositeClip( GCPtr pGC, DrawablePtr pDrawable) { ScreenPtr pScreen; diff --git a/mi/miglblt.c b/mi/miglblt.c index 0155b5618..414773608 100644 --- a/mi/miglblt.c +++ b/mi/miglblt.c @@ -82,13 +82,15 @@ with the sample server. */ _X_EXPORT void -miPolyGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) - DrawablePtr pDrawable; - GC *pGC; - int x, y; - unsigned int nglyph; - CharInfoPtr *ppci; /* array of character info */ - pointer pglyphBase; /* start of array of glyphs */ +miPolyGlyphBlt( + DrawablePtr pDrawable, + GC *pGC, + int x, + int y, + unsigned int nglyph, + CharInfoPtr *ppci, /* array of character info */ + pointer pglyphBase /* start of array of glyphs */ + ) { int width, height; PixmapPtr pPixmap; @@ -196,13 +198,15 @@ miPolyGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) _X_EXPORT void -miImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) - DrawablePtr pDrawable; - GC *pGC; - int x, y; - unsigned int nglyph; - CharInfoPtr *ppci; /* array of character info */ - pointer pglyphBase; /* start of array of glyphs */ +miImageGlyphBlt( + DrawablePtr pDrawable, + GC *pGC, + int x, + int y, + unsigned int nglyph, + CharInfoPtr *ppci, /* array of character info */ + pointer pglyphBase /* start of array of glyphs */ + ) { ExtentInfoRec info; /* used by QueryGlyphExtents() */ XID gcvals[3]; diff --git a/mi/miinitext.c b/mi/miinitext.c index 56aa30b92..94becd2cd 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -454,9 +454,7 @@ void EnableDisableExtensionError(char *name, Bool enable) /*ARGSUSED*/ void -InitExtensions(argc, argv) - int argc; - char *argv[]; +InitExtensions(int argc, char *argv[]) { if (!noGEExtension) GEExtensionInit(); @@ -633,9 +631,7 @@ static ExtensionModule staticExtensions[] = { /*ARGSUSED*/ void -InitExtensions(argc, argv) - int argc; - char *argv[]; +InitExtensions(int argc, char *argv[]) { int i; ExtensionModule *ext; diff --git a/mi/mipointer.c b/mi/mipointer.c index 28f3b4e2e..8b673f4fe 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -81,11 +81,10 @@ static void miPointerDeviceCleanup(DeviceIntPtr pDev, static EventList* events; /* for WarpPointer MotionNotifies */ _X_EXPORT Bool -miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) - ScreenPtr pScreen; - miPointerSpriteFuncPtr spriteFuncs; - miPointerScreenFuncPtr screenFuncs; - Bool waitForUpdate; +miPointerInitialize (ScreenPtr pScreen, + miPointerSpriteFuncPtr spriteFuncs, + miPointerScreenFuncPtr screenFuncs, + Bool waitForUpdate) { miPointerScreenPtr pScreenPriv; @@ -125,9 +124,7 @@ miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) } static Bool -miPointerCloseScreen (index, pScreen) - int index; - ScreenPtr pScreen; +miPointerCloseScreen (int index, ScreenPtr pScreen) { miPointerPtr pPointer; DeviceIntPtr pDev; @@ -166,33 +163,26 @@ miPointerCloseScreen (index, pScreen) */ static Bool -miPointerRealizeCursor (pDev, pScreen, pCursor) - DeviceIntPtr pDev; - ScreenPtr pScreen; - CursorPtr pCursor; +miPointerRealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { SetupScreen(pScreen); return (*pScreenPriv->spriteFuncs->RealizeCursor) (pDev, pScreen, pCursor); } static Bool -miPointerUnrealizeCursor (pDev, pScreen, pCursor) - DeviceIntPtr pDev; - ScreenPtr pScreen; - CursorPtr pCursor; +miPointerUnrealizeCursor (DeviceIntPtr pDev, + ScreenPtr pScreen, + CursorPtr pCursor) { SetupScreen(pScreen); return (*pScreenPriv->spriteFuncs->UnrealizeCursor) (pDev, pScreen, pCursor); } static Bool -miPointerDisplayCursor (pDev, pScreen, pCursor) - DeviceIntPtr pDev; - ScreenPtr pScreen; - CursorPtr pCursor; +miPointerDisplayCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { miPointerPtr pPointer; - + /* return for keyboards */ if ((pDev->isMaster && !DevHasCursor(pDev)) || (!pDev->isMaster && pDev->u.master && !DevHasCursor(pDev->u.master))) @@ -207,10 +197,7 @@ miPointerDisplayCursor (pDev, pScreen, pCursor) } static void -miPointerConstrainCursor (pDev, pScreen, pBox) - DeviceIntPtr pDev; - ScreenPtr pScreen; - BoxPtr pBox; +miPointerConstrainCursor (DeviceIntPtr pDev, ScreenPtr pScreen, BoxPtr pBox) { miPointerPtr pPointer; @@ -222,22 +209,17 @@ miPointerConstrainCursor (pDev, pScreen, pBox) /*ARGSUSED*/ static void -miPointerPointerNonInterestBox (pDev, pScreen, pBox) - DeviceIntPtr pDev; - ScreenPtr pScreen; - BoxPtr pBox; +miPointerPointerNonInterestBox (DeviceIntPtr pDev, + ScreenPtr pScreen, + BoxPtr pBox) { /* until DIX uses this, this will remain a stub */ } /*ARGSUSED*/ static void -miPointerCursorLimits(pDev, pScreen, pCursor, pHotBox, pTopLeftBox) - DeviceIntPtr pDev; - ScreenPtr pScreen; - CursorPtr pCursor; - BoxPtr pHotBox; - BoxPtr pTopLeftBox; +miPointerCursorLimits(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, + BoxPtr pHotBox, BoxPtr pTopLeftBox) { *pTopLeftBox = *pHotBox; } @@ -245,11 +227,8 @@ miPointerCursorLimits(pDev, pScreen, pCursor, pHotBox, pTopLeftBox) static Bool GenerateEvent; static Bool -miPointerSetCursorPosition(pDev, pScreen, x, y, generateEvent) - DeviceIntPtr pDev; - ScreenPtr pScreen; - int x, y; - Bool generateEvent; +miPointerSetCursorPosition(DeviceIntPtr pDev, ScreenPtr pScreen, + int x, int y, Bool generateEvent) { SetupScreen (pScreen); @@ -261,14 +240,12 @@ miPointerSetCursorPosition(pDev, pScreen, x, y, generateEvent) return TRUE; } -/* Set up sprite information for the device. +/* Set up sprite information for the device. This function will be called once for each device after it is initialized in the DIX. - */ + */ static Bool -miPointerDeviceInitialize(pDev, pScreen) - DeviceIntPtr pDev; - ScreenPtr pScreen; +miPointerDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) { miPointerPtr pPointer; SetupScreen (pScreen); @@ -299,13 +276,11 @@ miPointerDeviceInitialize(pDev, pScreen) return TRUE; } -/* Clean up after device. +/* Clean up after device. This function will be called once before the device is freed in the DIX */ static void -miPointerDeviceCleanup(pDev, pScreen) - DeviceIntPtr pDev; - ScreenPtr pScreen; +miPointerDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) { if (!pDev->isMaster && pDev->u.master) return; @@ -320,10 +295,7 @@ miPointerDeviceCleanup(pDev, pScreen) /* Once signals are ignored, the WarpCursor function can call this */ _X_EXPORT void -miPointerWarpCursor (pDev, pScreen, x, y) - DeviceIntPtr pDev; - ScreenPtr pScreen; - int x, y; +miPointerWarpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { miPointerPtr pPointer; BOOL changedScreen = FALSE; @@ -506,8 +478,8 @@ miPointerAbsoluteCursor (int x, int y, unsigned long time) /* Move the pointer on the current screen, and update the sprite. */ static void -miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, - unsigned long time) +miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, + int x, int y, unsigned long time) { miPointerPtr pPointer; SetupScreen(pScreen); diff --git a/mi/mipoly.c b/mi/mipoly.c index 4c77fc268..5ec4bfd6a 100644 --- a/mi/mipoly.c +++ b/mi/mipoly.c @@ -67,12 +67,9 @@ SOFTWARE. _X_EXPORT void -miFillPolygon(dst, pgc, shape, mode, count, pPts) - DrawablePtr dst; - GCPtr pgc; - int shape, mode; - int count; - DDXPointPtr pPts; +miFillPolygon( DrawablePtr dst, GCPtr pgc, + int shape, int mode, + int count, DDXPointPtr pPts) { int i; int xorg, yorg; diff --git a/mi/mipolycon.c b/mi/mipolycon.c index 6aabad675..085bed3c6 100644 --- a/mi/mipolycon.c +++ b/mi/mipolycon.c @@ -72,11 +72,12 @@ static int getPolyYBounds(DDXPointPtr pts, int n, int *by, int *ty); * this code. */ _X_EXPORT Bool -miFillConvexPoly(dst, pgc, count, ptsIn) - DrawablePtr dst; - GCPtr pgc; - int count; /* number of points */ - DDXPointPtr ptsIn; /* the points */ +miFillConvexPoly( + DrawablePtr dst, + GCPtr pgc, + int count, /* number of points */ + DDXPointPtr ptsIn /* the points */ + ) { int xl = 0, xr = 0; /* x vals of left and right edges */ int dl = 0, dr = 0; /* decision variables */ diff --git a/mi/mipolygen.c b/mi/mipolygen.c index 7623fc40a..04bc2c67f 100644 --- a/mi/mipolygen.c +++ b/mi/mipolygen.c @@ -66,11 +66,12 @@ SOFTWARE. */ Bool -miFillGeneralPoly(dst, pgc, count, ptsIn) - DrawablePtr dst; - GCPtr pgc; - int count; /* number of points */ - DDXPointPtr ptsIn; /* the points */ +miFillGeneralPoly( + DrawablePtr dst, + GCPtr pgc, + int count, /* number of points */ + DDXPointPtr ptsIn /* the points */ + ) { EdgeTableEntry *pAET; /* the Active Edge Table */ int y; /* the current scanline */ diff --git a/mi/mipolypnt.c b/mi/mipolypnt.c index 56026bdbd..d16a95158 100644 --- a/mi/mipolypnt.c +++ b/mi/mipolypnt.c @@ -56,12 +56,13 @@ SOFTWARE. #include "mi.h" _X_EXPORT void -miPolyPoint(pDrawable, pGC, mode, npt, pptInit) - DrawablePtr pDrawable; - GCPtr pGC; - int mode; /* Origin or Previous */ - int npt; - xPoint *pptInit; +miPolyPoint( + DrawablePtr pDrawable, + GCPtr pGC, + int mode, /* Origin or Previous */ + int npt, + xPoint *pptInit + ) { int xorg; diff --git a/mi/mipolyrect.c b/mi/mipolyrect.c index 788624872..e7504ef16 100644 --- a/mi/mipolyrect.c +++ b/mi/mipolyrect.c @@ -56,11 +56,7 @@ SOFTWARE. #include "mi.h" _X_EXPORT void -miPolyRectangle(pDraw, pGC, nrects, pRects) - DrawablePtr pDraw; - GCPtr pGC; - int nrects; - xRectangle *pRects; +miPolyRectangle(DrawablePtr pDraw, GCPtr pGC, int nrects, xRectangle *pRects) { int i; xRectangle *pR = pRects; diff --git a/mi/mipolyseg.c b/mi/mipolyseg.c index 0cd9d416e..0832a601b 100644 --- a/mi/mipolyseg.c +++ b/mi/mipolyseg.c @@ -67,11 +67,7 @@ SOFTWARE. _X_EXPORT void -miPolySegment(pDraw, pGC, nseg, pSegs) - DrawablePtr pDraw; - GCPtr pGC; - int nseg; - xSegment *pSegs; +miPolySegment(DrawablePtr pDraw, GCPtr pGC, int nseg, xSegment *pSegs) { int i; diff --git a/mi/mipolytext.c b/mi/mipolytext.c index 82b16f7d2..7be40aef1 100644 --- a/mi/mipolytext.c +++ b/mi/mipolytext.c @@ -67,12 +67,7 @@ SOFTWARE. #include "mi.h" _X_EXPORT int -miPolyText8(pDraw, pGC, x, y, count, chars) - DrawablePtr pDraw; - GCPtr pGC; - int x, y; - int count; - char *chars; +miPolyText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, char *chars) { unsigned long n, i; int w; @@ -89,12 +84,7 @@ miPolyText8(pDraw, pGC, x, y, count, chars) } _X_EXPORT int -miPolyText16(pDraw, pGC, x, y, count, chars) - DrawablePtr pDraw; - GCPtr pGC; - int x, y; - int count; - unsigned short *chars; +miPolyText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, unsigned short *chars) { unsigned long n, i; int w; @@ -112,12 +102,7 @@ miPolyText16(pDraw, pGC, x, y, count, chars) } _X_EXPORT void -miImageText8(pDraw, pGC, x, y, count, chars) - DrawablePtr pDraw; - GCPtr pGC; - int x, y; - int count; - char *chars; +miImageText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, char *chars) { unsigned long n; FontPtr font = pGC->font; @@ -130,12 +115,8 @@ miImageText8(pDraw, pGC, x, y, count, chars) } _X_EXPORT void -miImageText16(pDraw, pGC, x, y, count, chars) - DrawablePtr pDraw; - GCPtr pGC; - int x, y; - int count; - unsigned short *chars; +miImageText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, + int count, unsigned short *chars) { unsigned long n; FontPtr font = pGC->font; diff --git a/mi/mipolyutil.c b/mi/mipolyutil.c index 6ec860a25..ed41a7d1a 100644 --- a/mi/mipolyutil.c +++ b/mi/mipolyutil.c @@ -161,13 +161,8 @@ miInsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline, */ Bool -miCreateETandAET(count, pts, ET, AET, pETEs, pSLLBlock) - int count; - DDXPointPtr pts; - EdgeTable *ET; - EdgeTableEntry *AET; - EdgeTableEntry *pETEs; - ScanLineListBlock *pSLLBlock; +miCreateETandAET(int count, DDXPointPtr pts, EdgeTable *ET, EdgeTableEntry *AET, + EdgeTableEntry *pETEs, ScanLineListBlock *pSLLBlock) { DDXPointPtr top, bottom; DDXPointPtr PrevPt, CurrPt; @@ -257,8 +252,7 @@ miCreateETandAET(count, pts, ET, AET, pETEs, pSLLBlock) */ void -miloadAET(AET, ETEs) - EdgeTableEntry *AET, *ETEs; +miloadAET(EdgeTableEntry *AET, EdgeTableEntry *ETEs) { EdgeTableEntry *pPrevAET; EdgeTableEntry *tmp; @@ -305,8 +299,7 @@ miloadAET(AET, ETEs) * */ void -micomputeWAET(AET) - EdgeTableEntry *AET; +micomputeWAET(EdgeTableEntry *AET) { EdgeTableEntry *pWETE; int inside = 1; @@ -344,8 +337,7 @@ micomputeWAET(AET) */ int -miInsertionSort(AET) - EdgeTableEntry *AET; +miInsertionSort(EdgeTableEntry *AET) { EdgeTableEntry *pETEchase; EdgeTableEntry *pETEinsert; @@ -381,8 +373,7 @@ miInsertionSort(AET) * Clean up our act. */ void -miFreeStorage(pSLLBlock) - ScanLineListBlock *pSLLBlock; +miFreeStorage(ScanLineListBlock *pSLLBlock) { ScanLineListBlock *tmpSLLBlock; diff --git a/mi/mipushpxl.c b/mi/mipushpxl.c index 6fc57db11..87ca1445e 100644 --- a/mi/mipushpxl.c +++ b/mi/mipushpxl.c @@ -93,11 +93,8 @@ bitsizeof(int) padding and sacnline unit == bitsizeof(int).) * in the server, we need to rename one of them */ _X_EXPORT void -miPushPixels(pGC, pBitMap, pDrawable, dx, dy, xOrg, yOrg) - GCPtr pGC; - PixmapPtr pBitMap; - DrawablePtr pDrawable; - int dx, dy, xOrg, yOrg; +miPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDrawable, + int dx, int dy, int xOrg, int yOrg) { int h, dxDivPPW, ibEnd; MiBits *pwLineStart; diff --git a/mi/miregion.c b/mi/miregion.c index bcf699417..7e9f5e109 100644 --- a/mi/miregion.c +++ b/mi/miregion.c @@ -237,9 +237,7 @@ InitRegions (void) *****************************************************************/ _X_EXPORT RegionPtr -miRegionCreate(rect, size) - BoxPtr rect; - int size; +miRegionCreate(BoxPtr rect, int size) { RegionPtr pReg; @@ -253,8 +251,7 @@ miRegionCreate(rect, size) } _X_EXPORT void -miRegionDestroy(pReg) - RegionPtr pReg; +miRegionDestroy(RegionPtr pReg) { pixman_region_fini (pReg); if (pReg != &miBrokenRegion) @@ -262,8 +259,7 @@ miRegionDestroy(pReg) } _X_EXPORT void -miPrintRegion(rgn) - RegionPtr rgn; +miPrintRegion(RegionPtr rgn) { int num, size; int i; @@ -282,17 +278,14 @@ miPrintRegion(rgn) } _X_EXPORT Bool -miRegionEqual(reg1, reg2) - RegionPtr reg1; - RegionPtr reg2; +miRegionEqual(RegionPtr reg1, RegionPtr reg2) { return pixman_region_equal (reg1, reg2); } #ifdef DEBUG Bool -miValidRegion(reg) - RegionPtr reg; +miValidRegion(RegionPtr reg) { int i, numRects; @@ -343,10 +336,7 @@ miValidRegion(reg) *****************************************************************/ _X_EXPORT void -miRegionInit(pReg, rect, size) - RegionPtr pReg; - BoxPtr rect; - int size; +miRegionInit(RegionPtr pReg, BoxPtr rect, int size) { if (rect) pixman_region_init_with_extents (pReg, rect); @@ -355,15 +345,13 @@ miRegionInit(pReg, rect, size) } _X_EXPORT void -miRegionUninit(pReg) - RegionPtr pReg; +miRegionUninit(RegionPtr pReg) { pixman_region_fini (pReg); } Bool -miRegionBreak (pReg) - RegionPtr pReg; +miRegionBreak (RegionPtr pReg) { xfreeData (pReg); pReg->extents = miEmptyBox; @@ -372,9 +360,7 @@ miRegionBreak (pReg) } _X_EXPORT Bool -miRectAlloc( - RegionPtr pRgn, - int n) +miRectAlloc(RegionPtr pRgn, int n) { RegDataPtr data; @@ -413,9 +399,7 @@ miRectAlloc( } _X_EXPORT Bool -miRegionCopy(dst, src) - RegionPtr dst; - RegionPtr src; +miRegionCopy(RegionPtr dst, RegionPtr src) { return pixman_region_copy (dst, src); } @@ -908,10 +892,11 @@ miSetExtents (RegionPtr pReg) */ /*ARGSUSED*/ _X_EXPORT Bool -miIntersect(newReg, reg1, reg2) - RegionPtr newReg; /* destination Region */ - RegionPtr reg1; - RegionPtr reg2; /* source regions */ +miIntersect( + RegionPtr newReg, /* destination Region */ + RegionPtr reg1, + RegionPtr reg2 /* source regions */ + ) { return pixman_region_intersect (newReg, reg1, reg2); } @@ -1010,11 +995,12 @@ miUnionO ( return TRUE; } -_X_EXPORT Bool -miUnion(newReg, reg1, reg2) - RegionPtr newReg; /* destination Region */ - RegionPtr reg1; - RegionPtr reg2; /* source regions */ +_X_EXPORT Bool +miUnion( + RegionPtr newReg, /* destination Region */ + RegionPtr reg1, + RegionPtr reg2 /* source regions */ + ) { return pixman_region_union (newReg, reg1, reg2); } @@ -1041,9 +1027,7 @@ miUnion(newReg, reg1, reg2) * */ _X_EXPORT Bool -miRegionAppend(dstrgn, rgn) - RegionPtr dstrgn; - RegionPtr rgn; +miRegionAppend(RegionPtr dstrgn, RegionPtr rgn) { int numRects, dnumRects, size; BoxPtr new, old; @@ -1227,9 +1211,7 @@ QuickSortRects( */ _X_EXPORT Bool -miRegionValidate(badreg, pOverlap) - RegionPtr badreg; - Bool *pOverlap; +miRegionValidate(RegionPtr badreg, Bool *pOverlap) { /* Descriptor for regions under construction in Step 2. */ typedef struct { @@ -1418,10 +1400,7 @@ bail: } _X_EXPORT RegionPtr -miRectsToRegion(nrects, prect, ctype) - int nrects; - xRectangle *prect; - int ctype; +miRectsToRegion(int nrects, xRectangle *prect, int ctype) { RegionPtr pRgn; @@ -1535,10 +1514,7 @@ miRectsToRegion(nrects, prect, ctype) *----------------------------------------------------------------------- */ _X_EXPORT Bool -miSubtract(regD, regM, regS) - RegionPtr regD; - RegionPtr regM; - RegionPtr regS; +miSubtract(RegionPtr regD, RegionPtr regM, RegionPtr regS) { return pixman_region_subtract (regD, regM, regS); } @@ -1563,17 +1539,16 @@ miSubtract(regD, regM, regS) *----------------------------------------------------------------------- */ _X_EXPORT Bool -miInverse(newReg, reg1, invRect) - RegionPtr newReg; /* Destination region */ - RegionPtr reg1; /* Region to invert */ - BoxPtr invRect; /* Bounding box for inversion */ +miInverse( + RegionPtr newReg, /* Destination region */ + RegionPtr reg1, /* Region to invert */ + BoxPtr invRect /* Bounding box for inversion */ + ) { return pixman_region_inverse (newReg, reg1, invRect); } _X_EXPORT int -miRectIn(region, prect) - RegionPtr region; - BoxPtr prect; +miRectIn(RegionPtr region, BoxPtr prect) { return pixman_region_contains_rectangle (region, prect); } @@ -1583,34 +1558,30 @@ miRectIn(region, prect) */ _X_EXPORT void -miTranslateRegion(pReg, x, y) - RegionPtr pReg; - int x; - int y; +miTranslateRegion(RegionPtr pReg, int x, int y) { pixman_region_translate (pReg, x, y); } _X_EXPORT void -miRegionReset(pReg, pBox) - RegionPtr pReg; - BoxPtr pBox; +miRegionReset(RegionPtr pReg, BoxPtr pBox) { pixman_region_reset (pReg, pBox); } _X_EXPORT Bool -miPointInRegion(pReg, x, y, box) - RegionPtr pReg; - int x, y; - BoxPtr box; /* "return" value */ +miPointInRegion( + RegionPtr pReg, + int x, + int y, + BoxPtr box /* "return" value */ + ) { return pixman_region_contains_point (pReg, x, y, box); } _X_EXPORT Bool -miRegionNotEmpty(pReg) - RegionPtr pReg; +miRegionNotEmpty(RegionPtr pReg) { return pixman_region_not_empty (pReg); } @@ -1623,8 +1594,7 @@ miRegionBroken(RegionPtr pReg) } _X_EXPORT void -miRegionEmpty(pReg) - RegionPtr pReg; +miRegionEmpty(RegionPtr pReg) { good(pReg); xfreeData(pReg); @@ -1634,8 +1604,7 @@ miRegionEmpty(pReg) } _X_EXPORT BoxPtr -miRegionExtents(pReg) - RegionPtr pReg; +miRegionExtents(RegionPtr pReg) { good(pReg); return(&pReg->extents); @@ -1877,8 +1846,7 @@ miClipSpans( /* find the band in a region with the most rectangles */ _X_EXPORT int -miFindMaxBand(prgn) - RegionPtr prgn; +miFindMaxBand(RegionPtr prgn) { int nbox; BoxPtr pbox; diff --git a/mi/miscrinit.c b/mi/miscrinit.c index 7ca5f5df1..9757113a5 100644 --- a/mi/miscrinit.c +++ b/mi/miscrinit.c @@ -61,15 +61,8 @@ typedef struct /* this plugs into pScreen->ModifyPixmapHeader */ _X_EXPORT Bool -miModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel, devKind, - pPixData) - PixmapPtr pPixmap; - int width; - int height; - int depth; - int bitsPerPixel; - int devKind; - pointer pPixData; +miModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth, + int bitsPerPixel, int devKind, pointer pPixData) { if (!pPixmap) return FALSE; @@ -140,8 +133,7 @@ miCloseScreen (int iScreen, ScreenPtr pScreen) * screen pixmap here. */ _X_EXPORT Bool -miCreateScreenResources(pScreen) - ScreenPtr pScreen; +miCreateScreenResources(ScreenPtr pScreen) { miScreenInitParmsPtr pScrInitParms; pointer value; @@ -180,10 +172,7 @@ miCreateScreenResources(pScreen) } Bool -miScreenDevPrivateInit(pScreen, width, pbits) - ScreenPtr pScreen; - int width; - pointer pbits; +miScreenDevPrivateInit(ScreenPtr pScreen, int width, pointer pbits) { miScreenInitParmsPtr pScrInitParms; @@ -201,19 +190,19 @@ miScreenDevPrivateInit(pScreen, width, pbits) } _X_EXPORT Bool -miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, - rootDepth, numDepths, depths, rootVisual, numVisuals, visuals) - ScreenPtr pScreen; - pointer pbits; /* pointer to screen bits */ - int xsize, ysize; /* in pixels */ - int dpix, dpiy; /* dots per inch */ - int width; /* pixel width of frame buffer */ - int rootDepth; /* depth of root window */ - int numDepths; /* number of depths supported */ - DepthRec *depths; /* supported depths */ - VisualID rootVisual; /* root visual */ - int numVisuals; /* number of visuals supported */ - VisualRec *visuals; /* supported visuals */ +miScreenInit( + ScreenPtr pScreen, + pointer pbits, /* pointer to screen bits */ + int xsize, int ysize, /* in pixels */ + int dpix, int dpiy, /* dots per inch */ + int width, /* pixel width of frame buffer */ + int rootDepth, /* depth of root window */ + int numDepths, /* number of depths supported */ + DepthRec *depths, /* supported depths */ + VisualID rootVisual, /* root visual */ + int numVisuals, /* number of visuals supported */ + VisualRec *visuals /* supported visuals */ + ) { pScreen->width = xsize; pScreen->height = ysize; @@ -304,23 +293,19 @@ miAllocateGCPrivateIndex() _X_EXPORT DevPrivateKey miZeroLineScreenKey = &miZeroLineScreenKey; _X_EXPORT void -miSetZeroLineBias(pScreen, bias) - ScreenPtr pScreen; - unsigned int bias; +miSetZeroLineBias(ScreenPtr pScreen, unsigned int bias) { dixSetPrivate(&pScreen->devPrivates, miZeroLineScreenKey, (pointer)bias); } _X_EXPORT PixmapPtr -miGetScreenPixmap(pScreen) - ScreenPtr pScreen; +miGetScreenPixmap(ScreenPtr pScreen) { return (PixmapPtr)(pScreen->devPrivate); } _X_EXPORT void -miSetScreenPixmap(pPix) - PixmapPtr pPix; +miSetScreenPixmap(PixmapPtr pPix) { if (pPix) pPix->drawable.pScreen->devPrivate = (pointer)pPix; diff --git a/mi/mispans.c b/mi/mispans.c index 6f30155f5..e59d711ae 100644 --- a/mi/mispans.c +++ b/mi/mispans.c @@ -180,11 +180,8 @@ static void miSubtractSpans (SpanGroup *spanGroup, Spans *sub) } } } - -void miAppendSpans(spanGroup, otherGroup, spans) - SpanGroup *spanGroup; - SpanGroup *otherGroup; - Spans *spans; + +void miAppendSpans(SpanGroup *spanGroup, SpanGroup *otherGroup, Spans *spans) { int ymin, ymax; int spansCount; @@ -217,8 +214,7 @@ void miAppendSpans(spanGroup, otherGroup, spans) } } /* AppendSpans */ -void miFreeSpanGroup(spanGroup) - SpanGroup *spanGroup; +void miFreeSpanGroup(SpanGroup *spanGroup) { if (spanGroup->group != NULL) xfree(spanGroup->group); } @@ -376,10 +372,7 @@ miDisposeSpanGroup (SpanGroup *spanGroup) } } -void miFillUniqueSpanGroup(pDraw, pGC, spanGroup) - DrawablePtr pDraw; - GCPtr pGC; - SpanGroup *spanGroup; +void miFillUniqueSpanGroup(DrawablePtr pDraw, GCPtr pGC, SpanGroup *spanGroup) { int i; Spans *spans; diff --git a/mi/misprite.c b/mi/misprite.c index 12180235f..25f6b6f8c 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -182,10 +182,9 @@ miSpriteReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure) */ Bool -miSpriteInitialize (pScreen, cursorFuncs, screenFuncs) - ScreenPtr pScreen; - miSpriteCursorFuncPtr cursorFuncs; - miPointerScreenFuncPtr screenFuncs; +miSpriteInitialize (ScreenPtr pScreen, + miSpriteCursorFuncPtr cursorFuncs, + miPointerScreenFuncPtr screenFuncs) { miSpriteScreenPtr pScreenPriv; VisualPtr pVisual; @@ -266,9 +265,7 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs) */ static Bool -miSpriteCloseScreen (i, pScreen) - int i; - ScreenPtr pScreen; +miSpriteCloseScreen (int i, ScreenPtr pScreen) { miSpriteScreenPtr pScreenPriv; DeviceIntPtr pDev; @@ -291,12 +288,9 @@ miSpriteCloseScreen (i, pScreen) } static void -miSpriteGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine) - DrawablePtr pDrawable; - int sx, sy, w, h; - unsigned int format; - unsigned long planemask; - char *pdstLine; +miSpriteGetImage (DrawablePtr pDrawable, int sx, int sy, int w, int h, + unsigned int format, unsigned long planemask, + char *pdstLine) { ScreenPtr pScreen = pDrawable->pScreen; miSpriteScreenPtr pScreenPriv; @@ -331,13 +325,8 @@ miSpriteGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine) } static void -miSpriteGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart) - DrawablePtr pDrawable; - int wMax; - DDXPointPtr ppt; - int *pwidth; - int nspans; - char *pdstStart; +miSpriteGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, + int *pwidth, int nspans, char *pdstStart) { ScreenPtr pScreen = pDrawable->pScreen; miSpriteScreenPtr pScreenPriv; @@ -390,9 +379,8 @@ miSpriteGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart) } static void -miSpriteSourceValidate (pDrawable, x, y, width, height) - DrawablePtr pDrawable; - int x, y, width, height; +miSpriteSourceValidate (DrawablePtr pDrawable, int x, int y, int width, + int height) { ScreenPtr pScreen = pDrawable->pScreen; miSpriteScreenPtr pScreenPriv; @@ -461,11 +449,8 @@ miSpriteCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) } static void -miSpriteBlockHandler (i, blockData, pTimeout, pReadmask) - int i; - pointer blockData; - pointer pTimeout; - pointer pReadmask; +miSpriteBlockHandler (int i, pointer blockData, pointer pTimeout, + pointer pReadmask) { ScreenPtr pScreen = screenInfo.screens[i]; miSpriteScreenPtr pPriv; @@ -511,8 +496,7 @@ miSpriteBlockHandler (i, blockData, pTimeout, pReadmask) } static void -miSpriteInstallColormap (pMap) - ColormapPtr pMap; +miSpriteInstallColormap (ColormapPtr pMap) { ScreenPtr pScreen = pMap->pScreen; miSpriteScreenPtr pPriv; @@ -546,10 +530,7 @@ miSpriteInstallColormap (pMap) } static void -miSpriteStoreColors (pMap, ndef, pdef) - ColormapPtr pMap; - int ndef; - xColorItem *pdef; +miSpriteStoreColors (ColormapPtr pMap, int ndef, xColorItem *pdef) { ScreenPtr pScreen = pMap->pScreen; miSpriteScreenPtr pPriv; @@ -676,10 +657,7 @@ miSpriteFindColors (miCursorInfoPtr pDevCursor, ScreenPtr pScreen) #define SPRITE_PAD 8 static Bool -miSpriteRealizeCursor (pDev, pScreen, pCursor) - DeviceIntPtr pDev; - ScreenPtr pScreen; - CursorPtr pCursor; +miSpriteRealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { miSpriteScreenPtr pScreenPriv; miCursorInfoPtr pCursorInfo; @@ -700,10 +678,7 @@ miSpriteRealizeCursor (pDev, pScreen, pCursor) } static Bool -miSpriteUnrealizeCursor (pDev, pScreen, pCursor) - DeviceIntPtr pDev; - ScreenPtr pScreen; - CursorPtr pCursor; +miSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { miSpriteScreenPtr pScreenPriv; @@ -713,12 +688,8 @@ miSpriteUnrealizeCursor (pDev, pScreen, pCursor) } static void -miSpriteSetCursor (pDev, pScreen, pCursor, x, y) - DeviceIntPtr pDev; - ScreenPtr pScreen; - CursorPtr pCursor; - int x; - int y; +miSpriteSetCursor (DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor, int x, int y) { miSpriteScreenPtr pScreenPriv; @@ -837,10 +808,7 @@ miSpriteSetCursor (pDev, pScreen, pCursor, x, y) } static void -miSpriteMoveCursor (pDev, pScreen, x, y) - DeviceIntPtr pDev; - ScreenPtr pScreen; - int x, y; +miSpriteMoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { miSpriteScreenPtr pScreenPriv; CursorPtr pCursor; @@ -859,9 +827,7 @@ miSpriteMoveCursor (pDev, pScreen, x, y) static Bool -miSpriteDeviceCursorInitialize(pDev, pScreen) - DeviceIntPtr pDev; - ScreenPtr pScreen; +miSpriteDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) { miSpriteScreenPtr pScreenPriv; miCursorInfoPtr pCursorInfo; @@ -895,9 +861,7 @@ miSpriteDeviceCursorInitialize(pDev, pScreen) } static void -miSpriteDeviceCursorCleanup(pDev, pScreen) - DeviceIntPtr pDev; - ScreenPtr pScreen; +miSpriteDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) { if (DevHasCursor(pDev)) { @@ -914,9 +878,7 @@ miSpriteDeviceCursorCleanup(pDev, pScreen) */ static void -miSpriteRemoveCursor (pDev, pScreen) - DeviceIntPtr pDev; - ScreenPtr pScreen; +miSpriteRemoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen) { miSpriteScreenPtr pScreenPriv; miCursorInfoPtr pCursorInfo; @@ -955,10 +917,8 @@ miSpriteRemoveCursor (pDev, pScreen) * before waiting for something to do. */ -static void -miSpriteSaveUnderCursor(pDev, pScreen) - DeviceIntPtr pDev; - ScreenPtr pScreen; +static void +miSpriteSaveUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen) { miSpriteScreenPtr pScreenPriv; int x, y; @@ -1002,9 +962,7 @@ miSpriteSaveUnderCursor(pDev, pScreen) */ static void -miSpriteRestoreCursor (pDev, pScreen) - DeviceIntPtr pDev; - ScreenPtr pScreen; +miSpriteRestoreCursor (DeviceIntPtr pDev, ScreenPtr pScreen) { miSpriteScreenPtr pScreenPriv; int x, y; @@ -1048,9 +1006,7 @@ miSpriteRestoreCursor (pDev, pScreen) */ static void -miSpriteComputeSaved (pDev, pScreen) - DeviceIntPtr pDev; - ScreenPtr pScreen; +miSpriteComputeSaved (DeviceIntPtr pDev, ScreenPtr pScreen) { miSpriteScreenPtr pScreenPriv; int x, y, w, h; diff --git a/mi/mivaltree.c b/mi/mivaltree.c index d9d07caad..9449db730 100644 --- a/mi/mivaltree.c +++ b/mi/mivaltree.c @@ -108,11 +108,8 @@ Equipment Corporation. * Compute the visibility of a shaped window */ _X_EXPORT int -miShapedWindowIn (pScreen, universe, bounding, rect, x, y) - ScreenPtr pScreen; - RegionPtr universe, bounding; - BoxPtr rect; - int x, y; +miShapedWindowIn (ScreenPtr pScreen, RegionPtr universe, RegionPtr bounding, + BoxPtr rect, int x, int y) { BoxRec box; BoxPtr boundBox; @@ -597,11 +594,12 @@ miTreeObscured( */ /*ARGSUSED*/ int -miValidateTree (pParent, pChild, kind) - WindowPtr pParent; /* Parent to validate */ - WindowPtr pChild; /* First child of pParent that was +miValidateTree ( + WindowPtr pParent, /* Parent to validate */ + WindowPtr pChild, /* First child of pParent that was * affected */ - VTKind kind; /* What kind of configuration caused call */ + VTKind kind /* What kind of configuration caused call */ + ) { RegionRec totalClip; /* Total clipping region available to * the marked children. pParent's clipList diff --git a/mi/miwideline.c b/mi/miwideline.c index f080ca11d..40f0d3e49 100644 --- a/mi/miwideline.c +++ b/mi/miwideline.c @@ -252,13 +252,16 @@ miFillRectPolyHelper ( } _X_EXPORT /* static */ int -miPolyBuildEdge (x0, y0, k, dx, dy, xi, yi, left, edge) - double x0, y0; - double k; /* x0 * dy - y0 * dx */ - int dx, dy; - int xi, yi; - int left; - PolyEdgePtr edge; +miPolyBuildEdge ( + double x0, + double y0, + double k, /* x0 * dy - y0 * dx */ + int dx, + int dy, + int xi, + int yi, + int left, + PolyEdgePtr edge) { int x, y, e; int xady; @@ -311,14 +314,17 @@ miPolyBuildEdge (x0, y0, k, dx, dy, xi, yi, left, edge) #define StepAround(v, incr, max) (((v) + (incr) < 0) ? (max - 1) : ((v) + (incr) == max) ? 0 : ((v) + (incr))) _X_EXPORT /* static */ int -miPolyBuildPoly (vertices, slopes, count, xi, yi, left, right, pnleft, pnright, h) - PolyVertexPtr vertices; - PolySlopePtr slopes; - int count; - int xi, yi; - PolyEdgePtr left, right; - int *pnleft, *pnright; - int *h; +miPolyBuildPoly ( + PolyVertexPtr vertices, + PolySlopePtr slopes, + int count, + int xi, + int yi, + PolyEdgePtr left, + PolyEdgePtr right, + int *pnleft, + int *pnright, + int *h) { int top, bottom; double miny, maxy; @@ -910,11 +916,9 @@ miRoundJoinFace (LineFacePtr face, PolyEdgePtr edge, Bool *leftEdge) } _X_EXPORT void -miRoundJoinClip (pLeft, pRight, edge1, edge2, y1, y2, left1, left2) - LineFacePtr pLeft, pRight; - PolyEdgePtr edge1, edge2; - int *y1, *y2; - Bool *left1, *left2; +miRoundJoinClip (LineFacePtr pLeft, LineFacePtr pRight, + PolyEdgePtr edge1, PolyEdgePtr edge2, + int *y1, int *y2, Bool *left1, Bool *left2) { double denom; @@ -935,11 +939,7 @@ miRoundJoinClip (pLeft, pRight, edge1, edge2, y1, y2, left1, left2) } _X_EXPORT int -miRoundCapClip (face, isInt, edge, leftEdge) - LineFacePtr face; - Bool isInt; - PolyEdgePtr edge; - Bool *leftEdge; +miRoundCapClip (LineFacePtr face, Bool isInt, PolyEdgePtr edge, Bool *leftEdge) { int y; int dx, dy; @@ -1525,14 +1525,10 @@ miCleanupSpanData (DrawablePtr pDrawable, GCPtr pGC, SpanDataPtr spanData) } _X_EXPORT void -miWideLine (pDrawable, pGC, mode, npt, pPts) - DrawablePtr pDrawable; - GCPtr pGC; - int mode; - int npt; - DDXPointPtr pPts; +miWideLine (DrawablePtr pDrawable, GCPtr pGC, + int mode, int npt, DDXPointPtr pPts) { - int x1, y1, x2, y2; + int x1, y1, x2, y2; SpanDataRec spanDataRec; SpanDataPtr spanData; long pixel; @@ -2023,12 +2019,8 @@ miWideDashSegment ( } _X_EXPORT void -miWideDash (pDrawable, pGC, mode, npt, pPts) - DrawablePtr pDrawable; - GCPtr pGC; - int mode; - int npt; - DDXPointPtr pPts; +miWideDash (DrawablePtr pDrawable, GCPtr pGC, + int mode, int npt, DDXPointPtr pPts) { int x1, y1, x2, y2; unsigned long pixel; diff --git a/mi/miwindow.c b/mi/miwindow.c index cb8400c0c..9f24c7e4c 100644 --- a/mi/miwindow.c +++ b/mi/miwindow.c @@ -57,12 +57,10 @@ SOFTWARE. #include "pixmapstr.h" #include "mivalidate.h" -_X_EXPORT void -miClearToBackground(pWin, x, y, w, h, generateExposures) - WindowPtr pWin; - int x,y; - int w,h; - Bool generateExposures; +_X_EXPORT void +miClearToBackground(WindowPtr pWin, + int x, int y, int w, int h, + Bool generateExposures) { BoxRec box; RegionRec reg; @@ -255,10 +253,11 @@ miCheckSubSaveUnder( *----------------------------------------------------------------------- */ Bool -miChangeSaveUnder(pWin, first) - WindowPtr pWin; - WindowPtr first; /* First window to check. +miChangeSaveUnder( + WindowPtr pWin, + WindowPtr first /* First window to check. * Used when pWin was restacked */ + ) { RegionRec rgn; /* Area obscured by saveUnder windows */ ScreenPtr pScreen; @@ -293,9 +292,7 @@ miChangeSaveUnder(pWin, first) *----------------------------------------------------------------------- */ void -miPostChangeSaveUnder(pWin, pFirst) - WindowPtr pWin; - WindowPtr pFirst; +miPostChangeSaveUnder(WindowPtr pWin, WindowPtr pFirst) { WindowPtr pParent, pChild; ChangeWindowAttributesProcPtr ChangeWindowAttributes; @@ -329,8 +326,7 @@ miPostChangeSaveUnder(pWin, pFirst) } void -miMarkWindow(pWin) - WindowPtr pWin; +miMarkWindow(WindowPtr pWin) { ValidatePtr val; @@ -345,10 +341,7 @@ miMarkWindow(pWin) } Bool -miMarkOverlappedWindows(pWin, pFirst, ppLayerWin) - WindowPtr pWin; - WindowPtr pFirst; - WindowPtr *ppLayerWin; +miMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, WindowPtr *ppLayerWin) { BoxPtr box; WindowPtr pChild, pLast; @@ -434,8 +427,7 @@ miMarkOverlappedWindows(pWin, pFirst, ppLayerWin) * and then send any regions still exposed to the client *****/ _X_EXPORT void -miHandleValidateExposures(pWin) - WindowPtr pWin; +miHandleValidateExposures(WindowPtr pWin) { WindowPtr pChild; ValidatePtr val; @@ -472,11 +464,7 @@ miHandleValidateExposures(pWin) } void -miMoveWindow(pWin, x, y, pNextSib, kind) - WindowPtr pWin; - int x,y; - WindowPtr pNextSib; - VTKind kind; +miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind) { WindowPtr pParent; Bool WasViewable = (Bool)(pWin->viewable); @@ -589,11 +577,10 @@ miRecomputeExposures ( } void -miSlideAndSizeWindow(pWin, x, y, w, h, pSib) - WindowPtr pWin; - int x,y; - unsigned int w, h; - WindowPtr pSib; +miSlideAndSizeWindow(WindowPtr pWin, + int x, int y, + unsigned int w, unsigned int h, + WindowPtr pSib) { WindowPtr pParent; Bool WasViewable = (Bool)(pWin->viewable); @@ -917,8 +904,7 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib) } WindowPtr -miGetLayerWindow(pWin) - WindowPtr pWin; +miGetLayerWindow(WindowPtr pWin) { return pWin->firstChild; } @@ -932,8 +918,7 @@ miGetLayerWindow(pWin) */ _X_EXPORT void -miSetShape(pWin) - WindowPtr pWin; +miSetShape(WindowPtr pWin) { Bool WasViewable = (Bool)(pWin->viewable); ScreenPtr pScreen = pWin->drawable.pScreen; @@ -1003,9 +988,7 @@ miSetShape(pWin) /* Keeps the same inside(!) origin */ _X_EXPORT void -miChangeBorderWidth(pWin, width) - WindowPtr pWin; - unsigned int width; +miChangeBorderWidth(WindowPtr pWin, unsigned int width) { int oldwidth; Bool anyMarked = FALSE; @@ -1072,10 +1055,7 @@ miChangeBorderWidth(pWin, width) } void -miMarkUnrealizedWindow(pChild, pWin, fromConfigure) - WindowPtr pChild; - WindowPtr pWin; - Bool fromConfigure; +miMarkUnrealizedWindow(WindowPtr pChild, WindowPtr pWin, Bool fromConfigure) { if ((pChild != pWin) || fromConfigure) { diff --git a/mi/mizerarc.c b/mi/mizerarc.c index 947b85aac..d3cc1958c 100644 --- a/mi/mizerarc.c +++ b/mi/mizerarc.c @@ -96,10 +96,7 @@ static miZeroArcPtRec oob = {65536, 65536, 0}; */ _X_EXPORT Bool -miZeroArcSetup(arc, info, ok360) - xArc *arc; - miZeroArcRec *info; - Bool ok360; +miZeroArcSetup(xArc *arc, miZeroArcRec *info, Bool ok360) { int l; int angle1, angle2; @@ -706,11 +703,7 @@ miZeroArcDashPts( } _X_EXPORT void -miZeroPolyArc(pDraw, pGC, narcs, parcs) - DrawablePtr pDraw; - GCPtr pGC; - int narcs; - xArc *parcs; +miZeroPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) { int maxPts = 0; int n, maxw = 0; diff --git a/mi/mizerclip.c b/mi/mizerclip.c index b167c5475..dd05040bc 100644 --- a/mi/mizerclip.c +++ b/mi/mizerclip.c @@ -405,17 +405,12 @@ the numerator is therefore (2^32 - 1), which does not overflow an unsigned * */ _X_EXPORT int -miZeroClipLine(xmin, ymin, xmax, ymax, - new_x1, new_y1, new_x2, new_y2, - adx, ady, - pt1_clipped, pt2_clipped, octant, bias, oc1, oc2) - int xmin, ymin, xmax, ymax; - int *new_x1, *new_y1, *new_x2, *new_y2; - int *pt1_clipped, *pt2_clipped; - unsigned int adx, ady; - int octant; - unsigned int bias; - int oc1, oc2; +miZeroClipLine(int xmin, int ymin, int xmax, int ymax, + int *new_x1, int *new_y1, int *new_x2, int *new_y2, + unsigned int adx, unsigned int ady, + int *pt1_clipped, int *pt2_clipped, + int octant, unsigned int bias, + int oc1, int oc2) { int swapped = 0; int clipDone = 0; diff --git a/mi/mizerline.c b/mi/mizerline.c index 6604a0923..e1e8e6e69 100644 --- a/mi/mizerline.c +++ b/mi/mizerline.c @@ -98,12 +98,12 @@ SOFTWARE. } _X_EXPORT void -miZeroLine(pDraw, pGC, mode, npt, pptInit) - DrawablePtr pDraw; - GCPtr pGC; - int mode; /* Origin or Previous */ - int npt; /* number of points */ - DDXPointPtr pptInit; +miZeroLine( + DrawablePtr pDraw, + GCPtr pGC, + int mode, /* Origin or Previous */ + int npt, /* number of points */ + DDXPointPtr pptInit) { int Nspans, current_y = 0; DDXPointPtr ppt; @@ -364,12 +364,13 @@ miZeroLine(pDraw, pGC, mode, npt, pptInit) } _X_EXPORT void -miZeroDashLine(dst, pgc, mode, nptInit, pptInit) -DrawablePtr dst; -GCPtr pgc; -int mode; -int nptInit; /* number of points in polyline */ -DDXPointRec *pptInit; /* points in the polyline */ +miZeroDashLine( + DrawablePtr dst, + GCPtr pgc, + int mode, + int nptInit, /* number of points in polyline */ + DDXPointRec *pptInit /* points in the polyline */ + ) { /* XXX kludge until real zero-width dash code is written */ pgc->lineWidth = 1; From 8cf7755a85f5c1e5da7805c12b7511581a368782 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 28 May 2008 18:05:25 +0930 Subject: [PATCH 617/634] Require x11proto 7.0.13, xextproto 7.0.4 and inputproto 1.9.99.1 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 46e103a47..ccb7c29f5 100644 --- a/configure.ac +++ b/configure.ac @@ -689,7 +689,7 @@ else RENDERPROTO="renderproto" fi -REQUIRED_MODULES="[randrproto >= 1.2] $RENDERPROTO [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto xextproto [xproto >= 7.0.9] xtrans [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto [inputproto >= 1.4.2] [kbproto >= 1.0.3]" +REQUIRED_MODULES="[randrproto >= 1.2] $RENDERPROTO [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto [xextproto >= 7.0.3] [xproto >= 7.0.13] xtrans [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto [inputproto >= 1.9.99.1] [kbproto >= 1.0.3]" REQUIRED_LIBS="xfont xau fontenc [pixman-1 >= 0.9.5]" dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas From f9bcecbe51e4cf0cb2d82ad953f8c6741ed5558b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 29 May 2008 17:42:49 +0930 Subject: [PATCH 618/634] Xext: only free events in case of core motion events. --- Xext/xtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xext/xtest.c b/Xext/xtest.c index 58e20ef81..9bd26ba03 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -500,7 +500,7 @@ ProcXTestFakeInput(client) xfree(master_event); } else (*dev->public.processInputProc)(ev, dev, nev); - if (!extension) + if (!extension && type == MotionNotify) xfree(ev); return client->noClientException; } From 150c2f55a508ed24b230f68e30ec140c0901d9ae Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Fri, 23 May 2008 03:09:04 +0200 Subject: [PATCH 619/634] Add xkbstr.h and xkbsrv.h to sdk_HEADERS --- include/Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/Makefile.am b/include/Makefile.am index 673a97685..7d5fee70b 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -50,10 +50,12 @@ sdk_HEADERS = \ validate.h \ window.h \ windowstr.h \ + xkbsrv.h \ + xkbstr.h \ xorg-server.h endif AM_CFLAGS = $(DIX_CFLAGS) EXTRA_DIST = $(sdk_HEADERS) do-not-use-config.h dix-config.h xorg-config.h \ - xkb-config.h xkbfile.h xkbsrv.h xkbstr.h + xkb-config.h xkbfile.h From 62c1a32976d571f3ced1812b8b96ed5a8e658b4a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 31 May 2008 10:24:37 +0930 Subject: [PATCH 620/634] dix: null out dummyDev, otherwise Xephyr dereferences random pointers. SendEventToAllWindow eventually causes a IsInterferingGrab(), which attempts to dereference dev->deviceGrab.grab. --- dix/devices.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index 60d48b25e..08520eb54 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -376,7 +376,8 @@ ActivateDevice(DeviceIntPtr dev) ev.time = currentTime.milliseconds; ev.devchange = DeviceAdded; ev.deviceid = dev->id; - dummyDev.id = 0; + + memset(&dummyDev, 0, sizeof(DeviceIntRec)); SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask, (xEvent *) &ev, 1); From 341a61b608873c77b1a17fe7d145ed3ad716e5a3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 31 May 2008 12:01:47 +0930 Subject: [PATCH 621/634] mi: reduce noisyness. DebugF is enough if device ID can't be changed. Also - printing out the event type is actually helpful. --- mi/mieq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mi/mieq.c b/mi/mieq.c index 830bab8a2..a1f9cc6da 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -254,9 +254,11 @@ ChangeDeviceID(DeviceIntPtr dev, xEvent* event) { // do nothing or drink a beer. your choice. } else - ErrorF("[mi] Unknown generic event, cannot change id.\n"); + DebugF("[mi] Unknown generic event (%d/%d), cannot change id.\n", + ((xGenericEvent*)ev)->extension, + ((xGenericEvent*)ev)->evtype); } else - ErrorF("[mi] Unknown event type, cannot change id.\n"); + DebugF("[mi] Unknown event type (%d), cannot change id.\n", type); } /** From 105d28652d1fb80dd8ce8511e2605dccc8812e99 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 30 May 2008 15:20:35 +0930 Subject: [PATCH 622/634] Xext: use GPE/GKE from XTestFakeInput #16145 This commit fixes two problems: 1) XTFI used to assemble the event itself, then passed it to the device. It's much easier to just pass the variables into GPE/GKE and let the DIX do the rest. 2) XTFI would pass the VCP/VCK as default device to event processing. As a result, updating LEDs would be updated on the VCK, not on the actual keyboard. Instead, we now pass the events through the last-used SD, thus toggling the LEDs on the last keyboard that sent through this MD. Also some cleanup in XTFI to merge validity checks a bit closer together rather than having several different sections. This breaks XTestFakeMotion with Xinerama though. X.Org Bug 16145 --- Xext/xtest.c | 308 ++++++++++++++++++--------------------------------- 1 file changed, 108 insertions(+), 200 deletions(-) diff --git a/Xext/xtest.c b/Xext/xtest.c index 9bd26ba03..ad70aa8e4 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -42,6 +42,7 @@ #include "scrnintstr.h" #include "dixevents.h" #include "sleepuntil.h" +#include "mi.h" #define _XTEST_SERVER_ #include #include @@ -164,8 +165,13 @@ ProcXTestFakeInput(client) WindowPtr root; Bool extension = FALSE; deviceValuator *dv = NULL; - int base; - int *values; + int valuators[MAX_VALUATORS] = {0}; + int numValuators = 0; + int firstValuator; + EventListPtr events; + int nevents; + int i; + int base = 0; nev = (stuff->length << 2) - sizeof(xReq); if ((nev % sizeof(xEvent)) || !nev) @@ -177,6 +183,18 @@ ProcXTestFakeInput(client) if (type >= EXTENSION_EVENT_BASE) { + extension = TRUE; + + /* check device */ + rc = dixLookupDevice(&dev, stuff->deviceid & 0177, client, + DixWriteAccess); + if (rc != Success) + { + client->errorValue = stuff->deviceid & 0177; + return rc; + } + + /* check type */ type -= DeviceValuator; switch (type) { case XI_DeviceKeyPress: @@ -191,12 +209,31 @@ ProcXTestFakeInput(client) client->errorValue = ev->u.u.type; return BadValue; } + + /* check validity */ if (nev == 1 && type == XI_DeviceMotionNotify) return BadLength; /* DevMotion must be followed by DevValuator */ + if (type == XI_DeviceMotionNotify) - base = ((deviceValuator *)(ev+1))->first_valuator; - else - base = 0; + { + firstValuator = ((deviceValuator *)(ev+1))->first_valuator; + if (firstValuator > dev->valuator->numAxes) + { + client->errorValue = ev->u.u.type; + return BadValue; + } + } else + firstValuator = 0; + + if (nev == 1 && type == XI_DeviceMotionNotify && !dev->valuator) + { + client->errorValue = dv->first_valuator; + return BadValue; + } + + + /* check validity of valuator events */ + base = firstValuator; for (n = 1; n < nev; n++) { dv = (deviceValuator *)(ev + n); @@ -210,17 +247,32 @@ ProcXTestFakeInput(client) client->errorValue = dv->first_valuator; return BadValue; } - if (!dv->num_valuators || dv->num_valuators > 6) + switch(dv->num_valuators) + { + case 6: valuators[base + 5] = dv->valuator5; + case 5: valuators[base + 4] = dv->valuator4; + case 4: valuators[base + 3] = dv->valuator3; + case 3: valuators[base + 2] = dv->valuator2; + case 2: valuators[base + 1] = dv->valuator1; + case 1: valuators[base] = dv->valuator0; + break; + default: + client->errorValue = dv->num_valuators; + return BadValue; + } + + base += dv->num_valuators; + numValuators += dv->num_valuators; + + if (firstValuator + numValuators > dev->valuator->numAxes) { client->errorValue = dv->num_valuators; return BadValue; } - base += dv->num_valuators; } type = type - XI_DeviceKeyPress + KeyPress; - extension = TRUE; - } - else + + } else { if (nev != 1) return BadLength; @@ -228,34 +280,26 @@ ProcXTestFakeInput(client) { case KeyPress: case KeyRelease: - case MotionNotify: + dev = PickKeyboard(client); + break; case ButtonPress: case ButtonRelease: + dev = PickPointer(client); + break; + case MotionNotify: + dev = PickPointer(client); + valuators[0] = ev->u.keyButtonPointer.rootX; + valuators[1] = ev->u.keyButtonPointer.rootY; + numValuators = 2; + firstValuator = 0; break; default: client->errorValue = ev->u.u.type; return BadValue; } - ev->u.u.type += (DeviceValuator - 1); - if (ev->u.u.type == DeviceMotionNotify) - { - /* fake up valuator */ - xEvent *ne = xalloc(2 * sizeof(xEvent)); - if (ne) { - memcpy(ne, ev, sizeof(xEvent)); - memcpy(&ne[1], ev, sizeof(xEvent)); - ev = ne; - - dv = (deviceValuator*)(ne + 1); - dv->type = DeviceValuator; - dv->first_valuator = 0; - dv->num_valuators = 2; - dv->valuator0 = ev->u.keyButtonPointer.rootX; - dv->valuator1 = ev->u.keyButtonPointer.rootY; - nev = 2; - } - } + if (dev->u.lastSlave) + dev = dev->u.lastSlave; } /* If the event has a time set, wait for it to pass */ @@ -288,37 +332,10 @@ ProcXTestFakeInput(client) return Success; } - if (extension) - { - rc = dixLookupDevice(&dev, stuff->deviceid & 0177, client, - DixWriteAccess); - if (rc != Success) - { - client->errorValue = stuff->deviceid & 0177; - return rc; - } - if (nev > 1) - { - dv = (deviceValuator *)(ev + 1); - if (!dev->valuator || dv->first_valuator >= dev->valuator->numAxes) - { - client->errorValue = dv->first_valuator; - return BadValue; - } - if (dv->first_valuator + dv->num_valuators > - dev->valuator->numAxes) - { - client->errorValue = dv->num_valuators; - return BadValue; - } - } - } switch (type) { case KeyPress: case KeyRelease: - if (!extension) - dev = PickKeyboard(client); if (ev->u.u.detail < dev->key->curKeySyms.minKeyCode || ev->u.u.detail > dev->key->curKeySyms.maxKeyCode) { @@ -327,66 +344,13 @@ ProcXTestFakeInput(client) } break; case MotionNotify: - if (extension) - { - if (ev->u.u.detail != xFalse && ev->u.u.detail != xTrue) - { - client->errorValue = ev->u.u.detail; - return BadValue; - } - /* detail is True for relative coordinates */ - if (ev->u.u.detail == xTrue && dev->valuator->mode == Absolute) - { - values = dev->valuator->axisVal + dv->first_valuator; - for (n = 1; n < nev; n++) - { - dv = (deviceValuator *)(ev + n); - switch (dv->num_valuators) - { - case 6: - dv->valuator5 += values[5]; - case 5: - dv->valuator4 += values[4]; - case 4: - dv->valuator3 += values[3]; - case 3: - dv->valuator2 += values[2]; - case 2: - dv->valuator1 += values[1]; - case 1: - dv->valuator0 += values[0]; - } - values += 6; - } - } - - /* For XI events, the actual event is mostly unset. Since we - * want to update the sprite nontheless, we need to fake up - * sane values for the event. */ - - ev->u.keyButtonPointer.root = None; - dv = (deviceValuator*)(ev + 1); - if (dv->num_valuators && dv->first_valuator == 0) - ev->u.keyButtonPointer.rootX = dv->valuator0; - else - ev->u.keyButtonPointer.rootX = 0; - - /* XXX: AFAIK, XI requires always sending _all_ valuators, - * i.e. you can't just send vals 3 - 7. (whot) */ - if (dv->num_valuators > 1 && dv->first_valuator == 0) - ev->u.keyButtonPointer.rootY = dv->valuator1; - else - ev->u.keyButtonPointer.rootY = 0; - } - - if (!dev) - dev = PickPointer(client); - if (ev->u.keyButtonPointer.root == None) + /* broken lib, XI events have root uninitialized */ + if (extension || ev->u.keyButtonPointer.root == None) root = GetCurrentRootWindow(dev); else { - rc = dixLookupWindow(&root, ev->u.keyButtonPointer.root, client, - DixGetAttrAccess); + rc = dixLookupWindow(&root, ev->u.keyButtonPointer.root, + client, DixGetAttrAccess); if (rc != Success) return rc; if (root->parent) @@ -395,91 +359,23 @@ ProcXTestFakeInput(client) return BadValue; } } - if (ev->u.u.detail == xTrue) - { - int x, y; - if (!extension || !dev->valuator->mode == Absolute) - { - /* if Absolute, rootX already has the final coords. */ - GetSpritePosition(dev, &x, &y); - ev->u.keyButtonPointer.rootX += x; - ev->u.keyButtonPointer.rootY += y; - } - } - else if (ev->u.u.detail != xFalse) + if (ev->u.u.detail != xTrue && ev->u.u.detail != xFalse) { client->errorValue = ev->u.u.detail; return BadValue; } -#ifdef PANORAMIX - if (!noPanoramiXExtension) { - ScreenPtr pScreen = root->drawable.pScreen; - BoxRec box; - int i; - int x = ev->u.keyButtonPointer.rootX + panoramiXdataPtr[0].x; - int y = ev->u.keyButtonPointer.rootY + panoramiXdataPtr[0].y; - if (!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum], - x, y, &box)) { - FOR_NSCREENS(i) { - if (i == pScreen->myNum) continue; - if (POINT_IN_REGION(pScreen, - &XineramaScreenRegions[i], - x, y, &box)) { - root = WindowTable[i]; - x -= panoramiXdataPtr[i].x; - y -= panoramiXdataPtr[i].y; - ev->u.keyButtonPointer.rootX = x; - ev->u.keyButtonPointer.rootY = y; - break; - } - } - } - } -#endif + /* FIXME: Xinerama! */ - if (ev->u.keyButtonPointer.rootX < 0) - ev->u.keyButtonPointer.rootX = 0; - else if (ev->u.keyButtonPointer.rootX >= root->drawable.width) - ev->u.keyButtonPointer.rootX = root->drawable.width - 1; - if (ev->u.keyButtonPointer.rootY < 0) - ev->u.keyButtonPointer.rootY = 0; - else if (ev->u.keyButtonPointer.rootY >= root->drawable.height) - ev->u.keyButtonPointer.rootY = root->drawable.height - 1; - -#ifdef PANORAMIX - if ((!noPanoramiXExtension - && root->drawable.pScreen->myNum - != XineramaGetCursorScreen(dev)) - || (noPanoramiXExtension && root != GetCurrentRootWindow(dev))) - -#else - if (root != GetCurrentRootWindow(dev)) -#endif - { - NewCurrentScreen(dev, root->drawable.pScreen, - ev->u.keyButtonPointer.rootX, - ev->u.keyButtonPointer.rootY); - return client->noClientException; - } - /* Only update sprite for MDs and floating SDs */ - if (dev->isMaster || (!dev->isMaster && !dev->u.master)) - { - (*root->drawable.pScreen->SetCursorPosition) - (dev, root->drawable.pScreen, - ev->u.keyButtonPointer.rootX, - ev->u.keyButtonPointer.rootY, FALSE); - } - dev->last.valuators[0] = ev->u.keyButtonPointer.rootX; - dev->last.valuators[1] = ev->u.keyButtonPointer.rootY; break; case ButtonPress: case ButtonRelease: if (!extension) + { dev = PickPointer(client); - - ev->u.keyButtonPointer.rootX = dev->last.valuators[0]; - ev->u.keyButtonPointer.rootY = dev->last.valuators[1]; + if (dev->u.lastSlave) + dev = dev->u.lastSlave; + } if (!ev->u.u.detail || ev->u.u.detail > dev->button->numButtons) { client->errorValue = ev->u.u.detail; @@ -489,19 +385,31 @@ ProcXTestFakeInput(client) } if (screenIsSaved == SCREEN_SAVER_ON) dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); - ev->u.keyButtonPointer.time = currentTime.milliseconds; - if (!dev->isMaster && dev->u.master) - { /* duplicate and route through master */ - xEvent *master_event = NULL; - CopyGetMasterEvent(dev->u.master, ev, &master_event, nev); - (*dev->public.processInputProc)(ev, dev, nev); - (*dev->public.processInputProc)(master_event, dev->u.master, nev); - xfree(master_event); - } else - (*dev->public.processInputProc)(ev, dev, nev); - if (!extension && type == MotionNotify) - xfree(ev); + GetEventList(&events); + switch(type) { + case MotionNotify: + nevents = GetPointerEvents(events, dev, type, 0, + (ev->u.u.detail == xFalse) ? POINTER_ABSOLUTE : 0, + firstValuator, numValuators, valuators); + break; + case ButtonPress: + case ButtonRelease: + nevents = GetPointerEvents(events, dev, type, ev->u.u.detail, + POINTER_ABSOLUTE, firstValuator, + numValuators, valuators); + break; + case KeyPress: + case KeyRelease: + nevents = GetKeyboardEvents(events, dev, type, ev->u.u.detail); + break; + } + + OsBlockSignals(); + for (i = 0; i < nevents; i++) + mieqEnqueue(dev, events->event); + OsReleaseSignals(); + return client->noClientException; } From 6cecae0e8651b1fa58b3cd0e0a636db46f56f6a6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 31 May 2008 13:12:53 +0930 Subject: [PATCH 623/634] dix: Remove superfluous comment. This code can handle devices with < 2 valuators now. --- dix/getevents.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index b5657a86e..37bd20323 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -893,8 +893,7 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, return 0; /* FIXME: I guess it should, in theory, be possible to post button events * from devices without valuators. */ - /* This method require at least valuator 0&1 defined on the InputDevice */ - if (!pDev->valuator || pDev->valuator->numAxes < 2) + if (!pDev->valuator) return 0; if (type == MotionNotify && num_valuators <= 0) return 0; From 942086fc965fc9a24be2db4f537f0ff54db51083 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 31 May 2008 18:17:49 +0930 Subject: [PATCH 624/634] dix: ProcQueryPointer doesn't need special grab handling, PickPointer does it --- dix/events.c | 13 ------------- hw/kdrive/ephyr/ephyrinit.c | 2 ++ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/dix/events.c b/dix/events.c index 73b7fa0f2..cec12f0b2 100644 --- a/dix/events.c +++ b/dix/events.c @@ -5410,7 +5410,6 @@ ProcQueryPointer(ClientPtr client) xQueryPointerReply rep; WindowPtr pWin, t; DeviceIntPtr mouse = PickPointer(client); - DeviceIntPtr dev; SpritePtr pSprite; int rc; REQUEST(xResourceReq); @@ -5423,18 +5422,6 @@ ProcQueryPointer(ClientPtr client) if (rc != Success) return rc; - for (dev = inputInfo.devices; dev; dev = dev->next) - { - if (dev->isMaster && IsPointerDevice(dev) && - dev->deviceGrab.grab && dev->deviceGrab.grab->coreGrab && - SameClient(dev->deviceGrab.grab, client)) - { - /* special case, we have a grab on the device so we need to return - * this one */ - mouse = dev; - } - } - pSprite = mouse->spriteInfo->sprite; if (mouse->valuator->motionHintWindow) MaybeStopHint(mouse, client); diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c index d415fe75f..e00791c18 100644 --- a/hw/kdrive/ephyr/ephyrinit.c +++ b/hw/kdrive/ephyr/ephyrinit.c @@ -295,6 +295,8 @@ miPointerSpriteFuncRec EphyrPointerSpriteFuncs = { ephyrUnrealizeCursor, ephyrSetCursor, ephyrMoveCursor, + NULL, + NULL }; From 58d12c99abc4d06cb8b43386d4bcd126f0bedf83 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 31 May 2008 18:45:11 +0930 Subject: [PATCH 625/634] mi: Remove #ifdef XINPUT, kdrive otherwise won't get events. --- mi/miinitext.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mi/miinitext.c b/mi/miinitext.c index 94becd2cd..3740daae5 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -475,9 +475,7 @@ InitExtensions(int argc, char *argv[]) #ifdef MULTIBUFFER if (!noMultibufferExtension) MultibufferExtensionInit(); #endif -#if defined(XINPUT) if (!noXInputExtension) XInputExtensionInit(); -#endif #ifdef XTEST if (!noTestExtensions) XTestExtensionInit(); #endif From f79ad5674ed41c3626e8055cd2bac0135de928c6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 31 May 2008 18:46:35 +0930 Subject: [PATCH 626/634] kdrive: fix up callers to KdQueueEvent, need to pass xEvent, not EventListPtr --- hw/kdrive/src/kinput.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index 005465fb6..5c686b665 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -1981,7 +1981,7 @@ KdReleaseAllKeys (void) GetEventList(&kdEvents); nEvents = GetKeyboardEvents(kdEvents, ki->dixdev, KeyRelease, key); for (i = 0; i < nEvents; i++) - KdQueueEvent (ki->dixdev, kdEvents + i); + KdQueueEvent (ki->dixdev, (kdEvents + i)->event); } } } @@ -2046,7 +2046,7 @@ KdEnqueueKeyboardEvent(KdKeyboardInfo *ki, GetEventList(&kdEvents); nEvents = GetKeyboardEvents(kdEvents, ki->dixdev, type, key_code); for (i = 0; i < nEvents; i++) - KdQueueEvent(ki->dixdev, kdEvents); + KdQueueEvent(ki->dixdev, (kdEvents + i)->event); } else { ErrorF("driver %s wanted to post scancode %d outside of [%d, %d]!\n", @@ -2148,7 +2148,7 @@ _KdEnqueuePointerEvent (KdPointerInfo *pi, int type, int x, int y, int z, nEvents = GetPointerEvents(kdEvents, pi->dixdev, type, b, absrel, 0, 3, valuators); for (i = 0; i < nEvents; i++) - KdQueueEvent(pi->dixdev, kdEvents + i); + KdQueueEvent(pi->dixdev, (kdEvents + i)->event); } void From a7ae9cbd78193fdafcafd5d7af1f6fabbb434628 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 31 May 2008 20:44:58 +0930 Subject: [PATCH 627/634] dix: don't read valuators past numAxes. --- dix/getevents.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dix/getevents.c b/dix/getevents.c index 37bd20323..fc07496f4 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -428,6 +428,8 @@ updateMotionHistory(DeviceIntPtr pDev, CARD32 ms, int first_valuator, for (i = first_valuator; i < first_valuator + num_valuators; i++) { + if (i >= v->numAxes) + break; memcpy(buff, &v->axes[i].min_value, sizeof(INT32)); buff += sizeof(INT32); memcpy(buff, &v->axes[i].max_value, sizeof(INT32)); From 5ebe76f13fb6e96cebe5a386024a73eceeb828ff Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 31 May 2008 22:13:03 +0930 Subject: [PATCH 628/634] config: init dev to NULL to shut up a valgrind warning. --- config/hal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/hal.c b/config/hal.c index 1d62a1de1..f4eb438ea 100644 --- a/config/hal.c +++ b/config/hal.c @@ -173,7 +173,7 @@ device_added(LibHalContext *hal_ctx, const char *udi) { char *path = NULL, *driver = NULL, *name = NULL, *config_info = NULL; InputOption *options = NULL, *tmpo = NULL; - DeviceIntPtr dev; + DeviceIntPtr dev = NULL; DBusError error; struct xkb_options xkb_opts = {0}; From 5a3d06b8f42473cea3741dc722a775deaa2b73f6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 1 Jun 2008 15:20:42 +0930 Subject: [PATCH 629/634] xkb: delete default rules when devices are closed. We only have one set of default rules options in xkb. When the second keyboard is brought up with Xkb options specified, these new options overwrite the old. In future server generations, the rules used for the VCK are a mixture of the default ones and ones previously specified for other keyboards. Simply resetting the xkb default rules to NULL avoids this issue. Reproducable by setting XkbLayout "de" and XkbVariant "nodeadkeys". In the second server generation, the VCK has "us(nodeadkeys)". This again produces a SIGABRT when the first key is hit. I could not figure out why the SIGABRT happens. This patch is avoiding the issue rather than fixing it. --- dix/devices.c | 3 +++ include/xkbsrv.h | 4 ++++ xkb/xkbInit.c | 15 +++++++++++++++ 3 files changed, 22 insertions(+) diff --git a/dix/devices.c b/dix/devices.c index 08520eb54..efdc0c945 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -847,6 +847,9 @@ CloseDownDevices(void) inputInfo.off_devices = NULL; inputInfo.keyboard = NULL; inputInfo.pointer = NULL; +#ifdef XKB + XkbDeleteRulesDflts(); +#endif } /** diff --git a/include/xkbsrv.h b/include/xkbsrv.h index 7db9eef0b..e2fff4eeb 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -899,6 +899,10 @@ extern void XkbSetRulesDflts( char * /* options */ ); +extern void XkbDeleteRulesDflts( + void +); + extern void XkbInitDevice( DeviceIntPtr /* pXDev */ ); diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c index 0d5d15ef3..47ad55369 100644 --- a/xkb/xkbInit.c +++ b/xkb/xkbInit.c @@ -279,6 +279,21 @@ XkbSetRulesDflts(char *rulesFile,char *model,char *layout, return; } +void +XkbDeleteRulesDflts() +{ + _XkbFree(XkbRulesFile); + XkbRulesFile = NULL; + _XkbFree(XkbModelDflt); + XkbModelDflt = NULL; + _XkbFree(XkbLayoutDflt); + XkbLayoutDflt = NULL; + _XkbFree(XkbVariantDflt); + XkbVariantDflt = NULL; + _XkbFree(XkbOptionsDflt); + XkbOptionsDflt = NULL; +} + /***====================================================================***/ #include "xkbDflts.h" From 5ba07cb54803b8c63e25e8ca1f1787860f684612 Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Sun, 1 Jun 2008 18:31:52 -0300 Subject: [PATCH 630/634] kdrive: changes ephyr API according mpx merge. This fix host-cursor in Xephyr server. Signed-off-by: Tiago Vignatti Signed-off-by: Peter Hutterer --- hw/kdrive/ephyr/ephyr.c | 8 +++++--- hw/kdrive/ephyr/ephyrinit.c | 8 +++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index d0fa99831..e5b16c95a 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -837,7 +837,7 @@ ephyrCrossScreen (ScreenPtr pScreen, Bool entering) int ephyrCurScreen; /*current event screen*/ static void -ephyrWarpCursor (ScreenPtr pScreen, int x, int y) +ephyrWarpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { ephyrBlockSigio (); ephyrCurScreen = pScreen->myNum; @@ -849,7 +849,9 @@ miPointerScreenFuncRec ephyrPointerScreenFuncs = { ephyrCursorOffScreen, ephyrCrossScreen, - ephyrWarpCursor + ephyrWarpCursor, + NULL, + NULL }; #ifdef XF86DRI @@ -911,7 +913,7 @@ ephyrPoll(void) if (ev.data.mouse_motion.screen >= 0) { ephyrWarpCursor - (screenInfo.screens[ev.data.mouse_motion.screen], + (inputInfo.pointer, screenInfo.screens[ev.data.mouse_motion.screen], ev.data.mouse_motion.x, ev.data.mouse_motion.y ); } diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c index e00791c18..1ec98fc82 100644 --- a/hw/kdrive/ephyr/ephyrinit.c +++ b/hw/kdrive/ephyr/ephyrinit.c @@ -290,12 +290,18 @@ ephyrMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) ; } +static Bool +ephyrDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) +{ + return TRUE; +} + miPointerSpriteFuncRec EphyrPointerSpriteFuncs = { ephyrRealizeCursor, ephyrUnrealizeCursor, ephyrSetCursor, ephyrMoveCursor, - NULL, + ephyrDeviceCursorInitialize, NULL }; From 95ecaa411aefbcd8e2e00814132cb07b4be4e5bf Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 2 Jun 2008 10:38:45 +0930 Subject: [PATCH 631/634] Revert "xfree86: suspend signals while removing a device." Left the signals blocked hanging after removing a master device. This reverts commit 74372fd0049676787904f1f9f80f836b97f5f60e. --- hw/xfree86/common/xf86Xinput.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 2ae463013..efebf1905 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -475,7 +475,6 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) drv = pInfo->drv; idev = pInfo->conf_idev; } - OsBlockSignals(); RemoveDevice(pDev); if (pDev->isMaster) @@ -485,7 +484,6 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) drv->UnInit(drv, pInfo, 0); else xf86DeleteInput(pInfo, 0); - OsReleaseSignals(); /* devices added through HAL aren't in the config layout */ it = xf86ConfigLayout.inputs; From ac1db454497ff1839aa7f7ee0649ede112824ed9 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 2 Jun 2008 10:40:10 +0930 Subject: [PATCH 632/634] xfree86: suspend signals while removing a device (corrected version). Block/Release is now symmetrical. --- hw/xfree86/common/xf86Xinput.c | 39 ++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index efebf1905..c6a4ef6d3 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -475,28 +475,31 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) drv = pInfo->drv; idev = pInfo->conf_idev; } + + OsBlockSignals(); RemoveDevice(pDev); - if (pDev->isMaster) - return; - - if(drv->UnInit) - drv->UnInit(drv, pInfo, 0); - else - xf86DeleteInput(pInfo, 0); - - /* devices added through HAL aren't in the config layout */ - it = xf86ConfigLayout.inputs; - while(*it && *it != idev) - it++; - - if (!(*it)) /* end of list, not in the layout */ + if (!pDev->isMaster) { - xfree(idev->driver); - xfree(idev->identifier); - xf86optionListFree(idev->commonOptions); - xfree(idev); + if(drv->UnInit) + drv->UnInit(drv, pInfo, 0); + else + xf86DeleteInput(pInfo, 0); + + /* devices added through HAL aren't in the config layout */ + it = xf86ConfigLayout.inputs; + while(*it && *it != idev) + it++; + + if (!(*it)) /* end of list, not in the layout */ + { + xfree(idev->driver); + xfree(idev->identifier); + xf86optionListFree(idev->commonOptions); + xfree(idev); + } } + OsReleaseSignals(); } /* From 26e7e69ab893d1f2b35213250ada40ec90944f62 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 2 Jun 2008 11:04:41 +0930 Subject: [PATCH 633/634] kdrive: don't post motion event if there was no motion. #16179 Based on the patch by Tomas Janousek. X.Org Bug 16179 --- hw/kdrive/src/kinput.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index 5c686b665..3f81b6562 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -2074,7 +2074,7 @@ KdEnqueuePointerEvent(KdPointerInfo *pi, unsigned long flags, int rx, int ry, int (*matrix)[3] = kdPointerMatrix.matrix; unsigned long button; int n; - int dixflags; + int dixflags = 0; if (!pi) return; @@ -2105,11 +2105,15 @@ KdEnqueuePointerEvent(KdPointerInfo *pi, unsigned long flags, int rx, int ry, z = rz; if (flags & KD_MOUSE_DELTA) - dixflags = POINTER_RELATIVE & POINTER_ACCELERATE; - else - dixflags = POINTER_ABSOLUTE; + { + if (x || y || z) + dixflags = POINTER_RELATIVE & POINTER_ACCELERATE; + } else if (x != pi->dixdev->last.valuators[0] || + y != pi->dixdev->last.valuators[1]) + dixflags = POINTER_ABSOLUTE; - _KdEnqueuePointerEvent(pi, MotionNotify, x, y, z, 0, dixflags, FALSE); + if (dixflags) + _KdEnqueuePointerEvent(pi, MotionNotify, x, y, z, 0, dixflags, FALSE); buttons = flags; From 45b661c67aca1a728f1793dd94d701488f1f196c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 4 Jun 2008 13:39:39 +0930 Subject: [PATCH 634/634] dix: Fix build with --disable-xinerama #16204 X.Org Bug 16204 --- dix/events.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dix/events.c b/dix/events.c index cec12f0b2..79d937331 100644 --- a/dix/events.c +++ b/dix/events.c @@ -782,8 +782,8 @@ XineramaChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) } #else -#define SyntheticMotion(x, y) \ - PostSyntheticMotion(x, y, \ +#define SyntheticMotion(dev, x, y) \ + PostSyntheticMotion(dev, x, y, \ 0, \ syncEvents.playingEvents ? \ syncEvents.time.milliseconds : \

    Name

    Xprt — Print server for X Version 11

    Synopsis

    Xprt [-ac] [-audit level] [-pn] [-fp fontpath] [-XpFile file] [-XpSpoolerType spoolername] [:display]

    DESCRIPTION

    Xprt is the Xprint print server - for version 11 of the X Window system for non display devices - such as printers and fax machines.

    Xprint is an advanced printing system which enables X11 - applications to use devices like printers, FAX or create - documents in formats like PostScript, PCL or PDF. It may be used by - clients such as mozilla. -

    Xprint is a very flexible, extensible, scalable, client/server - print system based on ISO 10175 (and some other specs) and the X11 - rendering protocol. - Using Xprint an application can search, query and use devices like - printers, FAX machines or create documents in formats like PDF. - In particular, an application can seek a printer, query supported - attributes (like paper size, trays, fonts etc.), configure the printer - device to match it's needs and print on it like on any other X device - reusing parts of the code which is used for the video card Xserver. -

    USAGE

    - Although Xprt may be invoked from the command line, it is - preferable to run it as a daemon via the init script - /etc/init.d/xprint (where this script exists). -

    Client programs such as mozilla will require environment - variable ${XPSERVERLIST} to be set, identifying the - "display" on which Xprt is running. This variable may be set - for all users via /etc/profile (or similar), using - /etc/init.d/xprint get_xpserverlist: -

    export XPSERVERLIST=`/etc/init.d/xprint get_xpserverlist`

    OPTIONS

    Many of Xprt's command line options are shared in common - with the usual X servers (see Xserver(1x)). - Commonly used options include:

    :display

    The X server runs on the given display. If multiple X - servers are to run simultaneously on a host, each must - have a unique display number. Note that the standard X - server (for video displays) typically runs on display - :0. If /etc/init.d/xprint is used - to invoke Xprt, it may be configured to automatically assign an available - display number.

    -ac

    disables host-based access control mechanisms. Enables access - by any host, and permits any host to modify the access control - list. Use with extreme caution. This option exists primarily - for running test suites remotely.

    -audit level

    sets the audit trail level. The default level is 1, meaning - only connection rejections are reported. Level 2 additionally - reports all successful connections and disconnects. Level 4 - enables messages from the SECURITY extension, if present, - including generation and revocation of authorizations and - violations of the security policy. Level 0 turns off the audit - trail. Audit lines are sent as standard error output.

    -fp fontpath

    sets the search path for fonts. This path is a comma - separated list of directories which Xprt searches for - font databases.

    -pn

    permits the server to continue running if it fails to - establish all of its well-known sockets (connection - points for clients), but establishes at least - one.

    -XpFile file

    Sets an alternate Xprinters file (see section FILES).

    -XpSpoolerType spoolername

    - Defines the spooler system to be used for print job spooling. - Supported values in xprint.mozdev.org release 009 are: -

    aix
    aix4
    bsd
    osf
    solaris
    sysv
    uxp
    cups
    lprng
    other
    none

    - (multiple values can be specified, separated by ':', the first active spooler will be chosen). - The default value is platform-specific and can be obtained via -

    Xprt -h

    . -

    ENVIRONMENT

    - The following environment variables are recognized by the X print server - (environment variables recognized by Xprint clients are described in - Xprint(7)): - -

    ${XPCONFIGDIR}

    This environment variable points to the root - of the Xprint server configuration directory hierarchy. - If the variable is not defined, the default - path is be assumed. The default path may be - /usr/X11R6/lib/X11/xserver/, - /usr/lib/X11/xserver/, - /usr/share/Xprint/xserver/ or - /usr/openwin/server/etc/XpConfig, depending on the - system, and may be configured in /etc/init.d/xprint.

    ${LANG}

    - This environment variable selects the locale settings used by the Xprint server. - Xprt allows language-specific settings (stored in ${XPCONFIGDIR}/${LANG}/print/) - which will override the default settings (stored in ${XPCONFIGDIR}/C/print/). - If ${LANG} is not set "C" is assumed. -

    FILES

    ${XPCONFIGDIR}/${LANG}/print/Xprinters, ${XPCONFIGDIR}/C/print/Xprinters

    - `Xprinters' is the top most configuration file. It tells - Xprt which specific printer names (e.g. mylaser) should - be supported, and whether lpstat(1) or other commands - should be used to automatically supplement the list of - printers. -

    ${XPCONFIGDIR}/${LANG}/print/attributes/printer, ${XPCONFIGDIR}/C/print/attributes/printer

    - The `printer' file maps printer names to model - configurations (see `model-config' below). For example, - "mylaser" could be mapped to a "HPDJ1600C", and all other - arbitrary printers could be mapped to a default, such as - "HPLJ4SI". When depending on lpstat(1) in the Xprinters - file, setting up defaults in `printer' becomes all the - more important. -

    ${XPCONFIGDIR}/${LANG}/print/attributes/document, ${XPCONFIGDIR}/C/print/attributes/document

    - The `document' file specifies the initial document values - for any print jobs. For example, which paper tray to - use, what default resolution, etc. -

    ${XPCONFIGDIR}/${LANG}/print/attributes/job, ${XPCONFIGDIR}/C/print/attributes/job

    - The `job' file specifies the initial job values for any - print jobs. For example, "notification-profile" can be - set so that when a print job is successfully sent to a - printer, e-mail is sent to the user. -

    ${XPCONFIGDIR}/C/print/models/PSdefault/model-config, ${XPCONFIGDIR}/C/print/models/PSdefault/fonts/fonts.dir, ${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00051.pmf, ${XPCONFIGDIR}/C/print/models/PSdefault/fonts/9nb00093.pmf

    - The `model-config' file has attributes that describe the - printer model's capabilities and default settings. - Printer model fonts may also be present. The model-config - file also identifies the print ddx driver to be used. - - For each printer model supported, a complete hierarchy of - files should exist. In most cases, these files do not - need to be modified. -

    ${XPCONFIGDIR}/C/print/ddx-config/raster/pdf, ${XPCONFIGDIR}/C/print/ddx-config/raster/pcl, ${XPCONFIGDIR}/C/print/ddx-config/raster/postscript

    - The print ddx drivers can have highly specific - configuration files to control their behavior. In most - cases, these files do not need to be modified. -

    SEE ALSO

    Xprint(7), X11(7), xplsprinters(1x), xprehashprinterlist(1x), xphelloworld(1x), xpxmhelloworld(1x), xpawhelloworld(1x), xpxthelloworld(1x), xpsimplehelloworld(1x), Xserver(1x), libXp(3x), libXprintUtils(3x), libXprintAppUtils(3x), XmPrintShell(3x), XawPrintShell(3x), Xprint FAQ (http://xprint.mozdev.org/docs/Xprint_FAQ.html), Xprint main site (http://xprint.mozdev.org/)

    AUTHORS

    - This manual page was written by - Drew Parsons and - Roland Mainz , - with some help from the man page at - http://www.sins.com.au/unix/manpages/Xprt.html and the XFree86 - man page for Xserver(1). -

    R_qv!peue%7|+Pb%oh%u9HKaYj2ok$uQ|4Fm1pI?rcyiaZTtveIZjBl9fD zZp_)E?AmeLAN8WF{Sa;Zv+bnh!hb_{d3HnBIb$wyEwio2TS%28AtTh(A-UV8=~=tI5;1oK3C>07xqN{BhyYh zmuGBNc5Jb2U~V#hV{hk1`tKL*GCq?1Nj&D>%;WJK{$4o6HA|I^oObq&$8XJ88RJ;y zTuXo1cFauqgl*Yxn$MW~lFDLp<8r=bRm^UB%LbP1I>UYj^di0JqFbyTb64sL+P{?c zZ>&4@BHJ!G$4=@8InR#@t~J?OZOfEhJK}W2?bq7MWB%Iq)E%t%8PP7R(>Kw6+RT5h zTBV*S{l&OsC7owJp9-JIzNB-4OP?9~LcNG}(XO4alrxUv?wnb98*D*oZ_*PSR^}jl z#_C^5F6Lgl{)FIWt}pE^duyCePT89>Tlr%_>cF(dX#P`^&B=qD(?q)rSL(l|e^9pZ zdwn%?R&|}rU6Hd#@yG+#4D0Bq{cU}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F}x3SBd(?oxAbrstli5 zM#PImp8hD7pNij|yJ`>X5&4Sx$(l_2-Q=wdvE$U`eI z$vCpC;?gGaW*_uioWrzyPS2mdIFE91zQ&m__eacxc-!Lbh|Pg$pU8d@?PkA64vkae z)!jF$tztawLuC7V#F2d{+sSu5%8M9k4DCaD?(aC*VmDJpWspb>n)a!O)0l}{xtj^>*cwa~?A{G-%h^53b;vV8& zqLWxotRU_qRucCU4-l(}2Z`0h8e%Q6j#y7TL~I~75}Sz4#1`UV;t}Fe;xXcJ;tAqO zVk@zY*iJk}>>!>db`raYXNYHs=ZM|J9^!doFR_n!f!I$RAPy2Q5-$-i6NiYyL>KW2 X@hb5e@j7vY_`m+8{UH1QejfC1iyIH4 diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00075.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00075.pmf deleted file mode 100644 index 1c7edf6536a12ea1a333c6140927356b64690c43..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5724 zcmdUzdvH@#9>;%4+q9u+^J<%>EhR05qLR`Fg;uN(lC+JsNl02~@ez=RR*G$*iY!u| zQshxU0VyhiA`cOKfbvj4)Lq9}a9nj~WJbkxcXf0@S4GfS+U)mtPHtLecV|cUukG}6 z@Av-hIluG%<(#XUIjuFGh*Tg6?2IA0A9r=+c{=V{u|)V6?-R5{i}7HKJimvGE0J-W z@*epc^hgtVK8@!oCOjY=`=1Vmr%4St2#B&1a8Kn*aUPeIir55^bPSj6oNEtw7Hr;*%MrG`1OC9`bMO~nS%}NGz|exrPatO; z>K9Al@a1L*BP=ukA|3bCuOS8_yJ{F{<5xC_4z{cTJ6XI0PO?B*>I4Y20o;JJ+D?dC zc>bvtVhSv(QxNSCqW9H{D}D7|SD=xczFL2MRlwn|_Bg51QR}H`40#>3Zt~5ZapzQ; zQ(x!tc|#4<@1e2Z0|osKr^j1GesWB72OL%IkSLCv)s6tl4h7s* zo?sms&@{KDtgN&=`oisX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iZXv*{jc!J)4W5qU1P)4g;b&BKv( zKK%yc^Z>@cgBH(cG^Kt(bKe(o}pc|8)wJ8I6Lm6=V(72py%lYdJ((CgLH^qrdQ}N z9igLij9#VJuvSmd$>{m^bvYahe${Zap@GZL@Uf`;uNjUNd=ge|-6)y2FdW|Ww4nE~ zE8(y;t?%8|jf%a$jde7SlJ`H{qxtCI-Z1{bXzU zpYIUaR6q@4KrDy@8W0b7mx|LIe_uhQBg8tnjFNHJ1AI6^)WaYEGe`lc0J}XA>9Ko3 z6ePq!LL|gzD=-jb14LNFMEP|o7x%#+4-5g=Jt0C8Vk99-V#f`x1H*wG6ab7pVkRMK z65^)(I5iUYQh>RM2#SwYpd4He#sL1vQvvw<)mShNIKX(|1TNqP=yya|bSm(Go50PW z2Gj!n$b}skVlE--VmAn|3qb6}=P)o4Oaj=AAqo@XFd-5XVlg2a6XG!u))`F!Q^6fz z8ki1dfSKS;`+lUhpi~2c84_!2$3*cmcc!UIGWfA@DMI i1sn!Pz)^4vyb4|e$H57361)!num6&+s{Mce9`sKNhz&IW diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00076.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00076.pmf deleted file mode 100644 index 2f077f40f62db0b74fffcb1069d4d316f74020b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5716 zcmdUzdvH@#9>>2oX_KZ+n^$T2CKj*=rnIHJM1jzT5^d9xq|kyiA_c5cd5R)y3lxYb z3dmCs6(0yFpp>FKR9qe1U0K&fo!xbueT<5;jtsDiitIx6d(O>G+fipn_pj~rbMNo| z?m55nJCFO#xmTGveXbFJLQ=_Ndf*%GGCf?_TD|Y=pD=uZlG1`6B zueHz@yFSV5dOI&zPQ-5_eKS;>W^W?fPU5+jNa89|D2&16I$?|-5fM#r=k$RMer$nv2)CRTq3Sc z=4U`O`t58Q4tkJGBb(=5U()Eu>dF8jYQjZhx$vwbyM=L>yeW*|a!k!Mbm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3jT_Q?8% zja0$U!r>dXaM!JQ@^S4a{I{+d>7>dUiih;5Ff?z+kF3q15>`&sF`c2bCEC4^)x9$p zHWoIYwV&`~SXUPAI#f$4*Xv^j~jj&h!kANX%>zV~tSy^EDF_eZUSMOcu7RXM7=S3>vok6e4@`YE|l z@^ojuY;9o8L~_U%_VP7n*FD(YbAQKO4gZ30R09pr0^|w~ zhkt9p0Pt=FPDk)M`8LAN430;FJWfB)BEPFA0uG@Jxbh5`2^3oCNPgq5#$^ z9F*Xp1Q#XvD8Whb;tD(n9s(o5DBuFfC7c!Svw#PT1_huHV2#0N2~JD!T7ugW{FdOj z1kWY7uKWrth+_zpf^lFxm;lN^IhY70fyv+zPywcZsbCtI4k|$vm;oLIkAa!saWD&1 zgV~@4)Pgx+E|>@EzW!E<0e*Z?+y=fNhh8EgSt!8WiRyZ~MVjbI0O3A_xNz)r9WG=tsX6|e{F z1^d8$@G5u>900F_H^4z~2)qdngCpQ5I0lY`6W}B`1>ORu!Q0>rI1AnZ=fJz*Ja`ZM OUw_2AM*qX_gZ>4l11vEB diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00079.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00079.pmf deleted file mode 100644 index 45d6906baa9805ce4b02fdd662195268f965ddc4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5656 zcmdUzd2keU7RSGR&7g8$9tch(Mh++D0uoSg$V`$6lbOlP1QLiw41pk!K!PB+t_X6- zjmRN~cyMS?K~NMFtWs;y+O@QHJ!;)$EmwEfJ=C>!x7HHK?Dze;X9!x#Zu!?v)o1$K zuix+W`~CXYulv{9)cV$Z%<8k)iVZ#s`-sJ3? z^u4khu*lhegZrMI+@YVumw2D`u{GsYM4g*q(L<8xPrM?E$Y>FMQX(QjCW*M6%plST z^Txdm>IT%g*$b5!U-l zqLpxAw7UNu(<5kJX@}xv6>Xg4qoy@l^yvHFaTMMF5HEvl?1G;fDF1So5sO zO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JYi@cOc1@-3HS5PpVX<>Xs98Ah^+e1sZKMvxoGNHU7tNNyrtGMe~EF7cB* zGKS=n02xbeCP7j_LZpy{$v7fkd?KWnaGY6tc>%}-GLcLolgSiv3z7;_pATvoNsUo+NS!6b;CN-p%%pttithiv!<%B19kUI(ACiQ1PS?MeyoF}ZpU>yc4 zF>oJQLhdIIkfmf9Sx#1vm1GrJP1caLq@Fa8b)=E3CmYB{vWaXaTgX=OAbE&9OdcVR zlE=t4vYqT8JIUkZ39^ekNuDCR$sV$oJWZO&KJpBCmOMxHlLO>=@&b90yhL6m&Eyqw ckQ^eflEdT(IZ9f{G4g-?>wH1>KmG0J-?9|HrT_o{ diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00082.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00082.pmf deleted file mode 100644 index 2000dc057a80f5d9733eeeb1cac8ea325e14c02a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5660 zcmdUzdvFv*9>>2uJ(J)G@(@Ld=t4jNSxh!Ovb@)1Aq$&L$Zmir8X*ZL0tpc0;gg3T z2m}yBX4K5d2B1g>vPcsiE$_UR$IofAz4MdpfCNu`-uW9WSk8iDymOnr zzK*~W@BB5M_wK?I`bqs#->2ufn(`82+Ge%rEJ5@jei1=3M#NZBB4QG`M#L;Kn@AxO z?O88VEGJee|2Cw=HVU1`znxNQFL{ReB%Bw;@+Ns(#6QTV#EJ6nYoa&1VIjLGMSCQZ zZDEQFc?mzG@bPHhPH{PlD>k8SqXjgpHDbA+JR{;o@@o-qk-v!eh*6$HUm0QR5~+C* zMSy3RK_R_$uT_jKtBe&_RH3w~v1$I|IdvEtDvd;|s$-$jFcJ;3>zaMBx`n=qrrFaP zF*zI=SCVkAmDbfZ+&CNYXegGzJjBC^$&unjiF+~DG;j8_SqK#uSH}}o(XeYpd1OjB zS{;vE6-IekB$jYxML1p-txQD9V%1ZSaZ;6Wf_QnTC=wfoa)c&@D?;PK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WPp^x+Gq?LI< zw#%U9t6==!FMrJ#w6BHJtSmCTbeKU2>Hh=GTINFKYQVMGjK z5yx{!0upJM1T!p9U_~-gkO~{pU`IMKkclA}iY%V096U#jz-7qB<+uV)jKnBhiK}om zT*$#_+V-9Y?TpnlU;a0R@J{F*r zhrWeagvD5bUtuYJ%_HkF{DvpMJFo(6Scz4*6RWWXYq1V@aV*zk1MbE~Y{EU*%>2Ct zTX7$@VLLi-KOVq?cnF=?frs%3cH&VyhFy3ZyRipPU@xBJ*>N9t4bR|N>_-<4;5j^x zgE)k4ynq*R7)S6Dj^Y?z#w+N-@zDA9gdC3LKWjJ^vVm*Z@Dc|9bB5zCHd`GG^aIw> z>fpx{)WHqCk{#!PY>tw#F@*MR$NA8+{w`ETFZ(_BpgnMCpE@Y~i@UI;Y}j9;qpImP zO~$Ten#?$4d>eX0dX^FIT5p3*THkc+mhnp;B1R2ir20{Q%%Oey!Ynil<<$K73-eVj z%pT5!g+Fm7Tpa&P`yxC}U6%b5oCBAPd)T}XdbVFHBgR~NmiJJ3F@72wdc)6mT2|xs zfp>ltVs7JBg&0W;i6wC)o`_vlA`!)th?(%i39}wMnk17H!jmZTA3xj>@l7V3WROfU zgbXEFWEgRf;ba84jAWC`iP#-G2~SPTl3+U%;sP| z2QxZ90+LT9v_c;M diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00086.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00086.pmf deleted file mode 100644 index b7586ca61afa1edfe38954ab63e661c67809b964..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5716 zcmdUzdvH@#9>>48rH`~tlk}CeNQk9aP=ifru@$hyHndsOG$iQ@AK@X@3Rs{bXr(+A zE1;q%3Mh(#R0LE6c_`|->g>qwILZv`j=Ly2&MxCyS_Opc_ndogC^Ksv-M{uuKKK6a z@BYs3{LbV4a?Vv+rp`(Npb#V35D(1fHBP&~f!C}70Dtm%vVqTe0M)A$-Zxy}G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Ifa<^TWy diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00087.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00087.pmf deleted file mode 100644 index 82f054999a47d3768a254b79fca8c6b31643224c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5752 zcmdUzdvH@#9>;&_BOz^)n@68iO039BQrl8Wi>wfmKqGBhl9W=c6oFQYP$&gN1(Ao8 zmplrng(3y31*C}bP*I`ovg$G{I?Apx!z^xD6=y|Pc87O!_j}H{H?8aJ>@54&cKXTv z-rxP5-}#+$&;2FmYO1Er))A2g7(sg^(E=PJl=Epg=0*|WpI`5xCu+ipT{-_04O`G~ zqo#>(BBCjtfq~8-LDkuqhi+mLmsM|?dw-X8!J6&Gi7%C>`c#q#X z##6z2Bv-!EkM1k{o-y7)5aXz>o0Xe8Brkly<8u|cS<6gvIg2au`6y_DDn=I}4QIgR z!9cind&G$tE{!X3x|OcjWpZ?%Cx!!TH8QEExnc0~`GqP|Ki_84%Hgzd`W?o)qy1jeaIPn)3`JHUa)9ucJ z0y}RLuw(K){_!4nI+_<2vMEspXcq&thlgkP&V6`B^;EmVo|m05IPX6Dcr20XSvB^| z^sMwO!oBtQON;z&^|oP+dHe-lpQoa@DBxusV;HI_h$T1H=LrNb8-bwL#}i{Kls(H` zfA%%v0ns+y%p}rIyzclOMMR&P=1cSS{;J33F38fliy9A}o_&&A>PU*E&!At3znE}7X&kd_7TQ+CT}`}9c>JP1 z*LUceMO!)@o62+~3Ss9K-Pfv)-Y=a(%*#KaG(^p@{4U|V+0%*Q(J4n;bj^`}id=`7 zF6}m5v;NC#AEI7diE3eXmS^YC*gC{%jbLNHV5wob@qTMe4bYpIkG#nIF1NFjUz`7? z`p{`>U)4vm&KAKna@HKMI#eIcD(ls-&l+n=*q&(lv#RAQJ&>n)77O1g_ZY-9%USzP z%FHxh94nO+wZQU8!g<4x>#Kflk60@0G&Nza*x%&DnuPO--$tXBhYm;$mXl)s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T{;z+wUu6HEzX$yj(_7ox diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00090.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00090.pmf deleted file mode 100644 index 895cfe26ae18ce74bdd96a13ee4d4141a47a9a9c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5736 zcmdUzdvH|M9ml_S6L$03o87zvg|0yeq8pMBAd%-L*^t$+3A-C0f&?L;JOhaZ6|Epq z1W`Z`0eJ+FmkKI~JR*XOR@*|cqjiQqI*d>i9bbcpf+pMVIp^L@tW(hH0t@;yQAJF#3_3g)xj23!{qMCXA_M8p-nW z@;egyCNB$w@i{M#o5p$?_9MJ(7p3-)7s)~^FGoerU&sf-_=J2)(zoz(i8vnQrIomL zF}_%Y!{5!I!N7qy8eN&Dd`F`fi)(H&Up#WrcvR%9A$x`K8u_Cz-s6}i(XezT<@B{R z)2Lz1-;bcd+M&HcV*w30`j%y7mDT>zKn+SNM^sf04|uA|eI+RKjPO;|)cQRmyr`Zv zb?)SbMvV6QhL?v_UUB`5Is_{`{ty}v^oBHiax$FbRm_}J8!|()4yzGdy zOTFqwbrvJ5J*7rd;xXJEN6BrBj9ZL`yTKjlx!YYhpfKN^-!C_pmjdHb>Dgz!d;5jZ&MTJY2 z3A#A+-oPktX%35z7$FA4=$=b-&lTyM%k3&EU_S=BMsZb4t)Jz}%gN8l2Pf1U7+o1C zHRp=U${VQg`MtGOl|i3qkI|c1A+EAp{oY`ZgAfe){4yT7cg4z7Ki4i}LyT(uQmo`F z?$5h3-Jj*p^1F7$tTz4rx74oOkBda?4)Kf9ZFODrRdnRGB{c8HguXBL#GRN1B zrt}M1GIz^EdX1wgV=Th-DNb!pJDX9j-9)=F<$UV8^oyt#WjkHAHLJ4Pa$AwGqk6N_ zx2+P9BnW*0HzkN0!aE&ayQ}FB1ORciTEdIuM$3%&iWr@K5gw=eZJ|Vbx!;$;*+d@AZ-!zC4EoC z=Uu(p^wB=lc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+$?(^9XbPAa`M@>@i{d=GMow;BFiM1uuUJc4zC6*j~mmS>Q7B+yYu zA{=lc3CT!7D$uK@u&^|${!}+4ot)(9vvrR3hu;RJpWC@bj-j^%tAe8V-Alxjkudf z!MT{nDMMAkT#h@emfF2@m5DEXJc)f~9y2%Xm&VKtt@ z8a$1)Scmm^1{<&uo3I(p*n+LthG(%IJFpYGup7_edAz_A|W38+b(iDpNj}WoXM()Uo8GnGamgmBzaHOxF1?{gJ-1zakF8 zF;FSnXxme-;$tkh&{raTXp8YNVpKjNR%?wKLs8C%zwOxO_UDJoRC|n1#3bnrVM7=aAzi#!U6A+@ez9 zC)NkY#2i~Wc4GVl-K-tYcT&~(?~7>^i6)&0=YVs8(ru+|04Fy${AF#+kGKdT&Lv zjCe>fDIt6-p}KC$YSy+SwfbQ$H+4BIC+9B zCo9NG@+4VBR+Fd58uBz*OV*L~|+^ zWDnU(UL-G(m&rb|pS(g2kXOk;a)=xzM@S2KjT|MflVjvK`M>_ze-izF{vPyCa&zKc diff --git a/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00091.pmf b/hw/xprint/config/C/print/models/HPLJ4family/fonts/9nb00091.pmf deleted file mode 100644 index 3bdcae4ba33d7453c1e4c6bba4cbd68958e11025..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5744 zcmdUzdvFv*9>>3%gxw^Y-JN|U;UTU(1kueUA&>xSSdt~#BiV%PhKGWYrv?H60t5vV zLXd}`AOS%GL=g}bR33sL0wq;=9-N-&U5QmvhZn^Xd?1B~n4SA}&rTBS>h9|FuS?}K z^PQf4{JN+6yVGNsJYj|jfPq-Zp;%xZ&oR;Ki9Dyr0sNQu;}d`eUU;I{AFyB}3l7%r zvwW2eSQNcJ&Fk3?UNE1ieq{m4Ke29qH|l#+Xds3cQJ zw;&I5NWw`T771~Qht;}xhQe}~hwY-&Zt^NwY~@LAH@_kOfj6GSVjRc`Z4Q__?Z z%DIzf)nKGQP*51w(uP!5O+={37Yu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U4-l(}2Z`0h8e%Q6j#y7TL~I~75}Sz4#1`UV;t}Fe;xXcJ;tAqO zVk@zY*iJk}>>!>db`raYXNYHs=ZM|J9^!doFR_n!f!I$RAPy2Q5-$-i6NiYyL>KW2 X@hb5e@j7vY_`m+8{UH1QejfC1iyIH4 diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00075.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00075.pmf deleted file mode 100644 index 1c7edf6536a12ea1a333c6140927356b64690c43..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5724 zcmdUzdvH@#9>;%4+q9u+^J<%>EhR05qLR`Fg;uN(lC+JsNl02~@ez=RR*G$*iY!u| zQshxU0VyhiA`cOKfbvj4)Lq9}a9nj~WJbkxcXf0@S4GfS+U)mtPHtLecV|cUukG}6 z@Av-hIluG%<(#XUIjuFGh*Tg6?2IA0A9r=+c{=V{u|)V6?-R5{i}7HKJimvGE0J-W z@*epc^hgtVK8@!oCOjY=`=1Vmr%4St2#B&1a8Kn*aUPeIir55^bPSj6oNEtw7Hr;*%MrG`1OC9`bMO~nS%}NGz|exrPatO; z>K9Al@a1L*BP=ukA|3bCuOS8_yJ{F{<5xC_4z{cTJ6XI0PO?B*>I4Y20o;JJ+D?dC zc>bvtVhSv(QxNSCqW9H{D}D7|SD=xczFL2MRlwn|_Bg51QR}H`40#>3Zt~5ZapzQ; zQ(x!tc|#4<@1e2Z0|osKr^j1GesWB72OL%IkSLCv)s6tl4h7s* zo?sms&@{KDtgN&=`oisX`dpl|h@1|8s9H3D8Wd6KLp2;hryH#h+U1rHvZXYk-rCL~H1U7b0s(3?4IZc*!yg5sI?70)fXV`NcLNgdUDJrnBPj$qK|^thC0>JYG>7v0iyL%Da)~qgdJ&A3r%MgyZS~`o1*E9gfrSsy_fU$jF+10tob5ycCI&t!y(1Tq@T_1(5<|J zw)eNkv?d?YkClC;a%O9@JJL*XQ_-%*lvQcx(9c}%gp?^M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0b7mx|LIe_uhQBg8tnjFNHJ1AI6^)WaYEGe`lc0J}XA>9Ko3 z6ePq!LL|gzD=-jb14LNFMEP|o7x%#+4-5g=Jt0C8Vk99-V#f`x1H*wG6ab7pVkRMK z65^)(I5iUYQh>RM2#SwYpd4He#sL1vQvvw<)mShNIKX(|1TNqP=yya|bSm(Go50PW z2Gj!n$b}skVlE--VmAn|3qb6}=P)o4Oaj=AAqo@XFd-5XVlg2a6XG!u))`F!Q^6fz z8ki1dfSKS;`+lUhpi~2c84_!2$3*cmcc!UIGWfA@DMI i1sn!Pz)^4vyb4|e$H57361)!num6&+s{Mce9`sKNhz&IW diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00076.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00076.pmf deleted file mode 100644 index 2f077f40f62db0b74fffcb1069d4d316f74020b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5716 zcmdUzdvH@#9>>2oX_KZ+n^$T2CKj*=rnIHJM1jzT5^d9xq|kyiA_c5cd5R)y3lxYb z3dmCs6(0yFpp>FKR9qe1U0K&fo!xbueT<5;jtsDiitIx6d(O>G+fipn_pj~rbMNo| z?m55nJCFO#xmTGveXbFJLQ=_Ndf*%GGCf?_TD|Y=pD=uZlG1`6B zueHz@yFSV5dOI&zPQ-5_eKS;>W^W?fPU5+jNa89|D2&16I$?|-5fM#r=k$RMer$nv2)CRTq3Sc z=4U`O`t58Q4tkJGBb(=5U()Eu>dF8jYQjZhx$vwbyM=L>yeW*|a!k!Mbm^pwWla$p zUPiuHO{1P3s6@dnn*HqWmRR%n@<9+2A=c)EpHH7`1YAk(Up3&5NR||qw9)E}<6ZD2A`6@!=)tmk~^IN9PhNq$;91Jy7c~viJef8d| zaL_l|i`p8WKct!gZ?LASF6686hwIVpqM_Rbg0-G)1R0__YH!!ItP@zo?mykD5 z<@0;PwKYMXXo2}^t`Jw$O@41M$ZiKiKEKRBKBr<8s(-G|*y1m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AN430;FJWfB)BEPFA0uG@Jxbh5`2^3oCNPgq5#$^ z9F*Xp1Q#XvD8Whb;tD(n9s(o5DBuFfC7c!Svw#PT1_huHV2#0N2~JD!T7ugW{FdOj z1kWY7uKWrth+_zpf^lFxm;lN^IhY70fyv+zPywcZsbCtI4k|$vm;oLIkAa!saWD&1 zgV~@4)Pgx+E|>@EzW!E<0e*Z?+y=fNhh8EgSt!8WiRyZ~MVjbI0O3A_xNz)r9WG=tsX6|e{F z1^d8$@G5u>900F_H^4z~2)qdngCpQ5I0lY`6W}B`1>ORu!Q0>rI1AnZ=fJz*Ja`ZM OUw_2AM*qX_gZ>4l11vEB diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00079.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00079.pmf deleted file mode 100644 index 45d6906baa9805ce4b02fdd662195268f965ddc4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5656 zcmdUzd2keU7RSGR&7g8$9tch(Mh++D0uoSg$V`$6lbOlP1QLiw41pk!K!PB+t_X6- zjmRN~cyMS?K~NMFtWs;y+O@QHJ!;)$EmwEfJ=C>!x7HHK?Dze;X9!x#Zu!?v)o1$K zuix+W`~CXYulv{9)cV$Z%<8k)iVZ#s`-sJ3? z^u4khu*lhegZrMI+@YVumw2D`u{GsYM4g*q(L<8xPrM?E$Y>FMQX(QjCW*M6%plST z^Txdm>IT%g*$b5!U-l zqLpxAw7UNu(<5kJX@}xv6>Xg4qoy@l^yvHFaTMMF5HEvl?1G;fDF1So5sO zO_&e}mX;;#V`H0VPC-263n$Qmcpxz$=uec{hr-P*vnJ1k&+o5`Cu%|g+lpwgIuNRh z2PXy)jReC9TgC$MNT@0ijD+i|(P5{i!w%w6UvV&8iYR>J12JD|piZ3*#bv%2&s`S_ zlm_Doc4K;Lb7A4IqV$14xH#gMmbobQMeE8`2T+|7B@w3Kix&sj3#I)5d&ll6Dyw{c z=TveS-qbL8zcn;o84hoY*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mYB{vWaXaTgX=OAbE&9OdcVR zlE=t4vYqT8JIUkZ39^ekNuDCR$sV$oJWZO&KJpBCmOMxHlLO>=@&b90yhL6m&Eyqw ckQ^eflEdT(IZ9f{G4g-?>wH1>KmG0J-?9|HrT_o{ diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00082.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00082.pmf deleted file mode 100644 index 2000dc057a80f5d9733eeeb1cac8ea325e14c02a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5660 zcmdUzdvFv*9>>2uJ(J)G@(@Ld=t4jNSxh!Ovb@)1Aq$&L$Zmir8X*ZL0tpc0;gg3T z2m}yBX4K5d2B1g>vPcsiE$_UR$IofAz4MdpfCNu`-uW9WSk8iDymOnr zzK*~W@BB5M_wK?I`bqs#->2ufn(`82+Ge%rEJ5@jei1=3M#NZBB4QG`M#L;Kn@AxO z?O88VEGJee|2Cw=HVU1`znxNQFL{ReB%Bw;@+Ns(#6QTV#EJ6nYoa&1VIjLGMSCQZ zZDEQFc?mzG@bPHhPH{PlD>k8SqXjgpHDbA+JR{;o@@o-qk-v!eh*6$HUm0QR5~+C* zMSy3RK_R_$uT_jKtBe&_RH3w~v1$I|IdvEtDvd;|s$-$jFcJ;3>zaMBx`n=qrrFaP zF*zI=SCVkAmDbfZ+&CNYXegGzJjBC^$&unjiF+~DG;j8_SqK#uSH}}o(XeYpd1OjB zS{;vE6-IekB$jYxML1p-txQD9V%1ZSaZ;6Wf_QnTC=wfoa)c&@D?;PK)uuTVm4qtT zc6CK~TqK@gM;e-&3JV7Z(-*?AqOxKsnUA7Sd3A~D0;Z(I*fNF@iWi013!{s}?upx1 zOsotQdriq@_)`Pr|IXm}-2w5>^Shn*`vZA{3jKk>d3pZ9g+W8Pzc7%W=l4SN=c710 zHdGl+R7)>VUKFi1A(*kx>6;hJ>D!z?r_aE^j0JhkdDHWU1oQF}sEkD>R)$0Icv(@T z7{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>2Ct zTX7$@VLLi-KOVq?cnF=?frs%3cH&VyhFy3ZyRipPU@xBJ*>N9t4bR|N>_-<4;5j^x zgE)k4ynq*R7)S6Dj^Y?z#w+N-@zDA9gdC3LKWjJ^vVm*Z@Dc|9bB5zCHd`GG^aIw> z>fpx{)WHqCk{#!PY>tw#F@*MR$NA8+{w`ETFZ(_BpgnMCpE@Y~i@UI;Y}j9;qpImP zO~$Ten#?$4d>eX0dX^FIT5p3*THkc+mhnp;B1R2ir20{Q%%Oey!Ynil<<$K73-eVj z%pT5!g+Fm7Tpa&P`yxC}U6%b5oCBAPd)T}XdbVFHBgR~NmiJJ3F@72wdc)6mT2|xs zfp>ltVs7JBg&0W;i6wC)o`_vlA`!)th?(%i39}wMnk17H!jmZTA3xj>@l7V3WROfU zgbXEFWEgRf;ba84jAWC`iP#-G2~SPTl3+U%;sP| z2QxZ90+LT9v_c;M diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00086.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00086.pmf deleted file mode 100644 index b7586ca61afa1edfe38954ab63e661c67809b964..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5716 zcmdUzdvH@#9>>48rH`~tlk}CeNQk9aP=ifru@$hyHndsOG$iQ@AK@X@3Rs{bXr(+A zE1;q%3Mh(#R0LE6c_`|->g>qwILZv`j=Ly2&MxCyS_Opc_ndogC^Ksv-M{uuKKK6a z@BYs3{LbV4a?Vv+rp`(Npb#V35D(1fHBP&~f!C}70Dtm%vVqTe0M)A$-Zxy}GcLf^k1jn?$MS$n#|7w><3^n)k?uLin6~L2~}i(|5$w&C@C3 zSi$%b5sm&hgF+@XNTHC&YxZ#pLs?w8n9LQA92Axa%>!hs5cZI_gzy*kX&QyNEK)+- z6qbtf(DP5V6q=|}-lV{4coxhbUsvz13O1v%t~O9#9drk3ypq0} z?nuy6?G1(5gx2=9va-_h*aMHhvaU*$bfMB6h}6g?ph*|T*D(xts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%m* z&z_xgRC~v@d?n@#WR6mO_AjeG@nG^1=ARyxgkmv_)Me~242j7X8#)ZjX)lg%&2~$n zEm_2%<|xJ~4w<90di#~tcB%Gi31t~~RqaAYZA&e6 zWhloL7>zL)iz`uqad6`*RH6zVj7K$U;Kd(sHGHUrA9Y;lPe2eMaM6nfG@=R3n22j| zEw01$h(!O#1CuZrQ!tg=#A)2+-H4meikmSVGcc1Q(1uxj59Xj9w_+}C!#r+PZ^s?z zz@6Ovbz&hFVKJ6qDVE_b+>Pb92VL9_uE0vH!hN_O4`4MO#6wtvhw%v3;!!+?by$xL zcpOh)Bc8-l*o3F?3^rp6p2b#lbKkg)`^N3qft`2(FXAQa!pqo=J$MCsu@C!k0I%XT z9K`FfeeE0PhNRANIua{0m>~gT60ksWOPu^Y_1;Z}R0l z$eA$vH_QZm{Pj5dy8_d4#sH#CH{DIxyF%uTeU$;(y*u#5zxWMH2t@StOfq zZZQLbIS|Z(U>*cBA(#unYzXE<_4|^8*9(bQ_YNTiWGK0a6p~?NI1#(hO9 z!Hfy!OfYMLc~ku;Rl;j28AZ6`Vh#nfC_h$_(PRu6ORgjpWE^pmt4JlOA|Aqd#SF_A zf^Y@KJPT%8t}2OG$M}iZwFbxp5+orKCiSF&G?FILOeT_R$hCz3EX>D1giIon$rLh` zh*i-v(n7=v<0jHdZYEqgGS`CH7V;mpjn`R3tUkmG+)i#KbIEOF9+^*WCwGtzawl0p zI>|z^h%6>c$WpS5+(qst%gH^Yi`+|Akd>@9d-DD4W gh3qB!$bNEwyh>gp2g&Q?4f20|7|)CT*S`n-2SIfa<^TWy diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00087.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00087.pmf deleted file mode 100644 index 82f054999a47d3768a254b79fca8c6b31643224c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5752 zcmdUzdvH@#9>;&_BOz^)n@68iO039BQrl8Wi>wfmKqGB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+nU`znwpxa;TT;XpMW8KF#V%^=R+qaU!Oyb#~?Z zHH`V^gj4F#?s{`ReSS8tV$R1zOne-b|0lK%BmbBgsToF1Hg)wn6VV@}#YJ?5^+)@9 z$4JW##*{TD`&~x-H9arNp4FrKJl3Q8ekpZPdQ0X2{khibmB`s7Ym^rMSG0_;*|nI+ ziCbss)csACS%wauvUE{P|L~IdVoRs)KR2o#${Lj|^EAmC#WJ?4d4iz)3|9IamIW2v?Oh1XryJ>`h~Nwt)< zLev>qbM!iMp{|eeDe2Ma9X&d8ztk&wol5J_pK-lj$$LiDC_Vm#T8l63TFmh6aTCP< zR(Vaovn(}qc(3I?>Uv=h-y83=bkd(ctrlhWlR3y5l~K}T*ZYK9t;SF>y5l3L3l z_OB^9od4{f_->%ZPg!kxi(1wzJV6msb`93xPKVqAr*QG#o5ElM#GZmz}3;DHyT zSx3s@!*#eG6{v(CReb*+%OzS6d^N>5)M7m9FabB99usjR8p8kM4>#dvOu{W(LN;MC zZpCeA#_e1SPQg^PU>c@l1{XYSn2A}K&1Kfvd}xxVqedop=Si@G4%zZtTHcypA`p4{u_B{=$y11VR8yC)9{hf9Wv^P>Nr_IWko zZh>K^pRQ$|ksP$VWjv8T`_f3^>Ro8jNARp+4~IXSC=kcmUd)ZrM&B#zR*E_7X~$Sf z@Q8?|wKLa2$u?_!W}CHqc5V|7and zq?m98#Y)N#TI3pXEh!}np^Y8fz?AWx+ZNR$8#ug4GtRw_wEu zYc5!IwNGO~?n8wCxmka~3Jlg@unL297_7wnd`5UrvmOHti+gpyU8B1m%L8iAp6Lh TWIs7T{;z+wUu6HEzX$yj(_7ox diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00090.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00090.pmf deleted file mode 100644 index 895cfe26ae18ce74bdd96a13ee4d4141a47a9a9c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5736 zcmdUzdvH|M9ml_S6L$03o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b(iDpNj}WoXM()Uo8GnGamgmBzaHOxF1?{gJ-1zakF8 zF;FSnXxme-;$tkh&{raTXp8YNVpKjNR%?wKLs8C%zwOxO_UDJoRC|n1#3bnrVM7=aAzi#!U6A+@ez9 zC)NkY#2i~Wc4GVl-K-tYcT&~(?~7>^i6)&0=YVs8(ru+|04Fy${AF#+kGKdT&Lv zjCe>fDIt6-p}KC$YSy+SwfbQ$H+4BIC+9B zCo9NG@+4VBR+Fd58uBz*OV*L~|+^ zWDnU(UL-G(m&rb|pS(g2kXOk;a)=xzM@S2KjT|MflVjvK`M>_ze-izF{vPyCa&zKc diff --git a/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00091.pmf b/hw/xprint/config/C/print/models/HPDJ1600C/fonts/9nb00091.pmf deleted file mode 100644 index 3bdcae4ba33d7453c1e4c6bba4cbd68958e11025..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5744 zcmdUzdvFv*9>>3%gxw^Y-JN|U;UTU(1kueUA&>xSSdt~#BiV%PhKGWYrv?H60t5vV zLXd}`AOS%GL=g}bR33sL0wq;=9-N-&U5QmvhZn^Xd?1B~n4SA}&rTBS>h9|FuS?}K z^PQf4{JN+6yVGNsJYj|jfPq-Zp;%xZ&oR;Ki9Dyr0sNQu;}d`eUU;I{AFyB}3l7%r zvwW2eSQNcJ&Fk3?UNE1ieq{m4Ke29qH|l#+Xds3cQJ zw;&I5NWw`T771~Qht;}xhQe}~hwY-&Zt^NwY~@LAH@_kOfj6GSVjRc`Z4Q__?Z z%DIzf)nKGQP*51w(uP!5O+={37YuWlLjLf`Kz_JTyOmcxed46)HIpX7m!Dq|3Xd-G zYd26D809aj2nFu(qqHOt3~RE?A1Wy-4+lzu6{FDZVsyI;gi3vRfnWh2j&Fp&%va#A zkS!vw&{xLhE6V%@fl!#esH~~Z$>}$s^@cx~SCTJEW+2a3T2UzbfKj>_TEZ}Vp*%l3 zB6YrByU;p|;pM*kXj9@gyzNKH8yy+17!7Zwx3%Y9Z%%ejrZ=-+dO8nT(L<@XZ{PI3 z>E39F-VEgXhx*Ek!WE(yD9tOXkRixH@7y~**tvI2#*Ch6nUm-CujxBJD