040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync/*
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Copyright © 2002 Keith Packard
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync *
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Permission to use, copy, modify, distribute, and sell this software and its
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * documentation for any purpose is hereby granted without fee, provided that
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * the above copyright notice appear in all copies and that both that
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * copyright notice and this permission notice appear in supporting
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * documentation, and that the name of Keith Packard not be used in
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * advertising or publicity pertaining to distribution of the software without
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * specific, written prior permission. Keith Packard makes no
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * representations about the suitability of this software for any purpose. It
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * is provided "as is" without express or implied warranty.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync *
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * PERFORMANCE OF THIS SOFTWARE.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync */
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#ifdef HAVE_DIX_CONFIG_H
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#include <dix-config.h>
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#endif
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#ifndef _XFIXES_H_
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define _XFIXES_H_
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#include "resource.h"
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncextern RESTYPE RegionResType;
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncextern int XFixesErrorBase;
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define VERIFY_REGION(pRegion, rid, client, mode) { \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync pRegion = SecurityLookupIDByType (client, rid, RegionResType, mode); \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync if (!pRegion) { \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync client->errorValue = rid; \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync return XFixesErrorBase + BadRegion; \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync } \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync}
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define VERIFY_REGION_OR_NONE(pRegion, rid, client, mode) { \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync pRegion = 0; \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync if (rid) VERIFY_REGION(pRegion, rid, client, mode); \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync}
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncRegionPtr
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncXFixesRegionCopy (RegionPtr pRegion);
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#endif /* _XFIXES_H_ */