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

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,
        !            23:   SGPOPUP
        !            24: };
        !            25: 
        !            26: 
        !            27: /* Object flags: */
        !            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 */
        !            32: 
        !            33: /* Object states: */
        !            34: #define SG_SELECTED   1
        !            35: 
        !            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: 
        !            45: /* Return codes: */
        !            46: #define SDLGUI_ERROR         -1
        !            47: #define SDLGUI_QUIT          -2
        !            48: #define SDLGUI_UNKNOWNEVENT  -3
        !            49: 
        !            50: 
        !            51: typedef struct
        !            52: {
        !            53:   int type;             /* What type of object */
        !            54:   int flags;            /* Object flags */
        !            55:   int state;            /* Object state */
        !            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: 
        !            62: extern int SDLGui_Init(void);
        !            63: extern int SDLGui_UnInit(void);
        !            64: extern int SDLGui_SetScreen(SDL_Surface *pScrn);
        !            65: extern void SDLGui_GetFontSize(int *width, int *height);
        !            66: extern void SDLGui_Text(int x, int y, const char *txt);
        !            67: extern void SDLGui_DrawDialog(const SGOBJ *dlg);
        !            68: extern int SDLGui_DoDialog(SGOBJ *dlg, SDL_Event *pEventOut);
        !            69: extern void SDLGui_CenterDlg(SGOBJ *dlg);
        !            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);
        !            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.