Deskflow 1.22.0.197
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
BaseClientProxy.h
Go to the documentation of this file.
1/*
2 * Deskflow -- mouse and keyboard sharing utility
3 * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
4 * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman
5 * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
6 */
7
8#pragma once
9
10#include "deskflow/IClient.h"
11
12namespace deskflow {
13class IStream;
14}
15
18{
19public:
23 explicit BaseClientProxy(const std::string &name);
24 ~BaseClientProxy() override = default;
25
27
28
30
33 void setJumpCursorPos(int32_t x, int32_t y);
34
36
38
40
43 void getJumpCursorPos(int32_t &x, int32_t &y) const;
44
46
49 virtual bool isPrimary() const
50 {
51 return false;
52 }
53
55
56 // IScreen
57 void *getEventTarget() const override = 0;
58 bool getClipboard(ClipboardID id, IClipboard *) const override = 0;
59 void getShape(int32_t &x, int32_t &y, int32_t &width, int32_t &height) const override = 0;
60 void getCursorPos(int32_t &x, int32_t &y) const override = 0;
61
62 // IClient overrides
63 void enter(int32_t xAbs, int32_t yAbs, uint32_t seqNum, KeyModifierMask mask, bool forScreensaver) override = 0;
64 bool leave() override = 0;
65 void setClipboard(ClipboardID, const IClipboard *) override = 0;
66 void grabClipboard(ClipboardID) override = 0;
67 void setClipboardDirty(ClipboardID, bool) override = 0;
68 void keyDown(KeyID, KeyModifierMask, KeyButton, const std::string &) override = 0;
69 void keyRepeat(KeyID, KeyModifierMask, int32_t count, KeyButton, const std::string &lang) override = 0;
70 void keyUp(KeyID, KeyModifierMask, KeyButton) override = 0;
71 void mouseDown(ButtonID) override = 0;
72 void mouseUp(ButtonID) override = 0;
73 void mouseMove(int32_t xAbs, int32_t yAbs) override = 0;
74 void mouseRelativeMove(int32_t xRel, int32_t yRel) override = 0;
75 void mouseWheel(int32_t xDelta, int32_t yDelta) override = 0;
76 void screensaver(bool activate) override = 0;
77 void resetOptions() override = 0;
78 void setOptions(const OptionsList &options) override = 0;
79 virtual void sendDragInfo(uint32_t fileCount, const char *info, size_t size) = 0;
80 virtual void fileChunkSending(uint8_t mark, char *data, size_t dataSize) = 0;
81 virtual std::string getSecureInputApp() const = 0;
82 virtual void secureInputNotification(const std::string &app) const = 0;
83 std::string getName() const override;
84 virtual deskflow::IStream *getStream() const = 0;
85
86private:
87 std::string m_name;
88 int32_t m_x = 0;
89 int32_t m_y = 0;
90};
static const struct sockaddr FAR * name
Definition ArchNetworkWinsock.cpp:27
static int void FAR * data
Definition ArchNetworkWinsock.cpp:34
uint8_t ClipboardID
Clipboard ID.
Definition ClipboardTypes.h:16
uint32_t KeyID
Key ID.
Definition KeyTypes.h:22
uint16_t KeyButton
Key Code.
Definition KeyTypes.h:35
uint32_t KeyModifierMask
Modifier key mask.
Definition KeyTypes.h:45
uint8_t ButtonID
Mouse button ID.
Definition MouseTypes.h:16
std::vector< uint32_t > OptionsList
Definition OptionTypes.h:27
int y
Definition ServerConfig.cpp:27
int x
Definition ServerConfig.cpp:26
std::string getName() const override
Get client name.
Definition BaseClientProxy.cpp:31
virtual void fileChunkSending(uint8_t mark, char *data, size_t dataSize)=0
~BaseClientProxy() override=default
void setJumpCursorPos(int32_t x, int32_t y)
Save cursor position.
Definition BaseClientProxy.cpp:19
void mouseDown(ButtonID) override=0
Notify of mouse press.
void screensaver(bool activate) override=0
Notify of screen saver change.
void getJumpCursorPos(int32_t &x, int32_t &y) const
Get cursor position.
Definition BaseClientProxy.cpp:25
void mouseMove(int32_t xAbs, int32_t yAbs) override=0
Notify of mouse motion.
virtual deskflow::IStream * getStream() const =0
void getCursorPos(int32_t &x, int32_t &y) const override=0
Get cursor position.
virtual std::string getSecureInputApp() const =0
void resetOptions() override=0
Notify of options changes.
void * getEventTarget() const override=0
Get event target.
void enter(int32_t xAbs, int32_t yAbs, uint32_t seqNum, KeyModifierMask mask, bool forScreensaver) override=0
Enter screen.
void mouseUp(ButtonID) override=0
Notify of mouse release.
void keyUp(KeyID, KeyModifierMask, KeyButton) override=0
Notify of key release.
bool leave() override=0
Leave screen.
void mouseRelativeMove(int32_t xRel, int32_t yRel) override=0
Notify of mouse motion.
virtual void sendDragInfo(uint32_t fileCount, const char *info, size_t size)=0
virtual bool isPrimary() const
Get cursor position.
Definition BaseClientProxy.h:49
void getShape(int32_t &x, int32_t &y, int32_t &width, int32_t &height) const override=0
Get screen shape.
void setOptions(const OptionsList &options) override=0
Notify of options changes.
void mouseWheel(int32_t xDelta, int32_t yDelta) override=0
Notify of mouse wheel motion.
void setClipboardDirty(ClipboardID, bool) override=0
Mark clipboard dirty.
void grabClipboard(ClipboardID) override=0
Grab clipboard.
void setClipboard(ClipboardID, const IClipboard *) override=0
Set clipboard.
BaseClientProxy(const std::string &name)
Definition BaseClientProxy.cpp:14
bool getClipboard(ClipboardID id, IClipboard *) const override=0
Get clipboard.
void keyDown(KeyID, KeyModifierMask, KeyButton, const std::string &) override=0
Notify of key press.
void keyRepeat(KeyID, KeyModifierMask, int32_t count, KeyButton, const std::string &lang) override=0
Notify of key repeat.
virtual void secureInputNotification(const std::string &app) const =0
Client interface.
Definition IClient.h:24
Clipboard interface.
Definition IClipboard.h:20
Bidirectional stream interface.
Definition IStream.h:24
Definition EventTypes.h:11