[feat] add HarmonyOS desktop and mobile clients,issue #117

This commit is contained in:
kunkundi
2026-10-16 00:42:55 +08:00
parent 43a0789c1e
commit 45bf6ec4ee
149 changed files with 11587 additions and 93 deletions
+33
View File
@@ -0,0 +1,33 @@
/*
* @Author: DI JUNKUN
* @Date: 2026-10-14
* Copyright (c) 2026 by DI JUNKUN, All Rights Reserved.
*/
#ifndef _INPUT_H_
#define _INPUT_H_
#include <remote_action.h>
#include <keyboard_state.h>
namespace crossdesk::harmony {
class Input {
public:
bool Configure(int width, int height, int display);
bool Apply(const RemoteAction& action);
bool Release();
bool LockWorkstation();
private:
bool Key(const KeyboardKey& key, bool down);
bool Pointer(int flag, float x, float y, int scroll);
int width_ = 0, height_ = 0, display_ = 0;
float x_ = 0.5f, y_ = 0.5f;
PressedKeys keys_;
int last_key_result_ = -1, last_mouse_result_ = -1;
unsigned buttons_ = 0;
uint32_t key_sequence_ = 0;
bool have_key_sequence_ = false;
};
}
#endif