From 8c8f85034b15d7d2a1589378f9d0ee236a98a3c8 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Mon, 14 Jul 2014 13:39:57 +0200 Subject: [PATCH] Move all functions that InputDevice uses into the class --- unix/xserver/hw/vnc/Input.cc | 6 ++---- unix/xserver/hw/vnc/Input.h | 5 +++++ unix/xserver/hw/vnc/InputCore.cc | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/unix/xserver/hw/vnc/Input.cc b/unix/xserver/hw/vnc/Input.cc index 46b02fd1..5497d97e 100644 --- a/unix/xserver/hw/vnc/Input.cc +++ b/unix/xserver/hw/vnc/Input.cc @@ -200,7 +200,7 @@ const rfb::Point &InputDevice::getPointerPos(void) return cursorPos; } -static int pointerProc(DeviceIntPtr pDevice, int onoff) +int InputDevice::pointerProc(DeviceIntPtr pDevice, int onoff) { BYTE map[BUTTONS + 1]; DevicePtr pDev = (DevicePtr)pDevice; @@ -267,9 +267,7 @@ static void keyboardBell(int percent, DeviceIntPtr device, pointer ctrl, vncBell(); } -extern void GetInitKeyboardMap(KeySymsPtr keysyms, CARD8 *modmap); - -static int keyboardProc(DeviceIntPtr pDevice, int onoff) +int InputDevice::keyboardProc(DeviceIntPtr pDevice, int onoff) { #if XORG < 17 KeySymsRec keySyms; diff --git a/unix/xserver/hw/vnc/Input.h b/unix/xserver/hw/vnc/Input.h index c996cb0b..8a3dd4f2 100644 --- a/unix/xserver/hw/vnc/Input.h +++ b/unix/xserver/hw/vnc/Input.h @@ -97,10 +97,15 @@ private: KeyCode addKeysym(KeySym keysym, unsigned state); private: + static int pointerProc(DeviceIntPtr pDevice, int onoff); + static int keyboardProc(DeviceIntPtr pDevice, int onoff); + #if XORG >= 17 static void vncXkbProcessDeviceEvent(int screenNum, InternalEvent *event, DeviceIntPtr dev); +#else + static void GetInitKeyboardMap(KeySymsPtr keysyms, CARD8 *modmap); #endif private: diff --git a/unix/xserver/hw/vnc/InputCore.cc b/unix/xserver/hw/vnc/InputCore.cc index a880ca07..b565c734 100644 --- a/unix/xserver/hw/vnc/InputCore.cc +++ b/unix/xserver/hw/vnc/InputCore.cc @@ -174,7 +174,7 @@ KeySym keyboardMap[MAP_LEN * KEYSYMS_PER_KEY] = { XK_Menu, NoSymbol, }; -void GetInitKeyboardMap(KeySymsPtr keysyms, CARD8 *modmap) +void InputDevice::GetInitKeyboardMap(KeySymsPtr keysyms, CARD8 *modmap) { int i; -- 2.39.5