filename | src/gui/gtkui.h |
changeset | 457:af605fd32c0b |
prev | 455:3080881d00d4 |
next | 464:8e099fad42a6 |
author | nkeynes |
date | Wed Oct 24 21:23:22 2007 +0000 (16 years ago) |
permissions | -rw-r--r-- |
last change | Fix long standing texcache management bug (invalidate palette was not placing the invalidated entries on the free list). |
view | annotate | diff | log | raw |
1 /**
2 * $Id: gtkui.h,v 1.6 2007-10-21 11:38:02 nkeynes Exp $
3 *
4 * Core GTK-based user interface
5 *
6 * Copyright (c) 2005 Nathan Keynes.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 */
19 #ifndef __lxdream_gtkui_H
20 #define __lxdream_gtkui_H
22 #include <gtk/gtk.h>
23 #include "gui.h"
24 #include "cpu.h"
26 /********************* Top-level windows *********************/
28 typedef struct main_window_info *main_window_t;
29 typedef struct debug_window_info *debug_window_t;
30 typedef struct mmio_window_info *mmio_window_t;
31 typedef struct dump_window_info *dump_window_t;
33 /**
34 * Construct and show the main window, returning an
35 * opaque pointer to the window.
36 */
37 main_window_t main_window_new( const gchar *title, GtkWidget *menubar,
38 GtkWidget *toolbar, GtkAccelGroup *accel );
39 GtkWindow *main_window_get_frame( main_window_t win );
40 GtkWidget *main_window_get_renderarea( main_window_t win );
41 void main_window_set_running( main_window_t win, gboolean running );
42 void main_window_set_framerate( main_window_t win, float rate );
43 void main_window_set_speed( main_window_t win, double speed );
45 debug_window_t debug_window_new( const gchar *title, GtkWidget *menubar,
46 GtkWidget *toolbar, GtkAccelGroup *accel );
47 void debug_window_show( debug_window_t win, gboolean show );
48 void debug_window_set_running( debug_window_t win, gboolean running );
49 void debug_window_update(debug_window_t win);
50 void debug_window_single_step( debug_window_t data );
51 void debug_window_set_oneshot_breakpoint( debug_window_t data, int row );
52 void debug_window_toggle_breakpoint( debug_window_t data, int row );
55 mmio_window_t mmio_window_new( const gchar *title );
56 void mmio_window_show( mmio_window_t win, gboolean show );
58 dump_window_t dump_window_new( const gchar *title );
60 void maple_dialog_run();
61 void path_dialog_run();
63 main_window_t gtk_gui_get_main();
64 debug_window_t gtk_gui_get_debugger();
65 mmio_window_t gtk_gui_get_mmio();
67 /********************* Helper functions **********************/
69 typedef void (*gtk_dialog_done_fn)(GtkWidget *panel, gboolean isOK);
70 void gtk_gui_enable_action( const gchar *action, gboolean enabled );
71 gint gtk_gui_run_property_dialog( const gchar *title, GtkWidget *panel, gtk_dialog_done_fn fn );
73 /******************** Video driver hooks *********************/
75 GtkWidget *gtk_gui_get_renderarea();
77 /******************* Callback declarations *******************/
79 void mount_action_callback( GtkAction *action, gpointer user_data);
80 void reset_action_callback( GtkAction *action, gpointer user_data);
81 void pause_action_callback( GtkAction *action, gpointer user_data);
82 void resume_action_callback( GtkAction *action, gpointer user_data);
83 void load_state_action_callback( GtkAction *action, gpointer user_data);
84 void save_state_action_callback( GtkAction *action, gpointer user_data);
85 void about_action_callback( GtkAction *action, gpointer user_data);
86 void exit_action_callback( GtkAction *action, gpointer user_data);
88 void path_settings_callback( GtkAction *action, gpointer user_data);
89 void audio_settings_callback( GtkAction *action, gpointer user_data);
90 void maple_settings_callback( GtkAction *action, gpointer user_data);
91 void network_settings_callback( GtkAction *action, gpointer user_data);
92 void video_settings_callback( GtkAction *action, gpointer user_data);
93 void fullscreen_toggle_callback( GtkToggleAction *action, gpointer user_data);
95 void debugger_action_callback( GtkAction *action, gpointer user_data);
96 void debug_memory_action_callback( GtkAction *action, gpointer user_data);
97 void debug_mmio_action_callback( GtkAction *action, gpointer user_data);
98 void save_scene_action_callback( GtkAction *action, gpointer user_data);
99 void debug_step_action_callback( GtkAction *action, gpointer user_data);
100 void debug_runto_action_callback( GtkAction *action, gpointer user_data);
101 void debug_breakpoint_action_callback( GtkAction *action, gpointer user_data);
103 /*************** Constant colour/font values *****************/
104 extern PangoFontDescription *gui_fixed_font;
105 extern GdkColor gui_colour_normal, gui_colour_changed, gui_colour_error;
106 extern GdkColor gui_colour_warn, gui_colour_pc, gui_colour_debug;
107 extern GdkColor gui_colour_trace, gui_colour_break, gui_colour_temp_break;
108 extern GdkColor gui_colour_white;
110 #endif /* __lxdream_gtkui_H */
.