 
#ifndef region_DEFINED
#define region_DEFINED 1
 
#ifndef class_DEFINED
#include <class.h>
#endif /* class_DEFINED */
/* 
 * This file was generated by the Andrew class system preprocessor.
 * Don't make changes to this file as it is created from region.ch and will be
 * overwritten.  Make changes to region.ch instead.
 */ 
 
#ifndef class_StaticInfoOnly
/* 
 * The following information was copied, as-is, from region.ch.
 */ 
 
/* ********************************************************************** *\
 *         Copyright IBM Corporation 1988,1991 - All Rights Reserved      *
 *        For full copyright information see:'andrew/config/COPYRITE'     *
\* ********************************************************************** */

/*
	$Disclaimer: 
*Permission to use, copy, modify, and distribute 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, this permission notice, and the following 
*disclaimer appear in supporting documentation, and that the names of 
*IBM, Carnegie Mellon University, and other copyright holders, not be 
*used in advertising or publicity pertaining to distribution of the software 
*without specific, written prior permission.
*
*IBM, CARNEGIE MELLON UNIVERSITY, AND THE OTHER COPYRIGHT HOLDERS 
*DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 
*ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT 
*SHALL IBM, CARNEGIE MELLON UNIVERSITY, OR ANY OTHER COPYRIGHT HOLDER 
*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.
* $
*/


 



#define region_PROGRAMMERVERSION 2







/* 
 * End of information copied from region.ch.
 */ 
 
#endif /* class_StaticInfoOnly *//* 
 * Include the superclass information
 */ 
/* region has no super class */ 
 
 
#ifndef class_StaticInfoOnly
/* 
 * Data structure for region 
 */ 
struct region { 
    struct {
	struct basicobject_methods *region_methods;
    } header;
    struct _XRegion * regionData; /* really XRegion, but I don't want to include all of X just to get the typedef */

};

 
/* 
 * End of data structure for region.
 */ 
 

#endif /* class_StaticInfoOnly */

#ifndef class_StaticInfoOnly

#ifndef region_PROGRAMMERVERSION
#define region_PROGRAMMERVERSION 1
#endif /* region_PROGRAMMERVERSION */

#ifdef region_VERSION
#undef region_VERSION
#endif /* region_VERSION */
#define region_VERSION ((((region_PROGRAMMERVERSION << 16) ^ (14 << 8) ^ sizeof(struct region)) & 0x7ffff) + 0x80000 + (257 << 20))


#endif /* class_StaticInfoOnly */
#define region_StaticLoadOnlyThisClass()  \
{ extern struct classinfo *region__GetClassInfo(); \
 extern struct classheader *region_classheader_StaticExport; \
  (void) class_EnterInfo(NULL, region_classheader_StaticExport->name, region__GetClassInfo, NULL, region_classheader_StaticExport->namekey); } 
 
#define region_StaticLoad()  \
    { \
    region_StaticLoadOnlyThisClass();  \
    } 
 
#define region_StaticEntry  {region_StaticLoad()} 
 
#ifndef class_StaticInfoOnly
static struct classheader region_classheader = {
    region_VERSION,
    "region",
    "region",
    (struct basicobject_methods *) &class_RoutineStruct,
};

#define region_CLASSPROCEDURES (region_classheader.classprocedures)
int region_classref_;
#endif /* class_StaticInfoOnly */

#endif /* region_DEFINED */

#if !defined(region_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_region) && !defined(class_StaticEntriesOnly)
#define region_ROUTINESDEFINED

#define region_XorRegion(self,RHS,Result) \
    ((* ((void (*)())((self)->header.region_methods->routines[0]))) (self,RHS,Result))
#define region_UnionRegion(self,RHS,Result) \
    ((* ((void (*)())((self)->header.region_methods->routines[1]))) (self,RHS,Result))
#define region_IntersectRegion(self,RHS,Result) \
    ((* ((void (*)())((self)->header.region_methods->routines[2]))) (self,RHS,Result))
#define region_SubtractRegion(self,RHS,Result) \
    ((* ((void (*)())((self)->header.region_methods->routines[3]))) (self,RHS,Result))
#define region_ClearRegion(self) \
    ((* ((void (*)())((self)->header.region_methods->routines[4]))) (self))
#define region_RectRegion(self,NewRegnRect) \
    ((* ((void (*)())((self)->header.region_methods->routines[5]))) (self,NewRegnRect))
#define region_DuplicateRegion(self) \
    ((* ((struct region * (*)())((self)->header.region_methods->routines[6]))) (self))
#define region_OffsetRegion(self,DeltaX,DeltaY) \
    ((* ((void (*)())((self)->header.region_methods->routines[7]))) (self,DeltaX,DeltaY))
#define region_InsetRegion(self,DeltaX,DeltaY) \
    ((* ((void (*)())((self)->header.region_methods->routines[8]))) (self,DeltaX,DeltaY))
#define region_IsRegionEmpty(self) \
    ((* ((boolean (*)())((self)->header.region_methods->routines[9]))) (self))
#define region_IsPointInRegion(self,TestPt) \
    ((* ((boolean (*)())((self)->header.region_methods->routines[10]))) (self,TestPt))
#define region_IsRectInRegion(self,TestRect) \
    ((* ((boolean (*)())((self)->header.region_methods->routines[11]))) (self,TestRect))
#define region_AreRegionsEqual(self,TestRegion) \
    ((* ((boolean (*)())((self)->header.region_methods->routines[12]))) (self,TestRegion))
#define region_GetBoundingBox(self,rect) \
    ((* ((struct rectangle * (*)())((self)->header.region_methods->routines[13]))) (self,rect))
#define region_GetRegionData(self) \
 (((self))->regionData)    /* Only used in the X code.  probably should subclass region to do this */

#define region_NewFromObject(self) \
    ((* ((struct region * (*)())((self)->header.region_methods->info->procs->routines[0]))) (&region_classheader, (self)->header.region_methods->info->versionnumber))
#define region_New() \
    (*((struct region * (*)()) (region_CLASSPROCEDURES->routines[0])))(&region_classheader,region_VERSION)
#define region_Initialize(self) \
    (*((void (*)()) (region_CLASSPROCEDURES->routines[2])))(&region_classheader,self, region_VERSION)

#define region_Destroy(self) \
    ((* ((void (*)()) ((self)->header.region_methods->info->procs->routines[1]))) (&region_classheader, self))
#define region_Finalize(self) \
    (*((void (*)()) (region_CLASSPROCEDURES->routines[3])))(&region_classheader,self)

#define region_CreateEmptyRegion() \
    (*((struct region * (*)()) (region_CLASSPROCEDURES->routines[5])))(&region_classheader)
#define region_CreateRectRegion(RegionShape) \
    (*((struct region * (*)()) (region_CLASSPROCEDURES->routines[6])))(&region_classheader,RegionShape)
#define region_CreateOvalRegion(RegionShape) \
    (*((struct region * (*)()) (region_CLASSPROCEDURES->routines[7])))(&region_classheader,RegionShape)
#define region_CreatePolyRegion(PointArray,PointCount) \
    (*((struct region * (*)()) (region_CLASSPROCEDURES->routines[8])))(&region_classheader,PointArray,PointCount)
#define region_CopyRegion(Destination,Source) \
    (*((void (*)()) (region_CLASSPROCEDURES->routines[9])))(&region_classheader,Destination,Source)
#define region_FinalizeObject(self) \
    (*((void (*)()) (region_CLASSPROCEDURES->routines[10])))(&region_classheader,self)
#define region_InitializeObject(self) \
    (*((boolean (*)()) (region_CLASSPROCEDURES->routines[11])))(&region_classheader,self)


#endif /* !defined(region_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_region ) && !defined(class_StaticEntriesOnly)*/

