Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
shell
platform
windows
event_watcher.h
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_EVENT_WATCHER_H_
6
#define FLUTTER_SHELL_PLATFORM_WINDOWS_EVENT_WATCHER_H_
7
8
#include <Windows.h>
9
10
#include <functional>
11
12
#include "flutter/fml/macros.h"
13
14
namespace
flutter
{
15
16
// A win32 `HANDLE` wrapper for use as a one-time callback.
17
class
EventWatcher
{
18
public
:
19
explicit
EventWatcher
(std::function<
void
()>
callback
);
20
~EventWatcher
();
21
22
// Returns `HANDLE`, which can be used to register an event listener.
23
HANDLE
GetHandle
();
24
25
private
:
26
static
VOID
CALLBACK
CallbackForWait(
PVOID
context,
BOOLEAN
);
27
28
std::function<void()> callback_;
29
30
HANDLE
handle_;
31
HANDLE
handle_for_wait_;
32
33
FML_DISALLOW_COPY_AND_ASSIGN
(
EventWatcher
);
34
};
35
36
}
// namespace flutter
37
38
#endif
// FLUTTER_SHELL_PLATFORM_WINDOWS_EVENT_WATCHER_H_
flutter::EventWatcher
Definition
event_watcher.h:17
flutter::EventWatcher::~EventWatcher
~EventWatcher()
Definition
event_watcher.cc:18
flutter::EventWatcher::GetHandle
HANDLE GetHandle()
Definition
event_watcher.cc:23
callback
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
Definition
fl_key_channel_responder.cc:120
FML_DISALLOW_COPY_AND_ASSIGN
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition
macros.h:27
flutter
Definition
asset_manager.cc:10
PVOID
void * PVOID
Definition
windows_types.h:35
BOOLEAN
BYTE BOOLEAN
Definition
windows_types.h:39
VOID
#define VOID
Definition
windows_types.h:27
HANDLE
void * HANDLE
Definition
windows_types.h:36
CALLBACK
#define CALLBACK
Definition
windows_types.h:216
Generated on Fri Apr 26 2024 06:14:33 for Flutter Engine by
1.9.8