--- hatari/src/includes/sdlgui.h 2019/04/01 07:14:43 1.1.1.8 +++ hatari/src/includes/sdlgui.h 2019/04/09 08:50:23 1.1.1.10 @@ -20,7 +20,8 @@ enum SGBUTTON, SGRADIOBUT, SGCHECKBOX, - SGPOPUP + SGPOPUP, + SGSCROLLBAR }; @@ -31,16 +32,18 @@ enum #define SG_CANCEL 8 /* Marks a cancel button, selectable with ESC key */ /* Object states: */ -#define SG_SELECTED 1 +#define SG_SELECTED 1 +#define SG_MOUSEDOWN 16 +#define SG_MOUSEUP (((int)-1) - SG_MOUSEDOWN) /* 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 +#define SGCHECKBOX_NORMAL 14 +#define SGCHECKBOX_SELECTED 15 +#define SGARROWUP 1 +#define SGARROWDOWN 2 +#define SGFOLDER 5 /* Return codes: */ #define SDLGUI_ERROR -1 @@ -54,10 +57,12 @@ typedef struct int flags; /* Object flags */ int state; /* Object state */ int x, y; /* The offset to the upper left corner */ - int w, h; /* Width and height */ + int w, h; /* Width and height (for scrollbar : height and position) */ char *txt; /* Text string */ } SGOBJ; +extern int sdlgui_fontwidth; /* Width of the actual font */ +extern int sdlgui_fontheight; /* Height of the actual font */ extern int SDLGui_Init(void); extern int SDLGui_UnInit(void);