76f266645d
含 Phase 1.1 IM seq 排序、断线重连、多端已读同步与微信式语音转文字 UI。 排除 node_modules、构建产物、安装包与 .env 密钥。 Co-authored-by: Cursor <cursoragent@cursor.com>
40 lines
1.2 KiB
C++
40 lines
1.2 KiB
C++
#ifndef RUNNER_FLUTTER_WINDOW_H_
|
|
#define RUNNER_FLUTTER_WINDOW_H_
|
|
|
|
#include <flutter/dart_project.h>
|
|
#include <flutter/encodable_value.h>
|
|
#include <flutter/event_channel.h>
|
|
#include <flutter/event_sink.h>
|
|
#include <flutter/event_stream_handler_functions.h>
|
|
#include <flutter/flutter_view_controller.h>
|
|
#include <flutter/method_channel.h>
|
|
|
|
#include <memory>
|
|
|
|
#include "win32_window.h"
|
|
|
|
class FlutterWindow : public Win32Window {
|
|
public:
|
|
explicit FlutterWindow(const flutter::DartProject& project);
|
|
virtual ~FlutterWindow();
|
|
|
|
protected:
|
|
bool OnCreate() override;
|
|
void OnDestroy() override;
|
|
LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,
|
|
LPARAM const lparam) noexcept override;
|
|
|
|
private:
|
|
void EmitScreenshot();
|
|
|
|
flutter::DartProject project_;
|
|
std::unique_ptr<flutter::FlutterViewController> flutter_controller_;
|
|
std::unique_ptr<flutter::MethodChannel<flutter::EncodableValue>> im_channel_;
|
|
std::unique_ptr<flutter::MethodChannel<flutter::EncodableValue>> ota_channel_;
|
|
std::unique_ptr<flutter::EventChannel<flutter::EncodableValue>> device_channel_;
|
|
std::unique_ptr<flutter::EventSink<flutter::EncodableValue>> screenshot_sink_;
|
|
ULONGLONG last_shot_at_ = 0;
|
|
};
|
|
|
|
#endif // RUNNER_FLUTTER_WINDOW_H_
|