diff options
author | Stuart Kreitman <stuart.kreitman@sun.com> | 2004-07-29 14:33:43 +0000 |
---|---|---|
committer | Stuart Kreitman <stuart.kreitman@sun.com> | 2004-07-29 14:33:43 +0000 |
commit | 6ed1c3845517c7731dcc74baa51bb801838afaff (patch) | |
tree | 36b4ef8bf8a3806d11af6024883925d5491f9873 /xfixes/xfixes.h | |
parent | 736e511824c4f5e77e637c680a4e45f0b7631644 (diff) |
bugzilla 859 -merging DAMAGE-XFIXES into trunk
Diffstat (limited to 'xfixes/xfixes.h')
-rwxr-xr-x | xfixes/xfixes.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/xfixes/xfixes.h b/xfixes/xfixes.h new file mode 100755 index 000000000..d03b57c64 --- /dev/null +++ b/xfixes/xfixes.h @@ -0,0 +1,50 @@ +/* + * $Id$ + * + * Copyright © 2002 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR 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. + */ + +#ifndef _XFIXES_H_ +#define _XFIXES_H_ + +#include "resource.h" + +extern RESTYPE RegionResType; +extern int XFixesErrorBase; + +#define VERIFY_REGION(pRegion, rid, client, mode) { \ + pRegion = SecurityLookupIDByType (client, rid, RegionResType, mode); \ + if (!pRegion) { \ + client->errorValue = rid; \ + return XFixesErrorBase + BadRegion; \ + } \ +} + +#define VERIFY_REGION_OR_NONE(pRegion, rid, client, mode) { \ + pRegion = 0; \ + if (rid) VERIFY_REGION(pRegion, rid, client, mode); \ +} + +RegionPtr +XFixesRegionCopy (RegionPtr pRegion); + + +#endif /* _XFIXES_H_ */ |