 
#ifndef fontdesc_DEFINED
#define fontdesc_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 fontdesc.ch and will be
 * overwritten.  Make changes to fontdesc.ch instead.
 */ 
 
#ifndef class_StaticInfoOnly
/* 
 * The following information was copied, as-is, from fontdesc.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 fontdesc_All	-1
#define fontdesc_Plain	0
#define fontdesc_Bold	1
#define fontdesc_Italic	2
#define fontdesc_Shadow	4
#define fontdesc_Fixed	8
#define fontdesc_Outline 16
#define fontdesc_Thin	32
#define fontdesc_Black	64
#define fontdesc_Medium	128
#define fontdesc_Heavy	256
#define fontdesc_Condense 512

#define fontdesc_NumIcons 256


/* FaceCode flags - normally found in font.h for WM fonts*/
#define BoldFace 1
#define ItalicFace 2
#define ShadowFace 4
#define FixedWidthFace 010

struct fontnamedesc  {
    struct fontnamedesc *next;	/* next guy in list of all fonts */
    struct fontdesc *fontList;	/* list of all fonts in this family */
    char *name;			/* family name: use = for equality check */
};

struct FontSummary {
    short maxWidth;	/* the max char width over the whole font */
    short maxHeight;	/* the max above+below for the whole font */
    short newlineHeight;/* recommended newline distance for the font */
    short maxSpacing;	/* the max spacing in x direction */
    short maxBelow;	/* the max below for the whole font */
    short maxLeft;	/* the max to the left of the origin */
};

struct fontdesc_charInfo {
    short width;			/* Width of bounding box */
    short height;			/* Height of bounding box */
    short xOriginOffset;	        /* X offset from left of bb */
    short yOriginOffset;		/* Y offset from top of bb */
    short xSpacing;		/* hor dist from this origin to next*/
    short ySpacing;		/* vert dist from this origin to next */
};







/* 
 * End of information copied from fontdesc.ch.
 */ 
 
#endif /* class_StaticInfoOnly *//* 
 * Include the superclass information
 */ 
/* fontdesc has no super class */ 
 
 
#ifndef class_StaticInfoOnly
/* 
 * Data structure for fontdesc 
 */ 
struct fontdesc { 
    struct {
	struct basicobject_methods *fontdesc_methods;
    } header;
    struct fontnamedesc  *FontName;
    long   FontStyles;
    struct FontSummary summary;
    short *widthTable;		/* the full width table, if non-null */
    short *heightTable;		/* the full height table, if non-null*/
    short    FontSize;
    boolean DescValid;
    struct font * MachineDependentFontDescriptor;
    struct fontdesc *next;
    unsigned char charValid[fontdesc_NumIcons / 8];

};

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

#endif /* class_StaticInfoOnly */

#ifndef class_StaticInfoOnly

#ifndef fontdesc_PROGRAMMERVERSION
#define fontdesc_PROGRAMMERVERSION 1
#endif /* fontdesc_PROGRAMMERVERSION */

#ifdef fontdesc_VERSION
#undef fontdesc_VERSION
#endif /* fontdesc_VERSION */
#define fontdesc_VERSION ((((fontdesc_PROGRAMMERVERSION << 16) ^ (13 << 8) ^ sizeof(struct fontdesc)) & 0x7ffff) + 0x80000 + (194 << 20))


#endif /* class_StaticInfoOnly */
#define fontdesc_StaticLoadOnlyThisClass()  \
{ extern struct classinfo *fontdesc__GetClassInfo(); \
 extern struct classheader *fontdesc_classheader_StaticExport; \
  (void) class_EnterInfo(NULL, fontdesc_classheader_StaticExport->name, fontdesc__GetClassInfo, NULL, fontdesc_classheader_StaticExport->namekey); } 
 
#define fontdesc_StaticLoad()  \
    { \
    fontdesc_StaticLoadOnlyThisClass();  \
    } 
 
#define fontdesc_StaticEntry  {fontdesc_StaticLoad()} 
 
#ifndef class_StaticInfoOnly
static struct classheader fontdesc_classheader = {
    fontdesc_VERSION,
    "fontdesc",
    "fontdesc",
    (struct basicobject_methods *) &class_RoutineStruct,
};

#define fontdesc_CLASSPROCEDURES (fontdesc_classheader.classprocedures)
int fontdesc_classref_;
#endif /* class_StaticInfoOnly */

#endif /* fontdesc_DEFINED */

#if !defined(fontdesc_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_fontdesc) && !defined(class_StaticEntriesOnly)
#define fontdesc_ROUTINESDEFINED

#define fontdesc_GetFontFamily(self) \
    ((* ((char * (*)())((self)->header.fontdesc_methods->routines[0]))) (self))
#define fontdesc_GetFontFamilyDesc(self) \
    ((* ((struct fontnamedesc * (*)())((self)->header.fontdesc_methods->routines[1]))) (self))
#define fontdesc_GetFontSize(self) \
    ((* ((long (*)())((self)->header.fontdesc_methods->routines[2]))) (self))
#define fontdesc_GetFontStyle(self) \
    ((* ((long (*)())((self)->header.fontdesc_methods->routines[3]))) (self))
#define fontdesc_CvtCharToGraphic(self,gr,SpecialChar) \
    ((* ((struct graphic * (*)())((self)->header.fontdesc_methods->routines[4]))) (self,gr,SpecialChar))
#define fontdesc_GetRealFontDesc(self,gr) \
    ((* ((struct font * (*)())((self)->header.fontdesc_methods->routines[5]))) (self,gr))
#define fontdesc_StringSize(self,gr,string,XWidth,YWidth) \
    ((* ((long (*)())((self)->header.fontdesc_methods->routines[6]))) (self,gr,string,XWidth,YWidth))
#define fontdesc_StringBoundingBox(self,graphic,string,width,height) \
    ((* ((long (*)())((self)->header.fontdesc_methods->routines[7]))) (self,graphic,string,width,height))
#define fontdesc_TextSize(self,gr,text,TextLength,XWidth,YWidth) \
    ((* ((long (*)())((self)->header.fontdesc_methods->routines[8]))) (self,gr,text,TextLength,XWidth,YWidth))
#define fontdesc_WidthTable(self,gr) \
    ((* ((short* (*)())((self)->header.fontdesc_methods->routines[9]))) (self,gr))
#define fontdesc_HeightTable(self,gr) \
    ((* ((short * (*)())((self)->header.fontdesc_methods->routines[10]))) (self,gr))
#define fontdesc_FontSummary(self,gr) \
    ((* ((struct FontSummary * (*)())((self)->header.fontdesc_methods->routines[11]))) (self,gr))
#define fontdesc_CharSummary(self,gr,LookUpChar,returendInfo) \
    ((* ((void (*)())((self)->header.fontdesc_methods->routines[12]))) (self,gr,LookUpChar,returendInfo))
#define fontdesc_SetCharValid(self,c) \
 ((self)->charValid[(c) >> 3] |= (1 << ((c) & 7)))
#define fontdesc_ClearCharValid(self,c) \
 ((self)->charValid[(c) >> 3] &= ~(1 << ((c) & 7)))
#define fontdesc_CharValid(self,c) \
 ((self)->charValid[(c) >> 3] & (1 << ((c) & 7)))

#define fontdesc_NewFromObject(self) \
    ((* ((struct fontdesc * (*)())((self)->header.fontdesc_methods->info->procs->routines[0]))) (&fontdesc_classheader, (self)->header.fontdesc_methods->info->versionnumber))
#define fontdesc_New() \
    (*((struct fontdesc * (*)()) (fontdesc_CLASSPROCEDURES->routines[0])))(&fontdesc_classheader,fontdesc_VERSION)
#define fontdesc_Initialize(self) \
    (*((void (*)()) (fontdesc_CLASSPROCEDURES->routines[2])))(&fontdesc_classheader,self, fontdesc_VERSION)

#define fontdesc_Destroy(self) \
    ((* ((void (*)()) ((self)->header.fontdesc_methods->info->procs->routines[1]))) (&fontdesc_classheader, self))
#define fontdesc_Finalize(self) \
    (*((void (*)()) (fontdesc_CLASSPROCEDURES->routines[3])))(&fontdesc_classheader,self)

#define fontdesc_Create(FontName,FontStyle,FontSize) \
    (*((struct fontdesc * (*)()) (fontdesc_CLASSPROCEDURES->routines[5])))(&fontdesc_classheader,FontName,FontStyle,FontSize)
#define fontdesc_GetFontNameDesc(FontName) \
    (*((struct fontnamedesc * (*)()) (fontdesc_CLASSPROCEDURES->routines[6])))(&fontdesc_classheader,FontName)
#define fontdesc_ExplodeFontName(fontName,familyName,bufSize,fontStyle,fontSize) \
    (*((boolean (*)()) (fontdesc_CLASSPROCEDURES->routines[7])))(&fontdesc_classheader,fontName,familyName,bufSize,fontStyle,fontSize)
#define fontdesc_InitializeObject(self) \
    (*((boolean (*)()) (fontdesc_CLASSPROCEDURES->routines[8])))(&fontdesc_classheader,self)
#define fontdesc_FinalizeObject(FontDescObject) \
    (*((void (*)()) (fontdesc_CLASSPROCEDURES->routines[9])))(&fontdesc_classheader,FontDescObject)
#define fontdesc_Allocate() \
    (*((struct fontdesc * (*)()) (fontdesc_CLASSPROCEDURES->routines[10])))(&fontdesc_classheader)
#define fontdesc_Deallocate(self) \
    (*((void (*)()) (fontdesc_CLASSPROCEDURES->routines[11])))(&fontdesc_classheader,self)


#endif /* !defined(fontdesc_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_fontdesc ) && !defined(class_StaticEntriesOnly)*/

