Flutter Windows Embedder
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
8
#include "
flutter/shell/platform/windows/public/flutter_windows.h
"
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
;
24
}
FlutterDesktopViewControllerProperties
;
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.
37
FLUTTER_EXPORT
FlutterDesktopViewControllerRef
38
FlutterDesktopEngineCreateViewController
(
39
FlutterDesktopEngineRef
engine,
40
const
FlutterDesktopViewControllerProperties
* properties);
41
42
typedef
int64_t
PlatformViewId
;
43
44
typedef
struct
{
45
size_t
struct_size
;
46
HWND
parent_window
;
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
;
51
PlatformViewId
platform_view_id
;
52
}
FlutterPlatformViewCreationParameters
;
53
54
typedef
HWND (*
FlutterPlatformViewFactory
)(
55
const
FlutterPlatformViewCreationParameters
*);
56
57
typedef
struct
{
58
size_t
struct_size
;
59
FlutterPlatformViewFactory
factory
;
60
void
*
user_data
;
// Arbitrary user data supplied to the creation struct.
61
}
FlutterPlatformViewTypeEntry
;
62
63
FLUTTER_EXPORT
void
FlutterDesktopEngineRegisterPlatformViewType
(
64
FlutterDesktopEngineRef
engine,
65
const
char
* view_type_name,
66
FlutterPlatformViewTypeEntry
view_type);
67
68
#if defined(__cplusplus)
69
}
70
#endif
71
72
#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOWS_INTERNAL_H_
FlutterDesktopViewControllerProperties::height
int height
Definition:
flutter_windows_internal.h:23
FlutterPlatformViewCreationParameters::platform_view_type
const char * platform_view_type
Definition:
flutter_windows_internal.h:47
FlutterDesktopEngineCreateViewController
FLUTTER_EXPORT FlutterDesktopViewControllerRef FlutterDesktopEngineCreateViewController(FlutterDesktopEngineRef engine, const FlutterDesktopViewControllerProperties *properties)
Definition:
flutter_windows.cc:128
FlutterPlatformViewCreationParameters::struct_size
size_t struct_size
Definition:
flutter_windows_internal.h:45
FLUTTER_EXPORT
#define FLUTTER_EXPORT
Definition:
flutter_export.h:23
FlutterPlatformViewTypeEntry::struct_size
size_t struct_size
Definition:
flutter_windows_internal.h:58
PlatformViewId
int64_t PlatformViewId
Definition:
flutter_windows_internal.h:42
FlutterDesktopViewControllerProperties
Definition:
flutter_windows_internal.h:18
FlutterPlatformViewCreationParameters::user_data
void * user_data
Definition:
flutter_windows_internal.h:50
FlutterPlatformViewCreationParameters
Definition:
flutter_windows_internal.h:44
FlutterPlatformViewTypeEntry::user_data
void * user_data
Definition:
flutter_windows_internal.h:60
FlutterPlatformViewTypeEntry
Definition:
flutter_windows_internal.h:57
FlutterPlatformViewFactory
HWND(* FlutterPlatformViewFactory)(const FlutterPlatformViewCreationParameters *)
Definition:
flutter_windows_internal.h:54
FlutterDesktopEngineRef
struct FlutterDesktopEngine * FlutterDesktopEngineRef
Definition:
flutter_windows.h:33
FlutterPlatformViewCreationParameters::platform_view_id
PlatformViewId platform_view_id
Definition:
flutter_windows_internal.h:51
FlutterPlatformViewCreationParameters::parent_window
HWND parent_window
Definition:
flutter_windows_internal.h:46
FlutterDesktopViewControllerRef
struct FlutterDesktopViewController * FlutterDesktopViewControllerRef
Definition:
flutter_windows.h:25
FlutterDesktopEngineRegisterPlatformViewType
FLUTTER_EXPORT void FlutterDesktopEngineRegisterPlatformViewType(FlutterDesktopEngineRef engine, const char *view_type_name, FlutterPlatformViewTypeEntry view_type)
Definition:
flutter_windows.cc:282
FlutterPlatformViewTypeEntry::factory
FlutterPlatformViewFactory factory
Definition:
flutter_windows_internal.h:59
flutter_windows.h
FlutterDesktopViewControllerProperties::width
int width
Definition:
flutter_windows_internal.h:20
shell
platform
windows
flutter_windows_internal.h
Generated by
1.8.17