Annotation of previous/src/includes/sdlgui.h, revision 1.1.1.4

1.1       root        1: /*
                      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.
                      6: 
                      7:   Header for the tiny graphical user interface for Hatari.
                      8: */
                      9: 
                     10: #ifndef HATARI_SDLGUI_H
                     11: #define HATARI_SDLGUI_H
                     12: 
                     13: #include <SDL.h>
                     14: 
                     15: enum
                     16: {
                     17:   SGBOX,
                     18:   SGTEXT,
                     19:   SGEDITFIELD,
                     20:   SGBUTTON,
                     21:   SGRADIOBUT,
                     22:   SGCHECKBOX,
1.1.1.2   root       23:   SGPOPUP,
                     24:   SGSCROLLBAR
1.1       root       25: };
                     26: 
                     27: 
                     28: /* Object flags: */
                     29: #define SG_TOUCHEXIT   1   /* Exit immediately when mouse button is pressed down */
                     30: #define SG_EXIT        2   /* Exit when mouse button has been pressed (and released) */
                     31: #define SG_DEFAULT     4   /* Marks a default button, selectable with return key */
                     32: #define SG_CANCEL      8   /* Marks a cancel button, selectable with ESC key */
                     33: 
                     34: /* Object states: */
1.1.1.2   root       35: #define SG_SELECTED    1
                     36: #define SG_MOUSEDOWN   16
                     37: #define SG_MOUSEUP     (((int)-1) - SG_MOUSEDOWN)
                     38: 
1.1       root       39: 
                     40: /* Special characters: */
                     41: #define SGRADIOBUTTON_NORMAL    12
                     42: #define SGRADIOBUTTON_SELECTED  13
1.1.1.2   root       43: #define SGCHECKBOX_NORMAL       14
                     44: #define SGCHECKBOX_SELECTED     15
                     45: #define SGARROWUP                1
                     46: #define SGARROWDOWN              2
                     47: #define SGFOLDER                 5
1.1       root       48: /* Return codes: */
                     49: #define SDLGUI_ERROR         -1
                     50: #define SDLGUI_QUIT          -2
                     51: #define SDLGUI_UNKNOWNEVENT  -3
                     52: 
                     53: 
                     54: typedef struct
                     55: {
                     56:   int type;             /* What type of object */
                     57:   int flags;            /* Object flags */
                     58:   int state;            /* Object state */
                     59:   int x, y;             /* The offset to the upper left corner */
1.1.1.2   root       60:   int w, h;             /* Width and height (for scrollbar : height and position) */
1.1       root       61:   char *txt;            /* Text string */
                     62: }  SGOBJ;
                     63: 
1.1.1.2   root       64: int sdlgui_fontwidth;  /* Width of the actual font */
                     65: int sdlgui_fontheight; /* Height of the actual font */
1.1       root       66: 
1.1.1.4 ! root       67: int SDLGui_Init(void);
        !            68: int SDLGui_UnInit(void);
        !            69: int SDLGui_SetScreen(SDL_Surface *pScrn);
        !            70: void SDLGui_GetFontSize(int *width, int *height);
        !            71: void SDLGui_Text(int x, int y, const char *txt);
        !            72: void SDLGui_DrawDialog(const SGOBJ *dlg);
        !            73: int SDLGui_DoDialog(SGOBJ *dlg, SDL_Event *pEventOut);
        !            74: void SDLGui_CenterDlg(SGOBJ *dlg);
        !            75: char* SDLGui_FileSelect(const char *path_and_name, char **zip_path, bool bAllowNew);
        !            76: bool SDLGui_FileConfSelect(char *dlgname, char *confname, int maxlen, bool bAllowNew);
        !            77: bool SDLGui_DiskSelect(char *dlgname, char *confname, int maxlen, bool *readonly);
        !            78: bool SDLGui_DirectorySelect(char *dlgname, char *confname, int maxlen);
1.1       root       79: 
                     80: #endif

unix.superglobalmegacorp.com

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