touchkit.hh (12656:335489e574f3) | touchkit.hh (12658:eaa132294582) |
---|---|
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 | 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 |
|
53 public: 54 PS2TouchKit(const PS2TouchKitParams *p); 55 56 void serialize(CheckpointOut &cp) const override; 57 void unserialize(CheckpointIn &cp) override; 58 59 protected: // PS2Device 60 bool recv(const std::vector<uint8_t> &data) override; 61 62 public: // VncMouse 63 void mouseAt(uint16_t x, uint16_t y, uint8_t buttons) override; 64 65 protected: | 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 |
|
66 /** The vnc server we're connected to (if any) */ 67 VncInput *const vnc; 68 | 76 /** The vnc server we're connected to (if any) */ 77 VncInput *const vnc; 78 |
79 /** Is the device enabled? */ 80 bool enabled; 81 |
|
69 /** | 82 /** |
70 * Has the driver been initialized in TouchKit mode? The model 71 * suppresses touch event generation until this is true. | 83 * Has the driver enabled TouchKit mode? The model suppresses 84 * touch event generation until this is true. |
72 */ | 85 */ |
73 bool driverInitialized; | 86 bool touchKitEnabled; |
74}; 75 76#endif // __DEV_PS2_TOUCHKIT_HH__ 77 | 87}; 88 89#endif // __DEV_PS2_TOUCHKIT_HH__ 90 |