Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/yabause/src/gtk/pergtk.c
2 views
1
/* Copyright 2005-2006 Guillaume Duhamel
2
Copyright 2005-2006 Theo Berkau
3
4
This file is part of Yabause.
5
6
Yabause is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or
9
(at your option) any later version.
10
11
Yabause is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with Yabause; if not, write to the Free Software
18
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
21
#include "pergtk.h"
22
#include <gtk/gtk.h>
23
#include "../yabause.h"
24
#include "../vdp2.h"
25
#include "../yui.h"
26
27
int PERGTKInit(void);
28
void PERGTKDeInit(void);
29
int PERGTKHandleEvents(void);
30
void PERGTKNothing(void);
31
32
u32 PERGTKScan(void);
33
void PERGTKFlush(void);
34
void PERGTKKeyName(u32 key, char * name, int size);
35
36
PerInterface_struct PERGTK = {
37
PERCORE_GTK,
38
"GTK Input Interface",
39
PERGTKInit,
40
PERGTKDeInit,
41
PERGTKHandleEvents,
42
PERGTKNothing,
43
PERGTKScan,
44
0,
45
PERGTKFlush
46
#ifdef PERKEYNAME
47
,PERGTKKeyName
48
#endif
49
};
50
51
//////////////////////////////////////////////////////////////////////////////
52
53
int PERGTKInit(void) {
54
return 0;
55
}
56
57
//////////////////////////////////////////////////////////////////////////////
58
59
void PERGTKDeInit(void) {
60
}
61
62
//////////////////////////////////////////////////////////////////////////////
63
64
void PERGTKNothing(void) {
65
}
66
67
//////////////////////////////////////////////////////////////////////////////
68
69
int PERGTKHandleEvents(void) {
70
YabauseExec();
71
72
return 0;
73
}
74
75
//////////////////////////////////////////////////////////////////////////////
76
77
u32 PERGTKScan(void) {
78
g_print("this is wrong, the gtk peripheral can't scan\n");
79
return 1;
80
}
81
82
//////////////////////////////////////////////////////////////////////////////
83
84
void PERGTKFlush(void) {
85
}
86
87
//////////////////////////////////////////////////////////////////////////////
88
89
void PERGTKKeyName(u32 key, char * name, int size)
90
{
91
g_strlcpy(name, gdk_keyval_name(key), size);
92
}
93
94