Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
flutter_view.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_CLIENT_WRAPPER_INCLUDE_FLUTTER_FLUTTER_VIEW_H_
6#define FLUTTER_SHELL_PLATFORM_WINDOWS_CLIENT_WRAPPER_INCLUDE_FLUTTER_FLUTTER_VIEW_H_
7
8#include <flutter_windows.h>
9
10namespace flutter {
11
12// The unique identifier for a view.
13typedef int64_t FlutterViewId;
14
15// A view displaying Flutter content.
17 public:
18 explicit FlutterView(FlutterDesktopViewRef view) : view_(view) {}
19
20 // Destroys this reference to the view. The underlying view is not destroyed.
21 virtual ~FlutterView() = default;
22
23 // Prevent copying.
24 FlutterView(FlutterView const&) = delete;
26
27 // Returns the backing HWND for the view.
29
30 // Returns the DXGI adapter used for rendering or nullptr in case of error.
31 IDXGIAdapter* GetGraphicsAdapter() {
33 }
34
35 private:
36 // Handle for interacting with the C API's view.
37 FlutterDesktopViewRef view_ = nullptr;
38};
39
40} // namespace flutter
41
42#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_CLIENT_WRAPPER_INCLUDE_FLUTTER_FLUTTER_VIEW_H_
FlutterView(FlutterView const &)=delete
FlutterView(FlutterDesktopViewRef view)
IDXGIAdapter * GetGraphicsAdapter()
virtual ~FlutterView()=default
FlutterView & operator=(FlutterView const &)=delete
struct FlutterDesktopView * FlutterDesktopViewRef
int64_t FlutterViewId
HWND FlutterDesktopViewGetHWND(FlutterDesktopViewRef controller)
IDXGIAdapter * FlutterDesktopViewGetGraphicsAdapter(FlutterDesktopViewRef view)