-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu.h
181 lines (141 loc) · 5.96 KB
/
menu.h
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
/* menu.h: general menu callbacks
Copyright (c) 2004-2015 Philip Kendall
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Author contact information:
Philip Kendall <philip-fuse@shadowmagic.org.uk>
*/
#ifndef FUSE_MENU_H
#define FUSE_MENU_H
#include <libspectrum.h>
#include <config.h>
#include "ui/scaler/scaler.h"
#ifdef UI_GTK
#include "compat.h"
#include <gtk/gtk.h>
#define MENU_CALLBACK(name) void name(GtkAction *gtk_action GCC_UNUSED, gpointer data GCC_UNUSED)
#define MENU_CALLBACK_WITH_ACTION(name) void name(GtkAction *gtk_action GCC_UNUSED, guint action)
#else // #ifdef UI_GTK
#define MENU_CALLBACK(name) void name(int action)
#define MENU_CALLBACK_WITH_ACTION(name) void name(int action)
#endif // #ifdef UI_GTK
#define MENU_DETAIL(name) const char* name(void)
/*
* Things defined in menu.c
*/
MENU_CALLBACK(menu_file_open);
MENU_CALLBACK(menu_file_recording_continuerecording);
MENU_CALLBACK(menu_file_recording_insertsnapshot);
MENU_CALLBACK(menu_file_recording_rollback);
MENU_CALLBACK(menu_file_recording_rollbackto);
MENU_CALLBACK(menu_file_recording_play);
MENU_CALLBACK(menu_file_recording_stop);
MENU_CALLBACK(menu_file_recording_finalise);
MENU_CALLBACK(menu_file_aylogging_stop);
MENU_CALLBACK(menu_file_screenshot_openscrscreenshot);
MENU_CALLBACK(menu_file_screenshot_openmltscreenshot);
MENU_CALLBACK(menu_file_scalablevectorgraphics_startcaptureinlinemode);
MENU_CALLBACK(menu_file_scalablevectorgraphics_startcaptureindotmode);
MENU_CALLBACK(menu_file_scalablevectorgraphics_stopcapture);
MENU_CALLBACK(menu_file_movie_stop);
MENU_CALLBACK(menu_file_movie_pause);
MENU_CALLBACK_WITH_ACTION(menu_options_selectroms_machine_select);
MENU_CALLBACK_WITH_ACTION(menu_options_selectroms_peripheral_select);
MENU_CALLBACK(menu_options_filter);
MENU_DETAIL(menu_filter_detail);
MENU_CALLBACK(menu_options_fullscreen);
MENU_CALLBACK(menu_options_save);
MENU_CALLBACK(menu_machine_profiler_start);
MENU_CALLBACK(menu_machine_profiler_stop);
MENU_CALLBACK(menu_machine_nmi);
MENU_CALLBACK(menu_machine_multifaceredbutton);
MENU_CALLBACK(menu_machine_didaktiksnap);
MENU_CALLBACK(menu_media_tape_browse);
MENU_CALLBACK(menu_media_tape_open);
MENU_CALLBACK(menu_media_tape_play);
MENU_CALLBACK(menu_media_tape_rewind);
MENU_CALLBACK(menu_media_tape_clear);
MENU_CALLBACK(menu_media_tape_write);
MENU_CALLBACK(menu_media_tape_recordstart);
MENU_CALLBACK(menu_media_tape_recordstop);
MENU_DETAIL(menu_tape_detail);
MENU_CALLBACK_WITH_ACTION(menu_media_insert_new);
MENU_CALLBACK_WITH_ACTION(menu_media_insert);
MENU_CALLBACK_WITH_ACTION(menu_media_eject);
MENU_CALLBACK_WITH_ACTION(menu_media_save);
MENU_CALLBACK_WITH_ACTION(menu_media_flip);
MENU_CALLBACK_WITH_ACTION(menu_media_writeprotect);
MENU_CALLBACK_WITH_ACTION(menu_media_if1_rs232);
MENU_CALLBACK(menu_media_cartridge_timexdock_insert);
MENU_CALLBACK(menu_media_cartridge_timexdock_eject);
MENU_CALLBACK(menu_media_cartridge_interface2_insert);
MENU_CALLBACK(menu_media_cartridge_interface2_eject);
MENU_CALLBACK_WITH_ACTION(menu_media_ide_insert);
MENU_CALLBACK_WITH_ACTION(menu_media_ide_commit);
MENU_CALLBACK_WITH_ACTION(menu_media_ide_eject);
/*
* Things to be defined elsewhere
*/
// Direct menu callbacks
MENU_CALLBACK(menu_file_savesnapshot);
MENU_CALLBACK(menu_file_recording_record);
MENU_CALLBACK(menu_file_recording_recordfromsnapshot);
MENU_CALLBACK(menu_file_loadbinarydata);
MENU_CALLBACK(menu_file_savebinarydata);
MENU_CALLBACK(menu_file_exit);
MENU_CALLBACK(menu_file_aylogging_record);
MENU_CALLBACK(menu_file_screenshot_savescreenasscr);
MENU_CALLBACK(menu_file_screenshot_savescreenaspng);
MENU_CALLBACK(menu_file_screenshot_savescreenasmlt);
MENU_CALLBACK(menu_file_movie_record);
MENU_CALLBACK(menu_file_movie_record_recordfromrzx);
MENU_CALLBACK(menu_options_general);
MENU_CALLBACK(menu_options_media);
MENU_CALLBACK(menu_options_sound);
MENU_CALLBACK(menu_options_peripherals_general);
MENU_CALLBACK(menu_options_peripherals_disk);
MENU_CALLBACK(menu_options_rzx);
MENU_CALLBACK(menu_options_movie);
MENU_CALLBACK(menu_options_diskoptions);
MENU_DETAIL(menu_plus3a_detail);
MENU_DETAIL(menu_plus3b_detail);
MENU_DETAIL(menu_beta128a_detail);
MENU_DETAIL(menu_beta128b_detail);
MENU_DETAIL(menu_beta128c_detail);
MENU_DETAIL(menu_beta128d_detail);
MENU_DETAIL(menu_opus1_detail);
MENU_DETAIL(menu_opus2_detail);
MENU_DETAIL(menu_plusd1_detail);
MENU_DETAIL(menu_plusd2_detail);
MENU_DETAIL(menu_didaktik_a_detail);
MENU_DETAIL(menu_didaktik_b_detail);
MENU_DETAIL(menu_disciple1_detail);
MENU_DETAIL(menu_disciple2_detail);
MENU_CALLBACK_WITH_ACTION(menu_options_joysticks_select);
MENU_DETAIL(menu_keyboard_joystick_detail);
MENU_DETAIL(menu_joystick_1_detail);
MENU_DETAIL(menu_joystick_2_detail);
MENU_CALLBACK(menu_machine_pause);
MENU_CALLBACK_WITH_ACTION(menu_machine_reset);
MENU_CALLBACK(menu_machine_select);
MENU_DETAIL(menu_machine_detail);
MENU_CALLBACK(menu_machine_debugger);
MENU_CALLBACK(menu_machine_pokefinder);
MENU_CALLBACK(menu_machine_pokememory);
MENU_CALLBACK(menu_machine_memorybrowser);
MENU_CALLBACK(menu_help_keyboard);
MENU_CALLBACK(menu_help_about);
// Called from elsewhere (generally from one of the routines defined in menu.c)
int menu_select_roms_with_title(const char *title, size_t start, size_t count, int is_peripheral);
scaler_type menu_get_scaler(scaler_available_fn selector);
int menu_check_media_changed(void);
#endif // #ifndef FUSE_MENU_H