Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
host_window_popup.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_HOST_WINDOW_POPUP_H_
6#define FLUTTER_SHELL_PLATFORM_WINDOWS_HOST_WINDOW_POPUP_H_
7
8#include <cstdint>
9#include "host_window.h"
12
13namespace flutter {
16 public:
17 // Creates a popup window.
18 HostWindowPopup(WindowManager* window_manager,
20 const BoxConstraints& constraints,
21 GetWindowPositionCallback get_position_callback,
22 HWND parent);
23
24 // Update the position of the popup window based off the current size
25 // of the popup.
26 void UpdatePosition();
27
28 private:
29 void DidUpdateViewSize(int32_t width, int32_t height) override;
30 WindowRect GetWorkArea() const override;
31
32 GetWindowPositionCallback get_position_callback_;
33 HWND parent_;
34 Isolate isolate_;
35
36 // Used to track whether the view is still in tasks scheduled from raster
37 // thread.
38 std::shared_ptr<int> view_alive_;
39
40 // The current width of the popup.
41 int width_ = 0;
42
43 // The current height of the popup.
44 int height_ = 0;
45};
46} // namespace flutter
47
48#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_HOST_WINDOW_POPUP_H_
FlutterEngine engine
Definition main.cc:84
WindowRect *(* GetWindowPositionCallback)(const WindowSize &child_size, const WindowRect &parent_rect, const WindowRect &output_rect)
int32_t height
int32_t width