Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/yabause/src/gtk/yuiwindow.h
2 views
1
/* Copyright 2006 Guillaume Duhamel
2
3
This file is part of Yabause.
4
5
Yabause is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or
8
(at your option) any later version.
9
10
Yabause is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with Yabause; if not, write to the Free Software
17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
*/
19
20
#ifndef YUI_WINDOW_H
21
#define YUI_WINDOW_H
22
23
#include <gtk/gtk.h>
24
#include <glib.h>
25
#include <glib-object.h>
26
#include <gtk/gtkwindow.h>
27
28
G_BEGIN_DECLS
29
30
#define YUI_WINDOW_TYPE (yui_window_get_type ())
31
#define YUI_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), YUI_WINDOW_TYPE, YuiWindow))
32
#define YUI_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), YUI_WINDOW_TYPE, YuiWindowClass))
33
#define IS_YUI_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), YUI_WINDOW_TYPE))
34
#define IS_YUI_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), YUI_WINDOW_TYPE))
35
36
typedef struct _YuiAction YuiAction;
37
typedef struct _YuiWindow YuiWindow;
38
typedef struct _YuiWindowClass YuiWindowClass;
39
40
struct _YuiAction {
41
guint key;
42
const char * name;
43
void (*press)(void);
44
void (*release)(void);
45
};
46
47
#define YUI_IS_INIT 1
48
#define YUI_IS_RUNNING 2
49
50
struct _YuiWindow {
51
GtkWindow hbox;
52
53
GtkWidget * logpopup;
54
GtkWidget * box;
55
GtkWidget * menu;
56
GtkWidget * area;
57
GtkWidget * log;
58
59
YuiAction * actions;
60
gulong clean_handler;
61
GCallback init_func;
62
gpointer init_data;
63
GSourceFunc run_func;
64
GCallback reset_func;
65
66
guint state;
67
68
GtkActionGroup * action_group;
69
};
70
71
struct _YuiWindowClass {
72
GtkWindowClass parent_class;
73
74
void (* yui_window_running) (YuiWindow * yw);
75
void (* yui_window_paused) (YuiWindow * yw);
76
};
77
78
GType yui_window_get_type (void);
79
GtkWidget * yui_window_new (YuiAction * act, GCallback ifunc, gpointer idata,
80
GSourceFunc rfunc, GCallback resetfunc);
81
void yui_window_update (YuiWindow * yui);
82
void yui_window_log (YuiWindow * yui, const char * message);
83
void yui_window_show_log (YuiWindow * yui);
84
void yui_window_start (YuiWindow * yui);
85
void yui_window_run (YuiWindow * yui);
86
void yui_window_pause (YuiWindow * yui);
87
void yui_window_reset (YuiWindow * yui);
88
void yui_window_invalidate (YuiWindow * yui);
89
void yui_window_set_fullscreen(YuiWindow * yui, gboolean f);
90
void yui_window_set_frameskip(YuiWindow * yui, gboolean f);
91
92
G_END_DECLS
93
94
#endif /* YUI_WINDOW_H */
95
96