5#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_WINDOWS_LIFECYCLE_MANAGER_H_
6#define FLUTTER_SHELL_PLATFORM_WINDOWS_WINDOWS_LIFECYCLE_MANAGER_H_
16#include "flutter/shell/platform/common/app_lifecycle_state.h"
20class FlutterWindowsEngine;
47 std::optional<WPARAM> wparam,
48 std::optional<LPARAM> lparam,
107 bool HandleCloseMessage(HWND hwnd,
WPARAM wparam,
LPARAM lparam);
111 std::map<std::tuple<HWND, WPARAM, LPARAM>,
int> sent_close_messages_;
113 bool process_lifecycle_ =
false;
114 bool process_exit_ =
false;
116 std::set<HWND> visible_windows_;
118 std::set<HWND> focused_windows_;
120 std::mutex state_update_lock_;
virtual void OnWindowStateEvent(HWND hwnd, WindowStateEvent event)
std::optional< LRESULT > ExternalWindowMessage(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
WindowsLifecycleManager(FlutterWindowsEngine *engine)
virtual ~WindowsLifecycleManager()
AppLifecycleState GetLifecycleState()
bool WindowProc(HWND hwnd, UINT msg, WPARAM w, LPARAM l, LRESULT *result)
virtual void Quit(std::optional< HWND > window, std::optional< WPARAM > wparam, std::optional< LPARAM > lparam, UINT exit_code)
virtual void BeginProcessingLifecycle()
virtual void DispatchMessage(HWND window, UINT msg, WPARAM wparam, LPARAM lparam)
virtual bool IsLastWindowOfProcess()
virtual void SetLifecycleState(AppLifecycleState state)
virtual void BeginProcessingExit()
WindowStateEvent
An event representing a change in window state that may update the.