--- hatari/src/includes/sdlgui.h 2019/04/01 07:10:53 1.1.1.2 +++ hatari/src/includes/sdlgui.h 2019/04/01 07:12:37 1.1.1.6 @@ -16,6 +16,7 @@ enum { SGBOX, SGTEXT, + SGEDITFIELD, SGBUTTON, SGRADIOBUT, SGCHECKBOX, @@ -30,23 +31,38 @@ enum /* Object states: */ #define SG_SELECTED 1 +/* Special characters: */ +#define SGRADIOBUTTON_NORMAL 12 +#define SGRADIOBUTTON_SELECTED 13 +#define SGCHECKBOX_NORMAL 14 +#define SGCHECKBOX_SELECTED 15 +#define SGARROWUP 1 +#define SGARROWDOWN 2 +#define SGFOLDER 5 + +/* Return codes: */ +#define SDLGUI_ERROR -1 +#define SDLGUI_QUIT -2 +#define SDLGUI_UNKNOWNEVENT -3 + typedef struct { int type; /* What type of object */ int flags; /* Object flags */ - int state; /* Object state */ + int state; /* Object state */ int x, y; /* The offset to the upper left corner */ int w, h; /* Width and height */ char *txt; /* Text string */ } SGOBJ; -int SDLGui_Init(void); -int SDLGui_UnInit(void); -int SDLGui_DoDialog(SGOBJ *dlg); -int SDLGui_PrepareFont(void); -void SDLGui_CenterDlg(SGOBJ *dlg); -int SDLGui_FileSelect(char *path_and_name, char *zip_path); +extern int SDLGui_Init(void); +extern int SDLGui_UnInit(void); +extern int SDLGui_SetScreen(SDL_Surface *pScrn); +extern void SDLGui_DrawDialog(const SGOBJ *dlg); +extern int SDLGui_DoDialog(SGOBJ *dlg, SDL_Event *pEventOut); +extern void SDLGui_CenterDlg(SGOBJ *dlg); +extern int SDLGui_FileSelect(char *path_and_name, char *zip_path, BOOL bAllowNew); #endif