Flutter Windows Embedder
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
flutter_windows_internal.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_FLUTTER_WINDOWS_INTERNAL_H_
6 #define FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOWS_INTERNAL_H_
7 
9 
10 #if defined(__cplusplus)
11 extern "C" {
12 #endif
13 
14 // Declare functions that are currently in-progress and shall be exposed to the
15 // public facing API upon completion.
16 
17 // Properties for configuring a Flutter view controller.
18 typedef struct {
19  // The view's initial width.
20  int width;
21 
22  // The view's initial height.
23  int height;
25 
26 // Creates a view for the given engine.
27 //
28 // The |engine| will be started if it is not already running.
29 //
30 // The caller owns the returned reference, and is responsible for calling
31 // |FlutterDesktopViewControllerDestroy|. Returns a null pointer in the event of
32 // an error.
33 //
34 // Unlike |FlutterDesktopViewControllerCreate|, this does *not* take ownership
35 // of |engine| and |FlutterDesktopEngineDestroy| must be called to destroy
36 // the engine.
40  const FlutterDesktopViewControllerProperties* properties);
41 
42 typedef int64_t PlatformViewId;
43 
44 typedef struct {
45  size_t struct_size;
47  const char* platform_view_type;
48  // user_data may hold any necessary additional information for creating a new
49  // platform view. For example, an instance of FlutterWindow.
50  void* user_data;
53 
56 
57 typedef struct {
58  size_t struct_size;
60  void* user_data; // Arbitrary user data supplied to the creation struct.
62 
65  const char* view_type_name,
67 
68 #if defined(__cplusplus)
69 }
70 #endif
71 
72 #endif // FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOWS_INTERNAL_H_
#define FLUTTER_EXPORT
struct FlutterDesktopViewController * FlutterDesktopViewControllerRef
struct FlutterDesktopEngine * FlutterDesktopEngineRef
FLUTTER_EXPORT FlutterDesktopViewControllerRef FlutterDesktopEngineCreateViewController(FlutterDesktopEngineRef engine, const FlutterDesktopViewControllerProperties *properties)
FLUTTER_EXPORT void FlutterDesktopEngineRegisterPlatformViewType(FlutterDesktopEngineRef engine, const char *view_type_name, FlutterPlatformViewTypeEntry view_type)
HWND(* FlutterPlatformViewFactory)(const FlutterPlatformViewCreationParameters *)
int64_t PlatformViewId
size_t struct_size
void * user_data
FlutterPlatformViewFactory factory