forked from pete-gordon/oricutron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
keyboard.h
60 lines (48 loc) · 1.63 KB
/
keyboard.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
** Oricutron
** Copyright (C) 2009-2014 Peter Gordon
**
** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License
** as published by the Free Software Foundation, version 2
** of the License.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**
** visual keyboard header
*/
#ifndef KEYBOARD_H
#define KEYBOARD_H
struct kbdkey
{
int x, y, w, h;
int highlight;
int highlightfade;
SDL_COMPAT_KEY keysim;
SDL_COMPAT_KEY keysimshifted;
int is_mod_key;
};
struct keyboard_mapping
{
SDL_COMPAT_KEY host_keys[65];
SDL_COMPAT_KEY oric_keys[65];
SDL_COMPAT_KEY nb_map;
};
int kbd_init( struct machine *oric );
SDL_bool keyboard_event( SDL_Event *ev, struct machine *oric, SDL_bool *needrender );
void release_sticky_keys(void);
void add_to_keyboard_mapping( struct keyboard_mapping *map, SDL_COMPAT_KEY host_key, SDL_COMPAT_KEY oric_key );
void reset_keyboard_mapping( struct keyboard_mapping *map );
SDL_bool save_keyboard_mapping( struct machine *oric, char *filename );
SDL_bool load_keyboard_mapping( struct machine *oric, char *filename );
#ifdef __ANDROID__
void android_togglekeyboard(struct machine* oric);
#endif
#endif