Search
lxdream.org :: lxdream/src/gui/gtkui.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/gui/gtkui.h
changeset 435:7a5d71e8560b
next437:2c259474b474
author nkeynes
date Wed Oct 10 11:02:04 2007 +0000 (13 years ago)
permissions -rw-r--r--
last change First cut of new GUI
file annotate diff log raw
nkeynes@435
     1
/**
nkeynes@435
     2
 * $Id: gtkui.h,v 1.1 2007-10-10 11:02:04 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@435
    41
nkeynes@435
    42
debug_window_t debug_window_new();
nkeynes@435
    43
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@435
    49
nkeynes@435
    50
void mmio_window_show( mmio_window_t win, gboolean show );
nkeynes@435
    51
nkeynes@435
    52
/******************** Video driver hooks *********************/
nkeynes@435
    53
nkeynes@435
    54
GtkWidget *gtk_gui_get_renderarea();
nkeynes@435
    55
nkeynes@435
    56
/******************* Callback declarations *******************/
nkeynes@435
    57
nkeynes@435
    58
void mount_action_callback( GtkAction *action, gpointer user_data);
nkeynes@435
    59
void reset_action_callback( GtkAction *action, gpointer user_data);
nkeynes@435
    60
void pause_action_callback( GtkAction *action, gpointer user_data);
nkeynes@435
    61
void resume_action_callback( GtkAction *action, gpointer user_data);
nkeynes@435
    62
void load_state_action_callback( GtkAction *action, gpointer user_data);
nkeynes@435
    63
void save_state_action_callback( GtkAction *action, gpointer user_data);
nkeynes@435
    64
void about_action_callback( GtkAction *action, gpointer user_data);
nkeynes@435
    65
void exit_action_callback( GtkAction *action, gpointer user_data);
nkeynes@435
    66
nkeynes@435
    67
void audio_settings_callback( GtkAction *action, gpointer user_data);
nkeynes@435
    68
void controller_settings_callback( GtkAction *action, gpointer user_data);
nkeynes@435
    69
void network_settings_callback( GtkAction *action, gpointer user_data);
nkeynes@435
    70
void video_settings_callback( GtkAction *action, gpointer user_data);
nkeynes@435
    71
void fullscreen_toggle_callback( GtkToggleAction *action, gpointer user_data);
nkeynes@435
    72
nkeynes@435
    73
/*************** Constant colour/font values *****************/
nkeynes@435
    74
extern PangoFontDescription *gui_fixed_font;
nkeynes@435
    75
extern GdkColor gui_colour_normal, gui_colour_changed, gui_colour_error;
nkeynes@435
    76
extern GdkColor gui_colour_warn, gui_colour_pc, gui_colour_debug;
nkeynes@435
    77
extern GdkColor gui_colour_trace, gui_colour_break, gui_colour_temp_break;
nkeynes@435
    78
extern GdkColor gui_colour_white;
nkeynes@435
    79
nkeynes@435
    80
#endif /* __lxdream_gtkui_H */
.