filename | src/gui/gtkui.h |
changeset | 437:2c259474b474 |
prev | 435:7a5d71e8560b |
next | 447:3e095bfcb476 |
author | nkeynes |
date | Thu Oct 11 08:22:03 2007 +0000 (16 years ago) |
permissions | -rw-r--r-- |
last change | Add speed meter to main window Add sunken border around video area Add debugger menu item Move logging out to util.c |
file | annotate | diff | log | raw |
nkeynes@435 | 1 | /** |
nkeynes@437 | 2 | * $Id: gtkui.h,v 1.2 2007-10-11 08:22:03 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@435 | 37 | |
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 | |
nkeynes@435 | 45 | void debug_window_show( debug_window_t win, gboolean show ); |
nkeynes@435 | 46 | void debug_window_set_running( debug_window_t win, gboolean running ); |
nkeynes@435 | 47 | void debug_window_update(debug_window_t win); |
nkeynes@435 | 48 | |
nkeynes@435 | 49 | mmio_window_t mmio_window_new(); |
nkeynes@435 | 50 | |
nkeynes@435 | 51 | void mmio_window_show( mmio_window_t win, gboolean show ); |
nkeynes@435 | 52 | |
nkeynes@435 | 53 | /******************** Video driver hooks *********************/ |
nkeynes@435 | 54 | |
nkeynes@435 | 55 | GtkWidget *gtk_gui_get_renderarea(); |
nkeynes@435 | 56 | |
nkeynes@435 | 57 | /******************* Callback declarations *******************/ |
nkeynes@435 | 58 | |
nkeynes@435 | 59 | void mount_action_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 60 | void reset_action_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 61 | void pause_action_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 62 | void resume_action_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 63 | void load_state_action_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 64 | void save_state_action_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 65 | void about_action_callback( GtkAction *action, gpointer user_data); |
nkeynes@437 | 66 | void debugger_action_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 67 | void exit_action_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 68 | |
nkeynes@435 | 69 | void audio_settings_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 70 | void controller_settings_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 71 | void network_settings_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 72 | void video_settings_callback( GtkAction *action, gpointer user_data); |
nkeynes@435 | 73 | void fullscreen_toggle_callback( GtkToggleAction *action, gpointer user_data); |
nkeynes@435 | 74 | |
nkeynes@435 | 75 | /*************** Constant colour/font values *****************/ |
nkeynes@435 | 76 | extern PangoFontDescription *gui_fixed_font; |
nkeynes@435 | 77 | extern GdkColor gui_colour_normal, gui_colour_changed, gui_colour_error; |
nkeynes@435 | 78 | extern GdkColor gui_colour_warn, gui_colour_pc, gui_colour_debug; |
nkeynes@435 | 79 | extern GdkColor gui_colour_trace, gui_colour_break, gui_colour_temp_break; |
nkeynes@435 | 80 | extern GdkColor gui_colour_white; |
nkeynes@435 | 81 | |
nkeynes@435 | 82 | #endif /* __lxdream_gtkui_H */ |
.