mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-25 15:20:35 +01:00
Integration of XEVIE on XEVIE branch.
This commit is contained in:
parent
30ac3efde2
commit
15bedbec50
19 changed files with 802 additions and 4071 deletions
1258
Xext/panoramiX.c
1258
Xext/panoramiX.c
File diff suppressed because it is too large
Load diff
102
Xext/panoramiX.h
102
Xext/panoramiX.h
|
|
@ -1,102 +0,0 @@
|
|||
/* $TOG: panoramiX.h /main/4 1998/03/17 06:51:02 kaleb $ */
|
||||
/****************************************************************
|
||||
* *
|
||||
* Copyright (c) Digital Equipment Corporation, 1991, 1997 *
|
||||
* *
|
||||
* All Rights Reserved. Unpublished rights reserved under *
|
||||
* the copyright laws of the United States. *
|
||||
* *
|
||||
* The software contained on this media is proprietary to *
|
||||
* and embodies the confidential technology of Digital *
|
||||
* Equipment Corporation. Possession, use, duplication or *
|
||||
* dissemination of the software and media is authorized only *
|
||||
* pursuant to a valid written license from Digital Equipment *
|
||||
* Corporation. *
|
||||
* *
|
||||
* RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure *
|
||||
* by the U.S. Government is subject to restrictions as set *
|
||||
* forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, *
|
||||
* or in FAR 52.227-19, as applicable. *
|
||||
* *
|
||||
*****************************************************************/
|
||||
/* $XFree86: xc/programs/Xserver/Xext/panoramiX.h,v 1.6 2003/03/23 04:56:02 mvojkovi Exp $ */
|
||||
|
||||
/* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */
|
||||
|
||||
/*
|
||||
* PanoramiX definitions
|
||||
*/
|
||||
|
||||
#ifndef _PANORAMIX_H_
|
||||
#define _PANORAMIX_H_
|
||||
|
||||
#include "panoramiXext.h"
|
||||
#include "gcstruct.h"
|
||||
|
||||
|
||||
typedef struct _PanoramiXData {
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int height;
|
||||
} PanoramiXData;
|
||||
|
||||
typedef struct _PanoramiXInfo {
|
||||
XID id ;
|
||||
} PanoramiXInfo;
|
||||
|
||||
typedef struct {
|
||||
PanoramiXInfo info[MAXSCREENS];
|
||||
RESTYPE type;
|
||||
union {
|
||||
struct {
|
||||
char visibility;
|
||||
char class;
|
||||
char root;
|
||||
} win;
|
||||
struct {
|
||||
Bool shared;
|
||||
} pix;
|
||||
#ifdef RENDER
|
||||
struct {
|
||||
Bool root;
|
||||
} pict;
|
||||
#endif
|
||||
char raw_data[4];
|
||||
} u;
|
||||
} PanoramiXRes;
|
||||
|
||||
#define FOR_NSCREENS_FORWARD(j) for(j = 0; j < PanoramiXNumScreens; j++)
|
||||
#define FOR_NSCREENS_BACKWARD(j) for(j = PanoramiXNumScreens - 1; j >= 0; j--)
|
||||
#define FOR_NSCREENS(j) FOR_NSCREENS_FORWARD(j)
|
||||
|
||||
#define BREAK_IF(a) if ((a)) break
|
||||
#define IF_RETURN(a,b) if ((a)) return (b)
|
||||
|
||||
#define FORCE_ROOT(a) { \
|
||||
int _j; \
|
||||
for (_j = PanoramiXNumScreens - 1; _j; _j--) \
|
||||
if ((a).root == WindowTable[_j]->drawable.id) \
|
||||
break; \
|
||||
(a).rootX += panoramiXdataPtr[_j].x; \
|
||||
(a).rootY += panoramiXdataPtr[_j].y; \
|
||||
(a).root = WindowTable[0]->drawable.id; \
|
||||
}
|
||||
|
||||
#define FORCE_WIN(a) { \
|
||||
if ((win = PanoramiXFindIDOnAnyScreen(XRT_WINDOW, a))) { \
|
||||
(a) = win->info[0].id; /* Real ID */ \
|
||||
} \
|
||||
}
|
||||
|
||||
#define FORCE_CMAP(a) { \
|
||||
if ((win = PanoramiXFindIDOnAnyScreen(XRT_COLORMAP, a))) { \
|
||||
(a) = win->info[0].id; /* Real ID */ \
|
||||
} \
|
||||
}
|
||||
|
||||
#define IS_SHARED_PIXMAP(r) (((r)->type == XRT_PIXMAP) && (r)->u.pix.shared)
|
||||
|
||||
#define SKIP_FAKE_WINDOW(a) if(!LookupIDByType(a, XRT_WINDOW)) return
|
||||
|
||||
#endif /* _PANORAMIX_H_ */
|
||||
|
|
@ -1,140 +0,0 @@
|
|||
/* $Xorg: panoramiXSwap.c,v 1.4 2000/08/17 19:47:57 cpqbld Exp $ */
|
||||
/*****************************************************************
|
||||
Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
|
||||
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.
|
||||
|
||||
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
|
||||
DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
|
||||
BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL 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 Digital Equipment Corporation
|
||||
shall not be used in advertising or otherwise to promote the sale, use or other
|
||||
dealings in this Software without prior written authorization from Digital
|
||||
Equipment Corporation.
|
||||
******************************************************************/
|
||||
/* $XFree86: xc/programs/Xserver/Xext/panoramiXSwap.c,v 3.10 2003/09/13 21:33:03 dawes Exp $ */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "X.h"
|
||||
#include "Xproto.h"
|
||||
#include "misc.h"
|
||||
#include "cursor.h"
|
||||
#include "cursorstr.h"
|
||||
#include "extnsionst.h"
|
||||
#include "dixstruct.h"
|
||||
#include "gc.h"
|
||||
#include "gcstruct.h"
|
||||
#include "scrnintstr.h"
|
||||
#include "window.h"
|
||||
#include "windowstr.h"
|
||||
#include "pixmapstr.h"
|
||||
#if 0
|
||||
#include <sys/workstation.h>
|
||||
#include <X11/Xserver/ws.h>
|
||||
#endif
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXproto.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#include "globals.h"
|
||||
#include "panoramiXh.h"
|
||||
|
||||
static int
|
||||
SProcPanoramiXQueryVersion (ClientPtr client)
|
||||
{
|
||||
REQUEST(xPanoramiXQueryVersionReq);
|
||||
register int n;
|
||||
|
||||
swaps(&stuff->length,n);
|
||||
REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
|
||||
return ProcPanoramiXQueryVersion(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SProcPanoramiXGetState(ClientPtr client)
|
||||
{
|
||||
REQUEST(xPanoramiXGetStateReq);
|
||||
register int n;
|
||||
|
||||
swaps (&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
||||
return ProcPanoramiXGetState(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SProcPanoramiXGetScreenCount(ClientPtr client)
|
||||
{
|
||||
REQUEST(xPanoramiXGetScreenCountReq);
|
||||
register int n;
|
||||
|
||||
swaps (&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
||||
return ProcPanoramiXGetScreenCount(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SProcPanoramiXGetScreenSize(ClientPtr client)
|
||||
{
|
||||
REQUEST(xPanoramiXGetScreenSizeReq);
|
||||
register int n;
|
||||
|
||||
swaps (&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
||||
return ProcPanoramiXGetScreenSize(client);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
SProcXineramaIsActive(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXineramaIsActiveReq);
|
||||
register int n;
|
||||
|
||||
swaps (&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
|
||||
return ProcXineramaIsActive(client);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
SProcXineramaQueryScreens(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXineramaQueryScreensReq);
|
||||
register int n;
|
||||
|
||||
swaps (&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
|
||||
return ProcXineramaQueryScreens(client);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
SProcPanoramiXDispatch (ClientPtr client)
|
||||
{ REQUEST(xReq);
|
||||
switch (stuff->data)
|
||||
{
|
||||
case X_PanoramiXQueryVersion:
|
||||
return SProcPanoramiXQueryVersion(client);
|
||||
case X_PanoramiXGetState:
|
||||
return SProcPanoramiXGetState(client);
|
||||
case X_PanoramiXGetScreenCount:
|
||||
return SProcPanoramiXGetScreenCount(client);
|
||||
case X_PanoramiXGetScreenSize:
|
||||
return SProcPanoramiXGetScreenSize(client);
|
||||
case X_XineramaIsActive:
|
||||
return SProcXineramaIsActive(client);
|
||||
case X_XineramaQueryScreens:
|
||||
return SProcXineramaQueryScreens(client);
|
||||
}
|
||||
return BadRequest;
|
||||
}
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
/* $XFree86: xc/programs/Xserver/Xext/panoramiXh.h,v 1.3 2003/11/17 22:20:26 dawes Exp $ */
|
||||
|
||||
/*
|
||||
* Server dispatcher function replacements
|
||||
*/
|
||||
|
||||
extern int PanoramiXCreateWindow(ClientPtr client);
|
||||
extern int PanoramiXChangeWindowAttributes(ClientPtr client);
|
||||
extern int PanoramiXDestroyWindow(ClientPtr client);
|
||||
extern int PanoramiXDestroySubwindows(ClientPtr client);
|
||||
extern int PanoramiXChangeSaveSet(ClientPtr client);
|
||||
extern int PanoramiXReparentWindow(ClientPtr client);
|
||||
extern int PanoramiXMapWindow(ClientPtr client);
|
||||
extern int PanoramiXMapSubwindows(ClientPtr client);
|
||||
extern int PanoramiXUnmapWindow(ClientPtr client);
|
||||
extern int PanoramiXUnmapSubwindows(ClientPtr client);
|
||||
extern int PanoramiXConfigureWindow(ClientPtr client);
|
||||
extern int PanoramiXCirculateWindow(ClientPtr client);
|
||||
extern int PanoramiXGetGeometry(ClientPtr client);
|
||||
extern int PanoramiXTranslateCoords(ClientPtr client);
|
||||
extern int PanoramiXCreatePixmap(ClientPtr client);
|
||||
extern int PanoramiXFreePixmap(ClientPtr client);
|
||||
extern int PanoramiXCreateGC(ClientPtr client);
|
||||
extern int PanoramiXChangeGC(ClientPtr client);
|
||||
extern int PanoramiXCopyGC(ClientPtr client);
|
||||
extern int PanoramiXCopyColormapAndFree(ClientPtr client);
|
||||
extern int PanoramiXSetDashes(ClientPtr client);
|
||||
extern int PanoramiXSetClipRectangles(ClientPtr client);
|
||||
extern int PanoramiXFreeGC(ClientPtr client);
|
||||
extern int PanoramiXClearToBackground(ClientPtr client);
|
||||
extern int PanoramiXCopyArea(ClientPtr client);
|
||||
extern int PanoramiXCopyPlane(ClientPtr client);
|
||||
extern int PanoramiXPolyPoint(ClientPtr client);
|
||||
extern int PanoramiXPolyLine(ClientPtr client);
|
||||
extern int PanoramiXPolySegment(ClientPtr client);
|
||||
extern int PanoramiXPolyRectangle(ClientPtr client);
|
||||
extern int PanoramiXPolyArc(ClientPtr client);
|
||||
extern int PanoramiXFillPoly(ClientPtr client);
|
||||
extern int PanoramiXPolyFillArc(ClientPtr client);
|
||||
extern int PanoramiXPolyFillRectangle(ClientPtr client);
|
||||
extern int PanoramiXPutImage(ClientPtr client);
|
||||
extern int PanoramiXGetImage(ClientPtr client);
|
||||
extern int PanoramiXPolyText8(ClientPtr client);
|
||||
extern int PanoramiXPolyText16(ClientPtr client);
|
||||
extern int PanoramiXImageText8(ClientPtr client);
|
||||
extern int PanoramiXImageText16(ClientPtr client);
|
||||
extern int PanoramiXCreateColormap(ClientPtr client);
|
||||
extern int PanoramiXFreeColormap(ClientPtr client);
|
||||
extern int PanoramiXInstallColormap(ClientPtr client);
|
||||
extern int PanoramiXUninstallColormap(ClientPtr client);
|
||||
extern int PanoramiXAllocColor(ClientPtr client);
|
||||
extern int PanoramiXAllocNamedColor(ClientPtr client);
|
||||
extern int PanoramiXAllocColorCells(ClientPtr client);
|
||||
extern int PanoramiXStoreNamedColor(ClientPtr client);
|
||||
extern int PanoramiXFreeColors(ClientPtr client);
|
||||
extern int PanoramiXStoreColors(ClientPtr client);
|
||||
extern int PanoramiXAllocColorPlanes(ClientPtr client);
|
||||
|
||||
#define PROC_EXTERN(pfunc) extern int pfunc(ClientPtr)
|
||||
|
||||
PROC_EXTERN(ProcPanoramiXQueryVersion);
|
||||
PROC_EXTERN(ProcPanoramiXGetState);
|
||||
PROC_EXTERN(ProcPanoramiXGetScreenCount);
|
||||
PROC_EXTERN(ProcPanoramiXGetScreenSize);
|
||||
|
||||
PROC_EXTERN(ProcXineramaQueryScreens);
|
||||
PROC_EXTERN(ProcXineramaIsActive);
|
||||
extern Bool XineramaCreateGC(GCPtr pGC);
|
||||
|
||||
extern int SProcPanoramiXDispatch(ClientPtr client);
|
||||
|
||||
extern char *ConnectionInfo;
|
||||
extern int connBlockScreenStart;
|
||||
extern xConnSetupPrefix connSetupPrefix;
|
||||
|
||||
extern ScreenInfo *GlobalScrInfo;
|
||||
extern int (* SavedProcVector[256]) (ClientPtr client);
|
||||
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,44 +0,0 @@
|
|||
/* $XFree86: xc/programs/Xserver/Xext/panoramiXsrv.h,v 1.9 2001/08/11 21:00:06 mvojkovi Exp $ */
|
||||
|
||||
#ifndef _PANORAMIXSRV_H_
|
||||
#define _PANORAMIXSRV_H_
|
||||
|
||||
#include "panoramiX.h"
|
||||
|
||||
extern int PanoramiXNumScreens;
|
||||
extern PanoramiXData *panoramiXdataPtr;
|
||||
extern int PanoramiXPixWidth;
|
||||
extern int PanoramiXPixHeight;
|
||||
extern RegionRec PanoramiXScreenRegion;
|
||||
extern XID *PanoramiXVisualTable;
|
||||
|
||||
extern void PanoramiXConsolidate(void);
|
||||
extern Bool PanoramiXCreateConnectionBlock(void);
|
||||
extern PanoramiXRes * PanoramiXFindIDByScrnum(RESTYPE, XID, int);
|
||||
extern PanoramiXRes * PanoramiXFindIDOnAnyScreen(RESTYPE, XID);
|
||||
extern WindowPtr PanoramiXChangeWindow(int, WindowPtr);
|
||||
extern Bool XineramaRegisterConnectionBlockCallback(void (*func)(void));
|
||||
extern int XineramaDeleteResource(pointer, XID);
|
||||
|
||||
extern RegionRec XineramaScreenRegions[MAXSCREENS];
|
||||
|
||||
extern unsigned long XRC_DRAWABLE;
|
||||
extern unsigned long XRT_WINDOW;
|
||||
extern unsigned long XRT_PIXMAP;
|
||||
extern unsigned long XRT_GC;
|
||||
extern unsigned long XRT_COLORMAP;
|
||||
|
||||
extern void XineramaGetImageData(
|
||||
DrawablePtr *pDrawables,
|
||||
int left,
|
||||
int top,
|
||||
int width,
|
||||
int height,
|
||||
unsigned int format,
|
||||
unsigned long planemask,
|
||||
char *data,
|
||||
int pitch,
|
||||
Bool isRoot
|
||||
);
|
||||
|
||||
#endif /* _PANORAMIXSRV_H_ */
|
||||
628
Xext/xevie.c
Normal file
628
Xext/xevie.c
Normal file
|
|
@ -0,0 +1,628 @@
|
|||
/************************************************************
|
||||
|
||||
Copyright 2003 Sun Microsystems, 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, 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.
|
||||
|
||||
************************************************************/
|
||||
|
||||
#define NEED_REPLIES
|
||||
#define NEED_EVENTS
|
||||
#include "X.h"
|
||||
#include "Xproto.h"
|
||||
#include "misc.h"
|
||||
#include "dixstruct.h"
|
||||
#include "extnsionst.h"
|
||||
#include "colormapst.h"
|
||||
#include "scrnintstr.h"
|
||||
#include "servermd.h"
|
||||
#include "opaque.h"
|
||||
#define _XEVIE_SERVER_
|
||||
#include "Xeviestr.h"
|
||||
#include "Xfuncproto.h"
|
||||
#include "input.h"
|
||||
#include "inputstr.h"
|
||||
#include "windowstr.h"
|
||||
#include "cursorstr.h"
|
||||
#include "swaprep.h"
|
||||
#include "xinerama.h"
|
||||
#include "xineramaSrv.h"
|
||||
|
||||
#ifndef EXTMODULE
|
||||
#include "../os/osdep.h"
|
||||
#else
|
||||
#include "xf86_ansic.h"
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#define DEBUG
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
# define ERR(x) ErrorF(x)
|
||||
#else
|
||||
#define ERR
|
||||
#endif
|
||||
|
||||
static int xevieFlag = 0;
|
||||
static int xevieClientIndex = 0;
|
||||
static Mask xevieMask = 0;
|
||||
static Bool xeviegrabState = FALSE;
|
||||
static unsigned int xevieServerGeneration;
|
||||
static int xevieDevicePrivateIndex;
|
||||
static Bool xevieModifiersOn = FALSE;
|
||||
|
||||
#define XEVIEINFO(dev) ((xevieDeviceInfoPtr)dev->devPrivates[xevieDevicePrivateIndex].ptr)
|
||||
#define NoSuchEvent 0x80000000
|
||||
|
||||
Mask xevieFilters[128] =
|
||||
{
|
||||
NoSuchEvent, /* 0 */
|
||||
NoSuchEvent, /* 1 */
|
||||
KeyPressMask, /* KeyPress */
|
||||
KeyReleaseMask, /* KeyRelease */
|
||||
ButtonPressMask, /* ButtonPress */
|
||||
ButtonReleaseMask, /* ButtonRelease */
|
||||
PointerMotionMask /* MotionNotify (initial state) */
|
||||
};
|
||||
#undef NoSuchEvent
|
||||
|
||||
typedef struct {
|
||||
ProcessInputProc processInputProc;
|
||||
ProcessInputProc realInputProc;
|
||||
DeviceUnwrapProc unwrapProc;
|
||||
} xevieDeviceInfoRec, *xevieDeviceInfoPtr;
|
||||
|
||||
static int ProcDispatch (ClientPtr), SProcDispatch (ClientPtr);
|
||||
static void ResetProc (ExtensionEntry*);
|
||||
|
||||
static unsigned char ReqCode = 0;
|
||||
static int ErrorBase;
|
||||
|
||||
static Bool XevieStart(void);
|
||||
static void XevieEnd(int clientIndex);
|
||||
static void XevieClientStateCallback(CallbackListPtr *pcbl, pointer nulldata,
|
||||
pointer calldata);
|
||||
static void XevieServerGrabStateCallback(CallbackListPtr *pcbl,
|
||||
pointer nulldata,
|
||||
pointer calldata);
|
||||
|
||||
static Bool XevieAdd(DeviceIntPtr device, pointer data);
|
||||
static void XevieWrap(DeviceIntPtr device, ProcessInputProc proc);
|
||||
static Bool XevieRemove(DeviceIntPtr device, pointer data);
|
||||
static void doSendEvent(xEvent *xE, DeviceIntPtr device);
|
||||
static void XeviePointerProcessInputProc(xEvent *xE, DeviceIntPtr dev,
|
||||
int count);
|
||||
static void XevieKbdProcessInputProc(xEvent *xE, DeviceIntPtr dev, int count);
|
||||
|
||||
void
|
||||
XevieExtensionInit (INITARGS)
|
||||
{
|
||||
ExtensionEntry* extEntry;
|
||||
|
||||
if (serverGeneration != xevieServerGeneration) {
|
||||
if ((xevieDevicePrivateIndex = AllocateDevicePrivateIndex()) == -1)
|
||||
return;
|
||||
xevieServerGeneration = serverGeneration;
|
||||
}
|
||||
|
||||
if (!AddCallback(&ServerGrabCallback,XevieServerGrabStateCallback,NULL))
|
||||
return;
|
||||
|
||||
if ((extEntry = AddExtension (XEVIENAME,
|
||||
0,
|
||||
XevieNumberErrors,
|
||||
ProcDispatch,
|
||||
SProcDispatch,
|
||||
ResetProc,
|
||||
StandardMinorOpcode))) {
|
||||
ReqCode = (unsigned char)extEntry->base;
|
||||
ErrorBase = extEntry->errorBase;
|
||||
}
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static
|
||||
void ResetProc (ExtensionEntry* extEntry)
|
||||
{
|
||||
}
|
||||
|
||||
static
|
||||
int ProcQueryVersion (ClientPtr client)
|
||||
{
|
||||
xXevieQueryVersionReply rep;
|
||||
|
||||
REQUEST_SIZE_MATCH (xXevieQueryVersionReq);
|
||||
rep.type = X_Reply;
|
||||
rep.length = 0;
|
||||
rep.sequence_number = client->sequence;
|
||||
rep.server_major_version = XEVIE_MAJOR_VERSION;
|
||||
rep.server_minor_version = XEVIE_MINOR_VERSION;
|
||||
WriteToClient (client, sizeof (xXevieQueryVersionReply), (char *)&rep);
|
||||
return client->noClientException;
|
||||
}
|
||||
|
||||
static
|
||||
int ProcStart (ClientPtr client)
|
||||
{
|
||||
xXevieStartReply rep;
|
||||
|
||||
REQUEST_SIZE_MATCH (xXevieStartReq);
|
||||
rep.pad1 = 0;
|
||||
|
||||
if(!xevieFlag){
|
||||
if (AddCallback(&ClientStateCallback,XevieClientStateCallback,NULL)) {
|
||||
xevieFlag = 1;
|
||||
rep.pad1 = 1;
|
||||
xevieClientIndex = client->index;
|
||||
} else
|
||||
return BadAlloc;
|
||||
} else
|
||||
return BadAccess;
|
||||
|
||||
if (!XevieStart()) {
|
||||
DeleteCallback(&ClientStateCallback,XevieClientStateCallback,NULL);
|
||||
return BadAlloc;
|
||||
}
|
||||
|
||||
xevieModifiersOn = FALSE;
|
||||
|
||||
rep.type = X_Reply;
|
||||
rep.sequence_number = client->sequence;
|
||||
WriteToClient (client, sizeof (xXevieStartReply), (char *)&rep);
|
||||
return client->noClientException;
|
||||
}
|
||||
|
||||
static
|
||||
int ProcEnd (ClientPtr client)
|
||||
{
|
||||
xXevieEndReply rep;
|
||||
|
||||
if (xevieFlag) {
|
||||
if (client->index != xevieClientIndex)
|
||||
return BadAccess;
|
||||
|
||||
DeleteCallback(&ClientStateCallback,XevieClientStateCallback,NULL);
|
||||
XevieEnd(xevieClientIndex);
|
||||
}
|
||||
|
||||
rep.type = X_Reply;
|
||||
rep.sequence_number = client->sequence;
|
||||
WriteToClient (client, sizeof (xXevieEndReply), (char *)&rep);
|
||||
return client->noClientException;
|
||||
}
|
||||
|
||||
static
|
||||
int ProcSend (ClientPtr client)
|
||||
{
|
||||
REQUEST (xXevieSendReq);
|
||||
xXevieSendReply rep;
|
||||
xEvent *xE;
|
||||
static unsigned char lastDetail = 0, lastType = 0;
|
||||
|
||||
ERR("ProcSend\n");
|
||||
|
||||
if (client->index != xevieClientIndex)
|
||||
return BadAccess;
|
||||
|
||||
xE = (xEvent *)&stuff->event;
|
||||
rep.type = X_Reply;
|
||||
rep.sequence_number = client->sequence;
|
||||
WriteToClient (client, sizeof (xXevieSendReply), (char *)&rep);
|
||||
|
||||
switch(xE->u.u.type) {
|
||||
case KeyPress:
|
||||
case KeyRelease:
|
||||
doSendEvent(xE, inputInfo.keyboard);
|
||||
break;
|
||||
case ButtonPress:
|
||||
case ButtonRelease:
|
||||
case MotionNotify:
|
||||
doSendEvent(xE, inputInfo.pointer);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
lastType = xE->u.u.type;
|
||||
lastDetail = xE->u.u.detail;
|
||||
|
||||
return client->noClientException;
|
||||
}
|
||||
|
||||
static
|
||||
int ProcSelectInput (ClientPtr client)
|
||||
{
|
||||
REQUEST (xXevieSelectInputReq);
|
||||
xXevieSelectInputReply rep;
|
||||
|
||||
if (client->index != xevieClientIndex)
|
||||
return BadAccess;
|
||||
|
||||
xevieMask = (long)stuff->event_mask;
|
||||
rep.type = X_Reply;
|
||||
rep.sequence_number = client->sequence;
|
||||
WriteToClient (client, sizeof (xXevieSelectInputReply), (char *)&rep);
|
||||
return client->noClientException;
|
||||
}
|
||||
|
||||
static
|
||||
int ProcDispatch (ClientPtr client)
|
||||
{
|
||||
REQUEST (xReq);
|
||||
switch (stuff->data)
|
||||
{
|
||||
case X_XevieQueryVersion:
|
||||
return ProcQueryVersion (client);
|
||||
case X_XevieStart:
|
||||
return ProcStart (client);
|
||||
case X_XevieEnd:
|
||||
return ProcEnd (client);
|
||||
case X_XevieSend:
|
||||
return ProcSend (client);
|
||||
case X_XevieSelectInput:
|
||||
return ProcSelectInput(client);
|
||||
default:
|
||||
return BadRequest;
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
int SProcQueryVersion (ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
|
||||
REQUEST(xXevieQueryVersionReq);
|
||||
swaps(&stuff->length, n);
|
||||
return ProcQueryVersion(client);
|
||||
}
|
||||
|
||||
static
|
||||
int SProcStart (ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
|
||||
REQUEST (xXevieStartReq);
|
||||
swaps (&stuff->length, n);
|
||||
swapl (&stuff->screen, n);
|
||||
REQUEST_AT_LEAST_SIZE (xXevieStartReq);
|
||||
return ProcStart (client);
|
||||
}
|
||||
|
||||
static
|
||||
int SProcEnd (ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
|
||||
REQUEST (xXevieEndReq);
|
||||
swaps (&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE (xXevieEndReq);
|
||||
swapl(&stuff->cmap, n);
|
||||
return ProcEnd (client);
|
||||
}
|
||||
|
||||
static
|
||||
int SProcSend (ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
|
||||
REQUEST (xXevieSendReq);
|
||||
swaps (&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE (xXevieSendReq);
|
||||
swapl(&stuff->event, n);
|
||||
return ProcSend (client);
|
||||
}
|
||||
|
||||
static
|
||||
int SProcSelectInput (ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
|
||||
REQUEST (xXevieSelectInputReq);
|
||||
swaps (&stuff->length, n);
|
||||
REQUEST_AT_LEAST_SIZE (xXevieSendReq);
|
||||
swapl(&stuff->event_mask, n);
|
||||
return ProcSelectInput (client);
|
||||
}
|
||||
|
||||
|
||||
static
|
||||
int SProcDispatch (ClientPtr client)
|
||||
{
|
||||
REQUEST(xReq);
|
||||
switch (stuff->data)
|
||||
{
|
||||
case X_XevieQueryVersion:
|
||||
return SProcQueryVersion (client);
|
||||
case X_XevieStart:
|
||||
return SProcStart (client);
|
||||
case X_XevieEnd:
|
||||
return SProcEnd (client);
|
||||
case X_XevieSend:
|
||||
return SProcSend (client);
|
||||
case X_XevieSelectInput:
|
||||
return SProcSelectInput(client);
|
||||
default:
|
||||
return BadRequest;
|
||||
}
|
||||
}
|
||||
|
||||
/*=====================================================*/
|
||||
|
||||
|
||||
#define WRAP_INPUTPROC(dev,store,inputProc) \
|
||||
store->processInputProc = dev->public.processInputProc; \
|
||||
dev->public.processInputProc = inputProc; \
|
||||
store->realInputProc = dev->public.realInputProc; \
|
||||
dev->public.realInputProc = inputProc;
|
||||
|
||||
#define COND_WRAP_INPUTPROC(dev,store,inputProc) \
|
||||
if (dev->public.processInputProc == dev->public.realInputProc) \
|
||||
dev->public.processInputProc = inputProc; \
|
||||
store->processInputProc = \
|
||||
store->realInputProc = dev->public.realInputProc; \
|
||||
dev->public.realInputProc = inputProc;
|
||||
|
||||
#define UNWRAP_INPUTPROC(dev,restore) \
|
||||
dev->public.processInputProc = restore->processInputProc; \
|
||||
dev->public.realInputProc = restore->realInputProc;
|
||||
|
||||
#define UNWRAP_INPUTPROC(dev,restore) \
|
||||
dev->public.processInputProc = restore->processInputProc; \
|
||||
dev->public.realInputProc = restore->realInputProc;
|
||||
|
||||
#define XEVIE_EVENT(xE) \
|
||||
(xevieFlag \
|
||||
&& !xeviegrabState \
|
||||
&& clients[xevieClientIndex] \
|
||||
&& (xevieMask & xevieFilters[xE->u.u.type]))
|
||||
|
||||
|
||||
static void
|
||||
sendEvent(ClientPtr pClient, xEvent *xE)
|
||||
{
|
||||
if(pClient->swapped) {
|
||||
xEvent eventTo;
|
||||
|
||||
/* Remember to strip off the leading bit of type in case
|
||||
this event was sent with "SendEvent." */
|
||||
(*EventSwapVector[xE->u.u.type & 0177]) (xE, &eventTo);
|
||||
(void)WriteToClient(pClient, sizeof(xEvent), (char *)&eventTo);
|
||||
} else {
|
||||
(void)WriteToClient(pClient, sizeof(xEvent), (char *) xE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
XevieKbdProcessInputProc(xEvent *xE, DeviceIntPtr dev, int count)
|
||||
{
|
||||
int key, bit;
|
||||
BYTE *kptr;
|
||||
ProcessInputProc tmp;
|
||||
KeyClassPtr keyc = dev->key;
|
||||
xevieDeviceInfoPtr xeviep = XEVIEINFO(dev);
|
||||
|
||||
if(XEVIE_EVENT(xE)) {
|
||||
ERR("XevieKbdProcessInputProc\n");
|
||||
|
||||
key = xE->u.u.detail;
|
||||
kptr = &keyc->down[key >> 3];
|
||||
bit = 1 << (key & 7);
|
||||
|
||||
/*
|
||||
* This is a horrible hack: with xkb on we must zero the modifiers
|
||||
* before sending an event sent back by xevie to
|
||||
* CoreProcessKeyboardEvent.
|
||||
* Since we cannot probe for xkb directly we need to check if the
|
||||
* modifers are set at this point. If they are we know that xkb
|
||||
* isn't active.
|
||||
*/
|
||||
if (dev->key->modifierMap[xE->u.u.detail])
|
||||
xevieModifiersOn = TRUE;
|
||||
|
||||
xE->u.keyButtonPointer.event = xeviewin->drawable.id;
|
||||
xE->u.keyButtonPointer.root = GetCurrentRootWindow()->drawable.id;
|
||||
xE->u.keyButtonPointer.child = (xeviewin->firstChild)
|
||||
? xeviewin->firstChild->drawable.id:0;
|
||||
xE->u.keyButtonPointer.rootX = xeviehot.x;
|
||||
xE->u.keyButtonPointer.rootY = xeviehot.y;
|
||||
xE->u.keyButtonPointer.state = keyc->state;
|
||||
/* fix bug: sequence lost in Xlib */
|
||||
xE->u.u.sequenceNumber = clients[xevieClientIndex]->sequence;
|
||||
sendEvent(clients[xevieClientIndex], xE);
|
||||
return;
|
||||
}
|
||||
|
||||
tmp = dev->public.realInputProc;
|
||||
UNWRAP_INPUTPROC(dev,xeviep);
|
||||
dev->public.processInputProc(xE,dev,count);
|
||||
COND_WRAP_INPUTPROC(dev,xeviep,tmp);
|
||||
}
|
||||
|
||||
static void
|
||||
XeviePointerProcessInputProc(xEvent *xE, DeviceIntPtr dev, int count)
|
||||
{
|
||||
xevieDeviceInfoPtr xeviep = XEVIEINFO(dev);
|
||||
ProcessInputProc tmp;
|
||||
|
||||
if (XEVIE_EVENT(xE)) {
|
||||
ERR("XeviePointerProcessInputProc\n");
|
||||
/* fix bug: sequence lost in Xlib */
|
||||
xE->u.u.sequenceNumber = clients[xevieClientIndex]->sequence;
|
||||
sendEvent(clients[xevieClientIndex], xE);
|
||||
return;
|
||||
}
|
||||
|
||||
tmp = dev->public.realInputProc;
|
||||
UNWRAP_INPUTPROC(dev,xeviep);
|
||||
dev->public.processInputProc(xE,dev,count);
|
||||
COND_WRAP_INPUTPROC(dev,xeviep,tmp);
|
||||
}
|
||||
|
||||
static Bool
|
||||
XevieStart(void)
|
||||
{
|
||||
ProcessInputProc prp;
|
||||
prp = XevieKbdProcessInputProc;
|
||||
if (!XevieAdd(inputInfo.keyboard,&prp))
|
||||
return FALSE;
|
||||
prp = XeviePointerProcessInputProc;
|
||||
if (!XevieAdd(inputInfo.pointer,&prp))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
XevieEnd(int clientIndex)
|
||||
{
|
||||
if (!clientIndex || clientIndex == xevieClientIndex) {
|
||||
XevieRemove(inputInfo.keyboard,NULL);
|
||||
XevieRemove(inputInfo.pointer,NULL);
|
||||
xevieFlag = 0;
|
||||
xevieClientIndex = 0;
|
||||
DeleteCallback (&ClientStateCallback, XevieClientStateCallback, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
XevieClientStateCallback(CallbackListPtr *pcbl, pointer nulldata,
|
||||
pointer calldata)
|
||||
{
|
||||
NewClientInfoRec *pci = (NewClientInfoRec *)calldata;
|
||||
ClientPtr client = pci->client;
|
||||
if (client->clientState == ClientStateGone
|
||||
|| client->clientState == ClientStateRetained)
|
||||
XevieEnd(client->index);
|
||||
}
|
||||
|
||||
static void
|
||||
XevieServerGrabStateCallback(CallbackListPtr *pcbl, pointer nulldata,
|
||||
pointer calldata)
|
||||
{
|
||||
ServerGrabInfoRec *grbinfo = (ServerGrabInfoRec *)calldata;
|
||||
if (grbinfo->grabstate == SERVER_GRABBED)
|
||||
xeviegrabState = TRUE;
|
||||
else
|
||||
xeviegrabState = FALSE;
|
||||
}
|
||||
|
||||
#define UNWRAP_UNWRAPPROC(device,proc_store) \
|
||||
device->unwrapProc = proc_store;
|
||||
|
||||
#define WRAP_UNWRAPPROC(device,proc_store,proc) \
|
||||
proc_store = device->unwrapProc; \
|
||||
device->unwrapProc = proc;
|
||||
|
||||
static void
|
||||
xevieUnwrapProc(DeviceIntPtr device, DeviceHandleProc proc, pointer data)
|
||||
{
|
||||
xevieDeviceInfoPtr xeviep = XEVIEINFO(device);
|
||||
ProcessInputProc tmp = device->public.processInputProc;
|
||||
|
||||
UNWRAP_INPUTPROC(device,xeviep);
|
||||
UNWRAP_UNWRAPPROC(device,xeviep->unwrapProc);
|
||||
proc(device,data);
|
||||
WRAP_INPUTPROC(device,xeviep,tmp);
|
||||
WRAP_UNWRAPPROC(device,xeviep->unwrapProc,xevieUnwrapProc);
|
||||
}
|
||||
|
||||
static Bool
|
||||
XevieUnwrapAdd(DeviceIntPtr device, void* data)
|
||||
{
|
||||
if (device->unwrapProc)
|
||||
device->unwrapProc(device,XevieUnwrapAdd,data);
|
||||
else {
|
||||
ProcessInputProc *ptr = data;
|
||||
XevieWrap(device,*ptr);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static Bool
|
||||
XevieAdd(DeviceIntPtr device, void* data)
|
||||
{
|
||||
xevieDeviceInfoPtr xeviep;
|
||||
|
||||
if (!AllocateDevicePrivate(device, xevieDevicePrivateIndex))
|
||||
return FALSE;
|
||||
|
||||
xeviep = xcalloc (sizeof (xevieDeviceInfoRec),1);
|
||||
if (!xeviep)
|
||||
return FALSE;
|
||||
|
||||
device->devPrivates[xevieDevicePrivateIndex].ptr = xeviep;
|
||||
XevieUnwrapAdd(device, data);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static Bool
|
||||
XevieRemove(DeviceIntPtr device,pointer data)
|
||||
{
|
||||
xevieDeviceInfoPtr xeviep = XEVIEINFO(device);
|
||||
|
||||
if (!xeviep) return TRUE;
|
||||
|
||||
UNWRAP_INPUTPROC(device,xeviep);
|
||||
UNWRAP_UNWRAPPROC(device,xeviep->unwrapProc);
|
||||
|
||||
xfree(xeviep);
|
||||
device->devPrivates[xevieDevicePrivateIndex].ptr = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
XevieWrap(DeviceIntPtr device, ProcessInputProc proc)
|
||||
{
|
||||
xevieDeviceInfoPtr xeviep = XEVIEINFO(device);
|
||||
|
||||
WRAP_INPUTPROC(device,xeviep,proc);
|
||||
WRAP_UNWRAPPROC(device,xeviep->unwrapProc,xevieUnwrapProc);
|
||||
}
|
||||
|
||||
static void
|
||||
doSendEvent(xEvent *xE, DeviceIntPtr dev)
|
||||
{
|
||||
xevieDeviceInfoPtr xeviep = XEVIEINFO(dev);
|
||||
ProcessInputProc tmp = dev->public.realInputProc;
|
||||
if (((xE->u.u.type==KeyPress)||(xE->u.u.type==KeyRelease))
|
||||
&& !xevieModifiersOn) {
|
||||
CARD8 realModes = dev->key->modifierMap[xE->u.u.detail];
|
||||
dev->key->modifierMap[xE->u.u.detail] = 0;
|
||||
|
||||
UNWRAP_INPUTPROC(dev,xeviep);
|
||||
dev->public.processInputProc(xE,dev,1);
|
||||
COND_WRAP_INPUTPROC(dev,xeviep,tmp);
|
||||
dev->key->modifierMap[xE->u.u.detail] = realModes;
|
||||
} else {
|
||||
UNWRAP_INPUTPROC(dev,xeviep);
|
||||
dev->public.processInputProc(xE,dev,1);
|
||||
COND_WRAP_INPUTPROC(dev,xeviep,tmp);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/compiler.h,v 1.1.4.3 2003/12/20 00:28:26 kaleb Exp $ */
|
||||
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/compiler.h,v 3.105 2003/12/18 21:56:37 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/compiler.h,v 3.105 2003/12/18 21:56:37 dawes Exp $ */
|
||||
/*
|
||||
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
|
||||
|
|
@ -113,10 +113,6 @@ extern int ffs(unsigned long);
|
|||
;
|
||||
# endif
|
||||
|
||||
# if defined(__SUNPRO_C)
|
||||
# define DO_PROTOTYPES
|
||||
# endif
|
||||
|
||||
# if defined(NO_INLINE) || defined(DO_PROTOTYPES)
|
||||
|
||||
# if !defined(__sparc__) && !defined(__arm32__) \
|
||||
|
|
@ -1541,7 +1537,7 @@ extern void outl(unsigned int a, unsigned int l);
|
|||
#if 0
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
# if !defined(__HIGHC__) && !defined(__SUNPRO_C)
|
||||
# ifndef __HIGHC__
|
||||
# ifndef __USLC__
|
||||
# define __USLC__
|
||||
# endif
|
||||
|
|
@ -1567,8 +1563,7 @@ extern void outl(unsigned int a, unsigned int l);
|
|||
# else
|
||||
# include "scoasm.h"
|
||||
# endif
|
||||
# if !defined(__HIGHC__) && !defined(SCO325) && !defined(sgi) && \
|
||||
!defined(__SUNPRO_C)
|
||||
# if !defined(__HIGHC__) && !defined(SCO325) && !defined(sgi)
|
||||
# pragma asm partial_optimization outl
|
||||
# pragma asm partial_optimization outw
|
||||
# pragma asm partial_optimization outb
|
||||
|
|
|
|||
|
|
@ -12,26 +12,43 @@
|
|||
* 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.
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions, and the following disclaimer.
|
||||
*
|
||||
* 2. 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.
|
||||
*
|
||||
* 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 HOLDER(S) OR AUTHOR(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 of the copyright holder(s)
|
||||
* and author(s) 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 copyright holder(s) and author(s).
|
||||
* 3. The end-user documentation included with the redistribution,
|
||||
* if any, must include the following acknowledgment: "This product
|
||||
* includes software developed by X-Oz Technologies
|
||||
* (http://www.x-oz.com/)." Alternately, this acknowledgment may
|
||||
* appear in the software itself, if and wherever such third-party
|
||||
* acknowledgments normally appear.
|
||||
*
|
||||
* 4. Except as contained in this notice, the name of X-Oz
|
||||
* Technologies shall not be used in advertising or otherwise to
|
||||
* promote the sale, use or other dealings in this Software without
|
||||
* prior written authorization from X-Oz Technologies.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 X-OZ TECHNOLOGIES OR ITS 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.
|
||||
*
|
||||
* Author: David Dawes <dawes@XFree86.Org>.
|
||||
*/
|
||||
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86AutoConfig.c,v 1.2 2003/11/03 05:11:01 tsi Exp $ */
|
||||
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86AutoConfig.c,v 1.3 2003/12/12 00:39:16 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86AutoConfig.c,v 1.3 2003/12/12 00:39:16 dawes Exp $ */
|
||||
|
||||
#include "xf86.h"
|
||||
#include "xf86Parser.h"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Bus.c,v 1.79 2003/11/03 05:11:01 tsi Exp $ */
|
||||
/* $XdotOrg$ */
|
||||
/*
|
||||
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
|
||||
*
|
||||
|
|
@ -526,14 +525,14 @@ disableAccess(void)
|
|||
for (i = 0; i < xf86NumScreens; i++) {
|
||||
peacc = xf86Screens[i]->CurrentAccess->pIoAccess;
|
||||
while (peacc) {
|
||||
if (peacc->pAccess && peacc->pAccess->AccessDisable)
|
||||
if (peacc->pAccess->AccessDisable)
|
||||
peacc->pAccess->AccessDisable(peacc->pAccess->arg);
|
||||
peacc = peacc->next;
|
||||
}
|
||||
xf86Screens[i]->CurrentAccess->pIoAccess = NULL;
|
||||
peacc = xf86Screens[i]->CurrentAccess->pMemAccess;
|
||||
while (peacc) {
|
||||
if (peacc->pAccess && peacc->pAccess->AccessDisable)
|
||||
if (peacc->pAccess->AccessDisable)
|
||||
peacc->pAccess->AccessDisable(peacc->pAccess->arg);
|
||||
peacc = peacc->next;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1251,8 +1251,8 @@ AbortDDX()
|
|||
void
|
||||
OsVendorFatalError()
|
||||
{
|
||||
ErrorF("\nWhen reporting a problem related to a server crash, please\n"
|
||||
"send the full server output, not just the last messages.\n");
|
||||
ErrorF("\nWhen reporting a problem related to a server crash, please send\n"
|
||||
"the full server output, not just the last messages.\n");
|
||||
if (xf86LogFile && xf86LogFileWasOpened)
|
||||
ErrorF("This can be found in the log file \"%s\".\n", xf86LogFile);
|
||||
ErrorF("Please report problems to %s.\n", BUILDERADDR);
|
||||
|
|
@ -1703,15 +1703,14 @@ xf86PrintBanner()
|
|||
{
|
||||
#if PRE_RELEASE
|
||||
ErrorF("\n"
|
||||
"This is a pre-release version of the X.org Foundation's X11.\n"
|
||||
"Portions of this release are based on XFree86 4.4RC2 and selected\n"
|
||||
"files from XFree86 4.4RC3. It is not supported in any way.\n"
|
||||
"Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.\n"
|
||||
"Select the \"xorg\" product for bugs you find in this release.\n"
|
||||
"Before reporting bugs in pre-release versions please check the\n"
|
||||
"latest version in the X.org Foundation \"monolithic tree\" CVS\n"
|
||||
"repository hosted at http://www.freedesktop.org/Software/xorg/"
|
||||
"This is a pre-release version of XFree86, and is not supported in any\n"
|
||||
"way. Bugs may be reported to XFree86@XFree86.Org and patches submitted\n"
|
||||
"to fixes@XFree86.Org. Before reporting bugs in pre-release versions,\n"
|
||||
"please check the latest version in the XFree86 CVS repository\n"
|
||||
"(http://www.XFree86.Org/cvs).\n");
|
||||
#endif
|
||||
ErrorF("\nXFree86 Version %d.%d.%d", XF86_VERSION_MAJOR, XF86_VERSION_MINOR,
|
||||
XF86_VERSION_PATCH);
|
||||
#if XF86_VERSION_SNAP > 0
|
||||
ErrorF(".%d", XF86_VERSION_SNAP);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* $XdotOrg$ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86cmap.c,v 1.25 2003/10/17 20:02:12 alanh Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1998-2001 by The XFree86 Project, Inc.
|
||||
|
|
@ -27,8 +26,7 @@
|
|||
* authorization from the copyright holder(s) and author(s).
|
||||
*/
|
||||
|
||||
#if defined(_XOPEN_SOURCE) || defined(__QNXNTO__) \
|
||||
|| (defined(sun) && defined(__SVR4))
|
||||
#if defined(_XOPEN_SOURCE) || defined(__QNXNTO__)
|
||||
#include <math.h>
|
||||
#else
|
||||
#define _XOPEN_SOURCE /* to get prototype for pow on some systems */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# $XdotOrg: xc/programs/Xserver/hw/xfree86/getconfig/getconfig.sh,v 1.2 2003/09/20 01:45:57 dawes Exp $
|
||||
# $DHD: xc/programs/Xserver/hw/xfree86/getconfig/getconfig.sh,v 1.2 2003/09/20 01:45:57 dawes Exp $
|
||||
|
||||
#
|
||||
|
|
@ -14,26 +15,42 @@
|
|||
# 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.
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions, and the following disclaimer.
|
||||
#
|
||||
# 2. 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.
|
||||
#
|
||||
# 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 HOLDER(S) OR AUTHOR(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 of the copyright holder(s)
|
||||
# and author(s) 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 copyright holder(s) and author(s).
|
||||
# 3. The end-user documentation included with the redistribution,
|
||||
# if any, must include the following acknowledgment: "This product
|
||||
# includes software developed by X-Oz Technologies
|
||||
# (http://www.x-oz.com/)." Alternately, this acknowledgment may
|
||||
# appear in the software itself, if and wherever such third-party
|
||||
# acknowledgments normally appear.
|
||||
#
|
||||
# 4. Except as contained in this notice, the name of X-Oz
|
||||
# Technologies shall not be used in advertising or otherwise to
|
||||
# promote the sale, use or other dealings in this Software without
|
||||
# prior written authorization from X-Oz Technologies.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 X-OZ TECHNOLOGIES OR ITS 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.
|
||||
#
|
||||
# Author: David Dawes <dawes@XFree86.Org>.
|
||||
#
|
||||
|
||||
# $XFree86: xc/programs/Xserver/hw/xfree86/getconfig/getconfig.sh,v 1.1 2003/10/08 14:58:29 dawes Exp $
|
||||
# $XFree86: xc/programs/Xserver/hw/xfree86/getconfig/getconfig.sh,v 1.2 2003/12/12 00:39:16 dawes Exp $
|
||||
|
||||
# A simple wrapper to execute the real getconfig program. So long as perl
|
||||
# is in $PATH, we don't need to know where it is this way.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# $XdotOrg: xc/programs/Xserver/hw/xfree86/getconfig/getconfig.pl,v 1.13 2003/09/23 05:12:07 dawes Exp $
|
||||
# $DHD: xc/programs/Xserver/hw/xfree86/getconfig/getconfig.pl,v 1.13 2003/09/23 05:12:07 dawes Exp $
|
||||
|
||||
#
|
||||
|
|
@ -14,26 +15,42 @@
|
|||
# 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.
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions, and the following disclaimer.
|
||||
#
|
||||
# 2. 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.
|
||||
#
|
||||
# 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 HOLDER(S) OR AUTHOR(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 of the copyright holder(s)
|
||||
# and author(s) 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 copyright holder(s) and author(s).
|
||||
# 3. The end-user documentation included with the redistribution,
|
||||
# if any, must include the following acknowledgment: "This product
|
||||
# includes software developed by X-Oz Technologies
|
||||
# (http://www.x-oz.com/)." Alternately, this acknowledgment may
|
||||
# appear in the software itself, if and wherever such third-party
|
||||
# acknowledgments normally appear.
|
||||
#
|
||||
# 4. Except as contained in this notice, the name of X-Oz
|
||||
# Technologies shall not be used in advertising or otherwise to
|
||||
# promote the sale, use or other dealings in this Software without
|
||||
# prior written authorization from X-Oz Technologies.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 X-OZ TECHNOLOGIES OR ITS 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.
|
||||
#
|
||||
# Author: David Dawes <dawes@XFree86.Org>.
|
||||
#
|
||||
|
||||
# $XFree86: xc/programs/Xserver/hw/xfree86/getconfig/getconfig.pl,v 1.1 2003/10/08 14:58:29 dawes Exp $
|
||||
# $XFree86: xc/programs/Xserver/hw/xfree86/getconfig/getconfig.pl,v 1.2 2003/12/12 00:39:16 dawes Exp $
|
||||
|
||||
#
|
||||
# This script takes PCI id information, compares it against an ordered list
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* $XdotOrg$ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.h,v 1.44 2003/11/07 23:57:47 dawes Exp $ */
|
||||
/*
|
||||
* Copyright 1998 by Concurrent Computer Corporation
|
||||
|
|
@ -262,7 +261,7 @@
|
|||
# define INCLUDE_XF86_NO_DOMAIN
|
||||
# endif
|
||||
# define XF86SCANPCI_WRAPPER ia64ScanPCIWrapper
|
||||
#elif defined(__i386__) || defined(__i386)
|
||||
#elif defined(__i386__)
|
||||
# define ARCH_PCI_INIT ix86PciInit
|
||||
# define INCLUDE_XF86_MAP_PCI_MEM
|
||||
# define INCLUDE_XF86_NO_DOMAIN
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c,v 1.31 2003/09/24 02:43:35 dawes Exp $ */
|
||||
/* $XdotOrg$ */
|
||||
/*
|
||||
* linux specific part of the int10 module
|
||||
* Copyright 1999, 2000, 2001, 2002, 2003, 2004 Egbert Eich
|
||||
* Copyright 1999 Egbert Eich
|
||||
*/
|
||||
#include "xf86.h"
|
||||
#include "xf86_OSproc.h"
|
||||
|
|
@ -213,9 +212,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
|
|||
} else
|
||||
((linuxInt10Priv*)pInt->private)->base_high = NULL;
|
||||
|
||||
if (!MapCurrentInt10(pInt))
|
||||
goto error3;
|
||||
|
||||
MapCurrentInt10(pInt);
|
||||
Int10Current = pInt;
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
|
|||
57
hw/xfree86/os-support/misc/PortIO.S
Normal file
57
hw/xfree86/os-support/misc/PortIO.S
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/PortIO.S,v 1.1 2004/02/02 03:55:32 dawes Exp $ */
|
||||
|
||||
/* Port I/O functions for platforms with no inlining. */
|
||||
|
||||
#include "assyntax.h"
|
||||
|
||||
FILE("PortIO.s")
|
||||
|
||||
AS_BEGIN
|
||||
|
||||
GLOBL GLNAME(outb)
|
||||
GLOBL GLNAME(outw)
|
||||
GLOBL GLNAME(outl)
|
||||
GLOBL GLNAME(inb)
|
||||
GLOBL GLNAME(inw)
|
||||
GLOBL GLNAME(inl)
|
||||
|
||||
SEG_TEXT
|
||||
ALIGNTEXT4
|
||||
GLNAME(outb):
|
||||
MOV_L (REGOFF(4,ESP), EDX)
|
||||
MOV_L (REGOFF(8,ESP), EAX)
|
||||
OUT_B
|
||||
RET
|
||||
|
||||
ALIGNTEXT4
|
||||
GLNAME(outw):
|
||||
MOV_L (REGOFF(4,ESP), EDX)
|
||||
MOV_L (REGOFF(8,ESP), EAX)
|
||||
OUT_W
|
||||
RET
|
||||
|
||||
ALIGNTEXT4
|
||||
GLNAME(outl):
|
||||
MOV_L (REGOFF(4,ESP), EDX)
|
||||
MOV_L (REGOFF(8,ESP), EAX)
|
||||
OUT_L
|
||||
RET
|
||||
|
||||
ALIGNTEXT4
|
||||
GLNAME(inb):
|
||||
MOV_L (REGOFF(4,ESP), EDX)
|
||||
IN_B
|
||||
RET
|
||||
|
||||
ALIGNTEXT4
|
||||
GLNAME(inw):
|
||||
MOV_L (REGOFF(4,ESP), EDX)
|
||||
IN_L
|
||||
RET
|
||||
|
||||
ALIGNTEXT4
|
||||
GLNAME(inl):
|
||||
MOV_L (REGOFF(4,ESP), EDX)
|
||||
IN_L
|
||||
RET
|
||||
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
/* $XdotOrg$ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/vbe/vbe.h,v 1.3 2003/11/14 14:58:45 tsi Exp $ */
|
||||
|
||||
/*
|
||||
|
|
@ -61,7 +60,7 @@ typedef struct vbeControllerInfoBlock {
|
|||
CARD8 OemData[256];
|
||||
} vbeControllerInfoRec, *vbeControllerInfoPtr;
|
||||
|
||||
#if defined(__GNUC__) || defined(__SUNPRO_C)
|
||||
#ifdef __GNUC__
|
||||
#pragma pack() /* All GCC versions recognise this syntax */
|
||||
#else
|
||||
#pragma pack(0)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $XdotOrg: xc/programs/Xserver/mi/miarc.c,v 1.1.4.3 2003/12/20 00:28:31 kaleb Exp $ */
|
||||
/* $XdotOrg: xc/programs/Xserver/mi/miarc.c,v 3.15 2003/12/06 18:46:28 dawes Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/mi/miarc.c,v 3.15 2003/12/06 18:46:28 dawes Exp $ */
|
||||
/***********************************************************
|
||||
|
||||
|
|
@ -50,8 +50,7 @@ SOFTWARE.
|
|||
/* Author: Keith Packard and Bob Scheifler */
|
||||
/* Warning: this code is toxic, do not dally very long here. */
|
||||
|
||||
#if defined(_XOPEN_SOURCE) || defined(__QNXNTO__) \
|
||||
|| (defined(sun) && defined(__SVR4))
|
||||
#if defined(_XOPEN_SOURCE) || defined(__QNXNTO__)
|
||||
#include <math.h>
|
||||
#else
|
||||
#define _XOPEN_SOURCE /* to get prototype for hypot on some systems */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue