filename | src/gui/gtkui.h |
changeset | 450:207461e79f21 |
prev | 447:3e095bfcb476 |
next | 455:3080881d00d4 |
author | nkeynes |
date | Wed Oct 17 11:26:45 2007 +0000 (16 years ago) |
permissions | -rw-r--r-- |
last change | Split config management out to config.[ch] Manage config filename Check home dir + sysconfdir for conf file Initial work on a path settings dialog |
file | annotate | diff | log | raw |
nkeynes@435 | 1 | /** |
nkeynes@450 | 2 | * $Id: gtkui.h,v 1.4 2007-10-17 11:26:45 nkeynes Exp $ |
nkeynes@435 | 3 | * |
nkeynes@435 | 4 | * Core GTK-based user interface |
nkeynes@435 | 5 | * |
nkeynes@435 | 6 | * Copyright (c) 2005 Nathan Keynes. |
nkeynes@435 | 7 | * |
nkeynes@435 | 8 | * This program is free software; you can redistribute it and/or modify |
nkeynes@435 | 9 | * it under the terms of the GNU General Public License as published by |
nkeynes@435 | 10 | * the Free Software Foundation; either version 2 of the License, or |
nkeynes@435 | 11 | * (at your option) any later version. |
nkeynes@435 | 12 | * |
nkeynes@435 | 13 | * This program is distributed in the hope that it will be useful, |
nkeynes@435 | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
nkeynes@435 | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
nkeynes@435 | 16 | * GNU General Public License for more details. |
nkeynes@435 | 17 | */ |
nkeynes@435 | 18 | |
nkeynes@435 | 19 | #ifndef __lxdream_gtkui_H |
nkeynes@435 | 20 | #define __lxdream_gtkui_H |
nkeynes@435 | 21 | |
nkeynes@435 | 22 | #include <gtk/gtk.h> |
nkeynes@435 | 23 | #include "gui.h" |
nkeynes@435 | 24 | #include "cpu.h" |
nkeynes@435 | 25 | |
nkeynes@435 | 26 | /********************* Top-level windows *********************/ |
nkeynes@435 | 27 | |
nkeynes@435 | 28 | typedef struct main_window_info *main_window_t; |
nkeynes@435 | 29 | typedef struct debug_window_info *debug_window_t; |
nkeynes@435 | 30 | typedef struct mmio_window_info *mmio_window_t; |
nkeynes@435 | 31 | |
nkeynes@435 | 32 | /** |
nkeynes@435 | 33 | * Construct and show the main window, returning an |
nkeynes@435 | 34 | * opaque pointer to the window. |
nkeynes@435 | 35 | */ |
nkeynes@435 | 36 | main_window_t main_window_new( const gchar *title ); |
nkeynes@447 | 37 | GtkWindow *main_window_get_frame( main_window_t win ); |
nkeynes@435 | 38 | GtkWidget *main_window_get_renderarea( main_window_t win ); |
nkeynes@435 | 39 | void main_window_set_running( main_window_t win, gboolean running ); |
nkeynes@435 | 40 | void main_window_set_framerate( main_window_t win, float rate ); |
nkeynes@437 | 41 | void main_window_set_speed( main_window_t win, double speed ); |
nkeynes@435 | 42 | |
nkeynes@435 | 43 | debug_window_t debug_window_new(); |
nkeynes@435 | 44 | void debug_window_show( debug_window_t win, gboolean show ); |
nkeynes@435 | 45 | void debug_window_set_running( debug_window_t win, gboolean running ); |
nkeynes@435 | 46 | void debug_window_update(debug_window_t win); |
nkeynes@435 | 47 | |
nkeynes@435 | 48 | mmio_window_t mmio_window_new(); |
nkeynes@450 | 49 | void mmio_window_show( mmio_window_t win, gboolean show ); |
nkeynes@435 | 50 | |
nkeynes@450 | 51 | void controller_dialog_run(); |
nkeynes@450 | 52 | void path_dialog_run(); |
nkeynes@450 | 53 | |
nkeynes@450 | 54 | /********************* Helper functions **********************/ |
nkeynes@450 | 55 | |
nkeynes@450 | 56 | gint gtk_gui_run_property_dialog( const gchar *title, GtkWidget *panel ); |
nkeynes@435 | 57 | |
nkeynes@435 | 58 | /******************** Video driver hooks *********************/ |
nkeynes@435 | 59 | |
nkeynes@435 | 60 | GtkWidget *gtk_gui_get_renderarea(); |
nkeynes@435 | 61 | |
nkeynes@435 | 62 | /******************* Callback declarations *******************/ |
nkeynes@435 | 63 | |
nkeynes@435 | 64 | void mount_action_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 65 | void reset_action_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 66 | void pause_action_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 67 | void resume_action_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 68 | void load_state_action_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 69 | void save_state_action_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 70 | void about_action_callback( GtkAction *action, gpointer user_data); |
nkeynes@437 | 71 | void debugger_action_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 72 | void exit_action_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 73 | |
nkeynes@447 | 74 | void path_settings_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 75 | void audio_settings_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 76 | void controller_settings_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 77 | void network_settings_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 78 | void video_settings_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 79 | void fullscreen_toggle_callback( GtkToggleAction *action, gpointer user_data); |
nkeynes@435 | 80 | |
nkeynes@435 | 81 | /*************** Constant colour/font values *****************/ |
nkeynes@435 | 82 | extern PangoFontDescription *gui_fixed_font; |
nkeynes@435 | 83 | extern GdkColor gui_colour_normal, gui_colour_changed, gui_colour_error; |
nkeynes@435 | 84 | extern GdkColor gui_colour_warn, gui_colour_pc, gui_colour_debug; |
nkeynes@435 | 85 | extern GdkColor gui_colour_trace, gui_colour_break, gui_colour_temp_break; |
nkeynes@435 | 86 | extern GdkColor gui_colour_white; |
nkeynes@435 | 87 | |
nkeynes@435 | 88 | #endif /* __lxdream_gtkui_H */ |
.