Flutter Engine
 
Loading...
Searching...
No Matches
embedder.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_EMBEDDER_EMBEDDER_H_
6#define FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_H_
7
8#include <stdbool.h>
9#include <stddef.h>
10#include <stdint.h>
11
12// This file defines an Application Binary Interface (ABI), which requires more
13// stability than regular code to remain functional for exchanging messages
14// between different versions of the embedding and the engine, to allow for both
15// forward and backward compatibility.
16//
17// Specifically,
18// - The order, type, and size of the struct members below must remain the same,
19// and members should not be removed.
20// - New structures that are part of the ABI must be defined with "size_t
21// struct_size;" as their first member, which should be initialized using
22// "sizeof(Type)".
23// - Enum values must not change or be removed.
24// - Enum members without explicit values must not be reordered.
25// - Function signatures (names, argument counts, argument order, and argument
26// type) cannot change.
27// - The core behavior of existing functions cannot change.
28// - Instead of nesting structures by value within another structure/union,
29// prefer nesting by pointer. This ensures that adding members to the nested
30// struct does not break the ABI of the parent struct/union.
31// - Instead of array of structures, prefer array of pointers to structures.
32// This ensures that array indexing does not break if members are added
33// to the structure.
34//
35// These changes are allowed:
36// - Adding new struct members at the end of a structure as long as the struct
37// is not nested within another struct by value.
38// - Adding new enum members with a new value.
39// - Renaming a struct member as long as its type, size, and intent remain the
40// same.
41// - Renaming an enum member as long as its value and intent remains the same.
42//
43// It is expected that struct members and implicitly-valued enums will not
44// always be declared in an order that is optimal for the reader, since members
45// will be added over time, and they can't be reordered.
46//
47// Existing functions should continue to appear from the caller's point of view
48// to operate as they did when they were first introduced, so introduce a new
49// function instead of modifying the core behavior of a function (and continue
50// to support the existing function with the previous behavior).
51
52#if defined(__cplusplus)
53extern "C" {
54#endif
55
56#ifndef FLUTTER_EXPORT
57#define FLUTTER_EXPORT
58#endif // FLUTTER_EXPORT
59
60#ifdef FLUTTER_API_SYMBOL_PREFIX
61#define FLUTTER_EMBEDDING_CONCAT(a, b) a##b
62#define FLUTTER_EMBEDDING_ADD_PREFIX(symbol, prefix) \
63 FLUTTER_EMBEDDING_CONCAT(prefix, symbol)
64#define FLUTTER_API_SYMBOL(symbol) \
65 FLUTTER_EMBEDDING_ADD_PREFIX(symbol, FLUTTER_API_SYMBOL_PREFIX)
66#else
67#define FLUTTER_API_SYMBOL(symbol) symbol
68#endif
69
70#define FLUTTER_ENGINE_VERSION 1
71
78
79typedef enum {
82 /// Metal is only supported on Darwin platforms (macOS / iOS).
83 /// iOS version >= 10.0 (device), 13.0 (simulator)
84 /// macOS version >= 10.14
88
89/// Additional accessibility features that may be enabled by the platform.
90/// Must match the `AccessibilityFeatures` enum in window.dart.
91typedef enum {
92 /// Indicate there is a running accessibility service which is changing the
93 /// interaction model of the device.
95 /// Indicate the platform is inverting the colors of the application.
97 /// Request that animations be disabled or simplified.
99 /// Request that text be rendered at a bold font weight.
101 /// Request that certain animations be simplified and parallax effects
102 /// removed.
104 /// Request that UI be rendered with darker colors.
106 /// Request to show on/off labels inside switches.
108 /// Indicate the platform does not support announcements.
111
112/// The set of possible actions that can be conveyed to a semantics node.
113///
114/// Must match the `SemanticsAction` enum in semantics.dart.
115typedef enum {
116 /// The equivalent of a user briefly tapping the screen with the finger
117 /// without moving it.
119 /// The equivalent of a user pressing and holding the screen with the finger
120 /// for a few seconds without moving it.
122 /// The equivalent of a user moving their finger across the screen from right
123 /// to left.
125 /// The equivalent of a user moving their finger across the screen from left
126 /// to
127 /// right.
129 /// The equivalent of a user moving their finger across the screen from bottom
130 /// to top.
132 /// The equivalent of a user moving their finger across the screen from top to
133 /// bottom.
135 /// Increase the value represented by the semantics node.
137 /// Decrease the value represented by the semantics node.
139 /// A request to fully show the semantics node on screen.
141 /// Move the cursor forward by one character.
143 /// Move the cursor backward by one character.
145 /// Set the text selection to the given range.
147 /// Copy the current selection to the clipboard.
149 /// Cut the current selection and place it in the clipboard.
151 /// Paste the current content of the clipboard.
153 /// Indicate that the node has gained accessibility focus.
155 /// Indicate that the node has lost accessibility focus.
157 /// Indicate that the user has invoked a custom accessibility action.
159 /// A request that the node should be dismissed.
161 /// Move the cursor forward by one word.
163 /// Move the cursor backward by one word.
165 /// Replace the current text in the text field.
167 /// Request that the respective focusable widget gain input focus.
169 /// Request that scrolls the current scrollable container to a given scroll
170 /// offset.
172 /// A request that the node should be expanded.
174 /// A request that the node should be collapsed.
177
178/// The set of properties that may be associated with a semantics node.
179///
180/// Must match the `SemanticsFlag` enum in semantics.dart.
181///
182/// @deprecated Use `FlutterSemanticsFlags` instead. No new flags will
183/// be added to `FlutterSemanticsFlag`. New flags will
184/// continue to be added to `FlutterSemanticsFlags`.
185typedef enum {
186 /// The semantics node has the quality of either being "checked" or
187 /// "unchecked".
189 /// Whether a semantics node is checked.
191 /// Whether a semantics node is selected.
193 /// Whether the semantic node represents a button.
195 /// Whether the semantic node represents a text field.
197 /// Whether the semantic node currently holds the user's focus.
199 /// The semantics node has the quality of either being "enabled" or
200 /// "disabled".
202 /// Whether a semantic node that hasEnabledState is currently enabled.
204 /// Whether a semantic node is in a mutually exclusive group.
206 /// Whether a semantic node is a header that divides content into sections.
208 /// Whether the value of the semantics node is obscured.
210 /// Whether the semantics node is the root of a subtree for which a route name
211 /// should be announced.
213 /// Whether the semantics node label is the name of a visually distinct route.
215 /// Whether the semantics node is considered hidden.
217 /// Whether the semantics node represents an image.
219 /// Whether the semantics node is a live region.
221 /// The semantics node has the quality of either being "on" or "off".
223 /// If true, the semantics node is "on". If false, the semantics node is
224 /// "off".
226 /// Whether the platform can scroll the semantics node when the user attempts
227 /// to move the accessibility focus to an offscreen child.
228 ///
229 /// For example, a `ListView` widget has implicit scrolling so that users can
230 /// easily move the accessibility focus to the next set of children. A
231 /// `PageView` widget does not have implicit scrolling, so that users don't
232 /// navigate to the next page when reaching the end of the current one.
234 /// Whether the value of the semantics node is coming from a multi-line text
235 /// field.
236 ///
237 /// This is used for text fields to distinguish single-line text fields from
238 /// multi-line ones.
240 /// Whether the semantic node is read only.
241 ///
242 /// Only applicable when kFlutterSemanticsFlagIsTextField flag is on.
244 /// Whether the semantic node can hold the user's focus.
246 /// Whether the semantics node represents a link.
248 /// Whether the semantics node represents a slider.
250 /// Whether the semantics node represents a keyboard key.
252 /// Whether the semantics node represents a tristate checkbox in mixed state.
254 /// The semantics node has the quality of either being "expanded" or
255 /// "collapsed".
257 /// Whether a semantic node that hasExpandedState is currently expanded.
259 /// The semantics node has the quality of either being "selected" or
260 /// "not selected".
262 /// Whether a semantics node has the quality of being required.
264 /// Whether user input is required on the semantics node before a form can be
265 /// submitted.
266 ///
267 /// Only applicable when kFlutterSemanticsFlagHasRequiredState flag is on.
270
271typedef enum {
272 /// The property is not applicable to this semantics node.
274 /// The property is applicable and its state is "true" or "on".
276 /// The property is applicable and its state is "false" or "off".
279
280typedef enum {
281 /// The semantics node does not have check state.
283 /// The semantics node is checked.
285 /// The semantics node is not checked.
287 /// The semantics node represents a checkbox in mixed state.
290
291typedef struct {
292 /// The size of this struct. Must be sizeof(FlutterSemanticsFlags).
294 /// Whether a semantics node is checked.
296 /// Whether a semantics node is selected.
298 /// Whether a semantic node is currently enabled.
300 /// If true, the semantics node is "on". If false, the semantics node is
301 /// "off".
303 /// Whether a semantic node that is currently expanded.
305 /// Whether user input is required on the semantics node before a form can be
306 /// submitted.
308 /// Whether the semantic node currently holds the user's focus.
310 /// Whether the semantic node represents a button.
312 /// Whether the semantic node represents a text field.
314 /// Whether a semantic node is in a mutually exclusive group.
316 /// Whether a semantic node is a header that divides content into sections.
318 /// Whether the value of the semantics node is obscured.
320 /// Whether the semantics node is the root of a subtree for which a route name
321 /// should be announced.
323 /// Whether the semantics node label is the name of a visually distinct route.
325 /// Whether the semantics node is considered hidden.
327 /// Whether the semantics node represents an image.
329 /// Whether the semantics node is a live region.
331 /// Whether the platform can scroll the semantics node when the user attempts
332 /// to move the accessibility focus to an offscreen child.
333 ///
334 /// For example, a `ListView` widget has implicit scrolling so that users can
335 /// easily move the accessibility focus to the next set of children. A
336 /// `PageView` widget does not have implicit scrolling, so that users don't
337 /// navigate to the next page when reaching the end of the current one.
339 /// Whether the value of the semantics node is coming from a multi-line text
340 /// field.
341 ///
342 /// This is used for text fields to distinguish single-line text fields from
343 /// multi-line ones.
345 /// Whether the semantic node is read only.
346 ///
347 /// Only applicable when kFlutterSemanticsFlagIsTextField flag is on.
349 /// Whether the semantics node represents a link.
351 /// Whether the semantics node represents a slider.
353 /// Whether the semantics node represents a keyboard key.
355 /// Whether to block a11y focus for the semantics node.
358
359typedef enum {
360 /// Text has unknown text direction.
362 /// Text is read from right to left.
364 /// Text is read from left to right.
367
368/// Valid values for priority of Thread.
369typedef enum {
370 /// Suitable for threads that shouldn't disrupt high priority work.
372 /// Default priority level.
374 /// Suitable for threads which generate data for the display.
376 /// Suitable for thread which raster data.
379
381
382/// Unique identifier for views.
383///
384/// View IDs are generated by the embedder and are
385/// opaque to the engine; the engine does not interpret view IDs in any way.
386typedef int64_t FlutterViewId;
387
388typedef struct {
389 /// horizontal scale factor
390 double scaleX;
391 /// horizontal skew factor
392 double skewX;
393 /// horizontal translation
394 double transX;
395 /// vertical skew factor
396 double skewY;
397 /// vertical scale factor
398 double scaleY;
399 /// vertical translation
400 double transY;
401 /// input x-axis perspective factor
402 double pers0;
403 /// input y-axis perspective factor
404 double pers1;
405 /// perspective scale factor
406 double pers2;
408
409typedef void (*VoidCallback)(void* /* user data */);
410
411typedef enum {
412 /// Specifies an OpenGL texture target type. Textures are specified using
413 /// the FlutterOpenGLTexture struct.
415 /// Specifies an OpenGL frame-buffer target type. Framebuffers are specified
416 /// using the FlutterOpenGLFramebuffer struct.
418 /// Specifies an OpenGL on-screen surface target type. Surfaces are specified
419 /// using the FlutterOpenGLSurface struct.
422
423/// A pixel format to be used for software rendering.
424///
425/// A single pixel always stored as a POT number of bytes. (so in practice
426/// either 1, 2, 4, 8, 16 bytes per pixel)
427///
428/// There are two kinds of pixel formats:
429/// - formats where all components are 8 bits, called array formats
430/// The component order as specified in the pixel format name is the
431/// order of the components' bytes in memory, with the leftmost component
432/// occupying the lowest memory address.
433///
434/// - all other formats are called packed formats, and the component order
435/// as specified in the format name refers to the order from most
436/// significant to least significant bits in the native type. for example,
437/// for kFlutterSoftwarePixelFormatRGB565, R occupies the 5 most significant
438/// bits, G the middle 6 bits, and B the 5 least significant bits.
439///
440/// Each pixel format in this list is documented with an example on how to get
441/// the color components from the pixel.
442/// - for packed formats, p is the pixel value as a word. For example, you can
443/// get the pixel value for a RGB565 formatted buffer like this:
444/// uint16_t p = ((const uint16_t*) allocation)[row_bytes * y / bpp + x];
445/// (with bpp being the bytes per pixel, so 2 for RGB565)
446///
447/// - for array formats, p is a pointer to the pixel value. For example, you
448/// can get the p for a RGBA8888 formatted buffer like this:
449/// const uint8_t *p = ((const uint8_t*) allocation) + row_bytes*y + x*4;
450typedef enum {
451 /// Pixel with 8 bit grayscale value.
452 /// The grayscale value is the luma value calculated from r, g, b
453 /// according to BT.709. (gray = r*0.2126 + g*0.7152 + b*0.0722)
455
456 /// Pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word.
457 /// r = (p >> 11) & 0x1F;
458 /// g = (p >> 5) & 0x3F;
459 /// b = p & 0x1F;
460 ///
461 /// On most (== little-endian) systems, this is equivalent to wayland format
462 /// RGB565 (WL_DRM_FORMAT_RGB565, WL_SHM_FORMAT_RGB565).
464
465 /// Pixel with 4 bits each for alpha, red, green, blue; in 16-bit word.
466 /// r = (p >> 8) & 0xF;
467 /// g = (p >> 4) & 0xF;
468 /// b = p & 0xF;
469 /// a = (p >> 12) & 0xF;
470 ///
471 /// On most (== little-endian) systems, this is equivalent to wayland format
472 /// RGBA4444 (WL_DRM_FORMAT_RGBA4444, WL_SHM_FORMAT_RGBA4444).
474
475 /// Pixel with 8 bits each for red, green, blue, alpha.
476 /// r = p[0];
477 /// g = p[1];
478 /// b = p[2];
479 /// a = p[3];
480 ///
481 /// This is equivalent to wayland format ABGR8888 (WL_DRM_FORMAT_ABGR8888,
482 /// WL_SHM_FORMAT_ABGR8888).
484
485 /// Pixel with 8 bits each for red, green and blue and 8 unused bits.
486 /// r = p[0];
487 /// g = p[1];
488 /// b = p[2];
489 ///
490 /// This is equivalent to wayland format XBGR8888 (WL_DRM_FORMAT_XBGR8888,
491 /// WL_SHM_FORMAT_XBGR8888).
493
494 /// Pixel with 8 bits each for blue, green, red and alpha.
495 /// r = p[2];
496 /// g = p[1];
497 /// b = p[0];
498 /// a = p[3];
499 ///
500 /// This is equivalent to wayland format ARGB8888 (WL_DRM_FORMAT_ARGB8888,
501 /// WL_SHM_FORMAT_ARGB8888).
503
504 /// Either kFlutterSoftwarePixelFormatBGRA8888 or
505 /// kFlutterSoftwarePixelFormatRGBA8888 depending on CPU endianess and OS.
508
509typedef struct {
510 /// Target texture of the active texture unit (example GL_TEXTURE_2D or
511 /// GL_TEXTURE_RECTANGLE).
512 uint32_t target;
513 /// The name of the texture.
514 uint32_t name;
515 /// The texture format (example GL_RGBA8).
516 uint32_t format;
517 /// User data to be returned on the invocation of the destruction callback.
519 /// Callback invoked (on an engine managed thread) that asks the embedder to
520 /// collect the texture.
522 /// Optional parameters for texture height/width, default is 0, non-zero means
523 /// the texture has the specified width/height. Usually, when the texture type
524 /// is GL_TEXTURE_RECTANGLE, we need to specify the texture width/height to
525 /// tell the embedder to scale when rendering.
526 /// Width of the texture.
527 size_t width;
528 /// Height of the texture.
529 size_t height;
531
532typedef struct {
533 /// The format of the color attachment of the frame-buffer. For example,
534 /// GL_RGBA8.
535 ///
536 /// In case of ambiguity when dealing with Window bound frame-buffers, 0 may
537 /// be used.
538 ///
539 /// @bug This field is incorrectly named as "target" when it actually
540 /// refers to a format.
541 uint32_t target;
542
543 /// The name of the framebuffer.
544 uint32_t name;
545
546 /// User data to be returned on the invocation of the destruction callback.
548
549 /// Callback invoked (on an engine managed thread) that asks the embedder to
550 /// collect the framebuffer.
553
554typedef bool (*FlutterOpenGLSurfaceCallback)(void* /* user data */,
555 bool* /* opengl state changed */);
556
557typedef struct {
558 /// The size of this struct. Must be sizeof(FlutterOpenGLSurface).
560
561 /// User data to be passed to the make_current, clear_current and
562 /// destruction callbacks.
564
565 /// Callback invoked (on an engine-managed thread) that asks the embedder to
566 /// make the surface current.
567 ///
568 /// Should return true if the operation succeeded, false if the surface could
569 /// not be made current and rendering should be cancelled.
570 ///
571 /// The second parameter 'opengl state changed' should be set to true if
572 /// any OpenGL API state is different than before this callback was called.
573 /// In that case, Flutter will invalidate the internal OpenGL API state cache,
574 /// which is a somewhat expensive operation.
575 ///
576 /// @attention required. (non-null)
578
579 /// Callback invoked (on an engine-managed thread) when the current surface
580 /// can be cleared.
581 ///
582 /// Should return true if the operation succeeded, false if an error ocurred.
583 /// That error will be logged but otherwise not handled by the engine.
584 ///
585 /// The second parameter 'opengl state changed' is the same as with the
586 /// @ref make_current_callback.
587 ///
588 /// The embedder might clear the surface here after it was previously made
589 /// current. That's not required however, it's also possible to clear it in
590 /// the destruction callback. There's no way to signal OpenGL state
591 /// changes in the destruction callback though.
592 ///
593 /// @attention required. (non-null)
595
596 /// Callback invoked (on an engine-managed thread) that asks the embedder to
597 /// collect the surface.
598 ///
599 /// @attention required. (non-null)
601
602 /// The surface format.
603 ///
604 /// Allowed values:
605 /// - GL_RGBA8
606 /// - GL_BGRA8_EXT
607 uint32_t format;
609
610typedef bool (*BoolCallback)(void* /* user data */);
611typedef FlutterTransformation (*TransformationCallback)(void* /* user data */);
612typedef uint32_t (*UIntCallback)(void* /* user data */);
613typedef bool (*SoftwareSurfacePresentCallback)(void* /* user data */,
614 const void* /* allocation */,
615 size_t /* row bytes */,
616 size_t /* height */);
617typedef void* (*ProcResolver)(void* /* user data */, const char* /* name */);
618typedef bool (*TextureFrameCallback)(void* /* user data */,
619 int64_t /* texture identifier */,
620 size_t /* width */,
621 size_t /* height */,
622 FlutterOpenGLTexture* /* texture out */);
623typedef void (*VsyncCallback)(void* /* user data */, intptr_t /* baton */);
624typedef void (*OnPreEngineRestartCallback)(void* /* user data */);
625
626/// A structure to represent the width and height.
627typedef struct {
628 double width;
629 double height;
631
632/// A structure to represent the width and height.
633///
634/// See: \ref FlutterSize when the value are not integers.
635typedef struct {
636 uint32_t width;
637 uint32_t height;
639
640/// A structure to represent a rectangle.
641typedef struct {
642 double left;
643 double top;
644 double right;
645 double bottom;
647
648/// A structure to represent a 2D point.
649typedef struct {
650 double x;
651 double y;
653
654/// A structure to represent a rounded rectangle.
662
663/// A structure to represent a damage region.
664typedef struct {
665 /// The size of this struct. Must be sizeof(FlutterDamage).
667 /// The number of rectangles within the damage region.
668 size_t num_rects;
669 /// The actual damage region(s) in question.
672
673/// This information is passed to the embedder when requesting a frame buffer
674/// object.
675///
676/// See: \ref FlutterOpenGLRendererConfig.fbo_with_frame_info_callback,
677/// \ref FlutterMetalRendererConfig.get_next_drawable_callback,
678/// and \ref FlutterVulkanRendererConfig.get_next_image_callback.
679typedef struct {
680 /// The size of this struct. Must be sizeof(FlutterFrameInfo).
682 /// The size of the surface that will be backed by the fbo.
685
686/// Callback for when a frame buffer object is requested.
687typedef uint32_t (*UIntFrameInfoCallback)(
688 void* /* user data */,
689 const FlutterFrameInfo* /* frame info */);
690
691/// Callback for when a frame buffer object is requested with necessary
692/// information for partial repaint.
694 void* /* user data */,
695 const intptr_t /* fbo id */,
696 FlutterDamage* /* existing damage */);
697
698/// This information is passed to the embedder when a surface is presented.
699///
700/// See: \ref FlutterOpenGLRendererConfig.present_with_info.
701typedef struct {
702 /// The size of this struct. Must be sizeof(FlutterPresentInfo).
704 /// Id of the fbo backing the surface that was presented.
705 uint32_t fbo_id;
706 /// Damage representing the area that the compositor needs to render.
708 /// Damage used to set the buffer's damage region.
711
712/// Callback for when a surface is presented.
714 void* /* user data */,
715 const FlutterPresentInfo* /* present info */);
716
717typedef struct {
718 /// The size of this struct. Must be sizeof(FlutterOpenGLRendererConfig).
722 /// Specifying one (and only one) of `present` or `present_with_info` is
723 /// required. Specifying both is an error and engine initialization will be
724 /// terminated. The return value indicates success of the present call. If
725 /// the intent is to use dirty region management, present_with_info must be
726 /// defined as present will not succeed in communicating information about
727 /// damage.
729 /// Specifying one (and only one) of the `fbo_callback` or
730 /// `fbo_with_frame_info_callback` is required. Specifying both is an error
731 /// and engine intialization will be terminated. The return value indicates
732 /// the id of the frame buffer object that flutter will obtain the gl surface
733 /// from.
735 /// This is an optional callback. Flutter will ask the emebdder to create a GL
736 /// context current on a background thread. If the embedder is able to do so,
737 /// Flutter will assume that this context is in the same sharegroup as the
738 /// main rendering context and use this context for asynchronous texture
739 /// uploads. Though optional, it is recommended that all embedders set this
740 /// callback as it will lead to better performance in texture handling.
742 /// By default, the renderer config assumes that the FBO does not change for
743 /// the duration of the engine run. If this argument is true, the
744 /// engine will ask the embedder for an updated FBO target (via an
745 /// fbo_callback invocation) after a present call.
747 /// The transformation to apply to the render target before any rendering
748 /// operations. This callback is optional.
749 /// @attention When using a custom compositor, the layer offset and sizes
750 /// will be affected by this transformation. It will be
751 /// embedder responsibility to render contents at the
752 /// transformed offset and size. This is useful for embedders
753 /// that want to render transformed contents directly into
754 /// hardware overlay planes without having to apply extra
755 /// transformations to layer contents (which may necessitate
756 /// an expensive off-screen render pass).
759 /// When the embedder specifies that a texture has a frame available, the
760 /// engine will call this method (on an internal engine managed thread) so
761 /// that external texture details can be supplied to the engine for subsequent
762 /// composition.
764 /// Specifying one (and only one) of the `fbo_callback` or
765 /// `fbo_with_frame_info_callback` is required. Specifying both is an error
766 /// and engine intialization will be terminated. The return value indicates
767 /// the id of the frame buffer object (fbo) that flutter will obtain the gl
768 /// surface from. When using this variant, the embedder is passed a
769 /// `FlutterFrameInfo` struct that indicates the properties of the surface
770 /// that flutter will acquire from the returned fbo.
772 /// Specifying one (and only one) of `present` or `present_with_info` is
773 /// required. Specifying both is an error and engine initialization will be
774 /// terminated. When using this variant, the embedder is passed a
775 /// `FlutterPresentInfo` struct that the embedder can use to release any
776 /// resources. The return value indicates success of the present call. This
777 /// callback is essential for dirty region management. If not defined, all the
778 /// pixels on the screen will be rendered at every frame (regardless of
779 /// whether damage is actually being computed or not). This is because the
780 /// information that is passed along to the callback contains the frame and
781 /// buffer damage that are essential for dirty region management.
783 /// Specifying this callback is a requirement for dirty region management.
784 /// Dirty region management will only render the areas of the screen that have
785 /// changed in between frames, greatly reducing rendering times and energy
786 /// consumption. To take advantage of these benefits, it is necessary to
787 /// define populate_existing_damage as a callback that takes user
788 /// data, an FBO ID, and an existing damage FlutterDamage. The callback should
789 /// use the given FBO ID to identify the FBO's exisiting damage (i.e. areas
790 /// that have changed since the FBO was last used) and use it to populate the
791 /// given existing damage variable. This callback is dependent on either
792 /// fbo_callback or fbo_with_frame_info_callback being defined as they are
793 /// responsible for providing populate_existing_damage with the FBO's
794 /// ID. Not specifying populate_existing_damage will result in full
795 /// repaint (i.e. rendering all the pixels on the screen at every frame).
798
799/// Alias for id<MTLDevice>.
800typedef const void* FlutterMetalDeviceHandle;
801
802/// Alias for id<MTLCommandQueue>.
804
805/// Alias for id<MTLTexture>.
806typedef const void* FlutterMetalTextureHandle;
807
808/// Pixel format for the external texture.
813
814/// YUV color space for the YUV external texture.
819
820typedef struct {
821 /// The size of this struct. Must be sizeof(FlutterMetalExternalTexture).
823 /// Height of the texture.
824 size_t width;
825 /// Height of the texture.
826 size_t height;
827 /// The pixel format type of the external.
829 /// Represents the size of the `textures` array.
831 /// Supported textures are YUVA and RGBA, in case of YUVA we expect 2 texture
832 /// handles to be provided by the embedder, Y first and UV next. In case of
833 /// RGBA only one should be passed.
834 /// These are individually aliases for id<MTLTexture>. These textures are
835 /// retained by the engine for the period of the composition. Once these
836 /// textures have been unregistered via the
837 /// `FlutterEngineUnregisterExternalTexture`, the embedder has to release
838 /// these textures.
840 /// The YUV color space of the YUV external texture.
843
844/// Callback to provide an external texture for a given texture_id.
845/// See: external_texture_frame_callback.
847 void* /* user data */,
848 int64_t /* texture identifier */,
849 size_t /* width */,
850 size_t /* height */,
851 FlutterMetalExternalTexture* /* texture out */);
852
853typedef struct {
854 /// The size of this struct. Must be sizeof(FlutterMetalTexture).
856 /// Embedder provided unique identifier to the texture buffer. Given that the
857 /// `texture` handle is passed to the engine to render to, the texture buffer
858 /// is itself owned by the embedder. This `texture_id` is then also given to
859 /// the embedder in the present callback.
860 int64_t texture_id;
861 /// Handle to the MTLTexture that is owned by the embedder. Engine will render
862 /// the frame into this texture.
863 ///
864 /// A NULL texture is considered invalid.
866 /// A baton that is not interpreted by the engine in any way. It will be given
867 /// back to the embedder in the destruction callback below. Embedder resources
868 /// may be associated with this baton.
870 /// The callback invoked by the engine when it no longer needs this backing
871 /// store.
874
875/// Callback for when a metal texture is requested.
877 void* /* user data */,
878 const FlutterFrameInfo* /* frame info */);
879
880/// Callback for when a metal texture is presented. The texture_id here
881/// corresponds to the texture_id provided by the embedder in the
882/// `FlutterMetalTextureCallback` callback.
884 void* /* user data */,
885 const FlutterMetalTexture* /* texture */);
886
887typedef struct {
888 /// The size of this struct. Must be sizeof(FlutterMetalRendererConfig).
890 /// Alias for id<MTLDevice>.
892 /// Alias for id<MTLCommandQueue>.
894 /// The callback that gets invoked when the engine requests the embedder for a
895 /// texture to render to.
896 ///
897 /// Not used if a FlutterCompositor is supplied in FlutterProjectArgs.
899 /// The callback presented to the embedder to present a fully populated metal
900 /// texture to the user.
901 ///
902 /// Not used if a FlutterCompositor is supplied in FlutterProjectArgs.
904 /// When the embedder specifies that a texture has a frame available, the
905 /// engine will call this method (on an internal engine managed thread) so
906 /// that external texture details can be supplied to the engine for subsequent
907 /// composition.
910
911/// Alias for VkInstance.
913
914/// Alias for VkPhysicalDevice.
916
917/// Alias for VkDevice.
919
920/// Alias for VkQueue.
922
923/// Alias for VkImage.
925
926typedef struct {
927 /// The size of this struct. Must be sizeof(FlutterVulkanImage).
929 /// Handle to the VkImage that is owned by the embedder. The engine will
930 /// bind this image for writing the frame.
932 /// The VkFormat of the image (for example: VK_FORMAT_R8G8B8A8_UNORM).
933 uint32_t format;
935
936/// Callback to fetch a Vulkan function pointer for a given instance. Normally,
937/// this should return the results of vkGetInstanceProcAddr.
938typedef void* (*FlutterVulkanInstanceProcAddressCallback)(
939 void* /* user data */,
940 FlutterVulkanInstanceHandle /* instance */,
941 const char* /* name */);
942
943/// Callback for when a VkImage is requested.
945 void* /* user data */,
946 const FlutterFrameInfo* /* frame info */);
947
948/// Callback for when a VkImage has been written to and is ready for use by the
949/// embedder.
951 void* /* user data */,
952 const FlutterVulkanImage* /* image */);
953
954typedef struct {
955 /// The size of this struct. Must be sizeof(FlutterVulkanRendererConfig).
957
958 /// The Vulkan API version. This should match the value set in
959 /// VkApplicationInfo::apiVersion when the VkInstance was created.
960 uint32_t version;
961 /// VkInstance handle. Must not be destroyed before `FlutterEngineShutdown` is
962 /// called.
964 /// VkPhysicalDevice handle.
966 /// VkDevice handle. Must not be destroyed before `FlutterEngineShutdown` is
967 /// called.
969 /// The queue family index of the VkQueue supplied in the next field.
971 /// VkQueue handle.
972 /// The queue should not be used without protection from a mutex to make sure
973 /// it is not used simultaneously with other threads. That mutex should match
974 /// the one injected via the |get_instance_proc_address_callback|.
975 /// There is a proposal to remove the need for the mutex at
976 /// https://github.com/flutter/flutter/issues/134573.
978 /// The number of instance extensions available for enumerating in the next
979 /// field.
981 /// Array of enabled instance extension names. This should match the names
982 /// passed to `VkInstanceCreateInfo.ppEnabledExtensionNames` when the instance
983 /// was created, but any subset of enabled instance extensions may be
984 /// specified.
985 /// This field is optional; `nullptr` may be specified.
986 /// This memory is only accessed during the call to FlutterEngineInitialize.
988 /// The number of device extensions available for enumerating in the next
989 /// field.
991 /// Array of enabled logical device extension names. This should match the
992 /// names passed to `VkDeviceCreateInfo.ppEnabledExtensionNames` when the
993 /// logical device was created, but any subset of enabled logical device
994 /// extensions may be specified.
995 /// This field is optional; `nullptr` may be specified.
996 /// This memory is only accessed during the call to FlutterEngineInitialize.
997 /// For example: VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME
999 /// The callback invoked when resolving Vulkan function pointers.
1000 /// At a bare minimum this should be used to swap out any calls that operate
1001 /// on vkQueue's for threadsafe variants that obtain locks for their duration.
1002 /// The functions to swap out are "vkQueueSubmit" and "vkQueueWaitIdle". An
1003 /// example of how to do that can be found in the test
1004 /// "EmbedderTest.CanSwapOutVulkanCalls" unit-test in
1005 /// //shell/platform/embedder/tests/embedder_vk_unittests.cc.
1007 /// The callback invoked when the engine requests a VkImage from the embedder
1008 /// for rendering the next frame.
1009 /// Not used if a FlutterCompositor is supplied in FlutterProjectArgs.
1011 /// The callback invoked when a VkImage has been written to and is ready for
1012 /// use by the embedder. Prior to calling this callback, the engine performs
1013 /// a host sync, and so the VkImage can be used in a pipeline by the embedder
1014 /// without any additional synchronization.
1015 /// Not used if a FlutterCompositor is supplied in FlutterProjectArgs.
1017
1019
1020typedef struct {
1021 /// The size of this struct. Must be sizeof(FlutterSoftwareRendererConfig).
1023 /// The callback presented to the embedder to present a fully populated buffer
1024 /// to the user. The pixel format of the buffer is the native 32-bit RGBA
1025 /// format. The buffer is owned by the Flutter engine and must be copied in
1026 /// this callback if needed.
1029
1039
1040/// Display refers to a graphics hardware system consisting of a framebuffer,
1041/// typically a monitor or a screen. This ID is unique per display and is
1042/// stable until the Flutter application restarts.
1043typedef uint64_t FlutterEngineDisplayId;
1044
1045typedef struct {
1046 /// The size of this struct. Must be sizeof(FlutterWindowMetricsEvent).
1048 /// Physical width of the window.
1049 size_t width;
1050 /// Physical height of the window.
1051 size_t height;
1052 /// Scale factor for the physical screen.
1054 /// Horizontal physical location of the left side of the window on the screen.
1055 size_t left;
1056 /// Vertical physical location of the top of the window on the screen.
1057 size_t top;
1058 /// Top inset of window.
1060 /// Right inset of window.
1062 /// Bottom inset of window.
1064 /// Left inset of window.
1066 /// The identifier of the display the view is rendering on.
1068 /// The view that this event is describing.
1069 int64_t view_id;
1071
1072typedef struct {
1073 /// The size of this struct.
1074 /// Must be sizeof(FlutterAddViewResult).
1076
1077 /// True if the add view operation succeeded.
1078 bool added;
1079
1080 /// The |FlutterAddViewInfo.user_data|.
1083
1084/// The callback invoked by the engine when the engine has attempted to add a
1085/// view.
1086///
1087/// The |FlutterAddViewResult| is only guaranteed to be valid during this
1088/// callback.
1089typedef void (*FlutterAddViewCallback)(const FlutterAddViewResult* result);
1090
1091typedef struct {
1092 /// The size of this struct.
1093 /// Must be sizeof(FlutterAddViewInfo).
1095
1096 /// The identifier for the view to add. This must be unique.
1098
1099 /// The view's properties.
1100 ///
1101 /// The metric's |view_id| must match this struct's |view_id|.
1103
1104 /// A baton that is not interpreted by the engine in any way. It will be given
1105 /// back to the embedder in |add_view_callback|. Embedder resources may be
1106 /// associated with this baton.
1108
1109 /// Called once the engine has attempted to add the view. This callback is
1110 /// required.
1111 ///
1112 /// The embedder/app must not use the view until the callback is invoked with
1113 /// an `added` value of `true`.
1114 ///
1115 /// This callback is invoked on an internal engine managed thread. Embedders
1116 /// must re-thread if necessary.
1119
1120typedef struct {
1121 /// The size of this struct.
1122 /// Must be sizeof(FlutterRemoveViewResult).
1124
1125 /// True if the remove view operation succeeded.
1127
1128 /// The |FlutterRemoveViewInfo.user_data|.
1131
1132/// The callback invoked by the engine when the engine has attempted to remove
1133/// a view.
1134///
1135/// The |FlutterRemoveViewResult| is only guaranteed to be valid during this
1136/// callback.
1138 const FlutterRemoveViewResult* /* result */);
1139
1140typedef struct {
1141 /// The size of this struct.
1142 /// Must be sizeof(FlutterRemoveViewInfo).
1144
1145 /// The identifier for the view to remove.
1146 ///
1147 /// The implicit view cannot be removed if it is enabled.
1149
1150 /// A baton that is not interpreted by the engine in any way.
1151 /// It will be given back to the embedder in |remove_view_callback|.
1152 /// Embedder resources may be associated with this baton.
1154
1155 /// Called once the engine has attempted to remove the view.
1156 /// This callback is required.
1157 ///
1158 /// The embedder must not destroy the underlying surface until the callback is
1159 /// invoked with a `removed` value of `true`.
1160 ///
1161 /// This callback is invoked on an internal engine managed thread.
1162 /// Embedders must re-thread if necessary.
1163 ///
1164 /// The |result| argument will be deallocated when the callback returns.
1167
1168/// Represents the direction in which the focus transitioned across
1169/// [FlutterView]s.
1170typedef enum {
1171 /// Indicates the focus transition did not have a direction.
1172 ///
1173 /// This is typically associated with focus being programmatically requested
1174 /// or when focus is lost.
1176
1177 /// Indicates the focus transition was performed in a forward direction.
1178 ///
1179 /// This is typically result of the user pressing tab.
1181
1182 /// Indicates the focus transition was performed in a backward direction.
1183 ///
1184 /// This is typically result of the user pressing shift + tab.
1187
1188/// Represents the focus state of a given [FlutterView].
1189typedef enum {
1190 /// Specifies that a view does not have platform focus.
1192
1193 /// Specifies that a view has platform focus.
1196
1197/// A view focus event is sent to the engine by the embedder when a native view
1198/// focus state has changed.
1199///
1200/// Passed through FlutterEngineSendViewFocusEvent.
1201typedef struct {
1202 /// The size of this struct.
1203 /// Must be sizeof(FlutterViewFocusEvent).
1205
1206 /// The identifier of the view that received the focus event.
1208
1209 /// The focus state of the view.
1211
1212 /// The direction in which the focus transitioned across [FlutterView]s.
1215
1216/// A FlutterViewFocusChangeRequest is sent by the engine to the embedder when
1217/// when a FlutterView focus state has changed and native view focus
1218/// needs to be updated.
1219///
1220/// Received in FlutterProjectArgs.view_focus_change_request_callback.
1221typedef struct {
1222 /// The size of this struct.
1223 /// Must be sizeof(FlutterViewFocusChangeRequest).
1225
1226 /// The identifier of the view that received the focus event.
1228
1229 /// The focus state of the view.
1231
1232 /// The direction in which the focus transitioned across [FlutterView]s.
1235
1236/// The phase of the pointer event.
1237typedef enum {
1239 /// The pointer, which must have been down (see kDown), is now up.
1240 ///
1241 /// For touch, this means that the pointer is no longer in contact with the
1242 /// screen. For a mouse, it means the last button was released. Note that if
1243 /// any other buttons are still pressed when one button is released, that
1244 /// should be sent as a kMove rather than a kUp.
1246 /// The pointer, which must have been up, is now down.
1247 ///
1248 /// For touch, this means that the pointer has come into contact with the
1249 /// screen. For a mouse, it means a button is now pressed. Note that if any
1250 /// other buttons are already pressed when a new button is pressed, that
1251 /// should be sent as a kMove rather than a kDown.
1253 /// The pointer moved while down.
1254 ///
1255 /// This is also used for changes in button state that don't cause a kDown or
1256 /// kUp, such as releasing one of two pressed buttons.
1258 /// The pointer is now sending input to Flutter. For instance, a mouse has
1259 /// entered the area where the Flutter content is displayed.
1260 ///
1261 /// A pointer should always be added before sending any other events.
1263 /// The pointer is no longer sending input to Flutter. For instance, a mouse
1264 /// has left the area where the Flutter content is displayed.
1265 ///
1266 /// A removed pointer should no longer send events until sending a new kAdd.
1268 /// The pointer moved while up.
1270 /// A pan/zoom started on this pointer.
1272 /// The pan/zoom updated.
1274 /// The pan/zoom ended.
1277
1278/// The device type that created a pointer event.
1285
1286/// Flags for the `buttons` field of `FlutterPointerEvent` when `device_kind`
1287/// is `kFlutterPointerDeviceKindMouse`.
1288typedef enum {
1294 /// If a mouse has more than five buttons, send higher bit shifted values
1295 /// corresponding to the button number: 1 << 5 for the 6th, etc.
1297
1298/// The type of a pointer signal.
1305
1306typedef struct {
1307 /// The size of this struct. Must be sizeof(FlutterPointerEvent).
1310 /// The timestamp at which the pointer event was generated. The timestamp
1311 /// should be specified in microseconds and the clock should be the same as
1312 /// that used by `FlutterEngineGetCurrentTime`.
1314 /// The x coordinate of the pointer event in physical pixels.
1315 double x;
1316 /// The y coordinate of the pointer event in physical pixels.
1317 double y;
1318 /// An optional device identifier. If this is not specified, it is assumed
1319 /// that the embedder has no multi-touch capability.
1320 int32_t device;
1322 /// The x offset of the scroll in physical pixels.
1324 /// The y offset of the scroll in physical pixels.
1326 /// The type of the device generating this event.
1327 /// Backwards compatibility note: If this is not set, the device will be
1328 /// treated as a mouse, with the primary button set for `kDown` and `kMove`.
1329 /// If set explicitly to `kFlutterPointerDeviceKindMouse`, you must set the
1330 /// correct buttons.
1332 /// The buttons currently pressed, if any.
1333 int64_t buttons;
1334 /// The x offset of the pan/zoom in physical pixels.
1335 double pan_x;
1336 /// The y offset of the pan/zoom in physical pixels.
1337 double pan_y;
1338 /// The scale of the pan/zoom, where 1.0 is the initial scale.
1339 double scale;
1340 /// The rotation of the pan/zoom in radians, where 0.0 is the initial angle.
1341 double rotation;
1342 /// The identifier of the view that received the pointer event.
1345
1351
1359
1360/// A structure to represent a key event.
1361///
1362/// Sending `FlutterKeyEvent` via `FlutterEngineSendKeyEvent` results in a
1363/// corresponding `FlutterKeyEvent` to be dispatched in the framework. It is
1364/// embedder's responsibility to ensure the regularity of sent events, since the
1365/// framework only performs simple one-to-one mapping. The events must conform
1366/// the following rules:
1367///
1368/// * Each key press sequence shall consist of one key down event (`kind` being
1369/// `kFlutterKeyEventTypeDown`), zero or more repeat events, and one key up
1370/// event, representing a physical key button being pressed, held, and
1371/// released.
1372/// * All events throughout a key press sequence shall have the same `physical`
1373/// and `logical`. Having different `character`s is allowed.
1374///
1375/// A `FlutterKeyEvent` with `physical` 0 and `logical` 0 is an empty event.
1376/// This is the only case either `physical` or `logical` can be 0. An empty
1377/// event must be sent if a key message should be converted to no
1378/// `FlutterKeyEvent`s, for example, when a key down message is received for a
1379/// key that has already been pressed according to the record. This is to ensure
1380/// some `FlutterKeyEvent` arrives at the framework before raw key message.
1381/// See https://github.com/flutter/flutter/issues/87230.
1382typedef struct {
1383 /// The size of this struct. Must be sizeof(FlutterKeyEvent).
1385 /// The timestamp at which the key event was generated. The timestamp should
1386 /// be specified in microseconds and the clock should be the same as that used
1387 /// by `FlutterEngineGetCurrentTime`.
1389 /// The event kind.
1391 /// The USB HID code for the physical key of the event.
1392 ///
1393 /// For the full definition and list of pre-defined physical keys, see
1394 /// `PhysicalKeyboardKey` from the framework.
1395 ///
1396 /// The only case that `physical` might be 0 is when this is an empty event.
1397 /// See `FlutterKeyEvent` for introduction.
1398 uint64_t physical;
1399 /// The key ID for the logical key of this event.
1400 ///
1401 /// For the full definition and a list of pre-defined logical keys, see
1402 /// `LogicalKeyboardKey` from the framework.
1403 ///
1404 /// The only case that `logical` might be 0 is when this is an empty event.
1405 /// See `FlutterKeyEvent` for introduction.
1406 uint64_t logical;
1407 /// Null-terminated character input from the event. Can be null. Ignored for
1408 /// up events.
1409 const char* character;
1410 /// True if this event does not correspond to a native event.
1411 ///
1412 /// The embedder is likely to skip events and/or construct new events that do
1413 /// not correspond to any native events in order to conform the regularity
1414 /// of events (as documented in `FlutterKeyEvent`). An example is when a key
1415 /// up is missed due to loss of window focus, on a platform that provides
1416 /// query to key pressing status, the embedder might realize that the key has
1417 /// been released at the next key event, and should construct a synthesized up
1418 /// event immediately before the actual event.
1419 ///
1420 /// An event being synthesized means that the `timestamp` might greatly
1421 /// deviate from the actual time when the event occurs physically.
1423 /// The source device for the key event.
1426
1427typedef void (*FlutterKeyEventCallback)(bool /* handled */,
1428 void* /* user_data */);
1429
1433
1434typedef struct {
1435 /// The size of this struct. Must be sizeof(FlutterPlatformMessage).
1437 const char* channel;
1438 const uint8_t* message;
1440 /// The response handle on which to invoke
1441 /// `FlutterEngineSendPlatformMessageResponse` when the response is ready.
1442 /// `FlutterEngineSendPlatformMessageResponse` must be called for all messages
1443 /// received by the embedder. Failure to call
1444 /// `FlutterEngineSendPlatformMessageResponse` will cause a memory leak. It is
1445 /// not safe to send multiple responses on a single response object.
1448
1450 const FlutterPlatformMessage* /* message*/,
1451 void* /* user data */);
1452
1453typedef void (*FlutterDataCallback)(const uint8_t* /* data */,
1454 size_t /* size */,
1455 void* /* user data */);
1456
1457/// The identifier of the platform view. This identifier is specified by the
1458/// application when a platform view is added to the scene via the
1459/// `SceneBuilder.addPlatformView` call.
1461
1462/// `FlutterSemanticsNode` ID used as a sentinel to signal the end of a batch of
1463/// semantics node updates. This is unused if using
1464/// `FlutterUpdateSemanticsCallback2`.
1466extern const int32_t kFlutterSemanticsNodeIdBatchEnd;
1467
1468// The enumeration of possible string attributes that affect how assistive
1469// technologies announce a string.
1470//
1471// See dart:ui's implementers of the StringAttribute abstract class.
1472typedef enum {
1473 // Indicates the string should be announced character by character.
1475 // Indicates the string should be announced using the specified locale.
1478
1479// Indicates the assistive technology should announce out the string character
1480// by character.
1481//
1482// See dart:ui's SpellOutStringAttribute.
1483typedef struct {
1484 /// The size of this struct. Must be sizeof(FlutterSpellOutStringAttribute).
1487
1488// Indicates the assistive technology should announce the string using the
1489// specified locale.
1490//
1491// See dart:ui's LocaleStringAttribute.
1492typedef struct {
1493 /// The size of this struct. Must be sizeof(FlutterLocaleStringAttribute).
1495 // The locale of this attribute.
1496 const char* locale;
1498
1499// Indicates how the assistive technology should treat the string.
1500//
1501// See dart:ui's StringAttribute.
1502typedef struct {
1503 /// The size of this struct. Must be sizeof(FlutterStringAttribute).
1505 // The position this attribute starts.
1506 size_t start;
1507 // The next position after the attribute ends.
1508 size_t end;
1509 /// The type of the attribute described by the subsequent union.
1511 union {
1512 // Indicates the string should be announced character by character.
1514 // Indicates the string should be announced using the specified locale.
1516 };
1518
1519/// A node that represents some semantic data.
1520///
1521/// The semantics tree is maintained during the semantics phase of the pipeline
1522/// (i.e., during PipelineOwner.flushSemantics), which happens after
1523/// compositing. Updates are then pushed to embedders via the registered
1524/// `FlutterUpdateSemanticsCallback`.
1525///
1526/// @deprecated Use `FlutterSemanticsNode2` instead. In order to preserve
1527/// ABI compatibility for existing users, no new fields will be
1528/// added to this struct. New fields will continue to be added
1529/// to `FlutterSemanticsNode2`.
1530typedef struct {
1531 /// The size of this struct. Must be sizeof(FlutterSemanticsNode).
1533 /// The unique identifier for this node.
1534 int32_t id;
1535 /// The set of semantics flags associated with this node.
1537 /// The set of semantics actions applicable to this node.
1539 /// The position at which the text selection originates.
1541 /// The position at which the text selection terminates.
1543 /// The total number of scrollable children that contribute to semantics.
1545 /// The index of the first visible semantic child of a scroll node.
1547 /// The current scrolling position in logical pixels if the node is
1548 /// scrollable.
1550 /// The maximum in-range value for `scrollPosition` if the node is scrollable.
1552 /// The minimum in-range value for `scrollPosition` if the node is scrollable.
1554 /// The elevation along the z-axis at which the rect of this semantics node is
1555 /// located above its parent.
1557 /// Describes how much space the semantics node takes up along the z-axis.
1559 /// A textual description of the node.
1560 const char* label;
1561 /// A brief description of the result of performing an action on the node.
1562 const char* hint;
1563 /// A textual description of the current value of the node.
1564 const char* value;
1565 /// A value that `value` will have after a kFlutterSemanticsActionIncrease`
1566 /// action has been performed.
1567 const char* increased_value;
1568 /// A value that `value` will have after a kFlutterSemanticsActionDecrease`
1569 /// action has been performed.
1570 const char* decreased_value;
1571 /// The reading direction for `label`, `value`, `hint`, `increasedValue`,
1572 /// `decreasedValue`, and `tooltip`.
1574 /// The bounding box for this node in its coordinate system.
1576 /// The transform from this node's coordinate system to its parent's
1577 /// coordinate system.
1579 /// The number of children this node has.
1581 /// Array of child node IDs in traversal order. Has length `child_count`.
1583 /// Array of child node IDs in hit test order. Has length `child_count`.
1585 /// The number of custom accessibility action associated with this node.
1587 /// Array of `FlutterSemanticsCustomAction` IDs associated with this node.
1588 /// Has length `custom_accessibility_actions_count`.
1590 /// Identifier of the platform view associated with this semantics node, or
1591 /// -1 if none.
1593 /// A textual tooltip attached to the node.
1594 const char* tooltip;
1595 /// The heading level for this node. A value of 0 means the node is not a
1596 /// heading; higher values (1, 2, …) indicate the heading rank, with lower
1597 /// numbers being higher-level headings.
1600
1601/// A node in the Flutter semantics tree.
1602///
1603/// The semantics tree is maintained during the semantics phase of the pipeline
1604/// (i.e., during PipelineOwner.flushSemantics), which happens after
1605/// compositing. Updates are then pushed to embedders via the registered
1606/// `FlutterUpdateSemanticsCallback2`.
1607///
1608/// @see https://api.flutter.dev/flutter/semantics/SemanticsNode-class.html
1609typedef struct {
1610 /// The size of this struct. Must be sizeof(FlutterSemanticsNode).
1612 /// The unique identifier for this node.
1613 int32_t id;
1614 /// The set of semantics flags associated with this node.
1615 ///
1616 /// @deprecated Use `flags2` instead. No new flags will
1617 /// be added to `FlutterSemanticsFlag`. New flags will
1618 /// continue to be added to `FlutterSemanticsFlags`.
1620 /// The set of semantics actions applicable to this node.
1622 /// The position at which the text selection originates.
1624 /// The position at which the text selection terminates.
1626 /// The total number of scrollable children that contribute to semantics.
1628 /// The index of the first visible semantic child of a scroll node.
1630 /// The current scrolling position in logical pixels if the node is
1631 /// scrollable.
1633 /// The maximum in-range value for `scrollPosition` if the node is scrollable.
1635 /// The minimum in-range value for `scrollPosition` if the node is scrollable.
1637 /// The elevation along the z-axis at which the rect of this semantics node is
1638 /// located above its parent.
1640 /// Describes how much space the semantics node takes up along the z-axis.
1642 /// A textual description of the node.
1643 const char* label;
1644 /// A brief description of the result of performing an action on the node.
1645 const char* hint;
1646 /// A textual description of the current value of the node.
1647 const char* value;
1648 /// A value that `value` will have after a kFlutterSemanticsActionIncrease`
1649 /// action has been performed.
1650 const char* increased_value;
1651 /// A value that `value` will have after a kFlutterSemanticsActionDecrease`
1652 /// action has been performed.
1653 const char* decreased_value;
1654 /// The reading direction for `label`, `value`, `hint`, `increasedValue`,
1655 /// `decreasedValue`, and `tooltip`.
1657 /// The bounding box for this node in its coordinate system.
1659 /// The transform from this node's coordinate system to its parent's
1660 /// coordinate system.
1662 /// The number of children this node has.
1664 /// Array of child node IDs in traversal order. Has length `child_count`.
1666 /// Array of child node IDs in hit test order. Has length `child_count`.
1668 /// The number of custom accessibility action associated with this node.
1670 /// Array of `FlutterSemanticsCustomAction` IDs associated with this node.
1671 /// Has length `custom_accessibility_actions_count`.
1673 /// Identifier of the platform view associated with this semantics node, or
1674 /// -1 if none.
1676 /// A textual tooltip attached to the node.
1677 const char* tooltip;
1678 // The number of string attributes associated with the `label`.
1680 // Array of string attributes associated with the `label`.
1681 // Has length `label_attribute_count`.
1683 // The number of string attributes associated with the `hint`.
1685 // Array of string attributes associated with the `hint`.
1686 // Has length `hint_attribute_count`.
1688 // The number of string attributes associated with the `value`.
1690 // Array of string attributes associated with the `value`.
1691 // Has length `value_attribute_count`.
1693 // The number of string attributes associated with the `increased_value`.
1695 // Array of string attributes associated with the `increased_value`.
1696 // Has length `increased_value_attribute_count`.
1698 // The number of string attributes associated with the `decreased_value`.
1700 // Array of string attributes associated with the `decreased_value`.
1701 // Has length `decreased_value_attribute_count`.
1703 // The set of semantics flags associated with this node. Prefer to use this
1704 // over `flags__deprecated__`.
1706 /// The heading level for this node. A value of 0 means the node is not a
1707 /// heading; higher values (1, 2, …) indicate the heading rank, with lower
1708 /// numbers being higher-level headings.
1710 /// An identifier for the semantics node in native accessibility hierarchy.
1711 /// This value should not be exposed to the users of the app.
1712 /// This is usually used for UI testing with tools that work by querying the
1713 /// native accessibility, like UI Automator, XCUITest, or Appium.
1714 const char* identifier;
1716
1717/// `FlutterSemanticsCustomAction` ID used as a sentinel to signal the end of a
1718/// batch of semantics custom action updates. This is unused if using
1719/// `FlutterUpdateSemanticsCallback2`.
1721extern const int32_t kFlutterSemanticsCustomActionIdBatchEnd;
1722
1723/// A custom semantics action, or action override.
1724///
1725/// Custom actions can be registered by applications in order to provide
1726/// semantic actions other than the standard actions available through the
1727/// `FlutterSemanticsAction` enum.
1728///
1729/// Action overrides are custom actions that the application developer requests
1730/// to be used in place of the standard actions in the `FlutterSemanticsAction`
1731/// enum.
1732///
1733/// @deprecated Use `FlutterSemanticsCustomAction2` instead. In order to
1734/// preserve ABI compatility for existing users, no new fields
1735/// will be added to this struct. New fields will continue to
1736/// be added to `FlutterSemanticsCustomAction2`.
1737typedef struct {
1738 /// The size of the struct. Must be sizeof(FlutterSemanticsCustomAction).
1740 /// The unique custom action or action override ID.
1741 int32_t id;
1742 /// For overridden standard actions, corresponds to the
1743 /// `FlutterSemanticsAction` to override.
1745 /// The user-readable name of this custom semantics action.
1746 const char* label;
1747 /// The hint description of this custom semantics action.
1748 const char* hint;
1750
1751/// A custom semantics action, or action override.
1752///
1753/// Custom actions can be registered by applications in order to provide
1754/// semantic actions other than the standard actions available through the
1755/// `FlutterSemanticsAction` enum.
1756///
1757/// Action overrides are custom actions that the application developer requests
1758/// to be used in place of the standard actions in the `FlutterSemanticsAction`
1759/// enum.
1760///
1761/// @see
1762/// https://api.flutter.dev/flutter/semantics/CustomSemanticsAction-class.html
1763typedef struct {
1764 /// The size of the struct. Must be sizeof(FlutterSemanticsCustomAction).
1766 /// The unique custom action or action override ID.
1767 int32_t id;
1768 /// For overridden standard actions, corresponds to the
1769 /// `FlutterSemanticsAction` to override.
1771 /// The user-readable name of this custom semantics action.
1772 const char* label;
1773 /// The hint description of this custom semantics action.
1774 const char* hint;
1776
1777/// A batch of updates to semantics nodes and custom actions.
1778///
1779/// @deprecated Use `FlutterSemanticsUpdate2` instead. Adding members
1780/// to `FlutterSemanticsNode` or `FlutterSemanticsCustomAction`
1781/// breaks the ABI of this struct.
1782typedef struct {
1783 /// The size of the struct. Must be sizeof(FlutterSemanticsUpdate).
1785 /// The number of semantics node updates.
1787 // Array of semantics nodes. Has length `nodes_count`.
1789 /// The number of semantics custom action updates.
1791 /// Array of semantics custom actions. Has length `custom_actions_count`.
1794
1795/// A batch of updates to semantics nodes and custom actions.
1796typedef struct {
1797 /// The size of the struct. Must be sizeof(FlutterSemanticsUpdate2).
1799 /// The number of semantics node updates.
1801 // Array of semantics node pointers. Has length `node_count`.
1803 /// The number of semantics custom action updates.
1805 /// Array of semantics custom action pointers. Has length
1806 /// `custom_action_count`.
1808 // The ID of the view that this update is associated with.
1811
1813 const FlutterSemanticsNode* /* semantics node */,
1814 void* /* user data */);
1815
1817 const FlutterSemanticsCustomAction* /* semantics custom action */,
1818 void* /* user data */);
1819
1821 const FlutterSemanticsUpdate* /* semantics update */,
1822 void* /* user data*/);
1823
1825 const FlutterSemanticsUpdate2* /* semantics update */,
1826 void* /* user data*/);
1827
1828/// An update to whether a message channel has a listener set or not.
1829typedef struct {
1830 /// The size of the struct. Must be sizeof(FlutterChannelUpdate).
1832 /// The name of the channel.
1833 const char* channel;
1834 /// True if a listener has been set, false if one has been cleared.
1837
1839 const FlutterChannelUpdate* /* channel update */,
1840 void* /* user data */);
1841
1843 const FlutterViewFocusChangeRequest* /* request */,
1844 void* /* user data */);
1845
1846typedef struct _FlutterTaskRunner* FlutterTaskRunner;
1847
1848typedef struct {
1850 uint64_t task;
1851} FlutterTask;
1852
1854 FlutterTask /* task */,
1855 uint64_t /* target time nanos */,
1856 void* /* user data */);
1857
1858/// An interface used by the Flutter engine to execute tasks at the target time
1859/// on a specified thread. There should be a 1-1 relationship between a thread
1860/// and a task runner. It is undefined behavior to run a task on a thread that
1861/// is not associated with its task runner.
1862typedef struct {
1863 /// The size of this struct. Must be sizeof(FlutterTaskRunnerDescription).
1866 /// May be called from any thread. Should return true if tasks posted on the
1867 /// calling thread will be run on that same thread.
1868 ///
1869 /// @attention This field is required.
1871 /// May be called from any thread. The given task should be executed by the
1872 /// embedder on the thread associated with that task runner by calling
1873 /// `FlutterEngineRunTask` at the given target time. The system monotonic
1874 /// clock should be used for the target time. The target time is the absolute
1875 /// time from epoch (NOT a delta) at which the task must be returned back to
1876 /// the engine on the correct thread. If the embedder needs to calculate a
1877 /// delta, `FlutterEngineGetCurrentTime` may be called and the difference used
1878 /// as the delta.
1879 ///
1880 /// @attention This field is required.
1882 /// A unique identifier for the task runner. If multiple task runners service
1883 /// tasks on the same thread, their identifiers must match.
1885 /// The callback invoked when the task runner is destroyed.
1888
1889typedef struct {
1890 /// The size of this struct. Must be sizeof(FlutterCustomTaskRunners).
1892 /// Specify the task runner for the thread on which the `FlutterEngineRun`
1893 /// call is made. The same task runner description can be specified for both
1894 /// the render and platform task runners. This makes the Flutter engine use
1895 /// the same thread for both task runners.
1897 /// Specify the task runner for the thread on which the render tasks will be
1898 /// run. The same task runner description can be specified for both the render
1899 /// and platform task runners. This makes the Flutter engine use the same
1900 /// thread for both task runners.
1902 /// Specify a callback that is used to set the thread priority for embedder
1903 /// task runners.
1904 void (*thread_priority_setter)(FlutterThreadPriority);
1905 /// Specify the task runner for the thread on which the UI tasks will be run.
1906 /// This may be same as platform_task_runner, in which case the Flutter engine
1907 /// will run the UI isolate on platform thread.
1910
1911typedef struct {
1912 /// The type of the OpenGL backing store. Currently, it can either be a
1913 /// texture or a framebuffer.
1915 union {
1916 /// A texture for Flutter to render into.
1918 /// A framebuffer for Flutter to render into. The embedder must ensure that
1919 /// the framebuffer is complete.
1921 /// A surface for Flutter to render into. Basically a wrapper around
1922 /// a closure that'll be called when the surface should be made current.
1924 };
1926
1927typedef struct {
1928 /// A pointer to the raw bytes of the allocation described by this software
1929 /// backing store.
1930 const void* allocation;
1931 /// The number of bytes in a single row of the allocation.
1933 /// The number of rows in the allocation.
1934 size_t height;
1935 /// A baton that is not interpreted by the engine in any way. It will be given
1936 /// back to the embedder in the destruction callback below. Embedder resources
1937 /// may be associated with this baton.
1939 /// The callback invoked by the engine when it no longer needs this backing
1940 /// store.
1943
1944typedef struct {
1945 /// The size of this struct. Must be sizeof(FlutterSoftwareBackingStore2).
1947 /// A pointer to the raw bytes of the allocation described by this software
1948 /// backing store.
1949 const void* allocation;
1950 /// The number of bytes in a single row of the allocation.
1952 /// The number of rows in the allocation.
1953 size_t height;
1954 /// A baton that is not interpreted by the engine in any way. It will be given
1955 /// back to the embedder in the destruction callback below. Embedder resources
1956 /// may be associated with this baton.
1958 /// The callback invoked by the engine when it no longer needs this backing
1959 /// store.
1961 /// The pixel format that the engine should use to render into the allocation.
1962 ///
1963 /// On Linux, kFlutterSoftwarePixelFormatBGRA8888 is most commonly used.
1966
1967typedef struct {
1968 /// The size of this struct. Must be sizeof(FlutterMetalBackingStore).
1970 union {
1971 // A Metal texture for Flutter to render into. Ownership is not transferred
1972 // to Flutter; the texture is CFRetained on successfully being passed in and
1973 // CFReleased when no longer used.
1975 };
1977
1978typedef struct {
1979 /// The size of this struct. Must be sizeof(FlutterVulkanBackingStore).
1981 /// The image that the layer will be rendered to. This image must already be
1982 /// available for the engine to bind for writing when it's given to the engine
1983 /// via the backing store creation callback. The engine will perform a host
1984 /// sync for all layers prior to calling the compositor present callback, and
1985 /// so the written layer images can be freely bound by the embedder without
1986 /// any additional synchronization.
1988 /// A baton that is not interpreted by the engine in any way. It will be given
1989 /// back to the embedder in the destruction callback below. Embedder resources
1990 /// may be associated with this baton.
1992 /// The callback invoked by the engine when it no longer needs this backing
1993 /// store.
1996
1997typedef enum {
1998 /// Indicates that the Flutter application requested that an opacity be
1999 /// applied to the platform view.
2001 /// Indicates that the Flutter application requested that the platform view be
2002 /// clipped using a rectangle.
2004 /// Indicates that the Flutter application requested that the platform view be
2005 /// clipped using a rounded rectangle.
2007 /// Indicates that the Flutter application requested that the platform view be
2008 /// transformed before composition.
2011
2012typedef struct {
2013 /// The type of the mutation described by the subsequent union.
2015 union {
2016 double opacity;
2020 };
2022
2023typedef struct {
2024 /// The size of this struct. Must be sizeof(FlutterPlatformView).
2026 /// The identifier of this platform view. This identifier is specified by the
2027 /// application when a platform view is added to the scene via the
2028 /// `SceneBuilder.addPlatformView` call.
2030 /// The number of mutations to be applied to the platform view by the embedder
2031 /// before on-screen composition.
2033 /// The mutations to be applied by this platform view before it is composited
2034 /// on-screen. The Flutter application may transform the platform view but
2035 /// these transformations cannot be affected by the Flutter compositor because
2036 /// it does not render platform views. Since the embedder is responsible for
2037 /// composition of these views, it is also the embedder's responsibility to
2038 /// affect the appropriate transformation.
2039 ///
2040 /// The mutations must be applied in order. The mutations done in the
2041 /// collection don't take into account the device pixel ratio or the root
2042 /// surface transformation. If these exist, the first mutation in the list
2043 /// will be a transformation mutation to make sure subsequent mutations are in
2044 /// the correct coordinate space.
2047
2048typedef enum {
2049 /// Specifies an OpenGL backing store. Can either be an OpenGL texture or
2050 /// framebuffer.
2052 /// Specified an software allocation for Flutter to render into using the CPU.
2054 /// Specifies a Metal backing store. This is backed by a Metal texture.
2056 /// Specifies a Vulkan backing store. This is backed by a Vulkan VkImage.
2058 /// Specifies a allocation that the engine should render into using
2059 /// software rendering.
2062
2063typedef struct {
2064 /// The size of this struct. Must be sizeof(FlutterBackingStore).
2066 /// A baton that is not interpreted by the engine in any way. The embedder may
2067 /// use this to associate resources that are tied to the lifecycle of the
2068 /// `FlutterBackingStore`.
2070 /// Specifies the type of backing store.
2072 /// Indicates if this backing store was updated since the last time it was
2073 /// associated with a presented layer.
2075 union {
2076 /// The description of the OpenGL backing store.
2078 /// The description of the software backing store.
2080 /// The description of the software backing store.
2082 // The description of the Metal backing store.
2084 // The description of the Vulkan backing store.
2086 };
2088
2089typedef struct {
2090 /// The size of this struct. Must be sizeof(FlutterBackingStoreConfig).
2092 /// The size of the render target the engine expects to render into.
2094 /// The identifier for the view that the engine will use this backing store to
2095 /// render into.
2098
2099typedef enum {
2100 /// Indicates that the contents of this layer are rendered by Flutter into a
2101 /// backing store.
2103 /// Indicates that the contents of this layer are determined by the embedder.
2106
2107/// A region represented by a collection of non-overlapping rectangles.
2108typedef struct {
2109 /// The size of this struct. Must be sizeof(FlutterRegion).
2111 /// Number of rectangles in the region.
2113 /// The rectangles that make up the region.
2116
2117/// Contains additional information about the backing store provided
2118/// during presentation to the embedder.
2119typedef struct {
2120 /// The size of this struct. Must be sizeof(FlutterBackingStorePresentInfo).
2122
2123 /// The area of the backing store that contains Flutter contents. Pixels
2124 /// outside of this area are transparent and the embedder may choose not
2125 /// to render them. Coordinates are in physical pixels.
2128
2129typedef struct {
2130 /// This size of this struct. Must be sizeof(FlutterLayer).
2132 /// Each layer displays contents in one way or another. The type indicates
2133 /// whether those contents are specified by Flutter or the embedder.
2135 union {
2136 /// Indicates that the contents of this layer are rendered by Flutter into a
2137 /// backing store.
2139 /// Indicates that the contents of this layer are determined by the
2140 /// embedder.
2142 };
2143 /// The offset of this layer (in physical pixels) relative to the top left of
2144 /// the root surface used by the engine.
2146 /// The size of the layer (in physical pixels).
2148
2149 /// Extra information for the backing store that the embedder may
2150 /// use during presentation.
2152
2153 // Time in nanoseconds at which this frame is scheduled to be presented. 0 if
2154 // not known. See FlutterEngineGetCurrentTime().
2156} FlutterLayer;
2157
2158typedef struct {
2159 /// The size of this struct.
2160 /// Must be sizeof(FlutterPresentViewInfo).
2162
2163 /// The identifier of the target view.
2165
2166 /// The layers that should be composited onto the view.
2168
2169 /// The count of layers.
2171
2172 /// The |FlutterCompositor.user_data|.
2175
2177 const FlutterBackingStoreConfig* config,
2178 FlutterBackingStore* backing_store_out,
2179 void* user_data);
2180
2182 const FlutterBackingStore* renderer,
2183 void* user_data);
2184
2186 size_t layers_count,
2187 void* user_data);
2188
2189/// The callback invoked when the embedder should present to a view.
2190///
2191/// The |FlutterPresentViewInfo| will be deallocated once the callback returns.
2193 const FlutterPresentViewInfo* /* present info */);
2194
2195typedef struct {
2196 /// This size of this struct. Must be sizeof(FlutterCompositor).
2198 /// A baton that in not interpreted by the engine in any way. If it passed
2199 /// back to the embedder in `FlutterCompositor.create_backing_store_callback`,
2200 /// `FlutterCompositor.collect_backing_store_callback`,
2201 /// `FlutterCompositor.present_layers_callback`, and
2202 /// `FlutterCompositor.present_view_callback`.
2204 /// A callback invoked by the engine to obtain a backing store for a specific
2205 /// `FlutterLayer`.
2206 ///
2207 /// On ABI stability: Callers must take care to restrict access within
2208 /// `FlutterBackingStore::struct_size` when specifying a new backing store to
2209 /// the engine. This only matters if the embedder expects to be used with
2210 /// engines older than the version whose headers it used during compilation.
2211 ///
2212 /// The callback should return true if the operation was successful.
2214 /// A callback invoked by the engine to release the backing store. The
2215 /// embedder may collect any resources associated with the backing store.
2216 ///
2217 /// The callback should return true if the operation was successful.
2219 /// Callback invoked by the engine to composite the contents of each layer
2220 /// onto the implicit view.
2221 ///
2222 /// DEPRECATED: Use `present_view_callback` to support multiple views.
2223 /// If this callback is provided, `FlutterEngineAddView` and
2224 /// `FlutterEngineRemoveView` should not be used.
2225 ///
2226 /// Only one of `present_layers_callback` and `present_view_callback` may be
2227 /// provided. Providing both is an error and engine initialization will
2228 /// terminate.
2229 ///
2230 /// The callback should return true if the operation was successful.
2232 /// Avoid caching backing stores provided by this compositor.
2233 ///
2234 /// The engine has an internal backing store cache. Instead of
2235 /// creating & destroying backing stores for every frame, created
2236 /// backing stores are automatically reused for subsequent frames.
2237 ///
2238 /// If you wish to change this behavior and destroy backing stores after
2239 /// they've been used once, and create new backing stores for every frame,
2240 /// you can set this bool to true.
2242 /// Callback invoked by the engine to composite the contents of each layer
2243 /// onto the specified view.
2244 ///
2245 /// Only one of `present_layers_callback` and `present_view_callback` may be
2246 /// provided. Providing both is an error and engine initialization will
2247 /// terminate.
2248 ///
2249 /// The callback should return true if the operation was successful.
2252
2253typedef struct {
2254 /// This size of this struct. Must be sizeof(FlutterLocale).
2256 /// The language code of the locale. For example, "en". This is a required
2257 /// field. The string must be null terminated. It may be collected after the
2258 /// call to `FlutterEngineUpdateLocales`.
2259 const char* language_code;
2260 /// The country code of the locale. For example, "US". This is a an optional
2261 /// field. The string must be null terminated if present. It may be collected
2262 /// after the call to `FlutterEngineUpdateLocales`. If not present, a
2263 /// `nullptr` may be specified.
2264 const char* country_code;
2265 /// The script code of the locale. This is a an optional field. The string
2266 /// must be null terminated if present. It may be collected after the call to
2267 /// `FlutterEngineUpdateLocales`. If not present, a `nullptr` may be
2268 /// specified.
2269 const char* script_code;
2270 /// The variant code of the locale. This is a an optional field. The string
2271 /// must be null terminated if present. It may be collected after the call to
2272 /// `FlutterEngineUpdateLocales`. If not present, a `nullptr` may be
2273 /// specified.
2274 const char* variant_code;
2276
2277/// Callback that returns the system locale.
2278///
2279/// Embedders that implement this callback should return the `FlutterLocale`
2280/// from the `supported_locales` list that most closely matches the
2281/// user/device's preferred locale.
2282///
2283/// This callback does not currently provide the user_data baton.
2284/// https://github.com/flutter/flutter/issues/79826
2285typedef const FlutterLocale* (*FlutterComputePlatformResolvedLocaleCallback)(
2286 const FlutterLocale** /* supported_locales*/,
2287 size_t /* Number of locales*/);
2288
2289typedef struct {
2290 /// The size of this struct. Must be sizeof(FlutterEngineDisplay).
2292
2294
2295 /// This is set to true if the embedder only has one display. In cases where
2296 /// this is set to true, the value of display_id is ignored. In cases where
2297 /// this is not set to true, it is expected that a valid display_id be
2298 /// provided.
2300
2301 /// This represents the refresh period in frames per second. This value may be
2302 /// zero if the device is not running or unavailable or unknown.
2304
2305 /// The width of the display, in physical pixels.
2306 size_t width;
2307
2308 /// The height of the display, in physical pixels.
2309 size_t height;
2310
2311 /// The pixel ratio of the display, which is used to convert physical pixels
2312 /// to logical pixels.
2315
2316/// The update type parameter that is passed to
2317/// `FlutterEngineNotifyDisplayUpdate`.
2318typedef enum {
2319 /// `FlutterEngineDisplay`s that were active during start-up. A display is
2320 /// considered active if:
2321 /// 1. The frame buffer hardware is connected.
2322 /// 2. The display is drawable, e.g. it isn't being mirrored from another
2323 /// connected display or sleeping.
2327
2329
2341
2342typedef struct {
2343 /// The size of this struct. Must be sizeof(FlutterEngineDartBuffer).
2345 /// An opaque baton passed back to the embedder when the
2346 /// buffer_collect_callback is invoked. The engine does not interpret this
2347 /// field in any way.
2349 /// This is an optional field.
2350 ///
2351 /// When specified, the engine will assume that the buffer is owned by the
2352 /// embedder. When the data is no longer needed by any isolate, this callback
2353 /// will be made on an internal engine managed thread. The embedder is free to
2354 /// collect the buffer here. When this field is specified, it is the embedders
2355 /// responsibility to keep the buffer alive and not modify it till this
2356 /// callback is invoked by the engine. The user data specified in the callback
2357 /// is the value of `user_data` field in this struct.
2358 ///
2359 /// When NOT specified, the VM creates an internal copy of the buffer. The
2360 /// caller is free to modify the buffer as necessary or collect it immediately
2361 /// after the call to `FlutterEnginePostDartObject`.
2362 ///
2363 /// @attention The buffer_collect_callback is will only be invoked by the
2364 /// engine when the `FlutterEnginePostDartObject` method
2365 /// returns kSuccess. In case of non-successful calls to this
2366 /// method, it is the embedders responsibility to collect the
2367 /// buffer.
2369 /// A pointer to the bytes of the buffer. When the buffer is owned by the
2370 /// embedder (by specifying the `buffer_collect_callback`), Dart code may
2371 /// modify that embedder owned buffer. For this reason, it is important that
2372 /// this buffer not have page protections that restrict writing to this
2373 /// buffer.
2374 uint8_t* buffer;
2375 /// The size of the buffer.
2378
2379/// This struct specifies the native representation of a Dart object that can be
2380/// sent via a send port to any isolate in the VM that has the corresponding
2381/// receive port.
2382///
2383/// All fields in this struct are copied out in the call to
2384/// `FlutterEnginePostDartObject` and the caller is free to reuse or collect
2385/// this struct after that call.
2386typedef struct {
2388 union {
2393 /// A null terminated string. This string will be copied by the VM in the
2394 /// call to `FlutterEnginePostDartObject` and must be collected by the
2395 /// embedder after that call is made.
2396 const char* string_value;
2398 };
2400
2401/// This enum allows embedders to determine the type of the engine thread in the
2402/// FlutterNativeThreadCallback. Based on the thread type, the embedder may be
2403/// able to tweak the thread priorities for optimum performance.
2404typedef enum {
2405 /// The Flutter Engine considers the thread on which the FlutterEngineRun call
2406 /// is made to be the platform thread. There is only one such thread per
2407 /// engine instance.
2409 /// This is the thread the Flutter Engine uses to execute rendering commands
2410 /// based on the selected client rendering API. There is only one such thread
2411 /// per engine instance.
2413 /// This is a dedicated thread on which the root Dart isolate is serviced.
2414 /// There is only one such thread per engine instance.
2416 /// Multiple threads are used by the Flutter engine to perform long running
2417 /// background tasks.
2420
2421/// A callback made by the engine in response to
2422/// `FlutterEnginePostCallbackOnAllNativeThreads` on all internal thread.
2424 void* user_data);
2425
2426/// AOT data source type.
2430
2431/// This struct specifies one of the various locations the engine can look for
2432/// AOT data sources.
2433typedef struct {
2435 union {
2436 /// Absolute path to an ELF library file.
2437 const char* elf_path;
2438 };
2440
2441// Logging callback for Dart application messages.
2442//
2443// The `tag` parameter contains a null-terminated string containing a logging
2444// tag or component name that can be used to identify system log messages from
2445// the app. The `message` parameter contains a null-terminated string
2446// containing the message to be logged. `user_data` is a user data baton passed
2447// in `FlutterEngineRun`.
2448typedef void (*FlutterLogMessageCallback)(const char* /* tag */,
2449 const char* /* message */,
2450 void* /* user_data */);
2451
2452/// An opaque object that describes the AOT data that can be used to launch a
2453/// FlutterEngine instance in AOT mode.
2455
2456typedef struct {
2457 /// The size of this struct. Must be sizeof(FlutterProjectArgs).
2459 /// The path to the Flutter assets directory containing project assets. The
2460 /// string can be collected after the call to `FlutterEngineRun` returns. The
2461 /// string must be NULL terminated.
2462 const char* assets_path;
2463 /// The path to the Dart file containing the `main` entry point.
2464 /// The string can be collected after the call to `FlutterEngineRun` returns.
2465 /// The string must be NULL terminated.
2466 ///
2467 /// @deprecated As of Dart 2, running from Dart source is no longer
2468 /// supported. Dart code should now be compiled to kernel form
2469 /// and will be loaded by from `kernel_blob.bin` in the assets
2470 /// directory. This struct member is retained for ABI
2471 /// stability.
2473 /// The path to the `.packages` file for the project. The string can be
2474 /// collected after the call to `FlutterEngineRun` returns. The string must be
2475 /// NULL terminated.
2476 ///
2477 /// @deprecated As of Dart 2, running from Dart source is no longer
2478 /// supported. Dart code should now be compiled to kernel form
2479 /// and will be loaded by from `kernel_blob.bin` in the assets
2480 /// directory. This struct member is retained for ABI
2481 /// stability.
2483 /// The path to the `icudtl.dat` file for the project. The string can be
2484 /// collected after the call to `FlutterEngineRun` returns. The string must
2485 /// be NULL terminated.
2486 const char* icu_data_path;
2487 /// The command line argument count used to initialize the project.
2489 /// The command line arguments used to initialize the project. The strings can
2490 /// be collected after the call to `FlutterEngineRun` returns. The strings
2491 /// must be `NULL` terminated.
2492 ///
2493 /// @attention The first item in the command line (if specified at all) is
2494 /// interpreted as the executable name. So if an engine flag
2495 /// needs to be passed into the same, it needs to not be the
2496 /// very first item in the list.
2497 ///
2498 /// The set of engine flags are only meant to control
2499 /// unstable features in the engine. Deployed applications should not pass any
2500 /// command line arguments at all as they may affect engine stability at
2501 /// runtime in the presence of un-sanitized input. The list of currently
2502 /// recognized engine flags and their descriptions can be retrieved from the
2503 /// `switches.h` engine source file.
2504 const char* const* command_line_argv;
2505 /// The callback invoked by the engine in order to give the embedder the
2506 /// chance to respond to platform messages from the Dart application.
2507 /// The callback will be invoked on the thread on which the `FlutterEngineRun`
2508 /// call is made. The second parameter, `user_data`, is supplied when
2509 /// `FlutterEngineRun` or `FlutterEngineInitialize` is called.
2511 /// The VM snapshot data buffer used in AOT operation. This buffer must be
2512 /// mapped in as read-only. For more information refer to the documentation on
2513 /// the Wiki at
2514 /// https://github.com/flutter/flutter/wiki/Flutter-engine-operation-in-AOT-Mode
2515 const uint8_t* vm_snapshot_data;
2516 /// The size of the VM snapshot data buffer. If vm_snapshot_data is a symbol
2517 /// reference, 0 may be passed here.
2519 /// The VM snapshot instructions buffer used in AOT operation. This buffer
2520 /// must be mapped in as read-execute. For more information refer to the
2521 /// documentation on the Wiki at
2522 /// https://github.com/flutter/flutter/wiki/Flutter-engine-operation-in-AOT-Mode
2524 /// The size of the VM snapshot instructions buffer. If
2525 /// vm_snapshot_instructions is a symbol reference, 0 may be passed here.
2527 /// The isolate snapshot data buffer used in AOT operation. This buffer must
2528 /// be mapped in as read-only. For more information refer to the documentation
2529 /// on the Wiki at
2530 /// https://github.com/flutter/flutter/wiki/Flutter-engine-operation-in-AOT-Mode
2532 /// The size of the isolate snapshot data buffer. If isolate_snapshot_data is
2533 /// a symbol reference, 0 may be passed here.
2535 /// The isolate snapshot instructions buffer used in AOT operation. This
2536 /// buffer must be mapped in as read-execute. For more information refer to
2537 /// the documentation on the Wiki at
2538 /// https://github.com/flutter/flutter/wiki/Flutter-engine-operation-in-AOT-Mode
2540 /// The size of the isolate snapshot instructions buffer. If
2541 /// isolate_snapshot_instructions is a symbol reference, 0 may be passed here.
2543 /// The callback invoked by the engine in root isolate scope. Called
2544 /// immediately after the root isolate has been created and marked runnable.
2546 /// The legacy callback invoked by the engine in order to give the embedder
2547 /// the chance to respond to semantics node updates from the Dart application.
2548 /// Semantics node updates are sent in batches terminated by a 'batch end'
2549 /// callback that is passed a sentinel `FlutterSemanticsNode` whose `id` field
2550 /// has the value `kFlutterSemanticsNodeIdBatchEnd`.
2551 ///
2552 /// The callback will be invoked on the thread on which the `FlutterEngineRun`
2553 /// call is made.
2554 ///
2555 /// @deprecated Use `update_semantics_callback2` instead. Only one of
2556 /// `update_semantics_node_callback`,
2557 /// `update_semantics_callback`, and
2558 /// `update_semantics_callback2` may be provided; the others
2559 /// should be set to null.
2560 ///
2561 /// This callback is incompatible with multiple views. If this
2562 /// callback is provided, `FlutterEngineAddView` and
2563 /// `FlutterEngineRemoveView` should not be used.
2565 /// The legacy callback invoked by the engine in order to give the embedder
2566 /// the chance to respond to updates to semantics custom actions from the Dart
2567 /// application. Custom action updates are sent in batches terminated by a
2568 /// 'batch end' callback that is passed a sentinel
2569 /// `FlutterSemanticsCustomAction` whose `id` field has the value
2570 /// `kFlutterSemanticsCustomActionIdBatchEnd`.
2571 ///
2572 /// The callback will be invoked on the thread on which the `FlutterEngineRun`
2573 /// call is made.
2574 ///
2575 /// @deprecated Use `update_semantics_callback2` instead. Only one of
2576 /// `update_semantics_node_callback`,
2577 /// `update_semantics_callback`, and
2578 /// `update_semantics_callback2` may be provided; the others
2579 /// should be set to null.
2580 ///
2581 /// This callback is incompatible with multiple views. If this
2582 /// callback is provided, `FlutterEngineAddView` and
2583 /// `FlutterEngineRemoveView` should not be used.
2586 /// Path to a directory used to store data that is cached across runs of a
2587 /// Flutter application (such as compiled shader programs used by Skia).
2588 /// This is optional. The string must be NULL terminated.
2589 ///
2590 // This is different from the cache-path-dir argument defined in switches.h,
2591 // which is used in `flutter::Settings` as `temp_directory_path`.
2593
2594 /// If true, the engine would only read the existing cache, but not write new
2595 /// ones.
2597
2598 /// A callback that gets invoked by the engine when it attempts to wait for a
2599 /// platform vsync event. The engine will give the platform a baton that needs
2600 /// to be returned back to the engine via `FlutterEngineOnVsync`. All batons
2601 /// must be retured to the engine before initializing a
2602 /// `FlutterEngineShutdown`. Not doing the same will result in a memory leak.
2603 /// While the call to `FlutterEngineOnVsync` must occur on the thread that
2604 /// made the call to `FlutterEngineRun`, the engine will make this callback on
2605 /// an internal engine-managed thread. If the components accessed on the
2606 /// embedder are not thread safe, the appropriate re-threading must be done.
2608
2609 /// The name of a custom Dart entrypoint. This is optional and specifying a
2610 /// null or empty entrypoint makes the engine look for a method named "main"
2611 /// in the root library of the application.
2612 ///
2613 /// Care must be taken to ensure that the custom entrypoint is not tree-shaken
2614 /// away. Usually, this is done using the `@pragma('vm:entry-point')`
2615 /// decoration.
2617
2618 /// Typically the Flutter engine create and manages its internal threads. This
2619 /// optional argument allows for the specification of task runner interfaces
2620 /// to event loops managed by the embedder on threads it creates.
2622
2623 /// All `FlutterEngine` instances in the process share the same Dart VM. When
2624 /// the first engine is launched, it starts the Dart VM as well. It used to be
2625 /// the case that it was not possible to shutdown the Dart VM cleanly and
2626 /// start it back up in the process in a safe manner. This issue has since
2627 /// been patched. Unfortunately, applications already began to make use of the
2628 /// fact that shutting down the Flutter engine instance left a running VM in
2629 /// the process. Since a Flutter engine could be launched on any thread,
2630 /// applications would "warm up" the VM on another thread by launching
2631 /// an engine with no isolates and then shutting it down immediately. The main
2632 /// Flutter application could then be started on the main thread without
2633 /// having to incur the Dart VM startup costs at that time. With the new
2634 /// behavior, this "optimization" immediately becomes massive performance
2635 /// pessimization as the VM would be started up in the "warm up" phase, shut
2636 /// down there and then started again on the main thread. Changing this
2637 /// behavior was deemed to be an unacceptable breaking change. Embedders that
2638 /// wish to shutdown the Dart VM when the last engine is terminated in the
2639 /// process should opt into this behavior by setting this flag to true.
2641
2642 /// Typically, Flutter renders the layer hierarchy into a single root surface.
2643 /// However, when embedders need to interleave their own contents within the
2644 /// Flutter layer hierarchy, their applications can push platform views within
2645 /// the Flutter scene. This is done using the `SceneBuilder.addPlatformView`
2646 /// call. When this happens, the Flutter rasterizer divides the effective view
2647 /// hierarchy into multiple layers. Each layer gets its own backing store and
2648 /// Flutter renders into the same. Once the layers contents have been
2649 /// fulfilled, the embedder is asked to composite these layers on-screen. At
2650 /// this point, it can interleave its own contents within the effective
2651 /// hierarchy. The interface for the specification of these layer backing
2652 /// stores and the hooks to listen for the composition of layers on-screen can
2653 /// be controlled using this field. This field is completely optional. In its
2654 /// absence, platforms views in the scene are ignored and Flutter renders to
2655 /// the root surface as normal.
2657
2658 /// Max size of the old gen heap for the Dart VM in MB, or 0 for unlimited, -1
2659 /// for default value.
2660 ///
2661 /// See also:
2662 /// https://github.com/dart-lang/sdk/blob/ca64509108b3e7219c50d6c52877c85ab6a35ff2/runtime/vm/flag_list.h#L150
2664
2665 /// The AOT data to be used in AOT operation.
2666 ///
2667 /// Embedders should instantiate and destroy this object via the
2668 /// FlutterEngineCreateAOTData and FlutterEngineCollectAOTData methods.
2669 ///
2670 /// Embedders can provide either snapshot buffers or aot_data, but not both.
2672
2673 /// A callback that computes the locale the platform would natively resolve
2674 /// to.
2675 ///
2676 /// The input parameter is an array of FlutterLocales which represent the
2677 /// locales supported by the app. One of the input supported locales should
2678 /// be selected and returned to best match with the user/device's preferred
2679 /// locale. The implementation should produce a result that as closely
2680 /// matches what the platform would natively resolve to as possible.
2683
2684 /// The command line argument count for arguments passed through to the Dart
2685 /// entrypoint.
2687
2688 /// The command line arguments passed through to the Dart entrypoint. The
2689 /// strings must be `NULL` terminated.
2690 ///
2691 /// The strings will be copied out and so any strings passed in here can
2692 /// be safely collected after initializing the engine with
2693 /// `FlutterProjectArgs`.
2694 const char* const* dart_entrypoint_argv;
2695
2696 // Logging callback for Dart application messages.
2697 //
2698 // This callback is used by embedder to log print messages from the running
2699 // Flutter application. This callback is made on an internal engine managed
2700 // thread and embedders must re-thread if necessary. Performing blocking calls
2701 // in this callback may introduce application jank.
2703
2704 // A tag string associated with application log messages.
2705 //
2706 // A log message tag string that can be used convey application, subsystem,
2707 // or component name to embedder's logger. This string will be passed to to
2708 // callbacks on `log_message_callback`. Defaults to "flutter" if unspecified.
2709 const char* log_tag;
2710
2711 // A callback that is invoked right before the engine is restarted.
2712 //
2713 // This optional callback is typically used to reset states to as if the
2714 // engine has just been started, and usually indicates the user has requested
2715 // a hot restart (Shift-R in the Flutter CLI.) It is not called the first time
2716 // the engine starts.
2717 //
2718 // The first argument is the `user_data` from `FlutterEngineInitialize`.
2720
2721 /// The callback invoked by the engine in order to give the embedder the
2722 /// chance to respond to updates to semantics nodes and custom actions from
2723 /// the Dart application.
2724 ///
2725 /// The callback will be invoked on the thread on which the `FlutterEngineRun`
2726 /// call is made.
2727 ///
2728 /// @deprecated Use `update_semantics_callback2` instead. Only one of
2729 /// `update_semantics_node_callback`,
2730 /// `update_semantics_callback`, and
2731 /// `update_semantics_callback2` may be provided; the others
2732 /// must be set to null.
2733 ///
2734 /// This callback is incompatible with multiple views. If this
2735 /// callback is provided, `FlutterEngineAddView` and
2736 /// `FlutterEngineRemoveView` should not be used.
2738
2739 /// The callback invoked by the engine in order to give the embedder the
2740 /// chance to respond to updates to semantics nodes and custom actions from
2741 /// the Dart application.
2742 ///
2743 /// The callback will be invoked on the thread on which the `FlutterEngineRun`
2744 /// call is made.
2745 ///
2746 /// Only one of `update_semantics_node_callback`, `update_semantics_callback`,
2747 /// and `update_semantics_callback2` may be provided; the others must be set
2748 /// to null.
2750
2751 /// The callback invoked by the engine in response to a channel listener
2752 /// being registered on the framework side. The callback is invoked from
2753 /// a task posted to the platform thread.
2755
2756 /// The callback invoked by the engine when FlutterView focus state has
2757 /// changed. The embedder can use this callback to request focus change for
2758 /// the native view. The callback is invoked from a task posted to the
2759 /// platform thread.
2761
2762 /// Opaque identifier provided by the engine. Accessible in Dart code through
2763 /// `PlatformDispatcher.instance.engineId`. Can be used in native code to
2764 /// retrieve the engine instance that is running the Dart code.
2765 int64_t engine_id;
2767
2768typedef struct {
2769 /// The size of this struct. Must be
2770 /// sizeof(FlutterSendSemanticsActionInfo).
2772
2773 /// The ID of the view that includes the node.
2775
2776 /// The semantics node identifier.
2777 uint64_t node_id;
2778
2779 /// The semantics action.
2781
2782 /// Data associated with the action.
2783 const uint8_t* data;
2784
2785 /// The data length.
2788
2789#ifndef FLUTTER_ENGINE_NO_PROTOTYPES
2790
2791// NOLINTBEGIN(google-objc-function-naming)
2792
2793//------------------------------------------------------------------------------
2794/// @brief Creates the necessary data structures to launch a Flutter Dart
2795/// application in AOT mode. The data may only be collected after
2796/// all FlutterEngine instances launched using this data have been
2797/// terminated.
2798///
2799/// @param[in] source The source of the AOT data.
2800/// @param[out] data_out The AOT data on success. Unchanged on failure.
2801///
2802/// @return Returns if the AOT data could be successfully resolved.
2803///
2806 const FlutterEngineAOTDataSource* source,
2807 FlutterEngineAOTData* data_out);
2808
2809//------------------------------------------------------------------------------
2810/// @brief Collects the AOT data.
2811///
2812/// @warning The embedder must ensure that this call is made only after all
2813/// FlutterEngine instances launched using this data have been
2814/// terminated, and that all of those instances were launched with
2815/// the FlutterProjectArgs::shutdown_dart_vm_when_done flag set to
2816/// true.
2817///
2818/// @param[in] data The data to collect.
2819///
2820/// @return Returns if the AOT data was successfully collected.
2821///
2824
2825//------------------------------------------------------------------------------
2826/// @brief Initialize and run a Flutter engine instance and return a handle
2827/// to it. This is a convenience method for the pair of calls to
2828/// `FlutterEngineInitialize` and `FlutterEngineRunInitialized`.
2829///
2830/// @note This method of running a Flutter engine works well except in
2831/// cases where the embedder specifies custom task runners via
2832/// `FlutterProjectArgs::custom_task_runners`. In such cases, the
2833/// engine may need the embedder to post tasks back to it before
2834/// `FlutterEngineRun` has returned. Embedders can only post tasks
2835/// to the engine if they have a handle to the engine. In such
2836/// cases, embedders are advised to get the engine handle by calling
2837/// `FlutterEngineInitialize`. Then they can call
2838/// `FlutterEngineRunInitialized` knowing that they will be able to
2839/// service custom tasks on other threads with the engine handle.
2840///
2841/// @param[in] version The Flutter embedder API version. Must be
2842/// FLUTTER_ENGINE_VERSION.
2843/// @param[in] config The renderer configuration.
2844/// @param[in] args The Flutter project arguments.
2845/// @param user_data A user data baton passed back to embedders in
2846/// callbacks.
2847/// @param[out] engine_out The engine handle on successful engine creation.
2848///
2849/// @return The result of the call to run the Flutter engine.
2850///
2853 const FlutterRendererConfig* config,
2854 const FlutterProjectArgs* args,
2855 void* user_data,
2857 engine_out);
2858
2859//------------------------------------------------------------------------------
2860/// @brief Shuts down a Flutter engine instance. The engine handle is no
2861/// longer valid for any calls in the embedder API after this point.
2862/// Making additional calls with this handle is undefined behavior.
2863///
2864/// @note This de-initializes the Flutter engine instance (via an implicit
2865/// call to `FlutterEngineDeinitialize`) if necessary.
2866///
2867/// @param[in] engine The Flutter engine instance to collect.
2868///
2869/// @return The result of the call to shutdown the Flutter engine instance.
2870///
2873 engine);
2874
2875//------------------------------------------------------------------------------
2876/// @brief Initialize a Flutter engine instance. This does not run the
2877/// Flutter application code till the `FlutterEngineRunInitialized`
2878/// call is made. Besides Flutter application code, no tasks are
2879/// scheduled on embedder managed task runners either. This allows
2880/// embedders providing custom task runners to the Flutter engine to
2881/// obtain a handle to the Flutter engine before the engine can post
2882/// tasks on these task runners.
2883///
2884/// @param[in] version The Flutter embedder API version. Must be
2885/// FLUTTER_ENGINE_VERSION.
2886/// @param[in] config The renderer configuration.
2887/// @param[in] args The Flutter project arguments.
2888/// @param user_data A user data baton passed back to embedders in
2889/// callbacks.
2890/// @param[out] engine_out The engine handle on successful engine creation.
2891///
2892/// @return The result of the call to initialize the Flutter engine.
2893///
2896 const FlutterRendererConfig* config,
2897 const FlutterProjectArgs* args,
2898 void* user_data,
2900 engine_out);
2901
2902//------------------------------------------------------------------------------
2903/// @brief Stops running the Flutter engine instance. After this call, the
2904/// embedder is also guaranteed that no more calls to post tasks
2905/// onto custom task runners specified by the embedder are made. The
2906/// Flutter engine handle still needs to be collected via a call to
2907/// `FlutterEngineShutdown`.
2908///
2909/// @param[in] engine The running engine instance to de-initialize.
2910///
2911/// @return The result of the call to de-initialize the Flutter engine.
2912///
2915 engine);
2916
2917//------------------------------------------------------------------------------
2918/// @brief Runs an initialized engine instance. An engine can be
2919/// initialized via `FlutterEngineInitialize`. An initialized
2920/// instance can only be run once. During and after this call,
2921/// custom task runners supplied by the embedder are expected to
2922/// start servicing tasks.
2923///
2924/// @param[in] engine An initialized engine instance that has not previously
2925/// been run.
2926///
2927/// @return The result of the call to run the initialized Flutter
2928/// engine instance.
2929///
2933
2934//------------------------------------------------------------------------------
2935/// @brief Adds a view.
2936///
2937/// This is an asynchronous operation. The view should not be used
2938/// until the |info.add_view_callback| is invoked with an |added|
2939/// value of true. The embedder should prepare resources in advance
2940/// but be ready to clean up on failure.
2941///
2942/// A frame is scheduled if the operation succeeds.
2943///
2944/// The callback is invoked on a thread managed by the engine. The
2945/// embedder should re-thread if needed.
2946///
2947/// Attempting to add the implicit view will fail and will return
2948/// kInvalidArguments. Attempting to add a view with an already
2949/// existing view ID will fail, and |info.add_view_callback| will be
2950/// invoked with an |added| value of false.
2951///
2952/// @param[in] engine A running engine instance.
2953/// @param[in] info The add view arguments. This can be deallocated
2954/// once |FlutterEngineAddView| returns, before
2955/// |add_view_callback| is invoked.
2956///
2957/// @return The result of *starting* the asynchronous operation. If
2958/// `kSuccess`, the |add_view_callback| will be invoked.
2961 engine,
2962 const FlutterAddViewInfo* info);
2963
2964//------------------------------------------------------------------------------
2965/// @brief Removes a view.
2966///
2967/// This is an asynchronous operation. The view's resources must not
2968/// be cleaned up until |info.remove_view_callback| is invoked with
2969/// a |removed| value of true.
2970///
2971/// The callback is invoked on a thread managed by the engine. The
2972/// embedder should re-thread if needed.
2973///
2974/// Attempting to remove the implicit view will fail and will return
2975/// kInvalidArguments. Attempting to remove a view with a
2976/// non-existent view ID will fail, and |info.remove_view_callback|
2977/// will be invoked with a |removed| value of false.
2978///
2979/// @param[in] engine A running engine instance.
2980/// @param[in] info The remove view arguments. This can be deallocated
2981/// once |FlutterEngineRemoveView| returns, before
2982/// |remove_view_callback| is invoked.
2983///
2984/// @return The result of *starting* the asynchronous operation. If
2985/// `kSuccess`, the |remove_view_callback| will be invoked.
2988 engine,
2989 const FlutterRemoveViewInfo* info);
2990
2991//------------------------------------------------------------------------------
2992/// @brief Notifies the engine that platform view focus state has changed.
2993///
2994/// @param[in] engine A running engine instance
2995/// @param[in] event The focus event data describing the change.
2999 const FlutterViewFocusEvent* event);
3000
3004 const FlutterWindowMetricsEvent* event);
3005
3009 const FlutterPointerEvent* events,
3010 size_t events_count);
3011
3012//------------------------------------------------------------------------------
3013/// @brief Sends a key event to the engine. The framework will decide
3014/// whether to handle this event in a synchronous fashion, although
3015/// due to technical limitation, the result is always reported
3016/// asynchronously. The `callback` is guaranteed to be called
3017/// exactly once.
3018///
3019/// @param[in] engine A running engine instance.
3020/// @param[in] event The event data to be sent. This function will no
3021/// longer access `event` after returning.
3022/// @param[in] callback The callback invoked by the engine when the
3023/// Flutter application has decided whether it
3024/// handles this event. Accepts nullptr.
3025/// @param[in] user_data The context associated with the callback. The
3026/// exact same value will used to invoke `callback`.
3027/// Accepts nullptr.
3028///
3029/// @return The result of the call.
3030///
3033 engine,
3034 const FlutterKeyEvent* event,
3036 void* user_data);
3037
3042
3043//------------------------------------------------------------------------------
3044/// @brief Creates a platform message response handle that allows the
3045/// embedder to set a native callback for a response to a message.
3046/// This handle may be set on the `response_handle` field of any
3047/// `FlutterPlatformMessage` sent to the engine.
3048///
3049/// The handle must be collected via a call to
3050/// `FlutterPlatformMessageReleaseResponseHandle`. This may be done
3051/// immediately after a call to `FlutterEngineSendPlatformMessage`
3052/// with a platform message whose response handle contains the handle
3053/// created using this call. In case a handle is created but never
3054/// sent in a message, the release call must still be made. Not
3055/// calling release on the handle results in a small memory leak.
3056///
3057/// The user data baton passed to the data callback is the one
3058/// specified in this call as the third argument.
3059///
3060/// @see FlutterPlatformMessageReleaseResponseHandle()
3061///
3062/// @param[in] engine A running engine instance.
3063/// @param[in] data_callback The callback invoked by the engine when the
3064/// Flutter application send a response on the
3065/// handle.
3066/// @param[in] user_data The user data associated with the data callback.
3067/// @param[out] response_out The response handle created when this call is
3068/// successful.
3069///
3070/// @return The result of the call.
3071///
3075 FlutterDataCallback data_callback,
3076 void* user_data,
3078
3079//------------------------------------------------------------------------------
3080/// @brief Collects the handle created using
3081/// `FlutterPlatformMessageCreateResponseHandle`.
3082///
3083/// @see FlutterPlatformMessageCreateResponseHandle()
3084///
3085/// @param[in] engine A running engine instance.
3086/// @param[in] response The platform message response handle to collect.
3087/// These handles are created using
3088/// `FlutterPlatformMessageCreateResponseHandle()`.
3089///
3090/// @return The result of the call.
3091///
3096
3097//------------------------------------------------------------------------------
3098/// @brief Send a response from the native side to a platform message from
3099/// the Dart Flutter application.
3100///
3101/// @param[in] engine The running engine instance.
3102/// @param[in] handle The platform message response handle.
3103/// @param[in] data The data to associate with the platform message
3104/// response.
3105/// @param[in] data_length The length of the platform message response data.
3106///
3107/// @return The result of the call.
3108///
3113 const uint8_t* data,
3114 size_t data_length);
3115
3116//------------------------------------------------------------------------------
3117/// @brief This API is only meant to be used by platforms that need to
3118/// flush tasks on a message loop not controlled by the Flutter
3119/// engine.
3120///
3121/// @deprecated This API will be deprecated and is not part of the stable API.
3122/// Please use the custom task runners API by setting an
3123/// appropriate `FlutterProjectArgs::custom_task_runners`
3124/// interface. This will yield better performance and the
3125/// interface is stable.
3126///
3127/// @return The result of the call.
3128///
3131
3132//------------------------------------------------------------------------------
3133/// @brief Register an external texture with a unique (per engine)
3134/// identifier. Only rendering backends that support external
3135/// textures accept external texture registrations. After the
3136/// external texture is registered, the application can mark that a
3137/// frame is available by calling
3138/// `FlutterEngineMarkExternalTextureFrameAvailable`.
3139///
3140/// @see FlutterEngineUnregisterExternalTexture()
3141/// @see FlutterEngineMarkExternalTextureFrameAvailable()
3142///
3143/// @param[in] engine A running engine instance.
3144/// @param[in] texture_identifier The identifier of the texture to register
3145/// with the engine. The embedder may supply new
3146/// frames to this texture using the same
3147/// identifier.
3148///
3149/// @return The result of the call.
3150///
3154 int64_t texture_identifier);
3155
3156//------------------------------------------------------------------------------
3157/// @brief Unregister a previous texture registration.
3158///
3159/// @see FlutterEngineRegisterExternalTexture()
3160/// @see FlutterEngineMarkExternalTextureFrameAvailable()
3161///
3162/// @param[in] engine A running engine instance.
3163/// @param[in] texture_identifier The identifier of the texture for which new
3164/// frame will not be available.
3165///
3166/// @return The result of the call.
3167///
3171 int64_t texture_identifier);
3172
3173//------------------------------------------------------------------------------
3174/// @brief Mark that a new texture frame is available for a given texture
3175/// identifier.
3176///
3177/// @see FlutterEngineRegisterExternalTexture()
3178/// @see FlutterEngineUnregisterExternalTexture()
3179///
3180/// @param[in] engine A running engine instance.
3181/// @param[in] texture_identifier The identifier of the texture whose frame
3182/// has been updated.
3183///
3184/// @return The result of the call.
3185///
3189 int64_t texture_identifier);
3190
3191//------------------------------------------------------------------------------
3192/// @brief Enable or disable accessibility semantics.
3193///
3194/// @param[in] engine A running engine instance.
3195/// @param[in] enabled When enabled, changes to the semantic contents of the
3196/// window are sent via the
3197/// `FlutterUpdateSemanticsCallback2` registered to
3198/// `update_semantics_callback2` in
3199/// `FlutterProjectArgs`.
3200///
3201/// @return The result of the call.
3202///
3206 bool enabled);
3207
3208//------------------------------------------------------------------------------
3209/// @brief Sets additional accessibility features.
3210///
3211/// @param[in] engine A running engine instance
3212/// @param[in] features The accessibility features to set.
3213///
3214/// @return The result of the call.
3215///
3220
3221//------------------------------------------------------------------------------
3222/// @brief Dispatch a semantics action to the specified semantics node
3223/// in the implicit view.
3224///
3225/// @deprecated Use `FlutterEngineSendSemanticsAction` instead.
3226///
3227/// @param[in] engine A running engine instance.
3228/// @param[in] node_id The semantics node identifier.
3229/// @param[in] action The semantics action.
3230/// @param[in] data Data associated with the action.
3231/// @param[in] data_length The data length.
3232///
3233/// @return The result of the call.
3234///
3238 uint64_t node_id,
3240 const uint8_t* data,
3241 size_t data_length);
3242
3243//------------------------------------------------------------------------------
3244/// @brief Dispatch a semantics action to the specified semantics node
3245/// within a specific view.
3246///
3247/// @param[in] engine A running engine instance.
3248/// @param[in] info The dispatch semantics on view arguments.
3249/// This can be deallocated once
3250/// |FlutterEngineSendSemanticsAction| returns.
3251///
3252/// @return The result of the call.
3253///
3257 const FlutterSendSemanticsActionInfo* info);
3258
3259//------------------------------------------------------------------------------
3260/// @brief Notify the engine that a vsync event occurred. A baton passed to
3261/// the platform via the vsync callback must be returned. This call
3262/// must be made on the thread on which the call to
3263/// `FlutterEngineRun` was made.
3264///
3265/// @see FlutterEngineGetCurrentTime()
3266///
3267/// @attention That frame timepoints are in nanoseconds.
3268///
3269/// @attention The system monotonic clock is used as the timebase.
3270///
3271/// @param[in] engine. A running engine instance.
3272/// @param[in] baton The baton supplied by the engine.
3273/// @param[in] frame_start_time_nanos The point at which the vsync event
3274/// occurred or will occur. If the time
3275/// point is in the future, the engine will
3276/// wait till that point to begin its frame
3277/// workload.
3278/// @param[in] frame_target_time_nanos The point at which the embedder
3279/// anticipates the next vsync to occur.
3280/// This is a hint the engine uses to
3281/// schedule Dart VM garbage collection in
3282/// periods in which the various threads
3283/// are most likely to be idle. For
3284/// example, for a 60Hz display, embedders
3285/// should add 16.6 * 1e6 to the frame time
3286/// field.
3287///
3288/// @return The result of the call.
3289///
3292 engine,
3293 intptr_t baton,
3294 uint64_t frame_start_time_nanos,
3295 uint64_t frame_target_time_nanos);
3296
3297//------------------------------------------------------------------------------
3298/// @brief Reloads the system fonts in engine.
3299///
3300/// @param[in] engine. A running engine instance.
3301///
3302/// @return The result of the call.
3303///
3307
3308//------------------------------------------------------------------------------
3309/// @brief A profiling utility. Logs a trace duration begin event to the
3310/// timeline. If the timeline is unavailable or disabled, this has
3311/// no effect. Must be balanced with an duration end event (via
3312/// `FlutterEngineTraceEventDurationEnd`) with the same name on the
3313/// same thread. Can be called on any thread. Strings passed into
3314/// the function will NOT be copied when added to the timeline. Only
3315/// string literals may be passed in.
3316///
3317/// @param[in] name The name of the trace event.
3318///
3321
3322//-----------------------------------------------------------------------------
3323/// @brief A profiling utility. Logs a trace duration end event to the
3324/// timeline. If the timeline is unavailable or disabled, this has
3325/// no effect. This call must be preceded by a trace duration begin
3326/// call (via `FlutterEngineTraceEventDurationBegin`) with the same
3327/// name on the same thread. Can be called on any thread. Strings
3328/// passed into the function will NOT be copied when added to the
3329/// timeline. Only string literals may be passed in.
3330///
3331/// @param[in] name The name of the trace event.
3332///
3335
3336//-----------------------------------------------------------------------------
3337/// @brief A profiling utility. Logs a trace duration instant event to the
3338/// timeline. If the timeline is unavailable or disabled, this has
3339/// no effect. Can be called on any thread. Strings passed into the
3340/// function will NOT be copied when added to the timeline. Only
3341/// string literals may be passed in.
3342///
3343/// @param[in] name The name of the trace event.
3344///
3346void FlutterEngineTraceEventInstant(const char* name);
3347
3348//------------------------------------------------------------------------------
3349/// @brief Posts a task onto the Flutter render thread. Typically, this may
3350/// be called from any thread as long as a `FlutterEngineShutdown`
3351/// on the specific engine has not already been initiated.
3352///
3353/// @param[in] engine A running engine instance.
3354/// @param[in] callback The callback to execute on the render thread.
3355/// @param callback_data The callback context.
3356///
3357/// @return The result of the call.
3358///
3363 void* callback_data);
3364
3365//------------------------------------------------------------------------------
3366/// @brief Get the current time in nanoseconds from the clock used by the
3367/// flutter engine. This is the system monotonic clock.
3368///
3369/// @return The current time in nanoseconds.
3370///
3373
3374//------------------------------------------------------------------------------
3375/// @brief Inform the engine to run the specified task. This task has been
3376/// given to the embedder via the
3377/// `FlutterTaskRunnerDescription.post_task_callback`. This call
3378/// must only be made at the target time specified in that callback.
3379/// Running the task before that time is undefined behavior.
3380///
3381/// @param[in] engine A running engine instance.
3382/// @param[in] task the task handle.
3383///
3384/// @return The result of the call.
3385///
3388 engine,
3389 const FlutterTask* task);
3390
3391//------------------------------------------------------------------------------
3392/// @brief Notify a running engine instance that the locale has been
3393/// updated. The preferred locale must be the first item in the list
3394/// of locales supplied. The other entries will be used as a
3395/// fallback.
3396///
3397/// @param[in] engine A running engine instance.
3398/// @param[in] locales The updated locales in the order of preference.
3399/// @param[in] locales_count The count of locales supplied.
3400///
3401/// @return Whether the locale updates were applied.
3402///
3405 engine,
3406 const FlutterLocale** locales,
3407 size_t locales_count);
3408
3409//------------------------------------------------------------------------------
3410/// @brief Returns if the Flutter engine instance will run AOT compiled
3411/// Dart code. This call has no threading restrictions.
3412///
3413/// For embedder code that is configured for both AOT and JIT mode
3414/// Dart execution based on the Flutter engine being linked to, this
3415/// runtime check may be used to appropriately configure the
3416/// `FlutterProjectArgs`. In JIT mode execution, the kernel
3417/// snapshots must be present in the Flutter assets directory
3418/// specified in the `FlutterProjectArgs`. For AOT execution, the
3419/// fields `vm_snapshot_data`, `vm_snapshot_instructions`,
3420/// `isolate_snapshot_data` and `isolate_snapshot_instructions`
3421/// (along with their size fields) must be specified in
3422/// `FlutterProjectArgs`.
3423///
3424/// @return True, if AOT Dart code is run. JIT otherwise.
3425///
3428
3429//------------------------------------------------------------------------------
3430/// @brief Posts a Dart object to specified send port. The corresponding
3431/// receive port for send port can be in any isolate running in the
3432/// VM. This isolate can also be the root isolate for an
3433/// unrelated engine. The engine parameter is necessary only to
3434/// ensure the call is not made when no engine (and hence no VM) is
3435/// running.
3436///
3437/// Unlike the platform messages mechanism, there are no threading
3438/// restrictions when using this API. Message can be posted on any
3439/// thread and they will be made available to isolate on which the
3440/// corresponding send port is listening.
3441///
3442/// However, it is the embedders responsibility to ensure that the
3443/// call is not made during an ongoing call the
3444/// `FlutterEngineDeinitialize` or `FlutterEngineShutdown` on
3445/// another thread.
3446///
3447/// @param[in] engine A running engine instance.
3448/// @param[in] port The send port to send the object to.
3449/// @param[in] object The object to send to the isolate with the
3450/// corresponding receive port.
3451///
3452/// @return If the message was posted to the send port.
3453///
3458 const FlutterEngineDartObject* object);
3459
3460//------------------------------------------------------------------------------
3461/// @brief Posts a low memory notification to a running engine instance.
3462/// The engine will do its best to release non-critical resources in
3463/// response. It is not guaranteed that the resource would have been
3464/// collected by the time this call returns however. The
3465/// notification is posted to engine subsystems that may be
3466/// operating on other threads.
3467///
3468/// Flutter applications can respond to these notifications by
3469/// setting `WidgetsBindingObserver.didHaveMemoryPressure`
3470/// observers.
3471///
3472/// @param[in] engine A running engine instance.
3473///
3474/// @return If the low memory notification was sent to the running engine
3475/// instance.
3476///
3480
3481//------------------------------------------------------------------------------
3482/// @brief Schedule a callback to be run on all engine managed threads.
3483/// The engine will attempt to service this callback the next time
3484/// the message loop for each managed thread is idle. Since the
3485/// engine manages the entire lifecycle of multiple threads, there
3486/// is no opportunity for the embedders to finely tune the
3487/// priorities of threads directly, or, perform other thread
3488/// specific configuration (for example, setting thread names for
3489/// tracing). This callback gives embedders a chance to affect such
3490/// tuning.
3491///
3492/// @attention This call is expensive and must be made as few times as
3493/// possible. The callback must also return immediately as not doing
3494/// so may risk performance issues (especially for callbacks of type
3495/// kFlutterNativeThreadTypeUI and kFlutterNativeThreadTypeRender).
3496///
3497/// @attention Some callbacks (especially the ones of type
3498/// kFlutterNativeThreadTypeWorker) may be called after the
3499/// FlutterEngine instance has shut down. Embedders must be careful
3500/// in handling the lifecycle of objects associated with the user
3501/// data baton.
3502///
3503/// @attention In case there are multiple running Flutter engine instances,
3504/// their workers are shared.
3505///
3506/// @param[in] engine A running engine instance.
3507/// @param[in] callback The callback that will get called multiple times on
3508/// each engine managed thread.
3509/// @param[in] user_data A baton passed by the engine to the callback. This
3510/// baton is not interpreted by the engine in any way.
3511///
3512/// @return Returns if the callback was successfully posted to all threads.
3513///
3518 void* user_data);
3519
3520//------------------------------------------------------------------------------
3521/// @brief Posts updates corresponding to display changes to a running engine
3522/// instance.
3523///
3524/// @param[in] update_type The type of update pushed to the engine.
3525/// @param[in] displays The displays affected by this update.
3526/// @param[in] display_count Size of the displays array, must be at least 1.
3527///
3528/// @return the result of the call made to the engine.
3529///
3535 size_t display_count);
3536
3537//------------------------------------------------------------------------------
3538/// @brief Schedule a new frame to redraw the content.
3539///
3540/// @param[in] engine A running engine instance.
3541///
3542/// @return the result of the call made to the engine.
3543///
3546 engine);
3547
3548//------------------------------------------------------------------------------
3549/// @brief Schedule a callback to be called after the next frame is drawn.
3550/// This must be called from the platform thread. The callback is
3551/// executed only once from the raster thread; embedders must
3552/// re-thread if necessary. Performing blocking calls
3553/// in this callback may introduce application jank.
3554///
3555/// @param[in] engine A running engine instance.
3556/// @param[in] callback The callback to execute.
3557/// @param[in] user_data A baton passed by the engine to the callback. This
3558/// baton is not interpreted by the engine in any way.
3559///
3560/// @return The result of the call.
3561///
3566 void* user_data);
3567
3568#endif // !FLUTTER_ENGINE_NO_PROTOTYPES
3569
3570// Typedefs for the function pointers in FlutterEngineProcTable.
3572 const FlutterEngineAOTDataSource* source,
3573 FlutterEngineAOTData* data_out);
3577 size_t version,
3578 const FlutterRendererConfig* config,
3579 const FlutterProjectArgs* args,
3580 void* user_data,
3581 FLUTTER_API_SYMBOL(FlutterEngine) * engine_out);
3585 size_t version,
3586 const FlutterRendererConfig* config,
3587 const FlutterProjectArgs* args,
3588 void* user_data,
3589 FLUTTER_API_SYMBOL(FlutterEngine) * engine_out);
3596 const FlutterWindowMetricsEvent* event);
3599 const FlutterPointerEvent* events,
3600 size_t events_count);
3603 const FlutterKeyEvent* event,
3605 void* user_data);
3612 FlutterDataCallback data_callback,
3613 void* user_data,
3622 const uint8_t* data,
3623 size_t data_length);
3626 int64_t texture_identifier);
3629 int64_t texture_identifier);
3633 int64_t texture_identifier);
3636 bool enabled);
3642 uint64_t id,
3644 const uint8_t* data,
3645 size_t data_length);
3648 const FlutterSendSemanticsActionInfo* info);
3651 intptr_t baton,
3652 uint64_t frame_start_time_nanos,
3653 uint64_t frame_target_time_nanos);
3658typedef void (*FlutterEngineTraceEventInstantFnPtr)(const char* name);
3662 void* callback_data);
3666 const FlutterTask* task);
3669 const FlutterLocale** locales,
3670 size_t locales_count);
3675 const FlutterEngineDartObject* object);
3681 void* user_data);
3686 size_t display_count);
3692 void* user_data);
3695 const FlutterAddViewInfo* info);
3698 const FlutterRemoveViewInfo* info);
3701 const FlutterViewFocusEvent* event);
3702
3703/// Function-pointer-based versions of the APIs above.
3704typedef struct {
3705 /// The size of this struct. Must be sizeof(FlutterEngineProcs).
3707
3753
3754//------------------------------------------------------------------------------
3755/// @brief Gets the table of engine function pointers.
3756///
3757/// @param[out] table The table to fill with pointers. This should be
3758/// zero-initialized, except for struct_size.
3759///
3760/// @return Returns whether the table was successfully populated.
3761///
3764 FlutterEngineProcTable* table);
3765
3766// NOLINTEND(google-objc-function-naming)
3767
3768#if defined(__cplusplus)
3769} // extern "C"
3770#endif
3771
3772#endif // FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_H_
GLenum type
FlutterEngineResult(* FlutterEngineSendKeyEventFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterKeyEvent *event, FlutterKeyEventCallback callback, void *user_data)
Definition embedder.h:3601
FLUTTER_EXPORT FlutterEngineResult FlutterEngineUpdateAccessibilityFeatures(FLUTTER_API_SYMBOL(FlutterEngine) engine, FlutterAccessibilityFeature features)
Sets additional accessibility features.
Definition embedder.cc:3182
struct _FlutterEngineAOTData * FlutterEngineAOTData
Definition embedder.h:2454
FLUTTER_EXPORT FlutterEngineResult FlutterEngineCreateAOTData(const FlutterEngineAOTDataSource *source, FlutterEngineAOTData *data_out)
Creates the necessary data structures to launch a Flutter Dart application in AOT mode....
Definition embedder.cc:1682
FlutterEngineResult(* FlutterEngineCreateAOTDataFnPtr)(const FlutterEngineAOTDataSource *source, FlutterEngineAOTData *data_out)
Definition embedder.h:3571
FlutterCheckState
Definition embedder.h:280
@ kFlutterCheckStateNone
The semantics node does not have check state.
Definition embedder.h:282
@ kFlutterCheckStateTrue
The semantics node is checked.
Definition embedder.h:284
@ kFlutterCheckStateFalse
The semantics node is not checked.
Definition embedder.h:286
@ kFlutterCheckStateMixed
The semantics node represents a checkbox in mixed state.
Definition embedder.h:288
#define FLUTTER_API_SYMBOL(symbol)
Definition embedder.h:67
bool(* FlutterPresentViewCallback)(const FlutterPresentViewInfo *)
Definition embedder.h:2192
int64_t FlutterPlatformViewIdentifier
Definition embedder.h:1460
FlutterKeyEventDeviceType
Definition embedder.h:1352
@ kFlutterKeyEventDeviceTypeKeyboard
Definition embedder.h:1353
@ kFlutterKeyEventDeviceTypeDirectionalPad
Definition embedder.h:1354
@ kFlutterKeyEventDeviceTypeHdmi
Definition embedder.h:1357
@ kFlutterKeyEventDeviceTypeJoystick
Definition embedder.h:1356
@ kFlutterKeyEventDeviceTypeGamepad
Definition embedder.h:1355
void(* FlutterUpdateSemanticsCustomActionCallback)(const FlutterSemanticsCustomAction *, void *)
Definition embedder.h:1816
FLUTTER_EXPORT FlutterEngineResult FlutterEngineSendWindowMetricsEvent(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterWindowMetricsEvent *event)
Definition embedder.cc:2660
void(* FlutterUpdateSemanticsCallback)(const FlutterSemanticsUpdate *, void *)
Definition embedder.h:1820
uint64_t FlutterEngineDisplayId
Definition embedder.h:1043
bool(* FlutterMetalPresentCallback)(void *, const FlutterMetalTexture *)
Definition embedder.h:883
FlutterLayerContentType
Definition embedder.h:2099
@ kFlutterLayerContentTypePlatformView
Indicates that the contents of this layer are determined by the embedder.
Definition embedder.h:2104
@ kFlutterLayerContentTypeBackingStore
Definition embedder.h:2102
void * FlutterVulkanPhysicalDeviceHandle
Alias for VkPhysicalDevice.
Definition embedder.h:915
FlutterViewFocusState
Represents the focus state of a given [FlutterView].
Definition embedder.h:1189
@ kUnfocused
Specifies that a view does not have platform focus.
Definition embedder.h:1191
@ kFocused
Specifies that a view has platform focus.
Definition embedder.h:1194
bool(* FlutterBackingStoreCreateCallback)(const FlutterBackingStoreConfig *config, FlutterBackingStore *backing_store_out, void *user_data)
Definition embedder.h:2176
FLUTTER_EXPORT FlutterEngineResult FlutterEngineRegisterExternalTexture(FLUTTER_API_SYMBOL(FlutterEngine) engine, int64_t texture_identifier)
Register an external texture with a unique (per engine) identifier. Only rendering backends that supp...
Definition embedder.cc:3110
FlutterEngineResult(* FlutterEngineDispatchSemanticsActionFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, uint64_t id, FlutterSemanticsAction action, const uint8_t *data, size_t data_length)
Definition embedder.h:3640
FlutterEngineAOTDataSourceType
AOT data source type.
Definition embedder.h:2427
@ kFlutterEngineAOTDataSourceTypeElfPath
Definition embedder.h:2428
void(* FlutterEngineTraceEventInstantFnPtr)(const char *name)
Definition embedder.h:3658
const void * FlutterMetalDeviceHandle
Alias for id<MTLDevice>.
Definition embedder.h:800
FlutterViewFocusDirection
Definition embedder.h:1170
@ kBackward
Definition embedder.h:1185
@ kForward
Definition embedder.h:1180
@ kUndefined
Definition embedder.h:1175
void(* FlutterPlatformMessageCallback)(const FlutterPlatformMessage *, void *)
Definition embedder.h:1449
FLUTTER_EXPORT uint64_t FlutterEngineGetCurrentTime()
Get the current time in nanoseconds from the clock used by the flutter engine. This is the system mon...
Definition embedder.cc:3309
FLUTTER_EXPORT FlutterEngineResult FlutterEngineSendKeyEvent(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterKeyEvent *event, FlutterKeyEventCallback callback, void *user_data)
Sends a key event to the engine. The framework will decide whether to handle this event in a synchron...
Definition embedder.cc:2921
FlutterPlatformViewMutationType
Definition embedder.h:1997
@ kFlutterPlatformViewMutationTypeClipRoundedRect
Definition embedder.h:2006
@ kFlutterPlatformViewMutationTypeClipRect
Definition embedder.h:2003
@ kFlutterPlatformViewMutationTypeTransformation
Definition embedder.h:2009
@ kFlutterPlatformViewMutationTypeOpacity
Definition embedder.h:2000
bool(* FlutterLayersPresentCallback)(const FlutterLayer **layers, size_t layers_count, void *user_data)
Definition embedder.h:2185
FLUTTER_EXPORT FlutterEngineResult FlutterEngineReloadSystemFonts(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Reloads the system fonts in engine.
Definition embedder.cc:3256
FlutterRendererType
Definition embedder.h:79
@ kVulkan
Definition embedder.h:86
@ kOpenGL
Definition embedder.h:80
@ kMetal
Definition embedder.h:85
@ kSoftware
Definition embedder.h:81
FLUTTER_EXPORT FlutterEngineResult FlutterEngineUpdateSemanticsEnabled(FLUTTER_API_SYMBOL(FlutterEngine) engine, bool enabled)
Enable or disable accessibility semantics.
Definition embedder.cc:3168
FlutterEngineResult(* FlutterEngineInitializeFnPtr)(size_t version, const FlutterRendererConfig *config, const FlutterProjectArgs *args, void *user_data, FLUTTER_API_SYMBOL(FlutterEngine) *engine_out)
Definition embedder.h:3584
FlutterEngineResult(* FlutterEngineSetNextFrameCallbackFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, VoidCallback callback, void *user_data)
Definition embedder.h:3689
void(* FlutterDataCallback)(const uint8_t *, size_t, void *)
Definition embedder.h:1453
FlutterEngineResult(* FlutterEngineUpdateAccessibilityFeaturesFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, FlutterAccessibilityFeature features)
Definition embedder.h:3637
FlutterPointerPhase
The phase of the pointer event.
Definition embedder.h:1237
@ kPanZoomUpdate
The pan/zoom updated.
Definition embedder.h:1273
@ kHover
The pointer moved while up.
Definition embedder.h:1269
@ kUp
Definition embedder.h:1245
@ kPanZoomStart
A pan/zoom started on this pointer.
Definition embedder.h:1271
@ kRemove
Definition embedder.h:1267
@ kCancel
Definition embedder.h:1238
@ kDown
Definition embedder.h:1252
@ kAdd
Definition embedder.h:1262
@ kMove
Definition embedder.h:1257
@ kPanZoomEnd
The pan/zoom ended.
Definition embedder.h:1275
FLUTTER_EXPORT void FlutterEngineTraceEventInstant(const char *name)
A profiling utility. Logs a trace duration instant event to the timeline. If the timeline is unavaila...
Definition embedder.cc:3282
bool(* FlutterOpenGLSurfaceCallback)(void *, bool *)
Definition embedder.h:554
FlutterEngineResult(* FlutterEngineCollectAOTDataFnPtr)(FlutterEngineAOTData data)
Definition embedder.h:3574
FlutterSoftwarePixelFormat
Definition embedder.h:450
@ kFlutterSoftwarePixelFormatRGBA4444
Definition embedder.h:473
@ kFlutterSoftwarePixelFormatRGBA8888
Definition embedder.h:483
@ kFlutterSoftwarePixelFormatBGRA8888
Definition embedder.h:502
@ kFlutterSoftwarePixelFormatGray8
Definition embedder.h:454
@ kFlutterSoftwarePixelFormatNative32
Definition embedder.h:506
@ kFlutterSoftwarePixelFormatRGBX8888
Definition embedder.h:492
@ kFlutterSoftwarePixelFormatRGB565
Definition embedder.h:463
void * FlutterVulkanDeviceHandle
Alias for VkDevice.
Definition embedder.h:918
FLUTTER_EXPORT void FlutterEngineTraceEventDurationBegin(const char *name)
A profiling utility. Logs a trace duration begin event to the timeline. If the timeline is unavailabl...
Definition embedder.cc:3273
FlutterMetalExternalTextureYUVColorSpace
YUV color space for the YUV external texture.
Definition embedder.h:815
@ kBT601LimitedRange
Definition embedder.h:817
@ kBT601FullRange
Definition embedder.h:816
FlutterEngineResult(* FlutterEngineRunFnPtr)(size_t version, const FlutterRendererConfig *config, const FlutterProjectArgs *args, void *user_data, FLUTTER_API_SYMBOL(FlutterEngine) *engine_out)
Definition embedder.h:3576
FLUTTER_EXPORT FlutterEngineResult FlutterEngineInitialize(size_t version, const FlutterRendererConfig *config, const FlutterProjectArgs *args, void *user_data, FLUTTER_API_SYMBOL(FlutterEngine) *engine_out)
Initialize a Flutter engine instance. This does not run the Flutter application code till the Flutter...
Definition embedder.cc:1987
FlutterEngineResult(* FlutterEngineNotifyLowMemoryWarningFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Definition embedder.h:3676
FLUTTER_EXPORT FlutterEngineResult FlutterEngineSendViewFocusEvent(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterViewFocusEvent *event)
Notifies the engine that platform view focus state has changed.
Definition embedder.cc:2603
FlutterEngineResult(* FlutterEngineSendWindowMetricsEventFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterWindowMetricsEvent *event)
Definition embedder.h:3594
FlutterEngineResult(* FlutterEngineSendPlatformMessageFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterPlatformMessage *message)
Definition embedder.h:3606
FLUTTER_EXPORT FlutterEngineResult FlutterEngineUnregisterExternalTexture(FLUTTER_API_SYMBOL(FlutterEngine) engine, int64_t texture_identifier)
Unregister a previous texture registration.
Definition embedder.cc:3129
FlutterEngineResult(* FlutterEngineReloadSystemFontsFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Definition embedder.h:3654
bool(* FlutterEngineRunsAOTCompiledDartCodeFnPtr)(void)
Definition embedder.h:3671
FlutterPointerMouseButtons
Definition embedder.h:1288
@ kFlutterPointerButtonMousePrimary
Definition embedder.h:1289
@ kFlutterPointerButtonMouseMiddle
Definition embedder.h:1291
@ kFlutterPointerButtonMouseForward
Definition embedder.h:1293
@ kFlutterPointerButtonMouseBack
Definition embedder.h:1292
@ kFlutterPointerButtonMouseSecondary
Definition embedder.h:1290
FlutterEngineResult(* FlutterEngineUpdateSemanticsEnabledFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, bool enabled)
Definition embedder.h:3634
FlutterEngineResult(* FlutterEnginePostRenderThreadTaskFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, VoidCallback callback, void *callback_data)
Definition embedder.h:3659
FLUTTER_EXPORT FlutterEngineResult FlutterEngineRunTask(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterTask *task)
Inform the engine to run the specified task. This task has been given to the embedder via the Flutter...
Definition embedder.cc:3313
FlutterEngineResult(* FlutterEngineDeinitializeFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Definition embedder.h:3590
FlutterAccessibilityFeature
Definition embedder.h:91
@ kFlutterAccessibilityFeatureNoAnnounce
Indicate the platform does not support announcements.
Definition embedder.h:109
@ kFlutterAccessibilityFeatureOnOffSwitchLabels
Request to show on/off labels inside switches.
Definition embedder.h:107
@ kFlutterAccessibilityFeatureBoldText
Request that text be rendered at a bold font weight.
Definition embedder.h:100
@ kFlutterAccessibilityFeatureHighContrast
Request that UI be rendered with darker colors.
Definition embedder.h:105
@ kFlutterAccessibilityFeatureReduceMotion
Definition embedder.h:103
@ kFlutterAccessibilityFeatureDisableAnimations
Request that animations be disabled or simplified.
Definition embedder.h:98
@ kFlutterAccessibilityFeatureInvertColors
Indicate the platform is inverting the colors of the application.
Definition embedder.h:96
@ kFlutterAccessibilityFeatureAccessibleNavigation
Definition embedder.h:94
FLUTTER_EXPORT FlutterEngineResult FlutterPlatformMessageReleaseResponseHandle(FLUTTER_API_SYMBOL(FlutterEngine) engine, FlutterPlatformMessageResponseHandle *response)
Collects the handle created using FlutterPlatformMessageCreateResponseHandle.
Definition embedder.cc:3063
void(* FlutterNativeThreadCallback)(FlutterNativeThreadType type, void *user_data)
Definition embedder.h:2423
FlutterVulkanImage(* FlutterVulkanImageCallback)(void *, const FlutterFrameInfo *)
Callback for when a VkImage is requested.
Definition embedder.h:944
FLUTTER_EXPORT FlutterEngineResult FlutterEngineUpdateLocales(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterLocale **locales, size_t locales_count)
Notify a running engine instance that the locale has been updated. The preferred locale must be the f...
Definition embedder.cc:3365
FlutterEngineResult(* FlutterEnginePostCallbackOnAllNativeThreadsFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, FlutterNativeThreadCallback callback, void *user_data)
Definition embedder.h:3678
bool(* FlutterMetalTextureFrameCallback)(void *, int64_t, size_t, size_t, FlutterMetalExternalTexture *)
Definition embedder.h:846
FlutterTransformation(* TransformationCallback)(void *)
Definition embedder.h:611
uint64_t(* FlutterEngineGetCurrentTimeFnPtr)()
Definition embedder.h:3663
FlutterMetalExternalTexturePixelFormat
Pixel format for the external texture.
Definition embedder.h:809
@ kRGBA
Definition embedder.h:811
@ kYUVA
Definition embedder.h:810
FlutterEngineResult(* FlutterEngineSendPointerEventFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterPointerEvent *events, size_t events_count)
Definition embedder.h:3597
FlutterEngineDartObjectType
Definition embedder.h:2330
@ kFlutterEngineDartObjectTypeString
Definition embedder.h:2336
@ kFlutterEngineDartObjectTypeBool
Definition embedder.h:2332
@ kFlutterEngineDartObjectTypeDouble
Definition embedder.h:2335
@ kFlutterEngineDartObjectTypeInt32
Definition embedder.h:2333
@ kFlutterEngineDartObjectTypeBuffer
Definition embedder.h:2339
@ kFlutterEngineDartObjectTypeInt64
Definition embedder.h:2334
@ kFlutterEngineDartObjectTypeNull
Definition embedder.h:2331
bool(* BoolCallback)(void *)
Definition embedder.h:610
void(* FlutterFrameBufferWithDamageCallback)(void *, const intptr_t, FlutterDamage *)
Definition embedder.h:693
void(* FlutterLogMessageCallback)(const char *, const char *, void *)
Definition embedder.h:2448
FLUTTER_EXPORT FlutterEngineResult FlutterEngineShutdown(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Shuts down a Flutter engine instance. The engine handle is no longer valid for any calls in the embed...
Definition embedder.cc:2649
void(* FlutterTaskRunnerPostTaskCallback)(FlutterTask, uint64_t, void *)
Definition embedder.h:1853
void(* FlutterRemoveViewCallback)(const FlutterRemoveViewResult *)
Definition embedder.h:1137
FlutterEngineResult(* FlutterEnginePlatformMessageCreateResponseHandleFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, FlutterDataCallback data_callback, void *user_data, FlutterPlatformMessageResponseHandle **response_out)
Definition embedder.h:3610
FlutterEngineResult
Definition embedder.h:72
@ kInternalInconsistency
Definition embedder.h:76
@ kInvalidLibraryVersion
Definition embedder.h:74
@ kInvalidArguments
Definition embedder.h:75
@ kSuccess
Definition embedder.h:73
FLUTTER_EXPORT FlutterEngineResult FlutterEngineDeinitialize(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Stops running the Flutter engine instance. After this call, the embedder is also guaranteed that no m...
Definition embedder.cc:2636
FlutterEngineResult(* FlutterEngineMarkExternalTextureFrameAvailableFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, int64_t texture_identifier)
Definition embedder.h:3631
FLUTTER_EXPORT FlutterEngineResult FlutterEngineRun(size_t version, const FlutterRendererConfig *config, const FlutterProjectArgs *args, void *user_data, FLUTTER_API_SYMBOL(FlutterEngine) *engine_out)
Initialize and run a Flutter engine instance and return a handle to it. This is a convenience method ...
Definition embedder.cc:1971
FlutterNativeThreadType
Definition embedder.h:2404
@ kFlutterNativeThreadTypeWorker
Definition embedder.h:2418
@ kFlutterNativeThreadTypeUI
Definition embedder.h:2415
@ kFlutterNativeThreadTypePlatform
Definition embedder.h:2408
@ kFlutterNativeThreadTypeRender
Definition embedder.h:2412
const void * FlutterMetalCommandQueueHandle
Alias for id<MTLCommandQueue>.
Definition embedder.h:803
FlutterPointerSignalKind
The type of a pointer signal.
Definition embedder.h:1299
@ kFlutterPointerSignalKindScale
Definition embedder.h:1303
@ kFlutterPointerSignalKindScrollInertiaCancel
Definition embedder.h:1302
@ kFlutterPointerSignalKindScroll
Definition embedder.h:1301
@ kFlutterPointerSignalKindNone
Definition embedder.h:1300
void(* FlutterUpdateSemanticsNodeCallback)(const FlutterSemanticsNode *, void *)
Definition embedder.h:1812
void(* VoidCallback)(void *)
Definition embedder.h:409
void *(* ProcResolver)(void *, const char *)
Definition embedder.h:617
const FlutterLocale *(* FlutterComputePlatformResolvedLocaleCallback)(const FlutterLocale **, size_t)
Definition embedder.h:2285
FlutterEngineDisplaysUpdateType
Definition embedder.h:2318
@ kFlutterEngineDisplaysUpdateTypeStartup
Definition embedder.h:2324
@ kFlutterEngineDisplaysUpdateTypeCount
Definition embedder.h:2325
FLUTTER_EXPORT FlutterEngineResult FlutterEngineAddView(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterAddViewInfo *info)
Adds a view.
Definition embedder.cc:2500
FLUTTER_EXPORT const int32_t kFlutterSemanticsNodeIdBatchEnd
Definition embedder.cc:107
FlutterEngineResult(* FlutterEnginePlatformMessageReleaseResponseHandleFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, FlutterPlatformMessageResponseHandle *response)
Definition embedder.h:3616
uint32_t(* UIntCallback)(void *)
Definition embedder.h:612
FlutterThreadPriority
Valid values for priority of Thread.
Definition embedder.h:369
@ kBackground
Suitable for threads that shouldn't disrupt high priority work.
Definition embedder.h:371
@ kDisplay
Suitable for threads which generate data for the display.
Definition embedder.h:375
@ kNormal
Default priority level.
Definition embedder.h:373
@ kRaster
Suitable for thread which raster data.
Definition embedder.h:377
FlutterEngineResult(* FlutterEngineOnVsyncFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, intptr_t baton, uint64_t frame_start_time_nanos, uint64_t frame_target_time_nanos)
Definition embedder.h:3649
FlutterSemanticsAction
Definition embedder.h:115
@ kFlutterSemanticsActionMoveCursorForwardByCharacter
Move the cursor forward by one character.
Definition embedder.h:142
@ kFlutterSemanticsActionDidLoseAccessibilityFocus
Indicate that the node has lost accessibility focus.
Definition embedder.h:156
@ kFlutterSemanticsActionExpand
A request that the node should be expanded.
Definition embedder.h:173
@ kFlutterSemanticsActionDecrease
Decrease the value represented by the semantics node.
Definition embedder.h:138
@ kFlutterSemanticsActionCollapse
A request that the node should be collapsed.
Definition embedder.h:175
@ kFlutterSemanticsActionScrollDown
Definition embedder.h:134
@ kFlutterSemanticsActionMoveCursorBackwardByCharacter
Move the cursor backward by one character.
Definition embedder.h:144
@ kFlutterSemanticsActionMoveCursorForwardByWord
Move the cursor forward by one word.
Definition embedder.h:162
@ kFlutterSemanticsActionLongPress
Definition embedder.h:121
@ kFlutterSemanticsActionScrollToOffset
Definition embedder.h:171
@ kFlutterSemanticsActionScrollRight
Definition embedder.h:128
@ kFlutterSemanticsActionShowOnScreen
A request to fully show the semantics node on screen.
Definition embedder.h:140
@ kFlutterSemanticsActionSetSelection
Set the text selection to the given range.
Definition embedder.h:146
@ kFlutterSemanticsActionDismiss
A request that the node should be dismissed.
Definition embedder.h:160
@ kFlutterSemanticsActionFocus
Request that the respective focusable widget gain input focus.
Definition embedder.h:168
@ kFlutterSemanticsActionPaste
Paste the current content of the clipboard.
Definition embedder.h:152
@ kFlutterSemanticsActionScrollUp
Definition embedder.h:131
@ kFlutterSemanticsActionCut
Cut the current selection and place it in the clipboard.
Definition embedder.h:150
@ kFlutterSemanticsActionCustomAction
Indicate that the user has invoked a custom accessibility action.
Definition embedder.h:158
@ kFlutterSemanticsActionCopy
Copy the current selection to the clipboard.
Definition embedder.h:148
@ kFlutterSemanticsActionMoveCursorBackwardByWord
Move the cursor backward by one word.
Definition embedder.h:164
@ kFlutterSemanticsActionIncrease
Increase the value represented by the semantics node.
Definition embedder.h:136
@ kFlutterSemanticsActionScrollLeft
Definition embedder.h:124
@ kFlutterSemanticsActionDidGainAccessibilityFocus
Indicate that the node has gained accessibility focus.
Definition embedder.h:154
@ kFlutterSemanticsActionSetText
Replace the current text in the text field.
Definition embedder.h:166
@ kFlutterSemanticsActionTap
Definition embedder.h:118
uint32_t(* UIntFrameInfoCallback)(void *, const FlutterFrameInfo *)
Callback for when a frame buffer object is requested.
Definition embedder.h:687
FLUTTER_EXPORT FlutterEngineResult FlutterEnginePostDartObject(FLUTTER_API_SYMBOL(FlutterEngine) engine, FlutterEngineDartPort port, const FlutterEngineDartObject *object)
Posts a Dart object to specified send port. The corresponding receive port for send port can be in an...
Definition embedder.cc:3428
void(* FlutterKeyEventCallback)(bool, void *)
Definition embedder.h:1427
void(* FlutterEngineTraceEventDurationBeginFnPtr)(const char *name)
Definition embedder.h:3656
FlutterEngineResult(* FlutterEngineRemoveViewFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterRemoveViewInfo *info)
Definition embedder.h:3696
FlutterEngineResult(* FlutterEngineRunInitializedFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Definition embedder.h:3592
FLUTTER_EXPORT FlutterEngineResult FlutterEngineSendPlatformMessageResponse(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterPlatformMessageResponseHandle *handle, const uint8_t *data, size_t data_length)
Send a response from the native side to a platform message from the Dart Flutter application.
Definition embedder.cc:3078
int64_t FlutterViewId
Definition embedder.h:386
FLUTTER_EXPORT FlutterEngineResult FlutterEngineSendPointerEvent(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterPointerEvent *events, size_t events_count)
Definition embedder.cc:2769
FLUTTER_EXPORT FlutterEngineResult FlutterEngineCollectAOTData(FlutterEngineAOTData data)
Collects the AOT data.
Definition embedder.cc:1736
FLUTTER_EXPORT FlutterEngineResult FlutterEngineOnVsync(FLUTTER_API_SYMBOL(FlutterEngine) engine, intptr_t baton, uint64_t frame_start_time_nanos, uint64_t frame_target_time_nanos)
Notify the engine that a vsync event occurred. A baton passed to the platform via the vsync callback ...
Definition embedder.cc:3229
FlutterStringAttributeType
Definition embedder.h:1472
@ kSpellOut
Definition embedder.h:1474
@ kLocale
Definition embedder.h:1476
bool(* FlutterVulkanPresentCallback)(void *, const FlutterVulkanImage *)
Definition embedder.h:950
FlutterTristate
Definition embedder.h:271
@ kFlutterTristateTrue
The property is applicable and its state is "true" or "on".
Definition embedder.h:275
@ kFlutterTristateFalse
The property is applicable and its state is "false" or "off".
Definition embedder.h:277
@ kFlutterTristateNone
The property is not applicable to this semantics node.
Definition embedder.h:273
FlutterKeyEventType
Definition embedder.h:1346
@ kFlutterKeyEventTypeDown
Definition embedder.h:1348
@ kFlutterKeyEventTypeUp
Definition embedder.h:1347
@ kFlutterKeyEventTypeRepeat
Definition embedder.h:1349
FlutterMetalTexture(* FlutterMetalTextureCallback)(void *, const FlutterFrameInfo *)
Callback for when a metal texture is requested.
Definition embedder.h:876
FLUTTER_EXPORT FlutterEngineResult FlutterEngineNotifyDisplayUpdate(FLUTTER_API_SYMBOL(FlutterEngine) engine, FlutterEngineDisplaysUpdateType update_type, const FlutterEngineDisplay *displays, size_t display_count)
Posts updates corresponding to display changes to a running engine instance.
Definition embedder.cc:3613
void(* FlutterUpdateSemanticsCallback2)(const FlutterSemanticsUpdate2 *, void *)
Definition embedder.h:1824
bool(* SoftwareSurfacePresentCallback)(void *, const void *, size_t, size_t)
Definition embedder.h:613
FlutterEngineResult(* FlutterEngineRegisterExternalTextureFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, int64_t texture_identifier)
Definition embedder.h:3624
int64_t FlutterEngineDartPort
Definition embedder.h:2328
FlutterEngineResult(* FlutterEngineSendPlatformMessageResponseFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterPlatformMessageResponseHandle *handle, const uint8_t *data, size_t data_length)
Definition embedder.h:3619
void(* FlutterAddViewCallback)(const FlutterAddViewResult *result)
Definition embedder.h:1089
bool(* FlutterBackingStoreCollectCallback)(const FlutterBackingStore *renderer, void *user_data)
Definition embedder.h:2181
FlutterEngineResult(* FlutterEngineRunTaskFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterTask *task)
Definition embedder.h:3664
#define FLUTTER_EXPORT
Definition embedder.h:57
FLUTTER_EXPORT FlutterEngineResult FlutterEngineSendPlatformMessage(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterPlatformMessage *message)
Definition embedder.cc:2977
bool(* BoolPresentInfoCallback)(void *, const FlutterPresentInfo *)
Callback for when a surface is presented.
Definition embedder.h:713
FlutterOpenGLTargetType
Definition embedder.h:411
@ kFlutterOpenGLTargetTypeFramebuffer
Definition embedder.h:417
@ kFlutterOpenGLTargetTypeSurface
Definition embedder.h:420
@ kFlutterOpenGLTargetTypeTexture
Definition embedder.h:414
void *(* FlutterVulkanInstanceProcAddressCallback)(void *, FlutterVulkanInstanceHandle, const char *)
Definition embedder.h:938
FLUTTER_EXPORT bool FlutterEngineRunsAOTCompiledDartCode(void)
Returns if the Flutter engine instance will run AOT compiled Dart code. This call has no threading re...
Definition embedder.cc:3424
FlutterEngineResult(* FlutterEnginePostDartObjectFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, FlutterEngineDartPort port, const FlutterEngineDartObject *object)
Definition embedder.h:3672
FlutterEngineResult(* FlutterEngineSendSemanticsActionFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterSendSemanticsActionInfo *info)
Definition embedder.h:3646
FLUTTER_EXPORT FlutterEngineResult FlutterEngineRunInitialized(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Runs an initialized engine instance. An engine can be initialized via FlutterEngineInitialize....
Definition embedder.cc:2461
FlutterEngineResult(* FlutterEngineSendViewFocusEventFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterViewFocusEvent *event)
Definition embedder.h:3699
FlutterEngineResult(* FlutterEngineUpdateLocalesFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterLocale **locales, size_t locales_count)
Definition embedder.h:3667
void * FlutterVulkanInstanceHandle
Alias for VkInstance.
Definition embedder.h:912
FLUTTER_EXPORT FlutterEngineResult FlutterEnginePostRenderThreadTask(FLUTTER_API_SYMBOL(FlutterEngine) engine, VoidCallback callback, void *callback_data)
Posts a task onto the Flutter render thread. Typically, this may be called from any thread as long as...
Definition embedder.cc:3287
FlutterBackingStoreType
Definition embedder.h:2048
@ kFlutterBackingStoreTypeSoftware2
Definition embedder.h:2060
@ kFlutterBackingStoreTypeMetal
Specifies a Metal backing store. This is backed by a Metal texture.
Definition embedder.h:2055
@ kFlutterBackingStoreTypeVulkan
Specifies a Vulkan backing store. This is backed by a Vulkan VkImage.
Definition embedder.h:2057
@ kFlutterBackingStoreTypeSoftware
Specified an software allocation for Flutter to render into using the CPU.
Definition embedder.h:2053
@ kFlutterBackingStoreTypeOpenGL
Definition embedder.h:2051
FLUTTER_EXPORT FlutterEngineResult __FlutterEngineFlushPendingTasksNow()
This API is only meant to be used by platforms that need to flush tasks on a message loop not control...
Definition embedder.cc:3105
void(* FlutterChannelUpdateCallback)(const FlutterChannelUpdate *, void *)
Definition embedder.h:1838
FLUTTER_EXPORT FlutterEngineResult FlutterEngineNotifyLowMemoryWarning(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Posts a low memory notification to a running engine instance. The engine will do its best to release ...
Definition embedder.cc:3552
FlutterEngineResult(* FlutterEngineShutdownFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Definition embedder.h:3582
void(* VsyncCallback)(void *, intptr_t)
Definition embedder.h:623
FlutterTextDirection
Definition embedder.h:359
@ kFlutterTextDirectionUnknown
Text has unknown text direction.
Definition embedder.h:361
@ kFlutterTextDirectionRTL
Text is read from right to left.
Definition embedder.h:363
@ kFlutterTextDirectionLTR
Text is read from left to right.
Definition embedder.h:365
struct _FlutterTaskRunner * FlutterTaskRunner
Definition embedder.h:1846
FlutterEngineResult(* FlutterEngineUnregisterExternalTextureFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, int64_t texture_identifier)
Definition embedder.h:3627
FlutterEngineResult(* FlutterEngineNotifyDisplayUpdateFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, FlutterEngineDisplaysUpdateType update_type, const FlutterEngineDisplay *displays, size_t display_count)
Definition embedder.h:3682
FLUTTER_EXPORT FlutterEngineResult FlutterEnginePostCallbackOnAllNativeThreads(FLUTTER_API_SYMBOL(FlutterEngine) engine, FlutterNativeThreadCallback callback, void *user_data)
Schedule a callback to be run on all engine managed threads. The engine will attempt to service this ...
Definition embedder.cc:3574
bool(* TextureFrameCallback)(void *, int64_t, size_t, size_t, FlutterOpenGLTexture *)
Definition embedder.h:618
FLUTTER_EXPORT FlutterEngineResult FlutterEngineRemoveView(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterRemoveViewInfo *info)
Removes a view.
Definition embedder.cc:2561
FlutterPointerDeviceKind
The device type that created a pointer event.
Definition embedder.h:1279
@ kFlutterPointerDeviceKindTouch
Definition embedder.h:1281
@ kFlutterPointerDeviceKindTrackpad
Definition embedder.h:1283
@ kFlutterPointerDeviceKindStylus
Definition embedder.h:1282
@ kFlutterPointerDeviceKindMouse
Definition embedder.h:1280
FLUTTER_EXPORT FlutterEngineResult FlutterEngineSendSemanticsAction(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterSendSemanticsActionInfo *info)
Dispatch a semantics action to the specified semantics node within a specific view.
Definition embedder.cc:3212
FLUTTER_EXPORT FlutterEngineResult FlutterPlatformMessageCreateResponseHandle(FLUTTER_API_SYMBOL(FlutterEngine) engine, FlutterDataCallback data_callback, void *user_data, FlutterPlatformMessageResponseHandle **response_out)
Creates a platform message response handle that allows the embedder to set a native callback for a re...
Definition embedder.cc:3028
FLUTTER_EXPORT FlutterEngineResult FlutterEngineMarkExternalTextureFrameAvailable(FLUTTER_API_SYMBOL(FlutterEngine) engine, int64_t texture_identifier)
Mark that a new texture frame is available for a given texture identifier.
Definition embedder.cc:3150
void(* FlutterViewFocusChangeRequestCallback)(const FlutterViewFocusChangeRequest *, void *)
Definition embedder.h:1842
void(* OnPreEngineRestartCallback)(void *)
Definition embedder.h:624
const void * FlutterMetalTextureHandle
Alias for id<MTLTexture>.
Definition embedder.h:806
FlutterSemanticsFlag
Definition embedder.h:185
@ kFlutterSemanticsFlagIsHidden
Whether the semantics node is considered hidden.
Definition embedder.h:216
@ kFlutterSemanticsFlagIsHeader
Whether a semantic node is a header that divides content into sections.
Definition embedder.h:207
@ kFlutterSemanticsFlagIsSlider
Whether the semantics node represents a slider.
Definition embedder.h:249
@ kFlutterSemanticsFlagHasToggledState
The semantics node has the quality of either being "on" or "off".
Definition embedder.h:222
@ kFlutterSemanticsFlagIsSelected
Whether a semantics node is selected.
Definition embedder.h:192
@ kFlutterSemanticsFlagIsRequired
Definition embedder.h:268
@ kFlutterSemanticsFlagIsInMutuallyExclusiveGroup
Whether a semantic node is in a mutually exclusive group.
Definition embedder.h:205
@ kFlutterSemanticsFlagHasRequiredState
Whether a semantics node has the quality of being required.
Definition embedder.h:263
@ kFlutterSemanticsFlagIsKeyboardKey
Whether the semantics node represents a keyboard key.
Definition embedder.h:251
@ kFlutterSemanticsFlagIsChecked
Whether a semantics node is checked.
Definition embedder.h:190
@ kFlutterSemanticsFlagScopesRoute
Definition embedder.h:212
@ kFlutterSemanticsFlagHasExpandedState
Definition embedder.h:256
@ kFlutterSemanticsFlagIsCheckStateMixed
Whether the semantics node represents a tristate checkbox in mixed state.
Definition embedder.h:253
@ kFlutterSemanticsFlagIsToggled
Definition embedder.h:225
@ kFlutterSemanticsFlagIsButton
Whether the semantic node represents a button.
Definition embedder.h:194
@ kFlutterSemanticsFlagIsMultiline
Definition embedder.h:239
@ kFlutterSemanticsFlagIsObscured
Whether the value of the semantics node is obscured.
Definition embedder.h:209
@ kFlutterSemanticsFlagIsReadOnly
Definition embedder.h:243
@ kFlutterSemanticsFlagHasSelectedState
Definition embedder.h:261
@ kFlutterSemanticsFlagIsLink
Whether the semantics node represents a link.
Definition embedder.h:247
@ kFlutterSemanticsFlagIsLiveRegion
Whether the semantics node is a live region.
Definition embedder.h:220
@ kFlutterSemanticsFlagIsFocused
Whether the semantic node currently holds the user's focus.
Definition embedder.h:198
@ kFlutterSemanticsFlagHasImplicitScrolling
Definition embedder.h:233
@ kFlutterSemanticsFlagIsEnabled
Whether a semantic node that hasEnabledState is currently enabled.
Definition embedder.h:203
@ kFlutterSemanticsFlagIsImage
Whether the semantics node represents an image.
Definition embedder.h:218
@ kFlutterSemanticsFlagNamesRoute
Whether the semantics node label is the name of a visually distinct route.
Definition embedder.h:214
@ kFlutterSemanticsFlagIsFocusable
Whether the semantic node can hold the user's focus.
Definition embedder.h:245
@ kFlutterSemanticsFlagIsTextField
Whether the semantic node represents a text field.
Definition embedder.h:196
@ kFlutterSemanticsFlagHasCheckedState
Definition embedder.h:188
@ kFlutterSemanticsFlagHasEnabledState
Definition embedder.h:201
@ kFlutterSemanticsFlagIsExpanded
Whether a semantic node that hasExpandedState is currently expanded.
Definition embedder.h:258
FLUTTER_EXPORT FlutterEngineResult FlutterEngineGetProcAddresses(FlutterEngineProcTable *table)
Gets the table of engine function pointers.
Definition embedder.cc:3696
FLUTTER_EXPORT FlutterEngineResult FlutterEngineDispatchSemanticsAction(FLUTTER_API_SYMBOL(FlutterEngine) engine, uint64_t node_id, FlutterSemanticsAction action, const uint8_t *data, size_t data_length)
Dispatch a semantics action to the specified semantics node in the implicit view.
Definition embedder.cc:3196
FLUTTER_EXPORT FlutterEngineResult FlutterEngineScheduleFrame(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Schedule a new frame to redraw the content.
Definition embedder.cc:3654
FLUTTER_EXPORT const int32_t kFlutterSemanticsCustomActionIdBatchEnd
Definition embedder.cc:108
void * FlutterVulkanQueueHandle
Alias for VkQueue.
Definition embedder.h:921
void(* FlutterEngineTraceEventDurationEndFnPtr)(const char *name)
Definition embedder.h:3657
uint64_t FlutterVulkanImageHandle
Alias for VkImage.
Definition embedder.h:924
FLUTTER_EXPORT void FlutterEngineTraceEventDurationEnd(const char *name)
A profiling utility. Logs a trace duration end event to the timeline. If the timeline is unavailable ...
Definition embedder.cc:3278
FlutterEngineResult(* FlutterEngineScheduleFrameFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Definition embedder.h:3687
FlutterEngineResult(* FlutterEngineAddViewFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterAddViewInfo *info)
Definition embedder.h:3693
FLUTTER_EXPORT FlutterEngineResult FlutterEngineSetNextFrameCallback(FLUTTER_API_SYMBOL(FlutterEngine) engine, VoidCallback callback, void *user_data)
Schedule a callback to be called after the next frame is drawn. This must be called from the platform...
Definition embedder.cc:3666
FlutterEngine engine
Definition main.cc:84
const FlutterLayer size_t layers_count
const FlutterLayer ** layers
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
G_BEGIN_DECLS GBytes * message
FlutterDesktopBinaryReply callback
const char * name
Definition fuchsia.cc:49
std::vector< FlutterEngineDisplay > * displays
FlutterAddViewCallback add_view_callback
Definition embedder.h:1117
FlutterViewId view_id
The identifier for the view to add. This must be unique.
Definition embedder.h:1097
const FlutterWindowMetricsEvent * view_metrics
Definition embedder.h:1102
void * user_data
The |FlutterAddViewInfo.user_data|.
Definition embedder.h:1081
bool added
True if the add view operation succeeded.
Definition embedder.h:1078
size_t struct_size
The size of this struct. Must be sizeof(FlutterBackingStoreConfig).
Definition embedder.h:2091
FlutterSize size
The size of the render target the engine expects to render into.
Definition embedder.h:2093
FlutterVulkanBackingStore vulkan
Definition embedder.h:2085
FlutterMetalBackingStore metal
Definition embedder.h:2083
FlutterBackingStoreType type
Specifies the type of backing store.
Definition embedder.h:2071
FlutterOpenGLBackingStore open_gl
The description of the OpenGL backing store.
Definition embedder.h:2077
FlutterSoftwareBackingStore software
The description of the software backing store.
Definition embedder.h:2079
FlutterSoftwareBackingStore2 software2
The description of the software backing store.
Definition embedder.h:2081
size_t struct_size
The size of this struct. Must be sizeof(FlutterBackingStore).
Definition embedder.h:2065
size_t struct_size
The size of this struct. Must be sizeof(FlutterBackingStorePresentInfo).
Definition embedder.h:2121
An update to whether a message channel has a listener set or not.
Definition embedder.h:1829
size_t struct_size
The size of the struct. Must be sizeof(FlutterChannelUpdate).
Definition embedder.h:1831
bool listening
True if a listener has been set, false if one has been cleared.
Definition embedder.h:1835
const char * channel
The name of the channel.
Definition embedder.h:1833
FlutterBackingStoreCreateCallback create_backing_store_callback
Definition embedder.h:2213
bool avoid_backing_store_cache
Definition embedder.h:2241
FlutterLayersPresentCallback present_layers_callback
Definition embedder.h:2231
size_t struct_size
This size of this struct. Must be sizeof(FlutterCompositor).
Definition embedder.h:2197
FlutterPresentViewCallback present_view_callback
Definition embedder.h:2250
FlutterBackingStoreCollectCallback collect_backing_store_callback
Definition embedder.h:2218
const FlutterTaskRunnerDescription * ui_task_runner
Definition embedder.h:1908
const FlutterTaskRunnerDescription * render_task_runner
Definition embedder.h:1901
const FlutterTaskRunnerDescription * platform_task_runner
Definition embedder.h:1896
size_t struct_size
The size of this struct. Must be sizeof(FlutterCustomTaskRunners).
Definition embedder.h:1891
A structure to represent a damage region.
Definition embedder.h:664
size_t num_rects
The number of rectangles within the damage region.
Definition embedder.h:668
size_t struct_size
The size of this struct. Must be sizeof(FlutterDamage).
Definition embedder.h:666
FlutterRect * damage
The actual damage region(s) in question.
Definition embedder.h:670
FlutterEngineAOTDataSourceType type
Definition embedder.h:2434
const char * elf_path
Absolute path to an ELF library file.
Definition embedder.h:2437
size_t buffer_size
The size of the buffer.
Definition embedder.h:2376
size_t struct_size
The size of this struct. Must be sizeof(FlutterEngineDartBuffer).
Definition embedder.h:2344
VoidCallback buffer_collect_callback
Definition embedder.h:2368
FlutterEngineDartObjectType type
Definition embedder.h:2387
const char * string_value
Definition embedder.h:2396
const FlutterEngineDartBuffer * buffer_value
Definition embedder.h:2397
size_t height
The height of the display, in physical pixels.
Definition embedder.h:2309
size_t struct_size
The size of this struct. Must be sizeof(FlutterEngineDisplay).
Definition embedder.h:2291
size_t width
The width of the display, in physical pixels.
Definition embedder.h:2306
FlutterEngineDisplayId display_id
Definition embedder.h:2293
Function-pointer-based versions of the APIs above.
Definition embedder.h:3704
FlutterEnginePostCallbackOnAllNativeThreadsFnPtr PostCallbackOnAllNativeThreads
Definition embedder.h:3744
FlutterEngineRegisterExternalTextureFnPtr RegisterExternalTexture
Definition embedder.h:3724
FlutterEngineReloadSystemFontsFnPtr ReloadSystemFonts
Definition embedder.h:3732
FlutterEnginePostDartObjectFnPtr PostDartObject
Definition embedder.h:3741
FlutterEngineScheduleFrameFnPtr ScheduleFrame
Definition embedder.h:3746
FlutterEngineTraceEventDurationEndFnPtr TraceEventDurationEnd
Definition embedder.h:3734
FlutterEnginePlatformMessageReleaseResponseHandleFnPtr PlatformMessageReleaseResponseHandle
Definition embedder.h:3722
FlutterEngineUpdateLocalesFnPtr UpdateLocales
Definition embedder.h:3739
FlutterEngineUnregisterExternalTextureFnPtr UnregisterExternalTexture
Definition embedder.h:3725
FlutterEngineTraceEventDurationBeginFnPtr TraceEventDurationBegin
Definition embedder.h:3733
FlutterEngineAddViewFnPtr AddView
Definition embedder.h:3748
FlutterEngineTraceEventInstantFnPtr TraceEventInstant
Definition embedder.h:3735
FlutterEngineRemoveViewFnPtr RemoveView
Definition embedder.h:3749
FlutterEngineSendKeyEventFnPtr SendKeyEvent
Definition embedder.h:3717
FlutterEngineMarkExternalTextureFrameAvailableFnPtr MarkExternalTextureFrameAvailable
Definition embedder.h:3727
FlutterEngineRunsAOTCompiledDartCodeFnPtr RunsAOTCompiledDartCode
Definition embedder.h:3740
FlutterEngineNotifyLowMemoryWarningFnPtr NotifyLowMemoryWarning
Definition embedder.h:3742
FlutterEngineSetNextFrameCallbackFnPtr SetNextFrameCallback
Definition embedder.h:3747
FlutterEngineSendWindowMetricsEventFnPtr SendWindowMetricsEvent
Definition embedder.h:3715
FlutterEngineShutdownFnPtr Shutdown
Definition embedder.h:3711
FlutterEngineCreateAOTDataFnPtr CreateAOTData
Definition embedder.h:3708
FlutterEngineOnVsyncFnPtr OnVsync
Definition embedder.h:3731
FlutterEngineSendPointerEventFnPtr SendPointerEvent
Definition embedder.h:3716
FlutterEngineCollectAOTDataFnPtr CollectAOTData
Definition embedder.h:3709
size_t struct_size
The size of this struct. Must be sizeof(FlutterEngineProcs).
Definition embedder.h:3706
FlutterEngineGetCurrentTimeFnPtr GetCurrentTime
Definition embedder.h:3737
FlutterEngineInitializeFnPtr Initialize
Definition embedder.h:3712
FlutterEngineSendViewFocusEventFnPtr SendViewFocusEvent
Definition embedder.h:3750
FlutterEngineDispatchSemanticsActionFnPtr DispatchSemanticsAction
Definition embedder.h:3730
FlutterEngineRunTaskFnPtr RunTask
Definition embedder.h:3738
FlutterEngineNotifyDisplayUpdateFnPtr NotifyDisplayUpdate
Definition embedder.h:3745
FlutterEngineDeinitializeFnPtr Deinitialize
Definition embedder.h:3713
FlutterEngineSendPlatformMessageFnPtr SendPlatformMessage
Definition embedder.h:3718
FlutterEngineRunInitializedFnPtr RunInitialized
Definition embedder.h:3714
FlutterEngineUpdateSemanticsEnabledFnPtr UpdateSemanticsEnabled
Definition embedder.h:3728
FlutterEnginePlatformMessageCreateResponseHandleFnPtr PlatformMessageCreateResponseHandle
Definition embedder.h:3720
FlutterEngineSendPlatformMessageResponseFnPtr SendPlatformMessageResponse
Definition embedder.h:3723
FlutterEngineRunFnPtr Run
Definition embedder.h:3710
FlutterEngineUpdateAccessibilityFeaturesFnPtr UpdateAccessibilityFeatures
Definition embedder.h:3729
FlutterEnginePostRenderThreadTaskFnPtr PostRenderThreadTask
Definition embedder.h:3736
FlutterEngineSendSemanticsActionFnPtr SendSemanticsAction
Definition embedder.h:3751
size_t struct_size
The size of this struct. Must be sizeof(FlutterFrameInfo).
Definition embedder.h:681
FlutterUIntSize size
The size of the surface that will be backed by the fbo.
Definition embedder.h:683
uint64_t logical
Definition embedder.h:1406
size_t struct_size
The size of this struct. Must be sizeof(FlutterKeyEvent).
Definition embedder.h:1384
uint64_t physical
Definition embedder.h:1398
FlutterKeyEventDeviceType device_type
The source device for the key event.
Definition embedder.h:1424
FlutterKeyEventType type
The event kind.
Definition embedder.h:1390
const char * character
Definition embedder.h:1409
FlutterPoint offset
Definition embedder.h:2145
FlutterLayerContentType type
Definition embedder.h:2134
const FlutterBackingStore * backing_store
Definition embedder.h:2138
FlutterBackingStorePresentInfo * backing_store_present_info
Definition embedder.h:2151
uint64_t presentation_time
Definition embedder.h:2155
const FlutterPlatformView * platform_view
Definition embedder.h:2141
size_t struct_size
This size of this struct. Must be sizeof(FlutterLayer).
Definition embedder.h:2131
FlutterSize size
The size of the layer (in physical pixels).
Definition embedder.h:2147
const char * language_code
Definition embedder.h:2259
size_t struct_size
This size of this struct. Must be sizeof(FlutterLocale).
Definition embedder.h:2255
const char * script_code
Definition embedder.h:2269
const char * country_code
Definition embedder.h:2264
const char * variant_code
Definition embedder.h:2274
size_t struct_size
The size of this struct. Must be sizeof(FlutterLocaleStringAttribute).
Definition embedder.h:1494
size_t struct_size
The size of this struct. Must be sizeof(FlutterMetalBackingStore).
Definition embedder.h:1969
FlutterMetalTexture texture
Definition embedder.h:1974
size_t struct_size
The size of this struct. Must be sizeof(FlutterMetalExternalTexture).
Definition embedder.h:822
FlutterMetalTextureHandle * textures
Definition embedder.h:839
size_t num_textures
Represents the size of the textures array.
Definition embedder.h:830
FlutterMetalExternalTexturePixelFormat pixel_format
The pixel format type of the external.
Definition embedder.h:828
FlutterMetalExternalTextureYUVColorSpace yuv_color_space
The YUV color space of the YUV external texture.
Definition embedder.h:841
size_t height
Height of the texture.
Definition embedder.h:826
size_t width
Height of the texture.
Definition embedder.h:824
size_t struct_size
The size of this struct. Must be sizeof(FlutterMetalRendererConfig).
Definition embedder.h:889
FlutterMetalTextureFrameCallback external_texture_frame_callback
Definition embedder.h:908
FlutterMetalCommandQueueHandle present_command_queue
Alias for id<MTLCommandQueue>.
Definition embedder.h:893
FlutterMetalDeviceHandle device
Alias for id<MTLDevice>.
Definition embedder.h:891
FlutterMetalPresentCallback present_drawable_callback
Definition embedder.h:903
FlutterMetalTextureCallback get_next_drawable_callback
Definition embedder.h:898
FlutterMetalTextureHandle texture
Definition embedder.h:865
size_t struct_size
The size of this struct. Must be sizeof(FlutterMetalTexture).
Definition embedder.h:855
VoidCallback destruction_callback
Definition embedder.h:872
FlutterOpenGLSurface surface
Definition embedder.h:1923
FlutterOpenGLTexture texture
A texture for Flutter to render into.
Definition embedder.h:1917
FlutterOpenGLTargetType type
Definition embedder.h:1914
FlutterOpenGLFramebuffer framebuffer
Definition embedder.h:1920
uint32_t name
The name of the framebuffer.
Definition embedder.h:544
VoidCallback destruction_callback
Definition embedder.h:551
void * user_data
User data to be returned on the invocation of the destruction callback.
Definition embedder.h:547
ProcResolver gl_proc_resolver
Definition embedder.h:758
BoolPresentInfoCallback present_with_info
Definition embedder.h:782
size_t struct_size
The size of this struct. Must be sizeof(FlutterOpenGLRendererConfig).
Definition embedder.h:719
TextureFrameCallback gl_external_texture_frame_callback
Definition embedder.h:763
FlutterFrameBufferWithDamageCallback populate_existing_damage
Definition embedder.h:796
TransformationCallback surface_transformation
Definition embedder.h:757
BoolCallback make_resource_current
Definition embedder.h:741
UIntFrameInfoCallback fbo_with_frame_info_callback
Definition embedder.h:771
VoidCallback destruction_callback
Definition embedder.h:600
FlutterOpenGLSurfaceCallback clear_current_callback
Definition embedder.h:594
size_t struct_size
The size of this struct. Must be sizeof(FlutterOpenGLSurface).
Definition embedder.h:559
FlutterOpenGLSurfaceCallback make_current_callback
Definition embedder.h:577
uint32_t name
The name of the texture.
Definition embedder.h:514
VoidCallback destruction_callback
Definition embedder.h:521
void * user_data
User data to be returned on the invocation of the destruction callback.
Definition embedder.h:518
size_t height
Height of the texture.
Definition embedder.h:529
uint32_t format
The texture format (example GL_RGBA8).
Definition embedder.h:516
size_t struct_size
The size of this struct. Must be sizeof(FlutterPlatformMessage).
Definition embedder.h:1436
const FlutterPlatformMessageResponseHandle * response_handle
Definition embedder.h:1446
const char * channel
Definition embedder.h:1437
const uint8_t * message
Definition embedder.h:1438
size_t struct_size
The size of this struct. Must be sizeof(FlutterPlatformView).
Definition embedder.h:2025
const FlutterPlatformViewMutation ** mutations
Definition embedder.h:2045
FlutterPlatformViewIdentifier identifier
Definition embedder.h:2029
FlutterTransformation transformation
Definition embedder.h:2019
FlutterPlatformViewMutationType type
The type of the mutation described by the subsequent union.
Definition embedder.h:2014
FlutterRoundedRect clip_rounded_rect
Definition embedder.h:2018
A structure to represent a 2D point.
Definition embedder.h:649
double scroll_delta_y
The y offset of the scroll in physical pixels.
Definition embedder.h:1325
int64_t buttons
The buttons currently pressed, if any.
Definition embedder.h:1333
size_t struct_size
The size of this struct. Must be sizeof(FlutterPointerEvent).
Definition embedder.h:1308
double scale
The scale of the pan/zoom, where 1.0 is the initial scale.
Definition embedder.h:1339
FlutterViewId view_id
The identifier of the view that received the pointer event.
Definition embedder.h:1343
FlutterPointerSignalKind signal_kind
Definition embedder.h:1321
double rotation
The rotation of the pan/zoom in radians, where 0.0 is the initial angle.
Definition embedder.h:1341
double scroll_delta_x
The x offset of the scroll in physical pixels.
Definition embedder.h:1323
double y
The y coordinate of the pointer event in physical pixels.
Definition embedder.h:1317
double x
The x coordinate of the pointer event in physical pixels.
Definition embedder.h:1315
FlutterPointerDeviceKind device_kind
Definition embedder.h:1331
double pan_x
The x offset of the pan/zoom in physical pixels.
Definition embedder.h:1335
FlutterPointerPhase phase
Definition embedder.h:1309
double pan_y
The y offset of the pan/zoom in physical pixels.
Definition embedder.h:1337
uint32_t fbo_id
Id of the fbo backing the surface that was presented.
Definition embedder.h:705
FlutterDamage frame_damage
Damage representing the area that the compositor needs to render.
Definition embedder.h:707
FlutterDamage buffer_damage
Damage used to set the buffer's damage region.
Definition embedder.h:709
size_t struct_size
The size of this struct. Must be sizeof(FlutterPresentInfo).
Definition embedder.h:703
size_t layers_count
The count of layers.
Definition embedder.h:2170
void * user_data
The |FlutterCompositor.user_data|.
Definition embedder.h:2173
FlutterViewId view_id
The identifier of the target view.
Definition embedder.h:2164
const FlutterLayer ** layers
The layers that should be composited onto the view.
Definition embedder.h:2167
FlutterPlatformMessageCallback platform_message_callback
Definition embedder.h:2510
FlutterComputePlatformResolvedLocaleCallback compute_platform_resolved_locale_callback
Definition embedder.h:2682
FlutterLogMessageCallback log_message_callback
Definition embedder.h:2702
FlutterViewFocusChangeRequestCallback view_focus_change_request_callback
Definition embedder.h:2760
VsyncCallback vsync_callback
Definition embedder.h:2607
const char * assets_path
Definition embedder.h:2462
OnPreEngineRestartCallback on_pre_engine_restart_callback
Definition embedder.h:2719
const uint8_t * isolate_snapshot_data
Definition embedder.h:2531
FlutterEngineAOTData aot_data
Definition embedder.h:2671
const char * main_path__unused__
Definition embedder.h:2472
FlutterUpdateSemanticsCallback update_semantics_callback
Definition embedder.h:2737
const char * persistent_cache_path
Definition embedder.h:2592
const uint8_t * vm_snapshot_data
Definition embedder.h:2515
const char * packages_path__unused__
Definition embedder.h:2482
size_t isolate_snapshot_instructions_size
Definition embedder.h:2542
const char *const * dart_entrypoint_argv
Definition embedder.h:2694
size_t struct_size
The size of this struct. Must be sizeof(FlutterProjectArgs).
Definition embedder.h:2458
FlutterUpdateSemanticsCallback2 update_semantics_callback2
Definition embedder.h:2749
const uint8_t * vm_snapshot_instructions
Definition embedder.h:2523
size_t isolate_snapshot_data_size
Definition embedder.h:2534
const char *const * command_line_argv
Definition embedder.h:2504
int64_t dart_old_gen_heap_size
Definition embedder.h:2663
FlutterChannelUpdateCallback channel_update_callback
Definition embedder.h:2754
size_t vm_snapshot_instructions_size
Definition embedder.h:2526
const char * icu_data_path
Definition embedder.h:2486
bool shutdown_dart_vm_when_done
Definition embedder.h:2640
const char * custom_dart_entrypoint
Definition embedder.h:2616
FlutterUpdateSemanticsCustomActionCallback update_semantics_custom_action_callback
Definition embedder.h:2585
FlutterUpdateSemanticsNodeCallback update_semantics_node_callback
Definition embedder.h:2564
const FlutterCustomTaskRunners * custom_task_runners
Definition embedder.h:2621
bool is_persistent_cache_read_only
Definition embedder.h:2596
size_t vm_snapshot_data_size
Definition embedder.h:2518
const char * log_tag
Definition embedder.h:2709
int command_line_argc
The command line argument count used to initialize the project.
Definition embedder.h:2488
VoidCallback root_isolate_create_callback
Definition embedder.h:2545
const uint8_t * isolate_snapshot_instructions
Definition embedder.h:2539
const FlutterCompositor * compositor
Definition embedder.h:2656
A structure to represent a rectangle.
Definition embedder.h:641
double bottom
Definition embedder.h:645
double top
Definition embedder.h:643
double left
Definition embedder.h:642
double right
Definition embedder.h:644
A region represented by a collection of non-overlapping rectangles.
Definition embedder.h:2108
size_t rects_count
Number of rectangles in the region.
Definition embedder.h:2112
FlutterRect * rects
The rectangles that make up the region.
Definition embedder.h:2114
size_t struct_size
The size of this struct. Must be sizeof(FlutterRegion).
Definition embedder.h:2110
FlutterRemoveViewCallback remove_view_callback
Definition embedder.h:1165
FlutterViewId view_id
Definition embedder.h:1148
void * user_data
The |FlutterRemoveViewInfo.user_data|.
Definition embedder.h:1129
bool removed
True if the remove view operation succeeded.
Definition embedder.h:1126
FlutterVulkanRendererConfig vulkan
Definition embedder.h:1036
FlutterMetalRendererConfig metal
Definition embedder.h:1035
FlutterSoftwareRendererConfig software
Definition embedder.h:1034
FlutterOpenGLRendererConfig open_gl
Definition embedder.h:1033
FlutterRendererType type
Definition embedder.h:1031
A structure to represent a rounded rectangle.
Definition embedder.h:655
FlutterRect rect
Definition embedder.h:656
FlutterSize upper_left_corner_radius
Definition embedder.h:657
FlutterSize lower_left_corner_radius
Definition embedder.h:660
FlutterSize upper_right_corner_radius
Definition embedder.h:658
FlutterSize lower_right_corner_radius
Definition embedder.h:659
const char * hint
The hint description of this custom semantics action.
Definition embedder.h:1774
const char * label
The user-readable name of this custom semantics action.
Definition embedder.h:1772
FlutterSemanticsAction override_action
Definition embedder.h:1770
size_t struct_size
The size of the struct. Must be sizeof(FlutterSemanticsCustomAction).
Definition embedder.h:1765
int32_t id
The unique custom action or action override ID.
Definition embedder.h:1767
int32_t id
The unique custom action or action override ID.
Definition embedder.h:1741
FlutterSemanticsAction override_action
Definition embedder.h:1744
size_t struct_size
The size of the struct. Must be sizeof(FlutterSemanticsCustomAction).
Definition embedder.h:1739
const char * label
The user-readable name of this custom semantics action.
Definition embedder.h:1746
const char * hint
The hint description of this custom semantics action.
Definition embedder.h:1748
bool is_link
Whether the semantics node represents a link.
Definition embedder.h:350
bool is_accessibility_focus_blocked
Whether to block a11y focus for the semantics node.
Definition embedder.h:356
bool is_image
Whether the semantics node represents an image.
Definition embedder.h:328
bool names_route
Whether the semantics node label is the name of a visually distinct route.
Definition embedder.h:324
size_t struct_size
The size of this struct. Must be sizeof(FlutterSemanticsFlags).
Definition embedder.h:293
bool is_slider
Whether the semantics node represents a slider.
Definition embedder.h:352
FlutterTristate is_required
Definition embedder.h:307
FlutterTristate is_enabled
Whether a semantic node is currently enabled.
Definition embedder.h:299
bool is_live_region
Whether the semantics node is a live region.
Definition embedder.h:330
bool is_header
Whether a semantic node is a header that divides content into sections.
Definition embedder.h:317
bool is_obscured
Whether the value of the semantics node is obscured.
Definition embedder.h:319
FlutterTristate is_selected
Whether a semantics node is selected.
Definition embedder.h:297
bool is_keyboard_key
Whether the semantics node represents a keyboard key.
Definition embedder.h:354
bool is_in_mutually_exclusive_group
Whether a semantic node is in a mutually exclusive group.
Definition embedder.h:315
FlutterTristate is_toggled
Definition embedder.h:302
FlutterTristate is_focused
Whether the semantic node currently holds the user's focus.
Definition embedder.h:309
FlutterTristate is_expanded
Whether a semantic node that is currently expanded.
Definition embedder.h:304
bool is_hidden
Whether the semantics node is considered hidden.
Definition embedder.h:326
bool is_text_field
Whether the semantic node represents a text field.
Definition embedder.h:313
FlutterCheckState is_checked
Whether a semantics node is checked.
Definition embedder.h:295
bool is_button
Whether the semantic node represents a button.
Definition embedder.h:311
const char * identifier
Definition embedder.h:1714
const char * increased_value
Definition embedder.h:1650
const char * tooltip
A textual tooltip attached to the node.
Definition embedder.h:1677
int32_t scroll_index
The index of the first visible semantic child of a scroll node.
Definition embedder.h:1629
size_t custom_accessibility_actions_count
The number of custom accessibility action associated with this node.
Definition embedder.h:1669
const int32_t * children_in_traversal_order
Array of child node IDs in traversal order. Has length child_count.
Definition embedder.h:1665
double scroll_extent_min
The minimum in-range value for scrollPosition if the node is scrollable.
Definition embedder.h:1636
FlutterSemanticsFlag flags__deprecated__
Definition embedder.h:1619
double thickness
Describes how much space the semantics node takes up along the z-axis.
Definition embedder.h:1641
size_t struct_size
The size of this struct. Must be sizeof(FlutterSemanticsNode).
Definition embedder.h:1611
size_t decreased_value_attribute_count
Definition embedder.h:1699
size_t increased_value_attribute_count
Definition embedder.h:1694
const int32_t * children_in_hit_test_order
Array of child node IDs in hit test order. Has length child_count.
Definition embedder.h:1667
FlutterPlatformViewIdentifier platform_view_id
Definition embedder.h:1675
const FlutterStringAttribute ** hint_attributes
Definition embedder.h:1687
const FlutterStringAttribute ** decreased_value_attributes
Definition embedder.h:1702
int32_t text_selection_extent
The position at which the text selection terminates.
Definition embedder.h:1625
FlutterTextDirection text_direction
Definition embedder.h:1656
const FlutterStringAttribute ** increased_value_attributes
Definition embedder.h:1697
FlutterSemanticsAction actions
The set of semantics actions applicable to this node.
Definition embedder.h:1621
const int32_t * custom_accessibility_actions
Definition embedder.h:1672
int32_t id
The unique identifier for this node.
Definition embedder.h:1613
FlutterRect rect
The bounding box for this node in its coordinate system.
Definition embedder.h:1658
FlutterTransformation transform
Definition embedder.h:1661
size_t child_count
The number of children this node has.
Definition embedder.h:1663
double scroll_extent_max
The maximum in-range value for scrollPosition if the node is scrollable.
Definition embedder.h:1634
const char * decreased_value
Definition embedder.h:1653
const char * label
A textual description of the node.
Definition embedder.h:1643
int32_t text_selection_base
The position at which the text selection originates.
Definition embedder.h:1623
const char * hint
A brief description of the result of performing an action on the node.
Definition embedder.h:1645
const FlutterStringAttribute ** value_attributes
Definition embedder.h:1692
FlutterSemanticsFlags * flags2
Definition embedder.h:1705
const char * value
A textual description of the current value of the node.
Definition embedder.h:1647
int32_t scroll_child_count
The total number of scrollable children that contribute to semantics.
Definition embedder.h:1627
const FlutterStringAttribute ** label_attributes
Definition embedder.h:1682
size_t custom_accessibility_actions_count
The number of custom accessibility action associated with this node.
Definition embedder.h:1586
const char * label
A textual description of the node.
Definition embedder.h:1560
size_t child_count
The number of children this node has.
Definition embedder.h:1580
FlutterTransformation transform
Definition embedder.h:1578
const char * value
A textual description of the current value of the node.
Definition embedder.h:1564
const char * decreased_value
Definition embedder.h:1570
const int32_t * custom_accessibility_actions
Definition embedder.h:1589
FlutterSemanticsAction actions
The set of semantics actions applicable to this node.
Definition embedder.h:1538
size_t struct_size
The size of this struct. Must be sizeof(FlutterSemanticsNode).
Definition embedder.h:1532
const char * tooltip
A textual tooltip attached to the node.
Definition embedder.h:1594
const char * hint
A brief description of the result of performing an action on the node.
Definition embedder.h:1562
FlutterTextDirection text_direction
Definition embedder.h:1573
FlutterPlatformViewIdentifier platform_view_id
Definition embedder.h:1592
const int32_t * children_in_traversal_order
Array of child node IDs in traversal order. Has length child_count.
Definition embedder.h:1582
double scroll_extent_max
The maximum in-range value for scrollPosition if the node is scrollable.
Definition embedder.h:1551
int32_t id
The unique identifier for this node.
Definition embedder.h:1534
int32_t scroll_child_count
The total number of scrollable children that contribute to semantics.
Definition embedder.h:1544
FlutterSemanticsFlag flags
The set of semantics flags associated with this node.
Definition embedder.h:1536
int32_t text_selection_extent
The position at which the text selection terminates.
Definition embedder.h:1542
const int32_t * children_in_hit_test_order
Array of child node IDs in hit test order. Has length child_count.
Definition embedder.h:1584
int32_t text_selection_base
The position at which the text selection originates.
Definition embedder.h:1540
double scroll_extent_min
The minimum in-range value for scrollPosition if the node is scrollable.
Definition embedder.h:1553
double thickness
Describes how much space the semantics node takes up along the z-axis.
Definition embedder.h:1558
int32_t scroll_index
The index of the first visible semantic child of a scroll node.
Definition embedder.h:1546
FlutterRect rect
The bounding box for this node in its coordinate system.
Definition embedder.h:1575
const char * increased_value
Definition embedder.h:1567
A batch of updates to semantics nodes and custom actions.
Definition embedder.h:1796
size_t node_count
The number of semantics node updates.
Definition embedder.h:1800
size_t custom_action_count
The number of semantics custom action updates.
Definition embedder.h:1804
FlutterSemanticsNode2 ** nodes
Definition embedder.h:1802
FlutterSemanticsCustomAction2 ** custom_actions
Definition embedder.h:1807
FlutterViewId view_id
Definition embedder.h:1809
size_t struct_size
The size of the struct. Must be sizeof(FlutterSemanticsUpdate2).
Definition embedder.h:1798
FlutterSemanticsNode * nodes
Definition embedder.h:1788
size_t nodes_count
The number of semantics node updates.
Definition embedder.h:1786
size_t struct_size
The size of the struct. Must be sizeof(FlutterSemanticsUpdate).
Definition embedder.h:1784
size_t custom_actions_count
The number of semantics custom action updates.
Definition embedder.h:1790
FlutterSemanticsCustomAction * custom_actions
Array of semantics custom actions. Has length custom_actions_count.
Definition embedder.h:1792
FlutterViewId view_id
The ID of the view that includes the node.
Definition embedder.h:2774
FlutterSemanticsAction action
The semantics action.
Definition embedder.h:2780
size_t data_length
The data length.
Definition embedder.h:2786
uint64_t node_id
The semantics node identifier.
Definition embedder.h:2777
const uint8_t * data
Data associated with the action.
Definition embedder.h:2783
A structure to represent the width and height.
Definition embedder.h:627
double height
Definition embedder.h:629
double width
Definition embedder.h:628
size_t struct_size
The size of this struct. Must be sizeof(FlutterSoftwareBackingStore2).
Definition embedder.h:1946
VoidCallback destruction_callback
Definition embedder.h:1960
size_t row_bytes
The number of bytes in a single row of the allocation.
Definition embedder.h:1951
size_t height
The number of rows in the allocation.
Definition embedder.h:1953
FlutterSoftwarePixelFormat pixel_format
Definition embedder.h:1964
VoidCallback destruction_callback
Definition embedder.h:1941
size_t row_bytes
The number of bytes in a single row of the allocation.
Definition embedder.h:1932
size_t height
The number of rows in the allocation.
Definition embedder.h:1934
size_t struct_size
The size of this struct. Must be sizeof(FlutterSoftwareRendererConfig).
Definition embedder.h:1022
SoftwareSurfacePresentCallback surface_present_callback
Definition embedder.h:1027
size_t struct_size
The size of this struct. Must be sizeof(FlutterSpellOutStringAttribute).
Definition embedder.h:1485
FlutterStringAttributeType type
The type of the attribute described by the subsequent union.
Definition embedder.h:1510
const FlutterSpellOutStringAttribute * spell_out
Definition embedder.h:1513
size_t struct_size
The size of this struct. Must be sizeof(FlutterStringAttribute).
Definition embedder.h:1504
const FlutterLocaleStringAttribute * locale
Definition embedder.h:1515
FlutterTaskRunner runner
Definition embedder.h:1849
uint64_t task
Definition embedder.h:1850
size_t struct_size
The size of this struct. Must be sizeof(FlutterTaskRunnerDescription).
Definition embedder.h:1864
BoolCallback runs_task_on_current_thread_callback
Definition embedder.h:1870
FlutterTaskRunnerPostTaskCallback post_task_callback
Definition embedder.h:1881
VoidCallback destruction_callback
The callback invoked when the task runner is destroyed.
Definition embedder.h:1886
double transY
vertical translation
Definition embedder.h:400
double pers2
perspective scale factor
Definition embedder.h:406
double skewX
horizontal skew factor
Definition embedder.h:392
double pers0
input x-axis perspective factor
Definition embedder.h:402
double scaleX
horizontal scale factor
Definition embedder.h:390
double skewY
vertical skew factor
Definition embedder.h:396
double scaleY
vertical scale factor
Definition embedder.h:398
double pers1
input y-axis perspective factor
Definition embedder.h:404
double transX
horizontal translation
Definition embedder.h:394
uint32_t height
Definition embedder.h:637
uint32_t width
Definition embedder.h:636
FlutterViewFocusState state
The focus state of the view.
Definition embedder.h:1230
FlutterViewId view_id
The identifier of the view that received the focus event.
Definition embedder.h:1227
FlutterViewFocusDirection direction
The direction in which the focus transitioned across [FlutterView]s.
Definition embedder.h:1233
FlutterViewFocusState state
The focus state of the view.
Definition embedder.h:1210
FlutterViewFocusDirection direction
The direction in which the focus transitioned across [FlutterView]s.
Definition embedder.h:1213
FlutterViewId view_id
The identifier of the view that received the focus event.
Definition embedder.h:1207
size_t struct_size
The size of this struct. Must be sizeof(FlutterVulkanBackingStore).
Definition embedder.h:1980
VoidCallback destruction_callback
Definition embedder.h:1994
const FlutterVulkanImage * image
Definition embedder.h:1987
FlutterVulkanImageHandle image
Definition embedder.h:931
size_t struct_size
The size of this struct. Must be sizeof(FlutterVulkanImage).
Definition embedder.h:928
uint32_t format
The VkFormat of the image (for example: VK_FORMAT_R8G8B8A8_UNORM).
Definition embedder.h:933
FlutterVulkanQueueHandle queue
Definition embedder.h:977
FlutterVulkanDeviceHandle device
Definition embedder.h:968
FlutterVulkanInstanceProcAddressCallback get_instance_proc_address_callback
Definition embedder.h:1006
size_t struct_size
The size of this struct. Must be sizeof(FlutterVulkanRendererConfig).
Definition embedder.h:956
size_t enabled_instance_extension_count
Definition embedder.h:980
uint32_t queue_family_index
The queue family index of the VkQueue supplied in the next field.
Definition embedder.h:970
FlutterVulkanImageCallback get_next_image_callback
Definition embedder.h:1010
const char ** enabled_instance_extensions
Definition embedder.h:987
const char ** enabled_device_extensions
Definition embedder.h:998
FlutterVulkanInstanceHandle instance
Definition embedder.h:963
FlutterVulkanPresentCallback present_image_callback
Definition embedder.h:1016
FlutterVulkanPhysicalDeviceHandle physical_device
VkPhysicalDevice handle.
Definition embedder.h:965
FlutterEngineDisplayId display_id
The identifier of the display the view is rendering on.
Definition embedder.h:1067
size_t struct_size
The size of this struct. Must be sizeof(FlutterWindowMetricsEvent).
Definition embedder.h:1047
size_t height
Physical height of the window.
Definition embedder.h:1051
size_t left
Horizontal physical location of the left side of the window on the screen.
Definition embedder.h:1055
double physical_view_inset_left
Left inset of window.
Definition embedder.h:1065
int64_t view_id
The view that this event is describing.
Definition embedder.h:1069
double pixel_ratio
Scale factor for the physical screen.
Definition embedder.h:1053
double physical_view_inset_top
Top inset of window.
Definition embedder.h:1059
double physical_view_inset_bottom
Bottom inset of window.
Definition embedder.h:1063
size_t top
Vertical physical location of the top of the window on the screen.
Definition embedder.h:1057
double physical_view_inset_right
Right inset of window.
Definition embedder.h:1061
size_t width
Physical width of the window.
Definition embedder.h:1049
std::shared_ptr< const fml::Mapping > data
const uintptr_t id