| Flutter Windows Embedder |

Public Member Functions | List of all members
flutter::WindowProcDelegateManager Class Reference

`#include <window_proc_delegate_manager.h>`

## Public Member Functions
| WindowProcDelegateManager ()
| ~WindowProcDelegateManager ()
void | RegisterTopLevelWindowProcDelegate (FlutterDesktopWindowProcCallback delegate, void *user_data)
void | UnregisterTopLevelWindowProcDelegate (FlutterDesktopWindowProcCallback delegate)
std::optional< LRESULT > | OnTopLevelWindowProc (HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)

## Detailed Description

Definition at line 20 of file window_proc_delegate_manager.h.

## Constructor & Destructor Documentation

## ◆ WindowProcDelegateManager()

flutter::WindowProcDelegateManager::WindowProcDelegateManager | ( |  | ) |
| explicit default

## ◆ ~WindowProcDelegateManager()

flutter::WindowProcDelegateManager::~WindowProcDelegateManager | ( |  | ) |
| default

## Member Function Documentation

## ◆ OnTopLevelWindowProc()

std::optional< LRESULT > flutter::WindowProcDelegateManager::OnTopLevelWindowProc | ( | HWND | hwnd,
|  | UINT | message,
|  | WPARAM | wparam,
|  | LPARAM | lparam
| ) |  |

Definition at line 25 of file window_proc_delegate_manager.cc.

29 {
30 std::optional<LRESULT> result;
31 for (const auto& [handler, user_data] : top_level_window_proc_handlers_) {
32 LPARAM handler_result;
33 // Stop as soon as any delegate indicates that it has handled the message.
34 if (handler(hwnd, message, wparam, lparam, user_data, &handler_result)) {
35 result = handler_result;
36 break;
37 }
38 }
39 return result;
40 }

References message, and user_data.

Referenced by flutter::testing::TEST(), and flutter::testing::TEST_F().

## ◆ RegisterTopLevelWindowProcDelegate()

void flutter::WindowProcDelegateManager::RegisterTopLevelWindowProcDelegate | ( | FlutterDesktopWindowProcCallback | delegate,
|  | void * | user_data
| ) |  |

Definition at line 14 of file window_proc_delegate_manager.cc.

16 {
17 top_level_window_proc_handlers_[delegate] = user_data;
18 }

References user_data.

Referenced by FlutterDesktopPluginRegistrarRegisterTopLevelWindowProcDelegate(), flutter::testing::TEST(), and flutter::testing::TEST_F().

## ◆ UnregisterTopLevelWindowProcDelegate()

void flutter::WindowProcDelegateManager::UnregisterTopLevelWindowProcDelegate | ( | FlutterDesktopWindowProcCallback | delegate | ) |

Definition at line 20 of file window_proc_delegate_manager.cc.

21 {
22 top_level_window_proc_handlers_.erase(delegate);
23 }

Referenced by FlutterDesktopPluginRegistrarUnregisterTopLevelWindowProcDelegate(), and flutter::testing::TEST().

The documentation for this class was generated from the following files:

- shell/platform/windows/window_proc_delegate_manager.h
- shell/platform/windows/window_proc_delegate_manager.cc

user_data
void * user_data
Definition: flutter_windows_view_unittests.cc:47
message
Win32Message message
Definition: keyboard_unittests.cc:137