Flutter macOS Embedder
FlutterWindowController.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_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERWINDOWCONTROLLER_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERWINDOWCONTROLLER_H_
7 
8 #import <Cocoa/Cocoa.h>
9 
12 
13 @class FlutterEngine;
14 
15 @interface FlutterWindowController : NSObject
16 
17 @property(nonatomic, weak) FlutterEngine* engine;
18 
19 @end
20 
22 
23 - (void)closeAllWindows;
24 
25 @end
26 
28  double width;
29  double height;
30 };
31 
33  double min_width;
34  double min_height;
35  double max_width;
36  double max_height;
37 };
38 
40  bool has_size;
41  struct FlutterWindowSize size;
42  bool has_constraints;
43  struct FlutterWindowConstraints constraints;
44  int64_t parent_view_id;
45  void (*on_should_close)();
46  void (*on_will_close)();
47  void (*notify_listeners)();
48 };
49 
50 extern "C" {
51 
52 // NOLINTBEGIN(google-objc-function-naming)
53 
56  int64_t engine_id,
57  const FlutterWindowCreationRequest* request);
58 
61  int64_t engine_id,
62  const FlutterWindowCreationRequest* request);
63 
65 void InternalFlutter_Window_Destroy(int64_t engine_id, void* window);
66 
68 void* InternalFlutter_Window_GetHandle(int64_t engine_id, FlutterViewIdentifier view_id);
69 
72 
74 void InternalFlutter_Window_SetContentSize(void* window, const FlutterWindowSize* size);
75 
78  const FlutterWindowConstraints* constraints);
79 
81 void InternalFlutter_Window_SetTitle(void* window, const char* title);
82 
84 void InternalFlutter_Window_SetMaximized(void* window, bool maximized);
85 
87 bool InternalFlutter_Window_IsMaximized(void* window);
88 
90 void InternalFlutter_Window_Minimize(void* window);
91 
93 void InternalFlutter_Window_Unminimize(void* window);
94 
96 bool InternalFlutter_Window_IsMinimized(void* window);
97 
99 void InternalFlutter_Window_SetFullScreen(void* window, bool fullScreen);
100 
102 bool InternalFlutter_Window_IsFullScreen(void* window);
103 
105 void InternalFlutter_Window_Activate(void* window);
106 
108 char* InternalFlutter_Window_GetTitle(void* window);
109 
111 bool InternalFlutter_Window_IsActivated(void* window);
112 
113 // NOLINTEND(google-objc-function-naming)
114 }
115 
116 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERWINDOWCONTROLLER_H_
#define FLUTTER_DARWIN_EXPORT
Definition: FlutterMacros.h:14
int64_t FlutterViewIdentifier
FLUTTER_DARWIN_EXPORT int64_t InternalFlutter_WindowController_CreateRegularWindow(int64_t engine_id, const FlutterWindowCreationRequest *request)
FLUTTER_DARWIN_EXPORT FlutterWindowSize InternalFlutter_Window_GetContentSize(void *window)
FLUTTER_DARWIN_EXPORT void InternalFlutter_Window_SetMaximized(void *window, bool maximized)
FLUTTER_DARWIN_EXPORT void InternalFlutter_Window_SetConstraints(void *window, const FlutterWindowConstraints *constraints)
FLUTTER_DARWIN_EXPORT void InternalFlutter_Window_Destroy(int64_t engine_id, void *window)
FLUTTER_DARWIN_EXPORT void InternalFlutter_Window_Unminimize(void *window)
FLUTTER_DARWIN_EXPORT void InternalFlutter_Window_SetContentSize(void *window, const FlutterWindowSize *size)
FLUTTER_DARWIN_EXPORT void InternalFlutter_Window_SetFullScreen(void *window, bool fullScreen)
FLUTTER_DARWIN_EXPORT bool InternalFlutter_Window_IsMaximized(void *window)
FLUTTER_DARWIN_EXPORT bool InternalFlutter_Window_IsMinimized(void *window)
FLUTTER_DARWIN_EXPORT char * InternalFlutter_Window_GetTitle(void *window)
FLUTTER_DARWIN_EXPORT int64_t InternalFlutter_WindowController_CreateDialogWindow(int64_t engine_id, const FlutterWindowCreationRequest *request)
FLUTTER_DARWIN_EXPORT void InternalFlutter_Window_SetTitle(void *window, const char *title)
FLUTTER_DARWIN_EXPORT void InternalFlutter_Window_Activate(void *window)
FLUTTER_DARWIN_EXPORT void * InternalFlutter_Window_GetHandle(int64_t engine_id, FlutterViewIdentifier view_id)
FLUTTER_DARWIN_EXPORT bool InternalFlutter_Window_IsFullScreen(void *window)
FLUTTER_DARWIN_EXPORT bool InternalFlutter_Window_IsActivated(void *window)
FLUTTER_DARWIN_EXPORT void InternalFlutter_Window_Minimize(void *window)