Annotation of hatari/src/includes/sdlgui.h, revision 1.1.1.8

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: */
1.1.1.7   root       28: #define SG_TOUCHEXIT   1   /* Exit immediately when mouse button is pressed down */
                     29: #define SG_EXIT        2   /* Exit when mouse button has been pressed (and released) */
                     30: #define SG_DEFAULT     4   /* Marks a default button, selectable with return key */
                     31: #define SG_CANCEL      8   /* Marks a cancel button, selectable with ESC key */
1.1       root       32: 
                     33: /* Object states: */
                     34: #define SG_SELECTED   1
                     35: 
1.1.1.3   root       36: /* Special characters: */
                     37: #define SGRADIOBUTTON_NORMAL    12
                     38: #define SGRADIOBUTTON_SELECTED  13
                     39: #define SGCHECKBOX_NORMAL    14
                     40: #define SGCHECKBOX_SELECTED  15
                     41: #define SGARROWUP    1
                     42: #define SGARROWDOWN  2
                     43: #define SGFOLDER     5
                     44: 
1.1.1.5   root       45: /* Return codes: */
                     46: #define SDLGUI_ERROR         -1
                     47: #define SDLGUI_QUIT          -2
                     48: #define SDLGUI_UNKNOWNEVENT  -3
                     49: 
1.1       root       50: 
                     51: typedef struct
                     52: {
                     53:   int type;             /* What type of object */
                     54:   int flags;            /* Object flags */
1.1.1.4   root       55:   int state;            /* Object state */
1.1       root       56:   int x, y;             /* The offset to the upper left corner */
                     57:   int w, h;             /* Width and height */
                     58:   char *txt;            /* Text string */
                     59: }  SGOBJ;
                     60: 
                     61: 
1.1.1.3   root       62: extern int SDLGui_Init(void);
                     63: extern int SDLGui_UnInit(void);
1.1.1.5   root       64: extern int SDLGui_SetScreen(SDL_Surface *pScrn);
1.1.1.8 ! root       65: extern void SDLGui_GetFontSize(int *width, int *height);
        !            66: extern void SDLGui_Text(int x, int y, const char *txt);
1.1.1.6   root       67: extern void SDLGui_DrawDialog(const SGOBJ *dlg);
1.1.1.5   root       68: extern int SDLGui_DoDialog(SGOBJ *dlg, SDL_Event *pEventOut);
1.1.1.3   root       69: extern void SDLGui_CenterDlg(SGOBJ *dlg);
1.1.1.8 ! root       70: extern char* SDLGui_FileSelect(const char *path_and_name, char **zip_path, bool bAllowNew);
        !            71: extern bool SDLGui_FileConfSelect(char *dlgname, char *confname, int maxlen, bool bAllowNew);
1.1.1.2   root       72: 
                     73: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.