redquark-amiberry-rb/src/osdep/gui/gui_handling.h

142 lines
4.1 KiB
C
Raw Normal View History

2015-05-13 18:47:23 +00:00
#ifndef _GUI_HANDLING_H
#define _GUI_HANDLING_H
2017-02-22 11:31:52 +01:00
#define GUI_WIDTH 800
2015-05-13 18:47:23 +00:00
#define GUI_HEIGHT 480
#define MIN_GUI_WIDTH 320
#define MIN_GUI_HEIGHT 240
2015-05-13 18:47:23 +00:00
#define DISTANCE_BORDER 15
#define DISTANCE_NEXT_X 15
#define DISTANCE_NEXT_Y 15
#define BUTTON_WIDTH 90
#define BUTTON_HEIGHT 30
#define SMALL_BUTTON_WIDTH 30
#define SMALL_BUTTON_HEIGHT 22
#define LABEL_HEIGHT 15
#define TEXTFIELD_HEIGHT 16
#define DROPDOWN_HEIGHT 15
2015-05-13 18:47:23 +00:00
#define SLIDER_HEIGHT 18
#define TITLEBAR_HEIGHT 24
2017-02-24 01:34:54 +01:00
#include "guisan/sdl/sdlinput.hpp"
2015-05-13 18:47:23 +00:00
typedef struct _ConfigCategory
{
const char* category;
const char* imagepath;
gcn::SelectorEntry* selector;
gcn::Container* panel;
void (*InitFunc)(const struct _ConfigCategory& category);
void (*ExitFunc)(void);
void (*RefreshFunc)(void);
2015-05-13 18:47:23 +00:00
} ConfigCategory;
extern bool gui_running;
extern ConfigCategory categories[];
extern gcn::Gui* uae_gui;
extern gcn::Container* gui_top;
extern gcn::Color gui_baseCol;
extern gcn::Color colTextboxBackground;
2015-05-13 18:47:23 +00:00
extern gcn::SDLInput* gui_input;
extern SDL_Surface* gui_screen;
extern char currentDir[MAX_DPATH];
extern char last_loaded_config[MAX_DPATH];
2017-04-18 00:38:11 +02:00
#define BUILTINID_NONE 0
#define BUILTINID_A500 1
#define BUILTINID_A1200 2
#define BUILTINID_CD32 3
typedef struct
{
char Name[MAX_DPATH];
char FullPath[MAX_DPATH];
char Description[MAX_DPATH];
2017-04-18 00:38:11 +02:00
int BuiltInID;
2015-05-13 18:47:23 +00:00
} ConfigFileInfo;
extern vector<ConfigFileInfo*> ConfigFilesList;
2015-05-13 18:47:23 +00:00
void InitPanelPaths(const struct _ConfigCategory& category);
void ExitPanelPaths(void);
void RefreshPanelPaths(void);
void InitPanelConfig(const struct _ConfigCategory& category);
void ExitPanelConfig(void);
void RefreshPanelConfig(void);
void InitPanelCPU(const struct _ConfigCategory& category);
void ExitPanelCPU(void);
void RefreshPanelCPU(void);
void InitPanelChipset(const struct _ConfigCategory& category);
void ExitPanelChipset(void);
void RefreshPanelChipset(void);
void InitPanelROM(const struct _ConfigCategory& category);
void ExitPanelROM(void);
void RefreshPanelROM(void);
void InitPanelRAM(const struct _ConfigCategory& category);
void ExitPanelRAM(void);
void RefreshPanelRAM(void);
void InitPanelFloppy(const struct _ConfigCategory& category);
void ExitPanelFloppy(void);
void RefreshPanelFloppy(void);
void InitPanelHD(const struct _ConfigCategory& category);
void ExitPanelHD(void);
void RefreshPanelHD(void);
void InitPanelDisplay(const struct _ConfigCategory& category);
void ExitPanelDisplay(void);
void RefreshPanelDisplay(void);
void InitPanelSound(const struct _ConfigCategory& category);
void ExitPanelSound(void);
void RefreshPanelSound(void);
void InitPanelInput(const struct _ConfigCategory& category);
void ExitPanelInput(void);
void RefreshPanelInput(void);
void InitPanelMisc(const struct _ConfigCategory& category);
void ExitPanelMisc(void);
void RefreshPanelMisc(void);
void InitPanelSavestate(const struct _ConfigCategory& category);
void ExitPanelSavestate(void);
void RefreshPanelSavestate(void);
void RefreshAllPanels(void);
void RegisterRefreshFunc(void (*func)(void));
2015-05-13 18:47:23 +00:00
2015-10-11 14:23:51 +02:00
void DisableResume(void);
bool ShowMessage(const char* title, const char* line1, const char* line2, const char* button1, const char* button2);
const char* ShowMessageForInput(const char* title, const char* line1, const char* button1);
bool SelectFolder(const char* title, char* value);
bool SelectFile(const char* title, char* value, const char* filter[], bool create = false);
2015-05-13 18:47:23 +00:00
bool EditFilesysVirtual(int unit_no);
bool EditFilesysHardfile(int unit_no);
2015-10-11 14:23:51 +02:00
bool CreateFilesysHardfile(void);
2015-05-13 18:47:23 +00:00
bool LoadConfigByName(const char* name);
ConfigFileInfo* SearchConfigInList(const char* name);
extern void ReadDirectory(const char* path, vector<string>* dirs, vector<string>* files);
extern void FilterFiles(vector<string>* files, const char* filter[]);
2015-05-13 18:47:23 +00:00
enum
{
DIRECTION_NONE,
DIRECTION_UP,
DIRECTION_DOWN,
DIRECTION_LEFT,
DIRECTION_RIGHT
};
2015-05-13 18:47:23 +00:00
bool HandleNavigation(int direction);
2015-10-11 14:23:51 +02:00
#define MAX_HD_DEVICES 5
extern void CreateDefaultDevicename(char* name);
extern bool DevicenameExists(const char* name);
extern int tweakbootpri(int bp, int ab, int dnm);
extern char* screenshot_filename;
2015-05-13 18:47:23 +00:00
extern int currentStateNum;
extern int delay_savestate_frame;
extern void UpdateGuiScreen();
2017-02-22 14:30:04 +01:00
2015-05-13 18:47:23 +00:00
#endif // _GUI_HANDLING_H