1/* 2 * Copyright (c) 2010, 2017-2018 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 36 unchanged lines hidden (view full) --- 45 46struct PS2TouchKitParams; 47 48class PS2TouchKit : public PS2Device, public VncMouse 49{ 50 protected: 51 static const uint8_t ID[]; 52 |
53 enum TKCommands { 54 TouchKitActive = 'A', 55 TouchKitFWRev = 'D', 56 TouchKitCtrlType = 'E', 57 }; 58 |
59 public: 60 PS2TouchKit(const PS2TouchKitParams *p); 61 62 void serialize(CheckpointOut &cp) const override; 63 void unserialize(CheckpointIn &cp) override; 64 65 protected: // PS2Device 66 bool recv(const std::vector<uint8_t> &data) override; 67 68 public: // VncMouse 69 void mouseAt(uint16_t x, uint16_t y, uint8_t buttons) override; 70 71 protected: |
72 bool recvTouchKit(const std::vector<uint8_t> &data); 73 void sendTouchKit(const uint8_t *data, size_t size); 74 void sendTouchKit(uint8_t data) { sendTouchKit(&data, 1); } 75 |
76 /** The vnc server we're connected to (if any) */ 77 VncInput *const vnc; 78 |
79 /** Is the device enabled? */ 80 bool enabled; 81 |
82 /** |
83 * Has the driver enabled TouchKit mode? The model suppresses 84 * touch event generation until this is true. |
85 */ |
86 bool touchKitEnabled; |
87}; 88 89#endif // __DEV_PS2_TOUCHKIT_HH__ 90 |