mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 12:15:34 +08:00
[fix] fix compile error
This commit is contained in:
@@ -4,6 +4,8 @@ KeyboardCapturer::KeyboardCapturer() {}
|
|||||||
|
|
||||||
KeyboardCapturer::~KeyboardCapturer() {}
|
KeyboardCapturer::~KeyboardCapturer() {}
|
||||||
|
|
||||||
int KeyboardCapturer::Hook() { return 0; }
|
int KeyboardCapturer::Hook(OnKeyAction on_key_action, void *user_ptr) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int KeyboardCapturer::Unhook() { return 0; }
|
int KeyboardCapturer::Unhook() { return 0; }
|
||||||
@@ -15,7 +15,7 @@ class KeyboardCapturer : public DeviceController {
|
|||||||
virtual ~KeyboardCapturer();
|
virtual ~KeyboardCapturer();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual int Hook();
|
virtual int Hook(OnKeyAction on_key_action, void *user_ptr);
|
||||||
virtual int Unhook();
|
virtual int Unhook();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ KeyboardCapturer::KeyboardCapturer() {}
|
|||||||
|
|
||||||
KeyboardCapturer::~KeyboardCapturer() {}
|
KeyboardCapturer::~KeyboardCapturer() {}
|
||||||
|
|
||||||
int KeyboardCapturer::Hook() { return 0; }
|
int KeyboardCapturer::Hook(OnKeyAction on_key_action, void *user_ptr) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int KeyboardCapturer::Unhook() { return 0; }
|
int KeyboardCapturer::Unhook() { return 0; }
|
||||||
@@ -15,7 +15,7 @@ class KeyboardCapturer : public DeviceController {
|
|||||||
virtual ~KeyboardCapturer();
|
virtual ~KeyboardCapturer();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual int Hook();
|
virtual int Hook(OnKeyAction on_key_action, void *user_ptr);
|
||||||
virtual int Unhook();
|
virtual int Unhook();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -123,14 +123,14 @@ int Render::ShowRecentConnections() {
|
|||||||
ImGui::SetCursorPos(
|
ImGui::SetCursorPos(
|
||||||
ImVec2(dummy_button_pos.x + 2.0f, dummy_button_pos.y + 1.0f));
|
ImVec2(dummy_button_pos.x + 2.0f, dummy_button_pos.y + 1.0f));
|
||||||
ImGui::SetWindowFontScale(0.65f);
|
ImGui::SetWindowFontScale(0.65f);
|
||||||
ImGui::Text(remote_id.c_str());
|
ImGui::Text("%s", remote_id.c_str());
|
||||||
ImGui::SetWindowFontScale(1.0f);
|
ImGui::SetWindowFontScale(1.0f);
|
||||||
ImGui::PopStyleColor(3);
|
ImGui::PopStyleColor(3);
|
||||||
|
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
ImGui::BeginTooltip();
|
ImGui::BeginTooltip();
|
||||||
ImGui::SetWindowFontScale(0.5f);
|
ImGui::SetWindowFontScale(0.5f);
|
||||||
ImGui::Text(host_name.c_str());
|
ImGui::Text("%s", host_name.c_str());
|
||||||
ImGui::SetWindowFontScale(1.0f);
|
ImGui::SetWindowFontScale(1.0f);
|
||||||
ImGui::EndTooltip();
|
ImGui::EndTooltip();
|
||||||
}
|
}
|
||||||
@@ -264,7 +264,7 @@ int Render::ConfirmDeleteConnection() {
|
|||||||
auto text_width = ImGui::CalcTextSize(text.c_str()).x;
|
auto text_width = ImGui::CalcTextSize(text.c_str()).x;
|
||||||
ImGui::SetCursorPosX((window_width - text_width) * 0.5f);
|
ImGui::SetCursorPosX((window_width - text_width) * 0.5f);
|
||||||
ImGui::SetCursorPosY(window_height * 0.2f);
|
ImGui::SetCursorPosY(window_height * 0.2f);
|
||||||
ImGui::Text(text.c_str());
|
ImGui::Text("%s", text.c_str());
|
||||||
ImGui::SetWindowFontScale(1.0f);
|
ImGui::SetWindowFontScale(1.0f);
|
||||||
|
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ target("device_controller")
|
|||||||
"src/device_controller/keyboard/windows", {public = true})
|
"src/device_controller/keyboard/windows", {public = true})
|
||||||
elseif is_os("macosx") then
|
elseif is_os("macosx") then
|
||||||
add_files("src/device_controller/mouse/mac/*.cpp",
|
add_files("src/device_controller/mouse/mac/*.cpp",
|
||||||
"src/device_controller/mouse/keyboard/*.cpp")
|
"src/device_controller/keyboard/mac/*.cpp")
|
||||||
add_includedirs("src/device_controller/mouse/mac",
|
add_includedirs("src/device_controller/mouse/mac",
|
||||||
"src/device_controller/keyboard/mac", {public = true})
|
"src/device_controller/keyboard/mac", {public = true})
|
||||||
elseif is_os("linux") then
|
elseif is_os("linux") then
|
||||||
|
|||||||
Reference in New Issue
Block a user