45e9809aff7304721fddb95654901b32195c9c7avboxsync/***********************************************************
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncCopyright 1987, 1989, 1998 The Open Group
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncPermission to use, copy, modify, distribute, and sell this software and its
45e9809aff7304721fddb95654901b32195c9c7avboxsyncdocumentation for any purpose is hereby granted without fee, provided that
45e9809aff7304721fddb95654901b32195c9c7avboxsyncthe above copyright notice appear in all copies and that both that
45e9809aff7304721fddb95654901b32195c9c7avboxsynccopyright notice and this permission notice appear in supporting
45e9809aff7304721fddb95654901b32195c9c7avboxsyncdocumentation.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncThe above copyright notice and this permission notice shall be included in
45e9809aff7304721fddb95654901b32195c9c7avboxsyncall copies or substantial portions of the Software.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
45e9809aff7304721fddb95654901b32195c9c7avboxsyncIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
45e9809aff7304721fddb95654901b32195c9c7avboxsyncOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
45e9809aff7304721fddb95654901b32195c9c7avboxsyncAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
45e9809aff7304721fddb95654901b32195c9c7avboxsyncCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncExcept as contained in this notice, the name of The Open Group shall not be
45e9809aff7304721fddb95654901b32195c9c7avboxsyncused in advertising or otherwise to promote the sale, use or other dealings
45e9809aff7304721fddb95654901b32195c9c7avboxsyncin this Software without prior written authorization from The Open Group.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncCopyright 1987, 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync All Rights Reserved
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncPermission to use, copy, modify, and distribute this software and its
45e9809aff7304721fddb95654901b32195c9c7avboxsyncdocumentation for any purpose and without fee is hereby granted,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncprovided that the above copyright notice appear in all copies and that
45e9809aff7304721fddb95654901b32195c9c7avboxsyncboth that copyright notice and this permission notice appear in
45e9809aff7304721fddb95654901b32195c9c7avboxsyncsupporting documentation, and that the name of Digital not be
45e9809aff7304721fddb95654901b32195c9c7avboxsyncused in advertising or publicity pertaining to distribution of the
45e9809aff7304721fddb95654901b32195c9c7avboxsyncsoftware without specific, written prior permission.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
45e9809aff7304721fddb95654901b32195c9c7avboxsyncALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
45e9809aff7304721fddb95654901b32195c9c7avboxsyncDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
45e9809aff7304721fddb95654901b32195c9c7avboxsyncANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
45e9809aff7304721fddb95654901b32195c9c7avboxsyncSOFTWARE.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync******************************************************************/
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifndef RESOURCE_H
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RESOURCE_H 1
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include "misc.h"
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include "dixaccess.h"
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*****************************************************************
45e9809aff7304721fddb95654901b32195c9c7avboxsync * STUFF FOR RESOURCES
45e9809aff7304721fddb95654901b32195c9c7avboxsync *****************************************************************/
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* classes for Resource routines */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef unsigned long RESTYPE;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RC_VANILLA ((RESTYPE)0)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RC_CACHED ((RESTYPE)1<<31)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RC_DRAWABLE ((RESTYPE)1<<30)
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* Use class RC_NEVERRETAIN for resources that should not be retained
45e9809aff7304721fddb95654901b32195c9c7avboxsync * regardless of the close down mode when the client dies. (A client's
45e9809aff7304721fddb95654901b32195c9c7avboxsync * event selections on objects that it doesn't own are good candidates.)
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Extensions can use this too!
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RC_NEVERRETAIN ((RESTYPE)1<<29)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RC_LASTPREDEF RC_NEVERRETAIN
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RC_ANY (~(RESTYPE)0)
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* types for Resource routines */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RT_WINDOW ((RESTYPE)1|RC_DRAWABLE)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RT_PIXMAP ((RESTYPE)2|RC_DRAWABLE)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RT_GC ((RESTYPE)3)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#undef RT_FONT
45e9809aff7304721fddb95654901b32195c9c7avboxsync#undef RT_CURSOR
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RT_FONT ((RESTYPE)4)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RT_CURSOR ((RESTYPE)5)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RT_COLORMAP ((RESTYPE)6)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RT_CMAPENTRY ((RESTYPE)7)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RT_OTHERCLIENT ((RESTYPE)8|RC_NEVERRETAIN)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RT_PASSIVEGRAB ((RESTYPE)9|RC_NEVERRETAIN)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RT_LASTPREDEF ((RESTYPE)9)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RT_NONE ((RESTYPE)0)
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* bits and fields within a resource id */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RESOURCE_AND_CLIENT_COUNT 29 /* 29 bits for XIDs */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#if MAXCLIENTS == 64
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RESOURCE_CLIENT_BITS 6
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync#if MAXCLIENTS == 128
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RESOURCE_CLIENT_BITS 7
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync#if MAXCLIENTS == 256
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RESOURCE_CLIENT_BITS 8
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync#if MAXCLIENTS == 512
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RESOURCE_CLIENT_BITS 9
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* client field offset */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define CLIENTOFFSET (RESOURCE_AND_CLIENT_COUNT - RESOURCE_CLIENT_BITS)
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* resource field */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RESOURCE_ID_MASK ((1 << CLIENTOFFSET) - 1)
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* client field */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define RESOURCE_CLIENT_MASK (((1 << RESOURCE_CLIENT_BITS) - 1) << CLIENTOFFSET)
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* extract the client mask from an XID */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define CLIENT_BITS(id) ((id) & RESOURCE_CLIENT_MASK)
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* extract the client id from an XID */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define CLIENT_ID(id) ((int)(CLIENT_BITS(id) >> CLIENTOFFSET))
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define SERVER_BIT (Mask)0x40000000 /* use illegal bit */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifdef INVALID
45e9809aff7304721fddb95654901b32195c9c7avboxsync#undef INVALID /* needed on HP/UX */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* Invalid resource id */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define INVALID (0)
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define BAD_RESOURCE 0xe0000000
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* Resource state callback */
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT CallbackListPtr ResourceStateCallback;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef enum {ResourceStateAdding,
45e9809aff7304721fddb95654901b32195c9c7avboxsync ResourceStateFreeing} ResourceState;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsync ResourceState state;
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID id;
45e9809aff7304721fddb95654901b32195c9c7avboxsync RESTYPE type;
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer value;
45e9809aff7304721fddb95654901b32195c9c7avboxsync} ResourceStateInfoRec;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef int (*DeleteType)(
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer /*value*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID /*id*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef void (*FindResType)(
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer /*value*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID /*id*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer /*cdata*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef void (*FindAllRes)(
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer /*value*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID /*id*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RESTYPE /*type*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer /*cdata*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef Bool (*FindComplexResType)(
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer /*value*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID /*id*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer /*cdata*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT RESTYPE CreateNewResourceType(
45e9809aff7304721fddb95654901b32195c9c7avboxsync DeleteType /*deleteFunc*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT RESTYPE CreateNewResourceClass(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool InitClientResources(
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr /*client*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT XID FakeClientID(
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*client*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* Quartz support on Mac OS X uses the CarbonCore
45e9809aff7304721fddb95654901b32195c9c7avboxsync framework whose AddResource function conflicts here. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifdef __APPLE__
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define AddResource Darwin_X_AddResource
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool AddResource(
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID /*id*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RESTYPE /*type*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer /*value*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void FreeResource(
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID /*id*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RESTYPE /*skipDeleteFuncType*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void FreeResourceByType(
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID /*id*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RESTYPE /*type*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Bool /*skipFree*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool ChangeResourceValue(
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID /*id*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RESTYPE /*rtype*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer /*value*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void FindClientResourcesByType(
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr /*client*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RESTYPE /*type*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync FindResType /*func*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer /*cdata*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void FindAllClientResources(
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr /*client*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync FindAllRes /*func*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer /*cdata*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void FreeClientNeverRetainResources(
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr /*client*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void FreeClientResources(
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr /*client*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void FreeAllResources(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool LegalNewID(
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID /*id*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr /*client*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT pointer LookupClientResourceComplex(
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr client,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RESTYPE type,
45e9809aff7304721fddb95654901b32195c9c7avboxsync FindComplexResType func,
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer cdata);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT int dixLookupResourceByType(
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer *result,
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID id,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RESTYPE rtype,
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr client,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Mask access_mode);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT int dixLookupResourceByClass(
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer *result,
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID id,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RESTYPE rclass,
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr client,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Mask access_mode);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void GetXIDRange(
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*client*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Bool /*server*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID * /*minp*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID * /*maxp*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT unsigned int GetXIDList(
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr /*client*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned int /*count*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID * /*pids*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT RESTYPE lastResourceType;
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT RESTYPE TypeMask;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync * These are deprecated compatibility functions and will be removed soon!
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Please use the noted replacements instead.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifdef __GNUC__
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define X_DEPRECATED __attribute__((deprecated))
45e9809aff7304721fddb95654901b32195c9c7avboxsync#else
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define X_DEPRECATED
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* replaced by dixLookupResourceByType */
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT pointer SecurityLookupIDByType(
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr client,
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID id,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RESTYPE rtype,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Mask access_mode) X_DEPRECATED;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* replaced by dixLookupResourceByClass */
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT pointer SecurityLookupIDByClass(
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr client,
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID id,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RESTYPE classes,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Mask access_mode) X_DEPRECATED;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* replaced by dixLookupResourceByType */
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT pointer LookupIDByType(
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID id,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RESTYPE rtype) X_DEPRECATED;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* replaced by dixLookupResourceByClass */
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT pointer LookupIDByClass(
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID id,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RESTYPE classes) X_DEPRECATED;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif /* RESOURCE_H */
45e9809aff7304721fddb95654901b32195c9c7avboxsync