Flutter Engine
flutter::Win32WindowProcDelegateManager Class Reference

#include <win32_window_proc_delegate_manager.h>

Public Member Functions

 Win32WindowProcDelegateManager ()
 
 ~Win32WindowProcDelegateManager ()
 
 Win32WindowProcDelegateManager (Win32WindowProcDelegateManager const &)=delete
 
Win32WindowProcDelegateManageroperator= (Win32WindowProcDelegateManager const &)=delete
 
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 19 of file win32_window_proc_delegate_manager.h.

Constructor & Destructor Documentation

◆ Win32WindowProcDelegateManager() [1/2]

flutter::Win32WindowProcDelegateManager::Win32WindowProcDelegateManager ( )
explicitdefault

◆ ~Win32WindowProcDelegateManager()

flutter::Win32WindowProcDelegateManager::~Win32WindowProcDelegateManager ( )
default

◆ Win32WindowProcDelegateManager() [2/2]

flutter::Win32WindowProcDelegateManager::Win32WindowProcDelegateManager ( Win32WindowProcDelegateManager const &  )
delete

Member Function Documentation

◆ OnTopLevelWindowProc()

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

Definition at line 25 of file win32_window_proc_delegate_manager.cc.

References user_data.

Referenced by flutter::testing::TEST().

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 }
G_BEGIN_DECLS FlValue gpointer user_data

◆ operator=()

Win32WindowProcDelegateManager& flutter::Win32WindowProcDelegateManager::operator= ( Win32WindowProcDelegateManager const &  )
delete

◆ RegisterTopLevelWindowProcDelegate()

void flutter::Win32WindowProcDelegateManager::RegisterTopLevelWindowProcDelegate ( FlutterDesktopWindowProcCallback  delegate,
void *  user_data 
)

Definition at line 14 of file win32_window_proc_delegate_manager.cc.

References user_data.

Referenced by flutter::testing::TEST().

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

◆ UnregisterTopLevelWindowProcDelegate()

void flutter::Win32WindowProcDelegateManager::UnregisterTopLevelWindowProcDelegate ( FlutterDesktopWindowProcCallback  delegate)

Definition at line 20 of file win32_window_proc_delegate_manager.cc.

Referenced by flutter::testing::TEST().

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

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