 
#ifndef xgraphic_DEFINED
#define xgraphic_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 xgraphic.ch and will be
 * overwritten.  Make changes to xgraphic.ch instead.
 */ 
 
#ifndef class_StaticInfoOnly
/* 
 * The following information was copied, as-is, from xgraphic.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.
* $
*/


 

#include <fontdesc.ih>
#include <point.h>
#include <rect.h>
#include <region.ih>

#define xgraphic_PROGRAMMERVERSION	1
#include <image.ih>

typedef struct {
  Display  *disp;       /* destination display */
  int       scrn;       /* destination screen */
  int       depth;      /* depth of drawable we want/have */
  Drawable  drawable;   /* drawable to send image to */
  Pixel     foreground; /* foreground and background pixels for mono images */
  Pixel     background;
  Colormap  cmap;       /* colormap used for image */
  GC        gc;         /* cached gc for sending image */
  XImage   *ximage;     /* ximage structure */
} XImageInfo;







/* 
 * End of information copied from xgraphic.ch.
 */ 
 
#endif /* class_StaticInfoOnly *//* 
 * Include the superclass information
 */ 
#define dontDefineRoutinesFor_graphic
#include "graphic.ih"
#undef dontDefineRoutinesFor_graphic

 
 
#ifndef class_StaticInfoOnly
/* 
 * Data structure for xgraphic 
 */ 
struct xgraphic { 
    union {
	struct basicobject_methods *xgraphic_methods;
	struct traced traced;
	struct observable observable;
	struct graphic graphic;
    } header; 
    struct xgraphic **gray_levels;	/* mapping of gray pixmaps for monochrome rendering of colors */
    struct xgraphic **gray_shades;   /* Current set of gray pixmaps */
    GC localGraphicContext;	/* Context for the pixmap */
    GC localFillGraphicContext;	/* Context for filling */
    long lastFillStyle;		/* Fill style used for fill gc */
    unsigned long lastFillPixel; /* Pixel used for fill gc */
    struct xgraphic *lastFillTile;  /* Tile used for fill gc */
    Drawable localWindow;		/* X pixmap id  */
    Display *displayUsed;		/* which display is used */
    int screenUsed;			/* which screen is used */
    long lastUpdateRegionIDUsed;    /* set the last update region sequence number that has been processed */
    unsigned long foregroundpixel; /* Pixel value of foreground color. */
    unsigned long backgroundpixel; /* Pixel value of background color. */
    long DisplayClass;
    boolean valid;		/* Set to true if we have a valid Xwindow, etc */
    struct xgraphic *lastStipple;
    unsigned long *index;
    int numColorsInIndex;
    XImageInfo *ximageinfo;
    boolean flipforstipple;
    boolean haveMapInfo;

};

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

#endif /* class_StaticInfoOnly */

#ifndef class_StaticInfoOnly

#ifndef xgraphic_PROGRAMMERVERSION
#define xgraphic_PROGRAMMERVERSION 1
#endif /* xgraphic_PROGRAMMERVERSION */

#ifdef xgraphic_VERSION
#undef xgraphic_VERSION
#endif /* xgraphic_VERSION */
#define xgraphic_VERSION ((((xgraphic_PROGRAMMERVERSION << 16) ^ (113 << 8) ^ sizeof(struct xgraphic)) & 0x7ffff) + 0x80000 + (2 << 20))


#endif /* class_StaticInfoOnly */
#define xgraphic_StaticLoadOnlyThisClass()  \
{ extern struct classinfo *xgraphic__GetClassInfo(); \
 extern struct classheader *xgraphic_classheader_StaticExport; \
  (void) class_EnterInfo(NULL, xgraphic_classheader_StaticExport->name, xgraphic__GetClassInfo, NULL, xgraphic_classheader_StaticExport->namekey); } 
 
#define xgraphic_StaticLoad()  \
    { \
    graphic_StaticLoad(); \
    xgraphic_StaticLoadOnlyThisClass();  \
    } 
 
#define xgraphic_StaticEntry  {xgraphic_StaticLoad()} 
 
#ifndef class_StaticInfoOnly
static struct classheader xgraphic_classheader = {
    xgraphic_VERSION,
    "xgraphic",
    "xgraphic",
    (struct basicobject_methods *) &class_RoutineStruct,
};

#define xgraphic_CLASSPROCEDURES (xgraphic_classheader.classprocedures)
int xgraphic_classref_;
#endif /* class_StaticInfoOnly */

#endif /* xgraphic_DEFINED */

#if !defined(xgraphic_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_xgraphic) && !defined(class_StaticEntriesOnly)
#define xgraphic_ROUTINESDEFINED

#define xgraphic_Reference(self) \
 (((&(self)->header.traced))->refcount++)
#define xgraphic_UnReference(self) \
 ((((&(self)->header.traced))->refcount>0)?((&(self)->header.traced))->refcount--:0)
#define xgraphic_ReferenceCount(self) \
 (((&(self)->header.traced))->refcount)
#define xgraphic_AddObserver(self,observer) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[0]))) (self,observer))
#define xgraphic_IsObserver(self,observer) \
    ((* ((boolean (*)())((self)->header.xgraphic_methods->routines[1]))) (self,observer))
#define xgraphic_RemoveObserver(self,observer) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[2]))) (self,observer))
#define xgraphic_NotifyObservers(self,value) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[3]))) (self,value))
#define xgraphic_ObservedChanged(self,changed,value) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[4]))) (self,changed,value))
#define xgraphic_AddRecipient(self,trigger,rcvr,func,rock) \
    ((* ((boolean (*)())((self)->header.xgraphic_methods->routines[5]))) (self,trigger,rcvr,func,rock))
#define xgraphic_DeleteRecipient(self,trigger,rcvr) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[6]))) (self,trigger,rcvr))
#define xgraphic_PullTrigger(self,trigger) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[7]))) (self,trigger))
#define xgraphic_DisableTrigger(self,trigger) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[8]))) (self,trigger))
#define xgraphic_EnableTrigger(self,trigger) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[9]))) (self,trigger))
#define xgraphic_DisableCount(self,trigger) \
    ((* ((long (*)())((self)->header.xgraphic_methods->routines[10]))) (self,trigger))
#define xgraphic_MoveToPt(self,Pt) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[11]))) (self,Pt))
#define xgraphic_MoveTo(self,NewX,NewY) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[12]))) (self,NewX,NewY))
#define xgraphic_Move(self,DeltaX,DeltaY) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[13]))) (self,DeltaX,DeltaY))
#define xgraphic_GetCurrentPt(self,Pt) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[14]))) (self,Pt))
#define xgraphic_DrawLineToPt(self,LineEnd) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[15]))) (self,LineEnd))
#define xgraphic_DrawLineTo(self,XEnd,YEnd) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[16]))) (self,XEnd,YEnd))
#define xgraphic_DrawLine(self,DeltaX,DeltaY) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[17]))) (self,DeltaX,DeltaY))
#define xgraphic_DrawString(self,Text,Operation) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[18]))) (self,Text,Operation))
#define xgraphic_DrawText(self,Text,TextLength,Operation) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[19]))) (self,Text,TextLength,Operation))
#define xgraphic_SetSpaceShim(self,Amount) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[20]))) (self,Amount))
#define xgraphic_GetSpaceShim(self) \
    ((* ((short (*)())((self)->header.xgraphic_methods->routines[21]))) (self))
#define xgraphic_SetFont(self,ChosenFont) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[22]))) (self,ChosenFont))
#define xgraphic_GetFont(self) \
    ((* ((struct fontdesc * (*)())((self)->header.xgraphic_methods->routines[23]))) (self))
#define xgraphic_DrawRect(self,Rect) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[24]))) (self,Rect))
#define xgraphic_DrawRectSize(self,x,y,width,height) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[25]))) (self,x,y,width,height))
#define xgraphic_DrawPolygon(self,PointArray,PointCount) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[26]))) (self,PointArray,PointCount))
#define xgraphic_DrawTrapezoid(self,topX,topY,topWidth,bottomX,bottomY,bottomWidth) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[27]))) (self,topX,topY,topWidth,bottomX,bottomY,bottomWidth))
#define xgraphic_DrawPath(self,PointArray,PointCount) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[28]))) (self,PointArray,PointCount))
#define xgraphic_DrawOval(self,Rect) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[29]))) (self,Rect))
#define xgraphic_DrawOvalSize(self,x,y,width,height) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[30]))) (self,x,y,width,height))
#define xgraphic_DrawArc(self,EnclRect,StartAngle,OffsetAngle) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[31]))) (self,EnclRect,StartAngle,OffsetAngle))
#define xgraphic_DrawArcSize(self,x,y,width,height,StartAngle,OffsetAngle) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[32]))) (self,x,y,width,height,StartAngle,OffsetAngle))
#define xgraphic_DrawRRect(self,OuterBox,InnerBox) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[33]))) (self,OuterBox,InnerBox))
#define xgraphic_DrawRRectSize(self,x,y,width,height,cornerWidth,cornerHeight) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[34]))) (self,x,y,width,height,cornerWidth,cornerHeight))
#define xgraphic_DrawRgn(self,Rgn) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[35]))) (self,Rgn))
#define xgraphic_FillRect(self,Rect,Tile) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[36]))) (self,Rect,Tile))
#define xgraphic_FillRectSize(self,x,y,width,height,Tile) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[37]))) (self,x,y,width,height,Tile))
#define xgraphic_FillTrapezoid(self,topX,topY,topWidth,bottomX,bottomY,bottomWidth,Tile) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[38]))) (self,topX,topY,topWidth,bottomX,bottomY,bottomWidth,Tile))
#define xgraphic_FillPolygon(self,PointArray,PointCount,Tile) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[39]))) (self,PointArray,PointCount,Tile))
#define xgraphic_FillOval(self,Rect,Tile) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[40]))) (self,Rect,Tile))
#define xgraphic_FillOvalSize(self,x,y,width,height,Tile) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[41]))) (self,x,y,width,height,Tile))
#define xgraphic_FillArc(self,EnclRect,StartAngle,OffsetAngle,Tile) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[42]))) (self,EnclRect,StartAngle,OffsetAngle,Tile))
#define xgraphic_FillArcSize(self,x,y,width,height,StartAngle,OffsetAngle,Tile) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[43]))) (self,x,y,width,height,StartAngle,OffsetAngle,Tile))
#define xgraphic_FillRRect(self,OuterBox,InnerBox,Tile) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[44]))) (self,OuterBox,InnerBox,Tile))
#define xgraphic_FillRRectSize(self,x,y,width,height,cornerWidth,cornerHeight,Tile) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[45]))) (self,x,y,width,height,cornerWidth,cornerHeight,Tile))
#define xgraphic_FillRgn(self,Rgn,Tile) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[46]))) (self,Rgn,Tile))
#define xgraphic_EraseRect(self,Rect) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[47]))) (self,Rect))
#define xgraphic_EraseRectSize(self,x,y,width,height) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[48]))) (self,x,y,width,height))
#define xgraphic_EraseVisualRect(self) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[49]))) (self))
#define xgraphic_BitBlt(self,SrcRect,DestGraphic,DstOrigin,ClipRectList) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[50]))) (self,SrcRect,DestGraphic,DstOrigin,ClipRectList))
#define xgraphic_BitBltSize(self,srcX,srcY,dstX,dstY,Width,Height,DstGraphic,clipX,clipY,clipWidth,clipHeight) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[51]))) (self,srcX,srcY,dstX,dstY,Width,Height,DstGraphic,clipX,clipY,clipWidth,clipHeight))
#define xgraphic_SetBitAtLoc(self,XPos,YPos,NewValue) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[52]))) (self,XPos,YPos,NewValue))
#define xgraphic_WritePixImage(self,DestX,DestY,SrcPixels,SrcX,SrcY,width,height) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[53]))) (self,DestX,DestY,SrcPixels,SrcX,SrcY,width,height))
#define xgraphic_ReadPixImage(self,SrcX,SrcY,DestPixels,DestX,DestY,width,height) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[54]))) (self,SrcX,SrcY,DestPixels,DestX,DestY,width,height))
#define xgraphic_InsertGraphic(self,EnclosingGraphic,EnclosedRectangle) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[55]))) (self,EnclosingGraphic,EnclosedRectangle))
#define xgraphic_InsertGraphicSize(self,EnclosingGraphic,xOriginInParent,yOriginInParent,width,height) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[56]))) (self,EnclosingGraphic,xOriginInParent,yOriginInParent,width,height))
#define xgraphic_InsertGraphicRegion(self,EnclosingGraphic,regions) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[57]))) (self,EnclosingGraphic,regions))
#define xgraphic_SetVisualRegion(self,region) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[58]))) (self,region))
#define xgraphic_GetVisualRegion(self,retRegion) \
    ((* ((struct region * (*)())((self)->header.xgraphic_methods->routines[59]))) (self,retRegion))
#define xgraphic_MoveLogicalOrigin(self,DeltaX,DeltaY) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[60]))) (self,DeltaX,DeltaY))
#define xgraphic_SetLogicalOrigin(self,NewX,NewY) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[61]))) (self,NewX,NewY))
#define xgraphic_SetLogicalOriginPt(self,Pt) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[62]))) (self,Pt))
#define xgraphic_GetLogicalBounds(self,Rect) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[63]))) (self,Rect))
#define xgraphic_GetLogicalRight(self) \
    ((* ((long (*)())((self)->header.xgraphic_methods->routines[64]))) (self))
#define xgraphic_GetLogicalBottom(self) \
    ((* ((long (*)())((self)->header.xgraphic_methods->routines[65]))) (self))
#define xgraphic_GetEnclosedBounds(self,Rect) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[66]))) (self,Rect))
#define xgraphic_GetEnclosedRight(self) \
    ((* ((long (*)())((self)->header.xgraphic_methods->routines[67]))) (self))
#define xgraphic_GetEnclosedBottom(self) \
    ((* ((long (*)())((self)->header.xgraphic_methods->routines[68]))) (self))
#define xgraphic_GetVisualBounds(self,Rect) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[69]))) (self,Rect))
#define xgraphic_GetVisualRight(self) \
    ((* ((long (*)())((self)->header.xgraphic_methods->routines[70]))) (self))
#define xgraphic_GetVisualBottom(self) \
    ((* ((long (*)())((self)->header.xgraphic_methods->routines[71]))) (self))
#define xgraphic_SetClippingRegion(self,region) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[72]))) (self,region))
#define xgraphic_GetClippingRegion(self,retRegion) \
    ((* ((struct region * (*)())((self)->header.xgraphic_methods->routines[73]))) (self,retRegion))
#define xgraphic_SetClippingRect(self,AdditionalRect) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[74]))) (self,AdditionalRect))
#define xgraphic_SetClippingRectSize(self,x,y,w,h) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[75]))) (self,x,y,w,h))
#define xgraphic_ClearClippingRect(self) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[76]))) (self))
#define xgraphic_GetClippingRect(self,Rect) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[77]))) (self,Rect))
#define xgraphic_SetLineWidth(self,NewLineWidth) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[78]))) (self,NewLineWidth))
#define xgraphic_GetLineWidth(self) \
    ((* ((short (*)())((self)->header.xgraphic_methods->routines[79]))) (self))
#define xgraphic_SetLineDash(self,dashPattern,dashOffset,dashType) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[80]))) (self,dashPattern,dashOffset,dashType))
#define xgraphic_GetLineDash(self,dashPattern,dashOffset,dashType) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[81]))) (self,dashPattern,dashOffset,dashType))
#define xgraphic_SetLineCap(self,NewLineCap) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[82]))) (self,NewLineCap))
#define xgraphic_GetLineCap(self) \
    ((* ((short (*)())((self)->header.xgraphic_methods->routines[83]))) (self))
#define xgraphic_SetLineJoin(self,NewLineJoin) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[84]))) (self,NewLineJoin))
#define xgraphic_GetLineJoin(self) \
    ((* ((short (*)())((self)->header.xgraphic_methods->routines[85]))) (self))
#define xgraphic_SetTransferMode(self,NewTransferMode) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[86]))) (self,NewTransferMode))
#define xgraphic_GetTransferMode(self) \
    ((* ((short (*)())((self)->header.xgraphic_methods->routines[87]))) (self))
#define xgraphic_RestoreGraphicsState(self) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[88]))) (self))
#define xgraphic_FlushGraphics(self) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[89]))) (self))
#define xgraphic_WhitePattern(self) \
    ((* ((struct graphic * (*)())((self)->header.xgraphic_methods->routines[90]))) (self))
#define xgraphic_BlackPattern(self) \
    ((* ((struct graphic * (*)())((self)->header.xgraphic_methods->routines[91]))) (self))
#define xgraphic_GrayPattern(self,IntensityNum,IntensityDenom) \
    ((* ((struct graphic * (*)())((self)->header.xgraphic_methods->routines[92]))) (self,IntensityNum,IntensityDenom))
#define xgraphic_SetPatternOrigin(self,xpos,ypos) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[93]))) (self,xpos,ypos))
#define xgraphic_GetPatternOrigin(self,xpos,ypos) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[94]))) (self,xpos,ypos))
#define xgraphic_SetForegroundColor(self,colorName,red,green,blue) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[95]))) (self,colorName,red,green,blue))
#define xgraphic_GetForegroundColor(self,colorName,red,green,blue) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[96]))) (self,colorName,red,green,blue))
#define xgraphic_SetBackgroundColor(self,colorName,red,green,blue) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[97]))) (self,colorName,red,green,blue))
#define xgraphic_GetBackgroundColor(self,colorName,red,green,blue) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[98]))) (self,colorName,red,green,blue))
#define xgraphic_SetFGColor(self,red,green,blue) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[99]))) (self,red,green,blue))
#define xgraphic_GetFGColor(self,red,green,blue) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[100]))) (self,red,green,blue))
#define xgraphic_SetBGColor(self,red,green,blue) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[101]))) (self,red,green,blue))
#define xgraphic_GetBGColor(self,red,green,blue) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[102]))) (self,red,green,blue))
#define xgraphic_GetHorizontalResolution(self) \
    ((* ((long (*)())((self)->header.xgraphic_methods->routines[103]))) (self))
#define xgraphic_GetVerticalResolution(self) \
    ((* ((long (*)())((self)->header.xgraphic_methods->routines[104]))) (self))
#define xgraphic_GetWindowManagerType(self) \
    ((* ((char * (*)())((self)->header.xgraphic_methods->routines[105]))) (self))
#define xgraphic_GetDevice(self) \
    ((* ((long (*)())((self)->header.xgraphic_methods->routines[106]))) (self))
#define xgraphic_DisplayClass(self) \
    ((* ((long (*)())((self)->header.xgraphic_methods->routines[107]))) (self))
#define xgraphic_IsImageInverted(self) \
    ((* ((boolean (*)())((self)->header.xgraphic_methods->routines[108]))) (self))
#define xgraphic_WriteImage(self,DestX,DestY,image,SrcX,SrcY,width,height) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[109]))) (self,DestX,DestY,image,SrcX,SrcY,width,height))
#define xgraphic_ReadImage(self,SrcX,SrcY,DestImage,DestX,DestY,width,height) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[110]))) (self,SrcX,SrcY,DestImage,DestX,DestY,width,height))
#define xgraphic_SetFGToShadow(self,shadow) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[111]))) (self,shadow))
#define xgraphic_ClearColors(self) \
    ((* ((void (*)())((self)->header.xgraphic_methods->routines[112]))) (self))
#define xgraphic_GetLogicalWidth(self) \
 (((&(self)->header.graphic))->localBounds.width)
#define xgraphic_GetLogicalHeight(self) \
 (((&(self)->header.graphic))->localBounds.height)
#define xgraphic_GetLogicalLeft(self) \
 (((&(self)->header.graphic))->localBounds.left)
#define xgraphic_GetLogicalTop(self) \
 (((&(self)->header.graphic))->localBounds.top)
#define xgraphic_GetVisualWidth(self) \
 (((&(self)->header.graphic))->visualBounds.width)
#define xgraphic_GetVisualHeight(self) \
 (((&(self)->header.graphic))->visualBounds.height)
#define xgraphic_GetVisualLeft(self) \
 (((&(self)->header.graphic))->visualBounds.left)
#define xgraphic_GetVisualTop(self) \
 (((&(self)->header.graphic))->visualBounds.top)
#define xgraphic_GetEnclosedWidth(self) \
 (((&(self)->header.graphic))->localBounds.width)
#define xgraphic_GetEnclosedHeight(self) \
 (((&(self)->header.graphic))->localBounds.height)
#define xgraphic_GetEnclosedLeft(self) \
 (point_X(&(((&(self)->header.graphic))->enclosedOrigin)))
#define xgraphic_GetEnclosedTop(self) \
 (point_Y(&(((&(self)->header.graphic))->enclosedOrigin)))
#define xgraphic_GetColormap(self) \
 (((&(self)->header.graphic))->colormap)
#define xgraphic_SetColormap(self,cmap) \
 (((&(self)->header.graphic))->colormap = (cmap))
#define xgraphic_GetInheritedColormap(self) \
 (((&(self)->header.graphic))->inheritedColormap ? ((&(self)->header.graphic))->inheritedColormap : NULL)
#define xgraphic_SetInheritedColormap(self,cmap) \
 (((&(self)->header.graphic))->inheritedColormap = (cmap))
#define xgraphic_ClearInheritedColormap(self) \
 (((&(self)->header.graphic))->inheritedColormap = NULL)
#define xgraphic_CurrentColormap(self) \
 (((&(self)->header.graphic)->colormap && *((&(self)->header.graphic)->colormap)) ? (&(self)->header.graphic)->colormap : (&(self)->header.graphic)->inheritedColormap)
#define xgraphic_Valid(self) \
 (((self))->valid)
#define xgraphic_XWindow(self) \
 (((self))->localWindow)
#define xgraphic_XDisplay(self) \
 (((self))->displayUsed)
#define xgraphic_XScreen(self) \
 (((self))->screenUsed)
#define xgraphic_XGC(self) \
  (((self))->localGraphicContext)
#define xgraphic_XFillGC(self) \
 (((self))->localFillGraphicContext)

#define xgraphic_NewFromObject(self) \
    ((* ((struct xgraphic * (*)())((self)->header.xgraphic_methods->info->procs->routines[0]))) (&xgraphic_classheader, (self)->header.xgraphic_methods->info->versionnumber))
#define xgraphic_New() \
    (*((struct xgraphic * (*)()) (xgraphic_CLASSPROCEDURES->routines[0])))(&xgraphic_classheader,xgraphic_VERSION)
#define xgraphic_Initialize(self) \
    (*((void (*)()) (xgraphic_CLASSPROCEDURES->routines[2])))(&xgraphic_classheader,self, xgraphic_VERSION)

#define xgraphic_Destroy(self) \
    ((* ((void (*)()) ((self)->header.xgraphic_methods->info->procs->routines[1]))) (&xgraphic_classheader, self))
#define xgraphic_Finalize(self) \
    (*((void (*)()) (xgraphic_CLASSPROCEDURES->routines[3])))(&xgraphic_classheader,self)

#define xgraphic_InitializeObject(self) \
    (*((boolean (*)()) (xgraphic_CLASSPROCEDURES->routines[5])))(&xgraphic_classheader,self)
#define xgraphic_FinalizeObject(self) \
    (*((void (*)()) (xgraphic_CLASSPROCEDURES->routines[6])))(&xgraphic_classheader,self)
#define xgraphic_SetUpdateRegion(Rgn,whichDisplay,whichWindow) \
    (*((void (*)()) (xgraphic_CLASSPROCEDURES->routines[7])))(&xgraphic_classheader,Rgn,whichDisplay,whichWindow)
#define xgraphic_FinalizeWindow(whichDisplay,whichWindow) \
    (*((void (*)()) (xgraphic_CLASSPROCEDURES->routines[8])))(&xgraphic_classheader,whichDisplay,whichWindow)
#define xgraphic_InitializeClass() \
    (*((boolean (*)()) (xgraphic_CLASSPROCEDURES->routines[9])))(&xgraphic_classheader)


#endif /* !defined(xgraphic_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_xgraphic ) && !defined(class_StaticEntriesOnly)*/

