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