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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
// For licensing and usage information, read docs/winui_license.txt
//****************************************************************************
#ifndef WINUI_H
#define WINUI_H
#include <commctrl.h>
#include <commdlg.h>
#include "emu.h"
#include "pool.h"
#include "screenshot.h"
#include "drivenum.h"
#include "romload.h"
#define MAMENAME "HBMAME"
#define UI_INI_FILENAME MAMENAME "UI.ini"
#ifdef PTR64
#define MAMEUINAME MAMENAME "UI64"
#else
#define MAMEUINAME MAMENAME "UI32"
#endif
#define SEARCH_PROMPT "<search here>"
enum
{
UNKNOWN = -1,
TAB_PICKER = 0,
TAB_DISPLAY,
TAB_MISC,
NUM_TABS
};
enum
{
FILETYPE_INPUT_FILES = 1,
FILETYPE_SAVESTATE_FILES,
FILETYPE_WAVE_FILES,
FILETYPE_AVI_FILES,
FILETYPE_MNG_FILES,
FILETYPE_EFFECT_FILES,
FILETYPE_JOYMAP_FILES,
FILETYPE_DEBUGSCRIPT_FILES,
FILETYPE_LUASCRIPT_FILES
};
typedef struct
{
INT resource;
const char *icon_name;
} ICONDATA;
extern TCHAR last_directory[MAX_PATH];
typedef BOOL (WINAPI *common_file_dialog_proc)(LPOPENFILENAME lpofn);
typedef std::string string;
BOOL CommonFileDialog(common_file_dialog_proc cfd,char *filename, int filetype);
HWND GetMainWindow(void);
HWND GetTreeView(void);
void SetNumOptionFolders(int count);
void GetRealColumnOrder(int order[]);
HICON LoadIconFromFile(const char *iconname);
void UpdateScreenShot(void);
void ResizePickerControls(HWND hWnd);
void MamePlayGame(void);
int FindIconIndex(int nIconResource);
int FindIconIndexByName(const char *icon_name);
int GetSelectedPick(void);
object_pool *GetMameUIMemoryPool(void);
void UpdateListView(void);
// Move The in "The Title (notes)" to "Title, The (notes)"
char * ModifyThe(const char *str);
// Convert Ampersand so it can display in a static control
char * ConvertAmpersandString(const char *s);
// globalized for painting tree control
HBITMAP GetBackgroundBitmap(void);
HPALETTE GetBackgroundPalette(void);
MYBITMAPINFO* GetBackgroundInfo(void);
BOOL GetUseOldControl(void);
BOOL GetUseXPControl(void);
int GetMinimumScreenShotWindowWidth(void);
// we maintain an array of drivers sorted by name, useful all around
int GetParentIndex(const game_driver *driver);
int GetParentRomSetIndex(const game_driver *driver);
int GetGameNameIndex(const char *name);
// sets text in part of the status bar on the main window
void SetStatusBarText(int part_index, const char *message);
void SetStatusBarTextF(int part_index, const char *fmt, ...) ATTR_PRINTF(2,3);
int MameUIMain(HINSTANCE hInstance, LPWSTR lpCmdLine, int nCmdShow);
BOOL MouseHasBeenMoved(void);
const char * GetSearchText(void);
#endif
|