
#var BITMAP_HDR_SIZE D(4)
#var NULL D(((void*)0))
#var A_REVERSE D(0)
#var A_NORMAL D(1)
#var A_XOR D(2)
#var A_SHADED D(3)
#var A_REPLACE D(4)
#var A_OR D(5)
#var A_AND D(6)
#var A_THICK1 D(7)
#var A_SHADE_V D(8)
#var A_SHADE_H D(9)
#var A_SHADE_NS D(10)
#var A_SHADE_PS D(11)

#var BITMAP typedef struct{unsigned short NumRows,NumCols;unsigned char Data[];}BITMAP;
#var FALSE D(0)
#var TRUE D(1)

#var B_NORMAL D(16)
#var B_ROUNDED D(32)
#var B_DOUBLE D(64)
#var B_CUT D(128)

#var BT_NONE D(0)
#var BT_OK D(1)
#var BT_SAVE D(2)
#var BT_YES D(3)
#var BT_CANCEL D(4)
#var BT_NO D(5)
#var BT_GOTO D(6)

#var F_4x6 D(0)
#var F_6x8 D(1)
#var F_8x10 D(2)

#var HANDLE typedef unsigned short HANDLE;
#var ICON typedef struct{unsigned short i[16];}ICON;
#var pICON typedef unsigned short*pICON;
#var SCR_COORDS typedef unsigned char SCR_COORDS;
#var SCR_RECT typedef union{struct{unsigned char x0,y0,x1,y1;}xy;unsigned long l;}SCR_RECT;
#var SCR_STATE typedef struct{void*ScrAddr;unsigned char XMax,YMax;short CurFont,CurAttr,CurX,CurY;SCR_RECT CurClip;}SCR_STATE;
#var WIN_COORDS typedef short WIN_COORDS;
#var WIN_RECT typedef struct{short x0,y0,x1,y1;}WIN_RECT;
#var WINDOW typedef struct WindowStruct{unsigned short Flags;unsigned char CurFont;unsigned char CurAttr;unsigned char Background;short TaskId;short CurX,CurY;short CursorX,CursorY;SCR_RECT Client;SCR_RECT Window;SCR_RECT Clip;SCR_RECT Port;unsigned short DupScr;struct WindowStruct*Next;char*Title;SCR_STATE savedScrState;unsigned char Reserved[16];}WINDOW;
#var WF_SYS_ALLOC D(1)
#var WF_STEAL_MEM D(2)
#var WF_DONT_REALLOC D(4)
#var WF_ROUNDEDBORDER D(8)
#var WF_SAVE_SCR D(16)
#var WF_DUP_SCR D(32)
#var WF_TTY D(64)
#var WF_ACTIVE D(128)
#var WF_NOBORDER D(256)
#var WF_NOBOLD D(512)
#var WF_DUP_ON D(1024)
#var WF_VIRTUAL D(2048)
#var WF_TITLE D(4096)
#var WF_DIRTY D(8192)
#var WF_TRY_SAVE_SCR D(16400)
#var WF_VISIBLE D(-32768)

#var DeskTop D(((WINDOW*const)(((long*)(_rom_call_addr(0)))+1)))
#var FirstWindow D((*((WINDOW**)(_rom_call_addr(0)))))
#var DrawStaticButton D(_rom_call(void,(WINDOW*,short,short),35))
#var DrawWinBorder D(_rom_call(void,(WINDOW*,SCR_RECT*),27))
#var MakeWinRect D(_rom_call(WIN_RECT*,(short,short,short,short),2C))
#var RectWinToScr D(_rom_call(SCR_RECT*,(const SCR_RECT*,const WIN_RECT*,SCR_RECT*),2A))
#var RectWinToWin D(_rom_call(WIN_RECT*,(const SCR_RECT*,WIN_RECT*),29))
#var WinActivate D(_rom_call(void,(WINDOW*),1))
#var WinAttr D(_rom_call(short,(WINDOW*,short),2))
#var WinBackground D(_rom_call(void,(WINDOW*,short),4))
#var WinBackupToScr D(_rom_call(void,(WINDOW*),3))
#var WinBegin D(_rom_call(void,(WINDOW*),5))
#var WinBitmapGet D(_rom_call(short,(WINDOW*,const WIN_RECT*,void*),6))
#var WinBitmapPut D(_rom_call(void,(WINDOW*,short,short,void*,short),7))
#var WinBitmapSize D(_rom_call(unsigned short,(WINDOW*,const WIN_RECT*),8))
#var WinChar D(_rom_call(void,(WINDOW*,char),A))
#var WinCharXY D(_rom_call(void,(WINDOW*,short,short,char,short),9))
#var WinClose D(_rom_call(void,(WINDOW*),B))
#var WinClr D(_rom_call(void,(WINDOW*),C))
#var WinDeactivate D(_rom_call(void,(WINDOW*),D))
#var WinDupStat D(_rom_call(short,(WINDOW*,short),E))
#var WinEllipse D(_rom_call(void,(WINDOW*,short,short,short,short),F))
#var WinEnd(w) D(((void)0))
#var WinFill D(_rom_call(void,(WINDOW*,const WIN_RECT*,short),10))
#var WinFillLines2 D(_rom_call(void,(WINDOW*,const WIN_RECT*,const WIN_RECT*,short),11))
#var WinFillTriangle D(_rom_call(void,(WINDOW*,short,short,short,short,short,short,short),12))
#var WinFont D(_rom_call(void,(WINDOW*,short),13))
#var WinGetCursor D(_rom_call(void,(WINDOW*,__pshort,__pshort),14))
#var WinHeight D(_rom_call(short,(WINDOW*),292))
#var WinHide D(_rom_call(void,(WINDOW*),15))
#var WinHome D(_rom_call(void,(WINDOW*),16))
#var WinLine D(_rom_call(void,(WINDOW*,const WIN_RECT*),17))
#var WinLineNC D(_rom_call(void,(WINDOW*,const WIN_RECT*),18))
#var WinLineRel D(_rom_call(void,(WINDOW*,short,short),1A))
#var WinLineTo D(_rom_call(void,(WINDOW*,short,short),19))
#var WinMoveCursor D(_rom_call(void,(WINDOW*,short,short),1B))
#var WinMoveRel D(_rom_call(void,(WINDOW*,short,short),1D))
#var WinMoveTo D(_rom_call(void,(WINDOW*,short,short),1C))
#var WinOpen D(_rom_call(short,(WINDOW*,const WIN_RECT*,short,...),1E))
#var WinPixGet D(_rom_call(short,(WINDOW*,short,short),1F))
#var WinPixSet D(_rom_call(void,(WINDOW*,short,short),20))
#var WinRect D(_rom_call(void,(WINDOW*,const WIN_RECT*,short),21))
#var WinReOpen D(_rom_call(short,(WINDOW*,const WIN_RECT*,short,...),22))
#var WinScrollH D(_rom_call(void,(WINDOW*,const WIN_RECT*,short),23))
#var WinScrollV D(_rom_call(void,(WINDOW*,const WIN_RECT*,short),24))
#var WinSetCursor(w,x,y) D((void)((w)->CursorX=x,(w)->CursorY=y))
#var WinShow(w) D((void)((w)->Flags|=WF_VISIBLE))
#var WinStr D(_rom_call(void,(WINDOW*,const char*),25))
#var WinStrXY D(_rom_call(void,(WINDOW*,short,short,const char*),26))
#var WinWidth D(_rom_call(short,(WINDOW*),291))
