mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
[feat] use peer map to manage multiple client instances
This commit is contained in:
@@ -53,7 +53,7 @@ class DeviceController {
|
||||
public:
|
||||
// virtual int Init(int screen_width, int screen_height);
|
||||
// virtual int Destroy();
|
||||
// virtual int SendCommand(RemoteAction remote_action);
|
||||
// virtual int SendMouseCommand(RemoteAction remote_action);
|
||||
|
||||
// virtual int Hook();
|
||||
// virtual int Unhook();
|
||||
|
||||
@@ -48,7 +48,7 @@ int MouseController::Init(int screen_width, int screen_height) {
|
||||
|
||||
int MouseController::Destroy() { return 0; }
|
||||
|
||||
int MouseController::SendCommand(RemoteAction remote_action) {
|
||||
int MouseController::SendMouseCommand(RemoteAction remote_action) {
|
||||
int mouse_pos_x = remote_action.m.x;
|
||||
int mouse_pos_y = remote_action.m.y;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ class MouseController : public DeviceController {
|
||||
public:
|
||||
virtual int Init(int screen_width, int screen_height);
|
||||
virtual int Destroy();
|
||||
virtual int SendCommand(RemoteAction remote_action);
|
||||
virtual int SendMouseCommand(RemoteAction remote_action);
|
||||
|
||||
private:
|
||||
void SimulateKeyDown(int fd, int kval);
|
||||
|
||||
@@ -22,7 +22,7 @@ int MouseController::Init(int screen_width, int screen_height) {
|
||||
|
||||
int MouseController::Destroy() { return 0; }
|
||||
|
||||
int MouseController::SendCommand(RemoteAction remote_action) {
|
||||
int MouseController::SendMouseCommand(RemoteAction remote_action) {
|
||||
int mouse_pos_x = remote_action.m.x * screen_width_ / pixel_width_;
|
||||
int mouse_pos_y = remote_action.m.y * screen_height_ / pixel_height_;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class MouseController : public DeviceController {
|
||||
public:
|
||||
virtual int Init(int screen_width, int screen_height);
|
||||
virtual int Destroy();
|
||||
virtual int SendCommand(RemoteAction remote_action);
|
||||
virtual int SendMouseCommand(RemoteAction remote_action);
|
||||
|
||||
private:
|
||||
int screen_width_ = 0;
|
||||
|
||||
@@ -15,7 +15,7 @@ int MouseController::Init(int screen_width, int screen_height) {
|
||||
|
||||
int MouseController::Destroy() { return 0; }
|
||||
|
||||
int MouseController::SendCommand(RemoteAction remote_action) {
|
||||
int MouseController::SendMouseCommand(RemoteAction remote_action) {
|
||||
INPUT ip;
|
||||
|
||||
if (remote_action.type == ControlType::mouse) {
|
||||
|
||||
@@ -17,7 +17,7 @@ class MouseController : public DeviceController {
|
||||
public:
|
||||
virtual int Init(int screen_width, int screen_height);
|
||||
virtual int Destroy();
|
||||
virtual int SendCommand(RemoteAction remote_action);
|
||||
virtual int SendMouseCommand(RemoteAction remote_action);
|
||||
|
||||
private:
|
||||
int screen_width_ = 0;
|
||||
|
||||
Reference in New Issue
Block a user