|
|
| version 1.8, 2007/01/21 00:24:24 | version 1.9, 2007/01/24 14:09:32 |
|---|---|
| Line 108 static GtkActionEntry menu_entries[] = { | Line 108 static GtkActionEntry menu_entries[] = { |
| { "SASI1Menu", NULL, "SASI-_1", NULL, NULL, NULL }, | { "SASI1Menu", NULL, "SASI-_1", NULL, NULL, NULL }, |
| { "SASI2Menu", NULL, "SASI-_2", NULL, NULL, NULL }, | { "SASI2Menu", NULL, "SASI-_2", NULL, NULL, NULL }, |
| #endif | #endif |
| { "ScrnSizeMenu", NULL, "Size", NULL, NULL, NULL }, | |
| { "SoundMenu", NULL, "_Sound", NULL, NULL, NULL }, | { "SoundMenu", NULL, "_Sound", NULL, NULL, NULL }, |
| /* MenuItem */ | /* MenuItem */ |
| Line 263 static GtkRadioActionEntry rotate_entrie | Line 264 static GtkRadioActionEntry rotate_entrie |
| }; | }; |
| static const guint n_rotate_entries = G_N_ELEMENTS(rotate_entries); | static const guint n_rotate_entries = G_N_ELEMENTS(rotate_entries); |
| static GtkRadioActionEntry screensize_entries[] = { | |
| { "320x200", NULL, "320x200", NULL, NULL, 4 }, | |
| { "480x300", NULL, "480x300", NULL, NULL, 6 }, | |
| { "640x400", NULL, "640x400", NULL, NULL, 8 }, | |
| { "800x500", NULL, "800x500", NULL, NULL, 10 }, | |
| { "960x600", NULL, "960x600", NULL, NULL, 12 }, | |
| { "1280x800", NULL, "1280x800", NULL, NULL, 16 }, | |
| }; | |
| static const guint n_screensize_entries = G_N_ELEMENTS(screensize_entries); | |
| static void cb_beepvol(gint idx); | static void cb_beepvol(gint idx); |
| static void cb_f12key(gint idx); | static void cb_f12key(gint idx); |
| static void cb_framerate(gint idx); | static void cb_framerate(gint idx); |
| Line 270 static void cb_joykey(gint idx); | Line 281 static void cb_joykey(gint idx); |
| static void cb_memory(gint idx); | static void cb_memory(gint idx); |
| static void cb_rotate(gint idx); | static void cb_rotate(gint idx); |
| static void cb_screenmode(gint idx); | static void cb_screenmode(gint idx); |
| static void cb_screensize(gint idx); | |
| static void cb_soundboard(gint idx); | static void cb_soundboard(gint idx); |
| static const struct { | static const struct { |
| Line 284 static const struct { | Line 296 static const struct { |
| { memory_entries, G_N_ELEMENTS(memory_entries), cb_memory }, | { memory_entries, G_N_ELEMENTS(memory_entries), cb_memory }, |
| { rotate_entries, G_N_ELEMENTS(rotate_entries), cb_rotate }, | { rotate_entries, G_N_ELEMENTS(rotate_entries), cb_rotate }, |
| { screenmode_entries, G_N_ELEMENTS(screenmode_entries), cb_screenmode }, | { screenmode_entries, G_N_ELEMENTS(screenmode_entries), cb_screenmode }, |
| { screensize_entries, G_N_ELEMENTS(screensize_entries), cb_screensize }, | |
| { soundboard_entries, G_N_ELEMENTS(soundboard_entries), cb_soundboard }, | { soundboard_entries, G_N_ELEMENTS(soundboard_entries), cb_soundboard }, |
| }; | }; |
| static const guint n_radiomenu_entries = G_N_ELEMENTS(radiomenu_entries); | static const guint n_radiomenu_entries = G_N_ELEMENTS(radiomenu_entries); |
| Line 298 static const gchar *ui_info = | Line 311 static const gchar *ui_info = |
| " <menuitem action='configure'/>\n" | " <menuitem action='configure'/>\n" |
| " <menuitem action='newdisk'/>\n" | " <menuitem action='newdisk'/>\n" |
| " <menuitem action='font'/>\n" | " <menuitem action='font'/>\n" |
| " <menuitem action='configure'/>\n" | |
| " <separator/>\n" | " <separator/>\n" |
| " <menuitem action='exit'/>\n" | " <menuitem action='exit'/>\n" |
| " </menu>\n" | " </menu>\n" |
| Line 340 static const gchar *ui_info = | Line 352 static const gchar *ui_info = |
| " <menuitem action='dispvsync'/>\n" | " <menuitem action='dispvsync'/>\n" |
| " <menuitem action='realpalettes'/>\n" | " <menuitem action='realpalettes'/>\n" |
| " <menuitem action='nowait'/>\n" | " <menuitem action='nowait'/>\n" |
| " <menuitem name='framerate' action='autoframe'/>\n" | " <menuitem action='autoframe'/>\n" |
| " <menuitem action='fullframe'/>\n" | " <menuitem action='fullframe'/>\n" |
| " <menuitem action='1/2 frame'/>\n" | " <menuitem action='1/2 frame'/>\n" |
| " <menuitem action='1/3 frame'/>\n" | " <menuitem action='1/3 frame'/>\n" |
| " <menuitem action='1/4 frame'/>\n" | " <menuitem action='1/4 frame'/>\n" |
| " <separator/>\n" | " <separator/>\n" |
| " <menu name='Size' action='ScrnSizeMenu'>\n" | |
| " <menuitem action='320x200'/>\n" | |
| " <menuitem action='480x300'/>\n" | |
| " <menuitem action='640x400'/>\n" | |
| " <menuitem action='800x500'/>\n" | |
| " <menuitem action='960x600'/>\n" | |
| " <menuitem action='1280x800'/>\n" | |
| " </menu>\n" | |
| " <separator/>\n" | |
| " <menuitem action='screenopt'/>\n" | " <menuitem action='screenopt'/>\n" |
| " </menu>\n" | " </menu>\n" |
| " <menu name='Device' action='DeviceMenu'>\n" | " <menu name='Device' action='DeviceMenu'>\n" |
| Line 486 xmenu_select_item_by_index(MENU_HDL hdl, | Line 507 xmenu_select_item_by_index(MENU_HDL hdl, |
| xmenu_select_item_by_index(NULL, rotate_entries, n_rotate_entries, v); | xmenu_select_item_by_index(NULL, rotate_entries, n_rotate_entries, v); |
| #define xmenu_select_screenmode(v) \ | #define xmenu_select_screenmode(v) \ |
| xmenu_select_item_by_index(NULL, screenmode_entries, n_screenmode_entries, v); | xmenu_select_item_by_index(NULL, screenmode_entries, n_screenmode_entries, v); |
| #define xmenu_select_screensize(v) \ | |
| xmenu_select_item_by_index(NULL, screensize_entries, n_screensize_entries, v); | |
| #define xmenu_select_soundboard(v) \ | #define xmenu_select_soundboard(v) \ |
| xmenu_select_item_by_index(NULL, soundboard_entries, n_soundboard_entries, v); | xmenu_select_item_by_index(NULL, soundboard_entries, n_soundboard_entries, v); |
| Line 1646 cb_screenmode(gint idx) | Line 1669 cb_screenmode(gint idx) |
| } | } |
| static void | static void |
| cb_screensize(gint idx) | |
| { | |
| guint value; | |
| if (idx >= 0) { | |
| value = screensize_entries[idx].value; | |
| } else { | |
| value = 0; | |
| } | |
| scrnmng_setmultiple(value); | |
| } | |
| static void | |
| cb_soundboard(gint idx) | cb_soundboard(gint idx) |
| { | { |
| guint value; | guint value; |
| Line 1691 cb_radio(GtkRadioAction *action, GtkRadi | Line 1727 cb_radio(GtkRadioAction *action, GtkRadi |
| static GtkWidget *menubar; | static GtkWidget *menubar; |
| static guint menubar_timerid; | static guint menubar_timerid; |
| #define EVENT_MASK (GDK_LEAVE_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK) | #define EVENT_MASK (GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK) |
| static gboolean | static gboolean |
| menubar_timeout(gpointer p) | menubar_timeout(gpointer p) |
| Line 1844 create_menu(void) | Line 1880 create_menu(void) |
| xmenu_select_memory(np2cfg.EXTMEM); | xmenu_select_memory(np2cfg.EXTMEM); |
| xmenu_select_rotate(scrnmode & SCRNMODE_ROTATEMASK); | xmenu_select_rotate(scrnmode & SCRNMODE_ROTATEMASK); |
| xmenu_select_screenmode(scrnmode & SCRNMODE_FULLSCREEN); | xmenu_select_screenmode(scrnmode & SCRNMODE_FULLSCREEN); |
| xmenu_select_screensize(SCREEN_DEFMUL); | |
| xmenu_select_soundboard(np2cfg.SOUND_SW); | xmenu_select_soundboard(np2cfg.SOUND_SW); |
| if (np2cfg.fddequip) { | if (np2cfg.fddequip) { |