feat: add Flutter USB mirroring and single-instance desktop clients
This commit is contained in:
1 parent
3a7bb071f0
commit
a339465392
30 files changed
+1688
-104
No files matched your search
@@ -0,0 +1,27 @@
|
||||
#ifndef RUNNER_SCRCPY_HOST_H_
|
||||
#define RUNNER_SCRCPY_HOST_H_
|
||||
#include <windows.h>
|
||||
#include <flutter/method_channel.h>
|
||||
#include <flutter/encodable_value.h>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
class ScrcpyHost {
|
||||
public:
|
||||
ScrcpyHost(flutter::BinaryMessenger* messenger, HWND parent);
|
||||
~ScrcpyHost();
|
||||
private:
|
||||
struct Entry {
|
||||
HWND window;
|
||||
LONG_PTR style;
|
||||
LONG_PTR extended;
|
||||
RECT rect;
|
||||
};
|
||||
HWND parent_;
|
||||
std::map<DWORD, Entry> windows_;
|
||||
std::unique_ptr<flutter::MethodChannel<flutter::EncodableValue>> channel_;
|
||||
void Release(DWORD pid);
|
||||
void Handle(const flutter::MethodCall<flutter::EncodableValue>& call,
|
||||
std::unique_ptr<flutter::MethodResult<flutter::EncodableValue>> result);
|
||||
};
|
||||
#endif
|
||||
Reference in new issue
Block a user