|
|
1.1 root 1: /*
1.1.1.2 root 2: Hatari - sdlgui.h
3:
4: This file is distributed under the GNU Public License, version 2 or at
5: your option any later version. Read the file gpl.txt for details.
1.1 root 6:
7: Header for the tiny graphical user interface for Hatari.
8: */
9:
1.1.1.2 root 10: #ifndef HATARI_SDLGUI_H
11: #define HATARI_SDLGUI_H
12:
1.1 root 13: #include <SDL.h>
14:
15: enum
16: {
17: SGBOX,
18: SGTEXT,
1.1.1.3 root 19: SGEDITFIELD,
1.1 root 20: SGBUTTON,
21: SGRADIOBUT,
22: SGCHECKBOX,
23: SGPOPUP
24: };
25:
26:
27: /* Object flags: */
28: #define SG_TOUCHEXIT 1
29: #define SG_EXIT 2 /* Not yet tested */
30:
31: /* Object states: */
32: #define SG_SELECTED 1
33:
1.1.1.3 root 34: /* Special characters: */
35: #define SGRADIOBUTTON_NORMAL 12
36: #define SGRADIOBUTTON_SELECTED 13
37: #define SGCHECKBOX_NORMAL 14
38: #define SGCHECKBOX_SELECTED 15
39: #define SGARROWUP 1
40: #define SGARROWDOWN 2
41: #define SGFOLDER 5
42:
1.1.1.5 ! root 43: /* Return codes: */
! 44: #define SDLGUI_ERROR -1
! 45: #define SDLGUI_QUIT -2
! 46: #define SDLGUI_UNKNOWNEVENT -3
! 47:
1.1 root 48:
49: typedef struct
50: {
51: int type; /* What type of object */
52: int flags; /* Object flags */
1.1.1.4 root 53: int state; /* Object state */
1.1 root 54: int x, y; /* The offset to the upper left corner */
55: int w, h; /* Width and height */
56: char *txt; /* Text string */
57: } SGOBJ;
58:
59:
1.1.1.3 root 60: extern int SDLGui_Init(void);
61: extern int SDLGui_UnInit(void);
1.1.1.5 ! root 62: extern int SDLGui_SetScreen(SDL_Surface *pScrn);
! 63: extern int SDLGui_DoDialog(SGOBJ *dlg, SDL_Event *pEventOut);
1.1.1.3 root 64: extern void SDLGui_CenterDlg(SGOBJ *dlg);
65: extern int SDLGui_FileSelect(char *path_and_name, char *zip_path, BOOL bAllowNew);
1.1.1.2 root 66:
67: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.