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  bool has_size;
29  double width;
30  double height;
32  double min_width;
33  double min_height;
34  double max_width;
35  double max_height;
36 };
37 
40  void (*on_close)();
41  void (*on_size_change)();
42 };
43 
45  double width;
46  double height;
47 };
48 
49 extern "C" {
50 
51 // NOLINTBEGIN(google-objc-function-naming)
52 
55  int64_t engine_id,
56  const FlutterWindowCreationRequest* request);
57 
59 void InternalFlutter_Window_Destroy(int64_t engine_id, void* window);
60 
62 void* InternalFlutter_Window_GetHandle(int64_t engine_id, FlutterViewIdentifier view_id);
63 
66 
68 void InternalFlutter_Window_SetContentSize(void* window, const FlutterWindowSizing* size);
69 
71 void InternalFlutter_Window_SetTitle(void* window, const char* title);
72 
74 void InternalFlutter_Window_SetMaximized(void* window, bool maximized);
75 
77 bool InternalFlutter_Window_IsMaximized(void* window);
78 
80 void InternalFlutter_Window_Minimize(void* window);
81 
83 void InternalFlutter_Window_Unminimize(void* window);
84 
86 bool InternalFlutter_Window_IsMinimized(void* window);
87 
89 void InternalFlutter_Window_SetFullScreen(void* window, bool fullScreen);
90 
92 bool InternalFlutter_Window_IsFullScreen(void* window);
93 
95 void InternalFlutter_Window_Activate(void* window);
96 
97 // NOLINTEND(google-objc-function-naming)
98 }
99 
100 #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_Destroy(int64_t engine_id, void *window)
FLUTTER_DARWIN_EXPORT void InternalFlutter_Window_Unminimize(void *window)
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 void InternalFlutter_Window_SetContentSize(void *window, const FlutterWindowSizing *size)
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 void InternalFlutter_Window_Minimize(void *window)