Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
Loading...
Searching...
No Matches
android_native_window.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_ANDROID_SURFACE_ANDROID_NATIVE_WINDOW_H_
6
#define FLUTTER_SHELL_PLATFORM_ANDROID_SURFACE_ANDROID_NATIVE_WINDOW_H_
7
8
#include "
flutter/fml/build_config.h
"
9
10
#include "
flutter/display_list/geometry/dl_geometry_types.h
"
11
#include "
flutter/fml/macros.h
"
12
#include "
flutter/fml/memory/ref_counted.h
"
13
14
#if FML_OS_ANDROID
15
#include <
android/native_window.h
>
16
#endif
// FML_OS_ANDROID
17
18
namespace
flutter
{
19
20
class
AndroidNativeWindow
21
:
public
fml::RefCountedThreadSafe
<AndroidNativeWindow> {
22
public
:
23
#if FML_OS_ANDROID
24
using
Handle
=
ANativeWindow
*;
25
#else
// FML_OS_ANDROID
26
using
Handle
= std::nullptr_t;
27
#endif
// FML_OS_ANDROID
28
29
bool
IsValid
()
const
;
30
31
Handle
handle
()
const
;
32
33
DlISize
GetSize
()
const
;
34
35
/// Returns true when this AndroidNativeWindow is not backed by a real window
36
/// (used for testing).
37
bool
IsFakeWindow
()
const
{
return
is_fake_window_; }
38
39
private
:
40
Handle
window_;
41
const
bool
is_fake_window_;
42
43
/// Creates a native window with the given handle. Handle ownership is assumed
44
/// by this instance of the native window.
45
explicit
AndroidNativeWindow
(
Handle
window
);
46
47
explicit
AndroidNativeWindow
(
Handle
window
,
bool
is_fake_window);
48
49
~AndroidNativeWindow
();
50
51
FML_FRIEND_MAKE_REF_COUNTED
(
AndroidNativeWindow
);
52
FML_FRIEND_REF_COUNTED_THREAD_SAFE
(
AndroidNativeWindow
);
53
FML_DISALLOW_COPY_AND_ASSIGN
(
AndroidNativeWindow
);
54
};
55
56
}
// namespace flutter
57
58
#endif
// FLUTTER_SHELL_PLATFORM_ANDROID_SURFACE_ANDROID_NATIVE_WINDOW_H_
flutter::AndroidNativeWindow
Definition
android_native_window.h:21
flutter::AndroidNativeWindow::GetSize
DlISize GetSize() const
Definition
android_native_window.cc:32
flutter::AndroidNativeWindow::IsFakeWindow
bool IsFakeWindow() const
Definition
android_native_window.h:37
flutter::AndroidNativeWindow::Handle
std::nullptr_t Handle
Definition
android_native_window.h:26
flutter::AndroidNativeWindow::handle
Handle handle() const
Definition
android_native_window.cc:28
flutter::AndroidNativeWindow::IsValid
bool IsValid() const
Definition
android_native_window.cc:24
fml::RefCountedThreadSafe
Definition
ref_counted.h:63
dl_geometry_types.h
window
GLFWwindow * window
Definition
main.cc:60
build_config.h
macros.h
FML_DISALLOW_COPY_AND_ASSIGN
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition
macros.h:27
flutter
Definition
asset_manager.cc:10
native_window.h
ref_counted.h
FML_FRIEND_REF_COUNTED_THREAD_SAFE
#define FML_FRIEND_REF_COUNTED_THREAD_SAFE(T)
Definition
ref_counted.h:126
FML_FRIEND_MAKE_REF_COUNTED
#define FML_FRIEND_MAKE_REF_COUNTED(T)
Definition
ref_counted.h:132
impeller::TSize
Definition
size.h:25
ANativeWindow
struct ANativeWindow ANativeWindow
Definition
vulkan_native_surface_android.h:12
shell
platform
android
surface
android_native_window.h
Generated on Tue Dec 2 2025 04:46:41 for Flutter Engine Uber Docs by
1.9.8