/* Auto generated GreenCard 2 code for FFI */
#include <windows.h>
#include "errors.h"
#include "win32debug.h"
#include "Win32Font_stub_ffi.h"
UINT prim_aNSI_CHARSET()
{ UINT res1;
  do {res1=ANSI_CHARSET;
      
      return((UINT)(res1));} while(0);
}
UINT prim_dEFAULT_CHARSET()
{ UINT res1;
  do {res1=DEFAULT_CHARSET;
      
      return((UINT)(res1));} while(0);
}
UINT prim_sYMBOL_CHARSET()
{ UINT res1;
  do {res1=SYMBOL_CHARSET;
      
      return((UINT)(res1));} while(0);
}
UINT prim_sHIFTJIS_CHARSET()
{ UINT res1;
  do {res1=SHIFTJIS_CHARSET;
      
      return((UINT)(res1));} while(0);
}
UINT prim_hANGEUL_CHARSET()
{ UINT res1;
  do {res1=HANGEUL_CHARSET;
      
      return((UINT)(res1));} while(0);
}
UINT prim_cHINESEBIG5_CHARSET()
{ UINT res1;
  do {res1=CHINESEBIG5_CHARSET;
      
      return((UINT)(res1));} while(0);
}
UINT prim_oEM_CHARSET()
{ UINT res1;
  do {res1=OEM_CHARSET;
      
      return((UINT)(res1));} while(0);
}
UINT prim_dEFAULT_PITCH()
{ UINT res1;
  do {res1=DEFAULT_PITCH;
      
      return((UINT)(res1));} while(0);
}
UINT prim_fIXED_PITCH()
{ UINT res1;
  do {res1=FIXED_PITCH;
      
      return((UINT)(res1));} while(0);
}
UINT prim_vARIABLE_PITCH()
{ UINT res1;
  do {res1=VARIABLE_PITCH;
      
      return((UINT)(res1));} while(0);
}
UINT prim_fF_DONTCARE()
{ UINT res1;
  do {res1=FF_DONTCARE;
      
      return((UINT)(res1));} while(0);
}
UINT prim_fF_ROMAN()
{ UINT res1;
  do {res1=FF_ROMAN;
      
      return((UINT)(res1));} while(0);
}
UINT prim_fF_SWISS()
{ UINT res1;
  do {res1=FF_SWISS;
      
      return((UINT)(res1));} while(0);
}
UINT prim_fF_MODERN()
{ UINT res1;
  do {res1=FF_MODERN;
      
      return((UINT)(res1));} while(0);
}
UINT prim_fF_SCRIPT()
{ UINT res1;
  do {res1=FF_SCRIPT;
      
      return((UINT)(res1));} while(0);
}
UINT prim_fF_DECORATIVE()
{ UINT res1;
  do {res1=FF_DECORATIVE;
      
      return((UINT)(res1));} while(0);
}
UINT prim_familyMask()
{ UINT res1;
  do {res1= 0xF0 ;
      
      return((UINT)(res1));} while(0);
}
UINT prim_pitchMask()
{ UINT res1;
  do {res1= 0x0F ;
      
      return((UINT)(res1));} while(0);
}
UINT prim_oUT_DEFAULT_PRECIS()
{ UINT res1;
  do {res1=OUT_DEFAULT_PRECIS;
      
      return((UINT)(res1));} while(0);
}
UINT prim_oUT_STRING_PRECIS()
{ UINT res1;
  do {res1=OUT_STRING_PRECIS;
      
      return((UINT)(res1));} while(0);
}
UINT prim_oUT_CHARACTER_PRECIS()
{ UINT res1;
  do {res1=OUT_CHARACTER_PRECIS;
      
      return((UINT)(res1));} while(0);
}
UINT prim_oUT_STROKE_PRECIS()
{ UINT res1;
  do {res1=OUT_STROKE_PRECIS;
      
      return((UINT)(res1));} while(0);
}
UINT prim_oUT_TT_PRECIS()
{ UINT res1;
  do {res1=OUT_TT_PRECIS;
      
      return((UINT)(res1));} while(0);
}
UINT prim_oUT_DEVICE_PRECIS()
{ UINT res1;
  do {res1=OUT_DEVICE_PRECIS;
      
      return((UINT)(res1));} while(0);
}
UINT prim_oUT_RASTER_PRECIS()
{ UINT res1;
  do {res1=OUT_RASTER_PRECIS;
      
      return((UINT)(res1));} while(0);
}
UINT prim_oUT_TT_ONLY_PRECIS()
{ UINT res1;
  do {res1=OUT_TT_ONLY_PRECIS;
      
      return((UINT)(res1));} while(0);
}
UINT prim_cLIP_DEFAULT_PRECIS()
{ UINT res1;
  do {res1=CLIP_DEFAULT_PRECIS;
      
      return((UINT)(res1));} while(0);
}
UINT prim_cLIP_CHARACTER_PRECIS()
{ UINT res1;
  do {res1=CLIP_CHARACTER_PRECIS;
      
      return((UINT)(res1));} while(0);
}
UINT prim_cLIP_STROKE_PRECIS()
{ UINT res1;
  do {res1=CLIP_STROKE_PRECIS;
      
      return((UINT)(res1));} while(0);
}
UINT prim_cLIP_MASK()
{ UINT res1;
  do {res1=CLIP_MASK;
      
      return((UINT)(res1));} while(0);
}
UINT prim_cLIP_LH_ANGLES()
{ UINT res1;
  do {res1=CLIP_LH_ANGLES;
      
      return((UINT)(res1));} while(0);
}
UINT prim_cLIP_TT_ALWAYS()
{ UINT res1;
  do {res1=CLIP_TT_ALWAYS;
      
      return((UINT)(res1));} while(0);
}
UINT prim_cLIP_EMBEDDED()
{ UINT res1;
  do {res1=CLIP_EMBEDDED;
      
      return((UINT)(res1));} while(0);
}
UINT prim_dEFAULT_QUALITY()
{ UINT res1;
  do {res1=DEFAULT_QUALITY;
      
      return((UINT)(res1));} while(0);
}
UINT prim_dRAFT_QUALITY()
{ UINT res1;
  do {res1=DRAFT_QUALITY;
      
      return((UINT)(res1));} while(0);
}
UINT prim_pROOF_QUALITY()
{ UINT res1;
  do {res1=PROOF_QUALITY;
      
      return((UINT)(res1));} while(0);
}
unsigned int prim_fW_DONTCARE()
{ unsigned int res1;
  do {res1=FW_DONTCARE;
      
      return((unsigned int)(res1));} while(0);
}
unsigned int prim_fW_THIN()
{ unsigned int res1;
  do {res1=FW_THIN;
      
      return((unsigned int)(res1));} while(0);
}
unsigned int prim_fW_EXTRALIGHT()
{ unsigned int res1;
  do {res1=FW_EXTRALIGHT;
      
      return((unsigned int)(res1));} while(0);
}
unsigned int prim_fW_LIGHT()
{ unsigned int res1;
  do {res1=FW_LIGHT;
      
      return((unsigned int)(res1));} while(0);
}
unsigned int prim_fW_NORMAL()
{ unsigned int res1;
  do {res1=FW_NORMAL;
      
      return((unsigned int)(res1));} while(0);
}
unsigned int prim_fW_MEDIUM()
{ unsigned int res1;
  do {res1=FW_MEDIUM;
      
      return((unsigned int)(res1));} while(0);
}
unsigned int prim_fW_SEMIBOLD()
{ unsigned int res1;
  do {res1=FW_SEMIBOLD;
      
      return((unsigned int)(res1));} while(0);
}
unsigned int prim_fW_BOLD()
{ unsigned int res1;
  do {res1=FW_BOLD;
      
      return((unsigned int)(res1));} while(0);
}
unsigned int prim_fW_EXTRABOLD()
{ unsigned int res1;
  do {res1=FW_EXTRABOLD;
      
      return((unsigned int)(res1));} while(0);
}
unsigned int prim_fW_HEAVY()
{ unsigned int res1;
  do {res1=FW_HEAVY;
      
      return((unsigned int)(res1));} while(0);
}
unsigned int prim_fW_REGULAR()
{ unsigned int res1;
  do {res1=FW_REGULAR;
      
      return((unsigned int)(res1));} while(0);
}
unsigned int prim_fW_ULTRALIGHT()
{ unsigned int res1;
  do {res1=FW_ULTRALIGHT;
      
      return((unsigned int)(res1));} while(0);
}
unsigned int prim_fW_DEMIBOLD()
{ unsigned int res1;
  do {res1=FW_DEMIBOLD;
      
      return((unsigned int)(res1));} while(0);
}
unsigned int prim_fW_ULTRABOLD()
{ unsigned int res1;
  do {res1=FW_ULTRABOLD;
      
      return((unsigned int)(res1));} while(0);
}
unsigned int prim_fW_BLACK()
{ unsigned int res1;
  do {res1=FW_BLACK;
      
      return((unsigned int)(res1));} while(0);
}
void* prim_createFont(INT arg1,INT arg2,INT arg3,INT arg4,unsigned int arg5,int arg6,int arg7,int arg8,UINT arg9,UINT arg10,UINT arg11,UINT arg12,UINT arg13,char * arg14)
{ static struct {HsPtr res1;HsInt gc_failed;HsPtr gc_failstring;} gc_result;
  HFONT res1;int gc_failed;
	     char* gc_failstring;
  do {res1 = CreateFont(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14);
      if ((gc_failed = (  res1 == 0  ))) {gc_failstring = ErrorMsg("CreateFont","NullHandle") ;}
      else {gc_failed = 0;}
      gc_result.res1 = (HFONT)(res1);
      gc_result.gc_failed = gc_failed;
      gc_result.gc_failstring = gc_failstring;
       free(arg14);
      return(&gc_result);} while(0);
}
HFONT access_prim_createFont_res1(void *ptr){ return(((struct {HsPtr res1;HsInt gc_failed;HsPtr gc_failstring;}*) ptr)->res1);}
int access_prim_createFont_gc_failed(void *ptr){ return(((struct {HsPtr res1;HsInt gc_failed;HsPtr gc_failstring;}*) ptr)->gc_failed);}
void* access_prim_createFont_gc_failstring(void *ptr){ return(((struct {HsPtr res1;HsInt gc_failed;HsPtr gc_failstring;}*) ptr)->gc_failstring);}
void prim_deleteFont(HFONT arg1)
{ do { DeleteObject(arg1);
      ;} while(0);
}
WORD prim_oEM_FIXED_FONT()
{ WORD res1;
  do {res1=OEM_FIXED_FONT;
      
      return((WORD)(res1));} while(0);
}
WORD prim_aNSI_FIXED_FONT()
{ WORD res1;
  do {res1=ANSI_FIXED_FONT;
      
      return((WORD)(res1));} while(0);
}
WORD prim_aNSI_VAR_FONT()
{ WORD res1;
  do {res1=ANSI_VAR_FONT;
      
      return((WORD)(res1));} while(0);
}
WORD prim_sYSTEM_FONT()
{ WORD res1;
  do {res1=SYSTEM_FONT;
      
      return((WORD)(res1));} while(0);
}
WORD prim_dEVICE_DEFAULT_FONT()
{ WORD res1;
  do {res1=DEVICE_DEFAULT_FONT;
      
      return((WORD)(res1));} while(0);
}
WORD prim_sYSTEM_FIXED_FONT()
{ WORD res1;
  do {res1=SYSTEM_FIXED_FONT;
      
      return((WORD)(res1));} while(0);
}
HFONT prim_getStockFont(WORD arg1)
{ HFONT res1;
  do { res1 = GetStockObject(arg1);
      
      return((HFONT)(res1));} while(0);
}
