blob: f7949ec4e6e7be9c337aa96831e67199482ac49b [file] [log] [blame]
Constantin Kaplinsky729598c2006-05-25 05:12:25 +00001/* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved.
2 *
3 * This is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This software is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this software; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 * USA.
17 */
18
19// -=- Input.h
20//
21// A number of routines that accept VNC-style input event data and perform
22// the appropriate actions under Win32
23
24#ifndef __RFB_WIN32_INPUT_H__
25#define __RFB_WIN32_INPUT_H__
26
27#include <rfb/Rect.h>
28#include <rfb/Configuration.h>
29#include <rdr/types.h>
30#include <map>
31#include <vector>
32
33namespace rfb {
34
35 namespace win32 {
36
37 // -=- Pointer event handling
38
39 class SPointer {
40 public:
41 SPointer();
42 // - Create a pointer event at a the given coordinates, with the
43 // specified button state. The event must be specified using
44 // Screen coordinates.
45 void pointerEvent(const Point& pos, int buttonmask);
46 protected:
47 Point last_position;
48 rdr::U8 last_buttonmask;
49 };
50
51 // -=- Keyboard event handling
52
53 class SKeyboard {
54 public:
55 SKeyboard();
Pierre Ossman5ae28212017-05-16 14:30:38 +020056 void keyEvent(rdr::U32 keysym, rdr::U32 keycode, bool down);
Constantin Kaplinsky729598c2006-05-25 05:12:25 +000057 static BoolParameter deadKeyAware;
58 private:
59 std::map<rdr::U32,rdr::U8> vkMap;
60 std::map<rdr::U32,bool> extendedMap;
61 std::vector<rdr::U8> deadChars;
62 };
63
64 }; // win32
65
66}; // rfb
67
68#endif // __RFB_WIN32_INPUT_H__