/* $Id: sxsame.h,v 1.1 1996/05/04 19:08:18 yoneyama Exp yoneyama $ */ /************************************************************************ * SameGame for X Window (sxsame) * * Copyleft (c) 1994-1996 Software Research Academy * ************************************************************************/ #include #define MAX_WIDTH 30 #define MAX_HEIGHT 20 #define MIN_WIDTH 10 #define MIN_HEIGHT 8 #define BUILTIN_NDATA 3 struct item_struct { char *name; int lock; int (*func)(); }; typedef struct { int box; char *box_color; int selected; int pushed; int width, height; char **xpm_data[3][5]; char **bg_data; char **frame_data; } SameData; typedef struct { int box; char *box_color; int selected; int pushed; int width, height; char *xpm_data[3][5]; char *bg_data; char *frame_data; } ImportSameData; typedef struct { int bit_width, bit_height; int bit_box; int bit_pat[3]; Pixmap bits_xpm[3][5]; Pixmap bg_xpm; Pixmap frame_xpm; } SameGame; typedef struct { char *title; char *fname; int lock; } DataFile; void main( #if NeedFunctionPrototypes int, char ** #endif ); int sxs( #if NeedFunctionPrototypes void #endif ); int CreateData( #if NeedFunctionPrototypes SameData * #endif ); int CreateDataFromFile( #if NeedFunctionPrototypes char * #endif ); void FreeData( #if NeedFunctionPrototypes void #endif ); int DrawButton( #if NeedFunctionPrototypes int #endif ); int EnterButton( #if NeedFunctionPrototypes int #endif ); int DrawScore( #if NeedFunctionPrototypes void #endif ); int DrawLastScore( #if NeedFunctionPrototypes void #endif ); int DrawLastScoreButton( #if NeedFunctionPrototypes void #endif ); int DrawAllBits( #if NeedFunctionPrototypes int, int, int #endif ); int DrawBit( #if NeedFunctionPrototypes int, int, int #endif ); int DrawSameBits( #if NeedFunctionPrototypes int, int, int #endif ); int DrawRect( #if NeedFunctionPrototypes int, int #endif ); int EraseSameRect( #if NeedFunctionPrototypes int, int #endif ); int ScanSame( #if NeedFunctionPrototypes int, int #endif ); int CheckSame( #if NeedFunctionPrototypes int, int, int, int #endif ); int DrawSameRect( #if NeedFunctionPrototypes int, int, int, int #endif ); int DrawNextSameRect( #if NeedFunctionPrototypes int, int, int, int #endif ); int DeleteSame( #if NeedFunctionPrototypes int, int #endif ); int DeleteBit( #if NeedFunctionPrototypes int, int #endif ); int PushBits( #if NeedFunctionPrototypes int, int, int #endif ); unsigned long GetColor( #if NeedFunctionPrototypes char * #endif ); int SelectMenu( #if NeedFunctionPrototypes struct item_struct *, int, int #endif ); int DrawMenuItem( #if NeedFunctionPrototypes Window, int, int, int, int, struct item_struct * #endif ); void DrawSimpleMenuItem( #if NeedFunctionPrototypes Window, int, int, int, DataFile ** #endif ); #ifdef DEBUG int DisplayWindowName( Window ); #endif