28 lines
728 B
C++
28 lines
728 B
C++
#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
|