65fea56f17cd614bc8908264df980a62e1931468vboxsync/***********************************************************
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCopyright 1987, 1998 The Open Group
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncPermission to use, copy, modify, distribute, and sell this software and its
65fea56f17cd614bc8908264df980a62e1931468vboxsyncdocumentation for any purpose is hereby granted without fee, provided that
65fea56f17cd614bc8908264df980a62e1931468vboxsyncthe above copyright notice appear in all copies and that both that
65fea56f17cd614bc8908264df980a62e1931468vboxsynccopyright notice and this permission notice appear in supporting
65fea56f17cd614bc8908264df980a62e1931468vboxsyncdocumentation.
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncThe above copyright notice and this permission notice shall be included in
65fea56f17cd614bc8908264df980a62e1931468vboxsyncall copies or substantial portions of the Software.
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
65fea56f17cd614bc8908264df980a62e1931468vboxsyncIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
65fea56f17cd614bc8908264df980a62e1931468vboxsyncFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
65fea56f17cd614bc8908264df980a62e1931468vboxsyncOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
65fea56f17cd614bc8908264df980a62e1931468vboxsyncAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncExcept as contained in this notice, the name of The Open Group shall not be
65fea56f17cd614bc8908264df980a62e1931468vboxsyncused in advertising or otherwise to promote the sale, use or other dealings
65fea56f17cd614bc8908264df980a62e1931468vboxsyncin this Software without prior written authorization from The Open Group.
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCopyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync All Rights Reserved
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncPermission to use, copy, modify, and distribute this software and its
65fea56f17cd614bc8908264df980a62e1931468vboxsyncdocumentation for any purpose and without fee is hereby granted,
65fea56f17cd614bc8908264df980a62e1931468vboxsyncprovided that the above copyright notice appear in all copies and that
65fea56f17cd614bc8908264df980a62e1931468vboxsyncboth that copyright notice and this permission notice appear in
65fea56f17cd614bc8908264df980a62e1931468vboxsyncsupporting documentation, and that the name of Digital not be
65fea56f17cd614bc8908264df980a62e1931468vboxsyncused in advertising or publicity pertaining to distribution of the
65fea56f17cd614bc8908264df980a62e1931468vboxsyncsoftware without specific, written prior permission.
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
65fea56f17cd614bc8908264df980a62e1931468vboxsyncALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
65fea56f17cd614bc8908264df980a62e1931468vboxsyncDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
65fea56f17cd614bc8908264df980a62e1931468vboxsyncANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
65fea56f17cd614bc8908264df980a62e1931468vboxsyncWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
65fea56f17cd614bc8908264df980a62e1931468vboxsyncARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
65fea56f17cd614bc8908264df980a62e1931468vboxsyncSOFTWARE.
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync******************************************************************/
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifndef EXTENSIONSTRUCT_H
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define EXTENSIONSTRUCT_H
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "dix.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "misc.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "screenint.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "extension.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "gc.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "privates.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct _ExtensionEntry {
65fea56f17cd614bc8908264df980a62e1931468vboxsync int index;
65fea56f17cd614bc8908264df980a62e1931468vboxsync void (*CloseDown) ( /* called at server shutdown */
65fea56f17cd614bc8908264df980a62e1931468vboxsync struct _ExtensionEntry * /* extension */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *name; /* extension name */
65fea56f17cd614bc8908264df980a62e1931468vboxsync int base; /* base request number */
65fea56f17cd614bc8908264df980a62e1931468vboxsync int eventBase;
65fea56f17cd614bc8908264df980a62e1931468vboxsync int eventLast;
65fea56f17cd614bc8908264df980a62e1931468vboxsync int errorBase;
65fea56f17cd614bc8908264df980a62e1931468vboxsync int errorLast;
65fea56f17cd614bc8908264df980a62e1931468vboxsync int num_aliases;
65fea56f17cd614bc8908264df980a62e1931468vboxsync char **aliases;
65fea56f17cd614bc8908264df980a62e1931468vboxsync pointer extPrivate;
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned short (*MinorOpcode) ( /* called for errors */
65fea56f17cd614bc8908264df980a62e1931468vboxsync ClientPtr /* client */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync PrivateRec *devPrivates;
65fea56f17cd614bc8908264df980a62e1931468vboxsync} ExtensionEntry;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * The arguments may be different for extension event swapping functions.
65fea56f17cd614bc8908264df980a62e1931468vboxsync * Deal with this by casting when initializing the event's EventSwapVector[]
65fea56f17cd614bc8908264df980a62e1931468vboxsync * entries.
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef void (*EventSwapPtr) (xEvent *, xEvent *);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT EventSwapPtr EventSwapVector[128];
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsyncNotImplemented( /* FIXME: this may move to another file... */
65fea56f17cd614bc8908264df980a62e1931468vboxsync xEvent *, xEvent *) _X_NORETURN;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define SetGCVector(pGC, VectorElement, NewRoutineAddress, Atom) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync pGC->VectorElement = NewRoutineAddress;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define GetGCValue(pGC, GCElement) (pGC->GCElement)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT ExtensionEntry *
65fea56f17cd614bc8908264df980a62e1931468vboxsyncAddExtension(const char * /*name */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int /*NumEvents */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int /*NumErrors */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int (* /*MainProc */ )(ClientPtr /*client */ ),
65fea56f17cd614bc8908264df980a62e1931468vboxsync int (* /*SwappedMainProc */ )(ClientPtr /*client */ ),
65fea56f17cd614bc8908264df980a62e1931468vboxsync void (* /*CloseDownProc */ )(ExtensionEntry * /*extension */ ),
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned short (* /*MinorOpcodeProc */ )(ClientPtr /*client */ )
65fea56f17cd614bc8908264df980a62e1931468vboxsync );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsyncAddExtensionAlias(const char * /*alias */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync ExtensionEntry * /*extension */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT ExtensionEntry *
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCheckExtension(const char *extname);
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT ExtensionEntry *
65fea56f17cd614bc8908264df980a62e1931468vboxsyncGetExtensionEntry(int major);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif /* EXTENSIONSTRUCT_H */