[go: up one dir, main page]

Menu

[r2]: / DolwinSRC / GUICommon.h  Maximize  Restore  History

Download this file

85 lines (69 with data), 2.6 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#pragma once
/*
* Messages.
*/
void GUIReport(char *message, ...); // Popup error/report messages
void GUIHalt(char *message, ...);
/*
#define ASSERTMSG(expr, msg) \
(void) (!(expr) && \
( \
GUIHalt( \
APPNAME " Assertion Failed!", \
"expr\t: %s\n" \
"file\t: %s\n" \
"line\t: %i\n" \
"note\t: %s\n\n", \
#expr , \
FileShortName(__FILE__), \
__LINE__, \
msg) \
, 0))
*/
void GUILoadIcon(char *filename);
/*
* Status bar.
*/
typedef struct GUIStatusMetrics
{
int cpu, gfx, sfx, dvd;
} GUIStatusMetrics;
void GUIEnableStatusBar(bool enable);
void GUISetStatusText(char *text, bool post=false);
char* GUIGetStatusText(void);
void GUISetStatusMetrics(GUIStatusMetrics *stat);
void GUIGetStatusMetrics(GUIStatusMetrics *stat);
void GUIEnableStatusBarMetrics(bool enable);
bool GUIStatusRedraw(/*DRAWITEMSTRUCT*/void *dis); // WM_DRAWITEM callback (for id == ID_STATUS_BAR)
/*
* Tool-bar.
*/
void GUIEnableToolBar(bool enable);
/*
* File Open Dialog.
*/
enum FILE_TYPE
{
FILE_TYPE_ALL = 1,
FILE_TYPE_DVD,
FILE_TYPE_MAP,
FILE_TYPE_PATCH,
FILE_TYPE_BIN,
FILE_TYPE_DIR,
FILE_TYPE_THP
};
// Return false, if file/dir is not selected, otherwise return true and full path in "path".
bool GUIOpenFileDialog(
HWND parent,
int file_type, // see FILE_TYPE*
char* path,
int path_size,
char* initial_dir = "./" );
/*
* Client area (where video/gamelist can draw)
*/
int GUIGetToolbarHeight(void);
int GUIGetStatusHeight(void);
void GUIGetClientArea(int *w, int *h);
void GUISetClientArea(int w, int h);
void GUICenterChildWindow(HWND hParent, HWND hChild);