Flutter Engine
The Flutter Engine
message_loop_win.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_FML_PLATFORM_WIN_MESSAGE_LOOP_WIN_H_
6#define FLUTTER_FML_PLATFORM_WIN_MESSAGE_LOOP_WIN_H_
7
8#include <windows.h>
9
10#include <atomic>
11
12#include "flutter/fml/macros.h"
13#include "flutter/fml/message_loop_impl.h"
14#include "flutter/fml/unique_object.h"
15
16namespace fml {
17
19 private:
20 struct UniqueHandleTraits {
21 static HANDLE InvalidValue() { return NULL; }
22 static bool IsValid(HANDLE value) { return value != NULL; }
23 static void Free(HANDLE value) { CloseHandle(value); }
24 };
25
26 bool running_;
28 uint32_t timer_resolution_;
29
31
32 ~MessageLoopWin() override;
33
34 void Run() override;
35
36 void Terminate() override;
37
38 void WakeUp(fml::TimePoint time_point) override;
39
40 FML_FRIEND_MAKE_REF_COUNTED(MessageLoopWin);
41 FML_FRIEND_REF_COUNTED_THREAD_SAFE(MessageLoopWin);
42 FML_DISALLOW_COPY_AND_ASSIGN(MessageLoopWin);
43};
44
45} // namespace fml
46
47#endif // FLUTTER_FML_PLATFORM_WIN_MESSAGE_LOOP_WIN_H_
uint8_t value
static void Free(FreeList *free_list, uword address, intptr_t size, bool is_protected)
Definition: ascii_trie.cc:9
void * HANDLE
Definition: windows_types.h:36