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