GtkWidget *create_input_options_page(void) { GtkWidget *vbox; GtkWidget *hbox; vbox = gtk_vbox_new(FALSE, PAD_LINE); hbox = create_toggle("Sticky Keys", STICKYKEYS); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); hbox = create_toggle("Swap Inputs", SWAPINPUT); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); hbox = create_toggled_file("Enable Joystick 1 Device:", JOY1, 10, "Choose Joystick 1"); gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(widgets[JOY1]), "/dev/js0"); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); hbox = create_toggled_file("Enable Joystick 2 Device:", JOY2, 10, "Choose Joystick 2"); gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(widgets[JOY2]), "/dev/js1"); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); hbox = create_toggled_entry("Remap Joystick:", JOYREMAP, 25); gtk_entry_set_text(GTK_ENTRY(widgets[JOYREMAP]), "1:B0,B1,B2,B3,A0,A1,B4"); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); return vbox; }
static void selectevents_dialog(GtkWidget *w, gpointer data) { int result; GtkWidget *dialog, *frame, *vbox, *table; dialog = gtk_dialog_new_with_buttons("SelectEvents", GTK_WINDOW(main_window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL); /* initialize the function that fills the table */ create_toggle(NULL, NULL, NULL); frame = gtk_frame_new("Enable / Disable Events"); vbox = gtk_dialog_get_content_area(GTK_DIALOG(dialog)); gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 5); table = gtk_table_new(1, 4, TRUE); gtk_container_add(GTK_CONTAINER(frame), table); evn_foreach(&create_toggle, table); gtk_widget_show_all(dialog); result = gtk_dialog_run(GTK_DIALOG(dialog)); if (result == GTK_RESPONSE_ACCEPT) { repaint_dive(); } gtk_widget_destroy(dialog); }
/* --------------------------------------------------------------------- */ void config_load_page(struct page *page) { page->title = "System Configuration (Ctrl-F1)"; page->draw_const = config_draw_const; page->set_page = config_set_page; page->total_widgets = 15; page->widgets = widgets_config; page->help_index = HELP_GLOBAL; create_thumbbar(widgets_config+0, 18, 15, 17, 0,1,1, change_mixer_limits, 4, 256); create_numentry(widgets_config+1, 18, 16, 7, 0,2,2, change_mixer_limits, 4000, 192000, &sample_rate_cursor); create_menutoggle(widgets_config+2, 18, 17, 1,3,2,2,3, change_mixer_limits, bit_rates); create_menutoggle(widgets_config+3, 18, 18, 2,4,3,3,4, change_mixer_limits, output_channels); //// create_menutoggle(widgets_config+4, 18, 20, 3,5,4,4,5, change_ui_settings, vis_styles); create_toggle(widgets_config+5, 18, 21, 4,6,5,5,6, change_ui_settings); create_menutoggle(widgets_config+6, 18, 22, 5,7,6,6,7, change_ui_settings, sharp_flat); create_menutoggle(widgets_config+7, 18, 23, 6,8,7,7,8, change_ui_settings, time_displays); //// create_menutoggle(widgets_config+8, 18, 25, 7,11,8,8,11, change_ui_settings, midi_modes); //// create_togglebutton(widgets_config+9, 44, 30, 5, 8,9,11,10,10, change_video_settings, "Yes", 2, video_fs_group); create_togglebutton(widgets_config+10, 54, 30, 5, 10,10,9,10,0, change_video_settings, "No", 2, video_fs_group); //// create_togglebutton(widgets_config+11, 6, 30, 26, 8,12,11,9,12, change_video_settings, "SDL Video Surface", 2, video_group); create_togglebutton(widgets_config+12, 6, 33, 26, 11,13,12,9,13, change_video_settings, "YUV Video Overlay", 2, video_group); create_togglebutton(widgets_config+13, 6, 36, 26, 12,14,13,9,14, change_video_settings, "OpenGL Graphic Context", 2, video_group); create_togglebutton(widgets_config+14, 6, 39, 26, 13,14,14,9,9, change_video_settings, "DirectDraw Surface", 2, video_group); #ifndef WIN32 /* patch ddraw out */ video_group[3] = -1; widgets_config[14].d.togglebutton.state = 0; widgets_config[13].next.down = 13; widgets_config[13].next.tab = 9; page->total_widgets--; #endif }