1 /* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 *
21 */
22
23 #include "gui/Key.h"
24
25 namespace GUI {
26
Key()27 Key::Key() :
28 _ascii(0), _keycode(0), _flags(0) {
29 }
30
Key(int ascii)31 Key::Key(int ascii) :
32 _ascii(ascii), _keycode(ascii), _flags(0) {
33 }
34
Key(int ascii,int keycode,int flags)35 Key::Key(int ascii, int keycode, int flags) :
36 _ascii(ascii), _keycode(keycode), _flags(flags) {
37 }
38
setKey(int ascii)39 void Key::setKey(int ascii) {
40 _ascii = ascii;
41 _keycode = ascii;
42 }
43
setKey(int ascii,int keycode)44 void Key::setKey(int ascii, int keycode) {
45 _ascii = ascii;
46 _keycode = keycode;
47 }
48
setKey(int ascii,int keycode,int flags)49 void Key::setKey(int ascii, int keycode, int flags) {
50 _ascii = ascii;
51 _keycode = keycode;
52 _flags = flags;
53 }
54
ascii()55 int Key::ascii() {
56 return _ascii;
57 }
58
keycode()59 int Key::keycode() {
60 return _keycode;
61 }
62
flags()63 int Key::flags() {
64 return _flags;
65 }
66
67 } // namespace GUI
68